@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 @@
1
+ {"version":3,"file":"plugin.mjs","sources":["../../../../../../node_modules/tinymce/plugins/image/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 getPrototypeOf = Object.getPrototypeOf;\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 is = (value, constructor) => isObject(value) && hasProto(value, constructor, (o, proto) => getPrototypeOf(o) === proto);\n const isString = isType('string');\n const isObject = isType('object');\n const isPlainObject = value => is(value, Object);\n const isArray = isType('array');\n const isNull = eq(null);\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 const isArrayOf = (value, pred) => {\n if (isArray(value)) {\n for (let i = 0, len = value.length; i < len; ++i) {\n if (!pred(value[i])) {\n return false;\n }\n }\n return true;\n }\n return false;\n };\n\n const noop = () => {\n };\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 keys = Object.keys;\n const hasOwnProperty = Object.hasOwnProperty;\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 const objAcc = r => (x, i) => {\n r[i] = x;\n };\n const internalFilter = (obj, pred, onTrue, onFalse) => {\n each(obj, (x, i) => {\n (pred(x, i) ? onTrue : onFalse)(x, i);\n });\n };\n const filter = (obj, pred) => {\n const t = {};\n internalFilter(obj, pred, objAcc(t), noop);\n return t;\n };\n const has = (obj, key) => hasOwnProperty.call(obj, key);\n const hasNonNullableKey = (obj, key) => has(obj, key) && obj[key] !== undefined && obj[key] !== null;\n\n const nativePush = Array.prototype.push;\n const flatten = xs => {\n const r = [];\n for (let i = 0, len = xs.length; i < len; ++i) {\n if (!isArray(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 get = (xs, i) => i >= 0 && i < xs.length ? Optional.some(xs[i]) : Optional.none();\n const head = xs => get(xs, 0);\n const findMap = (arr, f) => {\n for (let i = 0; i < arr.length; i++) {\n const r = f(arr[i], i);\n if (r.isSome()) {\n return r;\n }\n }\n return Optional.none();\n };\n\n typeof window !== 'undefined' ? window : Function('return this;')();\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 = (element, key, value) => {\n rawSet(element.dom, key, value);\n };\n const remove = (element, key) => {\n element.dom.removeAttribute(key);\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 var global$3 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');\n\n var global$2 = tinymce.util.Tools.resolve('tinymce.util.URI');\n\n const isNotEmpty = s => s.length > 0;\n\n const option = name => editor => editor.options.get(name);\n const register$2 = editor => {\n const registerOption = editor.options.register;\n registerOption('image_dimensions', {\n processor: 'boolean',\n default: true\n });\n registerOption('image_advtab', {\n processor: 'boolean',\n default: false\n });\n registerOption('image_uploadtab', {\n processor: 'boolean',\n default: true\n });\n registerOption('image_prepend_url', {\n processor: 'string',\n default: ''\n });\n registerOption('image_class_list', { processor: 'object[]' });\n registerOption('image_description', {\n processor: 'boolean',\n default: true\n });\n registerOption('image_title', {\n processor: 'boolean',\n default: false\n });\n registerOption('image_caption', {\n processor: 'boolean',\n default: false\n });\n registerOption('image_list', {\n processor: value => {\n const valid = value === false || isString(value) || isArrayOf(value, isObject) || isFunction(value);\n return valid ? {\n value,\n valid\n } : {\n valid: false,\n message: 'Must be false, a string, an array or a function.'\n };\n },\n default: false\n });\n };\n const hasDimensions = option('image_dimensions');\n const hasAdvTab = option('image_advtab');\n const hasUploadTab = option('image_uploadtab');\n const getPrependUrl = option('image_prepend_url');\n const getClassList = option('image_class_list');\n const hasDescription = option('image_description');\n const hasImageTitle = option('image_title');\n const hasImageCaption = option('image_caption');\n const getImageList = option('image_list');\n const showAccessibilityOptions = option('a11y_advanced_options');\n const isAutomaticUploadsEnabled = option('automatic_uploads');\n const hasUploadUrl = editor => isNotEmpty(editor.options.get('images_upload_url'));\n const hasUploadHandler = editor => isNonNullable(editor.options.get('images_upload_handler'));\n\n const parseIntAndGetMax = (val1, val2) => Math.max(parseInt(val1, 10), parseInt(val2, 10));\n const getImageSize = url => new Promise(callback => {\n const img = document.createElement('img');\n const done = dimensions => {\n img.onload = img.onerror = null;\n if (img.parentNode) {\n img.parentNode.removeChild(img);\n }\n callback(dimensions);\n };\n img.onload = () => {\n const width = parseIntAndGetMax(img.width, img.clientWidth);\n const height = parseIntAndGetMax(img.height, img.clientHeight);\n const dimensions = {\n width,\n height\n };\n done(Promise.resolve(dimensions));\n };\n img.onerror = () => {\n done(Promise.reject(`Failed to get image dimensions for: ${ url }`));\n };\n const style = img.style;\n style.visibility = 'hidden';\n style.position = 'fixed';\n style.bottom = style.left = '0px';\n style.width = style.height = 'auto';\n document.body.appendChild(img);\n img.src = url;\n });\n const removePixelSuffix = value => {\n if (value) {\n value = value.replace(/px$/, '');\n }\n return value;\n };\n const addPixelSuffix = value => {\n if (value.length > 0 && /^[0-9]+$/.test(value)) {\n value += 'px';\n }\n return value;\n };\n const mergeMargins = css => {\n if (css.margin) {\n const splitMargin = String(css.margin).split(' ');\n switch (splitMargin.length) {\n case 1:\n css['margin-top'] = css['margin-top'] || splitMargin[0];\n css['margin-right'] = css['margin-right'] || splitMargin[0];\n css['margin-bottom'] = css['margin-bottom'] || splitMargin[0];\n css['margin-left'] = css['margin-left'] || splitMargin[0];\n break;\n case 2:\n css['margin-top'] = css['margin-top'] || splitMargin[0];\n css['margin-right'] = css['margin-right'] || splitMargin[1];\n css['margin-bottom'] = css['margin-bottom'] || splitMargin[0];\n css['margin-left'] = css['margin-left'] || splitMargin[1];\n break;\n case 3:\n css['margin-top'] = css['margin-top'] || splitMargin[0];\n css['margin-right'] = css['margin-right'] || splitMargin[1];\n css['margin-bottom'] = css['margin-bottom'] || splitMargin[2];\n css['margin-left'] = css['margin-left'] || splitMargin[1];\n break;\n case 4:\n css['margin-top'] = css['margin-top'] || splitMargin[0];\n css['margin-right'] = css['margin-right'] || splitMargin[1];\n css['margin-bottom'] = css['margin-bottom'] || splitMargin[2];\n css['margin-left'] = css['margin-left'] || splitMargin[3];\n }\n delete css.margin;\n }\n return css;\n };\n const createImageList = (editor, callback) => {\n const imageList = getImageList(editor);\n if (isString(imageList)) {\n fetch(imageList).then(res => {\n if (res.ok) {\n res.json().then(callback);\n }\n });\n } else if (isFunction(imageList)) {\n imageList(callback);\n } else {\n callback(imageList);\n }\n };\n const waitLoadImage = (editor, data, imgElm) => {\n const selectImage = () => {\n imgElm.onload = imgElm.onerror = null;\n if (editor.selection) {\n editor.selection.select(imgElm);\n editor.nodeChanged();\n }\n };\n imgElm.onload = () => {\n if (!data.width && !data.height && hasDimensions(editor)) {\n editor.dom.setAttribs(imgElm, {\n width: String(imgElm.clientWidth),\n height: String(imgElm.clientHeight)\n });\n }\n selectImage();\n };\n imgElm.onerror = selectImage;\n };\n const blobToDataUri = blob => new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = () => {\n resolve(reader.result);\n };\n reader.onerror = () => {\n var _a;\n reject((_a = reader.error) === null || _a === void 0 ? void 0 : _a.message);\n };\n reader.readAsDataURL(blob);\n });\n const isPlaceholderImage = imgElm => imgElm.nodeName === 'IMG' && (imgElm.hasAttribute('data-mce-object') || imgElm.hasAttribute('data-mce-placeholder'));\n const isSafeImageUrl = (editor, src) => {\n const getOption = editor.options.get;\n return global$2.isDomSafe(src, 'img', {\n allow_html_data_urls: getOption('allow_html_data_urls'),\n allow_script_urls: getOption('allow_script_urls'),\n allow_svg_data_urls: getOption('allow_svg_data_urls')\n });\n };\n\n const DOM = global$3.DOM;\n const getHspace = image => {\n if (image.style.marginLeft && image.style.marginRight && image.style.marginLeft === image.style.marginRight) {\n return removePixelSuffix(image.style.marginLeft);\n } else {\n return '';\n }\n };\n const getVspace = image => {\n if (image.style.marginTop && image.style.marginBottom && image.style.marginTop === image.style.marginBottom) {\n return removePixelSuffix(image.style.marginTop);\n } else {\n return '';\n }\n };\n const getBorder = image => {\n if (image.style.borderWidth) {\n return removePixelSuffix(image.style.borderWidth);\n } else {\n return '';\n }\n };\n const getAttrib = (image, name) => {\n var _a;\n if (image.hasAttribute(name)) {\n return (_a = image.getAttribute(name)) !== null && _a !== void 0 ? _a : '';\n } else {\n return '';\n }\n };\n const hasCaption = image => image.parentNode !== null && image.parentNode.nodeName === 'FIGURE';\n const updateAttrib = (image, name, value) => {\n if (value === '' || value === null) {\n image.removeAttribute(name);\n } else {\n image.setAttribute(name, value);\n }\n };\n const wrapInFigure = image => {\n const figureElm = DOM.create('figure', { class: 'image' });\n DOM.insertAfter(figureElm, image);\n figureElm.appendChild(image);\n figureElm.appendChild(DOM.create('figcaption', { contentEditable: 'true' }, 'Caption'));\n figureElm.contentEditable = 'false';\n };\n const removeFigure = image => {\n const figureElm = image.parentNode;\n if (isNonNullable(figureElm)) {\n DOM.insertAfter(image, figureElm);\n DOM.remove(figureElm);\n }\n };\n const toggleCaption = image => {\n if (hasCaption(image)) {\n removeFigure(image);\n } else {\n wrapInFigure(image);\n }\n };\n const normalizeStyle = (image, normalizeCss) => {\n const attrValue = image.getAttribute('style');\n const value = normalizeCss(attrValue !== null ? attrValue : '');\n if (value.length > 0) {\n image.setAttribute('style', value);\n image.setAttribute('data-mce-style', value);\n } else {\n image.removeAttribute('style');\n }\n };\n const setSize = (name, normalizeCss) => (image, name, value) => {\n const styles = image.style;\n if (styles[name]) {\n styles[name] = addPixelSuffix(value);\n normalizeStyle(image, normalizeCss);\n } else {\n updateAttrib(image, name, value);\n }\n };\n const getSize = (image, name) => {\n if (image.style[name]) {\n return removePixelSuffix(image.style[name]);\n } else {\n return getAttrib(image, name);\n }\n };\n const setHspace = (image, value) => {\n const pxValue = addPixelSuffix(value);\n image.style.marginLeft = pxValue;\n image.style.marginRight = pxValue;\n };\n const setVspace = (image, value) => {\n const pxValue = addPixelSuffix(value);\n image.style.marginTop = pxValue;\n image.style.marginBottom = pxValue;\n };\n const setBorder = (image, value) => {\n const pxValue = addPixelSuffix(value);\n image.style.borderWidth = pxValue;\n };\n const setBorderStyle = (image, value) => {\n image.style.borderStyle = value;\n };\n const getBorderStyle = image => {\n var _a;\n return (_a = image.style.borderStyle) !== null && _a !== void 0 ? _a : '';\n };\n const isFigure = elm => isNonNullable(elm) && elm.nodeName === 'FIGURE';\n const isImage = elm => elm.nodeName === 'IMG';\n const getIsDecorative = image => DOM.getAttrib(image, 'alt').length === 0 && DOM.getAttrib(image, 'role') === 'presentation';\n const getAlt = image => {\n if (getIsDecorative(image)) {\n return '';\n } else {\n return getAttrib(image, 'alt');\n }\n };\n const defaultData = () => ({\n src: '',\n alt: '',\n title: '',\n width: '',\n height: '',\n class: '',\n style: '',\n caption: false,\n hspace: '',\n vspace: '',\n border: '',\n borderStyle: '',\n isDecorative: false\n });\n const getStyleValue = (normalizeCss, data) => {\n var _a;\n const image = document.createElement('img');\n updateAttrib(image, 'style', data.style);\n if (getHspace(image) || data.hspace !== '') {\n setHspace(image, data.hspace);\n }\n if (getVspace(image) || data.vspace !== '') {\n setVspace(image, data.vspace);\n }\n if (getBorder(image) || data.border !== '') {\n setBorder(image, data.border);\n }\n if (getBorderStyle(image) || data.borderStyle !== '') {\n setBorderStyle(image, data.borderStyle);\n }\n return normalizeCss((_a = image.getAttribute('style')) !== null && _a !== void 0 ? _a : '');\n };\n const create = (normalizeCss, data) => {\n const image = document.createElement('img');\n write(normalizeCss, {\n ...data,\n caption: false\n }, image);\n setAlt(image, data.alt, data.isDecorative);\n if (data.caption) {\n const figure = DOM.create('figure', { class: 'image' });\n figure.appendChild(image);\n figure.appendChild(DOM.create('figcaption', { contentEditable: 'true' }, 'Caption'));\n figure.contentEditable = 'false';\n return figure;\n } else {\n return image;\n }\n };\n const read = (normalizeCss, image) => ({\n src: getAttrib(image, 'src'),\n alt: getAlt(image),\n title: getAttrib(image, 'title'),\n width: getSize(image, 'width'),\n height: getSize(image, 'height'),\n class: getAttrib(image, 'class'),\n style: normalizeCss(getAttrib(image, 'style')),\n caption: hasCaption(image),\n hspace: getHspace(image),\n vspace: getVspace(image),\n border: getBorder(image),\n borderStyle: getBorderStyle(image),\n isDecorative: getIsDecorative(image)\n });\n const updateProp = (image, oldData, newData, name, set) => {\n if (newData[name] !== oldData[name]) {\n set(image, name, String(newData[name]));\n }\n };\n const setAlt = (image, alt, isDecorative) => {\n if (isDecorative) {\n DOM.setAttrib(image, 'role', 'presentation');\n const sugarImage = SugarElement.fromDom(image);\n set(sugarImage, 'alt', '');\n } else {\n if (isNull(alt)) {\n const sugarImage = SugarElement.fromDom(image);\n remove(sugarImage, 'alt');\n } else {\n const sugarImage = SugarElement.fromDom(image);\n set(sugarImage, 'alt', alt);\n }\n if (DOM.getAttrib(image, 'role') === 'presentation') {\n DOM.setAttrib(image, 'role', '');\n }\n }\n };\n const updateAlt = (image, oldData, newData) => {\n if (newData.alt !== oldData.alt || newData.isDecorative !== oldData.isDecorative) {\n setAlt(image, newData.alt, newData.isDecorative);\n }\n };\n const normalized = (set, normalizeCss) => (image, name, value) => {\n set(image, value);\n normalizeStyle(image, normalizeCss);\n };\n const write = (normalizeCss, newData, image) => {\n const oldData = read(normalizeCss, image);\n updateProp(image, oldData, newData, 'caption', (image, _name, _value) => toggleCaption(image));\n updateProp(image, oldData, newData, 'src', updateAttrib);\n updateProp(image, oldData, newData, 'title', updateAttrib);\n updateProp(image, oldData, newData, 'width', setSize('width', normalizeCss));\n updateProp(image, oldData, newData, 'height', setSize('height', normalizeCss));\n updateProp(image, oldData, newData, 'class', updateAttrib);\n updateProp(image, oldData, newData, 'style', normalized((image, value) => updateAttrib(image, 'style', value), normalizeCss));\n updateProp(image, oldData, newData, 'hspace', normalized(setHspace, normalizeCss));\n updateProp(image, oldData, newData, 'vspace', normalized(setVspace, normalizeCss));\n updateProp(image, oldData, newData, 'border', normalized(setBorder, normalizeCss));\n updateProp(image, oldData, newData, 'borderStyle', normalized(setBorderStyle, normalizeCss));\n updateAlt(image, oldData, newData);\n };\n\n const normalizeCss$1 = (editor, cssText) => {\n const css = editor.dom.styles.parse(cssText);\n const mergedCss = mergeMargins(css);\n const compressed = editor.dom.styles.parse(editor.dom.styles.serialize(mergedCss));\n return editor.dom.styles.serialize(compressed);\n };\n const getSelectedImage = editor => {\n const imgElm = editor.selection.getNode();\n const figureElm = editor.dom.getParent(imgElm, 'figure.image');\n if (figureElm) {\n return editor.dom.select('img', figureElm)[0];\n }\n if (imgElm && (imgElm.nodeName !== 'IMG' || isPlaceholderImage(imgElm))) {\n return null;\n }\n return imgElm;\n };\n const splitTextBlock = (editor, figure) => {\n var _a;\n const dom = editor.dom;\n const textBlockElements = filter(editor.schema.getTextBlockElements(), (_, parentElm) => !editor.schema.isValidChild(parentElm, 'figure'));\n const textBlock = dom.getParent(figure.parentNode, node => hasNonNullableKey(textBlockElements, node.nodeName), editor.getBody());\n if (textBlock) {\n return (_a = dom.split(textBlock, figure)) !== null && _a !== void 0 ? _a : figure;\n } else {\n return figure;\n }\n };\n const readImageDataFromSelection = editor => {\n const image = getSelectedImage(editor);\n return image ? read(css => normalizeCss$1(editor, css), image) : defaultData();\n };\n const insertImageAtCaret = (editor, data) => {\n const elm = create(css => normalizeCss$1(editor, css), data);\n editor.dom.setAttrib(elm, 'data-mce-id', '__mcenew');\n editor.focus();\n editor.selection.setContent(elm.outerHTML);\n const insertedElm = editor.dom.select('*[data-mce-id=\"__mcenew\"]')[0];\n editor.dom.setAttrib(insertedElm, 'data-mce-id', null);\n if (isFigure(insertedElm)) {\n const figure = splitTextBlock(editor, insertedElm);\n editor.selection.select(figure);\n } else {\n editor.selection.select(insertedElm);\n }\n };\n const syncSrcAttr = (editor, image) => {\n editor.dom.setAttrib(image, 'src', image.getAttribute('src'));\n };\n const deleteImage = (editor, image) => {\n if (image) {\n const elm = editor.dom.is(image.parentNode, 'figure.image') ? image.parentNode : image;\n editor.dom.remove(elm);\n editor.focus();\n editor.nodeChanged();\n if (editor.dom.isEmpty(editor.getBody())) {\n editor.setContent('');\n editor.selection.setCursorLocation();\n }\n }\n };\n const writeImageDataToSelection = (editor, data) => {\n const image = getSelectedImage(editor);\n if (image) {\n write(css => normalizeCss$1(editor, css), data, image);\n syncSrcAttr(editor, image);\n if (isFigure(image.parentNode)) {\n const figure = image.parentNode;\n splitTextBlock(editor, figure);\n editor.selection.select(image.parentNode);\n } else {\n editor.selection.select(image);\n waitLoadImage(editor, data, image);\n }\n }\n };\n const sanitizeImageData = (editor, data) => {\n const src = data.src;\n return {\n ...data,\n src: isSafeImageUrl(editor, src) ? src : ''\n };\n };\n const insertOrUpdateImage = (editor, partialData) => {\n const image = getSelectedImage(editor);\n if (image) {\n const selectedImageData = read(css => normalizeCss$1(editor, css), image);\n const data = {\n ...selectedImageData,\n ...partialData\n };\n const sanitizedData = sanitizeImageData(editor, data);\n if (data.src) {\n writeImageDataToSelection(editor, sanitizedData);\n } else {\n deleteImage(editor, image);\n }\n } else if (partialData.src) {\n insertImageAtCaret(editor, {\n ...defaultData(),\n ...partialData\n });\n }\n };\n\n const deep = (old, nu) => {\n const bothObjects = isPlainObject(old) && isPlainObject(nu);\n return bothObjects ? deepMerge(old, nu) : nu;\n };\n const baseMerge = merger => {\n return (...objects) => {\n if (objects.length === 0) {\n throw new Error(`Can't merge zero objects`);\n }\n const ret = {};\n for (let j = 0; j < objects.length; j++) {\n const curObject = objects[j];\n for (const key in curObject) {\n if (has(curObject, key)) {\n ret[key] = merger(ret[key], curObject[key]);\n }\n }\n }\n return ret;\n };\n };\n const deepMerge = baseMerge(deep);\n\n var global$1 = tinymce.util.Tools.resolve('tinymce.util.ImageUploader');\n\n var global = tinymce.util.Tools.resolve('tinymce.util.Tools');\n\n const getValue = item => isString(item.value) ? item.value : '';\n const getText = item => {\n if (isString(item.text)) {\n return item.text;\n } else if (isString(item.title)) {\n return item.title;\n } else {\n return '';\n }\n };\n const sanitizeList = (list, extractValue) => {\n const out = [];\n global.each(list, item => {\n const text = getText(item);\n if (item.menu !== undefined) {\n const items = sanitizeList(item.menu, extractValue);\n out.push({\n text,\n items\n });\n } else {\n const value = extractValue(item);\n out.push({\n text,\n value\n });\n }\n });\n return out;\n };\n const sanitizer = (extractor = getValue) => list => {\n if (list) {\n return Optional.from(list).map(list => sanitizeList(list, extractor));\n } else {\n return Optional.none();\n }\n };\n const sanitize = list => sanitizer(getValue)(list);\n const isGroup = item => has(item, 'items');\n const findEntryDelegate = (list, value) => findMap(list, item => {\n if (isGroup(item)) {\n return findEntryDelegate(item.items, value);\n } else if (item.value === value) {\n return Optional.some(item);\n } else {\n return Optional.none();\n }\n });\n const findEntry = (optList, value) => optList.bind(list => findEntryDelegate(list, value));\n const ListUtils = {\n sanitizer,\n sanitize,\n findEntry\n };\n\n const makeTab$2 = _info => ({\n title: 'Advanced',\n name: 'advanced',\n items: [{\n type: 'grid',\n columns: 2,\n items: [\n {\n type: 'input',\n label: 'Vertical space',\n name: 'vspace',\n inputMode: 'numeric'\n },\n {\n type: 'input',\n label: 'Horizontal space',\n name: 'hspace',\n inputMode: 'numeric'\n },\n {\n type: 'input',\n label: 'Border width',\n name: 'border',\n inputMode: 'numeric'\n },\n {\n type: 'listbox',\n name: 'borderstyle',\n label: 'Border style',\n items: [\n {\n text: 'Select...',\n value: ''\n },\n {\n text: 'Solid',\n value: 'solid'\n },\n {\n text: 'Dotted',\n value: 'dotted'\n },\n {\n text: 'Dashed',\n value: 'dashed'\n },\n {\n text: 'Double',\n value: 'double'\n },\n {\n text: 'Groove',\n value: 'groove'\n },\n {\n text: 'Ridge',\n value: 'ridge'\n },\n {\n text: 'Inset',\n value: 'inset'\n },\n {\n text: 'Outset',\n value: 'outset'\n },\n {\n text: 'None',\n value: 'none'\n },\n {\n text: 'Hidden',\n value: 'hidden'\n }\n ]\n }\n ]\n }]\n });\n const AdvTab = { makeTab: makeTab$2 };\n\n const collect = editor => {\n const urlListSanitizer = ListUtils.sanitizer(item => editor.convertURL(item.value || item.url || '', 'src'));\n const futureImageList = new Promise(completer => {\n createImageList(editor, imageList => {\n completer(urlListSanitizer(imageList).map(items => flatten([\n [{\n text: 'None',\n value: ''\n }],\n items\n ])));\n });\n });\n const classList = ListUtils.sanitize(getClassList(editor));\n const hasAdvTab$1 = hasAdvTab(editor);\n const hasUploadTab$1 = hasUploadTab(editor);\n const hasUploadUrl$1 = hasUploadUrl(editor);\n const hasUploadHandler$1 = hasUploadHandler(editor);\n const image = readImageDataFromSelection(editor);\n const hasDescription$1 = hasDescription(editor);\n const hasImageTitle$1 = hasImageTitle(editor);\n const hasDimensions$1 = hasDimensions(editor);\n const hasImageCaption$1 = hasImageCaption(editor);\n const hasAccessibilityOptions = showAccessibilityOptions(editor);\n const automaticUploads = isAutomaticUploadsEnabled(editor);\n const prependURL = Optional.some(getPrependUrl(editor)).filter(preUrl => isString(preUrl) && preUrl.length > 0);\n return futureImageList.then(imageList => ({\n image,\n imageList,\n classList,\n hasAdvTab: hasAdvTab$1,\n hasUploadTab: hasUploadTab$1,\n hasUploadUrl: hasUploadUrl$1,\n hasUploadHandler: hasUploadHandler$1,\n hasDescription: hasDescription$1,\n hasImageTitle: hasImageTitle$1,\n hasDimensions: hasDimensions$1,\n hasImageCaption: hasImageCaption$1,\n prependURL,\n hasAccessibilityOptions,\n automaticUploads\n }));\n };\n\n const makeItems = info => {\n const imageUrl = {\n name: 'src',\n type: 'urlinput',\n filetype: 'image',\n label: 'Source',\n picker_text: 'Browse files'\n };\n const imageList = info.imageList.map(items => ({\n name: 'images',\n type: 'listbox',\n label: 'Image list',\n items\n }));\n const imageDescription = {\n name: 'alt',\n type: 'input',\n label: 'Alternative description',\n enabled: !(info.hasAccessibilityOptions && info.image.isDecorative)\n };\n const imageTitle = {\n name: 'title',\n type: 'input',\n label: 'Image title'\n };\n const imageDimensions = {\n name: 'dimensions',\n type: 'sizeinput'\n };\n const isDecorative = {\n type: 'label',\n label: 'Accessibility',\n items: [{\n name: 'isDecorative',\n type: 'checkbox',\n label: 'Image is decorative'\n }]\n };\n const classList = info.classList.map(items => ({\n name: 'classes',\n type: 'listbox',\n label: 'Class',\n items\n }));\n const caption = {\n type: 'label',\n label: 'Caption',\n items: [{\n type: 'checkbox',\n name: 'caption',\n label: 'Show caption'\n }]\n };\n const getDialogContainerType = useColumns => useColumns ? {\n type: 'grid',\n columns: 2\n } : { type: 'panel' };\n return flatten([\n [imageUrl],\n imageList.toArray(),\n info.hasAccessibilityOptions && info.hasDescription ? [isDecorative] : [],\n info.hasDescription ? [imageDescription] : [],\n info.hasImageTitle ? [imageTitle] : [],\n info.hasDimensions ? [imageDimensions] : [],\n [{\n ...getDialogContainerType(info.classList.isSome() && info.hasImageCaption),\n items: flatten([\n classList.toArray(),\n info.hasImageCaption ? [caption] : []\n ])\n }]\n ]);\n };\n const makeTab$1 = info => ({\n title: 'General',\n name: 'general',\n items: makeItems(info)\n });\n const MainTab = {\n makeTab: makeTab$1,\n makeItems\n };\n\n const makeTab = _info => {\n const items = [{\n type: 'dropzone',\n name: 'fileinput'\n }];\n return {\n title: 'Upload',\n name: 'upload',\n items\n };\n };\n const UploadTab = { makeTab };\n\n const createState = info => ({\n prevImage: ListUtils.findEntry(info.imageList, info.image.src),\n prevAlt: info.image.alt,\n open: true\n });\n const fromImageData = image => ({\n src: {\n value: image.src,\n meta: {}\n },\n images: image.src,\n alt: image.alt,\n title: image.title,\n dimensions: {\n width: image.width,\n height: image.height\n },\n classes: image.class,\n caption: image.caption,\n style: image.style,\n vspace: image.vspace,\n border: image.border,\n hspace: image.hspace,\n borderstyle: image.borderStyle,\n fileinput: [],\n isDecorative: image.isDecorative\n });\n const toImageData = (data, removeEmptyAlt) => ({\n src: data.src.value,\n alt: (data.alt === null || data.alt.length === 0) && removeEmptyAlt ? null : data.alt,\n title: data.title,\n width: data.dimensions.width,\n height: data.dimensions.height,\n class: data.classes,\n style: data.style,\n caption: data.caption,\n hspace: data.hspace,\n vspace: data.vspace,\n border: data.border,\n borderStyle: data.borderstyle,\n isDecorative: data.isDecorative\n });\n const addPrependUrl2 = (info, srcURL) => {\n if (!/^(?:[a-zA-Z]+:)?\\/\\//.test(srcURL)) {\n return info.prependURL.bind(prependUrl => {\n if (srcURL.substring(0, prependUrl.length) !== prependUrl) {\n return Optional.some(prependUrl + srcURL);\n }\n return Optional.none();\n });\n }\n return Optional.none();\n };\n const addPrependUrl = (info, api) => {\n const data = api.getData();\n addPrependUrl2(info, data.src.value).each(srcURL => {\n api.setData({\n src: {\n value: srcURL,\n meta: data.src.meta\n }\n });\n });\n };\n const formFillFromMeta2 = (info, data, meta) => {\n if (info.hasDescription && isString(meta.alt)) {\n data.alt = meta.alt;\n }\n if (info.hasAccessibilityOptions) {\n data.isDecorative = meta.isDecorative || data.isDecorative || false;\n }\n if (info.hasImageTitle && isString(meta.title)) {\n data.title = meta.title;\n }\n if (info.hasDimensions) {\n if (isString(meta.width)) {\n data.dimensions.width = meta.width;\n }\n if (isString(meta.height)) {\n data.dimensions.height = meta.height;\n }\n }\n if (isString(meta.class)) {\n ListUtils.findEntry(info.classList, meta.class).each(entry => {\n data.classes = entry.value;\n });\n }\n if (info.hasImageCaption) {\n if (isBoolean(meta.caption)) {\n data.caption = meta.caption;\n }\n }\n if (info.hasAdvTab) {\n if (isString(meta.style)) {\n data.style = meta.style;\n }\n if (isString(meta.vspace)) {\n data.vspace = meta.vspace;\n }\n if (isString(meta.border)) {\n data.border = meta.border;\n }\n if (isString(meta.hspace)) {\n data.hspace = meta.hspace;\n }\n if (isString(meta.borderstyle)) {\n data.borderstyle = meta.borderstyle;\n }\n }\n };\n const formFillFromMeta = (info, api) => {\n const data = api.getData();\n const meta = data.src.meta;\n if (meta !== undefined) {\n const newData = deepMerge({}, data);\n formFillFromMeta2(info, newData, meta);\n api.setData(newData);\n }\n };\n const calculateImageSize = (helpers, info, state, api) => {\n const data = api.getData();\n const url = data.src.value;\n const meta = data.src.meta || {};\n if (!meta.width && !meta.height && info.hasDimensions) {\n if (isNotEmpty(url)) {\n helpers.imageSize(url).then(size => {\n if (state.open) {\n api.setData({ dimensions: size });\n }\n }).catch(e => console.error(e));\n } else {\n api.setData({\n dimensions: {\n width: '',\n height: ''\n }\n });\n }\n }\n };\n const updateImagesDropdown = (info, state, api) => {\n const data = api.getData();\n const image = ListUtils.findEntry(info.imageList, data.src.value);\n state.prevImage = image;\n api.setData({ images: image.map(entry => entry.value).getOr('') });\n };\n const changeSrc = (helpers, info, state, api) => {\n addPrependUrl(info, api);\n formFillFromMeta(info, api);\n calculateImageSize(helpers, info, state, api);\n updateImagesDropdown(info, state, api);\n };\n const changeImages = (helpers, info, state, api) => {\n const data = api.getData();\n const image = ListUtils.findEntry(info.imageList, data.images);\n image.each(img => {\n const updateAlt = data.alt === '' || state.prevImage.map(image => image.text === data.alt).getOr(false);\n if (updateAlt) {\n if (img.value === '') {\n api.setData({\n src: img,\n alt: state.prevAlt\n });\n } else {\n api.setData({\n src: img,\n alt: img.text\n });\n }\n } else {\n api.setData({ src: img });\n }\n });\n state.prevImage = image;\n changeSrc(helpers, info, state, api);\n };\n const changeFileInput = (helpers, info, state, api) => {\n const data = api.getData();\n api.block('Uploading image');\n head(data.fileinput).fold(() => {\n api.unblock();\n }, file => {\n const blobUri = URL.createObjectURL(file);\n const finalize = () => {\n api.unblock();\n URL.revokeObjectURL(blobUri);\n };\n const updateSrcAndSwitchTab = url => {\n api.setData({\n src: {\n value: url,\n meta: {}\n }\n });\n api.showTab('general');\n changeSrc(helpers, info, state, api);\n };\n blobToDataUri(file).then(dataUrl => {\n const blobInfo = helpers.createBlobCache(file, blobUri, dataUrl);\n if (info.automaticUploads) {\n helpers.uploadImage(blobInfo).then(result => {\n updateSrcAndSwitchTab(result.url);\n finalize();\n }).catch(err => {\n finalize();\n helpers.alertErr(err);\n });\n } else {\n helpers.addToBlobCache(blobInfo);\n updateSrcAndSwitchTab(blobInfo.blobUri());\n api.unblock();\n }\n });\n });\n };\n const changeHandler = (helpers, info, state) => (api, evt) => {\n if (evt.name === 'src') {\n changeSrc(helpers, info, state, api);\n } else if (evt.name === 'images') {\n changeImages(helpers, info, state, api);\n } else if (evt.name === 'alt') {\n state.prevAlt = api.getData().alt;\n } else if (evt.name === 'fileinput') {\n changeFileInput(helpers, info, state, api);\n } else if (evt.name === 'isDecorative') {\n api.setEnabled('alt', !api.getData().isDecorative);\n }\n };\n const closeHandler = state => () => {\n state.open = false;\n };\n const makeDialogBody = info => {\n if (info.hasAdvTab || info.hasUploadUrl || info.hasUploadHandler) {\n const tabPanel = {\n type: 'tabpanel',\n tabs: flatten([\n [MainTab.makeTab(info)],\n info.hasAdvTab ? [AdvTab.makeTab(info)] : [],\n info.hasUploadTab && (info.hasUploadUrl || info.hasUploadHandler) ? [UploadTab.makeTab(info)] : []\n ])\n };\n return tabPanel;\n } else {\n const panel = {\n type: 'panel',\n items: MainTab.makeItems(info)\n };\n return panel;\n }\n };\n const submitHandler = (editor, info, helpers) => api => {\n const data = deepMerge(fromImageData(info.image), api.getData());\n const finalData = {\n ...data,\n style: getStyleValue(helpers.normalizeCss, toImageData(data, false))\n };\n editor.execCommand('mceUpdateImage', false, toImageData(finalData, info.hasAccessibilityOptions));\n editor.editorUpload.uploadImagesAuto();\n api.close();\n };\n const imageSize = editor => url => {\n if (!isSafeImageUrl(editor, url)) {\n return Promise.resolve({\n width: '',\n height: ''\n });\n } else {\n return getImageSize(editor.documentBaseURI.toAbsolute(url)).then(dimensions => ({\n width: String(dimensions.width),\n height: String(dimensions.height)\n }));\n }\n };\n const createBlobCache = editor => (file, blobUri, dataUrl) => {\n var _a;\n return editor.editorUpload.blobCache.create({\n blob: file,\n blobUri,\n name: (_a = file.name) === null || _a === void 0 ? void 0 : _a.replace(/\\.[^\\.]+$/, ''),\n filename: file.name,\n base64: dataUrl.split(',')[1]\n });\n };\n const addToBlobCache = editor => blobInfo => {\n editor.editorUpload.blobCache.add(blobInfo);\n };\n const alertErr = editor => message => {\n editor.windowManager.alert(message);\n };\n const normalizeCss = editor => cssText => normalizeCss$1(editor, cssText);\n const parseStyle = editor => cssText => editor.dom.parseStyle(cssText);\n const serializeStyle = editor => (stylesArg, name) => editor.dom.serializeStyle(stylesArg, name);\n const uploadImage = editor => blobInfo => global$1(editor).upload([blobInfo], false).then(results => {\n var _a;\n if (results.length === 0) {\n return Promise.reject('Failed to upload image');\n } else if (results[0].status === false) {\n return Promise.reject((_a = results[0].error) === null || _a === void 0 ? void 0 : _a.message);\n } else {\n return results[0];\n }\n });\n const Dialog = editor => {\n const helpers = {\n imageSize: imageSize(editor),\n addToBlobCache: addToBlobCache(editor),\n createBlobCache: createBlobCache(editor),\n alertErr: alertErr(editor),\n normalizeCss: normalizeCss(editor),\n parseStyle: parseStyle(editor),\n serializeStyle: serializeStyle(editor),\n uploadImage: uploadImage(editor)\n };\n const open = () => {\n collect(editor).then(info => {\n const state = createState(info);\n return {\n title: 'Insert/Edit Image',\n size: 'normal',\n body: makeDialogBody(info),\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: fromImageData(info.image),\n onSubmit: submitHandler(editor, info, helpers),\n onChange: changeHandler(helpers, info, state),\n onClose: closeHandler(state)\n };\n }).then(editor.windowManager.open);\n };\n return { open };\n };\n\n const register$1 = editor => {\n editor.addCommand('mceImage', Dialog(editor).open);\n editor.addCommand('mceUpdateImage', (_ui, data) => {\n editor.undoManager.transact(() => insertOrUpdateImage(editor, data));\n });\n };\n\n const hasImageClass = node => {\n const className = node.attr('class');\n return isNonNullable(className) && /\\bimage\\b/.test(className);\n };\n const toggleContentEditableState = state => nodes => {\n let i = nodes.length;\n const toggleContentEditable = node => {\n node.attr('contenteditable', state ? 'true' : null);\n };\n while (i--) {\n const node = nodes[i];\n if (hasImageClass(node)) {\n node.attr('contenteditable', state ? 'false' : null);\n global.each(node.getAll('figcaption'), toggleContentEditable);\n }\n }\n };\n const setup = editor => {\n editor.on('PreInit', () => {\n editor.parser.addNodeFilter('figure', toggleContentEditableState(true));\n editor.serializer.addNodeFilter('figure', toggleContentEditableState(false));\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 editor.ui.registry.addToggleButton('image', {\n icon: 'image',\n tooltip: 'Insert/edit image',\n onAction: Dialog(editor).open,\n onSetup: buttonApi => {\n buttonApi.setActive(isNonNullable(getSelectedImage(editor)));\n const unbindSelectorChanged = editor.selection.selectorChangedWithUnbind('img:not([data-mce-object]):not([data-mce-placeholder]),figure.image', buttonApi.setActive).unbind;\n const unbindEditable = onSetupEditable(editor)(buttonApi);\n return () => {\n unbindSelectorChanged();\n unbindEditable();\n };\n }\n });\n editor.ui.registry.addMenuItem('image', {\n icon: 'image',\n text: 'Image...',\n onAction: Dialog(editor).open,\n onSetup: onSetupEditable(editor)\n });\n editor.ui.registry.addContextMenu('image', { update: element => editor.selection.isEditable() && (isFigure(element) || isImage(element) && !isPlaceholderImage(element)) ? ['image'] : [] });\n };\n\n var Plugin = () => {\n global$4.add('image', editor => {\n register$2(editor);\n setup(editor);\n register(editor);\n register$1(editor);\n });\n };\n\n Plugin();\n\n})();\n"],"names":["global$4","tinymce","util","Tools","resolve","getPrototypeOf","Object","hasProto","v","constructor","predicate","_a","prototype","name","isType","type","value","x","t","Array","isArray","String","o","proto","isPrototypeOf","typeOf","isSimpleType","isString","isObject","isPlainObject","is","isNull","a","isBoolean","isNonNullable","isNullable","isFunction","isNumber","noop","Optional","tag","this","some","none","singletonNone","fold","onNone","onSome","isSome","isNone","map","mapper","bind","binder","exists","forall","filter","getOr","replacement","or","getOrThunk","thunk","orThunk","getOrDie","message","Error","from","getOrNull","getOrUndefined","each","worker","toArray","toString","keys","hasOwnProperty","internalFilter","obj","pred","onTrue","onFalse","f","props","k","len","length","i","has","key","call","nativePush","push","flatten","xs","r","apply","head","get","window","Function","set","element","dom","console","error","setAttribute","rawSet","fromDom","node","SugarElement","fromHtml","html","scope","div","document","createElement","innerHTML","hasChildNodes","childNodes","fromTag","fromText","text","createTextNode","fromPoint","docElm","y","elementFromPoint","global$3","global$2","isNotEmpty","s","option","editor","options","register$2","registerOption","register","processor","default","valid","isArrayOf","hasDimensions","hasAdvTab","hasUploadTab","getPrependUrl","getClassList","hasDescription","hasImageTitle","hasImageCaption","getImageList","showAccessibilityOptions","isAutomaticUploadsEnabled","parseIntAndGetMax","val1","val2","Math","max","parseInt","removePixelSuffix","replace","addPixelSuffix","test","isPlaceholderImage","imgElm","nodeName","hasAttribute","isSafeImageUrl","src","getOption","isDomSafe","allow_html_data_urls","allow_script_urls","allow_svg_data_urls","DOM","getHspace","image","style","marginLeft","marginRight","getVspace","marginTop","marginBottom","getBorder","borderWidth","getAttrib","getAttribute","hasCaption","parentNode","updateAttrib","removeAttribute","toggleCaption","figureElm","insertAfter","remove","removeFigure","create","class","appendChild","contentEditable","wrapInFigure","normalizeStyle","normalizeCss","attrValue","setSize","styles","getSize","setHspace","pxValue","setVspace","setBorder","setBorderStyle","borderStyle","getBorderStyle","isFigure","elm","getIsDecorative","getAlt","getStyleValue","data","hspace","vspace","border","read","alt","title","width","height","caption","isDecorative","updateProp","oldData","newData","setAlt","setAttrib","sugarImage","normalized","write","_name","_value","updateAlt","normalizeCss$1","cssText","mergedCss","css","margin","splitMargin","split","mergeMargins","parse","compressed","serialize","getSelectedImage","selection","getNode","getParent","select","splitTextBlock","figure","textBlockElements","schema","getTextBlockElements","_","parentElm","isValidChild","textBlock","hasNonNullableKey","undefined","getBody","insertImageAtCaret","focus","setContent","outerHTML","insertedElm","writeImageDataToSelection","syncSrcAttr","selectImage","onload","onerror","nodeChanged","setAttribs","clientWidth","clientHeight","waitLoadImage","insertOrUpdateImage","partialData","sanitizedData","sanitizeImageData","isEmpty","setCursorLocation","deleteImage","deepMerge","merger","old","nu","objects","ret","j","curObject","global$1","global","getValue","item","sanitizeList","list","extractValue","out","getText","menu","items","sanitizer","extractor","findEntryDelegate","arr","findMap","isGroup","ListUtils","optList","AdvTab","_info","columns","label","inputMode","collect","urlListSanitizer","convertURL","url","futureImageList","Promise","completer","callback","imageList","fetch","then","res","ok","json","createImageList","classList","hasAdvTab$1","hasUploadTab$1","hasUploadUrl$1","hasUploadUrl","hasUploadHandler$1","hasUploadHandler","readImageDataFromSelection","hasDescription$1","hasImageTitle$1","hasDimensions$1","hasImageCaption$1","hasAccessibilityOptions","automaticUploads","prependURL","preUrl","makeItems","info","imageDescription","enabled","filetype","picker_text","useColumns","MainTab","UploadTab","fromImageData","meta","images","dimensions","classes","borderstyle","fileinput","toImageData","removeEmptyAlt","addPrependUrl","api","getData","srcURL","prependUrl","substring","addPrependUrl2","setData","formFillFromMeta","entry","formFillFromMeta2","changeSrc","helpers","state","imageSize","size","open","catch","e","calculateImageSize","prevImage","updateImagesDropdown","changeFileInput","block","unblock","file","blobUri","URL","createObjectURL","finalize","revokeObjectURL","updateSrcAndSwitchTab","showTab","blob","reject","reader","FileReader","result","readAsDataURL","dataUrl","blobInfo","createBlobCache","uploadImage","err","alertErr","addToBlobCache","changeHandler","evt","img","prevAlt","changeImages","setEnabled","closeHandler","makeDialogBody","tabs","submitHandler","finalData","execCommand","editorUpload","uploadImagesAuto","close","done","removeChild","visibility","position","bottom","left","body","getImageSize","documentBaseURI","toAbsolute","blobCache","filename","base64","add","windowManager","alert","parseStyle","serializeStyle","stylesArg","upload","results","status","Dialog","createState","buttons","primary","initialData","onSubmit","onChange","onClose","hasImageClass","className","attr","toggleContentEditableState","nodes","toggleContentEditable","getAll","onSetupEditable","isEditable","on","off","parser","addNodeFilter","serializer","setup","ui","registry","addToggleButton","icon","tooltip","onAction","onSetup","buttonApi","setActive","unbindSelectorChanged","selectorChangedWithUnbind","unbind","unbindEditable","addMenuItem","addContextMenu","update","addCommand","_ui","undoManager","transact","register$1"],"mappings":"gGAIA,WAGI,IAAIA,EAAWC,QAAQC,KAAKC,MAAMC,QAAQ,yBAE1C,MAAMC,EAAiBC,OAAOD,eACxBE,EAAW,CAACC,EAAGC,EAAaC,KAChC,IAAIC,EACJ,QAAID,EAAUF,EAAGC,EAAYG,aAGM,QAAxBD,EAAKH,EAAEC,mBAAgC,IAAPE,OAAgB,EAASA,EAAGE,QAAUJ,EAAYI,IACnG,EAcUC,EAASC,GAAQC,GAZRC,KACb,MAAMC,SAAWD,EACjB,OAAU,OAANA,EACK,OACQ,WAANC,GAAkBC,MAAMC,QAAQH,GAClC,QACQ,WAANC,GAAkBX,EAASU,EAAGI,QAAQ,CAACC,EAAGC,IAAUA,EAAMC,cAAcF,KAC1E,SAEAJ,CACf,EAEoCO,CAAOT,KAAWD,EAC5CW,EAAeX,GAAQC,UAAgBA,IAAUD,EAGjDY,EAAWb,EAAO,UAClBc,EAAWd,EAAO,UAClBe,EAAgBb,GAHX,EAACA,EAAOP,IAAgBmB,EAASZ,IAAUT,EAASS,EAAOP,GAAa,CAACa,EAAGC,IAAUlB,EAAeiB,KAAOC,IAGxFO,CAAGd,EAAOV,QACnCc,EAAUN,EAAO,SACjBiB,GANKb,EAMO,KANFc,GAAKd,IAAMc,GAAhBd,MAOX,MAAMe,EAAYP,EAAa,WAEzBQ,EAA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AUT,IAA2B,GAAO,GAC5E,EAwCAW,CAAMxV,GA3BOA,KACfA,EAAOyV,GAAGC,SAASC,gBAAgB,QAAS,CAC1CC,KAAM,QACNC,QAAS,oBACTC,SAAU5B,GAAOlU,GAAQ+P,KACzBgG,QAASC,IACPA,EAAUC,UAAUlc,EAAcwN,GAAiBvH,KACnD,MAAMkW,EAAwBlW,EAAOwH,UAAU2O,0BAA0B,sEAAuEH,EAAUC,WAAWG,OAC/JC,EAAiBpB,GAAgBjV,EAAhBiV,CAAwBe,GAC/C,MAAO,KACLE,IACAG,GAAgB,CACjB,IAGLrW,EAAOyV,GAAGC,SAASY,YAAY,QAAS,CACtCV,KAAM,QACNvW,KAAM,WACNyW,SAAU5B,GAAOlU,GAAQ+P,KACzBgG,QAASd,GAAgBjV,KAE3BA,EAAOyV,GAAGC,SAASa,eAAe,QAAS,CAAEC,OAAQvY,GAAW+B,EAAOwH,UAAU0N,eAAiBjQ,GAAShH,IAv6BrE,QAu6ByFA,EAv6BtG+D,WAu6BmHF,EAAmB7D,IAAY,CAAC,SAAW,IAAK,EAO1LmC,CAASJ,GArEMA,KACjBA,EAAOyW,WAAW,WAAYvC,GAAOlU,GAAQ+P,MAC7C/P,EAAOyW,WAAW,kBAAkB,CAACC,EAAKpR,KACxCtF,EAAO2W,YAAYC,UAAS,IAAMrN,GAAoBvJ,EAAQsF,IAAM,GACpE,EAkEAuR,CAAW7W,EAAO,GAMzB,CA59CD"}
@@ -0,0 +1,2 @@
1
+ import{__exports as e}from"../../../../_virtual/plugin56.mjs";var t;function s(){return t||(t=1,function(){var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(s=o=e,r=(n=String).prototype,r.isPrototypeOf(s)||(null===(c=o.constructor)||void 0===c?void 0:c.name)===n.name)?"string":t;var s,r;var o,n,c})(t)===e,s=t("string"),r=t("object"),o=t("array"),n=(c="function",e=>typeof e===c);var c,i=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),l=tinymce.util.Tools.resolve("tinymce.EditorManager"),a=tinymce.util.Tools.resolve("tinymce.Env"),p=tinymce.util.Tools.resolve("tinymce.util.Tools");const u=e=>t=>t.options.get(e),m=u("importcss_merge_classes"),f=u("importcss_exclusive"),_=u("importcss_selector_converter"),y=u("importcss_selector_filter"),d=u("importcss_groups"),h=u("importcss_append"),g=u("importcss_file_filter"),v=u("skin"),b=u("skin_url"),x=Array.prototype.push,T=(e,t)=>(e=>{const t=[];for(let s=0,r=e.length;s<r;++s){if(!o(e[s]))throw new Error("Arr.flatten item "+s+" was not an array, input: "+e);x.apply(t,e[s])}return t})(((e,t)=>{const s=e.length,r=new Array(s);for(let o=0;o<s;o++){const s=e[o];r[o]=t(s,o)}return r})(e,t)),S=/^\.(?:ephox|tiny-pageembed|mce)(?:[.-]+\w+)+$/,k=e=>s(e)?t=>-1!==t.indexOf(e):e instanceof RegExp?t=>e.test(t):e,j=(e,t,r)=>{const o=[],n={},c=(t,n)=>{let i,u=t.href;if(u=(e=>{const t=a.cacheSuffix;return s(e)&&(e=e.replace("?"+t,"").replace("&"+t,"")),e})(u),u&&(!r||r(u,n))&&!((e,t)=>{const s=v(e);if(s){const r=b(e),o=r?e.documentBaseURI.toAbsolute(r):l.baseURL+"/skins/ui/"+s,n=l.baseURL+"/skins/content/";return t===o+"/content"+(e.inline?".inline":"")+".min.css"||-1!==t.indexOf(n)}return!1})(e,u)){p.each(t.imports,(e=>{c(e,!0)}));try{i=t.cssRules||t.rules}catch(e){}p.each(i,(e=>{e.styleSheet&&e.styleSheet?c(e.styleSheet,!0):(e=>e.selectorText)(e)&&p.each(e.selectorText.split(","),(e=>{o.push(p.trim(e))}))}))}};p.each(e.contentCSS,(e=>{n[e]=!0})),r||(r=(e,t)=>t||n[e]);try{p.each(t.styleSheets,(e=>{c(e)}))}catch(e){}return o},w=(e,t)=>{let s={};const r=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(t);if(!r)return;const o=r[1],n=r[2].substr(1).split(".").join(" "),c=p.makeMap("a,img");return r[1]?(s={title:t},e.schema.getTextBlockElements()[o]?s.block=o:e.schema.getBlockElements()[o]||c[o.toLowerCase()]?s.selector=o:s.inline=o):r[2]&&(s={inline:"span",title:t.substr(1),classes:n}),m(e)?s.classes=n:s.attributes={class:n},s},A=(e,t)=>null===t||f(e),E=e=>{e.on("init",(()=>{const t=(()=>{const e=[],t=[],s={};return{addItemToGroup:(e,r)=>{s[e]?s[e].push(r):(t.push(e),s[e]=[r])},addItem:t=>{e.push(t)},toFormats:()=>T(t,(e=>{const t=s[e];return 0===t.length?[]:[{title:e,items:t}]})).concat(e)}})(),s={},r=k(y(e)),o=(e=>p.map(e,(e=>p.extend({},e,{original:e,selectors:{},filter:k(e.filter)}))))(d(e)),n=(t,r)=>{if(((e,t,s,r)=>!(A(e,s)?t in r:t in s.selectors))(e,t,r,s)){((e,t,s,r)=>{A(e,s)?r[t]=!0:s.selectors[t]=!0})(e,t,r,s);const o=((e,t,s,r)=>{let o;const n=_(e);return o=r&&r.selector_converter?r.selector_converter:n||(()=>w(e,s)),o.call(t,s,r)})(e,e.plugins.importcss,t,r);if(o){const t=o.name||i.DOM.uniqueId();return e.formatter.register(t,o),{title:o.title,format:t}}}return null};p.each(j(e,e.getDoc(),k(g(e))),(e=>{if(!S.test(e)&&(!r||r(e))){const s=((e,t)=>p.grep(e,(e=>!e.filter||e.filter(t))))(o,e);if(s.length>0)p.each(s,(s=>{const r=n(e,s);r&&t.addItemToGroup(s.title,r)}));else{const s=n(e,null);s&&t.addItem(s)}}}));const c=t.toFormats();e.dispatch("addStyleModifications",{items:c,replace:!h(e)})}))};e.add("importcss",(e=>((e=>{const t=e.options.register,o=e=>s(e)||n(e)||r(e);t("importcss_merge_classes",{processor:"boolean",default:!0}),t("importcss_exclusive",{processor:"boolean",default:!0}),t("importcss_selector_converter",{processor:"function"}),t("importcss_selector_filter",{processor:o}),t("importcss_file_filter",{processor:o}),t("importcss_groups",{processor:"object[]"}),t("importcss_append",{processor:"boolean",default:!1})})(e),E(e),(e=>({convertSelectorToFormat:t=>w(e,t)}))(e))))}()),e}export{s as __require};
2
+ //# sourceMappingURL=plugin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.mjs","sources":["../../../../../../node_modules/tinymce/plugins/importcss/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 isSimpleType = type => value => typeof value === type;\n const isString = isType('string');\n const isObject = isType('object');\n const isArray = isType('array');\n const isFunction = isSimpleType('function');\n\n var global$3 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');\n\n var global$2 = tinymce.util.Tools.resolve('tinymce.EditorManager');\n\n var global$1 = tinymce.util.Tools.resolve('tinymce.Env');\n\n var global = tinymce.util.Tools.resolve('tinymce.util.Tools');\n\n const option = name => editor => editor.options.get(name);\n const register = editor => {\n const registerOption = editor.options.register;\n const filterProcessor = value => isString(value) || isFunction(value) || isObject(value);\n registerOption('importcss_merge_classes', {\n processor: 'boolean',\n default: true\n });\n registerOption('importcss_exclusive', {\n processor: 'boolean',\n default: true\n });\n registerOption('importcss_selector_converter', { processor: 'function' });\n registerOption('importcss_selector_filter', { processor: filterProcessor });\n registerOption('importcss_file_filter', { processor: filterProcessor });\n registerOption('importcss_groups', { processor: 'object[]' });\n registerOption('importcss_append', {\n processor: 'boolean',\n default: false\n });\n };\n const shouldMergeClasses = option('importcss_merge_classes');\n const shouldImportExclusive = option('importcss_exclusive');\n const getSelectorConverter = option('importcss_selector_converter');\n const getSelectorFilter = option('importcss_selector_filter');\n const getCssGroups = option('importcss_groups');\n const shouldAppend = option('importcss_append');\n const getFileFilter = option('importcss_file_filter');\n const getSkin = option('skin');\n const getSkinUrl = option('skin_url');\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 flatten = xs => {\n const r = [];\n for (let i = 0, len = xs.length; i < len; ++i) {\n if (!isArray(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 const generate = () => {\n const ungroupedOrder = [];\n const groupOrder = [];\n const groups = {};\n const addItemToGroup = (groupTitle, itemInfo) => {\n if (groups[groupTitle]) {\n groups[groupTitle].push(itemInfo);\n } else {\n groupOrder.push(groupTitle);\n groups[groupTitle] = [itemInfo];\n }\n };\n const addItem = itemInfo => {\n ungroupedOrder.push(itemInfo);\n };\n const toFormats = () => {\n const groupItems = bind(groupOrder, g => {\n const items = groups[g];\n return items.length === 0 ? [] : [{\n title: g,\n items\n }];\n });\n return groupItems.concat(ungroupedOrder);\n };\n return {\n addItemToGroup,\n addItem,\n toFormats\n };\n };\n\n const internalEditorStyle = /^\\.(?:ephox|tiny-pageembed|mce)(?:[.-]+\\w+)+$/;\n const removeCacheSuffix = url => {\n const cacheSuffix = global$1.cacheSuffix;\n if (isString(url)) {\n url = url.replace('?' + cacheSuffix, '').replace('&' + cacheSuffix, '');\n }\n return url;\n };\n const isSkinContentCss = (editor, href) => {\n const skin = getSkin(editor);\n if (skin) {\n const skinUrlBase = getSkinUrl(editor);\n const skinUrl = skinUrlBase ? editor.documentBaseURI.toAbsolute(skinUrlBase) : global$2.baseURL + '/skins/ui/' + skin;\n const contentSkinUrlPart = global$2.baseURL + '/skins/content/';\n return href === skinUrl + '/content' + (editor.inline ? '.inline' : '') + '.min.css' || href.indexOf(contentSkinUrlPart) !== -1;\n }\n return false;\n };\n const compileFilter = filter => {\n if (isString(filter)) {\n return value => {\n return value.indexOf(filter) !== -1;\n };\n } else if (filter instanceof RegExp) {\n return value => {\n return filter.test(value);\n };\n }\n return filter;\n };\n const isCssImportRule = rule => rule.styleSheet;\n const isCssPageRule = rule => rule.selectorText;\n const getSelectors = (editor, doc, fileFilter) => {\n const selectors = [];\n const contentCSSUrls = {};\n const append = (styleSheet, imported) => {\n let href = styleSheet.href;\n let rules;\n href = removeCacheSuffix(href);\n if (!href || fileFilter && !fileFilter(href, imported) || isSkinContentCss(editor, href)) {\n return;\n }\n global.each(styleSheet.imports, styleSheet => {\n append(styleSheet, true);\n });\n try {\n rules = styleSheet.cssRules || styleSheet.rules;\n } catch (e) {\n }\n global.each(rules, cssRule => {\n if (isCssImportRule(cssRule) && cssRule.styleSheet) {\n append(cssRule.styleSheet, true);\n } else if (isCssPageRule(cssRule)) {\n global.each(cssRule.selectorText.split(','), selector => {\n selectors.push(global.trim(selector));\n });\n }\n });\n };\n global.each(editor.contentCSS, url => {\n contentCSSUrls[url] = true;\n });\n if (!fileFilter) {\n fileFilter = (href, imported) => {\n return imported || contentCSSUrls[href];\n };\n }\n try {\n global.each(doc.styleSheets, styleSheet => {\n append(styleSheet);\n });\n } catch (e) {\n }\n return selectors;\n };\n const defaultConvertSelectorToFormat = (editor, selectorText) => {\n let format = {};\n const selector = /^(?:([a-z0-9\\-_]+))?(\\.[a-z0-9_\\-\\.]+)$/i.exec(selectorText);\n if (!selector) {\n return;\n }\n const elementName = selector[1];\n const classes = selector[2].substr(1).split('.').join(' ');\n const inlineSelectorElements = global.makeMap('a,img');\n if (selector[1]) {\n format = { title: selectorText };\n if (editor.schema.getTextBlockElements()[elementName]) {\n format.block = elementName;\n } else if (editor.schema.getBlockElements()[elementName] || inlineSelectorElements[elementName.toLowerCase()]) {\n format.selector = elementName;\n } else {\n format.inline = elementName;\n }\n } else if (selector[2]) {\n format = {\n inline: 'span',\n title: selectorText.substr(1),\n classes\n };\n }\n if (shouldMergeClasses(editor)) {\n format.classes = classes;\n } else {\n format.attributes = { class: classes };\n }\n return format;\n };\n const getGroupsBySelector = (groups, selector) => {\n return global.grep(groups, group => {\n return !group.filter || group.filter(selector);\n });\n };\n const compileUserDefinedGroups = groups => {\n return global.map(groups, group => {\n return global.extend({}, group, {\n original: group,\n selectors: {},\n filter: compileFilter(group.filter)\n });\n });\n };\n const isExclusiveMode = (editor, group) => {\n return group === null || shouldImportExclusive(editor);\n };\n const isUniqueSelector = (editor, selector, group, globallyUniqueSelectors) => {\n return !(isExclusiveMode(editor, group) ? selector in globallyUniqueSelectors : selector in group.selectors);\n };\n const markUniqueSelector = (editor, selector, group, globallyUniqueSelectors) => {\n if (isExclusiveMode(editor, group)) {\n globallyUniqueSelectors[selector] = true;\n } else {\n group.selectors[selector] = true;\n }\n };\n const convertSelectorToFormat = (editor, plugin, selector, group) => {\n let selectorConverter;\n const converter = getSelectorConverter(editor);\n if (group && group.selector_converter) {\n selectorConverter = group.selector_converter;\n } else if (converter) {\n selectorConverter = converter;\n } else {\n selectorConverter = () => {\n return defaultConvertSelectorToFormat(editor, selector);\n };\n }\n return selectorConverter.call(plugin, selector, group);\n };\n const setup = editor => {\n editor.on('init', () => {\n const model = generate();\n const globallyUniqueSelectors = {};\n const selectorFilter = compileFilter(getSelectorFilter(editor));\n const groups = compileUserDefinedGroups(getCssGroups(editor));\n const processSelector = (selector, group) => {\n if (isUniqueSelector(editor, selector, group, globallyUniqueSelectors)) {\n markUniqueSelector(editor, selector, group, globallyUniqueSelectors);\n const format = convertSelectorToFormat(editor, editor.plugins.importcss, selector, group);\n if (format) {\n const formatName = format.name || global$3.DOM.uniqueId();\n editor.formatter.register(formatName, format);\n return {\n title: format.title,\n format: formatName\n };\n }\n }\n return null;\n };\n global.each(getSelectors(editor, editor.getDoc(), compileFilter(getFileFilter(editor))), selector => {\n if (!internalEditorStyle.test(selector)) {\n if (!selectorFilter || selectorFilter(selector)) {\n const selectorGroups = getGroupsBySelector(groups, selector);\n if (selectorGroups.length > 0) {\n global.each(selectorGroups, group => {\n const menuItem = processSelector(selector, group);\n if (menuItem) {\n model.addItemToGroup(group.title, menuItem);\n }\n });\n } else {\n const menuItem = processSelector(selector, null);\n if (menuItem) {\n model.addItem(menuItem);\n }\n }\n }\n }\n });\n const items = model.toFormats();\n editor.dispatch('addStyleModifications', {\n items,\n replace: !shouldAppend(editor)\n });\n });\n };\n\n const get = editor => {\n const convertSelectorToFormat = selectorText => {\n return defaultConvertSelectorToFormat(editor, selectorText);\n };\n return { convertSelectorToFormat };\n };\n\n var Plugin = () => {\n global$4.add('importcss', editor => {\n register(editor);\n setup(editor);\n return get(editor);\n });\n };\n\n Plugin();\n\n})();\n"],"names":["global$4","tinymce","util","Tools","resolve","isType","type","value","x","t","Array","isArray","o","v","proto","constructor","String","prototype","isPrototypeOf","_a","name","typeOf","isString","isObject","isFunction","global$3","global$2","global$1","global","option","editor","options","get","shouldMergeClasses","shouldImportExclusive","getSelectorConverter","getSelectorFilter","getCssGroups","shouldAppend","getFileFilter","getSkin","getSkinUrl","nativePush","push","bind","xs","f","r","i","len","length","Error","apply","flatten","map","internalEditorStyle","compileFilter","filter","indexOf","RegExp","test","getSelectors","doc","fileFilter","selectors","contentCSSUrls","append","styleSheet","imported","rules","href","url","cacheSuffix","replace","removeCacheSuffix","skin","skinUrlBase","skinUrl","documentBaseURI","toAbsolute","baseURL","contentSkinUrlPart","inline","isSkinContentCss","each","imports","cssRules","e","cssRule","rule","selectorText","isCssPageRule","split","selector","trim","contentCSS","styleSheets","defaultConvertSelectorToFormat","format","exec","elementName","classes","substr","join","inlineSelectorElements","makeMap","title","schema","getTextBlockElements","block","getBlockElements","toLowerCase","attributes","class","isExclusiveMode","group","setup","on","model","ungroupedOrder","groupOrder","groups","addItemToGroup","groupTitle","itemInfo","addItem","toFormats","g","items","concat","generate","globallyUniqueSelectors","selectorFilter","extend","original","compileUserDefinedGroups","processSelector","isUniqueSelector","markUniqueSelector","plugin","selectorConverter","converter","selector_converter","call","convertSelectorToFormat","plugins","importcss","formatName","DOM","uniqueId","formatter","register","getDoc","selectorGroups","grep","getGroupsBySelector","menuItem","dispatch","add","registerOption","filterProcessor","processor","default"],"mappings":"gGAIA,WAGI,IAAIA,EAAWC,QAAQC,KAAKC,MAAMC,QAAQ,yBAE1C,MAoBMC,EAASC,GAAQC,GAZRC,KACb,MAAMC,SAAWD,EACjB,OAAU,OAANA,EACK,OACQ,WAANC,GAAkBC,MAAMC,QAAQH,GAClC,QACQ,WAANC,IAAuCG,EAdlCC,EAcsBL,EAAeM,GAdlCC,EAcsBC,QAZZC,UAYkCH,EAAMI,cAAcN,KAThD,QAAxBO,EAAKN,EAAEE,mBAAgC,IAAPI,OAAgB,EAASA,EAAGC,QAAUL,EAAYK,MAUpF,SAEAX,EAHwC,IAACG,EAAGE,EAdtC,IAACD,EAAGE,EACfI,CAiBV,EAEoCE,CAAOd,KAAWD,EAE5CgB,EAAWjB,EAAO,UAClBkB,EAAWlB,EAAO,UAClBM,EAAUN,EAAO,SACjBmB,GAJelB,EAIW,WAJHC,UAAgBA,IAAUD,GAAlCA,MAMjBmB,EAAWxB,QAAQC,KAAKC,MAAMC,QAAQ,wBAEtCsB,EAAWzB,QAAQC,KAAKC,MAAMC,QAAQ,yBAEtCuB,EAAW1B,QAAQC,KAAKC,MAAMC,QAAQ,eAEtCwB,EAAS3B,QAAQC,KAAKC,MAAMC,QAAQ,sBAExC,MAAMyB,EAAST,GAAQU,GAAUA,EAAOC,QAAQC,IAAIZ,GAqB9Ca,EAAqBJ,EAAO,2BAC5BK,EAAwBL,EAAO,uBAC/BM,EAAuBN,EAAO,gCAC9BO,EAAoB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vC+D,GACFtC,EAAMO,QAAQ+B,EAEhC,CACA,CACA,IAEQ,MAAM5B,EAAQV,EAAMQ,YACpBhG,EAAO+H,SAAS,wBAAyB,CACvC7B,QACAvD,SAAUnC,EAAaR,IACvB,GACF,EAWF9B,EAAS8J,IAAI,aAAahI,IAjSXA,KACf,MAAMiI,EAAiBjI,EAAOC,QAAQwH,SAChCS,EAAkBzJ,GAASe,EAASf,IAAUiB,EAAWjB,IAAUgB,EAAShB,GAClFwJ,EAAe,0BAA2B,CACxCE,UAAW,UACXC,SAAS,IAEXH,EAAe,sBAAuB,CACpCE,UAAW,UACXC,SAAS,IAEXH,EAAe,+BAAgC,CAAEE,UAAW,aAC5DF,EAAe,4BAA6B,CAAEE,UAAWD,IACzDD,EAAe,wBAAyB,CAAEE,UAAWD,IACrDD,EAAe,mBAAoB,CAAEE,UAAW,aAChDF,EAAe,mBAAoB,CACjCE,UAAW,UACXC,SAAS,GACT,EAgRAX,CAASzH,GACTsF,EAAMtF,GAVEA,KAIH,CAAEkH,wBAHuBtD,GACvBO,EAA+BnE,EAAQ4D,KASvC1D,CAAIF,KAMlB,CAnVD"}
@@ -0,0 +1,2 @@
1
+ import{__exports as e}from"../../../../_virtual/plugin21.mjs";var t;function r(){return t||(t=1,function(){var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>t.options.get(e),r=t("insertdatetime_dateformat"),a=t("insertdatetime_timeformat"),n=t("insertdatetime_formats"),s=t("insertdatetime_element"),i="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),o="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),l="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),m="January February March April May June July August September October November December".split(" "),c=(e,t)=>{if((e=""+e).length<t)for(let r=0;r<t-e.length;r++)e="0"+e;return e},d=(e,t,r=new Date)=>t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+r.getFullYear())).replace("%y",""+r.getYear())).replace("%m",c(r.getMonth()+1,2))).replace("%d",c(r.getDate(),2))).replace("%H",""+c(r.getHours(),2))).replace("%M",""+c(r.getMinutes(),2))).replace("%S",""+c(r.getSeconds(),2))).replace("%I",""+((r.getHours()+11)%12+1))).replace("%p",r.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(m[r.getMonth()]))).replace("%b",""+e.translate(l[r.getMonth()]))).replace("%A",""+e.translate(o[r.getDay()]))).replace("%a",""+e.translate(i[r.getDay()]))).replace("%%","%"),u=(e,t)=>{if(s(e)){const r=d(e,t);let a;a=/%[HMSIp]/.test(t)?d(e,"%Y-%m-%dT%H:%M"):d(e,"%Y-%m-%d");const n=e.dom.getParent(e.selection.getStart(),"time");n?((e,t,r,a)=>{const n=e.dom.create("time",{datetime:r},a);e.dom.replace(n,t),e.selection.select(n,!0),e.selection.collapse(!1)})(e,n,a,r):e.insertContent('<time datetime="'+a+'">'+r+"</time>")}else e.insertContent(d(e,t))};var p=tinymce.util.Tools.resolve("tinymce.util.Tools");const g=e=>t=>{const r=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",r),r(),()=>{e.off("NodeChange",r)}},y=e=>{const t=n(e),r=(e=>{let t=e;return{get:()=>t,set:e=>{t=e}}})((e=>{const t=n(e);return t.length>0?t[0]:a(e)})(e)),s=t=>e.execCommand("mceInsertDate",!1,t);e.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",select:e=>e===r.get(),fetch:r=>{r(p.map(t,(t=>({type:"choiceitem",text:d(e,t),value:t}))))},onAction:e=>{s(r.get())},onItemAction:(e,t)=>{r.set(t),s(t)},onSetup:g(e)});const i=e=>()=>{r.set(e),s(e)};e.ui.registry.addNestedMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:()=>p.map(t,(t=>({type:"menuitem",text:d(e,t),onAction:i(t)}))),onSetup:g(e)})};e.add("insertdatetime",(e=>{(e=>{const t=e.options.register;t("insertdatetime_dateformat",{processor:"string",default:e.translate("%Y-%m-%d")}),t("insertdatetime_timeformat",{processor:"string",default:e.translate("%H:%M:%S")}),t("insertdatetime_formats",{processor:"string[]",default:["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"]}),t("insertdatetime_element",{processor:"boolean",default:!1})})(e),(e=>{e.addCommand("mceInsertDate",((t,a)=>{u(e,null!=a?a:r(e))})),e.addCommand("mceInsertTime",((t,r)=>{u(e,null!=r?r:a(e))}))})(e),y(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/insertdatetime/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 option = name => editor => editor.options.get(name);\n const register$2 = editor => {\n const registerOption = editor.options.register;\n registerOption('insertdatetime_dateformat', {\n processor: 'string',\n default: editor.translate('%Y-%m-%d')\n });\n registerOption('insertdatetime_timeformat', {\n processor: 'string',\n default: editor.translate('%H:%M:%S')\n });\n registerOption('insertdatetime_formats', {\n processor: 'string[]',\n default: [\n '%H:%M:%S',\n '%Y-%m-%d',\n '%I:%M:%S %p',\n '%D'\n ]\n });\n registerOption('insertdatetime_element', {\n processor: 'boolean',\n default: false\n });\n };\n const getDateFormat = option('insertdatetime_dateformat');\n const getTimeFormat = option('insertdatetime_timeformat');\n const getFormats = option('insertdatetime_formats');\n const shouldInsertTimeElement = option('insertdatetime_element');\n const getDefaultDateTime = editor => {\n const formats = getFormats(editor);\n return formats.length > 0 ? formats[0] : getTimeFormat(editor);\n };\n\n const daysShort = 'Sun Mon Tue Wed Thu Fri Sat Sun'.split(' ');\n const daysLong = 'Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday'.split(' ');\n const monthsShort = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' ');\n const monthsLong = 'January February March April May June July August September October November December'.split(' ');\n const addZeros = (value, len) => {\n value = '' + value;\n if (value.length < len) {\n for (let i = 0; i < len - value.length; i++) {\n value = '0' + value;\n }\n }\n return value;\n };\n const getDateTime = (editor, fmt, date = new Date()) => {\n fmt = fmt.replace('%D', '%m/%d/%Y');\n fmt = fmt.replace('%r', '%I:%M:%S %p');\n fmt = fmt.replace('%Y', '' + date.getFullYear());\n fmt = fmt.replace('%y', '' + date.getYear());\n fmt = fmt.replace('%m', addZeros(date.getMonth() + 1, 2));\n fmt = fmt.replace('%d', addZeros(date.getDate(), 2));\n fmt = fmt.replace('%H', '' + addZeros(date.getHours(), 2));\n fmt = fmt.replace('%M', '' + addZeros(date.getMinutes(), 2));\n fmt = fmt.replace('%S', '' + addZeros(date.getSeconds(), 2));\n fmt = fmt.replace('%I', '' + ((date.getHours() + 11) % 12 + 1));\n fmt = fmt.replace('%p', '' + (date.getHours() < 12 ? 'AM' : 'PM'));\n fmt = fmt.replace('%B', '' + editor.translate(monthsLong[date.getMonth()]));\n fmt = fmt.replace('%b', '' + editor.translate(monthsShort[date.getMonth()]));\n fmt = fmt.replace('%A', '' + editor.translate(daysLong[date.getDay()]));\n fmt = fmt.replace('%a', '' + editor.translate(daysShort[date.getDay()]));\n fmt = fmt.replace('%%', '%');\n return fmt;\n };\n const updateElement = (editor, timeElm, computerTime, userTime) => {\n const newTimeElm = editor.dom.create('time', { datetime: computerTime }, userTime);\n editor.dom.replace(newTimeElm, timeElm);\n editor.selection.select(newTimeElm, true);\n editor.selection.collapse(false);\n };\n const insertDateTime = (editor, format) => {\n if (shouldInsertTimeElement(editor)) {\n const userTime = getDateTime(editor, format);\n let computerTime;\n if (/%[HMSIp]/.test(format)) {\n computerTime = getDateTime(editor, '%Y-%m-%dT%H:%M');\n } else {\n computerTime = getDateTime(editor, '%Y-%m-%d');\n }\n const timeElm = editor.dom.getParent(editor.selection.getStart(), 'time');\n if (timeElm) {\n updateElement(editor, timeElm, computerTime, userTime);\n } else {\n editor.insertContent('<time datetime=\"' + computerTime + '\">' + userTime + '</time>');\n }\n } else {\n editor.insertContent(getDateTime(editor, format));\n }\n };\n\n const register$1 = editor => {\n editor.addCommand('mceInsertDate', (_ui, value) => {\n insertDateTime(editor, value !== null && value !== void 0 ? value : getDateFormat(editor));\n });\n editor.addCommand('mceInsertTime', (_ui, value) => {\n insertDateTime(editor, value !== null && value !== void 0 ? value : getTimeFormat(editor));\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 var global = tinymce.util.Tools.resolve('tinymce.util.Tools');\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 formats = getFormats(editor);\n const defaultFormat = Cell(getDefaultDateTime(editor));\n const insertDateTime = format => editor.execCommand('mceInsertDate', false, format);\n editor.ui.registry.addSplitButton('insertdatetime', {\n icon: 'insert-time',\n tooltip: 'Insert date/time',\n select: value => value === defaultFormat.get(),\n fetch: done => {\n done(global.map(formats, format => ({\n type: 'choiceitem',\n text: getDateTime(editor, format),\n value: format\n })));\n },\n onAction: _api => {\n insertDateTime(defaultFormat.get());\n },\n onItemAction: (_api, value) => {\n defaultFormat.set(value);\n insertDateTime(value);\n },\n onSetup: onSetupEditable(editor)\n });\n const makeMenuItemHandler = format => () => {\n defaultFormat.set(format);\n insertDateTime(format);\n };\n editor.ui.registry.addNestedMenuItem('insertdatetime', {\n icon: 'insert-time',\n text: 'Date/time',\n getSubmenuItems: () => global.map(formats, format => ({\n type: 'menuitem',\n text: getDateTime(editor, format),\n onAction: makeMenuItemHandler(format)\n })),\n onSetup: onSetupEditable(editor)\n });\n };\n\n var Plugin = () => {\n global$1.add('insertdatetime', editor => {\n register$2(editor);\n register$1(editor);\n register(editor);\n });\n };\n\n Plugin();\n\n})();\n"],"names":["global$1","tinymce","util","Tools","resolve","option","name","editor","options","get","getDateFormat","getTimeFormat","getFormats","shouldInsertTimeElement","daysShort","split","daysLong","monthsShort","monthsLong","addZeros","value","len","length","i","getDateTime","fmt","date","Date","replace","getFullYear","getYear","getMonth","getDate","getHours","getMinutes","getSeconds","translate","getDay","insertDateTime","format","userTime","computerTime","test","timeElm","dom","getParent","selection","getStart","newTimeElm","create","datetime","select","collapse","updateElement","insertContent","global","onSetupEditable","api","nodeChanged","setEnabled","isEditable","on","off","register","formats","defaultFormat","initial","set","v","Cell","getDefaultDateTime","execCommand","ui","registry","addSplitButton","icon","tooltip","fetch","done","map","type","text","onAction","_api","onItemAction","onSetup","makeMenuItemHandler","addNestedMenuItem","getSubmenuItems","add","registerOption","processor","default","register$2","addCommand","_ui","register$1"],"mappings":"gGAIA,WAGI,IAAIA,EAAWC,QAAQC,KAAKC,MAAMC,QAAQ,yBAE1C,MAAMC,EAASC,GAAQC,GAAUA,EAAOC,QAAQC,IAAIH,GAyB9CI,EAAgBL,EAAO,6BACvBM,EAAgBN,EAAO,6BACvBO,EAAaP,EAAO,0BACpBQ,EAA0BR,EAAO,0BAMjCS,EAAY,kCAAkCC,MAAM,KACpDC,EAAW,kEAAkED,MAAM,KACnFE,EAAc,kDAAkDF,MAAM,KACtEG,EAAa,wFAAwFH,MAAM,KAC3GI,EAAW,CAACC,EAAOC,KAEvB,IADAD,EAAQ,GAAKA,GACHE,OAASD,EACjB,IAAK,IAAIE,EAAI,EAAGA,EAAIF,EAAMD,EAAME,OAAQC,IACtCH,EAAQ,IAAMA,EAGlB,OAAOA,CAAK,EAERI,EAAc,CAACjB,EAAQkB,EAAKC,EAAO,IAAIC,OAgB3CF,GADAA,GADAA,GADAA,GADAA,GADAA,GADAA,GADAA,GADAA,GADAA,GADAA,GADAA,GADAA,GADAA,GADAA,GADAA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KAAM,cACNM,KAAM,YACNO,gBAAiB,IAAMjC,EAAOwB,IAAIf,GAASzB,IAAW,CACpDyC,KAAM,WACNC,KAAMzD,EAAYjB,EAAQgC,GAC1B2C,SAAUI,EAAoB/C,OAEhC8C,QAAS7B,EAAgBjD,IACzB,EAIFP,EAASyF,IAAI,kBAAkBlF,IAvKdA,KACjB,MAAMmF,EAAiBnF,EAAOC,QAAQuD,SACtC2B,EAAe,4BAA6B,CAC1CC,UAAW,SACXC,QAASrF,EAAO6B,UAAU,cAE5BsD,EAAe,4BAA6B,CAC1CC,UAAW,SACXC,QAASrF,EAAO6B,UAAU,cAE5BsD,EAAe,yBAA0B,CACvCC,UAAW,WACXC,QAAS,CACP,WACA,WACA,cACA,QAGJF,EAAe,yBAA0B,CACvCC,UAAW,UACXC,SAAS,GACT,EAkJAC,CAAWtF,GA7EIA,KACjBA,EAAOuF,WAAW,iBAAiB,CAACC,EAAK3E,KACvCkB,EAAe/B,EAAQa,QAAqCA,EAAQV,EAAcH,GAAQ,IAE5FA,EAAOuF,WAAW,iBAAiB,CAACC,EAAK3E,KACvCkB,EAAe/B,EAAQa,QAAqCA,EAAQT,EAAcJ,GAAQ,GAC1F,EAwEAyF,CAAWzF,GACXwD,EAASxD,EAAO,GAMvB,CAtLD"}
@@ -0,0 +1,2 @@
1
+ import{__exports as e}from"../../../../_virtual/plugin15.mjs";var t;function n(){return t||(t=1,function(){var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=o=e,r=(l=String).prototype,r.isPrototypeOf(n)||(null===(i=o.constructor)||void 0===i?void 0:i.name)===l.name)?"string":t;var n,r;var o,l,i})(t)===e,n=e=>t=>typeof t===e,r=t("string"),o=t("object"),l=t("array"),i=(a=null,e=>a===e);var a;const s=n("boolean"),c=e=>!(e=>null==e)(e),u=n("function"),g=(e,t)=>{if(l(e)){for(let n=0,r=e.length;n<r;++n)if(!t(e[n]))return!1;return!0}return!1},d=()=>{},m=(e,t)=>e===t;class h{constructor(e,t){this.tag=e,this.value=t}static some(e){return new h(!0,e)}static none(){return h.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?h.some(e(this.value)):h.none()}bind(e){return this.tag?e(this.value):h.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:h.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 c(e)?h.some(e):h.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()"}}h.singletonNone=new h(!1);const f=Array.prototype.indexOf,p=Array.prototype.push,k=(e,t)=>((e,t)=>f.call(e,t))(e,t)>-1,v=e=>{const t=[];for(let n=0,r=e.length;n<r;++n){if(!l(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);p.apply(t,e[n])}return t},x=(e,t)=>v(((e,t)=>{const n=e.length,r=new Array(n);for(let o=0;o<n;o++){const n=e[o];r[o]=t(n,o)}return r})(e,t)),y=(e,t)=>{for(let n=0;n<e.length;n++){const r=t(e[n],n);if(r.isSome())return r}return h.none()},b=(e,t,n=m)=>e.exists((e=>n(e,t))),_=e=>{const t=[],n=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(n);return t},w=(e,t)=>e?h.some(t):h.none(),C=e=>t=>t.options.get(e),O=C("link_assume_external_targets"),N=C("link_context_toolbar"),A=C("link_list"),S=C("link_default_target"),E=C("link_default_protocol"),T=C("link_target_list"),R=C("link_rel_list"),P=C("link_class_list"),L=C("link_title"),M=C("allow_unsafe_link_target"),D=C("link_quicklink");var U=tinymce.util.Tools.resolve("tinymce.util.Tools");const B=e=>r(e.value)?e.value:"",j=(e,t)=>{const n=[];return U.each(e,(e=>{const o=(e=>r(e.text)?e.text:r(e.title)?e.title:"")(e);if(void 0!==e.menu){const r=j(e.menu,t);n.push({text:o,items:r})}else{const r=t(e);n.push({text:o,value:r})}})),n},I=(e=B)=>t=>h.from(t).map((t=>j(t,e))),K={sanitize:e=>I(B)(e),sanitizeWith:I,createUi:(e,t)=>n=>({name:e,type:"listbox",label:t,items:n}),getValue:B},z=Object.keys,q=Object.hasOwnProperty,V=(e,t,n,r)=>{((e,t)=>{const n=z(e);for(let r=0,o=n.length;r<o;r++){const o=n[r];t(e[o],o)}})(e,((e,o)=>{(t(e,o)?n:r)(e,o)}))},F=(e,t)=>q.call(e,t);var W=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),$=tinymce.util.Tools.resolve("tinymce.util.URI");const G=e=>c(e)&&"a"===e.nodeName.toLowerCase(),H=e=>G(e)&&!!X(e),J=(e,t)=>{if(e.collapsed)return[];{const n=e.cloneContents(),r=n.firstChild,o=new W(r,n),l=[];let i=r;do{t(i)&&l.push(i)}while(i=o.next());return l}},Q=e=>/^\w+:/i.test(e),X=e=>{var t,n;return null!==(n=null!==(t=e.getAttribute("data-mce-href"))&&void 0!==t?t:e.getAttribute("href"))&&void 0!==n?n:""},Y=(e,t)=>{const n=["noopener"],r=e?e.split(/\s+/):[],o=e=>e.filter((e=>-1===U.inArray(n,e))),l=t?(e=>(e=o(e)).length>0?e.concat(n):n)(r):o(r);return l.length>0?(e=>U.trim(e.sort().join(" ")))(l):""},Z=(e,t)=>(t=t||ne(e.selection.getRng())[0]||e.selection.getNode(),ie(t)?h.from(e.dom.select("a[href]",t)[0]):h.from(e.dom.getParent(t,"a[href]"))),ee=(e,t)=>Z(e,t).isSome(),te=(e,t)=>(e=>e.replace(/\uFEFF/g,""))(t.fold((()=>e.getContent({format:"text"})),(e=>e.innerText||e.textContent||""))),ne=e=>J(e,H),re=e=>U.grep(e,H),oe=e=>re(e).length>0,le=e=>{const t=e.schema.getTextInlineElements(),n=e=>1===e.nodeType&&!G(e)&&!F(t,e.nodeName.toLowerCase());if(Z(e).exists((e=>e.hasAttribute("data-mce-block"))))return!1;const r=e.selection.getRng();if(r.collapsed)return!0;return 0===J(r,n).length},ie=e=>c(e)&&"FIGURE"===e.nodeName&&/\bimage\b/i.test(e.className),ae=(e,t)=>{const n={...t};if(0===R(e).length&&!M(e)){const e=Y(n.rel,"_blank"===n.target);n.rel=e||null}return h.from(n.target).isNone()&&!1===T(e)&&(n.target=S(e)),n.href=((e,t)=>"http"!==t&&"https"!==t||Q(e)?e:t+"://"+e)(n.href,O(e)),n},se=(e,t,n)=>{const r=e.selection.getNode(),o=Z(e,r),l=ae(e,(e=>{return t=["title","rel","class","target"],n=(t,n)=>(e[n].each((e=>{t[n]=e.length>0?e:null})),t),r={href:e.href},((e,t)=>{for(let n=0,r=e.length;n<r;n++)t(e[n],n)})(t,((e,t)=>{r=n(r,e,t)})),r;var t,n,r})(n));e.undoManager.transact((()=>{n.href===t.href&&t.attach(),o.fold((()=>{((e,t,n,r)=>{const o=e.dom;ie(t)?me(o,t,r):n.fold((()=>{e.execCommand("mceInsertLink",!1,r)}),(t=>{e.insertContent(o.createHTML("a",r,o.encode(t)))}))})(e,r,n.text,l)}),(t=>{e.focus(),((e,t,n,r)=>{n.each((e=>{F(t,"innerText")?t.innerText=e:t.textContent=e})),e.dom.setAttribs(t,r),e.selection.select(t)})(e,t,n.text,l)}))}))},ce=e=>{const{class:t,href:n,rel:r,target:o,text:l,title:a}=e;return((e,t)=>{const n={};var r;return V(e,t,(r=n,(e,t)=>{r[t]=e}),d),n})({class:t.getOrNull(),href:n,rel:r.getOrNull(),target:o.getOrNull(),text:l.getOrNull(),title:a.getOrNull()},((e,t)=>!1===i(e)))},ue=(e,t,n)=>{const r=((e,t)=>{const n=e.options.get,r={allow_html_data_urls:n("allow_html_data_urls"),allow_script_urls:n("allow_script_urls"),allow_svg_data_urls:n("allow_svg_data_urls")},o=t.href;return{...t,href:$.isDomSafe(o,"a",r)?o:""}})(e,n);e.hasPlugin("rtc",!0)?e.execCommand("createlink",!1,ce(r)):se(e,t,r)},ge=e=>{e.hasPlugin("rtc",!0)?e.execCommand("unlink"):(e=>{e.undoManager.transact((()=>{const t=e.selection.getNode();ie(t)?de(e,t):(e=>{const t=e.dom,n=e.selection,r=n.getBookmark(),o=n.getRng().cloneRange(),l=t.getParent(o.startContainer,"a[href]",e.getBody()),i=t.getParent(o.endContainer,"a[href]",e.getBody());l&&o.setStartBefore(l),i&&o.setEndAfter(i),n.setRng(o),e.execCommand("unlink"),n.moveToBookmark(r)})(e),e.focus()}))})(e)},de=(e,t)=>{var n;const r=e.dom.select("img",t)[0];if(r){const o=e.dom.getParents(r,"a[href]",t)[0];o&&(null===(n=o.parentNode)||void 0===n||n.insertBefore(r,o),e.dom.remove(o))}},me=(e,t,n)=>{var r;const o=e.select("img",t)[0];if(o){const t=e.create("a",n);null===(r=o.parentNode)||void 0===r||r.insertBefore(t,o),t.appendChild(o)}},he=e=>{return F(t=e,n="items")&&void 0!==t[n]&&null!==t[n];var t,n},fe=(e,t)=>y(t,(t=>he(t)?fe(e,t.items):w(t.value===e,t))),pe=(e,t,n,r)=>{const o=r[t],l=e.length>0;return void 0!==o?fe(o,n).map((t=>({url:{value:t.value,meta:{text:l?e:t.text,attach:d}},text:l?e:t.text}))):h.none()},ke=(e,t)=>{const n={text:e.text,title:e.title},r=e=>{const t=(r=e.url,w(n.text.length<=0,h.from(null===(o=r.meta)||void 0===o?void 0:o.text).getOr(r.value)));var r,o;const l=(e=>{var t;return w(n.title.length<=0,h.from(null===(t=e.meta)||void 0===t?void 0:t.title).getOr(""))})(e.url);return t.isSome()||l.isSome()?h.some({...t.map((e=>({text:e}))).getOr({}),...l.map((e=>({title:e}))).getOr({})}):h.none()},o=(e,r)=>{const o=(l=t,i=r,"link"===i?l.link:"anchor"===i?l.anchor:h.none()).getOr([]);var l,i;return pe(n.text,r,o,e)};return{onChange:(e,t)=>{const l=t.name;return"url"===l?r(e()):k(["anchor","link"],l)?o(e(),l):"text"===l||"title"===l?(n[l]=e()[l],h.none()):h.none()}}};var ve=tinymce.util.Tools.resolve("tinymce.util.Delay");const xe=e=>{const t=e.href;return t.indexOf("@")>0&&-1===t.indexOf("/")&&-1===t.indexOf("mailto:")?h.some({message:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",preprocess:e=>({...e,href:"mailto:"+t})}):h.none()},ye=(e,t)=>n=>{const r=n.href;return 1===e&&!Q(r)||0===e&&/^\s*www(\.|\d\.)/i.test(r)?h.some({message:`The URL you entered seems to be an external link. Do you want to add the required ${t}:// prefix?`,preprocess:e=>({...e,href:t+"://"+r})}):h.none()},be=(e,t)=>y([xe,ye(O(e),E(e))],(e=>e(t))).fold((()=>Promise.resolve(t)),(n=>new Promise((r=>{((e,t,n)=>{const r=e.selection.getRng();ve.setEditorTimeout(e,(()=>{e.windowManager.confirm(t,(t=>{e.selection.setRng(r),n(t)}))}))})(e,n.message,(e=>{r(e?n.preprocess(t):t)}))})))),_e=e=>{const t=e.dom.select("a:not([href])"),n=x(t,(e=>{const t=e.name||e.id;return t?[{text:t,value:"#"+t}]:[]}));return n.length>0?h.some([{text:"None",value:""}].concat(n)):h.none()},we=e=>{const t=P(e);return t.length>0?K.sanitize(t):h.none()},Ce=e=>{try{return h.some(JSON.parse(e))}catch(e){return h.none()}},Oe=e=>{const t=t=>e.convertURL(t.value||t.url||"","href"),n=A(e);return new Promise((e=>{r(n)?fetch(n).then((e=>e.ok?e.text().then(Ce):Promise.reject())).then(e,(()=>e(h.none()))):u(n)?n((t=>e(h.some(t)))):e(h.from(n))})).then((e=>e.bind(K.sanitizeWith(t)).map((e=>{if(e.length>0){return[{text:"None",value:""}].concat(e)}return e}))))},Ne=(e,t)=>{const n=R(e);if(n.length>0){const r=b(t,"_blank"),o=e=>Y(K.getValue(e),r);return(!1===M(e)?K.sanitizeWith(o):K.sanitize)(n)}return h.none()},Ae=[{text:"Current window",value:""},{text:"New window",value:"_blank"}],Se=e=>{const t=T(e);return l(t)?K.sanitize(t).orThunk((()=>h.some(Ae))):!1===t?h.none():h.some(Ae)},Ee=(e,t,n)=>{const r=e.getAttrib(t,n);return null!==r&&r.length>0?h.some(r):h.none()},Te=(e,t)=>Oe(e).then((n=>{const r=((e,t)=>{const n=e.dom,r=le(e)?h.some(te(e.selection,t)):h.none(),o=t.bind((e=>h.from(n.getAttrib(e,"href")))),l=t.bind((e=>h.from(n.getAttrib(e,"target")))),i=t.bind((e=>Ee(n,e,"rel"))),a=t.bind((e=>Ee(n,e,"class")));return{url:o,text:r,title:t.bind((e=>Ee(n,e,"title"))),target:l,rel:i,linkClass:a}})(e,t);return{anchor:r,catalogs:{targets:Se(e),rels:Ne(e,r.target),classes:we(e),anchor:_e(e),link:n},optNode:t,flags:{titleEnabled:L(e)}}})),Re=e=>{const t=(e=>{const t=Z(e);return Te(e,t)})(e);t.then((t=>{const n=((e,t)=>n=>{const r=n.getData();if(!r.url.value)return ge(e),void n.close();const o=e=>h.from(r[e]).filter((n=>!b(t.anchor[e],n))),l={href:r.url.value,text:o("text"),target:o("target"),rel:o("rel"),class:o("linkClass"),title:o("title")},i={href:r.url.value,attach:void 0!==r.url.meta&&r.url.meta.attach?r.url.meta.attach:d};be(e,l).then((t=>{ue(e,i,t)})),n.close()})(e,t);return((e,t,n)=>{const r=e.anchor.text.map((()=>({name:"text",type:"input",label:"Text to display"}))).toArray(),o=e.flags.titleEnabled?[{name:"title",type:"input",label:"Title"}]:[],l=((e,t)=>{const n=e.anchor,r=n.url.getOr("");return{url:{value:r,meta:{original:{value:r}}},text:n.text.getOr(""),title:n.title.getOr(""),anchor:r,link:r,rel:n.rel.getOr(""),target:n.target.or(t).getOr(""),linkClass:n.linkClass.getOr("")}})(e,h.from(S(n))),i=e.catalogs,a=ke(l,i);return{title:"Insert/Edit Link",size:"normal",body:{type:"panel",items:v([[{name:"url",type:"urlinput",filetype:"file",label:"URL",picker_text:"Browse links"}],r,o,_([i.anchor.map(K.createUi("anchor","Anchors")),i.rels.map(K.createUi("rel","Rel")),i.targets.map(K.createUi("target","Open link in...")),i.link.map(K.createUi("link","Link list")),i.classes.map(K.createUi("linkClass","Class"))])])},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:l,onChange:(e,{name:t})=>{a.onChange(e.getData,{name:t}).each((t=>{e.setData(t)}))},onSubmit:t}})(t,n,e)})).then((t=>{e.windowManager.open(t)}))};var Pe=tinymce.util.Tools.resolve("tinymce.util.VK");const Le=e=>{const t=document.createElement("a");t.target="_blank",t.href=e,t.rel="noreferrer noopener";const n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),((e,t)=>{document.body.appendChild(e),e.dispatchEvent(t),document.body.removeChild(e)})(t,n)},Me=(e,t)=>e.dom.getParent(t,"a[href]"),De=e=>Me(e,e.selection.getStart()),Ue=(e,t)=>{if(t){const n=X(t);if(/^#/.test(n)){const t=e.dom.select(n);t.length&&e.selection.scrollIntoView(t[0],!0)}else Le(t.href)}},Be=e=>()=>{e.execCommand("mceLink",!1,{dialog:!0})},je=e=>()=>{Ue(e,De(e))},Ie=(e,t)=>(e.on("NodeChange",t),()=>e.off("NodeChange",t)),Ke=e=>t=>{const n=()=>{t.setActive(!e.mode.isReadOnly()&&ee(e,e.selection.getNode())),t.setEnabled(e.selection.isEditable())};return n(),Ie(e,n)},ze=e=>t=>{const n=()=>{t.setEnabled(e.selection.isEditable())};return n(),Ie(e,n)},qe=e=>t=>{const n=()=>t.setEnabled((e=>1===(e.selection.isCollapsed()?re(e.dom.getParents(e.selection.getStart())):ne(e.selection.getRng())).length)(e));return n(),Ie(e,n)},Ve=e=>t=>{const n=t=>{return oe(t)||(n=e.selection.getRng(),ne(n).length>0);var n},r=e.dom.getParents(e.selection.getStart()),o=r=>{t.setEnabled(n(r)&&e.selection.isEditable())};return o(r),Ie(e,(e=>o(e.parents)))},Fe=e=>{const t=t=>{const n=e.selection.getNode();return t.setEnabled(ee(e,n)),d};e.ui.registry.addContextForm("quicklink",{launch:{type:"contextformtogglebutton",icon:"link",tooltip:"Link",onSetup:Ke(e)},label:"Link",predicate:t=>N(e)&&ee(e,t),initValue:()=>{return Z(e).fold((t="",()=>t),X);var t},commands:[{type:"contextformtogglebutton",icon:"link",tooltip:"Link",primary:!0,onSetup:t=>{const n=e.selection.getNode();return t.setActive(ee(e,n)),Ke(e)(t)},onAction:t=>{const n=t.getValue(),r=(t=>{const n=Z(e),r=le(e);if(n.isNone()&&r){const r=te(e.selection,n);return w(0===r.length,t)}return h.none()})(n);ue(e,{href:n,attach:d},{href:n,text:r,title:h.none(),rel:h.none(),target:h.none(),class:h.none()}),(e=>{e.selection.collapse(!1)})(e),t.hide()}},{type:"contextformbutton",icon:"unlink",tooltip:"Remove link",onSetup:t,onAction:t=>{ge(e),t.hide()}},{type:"contextformbutton",icon:"new-tab",tooltip:"Open link",onSetup:t,onAction:t=>{je(e)(),t.hide()}}]})};e.add("link",(e=>{(e=>{const t=e.options.register;t("link_assume_external_targets",{processor:e=>{const t=r(e)||s(e);return t?!0===e?{value:1,valid:t}:"http"===e||"https"===e?{value:e,valid:t}:{value:0,valid:t}:{valid:!1,message:"Must be a string or a boolean."}},default:!1}),t("link_context_toolbar",{processor:"boolean",default:!1}),t("link_list",{processor:e=>r(e)||u(e)||g(e,o)}),t("link_default_target",{processor:"string"}),t("link_default_protocol",{processor:"string",default:"https"}),t("link_target_list",{processor:e=>s(e)||g(e,o),default:!0}),t("link_rel_list",{processor:"object[]",default:[]}),t("link_class_list",{processor:"object[]",default:[]}),t("link_title",{processor:"boolean",default:!0}),t("allow_unsafe_link_target",{processor:"boolean",default:!1}),t("link_quicklink",{processor:"boolean",default:!1})})(e),(e=>{e.ui.registry.addToggleButton("link",{icon:"link",tooltip:"Insert/edit link",onAction:Be(e),onSetup:Ke(e)}),e.ui.registry.addButton("openlink",{icon:"new-tab",tooltip:"Open link",onAction:je(e),onSetup:qe(e)}),e.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:()=>ge(e),onSetup:Ve(e)})})(e),(e=>{e.ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:je(e),onSetup:qe(e)}),e.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onSetup:ze(e),onAction:Be(e)}),e.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:()=>ge(e),onSetup:Ve(e)})})(e),(e=>{e.ui.registry.addContextMenu("link",{update:t=>e.dom.isEditable(t)?oe(e.dom.getParents(t,"a"))?"link unlink openlink":"link":""})})(e),Fe(e),(e=>{e.on("click",(t=>{const n=Me(e,t.target);n&&Pe.metaKeyPressed(t)&&(t.preventDefault(),Ue(e,n))})),e.on("keydown",(t=>{if(!t.isDefaultPrevented()&&13===t.keyCode&&(e=>!0===e.altKey&&!1===e.shiftKey&&!1===e.ctrlKey&&!1===e.metaKey)(t)){const n=De(e);n&&(t.preventDefault(),Ue(e,n))}}))})(e),(e=>{e.addCommand("mceLink",((t,n)=>{!0!==(null==n?void 0:n.dialog)&&D(e)?e.dispatch("contexttoolbar-show",{toolbarKey:"quicklink"}):Re(e)}))})(e),(e=>{e.addShortcut("Meta+K","",(()=>{e.execCommand("mceLink")}))})(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/link/plugin.js"],"sourcesContent":["/**\n * TinyMCE version 6.8.5 (TBD)\n */\n\n(function () {\n 'use strict';\n\n var global$5 = 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 isSimpleType = type => value => typeof value === type;\n const eq = t => a => t === a;\n const isString = isType('string');\n const isObject = isType('object');\n const isArray = isType('array');\n const isNull = eq(null);\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 isArrayOf = (value, pred) => {\n if (isArray(value)) {\n for (let i = 0, len = value.length; i < len; ++i) {\n if (!pred(value[i])) {\n return false;\n }\n }\n return true;\n }\n return false;\n };\n\n const noop = () => {\n };\n const constant = value => {\n return () => {\n return value;\n };\n };\n const tripleEquals = (a, b) => {\n return a === b;\n };\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 nativePush = Array.prototype.push;\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 foldl = (xs, f, acc) => {\n each$1(xs, (x, i) => {\n acc = f(acc, x, i);\n });\n return acc;\n };\n const flatten = xs => {\n const r = [];\n for (let i = 0, len = xs.length; i < len; ++i) {\n if (!isArray(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 const findMap = (arr, f) => {\n for (let i = 0; i < arr.length; i++) {\n const r = f(arr[i], i);\n if (r.isSome()) {\n return r;\n }\n }\n return Optional.none();\n };\n\n const is = (lhs, rhs, comparator = tripleEquals) => lhs.exists(left => comparator(left, rhs));\n const cat = arr => {\n const r = [];\n const push = x => {\n r.push(x);\n };\n for (let i = 0; i < arr.length; i++) {\n arr[i].each(push);\n }\n return r;\n };\n const someIf = (b, a) => b ? Optional.some(a) : Optional.none();\n\n const option = name => editor => editor.options.get(name);\n const register$1 = editor => {\n const registerOption = editor.options.register;\n registerOption('link_assume_external_targets', {\n processor: value => {\n const valid = isString(value) || isBoolean(value);\n if (valid) {\n if (value === true) {\n return {\n value: 1,\n valid\n };\n } else if (value === 'http' || value === 'https') {\n return {\n value,\n valid\n };\n } else {\n return {\n value: 0,\n valid\n };\n }\n } else {\n return {\n valid: false,\n message: 'Must be a string or a boolean.'\n };\n }\n },\n default: false\n });\n registerOption('link_context_toolbar', {\n processor: 'boolean',\n default: false\n });\n registerOption('link_list', { processor: value => isString(value) || isFunction(value) || isArrayOf(value, isObject) });\n registerOption('link_default_target', { processor: 'string' });\n registerOption('link_default_protocol', {\n processor: 'string',\n default: 'https'\n });\n registerOption('link_target_list', {\n processor: value => isBoolean(value) || isArrayOf(value, isObject),\n default: true\n });\n registerOption('link_rel_list', {\n processor: 'object[]',\n default: []\n });\n registerOption('link_class_list', {\n processor: 'object[]',\n default: []\n });\n registerOption('link_title', {\n processor: 'boolean',\n default: true\n });\n registerOption('allow_unsafe_link_target', {\n processor: 'boolean',\n default: false\n });\n registerOption('link_quicklink', {\n processor: 'boolean',\n default: false\n });\n };\n const assumeExternalTargets = option('link_assume_external_targets');\n const hasContextToolbar = option('link_context_toolbar');\n const getLinkList = option('link_list');\n const getDefaultLinkTarget = option('link_default_target');\n const getDefaultLinkProtocol = option('link_default_protocol');\n const getTargetList = option('link_target_list');\n const getRelList = option('link_rel_list');\n const getLinkClassList = option('link_class_list');\n const shouldShowLinkTitle = option('link_title');\n const allowUnsafeLinkTarget = option('allow_unsafe_link_target');\n const useQuickLink = option('link_quicklink');\n\n var global$4 = tinymce.util.Tools.resolve('tinymce.util.Tools');\n\n const getValue = item => isString(item.value) ? item.value : '';\n const getText = item => {\n if (isString(item.text)) {\n return item.text;\n } else if (isString(item.title)) {\n return item.title;\n } else {\n return '';\n }\n };\n const sanitizeList = (list, extractValue) => {\n const out = [];\n global$4.each(list, item => {\n const text = getText(item);\n if (item.menu !== undefined) {\n const items = sanitizeList(item.menu, extractValue);\n out.push({\n text,\n items\n });\n } else {\n const value = extractValue(item);\n out.push({\n text,\n value\n });\n }\n });\n return out;\n };\n const sanitizeWith = (extracter = getValue) => list => Optional.from(list).map(list => sanitizeList(list, extracter));\n const sanitize = list => sanitizeWith(getValue)(list);\n const createUi = (name, label) => items => ({\n name,\n type: 'listbox',\n label,\n items\n });\n const ListOptions = {\n sanitize,\n sanitizeWith,\n createUi,\n getValue\n };\n\n const keys = Object.keys;\n const hasOwnProperty = Object.hasOwnProperty;\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 const objAcc = r => (x, i) => {\n r[i] = x;\n };\n const internalFilter = (obj, pred, onTrue, onFalse) => {\n each(obj, (x, i) => {\n (pred(x, i) ? onTrue : onFalse)(x, i);\n });\n };\n const filter = (obj, pred) => {\n const t = {};\n internalFilter(obj, pred, objAcc(t), noop);\n return t;\n };\n const has = (obj, key) => hasOwnProperty.call(obj, key);\n const hasNonNullableKey = (obj, key) => has(obj, key) && obj[key] !== undefined && obj[key] !== null;\n\n var global$3 = tinymce.util.Tools.resolve('tinymce.dom.TreeWalker');\n\n var global$2 = tinymce.util.Tools.resolve('tinymce.util.URI');\n\n const isAnchor = elm => isNonNullable(elm) && elm.nodeName.toLowerCase() === 'a';\n const isLink = elm => isAnchor(elm) && !!getHref(elm);\n const collectNodesInRange = (rng, predicate) => {\n if (rng.collapsed) {\n return [];\n } else {\n const contents = rng.cloneContents();\n const firstChild = contents.firstChild;\n const walker = new global$3(firstChild, contents);\n const elements = [];\n let current = firstChild;\n do {\n if (predicate(current)) {\n elements.push(current);\n }\n } while (current = walker.next());\n return elements;\n }\n };\n const hasProtocol = url => /^\\w+:/i.test(url);\n const getHref = elm => {\n var _a, _b;\n return (_b = (_a = elm.getAttribute('data-mce-href')) !== null && _a !== void 0 ? _a : elm.getAttribute('href')) !== null && _b !== void 0 ? _b : '';\n };\n const applyRelTargetRules = (rel, isUnsafe) => {\n const rules = ['noopener'];\n const rels = rel ? rel.split(/\\s+/) : [];\n const toString = rels => global$4.trim(rels.sort().join(' '));\n const addTargetRules = rels => {\n rels = removeTargetRules(rels);\n return rels.length > 0 ? rels.concat(rules) : rules;\n };\n const removeTargetRules = rels => rels.filter(val => global$4.inArray(rules, val) === -1);\n const newRels = isUnsafe ? addTargetRules(rels) : removeTargetRules(rels);\n return newRels.length > 0 ? toString(newRels) : '';\n };\n const trimCaretContainers = text => text.replace(/\\uFEFF/g, '');\n const getAnchorElement = (editor, selectedElm) => {\n selectedElm = selectedElm || getLinksInSelection(editor.selection.getRng())[0] || editor.selection.getNode();\n if (isImageFigure(selectedElm)) {\n return Optional.from(editor.dom.select('a[href]', selectedElm)[0]);\n } else {\n return Optional.from(editor.dom.getParent(selectedElm, 'a[href]'));\n }\n };\n const isInAnchor = (editor, selectedElm) => getAnchorElement(editor, selectedElm).isSome();\n const getAnchorText = (selection, anchorElm) => {\n const text = anchorElm.fold(() => selection.getContent({ format: 'text' }), anchorElm => anchorElm.innerText || anchorElm.textContent || '');\n return trimCaretContainers(text);\n };\n const getLinksInSelection = rng => collectNodesInRange(rng, isLink);\n const getLinks$1 = elements => global$4.grep(elements, isLink);\n const hasLinks = elements => getLinks$1(elements).length > 0;\n const hasLinksInSelection = rng => getLinksInSelection(rng).length > 0;\n const isOnlyTextSelected = editor => {\n const inlineTextElements = editor.schema.getTextInlineElements();\n const isElement = elm => elm.nodeType === 1 && !isAnchor(elm) && !has(inlineTextElements, elm.nodeName.toLowerCase());\n const isInBlockAnchor = getAnchorElement(editor).exists(anchor => anchor.hasAttribute('data-mce-block'));\n if (isInBlockAnchor) {\n return false;\n }\n const rng = editor.selection.getRng();\n if (!rng.collapsed) {\n const elements = collectNodesInRange(rng, isElement);\n return elements.length === 0;\n } else {\n return true;\n }\n };\n const isImageFigure = elm => isNonNullable(elm) && elm.nodeName === 'FIGURE' && /\\bimage\\b/i.test(elm.className);\n const getLinkAttrs = data => {\n const attrs = [\n 'title',\n 'rel',\n 'class',\n 'target'\n ];\n return foldl(attrs, (acc, key) => {\n data[key].each(value => {\n acc[key] = value.length > 0 ? value : null;\n });\n return acc;\n }, { href: data.href });\n };\n const handleExternalTargets = (href, assumeExternalTargets) => {\n if ((assumeExternalTargets === 'http' || assumeExternalTargets === 'https') && !hasProtocol(href)) {\n return assumeExternalTargets + '://' + href;\n }\n return href;\n };\n const applyLinkOverrides = (editor, linkAttrs) => {\n const newLinkAttrs = { ...linkAttrs };\n if (getRelList(editor).length === 0 && !allowUnsafeLinkTarget(editor)) {\n const newRel = applyRelTargetRules(newLinkAttrs.rel, newLinkAttrs.target === '_blank');\n newLinkAttrs.rel = newRel ? newRel : null;\n }\n if (Optional.from(newLinkAttrs.target).isNone() && getTargetList(editor) === false) {\n newLinkAttrs.target = getDefaultLinkTarget(editor);\n }\n newLinkAttrs.href = handleExternalTargets(newLinkAttrs.href, assumeExternalTargets(editor));\n return newLinkAttrs;\n };\n const updateLink = (editor, anchorElm, text, linkAttrs) => {\n text.each(text => {\n if (has(anchorElm, 'innerText')) {\n anchorElm.innerText = text;\n } else {\n anchorElm.textContent = text;\n }\n });\n editor.dom.setAttribs(anchorElm, linkAttrs);\n editor.selection.select(anchorElm);\n };\n const createLink = (editor, selectedElm, text, linkAttrs) => {\n const dom = editor.dom;\n if (isImageFigure(selectedElm)) {\n linkImageFigure(dom, selectedElm, linkAttrs);\n } else {\n text.fold(() => {\n editor.execCommand('mceInsertLink', false, linkAttrs);\n }, text => {\n editor.insertContent(dom.createHTML('a', linkAttrs, dom.encode(text)));\n });\n }\n };\n const linkDomMutation = (editor, attachState, data) => {\n const selectedElm = editor.selection.getNode();\n const anchorElm = getAnchorElement(editor, selectedElm);\n const linkAttrs = applyLinkOverrides(editor, getLinkAttrs(data));\n editor.undoManager.transact(() => {\n if (data.href === attachState.href) {\n attachState.attach();\n }\n anchorElm.fold(() => {\n createLink(editor, selectedElm, data.text, linkAttrs);\n }, elm => {\n editor.focus();\n updateLink(editor, elm, data.text, linkAttrs);\n });\n });\n };\n const unlinkSelection = editor => {\n const dom = editor.dom, selection = editor.selection;\n const bookmark = selection.getBookmark();\n const rng = selection.getRng().cloneRange();\n const startAnchorElm = dom.getParent(rng.startContainer, 'a[href]', editor.getBody());\n const endAnchorElm = dom.getParent(rng.endContainer, 'a[href]', editor.getBody());\n if (startAnchorElm) {\n rng.setStartBefore(startAnchorElm);\n }\n if (endAnchorElm) {\n rng.setEndAfter(endAnchorElm);\n }\n selection.setRng(rng);\n editor.execCommand('unlink');\n selection.moveToBookmark(bookmark);\n };\n const unlinkDomMutation = editor => {\n editor.undoManager.transact(() => {\n const node = editor.selection.getNode();\n if (isImageFigure(node)) {\n unlinkImageFigure(editor, node);\n } else {\n unlinkSelection(editor);\n }\n editor.focus();\n });\n };\n const unwrapOptions = data => {\n const {\n class: cls,\n href,\n rel,\n target,\n text,\n title\n } = data;\n return filter({\n class: cls.getOrNull(),\n href,\n rel: rel.getOrNull(),\n target: target.getOrNull(),\n text: text.getOrNull(),\n title: title.getOrNull()\n }, (v, _k) => isNull(v) === false);\n };\n const sanitizeData = (editor, data) => {\n const getOption = editor.options.get;\n const uriOptions = {\n allow_html_data_urls: getOption('allow_html_data_urls'),\n allow_script_urls: getOption('allow_script_urls'),\n allow_svg_data_urls: getOption('allow_svg_data_urls')\n };\n const href = data.href;\n return {\n ...data,\n href: global$2.isDomSafe(href, 'a', uriOptions) ? href : ''\n };\n };\n const link = (editor, attachState, data) => {\n const sanitizedData = sanitizeData(editor, data);\n editor.hasPlugin('rtc', true) ? editor.execCommand('createlink', false, unwrapOptions(sanitizedData)) : linkDomMutation(editor, attachState, sanitizedData);\n };\n const unlink = editor => {\n editor.hasPlugin('rtc', true) ? editor.execCommand('unlink') : unlinkDomMutation(editor);\n };\n const unlinkImageFigure = (editor, fig) => {\n var _a;\n const img = editor.dom.select('img', fig)[0];\n if (img) {\n const a = editor.dom.getParents(img, 'a[href]', fig)[0];\n if (a) {\n (_a = a.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(img, a);\n editor.dom.remove(a);\n }\n }\n };\n const linkImageFigure = (dom, fig, attrs) => {\n var _a;\n const img = dom.select('img', fig)[0];\n if (img) {\n const a = dom.create('a', attrs);\n (_a = img.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(a, img);\n a.appendChild(img);\n }\n };\n\n const isListGroup = item => hasNonNullableKey(item, 'items');\n const findTextByValue = (value, catalog) => findMap(catalog, item => {\n if (isListGroup(item)) {\n return findTextByValue(value, item.items);\n } else {\n return someIf(item.value === value, item);\n }\n });\n const getDelta = (persistentText, fieldName, catalog, data) => {\n const value = data[fieldName];\n const hasPersistentText = persistentText.length > 0;\n return value !== undefined ? findTextByValue(value, catalog).map(i => ({\n url: {\n value: i.value,\n meta: {\n text: hasPersistentText ? persistentText : i.text,\n attach: noop\n }\n },\n text: hasPersistentText ? persistentText : i.text\n })) : Optional.none();\n };\n const findCatalog = (catalogs, fieldName) => {\n if (fieldName === 'link') {\n return catalogs.link;\n } else if (fieldName === 'anchor') {\n return catalogs.anchor;\n } else {\n return Optional.none();\n }\n };\n const init = (initialData, linkCatalog) => {\n const persistentData = {\n text: initialData.text,\n title: initialData.title\n };\n const getTitleFromUrlChange = url => {\n var _a;\n return someIf(persistentData.title.length <= 0, Optional.from((_a = url.meta) === null || _a === void 0 ? void 0 : _a.title).getOr(''));\n };\n const getTextFromUrlChange = url => {\n var _a;\n return someIf(persistentData.text.length <= 0, Optional.from((_a = url.meta) === null || _a === void 0 ? void 0 : _a.text).getOr(url.value));\n };\n const onUrlChange = data => {\n const text = getTextFromUrlChange(data.url);\n const title = getTitleFromUrlChange(data.url);\n if (text.isSome() || title.isSome()) {\n return Optional.some({\n ...text.map(text => ({ text })).getOr({}),\n ...title.map(title => ({ title })).getOr({})\n });\n } else {\n return Optional.none();\n }\n };\n const onCatalogChange = (data, change) => {\n const catalog = findCatalog(linkCatalog, change).getOr([]);\n return getDelta(persistentData.text, change, catalog, data);\n };\n const onChange = (getData, change) => {\n const name = change.name;\n if (name === 'url') {\n return onUrlChange(getData());\n } else if (contains([\n 'anchor',\n 'link'\n ], name)) {\n return onCatalogChange(getData(), name);\n } else if (name === 'text' || name === 'title') {\n persistentData[name] = getData()[name];\n return Optional.none();\n } else {\n return Optional.none();\n }\n };\n return { onChange };\n };\n const DialogChanges = {\n init,\n getDelta\n };\n\n var global$1 = tinymce.util.Tools.resolve('tinymce.util.Delay');\n\n const delayedConfirm = (editor, message, callback) => {\n const rng = editor.selection.getRng();\n global$1.setEditorTimeout(editor, () => {\n editor.windowManager.confirm(message, state => {\n editor.selection.setRng(rng);\n callback(state);\n });\n });\n };\n const tryEmailTransform = data => {\n const url = data.href;\n const suggestMailTo = url.indexOf('@') > 0 && url.indexOf('/') === -1 && url.indexOf('mailto:') === -1;\n return suggestMailTo ? Optional.some({\n message: 'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?',\n preprocess: oldData => ({\n ...oldData,\n href: 'mailto:' + url\n })\n }) : Optional.none();\n };\n const tryProtocolTransform = (assumeExternalTargets, defaultLinkProtocol) => data => {\n const url = data.href;\n const suggestProtocol = assumeExternalTargets === 1 && !hasProtocol(url) || assumeExternalTargets === 0 && /^\\s*www(\\.|\\d\\.)/i.test(url);\n return suggestProtocol ? Optional.some({\n message: `The URL you entered seems to be an external link. Do you want to add the required ${ defaultLinkProtocol }:// prefix?`,\n preprocess: oldData => ({\n ...oldData,\n href: defaultLinkProtocol + '://' + url\n })\n }) : Optional.none();\n };\n const preprocess = (editor, data) => findMap([\n tryEmailTransform,\n tryProtocolTransform(assumeExternalTargets(editor), getDefaultLinkProtocol(editor))\n ], f => f(data)).fold(() => Promise.resolve(data), transform => new Promise(callback => {\n delayedConfirm(editor, transform.message, state => {\n callback(state ? transform.preprocess(data) : data);\n });\n }));\n const DialogConfirms = { preprocess };\n\n const getAnchors = editor => {\n const anchorNodes = editor.dom.select('a:not([href])');\n const anchors = bind(anchorNodes, anchor => {\n const id = anchor.name || anchor.id;\n return id ? [{\n text: id,\n value: '#' + id\n }] : [];\n });\n return anchors.length > 0 ? Optional.some([{\n text: 'None',\n value: ''\n }].concat(anchors)) : Optional.none();\n };\n const AnchorListOptions = { getAnchors };\n\n const getClasses = editor => {\n const list = getLinkClassList(editor);\n if (list.length > 0) {\n return ListOptions.sanitize(list);\n }\n return Optional.none();\n };\n const ClassListOptions = { getClasses };\n\n const parseJson = text => {\n try {\n return Optional.some(JSON.parse(text));\n } catch (err) {\n return Optional.none();\n }\n };\n const getLinks = editor => {\n const extractor = item => editor.convertURL(item.value || item.url || '', 'href');\n const linkList = getLinkList(editor);\n return new Promise(resolve => {\n if (isString(linkList)) {\n fetch(linkList).then(res => res.ok ? res.text().then(parseJson) : Promise.reject()).then(resolve, () => resolve(Optional.none()));\n } else if (isFunction(linkList)) {\n linkList(output => resolve(Optional.some(output)));\n } else {\n resolve(Optional.from(linkList));\n }\n }).then(optItems => optItems.bind(ListOptions.sanitizeWith(extractor)).map(items => {\n if (items.length > 0) {\n const noneItem = [{\n text: 'None',\n value: ''\n }];\n return noneItem.concat(items);\n } else {\n return items;\n }\n }));\n };\n const LinkListOptions = { getLinks };\n\n const getRels = (editor, initialTarget) => {\n const list = getRelList(editor);\n if (list.length > 0) {\n const isTargetBlank = is(initialTarget, '_blank');\n const enforceSafe = allowUnsafeLinkTarget(editor) === false;\n const safeRelExtractor = item => applyRelTargetRules(ListOptions.getValue(item), isTargetBlank);\n const sanitizer = enforceSafe ? ListOptions.sanitizeWith(safeRelExtractor) : ListOptions.sanitize;\n return sanitizer(list);\n }\n return Optional.none();\n };\n const RelOptions = { getRels };\n\n const fallbacks = [\n {\n text: 'Current window',\n value: ''\n },\n {\n text: 'New window',\n value: '_blank'\n }\n ];\n const getTargets = editor => {\n const list = getTargetList(editor);\n if (isArray(list)) {\n return ListOptions.sanitize(list).orThunk(() => Optional.some(fallbacks));\n } else if (list === false) {\n return Optional.none();\n }\n return Optional.some(fallbacks);\n };\n const TargetOptions = { getTargets };\n\n const nonEmptyAttr = (dom, elem, name) => {\n const val = dom.getAttrib(elem, name);\n return val !== null && val.length > 0 ? Optional.some(val) : Optional.none();\n };\n const extractFromAnchor = (editor, anchor) => {\n const dom = editor.dom;\n const onlyText = isOnlyTextSelected(editor);\n const text = onlyText ? Optional.some(getAnchorText(editor.selection, anchor)) : Optional.none();\n const url = anchor.bind(anchorElm => Optional.from(dom.getAttrib(anchorElm, 'href')));\n const target = anchor.bind(anchorElm => Optional.from(dom.getAttrib(anchorElm, 'target')));\n const rel = anchor.bind(anchorElm => nonEmptyAttr(dom, anchorElm, 'rel'));\n const linkClass = anchor.bind(anchorElm => nonEmptyAttr(dom, anchorElm, 'class'));\n const title = anchor.bind(anchorElm => nonEmptyAttr(dom, anchorElm, 'title'));\n return {\n url,\n text,\n title,\n target,\n rel,\n linkClass\n };\n };\n const collect = (editor, linkNode) => LinkListOptions.getLinks(editor).then(links => {\n const anchor = extractFromAnchor(editor, linkNode);\n return {\n anchor,\n catalogs: {\n targets: TargetOptions.getTargets(editor),\n rels: RelOptions.getRels(editor, anchor.target),\n classes: ClassListOptions.getClasses(editor),\n anchor: AnchorListOptions.getAnchors(editor),\n link: links\n },\n optNode: linkNode,\n flags: { titleEnabled: shouldShowLinkTitle(editor) }\n };\n });\n const DialogInfo = { collect };\n\n const handleSubmit = (editor, info) => api => {\n const data = api.getData();\n if (!data.url.value) {\n unlink(editor);\n api.close();\n return;\n }\n const getChangedValue = key => Optional.from(data[key]).filter(value => !is(info.anchor[key], value));\n const changedData = {\n href: data.url.value,\n text: getChangedValue('text'),\n target: getChangedValue('target'),\n rel: getChangedValue('rel'),\n class: getChangedValue('linkClass'),\n title: getChangedValue('title')\n };\n const attachState = {\n href: data.url.value,\n attach: data.url.meta !== undefined && data.url.meta.attach ? data.url.meta.attach : noop\n };\n DialogConfirms.preprocess(editor, changedData).then(pData => {\n link(editor, attachState, pData);\n });\n api.close();\n };\n const collectData = editor => {\n const anchorNode = getAnchorElement(editor);\n return DialogInfo.collect(editor, anchorNode);\n };\n const getInitialData = (info, defaultTarget) => {\n const anchor = info.anchor;\n const url = anchor.url.getOr('');\n return {\n url: {\n value: url,\n meta: { original: { value: url } }\n },\n text: anchor.text.getOr(''),\n title: anchor.title.getOr(''),\n anchor: url,\n link: url,\n rel: anchor.rel.getOr(''),\n target: anchor.target.or(defaultTarget).getOr(''),\n linkClass: anchor.linkClass.getOr('')\n };\n };\n const makeDialog = (settings, onSubmit, editor) => {\n const urlInput = [{\n name: 'url',\n type: 'urlinput',\n filetype: 'file',\n label: 'URL',\n picker_text: 'Browse links'\n }];\n const displayText = settings.anchor.text.map(() => ({\n name: 'text',\n type: 'input',\n label: 'Text to display'\n })).toArray();\n const titleText = settings.flags.titleEnabled ? [{\n name: 'title',\n type: 'input',\n label: 'Title'\n }] : [];\n const defaultTarget = Optional.from(getDefaultLinkTarget(editor));\n const initialData = getInitialData(settings, defaultTarget);\n const catalogs = settings.catalogs;\n const dialogDelta = DialogChanges.init(initialData, catalogs);\n const body = {\n type: 'panel',\n items: flatten([\n urlInput,\n displayText,\n titleText,\n cat([\n catalogs.anchor.map(ListOptions.createUi('anchor', 'Anchors')),\n catalogs.rels.map(ListOptions.createUi('rel', 'Rel')),\n catalogs.targets.map(ListOptions.createUi('target', 'Open link in...')),\n catalogs.link.map(ListOptions.createUi('link', 'Link list')),\n catalogs.classes.map(ListOptions.createUi('linkClass', 'Class'))\n ])\n ])\n };\n return {\n title: 'Insert/Edit Link',\n size: 'normal',\n body,\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,\n onChange: (api, {name}) => {\n dialogDelta.onChange(api.getData, { name }).each(newData => {\n api.setData(newData);\n });\n },\n onSubmit\n };\n };\n const open$1 = editor => {\n const data = collectData(editor);\n data.then(info => {\n const onSubmit = handleSubmit(editor, info);\n return makeDialog(info, onSubmit, editor);\n }).then(spec => {\n editor.windowManager.open(spec);\n });\n };\n\n const register = editor => {\n editor.addCommand('mceLink', (_ui, value) => {\n if ((value === null || value === void 0 ? void 0 : value.dialog) === true || !useQuickLink(editor)) {\n open$1(editor);\n } else {\n editor.dispatch('contexttoolbar-show', { toolbarKey: 'quicklink' });\n }\n });\n };\n\n var global = tinymce.util.Tools.resolve('tinymce.util.VK');\n\n const appendClickRemove = (link, evt) => {\n document.body.appendChild(link);\n link.dispatchEvent(evt);\n document.body.removeChild(link);\n };\n const open = url => {\n const link = document.createElement('a');\n link.target = '_blank';\n link.href = url;\n link.rel = 'noreferrer noopener';\n const evt = document.createEvent('MouseEvents');\n evt.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);\n appendClickRemove(link, evt);\n };\n\n const getLink = (editor, elm) => editor.dom.getParent(elm, 'a[href]');\n const getSelectedLink = editor => getLink(editor, editor.selection.getStart());\n const hasOnlyAltModifier = e => {\n return e.altKey === true && e.shiftKey === false && e.ctrlKey === false && e.metaKey === false;\n };\n const gotoLink = (editor, a) => {\n if (a) {\n const href = getHref(a);\n if (/^#/.test(href)) {\n const targetEl = editor.dom.select(href);\n if (targetEl.length) {\n editor.selection.scrollIntoView(targetEl[0], true);\n }\n } else {\n open(a.href);\n }\n }\n };\n const openDialog = editor => () => {\n editor.execCommand('mceLink', false, { dialog: true });\n };\n const gotoSelectedLink = editor => () => {\n gotoLink(editor, getSelectedLink(editor));\n };\n const setupGotoLinks = editor => {\n editor.on('click', e => {\n const link = getLink(editor, e.target);\n if (link && global.metaKeyPressed(e)) {\n e.preventDefault();\n gotoLink(editor, link);\n }\n });\n editor.on('keydown', e => {\n if (!e.isDefaultPrevented() && e.keyCode === 13 && hasOnlyAltModifier(e)) {\n const link = getSelectedLink(editor);\n if (link) {\n e.preventDefault();\n gotoLink(editor, link);\n }\n }\n });\n };\n const toggleState = (editor, toggler) => {\n editor.on('NodeChange', toggler);\n return () => editor.off('NodeChange', toggler);\n };\n const toggleLinkState = editor => api => {\n const updateState = () => {\n api.setActive(!editor.mode.isReadOnly() && isInAnchor(editor, editor.selection.getNode()));\n api.setEnabled(editor.selection.isEditable());\n };\n updateState();\n return toggleState(editor, updateState);\n };\n const toggleLinkMenuState = editor => api => {\n const updateState = () => {\n api.setEnabled(editor.selection.isEditable());\n };\n updateState();\n return toggleState(editor, updateState);\n };\n const hasExactlyOneLinkInSelection = editor => {\n const links = editor.selection.isCollapsed() ? getLinks$1(editor.dom.getParents(editor.selection.getStart())) : getLinksInSelection(editor.selection.getRng());\n return links.length === 1;\n };\n const toggleGotoLinkState = editor => api => {\n const updateState = () => api.setEnabled(hasExactlyOneLinkInSelection(editor));\n updateState();\n return toggleState(editor, updateState);\n };\n const toggleUnlinkState = editor => api => {\n const hasLinks$1 = parents => hasLinks(parents) || hasLinksInSelection(editor.selection.getRng());\n const parents = editor.dom.getParents(editor.selection.getStart());\n const updateEnabled = parents => {\n api.setEnabled(hasLinks$1(parents) && editor.selection.isEditable());\n };\n updateEnabled(parents);\n return toggleState(editor, e => updateEnabled(e.parents));\n };\n\n const setup = editor => {\n editor.addShortcut('Meta+K', '', () => {\n editor.execCommand('mceLink');\n });\n };\n\n const setupButtons = editor => {\n editor.ui.registry.addToggleButton('link', {\n icon: 'link',\n tooltip: 'Insert/edit link',\n onAction: openDialog(editor),\n onSetup: toggleLinkState(editor)\n });\n editor.ui.registry.addButton('openlink', {\n icon: 'new-tab',\n tooltip: 'Open link',\n onAction: gotoSelectedLink(editor),\n onSetup: toggleGotoLinkState(editor)\n });\n editor.ui.registry.addButton('unlink', {\n icon: 'unlink',\n tooltip: 'Remove link',\n onAction: () => unlink(editor),\n onSetup: toggleUnlinkState(editor)\n });\n };\n const setupMenuItems = editor => {\n editor.ui.registry.addMenuItem('openlink', {\n text: 'Open link',\n icon: 'new-tab',\n onAction: gotoSelectedLink(editor),\n onSetup: toggleGotoLinkState(editor)\n });\n editor.ui.registry.addMenuItem('link', {\n icon: 'link',\n text: 'Link...',\n shortcut: 'Meta+K',\n onSetup: toggleLinkMenuState(editor),\n onAction: openDialog(editor)\n });\n editor.ui.registry.addMenuItem('unlink', {\n icon: 'unlink',\n text: 'Remove link',\n onAction: () => unlink(editor),\n onSetup: toggleUnlinkState(editor)\n });\n };\n const setupContextMenu = editor => {\n const inLink = 'link unlink openlink';\n const noLink = 'link';\n editor.ui.registry.addContextMenu('link', {\n update: element => {\n const isEditable = editor.dom.isEditable(element);\n if (!isEditable) {\n return '';\n }\n return hasLinks(editor.dom.getParents(element, 'a')) ? inLink : noLink;\n }\n });\n };\n const setupContextToolbars = editor => {\n const collapseSelectionToEnd = editor => {\n editor.selection.collapse(false);\n };\n const onSetupLink = buttonApi => {\n const node = editor.selection.getNode();\n buttonApi.setEnabled(isInAnchor(editor, node));\n return noop;\n };\n const getLinkText = value => {\n const anchor = getAnchorElement(editor);\n const onlyText = isOnlyTextSelected(editor);\n if (anchor.isNone() && onlyText) {\n const text = getAnchorText(editor.selection, anchor);\n return someIf(text.length === 0, value);\n } else {\n return Optional.none();\n }\n };\n editor.ui.registry.addContextForm('quicklink', {\n launch: {\n type: 'contextformtogglebutton',\n icon: 'link',\n tooltip: 'Link',\n onSetup: toggleLinkState(editor)\n },\n label: 'Link',\n predicate: node => hasContextToolbar(editor) && isInAnchor(editor, node),\n initValue: () => {\n const elm = getAnchorElement(editor);\n return elm.fold(constant(''), getHref);\n },\n commands: [\n {\n type: 'contextformtogglebutton',\n icon: 'link',\n tooltip: 'Link',\n primary: true,\n onSetup: buttonApi => {\n const node = editor.selection.getNode();\n buttonApi.setActive(isInAnchor(editor, node));\n return toggleLinkState(editor)(buttonApi);\n },\n onAction: formApi => {\n const value = formApi.getValue();\n const text = getLinkText(value);\n const attachState = {\n href: value,\n attach: noop\n };\n link(editor, attachState, {\n href: value,\n text,\n title: Optional.none(),\n rel: Optional.none(),\n target: Optional.none(),\n class: Optional.none()\n });\n collapseSelectionToEnd(editor);\n formApi.hide();\n }\n },\n {\n type: 'contextformbutton',\n icon: 'unlink',\n tooltip: 'Remove link',\n onSetup: onSetupLink,\n onAction: formApi => {\n unlink(editor);\n formApi.hide();\n }\n },\n {\n type: 'contextformbutton',\n icon: 'new-tab',\n tooltip: 'Open link',\n onSetup: onSetupLink,\n onAction: formApi => {\n gotoSelectedLink(editor)();\n formApi.hide();\n }\n }\n ]\n });\n };\n\n var Plugin = () => {\n global$5.add('link', editor => {\n register$1(editor);\n setupButtons(editor);\n setupMenuItems(editor);\n setupContextMenu(editor);\n setupContextToolbars(editor);\n setupGotoLinks(editor);\n register(editor);\n setup(editor);\n });\n };\n\n Plugin();\n\n})();\n"],"names":["global$5","tinymce","util","Tools","resolve","isType","type","value","x","t","Array","isArray","o","v","proto","constructor","String","prototype","isPrototypeOf","_a","name","typeOf","isSimpleType","isString","isObject","isNull","a","isBoolean","isNonNullable","isNullable","isFunction","isArrayOf","pred","i","len","length","noop","tripleEquals","b","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","nativePush","push","contains","xs","ts","call","rawIndexOf","flatten","r","apply","f","findMap","arr","is","lhs","rhs","comparator","left","cat","someIf","option","editor","options","get","assumeExternalTargets","hasContextToolbar","getLinkList","getDefaultLinkTarget","getDefaultLinkProtocol","getTargetList","getRelList","getLinkClassList","shouldShowLinkTitle","allowUnsafeLinkTarget","useQuickLink","global$4","getValue","item","sanitizeList","list","extractValue","out","text","title","getText","undefined","menu","items","sanitizeWith","extracter","ListOptions","sanitize","createUi","label","keys","Object","hasOwnProperty","internalFilter","obj","onTrue","onFalse","props","k","has","key","global$3","global$2","isAnchor","elm","nodeName","toLowerCase","isLink","getHref","collectNodesInRange","rng","collapsed","contents","cloneContents","firstChild","walker","elements","current","next","hasProtocol","url","test","_b","getAttribute","applyRelTargetRules","rel","isUnsafe","rules","rels","split","removeTargetRules","val","inArray","newRels","concat","addTargetRules","trim","sort","join","getAnchorElement","selectedElm","getLinksInSelection","selection","getRng","getNode","isImageFigure","dom","select","getParent","isInAnchor","getAnchorText","anchorElm","replace","trimCaretContainers","getContent","format","innerText","textContent","getLinks$1","grep","hasLinks","isOnlyTextSelected","inlineTextElements","schema","getTextInlineElements","isElement","nodeType","anchor","hasAttribute","className","applyLinkOverrides","linkAttrs","newLinkAttrs","newRel","target","href","handleExternalTargets","linkDomMutation","attachState","data","acc","each$1","getLinkAttrs","undoManager","transact","attach","linkImageFigure","execCommand","insertContent","createHTML","encode","createLink","focus","setAttribs","updateLink","unwrapOptions","class","cls","_k","link","sanitizedData","getOption","uriOptions","allow_html_data_urls","allow_script_urls","allow_svg_data_urls","isDomSafe","sanitizeData","hasPlugin","unlink","node","unlinkImageFigure","bookmark","getBookmark","cloneRange","startAnchorElm","startContainer","getBody","endAnchorElm","endContainer","setStartBefore","setEndAfter","setRng","moveToBookmark","unlinkSelection","unlinkDomMutation","fig","img","getParents","parentNode","insertBefore","remove","attrs","create","appendChild","isListGroup","hasNonNullableKey","findTextByValue","catalog","getDelta","persistentText","fieldName","hasPersistentText","meta","DialogChanges","initialData","linkCatalog","persistentData","onUrlChange","getTitleFromUrlChange","onCatalogChange","change","catalogs","onChange","getData","global$1","tryEmailTransform","preprocess","oldData","tryProtocolTransform","defaultLinkProtocol","DialogConfirms","Promise","transform","callback","setEditorTimeout","windowManager","confirm","state","delayedConfirm","AnchorListOptions","anchorNodes","anchors","id","ClassListOptions","parseJson","JSON","parse","err","LinkListOptions","extractor","convertURL","linkList","fetch","then","res","ok","reject","output","optItems","RelOptions","initialTarget","isTargetBlank","safeRelExtractor","fallbacks","TargetOptions","nonEmptyAttr","elem","getAttrib","DialogInfo","linkNode","links","linkClass","extractFromAnchor","targets","classes","optNode","flags","titleEnabled","open$1","anchorNode","collectData","info","onSubmit","api","close","getChangedValue","changedData","pData","handleSubmit","settings","displayText","titleText","defaultTarget","original","getInitialData","dialogDelta","size","body","filetype","picker_text","buttons","primary","newData","setData","makeDialog","spec","open","global","document","createElement","evt","createEvent","initMouseEvent","window","dispatchEvent","removeChild","appendClickRemove","getLink","getSelectedLink","getStart","gotoLink","targetEl","scrollIntoView","openDialog","dialog","gotoSelectedLink","toggleState","toggler","on","off","toggleLinkState","updateState","setActive","mode","isReadOnly","setEnabled","isEditable","toggleLinkMenuState","toggleGotoLinkState","isCollapsed","hasExactlyOneLinkInSelection","toggleUnlinkState","hasLinks$1","parents","updateEnabled","e","setupContextToolbars","onSetupLink","buttonApi","ui","registry","addContextForm","launch","icon","tooltip","onSetup","initValue","commands","onAction","formApi","onlyText","getLinkText","collapse","collapseSelectionToEnd","hide","add","registerOption","register","processor","valid","default","register$1","addToggleButton","addButton","setupButtons","addMenuItem","shortcut","setupMenuItems","addContextMenu","update","element","setupContextMenu","metaKeyPressed","preventDefault","isDefaultPrevented","keyCode","altKey","shiftKey","ctrlKey","metaKey","hasOnlyAltModifier","setupGotoLinks","addCommand","_ui","dispatch","toolbarKey","addShortcut","setup"],"mappings":"gGAIA,WAGI,IAAIA,EAAWC,QAAQC,KAAKC,MAAMC,QAAQ,yBAE1C,MAoBMC,EAASC,GAAQC,GAZRC,KACb,MAAMC,SAAWD,EACjB,OAAU,OAANA,EACK,OACQ,WAANC,GAAkBC,MAAMC,QAAQH,GAClC,QACQ,WAANC,IAAuCG,EAdlCC,EAcsBL,EAAeM,GAdlCC,EAcsBC,QAZZC,UAYkCH,EAAMI,cAAcN,KAThD,QAAxBO,EAAKN,EAAEE,mBAAgC,IAAPI,OAAgB,EAASA,EAAGC,QAAUL,EAAYK,MAUpF,SAEAX,EAHwC,IAACG,EAAGE,EAdtC,IAACD,EAAGE,EACfI,CAiBV,EAEoCE,CAAOd,KAAWD,EAC5CgB,EAAehB,GAAQC,UAAgBA,IAAUD,EAEjDiB,EAAWlB,EAAO,UAClBmB,EAAWnB,EAAO,UAClBM,EAAUN,EAAO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