@harbour-enterprises/superdoc 0.10.59 → 0.10.61

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 (29) hide show
  1. package/dist/chunks/{super-editor.es-zactM06E.es.js → super-editor.es-DLnaQ9Pa.es.js} +5516 -5489
  2. package/dist/chunks/{super-editor.es-dV6e-64I.cjs → super-editor.es-Dl4ZHGtR.cjs} +85 -84
  3. package/dist/style.css +1 -1
  4. package/dist/super-editor/ai-writer.es.js +1 -1
  5. package/dist/super-editor/chunks/{converter-Cs71TBnr.js → converter-Ce2-D35j.js} +2 -2
  6. package/dist/super-editor/chunks/{docx-zipper-6jKpuHRM.js → docx-zipper-hQhZ7R1x.js} +1 -1
  7. package/dist/super-editor/chunks/{editor-D2wFJ3Vj.js → editor-BR_ymsaE.js} +335 -334
  8. package/dist/super-editor/chunks/{toolbar-BdbU1Nep.js → toolbar-FCEYKoeL.js} +2 -2
  9. package/dist/super-editor/components/toolbar/color-dropdown-helpers.d.ts +1 -1
  10. package/dist/super-editor/components/toolbar/color-dropdown-helpers.d.ts.map +1 -1
  11. package/dist/super-editor/components/toolbar/defaultItems.d.ts.map +1 -1
  12. package/dist/super-editor/components/toolbar/super-toolbar.d.ts.map +1 -1
  13. package/dist/super-editor/components/toolbar/use-toolbar-item.d.ts +1 -0
  14. package/dist/super-editor/components/toolbar/use-toolbar-item.d.ts.map +1 -1
  15. package/dist/super-editor/converter.es.js +1 -1
  16. package/dist/super-editor/core/Editor.d.ts.map +1 -1
  17. package/dist/super-editor/docx-zipper.es.js +2 -2
  18. package/dist/super-editor/editor.es.js +3 -3
  19. package/dist/super-editor/file-zipper.es.js +1 -1
  20. package/dist/super-editor/style.css +1 -1
  21. package/dist/super-editor/super-editor.es.js +564 -538
  22. package/dist/super-editor/toolbar.es.js +2 -2
  23. package/dist/super-editor.cjs +1 -1
  24. package/dist/super-editor.es.js +8 -8
  25. package/dist/superdoc.cjs +5 -5
  26. package/dist/superdoc.es.js +3 -3
  27. package/dist/superdoc.umd.js +1543 -1516
  28. package/dist/superdoc.umd.js.map +1 -1
  29. package/package.json +1 -1
@@ -3,20 +3,20 @@ var ta = (e) => {
3
3
  throw TypeError(e);
4
4
  };
5
5
  var vf = (e, t, n) => t in e ? wf(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
6
- var I = (e, t, n) => vf(e, typeof t != "symbol" ? t + "" : t, n), Ko = (e, t, n) => t.has(e) || ta("Cannot " + n);
7
- var Qe = (e, t, n) => (Ko(e, t, "read from private field"), n ? n.call(e) : t.get(e)), ft = (e, t, n) => t.has(e) ? ta("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Xo = (e, t, n, r) => (Ko(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), N = (e, t, n) => (Ko(e, t, "access private method"), n);
6
+ var I = (e, t, n) => vf(e, typeof t != "symbol" ? t + "" : t, n), Xo = (e, t, n) => t.has(e) || ta("Cannot " + n);
7
+ var Qe = (e, t, n) => (Xo(e, t, "read from private field"), n ? n.call(e) : t.get(e)), ft = (e, t, n) => t.has(e) ? ta("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Jo = (e, t, n, r) => (Xo(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), N = (e, t, n) => (Xo(e, t, "access private method"), n);
8
8
  import * as T from "yjs";
9
9
  import { UndoManager as kf, Item as xf, ContentType as Cf, Text as Mf, XmlElement as Sf } from "yjs";
10
- import { P as Y, a as G, M as dr, c as X, N as z, S as Q, T as j, b as W, D as Vn, F as P, d as nn, e as Af, f as tc, A as Or, p as oe, B as Of, i as Tf, g as nc, h as Df, j as wt, l as Tr, k as Ht, m as rc, r as oc, R as ln, o as ur, n as na, q as $t, s as ki, t as ic, u as Nf, v as Ef, w as de, x as Ve, y as Io, z as xn, C as go, E as Pf, G as Ce, H as io, I as sc, J as Cn, K as Jo, L as Yo, O as Go, Q as so, U as Rt, V as Ro, W as If, X as ra, Y as oa, Z as Rf, _ as Lf, $ as Ff } from "./converter-Cs71TBnr.js";
11
- import { ref as ia, computed as Bf, createElementBlock as Kt, openBlock as Xt, withModifiers as Zo, Fragment as zf, renderList as _f, normalizeClass as $f, createCommentVNode as sa, toDisplayString as Qo, createElementVNode as Vf, createApp as Hf } from "vue";
12
- import { D as aa } from "./docx-zipper-6jKpuHRM.js";
13
- function Lo(e) {
10
+ import { P as Y, a as G, M as dr, c as X, N as z, S as Q, T as j, b as W, D as Vn, F as P, d as nn, e as Af, f as tc, A as Or, p as oe, B as Of, i as Tf, g as nc, h as Df, j as wt, l as Tr, k as Ht, m as rc, r as oc, R as ln, o as ur, n as na, q as $t, s as xi, t as ic, u as Nf, v as Ef, w as de, x as Ve, y as Ro, z as xn, C as yo, E as Pf, G as Ce, H as io, I as sc, J as Cn, K as Yo, L as Go, O as Zo, Q as so, U as Rt, V as Lo, W as If, X as ra, Y as oa, Z as Rf, _ as Lf, $ as Ff } from "./converter-Ce2-D35j.js";
11
+ import { ref as ia, computed as Bf, createElementBlock as Kt, openBlock as Xt, withModifiers as Qo, Fragment as zf, renderList as _f, normalizeClass as $f, createCommentVNode as sa, toDisplayString as ei, createElementVNode as Vf, createApp as Hf } from "vue";
12
+ import { D as aa } from "./docx-zipper-hQhZ7R1x.js";
13
+ function Fo(e) {
14
14
  const { from: t, to: n, empty: r } = e.selection, o = [];
15
15
  return r ? (e.storedMarks && o.push(...e.storedMarks), o.push(...e.selection.$head.marks())) : e.doc.nodesBetween(t, n, (i) => {
16
16
  o.push(...i.marks);
17
17
  }), o;
18
18
  }
19
- const Fo = (e, t, n = !1) => {
19
+ const Bo = (e, t, n = !1) => {
20
20
  const { selection: r, doc: o } = e, { $from: i, $to: s } = r, a = i.marks().find((u) => u.type === t), l = s.marks().find((u) => u.type === t);
21
21
  let c;
22
22
  const d = [];
@@ -33,12 +33,12 @@ const Fo = (e, t, n = !1) => {
33
33
  }), n ? d : c;
34
34
  };
35
35
  function jf(e) {
36
- const { state: t } = e, { selection: n } = t, r = Lo(t), o = n.$head.parent.attrs.marksAttrs, i = r.filter((f) => !["textStyle", "link"].includes(f.type.name)).map((f) => ({ name: f.type.name, attrs: f.attrs })), s = r.filter((f) => f.type.name === "textStyle");
36
+ const { state: t } = e, { selection: n } = t, r = Fo(t), o = n.$head.parent.attrs.marksAttrs, i = r.filter((f) => !["textStyle", "link"].includes(f.type.name)).map((f) => ({ name: f.type.name, attrs: f.attrs })), s = r.filter((f) => f.type.name === "textStyle");
37
37
  if (i.push(...s.flatMap(la)), o) {
38
38
  const f = o.filter((h) => !["textStyle", "link"].includes(h.type)).map((h) => ({ name: h.type, attrs: h.attrs || {} })), p = o.filter((h) => h.type === "textStyle");
39
39
  i.push(...f), i.push(...p.flatMap(la));
40
40
  }
41
- const a = t.schema.marks.link, l = Fo(t, a);
41
+ const a = t.schema.marks.link, l = Bo(t, a);
42
42
  if (l) {
43
43
  let { from: f, to: p, attrs: h } = l;
44
44
  n.from >= f && n.to <= p && i.push({ name: "link", attrs: h });
@@ -70,10 +70,10 @@ function Wf(e) {
70
70
  return {};
71
71
  }
72
72
  }
73
- var yo = 200, ue = function() {
73
+ var bo = 200, ue = function() {
74
74
  };
75
75
  ue.prototype.append = function(t) {
76
- return t.length ? (t = ue.from(t), !this.length && t || t.length < yo && this.leafAppend(t) || this.length < yo && t.leafPrepend(this) || this.appendInner(t)) : this;
76
+ return t.length ? (t = ue.from(t), !this.length && t || t.length < bo && this.leafAppend(t) || this.length < bo && t.leafPrepend(this) || this.appendInner(t)) : this;
77
77
  };
78
78
  ue.prototype.prepend = function(t) {
79
79
  return t.length ? ue.from(t).append(this) : this;
@@ -122,10 +122,10 @@ var ac = /* @__PURE__ */ function(e) {
122
122
  if (o(this.values[l], a + l) === !1)
123
123
  return !1;
124
124
  }, t.prototype.leafAppend = function(o) {
125
- if (this.length + o.length <= yo)
125
+ if (this.length + o.length <= bo)
126
126
  return new t(this.values.concat(o.flatten()));
127
127
  }, t.prototype.leafPrepend = function(o) {
128
- if (this.length + o.length <= yo)
128
+ if (this.length + o.length <= bo)
129
129
  return new t(o.flatten().concat(this.values));
130
130
  }, n.length.get = function() {
131
131
  return this.values.length;
@@ -317,9 +317,9 @@ function Jf(e, t, n, r) {
317
317
  if (s && s.getMeta(vt))
318
318
  return s.getMeta(vt).redo ? new Tt(e.done.addTransform(n, void 0, r, ao(t)), e.undone, ca(n.mapping.maps), e.prevTime, e.prevComposition) : new Tt(e.done, e.undone.addTransform(n, void 0, r, ao(t)), null, e.prevTime, e.prevComposition);
319
319
  if (n.getMeta("addToHistory") !== !1 && !(s && s.getMeta("addToHistory") === !1)) {
320
- let a = n.getMeta("composition"), l = e.prevTime == 0 || !s && e.prevComposition != a && (e.prevTime < (n.time || 0) - r.newGroupDelay || !Yf(n, e.prevRanges)), c = s ? ei(e.prevRanges, n.mapping) : ca(n.mapping.maps);
320
+ let a = n.getMeta("composition"), l = e.prevTime == 0 || !s && e.prevComposition != a && (e.prevTime < (n.time || 0) - r.newGroupDelay || !Yf(n, e.prevRanges)), c = s ? ti(e.prevRanges, n.mapping) : ca(n.mapping.maps);
321
321
  return new Tt(e.done.addTransform(n, l ? t.selection.getBookmark() : void 0, r, ao(t)), Ye.empty, c, n.time, a ?? e.prevComposition);
322
- } else return (i = n.getMeta("rebased")) ? new Tt(e.done.rebased(n, i), e.undone.rebased(n, i), ei(e.prevRanges, n.mapping), e.prevTime, e.prevComposition) : new Tt(e.done.addMaps(n.mapping.maps), e.undone.addMaps(n.mapping.maps), ei(e.prevRanges, n.mapping), e.prevTime, e.prevComposition);
322
+ } else return (i = n.getMeta("rebased")) ? new Tt(e.done.rebased(n, i), e.undone.rebased(n, i), ti(e.prevRanges, n.mapping), e.prevTime, e.prevComposition) : new Tt(e.done.addMaps(n.mapping.maps), e.undone.addMaps(n.mapping.maps), ti(e.prevRanges, n.mapping), e.prevTime, e.prevComposition);
323
323
  }
324
324
  function Yf(e, t) {
325
325
  if (!t)
@@ -338,7 +338,7 @@ function ca(e) {
338
338
  e[n].forEach((r, o, i, s) => t.push(i, s));
339
339
  return t;
340
340
  }
341
- function ei(e, t) {
341
+ function ti(e, t) {
342
342
  if (!e)
343
343
  return null;
344
344
  let n = [];
@@ -355,18 +355,18 @@ function Gf(e, t, n) {
355
355
  let s = i.selection.resolve(i.transform.doc), a = (n ? e.done : e.undone).addTransform(i.transform, t.selection.getBookmark(), o, r), l = new Tt(n ? a : i.remaining, n ? i.remaining : a, null, 0, -1);
356
356
  return i.transform.setSelection(s).setMeta(vt, { redo: n, historyState: l });
357
357
  }
358
- let ti = !1, da = null;
358
+ let ni = !1, da = null;
359
359
  function ao(e) {
360
360
  let t = e.plugins;
361
361
  if (da != t) {
362
- ti = !1, da = t;
362
+ ni = !1, da = t;
363
363
  for (let n = 0; n < t.length; n++)
364
364
  if (t[n].spec.historyPreserveItems) {
365
- ti = !0;
365
+ ni = !0;
366
366
  break;
367
367
  }
368
368
  }
369
- return ti;
369
+ return ni;
370
370
  }
371
371
  const vt = new Y("history"), Zf = new Y("closeHistory");
372
372
  function Qf(e = {}) {
@@ -474,7 +474,7 @@ const uc = ee.create({
474
474
  "Mod-y": () => this.editor.commands.redo()
475
475
  };
476
476
  }
477
- }), ni = globalThis || void 0 || self, ye = function(e) {
477
+ }), ri = globalThis || void 0 || self, ye = function(e) {
478
478
  for (var t = 0; ; t++)
479
479
  if (e = e.previousSibling, !e)
480
480
  return t;
@@ -482,12 +482,12 @@ const uc = ee.create({
482
482
  let t = e.assignedSlot || e.parentNode;
483
483
  return t && t.nodeType == 11 ? t.host : t;
484
484
  };
485
- let xi = null;
485
+ let Ci = null;
486
486
  const mt = function(e, t, n) {
487
- let r = xi || (xi = document.createRange());
487
+ let r = Ci || (Ci = document.createRange());
488
488
  return r.setEnd(e, n ?? e.nodeValue.length), r.setStart(e, t || 0), r;
489
489
  }, ep = function() {
490
- xi = null;
490
+ Ci = null;
491
491
  }, cn = function(e, t, n, r) {
492
492
  return n && (ua(e, t, n, r, -1) || ua(e, t, n, r, 1));
493
493
  }, tp = /^(img|br|input|textarea|hr)$/i;
@@ -555,7 +555,7 @@ function Dr(e) {
555
555
  ;
556
556
  return t && t.node && t.node.isBlock && (t.dom == e || t.contentDOM == e);
557
557
  }
558
- const Bo = function(e) {
558
+ const zo = function(e) {
559
559
  return e.focusNode && cn(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset);
560
560
  };
561
561
  function Zt(e, t) {
@@ -582,9 +582,9 @@ function sp(e, t, n) {
582
582
  return { node: r.startContainer, offset: Math.min($e(r.startContainer), r.startOffset) };
583
583
  }
584
584
  }
585
- const st = typeof navigator < "u" ? navigator : null, fa = typeof document < "u" ? document : null, jt = st && st.userAgent || "", Ci = /Edge\/(\d+)/.exec(jt), fc = /MSIE \d/.exec(jt), Mi = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(jt), De = !!(fc || Mi || Ci), Lt = fc ? document.documentMode : Mi ? +Mi[1] : Ci ? +Ci[1] : 0, Ge = !De && /gecko\/(\d+)/i.test(jt);
585
+ const st = typeof navigator < "u" ? navigator : null, fa = typeof document < "u" ? document : null, jt = st && st.userAgent || "", Mi = /Edge\/(\d+)/.exec(jt), fc = /MSIE \d/.exec(jt), Si = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(jt), De = !!(fc || Si || Mi), Lt = fc ? document.documentMode : Si ? +Si[1] : Mi ? +Mi[1] : 0, Ge = !De && /gecko\/(\d+)/i.test(jt);
586
586
  Ge && +(/Firefox\/(\d+)/.exec(jt) || [0, 0])[1];
587
- const Si = !De && /Chrome\/(\d+)/.exec(jt), ve = !!Si, pc = Si ? +Si[1] : 0, Me = !De && !!st && /Apple Computer/.test(st.vendor), Nn = Me && (/Mobile\/\w+/.test(jt) || !!st && st.maxTouchPoints > 2), _e = Nn || (st ? /Mac/.test(st.platform) : !1), ap = st ? /Win/.test(st.platform) : !1, bt = /Android \d/.test(jt), Nr = !!fa && "webkitFontSmoothing" in fa.documentElement.style, lp = Nr ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
587
+ const Ai = !De && /Chrome\/(\d+)/.exec(jt), ve = !!Ai, pc = Ai ? +Ai[1] : 0, Me = !De && !!st && /Apple Computer/.test(st.vendor), Nn = Me && (/Mobile\/\w+/.test(jt) || !!st && st.maxTouchPoints > 2), _e = Nn || (st ? /Mac/.test(st.platform) : !1), ap = st ? /Win/.test(st.platform) : !1, bt = /Android \d/.test(jt), Nr = !!fa && "webkitFontSmoothing" in fa.documentElement.style, lp = Nr ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
588
588
  function cp(e) {
589
589
  let t = e.defaultView && e.defaultView.visualViewport;
590
590
  return t ? {
@@ -820,14 +820,14 @@ function bc(e, t, n) {
820
820
  if (i == null && o && (n < 0 || o == $e(r))) {
821
821
  let l = r.childNodes[o - 1];
822
822
  if (l.nodeType == 1)
823
- return ri(l.getBoundingClientRect(), !1);
823
+ return oi(l.getBoundingClientRect(), !1);
824
824
  }
825
825
  if (i == null && o < $e(r)) {
826
826
  let l = r.childNodes[o];
827
827
  if (l.nodeType == 1)
828
- return ri(l.getBoundingClientRect(), !0);
828
+ return oi(l.getBoundingClientRect(), !0);
829
829
  }
830
- return ri(r.getBoundingClientRect(), n >= 0);
830
+ return oi(r.getBoundingClientRect(), n >= 0);
831
831
  }
832
832
  if (i == null && o && (n < 0 || o == $e(r))) {
833
833
  let l = r.childNodes[o - 1], c = l.nodeType == 3 ? mt(l, $e(l) - (s ? 0 : 1)) : l.nodeType == 1 && (l.nodeName != "BR" || !l.nextSibling) ? l : null;
@@ -850,7 +850,7 @@ function Xn(e, t) {
850
850
  let n = t ? e.left : e.right;
851
851
  return { top: e.top, bottom: e.bottom, left: n, right: n };
852
852
  }
853
- function ri(e, t) {
853
+ function oi(e, t) {
854
854
  if (e.height == 0)
855
855
  return e;
856
856
  let n = t ? e.top : e.bottom;
@@ -1341,7 +1341,7 @@ class dn extends Er {
1341
1341
  }
1342
1342
  slice(t, n, r) {
1343
1343
  let o = dn.create(this.parent, this.mark, !0, r), i = this.children, s = this.size;
1344
- n < s && (i = Oi(i, n, s, r)), t > 0 && (i = Oi(i, 0, t, r));
1344
+ n < s && (i = Ti(i, n, s, r)), t > 0 && (i = Ti(i, 0, t, r));
1345
1345
  for (let a = 0; a < i.length; a++)
1346
1346
  i[a].parent = o;
1347
1347
  return o.children = i, o;
@@ -1381,7 +1381,7 @@ class Ft extends Er {
1381
1381
  } else d || ({ dom: d, contentDOM: u } = Vn.renderSpec(document, n.type.spec.toDOM(n), null, n.attrs));
1382
1382
  !u && !n.isText && d.nodeName != "BR" && (d.hasAttribute("contenteditable") || (d.contentEditable = "false"), n.type.spec.draggable && (d.draggable = !0));
1383
1383
  let f = d;
1384
- return d = Mc(d, r, n), c ? l = new Sp(t, n, r, o, d, u || null, f, c, i, s + 1) : n.isText ? new zo(t, n, r, o, d, f, i) : new Ft(t, n, r, o, d, u || null, f, i, s + 1);
1384
+ return d = Mc(d, r, n), c ? l = new Sp(t, n, r, o, d, u || null, f, c, i, s + 1) : n.isText ? new _o(t, n, r, o, d, f, i) : new Ft(t, n, r, o, d, u || null, f, i, s + 1);
1385
1385
  }
1386
1386
  parseRule() {
1387
1387
  if (this.node.type.spec.reparseInView)
@@ -1404,7 +1404,7 @@ class Ft extends Er {
1404
1404
  return t;
1405
1405
  }
1406
1406
  matchesNode(t, n, r) {
1407
- return this.dirty == He && t.eq(this.node) && bo(n, this.outerDeco) && r.eq(this.innerDeco);
1407
+ return this.dirty == He && t.eq(this.node) && wo(n, this.outerDeco) && r.eq(this.innerDeco);
1408
1408
  }
1409
1409
  get size() {
1410
1410
  return this.node.nodeSize;
@@ -1451,7 +1451,7 @@ class Ft extends Er {
1451
1451
  i.pmViewDesc && (i.pmViewDesc = void 0);
1452
1452
  }
1453
1453
  let s = new Mp(this, i, n, o);
1454
- t.input.compositionNodes.push(s), this.children = Oi(this.children, r, r + o.length, t, s);
1454
+ t.input.compositionNodes.push(s), this.children = Ti(this.children, r, r + o.length, t, s);
1455
1455
  }
1456
1456
  // If this desc must be updated to match the given node decoration,
1457
1457
  // do so and return true.
@@ -1462,10 +1462,10 @@ class Ft extends Er {
1462
1462
  this.updateOuterDeco(n), this.node = t, this.innerDeco = r, this.contentDOM && this.updateChildren(o, this.posAtStart), this.dirty = He;
1463
1463
  }
1464
1464
  updateOuterDeco(t) {
1465
- if (bo(t, this.outerDeco))
1465
+ if (wo(t, this.outerDeco))
1466
1466
  return;
1467
1467
  let n = this.nodeDOM.nodeType != 1, r = this.dom;
1468
- this.dom = Cc(this.dom, this.nodeDOM, Ai(this.outerDeco, this.node, n), Ai(t, this.node, n)), this.dom != r && (r.pmViewDesc = void 0, this.dom.pmViewDesc = this), this.outerDeco = t;
1468
+ this.dom = Cc(this.dom, this.nodeDOM, Oi(this.outerDeco, this.node, n), Oi(t, this.node, n)), this.dom != r && (r.pmViewDesc = void 0, this.dom.pmViewDesc = this), this.outerDeco = t;
1469
1469
  }
1470
1470
  // Mark this node as being the selected node.
1471
1471
  selectNode() {
@@ -1484,7 +1484,7 @@ function wa(e, t, n, r, o) {
1484
1484
  let i = new Ft(void 0, e, t, n, r, r, r, o, 0);
1485
1485
  return i.contentDOM && i.updateChildren(o, 0), i;
1486
1486
  }
1487
- class zo extends Ft {
1487
+ class _o extends Ft {
1488
1488
  constructor(t, n, r, o, i, s, a) {
1489
1489
  super(t, n, r, o, i, null, s, a, 0);
1490
1490
  }
@@ -1515,7 +1515,7 @@ class zo extends Ft {
1515
1515
  }
1516
1516
  slice(t, n, r) {
1517
1517
  let o = this.node.cut(t, n), i = document.createTextNode(o.text);
1518
- return new zo(this.parent, o, this.outerDeco, this.innerDeco, i, i, r);
1518
+ return new _o(this.parent, o, this.outerDeco, this.innerDeco, i, i, r);
1519
1519
  }
1520
1520
  markDirty(t, n) {
1521
1521
  super.markDirty(t, n), this.dom != this.nodeDOM && (t == 0 || n == this.nodeDOM.nodeValue.length) && (this.dirty = at);
@@ -1599,7 +1599,7 @@ const tr = function(e) {
1599
1599
  };
1600
1600
  tr.prototype = /* @__PURE__ */ Object.create(null);
1601
1601
  const en = [new tr()];
1602
- function Ai(e, t, n) {
1602
+ function Oi(e, t, n) {
1603
1603
  if (e.length == 0)
1604
1604
  return en;
1605
1605
  let r = n ? en[0] : new tr(), o = [r];
@@ -1652,9 +1652,9 @@ function Ap(e, t, n) {
1652
1652
  }
1653
1653
  }
1654
1654
  function Mc(e, t, n) {
1655
- return Cc(e, e, en, Ai(t, n, e.nodeType != 1));
1655
+ return Cc(e, e, en, Oi(t, n, e.nodeType != 1));
1656
1656
  }
1657
- function bo(e, t) {
1657
+ function wo(e, t) {
1658
1658
  if (e.length != t.length)
1659
1659
  return !1;
1660
1660
  for (let n = 0; n < e.length; n++)
@@ -1756,7 +1756,7 @@ class Op {
1756
1756
  let c = this.preMatch.matched.get(l);
1757
1757
  if (c != null && c != i)
1758
1758
  return !1;
1759
- let d = l.dom, u, f = this.isLocked(d) && !(t.isText && l.node && l.node.isText && l.nodeDOM.nodeValue == t.text && l.dirty != at && bo(n, l.outerDeco));
1759
+ let d = l.dom, u, f = this.isLocked(d) && !(t.isText && l.node && l.node.isText && l.nodeDOM.nodeValue == t.text && l.dirty != at && wo(n, l.outerDeco));
1760
1760
  if (!f && l.update(t, n, r, o))
1761
1761
  return this.destroyBetween(this.index, a), l.dom != d && (this.changed = !0), this.index++, !0;
1762
1762
  if (!f && (u = this.recreateWrapper(l, t, n, r, o, s)))
@@ -1769,7 +1769,7 @@ class Op {
1769
1769
  // When a node with content is replaced by a different node with
1770
1770
  // identical content, move over its children.
1771
1771
  recreateWrapper(t, n, r, o, i, s) {
1772
- if (t.dirty || n.isAtom || !t.children.length || !t.node.content.eq(n.content) || !bo(r, t.outerDeco) || !o.eq(t.innerDeco))
1772
+ if (t.dirty || n.isAtom || !t.children.length || !t.node.content.eq(n.content) || !wo(r, t.outerDeco) || !o.eq(t.innerDeco))
1773
1773
  return null;
1774
1774
  let a = Ft.create(this.top, n, r, o, i, s);
1775
1775
  if (a.contentDOM) {
@@ -1800,7 +1800,7 @@ class Op {
1800
1800
  for (; t instanceof dn; )
1801
1801
  n = t, t = n.children[n.children.length - 1];
1802
1802
  (!t || // Empty textblock
1803
- !(t instanceof zo) || /\n$/.test(t.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(t.node.text)) && ((Me || ve) && t && t.dom.contentEditable == "false" && this.addHackNode("IMG", n), this.addHackNode("BR", this.top));
1803
+ !(t instanceof _o) || /\n$/.test(t.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(t.node.text)) && ((Me || ve) && t && t.dom.contentEditable == "false" && this.addHackNode("IMG", n), this.addHackNode("BR", this.top));
1804
1804
  }
1805
1805
  addHackNode(t, n) {
1806
1806
  if (n == this.top && this.index < n.children.length && n.children[this.index].matchesHack(t))
@@ -1924,7 +1924,7 @@ function Pp(e, t, n, r) {
1924
1924
  }
1925
1925
  return -1;
1926
1926
  }
1927
- function Oi(e, t, n, r, o) {
1927
+ function Ti(e, t, n, r, o) {
1928
1928
  let i = [];
1929
1929
  for (let s = 0, a = 0; s < e.length; s++) {
1930
1930
  let l = e[s], c = a, d = a += l.size;
@@ -1940,7 +1940,7 @@ function ks(e, t = null) {
1940
1940
  if (s < 0)
1941
1941
  return null;
1942
1942
  let a = r.resolve(s), l, c;
1943
- if (Bo(n)) {
1943
+ if (zo(n)) {
1944
1944
  for (l = s; o && !o.node; )
1945
1945
  o = o.parent;
1946
1946
  let u = o.node;
@@ -1996,15 +1996,15 @@ const ka = Me || ve && pc < 63;
1996
1996
  function xa(e, t) {
1997
1997
  let { node: n, offset: r } = e.docView.domFromPos(t, 0), o = r < n.childNodes.length ? n.childNodes[r] : null, i = r ? n.childNodes[r - 1] : null;
1998
1998
  if (Me && o && o.contentEditable == "false")
1999
- return oi(o);
1999
+ return ii(o);
2000
2000
  if ((!o || o.contentEditable == "false") && (!i || i.contentEditable == "false")) {
2001
2001
  if (o)
2002
- return oi(o);
2002
+ return ii(o);
2003
2003
  if (i)
2004
- return oi(i);
2004
+ return ii(i);
2005
2005
  }
2006
2006
  }
2007
- function oi(e) {
2007
+ function ii(e) {
2008
2008
  return e.contentEditable = "true", Me && e.draggable && (e.draggable = !1, e.wasDraggable = !0), e;
2009
2009
  }
2010
2010
  function Ca(e) {
@@ -2057,7 +2057,7 @@ function Lp(e) {
2057
2057
  let t = e.docView.domFromPos(e.state.selection.anchor, 0), n = e.domSelectionRange();
2058
2058
  return cn(t.node, t.offset, n.anchorNode, n.anchorOffset);
2059
2059
  }
2060
- function Ti(e, t) {
2060
+ function Di(e, t) {
2061
2061
  let { $anchor: n, $head: r } = e.selection, o = t > 0 ? n.max(r) : n.min(r), i = o.parent.inlineContent ? o.depth ? e.doc.resolve(t > 0 ? o.after() : o.before()) : null : o;
2062
2062
  return i && Q.findFrom(i, t);
2063
2063
  }
@@ -2075,7 +2075,7 @@ function Aa(e, t, n) {
2075
2075
  return Dt(e, new j(r.$anchor, s));
2076
2076
  } else if (r.empty) {
2077
2077
  if (e.endOfTextblock(t > 0 ? "forward" : "backward")) {
2078
- let o = Ti(e.state, t);
2078
+ let o = Di(e.state, t);
2079
2079
  return o && o instanceof z ? Dt(e, o) : !1;
2080
2080
  } else if (!(_e && n.indexOf("m") > -1)) {
2081
2081
  let o = r.$head, i = o.textOffset ? null : t < 0 ? o.nodeBefore : o.nodeAfter, s;
@@ -2089,12 +2089,12 @@ function Aa(e, t, n) {
2089
2089
  if (r instanceof z && r.node.isInline)
2090
2090
  return Dt(e, new j(t > 0 ? r.$to : r.$from));
2091
2091
  {
2092
- let o = Ti(e.state, t);
2092
+ let o = Di(e.state, t);
2093
2093
  return o ? Dt(e, o) : !1;
2094
2094
  }
2095
2095
  }
2096
2096
  }
2097
- function wo(e) {
2097
+ function vo(e) {
2098
2098
  return e.nodeType == 3 ? e.nodeValue.length : e.childNodes.length;
2099
2099
  }
2100
2100
  function nr(e, t) {
@@ -2109,7 +2109,7 @@ function Fp(e) {
2109
2109
  if (!n)
2110
2110
  return;
2111
2111
  let o, i, s = !1;
2112
- for (Ge && n.nodeType == 1 && r < wo(n) && nr(n.childNodes[r], -1) && (s = !0); ; )
2112
+ for (Ge && n.nodeType == 1 && r < vo(n) && nr(n.childNodes[r], -1) && (s = !0); ; )
2113
2113
  if (r > 0) {
2114
2114
  if (n.nodeType != 1)
2115
2115
  break;
@@ -2130,7 +2130,7 @@ function Fp(e) {
2130
2130
  for (; a && nr(a, -1); )
2131
2131
  o = n.parentNode, i = ye(a), a = a.previousSibling;
2132
2132
  if (a)
2133
- n = a, r = wo(n);
2133
+ n = a, r = vo(n);
2134
2134
  else {
2135
2135
  if (n = n.parentNode, n == e.dom)
2136
2136
  break;
@@ -2138,13 +2138,13 @@ function Fp(e) {
2138
2138
  }
2139
2139
  }
2140
2140
  }
2141
- s ? Di(e, n, r) : o && Di(e, o, i);
2141
+ s ? Ni(e, n, r) : o && Ni(e, o, i);
2142
2142
  }
2143
2143
  function Bp(e) {
2144
2144
  let t = e.domSelectionRange(), n = t.focusNode, r = t.focusOffset;
2145
2145
  if (!n)
2146
2146
  return;
2147
- let o = wo(n), i, s;
2147
+ let o = vo(n), i, s;
2148
2148
  for (; ; )
2149
2149
  if (r < o) {
2150
2150
  if (n.nodeType != 1)
@@ -2162,7 +2162,7 @@ function Bp(e) {
2162
2162
  for (; a && nr(a, 1); )
2163
2163
  i = a.parentNode, s = ye(a) + 1, a = a.nextSibling;
2164
2164
  if (a)
2165
- n = a, r = 0, o = wo(n);
2165
+ n = a, r = 0, o = vo(n);
2166
2166
  else {
2167
2167
  if (n = n.parentNode, n == e.dom)
2168
2168
  break;
@@ -2170,7 +2170,7 @@ function Bp(e) {
2170
2170
  }
2171
2171
  }
2172
2172
  }
2173
- i && Di(e, i, s);
2173
+ i && Ni(e, i, s);
2174
2174
  }
2175
2175
  function Tc(e) {
2176
2176
  let t = e.pmViewDesc;
@@ -2200,7 +2200,7 @@ function _p(e, t) {
2200
2200
  e = n, t = e.childNodes.length;
2201
2201
  }
2202
2202
  }
2203
- function Di(e, t, n) {
2203
+ function Ni(e, t, n) {
2204
2204
  if (t.nodeType != 3) {
2205
2205
  let i, s;
2206
2206
  (s = zp(t, n)) ? (t = s, n = 0) : (i = _p(t, n)) && (t = i, n = i.nodeValue.length);
@@ -2208,7 +2208,7 @@ function Di(e, t, n) {
2208
2208
  let r = e.domSelection();
2209
2209
  if (!r)
2210
2210
  return;
2211
- if (Bo(r)) {
2211
+ if (zo(r)) {
2212
2212
  let i = document.createRange();
2213
2213
  i.setEnd(t, n), i.setStart(t, n), r.removeAllRanges(), r.addRange(i);
2214
2214
  } else r.extend && r.extend(t, n);
@@ -2241,7 +2241,7 @@ function Ta(e, t, n) {
2241
2241
  return !1;
2242
2242
  let { $from: o, $to: i } = r;
2243
2243
  if (!o.parent.inlineContent || e.endOfTextblock(t < 0 ? "up" : "down")) {
2244
- let s = Ti(e.state, t);
2244
+ let s = Di(e.state, t);
2245
2245
  if (s && s instanceof z)
2246
2246
  return Dt(e, s);
2247
2247
  }
@@ -2436,12 +2436,12 @@ function Pc(e, t) {
2436
2436
  let n = e.content.replaceChild(e.childCount - 1, Pc(e.lastChild, t - 1)), r = e.contentMatchAt(e.childCount).fillBefore(P.empty, !0);
2437
2437
  return e.copy(n.append(r));
2438
2438
  }
2439
- function Ni(e, t, n, r, o, i) {
2439
+ function Ei(e, t, n, r, o, i) {
2440
2440
  let s = t < 0 ? e.firstChild : e.lastChild, a = s.content;
2441
- return e.childCount > 1 && (i = 0), o < r - 1 && (a = Ni(a, t, n, r, o + 1, i)), o >= n && (a = t < 0 ? s.contentMatchAt(0).fillBefore(a, i <= o).append(a) : a.append(s.contentMatchAt(s.childCount).fillBefore(P.empty, !0))), e.replaceChild(t < 0 ? 0 : e.childCount - 1, s.copy(a));
2441
+ return e.childCount > 1 && (i = 0), o < r - 1 && (a = Ei(a, t, n, r, o + 1, i)), o >= n && (a = t < 0 ? s.contentMatchAt(0).fillBefore(a, i <= o).append(a) : a.append(s.contentMatchAt(s.childCount).fillBefore(P.empty, !0))), e.replaceChild(t < 0 ? 0 : e.childCount - 1, s.copy(a));
2442
2442
  }
2443
2443
  function Ea(e, t, n) {
2444
- return t < e.openStart && (e = new W(Ni(e.content, -1, t, e.openStart, 0, e.openEnd), t, e.openEnd)), n < e.openEnd && (e = new W(Ni(e.content, 1, n, e.openEnd, 0, 0), e.openStart, n)), e;
2444
+ return t < e.openStart && (e = new W(Ei(e.content, -1, t, e.openStart, 0, e.openEnd), t, e.openEnd)), n < e.openEnd && (e = new W(Ei(e.content, 1, n, e.openEnd, 0, 0), e.openStart, n)), e;
2445
2445
  }
2446
2446
  const Ic = {
2447
2447
  thead: ["table"],
@@ -2458,10 +2458,10 @@ let Pa = null;
2458
2458
  function Rc() {
2459
2459
  return Pa || (Pa = document.implementation.createHTMLDocument("title"));
2460
2460
  }
2461
- let ii = null;
2461
+ let si = null;
2462
2462
  function Up(e) {
2463
2463
  let t = window.trustedTypes;
2464
- return t ? (ii || (ii = t.createPolicy("ProseMirrorClipboard", { createHTML: (n) => n })), ii.createHTML(e)) : e;
2464
+ return t ? (si || (si = t.createPolicy("ProseMirrorClipboard", { createHTML: (n) => n })), si.createHTML(e)) : e;
2465
2465
  }
2466
2466
  function qp(e) {
2467
2467
  let t = /^(\s*<meta [^>]*>)*/.exec(e);
@@ -2510,7 +2510,7 @@ function Gp(e) {
2510
2510
  Qp(e, r) && !Ms(e, r) && (e.editable || !(r.type in Ae)) && n(e, r);
2511
2511
  }, Jp[t] ? { passive: !0 } : void 0);
2512
2512
  }
2513
- Me && e.dom.addEventListener("input", () => null), Ei(e);
2513
+ Me && e.dom.addEventListener("input", () => null), Pi(e);
2514
2514
  }
2515
2515
  function Pt(e, t) {
2516
2516
  e.input.lastSelectionOrigin = t, e.input.lastSelectionTime = Date.now();
@@ -2521,7 +2521,7 @@ function Zp(e) {
2521
2521
  e.dom.removeEventListener(t, e.input.eventHandlers[t]);
2522
2522
  clearTimeout(e.input.composingTimeout), clearTimeout(e.input.lastIOSEnterFallbackTimeout);
2523
2523
  }
2524
- function Ei(e) {
2524
+ function Pi(e) {
2525
2525
  e.someProp("handleDOMEvents", (t) => {
2526
2526
  for (let n in t)
2527
2527
  e.input.eventHandlers[n] || e.dom.addEventListener(n, e.input.eventHandlers[n] = (r) => Ms(e, r));
@@ -2573,7 +2573,7 @@ Ae.keypress = (e, t) => {
2573
2573
  !/[\r\n]/.test(o) && !e.someProp("handleTextInput", (i) => i(e, r.$from.pos, r.$to.pos, o)) && e.dispatch(e.state.tr.insertText(o).scrollIntoView()), n.preventDefault();
2574
2574
  }
2575
2575
  };
2576
- function _o(e) {
2576
+ function $o(e) {
2577
2577
  return { left: e.clientX, top: e.clientY };
2578
2578
  }
2579
2579
  function th(e, t) {
@@ -2644,7 +2644,7 @@ function ah(e, t, n) {
2644
2644
  }
2645
2645
  }
2646
2646
  function As(e) {
2647
- return vo(e);
2647
+ return ko(e);
2648
2648
  }
2649
2649
  const Lc = _e ? "metaKey" : "ctrlKey";
2650
2650
  Se.mousedown = (e, t) => {
@@ -2652,7 +2652,7 @@ Se.mousedown = (e, t) => {
2652
2652
  e.input.shiftKey = n.shiftKey;
2653
2653
  let r = As(e), o = Date.now(), i = "singleClick";
2654
2654
  o - e.input.lastClick.time < 500 && th(n, e.input.lastClick) && !n[Lc] && (e.input.lastClick.type == "singleClick" ? i = "doubleClick" : e.input.lastClick.type == "doubleClick" && (i = "tripleClick")), e.input.lastClick = { time: o, x: n.clientX, y: n.clientY, type: i };
2655
- let s = e.posAtCoords(_o(n));
2655
+ let s = e.posAtCoords($o(n));
2656
2656
  s && (i == "singleClick" ? (e.input.mouseDown && e.input.mouseDown.done(), e.input.mouseDown = new lh(e, s, n, !!r)) : (i == "doubleClick" ? ih : sh)(e, s.pos, s.inside, n) ? n.preventDefault() : Pt(e, "pointer"));
2657
2657
  };
2658
2658
  class lh {
@@ -2684,7 +2684,7 @@ class lh {
2684
2684
  if (this.done(), !this.view.dom.contains(t.target))
2685
2685
  return;
2686
2686
  let n = this.pos;
2687
- this.view.state.doc != this.startDoc && (n = this.view.posAtCoords(_o(t))), this.updateAllowDefault(t), this.allowDefault || !n ? Pt(this.view, "pointer") : oh(this.view, n.pos, n.inside, t, this.selectNode) ? t.preventDefault() : t.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
2687
+ this.view.state.doc != this.startDoc && (n = this.view.posAtCoords($o(t))), this.updateAllowDefault(t), this.allowDefault || !n ? Pt(this.view, "pointer") : oh(this.view, n.pos, n.inside, t, this.selectNode) ? t.preventDefault() : t.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
2688
2688
  Me && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
2689
2689
  // cursor, but still report that the node is selected
2690
2690
  // when asked through getSelection. You'll then get a
@@ -2717,8 +2717,8 @@ Ae.compositionstart = Ae.compositionupdate = (e) => {
2717
2717
  e.domObserver.flush();
2718
2718
  let { state: t } = e, n = t.selection.$to;
2719
2719
  if (t.selection instanceof j && (t.storedMarks || !n.textOffset && n.parentOffset && n.nodeBefore.marks.some((r) => r.type.spec.inclusive === !1)))
2720
- e.markCursor = e.state.storedMarks || n.marks(), vo(e, !0), e.markCursor = null;
2721
- else if (vo(e, !t.selection.empty), Ge && t.selection.empty && n.parentOffset && !n.textOffset && n.nodeBefore.marks.length) {
2720
+ e.markCursor = e.state.storedMarks || n.marks(), ko(e, !0), e.markCursor = null;
2721
+ else if (ko(e, !t.selection.empty), Ge && t.selection.empty && n.parentOffset && !n.textOffset && n.nodeBefore.marks.length) {
2722
2722
  let r = e.domSelectionRange();
2723
2723
  for (let o = r.focusNode, i = r.focusOffset; o && o.nodeType == 1 && i != 0; ) {
2724
2724
  let s = i < 0 ? o.lastChild : o.childNodes[i - 1];
@@ -2740,7 +2740,7 @@ Ae.compositionend = (e, t) => {
2740
2740
  e.composing && (e.input.composing = !1, e.input.compositionEndedAt = t.timeStamp, e.input.compositionPendingChanges = e.domObserver.pendingRecords().length ? e.input.compositionID : 0, e.input.compositionNode = null, e.input.compositionPendingChanges && Promise.resolve().then(() => e.domObserver.flush()), e.input.compositionID++, Bc(e, 20));
2741
2741
  };
2742
2742
  function Bc(e, t) {
2743
- clearTimeout(e.input.composingTimeout), t > -1 && (e.input.composingTimeout = setTimeout(() => vo(e), t));
2743
+ clearTimeout(e.input.composingTimeout), t > -1 && (e.input.composingTimeout = setTimeout(() => ko(e), t));
2744
2744
  }
2745
2745
  function zc(e) {
2746
2746
  for (e.composing && (e.input.composing = !1, e.input.compositionEndedAt = uh()); e.input.compositionNodes.length > 0; )
@@ -2769,7 +2769,7 @@ function uh() {
2769
2769
  let e = document.createEvent("Event");
2770
2770
  return e.initEvent("event", !0, !0), e.timeStamp;
2771
2771
  }
2772
- function vo(e, t = !1) {
2772
+ function ko(e, t = !1) {
2773
2773
  if (!(bt && e.domObserver.flushingSoon >= 0)) {
2774
2774
  if (e.domObserver.forceFlush(), zc(e), t || e.docView && e.docView.dirty) {
2775
2775
  let n = ks(e);
@@ -2846,7 +2846,7 @@ Se.dragstart = (e, t) => {
2846
2846
  let n = t, r = e.input.mouseDown;
2847
2847
  if (r && r.done(), !n.dataTransfer)
2848
2848
  return;
2849
- let o = e.state.selection, i = o.empty ? null : e.posAtCoords(_o(n)), s;
2849
+ let o = e.state.selection, i = o.empty ? null : e.posAtCoords($o(n)), s;
2850
2850
  if (!(i && i.pos >= o.from && i.pos <= (o instanceof z ? o.to - 1 : o.to))) {
2851
2851
  if (r && r.mightDrag)
2852
2852
  s = z.create(e.state.doc, r.mightDrag.pos);
@@ -2869,7 +2869,7 @@ Ae.drop = (e, t) => {
2869
2869
  let n = t, r = e.dragging;
2870
2870
  if (e.dragging = null, !n.dataTransfer)
2871
2871
  return;
2872
- let o = e.posAtCoords(_o(n));
2872
+ let o = e.posAtCoords($o(n));
2873
2873
  if (!o)
2874
2874
  return;
2875
2875
  let i = e.state.doc.resolve(o.pos), s = r && r.slice;
@@ -2937,7 +2937,7 @@ function hr(e, t) {
2937
2937
  return !1;
2938
2938
  return !0;
2939
2939
  }
2940
- class ko {
2940
+ class xo {
2941
2941
  constructor(t, n) {
2942
2942
  this.toDOM = t, this.spec = n || rn, this.side = this.spec.side || 0;
2943
2943
  }
@@ -2949,7 +2949,7 @@ class ko {
2949
2949
  return !0;
2950
2950
  }
2951
2951
  eq(t) {
2952
- return this == t || t instanceof ko && (this.spec.key && this.spec.key == t.spec.key || this.toDOM == t.toDOM && hr(this.spec, t.spec));
2952
+ return this == t || t instanceof xo && (this.spec.key && this.spec.key == t.spec.key || this.toDOM == t.toDOM && hr(this.spec, t.spec));
2953
2953
  }
2954
2954
  destroy(t) {
2955
2955
  this.spec.destroy && this.spec.destroy(t);
@@ -3030,7 +3030,7 @@ class _ {
3030
3030
  widget's current document position.
3031
3031
  */
3032
3032
  static widget(t, n, r) {
3033
- return new _(t, t, new ko(n, r));
3033
+ return new _(t, t, new xo(n, r));
3034
3034
  }
3035
3035
  /**
3036
3036
  Creates an inline decoration, which adds the given attributes to
@@ -3064,7 +3064,7 @@ class _ {
3064
3064
  @internal
3065
3065
  */
3066
3066
  get widget() {
3067
- return this.type instanceof ko;
3067
+ return this.type instanceof xo;
3068
3068
  }
3069
3069
  }
3070
3070
  const Mn = [], rn = {};
@@ -3081,7 +3081,7 @@ class L {
3081
3081
  you must make a copy if you want need to preserve that.
3082
3082
  */
3083
3083
  static create(t, n) {
3084
- return n.length ? xo(n, t, 0, rn) : we;
3084
+ return n.length ? Co(n, t, 0, rn) : we;
3085
3085
  }
3086
3086
  /**
3087
3087
  Find all decorations in this set which touch the given range
@@ -3140,7 +3140,7 @@ class L {
3140
3140
  if (d = jc(n, a, c)) {
3141
3141
  for (o || (o = this.children.slice()); i < o.length && o[i] < l; )
3142
3142
  i += 3;
3143
- o[i] == l ? o[i + 2] = o[i + 2].addInner(a, d, c + 1) : o.splice(i, 0, l, l + a.nodeSize, xo(d, a, c + 1, rn)), i += 3;
3143
+ o[i] == l ? o[i + 2] = o[i + 2].addInner(a, d, c + 1) : o.splice(i, 0, l, l + a.nodeSize, Co(d, a, c + 1, rn)), i += 3;
3144
3144
  }
3145
3145
  });
3146
3146
  let s = Hc(i ? Wc(n) : n, -r);
@@ -3336,7 +3336,7 @@ function gh(e, t, n, r, o, i, s) {
3336
3336
  l = !0;
3337
3337
  }
3338
3338
  if (l) {
3339
- let c = yh(a, e, t, n, o, i, s), d = xo(c, r, 0, s);
3339
+ let c = yh(a, e, t, n, o, i, s), d = Co(c, r, 0, s);
3340
3340
  t = d.local;
3341
3341
  for (let u = 0; u < a.length; u += 3)
3342
3342
  a[u + 1] < 0 && (a.splice(u, 3), u -= 3);
@@ -3386,13 +3386,13 @@ function Wc(e) {
3386
3386
  e[n] != null && t.push(e[n]);
3387
3387
  return t;
3388
3388
  }
3389
- function xo(e, t, n, r) {
3389
+ function Co(e, t, n, r) {
3390
3390
  let o = [], i = !1;
3391
3391
  t.forEach((a, l) => {
3392
3392
  let c = jc(e, a, l + n);
3393
3393
  if (c) {
3394
3394
  i = !0;
3395
- let d = xo(c, a, n + l + 1, r);
3395
+ let d = Co(c, a, n + l + 1, r);
3396
3396
  d != we && o.push(l, l + a.nodeSize, d);
3397
3397
  }
3398
3398
  });
@@ -3427,7 +3427,7 @@ function Ia(e, t, n) {
3427
3427
  t++;
3428
3428
  e.splice(t, 0, n);
3429
3429
  }
3430
- function si(e) {
3430
+ function ai(e) {
3431
3431
  let t = [];
3432
3432
  return e.someProp("decorations", (n) => {
3433
3433
  let r = n(e.state);
@@ -3563,7 +3563,7 @@ class kh {
3563
3563
  }
3564
3564
  }
3565
3565
  let c = null;
3566
- i < 0 && o && t.input.lastFocus > Date.now() - 200 && Math.max(t.input.lastTouch, t.input.lastClick.time) < Date.now() - 300 && Bo(r) && (c = ks(t)) && c.eq(Q.near(t.state.doc.resolve(0), 1)) ? (t.input.lastFocus = 0, kt(t), this.currentSelection.set(r), t.scrollToSelection()) : (i > -1 || o) && (i > -1 && (t.docView.markDirty(i, s), xh(t)), this.handleDOMChange(i, s, a, l), t.docView && t.docView.dirty ? t.updateState(t.state) : this.currentSelection.eq(r) || kt(t), this.currentSelection.set(r));
3566
+ i < 0 && o && t.input.lastFocus > Date.now() - 200 && Math.max(t.input.lastTouch, t.input.lastClick.time) < Date.now() - 300 && zo(r) && (c = ks(t)) && c.eq(Q.near(t.state.doc.resolve(0), 1)) ? (t.input.lastFocus = 0, kt(t), this.currentSelection.set(r), t.scrollToSelection()) : (i > -1 || o) && (i > -1 && (t.docView.markDirty(i, s), xh(t)), this.handleDOMChange(i, s, a, l), t.docView && t.docView.dirty ? t.updateState(t.state) : this.currentSelection.eq(r) || kt(t), this.currentSelection.set(r));
3567
3567
  }
3568
3568
  registerMutation(t, n) {
3569
3569
  if (n.indexOf(t.target) > -1)
@@ -3632,7 +3632,7 @@ function Mh(e, t) {
3632
3632
  }
3633
3633
  function Sh(e, t, n) {
3634
3634
  let { node: r, fromOffset: o, toOffset: i, from: s, to: a } = e.docView.parseRange(t, n), l = e.domSelectionRange(), c, d = l.anchorNode;
3635
- if (d && e.dom.contains(d.nodeType == 1 ? d : d.parentNode) && (c = [{ node: d, offset: l.anchorOffset }], Bo(l) || c.push({ node: l.focusNode, offset: l.focusOffset })), ve && e.input.lastKeyCode === 8)
3635
+ if (d && e.dom.contains(d.nodeType == 1 ? d : d.parentNode) && (c = [{ node: d, offset: l.anchorOffset }], zo(l) || c.push({ node: l.focusNode, offset: l.focusOffset })), ve && e.input.lastKeyCode === 8)
3636
3636
  for (let g = i; g > o; g--) {
3637
3637
  let b = r.childNodes[g - 1], w = b.pmViewDesc;
3638
3638
  if (b.nodeName == "BR" && !w) {
@@ -3770,7 +3770,7 @@ function Nh(e, t, n, r, o) {
3770
3770
  if (
3771
3771
  // The content must have shrunk
3772
3772
  n - t <= o.pos - r.pos || // newEnd must point directly at or after the end of the block that newStart points into
3773
- ai(r, !0, !1) < o.pos
3773
+ li(r, !0, !1) < o.pos
3774
3774
  )
3775
3775
  return !1;
3776
3776
  let i = e.resolve(t);
@@ -3780,10 +3780,10 @@ function Nh(e, t, n, r, o) {
3780
3780
  }
3781
3781
  if (i.parentOffset < i.parent.content.size || !i.parent.isTextblock)
3782
3782
  return !1;
3783
- let s = e.resolve(ai(i, !0, !0));
3784
- return !s.parent.isTextblock || s.pos > n || ai(s, !0, !1) < n ? !1 : r.parent.content.cut(r.parentOffset).eq(s.parent.content);
3783
+ let s = e.resolve(li(i, !0, !0));
3784
+ return !s.parent.isTextblock || s.pos > n || li(s, !0, !1) < n ? !1 : r.parent.content.cut(r.parentOffset).eq(s.parent.content);
3785
3785
  }
3786
- function ai(e, t, n) {
3786
+ function li(e, t, n) {
3787
3787
  let r = e.depth, o = t ? e.end() : e.pos;
3788
3788
  for (; r > 0 && (t || e.indexAfter(r) == e.node(r).childCount); )
3789
3789
  r--, o++, t = !1;
@@ -3827,7 +3827,7 @@ class Uc {
3827
3827
  added to the document.
3828
3828
  */
3829
3829
  constructor(t, n) {
3830
- this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new Yp(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = n, this.state = n.state, this.directPlugins = n.plugins || [], this.directPlugins.forEach(ja), this.dispatch = this.dispatch.bind(this), this.dom = t && t.mount || document.createElement("div"), t && (t.appendChild ? t.appendChild(this.dom) : typeof t == "function" ? t(this.dom) : t.mount && (this.mounted = !0)), this.editable = Va(this), $a(this), this.nodeViews = Ha(this), this.docView = wa(this.state.doc, _a(this), si(this), this.dom, this), this.domObserver = new kh(this, (r, o, i, s) => Th(this, r, o, i, s)), this.domObserver.start(), Gp(this), this.updatePluginViews();
3830
+ this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new Yp(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = n, this.state = n.state, this.directPlugins = n.plugins || [], this.directPlugins.forEach(ja), this.dispatch = this.dispatch.bind(this), this.dom = t && t.mount || document.createElement("div"), t && (t.appendChild ? t.appendChild(this.dom) : typeof t == "function" ? t(this.dom) : t.mount && (this.mounted = !0)), this.editable = Va(this), $a(this), this.nodeViews = Ha(this), this.docView = wa(this.state.doc, _a(this), ai(this), this.dom, this), this.domObserver = new kh(this, (r, o, i, s) => Th(this, r, o, i, s)), this.domObserver.start(), Gp(this), this.updatePluginViews();
3831
3831
  }
3832
3832
  /**
3833
3833
  Holds `true` when a
@@ -3855,7 +3855,7 @@ class Uc {
3855
3855
  the DOM.
3856
3856
  */
3857
3857
  update(t) {
3858
- t.handleDOMEvents != this._props.handleDOMEvents && Ei(this);
3858
+ t.handleDOMEvents != this._props.handleDOMEvents && Pi(this);
3859
3859
  let n = this._props;
3860
3860
  this._props = t, t.plugins && (t.plugins.forEach(ja), this.directPlugins = t.plugins), this.updateStateInner(t.state, n);
3861
3861
  }
@@ -3889,8 +3889,8 @@ class Uc {
3889
3889
  let p = Ha(this);
3890
3890
  Ih(p, this.nodeViews) && (this.nodeViews = p, i = !0);
3891
3891
  }
3892
- (a || n.handleDOMEvents != this._props.handleDOMEvents) && Ei(this), this.editable = Va(this), $a(this);
3893
- let l = si(this), c = _a(this), d = o.plugins != t.plugins && !o.doc.eq(t.doc) ? "reset" : t.scrollToSelection > o.scrollToSelection ? "to selection" : "preserve", u = i || !this.docView.matchesNode(t.doc, c, l);
3892
+ (a || n.handleDOMEvents != this._props.handleDOMEvents) && Pi(this), this.editable = Va(this), $a(this);
3893
+ let l = ai(this), c = _a(this), d = o.plugins != t.plugins && !o.doc.eq(t.doc) ? "reset" : t.scrollToSelection > o.scrollToSelection ? "to selection" : "preserve", u = i || !this.docView.matchesNode(t.doc, c, l);
3894
3894
  (u || !t.selection.eq(o.selection)) && (s = !0);
3895
3895
  let f = d == "preserve" && s && this.dom.style.overflowAnchor == null && up(this);
3896
3896
  if (s) {
@@ -4120,7 +4120,7 @@ class Uc {
4120
4120
  views](https://prosemirror.net/docs/ref/#view.NodeView).
4121
4121
  */
4122
4122
  destroy() {
4123
- this.docView && (Zp(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], si(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null, ep());
4123
+ this.docView && (Zp(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], ai(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null, ep());
4124
4124
  }
4125
4125
  /**
4126
4126
  This is true when the view has been
@@ -4218,8 +4218,8 @@ const mr = Math.floor, Rh = Math.abs, zt = (e, t) => e < t ? e : t, En = (e, t)
4218
4218
  /** @type {TextEncoder} */
4219
4219
  typeof TextEncoder < "u" ? new TextEncoder() : null
4220
4220
  ), Xh = (e) => yr.encode(e), Jh = yr ? Xh : Kh;
4221
- let li = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8", { fatal: !0, ignoreBOM: !0 });
4222
- li && li.decode(new Uint8Array()).length === 1 && (li = null);
4221
+ let ci = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8", { fatal: !0, ignoreBOM: !0 });
4222
+ ci && ci.decode(new Uint8Array()).length === 1 && (ci = null);
4223
4223
  class Yh {
4224
4224
  constructor() {
4225
4225
  this.cpos = 0, this.cbuf = new Uint8Array(100), this.bufs = [];
@@ -4255,12 +4255,12 @@ const Gh = () => new Yh(), Zh = (e) => {
4255
4255
  const n = Lh(t);
4256
4256
  for (n && (t = -t), me(e, (t > Wa ? gr : 0) | (n ? Fh : 0) | Wa & t), t = mr(t / 64); t > 0; )
4257
4257
  me(e, (t > rr ? gr : 0) | rr & t), t = mr(t / 128);
4258
- }, Pi = new Uint8Array(3e4), rm = Pi.length / 3, om = (e, t) => {
4258
+ }, Ii = new Uint8Array(3e4), rm = Ii.length / 3, om = (e, t) => {
4259
4259
  if (t.length < rm) {
4260
- const n = yr.encodeInto(t, Pi).written || 0;
4260
+ const n = yr.encodeInto(t, Ii).written || 0;
4261
4261
  br(e, n);
4262
4262
  for (let r = 0; r < n; r++)
4263
- me(e, Pi[r]);
4263
+ me(e, Ii[r]);
4264
4264
  } else
4265
4265
  qc(e, Jh(t));
4266
4266
  }, im = (e, t) => {
@@ -4285,7 +4285,7 @@ yr.encodeInto ? om : im, sm = (e, t) => {
4285
4285
  }, am = (e, t) => Ds(e, 4).setFloat32(0, t, !1), lm = (e, t) => Ds(e, 8).setFloat64(0, t, !1), cm = (e, t) => (
4286
4286
  /** @type {any} */
4287
4287
  Ds(e, 8).setBigInt64(0, t, !1)
4288
- ), Ka = new DataView(new ArrayBuffer(4)), dm = (e) => (Ka.setFloat32(0, e), Ka.getFloat32(0) === e), Ii = (e, t) => {
4288
+ ), Ka = new DataView(new ArrayBuffer(4)), dm = (e) => (Ka.setFloat32(0, e), Ka.getFloat32(0) === e), Ri = (e, t) => {
4289
4289
  switch (typeof t) {
4290
4290
  case "string":
4291
4291
  me(e, 119), qa(e, t);
@@ -4302,7 +4302,7 @@ yr.encodeInto ? om : im, sm = (e, t) => {
4302
4302
  else if (Vh(t)) {
4303
4303
  me(e, 117), br(e, t.length);
4304
4304
  for (let n = 0; n < t.length; n++)
4305
- Ii(e, t[n]);
4305
+ Ri(e, t[n]);
4306
4306
  } else if (t instanceof Uint8Array)
4307
4307
  me(e, 116), qc(e, t);
4308
4308
  else {
@@ -4311,7 +4311,7 @@ yr.encodeInto ? om : im, sm = (e, t) => {
4311
4311
  br(e, n.length);
4312
4312
  for (let r = 0; r < n.length; r++) {
4313
4313
  const o = n[r];
4314
- qa(e, o), Ii(e, t[o]);
4314
+ qa(e, o), Ri(e, t[o]);
4315
4315
  }
4316
4316
  }
4317
4317
  break;
@@ -4400,11 +4400,11 @@ const Sm = () => {
4400
4400
  }
4401
4401
  })) : et = lo();
4402
4402
  return et;
4403
- }, Ri = (e) => Sm().has(e), Li = (e) => Xa(Pn ? oe.env[e.toUpperCase().replaceAll("-", "_")] : Mm.getItem(e)), Zc = (e) => Ri("--" + e) || Li(e) !== null;
4403
+ }, Li = (e) => Sm().has(e), Fi = (e) => Xa(Pn ? oe.env[e.toUpperCase().replaceAll("-", "_")] : Mm.getItem(e)), Zc = (e) => Li("--" + e) || Fi(e) !== null;
4404
4404
  Zc("production");
4405
4405
  const Am = Pn && hm(oe.env.FORCE_COLOR, ["true", "1", "2"]);
4406
- Am || !Ri("--no-colors") && // @todo deprecate --no-colors
4407
- !Zc("no-color") && (!Pn || oe.stdout.isTTY) && (!Pn || Ri("--color") || Li("COLORTERM") !== null || (Li("TERM") || "").includes("color"));
4406
+ Am || !Li("--no-colors") && // @todo deprecate --no-colors
4407
+ !Zc("no-color") && (!Pn || oe.stdout.isTTY) && (!Pn || Li("--color") || Fi("COLORTERM") !== null || (Fi("TERM") || "").includes("color"));
4408
4408
  const Om = (
4409
4409
  /** @type {Document} */
4410
4410
  typeof document < "u" ? document : {}
@@ -4546,14 +4546,14 @@ const Bm = (e) => new Fm().digest(e), zm = (e) => {
4546
4546
  for (let n = 0; n < e.byteLength; n++)
4547
4547
  t += Hh(e[n]);
4548
4548
  return btoa(t);
4549
- }, _m = (e) => Of.from(e.buffer, e.byteOffset, e.byteLength).toString("base64"), $m = Gc ? zm : _m, Vm = (e) => Zh((t) => Ii(t, e)), Hm = (e) => {
4549
+ }, _m = (e) => Of.from(e.buffer, e.byteOffset, e.byteLength).toString("base64"), $m = Gc ? zm : _m, Vm = (e) => Zh((t) => Ri(t, e)), Hm = (e) => {
4550
4550
  for (let n = 6; n < e.length; n++)
4551
4551
  e[n % 6] = e[n % 6] ^ e[n];
4552
4552
  return e.slice(0, 6);
4553
4553
  }, jm = (e) => $m(Hm(Bm(Vm(e)))), Wm = () => ({
4554
4554
  mapping: /* @__PURE__ */ new Map(),
4555
4555
  isOMark: /* @__PURE__ */ new Map()
4556
- }), Co = (e, t) => t === void 0 ? !e.deleted : t.sv.has(e.id.client) && /** @type {number} */
4556
+ }), Mo = (e, t) => t === void 0 ? !e.deleted : t.sv.has(e.id.client) && /** @type {number} */
4557
4557
  t.sv.get(e.id.client) > e.id.clock && !T.isDeleted(t.ds, e.id), Um = [{ light: "#ecd44433", dark: "#ecd444" }], qm = (e, t, n) => {
4558
4558
  if (!e.has(n)) {
4559
4559
  if (e.size < t.length) {
@@ -4668,17 +4668,17 @@ t.sv.get(e.id.client) > e.id.clock && !T.isDeleted(t.ds, e.id), Um = [{ light: "
4668
4668
  );
4669
4669
  r !== null && o !== null && (e = e.setSelection(j.create(e.doc, r, o)));
4670
4670
  }
4671
- }, Fi = (e, t) => ({
4671
+ }, Bi = (e, t) => ({
4672
4672
  type: (
4673
4673
  /** @type {any} */
4674
4674
  t.selection.jsonID
4675
4675
  ),
4676
- anchor: So(
4676
+ anchor: Ao(
4677
4677
  t.selection.anchor,
4678
4678
  e.type,
4679
4679
  e.mapping
4680
4680
  ),
4681
- head: So(
4681
+ head: Ao(
4682
4682
  t.selection.head,
4683
4683
  e.type,
4684
4684
  e.mapping
@@ -4691,7 +4691,7 @@ class Jm {
4691
4691
  */
4692
4692
  constructor(t, n = /* @__PURE__ */ new Map()) {
4693
4693
  this.type = t, this.prosemirrorView = null, this.mux = mm(), this.mapping = n, this.isOMark = /* @__PURE__ */ new Map(), this._observeFunction = this._typeChanged.bind(this), this.doc = t.doc, this.beforeTransactionSelection = null, this.beforeAllTransactions = () => {
4694
- this.beforeTransactionSelection === null && this.prosemirrorView != null && (this.beforeTransactionSelection = Fi(
4694
+ this.beforeTransactionSelection === null && this.prosemirrorView != null && (this.beforeTransactionSelection = Bi(
4695
4695
  this,
4696
4696
  this.prosemirrorView.state
4697
4697
  ));
@@ -4813,7 +4813,7 @@ class Jm {
4813
4813
  }, c = T.typeListToArraySnapshot(
4814
4814
  i,
4815
4815
  new T.Snapshot(n.ds, t.sv)
4816
- ).map((u) => !u._item.deleted || Co(u._item, t) || Co(u._item, n) ? or(
4816
+ ).map((u) => !u._item.deleted || Mo(u._item, t) || Mo(u._item, n) ? or(
4817
4817
  u,
4818
4818
  this.prosemirrorView.state.schema,
4819
4819
  { mapping: /* @__PURE__ */ new Map(), isOMark: /* @__PURE__ */ new Map() },
@@ -4879,7 +4879,7 @@ class Jm {
4879
4879
  */
4880
4880
  _prosemirrorChanged(t) {
4881
4881
  this.doc.transact(() => {
4882
- zi(this.doc, this.type, t, this), this.beforeTransactionSelection = Fi(
4882
+ _i(this.doc, this.type, t, this), this.beforeTransactionSelection = Bi(
4883
4883
  this,
4884
4884
  this.prosemirrorView.state
4885
4885
  );
@@ -4953,11 +4953,11 @@ const Qc = (e, t, n, r, o, i) => {
4953
4953
  r === void 0 || o === void 0 ? e.toArray().forEach(a) : T.typeListToArraySnapshot(e, new T.Snapshot(o.ds, r.sv)).forEach(a);
4954
4954
  try {
4955
4955
  const l = e.getAttributes(r);
4956
- r !== void 0 && (Co(
4956
+ r !== void 0 && (Mo(
4957
4957
  /** @type {Y.Item} */
4958
4958
  e._item,
4959
4959
  r
4960
- ) ? Co(
4960
+ ) ? Mo(
4961
4961
  /** @type {Y.Item} */
4962
4962
  e._item,
4963
4963
  o
@@ -5005,11 +5005,11 @@ const Qc = (e, t, n, r, o, i) => {
5005
5005
  }
5006
5006
  return n.insert(
5007
5007
  0,
5008
- $o(e).map(
5009
- (r) => Bi(r, t)
5008
+ Vo(e).map(
5009
+ (r) => zi(r, t)
5010
5010
  )
5011
5011
  ), t.mapping.set(n, e), n;
5012
- }, Bi = (e, t) => e instanceof Array ? Gm(e, t) : Zm(e, t), Ja = (e) => typeof e == "object" && e !== null, Es = (e, t) => {
5012
+ }, zi = (e, t) => e instanceof Array ? Gm(e, t) : Zm(e, t), Ja = (e) => typeof e == "object" && e !== null, Es = (e, t) => {
5013
5013
  const n = Object.keys(e).filter((o) => e[o] !== null);
5014
5014
  let r = n.length === Object.keys(t).filter((o) => t[o] !== null).length;
5015
5015
  for (let o = 0; o < n.length && r; o++) {
@@ -5017,7 +5017,7 @@ const Qc = (e, t, n, r, o, i) => {
5017
5017
  r = i === "ychange" || s === a || Ja(s) && Ja(a) && Es(s, a);
5018
5018
  }
5019
5019
  return r;
5020
- }, $o = (e) => {
5020
+ }, Vo = (e) => {
5021
5021
  const t = e.content.content, n = [];
5022
5022
  for (let r = 0; r < t.length; r++) {
5023
5023
  const o = t[r];
@@ -5044,28 +5044,28 @@ const Qc = (e, t, n, r, o, i) => {
5044
5044
  })
5045
5045
  );
5046
5046
  }, wr = (e, t) => {
5047
- if (e instanceof T.XmlElement && !(t instanceof Array) && _i(e, t)) {
5048
- const n = $o(t);
5047
+ if (e instanceof T.XmlElement && !(t instanceof Array) && $i(e, t)) {
5048
+ const n = Vo(t);
5049
5049
  return e._length === n.length && Es(e.getAttributes(), t.attrs) && e.toArray().every(
5050
5050
  (r, o) => wr(r, n[o])
5051
5051
  );
5052
5052
  }
5053
5053
  return e instanceof T.XmlText && t instanceof Array && ed(e, t);
5054
- }, Mo = (e, t) => e === t || e instanceof Array && t instanceof Array && e.length === t.length && e.every(
5054
+ }, So = (e, t) => e === t || e instanceof Array && t instanceof Array && e.length === t.length && e.every(
5055
5055
  (n, r) => t[r] === n
5056
5056
  ), Ya = (e, t, n) => {
5057
- const r = e.toArray(), o = $o(t), i = o.length, s = r.length, a = zt(s, i);
5057
+ const r = e.toArray(), o = Vo(t), i = o.length, s = r.length, a = zt(s, i);
5058
5058
  let l = 0, c = 0, d = !1;
5059
5059
  for (; l < a; l++) {
5060
5060
  const u = r[l], f = o[l];
5061
- if (Mo(n.mapping.get(u), f))
5061
+ if (So(n.mapping.get(u), f))
5062
5062
  d = !0;
5063
5063
  else if (!wr(u, f))
5064
5064
  break;
5065
5065
  }
5066
5066
  for (; l + c < a; c++) {
5067
5067
  const u = r[s - c - 1], f = o[i - c - 1];
5068
- if (Mo(n.mapping.get(u), f))
5068
+ if (So(n.mapping.get(u), f))
5069
5069
  d = !0;
5070
5070
  else if (!wr(u, f))
5071
5071
  break;
@@ -5111,7 +5111,7 @@ const Qc = (e, t, n, r, o, i) => {
5111
5111
  n[o ? `${r.type.name}--${jm(r.toJSON())}` : r.type.name] = r.attrs;
5112
5112
  }
5113
5113
  }), n;
5114
- }, zi = (e, t, n, r) => {
5114
+ }, _i = (e, t, n, r) => {
5115
5115
  if (t instanceof T.XmlElement && t.nodeName !== n.type.name)
5116
5116
  throw new Error("node name mismatch!");
5117
5117
  if (r.mapping.set(t, n), t instanceof T.XmlElement) {
@@ -5121,11 +5121,11 @@ const Qc = (e, t, n, r, o, i) => {
5121
5121
  for (const p in u)
5122
5122
  f[p] === void 0 && t.removeAttribute(p);
5123
5123
  }
5124
- const o = $o(n), i = o.length, s = t.toArray(), a = s.length, l = zt(i, a);
5124
+ const o = Vo(n), i = o.length, s = t.toArray(), a = s.length, l = zt(i, a);
5125
5125
  let c = 0, d = 0;
5126
5126
  for (; c < l; c++) {
5127
5127
  const u = s[c], f = o[c];
5128
- if (!Mo(r.mapping.get(u), f))
5128
+ if (!So(r.mapping.get(u), f))
5129
5129
  if (wr(u, f))
5130
5130
  r.mapping.set(u, f);
5131
5131
  else
@@ -5133,7 +5133,7 @@ const Qc = (e, t, n, r, o, i) => {
5133
5133
  }
5134
5134
  for (; d + c + 1 < l; d++) {
5135
5135
  const u = s[a - d - 1], f = o[i - d - 1];
5136
- if (!Mo(r.mapping.get(u), f))
5136
+ if (!So(r.mapping.get(u), f))
5137
5137
  if (wr(u, f))
5138
5138
  r.mapping.set(u, f);
5139
5139
  else
@@ -5145,7 +5145,7 @@ const Qc = (e, t, n, r, o, i) => {
5145
5145
  if (f instanceof T.XmlText && p instanceof Array)
5146
5146
  ed(f, p) || eg(f, p, r), c += 1;
5147
5147
  else {
5148
- let g = f instanceof T.XmlElement && _i(f, p), b = h instanceof T.XmlElement && _i(h, m);
5148
+ let g = f instanceof T.XmlElement && $i(f, p), b = h instanceof T.XmlElement && $i(h, m);
5149
5149
  if (g && b) {
5150
5150
  const w = Ya(
5151
5151
  /** @type {Y.XmlElement} */
@@ -5162,14 +5162,14 @@ const Qc = (e, t, n, r, o, i) => {
5162
5162
  );
5163
5163
  w.foundMappedChild && !x.foundMappedChild ? b = !1 : !w.foundMappedChild && x.foundMappedChild || w.equalityFactor < x.equalityFactor ? g = !1 : b = !1;
5164
5164
  }
5165
- g ? (zi(
5165
+ g ? (_i(
5166
5166
  e,
5167
5167
  /** @type {Y.XmlFragment} */
5168
5168
  f,
5169
5169
  /** @type {PModel.Node} */
5170
5170
  p,
5171
5171
  r
5172
- ), c += 1) : b ? (zi(
5172
+ ), c += 1) : b ? (_i(
5173
5173
  e,
5174
5174
  /** @type {Y.XmlFragment} */
5175
5175
  h,
@@ -5177,7 +5177,7 @@ const Qc = (e, t, n, r, o, i) => {
5177
5177
  m,
5178
5178
  r
5179
5179
  ), d += 1) : (r.mapping.delete(t.get(c)), t.delete(c, 1), t.insert(c, [
5180
- Bi(p, r)
5180
+ zi(p, r)
5181
5181
  ]), c += 1);
5182
5182
  }
5183
5183
  }
@@ -5185,11 +5185,11 @@ const Qc = (e, t, n, r, o, i) => {
5185
5185
  if (a === 1 && i === 0 && s[0] instanceof T.XmlText ? (r.mapping.delete(s[0]), s[0].delete(0, s[0].length)) : u > 0 && (t.slice(c, c + u).forEach((f) => r.mapping.delete(f)), t.delete(c, u)), c + d < i) {
5186
5186
  const f = [];
5187
5187
  for (let p = c; p < i - d; p++)
5188
- f.push(Bi(o[p], r));
5188
+ f.push(zi(o[p], r));
5189
5189
  t.insert(c, f);
5190
5190
  }
5191
5191
  }, te);
5192
- }, _i = (e, t) => !(t instanceof Array) && e.nodeName === t.type.name;
5192
+ }, $i = (e, t) => !(t instanceof Array) && e.nodeName === t.type.name;
5193
5193
  let ir = null;
5194
5194
  const rg = () => {
5195
5195
  const e = (
@@ -5204,7 +5204,7 @@ const rg = () => {
5204
5204
  });
5205
5205
  }, og = (e, t, n) => {
5206
5206
  ir || (ir = /* @__PURE__ */ new Map(), Ns(0, rg)), Jc(ir, e, lo).set(t, n);
5207
- }, So = (e, t, n) => {
5207
+ }, Ao = (e, t, n) => {
5208
5208
  if (e === 0)
5209
5209
  return T.createRelativePositionFromTypeIndex(t, 0, -1);
5210
5210
  let r = t._first === null ? null : (
@@ -5404,11 +5404,11 @@ const rg = () => {
5404
5404
  }, l = () => {
5405
5405
  const c = te.getState(s.state), d = e.getLocalState() || {};
5406
5406
  if (s.hasFocus()) {
5407
- const u = o(s.state), f = So(
5407
+ const u = o(s.state), f = Ao(
5408
5408
  u.anchor,
5409
5409
  c.type,
5410
5410
  c.binding.mapping
5411
- ), p = So(
5411
+ ), p = Ao(
5412
5412
  u.head,
5413
5413
  c.type,
5414
5414
  c.binding.mapping
@@ -5468,7 +5468,7 @@ const rg = () => {
5468
5468
  const a = te.getState(s).binding, l = o.undoManager, c = l.undoStack.length > 0, d = l.redoStack.length > 0;
5469
5469
  return a ? {
5470
5470
  undoManager: l,
5471
- prevSel: Fi(a, i),
5471
+ prevSel: Bi(a, i),
5472
5472
  hasUndoOps: c,
5473
5473
  hasRedoOps: d
5474
5474
  } : c !== o.hasUndoOps || d !== o.hasRedoOps ? Object.assign({}, o, {
@@ -5534,7 +5534,7 @@ class bg {
5534
5534
  * Remove all registered events and subscriptions.
5535
5535
  */
5536
5536
  removeAllListeners() {
5537
- Xo(this, nt, /* @__PURE__ */ new Map());
5537
+ Jo(this, nt, /* @__PURE__ */ new Map());
5538
5538
  }
5539
5539
  }
5540
5540
  nt = new WeakMap();
@@ -5591,7 +5591,7 @@ var Vt = {
5591
5591
  220: "\\",
5592
5592
  221: "]",
5593
5593
  222: "'"
5594
- }, Ao = {
5594
+ }, Oo = {
5595
5595
  48: ")",
5596
5596
  49: "!",
5597
5597
  50: "@",
@@ -5620,10 +5620,10 @@ var Vt = {
5620
5620
  for (var be = 0; be < 10; be++) Vt[48 + be] = Vt[96 + be] = String(be);
5621
5621
  for (var be = 1; be <= 24; be++) Vt[be + 111] = "F" + be;
5622
5622
  for (var be = 65; be <= 90; be++)
5623
- Vt[be] = String.fromCharCode(be + 32), Ao[be] = String.fromCharCode(be);
5624
- for (var ci in Vt) Ao.hasOwnProperty(ci) || (Ao[ci] = Vt[ci]);
5623
+ Vt[be] = String.fromCharCode(be + 32), Oo[be] = String.fromCharCode(be);
5624
+ for (var di in Vt) Oo.hasOwnProperty(di) || (Oo[di] = Vt[di]);
5625
5625
  function kg(e) {
5626
- var t = wg && e.metaKey && e.shiftKey && !e.ctrlKey && !e.altKey || vg && e.shiftKey && e.key && e.key.length == 1 || e.key == "Unidentified", n = !t && e.key || (e.shiftKey ? Ao : Vt)[e.keyCode] || e.key || "Unidentified";
5626
+ var t = wg && e.metaKey && e.shiftKey && !e.ctrlKey && !e.altKey || vg && e.shiftKey && e.key && e.key.length == 1 || e.key == "Unidentified", n = !t && e.key || (e.shiftKey ? Oo : Vt)[e.keyCode] || e.key || "Unidentified";
5627
5627
  return n == "Esc" && (n = "Escape"), n == "Del" && (n = "Delete"), n == "Left" && (n = "ArrowLeft"), n == "Up" && (n = "ArrowUp"), n == "Right" && (n = "ArrowRight"), n == "Down" && (n = "ArrowDown"), n;
5628
5628
  }
5629
5629
  const xg = typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : !1;
@@ -5654,7 +5654,7 @@ function Mg(e) {
5654
5654
  t[Cg(n)] = e[n];
5655
5655
  return t;
5656
5656
  }
5657
- function di(e, t, n = !0) {
5657
+ function ui(e, t, n = !0) {
5658
5658
  return t.altKey && (e = "Alt-" + e), t.ctrlKey && (e = "Ctrl-" + e), t.metaKey && (e = "Meta-" + e), n && t.shiftKey && (e = "Shift-" + e), e;
5659
5659
  }
5660
5660
  function Sg(e) {
@@ -5663,17 +5663,17 @@ function Sg(e) {
5663
5663
  function Ps(e) {
5664
5664
  let t = Mg(e);
5665
5665
  return function(n, r) {
5666
- let o = kg(r), i, s = t[di(o, r)];
5666
+ let o = kg(r), i, s = t[ui(o, r)];
5667
5667
  if (s && s(n.state, n.dispatch, n))
5668
5668
  return !0;
5669
5669
  if (o.length == 1 && o != " ") {
5670
5670
  if (r.shiftKey) {
5671
- let a = t[di(o, r, !1)];
5671
+ let a = t[ui(o, r, !1)];
5672
5672
  if (a && a(n.state, n.dispatch, n))
5673
5673
  return !0;
5674
5674
  }
5675
5675
  if ((r.shiftKey || r.altKey || r.metaKey || o.charCodeAt(0) > 127) && (i = Vt[r.keyCode]) && i != o) {
5676
- let a = t[di(i, r)];
5676
+ let a = t[ui(i, r)];
5677
5677
  if (a && a(n.state, n.dispatch, n))
5678
5678
  return !0;
5679
5679
  }
@@ -5798,7 +5798,7 @@ class D {
5798
5798
  * @returns The mark attrs.
5799
5799
  */
5800
5800
  static getMarkAttributes(t, n) {
5801
- const r = Ct(n, t.schema), i = Lo(t).find((s) => s.type.name === r.name);
5801
+ const r = Ct(n, t.schema), i = Fo(t).find((s) => s.type.name === r.name);
5802
5802
  return i ? { ...i.attrs } : {};
5803
5803
  }
5804
5804
  /**
@@ -5880,7 +5880,7 @@ zn = new WeakSet(), rd = function(t, n) {
5880
5880
  }
5881
5881
  return r;
5882
5882
  }, ft(D, zn);
5883
- function $i(e) {
5883
+ function Vi(e) {
5884
5884
  const t = Object.entries(e).filter(([n, r]) => n === "attrs" && Tf(r) ? !1 : r != null);
5885
5885
  return Object.fromEntries(t);
5886
5886
  }
@@ -5913,7 +5913,7 @@ _n = new WeakSet(), id = function(t, n, r) {
5913
5913
  ...h,
5914
5914
  ...g ? g(i) : {}
5915
5915
  };
5916
- }, {}), d = $i({
5916
+ }, {}), d = Vi({
5917
5917
  content: X(E(i, "content", a)),
5918
5918
  group: X(E(i, "group", a)),
5919
5919
  marks: X(E(i, "marks", a)),
@@ -5946,7 +5946,7 @@ _n = new WeakSet(), id = function(t, n, r) {
5946
5946
  editor: r
5947
5947
  }, l = Object.fromEntries(
5948
5948
  s.map((f) => [f.name, { default: f?.attribute?.default }])
5949
- ), c = $i({
5949
+ ), c = Vi({
5950
5950
  group: X(E(i, "group", a)),
5951
5951
  inclusive: X(E(i, "inclusive", a)),
5952
5952
  excludes: X(E(i, "excludes", a)),
@@ -5963,7 +5963,7 @@ _n = new WeakSet(), id = function(t, n, r) {
5963
5963
  });
5964
5964
  return Object.fromEntries(o);
5965
5965
  }, ft(cr, _n);
5966
- let Vi = cr;
5966
+ let Hi = cr;
5967
5967
  function Gn(e, t) {
5968
5968
  return t.nodes[e] || t.marks[e] || null;
5969
5969
  }
@@ -5994,7 +5994,7 @@ function Is(e, t) {
5994
5994
  }
5995
5995
  };
5996
5996
  }
5997
- class Vo {
5997
+ class Ho {
5998
5998
  constructor(t) {
5999
5999
  I(this, "editor");
6000
6000
  I(this, "rawCommands");
@@ -6005,7 +6005,7 @@ class Vo {
6005
6005
  * @param args Arguments for the constructor.
6006
6006
  */
6007
6007
  static create(...t) {
6008
- return new Vo(...t);
6008
+ return new Ho(...t);
6009
6009
  }
6010
6010
  /**
6011
6011
  * Get editor state.
@@ -6126,7 +6126,7 @@ const Ng = (e, t) => {
6126
6126
  return r.index = n.index, r.input = e, r.data = n.data, n.replaceWith && (n.text.includes(n.replaceWith) || console.warn(
6127
6127
  '[super-editor warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'
6128
6128
  ), r.push(n.replaceWith)), r;
6129
- }, ui = (e) => {
6129
+ }, fi = (e) => {
6130
6130
  const {
6131
6131
  editor: t,
6132
6132
  from: n,
@@ -6151,7 +6151,7 @@ const Ng = (e, t) => {
6151
6151
  const p = a.state.tr, h = Is(p, a.state), m = {
6152
6152
  from: n - (f[0].length - o.length),
6153
6153
  to: r
6154
- }, { commands: g, chain: b, can: w } = new Vo({
6154
+ }, { commands: g, chain: b, can: w } = new Ho({
6155
6155
  editor: t,
6156
6156
  state: h
6157
6157
  });
@@ -6185,7 +6185,7 @@ const Ng = (e, t) => {
6185
6185
  let { text: c } = a;
6186
6186
  typeof c != "string" && (c = Og(P.from(c), i.schema));
6187
6187
  const { from: d } = a, u = d + c.length;
6188
- ui({
6188
+ fi({
6189
6189
  editor: e,
6190
6190
  from: d,
6191
6191
  to: u,
@@ -6198,7 +6198,7 @@ const Ng = (e, t) => {
6198
6198
  },
6199
6199
  props: {
6200
6200
  handleTextInput(r, o, i, s) {
6201
- return ui({
6201
+ return fi({
6202
6202
  editor: e,
6203
6203
  from: o,
6204
6204
  to: i,
@@ -6213,7 +6213,7 @@ const Ng = (e, t) => {
6213
6213
  if (o.key !== "Enter")
6214
6214
  return !1;
6215
6215
  const { $cursor: i } = r.state.selection;
6216
- return i ? ui({
6216
+ return i ? fi({
6217
6217
  editor: e,
6218
6218
  from: i.pos,
6219
6219
  to: i.pos,
@@ -6270,7 +6270,7 @@ const An = class An {
6270
6270
  this.editor = r, this.externalExtensions = n || [], this.externalExtensions = this.externalExtensions.map((o) => ({
6271
6271
  ...o,
6272
6272
  isExternal: !0
6273
- })), this.extensions = An.getResolvedExtensions([...t, ...this.externalExtensions]), this.schema = Vi.createSchemaByExtensions(this.extensions, r), N(this, $n, ad).call(this);
6273
+ })), this.extensions = An.getResolvedExtensions([...t, ...this.externalExtensions]), this.schema = Hi.createSchemaByExtensions(this.extensions, r), N(this, $n, ad).call(this);
6274
6274
  }
6275
6275
  /**
6276
6276
  * Static method for creating ExtensionService.
@@ -6424,7 +6424,7 @@ ld = function(t) {
6424
6424
  }, r = E(t, "onBeforeCreate", n), o = E(t, "onCreate", n), i = E(t, "onUpdate", n), s = E(t, "onSelectionUpdate", n), a = E(t, "onTransaction", n), l = E(t, "onFocus", n), c = E(t, "onBlur", n), d = E(t, "onDestroy", n);
6425
6425
  r && this.editor.on("beforeCreate", r), o && this.editor.on("create", o), i && this.editor.on("update", i), s && this.editor.on("selectionUpdate", s), a && this.editor.on("transaction", a), l && this.editor.on("focus", l), c && this.editor.on("blur", c), d && this.editor.on("destroy", d);
6426
6426
  };
6427
- let Hi = An;
6427
+ let ji = An;
6428
6428
  const Rg = (e) => (t) => {
6429
6429
  const n = typeof e == "function" ? e(t) : e;
6430
6430
  for (let r = 0; r < n.length; r += 1)
@@ -6822,20 +6822,20 @@ const ny = (e, t = {}) => ({ tr: n, state: r, dispatch: o }) => {
6822
6822
  });
6823
6823
  return ty(r, n, l);
6824
6824
  };
6825
- function ji(e, t, n = {}) {
6825
+ function Wi(e, t, n = {}) {
6826
6826
  return e.find((r) => r.type === t && ur(r.attrs, n));
6827
6827
  }
6828
6828
  function ry(e, t, n = {}) {
6829
- return !!ji(e, t, n);
6829
+ return !!Wi(e, t, n);
6830
6830
  }
6831
6831
  function Bs(e, t, n = {}) {
6832
6832
  if (!e || !t) return;
6833
6833
  let r = e.parent.childAfter(e.parentOffset);
6834
6834
  if (e.parentOffset === r.offset && r.offset !== 0 && (r = e.parent.childBefore(e.parentOffset)), !r.node) return;
6835
- const o = ji([...r.node.marks], t, n);
6835
+ const o = Wi([...r.node.marks], t, n);
6836
6836
  if (!o) return;
6837
6837
  let i = r.index, s = e.start() + r.offset, a = i + 1, l = s + r.node.nodeSize;
6838
- for (ji([...r.node.marks], t, n); i > 0 && o.isInSet(e.parent.child(i - 1).marks); )
6838
+ for (Wi([...r.node.marks], t, n); i > 0 && o.isInSet(e.parent.child(i - 1).marks); )
6839
6839
  i -= 1, s -= e.parent.child(i).nodeSize;
6840
6840
  for (; a < e.parent.childCount && ry([...e.parent.child(a).marks], t, n); )
6841
6841
  l += e.parent.child(a).nodeSize, a += 1;
@@ -6859,7 +6859,7 @@ const oy = (e, t = {}) => ({ tr: n, state: r, dispatch: o }) => {
6859
6859
  e.removeMark(i.$from.pos, i.$to.pos);
6860
6860
  }), !0;
6861
6861
  };
6862
- function Oo(e, t, n = {}) {
6862
+ function To(e, t, n = {}) {
6863
6863
  const { empty: r, ranges: o } = e.selection, i = t ? Ct(t, e.schema) : null;
6864
6864
  if (r)
6865
6865
  return !!(e.storedMarks || e.selection.$from.marks()).filter((u) => i ? i.name === u.type.name : !0).find((u) => ur(u.attrs, n, { strict: !1 }));
@@ -6884,7 +6884,7 @@ function Oo(e, t, n = {}) {
6884
6884
  }
6885
6885
  const sy = (e, t = {}, n = {}) => ({ state: r, commands: o }) => {
6886
6886
  const { extendEmptyMarkRange: i = !1 } = n, s = Ct(e, r.schema);
6887
- return Oo(r, s, t) ? o.unsetMark(s, { extendEmptyMarkRange: i }) : o.setMark(s, t);
6887
+ return To(r, s, t) ? o.unsetMark(s, { extendEmptyMarkRange: i }) : o.setMark(s, t);
6888
6888
  }, ay = () => ({ state: e, tr: t, dispatch: n }) => {
6889
6889
  const { selection: r } = t, { ranges: o } = r;
6890
6890
  return n && o.forEach(({ $from: i, $to: s }) => {
@@ -6904,7 +6904,7 @@ const sy = (e, t = {}, n = {}) => ({ state: r, commands: o }) => {
6904
6904
  const i = le(e, n.schema);
6905
6905
  return i.isTextblock ? o().command(({ commands: s }) => Za(i, t)(n) ? !0 : s.clearNodes()).command(({ state: s }) => Za(i, t)(s, r)).run() : !1;
6906
6906
  };
6907
- function To(e, t, n = {}) {
6907
+ function Do(e, t, n = {}) {
6908
6908
  const { from: r, to: o, empty: i } = e.selection, s = t ? le(t, e.schema) : null, a = [];
6909
6909
  e.doc.nodesBetween(r, o, (u, f) => {
6910
6910
  if (u.isText) return;
@@ -6920,7 +6920,7 @@ function To(e, t, n = {}) {
6920
6920
  }
6921
6921
  const cy = (e, t, n = {}) => ({ state: r, commands: o }) => {
6922
6922
  const i = le(e, r.schema), s = le(t, r.schema);
6923
- return To(r, i, n) ? o.setNode(s) : o.setNode(i, n);
6923
+ return Do(r, i, n) ? o.setNode(s) : o.setNode(i, n);
6924
6924
  }, dy = () => ({ state: e, dispatch: t }) => qg(e, t), uy = () => ({ state: e, dispatch: t }) => Rs(e, t), fy = (e, t = {}) => ({ tr: n, state: r, dispatch: o }) => {
6925
6925
  let i = null, s = null;
6926
6926
  const a = Pr(
@@ -6963,7 +6963,7 @@ function Xr(e) {
6963
6963
  const t = `<body>${e}</body>`, n = new window.DOMParser().parseFromString(t, "text/html").body;
6964
6964
  return xd(n);
6965
6965
  }
6966
- function Wi(e, t, n) {
6966
+ function Ui(e, t, n) {
6967
6967
  n = {
6968
6968
  slice: !0,
6969
6969
  parseOptions: {},
@@ -6979,7 +6979,7 @@ function Wi(e, t, n) {
6979
6979
  } catch (i) {
6980
6980
  if (n.errorOnInvalidContent)
6981
6981
  throw new Error("[super-editor error]: Invalid JSON content", { cause: i });
6982
- return console.warn("[super-editor warn]: Invalid content.", "Passed value:", e, "Error:", i), Wi("", t, n);
6982
+ return console.warn("[super-editor warn]: Invalid content.", "Passed value:", e, "Error:", i), Ui("", t, n);
6983
6983
  }
6984
6984
  if (o) {
6985
6985
  if (n.errorOnInvalidContent) {
@@ -7010,7 +7010,7 @@ function Wi(e, t, n) {
7010
7010
  const i = nn.fromSchema(t);
7011
7011
  return n.slice ? i.parseSlice(Xr(e), n.parseOptions).content : i.parse(Xr(e), n.parseOptions);
7012
7012
  }
7013
- return Wi("", t, n);
7013
+ return Ui("", t, n);
7014
7014
  }
7015
7015
  function Cy(e, t, n) {
7016
7016
  const r = e.steps.length - 1;
@@ -7036,7 +7036,7 @@ const My = (e) => !("type" in e), Sy = (e, t, n) => ({ tr: r, dispatch: o, edito
7036
7036
  };
7037
7037
  let s;
7038
7038
  try {
7039
- s = Wi(t, i.schema, {
7039
+ s = Ui(t, i.schema, {
7040
7040
  parseOptions: {
7041
7041
  preserveWhitespace: "full",
7042
7042
  ...n.parseOptions
@@ -7099,7 +7099,7 @@ function Ty(e, t, n, r = null) {
7099
7099
  if (t.$from.index(t.depth - 1) == 0)
7100
7100
  return !1;
7101
7101
  let l = s.resolve(t.start - 2);
7102
- i = new ki(l, l, t.depth), t.endIndex < t.parent.childCount && (t = new ki(t.$from, s.resolve(t.$to.end(t.depth)), t.depth)), o = !0;
7102
+ i = new xi(l, l, t.depth), t.endIndex < t.parent.childCount && (t = new xi(t.$from, s.resolve(t.$to.end(t.depth)), t.depth)), o = !0;
7103
7103
  }
7104
7104
  let a = ic(i, n, r, t);
7105
7105
  return a ? (e && Dy(e, t, a, o, n), !0) : !1;
@@ -7125,7 +7125,7 @@ function Ny(e) {
7125
7125
  }
7126
7126
  function Ey(e, t, n, r) {
7127
7127
  let o = e.tr, i = r.end, s = r.$to.end(r.depth);
7128
- i < s && (o.step(new ln(i - 1, s, i, s, new W(P.from(n.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new ki(o.doc.resolve(r.$from.pos), o.doc.resolve(s), r.depth));
7128
+ i < s && (o.step(new ln(i - 1, s, i, s, new W(P.from(n.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new xi(o.doc.resolve(r.$from.pos), o.doc.resolve(s), r.depth));
7129
7129
  const a = Tr(r);
7130
7130
  if (a == null)
7131
7131
  return !1;
@@ -7167,7 +7167,7 @@ function Iy(e) {
7167
7167
  const Ry = (e, t = {}) => ({ state: n, dispatch: r }) => {
7168
7168
  const o = le(e, n.schema);
7169
7169
  return Oy(o, t)(n, r);
7170
- }, Ho = (e, t) => {
7170
+ }, jo = (e, t) => {
7171
7171
  for (let n = e.depth; n > 0; n--) {
7172
7172
  const r = e.node(n);
7173
7173
  if (t(r))
@@ -7178,7 +7178,7 @@ const Ry = (e, t = {}) => ({ state: n, dispatch: r }) => {
7178
7178
  node: r
7179
7179
  };
7180
7180
  }
7181
- }, je = (e) => ({ $from: t }) => Ho(t, e), Ui = (e, t) => {
7181
+ }, je = (e) => ({ $from: t }) => jo(t, e), qi = (e, t) => {
7182
7182
  const r = t.filter((s) => s.type === "node").find((s) => s.name === e);
7183
7183
  if (!r) return !1;
7184
7184
  const o = {
@@ -8330,14 +8330,14 @@ const Ry = (e, t = {}) => ({ state: n, dispatch: r }) => {
8330
8330
  ]
8331
8331
  }
8332
8332
  ]
8333
- }, fi = (e, t) => {
8333
+ }, pi = (e, t) => {
8334
8334
  const n = je((s) => s.type === t)(e.selection);
8335
8335
  if (!n) return !0;
8336
8336
  const r = e.doc.resolve(Math.max(0, n.pos - 1)).before(n.depth);
8337
8337
  if (r === void 0) return !0;
8338
8338
  const o = e.doc.nodeAt(r);
8339
8339
  return n.node.type === o?.type && Ht(e.doc, n.pos) && e.join(n.pos), !0;
8340
- }, pi = (e, t) => {
8340
+ }, hi = (e, t) => {
8341
8341
  const n = je((s) => s.type === t)(e.selection);
8342
8342
  if (!n) return !0;
8343
8343
  const r = e.doc.resolve(n.start).after(n.depth);
@@ -8347,14 +8347,14 @@ const Ry = (e, t = {}) => ({ state: n, dispatch: r }) => {
8347
8347
  }, By = (e, t, n, r = {}) => (o) => {
8348
8348
  const { editor: i, tr: s, state: a, dispatch: l, chain: c, can: d, commands: u } = o, { extensions: f, splittableMarks: p } = i.extensionService, h = le(e, a.schema), m = le(t, a.schema), { selection: g, storedMarks: b } = a, { $from: w, $to: x } = g, y = w.blockRange(x), C = b || g.$to.parentOffset && g.$from.marks();
8349
8349
  if (!y) return !1;
8350
- const k = je(($) => Ui($.type.name, f))(g), { numbering: A } = i.converter;
8350
+ const k = je(($) => qi($.type.name, f))(g), { numbering: A } = i.converter;
8351
8351
  if (y.depth >= 1 && k && y.depth - k.depth <= 1) {
8352
8352
  if (k.node.type === h) {
8353
8353
  const { listId: $ } = k.node.attrs;
8354
8354
  return i.converter.numbering = _y($, A), u.liftListItem(m);
8355
8355
  }
8356
- if (Ui(k.node.type.name, f) && h.validContent(k.node.content) && l)
8357
- return c().command(() => (s.setNodeMarkup(k.pos, h), !0)).command(() => fi(s, h)).command(() => pi(s, h)).run();
8356
+ if (qi(k.node.type.name, f) && h.validContent(k.node.content) && l)
8357
+ return c().command(() => (s.setNodeMarkup(k.pos, h), !0)).command(() => pi(s, h)).command(() => hi(s, h)).run();
8358
8358
  }
8359
8359
  const B = ({ ensureMarks: $ = !1 }) => () => {
8360
8360
  const F = d().wrapInList(h, r);
@@ -8364,7 +8364,7 @@ const Ry = (e, t = {}) => ({ state: n, dispatch: r }) => {
8364
8364
  }
8365
8365
  return F ? !0 : u.clearNodes();
8366
8366
  }, M = Cd(A.definitions);
8367
- return i.converter.numbering = zy(M, A, h), r.listId = M, !n || !C || !l ? c().command(B({ ensureMarks: !1 })).wrapInList(h, r).command(() => fi(s, h)).command(() => pi(s, h)).run() : c().command(B({ ensureMarks: !0 })).wrapInList(h, r).command(() => fi(s, h)).command(() => pi(s, h)).run();
8367
+ return i.converter.numbering = zy(M, A, h), r.listId = M, !n || !C || !l ? c().command(B({ ensureMarks: !1 })).wrapInList(h, r).command(() => pi(s, h)).command(() => hi(s, h)).run() : c().command(B({ ensureMarks: !0 })).wrapInList(h, r).command(() => pi(s, h)).command(() => hi(s, h)).run();
8368
8368
  }, Cd = (e) => Math.max(...Object.keys(e).map(Number)) + 1, zy = (e, t, n) => {
8369
8369
  const r = n.name === "orderedList" ? Ly : Fy, o = { ...t }, i = Cd(o.abstracts), s = {
8370
8370
  ...r,
@@ -8584,9 +8584,9 @@ function Md(e, t, n, { check: r = !1 } = {}) {
8584
8584
  }
8585
8585
  function Sd(e, t, n = {}) {
8586
8586
  if (!t)
8587
- return To(e, null, n) || Oo(e, null, n);
8587
+ return Do(e, null, n) || To(e, null, n);
8588
8588
  const r = Pr(t, e.schema);
8589
- return r === "node" ? To(e, t, n) : r === "mark" ? Oo(e, t, n) : !1;
8589
+ return r === "node" ? Do(e, t, n) : r === "mark" ? To(e, t, n) : !1;
8590
8590
  }
8591
8591
  const zs = ({
8592
8592
  tr: e,
@@ -8620,7 +8620,7 @@ const zs = ({
8620
8620
  markName: Ve,
8621
8621
  attrs: { authorEmail: r.email }
8622
8622
  }), s;
8623
- i ? s = i.mark.attrs.id : s = Io();
8623
+ i ? s = i.mark.attrs.id : s = Ro();
8624
8624
  const a = e.doc.type.schema.marks[Ve].create({
8625
8625
  id: s,
8626
8626
  author: r.name,
@@ -8641,7 +8641,7 @@ const zs = ({
8641
8641
  markName: de,
8642
8642
  attrs: { authorEmail: r.email }
8643
8643
  }), s;
8644
- i ? s = i.mark.attrs.id : s = Io();
8644
+ i ? s = i.mark.attrs.id : s = Ro();
8645
8645
  const a = e.doc.type.schema.marks[de].create({
8646
8646
  id: s,
8647
8647
  author: r.name,
@@ -8743,7 +8743,7 @@ function _s(e, t) {
8743
8743
  }), n;
8744
8744
  }
8745
8745
  function Td(e, t, n) {
8746
- const o = e.state.doc.content.size, i = go(t, 0, o), s = go(n, 0, o), a = e.coordsAtPos(i), l = e.coordsAtPos(s, -1), c = Math.min(a.top, l.top), d = Math.max(a.bottom, l.bottom), u = Math.min(a.left, l.left), f = Math.max(a.right, l.right), p = f - u, h = d - c, b = {
8746
+ const o = e.state.doc.content.size, i = yo(t, 0, o), s = yo(n, 0, o), a = e.coordsAtPos(i), l = e.coordsAtPos(s, -1), c = Math.min(a.top, l.top), d = Math.max(a.bottom, l.bottom), u = Math.min(a.left, l.left), f = Math.max(a.right, l.right), p = f - u, h = d - c, b = {
8747
8747
  top: c,
8748
8748
  bottom: d,
8749
8749
  left: u,
@@ -8767,13 +8767,13 @@ const Dd = (e) => {
8767
8767
  }, Nd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8768
8768
  __proto__: null,
8769
8769
  chainableEditorState: Is,
8770
- cleanSchemaItem: $i,
8770
+ cleanSchemaItem: Vi,
8771
8771
  createDocument: Md,
8772
8772
  defaultBlockAt: vd,
8773
8773
  findChildren: _s,
8774
- findMark: Fo,
8774
+ findMark: Bo,
8775
8775
  findParentNode: je,
8776
- findParentNodeClosestToPos: Ho,
8776
+ findParentNodeClosestToPos: jo,
8777
8777
  generateDocxListAttributes: Jy,
8778
8778
  generateDocxRandomId: xn,
8779
8779
  generateRandom32BitHex: Pf,
@@ -8782,15 +8782,15 @@ const Dd = (e) => {
8782
8782
  getMarkRange: Bs,
8783
8783
  getMarkType: Ct,
8784
8784
  getMarksBetween: Yy,
8785
- getMarksFromSelection: Lo,
8785
+ getMarksFromSelection: Fo,
8786
8786
  getNodeType: le,
8787
8787
  getSchemaTypeByName: Gn,
8788
8788
  getSchemaTypeNameByName: Pr,
8789
8789
  isActive: Sd,
8790
8790
  isInTable: Dd,
8791
- isList: Ui,
8792
- isMarkActive: Oo,
8793
- isNodeActive: To,
8791
+ isList: qi,
8792
+ isMarkActive: To,
8793
+ isNodeActive: Do,
8794
8794
  isTextSelection: kd,
8795
8795
  posToDOMRect: Td
8796
8796
  }, Symbol.toStringTag, { value: "Module" })), Gy = (e, t, n) => {
@@ -9108,7 +9108,7 @@ const Dd = (e) => {
9108
9108
  fontSize: `${a}px`,
9109
9109
  lineHeight: `${l}px`
9110
9110
  }), document.body.appendChild(r);
9111
- const c = new qi({
9111
+ const c = new Ki({
9112
9112
  loadFromSchema: !0,
9113
9113
  mode: "text",
9114
9114
  editable: !1,
@@ -9474,7 +9474,7 @@ function ub(e, t) {
9474
9474
  }), n;
9475
9475
  }
9476
9476
  const Ld = ({ state: e, tr: t, step: n, newTr: r, map: o, doc: i, user: s, date: a, originalStep: l, originalStepIndex: c }) => {
9477
- const d = e.schema.marks[de], u = Fo(e, d, !1), f = u ? u.to : n.to, p = new $t(
9477
+ const d = e.schema.marks[de], u = Bo(e, d, !1), f = u ? u.to : n.to, p = new $t(
9478
9478
  f,
9479
9479
  // We insert all the same steps, but with "from"/"to" both set to "to" in order not to delete content. Mapped as needed.
9480
9480
  f,
@@ -9518,7 +9518,7 @@ const Ld = ({ state: e, tr: t, step: n, newTr: r, map: o, doc: i, user: s, date:
9518
9518
  return;
9519
9519
  if (c.marks.find((h) => h.type.name === de))
9520
9520
  return !1;
9521
- const u = c.marks.find((h) => [de, Ce].includes(h.type.name)), f = u ? u.attrs.id : Io();
9521
+ const u = c.marks.find((h) => [de, Ce].includes(h.type.name)), f = u ? u.attrs.id : Ro();
9522
9522
  if (r.addMark(Math.max(n.from, d), Math.min(n.to, d + c.nodeSize), n.mark), ["bold", "italic", "strike", "underline", "textStyle"].includes(n.mark.type.name) && !c.marks.find((h) => h.type === n.mark.type)) {
9523
9523
  const h = c.marks.find((b) => b.type.name === Ce);
9524
9524
  let m = [], g = [];
@@ -9578,7 +9578,7 @@ const Ld = ({ state: e, tr: t, step: n, newTr: r, map: o, doc: i, user: s, date:
9578
9578
  }
9579
9579
  ]), p.length || h.length) {
9580
9580
  const m = e.schema.marks[Ce].create({
9581
- id: Io(),
9581
+ id: Ro(),
9582
9582
  author: s.name,
9583
9583
  authorEmail: s.email,
9584
9584
  date: a,
@@ -9631,7 +9631,7 @@ const Ld = ({ state: e, tr: t, step: n, newTr: r, map: o, doc: i, user: s, date:
9631
9631
  date: l
9632
9632
  }), console.debug("[track-changes]: removeMarkStep")) : (i.step(u), console.log("[track-changes]: otherStep")));
9633
9633
  }), e.getMeta("inputType") && i.setMeta(e.getMeta("inputType")), e.getMeta("uiEvent") && i.setMeta(e.getMeta("uiEvent")), e.selectionSet) {
9634
- const c = t.schema.marks[de], d = Fo(t, c, !1);
9634
+ const c = t.schema.marks[de], d = Bo(t, c, !1);
9635
9635
  if (e.selection instanceof j && (e.selection.from < t.selection.from || e.getMeta("inputType") === "deleteContentBackward")) {
9636
9636
  const u = s.map(e.selection.from, -1);
9637
9637
  i.setSelection(new j(i.doc.resolve(u)));
@@ -9653,9 +9653,9 @@ const Ld = ({ state: e, tr: t, step: n, newTr: r, map: o, doc: i, user: s, date:
9653
9653
  const { attrs: s } = o, { spacing: a } = s;
9654
9654
  if (!a) return;
9655
9655
  const l = {
9656
- line: Jo(Yo(a.line)),
9657
- lineSpaceBefore: Jo(Yo(a.lineSpaceBefore)),
9658
- lineSpaceAfter: Jo(Yo(a.lineSpaceAfter))
9656
+ line: Yo(Go(a.line)),
9657
+ lineSpaceBefore: Yo(Go(a.lineSpaceBefore)),
9658
+ lineSpaceAfter: Yo(Go(a.lineSpaceAfter))
9659
9659
  };
9660
9660
  r.setNodeMarkup(i, void 0, {
9661
9661
  ...s,
@@ -9671,7 +9671,7 @@ const Ld = ({ state: e, tr: t, step: n, newTr: r, map: o, doc: i, user: s, date:
9671
9671
  }, ol = (e) => {
9672
9672
  if (e === "initial" || e === "0.4.14") return Object.values(mb);
9673
9673
  };
9674
- var tn, ws, S, _d, $d, Ki, Xi, Vd, Ji, Yi, Gi, Zi, Qi, es, Hd, ts, ns, rs, is, jd, Zn, Qn, Wd, Ud, qd, Kd;
9674
+ var tn, ws, S, _d, $d, Xi, Ji, Vd, co, Yi, Gi, Zi, Qi, es, Hd, ts, ns, rs, is, jd, Zn, Qn, Wd, Ud, qd, Kd;
9675
9675
  const Qs = class Qs extends bg {
9676
9676
  constructor(n) {
9677
9677
  super();
@@ -9746,8 +9746,8 @@ const Qs = class Qs extends bg {
9746
9746
  N(this, S, _d).call(this, n), N(this, S, Vd).call(this, n), this.setOptions(n);
9747
9747
  let r = {
9748
9748
  docx: () => N(this, S, $d).call(this, this.options),
9749
- text: () => N(this, S, Ki).call(this, this.options),
9750
- html: () => N(this, S, Ki).call(this, this.options),
9749
+ text: () => N(this, S, Xi).call(this, this.options),
9750
+ html: () => N(this, S, Xi).call(this, this.options),
9751
9751
  default: () => {
9752
9752
  console.log("Not implemented.");
9753
9753
  }
@@ -9828,9 +9828,9 @@ const Qs = class Qs extends bg {
9828
9828
  initializeCollaborationData() {
9829
9829
  if (!this.options.isNewFile || !this.options.collaborationProvider) return;
9830
9830
  const { collaborationProvider: n } = this.options, r = () => {
9831
- n.off("synced", r), N(this, S, Ji).call(this);
9831
+ n.off("synced", r), N(this, S, co).call(this);
9832
9832
  };
9833
- n.synced ? N(this, S, Ji).call(this) : n.on("synced", r);
9833
+ n.synced ? N(this, S, co).call(this) : n.on("synced", r);
9834
9834
  }
9835
9835
  /**
9836
9836
  * Set editor options and update state.
@@ -9884,10 +9884,10 @@ const Qs = class Qs extends bg {
9884
9884
  return [i, s, o.mediaFiles, o.fonts];
9885
9885
  }
9886
9886
  static getDocumentVersion(n) {
9887
- return Go.getStoredSuperdocVersion(n);
9887
+ return Zo.getStoredSuperdocVersion(n);
9888
9888
  }
9889
9889
  static updateDocumentVersion(n, r) {
9890
- return Go.updateDocumentVersion(n, r);
9890
+ return Zo.updateDocumentVersion(n, r);
9891
9891
  }
9892
9892
  /**
9893
9893
  * Creates all node views.
@@ -10048,7 +10048,7 @@ const Qs = class Qs extends bg {
10048
10048
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
10049
10049
  */
10050
10050
  processCollaborationMigrations() {
10051
- if (console.debug("[checkVersionMigrations] Current editor version", "0.10.59"), !this.options.ydoc) return;
10051
+ if (console.debug("[checkVersionMigrations] Current editor version", "0.10.61"), !this.options.ydoc) return;
10052
10052
  let r = this.options.ydoc.getMap("meta").get("version");
10053
10053
  r || (r = "initial"), console.debug("[checkVersionMigrations] Document version", r);
10054
10054
  const o = ol(r) || [], s = this.state.plugins.find((c) => c.key.startsWith("y-sync"));
@@ -10060,6 +10060,7 @@ const Qs = class Qs extends bg {
10060
10060
  return a ? (s?.getState(this.state)).doc : void 0;
10061
10061
  }
10062
10062
  async replaceFile(n) {
10063
+ this.setOptions({ annotations: !0 });
10063
10064
  const [r, o, i, s] = await Qs.loadXmlData(n);
10064
10065
  this.setOptions({
10065
10066
  fileSource: n,
@@ -10070,7 +10071,7 @@ const Qs = class Qs extends bg {
10070
10071
  isNewFile: !0,
10071
10072
  shouldLoadComments: !0,
10072
10073
  replacedFile: !0
10073
- }), N(this, S, Qi).call(this), N(this, S, es).call(this), this.initDefaultStyles(), this.initializeCollaborationData(!0), this.options.ydoc || (N(this, S, Qn).call(this), N(this, S, Zn).call(this));
10074
+ }), N(this, S, Qi).call(this), N(this, S, es).call(this), this.initDefaultStyles(), this.options.ydoc && this.options.collaborationProvider ? this.initializeCollaborationData(!0) : N(this, S, co).call(this), this.options.ydoc || (N(this, S, Qn).call(this), N(this, S, Zn).call(this));
10074
10075
  }
10075
10076
  };
10076
10077
  tn = new WeakMap(), ws = new WeakMap(), S = new WeakSet(), _d = function(n) {
@@ -10080,22 +10081,22 @@ tn = new WeakMap(), ws = new WeakMap(), S = new WeakSet(), _d = function(n) {
10080
10081
  }
10081
10082
  n.element = n.isHeadless ? null : n.element || document.createElement("div");
10082
10083
  }, $d = function(n) {
10083
- N(this, S, Gi).call(this), N(this, S, Zi).call(this), N(this, S, ts).call(this), N(this, S, Qi).call(this), N(this, S, es).call(this), N(this, S, Hd).call(this), this.on("beforeCreate", this.options.onBeforeCreate), this.emit("beforeCreate", { editor: this }), this.on("contentError", this.options.onContentError), this.on("exception", this.options.onException), N(this, S, is).call(this), this.initDefaultStyles(), this.setDocumentMode(n.documentMode), !this.options.isHeadless && (this.on("create", this.options.onCreate), this.on("update", this.options.onUpdate), this.on("selectionUpdate", this.options.onSelectionUpdate), this.on("transaction", this.options.onTransaction), this.on("focus", N(this, S, Xi)), this.on("blur", this.options.onBlur), this.on("destroy", this.options.onDestroy), this.on("trackedChangesUpdate", this.options.onTrackedChangesUpdate), this.on("commentsLoaded", this.options.onCommentsLoaded), this.on("commentClick", this.options.onCommentClicked), this.on("commentsUpdate", this.options.onCommentsUpdate), this.on("locked", this.options.onDocumentLocked), this.on("collaborationReady", N(this, S, jd)), this.on("paginationUpdate", this.options.onPaginationUpdate), this.on("comment-positions", this.options.onCommentLocationsUpdate), this.initializeCollaborationData(), this.options.ydoc || (N(this, S, Qn).call(this), N(this, S, Zn).call(this)), window.setTimeout(() => {
10084
+ N(this, S, Gi).call(this), N(this, S, Zi).call(this), N(this, S, ts).call(this), N(this, S, Qi).call(this), N(this, S, es).call(this), N(this, S, Hd).call(this), this.on("beforeCreate", this.options.onBeforeCreate), this.emit("beforeCreate", { editor: this }), this.on("contentError", this.options.onContentError), this.on("exception", this.options.onException), N(this, S, is).call(this), this.initDefaultStyles(), this.setDocumentMode(n.documentMode), !this.options.isHeadless && (this.on("create", this.options.onCreate), this.on("update", this.options.onUpdate), this.on("selectionUpdate", this.options.onSelectionUpdate), this.on("transaction", this.options.onTransaction), this.on("focus", N(this, S, Ji)), this.on("blur", this.options.onBlur), this.on("destroy", this.options.onDestroy), this.on("trackedChangesUpdate", this.options.onTrackedChangesUpdate), this.on("commentsLoaded", this.options.onCommentsLoaded), this.on("commentClick", this.options.onCommentClicked), this.on("commentsUpdate", this.options.onCommentsUpdate), this.on("locked", this.options.onDocumentLocked), this.on("collaborationReady", N(this, S, jd)), this.on("paginationUpdate", this.options.onPaginationUpdate), this.on("comment-positions", this.options.onCommentLocationsUpdate), this.initializeCollaborationData(), this.options.ydoc || (N(this, S, Qn).call(this), N(this, S, Zn).call(this)), window.setTimeout(() => {
10084
10085
  this.isDestroyed || this.emit("create", { editor: this });
10085
10086
  }, 0));
10086
- }, Ki = function(n) {
10087
- (!n.extensions || !n.extensions.length) && (this.options.extensions = Jk()), N(this, S, Gi).call(this), N(this, S, Zi).call(this), N(this, S, ts).call(this), this.on("beforeCreate", this.options.onBeforeCreate), this.emit("beforeCreate", { editor: this }), this.on("contentError", this.options.onContentError), N(this, S, is).call(this), this.on("create", this.options.onCreate), this.on("update", this.options.onUpdate), this.on("selectionUpdate", this.options.onSelectionUpdate), this.on("transaction", this.options.onTransaction), this.on("focus", N(this, S, Xi)), this.on("blur", this.options.onBlur), this.on("destroy", this.options.onDestroy), this.on("commentsLoaded", this.options.onCommentsLoaded), this.on("commentClick", this.options.onCommentClicked), this.on("locked", this.options.onDocumentLocked), window.setTimeout(() => {
10087
+ }, Xi = function(n) {
10088
+ (!n.extensions || !n.extensions.length) && (this.options.extensions = Jk()), N(this, S, Gi).call(this), N(this, S, Zi).call(this), N(this, S, ts).call(this), this.on("beforeCreate", this.options.onBeforeCreate), this.emit("beforeCreate", { editor: this }), this.on("contentError", this.options.onContentError), N(this, S, is).call(this), this.on("create", this.options.onCreate), this.on("update", this.options.onUpdate), this.on("selectionUpdate", this.options.onSelectionUpdate), this.on("transaction", this.options.onTransaction), this.on("focus", N(this, S, Ji)), this.on("blur", this.options.onBlur), this.on("destroy", this.options.onDestroy), this.on("commentsLoaded", this.options.onCommentsLoaded), this.on("commentClick", this.options.onCommentClicked), this.on("locked", this.options.onDocumentLocked), window.setTimeout(() => {
10088
10089
  this.isDestroyed || this.emit("create", { editor: this });
10089
10090
  }, 0);
10090
- }, Xi = function({ editor: n, event: r }) {
10091
+ }, Ji = function({ editor: n, event: r }) {
10091
10092
  this.toolbar?.setActiveEditor(n), this.options.onFocus({ editor: n, event: r });
10092
10093
  }, Vd = function(n) {
10093
- n.isHeadless && (typeof navigator > "u" && (ni.navigator = { isHeadless: !0 }), n.mockDocument && (ni.document = n.mockDocument, ni.window = n.mockWindow));
10094
+ n.isHeadless && (typeof navigator > "u" && (ri.navigator = { isHeadless: !0 }), n.mockDocument && (ri.document = n.mockDocument, ri.window = n.mockWindow));
10094
10095
  }, /**
10095
10096
  * Replace the current document with new data. Necessary for initializing a new collaboration file,
10096
10097
  * since we need to insert the data only after the provider has synced.
10097
10098
  */
10098
- Ji = function() {
10099
+ co = function() {
10099
10100
  if (!this.options.isNewFile) return;
10100
10101
  this.options.isNewFile = !1;
10101
10102
  const n = N(this, S, ns).call(this), r = this.state.tr.replaceWith(0, this.state.doc.content.size, n);
@@ -10112,19 +10113,19 @@ Gi = function() {
10112
10113
  const n = ["extension", "node", "mark"], r = [Ky, Wy, Xy, qy], o = this.options.externalExtensions || [], i = [...r, ...this.options.extensions].filter(
10113
10114
  (s) => n.includes(s?.type)
10114
10115
  );
10115
- this.extensionService = Hi.create(i, o, this);
10116
+ this.extensionService = ji.create(i, o, this);
10116
10117
  }, /**
10117
10118
  * Creates a command service.
10118
10119
  */
10119
10120
  Zi = function() {
10120
- Xo(this, tn, Vo.create({
10121
+ Jo(this, tn, Ho.create({
10121
10122
  editor: this
10122
10123
  }));
10123
10124
  }, /**
10124
10125
  * Creates a SuperConverter.
10125
10126
  */
10126
10127
  Qi = function() {
10127
- this.options.converter ? this.converter = this.options.converter : this.converter = new Go({
10128
+ this.options.converter ? this.converter = this.options.converter : this.converter = new Zo({
10128
10129
  docx: this.options.content,
10129
10130
  media: this.options.mediaFiles,
10130
10131
  fonts: this.options.fonts,
@@ -10292,7 +10293,7 @@ Kd = function() {
10292
10293
  } catch {
10293
10294
  }
10294
10295
  };
10295
- let qi = Qs;
10296
+ let Ki = Qs;
10296
10297
  class K {
10297
10298
  constructor(t) {
10298
10299
  I(this, "type", "node");
@@ -10448,7 +10449,7 @@ const Xd = ee.create({
10448
10449
  if (Number.isNaN(n))
10449
10450
  return !1;
10450
10451
  let { min: o, max: i, unit: s } = this.options.defaults;
10451
- return n = go(n, o, i), r = r || s, t().setMark("textStyle", { fontSize: `${n}${r}` }).run();
10452
+ return n = yo(n, o, i), r = r || s, t().setMark("textStyle", { fontSize: `${n}${r}` }).run();
10452
10453
  },
10453
10454
  unsetFontSize: () => ({ chain: e }) => e().setMark("textStyle", { fontSize: null }).removeEmptyTextStyle().run()
10454
10455
  };
@@ -10570,7 +10571,7 @@ const Xd = ee.create({
10570
10571
  lineHeight: {
10571
10572
  default: null,
10572
10573
  parseDOM: (e) => e.style.lineHeight,
10573
- renderDOM: (e) => e.lineHeight ? { style: Ro(e.lineHeight, this.options.defaults.unit, e.spacing?.lineRule) } : {}
10574
+ renderDOM: (e) => e.lineHeight ? { style: Lo(e.lineHeight, this.options.defaults.unit, e.spacing?.lineRule) } : {}
10574
10575
  }
10575
10576
  }
10576
10577
  }
@@ -10599,7 +10600,7 @@ const Xd = ee.create({
10599
10600
  clearNodesFormat: () => ({ chain: e }) => e().clearNodes().run(),
10600
10601
  copyFormat: () => ({ chain: e }) => {
10601
10602
  if (!this.storage.storedStyle) {
10602
- const i = Lo(this.editor.state);
10603
+ const i = Fo(this.editor.state);
10603
10604
  return this.storage.storedStyle = i, !0;
10604
10605
  }
10605
10606
  if (!this.storage.storedStyle.length)
@@ -11206,7 +11207,7 @@ const Sb = ee.create({
11206
11207
  };
11207
11208
  }
11208
11209
  });
11209
- function Do(e) {
11210
+ function No(e) {
11210
11211
  return new Dg({
11211
11212
  match: e.match,
11212
11213
  handler: ({
@@ -11284,11 +11285,11 @@ const il = /^\s*([-+*])\s$/, iu = K.create({
11284
11285
  },
11285
11286
  // Input rules.
11286
11287
  addInputRules() {
11287
- let e = Do({
11288
+ let e = No({
11288
11289
  match: il,
11289
11290
  type: this.type
11290
11291
  });
11291
- return (this.options.keepMarks || this.options.keepAttributes) && (e = Do({
11292
+ return (this.options.keepMarks || this.options.keepAttributes) && (e = No({
11292
11293
  match: il,
11293
11294
  type: this.type,
11294
11295
  keepMarks: this.options.keepMarks,
@@ -11591,13 +11592,13 @@ const al = /^(\d+)\.\s$/, au = K.create({
11591
11592
  return [Vb(this.editor), _b()];
11592
11593
  },
11593
11594
  addInputRules() {
11594
- let e = Do({
11595
+ let e = No({
11595
11596
  match: al,
11596
11597
  type: this.type,
11597
11598
  getAttributes: (t) => ({ start: +t[1] }),
11598
11599
  joinPredicate: (t, n) => n.childCount + n.attrs.start === +t[1]
11599
11600
  });
11600
- return (this.options.keepMarks || this.options.keepAttributes) && (e = Do({
11601
+ return (this.options.keepMarks || this.options.keepAttributes) && (e = No({
11601
11602
  match: al,
11602
11603
  type: this.type,
11603
11604
  keepMarks: this.options.keepMarks,
@@ -11718,7 +11719,7 @@ function cl(e) {
11718
11719
  style: `
11719
11720
  ${l ? `margin-top: ${l}px;` : ""}
11720
11721
  ${c ? `margin-bottom: ${c}px;` : ""}
11721
- ${d ? Ro(d, "") : ""}
11722
+ ${d ? Lo(d, "") : ""}
11722
11723
  `.trim()
11723
11724
  };
11724
11725
  }
@@ -11863,7 +11864,7 @@ const du = K.create({
11863
11864
  addPmPlugins() {
11864
11865
  return [e0()];
11865
11866
  }
11866
- }), co = new Y("linkedStyles"), r0 = ee.create({
11867
+ }), uo = new Y("linkedStyles"), r0 = ee.create({
11867
11868
  name: "linkedStyles",
11868
11869
  addPmPlugins() {
11869
11870
  return [o0(this.editor)];
@@ -11887,7 +11888,7 @@ const du = K.create({
11887
11888
  };
11888
11889
  }
11889
11890
  }), o0 = (e) => new G({
11890
- key: co,
11891
+ key: uo,
11891
11892
  state: {
11892
11893
  init(t, { doc: n, selection: r }) {
11893
11894
  if (!e.converter || e.options.mode !== "docx") return {};
@@ -11901,7 +11902,7 @@ const du = K.create({
11901
11902
  if (!e.converter || e.options.mode !== "docx") return { ...n };
11902
11903
  let i = n.decorations || L.empty;
11903
11904
  if (t.docChanged) {
11904
- const s = co.getState(e.state).styles;
11905
+ const s = uo.getState(e.state).styles;
11905
11906
  i = dl(o, s);
11906
11907
  }
11907
11908
  return { ...n, decorations: i };
@@ -11909,7 +11910,7 @@ const du = K.create({
11909
11910
  },
11910
11911
  props: {
11911
11912
  decorations(t) {
11912
- return co.getState(t)?.decorations;
11913
+ return uo.getState(t)?.decorations;
11913
11914
  }
11914
11915
  }
11915
11916
  }), dl = (e, t) => {
@@ -11958,14 +11959,14 @@ const du = K.create({
11958
11959
  return {
11959
11960
  "margin-top": t + "px",
11960
11961
  "margin-bottom": n + "px",
11961
- ...Ro(r, "", o, !0)
11962
+ ...Lo(r, "", o, !0)
11962
11963
  };
11963
11964
  }, l0 = (e) => {
11964
11965
  const { lineSpaceBefore: t, lineSpaceAfter: n, line: r } = e;
11965
11966
  return `
11966
11967
  ${t ? `margin-top: ${t}px;` : ""}
11967
11968
  ${n ? `margin-bottom: ${n}px;` : ""}
11968
- ${r ? Ro(r, "") : ""}
11969
+ ${r ? Lo(r, "") : ""}
11969
11970
  `.trim();
11970
11971
  }, c0 = (e) => {
11971
11972
  let t = "";
@@ -12321,7 +12322,7 @@ const fu = K.create({
12321
12322
  }
12322
12323
  })];
12323
12324
  }
12324
- }), hi = 48, fl = (e, t) => {
12325
+ }), mi = 48, fl = (e, t) => {
12325
12326
  let n = [];
12326
12327
  return e.doc.descendants((r, o) => {
12327
12328
  if (r.type.name === "tab") {
@@ -12338,7 +12339,7 @@ const fu = K.create({
12338
12339
  } catch {
12339
12340
  return;
12340
12341
  }
12341
- const l = i.nodeBefore?.type.name === "tab" ? hi : hi - a % hi, c = y0(i);
12342
+ const l = i.nodeBefore?.type.name === "tab" ? mi : mi - a % mi, c = y0(i);
12342
12343
  n.push(
12343
12344
  _.node(o, o + r.nodeSize, { style: `width: ${l}px; height: ${c};` })
12344
12345
  );
@@ -12731,7 +12732,7 @@ function Ze(e) {
12731
12732
  if (t.node(n).type.spec.tableRole == "row") return !0;
12732
12733
  return !1;
12733
12734
  }
12734
- function jo(e) {
12735
+ function Wo(e) {
12735
12736
  const t = e.selection;
12736
12737
  if ("$anchorCell" in t && t.$anchorCell)
12737
12738
  return t.$anchorCell.pos > t.$headCell.pos ? t.$anchorCell : t.$headCell;
@@ -13095,7 +13096,7 @@ function L0(e, t, n, r) {
13095
13096
  return r.setMeta(R0, { fixTables: !0 });
13096
13097
  }
13097
13098
  function ct(e) {
13098
- const t = e.selection, n = jo(e), r = n.node(-1), o = n.start(-1), i = re.get(r);
13099
+ const t = e.selection, n = Wo(e), r = n.node(-1), o = n.start(-1), i = re.get(r);
13099
13100
  return { ...t instanceof J ? i.rectBetween(
13100
13101
  t.$anchorCell.pos - o,
13101
13102
  t.$headCell.pos - o
@@ -13367,7 +13368,7 @@ function q0(e) {
13367
13368
  function K0(e, t) {
13368
13369
  return function(n, r) {
13369
13370
  if (!Ze(n)) return !1;
13370
- const o = jo(n);
13371
+ const o = Wo(n);
13371
13372
  if (o.nodeAfter.attrs[e] === t) return !1;
13372
13373
  if (r) {
13373
13374
  const i = n.tr;
@@ -13494,7 +13495,7 @@ function Y0(e, t) {
13494
13495
  function kl(e) {
13495
13496
  return function(t, n) {
13496
13497
  if (!Ze(t)) return !1;
13497
- const r = Y0(jo(t), e);
13498
+ const r = Y0(Wo(t), e);
13498
13499
  if (r == null) return !1;
13499
13500
  if (n) {
13500
13501
  const o = t.doc.resolve(r);
@@ -13739,7 +13740,7 @@ var nw = Ps({
13739
13740
  Delete: Gr,
13740
13741
  "Mod-Delete": Gr
13741
13742
  });
13742
- function uo(e, t, n) {
13743
+ function fo(e, t, n) {
13743
13744
  return n.eq(e.selection) ? !1 : (t && t(e.tr.setSelection(n).scrollIntoView()), !0);
13744
13745
  }
13745
13746
  function Zr(e, t) {
@@ -13747,7 +13748,7 @@ function Zr(e, t) {
13747
13748
  if (!o) return !1;
13748
13749
  const i = n.selection;
13749
13750
  if (i instanceof J)
13750
- return uo(
13751
+ return fo(
13751
13752
  n,
13752
13753
  r,
13753
13754
  Q.near(i.$headCell, t)
@@ -13756,7 +13757,7 @@ function Zr(e, t) {
13756
13757
  const s = xu(o, e, t);
13757
13758
  if (s == null) return !1;
13758
13759
  if (e == "horiz")
13759
- return uo(
13760
+ return fo(
13760
13761
  n,
13761
13762
  r,
13762
13763
  Q.near(n.doc.resolve(i.head + t), t)
@@ -13764,7 +13765,7 @@ function Zr(e, t) {
13764
13765
  {
13765
13766
  const a = n.doc.resolve(s), l = mu(a, e, t);
13766
13767
  let c;
13767
- return l ? c = Q.near(l, 1) : t < 0 ? c = Q.near(n.doc.resolve(a.before(-1)), -1) : c = Q.near(n.doc.resolve(a.after(-1)), 1), uo(n, r, c);
13768
+ return l ? c = Q.near(l, 1) : t < 0 ? c = Q.near(n.doc.resolve(a.before(-1)), -1) : c = Q.near(n.doc.resolve(a.after(-1)), 1), fo(n, r, c);
13768
13769
  }
13769
13770
  };
13770
13771
  }
@@ -13781,7 +13782,7 @@ function Qr(e, t) {
13781
13782
  s = new J(n.doc.resolve(l));
13782
13783
  }
13783
13784
  const a = mu(s.$headCell, e, t);
13784
- return a ? uo(
13785
+ return a ? fo(
13785
13786
  n,
13786
13787
  r,
13787
13788
  new J(s.$anchorCell, a)
@@ -13812,7 +13813,7 @@ function ow(e, t, n) {
13812
13813
  );
13813
13814
  return r = ew(r, a.right - a.left, a.bottom - a.top), Ml(e.state, e.dispatch, s, a, r), !0;
13814
13815
  } else if (r) {
13815
- const i = jo(e.state), s = i.start(-1);
13816
+ const i = Wo(e.state), s = i.start(-1);
13816
13817
  return Ml(
13817
13818
  e.state,
13818
13819
  e.dispatch,
@@ -13830,12 +13831,12 @@ function iw(e, t) {
13830
13831
  let o;
13831
13832
  if (t.shiftKey && e.state.selection instanceof J)
13832
13833
  i(e.state.selection.$anchorCell, t), t.preventDefault();
13833
- else if (t.shiftKey && r && (o = Hn(e.state.selection.$anchor)) != null && ((n = mi(e, t)) == null ? void 0 : n.pos) != o.pos)
13834
+ else if (t.shiftKey && r && (o = Hn(e.state.selection.$anchor)) != null && ((n = gi(e, t)) == null ? void 0 : n.pos) != o.pos)
13834
13835
  i(o, t), t.preventDefault();
13835
13836
  else if (!r)
13836
13837
  return;
13837
13838
  function i(l, c) {
13838
- let d = mi(e, c);
13839
+ let d = gi(e, c);
13839
13840
  const u = Et.getState(e.state) == null;
13840
13841
  if (!d || !Ws(l, d))
13841
13842
  if (u) d = l;
@@ -13854,7 +13855,7 @@ function iw(e, t) {
13854
13855
  let u;
13855
13856
  if (d != null)
13856
13857
  u = e.state.doc.resolve(d);
13857
- else if (Sl(e, c.target) != r && (u = mi(e, t), !u))
13858
+ else if (Sl(e, c.target) != r && (u = gi(e, t), !u))
13858
13859
  return s();
13859
13860
  u && i(u, c);
13860
13861
  }
@@ -13879,7 +13880,7 @@ function Sl(e, t) {
13879
13880
  return t;
13880
13881
  return null;
13881
13882
  }
13882
- function mi(e, t) {
13883
+ function gi(e, t) {
13883
13884
  const n = e.posAtCoords({
13884
13885
  left: t.clientX,
13885
13886
  top: t.clientY
@@ -13977,19 +13978,19 @@ function aw({
13977
13978
  });
13978
13979
  return i;
13979
13980
  }
13980
- var lw = class fo {
13981
+ var lw = class po {
13981
13982
  constructor(t, n) {
13982
13983
  this.activeHandle = t, this.dragging = n;
13983
13984
  }
13984
13985
  apply(t) {
13985
13986
  const n = this, r = t.getMeta(Ie);
13986
13987
  if (r && r.setHandle != null)
13987
- return new fo(r.setHandle, !1);
13988
+ return new po(r.setHandle, !1);
13988
13989
  if (r && r.setDragging !== void 0)
13989
- return new fo(n.activeHandle, r.setDragging);
13990
+ return new po(n.activeHandle, r.setDragging);
13990
13991
  if (n.activeHandle > -1 && t.docChanged) {
13991
13992
  let o = t.mapping.map(n.activeHandle, -1);
13992
- return ls(t.doc.resolve(o)) || (o = -1), new fo(o, n.dragging);
13993
+ return ls(t.doc.resolve(o)) || (o = -1), new po(o, n.dragging);
13993
13994
  }
13994
13995
  return n;
13995
13996
  }
@@ -14195,7 +14196,7 @@ const bw = (e) => e instanceof J, eo = ({ editor: e }) => {
14195
14196
  const { selection: t } = e.state;
14196
14197
  if (!bw(t)) return !1;
14197
14198
  let n = 0;
14198
- return Ho(t.ranges[0].$from, (i) => i.type.name === "table")?.node.descendants((i) => {
14199
+ return jo(t.ranges[0].$from, (i) => i.type.name === "table")?.node.descendants((i) => {
14199
14200
  if (i.type.name === "table") return !1;
14200
14201
  ["tableCell", "tableHeader"].includes(i.type.name) && (n += 1);
14201
14202
  }), n === t.ranges.length ? (e.commands.deleteTable(), !0) : !1;
@@ -14801,7 +14802,7 @@ function Mw(e, t) {
14801
14802
  }), r;
14802
14803
  }
14803
14804
  const { findChildren: Sw } = Nd;
14804
- function po(e, t) {
14805
+ function ho(e, t) {
14805
14806
  return Sw(t.doc, (r) => {
14806
14807
  let o = r.type.name === "fieldAnnotation";
14807
14808
  return Array.isArray(e) ? o && e.includes(r.attrs.fieldId) : o && r.attrs.fieldId === e;
@@ -14816,7 +14817,7 @@ function Ow(e, t) {
14816
14817
  if (t(r) && (n = { node: r, pos: o }), n) return !1;
14817
14818
  }), n;
14818
14819
  }
14819
- function ho(e, t, n) {
14820
+ function mo(e, t, n) {
14820
14821
  let r = [];
14821
14822
  return n.nodesBetween(e, t, (o, i) => {
14822
14823
  !o || o?.nodeSize === void 0 || o.type.name === "fieldAnnotation" && r.push({
@@ -14828,8 +14829,8 @@ function ho(e, t, n) {
14828
14829
  const ax = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14829
14830
  __proto__: null,
14830
14831
  findFieldAnnotations: Mw,
14831
- findFieldAnnotationsBetween: ho,
14832
- findFieldAnnotationsByFieldId: po,
14832
+ findFieldAnnotationsBetween: mo,
14833
+ findFieldAnnotationsByFieldId: ho,
14833
14834
  findFirstFieldAnnotationByFieldId: Aw,
14834
14835
  findRemovedFieldAnnotations: Du,
14835
14836
  getAllFieldAnnotations: It,
@@ -15196,7 +15197,7 @@ const fs = "annotation", Eu = "annotation-content", Pu = K.create({
15196
15197
  * })
15197
15198
  */
15198
15199
  updateFieldAnnotations: (e, t = {}) => ({ dispatch: n, state: r, commands: o }) => {
15199
- let i = po(e, r);
15200
+ let i = ho(e, r);
15200
15201
  return i.length && n ? o.updateFieldAnnotationsAttributes(i, t) : !0;
15201
15202
  },
15202
15203
  /**
@@ -15231,7 +15232,7 @@ const fs = "annotation", Eu = "annotation-content", Pu = K.create({
15231
15232
  * editor.commands.deleteFieldAnnotations(['123', '456'])
15232
15233
  */
15233
15234
  deleteFieldAnnotations: (e) => ({ dispatch: t, state: n, tr: r }) => {
15234
- let o = po(e, n);
15235
+ let o = ho(e, n);
15235
15236
  return o.length && t && o.forEach((i) => {
15236
15237
  let { pos: s, node: a } = i, l = r.mapping.map(s), c = r.mapping.map(s + a.nodeSize), d = r.doc.nodeAt(l);
15237
15238
  a.eq(d) && r.delete(l, c);
@@ -15260,7 +15261,7 @@ const fs = "annotation", Eu = "annotation-content", Pu = K.create({
15260
15261
  * editor.commands.sliceFieldAnnotations(['123', '456'], 5)
15261
15262
  */
15262
15263
  sliceFieldAnnotations: (e, t) => ({ dispatch: n, state: r, tr: o }) => {
15263
- let i = po(e, r);
15264
+ let i = ho(e, r);
15264
15265
  return i.length && n && i.forEach((s, a) => {
15265
15266
  if (a >= t) {
15266
15267
  let { pos: l, node: c } = s, d = o.mapping.map(l), u = o.mapping.map(l + c.nodeSize), f = o.doc.nodeAt(d);
@@ -15346,7 +15347,7 @@ const fs = "annotation", Eu = "annotation-content", Pu = K.create({
15346
15347
  toggleFieldAnnotationsFormat: (e, t = !1) => ({ dispatch: n, tr: r, state: o, commands: i }) => {
15347
15348
  if (!this.options.toggleFormatNames.includes(e))
15348
15349
  return !1;
15349
- let { from: a, to: l, node: c } = o.selection, d = ho(a, l, o.doc);
15350
+ let { from: a, to: l, node: c } = o.selection, d = mo(a, l, o.doc);
15350
15351
  return d.length && n && (d.forEach((u) => {
15351
15352
  i.updateFieldAnnotationsAttributes([u], {
15352
15353
  [e]: !u.node.attrs[e]
@@ -15354,7 +15355,7 @@ const fs = "annotation", Eu = "annotation-content", Pu = K.create({
15354
15355
  }), t && c?.type.name === this.name && r.setSelection(z.create(r.doc, a))), !0;
15355
15356
  },
15356
15357
  setFieldAnnotationsFontFamily: (e, t = !1) => ({ dispatch: n, tr: r, state: o, commands: i }) => {
15357
- let { from: s, to: a, node: l } = o.selection, c = ho(s, a, o.doc);
15358
+ let { from: s, to: a, node: l } = o.selection, c = mo(s, a, o.doc);
15358
15359
  return c.length && n && (c.forEach((d) => {
15359
15360
  i.updateFieldAnnotationsAttributes([d], {
15360
15361
  fontFamily: e
@@ -15362,11 +15363,11 @@ const fs = "annotation", Eu = "annotation-content", Pu = K.create({
15362
15363
  }), t && l?.type.name === this.name && r.setSelection(z.create(r.doc, s))), !0;
15363
15364
  },
15364
15365
  setFieldAnnotationsFontSize: (e, t = !1) => ({ dispatch: n, tr: r, state: o, commands: i }) => {
15365
- let { from: s, to: a, node: l } = o.selection, c = ho(s, a, o.doc);
15366
+ let { from: s, to: a, node: l } = o.selection, c = mo(s, a, o.doc);
15366
15367
  if (!c.length)
15367
15368
  return !0;
15368
15369
  let [d, u] = Rt(e), f = 8, p = 96, h = "pt";
15369
- return Number.isNaN(d) ? !1 : (d = go(d, f, p), u = u || h, n && (c.forEach((m) => {
15370
+ return Number.isNaN(d) ? !1 : (d = yo(d, f, p), u = u || h, n && (c.forEach((m) => {
15370
15371
  i.updateFieldAnnotationsAttributes([m], {
15371
15372
  fontSize: `${d}${u}`
15372
15373
  });
@@ -15410,15 +15411,15 @@ function $w(e) {
15410
15411
  }
15411
15412
  return t;
15412
15413
  }
15413
- const No = new Y("ImagePlaceholder"), Vw = (e = {}) => new G({
15414
- key: No,
15414
+ const Eo = new Y("ImagePlaceholder"), Vw = (e = {}) => new G({
15415
+ key: Eo,
15415
15416
  state: {
15416
15417
  init() {
15417
15418
  return L.empty;
15418
15419
  },
15419
15420
  apply(t, n, r, o) {
15420
15421
  n = n.map(t.mapping, t.doc);
15421
- let i = t.getMeta(No);
15422
+ let i = t.getMeta(Eo);
15422
15423
  if (i?.type === "add") {
15423
15424
  let s = document.createElement("placeholder"), a = _.widget(i.pos, s, {
15424
15425
  id: i.id
@@ -15434,7 +15435,7 @@ const No = new Y("ImagePlaceholder"), Vw = (e = {}) => new G({
15434
15435
  }
15435
15436
  }
15436
15437
  }), lx = (e, t) => {
15437
- let r = No.getState(e)?.find(null, null, (o) => o.id === t);
15438
+ let r = Eo.getState(e)?.find(null, null, (o) => o.id === t);
15438
15439
  return r?.length ? r[0].from : null;
15439
15440
  }, Iu = K.create({
15440
15441
  name: "image",
@@ -16471,7 +16472,7 @@ const Ku = {
16471
16472
  function it(e) {
16472
16473
  return e.split("-")[0];
16473
16474
  }
16474
- var an = Math.max, Eo = Math.min, Ln = Math.round;
16475
+ var an = Math.max, Po = Math.min, Ln = Math.round;
16475
16476
  function hs() {
16476
16477
  var e = navigator.userAgentData;
16477
16478
  return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
@@ -16532,7 +16533,7 @@ function Wt(e) {
16532
16533
  e.document
16533
16534
  )) || window.document).documentElement;
16534
16535
  }
16535
- function Wo(e) {
16536
+ function Uo(e) {
16536
16537
  return lt(e) === "html" ? e : (
16537
16538
  // this is a quicker (but less type safe) way to save quite some bytes from the bundle
16538
16539
  // $FlowFixMe[incompatible-return]
@@ -16555,7 +16556,7 @@ function mv(e) {
16555
16556
  if (r.position === "fixed")
16556
16557
  return null;
16557
16558
  }
16558
- var o = Wo(e);
16559
+ var o = Uo(e);
16559
16560
  for (qs(o) && (o = o.host); We(o) && ["html", "body"].indexOf(lt(o)) < 0; ) {
16560
16561
  var i = xt(o);
16561
16562
  if (i.transform !== "none" || i.perspective !== "none" || i.contain === "paint" || ["transform", "perspective"].indexOf(i.willChange) !== -1 || t && i.willChange === "filter" || t && i.filter && i.filter !== "none")
@@ -16573,7 +16574,7 @@ function Xs(e) {
16573
16574
  return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
16574
16575
  }
16575
16576
  function sr(e, t, n) {
16576
- return an(e, Eo(t, n));
16577
+ return an(e, Po(t, n));
16577
16578
  }
16578
16579
  function gv(e, t, n) {
16579
16580
  var r = sr(e, t, n);
@@ -16738,7 +16739,7 @@ var Ov = {
16738
16739
  bottom: "top",
16739
16740
  top: "bottom"
16740
16741
  };
16741
- function mo(e) {
16742
+ function go(e) {
16742
16743
  return e.replace(/left|right|bottom|top/g, function(t) {
16743
16744
  return Ov[t];
16744
16745
  });
@@ -16790,7 +16791,7 @@ function Gs(e) {
16790
16791
  return /auto|scroll|overlay|hidden/.test(n + o + r);
16791
16792
  }
16792
16793
  function Qu(e) {
16793
- return ["html", "body", "#document"].indexOf(lt(e)) >= 0 ? e.ownerDocument.body : We(e) && Gs(e) ? e : Qu(Wo(e));
16794
+ return ["html", "body", "#document"].indexOf(lt(e)) >= 0 ? e.ownerDocument.body : We(e) && Gs(e) ? e : Qu(Uo(e));
16794
16795
  }
16795
16796
  function ar(e, t) {
16796
16797
  var n;
@@ -16798,7 +16799,7 @@ function ar(e, t) {
16798
16799
  var r = Qu(e), o = r === ((n = e.ownerDocument) == null ? void 0 : n.body), i = Fe(r), s = o ? [i].concat(i.visualViewport || [], Gs(r) ? r : []) : r, a = t.concat(s);
16799
16800
  return o ? a : (
16800
16801
  // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
16801
- a.concat(ar(Wo(s)))
16802
+ a.concat(ar(Uo(s)))
16802
16803
  );
16803
16804
  }
16804
16805
  function ms(e) {
@@ -16817,7 +16818,7 @@ function Bl(e, t, n) {
16817
16818
  return t === Uu ? ms(Dv(e, n)) : fn(t) ? Ev(t, n) : ms(Nv(Wt(e)));
16818
16819
  }
16819
16820
  function Pv(e) {
16820
- var t = ar(Wo(e)), n = ["absolute", "fixed"].indexOf(xt(e).position) >= 0, r = n && We(e) ? Rr(e) : e;
16821
+ var t = ar(Uo(e)), n = ["absolute", "fixed"].indexOf(xt(e).position) >= 0, r = n && We(e) ? Rr(e) : e;
16821
16822
  return fn(r) ? t.filter(function(o) {
16822
16823
  return fn(o) && Ju(o, r) && lt(o) !== "body";
16823
16824
  }) : [];
@@ -16825,7 +16826,7 @@ function Pv(e) {
16825
16826
  function Iv(e, t, n, r) {
16826
16827
  var o = t === "clippingParents" ? Pv(e) : [].concat(t), i = [].concat(o, [n]), s = i[0], a = i.reduce(function(l, c) {
16827
16828
  var d = Bl(e, c, r);
16828
- return l.top = an(d.top, l.top), l.right = Eo(d.right, l.right), l.bottom = Eo(d.bottom, l.bottom), l.left = an(d.left, l.left), l;
16829
+ return l.top = an(d.top, l.top), l.right = Po(d.right, l.right), l.bottom = Po(d.bottom, l.bottom), l.left = an(d.left, l.left), l;
16829
16830
  }, Bl(e, s, r));
16830
16831
  return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
16831
16832
  }
@@ -16920,13 +16921,13 @@ function Rv(e, t) {
16920
16921
  function Lv(e) {
16921
16922
  if (it(e) === Us)
16922
16923
  return [];
16923
- var t = mo(e);
16924
+ var t = go(e);
16924
16925
  return [Fl(e), t, Fl(t)];
16925
16926
  }
16926
16927
  function Fv(e) {
16927
16928
  var t = e.state, n = e.options, r = e.name;
16928
16929
  if (!t.modifiersData[r]._skip) {
16929
- for (var o = n.mainAxis, i = o === void 0 ? !0 : o, s = n.altAxis, a = s === void 0 ? !0 : s, l = n.fallbackPlacements, c = n.padding, d = n.boundary, u = n.rootBoundary, f = n.altBoundary, p = n.flipVariations, h = p === void 0 ? !0 : p, m = n.allowedAutoPlacements, g = t.options.placement, b = it(g), w = b === g, x = l || (w || !h ? [mo(g)] : Lv(g)), y = [g].concat(x).reduce(function(Ke, Pe) {
16930
+ for (var o = n.mainAxis, i = o === void 0 ? !0 : o, s = n.altAxis, a = s === void 0 ? !0 : s, l = n.fallbackPlacements, c = n.padding, d = n.boundary, u = n.rootBoundary, f = n.altBoundary, p = n.flipVariations, h = p === void 0 ? !0 : p, m = n.allowedAutoPlacements, g = t.options.placement, b = it(g), w = b === g, x = l || (w || !h ? [go(g)] : Lv(g)), y = [g].concat(x).reduce(function(Ke, Pe) {
16930
16931
  return Ke.concat(it(Pe) === Us ? Rv(t, {
16931
16932
  placement: Pe,
16932
16933
  boundary: d,
@@ -16943,8 +16944,8 @@ function Fv(e) {
16943
16944
  altBoundary: f,
16944
16945
  padding: c
16945
16946
  }), se = ie ? H ? qe : Ee : H ? Ue : Ne;
16946
- C[ae] > k[ae] && (se = mo(se));
16947
- var Z = mo(se), pe = [];
16947
+ C[ae] > k[ae] && (se = go(se));
16948
+ var Z = go(se), pe = [];
16948
16949
  if (i && pe.push(fe[F] <= 0), a && pe.push(fe[se] <= 0, fe[Z] <= 0), pe.every(function(Ke) {
16949
16950
  return Ke;
16950
16951
  })) {
@@ -17086,7 +17087,7 @@ function qv(e) {
17086
17087
  var H, ie = y === "y" ? Ne : Ee, ae = y === "y" ? Ue : qe, fe = y === "y" ? "height" : "width", se = k[y], Z = se + g[ie], pe = se - g[ae], he = p ? -B[fe] / 2 : 0, Te = w === Rn ? A[fe] : B[fe], Be = w === Rn ? -B[fe] : -A[fe], dt = t.elements.arrow, Ke = p && dt ? Ks(dt) : {
17087
17088
  width: 0,
17088
17089
  height: 0
17089
- }, Pe = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Yu(), Xe = Pe[ie], Mt = Pe[ae], Je = sr(0, A[fe], Ke[fe]), pn = x ? A[fe] / 2 - he - Je - Xe - V.mainAxis : Te - Je - Xe - V.mainAxis, St = x ? -A[fe] / 2 + he + Je + Mt + V.mainAxis : Be + Je + Mt + V.mainAxis, hn = t.elements.arrow && Rr(t.elements.arrow), Fr = hn ? y === "y" ? hn.clientTop || 0 : hn.clientLeft || 0 : 0, jn = (H = $?.[y]) != null ? H : 0, Br = se + pn - jn - Fr, zr = se + St - jn, Wn = sr(p ? Eo(Z, Br) : Z, se, p ? an(pe, zr) : pe);
17090
+ }, Pe = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Yu(), Xe = Pe[ie], Mt = Pe[ae], Je = sr(0, A[fe], Ke[fe]), pn = x ? A[fe] / 2 - he - Je - Xe - V.mainAxis : Te - Je - Xe - V.mainAxis, St = x ? -A[fe] / 2 + he + Je + Mt + V.mainAxis : Be + Je + Mt + V.mainAxis, hn = t.elements.arrow && Rr(t.elements.arrow), Fr = hn ? y === "y" ? hn.clientTop || 0 : hn.clientLeft || 0 : 0, jn = (H = $?.[y]) != null ? H : 0, Br = se + pn - jn - Fr, zr = se + St - jn, Wn = sr(p ? Po(Z, Br) : Z, se, p ? an(pe, zr) : pe);
17090
17091
  k[y] = Wn, F[y] = Wn - se;
17091
17092
  }
17092
17093
  if (a) {
@@ -17304,7 +17305,7 @@ var rk = [Av, Wv, Mv, Ku, Hv, Bv, Kv, vv, _v], ok = /* @__PURE__ */ nk({
17304
17305
  function ak(e, t) {
17305
17306
  return {}.hasOwnProperty.call(e, t);
17306
17307
  }
17307
- function gi(e, t, n) {
17308
+ function yi(e, t, n) {
17308
17309
  if (Array.isArray(e)) {
17309
17310
  var r = e[t];
17310
17311
  return r ?? (Array.isArray(n) ? n[t] : n);
@@ -17351,7 +17352,7 @@ function dk(e) {
17351
17352
  function uk(e) {
17352
17353
  return e.split("-")[0];
17353
17354
  }
17354
- function Po(e) {
17355
+ function Io(e) {
17355
17356
  return [].slice.call(e);
17356
17357
  }
17357
17358
  function Wl(e) {
@@ -17377,9 +17378,9 @@ function hk(e) {
17377
17378
  return !!(e && e._tippy && e._tippy.reference === e);
17378
17379
  }
17379
17380
  function mk(e) {
17380
- return Sr(e) ? [e] : fk(e) ? Po(e) : Array.isArray(e) ? e : Po(document.querySelectorAll(e));
17381
+ return Sr(e) ? [e] : fk(e) ? Io(e) : Array.isArray(e) ? e : Io(document.querySelectorAll(e));
17381
17382
  }
17382
- function yi(e, t) {
17383
+ function bi(e, t) {
17383
17384
  e.forEach(function(n) {
17384
17385
  n && (n.style.transitionDuration = t + "ms");
17385
17386
  });
@@ -17403,7 +17404,7 @@ function yk(e, t) {
17403
17404
  return m || g || b || w;
17404
17405
  });
17405
17406
  }
17406
- function bi(e, t, n) {
17407
+ function wi(e, t, n) {
17407
17408
  var r = t + "EventListener";
17408
17409
  ["transitionend", "webkitTransitionEnd"].forEach(function(o) {
17409
17410
  e[r](o, n);
@@ -17627,7 +17628,7 @@ function Gl(e, t) {
17627
17628
  Sr(t.content) ? (ys(e, ""), e.appendChild(t.content)) : typeof t.content != "function" && (t.allowHTML ? ys(e, t.content) : e.textContent = t.content);
17628
17629
  }
17629
17630
  function bs(e) {
17630
- var t = e.firstElementChild, n = Po(t.children);
17631
+ var t = e.firstElementChild, n = Io(t.children);
17631
17632
  return {
17632
17633
  box: t,
17633
17634
  content: n.find(function(r) {
@@ -17656,7 +17657,7 @@ function ff(e) {
17656
17657
  };
17657
17658
  }
17658
17659
  ff.$$tippy = !0;
17659
- var Ek = 1, no = [], wi = [];
17660
+ var Ek = 1, no = [], vi = [];
17660
17661
  function Pk(e, t) {
17661
17662
  var n = Jl(e, Object.assign({}, Re, df(Wl(t)))), r, o, i, s = !1, a = !1, l = !1, c = !1, d, u, f, p = [], h = Hl(Br, n.interactiveDebounce), m, g = Ek++, b = null, w = dk(n.plugins), x = {
17662
17663
  // Is the instance currently enabled?
@@ -17724,7 +17725,7 @@ function Pk(e, t) {
17724
17725
  return bs(k);
17725
17726
  }
17726
17727
  function fe(v) {
17727
- return y.state.isMounted && !y.state.isVisible || rt.isTouch || d && d.type === "focus" ? 0 : gi(y.props.delay, v ? 0 : 1, Re.delay);
17728
+ return y.state.isMounted && !y.state.isVisible || rt.isTouch || d && d.type === "focus" ? 0 : yi(y.props.delay, v ? 0 : 1, Re.delay);
17728
17729
  }
17729
17730
  function se(v) {
17730
17731
  v === void 0 && (v = !1), k.style.pointerEvents = y.props.interactive && !v ? "" : "none", k.style.zIndex = "" + y.props.zIndex;
@@ -17807,11 +17808,11 @@ function Pk(e, t) {
17807
17808
  function pn(v, O) {
17808
17809
  var R = ae().box;
17809
17810
  function q(U) {
17810
- U.target === R && (bi(R, "remove", q), O());
17811
+ U.target === R && (wi(R, "remove", q), O());
17811
17812
  }
17812
17813
  if (v === 0)
17813
17814
  return O();
17814
- bi(R, "remove", u), bi(R, "add", q), u = q;
17815
+ wi(R, "remove", u), wi(R, "add", q), u = q;
17815
17816
  }
17816
17817
  function St(v, O, R) {
17817
17818
  R === void 0 && (R = !1);
@@ -17903,9 +17904,9 @@ function Pk(e, t) {
17903
17904
  fn: function(Ur) {
17904
17905
  var gn = Ur.state;
17905
17906
  if (F()) {
17906
- var bf = ae(), qo = bf.box;
17907
+ var bf = ae(), Ko = bf.box;
17907
17908
  ["placement", "reference-hidden", "escaped"].forEach(function(qr) {
17908
- qr === "placement" ? qo.setAttribute("data-placement", gn.placement) : gn.attributes.popper["data-popper-" + qr] ? qo.setAttribute("data-" + qr, "") : qo.removeAttribute("data-" + qr);
17909
+ qr === "placement" ? Ko.setAttribute("data-placement", gn.placement) : gn.attributes.popper["data-popper-" + qr] ? Ko.setAttribute("data-" + qr, "") : Ko.removeAttribute("data-" + qr);
17909
17910
  }), gn.attributes.popper = {};
17910
17911
  }
17911
17912
  }
@@ -17961,7 +17962,7 @@ function Pk(e, t) {
17961
17962
  `, "See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "));
17962
17963
  }
17963
17964
  function At() {
17964
- return Po(k.querySelectorAll("[data-tippy-root]"));
17965
+ return Io(k.querySelectorAll("[data-tippy-root]"));
17965
17966
  }
17966
17967
  function qn(v) {
17967
17968
  y.clearDelayTimeouts(), v && Z("onTrigger", [y, v]), Pe();
@@ -18013,20 +18014,20 @@ function Pk(e, t) {
18013
18014
  }
18014
18015
  function pf() {
18015
18016
  oe.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, kn("show"));
18016
- var v = y.state.isVisible, O = y.state.isDestroyed, R = !y.state.isEnabled, q = rt.isTouch && !y.props.touch, U = gi(y.props.duration, 0, Re.duration);
18017
+ var v = y.state.isVisible, O = y.state.isDestroyed, R = !y.state.isEnabled, q = rt.isTouch && !y.props.touch, U = yi(y.props.duration, 0, Re.duration);
18017
18018
  if (!(v || O || R || q) && !H().hasAttribute("disabled") && (Z("onShow", [y], !1), y.props.onShow(y) !== !1)) {
18018
18019
  if (y.state.isVisible = !0, F() && (k.style.visibility = "visible"), se(), Pe(), y.state.isMounted || (k.style.transition = "none"), F()) {
18019
18020
  var xe = ae(), ze = xe.box, mn = xe.content;
18020
- yi([ze, mn], 0);
18021
+ bi([ze, mn], 0);
18021
18022
  }
18022
18023
  f = function() {
18023
18024
  var qt;
18024
18025
  if (!(!y.state.isVisible || c)) {
18025
18026
  if (c = !0, k.offsetHeight, k.style.transition = y.props.moveTransition, F() && y.props.animation) {
18026
- var Uo = ae(), Ur = Uo.box, gn = Uo.content;
18027
- yi([Ur, gn], U), Ul([Ur, gn], "visible");
18027
+ var qo = ae(), Ur = qo.box, gn = qo.content;
18028
+ bi([Ur, gn], U), Ul([Ur, gn], "visible");
18028
18029
  }
18029
- pe(), he(), jl(wi, y), (qt = y.popperInstance) == null || qt.forceUpdate(), Z("onMount", [y]), y.props.animation && F() && Je(U, function() {
18030
+ pe(), he(), jl(vi, y), (qt = y.popperInstance) == null || qt.forceUpdate(), Z("onMount", [y]), y.props.animation && F() && Je(U, function() {
18030
18031
  y.state.isShown = !0, Z("onShown", [y]);
18031
18032
  });
18032
18033
  }
@@ -18035,11 +18036,11 @@ function Pk(e, t) {
18035
18036
  }
18036
18037
  function hf() {
18037
18038
  oe.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, kn("hide"));
18038
- var v = !y.state.isVisible, O = y.state.isDestroyed, R = !y.state.isEnabled, q = gi(y.props.duration, 1, Re.duration);
18039
+ var v = !y.state.isVisible, O = y.state.isDestroyed, R = !y.state.isEnabled, q = yi(y.props.duration, 1, Re.duration);
18039
18040
  if (!(v || O || R) && (Z("onHide", [y], !1), y.props.onHide(y) !== !1)) {
18040
18041
  if (y.state.isVisible = !1, y.state.isShown = !1, c = !1, s = !1, F() && (k.style.visibility = "hidden"), Te(), Xe(), se(!0), F()) {
18041
18042
  var U = ae(), xe = U.box, ze = U.content;
18042
- y.props.animation && (yi([xe, ze], q), Ul([xe, ze], "hidden"));
18043
+ y.props.animation && (bi([xe, ze], q), Ul([xe, ze], "hidden"));
18043
18044
  }
18044
18045
  pe(), he(), y.props.animation ? F() && Mt(q, y.unmount) : y.unmount();
18045
18046
  }
@@ -18050,7 +18051,7 @@ function Pk(e, t) {
18050
18051
  function gf() {
18051
18052
  oe.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, kn("unmount")), y.state.isVisible && y.hide(), y.state.isMounted && ($r(), At().forEach(function(v) {
18052
18053
  v._tippy.unmount();
18053
- }), k.parentNode && k.parentNode.removeChild(k), wi = wi.filter(function(v) {
18054
+ }), k.parentNode && k.parentNode.removeChild(k), vi = vi.filter(function(v) {
18054
18055
  return v !== y;
18055
18056
  }), y.state.isMounted = !1, Z("onHidden", [y]));
18056
18057
  }
@@ -18149,22 +18150,22 @@ const Ik = (e, t) => {
18149
18150
  class: "mentions-container",
18150
18151
  ref_key: "container",
18151
18152
  ref: n,
18152
- onKeydown: Zo(s, ["prevent"]),
18153
- onFocus: Zo(a, ["stop", "prevent"]),
18153
+ onKeydown: Qo(s, ["prevent"]),
18154
+ onFocus: Qo(a, ["stop", "prevent"]),
18154
18155
  tabindex: "0"
18155
18156
  }, [
18156
18157
  (Xt(!0), Kt(zf, null, _f(o.value, (d, u) => (Xt(), Kt("div", {
18157
- onClick: Zo((f) => i(d), ["stop", "prevent"]),
18158
+ onClick: Qo((f) => i(d), ["stop", "prevent"]),
18158
18159
  onMouseenter: (f) => r.value = u,
18159
18160
  onMouseleave: c[0] || (c[0] = (f) => r.value = null),
18160
18161
  key: d.email,
18161
18162
  class: $f(["user-row", { selected: r.value === u }])
18162
18163
  }, [
18163
18164
  d.name ? (Xt(), Kt("div", Lk, [
18164
- d.name ? (Xt(), Kt("span", Fk, Qo(d.name), 1)) : sa("", !0),
18165
- d.name && d.email ? (Xt(), Kt("span", Bk, " (" + Qo(d.email) + ")", 1)) : sa("", !0)
18165
+ d.name ? (Xt(), Kt("span", Fk, ei(d.name), 1)) : sa("", !0),
18166
+ d.name && d.email ? (Xt(), Kt("span", Bk, " (" + ei(d.email) + ")", 1)) : sa("", !0)
18166
18167
  ])) : (Xt(), Kt("div", zk, [
18167
- Vf("span", null, Qo(d.email), 1)
18168
+ Vf("span", null, ei(d.email), 1)
18168
18169
  ]))
18169
18170
  ], 42, Rk))), 128))
18170
18171
  ], 544));
@@ -18314,7 +18315,7 @@ const jk = !1, Wk = ee.create({
18314
18315
  apply(s, a, l, c) {
18315
18316
  const d = s.getMeta(sn);
18316
18317
  d && d.isReadyToInit && (n = !0, o = d.isReadyToInit);
18317
- const u = s.getMeta(No);
18318
+ const u = s.getMeta(Eo);
18318
18319
  if (u) {
18319
18320
  if (u.type === "remove") {
18320
18321
  const h = u.pos, m = e.view.domAtPos(h).node.querySelector("img");
@@ -18408,7 +18409,7 @@ function Kk(e, t, n, r) {
18408
18409
  let l = 1, c = a, d = null, u = null;
18409
18410
  const f = Jt(l, "headerIds", n), p = ro(s, i, r, f), h = oo({ editor: n, header: p, isFirstHeader: !0 });
18410
18411
  o.push(_.widget(0, h, { key: "stable-key" }));
18411
- const m = Jt(l, "footerIds", n), g = vi(s, i, r, m);
18412
+ const m = Jt(l, "footerIds", n), g = ki(s, i, r, m);
18412
18413
  c -= p.headerHeight + g.footerHeight;
18413
18414
  let b = t?.coordsAtPos(e.content.size);
18414
18415
  if (!b) return [];
@@ -18423,14 +18424,14 @@ function Kk(e, t, n, r) {
18423
18424
  o.push(_.widget(0, Te, { key: "stable-key" }));
18424
18425
  }
18425
18426
  if (F.type.name === "paragraph" && F.attrs.styleId) {
18426
- const Z = co.getState(n.state)?.styles?.find((pe) => pe.id === F.attrs.styleId);
18427
+ const Z = uo.getState(n.state)?.styles?.find((pe) => pe.id === F.attrs.styleId);
18427
18428
  if (Z) {
18428
18429
  const { definition: pe = {} } = Z, { pageBreakBefore: he, pageBreakAfter: Te } = pe.attrs || {};
18429
18430
  (he || Te) && (ie = !0);
18430
18431
  }
18431
18432
  }
18432
18433
  if (ae || ie) {
18433
- const se = t.state.doc.resolve(H), Z = Ho(se, (Je) => Je.type.name === "tableRow");
18434
+ const se = t.state.doc.resolve(H), Z = jo(se, (Je) => Je.type.name === "tableRow");
18434
18435
  Z && (F = Z.node, H = Z.pos);
18435
18436
  const {
18436
18437
  top: pe,
@@ -18439,7 +18440,7 @@ function Kk(e, t, n, r) {
18439
18440
  } = Xk(t, H, c), Be = Jt(l, "footerIds", n, F);
18440
18441
  l++;
18441
18442
  const dt = Jt(l, "headerIds", n);
18442
- u = ro(s, i, r, dt), d = vi(s, i, r, Be, l - 1);
18443
+ u = ro(s, i, r, dt), d = ki(s, i, r, Be, l - 1);
18443
18444
  const Ke = c - he, { node: Pe } = Ql(Ke), Xe = _.widget(Te, Pe, { key: "stable-key" });
18444
18445
  o.push(Xe);
18445
18446
  const Mt = oo({ editor: n, header: u, footer: d });
@@ -18448,7 +18449,7 @@ function Kk(e, t, n, r) {
18448
18449
  });
18449
18450
  let w = e.content.size;
18450
18451
  const x = t.coordsAtPos(w), y = Jt(l, "headerIds", n), C = Jt(l, "footerIds", n);
18451
- u = ro(s, i, r, y), d = vi(s, i, r, C, l);
18452
+ u = ro(s, i, r, y), d = ki(s, i, r, C, l);
18452
18453
  const k = c - x.bottom, { node: A } = Ql(k), B = _.widget(e.content.size, A, { key: "stable-key" });
18453
18454
  o.push(B);
18454
18455
  const M = oo({ editor: n, footer: d, isLastFooter: !0 });
@@ -18472,7 +18473,7 @@ function ro(e, t, n, r) {
18472
18473
  headerHeight: c
18473
18474
  };
18474
18475
  }
18475
- function vi(e, t, n, r, o) {
18476
+ function ki(e, t, n, r, o) {
18476
18477
  const i = n.footers?.[r], s = e.bottom * 96, a = e.footer * 96, l = Math.max(i?.height || 0, s - a);
18477
18478
  let c = i?.sectionContainer?.cloneNode(!0);
18478
18479
  c || (c = document.createElement("div"));
@@ -18617,8 +18618,8 @@ const ec = (e) => {
18617
18618
  export {
18618
18619
  D as A,
18619
18620
  ge as C,
18620
- qi as E,
18621
- No as I,
18621
+ Ki as E,
18622
+ Eo as I,
18622
18623
  Oe as M,
18623
18624
  K as N,
18624
18625
  Qw as P,
@@ -18630,14 +18631,14 @@ export {
18630
18631
  jf as d,
18631
18632
  Yk as e,
18632
18633
  lx as f,
18633
- ni as g,
18634
+ ri as g,
18634
18635
  Jk as h,
18635
18636
  Dd as i,
18636
18637
  ee as j,
18637
18638
  Nd as k,
18638
18639
  ax as l,
18639
18640
  cx as m,
18640
- Lo as n,
18641
+ Fo as n,
18641
18642
  rx as r,
18642
18643
  nx as u
18643
18644
  };