@lotte-innovate/ui-component-test 0.2.56 → 0.2.57

Sign up to get free protection for your applications and to get access to all the features.
Files changed (263) hide show
  1. package/dist/lib/_virtual/_commonjsHelpers.mjs +2 -0
  2. package/dist/lib/_virtual/_commonjsHelpers.mjs.map +1 -0
  3. package/dist/lib/_virtual/model.mjs +2 -0
  4. package/dist/lib/_virtual/model.mjs.map +1 -0
  5. package/dist/lib/_virtual/model2.mjs +2 -0
  6. package/dist/lib/_virtual/model2.mjs.map +1 -0
  7. package/dist/lib/_virtual/plugin.mjs +2 -0
  8. package/dist/lib/_virtual/plugin.mjs.map +1 -0
  9. package/dist/lib/_virtual/plugin10.mjs +2 -0
  10. package/dist/lib/_virtual/plugin10.mjs.map +1 -0
  11. package/dist/lib/_virtual/plugin11.mjs +2 -0
  12. package/dist/lib/_virtual/plugin11.mjs.map +1 -0
  13. package/dist/lib/_virtual/plugin12.mjs +2 -0
  14. package/dist/lib/_virtual/plugin12.mjs.map +1 -0
  15. package/dist/lib/_virtual/plugin13.mjs +2 -0
  16. package/dist/lib/_virtual/plugin13.mjs.map +1 -0
  17. package/dist/lib/_virtual/plugin14.mjs +2 -0
  18. package/dist/lib/_virtual/plugin14.mjs.map +1 -0
  19. package/dist/lib/_virtual/plugin15.mjs +2 -0
  20. package/dist/lib/_virtual/plugin15.mjs.map +1 -0
  21. package/dist/lib/_virtual/plugin16.mjs +2 -0
  22. package/dist/lib/_virtual/plugin16.mjs.map +1 -0
  23. package/dist/lib/_virtual/plugin17.mjs +2 -0
  24. package/dist/lib/_virtual/plugin17.mjs.map +1 -0
  25. package/dist/lib/_virtual/plugin18.mjs +2 -0
  26. package/dist/lib/_virtual/plugin18.mjs.map +1 -0
  27. package/dist/lib/_virtual/plugin19.mjs +2 -0
  28. package/dist/lib/_virtual/plugin19.mjs.map +1 -0
  29. package/dist/lib/_virtual/plugin2.mjs +2 -0
  30. package/dist/lib/_virtual/plugin2.mjs.map +1 -0
  31. package/dist/lib/_virtual/plugin20.mjs +2 -0
  32. package/dist/lib/_virtual/plugin20.mjs.map +1 -0
  33. package/dist/lib/_virtual/plugin21.mjs +2 -0
  34. package/dist/lib/_virtual/plugin21.mjs.map +1 -0
  35. package/dist/lib/_virtual/plugin22.mjs +2 -0
  36. package/dist/lib/_virtual/plugin22.mjs.map +1 -0
  37. package/dist/lib/_virtual/plugin23.mjs +2 -0
  38. package/dist/lib/_virtual/plugin23.mjs.map +1 -0
  39. package/dist/lib/_virtual/plugin24.mjs +2 -0
  40. package/dist/lib/_virtual/plugin24.mjs.map +1 -0
  41. package/dist/lib/_virtual/plugin25.mjs +2 -0
  42. package/dist/lib/_virtual/plugin25.mjs.map +1 -0
  43. package/dist/lib/_virtual/plugin26.mjs +2 -0
  44. package/dist/lib/_virtual/plugin26.mjs.map +1 -0
  45. package/dist/lib/_virtual/plugin27.mjs +2 -0
  46. package/dist/lib/_virtual/plugin27.mjs.map +1 -0
  47. package/dist/lib/_virtual/plugin28.mjs +2 -0
  48. package/dist/lib/_virtual/plugin28.mjs.map +1 -0
  49. package/dist/lib/_virtual/plugin29.mjs +2 -0
  50. package/dist/lib/_virtual/plugin29.mjs.map +1 -0
  51. package/dist/lib/_virtual/plugin3.mjs +2 -0
  52. package/dist/lib/_virtual/plugin3.mjs.map +1 -0
  53. package/dist/lib/_virtual/plugin30.mjs +2 -0
  54. package/dist/lib/_virtual/plugin30.mjs.map +1 -0
  55. package/dist/lib/_virtual/plugin31.mjs +2 -0
  56. package/dist/lib/_virtual/plugin31.mjs.map +1 -0
  57. package/dist/lib/_virtual/plugin32.mjs +2 -0
  58. package/dist/lib/_virtual/plugin32.mjs.map +1 -0
  59. package/dist/lib/_virtual/plugin33.mjs +2 -0
  60. package/dist/lib/_virtual/plugin33.mjs.map +1 -0
  61. package/dist/lib/_virtual/plugin34.mjs +2 -0
  62. package/dist/lib/_virtual/plugin34.mjs.map +1 -0
  63. package/dist/lib/_virtual/plugin35.mjs +2 -0
  64. package/dist/lib/_virtual/plugin35.mjs.map +1 -0
  65. package/dist/lib/_virtual/plugin36.mjs +2 -0
  66. package/dist/lib/_virtual/plugin36.mjs.map +1 -0
  67. package/dist/lib/_virtual/plugin37.mjs +2 -0
  68. package/dist/lib/_virtual/plugin37.mjs.map +1 -0
  69. package/dist/lib/_virtual/plugin38.mjs +2 -0
  70. package/dist/lib/_virtual/plugin38.mjs.map +1 -0
  71. package/dist/lib/_virtual/plugin39.mjs +2 -0
  72. package/dist/lib/_virtual/plugin39.mjs.map +1 -0
  73. package/dist/lib/_virtual/plugin4.mjs +2 -0
  74. package/dist/lib/_virtual/plugin4.mjs.map +1 -0
  75. package/dist/lib/_virtual/plugin40.mjs +2 -0
  76. package/dist/lib/_virtual/plugin40.mjs.map +1 -0
  77. package/dist/lib/_virtual/plugin41.mjs +2 -0
  78. package/dist/lib/_virtual/plugin41.mjs.map +1 -0
  79. package/dist/lib/_virtual/plugin42.mjs +2 -0
  80. package/dist/lib/_virtual/plugin42.mjs.map +1 -0
  81. package/dist/lib/_virtual/plugin43.mjs +2 -0
  82. package/dist/lib/_virtual/plugin43.mjs.map +1 -0
  83. package/dist/lib/_virtual/plugin44.mjs +2 -0
  84. package/dist/lib/_virtual/plugin44.mjs.map +1 -0
  85. package/dist/lib/_virtual/plugin45.mjs +2 -0
  86. package/dist/lib/_virtual/plugin45.mjs.map +1 -0
  87. package/dist/lib/_virtual/plugin46.mjs +2 -0
  88. package/dist/lib/_virtual/plugin46.mjs.map +1 -0
  89. package/dist/lib/_virtual/plugin47.mjs +2 -0
  90. package/dist/lib/_virtual/plugin47.mjs.map +1 -0
  91. package/dist/lib/_virtual/plugin48.mjs +2 -0
  92. package/dist/lib/_virtual/plugin48.mjs.map +1 -0
  93. package/dist/lib/_virtual/plugin49.mjs +2 -0
  94. package/dist/lib/_virtual/plugin49.mjs.map +1 -0
  95. package/dist/lib/_virtual/plugin5.mjs +2 -0
  96. package/dist/lib/_virtual/plugin5.mjs.map +1 -0
  97. package/dist/lib/_virtual/plugin50.mjs +2 -0
  98. package/dist/lib/_virtual/plugin50.mjs.map +1 -0
  99. package/dist/lib/_virtual/plugin51.mjs +2 -0
  100. package/dist/lib/_virtual/plugin51.mjs.map +1 -0
  101. package/dist/lib/_virtual/plugin52.mjs +2 -0
  102. package/dist/lib/_virtual/plugin52.mjs.map +1 -0
  103. package/dist/lib/_virtual/plugin53.mjs +2 -0
  104. package/dist/lib/_virtual/plugin53.mjs.map +1 -0
  105. package/dist/lib/_virtual/plugin54.mjs +2 -0
  106. package/dist/lib/_virtual/plugin54.mjs.map +1 -0
  107. package/dist/lib/_virtual/plugin55.mjs +2 -0
  108. package/dist/lib/_virtual/plugin55.mjs.map +1 -0
  109. package/dist/lib/_virtual/plugin56.mjs +2 -0
  110. package/dist/lib/_virtual/plugin56.mjs.map +1 -0
  111. package/dist/lib/_virtual/plugin6.mjs +2 -0
  112. package/dist/lib/_virtual/plugin6.mjs.map +1 -0
  113. package/dist/lib/_virtual/plugin7.mjs +2 -0
  114. package/dist/lib/_virtual/plugin7.mjs.map +1 -0
  115. package/dist/lib/_virtual/plugin8.mjs +2 -0
  116. package/dist/lib/_virtual/plugin8.mjs.map +1 -0
  117. package/dist/lib/_virtual/plugin9.mjs +2 -0
  118. package/dist/lib/_virtual/plugin9.mjs.map +1 -0
  119. package/dist/lib/_virtual/theme.mjs +2 -0
  120. package/dist/lib/_virtual/theme.mjs.map +1 -0
  121. package/dist/lib/_virtual/theme2.mjs +2 -0
  122. package/dist/lib/_virtual/theme2.mjs.map +1 -0
  123. package/dist/lib/_virtual/tinymce.mjs +2 -0
  124. package/dist/lib/_virtual/tinymce.mjs.map +1 -0
  125. package/dist/lib/_virtual/tinymce2.mjs +2 -0
  126. package/dist/lib/_virtual/tinymce2.mjs.map +1 -0
  127. package/dist/lib/components/Datepicker/index.mjs +1 -1
  128. package/dist/lib/components/Editor/index.mjs +1 -1
  129. package/dist/lib/node_modules/style-inject/dist/style-inject.es.mjs +2 -0
  130. package/dist/lib/node_modules/style-inject/dist/style-inject.es.mjs.map +1 -0
  131. package/dist/lib/node_modules/tinymce/icons/default/icons.mjs +2 -0
  132. package/dist/lib/node_modules/tinymce/icons/default/icons.mjs.map +1 -0
  133. package/dist/lib/node_modules/tinymce/models/dom/model.mjs +2 -0
  134. package/dist/lib/node_modules/tinymce/models/dom/model.mjs.map +1 -0
  135. package/dist/lib/node_modules/tinymce/plugins/accordion/plugin.mjs +2 -0
  136. package/dist/lib/node_modules/tinymce/plugins/accordion/plugin.mjs.map +1 -0
  137. package/dist/lib/node_modules/tinymce/plugins/advlist/plugin.mjs +2 -0
  138. package/dist/lib/node_modules/tinymce/plugins/advlist/plugin.mjs.map +1 -0
  139. package/dist/lib/node_modules/tinymce/plugins/anchor/plugin.mjs +2 -0
  140. package/dist/lib/node_modules/tinymce/plugins/anchor/plugin.mjs.map +1 -0
  141. package/dist/lib/node_modules/tinymce/plugins/autolink/plugin.mjs +2 -0
  142. package/dist/lib/node_modules/tinymce/plugins/autolink/plugin.mjs.map +1 -0
  143. package/dist/lib/node_modules/tinymce/plugins/autosave/plugin.mjs +2 -0
  144. package/dist/lib/node_modules/tinymce/plugins/autosave/plugin.mjs.map +1 -0
  145. package/dist/lib/node_modules/tinymce/plugins/charmap/plugin.mjs +2 -0
  146. package/dist/lib/node_modules/tinymce/plugins/charmap/plugin.mjs.map +1 -0
  147. package/dist/lib/node_modules/tinymce/plugins/code/plugin.mjs +2 -0
  148. package/dist/lib/node_modules/tinymce/plugins/code/plugin.mjs.map +1 -0
  149. package/dist/lib/node_modules/tinymce/plugins/codesample/plugin.mjs +2 -0
  150. package/dist/lib/node_modules/tinymce/plugins/codesample/plugin.mjs.map +1 -0
  151. package/dist/lib/node_modules/tinymce/plugins/directionality/plugin.mjs +2 -0
  152. package/dist/lib/node_modules/tinymce/plugins/directionality/plugin.mjs.map +1 -0
  153. package/dist/lib/node_modules/tinymce/plugins/emoticons/plugin.mjs +2 -0
  154. package/dist/lib/node_modules/tinymce/plugins/emoticons/plugin.mjs.map +1 -0
  155. package/dist/lib/node_modules/tinymce/plugins/fullscreen/plugin.mjs +2 -0
  156. package/dist/lib/node_modules/tinymce/plugins/fullscreen/plugin.mjs.map +1 -0
  157. package/dist/lib/node_modules/tinymce/plugins/image/plugin.mjs +2 -0
  158. package/dist/lib/node_modules/tinymce/plugins/image/plugin.mjs.map +1 -0
  159. package/dist/lib/node_modules/tinymce/plugins/importcss/plugin.mjs +2 -0
  160. package/dist/lib/node_modules/tinymce/plugins/importcss/plugin.mjs.map +1 -0
  161. package/dist/lib/node_modules/tinymce/plugins/insertdatetime/plugin.mjs +2 -0
  162. package/dist/lib/node_modules/tinymce/plugins/insertdatetime/plugin.mjs.map +1 -0
  163. package/dist/lib/node_modules/tinymce/plugins/link/plugin.mjs +2 -0
  164. package/dist/lib/node_modules/tinymce/plugins/link/plugin.mjs.map +1 -0
  165. package/dist/lib/node_modules/tinymce/plugins/lists/plugin.mjs +2 -0
  166. package/dist/lib/node_modules/tinymce/plugins/lists/plugin.mjs.map +1 -0
  167. package/dist/lib/node_modules/tinymce/plugins/media/plugin.mjs +2 -0
  168. package/dist/lib/node_modules/tinymce/plugins/media/plugin.mjs.map +1 -0
  169. package/dist/lib/node_modules/tinymce/plugins/nonbreaking/plugin.mjs +2 -0
  170. package/dist/lib/node_modules/tinymce/plugins/nonbreaking/plugin.mjs.map +1 -0
  171. package/dist/lib/node_modules/tinymce/plugins/pagebreak/plugin.mjs +2 -0
  172. package/dist/lib/node_modules/tinymce/plugins/pagebreak/plugin.mjs.map +1 -0
  173. package/dist/lib/node_modules/tinymce/plugins/preview/plugin.mjs +2 -0
  174. package/dist/lib/node_modules/tinymce/plugins/preview/plugin.mjs.map +1 -0
  175. package/dist/lib/node_modules/tinymce/plugins/quickbars/plugin.mjs +2 -0
  176. package/dist/lib/node_modules/tinymce/plugins/quickbars/plugin.mjs.map +1 -0
  177. package/dist/lib/node_modules/tinymce/plugins/save/plugin.mjs +2 -0
  178. package/dist/lib/node_modules/tinymce/plugins/save/plugin.mjs.map +1 -0
  179. package/dist/lib/node_modules/tinymce/plugins/searchreplace/plugin.mjs +2 -0
  180. package/dist/lib/node_modules/tinymce/plugins/searchreplace/plugin.mjs.map +1 -0
  181. package/dist/lib/node_modules/tinymce/plugins/table/plugin.mjs +2 -0
  182. package/dist/lib/node_modules/tinymce/plugins/table/plugin.mjs.map +1 -0
  183. package/dist/lib/node_modules/tinymce/plugins/template/plugin.mjs +2 -0
  184. package/dist/lib/node_modules/tinymce/plugins/template/plugin.mjs.map +1 -0
  185. package/dist/lib/node_modules/tinymce/plugins/visualblocks/plugin.mjs +2 -0
  186. package/dist/lib/node_modules/tinymce/plugins/visualblocks/plugin.mjs.map +1 -0
  187. package/dist/lib/node_modules/tinymce/plugins/visualchars/plugin.mjs +2 -0
  188. package/dist/lib/node_modules/tinymce/plugins/visualchars/plugin.mjs.map +1 -0
  189. package/dist/lib/node_modules/tinymce/plugins/wordcount/plugin.mjs +2 -0
  190. package/dist/lib/node_modules/tinymce/plugins/wordcount/plugin.mjs.map +1 -0
  191. package/dist/lib/node_modules/tinymce/skins/ui/oxide/skin.mjs +2 -0
  192. package/dist/lib/node_modules/tinymce/skins/ui/oxide/skin.mjs.map +1 -0
  193. package/dist/lib/node_modules/tinymce/themes/silver/theme.mjs +2 -0
  194. package/dist/lib/node_modules/tinymce/themes/silver/theme.mjs.map +1 -0
  195. package/dist/lib/node_modules/tinymce/tinymce.mjs +2 -0
  196. package/dist/lib/node_modules/tinymce/tinymce.mjs.map +1 -0
  197. package/dist/lib/utils/useLoadTinyMCE.mjs +1 -1
  198. package/dist/lib/utils/useLoadTinyMCE.mjs.map +1 -1
  199. package/package.json +3 -4
  200. package/dist/lib/node_modules/@babel/runtime/helpers/esm/typeof.mjs +0 -2
  201. package/dist/lib/node_modules/@babel/runtime/helpers/esm/typeof.mjs.map +0 -1
  202. package/dist/lib/node_modules/date-fns/esm/_lib/addLeadingZeros/index.mjs +0 -2
  203. package/dist/lib/node_modules/date-fns/esm/_lib/addLeadingZeros/index.mjs.map +0 -1
  204. package/dist/lib/node_modules/date-fns/esm/_lib/defaultLocale/index.mjs +0 -2
  205. package/dist/lib/node_modules/date-fns/esm/_lib/defaultLocale/index.mjs.map +0 -1
  206. package/dist/lib/node_modules/date-fns/esm/_lib/defaultOptions/index.mjs +0 -2
  207. package/dist/lib/node_modules/date-fns/esm/_lib/defaultOptions/index.mjs.map +0 -1
  208. package/dist/lib/node_modules/date-fns/esm/_lib/format/formatters/index.mjs +0 -2
  209. package/dist/lib/node_modules/date-fns/esm/_lib/format/formatters/index.mjs.map +0 -1
  210. package/dist/lib/node_modules/date-fns/esm/_lib/format/lightFormatters/index.mjs +0 -2
  211. package/dist/lib/node_modules/date-fns/esm/_lib/format/lightFormatters/index.mjs.map +0 -1
  212. package/dist/lib/node_modules/date-fns/esm/_lib/format/longFormatters/index.mjs +0 -2
  213. package/dist/lib/node_modules/date-fns/esm/_lib/format/longFormatters/index.mjs.map +0 -1
  214. package/dist/lib/node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.mjs +0 -2
  215. package/dist/lib/node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.mjs.map +0 -1
  216. package/dist/lib/node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.mjs +0 -2
  217. package/dist/lib/node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.mjs.map +0 -1
  218. package/dist/lib/node_modules/date-fns/esm/_lib/getUTCISOWeek/index.mjs +0 -2
  219. package/dist/lib/node_modules/date-fns/esm/_lib/getUTCISOWeek/index.mjs.map +0 -1
  220. package/dist/lib/node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.mjs +0 -2
  221. package/dist/lib/node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.mjs.map +0 -1
  222. package/dist/lib/node_modules/date-fns/esm/_lib/getUTCWeek/index.mjs +0 -2
  223. package/dist/lib/node_modules/date-fns/esm/_lib/getUTCWeek/index.mjs.map +0 -1
  224. package/dist/lib/node_modules/date-fns/esm/_lib/getUTCWeekYear/index.mjs +0 -2
  225. package/dist/lib/node_modules/date-fns/esm/_lib/getUTCWeekYear/index.mjs.map +0 -1
  226. package/dist/lib/node_modules/date-fns/esm/_lib/protectedTokens/index.mjs +0 -2
  227. package/dist/lib/node_modules/date-fns/esm/_lib/protectedTokens/index.mjs.map +0 -1
  228. package/dist/lib/node_modules/date-fns/esm/_lib/requiredArgs/index.mjs +0 -2
  229. package/dist/lib/node_modules/date-fns/esm/_lib/requiredArgs/index.mjs.map +0 -1
  230. package/dist/lib/node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.mjs +0 -2
  231. package/dist/lib/node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.mjs.map +0 -1
  232. package/dist/lib/node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.mjs +0 -2
  233. package/dist/lib/node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.mjs.map +0 -1
  234. package/dist/lib/node_modules/date-fns/esm/_lib/startOfUTCWeek/index.mjs +0 -2
  235. package/dist/lib/node_modules/date-fns/esm/_lib/startOfUTCWeek/index.mjs.map +0 -1
  236. package/dist/lib/node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.mjs +0 -2
  237. package/dist/lib/node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.mjs.map +0 -1
  238. package/dist/lib/node_modules/date-fns/esm/_lib/toInteger/index.mjs +0 -2
  239. package/dist/lib/node_modules/date-fns/esm/_lib/toInteger/index.mjs.map +0 -1
  240. package/dist/lib/node_modules/date-fns/esm/addMilliseconds/index.mjs +0 -2
  241. package/dist/lib/node_modules/date-fns/esm/addMilliseconds/index.mjs.map +0 -1
  242. package/dist/lib/node_modules/date-fns/esm/format/index.mjs +0 -2
  243. package/dist/lib/node_modules/date-fns/esm/format/index.mjs.map +0 -1
  244. package/dist/lib/node_modules/date-fns/esm/isDate/index.mjs +0 -2
  245. package/dist/lib/node_modules/date-fns/esm/isDate/index.mjs.map +0 -1
  246. package/dist/lib/node_modules/date-fns/esm/isValid/index.mjs +0 -2
  247. package/dist/lib/node_modules/date-fns/esm/isValid/index.mjs.map +0 -1
  248. package/dist/lib/node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.mjs +0 -2
  249. package/dist/lib/node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.mjs.map +0 -1
  250. package/dist/lib/node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.mjs +0 -2
  251. package/dist/lib/node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.mjs.map +0 -1
  252. package/dist/lib/node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.mjs +0 -2
  253. package/dist/lib/node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.mjs.map +0 -1
  254. package/dist/lib/node_modules/date-fns/esm/locale/en-US/_lib/localize/index.mjs +0 -2
  255. package/dist/lib/node_modules/date-fns/esm/locale/en-US/_lib/localize/index.mjs.map +0 -1
  256. package/dist/lib/node_modules/date-fns/esm/locale/en-US/_lib/match/index.mjs +0 -2
  257. package/dist/lib/node_modules/date-fns/esm/locale/en-US/_lib/match/index.mjs.map +0 -1
  258. package/dist/lib/node_modules/date-fns/esm/locale/en-US/index.mjs +0 -2
  259. package/dist/lib/node_modules/date-fns/esm/locale/en-US/index.mjs.map +0 -1
  260. package/dist/lib/node_modules/date-fns/esm/subMilliseconds/index.mjs +0 -2
  261. package/dist/lib/node_modules/date-fns/esm/subMilliseconds/index.mjs.map +0 -1
  262. package/dist/lib/node_modules/date-fns/esm/toDate/index.mjs +0 -2
  263. package/dist/lib/node_modules/date-fns/esm/toDate/index.mjs.map +0 -1
@@ -0,0 +1,2 @@
1
+ import{__exports as e}from"../../../../_virtual/plugin30.mjs";var t;function o(){return t||(t=1,function(){var e=tinymce.util.Tools.resolve("tinymce.PluginManager");let t=0;const o=e=>t=>typeof t===e,r=(e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,r=(s=String).prototype,r.isPrototypeOf(o)||(null===(a=n.constructor)||void 0===a?void 0:a.name)===s.name)?"string":t;var o,r;var n,s,a})(t)===e)("string"),n=o("boolean"),s=e=>null==e,a=e=>!s(e),i=o("function"),l=o("number"),d=e=>()=>e,c=(e,t)=>e===t,m=d(!1);class u{constructor(e,t){this.tag=e,this.value=t}static some(e){return new u(!0,e)}static none(){return u.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?u.some(e(this.value)):u.none()}bind(e){return this.tag?e(this.value):u.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:u.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return a(e)?u.some(e):u.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}u.singletonNone=new u(!1);const p=Array.prototype.indexOf,g=(e,t)=>{return o=e,r=t,p.call(o,r)>-1;var o,r},h=(e,t)=>{const o=e.length,r=new Array(o);for(let n=0;n<o;n++){const o=e[n];r[n]=t(o,n)}return r},f=(e,t)=>{for(let o=0,r=e.length;o<r;o++){t(e[o],o)}},y=Object.keys;"undefined"!=typeof window?window:Function("return this;")();const v=e=>e.dom.nodeName.toLowerCase(),w=e=>e.dom.nodeType,b=e=>t=>w(t)===e,N=e=>8===w(e)||"#comment"===v(e),T=b(1),A=b(3),C=b(9),S=b(11),x=(e,t,o)=>{if(!(r(o)||n(o)||l(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")},E=(e,t,o)=>{x(e.dom,t,o)},D=(e,t)=>{const o=e.dom;((e,t)=>{const o=y(e);for(let r=0,n=o.length;r<n;r++){const n=o[r];t(e[n],n)}})(t,((e,t)=>{x(o,t,e)}))},M=(e,t)=>{const o=e.dom.getAttribute(t);return null===o?void 0:o},P=(e,t)=>u.from(M(e,t)),O=(e,t)=>{e.dom.removeAttribute(t)},k=e=>{return t=e.dom.attributes,o=(e,t)=>(e[t.name]=t.value,e),r={},f(t,((e,t)=>{r=o(r,e,t)})),r;var t,o,r},B=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},R={fromHtml:(e,t)=>{const o=(t||document).createElement("div");if(o.innerHTML=e,!o.hasChildNodes()||o.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return B(o.childNodes[0])},fromTag:(e,t)=>{const o=(t||document).createElement(e);return B(o)},fromText:(e,t)=>{const o=(t||document).createTextNode(e);return B(o)},fromDom:B,fromPoint:(e,t,o)=>u.from(e.dom.elementFromPoint(t,o)).map(B)},L=(e,t)=>{const o=e.dom;if(1!==o.nodeType)return!1;{const e=o;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},$=e=>1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType||0===e.childElementCount,j=(e,t)=>e.dom===t.dom,q=L,I=(V=/^\s+|\s+$/g,e=>e.replace(V,""));var V;const _=e=>void 0!==e.style&&i(e.style.getPropertyValue),F=e=>{return C(e)?e:(t=e,R.fromDom(t.dom.ownerDocument));var t},H=e=>u.from(e.dom.parentNode).map(R.fromDom),z=(e,t)=>{const o=i(t)?t:m;let r=e.dom;const n=[];for(;null!==r.parentNode&&void 0!==r.parentNode;){const e=r.parentNode,t=R.fromDom(e);if(n.push(t),!0===o(t))break;r=e}return n},K=e=>u.from(e.dom.previousSibling).map(R.fromDom),U=e=>u.from(e.dom.nextSibling).map(R.fromDom),Y=e=>h(e.dom.childNodes,R.fromDom),G=e=>((e,t)=>{const o=e.dom.childNodes;return u.from(o[t]).map(R.fromDom)})(e,0),J=i(Element.prototype.attachShadow)&&i(Node.prototype.getRootNode)?e=>R.fromDom(e.dom.getRootNode()):F,Q=e=>{const t=J(e);return S(o=t)&&a(o.dom.host)?u.some(t):u.none();var o},W=e=>R.fromDom(e.dom.host),X=e=>{const t=A(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const o=t.ownerDocument;return Q(R.fromDom(t)).fold((()=>o.body.contains(t)),(r=X,n=W,e=>r(n(e))));var r,n},Z=(e,t,o)=>{((e,t,o)=>{if(!r(o))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",o,":: Element ",e),new Error("CSS value must be a string: "+o);_(e)&&e.style.setProperty(t,o)})(e.dom,t,o)},ee=(e,t)=>{const o=e.dom,r=window.getComputedStyle(o).getPropertyValue(t);return""!==r||X(e)?r:te(o,t)},te=(e,t)=>_(e)?e.style.getPropertyValue(t):"",oe=(e,t)=>{const o=e.dom,r=te(o,t);return u.from(r).filter((e=>e.length>0))},re=(e,t)=>{((e,t)=>{_(e)&&e.style.removeProperty(t)})(e.dom,t),((e,t,o=c)=>e.exists((e=>o(e,t))))(P(e,"style").map(I),"")&&O(e,"style")},ne=(e,t)=>{H(e).each((o=>{o.dom.insertBefore(t.dom,e.dom)}))},se=(e,t)=>{U(e).fold((()=>{H(e).each((e=>{ie(e,t)}))}),(e=>{ne(e,t)}))},ae=(e,t)=>{G(e).fold((()=>{ie(e,t)}),(o=>{e.dom.insertBefore(t.dom,o.dom)}))},ie=(e,t)=>{e.dom.appendChild(t.dom)},le=(e,t)=>{ne(e,t),ie(t,e)},de=(e,t)=>{f(t,((o,r)=>{const n=0===r?e:t[r-1];se(n,o)}))},ce=(e,t)=>{f(t,(t=>{ie(e,t)}))},me=(e,t)=>{let o=[];return f(Y(e),(e=>{t(e)&&(o=o.concat([e])),o=o.concat(me(e,t))})),o};const ue=(e,t,o)=>{let r=e.dom;const n=i(o)?o:m;for(;r.parentNode;){r=r.parentNode;const e=R.fromDom(r);if(t(e))return u.some(e);if(n(e))break}return u.none()},pe=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},ge=e=>{const t=Y(e);t.length>0&&de(e,t),pe(e)},he=(e,t)=>((e,t)=>{const o=void 0===t?document:t.dom;return $(o)?[]:h(o.querySelectorAll(e),R.fromDom)})(t,e),fe=(e,t,o)=>ue(e,(e=>L(e,t)),o),ye=(e,t)=>((e,t)=>{const o=void 0===t?document:t.dom;return $(o)?u.none():u.from(o.querySelector(e)).map(R.fromDom)})(t,e),ve=(e,t,o)=>((e,t,o,r,n)=>e(o,r)?u.some(o):i(n)&&n(o)?u.none():t(o,r,n))(((e,t)=>L(e,t)),fe,e,t,o),we=((e,t)=>{const o=t=>e(t)?u.from(t.dom.nodeValue):u.none();return{get:r=>{if(!e(r))throw new Error("Can only get "+t+" value of a "+t+" node");return o(r).getOr("")},getOption:o,set:(o,r)=>{if(!e(o))throw new Error("Can only set raw "+t+" value of a "+t+" node");o.dom.nodeValue=r}}})(A,"text"),be=e=>we.get(e),Ne=(e,t)=>we.set(e,t);var Te=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"];const Ae=(e,t)=>({element:e,offset:t}),Ce=(e,t,o)=>e.property().isText(t)&&0===e.property().getText(t).trim().length||e.property().isComment(t)?o(t).bind((t=>Ce(e,t,o).orThunk((()=>u.some(t))))):u.none(),Se=(e,t)=>{if(e.property().isText(t))return e.property().getText(t).length;return e.property().children(t).length},xe=(e,t)=>{const o=Ce(e,t,e.query().prevSibling).getOr(t);if(e.property().isText(o))return Ae(o,Se(e,o));const r=e.property().children(o);return r.length>0?xe(e,r[r.length-1]):Ae(o,Se(e,o))},Ee=xe,De={up:d({selector:fe,closest:ve,predicate:ue,all:z}),down:d({selector:he,predicate:me}),styles:d({get:ee,getRaw:oe,set:Z,remove:re}),attrs:d({get:M,set:E,remove:O,copyTo:(e,t)=>{const o=k(e);D(t,o)}}),insert:d({before:ne,after:se,afterAll:de,append:ie,appendAll:ce,prepend:ae,wrap:le}),remove:d({unwrap:ge,remove:pe}),create:d({nu:R.fromTag,clone:e=>R.fromDom(e.dom.cloneNode(!1)),text:R.fromText}),query:d({comparePosition:(e,t)=>e.dom.compareDocumentPosition(t.dom),prevSibling:K,nextSibling:U}),property:d({children:Y,name:v,parent:H,document:e=>F(e).dom,isText:A,isComment:N,isElement:T,isSpecial:e=>{const t=v(e);return g(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],t)},getLanguage:e=>T(e)?P(e,"lang"):u.none(),getText:be,setText:Ne,isBoundary:e=>!!T(e)&&("body"===v(e)||g(Te,v(e))),isEmptyTag:e=>!!T(e)&&g(["br","img","hr","input"],v(e)),isNonEditable:e=>T(e)&&"false"===M(e,"contenteditable")}),eq:j,is:q},Me="details",Pe="mce-accordion",Oe="mce-accordion-summary",ke="mce-accordion-body",Be="div";var Re=tinymce.util.Tools.resolve("tinymce.util.Tools");const Le=e=>"SUMMARY"===(null==e?void 0:e.nodeName),$e=e=>"DETAILS"===(null==e?void 0:e.nodeName),je=e=>e.hasAttribute("open"),qe=e=>{const t=e.selection.getNode();return Le(t)||Boolean(e.dom.getParent(t,Le))},Ie=e=>!qe(e)&&e.dom.isEditable(e.selection.getNode()),Ve=e=>u.from(e.dom.getParent(e.selection.getNode(),$e)),_e=e=>(e.innerHTML='<br data-mce-bogus="1" />',e),Fe=e=>_e(e.dom.create("p")),He=(e,t)=>{if(!Le(null==t?void 0:t.firstChild)){const o=(e=>_e(e.dom.create("summary")))(e);t.prepend(o),e.selection.setCursorLocation(o,0)}},ze=e=>t=>{((e,t)=>{if(Le(null==t?void 0:t.lastChild)){const o=Fe(e);t.appendChild(o),e.selection.setCursorLocation(o,0)}})(e,t),He(e,t)},Ke=e=>{if(!Ie(e))return;const o=R.fromDom(e.getBody()),r=(e=>{const o=(new Date).getTime(),r=Math.floor(1e9*Math.random());return t++,e+"_"+r+t+String(o)})("acc"),n=e.dom.encode(e.selection.getRng().toString()||e.translate("Accordion summary...")),s=e.dom.encode(e.translate("Accordion body...")),a=`<summary class="${Oe}">${n}</summary>`,i=`<${Be} class="${ke}"><p>${s}</p></${Be}>`;e.undoManager.transact((()=>{e.insertContent([`<details data-mce-id="${r}" class="${Pe}" open="open">`,a,i,"</details>"].join("")),ye(o,`[data-mce-id="${r}"]`).each((t=>{O(t,"data-mce-id"),ye(t,"summary").each((t=>{const o=e.dom.createRng(),r=Ee(De,t);o.setStart(r.element.dom,r.offset),o.setEnd(r.element.dom,r.offset),e.selection.setRng(o)}))}))}))},Ue=(e,t)=>{const o=null!=t?t:!je(e);return o?e.setAttribute("open","open"):e.removeAttribute("open"),o},Ye=e=>{Ve(e).each((t=>{const{nextSibling:o}=t;o?(e.selection.select(o,!0),e.selection.collapse(!0)):((e,t)=>{const o=Fe(e);t.insertAdjacentElement("afterend",o),e.selection.setCursorLocation(o,0)})(e,t),t.remove()}))},Ge=e=>{e.addCommand("InsertAccordion",(()=>Ke(e))),e.addCommand("ToggleAccordion",((t,o)=>((e,t)=>{Ve(e).each((o=>{((e,t,o)=>{e.dispatch("ToggledAccordion",{element:t,state:o})})(e,o,Ue(o,t))}))})(e,o))),e.addCommand("ToggleAllAccordions",((t,o)=>((e,t)=>{const o=Array.from(e.getBody().querySelectorAll("details"));0!==o.length&&(f(o,(e=>Ue(e,null!=t?t:!je(e)))),((e,t,o)=>{e.dispatch("ToggledAllAccordions",{elements:t,state:o})})(e,o,t))})(e,o))),e.addCommand("RemoveAccordion",(()=>Ye(e)))};var Je=tinymce.util.Tools.resolve("tinymce.html.Node");const Qe=e=>{var t,o;return null!==(o=null===(t=e.attr("class"))||void 0===t?void 0:t.split(" "))&&void 0!==o?o:[]},We=(e,t)=>{const o=new Set([...Qe(e),...t]),r=Array.from(o);r.length>0&&e.attr("class",r.join(" "))},Xe=(e,t)=>{const o=((e,t)=>{const o=[];for(let r=0,n=e.length;r<n;r++){const n=e[r];t(n,r)&&o.push(n)}return o})(Qe(e),(e=>!t.has(e)));e.attr("class",o.length>0?o.join(" "):null)},Ze=e=>e.name===Me&&g(Qe(e),Pe),et=e=>{const t=e.children();let o,r;const n=[];for(let e=0;e<t.length;e++){const i=t[e];"summary"===i.name&&s(o)?o=i:(a=i).name===Be&&g(Qe(a),ke)&&s(r)?r=i:n.push(i)}var a;return{summaryNode:o,wrapperNode:r,otherNodes:n}},tt=e=>{const t=new Je("br",1);t.attr("data-mce-bogus","1"),e.empty(),e.append(t)};var ot=tinymce.util.Tools.resolve("tinymce.util.VK");const rt=e=>{e.on("keydown",(t=>{(!t.shiftKey&&t.keyCode===ot.ENTER&&qe(e)||(e=>{const t=e.selection.getRng();return $e(t.startContainer)&&t.collapsed&&0===t.startOffset})(e))&&(t.preventDefault(),e.execCommand("ToggleAccordion"))}))},nt=e=>{rt(e),e.on("ExecCommand",(t=>{const o=t.command.toLowerCase();"delete"!==o&&"forwarddelete"!==o||!(e=>Ve(e).isSome())(e)||(e=>{Re.each(Re.grep(e.dom.select("details",e.getBody())),ze(e))})(e)}))};var st=tinymce.util.Tools.resolve("tinymce.Env");const at=e=>t=>{const o=()=>t.setEnabled(Ie(e));return e.on("NodeChange",o),()=>e.off("NodeChange",o)};e.add("accordion",(e=>{(e=>{const t=()=>e.execCommand("InsertAccordion");e.ui.registry.addButton("accordion",{icon:"accordion",tooltip:"Insert accordion",onSetup:at(e),onAction:t}),e.ui.registry.addMenuItem("accordion",{icon:"accordion",text:"Accordion",onSetup:at(e),onAction:t}),e.ui.registry.addToggleButton("accordiontoggle",{icon:"accordion-toggle",tooltip:"Toggle accordion",onAction:()=>e.execCommand("ToggleAccordion")}),e.ui.registry.addToggleButton("accordionremove",{icon:"remove",tooltip:"Delete accordion",onAction:()=>e.execCommand("RemoveAccordion")}),e.ui.registry.addContextToolbar("accordion",{predicate:t=>e.dom.is(t,"details")&&e.getBody().contains(t)&&e.dom.isEditable(t.parentNode),items:"accordiontoggle accordionremove",scope:"node",position:"node"})})(e),Ge(e),nt(e),(e=>{e.on("PreInit",(()=>{const{serializer:t,parser:o}=e;o.addNodeFilter(Me,(e=>{for(let t=0;t<e.length;t++){const o=e[t];if(Ze(o)){const e=o,{summaryNode:t,wrapperNode:r,otherNodes:n}=et(e),i=a(t),l=i?t:new Je("summary",1);s(l.firstChild)&&tt(l),We(l,[Oe]),i||(a(e.firstChild)?e.insert(l,e.firstChild,!0):e.append(l));const d=a(r),c=d?r:new Je(Be,1);if(c.attr("data-mce-bogus","1"),We(c,[ke]),n.length>0)for(let e=0;e<n.length;e++){const t=n[e];c.append(t)}if(s(c.firstChild)){const e=new Je("p",1);tt(e),c.append(e)}d||e.append(c)}}})),t.addNodeFilter(Me,(e=>{const t=new Set([Oe]);for(let o=0;o<e.length;o++){const r=e[o];if(Ze(r)){const e=r,{summaryNode:o,wrapperNode:n}=et(e);a(o)&&Xe(o,t),a(n)&&n.unwrap()}}}))}))})(e),(e=>{st.browser.isSafari()&&e.on("click",(t=>{if(Le(t.target)){const o=t.target,r=e.selection.getRng();r.collapsed&&r.startContainer===o.parentNode&&0===r.startOffset&&e.selection.setCursorLocation(o,0)}}))})(e)}))}()),e}export{o as __require};
2
+ //# sourceMappingURL=plugin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.mjs","sources":["../../../../../../node_modules/tinymce/plugins/accordion/plugin.js"],"sourcesContent":["/**\n * TinyMCE version 6.8.5 (TBD)\n */\n\n(function () {\n 'use strict';\n\n var global$4 = tinymce.util.Tools.resolve('tinymce.PluginManager');\n\n let unique = 0;\n const generate = prefix => {\n const date = new Date();\n const time = date.getTime();\n const random = Math.floor(Math.random() * 1000000000);\n unique++;\n return prefix + '_' + random + unique + String(time);\n };\n\n const hasProto = (v, constructor, predicate) => {\n var _a;\n if (predicate(v, constructor.prototype)) {\n return true;\n } else {\n return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;\n }\n };\n const typeOf = x => {\n const t = typeof x;\n if (x === null) {\n return 'null';\n } else if (t === 'object' && Array.isArray(x)) {\n return 'array';\n } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {\n return 'string';\n } else {\n return t;\n }\n };\n const isType$1 = type => value => typeOf(value) === type;\n const isSimpleType = type => value => typeof value === type;\n const isString = isType$1('string');\n const isBoolean = isSimpleType('boolean');\n const isNullable = a => a === null || a === undefined;\n const isNonNullable = a => !isNullable(a);\n const isFunction = isSimpleType('function');\n const isNumber = isSimpleType('number');\n\n const compose1 = (fbc, fab) => a => fbc(fab(a));\n const constant = value => {\n return () => {\n return value;\n };\n };\n const tripleEquals = (a, b) => {\n return a === b;\n };\n const never = constant(false);\n\n class Optional {\n constructor(tag, value) {\n this.tag = tag;\n this.value = value;\n }\n static some(value) {\n return new Optional(true, value);\n }\n static none() {\n return Optional.singletonNone;\n }\n fold(onNone, onSome) {\n if (this.tag) {\n return onSome(this.value);\n } else {\n return onNone();\n }\n }\n isSome() {\n return this.tag;\n }\n isNone() {\n return !this.tag;\n }\n map(mapper) {\n if (this.tag) {\n return Optional.some(mapper(this.value));\n } else {\n return Optional.none();\n }\n }\n bind(binder) {\n if (this.tag) {\n return binder(this.value);\n } else {\n return Optional.none();\n }\n }\n exists(predicate) {\n return this.tag && predicate(this.value);\n }\n forall(predicate) {\n return !this.tag || predicate(this.value);\n }\n filter(predicate) {\n if (!this.tag || predicate(this.value)) {\n return this;\n } else {\n return Optional.none();\n }\n }\n getOr(replacement) {\n return this.tag ? this.value : replacement;\n }\n or(replacement) {\n return this.tag ? this : replacement;\n }\n getOrThunk(thunk) {\n return this.tag ? this.value : thunk();\n }\n orThunk(thunk) {\n return this.tag ? this : thunk();\n }\n getOrDie(message) {\n if (!this.tag) {\n throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');\n } else {\n return this.value;\n }\n }\n static from(value) {\n return isNonNullable(value) ? Optional.some(value) : Optional.none();\n }\n getOrNull() {\n return this.tag ? this.value : null;\n }\n getOrUndefined() {\n return this.value;\n }\n each(worker) {\n if (this.tag) {\n worker(this.value);\n }\n }\n toArray() {\n return this.tag ? [this.value] : [];\n }\n toString() {\n return this.tag ? `some(${ this.value })` : 'none()';\n }\n }\n Optional.singletonNone = new Optional(false);\n\n const nativeIndexOf = Array.prototype.indexOf;\n const rawIndexOf = (ts, t) => nativeIndexOf.call(ts, t);\n const contains = (xs, x) => rawIndexOf(xs, x) > -1;\n const map = (xs, f) => {\n const len = xs.length;\n const r = new Array(len);\n for (let i = 0; i < len; i++) {\n const x = xs[i];\n r[i] = f(x, i);\n }\n return r;\n };\n const each$1 = (xs, f) => {\n for (let i = 0, len = xs.length; i < len; i++) {\n const x = xs[i];\n f(x, i);\n }\n };\n const filter = (xs, pred) => {\n const r = [];\n for (let i = 0, len = xs.length; i < len; i++) {\n const x = xs[i];\n if (pred(x, i)) {\n r.push(x);\n }\n }\n return r;\n };\n const foldl = (xs, f, acc) => {\n each$1(xs, (x, i) => {\n acc = f(acc, x, i);\n });\n return acc;\n };\n\n const keys = Object.keys;\n const each = (obj, f) => {\n const props = keys(obj);\n for (let k = 0, len = props.length; k < len; k++) {\n const i = props[k];\n const x = obj[i];\n f(x, i);\n }\n };\n\n typeof window !== 'undefined' ? window : Function('return this;')();\n\n const COMMENT = 8;\n const DOCUMENT = 9;\n const DOCUMENT_FRAGMENT = 11;\n const ELEMENT = 1;\n const TEXT = 3;\n\n const name = element => {\n const r = element.dom.nodeName;\n return r.toLowerCase();\n };\n const type = element => element.dom.nodeType;\n const isType = t => element => type(element) === t;\n const isComment = element => type(element) === COMMENT || name(element) === '#comment';\n const isElement = isType(ELEMENT);\n const isText = isType(TEXT);\n const isDocument = isType(DOCUMENT);\n const isDocumentFragment = isType(DOCUMENT_FRAGMENT);\n\n const rawSet = (dom, key, value) => {\n if (isString(value) || isBoolean(value) || isNumber(value)) {\n dom.setAttribute(key, value + '');\n } else {\n console.error('Invalid call to Attribute.set. Key ', key, ':: Value ', value, ':: Element ', dom);\n throw new Error('Attribute value was not simple');\n }\n };\n const set$2 = (element, key, value) => {\n rawSet(element.dom, key, value);\n };\n const setAll = (element, attrs) => {\n const dom = element.dom;\n each(attrs, (v, k) => {\n rawSet(dom, k, v);\n });\n };\n const get$2 = (element, key) => {\n const v = element.dom.getAttribute(key);\n return v === null ? undefined : v;\n };\n const getOpt = (element, key) => Optional.from(get$2(element, key));\n const remove$2 = (element, key) => {\n element.dom.removeAttribute(key);\n };\n const clone = element => foldl(element.dom.attributes, (acc, attr) => {\n acc[attr.name] = attr.value;\n return acc;\n }, {});\n\n const fromHtml = (html, scope) => {\n const doc = scope || document;\n const div = doc.createElement('div');\n div.innerHTML = html;\n if (!div.hasChildNodes() || div.childNodes.length > 1) {\n const message = 'HTML does not have a single root node';\n console.error(message, html);\n throw new Error(message);\n }\n return fromDom(div.childNodes[0]);\n };\n const fromTag = (tag, scope) => {\n const doc = scope || document;\n const node = doc.createElement(tag);\n return fromDom(node);\n };\n const fromText = (text, scope) => {\n const doc = scope || document;\n const node = doc.createTextNode(text);\n return fromDom(node);\n };\n const fromDom = node => {\n if (node === null || node === undefined) {\n throw new Error('Node cannot be null or undefined');\n }\n return { dom: node };\n };\n const fromPoint = (docElm, x, y) => Optional.from(docElm.dom.elementFromPoint(x, y)).map(fromDom);\n const SugarElement = {\n fromHtml,\n fromTag,\n fromText,\n fromDom,\n fromPoint\n };\n\n const is$2 = (element, selector) => {\n const dom = element.dom;\n if (dom.nodeType !== ELEMENT) {\n return false;\n } else {\n const elem = dom;\n if (elem.matches !== undefined) {\n return elem.matches(selector);\n } else if (elem.msMatchesSelector !== undefined) {\n return elem.msMatchesSelector(selector);\n } else if (elem.webkitMatchesSelector !== undefined) {\n return elem.webkitMatchesSelector(selector);\n } else if (elem.mozMatchesSelector !== undefined) {\n return elem.mozMatchesSelector(selector);\n } else {\n throw new Error('Browser lacks native selectors');\n }\n }\n };\n const bypassSelector = dom => dom.nodeType !== ELEMENT && dom.nodeType !== DOCUMENT && dom.nodeType !== DOCUMENT_FRAGMENT || dom.childElementCount === 0;\n const all = (selector, scope) => {\n const base = scope === undefined ? document : scope.dom;\n return bypassSelector(base) ? [] : map(base.querySelectorAll(selector), SugarElement.fromDom);\n };\n const one = (selector, scope) => {\n const base = scope === undefined ? document : scope.dom;\n return bypassSelector(base) ? Optional.none() : Optional.from(base.querySelector(selector)).map(SugarElement.fromDom);\n };\n\n const eq = (e1, e2) => e1.dom === e2.dom;\n const is$1 = is$2;\n\n const is = (lhs, rhs, comparator = tripleEquals) => lhs.exists(left => comparator(left, rhs));\n\n const blank = r => s => s.replace(r, '');\n const trim = blank(/^\\s+|\\s+$/g);\n\n const isSupported = dom => dom.style !== undefined && isFunction(dom.style.getPropertyValue);\n\n const owner = element => SugarElement.fromDom(element.dom.ownerDocument);\n const documentOrOwner = dos => isDocument(dos) ? dos : owner(dos);\n const parent = element => Optional.from(element.dom.parentNode).map(SugarElement.fromDom);\n const parents = (element, isRoot) => {\n const stop = isFunction(isRoot) ? isRoot : never;\n let dom = element.dom;\n const ret = [];\n while (dom.parentNode !== null && dom.parentNode !== undefined) {\n const rawParent = dom.parentNode;\n const p = SugarElement.fromDom(rawParent);\n ret.push(p);\n if (stop(p) === true) {\n break;\n } else {\n dom = rawParent;\n }\n }\n return ret;\n };\n const prevSibling = element => Optional.from(element.dom.previousSibling).map(SugarElement.fromDom);\n const nextSibling = element => Optional.from(element.dom.nextSibling).map(SugarElement.fromDom);\n const children = element => map(element.dom.childNodes, SugarElement.fromDom);\n const child = (element, index) => {\n const cs = element.dom.childNodes;\n return Optional.from(cs[index]).map(SugarElement.fromDom);\n };\n const firstChild = element => child(element, 0);\n\n const isShadowRoot = dos => isDocumentFragment(dos) && isNonNullable(dos.dom.host);\n const supported = isFunction(Element.prototype.attachShadow) && isFunction(Node.prototype.getRootNode);\n const getRootNode = supported ? e => SugarElement.fromDom(e.dom.getRootNode()) : documentOrOwner;\n const getShadowRoot = e => {\n const r = getRootNode(e);\n return isShadowRoot(r) ? Optional.some(r) : Optional.none();\n };\n const getShadowHost = e => SugarElement.fromDom(e.dom.host);\n\n const inBody = element => {\n const dom = isText(element) ? element.dom.parentNode : element.dom;\n if (dom === undefined || dom === null || dom.ownerDocument === null) {\n return false;\n }\n const doc = dom.ownerDocument;\n return getShadowRoot(SugarElement.fromDom(dom)).fold(() => doc.body.contains(dom), compose1(inBody, getShadowHost));\n };\n\n const internalSet = (dom, property, value) => {\n if (!isString(value)) {\n console.error('Invalid call to CSS.set. Property ', property, ':: Value ', value, ':: Element ', dom);\n throw new Error('CSS value must be a string: ' + value);\n }\n if (isSupported(dom)) {\n dom.style.setProperty(property, value);\n }\n };\n const internalRemove = (dom, property) => {\n if (isSupported(dom)) {\n dom.style.removeProperty(property);\n }\n };\n const set$1 = (element, property, value) => {\n const dom = element.dom;\n internalSet(dom, property, value);\n };\n const get$1 = (element, property) => {\n const dom = element.dom;\n const styles = window.getComputedStyle(dom);\n const r = styles.getPropertyValue(property);\n return r === '' && !inBody(element) ? getUnsafeProperty(dom, property) : r;\n };\n const getUnsafeProperty = (dom, property) => isSupported(dom) ? dom.style.getPropertyValue(property) : '';\n const getRaw = (element, property) => {\n const dom = element.dom;\n const raw = getUnsafeProperty(dom, property);\n return Optional.from(raw).filter(r => r.length > 0);\n };\n const remove$1 = (element, property) => {\n const dom = element.dom;\n internalRemove(dom, property);\n if (is(getOpt(element, 'style').map(trim), '')) {\n remove$2(element, 'style');\n }\n };\n\n const before = (marker, element) => {\n const parent$1 = parent(marker);\n parent$1.each(v => {\n v.dom.insertBefore(element.dom, marker.dom);\n });\n };\n const after$1 = (marker, element) => {\n const sibling = nextSibling(marker);\n sibling.fold(() => {\n const parent$1 = parent(marker);\n parent$1.each(v => {\n append$1(v, element);\n });\n }, v => {\n before(v, element);\n });\n };\n const prepend = (parent, element) => {\n const firstChild$1 = firstChild(parent);\n firstChild$1.fold(() => {\n append$1(parent, element);\n }, v => {\n parent.dom.insertBefore(element.dom, v.dom);\n });\n };\n const append$1 = (parent, element) => {\n parent.dom.appendChild(element.dom);\n };\n const wrap = (element, wrapper) => {\n before(element, wrapper);\n append$1(wrapper, element);\n };\n\n const after = (marker, elements) => {\n each$1(elements, (x, i) => {\n const e = i === 0 ? marker : elements[i - 1];\n after$1(e, x);\n });\n };\n const append = (parent, elements) => {\n each$1(elements, x => {\n append$1(parent, x);\n });\n };\n\n const descendants$1 = (scope, predicate) => {\n let result = [];\n each$1(children(scope), x => {\n if (predicate(x)) {\n result = result.concat([x]);\n }\n result = result.concat(descendants$1(x, predicate));\n });\n return result;\n };\n\n var ClosestOrAncestor = (is, ancestor, scope, a, isRoot) => {\n if (is(scope, a)) {\n return Optional.some(scope);\n } else if (isFunction(isRoot) && isRoot(scope)) {\n return Optional.none();\n } else {\n return ancestor(scope, a, isRoot);\n }\n };\n\n const ancestor$1 = (scope, predicate, isRoot) => {\n let element = scope.dom;\n const stop = isFunction(isRoot) ? isRoot : never;\n while (element.parentNode) {\n element = element.parentNode;\n const el = SugarElement.fromDom(element);\n if (predicate(el)) {\n return Optional.some(el);\n } else if (stop(el)) {\n break;\n }\n }\n return Optional.none();\n };\n\n const remove = element => {\n const dom = element.dom;\n if (dom.parentNode !== null) {\n dom.parentNode.removeChild(dom);\n }\n };\n const unwrap = wrapper => {\n const children$1 = children(wrapper);\n if (children$1.length > 0) {\n after(wrapper, children$1);\n }\n remove(wrapper);\n };\n\n const descendants = (scope, selector) => all(selector, scope);\n\n const ancestor = (scope, selector, isRoot) => ancestor$1(scope, e => is$2(e, selector), isRoot);\n const descendant = (scope, selector) => one(selector, scope);\n const closest = (scope, selector, isRoot) => {\n const is = (element, selector) => is$2(element, selector);\n return ClosestOrAncestor(is, ancestor, scope, selector, isRoot);\n };\n\n const NodeValue = (is, name) => {\n const get = element => {\n if (!is(element)) {\n throw new Error('Can only get ' + name + ' value of a ' + name + ' node');\n }\n return getOption(element).getOr('');\n };\n const getOption = element => is(element) ? Optional.from(element.dom.nodeValue) : Optional.none();\n const set = (element, value) => {\n if (!is(element)) {\n throw new Error('Can only set raw ' + name + ' value of a ' + name + ' node');\n }\n element.dom.nodeValue = value;\n };\n return {\n get,\n getOption,\n set\n };\n };\n\n const api = NodeValue(isText, 'text');\n const get = element => api.get(element);\n const set = (element, value) => api.set(element, value);\n\n var TagBoundaries = [\n 'body',\n 'p',\n 'div',\n 'article',\n 'aside',\n 'figcaption',\n 'figure',\n 'footer',\n 'header',\n 'nav',\n 'section',\n 'ol',\n 'ul',\n 'li',\n 'table',\n 'thead',\n 'tbody',\n 'tfoot',\n 'caption',\n 'tr',\n 'td',\n 'th',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'blockquote',\n 'pre',\n 'address'\n ];\n\n var DomUniverse = () => {\n const clone$1 = element => {\n return SugarElement.fromDom(element.dom.cloneNode(false));\n };\n const document = element => documentOrOwner(element).dom;\n const isBoundary = element => {\n if (!isElement(element)) {\n return false;\n }\n if (name(element) === 'body') {\n return true;\n }\n return contains(TagBoundaries, name(element));\n };\n const isEmptyTag = element => {\n if (!isElement(element)) {\n return false;\n }\n return contains([\n 'br',\n 'img',\n 'hr',\n 'input'\n ], name(element));\n };\n const isNonEditable = element => isElement(element) && get$2(element, 'contenteditable') === 'false';\n const comparePosition = (element, other) => {\n return element.dom.compareDocumentPosition(other.dom);\n };\n const copyAttributesTo = (source, destination) => {\n const as = clone(source);\n setAll(destination, as);\n };\n const isSpecial = element => {\n const tag = name(element);\n return contains([\n 'script',\n 'noscript',\n 'iframe',\n 'noframes',\n 'noembed',\n 'title',\n 'style',\n 'textarea',\n 'xmp'\n ], tag);\n };\n const getLanguage = element => isElement(element) ? getOpt(element, 'lang') : Optional.none();\n return {\n up: constant({\n selector: ancestor,\n closest: closest,\n predicate: ancestor$1,\n all: parents\n }),\n down: constant({\n selector: descendants,\n predicate: descendants$1\n }),\n styles: constant({\n get: get$1,\n getRaw: getRaw,\n set: set$1,\n remove: remove$1\n }),\n attrs: constant({\n get: get$2,\n set: set$2,\n remove: remove$2,\n copyTo: copyAttributesTo\n }),\n insert: constant({\n before: before,\n after: after$1,\n afterAll: after,\n append: append$1,\n appendAll: append,\n prepend: prepend,\n wrap: wrap\n }),\n remove: constant({\n unwrap: unwrap,\n remove: remove\n }),\n create: constant({\n nu: SugarElement.fromTag,\n clone: clone$1,\n text: SugarElement.fromText\n }),\n query: constant({\n comparePosition,\n prevSibling: prevSibling,\n nextSibling: nextSibling\n }),\n property: constant({\n children: children,\n name: name,\n parent: parent,\n document,\n isText: isText,\n isComment: isComment,\n isElement: isElement,\n isSpecial,\n getLanguage,\n getText: get,\n setText: set,\n isBoundary,\n isEmptyTag,\n isNonEditable\n }),\n eq: eq,\n is: is$1\n };\n };\n\n const point = (element, offset) => ({\n element,\n offset\n });\n\n const scan = (universe, element, direction) => {\n if (universe.property().isText(element) && universe.property().getText(element).trim().length === 0 || universe.property().isComment(element)) {\n return direction(element).bind(elem => {\n return scan(universe, elem, direction).orThunk(() => {\n return Optional.some(elem);\n });\n });\n } else {\n return Optional.none();\n }\n };\n const toEnd = (universe, element) => {\n if (universe.property().isText(element)) {\n return universe.property().getText(element).length;\n }\n const children = universe.property().children(element);\n return children.length;\n };\n const freefallRtl$2 = (universe, element) => {\n const candidate = scan(universe, element, universe.query().prevSibling).getOr(element);\n if (universe.property().isText(candidate)) {\n return point(candidate, toEnd(universe, candidate));\n }\n const children = universe.property().children(candidate);\n return children.length > 0 ? freefallRtl$2(universe, children[children.length - 1]) : point(candidate, toEnd(universe, candidate));\n };\n\n const freefallRtl$1 = freefallRtl$2;\n\n const universe = DomUniverse();\n const freefallRtl = element => {\n return freefallRtl$1(universe, element);\n };\n\n const fireToggleAccordionEvent = (editor, element, state) => editor.dispatch('ToggledAccordion', {\n element,\n state\n });\n const fireToggleAllAccordionsEvent = (editor, elements, state) => editor.dispatch('ToggledAllAccordions', {\n elements,\n state\n });\n\n const accordionTag = 'details';\n const accordionDetailsClass = 'mce-accordion';\n const accordionSummaryClass = 'mce-accordion-summary';\n const accordionBodyWrapperClass = 'mce-accordion-body';\n const accordionBodyWrapperTag = 'div';\n\n var global$3 = tinymce.util.Tools.resolve('tinymce.util.Tools');\n\n const isSummary = node => (node === null || node === void 0 ? void 0 : node.nodeName) === 'SUMMARY';\n const isDetails = node => (node === null || node === void 0 ? void 0 : node.nodeName) === 'DETAILS';\n const isOpen = details => details.hasAttribute('open');\n const isInSummary = editor => {\n const node = editor.selection.getNode();\n return isSummary(node) || Boolean(editor.dom.getParent(node, isSummary));\n };\n const isAtDetailsStart = editor => {\n const rng = editor.selection.getRng();\n return isDetails(rng.startContainer) && rng.collapsed && rng.startOffset === 0;\n };\n const isInsertAllowed = editor => !isInSummary(editor) && editor.dom.isEditable(editor.selection.getNode());\n const getSelectedDetails = editor => Optional.from(editor.dom.getParent(editor.selection.getNode(), isDetails));\n const isDetailsSelected = editor => getSelectedDetails(editor).isSome();\n const insertBogus = element => {\n element.innerHTML = '<br data-mce-bogus=\"1\" />';\n return element;\n };\n const createParagraph = editor => insertBogus(editor.dom.create('p'));\n const createSummary = editor => insertBogus(editor.dom.create('summary'));\n const insertAndSelectParagraphAfter = (editor, target) => {\n const paragraph = createParagraph(editor);\n target.insertAdjacentElement('afterend', paragraph);\n editor.selection.setCursorLocation(paragraph, 0);\n };\n const normalizeContent = (editor, accordion) => {\n if (isSummary(accordion === null || accordion === void 0 ? void 0 : accordion.lastChild)) {\n const paragraph = createParagraph(editor);\n accordion.appendChild(paragraph);\n editor.selection.setCursorLocation(paragraph, 0);\n }\n };\n const normalizeSummary = (editor, accordion) => {\n if (!isSummary(accordion === null || accordion === void 0 ? void 0 : accordion.firstChild)) {\n const summary = createSummary(editor);\n accordion.prepend(summary);\n editor.selection.setCursorLocation(summary, 0);\n }\n };\n const normalizeAccordion = editor => accordion => {\n normalizeContent(editor, accordion);\n normalizeSummary(editor, accordion);\n };\n const normalizeDetails = editor => {\n global$3.each(global$3.grep(editor.dom.select('details', editor.getBody())), normalizeAccordion(editor));\n };\n\n const insertAccordion = editor => {\n if (!isInsertAllowed(editor)) {\n return;\n }\n const editorBody = SugarElement.fromDom(editor.getBody());\n const uid = generate('acc');\n const summaryText = editor.dom.encode(editor.selection.getRng().toString() || editor.translate('Accordion summary...'));\n const bodyText = editor.dom.encode(editor.translate('Accordion body...'));\n const accordionSummaryHtml = `<summary class=\"${ accordionSummaryClass }\">${ summaryText }</summary>`;\n const accordionBodyHtml = `<${ accordionBodyWrapperTag } class=\"${ accordionBodyWrapperClass }\"><p>${ bodyText }</p></${ accordionBodyWrapperTag }>`;\n editor.undoManager.transact(() => {\n editor.insertContent([\n `<details data-mce-id=\"${ uid }\" class=\"${ accordionDetailsClass }\" open=\"open\">`,\n accordionSummaryHtml,\n accordionBodyHtml,\n `</details>`\n ].join(''));\n descendant(editorBody, `[data-mce-id=\"${ uid }\"]`).each(detailsElm => {\n remove$2(detailsElm, 'data-mce-id');\n descendant(detailsElm, `summary`).each(summaryElm => {\n const rng = editor.dom.createRng();\n const des = freefallRtl(summaryElm);\n rng.setStart(des.element.dom, des.offset);\n rng.setEnd(des.element.dom, des.offset);\n editor.selection.setRng(rng);\n });\n });\n });\n };\n const toggleDetailsElement = (details, state) => {\n const shouldOpen = state !== null && state !== void 0 ? state : !isOpen(details);\n if (shouldOpen) {\n details.setAttribute('open', 'open');\n } else {\n details.removeAttribute('open');\n }\n return shouldOpen;\n };\n const toggleAccordion = (editor, state) => {\n getSelectedDetails(editor).each(details => {\n fireToggleAccordionEvent(editor, details, toggleDetailsElement(details, state));\n });\n };\n const removeAccordion = editor => {\n getSelectedDetails(editor).each(details => {\n const {nextSibling} = details;\n if (nextSibling) {\n editor.selection.select(nextSibling, true);\n editor.selection.collapse(true);\n } else {\n insertAndSelectParagraphAfter(editor, details);\n }\n details.remove();\n });\n };\n const toggleAllAccordions = (editor, state) => {\n const accordions = Array.from(editor.getBody().querySelectorAll('details'));\n if (accordions.length === 0) {\n return;\n }\n each$1(accordions, accordion => toggleDetailsElement(accordion, state !== null && state !== void 0 ? state : !isOpen(accordion)));\n fireToggleAllAccordionsEvent(editor, accordions, state);\n };\n\n const register$1 = editor => {\n editor.addCommand('InsertAccordion', () => insertAccordion(editor));\n editor.addCommand('ToggleAccordion', (_ui, value) => toggleAccordion(editor, value));\n editor.addCommand('ToggleAllAccordions', (_ui, value) => toggleAllAccordions(editor, value));\n editor.addCommand('RemoveAccordion', () => removeAccordion(editor));\n };\n\n var global$2 = tinymce.util.Tools.resolve('tinymce.html.Node');\n\n const getClassList = node => {\n var _a, _b;\n return (_b = (_a = node.attr('class')) === null || _a === void 0 ? void 0 : _a.split(' ')) !== null && _b !== void 0 ? _b : [];\n };\n const addClasses = (node, classes) => {\n const classListSet = new Set([\n ...getClassList(node),\n ...classes\n ]);\n const newClassList = Array.from(classListSet);\n if (newClassList.length > 0) {\n node.attr('class', newClassList.join(' '));\n }\n };\n const removeClasses = (node, classes) => {\n const newClassList = filter(getClassList(node), clazz => !classes.has(clazz));\n node.attr('class', newClassList.length > 0 ? newClassList.join(' ') : null);\n };\n const isAccordionDetailsNode = node => node.name === accordionTag && contains(getClassList(node), accordionDetailsClass);\n const isAccordionBodyWrapperNode = node => node.name === accordionBodyWrapperTag && contains(getClassList(node), accordionBodyWrapperClass);\n const getAccordionChildren = accordionNode => {\n const children = accordionNode.children();\n let summaryNode;\n let wrapperNode;\n const otherNodes = [];\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n if (child.name === 'summary' && isNullable(summaryNode)) {\n summaryNode = child;\n } else if (isAccordionBodyWrapperNode(child) && isNullable(wrapperNode)) {\n wrapperNode = child;\n } else {\n otherNodes.push(child);\n }\n }\n return {\n summaryNode,\n wrapperNode,\n otherNodes\n };\n };\n const padInputNode = node => {\n const br = new global$2('br', 1);\n br.attr('data-mce-bogus', '1');\n node.empty();\n node.append(br);\n };\n const setup$2 = editor => {\n editor.on('PreInit', () => {\n const {serializer, parser} = editor;\n parser.addNodeFilter(accordionTag, nodes => {\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n if (isAccordionDetailsNode(node)) {\n const accordionNode = node;\n const {summaryNode, wrapperNode, otherNodes} = getAccordionChildren(accordionNode);\n const hasSummaryNode = isNonNullable(summaryNode);\n const newSummaryNode = hasSummaryNode ? summaryNode : new global$2('summary', 1);\n if (isNullable(newSummaryNode.firstChild)) {\n padInputNode(newSummaryNode);\n }\n addClasses(newSummaryNode, [accordionSummaryClass]);\n if (!hasSummaryNode) {\n if (isNonNullable(accordionNode.firstChild)) {\n accordionNode.insert(newSummaryNode, accordionNode.firstChild, true);\n } else {\n accordionNode.append(newSummaryNode);\n }\n }\n const hasWrapperNode = isNonNullable(wrapperNode);\n const newWrapperNode = hasWrapperNode ? wrapperNode : new global$2(accordionBodyWrapperTag, 1);\n newWrapperNode.attr('data-mce-bogus', '1');\n addClasses(newWrapperNode, [accordionBodyWrapperClass]);\n if (otherNodes.length > 0) {\n for (let j = 0; j < otherNodes.length; j++) {\n const otherNode = otherNodes[j];\n newWrapperNode.append(otherNode);\n }\n }\n if (isNullable(newWrapperNode.firstChild)) {\n const pNode = new global$2('p', 1);\n padInputNode(pNode);\n newWrapperNode.append(pNode);\n }\n if (!hasWrapperNode) {\n accordionNode.append(newWrapperNode);\n }\n }\n }\n });\n serializer.addNodeFilter(accordionTag, nodes => {\n const summaryClassRemoveSet = new Set([accordionSummaryClass]);\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n if (isAccordionDetailsNode(node)) {\n const accordionNode = node;\n const {summaryNode, wrapperNode} = getAccordionChildren(accordionNode);\n if (isNonNullable(summaryNode)) {\n removeClasses(summaryNode, summaryClassRemoveSet);\n }\n if (isNonNullable(wrapperNode)) {\n wrapperNode.unwrap();\n }\n }\n }\n });\n });\n };\n\n var global$1 = tinymce.util.Tools.resolve('tinymce.util.VK');\n\n const setupEnterKeyInSummary = editor => {\n editor.on('keydown', event => {\n if (!event.shiftKey && event.keyCode === global$1.ENTER && isInSummary(editor) || isAtDetailsStart(editor)) {\n event.preventDefault();\n editor.execCommand('ToggleAccordion');\n }\n });\n };\n const setup$1 = editor => {\n setupEnterKeyInSummary(editor);\n editor.on('ExecCommand', e => {\n const cmd = e.command.toLowerCase();\n if ((cmd === 'delete' || cmd === 'forwarddelete') && isDetailsSelected(editor)) {\n normalizeDetails(editor);\n }\n });\n };\n\n var global = tinymce.util.Tools.resolve('tinymce.Env');\n\n const setup = editor => {\n if (global.browser.isSafari()) {\n editor.on('click', e => {\n if (isSummary(e.target)) {\n const summary = e.target;\n const rng = editor.selection.getRng();\n if (rng.collapsed && rng.startContainer === summary.parentNode && rng.startOffset === 0) {\n editor.selection.setCursorLocation(summary, 0);\n }\n }\n });\n }\n };\n\n const onSetup = editor => buttonApi => {\n const onNodeChange = () => buttonApi.setEnabled(isInsertAllowed(editor));\n editor.on('NodeChange', onNodeChange);\n return () => editor.off('NodeChange', onNodeChange);\n };\n const register = editor => {\n const onAction = () => editor.execCommand('InsertAccordion');\n editor.ui.registry.addButton('accordion', {\n icon: 'accordion',\n tooltip: 'Insert accordion',\n onSetup: onSetup(editor),\n onAction\n });\n editor.ui.registry.addMenuItem('accordion', {\n icon: 'accordion',\n text: 'Accordion',\n onSetup: onSetup(editor),\n onAction\n });\n editor.ui.registry.addToggleButton('accordiontoggle', {\n icon: 'accordion-toggle',\n tooltip: 'Toggle accordion',\n onAction: () => editor.execCommand('ToggleAccordion')\n });\n editor.ui.registry.addToggleButton('accordionremove', {\n icon: 'remove',\n tooltip: 'Delete accordion',\n onAction: () => editor.execCommand('RemoveAccordion')\n });\n editor.ui.registry.addContextToolbar('accordion', {\n predicate: accordion => editor.dom.is(accordion, 'details') && editor.getBody().contains(accordion) && editor.dom.isEditable(accordion.parentNode),\n items: 'accordiontoggle accordionremove',\n scope: 'node',\n position: 'node'\n });\n };\n\n var Plugin = () => {\n global$4.add('accordion', editor => {\n register(editor);\n register$1(editor);\n setup$1(editor);\n setup$2(editor);\n setup(editor);\n });\n };\n\n Plugin();\n\n})();\n"],"names":["global$4","tinymce","util","Tools","resolve","unique","isSimpleType","type","value","isString","x","t","Array","isArray","o","v","proto","constructor","String","prototype","isPrototypeOf","_a","name","typeOf","isType$1","isBoolean","isNullable","a","isNonNullable","isFunction","isNumber","constant","tripleEquals","b","never","Optional","tag","this","some","none","singletonNone","fold","onNone","onSome","isSome","isNone","map","mapper","bind","binder","exists","predicate","forall","filter","getOr","replacement","or","getOrThunk","thunk","orThunk","getOrDie","message","Error","from","getOrNull","getOrUndefined","each","worker","toArray","toString","nativeIndexOf","indexOf","contains","xs","rawIndexOf","ts","call","f","len","length","r","i","each$1","keys","Object","window","Function","element","dom","nodeName","toLowerCase","nodeType","isType","isComment","isElement","isText","isDocument","isDocumentFragment","rawSet","key","console","error","setAttribute","set$2","setAll","attrs","obj","props","k","get$2","getAttribute","undefined","getOpt","remove$2","removeAttribute","clone","foldl","attributes","acc","attr","fromDom","node","SugarElement","fromHtml","html","scope","div","document","createElement","innerHTML","hasChildNodes","childNodes","fromTag","fromText","text","createTextNode","fromPoint","docElm","y","elementFromPoint","is$2","selector","elem","matches","msMatchesSelector","webkitMatchesSelector","mozMatchesSelector","bypassSelector","childElementCount","eq","e1","e2","is$1","trim","s","replace","isSupported","style","getPropertyValue","documentOrOwner","dos","ownerDocument","parent","parentNode","parents","isRoot","stop","ret","rawParent","p","push","prevSibling","previousSibling","nextSibling","children","firstChild","index","cs","child","getRootNode","Element","attachShadow","Node","e","getShadowRoot","host","getShadowHost","inBody","doc","body","fbc","fab","set$1","property","setProperty","internalSet","get$1","getComputedStyle","getUnsafeProperty","getRaw","raw","remove$1","removeProperty","internalRemove","lhs","rhs","comparator","left","is","before","marker","insertBefore","after$1","append$1","prepend","appendChild","wrap","wrapper","after","elements","append","descendants$1","result","concat","ancestor$1","el","remove","removeChild","unwrap","children$1","descendants","base","querySelectorAll","all","ancestor","descendant","querySelector","one","closest","ClosestOrAncestor","api","getOption","nodeValue","get","set","NodeValue","TagBoundaries","point","offset","scan","universe","direction","getText","toEnd","freefallRtl$2","candidate","query","freefallRtl$1","up","down","styles","copyTo","source","destination","as","insert","afterAll","appendAll","create","nu","cloneNode","comparePosition","other","compareDocumentPosition","isSpecial","getLanguage","setText","isBoundary","isEmptyTag","isNonEditable","accordionTag","accordionDetailsClass","accordionSummaryClass","accordionBodyWrapperClass","accordionBodyWrapperTag","global$3","isSummary","isDetails","isOpen","details","hasAttribute","isInSummary","editor","selection","getNode","Boolean","getParent","isInsertAllowed","isEditable","getSelectedDetails","insertBogus","createParagraph","normalizeSummary","accordion","summary","createSummary","setCursorLocation","normalizeAccordion","lastChild","paragraph","normalizeContent","insertAccordion","editorBody","getBody","uid","prefix","time","Date","getTime","random","Math","floor","generate","summaryText","encode","getRng","translate","bodyText","accordionSummaryHtml","accordionBodyHtml","undoManager","transact","insertContent","join","detailsElm","summaryElm","rng","createRng","des","setStart","setEnd","setRng","toggleDetailsElement","state","shouldOpen","removeAccordion","select","collapse","target","insertAdjacentElement","insertAndSelectParagraphAfter","register$1","addCommand","_ui","dispatch","fireToggleAccordionEvent","toggleAccordion","accordions","fireToggleAllAccordionsEvent","toggleAllAccordions","global$2","getClassList","_b","split","addClasses","classes","classListSet","Set","newClassList","removeClasses","pred","clazz","has","isAccordionDetailsNode","getAccordionChildren","accordionNode","summaryNode","wrapperNode","otherNodes","padInputNode","br","empty","global$1","setupEnterKeyInSummary","on","event","shiftKey","keyCode","ENTER","startContainer","collapsed","startOffset","isAtDetailsStart","preventDefault","execCommand","setup$1","cmd","command","isDetailsSelected","grep","normalizeDetails","global","onSetup","buttonApi","onNodeChange","setEnabled","off","add","onAction","ui","registry","addButton","icon","tooltip","addMenuItem","addToggleButton","addContextToolbar","items","position","register","serializer","parser","addNodeFilter","nodes","hasSummaryNode","newSummaryNode","hasWrapperNode","newWrapperNode","j","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AAOgC,QAAQC,YACjB9I,EAAO4F,GAAG,SAASzM,IACjB,GAAIuG,GAAUvG,EAAEqK,QAAS,CACvB,MAAM5C,EAAUzH,EAAEqK,OACZZ,EAAM5C,EAAOC,UAAUgC,SACzBW,EAAIsD,WAAatD,EAAIqD,iBAAmBrF,EAAQ7I,YAAkC,IAApB6K,EAAIuD,aACpEnG,EAAOC,UAAUa,kBAAkBF,EAAS,EAE1D,IAEA,EA8CQmI,CAAM/I,EAAO,GAMpB,CAzhCD"}
@@ -0,0 +1,2 @@
1
+ import{__exports as t}from"../../../../_virtual/plugin38.mjs";var e;function s(){return e||(e=1,function(){var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=(t,e,s)=>{const r="UL"===e?"InsertUnorderedList":"InsertOrderedList";t.execCommand(r,!1,!1===s?null:{"list-style-type":s})},s=t=>e=>e.options.get(t),r=s("advlist_number_styles"),n=s("advlist_bullet_styles"),i=t=>null==t,l=t=>!i(t);var o=tinymce.util.Tools.resolve("tinymce.util.Tools");class a{constructor(t,e){this.tag=t,this.value=e}static some(t){return new a(!0,t)}static none(){return a.singletonNone}fold(t,e){return this.tag?e(this.value):t()}isSome(){return this.tag}isNone(){return!this.tag}map(t){return this.tag?a.some(t(this.value)):a.none()}bind(t){return this.tag?t(this.value):a.none()}exists(t){return this.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:a.none()}getOr(t){return this.tag?this.value:t}or(t){return this.tag?this:t}getOrThunk(t){return this.tag?this.value:t()}orThunk(t){return this.tag?this:t()}getOrDie(t){if(this.tag)return this.value;throw new Error(null!=t?t:"Called getOrDie on None")}static from(t){return l(t)?a.some(t):a.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(t){this.tag&&t(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}a.singletonNone=new a(!1);const u=t=>e=>l(e)&&t.test(e.nodeName),d=u(/^(OL|UL|DL)$/),g=u(/^(TH|TD)$/),c=(t,e,s)=>((t,e,s)=>{for(let r=0,n=t.length;r<n;r++){const n=t[r];if(e(n,r))return a.some(n);if(s(n,r))break}return a.none()})(e,(t=>d(t)&&!/\btox\-/.test(t.className)),g).exists((e=>e.nodeName===s&&((t,e)=>t.dom.isChildOf(e,t.getBody()))(t,e))),h=t=>i(t)||"default"===t?"":t,m=(t,e)=>s=>((t,e)=>{const s=t.selection.getNode();return e({parents:t.dom.getParents(s),element:s}),t.on("NodeChange",e),()=>t.off("NodeChange",e)})(t,(r=>((t,r)=>{const n=t.selection.getStart(!0);s.setActive(c(t,r,e)),s.setEnabled(!((t,e)=>{const s=t.dom.getParent(e,"ol,ul,dl");return((t,e)=>null!==e&&!t.dom.isEditable(e))(t,s)&&t.selection.isEditable()})(t,n)&&t.selection.isEditable())})(t,r.parents))),p=(t,s,r,n,i,l)=>{t.ui.registry.addSplitButton(s,{tooltip:r,icon:"OL"===i?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:t=>{t(o.map(l,(t=>{const e="OL"===i?"num":"bull",s="disc"===t||"decimal"===t?"default":t,r=h(t),n=(t=>t.replace(/\-/g," ").replace(/\b\w/g,(t=>t.toUpperCase())))(t);return{type:"choiceitem",value:r,icon:"list-"+e+"-"+s,text:n}})))},onAction:()=>t.execCommand(n),onItemAction:(s,r)=>{e(t,i,r)},select:e=>{const s=(t=>{const e=t.dom.getParent(t.selection.getNode(),"ol,ul"),s=t.dom.getStyle(e,"listStyleType");return a.from(s)})(t);return s.map((t=>e===t)).getOr(!1)},onSetup:m(t,i)})},v=(t,s,r,n,i,l)=>{l.length>1?p(t,s,r,n,i,l):((t,s,r,n,i,l)=>{t.ui.registry.addToggleButton(s,{active:!1,tooltip:r,icon:"OL"===i?"ordered-list":"unordered-list",onSetup:m(t,i),onAction:()=>t.queryCommandState(n)||""===l?t.execCommand(n):e(t,i,l)})})(t,s,r,n,i,h(l[0]))};t.add("advlist",(t=>{t.hasPlugin("lists")?((t=>{const e=t.options.register;e("advlist_number_styles",{processor:"string[]",default:"default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman".split(",")}),e("advlist_bullet_styles",{processor:"string[]",default:"default,circle,square".split(",")})})(t),(t=>{v(t,"numlist","Numbered list","InsertOrderedList","OL",r(t)),v(t,"bullist","Bullet list","InsertUnorderedList","UL",n(t))})(t),(t=>{t.addCommand("ApplyUnorderedListStyle",((s,r)=>{e(t,"UL",r["list-style-type"])})),t.addCommand("ApplyOrderedListStyle",((s,r)=>{e(t,"OL",r["list-style-type"])}))})(t)):console.error("Please use the Lists plugin together with the Advanced List plugin.")}))}()),t}export{s as __require};
2
+ //# sourceMappingURL=plugin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.mjs","sources":["../../../../../../node_modules/tinymce/plugins/advlist/plugin.js"],"sourcesContent":["/**\n * TinyMCE version 6.8.5 (TBD)\n */\n\n(function () {\n 'use strict';\n\n var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');\n\n const applyListFormat = (editor, listName, styleValue) => {\n const cmd = listName === 'UL' ? 'InsertUnorderedList' : 'InsertOrderedList';\n editor.execCommand(cmd, false, styleValue === false ? null : { 'list-style-type': styleValue });\n };\n\n const register$2 = editor => {\n editor.addCommand('ApplyUnorderedListStyle', (ui, value) => {\n applyListFormat(editor, 'UL', value['list-style-type']);\n });\n editor.addCommand('ApplyOrderedListStyle', (ui, value) => {\n applyListFormat(editor, 'OL', value['list-style-type']);\n });\n };\n\n const option = name => editor => editor.options.get(name);\n const register$1 = editor => {\n const registerOption = editor.options.register;\n registerOption('advlist_number_styles', {\n processor: 'string[]',\n default: 'default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman'.split(',')\n });\n registerOption('advlist_bullet_styles', {\n processor: 'string[]',\n default: 'default,circle,square'.split(',')\n });\n };\n const getNumberStyles = option('advlist_number_styles');\n const getBulletStyles = option('advlist_bullet_styles');\n\n const isNullable = a => a === null || a === undefined;\n const isNonNullable = a => !isNullable(a);\n\n var global = tinymce.util.Tools.resolve('tinymce.util.Tools');\n\n class Optional {\n constructor(tag, value) {\n this.tag = tag;\n this.value = value;\n }\n static some(value) {\n return new Optional(true, value);\n }\n static none() {\n return Optional.singletonNone;\n }\n fold(onNone, onSome) {\n if (this.tag) {\n return onSome(this.value);\n } else {\n return onNone();\n }\n }\n isSome() {\n return this.tag;\n }\n isNone() {\n return !this.tag;\n }\n map(mapper) {\n if (this.tag) {\n return Optional.some(mapper(this.value));\n } else {\n return Optional.none();\n }\n }\n bind(binder) {\n if (this.tag) {\n return binder(this.value);\n } else {\n return Optional.none();\n }\n }\n exists(predicate) {\n return this.tag && predicate(this.value);\n }\n forall(predicate) {\n return !this.tag || predicate(this.value);\n }\n filter(predicate) {\n if (!this.tag || predicate(this.value)) {\n return this;\n } else {\n return Optional.none();\n }\n }\n getOr(replacement) {\n return this.tag ? this.value : replacement;\n }\n or(replacement) {\n return this.tag ? this : replacement;\n }\n getOrThunk(thunk) {\n return this.tag ? this.value : thunk();\n }\n orThunk(thunk) {\n return this.tag ? this : thunk();\n }\n getOrDie(message) {\n if (!this.tag) {\n throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');\n } else {\n return this.value;\n }\n }\n static from(value) {\n return isNonNullable(value) ? Optional.some(value) : Optional.none();\n }\n getOrNull() {\n return this.tag ? this.value : null;\n }\n getOrUndefined() {\n return this.value;\n }\n each(worker) {\n if (this.tag) {\n worker(this.value);\n }\n }\n toArray() {\n return this.tag ? [this.value] : [];\n }\n toString() {\n return this.tag ? `some(${ this.value })` : 'none()';\n }\n }\n Optional.singletonNone = new Optional(false);\n\n const findUntil = (xs, pred, until) => {\n for (let i = 0, len = xs.length; i < len; i++) {\n const x = xs[i];\n if (pred(x, i)) {\n return Optional.some(x);\n } else if (until(x, i)) {\n break;\n }\n }\n return Optional.none();\n };\n\n const isCustomList = list => /\\btox\\-/.test(list.className);\n const isChildOfBody = (editor, elm) => {\n return editor.dom.isChildOf(elm, editor.getBody());\n };\n const matchNodeNames = regex => node => isNonNullable(node) && regex.test(node.nodeName);\n const isListNode = matchNodeNames(/^(OL|UL|DL)$/);\n const isTableCellNode = matchNodeNames(/^(TH|TD)$/);\n const inList = (editor, parents, nodeName) => findUntil(parents, parent => isListNode(parent) && !isCustomList(parent), isTableCellNode).exists(list => list.nodeName === nodeName && isChildOfBody(editor, list));\n const getSelectedStyleType = editor => {\n const listElm = editor.dom.getParent(editor.selection.getNode(), 'ol,ul');\n const style = editor.dom.getStyle(listElm, 'listStyleType');\n return Optional.from(style);\n };\n const isWithinNonEditable = (editor, element) => element !== null && !editor.dom.isEditable(element);\n const isWithinNonEditableList = (editor, element) => {\n const parentList = editor.dom.getParent(element, 'ol,ul,dl');\n return isWithinNonEditable(editor, parentList) && editor.selection.isEditable();\n };\n const setNodeChangeHandler = (editor, nodeChangeHandler) => {\n const initialNode = editor.selection.getNode();\n nodeChangeHandler({\n parents: editor.dom.getParents(initialNode),\n element: initialNode\n });\n editor.on('NodeChange', nodeChangeHandler);\n return () => editor.off('NodeChange', nodeChangeHandler);\n };\n\n const styleValueToText = styleValue => {\n return styleValue.replace(/\\-/g, ' ').replace(/\\b\\w/g, chr => {\n return chr.toUpperCase();\n });\n };\n const normalizeStyleValue = styleValue => isNullable(styleValue) || styleValue === 'default' ? '' : styleValue;\n const makeSetupHandler = (editor, nodeName) => api => {\n const updateButtonState = (editor, parents) => {\n const element = editor.selection.getStart(true);\n api.setActive(inList(editor, parents, nodeName));\n api.setEnabled(!isWithinNonEditableList(editor, element) && editor.selection.isEditable());\n };\n const nodeChangeHandler = e => updateButtonState(editor, e.parents);\n return setNodeChangeHandler(editor, nodeChangeHandler);\n };\n const addSplitButton = (editor, id, tooltip, cmd, nodeName, styles) => {\n editor.ui.registry.addSplitButton(id, {\n tooltip,\n icon: nodeName === 'OL' ? 'ordered-list' : 'unordered-list',\n presets: 'listpreview',\n columns: 3,\n fetch: callback => {\n const items = global.map(styles, styleValue => {\n const iconStyle = nodeName === 'OL' ? 'num' : 'bull';\n const iconName = styleValue === 'disc' || styleValue === 'decimal' ? 'default' : styleValue;\n const itemValue = normalizeStyleValue(styleValue);\n const displayText = styleValueToText(styleValue);\n return {\n type: 'choiceitem',\n value: itemValue,\n icon: 'list-' + iconStyle + '-' + iconName,\n text: displayText\n };\n });\n callback(items);\n },\n onAction: () => editor.execCommand(cmd),\n onItemAction: (_splitButtonApi, value) => {\n applyListFormat(editor, nodeName, value);\n },\n select: value => {\n const listStyleType = getSelectedStyleType(editor);\n return listStyleType.map(listStyle => value === listStyle).getOr(false);\n },\n onSetup: makeSetupHandler(editor, nodeName)\n });\n };\n const addButton = (editor, id, tooltip, cmd, nodeName, styleValue) => {\n editor.ui.registry.addToggleButton(id, {\n active: false,\n tooltip,\n icon: nodeName === 'OL' ? 'ordered-list' : 'unordered-list',\n onSetup: makeSetupHandler(editor, nodeName),\n onAction: () => editor.queryCommandState(cmd) || styleValue === '' ? editor.execCommand(cmd) : applyListFormat(editor, nodeName, styleValue)\n });\n };\n const addControl = (editor, id, tooltip, cmd, nodeName, styles) => {\n if (styles.length > 1) {\n addSplitButton(editor, id, tooltip, cmd, nodeName, styles);\n } else {\n addButton(editor, id, tooltip, cmd, nodeName, normalizeStyleValue(styles[0]));\n }\n };\n const register = editor => {\n addControl(editor, 'numlist', 'Numbered list', 'InsertOrderedList', 'OL', getNumberStyles(editor));\n addControl(editor, 'bullist', 'Bullet list', 'InsertUnorderedList', 'UL', getBulletStyles(editor));\n };\n\n var Plugin = () => {\n global$1.add('advlist', editor => {\n if (editor.hasPlugin('lists')) {\n register$1(editor);\n register(editor);\n register$2(editor);\n } else {\n console.error('Please use the Lists plugin together with the Advanced List plugin.');\n }\n });\n };\n\n Plugin();\n\n})();\n"],"names":["global$1","tinymce","util","Tools","resolve","applyListFormat","editor","listName","styleValue","cmd","execCommand","option","name","options","get","getNumberStyles","getBulletStyles","isNullable","a","isNonNullable","global","Optional","constructor","tag","value","this","some","none","singletonNone","fold","onNone","onSome","isSome","isNone","map","mapper","bind","binder","exists","predicate","forall","filter","getOr","replacement","or","getOrThunk","thunk","orThunk","getOrDie","message","Error","from","getOrNull","getOrUndefined","each","worker","toArray","toString","matchNodeNames","regex","node","test","nodeName","isListNode","isTableCellNode","inList","parents","xs","pred","until","i","len","length","x","findUntil","parent","className","list","elm","dom","isChildOf","getBody","isChildOfBody","normalizeStyleValue","makeSetupHandler","api","nodeChangeHandler","initialNode","selection","getNode","getParents","element","on","off","setNodeChangeHandler","e","getStart","setActive","setEnabled","parentList","getParent","isEditable","isWithinNonEditable","isWithinNonEditableList","updateButtonState","addSplitButton","id","tooltip","styles","ui","registry","icon","presets","columns","fetch","callback","iconStyle","iconName","itemValue","displayText","replace","chr","toUpperCase","styleValueToText","type","text","onAction","onItemAction","_splitButtonApi","select","listStyleType","listElm","style","getStyle","getSelectedStyleType","listStyle","onSetup","addControl","addToggleButton","active","queryCommandState","addButton","add","hasPlugin","registerOption","register","processor","default","split","register$1","addCommand","register$2","console","error"],"mappings":"gGAIA,WAGI,IAAIA,EAAWC,QAAQC,KAAKC,MAAMC,QAAQ,yBAE1C,MAAMC,EAAkB,CAACC,EAAQC,EAAUC,KACzC,MAAMC,EAAmB,OAAbF,EAAoB,sBAAwB,oBACxDD,EAAOI,YAAYD,GAAK,GAAsB,IAAfD,EAAuB,KAAO,CAAE,kBAAmBA,GAAa,EAY3FG,EAASC,GAAQN,GAAUA,EAAOO,QAAQC,IAAIF,GAY9CG,EAAkBJ,EAAO,yBACzBK,EAAkBL,EAAO,yBAEzBM,EAAaC,GAAKA,QAClBC,EAAgBD,IAAMD,EAAWC,GAEvC,IAAIE,EAASnB,QAAQC,KAAKC,MAAMC,QAAQ,sBAExC,MAAMiB,EACJ,WAAAC,CAAYC,EAAKC,GACfC,KAAKF,IAAMA,EACXE,KAAKD,MAAQA,CACrB,CACM,WAAOE,CAAKF,GACV,OAAO,IAAIH,GAAS,EAAMG,EAClC,CACM,WAAOG,GACL,OAAON,EA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,MAAM,sEACxB,GAMC,CA9PD"}
@@ -0,0 +1,2 @@
1
+ import{__exports as e}from"../../../../_virtual/plugin22.mjs";var t;function o(){return t||(t=1,function(){var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),o=tinymce.util.Tools.resolve("tinymce.util.Tools");const n=(a="allow_html_in_named_anchor",e=>e.options.get(a));var a;const r="a:not([href])",i=e=>!e,l=e=>e.getAttribute("id")||e.getAttribute("name")||"",s=e=>(e=>"a"===e.nodeName.toLowerCase())(e)&&!e.getAttribute("href")&&""!==l(e),d=e=>{const n=e.dom;t(n).walk(e.selection.getRng(),(e=>{o.each(e,(e=>{var t;s(t=e)&&!t.firstChild&&n.remove(e,!1)}))}))},c=e=>e.dom.getParent(e.selection.getStart(),r),m=(e,t)=>{const o=c(e);o?((e,t,o)=>{o.removeAttribute("name"),o.id=t,e.addVisual(),e.undoManager.add()})(e,t,o):((e,t)=>{e.undoManager.transact((()=>{n(e)||e.selection.collapse(!0),e.selection.isCollapsed()?e.insertContent(e.dom.createHTML("a",{id:t})):(d(e),e.formatter.remove("namedAnchor",void 0,void 0,!0),e.formatter.apply("namedAnchor",{value:t}),e.addVisual())}))})(e,t),e.focus()},u=e=>{const t=(e=>{const t=c(e);return t?l(t):""})(e);e.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"ID",placeholder:"example"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{id:t},onSubmit:t=>{((e,t)=>/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)?(m(e,t),!0):(e.windowManager.alert("ID should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),!1))(e,t.getData().id)&&t.close()}})},h=e=>(e=>i(e.attr("href"))&&!i(e.attr("id")||e.attr("name")))(e)&&!e.firstChild,g=e=>t=>{for(let o=0;o<t.length;o++){const n=t[o];h(n)&&n.attr("contenteditable",e)}},p=e=>t=>{const o=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",o),o(),()=>{e.off("NodeChange",o)}};e.add("anchor",(e=>{(e=>{(0,e.options.register)("allow_html_in_named_anchor",{processor:"boolean",default:!1})})(e),(e=>{e.on("PreInit",(()=>{e.parser.addNodeFilter("a",g("false")),e.serializer.addNodeFilter("a",g(null))}))})(e),(e=>{e.addCommand("mceAnchor",(()=>{u(e)}))})(e),(e=>{const t=()=>e.execCommand("mceAnchor");e.ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:t,onSetup:t=>{const o=e.selection.selectorChangedWithUnbind("a:not([href])",t.setActive).unbind,n=p(e)(t);return()=>{o(),n()}}}),e.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:t,onSetup:p(e)})})(e),e.on("PreInit",(()=>{(e=>{e.formatter.register("namedAnchor",{inline:"a",selector:r,remove:"all",split:!0,deep:!0,attributes:{id:"%value"},onmatch:(e,t,o)=>s(e)})})(e)}))}))}()),e}export{o as __require};
2
+ //# sourceMappingURL=plugin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.mjs","sources":["../../../../../../node_modules/tinymce/plugins/anchor/plugin.js"],"sourcesContent":["/**\n * TinyMCE version 6.8.5 (TBD)\n */\n\n(function () {\n 'use strict';\n\n var global$2 = tinymce.util.Tools.resolve('tinymce.PluginManager');\n\n var global$1 = tinymce.util.Tools.resolve('tinymce.dom.RangeUtils');\n\n var global = tinymce.util.Tools.resolve('tinymce.util.Tools');\n\n const option = name => editor => editor.options.get(name);\n const register$2 = editor => {\n const registerOption = editor.options.register;\n registerOption('allow_html_in_named_anchor', {\n processor: 'boolean',\n default: false\n });\n };\n const allowHtmlInNamedAnchor = option('allow_html_in_named_anchor');\n\n const namedAnchorSelector = 'a:not([href])';\n const isEmptyString = str => !str;\n const getIdFromAnchor = elm => {\n const id = elm.getAttribute('id') || elm.getAttribute('name');\n return id || '';\n };\n const isAnchor = elm => elm.nodeName.toLowerCase() === 'a';\n const isNamedAnchor = elm => isAnchor(elm) && !elm.getAttribute('href') && getIdFromAnchor(elm) !== '';\n const isEmptyNamedAnchor = elm => isNamedAnchor(elm) && !elm.firstChild;\n\n const removeEmptyNamedAnchorsInSelection = editor => {\n const dom = editor.dom;\n global$1(dom).walk(editor.selection.getRng(), nodes => {\n global.each(nodes, node => {\n if (isEmptyNamedAnchor(node)) {\n dom.remove(node, false);\n }\n });\n });\n };\n const isValidId = id => /^[A-Za-z][A-Za-z0-9\\-:._]*$/.test(id);\n const getNamedAnchor = editor => editor.dom.getParent(editor.selection.getStart(), namedAnchorSelector);\n const getId = editor => {\n const anchor = getNamedAnchor(editor);\n if (anchor) {\n return getIdFromAnchor(anchor);\n } else {\n return '';\n }\n };\n const createAnchor = (editor, id) => {\n editor.undoManager.transact(() => {\n if (!allowHtmlInNamedAnchor(editor)) {\n editor.selection.collapse(true);\n }\n if (editor.selection.isCollapsed()) {\n editor.insertContent(editor.dom.createHTML('a', { id }));\n } else {\n removeEmptyNamedAnchorsInSelection(editor);\n editor.formatter.remove('namedAnchor', undefined, undefined, true);\n editor.formatter.apply('namedAnchor', { value: id });\n editor.addVisual();\n }\n });\n };\n const updateAnchor = (editor, id, anchorElement) => {\n anchorElement.removeAttribute('name');\n anchorElement.id = id;\n editor.addVisual();\n editor.undoManager.add();\n };\n const insert = (editor, id) => {\n const anchor = getNamedAnchor(editor);\n if (anchor) {\n updateAnchor(editor, id, anchor);\n } else {\n createAnchor(editor, id);\n }\n editor.focus();\n };\n\n const insertAnchor = (editor, newId) => {\n if (!isValidId(newId)) {\n editor.windowManager.alert('ID should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.');\n return false;\n } else {\n insert(editor, newId);\n return true;\n }\n };\n const open = editor => {\n const currentId = getId(editor);\n editor.windowManager.open({\n title: 'Anchor',\n size: 'normal',\n body: {\n type: 'panel',\n items: [{\n name: 'id',\n type: 'input',\n label: 'ID',\n placeholder: 'example'\n }]\n },\n buttons: [\n {\n type: 'cancel',\n name: 'cancel',\n text: 'Cancel'\n },\n {\n type: 'submit',\n name: 'save',\n text: 'Save',\n primary: true\n }\n ],\n initialData: { id: currentId },\n onSubmit: api => {\n if (insertAnchor(editor, api.getData().id)) {\n api.close();\n }\n }\n });\n };\n\n const register$1 = editor => {\n editor.addCommand('mceAnchor', () => {\n open(editor);\n });\n };\n\n const isNamedAnchorNode = node => isEmptyString(node.attr('href')) && !isEmptyString(node.attr('id') || node.attr('name'));\n const isEmptyNamedAnchorNode = node => isNamedAnchorNode(node) && !node.firstChild;\n const setContentEditable = state => nodes => {\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n if (isEmptyNamedAnchorNode(node)) {\n node.attr('contenteditable', state);\n }\n }\n };\n const setup = editor => {\n editor.on('PreInit', () => {\n editor.parser.addNodeFilter('a', setContentEditable('false'));\n editor.serializer.addNodeFilter('a', setContentEditable(null));\n });\n };\n\n const registerFormats = editor => {\n editor.formatter.register('namedAnchor', {\n inline: 'a',\n selector: namedAnchorSelector,\n remove: 'all',\n split: true,\n deep: true,\n attributes: { id: '%value' },\n onmatch: (node, _fmt, _itemName) => {\n return isNamedAnchor(node);\n }\n });\n };\n\n const onSetupEditable = editor => api => {\n const nodeChanged = () => {\n api.setEnabled(editor.selection.isEditable());\n };\n editor.on('NodeChange', nodeChanged);\n nodeChanged();\n return () => {\n editor.off('NodeChange', nodeChanged);\n };\n };\n const register = editor => {\n const onAction = () => editor.execCommand('mceAnchor');\n editor.ui.registry.addToggleButton('anchor', {\n icon: 'bookmark',\n tooltip: 'Anchor',\n onAction,\n onSetup: buttonApi => {\n const unbindSelectorChanged = editor.selection.selectorChangedWithUnbind('a:not([href])', buttonApi.setActive).unbind;\n const unbindEditableChanged = onSetupEditable(editor)(buttonApi);\n return () => {\n unbindSelectorChanged();\n unbindEditableChanged();\n };\n }\n });\n editor.ui.registry.addMenuItem('anchor', {\n icon: 'bookmark',\n text: 'Anchor...',\n onAction,\n onSetup: onSetupEditable(editor)\n });\n };\n\n var Plugin = () => {\n global$2.add('anchor', editor => {\n register$2(editor);\n setup(editor);\n register$1(editor);\n register(editor);\n editor.on('PreInit', () => {\n registerFormats(editor);\n });\n });\n };\n\n Plugin();\n\n})();\n"],"names":["global$2","tinymce","util","Tools","resolve","global$1","global","allowHtmlInNamedAnchor","name","editor","options","get","namedAnchorSelector","isEmptyString","str","getIdFromAnchor","elm","getAttribute","isNamedAnchor","nodeName","toLowerCase","isAnchor","removeEmptyNamedAnchorsInSelection","dom","walk","selection","getRng","nodes","each","node","firstChild","remove","getNamedAnchor","getParent","getStart","insert","id","anchor","anchorElement","removeAttribute","addVisual","undoManager","add","updateAnchor","transact","collapse","isCollapsed","insertContent","createHTML","formatter","undefined","apply","value","createAnchor","focus","open","currentId","getId","windowManager","title","size","body","type","items","label","placeholder","buttons","text","primary","initialData","onSubmit","api","newId","test","alert","insertAnchor","getData","close","isEmptyNamedAnchorNode","attr","isNamedAnchorNode","setContentEditable","state","i","length","onSetupEditable","nodeChanged","setEnabled","isEditable","on","off","registerOption","register","processor","default","register$2","parser","addNodeFilter","serializer","setup","addCommand","register$1","onAction","execCommand","ui","registry","addToggleButton","icon","tooltip","onSetup","buttonApi","unbindSelectorChanged","selectorChangedWithUnbind","setActive","unbind","unbindEditableChanged","addMenuItem","inline","selector","split","deep","attributes","onmatch","_fmt","_itemName","registerFormats"],"mappings":"gGAIA,WAGI,IAAIA,EAAWC,QAAQC,KAAKC,MAAMC,QAAQ,yBAEtCC,EAAWJ,QAAQC,KAAKC,MAAMC,QAAQ,0BAEtCE,EAASL,QAAQC,KAAKC,MAAMC,QAAQ,sBAExC,MAQMG,GARSC,EAQuB,6BARfC,GAAUA,EAAOC,QAAQC,IAAIH,IAArCA,MAUf,MAAMI,EAAsB,gBACtBC,EAAgBC,IAAQA,EACxBC,EAAkBC,GACXA,EAAIC,aAAa,OAASD,EAAIC,aAAa,SACzC,GAGTC,EAA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K9C,EAAO,GACZ,EAuEA4F,CAAW5F,GA3BEA,KACf,MAAM6F,EAAW,IAAM7F,EAAO8F,YAAY,aAC1C9F,EAAO+F,GAAGC,SAASC,gBAAgB,SAAU,CAC3CC,KAAM,WACNC,QAAS,SACTN,WACAO,QAASC,IACP,MAAMC,EAAwBtG,EAAOgB,UAAUuF,0BAA0B,gBAAiBF,EAAUG,WAAWC,OACzGC,EAAwB9B,EAAgB5E,EAAhB4E,CAAwByB,GACtD,MAAO,KACLC,IACAI,GAAuB,CACxB,IAGL1G,EAAO+F,GAAGC,SAASW,YAAY,SAAU,CACvCT,KAAM,WACNxC,KAAM,YACNmC,WACAO,QAASxB,EAAgB5E,IACzB,EAQAmF,CAASnF,GACTA,EAAOgF,GAAG,WAAW,KArDDhF,KACtBA,EAAOwC,UAAU2C,SAAS,cAAe,CACvCyB,OAAQ,IACRC,SAAU1G,EACVmB,OAAQ,MACRwF,OAAO,EACPC,MAAM,EACNC,WAAY,CAAErF,GAAI,UAClBsF,QAAS,CAAC7F,EAAM8F,EAAMC,IACb1G,EAAcW,IAEvB,EA2CEgG,CAAgBpH,EAAO,GACvB,GAMT,CAjND"}
@@ -0,0 +1,2 @@
1
+ import{__exports as e}from"../../../../_virtual/plugin26.mjs";var t;function n(){return t||(t=1,function(){var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>t.options.get(e),n=t("autolink_pattern"),o=t("link_default_target"),r=t("link_default_protocol"),a=t("allow_unsafe_link_target"),s=(l="string",e=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=o=e,(r=String).prototype.isPrototypeOf(n)||(null===(a=o.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var n,o,r,a})(e)===l);var l;const i=(c=void 0,e=>c===e);var c;const d=e=>!(e=>null==e)(e),u=Object.hasOwnProperty,f=e=>"\ufeff"===e;var g=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker");const m=e=>3===e.nodeType,p=e=>/^[(\[{ \u00a0]$/.test(e),k=(e,t,n)=>{for(let o=t-1;o>=0;o--){const t=e.charAt(o);if(!f(t)&&n(t))return o}return-1},v=(e,t)=>{var o;const a=e.schema.getVoidElements(),s=n(e),{dom:l,selection:c}=e;if(null!==l.getParent(c.getNode(),"a[href]"))return null;const d=c.getRng(),f=g(l,(e=>{return l.isBlock(e)||(t=a,n=e.nodeName.toLowerCase(),u.call(t,n))||"false"===l.getContentEditable(e);var t,n})),{container:v,offset:y}=((e,t)=>{let n=e,o=t;for(;1===n.nodeType&&n.childNodes[o];)n=n.childNodes[o],o=m(n)?n.data.length:n.childNodes.length;return{container:n,offset:o}})(d.endContainer,d.endOffset),h=null!==(o=l.getParent(v,l.isBlock))&&void 0!==o?o:l.getRoot(),w=f.backwards(v,y+t,((e,t)=>{const n=e.data,o=k(n,t,(r=p,e=>!r(e)));var r,a;return-1===o||(a=n[o],/[?!,.;:]/.test(a))?o:o+1}),h);if(!w)return null;let _=w.container;const A=f.backwards(w.container,w.offset,((e,t)=>{_=e;const n=k(e.data,t,p);return-1===n?n:n+1}),h),C=l.createRng();A?C.setStart(A.container,A.offset):C.setStart(_,0),C.setEnd(w.container,w.offset);const b=C.toString().replace(/\uFEFF/g,"").match(s);if(b){let t=b[0];if(((e,t,n)=>""===t||e.length>=t.length&&e.substr(n,n+t.length)===t)(t,"www.",0)){t=r(e)+"://"+t}else((e,t,n=0,o)=>{const r=e.indexOf(t,n);return-1!==r&&(!!i(o)||r+t.length<=o)})(t,"@")&&!(e=>/^([A-Za-z][A-Za-z\d.+-]*:\/\/)|mailto:/.test(e))(t)&&(t="mailto:"+t);return{rng:C,url:t}}return null},y=(e,t)=>{const{dom:n,selection:r}=e,{rng:l,url:i}=t,c=r.getBookmark();r.setRng(l);const d="createlink",u={command:d,ui:!1,value:i};if(!e.dispatch("BeforeExecCommand",u).isDefaultPrevented()){e.getDoc().execCommand(d,!1,i),e.dispatch("ExecCommand",u);const t=o(e);if(s(t)){const o=r.getNode();n.setAttrib(o,"target",t),"_blank"!==t||a(e)||n.setAttrib(o,"rel","noopener")}}r.moveToBookmark(c),e.nodeChanged()},h=e=>{const t=v(e,-1);d(t)&&y(e,t)},w=h,_=e=>{e.on("keydown",(t=>{13!==t.keyCode||t.isDefaultPrevented()||(e=>{const t=v(e,0);d(t)&&y(e,t)})(e)})),e.on("keyup",(t=>{32===t.keyCode?h(e):(48===t.keyCode&&t.shiftKey||221===t.keyCode)&&w(e)}))};e.add("autolink",(e=>{(e=>{const t=e.options.register;t("autolink_pattern",{processor:"regexp",default:new RegExp("^"+/(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g.source+"$","i")}),t("link_default_target",{processor:"string"}),t("link_default_protocol",{processor:"string",default:"https"})})(e),_(e)}))}()),e}export{n as __require};
2
+ //# sourceMappingURL=plugin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.mjs","sources":["../../../../../../node_modules/tinymce/plugins/autolink/plugin.js"],"sourcesContent":["/**\n * TinyMCE version 6.8.5 (TBD)\n */\n\n(function () {\n 'use strict';\n\n var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');\n\n const link = () => /(?:[A-Za-z][A-Za-z\\d.+-]{0,14}:\\/\\/(?:[-.~*+=!&;:'%@?^${}(),\\w]+@)?|www\\.|[-;:&=+$,.\\w]+@)[A-Za-z\\d-]+(?:\\.[A-Za-z\\d-]+)*(?::\\d+)?(?:\\/(?:[-.~*+=!;:'%@$(),\\/\\w]*[-~*+=%@$()\\/\\w])?)?(?:\\?(?:[-.~*+=!&;:'%@?^${}(),\\/\\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\\/\\w]+))?/g;\n\n const option = name => editor => editor.options.get(name);\n const register = editor => {\n const registerOption = editor.options.register;\n registerOption('autolink_pattern', {\n processor: 'regexp',\n default: new RegExp('^' + link().source + '$', 'i')\n });\n registerOption('link_default_target', { processor: 'string' });\n registerOption('link_default_protocol', {\n processor: 'string',\n default: 'https'\n });\n };\n const getAutoLinkPattern = option('autolink_pattern');\n const getDefaultLinkTarget = option('link_default_target');\n const getDefaultLinkProtocol = option('link_default_protocol');\n const allowUnsafeLinkTarget = option('allow_unsafe_link_target');\n\n const hasProto = (v, constructor, predicate) => {\n var _a;\n if (predicate(v, constructor.prototype)) {\n return true;\n } else {\n return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;\n }\n };\n const typeOf = x => {\n const t = typeof x;\n if (x === null) {\n return 'null';\n } else if (t === 'object' && Array.isArray(x)) {\n return 'array';\n } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {\n return 'string';\n } else {\n return t;\n }\n };\n const isType = type => value => typeOf(value) === type;\n const eq = t => a => t === a;\n const isString = isType('string');\n const isUndefined = eq(undefined);\n const isNullable = a => a === null || a === undefined;\n const isNonNullable = a => !isNullable(a);\n\n const not = f => t => !f(t);\n\n const hasOwnProperty = Object.hasOwnProperty;\n const has = (obj, key) => hasOwnProperty.call(obj, key);\n\n const checkRange = (str, substr, start) => substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;\n const contains = (str, substr, start = 0, end) => {\n const idx = str.indexOf(substr, start);\n if (idx !== -1) {\n return isUndefined(end) ? true : idx + substr.length <= end;\n } else {\n return false;\n }\n };\n const startsWith = (str, prefix) => {\n return checkRange(str, prefix, 0);\n };\n\n const zeroWidth = '\\uFEFF';\n const isZwsp = char => char === zeroWidth;\n const removeZwsp = s => s.replace(/\\uFEFF/g, '');\n\n var global = tinymce.util.Tools.resolve('tinymce.dom.TextSeeker');\n\n const isTextNode = node => node.nodeType === 3;\n const isElement = node => node.nodeType === 1;\n const isBracketOrSpace = char => /^[(\\[{ \\u00a0]$/.test(char);\n const hasProtocol = url => /^([A-Za-z][A-Za-z\\d.+-]*:\\/\\/)|mailto:/.test(url);\n const isPunctuation = char => /[?!,.;:]/.test(char);\n const findChar = (text, index, predicate) => {\n for (let i = index - 1; i >= 0; i--) {\n const char = text.charAt(i);\n if (!isZwsp(char) && predicate(char)) {\n return i;\n }\n }\n return -1;\n };\n const freefallRtl = (container, offset) => {\n let tempNode = container;\n let tempOffset = offset;\n while (isElement(tempNode) && tempNode.childNodes[tempOffset]) {\n tempNode = tempNode.childNodes[tempOffset];\n tempOffset = isTextNode(tempNode) ? tempNode.data.length : tempNode.childNodes.length;\n }\n return {\n container: tempNode,\n offset: tempOffset\n };\n };\n\n const parseCurrentLine = (editor, offset) => {\n var _a;\n const voidElements = editor.schema.getVoidElements();\n const autoLinkPattern = getAutoLinkPattern(editor);\n const {dom, selection} = editor;\n if (dom.getParent(selection.getNode(), 'a[href]') !== null) {\n return null;\n }\n const rng = selection.getRng();\n const textSeeker = global(dom, node => {\n return dom.isBlock(node) || has(voidElements, node.nodeName.toLowerCase()) || dom.getContentEditable(node) === 'false';\n });\n const {\n container: endContainer,\n offset: endOffset\n } = freefallRtl(rng.endContainer, rng.endOffset);\n const root = (_a = dom.getParent(endContainer, dom.isBlock)) !== null && _a !== void 0 ? _a : dom.getRoot();\n const endSpot = textSeeker.backwards(endContainer, endOffset + offset, (node, offset) => {\n const text = node.data;\n const idx = findChar(text, offset, not(isBracketOrSpace));\n return idx === -1 || isPunctuation(text[idx]) ? idx : idx + 1;\n }, root);\n if (!endSpot) {\n return null;\n }\n let lastTextNode = endSpot.container;\n const startSpot = textSeeker.backwards(endSpot.container, endSpot.offset, (node, offset) => {\n lastTextNode = node;\n const idx = findChar(node.data, offset, isBracketOrSpace);\n return idx === -1 ? idx : idx + 1;\n }, root);\n const newRng = dom.createRng();\n if (!startSpot) {\n newRng.setStart(lastTextNode, 0);\n } else {\n newRng.setStart(startSpot.container, startSpot.offset);\n }\n newRng.setEnd(endSpot.container, endSpot.offset);\n const rngText = removeZwsp(newRng.toString());\n const matches = rngText.match(autoLinkPattern);\n if (matches) {\n let url = matches[0];\n if (startsWith(url, 'www.')) {\n const protocol = getDefaultLinkProtocol(editor);\n url = protocol + '://' + url;\n } else if (contains(url, '@') && !hasProtocol(url)) {\n url = 'mailto:' + url;\n }\n return {\n rng: newRng,\n url\n };\n } else {\n return null;\n }\n };\n const convertToLink = (editor, result) => {\n const {dom, selection} = editor;\n const {rng, url} = result;\n const bookmark = selection.getBookmark();\n selection.setRng(rng);\n const command = 'createlink';\n const args = {\n command,\n ui: false,\n value: url\n };\n const beforeExecEvent = editor.dispatch('BeforeExecCommand', args);\n if (!beforeExecEvent.isDefaultPrevented()) {\n editor.getDoc().execCommand(command, false, url);\n editor.dispatch('ExecCommand', args);\n const defaultLinkTarget = getDefaultLinkTarget(editor);\n if (isString(defaultLinkTarget)) {\n const anchor = selection.getNode();\n dom.setAttrib(anchor, 'target', defaultLinkTarget);\n if (defaultLinkTarget === '_blank' && !allowUnsafeLinkTarget(editor)) {\n dom.setAttrib(anchor, 'rel', 'noopener');\n }\n }\n }\n selection.moveToBookmark(bookmark);\n editor.nodeChanged();\n };\n const handleSpacebar = editor => {\n const result = parseCurrentLine(editor, -1);\n if (isNonNullable(result)) {\n convertToLink(editor, result);\n }\n };\n const handleBracket = handleSpacebar;\n const handleEnter = editor => {\n const result = parseCurrentLine(editor, 0);\n if (isNonNullable(result)) {\n convertToLink(editor, result);\n }\n };\n const setup = editor => {\n editor.on('keydown', e => {\n if (e.keyCode === 13 && !e.isDefaultPrevented()) {\n handleEnter(editor);\n }\n });\n editor.on('keyup', e => {\n if (e.keyCode === 32) {\n handleSpacebar(editor);\n } else if (e.keyCode === 48 && e.shiftKey || e.keyCode === 221) {\n handleBracket(editor);\n }\n });\n };\n\n var Plugin = () => {\n global$1.add('autolink', editor => {\n register(editor);\n setup(editor);\n });\n };\n\n Plugin();\n\n})();\n"],"names":["global$1","tinymce","util","Tools","resolve","option","name","editor","options","get","getAutoLinkPattern","getDefaultLinkTarget","getDefaultLinkProtocol","allowUnsafeLinkTarget","isString","type","value","x","t","Array","isArray","o","v","constructor","String","prototype","isPrototypeOf","_a","typeOf","isUndefined","undefined","a","isNonNullable","isNullable","hasOwnProperty","Object","isZwsp","char","global","isTextNode","node","nodeType","isBracketOrSpace","test","findChar","text","index","predicate","i","charAt","parseCurrentLine","offset","voidElements","schema","getVoidElements","autoLinkPattern","dom","selection","getParent","getNode","rng","getRng","textSeeker","isBlock","obj","key","nodeName","toLowerCase","call","getContentEditable","container","endContainer","endOffset","tempNode","tempOffset","childNodes","data","length","freefallRtl","root","getRoot","endSpot","backwards","idx","f","lastTextNode","startSpot","newRng","createRng","setStart","setEnd","matches","toString","replace","match","url","str","substr","start","checkRange","end","indexOf","contains","hasProtocol","convertToLink","result","bookmark","getBookmark","setRng","command","args","ui","dispatch","isDefaultPrevented","getDoc","execCommand","defaultLinkTarget","anchor","setAttrib","moveToBookmark","nodeChanged","handleSpacebar","handleBracket","setup","on","e","keyCode","handleEnter","shiftKey","add","registerOption","register","processor","default","RegExp","source"],"mappings":"gGAIA,WAGE,IAAIA,EAAWC,QAAQC,KAAKC,MAAMC,QAAQ,yBAE1C,MAEMC,EAASC,GAAQC,GAAUA,EAAOC,QAAQC,IAAIH,GAa9CI,EAAqBL,EAAO,oBAC5BM,EAAuBN,EAAO,uBAC9BO,EAAyBP,EAAO,yBAChCQ,EAAwBR,EAAO,4BAwB/BS,GAFSC,EAES,SAFDC,GAZRC,KACb,MAAMC,SAAWD,EACjB,OAAU,OAANA,EACK,OACQ,WAANC,GAAkBC,MAAMC,QAAQH,GAClC,QACQ,WAANC,IAAuCG,EAdlCC,EAcsBL,GAdnBM,EAcsBC,QAZZC,UAYwCC,cAAcL,KAThD,QAAxBM,EAAKL,EAAEC,mBAAgC,IAAPI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sBARX1G,KAClB,MAAMkG,EAASvD,EAAiB3C,EAAQ,GACpCyB,EAAcyE,IAChBD,EAAcjG,EAAQkG,EAC5B,EAKQsB,CAAYxH,EACpB,IAEIA,EAAOqH,GAAG,SAASC,IACC,KAAdA,EAAEC,QACJL,EAAelH,IACQ,KAAdsH,EAAEC,SAAkBD,EAAEG,UAA0B,MAAdH,EAAEC,UAC7CJ,EAAcnH,EACtB,GACM,EAIFP,EAASiI,IAAI,YAAY1H,IA/MVA,KACf,MAAM2H,EAAiB3H,EAAOC,QAAQ2H,SACtCD,EAAe,mBAAoB,CACjCE,UAAW,SACXC,QAAS,IAAIC,OAAO,IAPL,sQAOkBC,OAAS,IAAK,OAEjDL,EAAe,sBAAuB,CAAEE,UAAW,WACnDF,EAAe,wBAAyB,CACtCE,UAAW,SACXC,QAAS,SACT,EAsMAF,CAAS5H,GACToH,EAAMpH,EAAO,GAMlB,CA/ND"}
@@ -0,0 +1,2 @@
1
+ import{__exports as t}from"../../../../_virtual/plugin19.mjs";var e;function r(){return e||(e=1,function(){var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=(r="string",t=>(t=>{const e=typeof t;return null===t?"null":"object"===e&&Array.isArray(t)?"array":"object"===e&&(r=o=t,(a=String).prototype.isPrototypeOf(r)||(null===(s=o.constructor)||void 0===s?void 0:s.name)===a.name)?"string":e;var r,o,a,s})(t)===r);var r;const o=(a=void 0,t=>a===t);var a,s=tinymce.util.Tools.resolve("tinymce.util.Delay"),n=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),i=tinymce.util.Tools.resolve("tinymce.util.Tools");const u=t=>{const e=/^(\d+)([ms]?)$/.exec(t);return(e&&e[2]?{s:1e3,m:6e4}[e[2]]:1)*parseInt(t,10)},l=t=>e=>e.options.get(t),c=l("autosave_ask_before_unload"),m=l("autosave_restore_when_empty"),d=l("autosave_interval"),v=l("autosave_retention"),f=t=>{const e=document.location;return t.options.get("autosave_prefix").replace(/{path}/g,e.pathname).replace(/{query}/g,e.search).replace(/{hash}/g,e.hash).replace(/{id}/g,t.id)},p=(t,e)=>{if(o(e))return t.dom.isEmpty(t.getBody());{const r=i.trim(e);if(""===r)return!0;{const e=(new DOMParser).parseFromString(r,"text/html");return t.dom.isEmpty(e)}}},g=t=>{var e;const r=parseInt(null!==(e=n.getItem(f(t)+"time"))&&void 0!==e?e:"0",10)||0;return!((new Date).getTime()-r>v(t))||(y(t,!1),!1)},y=(t,e)=>{const r=f(t);n.removeItem(r+"draft"),n.removeItem(r+"time"),!1!==e&&(t=>{t.dispatch("RemoveDraft")})(t)},_=t=>{const e=f(t);!p(t)&&t.isDirty()&&(n.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),n.setItem(e+"time",(new Date).getTime().toString()),(t=>{t.dispatch("StoreDraft")})(t))},D=t=>{var e;const r=f(t);g(t)&&(t.setContent(null!==(e=n.getItem(r+"draft"))&&void 0!==e?e:"",{format:"raw"}),(t=>{t.dispatch("RestoreDraft")})(t))};var h=tinymce.util.Tools.resolve("tinymce.EditorManager");const I=t=>e=>{e.setEnabled(g(t));const r=()=>e.setEnabled(g(t));return t.on("StoreDraft RestoreDraft RemoveDraft",r),()=>t.off("StoreDraft RestoreDraft RemoveDraft",r)},b=t=>{(t=>{const e=d(t);s.setEditorInterval(t,(()=>{_(t)}),e)})(t);const e=()=>{(t=>{t.undoManager.transact((()=>{D(t),y(t)})),t.focus()})(t)};t.ui.registry.addButton("restoredraft",{tooltip:"Restore last draft",icon:"restore-draft",onAction:e,onSetup:I(t)}),t.ui.registry.addMenuItem("restoredraft",{text:"Restore last draft",icon:"restore-draft",onAction:e,onSetup:I(t)})};t.add("autosave",(t=>((t=>{const r=t.options.register,o=t=>{const r=e(t);return r?{value:u(t),valid:r}:{valid:!1,message:"Must be a string."}};r("autosave_ask_before_unload",{processor:"boolean",default:!0}),r("autosave_prefix",{processor:"string",default:"tinymce-autosave-{path}{query}{hash}-{id}-"}),r("autosave_restore_when_empty",{processor:"boolean",default:!1}),r("autosave_interval",{processor:o,default:"30s"}),r("autosave_retention",{processor:o,default:"20m"})})(t),(t=>{t.editorManager.on("BeforeUnload",(t=>{let e;i.each(h.get(),(t=>{t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&c(t)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))})),e&&(t.preventDefault(),t.returnValue=e)}))})(t),b(t),t.on("init",(()=>{m(t)&&t.dom.isEmpty(t.getBody())&&D(t)})),(t=>({hasDraft:()=>g(t),storeDraft:()=>_(t),restoreDraft:()=>D(t),removeDraft:e=>y(t,e),isEmpty:e=>p(t,e)}))(t))))}()),t}export{r as __require};
2
+ //# sourceMappingURL=plugin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.mjs","sources":["../../../../../../node_modules/tinymce/plugins/autosave/plugin.js"],"sourcesContent":["/**\n * TinyMCE version 6.8.5 (TBD)\n */\n\n(function () {\n 'use strict';\n\n var global$4 = tinymce.util.Tools.resolve('tinymce.PluginManager');\n\n const hasProto = (v, constructor, predicate) => {\n var _a;\n if (predicate(v, constructor.prototype)) {\n return true;\n } else {\n return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;\n }\n };\n const typeOf = x => {\n const t = typeof x;\n if (x === null) {\n return 'null';\n } else if (t === 'object' && Array.isArray(x)) {\n return 'array';\n } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {\n return 'string';\n } else {\n return t;\n }\n };\n const isType = type => value => typeOf(value) === type;\n const eq = t => a => t === a;\n const isString = isType('string');\n const isUndefined = eq(undefined);\n\n var global$3 = tinymce.util.Tools.resolve('tinymce.util.Delay');\n\n var global$2 = tinymce.util.Tools.resolve('tinymce.util.LocalStorage');\n\n var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');\n\n const fireRestoreDraft = editor => editor.dispatch('RestoreDraft');\n const fireStoreDraft = editor => editor.dispatch('StoreDraft');\n const fireRemoveDraft = editor => editor.dispatch('RemoveDraft');\n\n const parse = timeString => {\n const multiples = {\n s: 1000,\n m: 60000\n };\n const parsedTime = /^(\\d+)([ms]?)$/.exec(timeString);\n return (parsedTime && parsedTime[2] ? multiples[parsedTime[2]] : 1) * parseInt(timeString, 10);\n };\n\n const option = name => editor => editor.options.get(name);\n const register$1 = editor => {\n const registerOption = editor.options.register;\n const timeProcessor = value => {\n const valid = isString(value);\n if (valid) {\n return {\n value: parse(value),\n valid\n };\n } else {\n return {\n valid: false,\n message: 'Must be a string.'\n };\n }\n };\n registerOption('autosave_ask_before_unload', {\n processor: 'boolean',\n default: true\n });\n registerOption('autosave_prefix', {\n processor: 'string',\n default: 'tinymce-autosave-{path}{query}{hash}-{id}-'\n });\n registerOption('autosave_restore_when_empty', {\n processor: 'boolean',\n default: false\n });\n registerOption('autosave_interval', {\n processor: timeProcessor,\n default: '30s'\n });\n registerOption('autosave_retention', {\n processor: timeProcessor,\n default: '20m'\n });\n };\n const shouldAskBeforeUnload = option('autosave_ask_before_unload');\n const shouldRestoreWhenEmpty = option('autosave_restore_when_empty');\n const getAutoSaveInterval = option('autosave_interval');\n const getAutoSaveRetention = option('autosave_retention');\n const getAutoSavePrefix = editor => {\n const location = document.location;\n return editor.options.get('autosave_prefix').replace(/{path}/g, location.pathname).replace(/{query}/g, location.search).replace(/{hash}/g, location.hash).replace(/{id}/g, editor.id);\n };\n\n const isEmpty = (editor, html) => {\n if (isUndefined(html)) {\n return editor.dom.isEmpty(editor.getBody());\n } else {\n const trimmedHtml = global$1.trim(html);\n if (trimmedHtml === '') {\n return true;\n } else {\n const fragment = new DOMParser().parseFromString(trimmedHtml, 'text/html');\n return editor.dom.isEmpty(fragment);\n }\n }\n };\n const hasDraft = editor => {\n var _a;\n const time = parseInt((_a = global$2.getItem(getAutoSavePrefix(editor) + 'time')) !== null && _a !== void 0 ? _a : '0', 10) || 0;\n if (new Date().getTime() - time > getAutoSaveRetention(editor)) {\n removeDraft(editor, false);\n return false;\n }\n return true;\n };\n const removeDraft = (editor, fire) => {\n const prefix = getAutoSavePrefix(editor);\n global$2.removeItem(prefix + 'draft');\n global$2.removeItem(prefix + 'time');\n if (fire !== false) {\n fireRemoveDraft(editor);\n }\n };\n const storeDraft = editor => {\n const prefix = getAutoSavePrefix(editor);\n if (!isEmpty(editor) && editor.isDirty()) {\n global$2.setItem(prefix + 'draft', editor.getContent({\n format: 'raw',\n no_events: true\n }));\n global$2.setItem(prefix + 'time', new Date().getTime().toString());\n fireStoreDraft(editor);\n }\n };\n const restoreDraft = editor => {\n var _a;\n const prefix = getAutoSavePrefix(editor);\n if (hasDraft(editor)) {\n editor.setContent((_a = global$2.getItem(prefix + 'draft')) !== null && _a !== void 0 ? _a : '', { format: 'raw' });\n fireRestoreDraft(editor);\n }\n };\n const startStoreDraft = editor => {\n const interval = getAutoSaveInterval(editor);\n global$3.setEditorInterval(editor, () => {\n storeDraft(editor);\n }, interval);\n };\n const restoreLastDraft = editor => {\n editor.undoManager.transact(() => {\n restoreDraft(editor);\n removeDraft(editor);\n });\n editor.focus();\n };\n\n const get = editor => ({\n hasDraft: () => hasDraft(editor),\n storeDraft: () => storeDraft(editor),\n restoreDraft: () => restoreDraft(editor),\n removeDraft: fire => removeDraft(editor, fire),\n isEmpty: html => isEmpty(editor, html)\n });\n\n var global = tinymce.util.Tools.resolve('tinymce.EditorManager');\n\n const setup = editor => {\n editor.editorManager.on('BeforeUnload', e => {\n let msg;\n global$1.each(global.get(), editor => {\n if (editor.plugins.autosave) {\n editor.plugins.autosave.storeDraft();\n }\n if (!msg && editor.isDirty() && shouldAskBeforeUnload(editor)) {\n msg = editor.translate('You have unsaved changes are you sure you want to navigate away?');\n }\n });\n if (msg) {\n e.preventDefault();\n e.returnValue = msg;\n }\n });\n };\n\n const makeSetupHandler = editor => api => {\n api.setEnabled(hasDraft(editor));\n const editorEventCallback = () => api.setEnabled(hasDraft(editor));\n editor.on('StoreDraft RestoreDraft RemoveDraft', editorEventCallback);\n return () => editor.off('StoreDraft RestoreDraft RemoveDraft', editorEventCallback);\n };\n const register = editor => {\n startStoreDraft(editor);\n const onAction = () => {\n restoreLastDraft(editor);\n };\n editor.ui.registry.addButton('restoredraft', {\n tooltip: 'Restore last draft',\n icon: 'restore-draft',\n onAction,\n onSetup: makeSetupHandler(editor)\n });\n editor.ui.registry.addMenuItem('restoredraft', {\n text: 'Restore last draft',\n icon: 'restore-draft',\n onAction,\n onSetup: makeSetupHandler(editor)\n });\n };\n\n var Plugin = () => {\n global$4.add('autosave', editor => {\n register$1(editor);\n setup(editor);\n register(editor);\n editor.on('init', () => {\n if (shouldRestoreWhenEmpty(editor) && editor.dom.isEmpty(editor.getBody())) {\n restoreDraft(editor);\n }\n });\n return get(editor);\n });\n };\n\n Plugin();\n\n})();\n"],"names":["global$4","tinymce","util","Tools","resolve","isString","type","value","x","t","Array","isArray","o","v","constructor","String","prototype","isPrototypeOf","_a","name","typeOf","isUndefined","undefined","a","global$3","global$2","global$1","parse","timeString","parsedTime","exec","s","m","parseInt","option","editor","options","get","shouldAskBeforeUnload","shouldRestoreWhenEmpty","getAutoSaveInterval","getAutoSaveRetention","getAutoSavePrefix","location","document","replace","pathname","search","hash","id","isEmpty","html","dom","getBody","trimmedHtml","trim","fragment","DOMParser","parseFromString","hasDraft","time","getItem","Date","getTime","removeDraft","fire","prefix","removeItem","dispatch","fireRemoveDraft","storeDraft","isDirty","setItem","getContent","format","no_events","toString","fireStoreDraft","restoreDraft","setContent","fireRestoreDraft","global","makeSetupHandler","api","setEnabled","editorEventCallback","on","off","register","interval","setEditorInterval","startStoreDraft","onAction","undoManager","transact","focus","restoreLastDraft","ui","registry","addButton","tooltip","icon","onSetup","addMenuItem","text","add","registerOption","timeProcessor","valid","message","processor","default","register$1","editorManager","e","msg","each","plugins","autosave","translate","preventDefault","returnValue","setup"],"mappings":"gGAIA,WAGI,IAAIA,EAAWC,QAAQC,KAAKC,MAAMC,QAAQ,yBAE1C,MAsBMC,GAFSC,EAES,SAFDC,GAZRC,KACb,MAAMC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pDgF,EAAMhF,EAAOoF,UAAU,oEACnC,IAEYJ,IACFD,EAAEM,iBACFN,EAAEO,YAAcN,EAC1B,GACQ,EA+BAO,CAAMvF,GACNqD,EAASrD,GACTA,EAAOmD,GAAG,QAAQ,KACZ/C,EAAuBJ,IAAWA,EAAOiB,IAAIF,QAAQf,EAAOkB,YAC9DyB,EAAa3C,EACzB,IA7DgBA,KAAW,CACrBwB,SAAU,IAAMA,EAASxB,GACzBmC,WAAY,IAAMA,EAAWnC,GAC7B2C,aAAc,IAAMA,EAAa3C,GACjC6B,YAAaC,GAAQD,EAAY7B,EAAQ8B,GACzCf,QAASC,GAAQD,EAAQf,EAAQgB,KA0DxBd,CAAIF,KAMlB,CApOD"}
@@ -0,0 +1,2 @@
1
+ import{__exports as e}from"../../../../_virtual/plugin34.mjs";var t;function r(){return t||(t=1,function(){var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=(e,t)=>{const r=((e,t)=>e.dispatch("insertCustomChar",{chr:t}))(e,t).chr;e.execCommand("mceInsertContent",!1,r)},r=e=>t=>e===t,a=(n="array",e=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(r=a=e,(n=String).prototype.isPrototypeOf(r)||(null===(i=a.constructor)||void 0===i?void 0:i.name)===n.name)?"string":t;var r,a,n,i})(e)===n);var n;const i=r(null),o=r(void 0),s=(e=>t=>typeof t===e)("function"),l=(c=!1,()=>c);var c;class u{constructor(e,t){this.tag=e,this.value=t}static some(e){return new u(!0,e)}static none(){return u.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?u.some(e(this.value)):u.none()}bind(e){return this.tag?e(this.value):u.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:u.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return(e=>null==e)(e)?u.none():u.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}u.singletonNone=new u(!1);const g=Array.prototype.push,h=(e,t)=>{const r=e.length,a=new Array(r);for(let n=0;n<r;n++){const r=e[n];a[n]=t(r,n)}return a},m=(e,t)=>((e,t,r)=>{for(let a=0,n=e.length;a<n;a++){const n=e[a];if(t(n,a))return u.some(n);if(r(n,a))break}return u.none()})(e,t,l),p=(e,t)=>(e=>{const t=[];for(let r=0,n=e.length;r<n;++r){if(!a(e[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+e);g.apply(t,e[r])}return t})(h(e,t));var d=tinymce.util.Tools.resolve("tinymce.util.Tools");const f=e=>t=>t.options.get(e),y=f("charmap"),b=f("charmap_append"),v=d.isArray,w="User Defined",k=e=>{return v(e)?(t=e,d.grep(t,(e=>v(e)&&2===e.length))):"function"==typeof e?e():[];var t},C=e=>{const t=((e,t)=>{const r=y(e);r&&(t=[{name:w,characters:k(r)}]);const a=b(e);if(a){const e=d.grep(t,(e=>e.name===w));return e.length?(e[0].characters=[...e[0].characters,...k(a)],t):t.concat({name:w,characters:k(a)})}return t})(e,[{name:"Currency",characters:[[36,"dollar sign"],[162,"cent sign"],[8364,"euro sign"],[163,"pound sign"],[165,"yen sign"],[164,"currency sign"],[8352,"euro-currency sign"],[8353,"colon sign"],[8354,"cruzeiro sign"],[8355,"french franc sign"],[8356,"lira sign"],[8357,"mill sign"],[8358,"naira sign"],[8359,"peseta sign"],[8360,"rupee sign"],[8361,"won sign"],[8362,"new sheqel sign"],[8363,"dong sign"],[8365,"kip sign"],[8366,"tugrik sign"],[8367,"drachma sign"],[8368,"german penny symbol"],[8369,"peso sign"],[8370,"guarani sign"],[8371,"austral sign"],[8372,"hryvnia sign"],[8373,"cedi sign"],[8374,"livre tournois sign"],[8375,"spesmilo sign"],[8376,"tenge sign"],[8377,"indian rupee sign"],[8378,"turkish lira sign"],[8379,"nordic mark sign"],[8380,"manat sign"],[8381,"ruble sign"],[20870,"yen character"],[20803,"yuan character"],[22291,"yuan character, in hong kong and taiwan"],[22278,"yen/yuan character variant one"]]},{name:"Text",characters:[[169,"copyright sign"],[174,"registered sign"],[8482,"trade mark sign"],[8240,"per mille sign"],[181,"micro sign"],[183,"middle dot"],[8226,"bullet"],[8230,"three dot leader"],[8242,"minutes / feet"],[8243,"seconds / inches"],[167,"section sign"],[182,"paragraph sign"],[223,"sharp s / ess-zed"]]},{name:"Quotations",characters:[[8249,"single left-pointing angle quotation mark"],[8250,"single right-pointing angle quotation mark"],[171,"left pointing guillemet"],[187,"right pointing guillemet"],[8216,"left single quotation mark"],[8217,"right single quotation mark"],[8220,"left double quotation mark"],[8221,"right double quotation mark"],[8218,"single low-9 quotation mark"],[8222,"double low-9 quotation mark"],[60,"less-than sign"],[62,"greater-than sign"],[8804,"less-than or equal to"],[8805,"greater-than or equal to"],[8211,"en dash"],[8212,"em dash"],[175,"macron"],[8254,"overline"],[164,"currency sign"],[166,"broken bar"],[168,"diaeresis"],[161,"inverted exclamation mark"],[191,"turned question mark"],[710,"circumflex accent"],[732,"small tilde"],[176,"degree sign"],[8722,"minus sign"],[177,"plus-minus sign"],[247,"division sign"],[8260,"fraction slash"],[215,"multiplication sign"],[185,"superscript one"],[178,"superscript two"],[179,"superscript three"],[188,"fraction one quarter"],[189,"fraction one half"],[190,"fraction three quarters"]]},{name:"Mathematical",characters:[[402,"function / florin"],[8747,"integral"],[8721,"n-ary sumation"],[8734,"infinity"],[8730,"square root"],[8764,"similar to"],[8773,"approximately equal to"],[8776,"almost equal to"],[8800,"not equal to"],[8801,"identical to"],[8712,"element of"],[8713,"not an element of"],[8715,"contains as member"],[8719,"n-ary product"],[8743,"logical and"],[8744,"logical or"],[172,"not sign"],[8745,"intersection"],[8746,"union"],[8706,"partial differential"],[8704,"for all"],[8707,"there exists"],[8709,"diameter"],[8711,"backward difference"],[8727,"asterisk operator"],[8733,"proportional to"],[8736,"angle"]]},{name:"Extended Latin",characters:[[192,"A - grave"],[193,"A - acute"],[194,"A - circumflex"],[195,"A - tilde"],[196,"A - diaeresis"],[197,"A - ring above"],[256,"A - macron"],[198,"ligature AE"],[199,"C - cedilla"],[200,"E - grave"],[201,"E - acute"],[202,"E - circumflex"],[203,"E - diaeresis"],[274,"E - macron"],[204,"I - grave"],[205,"I - acute"],[206,"I - circumflex"],[207,"I - diaeresis"],[298,"I - macron"],[208,"ETH"],[209,"N - tilde"],[210,"O - grave"],[211,"O - acute"],[212,"O - circumflex"],[213,"O - tilde"],[214,"O - diaeresis"],[216,"O - slash"],[332,"O - macron"],[338,"ligature OE"],[352,"S - caron"],[217,"U - grave"],[218,"U - acute"],[219,"U - circumflex"],[220,"U - diaeresis"],[362,"U - macron"],[221,"Y - acute"],[376,"Y - diaeresis"],[562,"Y - macron"],[222,"THORN"],[224,"a - grave"],[225,"a - acute"],[226,"a - circumflex"],[227,"a - tilde"],[228,"a - diaeresis"],[229,"a - ring above"],[257,"a - macron"],[230,"ligature ae"],[231,"c - cedilla"],[232,"e - grave"],[233,"e - acute"],[234,"e - circumflex"],[235,"e - diaeresis"],[275,"e - macron"],[236,"i - grave"],[237,"i - acute"],[238,"i - circumflex"],[239,"i - diaeresis"],[299,"i - macron"],[240,"eth"],[241,"n - tilde"],[242,"o - grave"],[243,"o - acute"],[244,"o - circumflex"],[245,"o - tilde"],[246,"o - diaeresis"],[248,"o slash"],[333,"o macron"],[339,"ligature oe"],[353,"s - caron"],[249,"u - grave"],[250,"u - acute"],[251,"u - circumflex"],[252,"u - diaeresis"],[363,"u - macron"],[253,"y - acute"],[254,"thorn"],[255,"y - diaeresis"],[563,"y - macron"],[913,"Alpha"],[914,"Beta"],[915,"Gamma"],[916,"Delta"],[917,"Epsilon"],[918,"Zeta"],[919,"Eta"],[920,"Theta"],[921,"Iota"],[922,"Kappa"],[923,"Lambda"],[924,"Mu"],[925,"Nu"],[926,"Xi"],[927,"Omicron"],[928,"Pi"],[929,"Rho"],[931,"Sigma"],[932,"Tau"],[933,"Upsilon"],[934,"Phi"],[935,"Chi"],[936,"Psi"],[937,"Omega"],[945,"alpha"],[946,"beta"],[947,"gamma"],[948,"delta"],[949,"epsilon"],[950,"zeta"],[951,"eta"],[952,"theta"],[953,"iota"],[954,"kappa"],[955,"lambda"],[956,"mu"],[957,"nu"],[958,"xi"],[959,"omicron"],[960,"pi"],[961,"rho"],[962,"final sigma"],[963,"sigma"],[964,"tau"],[965,"upsilon"],[966,"phi"],[967,"chi"],[968,"psi"],[969,"omega"]]},{name:"Symbols",characters:[[8501,"alef symbol"],[982,"pi symbol"],[8476,"real part symbol"],[978,"upsilon - hook symbol"],[8472,"Weierstrass p"],[8465,"imaginary part"]]},{name:"Arrows",characters:[[8592,"leftwards arrow"],[8593,"upwards arrow"],[8594,"rightwards arrow"],[8595,"downwards arrow"],[8596,"left right arrow"],[8629,"carriage return"],[8656,"leftwards double arrow"],[8657,"upwards double arrow"],[8658,"rightwards double arrow"],[8659,"downwards double arrow"],[8660,"left right double arrow"],[8756,"therefore"],[8834,"subset of"],[8835,"superset of"],[8836,"not a subset of"],[8838,"subset of or equal to"],[8839,"superset of or equal to"],[8853,"circled plus"],[8855,"circled times"],[8869,"perpendicular"],[8901,"dot operator"],[8968,"left ceiling"],[8969,"right ceiling"],[8970,"left floor"],[8971,"right floor"],[9001,"left-pointing angle bracket"],[9002,"right-pointing angle bracket"],[9674,"lozenge"],[9824,"black spade suit"],[9827,"black club suit"],[9829,"black heart suit"],[9830,"black diamond suit"],[8194,"en space"],[8195,"em space"],[8201,"thin space"],[8204,"zero width non-joiner"],[8205,"zero width joiner"],[8206,"left-to-right mark"],[8207,"right-to-left mark"]]}]);return t.length>1?[{name:"All",characters:p(t,(e=>e.characters))}].concat(t):t},x=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},A=(e,t,r=0,a)=>{const n=e.indexOf(t,r);return-1!==n&&(!!o(a)||n+t.length<=a)},q=String.fromCodePoint,O=(e,t)=>{const r=[],a=t.toLowerCase();return((e,t)=>{for(let r=0,a=e.length;r<a;r++)t(e[r],r)})(e.characters,(e=>{((e,t,r)=>!!A(q(e).toLowerCase(),r)||A(t.toLowerCase(),r)||A(t.toLowerCase().replace(/\s+/g,""),r))(e[0],e[1],a)&&r.push(e)})),h(r,(e=>({text:e[1],value:q(e[0]),icon:q(e[0])})))},E="pattern",S=(e,r)=>{const a=()=>[{label:"Search",type:"input",name:E},{type:"collection",name:"results"}],n=1===r.length?x(w):x("All"),o=((e,t)=>{let r=null;const a=()=>{i(r)||(clearTimeout(r),r=null)};return{cancel:a,throttle:(...n)=>{a(),r=setTimeout((()=>{r=null,e.apply(null,n)}),t)}}})((e=>{const t=e.getData().pattern;((e,t)=>{m(r,(e=>e.name===n.get())).each((r=>{const a=O(r,t);e.setData({results:a})}))})(e,t)}),40),s={title:"Special Character",size:"normal",body:1===r.length?{type:"panel",items:a()}:{type:"tabpanel",tabs:h(r,(e=>({title:e.name,name:e.name,items:a()})))},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{pattern:"",results:O(r[0],"")},onAction:(r,a)=>{"results"===a.name&&(t(e,a.value),r.close())},onTabChange:(e,t)=>{n.set(t.newTabName),o.throttle(e)},onChange:(e,t)=>{t.name===E&&o.throttle(e)}};e.windowManager.open(s).focus(E)},T=e=>t=>{const r=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",r),r(),()=>{e.off("NodeChange",r)}};e.add("charmap",(e=>{(e=>{const t=e.options.register,r=e=>s(e)||a(e);t("charmap",{processor:r}),t("charmap_append",{processor:r})})(e);const r=C(e);return((e,t)=>{e.addCommand("mceShowCharmap",(()=>{S(e,t)}))})(e,r),(e=>{const t=()=>e.execCommand("mceShowCharmap");e.ui.registry.addButton("charmap",{icon:"insert-character",tooltip:"Special character",onAction:t,onSetup:T(e)}),e.ui.registry.addMenuItem("charmap",{icon:"insert-character",text:"Special character...",onAction:t,onSetup:T(e)})})(e),((e,t)=>{e.ui.registry.addAutocompleter("charmap",{trigger:":",columns:"auto",minChars:2,fetch:(e,r)=>new Promise(((r,a)=>{r(O(t,e))})),onAction:(t,r,a)=>{e.selection.setRng(r),e.insertContent(a),t.hide()}})})(e,r[0]),(e=>({getCharMap:()=>C(e),insertChar:r=>{t(e,r)}}))(e)}))}()),e}export{r as __require};
2
+ //# sourceMappingURL=plugin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.mjs","sources":["../../../../../../node_modules/tinymce/plugins/charmap/plugin.js"],"sourcesContent":["/**\n * TinyMCE version 6.8.5 (TBD)\n */\n\n(function () {\n 'use strict';\n\n var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');\n\n const fireInsertCustomChar = (editor, chr) => {\n return editor.dispatch('insertCustomChar', { chr });\n };\n\n const insertChar = (editor, chr) => {\n const evtChr = fireInsertCustomChar(editor, chr).chr;\n editor.execCommand('mceInsertContent', false, evtChr);\n };\n\n const hasProto = (v, constructor, predicate) => {\n var _a;\n if (predicate(v, constructor.prototype)) {\n return true;\n } else {\n return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;\n }\n };\n const typeOf = x => {\n const t = typeof x;\n if (x === null) {\n return 'null';\n } else if (t === 'object' && Array.isArray(x)) {\n return 'array';\n } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {\n return 'string';\n } else {\n return t;\n }\n };\n const isType = type => value => typeOf(value) === type;\n const isSimpleType = type => value => typeof value === type;\n const eq = t => a => t === a;\n const isArray$1 = isType('array');\n const isNull = eq(null);\n const isUndefined = eq(undefined);\n const isNullable = a => a === null || a === undefined;\n const isNonNullable = a => !isNullable(a);\n const isFunction = isSimpleType('function');\n\n const constant = value => {\n return () => {\n return value;\n };\n };\n const never = constant(false);\n\n class Optional {\n constructor(tag, value) {\n this.tag = tag;\n this.value = value;\n }\n static some(value) {\n return new Optional(true, value);\n }\n static none() {\n return Optional.singletonNone;\n }\n fold(onNone, onSome) {\n if (this.tag) {\n return onSome(this.value);\n } else {\n return onNone();\n }\n }\n isSome() {\n return this.tag;\n }\n isNone() {\n return !this.tag;\n }\n map(mapper) {\n if (this.tag) {\n return Optional.some(mapper(this.value));\n } else {\n return Optional.none();\n }\n }\n bind(binder) {\n if (this.tag) {\n return binder(this.value);\n } else {\n return Optional.none();\n }\n }\n exists(predicate) {\n return this.tag && predicate(this.value);\n }\n forall(predicate) {\n return !this.tag || predicate(this.value);\n }\n filter(predicate) {\n if (!this.tag || predicate(this.value)) {\n return this;\n } else {\n return Optional.none();\n }\n }\n getOr(replacement) {\n return this.tag ? this.value : replacement;\n }\n or(replacement) {\n return this.tag ? this : replacement;\n }\n getOrThunk(thunk) {\n return this.tag ? this.value : thunk();\n }\n orThunk(thunk) {\n return this.tag ? this : thunk();\n }\n getOrDie(message) {\n if (!this.tag) {\n throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');\n } else {\n return this.value;\n }\n }\n static from(value) {\n return isNonNullable(value) ? Optional.some(value) : Optional.none();\n }\n getOrNull() {\n return this.tag ? this.value : null;\n }\n getOrUndefined() {\n return this.value;\n }\n each(worker) {\n if (this.tag) {\n worker(this.value);\n }\n }\n toArray() {\n return this.tag ? [this.value] : [];\n }\n toString() {\n return this.tag ? `some(${ this.value })` : 'none()';\n }\n }\n Optional.singletonNone = new Optional(false);\n\n const nativePush = Array.prototype.push;\n const map = (xs, f) => {\n const len = xs.length;\n const r = new Array(len);\n for (let i = 0; i < len; i++) {\n const x = xs[i];\n r[i] = f(x, i);\n }\n return r;\n };\n const each = (xs, f) => {\n for (let i = 0, len = xs.length; i < len; i++) {\n const x = xs[i];\n f(x, i);\n }\n };\n const findUntil = (xs, pred, until) => {\n for (let i = 0, len = xs.length; i < len; i++) {\n const x = xs[i];\n if (pred(x, i)) {\n return Optional.some(x);\n } else if (until(x, i)) {\n break;\n }\n }\n return Optional.none();\n };\n const find = (xs, pred) => {\n return findUntil(xs, pred, never);\n };\n const flatten = xs => {\n const r = [];\n for (let i = 0, len = xs.length; i < len; ++i) {\n if (!isArray$1(xs[i])) {\n throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);\n }\n nativePush.apply(r, xs[i]);\n }\n return r;\n };\n const bind = (xs, f) => flatten(map(xs, f));\n\n var global = tinymce.util.Tools.resolve('tinymce.util.Tools');\n\n const option = name => editor => editor.options.get(name);\n const register$2 = editor => {\n const registerOption = editor.options.register;\n const charMapProcessor = value => isFunction(value) || isArray$1(value);\n registerOption('charmap', { processor: charMapProcessor });\n registerOption('charmap_append', { processor: charMapProcessor });\n };\n const getCharMap$1 = option('charmap');\n const getCharMapAppend = option('charmap_append');\n\n const isArray = global.isArray;\n const UserDefined = 'User Defined';\n const getDefaultCharMap = () => {\n return [\n {\n name: 'Currency',\n characters: [\n [\n 36,\n 'dollar sign'\n ],\n [\n 162,\n 'cent sign'\n ],\n [\n 8364,\n 'euro sign'\n ],\n [\n 163,\n 'pound sign'\n ],\n [\n 165,\n 'yen sign'\n ],\n [\n 164,\n 'currency sign'\n ],\n [\n 8352,\n 'euro-currency sign'\n ],\n [\n 8353,\n 'colon sign'\n ],\n [\n 8354,\n 'cruzeiro sign'\n ],\n [\n 8355,\n 'french franc sign'\n ],\n [\n 8356,\n 'lira sign'\n ],\n [\n 8357,\n 'mill sign'\n ],\n [\n 8358,\n 'naira sign'\n ],\n [\n 8359,\n 'peseta sign'\n ],\n [\n 8360,\n 'rupee sign'\n ],\n [\n 8361,\n 'won sign'\n ],\n [\n 8362,\n 'new sheqel sign'\n ],\n [\n 8363,\n 'dong sign'\n ],\n [\n 8365,\n 'kip sign'\n ],\n [\n 8366,\n 'tugrik sign'\n ],\n [\n 8367,\n 'drachma sign'\n ],\n [\n 8368,\n 'german penny symbol'\n ],\n [\n 8369,\n 'peso sign'\n ],\n [\n 8370,\n 'guarani sign'\n ],\n [\n 8371,\n 'austral sign'\n ],\n [\n 8372,\n 'hryvnia sign'\n ],\n [\n 8373,\n 'cedi sign'\n ],\n [\n 8374,\n 'livre tournois sign'\n ],\n [\n 8375,\n 'spesmilo sign'\n ],\n [\n 8376,\n 'tenge sign'\n ],\n [\n 8377,\n 'indian rupee sign'\n ],\n [\n 8378,\n 'turkish lira sign'\n ],\n [\n 8379,\n 'nordic mark sign'\n ],\n [\n 8380,\n 'manat sign'\n ],\n [\n 8381,\n 'ruble sign'\n ],\n [\n 20870,\n 'yen character'\n ],\n [\n 20803,\n 'yuan character'\n ],\n [\n 22291,\n 'yuan character, in hong kong and taiwan'\n ],\n [\n 22278,\n 'yen/yuan character variant one'\n ]\n ]\n },\n {\n name: 'Text',\n characters: [\n [\n 169,\n 'copyright sign'\n ],\n [\n 174,\n 'registered sign'\n ],\n [\n 8482,\n 'trade mark sign'\n ],\n [\n 8240,\n 'per mille sign'\n ],\n [\n 181,\n 'micro sign'\n ],\n [\n 183,\n 'middle dot'\n ],\n [\n 8226,\n 'bullet'\n ],\n [\n 8230,\n 'three dot leader'\n ],\n [\n 8242,\n 'minutes / feet'\n ],\n [\n 8243,\n 'seconds / inches'\n ],\n [\n 167,\n 'section sign'\n ],\n [\n 182,\n 'paragraph sign'\n ],\n [\n 223,\n 'sharp s / ess-zed'\n ]\n ]\n },\n {\n name: 'Quotations',\n characters: [\n [\n 8249,\n 'single left-pointing angle quotation mark'\n ],\n [\n 8250,\n 'single right-pointing angle quotation mark'\n ],\n [\n 171,\n 'left pointing guillemet'\n ],\n [\n 187,\n 'right pointing guillemet'\n ],\n [\n 8216,\n 'left single quotation mark'\n ],\n [\n 8217,\n 'right single quotation mark'\n ],\n [\n 8220,\n 'left double quotation mark'\n ],\n [\n 8221,\n 'right double quotation mark'\n ],\n [\n 8218,\n 'single low-9 quotation mark'\n ],\n [\n 8222,\n 'double low-9 quotation mark'\n ],\n [\n 60,\n 'less-than sign'\n ],\n [\n 62,\n 'greater-than sign'\n ],\n [\n 8804,\n 'less-than or equal to'\n ],\n [\n 8805,\n 'greater-than or equal to'\n ],\n [\n 8211,\n 'en dash'\n ],\n [\n 8212,\n 'em dash'\n ],\n [\n 175,\n 'macron'\n ],\n [\n 8254,\n 'overline'\n ],\n [\n 164,\n 'currency sign'\n ],\n [\n 166,\n 'broken bar'\n ],\n [\n 168,\n 'diaeresis'\n ],\n [\n 161,\n 'inverted exclamation mark'\n ],\n [\n 191,\n 'turned question mark'\n ],\n [\n 710,\n 'circumflex accent'\n ],\n [\n 732,\n 'small tilde'\n ],\n [\n 176,\n 'degree sign'\n ],\n [\n 8722,\n 'minus sign'\n ],\n [\n 177,\n 'plus-minus sign'\n ],\n [\n 247,\n 'division sign'\n ],\n [\n 8260,\n 'fraction slash'\n ],\n [\n 215,\n 'multiplication sign'\n ],\n [\n 185,\n 'superscript one'\n ],\n [\n 178,\n 'superscript two'\n ],\n [\n 179,\n 'superscript three'\n ],\n [\n 188,\n 'fraction one quarter'\n ],\n [\n 189,\n 'fraction one half'\n ],\n [\n 190,\n 'fraction three quarters'\n ]\n ]\n },\n {\n name: 'Mathematical',\n characters: [\n [\n 402,\n 'function / florin'\n ],\n [\n 8747,\n 'integral'\n ],\n [\n 8721,\n 'n-ary sumation'\n ],\n [\n 8734,\n 'infinity'\n ],\n [\n 8730,\n 'square root'\n ],\n [\n 8764,\n 'similar to'\n ],\n [\n 8773,\n 'approximately equal to'\n ],\n [\n 8776,\n 'almost equal to'\n ],\n [\n 8800,\n 'not equal to'\n ],\n [\n 8801,\n 'identical to'\n ],\n [\n 8712,\n 'element of'\n ],\n [\n 8713,\n 'not an element of'\n ],\n [\n 8715,\n 'contains as member'\n ],\n [\n 8719,\n 'n-ary product'\n ],\n [\n 8743,\n 'logical and'\n ],\n [\n 8744,\n 'logical or'\n ],\n [\n 172,\n 'not sign'\n ],\n [\n 8745,\n 'intersection'\n ],\n [\n 8746,\n 'union'\n ],\n [\n 8706,\n 'partial differential'\n ],\n [\n 8704,\n 'for all'\n ],\n [\n 8707,\n 'there exists'\n ],\n [\n 8709,\n 'diameter'\n ],\n [\n 8711,\n 'backward difference'\n ],\n [\n 8727,\n 'asterisk operator'\n ],\n [\n 8733,\n 'proportional to'\n ],\n [\n 8736,\n 'angle'\n ]\n ]\n },\n {\n name: 'Extended Latin',\n characters: [\n [\n 192,\n 'A - grave'\n ],\n [\n 193,\n 'A - acute'\n ],\n [\n 194,\n 'A - circumflex'\n ],\n [\n 195,\n 'A - tilde'\n ],\n [\n 196,\n 'A - diaeresis'\n ],\n [\n 197,\n 'A - ring above'\n ],\n [\n 256,\n 'A - macron'\n ],\n [\n 198,\n 'ligature AE'\n ],\n [\n 199,\n 'C - cedilla'\n ],\n [\n 200,\n 'E - grave'\n ],\n [\n 201,\n 'E - acute'\n ],\n [\n 202,\n 'E - circumflex'\n ],\n [\n 203,\n 'E - diaeresis'\n ],\n [\n 274,\n 'E - macron'\n ],\n [\n 204,\n 'I - grave'\n ],\n [\n 205,\n 'I - acute'\n ],\n [\n 206,\n 'I - circumflex'\n ],\n [\n 207,\n 'I - diaeresis'\n ],\n [\n 298,\n 'I - macron'\n ],\n [\n 208,\n 'ETH'\n ],\n [\n 209,\n 'N - tilde'\n ],\n [\n 210,\n 'O - grave'\n ],\n [\n 211,\n 'O - acute'\n ],\n [\n 212,\n 'O - circumflex'\n ],\n [\n 213,\n 'O - tilde'\n ],\n [\n 214,\n 'O - diaeresis'\n ],\n [\n 216,\n 'O - slash'\n ],\n [\n 332,\n 'O - macron'\n ],\n [\n 338,\n 'ligature OE'\n ],\n [\n 352,\n 'S - caron'\n ],\n [\n 217,\n 'U - grave'\n ],\n [\n 218,\n 'U - acute'\n ],\n [\n 219,\n 'U - circumflex'\n ],\n [\n 220,\n 'U - diaeresis'\n ],\n [\n 362,\n 'U - macron'\n ],\n [\n 221,\n 'Y - acute'\n ],\n [\n 376,\n 'Y - diaeresis'\n ],\n [\n 562,\n 'Y - macron'\n ],\n [\n 222,\n 'THORN'\n ],\n [\n 224,\n 'a - grave'\n ],\n [\n 225,\n 'a - acute'\n ],\n [\n 226,\n 'a - circumflex'\n ],\n [\n 227,\n 'a - tilde'\n ],\n [\n 228,\n 'a - diaeresis'\n ],\n [\n 229,\n 'a - ring above'\n ],\n [\n 257,\n 'a - macron'\n ],\n [\n 230,\n 'ligature ae'\n ],\n [\n 231,\n 'c - cedilla'\n ],\n [\n 232,\n 'e - grave'\n ],\n [\n 233,\n 'e - acute'\n ],\n [\n 234,\n 'e - circumflex'\n ],\n [\n 235,\n 'e - diaeresis'\n ],\n [\n 275,\n 'e - macron'\n ],\n [\n 236,\n 'i - grave'\n ],\n [\n 237,\n 'i - acute'\n ],\n [\n 238,\n 'i - circumflex'\n ],\n [\n 239,\n 'i - diaeresis'\n ],\n [\n 299,\n 'i - macron'\n ],\n [\n 240,\n 'eth'\n ],\n [\n 241,\n 'n - tilde'\n ],\n [\n 242,\n 'o - grave'\n ],\n [\n 243,\n 'o - acute'\n ],\n [\n 244,\n 'o - circumflex'\n ],\n [\n 245,\n 'o - tilde'\n ],\n [\n 246,\n 'o - diaeresis'\n ],\n [\n 248,\n 'o slash'\n ],\n [\n 333,\n 'o macron'\n ],\n [\n 339,\n 'ligature oe'\n ],\n [\n 353,\n 's - caron'\n ],\n [\n 249,\n 'u - grave'\n ],\n [\n 250,\n 'u - acute'\n ],\n [\n 251,\n 'u - circumflex'\n ],\n [\n 252,\n 'u - diaeresis'\n ],\n [\n 363,\n 'u - macron'\n ],\n [\n 253,\n 'y - acute'\n ],\n [\n 254,\n 'thorn'\n ],\n [\n 255,\n 'y - diaeresis'\n ],\n [\n 563,\n 'y - macron'\n ],\n [\n 913,\n 'Alpha'\n ],\n [\n 914,\n 'Beta'\n ],\n [\n 915,\n 'Gamma'\n ],\n [\n 916,\n 'Delta'\n ],\n [\n 917,\n 'Epsilon'\n ],\n [\n 918,\n 'Zeta'\n ],\n [\n 919,\n 'Eta'\n ],\n [\n 920,\n 'Theta'\n ],\n [\n 921,\n 'Iota'\n ],\n [\n 922,\n 'Kappa'\n ],\n [\n 923,\n 'Lambda'\n ],\n [\n 924,\n 'Mu'\n ],\n [\n 925,\n 'Nu'\n ],\n [\n 926,\n 'Xi'\n ],\n [\n 927,\n 'Omicron'\n ],\n [\n 928,\n 'Pi'\n ],\n [\n 929,\n 'Rho'\n ],\n [\n 931,\n 'Sigma'\n ],\n [\n 932,\n 'Tau'\n ],\n [\n 933,\n 'Upsilon'\n ],\n [\n 934,\n 'Phi'\n ],\n [\n 935,\n 'Chi'\n ],\n [\n 936,\n 'Psi'\n ],\n [\n 937,\n 'Omega'\n ],\n [\n 945,\n 'alpha'\n ],\n [\n 946,\n 'beta'\n ],\n [\n 947,\n 'gamma'\n ],\n [\n 948,\n 'delta'\n ],\n [\n 949,\n 'epsilon'\n ],\n [\n 950,\n 'zeta'\n ],\n [\n 951,\n 'eta'\n ],\n [\n 952,\n 'theta'\n ],\n [\n 953,\n 'iota'\n ],\n [\n 954,\n 'kappa'\n ],\n [\n 955,\n 'lambda'\n ],\n [\n 956,\n 'mu'\n ],\n [\n 957,\n 'nu'\n ],\n [\n 958,\n 'xi'\n ],\n [\n 959,\n 'omicron'\n ],\n [\n 960,\n 'pi'\n ],\n [\n 961,\n 'rho'\n ],\n [\n 962,\n 'final sigma'\n ],\n [\n 963,\n 'sigma'\n ],\n [\n 964,\n 'tau'\n ],\n [\n 965,\n 'upsilon'\n ],\n [\n 966,\n 'phi'\n ],\n [\n 967,\n 'chi'\n ],\n [\n 968,\n 'psi'\n ],\n [\n 969,\n 'omega'\n ]\n ]\n },\n {\n name: 'Symbols',\n characters: [\n [\n 8501,\n 'alef symbol'\n ],\n [\n 982,\n 'pi symbol'\n ],\n [\n 8476,\n 'real part symbol'\n ],\n [\n 978,\n 'upsilon - hook symbol'\n ],\n [\n 8472,\n 'Weierstrass p'\n ],\n [\n 8465,\n 'imaginary part'\n ]\n ]\n },\n {\n name: 'Arrows',\n characters: [\n [\n 8592,\n 'leftwards arrow'\n ],\n [\n 8593,\n 'upwards arrow'\n ],\n [\n 8594,\n 'rightwards arrow'\n ],\n [\n 8595,\n 'downwards arrow'\n ],\n [\n 8596,\n 'left right arrow'\n ],\n [\n 8629,\n 'carriage return'\n ],\n [\n 8656,\n 'leftwards double arrow'\n ],\n [\n 8657,\n 'upwards double arrow'\n ],\n [\n 8658,\n 'rightwards double arrow'\n ],\n [\n 8659,\n 'downwards double arrow'\n ],\n [\n 8660,\n 'left right double arrow'\n ],\n [\n 8756,\n 'therefore'\n ],\n [\n 8834,\n 'subset of'\n ],\n [\n 8835,\n 'superset of'\n ],\n [\n 8836,\n 'not a subset of'\n ],\n [\n 8838,\n 'subset of or equal to'\n ],\n [\n 8839,\n 'superset of or equal to'\n ],\n [\n 8853,\n 'circled plus'\n ],\n [\n 8855,\n 'circled times'\n ],\n [\n 8869,\n 'perpendicular'\n ],\n [\n 8901,\n 'dot operator'\n ],\n [\n 8968,\n 'left ceiling'\n ],\n [\n 8969,\n 'right ceiling'\n ],\n [\n 8970,\n 'left floor'\n ],\n [\n 8971,\n 'right floor'\n ],\n [\n 9001,\n 'left-pointing angle bracket'\n ],\n [\n 9002,\n 'right-pointing angle bracket'\n ],\n [\n 9674,\n 'lozenge'\n ],\n [\n 9824,\n 'black spade suit'\n ],\n [\n 9827,\n 'black club suit'\n ],\n [\n 9829,\n 'black heart suit'\n ],\n [\n 9830,\n 'black diamond suit'\n ],\n [\n 8194,\n 'en space'\n ],\n [\n 8195,\n 'em space'\n ],\n [\n 8201,\n 'thin space'\n ],\n [\n 8204,\n 'zero width non-joiner'\n ],\n [\n 8205,\n 'zero width joiner'\n ],\n [\n 8206,\n 'left-to-right mark'\n ],\n [\n 8207,\n 'right-to-left mark'\n ]\n ]\n }\n ];\n };\n const charmapFilter = charmap => {\n return global.grep(charmap, item => {\n return isArray(item) && item.length === 2;\n });\n };\n const getCharsFromOption = optionValue => {\n if (isArray(optionValue)) {\n return charmapFilter(optionValue);\n }\n if (typeof optionValue === 'function') {\n return optionValue();\n }\n return [];\n };\n const extendCharMap = (editor, charmap) => {\n const userCharMap = getCharMap$1(editor);\n if (userCharMap) {\n charmap = [{\n name: UserDefined,\n characters: getCharsFromOption(userCharMap)\n }];\n }\n const userCharMapAppend = getCharMapAppend(editor);\n if (userCharMapAppend) {\n const userDefinedGroup = global.grep(charmap, cg => cg.name === UserDefined);\n if (userDefinedGroup.length) {\n userDefinedGroup[0].characters = [\n ...userDefinedGroup[0].characters,\n ...getCharsFromOption(userCharMapAppend)\n ];\n return charmap;\n }\n return charmap.concat({\n name: UserDefined,\n characters: getCharsFromOption(userCharMapAppend)\n });\n }\n return charmap;\n };\n const getCharMap = editor => {\n const groups = extendCharMap(editor, getDefaultCharMap());\n return groups.length > 1 ? [{\n name: 'All',\n characters: bind(groups, g => g.characters)\n }].concat(groups) : groups;\n };\n\n const get = editor => {\n const getCharMap$1 = () => {\n return getCharMap(editor);\n };\n const insertChar$1 = chr => {\n insertChar(editor, chr);\n };\n return {\n getCharMap: getCharMap$1,\n insertChar: insertChar$1\n };\n };\n\n const Cell = initial => {\n let value = initial;\n const get = () => {\n return value;\n };\n const set = v => {\n value = v;\n };\n return {\n get,\n set\n };\n };\n\n const last = (fn, rate) => {\n let timer = null;\n const cancel = () => {\n if (!isNull(timer)) {\n clearTimeout(timer);\n timer = null;\n }\n };\n const throttle = (...args) => {\n cancel();\n timer = setTimeout(() => {\n timer = null;\n fn.apply(null, args);\n }, rate);\n };\n return {\n cancel,\n throttle\n };\n };\n\n const contains = (str, substr, start = 0, end) => {\n const idx = str.indexOf(substr, start);\n if (idx !== -1) {\n return isUndefined(end) ? true : idx + substr.length <= end;\n } else {\n return false;\n }\n };\n const fromCodePoint = String.fromCodePoint;\n\n const charMatches = (charCode, name, lowerCasePattern) => {\n if (contains(fromCodePoint(charCode).toLowerCase(), lowerCasePattern)) {\n return true;\n } else {\n return contains(name.toLowerCase(), lowerCasePattern) || contains(name.toLowerCase().replace(/\\s+/g, ''), lowerCasePattern);\n }\n };\n const scan = (group, pattern) => {\n const matches = [];\n const lowerCasePattern = pattern.toLowerCase();\n each(group.characters, g => {\n if (charMatches(g[0], g[1], lowerCasePattern)) {\n matches.push(g);\n }\n });\n return map(matches, m => ({\n text: m[1],\n value: fromCodePoint(m[0]),\n icon: fromCodePoint(m[0])\n }));\n };\n\n const patternName = 'pattern';\n const open = (editor, charMap) => {\n const makeGroupItems = () => [\n {\n label: 'Search',\n type: 'input',\n name: patternName\n },\n {\n type: 'collection',\n name: 'results'\n }\n ];\n const makeTabs = () => map(charMap, charGroup => ({\n title: charGroup.name,\n name: charGroup.name,\n items: makeGroupItems()\n }));\n const makePanel = () => ({\n type: 'panel',\n items: makeGroupItems()\n });\n const makeTabPanel = () => ({\n type: 'tabpanel',\n tabs: makeTabs()\n });\n const currentTab = charMap.length === 1 ? Cell(UserDefined) : Cell('All');\n const scanAndSet = (dialogApi, pattern) => {\n find(charMap, group => group.name === currentTab.get()).each(f => {\n const items = scan(f, pattern);\n dialogApi.setData({ results: items });\n });\n };\n const SEARCH_DELAY = 40;\n const updateFilter = last(dialogApi => {\n const pattern = dialogApi.getData().pattern;\n scanAndSet(dialogApi, pattern);\n }, SEARCH_DELAY);\n const body = charMap.length === 1 ? makePanel() : makeTabPanel();\n const initialData = {\n pattern: '',\n results: scan(charMap[0], '')\n };\n const bridgeSpec = {\n title: 'Special Character',\n size: 'normal',\n body,\n buttons: [{\n type: 'cancel',\n name: 'close',\n text: 'Close',\n primary: true\n }],\n initialData,\n onAction: (api, details) => {\n if (details.name === 'results') {\n insertChar(editor, details.value);\n api.close();\n }\n },\n onTabChange: (dialogApi, details) => {\n currentTab.set(details.newTabName);\n updateFilter.throttle(dialogApi);\n },\n onChange: (dialogApi, changeData) => {\n if (changeData.name === patternName) {\n updateFilter.throttle(dialogApi);\n }\n }\n };\n const dialogApi = editor.windowManager.open(bridgeSpec);\n dialogApi.focus(patternName);\n };\n\n const register$1 = (editor, charMap) => {\n editor.addCommand('mceShowCharmap', () => {\n open(editor, charMap);\n });\n };\n\n const init = (editor, all) => {\n editor.ui.registry.addAutocompleter('charmap', {\n trigger: ':',\n columns: 'auto',\n minChars: 2,\n fetch: (pattern, _maxResults) => new Promise((resolve, _reject) => {\n resolve(scan(all, pattern));\n }),\n onAction: (autocompleteApi, rng, value) => {\n editor.selection.setRng(rng);\n editor.insertContent(value);\n autocompleteApi.hide();\n }\n });\n };\n\n const onSetupEditable = editor => api => {\n const nodeChanged = () => {\n api.setEnabled(editor.selection.isEditable());\n };\n editor.on('NodeChange', nodeChanged);\n nodeChanged();\n return () => {\n editor.off('NodeChange', nodeChanged);\n };\n };\n const register = editor => {\n const onAction = () => editor.execCommand('mceShowCharmap');\n editor.ui.registry.addButton('charmap', {\n icon: 'insert-character',\n tooltip: 'Special character',\n onAction,\n onSetup: onSetupEditable(editor)\n });\n editor.ui.registry.addMenuItem('charmap', {\n icon: 'insert-character',\n text: 'Special character...',\n onAction,\n onSetup: onSetupEditable(editor)\n });\n };\n\n var Plugin = () => {\n global$1.add('charmap', editor => {\n register$2(editor);\n const charMap = getCharMap(editor);\n register$1(editor, charMap);\n register(editor);\n init(editor, charMap[0]);\n return get(editor);\n });\n };\n\n Plugin();\n\n})();\n"],"names":["global$1","tinymce","util","Tools","resolve","insertChar","editor","chr","evtChr","dispatch","fireInsertCustomChar","execCommand","eq","t","a","isArray$1","type","value","x","Array","isArray","o","v","constructor","String","prototype","isPrototypeOf","_a","name","typeOf","isNull","isUndefined","undefined","isFunction","isSimpleType","never","Optional","tag","this","some","none","singletonNone","fold","onNone","onSome","isSome","isNone","map","mapper","bind","binder","exists","predicate","forall","filter","getOr","replacement","or","getOrThunk","thunk","orThunk","getOrDie","message","Error","from","isNullable","getOrNull","getOrUndefined","each","worker","toArray","toString","nativePush","push","xs","f","len","length","r","i","find","pred","until","findUntil","apply","flatten","global","option","options","get","getCharMap$1","getCharMapAppend","UserDefined","getCharsFromOption","optionValue","charmap","grep","item","getCharMap","groups","userCharMap","characters","userCharMapAppend","userDefinedGroup","cg","concat","extendCharMap","g","Cell","initial","set","contains","str","substr","start","end","idx","indexOf","fromCodePoint","scan","group","pattern","matches","lowerCasePattern","toLowerCase","charCode","replace","charMatches","m","text","icon","patternName","open","charMap","makeGroupItems","label","currentTab","updateFilter","fn","rate","timer","cancel","clearTimeout","throttle","args","setTimeout","last","dialogApi","getData","items","setData","results","scanAndSet","bridgeSpec","title","size","body","tabs","charGroup","buttons","primary","initialData","onAction","api","details","close","onTabChange","newTabName","onChange","changeData","windowManager","focus","onSetupEditable","nodeChanged","setEnabled","selection","isEditable","on","off","add","registerOption","register","charMapProcessor","processor","register$2","addCommand","register$1","ui","registry","addButton","tooltip","onSetup","addMenuItem","all","addAutocompleter","trigger","columns","minChars","fetch","_maxResults","Promise","_reject","autocompleteApi","rng","setRng","insertContent","hide","init"],"mappings":"gGAIA,WAGI,IAAIA,EAAWC,QAAQC,KAAKC,MAAMC,QAAQ,yBAE1C,MAIMC,EAAa,CAACC,EAAQC,KAC1B,MAAMC,EALqB,EAACF,EAAQC,IAC7BD,EAAOG,SAAS,mBAAoB,CAAEF,QAI9BG,CAAqBJ,EAAQC,GAAKA,IACjDD,EAAOK,YAAY,oBAAoB,EAAOH,EAAO,EAyBjDI,EAAKC,GAAKC,GAAKD,IAAMC,EACrBC,GAHSC,EAGU,QAHFC,GAZRC,KACb,MAAML,SAAWK,EACjB,OAAU,OAANA,EACK,OACQ,WAANL,GAAkBM,MAAMC,QAAQF,GAClC,QACQ,WAANL,IAAuCQ,EAdlCC,EAcsBJ,GAdnBK,EAcsBC,QAZZC,UAYwCC,cAAcL,KAThD,QAAxBM,EAAKL,EAAEC,mBAAgC,IAAPI,OAAgB,EAASA,EAAGC,QAAUL,EAAYK,MAUpF,SAEAf,EAHwC,IAACQ,EAdlCC,EAAGC,EACfI,CAiBV,EAEoCE,CAAOZ,KAAWD,GAAnCA,MAIf,MAAMc,EAASlB,EAAG,MACZmB,EAAcnB,OA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CACE,KACA,YAEF,CACE,KACA,mBAEF,CACE,KACA,aAEF,CACE,KACA,YAEF,CACE,KACA,eAEF,CACE,KACA,gBAEF,CACE,KACA,uBAEF,CACE,KACA,aAEF,CACE,KACA,gBAEF,CACE,KACA,gBAEF,CACE,KACA,gBAEF,CACE,KACA,aAEF,CACE,KACA,uBAEF,CACE,KACA,iBAEF,CACE,KACA,cAEF,CACE,KACA,qBAEF,CACE,KACA,qBAEF,CACE,KACA,oBAEF,CACE,KACA,cAEF,CACE,KACA,cAEF,CACE,MACA,iBAEF,CACE,MACA,kBAEF,CACE,MACA,2CAEF,CACE,MACA,oCAIN,CACEzE,KAAM,OACNyE,WAAY,CACV,CACE,IACA,kBAEF,CACE,IACA,mBAEF,CACE,KACA,mBAEF,CACE,KACA,kBAEF,CACE,IACA,cAEF,CACE,IACA,cAEF,CACE,KACA,UAEF,CACE,KACA,oBAEF,CACE,KACA,kBAEF,CACE,KACA,oBAEF,CACE,IACA,gBAEF,CACE,IACA,kBAEF,CACE,IACA,uBAIN,CACEzE,KAAM,aACNyE,WAAY,CACV,CACE,KACA,6CAEF,CACE,KACA,8CAEF,CACE,IACA,2BAEF,CACE,IACA,4BAEF,CACE,KACA,8BAEF,CACE,KACA,+BAEF,CACE,KACA,8BAEF,CACE,KACA,+BAEF,CACE,KACA,+BAEF,CACE,KACA,+BAEF,CACE,GACA,kBAEF,CACE,GACA,qBAEF,CACE,KACA,yBAEF,CACE,KACA,4BAEF,CACE,KACA,WAEF,CACE,KACA,WAEF,CACE,IACA,UAEF,CACE,KACA,YAEF,CACE,IACA,iBAEF,CACE,IACA,cAEF,CACE,IACA,aAEF,CACE,IACA,6BAEF,CACE,IACA,wBAEF,CACE,IACA,qBAEF,CACE,IACA,eAEF,CACE,IACA,eAEF,CACE,KACA,cAEF,CACE,IACA,mBAEF,CACE,IACA,iBAEF,CACE,KACA,kBAEF,CACE,IACA,uBAEF,CACE,IACA,mBAEF,CACE,IACA,mBAEF,CACE,IACA,qBAEF,CACE,IACA,wBAEF,CACE,IACA,qBAEF,CACE,IACA,6BAIN,CACEzE,KAAM,eACNyE,WAAY,CACV,CACE,IACA,qBAEF,CACE,KACA,YAEF,CACE,KACA,kBAEF,CACE,KACA,YAEF,CACE,KACA,eAEF,CACE,KACA,cAEF,CACE,KACA,0BAEF,CACE,KACA,mBAEF,CACE,KACA,gBAEF,CACE,KACA,gBAEF,CACE,KACA,cAEF,CACE,KACA,qBAEF,CACE,KACA,sBAEF,CACE,KACA,iBAEF,CACE,KACA,eAEF,CACE,KACA,cAEF,CACE,IACA,YAEF,CACE,KACA,gBAEF,CACE,KACA,SAEF,CACE,KACA,wBAEF,CACE,KACA,WAEF,CACE,KACA,gBAEF,CACE,KACA,YAEF,CACE,KACA,uBAEF,CACE,KACA,qBAEF,CACE,KACA,mBAEF,CACE,KACA,WAIN,CACEzE,KAAM,iBACNyE,WAAY,CACV,CACE,IACA,aAEF,CACE,IACA,aAEF,CACE,IACA,kBAEF,CACE,IACA,aAEF,CACE,IACA,iBAEF,CACE,IACA,kBAEF,CACE,IACA,cAEF,CACE,IACA,eAEF,CACE,IACA,eAEF,CACE,IACA,aAEF,CACE,IACA,aAEF,CACE,IACA,kBAEF,CACE,IACA,iBAEF,CACE,IACA,cAEF,CACE,IACA,aAEF,CACE,IACA,aAEF,CACE,IACA,kBAEF,CACE,IACA,iBAEF,CACE,IACA,cAEF,CACE,IACA,OAEF,CACE,IACA,aAEF,CACE,IACA,aAEF,CACE,IACA,aAEF,CACE,IACA,kBAEF,CACE,IACA,aAEF,CACE,IACA,iBAEF,CACE,IACA,aAEF,CACE,IACA,cAEF,CACE,IACA,eAEF,CACE,IACA,aAEF,CACE,IACA,aAEF,CACE,IACA,aAEF,CACE,IACA,kBAEF,CACE,IACA,iBAEF,CACE,IACA,cAEF,CACE,IACA,aAEF,CACE,IACA,iBAEF,CACE,IACA,cAEF,CACE,IACA,SAEF,CACE,IACA,aAEF,CACE,IACA,aAEF,CACE,IACA,kBAEF,CACE,IACA,aAEF,CACE,IACA,iBAEF,CACE,IACA,kBAEF,CACE,IACA,cAEF,CACE,IACA,eAEF,CACE,IACA,eAEF,CACE,IACA,aAEF,CACE,IACA,aAEF,CACE,IACA,kBAEF,CACE,IACA,iBAEF,CACE,IACA,cAEF,CACE,IACA,aAEF,CACE,IACA,aAEF,CACE,IACA,kBAEF,CACE,IACA,iBAEF,CACE,IACA,cAEF,CACE,IACA,OAEF,CACE,IACA,aAEF,CACE,IACA,aAEF,CACE,IACA,aAEF,CACE,IACA,kBAEF,CACE,IACA,aAEF,CACE,IACA,iBAEF,CACE,IACA,WAEF,CACE,IACA,YAEF,CACE,IACA,eAEF,CACE,IACA,aAEF,CACE,IACA,aAEF,CACE,IACA,aAEF,CACE,IACA,kBAEF,CACE,IACA,iBAEF,CACE,IACA,cAEF,CACE,IACA,aAEF,CACE,IACA,SAEF,CACE,IACA,iBAEF,CACE,IACA,cAEF,CACE,IACA,SAEF,CACE,IACA,QAEF,CACE,IACA,SAEF,CACE,IACA,SAEF,CACE,IACA,WAEF,CACE,IACA,QAEF,CACE,IACA,OAEF,CACE,IACA,SAEF,CACE,IACA,QAEF,CACE,IACA,SAEF,CACE,IACA,UAEF,CACE,IACA,MAEF,CACE,IACA,MAEF,CACE,IACA,MAEF,CACE,IACA,WAEF,CACE,IACA,MAEF,CACE,IACA,OAEF,CACE,IACA,SAEF,CACE,IACA,OAEF,CACE,IACA,WAEF,CACE,IACA,OAEF,CACE,IACA,OAEF,CACE,IACA,OAEF,CACE,IACA,SAEF,CACE,IACA,SAEF,CACE,IACA,QAEF,CACE,IACA,SAEF,CACE,IACA,SAEF,CACE,IACA,WAEF,CACE,IACA,QAEF,CACE,IACA,OAEF,CACE,IACA,SAEF,CACE,IACA,QAEF,CACE,IACA,SAEF,CACE,IACA,UAEF,CACE,IACA,MAEF,CACE,IACA,MAEF,CACE,IACA,MAEF,CACE,IACA,WAEF,CACE,IACA,MAEF,CACE,IACA,OAEF,CACE,IACA,eAEF,CACE,IACA,SAEF,CACE,IACA,OAEF,CACE,IACA,WAEF,CACE,IACA,OAEF,CACE,IACA,OAEF,CACE,IACA,OAEF,CACE,IACA,WAIN,CACEzE,KAAM,UACNyE,WAAY,CACV,CACE,KACA,eAEF,CACE,IACA,aAEF,CACE,KACA,oBAEF,CACE,IACA,yBAEF,CACE,KACA,iBAEF,CACE,KACA,oBAIN,CACEzE,KAAM,SACNyE,WAAY,CACV,CACE,KACA,mBAEF,CACE,KACA,iBAEF,CACE,KACA,oBAEF,CACE,KACA,mBAEF,CACE,KACA,oBAEF,CACE,KACA,mBAEF,CACE,KACA,0BAEF,CACE,KACA,wBAEF,CACE,KACA,2BAEF,CACE,KACA,0BAEF,CACE,KACA,2BAEF,CACE,KACA,aAEF,CACE,KACA,aAEF,CACE,KACA,eAEF,CACE,KACA,mBAEF,CACE,KACA,yBAEF,CACE,KACA,2BAEF,CACE,KACA,gBAEF,CACE,KACA,iBAEF,CACE,KACA,iBAEF,CACE,KACA,gBAEF,CACE,KACA,gBAEF,CACE,KACA,iBAEF,CACE,KACA,cAEF,CACE,KACA,eAEF,CACE,KACA,+BAEF,CACE,KACA,gCAEF,CACE,KACA,WAEF,CACE,KACA,oBAEF,CACE,KACA,mBAEF,CACE,KACA,oBAEF,CACE,KACA,sBAEF,CACE,KACA,YAEF,CACE,KACA,YAEF,CACE,KACA,cAEF,CACE,KACA,yBAEF,CACE,KACA,qBAEF,CACE,KACA,sBAEF,CACE,KACA,0BA+CR,OAAOF,EAAOtB,OAAS,EAAI,CAAC,CACxBjD,KAAM,MACNyE,WAAYpD,EAAKkD,GAAQQ,GAAKA,EAAEN,eAC/BI,OAAON,GAAUA,CAAM,EAgBxBS,EAAOC,IACX,IAAI5F,EAAQ4F,EAOZ,MAAO,CACLpB,IAPU,IACHxE,EAOP6F,IALUxF,IACVL,EAAQK,CAAC,EAKV,EAwBGyF,EAAW,CAACC,EAAKC,EAAQC,EAAQ,EAAGC,KACxC,MAAMC,EAAMJ,EAAIK,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AAWD,IACvCF,EAAe,iBAAkB,CAAEG,UAAWD,GAAmB,EAy6C/DE,CAAWlL,GACX,MAAM+H,EAAUnC,EAAW5F,GAI3B,MAvDe,EAACA,EAAQ+H,KAC1B/H,EAAOmL,WAAW,kBAAkB,KAClCrD,EAAK9H,EAAQ+H,EAAQ,GACrB,EAiDAqD,CAAWpL,EAAQ+H,GApBN/H,KACf,MAAM4J,EAAW,IAAM5J,EAAOK,YAAY,kBAC1CL,EAAOqL,GAAGC,SAASC,UAAU,UAAW,CACtC3D,KAAM,mBACN4D,QAAS,oBACT5B,WACA6B,QAASnB,EAAgBtK,KAE3BA,EAAOqL,GAAGC,SAASI,YAAY,UAAW,CACxC9D,KAAM,mBACND,KAAM,uBACNiC,WACA6B,QAASnB,EAAgBtK,IACzB,EAQA+K,CAAS/K,GA/CA,EAACA,EAAQ2L,KACpB3L,EAAOqL,GAAGC,SAASM,iBAAiB,UAAW,CAC7CC,QAAS,IACTC,QAAS,OACTC,SAAU,EACVC,MAAO,CAAC7E,EAAS8E,IAAgB,IAAIC,SAAQ,CAACpM,EAASqM,KACrDrM,EAAQmH,EAAK0E,EAAKxE,GAAS,IAE7ByC,SAAU,CAACwC,EAAiBC,EAAK1L,KAC/BX,EAAOyK,UAAU6B,OAAOD,GACxBrM,EAAOuM,cAAc5L,GACrByL,EAAgBI,MAAM,GAExB,EAmCAC,CAAKzM,EAAQ+H,EAAQ,IAhNb/H,KAOH,CACL4F,WAPmB,IACZA,EAAW5F,GAOlBD,WALmBE,IACnBF,EAAWC,EAAQC,EAAI,IA4MhBkF,CAAInF,EAAO,GAMzB,CArnDD"}
@@ -0,0 +1,2 @@
1
+ import{__exports as e}from"../../../../_virtual/plugin40.mjs";var o;function t(){return o||(o=1,tinymce.util.Tools.resolve("tinymce.PluginManager").add("code",(e=>((e=>{e.addCommand("mceCodeEditor",(()=>{(e=>{const o=(e=>e.getContent({source_view:!0}))(e);e.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{code:o},onSubmit:o=>{((e,o)=>{e.focus(),e.undoManager.transact((()=>{e.setContent(o)})),e.selection.setCursorLocation(),e.nodeChanged()})(e,o.getData().code),o.close()}})})(e)}))})(e),(e=>{const o=()=>e.execCommand("mceCodeEditor");e.ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:o}),e.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:o})})(e),{})))),e}export{t as __require};
2
+ //# sourceMappingURL=plugin.mjs.map