argous 1.2.201 → 1.2.203

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 (409) hide show
  1. package/dist/components/ConfirmModal/ModalProvider.d.ts +1 -1
  2. package/dist/components/DropArea/DropArea.js +2 -7
  3. package/dist/components/Editor/components/Editor.d.ts +4 -4
  4. package/dist/components/Editor/components/Editor.js +3 -3
  5. package/dist/components/Editor/skins/content/dark/content.d.ts +0 -0
  6. package/dist/components/Editor/skins/content/dark/content.js +3 -0
  7. package/dist/components/Editor/skins/content/default/content.d.ts +0 -0
  8. package/dist/components/Editor/skins/content/default/content.js +3 -0
  9. package/dist/components/Editor/skins/content/document/content.d.ts +0 -0
  10. package/dist/components/Editor/skins/content/document/content.js +3 -0
  11. package/dist/components/Editor/skins/content/tinymce-5/content.d.ts +0 -0
  12. package/dist/components/Editor/skins/content/tinymce-5/content.js +3 -0
  13. package/dist/components/Editor/skins/content/tinymce-5-dark/content.d.ts +0 -0
  14. package/dist/components/Editor/skins/content/tinymce-5-dark/content.js +3 -0
  15. package/dist/components/Editor/skins/content/writer/content.d.ts +0 -0
  16. package/dist/components/Editor/skins/content/writer/content.js +3 -0
  17. package/dist/components/Editor/skins/ui/oxide/content.d.ts +0 -0
  18. package/dist/components/Editor/skins/ui/oxide/content.inline.d.ts +0 -0
  19. package/dist/components/Editor/skins/ui/oxide/content.inline.js +3 -0
  20. package/dist/components/Editor/skins/ui/oxide/content.js +3 -0
  21. package/dist/components/Editor/skins/ui/oxide/skin.d.ts +0 -0
  22. package/dist/components/Editor/skins/ui/oxide/skin.js +3 -0
  23. package/dist/components/Editor/skins/ui/oxide/skin.shadowdom.d.ts +0 -0
  24. package/dist/components/Editor/skins/ui/oxide/skin.shadowdom.js +3 -0
  25. package/dist/components/Editor/skins/ui/oxide-dark/content.d.ts +0 -0
  26. package/dist/components/Editor/skins/ui/oxide-dark/content.inline.d.ts +0 -0
  27. package/dist/components/Editor/skins/ui/oxide-dark/content.inline.js +3 -0
  28. package/dist/components/Editor/skins/ui/oxide-dark/content.js +3 -0
  29. package/dist/components/Editor/skins/ui/oxide-dark/skin.d.ts +0 -0
  30. package/dist/components/Editor/skins/ui/oxide-dark/skin.js +3 -0
  31. package/dist/components/Editor/skins/ui/oxide-dark/skin.shadowdom.d.ts +0 -0
  32. package/dist/components/Editor/skins/ui/oxide-dark/skin.shadowdom.js +3 -0
  33. package/dist/components/Editor/skins/ui/tinymce-5/content.d.ts +0 -0
  34. package/dist/components/Editor/skins/ui/tinymce-5/content.inline.d.ts +0 -0
  35. package/dist/components/Editor/skins/ui/tinymce-5/content.inline.js +3 -0
  36. package/dist/components/Editor/skins/ui/tinymce-5/content.js +3 -0
  37. package/dist/components/Editor/skins/ui/tinymce-5/skin.d.ts +0 -0
  38. package/dist/components/Editor/skins/ui/tinymce-5/skin.js +3 -0
  39. package/dist/components/Editor/skins/ui/tinymce-5/skin.shadowdom.d.ts +0 -0
  40. package/dist/components/Editor/skins/ui/tinymce-5/skin.shadowdom.js +3 -0
  41. package/dist/components/Editor/skins/ui/tinymce-5-dark/content.d.ts +0 -0
  42. package/dist/components/Editor/skins/ui/tinymce-5-dark/content.inline.d.ts +0 -0
  43. package/dist/components/Editor/skins/ui/tinymce-5-dark/content.inline.js +3 -0
  44. package/dist/components/Editor/skins/ui/tinymce-5-dark/content.js +3 -0
  45. package/dist/components/Editor/skins/ui/tinymce-5-dark/skin.d.ts +0 -0
  46. package/dist/components/Editor/skins/ui/tinymce-5-dark/skin.js +3 -0
  47. package/dist/components/Editor/skins/ui/tinymce-5-dark/skin.shadowdom.d.ts +0 -0
  48. package/dist/components/Editor/skins/ui/tinymce-5-dark/skin.shadowdom.js +3 -0
  49. package/dist/components/Editor/tinymce/tinymce.d.ts +1722 -1447
  50. package/lib/components/DropArea/DropArea.js +9 -10
  51. package/lib/components/Editor/components/Editor.tsx +8 -8
  52. package/lib/components/Editor/skins/content/dark/content.js +2 -0
  53. package/lib/components/Editor/skins/content/dark/content.min.css +1 -8
  54. package/lib/components/Editor/skins/content/default/content.js +2 -0
  55. package/lib/components/Editor/skins/content/default/content.min.css +0 -7
  56. package/lib/components/Editor/skins/content/document/content.js +2 -0
  57. package/lib/components/Editor/skins/content/document/content.min.css +0 -7
  58. package/lib/components/Editor/skins/content/tinymce-5/content.js +2 -0
  59. package/lib/components/Editor/skins/content/tinymce-5/content.min.css +1 -0
  60. package/lib/components/Editor/skins/content/tinymce-5-dark/content.js +2 -0
  61. package/lib/components/Editor/skins/content/tinymce-5-dark/content.min.css +1 -0
  62. package/lib/components/Editor/skins/content/writer/content.js +2 -0
  63. package/lib/components/Editor/skins/content/writer/content.min.css +0 -7
  64. package/lib/components/Editor/skins/ui/oxide/content.inline.js +2 -0
  65. package/lib/components/Editor/skins/ui/oxide/content.inline.min.css +1 -0
  66. package/lib/components/Editor/skins/ui/oxide/content.js +2 -0
  67. package/lib/components/Editor/skins/ui/oxide/content.min.css +1 -0
  68. package/lib/components/Editor/skins/ui/oxide/skin.js +2 -0
  69. package/lib/components/Editor/skins/ui/oxide/skin.min.css +1 -0
  70. package/lib/components/Editor/skins/ui/oxide/skin.shadowdom.js +2 -0
  71. package/lib/components/Editor/skins/ui/oxide/skin.shadowdom.min.css +1 -0
  72. package/lib/components/Editor/skins/ui/oxide-dark/content.inline.js +2 -0
  73. package/lib/components/Editor/skins/ui/oxide-dark/content.inline.min.css +1 -0
  74. package/lib/components/Editor/skins/ui/oxide-dark/content.js +2 -0
  75. package/lib/components/Editor/skins/ui/oxide-dark/content.min.css +1 -0
  76. package/lib/components/Editor/skins/ui/oxide-dark/skin.js +2 -0
  77. package/lib/components/Editor/skins/ui/oxide-dark/skin.min.css +1 -0
  78. package/lib/components/Editor/skins/ui/oxide-dark/skin.shadowdom.js +2 -0
  79. package/lib/components/Editor/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -0
  80. package/lib/components/Editor/skins/ui/tinymce-5/content.inline.js +2 -0
  81. package/lib/components/Editor/skins/ui/tinymce-5/content.inline.min.css +1 -0
  82. package/lib/components/Editor/skins/ui/tinymce-5/content.js +2 -0
  83. package/lib/components/Editor/skins/ui/tinymce-5/content.min.css +1 -0
  84. package/lib/components/Editor/skins/ui/tinymce-5/skin.js +2 -0
  85. package/lib/components/Editor/skins/ui/tinymce-5/skin.min.css +1 -0
  86. package/lib/components/Editor/skins/ui/tinymce-5/skin.shadowdom.js +2 -0
  87. package/lib/components/Editor/skins/ui/tinymce-5/skin.shadowdom.min.css +1 -0
  88. package/lib/components/Editor/skins/ui/tinymce-5-dark/content.inline.js +2 -0
  89. package/lib/components/Editor/skins/ui/tinymce-5-dark/content.inline.min.css +1 -0
  90. package/lib/components/Editor/skins/ui/tinymce-5-dark/content.js +2 -0
  91. package/lib/components/Editor/skins/ui/tinymce-5-dark/content.min.css +1 -0
  92. package/lib/components/Editor/skins/ui/tinymce-5-dark/skin.js +2 -0
  93. package/lib/components/Editor/skins/ui/tinymce-5-dark/skin.min.css +1 -0
  94. package/lib/components/Editor/skins/ui/tinymce-5-dark/skin.shadowdom.js +2 -0
  95. package/lib/components/Editor/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +1 -0
  96. package/lib/components/Editor/tinymce/README.md +24 -14
  97. package/lib/components/Editor/tinymce/icons/default/icons.js +185 -163
  98. package/lib/components/Editor/tinymce/icons/default/icons.min.js +1 -1
  99. package/lib/components/Editor/tinymce/langs/README.md +1 -1
  100. package/lib/components/Editor/tinymce/license.txt +21 -504
  101. package/lib/components/Editor/tinymce/models/dom/model.js +8040 -0
  102. package/lib/components/Editor/tinymce/models/dom/model.min.js +4 -0
  103. package/lib/components/Editor/tinymce/plugins/accordion/plugin.js +1054 -0
  104. package/lib/components/Editor/tinymce/plugins/accordion/plugin.min.js +4 -0
  105. package/lib/components/Editor/tinymce/plugins/advlist/plugin.js +187 -208
  106. package/lib/components/Editor/tinymce/plugins/advlist/plugin.min.js +2 -7
  107. package/lib/components/Editor/tinymce/plugins/anchor/plugin.js +82 -84
  108. package/lib/components/Editor/tinymce/plugins/anchor/plugin.min.js +2 -7
  109. package/lib/components/Editor/tinymce/plugins/autolink/plugin.js +210 -167
  110. package/lib/components/Editor/tinymce/plugins/autolink/plugin.min.js +2 -7
  111. package/lib/components/Editor/tinymce/plugins/autoresize/plugin.js +118 -97
  112. package/lib/components/Editor/tinymce/plugins/autoresize/plugin.min.js +2 -7
  113. package/lib/components/Editor/tinymce/plugins/autosave/plugin.js +129 -108
  114. package/lib/components/Editor/tinymce/plugins/autosave/plugin.min.js +2 -7
  115. package/lib/components/Editor/tinymce/plugins/charmap/plugin.js +285 -333
  116. package/lib/components/Editor/tinymce/plugins/charmap/plugin.min.js +2 -7
  117. package/lib/components/Editor/tinymce/plugins/code/plugin.js +19 -26
  118. package/lib/components/Editor/tinymce/plugins/code/plugin.min.js +2 -7
  119. package/lib/components/Editor/tinymce/plugins/codesample/plugin.js +2225 -2094
  120. package/lib/components/Editor/tinymce/plugins/codesample/plugin.min.js +2 -7
  121. package/lib/components/Editor/tinymce/plugins/directionality/plugin.js +318 -243
  122. package/lib/components/Editor/tinymce/plugins/directionality/plugin.min.js +2 -7
  123. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojiimages.js +1 -9424
  124. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojiimages.min.js +1 -1
  125. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojis.js +1 -9423
  126. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojis.min.js +1 -1
  127. package/lib/components/Editor/tinymce/plugins/emoticons/plugin.js +406 -416
  128. package/lib/components/Editor/tinymce/plugins/emoticons/plugin.min.js +2 -7
  129. package/lib/components/Editor/tinymce/plugins/fullscreen/plugin.js +821 -604
  130. package/lib/components/Editor/tinymce/plugins/fullscreen/plugin.min.js +2 -7
  131. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ar.js +90 -0
  132. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/bg_BG.js +90 -0
  133. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ca.js +90 -0
  134. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/cs.js +90 -0
  135. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/da.js +90 -0
  136. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/de.js +90 -0
  137. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/el.js +90 -0
  138. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/en.js +90 -0
  139. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/es.js +90 -0
  140. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/eu.js +90 -0
  141. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/fa.js +90 -0
  142. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/fi.js +90 -0
  143. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/fr_FR.js +90 -0
  144. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/he_IL.js +90 -0
  145. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/hi.js +90 -0
  146. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/hr.js +90 -0
  147. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/hu_HU.js +90 -0
  148. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/id.js +90 -0
  149. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/it.js +90 -0
  150. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ja.js +90 -0
  151. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/kk.js +90 -0
  152. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ko_KR.js +90 -0
  153. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ms.js +90 -0
  154. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/nb_NO.js +90 -0
  155. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/nl.js +90 -0
  156. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/pl.js +90 -0
  157. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/pt_BR.js +90 -0
  158. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/pt_PT.js +90 -0
  159. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ro.js +90 -0
  160. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ru.js +90 -0
  161. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/sk.js +90 -0
  162. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/sl_SI.js +90 -0
  163. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/sv_SE.js +90 -0
  164. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/th_TH.js +90 -0
  165. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/tr.js +90 -0
  166. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/uk.js +90 -0
  167. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/vi.js +90 -0
  168. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/zh_CN.js +84 -0
  169. package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/zh_TW.js +90 -0
  170. package/lib/components/Editor/tinymce/plugins/help/plugin.js +428 -403
  171. package/lib/components/Editor/tinymce/plugins/help/plugin.min.js +2 -7
  172. package/lib/components/Editor/tinymce/plugins/image/plugin.js +887 -1043
  173. package/lib/components/Editor/tinymce/plugins/image/plugin.min.js +2 -7
  174. package/lib/components/Editor/tinymce/plugins/importcss/plugin.js +163 -162
  175. package/lib/components/Editor/tinymce/plugins/importcss/plugin.min.js +2 -7
  176. package/lib/components/Editor/tinymce/plugins/insertdatetime/plugin.js +101 -91
  177. package/lib/components/Editor/tinymce/plugins/insertdatetime/plugin.min.js +2 -7
  178. package/lib/components/Editor/tinymce/plugins/link/plugin.js +739 -784
  179. package/lib/components/Editor/tinymce/plugins/link/plugin.min.js +2 -7
  180. package/lib/components/Editor/tinymce/plugins/lists/plugin.js +1282 -1396
  181. package/lib/components/Editor/tinymce/plugins/lists/plugin.min.js +2 -7
  182. package/lib/components/Editor/tinymce/plugins/media/plugin.js +641 -806
  183. package/lib/components/Editor/tinymce/plugins/media/plugin.min.js +2 -7
  184. package/lib/components/Editor/tinymce/plugins/nonbreaking/plugin.js +76 -54
  185. package/lib/components/Editor/tinymce/plugins/nonbreaking/plugin.min.js +2 -7
  186. package/lib/components/Editor/tinymce/plugins/pagebreak/plugin.js +58 -46
  187. package/lib/components/Editor/tinymce/plugins/pagebreak/plugin.min.js +2 -7
  188. package/lib/components/Editor/tinymce/plugins/preview/plugin.js +39 -69
  189. package/lib/components/Editor/tinymce/plugins/preview/plugin.min.js +2 -7
  190. package/lib/components/Editor/tinymce/plugins/quickbars/plugin.js +307 -349
  191. package/lib/components/Editor/tinymce/plugins/quickbars/plugin.min.js +2 -7
  192. package/lib/components/Editor/tinymce/plugins/save/plugin.js +50 -51
  193. package/lib/components/Editor/tinymce/plugins/save/plugin.min.js +2 -7
  194. package/lib/components/Editor/tinymce/plugins/searchreplace/plugin.js +517 -587
  195. package/lib/components/Editor/tinymce/plugins/searchreplace/plugin.min.js +2 -7
  196. package/lib/components/Editor/tinymce/plugins/table/plugin.js +2666 -10142
  197. package/lib/components/Editor/tinymce/plugins/table/plugin.min.js +2 -7
  198. package/lib/components/Editor/tinymce/plugins/template/plugin.js +403 -413
  199. package/lib/components/Editor/tinymce/plugins/template/plugin.min.js +2 -7
  200. package/lib/components/Editor/tinymce/plugins/visualblocks/plugin.js +42 -48
  201. package/lib/components/Editor/tinymce/plugins/visualblocks/plugin.min.js +2 -7
  202. package/lib/components/Editor/tinymce/plugins/visualchars/plugin.js +352 -333
  203. package/lib/components/Editor/tinymce/plugins/visualchars/plugin.min.js +2 -7
  204. package/lib/components/Editor/tinymce/plugins/wordcount/plugin.js +184 -195
  205. package/lib/components/Editor/tinymce/plugins/wordcount/plugin.min.js +2 -7
  206. package/lib/components/Editor/tinymce/skins/content/dark/content.css +2 -8
  207. package/lib/components/Editor/tinymce/skins/content/dark/content.js +2 -0
  208. package/lib/components/Editor/tinymce/skins/content/dark/content.js.map +1 -0
  209. package/lib/components/Editor/tinymce/skins/content/dark/content.min.css +2 -8
  210. package/lib/components/Editor/tinymce/skins/content/dark/content.min.css.map +1 -1
  211. package/lib/components/Editor/tinymce/skins/content/default/content.css +0 -6
  212. package/lib/components/Editor/tinymce/skins/content/default/content.js +2 -0
  213. package/lib/components/Editor/tinymce/skins/content/default/content.js.map +1 -0
  214. package/lib/components/Editor/tinymce/skins/content/default/content.min.css +1 -7
  215. package/lib/components/Editor/tinymce/skins/content/default/content.min.css.map +1 -1
  216. package/lib/components/Editor/tinymce/skins/content/document/content.css +0 -6
  217. package/lib/components/Editor/tinymce/skins/content/document/content.js +2 -0
  218. package/lib/components/Editor/tinymce/skins/content/document/content.js.map +1 -0
  219. package/lib/components/Editor/tinymce/skins/content/document/content.min.css +0 -6
  220. package/lib/components/Editor/tinymce/skins/content/document/content.min.css.map +1 -1
  221. package/lib/components/Editor/{skins/content/default → tinymce/skins/content/tinymce-5}/content.css +0 -6
  222. package/lib/components/Editor/tinymce/skins/content/tinymce-5/content.js +2 -0
  223. package/lib/components/Editor/tinymce/skins/content/tinymce-5/content.js.map +1 -0
  224. package/lib/components/Editor/tinymce/skins/content/tinymce-5/content.min.css +2 -0
  225. package/lib/components/Editor/tinymce/skins/content/tinymce-5/content.min.css.map +1 -0
  226. package/lib/components/Editor/{skins/content/dark → tinymce/skins/content/tinymce-5-dark}/content.css +1 -7
  227. package/lib/components/Editor/tinymce/skins/content/tinymce-5-dark/content.js +2 -0
  228. package/lib/components/Editor/tinymce/skins/content/tinymce-5-dark/content.js.map +1 -0
  229. package/lib/components/Editor/tinymce/skins/content/tinymce-5-dark/content.min.css +2 -0
  230. package/lib/components/Editor/tinymce/skins/content/tinymce-5-dark/content.min.css.map +1 -0
  231. package/lib/components/Editor/tinymce/skins/content/writer/content.css +0 -6
  232. package/lib/components/Editor/tinymce/skins/content/writer/content.js +2 -0
  233. package/lib/components/Editor/tinymce/skins/content/writer/content.js.map +1 -0
  234. package/lib/components/Editor/tinymce/skins/content/writer/content.min.css +0 -6
  235. package/lib/components/Editor/tinymce/skins/content/writer/content.min.css.map +1 -1
  236. package/lib/components/Editor/tinymce/skins/ui/oxide/content.css +74 -21
  237. package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.css +74 -21
  238. package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.js +2 -0
  239. package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.js.map +1 -0
  240. package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.min.css +1 -7
  241. package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.min.css.map +1 -1
  242. package/lib/components/Editor/tinymce/skins/ui/oxide/content.js +2 -0
  243. package/lib/components/Editor/tinymce/skins/ui/oxide/content.js.map +1 -0
  244. package/lib/components/Editor/tinymce/skins/ui/oxide/content.min.css +1 -7
  245. package/lib/components/Editor/tinymce/skins/ui/oxide/content.min.css.map +1 -1
  246. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.css +1131 -402
  247. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.js +2 -0
  248. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.js.map +1 -0
  249. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.min.css +1 -7
  250. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.min.css.map +1 -1
  251. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.css +8 -15
  252. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.js +2 -0
  253. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.js.map +1 -0
  254. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.min.css +1 -7
  255. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.min.css.map +1 -1
  256. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.css +72 -20
  257. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.css +74 -21
  258. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.js +2 -0
  259. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.js.map +1 -0
  260. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -7
  261. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.min.css.map +1 -1
  262. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.js +2 -0
  263. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.js.map +1 -0
  264. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.min.css +1 -7
  265. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.min.css.map +1 -1
  266. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.css +1155 -423
  267. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.js +2 -0
  268. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.js.map +1 -0
  269. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.min.css +1 -7
  270. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.min.css.map +1 -1
  271. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +8 -15
  272. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +2 -0
  273. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.js.map +1 -0
  274. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -7
  275. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css.map +1 -1
  276. package/lib/components/Editor/{skins/ui/default → tinymce/skins/ui/tinymce-5}/content.css +75 -22
  277. package/lib/components/Editor/{skins/ui/default → tinymce/skins/ui/tinymce-5}/content.inline.css +75 -22
  278. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.inline.js +2 -0
  279. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.inline.js.map +1 -0
  280. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.inline.min.css +2 -0
  281. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.inline.min.css.map +1 -0
  282. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.js +2 -0
  283. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.js.map +1 -0
  284. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.min.css +2 -0
  285. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.min.css.map +1 -0
  286. package/lib/components/Editor/{skins/ui/default → tinymce/skins/ui/tinymce-5}/skin.css +1261 -438
  287. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.js +2 -0
  288. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.js.map +1 -0
  289. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.min.css +2 -0
  290. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.min.css.map +1 -0
  291. package/lib/components/Editor/{skins/ui/default → tinymce/skins/ui/tinymce-5}/skin.shadowdom.css +8 -15
  292. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.shadowdom.js +2 -0
  293. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.shadowdom.js.map +1 -0
  294. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css +2 -0
  295. package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css.map +1 -0
  296. package/lib/components/Editor/{skins/ui/dark → tinymce/skins/ui/tinymce-5-dark}/content.css +73 -21
  297. package/lib/components/Editor/{skins/ui/dark → tinymce/skins/ui/tinymce-5-dark}/content.inline.css +75 -22
  298. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.inline.js +2 -0
  299. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.inline.js.map +1 -0
  300. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +2 -0
  301. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css.map +1 -0
  302. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.js +2 -0
  303. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.js.map +1 -0
  304. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.min.css +2 -0
  305. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.min.css.map +1 -0
  306. package/lib/components/Editor/{skins/ui/dark → tinymce/skins/ui/tinymce-5-dark}/skin.css +1244 -421
  307. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.js +2 -0
  308. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.js.map +1 -0
  309. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.min.css +2 -0
  310. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.min.css.map +1 -0
  311. package/lib/components/Editor/{skins/ui/dark → tinymce/skins/ui/tinymce-5-dark}/skin.shadowdom.css +8 -15
  312. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js +2 -0
  313. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js.map +1 -0
  314. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +2 -0
  315. package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css.map +1 -0
  316. package/lib/components/Editor/tinymce/themes/silver/theme.js +23228 -24955
  317. package/lib/components/Editor/tinymce/themes/silver/theme.min.js +2 -7
  318. package/lib/components/Editor/tinymce/tinymce.d.ts +1722 -1447
  319. package/lib/components/Editor/tinymce/tinymce.js +23668 -22018
  320. package/lib/components/Editor/tinymce/tinymce.min.js +2 -30104
  321. package/package.json +1 -1
  322. package/lib/components/Editor/skins/content/dark/content.min.css.map +0 -1
  323. package/lib/components/Editor/skins/content/default/content.min.css.map +0 -1
  324. package/lib/components/Editor/skins/content/document/content.css +0 -72
  325. package/lib/components/Editor/skins/content/document/content.min.css.map +0 -1
  326. package/lib/components/Editor/skins/content/writer/content.css +0 -68
  327. package/lib/components/Editor/skins/content/writer/content.min.css.map +0 -1
  328. package/lib/components/Editor/skins/ui/dark/content.inline.min.css +0 -8
  329. package/lib/components/Editor/skins/ui/dark/content.inline.min.css.map +0 -1
  330. package/lib/components/Editor/skins/ui/dark/content.min.css +0 -8
  331. package/lib/components/Editor/skins/ui/dark/content.min.css.map +0 -1
  332. package/lib/components/Editor/skins/ui/dark/content.mobile.css +0 -29
  333. package/lib/components/Editor/skins/ui/dark/content.mobile.min.css +0 -8
  334. package/lib/components/Editor/skins/ui/dark/content.mobile.min.css.map +0 -1
  335. package/lib/components/Editor/skins/ui/dark/fonts/tinymce-mobile.woff +0 -0
  336. package/lib/components/Editor/skins/ui/dark/skin.min.css +0 -8
  337. package/lib/components/Editor/skins/ui/dark/skin.min.css.map +0 -1
  338. package/lib/components/Editor/skins/ui/dark/skin.mobile.css +0 -673
  339. package/lib/components/Editor/skins/ui/dark/skin.mobile.min.css +0 -8
  340. package/lib/components/Editor/skins/ui/dark/skin.mobile.min.css.map +0 -1
  341. package/lib/components/Editor/skins/ui/dark/skin.shadowdom.min.css +0 -8
  342. package/lib/components/Editor/skins/ui/dark/skin.shadowdom.min.css.map +0 -1
  343. package/lib/components/Editor/skins/ui/default/content.inline.min.css +0 -8
  344. package/lib/components/Editor/skins/ui/default/content.inline.min.css.map +0 -1
  345. package/lib/components/Editor/skins/ui/default/content.min.css +0 -8
  346. package/lib/components/Editor/skins/ui/default/content.min.css.map +0 -1
  347. package/lib/components/Editor/skins/ui/default/content.mobile.css +0 -29
  348. package/lib/components/Editor/skins/ui/default/content.mobile.min.css +0 -8
  349. package/lib/components/Editor/skins/ui/default/content.mobile.min.css.map +0 -1
  350. package/lib/components/Editor/skins/ui/default/fonts/tinymce-mobile.woff +0 -0
  351. package/lib/components/Editor/skins/ui/default/skin.min.css +0 -8
  352. package/lib/components/Editor/skins/ui/default/skin.min.css.map +0 -1
  353. package/lib/components/Editor/skins/ui/default/skin.mobile.css +0 -673
  354. package/lib/components/Editor/skins/ui/default/skin.mobile.min.css +0 -8
  355. package/lib/components/Editor/skins/ui/default/skin.mobile.min.css.map +0 -1
  356. package/lib/components/Editor/skins/ui/default/skin.shadowdom.min.css +0 -8
  357. package/lib/components/Editor/skins/ui/default/skin.shadowdom.min.css.map +0 -1
  358. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/fonts/tinymce-mobile.woff +0 -0
  359. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.css +0 -1641
  360. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.min.css +0 -8
  361. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.min.css.map +0 -1
  362. package/lib/components/Editor/tinymce/jquery.tinymce.min.js +0 -92
  363. package/lib/components/Editor/tinymce/langs/pt_BR.js +0 -419
  364. package/lib/components/Editor/tinymce/plugins/bbcode/plugin.js +0 -99
  365. package/lib/components/Editor/tinymce/plugins/bbcode/plugin.min.js +0 -9
  366. package/lib/components/Editor/tinymce/plugins/colorpicker/plugin.js +0 -22
  367. package/lib/components/Editor/tinymce/plugins/colorpicker/plugin.min.js +0 -9
  368. package/lib/components/Editor/tinymce/plugins/contextmenu/plugin.js +0 -22
  369. package/lib/components/Editor/tinymce/plugins/contextmenu/plugin.min.js +0 -9
  370. package/lib/components/Editor/tinymce/plugins/fullpage/plugin.js +0 -544
  371. package/lib/components/Editor/tinymce/plugins/fullpage/plugin.min.js +0 -9
  372. package/lib/components/Editor/tinymce/plugins/hr/plugin.js +0 -46
  373. package/lib/components/Editor/tinymce/plugins/hr/plugin.min.js +0 -9
  374. package/lib/components/Editor/tinymce/plugins/imagetools/plugin.js +0 -1354
  375. package/lib/components/Editor/tinymce/plugins/imagetools/plugin.min.js +0 -9
  376. package/lib/components/Editor/tinymce/plugins/legacyoutput/plugin.js +0 -199
  377. package/lib/components/Editor/tinymce/plugins/legacyoutput/plugin.min.js +0 -9
  378. package/lib/components/Editor/tinymce/plugins/noneditable/plugin.js +0 -117
  379. package/lib/components/Editor/tinymce/plugins/noneditable/plugin.min.js +0 -9
  380. package/lib/components/Editor/tinymce/plugins/paste/plugin.js +0 -1764
  381. package/lib/components/Editor/tinymce/plugins/paste/plugin.min.js +0 -9
  382. package/lib/components/Editor/tinymce/plugins/print/plugin.js +0 -53
  383. package/lib/components/Editor/tinymce/plugins/print/plugin.min.js +0 -9
  384. package/lib/components/Editor/tinymce/plugins/spellchecker/plugin.js +0 -731
  385. package/lib/components/Editor/tinymce/plugins/spellchecker/plugin.min.js +0 -9
  386. package/lib/components/Editor/tinymce/plugins/tabfocus/plugin.js +0 -129
  387. package/lib/components/Editor/tinymce/plugins/tabfocus/plugin.min.js +0 -9
  388. package/lib/components/Editor/tinymce/plugins/textcolor/plugin.js +0 -22
  389. package/lib/components/Editor/tinymce/plugins/textcolor/plugin.min.js +0 -9
  390. package/lib/components/Editor/tinymce/plugins/textpattern/plugin.js +0 -1394
  391. package/lib/components/Editor/tinymce/plugins/textpattern/plugin.min.js +0 -9
  392. package/lib/components/Editor/tinymce/plugins/toc/plugin.js +0 -236
  393. package/lib/components/Editor/tinymce/plugins/toc/plugin.min.js +0 -9
  394. package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.css +0 -29
  395. package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.min.css +0 -8
  396. package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.min.css.map +0 -1
  397. package/lib/components/Editor/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
  398. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.css +0 -673
  399. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.min.css +0 -8
  400. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.min.css.map +0 -1
  401. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.css +0 -29
  402. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.min.css +0 -8
  403. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.min.css.map +0 -1
  404. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
  405. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.css +0 -673
  406. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.min.css +0 -8
  407. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.min.css.map +0 -1
  408. package/lib/components/Editor/tinymce/themes/mobile/theme.js +0 -13587
  409. package/lib/components/Editor/tinymce/themes/mobile/theme.min.js +0 -9
@@ -1,227 +1,200 @@
1
1
  /**
2
- * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
- * Licensed under the LGPL or a commercial license.
4
- * For LGPL see License.txt in the project root for license information.
5
- * For commercial licenses see https://www.tiny.cloud/
6
- *
7
- * Version: 5.9.0 (TBD)
2
+ * TinyMCE version 6.8.2 (2023-12-11)
8
3
  */
4
+
9
5
  (function () {
10
6
  'use strict';
11
7
 
12
- var Cell = function (initial) {
13
- var value = initial;
14
- var get = function () {
8
+ const Cell = initial => {
9
+ let value = initial;
10
+ const get = () => {
15
11
  return value;
16
12
  };
17
- var set = function (v) {
13
+ const set = v => {
18
14
  value = v;
19
15
  };
20
16
  return {
21
- get: get,
22
- set: set
17
+ get,
18
+ set
23
19
  };
24
20
  };
25
21
 
26
- var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
22
+ var global$3 = tinymce.util.Tools.resolve('tinymce.PluginManager');
27
23
 
28
- var __assign = function () {
29
- __assign = Object.assign || function __assign(t) {
30
- for (var s, i = 1, n = arguments.length; i < n; i++) {
31
- s = arguments[i];
32
- for (var p in s)
33
- if (Object.prototype.hasOwnProperty.call(s, p))
34
- t[p] = s[p];
35
- }
36
- return t;
37
- };
38
- return __assign.apply(this, arguments);
24
+ const hasProto = (v, constructor, predicate) => {
25
+ var _a;
26
+ if (predicate(v, constructor.prototype)) {
27
+ return true;
28
+ } else {
29
+ return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;
30
+ }
39
31
  };
40
-
41
- var typeOf = function (x) {
42
- var t = typeof x;
32
+ const typeOf = x => {
33
+ const t = typeof x;
43
34
  if (x === null) {
44
35
  return 'null';
45
- } else if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
36
+ } else if (t === 'object' && Array.isArray(x)) {
46
37
  return 'array';
47
- } else if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
38
+ } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {
48
39
  return 'string';
49
40
  } else {
50
41
  return t;
51
42
  }
52
43
  };
53
- var isType = function (type) {
54
- return function (value) {
55
- return typeOf(value) === type;
56
- };
57
- };
58
- var isSimpleType = function (type) {
59
- return function (value) {
60
- return typeof value === type;
61
- };
62
- };
63
- var isString = isType('string');
64
- var isArray = isType('array');
65
- var isBoolean = isSimpleType('boolean');
66
- var isNumber = isSimpleType('number');
44
+ const isType$1 = type => value => typeOf(value) === type;
45
+ const isSimpleType = type => value => typeof value === type;
46
+ const isString = isType$1('string');
47
+ const isArray = isType$1('array');
48
+ const isBoolean = isSimpleType('boolean');
49
+ const isNullable = a => a === null || a === undefined;
50
+ const isNonNullable = a => !isNullable(a);
51
+ const isNumber = isSimpleType('number');
67
52
 
68
- var noop = function () {
53
+ const noop = () => {
69
54
  };
70
- var constant = function (value) {
71
- return function () {
55
+ const constant = value => {
56
+ return () => {
72
57
  return value;
73
58
  };
74
59
  };
75
- var never = constant(false);
76
- var always = constant(true);
60
+ const always = constant(true);
77
61
 
78
- var punctuationStr = '[!-#%-*,-\\/:;?@\\[-\\]_{}\xA1\xAB\xB7\xBB\xBF;\xB7\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1361-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u3008\u3009\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30\u2E31\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uff3f\uFF5B\uFF5D\uFF5F-\uFF65]';
62
+ const punctuationStr = `[~\u2116|!-*+-\\/:;?@\\[-\`{}\u00A1\u00AB\u00B7\u00BB\u00BF;\u00B7\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1361-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u3008\u3009\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30\u2E31\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]`;
79
63
 
80
- var punctuation = constant(punctuationStr);
64
+ const punctuation$1 = constant(punctuationStr);
81
65
 
82
- var none = function () {
83
- return NONE;
84
- };
85
- var NONE = function () {
86
- var eq = function (o) {
87
- return o.isNone();
88
- };
89
- var call = function (thunk) {
90
- return thunk();
91
- };
92
- var id = function (n) {
93
- return n;
94
- };
95
- var me = {
96
- fold: function (n, _s) {
97
- return n();
98
- },
99
- is: never,
100
- isSome: never,
101
- isNone: always,
102
- getOr: id,
103
- getOrThunk: call,
104
- getOrDie: function (msg) {
105
- throw new Error(msg || 'error: getOrDie called on none.');
106
- },
107
- getOrNull: constant(null),
108
- getOrUndefined: constant(undefined),
109
- or: id,
110
- orThunk: call,
111
- map: none,
112
- each: noop,
113
- bind: none,
114
- exists: never,
115
- forall: always,
116
- filter: none,
117
- equals: eq,
118
- equals_: eq,
119
- toArray: function () {
120
- return [];
121
- },
122
- toString: constant('none()')
123
- };
124
- return me;
125
- }();
126
- var some = function (a) {
127
- var constant_a = constant(a);
128
- var self = function () {
129
- return me;
130
- };
131
- var bind = function (f) {
132
- return f(a);
133
- };
134
- var me = {
135
- fold: function (n, s) {
136
- return s(a);
137
- },
138
- is: function (v) {
139
- return a === v;
140
- },
141
- isSome: always,
142
- isNone: never,
143
- getOr: constant_a,
144
- getOrThunk: constant_a,
145
- getOrDie: constant_a,
146
- getOrNull: constant_a,
147
- getOrUndefined: constant_a,
148
- or: self,
149
- orThunk: self,
150
- map: function (f) {
151
- return some(f(a));
152
- },
153
- each: function (f) {
154
- f(a);
155
- },
156
- bind: bind,
157
- exists: bind,
158
- forall: bind,
159
- filter: function (f) {
160
- return f(a) ? me : NONE;
161
- },
162
- toArray: function () {
163
- return [a];
164
- },
165
- toString: function () {
166
- return 'some(' + a + ')';
167
- },
168
- equals: function (o) {
169
- return o.is(a);
170
- },
171
- equals_: function (o, elementEq) {
172
- return o.fold(never, function (b) {
173
- return elementEq(a, b);
174
- });
66
+ class Optional {
67
+ constructor(tag, value) {
68
+ this.tag = tag;
69
+ this.value = value;
70
+ }
71
+ static some(value) {
72
+ return new Optional(true, value);
73
+ }
74
+ static none() {
75
+ return Optional.singletonNone;
76
+ }
77
+ fold(onNone, onSome) {
78
+ if (this.tag) {
79
+ return onSome(this.value);
80
+ } else {
81
+ return onNone();
175
82
  }
176
- };
177
- return me;
178
- };
179
- var from = function (value) {
180
- return value === null || value === undefined ? NONE : some(value);
181
- };
182
- var Optional = {
183
- some: some,
184
- none: none,
185
- from: from
186
- };
83
+ }
84
+ isSome() {
85
+ return this.tag;
86
+ }
87
+ isNone() {
88
+ return !this.tag;
89
+ }
90
+ map(mapper) {
91
+ if (this.tag) {
92
+ return Optional.some(mapper(this.value));
93
+ } else {
94
+ return Optional.none();
95
+ }
96
+ }
97
+ bind(binder) {
98
+ if (this.tag) {
99
+ return binder(this.value);
100
+ } else {
101
+ return Optional.none();
102
+ }
103
+ }
104
+ exists(predicate) {
105
+ return this.tag && predicate(this.value);
106
+ }
107
+ forall(predicate) {
108
+ return !this.tag || predicate(this.value);
109
+ }
110
+ filter(predicate) {
111
+ if (!this.tag || predicate(this.value)) {
112
+ return this;
113
+ } else {
114
+ return Optional.none();
115
+ }
116
+ }
117
+ getOr(replacement) {
118
+ return this.tag ? this.value : replacement;
119
+ }
120
+ or(replacement) {
121
+ return this.tag ? this : replacement;
122
+ }
123
+ getOrThunk(thunk) {
124
+ return this.tag ? this.value : thunk();
125
+ }
126
+ orThunk(thunk) {
127
+ return this.tag ? this : thunk();
128
+ }
129
+ getOrDie(message) {
130
+ if (!this.tag) {
131
+ throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');
132
+ } else {
133
+ return this.value;
134
+ }
135
+ }
136
+ static from(value) {
137
+ return isNonNullable(value) ? Optional.some(value) : Optional.none();
138
+ }
139
+ getOrNull() {
140
+ return this.tag ? this.value : null;
141
+ }
142
+ getOrUndefined() {
143
+ return this.value;
144
+ }
145
+ each(worker) {
146
+ if (this.tag) {
147
+ worker(this.value);
148
+ }
149
+ }
150
+ toArray() {
151
+ return this.tag ? [this.value] : [];
152
+ }
153
+ toString() {
154
+ return this.tag ? `some(${ this.value })` : 'none()';
155
+ }
156
+ }
157
+ Optional.singletonNone = new Optional(false);
187
158
 
188
- var punctuation$1 = punctuation;
159
+ const punctuation = punctuation$1;
160
+
161
+ var global$2 = tinymce.util.Tools.resolve('tinymce.Env');
189
162
 
190
163
  var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
191
164
 
192
- var nativeSlice = Array.prototype.slice;
193
- var nativePush = Array.prototype.push;
194
- var map = function (xs, f) {
195
- var len = xs.length;
196
- var r = new Array(len);
197
- for (var i = 0; i < len; i++) {
198
- var x = xs[i];
165
+ const nativeSlice = Array.prototype.slice;
166
+ const nativePush = Array.prototype.push;
167
+ const map = (xs, f) => {
168
+ const len = xs.length;
169
+ const r = new Array(len);
170
+ for (let i = 0; i < len; i++) {
171
+ const x = xs[i];
199
172
  r[i] = f(x, i);
200
173
  }
201
174
  return r;
202
175
  };
203
- var each = function (xs, f) {
204
- for (var i = 0, len = xs.length; i < len; i++) {
205
- var x = xs[i];
176
+ const each = (xs, f) => {
177
+ for (let i = 0, len = xs.length; i < len; i++) {
178
+ const x = xs[i];
206
179
  f(x, i);
207
180
  }
208
181
  };
209
- var eachr = function (xs, f) {
210
- for (var i = xs.length - 1; i >= 0; i--) {
211
- var x = xs[i];
182
+ const eachr = (xs, f) => {
183
+ for (let i = xs.length - 1; i >= 0; i--) {
184
+ const x = xs[i];
212
185
  f(x, i);
213
186
  }
214
187
  };
215
- var groupBy = function (xs, f) {
188
+ const groupBy = (xs, f) => {
216
189
  if (xs.length === 0) {
217
190
  return [];
218
191
  } else {
219
- var wasType = f(xs[0]);
220
- var r = [];
221
- var group = [];
222
- for (var i = 0, len = xs.length; i < len; i++) {
223
- var x = xs[i];
224
- var type = f(x);
192
+ let wasType = f(xs[0]);
193
+ const r = [];
194
+ let group = [];
195
+ for (let i = 0, len = xs.length; i < len; i++) {
196
+ const x = xs[i];
197
+ const type = f(x);
225
198
  if (type !== wasType) {
226
199
  r.push(group);
227
200
  group = [];
@@ -235,15 +208,15 @@
235
208
  return r;
236
209
  }
237
210
  };
238
- var foldl = function (xs, f, acc) {
239
- each(xs, function (x) {
240
- acc = f(acc, x);
211
+ const foldl = (xs, f, acc) => {
212
+ each(xs, (x, i) => {
213
+ acc = f(acc, x, i);
241
214
  });
242
215
  return acc;
243
216
  };
244
- var flatten = function (xs) {
245
- var r = [];
246
- for (var i = 0, len = xs.length; i < len; ++i) {
217
+ const flatten = xs => {
218
+ const r = [];
219
+ for (let i = 0, len = xs.length; i < len; ++i) {
247
220
  if (!isArray(xs[i])) {
248
221
  throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
249
222
  }
@@ -251,38 +224,28 @@
251
224
  }
252
225
  return r;
253
226
  };
254
- var bind = function (xs, f) {
255
- return flatten(map(xs, f));
256
- };
257
- var sort = function (xs, comparator) {
258
- var copy = nativeSlice.call(xs, 0);
227
+ const bind = (xs, f) => flatten(map(xs, f));
228
+ const sort = (xs, comparator) => {
229
+ const copy = nativeSlice.call(xs, 0);
259
230
  copy.sort(comparator);
260
231
  return copy;
261
232
  };
262
233
 
263
- var hasOwnProperty = Object.hasOwnProperty;
264
- var has = function (obj, key) {
265
- return hasOwnProperty.call(obj, key);
266
- };
234
+ const hasOwnProperty = Object.hasOwnProperty;
235
+ const has = (obj, key) => hasOwnProperty.call(obj, key);
267
236
 
268
- var Global = typeof window !== 'undefined' ? window : Function('return this;')();
237
+ typeof window !== 'undefined' ? window : Function('return this;')();
269
238
 
270
- var DOCUMENT = 9;
271
- var DOCUMENT_FRAGMENT = 11;
272
- var ELEMENT = 1;
273
- var TEXT = 3;
239
+ const DOCUMENT = 9;
240
+ const DOCUMENT_FRAGMENT = 11;
241
+ const ELEMENT = 1;
242
+ const TEXT = 3;
274
243
 
275
- var type = function (element) {
276
- return element.dom.nodeType;
277
- };
278
- var isType$1 = function (t) {
279
- return function (element) {
280
- return type(element) === t;
281
- };
282
- };
283
- var isText = isType$1(TEXT);
244
+ const type = element => element.dom.nodeType;
245
+ const isType = t => element => type(element) === t;
246
+ const isText$1 = isType(TEXT);
284
247
 
285
- var rawSet = function (dom, key, value) {
248
+ const rawSet = (dom, key, value) => {
286
249
  if (isString(value) || isBoolean(value) || isNumber(value)) {
287
250
  dom.setAttribute(key, value + '');
288
251
  } else {
@@ -290,164 +253,130 @@
290
253
  throw new Error('Attribute value was not simple');
291
254
  }
292
255
  };
293
- var set = function (element, key, value) {
256
+ const set = (element, key, value) => {
294
257
  rawSet(element.dom, key, value);
295
258
  };
296
259
 
297
- var compareDocumentPosition = function (a, b, match) {
298
- return (a.compareDocumentPosition(b) & match) !== 0;
299
- };
300
- var documentPositionPreceding = function (a, b) {
301
- return compareDocumentPosition(a, b, Node.DOCUMENT_POSITION_PRECEDING);
302
- };
303
-
304
- var fromHtml = function (html, scope) {
305
- var doc = scope || document;
306
- var div = doc.createElement('div');
260
+ const fromHtml = (html, scope) => {
261
+ const doc = scope || document;
262
+ const div = doc.createElement('div');
307
263
  div.innerHTML = html;
308
264
  if (!div.hasChildNodes() || div.childNodes.length > 1) {
309
- console.error('HTML does not have a single root node', html);
310
- throw new Error('HTML must have a single root node');
265
+ const message = 'HTML does not have a single root node';
266
+ console.error(message, html);
267
+ throw new Error(message);
311
268
  }
312
269
  return fromDom(div.childNodes[0]);
313
270
  };
314
- var fromTag = function (tag, scope) {
315
- var doc = scope || document;
316
- var node = doc.createElement(tag);
271
+ const fromTag = (tag, scope) => {
272
+ const doc = scope || document;
273
+ const node = doc.createElement(tag);
317
274
  return fromDom(node);
318
275
  };
319
- var fromText = function (text, scope) {
320
- var doc = scope || document;
321
- var node = doc.createTextNode(text);
276
+ const fromText = (text, scope) => {
277
+ const doc = scope || document;
278
+ const node = doc.createTextNode(text);
322
279
  return fromDom(node);
323
280
  };
324
- var fromDom = function (node) {
281
+ const fromDom = node => {
325
282
  if (node === null || node === undefined) {
326
283
  throw new Error('Node cannot be null or undefined');
327
284
  }
328
285
  return { dom: node };
329
286
  };
330
- var fromPoint = function (docElm, x, y) {
331
- return Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom);
332
- };
333
- var SugarElement = {
334
- fromHtml: fromHtml,
335
- fromTag: fromTag,
336
- fromText: fromText,
337
- fromDom: fromDom,
338
- fromPoint: fromPoint
287
+ const fromPoint = (docElm, x, y) => Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom);
288
+ const SugarElement = {
289
+ fromHtml,
290
+ fromTag,
291
+ fromText,
292
+ fromDom,
293
+ fromPoint
339
294
  };
340
295
 
341
- var bypassSelector = function (dom) {
342
- return dom.nodeType !== ELEMENT && dom.nodeType !== DOCUMENT && dom.nodeType !== DOCUMENT_FRAGMENT || dom.childElementCount === 0;
343
- };
344
- var all = function (selector, scope) {
345
- var base = scope === undefined ? document : scope.dom;
296
+ const bypassSelector = dom => dom.nodeType !== ELEMENT && dom.nodeType !== DOCUMENT && dom.nodeType !== DOCUMENT_FRAGMENT || dom.childElementCount === 0;
297
+ const all = (selector, scope) => {
298
+ const base = scope === undefined ? document : scope.dom;
346
299
  return bypassSelector(base) ? [] : map(base.querySelectorAll(selector), SugarElement.fromDom);
347
300
  };
348
301
 
349
- var parent = function (element) {
350
- return Optional.from(element.dom.parentNode).map(SugarElement.fromDom);
351
- };
352
- var children = function (element) {
353
- return map(element.dom.childNodes, SugarElement.fromDom);
354
- };
355
- var spot = function (element, offset) {
356
- return {
357
- element: element,
358
- offset: offset
359
- };
360
- };
361
- var leaf = function (element, offset) {
362
- var cs = children(element);
302
+ const parent = element => Optional.from(element.dom.parentNode).map(SugarElement.fromDom);
303
+ const children = element => map(element.dom.childNodes, SugarElement.fromDom);
304
+ const spot = (element, offset) => ({
305
+ element,
306
+ offset
307
+ });
308
+ const leaf = (element, offset) => {
309
+ const cs = children(element);
363
310
  return cs.length > 0 && offset < cs.length ? spot(cs[offset], 0) : spot(element, offset);
364
311
  };
365
312
 
366
- var before = function (marker, element) {
367
- var parent$1 = parent(marker);
368
- parent$1.each(function (v) {
313
+ const before = (marker, element) => {
314
+ const parent$1 = parent(marker);
315
+ parent$1.each(v => {
369
316
  v.dom.insertBefore(element.dom, marker.dom);
370
317
  });
371
318
  };
372
- var append = function (parent, element) {
319
+ const append = (parent, element) => {
373
320
  parent.dom.appendChild(element.dom);
374
321
  };
375
- var wrap = function (element, wrapper) {
322
+ const wrap = (element, wrapper) => {
376
323
  before(element, wrapper);
377
324
  append(wrapper, element);
378
325
  };
379
326
 
380
- var NodeValue = function (is, name) {
381
- var get = function (element) {
327
+ const NodeValue = (is, name) => {
328
+ const get = element => {
382
329
  if (!is(element)) {
383
330
  throw new Error('Can only get ' + name + ' value of a ' + name + ' node');
384
331
  }
385
332
  return getOption(element).getOr('');
386
333
  };
387
- var getOption = function (element) {
388
- return is(element) ? Optional.from(element.dom.nodeValue) : Optional.none();
389
- };
390
- var set = function (element, value) {
334
+ const getOption = element => is(element) ? Optional.from(element.dom.nodeValue) : Optional.none();
335
+ const set = (element, value) => {
391
336
  if (!is(element)) {
392
337
  throw new Error('Can only set raw ' + name + ' value of a ' + name + ' node');
393
338
  }
394
339
  element.dom.nodeValue = value;
395
340
  };
396
341
  return {
397
- get: get,
398
- getOption: getOption,
399
- set: set
342
+ get,
343
+ getOption,
344
+ set
400
345
  };
401
346
  };
402
347
 
403
- var api = NodeValue(isText, 'text');
404
- var get = function (element) {
405
- return api.get(element);
406
- };
348
+ const api = NodeValue(isText$1, 'text');
349
+ const get$1 = element => api.get(element);
407
350
 
408
- var descendants = function (scope, selector) {
409
- return all(selector, scope);
351
+ const compareDocumentPosition = (a, b, match) => {
352
+ return (a.compareDocumentPosition(b) & match) !== 0;
353
+ };
354
+ const documentPositionPreceding = (a, b) => {
355
+ return compareDocumentPosition(a, b, Node.DOCUMENT_POSITION_PRECEDING);
410
356
  };
411
357
 
412
- var global$2 = tinymce.util.Tools.resolve('tinymce.dom.TreeWalker');
358
+ const descendants = (scope, selector) => all(selector, scope);
413
359
 
414
- var isSimpleBoundary = function (dom, node) {
415
- return dom.isBlock(node) || has(dom.schema.getShortEndedElements(), node.nodeName);
416
- };
417
- var isContentEditableFalse = function (dom, node) {
418
- return dom.getContentEditable(node) === 'false';
419
- };
420
- var isContentEditableTrueInCef = function (dom, node) {
421
- return dom.getContentEditable(node) === 'true' && dom.getContentEditableParent(node.parentNode) === 'false';
422
- };
423
- var isHidden = function (dom, node) {
424
- return !dom.isBlock(node) && has(dom.schema.getWhiteSpaceElements(), node.nodeName);
425
- };
426
- var isBoundary = function (dom, node) {
427
- return isSimpleBoundary(dom, node) || isContentEditableFalse(dom, node) || isHidden(dom, node) || isContentEditableTrueInCef(dom, node);
428
- };
429
- var isText$1 = function (node) {
430
- return node.nodeType === 3;
431
- };
432
- var nuSection = function () {
433
- return {
434
- sOffset: 0,
435
- fOffset: 0,
436
- elements: []
437
- };
438
- };
439
- var toLeaf = function (node, offset) {
440
- return leaf(SugarElement.fromDom(node), offset);
441
- };
442
- var walk = function (dom, walkerFn, startNode, callbacks, endNode, skipStart) {
443
- if (skipStart === void 0) {
444
- skipStart = true;
445
- }
446
- var next = skipStart ? walkerFn(false) : startNode;
360
+ var global = tinymce.util.Tools.resolve('tinymce.dom.TreeWalker');
361
+
362
+ const isSimpleBoundary = (dom, node) => dom.isBlock(node) || has(dom.schema.getVoidElements(), node.nodeName);
363
+ const isContentEditableFalse = (dom, node) => !dom.isEditable(node);
364
+ const isContentEditableTrueInCef = (dom, node) => dom.getContentEditable(node) === 'true' && node.parentNode && !dom.isEditable(node.parentNode);
365
+ const isHidden = (dom, node) => !dom.isBlock(node) && has(dom.schema.getWhitespaceElements(), node.nodeName);
366
+ const isBoundary = (dom, node) => isSimpleBoundary(dom, node) || isContentEditableFalse(dom, node) || isHidden(dom, node) || isContentEditableTrueInCef(dom, node);
367
+ const isText = node => node.nodeType === 3;
368
+ const nuSection = () => ({
369
+ sOffset: 0,
370
+ fOffset: 0,
371
+ elements: []
372
+ });
373
+ const toLeaf = (node, offset) => leaf(SugarElement.fromDom(node), offset);
374
+ const walk = (dom, walkerFn, startNode, callbacks, endNode, skipStart = true) => {
375
+ let next = skipStart ? walkerFn(false) : startNode;
447
376
  while (next) {
448
- var isCefNode = isContentEditableFalse(dom, next);
377
+ const isCefNode = isContentEditableFalse(dom, next);
449
378
  if (isCefNode || isHidden(dom, next)) {
450
- var stopWalking = isCefNode ? callbacks.cef(next) : callbacks.boundary(next);
379
+ const stopWalking = isCefNode ? callbacks.cef(next) : callbacks.boundary(next);
451
380
  if (stopWalking) {
452
381
  break;
453
382
  } else {
@@ -458,7 +387,7 @@
458
387
  if (callbacks.boundary(next)) {
459
388
  break;
460
389
  }
461
- } else if (isText$1(next)) {
390
+ } else if (isText(next)) {
462
391
  callbacks.text(next);
463
392
  }
464
393
  if (next === endNode) {
@@ -468,17 +397,18 @@
468
397
  }
469
398
  }
470
399
  };
471
- var collectTextToBoundary = function (dom, section, node, rootNode, forwards) {
400
+ const collectTextToBoundary = (dom, section, node, rootNode, forwards) => {
401
+ var _a;
472
402
  if (isBoundary(dom, node)) {
473
403
  return;
474
404
  }
475
- var rootBlock = dom.getParent(rootNode, dom.isBlock);
476
- var walker = new global$2(node, rootBlock);
477
- var walkerFn = forwards ? walker.next.bind(walker) : walker.prev.bind(walker);
405
+ const rootBlock = (_a = dom.getParent(rootNode, dom.isBlock)) !== null && _a !== void 0 ? _a : dom.getRoot();
406
+ const walker = new global(node, rootBlock);
407
+ const walkerFn = forwards ? walker.next.bind(walker) : walker.prev.bind(walker);
478
408
  walk(dom, walkerFn, node, {
479
409
  boundary: always,
480
410
  cef: always,
481
- text: function (next) {
411
+ text: next => {
482
412
  if (forwards) {
483
413
  section.fOffset += next.length;
484
414
  } else {
@@ -488,15 +418,12 @@
488
418
  }
489
419
  });
490
420
  };
491
- var collect = function (dom, rootNode, startNode, endNode, callbacks, skipStart) {
492
- if (skipStart === void 0) {
493
- skipStart = true;
494
- }
495
- var walker = new global$2(startNode, rootNode);
496
- var sections = [];
497
- var current = nuSection();
421
+ const collect = (dom, rootNode, startNode, endNode, callbacks, skipStart = true) => {
422
+ const walker = new global(startNode, rootNode);
423
+ const sections = [];
424
+ let current = nuSection();
498
425
  collectTextToBoundary(dom, current, startNode, rootNode, false);
499
- var finishSection = function () {
426
+ const finishSection = () => {
500
427
  if (current.elements.length > 0) {
501
428
  sections.push(current);
502
429
  current = nuSection();
@@ -505,14 +432,14 @@
505
432
  };
506
433
  walk(dom, walker.next.bind(walker), startNode, {
507
434
  boundary: finishSection,
508
- cef: function (node) {
435
+ cef: node => {
509
436
  finishSection();
510
437
  if (callbacks) {
511
- sections.push.apply(sections, callbacks.cef(node));
438
+ sections.push(...callbacks.cef(node));
512
439
  }
513
440
  return false;
514
441
  },
515
- text: function (next) {
442
+ text: next => {
516
443
  current.elements.push(SugarElement.fromDom(next));
517
444
  if (callbacks) {
518
445
  callbacks.text(next, current);
@@ -525,59 +452,45 @@
525
452
  finishSection();
526
453
  return sections;
527
454
  };
528
- var collectRangeSections = function (dom, rng) {
529
- var start = toLeaf(rng.startContainer, rng.startOffset);
530
- var startNode = start.element.dom;
531
- var end = toLeaf(rng.endContainer, rng.endOffset);
532
- var endNode = end.element.dom;
455
+ const collectRangeSections = (dom, rng) => {
456
+ const start = toLeaf(rng.startContainer, rng.startOffset);
457
+ const startNode = start.element.dom;
458
+ const end = toLeaf(rng.endContainer, rng.endOffset);
459
+ const endNode = end.element.dom;
533
460
  return collect(dom, rng.commonAncestorContainer, startNode, endNode, {
534
- text: function (node, section) {
461
+ text: (node, section) => {
535
462
  if (node === endNode) {
536
463
  section.fOffset += node.length - end.offset;
537
464
  } else if (node === startNode) {
538
465
  section.sOffset += start.offset;
539
466
  }
540
467
  },
541
- cef: function (node) {
542
- var sections = bind(descendants(SugarElement.fromDom(node), '*[contenteditable=true]'), function (e) {
543
- var ceTrueNode = e.dom;
468
+ cef: node => {
469
+ const sections = bind(descendants(SugarElement.fromDom(node), '*[contenteditable=true]'), e => {
470
+ const ceTrueNode = e.dom;
544
471
  return collect(dom, ceTrueNode, ceTrueNode);
545
472
  });
546
- return sort(sections, function (a, b) {
547
- return documentPositionPreceding(a.elements[0].dom, b.elements[0].dom) ? 1 : -1;
548
- });
473
+ return sort(sections, (a, b) => documentPositionPreceding(a.elements[0].dom, b.elements[0].dom) ? 1 : -1);
549
474
  }
550
475
  }, false);
551
476
  };
552
- var fromRng = function (dom, rng) {
553
- return rng.collapsed ? [] : collectRangeSections(dom, rng);
554
- };
555
- var fromNode = function (dom, node) {
556
- var rng = dom.createRng();
477
+ const fromRng = (dom, rng) => rng.collapsed ? [] : collectRangeSections(dom, rng);
478
+ const fromNode = (dom, node) => {
479
+ const rng = dom.createRng();
557
480
  rng.selectNode(node);
558
481
  return fromRng(dom, rng);
559
482
  };
560
- var fromNodes = function (dom, nodes) {
561
- return bind(nodes, function (node) {
562
- return fromNode(dom, node);
563
- });
564
- };
483
+ const fromNodes = (dom, nodes) => bind(nodes, node => fromNode(dom, node));
565
484
 
566
- var find = function (text, pattern, start, finish) {
567
- if (start === void 0) {
568
- start = 0;
569
- }
570
- if (finish === void 0) {
571
- finish = text.length;
572
- }
573
- var regex = pattern.regex;
485
+ const find$2 = (text, pattern, start = 0, finish = text.length) => {
486
+ const regex = pattern.regex;
574
487
  regex.lastIndex = start;
575
- var results = [];
576
- var match;
488
+ const results = [];
489
+ let match;
577
490
  while (match = regex.exec(text)) {
578
- var matchedText = match[pattern.matchIndex];
579
- var matchStart = match.index + match[0].indexOf(matchedText);
580
- var matchFinish = matchStart + matchedText.length;
491
+ const matchedText = match[pattern.matchIndex];
492
+ const matchStart = match.index + match[0].indexOf(matchedText);
493
+ const matchFinish = matchStart + matchedText.length;
581
494
  if (matchFinish > finish) {
582
495
  break;
583
496
  }
@@ -589,15 +502,15 @@
589
502
  }
590
503
  return results;
591
504
  };
592
- var extract = function (elements, matches) {
593
- var nodePositions = foldl(elements, function (acc, element) {
594
- var content = get(element);
595
- var start = acc.last;
596
- var finish = start + content.length;
597
- var positions = bind(matches, function (match, matchIdx) {
505
+ const extract = (elements, matches) => {
506
+ const nodePositions = foldl(elements, (acc, element) => {
507
+ const content = get$1(element);
508
+ const start = acc.last;
509
+ const finish = start + content.length;
510
+ const positions = bind(matches, (match, matchIdx) => {
598
511
  if (match.start < finish && match.finish > start) {
599
512
  return [{
600
- element: element,
513
+ element,
601
514
  start: Math.max(start, match.start) - start,
602
515
  finish: Math.min(finish, match.finish) - start,
603
516
  matchId: matchIdx
@@ -614,64 +527,56 @@
614
527
  results: [],
615
528
  last: 0
616
529
  }).results;
617
- return groupBy(nodePositions, function (position) {
618
- return position.matchId;
619
- });
530
+ return groupBy(nodePositions, position => position.matchId);
620
531
  };
621
532
 
622
- var find$1 = function (pattern, sections) {
623
- return bind(sections, function (section) {
624
- var elements = section.elements;
625
- var content = map(elements, get).join('');
626
- var positions = find(content, pattern, section.sOffset, content.length - section.fOffset);
627
- return extract(elements, positions);
628
- });
629
- };
630
- var mark = function (matches, replacementNode) {
631
- eachr(matches, function (match, idx) {
632
- eachr(match, function (pos) {
633
- var wrapper = SugarElement.fromDom(replacementNode.cloneNode(false));
533
+ const find$1 = (pattern, sections) => bind(sections, section => {
534
+ const elements = section.elements;
535
+ const content = map(elements, get$1).join('');
536
+ const positions = find$2(content, pattern, section.sOffset, content.length - section.fOffset);
537
+ return extract(elements, positions);
538
+ });
539
+ const mark = (matches, replacementNode) => {
540
+ eachr(matches, (match, idx) => {
541
+ eachr(match, pos => {
542
+ const wrapper = SugarElement.fromDom(replacementNode.cloneNode(false));
634
543
  set(wrapper, 'data-mce-index', idx);
635
- var textNode = pos.element.dom;
544
+ const textNode = pos.element.dom;
636
545
  if (textNode.length === pos.finish && pos.start === 0) {
637
546
  wrap(pos.element, wrapper);
638
547
  } else {
639
548
  if (textNode.length !== pos.finish) {
640
549
  textNode.splitText(pos.finish);
641
550
  }
642
- var matchNode = textNode.splitText(pos.start);
551
+ const matchNode = textNode.splitText(pos.start);
643
552
  wrap(SugarElement.fromDom(matchNode), wrapper);
644
553
  }
645
554
  });
646
555
  });
647
556
  };
648
- var findAndMark = function (dom, pattern, node, replacementNode) {
649
- var textSections = fromNode(dom, node);
650
- var matches = find$1(pattern, textSections);
557
+ const findAndMark = (dom, pattern, node, replacementNode) => {
558
+ const textSections = fromNode(dom, node);
559
+ const matches = find$1(pattern, textSections);
651
560
  mark(matches, replacementNode);
652
561
  return matches.length;
653
562
  };
654
- var findAndMarkInSelection = function (dom, pattern, selection, replacementNode) {
655
- var bookmark = selection.getBookmark();
656
- var nodes = dom.select('td[data-mce-selected],th[data-mce-selected]');
657
- var textSections = nodes.length > 0 ? fromNodes(dom, nodes) : fromRng(dom, selection.getRng());
658
- var matches = find$1(pattern, textSections);
563
+ const findAndMarkInSelection = (dom, pattern, selection, replacementNode) => {
564
+ const bookmark = selection.getBookmark();
565
+ const nodes = dom.select('td[data-mce-selected],th[data-mce-selected]');
566
+ const textSections = nodes.length > 0 ? fromNodes(dom, nodes) : fromRng(dom, selection.getRng());
567
+ const matches = find$1(pattern, textSections);
659
568
  mark(matches, replacementNode);
660
569
  selection.moveToBookmark(bookmark);
661
570
  return matches.length;
662
571
  };
663
572
 
664
- var getElmIndex = function (elm) {
665
- var value = elm.getAttribute('data-mce-index');
666
- if (typeof value === 'number') {
667
- return '' + value;
668
- }
669
- return value;
573
+ const getElmIndex = elm => {
574
+ return elm.getAttribute('data-mce-index');
670
575
  };
671
- var markAllMatches = function (editor, currentSearchState, pattern, inSelection) {
672
- var marker = editor.dom.create('span', { 'data-mce-bogus': 1 });
576
+ const markAllMatches = (editor, currentSearchState, pattern, inSelection) => {
577
+ const marker = editor.dom.create('span', { 'data-mce-bogus': 1 });
673
578
  marker.className = 'mce-match-marker';
674
- var node = editor.getBody();
579
+ const node = editor.getBody();
675
580
  done(editor, currentSearchState, false);
676
581
  if (inSelection) {
677
582
  return findAndMarkInSelection(editor.dom, pattern, editor.selection, marker);
@@ -679,19 +584,20 @@
679
584
  return findAndMark(editor.dom, pattern, node, marker);
680
585
  }
681
586
  };
682
- var unwrap = function (node) {
683
- var parentNode = node.parentNode;
587
+ const unwrap = node => {
588
+ var _a;
589
+ const parentNode = node.parentNode;
684
590
  if (node.firstChild) {
685
591
  parentNode.insertBefore(node.firstChild, node);
686
592
  }
687
- node.parentNode.removeChild(node);
593
+ (_a = node.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(node);
688
594
  };
689
- var findSpansByIndex = function (editor, index) {
690
- var spans = [];
691
- var nodes = global$1.toArray(editor.getBody().getElementsByTagName('span'));
595
+ const findSpansByIndex = (editor, index) => {
596
+ const spans = [];
597
+ const nodes = global$1.toArray(editor.getBody().getElementsByTagName('span'));
692
598
  if (nodes.length) {
693
- for (var i = 0; i < nodes.length; i++) {
694
- var nodeIndex = getElmIndex(nodes[i]);
599
+ for (let i = 0; i < nodes.length; i++) {
600
+ const nodeIndex = getElmIndex(nodes[i]);
695
601
  if (nodeIndex === null || !nodeIndex.length) {
696
602
  continue;
697
603
  }
@@ -702,11 +608,10 @@
702
608
  }
703
609
  return spans;
704
610
  };
705
- var moveSelection = function (editor, currentSearchState, forward) {
706
- var searchState = currentSearchState.get();
707
- var testIndex = searchState.index;
708
- var dom = editor.dom;
709
- forward = forward !== false;
611
+ const moveSelection = (editor, currentSearchState, forward) => {
612
+ const searchState = currentSearchState.get();
613
+ let testIndex = searchState.index;
614
+ const dom = editor.dom;
710
615
  if (forward) {
711
616
  if (testIndex + 1 === searchState.count) {
712
617
  testIndex = 0;
@@ -721,7 +626,7 @@
721
626
  }
722
627
  }
723
628
  dom.removeClass(findSpansByIndex(editor, searchState.index), 'mce-match-marker-selected');
724
- var spans = findSpansByIndex(editor, testIndex);
629
+ const spans = findSpansByIndex(editor, testIndex);
725
630
  if (spans.length) {
726
631
  dom.addClass(findSpansByIndex(editor, testIndex), 'mce-match-marker-selected');
727
632
  editor.selection.scrollIntoView(spans[0]);
@@ -729,63 +634,74 @@
729
634
  }
730
635
  return -1;
731
636
  };
732
- var removeNode = function (dom, node) {
733
- var parent = node.parentNode;
637
+ const removeNode = (dom, node) => {
638
+ const parent = node.parentNode;
734
639
  dom.remove(node);
735
- if (dom.isEmpty(parent)) {
640
+ if (parent && dom.isEmpty(parent)) {
736
641
  dom.remove(parent);
737
642
  }
738
643
  };
739
- var escapeSearchText = function (text, wholeWord) {
740
- var escapedText = text.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&').replace(/\s/g, '[^\\S\\r\\n\\uFEFF]');
741
- var wordRegex = '(' + escapedText + ')';
742
- return wholeWord ? '(?:^|\\s|' + punctuation$1() + ')' + wordRegex + ('(?=$|\\s|' + punctuation$1() + ')') : wordRegex;
644
+ const escapeSearchText = (text, wholeWord) => {
645
+ const escapedText = text.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&').replace(/\s/g, '[^\\S\\r\\n\\uFEFF]');
646
+ const wordRegex = '(' + escapedText + ')';
647
+ return wholeWord ? `(?:^|\\s|${ punctuation() })` + wordRegex + `(?=$|\\s|${ punctuation() })` : wordRegex;
743
648
  };
744
- var find$2 = function (editor, currentSearchState, text, matchCase, wholeWord, inSelection) {
745
- var escapedText = escapeSearchText(text, wholeWord);
746
- var pattern = {
649
+ const find = (editor, currentSearchState, text, matchCase, wholeWord, inSelection) => {
650
+ const selection = editor.selection;
651
+ const escapedText = escapeSearchText(text, wholeWord);
652
+ const isForwardSelection = selection.isForward();
653
+ const pattern = {
747
654
  regex: new RegExp(escapedText, matchCase ? 'g' : 'gi'),
748
655
  matchIndex: 1
749
656
  };
750
- var count = markAllMatches(editor, currentSearchState, pattern, inSelection);
657
+ const count = markAllMatches(editor, currentSearchState, pattern, inSelection);
658
+ if (global$2.browser.isSafari()) {
659
+ selection.setRng(selection.getRng(), isForwardSelection);
660
+ }
751
661
  if (count) {
752
- var newIndex = moveSelection(editor, currentSearchState, true);
662
+ const newIndex = moveSelection(editor, currentSearchState, true);
753
663
  currentSearchState.set({
754
664
  index: newIndex,
755
- count: count,
756
- text: text,
757
- matchCase: matchCase,
758
- wholeWord: wholeWord,
759
- inSelection: inSelection
665
+ count,
666
+ text,
667
+ matchCase,
668
+ wholeWord,
669
+ inSelection
760
670
  });
761
671
  }
762
672
  return count;
763
673
  };
764
- var next = function (editor, currentSearchState) {
765
- var index = moveSelection(editor, currentSearchState, true);
766
- currentSearchState.set(__assign(__assign({}, currentSearchState.get()), { index: index }));
674
+ const next = (editor, currentSearchState) => {
675
+ const index = moveSelection(editor, currentSearchState, true);
676
+ currentSearchState.set({
677
+ ...currentSearchState.get(),
678
+ index
679
+ });
767
680
  };
768
- var prev = function (editor, currentSearchState) {
769
- var index = moveSelection(editor, currentSearchState, false);
770
- currentSearchState.set(__assign(__assign({}, currentSearchState.get()), { index: index }));
681
+ const prev = (editor, currentSearchState) => {
682
+ const index = moveSelection(editor, currentSearchState, false);
683
+ currentSearchState.set({
684
+ ...currentSearchState.get(),
685
+ index
686
+ });
771
687
  };
772
- var isMatchSpan = function (node) {
773
- var matchIndex = getElmIndex(node);
688
+ const isMatchSpan = node => {
689
+ const matchIndex = getElmIndex(node);
774
690
  return matchIndex !== null && matchIndex.length > 0;
775
691
  };
776
- var replace = function (editor, currentSearchState, text, forward, all) {
777
- var searchState = currentSearchState.get();
778
- var currentIndex = searchState.index;
779
- var currentMatchIndex, nextIndex = currentIndex;
692
+ const replace = (editor, currentSearchState, text, forward, all) => {
693
+ const searchState = currentSearchState.get();
694
+ const currentIndex = searchState.index;
695
+ let currentMatchIndex, nextIndex = currentIndex;
780
696
  forward = forward !== false;
781
- var node = editor.getBody();
782
- var nodes = global$1.grep(global$1.toArray(node.getElementsByTagName('span')), isMatchSpan);
783
- for (var i = 0; i < nodes.length; i++) {
784
- var nodeIndex = getElmIndex(nodes[i]);
785
- var matchIndex = currentMatchIndex = parseInt(nodeIndex, 10);
697
+ const node = editor.getBody();
698
+ const nodes = global$1.grep(global$1.toArray(node.getElementsByTagName('span')), isMatchSpan);
699
+ for (let i = 0; i < nodes.length; i++) {
700
+ const nodeIndex = getElmIndex(nodes[i]);
701
+ let matchIndex = currentMatchIndex = parseInt(nodeIndex, 10);
786
702
  if (all || matchIndex === searchState.index) {
787
703
  if (text.length) {
788
- nodes[i].firstChild.nodeValue = text;
704
+ nodes[i].innerText = text;
789
705
  unwrap(nodes[i]);
790
706
  } else {
791
707
  removeNode(editor.dom, nodes[i]);
@@ -806,10 +722,11 @@
806
722
  nodes[i].setAttribute('data-mce-index', String(currentMatchIndex - 1));
807
723
  }
808
724
  }
809
- currentSearchState.set(__assign(__assign({}, searchState), {
725
+ currentSearchState.set({
726
+ ...searchState,
810
727
  count: all ? 0 : searchState.count - 1,
811
728
  index: nextIndex
812
- }));
729
+ });
813
730
  if (forward) {
814
731
  next(editor, currentSearchState);
815
732
  } else {
@@ -817,12 +734,13 @@
817
734
  }
818
735
  return !all && currentSearchState.get().count > 0;
819
736
  };
820
- var done = function (editor, currentSearchState, keepEditorSelection) {
821
- var i, startContainer, endContainer;
822
- var searchState = currentSearchState.get();
823
- var nodes = global$1.toArray(editor.getBody().getElementsByTagName('span'));
824
- for (i = 0; i < nodes.length; i++) {
825
- var nodeIndex = getElmIndex(nodes[i]);
737
+ const done = (editor, currentSearchState, keepEditorSelection) => {
738
+ let startContainer;
739
+ let endContainer;
740
+ const searchState = currentSearchState.get();
741
+ const nodes = global$1.toArray(editor.getBody().getElementsByTagName('span'));
742
+ for (let i = 0; i < nodes.length; i++) {
743
+ const nodeIndex = getElmIndex(nodes[i]);
826
744
  if (nodeIndex !== null && nodeIndex.length) {
827
745
  if (nodeIndex === searchState.index.toString()) {
828
746
  if (!startContainer) {
@@ -833,127 +751,125 @@
833
751
  unwrap(nodes[i]);
834
752
  }
835
753
  }
836
- currentSearchState.set(__assign(__assign({}, searchState), {
754
+ currentSearchState.set({
755
+ ...searchState,
837
756
  index: -1,
838
757
  count: 0,
839
758
  text: ''
840
- }));
759
+ });
841
760
  if (startContainer && endContainer) {
842
- var rng = editor.dom.createRng();
761
+ const rng = editor.dom.createRng();
843
762
  rng.setStart(startContainer, 0);
844
763
  rng.setEnd(endContainer, endContainer.data.length);
845
764
  if (keepEditorSelection !== false) {
846
765
  editor.selection.setRng(rng);
847
766
  }
848
767
  return rng;
768
+ } else {
769
+ return undefined;
849
770
  }
850
771
  };
851
- var hasNext = function (editor, currentSearchState) {
852
- return currentSearchState.get().count > 1;
853
- };
854
- var hasPrev = function (editor, currentSearchState) {
855
- return currentSearchState.get().count > 1;
856
- };
772
+ const hasNext = (editor, currentSearchState) => currentSearchState.get().count > 1;
773
+ const hasPrev = (editor, currentSearchState) => currentSearchState.get().count > 1;
857
774
 
858
- var get$1 = function (editor, currentState) {
859
- var done$1 = function (keepEditorSelection) {
775
+ const get = (editor, currentState) => {
776
+ const done$1 = keepEditorSelection => {
860
777
  return done(editor, currentState, keepEditorSelection);
861
778
  };
862
- var find = function (text, matchCase, wholeWord, inSelection) {
863
- if (inSelection === void 0) {
864
- inSelection = false;
865
- }
866
- return find$2(editor, currentState, text, matchCase, wholeWord, inSelection);
779
+ const find$1 = (text, matchCase, wholeWord, inSelection = false) => {
780
+ return find(editor, currentState, text, matchCase, wholeWord, inSelection);
867
781
  };
868
- var next$1 = function () {
782
+ const next$1 = () => {
869
783
  return next(editor, currentState);
870
784
  };
871
- var prev$1 = function () {
785
+ const prev$1 = () => {
872
786
  return prev(editor, currentState);
873
787
  };
874
- var replace$1 = function (text, forward, all) {
788
+ const replace$1 = (text, forward, all) => {
875
789
  return replace(editor, currentState, text, forward, all);
876
790
  };
877
791
  return {
878
792
  done: done$1,
879
- find: find,
793
+ find: find$1,
880
794
  next: next$1,
881
795
  prev: prev$1,
882
796
  replace: replace$1
883
797
  };
884
798
  };
885
799
 
886
- var value = function () {
887
- var subject = Cell(Optional.none());
888
- var clear = function () {
889
- return subject.set(Optional.none());
890
- };
891
- var set = function (s) {
892
- return subject.set(Optional.some(s));
800
+ const singleton = doRevoke => {
801
+ const subject = Cell(Optional.none());
802
+ const revoke = () => subject.get().each(doRevoke);
803
+ const clear = () => {
804
+ revoke();
805
+ subject.set(Optional.none());
893
806
  };
894
- var isSet = function () {
895
- return subject.get().isSome();
807
+ const isSet = () => subject.get().isSome();
808
+ const get = () => subject.get();
809
+ const set = s => {
810
+ revoke();
811
+ subject.set(Optional.some(s));
896
812
  };
897
- var on = function (f) {
898
- return subject.get().each(f);
813
+ return {
814
+ clear,
815
+ isSet,
816
+ get,
817
+ set
899
818
  };
819
+ };
820
+ const value = () => {
821
+ const subject = singleton(noop);
822
+ const on = f => subject.get().each(f);
900
823
  return {
901
- clear: clear,
902
- set: set,
903
- isSet: isSet,
904
- on: on
824
+ ...subject,
825
+ on
905
826
  };
906
827
  };
907
828
 
908
- var global$3 = tinymce.util.Tools.resolve('tinymce.Env');
909
-
910
- var open = function (editor, currentSearchState) {
911
- var dialogApi = value();
829
+ const open = (editor, currentSearchState) => {
830
+ const dialogApi = value();
912
831
  editor.undoManager.add();
913
- var selectedText = global$1.trim(editor.selection.getContent({ format: 'text' }));
914
- var updateButtonStates = function (api) {
915
- var updateNext = hasNext(editor, currentSearchState) ? api.enable : api.disable;
916
- updateNext('next');
917
- var updatePrev = hasPrev(editor, currentSearchState) ? api.enable : api.disable;
918
- updatePrev('prev');
832
+ const selectedText = global$1.trim(editor.selection.getContent({ format: 'text' }));
833
+ const updateButtonStates = api => {
834
+ api.setEnabled('next', hasNext(editor, currentSearchState));
835
+ api.setEnabled('prev', hasPrev(editor, currentSearchState));
919
836
  };
920
- var updateSearchState = function (api) {
921
- var data = api.getData();
922
- var current = currentSearchState.get();
923
- currentSearchState.set(__assign(__assign({}, current), {
837
+ const updateSearchState = api => {
838
+ const data = api.getData();
839
+ const current = currentSearchState.get();
840
+ currentSearchState.set({
841
+ ...current,
924
842
  matchCase: data.matchcase,
925
843
  wholeWord: data.wholewords,
926
844
  inSelection: data.inselection
927
- }));
845
+ });
928
846
  };
929
- var disableAll = function (api, disable) {
930
- var buttons = [
847
+ const disableAll = (api, disable) => {
848
+ const buttons = [
931
849
  'replace',
932
850
  'replaceall',
933
851
  'prev',
934
852
  'next'
935
853
  ];
936
- var toggle = disable ? api.disable : api.enable;
854
+ const toggle = name => api.setEnabled(name, !disable);
937
855
  each(buttons, toggle);
938
856
  };
939
- var notFoundAlert = function (api) {
940
- editor.windowManager.alert('Could not find the specified string.', function () {
941
- api.focus('findtext');
942
- });
857
+ const toggleNotFoundAlert = (isVisible, api) => {
858
+ api.redial(getDialogSpec(isVisible, api.getData()));
943
859
  };
944
- var focusButtonIfRequired = function (api, name) {
945
- if (global$3.browser.isSafari() && global$3.deviceType.isTouch() && (name === 'find' || name === 'replace' || name === 'replaceall')) {
860
+ const focusButtonIfRequired = (api, name) => {
861
+ if (global$2.browser.isSafari() && global$2.deviceType.isTouch() && (name === 'find' || name === 'replace' || name === 'replaceall')) {
946
862
  api.focus(name);
947
863
  }
948
864
  };
949
- var reset = function (api) {
865
+ const reset = api => {
950
866
  done(editor, currentSearchState, false);
951
867
  disableAll(api, true);
952
868
  updateButtonStates(api);
953
869
  };
954
- var doFind = function (api) {
955
- var data = api.getData();
956
- var last = currentSearchState.get();
870
+ const doFind = api => {
871
+ const data = api.getData();
872
+ const last = currentSearchState.get();
957
873
  if (!data.findtext.length) {
958
874
  reset(api);
959
875
  return;
@@ -961,63 +877,75 @@
961
877
  if (last.text === data.findtext && last.matchCase === data.matchcase && last.wholeWord === data.wholewords) {
962
878
  next(editor, currentSearchState);
963
879
  } else {
964
- var count = find$2(editor, currentSearchState, data.findtext, data.matchcase, data.wholewords, data.inselection);
880
+ const count = find(editor, currentSearchState, data.findtext, data.matchcase, data.wholewords, data.inselection);
965
881
  if (count <= 0) {
966
- notFoundAlert(api);
882
+ toggleNotFoundAlert(true, api);
967
883
  }
968
884
  disableAll(api, count === 0);
969
885
  }
970
886
  updateButtonStates(api);
971
887
  };
972
- var initialState = currentSearchState.get();
973
- var initialData = {
888
+ const initialState = currentSearchState.get();
889
+ const initialData = {
974
890
  findtext: selectedText,
975
891
  replacetext: '',
976
892
  wholewords: initialState.wholeWord,
977
893
  matchcase: initialState.matchCase,
978
894
  inselection: initialState.inSelection
979
895
  };
980
- var spec = {
896
+ const getPanelItems = error => {
897
+ const items = [
898
+ {
899
+ type: 'bar',
900
+ items: [
901
+ {
902
+ type: 'input',
903
+ name: 'findtext',
904
+ placeholder: 'Find',
905
+ maximized: true,
906
+ inputMode: 'search'
907
+ },
908
+ {
909
+ type: 'button',
910
+ name: 'prev',
911
+ text: 'Previous',
912
+ icon: 'action-prev',
913
+ enabled: false,
914
+ borderless: true
915
+ },
916
+ {
917
+ type: 'button',
918
+ name: 'next',
919
+ text: 'Next',
920
+ icon: 'action-next',
921
+ enabled: false,
922
+ borderless: true
923
+ }
924
+ ]
925
+ },
926
+ {
927
+ type: 'input',
928
+ name: 'replacetext',
929
+ placeholder: 'Replace with',
930
+ inputMode: 'search'
931
+ }
932
+ ];
933
+ if (error) {
934
+ items.push({
935
+ type: 'alertbanner',
936
+ level: 'error',
937
+ text: 'Could not find the specified string.',
938
+ icon: 'warning'
939
+ });
940
+ }
941
+ return items;
942
+ };
943
+ const getDialogSpec = (showNoMatchesAlertBanner, initialData) => ({
981
944
  title: 'Find and Replace',
982
945
  size: 'normal',
983
946
  body: {
984
947
  type: 'panel',
985
- items: [
986
- {
987
- type: 'bar',
988
- items: [
989
- {
990
- type: 'input',
991
- name: 'findtext',
992
- placeholder: 'Find',
993
- maximized: true,
994
- inputMode: 'search'
995
- },
996
- {
997
- type: 'button',
998
- name: 'prev',
999
- text: 'Previous',
1000
- icon: 'action-prev',
1001
- disabled: true,
1002
- borderless: true
1003
- },
1004
- {
1005
- type: 'button',
1006
- name: 'next',
1007
- text: 'Next',
1008
- icon: 'action-next',
1009
- disabled: true,
1010
- borderless: true
1011
- }
1012
- ]
1013
- },
1014
- {
1015
- type: 'input',
1016
- name: 'replacetext',
1017
- placeholder: 'Replace with',
1018
- inputMode: 'search'
1019
- }
1020
- ]
948
+ items: getPanelItems(showNoMatchesAlertBanner)
1021
949
  },
1022
950
  buttons: [
1023
951
  {
@@ -1054,23 +982,26 @@
1054
982
  type: 'custom',
1055
983
  name: 'replace',
1056
984
  text: 'Replace',
1057
- disabled: true
985
+ enabled: false
1058
986
  },
1059
987
  {
1060
988
  type: 'custom',
1061
989
  name: 'replaceall',
1062
990
  text: 'Replace all',
1063
- disabled: true
991
+ enabled: false
1064
992
  }
1065
993
  ],
1066
- initialData: initialData,
1067
- onChange: function (api, details) {
994
+ initialData,
995
+ onChange: (api, details) => {
996
+ if (showNoMatchesAlertBanner) {
997
+ toggleNotFoundAlert(false, api);
998
+ }
1068
999
  if (details.name === 'findtext' && currentSearchState.get().count > 0) {
1069
1000
  reset(api);
1070
1001
  }
1071
1002
  },
1072
- onAction: function (api, details) {
1073
- var data = api.getData();
1003
+ onAction: (api, details) => {
1004
+ const data = api.getData();
1074
1005
  switch (details.name) {
1075
1006
  case 'find':
1076
1007
  doFind(api);
@@ -1097,37 +1028,36 @@
1097
1028
  case 'matchcase':
1098
1029
  case 'wholewords':
1099
1030
  case 'inselection':
1031
+ toggleNotFoundAlert(false, api);
1100
1032
  updateSearchState(api);
1101
1033
  reset(api);
1102
1034
  break;
1103
1035
  }
1104
1036
  focusButtonIfRequired(api, details.name);
1105
1037
  },
1106
- onSubmit: function (api) {
1038
+ onSubmit: api => {
1107
1039
  doFind(api);
1108
1040
  focusButtonIfRequired(api, 'find');
1109
1041
  },
1110
- onClose: function () {
1042
+ onClose: () => {
1111
1043
  editor.focus();
1112
1044
  done(editor, currentSearchState);
1113
1045
  editor.undoManager.add();
1114
1046
  }
1115
- };
1116
- dialogApi.set(editor.windowManager.open(spec, { inline: 'toolbar' }));
1047
+ });
1048
+ dialogApi.set(editor.windowManager.open(getDialogSpec(false, initialData), { inline: 'toolbar' }));
1117
1049
  };
1118
1050
 
1119
- var register = function (editor, currentSearchState) {
1120
- editor.addCommand('SearchReplace', function () {
1051
+ const register$1 = (editor, currentSearchState) => {
1052
+ editor.addCommand('SearchReplace', () => {
1121
1053
  open(editor, currentSearchState);
1122
1054
  });
1123
1055
  };
1124
1056
 
1125
- var showDialog = function (editor, currentSearchState) {
1126
- return function () {
1127
- open(editor, currentSearchState);
1128
- };
1057
+ const showDialog = (editor, currentSearchState) => () => {
1058
+ open(editor, currentSearchState);
1129
1059
  };
1130
- var register$1 = function (editor, currentSearchState) {
1060
+ const register = (editor, currentSearchState) => {
1131
1061
  editor.ui.registry.addMenuItem('searchreplace', {
1132
1062
  text: 'Find and replace...',
1133
1063
  shortcut: 'Meta+F',
@@ -1142,9 +1072,9 @@
1142
1072
  editor.shortcuts.add('Meta+F', '', showDialog(editor, currentSearchState));
1143
1073
  };
1144
1074
 
1145
- function Plugin () {
1146
- global.add('searchreplace', function (editor) {
1147
- var currentSearchState = Cell({
1075
+ var Plugin = () => {
1076
+ global$3.add('searchreplace', editor => {
1077
+ const currentSearchState = Cell({
1148
1078
  index: -1,
1149
1079
  count: 0,
1150
1080
  text: '',
@@ -1152,12 +1082,12 @@
1152
1082
  wholeWord: false,
1153
1083
  inSelection: false
1154
1084
  });
1155
- register(editor, currentSearchState);
1156
1085
  register$1(editor, currentSearchState);
1157
- return get$1(editor, currentSearchState);
1086
+ register(editor, currentSearchState);
1087
+ return get(editor, currentSearchState);
1158
1088
  });
1159
- }
1089
+ };
1160
1090
 
1161
1091
  Plugin();
1162
1092
 
1163
- }());
1093
+ })();