@editora/core 1.0.19 → 1.0.21

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 (28) hide show
  1. package/dist/{A11yCheckerPlugin.native-DIKuCeFw.mjs → A11yCheckerPlugin.native-qW_njhLY.mjs} +2 -2
  2. package/dist/{AnchorPlugin.native-DXZdK3zr.mjs → AnchorPlugin.native-Drmxhy98.mjs} +37 -37
  3. package/dist/{BlockquotePlugin.native-57_Xcjl1.mjs → BlockquotePlugin.native-D8jjGd0c.mjs} +19 -19
  4. package/dist/{CapitalizationPlugin.native-C-HRbXGh.mjs → CapitalizationPlugin.native-Mh-kUy-x.mjs} +17 -17
  5. package/dist/{ChecklistPlugin.native-NVrBUkaL.mjs → ChecklistPlugin.native-DLedNLsb.mjs} +31 -31
  6. package/dist/{CodePlugin.native-BcVqm5MS.mjs → CodePlugin.native-AoJ_idGz.mjs} +5 -5
  7. package/dist/{CodePlugin.native-Rgxx2Igx.mjs → CodePlugin.native-CEgR1DWC.mjs} +5 -5
  8. package/dist/{CollaborationPlugin.native-oSybCGPW.mjs → CollaborationPlugin.native-Bl3R9CRI.mjs} +1406 -1295
  9. package/dist/{CommentsPlugin.native-CLip9wAO.mjs → CommentsPlugin.native-DncTHiEe.mjs} +2 -2
  10. package/dist/{DirectionPlugin.native-Bl-QLFzO.mjs → DirectionPlugin.native-B-Zj-EAt.mjs} +33 -33
  11. package/dist/{FontFamilyPlugin.native-M3cNQ0KA.mjs → FontFamilyPlugin.native-DLq9x046.mjs} +32 -32
  12. package/dist/{PreviewPlugin.native-Dyht8mGi.mjs → PreviewPlugin.native-Dv5OsffK.mjs} +4 -4
  13. package/dist/{SpellCheckPlugin.native-Bef2oTLB.mjs → SpellCheckPlugin.native-BGm2qPfn.mjs} +20 -20
  14. package/dist/{TemplatePlugin.native-BDV2eik2.mjs → TemplatePlugin.native-Dwk8TgxI.mjs} +32 -32
  15. package/dist/editora.min.js +3 -3
  16. package/dist/editora.umd.js +5 -5
  17. package/dist/{index-DeUjxpKd.mjs → index-6i4_TH66.mjs} +136 -133
  18. package/dist/{index-CclXYzUB.js → index-Ct3Aik7_.js} +3 -3
  19. package/dist/index.cjs.js +1 -1
  20. package/dist/index.esm.js +2 -2
  21. package/dist/plugin-loader.js +11 -11
  22. package/dist/webcomponent-core.js +154 -151
  23. package/dist/webcomponent-core.min.js +19 -19
  24. package/dist/webcomponent.cjs.js +1 -1
  25. package/dist/webcomponent.esm.js +1 -1
  26. package/dist/webcomponent.js +34 -31
  27. package/dist/webcomponent.min.js +212 -212
  28. package/package.json +1 -1
@@ -315,7 +315,7 @@ class un {
315
315
  return this.isDestroyed;
316
316
  }
317
317
  }
318
- class fn {
318
+ class pn {
319
319
  constructor(t, e, o) {
320
320
  this.overflowUnits = [], this.overflowUnitHomes = /* @__PURE__ */ new WeakMap(), this.expandedOpen = !1, this.onDocumentPointerDownForOverflow = (i) => {
321
321
  var l, c;
@@ -406,18 +406,18 @@ class fn {
406
406
  codeBlock: "insertCodeBlock"
407
407
  };
408
408
  return o.forEach((c) => {
409
- const p = [];
409
+ const f = [];
410
410
  c.split(/\s+/).filter(Boolean).forEach((v) => {
411
411
  if (v === "direction") {
412
412
  const w = r.get("setDirectionLTR"), E = r.get("setDirectionRTL");
413
- w && p.push({
413
+ w && f.push({
414
414
  id: "directionLTR",
415
415
  label: w.label,
416
416
  command: w.command,
417
417
  icon: w.icon,
418
418
  type: w.type || "button",
419
419
  options: w.options
420
- }), E && p.push({
420
+ }), E && f.push({
421
421
  id: "directionRTL",
422
422
  label: E.label,
423
423
  command: E.command,
@@ -429,14 +429,14 @@ class fn {
429
429
  }
430
430
  if (v === "comments") {
431
431
  const w = r.get("addComment"), E = r.get("toggleComments");
432
- w && p.push({
432
+ w && f.push({
433
433
  id: "addComment",
434
434
  label: w.label,
435
435
  command: w.command,
436
436
  icon: w.icon,
437
437
  type: w.type || "button",
438
438
  options: w.options
439
- }), E && p.push({
439
+ }), E && f.push({
440
440
  id: "toggleComments",
441
441
  label: E.label,
442
442
  command: E.command,
@@ -448,7 +448,7 @@ class fn {
448
448
  }
449
449
  const A = l[v] || v;
450
450
  let C = r.get(A);
451
- C || (C = r.get(v)), C && p.push({
451
+ C || (C = r.get(v)), C && f.push({
452
452
  id: v,
453
453
  label: C.label,
454
454
  command: C.command,
@@ -457,7 +457,7 @@ class fn {
457
457
  options: C.options,
458
458
  items: C.items
459
459
  });
460
- }), p.length > 0 && e.push(p);
460
+ }), f.length > 0 && e.push(f);
461
461
  }), e;
462
462
  }
463
463
  /**
@@ -476,13 +476,13 @@ class fn {
476
476
  const o = this.config.items || this.getDefaultToolbarString(), i = this.parseToolbarString(o);
477
477
  i.forEach((r, l) => {
478
478
  const c = document.createElement("div");
479
- if (c.className = "editora-toolbar-group", r.forEach((p) => {
480
- this.appendToolbarButton(c, p);
479
+ if (c.className = "editora-toolbar-group", r.forEach((f) => {
480
+ this.appendToolbarButton(c, f);
481
481
  const m = c.lastElementChild;
482
482
  m instanceof HTMLElement && (this.overflowUnits.push(m), this.overflowUnitHomes.set(m, c));
483
483
  }), e.appendChild(c), l < i.length - 1) {
484
- const p = document.createElement("div");
485
- p.className = "editora-toolbar-separator", e.appendChild(p);
484
+ const f = document.createElement("div");
485
+ f.className = "editora-toolbar-separator", e.appendChild(f);
486
486
  }
487
487
  }), t.appendChild(e), this.setupOverflow(t);
488
488
  }
@@ -503,7 +503,7 @@ class fn {
503
503
  var N;
504
504
  D.parentElement === i && ((N = this.overflowUnitHomes.get(D)) == null || N.appendChild(D));
505
505
  });
506
- const p = t.clientWidth, m = 16, v = 40, A = 4, C = Math.max(0, p - m - v - A);
506
+ const f = t.clientWidth, m = 16, v = 40, A = 4, C = Math.max(0, f - m - v - A);
507
507
  let w = 0, E = 0;
508
508
  for (const D of c) {
509
509
  const N = D.getBoundingClientRect().width + A;
@@ -574,7 +574,7 @@ class fn {
574
574
  */
575
575
  createInput(t) {
576
576
  const e = document.createElement("input");
577
- return e.className = `editora-toolbar-input ${t.label.toLowerCase().replace(/\s+/g, "-")}`, e.type = "text", e.title = t.label, e.placeholder = t.placeholder || "", t.command && e.setAttribute("data-command", t.command), t.active && e.classList.add("active"), t.disabled && (e.disabled = !0), e.addEventListener("click", (o) => {
577
+ return e.className = `editora-toolbar-input ${t.label.toLowerCase().replace(/\s+/g, "-")}`, e.type = "text", e.title = t.label, e.setAttribute("aria-label", t.label), e.placeholder = t.placeholder || "", t.command && e.setAttribute("data-command", t.command), t.active && e.classList.add("active"), t.disabled && (e.disabled = !0), e.addEventListener("click", (o) => {
578
578
  o.preventDefault(), this.setLastCommandTrigger(e, t.command), this.commandHandler && t.command && this.commandHandler(t.command);
579
579
  }), e;
580
580
  }
@@ -605,14 +605,14 @@ class fn {
605
605
  o.className = "editora-toolbar-button editora-toolbar-dropdown-trigger", o.type = "button", o.textContent = t.label;
606
606
  const i = document.createElement("div");
607
607
  i.className = "editora-toolbar-dropdown-menu", i.style.display = "none", t.options && t.options.forEach((c) => {
608
- const p = document.createElement("button");
609
- p.className = "editora-toolbar-dropdown-item", p.type = "button", p.textContent = c.label, p.setAttribute("data-value", c.value), p.addEventListener("click", (m) => {
608
+ const f = document.createElement("button");
609
+ f.className = "editora-toolbar-dropdown-item", f.type = "button", f.textContent = c.label, f.setAttribute("data-value", c.value), f.addEventListener("click", (m) => {
610
610
  m.preventDefault(), this.setLastCommandTrigger(o, t.command), this.commandHandler && t.command && this.commandHandler(t.command, c.value), i.style.display = "none";
611
- }), i.appendChild(p);
611
+ }), i.appendChild(f);
612
612
  }), o.addEventListener("click", (c) => {
613
613
  c.preventDefault(), c.stopPropagation(), this.setLastCommandTrigger(o, t.command);
614
- const p = i.style.display === "block";
615
- i.style.display = p ? "none" : "block";
614
+ const f = i.style.display === "block";
615
+ i.style.display = f ? "none" : "block";
616
616
  });
617
617
  const r = (c) => {
618
618
  e.contains(c.target) || (i.style.display = "none");
@@ -640,17 +640,17 @@ class fn {
640
640
  o.textContent = t.label;
641
641
  const i = document.createElement("div");
642
642
  i.className = "editora-toolbar-dropdown-menu", i.style.display = "none", t.options && t.options.forEach((c) => {
643
- const p = document.createElement("button");
644
- p.className = "editora-toolbar-dropdown-item", p.type = "button", p.textContent = c.label, p.setAttribute("data-value", c.value), p.addEventListener("click", (m) => {
643
+ const f = document.createElement("button");
644
+ f.className = "editora-toolbar-dropdown-item", f.type = "button", f.textContent = c.label, f.setAttribute("data-value", c.value), f.addEventListener("click", (m) => {
645
645
  m.preventDefault(), m.stopPropagation(), this.setLastCommandTrigger(o, t.command), this.commandHandler && t.command && this.commandHandler(t.command, c.value), i.style.display = "none";
646
- }), i.appendChild(p);
646
+ }), i.appendChild(f);
647
647
  }), o.addEventListener("click", (c) => {
648
648
  var m;
649
649
  c.preventDefault(), c.stopPropagation(), this.setLastCommandTrigger(o, t.command);
650
- const p = (m = this.container) == null ? void 0 : m.querySelectorAll(
650
+ const f = (m = this.container) == null ? void 0 : m.querySelectorAll(
651
651
  ".editora-toolbar-dropdown-menu"
652
652
  );
653
- p == null || p.forEach((v) => {
653
+ f == null || f.forEach((v) => {
654
654
  v !== i && (v.style.display = "none");
655
655
  }), i.style.display = i.style.display === "none" ? "block" : "none";
656
656
  });
@@ -690,7 +690,7 @@ class fn {
690
690
  }), this.container.innerHTML = ""), (t = this.resizeObserver) == null || t.disconnect(), this.resizeObserver = void 0, this.overflowRafId !== void 0 && cancelAnimationFrame(this.overflowRafId), document.removeEventListener("mousedown", this.onDocumentPointerDownForOverflow, !0), this.itemsContainer = void 0, this.moreButton = void 0, this.expandedRow = void 0, this.commandHandler = void 0;
691
691
  }
692
692
  }
693
- class pn {
693
+ class fn {
694
694
  constructor(t) {
695
695
  this.visible = !1, this.config = t;
696
696
  }
@@ -774,14 +774,14 @@ class hn {
774
774
  }), o.forEach((r, l) => {
775
775
  const c = document.createElement("span");
776
776
  if (c.className = "editora-statusbar-item", c.textContent = r, t.appendChild(c), l < o.length - 1) {
777
- const p = document.createElement("span");
778
- p.className = "editora-statusbar-separator", p.textContent = "|", t.appendChild(p);
777
+ const f = document.createElement("span");
778
+ f.className = "editora-statusbar-separator", f.textContent = "|", t.appendChild(f);
779
779
  }
780
780
  }), i.forEach((r, l) => {
781
781
  const c = document.createElement("span");
782
782
  if (c.className = "editora-statusbar-item", c.textContent = r, e.appendChild(c), l < i.length - 1) {
783
- const p = document.createElement("span");
784
- p.className = "editora-statusbar-separator", p.textContent = "|", e.appendChild(p);
783
+ const f = document.createElement("span");
784
+ f.className = "editora-statusbar-separator", f.textContent = "|", e.appendChild(f);
785
785
  }
786
786
  }), this.container.appendChild(t), this.container.appendChild(e);
787
787
  }
@@ -1192,14 +1192,14 @@ function wn(a) {
1192
1192
  function Tn(a, t) {
1193
1193
  var e = a == null ? null : typeof Symbol != "undefined" && a[Symbol.iterator] || a["@@iterator"];
1194
1194
  if (e != null) {
1195
- var o, i, r, l, c = [], p = !0, m = !1;
1195
+ var o, i, r, l, c = [], f = !0, m = !1;
1196
1196
  try {
1197
- if (r = (e = e.call(a)).next, t !== 0) for (; !(p = (o = r.call(e)).done) && (c.push(o.value), c.length !== t); p = !0) ;
1197
+ if (r = (e = e.call(a)).next, t !== 0) for (; !(f = (o = r.call(e)).done) && (c.push(o.value), c.length !== t); f = !0) ;
1198
1198
  } catch (v) {
1199
1199
  m = !0, i = v;
1200
1200
  } finally {
1201
1201
  try {
1202
- if (!p && e.return != null && (l = e.return(), Object(l) !== l)) return;
1202
+ if (!f && e.return != null && (l = e.return(), Object(l) !== l)) return;
1203
1203
  } finally {
1204
1204
  if (m) throw i;
1205
1205
  }
@@ -1237,7 +1237,7 @@ Te || (Te = function(t) {
1237
1237
  for (var e = arguments.length, o = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++) o[i - 1] = arguments[i];
1238
1238
  return new t(...o);
1239
1239
  });
1240
- const rt = L(Array.prototype.forEach), Ln = L(Array.prototype.lastIndexOf), so = L(Array.prototype.pop), kt = L(Array.prototype.push), Mn = L(Array.prototype.splice), bt = Array.isArray, _t = L(String.prototype.toLowerCase), pe = L(String.prototype.toString), lo = L(String.prototype.match), xt = L(String.prototype.replace), co = L(String.prototype.indexOf), In = L(String.prototype.trim), On = L(Number.prototype.toString), Dn = L(Boolean.prototype.toString), uo = typeof BigInt == "undefined" ? null : L(BigInt.prototype.toString), fo = typeof Symbol == "undefined" ? null : L(Symbol.prototype.toString), z = L(Object.prototype.hasOwnProperty), At = L(Object.prototype.toString), O = L(RegExp.prototype.test), Z = Rn(TypeError);
1240
+ const rt = L(Array.prototype.forEach), Ln = L(Array.prototype.lastIndexOf), so = L(Array.prototype.pop), kt = L(Array.prototype.push), Mn = L(Array.prototype.splice), bt = Array.isArray, _t = L(String.prototype.toLowerCase), fe = L(String.prototype.toString), lo = L(String.prototype.match), xt = L(String.prototype.replace), co = L(String.prototype.indexOf), In = L(String.prototype.trim), On = L(Number.prototype.toString), Dn = L(Boolean.prototype.toString), uo = typeof BigInt == "undefined" ? null : L(BigInt.prototype.toString), po = typeof Symbol == "undefined" ? null : L(Symbol.prototype.toString), z = L(Object.prototype.hasOwnProperty), At = L(Object.prototype.toString), O = L(RegExp.prototype.test), Z = Rn(TypeError);
1241
1241
  function L(a) {
1242
1242
  return function(t) {
1243
1243
  t instanceof RegExp && (t.lastIndex = 0);
@@ -1289,7 +1289,7 @@ function Pn(a) {
1289
1289
  case "bigint":
1290
1290
  return uo ? uo(a) : "0";
1291
1291
  case "symbol":
1292
- return fo ? fo(a) : "Symbol()";
1292
+ return po ? po(a) : "Symbol()";
1293
1293
  case "undefined":
1294
1294
  return At(a);
1295
1295
  case "function":
@@ -1327,7 +1327,7 @@ function zn(a) {
1327
1327
  return !1;
1328
1328
  }
1329
1329
  }
1330
- const po = M([
1330
+ const fo = M([
1331
1331
  "a",
1332
1332
  "abbr",
1333
1333
  "acronym",
@@ -2037,7 +2037,7 @@ function Mo() {
2037
2037
  let e = a.document;
2038
2038
  const o = e, i = o.currentScript;
2039
2039
  a.DocumentFragment;
2040
- const r = a.HTMLTemplateElement, l = a.Node, c = a.Element, p = a.NodeFilter;
2040
+ const r = a.HTMLTemplateElement, l = a.Node, c = a.Element, f = a.NodeFilter;
2041
2041
  a.NamedNodeMap === void 0 && (a.NamedNodeMap || a.MozNamedAttrMap), a.HTMLFormElement;
2042
2042
  const m = a.DOMParser, v = a.trustedTypes, A = c.prototype, C = j(A, "cloneNode"), w = j(A, "remove"), E = j(A, "removeAttributeNode"), Y = j(A, "nextSibling"), D = j(A, "childNodes"), N = j(A, "parentNode"), Ce = j(A, "shadowRoot"), qt = j(A, "attributes"), tt = l && l.prototype ? j(l.prototype, "nodeType") : null, at = l && l.prototype ? j(l.prototype, "nodeName") : null, Lt = l && l.prototype ? j(l.prototype, "ownerDocument") : null, yt = function(n) {
2043
2043
  return tt ? tt(n) : n.nodeType;
@@ -2073,7 +2073,7 @@ function Mo() {
2073
2073
  const Bo = Hn, Fo = Un, Ho = jn, Uo = Wn, jo = $n, Wo = Gn, Me = Kn, $o = qn;
2074
2074
  let Ie = bo, k = null;
2075
2075
  const Jt = y({}, [
2076
- ...po,
2076
+ ...fo,
2077
2077
  ...he,
2078
2078
  ...me,
2079
2079
  ...ge,
@@ -2182,7 +2182,7 @@ function Mo() {
2182
2182
  Nt,
2183
2183
  Pt,
2184
2184
  $
2185
- ], pe), $e = M([
2185
+ ], fe), $e = M([
2186
2186
  "mi",
2187
2187
  "mo",
2188
2188
  "mn",
@@ -2201,13 +2201,13 @@ function Mo() {
2201
2201
  ]);
2202
2202
  let wt = null;
2203
2203
  const Yo = ["application/xhtml+xml", "text/html"], qo = "text/html";
2204
- let _ = null, ft = null;
2204
+ let _ = null, pt = null;
2205
2205
  const Vo = e.createElement("form"), Ke = function(n) {
2206
2206
  return n instanceof RegExp || n instanceof Function;
2207
2207
  }, ce = function() {
2208
2208
  let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2209
- if (ft && ft === n) return;
2210
- (!n || typeof n != "object") && (n = {}), n = H(n), wt = Yo.indexOf(n.PARSER_MEDIA_TYPE) === -1 ? qo : n.PARSER_MEDIA_TYPE, _ = wt === "application/xhtml+xml" ? pe : _t, k = J(n, "ALLOWED_TAGS", Jt, { transform: _ }), x = J(n, "ALLOWED_ATTR", Qt, { transform: _ }), ae = J(n, "ALLOWED_NAMESPACES", Go, { transform: pe }), je = J(n, "ADD_URI_SAFE_ATTR", We, {
2209
+ if (pt && pt === n) return;
2210
+ (!n || typeof n != "object") && (n = {}), n = H(n), wt = Yo.indexOf(n.PARSER_MEDIA_TYPE) === -1 ? qo : n.PARSER_MEDIA_TYPE, _ = wt === "application/xhtml+xml" ? fe : _t, k = J(n, "ALLOWED_TAGS", Jt, { transform: _ }), x = J(n, "ALLOWED_ATTR", Qt, { transform: _ }), ae = J(n, "ALLOWED_NAMESPACES", Go, { transform: fe }), je = J(n, "ADD_URI_SAFE_ATTR", We, {
2211
2211
  transform: _,
2212
2212
  base: We
2213
2213
  }), He = J(n, "ADD_DATA_URI_TAGS", Ue, {
@@ -2215,7 +2215,7 @@ function Mo() {
2215
2215
  base: Ue
2216
2216
  }), dt = J(n, "FORBID_CONTENTS", Fe, { transform: _ }), vt = J(n, "FORBID_TAGS", H({}), { transform: _ }), Oe = J(n, "FORBID_ATTR", H({}), { transform: _ }), ct = z(n, "USE_PROFILES") ? n.USE_PROFILES && typeof n.USE_PROFILES == "object" ? H(n.USE_PROFILES) : n.USE_PROFILES : !1, De = n.ALLOW_ARIA_ATTR !== !1, te = n.ALLOW_DATA_ATTR !== !1, Re = n.ALLOW_UNKNOWN_PROTOCOLS || !1, Ne = n.ALLOW_SELF_CLOSE_IN_ATTR !== !1, V = n.SAFE_FOR_TEMPLATES || !1, ot = n.SAFE_FOR_XML !== !1, nt = n.WHOLE_DOCUMENT || !1, lt = n.RETURN_DOM || !1, Dt = n.RETURN_DOM_FRAGMENT || !1, Rt = n.RETURN_TRUSTED_TYPE || !1, oe = n.FORCE_BODY || !1, Pe = n.SANITIZE_DOM !== !1, ze = n.SANITIZE_NAMED_PROPS || !1, ne = n.KEEP_CONTENT !== !1, ie = n.IN_PLACE || !1, Ie = zn(n.ALLOWED_URI_REGEXP) ? n.ALLOWED_URI_REGEXP : bo, ut = typeof n.NAMESPACE == "string" ? n.NAMESPACE : $, se = ye(n, "MATHML_TEXT_INTEGRATION_POINTS", () => y({}, $e)), le = ye(n, "HTML_INTEGRATION_POINTS", () => y({}, Ge));
2217
2217
  const s = ye(n, "CUSTOM_ELEMENT_HANDLING", () => gt(null));
2218
- if (W = gt(null), z(s, "tagNameCheck") && Ke(s.tagNameCheck) && (W.tagNameCheck = s.tagNameCheck), z(s, "attributeNameCheck") && Ke(s.attributeNameCheck) && (W.attributeNameCheck = s.attributeNameCheck), z(s, "allowCustomizedBuiltInElements") && typeof s.allowCustomizedBuiltInElements == "boolean" && (W.allowCustomizedBuiltInElements = s.allowCustomizedBuiltInElements), I(W), V && (te = !1), Dt && (lt = !0), ct && (k = y({}, ho), x = gt(null), ct.html === !0 && (y(k, po), y(x, mo)), ct.svg === !0 && (y(k, he), y(x, be), y(x, Wt)), ct.svgFilters === !0 && (y(k, me), y(x, be), y(x, Wt)), ct.mathMl === !0 && (y(k, ge), y(x, go), y(x, Wt))), q.tagCheck = null, q.attributeCheck = null, z(n, "ADD_TAGS") && (typeof n.ADD_TAGS == "function" ? q.tagCheck = n.ADD_TAGS : bt(n.ADD_TAGS) && (k === Jt && (k = H(k)), y(k, n.ADD_TAGS, _))), z(n, "ADD_ATTR") && (typeof n.ADD_ATTR == "function" ? q.attributeCheck = n.ADD_ATTR : bt(n.ADD_ATTR) && (x === Qt && (x = H(x)), y(x, n.ADD_ATTR, _))), z(n, "ADD_FORBID_CONTENTS") && bt(n.ADD_FORBID_CONTENTS) && (dt === Fe && (dt = H(dt)), y(dt, n.ADD_FORBID_CONTENTS, _)), ne && (k["#text"] = !0), nt && y(k, [
2218
+ if (W = gt(null), z(s, "tagNameCheck") && Ke(s.tagNameCheck) && (W.tagNameCheck = s.tagNameCheck), z(s, "attributeNameCheck") && Ke(s.attributeNameCheck) && (W.attributeNameCheck = s.attributeNameCheck), z(s, "allowCustomizedBuiltInElements") && typeof s.allowCustomizedBuiltInElements == "boolean" && (W.allowCustomizedBuiltInElements = s.allowCustomizedBuiltInElements), I(W), V && (te = !1), Dt && (lt = !0), ct && (k = y({}, ho), x = gt(null), ct.html === !0 && (y(k, fo), y(x, mo)), ct.svg === !0 && (y(k, he), y(x, be), y(x, Wt)), ct.svgFilters === !0 && (y(k, me), y(x, be), y(x, Wt)), ct.mathMl === !0 && (y(k, ge), y(x, go), y(x, Wt))), q.tagCheck = null, q.attributeCheck = null, z(n, "ADD_TAGS") && (typeof n.ADD_TAGS == "function" ? q.tagCheck = n.ADD_TAGS : bt(n.ADD_TAGS) && (k === Jt && (k = H(k)), y(k, n.ADD_TAGS, _))), z(n, "ADD_ATTR") && (typeof n.ADD_ATTR == "function" ? q.attributeCheck = n.ADD_ATTR : bt(n.ADD_ATTR) && (x === Qt && (x = H(x)), y(x, n.ADD_ATTR, _))), z(n, "ADD_FORBID_CONTENTS") && bt(n.ADD_FORBID_CONTENTS) && (dt === Fe && (dt = H(dt)), y(dt, n.ADD_FORBID_CONTENTS, _)), ne && (k["#text"] = !0), nt && y(k, [
2219
2219
  "html",
2220
2220
  "head",
2221
2221
  "body"
@@ -2226,11 +2226,11 @@ function Mo() {
2226
2226
  P = n.TRUSTED_TYPES_POLICY;
2227
2227
  try {
2228
2228
  et = st("");
2229
- } catch (f) {
2230
- throw P = d, f;
2229
+ } catch (p) {
2230
+ throw P = d, p;
2231
2231
  }
2232
2232
  } else n.TRUSTED_TYPES_POLICY === null ? (P = void 0, et = "") : (P === void 0 && (P = Ro()), P && typeof et == "string" && (et = st("")));
2233
- M && M(n), ft = n;
2233
+ M && M(n), pt = n;
2234
2234
  }, Ye = y({}, [
2235
2235
  ...he,
2236
2236
  ...me,
@@ -2247,8 +2247,8 @@ function Mo() {
2247
2247
  namespaceURI: ut,
2248
2248
  tagName: "template"
2249
2249
  });
2250
- const d = _t(n.tagName), f = _t(s.tagName);
2251
- return ae[n.namespaceURI] ? n.namespaceURI === Pt ? Xo(d, s, f) : n.namespaceURI === Nt ? Zo(d, s, f) : n.namespaceURI === $ ? Jo(d, s, f) : !!(wt === "application/xhtml+xml" && ae[n.namespaceURI]) : !1;
2250
+ const d = _t(n.tagName), p = _t(s.tagName);
2251
+ return ae[n.namespaceURI] ? n.namespaceURI === Pt ? Xo(d, s, p) : n.namespaceURI === Nt ? Zo(d, s, p) : n.namespaceURI === $ ? Jo(d, s, p) : !!(wt === "application/xhtml+xml" && ae[n.namespaceURI]) : !1;
2252
2252
  }, X = function(n) {
2253
2253
  kt(t.removed, { element: n });
2254
2254
  try {
@@ -2259,7 +2259,7 @@ function Mo() {
2259
2259
  }, Ve = function(n, s, d) {
2260
2260
  try {
2261
2261
  E(n, s);
2262
- } catch (f) {
2262
+ } catch (p) {
2263
2263
  try {
2264
2264
  n.removeAttribute(d);
2265
2265
  } catch (h) {
@@ -2269,10 +2269,10 @@ function Mo() {
2269
2269
  Bt(n);
2270
2270
  const s = D(n);
2271
2271
  if (s) {
2272
- const f = [];
2272
+ const p = [];
2273
2273
  rt(s, (h) => {
2274
- kt(f, h);
2275
- }), rt(f, (h) => {
2274
+ kt(p, h);
2275
+ }), rt(p, (h) => {
2276
2276
  try {
2277
2277
  w(h);
2278
2278
  } catch (g) {
@@ -2280,14 +2280,14 @@ function Mo() {
2280
2280
  });
2281
2281
  }
2282
2282
  const d = qt(n);
2283
- if (d) for (let f = d.length - 1; f >= 0; --f) {
2284
- const h = d[f], g = h && h.name;
2283
+ if (d) for (let p = d.length - 1; p >= 0; --p) {
2284
+ const h = d[p], g = h && h.name;
2285
2285
  typeof g == "string" && Ve(n, h, g);
2286
2286
  }
2287
2287
  }, it = function(n, s, d) {
2288
2288
  if (!d) try {
2289
2289
  d = s.getAttributeNode(n);
2290
- } catch (f) {
2290
+ } catch (p) {
2291
2291
  d = null;
2292
2292
  }
2293
2293
  kt(t.removed, {
@@ -2296,7 +2296,7 @@ function Mo() {
2296
2296
  });
2297
2297
  try {
2298
2298
  d ? E(s, d) : s.removeAttribute(n);
2299
- } catch (f) {
2299
+ } catch (p) {
2300
2300
  try {
2301
2301
  s.removeAttribute(n);
2302
2302
  } catch (h) {
@@ -2305,26 +2305,26 @@ function Mo() {
2305
2305
  if (n === "is")
2306
2306
  if (lt || Dt) try {
2307
2307
  X(s);
2308
- } catch (f) {
2308
+ } catch (p) {
2309
2309
  }
2310
2310
  else try {
2311
2311
  s.setAttribute(n, "");
2312
- } catch (f) {
2312
+ } catch (p) {
2313
2313
  }
2314
2314
  }, tn = function(n) {
2315
2315
  const s = qt(n);
2316
2316
  if (s)
2317
2317
  for (let d = s.length - 1; d >= 0; --d) {
2318
- const f = s[d], h = f && f.name;
2319
- typeof h != "string" || x[_(h)] || Ve(n, f, h);
2318
+ const p = s[d], h = p && p.name;
2319
+ typeof h != "string" || x[_(h)] || Ve(n, p, h);
2320
2320
  }
2321
2321
  }, Bt = function(n) {
2322
2322
  const s = [n];
2323
2323
  for (; s.length > 0; ) {
2324
2324
  const d = s.pop();
2325
2325
  yt(d) === F.element && tn(d);
2326
- const f = D(d);
2327
- if (f) for (let h = f.length - 1; h >= 0; --h) s.push(f[h]);
2326
+ const p = D(d);
2327
+ if (p) for (let h = p.length - 1; h >= 0; --h) s.push(p[h]);
2328
2328
  }
2329
2329
  }, Xe = function(n, s) {
2330
2330
  return ot ? n === "patchsrc" ? !0 : n === "for" && s !== "label" && s !== "output" : !1;
@@ -2332,15 +2332,15 @@ function Mo() {
2332
2332
  if (!ot) return;
2333
2333
  const s = [n];
2334
2334
  for (; s.length > 0; ) {
2335
- const d = s.pop(), f = yt(d);
2336
- if (f === F.processingInstruction || f === F.comment && O(Eo, d.data)) {
2335
+ const d = s.pop(), p = yt(d);
2336
+ if (p === F.processingInstruction || p === F.comment && O(Eo, d.data)) {
2337
2337
  try {
2338
2338
  w(d);
2339
2339
  } catch (g) {
2340
2340
  }
2341
2341
  continue;
2342
2342
  }
2343
- if (f === F.element) {
2343
+ if (p === F.element) {
2344
2344
  const g = d, b = _(Vt(d));
2345
2345
  try {
2346
2346
  g.hasAttribute && g.hasAttribute("patchsrc") && g.removeAttribute("patchsrc"), g.hasAttribute && g.hasAttribute("for") && Xe("for", b) && g.removeAttribute("for");
@@ -2358,15 +2358,15 @@ function Mo() {
2358
2358
  d = g && g[0];
2359
2359
  }
2360
2360
  wt === "application/xhtml+xml" && ut === $ && (n = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + n + "</body></html>");
2361
- const f = P ? st(n) : n;
2361
+ const p = P ? st(n) : n;
2362
2362
  if (ut === $) try {
2363
- s = new m().parseFromString(f, wt);
2363
+ s = new m().parseFromString(p, wt);
2364
2364
  } catch (g) {
2365
2365
  }
2366
2366
  if (!s || !s.documentElement) {
2367
2367
  s = Zt.createDocument(ut, "template", null);
2368
2368
  try {
2369
- s.documentElement.innerHTML = re ? et : f;
2369
+ s.documentElement.innerHTML = re ? et : p;
2370
2370
  } catch (g) {
2371
2371
  }
2372
2372
  }
@@ -2374,24 +2374,24 @@ function Mo() {
2374
2374
  return n && d && h.insertBefore(e.createTextNode(d), h.childNodes[0] || null), ut === $ ? Po.call(s, nt ? "html" : "body")[0] : nt ? s.documentElement : h;
2375
2375
  }, Je = function(n) {
2376
2376
  const s = Lt ? Lt(n) : n.ownerDocument;
2377
- return Le.call(s || n, n, p.SHOW_ELEMENT | p.SHOW_COMMENT | p.SHOW_TEXT | p.SHOW_PROCESSING_INSTRUCTION | p.SHOW_CDATA_SECTION, null);
2377
+ return Le.call(s || n, n, f.SHOW_ELEMENT | f.SHOW_COMMENT | f.SHOW_TEXT | f.SHOW_PROCESSING_INSTRUCTION | f.SHOW_CDATA_SECTION, null);
2378
2378
  }, Ft = function(n) {
2379
2379
  return n = xt(n, Bo, " "), n = xt(n, Fo, " "), n = xt(n, Ho, " "), n;
2380
2380
  }, de = function(n) {
2381
2381
  var s;
2382
2382
  n.normalize();
2383
- const d = Lt ? Lt(n) : n.ownerDocument, f = Le.call(d || n, n, p.SHOW_TEXT | p.SHOW_COMMENT | p.SHOW_CDATA_SECTION | p.SHOW_PROCESSING_INSTRUCTION, null);
2384
- let h = f.nextNode();
2383
+ const d = Lt ? Lt(n) : n.ownerDocument, p = Le.call(d || n, n, f.SHOW_TEXT | f.SHOW_COMMENT | f.SHOW_CDATA_SECTION | f.SHOW_PROCESSING_INSTRUCTION, null);
2384
+ let h = p.nextNode();
2385
2385
  for (; h; )
2386
- h.data = Ft(h.data), h = f.nextNode();
2386
+ h.data = Ft(h.data), h = p.nextNode();
2387
2387
  const g = (s = n.querySelectorAll) === null || s === void 0 ? void 0 : s.call(n, "template");
2388
2388
  g && rt(g, (b) => {
2389
- pt(b.content) && de(b.content);
2389
+ ft(b.content) && de(b.content);
2390
2390
  });
2391
2391
  }, Ht = function(n) {
2392
2392
  const s = at ? at(n) : null;
2393
2393
  return typeof s != "string" || _(s) !== "form" ? !1 : typeof n.nodeName != "string" || typeof n.textContent != "string" || typeof n.removeChild != "function" || n.attributes !== qt(n) || typeof n.removeAttribute != "function" || typeof n.removeAttributeNode != "function" || typeof n.getAttributeNode != "function" || typeof n.setAttribute != "function" || typeof n.namespaceURI != "string" || typeof n.insertBefore != "function" || typeof n.hasChildNodes != "function" || n.nodeType !== tt(n) || n.childNodes !== D(n);
2394
- }, pt = function(n) {
2394
+ }, ft = function(n) {
2395
2395
  if (!tt || typeof n != "object" || n === null) return !1;
2396
2396
  try {
2397
2397
  return tt(n) === F.documentFragment;
@@ -2408,7 +2408,7 @@ function Mo() {
2408
2408
  };
2409
2409
  function G(u, n, s) {
2410
2410
  u.length !== 0 && rt(u, (d) => {
2411
- d.call(t, n, s, ft);
2411
+ d.call(t, n, s, pt);
2412
2412
  });
2413
2413
  }
2414
2414
  const on = function(n, s) {
@@ -2416,25 +2416,25 @@ function Mo() {
2416
2416
  }, Ut = function(n, s) {
2417
2417
  if (n instanceof RegExp) return O(n, s);
2418
2418
  if (n instanceof Function) {
2419
- for (var d = arguments.length, f = new Array(d > 2 ? d - 2 : 0), h = 2; h < d; h++) f[h - 2] = arguments[h];
2420
- return !!n(s, ...f);
2419
+ for (var d = arguments.length, p = new Array(d > 2 ? d - 2 : 0), h = 2; h < d; h++) p[h - 2] = arguments[h];
2420
+ return !!n(s, ...p);
2421
2421
  }
2422
2422
  return !1;
2423
2423
  }, nn = function(n, s, d) {
2424
2424
  if (!vt[s] && oo(s) && Ut(W.tagNameCheck, s)) return !1;
2425
2425
  if (ne && !dt[s]) {
2426
- const f = N(n), h = D(n);
2427
- if (h && f) {
2426
+ const p = N(n), h = D(n);
2427
+ if (h && p) {
2428
2428
  const g = h.length;
2429
2429
  for (let b = g - 1; b >= 0; --b) {
2430
2430
  const S = n === d ? C(h[b], !0) : h[b];
2431
- f.insertBefore(S, Y(n));
2431
+ p.insertBefore(S, Y(n));
2432
2432
  }
2433
2433
  }
2434
2434
  }
2435
2435
  return X(n), !0;
2436
- }, Qe = function(n, s, d, f) {
2437
- return n.length === 0 ? s : s === d || s === f ? H(s) : s;
2436
+ }, Qe = function(n, s, d, p) {
2437
+ return n.length === 0 ? s : s === d || s === p ? H(s) : s;
2438
2438
  }, ht = function(n, s) {
2439
2439
  return n === s || N(n) !== null ? !1 : (ie && Bt(n), !0);
2440
2440
  }, to = function(n, s) {
@@ -2449,20 +2449,20 @@ function Mo() {
2449
2449
  if (on(n, d))
2450
2450
  return X(n), !0;
2451
2451
  if (vt[d] || !(q.tagCheck instanceof Function && q.tagCheck(d)) && !k[d]) {
2452
- const f = nn(n, d, s);
2453
- return f === !1 && (G(T.afterSanitizeElements, n, null), ht(n, s)) ? !0 : f;
2452
+ const p = nn(n, d, s);
2453
+ return p === !1 && (G(T.afterSanitizeElements, n, null), ht(n, s)) ? !0 : p;
2454
2454
  }
2455
2455
  if (yt(n) === F.element && !Qo(n) || (d === "noscript" || d === "noembed" || d === "noframes") && O(Vn, n.innerHTML))
2456
2456
  return X(n), !0;
2457
2457
  if (V && n.nodeType === F.text) {
2458
- const f = Ft(n.textContent);
2459
- n.textContent !== f && (kt(t.removed, { element: n.cloneNode() }), n.textContent = f);
2458
+ const p = Ft(n.textContent);
2459
+ n.textContent !== p && (kt(t.removed, { element: n.cloneNode() }), n.textContent = p);
2460
2460
  }
2461
2461
  return G(T.afterSanitizeElements, n, null), ht(n, s);
2462
2462
  }, eo = function(n, s, d) {
2463
2463
  if (Oe[s] || Xe(s, n) || Pe && (s === "id" || s === "name") && (d in e || d in Vo)) return !1;
2464
- const f = x[s] || q.attributeCheck instanceof Function && q.attributeCheck(s, n);
2465
- return te && O(Uo, s) || De && O(jo, s) ? !0 : f ? je[s] || O(Ie, xt(d, Me, "")) || (s === "src" || s === "xlink:href" || s === "href") && n !== "script" && co(d, "data:") === 0 && He[n] || Re && !O(Wo, xt(d, Me, "")) ? !0 : !d : oo(n) && Ut(W.tagNameCheck, n) && Ut(W.attributeNameCheck, s, n) || s === "is" && W.allowCustomizedBuiltInElements && Ut(W.tagNameCheck, d);
2464
+ const p = x[s] || q.attributeCheck instanceof Function && q.attributeCheck(s, n);
2465
+ return te && O(Uo, s) || De && O(jo, s) ? !0 : p ? je[s] || O(Ie, xt(d, Me, "")) || (s === "src" || s === "xlink:href" || s === "href") && n !== "script" && co(d, "data:") === 0 && He[n] || Re && !O(Wo, xt(d, Me, "")) ? !0 : !d : oo(n) && Ut(W.tagNameCheck, n) && Ut(W.attributeNameCheck, s, n) || s === "is" && W.allowCustomizedBuiltInElements && Ut(W.tagNameCheck, d);
2466
2466
  }, rn = y({}, [
2467
2467
  "annotation-xml",
2468
2468
  "color-profile",
@@ -2474,17 +2474,17 @@ function Mo() {
2474
2474
  "missing-glyph"
2475
2475
  ]), oo = function(n) {
2476
2476
  return !rn[_t(n)] && O($o, n);
2477
- }, an = function(n, s, d, f) {
2477
+ }, an = function(n, s, d, p) {
2478
2478
  if (P && typeof v == "object" && typeof v.getAttributeType == "function" && !d) switch (v.getAttributeType(n, s)) {
2479
2479
  case "TrustedHTML":
2480
- return st(f);
2480
+ return st(p);
2481
2481
  case "TrustedScriptURL":
2482
- return Do(f);
2482
+ return Do(p);
2483
2483
  }
2484
- return f;
2485
- }, sn = function(n, s, d, f) {
2484
+ return p;
2485
+ }, sn = function(n, s, d, p) {
2486
2486
  try {
2487
- return d ? n.setAttributeNS(d, s, f) : n.setAttribute(s, f), Ht(n) ? (X(n), !1) : !0;
2487
+ return d ? n.setAttributeNS(d, s, p) : n.setAttribute(s, p), Ht(n) ? (X(n), !1) : !0;
2488
2488
  } catch (h) {
2489
2489
  return it(s, n), !1;
2490
2490
  }
@@ -2493,7 +2493,7 @@ function Mo() {
2493
2493
  const d = n.attributes;
2494
2494
  if (!d || Ht(n)) return;
2495
2495
  x = Qe(T.uponSanitizeAttribute, x, Qt, Ot);
2496
- const f = {
2496
+ const p = {
2497
2497
  attrName: "",
2498
2498
  attrValue: "",
2499
2499
  keepAttr: !0,
@@ -2503,9 +2503,9 @@ function Mo() {
2503
2503
  let h = d.length;
2504
2504
  const g = _(n.nodeName);
2505
2505
  for (; h--; ) {
2506
- const b = d[h], S = b.name, U = b.namespaceURI, B = b.value, mt = _(S), fe = B;
2507
- let R = S === "value" ? fe : In(fe), io = !1;
2508
- if (f.attrName = mt, f.attrValue = R, f.keepAttr = !0, f.forceKeepAttr = void 0, G(T.uponSanitizeAttribute, n, f), R = f.attrValue, ze && (mt === "id" || mt === "name") && co(R, Be) !== 0 && (it(S, n, b), R = Be + R, io = !0), ot && O(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, R)) {
2506
+ const b = d[h], S = b.name, U = b.namespaceURI, B = b.value, mt = _(S), pe = B;
2507
+ let R = S === "value" ? pe : In(pe), io = !1;
2508
+ if (p.attrName = mt, p.attrValue = R, p.keepAttr = !0, p.forceKeepAttr = void 0, G(T.uponSanitizeAttribute, n, p), R = p.attrValue, ze && (mt === "id" || mt === "name") && co(R, Be) !== 0 && (it(S, n, b), R = Be + R, io = !0), ot && O(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, R)) {
2509
2509
  it(S, n, b);
2510
2510
  continue;
2511
2511
  }
@@ -2513,8 +2513,8 @@ function Mo() {
2513
2513
  it(S, n, b);
2514
2514
  continue;
2515
2515
  }
2516
- if (!f.forceKeepAttr) {
2517
- if (!f.keepAttr) {
2516
+ if (!p.forceKeepAttr) {
2517
+ if (!p.keepAttr) {
2518
2518
  it(S, n, b);
2519
2519
  continue;
2520
2520
  }
@@ -2526,7 +2526,7 @@ function Mo() {
2526
2526
  it(S, n, b);
2527
2527
  continue;
2528
2528
  }
2529
- R = an(g, mt, U, R), R !== fe && sn(n, S, U, R) && io && so(t.removed);
2529
+ R = an(g, mt, U, R), R !== pe && sn(n, S, U, R) && io && so(t.removed);
2530
2530
  }
2531
2531
  }
2532
2532
  G(T.afterSanitizeAttributes, n, null), ht(n, s);
@@ -2534,9 +2534,9 @@ function Mo() {
2534
2534
  let s = null;
2535
2535
  const d = Je(n);
2536
2536
  for (G(T.beforeSanitizeShadowDOM, n, null); s = d.nextNode(); )
2537
- if (G(T.uponSanitizeShadowNode, s, null), to(s, n), no(s, n), pt(s.content) && jt(s.content), yt(s) === F.element) {
2538
- const f = Ce(s);
2539
- pt(f) && (ue(f), jt(f));
2537
+ if (G(T.uponSanitizeShadowNode, s, null), to(s, n), no(s, n), ft(s.content) && jt(s.content), yt(s) === F.element) {
2538
+ const p = Ce(s);
2539
+ ft(p) && (ue(p), jt(p));
2540
2540
  }
2541
2541
  G(T.afterSanitizeShadowDOM, n, null);
2542
2542
  }, ue = function(n) {
@@ -2550,24 +2550,24 @@ function Mo() {
2550
2550
  jt(d.shadow);
2551
2551
  continue;
2552
2552
  }
2553
- const f = d.node, h = yt(f) === F.element, g = D(f);
2553
+ const p = d.node, h = yt(p) === F.element, g = D(p);
2554
2554
  if (g) for (let b = g.length - 1; b >= 0; --b) s.push({
2555
2555
  node: g[b],
2556
2556
  shadow: null
2557
2557
  });
2558
2558
  if (h) {
2559
- const b = at ? at(f) : null;
2559
+ const b = at ? at(p) : null;
2560
2560
  if (typeof b == "string" && _(b) === "template") {
2561
- const S = f.content;
2562
- pt(S) && s.push({
2561
+ const S = p.content;
2562
+ ft(S) && s.push({
2563
2563
  node: S,
2564
2564
  shadow: null
2565
2565
  });
2566
2566
  }
2567
2567
  }
2568
2568
  if (h) {
2569
- const b = Ce(f);
2570
- pt(b) && s.push({
2569
+ const b = Ce(p);
2570
+ ft(b) && s.push({
2571
2571
  node: null,
2572
2572
  shadow: b
2573
2573
  }, {
@@ -2578,7 +2578,7 @@ function Mo() {
2578
2578
  }
2579
2579
  };
2580
2580
  return t.sanitize = function(u) {
2581
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = null, d = null, f = null, h = null;
2581
+ let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = null, d = null, p = null, h = null;
2582
2582
  if (re = !u, re && (u = "<!-->"), typeof u != "string" && !Tt(u) && (u = Pn(u), typeof u != "string"))
2583
2583
  throw Z("dirty is not a string, aborting");
2584
2584
  if (!t.isSupported) return u;
@@ -2609,8 +2609,8 @@ function Mo() {
2609
2609
  const b = g ? u : s;
2610
2610
  try {
2611
2611
  const U = Je(b);
2612
- for (; f = U.nextNode(); )
2613
- to(f, b), no(f, b), pt(f.content) && jt(f.content);
2612
+ for (; p = U.nextNode(); )
2613
+ to(p, b), no(p, b), ft(p.content) && jt(p.content);
2614
2614
  } catch (U) {
2615
2615
  throw g && (zt(u), rt(t.removed, (B) => {
2616
2616
  B.element && Bt(B.element);
@@ -2636,11 +2636,11 @@ function Mo() {
2636
2636
  let u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2637
2637
  ce(u), ee = !0, It = k, Ot = x;
2638
2638
  }, t.clearConfig = function() {
2639
- ft = null, ee = !1, It = null, Ot = null, P = Xt, et = "";
2639
+ pt = null, ee = !1, It = null, Ot = null, P = Xt, et = "";
2640
2640
  }, t.isValidAttribute = function(u, n, s) {
2641
- ft || ce({});
2642
- const d = _(u), f = _(n);
2643
- return eo(d, f, s);
2641
+ pt || ce({});
2642
+ const d = _(u), p = _(n);
2643
+ return eo(d, p, s);
2644
2644
  }, t.addHook = function(u, n) {
2645
2645
  typeof n == "function" && z(T, u) && kt(T[u], n);
2646
2646
  }, t.removeHook = function(u, n) {
@@ -2732,12 +2732,12 @@ function ii(a) {
2732
2732
  function Io(a, t, e, o) {
2733
2733
  if ((t == null ? void 0 : t.sanitize) === !1)
2734
2734
  return a;
2735
- const i = t != null && t.allowedTags && t.allowedTags.length > 0 ? t.allowedTags : ei, r = e != null && e.length ? Array.from(/* @__PURE__ */ new Set([...i, ...e])) : i, c = !!(t != null && t.allowedAttributes) && Object.keys(t.allowedAttributes).length > 0 ? t.allowedAttributes : oi, p = /* @__PURE__ */ new Set();
2735
+ const i = t != null && t.allowedTags && t.allowedTags.length > 0 ? t.allowedTags : ei, r = e != null && e.length ? Array.from(/* @__PURE__ */ new Set([...i, ...e])) : i, c = !!(t != null && t.allowedAttributes) && Object.keys(t.allowedAttributes).length > 0 ? t.allowedAttributes : oi, f = /* @__PURE__ */ new Set();
2736
2736
  for (const A of Object.values(c))
2737
- for (const C of A) p.add(C);
2737
+ for (const C of A) f.add(C);
2738
2738
  const m = {
2739
2739
  ALLOWED_TAGS: r,
2740
- ALLOWED_ATTR: Array.from(p)
2740
+ ALLOWED_ATTR: Array.from(f)
2741
2741
  };
2742
2742
  if (!o)
2743
2743
  return $t.sanitize(a, m);
@@ -3047,7 +3047,7 @@ Yt.EDITOR_DEFAULTS = {
3047
3047
  let ke = Yt;
3048
3048
  const ci = '.editora-editor{display:flex;flex-direction:column;border:1px solid #ddd;border-radius:4px;background:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-size:14px;overflow:hidden}.editora-editor *{box-sizing:border-box}.editora-theme-light{background:#fff;color:#333}.editora-theme-dark{--editora-dark-toolbar-bg-start: #353d48;--editora-dark-toolbar-bg-end: #2d3540;--editora-dark-button-bg-start: #46505f;--editora-dark-button-bg-end: #3b4553;--editora-dark-button-hover-start: #525d6d;--editora-dark-button-hover-end: #465262;--editora-dark-button-active-start: #5eaaf6;--editora-dark-button-active-end: #4a95de;--editora-dark-border: #475263;--editora-dark-border-strong: #566275;--editora-dark-text: #e1e9f5;--editora-dark-text-strong: #f3f7ff;--editora-dark-text-muted: #aeb9cc;--editora-dark-surface: #1d242d;--editora-dark-content: #1f2732;background:linear-gradient(180deg,#1b2330,#1c2430);color:var(--editora-dark-text);border-color:var(--editora-dark-border)}.editora-toolbar{display:flex;align-items:center;gap:4px;padding:8px;background:#f5f5f5;border-bottom:1px solid #ddd;flex-wrap:wrap}.editora-theme-dark .editora-toolbar{background:linear-gradient(180deg,var(--editora-dark-toolbar-bg-start) 0%,var(--editora-dark-toolbar-bg-end) 100%);border-bottom-color:var(--editora-dark-border);box-shadow:inset 0 1px #ffffff0d}.editora-toolbar-sticky{position:sticky;top:0;z-index:100;position:-webkit-sticky}.editora-toolbar-group{display:flex;align-items:center;gap:2px}.editora-toolbar-button{padding:6px 12px;border:1px solid #ccc;background:#fff;cursor:pointer;border-radius:3px;font-weight:600;font-size:14px;height:30px;display:flex;align-items:center;white-space:nowrap}.editora-toolbar-group-button{display:flex;align-items:center}.editora-toolbar-input.font-size{width:40px;padding:.25rem;text-align:center;font-size:14px;background:#fff;border:1px solid var(--rte-color-border-light);border-radius:var(--rte-radius-sm)}.editora-toolbar-group-items{display:flex;align-items:center;border:1px solid #ccc;.editora-toolbar-button{border:none;border-radius:0;&:first-child{border-right:1px solid #ccc;border-top-left-radius:3px;border-bottom-left-radius:3px}&:last-child{border:0px solid #ccc;border-radius:0!important}&:hover{background:#e0e0e0;border-color:#ccc}}}.editora-theme-dark .editora-toolbar-button{background:linear-gradient(180deg,var(--editora-dark-button-bg-start) 0%,var(--editora-dark-button-bg-end) 100%);border-color:var(--editora-dark-border-strong);color:var(--editora-dark-text);box-shadow:inset 0 1px #ffffff14,0 1px 1px #00000059}.editora-theme-dark .editora-toolbar-group-items{border-color:var(--editora-dark-border-strong);background:linear-gradient(180deg,var(--editora-dark-button-bg-start) 0%,var(--editora-dark-button-bg-end) 100%)}.editora-theme-dark .editora-toolbar-group-items .editora-toolbar-button:first-child{border-right-color:#566275}.editora-theme-dark .editora-toolbar-group-items .editora-toolbar-button:last-child{border-left-color:#566275}.editora-theme-dark .editora-toolbar-input.font-size{background-color:#2e3642;color:var(--editora-dark-text-strong);border-color:var(--editora-dark-border-strong);caret-color:var(--editora-dark-text-strong)}.editora-theme-dark .editora-toolbar-input.font-size::placeholder{color:var(--editora-dark-text-strong);opacity:1}.editora-toolbar-button:hover{background:#e0e0e0;border-color:#ccc}.editora-theme-dark .editora-toolbar-button:hover{background:linear-gradient(180deg,var(--editora-dark-button-hover-start) 0%,var(--editora-dark-button-hover-end) 100%);border-color:#66748a;color:var(--editora-dark-text-strong)}.editora-toolbar-button:active,.editora-toolbar-button.active{background:#d0d0d0;border-color:#999}.editora-theme-dark .editora-toolbar-button:active,.editora-theme-dark .editora-toolbar-button.active{background:linear-gradient(180deg,var(--editora-dark-button-active-start) 0%,var(--editora-dark-button-active-end) 100%);border-color:#67adf4;color:#0f1b2a}.editora-theme-dark .editora-toolbar-button:disabled{background:#313946;border-color:#424d5e;color:#7f8ca1}.editora-theme-dark .editora-toolbar-button[data-command=insertTable],.editora-theme-dark .editora-toolbar-button[data-command=print],.editora-theme-dark .editora-toolbar-button[data-command=toggleSpellCheck],.editora-theme-dark .editora-toolbar-button[data-command=toggleA11yChecker],.editora-theme-dark .editora-toolbar-button[data-command=setDirectionLTR],.editora-theme-dark .editora-toolbar-button[data-command=setDirectionRTL]{color:#f1f6ff}.editora-toolbar-button:disabled{opacity:.5;cursor:not-allowed}.editora-toolbar-icon{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;line-height:1}.editora-toolbar-button svg,.editora-toolbar-icon svg{width:20px;height:20px;display:block;color:currentColor}.editora-theme-dark .editora-toolbar-button svg:not([fill=none i]),.editora-theme-dark .editora-toolbar-icon svg:not([fill=none i]){fill:currentColor}.editora-theme-dark .editora-toolbar-icon,.editora-theme-dark .editora-toolbar-icon *{color:inherit}.editora-theme-dark :is(.editora-toolbar-button,.editora-toolbar-icon) svg :is([stroke="#000" i],[stroke="#000000" i],[stroke=black i],[stroke="#0f0f0f" i],[stroke="#111111" i],[style*="stroke:#000" i],[style*="stroke: #000" i],[style*="stroke:black" i],[style*="stroke: black" i],[style*="stroke:#0f0f0f" i],[style*="stroke: #0f0f0f" i]){stroke:currentColor!important}.editora-theme-dark :is(.editora-toolbar-button,.editora-toolbar-icon) svg :is([fill="#000" i],[fill="#000000" i],[fill=black i],[fill="#0f0f0f" i],[fill="#111111" i],[style*="fill:#000" i],[style*="fill: #000" i],[style*="fill:black" i],[style*="fill: black" i],[style*="fill:#0f0f0f" i],[style*="fill: #0f0f0f" i]){fill:currentColor!important}.editora-toolbar-separator{width:1px;height:24px;background:#ddd;margin:0 4px}.editora-theme-dark .editora-toolbar-separator{background:#4d596b}.editora-toolbar-items-container{display:flex;align-items:center;gap:4px;flex:1;min-width:0;overflow:hidden}.editora-toolbar-more-button{display:flex;align-items:center;justify-content:center;width:30px;height:30px;flex-shrink:0;padding:0;border:1px solid #ccc;background:#fff;cursor:pointer;border-radius:3px;font-size:16px}.editora-toolbar-more-button:hover{background:#e0e0e0}.editora-toolbar-more-button.active{background:#d0d0d0;border-color:#999}.editora-theme-dark .editora-toolbar-more-button{background:var(--editora-dark-content);border-color:var(--editora-dark-border);color:var(--editora-dark-text)}.editora-theme-dark .editora-toolbar-more-button:hover,.editora-theme-dark .editora-toolbar-more-button.active{background:#3a4554;border-color:#607088}.editora-toolbar-expanded-row{display:none;flex-wrap:wrap;align-items:center;gap:4px;width:100%;padding:8px;border-top:1px solid #ddd;background:#f5f5f5}.editora-toolbar-expanded-row.show{display:flex}.editora-theme-dark .editora-toolbar-expanded-row{border-top-color:var(--editora-dark-border);background:linear-gradient(180deg,var(--editora-dark-toolbar-bg-start) 0%,var(--editora-dark-toolbar-bg-end) 100%)}.editora-toolbar-dropdown{position:relative}.editora-toolbar-dropdown-menu{position:absolute;top:100%;left:0;min-width:150px;margin-top:4px;padding:4px 0;background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:0 2px 8px #00000026;z-index:1000}.editora-theme-dark .editora-toolbar-dropdown-menu{background:#29323d;border-color:#4d596b;box-shadow:0 8px 20px #00000073}.editora-toolbar-dropdown-item{display:block;width:100%;padding:8px 12px;border:none;background:transparent;color:#333;text-align:left;cursor:pointer;font-size:13px;transition:background .15s ease}.editora-theme-dark .editora-toolbar-dropdown-item{color:#d7deea}.editora-toolbar-dropdown-item:hover{background:#f5f5f5}.editora-theme-dark .editora-toolbar-dropdown-item:hover{background:#3a4554;color:#f0f6ff}.editora-content{flex:1;min-height:200px;padding:16px;outline:none;overflow-y:auto;line-height:1.6}.editora-theme-dark .editora-content{color:#ecf3ff;background:linear-gradient(180deg,var(--editora-dark-content) 0%,#1c232e 100%)}.editora-content:empty:before{content:attr(data-placeholder);color:#999;pointer-events:none}.editora-theme-dark .editora-content:empty:before{color:#8f9bb0}.editora-content h1{font-size:2em;margin:.67em 0;font-weight:600}.editora-content h2{font-size:1.5em;margin:.75em 0;font-weight:600}.editora-content h3{font-size:1.17em;margin:.83em 0;font-weight:600}.editora-content p{margin:1em 0}.editora-theme-dark .editora-content,.editora-theme-dark .editora-content :is(p,span,div,li,ul,ol,td,th,h1,h2,h3,h4,h5,h6,strong,em,u,s,small,sub,sup,blockquote,code,pre,a){color:#ecf3ff}.editora-content ul,.editora-content ol{margin:1em 0;padding-left:2em}.editora-content a{color:#06c;text-decoration:underline}.editora-theme-dark .editora-content a{color:#ecf3ff}.editora-content code{padding:2px 4px;background:#f5f5f5;border-radius:3px;font-family:Monaco,Menlo,Consolas,monospace;font-size:.9em}.editora-theme-dark .editora-content code{background:#1e1e1e}.editora-content pre{padding:12px;background:#f5f5f5;border-radius:4px;overflow-x:auto;margin:1em 0}.editora-theme-dark .editora-content pre{background:#1e1e1e}.editora-theme-dark .rte-code-block{background:linear-gradient(180deg,#212a36,#1b2430)!important;border-color:#4f5b70!important;color:#e7effc!important}.editora-theme-dark .rte-code-block code{color:#e7effc!important}.editora-theme-dark .rte-code-block:before{background:#111927!important;color:#dce8ff!important}.editora-theme-dark .rte-code-block .rte-code-copy{background:#2b3441!important;border-color:#5a667b!important;color:#dce8ff!important}.editora-content blockquote{margin:1em 0;padding-left:1em;border-left:4px solid #ddd;color:#666}.editora-theme-dark .editora-content blockquote{border-left-color:#3c3c3c;color:#ecf3ff}.editora-floating-toolbar{position:absolute;padding:4px;background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:0 2px 8px #00000026;z-index:1000}.editora-theme-dark .editora-floating-toolbar{background:#29323d;border-color:#4d596b;box-shadow:0 8px 20px #00000073}.editora-statusbar-container{display:flex;flex-direction:column}.editora-statusbar-left{display:flex;align-items:center;gap:8px}.editora-statusbar-right{display:flex;align-items:center;gap:8px;margin-left:auto}.editora-statusbar{display:flex;align-items:center;gap:12px;padding:6px 12px;background:#f5f5f5;border-top:1px solid #ddd;font-size:12px;color:#666}.editora-theme-dark .editora-statusbar{background:linear-gradient(180deg,#2c3440,#252d37);border-top-color:#3f4a5b;color:#d7deea}.editora-statusbar-item{white-space:nowrap}.editora-statusbar-separator{color:#ddd}.editora-theme-dark .editora-statusbar-separator{color:#566275}.editora-editor[readonly] .editora-content{background:#fafafa;cursor:not-allowed}.editora-theme-dark.editora-editor[readonly] .editora-content{background:#1a1a1a}.editora-editor:focus-within{border-color:#06c;box-shadow:0 0 0 3px #0066cc1a}.editora-theme-dark.editora-editor:focus-within{border-color:#4db8ff;box-shadow:0 0 0 3px #4db8ff1a}.editora-editor[disabled]{opacity:.6;pointer-events:none}@media(max-width:768px){.editora-toolbar{padding:4px}.editora-toolbar-button{min-width:28px;min-height:28px;padding:4px 8px;font-size:12px}.editora-content{padding:12px}}.editora-content ::selection{background:#06c3}.editora-theme-dark .editora-content ::selection{background:#4db8ff33}.editora-content table{border-collapse:collapse;width:100%;margin:1em 0}.editora-content th,.editora-content td{border:1px solid #ddd;padding:8px 12px;text-align:left}.editora-theme-dark .editora-content th,.editora-theme-dark .editora-content td{border-color:#3c3c3c}.editora-content th{background:#f5f5f5;font-weight:600}.editora-theme-dark .editora-content th{background:#252526}.editora-content img{max-width:100%;height:auto;border-radius:4px;display:block}.editora-content video{max-width:100%;height:auto;border-radius:4px;display:block}.editora-editor.loading{opacity:.7;pointer-events:none}.editora-editor.loading:after{content:"";position:absolute;top:50%;left:50%;width:24px;height:24px;margin:-12px 0 0 -12px;border:3px solid #ddd;border-top-color:#06c;border-radius:50%;animation:editora-spin .8s linear infinite}@keyframes editora-spin{to{transform:rotate(360deg)}}.toolbar-container-wrapper{display:flex;align-items:center;background:#fff;border-bottom:1px solid #e0e0e0;padding:0;margin:0;width:100%;box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:14px;line-height:1.5;position:relative}.toolbar-container-wrapper[data-toolbar-sticky=true]{position:sticky;top:0;z-index:999;box-shadow:0 2px 4px #0000001a}.toolbar-container-wrapper[data-toolbar-floating=true]{position:fixed;top:0;left:0;right:0;z-index:1000;box-shadow:0 4px 12px #00000026}.toolbar-container-wrapper[data-toolbar-position=bottom]{border-bottom:none;border-top:1px solid #e0e0e0}.toolbar-container-wrapper .toolbar-wrapper{display:flex;width:100%;padding:8px;gap:4px;flex-wrap:wrap;align-items:center}.toolbar-container-wrapper .toolbar{display:flex;width:100%;gap:4px;flex-wrap:wrap;align-items:center}.toolbar-container-wrapper .toolbar-container{display:flex;gap:4px;flex-wrap:wrap;align-items:center;flex:1;position:relative}.toolbar-container-wrapper .toolbar-item{display:flex;align-items:center;gap:2px}.toolbar-container-wrapper .toolbar-button{padding:6px 10px;border:1px solid #d1d5db;background:#fff;border-radius:4px;cursor:pointer;font-size:13px;display:flex;align-items:center;justify-content:center;gap:4px;transition:all .15s ease;min-height:32px;white-space:nowrap}.toolbar-container-wrapper .toolbar-button:hover{background-color:#f3f4f6;border-color:#9ca3af}.toolbar-container-wrapper .toolbar-button:active,.toolbar-container-wrapper .toolbar-button[data-active=true]{background-color:#06c;color:#fff;border-color:#0052a3;box-shadow:inset 0 1px 3px #0000001a}.toolbar-container-wrapper .toolbar-button:disabled{opacity:.5;cursor:not-allowed;background-color:#f9fafb}.toolbar-container-wrapper .toolbar-more-button{padding:6px 8px;font-size:16px;font-weight:500;line-height:1}.toolbar-container-wrapper .toolbar-separator{width:1px;height:24px;background-color:#d1d5db;margin:0 4px}.toolbar-container-wrapper .toolbar-icon{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;flex-shrink:0}.toolbar-container-wrapper .toolbar-icon svg{width:100%;height:100%}.toolbar-container-wrapper .toolbar-dropdown{position:relative;display:flex;align-items:center}.toolbar-container-wrapper .toolbar-dropdown-arrow{font-size:10px;margin-left:2px;line-height:1}.toolbar-container-wrapper .toolbar-dropdown-menu{position:absolute;top:100%;left:0;background:#fff;border:1px solid #d1d5db;border-radius:6px;box-shadow:0 4px 12px #00000026;z-index:1000;min-width:160px;padding:4px 0;margin-top:4px;display:none}.toolbar-container-wrapper .toolbar-dropdown-menu.show{display:block}.toolbar-container-wrapper .toolbar-dropdown-item{display:block;width:100%;padding:8px 12px;border:none;background:transparent;text-align:left;cursor:pointer;font-size:13px;color:#1f2937;transition:background-color .15s ease;font-family:inherit}.toolbar-container-wrapper .toolbar-dropdown-item:hover{background-color:#f3f4f6}.toolbar-container-wrapper .toolbar-dropdown-item:active{background-color:#e5e7eb}.toolbar-container-wrapper .toolbar-input{padding:6px 8px;border:1px solid #d1d5db;border-radius:4px;font-size:13px;font-family:inherit;background-color:#fff;color:#1f2937;transition:all .15s ease}.toolbar-container-wrapper .toolbar-input:focus{outline:none;border-color:#06c;box-shadow:0 0 0 3px #0066cc1a;background-color:#fff}.toolbar-container-wrapper .toolbar-input::placeholder{color:#9ca3af}.toolbar-overflow-menu{animation:slideDown .2s ease-out}@keyframes slideDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.toolbar-overflow-item{transition:background-color .15s ease}.floating-toolbar{user-select:none;-webkit-user-select:none;font-family:system-ui,-apple-system,sans-serif;font-size:14px;animation:fadeInUp .15s ease-out}@keyframes fadeInUp{0%{opacity:0;transform:translate(-50%) translateY(10px)}to{opacity:1;transform:translate(-50%) translateY(0)}}.floating-toolbar-btn{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;background:transparent;border-radius:4px;color:#495057;cursor:pointer;font-size:14px;font-weight:500;transition:all .15s ease;outline:none}.floating-toolbar-btn:hover{background:#f8f9fa;color:#212529}.floating-toolbar-btn:active{background:#e9ecef;transform:scale(.95)}.floating-toolbar-btn.floating-toolbar-toggle{color:#dc3545;font-weight:700}.floating-toolbar-btn.floating-toolbar-toggle:hover{background:#f8d7da;color:#721c24}.floating-toolbar-separator{width:1px;height:20px;background:#e1e5e9;margin:0 2px}@media(max-width:768px){.toolbar-container-wrapper .toolbar-button{padding:5px 8px;font-size:12px;min-height:28px}.toolbar-container-wrapper .toolbar-icon{width:16px;height:16px}.toolbar-container-wrapper .toolbar-dropdown-menu{min-width:140px}.toolbar-container-wrapper .toolbar-dropdown-item{padding:6px 10px;font-size:12px}.floating-toolbar{padding:4px;gap:2px}.floating-toolbar-btn{width:28px;height:28px;font-size:12px}}@media(max-width:480px){.toolbar-container-wrapper{padding:4px}.toolbar-container-wrapper .toolbar-wrapper{padding:4px;gap:2px}.toolbar-container-wrapper .toolbar-button{padding:4px 6px;font-size:11px;min-height:24px}.toolbar-container-wrapper .toolbar-icon{width:14px;height:14px}}.floating-toolbar{pointer-events:auto}.floating-toolbar{max-width:calc(100vw - 20px);overflow-x:auto}@media(prefers-color-scheme:dark){.floating-toolbar{background:#2d3748;border-color:#4a5568;color:#e2e8f0}.floating-toolbar-btn:hover{background:#4a5568;color:#f7fafc}.floating-toolbar-btn:active{background:#718096}.floating-toolbar-separator{background:#4a5568}}';
3049
3049
  let Gt;
3050
- const di = "__editoraCommandEditorRoot", ui = "__editoraLastCommandButton", To = "editora-editor, [data-editora-editor], .rte-editor, .editora-editor", ko = ".rte-content, .editora-content", xe = /* @__PURE__ */ new Set();
3050
+ const di = "__editoraCommandEditorRoot", ui = "__editoraLastCommandButton", To = "editora-editor, [data-editora-editor], .rte-editor, .editora-editor", ko = ".rte-content, .editora-content", pi = "Rich text editor", xe = /* @__PURE__ */ new Set();
3051
3051
  let Q = null, xo = !1, Ee = null, ve = null;
3052
3052
  function Ao(a) {
3053
3053
  if (!(a instanceof HTMLElement)) return !1;
@@ -3064,7 +3064,7 @@ function St(a) {
3064
3064
  const t = a.matches(To) ? a : a.closest(To);
3065
3065
  return !t || !Ao(t) ? null : t;
3066
3066
  }
3067
- function pi() {
3067
+ function hi() {
3068
3068
  var i;
3069
3069
  if (typeof window == "undefined") return null;
3070
3070
  const a = window[di];
@@ -3098,23 +3098,23 @@ function pi() {
3098
3098
  if (r.isConnected) return r;
3099
3099
  return null;
3100
3100
  }
3101
- function hi() {
3101
+ function mi() {
3102
3102
  if (typeof window == "undefined" || xo) return;
3103
3103
  Ee = typeof window.executeEditorCommand == "function" ? window.executeEditorCommand.bind(window) : null, ve = typeof window.execEditorCommand == "function" ? window.execEditorCommand.bind(window) : null;
3104
3104
  const a = (t, ...e) => {
3105
- const o = pi();
3105
+ const o = hi();
3106
3106
  return o ? o.execCommand(t, ...e) : Ee ? Ee(t, ...e) : ve ? ve(t, ...e) : !1;
3107
3107
  };
3108
3108
  window.executeEditorCommand = a, window.execEditorCommand = a, xo = !0;
3109
3109
  }
3110
- function mi() {
3110
+ function gi() {
3111
3111
  const a = "editora-webcomponent-styles";
3112
3112
  if (!document.getElementById(a)) {
3113
3113
  const t = document.createElement("style");
3114
3114
  t.id = a, t.textContent = ci, document.head.appendChild(t);
3115
3115
  }
3116
3116
  }
3117
- function gi() {
3117
+ function bi() {
3118
3118
  if (!Gt) {
3119
3119
  const a = K.__globalPluginLoader;
3120
3120
  a ? Gt = a : Gt = new Co();
@@ -3123,7 +3123,7 @@ function gi() {
3123
3123
  }
3124
3124
  class K extends HTMLElement {
3125
3125
  constructor() {
3126
- if (super(), this.pluginLoader = gi(), this.config = {}, this.isInitialized = !1, this.keyboardShortcutManager = new vn(), this.lastAutosavedContent = "", this.preservedContent = null, this.loadedPlugins = [], this.lastBeforeInputType = null, mi(), !this.hasAttribute("data-initial-content")) {
3126
+ if (super(), this.pluginLoader = bi(), this.config = {}, this.isInitialized = !1, this.keyboardShortcutManager = new vn(), this.lastAutosavedContent = "", this.preservedContent = null, this.loadedPlugins = [], this.lastBeforeInputType = null, gi(), !this.hasAttribute("data-initial-content")) {
3127
3127
  const t = this.innerHTML.trim();
3128
3128
  t && this.setAttribute("data-initial-content", t);
3129
3129
  }
@@ -3143,6 +3143,7 @@ class K extends HTMLElement {
3143
3143
  "disabled",
3144
3144
  "theme",
3145
3145
  "placeholder",
3146
+ "aria-label",
3146
3147
  "autofocus",
3147
3148
  "autosave",
3148
3149
  "autosave-enabled",
@@ -3224,7 +3225,7 @@ class K extends HTMLElement {
3224
3225
  async initialize() {
3225
3226
  var i;
3226
3227
  if (this.querySelector(".editora-toolbar") || this.isInitialized) return;
3227
- this.setAttribute("data-editora-editor", "true"), xe.add(this), Q || (Q = this), hi(), this.config.height && (this.style.height = typeof this.config.height == "number" ? `${this.config.height}px` : this.config.height), this.config.width && (this.style.width = typeof this.config.width == "number" ? `${this.config.width}px` : this.config.width), this.classList.add("editora-editor"), this.config.theme && this.classList.add(`editora-theme-${this.config.theme}`);
3228
+ this.setAttribute("data-editora-editor", "true"), xe.add(this), Q || (Q = this), mi(), this.config.height && (this.style.height = typeof this.config.height == "number" ? `${this.config.height}px` : this.config.height), this.config.width && (this.style.width = typeof this.config.width == "number" ? `${this.config.width}px` : this.config.width), this.classList.add("editora-editor"), this.config.theme && this.classList.add(`editora-theme-${this.config.theme}`);
3228
3229
  const t = await this.loadPlugins();
3229
3230
  if (this.loadedPlugins = t, t.forEach((r) => {
3230
3231
  if (r.init && typeof r.init == "function")
@@ -3371,12 +3372,13 @@ class K extends HTMLElement {
3371
3372
  return t.bottom >= 0 && t.top <= window.innerHeight;
3372
3373
  }
3373
3374
  applyAccessibilitySettings() {
3375
+ var e;
3374
3376
  if (!this.contentElement) return;
3375
3377
  const t = this.getAccessibilityConfig();
3376
3378
  if (t.enableARIA) {
3377
3379
  this.contentElement.setAttribute("role", "textbox"), this.contentElement.setAttribute("aria-multiline", "true"), this.contentElement.setAttribute("aria-disabled", this.config.readonly ? "true" : "false");
3378
- const e = typeof this.config.placeholder == "string" ? this.config.placeholder.trim() : "";
3379
- e ? this.contentElement.setAttribute("aria-label", e) : this.contentElement.removeAttribute("aria-label");
3380
+ const o = (e = this.getAttribute("aria-label")) == null ? void 0 : e.trim(), i = typeof this.config.placeholder == "string" ? this.config.placeholder.trim() : "";
3381
+ this.contentElement.setAttribute("aria-label", o || i || pi);
3380
3382
  } else
3381
3383
  this.contentElement.removeAttribute("role"), this.contentElement.removeAttribute("aria-multiline"), this.contentElement.removeAttribute("aria-disabled"), this.contentElement.removeAttribute("aria-label");
3382
3384
  this.contentElement.tabIndex = t.keyboardNavigation ? 0 : -1;
@@ -3567,7 +3569,7 @@ class K extends HTMLElement {
3567
3569
  */
3568
3570
  createUI(t, e) {
3569
3571
  const o = this.querySelector('[slot="toolbar"]'), i = this.querySelector('[slot="statusbar"]');
3570
- this.innerHTML = "", this.config.toolbar !== !1 && !o ? (this.toolbarElement = document.createElement("div"), this.toolbarElement.className = "editora-toolbar-container", this.appendChild(this.toolbarElement), this.toolbar = new fn(
3572
+ this.innerHTML = "", this.config.toolbar !== !1 && !o ? (this.toolbarElement = document.createElement("div"), this.toolbarElement.className = "editora-toolbar-container", this.appendChild(this.toolbarElement), this.toolbar = new pn(
3571
3573
  {
3572
3574
  items: this.resolveToolbarItems(),
3573
3575
  sticky: this.isToolbarStickyEnabled(),
@@ -3580,10 +3582,10 @@ class K extends HTMLElement {
3580
3582
  var c;
3581
3583
  if (this.contentElement) {
3582
3584
  this.contentElement.focus();
3583
- const p = window.getSelection();
3584
- if (!p || p.rangeCount === 0 || !this.contentElement.contains(p.anchorNode)) {
3585
+ const f = window.getSelection();
3586
+ if (!f || f.rangeCount === 0 || !this.contentElement.contains(f.anchorNode)) {
3585
3587
  const m = document.createRange(), v = this.contentElement.lastChild || this.contentElement;
3586
- v.nodeType === Node.TEXT_NODE ? m.setStart(v, ((c = v.textContent) == null ? void 0 : c.length) || 0) : v.nodeType === Node.ELEMENT_NODE ? (m.selectNodeContents(v), m.collapse(!1)) : m.setStart(this.contentElement, 0), m.collapse(!0), p == null || p.removeAllRanges(), p == null || p.addRange(m);
3588
+ v.nodeType === Node.TEXT_NODE ? m.setStart(v, ((c = v.textContent) == null ? void 0 : c.length) || 0) : v.nodeType === Node.ELEMENT_NODE ? (m.selectNodeContents(v), m.collapse(!1)) : m.setStart(this.contentElement, 0), m.collapse(!0), f == null || f.removeAllRanges(), f == null || f.addRange(m);
3587
3589
  }
3588
3590
  }
3589
3591
  return this.executeCommand(r, l);
@@ -3597,14 +3599,14 @@ class K extends HTMLElement {
3597
3599
  const r = document.createElement("div");
3598
3600
  r.innerHTML = e.trim(), !Array.from(r.childNodes).some((c) => {
3599
3601
  if (c.nodeType === Node.ELEMENT_NODE) {
3600
- const p = c.tagName;
3601
- return ["P", "DIV", "H1", "H2", "H3", "H4", "H5", "H6", "UL", "OL", "BLOCKQUOTE", "PRE"].includes(p);
3602
+ const f = c.tagName;
3603
+ return ["P", "DIV", "H1", "H2", "H3", "H4", "H5", "H6", "UL", "OL", "BLOCKQUOTE", "PRE"].includes(f);
3602
3604
  }
3603
3605
  return !1;
3604
3606
  }) && e.trim() ? this.contentElement.innerHTML = `<p>${e.trim()}</p>` : this.contentElement.innerHTML = e;
3605
3607
  } else
3606
3608
  this.config.placeholder ? this.contentElement.innerHTML = "" : this.contentElement.innerHTML = "<p><br></p>";
3607
- this.appendChild(this.contentElement), this.isToolbarFloatingEnabled() && (this.floatingToolbar = new pn({ enabled: !0 }), this.floatingToolbar.create(this)), i ? this.appendChild(i) : this.isStatusbarEnabled() && (this.statusBarElement = document.createElement("div"), this.statusBarElement.className = "editora-statusbar-container", this.appendChild(this.statusBarElement), this.statusBar = new hn({ position: this.getStatusbarPosition() }), this.statusBar.create(this.statusBarElement)), this.config.autofocus && setTimeout(() => {
3609
+ this.appendChild(this.contentElement), this.isToolbarFloatingEnabled() && (this.floatingToolbar = new fn({ enabled: !0 }), this.floatingToolbar.create(this)), i ? this.appendChild(i) : this.isStatusbarEnabled() && (this.statusBarElement = document.createElement("div"), this.statusBarElement.className = "editora-statusbar-container", this.appendChild(this.statusBarElement), this.statusBar = new hn({ position: this.getStatusbarPosition() }), this.statusBar.create(this.statusBarElement)), this.config.autofocus && setTimeout(() => {
3608
3610
  var r;
3609
3611
  return (r = this.contentElement) == null ? void 0 : r.focus();
3610
3612
  }, 0);
@@ -3621,9 +3623,9 @@ class K extends HTMLElement {
3621
3623
  var C;
3622
3624
  if (!this.contentElement) return;
3623
3625
  let i = this.contentElement.innerHTML;
3624
- const r = (C = o == null ? void 0 : o.detail) == null ? void 0 : C.allowedTags, l = this.getPerformanceConfig(), c = this.getContentSanitizeConfig(), p = this.getSecurityConfig(), m = this.lastBeforeInputType;
3625
- if (this.lastBeforeInputType = null, p.sanitizeOnInput !== !1 && c.sanitize !== !1 && !m) {
3626
- const w = wo(i, c, p, r);
3626
+ const r = (C = o == null ? void 0 : o.detail) == null ? void 0 : C.allowedTags, l = this.getPerformanceConfig(), c = this.getContentSanitizeConfig(), f = this.getSecurityConfig(), m = this.lastBeforeInputType;
3627
+ if (this.lastBeforeInputType = null, f.sanitizeOnInput !== !1 && c.sanitize !== !1 && !m) {
3628
+ const w = wo(i, c, f, r);
3627
3629
  if (w !== i) {
3628
3630
  const E = window.getSelection(), Y = E && E.rangeCount > 0 ? E.getRangeAt(0) : null;
3629
3631
  if (this.contentElement.innerHTML = w, Y && E)
@@ -3652,7 +3654,7 @@ class K extends HTMLElement {
3652
3654
  o.preventDefault();
3653
3655
  const i = this.config.paste || {};
3654
3656
  let r = ((v = o.clipboardData) == null ? void 0 : v.getData("text/html")) || "";
3655
- const l = ((A = o.clipboardData) == null ? void 0 : A.getData("text/plain")) || "", c = this.getContentSanitizeConfig(), p = this.getSecurityConfig(), m = !!r && /class=["'][^"']*Mso|xmlns:w=|urn:schemas-microsoft-com:office/i.test(r);
3657
+ const l = ((A = o.clipboardData) == null ? void 0 : A.getData("text/plain")) || "", c = this.getContentSanitizeConfig(), f = this.getSecurityConfig(), m = !!r && /class=["'][^"']*Mso|xmlns:w=|urn:schemas-microsoft-com:office/i.test(r);
3656
3658
  if ((i.clean || !i.keepFormatting) && l) {
3657
3659
  document.execCommand("insertText", !1, l);
3658
3660
  return;
@@ -3662,7 +3664,7 @@ class K extends HTMLElement {
3662
3664
  return;
3663
3665
  }
3664
3666
  if (r) {
3665
- p.sanitizeOnPaste !== !1 && c.sanitize !== !1 && (r = ai(r, c, p)), this.insertHTMLAtSelection(r);
3667
+ f.sanitizeOnPaste !== !1 && c.sanitize !== !1 && (r = ai(r, c, f)), this.insertHTMLAtSelection(r);
3666
3668
  return;
3667
3669
  }
3668
3670
  l && document.execCommand("insertText", !1, l);
@@ -3752,14 +3754,14 @@ class K extends HTMLElement {
3752
3754
  if (t.viewportOnlyScan && !this.isEditorInViewport() && !e)
3753
3755
  return;
3754
3756
  const o = this.contentElement.textContent || "", { words: i, chars: r } = yn(o), l = bn(this.contentElement);
3755
- let c, p;
3757
+ let c, f;
3756
3758
  const m = this.getSelectionRangeInEditor();
3757
- m && (c = mn(this.contentElement, m), m.collapsed || (p = En(m, c), c = void 0)), this.statusBar.update({
3759
+ m && (c = mn(this.contentElement, m), m.collapsed || (f = En(m, c), c = void 0)), this.statusBar.update({
3758
3760
  wordCount: i,
3759
3761
  charCount: r,
3760
3762
  lineCount: l,
3761
3763
  cursorPosition: c,
3762
- selectionInfo: p
3764
+ selectionInfo: f
3763
3765
  });
3764
3766
  }
3765
3767
  /**
@@ -3785,6 +3787,7 @@ class K extends HTMLElement {
3785
3787
  case "placeholder":
3786
3788
  this.contentElement && (this.contentElement.setAttribute("data-placeholder", e), this.applyAccessibilitySettings());
3787
3789
  break;
3790
+ case "aria-label":
3788
3791
  case "accessibility":
3789
3792
  case "accessibility-enable-aria":
3790
3793
  case "accessibility-keyboard-navigation":
@@ -3907,7 +3910,7 @@ class K extends HTMLElement {
3907
3910
  }
3908
3911
  const Ae = new Co();
3909
3912
  K.__globalPluginLoader = Ae;
3910
- const bi = {
3913
+ const yi = {
3911
3914
  // Core editing plugins (always loaded)
3912
3915
  bold: () => import("./BoldPlugin.native-CSh_LiIJ.mjs").then((a) => a.BoldPlugin()),
3913
3916
  italic: () => import("./ItalicPlugin.native-CmnlwFHB.mjs").then((a) => a.ItalicPlugin()),
@@ -3915,17 +3918,17 @@ const bi = {
3915
3918
  strikethrough: () => import("./StrikethroughPlugin.native-V0TL4F48.mjs").then((a) => a.StrikethroughPlugin()),
3916
3919
  clearFormatting: () => import("./ClearFormattingPlugin.native-Pp0O-SBf.mjs").then((a) => a.ClearFormattingPlugin()),
3917
3920
  heading: () => import("./HeadingPlugin.native-DZdvubrQ.mjs").then((a) => a.HeadingPlugin()),
3918
- blockquote: () => import("./BlockquotePlugin.native-57_Xcjl1.mjs").then((a) => a.BlockquotePlugin()),
3919
- code: () => import("./CodePlugin.native-Rgxx2Igx.mjs").then((a) => a.CodePlugin()),
3921
+ blockquote: () => import("./BlockquotePlugin.native-D8jjGd0c.mjs").then((a) => a.BlockquotePlugin()),
3922
+ code: () => import("./CodePlugin.native-CEgR1DWC.mjs").then((a) => a.CodePlugin()),
3920
3923
  list: () => import("./ListPlugin.native-Bt0LANbO.mjs").then((a) => a.ListPlugin()),
3921
3924
  history: () => import("./HistoryPlugin.native-DPvhks6h.mjs").then((a) => a.HistoryPlugin())
3922
3925
  };
3923
- async function yi() {
3924
- return Object.entries(bi).forEach(([a, t]) => {
3926
+ async function Ei() {
3927
+ return Object.entries(yi).forEach(([a, t]) => {
3925
3928
  Ae.register(a, t);
3926
3929
  }), Ae;
3927
3930
  }
3928
- typeof window != "undefined" && yi().then((a) => {
3931
+ typeof window != "undefined" && Ei().then((a) => {
3929
3932
  K.__globalPluginLoader = a, customElements.get("editora-editor") || customElements.define("editora-editor", K);
3930
3933
  const t = document.querySelectorAll("editora-editor:not([data-initial-content])"), e = [];
3931
3934
  t.forEach((o) => {
@@ -3936,6 +3939,6 @@ typeof window != "undefined" && yi().then((a) => {
3936
3939
  });
3937
3940
  });
3938
3941
  export {
3939
- yi as initWebComponent
3942
+ Ei as initWebComponent
3940
3943
  };
3941
3944
  //# sourceMappingURL=webcomponent-core.js.map