@harbour-enterprises/superdoc 0.10.39 → 0.10.41

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.
@@ -1,15 +1,15 @@
1
- var bf = Object.defineProperty;
1
+ var wf = Object.defineProperty;
2
2
  var ta = (t) => {
3
3
  throw TypeError(t);
4
4
  };
5
- var wf = (t, e, n) => e in t ? bf(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
6
- var I = (t, e, n) => wf(t, typeof e != "symbol" ? e + "" : e, n), Uo = (t, e, n) => e.has(t) || ta("Cannot " + n);
5
+ var vf = (t, e, n) => e in t ? wf(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
6
+ var I = (t, e, n) => vf(t, typeof e != "symbol" ? e + "" : e, n), Uo = (t, e, n) => e.has(t) || ta("Cannot " + n);
7
7
  var Ge = (t, e, n) => (Uo(t, e, "read from private field"), n ? n.call(t) : e.get(t)), ft = (t, e, n) => e.has(t) ? ta("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), qo = (t, e, n, r) => (Uo(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n), N = (t, e, n) => (Uo(t, e, "access private method"), n);
8
8
  import * as T from "yjs";
9
- import { UndoManager as vf, Item as kf, ContentType as Cf, Text as Mf, XmlElement as Sf } from "yjs";
10
- import { P as Y, a as G, M as dr, c as K, N as B, S as Z, T as j, b as W, D as Vn, F as P, d as tn, e as xf, f as tc, A as Or, p as ie, B as Af, i as Of, g as nc, h as Tf, j as wt, l as Tr, k as Ht, m as rc, r as oc, R as an, o as ur, n as na, q as $t, s as ki, t as ic, u as Df, v as Nf, w as ue, x as $e, y as Eo, z as Cn, C as ho, E as Ef, G as Me, H as ro, I as sc, J as Mn, K as Ko, L as Xo, O as Jo, Q as oo, U as Rt, V as Po, W as Pf, X as ra, Y as oa, Z as If, _ as Rf, $ as Lf } from "./converter-CEPBSnq_.js";
11
- import { ref as ia, computed as Ff, createElementBlock as Kt, openBlock as Xt, withModifiers as Yo, Fragment as Bf, renderList as zf, normalizeClass as _f, createCommentVNode as sa, toDisplayString as Go, createElementVNode as $f, createApp as Vf } from "vue";
12
- import { D as aa } from "./docx-zipper-CuqGO0e3.js";
9
+ import { UndoManager as kf, Item as Cf, ContentType as Mf, Text as xf, XmlElement as Sf } from "yjs";
10
+ import { P as Y, a as G, M as dr, c as K, N as B, S as Z, T as j, b as W, D as Vn, F as P, d as tn, e as Af, f as tc, A as Or, p as ie, 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 an, o as ur, n as na, q as $t, s as ki, t as ic, u as Nf, v as Ef, w as ue, x as $e, y as Eo, z as Cn, C as ho, E as Pf, G as Me, H as ro, I as sc, J as Mn, K as Ko, L as Xo, O as Jo, Q as oo, U as Rt, V as Po, W as If, X as ra, Y as oa, Z as Rf, _ as Lf, $ as Ff } from "./converter-BY6X7Qwr.js";
11
+ import { ref as ia, computed as Bf, createElementBlock as Kt, openBlock as Xt, withModifiers as Yo, Fragment as zf, renderList as _f, normalizeClass as $f, createCommentVNode as sa, toDisplayString as Go, createElementVNode as Vf, createApp as Hf } from "vue";
12
+ import { D as aa } from "./docx-zipper-CBVg898J.js";
13
13
  function Io(t) {
14
14
  const { from: e, to: n, empty: r } = t.selection, o = [];
15
15
  return r ? (t.storedMarks && o.push(...t.storedMarks), o.push(...t.selection.$head.marks())) : t.doc.nodesBetween(e, n, (i) => {
@@ -32,7 +32,7 @@ const Ro = (t, e, n = !1) => {
32
32
  }
33
33
  }), n ? d : c;
34
34
  };
35
- function Hf(t) {
35
+ function jf(t) {
36
36
  const { state: e } = t, { selection: n } = e, r = Io(e), 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");
@@ -43,7 +43,7 @@ function Hf(t) {
43
43
  let { from: f, to: p, attrs: h } = l;
44
44
  n.from >= f && n.to <= p && i.push({ name: "link", attrs: h });
45
45
  }
46
- const c = ["paragraphSpacing"], d = jf(e);
46
+ const c = ["paragraphSpacing"], d = Wf(e);
47
47
  return Object.keys(d).forEach((f) => {
48
48
  if (c.includes(f)) return;
49
49
  const p = {};
@@ -56,7 +56,7 @@ function la(t) {
56
56
  n[r] && e.push({ name: r, attrs: { [r]: n[r] } });
57
57
  }), e;
58
58
  }
59
- function jf(t) {
59
+ function Wf(t) {
60
60
  try {
61
61
  const { from: e, to: n, empty: r } = t.selection, o = {}, i = (l) => {
62
62
  Object.keys(l.attrs).forEach((c) => {
@@ -79,7 +79,7 @@ fe.prototype.prepend = function(e) {
79
79
  return e.length ? fe.from(e).append(this) : this;
80
80
  };
81
81
  fe.prototype.appendInner = function(e) {
82
- return new Wf(this, e);
82
+ return new Uf(this, e);
83
83
  };
84
84
  fe.prototype.slice = function(e, n) {
85
85
  return e === void 0 && (e = 0), n === void 0 && (n = this.length), e >= n ? fe.empty : this.sliceInner(Math.max(0, e), Math.min(this.length, n));
@@ -134,7 +134,7 @@ var ac = /* @__PURE__ */ function(t) {
134
134
  }, Object.defineProperties(e.prototype, n), e;
135
135
  }(fe);
136
136
  fe.empty = new ac([]);
137
- var Wf = /* @__PURE__ */ function(t) {
137
+ var Uf = /* @__PURE__ */ function(t) {
138
138
  function e(n, r) {
139
139
  t.call(this), this.left = n, this.right = r, this.length = n.length + r.length, this.depth = Math.max(n.depth, r.depth) + 1;
140
140
  }
@@ -167,7 +167,7 @@ var Wf = /* @__PURE__ */ function(t) {
167
167
  return this.left.depth >= Math.max(this.right.depth, r.depth) + 1 ? new e(this.left, new e(this.right, r)) : new e(this, r);
168
168
  }, e;
169
169
  }(fe);
170
- const Uf = 500;
170
+ const qf = 500;
171
171
  class Xe {
172
172
  constructor(e, n) {
173
173
  this.items = e, this.eventCount = n;
@@ -209,7 +209,7 @@ class Xe {
209
209
  (p = l && l.merge(f)) && (f = p, d ? i.pop() : a = a.slice(0, a.length - 1)), i.push(f), n && (s++, n = void 0), o || (l = f);
210
210
  }
211
211
  let c = s - r.depth;
212
- return c > Kf && (a = qf(a, c), s -= c), new Xe(a.append(i), s);
212
+ return c > Xf && (a = Kf(a, c), s -= c), new Xe(a.append(i), s);
213
213
  }
214
214
  remapping(e, n) {
215
215
  let r = new dr();
@@ -249,7 +249,7 @@ class Xe {
249
249
  for (let f = n; f < s; f++)
250
250
  c.push(new Qe(i.maps[f]));
251
251
  let d = this.items.slice(0, o).append(c).append(r), u = new Xe(d, a);
252
- return u.emptyItemCount() > Uf && (u = u.compress(this.items.length - r.length)), u;
252
+ return u.emptyItemCount() > qf && (u = u.compress(this.items.length - r.length)), u;
253
253
  }
254
254
  emptyItemCount() {
255
255
  let e = 0;
@@ -281,7 +281,7 @@ class Xe {
281
281
  }
282
282
  }
283
283
  Xe.empty = new Xe(fe.empty, 0);
284
- function qf(t, e) {
284
+ function Kf(t, e) {
285
285
  let n;
286
286
  return t.forEach((r, o) => {
287
287
  if (r.selection && e-- == 0)
@@ -305,23 +305,23 @@ class Tt {
305
305
  this.done = e, this.undone = n, this.prevRanges = r, this.prevTime = o, this.prevComposition = i;
306
306
  }
307
307
  }
308
- const Kf = 20;
309
- function Xf(t, e, n, r) {
308
+ const Xf = 20;
309
+ function Jf(t, e, n, r) {
310
310
  let o = n.getMeta(vt), i;
311
311
  if (o)
312
312
  return o.historyState;
313
- n.getMeta(Gf) && (t = new Tt(t.done, t.undone, null, 0, -1));
313
+ n.getMeta(Zf) && (t = new Tt(t.done, t.undone, null, 0, -1));
314
314
  let s = n.getMeta("appendedTransaction");
315
315
  if (n.steps.length == 0)
316
316
  return t;
317
317
  if (s && s.getMeta(vt))
318
318
  return s.getMeta(vt).redo ? new Tt(t.done.addTransform(n, void 0, r, io(e)), t.undone, ca(n.mapping.maps), t.prevTime, t.prevComposition) : new Tt(t.done, t.undone.addTransform(n, void 0, r, io(e)), null, t.prevTime, t.prevComposition);
319
319
  if (n.getMeta("addToHistory") !== !1 && !(s && s.getMeta("addToHistory") === !1)) {
320
- let a = n.getMeta("composition"), l = t.prevTime == 0 || !s && t.prevComposition != a && (t.prevTime < (n.time || 0) - r.newGroupDelay || !Jf(n, t.prevRanges)), c = s ? Zo(t.prevRanges, n.mapping) : ca(n.mapping.maps);
320
+ let a = n.getMeta("composition"), l = t.prevTime == 0 || !s && t.prevComposition != a && (t.prevTime < (n.time || 0) - r.newGroupDelay || !Yf(n, t.prevRanges)), c = s ? Zo(t.prevRanges, n.mapping) : ca(n.mapping.maps);
321
321
  return new Tt(t.done.addTransform(n, l ? e.selection.getBookmark() : void 0, r, io(e)), Xe.empty, c, n.time, a ?? t.prevComposition);
322
322
  } else return (i = n.getMeta("rebased")) ? new Tt(t.done.rebased(n, i), t.undone.rebased(n, i), Zo(t.prevRanges, n.mapping), t.prevTime, t.prevComposition) : new Tt(t.done.addMaps(n.mapping.maps), t.undone.addMaps(n.mapping.maps), Zo(t.prevRanges, n.mapping), t.prevTime, t.prevComposition);
323
323
  }
324
- function Jf(t, e) {
324
+ function Yf(t, e) {
325
325
  if (!e)
326
326
  return !1;
327
327
  if (!t.docChanged)
@@ -348,7 +348,7 @@ function Zo(t, e) {
348
348
  }
349
349
  return n;
350
350
  }
351
- function Yf(t, e, n) {
351
+ function Gf(t, e, n) {
352
352
  let r = io(e), o = vt.get(e).spec.config, i = (n ? t.undone : t.done).popEvent(e, r);
353
353
  if (!i)
354
354
  return null;
@@ -368,8 +368,8 @@ function io(t) {
368
368
  }
369
369
  return Qo;
370
370
  }
371
- const vt = new Y("history"), Gf = new Y("closeHistory");
372
- function Zf(t = {}) {
371
+ const vt = new Y("history"), Zf = new Y("closeHistory");
372
+ function Qf(t = {}) {
373
373
  return t = {
374
374
  depth: t.depth || 100,
375
375
  newGroupDelay: t.newGroupDelay || 500
@@ -380,7 +380,7 @@ function Zf(t = {}) {
380
380
  return new Tt(Xe.empty, Xe.empty, null, 0, -1);
381
381
  },
382
382
  apply(e, n, r) {
383
- return Xf(n, r, e, t);
383
+ return Jf(n, r, e, t);
384
384
  }
385
385
  },
386
386
  config: t,
@@ -400,7 +400,7 @@ function lc(t, e) {
400
400
  if (!o || (t ? o.undone : o.done).eventCount == 0)
401
401
  return !1;
402
402
  if (r) {
403
- let i = Yf(o, n, t);
403
+ let i = Gf(o, n, t);
404
404
  i && r(e ? i.scrollIntoView() : i);
405
405
  }
406
406
  return !0;
@@ -449,7 +449,7 @@ class Q {
449
449
  return new Q(...e);
450
450
  }
451
451
  }
452
- const Qf = Q.create({
452
+ const uc = Q.create({
453
453
  name: "history",
454
454
  addOptions() {
455
455
  return {
@@ -458,7 +458,7 @@ const Qf = Q.create({
458
458
  };
459
459
  },
460
460
  addPmPlugins() {
461
- return [Zf(this.options)];
461
+ return [Qf(this.options)];
462
462
  },
463
463
  //prettier-ignore
464
464
  addCommands() {
@@ -582,9 +582,9 @@ function sp(t, e, n) {
582
582
  return { node: r.startContainer, offset: Math.min(_e(r.startContainer), r.startOffset) };
583
583
  }
584
584
  }
585
- const ot = typeof navigator < "u" ? navigator : null, fa = typeof document < "u" ? document : null, jt = ot && ot.userAgent || "", Mi = /Edge\/(\d+)/.exec(jt), uc = /MSIE \d/.exec(jt), Si = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(jt), Te = !!(uc || Si || Mi), Lt = uc ? document.documentMode : Si ? +Si[1] : Mi ? +Mi[1] : 0, Je = !Te && /gecko\/(\d+)/i.test(jt);
585
+ const ot = typeof navigator < "u" ? navigator : null, fa = typeof document < "u" ? document : null, jt = ot && ot.userAgent || "", Mi = /Edge\/(\d+)/.exec(jt), fc = /MSIE \d/.exec(jt), xi = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(jt), Te = !!(fc || xi || Mi), Lt = fc ? document.documentMode : xi ? +xi[1] : Mi ? +Mi[1] : 0, Je = !Te && /gecko\/(\d+)/i.test(jt);
586
586
  Je && +(/Firefox\/(\d+)/.exec(jt) || [0, 0])[1];
587
- const xi = !Te && /Chrome\/(\d+)/.exec(jt), be = !!xi, fc = xi ? +xi[1] : 0, Se = !Te && !!ot && /Apple Computer/.test(ot.vendor), Nn = Se && (/Mobile\/\w+/.test(jt) || !!ot && ot.maxTouchPoints > 2), ze = Nn || (ot ? /Mac/.test(ot.platform) : !1), ap = ot ? /Win/.test(ot.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 Si = !Te && /Chrome\/(\d+)/.exec(jt), be = !!Si, pc = Si ? +Si[1] : 0, xe = !Te && !!ot && /Apple Computer/.test(ot.vendor), Nn = xe && (/Mobile\/\w+/.test(jt) || !!ot && ot.maxTouchPoints > 2), ze = Nn || (ot ? /Mac/.test(ot.platform) : !1), ap = ot ? /Win/.test(ot.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(t) {
589
589
  let e = t.defaultView && t.defaultView.visualViewport;
590
590
  return e ? {
@@ -646,9 +646,9 @@ function up(t) {
646
646
  break;
647
647
  }
648
648
  }
649
- return { refDOM: r, refTop: o, stack: pc(t.dom) };
649
+ return { refDOM: r, refTop: o, stack: hc(t.dom) };
650
650
  }
651
- function pc(t) {
651
+ function hc(t) {
652
652
  let e = [], n = t.ownerDocument;
653
653
  for (let r = t; r && (e.push({ dom: r, top: r.scrollTop, left: r.scrollLeft }), t != n); r = Dn(r))
654
654
  ;
@@ -656,9 +656,9 @@ function pc(t) {
656
656
  }
657
657
  function fp({ refDOM: t, refTop: e, stack: n }) {
658
658
  let r = t ? t.getBoundingClientRect().top : 0;
659
- hc(n, r == 0 ? 0 : r - e);
659
+ mc(n, r == 0 ? 0 : r - e);
660
660
  }
661
- function hc(t, e) {
661
+ function mc(t, e) {
662
662
  for (let n = 0; n < t.length; n++) {
663
663
  let { dom: r, top: o, left: i } = t[n];
664
664
  r.scrollTop != o + e && (r.scrollTop = o + e), r.scrollLeft != i && (r.scrollLeft = i);
@@ -670,14 +670,14 @@ function pp(t) {
670
670
  return t.setActive();
671
671
  if (gn)
672
672
  return t.focus(gn);
673
- let e = pc(t);
673
+ let e = hc(t);
674
674
  t.focus(gn == null ? {
675
675
  get preventScroll() {
676
676
  return gn = { preventScroll: !0 }, !0;
677
677
  }
678
- } : void 0), gn || (gn = !1, hc(e, 0));
678
+ } : void 0), gn || (gn = !1, mc(e, 0));
679
679
  }
680
- function mc(t, e) {
680
+ function gc(t, e) {
681
681
  let n, r = 2e8, o, i = 0, s = e.top, a = e.top, l, c;
682
682
  for (let d = t.firstChild, u = 0; d; d = d.nextSibling, u++) {
683
683
  let f;
@@ -703,7 +703,7 @@ function mc(t, e) {
703
703
  !n && (e.left >= h.right && e.top >= h.top || e.left >= h.left && e.top >= h.bottom) && (i = u + 1);
704
704
  }
705
705
  }
706
- return !n && l && (n = l, o = c, r = 0), n && n.nodeType == 3 ? hp(n, o) : !n || r && n.nodeType == 1 ? { node: t, offset: i } : mc(n, o);
706
+ return !n && l && (n = l, o = c, r = 0), n && n.nodeType == 3 ? hp(n, o) : !n || r && n.nodeType == 1 ? { node: t, offset: i } : gc(n, o);
707
707
  }
708
708
  function hp(t, e) {
709
709
  let n = t.nodeValue.length, r = document.createRange();
@@ -723,7 +723,7 @@ function mp(t, e) {
723
723
  return n && /^li$/i.test(n.nodeName) && e.left < t.getBoundingClientRect().left ? n : t;
724
724
  }
725
725
  function gp(t, e, n) {
726
- let { node: r, offset: o } = mc(e, n), i = -1;
726
+ let { node: r, offset: o } = gc(e, n), i = -1;
727
727
  if (r.nodeType == 1 && !r.firstChild) {
728
728
  let s = r.getBoundingClientRect();
729
729
  i = s.left != s.right && n.left > (s.left + s.right) / 2 ? 1 : -1;
@@ -743,7 +743,7 @@ function yp(t, e, n, r) {
743
743
  }
744
744
  return o > -1 ? o : t.docView.posFromDOM(e, n, -1);
745
745
  }
746
- function gc(t, e, n) {
746
+ function yc(t, e, n) {
747
747
  let r = t.childNodes.length;
748
748
  if (r && n.top < n.bottom)
749
749
  for (let o = Math.max(0, Math.min(r - 1, Math.floor(r * (e.top - n.top) / (n.bottom - n.top)) - 2)), i = o; ; ) {
@@ -753,7 +753,7 @@ function gc(t, e, n) {
753
753
  for (let l = 0; l < a.length; l++) {
754
754
  let c = a[l];
755
755
  if (vs(e, c))
756
- return gc(s, e, c);
756
+ return yc(s, e, c);
757
757
  }
758
758
  }
759
759
  if ((i = (i + 1) % r) == o)
@@ -767,10 +767,10 @@ function bp(t, e) {
767
767
  let s = (t.root.elementFromPoint ? t.root : n).elementFromPoint(e.left, e.top), a;
768
768
  if (!s || !t.dom.contains(s.nodeType != 1 ? s.parentNode : s)) {
769
769
  let c = t.dom.getBoundingClientRect();
770
- if (!vs(e, c) || (s = gc(t.dom, e, c), !s))
770
+ if (!vs(e, c) || (s = yc(t.dom, e, c), !s))
771
771
  return null;
772
772
  }
773
- if (Se)
773
+ if (xe)
774
774
  for (let c = s; r && c; c = Dn(c))
775
775
  c.draggable && (r = void 0);
776
776
  if (s = mp(s, e), r) {
@@ -798,7 +798,7 @@ function Ot(t, e) {
798
798
  return Array.prototype.find.call(n, ha) || t.getBoundingClientRect();
799
799
  }
800
800
  const wp = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
801
- function yc(t, e, n) {
801
+ function bc(t, e, n) {
802
802
  let { node: r, offset: o, atom: i } = t.docView.domFromPos(e, n < 0 ? -1 : 1), s = Nr || Je;
803
803
  if (r.nodeType == 3)
804
804
  if (s && (wp.test(r.nodeValue) || (n < 0 ? !o : o == r.nodeValue.length))) {
@@ -856,7 +856,7 @@ function ti(t, e) {
856
856
  let n = e ? t.top : t.bottom;
857
857
  return { top: n, bottom: n, left: t.left, right: t.right };
858
858
  }
859
- function bc(t, e, n) {
859
+ function wc(t, e, n) {
860
860
  let r = t.state, o = t.root.activeElement;
861
861
  r != e && t.updateState(e), o != t.dom && t.focus();
862
862
  try {
@@ -867,7 +867,7 @@ function bc(t, e, n) {
867
867
  }
868
868
  function vp(t, e, n) {
869
869
  let r = e.selection, o = n == "up" ? r.$from : r.$to;
870
- return bc(t, e, () => {
870
+ return wc(t, e, () => {
871
871
  let { node: i } = t.docView.domFromPos(o.pos, n == "up" ? -1 : 1);
872
872
  for (; ; ) {
873
873
  let a = t.docView.nearestDesc(i, !0);
@@ -879,7 +879,7 @@ function vp(t, e, n) {
879
879
  }
880
880
  i = a.dom.parentNode;
881
881
  }
882
- let s = yc(t, o.pos, 1);
882
+ let s = bc(t, o.pos, 1);
883
883
  for (let a = i.firstChild; a; a = a.nextSibling) {
884
884
  let l;
885
885
  if (a.nodeType == 1)
@@ -903,7 +903,7 @@ function Cp(t, e, n) {
903
903
  if (!r.parent.isTextblock)
904
904
  return !1;
905
905
  let o = r.parentOffset, i = !o, s = o == r.parent.content.size, a = t.domSelection();
906
- return a ? !kp.test(r.parent.textContent) || !a.modify ? n == "left" || n == "backward" ? i : s : bc(t, e, () => {
906
+ return a ? !kp.test(r.parent.textContent) || !a.modify ? n == "left" || n == "backward" ? i : s : wc(t, e, () => {
907
907
  let { focusNode: l, focusOffset: c, anchorNode: d, anchorOffset: u } = t.domSelectionRange(), f = a.caretBidiLevel;
908
908
  a.modify("move", n, "character");
909
909
  let p = r.depth ? t.docView.domAfterPos(r.before()) : t.dom, { focusNode: h, focusOffset: m } = t.domSelectionRange(), g = h && !p.contains(h.nodeType == 1 ? h : h.parentNode) || l == h && c == m;
@@ -1090,7 +1090,7 @@ class Er {
1090
1090
  let r = 0, o = 0;
1091
1091
  for (let i = 0; r < this.children.length; r++) {
1092
1092
  let s = this.children[r], a = i + s.size;
1093
- if (a > e || s instanceof vc) {
1093
+ if (a > e || s instanceof kc) {
1094
1094
  o = e - i;
1095
1095
  break;
1096
1096
  }
@@ -1098,7 +1098,7 @@ class Er {
1098
1098
  }
1099
1099
  if (o)
1100
1100
  return this.children[r].domFromPos(o - this.children[r].border, n);
1101
- for (let i; r && !(i = this.children[r - 1]).size && i instanceof wc && i.side >= 0; r--)
1101
+ for (let i; r && !(i = this.children[r - 1]).size && i instanceof vc && i.side >= 0; r--)
1102
1102
  ;
1103
1103
  if (n <= 0) {
1104
1104
  let i, s = !0;
@@ -1178,7 +1178,7 @@ class Er {
1178
1178
  h = g;
1179
1179
  }
1180
1180
  let a = this.domFromPos(e, e ? -1 : 1), l = n == e ? a : this.domFromPos(n, n ? -1 : 1), c = r.root.getSelection(), d = r.domSelectionRange(), u = !1;
1181
- if ((Je || Se) && e == n) {
1181
+ if ((Je || xe) && e == n) {
1182
1182
  let { node: p, offset: h } = a;
1183
1183
  if (p.nodeType == 3) {
1184
1184
  if (u = !!(h && p.nodeValue[h - 1] == `
@@ -1201,7 +1201,7 @@ class Er {
1201
1201
  let p = d.focusNode.childNodes[d.focusOffset];
1202
1202
  p && p.contentEditable == "false" && (o = !0);
1203
1203
  }
1204
- if (!(o || u && Se) && ln(a.node, a.offset, d.anchorNode, d.anchorOffset) && ln(l.node, l.offset, d.focusNode, d.focusOffset))
1204
+ if (!(o || u && xe) && ln(a.node, a.offset, d.anchorNode, d.anchorOffset) && ln(l.node, l.offset, d.focusNode, d.focusOffset))
1205
1205
  return;
1206
1206
  let f = !1;
1207
1207
  if ((c.extend || e == n) && !u) {
@@ -1260,7 +1260,7 @@ class Er {
1260
1260
  return !1;
1261
1261
  }
1262
1262
  }
1263
- class wc extends Er {
1263
+ class vc extends Er {
1264
1264
  constructor(e, n, r, o) {
1265
1265
  let i, s = n.type.toDOM;
1266
1266
  if (typeof s == "function" && (s = s(r, () => {
@@ -1300,7 +1300,7 @@ class wc extends Er {
1300
1300
  return this.widget.type.side;
1301
1301
  }
1302
1302
  }
1303
- class Sp extends Er {
1303
+ class xp extends Er {
1304
1304
  constructor(e, n, r, o) {
1305
1305
  super(e, [], n, null), this.textDOM = r, this.text = o;
1306
1306
  }
@@ -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 xp(e, n, r, o, d, u || null, f, c, i, s + 1) : n.isText ? new Fo(e, n, r, o, d, f, i) : new Ft(e, n, r, o, d, u || null, f, i, s + 1);
1384
+ return d = xc(d, r, n), c ? l = new Sp(e, n, r, o, d, u || null, f, c, i, s + 1) : n.isText ? new Fo(e, n, r, o, d, f, i) : new Ft(e, n, r, o, d, u || null, f, i, s + 1);
1385
1385
  }
1386
1386
  parseRule() {
1387
1387
  if (this.node.type.spec.reparseInView)
@@ -1419,12 +1419,12 @@ class Ft extends Er {
1419
1419
  updateChildren(e, n) {
1420
1420
  let r = this.node.inlineContent, o = n, i = e.composing ? this.localCompositionInfo(e, n) : null, s = i && i.pos > -1 ? i : null, a = i && i.pos < 0, l = new Op(this, s && s.node, e);
1421
1421
  Np(this.node, this.innerDeco, (c, d, u) => {
1422
- c.spec.marks ? l.syncToMarks(c.spec.marks, r, e) : c.type.side >= 0 && !u && l.syncToMarks(d == this.node.childCount ? xf.none : this.node.child(d).marks, r, e), l.placeWidget(c, e, o);
1422
+ c.spec.marks ? l.syncToMarks(c.spec.marks, r, e) : c.type.side >= 0 && !u && l.syncToMarks(d == this.node.childCount ? Af.none : this.node.child(d).marks, r, e), l.placeWidget(c, e, o);
1423
1423
  }, (c, d, u, f) => {
1424
1424
  l.syncToMarks(c.marks, r, e);
1425
1425
  let p;
1426
1426
  l.findNodeMatch(c, d, u, f) || a && e.state.selection.from > o && e.state.selection.to < o + c.nodeSize && (p = l.findIndexWithChild(i.node)) > -1 && l.updateNodeAt(c, d, u, p, e) || l.updateNextNode(c, d, u, e, f, o) || l.addNode(c, d, u, e, o), o += c.nodeSize;
1427
- }), l.syncToMarks([], r, e), this.node.isTextblock && l.addTextblockHacks(), l.destroyRest(), (l.changed || this.dirty == Zt) && (s && this.protectLocalComposition(e, s), kc(this.contentDOM, this.children, e), Nn && Ep(this.dom));
1427
+ }), l.syncToMarks([], r, e), this.node.isTextblock && l.addTextblockHacks(), l.destroyRest(), (l.changed || this.dirty == Zt) && (s && this.protectLocalComposition(e, s), Cc(this.contentDOM, this.children, e), Nn && Ep(this.dom));
1428
1428
  }
1429
1429
  localCompositionInfo(e, n) {
1430
1430
  let { from: r, to: o } = e.state.selection;
@@ -1450,7 +1450,7 @@ class Ft extends Er {
1450
1450
  i.parentNode.removeChild(i.nextSibling);
1451
1451
  i.pmViewDesc && (i.pmViewDesc = void 0);
1452
1452
  }
1453
- let s = new Sp(this, i, n, o);
1453
+ let s = new xp(this, i, n, o);
1454
1454
  e.input.compositionNodes.push(s), this.children = Oi(this.children, r, r + o.length, e, s);
1455
1455
  }
1456
1456
  // If this desc must be updated to match the given node decoration,
@@ -1465,7 +1465,7 @@ class Ft extends Er {
1465
1465
  if (go(e, 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(e, this.node, n)), this.dom != r && (r.pmViewDesc = void 0, this.dom.pmViewDesc = this), this.outerDeco = e;
1468
+ this.dom = Mc(this.dom, this.nodeDOM, Ai(this.outerDeco, this.node, n), Ai(e, this.node, n)), this.dom != r && (r.pmViewDesc = void 0, this.dom.pmViewDesc = this), this.outerDeco = e;
1469
1469
  }
1470
1470
  // Mark this node as being the selected node.
1471
1471
  selectNode() {
@@ -1480,7 +1480,7 @@ class Ft extends Er {
1480
1480
  }
1481
1481
  }
1482
1482
  function wa(t, e, n, r, o) {
1483
- Mc(r, e, t);
1483
+ xc(r, e, t);
1484
1484
  let i = new Ft(void 0, t, e, n, r, r, r, o, 0);
1485
1485
  return i.contentDOM && i.updateChildren(o, 0), i;
1486
1486
  }
@@ -1527,7 +1527,7 @@ class Fo extends Ft {
1527
1527
  return this.node.text == e;
1528
1528
  }
1529
1529
  }
1530
- class vc extends Er {
1530
+ class kc extends Er {
1531
1531
  parseRule() {
1532
1532
  return { ignore: !0 };
1533
1533
  }
@@ -1541,7 +1541,7 @@ class vc extends Er {
1541
1541
  return this.dom.nodeName == "IMG";
1542
1542
  }
1543
1543
  }
1544
- class xp extends Ft {
1544
+ class Sp extends Ft {
1545
1545
  constructor(e, n, r, o, i, s, a, l, c, d) {
1546
1546
  super(e, n, r, o, i, s, a, c, d), this.spec = l;
1547
1547
  }
@@ -1575,7 +1575,7 @@ class xp extends Ft {
1575
1575
  return this.spec.ignoreMutation ? this.spec.ignoreMutation(e) : super.ignoreMutation(e);
1576
1576
  }
1577
1577
  }
1578
- function kc(t, e, n) {
1578
+ function Cc(t, e, n) {
1579
1579
  let r = t.firstChild, o = !1;
1580
1580
  for (let i = 0; i < e.length; i++) {
1581
1581
  let s = e[i], a = s.dom;
@@ -1587,7 +1587,7 @@ function kc(t, e, n) {
1587
1587
  o = !0, t.insertBefore(a, r);
1588
1588
  if (s instanceof cn) {
1589
1589
  let l = r ? r.previousSibling : t.lastChild;
1590
- kc(s.contentDOM, s.children, n), r = l ? l.nextSibling : t.firstChild;
1590
+ Cc(s.contentDOM, s.children, n), r = l ? l.nextSibling : t.firstChild;
1591
1591
  }
1592
1592
  }
1593
1593
  for (; r; )
@@ -1615,7 +1615,7 @@ function Ai(t, e, n) {
1615
1615
  }
1616
1616
  return o;
1617
1617
  }
1618
- function Cc(t, e, n, r) {
1618
+ function Mc(t, e, n, r) {
1619
1619
  if (n == Qt && r == Qt)
1620
1620
  return e;
1621
1621
  let o = e;
@@ -1651,8 +1651,8 @@ function Ap(t, e, n) {
1651
1651
  n.style && (t.style.cssText += n.style);
1652
1652
  }
1653
1653
  }
1654
- function Mc(t, e, n) {
1655
- return Cc(t, t, Qt, Ai(e, n, t.nodeType != 1));
1654
+ function xc(t, e, n) {
1655
+ return Mc(t, t, Qt, Ai(e, n, t.nodeType != 1));
1656
1656
  }
1657
1657
  function go(t, e) {
1658
1658
  if (t.length != e.length)
@@ -1789,7 +1789,7 @@ class Op {
1789
1789
  if (o && o.matchesWidget(e) && (e == o.widget || !o.widget.type.toDOM.parentNode))
1790
1790
  this.index++;
1791
1791
  else {
1792
- let i = new wc(this.top, e, n, r);
1792
+ let i = new vc(this.top, e, n, r);
1793
1793
  this.top.children.splice(this.index++, 0, i), this.changed = !0;
1794
1794
  }
1795
1795
  }
@@ -1800,7 +1800,7 @@ class Op {
1800
1800
  for (; e instanceof cn; )
1801
1801
  n = e, e = n.children[n.children.length - 1];
1802
1802
  (!e || // Empty textblock
1803
- !(e instanceof Fo) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((Se || be) && e && e.dom.contentEditable == "false" && this.addHackNode("IMG", n), this.addHackNode("BR", this.top));
1803
+ !(e instanceof Fo) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((xe || be) && e && e.dom.contentEditable == "false" && this.addHackNode("IMG", n), this.addHackNode("BR", this.top));
1804
1804
  }
1805
1805
  addHackNode(e, n) {
1806
1806
  if (n == this.top && this.index < n.children.length && n.children[this.index].matchesHack(e))
@@ -1808,7 +1808,7 @@ class Op {
1808
1808
  else {
1809
1809
  let r = document.createElement(e);
1810
1810
  e == "IMG" && (r.className = "ProseMirror-separator", r.alt = ""), e == "BR" && (r.className = "ProseMirror-trailingBreak");
1811
- let o = new vc(this.top, [], r, null);
1811
+ let o = new kc(this.top, [], r, null);
1812
1812
  n != this.top ? n.children.push(o) : n.children.splice(this.index++, 0, o), this.changed = !0;
1813
1813
  }
1814
1814
  }
@@ -1971,11 +1971,11 @@ function ks(t, e = null) {
1971
1971
  return c;
1972
1972
  }
1973
1973
  function Sc(t) {
1974
- return t.editable ? t.hasFocus() : Ac(t) && document.activeElement && document.activeElement.contains(t.dom);
1974
+ return t.editable ? t.hasFocus() : Oc(t) && document.activeElement && document.activeElement.contains(t.dom);
1975
1975
  }
1976
1976
  function kt(t, e = !1) {
1977
1977
  let n = t.state.selection;
1978
- if (xc(t, n), !!Sc(t)) {
1978
+ if (Ac(t, n), !!Sc(t)) {
1979
1979
  if (!e && t.input.mouseDown && t.input.mouseDown.allowDefault && be) {
1980
1980
  let r = t.domSelectionRange(), o = t.domObserver.currentSelection;
1981
1981
  if (r.anchorNode && o.anchorNode && ln(r.anchorNode, r.anchorOffset, o.anchorNode, o.anchorOffset)) {
@@ -1992,10 +1992,10 @@ function kt(t, e = !1) {
1992
1992
  t.domObserver.setCurSelection(), t.domObserver.connectSelection();
1993
1993
  }
1994
1994
  }
1995
- const ka = Se || be && fc < 63;
1995
+ const ka = xe || be && pc < 63;
1996
1996
  function Ca(t, e) {
1997
1997
  let { node: n, offset: r } = t.docView.domFromPos(e, 0), o = r < n.childNodes.length ? n.childNodes[r] : null, i = r ? n.childNodes[r - 1] : null;
1998
- if (Se && o && o.contentEditable == "false")
1998
+ if (xe && o && o.contentEditable == "false")
1999
1999
  return ni(o);
2000
2000
  if ((!o || o.contentEditable == "false") && (!i || i.contentEditable == "false")) {
2001
2001
  if (o)
@@ -2005,7 +2005,7 @@ function Ca(t, e) {
2005
2005
  }
2006
2006
  }
2007
2007
  function ni(t) {
2008
- return t.contentEditable = "true", Se && t.draggable && (t.draggable = !1, t.wasDraggable = !0), t;
2008
+ return t.contentEditable = "true", xe && t.draggable && (t.draggable = !1, t.wasDraggable = !0), t;
2009
2009
  }
2010
2010
  function Ma(t) {
2011
2011
  t.contentEditable = "false", t.wasDraggable && (t.draggable = !0, t.wasDraggable = null);
@@ -2027,23 +2027,23 @@ function Rp(t) {
2027
2027
  let r = t.cursorWrapper.dom, o = r.nodeName == "IMG";
2028
2028
  o ? n.setStart(r.parentNode, me(r) + 1) : n.setStart(r, 0), n.collapse(!0), e.removeAllRanges(), e.addRange(n), !o && !t.state.selection.visible && Te && Lt <= 11 && (r.disabled = !0, r.disabled = !1);
2029
2029
  }
2030
- function xc(t, e) {
2030
+ function Ac(t, e) {
2031
2031
  if (e instanceof B) {
2032
2032
  let n = t.docView.descAt(e.from);
2033
- n != t.lastSelectedViewDesc && (Sa(t), n && n.selectNode(), t.lastSelectedViewDesc = n);
2033
+ n != t.lastSelectedViewDesc && (xa(t), n && n.selectNode(), t.lastSelectedViewDesc = n);
2034
2034
  } else
2035
- Sa(t);
2035
+ xa(t);
2036
2036
  }
2037
- function Sa(t) {
2037
+ function xa(t) {
2038
2038
  t.lastSelectedViewDesc && (t.lastSelectedViewDesc.parent && t.lastSelectedViewDesc.deselectNode(), t.lastSelectedViewDesc = void 0);
2039
2039
  }
2040
2040
  function Cs(t, e, n, r) {
2041
2041
  return t.someProp("createSelectionBetween", (o) => o(t, e, n)) || j.between(e, n, r);
2042
2042
  }
2043
- function xa(t) {
2044
- return t.editable && !t.hasFocus() ? !1 : Ac(t);
2043
+ function Sa(t) {
2044
+ return t.editable && !t.hasFocus() ? !1 : Oc(t);
2045
2045
  }
2046
- function Ac(t) {
2046
+ function Oc(t) {
2047
2047
  let e = t.domSelectionRange();
2048
2048
  if (!e.anchorNode)
2049
2049
  return !1;
@@ -2123,7 +2123,7 @@ function Fp(t) {
2123
2123
  break;
2124
2124
  }
2125
2125
  } else {
2126
- if (Oc(n))
2126
+ if (Tc(n))
2127
2127
  break;
2128
2128
  {
2129
2129
  let a = n.previousSibling;
@@ -2155,7 +2155,7 @@ function Bp(t) {
2155
2155
  else
2156
2156
  break;
2157
2157
  } else {
2158
- if (Oc(n))
2158
+ if (Tc(n))
2159
2159
  break;
2160
2160
  {
2161
2161
  let a = n.nextSibling;
@@ -2172,7 +2172,7 @@ function Bp(t) {
2172
2172
  }
2173
2173
  i && Di(t, i, s);
2174
2174
  }
2175
- function Oc(t) {
2175
+ function Tc(t) {
2176
2176
  let e = t.pmViewDesc;
2177
2177
  return e && e.node && e.node.isBlock;
2178
2178
  }
@@ -2272,7 +2272,7 @@ function Na(t, e, n) {
2272
2272
  t.domObserver.stop(), e.contentEditable = n, t.domObserver.start();
2273
2273
  }
2274
2274
  function $p(t) {
2275
- if (!Se || t.state.selection.$head.parentOffset > 0)
2275
+ if (!xe || t.state.selection.$head.parentOffset > 0)
2276
2276
  return !1;
2277
2277
  let { focusNode: e, focusOffset: n } = t.domSelectionRange();
2278
2278
  if (e && e.nodeType == 1 && n == 0 && e.firstChild && e.firstChild.contentEditable == "false") {
@@ -2319,10 +2319,10 @@ function Ms(t, e) {
2319
2319
  let p = r.firstChild;
2320
2320
  n.push(p.type.name, p.attrs != p.type.defaultAttrs ? p.attrs : null), r = p.content;
2321
2321
  }
2322
- let s = t.someProp("clipboardSerializer") || Vn.fromSchema(t.state.schema), a = Ic(), l = a.createElement("div");
2322
+ let s = t.someProp("clipboardSerializer") || Vn.fromSchema(t.state.schema), a = Rc(), l = a.createElement("div");
2323
2323
  l.appendChild(s.serializeFragment(r, { document: a }));
2324
2324
  let c = l.firstChild, d, u = 0;
2325
- for (; c && c.nodeType == 1 && (d = Pc[c.nodeName.toLowerCase()]); ) {
2325
+ for (; c && c.nodeType == 1 && (d = Ic[c.nodeName.toLowerCase()]); ) {
2326
2326
  for (let p = d.length - 1; p >= 0; p--) {
2327
2327
  let h = a.createElement(d[p]);
2328
2328
  for (; l.firstChild; )
@@ -2337,7 +2337,7 @@ function Ms(t, e) {
2337
2337
  `);
2338
2338
  return { dom: l, text: f, slice: e };
2339
2339
  }
2340
- function Tc(t, e, n, r, o) {
2340
+ function Dc(t, e, n, r, o) {
2341
2341
  let i = o.parent.type.spec.code, s, a;
2342
2342
  if (!n && !e)
2343
2343
  return null;
@@ -2404,11 +2404,11 @@ function Wp(t, e) {
2404
2404
  let l = o.findWrapping(a.type), c;
2405
2405
  if (!l)
2406
2406
  return s = null;
2407
- if (c = s.length && i.length && Nc(l, i, a, s[s.length - 1], 0))
2407
+ if (c = s.length && i.length && Ec(l, i, a, s[s.length - 1], 0))
2408
2408
  s[s.length - 1] = c;
2409
2409
  else {
2410
- s.length && (s[s.length - 1] = Ec(s[s.length - 1], i.length));
2411
- let d = Dc(a, l);
2410
+ s.length && (s[s.length - 1] = Pc(s[s.length - 1], i.length));
2411
+ let d = Nc(a, l);
2412
2412
  s.push(d), o = o.matchType(d.type), i = l;
2413
2413
  }
2414
2414
  }), s)
@@ -2416,24 +2416,24 @@ function Wp(t, e) {
2416
2416
  }
2417
2417
  return t;
2418
2418
  }
2419
- function Dc(t, e, n = 0) {
2419
+ function Nc(t, e, n = 0) {
2420
2420
  for (let r = e.length - 1; r >= n; r--)
2421
2421
  t = e[r].create(null, P.from(t));
2422
2422
  return t;
2423
2423
  }
2424
- function Nc(t, e, n, r, o) {
2424
+ function Ec(t, e, n, r, o) {
2425
2425
  if (o < t.length && o < e.length && t[o] == e[o]) {
2426
- let i = Nc(t, e, n, r.lastChild, o + 1);
2426
+ let i = Ec(t, e, n, r.lastChild, o + 1);
2427
2427
  if (i)
2428
2428
  return r.copy(r.content.replaceChild(r.childCount - 1, i));
2429
2429
  if (r.contentMatchAt(r.childCount).matchType(o == t.length - 1 ? n.type : t[o + 1]))
2430
- return r.copy(r.content.append(P.from(Dc(n, t, o + 1))));
2430
+ return r.copy(r.content.append(P.from(Nc(n, t, o + 1))));
2431
2431
  }
2432
2432
  }
2433
- function Ec(t, e) {
2433
+ function Pc(t, e) {
2434
2434
  if (e == 0)
2435
2435
  return t;
2436
- let n = t.content.replaceChild(t.childCount - 1, Ec(t.lastChild, e - 1)), r = t.contentMatchAt(t.childCount).fillBefore(P.empty, !0);
2436
+ let n = t.content.replaceChild(t.childCount - 1, Pc(t.lastChild, e - 1)), r = t.contentMatchAt(t.childCount).fillBefore(P.empty, !0);
2437
2437
  return t.copy(n.append(r));
2438
2438
  }
2439
2439
  function Ni(t, e, n, r, o, i) {
@@ -2443,7 +2443,7 @@ function Ni(t, e, n, r, o, i) {
2443
2443
  function Ea(t, e, n) {
2444
2444
  return e < t.openStart && (t = new W(Ni(t.content, -1, e, t.openStart, 0, t.openEnd), e, t.openEnd)), n < t.openEnd && (t = new W(Ni(t.content, 1, n, t.openEnd, 0, 0), t.openStart, n)), t;
2445
2445
  }
2446
- const Pc = {
2446
+ const Ic = {
2447
2447
  thead: ["table"],
2448
2448
  tbody: ["table"],
2449
2449
  tfoot: ["table"],
@@ -2455,7 +2455,7 @@ const Pc = {
2455
2455
  th: ["table", "tbody", "tr"]
2456
2456
  };
2457
2457
  let Pa = null;
2458
- function Ic() {
2458
+ function Rc() {
2459
2459
  return Pa || (Pa = document.implementation.createHTMLDocument("title"));
2460
2460
  }
2461
2461
  let ri = null;
@@ -2466,8 +2466,8 @@ function Up(t) {
2466
2466
  function qp(t) {
2467
2467
  let e = /^(\s*<meta [^>]*>)*/.exec(t);
2468
2468
  e && (t = t.slice(e[0].length));
2469
- let n = Ic().createElement("div"), r = /<([a-z][^>\s]+)/i.exec(t), o;
2470
- if ((o = r && Pc[r[1].toLowerCase()]) && (t = o.map((i) => "<" + i + ">").join("") + t + o.map((i) => "</" + i + ">").reverse().join("")), n.innerHTML = Up(t), o)
2469
+ let n = Rc().createElement("div"), r = /<([a-z][^>\s]+)/i.exec(t), o;
2470
+ if ((o = r && Ic[r[1].toLowerCase()]) && (t = o.map((i) => "<" + i + ">").join("") + t + o.map((i) => "</" + i + ">").reverse().join("")), n.innerHTML = Up(t), o)
2471
2471
  for (let i = 0; i < o.length; i++)
2472
2472
  n = n.querySelector(o[i]) || n;
2473
2473
  return n;
@@ -2497,20 +2497,20 @@ function Xp(t, e) {
2497
2497
  }
2498
2498
  return new W(o, i, s);
2499
2499
  }
2500
- const xe = {}, Ae = {}, Jp = { touchstart: !0, touchmove: !0 };
2500
+ const Se = {}, Ae = {}, Jp = { touchstart: !0, touchmove: !0 };
2501
2501
  class Yp {
2502
2502
  constructor() {
2503
2503
  this.shiftKey = !1, this.mouseDown = null, this.lastKeyCode = null, this.lastKeyCodeTime = 0, this.lastClick = { time: 0, x: 0, y: 0, type: "" }, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastIOSEnter = 0, this.lastIOSEnterFallbackTimeout = -1, this.lastFocus = 0, this.lastTouch = 0, this.lastChromeDelete = 0, this.composing = !1, this.compositionNode = null, this.composingTimeout = -1, this.compositionNodes = [], this.compositionEndedAt = -2e8, this.compositionID = 1, this.compositionPendingChanges = 0, this.domChangeCount = 0, this.eventHandlers = /* @__PURE__ */ Object.create(null), this.hideSelectionGuard = null;
2504
2504
  }
2505
2505
  }
2506
2506
  function Gp(t) {
2507
- for (let e in xe) {
2508
- let n = xe[e];
2507
+ for (let e in Se) {
2508
+ let n = Se[e];
2509
2509
  t.dom.addEventListener(e, t.input.eventHandlers[e] = (r) => {
2510
- Qp(t, r) && !Ss(t, r) && (t.editable || !(r.type in Ae)) && n(t, r);
2510
+ Qp(t, r) && !xs(t, r) && (t.editable || !(r.type in Ae)) && n(t, r);
2511
2511
  }, Jp[e] ? { passive: !0 } : void 0);
2512
2512
  }
2513
- Se && t.dom.addEventListener("input", () => null), Ei(t);
2513
+ xe && t.dom.addEventListener("input", () => null), Ei(t);
2514
2514
  }
2515
2515
  function Pt(t, e) {
2516
2516
  t.input.lastSelectionOrigin = e, t.input.lastSelectionTime = Date.now();
@@ -2524,10 +2524,10 @@ function Zp(t) {
2524
2524
  function Ei(t) {
2525
2525
  t.someProp("handleDOMEvents", (e) => {
2526
2526
  for (let n in e)
2527
- t.input.eventHandlers[n] || t.dom.addEventListener(n, t.input.eventHandlers[n] = (r) => Ss(t, r));
2527
+ t.input.eventHandlers[n] || t.dom.addEventListener(n, t.input.eventHandlers[n] = (r) => xs(t, r));
2528
2528
  });
2529
2529
  }
2530
- function Ss(t, e) {
2530
+ function xs(t, e) {
2531
2531
  return t.someProp("handleDOMEvents", (n) => {
2532
2532
  let r = n[e.type];
2533
2533
  return r ? r(t, e) || e.defaultPrevented : !1;
@@ -2544,11 +2544,11 @@ function Qp(t, e) {
2544
2544
  return !0;
2545
2545
  }
2546
2546
  function eh(t, e) {
2547
- !Ss(t, e) && xe[e.type] && (t.editable || !(e.type in Ae)) && xe[e.type](t, e);
2547
+ !xs(t, e) && Se[e.type] && (t.editable || !(e.type in Ae)) && Se[e.type](t, e);
2548
2548
  }
2549
2549
  Ae.keydown = (t, e) => {
2550
2550
  let n = e;
2551
- if (t.input.shiftKey = n.keyCode == 16 || n.shiftKey, !Lc(t, n) && (t.input.lastKeyCode = n.keyCode, t.input.lastKeyCodeTime = Date.now(), !(bt && be && n.keyCode == 13)))
2551
+ if (t.input.shiftKey = n.keyCode == 16 || n.shiftKey, !Fc(t, n) && (t.input.lastKeyCode = n.keyCode, t.input.lastKeyCodeTime = Date.now(), !(bt && be && n.keyCode == 13)))
2552
2552
  if (n.keyCode != 229 && t.domObserver.forceFlush(), Nn && n.keyCode == 13 && !n.ctrlKey && !n.altKey && !n.metaKey) {
2553
2553
  let r = Date.now();
2554
2554
  t.input.lastIOSEnter = r, t.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
@@ -2561,7 +2561,7 @@ Ae.keyup = (t, e) => {
2561
2561
  };
2562
2562
  Ae.keypress = (t, e) => {
2563
2563
  let n = e;
2564
- if (Lc(t, n) || !n.charCode || n.ctrlKey && !n.altKey || ze && n.metaKey)
2564
+ if (Fc(t, n) || !n.charCode || n.ctrlKey && !n.altKey || ze && n.metaKey)
2565
2565
  return;
2566
2566
  if (t.someProp("handleKeyPress", (o) => o(t, n))) {
2567
2567
  n.preventDefault();
@@ -2580,7 +2580,7 @@ function th(t, e) {
2580
2580
  let n = e.x - t.clientX, r = e.y - t.clientY;
2581
2581
  return n * n + r * r < 100;
2582
2582
  }
2583
- function xs(t, e, n, r, o) {
2583
+ function Ss(t, e, n, r, o) {
2584
2584
  if (r == -1)
2585
2585
  return !1;
2586
2586
  let i = t.state.doc.resolve(r);
@@ -2617,13 +2617,13 @@ function rh(t, e) {
2617
2617
  return o != null ? (On(t, B.create(t.state.doc, o)), !0) : !1;
2618
2618
  }
2619
2619
  function oh(t, e, n, r, o) {
2620
- return xs(t, "handleClickOn", e, n, r) || t.someProp("handleClick", (i) => i(t, e, r)) || (o ? rh(t, n) : nh(t, n));
2620
+ return Ss(t, "handleClickOn", e, n, r) || t.someProp("handleClick", (i) => i(t, e, r)) || (o ? rh(t, n) : nh(t, n));
2621
2621
  }
2622
2622
  function ih(t, e, n, r) {
2623
- return xs(t, "handleDoubleClickOn", e, n, r) || t.someProp("handleDoubleClick", (o) => o(t, e, r));
2623
+ return Ss(t, "handleDoubleClickOn", e, n, r) || t.someProp("handleDoubleClick", (o) => o(t, e, r));
2624
2624
  }
2625
2625
  function sh(t, e, n, r) {
2626
- return xs(t, "handleTripleClickOn", e, n, r) || t.someProp("handleTripleClick", (o) => o(t, e, r)) || ah(t, n, r);
2626
+ return Ss(t, "handleTripleClickOn", e, n, r) || t.someProp("handleTripleClick", (o) => o(t, e, r)) || ah(t, n, r);
2627
2627
  }
2628
2628
  function ah(t, e, n) {
2629
2629
  if (n.button != 0)
@@ -2646,18 +2646,18 @@ function ah(t, e, n) {
2646
2646
  function As(t) {
2647
2647
  return bo(t);
2648
2648
  }
2649
- const Rc = ze ? "metaKey" : "ctrlKey";
2650
- xe.mousedown = (t, e) => {
2649
+ const Lc = ze ? "metaKey" : "ctrlKey";
2650
+ Se.mousedown = (t, e) => {
2651
2651
  let n = e;
2652
2652
  t.input.shiftKey = n.shiftKey;
2653
2653
  let r = As(t), o = Date.now(), i = "singleClick";
2654
- o - t.input.lastClick.time < 500 && th(n, t.input.lastClick) && !n[Rc] && (t.input.lastClick.type == "singleClick" ? i = "doubleClick" : t.input.lastClick.type == "doubleClick" && (i = "tripleClick")), t.input.lastClick = { time: o, x: n.clientX, y: n.clientY, type: i };
2654
+ o - t.input.lastClick.time < 500 && th(n, t.input.lastClick) && !n[Lc] && (t.input.lastClick.type == "singleClick" ? i = "doubleClick" : t.input.lastClick.type == "doubleClick" && (i = "tripleClick")), t.input.lastClick = { time: o, x: n.clientX, y: n.clientY, type: i };
2655
2655
  let s = t.posAtCoords(Bo(n));
2656
2656
  s && (i == "singleClick" ? (t.input.mouseDown && t.input.mouseDown.done(), t.input.mouseDown = new lh(t, s, n, !!r)) : (i == "doubleClick" ? ih : sh)(t, s.pos, s.inside, n) ? n.preventDefault() : Pt(t, "pointer"));
2657
2657
  };
2658
2658
  class lh {
2659
2659
  constructor(e, n, r, o) {
2660
- this.view = e, this.pos = n, this.event = r, this.flushed = o, this.delayedSelectionSync = !1, this.mightDrag = null, this.startDoc = e.state.doc, this.selectNode = !!r[Rc], this.allowDefault = r.shiftKey;
2660
+ this.view = e, this.pos = n, this.event = r, this.flushed = o, this.delayedSelectionSync = !1, this.mightDrag = null, this.startDoc = e.state.doc, this.selectNode = !!r[Lc], this.allowDefault = r.shiftKey;
2661
2661
  let i, s;
2662
2662
  if (n.inside > -1)
2663
2663
  i = e.state.doc.nodeAt(n.inside), s = n.inside;
@@ -2685,7 +2685,7 @@ class lh {
2685
2685
  return;
2686
2686
  let n = this.pos;
2687
2687
  this.view.state.doc != this.startDoc && (n = this.view.posAtCoords(Bo(e))), this.updateAllowDefault(e), this.allowDefault || !n ? Pt(this.view, "pointer") : oh(this.view, n.pos, n.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
2688
- Se && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
2688
+ xe && 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
2691
2691
  // situation where clicking at the point where that
@@ -2701,15 +2701,15 @@ class lh {
2701
2701
  !this.allowDefault && (Math.abs(this.event.x - e.clientX) > 4 || Math.abs(this.event.y - e.clientY) > 4) && (this.allowDefault = !0);
2702
2702
  }
2703
2703
  }
2704
- xe.touchstart = (t) => {
2704
+ Se.touchstart = (t) => {
2705
2705
  t.input.lastTouch = Date.now(), As(t), Pt(t, "pointer");
2706
2706
  };
2707
- xe.touchmove = (t) => {
2707
+ Se.touchmove = (t) => {
2708
2708
  t.input.lastTouch = Date.now(), Pt(t, "pointer");
2709
2709
  };
2710
- xe.contextmenu = (t) => As(t);
2711
- function Lc(t, e) {
2712
- return t.composing ? !0 : Se && Math.abs(e.timeStamp - t.input.compositionEndedAt) < 500 ? (t.input.compositionEndedAt = -2e8, !0) : !1;
2710
+ Se.contextmenu = (t) => As(t);
2711
+ function Fc(t, e) {
2712
+ return t.composing ? !0 : xe && Math.abs(e.timeStamp - t.input.compositionEndedAt) < 500 ? (t.input.compositionEndedAt = -2e8, !0) : !1;
2713
2713
  }
2714
2714
  const ch = bt ? 5e3 : -1;
2715
2715
  Ae.compositionstart = Ae.compositionupdate = (t) => {
@@ -2734,15 +2734,15 @@ Ae.compositionstart = Ae.compositionupdate = (t) => {
2734
2734
  }
2735
2735
  t.input.composing = !0;
2736
2736
  }
2737
- Fc(t, ch);
2737
+ Bc(t, ch);
2738
2738
  };
2739
2739
  Ae.compositionend = (t, e) => {
2740
- t.composing && (t.input.composing = !1, t.input.compositionEndedAt = e.timeStamp, t.input.compositionPendingChanges = t.domObserver.pendingRecords().length ? t.input.compositionID : 0, t.input.compositionNode = null, t.input.compositionPendingChanges && Promise.resolve().then(() => t.domObserver.flush()), t.input.compositionID++, Fc(t, 20));
2740
+ t.composing && (t.input.composing = !1, t.input.compositionEndedAt = e.timeStamp, t.input.compositionPendingChanges = t.domObserver.pendingRecords().length ? t.input.compositionID : 0, t.input.compositionNode = null, t.input.compositionPendingChanges && Promise.resolve().then(() => t.domObserver.flush()), t.input.compositionID++, Bc(t, 20));
2741
2741
  };
2742
- function Fc(t, e) {
2742
+ function Bc(t, e) {
2743
2743
  clearTimeout(t.input.composingTimeout), e > -1 && (t.input.composingTimeout = setTimeout(() => bo(t), e));
2744
2744
  }
2745
- function Bc(t) {
2745
+ function zc(t) {
2746
2746
  for (t.composing && (t.input.composing = !1, t.input.compositionEndedAt = uh()); t.input.compositionNodes.length > 0; )
2747
2747
  t.input.compositionNodes.pop().markParentsDirty();
2748
2748
  }
@@ -2771,7 +2771,7 @@ function uh() {
2771
2771
  }
2772
2772
  function bo(t, e = !1) {
2773
2773
  if (!(bt && t.domObserver.flushingSoon >= 0)) {
2774
- if (t.domObserver.forceFlush(), Bc(t), e || t.docView && t.docView.dirty) {
2774
+ if (t.domObserver.forceFlush(), zc(t), e || t.docView && t.docView.dirty) {
2775
2775
  let n = ks(t);
2776
2776
  return n && !n.eq(t.state.selection) ? t.dispatch(t.state.tr.setSelection(n)) : (t.markCursor || e) && !t.state.selection.empty ? t.dispatch(t.state.tr.deleteSelection()) : t.updateState(t.state), !0;
2777
2777
  }
@@ -2789,7 +2789,7 @@ function fh(t, e) {
2789
2789
  }, 50);
2790
2790
  }
2791
2791
  const fr = Te && Lt < 15 || Nn && lp < 604;
2792
- xe.copy = Ae.cut = (t, e) => {
2792
+ Se.copy = Ae.cut = (t, e) => {
2793
2793
  let n = e, r = t.state.selection, o = n.type == "cut";
2794
2794
  if (r.empty)
2795
2795
  return;
@@ -2810,7 +2810,7 @@ function hh(t, e) {
2810
2810
  }, 50);
2811
2811
  }
2812
2812
  function pr(t, e, n, r, o) {
2813
- let i = Tc(t, e, n, r, t.state.selection.$from);
2813
+ let i = Dc(t, e, n, r, t.state.selection.$from);
2814
2814
  if (t.someProp("handlePaste", (l) => l(t, o, i || W.empty)))
2815
2815
  return !0;
2816
2816
  if (!i)
@@ -2818,7 +2818,7 @@ function pr(t, e, n, r, o) {
2818
2818
  let s = ph(i), a = s ? t.state.tr.replaceSelectionWith(s, r) : t.state.tr.replaceSelection(i);
2819
2819
  return t.dispatch(a.scrollIntoView().setMeta("paste", !0).setMeta("uiEvent", "paste")), !0;
2820
2820
  }
2821
- function zc(t) {
2821
+ function _c(t) {
2822
2822
  let e = t.getData("text/plain") || t.getData("Text");
2823
2823
  if (e)
2824
2824
  return e;
@@ -2830,19 +2830,19 @@ Ae.paste = (t, e) => {
2830
2830
  if (t.composing && !bt)
2831
2831
  return;
2832
2832
  let r = fr ? null : n.clipboardData, o = t.input.shiftKey && t.input.lastKeyCode != 45;
2833
- r && pr(t, zc(r), r.getData("text/html"), o, n) ? n.preventDefault() : hh(t, n);
2833
+ r && pr(t, _c(r), r.getData("text/html"), o, n) ? n.preventDefault() : hh(t, n);
2834
2834
  };
2835
- class _c {
2835
+ class $c {
2836
2836
  constructor(e, n, r) {
2837
2837
  this.slice = e, this.move = n, this.node = r;
2838
2838
  }
2839
2839
  }
2840
2840
  const mh = ze ? "altKey" : "ctrlKey";
2841
- function $c(t, e) {
2841
+ function Vc(t, e) {
2842
2842
  let n = t.someProp("dragCopies", (r) => !r(e));
2843
2843
  return n ?? !e[mh];
2844
2844
  }
2845
- xe.dragstart = (t, e) => {
2845
+ Se.dragstart = (t, e) => {
2846
2846
  let n = e, r = t.input.mouseDown;
2847
2847
  if (r && r.done(), !n.dataTransfer)
2848
2848
  return;
@@ -2856,9 +2856,9 @@ xe.dragstart = (t, e) => {
2856
2856
  }
2857
2857
  }
2858
2858
  let a = (s || t.state.selection).content(), { dom: l, text: c, slice: d } = Ms(t, a);
2859
- (!n.dataTransfer.files.length || !be || fc > 120) && n.dataTransfer.clearData(), n.dataTransfer.setData(fr ? "Text" : "text/html", l.innerHTML), n.dataTransfer.effectAllowed = "copyMove", fr || n.dataTransfer.setData("text/plain", c), t.dragging = new _c(d, $c(t, n), s);
2859
+ (!n.dataTransfer.files.length || !be || pc > 120) && n.dataTransfer.clearData(), n.dataTransfer.setData(fr ? "Text" : "text/html", l.innerHTML), n.dataTransfer.effectAllowed = "copyMove", fr || n.dataTransfer.setData("text/plain", c), t.dragging = new $c(d, Vc(t, n), s);
2860
2860
  };
2861
- xe.dragend = (t) => {
2861
+ Se.dragend = (t) => {
2862
2862
  let e = t.dragging;
2863
2863
  window.setTimeout(() => {
2864
2864
  t.dragging == e && (t.dragging = null);
@@ -2875,8 +2875,8 @@ Ae.drop = (t, e) => {
2875
2875
  let i = t.state.doc.resolve(o.pos), s = r && r.slice;
2876
2876
  s ? t.someProp("transformPasted", (h) => {
2877
2877
  s = h(s, t);
2878
- }) : s = Tc(t, zc(n.dataTransfer), fr ? null : n.dataTransfer.getData("text/html"), !1, i);
2879
- let a = !!(r && $c(t, n));
2878
+ }) : s = Dc(t, _c(n.dataTransfer), fr ? null : n.dataTransfer.getData("text/html"), !1, i);
2879
+ let a = !!(r && Vc(t, n));
2880
2880
  if (t.someProp("handleDrop", (h) => h(t, n, s || W.empty, a))) {
2881
2881
  n.preventDefault();
2882
2882
  return;
@@ -2903,16 +2903,16 @@ Ae.drop = (t, e) => {
2903
2903
  }
2904
2904
  t.focus(), t.dispatch(c.setMeta("uiEvent", "drop"));
2905
2905
  };
2906
- xe.focus = (t) => {
2906
+ Se.focus = (t) => {
2907
2907
  t.input.lastFocus = Date.now(), t.focused || (t.domObserver.stop(), t.dom.classList.add("ProseMirror-focused"), t.domObserver.start(), t.focused = !0, setTimeout(() => {
2908
2908
  t.docView && t.hasFocus() && !t.domObserver.currentSelection.eq(t.domSelectionRange()) && kt(t);
2909
2909
  }, 20));
2910
2910
  };
2911
- xe.blur = (t, e) => {
2911
+ Se.blur = (t, e) => {
2912
2912
  let n = e;
2913
2913
  t.focused && (t.domObserver.stop(), t.dom.classList.remove("ProseMirror-focused"), t.domObserver.start(), n.relatedTarget && t.dom.contains(n.relatedTarget) && t.domObserver.currentSelection.clear(), t.focused = !1);
2914
2914
  };
2915
- xe.beforeinput = (t, e) => {
2915
+ Se.beforeinput = (t, e) => {
2916
2916
  if (be && bt && e.inputType == "deleteContentBackward") {
2917
2917
  t.domObserver.flushSoon();
2918
2918
  let { domChangeCount: r } = t.input;
@@ -2925,7 +2925,7 @@ xe.beforeinput = (t, e) => {
2925
2925
  }
2926
2926
  };
2927
2927
  for (let t in Ae)
2928
- xe[t] = Ae[t];
2928
+ Se[t] = Ae[t];
2929
2929
  function hr(t, e) {
2930
2930
  if (t == e)
2931
2931
  return !0;
@@ -3067,13 +3067,13 @@ class $ {
3067
3067
  return this.type instanceof wo;
3068
3068
  }
3069
3069
  }
3070
- const Sn = [], nn = {};
3070
+ const xn = [], nn = {};
3071
3071
  class L {
3072
3072
  /**
3073
3073
  @internal
3074
3074
  */
3075
3075
  constructor(e, n) {
3076
- this.local = e.length ? e : Sn, this.children = n.length ? n : Sn;
3076
+ this.local = e.length ? e : xn, this.children = n.length ? n : xn;
3077
3077
  }
3078
3078
  /**
3079
3079
  Create a set of decorations, using the structure of the given
@@ -3122,7 +3122,7 @@ class L {
3122
3122
  let l = this.local[a].map(e, r, o);
3123
3123
  l && l.type.valid(n, l) ? (s || (s = [])).push(l) : i.onRemove && i.onRemove(this.local[a].spec);
3124
3124
  }
3125
- return this.children.length ? gh(this.children, s || [], e, n, r, o, i) : s ? new L(s.sort(rn), Sn) : ye;
3125
+ return this.children.length ? gh(this.children, s || [], e, n, r, o, i) : s ? new L(s.sort(rn), xn) : ye;
3126
3126
  }
3127
3127
  /**
3128
3128
  Add the given array of decorations to the ones in the set,
@@ -3137,13 +3137,13 @@ class L {
3137
3137
  let o, i = 0;
3138
3138
  e.forEach((a, l) => {
3139
3139
  let c = l + r, d;
3140
- if (d = Hc(n, a, c)) {
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
3143
  o[i] == l ? o[i + 2] = o[i + 2].addInner(a, d, c + 1) : o.splice(i, 0, l, l + a.nodeSize, vo(d, a, c + 1, nn)), i += 3;
3144
3144
  }
3145
3145
  });
3146
- let s = Vc(i ? jc(n) : n, -r);
3146
+ let s = Hc(i ? Wc(n) : n, -r);
3147
3147
  for (let a = 0; a < s.length; a++)
3148
3148
  s[a].type.valid(e, s[a]) || s.splice(a--, 1);
3149
3149
  return new L(s.length ? this.local.concat(s).sort(rn) : this.local, o || this.children);
@@ -3195,7 +3195,7 @@ class L {
3195
3195
  }
3196
3196
  }
3197
3197
  if (o) {
3198
- let a = new L(o.sort(rn), Sn);
3198
+ let a = new L(o.sort(rn), xn);
3199
3199
  return r ? new Nt([a, r]) : a;
3200
3200
  }
3201
3201
  return r || ye;
@@ -3227,7 +3227,7 @@ class L {
3227
3227
  */
3228
3228
  localsInner(e) {
3229
3229
  if (this == ye)
3230
- return Sn;
3230
+ return xn;
3231
3231
  if (e.inlineContent || !this.local.some(Bt.is))
3232
3232
  return this.local;
3233
3233
  let n = [];
@@ -3281,7 +3281,7 @@ class Nt {
3281
3281
  n.push(i[s]);
3282
3282
  }
3283
3283
  }
3284
- return n ? Ts(r ? n : n.sort(rn)) : Sn;
3284
+ return n ? Ts(r ? n : n.sort(rn)) : xn;
3285
3285
  }
3286
3286
  // Create a group for the given array of decoration sets, or return
3287
3287
  // a single set when possible.
@@ -3349,7 +3349,7 @@ function gh(t, e, n, r, o, i, s) {
3349
3349
  }
3350
3350
  return new L(e.sort(rn), a);
3351
3351
  }
3352
- function Vc(t, e) {
3352
+ function Hc(t, e) {
3353
3353
  if (!e || !t.length)
3354
3354
  return t;
3355
3355
  let n = [];
@@ -3372,7 +3372,7 @@ function yh(t, e, n, r, o, i, s) {
3372
3372
  t[l + 1] == -1 && a(t[l + 2], e[l] + i + 1);
3373
3373
  return n;
3374
3374
  }
3375
- function Hc(t, e, n) {
3375
+ function jc(t, e, n) {
3376
3376
  if (e.isLeaf)
3377
3377
  return null;
3378
3378
  let r = n + e.nodeSize, o = null;
@@ -3380,7 +3380,7 @@ function Hc(t, e, n) {
3380
3380
  (s = t[i]) && s.from > n && s.to < r && ((o || (o = [])).push(s), t[i] = null);
3381
3381
  return o;
3382
3382
  }
3383
- function jc(t) {
3383
+ function Wc(t) {
3384
3384
  let e = [];
3385
3385
  for (let n = 0; n < t.length; n++)
3386
3386
  t[n] != null && e.push(t[n]);
@@ -3389,14 +3389,14 @@ function jc(t) {
3389
3389
  function vo(t, e, n, r) {
3390
3390
  let o = [], i = !1;
3391
3391
  e.forEach((a, l) => {
3392
- let c = Hc(t, a, l + n);
3392
+ let c = jc(t, a, l + n);
3393
3393
  if (c) {
3394
3394
  i = !0;
3395
3395
  let d = vo(c, a, n + l + 1, r);
3396
3396
  d != ye && o.push(l, l + a.nodeSize, d);
3397
3397
  }
3398
3398
  });
3399
- let s = Vc(i ? jc(t) : t, -n).sort(rn);
3399
+ let s = Hc(i ? Wc(t) : t, -n).sort(rn);
3400
3400
  for (let a = 0; a < s.length; a++)
3401
3401
  s[a].type.valid(e, s[a]) || (r.onRemove && r.onRemove(s[a].spec), s.splice(a--, 1));
3402
3402
  return s.length || o.length ? new L(s, o) : ye;
@@ -3499,7 +3499,7 @@ class kh {
3499
3499
  this.suppressingSelectionUpdates = !0, setTimeout(() => this.suppressingSelectionUpdates = !1, 50);
3500
3500
  }
3501
3501
  onSelectionChange() {
3502
- if (xa(this.view)) {
3502
+ if (Sa(this.view)) {
3503
3503
  if (this.suppressingSelectionUpdates)
3504
3504
  return kt(this.view);
3505
3505
  if (Te && Lt <= 11 && !this.view.state.selection.empty) {
@@ -3543,7 +3543,7 @@ class kh {
3543
3543
  return;
3544
3544
  let n = this.pendingRecords();
3545
3545
  n.length && (this.queue = []);
3546
- let r = e.domSelectionRange(), o = !this.suppressingSelectionUpdates && !this.currentSelection.eq(r) && xa(e) && !this.ignoreSelectionChange(r), i = -1, s = -1, a = !1, l = [];
3546
+ let r = e.domSelectionRange(), o = !this.suppressingSelectionUpdates && !this.currentSelection.eq(r) && Sa(e) && !this.ignoreSelectionChange(r), i = -1, s = -1, a = !1, l = [];
3547
3547
  if (e.editable)
3548
3548
  for (let d = 0; d < n.length; d++) {
3549
3549
  let u = this.registerMutation(n[d], l);
@@ -3558,7 +3558,7 @@ class kh {
3558
3558
  let { focusNode: u } = this.currentSelection;
3559
3559
  for (let f of d) {
3560
3560
  let p = f.parentNode;
3561
- p && p.nodeName == "LI" && (!u || Sh(e, u) != p) && f.remove();
3561
+ p && p.nodeName == "LI" && (!u || xh(e, u) != p) && f.remove();
3562
3562
  }
3563
3563
  }
3564
3564
  }
@@ -3622,7 +3622,7 @@ function Mh(t, e) {
3622
3622
  }
3623
3623
  return t.dom.addEventListener("beforeinput", r, !0), document.execCommand("indent"), t.dom.removeEventListener("beforeinput", r, !0), n ? Fa(t, n) : null;
3624
3624
  }
3625
- function Sh(t, e) {
3625
+ function xh(t, e) {
3626
3626
  for (let n = e.parentNode; n && n != t.dom; n = n.parentNode) {
3627
3627
  let r = t.docView.nearestDesc(n, !0);
3628
3628
  if (r && r.node.isBlock)
@@ -3630,7 +3630,7 @@ function Sh(t, e) {
3630
3630
  }
3631
3631
  return null;
3632
3632
  }
3633
- function xh(t, e, n) {
3633
+ function Sh(t, e, n) {
3634
3634
  let { node: r, fromOffset: o, toOffset: i, from: s, to: a } = t.docView.parseRange(e, n), l = t.domSelectionRange(), c, d = l.anchorNode;
3635
3635
  if (d && t.dom.contains(d.nodeType == 1 ? d : d.parentNode) && (c = [{ node: d, offset: l.anchorOffset }], Lo(l) || c.push({ node: l.focusNode, offset: l.focusOffset })), be && t.input.lastKeyCode === 8)
3636
3636
  for (let g = i; g > o; g--) {
@@ -3664,10 +3664,10 @@ function Ah(t) {
3664
3664
  if (e)
3665
3665
  return e.parseRule();
3666
3666
  if (t.nodeName == "BR" && t.parentNode) {
3667
- if (Se && /^(ul|ol)$/i.test(t.parentNode.nodeName)) {
3667
+ if (xe && /^(ul|ol)$/i.test(t.parentNode.nodeName)) {
3668
3668
  let n = document.createElement("div");
3669
3669
  return n.appendChild(document.createElement("li")), { skip: n };
3670
- } else if (t.parentNode.lastChild == t || Se && /^(tr|table)$/i.test(t.parentNode.nodeName))
3670
+ } else if (t.parentNode.lastChild == t || xe && /^(tr|table)$/i.test(t.parentNode.nodeName))
3671
3671
  return { ignore: !0 };
3672
3672
  } else if (t.nodeName == "IMG" && t.getAttribute("mark-placeholder"))
3673
3673
  return { ignore: !0 };
@@ -3677,21 +3677,21 @@ const Oh = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|df
3677
3677
  function Th(t, e, n, r, o) {
3678
3678
  let i = t.input.compositionPendingChanges || (t.composing ? t.input.compositionID : 0);
3679
3679
  if (t.input.compositionPendingChanges = 0, e < 0) {
3680
- let S = t.input.lastSelectionTime > Date.now() - 50 ? t.input.lastSelectionOrigin : null, V = ks(t, S);
3680
+ let x = t.input.lastSelectionTime > Date.now() - 50 ? t.input.lastSelectionOrigin : null, V = ks(t, x);
3681
3681
  if (V && !t.state.selection.eq(V)) {
3682
3682
  if (be && bt && t.input.lastKeyCode === 13 && Date.now() - 100 < t.input.lastKeyCodeTime && t.someProp("handleKeyDown", (_) => _(t, Gt(13, "Enter"))))
3683
3683
  return;
3684
3684
  let z = t.state.tr.setSelection(V);
3685
- S == "pointer" ? z.setMeta("pointer", !0) : S == "key" && z.scrollIntoView(), i && z.setMeta("composition", i), t.dispatch(z);
3685
+ x == "pointer" ? z.setMeta("pointer", !0) : x == "key" && z.scrollIntoView(), i && z.setMeta("composition", i), t.dispatch(z);
3686
3686
  }
3687
3687
  return;
3688
3688
  }
3689
3689
  let s = t.state.doc.resolve(e), a = s.sharedDepth(n);
3690
3690
  e = s.before(a + 1), n = t.state.doc.resolve(n).after(a + 1);
3691
- let l = t.state.selection, c = xh(t, e, n), d = t.state.doc, u = d.slice(c.from, c.to), f, p;
3691
+ let l = t.state.selection, c = Sh(t, e, n), d = t.state.doc, u = d.slice(c.from, c.to), f, p;
3692
3692
  t.input.lastKeyCode === 8 && Date.now() - 100 < t.input.lastKeyCodeTime ? (f = t.state.selection.to, p = "end") : (f = t.state.selection.from, p = "start"), t.input.lastKeyCode = null;
3693
3693
  let h = Eh(u.content, c.doc.content, c.from, f, p);
3694
- if (h && t.input.domChangeCount++, (Nn && t.input.lastIOSEnter > Date.now() - 225 || bt) && o.some((S) => S.nodeType == 1 && !Oh.test(S.nodeName)) && (!h || h.endA >= h.endB) && t.someProp("handleKeyDown", (S) => S(t, Gt(13, "Enter")))) {
3694
+ if (h && t.input.domChangeCount++, (Nn && t.input.lastIOSEnter > Date.now() - 225 || bt) && o.some((x) => x.nodeType == 1 && !Oh.test(x.nodeName)) && (!h || h.endA >= h.endB) && t.someProp("handleKeyDown", (x) => x(t, Gt(13, "Enter")))) {
3695
3695
  t.input.lastIOSEnter = 0;
3696
3696
  return;
3697
3697
  }
@@ -3700,9 +3700,9 @@ function Th(t, e, n, r, o) {
3700
3700
  h = { start: l.from, endA: l.to, endB: l.to };
3701
3701
  else {
3702
3702
  if (c.sel) {
3703
- let S = Ba(t, t.state.doc, c.sel);
3704
- if (S && !S.eq(t.state.selection)) {
3705
- let V = t.state.tr.setSelection(S);
3703
+ let x = Ba(t, t.state.doc, c.sel);
3704
+ if (x && !x.eq(t.state.selection)) {
3705
+ let V = t.state.tr.setSelection(x);
3706
3706
  i && V.setMeta("composition", i), t.dispatch(V);
3707
3707
  }
3708
3708
  }
@@ -3710,17 +3710,17 @@ function Th(t, e, n, r, o) {
3710
3710
  }
3711
3711
  t.state.selection.from < t.state.selection.to && h.start == h.endB && t.state.selection instanceof j && (h.start > t.state.selection.from && h.start <= t.state.selection.from + 2 && t.state.selection.from >= c.from ? h.start = t.state.selection.from : h.endA < t.state.selection.to && h.endA >= t.state.selection.to - 2 && t.state.selection.to <= c.to && (h.endB += t.state.selection.to - h.endA, h.endA = t.state.selection.to)), Te && Lt <= 11 && h.endB == h.start + 1 && h.endA == h.start && h.start > c.from && c.doc.textBetween(h.start - c.from - 1, h.start - c.from + 1) == "  " && (h.start--, h.endA--, h.endB--);
3712
3712
  let m = c.doc.resolveNoCache(h.start - c.from), g = c.doc.resolveNoCache(h.endB - c.from), b = d.resolve(h.start), w = m.sameParent(g) && m.parent.inlineContent && b.end() >= h.endA, C;
3713
- if ((Nn && t.input.lastIOSEnter > Date.now() - 225 && (!w || o.some((S) => S.nodeName == "DIV" || S.nodeName == "P")) || !w && m.pos < c.doc.content.size && (!m.sameParent(g) || !m.parent.inlineContent) && (C = Z.findFrom(c.doc.resolve(m.pos + 1), 1, !0)) && C.head > m.pos) && t.someProp("handleKeyDown", (S) => S(t, Gt(13, "Enter")))) {
3713
+ if ((Nn && t.input.lastIOSEnter > Date.now() - 225 && (!w || o.some((x) => x.nodeName == "DIV" || x.nodeName == "P")) || !w && m.pos < c.doc.content.size && (!m.sameParent(g) || !m.parent.inlineContent) && (C = Z.findFrom(c.doc.resolve(m.pos + 1), 1, !0)) && C.head > m.pos) && t.someProp("handleKeyDown", (x) => x(t, Gt(13, "Enter")))) {
3714
3714
  t.input.lastIOSEnter = 0;
3715
3715
  return;
3716
3716
  }
3717
- if (t.state.selection.anchor > h.start && Nh(d, h.start, h.endA, m, g) && t.someProp("handleKeyDown", (S) => S(t, Gt(8, "Backspace")))) {
3717
+ if (t.state.selection.anchor > h.start && Nh(d, h.start, h.endA, m, g) && t.someProp("handleKeyDown", (x) => x(t, Gt(8, "Backspace")))) {
3718
3718
  bt && be && t.domObserver.suppressSelectionUpdates();
3719
3719
  return;
3720
3720
  }
3721
3721
  be && h.endB == h.start && (t.input.lastChromeDelete = Date.now()), bt && !w && m.start() != g.start() && g.parentOffset == 0 && m.depth == g.depth && c.sel && c.sel.anchor == c.sel.head && c.sel.head == h.endA && (h.endB -= 2, g = c.doc.resolveNoCache(h.endB - c.from), setTimeout(() => {
3722
- t.someProp("handleKeyDown", function(S) {
3723
- return S(t, Gt(13, "Enter"));
3722
+ t.someProp("handleKeyDown", function(x) {
3723
+ return x(t, Gt(13, "Enter"));
3724
3724
  });
3725
3725
  }, 20));
3726
3726
  let y = h.start, M = h.endA, k, A, F;
@@ -3733,15 +3733,15 @@ function Th(t, e, n, r, o) {
3733
3733
  )
3734
3734
  k = t.state.tr, F.type == "add" ? k.addMark(y, M, F.mark) : k.removeMark(y, M, F.mark);
3735
3735
  else if (m.parent.child(m.index()).isText && m.index() == g.index() - (g.textOffset ? 0 : 1)) {
3736
- let S = m.parent.textBetween(m.parentOffset, g.parentOffset);
3737
- if (t.someProp("handleTextInput", (V) => V(t, y, M, S)))
3736
+ let x = m.parent.textBetween(m.parentOffset, g.parentOffset);
3737
+ if (t.someProp("handleTextInput", (V) => V(t, y, M, x)))
3738
3738
  return;
3739
- k = t.state.tr.insertText(S, y, M);
3739
+ k = t.state.tr.insertText(x, y, M);
3740
3740
  }
3741
3741
  }
3742
3742
  if (k || (k = t.state.tr.replace(y, M, c.doc.slice(h.start - c.from, h.endB - c.from))), c.sel) {
3743
- let S = Ba(t, k.doc, c.sel);
3744
- S && !(be && t.composing && S.empty && (h.start != h.endB || t.input.lastChromeDelete < Date.now() - 100) && (S.head == y || S.head == k.mapping.map(M) - 1) || Te && S.empty && S.head == y) && k.setSelection(S);
3743
+ let x = Ba(t, k.doc, c.sel);
3744
+ x && !(be && t.composing && x.empty && (h.start != h.endB || t.input.lastChromeDelete < Date.now() - 100) && (x.head == y || x.head == k.mapping.map(M) - 1) || Te && x.empty && x.head == y) && k.setSelection(x);
3745
3745
  }
3746
3746
  A && k.ensureMarks(A), i && k.setMeta("composition", i), t.dispatch(k.scrollIntoView());
3747
3747
  }
@@ -3818,7 +3818,7 @@ function za(t) {
3818
3818
  let e = t.charCodeAt(0), n = t.charCodeAt(1);
3819
3819
  return e >= 56320 && e <= 57343 && n >= 55296 && n <= 56319;
3820
3820
  }
3821
- class Wc {
3821
+ class Uc {
3822
3822
  /**
3823
3823
  Create a view. `place` may be a DOM node that the editor should
3824
3824
  be appended to, a function that will place it into the document,
@@ -3883,7 +3883,7 @@ class Wc {
3883
3883
  updateStateInner(e, n) {
3884
3884
  var r;
3885
3885
  let o = this.state, i = !1, s = !1;
3886
- e.storedMarks && this.composing && (Bc(this), s = !0), this.state = e;
3886
+ e.storedMarks && this.composing && (zc(this), s = !0), this.state = e;
3887
3887
  let a = o.plugins != e.plugins || this._props.plugins != n.plugins;
3888
3888
  if (a || this._props.plugins != n.plugins || this._props.nodeViews != n.nodeViews) {
3889
3889
  let p = Ha(this);
@@ -3900,7 +3900,7 @@ class Wc {
3900
3900
  let h = be ? this.trackWrites = this.domSelectionRange().focusNode : null;
3901
3901
  this.composing && (this.input.compositionNode = dh(this)), (i || !this.docView.update(e.doc, c, l, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = wa(e.doc, c, l, this.dom, this)), h && !this.trackWrites && (p = !0);
3902
3902
  }
3903
- p || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && Lp(this)) ? kt(this, p) : (xc(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
3903
+ p || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && Lp(this)) ? kt(this, p) : (Ac(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
3904
3904
  }
3905
3905
  this.updatePluginViews(o), !((r = this.dragging) === null || r === void 0) && r.node && !o.doc.eq(e.doc) && this.updateDraggedNode(this.dragging, o), d == "reset" ? this.dom.scrollTop = 0 : d == "to selection" ? this.scrollToSelection() : f && fp(f);
3906
3906
  }
@@ -3947,7 +3947,7 @@ class Wc {
3947
3947
  let i = r.from + (this.state.doc.content.size - n.doc.content.size);
3948
3948
  (i > 0 && this.state.doc.nodeAt(i)) == r.node && (o = i);
3949
3949
  }
3950
- this.dragging = new _c(e.slice, e.move, o < 0 ? void 0 : B.create(this.state.doc, o));
3950
+ this.dragging = new $c(e.slice, e.move, o < 0 ? void 0 : B.create(this.state.doc, o));
3951
3951
  }
3952
3952
  someProp(e, n) {
3953
3953
  let r = this._props && this._props[e], o;
@@ -4034,7 +4034,7 @@ class Wc {
4034
4034
  otherwise the element after.
4035
4035
  */
4036
4036
  coordsAtPos(e, n = 1) {
4037
- return yc(this, e, n);
4037
+ return bc(this, e, n);
4038
4038
  }
4039
4039
  /**
4040
4040
  Find the DOM position that corresponds to the given document
@@ -4154,7 +4154,7 @@ class Wc {
4154
4154
  */
4155
4155
  domSelectionRange() {
4156
4156
  let e = this.domSelection();
4157
- return e ? Se && this.root.nodeType === 11 && ip(this.dom.ownerDocument) == this.dom && Mh(this, e) || e : { focusNode: null, focusOffset: 0, anchorNode: null, anchorOffset: 0 };
4157
+ return e ? xe && this.root.nodeType === 11 && ip(this.dom.ownerDocument) == this.dom && Mh(this, e) || e : { focusNode: null, focusOffset: 0, anchorNode: null, anchorOffset: 0 };
4158
4158
  }
4159
4159
  /**
4160
4160
  @internal
@@ -4262,7 +4262,7 @@ const Gh = () => new Yh(), Zh = (t) => {
4262
4262
  for (let r = 0; r < n; r++)
4263
4263
  pe(t, Pi[r]);
4264
4264
  } else
4265
- Uc(t, Jh(e));
4265
+ qc(t, Jh(e));
4266
4266
  }, im = (t, e) => {
4267
4267
  const n = unescape(encodeURIComponent(e)), r = n.length;
4268
4268
  br(t, r);
@@ -4276,7 +4276,7 @@ const Gh = () => new Yh(), Zh = (t) => {
4276
4276
  yr.encodeInto ? om : im, sm = (t, e) => {
4277
4277
  const n = t.cbuf.length, r = t.cpos, o = zt(n - r, e.length), i = e.length - o;
4278
4278
  t.cbuf.set(e.subarray(0, o), r), t.cpos += o, i > 0 && (t.bufs.push(t.cbuf), t.cbuf = new Uint8Array(En(n * 2, i)), t.cbuf.set(e.subarray(o)), t.cpos = i);
4279
- }, Uc = (t, e) => {
4279
+ }, qc = (t, e) => {
4280
4280
  br(t, e.byteLength), sm(t, e);
4281
4281
  }, Ds = (t, e) => {
4282
4282
  tm(t, e);
@@ -4304,7 +4304,7 @@ yr.encodeInto ? om : im, sm = (t, e) => {
4304
4304
  for (let n = 0; n < e.length; n++)
4305
4305
  Ii(t, e[n]);
4306
4306
  } else if (e instanceof Uint8Array)
4307
- pe(t, 116), Uc(t, e);
4307
+ pe(t, 116), qc(t, e);
4308
4308
  else {
4309
4309
  pe(t, 118);
4310
4310
  const n = Object.keys(e);
@@ -4321,11 +4321,11 @@ yr.encodeInto ? om : im, sm = (t, e) => {
4321
4321
  default:
4322
4322
  pe(t, 127);
4323
4323
  }
4324
- }, qc = (t) => new Error(t), um = () => {
4325
- throw qc("Method unimplemented");
4326
- }, Kc = () => {
4327
- throw qc("Unexpected case");
4328
- }, so = () => /* @__PURE__ */ new Map(), Xc = (t, e, n) => {
4324
+ }, Kc = (t) => new Error(t), um = () => {
4325
+ throw Kc("Method unimplemented");
4326
+ }, Xc = () => {
4327
+ throw Kc("Unexpected case");
4328
+ }, so = () => /* @__PURE__ */ new Map(), Jc = (t, e, n) => {
4329
4329
  let r = t.get(e);
4330
4330
  return r === void 0 && t.set(e, r = n()), r;
4331
4331
  }, fm = Object.keys, pm = (t, e) => {
@@ -4375,14 +4375,14 @@ class Cm {
4375
4375
  return this.map.get(e);
4376
4376
  }
4377
4377
  }
4378
- let Jc = new Cm(), Mm = !0;
4378
+ let Yc = new Cm(), Mm = !0;
4379
4379
  try {
4380
- typeof localStorage < "u" && localStorage && (Jc = localStorage, Mm = !1);
4380
+ typeof localStorage < "u" && localStorage && (Yc = localStorage, Mm = !1);
4381
4381
  } catch {
4382
4382
  }
4383
- const Sm = Jc, Pn = typeof ie < "u" && ie.release && /node|io\.js/.test(ie.release.name) && Object.prototype.toString.call(typeof ie < "u" ? ie : 0) === "[object process]", Yc = typeof window < "u" && typeof document < "u" && !Pn;
4383
+ const xm = Yc, Pn = typeof ie < "u" && ie.release && /node|io\.js/.test(ie.release.name) && Object.prototype.toString.call(typeof ie < "u" ? ie : 0) === "[object process]", Gc = typeof window < "u" && typeof document < "u" && !Pn;
4384
4384
  let Ze;
4385
- const xm = () => {
4385
+ const Sm = () => {
4386
4386
  if (Ze === void 0)
4387
4387
  if (Pn) {
4388
4388
  Ze = so();
@@ -4400,11 +4400,11 @@ const xm = () => {
4400
4400
  }
4401
4401
  })) : Ze = so();
4402
4402
  return Ze;
4403
- }, Ri = (t) => xm().has(t), Li = (t) => Xa(Pn ? ie.env[t.toUpperCase().replaceAll("-", "_")] : Sm.getItem(t)), Gc = (t) => Ri("--" + t) || Li(t) !== null;
4404
- Gc("production");
4403
+ }, Ri = (t) => Sm().has(t), Li = (t) => Xa(Pn ? ie.env[t.toUpperCase().replaceAll("-", "_")] : xm.getItem(t)), Zc = (t) => Ri("--" + t) || Li(t) !== null;
4404
+ Zc("production");
4405
4405
  const Am = Pn && hm(ie.env.FORCE_COLOR, ["true", "1", "2"]);
4406
4406
  Am || !Ri("--no-colors") && // @todo deprecate --no-colors
4407
- !Gc("no-color") && (!Pn || ie.stdout.isTTY) && (!Pn || Ri("--color") || Li("COLORTERM") !== null || (Li("TERM") || "").includes("color"));
4407
+ !Zc("no-color") && (!Pn || ie.stdout.isTTY) && (!Pn || Ri("--color") || Li("COLORTERM") !== null || (Li("TERM") || "").includes("color"));
4408
4408
  const Om = (
4409
4409
  /** @type {Document} */
4410
4410
  typeof document < "u" ? document : {}
@@ -4546,7 +4546,7 @@ const Bm = (t) => new Fm().digest(t), zm = (t) => {
4546
4546
  for (let n = 0; n < t.byteLength; n++)
4547
4547
  e += Hh(t[n]);
4548
4548
  return btoa(e);
4549
- }, _m = (t) => Af.from(t.buffer, t.byteOffset, t.byteLength).toString("base64"), $m = Yc ? zm : _m, Vm = (t) => Zh((e) => Ii(e, t)), Hm = (t) => {
4549
+ }, _m = (t) => Of.from(t.buffer, t.byteOffset, t.byteLength).toString("base64"), $m = Gc ? zm : _m, Vm = (t) => Zh((e) => Ii(e, t)), Hm = (t) => {
4550
4550
  for (let n = 6; n < t.length; n++)
4551
4551
  t[n % 6] = t[n % 6] ^ t[n];
4552
4552
  return t.slice(0, 6);
@@ -4708,7 +4708,7 @@ class Jm {
4708
4708
  return this.prosemirrorView.state.tr.setMeta("addToHistory", !1);
4709
4709
  }
4710
4710
  _isLocalCursorInView() {
4711
- return this.prosemirrorView.hasFocus() ? (Yc && this._domSelectionInView === null && (Ns(0, () => {
4711
+ return this.prosemirrorView.hasFocus() ? (Gc && this._domSelectionInView === null && (Ns(0, () => {
4712
4712
  this._domSelectionInView = null;
4713
4713
  }), this._domSelectionInView = this._isDomSelectionInView()), this._domSelectionInView) : !1;
4714
4714
  }
@@ -4777,7 +4777,7 @@ class Jm {
4777
4777
  _renderSnapshot(e, n, r) {
4778
4778
  let o = this.doc, i = this.type;
4779
4779
  if (e || (e = T.snapshot(this.doc)), e instanceof Uint8Array || n instanceof Uint8Array)
4780
- if ((!(e instanceof Uint8Array) || !(n instanceof Uint8Array)) && Kc(), o = new T.Doc({ gc: !1 }), T.applyUpdateV2(o, n), n = T.snapshot(o), T.applyUpdateV2(o, e), e = T.snapshot(o), i._item === null) {
4780
+ if ((!(e instanceof Uint8Array) || !(n instanceof Uint8Array)) && Xc(), o = new T.Doc({ gc: !1 }), T.applyUpdateV2(o, n), n = T.snapshot(o), T.applyUpdateV2(o, e), e = T.snapshot(o), i._item === null) {
4781
4781
  const s = Array.from(this.doc.share.keys()).find(
4782
4782
  (a) => this.doc.share.get(a) === this.type
4783
4783
  );
@@ -4859,7 +4859,7 @@ class Jm {
4859
4859
  }
4860
4860
  ), n.changed.forEach(o), n.changedParentTypes.forEach(o);
4861
4861
  const i = this.type.toArray().map(
4862
- (a) => Zc(
4862
+ (a) => Qc(
4863
4863
  /** @type {Y.XmlElement | Y.XmlHook} */
4864
4864
  a,
4865
4865
  this.prosemirrorView.state.schema,
@@ -4896,7 +4896,7 @@ class Jm {
4896
4896
  this.prosemirrorView != null && (this.prosemirrorView = null, this.type.unobserveDeep(this._observeFunction), this.doc.off("beforeAllTransactions", this.beforeAllTransactions), this.doc.off("afterAllTransactions", this.afterAllTransactions));
4897
4897
  }
4898
4898
  }
4899
- const Zc = (t, e, n, r, o, i) => {
4899
+ const Qc = (t, e, n, r, o, i) => {
4900
4900
  const s = (
4901
4901
  /** @type {PModel.Node} */
4902
4902
  n.mapping.get(t)
@@ -4917,7 +4917,7 @@ const Zc = (t, e, n, r, o, i) => {
4917
4917
  }, or = (t, e, n, r, o, i) => {
4918
4918
  const s = [], a = (l) => {
4919
4919
  if (l instanceof T.XmlElement) {
4920
- const c = Zc(
4920
+ const c = Qc(
4921
4921
  l,
4922
4922
  e,
4923
4923
  n,
@@ -4994,7 +4994,7 @@ const Zc = (t, e, n, r, o, i) => {
4994
4994
  const n = new T.XmlText(), r = t.map((o) => ({
4995
4995
  // @ts-ignore
4996
4996
  insert: o.text,
4997
- attributes: td(o.marks, e)
4997
+ attributes: nd(o.marks, e)
4998
4998
  }));
4999
4999
  return n.applyDelta(r), e.mapping.set(n, t), n;
5000
5000
  }, Zm = (t, e) => {
@@ -5030,13 +5030,13 @@ const Zc = (t, e, n, r, o, i) => {
5030
5030
  n.push(o);
5031
5031
  }
5032
5032
  return n;
5033
- }, Qc = (t, e) => {
5033
+ }, ed = (t, e) => {
5034
5034
  const n = t.toDelta();
5035
5035
  return n.length === e.length && n.every(
5036
5036
  /** @type {(d:any,i:number) => boolean} */
5037
5037
  (r, o) => r.insert === /** @type {any} */
5038
5038
  e[o].text && fm(r.attributes || {}).length === e[o].marks.length && pm(r.attributes, (i, s) => {
5039
- const a = ed(s), l = e[o].marks;
5039
+ const a = td(s), l = e[o].marks;
5040
5040
  return Es(i, l.find(
5041
5041
  /** @param {any} mark */
5042
5042
  (c) => c.type.name === a
@@ -5050,7 +5050,7 @@ const Zc = (t, e, n, r, o, i) => {
5050
5050
  (r, o) => wr(r, n[o])
5051
5051
  );
5052
5052
  }
5053
- return t instanceof T.XmlText && e instanceof Array && Qc(t, e);
5053
+ return t instanceof T.XmlText && e instanceof Array && ed(t, e);
5054
5054
  }, Co = (t, e) => t === e || t instanceof Array && e instanceof Array && t.length === e.length && t.every(
5055
5055
  (n, r) => e[r] === n
5056
5056
  ), Ya = (t, e, n) => {
@@ -5090,7 +5090,7 @@ const Zc = (t, e, n, r, o, i) => {
5090
5090
  /** @type {any} */
5091
5091
  c.text
5092
5092
  ),
5093
- attributes: Object.assign({}, r, td(c.marks, n))
5093
+ attributes: Object.assign({}, r, nd(c.marks, n))
5094
5094
  })), { insert: s, remove: a, index: l } = wm(
5095
5095
  o,
5096
5096
  i.map((c) => c.insert).join("")
@@ -5098,16 +5098,16 @@ const Zc = (t, e, n, r, o, i) => {
5098
5098
  t.delete(l, a), t.insert(l, s), t.applyDelta(
5099
5099
  i.map((c) => ({ retain: c.insert.length, attributes: c.attributes }))
5100
5100
  );
5101
- }, tg = /(.*)(--[a-zA-Z0-9+/=]{8})$/, ed = (t) => tg.exec(t)?.[1] ?? t, ng = (t, e) => {
5101
+ }, tg = /(.*)(--[a-zA-Z0-9+/=]{8})$/, td = (t) => tg.exec(t)?.[1] ?? t, ng = (t, e) => {
5102
5102
  const n = [];
5103
5103
  for (const r in t)
5104
- n.push(e.mark(ed(r), t[r]));
5104
+ n.push(e.mark(td(r), t[r]));
5105
5105
  return n;
5106
- }, td = (t, e) => {
5106
+ }, nd = (t, e) => {
5107
5107
  const n = {};
5108
5108
  return t.forEach((r) => {
5109
5109
  if (r.type.name !== "ychange") {
5110
- const o = Xc(e.isOMark, r.type, () => !r.type.excludes(r.type));
5110
+ const o = Jc(e.isOMark, r.type, () => !r.type.excludes(r.type));
5111
5111
  n[o ? `${r.type.name}--${jm(r.toJSON())}` : r.type.name] = r.attrs;
5112
5112
  }
5113
5113
  }), n;
@@ -5143,7 +5143,7 @@ const Zc = (t, e, n, r, o, i) => {
5143
5143
  for (; a - c - d > 0 && i - c - d > 0; ) {
5144
5144
  const f = s[c], p = o[c], h = s[a - d - 1], m = o[i - d - 1];
5145
5145
  if (f instanceof T.XmlText && p instanceof Array)
5146
- Qc(f, p) || eg(f, p, r), c += 1;
5146
+ ed(f, p) || eg(f, p, r), c += 1;
5147
5147
  else {
5148
5148
  let g = f instanceof T.XmlElement && _i(f, p), b = h instanceof T.XmlElement && _i(h, m);
5149
5149
  if (g && b) {
@@ -5203,7 +5203,7 @@ const rg = () => {
5203
5203
  }), n.dispatch(r));
5204
5204
  });
5205
5205
  }, og = (t, e, n) => {
5206
- ir || (ir = /* @__PURE__ */ new Map(), Ns(0, rg)), Xc(ir, t, so).set(e, n);
5206
+ ir || (ir = /* @__PURE__ */ new Map(), Ns(0, rg)), Jc(ir, t, so).set(e, n);
5207
5207
  }, Mo = (t, e, n) => {
5208
5208
  if (t === 0)
5209
5209
  return T.createRelativePositionFromTypeIndex(e, 0, -1);
@@ -5258,7 +5258,7 @@ const rg = () => {
5258
5258
  }
5259
5259
  }
5260
5260
  if (r === null)
5261
- throw Kc();
5261
+ throw Xc();
5262
5262
  if (t === 0 && r.constructor !== T.XmlText && r !== e)
5263
5263
  return ig(r._item.parent, r._item);
5264
5264
  }
@@ -5445,11 +5445,11 @@ const rg = () => {
5445
5445
  const e = _t.getState(t).undoManager;
5446
5446
  if (e != null)
5447
5447
  return e.redo(), !0;
5448
- }, mg = /* @__PURE__ */ new Set(["paragraph"]), gg = (t, e) => !(t instanceof kf) || !(t.content instanceof Cf) || !(t.content.type instanceof Mf || t.content.type instanceof Sf && e.has(t.content.type.nodeName)) || t.content.type._length === 0, yg = ({ protectedNodes: t = mg, trackedOrigins: e = [], undoManager: n = null } = {}) => new G({
5448
+ }, mg = /* @__PURE__ */ new Set(["paragraph"]), gg = (t, e) => !(t instanceof Cf) || !(t.content instanceof Mf) || !(t.content.type instanceof xf || t.content.type instanceof Sf && e.has(t.content.type.nodeName)) || t.content.type._length === 0, yg = ({ protectedNodes: t = mg, trackedOrigins: e = [], undoManager: n = null } = {}) => new G({
5449
5449
  key: _t,
5450
5450
  state: {
5451
5451
  init: (r, o) => {
5452
- const i = te.getState(o), s = n || new vf(i.type, {
5452
+ const i = te.getState(o), s = n || new kf(i.type, {
5453
5453
  trackedOrigins: new Set([te].concat(e)),
5454
5454
  deleteFilter: (a) => gg(a, t),
5455
5455
  captureTransaction: (a) => a.meta.get("addToHistory") !== !1
@@ -5591,7 +5591,7 @@ var Vt = {
5591
5591
  220: "\\",
5592
5592
  221: "]",
5593
5593
  222: "'"
5594
- }, So = {
5594
+ }, xo = {
5595
5595
  48: ")",
5596
5596
  49: "!",
5597
5597
  50: "@",
@@ -5620,10 +5620,10 @@ var Vt = {
5620
5620
  for (var ge = 0; ge < 10; ge++) Vt[48 + ge] = Vt[96 + ge] = String(ge);
5621
5621
  for (var ge = 1; ge <= 24; ge++) Vt[ge + 111] = "F" + ge;
5622
5622
  for (var ge = 65; ge <= 90; ge++)
5623
- Vt[ge] = String.fromCharCode(ge + 32), So[ge] = String.fromCharCode(ge);
5624
- for (var ai in Vt) So.hasOwnProperty(ai) || (So[ai] = Vt[ai]);
5623
+ Vt[ge] = String.fromCharCode(ge + 32), xo[ge] = String.fromCharCode(ge);
5624
+ for (var ai in Vt) xo.hasOwnProperty(ai) || (xo[ai] = Vt[ai]);
5625
5625
  function kg(t) {
5626
- var e = wg && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || vg && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? So : Vt)[t.keyCode] || t.key || "Unidentified";
5626
+ var e = wg && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || vg && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? xo : Vt)[t.keyCode] || t.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 Cg = typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : !1;
@@ -5648,7 +5648,7 @@ function Mg(t) {
5648
5648
  }
5649
5649
  return r && (n = "Alt-" + n), o && (n = "Ctrl-" + n), s && (n = "Meta-" + n), i && (n = "Shift-" + n), n;
5650
5650
  }
5651
- function Sg(t) {
5651
+ function xg(t) {
5652
5652
  let e = /* @__PURE__ */ Object.create(null);
5653
5653
  for (let n in t)
5654
5654
  e[Mg(n)] = t[n];
@@ -5657,11 +5657,11 @@ function Sg(t) {
5657
5657
  function li(t, e, n = !0) {
5658
5658
  return e.altKey && (t = "Alt-" + t), e.ctrlKey && (t = "Ctrl-" + t), e.metaKey && (t = "Meta-" + t), n && e.shiftKey && (t = "Shift-" + t), t;
5659
5659
  }
5660
- function xg(t) {
5660
+ function Sg(t) {
5661
5661
  return new G({ props: { handleKeyDown: Ps(t) } });
5662
5662
  }
5663
5663
  function Ps(t) {
5664
- let e = Sg(t);
5664
+ let e = xg(t);
5665
5665
  return function(n, r) {
5666
5666
  let o = kg(r), i, s = e[li(o, r)];
5667
5667
  if (s && s(n.state, n.dispatch, n))
@@ -5700,7 +5700,7 @@ function Mt(t, e) {
5700
5700
  function Pr(t, e) {
5701
5701
  return e.nodes[t] ? "node" : e.marks[t] ? "mark" : null;
5702
5702
  }
5703
- var zn, nd, rd;
5703
+ var zn, rd, od;
5704
5704
  class D {
5705
5705
  /**
5706
5706
  * Get a list of all attributes defined in the extensions.
@@ -5714,7 +5714,7 @@ class D {
5714
5714
  renderDOM: null,
5715
5715
  parseDOM: null,
5716
5716
  keepOnSplit: !0
5717
- }, o = N(this, zn, nd).call(this, e, r), i = N(this, zn, rd).call(this, e, r);
5717
+ }, o = N(this, zn, rd).call(this, e, r), i = N(this, zn, od).call(this, e, r);
5718
5718
  return n.push(...o, ...i), n;
5719
5719
  }
5720
5720
  /**
@@ -5829,7 +5829,7 @@ class D {
5829
5829
  return r === "node" ? this.getNodeAttributes(e, n) : r === "mark" ? this.getMarkAttributes(e, n) : {};
5830
5830
  }
5831
5831
  }
5832
- zn = new WeakSet(), nd = function(e, n) {
5832
+ zn = new WeakSet(), rd = function(e, n) {
5833
5833
  const r = [], o = (i) => {
5834
5834
  for (const s of i.types) {
5835
5835
  const a = Object.entries(i.attributes);
@@ -5856,7 +5856,7 @@ zn = new WeakSet(), nd = function(e, n) {
5856
5856
  o(c);
5857
5857
  }
5858
5858
  return r;
5859
- }, rd = function(e, n) {
5859
+ }, od = function(e, n) {
5860
5860
  const r = [], o = e.filter((i) => i.type === "node" || i.type === "mark");
5861
5861
  for (const i of o) {
5862
5862
  const s = {
@@ -5881,10 +5881,10 @@ zn = new WeakSet(), nd = function(e, n) {
5881
5881
  return r;
5882
5882
  }, ft(D, zn);
5883
5883
  function $i(t) {
5884
- const e = Object.entries(t).filter(([n, r]) => n === "attrs" && Of(r) ? !1 : r != null);
5884
+ const e = Object.entries(t).filter(([n, r]) => n === "attrs" && Tf(r) ? !1 : r != null);
5885
5885
  return Object.fromEntries(e);
5886
5886
  }
5887
- var _n, od, id;
5887
+ var _n, id, sd;
5888
5888
  const cr = class cr {
5889
5889
  /**
5890
5890
  * Creates PM schema by resolved extensions.
@@ -5894,11 +5894,11 @@ const cr = class cr {
5894
5894
  */
5895
5895
  static createSchemaByExtensions(e, n) {
5896
5896
  var c, d;
5897
- const r = e.filter((u) => u.type === "node"), o = e.filter((u) => u.type === "mark"), i = r.find((u) => E(u, "topNode"))?.name, s = D.getAttributesFromExtensions(e), a = N(c = cr, _n, od).call(c, r, s, n), l = N(d = cr, _n, id).call(d, o, s, n);
5897
+ const r = e.filter((u) => u.type === "node"), o = e.filter((u) => u.type === "mark"), i = r.find((u) => E(u, "topNode"))?.name, s = D.getAttributesFromExtensions(e), a = N(c = cr, _n, id).call(c, r, s, n), l = N(d = cr, _n, sd).call(d, o, s, n);
5898
5898
  return new nc({ topNode: i, nodes: a, marks: l });
5899
5899
  }
5900
5900
  };
5901
- _n = new WeakSet(), od = function(e, n, r) {
5901
+ _n = new WeakSet(), id = function(e, n, r) {
5902
5902
  const o = e.map((i) => {
5903
5903
  const s = n.filter((h) => h.type === i.name), a = {
5904
5904
  name: i.name,
@@ -5937,7 +5937,7 @@ _n = new WeakSet(), od = function(e, n, r) {
5937
5937
  return p && (d.toText = p), [i.name, d];
5938
5938
  });
5939
5939
  return Object.fromEntries(o);
5940
- }, id = function(e, n, r) {
5940
+ }, sd = function(e, n, r) {
5941
5941
  const o = e.map((i) => {
5942
5942
  const s = n.filter((f) => f.type === i.name), a = {
5943
5943
  name: i.name,
@@ -6117,7 +6117,7 @@ class Dg {
6117
6117
  }
6118
6118
  }
6119
6119
  const Ng = (t, e) => {
6120
- if (Tf(e))
6120
+ if (Df(e))
6121
6121
  return e.exec(t);
6122
6122
  const n = e(t);
6123
6123
  if (!n)
@@ -6258,7 +6258,7 @@ const Ng = (t, e) => {
6258
6258
  return `font-size: ${Math.round(r * 12 * 100) / 100}pt`;
6259
6259
  }
6260
6260
  );
6261
- var $n, sd, ad;
6261
+ var $n, ad, ld;
6262
6262
  const An = class An {
6263
6263
  constructor(e, n, r) {
6264
6264
  ft(this, $n);
@@ -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([...e, ...this.externalExtensions]), this.schema = Vi.createSchemaByExtensions(this.extensions, r), N(this, $n, sd).call(this);
6273
+ })), this.extensions = An.getResolvedExtensions([...e, ...this.externalExtensions]), this.schema = Vi.createSchemaByExtensions(this.extensions, r), N(this, $n, ad).call(this);
6274
6274
  }
6275
6275
  /**
6276
6276
  * Static method for creating ExtensionService.
@@ -6345,7 +6345,7 @@ const An = class An {
6345
6345
  const f = Object.entries(l()).map(([p, h]) => [p, (...m) => h({ editor: e, keymapArgs: m })]);
6346
6346
  c = { ...Object.fromEntries(f) };
6347
6347
  }
6348
- a.push(xg(c));
6348
+ a.push(Sg(c));
6349
6349
  const d = E(i, "addInputRules", s);
6350
6350
  Ag(i, e.options.enableInputRules) && d && r.push(...d());
6351
6351
  const u = E(i, "addPmPlugins", s);
@@ -6397,7 +6397,7 @@ $n = new WeakSet(), /**
6397
6397
  * Install all extensions.
6398
6398
  * Create extension storage in the editor, attach editor events.
6399
6399
  */
6400
- sd = function() {
6400
+ ad = function() {
6401
6401
  for (const e of this.extensions) {
6402
6402
  this.editor.extensionStorage[e.name] = e.storage;
6403
6403
  const n = {
@@ -6407,14 +6407,14 @@ sd = function() {
6407
6407
  editor: this.editor,
6408
6408
  type: Gn(e.name, this.schema)
6409
6409
  };
6410
- e.type === "mark" && (K(E(e, "keepOnSplit", n)) ?? !0) && this.splittableMarks.push(e.name), N(this, $n, ad).call(this, e);
6410
+ e.type === "mark" && (K(E(e, "keepOnSplit", n)) ?? !0) && this.splittableMarks.push(e.name), N(this, $n, ld).call(this, e);
6411
6411
  }
6412
6412
  }, /**
6413
6413
  * Attach editor events to extension
6414
6414
  * if callbacks are defined in the extension config.
6415
6415
  * @param extension Extension.
6416
6416
  */
6417
- ad = function(e) {
6417
+ ld = function(e) {
6418
6418
  const n = {
6419
6419
  name: e.name,
6420
6420
  options: e.options,
@@ -6439,17 +6439,17 @@ function _g(t, e) {
6439
6439
  let { $cursor: n } = t.selection;
6440
6440
  return !n || (e ? !e.endOfTextblock("backward", t) : n.parentOffset > 0) ? null : n;
6441
6441
  }
6442
- const ld = (t, e, n) => {
6442
+ const cd = (t, e, n) => {
6443
6443
  let r = _g(t, n);
6444
6444
  if (!r)
6445
6445
  return !1;
6446
- let o = dd(r);
6446
+ let o = ud(r);
6447
6447
  if (!o) {
6448
6448
  let s = r.blockRange(), a = s && Tr(s);
6449
6449
  return a == null ? !1 : (e && e(t.tr.lift(s, a).scrollIntoView()), !0);
6450
6450
  }
6451
6451
  let i = o.nodeBefore;
6452
- if (yd(t, o, e, -1))
6452
+ if (bd(t, o, e, -1))
6453
6453
  return !0;
6454
6454
  if (r.parent.content.size == 0 && (In(i, "end") || B.isSelectable(i)))
6455
6455
  for (let s = r.depth; ; s--) {
@@ -6475,19 +6475,19 @@ function In(t, e, n = !1) {
6475
6475
  }
6476
6476
  return !1;
6477
6477
  }
6478
- const cd = (t, e, n) => {
6478
+ const dd = (t, e, n) => {
6479
6479
  let { $head: r, empty: o } = t.selection, i = r;
6480
6480
  if (!o)
6481
6481
  return !1;
6482
6482
  if (r.parent.isTextblock) {
6483
6483
  if (n ? !n.endOfTextblock("backward", t) : r.parentOffset > 0)
6484
6484
  return !1;
6485
- i = dd(r);
6485
+ i = ud(r);
6486
6486
  }
6487
6487
  let s = i && i.nodeBefore;
6488
6488
  return !s || !B.isSelectable(s) ? !1 : (e && e(t.tr.setSelection(B.create(t.doc, i.pos - s.nodeSize)).scrollIntoView()), !0);
6489
6489
  };
6490
- function dd(t) {
6490
+ function ud(t) {
6491
6491
  if (!t.parent.type.spec.isolating)
6492
6492
  for (let e = t.depth - 1; e >= 0; e--) {
6493
6493
  if (t.index(e) > 0)
@@ -6501,15 +6501,15 @@ function $g(t, e) {
6501
6501
  let { $cursor: n } = t.selection;
6502
6502
  return !n || (e ? !e.endOfTextblock("forward", t) : n.parentOffset < n.parent.content.size) ? null : n;
6503
6503
  }
6504
- const ud = (t, e, n) => {
6504
+ const fd = (t, e, n) => {
6505
6505
  let r = $g(t, n);
6506
6506
  if (!r)
6507
6507
  return !1;
6508
- let o = pd(r);
6508
+ let o = hd(r);
6509
6509
  if (!o)
6510
6510
  return !1;
6511
6511
  let i = o.nodeAfter;
6512
- if (yd(t, o, e, 1))
6512
+ if (bd(t, o, e, 1))
6513
6513
  return !0;
6514
6514
  if (r.parent.content.size == 0 && (In(i, "start") || B.isSelectable(i))) {
6515
6515
  let s = oc(t.doc, r.before(), r.after(), W.empty);
@@ -6522,19 +6522,19 @@ const ud = (t, e, n) => {
6522
6522
  }
6523
6523
  }
6524
6524
  return i.isAtom && o.depth == r.depth - 1 ? (e && e(t.tr.delete(o.pos, o.pos + i.nodeSize).scrollIntoView()), !0) : !1;
6525
- }, fd = (t, e, n) => {
6525
+ }, pd = (t, e, n) => {
6526
6526
  let { $head: r, empty: o } = t.selection, i = r;
6527
6527
  if (!o)
6528
6528
  return !1;
6529
6529
  if (r.parent.isTextblock) {
6530
6530
  if (n ? !n.endOfTextblock("forward", t) : r.parentOffset < r.parent.content.size)
6531
6531
  return !1;
6532
- i = pd(r);
6532
+ i = hd(r);
6533
6533
  }
6534
6534
  let s = i && i.nodeAfter;
6535
6535
  return !s || !B.isSelectable(s) ? !1 : (e && e(t.tr.setSelection(B.create(t.doc, i.pos)).scrollIntoView()), !0);
6536
6536
  };
6537
- function pd(t) {
6537
+ function hd(t) {
6538
6538
  if (!t.parent.type.spec.isolating)
6539
6539
  for (let e = t.depth - 1; e >= 0; e--) {
6540
6540
  let n = t.node(e);
@@ -6567,7 +6567,7 @@ const Vg = (t, e) => {
6567
6567
  } else if (r = rc(t.doc, n.to, 1), r == null)
6568
6568
  return !1;
6569
6569
  return e && e(t.tr.join(r).scrollIntoView()), !0;
6570
- }, hd = (t, e) => {
6570
+ }, md = (t, e) => {
6571
6571
  let { $head: n, $anchor: r } = t.selection;
6572
6572
  return !n.parent.type.spec.code || !n.sameParent(r) ? !1 : (e && e(t.tr.insertText(`
6573
6573
  `).scrollIntoView()), !0);
@@ -6592,7 +6592,7 @@ const jg = (t, e) => {
6592
6592
  l.setSelection(Z.near(l.doc.resolve(a), 1)), e(l.scrollIntoView());
6593
6593
  }
6594
6594
  return !0;
6595
- }, md = (t, e) => {
6595
+ }, gd = (t, e) => {
6596
6596
  let n = t.selection, { $from: r, $to: o } = n;
6597
6597
  if (n instanceof Or || r.parent.inlineContent || o.parent.inlineContent)
6598
6598
  return !1;
@@ -6604,7 +6604,7 @@ const jg = (t, e) => {
6604
6604
  a.setSelection(j.create(a.doc, s + 1)), e(a.scrollIntoView());
6605
6605
  }
6606
6606
  return !0;
6607
- }, gd = (t, e) => {
6607
+ }, yd = (t, e) => {
6608
6608
  let { $cursor: n } = t.selection;
6609
6609
  if (!n || n.parent.content.size)
6610
6610
  return !1;
@@ -6648,7 +6648,7 @@ function Kg(t, e, n) {
6648
6648
  let r = e.nodeBefore, o = e.nodeAfter, i = e.index();
6649
6649
  return !r || !o || !r.type.compatibleContent(o.type) ? !1 : !r.content.size && e.parent.canReplace(i - 1, i) ? (n && n(t.tr.delete(e.pos - r.nodeSize, e.pos).scrollIntoView()), !0) : !e.parent.canReplace(i, i + 1) || !(o.isTextblock || Ht(t.doc, e.pos)) ? !1 : (n && n(t.tr.join(e.pos).scrollIntoView()), !0);
6650
6650
  }
6651
- function yd(t, e, n, r) {
6651
+ function bd(t, e, n, r) {
6652
6652
  let o = e.nodeBefore, i = e.nodeAfter, s, a, l = o.type.spec.isolating || i.type.spec.isolating;
6653
6653
  if (!l && Kg(t, e, n))
6654
6654
  return !0;
@@ -6687,7 +6687,7 @@ function yd(t, e, n, r) {
6687
6687
  }
6688
6688
  return !1;
6689
6689
  }
6690
- function bd(t) {
6690
+ function wd(t) {
6691
6691
  return function(e, n) {
6692
6692
  let r = e.selection, o = t < 0 ? r.$from : r.$to, i = o.depth;
6693
6693
  for (; o.node(i).isInline; ) {
@@ -6698,7 +6698,7 @@ function bd(t) {
6698
6698
  return o.node(i).isTextblock ? (n && n(e.tr.setSelection(j.create(e.doc, t < 0 ? o.start(i) : o.end(i)))), !0) : !1;
6699
6699
  };
6700
6700
  }
6701
- const Xg = bd(-1), Jg = bd(1);
6701
+ const Xg = wd(-1), Jg = wd(1);
6702
6702
  function Za(t, e = null) {
6703
6703
  return function(n, r) {
6704
6704
  let o = !1;
@@ -6737,11 +6737,11 @@ function Fs(...t) {
6737
6737
  return !1;
6738
6738
  };
6739
6739
  }
6740
- Fs(Rs, ld, cd);
6741
- Fs(Rs, ud, fd);
6742
- Fs(hd, md, gd, Ug);
6740
+ Fs(Rs, cd, dd);
6741
+ Fs(Rs, fd, pd);
6742
+ Fs(md, gd, yd, Ug);
6743
6743
  typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os < "u" && os.platform && os.platform() == "darwin";
6744
- function wd(t) {
6744
+ function vd(t) {
6745
6745
  for (let e = 0; e < t.edgeCount; e++) {
6746
6746
  const { type: n } = t.edge(e);
6747
6747
  if (n.isTextblock && !n.hasRequiredAttrs()) return n;
@@ -6762,7 +6762,7 @@ const Qa = (t, e) => {
6762
6762
  if (o) {
6763
6763
  const f = c.parentOffset === c.parent.content.size;
6764
6764
  s instanceof j && n.deleteSelection();
6765
- const p = l.depth === 0 ? null : wd(l.node(-1).contentMatchAt(l.indexAfter(-1)));
6765
+ const p = l.depth === 0 ? null : vd(l.node(-1).contentMatchAt(l.indexAfter(-1)));
6766
6766
  let h = f && p ? [{ type: p, attrs: u }] : void 0, m = wt(n.doc, n.mapping.map(l.pos), 1, h);
6767
6767
  if (!h && !m && wt(n.doc, n.mapping.map(l.pos), 1, p ? [{ type: p }] : void 0) && (m = !0, h = p ? [{ type: p, attrs: u }] : void 0), m && (n.split(n.mapping.map(l.pos), 1, h), p && !f && !l.parentOffset && l.parent.type !== p)) {
6768
6768
  const g = n.mapping.map(l.before()), b = n.doc.resolve(g);
@@ -6771,12 +6771,12 @@ const Qa = (t, e) => {
6771
6771
  t && Qa(r, i.extensionService.splittableMarks), n.scrollIntoView();
6772
6772
  }
6773
6773
  return !0;
6774
- }, Gg = () => ({ state: t, dispatch: e }) => gd(t, e), Zg = () => ({ state: t, dispatch: e }) => md(t, e), Qg = () => ({ state: t, dispatch: e }) => hd(t, e), ey = () => ({ state: t, dispatch: e }) => jg(t, e), vd = (t) => {
6774
+ }, Gg = () => ({ state: t, dispatch: e }) => yd(t, e), Zg = () => ({ state: t, dispatch: e }) => gd(t, e), Qg = () => ({ state: t, dispatch: e }) => md(t, e), ey = () => ({ state: t, dispatch: e }) => jg(t, e), kd = (t) => {
6775
6775
  };
6776
6776
  function ty(t, e, n) {
6777
6777
  const { selection: r } = e;
6778
6778
  let o = null;
6779
- if (vd() && (o = r.$cursor), o) {
6779
+ if (kd() && (o = r.$cursor), o) {
6780
6780
  const i = t.storedMarks ?? o.marks();
6781
6781
  return !!n.isInSet(i) || !i.some((s) => s.type.excludes(n));
6782
6782
  }
@@ -6859,7 +6859,7 @@ const oy = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
6859
6859
  t.removeMark(i.$from.pos, i.$to.pos);
6860
6860
  }), !0;
6861
6861
  };
6862
- function xo(t, e, n = {}) {
6862
+ function So(t, e, n = {}) {
6863
6863
  const { empty: r, ranges: o } = t.selection, i = e ? Mt(e, t.schema) : null;
6864
6864
  if (r)
6865
6865
  return !!(t.storedMarks || t.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 xo(t, e, n = {}) {
6884
6884
  }
6885
6885
  const sy = (t, e = {}, n = {}) => ({ state: r, commands: o }) => {
6886
6886
  const { extendEmptyMarkRange: i = !1 } = n, s = Mt(t, r.schema);
6887
- return xo(r, s, e) ? o.unsetMark(s, { extendEmptyMarkRange: i }) : o.setMark(s, e);
6887
+ return So(r, s, e) ? o.unsetMark(s, { extendEmptyMarkRange: i }) : o.setMark(s, e);
6888
6888
  }, ay = () => ({ state: t, tr: e, dispatch: n }) => {
6889
6889
  const { selection: r } = e, { ranges: o } = r;
6890
6890
  return n && o.forEach(({ $from: i, $to: s }) => {
@@ -6951,17 +6951,17 @@ const cy = (t, e, n = {}) => ({ state: r, commands: o }) => {
6951
6951
  });
6952
6952
  });
6953
6953
  }), !0) : !1;
6954
- }, hy = () => ({ state: t, dispatch: e }) => Vg(t, e), my = () => ({ state: t, dispatch: e }) => Hg(t, e), gy = () => ({ state: t, dispatch: e }) => ld(t, e), yy = () => ({ state: t, dispatch: e }) => ud(t, e), by = () => ({ state: t, dispatch: e }) => cd(t, e), wy = () => ({ state: t, dispatch: e }) => fd(t, e), vy = () => ({ state: t, dispatch: e }) => Xg(t, e), ky = () => ({ state: t, dispatch: e }) => Jg(t, e), Cy = (t, e) => ({ tr: n, commands: r }) => r.insertContentAt({ from: n.selection.from, to: n.selection.to }, t, e), kd = (t) => {
6954
+ }, hy = () => ({ state: t, dispatch: e }) => Vg(t, e), my = () => ({ state: t, dispatch: e }) => Hg(t, e), gy = () => ({ state: t, dispatch: e }) => cd(t, e), yy = () => ({ state: t, dispatch: e }) => fd(t, e), by = () => ({ state: t, dispatch: e }) => dd(t, e), wy = () => ({ state: t, dispatch: e }) => pd(t, e), vy = () => ({ state: t, dispatch: e }) => Xg(t, e), ky = () => ({ state: t, dispatch: e }) => Jg(t, e), Cy = (t, e) => ({ tr: n, commands: r }) => r.insertContentAt({ from: n.selection.from, to: n.selection.to }, t, e), Cd = (t) => {
6955
6955
  const e = t.childNodes;
6956
6956
  for (let n = e.length - 1; n >= 0; n -= 1) {
6957
6957
  const r = e[n];
6958
- r.nodeType === 3 && r.nodeValue && /^(\n\s\s|\n)$/.test(r.nodeValue) ? t.removeChild(r) : r.nodeType === 1 && kd(r);
6958
+ r.nodeType === 3 && r.nodeValue && /^(\n\s\s|\n)$/.test(r.nodeValue) ? t.removeChild(r) : r.nodeType === 1 && Cd(r);
6959
6959
  }
6960
6960
  return t;
6961
6961
  };
6962
6962
  function Xr(t) {
6963
6963
  const e = `<body>${t}</body>`, n = new window.DOMParser().parseFromString(e, "text/html").body;
6964
- return kd(n);
6964
+ return Cd(n);
6965
6965
  }
6966
6966
  function Wi(t, e, n) {
6967
6967
  n = {
@@ -7025,7 +7025,7 @@ function My(t, e, n) {
7025
7025
  s === 0 && (s = d);
7026
7026
  }), t.setSelection(Z.near(t.doc.resolve(s), n));
7027
7027
  }
7028
- const Sy = (t) => !("type" in t), xy = (t, e, n) => ({ tr: r, dispatch: o, editor: i }) => {
7028
+ const xy = (t) => !("type" in t), Sy = (t, e, n) => ({ tr: r, dispatch: o, editor: i }) => {
7029
7029
  if (o) {
7030
7030
  n = {
7031
7031
  parseOptions: {},
@@ -7053,7 +7053,7 @@ const Sy = (t) => !("type" in t), xy = (t, e, n) => ({ tr: r, dispatch: o, edito
7053
7053
  }), !1;
7054
7054
  }
7055
7055
  let { from: a, to: l } = typeof t == "number" ? { from: t, to: t } : { from: t.from, to: t.to }, c = !0, d = !0;
7056
- if ((Sy(s) ? s : [s]).forEach((p) => {
7056
+ if ((xy(s) ? s : [s]).forEach((p) => {
7057
7057
  p.check(), c = c ? p.isText && p.marks.length === 0 : !1, d = d ? p.isBlock : !1;
7058
7058
  }), a === l && d) {
7059
7059
  const { parent: p } = r.doc.resolve(a);
@@ -8363,10 +8363,10 @@ const Ry = (t, e = {}) => ({ state: n, dispatch: r }) => {
8363
8363
  s.ensureMarks(H);
8364
8364
  }
8365
8365
  return _ ? !0 : u.clearNodes();
8366
- }, S = Cd(A.definitions);
8367
- return i.converter.numbering = zy(S, A, h), r.listId = S, !n || !M || !l ? c().command(F({ ensureMarks: !1 })).wrapInList(h, r).command(() => di(s, h)).command(() => ui(s, h)).run() : c().command(F({ ensureMarks: !0 })).wrapInList(h, r).command(() => di(s, h)).command(() => ui(s, h)).run();
8368
- }, Cd = (t) => Math.max(...Object.keys(t).map(Number)) + 1, zy = (t, e, n) => {
8369
- const r = n.name === "orderedList" ? Ly : Fy, o = { ...e }, i = Cd(o.abstracts), s = {
8366
+ }, x = Md(A.definitions);
8367
+ return i.converter.numbering = zy(x, A, h), r.listId = x, !n || !M || !l ? c().command(F({ ensureMarks: !1 })).wrapInList(h, r).command(() => di(s, h)).command(() => ui(s, h)).run() : c().command(F({ ensureMarks: !0 })).wrapInList(h, r).command(() => di(s, h)).command(() => ui(s, h)).run();
8368
+ }, Md = (t) => Math.max(...Object.keys(t).map(Number)) + 1, zy = (t, e, n) => {
8369
+ const r = n.name === "orderedList" ? Ly : Fy, o = { ...e }, i = Md(o.abstracts), s = {
8370
8370
  ...r,
8371
8371
  attributes: {
8372
8372
  ...r.attributes,
@@ -8456,7 +8456,7 @@ const Ry = (t, e = {}) => ({ state: n, dispatch: r }) => {
8456
8456
  exitCode: ey,
8457
8457
  first: Rg,
8458
8458
  insertContent: Cy,
8459
- insertContentAt: xy,
8459
+ insertContentAt: Sy,
8460
8460
  insertTabChar: Fg,
8461
8461
  insertTabNode: Bg,
8462
8462
  joinBackward: gy,
@@ -8539,7 +8539,7 @@ const Ry = (t, e = {}) => ({ state: n, dispatch: r }) => {
8539
8539
  "Ctrl-e": () => this.editor.commands.selectTextblockEnd(),
8540
8540
  "Ctrl-t": () => this.editor.commands.insertTabChar()
8541
8541
  };
8542
- return Df() || Nf() ? n : e;
8542
+ return Nf() || Ef() ? n : e;
8543
8543
  }
8544
8544
  }), Ky = Q.create({
8545
8545
  name: "editable",
@@ -8574,7 +8574,7 @@ const Ry = (t, e = {}) => ({ state: n, dispatch: r }) => {
8574
8574
  })];
8575
8575
  }
8576
8576
  });
8577
- function Md(t, e, n, { check: r = !1 } = {}) {
8577
+ function xd(t, e, n, { check: r = !1 } = {}) {
8578
8578
  const o = t.getSchema(n);
8579
8579
  if (o) {
8580
8580
  const i = e.nodeFromJSON(o);
@@ -8584,9 +8584,9 @@ function Md(t, e, n, { check: r = !1 } = {}) {
8584
8584
  }
8585
8585
  function Sd(t, e, n = {}) {
8586
8586
  if (!e)
8587
- return Ao(t, null, n) || xo(t, null, n);
8587
+ return Ao(t, null, n) || So(t, null, n);
8588
8588
  const r = Pr(e, t.schema);
8589
- return r === "node" ? Ao(t, e, n) : r === "mark" ? xo(t, e, n) : !1;
8589
+ return r === "node" ? Ao(t, e, n) : r === "mark" ? So(t, e, n) : !1;
8590
8590
  }
8591
8591
  const zs = ({
8592
8592
  tr: t,
@@ -8611,7 +8611,7 @@ const zs = ({
8611
8611
  mark: f
8612
8612
  });
8613
8613
  }), c;
8614
- }, xd = ({ tr: t, from: e, to: n, user: r, date: o }) => {
8614
+ }, Ad = ({ tr: t, from: e, to: n, user: r, date: o }) => {
8615
8615
  t.removeMark(e, n, t.doc.type.schema.marks[ue]), t.removeMark(e, n, t.doc.type.schema.marks[$e]);
8616
8616
  let i = zs({
8617
8617
  tr: t,
@@ -8633,7 +8633,7 @@ const zs = ({
8633
8633
  if (l.isInline || ["tableRow", "tableCell"].includes(l.type.name) || (l.attrs.track, l.type.name === "table"))
8634
8634
  return !1;
8635
8635
  }), a;
8636
- }, Ad = ({ tr: t, from: e, to: n, user: r, date: o }) => {
8636
+ }, Od = ({ tr: t, from: e, to: n, user: r, date: o }) => {
8637
8637
  let i = zs({
8638
8638
  tr: t,
8639
8639
  from: e,
@@ -8742,7 +8742,7 @@ function _s(t, e) {
8742
8742
  });
8743
8743
  }), n;
8744
8744
  }
8745
- function Od(t, e, n) {
8745
+ function Td(t, e, n) {
8746
8746
  const o = t.state.doc.content.size, i = ho(e, 0, o), s = ho(n, 0, o), a = t.coordsAtPos(i), l = t.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,
@@ -8758,26 +8758,26 @@ function Od(t, e, n) {
8758
8758
  toJSON: () => b
8759
8759
  };
8760
8760
  }
8761
- const Td = (t) => {
8761
+ const Dd = (t) => {
8762
8762
  const { $head: e } = t.selection;
8763
8763
  for (let n = e.depth; n > 0; n -= 1)
8764
8764
  if (e.node(n).type?.spec?.tableRole === "row")
8765
8765
  return !0;
8766
8766
  return !1;
8767
- }, Dd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8767
+ }, Nd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8768
8768
  __proto__: null,
8769
8769
  chainableEditorState: Is,
8770
8770
  cleanSchemaItem: $i,
8771
- createDocument: Md,
8772
- defaultBlockAt: wd,
8771
+ createDocument: xd,
8772
+ defaultBlockAt: vd,
8773
8773
  findChildren: _s,
8774
8774
  findMark: Ro,
8775
8775
  findParentNode: He,
8776
8776
  findParentNodeClosestToPos: $o,
8777
8777
  generateDocxListAttributes: Jy,
8778
8778
  generateDocxRandomId: Cn,
8779
- generateRandom32BitHex: Ef,
8780
- getActiveFormatting: Hf,
8779
+ generateRandom32BitHex: Pf,
8780
+ getActiveFormatting: jf,
8781
8781
  getExtensionConfigField: E,
8782
8782
  getMarkRange: Bs,
8783
8783
  getMarkType: Mt,
@@ -8787,12 +8787,12 @@ const Td = (t) => {
8787
8787
  getSchemaTypeByName: Gn,
8788
8788
  getSchemaTypeNameByName: Pr,
8789
8789
  isActive: Sd,
8790
- isInTable: Td,
8790
+ isInTable: Dd,
8791
8791
  isList: Ui,
8792
- isMarkActive: xo,
8792
+ isMarkActive: So,
8793
8793
  isNodeActive: Ao,
8794
- isTextSelection: vd,
8795
- posToDOMRect: Od
8794
+ isTextSelection: kd,
8795
+ posToDOMRect: Td
8796
8796
  }, Symbol.toStringTag, { value: "Module" })), Gy = (t, e, n) => {
8797
8797
  const r = t.resolve(e), o = r.parent, i = o.childAfter(r.parentOffset);
8798
8798
  if (!i.node)
@@ -8809,7 +8809,7 @@ const Td = (t) => {
8809
8809
  to: d,
8810
8810
  attrs: s.attrs
8811
8811
  };
8812
- }, Nd = (t, e = !0) => {
8812
+ }, Ed = (t, e = !0) => {
8813
8813
  if (!t)
8814
8814
  throw new Error('Invalid "node" parameter');
8815
8815
  const n = [];
@@ -8817,20 +8817,20 @@ const Td = (t) => {
8817
8817
  if (n.push({ node: r, pos: o }), !e)
8818
8818
  return !1;
8819
8819
  }), n;
8820
- }, Ed = (t, e, n) => {
8820
+ }, Pd = (t, e, n) => {
8821
8821
  if (t) {
8822
8822
  if (!e)
8823
8823
  throw new Error('Invalid "predicate" parameter');
8824
8824
  } else throw new Error('Invalid "node" parameter');
8825
- return Nd(t, n).filter((r) => e(r.node));
8826
- }, Pd = (t, e) => Ed(t, (n) => n.isInline, e), Zy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8825
+ return Ed(t, n).filter((r) => e(r.node));
8826
+ }, Id = (t, e) => Pd(t, (n) => n.isInline, e), Zy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8827
8827
  __proto__: null,
8828
- findChildren: Ed,
8829
- findInlineNodes: Pd,
8828
+ findChildren: Pd,
8829
+ findInlineNodes: Id,
8830
8830
  findMarkPosition: Gy,
8831
- flatten: Nd
8831
+ flatten: Ed
8832
8832
  }, Symbol.toStringTag, { value: "Module" })), $s = (t, e = null) => {
8833
- const n = [], r = Pd(t.doc);
8833
+ const n = [], r = Id(t.doc);
8834
8834
  return r.length ? (r.forEach(({ node: o, pos: i }) => {
8835
8835
  const { marks: s } = o, a = [$e, ue, Me];
8836
8836
  s.length > 0 && s.forEach((l) => {
@@ -9254,25 +9254,25 @@ const Td = (t) => {
9254
9254
  );
9255
9255
  let M = !1;
9256
9256
  y.forEach((A) => {
9257
- const { attrs: F } = A, S = F.commentId || F.importedId, V = s.coordsAtPos(w);
9257
+ const { attrs: F } = A, x = F.commentId || F.importedId, V = s.coordsAtPos(w);
9258
9258
  rl({
9259
9259
  allCommentPositions: f,
9260
- threadId: S,
9260
+ threadId: x,
9261
9261
  pos: w,
9262
9262
  currentBounds: V,
9263
9263
  node: b
9264
9264
  });
9265
9265
  const z = F.internal;
9266
- M || (M = n === S);
9267
- let _ = ob({ activeThreadId: n, threadId: S, isInternal: z, editor: t });
9266
+ M || (M = n === x);
9267
+ let _ = ob({ activeThreadId: n, threadId: x, isInternal: z, editor: t });
9268
9268
  const H = $.inline(w, w + b.nodeSize, {
9269
9269
  style: `background-color: ${_};`,
9270
- "data-thread-id": S,
9270
+ "data-thread-id": x,
9271
9271
  class: "comment-highlight"
9272
9272
  });
9273
- M && n !== S || u.push(H);
9273
+ M && n !== x || u.push(H);
9274
9274
  });
9275
- const k = Id({
9275
+ const k = Rd({
9276
9276
  doc: c,
9277
9277
  from: w,
9278
9278
  to: w + b.nodeSize
@@ -9330,7 +9330,7 @@ const Td = (t) => {
9330
9330
  if (!e) return;
9331
9331
  const { $from: n, $to: r } = e;
9332
9332
  if (n.pos !== r.pos || !t.nodeAt(n.pos)) return;
9333
- const i = Id({
9333
+ const i = Rd({
9334
9334
  doc: t,
9335
9335
  from: n.pos,
9336
9336
  to: r.pos
@@ -9359,7 +9359,7 @@ const Td = (t) => {
9359
9359
  });
9360
9360
  const { marks: d = [] } = c || {}, u = d.find((f) => f.type.name === Re);
9361
9361
  return u?.attrs?.commentId || u?.attrs?.importedId;
9362
- }, Id = ({
9362
+ }, Rd = ({
9363
9363
  doc: t,
9364
9364
  from: e,
9365
9365
  to: n,
@@ -9438,9 +9438,9 @@ const Td = (t) => {
9438
9438
  const s = e.insertedMark || e.deletionMark || e.formatMark, { type: a, attrs: l } = s, { name: c } = a, { author: d, authorEmail: u, date: f } = l, p = l.id, h = r[0], m = !!(e.insertedMark && e.deletionMark);
9439
9439
  let g;
9440
9440
  o.doc.descendants((y, M) => {
9441
- const { marks: k = [] } = y, A = k.filter((S) => Vs.includes(S.type.name));
9441
+ const { marks: k = [] } = y, A = k.filter((x) => Vs.includes(x.type.name));
9442
9442
  if (!A.length) return;
9443
- if (A.find((S) => S.attrs.id === p) && (g = y), g) return !1;
9443
+ if (A.find((x) => x.attrs.id === p) && (g = y), g) return !1;
9444
9444
  });
9445
9445
  const { deletionText: b, trackedChangeText: w } = cb({
9446
9446
  state: o,
@@ -9473,7 +9473,7 @@ function ub(t, e) {
9473
9473
  if (e(r) && (n = { node: r, pos: o }), n) return !1;
9474
9474
  }), n;
9475
9475
  }
9476
- const Rd = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date: a, originalStep: l, originalStepIndex: c }) => {
9476
+ const Ld = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date: a, originalStep: l, originalStepIndex: c }) => {
9477
9477
  const d = t.schema.marks[ue], u = Ro(t, 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.
@@ -9487,7 +9487,7 @@ const Rd = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
9487
9487
  const g = t.apply(r).tr;
9488
9488
  if (g.maybeStep(p).failed)
9489
9489
  return;
9490
- const b = p.getMap().map(p.to), w = xd({
9490
+ const b = p.getMap().map(p.to), w = Ad({
9491
9491
  tr: g,
9492
9492
  from: p.from,
9493
9493
  to: b,
@@ -9499,7 +9499,7 @@ const Rd = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
9499
9499
  o.appendMap(C.getMap(), y), p.from !== b && (m.insertedMark = w, m.step = C), r.selection.eq(g.selection) || r.setSelection(g.selection);
9500
9500
  }
9501
9501
  if (n.from !== n.to) {
9502
- const { deletionMark: g, deletionMap: b, nodes: w } = Ad({
9502
+ const { deletionMark: g, deletionMap: b, nodes: w } = Od({
9503
9503
  tr: r,
9504
9504
  from: n.from,
9505
9505
  to: n.to,
@@ -9511,7 +9511,7 @@ const Rd = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
9511
9511
  r.setMeta(de, m), r.setMeta(he, { type: "force" });
9512
9512
  }, fb = () => {
9513
9513
  }, pb = () => {
9514
- }, Ld = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date: a }) => {
9514
+ }, Fd = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date: a }) => {
9515
9515
  const l = {};
9516
9516
  i.nodesBetween(n.from, n.to, (c, d) => {
9517
9517
  if (!c.isInline)
@@ -9555,7 +9555,7 @@ const Rd = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
9555
9555
  } else h && r.removeMark(Math.max(n.from, d), Math.min(n.to, d + c.nodeSize), h);
9556
9556
  }
9557
9557
  });
9558
- }, Fd = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date: a }) => {
9558
+ }, Bd = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date: a }) => {
9559
9559
  const l = {};
9560
9560
  i.nodesBetween(n.from, n.to, (c, d) => {
9561
9561
  if (!c.isInline)
@@ -9593,14 +9593,14 @@ const Rd = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
9593
9593
  } else f && r.removeMark(Math.max(n.from, d), Math.min(n.to, d + c.nodeSize), f);
9594
9594
  }
9595
9595
  });
9596
- }, Bd = ({ tr: t, state: e, user: n }) => {
9596
+ }, zd = ({ tr: t, state: e, user: n }) => {
9597
9597
  const r = ["inputType", "uiEvent", "paste", "pointer"], o = ["historyUndo", "historyRedo", "acceptReject"];
9598
9598
  if (!t.steps.length || t.meta && !Object.keys(t.meta).every((c) => r.includes(c)) || o.includes(t.getMeta("inputType")) || t.getMeta(he))
9599
9599
  return t;
9600
9600
  const i = e.tr, s = new dr(), a = Math.floor(Date.now() / 6e5) * 6e5, l = new Date(a).toISOString();
9601
9601
  if (t.steps.forEach((c, d) => {
9602
9602
  const u = c.map(s), { doc: f } = i;
9603
- u && (u instanceof $t ? (Rd({
9603
+ u && (u instanceof $t ? (Ld({
9604
9604
  state: e,
9605
9605
  tr: t,
9606
9606
  step: u,
@@ -9611,7 +9611,7 @@ const Rd = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
9611
9611
  date: l,
9612
9612
  originalStep: c,
9613
9613
  originalStepIndex: d
9614
- }), console.debug("[track-changes]: replaceStep")) : u instanceof sc ? (Ld({
9614
+ }), console.debug("[track-changes]: replaceStep")) : u instanceof sc ? (Fd({
9615
9615
  state: e,
9616
9616
  tr: t,
9617
9617
  step: u,
@@ -9620,7 +9620,7 @@ const Rd = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
9620
9620
  doc: f,
9621
9621
  user: n,
9622
9622
  date: l
9623
- }), console.debug("[track-changes]: addMarkStep")) : u instanceof Mn ? (Fd({
9623
+ }), console.debug("[track-changes]: addMarkStep")) : u instanceof Mn ? (Bd({
9624
9624
  state: e,
9625
9625
  tr: t,
9626
9626
  step: u,
@@ -9671,11 +9671,11 @@ const Rd = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
9671
9671
  }, ol = (t) => {
9672
9672
  if (t === "initial" || t === "0.4.14") return Object.values(mb);
9673
9673
  };
9674
- var en, ws, x, zd, _d, Ki, Xi, $d, Ji, Yi, Gi, Zi, Qi, es, Vd, ts, ns, rs, is, Hd, Zn, Qn, jd, Wd, Ud, qd;
9674
+ var en, 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;
9675
9675
  const Qs = class Qs extends bg {
9676
9676
  constructor(n) {
9677
9677
  super();
9678
- ft(this, x);
9678
+ ft(this, S);
9679
9679
  ft(this, en);
9680
9680
  I(this, "extensionService");
9681
9681
  I(this, "extensionStorage", {});
@@ -9743,11 +9743,11 @@ const Qs = class Qs extends bg {
9743
9743
  // telemetry
9744
9744
  telemetry: null
9745
9745
  });
9746
- N(this, x, zd).call(this, n), N(this, x, $d).call(this, n), this.setOptions(n);
9746
+ N(this, S, _d).call(this, n), N(this, S, Vd).call(this, n), this.setOptions(n);
9747
9747
  let r = {
9748
- docx: () => N(this, x, _d).call(this, this.options),
9749
- text: () => N(this, x, Ki).call(this, this.options),
9750
- html: () => N(this, x, Ki).call(this, this.options),
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),
9751
9751
  default: () => {
9752
9752
  console.log("Not implemented.");
9753
9753
  }
@@ -9813,7 +9813,7 @@ const Qs = class Qs extends bg {
9813
9813
  }
9814
9814
  setDocumentMode(n) {
9815
9815
  let r = n?.toLowerCase() || "editing";
9816
- this.extensionService && (this.options.role === "viewer" && (r = "viewing"), this.options.role === "suggester" && r === "editing" && (r = "suggesting"), r === "viewing" ? (this.commands.toggleTrackChangesShowOriginal(), this.setEditable(!1, !1)) : r === "suggesting" ? (N(this, x, Yi).call(this, "TrackChangesBase"), this.commands.disableTrackChangesShowOriginal(), this.commands.enableTrackChanges(), this.setEditable(!0, !1)) : r === "editing" && (N(this, x, Yi).call(this, "TrackChangesBase"), this.commands.disableTrackChangesShowOriginal(), this.commands.disableTrackChanges(), this.setEditable(!0, !1)));
9816
+ this.extensionService && (this.options.role === "viewer" && (r = "viewing"), this.options.role === "suggester" && r === "editing" && (r = "suggesting"), r === "viewing" ? (this.commands.toggleTrackChangesShowOriginal(), this.setEditable(!1, !1)) : r === "suggesting" ? (N(this, S, Yi).call(this, "TrackChangesBase"), this.commands.disableTrackChangesShowOriginal(), this.commands.enableTrackChanges(), this.setEditable(!0, !1)) : r === "editing" && (N(this, S, Yi).call(this, "TrackChangesBase"), this.commands.disableTrackChangesShowOriginal(), this.commands.disableTrackChanges(), this.setEditable(!0, !1)));
9817
9817
  }
9818
9818
  /**
9819
9819
  * If we are replacing data and have a valid provider, listen for synced event
@@ -9822,19 +9822,23 @@ const Qs = class Qs extends bg {
9822
9822
  initializeCollaborationData() {
9823
9823
  if (!this.options.isNewFile || !this.options.collaborationProvider) return;
9824
9824
  const { collaborationProvider: n } = this.options, r = () => {
9825
- n.off("synced", r), N(this, x, Ji).call(this);
9825
+ n.off("synced", r), N(this, S, Ji).call(this);
9826
9826
  };
9827
- n.synced ? N(this, x, Ji).call(this) : n.on("synced", r);
9827
+ n.synced ? N(this, S, Ji).call(this) : n.on("synced", r);
9828
9828
  }
9829
9829
  /**
9830
9830
  * Set editor options and update state.
9831
9831
  * @param options List of options.
9832
9832
  */
9833
9833
  setOptions(n) {
9834
- this.options = {
9834
+ if (this.options = {
9835
9835
  ...this.options,
9836
9836
  ...n
9837
- }, this.options.isNewFile && this.options.isCommentsEnabled && (this.options.shouldLoadComments = !0), !(!this.view || !this.state || this.ifsDestroyed) && (this.options.editorProps && this.view.setProps(this.options.editorProps), this.view.updateState(this.state));
9837
+ }, this.options.collaborationProvider && this.options.ydoc) {
9838
+ const r = this.options.extensions.findIndex((o) => o.name === "history");
9839
+ r !== -1 && this.options.extensions.splice(r, 1);
9840
+ }
9841
+ this.options.isNewFile && this.options.isCommentsEnabled && (this.options.shouldLoadComments = !0), !(!this.view || !this.state || this.ifsDestroyed) && (this.options.editorProps && this.view.setProps(this.options.editorProps), this.view.updateState(this.state));
9838
9842
  }
9839
9843
  /**
9840
9844
  * Updates editable state.
@@ -9987,7 +9991,7 @@ const Qs = class Qs extends bg {
9987
9991
  * Export the editor document to DOCX.
9988
9992
  */
9989
9993
  async exportDocx({ isFinalDoc: n = !1, commentsType: r, comments: o = [] } = {}) {
9990
- const i = N(this, x, Ud).call(this, o), s = await this.converter.exportToDocx(
9994
+ const i = N(this, S, qd).call(this, o), s = await this.converter.exportToDocx(
9991
9995
  i,
9992
9996
  this.schema,
9993
9997
  this.storage.image.media,
@@ -10025,7 +10029,7 @@ const Qs = class Qs extends bg {
10025
10029
  * Destroy the editor.
10026
10030
  */
10027
10031
  destroy() {
10028
- this.emit("destroy"), this.view && this.view.destroy(), N(this, x, qd).call(this), this.removeAllListeners();
10032
+ this.emit("destroy"), this.view && this.view.destroy(), N(this, S, Kd).call(this), this.removeAllListeners();
10029
10033
  }
10030
10034
  static checkIfMigrationsNeeded(n) {
10031
10035
  n || (n = "initial");
@@ -10038,7 +10042,7 @@ const Qs = class Qs extends bg {
10038
10042
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
10039
10043
  */
10040
10044
  processCollaborationMigrations() {
10041
- if (console.debug("[checkVersionMigrations] Current editor version", "0.10.39"), !this.options.ydoc) return;
10045
+ if (console.debug("[checkVersionMigrations] Current editor version", "0.10.41"), !this.options.ydoc) return;
10042
10046
  let r = this.options.ydoc.getMap("meta").get("version");
10043
10047
  r || (r = "initial"), console.debug("[checkVersionMigrations] Document version", r);
10044
10048
  const o = ol(r) || [], s = this.state.plugins.find((c) => c.key.startsWith("y-sync"));
@@ -10060,26 +10064,26 @@ const Qs = class Qs extends bg {
10060
10064
  isNewFile: !0,
10061
10065
  shouldLoadComments: !0,
10062
10066
  replacedFile: !0
10063
- }), N(this, x, Qi).call(this), N(this, x, es).call(this), this.initDefaultStyles(), this.initializeCollaborationData(!0), this.options.ydoc || (N(this, x, Qn).call(this), N(this, x, Zn).call(this));
10067
+ }), 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));
10064
10068
  }
10065
10069
  };
10066
- en = new WeakMap(), ws = new WeakMap(), x = new WeakSet(), zd = function(n) {
10070
+ en = new WeakMap(), ws = new WeakMap(), S = new WeakSet(), _d = function(n) {
10067
10071
  if (!n.element && n.selector) {
10068
10072
  const { selector: r } = n;
10069
10073
  r.startsWith("#") || r.startsWith(".") ? n.element = document.querySelector(r) : n.element = document.getElementById(r), ["text", "html"].includes(n.mode) && n.element && n.element.classList.add("sd-super-editor-html");
10070
10074
  }
10071
10075
  n.element = n.isHeadless ? null : n.element || document.createElement("div");
10072
- }, _d = function(n) {
10073
- N(this, x, Gi).call(this), N(this, x, Zi).call(this), N(this, x, ts).call(this), N(this, x, Qi).call(this), N(this, x, es).call(this), N(this, x, Vd).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, x, 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, x, 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, x, Hd)), this.on("paginationUpdate", this.options.onPaginationUpdate), this.on("comment-positions", this.options.onCommentLocationsUpdate), this.initializeCollaborationData(), this.options.ydoc || (N(this, x, Qn).call(this), N(this, x, Zn).call(this)), window.setTimeout(() => {
10076
+ }, $d = function(n) {
10077
+ 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(() => {
10074
10078
  this.isDestroyed || this.emit("create", { editor: this });
10075
10079
  }, 0));
10076
10080
  }, Ki = function(n) {
10077
- (!n.extensions || !n.extensions.length) && (this.options.extensions = Xk()), N(this, x, Gi).call(this), N(this, x, Zi).call(this), N(this, x, ts).call(this), this.on("beforeCreate", this.options.onBeforeCreate), this.emit("beforeCreate", { editor: this }), this.on("contentError", this.options.onContentError), N(this, x, 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, x, 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(() => {
10081
+ (!n.extensions || !n.extensions.length) && (this.options.extensions = Xk()), 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(() => {
10078
10082
  this.isDestroyed || this.emit("create", { editor: this });
10079
10083
  }, 0);
10080
10084
  }, Xi = function({ editor: n, event: r }) {
10081
10085
  this.toolbar?.setActiveEditor(n), this.options.onFocus({ editor: n, event: r });
10082
- }, $d = function(n) {
10086
+ }, Vd = function(n) {
10083
10087
  n.isHeadless && (typeof navigator > "u" && (ei.navigator = { isHeadless: !0 }), n.mockDocument && (ei.document = n.mockDocument, ei.window = n.mockWindow));
10084
10088
  }, /**
10085
10089
  * Replace the current document with new data. Necessary for initializing a new collaboration file,
@@ -10088,9 +10092,9 @@ en = new WeakMap(), ws = new WeakMap(), x = new WeakSet(), zd = function(n) {
10088
10092
  Ji = function() {
10089
10093
  if (!this.options.isNewFile) return;
10090
10094
  this.options.isNewFile = !1;
10091
- const n = N(this, x, ns).call(this), r = this.state.tr.replaceWith(0, this.state.doc.content.size, n);
10095
+ const n = N(this, S, ns).call(this), r = this.state.tr.replaceWith(0, this.state.doc.content.size, n);
10092
10096
  this.view.dispatch(r), setTimeout(() => {
10093
- N(this, x, Qn).call(this), N(this, x, Zn).call(this);
10097
+ N(this, S, Qn).call(this), N(this, S, Zn).call(this);
10094
10098
  }, 50);
10095
10099
  }, Yi = function(n) {
10096
10100
  const r = this.extensionService?.plugins.find((i) => i.key.startsWith(n)), o = this.state.plugins.find((i) => i.key.startsWith(n));
@@ -10132,7 +10136,7 @@ es = function() {
10132
10136
  this.options.isNewFile ? (Object.entries(this.options.mediaFiles).forEach(([r, o]) => {
10133
10137
  n.set(r, o);
10134
10138
  }), this.storage.image.media = this.options.mediaFiles) : this.storage.image.media = Object.fromEntries(n.entries());
10135
- }, Vd = function() {
10139
+ }, Hd = function() {
10136
10140
  const n = this.converter.getDocumentFonts();
10137
10141
  if (n?.length) {
10138
10142
  const r = document.createElement("style");
@@ -10150,7 +10154,7 @@ ns = function() {
10150
10154
  let n;
10151
10155
  try {
10152
10156
  const { mode: r, fragment: o, isHeadless: i, content: s, loadFromSchema: a } = this.options;
10153
- r === "docx" ? (n = Md(this.converter, this.schema, this), n = N(this, x, Wd).call(this, n), this.options.html && (n = N(this, x, rs).call(this, this.options.html)), o && i && (n = ag(o, this.schema))) : (r === "text" || r === "html") && (a ? n = this.schema.nodeFromJSON(s) : s ? n = N(this, x, rs).call(this, s) : n = this.schema.topNodeType.createAndFill());
10157
+ r === "docx" ? (n = xd(this.converter, this.schema, this), n = N(this, S, Ud).call(this, n), this.options.html && (n = N(this, S, rs).call(this, this.options.html)), o && i && (n = ag(o, this.schema))) : (r === "text" || r === "html") && (a ? n = this.schema.nodeFromJSON(s) : s ? n = N(this, S, rs).call(this, s) : n = this.schema.topNodeType.createAndFill());
10154
10158
  } catch (r) {
10155
10159
  console.error(r), this.emit("contentError", { editor: this, error: r });
10156
10160
  }
@@ -10171,11 +10175,11 @@ rs = function(n) {
10171
10175
  * Creates PM View.
10172
10176
  */
10173
10177
  is = function() {
10174
- let n = N(this, x, ns).call(this);
10178
+ let n = N(this, S, ns).call(this);
10175
10179
  const r = { schema: this.schema };
10176
- this.options.ydoc || (r.doc = n), this.view = new Wc(this.options.element, {
10180
+ this.options.ydoc || (r.doc = n), this.view = new Uc(this.options.element, {
10177
10181
  ...this.options.editorProps,
10178
- dispatchTransaction: N(this, x, jd).bind(this),
10182
+ dispatchTransaction: N(this, S, Wd).bind(this),
10179
10183
  state: oo.create(r)
10180
10184
  });
10181
10185
  const o = this.state.reconfigure({
@@ -10184,8 +10188,8 @@ is = function() {
10184
10188
  this.view.updateState(o), this.createNodeViews();
10185
10189
  const i = this.view.dom;
10186
10190
  i.editor = this, this.options.telemetry?.sendReport();
10187
- }, Hd = function({ editor: n, ydoc: r }) {
10188
- this.options.collaborationIsReady || (console.debug("🔗 [super-editor] Collaboration ready"), this.options.onCollaborationReady({ editor: n, ydoc: r }), this.options.collaborationIsReady = !0, this.options.isNewFile || (N(this, x, Qn).call(this), N(this, x, Zn).call(this)));
10191
+ }, jd = function({ editor: n, ydoc: r }) {
10192
+ this.options.collaborationIsReady || (console.debug("🔗 [super-editor] Collaboration ready"), this.options.onCollaborationReady({ editor: n, ydoc: r }), this.options.collaborationIsReady = !0, this.options.isNewFile || (N(this, S, Qn).call(this), N(this, S, Zn).call(this)));
10189
10193
  }, /**
10190
10194
  * Initialize comments plugin
10191
10195
  */
@@ -10210,11 +10214,11 @@ Zn = function() {
10210
10214
  * The callback which is used to intercept View transactions.
10211
10215
  * @param {*} transaction State transaction.
10212
10216
  */
10213
- jd = function(n) {
10217
+ Wd = function(n) {
10214
10218
  if (this.view.isDestroyed) return;
10215
10219
  let r;
10216
10220
  try {
10217
- const c = de.getState(this.view.state)?.isTrackChangesActive ?? !1 ? Bd({
10221
+ const c = de.getState(this.view.state)?.isTrackChangesActive ?? !1 ? zd({
10218
10222
  tr: n,
10219
10223
  state: this.state,
10220
10224
  user: this.options.user
@@ -10253,7 +10257,7 @@ jd = function(n) {
10253
10257
  * @param {import('prosemirror-model').Node} doc The prosemirror document
10254
10258
  * @returns {import('prosemirror-model').Node} The updated prosemirror document
10255
10259
  */
10256
- Wd = function(n) {
10260
+ Ud = function(n) {
10257
10261
  const r = oo.create({
10258
10262
  schema: this.schema,
10259
10263
  doc: n
@@ -10265,7 +10269,7 @@ Wd = function(n) {
10265
10269
  *
10266
10270
  * @returns {Record<string, any>} The updated document JSON
10267
10271
  */
10268
- Ud = function(n = []) {
10272
+ qd = function(n = []) {
10269
10273
  const r = oo.create({
10270
10274
  schema: this.schema,
10271
10275
  doc: this.state.doc,
@@ -10275,7 +10279,7 @@ Ud = function(n = []) {
10275
10279
  }, /**
10276
10280
  * Destroy collaboration provider and ydoc
10277
10281
  */
10278
- qd = function() {
10282
+ Kd = function() {
10279
10283
  if (this.options.ydoc)
10280
10284
  try {
10281
10285
  console.debug("🔗 [super-editor] Ending collaboration"), this.options.collaborationProvider && this.options.collaborationProvider.disconnect(), this.options.ydoc && this.options.ydoc.destroy();
@@ -10346,7 +10350,7 @@ class Oe {
10346
10350
  return new Oe(...e);
10347
10351
  }
10348
10352
  }
10349
- const Kd = Q.create({
10353
+ const Xd = Q.create({
10350
10354
  name: "color",
10351
10355
  addOptions() {
10352
10356
  return {
@@ -10373,7 +10377,7 @@ const Kd = Q.create({
10373
10377
  unsetColor: () => ({ chain: t }) => t().setMark("textStyle", { color: null }).removeEmptyTextStyle().run()
10374
10378
  };
10375
10379
  }
10376
- }), Xd = Q.create({
10380
+ }), Jd = Q.create({
10377
10381
  name: "fontFamily",
10378
10382
  addOptions() {
10379
10383
  return {
@@ -10400,7 +10404,7 @@ const Kd = Q.create({
10400
10404
  unsetFontFamily: () => ({ chain: t }) => t().setMark("textStyle", { fontFamily: null }).removeEmptyTextStyle().run()
10401
10405
  };
10402
10406
  }
10403
- }), Jd = Q.create({
10407
+ }), Yd = Q.create({
10404
10408
  name: "fontSize",
10405
10409
  addOptions() {
10406
10410
  return {
@@ -10443,7 +10447,7 @@ const Kd = Q.create({
10443
10447
  unsetFontSize: () => ({ chain: t }) => t().setMark("textStyle", { fontSize: null }).removeEmptyTextStyle().run()
10444
10448
  };
10445
10449
  }
10446
- }), Yd = Q.create({
10450
+ }), Gd = Q.create({
10447
10451
  name: "textAlign",
10448
10452
  addOptions() {
10449
10453
  return {
@@ -10486,7 +10490,7 @@ const Kd = Q.create({
10486
10490
  "Mod-Shift-j": () => this.editor.commands.setTextAlign("justify")
10487
10491
  };
10488
10492
  }
10489
- }), Gd = Q.create({
10493
+ }), Zd = Q.create({
10490
10494
  name: "textIndent",
10491
10495
  addOptions() {
10492
10496
  return {
@@ -10542,7 +10546,7 @@ const Kd = Q.create({
10542
10546
  }).every((e) => e)
10543
10547
  };
10544
10548
  }
10545
- }), Zd = Q.create({
10549
+ }), Qd = Q.create({
10546
10550
  name: "lineHeight",
10547
10551
  addOptions() {
10548
10552
  return {
@@ -10572,7 +10576,7 @@ const Kd = Q.create({
10572
10576
  unsetLineHeight: () => ({ commands: t }) => this.options.types.map((e) => t.resetAttributes(e, "lineHeight")).every((e) => e)
10573
10577
  };
10574
10578
  }
10575
- }), Qd = Q.create({
10579
+ }), eu = Q.create({
10576
10580
  name: "formatCommands",
10577
10581
  addOptions() {
10578
10582
  return {};
@@ -10705,7 +10709,7 @@ class yb {
10705
10709
  (e.target == this.editorView.dom || !this.editorView.dom.contains(e.relatedTarget)) && this.setCursor(null);
10706
10710
  }
10707
10711
  }
10708
- const eu = Q.create({
10712
+ const tu = Q.create({
10709
10713
  name: "dropCursor",
10710
10714
  addOptions() {
10711
10715
  return {
@@ -10855,7 +10859,7 @@ function wb(t) {
10855
10859
  function vb() {
10856
10860
  return new G({
10857
10861
  props: {
10858
- decorations: Sb,
10862
+ decorations: xb,
10859
10863
  createSelectionBetween(t, e, n) {
10860
10864
  return e.pos == n.pos && re.valid(n) ? new re(n) : null;
10861
10865
  },
@@ -10905,13 +10909,13 @@ function Mb(t, e) {
10905
10909
  let i = t.state.tr.replace(n.pos, n.pos, new W(o, 0, 0));
10906
10910
  return i.setSelection(j.near(i.doc.resolve(n.pos + 1))), t.dispatch(i), !1;
10907
10911
  }
10908
- function Sb(t) {
10912
+ function xb(t) {
10909
10913
  if (!(t.selection instanceof re))
10910
10914
  return null;
10911
10915
  let e = document.createElement("div");
10912
10916
  return e.className = "ProseMirror-gapcursor", L.create(t.doc, [$.widget(t.selection.head, e, { key: "gapcursor" })]);
10913
10917
  }
10914
- const xb = Q.create({
10918
+ const Sb = Q.create({
10915
10919
  name: "gapCursor",
10916
10920
  addPmPlugins() {
10917
10921
  return [
@@ -11082,7 +11086,7 @@ const xb = Q.create({
11082
11086
  renderDOM({ htmlAttributes: t }) {
11083
11087
  return [Yr, D.mergeAttributes(this.options.htmlAttributes, t)];
11084
11088
  }
11085
- }), Fb = new Y("ai"), tu = Q.create({
11089
+ }), Fb = new Y("ai"), nu = Q.create({
11086
11090
  name: "ai",
11087
11091
  addCommands() {
11088
11092
  return {
@@ -11156,7 +11160,7 @@ const xb = Q.create({
11156
11160
  r.push(l);
11157
11161
  }
11158
11162
  }), { decorations: r };
11159
- }, nu = X.create({
11163
+ }, ru = X.create({
11160
11164
  name: "doc",
11161
11165
  topNode: !0,
11162
11166
  content: "block+",
@@ -11173,7 +11177,7 @@ const xb = Q.create({
11173
11177
  }
11174
11178
  };
11175
11179
  }
11176
- }), ru = X.create({
11180
+ }), ou = X.create({
11177
11181
  name: "text",
11178
11182
  group: "inline",
11179
11183
  inline: !0
@@ -11224,7 +11228,7 @@ function Oo(t) {
11224
11228
  }
11225
11229
  });
11226
11230
  }
11227
- const il = /^\s*([-+*])\s$/, ou = X.create({
11231
+ const il = /^\s*([-+*])\s$/, iu = X.create({
11228
11232
  name: "bulletList",
11229
11233
  group: "block list",
11230
11234
  content() {
@@ -11353,7 +11357,7 @@ function Vb(t) {
11353
11357
  let y = jb({ state: r, list: u });
11354
11358
  y.length && (f = y);
11355
11359
  }
11356
- let m = f[0], g = Ub({ state: r, listItems: f }), b = iu(), w = {
11360
+ let m = f[0], g = Ub({ state: r, listItems: f }), b = su(), w = {
11357
11361
  lvlText: m.node.attrs.lvlText ?? b.lvlText,
11358
11362
  listLevel: m.node.attrs.listLevel ?? b.listLevel,
11359
11363
  listNumberingType: m.node.attrs.listNumberingType ?? b.listNumberingType
@@ -11364,10 +11368,10 @@ function Vb(t) {
11364
11368
  }), l = !0, w = g), f.forEach((y, M) => {
11365
11369
  if (M === 0)
11366
11370
  return;
11367
- let { node: k, pos: A } = y, { lvlText: F, listLevel: S, listNumberingType: V } = k.attrs;
11371
+ let { node: k, pos: A } = y, { lvlText: F, listLevel: x, listNumberingType: V } = k.attrs;
11368
11372
  Array.isArray(w.listLevel) || (w.listLevel = JSON.parse(w.listLevel));
11369
11373
  let z = [...w.listLevel.slice(0, -1), w.listLevel.at(-1) + 1];
11370
- if (!(F === w.lvlText && V === w.listNumberingType && sl(S, z))) {
11374
+ if (!(F === w.lvlText && V === w.listNumberingType && sl(x, z))) {
11371
11375
  let { selection: H, storedMarks: se } = r, ce = se || H.$to.parentOffset && H.$from.marks();
11372
11376
  s.setNodeMarkup(A, void 0, {
11373
11377
  ...k.attrs,
@@ -11402,7 +11406,7 @@ function jb({ state: t, list: e }) {
11402
11406
  s && a.parent === e && r.push({ node: o, pos: i });
11403
11407
  }), r;
11404
11408
  }
11405
- function iu({ lvlText: t = "", listLevel: e = [], listNumberingType: n = "decimal" } = {}) {
11409
+ function su({ lvlText: t = "", listLevel: e = [], listNumberingType: n = "decimal" } = {}) {
11406
11410
  return {
11407
11411
  lvlText: t,
11408
11412
  listLevel: e,
@@ -11422,7 +11426,7 @@ function sl(t, e) {
11422
11426
  return t.length === e.length && t.every((n, r) => n === e[r]);
11423
11427
  }
11424
11428
  function Ub({ state: t, listItems: e }) {
11425
- let { doc: n } = t, r = e[0], { lvlText: o, listLevel: i, listNumberingType: s } = r.node.attrs, a = iu({
11429
+ let { doc: n } = t, r = e[0], { lvlText: o, listLevel: i, listNumberingType: s } = r.node.attrs, a = su({
11426
11430
  lvlText: "%1.",
11427
11431
  listLevel: [1],
11428
11432
  listNumberingType: "decimal"
@@ -11439,7 +11443,7 @@ function Ub({ state: t, listItems: e }) {
11439
11443
  listNumberingType: s
11440
11444
  };
11441
11445
  }
11442
- const al = /^(\d+)\.\s$/, su = X.create({
11446
+ const al = /^(\d+)\.\s$/, au = X.create({
11443
11447
  name: "orderedList",
11444
11448
  group: "block list",
11445
11449
  content() {
@@ -11480,7 +11484,7 @@ const al = /^(\d+)\.\s$/, su = X.create({
11480
11484
  renderDOM: (t) => {
11481
11485
  let e = t["list-style-type"];
11482
11486
  return e ? (e === "lowerLetter" && (e = "lowerAlpha"), {
11483
- style: `list-style-type: ${Pf(e)};`
11487
+ style: `list-style-type: ${If(e)};`
11484
11488
  }) : {};
11485
11489
  }
11486
11490
  },
@@ -11602,12 +11606,12 @@ const al = /^(\d+)\.\s$/, su = X.create({
11602
11606
  }), qb = ({ listLevel: t, lvlText: e, listNumberingType: n }) => {
11603
11607
  const r = Yb[n];
11604
11608
  return r ? r(t, e) : null;
11605
- }, Kb = (t, e) => js(t, e, String), au = (t, e) => js(t, e, Zb), Xb = (t, e) => au(t, e).toLowerCase(), Jb = (t, e) => lu(t, e).toLowerCase(), lu = (t, e) => js(t, e, (n) => Qb(n)), Yb = {
11609
+ }, Kb = (t, e) => js(t, e, String), lu = (t, e) => js(t, e, Zb), Xb = (t, e) => lu(t, e).toLowerCase(), Jb = (t, e) => cu(t, e).toLowerCase(), cu = (t, e) => js(t, e, (n) => Qb(n)), Yb = {
11606
11610
  decimal: Kb,
11607
11611
  lowerRoman: Xb,
11608
- upperRoman: au,
11612
+ upperRoman: lu,
11609
11613
  lowerLetter: Jb,
11610
- upperLetter: lu
11614
+ upperLetter: cu
11611
11615
  }, Gb = (t, e) => t.reduce((n, r, o) => n.replace(`%${o + 1}`, r), e), js = (t, e, n) => {
11612
11616
  const r = t.map(n);
11613
11617
  return Gb(r, e);
@@ -11731,7 +11735,7 @@ function t0(t, e, n) {
11731
11735
  function n0(t) {
11732
11736
  return t.childCount === 1 && t.firstChild?.type.name === "paragraph" && t.firstChild?.content.size === 0;
11733
11737
  }
11734
- const cu = X.create({
11738
+ const du = X.create({
11735
11739
  name: "listItem",
11736
11740
  content: "paragraph* block*",
11737
11741
  defining: !0,
@@ -11978,7 +11982,7 @@ const cu = X.create({
11978
11982
  e += `${r ? `font-family: ${r};` : ""} ${o ? `font-size: ${o};` : ""}`;
11979
11983
  }
11980
11984
  return e.trim();
11981
- }, oC = (t) => t?.converter ? (t.converter.linkedStyles || []).filter((n) => n.type === "paragraph" && n.definition.attrs).sort((n, r) => n.definition.attrs?.name.localeCompare(r.definition.attrs?.name)) : [], du = X.create({
11985
+ }, oC = (t) => t?.converter ? (t.converter.linkedStyles || []).filter((n) => n.type === "paragraph" && n.definition.attrs).sort((n, r) => n.definition.attrs?.name.localeCompare(r.definition.attrs?.name)) : [], uu = X.create({
11982
11986
  name: "paragraph",
11983
11987
  priority: 1e3,
11984
11988
  group: "block",
@@ -12095,7 +12099,7 @@ function d0(t, e) {
12095
12099
  }
12096
12100
  return 0;
12097
12101
  }
12098
- const uu = X.create({
12102
+ const fu = X.create({
12099
12103
  name: "heading",
12100
12104
  group: "block",
12101
12105
  content: "inline*",
@@ -12348,7 +12352,7 @@ const b0 = X.create({
12348
12352
  renderDOM() {
12349
12353
  return ["br", {}, 0];
12350
12354
  }
12351
- }), fu = X.create({
12355
+ }), pu = X.create({
12352
12356
  name: "hardBreak",
12353
12357
  group: "inline",
12354
12358
  inline: !0,
@@ -12436,7 +12440,7 @@ function ml(t, e) {
12436
12440
  }
12437
12441
  r = Math.ceil(Math.max(o, i)), t.style.setProperty("--table-border-width", `${r || n}px`);
12438
12442
  }
12439
- const gl = (t, e = null) => e ? t.createChecked(null, e) : t.createAndFill(), pu = ({
12443
+ const gl = (t, e = null) => e ? t.createChecked(null, e) : t.createAndFill(), hu = ({
12440
12444
  size: t = 0.66665,
12441
12445
  color: e = "#000000"
12442
12446
  } = {}) => ({
@@ -12465,7 +12469,7 @@ const gl = (t, e = null) => e ? t.createChecked(null, e) : t.createAndFill(), pu
12465
12469
  const u = r && d === 0 ? s : a;
12466
12470
  l.push(i.tableRow.createChecked(null, u));
12467
12471
  }
12468
- const c = pu();
12472
+ const c = hu();
12469
12473
  return i.table.createChecked({ borders: c }, l);
12470
12474
  };
12471
12475
  var ss, as;
@@ -12649,7 +12653,7 @@ function M0(t, e, n) {
12649
12653
  const l = s.attrs;
12650
12654
  for (let c = 0; c < l.colspan; c++) {
12651
12655
  const d = (o + c) % t.width, u = e[d * 2];
12652
- u != null && (!l.colwidth || l.colwidth[c] != u) && ((a || (a = S0(l)))[c] = u);
12656
+ u != null && (!l.colwidth || l.colwidth[c] != u) && ((a || (a = x0(l)))[c] = u);
12653
12657
  }
12654
12658
  a && t.problems.unshift({
12655
12659
  type: "colwidth mismatch",
@@ -12658,7 +12662,7 @@ function M0(t, e, n) {
12658
12662
  });
12659
12663
  }
12660
12664
  }
12661
- function S0(t) {
12665
+ function x0(t) {
12662
12666
  if (t.colwidth) return t.colwidth.slice();
12663
12667
  const e = [];
12664
12668
  for (let n = 0; n < t.colspan; n++) e.push(0);
@@ -12682,7 +12686,7 @@ function Hn(t) {
12682
12686
  return t.node(0).resolve(t.before(e + 1));
12683
12687
  return null;
12684
12688
  }
12685
- function x0(t) {
12689
+ function S0(t) {
12686
12690
  for (let e = t.depth; e > 0; e--) {
12687
12691
  const n = t.node(e).type.spec.tableRole;
12688
12692
  if (n === "cell" || n === "header_cell") return t.node(e);
@@ -12726,7 +12730,7 @@ function O0(t) {
12726
12730
  function Ws(t, e) {
12727
12731
  return t.depth == e.depth && t.pos >= e.start(-1) && t.pos <= e.end(-1);
12728
12732
  }
12729
- function hu(t, e, n) {
12733
+ function mu(t, e, n) {
12730
12734
  const r = t.node(-1), o = oe.get(r), i = t.start(-1), s = o.nextCell(t.pos - i, e, n);
12731
12735
  return s == null ? null : t.node(0).resolve(i + s);
12732
12736
  }
@@ -12734,7 +12738,7 @@ function dn(t, e, n = 1) {
12734
12738
  const r = { ...t, colspan: t.colspan - n };
12735
12739
  return r.colwidth && (r.colwidth = r.colwidth.slice(), r.colwidth.splice(e, n), r.colwidth.some((o) => o > 0) || (r.colwidth = null)), r;
12736
12740
  }
12737
- function mu(t, e, n = 1) {
12741
+ function gu(t, e, n = 1) {
12738
12742
  const r = { ...t, colspan: t.colspan + n };
12739
12743
  if (r.colwidth) {
12740
12744
  r.colwidth = r.colwidth.slice();
@@ -12765,7 +12769,7 @@ var J = class ht extends Z {
12765
12769
  if (!u)
12766
12770
  throw RangeError(`No cell with offset ${d} found`);
12767
12771
  const f = i + d + 1;
12768
- return new If(
12772
+ return new Rf(
12769
12773
  a.resolve(f),
12770
12774
  a.resolve(f + u.content.size)
12771
12775
  );
@@ -12915,12 +12919,12 @@ var J = class ht extends Z {
12915
12919
  };
12916
12920
  J.prototype.visible = !1;
12917
12921
  Z.jsonID("cell", J);
12918
- var D0 = class gu {
12922
+ var D0 = class yu {
12919
12923
  constructor(e, n) {
12920
12924
  this.anchor = e, this.head = n;
12921
12925
  }
12922
12926
  map(e) {
12923
- return new gu(e.map(this.anchor), e.map(this.head));
12927
+ return new yu(e.map(this.anchor), e.map(this.head));
12924
12928
  }
12925
12929
  resolve(e) {
12926
12930
  const n = e.resolve(this.anchor), r = e.resolve(this.head);
@@ -12980,7 +12984,7 @@ function I0(t, e, n) {
12980
12984
  return i && (e || (e = t.tr)).setSelection(i), e;
12981
12985
  }
12982
12986
  var R0 = new Y("fix-tables");
12983
- function yu(t, e, n, r) {
12987
+ function bu(t, e, n, r) {
12984
12988
  const o = t.childCount, i = e.childCount;
12985
12989
  e: for (let s = 0, a = 0; s < i; s++) {
12986
12990
  const l = e.child(s);
@@ -12989,15 +12993,15 @@ function yu(t, e, n, r) {
12989
12993
  a = c + 1, n += l.nodeSize;
12990
12994
  continue e;
12991
12995
  }
12992
- r(l, n), a < o && t.child(a).sameMarkup(l) ? yu(t.child(a), l, n + 1, r) : l.nodesBetween(0, l.content.size, r, n + 1), n += l.nodeSize;
12996
+ r(l, n), a < o && t.child(a).sameMarkup(l) ? bu(t.child(a), l, n + 1, r) : l.nodesBetween(0, l.content.size, r, n + 1), n += l.nodeSize;
12993
12997
  }
12994
12998
  }
12995
- function bu(t, e) {
12999
+ function wu(t, e) {
12996
13000
  let n;
12997
13001
  const r = (o, i) => {
12998
13002
  o.type.spec.tableRole == "table" && (n = L0(t, o, i, n));
12999
13003
  };
13000
- return e ? e.doc != t.doc && yu(e.doc, t.doc, 0, r) : t.doc.descendants(r), n;
13004
+ return e ? e.doc != t.doc && bu(e.doc, t.doc, 0, r) : t.doc.descendants(r), n;
13001
13005
  }
13002
13006
  function L0(t, e, n, r) {
13003
13007
  const o = oe.get(e);
@@ -13065,7 +13069,7 @@ function at(t) {
13065
13069
  e.$headCell.pos - o
13066
13070
  ) : i.findCell(n.pos - o), tableStart: o, map: i, table: r };
13067
13071
  }
13068
- function wu(t, { map: e, tableStart: n, table: r }, o) {
13072
+ function vu(t, { map: e, tableStart: n, table: r }, o) {
13069
13073
  let i = o > 0 ? -1 : 0;
13070
13074
  T0(e, r, o + i) && (i = o == 0 || o == e.width ? null : 0);
13071
13075
  for (let s = 0; s < e.height; s++) {
@@ -13075,7 +13079,7 @@ function wu(t, { map: e, tableStart: n, table: r }, o) {
13075
13079
  t.setNodeMarkup(
13076
13080
  t.mapping.map(n + l),
13077
13081
  null,
13078
- mu(c.attrs, o - e.colCount(l))
13082
+ gu(c.attrs, o - e.colCount(l))
13079
13083
  ), s += c.attrs.rowspan - 1;
13080
13084
  } else {
13081
13085
  const l = i == null ? we(r.type.schema).cell : r.nodeAt(e.map[a + i]).type, c = e.positionAt(s, o, r);
@@ -13088,7 +13092,7 @@ function F0(t, e) {
13088
13092
  if (!Ye(t)) return !1;
13089
13093
  if (e) {
13090
13094
  const n = at(t);
13091
- e(wu(t.tr, n, n.left));
13095
+ e(vu(t.tr, n, n.left));
13092
13096
  }
13093
13097
  return !0;
13094
13098
  }
@@ -13096,7 +13100,7 @@ function B0(t, e) {
13096
13100
  if (!Ye(t)) return !1;
13097
13101
  if (e) {
13098
13102
  const n = at(t);
13099
- e(wu(t.tr, n, n.right));
13103
+ e(vu(t.tr, n, n.right));
13100
13104
  }
13101
13105
  return !0;
13102
13106
  }
@@ -13140,7 +13144,7 @@ function $0(t, e, n) {
13140
13144
  return !1;
13141
13145
  return !0;
13142
13146
  }
13143
- function vu(t, { map: e, tableStart: n, table: r }, o) {
13147
+ function ku(t, { map: e, tableStart: n, table: r }, o) {
13144
13148
  var i;
13145
13149
  let s = n;
13146
13150
  for (let c = 0; c < o; c++) s += r.child(c).nodeSize;
@@ -13164,7 +13168,7 @@ function V0(t, e) {
13164
13168
  if (!Ye(t)) return !1;
13165
13169
  if (e) {
13166
13170
  const n = at(t);
13167
- e(vu(t.tr, n, n.top));
13171
+ e(ku(t.tr, n, n.top));
13168
13172
  }
13169
13173
  return !0;
13170
13174
  }
@@ -13172,7 +13176,7 @@ function H0(t, e) {
13172
13176
  if (!Ye(t)) return !1;
13173
13177
  if (e) {
13174
13178
  const n = at(t);
13175
- e(vu(t.tr, n, n.bottom));
13179
+ e(ku(t.tr, n, n.bottom));
13176
13180
  }
13177
13181
  return !0;
13178
13182
  }
@@ -13258,7 +13262,7 @@ function bl(t, e) {
13258
13262
  if (l == null || c == null)
13259
13263
  return !0;
13260
13264
  if (i.setNodeMarkup(l + r.tableStart, null, {
13261
- ...mu(
13265
+ ...gu(
13262
13266
  c.attrs,
13263
13267
  c.attrs.colspan,
13264
13268
  r.right - r.left - c.attrs.colspan
@@ -13287,7 +13291,7 @@ function q0(t) {
13287
13291
  if (o.$anchorCell.pos != o.$headCell.pos) return !1;
13288
13292
  i = o.$anchorCell.nodeAfter, s = o.$anchorCell.pos;
13289
13293
  } else {
13290
- if (i = x0(o.$from), !i) return !1;
13294
+ if (i = S0(o.$from), !i) return !1;
13291
13295
  s = (r = Hn(o.$from)) == null ? void 0 : r.pos;
13292
13296
  }
13293
13297
  if (i == null || s == null || i.attrs.colspan == 1 && i.attrs.rowspan == 1)
@@ -13542,7 +13546,7 @@ function Q0(t, e) {
13542
13546
  }
13543
13547
  function cs(t, e) {
13544
13548
  const n = t.createAndFill();
13545
- return new Rf(n).replace(0, n.content.size, e).doc;
13549
+ return new Lf(n).replace(0, n.content.size, e).doc;
13546
13550
  }
13547
13551
  function ew({ width: t, height: e, rows: n }, r, o) {
13548
13552
  if (t != r) {
@@ -13661,7 +13665,7 @@ function Ml(t, e, n, r, o, i, s, a) {
13661
13665
  }
13662
13666
  return l;
13663
13667
  }
13664
- function Sl(t, e, n, r, o) {
13668
+ function xl(t, e, n, r, o) {
13665
13669
  let i = n ? t.doc.nodeAt(n - 1) : t.doc;
13666
13670
  if (!i)
13667
13671
  throw new Error("No table found");
@@ -13717,7 +13721,7 @@ function Zr(t, e) {
13717
13721
  Z.near(i.$headCell, e)
13718
13722
  );
13719
13723
  if (t != "horiz" && !i.empty) return !1;
13720
- const s = ku(o, t, e);
13724
+ const s = Cu(o, t, e);
13721
13725
  if (s == null) return !1;
13722
13726
  if (t == "horiz")
13723
13727
  return lo(
@@ -13726,7 +13730,7 @@ function Zr(t, e) {
13726
13730
  Z.near(n.doc.resolve(i.head + e), e)
13727
13731
  );
13728
13732
  {
13729
- const a = n.doc.resolve(s), l = hu(a, t, e);
13733
+ const a = n.doc.resolve(s), l = mu(a, t, e);
13730
13734
  let c;
13731
13735
  return l ? c = Z.near(l, 1) : e < 0 ? c = Z.near(n.doc.resolve(a.before(-1)), -1) : c = Z.near(n.doc.resolve(a.after(-1)), 1), lo(n, r, c);
13732
13736
  }
@@ -13740,11 +13744,11 @@ function Qr(t, e) {
13740
13744
  if (i instanceof J)
13741
13745
  s = i;
13742
13746
  else {
13743
- const l = ku(o, t, e);
13747
+ const l = Cu(o, t, e);
13744
13748
  if (l == null) return !1;
13745
13749
  s = new J(n.doc.resolve(l));
13746
13750
  }
13747
- const a = hu(s.$headCell, t, e);
13751
+ const a = mu(s.$headCell, t, e);
13748
13752
  return a ? lo(
13749
13753
  n,
13750
13754
  r,
@@ -13774,10 +13778,10 @@ function ow(t, e, n) {
13774
13778
  o.$anchorCell.pos - s,
13775
13779
  o.$headCell.pos - s
13776
13780
  );
13777
- return r = ew(r, a.right - a.left, a.bottom - a.top), Sl(t.state, t.dispatch, s, a, r), !0;
13781
+ return r = ew(r, a.right - a.left, a.bottom - a.top), xl(t.state, t.dispatch, s, a, r), !0;
13778
13782
  } else if (r) {
13779
13783
  const i = Vo(t.state), s = i.start(-1);
13780
- return Sl(
13784
+ return xl(
13781
13785
  t.state,
13782
13786
  t.dispatch,
13783
13787
  s,
@@ -13790,7 +13794,7 @@ function ow(t, e, n) {
13790
13794
  function iw(t, e) {
13791
13795
  var n;
13792
13796
  if (e.ctrlKey || e.metaKey) return;
13793
- const r = xl(t, e.target);
13797
+ const r = Sl(t, e.target);
13794
13798
  let o;
13795
13799
  if (e.shiftKey && t.state.selection instanceof J)
13796
13800
  i(t.state.selection.$anchorCell, e), e.preventDefault();
@@ -13818,13 +13822,13 @@ function iw(t, e) {
13818
13822
  let u;
13819
13823
  if (d != null)
13820
13824
  u = t.state.doc.resolve(d);
13821
- else if (xl(t, c.target) != r && (u = pi(t, e), !u))
13825
+ else if (Sl(t, c.target) != r && (u = pi(t, e), !u))
13822
13826
  return s();
13823
13827
  u && i(u, c);
13824
13828
  }
13825
13829
  t.root.addEventListener("mouseup", s), t.root.addEventListener("dragstart", s), t.root.addEventListener("mousemove", a);
13826
13830
  }
13827
- function ku(t, e, n) {
13831
+ function Cu(t, e, n) {
13828
13832
  if (!(t.state.selection instanceof j)) return null;
13829
13833
  const { $head: r } = t.state.selection;
13830
13834
  for (let o = r.depth - 1; o >= 0; o--) {
@@ -13837,7 +13841,7 @@ function ku(t, e, n) {
13837
13841
  }
13838
13842
  return null;
13839
13843
  }
13840
- function xl(t, e) {
13844
+ function Sl(t, e) {
13841
13845
  for (; e && e != t.dom; e = e.parentNode)
13842
13846
  if (e.nodeName == "TD" || e.nodeName == "TH")
13843
13847
  return e;
@@ -13974,14 +13978,14 @@ function cw(t, e, n, r) {
13974
13978
  if (c.colCount(a.pos - d) + a.nodeAfter.attrs.colspan - 1 == c.width - 1)
13975
13979
  return;
13976
13980
  }
13977
- Cu(t, s);
13981
+ Mu(t, s);
13978
13982
  }
13979
13983
  }
13980
13984
  }
13981
13985
  function dw(t) {
13982
13986
  if (!t.editable) return;
13983
13987
  const e = Pe.getState(t.state);
13984
- e && e.activeHandle > -1 && !e.dragging && Cu(t, -1);
13988
+ e && e.activeHandle > -1 && !e.dragging && Mu(t, -1);
13985
13989
  }
13986
13990
  function uw(t, e, n, r) {
13987
13991
  var o;
@@ -14057,7 +14061,7 @@ function Ol(t, e, n) {
14057
14061
  const r = e.clientX - t.startX;
14058
14062
  return Math.max(n, t.startWidth + r);
14059
14063
  }
14060
- function Cu(t, e) {
14064
+ function Mu(t, e) {
14061
14065
  t.dispatch(
14062
14066
  t.state.tr.setMeta(Pe, { setHandle: e })
14063
14067
  );
@@ -14149,7 +14153,7 @@ function yw({
14149
14153
  appendTransaction(e, n, r) {
14150
14154
  return I0(
14151
14155
  r,
14152
- bu(r, n),
14156
+ wu(r, n),
14153
14157
  t
14154
14158
  );
14155
14159
  }
@@ -14163,7 +14167,7 @@ const bw = (t) => t instanceof J, eo = ({ editor: t }) => {
14163
14167
  if (i.type.name === "table") return !1;
14164
14168
  ["tableCell", "tableHeader"].includes(i.type.name) && (n += 1);
14165
14169
  }), n === e.ranges.length ? (t.commands.deleteTable(), !0) : !1;
14166
- }, Mu = ({
14170
+ }, xu = ({
14167
14171
  size: t = 0.66665,
14168
14172
  color: e = "#000000"
14169
14173
  } = {}) => ({
@@ -14243,7 +14247,7 @@ const bw = (t) => t instanceof J, eo = ({ editor: t }) => {
14243
14247
  return [{ tag: "table" }];
14244
14248
  },
14245
14249
  renderDOM({ node: t, htmlAttributes: e }) {
14246
- const { colgroup: n, tableWidth: r, tableMinWidth: o } = Lf(
14250
+ const { colgroup: n, tableWidth: r, tableMinWidth: o } = Ff(
14247
14251
  t,
14248
14252
  this.options.cellMinWidth
14249
14253
  );
@@ -14282,10 +14286,10 @@ const bw = (t) => t instanceof J, eo = ({ editor: t }) => {
14282
14286
  setCellAttr: (t, e) => ({ state: n, dispatch: r }) => K0(t, e)(n, r),
14283
14287
  goToNextCell: () => ({ state: t, dispatch: e }) => kl(1)(t, e),
14284
14288
  goToPreviousCell: () => ({ state: t, dispatch: e }) => kl(-1)(t, e),
14285
- fixTables: () => ({ state: t, dispatch: e }) => (e && bu(t), !0),
14289
+ fixTables: () => ({ state: t, dispatch: e }) => (e && wu(t), !0),
14286
14290
  setCellSelection: (t) => ({ tr: e, dispatch: n }) => (n && e.setSelection(J.create(e.doc, t.anchorCell, t.headCell)), !0),
14287
14291
  deleteCellAndTableBorders: () => ({ chain: t, state: e, tr: n }) => {
14288
- if (!Td(e))
14292
+ if (!Dd(e))
14289
14293
  return !1;
14290
14294
  const r = He((s) => s.type.name === this.name)(e.selection);
14291
14295
  if (!r)
@@ -14294,11 +14298,11 @@ const bw = (t) => t instanceof J, eo = ({ editor: t }) => {
14294
14298
  return e.doc.nodesBetween(o, i, (s, a) => {
14295
14299
  ["tableCell", "tableHeader"].includes(s.type.name) && n.setNodeMarkup(a, void 0, {
14296
14300
  ...s.attrs,
14297
- borders: Mu({ size: 0 })
14301
+ borders: xu({ size: 0 })
14298
14302
  });
14299
14303
  }), n.setNodeMarkup(r.pos, void 0, {
14300
14304
  ...r.node.attrs,
14301
- borders: pu({ size: 0 })
14305
+ borders: hu({ size: 0 })
14302
14306
  }), !0;
14303
14307
  }
14304
14308
  };
@@ -14340,7 +14344,7 @@ const bw = (t) => t instanceof J, eo = ({ editor: t }) => {
14340
14344
  }))
14341
14345
  };
14342
14346
  }
14343
- }), xu = X.create({
14347
+ }), Au = X.create({
14344
14348
  name: "tableHeader",
14345
14349
  content: "block+",
14346
14350
  tableRole: "header_cell",
@@ -14376,7 +14380,7 @@ const bw = (t) => t instanceof J, eo = ({ editor: t }) => {
14376
14380
  renderDOM({ htmlAttributes: t }) {
14377
14381
  return ["th", D.mergeAttributes(this.options.htmlAttributes, t), 0];
14378
14382
  }
14379
- }), Au = X.create({
14383
+ }), Ou = X.create({
14380
14384
  name: "tableRow",
14381
14385
  content: "(tableCell | tableHeader)*",
14382
14386
  tableRole: "row",
@@ -14400,7 +14404,7 @@ const bw = (t) => t instanceof J, eo = ({ editor: t }) => {
14400
14404
  renderDOM({ htmlAttributes: t }) {
14401
14405
  return ["tr", D.mergeAttributes(this.options.htmlAttributes, t), 0];
14402
14406
  }
14403
- }), Ou = X.create({
14407
+ }), Tu = X.create({
14404
14408
  name: "tableCell",
14405
14409
  content: "block+",
14406
14410
  tableRole: "cell",
@@ -14458,7 +14462,7 @@ const bw = (t) => t instanceof J, eo = ({ editor: t }) => {
14458
14462
  }
14459
14463
  },
14460
14464
  borders: {
14461
- default: () => Mu(),
14465
+ default: () => xu(),
14462
14466
  renderDOM({ borders: t }) {
14463
14467
  return t ? { style: ["top", "right", "bottom", "left"].map((r) => {
14464
14468
  const o = t?.[r];
@@ -14631,7 +14635,7 @@ yt = new WeakSet(), Jt = function({ displayLabel: e } = {}) {
14631
14635
  content: o
14632
14636
  };
14633
14637
  };
14634
- function Tu(t) {
14638
+ function Du(t) {
14635
14639
  let e = [];
14636
14640
  return !t.steps.length || t.meta && !Object.keys(t.meta).every((n) => ["inputType", "uiEvent", "paste"].includes(n)) || ["historyUndo", "historyRedo"].includes(t.getMeta("inputType")) || ["drop"].includes(t.getMeta("uiEvent")) || t.getMeta("fieldAnnotationUpdate") === !0 || t.steps.forEach((n, r) => {
14637
14641
  if (n instanceof $t && n.from !== n.to) {
@@ -14642,8 +14646,8 @@ function Tu(t) {
14642
14646
  }
14643
14647
  }), e;
14644
14648
  }
14645
- function Du(t, e) {
14646
- let n = Tu(e);
14649
+ function Nu(t, e) {
14650
+ let n = Du(e);
14647
14651
  n.length > 0 && setTimeout(() => {
14648
14652
  t.emit("fieldAnnotationDeleted", {
14649
14653
  editor: t,
@@ -14651,7 +14655,7 @@ function Du(t, e) {
14651
14655
  });
14652
14656
  }, 0);
14653
14657
  }
14654
- const { findChildren: vw } = Dd;
14658
+ const { findChildren: vw } = Nd;
14655
14659
  function It(t) {
14656
14660
  return vw(t.doc, (n) => n.type.name === "fieldAnnotation");
14657
14661
  }
@@ -14664,7 +14668,7 @@ const kw = (t = {}) => {
14664
14668
  return null;
14665
14669
  },
14666
14670
  apply(r, o) {
14667
- return Du(e, r), o;
14671
+ return Nu(e, r), o;
14668
14672
  }
14669
14673
  },
14670
14674
  props: {
@@ -14750,7 +14754,7 @@ function Cw({ fieldAnnotation: t, editor: e, view: n, event: r }) {
14750
14754
  }
14751
14755
  function Mw(t, e) {
14752
14756
  return It(e).map(({ node: r, pos: o }) => {
14753
- let i = Od(t, o, o + r.nodeSize);
14757
+ let i = Td(t, o, o + r.nodeSize);
14754
14758
  return {
14755
14759
  node: r,
14756
14760
  pos: o,
@@ -14758,15 +14762,15 @@ function Mw(t, e) {
14758
14762
  };
14759
14763
  });
14760
14764
  }
14761
- function Sw(t, e) {
14765
+ function xw(t, e) {
14762
14766
  let n = It(e), r = [];
14763
14767
  return n.forEach((o) => {
14764
14768
  t(o.node) && r.push(o);
14765
14769
  }), r;
14766
14770
  }
14767
- const { findChildren: xw } = Dd;
14771
+ const { findChildren: Sw } = Nd;
14768
14772
  function uo(t, e) {
14769
- return xw(e.doc, (r) => {
14773
+ return Sw(e.doc, (r) => {
14770
14774
  let o = r.type.name === "fieldAnnotation";
14771
14775
  return Array.isArray(t) ? o && t.includes(r.attrs.fieldId) : o && r.attrs.fieldId === t;
14772
14776
  });
@@ -14791,14 +14795,14 @@ function fo(t, e, n) {
14791
14795
  }
14792
14796
  const sC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14793
14797
  __proto__: null,
14794
- findFieldAnnotations: Sw,
14798
+ findFieldAnnotations: xw,
14795
14799
  findFieldAnnotationsBetween: fo,
14796
14800
  findFieldAnnotationsByFieldId: uo,
14797
14801
  findFirstFieldAnnotationByFieldId: Aw,
14798
- findRemovedFieldAnnotations: Tu,
14802
+ findRemovedFieldAnnotations: Du,
14799
14803
  getAllFieldAnnotations: It,
14800
14804
  getAllFieldAnnotationsWithRect: Mw,
14801
- trackFieldAnnotationsDeletion: Du
14805
+ trackFieldAnnotationsDeletion: Nu
14802
14806
  }, Symbol.toStringTag, { value: "Module" }));
14803
14807
  function us(t, e, n) {
14804
14808
  return Math.min(Math.max(t, n), e);
@@ -14874,7 +14878,7 @@ function _w(t) {
14874
14878
  };
14875
14879
  return `#${i(e)}${i(n)}${i(r)}${o < 1 ? i(Math.round(o * 255)) : ""}`;
14876
14880
  }
14877
- const fs = "annotation", Nu = "annotation-content", Eu = X.create({
14881
+ const fs = "annotation", Eu = "annotation-content", Pu = X.create({
14878
14882
  name: "fieldAnnotation",
14879
14883
  group: "inline",
14880
14884
  inline: !0,
@@ -14887,7 +14891,7 @@ const fs = "annotation", Nu = "annotation-content", Eu = X.create({
14887
14891
  class: fs
14888
14892
  },
14889
14893
  annotationClass: fs,
14890
- annotationContentClass: Nu,
14894
+ annotationContentClass: Eu,
14891
14895
  types: ["text", "image", "signature", "checkbox", "html", "link"],
14892
14896
  // annotation types
14893
14897
  defaultType: "text",
@@ -15400,7 +15404,7 @@ const To = new Y("ImagePlaceholder"), Vw = (t = {}) => new G({
15400
15404
  }), aC = (t, e) => {
15401
15405
  let r = To.getState(t)?.find(null, null, (o) => o.id === e);
15402
15406
  return r?.length ? r[0].from : null;
15403
- }, Pu = X.create({
15407
+ }, Iu = X.create({
15404
15408
  name: "image",
15405
15409
  group: "inline",
15406
15410
  inline: !0,
@@ -15507,7 +15511,7 @@ const To = new Y("ImagePlaceholder"), Vw = (t = {}) => new G({
15507
15511
  renderDOM({ htmlAttributes: t }) {
15508
15512
  return ["a", D.mergeAttributes(this.options.htmlAttributes, t)];
15509
15513
  }
15510
- }), Iu = X.create({
15514
+ }), Ru = X.create({
15511
15515
  name: "mention",
15512
15516
  group: "inline",
15513
15517
  inline: !0,
@@ -15660,7 +15664,7 @@ const To = new Y("ImagePlaceholder"), Vw = (t = {}) => new G({
15660
15664
  0
15661
15665
  ];
15662
15666
  }
15663
- }), Ru = Oe.create({
15667
+ }), Lu = Oe.create({
15664
15668
  name: "textStyle",
15665
15669
  addOptions() {
15666
15670
  return {
@@ -15672,7 +15676,7 @@ const To = new Y("ImagePlaceholder"), Vw = (t = {}) => new G({
15672
15676
  {
15673
15677
  tag: "span",
15674
15678
  getAttrs: (t) => {
15675
- const e = t.hasAttribute("style"), n = t.classList.contains(fs) || t.classList.contains(Nu);
15679
+ const e = t.hasAttribute("style"), n = t.classList.contains(fs) || t.classList.contains(Eu);
15676
15680
  return !e || n ? !1 : {};
15677
15681
  }
15678
15682
  }
@@ -15689,7 +15693,7 @@ const To = new Y("ImagePlaceholder"), Vw = (t = {}) => new G({
15689
15693
  }
15690
15694
  };
15691
15695
  }
15692
- }), Lu = Oe.create({
15696
+ }), Fu = Oe.create({
15693
15697
  name: "bold",
15694
15698
  addOptions() {
15695
15699
  return {
@@ -15721,7 +15725,7 @@ const To = new Y("ImagePlaceholder"), Vw = (t = {}) => new G({
15721
15725
  "Mod-B": () => this.editor.commands.toggleBold()
15722
15726
  };
15723
15727
  }
15724
- }), Fu = Oe.create({
15728
+ }), Bu = Oe.create({
15725
15729
  name: "italic",
15726
15730
  addOptions() {
15727
15731
  return {
@@ -15753,7 +15757,7 @@ const To = new Y("ImagePlaceholder"), Vw = (t = {}) => new G({
15753
15757
  "Mod-I": () => this.editor.commands.toggleItalic()
15754
15758
  };
15755
15759
  }
15756
- }), Bu = Oe.create({
15760
+ }), zu = Oe.create({
15757
15761
  name: "underline",
15758
15762
  addOptions() {
15759
15763
  return {
@@ -15791,7 +15795,7 @@ const To = new Y("ImagePlaceholder"), Vw = (t = {}) => new G({
15791
15795
  "Mod-U": () => this.editor.commands.toggleUnderline()
15792
15796
  };
15793
15797
  }
15794
- }), zu = Oe.create({
15798
+ }), _u = Oe.create({
15795
15799
  name: "highlight",
15796
15800
  addOptions() {
15797
15801
  return {
@@ -15829,7 +15833,7 @@ const To = new Y("ImagePlaceholder"), Vw = (t = {}) => new G({
15829
15833
  "Mod-Shift-h": () => this.editor.commands.toggleHighlight()
15830
15834
  };
15831
15835
  }
15832
- }), _u = Oe.create({
15836
+ }), $u = Oe.create({
15833
15837
  name: "strike",
15834
15838
  addOptions() {
15835
15839
  return {
@@ -15858,7 +15862,7 @@ const To = new Y("ImagePlaceholder"), Vw = (t = {}) => new G({
15858
15862
  "Mod-Shift-s": () => this.editor.commands.toggleStrike()
15859
15863
  };
15860
15864
  }
15861
- }), $u = Oe.create({
15865
+ }), Vu = Oe.create({
15862
15866
  name: "link",
15863
15867
  priority: 1e3,
15864
15868
  keepOnSplit: !1,
@@ -15917,7 +15921,7 @@ function El(t, e) {
15917
15921
  o && n.push(o);
15918
15922
  }), !t || t.replace(Kw, "").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))`, "i"));
15919
15923
  }
15920
- const Xw = "track-insert", Vu = Oe.create({
15924
+ const Xw = "track-insert", Hu = Oe.create({
15921
15925
  name: $e,
15922
15926
  group: "track",
15923
15927
  inclusive: !1,
@@ -15966,7 +15970,7 @@ const Xw = "track-insert", Vu = Oe.create({
15966
15970
  renderDOM({ htmlAttributes: t }) {
15967
15971
  return ["span", D.mergeAttributes(this.options.htmlAttributes, t), 0];
15968
15972
  }
15969
- }), Jw = "track-delete", Hu = Oe.create({
15973
+ }), Jw = "track-delete", ju = Oe.create({
15970
15974
  name: ue,
15971
15975
  group: "track",
15972
15976
  inclusive: !1,
@@ -16026,19 +16030,19 @@ const Xw = "track-insert", Vu = Oe.create({
16026
16030
  return Array.isArray(e) ? e.filter((n) => Object.hasOwn(n, "type") && Object.hasOwn(n, "attrs")) : [];
16027
16031
  }, lC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
16028
16032
  __proto__: null,
16029
- addMarkStep: Ld,
16033
+ addMarkStep: Fd,
16030
16034
  documentHelpers: Zy,
16031
16035
  findTrackedMarkBetween: zs,
16032
16036
  getTrackChanges: $s,
16033
- markDeletion: Ad,
16034
- markInsertion: xd,
16037
+ markDeletion: Od,
16038
+ markInsertion: Ad,
16035
16039
  markWrapping: fb,
16036
16040
  parseFormatList: ps,
16037
- removeMarkStep: Fd,
16041
+ removeMarkStep: Bd,
16038
16042
  replaceAroundStep: pb,
16039
- replaceStep: Rd,
16040
- trackedTransaction: Bd
16041
- }, Symbol.toStringTag, { value: "Module" })), Yw = "track-format", ju = Oe.create({
16043
+ replaceStep: Ld,
16044
+ trackedTransaction: zd
16045
+ }, Symbol.toStringTag, { value: "Module" })), Yw = "track-format", Wu = Oe.create({
16042
16046
  name: Me,
16043
16047
  group: "track",
16044
16048
  inclusive: !1,
@@ -16309,9 +16313,9 @@ const Xw = "track-insert", Vu = Oe.create({
16309
16313
  })];
16310
16314
  }
16311
16315
  });
16312
- var De = "top", We = "bottom", Ue = "right", Ne = "left", Us = "auto", Ir = [De, We, Ue, Ne], Rn = "start", Mr = "end", Qw = "clippingParents", Wu = "viewport", Yn = "popper", ev = "reference", Il = /* @__PURE__ */ Ir.reduce(function(t, e) {
16316
+ var De = "top", We = "bottom", Ue = "right", Ne = "left", Us = "auto", Ir = [De, We, Ue, Ne], Rn = "start", Mr = "end", Qw = "clippingParents", Uu = "viewport", Yn = "popper", ev = "reference", Il = /* @__PURE__ */ Ir.reduce(function(t, e) {
16313
16317
  return t.concat([e + "-" + Rn, e + "-" + Mr]);
16314
- }, []), Uu = /* @__PURE__ */ [].concat(Ir, [Us]).reduce(function(t, e) {
16318
+ }, []), qu = /* @__PURE__ */ [].concat(Ir, [Us]).reduce(function(t, e) {
16315
16319
  return t.concat([e, e + "-" + Rn, e + "-" + Mr]);
16316
16320
  }, []), tv = "beforeRead", nv = "read", rv = "afterRead", ov = "beforeMain", iv = "main", sv = "afterMain", av = "beforeWrite", lv = "write", cv = "afterWrite", dv = [tv, nv, rv, ov, iv, sv, av, lv, cv];
16317
16321
  function st(t) {
@@ -16374,7 +16378,7 @@ function fv(t) {
16374
16378
  });
16375
16379
  };
16376
16380
  }
16377
- const qu = {
16381
+ const Ku = {
16378
16382
  name: "applyStyles",
16379
16383
  enabled: !0,
16380
16384
  phase: "write",
@@ -16392,14 +16396,14 @@ function hs() {
16392
16396
  return e.brand + "/" + e.version;
16393
16397
  }).join(" ") : navigator.userAgent;
16394
16398
  }
16395
- function Ku() {
16399
+ function Xu() {
16396
16400
  return !/^((?!chrome|android).)*safari/i.test(hs());
16397
16401
  }
16398
16402
  function Fn(t, e, n) {
16399
16403
  e === void 0 && (e = !1), n === void 0 && (n = !1);
16400
16404
  var r = t.getBoundingClientRect(), o = 1, i = 1;
16401
16405
  e && je(t) && (o = t.offsetWidth > 0 && Ln(r.width) / t.offsetWidth || 1, i = t.offsetHeight > 0 && Ln(r.height) / t.offsetHeight || 1);
16402
- var s = un(t) ? Le(t) : window, a = s.visualViewport, l = !Ku() && n, c = (r.left + (l && a ? a.offsetLeft : 0)) / o, d = (r.top + (l && a ? a.offsetTop : 0)) / i, u = r.width / o, f = r.height / i;
16406
+ var s = un(t) ? Le(t) : window, a = s.visualViewport, l = !Xu() && n, c = (r.left + (l && a ? a.offsetLeft : 0)) / o, d = (r.top + (l && a ? a.offsetTop : 0)) / i, u = r.width / o, f = r.height / i;
16403
16407
  return {
16404
16408
  width: u,
16405
16409
  height: f,
@@ -16420,7 +16424,7 @@ function Ks(t) {
16420
16424
  height: r
16421
16425
  };
16422
16426
  }
16423
- function Xu(t, e) {
16427
+ function Ju(t, e) {
16424
16428
  var n = e.getRootNode && e.getRootNode();
16425
16429
  if (t.contains(e))
16426
16430
  return !0;
@@ -16493,7 +16497,7 @@ function mv(t, e, n) {
16493
16497
  var r = sr(t, e, n);
16494
16498
  return r > n ? n : r;
16495
16499
  }
16496
- function Ju() {
16500
+ function Yu() {
16497
16501
  return {
16498
16502
  top: 0,
16499
16503
  right: 0,
@@ -16501,10 +16505,10 @@ function Ju() {
16501
16505
  left: 0
16502
16506
  };
16503
16507
  }
16504
- function Yu(t) {
16505
- return Object.assign({}, Ju(), t);
16508
+ function Gu(t) {
16509
+ return Object.assign({}, Yu(), t);
16506
16510
  }
16507
- function Gu(t, e) {
16511
+ function Zu(t, e) {
16508
16512
  return e.reduce(function(n, r) {
16509
16513
  return n[r] = t, n;
16510
16514
  }, {});
@@ -16512,7 +16516,7 @@ function Gu(t, e) {
16512
16516
  var gv = function(e, n) {
16513
16517
  return e = typeof e == "function" ? e(Object.assign({}, n.rects, {
16514
16518
  placement: n.placement
16515
- })) : e, Yu(typeof e != "number" ? e : Gu(e, Ir));
16519
+ })) : e, Gu(typeof e != "number" ? e : Zu(e, Ir));
16516
16520
  };
16517
16521
  function yv(t) {
16518
16522
  var e, n = t.state, r = t.name, o = t.options, i = n.elements.arrow, s = n.modifiersData.popperOffsets, a = rt(n.placement), l = Xs(a), c = [Ne, Ue].indexOf(a) >= 0, d = c ? "height" : "width";
@@ -16523,7 +16527,7 @@ function yv(t) {
16523
16527
  }
16524
16528
  function bv(t) {
16525
16529
  var e = t.state, n = t.options, r = n.element, o = r === void 0 ? "[data-popper-arrow]" : r;
16526
- o != null && (typeof o == "string" && (o = e.elements.popper.querySelector(o), !o) || Xu(e.elements.popper, o) && (e.elements.arrow = o));
16530
+ o != null && (typeof o == "string" && (o = e.elements.popper.querySelector(o), !o) || Ju(e.elements.popper, o) && (e.elements.arrow = o));
16527
16531
  }
16528
16532
  const wv = {
16529
16533
  name: "arrow",
@@ -16564,11 +16568,11 @@ function Ll(t) {
16564
16568
  var k = Rr(n), A = "clientHeight", F = "clientWidth";
16565
16569
  if (k === Le(n) && (k = Wt(n), Ct(k).position !== "static" && a === "absolute" && (A = "scrollHeight", F = "scrollWidth")), k = k, o === De || (o === Ne || o === Ue) && i === Mr) {
16566
16570
  y = We;
16567
- var S = u && k === M && M.visualViewport ? M.visualViewport.height : (
16571
+ var x = u && k === M && M.visualViewport ? M.visualViewport.height : (
16568
16572
  // $FlowFixMe[prop-missing]
16569
16573
  k[A]
16570
16574
  );
16571
- m -= S - r.height, m *= l ? 1 : -1;
16575
+ m -= x - r.height, m *= l ? 1 : -1;
16572
16576
  }
16573
16577
  if (o === Ne || (o === De || o === We) && i === Mr) {
16574
16578
  C = Ue;
@@ -16627,7 +16631,7 @@ const Mv = {
16627
16631
  var to = {
16628
16632
  passive: !0
16629
16633
  };
16630
- function Sv(t) {
16634
+ function xv(t) {
16631
16635
  var e = t.state, n = t.instance, r = t.options, o = r.scroll, i = o === void 0 ? !0 : o, s = r.resize, a = s === void 0 ? !0 : s, l = Le(e.elements.popper), c = [].concat(e.scrollParents.reference, e.scrollParents.popper);
16632
16636
  return i && c.forEach(function(d) {
16633
16637
  d.addEventListener("scroll", n.update, to);
@@ -16637,13 +16641,13 @@ function Sv(t) {
16637
16641
  }), a && l.removeEventListener("resize", n.update, to);
16638
16642
  };
16639
16643
  }
16640
- const xv = {
16644
+ const Sv = {
16641
16645
  name: "eventListeners",
16642
16646
  enabled: !0,
16643
16647
  phase: "write",
16644
16648
  fn: function() {
16645
16649
  },
16646
- effect: Sv,
16650
+ effect: xv,
16647
16651
  data: {}
16648
16652
  };
16649
16653
  var Av = {
@@ -16680,7 +16684,7 @@ function Tv(t, e) {
16680
16684
  var n = Le(t), r = Wt(t), o = n.visualViewport, i = r.clientWidth, s = r.clientHeight, a = 0, l = 0;
16681
16685
  if (o) {
16682
16686
  i = o.width, s = o.height;
16683
- var c = Ku();
16687
+ var c = Xu();
16684
16688
  (c || !c && e === "fixed") && (a = o.offsetLeft, l = o.offsetTop);
16685
16689
  }
16686
16690
  return {
@@ -16703,13 +16707,13 @@ function Gs(t) {
16703
16707
  var e = Ct(t), n = e.overflow, r = e.overflowX, o = e.overflowY;
16704
16708
  return /auto|scroll|overlay|hidden/.test(n + o + r);
16705
16709
  }
16706
- function Zu(t) {
16707
- return ["html", "body", "#document"].indexOf(st(t)) >= 0 ? t.ownerDocument.body : je(t) && Gs(t) ? t : Zu(Ho(t));
16710
+ function Qu(t) {
16711
+ return ["html", "body", "#document"].indexOf(st(t)) >= 0 ? t.ownerDocument.body : je(t) && Gs(t) ? t : Qu(Ho(t));
16708
16712
  }
16709
16713
  function ar(t, e) {
16710
16714
  var n;
16711
16715
  e === void 0 && (e = []);
16712
- var r = Zu(t), o = r === ((n = t.ownerDocument) == null ? void 0 : n.body), i = Le(r), s = o ? [i].concat(i.visualViewport || [], Gs(r) ? r : []) : r, a = e.concat(s);
16716
+ var r = Qu(t), o = r === ((n = t.ownerDocument) == null ? void 0 : n.body), i = Le(r), s = o ? [i].concat(i.visualViewport || [], Gs(r) ? r : []) : r, a = e.concat(s);
16713
16717
  return o ? a : (
16714
16718
  // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
16715
16719
  a.concat(ar(Ho(s)))
@@ -16728,12 +16732,12 @@ function Nv(t, e) {
16728
16732
  return n.top = n.top + t.clientTop, n.left = n.left + t.clientLeft, n.bottom = n.top + t.clientHeight, n.right = n.left + t.clientWidth, n.width = t.clientWidth, n.height = t.clientHeight, n.x = n.left, n.y = n.top, n;
16729
16733
  }
16730
16734
  function Bl(t, e, n) {
16731
- return e === Wu ? ms(Tv(t, n)) : un(e) ? Nv(e, n) : ms(Dv(Wt(t)));
16735
+ return e === Uu ? ms(Tv(t, n)) : un(e) ? Nv(e, n) : ms(Dv(Wt(t)));
16732
16736
  }
16733
16737
  function Ev(t) {
16734
16738
  var e = ar(Ho(t)), n = ["absolute", "fixed"].indexOf(Ct(t).position) >= 0, r = n && je(t) ? Rr(t) : t;
16735
16739
  return un(r) ? e.filter(function(o) {
16736
- return un(o) && Xu(o, r) && st(o) !== "body";
16740
+ return un(o) && Ju(o, r) && st(o) !== "body";
16737
16741
  }) : [];
16738
16742
  }
16739
16743
  function Pv(t, e, n, r) {
@@ -16743,7 +16747,7 @@ function Pv(t, e, n, r) {
16743
16747
  }, Bl(t, s, r));
16744
16748
  return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
16745
16749
  }
16746
- function Qu(t) {
16750
+ function ef(t) {
16747
16751
  var e = t.reference, n = t.element, r = t.placement, o = r ? rt(r) : null, i = r ? Bn(r) : null, s = e.x + e.width / 2 - n.width / 2, a = e.y + e.height / 2 - n.height / 2, l;
16748
16752
  switch (o) {
16749
16753
  case De:
@@ -16790,17 +16794,17 @@ function Qu(t) {
16790
16794
  }
16791
16795
  return l;
16792
16796
  }
16793
- function Sr(t, e) {
16797
+ function xr(t, e) {
16794
16798
  e === void 0 && (e = {});
16795
- var n = e, r = n.placement, o = r === void 0 ? t.placement : r, i = n.strategy, s = i === void 0 ? t.strategy : i, a = n.boundary, l = a === void 0 ? Qw : a, c = n.rootBoundary, d = c === void 0 ? Wu : c, u = n.elementContext, f = u === void 0 ? Yn : u, p = n.altBoundary, h = p === void 0 ? !1 : p, m = n.padding, g = m === void 0 ? 0 : m, b = Yu(typeof g != "number" ? g : Gu(g, Ir)), w = f === Yn ? ev : Yn, C = t.rects.popper, y = t.elements[h ? w : f], M = Pv(un(y) ? y : y.contextElement || Wt(t.elements.popper), l, d, s), k = Fn(t.elements.reference), A = Qu({
16799
+ var n = e, r = n.placement, o = r === void 0 ? t.placement : r, i = n.strategy, s = i === void 0 ? t.strategy : i, a = n.boundary, l = a === void 0 ? Qw : a, c = n.rootBoundary, d = c === void 0 ? Uu : c, u = n.elementContext, f = u === void 0 ? Yn : u, p = n.altBoundary, h = p === void 0 ? !1 : p, m = n.padding, g = m === void 0 ? 0 : m, b = Gu(typeof g != "number" ? g : Zu(g, Ir)), w = f === Yn ? ev : Yn, C = t.rects.popper, y = t.elements[h ? w : f], M = Pv(un(y) ? y : y.contextElement || Wt(t.elements.popper), l, d, s), k = Fn(t.elements.reference), A = ef({
16796
16800
  reference: k,
16797
16801
  element: C,
16798
16802
  placement: o
16799
- }), F = ms(Object.assign({}, C, A)), S = f === Yn ? F : k, V = {
16800
- top: M.top - S.top + b.top,
16801
- bottom: S.bottom - M.bottom + b.bottom,
16802
- left: M.left - S.left + b.left,
16803
- right: S.right - M.right + b.right
16803
+ }), F = ms(Object.assign({}, C, A)), x = f === Yn ? F : k, V = {
16804
+ top: M.top - x.top + b.top,
16805
+ bottom: x.bottom - M.bottom + b.bottom,
16806
+ left: M.left - x.left + b.left,
16807
+ right: x.right - M.right + b.right
16804
16808
  }, z = t.modifiersData.offset;
16805
16809
  if (f === Yn && z) {
16806
16810
  var _ = z[o];
@@ -16813,14 +16817,14 @@ function Sr(t, e) {
16813
16817
  }
16814
16818
  function Iv(t, e) {
16815
16819
  e === void 0 && (e = {});
16816
- var n = e, r = n.placement, o = n.boundary, i = n.rootBoundary, s = n.padding, a = n.flipVariations, l = n.allowedAutoPlacements, c = l === void 0 ? Uu : l, d = Bn(r), u = d ? a ? Il : Il.filter(function(h) {
16820
+ var n = e, r = n.placement, o = n.boundary, i = n.rootBoundary, s = n.padding, a = n.flipVariations, l = n.allowedAutoPlacements, c = l === void 0 ? qu : l, d = Bn(r), u = d ? a ? Il : Il.filter(function(h) {
16817
16821
  return Bn(h) === d;
16818
16822
  }) : Ir, f = u.filter(function(h) {
16819
16823
  return c.indexOf(h) >= 0;
16820
16824
  });
16821
16825
  f.length === 0 && (f = u);
16822
16826
  var p = f.reduce(function(h, m) {
16823
- return h[m] = Sr(t, {
16827
+ return h[m] = xr(t, {
16824
16828
  placement: m,
16825
16829
  boundary: o,
16826
16830
  rootBoundary: i,
@@ -16849,8 +16853,8 @@ function Lv(t) {
16849
16853
  flipVariations: h,
16850
16854
  allowedAutoPlacements: m
16851
16855
  }) : Ee);
16852
- }, []), M = e.rects.reference, k = e.rects.popper, A = /* @__PURE__ */ new Map(), F = !0, S = y[0], V = 0; V < y.length; V++) {
16853
- var z = y[V], _ = rt(z), H = Bn(z) === Rn, se = [De, We].indexOf(_) >= 0, ce = se ? "width" : "height", ae = Sr(e, {
16856
+ }, []), M = e.rects.reference, k = e.rects.popper, A = /* @__PURE__ */ new Map(), F = !0, x = y[0], V = 0; V < y.length; V++) {
16857
+ var z = y[V], _ = rt(z), H = Bn(z) === Rn, se = [De, We].indexOf(_) >= 0, ce = se ? "width" : "height", ae = xr(e, {
16854
16858
  placement: z,
16855
16859
  boundary: d,
16856
16860
  rootBoundary: u,
@@ -16862,27 +16866,27 @@ function Lv(t) {
16862
16866
  if (i && ve.push(ae[_] <= 0), a && ve.push(ae[ee] <= 0, ae[ne] <= 0), ve.every(function(qe) {
16863
16867
  return qe;
16864
16868
  })) {
16865
- S = z, F = !1;
16869
+ x = z, F = !1;
16866
16870
  break;
16867
16871
  }
16868
16872
  A.set(z, ve);
16869
16873
  }
16870
16874
  if (F)
16871
16875
  for (var ke = h ? 3 : 1, lt = function(Ee) {
16872
- var Ke = y.find(function(St) {
16873
- var dt = A.get(St);
16876
+ var Ke = y.find(function(xt) {
16877
+ var dt = A.get(xt);
16874
16878
  if (dt)
16875
16879
  return dt.slice(0, Ee).every(function(fn) {
16876
16880
  return fn;
16877
16881
  });
16878
16882
  });
16879
16883
  if (Ke)
16880
- return S = Ke, "break";
16884
+ return x = Ke, "break";
16881
16885
  }, Fe = ke; Fe > 0; Fe--) {
16882
16886
  var ct = lt(Fe);
16883
16887
  if (ct === "break") break;
16884
16888
  }
16885
- e.placement !== S && (e.modifiersData[r]._skip = !0, e.placement = S, e.reset = !0);
16889
+ e.placement !== x && (e.modifiersData[r]._skip = !0, e.placement = x, e.reset = !0);
16886
16890
  }
16887
16891
  }
16888
16892
  const Fv = {
@@ -16912,9 +16916,9 @@ function _l(t) {
16912
16916
  });
16913
16917
  }
16914
16918
  function Bv(t) {
16915
- var e = t.state, n = t.name, r = e.rects.reference, o = e.rects.popper, i = e.modifiersData.preventOverflow, s = Sr(e, {
16919
+ var e = t.state, n = t.name, r = e.rects.reference, o = e.rects.popper, i = e.modifiersData.preventOverflow, s = xr(e, {
16916
16920
  elementContext: "reference"
16917
- }), a = Sr(e, {
16921
+ }), a = xr(e, {
16918
16922
  altBoundary: !0
16919
16923
  }), l = zl(s, r), c = zl(a, o, i), d = _l(l), u = _l(c);
16920
16924
  e.modifiersData[n] = {
@@ -16947,7 +16951,7 @@ function _v(t, e, n) {
16947
16951
  };
16948
16952
  }
16949
16953
  function $v(t) {
16950
- var e = t.state, n = t.options, r = t.name, o = n.offset, i = o === void 0 ? [0, 0] : o, s = Uu.reduce(function(d, u) {
16954
+ var e = t.state, n = t.options, r = t.name, o = n.offset, i = o === void 0 ? [0, 0] : o, s = qu.reduce(function(d, u) {
16951
16955
  return d[u] = _v(u, e.rects, i), d;
16952
16956
  }, {}), a = s[e.placement], l = a.x, c = a.y;
16953
16957
  e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += l, e.modifiersData.popperOffsets.y += c), e.modifiersData[r] = s;
@@ -16961,7 +16965,7 @@ const Vv = {
16961
16965
  };
16962
16966
  function Hv(t) {
16963
16967
  var e = t.state, n = t.name;
16964
- e.modifiersData[n] = Qu({
16968
+ e.modifiersData[n] = ef({
16965
16969
  reference: e.rects.reference,
16966
16970
  element: e.rects.popper,
16967
16971
  placement: e.placement
@@ -16978,20 +16982,20 @@ function Wv(t) {
16978
16982
  return t === "x" ? "y" : "x";
16979
16983
  }
16980
16984
  function Uv(t) {
16981
- var e = t.state, n = t.options, r = t.name, o = n.mainAxis, i = o === void 0 ? !0 : o, s = n.altAxis, a = s === void 0 ? !1 : s, l = n.boundary, c = n.rootBoundary, d = n.altBoundary, u = n.padding, f = n.tether, p = f === void 0 ? !0 : f, h = n.tetherOffset, m = h === void 0 ? 0 : h, g = Sr(e, {
16985
+ var e = t.state, n = t.options, r = t.name, o = n.mainAxis, i = o === void 0 ? !0 : o, s = n.altAxis, a = s === void 0 ? !1 : s, l = n.boundary, c = n.rootBoundary, d = n.altBoundary, u = n.padding, f = n.tether, p = f === void 0 ? !0 : f, h = n.tetherOffset, m = h === void 0 ? 0 : h, g = xr(e, {
16982
16986
  boundary: l,
16983
16987
  rootBoundary: c,
16984
16988
  padding: u,
16985
16989
  altBoundary: d
16986
- }), b = rt(e.placement), w = Bn(e.placement), C = !w, y = Xs(b), M = Wv(y), k = e.modifiersData.popperOffsets, A = e.rects.reference, F = e.rects.popper, S = typeof m == "function" ? m(Object.assign({}, e.rects, {
16990
+ }), b = rt(e.placement), w = Bn(e.placement), C = !w, y = Xs(b), M = Wv(y), k = e.modifiersData.popperOffsets, A = e.rects.reference, F = e.rects.popper, x = typeof m == "function" ? m(Object.assign({}, e.rects, {
16987
16991
  placement: e.placement
16988
- })) : m, V = typeof S == "number" ? {
16989
- mainAxis: S,
16990
- altAxis: S
16992
+ })) : m, V = typeof x == "number" ? {
16993
+ mainAxis: x,
16994
+ altAxis: x
16991
16995
  } : Object.assign({
16992
16996
  mainAxis: 0,
16993
16997
  altAxis: 0
16994
- }, S), z = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, _ = {
16998
+ }, x), z = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, _ = {
16995
16999
  x: 0,
16996
17000
  y: 0
16997
17001
  };
@@ -17000,7 +17004,7 @@ function Uv(t) {
17000
17004
  var H, se = y === "y" ? De : Ne, ce = y === "y" ? We : Ue, ae = y === "y" ? "height" : "width", ee = k[y], ne = ee + g[se], ve = ee - g[ce], ke = p ? -F[ae] / 2 : 0, lt = w === Rn ? A[ae] : F[ae], Fe = w === Rn ? -F[ae] : -A[ae], ct = e.elements.arrow, qe = p && ct ? Ks(ct) : {
17001
17005
  width: 0,
17002
17006
  height: 0
17003
- }, Ee = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Ju(), Ke = Ee[se], St = Ee[ce], dt = sr(0, A[ae], qe[ae]), fn = C ? A[ae] / 2 - ke - dt - Ke - V.mainAxis : lt - dt - Ke - V.mainAxis, xt = C ? -A[ae] / 2 + ke + dt + St + V.mainAxis : Fe + dt + St + V.mainAxis, pn = e.elements.arrow && Rr(e.elements.arrow), Fr = pn ? y === "y" ? pn.clientTop || 0 : pn.clientLeft || 0 : 0, jn = (H = z?.[y]) != null ? H : 0, Br = ee + fn - jn - Fr, zr = ee + xt - jn, Wn = sr(p ? Do(ne, Br) : ne, ee, p ? sn(ve, zr) : ve);
17007
+ }, Ee = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Yu(), Ke = Ee[se], xt = Ee[ce], dt = sr(0, A[ae], qe[ae]), fn = C ? A[ae] / 2 - ke - dt - Ke - V.mainAxis : lt - dt - Ke - V.mainAxis, St = C ? -A[ae] / 2 + ke + dt + xt + V.mainAxis : Fe + dt + xt + V.mainAxis, pn = e.elements.arrow && Rr(e.elements.arrow), Fr = pn ? y === "y" ? pn.clientTop || 0 : pn.clientLeft || 0 : 0, jn = (H = z?.[y]) != null ? H : 0, Br = ee + fn - jn - Fr, zr = ee + St - jn, Wn = sr(p ? Do(ne, Br) : ne, ee, p ? sn(ve, zr) : ve);
17004
17008
  k[y] = Wn, _[y] = Wn - ee;
17005
17009
  }
17006
17010
  if (a) {
@@ -17157,11 +17161,11 @@ function tk(t) {
17157
17161
  d.reset = !1, y = -1;
17158
17162
  continue;
17159
17163
  }
17160
- var M = d.orderedModifiers[y], k = M.fn, A = M.options, F = A === void 0 ? {} : A, S = M.name;
17164
+ var M = d.orderedModifiers[y], k = M.fn, A = M.options, F = A === void 0 ? {} : A, x = M.name;
17161
17165
  typeof k == "function" && (d = k({
17162
17166
  state: d,
17163
17167
  options: F,
17164
- name: S,
17168
+ name: x,
17165
17169
  instance: p
17166
17170
  }) || d);
17167
17171
  }
@@ -17207,12 +17211,12 @@ function tk(t) {
17207
17211
  return p;
17208
17212
  };
17209
17213
  }
17210
- var nk = [xv, jv, Mv, qu, Vv, Fv, qv, wv, zv], rk = /* @__PURE__ */ tk({
17214
+ var nk = [Sv, jv, Mv, Ku, Vv, Fv, qv, wv, zv], rk = /* @__PURE__ */ tk({
17211
17215
  defaultModifiers: nk
17212
- }), ok = "tippy-box", ef = "tippy-content", ik = "tippy-backdrop", tf = "tippy-arrow", nf = "tippy-svg-arrow", Yt = {
17216
+ }), ok = "tippy-box", tf = "tippy-content", ik = "tippy-backdrop", nf = "tippy-arrow", rf = "tippy-svg-arrow", Yt = {
17213
17217
  passive: !0,
17214
17218
  capture: !0
17215
- }, rf = function() {
17219
+ }, of = function() {
17216
17220
  return document.body;
17217
17221
  };
17218
17222
  function sk(t, e) {
@@ -17229,7 +17233,7 @@ function Zs(t, e) {
17229
17233
  var n = {}.toString.call(t);
17230
17234
  return n.indexOf("[object") === 0 && n.indexOf(e + "]") > -1;
17231
17235
  }
17232
- function of(t, e) {
17236
+ function sf(t, e) {
17233
17237
  return typeof t == "function" ? t.apply(void 0, e) : t;
17234
17238
  }
17235
17239
  function Hl(t, e) {
@@ -17251,7 +17255,7 @@ function ak(t, e) {
17251
17255
  function lk(t) {
17252
17256
  return t.split(/\s+/).filter(Boolean);
17253
17257
  }
17254
- function xn(t) {
17258
+ function Sn(t) {
17255
17259
  return [].concat(t);
17256
17260
  }
17257
17261
  function jl(t, e) {
@@ -17276,7 +17280,7 @@ function Wl(t) {
17276
17280
  function lr() {
17277
17281
  return document.createElement("div");
17278
17282
  }
17279
- function xr(t) {
17283
+ function Sr(t) {
17280
17284
  return ["Element", "Fragment"].some(function(e) {
17281
17285
  return Zs(t, e);
17282
17286
  });
@@ -17291,7 +17295,7 @@ function pk(t) {
17291
17295
  return !!(t && t._tippy && t._tippy.reference === t);
17292
17296
  }
17293
17297
  function hk(t) {
17294
- return xr(t) ? [t] : uk(t) ? No(t) : Array.isArray(t) ? t : No(document.querySelectorAll(t));
17298
+ return Sr(t) ? [t] : uk(t) ? No(t) : Array.isArray(t) ? t : No(document.querySelectorAll(t));
17295
17299
  }
17296
17300
  function mi(t, e) {
17297
17301
  t.forEach(function(n) {
@@ -17304,7 +17308,7 @@ function Ul(t, e) {
17304
17308
  });
17305
17309
  }
17306
17310
  function mk(t) {
17307
- var e, n = xn(t), r = n[0];
17311
+ var e, n = Sn(t), r = n[0];
17308
17312
  return r != null && (e = r.ownerDocument) != null && e.body ? r.ownerDocument : document;
17309
17313
  }
17310
17314
  function gk(t, e) {
@@ -17336,11 +17340,11 @@ var tt = {
17336
17340
  isTouch: !1
17337
17341
  }, Kl = 0;
17338
17342
  function yk() {
17339
- tt.isTouch || (tt.isTouch = !0, window.performance && document.addEventListener("mousemove", sf));
17343
+ tt.isTouch || (tt.isTouch = !0, window.performance && document.addEventListener("mousemove", af));
17340
17344
  }
17341
- function sf() {
17345
+ function af() {
17342
17346
  var t = performance.now();
17343
- t - Kl < 20 && (tt.isTouch = !1, document.removeEventListener("mousemove", sf)), Kl = t;
17347
+ t - Kl < 20 && (tt.isTouch = !1, document.removeEventListener("mousemove", af)), Kl = t;
17344
17348
  }
17345
17349
  function bk() {
17346
17350
  var t = document.activeElement;
@@ -17373,7 +17377,7 @@ function Ck(t) {
17373
17377
  %c👷‍ This is a development-only message. It will be removed in production.
17374
17378
  `);
17375
17379
  }
17376
- function af(t) {
17380
+ function lf(t) {
17377
17381
  return [
17378
17382
  Ck(t),
17379
17383
  // title
@@ -17392,25 +17396,25 @@ function Mk() {
17392
17396
  function gt(t, e) {
17393
17397
  if (t && !Ar.has(e)) {
17394
17398
  var n;
17395
- Ar.add(e), (n = console).warn.apply(n, af(e));
17399
+ Ar.add(e), (n = console).warn.apply(n, lf(e));
17396
17400
  }
17397
17401
  }
17398
17402
  function gs(t, e) {
17399
17403
  if (t && !Ar.has(e)) {
17400
17404
  var n;
17401
- Ar.add(e), (n = console).error.apply(n, af(e));
17405
+ Ar.add(e), (n = console).error.apply(n, lf(e));
17402
17406
  }
17403
17407
  }
17404
- function Sk(t) {
17408
+ function xk(t) {
17405
17409
  var e = !t, n = Object.prototype.toString.call(t) === "[object Object]" && !t.addEventListener;
17406
17410
  gs(e, ["tippy() was passed", "`" + String(t) + "`", "as its targets (first) argument. Valid types are: String, Element,", "Element[], or NodeList."].join(" ")), gs(n, ["tippy() was passed a plain object which is not supported as an argument", "for virtual positioning. Use props.getReferenceClientRect instead."].join(" "));
17407
17411
  }
17408
- var lf = {
17412
+ var cf = {
17409
17413
  animateFill: !1,
17410
17414
  followCursor: !1,
17411
17415
  inlinePositioning: !1,
17412
17416
  sticky: !1
17413
- }, xk = {
17417
+ }, Sk = {
17414
17418
  allowHTML: !1,
17415
17419
  animation: "fade",
17416
17420
  arrow: !0,
@@ -17421,7 +17425,7 @@ var lf = {
17421
17425
  theme: "",
17422
17426
  zIndex: 9999
17423
17427
  }, Ie = Object.assign({
17424
- appendTo: rf,
17428
+ appendTo: of,
17425
17429
  aria: {
17426
17430
  content: "auto",
17427
17431
  expanded: "auto"
@@ -17468,14 +17472,14 @@ var lf = {
17468
17472
  touch: !0,
17469
17473
  trigger: "mouseenter focus",
17470
17474
  triggerTarget: null
17471
- }, lf, xk), Ak = Object.keys(Ie), Ok = function(e) {
17472
- ie.env.NODE_ENV !== "production" && df(e, []);
17475
+ }, cf, Sk), Ak = Object.keys(Ie), Ok = function(e) {
17476
+ ie.env.NODE_ENV !== "production" && uf(e, []);
17473
17477
  var n = Object.keys(e);
17474
17478
  n.forEach(function(r) {
17475
17479
  Ie[r] = e[r];
17476
17480
  });
17477
17481
  };
17478
- function cf(t) {
17482
+ function df(t) {
17479
17483
  var e = t.plugins || [], n = e.reduce(function(r, o) {
17480
17484
  var i = o.name, s = o.defaultValue;
17481
17485
  if (i) {
@@ -17487,7 +17491,7 @@ function cf(t) {
17487
17491
  return Object.assign({}, t, n);
17488
17492
  }
17489
17493
  function Tk(t, e) {
17490
- var n = e ? Object.keys(cf(Object.assign({}, Ie, {
17494
+ var n = e ? Object.keys(df(Object.assign({}, Ie, {
17491
17495
  plugins: e
17492
17496
  }))) : Ak, r = n.reduce(function(o, i) {
17493
17497
  var s = (t.getAttribute("data-tippy-" + i) || "").trim();
@@ -17507,18 +17511,18 @@ function Tk(t, e) {
17507
17511
  }
17508
17512
  function Jl(t, e) {
17509
17513
  var n = Object.assign({}, e, {
17510
- content: of(e.content, [t])
17514
+ content: sf(e.content, [t])
17511
17515
  }, e.ignoreAttributes ? {} : Tk(t, e.plugins));
17512
17516
  return n.aria = Object.assign({}, Ie.aria, n.aria), n.aria = {
17513
17517
  expanded: n.aria.expanded === "auto" ? e.interactive : n.aria.expanded,
17514
17518
  content: n.aria.content === "auto" ? e.interactive ? null : "describedby" : n.aria.content
17515
17519
  }, n;
17516
17520
  }
17517
- function df(t, e) {
17521
+ function uf(t, e) {
17518
17522
  t === void 0 && (t = {}), e === void 0 && (e = []);
17519
17523
  var n = Object.keys(t);
17520
17524
  n.forEach(function(r) {
17521
- var o = ak(Ie, Object.keys(lf)), i = !sk(o, r);
17525
+ var o = ak(Ie, Object.keys(cf)), i = !sk(o, r);
17522
17526
  i && (i = e.filter(function(s) {
17523
17527
  return s.name === r;
17524
17528
  }).length === 0), gt(i, ["`" + r + "`", "is not a valid prop. You may have spelled it incorrectly, or if it's", "a plugin, forgot to pass it in an array as props.plugins.", `
@@ -17535,31 +17539,31 @@ function ys(t, e) {
17535
17539
  }
17536
17540
  function Yl(t) {
17537
17541
  var e = lr();
17538
- return t === !0 ? e.className = tf : (e.className = nf, xr(t) ? e.appendChild(t) : ys(e, t)), e;
17542
+ return t === !0 ? e.className = nf : (e.className = rf, Sr(t) ? e.appendChild(t) : ys(e, t)), e;
17539
17543
  }
17540
17544
  function Gl(t, e) {
17541
- xr(e.content) ? (ys(t, ""), t.appendChild(e.content)) : typeof e.content != "function" && (e.allowHTML ? ys(t, e.content) : t.textContent = e.content);
17545
+ Sr(e.content) ? (ys(t, ""), t.appendChild(e.content)) : typeof e.content != "function" && (e.allowHTML ? ys(t, e.content) : t.textContent = e.content);
17542
17546
  }
17543
17547
  function bs(t) {
17544
17548
  var e = t.firstElementChild, n = No(e.children);
17545
17549
  return {
17546
17550
  box: e,
17547
17551
  content: n.find(function(r) {
17548
- return r.classList.contains(ef);
17552
+ return r.classList.contains(tf);
17549
17553
  }),
17550
17554
  arrow: n.find(function(r) {
17551
- return r.classList.contains(tf) || r.classList.contains(nf);
17555
+ return r.classList.contains(nf) || r.classList.contains(rf);
17552
17556
  }),
17553
17557
  backdrop: n.find(function(r) {
17554
17558
  return r.classList.contains(ik);
17555
17559
  })
17556
17560
  };
17557
17561
  }
17558
- function uf(t) {
17562
+ function ff(t) {
17559
17563
  var e = lr(), n = lr();
17560
17564
  n.className = ok, n.setAttribute("data-state", "hidden"), n.setAttribute("tabindex", "-1");
17561
17565
  var r = lr();
17562
- r.className = ef, r.setAttribute("data-state", "hidden"), Gl(r, t.props), e.appendChild(n), n.appendChild(r), o(t.props, t.props);
17566
+ r.className = tf, r.setAttribute("data-state", "hidden"), Gl(r, t.props), e.appendChild(n), n.appendChild(r), o(t.props, t.props);
17563
17567
  function o(i, s) {
17564
17568
  var a = bs(e), l = a.box, c = a.content, d = a.arrow;
17565
17569
  s.theme ? l.setAttribute("data-theme", s.theme) : l.removeAttribute("data-theme"), typeof s.animation == "string" ? l.setAttribute("data-animation", s.animation) : l.removeAttribute("data-animation"), s.inertia ? l.setAttribute("data-inertia", "") : l.removeAttribute("data-inertia"), l.style.maxWidth = typeof s.maxWidth == "number" ? s.maxWidth + "px" : s.maxWidth, s.role ? l.setAttribute("role", s.role) : l.removeAttribute("role"), (i.content !== s.content || i.allowHTML !== s.allowHTML) && Gl(c, t.props), s.arrow ? d ? i.arrow !== s.arrow && (l.removeChild(d), l.appendChild(Yl(s.arrow))) : l.appendChild(Yl(s.arrow)) : d && l.removeChild(d);
@@ -17569,10 +17573,10 @@ function uf(t) {
17569
17573
  onUpdate: o
17570
17574
  };
17571
17575
  }
17572
- uf.$$tippy = !0;
17576
+ ff.$$tippy = !0;
17573
17577
  var Nk = 1, no = [], yi = [];
17574
17578
  function Ek(t, e) {
17575
- var n = Jl(t, Object.assign({}, Ie, cf(Wl(e)))), r, o, i, s = !1, a = !1, l = !1, c = !1, d, u, f, p = [], h = Hl(Br, n.interactiveDebounce), m, g = Nk++, b = null, w = ck(n.plugins), C = {
17579
+ var n = Jl(t, Object.assign({}, Ie, df(Wl(e)))), r, o, i, s = !1, a = !1, l = !1, c = !1, d, u, f, p = [], h = Hl(Br, n.interactiveDebounce), m, g = Nk++, b = null, w = ck(n.plugins), C = {
17576
17580
  // Is the instance currently enabled?
17577
17581
  isEnabled: !0,
17578
17582
  // Is the tippy currently showing and not transitioning out?
@@ -17596,13 +17600,13 @@ function Ek(t, e) {
17596
17600
  clearDelayTimeouts: Hr,
17597
17601
  setProps: jr,
17598
17602
  setContent: Wr,
17599
- show: ff,
17600
- hide: pf,
17601
- hideWithInteractivity: hf,
17603
+ show: pf,
17604
+ hide: hf,
17605
+ hideWithInteractivity: mf,
17602
17606
  enable: Kn,
17603
17607
  disable: Vr,
17604
- unmount: mf,
17605
- destroy: gf
17608
+ unmount: gf,
17609
+ destroy: yf
17606
17610
  };
17607
17611
  if (!n.render)
17608
17612
  return ie.env.NODE_ENV !== "production" && gs(!0, "render() function has not been supplied."), y;
@@ -17610,7 +17614,7 @@ function Ek(t, e) {
17610
17614
  k.setAttribute("data-tippy-root", ""), k.id = "tippy-" + y.id, y.popper = k, t._tippy = y, k._tippy = y;
17611
17615
  var F = w.map(function(v) {
17612
17616
  return v.fn(y);
17613
- }), S = t.hasAttribute("aria-expanded");
17617
+ }), x = t.hasAttribute("aria-expanded");
17614
17618
  return pn(), ke(), ee(), ne("onCreate", [y]), n.showOnCreate && qn(), k.addEventListener("mouseenter", function() {
17615
17619
  y.props.interactive && y.state.isVisible && y.clearDelayTimeouts();
17616
17620
  }), k.addEventListener("mouseleave", function() {
@@ -17654,7 +17658,7 @@ function Ek(t, e) {
17654
17658
  function ve() {
17655
17659
  var v = y.props.aria;
17656
17660
  if (v.content) {
17657
- var O = "aria-" + v.content, R = k.id, q = xn(y.props.triggerTarget || t);
17661
+ var O = "aria-" + v.content, R = k.id, q = Sn(y.props.triggerTarget || t);
17658
17662
  q.forEach(function(U) {
17659
17663
  var Ce = U.getAttribute(O);
17660
17664
  if (y.state.isVisible)
@@ -17667,8 +17671,8 @@ function Ek(t, e) {
17667
17671
  }
17668
17672
  }
17669
17673
  function ke() {
17670
- if (!(S || !y.props.aria.expanded)) {
17671
- var v = xn(y.props.triggerTarget || t);
17674
+ if (!(x || !y.props.aria.expanded)) {
17675
+ var v = Sn(y.props.triggerTarget || t);
17672
17676
  v.forEach(function(O) {
17673
17677
  y.props.interactive ? O.setAttribute("aria-expanded", y.state.isVisible && O === H() ? "true" : "false") : O.removeAttribute("aria-expanded");
17674
17678
  });
@@ -17683,7 +17687,7 @@ function Ek(t, e) {
17683
17687
  if (!(tt.isTouch && (l || v.type === "mousedown"))) {
17684
17688
  var O = v.composedPath && v.composedPath()[0] || v.target;
17685
17689
  if (!(y.props.interactive && ql(k, O))) {
17686
- if (xn(y.props.triggerTarget || t).some(function(R) {
17690
+ if (Sn(y.props.triggerTarget || t).some(function(R) {
17687
17691
  return ql(R, O);
17688
17692
  })) {
17689
17693
  if (tt.isTouch || y.state.isVisible && y.props.trigger.indexOf("click") >= 0)
@@ -17710,7 +17714,7 @@ function Ek(t, e) {
17710
17714
  var v = se();
17711
17715
  v.removeEventListener("mousedown", Fe, !0), v.removeEventListener("touchend", Fe, Yt), v.removeEventListener("touchstart", qe, Yt), v.removeEventListener("touchmove", ct, Yt);
17712
17716
  }
17713
- function St(v, O) {
17717
+ function xt(v, O) {
17714
17718
  fn(v, function() {
17715
17719
  !y.state.isVisible && k.parentNode && k.parentNode.contains(k) && O();
17716
17720
  });
@@ -17727,9 +17731,9 @@ function Ek(t, e) {
17727
17731
  return O();
17728
17732
  gi(R, "remove", u), gi(R, "add", q), u = q;
17729
17733
  }
17730
- function xt(v, O, R) {
17734
+ function St(v, O, R) {
17731
17735
  R === void 0 && (R = !1);
17732
- var q = xn(y.props.triggerTarget || t);
17736
+ var q = Sn(y.props.triggerTarget || t);
17733
17737
  q.forEach(function(U) {
17734
17738
  U.addEventListener(v, O, R), p.push({
17735
17739
  node: U,
@@ -17740,21 +17744,21 @@ function Ek(t, e) {
17740
17744
  });
17741
17745
  }
17742
17746
  function pn() {
17743
- z() && (xt("touchstart", jn, {
17747
+ z() && (St("touchstart", jn, {
17744
17748
  passive: !0
17745
- }), xt("touchend", zr, {
17749
+ }), St("touchend", zr, {
17746
17750
  passive: !0
17747
17751
  })), lk(y.props.trigger).forEach(function(v) {
17748
17752
  if (v !== "manual")
17749
- switch (xt(v, jn), v) {
17753
+ switch (St(v, jn), v) {
17750
17754
  case "mouseenter":
17751
- xt("mouseleave", zr);
17755
+ St("mouseleave", zr);
17752
17756
  break;
17753
17757
  case "focus":
17754
- xt(kk ? "focusout" : "blur", Wn);
17758
+ St(kk ? "focusout" : "blur", Wn);
17755
17759
  break;
17756
17760
  case "focusin":
17757
- xt("focusout", Wn);
17761
+ St("focusout", Wn);
17758
17762
  break;
17759
17763
  }
17760
17764
  });
@@ -17817,7 +17821,7 @@ function Ek(t, e) {
17817
17821
  fn: function(Ur) {
17818
17822
  var mn = Ur.state;
17819
17823
  if (_()) {
17820
- var yf = ce(), Wo = yf.box;
17824
+ var bf = ce(), Wo = bf.box;
17821
17825
  ["placement", "reference-hidden", "escaped"].forEach(function(qr) {
17822
17826
  qr === "placement" ? Wo.setAttribute("data-placement", mn.placement) : mn.attributes.popper["data-popper-" + qr] ? Wo.setAttribute("data-" + qr, "") : Wo.removeAttribute("data-" + qr);
17823
17827
  }), mn.attributes.popper = {};
@@ -17866,7 +17870,7 @@ function Ek(t, e) {
17866
17870
  }
17867
17871
  function ut() {
17868
17872
  var v = y.props.appendTo, O, R = H();
17869
- y.props.interactive && v === rf || v === "parent" ? O = R.parentNode : O = of(v, [R]), O.contains(k) || O.appendChild(k), y.state.isMounted = !0, _r(), ie.env.NODE_ENV !== "production" && gt(y.props.interactive && v === Ie.appendTo && R.nextElementSibling !== k, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
17873
+ y.props.interactive && v === of || v === "parent" ? O = R.parentNode : O = sf(v, [R]), O.contains(k) || O.appendChild(k), y.state.isMounted = !0, _r(), ie.env.NODE_ENV !== "production" && gt(y.props.interactive && v === Ie.appendTo && R.nextElementSibling !== k, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
17870
17874
 
17871
17875
  `, "Using a wrapper <div> or <span> tag around the reference element", "solves this by creating a new parentNode context.", `
17872
17876
 
@@ -17913,7 +17917,7 @@ function Ek(t, e) {
17913
17917
  var O = y.props, R = Jl(t, Object.assign({}, O, Wl(v), {
17914
17918
  ignoreAttributes: !0
17915
17919
  }));
17916
- y.props = R, pn(), O.interactiveDebounce !== R.interactiveDebounce && (lt(), h = Hl(Br, R.interactiveDebounce)), O.triggerTarget && !R.triggerTarget ? xn(O.triggerTarget).forEach(function(q) {
17920
+ y.props = R, pn(), O.interactiveDebounce !== R.interactiveDebounce && (lt(), h = Hl(Br, R.interactiveDebounce)), O.triggerTarget && !R.triggerTarget ? Sn(O.triggerTarget).forEach(function(q) {
17917
17921
  q.removeAttribute("aria-expanded");
17918
17922
  }) : R.triggerTarget && t.removeAttribute("aria-expanded"), ke(), ee(), A && A(O, R), y.popperInstance && (_r(), At().forEach(function(q) {
17919
17923
  requestAnimationFrame(q._tippy.popperInstance.forceUpdate);
@@ -17925,7 +17929,7 @@ function Ek(t, e) {
17925
17929
  content: v
17926
17930
  });
17927
17931
  }
17928
- function ff() {
17932
+ function pf() {
17929
17933
  ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, vn("show"));
17930
17934
  var v = y.state.isVisible, O = y.state.isDestroyed, R = !y.state.isEnabled, q = tt.isTouch && !y.props.touch, U = hi(y.props.duration, 0, Ie.duration);
17931
17935
  if (!(v || O || R || q) && !H().hasAttribute("disabled") && (ne("onShow", [y], !1), y.props.onShow(y) !== !1)) {
@@ -17947,7 +17951,7 @@ function Ek(t, e) {
17947
17951
  }, ut();
17948
17952
  }
17949
17953
  }
17950
- function pf() {
17954
+ function hf() {
17951
17955
  ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, vn("hide"));
17952
17956
  var v = !y.state.isVisible, O = y.state.isDestroyed, R = !y.state.isEnabled, q = hi(y.props.duration, 1, Ie.duration);
17953
17957
  if (!(v || O || R) && (ne("onHide", [y], !1), y.props.onHide(y) !== !1)) {
@@ -17955,32 +17959,32 @@ function Ek(t, e) {
17955
17959
  var U = ce(), Ce = U.box, Be = U.content;
17956
17960
  y.props.animation && (mi([Ce, Be], q), Ul([Ce, Be], "hidden"));
17957
17961
  }
17958
- ve(), ke(), y.props.animation ? _() && St(q, y.unmount) : y.unmount();
17962
+ ve(), ke(), y.props.animation ? _() && xt(q, y.unmount) : y.unmount();
17959
17963
  }
17960
17964
  }
17961
- function hf(v) {
17965
+ function mf(v) {
17962
17966
  ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, vn("hideWithInteractivity")), se().addEventListener("mousemove", h), jl(no, h), h(v);
17963
17967
  }
17964
- function mf() {
17968
+ function gf() {
17965
17969
  ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, vn("unmount")), y.state.isVisible && y.hide(), y.state.isMounted && ($r(), At().forEach(function(v) {
17966
17970
  v._tippy.unmount();
17967
17971
  }), k.parentNode && k.parentNode.removeChild(k), yi = yi.filter(function(v) {
17968
17972
  return v !== y;
17969
17973
  }), y.state.isMounted = !1, ne("onHidden", [y]));
17970
17974
  }
17971
- function gf() {
17975
+ function yf() {
17972
17976
  ie.env.NODE_ENV !== "production" && gt(y.state.isDestroyed, vn("destroy")), !y.state.isDestroyed && (y.clearDelayTimeouts(), y.unmount(), Fr(), delete t._tippy, y.state.isDestroyed = !0, ne("onDestroy", [y]));
17973
17977
  }
17974
17978
  }
17975
17979
  function Lr(t, e) {
17976
17980
  e === void 0 && (e = {});
17977
17981
  var n = Ie.plugins.concat(e.plugins || []);
17978
- ie.env.NODE_ENV !== "production" && (Sk(t), df(e, n)), wk();
17982
+ ie.env.NODE_ENV !== "production" && (xk(t), uf(e, n)), wk();
17979
17983
  var r = Object.assign({}, e, {
17980
17984
  plugins: n
17981
17985
  }), o = hk(t);
17982
17986
  if (ie.env.NODE_ENV !== "production") {
17983
- var i = xr(r.content), s = o.length > 1;
17987
+ var i = Sr(r.content), s = o.length > 1;
17984
17988
  gt(i && s, ["tippy() was passed an Element as the `content` prop, but more than", "one tippy instance was created by this invocation. This means the", "content element will only be appended to the last tippy instance.", `
17985
17989
 
17986
17990
  `, "Instead, pass the .innerHTML of the element, or use a function that", "returns a cloned version of the element instead.", `
@@ -17992,12 +17996,12 @@ function Lr(t, e) {
17992
17996
  var d = c && Ek(c, r);
17993
17997
  return d && l.push(d), l;
17994
17998
  }, []);
17995
- return xr(t) ? a[0] : a;
17999
+ return Sr(t) ? a[0] : a;
17996
18000
  }
17997
18001
  Lr.defaultProps = Ie;
17998
18002
  Lr.setDefaultProps = Ok;
17999
18003
  Lr.currentInput = tt;
18000
- Object.assign({}, qu, {
18004
+ Object.assign({}, Ku, {
18001
18005
  effect: function(e) {
18002
18006
  var n = e.state, r = {
18003
18007
  popper: {
@@ -18015,7 +18019,7 @@ Object.assign({}, qu, {
18015
18019
  }
18016
18020
  });
18017
18021
  Lr.setDefaultProps({
18018
- render: uf
18022
+ render: ff
18019
18023
  });
18020
18024
  const Pk = (t, e) => {
18021
18025
  const n = t.__vccOpts || t;
@@ -18039,7 +18043,7 @@ const Pk = (t, e) => {
18039
18043
  }
18040
18044
  },
18041
18045
  setup(t) {
18042
- const e = t, n = ia(null), r = ia(null), o = Ff(() => {
18046
+ const e = t, n = ia(null), r = ia(null), o = Bf(() => {
18043
18047
  const l = e.mention.slice(1)?.toLowerCase();
18044
18048
  return e.users.filter((d) => {
18045
18049
  const u = d.role === "viewer", f = d.name?.toLowerCase().startsWith(l), p = d.email?.toLowerCase().startsWith(l);
@@ -18067,18 +18071,18 @@ const Pk = (t, e) => {
18067
18071
  onFocus: Yo(a, ["stop", "prevent"]),
18068
18072
  tabindex: "0"
18069
18073
  }, [
18070
- (Xt(!0), Kt(Bf, null, zf(o.value, (d, u) => (Xt(), Kt("div", {
18074
+ (Xt(!0), Kt(zf, null, _f(o.value, (d, u) => (Xt(), Kt("div", {
18071
18075
  onClick: Yo((f) => i(d), ["stop", "prevent"]),
18072
18076
  onMouseenter: (f) => r.value = u,
18073
18077
  onMouseleave: c[0] || (c[0] = (f) => r.value = null),
18074
18078
  key: d.email,
18075
- class: _f(["user-row", { selected: r.value === u }])
18079
+ class: $f(["user-row", { selected: r.value === u }])
18076
18080
  }, [
18077
18081
  d.name ? (Xt(), Kt("div", Rk, [
18078
18082
  d.name ? (Xt(), Kt("span", Lk, Go(d.name), 1)) : sa("", !0),
18079
18083
  d.name && d.email ? (Xt(), Kt("span", Fk, " (" + Go(d.email) + ")", 1)) : sa("", !0)
18080
18084
  ])) : (Xt(), Kt("div", Bk, [
18081
- $f("span", null, Go(d.email), 1)
18085
+ Vf("span", null, Go(d.email), 1)
18082
18086
  ]))
18083
18087
  ], 42, Ik))), 128))
18084
18088
  ], 544));
@@ -18137,7 +18141,7 @@ class Vk {
18137
18141
  this.view.dom.removeEventListener("keydown", this.handleKeyDown);
18138
18142
  }
18139
18143
  mountVueComponent(e, n = {}) {
18140
- this.app && this.app.unmount(), this.app = Vf(e, n), this.app.mount(this.popover), this.tippyInstance.setContent(this.popover);
18144
+ this.app && this.app.unmount(), this.app = Hf(e, n), this.app.mount(this.popover), this.tippyInstance.setContent(this.popover);
18141
18145
  }
18142
18146
  update(e, n) {
18143
18147
  this.state = e.state;
@@ -18298,7 +18302,7 @@ const Hk = !1, jk = Q.create({
18298
18302
  c.className = "temp-container super-editor";
18299
18303
  const d = 0, u = 0;
18300
18304
  c.style.left = d + "px", c.style.top = u + "px", c.style.position = "fixed", c.style.visibility = "hidden", document.body.appendChild(c);
18301
- const f = new Wc(c, {
18305
+ const f = new Uc(c, {
18302
18306
  state: l,
18303
18307
  dispatchTransaction: () => {
18304
18308
  }
@@ -18330,7 +18334,7 @@ function qk(t, e, n, r) {
18330
18334
  }
18331
18335
  }
18332
18336
  if (ce || se) {
18333
- const ae = e.state.doc.resolve(H), ee = $o(ae, (St) => St.type.name === "tableRow");
18337
+ const ae = e.state.doc.resolve(H), ee = $o(ae, (xt) => xt.type.name === "tableRow");
18334
18338
  ee && (_ = ee.node, H = ee.pos);
18335
18339
  const {
18336
18340
  top: ne,
@@ -18351,8 +18355,8 @@ function qk(t, e, n, r) {
18351
18355
  u = bi(s, i, r, y), d = wi(s, i, r, M, l);
18352
18356
  const k = c - C.bottom, { node: A } = Ql(k), F = $.widget(t.content.size, A, { key: "stable-key" });
18353
18357
  o.push(F);
18354
- const S = vi({ editor: n, footer: d, isLastFooter: !0 });
18355
- return o.push($.widget(t.content.size, S, { key: "stable-key" })), o.forEach((V) => {
18358
+ const x = vi({ editor: n, footer: d, isLastFooter: !0 });
18359
+ return o.push($.widget(t.content.size, x, { key: "stable-key" })), o.forEach((V) => {
18356
18360
  const _ = V.type.toDOM?.querySelector('span[data-id="auto-total-pages"]');
18357
18361
  if (_) {
18358
18362
  const H = _.previousElementSibling?.style?.fontSize || _.nextElementSibling?.style?.fontSize;
@@ -18418,94 +18422,94 @@ const ec = (t) => {
18418
18422
  e.setMeta("forceUpdatePagination", !0), t.view.dispatch(e);
18419
18423
  });
18420
18424
  }, Xk = () => [
18421
- Lu,
18422
- ou,
18423
- Kd,
18424
- nu,
18425
+ Fu,
18426
+ iu,
18425
18427
  Xd,
18428
+ ru,
18426
18429
  Jd,
18427
- Qf,
18430
+ Yd,
18431
+ uc,
18432
+ fu,
18433
+ Bu,
18434
+ du,
18435
+ Qd,
18436
+ Vu,
18437
+ au,
18428
18438
  uu,
18429
- Fu,
18430
- cu,
18431
- Zd,
18439
+ pu,
18432
18440
  $u,
18433
- su,
18434
- du,
18435
- fu,
18436
- _u,
18437
- ru,
18438
- Yd,
18441
+ ou,
18439
18442
  Gd,
18440
- Ru,
18441
- Bu,
18443
+ Zd,
18444
+ Lu,
18445
+ zu,
18442
18446
  Zw,
18443
18447
  $k,
18444
- Iu,
18445
- zu,
18446
- Qd,
18448
+ Ru,
18449
+ _u,
18450
+ eu,
18447
18451
  Su,
18448
- Au,
18449
18452
  Ou,
18450
- xu,
18451
- Eu,
18452
- eu,
18453
- Vu,
18453
+ Tu,
18454
+ Au,
18455
+ Pu,
18456
+ tu,
18454
18457
  Hu,
18455
18458
  ju,
18456
- tu,
18457
- Pu
18459
+ Wu,
18460
+ nu,
18461
+ Iu
18458
18462
  ], Jk = () => [
18459
- Lu,
18460
- ou,
18461
- Kd,
18463
+ Fu,
18464
+ iu,
18465
+ Xd,
18462
18466
  u0,
18463
18467
  f0,
18464
18468
  p0,
18465
- nu,
18466
- Xd,
18469
+ ru,
18467
18470
  Jd,
18468
- // History,
18469
- uu,
18470
- Fu,
18471
- cu,
18472
- Zd,
18473
- $u,
18474
- su,
18471
+ Yd,
18472
+ uc,
18473
+ fu,
18474
+ Bu,
18475
18475
  du,
18476
+ Qd,
18477
+ Vu,
18478
+ au,
18479
+ uu,
18476
18480
  b0,
18477
- fu,
18481
+ pu,
18478
18482
  zb,
18479
- _u,
18483
+ $u,
18480
18484
  m0,
18481
- ru,
18482
- Yd,
18485
+ ou,
18483
18486
  Gd,
18484
- Ru,
18485
- Bu,
18486
- Qd,
18487
+ Zd,
18488
+ Lu,
18489
+ zu,
18490
+ eu,
18487
18491
  sb,
18488
- xb,
18492
+ Sb,
18489
18493
  Su,
18490
- Au,
18491
18494
  Ou,
18492
- xu,
18493
- Eu,
18494
- eu,
18495
+ Tu,
18496
+ Au,
18495
18497
  Pu,
18496
- Hw,
18498
+ tu,
18497
18499
  Iu,
18500
+ Hw,
18501
+ Ru,
18498
18502
  Ob,
18499
18503
  Pb,
18500
18504
  Gw,
18501
- Vu,
18502
18505
  Hu,
18503
18506
  ju,
18507
+ Wu,
18504
18508
  h0,
18505
18509
  jk,
18506
- zu,
18510
+ _u,
18507
18511
  r0,
18508
- tu,
18512
+ nu,
18509
18513
  Rb,
18510
18514
  Lb,
18511
18515
  jw,
@@ -18526,14 +18530,14 @@ export {
18526
18530
  oC as a,
18527
18531
  i0 as b,
18528
18532
  He as c,
18529
- Hf as d,
18533
+ jf as d,
18530
18534
  Jk as e,
18531
18535
  aC as f,
18532
18536
  ei as g,
18533
18537
  Xk as h,
18534
- Td as i,
18538
+ Dd as i,
18535
18539
  Q as j,
18536
- Dd as k,
18540
+ Nd as k,
18537
18541
  sC as l,
18538
18542
  lC as m,
18539
18543
  Io as n,