@editora/core 1.0.18 → 1.0.20

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 (36) 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-BH-K4xmW.mjs → CodePlugin.native-BcVqm5MS.mjs} +64 -65
  7. package/dist/{CodePlugin.native-hNgfXlfS.mjs → CodePlugin.native-Rgxx2Igx.mjs} +2708 -1225
  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/{DocumentManagerPlugin.native-iFip6s4Q.mjs → DocumentManagerPlugin.native-B8K-Oqom.mjs} +12 -11
  12. package/dist/{FontFamilyPlugin.native-M3cNQ0KA.mjs → FontFamilyPlugin.native-DLq9x046.mjs} +32 -32
  13. package/dist/{PreviewPlugin.native-CiR51jql.mjs → PreviewPlugin.native-Dv5OsffK.mjs} +49 -52
  14. package/dist/{SpellCheckPlugin.native-Bef2oTLB.mjs → SpellCheckPlugin.native-BGm2qPfn.mjs} +20 -20
  15. package/dist/{TablePlugin.native-BjIxYZ2X.mjs → TablePlugin.native-C1YZ372P.mjs} +156 -147
  16. package/dist/TemplatePlugin.native-Dwk8TgxI.mjs +628 -0
  17. package/dist/{documentManager-BcBIv5P-.mjs → documentManager-BWK_-KJp.mjs} +524 -526
  18. package/dist/editora.min.js +17 -17
  19. package/dist/editora.umd.js +17 -17
  20. package/dist/{index-XsYC_KdJ.mjs → index-BxlbmLsp.mjs} +428 -405
  21. package/dist/index-Cdy6TOCy.js +12 -0
  22. package/dist/index.cjs.js +4 -4
  23. package/dist/index.esm.js +19 -16
  24. package/dist/plugin-loader.js +13 -13
  25. package/dist/purify.es-BHa5gZB7.mjs +1481 -0
  26. package/dist/sanitizeHtml-DA0ajC6k.mjs +17 -0
  27. package/dist/webcomponent-core.js +466 -449
  28. package/dist/webcomponent-core.min.js +91 -89
  29. package/dist/webcomponent.cjs.js +1 -1
  30. package/dist/webcomponent.esm.js +2 -2
  31. package/dist/webcomponent.js +397 -380
  32. package/dist/webcomponent.min.js +968 -967
  33. package/index.d.ts +9 -0
  34. package/package.json +1 -1
  35. package/dist/TemplatePlugin.native-D6n5RUnC.mjs +0 -1176
  36. package/dist/index-_eKRBZPq.js +0 -12
@@ -1,4 +1,4 @@
1
- class Co {
1
+ class Ao {
2
2
  constructor() {
3
3
  this.loadedPlugins = /* @__PURE__ */ new Map(), this.pluginRegistry = /* @__PURE__ */ new Map();
4
4
  }
@@ -72,19 +72,19 @@ class Co {
72
72
  return this.loadedPlugins.has(t);
73
73
  }
74
74
  }
75
- class Gt {
75
+ class Kt {
76
76
  constructor(t, e, n) {
77
77
  this.doc = t, this.selection = e, this.schema = n;
78
78
  }
79
79
  static create(t, e) {
80
80
  const n = e || t.node("doc", {}, [t.node("paragraph")]);
81
- return new Gt(n, { anchor: 0, head: 0 }, t);
81
+ return new Kt(n, { anchor: 0, head: 0 }, t);
82
82
  }
83
83
  apply(t, e) {
84
- return new Gt(t, e || this.selection, this.schema);
84
+ return new Kt(t, e || this.selection, this.schema);
85
85
  }
86
86
  }
87
- class an {
87
+ class ln {
88
88
  constructor(t, e) {
89
89
  this.nodes = new Map(Object.entries(t)), this.marks = new Map(Object.entries(e));
90
90
  }
@@ -95,7 +95,7 @@ class an {
95
95
  return { type: "text", text: t, marks: e };
96
96
  }
97
97
  }
98
- class sn {
98
+ class cn {
99
99
  constructor() {
100
100
  this.plugins = [], this.pluginConfigs = /* @__PURE__ */ new Map();
101
101
  }
@@ -132,7 +132,7 @@ class sn {
132
132
  const t = {}, e = {};
133
133
  return this.plugins.forEach((n) => {
134
134
  n.nodes && Object.assign(t, n.nodes), n.marks && Object.assign(e, n.marks);
135
- }), new an(t, e);
135
+ }), new ln(t, e);
136
136
  }
137
137
  getCommands() {
138
138
  const t = {};
@@ -186,7 +186,7 @@ class sn {
186
186
  await Promise.all(t), this.plugins = [], this.pluginConfigs.clear();
187
187
  }
188
188
  }
189
- class ln {
189
+ class dn {
190
190
  constructor(t = {}) {
191
191
  this.commands = /* @__PURE__ */ new Map(), Object.entries(t).forEach(([e, n]) => {
192
192
  this.register(e, n);
@@ -229,11 +229,11 @@ class ln {
229
229
  this.commands.clear();
230
230
  }
231
231
  }
232
- class cn {
232
+ class un {
233
233
  constructor(t = {}) {
234
- this.listeners = /* @__PURE__ */ new Map(), this.isReadonly = !1, this.isDestroyed = !1, this.isReadonly = t.readonly || !1, this.pluginManager = new sn(), t.plugins && Array.isArray(t.plugins) && t.plugins.forEach((n) => this.pluginManager.register(n));
234
+ this.listeners = /* @__PURE__ */ new Map(), this.isReadonly = !1, this.isDestroyed = !1, this.isReadonly = t.readonly || !1, this.pluginManager = new cn(), t.plugins && Array.isArray(t.plugins) && t.plugins.forEach((n) => this.pluginManager.register(n));
235
235
  const e = this.pluginManager.buildSchema();
236
- this.state = Gt.create(e), this.commandRegistry = new ln(this.pluginManager.getCommands());
236
+ this.state = Kt.create(e), this.commandRegistry = new dn(this.pluginManager.getCommands());
237
237
  }
238
238
  /**
239
239
  * Execute a command
@@ -315,7 +315,7 @@ class cn {
315
315
  return this.isDestroyed;
316
316
  }
317
317
  }
318
- class dn {
318
+ class pn {
319
319
  constructor(t, e, n) {
320
320
  this.overflowUnits = [], this.overflowUnitHomes = /* @__PURE__ */ new WeakMap(), this.expandedOpen = !1, this.onDocumentPointerDownForOverflow = (r) => {
321
321
  var l, c;
@@ -446,8 +446,8 @@ class dn {
446
446
  });
447
447
  return;
448
448
  }
449
- const C = l[E] || E;
450
- let A = a.get(C);
449
+ const x = l[E] || E;
450
+ let A = a.get(x);
451
451
  A || (A = a.get(E)), A && f.push({
452
452
  id: E,
453
453
  label: A.label,
@@ -503,10 +503,10 @@ class dn {
503
503
  var R;
504
504
  D.parentElement === r && ((R = this.overflowUnitHomes.get(D)) == null || R.appendChild(D));
505
505
  });
506
- const f = t.clientWidth, m = 16, E = 40, C = 4, A = Math.max(0, f - m - E - C);
506
+ const f = t.clientWidth, m = 16, E = 40, x = 4, A = Math.max(0, f - m - E - x);
507
507
  let w = 0, v = 0;
508
508
  for (const D of c) {
509
- const R = D.getBoundingClientRect().width + C;
509
+ const R = D.getBoundingClientRect().width + x;
510
510
  if (w + R <= A)
511
511
  w += R, v++;
512
512
  else
@@ -690,7 +690,7 @@ class dn {
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 un {
693
+ class fn {
694
694
  constructor(t) {
695
695
  this.visible = !1, this.config = t;
696
696
  }
@@ -732,7 +732,7 @@ class un {
732
732
  this.container && this.container.parentNode && this.container.parentNode.removeChild(this.container), this.container = void 0, this.visible = !1;
733
733
  }
734
734
  }
735
- class pn {
735
+ class hn {
736
736
  constructor(t = {}) {
737
737
  this.statusInfo = {}, this.config = t;
738
738
  }
@@ -792,12 +792,12 @@ class pn {
792
792
  this.container && this.container.parentNode && this.container.parentNode.removeChild(this.container), this.container = void 0;
793
793
  }
794
794
  }
795
- function fn(o, t) {
796
- const e = o.textContent || "", n = hn(o, t.startContainer, t.startOffset), a = e.substring(0, n).split(`
795
+ function mn(o, t) {
796
+ const e = o.textContent || "", n = gn(o, t.startContainer, t.startOffset), a = e.substring(0, n).split(`
797
797
  `), l = a.length, c = a[a.length - 1].length + 1;
798
798
  return { line: l, column: c };
799
799
  }
800
- function hn(o, t, e) {
800
+ function gn(o, t, e) {
801
801
  var l;
802
802
  let n = 0;
803
803
  const r = document.createTreeWalker(
@@ -815,7 +815,7 @@ function hn(o, t, e) {
815
815
  }
816
816
  return n;
817
817
  }
818
- function mn(o) {
818
+ function bn(o) {
819
819
  var n, r;
820
820
  const t = o.querySelectorAll("div, p, br, h1, h2, h3, h4, h5, h6, blockquote, li, pre");
821
821
  let e = 1;
@@ -830,11 +830,11 @@ function mn(o) {
830
830
  }
831
831
  return e;
832
832
  }
833
- function gn(o) {
833
+ function yn(o) {
834
834
  const t = o.trim() ? o.trim().split(/\s+/).length : 0, e = o.length;
835
835
  return { words: t, chars: e };
836
836
  }
837
- function bn(o, t) {
837
+ function vn(o, t) {
838
838
  const e = o.toString();
839
839
  return {
840
840
  startLine: t.line,
@@ -846,7 +846,7 @@ function bn(o, t) {
846
846
  selectedWords: e.trim().split(/\s+/).filter(Boolean).length
847
847
  };
848
848
  }
849
- class yn {
849
+ class En {
850
850
  constructor(t) {
851
851
  this.shortcuts = /* @__PURE__ */ new Map(), this.enabled = !0, this.isMac = typeof navigator != "undefined" && navigator.platform.toUpperCase().indexOf("MAC") >= 0, (t == null ? void 0 : t.enabled) === !1 && (this.enabled = !1), this.registerDefaultShortcuts(), t != null && t.shortcuts && t.shortcuts.forEach((e) => this.registerShortcut(e)), t != null && t.customShortcuts && Object.values(t.customShortcuts).forEach((e) => {
852
852
  this.registerShortcut(e);
@@ -1181,15 +1181,15 @@ class yn {
1181
1181
  return t.includes("toggle") && (t.includes("Bold") || t.includes("Italic") || t.includes("Underline") || t.includes("Strike") || t.includes("Code") || t.includes("Super") || t.includes("Sub")) ? "Text Formatting" : t.includes("Heading") || t.includes("Paragraph") ? "Block Formatting" : t.includes("List") || t.includes("Checklist") ? "Lists" : t.includes("Alignment") || t.includes("Indent") ? "Alignment & Indentation" : t.includes("undo") || t.includes("redo") ? "History" : t.includes("insert") ? "Insert" : t.includes("find") || t.includes("replace") ? "Find & Replace" : t.includes("Accessibility") || t.includes("spell") ? "Tools" : "Other";
1182
1182
  }
1183
1183
  }
1184
- function io(o, t) {
1184
+ function ro(o, t) {
1185
1185
  (t == null || t > o.length) && (t = o.length);
1186
1186
  for (var e = 0, n = Array(t); e < t; e++) n[e] = o[e];
1187
1187
  return n;
1188
1188
  }
1189
- function vn(o) {
1189
+ function wn(o) {
1190
1190
  if (Array.isArray(o)) return o;
1191
1191
  }
1192
- function En(o, t) {
1192
+ function kn(o, t) {
1193
1193
  var e = o == null ? null : typeof Symbol != "undefined" && o[Symbol.iterator] || o["@@iterator"];
1194
1194
  if (e != null) {
1195
1195
  var n, r, a, l, c = [], f = !0, m = !1;
@@ -1207,127 +1207,127 @@ function En(o, t) {
1207
1207
  return c;
1208
1208
  }
1209
1209
  }
1210
- function wn() {
1210
+ function Tn() {
1211
1211
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1212
1212
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1213
1213
  }
1214
- function kn(o, t) {
1215
- return vn(o) || En(o, t) || Tn(o, t) || wn();
1214
+ function Cn(o, t) {
1215
+ return wn(o) || kn(o, t) || xn(o, t) || Tn();
1216
1216
  }
1217
- function Tn(o, t) {
1217
+ function xn(o, t) {
1218
1218
  if (o) {
1219
- if (typeof o == "string") return io(o, t);
1219
+ if (typeof o == "string") return ro(o, t);
1220
1220
  var e = {}.toString.call(o).slice(8, -1);
1221
- return e === "Object" && o.constructor && (e = o.constructor.name), e === "Map" || e === "Set" ? Array.from(o) : e === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e) ? io(o, t) : void 0;
1221
+ return e === "Object" && o.constructor && (e = o.constructor.name), e === "Map" || e === "Set" ? Array.from(o) : e === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e) ? ro(o, t) : void 0;
1222
1222
  }
1223
1223
  }
1224
- const Ao = Object.entries, ro = Object.setPrototypeOf, xn = Object.isFrozen, Cn = Object.getPrototypeOf, An = Object.getOwnPropertyDescriptor;
1225
- let M = Object.freeze, P = Object.seal, gt = Object.create, So = typeof Reflect != "undefined" && Reflect, we = So.apply, ke = So.construct;
1224
+ const So = Object.entries, ao = Object.setPrototypeOf, An = Object.isFrozen, Sn = Object.getPrototypeOf, _n = Object.getOwnPropertyDescriptor;
1225
+ let M = Object.freeze, I = Object.seal, gt = Object.create, _o = typeof Reflect != "undefined" && Reflect, ke = _o.apply, Te = _o.construct;
1226
1226
  M || (M = function(t) {
1227
1227
  return t;
1228
1228
  });
1229
- P || (P = function(t) {
1229
+ I || (I = function(t) {
1230
1230
  return t;
1231
1231
  });
1232
- we || (we = function(t, e) {
1232
+ ke || (ke = function(t, e) {
1233
1233
  for (var n = arguments.length, r = new Array(n > 2 ? n - 2 : 0), a = 2; a < n; a++) r[a - 2] = arguments[a];
1234
1234
  return t.apply(e, r);
1235
1235
  });
1236
- ke || (ke = function(t) {
1236
+ Te || (Te = function(t) {
1237
1237
  for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++) n[r - 1] = arguments[r];
1238
1238
  return new t(...n);
1239
1239
  });
1240
- const rt = L(Array.prototype.forEach), Sn = L(Array.prototype.lastIndexOf), ao = L(Array.prototype.pop), Tt = L(Array.prototype.push), _n = L(Array.prototype.splice), bt = Array.isArray, St = L(String.prototype.toLowerCase), fe = L(String.prototype.toString), so = L(String.prototype.match), xt = L(String.prototype.replace), lo = L(String.prototype.indexOf), Ln = L(String.prototype.trim), Mn = L(Number.prototype.toString), Pn = L(Boolean.prototype.toString), co = typeof BigInt == "undefined" ? null : L(BigInt.prototype.toString), uo = typeof Symbol == "undefined" ? null : L(Symbol.prototype.toString), z = L(Object.prototype.hasOwnProperty), Ct = L(Object.prototype.toString), I = L(RegExp.prototype.test), Z = In(TypeError);
1240
+ const rt = L(Array.prototype.forEach), Ln = L(Array.prototype.lastIndexOf), so = L(Array.prototype.pop), Tt = L(Array.prototype.push), Mn = L(Array.prototype.splice), bt = Array.isArray, _t = L(String.prototype.toLowerCase), he = L(String.prototype.toString), lo = L(String.prototype.match), Ct = L(String.prototype.replace), co = L(String.prototype.indexOf), In = L(String.prototype.trim), Pn = 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), xt = L(Object.prototype.toString), P = L(RegExp.prototype.test), Z = On(TypeError);
1241
1241
  function L(o) {
1242
1242
  return function(t) {
1243
1243
  t instanceof RegExp && (t.lastIndex = 0);
1244
1244
  for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++) n[r - 1] = arguments[r];
1245
- return we(o, t, n);
1245
+ return ke(o, t, n);
1246
1246
  };
1247
1247
  }
1248
- function In(o) {
1248
+ function On(o) {
1249
1249
  return function() {
1250
1250
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n];
1251
- return ke(o, e);
1251
+ return Te(o, e);
1252
1252
  };
1253
1253
  }
1254
1254
  function y(o, t) {
1255
- let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : St;
1256
- if (ro && ro(o, null), !bt(t)) return o;
1255
+ let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _t;
1256
+ if (ao && ao(o, null), !bt(t)) return o;
1257
1257
  let n = t.length;
1258
1258
  for (; n--; ) {
1259
1259
  let r = t[n];
1260
1260
  if (typeof r == "string") {
1261
1261
  const a = e(r);
1262
- a !== r && (xn(t) || (t[n] = a), r = a);
1262
+ a !== r && (An(t) || (t[n] = a), r = a);
1263
1263
  }
1264
1264
  o[r] = !0;
1265
1265
  }
1266
1266
  return o;
1267
1267
  }
1268
- function Dn(o) {
1268
+ function Rn(o) {
1269
1269
  for (let t = 0; t < o.length; t++) z(o, t) || (o[t] = null);
1270
1270
  return o;
1271
1271
  }
1272
1272
  function H(o) {
1273
1273
  const t = gt(null);
1274
- for (const n of Ao(o)) {
1275
- var e = kn(n, 2);
1274
+ for (const n of So(o)) {
1275
+ var e = Cn(n, 2);
1276
1276
  const r = e[0], a = e[1];
1277
- z(o, r) && (bt(a) ? t[r] = Dn(a) : a && typeof a == "object" && a.constructor === Object ? t[r] = H(a) : t[r] = a);
1277
+ z(o, r) && (bt(a) ? t[r] = Rn(a) : a && typeof a == "object" && a.constructor === Object ? t[r] = H(a) : t[r] = a);
1278
1278
  }
1279
1279
  return t;
1280
1280
  }
1281
- function On(o) {
1281
+ function Nn(o) {
1282
1282
  switch (typeof o) {
1283
1283
  case "string":
1284
1284
  return o;
1285
1285
  case "number":
1286
- return Mn(o);
1287
- case "boolean":
1288
1286
  return Pn(o);
1287
+ case "boolean":
1288
+ return Dn(o);
1289
1289
  case "bigint":
1290
- return co ? co(o) : "0";
1290
+ return uo ? uo(o) : "0";
1291
1291
  case "symbol":
1292
- return uo ? uo(o) : "Symbol()";
1292
+ return po ? po(o) : "Symbol()";
1293
1293
  case "undefined":
1294
- return Ct(o);
1294
+ return xt(o);
1295
1295
  case "function":
1296
1296
  case "object": {
1297
- if (o === null) return Ct(o);
1297
+ if (o === null) return xt(o);
1298
1298
  const t = o, e = j(t, "toString");
1299
1299
  if (typeof e == "function") {
1300
1300
  const n = e(t);
1301
- return typeof n == "string" ? n : Ct(n);
1301
+ return typeof n == "string" ? n : xt(n);
1302
1302
  }
1303
- return Ct(o);
1303
+ return xt(o);
1304
1304
  }
1305
1305
  default:
1306
- return Ct(o);
1306
+ return xt(o);
1307
1307
  }
1308
1308
  }
1309
1309
  function j(o, t) {
1310
1310
  for (; o !== null; ) {
1311
- const n = An(o, t);
1311
+ const n = _n(o, t);
1312
1312
  if (n) {
1313
1313
  if (n.get) return L(n.get);
1314
1314
  if (typeof n.value == "function") return L(n.value);
1315
1315
  }
1316
- o = Cn(o);
1316
+ o = Sn(o);
1317
1317
  }
1318
1318
  function e() {
1319
1319
  return null;
1320
1320
  }
1321
1321
  return e;
1322
1322
  }
1323
- function Rn(o) {
1323
+ function zn(o) {
1324
1324
  try {
1325
- return I(o, ""), !0;
1325
+ return P(o, ""), !0;
1326
1326
  } catch (t) {
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",
@@ -1447,7 +1447,7 @@ const po = M([
1447
1447
  "var",
1448
1448
  "video",
1449
1449
  "wbr"
1450
- ]), he = M([
1450
+ ]), me = M([
1451
1451
  "svg",
1452
1452
  "a",
1453
1453
  "altglyph",
@@ -1495,7 +1495,7 @@ const po = M([
1495
1495
  "tspan",
1496
1496
  "view",
1497
1497
  "vkern"
1498
- ]), me = M([
1498
+ ]), ge = M([
1499
1499
  "feBlend",
1500
1500
  "feColorMatrix",
1501
1501
  "feComponentTransfer",
@@ -1521,7 +1521,7 @@ const po = M([
1521
1521
  "feSpotLight",
1522
1522
  "feTile",
1523
1523
  "feTurbulence"
1524
- ]), Nn = M([
1524
+ ]), Bn = M([
1525
1525
  "animate",
1526
1526
  "color-profile",
1527
1527
  "cursor",
@@ -1544,7 +1544,7 @@ const po = M([
1544
1544
  "solidcolor",
1545
1545
  "unknown",
1546
1546
  "use"
1547
- ]), ge = M([
1547
+ ]), be = M([
1548
1548
  "math",
1549
1549
  "menclose",
1550
1550
  "merror",
@@ -1575,7 +1575,7 @@ const po = M([
1575
1575
  "munder",
1576
1576
  "munderover",
1577
1577
  "mprescripts"
1578
- ]), zn = M([
1578
+ ]), Fn = M([
1579
1579
  "maction",
1580
1580
  "maligngroup",
1581
1581
  "malignmark",
@@ -1591,7 +1591,7 @@ const po = M([
1591
1591
  "annotation-xml",
1592
1592
  "mprescripts",
1593
1593
  "none"
1594
- ]), fo = M(["#text"]), ho = M([
1594
+ ]), ho = M(["#text"]), mo = M([
1595
1595
  "accept",
1596
1596
  "action",
1597
1597
  "align",
@@ -1710,7 +1710,7 @@ const po = M([
1710
1710
  "width",
1711
1711
  "wrap",
1712
1712
  "xmlns"
1713
- ]), be = M([
1713
+ ]), ye = M([
1714
1714
  "accent-height",
1715
1715
  "accumulate",
1716
1716
  "additive",
@@ -1903,7 +1903,7 @@ const po = M([
1903
1903
  "y2",
1904
1904
  "z",
1905
1905
  "zoomandpan"
1906
- ]), mo = M([
1906
+ ]), go = M([
1907
1907
  "accent",
1908
1908
  "accentunder",
1909
1909
  "align",
@@ -1958,13 +1958,13 @@ const po = M([
1958
1958
  "voffset",
1959
1959
  "width",
1960
1960
  "xmlns"
1961
- ]), jt = M([
1961
+ ]), Wt = M([
1962
1962
  "xlink:href",
1963
1963
  "xml:id",
1964
1964
  "xlink:title",
1965
1965
  "xml:space",
1966
1966
  "xmlns:xlink"
1967
- ]), Bn = P(/{{[\w\W]*|^[\w\W]*}}/g), Fn = P(/<%[\w\W]*|^[\w\W]*%>/g), Hn = P(/\${[\w\W]*/g), Un = P(/^data-[\-\w.\u00B7-\uFFFF]+$/), jn = P(/^aria-[\-\w]+$/), go = P(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Wn = P(/^(?:\w+script|data):/i), $n = P(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Gn = P(/^html$/i), Kn = P(/^[a-z][.\w]*(-[.\w]+)+$/i), bo = P(/<[/\w!]/g), yo = P(/<[/\w]/g), Yn = P(/<\/no(script|embed|frames)/i), qn = P(/\/>/i), F = {
1967
+ ]), Hn = I(/{{[\w\W]*|^[\w\W]*}}/g), Un = I(/<%[\w\W]*|^[\w\W]*%>/g), jn = I(/\${[\w\W]*/g), Wn = I(/^data-[\-\w.\u00B7-\uFFFF]+$/), $n = I(/^aria-[\-\w]+$/), bo = I(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Gn = I(/^(?:\w+script|data):/i), Kn = I(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Yn = I(/^html$/i), qn = I(/^[a-z][.\w]*(-[.\w]+)+$/i), yo = I(/<[/\w!]/g), vo = I(/<[/\w]/g), Vn = I(/<\/no(script|embed|frames)/i), Xn = I(/\/>/i), F = {
1968
1968
  element: 1,
1969
1969
  attribute: 2,
1970
1970
  text: 3,
@@ -1977,7 +1977,7 @@ const po = M([
1977
1977
  documentType: 10,
1978
1978
  documentFragment: 11,
1979
1979
  notation: 12
1980
- }, _o = [
1980
+ }, Lo = [
1981
1981
  "style",
1982
1982
  "script",
1983
1983
  "xmp",
@@ -1986,14 +1986,14 @@ const po = M([
1986
1986
  "noframes",
1987
1987
  "plaintext",
1988
1988
  "noscript"
1989
- ], Vn = M(y({}, _o)), Xn = (function() {
1989
+ ], Zn = M(y({}, Lo)), Jn = (function() {
1990
1990
  const o = {};
1991
- return rt(_o, (t) => {
1992
- o[t] = P(new RegExp("</" + t + "(?=[\\t\\n\\f\\r />])", "i"));
1991
+ return rt(Lo, (t) => {
1992
+ o[t] = I(new RegExp("</" + t + "(?=[\\t\\n\\f\\r />])", "i"));
1993
1993
  }), M(o);
1994
- })(), Zn = function() {
1994
+ })(), Qn = function() {
1995
1995
  return typeof window == "undefined" ? null : window;
1996
- }, Jn = function(t, e) {
1996
+ }, ti = function(t, e) {
1997
1997
  if (typeof t != "object" || typeof t.createPolicy != "function") return null;
1998
1998
  let n = null;
1999
1999
  const r = "data-tt-policy-suffix";
@@ -2011,7 +2011,7 @@ const po = M([
2011
2011
  } catch (l) {
2012
2012
  return console.warn("TrustedTypes policy " + a + " could not be created."), null;
2013
2013
  }
2014
- }, vo = function() {
2014
+ }, Eo = function() {
2015
2015
  return {
2016
2016
  afterSanitizeAttributes: [],
2017
2017
  afterSanitizeElements: [],
@@ -2025,13 +2025,13 @@ const po = M([
2025
2025
  };
2026
2026
  }, J = function(t, e, n, r) {
2027
2027
  return z(t, e) && bt(t[e]) ? y(r.base ? H(r.base) : {}, t[e], r.transform) : n;
2028
- }, ye = function(t, e, n) {
2028
+ }, ve = function(t, e, n) {
2029
2029
  const r = z(t, e) ? t[e] : void 0;
2030
2030
  return r && typeof r == "object" ? H(r) : n();
2031
2031
  };
2032
- function Lo() {
2033
- let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Zn();
2034
- const t = (u) => Lo(u);
2032
+ function Mo() {
2033
+ let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Qn();
2034
+ const t = (u) => Mo(u);
2035
2035
  if (t.version = "3.4.16", t.removed = [], !o || !o.document || o.document.nodeType !== F.document || !o.Element)
2036
2036
  return t.isSupported = !1, t;
2037
2037
  let e = o.document;
@@ -2039,52 +2039,52 @@ function Lo() {
2039
2039
  o.DocumentFragment;
2040
2040
  const a = o.HTMLTemplateElement, l = o.Node, c = o.Element, f = o.NodeFilter;
2041
2041
  o.NamedNodeMap === void 0 && (o.NamedNodeMap || o.MozNamedAttrMap), o.HTMLFormElement;
2042
- const m = o.DOMParser, E = o.trustedTypes, C = c.prototype, A = j(C, "cloneNode"), w = j(C, "remove"), v = j(C, "removeAttributeNode"), Y = j(C, "nextSibling"), D = j(C, "childNodes"), R = j(C, "parentNode"), Ce = j(C, "shadowRoot"), qt = j(C, "attributes"), tt = l && l.prototype ? j(l.prototype, "nodeType") : null, at = l && l.prototype ? j(l.prototype, "nodeName") : null, _t = l && l.prototype ? j(l.prototype, "ownerDocument") : null, yt = function(i) {
2042
+ const m = o.DOMParser, E = o.trustedTypes, x = c.prototype, A = j(x, "cloneNode"), w = j(x, "remove"), v = j(x, "removeAttributeNode"), Y = j(x, "nextSibling"), D = j(x, "childNodes"), R = j(x, "parentNode"), Ae = j(x, "shadowRoot"), Vt = j(x, "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(i) {
2043
2043
  return tt ? tt(i) : i.nodeType;
2044
- }, Vt = function(i) {
2044
+ }, Xt = function(i) {
2045
2045
  return at ? at(i) : i.nodeName;
2046
2046
  };
2047
2047
  if (typeof a == "function") {
2048
2048
  const u = e.createElement("template");
2049
2049
  u.content && u.content.ownerDocument && (e = u.content.ownerDocument);
2050
2050
  }
2051
- let N, et = "", Xt, Ae = !1, vt = 0;
2052
- const Se = function() {
2051
+ let N, et = "", Zt, Se = !1, vt = 0;
2052
+ const _e = function() {
2053
2053
  if (vt > 0) throw Z('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');
2054
2054
  }, st = function(i) {
2055
- Se(), vt++;
2055
+ _e(), vt++;
2056
2056
  try {
2057
2057
  return N.createHTML(i);
2058
2058
  } finally {
2059
2059
  vt--;
2060
2060
  }
2061
- }, Po = function(i) {
2062
- Se(), vt++;
2061
+ }, Do = function(i) {
2062
+ _e(), vt++;
2063
2063
  try {
2064
2064
  return N.createScriptURL(i);
2065
2065
  } finally {
2066
2066
  vt--;
2067
2067
  }
2068
- }, Io = function() {
2069
- return Ae || (Xt = Jn(E, r), Ae = !0), Xt;
2070
- }, Lt = e, Zt = Lt.implementation, _e = Lt.createNodeIterator, Do = Lt.createDocumentFragment, Oo = Lt.getElementsByTagName, Ro = n.importNode;
2071
- let k = vo();
2072
- t.isSupported = typeof Ao == "function" && typeof R == "function" && Zt && Zt.createHTMLDocument !== void 0;
2073
- const No = Bn, zo = Fn, Bo = Hn, Fo = Un, Ho = jn, Uo = Wn, Le = $n, jo = Kn;
2074
- let Me = go, T = null;
2075
- const Jt = y({}, [
2076
- ...po,
2077
- ...he,
2068
+ }, Oo = function() {
2069
+ return Se || (Zt = ti(E, r), Se = !0), Zt;
2070
+ }, Mt = e, Jt = Mt.implementation, Le = Mt.createNodeIterator, Ro = Mt.createDocumentFragment, No = Mt.getElementsByTagName, zo = n.importNode;
2071
+ let k = Eo();
2072
+ t.isSupported = typeof So == "function" && typeof R == "function" && Jt && Jt.createHTMLDocument !== void 0;
2073
+ const Bo = Hn, Fo = Un, Ho = jn, Uo = Wn, jo = $n, Wo = Gn, Me = Kn, $o = qn;
2074
+ let Ie = bo, T = null;
2075
+ const Qt = y({}, [
2076
+ ...fo,
2078
2077
  ...me,
2079
2078
  ...ge,
2080
- ...fo
2081
- ]);
2082
- let x = null;
2083
- const Qt = y({}, [
2084
- ...ho,
2085
2079
  ...be,
2080
+ ...ho
2081
+ ]);
2082
+ let C = null;
2083
+ const te = y({}, [
2086
2084
  ...mo,
2087
- ...jt
2085
+ ...ye,
2086
+ ...go,
2087
+ ...Wt
2088
2088
  ]);
2089
2089
  let $ = Object.seal(gt(null, {
2090
2090
  tagNameCheck: {
@@ -2120,10 +2120,10 @@ function Lo() {
2120
2120
  value: null
2121
2121
  }
2122
2122
  }));
2123
- let Ie = !0, te = !0, De = !1, Oe = !0, V = !1, ot = !0, nt = !1, ee = !1, Mt = null, Pt = null, oe = !1, lt = !1, It = !1, Dt = !1, Re = !0, Ne = !1;
2124
- const ze = "user-content-";
2125
- let ne = !0, ie = !1, ct = {}, dt = null;
2126
- const Be = y({}, [
2123
+ let De = !0, ee = !0, Oe = !1, Re = !0, V = !1, ot = !0, nt = !1, oe = !1, It = null, Pt = null, ne = !1, lt = !1, Dt = !1, Ot = !1, Ne = !0, ze = !1;
2124
+ const Be = "user-content-";
2125
+ let ie = !0, re = !1, ct = {}, dt = null;
2126
+ const Fe = y({}, [
2127
2127
  "annotation-xml",
2128
2128
  "audio",
2129
2129
  "colgroup",
@@ -2151,8 +2151,8 @@ function Lo() {
2151
2151
  "video",
2152
2152
  "xmp"
2153
2153
  ]);
2154
- let Fe = null;
2155
- const He = y({}, [
2154
+ let He = null;
2155
+ const Ue = y({}, [
2156
2156
  "audio",
2157
2157
  "video",
2158
2158
  "img",
@@ -2160,8 +2160,8 @@ function Lo() {
2160
2160
  "image",
2161
2161
  "track"
2162
2162
  ]);
2163
- let Ue = null;
2164
- const je = y({}, [
2163
+ let je = null;
2164
+ const We = y({}, [
2165
2165
  "alt",
2166
2166
  "class",
2167
2167
  "for",
@@ -2176,23 +2176,23 @@ function Lo() {
2176
2176
  "value",
2177
2177
  "style",
2178
2178
  "xmlns"
2179
- ]), Ot = "http://www.w3.org/1998/Math/MathML", Rt = "http://www.w3.org/2000/svg", G = "http://www.w3.org/1999/xhtml";
2180
- let ut = G, re = !1, ae = null;
2181
- const Wo = y({}, [
2182
- Ot,
2179
+ ]), Rt = "http://www.w3.org/1998/Math/MathML", Nt = "http://www.w3.org/2000/svg", G = "http://www.w3.org/1999/xhtml";
2180
+ let ut = G, ae = !1, se = null;
2181
+ const Go = y({}, [
2183
2182
  Rt,
2183
+ Nt,
2184
2184
  G
2185
- ], fe), We = M([
2185
+ ], he), $e = M([
2186
2186
  "mi",
2187
2187
  "mo",
2188
2188
  "mn",
2189
2189
  "ms",
2190
2190
  "mtext"
2191
2191
  ]);
2192
- let se = y({}, We);
2193
- const $e = M(["annotation-xml"]);
2194
2192
  let le = y({}, $e);
2195
- const $o = y({}, [
2193
+ const Ge = M(["annotation-xml"]);
2194
+ let ce = y({}, Ge);
2195
+ const Ko = y({}, [
2196
2196
  "title",
2197
2197
  "style",
2198
2198
  "font",
@@ -2200,22 +2200,22 @@ function Lo() {
2200
2200
  "script"
2201
2201
  ]);
2202
2202
  let wt = null;
2203
- const Go = ["application/xhtml+xml", "text/html"], Ko = "text/html";
2203
+ const Yo = ["application/xhtml+xml", "text/html"], qo = "text/html";
2204
2204
  let _ = null, pt = null;
2205
- const Yo = e.createElement("form"), Ge = function(i) {
2205
+ const Vo = e.createElement("form"), Ke = function(i) {
2206
2206
  return i instanceof RegExp || i instanceof Function;
2207
- }, ce = function() {
2207
+ }, de = function() {
2208
2208
  let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2209
2209
  if (pt && pt === i) return;
2210
- (!i || typeof i != "object") && (i = {}), i = H(i), wt = Go.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? Ko : i.PARSER_MEDIA_TYPE, _ = wt === "application/xhtml+xml" ? fe : St, T = J(i, "ALLOWED_TAGS", Jt, { transform: _ }), x = J(i, "ALLOWED_ATTR", Qt, { transform: _ }), ae = J(i, "ALLOWED_NAMESPACES", Wo, { transform: fe }), Ue = J(i, "ADD_URI_SAFE_ATTR", je, {
2210
+ (!i || typeof i != "object") && (i = {}), i = H(i), wt = Yo.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? qo : i.PARSER_MEDIA_TYPE, _ = wt === "application/xhtml+xml" ? he : _t, T = J(i, "ALLOWED_TAGS", Qt, { transform: _ }), C = J(i, "ALLOWED_ATTR", te, { transform: _ }), se = J(i, "ALLOWED_NAMESPACES", Go, { transform: he }), je = J(i, "ADD_URI_SAFE_ATTR", We, {
2211
2211
  transform: _,
2212
- base: je
2213
- }), Fe = J(i, "ADD_DATA_URI_TAGS", He, {
2212
+ base: We
2213
+ }), He = J(i, "ADD_DATA_URI_TAGS", Ue, {
2214
2214
  transform: _,
2215
- base: He
2216
- }), dt = J(i, "FORBID_CONTENTS", Be, { transform: _ }), Et = J(i, "FORBID_TAGS", H({}), { transform: _ }), Pe = J(i, "FORBID_ATTR", H({}), { transform: _ }), ct = z(i, "USE_PROFILES") ? i.USE_PROFILES && typeof i.USE_PROFILES == "object" ? H(i.USE_PROFILES) : i.USE_PROFILES : !1, Ie = i.ALLOW_ARIA_ATTR !== !1, te = i.ALLOW_DATA_ATTR !== !1, De = i.ALLOW_UNKNOWN_PROTOCOLS || !1, Oe = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, V = i.SAFE_FOR_TEMPLATES || !1, ot = i.SAFE_FOR_XML !== !1, nt = i.WHOLE_DOCUMENT || !1, lt = i.RETURN_DOM || !1, It = i.RETURN_DOM_FRAGMENT || !1, Dt = i.RETURN_TRUSTED_TYPE || !1, oe = i.FORCE_BODY || !1, Re = i.SANITIZE_DOM !== !1, Ne = i.SANITIZE_NAMED_PROPS || !1, ne = i.KEEP_CONTENT !== !1, ie = i.IN_PLACE || !1, Me = Rn(i.ALLOWED_URI_REGEXP) ? i.ALLOWED_URI_REGEXP : go, ut = typeof i.NAMESPACE == "string" ? i.NAMESPACE : G, se = ye(i, "MATHML_TEXT_INTEGRATION_POINTS", () => y({}, We)), le = ye(i, "HTML_INTEGRATION_POINTS", () => y({}, $e));
2217
- const s = ye(i, "CUSTOM_ELEMENT_HANDLING", () => gt(null));
2218
- if ($ = gt(null), z(s, "tagNameCheck") && Ge(s.tagNameCheck) && ($.tagNameCheck = s.tagNameCheck), z(s, "attributeNameCheck") && Ge(s.attributeNameCheck) && ($.attributeNameCheck = s.attributeNameCheck), z(s, "allowCustomizedBuiltInElements") && typeof s.allowCustomizedBuiltInElements == "boolean" && ($.allowCustomizedBuiltInElements = s.allowCustomizedBuiltInElements), P($), V && (te = !1), It && (lt = !0), ct && (T = y({}, fo), x = gt(null), ct.html === !0 && (y(T, po), y(x, ho)), ct.svg === !0 && (y(T, he), y(x, be), y(x, jt)), ct.svgFilters === !0 && (y(T, me), y(x, be), y(x, jt)), ct.mathMl === !0 && (y(T, ge), y(x, mo), y(x, jt))), q.tagCheck = null, q.attributeCheck = null, z(i, "ADD_TAGS") && (typeof i.ADD_TAGS == "function" ? q.tagCheck = i.ADD_TAGS : bt(i.ADD_TAGS) && (T === Jt && (T = H(T)), y(T, i.ADD_TAGS, _))), z(i, "ADD_ATTR") && (typeof i.ADD_ATTR == "function" ? q.attributeCheck = i.ADD_ATTR : bt(i.ADD_ATTR) && (x === Qt && (x = H(x)), y(x, i.ADD_ATTR, _))), z(i, "ADD_FORBID_CONTENTS") && bt(i.ADD_FORBID_CONTENTS) && (dt === Be && (dt = H(dt)), y(dt, i.ADD_FORBID_CONTENTS, _)), ne && (T["#text"] = !0), nt && y(T, [
2215
+ base: Ue
2216
+ }), dt = J(i, "FORBID_CONTENTS", Fe, { transform: _ }), Et = J(i, "FORBID_TAGS", H({}), { transform: _ }), Pe = J(i, "FORBID_ATTR", H({}), { transform: _ }), ct = z(i, "USE_PROFILES") ? i.USE_PROFILES && typeof i.USE_PROFILES == "object" ? H(i.USE_PROFILES) : i.USE_PROFILES : !1, De = i.ALLOW_ARIA_ATTR !== !1, ee = i.ALLOW_DATA_ATTR !== !1, Oe = i.ALLOW_UNKNOWN_PROTOCOLS || !1, Re = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, V = i.SAFE_FOR_TEMPLATES || !1, ot = i.SAFE_FOR_XML !== !1, nt = i.WHOLE_DOCUMENT || !1, lt = i.RETURN_DOM || !1, Dt = i.RETURN_DOM_FRAGMENT || !1, Ot = i.RETURN_TRUSTED_TYPE || !1, ne = i.FORCE_BODY || !1, Ne = i.SANITIZE_DOM !== !1, ze = i.SANITIZE_NAMED_PROPS || !1, ie = i.KEEP_CONTENT !== !1, re = i.IN_PLACE || !1, Ie = zn(i.ALLOWED_URI_REGEXP) ? i.ALLOWED_URI_REGEXP : bo, ut = typeof i.NAMESPACE == "string" ? i.NAMESPACE : G, le = ve(i, "MATHML_TEXT_INTEGRATION_POINTS", () => y({}, $e)), ce = ve(i, "HTML_INTEGRATION_POINTS", () => y({}, Ge));
2217
+ const s = ve(i, "CUSTOM_ELEMENT_HANDLING", () => gt(null));
2218
+ if ($ = gt(null), z(s, "tagNameCheck") && Ke(s.tagNameCheck) && ($.tagNameCheck = s.tagNameCheck), z(s, "attributeNameCheck") && Ke(s.attributeNameCheck) && ($.attributeNameCheck = s.attributeNameCheck), z(s, "allowCustomizedBuiltInElements") && typeof s.allowCustomizedBuiltInElements == "boolean" && ($.allowCustomizedBuiltInElements = s.allowCustomizedBuiltInElements), I($), V && (ee = !1), Dt && (lt = !0), ct && (T = y({}, ho), C = gt(null), ct.html === !0 && (y(T, fo), y(C, mo)), ct.svg === !0 && (y(T, me), y(C, ye), y(C, Wt)), ct.svgFilters === !0 && (y(T, ge), y(C, ye), y(C, Wt)), ct.mathMl === !0 && (y(T, be), y(C, go), y(C, Wt))), q.tagCheck = null, q.attributeCheck = null, z(i, "ADD_TAGS") && (typeof i.ADD_TAGS == "function" ? q.tagCheck = i.ADD_TAGS : bt(i.ADD_TAGS) && (T === Qt && (T = H(T)), y(T, i.ADD_TAGS, _))), z(i, "ADD_ATTR") && (typeof i.ADD_ATTR == "function" ? q.attributeCheck = i.ADD_ATTR : bt(i.ADD_ATTR) && (C === te && (C = H(C)), y(C, i.ADD_ATTR, _))), z(i, "ADD_FORBID_CONTENTS") && bt(i.ADD_FORBID_CONTENTS) && (dt === Fe && (dt = H(dt)), y(dt, i.ADD_FORBID_CONTENTS, _)), ie && (T["#text"] = !0), nt && y(T, [
2219
2219
  "html",
2220
2220
  "head",
2221
2221
  "body"
@@ -2229,26 +2229,26 @@ function Lo() {
2229
2229
  } catch (p) {
2230
2230
  throw N = d, p;
2231
2231
  }
2232
- } else i.TRUSTED_TYPES_POLICY === null ? (N = void 0, et = "") : (N === void 0 && (N = Io()), N && typeof et == "string" && (et = st("")));
2232
+ } else i.TRUSTED_TYPES_POLICY === null ? (N = void 0, et = "") : (N === void 0 && (N = Oo()), N && typeof et == "string" && (et = st("")));
2233
2233
  M && M(i), pt = i;
2234
- }, Ke = y({}, [
2235
- ...he,
2234
+ }, Ye = y({}, [
2236
2235
  ...me,
2237
- ...Nn
2238
- ]), Ye = y({}, [...ge, ...zn]), qo = function(i, s, d) {
2239
- return s.namespaceURI === G ? i === "svg" : s.namespaceURI === Ot ? i === "svg" && (d === "annotation-xml" || se[d]) : !!Ke[i];
2240
- }, Vo = function(i, s, d) {
2241
- return s.namespaceURI === G ? i === "math" : s.namespaceURI === Rt ? i === "math" && le[d] : !!Ye[i];
2242
- }, Xo = function(i, s, d) {
2243
- return s.namespaceURI === Rt && !le[d] || s.namespaceURI === Ot && !se[d] ? !1 : !Ye[i] && ($o[i] || !Ke[i]);
2244
- }, Zo = function(i) {
2236
+ ...ge,
2237
+ ...Bn
2238
+ ]), qe = y({}, [...be, ...Fn]), Xo = function(i, s, d) {
2239
+ return s.namespaceURI === G ? i === "svg" : s.namespaceURI === Rt ? i === "svg" && (d === "annotation-xml" || le[d]) : !!Ye[i];
2240
+ }, Zo = function(i, s, d) {
2241
+ return s.namespaceURI === G ? i === "math" : s.namespaceURI === Nt ? i === "math" && ce[d] : !!qe[i];
2242
+ }, Jo = function(i, s, d) {
2243
+ return s.namespaceURI === Nt && !ce[d] || s.namespaceURI === Rt && !le[d] ? !1 : !qe[i] && (Ko[i] || !Ye[i]);
2244
+ }, Qo = function(i) {
2245
2245
  let s = R(i);
2246
2246
  (!s || !s.tagName) && (s = {
2247
2247
  namespaceURI: ut,
2248
2248
  tagName: "template"
2249
2249
  });
2250
- const d = St(i.tagName), p = St(s.tagName);
2251
- return ae[i.namespaceURI] ? i.namespaceURI === Rt ? qo(d, s, p) : i.namespaceURI === Ot ? Vo(d, s, p) : i.namespaceURI === G ? Xo(d, s, p) : !!(wt === "application/xhtml+xml" && ae[i.namespaceURI]) : !1;
2250
+ const d = _t(i.tagName), p = _t(s.tagName);
2251
+ return se[i.namespaceURI] ? i.namespaceURI === Nt ? Xo(d, s, p) : i.namespaceURI === Rt ? Zo(d, s, p) : i.namespaceURI === G ? Jo(d, s, p) : !!(wt === "application/xhtml+xml" && se[i.namespaceURI]) : !1;
2252
2252
  }, X = function(i) {
2253
2253
  Tt(t.removed, { element: i });
2254
2254
  try {
@@ -2256,7 +2256,7 @@ function Lo() {
2256
2256
  } catch (s) {
2257
2257
  if (w(i), !R(i)) throw Z("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
2258
2258
  }
2259
- }, qe = function(i, s, d) {
2259
+ }, Ve = function(i, s, d) {
2260
2260
  try {
2261
2261
  v(i, s);
2262
2262
  } catch (p) {
@@ -2265,8 +2265,8 @@ function Lo() {
2265
2265
  } catch (h) {
2266
2266
  }
2267
2267
  }
2268
- }, Nt = function(i) {
2269
- zt(i);
2268
+ }, zt = function(i) {
2269
+ Bt(i);
2270
2270
  const s = D(i);
2271
2271
  if (s) {
2272
2272
  const p = [];
@@ -2279,10 +2279,10 @@ function Lo() {
2279
2279
  }
2280
2280
  });
2281
2281
  }
2282
- const d = qt(i);
2282
+ const d = Vt(i);
2283
2283
  if (d) for (let p = d.length - 1; p >= 0; --p) {
2284
2284
  const h = d[p], g = h && h.name;
2285
- typeof g == "string" && qe(i, h, g);
2285
+ typeof g == "string" && Ve(i, h, g);
2286
2286
  }
2287
2287
  }, it = function(i, s, d) {
2288
2288
  if (!d) try {
@@ -2303,7 +2303,7 @@ function Lo() {
2303
2303
  }
2304
2304
  }
2305
2305
  if (i === "is")
2306
- if (lt || It) try {
2306
+ if (lt || Dt) try {
2307
2307
  X(s);
2308
2308
  } catch (p) {
2309
2309
  }
@@ -2311,29 +2311,29 @@ function Lo() {
2311
2311
  s.setAttribute(i, "");
2312
2312
  } catch (p) {
2313
2313
  }
2314
- }, Jo = function(i) {
2315
- const s = qt(i);
2314
+ }, tn = function(i) {
2315
+ const s = Vt(i);
2316
2316
  if (s)
2317
2317
  for (let d = s.length - 1; d >= 0; --d) {
2318
2318
  const p = s[d], h = p && p.name;
2319
- typeof h != "string" || x[_(h)] || qe(i, p, h);
2319
+ typeof h != "string" || C[_(h)] || Ve(i, p, h);
2320
2320
  }
2321
- }, zt = function(i) {
2321
+ }, Bt = function(i) {
2322
2322
  const s = [i];
2323
2323
  for (; s.length > 0; ) {
2324
2324
  const d = s.pop();
2325
- yt(d) === F.element && Jo(d);
2325
+ yt(d) === F.element && tn(d);
2326
2326
  const p = D(d);
2327
2327
  if (p) for (let h = p.length - 1; h >= 0; --h) s.push(p[h]);
2328
2328
  }
2329
- }, Ve = function(i, s) {
2329
+ }, Xe = function(i, s) {
2330
2330
  return ot ? i === "patchsrc" ? !0 : i === "for" && s !== "label" && s !== "output" : !1;
2331
- }, Qo = function(i) {
2331
+ }, en = function(i) {
2332
2332
  if (!ot) return;
2333
2333
  const s = [i];
2334
2334
  for (; s.length > 0; ) {
2335
2335
  const d = s.pop(), p = yt(d);
2336
- if (p === F.processingInstruction || p === F.comment && I(yo, d.data)) {
2336
+ if (p === F.processingInstruction || p === F.comment && P(vo, d.data)) {
2337
2337
  try {
2338
2338
  w(d);
2339
2339
  } catch (g) {
@@ -2341,20 +2341,20 @@ function Lo() {
2341
2341
  continue;
2342
2342
  }
2343
2343
  if (p === F.element) {
2344
- const g = d, b = _(Vt(d));
2344
+ const g = d, b = _(Xt(d));
2345
2345
  try {
2346
- g.hasAttribute && g.hasAttribute("patchsrc") && g.removeAttribute("patchsrc"), g.hasAttribute && g.hasAttribute("for") && Ve("for", b) && g.removeAttribute("for");
2346
+ g.hasAttribute && g.hasAttribute("patchsrc") && g.removeAttribute("patchsrc"), g.hasAttribute && g.hasAttribute("for") && Xe("for", b) && g.removeAttribute("for");
2347
2347
  } catch (S) {
2348
2348
  }
2349
2349
  }
2350
2350
  const h = D(d);
2351
2351
  if (h) for (let g = h.length - 1; g >= 0; --g) s.push(h[g]);
2352
2352
  }
2353
- }, Xe = function(i) {
2353
+ }, Ze = function(i) {
2354
2354
  let s = null, d = null;
2355
- if (oe) i = "<remove></remove>" + i;
2355
+ if (ne) i = "<remove></remove>" + i;
2356
2356
  else {
2357
- const g = so(i, /^[\r\n\t ]+/);
2357
+ const g = lo(i, /^[\r\n\t ]+/);
2358
2358
  d = g && g[0];
2359
2359
  }
2360
2360
  wt === "application/xhtml+xml" && ut === G && (i = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + i + "</body></html>");
@@ -2364,33 +2364,33 @@ function Lo() {
2364
2364
  } catch (g) {
2365
2365
  }
2366
2366
  if (!s || !s.documentElement) {
2367
- s = Zt.createDocument(ut, "template", null);
2367
+ s = Jt.createDocument(ut, "template", null);
2368
2368
  try {
2369
- s.documentElement.innerHTML = re ? et : p;
2369
+ s.documentElement.innerHTML = ae ? et : p;
2370
2370
  } catch (g) {
2371
2371
  }
2372
2372
  }
2373
2373
  const h = s.body || s.documentElement;
2374
- return i && d && h.insertBefore(e.createTextNode(d), h.childNodes[0] || null), ut === G ? Oo.call(s, nt ? "html" : "body")[0] : nt ? s.documentElement : h;
2375
- }, Ze = function(i) {
2376
- const s = _t ? _t(i) : i.ownerDocument;
2377
- return _e.call(s || i, i, f.SHOW_ELEMENT | f.SHOW_COMMENT | f.SHOW_TEXT | f.SHOW_PROCESSING_INSTRUCTION | f.SHOW_CDATA_SECTION, null);
2378
- }, Bt = function(i) {
2379
- return i = xt(i, No, " "), i = xt(i, zo, " "), i = xt(i, Bo, " "), i;
2380
- }, de = function(i) {
2374
+ return i && d && h.insertBefore(e.createTextNode(d), h.childNodes[0] || null), ut === G ? No.call(s, nt ? "html" : "body")[0] : nt ? s.documentElement : h;
2375
+ }, Je = function(i) {
2376
+ const s = Lt ? Lt(i) : i.ownerDocument;
2377
+ return Le.call(s || i, i, f.SHOW_ELEMENT | f.SHOW_COMMENT | f.SHOW_TEXT | f.SHOW_PROCESSING_INSTRUCTION | f.SHOW_CDATA_SECTION, null);
2378
+ }, Ft = function(i) {
2379
+ return i = Ct(i, Bo, " "), i = Ct(i, Fo, " "), i = Ct(i, Ho, " "), i;
2380
+ }, ue = function(i) {
2381
2381
  var s;
2382
2382
  i.normalize();
2383
- const d = _t ? _t(i) : i.ownerDocument, p = _e.call(d || i, i, f.SHOW_TEXT | f.SHOW_COMMENT | f.SHOW_CDATA_SECTION | f.SHOW_PROCESSING_INSTRUCTION, null);
2383
+ const d = Lt ? Lt(i) : i.ownerDocument, p = Le.call(d || i, i, f.SHOW_TEXT | f.SHOW_COMMENT | f.SHOW_CDATA_SECTION | f.SHOW_PROCESSING_INSTRUCTION, null);
2384
2384
  let h = p.nextNode();
2385
2385
  for (; h; )
2386
- h.data = Bt(h.data), h = p.nextNode();
2386
+ h.data = Ft(h.data), h = p.nextNode();
2387
2387
  const g = (s = i.querySelectorAll) === null || s === void 0 ? void 0 : s.call(i, "template");
2388
2388
  g && rt(g, (b) => {
2389
- ft(b.content) && de(b.content);
2389
+ ft(b.content) && ue(b.content);
2390
2390
  });
2391
- }, Ft = function(i) {
2391
+ }, Ht = function(i) {
2392
2392
  const s = at ? at(i) : null;
2393
- return typeof s != "string" || _(s) !== "form" ? !1 : typeof i.nodeName != "string" || typeof i.textContent != "string" || typeof i.removeChild != "function" || i.attributes !== qt(i) || typeof i.removeAttribute != "function" || typeof i.removeAttributeNode != "function" || typeof i.getAttributeNode != "function" || typeof i.setAttribute != "function" || typeof i.namespaceURI != "string" || typeof i.insertBefore != "function" || typeof i.hasChildNodes != "function" || i.nodeType !== tt(i) || i.childNodes !== D(i);
2393
+ return typeof s != "string" || _(s) !== "form" ? !1 : typeof i.nodeName != "string" || typeof i.textContent != "string" || typeof i.removeChild != "function" || i.attributes !== Vt(i) || typeof i.removeAttribute != "function" || typeof i.removeAttributeNode != "function" || typeof i.getAttributeNode != "function" || typeof i.setAttribute != "function" || typeof i.namespaceURI != "string" || typeof i.insertBefore != "function" || typeof i.hasChildNodes != "function" || i.nodeType !== tt(i) || i.childNodes !== D(i);
2394
2394
  }, ft = function(i) {
2395
2395
  if (!tt || typeof i != "object" || i === null) return !1;
2396
2396
  try {
@@ -2411,18 +2411,18 @@ function Lo() {
2411
2411
  d.call(t, i, s, pt);
2412
2412
  });
2413
2413
  }
2414
- const tn = function(i, s) {
2415
- return !!(ot && i.hasChildNodes() && !kt(i.firstElementChild) && I(bo, i.textContent) && I(bo, i.innerHTML) || ot && i.namespaceURI === G && Vn[s] && (kt(i.firstElementChild) || typeof i.textContent == "string" && I(Xn[s], i.textContent)) || i.nodeType === F.processingInstruction || ot && i.nodeType === F.comment && I(yo, i.data));
2416
- }, Ht = function(i, s) {
2417
- if (i instanceof RegExp) return I(i, s);
2414
+ const on = function(i, s) {
2415
+ return !!(ot && i.hasChildNodes() && !kt(i.firstElementChild) && P(yo, i.textContent) && P(yo, i.innerHTML) || ot && i.namespaceURI === G && Zn[s] && (kt(i.firstElementChild) || typeof i.textContent == "string" && P(Jn[s], i.textContent)) || i.nodeType === F.processingInstruction || ot && i.nodeType === F.comment && P(vo, i.data));
2416
+ }, Ut = function(i, s) {
2417
+ if (i instanceof RegExp) return P(i, s);
2418
2418
  if (i instanceof Function) {
2419
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
2420
  return !!i(s, ...p);
2421
2421
  }
2422
2422
  return !1;
2423
- }, en = function(i, s, d) {
2424
- if (!Et[s] && eo(s) && Ht($.tagNameCheck, s)) return !1;
2425
- if (ne && !dt[s]) {
2423
+ }, nn = function(i, s, d) {
2424
+ if (!Et[s] && oo(s) && Ut($.tagNameCheck, s)) return !1;
2425
+ if (ie && !dt[s]) {
2426
2426
  const p = R(i), h = D(i);
2427
2427
  if (h && p) {
2428
2428
  const g = h.length;
@@ -2433,37 +2433,37 @@ function Lo() {
2433
2433
  }
2434
2434
  }
2435
2435
  return X(i), !0;
2436
- }, Je = function(i, s, d, p) {
2436
+ }, Qe = function(i, s, d, p) {
2437
2437
  return i.length === 0 ? s : s === d || s === p ? H(s) : s;
2438
2438
  }, ht = function(i, s) {
2439
- return i === s || R(i) !== null ? !1 : (ie && zt(i), !0);
2440
- }, Qe = function(i, s) {
2439
+ return i === s || R(i) !== null ? !1 : (re && Bt(i), !0);
2440
+ }, to = function(i, s) {
2441
2441
  if (K(k.beforeSanitizeElements, i, null), ht(i, s)) return !0;
2442
- if (Ft(i))
2442
+ if (Ht(i))
2443
2443
  return X(i), !0;
2444
- const d = _(Vt(i));
2445
- if (T = Je(k.uponSanitizeElement, T, Jt, Mt), K(k.uponSanitizeElement, i, {
2444
+ const d = _(Xt(i));
2445
+ if (T = Qe(k.uponSanitizeElement, T, Qt, It), K(k.uponSanitizeElement, i, {
2446
2446
  tagName: d,
2447
2447
  allowedTags: T
2448
2448
  }), ht(i, s)) return !0;
2449
- if (tn(i, d))
2449
+ if (on(i, d))
2450
2450
  return X(i), !0;
2451
2451
  if (Et[d] || !(q.tagCheck instanceof Function && q.tagCheck(d)) && !T[d]) {
2452
- const p = en(i, d, s);
2452
+ const p = nn(i, d, s);
2453
2453
  return p === !1 && (K(k.afterSanitizeElements, i, null), ht(i, s)) ? !0 : p;
2454
2454
  }
2455
- if (yt(i) === F.element && !Zo(i) || (d === "noscript" || d === "noembed" || d === "noframes") && I(Yn, i.innerHTML))
2455
+ if (yt(i) === F.element && !Qo(i) || (d === "noscript" || d === "noembed" || d === "noframes") && P(Vn, i.innerHTML))
2456
2456
  return X(i), !0;
2457
2457
  if (V && i.nodeType === F.text) {
2458
- const p = Bt(i.textContent);
2458
+ const p = Ft(i.textContent);
2459
2459
  i.textContent !== p && (Tt(t.removed, { element: i.cloneNode() }), i.textContent = p);
2460
2460
  }
2461
2461
  return K(k.afterSanitizeElements, i, null), ht(i, s);
2462
- }, to = function(i, s, d) {
2463
- if (Pe[s] || Ve(s, i) || Re && (s === "id" || s === "name") && (d in e || d in Yo)) return !1;
2464
- const p = x[s] || q.attributeCheck instanceof Function && q.attributeCheck(s, i);
2465
- return te && I(Fo, s) || Ie && I(Ho, s) ? !0 : p ? Ue[s] || I(Me, xt(d, Le, "")) || (s === "src" || s === "xlink:href" || s === "href") && i !== "script" && lo(d, "data:") === 0 && Fe[i] || De && !I(Uo, xt(d, Le, "")) ? !0 : !d : eo(i) && Ht($.tagNameCheck, i) && Ht($.attributeNameCheck, s, i) || s === "is" && $.allowCustomizedBuiltInElements && Ht($.tagNameCheck, d);
2466
- }, on = y({}, [
2462
+ }, eo = function(i, s, d) {
2463
+ if (Pe[s] || Xe(s, i) || Ne && (s === "id" || s === "name") && (d in e || d in Vo)) return !1;
2464
+ const p = C[s] || q.attributeCheck instanceof Function && q.attributeCheck(s, i);
2465
+ return ee && P(Uo, s) || De && P(jo, s) ? !0 : p ? je[s] || P(Ie, Ct(d, Me, "")) || (s === "src" || s === "xlink:href" || s === "href") && i !== "script" && co(d, "data:") === 0 && He[i] || Oe && !P(Wo, Ct(d, Me, "")) ? !0 : !d : oo(i) && Ut($.tagNameCheck, i) && Ut($.attributeNameCheck, s, i) || s === "is" && $.allowCustomizedBuiltInElements && Ut($.tagNameCheck, d);
2466
+ }, rn = y({}, [
2467
2467
  "annotation-xml",
2468
2468
  "color-profile",
2469
2469
  "font-face",
@@ -2472,44 +2472,44 @@ function Lo() {
2472
2472
  "font-face-src",
2473
2473
  "font-face-uri",
2474
2474
  "missing-glyph"
2475
- ]), eo = function(i) {
2476
- return !on[St(i)] && I(jo, i);
2477
- }, nn = function(i, s, d, p) {
2475
+ ]), oo = function(i) {
2476
+ return !rn[_t(i)] && P($o, i);
2477
+ }, an = function(i, s, d, p) {
2478
2478
  if (N && typeof E == "object" && typeof E.getAttributeType == "function" && !d) switch (E.getAttributeType(i, s)) {
2479
2479
  case "TrustedHTML":
2480
2480
  return st(p);
2481
2481
  case "TrustedScriptURL":
2482
- return Po(p);
2482
+ return Do(p);
2483
2483
  }
2484
2484
  return p;
2485
- }, rn = function(i, s, d, p) {
2485
+ }, sn = function(i, s, d, p) {
2486
2486
  try {
2487
- return d ? i.setAttributeNS(d, s, p) : i.setAttribute(s, p), Ft(i) ? (X(i), !1) : !0;
2487
+ return d ? i.setAttributeNS(d, s, p) : i.setAttribute(s, p), Ht(i) ? (X(i), !1) : !0;
2488
2488
  } catch (h) {
2489
2489
  return it(s, i), !1;
2490
2490
  }
2491
- }, oo = function(i, s) {
2491
+ }, no = function(i, s) {
2492
2492
  if (K(k.beforeSanitizeAttributes, i, null), ht(i, s)) return;
2493
2493
  const d = i.attributes;
2494
- if (!d || Ft(i)) return;
2495
- x = Je(k.uponSanitizeAttribute, x, Qt, Pt);
2494
+ if (!d || Ht(i)) return;
2495
+ C = Qe(k.uponSanitizeAttribute, C, te, Pt);
2496
2496
  const p = {
2497
2497
  attrName: "",
2498
2498
  attrValue: "",
2499
2499
  keepAttr: !0,
2500
- allowedAttributes: x,
2500
+ allowedAttributes: C,
2501
2501
  forceKeepAttr: void 0
2502
2502
  };
2503
2503
  let h = d.length;
2504
2504
  const g = _(i.nodeName);
2505
2505
  for (; h--; ) {
2506
- const b = d[h], S = b.name, U = b.namespaceURI, B = b.value, mt = _(S), pe = B;
2507
- let O = S === "value" ? pe : Ln(pe), no = !1;
2508
- if (p.attrName = mt, p.attrValue = O, p.keepAttr = !0, p.forceKeepAttr = void 0, K(k.uponSanitizeAttribute, i, p), O = p.attrValue, Ne && (mt === "id" || mt === "name") && lo(O, ze) !== 0 && (it(S, i, b), O = ze + O, no = !0), ot && I(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, O)) {
2506
+ const b = d[h], S = b.name, U = b.namespaceURI, B = b.value, mt = _(S), fe = B;
2507
+ let O = S === "value" ? fe : In(fe), io = !1;
2508
+ if (p.attrName = mt, p.attrValue = O, p.keepAttr = !0, p.forceKeepAttr = void 0, K(k.uponSanitizeAttribute, i, p), O = p.attrValue, ze && (mt === "id" || mt === "name") && co(O, Be) !== 0 && (it(S, i, b), O = Be + O, io = !0), ot && P(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, O)) {
2509
2509
  it(S, i, b);
2510
2510
  continue;
2511
2511
  }
2512
- if (mt === "attributename" && so(O, "href")) {
2512
+ if (mt === "attributename" && lo(O, "href")) {
2513
2513
  it(S, i, b);
2514
2514
  continue;
2515
2515
  }
@@ -2518,28 +2518,28 @@ function Lo() {
2518
2518
  it(S, i, b);
2519
2519
  continue;
2520
2520
  }
2521
- if (!Oe && I(qn, O)) {
2521
+ if (!Re && P(Xn, O)) {
2522
2522
  it(S, i, b);
2523
2523
  continue;
2524
2524
  }
2525
- if (V && (O = Bt(O)), !to(g, mt, O)) {
2525
+ if (V && (O = Ft(O)), !eo(g, mt, O)) {
2526
2526
  it(S, i, b);
2527
2527
  continue;
2528
2528
  }
2529
- O = nn(g, mt, U, O), O !== pe && rn(i, S, U, O) && no && ao(t.removed);
2529
+ O = an(g, mt, U, O), O !== fe && sn(i, S, U, O) && io && so(t.removed);
2530
2530
  }
2531
2531
  }
2532
2532
  K(k.afterSanitizeAttributes, i, null), ht(i, s);
2533
- }, Ut = function(i) {
2533
+ }, jt = function(i) {
2534
2534
  let s = null;
2535
- const d = Ze(i);
2535
+ const d = Je(i);
2536
2536
  for (K(k.beforeSanitizeShadowDOM, i, null); s = d.nextNode(); )
2537
- if (K(k.uponSanitizeShadowNode, s, null), Qe(s, i), oo(s, i), ft(s.content) && Ut(s.content), yt(s) === F.element) {
2538
- const p = Ce(s);
2539
- ft(p) && (ue(p), Ut(p));
2537
+ if (K(k.uponSanitizeShadowNode, s, null), to(s, i), no(s, i), ft(s.content) && jt(s.content), yt(s) === F.element) {
2538
+ const p = Ae(s);
2539
+ ft(p) && (pe(p), jt(p));
2540
2540
  }
2541
2541
  K(k.afterSanitizeShadowDOM, i, null);
2542
- }, ue = function(i) {
2542
+ }, pe = function(i) {
2543
2543
  const s = [{
2544
2544
  node: i,
2545
2545
  shadow: null
@@ -2547,7 +2547,7 @@ function Lo() {
2547
2547
  for (; s.length > 0; ) {
2548
2548
  const d = s.pop();
2549
2549
  if (d.shadow) {
2550
- Ut(d.shadow);
2550
+ jt(d.shadow);
2551
2551
  continue;
2552
2552
  }
2553
2553
  const p = d.node, h = yt(p) === F.element, g = D(p);
@@ -2566,7 +2566,7 @@ function Lo() {
2566
2566
  }
2567
2567
  }
2568
2568
  if (h) {
2569
- const b = Ce(p);
2569
+ const b = Ae(p);
2570
2570
  ft(b) && s.push({
2571
2571
  node: null,
2572
2572
  shadow: b
@@ -2579,86 +2579,86 @@ function Lo() {
2579
2579
  };
2580
2580
  return t.sanitize = function(u) {
2581
2581
  let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = null, d = null, p = null, h = null;
2582
- if (re = !u, re && (u = "<!-->"), typeof u != "string" && !kt(u) && (u = On(u), typeof u != "string"))
2582
+ if (ae = !u, ae && (u = "<!-->"), typeof u != "string" && !kt(u) && (u = Nn(u), typeof u != "string"))
2583
2583
  throw Z("dirty is not a string, aborting");
2584
2584
  if (!t.isSupported) return u;
2585
- ee ? (T = Mt, x = Pt) : ce(i), (k.uponSanitizeElement.length > 0 || k.uponSanitizeAttribute.length > 0) && (T = H(T)), k.uponSanitizeAttribute.length > 0 && (x = H(x)), t.removed = [];
2586
- const g = ie && typeof u != "string" && kt(u);
2585
+ oe ? (T = It, C = Pt) : de(i), (k.uponSanitizeElement.length > 0 || k.uponSanitizeAttribute.length > 0) && (T = H(T)), k.uponSanitizeAttribute.length > 0 && (C = H(C)), t.removed = [];
2586
+ const g = re && typeof u != "string" && kt(u);
2587
2587
  if (g) {
2588
- Qo(u);
2589
- const U = Vt(u);
2588
+ en(u);
2589
+ const U = Xt(u);
2590
2590
  if (typeof U == "string") {
2591
2591
  const B = _(U);
2592
2592
  if (!T[B] || Et[B])
2593
- throw Nt(u), Z("root node is forbidden and cannot be sanitized in-place");
2593
+ throw zt(u), Z("root node is forbidden and cannot be sanitized in-place");
2594
2594
  }
2595
- if (Ft(u))
2596
- throw Nt(u), Z("root node is clobbered and cannot be sanitized in-place");
2595
+ if (Ht(u))
2596
+ throw zt(u), Z("root node is clobbered and cannot be sanitized in-place");
2597
2597
  try {
2598
- ue(u);
2598
+ pe(u);
2599
2599
  } catch (B) {
2600
- throw Nt(u), B;
2600
+ throw zt(u), B;
2601
2601
  }
2602
2602
  } else if (kt(u))
2603
- s = Xe("<!---->"), d = s.ownerDocument.importNode(u, !0), d.nodeType === F.element && d.nodeName === "BODY" || d.nodeName === "HTML" ? s = d : s.appendChild(d), ue(s);
2603
+ s = Ze("<!---->"), d = s.ownerDocument.importNode(u, !0), d.nodeType === F.element && d.nodeName === "BODY" || d.nodeName === "HTML" ? s = d : s.appendChild(d), pe(s);
2604
2604
  else {
2605
- if (!lt && !V && !nt && u.indexOf("<") === -1) return N && Dt ? st(u) : u;
2606
- if (s = Xe(u), !s) return lt ? null : Dt ? et : "";
2605
+ if (!lt && !V && !nt && u.indexOf("<") === -1) return N && Ot ? st(u) : u;
2606
+ if (s = Ze(u), !s) return lt ? null : Ot ? et : "";
2607
2607
  }
2608
- s && oe && X(s.firstChild);
2608
+ s && ne && X(s.firstChild);
2609
2609
  const b = g ? u : s;
2610
2610
  try {
2611
- const U = Ze(b);
2611
+ const U = Je(b);
2612
2612
  for (; p = U.nextNode(); )
2613
- Qe(p, b), oo(p, b), ft(p.content) && Ut(p.content);
2613
+ to(p, b), no(p, b), ft(p.content) && jt(p.content);
2614
2614
  } catch (U) {
2615
- throw g && (Nt(u), rt(t.removed, (B) => {
2616
- B.element && zt(B.element);
2615
+ throw g && (zt(u), rt(t.removed, (B) => {
2616
+ B.element && Bt(B.element);
2617
2617
  })), U;
2618
2618
  }
2619
2619
  if (g) {
2620
2620
  let U = !1;
2621
2621
  if (rt(t.removed, (B) => {
2622
- B.element && (B.element === u && (U = !0), zt(B.element));
2622
+ B.element && (B.element === u && (U = !0), Bt(B.element));
2623
2623
  }), U) throw Z("a node selected for removal could not be safely returned; refusing to sanitize in place");
2624
- return V && de(u), u;
2624
+ return V && ue(u), u;
2625
2625
  }
2626
2626
  if (lt) {
2627
- if (V && de(s), It)
2628
- for (h = Do.call(s.ownerDocument); s.firstChild; ) h.appendChild(s.firstChild);
2627
+ if (V && ue(s), Dt)
2628
+ for (h = Ro.call(s.ownerDocument); s.firstChild; ) h.appendChild(s.firstChild);
2629
2629
  else h = s;
2630
- return (x.shadowroot || x.shadowrootmode) && (h = Ro.call(n, h, !0)), h;
2630
+ return (C.shadowroot || C.shadowrootmode) && (h = zo.call(n, h, !0)), h;
2631
2631
  }
2632
2632
  let S = nt ? s.outerHTML : s.innerHTML;
2633
- return nt && T["!doctype"] && s.ownerDocument && s.ownerDocument.doctype && s.ownerDocument.doctype.name && I(Gn, s.ownerDocument.doctype.name) && (S = "<!DOCTYPE " + s.ownerDocument.doctype.name + `>
2634
- ` + S), V && (S = Bt(S)), N && Dt ? st(S) : S;
2633
+ return nt && T["!doctype"] && s.ownerDocument && s.ownerDocument.doctype && s.ownerDocument.doctype.name && P(Yn, s.ownerDocument.doctype.name) && (S = "<!DOCTYPE " + s.ownerDocument.doctype.name + `>
2634
+ ` + S), V && (S = Ft(S)), N && Ot ? st(S) : S;
2635
2635
  }, t.setConfig = function() {
2636
2636
  let u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2637
- ce(u), ee = !0, Mt = T, Pt = x;
2637
+ de(u), oe = !0, It = T, Pt = C;
2638
2638
  }, t.clearConfig = function() {
2639
- pt = null, ee = !1, Mt = null, Pt = null, N = Xt, et = "";
2639
+ pt = null, oe = !1, It = null, Pt = null, N = Zt, et = "";
2640
2640
  }, t.isValidAttribute = function(u, i, s) {
2641
- pt || ce({});
2641
+ pt || de({});
2642
2642
  const d = _(u), p = _(i);
2643
- return to(d, p, s);
2643
+ return eo(d, p, s);
2644
2644
  }, t.addHook = function(u, i) {
2645
2645
  typeof i == "function" && z(k, u) && Tt(k[u], i);
2646
2646
  }, t.removeHook = function(u, i) {
2647
2647
  if (z(k, u)) {
2648
2648
  if (i !== void 0) {
2649
- const s = Sn(k[u], i);
2650
- return s === -1 ? void 0 : _n(k[u], s, 1)[0];
2649
+ const s = Ln(k[u], i);
2650
+ return s === -1 ? void 0 : Mn(k[u], s, 1)[0];
2651
2651
  }
2652
- return ao(k[u]);
2652
+ return so(k[u]);
2653
2653
  }
2654
2654
  }, t.removeHooks = function(u) {
2655
2655
  z(k, u) && (k[u] = []);
2656
2656
  }, t.removeAllHooks = function() {
2657
- k = vo();
2657
+ k = Eo();
2658
2658
  }, t;
2659
2659
  }
2660
- var Wt = Lo();
2661
- const Qn = [
2660
+ var $t = Mo();
2661
+ const ei = [
2662
2662
  "p",
2663
2663
  "br",
2664
2664
  "strong",
@@ -2704,7 +2704,7 @@ const Qn = [
2704
2704
  // user-initiated dialog, a different trust boundary that never calls
2705
2705
  // through this sanitizer. A consumer that genuinely wants iframes in
2706
2706
  // pasted/typed content can still opt in via a custom allowedTags list.
2707
- ], ti = {
2707
+ ], oi = {
2708
2708
  "*": ["class", "style", "id", "data-*", "role", "aria-*", "tabindex", "contenteditable", "spellcheck", "dir", "lang"],
2709
2709
  a: ["href", "target", "rel", "title"],
2710
2710
  img: ["src", "alt", "width", "height", "loading"],
@@ -2719,8 +2719,8 @@ const Qn = [
2719
2719
  // additionalAllowedTags), restoring the attributes that make an inserted
2720
2720
  // iframe actually usable (src, sizing, fullscreen, scrolling/border).
2721
2721
  iframe: ["src", "width", "height", "name", "title", "frameborder", "scrolling", "allowfullscreen", "longdesc", "allow"]
2722
- }, ei = "data-editora-embed";
2723
- function oi(o) {
2722
+ }, ni = "data-editora-embed";
2723
+ function ii(o) {
2724
2724
  if (!o || /\s/.test(o.trim())) return !1;
2725
2725
  try {
2726
2726
  const t = new URL(o.trim());
@@ -2729,44 +2729,61 @@ function oi(o) {
2729
2729
  return !1;
2730
2730
  }
2731
2731
  }
2732
- function Mo(o, t, e, n) {
2732
+ function Io(o, t, e, n) {
2733
2733
  if ((t == null ? void 0 : t.sanitize) === !1)
2734
2734
  return o;
2735
- const r = t != null && t.allowedTags && t.allowedTags.length > 0 ? t.allowedTags : Qn, a = e != null && e.length ? Array.from(/* @__PURE__ */ new Set([...r, ...e])) : r, c = !!(t != null && t.allowedAttributes) && Object.keys(t.allowedAttributes).length > 0 ? t.allowedAttributes : ti, f = /* @__PURE__ */ new Set();
2736
- for (const C of Object.values(c))
2737
- for (const A of C) f.add(A);
2735
+ const r = t != null && t.allowedTags && t.allowedTags.length > 0 ? t.allowedTags : ei, a = e != null && e.length ? Array.from(/* @__PURE__ */ new Set([...r, ...e])) : r, c = !!(t != null && t.allowedAttributes) && Object.keys(t.allowedAttributes).length > 0 ? t.allowedAttributes : oi, f = /* @__PURE__ */ new Set();
2736
+ for (const x of Object.values(c))
2737
+ for (const A of x) f.add(A);
2738
2738
  const m = {
2739
2739
  ALLOWED_TAGS: a,
2740
2740
  ALLOWED_ATTR: Array.from(f)
2741
2741
  };
2742
2742
  if (!n)
2743
- return Wt.sanitize(o, m);
2743
+ return $t.sanitize(o, m);
2744
2744
  const E = a.includes("iframe");
2745
- Wt.addHook(
2745
+ $t.addHook(
2746
2746
  "uponSanitizeElement",
2747
- (C, A) => {
2747
+ (x, A) => {
2748
2748
  var v;
2749
2749
  if (A.tagName !== "iframe") return;
2750
- const w = C;
2751
- A.allowedTags.iframe = E || ((v = w.getAttribute) == null ? void 0 : v.call(w, ei)) === "true" && oi(w.getAttribute("src"));
2750
+ const w = x;
2751
+ A.allowedTags.iframe = E || ((v = w.getAttribute) == null ? void 0 : v.call(w, ni)) === "true" && ii(w.getAttribute("src"));
2752
2752
  }
2753
2753
  );
2754
2754
  try {
2755
- return Wt.sanitize(o, m);
2755
+ return $t.sanitize(o, m);
2756
2756
  } finally {
2757
- Wt.removeHook("uponSanitizeElement");
2757
+ $t.removeHook("uponSanitizeElement");
2758
2758
  }
2759
2759
  }
2760
- function ni(o, t, e, n) {
2761
- return Mo(o, t, n, !1);
2760
+ function ri(o, t, e, n) {
2761
+ return Io(o, t, n, !1);
2762
+ }
2763
+ function ai(o, t, e) {
2764
+ return (e == null ? void 0 : e.sanitizeOnPaste) === !1 ? o : ri(o, t);
2765
+ }
2766
+ function wo(o, t, e, n) {
2767
+ return (e == null ? void 0 : e.sanitizeOnInput) === !1 ? o : Io(o, t, n, !0);
2762
2768
  }
2763
- function ii(o, t, e) {
2764
- return (e == null ? void 0 : e.sanitizeOnPaste) === !1 ? o : ni(o, t);
2769
+ const si = ".resize-handle, .table-resize-handle", li = /resize-handle/;
2770
+ function Po(o) {
2771
+ if (!o || !li.test(o)) return o;
2772
+ const t = document.createElement("template");
2773
+ t.innerHTML = o;
2774
+ const e = /* @__PURE__ */ new Set();
2775
+ return t.content.querySelectorAll(si).forEach((n) => {
2776
+ const r = n.parentElement;
2777
+ r && (r.tagName === "TD" || r.tagName === "TH") && e.add(r), n.remove();
2778
+ }), e.forEach((n) => {
2779
+ var r;
2780
+ n.style.position === "relative" && (n.style.removeProperty("position"), (r = n.getAttribute("style")) != null && r.trim() || n.removeAttribute("style"));
2781
+ }), t.innerHTML;
2765
2782
  }
2766
- function Eo(o, t, e, n) {
2767
- return (e == null ? void 0 : e.sanitizeOnInput) === !1 ? o : Mo(o, t, n, !0);
2783
+ function At(o) {
2784
+ return o ? Po(o.innerHTML) : "";
2768
2785
  }
2769
- const Yt = class Yt {
2786
+ const qt = class qt {
2770
2787
  /**
2771
2788
  * Resolve configuration from multiple sources with priority
2772
2789
  */
@@ -2958,7 +2975,7 @@ const Yt = class Yt {
2958
2975
  return e;
2959
2976
  }
2960
2977
  };
2961
- Yt.EDITOR_DEFAULTS = {
2978
+ qt.EDITOR_DEFAULTS = {
2962
2979
  height: 400,
2963
2980
  width: "100%",
2964
2981
  readonly: !1,
@@ -3007,7 +3024,7 @@ Yt.EDITOR_DEFAULTS = {
3007
3024
  sanitizeOnInput: !0
3008
3025
  },
3009
3026
  statusbar: !1
3010
- }, Yt.BOOLEAN_ATTRIBUTES = /* @__PURE__ */ new Set([
3027
+ }, qt.BOOLEAN_ATTRIBUTES = /* @__PURE__ */ new Set([
3011
3028
  "readonly",
3012
3029
  "disabled",
3013
3030
  "autofocus",
@@ -3027,52 +3044,52 @@ Yt.EDITOR_DEFAULTS = {
3027
3044
  "security-sanitize-on-paste",
3028
3045
  "security-sanitize-on-input"
3029
3046
  ]);
3030
- let Te = Yt;
3031
- const ri = '.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}}';
3032
- let $t;
3033
- const ai = "__editoraCommandEditorRoot", si = "__editoraLastCommandButton", wo = "editora-editor, [data-editora-editor], .rte-editor, .editora-editor", ko = ".rte-content, .editora-content", xe = /* @__PURE__ */ new Set();
3034
- let Q = null, To = !1, ve = null, Ee = null;
3047
+ let Ce = qt;
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
+ let Gt;
3050
+ const di = "__editoraCommandEditorRoot", ui = "__editoraLastCommandButton", ko = "editora-editor, [data-editora-editor], .rte-editor, .editora-editor", To = ".rte-content, .editora-content", pi = "Rich text editor", xe = /* @__PURE__ */ new Set();
3051
+ let Q = null, Co = !1, Ee = null, we = null;
3035
3052
  function xo(o) {
3036
3053
  if (!(o instanceof HTMLElement)) return !1;
3037
3054
  const t = o;
3038
3055
  return typeof t.execCommand == "function" && (t.tagName.toLowerCase() === "editora-editor" || t.classList.contains("editora-editor") || t.hasAttribute("data-editora-editor"));
3039
3056
  }
3040
- function li(o) {
3057
+ function fi(o) {
3041
3058
  return o ? o.nodeType === Node.ELEMENT_NODE ? o : o.parentElement : null;
3042
3059
  }
3043
- function At(o) {
3060
+ function St(o) {
3044
3061
  if (!o) return null;
3045
3062
  if (xo(o))
3046
3063
  return o;
3047
- const t = o.matches(wo) ? o : o.closest(wo);
3064
+ const t = o.matches(ko) ? o : o.closest(ko);
3048
3065
  return !t || !xo(t) ? null : t;
3049
3066
  }
3050
- function ci() {
3067
+ function hi() {
3051
3068
  var r;
3052
3069
  if (typeof window == "undefined") return null;
3053
- const o = window[ai];
3070
+ const o = window[di];
3054
3071
  if (o instanceof HTMLElement) {
3055
- const a = At(o);
3072
+ const a = St(o);
3056
3073
  if (a) return a;
3057
- const l = o.matches(ko) ? o : o.querySelector(ko);
3074
+ const l = o.matches(To) ? o : o.querySelector(To);
3058
3075
  if (l) {
3059
- const c = At(l);
3076
+ const c = St(l);
3060
3077
  if (c) return c;
3061
3078
  }
3062
3079
  }
3063
- const t = window[si];
3080
+ const t = window[ui];
3064
3081
  if (t instanceof HTMLElement) {
3065
- const a = At(t);
3082
+ const a = St(t);
3066
3083
  if (a) return a;
3067
3084
  }
3068
3085
  const e = document.activeElement;
3069
3086
  if (e) {
3070
- const a = At(e);
3087
+ const a = St(e);
3071
3088
  if (a) return a;
3072
3089
  }
3073
3090
  const n = (r = window.getSelection) == null ? void 0 : r.call(window);
3074
3091
  if (n && n.rangeCount > 0) {
3075
- const a = At(li(n.getRangeAt(0).startContainer));
3092
+ const a = St(fi(n.getRangeAt(0).startContainer));
3076
3093
  if (a) return a;
3077
3094
  }
3078
3095
  if (Q && Q.isConnected)
@@ -3081,32 +3098,32 @@ function ci() {
3081
3098
  if (a.isConnected) return a;
3082
3099
  return null;
3083
3100
  }
3084
- function di() {
3085
- if (typeof window == "undefined" || To) return;
3086
- ve = typeof window.executeEditorCommand == "function" ? window.executeEditorCommand.bind(window) : null, Ee = typeof window.execEditorCommand == "function" ? window.execEditorCommand.bind(window) : null;
3101
+ function mi() {
3102
+ if (typeof window == "undefined" || Co) return;
3103
+ Ee = typeof window.executeEditorCommand == "function" ? window.executeEditorCommand.bind(window) : null, we = typeof window.execEditorCommand == "function" ? window.execEditorCommand.bind(window) : null;
3087
3104
  const o = (t, ...e) => {
3088
- const n = ci();
3089
- return n ? n.execCommand(t, ...e) : ve ? ve(t, ...e) : Ee ? Ee(t, ...e) : !1;
3105
+ const n = hi();
3106
+ return n ? n.execCommand(t, ...e) : Ee ? Ee(t, ...e) : we ? we(t, ...e) : !1;
3090
3107
  };
3091
- window.executeEditorCommand = o, window.execEditorCommand = o, To = !0;
3108
+ window.executeEditorCommand = o, window.execEditorCommand = o, Co = !0;
3092
3109
  }
3093
- function ui() {
3110
+ function gi() {
3094
3111
  const o = "editora-webcomponent-styles";
3095
3112
  if (!document.getElementById(o)) {
3096
3113
  const t = document.createElement("style");
3097
- t.id = o, t.textContent = ri, document.head.appendChild(t);
3114
+ t.id = o, t.textContent = ci, document.head.appendChild(t);
3098
3115
  }
3099
3116
  }
3100
- function pi() {
3101
- if (!$t) {
3117
+ function bi() {
3118
+ if (!Gt) {
3102
3119
  const o = W.__globalPluginLoader;
3103
- o ? $t = o : $t = new Co();
3120
+ o ? Gt = o : Gt = new Ao();
3104
3121
  }
3105
- return $t;
3122
+ return Gt;
3106
3123
  }
3107
3124
  class W extends HTMLElement {
3108
3125
  constructor() {
3109
- if (super(), this.pluginLoader = pi(), this.config = {}, this.isInitialized = !1, this.keyboardShortcutManager = new yn(), this.lastAutosavedContent = "", this.loadedPlugins = [], this.lastBeforeInputType = null, ui(), !this.hasAttribute("data-initial-content")) {
3126
+ if (super(), this.pluginLoader = bi(), this.config = {}, this.isInitialized = !1, this.keyboardShortcutManager = new En(), this.lastAutosavedContent = "", this.preservedContent = null, this.loadedPlugins = [], this.lastBeforeInputType = null, gi(), !this.hasAttribute("data-initial-content")) {
3110
3127
  const t = this.innerHTML.trim();
3111
3128
  t && this.setAttribute("data-initial-content", t);
3112
3129
  }
@@ -3126,6 +3143,7 @@ class W extends HTMLElement {
3126
3143
  "disabled",
3127
3144
  "theme",
3128
3145
  "placeholder",
3146
+ "aria-label",
3129
3147
  "autofocus",
3130
3148
  "autosave",
3131
3149
  "autosave-enabled",
@@ -3205,29 +3223,31 @@ class W extends HTMLElement {
3205
3223
  * Initialize the editor
3206
3224
  */
3207
3225
  async initialize() {
3208
- var n;
3226
+ var r;
3209
3227
  if (this.querySelector(".editora-toolbar") || this.isInitialized) return;
3210
- this.setAttribute("data-editora-editor", "true"), xe.add(this), Q || (Q = this), di(), 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}`);
3211
3229
  const t = await this.loadPlugins();
3212
- if (this.loadedPlugins = t, t.forEach((r) => {
3213
- if (r.init && typeof r.init == "function")
3230
+ if (this.loadedPlugins = t, t.forEach((a) => {
3231
+ if (a.init && typeof a.init == "function")
3214
3232
  try {
3215
- r.init({ editorElement: this });
3216
- } catch (a) {
3217
- console.error(`[RichTextEditor] Error initializing plugin ${r.name}:`, a);
3233
+ a.init({ editorElement: this });
3234
+ } catch (l) {
3235
+ console.error(`[RichTextEditor] Error initializing plugin ${a.name}:`, l);
3218
3236
  }
3219
3237
  }), !this.hasAttribute("data-initial-content") && !this.contentElement) {
3220
- const r = this.innerHTML.trim();
3221
- r && this.setAttribute("data-initial-content", r);
3238
+ const a = this.innerHTML.trim();
3239
+ a && this.setAttribute("data-initial-content", a);
3222
3240
  }
3223
- const e = this.sanitizeLoadedContent(
3224
- (n = this.restoreAutosavedContent()) != null ? n : this.getAttribute("data-initial-content") || ""
3241
+ const e = this.preservedContent;
3242
+ this.preservedContent = null;
3243
+ const n = this.sanitizeLoadedContent(
3244
+ (r = e != null ? e : this.restoreAutosavedContent()) != null ? r : this.getAttribute("data-initial-content") || ""
3225
3245
  );
3226
- this.engine = new cn({
3227
- content: e,
3246
+ this.engine = new un({
3247
+ content: n,
3228
3248
  plugins: t,
3229
3249
  readonly: this.config.readonly
3230
- }), this.createUI(t, e), this.setupEventListeners(), this.startAutosave(), this.isInitialized = !0, this.dispatchEvent(new CustomEvent("editor-ready", {
3250
+ }), this.createUI(t, n), this.setupEventListeners(), this.startAutosave(), this.isInitialized = !0, this.dispatchEvent(new CustomEvent("editor-ready", {
3231
3251
  detail: { api: this.getAPI() },
3232
3252
  bubbles: !0
3233
3253
  }));
@@ -3352,12 +3372,13 @@ class W extends HTMLElement {
3352
3372
  return t.bottom >= 0 && t.top <= window.innerHeight;
3353
3373
  }
3354
3374
  applyAccessibilitySettings() {
3375
+ var e;
3355
3376
  if (!this.contentElement) return;
3356
3377
  const t = this.getAccessibilityConfig();
3357
3378
  if (t.enableARIA) {
3358
3379
  this.contentElement.setAttribute("role", "textbox"), this.contentElement.setAttribute("aria-multiline", "true"), this.contentElement.setAttribute("aria-disabled", this.config.readonly ? "true" : "false");
3359
- const e = typeof this.config.placeholder == "string" ? this.config.placeholder.trim() : "";
3360
- e ? this.contentElement.setAttribute("aria-label", e) : this.contentElement.removeAttribute("aria-label");
3380
+ const n = (e = this.getAttribute("aria-label")) == null ? void 0 : e.trim(), r = typeof this.config.placeholder == "string" ? this.config.placeholder.trim() : "";
3381
+ this.contentElement.setAttribute("aria-label", n || r || pi);
3361
3382
  } else
3362
3383
  this.contentElement.removeAttribute("role"), this.contentElement.removeAttribute("aria-multiline"), this.contentElement.removeAttribute("aria-disabled"), this.contentElement.removeAttribute("aria-label");
3363
3384
  this.contentElement.tabIndex = t.keyboardNavigation ? 0 : -1;
@@ -3457,7 +3478,7 @@ class W extends HTMLElement {
3457
3478
  * editable DOM: sanitizing only after the first edit leaves the page exposed until then.
3458
3479
  */
3459
3480
  sanitizeLoadedContent(t) {
3460
- return Eo(t, this.getContentSanitizeConfig(), this.getSecurityConfig());
3481
+ return wo(t, this.getContentSanitizeConfig(), this.getSecurityConfig());
3461
3482
  }
3462
3483
  getAutosaveConfig() {
3463
3484
  var e, n;
@@ -3525,8 +3546,7 @@ class W extends HTMLElement {
3525
3546
  this.stopAutosave();
3526
3547
  const t = this.getAutosaveConfig();
3527
3548
  !t.enabled || !this.contentElement || (this.autosaveTimer = setInterval(() => {
3528
- var e;
3529
- this.persistAutosave(((e = this.contentElement) == null ? void 0 : e.innerHTML) || "");
3549
+ this.persistAutosave(At(this.contentElement));
3530
3550
  }, t.intervalMs));
3531
3551
  }
3532
3552
  insertHTMLAtSelection(t) {
@@ -3549,7 +3569,7 @@ class W extends HTMLElement {
3549
3569
  */
3550
3570
  createUI(t, e) {
3551
3571
  const n = this.querySelector('[slot="toolbar"]'), r = this.querySelector('[slot="statusbar"]');
3552
- this.innerHTML = "", this.config.toolbar !== !1 && !n ? (this.toolbarElement = document.createElement("div"), this.toolbarElement.className = "editora-toolbar-container", this.appendChild(this.toolbarElement), this.toolbar = new dn(
3572
+ this.innerHTML = "", this.config.toolbar !== !1 && !n ? (this.toolbarElement = document.createElement("div"), this.toolbarElement.className = "editora-toolbar-container", this.appendChild(this.toolbarElement), this.toolbar = new pn(
3553
3573
  {
3554
3574
  items: this.resolveToolbarItems(),
3555
3575
  sticky: this.isToolbarStickyEnabled(),
@@ -3586,7 +3606,7 @@ class W extends HTMLElement {
3586
3606
  }) && e.trim() ? this.contentElement.innerHTML = `<p>${e.trim()}</p>` : this.contentElement.innerHTML = e;
3587
3607
  } else
3588
3608
  this.config.placeholder ? this.contentElement.innerHTML = "" : this.contentElement.innerHTML = "<p><br></p>";
3589
- this.appendChild(this.contentElement), this.isToolbarFloatingEnabled() && (this.floatingToolbar = new un({ enabled: !0 }), this.floatingToolbar.create(this)), r ? this.appendChild(r) : this.isStatusbarEnabled() && (this.statusBarElement = document.createElement("div"), this.statusBarElement.className = "editora-statusbar-container", this.appendChild(this.statusBarElement), this.statusBar = new pn({ 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)), r ? this.appendChild(r) : 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(() => {
3590
3610
  var a;
3591
3611
  return (a = this.contentElement) == null ? void 0 : a.focus();
3592
3612
  }, 0);
@@ -3605,7 +3625,7 @@ class W extends HTMLElement {
3605
3625
  let r = this.contentElement.innerHTML;
3606
3626
  const a = (A = n == null ? void 0 : n.detail) == null ? void 0 : A.allowedTags, l = this.getPerformanceConfig(), c = this.getContentSanitizeConfig(), f = this.getSecurityConfig(), m = this.lastBeforeInputType;
3607
3627
  if (this.lastBeforeInputType = null, f.sanitizeOnInput !== !1 && c.sanitize !== !1 && !m) {
3608
- const w = Eo(r, c, f, a);
3628
+ const w = wo(r, c, f, a);
3609
3629
  if (w !== r) {
3610
3630
  const v = window.getSelection(), Y = v && v.rangeCount > 0 ? v.getRangeAt(0) : null;
3611
3631
  if (this.contentElement.innerHTML = w, Y && v)
@@ -3617,24 +3637,24 @@ class W extends HTMLElement {
3617
3637
  }
3618
3638
  }
3619
3639
  this.contentChangeDebounceTimer && clearTimeout(this.contentChangeDebounceTimer);
3620
- const C = () => {
3640
+ const x = () => {
3621
3641
  this.dispatchEvent(new CustomEvent("content-change", {
3622
- detail: { html: r },
3642
+ detail: { html: Po(r) },
3623
3643
  bubbles: !0
3624
3644
  }));
3625
3645
  };
3626
- l.debounceInputMs > 0 ? this.contentChangeDebounceTimer = setTimeout(C, l.debounceInputMs) : C(), this.updateStatusBar();
3646
+ l.debounceInputMs > 0 ? this.contentChangeDebounceTimer = setTimeout(x, l.debounceInputMs) : x(), this.updateStatusBar();
3627
3647
  }), this.contentElement.addEventListener("contextmenu", (n) => {
3628
3648
  const r = this.config.contextMenu;
3629
3649
  (r === !1 || typeof r == "object" && r !== null && r.enabled === !1) && n.preventDefault();
3630
3650
  }), this.contentElement.addEventListener("paste", (n) => {
3631
- var E, C;
3651
+ var E, x;
3632
3652
  if (n.__editoraSmartPasteHandled === !0 || n.defaultPrevented)
3633
3653
  return;
3634
3654
  n.preventDefault();
3635
3655
  const r = this.config.paste || {};
3636
3656
  let a = ((E = n.clipboardData) == null ? void 0 : E.getData("text/html")) || "";
3637
- const l = ((C = n.clipboardData) == null ? void 0 : C.getData("text/plain")) || "", c = this.getContentSanitizeConfig(), f = this.getSecurityConfig(), m = !!a && /class=["'][^"']*Mso|xmlns:w=|urn:schemas-microsoft-com:office/i.test(a);
3657
+ const l = ((x = n.clipboardData) == null ? void 0 : x.getData("text/plain")) || "", c = this.getContentSanitizeConfig(), f = this.getSecurityConfig(), m = !!a && /class=["'][^"']*Mso|xmlns:w=|urn:schemas-microsoft-com:office/i.test(a);
3638
3658
  if ((r.clean || !r.keepFormatting) && l) {
3639
3659
  document.execCommand("insertText", !1, l);
3640
3660
  return;
@@ -3644,7 +3664,7 @@ class W extends HTMLElement {
3644
3664
  return;
3645
3665
  }
3646
3666
  if (a) {
3647
- f.sanitizeOnPaste !== !1 && c.sanitize !== !1 && (a = ii(a, c, f)), this.insertHTMLAtSelection(a);
3667
+ f.sanitizeOnPaste !== !1 && c.sanitize !== !1 && (a = ai(a, c, f)), this.insertHTMLAtSelection(a);
3648
3668
  return;
3649
3669
  }
3650
3670
  l && document.execCommand("insertText", !1, l);
@@ -3652,7 +3672,7 @@ class W extends HTMLElement {
3652
3672
  Q = this, this.dispatchEvent(new Event("editor-focus", { bubbles: !0 })), this.updateStatusBar();
3653
3673
  }), this.contentElement.addEventListener("blur", () => {
3654
3674
  this.contentChangeDebounceTimer && (clearTimeout(this.contentChangeDebounceTimer), this.contentChangeDebounceTimer = void 0), this.contentElement && this.dispatchEvent(new CustomEvent("content-change", {
3655
- detail: { html: this.contentElement.innerHTML },
3675
+ detail: { html: At(this.contentElement) },
3656
3676
  bubbles: !0
3657
3677
  })), this.dispatchEvent(new Event("editor-blur", { bubbles: !0 })), this.updateFloatingToolbar(), this.updateStatusBar();
3658
3678
  }), this.contentElement.addEventListener("keydown", (n) => {
@@ -3733,10 +3753,10 @@ class W extends HTMLElement {
3733
3753
  const t = this.getPerformanceConfig(), e = document.activeElement === this.contentElement || this.contentElement.contains(document.activeElement);
3734
3754
  if (t.viewportOnlyScan && !this.isEditorInViewport() && !e)
3735
3755
  return;
3736
- const n = this.contentElement.textContent || "", { words: r, chars: a } = gn(n), l = mn(this.contentElement);
3756
+ const n = this.contentElement.textContent || "", { words: r, chars: a } = yn(n), l = bn(this.contentElement);
3737
3757
  let c, f;
3738
3758
  const m = this.getSelectionRangeInEditor();
3739
- m && (c = fn(this.contentElement, m), m.collapsed || (f = bn(m, c), c = void 0)), this.statusBar.update({
3759
+ m && (c = mn(this.contentElement, m), m.collapsed || (f = vn(m, c), c = void 0)), this.statusBar.update({
3740
3760
  wordCount: r,
3741
3761
  charCount: a,
3742
3762
  lineCount: l,
@@ -3767,6 +3787,7 @@ class W extends HTMLElement {
3767
3787
  case "placeholder":
3768
3788
  this.contentElement && (this.contentElement.setAttribute("data-placeholder", e), this.applyAccessibilitySettings());
3769
3789
  break;
3790
+ case "aria-label":
3770
3791
  case "accessibility":
3771
3792
  case "accessibility-enable-aria":
3772
3793
  case "accessibility-keyboard-navigation":
@@ -3828,7 +3849,7 @@ class W extends HTMLElement {
3828
3849
  const n = this.attributes[e];
3829
3850
  t[n.name] = n.value;
3830
3851
  }
3831
- return Te.resolve({
3852
+ return Ce.resolve({
3832
3853
  jsConfig: this.jsConfig,
3833
3854
  attributes: t
3834
3855
  });
@@ -3838,10 +3859,7 @@ class W extends HTMLElement {
3838
3859
  */
3839
3860
  getAPI() {
3840
3861
  return {
3841
- getContent: () => {
3842
- var t;
3843
- return ((t = this.contentElement) == null ? void 0 : t.innerHTML) || "";
3844
- },
3862
+ getContent: () => At(this.contentElement),
3845
3863
  setContent: (t) => {
3846
3864
  this.contentElement && (this.contentElement.innerHTML = this.sanitizeLoadedContent(t));
3847
3865
  },
@@ -3869,12 +3887,11 @@ class W extends HTMLElement {
3869
3887
  */
3870
3888
  destroy() {
3871
3889
  var t, e, n, r;
3872
- this.contentChangeDebounceTimer && (clearTimeout(this.contentChangeDebounceTimer), this.contentChangeDebounceTimer = void 0), this.contentElement && this.persistAutosave(this.contentElement.innerHTML || ""), this.stopAutosave(), this.selectionChangeHandler && (document.removeEventListener("selectionchange", this.selectionChangeHandler), this.selectionChangeHandler = void 0), (t = this.engine) == null || t.destroy(), (e = this.toolbar) == null || e.destroy(), (n = this.floatingToolbar) == null || n.destroy(), (r = this.statusBar) == null || r.destroy(), this.innerHTML = "", this.contentElement = void 0, this.toolbarElement = void 0, this.statusBarElement = void 0, this.loadedPlugins = [], this.isInitialized = !1, xe.delete(this), Q === this && (Q = null), this.dispatchEvent(new Event("editor-destroy", { bubbles: !0 }));
3890
+ this.contentChangeDebounceTimer && (clearTimeout(this.contentChangeDebounceTimer), this.contentChangeDebounceTimer = void 0), this.contentElement && (this.preservedContent = At(this.contentElement), this.persistAutosave(this.preservedContent)), this.stopAutosave(), this.selectionChangeHandler && (document.removeEventListener("selectionchange", this.selectionChangeHandler), this.selectionChangeHandler = void 0), (t = this.engine) == null || t.destroy(), (e = this.toolbar) == null || e.destroy(), (n = this.floatingToolbar) == null || n.destroy(), (r = this.statusBar) == null || r.destroy(), this.innerHTML = "", this.contentElement = void 0, this.toolbarElement = void 0, this.statusBarElement = void 0, this.loadedPlugins = [], this.isInitialized = !1, xe.delete(this), Q === this && (Q = null), this.dispatchEvent(new Event("editor-destroy", { bubbles: !0 }));
3873
3891
  }
3874
3892
  // Public API methods
3875
3893
  getContent() {
3876
- var t;
3877
- return ((t = this.contentElement) == null ? void 0 : t.innerHTML) || "";
3894
+ return At(this.contentElement);
3878
3895
  }
3879
3896
  setContent(t) {
3880
3897
  this.contentElement && (this.contentElement.innerHTML = this.sanitizeLoadedContent(t));
@@ -3891,9 +3908,9 @@ class W extends HTMLElement {
3891
3908
  (t = this.contentElement) == null || t.blur();
3892
3909
  }
3893
3910
  }
3894
- const Kt = new Co();
3895
- W.__globalPluginLoader = Kt;
3896
- const fi = {
3911
+ const Yt = new Ao();
3912
+ W.__globalPluginLoader = Yt;
3913
+ const yi = {
3897
3914
  // Core editing plugins (always loaded)
3898
3915
  bold: () => import("./BoldPlugin.native-CSh_LiIJ.mjs").then((o) => o.BoldPlugin()),
3899
3916
  italic: () => import("./ItalicPlugin.native-CmnlwFHB.mjs").then((o) => o.ItalicPlugin()),
@@ -3901,27 +3918,27 @@ const fi = {
3901
3918
  strikethrough: () => import("./StrikethroughPlugin.native-V0TL4F48.mjs").then((o) => o.StrikethroughPlugin()),
3902
3919
  clearFormatting: () => import("./ClearFormattingPlugin.native-Pp0O-SBf.mjs").then((o) => o.ClearFormattingPlugin()),
3903
3920
  heading: () => import("./HeadingPlugin.native-DZdvubrQ.mjs").then((o) => o.HeadingPlugin()),
3904
- blockquote: () => import("./BlockquotePlugin.native-57_Xcjl1.mjs").then((o) => o.BlockquotePlugin()),
3905
- code: () => import("./CodePlugin.native-BH-K4xmW.mjs").then((o) => o.CodePlugin()),
3921
+ blockquote: () => import("./BlockquotePlugin.native-D8jjGd0c.mjs").then((o) => o.BlockquotePlugin()),
3922
+ code: () => import("./CodePlugin.native-BcVqm5MS.mjs").then((o) => o.CodePlugin()),
3906
3923
  codeSample: () => import("./CodeSamplePlugin.native-svbAFWh_.mjs").then((o) => o.CodeSamplePlugin()),
3907
3924
  list: () => import("./ListPlugin.native-Bt0LANbO.mjs").then((o) => o.ListPlugin()),
3908
- checklist: () => import("./ChecklistPlugin.native-NVrBUkaL.mjs").then((o) => o.ChecklistPlugin()),
3925
+ checklist: () => import("./ChecklistPlugin.native-DLedNLsb.mjs").then((o) => o.ChecklistPlugin()),
3909
3926
  textAlignment: () => import("./TextAlignmentPlugin.native-sM_1s00t.mjs").then((o) => o.TextAlignmentPlugin()),
3910
3927
  indent: () => import("./IndentPlugin.native-BHixp8sP.mjs").then((o) => o.IndentPlugin()),
3911
- direction: () => import("./DirectionPlugin.native-Bl-QLFzO.mjs").then((o) => o.DirectionPlugin()),
3928
+ direction: () => import("./DirectionPlugin.native-B-Zj-EAt.mjs").then((o) => o.DirectionPlugin()),
3912
3929
  textColor: () => import("./TextColorPlugin.native-KMZ2uzlq.mjs").then((o) => o.TextColorPlugin()),
3913
3930
  backgroundColor: () => import("./BackgroundColorPlugin.native-H3XyYD7_.mjs").then((o) => o.BackgroundColorPlugin()),
3914
3931
  fontSize: () => import("./FontSizePlugin.native-DsLrH8eq.mjs").then((o) => o.FontSizePlugin()),
3915
- fontFamily: () => import("./FontFamilyPlugin.native-M3cNQ0KA.mjs").then((o) => o.FontFamilyPlugin()),
3932
+ fontFamily: () => import("./FontFamilyPlugin.native-DLq9x046.mjs").then((o) => o.FontFamilyPlugin()),
3916
3933
  formatPainter: () => import("./FormatPainterPlugin.native-BhjzsiVq.mjs").then((o) => o.FormatPainterPlugin()),
3917
3934
  "format-painter": () => import("./FormatPainterPlugin.native-BhjzsiVq.mjs").then((o) => o.FormatPainterPlugin()),
3918
3935
  formatpainter: () => import("./FormatPainterPlugin.native-BhjzsiVq.mjs").then((o) => o.FormatPainterPlugin()),
3919
3936
  lineHeight: () => import("./LineHeightPlugin.native-CM7iXdQj.mjs").then((o) => o.LineHeightPlugin()),
3920
- capitalization: () => import("./CapitalizationPlugin.native-C-HRbXGh.mjs").then((o) => o.CapitalizationPlugin()),
3937
+ capitalization: () => import("./CapitalizationPlugin.native-Mh-kUy-x.mjs").then((o) => o.CapitalizationPlugin()),
3921
3938
  history: () => import("./HistoryPlugin.native-DPvhks6h.mjs").then((o) => o.HistoryPlugin()),
3922
3939
  // Advanced plugins (lazy loaded)
3923
3940
  link: () => import("./LinkPlugin.native-BsQXYsK6.mjs").then((o) => o.LinkPlugin()),
3924
- table: () => import("./TablePlugin.native-BjIxYZ2X.mjs").then((o) => o.TablePlugin()),
3941
+ table: () => import("./TablePlugin.native-C1YZ372P.mjs").then((o) => o.TablePlugin()),
3925
3942
  trackChanges: () => import("./TrackChangesPlugin.native-Bghu2q4a.mjs").then((o) => o.TrackChangesPlugin()),
3926
3943
  versionDiff: () => import("./VersionDiffPlugin.native-Ca1fMWUJ.mjs").then((o) => o.VersionDiffPlugin()),
3927
3944
  "version-diff": () => import("./VersionDiffPlugin.native-Ca1fMWUJ.mjs").then((o) => o.VersionDiffPlugin()),
@@ -3957,33 +3974,33 @@ const fi = {
3957
3974
  blockslibrary: () => import("./BlocksLibraryPlugin.native-CownM6Rk.mjs").then((o) => o.BlocksLibraryPlugin()),
3958
3975
  mentions: () => import("./MentionPlugin.native-S_lwGZQO.mjs").then((o) => o.MentionPlugin()),
3959
3976
  mention: () => import("./MentionPlugin.native-S_lwGZQO.mjs").then((o) => o.MentionPlugin()),
3960
- anchor: () => import("./AnchorPlugin.native-DXZdK3zr.mjs").then((o) => o.AnchorPlugin()),
3977
+ anchor: () => import("./AnchorPlugin.native-Drmxhy98.mjs").then((o) => o.AnchorPlugin()),
3961
3978
  embedIframe: () => import("./EmbedIframePlugin.native-BfZ_HGlV.mjs").then((o) => o.EmbedIframePlugin()),
3962
3979
  math: () => import("./MathPlugin.native-Byo3WL0f.mjs").then((o) => o.MathPlugin()),
3963
3980
  image: () => import("./MediaManagerPlugin.native-BT1NZIJS.mjs").then((o) => o.MediaManagerPlugin()),
3964
3981
  mergeTag: () => import("./MergeTagPlugin.native-7-6F3S1Y.mjs").then((o) => o.MergeTagPlugin()),
3965
3982
  pageBreak: () => import("./PageBreakPlugin.native-DijGuHJZ.mjs").then((o) => o.PageBreakPlugin()),
3966
3983
  print: () => import("./PrintPlugin.native-7qt5v7L5.mjs").then((o) => o.PrintPlugin()),
3967
- preview: () => import("./PreviewPlugin.native-CiR51jql.mjs").then((o) => o.PreviewPlugin()),
3984
+ preview: () => import("./PreviewPlugin.native-Dv5OsffK.mjs").then((o) => o.PreviewPlugin()),
3968
3985
  specialCharacters: () => import("./SpecialCharactersPlugin.native-CdZoc1GB.mjs").then((o) => o.SpecialCharactersPlugin()),
3969
3986
  slashCommands: () => import("./SlashCommandsPlugin.native-BDIIwGNs.mjs").then((o) => o.SlashCommandsPlugin()),
3970
3987
  "slash-commands": () => import("./SlashCommandsPlugin.native-BDIIwGNs.mjs").then((o) => o.SlashCommandsPlugin()),
3971
- spellCheck: () => import("./SpellCheckPlugin.native-Bef2oTLB.mjs").then((o) => o.SpellCheckPlugin()),
3988
+ spellCheck: () => import("./SpellCheckPlugin.native-BGm2qPfn.mjs").then((o) => o.SpellCheckPlugin()),
3972
3989
  emojis: () => import("./EmojisPlugin.native-D92aaOKi.mjs").then((o) => o.EmojisPlugin()),
3973
- a11yChecker: () => import("./A11yCheckerPlugin.native-DIKuCeFw.mjs").then((o) => o.A11yCheckerPlugin()),
3974
- comments: () => import("./CommentsPlugin.native-CLip9wAO.mjs").then((o) => o.CommentsPlugin()),
3975
- collaboration: () => import("./CollaborationPlugin.native-oSybCGPW.mjs").then((o) => o.CollaborationPlugin()),
3976
- "document-manager": () => import("./DocumentManagerPlugin.native-iFip6s4Q.mjs").then((o) => o.DocumentManagerPlugin()),
3990
+ a11yChecker: () => import("./A11yCheckerPlugin.native-qW_njhLY.mjs").then((o) => o.A11yCheckerPlugin()),
3991
+ comments: () => import("./CommentsPlugin.native-DncTHiEe.mjs").then((o) => o.CommentsPlugin()),
3992
+ collaboration: () => import("./CollaborationPlugin.native-Bl3R9CRI.mjs").then((o) => o.CollaborationPlugin()),
3993
+ "document-manager": () => import("./DocumentManagerPlugin.native-B8K-Oqom.mjs").then((o) => o.DocumentManagerPlugin()),
3977
3994
  fullscreen: () => import("./FullscreenPlugin.native-ChXyxeNw.mjs").then((o) => o.FullscreenPlugin()),
3978
- template: () => import("./TemplatePlugin.native-D6n5RUnC.mjs").then((o) => o.TemplatePlugin()),
3995
+ template: () => import("./TemplatePlugin.native-Dwk8TgxI.mjs").then((o) => o.TemplatePlugin()),
3979
3996
  footnote: () => import("./FootnotePlugin.native-D730OGRm.mjs").then((o) => o.FootnotePlugin())
3980
3997
  };
3981
- async function hi() {
3982
- return Object.entries(fi).forEach(([o, t]) => {
3983
- Kt.register(o, t);
3984
- }), Kt;
3998
+ async function vi() {
3999
+ return Object.entries(yi).forEach(([o, t]) => {
4000
+ Yt.register(o, t);
4001
+ }), Yt;
3985
4002
  }
3986
- typeof window != "undefined" && hi().then((o) => {
4003
+ typeof window != "undefined" && vi().then((o) => {
3987
4004
  W.__globalPluginLoader = o, customElements.get("editora-editor") || customElements.define("editora-editor", W);
3988
4005
  const t = document.querySelectorAll("editora-editor:not([data-initial-content])"), e = [];
3989
4006
  t.forEach((a) => {
@@ -3996,7 +4013,7 @@ typeof window != "undefined" && hi().then((o) => {
3996
4013
  e[l] && a.setAttribute("data-initial-content", e[l]);
3997
4014
  }), window.Editora = {
3998
4015
  version: "1.0.0",
3999
- plugins: Kt.getRegisteredPluginNames(),
4016
+ plugins: Yt.getRegisteredPluginNames(),
4000
4017
  WebComponent: W,
4001
4018
  init: async (a, l) => {
4002
4019
  const c = document.querySelector(a);
@@ -4006,6 +4023,6 @@ typeof window != "undefined" && hi().then((o) => {
4006
4023
  });
4007
4024
  export {
4008
4025
  W as RichTextEditorElement,
4009
- hi as initWebComponent
4026
+ vi as initWebComponent
4010
4027
  };
4011
4028
  //# sourceMappingURL=webcomponent.js.map