@editora/plugins 1.0.16 → 1.0.18

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 (109) hide show
  1. package/dist/CodePlugin.native-Bwf25lLX.js +460 -0
  2. package/dist/CodePlugin.native-Cpp4u3Jl.mjs +648 -0
  3. package/dist/a11y-checker.cjs.js +16 -16
  4. package/dist/a11y-checker.esm.js +79 -75
  5. package/dist/anchor.cjs.js +9 -9
  6. package/dist/anchor.esm.js +61 -60
  7. package/dist/anchoredPopover-Bg-ey7Yo.js +1 -0
  8. package/dist/anchoredPopover-D_JbjvdA.mjs +111 -0
  9. package/dist/approval-workflow.cjs.js +5 -5
  10. package/dist/approval-workflow.esm.js +105 -104
  11. package/dist/background-color.cjs.js +1 -1
  12. package/dist/background-color.esm.js +1 -1
  13. package/dist/blocks-library.cjs.js +6 -6
  14. package/dist/blocks-library.esm.js +226 -202
  15. package/dist/capitalization.cjs.js +1 -1
  16. package/dist/capitalization.esm.js +9 -4
  17. package/dist/checklist.cjs.js +1 -1
  18. package/dist/checklist.esm.js +154 -116
  19. package/dist/citations.cjs.js +43 -18
  20. package/dist/citations.esm.js +465 -446
  21. package/dist/clear-formatting.cjs.js +1 -1
  22. package/dist/clear-formatting.esm.js +21 -20
  23. package/dist/code-sample.cjs.js +85 -66
  24. package/dist/code-sample.esm.js +301 -190
  25. package/dist/code.cjs.js +1 -669
  26. package/dist/code.esm.js +2 -4560
  27. package/dist/collaboration.cjs.js +68 -0
  28. package/dist/collaboration.esm.js +7428 -0
  29. package/dist/comments.cjs.js +11 -11
  30. package/dist/comments.esm.js +284 -237
  31. package/dist/conditional-content.cjs.js +67 -60
  32. package/dist/conditional-content.esm.js +270 -220
  33. package/dist/data-binding.cjs.js +3 -3
  34. package/dist/data-binding.esm.js +28 -27
  35. package/dist/dialogHelpers-5d5BuOCW.mjs +39 -0
  36. package/dist/dialogHelpers-zU6zpMIA.js +12 -0
  37. package/dist/document-manager.cjs.js +1 -1
  38. package/dist/document-manager.esm.js +1 -1
  39. package/dist/{documentManager-Jf0RbSks.js → documentManager-BDz6tovy.js} +2 -2
  40. package/dist/{documentManager-CTqRftU8.mjs → documentManager-yjRBab4v.mjs} +3 -3
  41. package/dist/embed-iframe.cjs.js +37 -17
  42. package/dist/embed-iframe.esm.js +188 -143
  43. package/dist/emojis.cjs.js +13 -10
  44. package/dist/emojis.esm.js +288 -76
  45. package/dist/enterprise.cjs.js +1 -1
  46. package/dist/enterprise.esm.js +9 -7
  47. package/dist/escapeHtml-D2Zh82pD.js +1 -0
  48. package/dist/escapeHtml-DyksyvcZ.mjs +6 -0
  49. package/dist/font-family.cjs.js +1 -1
  50. package/dist/font-family.esm.js +48 -41
  51. package/dist/font-size.cjs.js +1 -1
  52. package/dist/font-size.esm.js +67 -60
  53. package/dist/format-painter.cjs.js +1 -1
  54. package/dist/format-painter.esm.js +2 -1
  55. package/dist/history.cjs.js +1 -1
  56. package/dist/history.esm.js +40 -36
  57. package/dist/historyHelpers-BEKwNOtA.mjs +14 -0
  58. package/dist/historyHelpers-Cu8Pk7m1.js +1 -0
  59. package/dist/index-Bm1eqYHh.mjs +194 -0
  60. package/dist/index-CoflqYuK.js +30 -0
  61. package/dist/index-CxhJLMPS.js +221 -0
  62. package/dist/{index-D3CycEFU.mjs → index-Di1ZqIDs.mjs} +6420 -6232
  63. package/dist/index.cjs.js +1 -1
  64. package/dist/{index.es-DQ78mYYo.mjs → index.es-B7pVaNEV.mjs} +1558 -1542
  65. package/dist/{index.es-CE_A4QSm.js → index.es-I9N4o4Iq.js} +5 -5
  66. package/dist/index.esm.js +17 -15
  67. package/dist/{jspdf.es.min-BoS80556.js → jspdf.es.min-B5Idu0Wl.js} +2 -2
  68. package/dist/{jspdf.es.min-DQCoX5yh.mjs → jspdf.es.min-BCzHIwvz.mjs} +3 -2
  69. package/dist/link.cjs.js +17 -13
  70. package/dist/link.esm.js +138 -69
  71. package/dist/list.cjs.js +1 -1
  72. package/dist/list.esm.js +66 -33
  73. package/dist/math.cjs.js +22 -22
  74. package/dist/math.esm.js +221 -126
  75. package/dist/media-manager.cjs.js +12 -12
  76. package/dist/media-manager.esm.js +55 -50
  77. package/dist/mentions.cjs.js +2 -2
  78. package/dist/mentions.esm.js +17 -12
  79. package/dist/merge-tag.cjs.js +2 -2
  80. package/dist/merge-tag.esm.js +43 -42
  81. package/dist/plugins.css +1 -1
  82. package/dist/preview.cjs.js +3 -3
  83. package/dist/preview.esm.js +30 -27
  84. package/dist/{purify.es-T2a3nLiC.js → purify.es-DWpzYfqy.js} +1 -1
  85. package/dist/{purify.es-DHhaBdbu.mjs → purify.es-Dewe88eZ.mjs} +2 -2
  86. package/dist/slash-commands.cjs.js +13 -7
  87. package/dist/slash-commands.esm.js +90 -79
  88. package/dist/smart-paste.cjs.js +5 -5
  89. package/dist/smart-paste.esm.js +85 -81
  90. package/dist/special-characters.cjs.js +6 -3
  91. package/dist/special-characters.esm.js +72 -25
  92. package/dist/spell-check.cjs.js +8 -8
  93. package/dist/spell-check.esm.js +10189 -295
  94. package/dist/table.cjs.js +166 -13
  95. package/dist/table.esm.js +543 -266
  96. package/dist/template.cjs.js +11 -11
  97. package/dist/template.esm.js +290 -264
  98. package/dist/text-color.cjs.js +1 -1
  99. package/dist/text-color.esm.js +1 -1
  100. package/dist/translation-workflow.cjs.js +4 -4
  101. package/dist/translation-workflow.esm.js +33 -31
  102. package/dist/version-diff.cjs.js +6 -6
  103. package/dist/version-diff.esm.js +40 -40
  104. package/package.json +10 -4
  105. package/dist/anchoredPopover-BzqGPOAE.js +0 -1
  106. package/dist/anchoredPopover-Dts0IrgU.mjs +0 -106
  107. package/dist/index-BFsKNTTj.mjs +0 -145
  108. package/dist/index-CvJk4DKa.js +0 -221
  109. package/dist/index-tqLTHcO6.js +0 -1
@@ -1,4 +1,4 @@
1
- const y = ".rte-content, .editora-content", ee = "[data-editora-editor], .rte-editor, .editora-editor, editora-editor", le = "__editoraCommandEditorRoot", ie = "rte-smart-paste-styles", u = "rte-smart-paste-panel", h = "smart-paste", S = "smartPaste", E = ':is([data-theme="dark"], .dark, .editora-theme-dark, .rte-theme-dark)', ke = typeof NodeFilter < "u" ? NodeFilter.SHOW_COMMENT : 128, ce = "__editoraSmartPasteHandled", Ce = /* @__PURE__ */ new Set([
1
+ const y = ".rte-content, .editora-content", ee = "[data-editora-editor], .rte-editor, .editora-editor, editora-editor", le = "__editoraCommandEditorRoot", ie = "rte-smart-paste-styles", u = "rte-smart-paste-panel", h = "smart-paste", S = "smartPaste", E = ':is([data-theme="dark"], .dark, .editora-theme-dark, .rte-theme-dark)', ke = typeof NodeFilter < "u" ? NodeFilter.SHOW_COMMENT : 128, ce = "__editoraSmartPasteHandled", Te = /* @__PURE__ */ new Set([
2
2
  "script",
3
3
  "style",
4
4
  "meta",
@@ -15,7 +15,7 @@ const y = ".rte-content, .editora-content", ee = "[data-editora-editor], .rte-ed
15
15
  "textarea",
16
16
  "select",
17
17
  "option"
18
- ]), Te = /* @__PURE__ */ new Set(["table", "thead", "tbody", "tfoot", "tr", "td", "th", "colgroup", "col"]), Ae = /* @__PURE__ */ new Set(["span", "font"]), Pe = /^(https?:|mailto:|tel:|#|\/)/i, we = /^data:image\/(?:png|gif|jpeg|jpg|webp);base64,/i, Le = /* @__PURE__ */ new Set([
18
+ ]), Ce = /* @__PURE__ */ new Set(["table", "thead", "tbody", "tfoot", "tr", "td", "th", "colgroup", "col"]), Ae = /* @__PURE__ */ new Set(["span", "font"]), Pe = /^(https?:|mailto:|tel:|#|\/)/i, we = /^data:image\/(?:png|gif|jpeg|jpg|webp);base64,/i, Le = /* @__PURE__ */ new Set([
19
19
  "color",
20
20
  "background-color",
21
21
  "font-weight",
@@ -87,8 +87,8 @@ const y = ".rte-content, .editora-content", ee = "[data-editora-editor], .rte-ed
87
87
  keepDataAttributes: !1,
88
88
  preserveTables: !1
89
89
  }
90
- }, d = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), g = /* @__PURE__ */ new Map(), q = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new Set();
91
- let I = 0, Me = 0, $ = null, m = null, A = null, P = null, T = null, w = null;
90
+ }, d = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), g = /* @__PURE__ */ new Map(), q = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), _ = /* @__PURE__ */ new Set();
91
+ let I = 0, Me = 0, $ = null, m = null, A = null, P = null, C = null, w = null;
92
92
  function X(e) {
93
93
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
94
94
  }
@@ -96,7 +96,7 @@ function Oe(e) {
96
96
  return e.replace(/\u00A0/g, " ").replace(/\r\n?/g, `
97
97
  `);
98
98
  }
99
- function _(e) {
99
+ function z(e) {
100
100
  return e === "balanced" || e === "plain" ? e : "fidelity";
101
101
  }
102
102
  function Z(e, t) {
@@ -111,7 +111,7 @@ function K(e = {}) {
111
111
  const t = e.profileOptions || {};
112
112
  return {
113
113
  enabled: e.enabled !== !1,
114
- defaultProfile: _(e.defaultProfile),
114
+ defaultProfile: z(e.defaultProfile),
115
115
  maxHtmlLength: Math.max(8e3, Math.min(8e5, Number(e.maxHtmlLength ?? 22e4))),
116
116
  removeComments: e.removeComments !== !1,
117
117
  normalizeWhitespace: e.normalizeWhitespace !== !1,
@@ -167,7 +167,7 @@ function Re() {
167
167
  const r = e.closest(y);
168
168
  return r instanceof HTMLElement ? r : null;
169
169
  }
170
- function ze(e) {
170
+ function _e(e) {
171
171
  const t = e.closest("[data-editora-editor]");
172
172
  if (t && H(t) === e)
173
173
  return t;
@@ -182,7 +182,7 @@ function ze(e) {
182
182
  function me(e) {
183
183
  return e ? e.nodeType === Node.ELEMENT_NODE ? e : e.parentElement : null;
184
184
  }
185
- function C(e, t = !0, a = !0) {
185
+ function T(e, t = !0, a = !0) {
186
186
  if (V(), e?.contentElement instanceof HTMLElement) return e.contentElement;
187
187
  if (e?.editorElement instanceof HTMLElement) {
188
188
  const s = H(e.editorElement);
@@ -207,7 +207,7 @@ function C(e, t = !0, a = !0) {
207
207
  }
208
208
  return t ? document.querySelector(y) : null;
209
209
  }
210
- function _e(e) {
210
+ function ze(e) {
211
211
  const t = e.target;
212
212
  if (t) {
213
213
  const r = t.closest(y);
@@ -235,8 +235,8 @@ function F(e, t) {
235
235
  function ue(e) {
236
236
  return e.getAttribute("contenteditable") === "false" || e.getAttribute("data-readonly") === "true";
237
237
  }
238
- function D(e, t, a) {
239
- const r = ze(e);
238
+ function N(e, t, a) {
239
+ const r = _e(e);
240
240
  Array.from(
241
241
  r.querySelectorAll(
242
242
  `.rte-toolbar-button[data-command="${t}"], .editora-toolbar-button[data-command="${t}"]`
@@ -252,21 +252,21 @@ function p(e, t) {
252
252
  enabled: t.enabled,
253
253
  profile: t.defaultProfile,
254
254
  lastReport: null
255
- }, L.set(e, a)), et(e), z.add(e), a;
255
+ }, L.set(e, a)), rt(e), _.add(e), a;
256
256
  }
257
257
  function be(e) {
258
258
  const t = j.get(e);
259
259
  t && (e.removeEventListener("paste", t, !0), j.delete(e));
260
260
  }
261
261
  function ge(e) {
262
- be(e), g.get(e)?.remove(), g.delete(e), q.delete(e), d.delete(e), L.delete(e), z.delete(e), m === e && (m = null);
262
+ be(e), g.get(e)?.remove(), g.delete(e), q.delete(e), d.delete(e), L.delete(e), _.delete(e), m === e && (m = null);
263
263
  }
264
264
  function V() {
265
- Array.from(z).forEach((t) => {
265
+ Array.from(_).forEach((t) => {
266
266
  t.isConnected || ge(t);
267
267
  });
268
268
  }
269
- function De(e) {
269
+ function Ne(e) {
270
270
  for (let t = 0; t < e.length; t += 1) {
271
271
  const a = e[t];
272
272
  if (!(a.type !== "childList" || a.removedNodes.length === 0))
@@ -295,14 +295,14 @@ function J(e, t) {
295
295
 
296
296
  `).trim() : a;
297
297
  }
298
- function Ne(e) {
298
+ function De(e) {
299
299
  return /class=["'][^"']*Mso|xmlns:w=|urn:schemas-microsoft-com:office|<o:p\b/i.test(e);
300
300
  }
301
301
  function qe(e) {
302
302
  return /id=["']docs-internal-guid|docs-\w+|data-sheets-value|data-sheets-userformat/i.test(e);
303
303
  }
304
304
  function Ie(e, t) {
305
- return e ? Ne(e) ? "word" : qe(e) ? "google-docs" : "html" : t ? "plain" : "html";
305
+ return e ? De(e) ? "word" : qe(e) ? "google-docs" : "html" : t ? "plain" : "html";
306
306
  }
307
307
  function Be(e) {
308
308
  return e.split(/\s+/).map((a) => a.trim()).filter(Boolean).filter((a) => !/^mso/i.test(a)).filter((a) => !/^docs-/i.test(a)).filter((a) => !/^c\d+$/i.test(a)).join(" ");
@@ -350,11 +350,11 @@ function pe(e) {
350
350
  }
351
351
  function Ke(e, t, a, r) {
352
352
  const n = e.tagName.toLowerCase();
353
- if (Ce.has(n)) {
353
+ if (Te.has(n)) {
354
354
  r.removedElements += 1, e.remove();
355
355
  return;
356
356
  }
357
- if (!t.preserveTables && Te.has(n)) {
357
+ if (!t.preserveTables && Ce.has(n)) {
358
358
  const s = e.textContent || "", l = document.createTextNode(s);
359
359
  e.replaceWith(l), r.removedElements += 1;
360
360
  return;
@@ -434,9 +434,13 @@ function Ke(e, t, a, r) {
434
434
  !s && l && (pe(e), r.removedElements += 1);
435
435
  }
436
436
  }
437
- function Ve(e, t, a, r, n) {
437
+ const Ve = /\son\w+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]*)/gi;
438
+ function je(e) {
439
+ return e.replace(Ve, "");
440
+ }
441
+ function Fe(e, t, a, r, n) {
438
442
  const o = document.createElement("template");
439
- o.innerHTML = e;
443
+ o.innerHTML = je(e);
440
444
  const s = {
441
445
  removedElements: 0,
442
446
  removedAttributes: 0,
@@ -455,7 +459,7 @@ function Ve(e, t, a, r, n) {
455
459
  } catch {
456
460
  }
457
461
  Array.from(o.content.querySelectorAll("*")).forEach((f) => {
458
- f.isConnected && Ke(f, t, a, s);
462
+ o.content.contains(f) && Ke(f, t, a, s);
459
463
  });
460
464
  let i = o.innerHTML;
461
465
  r.normalizeWhitespace && n !== "fidelity" ? i = i.replace(/\s{2,}/g, " ").replace(/>\s+</g, "><").trim() : r.normalizeWhitespace && (i = i.trim());
@@ -477,7 +481,7 @@ function ye(e, t) {
477
481
  const a = window.getSelection();
478
482
  a && (a.removeAllRanges(), a.addRange(t));
479
483
  }
480
- function je(e, t) {
484
+ function Ge(e, t) {
481
485
  e.focus({ preventScroll: !0 });
482
486
  try {
483
487
  if (document.execCommand("insertHTML", !1, t))
@@ -496,7 +500,7 @@ function je(e, t) {
496
500
  }
497
501
  return !0;
498
502
  }
499
- function Fe(e, t) {
503
+ function Ue(e, t) {
500
504
  e.focus({ preventScroll: !0 });
501
505
  try {
502
506
  if (document.execCommand("insertText", !1, t))
@@ -511,7 +515,7 @@ function Fe(e, t) {
511
515
  const n = document.createRange();
512
516
  return n.setStart(r, r.length), n.collapse(!0), ye(e, n), !0;
513
517
  }
514
- function Ge(e, t) {
518
+ function Ye(e, t) {
515
519
  if (t === e.innerHTML) return;
516
520
  const a = window.execEditorCommand || window.executeEditorCommand;
517
521
  if (typeof a == "function")
@@ -520,7 +524,7 @@ function Ge(e, t) {
520
524
  } catch {
521
525
  }
522
526
  }
523
- function Ue(e) {
527
+ function Xe(e) {
524
528
  e.dispatchEvent(new Event("input", { bubbles: !0 }));
525
529
  }
526
530
  function W(e, t, a, r, n, o) {
@@ -537,7 +541,7 @@ function W(e, t, a, r, n, o) {
537
541
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
538
542
  };
539
543
  }
540
- function Ye(e, t, a, r) {
544
+ function Ze(e, t, a, r) {
541
545
  const n = Ie(e, t);
542
546
  if (a === "plain") {
543
547
  const l = t || e.replace(/<[^>]*>/g, " "), i = J(l, r);
@@ -579,7 +583,7 @@ function Ye(e, t, a, r) {
579
583
  )
580
584
  };
581
585
  }
582
- const o = r.profileOptions[a], s = Ve(e, o, n, r, a);
586
+ const o = r.profileOptions[a], s = Fe(e, o, n, r, a);
583
587
  if (!s.html) {
584
588
  const l = J(t || e.replace(/<[^>]*>/g, " "), r);
585
589
  return {
@@ -607,7 +611,7 @@ function G(e, t) {
607
611
  function ae(e) {
608
612
  return e === "fidelity" ? "balanced" : e === "balanced" ? "plain" : "fidelity";
609
613
  }
610
- function Xe(e, t) {
614
+ function Je(e, t) {
611
615
  e.setAttribute("aria-label", t.labels.panelAriaLabel);
612
616
  const a = e.querySelector(".rte-smart-paste-title");
613
617
  a && (a.textContent = t.labels.panelTitle);
@@ -648,14 +652,14 @@ function Xe(e, t) {
648
652
  function x(e) {
649
653
  const t = g.get(e), a = d.get(e) || $, r = L.get(e);
650
654
  if (!t || !a || !r) return;
651
- Xe(t, a);
655
+ Je(t, a);
652
656
  const n = t.querySelector(".rte-smart-paste-status");
653
657
  n && (n.textContent = r.enabled ? a.labels.enabledText : a.labels.disabledText);
654
658
  const o = t.querySelector('[data-action="toggle-enabled"]');
655
659
  o && (o.setAttribute("data-enabled", r.enabled ? "true" : "false"), o.textContent = r.enabled ? a.labels.toggleOnText : a.labels.toggleOffText, o.setAttribute("aria-pressed", r.enabled ? "true" : "false")), Array.from(
656
660
  t.querySelectorAll('[data-action="set-profile"][data-profile]')
657
661
  ).forEach((v) => {
658
- const M = _(v.getAttribute("data-profile")) === r.profile;
662
+ const M = z(v.getAttribute("data-profile")) === r.profile;
659
663
  v.classList.toggle("active", M), v.setAttribute("aria-pressed", M ? "true" : "false");
660
664
  });
661
665
  const l = t.querySelector(".rte-smart-paste-empty"), i = t.querySelector(".rte-smart-paste-report"), c = t.querySelector('[data-key="source-value"]'), f = t.querySelector('[data-key="profile-value"]'), b = t.querySelector('[data-key="removed-value"]'), k = t.querySelector('[data-key="chars-value"]');
@@ -674,11 +678,11 @@ function Q(e, t) {
674
678
  const a = te(e).getBoundingClientRect(), r = Math.min(window.innerWidth - 20, 360), n = Math.max(10, window.innerWidth - r - 10), o = Math.min(Math.max(10, a.right - r), n), s = Math.max(10, Math.min(window.innerHeight - 10, a.top + 12));
675
679
  t.style.width = `${r}px`, t.style.left = `${o}px`, t.style.top = `${s}px`, t.style.maxHeight = `${Math.max(240, window.innerHeight - 20)}px`;
676
680
  }
677
- function N(e, t = !1) {
681
+ function D(e, t = !1) {
678
682
  const a = g.get(e);
679
- a && (a.classList.remove("show"), q.set(e, !1), D(e, "toggleSmartPastePanel", !1), t && e.focus({ preventScroll: !0 }));
683
+ a && (a.classList.remove("show"), q.set(e, !1), N(e, "toggleSmartPastePanel", !1), t && e.focus({ preventScroll: !0 }));
680
684
  }
681
- function Ze(e) {
685
+ function Qe(e) {
682
686
  const t = g.get(e);
683
687
  if (t) return t;
684
688
  const a = d.get(e) || $ || K(), r = `rte-smart-paste-panel-${Me++}`, n = document.createElement("section");
@@ -720,12 +724,12 @@ function Ze(e) {
720
724
  const i = l.getAttribute("data-action");
721
725
  if (i) {
722
726
  if (i === "close") {
723
- N(e, !0);
727
+ D(e, !0);
724
728
  return;
725
729
  }
726
730
  if (i === "toggle-enabled") {
727
731
  const c = p(e, d.get(e) || a);
728
- c.enabled = !c.enabled, D(e, "toggleSmartPasteEnabled", c.enabled), x(e), O(n, c.enabled ? a.labels.enabledText : a.labels.disabledText);
732
+ c.enabled = !c.enabled, N(e, "toggleSmartPasteEnabled", c.enabled), x(e), O(n, c.enabled ? a.labels.enabledText : a.labels.disabledText);
729
733
  return;
730
734
  }
731
735
  if (i === "cycle-profile") {
@@ -735,12 +739,12 @@ function Ze(e) {
735
739
  }
736
740
  if (i === "set-profile") {
737
741
  const c = p(e, d.get(e) || a);
738
- c.profile = _(l.getAttribute("data-profile")), x(e), O(n, `${a.labels.profileLabel}: ${G(c.profile, a.labels)}`);
742
+ c.profile = z(l.getAttribute("data-profile")), x(e), O(n, `${a.labels.profileLabel}: ${G(c.profile, a.labels)}`);
739
743
  }
740
744
  }
741
745
  }), n.addEventListener("keydown", (o) => {
742
746
  if (o.key === "Escape") {
743
- o.preventDefault(), N(e, !0);
747
+ o.preventDefault(), D(e, !0);
744
748
  return;
745
749
  }
746
750
  if (o.key !== "ArrowRight" && o.key !== "ArrowLeft") return;
@@ -755,14 +759,14 @@ function Ze(e) {
755
759
  }), F(n, e), document.body.appendChild(n), g.set(e, n), q.set(e, !1), x(e), n;
756
760
  }
757
761
  function xe(e) {
758
- const t = Ze(e);
762
+ const t = Qe(e);
759
763
  g.forEach((r, n) => {
760
- n !== e && N(n, !1);
761
- }), t.classList.add("show"), q.set(e, !0), D(e, "toggleSmartPastePanel", !0), F(t, e), Q(e, t), t.querySelector('[data-action="toggle-enabled"]')?.focus();
764
+ n !== e && D(n, !1);
765
+ }), t.classList.add("show"), q.set(e, !0), N(e, "toggleSmartPastePanel", !0), F(t, e), Q(e, t), t.querySelector('[data-action="toggle-enabled"]')?.focus();
762
766
  }
763
767
  function ve(e, t) {
764
768
  const a = re(e);
765
- return (typeof t == "boolean" ? t : !a) ? xe(e) : N(e, !1), !0;
769
+ return (typeof t == "boolean" ? t : !a) ? xe(e) : D(e, !1), !0;
766
770
  }
767
771
  function Se(e) {
768
772
  return {
@@ -771,7 +775,7 @@ function Se(e) {
771
775
  lastReport: e.lastReport ? { ...e.lastReport } : null
772
776
  };
773
777
  }
774
- function Je(e, t) {
778
+ function et(e, t) {
775
779
  const a = d.get(e) || $;
776
780
  if (!a) return !1;
777
781
  const r = p(e, a);
@@ -783,11 +787,11 @@ function Je(e, t) {
783
787
  if (!n) return !1;
784
788
  const o = n.getData("text/html") || "", s = n.getData("text/plain") || "";
785
789
  if (!o && !s) return !1;
786
- const l = Ye(o, s, r.profile, a);
790
+ const l = Ze(o, s, r.profile, a);
787
791
  if (!l.value) return !1;
788
792
  const i = e.innerHTML;
789
- if (!(l.mode === "html" ? je(e, l.value) : Fe(e, l.value))) return !1;
790
- r.lastReport = { ...l.report }, L.set(e, r), Ge(e, i), Ue(e), e.dispatchEvent(
793
+ if (!(l.mode === "html" ? Ge(e, l.value) : Ue(e, l.value))) return !1;
794
+ r.lastReport = { ...l.report }, L.set(e, r), Ye(e, i), Xe(e), e.dispatchEvent(
791
795
  new CustomEvent("editora:smart-paste", {
792
796
  bubbles: !0,
793
797
  detail: Se(r)
@@ -803,36 +807,36 @@ function Je(e, t) {
803
807
  }
804
808
  return !0;
805
809
  }
806
- function Qe(e) {
810
+ function tt(e) {
807
811
  return (t) => {
808
- t.defaultPrevented || t[ce] === !0 || (m = e, !Je(e, t)) || (t[ce] = !0, t.preventDefault(), typeof t.stopImmediatePropagation == "function" ? t.stopImmediatePropagation() : t.stopPropagation());
812
+ t.defaultPrevented || t[ce] === !0 || (m = e, !et(e, t)) || (t[ce] = !0, t.preventDefault(), typeof t.stopImmediatePropagation == "function" ? t.stopImmediatePropagation() : t.stopPropagation());
809
813
  };
810
814
  }
811
- function et(e) {
815
+ function rt(e) {
812
816
  if (j.has(e)) return;
813
- const t = Qe(e);
817
+ const t = tt(e);
814
818
  e.addEventListener("paste", t, !0), j.set(e, t);
815
819
  }
816
820
  function R(e) {
817
821
  const t = L.get(e);
818
- D(e, "toggleSmartPastePanel", re(e)), D(e, "toggleSmartPasteEnabled", t?.enabled === !0);
822
+ N(e, "toggleSmartPastePanel", re(e)), N(e, "toggleSmartPasteEnabled", t?.enabled === !0);
819
823
  }
820
824
  function oe(e) {
821
825
  return typeof e.key == "string" ? e.key.toLowerCase() : "";
822
826
  }
823
- function tt(e) {
827
+ function at(e) {
824
828
  const t = oe(e);
825
829
  return (e.metaKey || e.ctrlKey) && e.altKey && e.shiftKey && t === "s";
826
830
  }
827
- function rt(e) {
831
+ function ot(e) {
828
832
  const t = oe(e);
829
833
  return (e.metaKey || e.ctrlKey) && e.altKey && e.shiftKey && t === "v";
830
834
  }
831
- function at(e) {
835
+ function nt(e) {
832
836
  const t = oe(e);
833
837
  return (e.metaKey || e.ctrlKey) && e.altKey && e.shiftKey && t === "g";
834
838
  }
835
- function ot(e) {
839
+ function st(e) {
836
840
  $ = e, A || (A = (t) => {
837
841
  V();
838
842
  const r = t.target?.closest(y);
@@ -843,43 +847,43 @@ function ot(e) {
843
847
  o && (F(o, r), Q(r, o), x(r));
844
848
  }, document.addEventListener("focusin", A, !0)), P || (P = (t) => {
845
849
  if (t.defaultPrevented || t.target?.closest(`.${u} input, .${u} textarea, .${u} select`)) return;
846
- const r = _e(t);
850
+ const r = ze(t);
847
851
  if (!r) return;
848
852
  const n = d.get(r) || $ || e;
849
853
  if (p(r, n), d.set(r, n), m = r, t.key === "Escape" && re(r)) {
850
- t.preventDefault(), N(r, !0);
854
+ t.preventDefault(), D(r, !0);
851
855
  return;
852
856
  }
853
- if (tt(t)) {
857
+ if (at(t)) {
854
858
  t.preventDefault(), t.stopPropagation(), ve(r);
855
859
  return;
856
860
  }
857
- if (rt(t)) {
861
+ if (ot(t)) {
858
862
  t.preventDefault(), t.stopPropagation();
859
863
  const o = p(r, n);
860
864
  o.profile = ae(o.profile), x(r);
861
865
  return;
862
866
  }
863
- if (at(t)) {
867
+ if (nt(t)) {
864
868
  t.preventDefault(), t.stopPropagation();
865
869
  const o = p(r, n);
866
870
  o.enabled = !o.enabled, R(r), x(r);
867
871
  }
868
- }, document.addEventListener("keydown", P, !0)), T || (T = () => {
872
+ }, document.addEventListener("keydown", P, !0)), C || (C = () => {
869
873
  V(), g.forEach((t, a) => {
870
874
  !a.isConnected || !t.isConnected || (F(t, a), Q(a, t));
871
875
  });
872
- }, window.addEventListener("scroll", T, !0), window.addEventListener("resize", T)), !w && typeof MutationObserver < "u" && document.body && (w = new MutationObserver((t) => {
873
- De(t) && V();
876
+ }, window.addEventListener("scroll", C, !0), window.addEventListener("resize", C)), !w && typeof MutationObserver < "u" && document.body && (w = new MutationObserver((t) => {
877
+ Ne(t) && V();
874
878
  }), w.observe(document.body, {
875
879
  childList: !0,
876
880
  subtree: !0
877
881
  }));
878
882
  }
879
- function nt() {
880
- A && (document.removeEventListener("focusin", A, !0), A = null), P && (document.removeEventListener("keydown", P, !0), P = null), T && (window.removeEventListener("scroll", T, !0), window.removeEventListener("resize", T), T = null), w && (w.disconnect(), w = null), g.forEach((e) => e.remove()), g.clear(), z.forEach((e) => be(e)), z.clear(), $ = null, m = null;
883
+ function lt() {
884
+ A && (document.removeEventListener("focusin", A, !0), A = null), P && (document.removeEventListener("keydown", P, !0), P = null), C && (window.removeEventListener("scroll", C, !0), window.removeEventListener("resize", C), C = null), w && (w.disconnect(), w = null), g.forEach((e) => e.remove()), g.clear(), _.forEach((e) => be(e)), _.clear(), $ = null, m = null;
881
885
  }
882
- function st() {
886
+ function it() {
883
887
  if (typeof document > "u" || document.getElementById(ie)) return;
884
888
  const e = document.createElement("style");
885
889
  e.id = ie, e.textContent = `
@@ -1244,9 +1248,9 @@ function st() {
1244
1248
  }
1245
1249
  `, document.head.appendChild(e);
1246
1250
  }
1247
- const lt = (e = {}) => {
1251
+ const ct = (e = {}) => {
1248
1252
  const t = K(e), a = /* @__PURE__ */ new Set();
1249
- return st(), {
1253
+ return it(), {
1250
1254
  name: "smartPaste",
1251
1255
  toolbar: [
1252
1256
  {
@@ -1281,37 +1285,37 @@ const lt = (e = {}) => {
1281
1285
  ],
1282
1286
  commands: {
1283
1287
  smartPaste: (r, n) => {
1284
- const o = C(n, !1, !1);
1288
+ const o = T(n, !1, !1);
1285
1289
  if (!o) return !1;
1286
1290
  const s = d.get(o) || t;
1287
1291
  return p(o, s), d.set(o, s), m = o, xe(o), !0;
1288
1292
  },
1289
1293
  toggleSmartPastePanel: (r, n) => {
1290
- const o = C(n, !1, !1);
1294
+ const o = T(n, !1, !1);
1291
1295
  if (!o) return !1;
1292
1296
  const s = d.get(o) || t;
1293
1297
  return p(o, s), d.set(o, s), m = o, ve(o, typeof r == "boolean" ? r : void 0);
1294
1298
  },
1295
1299
  cycleSmartPasteProfile: (r, n) => {
1296
- const o = C(n, !1, !1);
1300
+ const o = T(n, !1, !1);
1297
1301
  if (!o) return !1;
1298
1302
  const s = d.get(o) || t, l = p(o, s);
1299
1303
  return d.set(o, s), l.profile = ae(l.profile), x(o), !0;
1300
1304
  },
1301
1305
  setSmartPasteProfile: (r, n) => {
1302
- const o = C(n, !1, !1);
1306
+ const o = T(n, !1, !1);
1303
1307
  if (!o) return !1;
1304
1308
  const s = d.get(o) || t, l = p(o, s);
1305
- return d.set(o, s), l.profile = _(r), x(o), !0;
1309
+ return d.set(o, s), l.profile = z(r), x(o), !0;
1306
1310
  },
1307
1311
  toggleSmartPasteEnabled: (r, n) => {
1308
- const o = C(n, !1, !1);
1312
+ const o = T(n, !1, !1);
1309
1313
  if (!o) return !1;
1310
1314
  const s = d.get(o) || t, l = p(o, s);
1311
1315
  return d.set(o, s), l.enabled = typeof r == "boolean" ? r : !l.enabled, R(o), x(o), !0;
1312
1316
  },
1313
1317
  setSmartPasteOptions: (r, n) => {
1314
- const o = C(n, !1, !1);
1318
+ const o = T(n, !1, !1);
1315
1319
  if (!o || !r || typeof r != "object") return !1;
1316
1320
  const s = d.get(o) || t, l = de(s), i = K({
1317
1321
  ...l,
@@ -1340,10 +1344,10 @@ const lt = (e = {}) => {
1340
1344
  });
1341
1345
  d.set(o, i);
1342
1346
  const c = p(o, i);
1343
- return typeof r.enabled == "boolean" && (c.enabled = r.enabled), r.defaultProfile && (c.profile = _(r.defaultProfile)), x(o), R(o), !0;
1347
+ return typeof r.enabled == "boolean" && (c.enabled = r.enabled), r.defaultProfile && (c.profile = z(r.defaultProfile)), x(o), R(o), !0;
1344
1348
  },
1345
1349
  getSmartPasteState: (r, n) => {
1346
- const o = C(n, !1, !1);
1350
+ const o = T(n, !1, !1);
1347
1351
  if (!o) return !1;
1348
1352
  const s = d.get(o) || t, l = p(o, s), i = Se(l);
1349
1353
  if (typeof r == "function")
@@ -1370,8 +1374,8 @@ const lt = (e = {}) => {
1370
1374
  init: function(n) {
1371
1375
  I += 1;
1372
1376
  const o = this && typeof this.__pluginConfig == "object" ? K({ ...de(t), ...this.__pluginConfig }) : t;
1373
- ot(o);
1374
- const s = C(
1377
+ st(o);
1378
+ const s = T(
1375
1379
  n?.editorElement ? { editorElement: n.editorElement } : void 0,
1376
1380
  !1,
1377
1381
  !1
@@ -1382,10 +1386,10 @@ const lt = (e = {}) => {
1382
1386
  l.enabled = o.enabled, l.profile = o.defaultProfile, d.set(s, o), R(s);
1383
1387
  },
1384
1388
  destroy: () => {
1385
- a.forEach((r) => ge(r)), a.clear(), I = Math.max(0, I - 1), !(I > 0) && nt();
1389
+ a.forEach((r) => ge(r)), a.clear(), I = Math.max(0, I - 1), !(I > 0) && lt();
1386
1390
  }
1387
1391
  };
1388
1392
  };
1389
1393
  export {
1390
- lt as SmartPastePlugin
1394
+ ct as SmartPastePlugin
1391
1395
  };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f={all:{name:"All",characters:["€","£","¥","¢","₹","₽","₩","₿","₺","₴","₦","₨","₪","₫","₭","₮","₯","₰","₱","₲","₳","₴","₵","₶","₷","₹","₺","₼","₽","₾","₿",'"',"'","«","»","„","‟","‹","›","‚","‛","〝","〞","〟","‟","„","©","®","™","°","§","¶","†","‡","•","‣","⁃","‰","‱","′","″","‴","‵","‶","‷","※","‼","‽","‾","‿","⁀","⁁","⁂","⁃","⁇","⁈","⁉","+","-","×","÷","=","≠","≈","≡","≤","≥","<",">","±","∓","∴","∵","∶","∷","∸","∹","∺","∻","∼","∽","∾","∿","≀","≁","≂","≃","≄","≅","≆","≇","≈","≉","≊","≋","≌","≍","≎","≏","≐","≑","≒","≓","≔","≕","≖","≗","≘","≙","≚","≛","≜","≝","≞","≟","≠","≡","≢","≣","≤","≥","≦","≧","≨","≩","≪","≫","≬","≭","≮","≯","≰","≱","≲","≳","≴","≵","≶","≷","≸","≹","≺","≻","≼","≽","≾","≿","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù","ú","û","ü","ý","þ","ÿ","¡","¿","‽","‼","⁇","⁈","⁉","※","‾","‿","⁀","⁁","⁂","⁃","←","↑","→","↓","↔","↕","↖","↗","↘","↙","↚","↛","↜","↝","↞","↟","↠","↡","↢","↣","↤","↥","↦","↧","↨","↩","↪","↫","↬","↭","↮","↯","↰","↱","↲","↳","↴","↵","↶","↷","↸","↹","↺","↻","↼","↽","↾","↿","⇀","⇁","⇂","⇃","⇄","⇅","⇆","⇇","⇈","⇉","⇊","⇋","⇌","⇍","⇎","⇏","⇐","⇑","⇒","⇓","⇔","⇕","⇖","⇗","⇘","⇙","⇚","⇛","⇜","⇝","⇞","⇟","⇠","⇡","⇢","⇣","⇤","⇥","⇦","⇧","⇨","⇩","⇪","⇫","⇬","⇭","⇮","⇯","⇰","⇱","⇲","⇳","⇴","⇵","⇶","⇷","⇸","⇹","⇺","⇻","⇼","⇽","⇾","⇿"]},currency:{name:"Currency",characters:["€","£","¥","¢","₹","₽","₩","₿","₺","₴","₦","₨","₪","₫","₭","₮","₯","₰","₱","₲","₳","₵","₶","₷","₼","₾","₿"]},text:{name:"Text",characters:["©","®","™","°","§","¶","†","‡","•","‣","⁃","‰","‱","′","″","‴","‵","‶","‷","※","‼","‽","‾","‿","⁀","⁁","⁂"]},quotation:{name:"Quotation",characters:['"',"'","«","»","„","‟","‹","›","‚","‛","〝","〞","〟"]},mathematical:{name:"Mathematical",characters:["+","-","×","÷","=","≠","≈","≡","≤","≥","<",">","±","∓","∴","∵","∶","∷","∸","∹","∺","∻","∼","∽","∾","∿","≀","≁","≂","≃","≄","≅","≆","≇","≉","≊","≋","≌","≍","≎","≏","≐","≑","≒","≓","≔","≕","≖","≗","≘","≙","≚","≛","≜","≝","≞","≟","≢","≣","≦","≧","≨","≩","≪","≫","≬","≭","≮","≯","≰","≱","≲","≳","≴","≵","≶","≷","≸","≹","≺","≻","≼","≽","≾","≿"]},"extended-latin":{name:"Extended Latin",characters:["À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù","ú","û","ü","ý","þ","ÿ"]},symbols:{name:"Symbols",characters:["¡","¿","‽","‼","⁇","⁈","⁉","※","‾","‿","⁀","⁁","⁂","⁃"]},arrows:{name:"Arrows",characters:["←","↑","→","↓","↔","↕","↖","↗","↘","↙","↚","↛","↜","↝","↞","↟","↠","↡","↢","↣","↤","↥","↦","↧","↨","↩","↪","↫","↬","↭","↮","↯","↰","↱","↲","↳","↴","↵","↶","↷","↸","↹","↺","↻","↼","↽","↾","↿","⇀","⇁","⇂","⇃","⇄","⇅","⇆","⇇","⇈","⇉","⇊","⇋","⇌","⇍","⇎","⇏","⇐","⇑","⇒","⇓","⇔","⇕","⇖","⇗","⇘","⇙","⇚","⇛","⇜","⇝","⇞","⇟","⇠","⇡","⇢","⇣","⇤","⇥","⇦","⇧","⇨","⇩","⇪","⇫","⇬","⇭","⇮","⇯","⇰","⇱","⇲","⇳","⇴","⇵","⇶","⇷","⇸","⇹","⇺","⇻","⇼","⇽","⇾","⇿"]}},y={"€":"euro","£":"pound","¥":"yen","¢":"cent","₹":"rupee","₽":"ruble","₩":"won","₿":"bitcoin",'"':"quote","'":"apostrophe","«":"left angle quote","»":"right angle quote","„":"low quote","©":"copyright","®":"registered","™":"trademark","°":"degree","§":"section","¶":"paragraph","†":"dagger","‡":"double dagger","•":"bullet","‰":"per mille","′":"prime","″":"double prime","+":"plus","-":"minus","×":"multiplication","÷":"division","=":"equals","≠":"not equal","≈":"approximately","≡":"identical","≤":"less or equal","≥":"greater or equal","±":"plus minus",À:"a grave",Á:"a acute",Â:"a circumflex",Ã:"a tilde",Ä:"a diaeresis",Ç:"c cedilla","←":"left arrow","↑":"up arrow","→":"right arrow","↓":"down arrow","↔":"left right arrow"};let v=!1;const S='[data-theme="dark"], .dark, .editora-theme-dark',z=r=>r?r.nodeType===Node.ELEMENT_NODE?r:r.parentElement:null,b=()=>{const r=window.getSelection();return!r||r.rangeCount===0?null:z(r.getRangeAt(0).startContainer)?.closest('.rte-content, .editora-content, [contenteditable="true"]')||null},T=r=>{const e=window.getSelection();if(!e||e.rangeCount===0)return null;const a=e.getRangeAt(0);return!r.contains(a.startContainer)||!r.contains(a.endContainer)?null:a.cloneRange()},A=r=>{const e=document.createRange();return e.selectNodeContents(r),e.collapse(!1),e},L=(r,e,a)=>{if(e!==a){if(typeof window.execEditorCommand=="function"){window.execEditorCommand("recordDomTransaction",r,e,a);return}if(typeof window.executeEditorCommand=="function")try{window.executeEditorCommand("recordDomTransaction",{editor:r,beforeHTML:e,afterHTML:a})}catch{}}},q=r=>{const e=r||b();return e?!!e.closest(S):!1},N=()=>{if(typeof document>"u")return;const r="special-characters-plugin-styles";if(document.getElementById(r))return;const e=document.createElement("style");e.id=r,e.textContent=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const S=require("./dialogHelpers-zU6zpMIA.js"),f={all:{name:"All",characters:["€","£","¥","¢","₹","₽","₩","₿","₺","₴","₦","₨","₪","₫","₭","₮","₯","₰","₱","₲","₳","₴","₵","₶","₷","₹","₺","₼","₽","₾","₿",'"',"'","«","»","„","‟","‹","›","‚","‛","〝","〞","〟","‟","„","©","®","™","°","§","¶","†","‡","•","‣","⁃","‰","‱","′","″","‴","‵","‶","‷","※","‼","‽","‾","‿","⁀","⁁","⁂","⁃","⁇","⁈","⁉","—","–","…","·","+","-","×","÷","=","≠","≈","≡","≤","≥","<",">","±","∓","∴","∵","∶","∷","∸","∹","∺","∻","∼","∽","∾","∿","≀","≁","≂","≃","≄","≅","≆","≇","≈","≉","≊","≋","≌","≍","≎","≏","≐","≑","≒","≓","≔","≕","≖","≗","≘","≙","≚","≛","≜","≝","≞","≟","≠","≡","≢","≣","≤","≥","≦","≧","≨","≩","≪","≫","≬","≭","≮","≯","≰","≱","≲","≳","≴","≵","≶","≷","≸","≹","≺","≻","≼","≽","≾","≿","∞","√","¼","½","¾","¹","²","³","µ","¬","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù","ú","û","ü","ý","þ","ÿ","¡","¿","‽","‼","⁇","⁈","⁉","※","‾","‿","⁀","⁁","⁂","⁃","←","↑","→","↓","↔","↕","↖","↗","↘","↙","↚","↛","↜","↝","↞","↟","↠","↡","↢","↣","↤","↥","↦","↧","↨","↩","↪","↫","↬","↭","↮","↯","↰","↱","↲","↳","↴","↵","↶","↷","↸","↹","↺","↻","↼","↽","↾","↿","⇀","⇁","⇂","⇃","⇄","⇅","⇆","⇇","⇈","⇉","⇊","⇋","⇌","⇍","⇎","⇏","⇐","⇑","⇒","⇓","⇔","⇕","⇖","⇗","⇘","⇙","⇚","⇛","⇜","⇝","⇞","⇟","⇠","⇡","⇢","⇣","⇤","⇥","⇦","⇧","⇨","⇩","⇪","⇫","⇬","⇭","⇮","⇯","⇰","⇱","⇲","⇳","⇴","⇵","⇶","⇷","⇸","⇹","⇺","⇻","⇼","⇽","⇾","⇿"]},currency:{name:"Currency",characters:["€","£","¥","¢","₹","₽","₩","₿","₺","₴","₦","₨","₪","₫","₭","₮","₯","₰","₱","₲","₳","₵","₶","₷","₼","₾","₿"]},text:{name:"Text",characters:["©","®","™","°","§","¶","†","‡","•","‣","⁃","‰","‱","′","″","‴","‵","‶","‷","※","‼","‽","‾","‿","⁀","⁁","⁂","—","–","…","·"]},quotation:{name:"Quotation",characters:['"',"'","«","»","„","‟","‹","›","‚","‛","〝","〞","〟"]},mathematical:{name:"Mathematical",characters:["+","-","×","÷","=","≠","≈","≡","≤","≥","<",">","±","∓","∴","∵","∶","∷","∸","∹","∺","∻","∼","∽","∾","∿","≀","≁","≂","≃","≄","≅","≆","≇","≉","≊","≋","≌","≍","≎","≏","≐","≑","≒","≓","≔","≕","≖","≗","≘","≙","≚","≛","≜","≝","≞","≟","≢","≣","≦","≧","≨","≩","≪","≫","≬","≭","≮","≯","≰","≱","≲","≳","≴","≵","≶","≷","≸","≹","≺","≻","≼","≽","≾","≿","∞","√","¼","½","¾","¹","²","³","µ","¬"]},"extended-latin":{name:"Extended Latin",characters:["À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù","ú","û","ü","ý","þ","ÿ"]},symbols:{name:"Symbols",characters:["¡","¿","‽","‼","⁇","⁈","⁉","※","‾","‿","⁀","⁁","⁂","⁃"]},arrows:{name:"Arrows",characters:["←","↑","→","↓","↔","↕","↖","↗","↘","↙","↚","↛","↜","↝","↞","↟","↠","↡","↢","↣","↤","↥","↦","↧","↨","↩","↪","↫","↬","↭","↮","↯","↰","↱","↲","↳","↴","↵","↶","↷","↸","↹","↺","↻","↼","↽","↾","↿","⇀","⇁","⇂","⇃","⇄","⇅","⇆","⇇","⇈","⇉","⇊","⇋","⇌","⇍","⇎","⇏","⇐","⇑","⇒","⇓","⇔","⇕","⇖","⇗","⇘","⇙","⇚","⇛","⇜","⇝","⇞","⇟","⇠","⇡","⇢","⇣","⇤","⇥","⇦","⇧","⇨","⇩","⇪","⇫","⇬","⇭","⇮","⇯","⇰","⇱","⇲","⇳","⇴","⇵","⇶","⇷","⇸","⇹","⇺","⇻","⇼","⇽","⇾","⇿"]}},y={"€":"euro","£":"pound","¥":"yen","¢":"cent","₹":"rupee","₽":"ruble","₩":"won","₿":"bitcoin",'"':"quote","'":"apostrophe","«":"left angle quote","»":"right angle quote","©":"copyright","®":"registered","™":"trademark","°":"degree","§":"section","¶":"paragraph","†":"dagger","‡":"double dagger","•":"bullet","‰":"per mille","′":"prime","″":"double prime","+":"plus","-":"minus","×":"multiplication","÷":"division","=":"equals","≠":"not equal","≈":"approximately","≡":"identical","≤":"less or equal","≥":"greater or equal","±":"plus minus",À:"a grave",Á:"a acute",Â:"a circumflex",Ã:"a tilde",Ä:"a diaeresis",Ç:"c cedilla",È:"e grave",É:"e acute",Ê:"e circumflex",Ë:"e diaeresis",è:"e grave",é:"e acute",ê:"e circumflex",ë:"e diaeresis",Ñ:"n tilde",ñ:"n tilde",Ü:"u diaeresis",ü:"u diaeresis","←":"left arrow","↑":"up arrow","→":"right arrow","↓":"down arrow","↔":"left right arrow","—":"em dash","–":"en dash","…":"ellipsis","·":"middle dot","∞":"infinity","√":"square root","¼":"one quarter","½":"one half","¾":"three quarters","¹":"superscript one","²":"superscript two","³":"superscript three",µ:"micro sign","¬":"not sign","‹":"single left angle quote","›":"single right angle quote","„":"double low quote","‚":"single low quote"};let v=!1;const z='[data-theme="dark"], .dark, .editora-theme-dark',q=r=>r?r.nodeType===Node.ELEMENT_NODE?r:r.parentElement:null,b=()=>{const r=window.getSelection();return!r||r.rangeCount===0?null:q(r.getRangeAt(0).startContainer)?.closest('.rte-content, .editora-content, [contenteditable="true"]')||null},A=r=>{const e=window.getSelection();if(!e||e.rangeCount===0)return null;const a=e.getRangeAt(0);return!r.contains(a.startContainer)||!r.contains(a.endContainer)?null:a.cloneRange()},T=r=>{const e=document.createRange();return e.selectNodeContents(r),e.collapse(!1),e},L=(r,e,a)=>{if(e!==a){if(typeof window.execEditorCommand=="function"){window.execEditorCommand("recordDomTransaction",r,e,a);return}if(typeof window.executeEditorCommand=="function")try{window.executeEditorCommand("recordDomTransaction",{editor:r,beforeHTML:e,afterHTML:a})}catch{}}},N=r=>{const e=r||b();return e?!!e.closest(z):!1},D=()=>{if(typeof document>"u")return;const r="special-characters-plugin-styles";if(document.getElementById(r))return;const e=document.createElement("style");e.id=r,e.textContent=`
2
2
  .special-characters-overlay {
3
3
  --rte-sc-overlay-bg: rgba(15, 23, 36, 0.56);
4
4
  --rte-sc-dialog-bg: #ffffff;
@@ -244,6 +244,9 @@
244
244
  border-bottom: 1px solid var(--rte-sc-border);
245
245
  flex-direction: row;
246
246
  overflow-x: auto;
247
+ /* As a column-flex child with overflow set it would shrink below its
248
+ content height when the dialog is short, clipping the tab labels. */
249
+ flex-shrink: 0;
247
250
  }
248
251
 
249
252
  .special-characters-tab {
@@ -264,7 +267,7 @@
264
267
  font-size: 16px;
265
268
  }
266
269
  }
267
- `,document.head.appendChild(e)},D=(r,e,a)=>{const c=e||b();if(!c)return;const l=a&&c.contains(a.commonAncestorContainer)?a:A(c),d=c.innerHTML;l.deleteContents();const i=document.createTextNode(r);l.insertNode(i),l.setStartAfter(i),l.setEndAfter(i);const o=window.getSelection();o&&(o.removeAllRanges(),o.addRange(l));const h=c.innerHTML;L(c,d,h),c.dispatchEvent(new window.Event("input",{bubbles:!0})),c.focus()},R=r=>{if(typeof window>"u"||v)return;v=!0,N();const e=r||b(),a=e?T(e):null;let c="all",l="",d=null;const i=document.createElement("div");i.className="special-characters-overlay",q(r)&&i.classList.add("rte-ui-theme-dark");const o=document.createElement("div");o.className="special-characters-dialog",o.setAttribute("role","dialog"),o.setAttribute("aria-modal","true"),o.innerHTML=`
270
+ `,document.head.appendChild(e)},R=(r,e,a)=>{const c=e||b();if(!c)return;const l=a&&c.contains(a.commonAncestorContainer)?a:T(c),d=c.innerHTML;l.deleteContents();const i=document.createTextNode(r);l.insertNode(i),l.setStartAfter(i),l.setEndAfter(i);const o=window.getSelection();o&&(o.removeAllRanges(),o.addRange(l));const h=c.innerHTML;L(c,d,h),c.dispatchEvent(new window.Event("input",{bubbles:!0})),c.focus()},j=r=>{if(typeof window>"u"||v)return;v=!0,D();const e=r||b(),a=e?A(e):null;let c="all",l="",d=null;const i=document.createElement("div");S.initDialogOverlay(i),i.className="special-characters-overlay",N(r)&&i.classList.add("rte-ui-theme-dark");const o=document.createElement("div");o.className="special-characters-dialog",o.setAttribute("role","dialog"),o.setAttribute("aria-modal","true"),o.innerHTML=`
268
271
  <div class="special-characters-header">
269
272
  <h2>Insert Special Characters</h2>
270
273
  <button class="special-characters-close">×</button>
@@ -288,4 +291,4 @@
288
291
  <div class="special-characters-grid"></div>
289
292
  </div>
290
293
  </div>
291
- `;const h=o.querySelector(".special-characters-tabs"),u=o.querySelector(".special-characters-grid"),x=o.querySelector(".special-characters-search-input"),E=o.querySelector(".special-characters-close"),C=()=>f[c].characters.filter(t=>{if(!l.trim())return!0;const s=l.toLowerCase();return t.toLowerCase().includes(s)||(y[t]||"").toLowerCase().includes(s)}),w=()=>{h?.querySelectorAll(".special-characters-tab").forEach(t=>{t.classList.toggle("active",t.getAttribute("data-category")===c)})},m=()=>{if(!u)return;const t=C();if(u.textContent="",t.length===0){const s=document.createElement("div");s.className="special-characters-no-results",s.textContent=`No characters found for "${l}"`,u.appendChild(s);return}t.forEach(s=>{const n=document.createElement("button");n.type="button",n.className="special-characters-item",n.dataset.char=s,n.title=y[s]||s,n.textContent=s,u.appendChild(n)})},g=()=>{d!==null&&(window.clearTimeout(d),d=null),i.parentNode&&i.parentNode.removeChild(i),v=!1,document.removeEventListener("keydown",k,!0)},k=t=>{t.key==="Escape"&&(t.preventDefault(),t.stopPropagation(),g())};E?.addEventListener("click",g),h?.addEventListener("click",t=>{const n=t.target.closest(".special-characters-tab");if(!n)return;const p=n.getAttribute("data-category");!p||c===p||(c=p,w(),m())}),x?.addEventListener("input",t=>{l=t.target.value,d!==null&&window.clearTimeout(d),d=window.setTimeout(()=>{d=null,m()},90)}),u?.addEventListener("click",t=>{const n=t.target.closest(".special-characters-item");if(!n)return;const p=n.dataset.char;p&&(D(p,e,a),g())}),i.addEventListener("click",t=>{t.target===i&&g()}),document.addEventListener("keydown",k,!0),w(),m(),i.appendChild(o),document.body.appendChild(i),requestAnimationFrame(()=>x?.focus())},j=()=>({name:"specialCharacters",toolbar:[{label:"Special Characters",command:"insertSpecialCharacter",icon:'<svg width="24" height="24" focusable="false"><path d="M15 18h4l1-2v4h-6v-3.3l1.4-1a6 6 0 0 0 1.8-2.9 6.3 6.3 0 0 0-.1-4.1 5.8 5.8 0 0 0-3-3.2c-.6-.3-1.3-.5-2.1-.5a5.1 5.1 0 0 0-3.9 1.8 6.3 6.3 0 0 0-1.3 6 6.2 6.2 0 0 0 1.8 3l1.4.9V20H4v-4l1 2h4v-.5l-2-1L5.4 15A6.5 6.5 0 0 1 4 11c0-1 .2-1.9.6-2.7A7 7 0 0 1 6.3 6C7.1 5.4 8 5 9 4.5c1-.3 2-.5 3.1-.5a8.8 8.8 0 0 1 5.7 2 7 7 0 0 1 1.7 2.3 6 6 0 0 1 .2 4.8c-.2.7-.6 1.3-1 1.9a7.6 7.6 0 0 1-3.6 2.5v.5Z" fill-rule="evenodd"></path></svg>'}],commands:{insertSpecialCharacter:(r,e)=>{const a=e?.contentElement instanceof HTMLElement?e.contentElement:b();return R(a),!0}},keymap:{}});exports.SpecialCharactersPlugin=j;
294
+ `;const h=o.querySelector(".special-characters-tabs"),u=o.querySelector(".special-characters-grid"),x=o.querySelector(".special-characters-search-input"),E=o.querySelector(".special-characters-close"),C=()=>f[c].characters.filter(t=>{if(!l.trim())return!0;const s=l.toLowerCase();return t.toLowerCase().includes(s)||(y[t]||"").toLowerCase().includes(s)}),w=()=>{h?.querySelectorAll(".special-characters-tab").forEach(t=>{t.classList.toggle("active",t.getAttribute("data-category")===c)})},m=()=>{if(!u)return;const t=C();if(u.textContent="",t.length===0){const s=document.createElement("div");s.className="special-characters-no-results",s.textContent=`No characters found for "${l}"`,u.appendChild(s);return}t.forEach(s=>{const n=document.createElement("button");n.type="button",n.className="special-characters-item",n.dataset.char=s,n.title=y[s]||s,n.textContent=s,u.appendChild(n)})},g=()=>{d!==null&&(window.clearTimeout(d),d=null),i.parentNode&&i.parentNode.removeChild(i),v=!1,document.removeEventListener("keydown",k,!0)},k=t=>{t.key==="Escape"&&(t.preventDefault(),t.stopPropagation(),g())};E?.addEventListener("click",g),h?.addEventListener("click",t=>{const n=t.target.closest(".special-characters-tab");if(!n)return;const p=n.getAttribute("data-category");!p||c===p||(c=p,w(),m())}),x?.addEventListener("input",t=>{l=t.target.value,d!==null&&window.clearTimeout(d),d=window.setTimeout(()=>{d=null,m()},90)}),u?.addEventListener("click",t=>{const n=t.target.closest(".special-characters-item");if(!n)return;const p=n.dataset.char;p&&(R(p,e,a),g())}),i.addEventListener("click",t=>{t.target===i&&g()}),document.addEventListener("keydown",k,!0),w(),m(),i.appendChild(o),document.body.appendChild(i),requestAnimationFrame(()=>x?.focus())},M=()=>({name:"specialCharacters",toolbar:[{label:"Special Characters",command:"insertSpecialCharacter",icon:'<svg width="24" height="24" focusable="false"><path d="M15 18h4l1-2v4h-6v-3.3l1.4-1a6 6 0 0 0 1.8-2.9 6.3 6.3 0 0 0-.1-4.1 5.8 5.8 0 0 0-3-3.2c-.6-.3-1.3-.5-2.1-.5a5.1 5.1 0 0 0-3.9 1.8 6.3 6.3 0 0 0-1.3 6 6.2 6.2 0 0 0 1.8 3l1.4.9V20H4v-4l1 2h4v-.5l-2-1L5.4 15A6.5 6.5 0 0 1 4 11c0-1 .2-1.9.6-2.7A7 7 0 0 1 6.3 6C7.1 5.4 8 5 9 4.5c1-.3 2-.5 3.1-.5a8.8 8.8 0 0 1 5.7 2 7 7 0 0 1 1.7 2.3 6 6 0 0 1 .2 4.8c-.2.7-.6 1.3-1 1.9a7.6 7.6 0 0 1-3.6 2.5v.5Z" fill-rule="evenodd"></path></svg>'}],commands:{insertSpecialCharacter:(r,e)=>{const a=e?.contentElement instanceof HTMLElement?e.contentElement:b();return j(a),!0}},keymap:{}});exports.SpecialCharactersPlugin=M;