@ntlab/ntjs-assets 2.116.0 → 2.118.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/assets/js/cdn.json +2 -2
  2. package/assets/js/tinymce/CHANGELOG.md +24 -0
  3. package/assets/js/tinymce/models/dom/model.js +32 -37
  4. package/assets/js/tinymce/models/dom/model.min.js +1 -1
  5. package/assets/js/tinymce/plugins/accordion/plugin.js +27 -14
  6. package/assets/js/tinymce/plugins/accordion/plugin.min.js +1 -1
  7. package/assets/js/tinymce/plugins/advlist/plugin.js +7 -5
  8. package/assets/js/tinymce/plugins/advlist/plugin.min.js +1 -1
  9. package/assets/js/tinymce/plugins/anchor/plugin.js +1 -1
  10. package/assets/js/tinymce/plugins/autolink/plugin.js +3 -5
  11. package/assets/js/tinymce/plugins/autolink/plugin.min.js +1 -1
  12. package/assets/js/tinymce/plugins/autoresize/plugin.js +4 -6
  13. package/assets/js/tinymce/plugins/autoresize/plugin.min.js +1 -1
  14. package/assets/js/tinymce/plugins/autosave/plugin.js +4 -7
  15. package/assets/js/tinymce/plugins/autosave/plugin.min.js +1 -1
  16. package/assets/js/tinymce/plugins/charmap/plugin.js +8 -7
  17. package/assets/js/tinymce/plugins/charmap/plugin.min.js +1 -1
  18. package/assets/js/tinymce/plugins/code/plugin.js +1 -1
  19. package/assets/js/tinymce/plugins/codesample/plugin.js +9 -9
  20. package/assets/js/tinymce/plugins/codesample/plugin.min.js +2 -2
  21. package/assets/js/tinymce/plugins/directionality/plugin.js +8 -7
  22. package/assets/js/tinymce/plugins/directionality/plugin.min.js +1 -1
  23. package/assets/js/tinymce/plugins/emoticons/plugin.js +7 -5
  24. package/assets/js/tinymce/plugins/emoticons/plugin.min.js +1 -1
  25. package/assets/js/tinymce/plugins/fullscreen/plugin.js +10 -9
  26. package/assets/js/tinymce/plugins/fullscreen/plugin.min.js +1 -1
  27. package/assets/js/tinymce/plugins/help/plugin.js +10 -11
  28. package/assets/js/tinymce/plugins/help/plugin.min.js +1 -1
  29. package/assets/js/tinymce/plugins/image/plugin.js +21 -28
  30. package/assets/js/tinymce/plugins/image/plugin.min.js +1 -1
  31. package/assets/js/tinymce/plugins/importcss/plugin.js +4 -5
  32. package/assets/js/tinymce/plugins/importcss/plugin.min.js +1 -1
  33. package/assets/js/tinymce/plugins/insertdatetime/plugin.js +3 -3
  34. package/assets/js/tinymce/plugins/insertdatetime/plugin.min.js +1 -1
  35. package/assets/js/tinymce/plugins/langs8/it.js +1 -1
  36. package/assets/js/tinymce/plugins/langs8/zh-CN.js +4 -4
  37. package/assets/js/tinymce/plugins/link/plugin.js +15 -17
  38. package/assets/js/tinymce/plugins/link/plugin.min.js +1 -1
  39. package/assets/js/tinymce/plugins/lists/plugin.js +7 -5
  40. package/assets/js/tinymce/plugins/lists/plugin.min.js +1 -1
  41. package/assets/js/tinymce/plugins/media/plugin.js +15 -21
  42. package/assets/js/tinymce/plugins/media/plugin.min.js +1 -1
  43. package/assets/js/tinymce/plugins/nonbreaking/plugin.js +1 -1
  44. package/assets/js/tinymce/plugins/pagebreak/plugin.js +1 -1
  45. package/assets/js/tinymce/plugins/preview/plugin.js +88 -10
  46. package/assets/js/tinymce/plugins/preview/plugin.min.js +1 -1
  47. package/assets/js/tinymce/plugins/quickbars/plugin.js +9 -9
  48. package/assets/js/tinymce/plugins/quickbars/plugin.min.js +1 -1
  49. package/assets/js/tinymce/plugins/save/plugin.js +1 -1
  50. package/assets/js/tinymce/plugins/searchreplace/plugin.js +10 -11
  51. package/assets/js/tinymce/plugins/searchreplace/plugin.min.js +1 -1
  52. package/assets/js/tinymce/plugins/table/plugin.js +12 -13
  53. package/assets/js/tinymce/plugins/table/plugin.min.js +1 -1
  54. package/assets/js/tinymce/plugins/visualblocks/plugin.js +1 -1
  55. package/assets/js/tinymce/plugins/visualchars/plugin.js +9 -9
  56. package/assets/js/tinymce/plugins/visualchars/plugin.min.js +1 -1
  57. package/assets/js/tinymce/plugins/wordcount/plugin.js +1 -1
  58. package/assets/js/tinymce/skins/ui/oxide/content.css +32 -0
  59. package/assets/js/tinymce/skins/ui/oxide/content.inline.css +32 -0
  60. package/assets/js/tinymce/skins/ui/oxide/content.inline.js +1 -1
  61. package/assets/js/tinymce/skins/ui/oxide/content.inline.min.css +1 -1
  62. package/assets/js/tinymce/skins/ui/oxide/content.js +1 -1
  63. package/assets/js/tinymce/skins/ui/oxide/content.min.css +1 -1
  64. package/assets/js/tinymce/skins/ui/oxide/skin.css +52 -3
  65. package/assets/js/tinymce/skins/ui/oxide/skin.js +1 -1
  66. package/assets/js/tinymce/skins/ui/oxide/skin.min.css +1 -1
  67. package/assets/js/tinymce/skins/ui/oxide-dark/content.css +32 -0
  68. package/assets/js/tinymce/skins/ui/oxide-dark/content.inline.css +32 -0
  69. package/assets/js/tinymce/skins/ui/oxide-dark/content.inline.js +1 -1
  70. package/assets/js/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -1
  71. package/assets/js/tinymce/skins/ui/oxide-dark/content.js +1 -1
  72. package/assets/js/tinymce/skins/ui/oxide-dark/content.min.css +1 -1
  73. package/assets/js/tinymce/skins/ui/oxide-dark/skin.css +52 -3
  74. package/assets/js/tinymce/skins/ui/oxide-dark/skin.js +1 -1
  75. package/assets/js/tinymce/skins/ui/oxide-dark/skin.min.css +1 -1
  76. package/assets/js/tinymce/skins/ui/tinymce-5/content.css +32 -0
  77. package/assets/js/tinymce/skins/ui/tinymce-5/content.inline.css +32 -0
  78. package/assets/js/tinymce/skins/ui/tinymce-5/content.inline.js +1 -1
  79. package/assets/js/tinymce/skins/ui/tinymce-5/content.inline.min.css +1 -1
  80. package/assets/js/tinymce/skins/ui/tinymce-5/content.js +1 -1
  81. package/assets/js/tinymce/skins/ui/tinymce-5/content.min.css +1 -1
  82. package/assets/js/tinymce/skins/ui/tinymce-5/skin.css +52 -3
  83. package/assets/js/tinymce/skins/ui/tinymce-5/skin.js +1 -1
  84. package/assets/js/tinymce/skins/ui/tinymce-5/skin.min.css +1 -1
  85. package/assets/js/tinymce/skins/ui/tinymce-5-dark/content.css +32 -0
  86. package/assets/js/tinymce/skins/ui/tinymce-5-dark/content.inline.css +32 -0
  87. package/assets/js/tinymce/skins/ui/tinymce-5-dark/content.inline.js +1 -1
  88. package/assets/js/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +1 -1
  89. package/assets/js/tinymce/skins/ui/tinymce-5-dark/content.js +1 -1
  90. package/assets/js/tinymce/skins/ui/tinymce-5-dark/content.min.css +1 -1
  91. package/assets/js/tinymce/skins/ui/tinymce-5-dark/skin.css +52 -3
  92. package/assets/js/tinymce/skins/ui/tinymce-5-dark/skin.js +1 -1
  93. package/assets/js/tinymce/skins/ui/tinymce-5-dark/skin.min.css +1 -1
  94. package/assets/js/tinymce/themes/silver/theme.js +73 -88
  95. package/assets/js/tinymce/themes/silver/theme.min.js +1 -1
  96. package/assets/js/tinymce/tinymce.js +671 -449
  97. package/assets/js/tinymce/tinymce.min.js +2 -2
  98. package/package.json +1 -1
@@ -1,23 +1,28 @@
1
1
  /**
2
- * TinyMCE version 8.1.2 (TBD)
2
+ * TinyMCE version 8.2.0 (2025-10-23)
3
3
  */
4
4
 
5
5
  (function () {
6
6
  'use strict';
7
7
 
8
- var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');
8
+ var global$2 = tinymce.util.Tools.resolve('tinymce.PluginManager');
9
9
 
10
10
  /* eslint-disable @typescript-eslint/no-wrapper-object-types */
11
+ const isSimpleType = (type) => (value) => typeof value === type;
11
12
  const eq = (t) => (a) => t === a;
12
13
  const isUndefined = eq(undefined);
13
14
  const isNullable = (a) => a === null || a === undefined;
14
15
  const isNonNullable = (a) => !isNullable(a);
16
+ const isFunction = isSimpleType('function');
15
17
 
16
18
  const constant = (value) => {
17
19
  return () => {
18
20
  return value;
19
21
  };
20
22
  };
23
+ const identity = (x) => {
24
+ return x;
25
+ };
21
26
  const never = constant(false);
22
27
 
23
28
  /**
@@ -36,6 +41,11 @@
36
41
  * strict-null-checks
37
42
  */
38
43
  class Optional {
44
+ tag;
45
+ value;
46
+ // Sneaky optimisation: every instance of Optional.none is identical, so just
47
+ // reuse the same object
48
+ static singletonNone = new Optional(false);
39
49
  // The internal representation has a `tag` and a `value`, but both are
40
50
  // private: able to be console.logged, but not able to be accessed by code
41
51
  constructor(tag, value) {
@@ -203,7 +213,7 @@
203
213
  */
204
214
  getOrDie(message) {
205
215
  if (!this.tag) {
206
- throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');
216
+ throw new Error(message ?? 'Called getOrDie on None');
207
217
  }
208
218
  else {
209
219
  return this.value;
@@ -267,10 +277,31 @@
267
277
  return this.tag ? `some(${this.value})` : 'none()';
268
278
  }
269
279
  }
270
- // Sneaky optimisation: every instance of Optional.none is identical, so just
271
- // reuse the same object
272
- Optional.singletonNone = new Optional(false);
273
280
 
281
+ const nativeSlice = Array.prototype.slice;
282
+ const nativeIndexOf = Array.prototype.indexOf;
283
+ const rawIndexOf = (ts, t) => nativeIndexOf.call(ts, t);
284
+ const contains$1 = (xs, x) => rawIndexOf(xs, x) > -1;
285
+ const exists = (xs, pred) => {
286
+ for (let i = 0, len = xs.length; i < len; i++) {
287
+ const x = xs[i];
288
+ if (pred(x, i)) {
289
+ return true;
290
+ }
291
+ }
292
+ return false;
293
+ };
294
+ const map = (xs, f) => {
295
+ // pre-allocating array size when it's guaranteed to be known
296
+ // http://jsperf.com/push-allocated-vs-dynamic/22
297
+ const len = xs.length;
298
+ const r = new Array(len);
299
+ for (let i = 0; i < len; i++) {
300
+ const x = xs[i];
301
+ r[i] = f(x, i);
302
+ }
303
+ return r;
304
+ };
274
305
  const findUntil = (xs, pred, until) => {
275
306
  for (let i = 0, len = xs.length; i < len; i++) {
276
307
  const x = xs[i];
@@ -286,6 +317,7 @@
286
317
  const find$1 = (xs, pred) => {
287
318
  return findUntil(xs, pred, never);
288
319
  };
320
+ isFunction(Array.from) ? Array.from : (x) => nativeSlice.call(x);
289
321
  const findMap = (arr, f) => {
290
322
  for (let i = 0; i < arr.length; i++) {
291
323
  const r = f(arr[i], i);
@@ -295,6 +327,43 @@
295
327
  }
296
328
  return Optional.none();
297
329
  };
330
+ const unique = (xs, comparator) => {
331
+ const r = [];
332
+ const isDuplicated = isFunction(comparator) ?
333
+ (x) => exists(r, (i) => comparator(i, x)) :
334
+ (x) => contains$1(r, x);
335
+ for (let i = 0, len = xs.length; i < len; i++) {
336
+ const x = xs[i];
337
+ if (!isDuplicated(x)) {
338
+ r.push(x);
339
+ }
340
+ }
341
+ return r;
342
+ };
343
+
344
+ // There are many variations of Object iteration that are faster than the 'for-in' style:
345
+ // http://jsperf.com/object-keys-iteration/107
346
+ //
347
+ // Use the native keys if it is available (IE9+), otherwise fall back to manually filtering
348
+ const keys = Object.keys;
349
+ const each = (obj, f) => {
350
+ const props = keys(obj);
351
+ for (let k = 0, len = props.length; k < len; k++) {
352
+ const i = props[k];
353
+ const x = obj[i];
354
+ f(x, i);
355
+ }
356
+ };
357
+ const mapToArray = (obj, f) => {
358
+ const r = [];
359
+ each(obj, (value, name) => {
360
+ r.push(f(value, name));
361
+ });
362
+ return r;
363
+ };
364
+ const values = (obj) => {
365
+ return mapToArray(obj, identity);
366
+ };
298
367
 
299
368
  const contains = (str, substr, start = 0, end) => {
300
369
  const idx = str.indexOf(substr, start);
@@ -381,7 +450,7 @@
381
450
  const detectBrowser$1 = (browsers, userAgentData) => {
382
451
  return findMap(userAgentData.brands, (uaBrand) => {
383
452
  const lcBrand = uaBrand.brand.toLowerCase();
384
- return find$1(browsers, (browser) => { var _a; return lcBrand === ((_a = browser.brand) === null || _a === void 0 ? void 0 : _a.toLowerCase()); })
453
+ return find$1(browsers, (browser) => lcBrand === browser.brand?.toLowerCase())
385
454
  .map((info) => ({
386
455
  current: info.name,
387
456
  version: Version.nu(parseInt(uaBrand.version, 10), 0)
@@ -655,6 +724,8 @@
655
724
  return `<script>(${fn.toString()})(${isMacOSOrIOS})</script>`;
656
725
  };
657
726
 
727
+ var global$1 = tinymce.util.Tools.resolve('tinymce.dom.ScriptLoader');
728
+
658
729
  var global = tinymce.util.Tools.resolve('tinymce.util.Tools');
659
730
 
660
731
  const option = (name) => (editor) => editor.options.get(name);
@@ -663,11 +734,17 @@
663
734
  const getBodyClass = option('body_class');
664
735
  const getBodyId = option('body_id');
665
736
 
737
+ const getComponentScriptsHtml = (editor) => {
738
+ const urls = unique(values(editor.schema.getComponentUrls()));
739
+ return map(urls, (url) => {
740
+ const attrs = mapToArray(global$1.ScriptLoader.getScriptAttributes(url), (v, k) => ` ${editor.dom.encode(k)}="${editor.dom.encode(v)}"`);
741
+ return `<script src="${editor.dom.encode(url)}"${attrs.join('')}></script>`;
742
+ }).join('');
743
+ };
666
744
  const getPreviewHtml = (editor) => {
667
- var _a;
668
745
  let headHtml = '';
669
746
  const encode = editor.dom.encode;
670
- const contentStyle = (_a = getContentStyle(editor)) !== null && _a !== void 0 ? _a : '';
747
+ const contentStyle = getContentStyle(editor) ?? '';
671
748
  headHtml += `<base href="${encode(editor.documentBaseURI.getURI())}">`;
672
749
  const cors = shouldUseContentCssCors(editor) ? ' crossorigin="anonymous"' : '';
673
750
  global.each(editor.contentCSS, (url) => {
@@ -676,6 +753,7 @@
676
753
  if (contentStyle) {
677
754
  headHtml += '<style type="text/css">' + contentStyle + '</style>';
678
755
  }
756
+ headHtml += getComponentScriptsHtml(editor);
679
757
  const bodyId = getBodyId(editor);
680
758
  const bodyClass = getBodyClass(editor);
681
759
  const directionality = editor.getBody().dir;
@@ -749,7 +827,7 @@
749
827
  };
750
828
 
751
829
  var Plugin = () => {
752
- global$1.add('preview', (editor) => {
830
+ global$2.add('preview', (editor) => {
753
831
  register$1(editor);
754
832
  register(editor);
755
833
  });
@@ -1 +1 @@
1
- !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>undefined===e;const r=e=>()=>e,n=r(!1);class s{constructor(e,t){this.tag=e,this.value=t}static some(e){return new s(!0,e)}static none(){return s.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?s.some(e(this.value)):s.none()}bind(e){return this.tag?e(this.value):s.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:s.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 null==e?s.none():s.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}s.singletonNone=new s(!1);const i=(e,t)=>((e,t,r)=>{for(let n=0,i=e.length;n<i;n++){const i=e[n];if(t(i,n))return s.some(i);if(r(i,n))break}return s.none()})(e,t,n),o=(e,r,n=0,s)=>{const i=e.indexOf(r,n);return-1!==i&&(!!t(s)||i+r.length<=s)},a=()=>c(0,0),c=(e,t)=>({major:e,minor:t}),u={nu:c,detect:(e,t)=>{const r=String(t).toLowerCase();return 0===e.length?a():((e,t)=>{const r=((e,t)=>{for(let r=0;r<e.length;r++){const n=e[r];if(n.test(t))return n}})(e,t);if(!r)return{major:0,minor:0};const n=e=>Number(t.replace(r,"$"+e));return c(n(1),n(2))})(e,r)},unknown:a},l=(e,t)=>{const r=String(t).toLowerCase();return i(e,(e=>e.search(r)))},d=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,h=e=>t=>o(t,e),m=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>o(e,"edge/")&&o(e,"chrome")&&o(e,"safari")&&o(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,d],search:e=>o(e,"chrome")&&!o(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>o(e,"msie")||o(e,"trident")},{name:"Opera",versionRegexes:[d,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:h("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:h("firefox")},{name:"Safari",versionRegexes:[d,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(o(e,"safari")||o(e,"mobile/"))&&o(e,"applewebkit")}],v=[{name:"Windows",search:h("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>o(e,"iphone")||o(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:h("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:h("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:h("linux"),versionRegexes:[]},{name:"Solaris",search:h("sunos"),versionRegexes:[]},{name:"FreeBSD",search:h("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:h("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],g={browsers:r(m),oses:r(v)},p="Edge",f="Chromium",w="Opera",x="Firefox",S="Safari",y=e=>{const t=e.current,r=e.version,n=e=>()=>t===e;return{current:t,version:r,isEdge:n(p),isChromium:n(f),isIE:n("IE"),isOpera:n(w),isFirefox:n(x),isSafari:n(S)}},b=()=>y({current:void 0,version:u.unknown()}),O=y,R=(r(p),r(f),r("IE"),r(w),r(x),r(S),"Windows"),C="Android",A="Linux",k="macOS",D="Solaris",E="FreeBSD",I="ChromeOS",P=e=>{const t=e.current,r=e.version,n=e=>()=>t===e;return{current:t,version:r,isWindows:n(R),isiOS:n("iOS"),isAndroid:n(C),isMacOS:n(k),isLinux:n(A),isSolaris:n(D),isFreeBSD:n(E),isChromeOS:n(I)}},T=()=>P({current:void 0,version:u.unknown()}),_=P,B=(r(R),r("iOS"),r(C),r(A),r(k),r(D),r(E),r(I),(e,t,n)=>{const o=g.browsers(),a=g.oses(),c=t.bind((e=>((e,t)=>((e,t)=>{for(let r=0;r<e.length;r++){const n=t(e[r]);if(n.isSome())return n}return s.none()})(t.brands,(t=>{const r=t.brand.toLowerCase();return i(e,(e=>{var t;return r===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())})).map((e=>({current:e.name,version:u.nu(parseInt(t.version,10),0)})))})))(o,e))).orThunk((()=>((e,t)=>l(e,t).map((e=>{const r=u.detect(e.versionRegexes,t);return{current:e.name,version:r}})))(o,e))).fold(b,O),d=((e,t)=>l(e,t).map((e=>{const r=u.detect(e.versionRegexes,t);return{current:e.name,version:r}})))(a,e).fold(T,_),h=((e,t,n,s)=>{const i=e.isiOS()&&!0===/ipad/i.test(n),o=e.isiOS()&&!i,a=e.isiOS()||e.isAndroid(),c=a||s("(pointer:coarse)"),u=i||!o&&a&&s("(min-device-width:768px)"),l=o||a&&!u,d=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(n),h=!l&&!u&&!d;return{isiPad:r(i),isiPhone:r(o),isTablet:r(u),isPhone:r(l),isTouch:r(c),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:r(d),isDesktop:r(h)}})(d,c,e,n);return{browser:c,os:d,deviceType:h}}),L=e=>window.matchMedia(e).matches;let N=(e=>{let t,r=!1;return(...n)=>(r||(r=!0,t=e.apply(null,n)),t)})((()=>B(window.navigator.userAgent,s.from(window.navigator.userAgentData),L)));const F=()=>N();var M=tinymce.util.Tools.resolve("tinymce.util.Tools");const $=e=>t=>t.options.get(e),W=$("content_style"),U=$("content_css_cors"),K=$("body_class"),j=$("body_id"),V=e=>{const t=(e=>{var t;let r="";const n=e.dom.encode,s=null!==(t=W(e))&&void 0!==t?t:"";r+=`<base href="${n(e.documentBaseURI.getURI())}">`;const i=U(e)?' crossorigin="anonymous"':"";M.each(e.contentCSS,(t=>{r+='<link type="text/css" rel="stylesheet" href="'+n(e.documentBaseURI.toAbsolute(t))+'"'+i+">"})),s&&(r+='<style type="text/css">'+s+"</style>");const o=j(e),a=K(e),c=e.getBody().dir,u=c?' dir="'+n(c)+'"':"";return"<!DOCTYPE html><html><head>"+r+'</head><body id="'+n(o)+'" class="mce-content-body '+n(a)+'"'+u+">"+e.getContent()+(()=>{const e=F().os.isMacOS()||F().os.isiOS();return`<script>(${(e=>{document.addEventListener("click",(t=>{for(let r=t.target;r;r=r.parentNode)if("A"===r.nodeName){const n=r.getAttribute("href");if(n&&n.startsWith("#")){t.preventDefault();const e=document.getElementById(n.substring(1));return void(e&&e.scrollIntoView({behavior:"smooth"}))}(e?t.metaKey:t.ctrlKey&&!t.altKey)||t.preventDefault()}}),!1)}).toString()})(${e})<\/script>`})()+"</body></html>"})(e);e.windowManager.open({title:"Preview",size:"large",body:{type:"panel",items:[{name:"preview",type:"iframe",sandboxed:!0,transparent:!1}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{preview:t}}).focus("close")};e.add("preview",(e=>{(e=>{e.addCommand("mcePreview",(()=>{V(e)}))})(e),(e=>{const t=()=>e.execCommand("mcePreview");e.ui.registry.addButton("preview",{icon:"preview",tooltip:"Preview",onAction:t,context:"any"}),e.ui.registry.addMenuItem("preview",{icon:"preview",text:"Preview",onAction:t,context:"any"})})(e)}))}();
1
+ !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>undefined===e;const r=e=>"function"==typeof e;const n=e=>()=>e,s=e=>e,o=n(!1);class i{tag;value;static singletonNone=new i(!1);constructor(e,t){this.tag=e,this.value=t}static some(e){return new i(!0,e)}static none(){return i.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?i.some(e(this.value)):i.none()}bind(e){return this.tag?e(this.value):i.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:i.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(e??"Called getOrDie on None")}static from(e){return null==e?i.none():i.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}Array.prototype.slice;const a=Array.prototype.indexOf,c=(e,t)=>((e,t,r)=>{for(let n=0,s=e.length;n<s;n++){const s=e[n];if(t(s,n))return i.some(s);if(r(s,n))break}return i.none()})(e,t,o);r(Array.from)&&Array.from;const u=Object.keys,l=(e,t)=>{const r=[];return((e,t)=>{const r=u(e);for(let n=0,s=r.length;n<s;n++){const s=r[n];t(e[s],s)}})(e,((e,n)=>{r.push(t(e,n))})),r},d=(e,r,n=0,s)=>{const o=e.indexOf(r,n);return-1!==o&&(!!t(s)||o+r.length<=s)},m=()=>h(0,0),h=(e,t)=>({major:e,minor:t}),g={nu:h,detect:(e,t)=>{const r=String(t).toLowerCase();return 0===e.length?m():((e,t)=>{const r=((e,t)=>{for(let r=0;r<e.length;r++){const n=e[r];if(n.test(t))return n}})(e,t);if(!r)return{major:0,minor:0};const n=e=>Number(t.replace(r,"$"+e));return h(n(1),n(2))})(e,r)},unknown:m},v=(e,t)=>{const r=String(t).toLowerCase();return c(e,(e=>e.search(r)))},p=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,f=e=>t=>d(t,e),w=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>d(e,"edge/")&&d(e,"chrome")&&d(e,"safari")&&d(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,p],search:e=>d(e,"chrome")&&!d(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>d(e,"msie")||d(e,"trident")},{name:"Opera",versionRegexes:[p,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:f("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:f("firefox")},{name:"Safari",versionRegexes:[p,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(d(e,"safari")||d(e,"mobile/"))&&d(e,"applewebkit")}],y=[{name:"Windows",search:f("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>d(e,"iphone")||d(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:f("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:f("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:f("linux"),versionRegexes:[]},{name:"Solaris",search:f("sunos"),versionRegexes:[]},{name:"FreeBSD",search:f("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:f("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],x={browsers:n(w),oses:n(y)},S="Edge",b="Chromium",O="Opera",A="Firefox",C="Safari",R=e=>{const t=e.current,r=e.version,n=e=>()=>t===e;return{current:t,version:r,isEdge:n(S),isChromium:n(b),isIE:n("IE"),isOpera:n(O),isFirefox:n(A),isSafari:n(C)}},k=()=>R({current:void 0,version:g.unknown()}),D=R,E=(n(S),n(b),n("IE"),n(O),n(A),n(C),"Windows"),I="Android",T="Linux",L="macOS",P="Solaris",$="FreeBSD",_="ChromeOS",B=e=>{const t=e.current,r=e.version,n=e=>()=>t===e;return{current:t,version:r,isWindows:n(E),isiOS:n("iOS"),isAndroid:n(I),isMacOS:n(L),isLinux:n(T),isSolaris:n(P),isFreeBSD:n($),isChromeOS:n(_)}},N=()=>B({current:void 0,version:g.unknown()}),F=B,M=(n(E),n("iOS"),n(I),n(T),n(L),n(P),n($),n(_),(e,t,r)=>{const s=x.browsers(),o=x.oses(),a=t.bind((e=>((e,t)=>((e,t)=>{for(let r=0;r<e.length;r++){const n=t(e[r]);if(n.isSome())return n}return i.none()})(t.brands,(t=>{const r=t.brand.toLowerCase();return c(e,(e=>r===e.brand?.toLowerCase())).map((e=>({current:e.name,version:g.nu(parseInt(t.version,10),0)})))})))(s,e))).orThunk((()=>((e,t)=>v(e,t).map((e=>{const r=g.detect(e.versionRegexes,t);return{current:e.name,version:r}})))(s,e))).fold(k,D),u=((e,t)=>v(e,t).map((e=>{const r=g.detect(e.versionRegexes,t);return{current:e.name,version:r}})))(o,e).fold(N,F),l=((e,t,r,s)=>{const o=e.isiOS()&&!0===/ipad/i.test(r),i=e.isiOS()&&!o,a=e.isiOS()||e.isAndroid(),c=a||s("(pointer:coarse)"),u=o||!i&&a&&s("(min-device-width:768px)"),l=i||a&&!u,d=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(r),m=!l&&!u&&!d;return{isiPad:n(o),isiPhone:n(i),isTablet:n(u),isPhone:n(l),isTouch:n(c),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:n(d),isDesktop:n(m)}})(u,a,e,r);return{browser:a,os:u,deviceType:l}}),j=e=>window.matchMedia(e).matches;let U=(e=>{let t,r=!1;return(...n)=>(r||(r=!0,t=e.apply(null,n)),t)})((()=>M(window.navigator.userAgent,i.from(window.navigator.userAgentData),j)));const W=()=>U();var K=tinymce.util.Tools.resolve("tinymce.dom.ScriptLoader"),V=tinymce.util.Tools.resolve("tinymce.util.Tools");const z=e=>t=>t.options.get(e),Y=z("content_style"),q=z("content_css_cors"),G=z("body_class"),H=z("body_id"),J=e=>{var t;return((e,t)=>{const r=e.length,n=new Array(r);for(let s=0;s<r;s++){const r=e[s];n[s]=t(r)}return n})(((e,t)=>{const n=[],s=r(t)?e=>((e,t)=>{for(let r=0,n=e.length;r<n;r++)if(t(e[r]))return!0;return!1})(n,(r=>t(r,e))):e=>((e,t)=>((e,t)=>a.call(e,t))(e,t)>-1)(n,e);for(let t=0,r=e.length;t<r;t++){const r=e[t];s(r)||n.push(r)}return n})((t=e.schema.getComponentUrls(),l(t,s))),(t=>{const r=l(K.ScriptLoader.getScriptAttributes(t),((t,r)=>` ${e.dom.encode(r)}="${e.dom.encode(t)}"`));return`<script src="${e.dom.encode(t)}"${r.join("")}><\/script>`})).join("")},Q=e=>{const t=(e=>{let t="";const r=e.dom.encode,n=Y(e)??"";t+=`<base href="${r(e.documentBaseURI.getURI())}">`;const s=q(e)?' crossorigin="anonymous"':"";V.each(e.contentCSS,(n=>{t+='<link type="text/css" rel="stylesheet" href="'+r(e.documentBaseURI.toAbsolute(n))+'"'+s+">"})),n&&(t+='<style type="text/css">'+n+"</style>"),t+=J(e);const o=H(e),i=G(e),a=e.getBody().dir,c=a?' dir="'+r(a)+'"':"";return"<!DOCTYPE html><html><head>"+t+'</head><body id="'+r(o)+'" class="mce-content-body '+r(i)+'"'+c+">"+e.getContent()+(()=>{const e=W().os.isMacOS()||W().os.isiOS();return`<script>(${(e=>{document.addEventListener("click",(t=>{for(let r=t.target;r;r=r.parentNode)if("A"===r.nodeName){const n=r.getAttribute("href");if(n&&n.startsWith("#")){t.preventDefault();const e=document.getElementById(n.substring(1));return void(e&&e.scrollIntoView({behavior:"smooth"}))}(e?t.metaKey:t.ctrlKey&&!t.altKey)||t.preventDefault()}}),!1)}).toString()})(${e})<\/script>`})()+"</body></html>"})(e);e.windowManager.open({title:"Preview",size:"large",body:{type:"panel",items:[{name:"preview",type:"iframe",sandboxed:!0,transparent:!1}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{preview:t}}).focus("close")};e.add("preview",(e=>{(e=>{e.addCommand("mcePreview",(()=>{Q(e)}))})(e),(e=>{const t=()=>e.execCommand("mcePreview");e.ui.registry.addButton("preview",{icon:"preview",tooltip:"Preview",onAction:t,context:"any"}),e.ui.registry.addMenuItem("preview",{icon:"preview",text:"Preview",onAction:t,context:"any"})})(e)}))}();
@@ -1,5 +1,5 @@
1
1
  /**
2
- * TinyMCE version 8.1.2 (TBD)
2
+ * TinyMCE version 8.2.0 (2025-10-23)
3
3
  */
4
4
 
5
5
  (function () {
@@ -9,13 +9,12 @@
9
9
 
10
10
  /* eslint-disable @typescript-eslint/no-wrapper-object-types */
11
11
  const hasProto = (v, constructor, predicate) => {
12
- var _a;
13
12
  if (predicate(v, constructor.prototype)) {
14
13
  return true;
15
14
  }
16
15
  else {
17
16
  // String-based fallback time
18
- return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;
17
+ return v.constructor?.name === constructor.name;
19
18
  }
20
19
  };
21
20
  const typeOf = (x) => {
@@ -64,6 +63,11 @@
64
63
  * strict-null-checks
65
64
  */
66
65
  class Optional {
66
+ tag;
67
+ value;
68
+ // Sneaky optimisation: every instance of Optional.none is identical, so just
69
+ // reuse the same object
70
+ static singletonNone = new Optional(false);
67
71
  // The internal representation has a `tag` and a `value`, but both are
68
72
  // private: able to be console.logged, but not able to be accessed by code
69
73
  constructor(tag, value) {
@@ -231,7 +235,7 @@
231
235
  */
232
236
  getOrDie(message) {
233
237
  if (!this.tag) {
234
- throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');
238
+ throw new Error(message ?? 'Called getOrDie on None');
235
239
  }
236
240
  else {
237
241
  return this.value;
@@ -295,9 +299,6 @@
295
299
  return this.tag ? `some(${this.value})` : 'none()';
296
300
  }
297
301
  }
298
- // Sneaky optimisation: every instance of Optional.none is identical, so just
299
- // reuse the same object
300
- Optional.singletonNone = new Optional(false);
301
302
 
302
303
  /**
303
304
  * Adds two numbers, and wrap to a range.
@@ -360,9 +361,8 @@
360
361
  fileInput.style.opacity = '0.001';
361
362
  document.body.appendChild(fileInput);
362
363
  const resolveFileInput = (value) => {
363
- var _a;
364
364
  if (!resolved) {
365
- (_a = fileInput.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(fileInput);
365
+ fileInput.parentNode?.removeChild(fileInput);
366
366
  resolved = true;
367
367
  resolve(value);
368
368
  }
@@ -1 +1 @@
1
- !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>typeof t===e,o=e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=r=e,(n=String).prototype.isPrototypeOf(o)||(null===(i=r.constructor)||void 0===i?void 0:i.name)===n.name)?"string":t;var o,r,n,i})(e);const r=t("boolean"),n=t("function"),i=()=>false;class s{constructor(e,t){this.tag=e,this.value=t}static some(e){return new s(!0,e)}static none(){return s.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?s.some(e(this.value)):s.none()}bind(e){return this.tag?e(this.value):s.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:s.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 null==e?s.none():s.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}s.singletonNone=new s(!1);let a=0;var l=tinymce.util.Tools.resolve("tinymce.util.Delay");const c=e=>{e.on("PreInit",(()=>{e.queryCommandSupported("QuickbarInsertImage")||e.addCommand("QuickbarInsertImage",(()=>{(e=>new Promise((t=>{let o=!1;const r=document.createElement("input");r.type="file",r.accept="image/*",r.style.position="fixed",r.style.left="0",r.style.top="0",r.style.opacity="0.001",document.body.appendChild(r);const n=e=>{var n;o||(null===(n=r.parentNode)||void 0===n||n.removeChild(r),o=!0,t(e))},i=e=>{n(Array.prototype.slice.call(e.target.files))};r.addEventListener("input",i),r.addEventListener("change",i);const s=t=>{const r=()=>{n([])};o||("focusin"===t.type?l.setEditorTimeout(e,r,1e3):r()),e.off("focusin remove",s)};e.on("focusin remove",s),r.click()})))(e).then((t=>{if(t.length>0){const o=t[0];(e=>new Promise((t=>{const o=new FileReader;o.onloadend=()=>{t(o.result.split(",")[1])},o.readAsDataURL(e)})))(o).then((t=>{((e,t,o)=>{const r=e.editorUpload.blobCache,n=r.create((e=>{const t=(new Date).getTime(),o=Math.floor(window.crypto.getRandomValues(new Uint32Array(1))[0]/4294967295*1e9);return a++,e+"_"+o+a+String(t)})("mceu"),o,t);r.add(n),e.insertContent(e.dom.createHTML("img",{src:n.blobUri()}))})(e,t,o)}))}}))}))}))},u=e=>t=>t.options.get(e),d=u("quickbars_selection_toolbar"),m=u("quickbars_insert_toolbar"),g=u("quickbars_image_toolbar"),h=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},b=h,p=(e,t)=>{const o=e.dom;if(1!==o.nodeType)return!1;{const e=o;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}};var v=(e,t,o,r,i)=>e(o,r)?s.some(o):n(i)&&i(o)?s.none():t(o,r,i);const f=(e,t,o)=>{let r=e.dom;const a=n(o)?o:i;for(;r.parentNode;){r=r.parentNode;const e=b(r);if(t(e))return s.some(e);if(a(e))break}return s.none()},y=(e,t,o)=>f(e,(e=>p(e,t)),o),k=e=>{const t=m(e);t.length>0&&e.ui.registry.addContextToolbar("quickblock",{predicate:t=>{const o=b(t),r=e.schema.getTextBlockElements(),n=t=>t.dom===e.getBody();return!(e=>{const t=e.dom;return!(!t||!t.hasAttribute)&&t.hasAttribute("data-mce-bogus")})(o)&&((e,t,o)=>v(((e,t)=>p(e,t)),y,e,'table,[data-mce-bogus="all"]',o))(o,0,n).fold((()=>((e,t,o)=>((e,t,o)=>v(((e,t)=>t(e)),f,e,t,o))(e,t,o).isSome())(o,(t=>t.dom.nodeName.toLowerCase()in r&&e.dom.isEmpty(t.dom)),n)),i)},items:t,position:"line",scope:"editor"})};e.add("quickbars",(e=>{(e=>{const t=e.options.register,n=e=>t=>{const n=r(t)||o(t);return n?r(t)?{value:t?e:"",valid:n}:{value:t.trim(),valid:n}:{valid:!1,message:"Must be a boolean or string."}},i="bold italic | quicklink h2 h3 blockquote";t("quickbars_selection_toolbar",{processor:n(i),default:i});const s="quickimage quicktable";t("quickbars_insert_toolbar",{processor:n(s),default:s});const a="alignleft aligncenter alignright";t("quickbars_image_toolbar",{processor:n(a),default:a})})(e),c(e),(e=>{e.ui.registry.addButton("quickimage",{icon:"image",tooltip:"Insert image",onAction:()=>e.execCommand("QuickbarInsertImage")}),e.ui.registry.addButton("quicktable",{icon:"table",tooltip:"Insert table",onAction:()=>{(e=>{e.execCommand("mceInsertTable",!1,{rows:2,columns:2})})(e)}})})(e),k(e),(e=>{const t=t=>e.dom.isEditable(t),o=e=>{const o="FIGURE"===e.nodeName&&/image/i.test(e.className),r="IMG"===e.nodeName||o,n=(e=>void 0!==e.dom.classList)(i=b(e))&&i.dom.classList.contains("mce-pagebreak");var i;return r&&t(e.parentElement)&&!n},r=g(e);r.length>0&&e.ui.registry.addContextToolbar("imageselection",{predicate:o,items:r,position:"node"});const n=d(e);n.length>0&&e.ui.registry.addContextToolbar("textselection",{predicate:r=>!o(r)&&!e.selection.isCollapsed()&&t(r),items:n,position:"selection",scope:"editor"})})(e)}))}();
1
+ !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>typeof t===e,o=e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=r=e,(n=String).prototype.isPrototypeOf(o)||r.constructor?.name===n.name)?"string":t;var o,r,n})(e);const r=t("boolean"),n=t("function"),i=()=>false;class s{tag;value;static singletonNone=new s(!1);constructor(e,t){this.tag=e,this.value=t}static some(e){return new s(!0,e)}static none(){return s.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?s.some(e(this.value)):s.none()}bind(e){return this.tag?e(this.value):s.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:s.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(e??"Called getOrDie on None")}static from(e){return null==e?s.none():s.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}let a=0;var l=tinymce.util.Tools.resolve("tinymce.util.Delay");const c=e=>{e.on("PreInit",(()=>{e.queryCommandSupported("QuickbarInsertImage")||e.addCommand("QuickbarInsertImage",(()=>{(e=>new Promise((t=>{let o=!1;const r=document.createElement("input");r.type="file",r.accept="image/*",r.style.position="fixed",r.style.left="0",r.style.top="0",r.style.opacity="0.001",document.body.appendChild(r);const n=e=>{o||(r.parentNode?.removeChild(r),o=!0,t(e))},i=e=>{n(Array.prototype.slice.call(e.target.files))};r.addEventListener("input",i),r.addEventListener("change",i);const s=t=>{const r=()=>{n([])};o||("focusin"===t.type?l.setEditorTimeout(e,r,1e3):r()),e.off("focusin remove",s)};e.on("focusin remove",s),r.click()})))(e).then((t=>{if(t.length>0){const o=t[0];(e=>new Promise((t=>{const o=new FileReader;o.onloadend=()=>{t(o.result.split(",")[1])},o.readAsDataURL(e)})))(o).then((t=>{((e,t,o)=>{const r=e.editorUpload.blobCache,n=r.create((e=>{const t=(new Date).getTime(),o=Math.floor(window.crypto.getRandomValues(new Uint32Array(1))[0]/4294967295*1e9);return a++,e+"_"+o+a+String(t)})("mceu"),o,t);r.add(n),e.insertContent(e.dom.createHTML("img",{src:n.blobUri()}))})(e,t,o)}))}}))}))}))},u=e=>t=>t.options.get(e),d=u("quickbars_selection_toolbar"),m=u("quickbars_insert_toolbar"),g=u("quickbars_image_toolbar"),h=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},b=h,p=(e,t)=>{const o=e.dom;if(1!==o.nodeType)return!1;{const e=o;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}};var v=(e,t,o,r,i)=>e(o,r)?s.some(o):n(i)&&i(o)?s.none():t(o,r,i);const f=(e,t,o)=>{let r=e.dom;const a=n(o)?o:i;for(;r.parentNode;){r=r.parentNode;const e=b(r);if(t(e))return s.some(e);if(a(e))break}return s.none()},y=(e,t,o)=>f(e,(e=>p(e,t)),o),k=e=>{const t=m(e);t.length>0&&e.ui.registry.addContextToolbar("quickblock",{predicate:t=>{const o=b(t),r=e.schema.getTextBlockElements(),n=t=>t.dom===e.getBody();return!(e=>{const t=e.dom;return!(!t||!t.hasAttribute)&&t.hasAttribute("data-mce-bogus")})(o)&&((e,t,o)=>v(((e,t)=>p(e,t)),y,e,'table,[data-mce-bogus="all"]',o))(o,0,n).fold((()=>((e,t,o)=>((e,t,o)=>v(((e,t)=>t(e)),f,e,t,o))(e,t,o).isSome())(o,(t=>t.dom.nodeName.toLowerCase()in r&&e.dom.isEmpty(t.dom)),n)),i)},items:t,position:"line",scope:"editor"})};e.add("quickbars",(e=>{(e=>{const t=e.options.register,n=e=>t=>{const n=r(t)||o(t);return n?r(t)?{value:t?e:"",valid:n}:{value:t.trim(),valid:n}:{valid:!1,message:"Must be a boolean or string."}},i="bold italic | quicklink h2 h3 blockquote";t("quickbars_selection_toolbar",{processor:n(i),default:i});const s="quickimage quicktable";t("quickbars_insert_toolbar",{processor:n(s),default:s});const a="alignleft aligncenter alignright";t("quickbars_image_toolbar",{processor:n(a),default:a})})(e),c(e),(e=>{e.ui.registry.addButton("quickimage",{icon:"image",tooltip:"Insert image",onAction:()=>e.execCommand("QuickbarInsertImage")}),e.ui.registry.addButton("quicktable",{icon:"table",tooltip:"Insert table",onAction:()=>{(e=>{e.execCommand("mceInsertTable",!1,{rows:2,columns:2})})(e)}})})(e),k(e),(e=>{const t=t=>e.dom.isEditable(t),o=e=>{const o="FIGURE"===e.nodeName&&/image/i.test(e.className),r="IMG"===e.nodeName||o,n=(e=>void 0!==e.dom.classList)(i=b(e))&&i.dom.classList.contains("mce-pagebreak");var i;return r&&t(e.parentElement)&&!n},r=g(e);r.length>0&&e.ui.registry.addContextToolbar("imageselection",{predicate:o,items:r,position:"node"});const n=d(e);n.length>0&&e.ui.registry.addContextToolbar("textselection",{predicate:r=>!o(r)&&!e.selection.isCollapsed()&&t(r),items:n,position:"selection",scope:"editor"})})(e)}))}();
@@ -1,5 +1,5 @@
1
1
  /**
2
- * TinyMCE version 8.1.2 (TBD)
2
+ * TinyMCE version 8.2.0 (2025-10-23)
3
3
  */
4
4
 
5
5
  (function () {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * TinyMCE version 8.1.2 (TBD)
2
+ * TinyMCE version 8.2.0 (2025-10-23)
3
3
  */
4
4
 
5
5
  (function () {
@@ -7,13 +7,12 @@
7
7
 
8
8
  /* eslint-disable @typescript-eslint/no-wrapper-object-types */
9
9
  const hasProto = (v, constructor, predicate) => {
10
- var _a;
11
10
  if (predicate(v, constructor.prototype)) {
12
11
  return true;
13
12
  }
14
13
  else {
15
14
  // String-based fallback time
16
- return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;
15
+ return v.constructor?.name === constructor.name;
17
16
  }
18
17
  };
19
18
  const typeOf = (x) => {
@@ -64,6 +63,11 @@
64
63
  * strict-null-checks
65
64
  */
66
65
  class Optional {
66
+ tag;
67
+ value;
68
+ // Sneaky optimisation: every instance of Optional.none is identical, so just
69
+ // reuse the same object
70
+ static singletonNone = new Optional(false);
67
71
  // The internal representation has a `tag` and a `value`, but both are
68
72
  // private: able to be console.logged, but not able to be accessed by code
69
73
  constructor(tag, value) {
@@ -231,7 +235,7 @@
231
235
  */
232
236
  getOrDie(message) {
233
237
  if (!this.tag) {
234
- throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');
238
+ throw new Error(message ?? 'Called getOrDie on None');
235
239
  }
236
240
  else {
237
241
  return this.value;
@@ -295,9 +299,6 @@
295
299
  return this.tag ? `some(${this.value})` : 'none()';
296
300
  }
297
301
  }
298
- // Sneaky optimisation: every instance of Optional.none is identical, so just
299
- // reuse the same object
300
- Optional.singletonNone = new Optional(false);
301
302
 
302
303
  const nativeSlice = Array.prototype.slice;
303
304
  const nativePush = Array.prototype.push;
@@ -656,12 +657,11 @@
656
657
  }
657
658
  };
658
659
  const collectTextToBoundary = (dom, section, node, rootNode, forwards) => {
659
- var _a;
660
660
  // Don't bother collecting text nodes if we're already at a boundary
661
661
  if (isBoundary(dom, node)) {
662
662
  return;
663
663
  }
664
- const rootBlock = (_a = dom.getParent(rootNode, dom.isBlock)) !== null && _a !== void 0 ? _a : dom.getRoot();
664
+ const rootBlock = dom.getParent(rootNode, dom.isBlock) ?? dom.getRoot();
665
665
  const walker = new global(node, rootBlock);
666
666
  const walkerFn = forwards ? walker.next.bind(walker) : walker.prev.bind(walker);
667
667
  // Walk over and add text nodes to the section and increase the offsets
@@ -869,12 +869,11 @@
869
869
  }
870
870
  };
871
871
  const unwrap = (node) => {
872
- var _a;
873
872
  const parentNode = node.parentNode;
874
873
  if (node.firstChild) {
875
874
  parentNode.insertBefore(node.firstChild, node);
876
875
  }
877
- (_a = node.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(node);
876
+ node.parentNode?.removeChild(node);
878
877
  };
879
878
  const findSpansByIndex = (editor, index) => {
880
879
  const spans = [];
@@ -1 +1 @@
1
- !function(){"use strict";const e=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=r=e,(o=String).prototype.isPrototypeOf(n)||(null===(s=r.constructor)||void 0===s?void 0:s.name)===o.name)?"string":t;var n,r,o,s})(t)===e,t=e=>t=>typeof t===e,n=e("string"),r=e("array"),o=t("boolean"),s=t("number"),a=()=>{},l=e=>()=>e,i=l(!0);class c{constructor(e,t){this.tag=e,this.value=t}static some(e){return new c(!0,e)}static none(){return c.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?c.some(e(this.value)):c.none()}bind(e){return this.tag?e(this.value):c.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:c.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 null==e?c.none():c.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}c.singletonNone=new c(!1);const d=Array.prototype.slice,u=Array.prototype.push,m=(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},h=(e,t)=>{for(let n=0,r=e.length;n<r;n++)t(e[n],n)},g=(e,t)=>{for(let n=e.length-1;n>=0;n--)t(e[n],n)},f=(e,t)=>(e=>{const t=[];for(let n=0,o=e.length;n<o;++n){if(!r(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);u.apply(t,e[n])}return t})(m(e,t)),p=Object.hasOwnProperty,x=(e,t)=>p.call(e,t),y=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}};var b=tinymce.util.Tools.resolve("tinymce.PluginManager");const v=l("[~\u2116|!-*+-\\/:;?@\\[-`{}\xa1\xab\xb7\xbb\xbf;\xb7\u055a-\u055f\u0589\u058a\u05be\u05c0\u05c3\u05c6\u05f3\u05f4\u0609\u060a\u060c\u060d\u061b\u061e\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0830-\u083e\u085e\u0964\u0965\u0970\u0df4\u0e4f\u0e5a\u0e5b\u0f04-\u0f12\u0f3a-\u0f3d\u0f85\u0fd0-\u0fd4\u0fd9\u0fda\u104a-\u104f\u10fb\u1361-\u1368\u1400\u166d\u166e\u169b\u169c\u16eb-\u16ed\u1735\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u180a\u1944\u1945\u1a1e\u1a1f\u1aa0-\u1aa6\u1aa8-\u1aad\u1b5a-\u1b60\u1bfc-\u1bff\u1c3b-\u1c3f\u1c7e\u1c7f\u1cd3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205e\u207d\u207e\u208d\u208e\u3008\u3009\u2768-\u2775\u27c5\u27c6\u27e6-\u27ef\u2983-\u2998\u29d8-\u29db\u29fc\u29fd\u2cf9-\u2cfc\u2cfe\u2cff\u2d70\u2e00-\u2e2e\u2e30\u2e31\u3001-\u3003\u3008-\u3011\u3014-\u301f\u3030\u303d\u30a0\u30fb\ua4fe\ua4ff\ua60d-\ua60f\ua673\ua67e\ua6f2-\ua6f7\ua874-\ua877\ua8ce\ua8cf\ua8f8-\ua8fa\ua92e\ua92f\ua95f\ua9c1-\ua9cd\ua9de\ua9df\uaa5c-\uaa5f\uaade\uaadf\uabeb\ufd3e\ufd3f\ufe10-\ufe19\ufe30-\ufe52\ufe54-\ufe61\ufe63\ufe68\ufe6a\ufe6b\uff01-\uff03\uff05-\uff0a\uff0c-\uff0f\uff1a\uff1b\uff1f\uff20\uff3b-\uff3d\uff3f\uff5b\uff5d\uff5f-\uff65]");var w=tinymce.util.Tools.resolve("tinymce.Env"),C=tinymce.util.Tools.resolve("tinymce.util.Tools");const E=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},O=E,N=e=>3===(e=>e.dom.nodeType)(e);const T=(e,t)=>({element:e,offset:t}),k=(e,t)=>{((e,t)=>{const n=(e=>c.from(e.dom.parentNode).map(O))(e);n.each((n=>{n.dom.insertBefore(t.dom,e.dom)}))})(e,t),((e,t)=>{e.dom.appendChild(t.dom)})(t,e)},A=(e=>{const t=t=>e(t)?c.from(t.dom.nodeValue):c.none();return{get:n=>{if(!e(n))throw new Error("Can only get text value of a text node");return t(n).getOr("")},getOption:t,set:(t,n)=>{if(!e(t))throw new Error("Can only set raw text value of a text node");t.dom.nodeValue=n}}})(N),S=e=>A.get(e);var B=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker");const F=(e,t)=>e.isBlock(t)||x(e.schema.getVoidElements(),t.nodeName),I=(e,t)=>!e.isEditable(t),M=(e,t)=>!e.isBlock(t)&&x(e.schema.getWhitespaceElements(),t.nodeName),R=(e,t)=>((e,t)=>{const n=(e=>m(e.dom.childNodes,O))(e);return n.length>0&&t<n.length?T(n[t],0):T(e,t)})(O(e),t),D=(e,t,n,r,o,s=!0)=>{let a=s?t(!1):n;for(;a;){const n=I(e,a);if(n||M(e,a)){if(n?r.cef(a):r.boundary(a))break;a=t(!0)}else{if(F(e,a)){if(r.boundary(a))break}else 3===a.nodeType&&r.text(a);if(a===o)break;a=t(!1)}}},P=(e,t,n,r,o)=>{var s;if(((e,t)=>F(e,t)||I(e,t)||M(e,t)||((e,t)=>"true"===e.getContentEditable(t)&&t.parentNode&&!e.isEditable(t.parentNode))(e,t))(e,n))return;const a=null!==(s=e.getParent(r,e.isBlock))&&void 0!==s?s:e.getRoot(),l=new B(n,a),c=o?l.next.bind(l):l.prev.bind(l);D(e,c,n,{boundary:i,cef:i,text:e=>{o?t.fOffset+=e.length:t.sOffset+=e.length,t.elements.push(O(e))}})},W=(e,t,n,r,o,s=!0)=>{const a=new B(n,t),l=[];let i={sOffset:0,fOffset:0,elements:[]};P(e,i,n,t,!1);const c=()=>(i.elements.length>0&&(l.push(i),i={sOffset:0,fOffset:0,elements:[]}),!1);return D(e,a.next.bind(a),n,{boundary:c,cef:e=>(c(),o&&l.push(...o.cef(e)),!1),text:e=>{i.elements.push(O(e)),o&&o.text(e,i)}},r,s),r&&P(e,i,r,t,!0),c(),l},$=(e,t)=>{const n=R(t.startContainer,t.startOffset),r=n.element.dom,o=R(t.endContainer,t.endOffset),s=o.element.dom;return W(e,t.commonAncestorContainer,r,s,{text:(e,t)=>{e===s?t.fOffset+=e.length-o.offset:e===r&&(t.sOffset+=n.offset)},cef:t=>{return(e=>{const t=d.call(e,0);return t.sort(((e,t)=>((e,t)=>((e,t,n)=>!!(e.compareDocumentPosition(t)&n))(e,t,Node.DOCUMENT_POSITION_PRECEDING))(e.elements[0].dom,t.elements[0].dom)?1:-1)),t})(f((n=O(t),((e,t)=>{const n=void 0===t?document:t.dom;return 1!==(r=n).nodeType&&9!==r.nodeType&&11!==r.nodeType||0===r.childElementCount?[]:m(n.querySelectorAll(e),O);var r})("*[contenteditable=true]",n)),(t=>{const n=t.dom;return W(e,n,n)})));var n}},!1)},V=(e,t)=>t.collapsed?[]:$(e,t),j=(e,t)=>{const n=e.createRng();return n.selectNode(t),V(e,n)},z=(e,t)=>f(t,(t=>{const n=t.elements,r=m(n,S).join(""),o=((e,t,n=0,r=e.length)=>{const o=t.regex;o.lastIndex=n;const s=[];let a;for(;a=o.exec(e);){const e=a[t.matchIndex],n=a.index+a[0].indexOf(e),l=n+e.length;if(l>r)break;s.push({start:n,finish:l}),o.lastIndex=l}return s})(r,e,t.sOffset,r.length-t.fOffset);return((e,t)=>{const n=(r=e,o=(e,n)=>{const r=S(n),o=e.last,s=o+r.length,a=f(t,((e,t)=>e.start<s&&e.finish>o?[{element:n,start:Math.max(o,e.start)-o,finish:Math.min(s,e.finish)-o,matchId:t}]:[]));return{results:e.results.concat(a),last:s}},s={results:[],last:0},h(r,((e,t)=>{s=o(s,e)})),s).results;var r,o,s;return((e,t)=>{if(0===e.length)return[];{let n=t(e[0]);const r=[];let o=[];for(let s=0,a=e.length;s<a;s++){const a=e[s],l=t(a);l!==n&&(r.push(o),o=[]),n=l,o.push(a)}return 0!==o.length&&r.push(o),r}})(n,(e=>e.matchId))})(n,o)})),U=(e,t)=>{g(e,((e,r)=>{g(e,(e=>{const a=O(t.cloneNode(!1));((e,t,r)=>{((e,t,r)=>{if(!(n(r)||o(r)||s(r)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",r,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,r+"")})(e.dom,t,r)})(a,"data-mce-index",r);const l=e.element.dom;if(l.length===e.finish&&0===e.start)k(e.element,a);else{l.length!==e.finish&&l.splitText(e.finish);const t=l.splitText(e.start);k(O(t),a)}}))}))},_=e=>e.getAttribute("data-mce-index"),q=(e,t,n,r)=>{const o=e.dom.create("span",{"data-mce-bogus":1});o.className="mce-match-marker";const s=e.getBody();return ee(e,t,!1),r?((e,t,n,r)=>{const o=n.getBookmark(),s=e.select("td[data-mce-selected],th[data-mce-selected]"),a=s.length>0?((e,t)=>f(t,(t=>j(e,t))))(e,s):V(e,n.getRng()),l=z(t,a);return U(l,r),n.moveToBookmark(o),l.length})(e.dom,n,e.selection,o):((e,t,n,r)=>{const o=j(e,n),s=z(t,o);return U(s,r),s.length})(e.dom,n,s,o)},G=e=>{var t;const n=e.parentNode;e.firstChild&&n.insertBefore(e.firstChild,e),null===(t=e.parentNode)||void 0===t||t.removeChild(e)},K=(e,t)=>{const n=[],r=C.toArray(e.getBody().getElementsByTagName("span"));if(r.length)for(let e=0;e<r.length;e++){const o=_(r[e]);null!==o&&o.length&&o===t.toString()&&n.push(r[e])}return n},H=(e,t,n)=>{const r=t.get();let o=r.index;const s=e.dom;n?o+1===r.count?o=0:o++:o-1==-1?o=r.count-1:o--,s.removeClass(K(e,r.index),"mce-match-marker-selected");const a=K(e,o);return a.length?(s.addClass(K(e,o),"mce-match-marker-selected"),e.selection.scrollIntoView(a[0]),o):-1},J=(e,t)=>{const n=t.parentNode;e.remove(t),n&&e.isEmpty(n)&&e.remove(n)},L=(e,t,n,r,o,s)=>{const a=e.selection,l=((e,t)=>{const n="("+e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&").replace(/\s/g,"[^\\S\\r\\n\\uFEFF]")+")";return t?`(?:^|\\s|${v()})`+n+`(?=$|\\s|${v()})`:n})(n,o),i=a.isForward(),c={regex:new RegExp(l,r?"g":"gi"),matchIndex:1},d=q(e,t,c,s);if(w.browser.isSafari()&&a.setRng(a.getRng(),i),d){const a=H(e,t,!0);t.set({index:a,count:d,text:n,matchCase:r,wholeWord:o,inSelection:s})}return d},Q=(e,t)=>{const n=H(e,t,!0);t.set({...t.get(),index:n})},X=(e,t)=>{const n=H(e,t,!1);t.set({...t.get(),index:n})},Y=e=>{const t=_(e);return null!==t&&t.length>0},Z=(e,t,n,r,o)=>{const s=t.get(),a=s.index;let l,i=a;r=!1!==r;const c=e.getBody(),d=C.grep(C.toArray(c.getElementsByTagName("span")),Y);for(let t=0;t<d.length;t++){const c=_(d[t]);let u=l=parseInt(c,10);if(o||u===s.index){for(n.length?(d[t].innerText=n,G(d[t])):J(e.dom,d[t]);d[++t];){if(u=parseInt(_(d[t]),10),u!==l){t--;break}J(e.dom,d[t])}r&&i--}else l>a&&d[t].setAttribute("data-mce-index",String(l-1))}return t.set({...s,count:o?0:s.count-1,index:i}),r?Q(e,t):X(e,t),!o&&t.get().count>0},ee=(e,t,n)=>{let r,o;const s=t.get(),a=C.toArray(e.getBody().getElementsByTagName("span"));for(let e=0;e<a.length;e++){const t=_(a[e]);null!==t&&t.length&&(t===s.index.toString()&&(r||(r=a[e].firstChild),o=a[e].firstChild),G(a[e]))}if(t.set({...s,index:-1,count:0,text:""}),r&&o){const t=e.dom.createRng();return t.setStart(r,0),t.setEnd(o,o.data.length),!1!==n&&e.selection.setRng(t),t}},te=(e,t)=>{const n=(()=>{const e=(e=>{const t=y(c.none()),n=()=>t.get().each(e);return{clear:()=>{n(),t.set(c.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{n(),t.set(c.some(e))}}})(a);return{...e,on:t=>e.get().each(t)}})();e.undoManager.add();const r=C.trim(e.selection.getContent({format:"text"})),o=e=>{e.setEnabled("next",((e,t)=>t.get().count>1)(0,t)),e.setEnabled("prev",((e,t)=>t.get().count>1)(0,t))},s=(e,t)=>{h(["replace","replaceall","prev","next"],(n=>e.setEnabled(n,!t)))},l=(e,t)=>{t.redial(p(e,t.getData()))},i=(e,t)=>{w.browser.isSafari()&&w.deviceType.isTouch()&&("find"===t||"replace"===t||"replaceall"===t)&&e.focus(t)},d=n=>{ee(e,t,!1),s(n,!0),o(n)},u=n=>{const r=n.getData(),a=t.get();if(r.findtext.length){if(a.text===r.findtext&&a.matchCase===r.matchcase&&a.wholeWord===r.wholewords)Q(e,t);else{const o=L(e,t,r.findtext,r.matchcase,r.wholewords,r.inselection);o<=0&&l(!0,n),s(n,0===o)}o(n)}else d(n)},m=t.get(),g={findtext:r,replacetext:"",wholewords:m.wholeWord,matchcase:m.matchCase,inselection:m.inSelection},f=e=>{const t=[{type:"label",label:"Find",for:"findtext",items:[{type:"bar",items:[{type:"input",name:"findtext",maximized:!0,inputMode:"search"},{type:"button",name:"prev",text:"Previous",icon:"action-prev",enabled:!1,borderless:!0},{type:"button",name:"next",text:"Next",icon:"action-next",enabled:!1,borderless:!0}]}]},{type:"input",name:"replacetext",label:"Replace with",inputMode:"search"}];return e&&t.push({type:"alertbanner",level:"error",text:"Could not find the specified string.",icon:"warning"}),t},p=(n,r)=>({title:"Find and Replace",size:"normal",body:{type:"panel",items:f(n)},buttons:[{type:"menu",name:"options",icon:"preferences",tooltip:"Preferences",align:"start",items:[{type:"togglemenuitem",name:"matchcase",text:"Match case"},{type:"togglemenuitem",name:"wholewords",text:"Find whole words only"},{type:"togglemenuitem",name:"inselection",text:"Find in selection"}]},{type:"custom",name:"find",text:"Find",primary:!0},{type:"custom",name:"replace",text:"Replace",enabled:!1},{type:"custom",name:"replaceall",text:"Replace all",enabled:!1}],initialData:r,onChange:(e,r)=>{n&&l(!1,e),"findtext"===r.name&&t.get().count>0&&d(e)},onAction:(n,r)=>{const s=n.getData();switch(r.name){case"find":u(n);break;case"replace":Z(e,t,s.replacetext)?o(n):d(n);break;case"replaceall":Z(e,t,s.replacetext,!0,!0),d(n);break;case"prev":X(e,t),o(n);break;case"next":Q(e,t),o(n);break;case"matchcase":case"wholewords":case"inselection":l(!1,n),(e=>{const n=e.getData(),r=t.get();t.set({...r,matchCase:n.matchcase,wholeWord:n.wholewords,inSelection:n.inselection})})(n),d(n)}i(n,r.name)},onSubmit:e=>{u(e),i(e,"find")},onClose:()=>{e.focus(),ee(e,t),e.undoManager.add()}});n.set(e.windowManager.open(p(!1,g),{inline:"toolbar"}))},ne=(e,t)=>()=>{te(e,t)};b.add("searchreplace",(e=>{const t=y({index:-1,count:0,text:"",matchCase:!1,wholeWord:!1,inSelection:!1});return((e,t)=>{e.addCommand("SearchReplace",(()=>{te(e,t)}))})(e,t),((e,t)=>{e.ui.registry.addMenuItem("searchreplace",{text:"Find and replace...",shortcut:"Meta+F",onAction:ne(e,t),icon:"search"}),e.ui.registry.addButton("searchreplace",{tooltip:"Find and replace",onAction:ne(e,t),icon:"search",shortcut:"Meta+F"}),e.shortcuts.add("Meta+F","",ne(e,t))})(e,t),((e,t)=>({done:n=>ee(e,t,n),find:(n,r,o,s=!1)=>L(e,t,n,r,o,s),next:()=>Q(e,t),prev:()=>X(e,t),replace:(n,r,o)=>Z(e,t,n,r,o)}))(e,t)}))}();
1
+ !function(){"use strict";const e=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=r=e,(o=String).prototype.isPrototypeOf(n)||r.constructor?.name===o.name)?"string":t;var n,r,o})(t)===e,t=e=>t=>typeof t===e,n=e("string"),r=e("array"),o=t("boolean"),s=t("number"),a=()=>{},l=e=>()=>e,i=l(!0);class c{tag;value;static singletonNone=new c(!1);constructor(e,t){this.tag=e,this.value=t}static some(e){return new c(!0,e)}static none(){return c.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?c.some(e(this.value)):c.none()}bind(e){return this.tag?e(this.value):c.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:c.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(e??"Called getOrDie on None")}static from(e){return null==e?c.none():c.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}const d=Array.prototype.slice,u=Array.prototype.push,m=(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},h=(e,t)=>{for(let n=0,r=e.length;n<r;n++)t(e[n],n)},g=(e,t)=>{for(let n=e.length-1;n>=0;n--)t(e[n],n)},f=(e,t)=>(e=>{const t=[];for(let n=0,o=e.length;n<o;++n){if(!r(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);u.apply(t,e[n])}return t})(m(e,t)),p=Object.hasOwnProperty,x=(e,t)=>p.call(e,t),y=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}};var b=tinymce.util.Tools.resolve("tinymce.PluginManager");const w=l("[~\u2116|!-*+-\\/:;?@\\[-`{}\xa1\xab\xb7\xbb\xbf;\xb7\u055a-\u055f\u0589\u058a\u05be\u05c0\u05c3\u05c6\u05f3\u05f4\u0609\u060a\u060c\u060d\u061b\u061e\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0830-\u083e\u085e\u0964\u0965\u0970\u0df4\u0e4f\u0e5a\u0e5b\u0f04-\u0f12\u0f3a-\u0f3d\u0f85\u0fd0-\u0fd4\u0fd9\u0fda\u104a-\u104f\u10fb\u1361-\u1368\u1400\u166d\u166e\u169b\u169c\u16eb-\u16ed\u1735\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u180a\u1944\u1945\u1a1e\u1a1f\u1aa0-\u1aa6\u1aa8-\u1aad\u1b5a-\u1b60\u1bfc-\u1bff\u1c3b-\u1c3f\u1c7e\u1c7f\u1cd3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205e\u207d\u207e\u208d\u208e\u3008\u3009\u2768-\u2775\u27c5\u27c6\u27e6-\u27ef\u2983-\u2998\u29d8-\u29db\u29fc\u29fd\u2cf9-\u2cfc\u2cfe\u2cff\u2d70\u2e00-\u2e2e\u2e30\u2e31\u3001-\u3003\u3008-\u3011\u3014-\u301f\u3030\u303d\u30a0\u30fb\ua4fe\ua4ff\ua60d-\ua60f\ua673\ua67e\ua6f2-\ua6f7\ua874-\ua877\ua8ce\ua8cf\ua8f8-\ua8fa\ua92e\ua92f\ua95f\ua9c1-\ua9cd\ua9de\ua9df\uaa5c-\uaa5f\uaade\uaadf\uabeb\ufd3e\ufd3f\ufe10-\ufe19\ufe30-\ufe52\ufe54-\ufe61\ufe63\ufe68\ufe6a\ufe6b\uff01-\uff03\uff05-\uff0a\uff0c-\uff0f\uff1a\uff1b\uff1f\uff20\uff3b-\uff3d\uff3f\uff5b\uff5d\uff5f-\uff65]");var v=tinymce.util.Tools.resolve("tinymce.Env"),C=tinymce.util.Tools.resolve("tinymce.util.Tools");const E=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},O=E,N=e=>3===(e=>e.dom.nodeType)(e);const T=(e,t)=>({element:e,offset:t}),k=(e,t)=>{((e,t)=>{const n=(e=>c.from(e.dom.parentNode).map(O))(e);n.each((n=>{n.dom.insertBefore(t.dom,e.dom)}))})(e,t),((e,t)=>{e.dom.appendChild(t.dom)})(t,e)},A=(e=>{const t=t=>e(t)?c.from(t.dom.nodeValue):c.none();return{get:n=>{if(!e(n))throw new Error("Can only get text value of a text node");return t(n).getOr("")},getOption:t,set:(t,n)=>{if(!e(t))throw new Error("Can only set raw text value of a text node");t.dom.nodeValue=n}}})(N),S=e=>A.get(e);var B=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker");const F=(e,t)=>e.isBlock(t)||x(e.schema.getVoidElements(),t.nodeName),I=(e,t)=>!e.isEditable(t),M=(e,t)=>!e.isBlock(t)&&x(e.schema.getWhitespaceElements(),t.nodeName),R=(e,t)=>((e,t)=>{const n=(e=>m(e.dom.childNodes,O))(e);return n.length>0&&t<n.length?T(n[t],0):T(e,t)})(O(e),t),D=(e,t,n,r,o,s=!0)=>{let a=s?t(!1):n;for(;a;){const n=I(e,a);if(n||M(e,a)){if(n?r.cef(a):r.boundary(a))break;a=t(!0)}else{if(F(e,a)){if(r.boundary(a))break}else 3===a.nodeType&&r.text(a);if(a===o)break;a=t(!1)}}},P=(e,t,n,r,o)=>{if(((e,t)=>F(e,t)||I(e,t)||M(e,t)||((e,t)=>"true"===e.getContentEditable(t)&&t.parentNode&&!e.isEditable(t.parentNode))(e,t))(e,n))return;const s=e.getParent(r,e.isBlock)??e.getRoot(),a=new B(n,s),l=o?a.next.bind(a):a.prev.bind(a);D(e,l,n,{boundary:i,cef:i,text:e=>{o?t.fOffset+=e.length:t.sOffset+=e.length,t.elements.push(O(e))}})},W=(e,t,n,r,o,s=!0)=>{const a=new B(n,t),l=[];let i={sOffset:0,fOffset:0,elements:[]};P(e,i,n,t,!1);const c=()=>(i.elements.length>0&&(l.push(i),i={sOffset:0,fOffset:0,elements:[]}),!1);return D(e,a.next.bind(a),n,{boundary:c,cef:e=>(c(),o&&l.push(...o.cef(e)),!1),text:e=>{i.elements.push(O(e)),o&&o.text(e,i)}},r,s),r&&P(e,i,r,t,!0),c(),l},$=(e,t)=>{const n=R(t.startContainer,t.startOffset),r=n.element.dom,o=R(t.endContainer,t.endOffset),s=o.element.dom;return W(e,t.commonAncestorContainer,r,s,{text:(e,t)=>{e===s?t.fOffset+=e.length-o.offset:e===r&&(t.sOffset+=n.offset)},cef:t=>{return(e=>{const t=d.call(e,0);return t.sort(((e,t)=>((e,t)=>((e,t,n)=>!!(e.compareDocumentPosition(t)&n))(e,t,Node.DOCUMENT_POSITION_PRECEDING))(e.elements[0].dom,t.elements[0].dom)?1:-1)),t})(f((n=O(t),((e,t)=>{const n=void 0===t?document:t.dom;return 1!==(r=n).nodeType&&9!==r.nodeType&&11!==r.nodeType||0===r.childElementCount?[]:m(n.querySelectorAll(e),O);var r})("*[contenteditable=true]",n)),(t=>{const n=t.dom;return W(e,n,n)})));var n}},!1)},V=(e,t)=>t.collapsed?[]:$(e,t),j=(e,t)=>{const n=e.createRng();return n.selectNode(t),V(e,n)},z=(e,t)=>f(t,(t=>{const n=t.elements,r=m(n,S).join(""),o=((e,t,n=0,r=e.length)=>{const o=t.regex;o.lastIndex=n;const s=[];let a;for(;a=o.exec(e);){const e=a[t.matchIndex],n=a.index+a[0].indexOf(e),l=n+e.length;if(l>r)break;s.push({start:n,finish:l}),o.lastIndex=l}return s})(r,e,t.sOffset,r.length-t.fOffset);return((e,t)=>{const n=(r=e,o=(e,n)=>{const r=S(n),o=e.last,s=o+r.length,a=f(t,((e,t)=>e.start<s&&e.finish>o?[{element:n,start:Math.max(o,e.start)-o,finish:Math.min(s,e.finish)-o,matchId:t}]:[]));return{results:e.results.concat(a),last:s}},s={results:[],last:0},h(r,((e,t)=>{s=o(s,e)})),s).results;var r,o,s;return((e,t)=>{if(0===e.length)return[];{let n=t(e[0]);const r=[];let o=[];for(let s=0,a=e.length;s<a;s++){const a=e[s],l=t(a);l!==n&&(r.push(o),o=[]),n=l,o.push(a)}return 0!==o.length&&r.push(o),r}})(n,(e=>e.matchId))})(n,o)})),U=(e,t)=>{g(e,((e,r)=>{g(e,(e=>{const a=O(t.cloneNode(!1));((e,t,r)=>{((e,t,r)=>{if(!(n(r)||o(r)||s(r)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",r,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,r+"")})(e.dom,t,r)})(a,"data-mce-index",r);const l=e.element.dom;if(l.length===e.finish&&0===e.start)k(e.element,a);else{l.length!==e.finish&&l.splitText(e.finish);const t=l.splitText(e.start);k(O(t),a)}}))}))},_=e=>e.getAttribute("data-mce-index"),q=(e,t,n,r)=>{const o=e.dom.create("span",{"data-mce-bogus":1});o.className="mce-match-marker";const s=e.getBody();return ee(e,t,!1),r?((e,t,n,r)=>{const o=n.getBookmark(),s=e.select("td[data-mce-selected],th[data-mce-selected]"),a=s.length>0?((e,t)=>f(t,(t=>j(e,t))))(e,s):V(e,n.getRng()),l=z(t,a);return U(l,r),n.moveToBookmark(o),l.length})(e.dom,n,e.selection,o):((e,t,n,r)=>{const o=j(e,n),s=z(t,o);return U(s,r),s.length})(e.dom,n,s,o)},G=e=>{const t=e.parentNode;e.firstChild&&t.insertBefore(e.firstChild,e),e.parentNode?.removeChild(e)},K=(e,t)=>{const n=[],r=C.toArray(e.getBody().getElementsByTagName("span"));if(r.length)for(let e=0;e<r.length;e++){const o=_(r[e]);null!==o&&o.length&&o===t.toString()&&n.push(r[e])}return n},H=(e,t,n)=>{const r=t.get();let o=r.index;const s=e.dom;n?o+1===r.count?o=0:o++:o-1==-1?o=r.count-1:o--,s.removeClass(K(e,r.index),"mce-match-marker-selected");const a=K(e,o);return a.length?(s.addClass(K(e,o),"mce-match-marker-selected"),e.selection.scrollIntoView(a[0]),o):-1},J=(e,t)=>{const n=t.parentNode;e.remove(t),n&&e.isEmpty(n)&&e.remove(n)},L=(e,t,n,r,o,s)=>{const a=e.selection,l=((e,t)=>{const n="("+e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&").replace(/\s/g,"[^\\S\\r\\n\\uFEFF]")+")";return t?`(?:^|\\s|${w()})`+n+`(?=$|\\s|${w()})`:n})(n,o),i=a.isForward(),c={regex:new RegExp(l,r?"g":"gi"),matchIndex:1},d=q(e,t,c,s);if(v.browser.isSafari()&&a.setRng(a.getRng(),i),d){const a=H(e,t,!0);t.set({index:a,count:d,text:n,matchCase:r,wholeWord:o,inSelection:s})}return d},Q=(e,t)=>{const n=H(e,t,!0);t.set({...t.get(),index:n})},X=(e,t)=>{const n=H(e,t,!1);t.set({...t.get(),index:n})},Y=e=>{const t=_(e);return null!==t&&t.length>0},Z=(e,t,n,r,o)=>{const s=t.get(),a=s.index;let l,i=a;r=!1!==r;const c=e.getBody(),d=C.grep(C.toArray(c.getElementsByTagName("span")),Y);for(let t=0;t<d.length;t++){const c=_(d[t]);let u=l=parseInt(c,10);if(o||u===s.index){for(n.length?(d[t].innerText=n,G(d[t])):J(e.dom,d[t]);d[++t];){if(u=parseInt(_(d[t]),10),u!==l){t--;break}J(e.dom,d[t])}r&&i--}else l>a&&d[t].setAttribute("data-mce-index",String(l-1))}return t.set({...s,count:o?0:s.count-1,index:i}),r?Q(e,t):X(e,t),!o&&t.get().count>0},ee=(e,t,n)=>{let r,o;const s=t.get(),a=C.toArray(e.getBody().getElementsByTagName("span"));for(let e=0;e<a.length;e++){const t=_(a[e]);null!==t&&t.length&&(t===s.index.toString()&&(r||(r=a[e].firstChild),o=a[e].firstChild),G(a[e]))}if(t.set({...s,index:-1,count:0,text:""}),r&&o){const t=e.dom.createRng();return t.setStart(r,0),t.setEnd(o,o.data.length),!1!==n&&e.selection.setRng(t),t}},te=(e,t)=>{const n=(()=>{const e=(e=>{const t=y(c.none()),n=()=>t.get().each(e);return{clear:()=>{n(),t.set(c.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{n(),t.set(c.some(e))}}})(a);return{...e,on:t=>e.get().each(t)}})();e.undoManager.add();const r=C.trim(e.selection.getContent({format:"text"})),o=e=>{e.setEnabled("next",((e,t)=>t.get().count>1)(0,t)),e.setEnabled("prev",((e,t)=>t.get().count>1)(0,t))},s=(e,t)=>{h(["replace","replaceall","prev","next"],(n=>e.setEnabled(n,!t)))},l=(e,t)=>{t.redial(p(e,t.getData()))},i=(e,t)=>{v.browser.isSafari()&&v.deviceType.isTouch()&&("find"===t||"replace"===t||"replaceall"===t)&&e.focus(t)},d=n=>{ee(e,t,!1),s(n,!0),o(n)},u=n=>{const r=n.getData(),a=t.get();if(r.findtext.length){if(a.text===r.findtext&&a.matchCase===r.matchcase&&a.wholeWord===r.wholewords)Q(e,t);else{const o=L(e,t,r.findtext,r.matchcase,r.wholewords,r.inselection);o<=0&&l(!0,n),s(n,0===o)}o(n)}else d(n)},m=t.get(),g={findtext:r,replacetext:"",wholewords:m.wholeWord,matchcase:m.matchCase,inselection:m.inSelection},f=e=>{const t=[{type:"label",label:"Find",for:"findtext",items:[{type:"bar",items:[{type:"input",name:"findtext",maximized:!0,inputMode:"search"},{type:"button",name:"prev",text:"Previous",icon:"action-prev",enabled:!1,borderless:!0},{type:"button",name:"next",text:"Next",icon:"action-next",enabled:!1,borderless:!0}]}]},{type:"input",name:"replacetext",label:"Replace with",inputMode:"search"}];return e&&t.push({type:"alertbanner",level:"error",text:"Could not find the specified string.",icon:"warning"}),t},p=(n,r)=>({title:"Find and Replace",size:"normal",body:{type:"panel",items:f(n)},buttons:[{type:"menu",name:"options",icon:"preferences",tooltip:"Preferences",align:"start",items:[{type:"togglemenuitem",name:"matchcase",text:"Match case"},{type:"togglemenuitem",name:"wholewords",text:"Find whole words only"},{type:"togglemenuitem",name:"inselection",text:"Find in selection"}]},{type:"custom",name:"find",text:"Find",primary:!0},{type:"custom",name:"replace",text:"Replace",enabled:!1},{type:"custom",name:"replaceall",text:"Replace all",enabled:!1}],initialData:r,onChange:(e,r)=>{n&&l(!1,e),"findtext"===r.name&&t.get().count>0&&d(e)},onAction:(n,r)=>{const s=n.getData();switch(r.name){case"find":u(n);break;case"replace":Z(e,t,s.replacetext)?o(n):d(n);break;case"replaceall":Z(e,t,s.replacetext,!0,!0),d(n);break;case"prev":X(e,t),o(n);break;case"next":Q(e,t),o(n);break;case"matchcase":case"wholewords":case"inselection":l(!1,n),(e=>{const n=e.getData(),r=t.get();t.set({...r,matchCase:n.matchcase,wholeWord:n.wholewords,inSelection:n.inselection})})(n),d(n)}i(n,r.name)},onSubmit:e=>{u(e),i(e,"find")},onClose:()=>{e.focus(),ee(e,t),e.undoManager.add()}});n.set(e.windowManager.open(p(!1,g),{inline:"toolbar"}))},ne=(e,t)=>()=>{te(e,t)};b.add("searchreplace",(e=>{const t=y({index:-1,count:0,text:"",matchCase:!1,wholeWord:!1,inSelection:!1});return((e,t)=>{e.addCommand("SearchReplace",(()=>{te(e,t)}))})(e,t),((e,t)=>{e.ui.registry.addMenuItem("searchreplace",{text:"Find and replace...",shortcut:"Meta+F",onAction:ne(e,t),icon:"search"}),e.ui.registry.addButton("searchreplace",{tooltip:"Find and replace",onAction:ne(e,t),icon:"search",shortcut:"Meta+F"}),e.shortcuts.add("Meta+F","",ne(e,t))})(e,t),((e,t)=>({done:n=>ee(e,t,n),find:(n,r,o,s=!1)=>L(e,t,n,r,o,s),next:()=>Q(e,t),prev:()=>X(e,t),replace:(n,r,o)=>Z(e,t,n,r,o)}))(e,t)}))}();
@@ -1,5 +1,5 @@
1
1
  /**
2
- * TinyMCE version 8.1.2 (TBD)
2
+ * TinyMCE version 8.2.0 (2025-10-23)
3
3
  */
4
4
 
5
5
  (function () {
@@ -9,13 +9,12 @@
9
9
 
10
10
  /* eslint-disable @typescript-eslint/no-wrapper-object-types */
11
11
  const hasProto = (v, constructor, predicate) => {
12
- var _a;
13
12
  if (predicate(v, constructor.prototype)) {
14
13
  return true;
15
14
  }
16
15
  else {
17
16
  // String-based fallback time
18
- return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;
17
+ return v.constructor?.name === constructor.name;
19
18
  }
20
19
  };
21
20
  const typeOf = (x) => {
@@ -87,6 +86,11 @@
87
86
  * strict-null-checks
88
87
  */
89
88
  class Optional {
89
+ tag;
90
+ value;
91
+ // Sneaky optimisation: every instance of Optional.none is identical, so just
92
+ // reuse the same object
93
+ static singletonNone = new Optional(false);
90
94
  // The internal representation has a `tag` and a `value`, but both are
91
95
  // private: able to be console.logged, but not able to be accessed by code
92
96
  constructor(tag, value) {
@@ -254,7 +258,7 @@
254
258
  */
255
259
  getOrDie(message) {
256
260
  if (!this.tag) {
257
- throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');
261
+ throw new Error(message ?? 'Called getOrDie on None');
258
262
  }
259
263
  else {
260
264
  return this.value;
@@ -318,9 +322,6 @@
318
322
  return this.tag ? `some(${this.value})` : 'none()';
319
323
  }
320
324
  }
321
- // Sneaky optimisation: every instance of Optional.none is identical, so just
322
- // reuse the same object
323
- Optional.singletonNone = new Optional(false);
324
325
 
325
326
  const nativeSlice = Array.prototype.slice;
326
327
  const nativeIndexOf = Array.prototype.indexOf;
@@ -2015,10 +2016,9 @@
2015
2016
  // Note: This is also contained in the core Options.ts file
2016
2017
  const defaultWidth = '100%';
2017
2018
  const getPixelForcedWidth = (editor) => {
2018
- var _a;
2019
2019
  // Determine the inner size of the parent block element where the table will be inserted
2020
2020
  const dom = editor.dom;
2021
- const parentBlock = (_a = dom.getParent(editor.selection.getStart(), dom.isBlock)) !== null && _a !== void 0 ? _a : editor.getBody();
2021
+ const parentBlock = dom.getParent(editor.selection.getStart(), dom.isBlock) ?? editor.getBody();
2022
2022
  return getInner(SugarElement.fromDom(parentBlock)) + 'px';
2023
2023
  };
2024
2024
  // Note: This is also contained in the core Options.ts file
@@ -2650,8 +2650,8 @@
2650
2650
  return {
2651
2651
  width: dom.getStyle(elm, 'width') || dom.getAttrib(elm, 'width'),
2652
2652
  height: dom.getStyle(elm, 'height') || dom.getAttrib(elm, 'height'),
2653
- cellspacing: cellspacing !== null && cellspacing !== void 0 ? cellspacing : '',
2654
- cellpadding: cellpadding !== null && cellpadding !== void 0 ? cellpadding : '',
2653
+ cellspacing: cellspacing ?? '',
2654
+ cellpadding: cellpadding ?? '',
2655
2655
  border: getBorder(dom, elm),
2656
2656
  caption: !!dom.select('caption', elm)[0],
2657
2657
  class: dom.getAttrib(elm, 'class', ''),
@@ -3432,8 +3432,7 @@
3432
3432
  const tableTypeRow = tableTypeBase + 'rows';
3433
3433
  const tableTypeColumn = tableTypeBase + 'columns';
3434
3434
  const getData = (type) => {
3435
- var _a;
3436
- const items = (_a = global.read()) !== null && _a !== void 0 ? _a : [];
3435
+ const items = global.read() ?? [];
3437
3436
  return findMap(items, (item) => Optional.from(item.getType(type)));
3438
3437
  };
3439
3438
  const getRows = () => getData(tableTypeRow);