react-tiptap-base-editor 1.2.2 → 1.3.0

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.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as v, jsxs as P, Fragment as ze } from "react/jsx-runtime";
2
2
  import * as g from "react";
3
- import pe, { createRef as B0, memo as _0, createContext as Ui, createElement as H0, version as nu, useContext as Wi, useState as Lr, useLayoutEffect as ji, useEffect as Rn, useDebugValue as Ef, useRef as Rt, forwardRef as $0, useCallback as Ml } from "react";
3
+ import pe, { createRef as B0, memo as _0, createContext as Ui, createElement as H0, version as nu, useContext as Wi, useState as Lr, useLayoutEffect as ji, useEffect as An, useDebugValue as Ef, useRef as Rt, forwardRef as $0, useCallback as Ml } from "react";
4
4
  import * as wa from "react-dom";
5
5
  import Mf, { flushSync as F0 } from "react-dom";
6
6
  var mo = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
@@ -778,12 +778,12 @@ function Lf(t, e, n, r) {
778
778
  } else if (n.content.size)
779
779
  if (!n.openStart && !n.openEnd && t.depth == r && e.depth == r) {
780
780
  let s = t.parent, l = s.content;
781
- return En(s, l.cut(0, t.parentOffset).append(n.content).append(l.cut(e.parentOffset)));
781
+ return kn(s, l.cut(0, t.parentOffset).append(n.content).append(l.cut(e.parentOffset)));
782
782
  } else {
783
783
  let { start: s, end: l } = W0(n, t);
784
- return En(i, Pf(t, s, l, e, r));
784
+ return kn(i, Pf(t, s, l, e, r));
785
785
  }
786
- else return En(i, Zo(t, e, r));
786
+ else return kn(i, Zo(t, e, r));
787
787
  }
788
788
  function Df(t, e) {
789
789
  if (!e.type.compatibleContent(t.type))
@@ -793,29 +793,29 @@ function Al(t, e, n) {
793
793
  let r = t.node(n);
794
794
  return Df(r, e.node(n)), r;
795
795
  }
796
- function kn(t, e) {
796
+ function Sn(t, e) {
797
797
  let n = e.length - 1;
798
798
  n >= 0 && t.isText && t.sameMarkup(e[n]) ? e[n] = t.withText(e[n].text + t.text) : e.push(t);
799
799
  }
800
800
  function Sr(t, e, n, r) {
801
801
  let o = (e || t).node(n), i = 0, s = e ? e.index(n) : o.childCount;
802
- t && (i = t.index(n), t.depth > n ? i++ : t.textOffset && (kn(t.nodeAfter, r), i++));
802
+ t && (i = t.index(n), t.depth > n ? i++ : t.textOffset && (Sn(t.nodeAfter, r), i++));
803
803
  for (let l = i; l < s; l++)
804
- kn(o.child(l), r);
805
- e && e.depth == n && e.textOffset && kn(e.nodeBefore, r);
804
+ Sn(o.child(l), r);
805
+ e && e.depth == n && e.textOffset && Sn(e.nodeBefore, r);
806
806
  }
807
- function En(t, e) {
807
+ function kn(t, e) {
808
808
  return t.type.checkContent(e), t.copy(e);
809
809
  }
810
810
  function Pf(t, e, n, r, o) {
811
811
  let i = t.depth > o && Al(t, e, o + 1), s = r.depth > o && Al(n, r, o + 1), l = [];
812
- return Sr(null, t, o, l), i && s && e.index(o) == n.index(o) ? (Df(i, s), kn(En(i, Pf(t, e, n, r, o + 1)), l)) : (i && kn(En(i, Zo(t, e, o + 1)), l), Sr(e, n, o, l), s && kn(En(s, Zo(n, r, o + 1)), l)), Sr(r, null, o, l), new A(l);
812
+ return Sr(null, t, o, l), i && s && e.index(o) == n.index(o) ? (Df(i, s), Sn(kn(i, Pf(t, e, n, r, o + 1)), l)) : (i && Sn(kn(i, Zo(t, e, o + 1)), l), Sr(e, n, o, l), s && Sn(kn(s, Zo(n, r, o + 1)), l)), Sr(r, null, o, l), new A(l);
813
813
  }
814
814
  function Zo(t, e, n) {
815
815
  let r = [];
816
816
  if (Sr(null, t, n, r), t.depth > n) {
817
817
  let o = Al(t, e, n + 1);
818
- kn(En(o, Zo(t, e, n + 1)), r);
818
+ Sn(kn(o, Zo(t, e, n + 1)), r);
819
819
  }
820
820
  return Sr(e, null, n, r), new A(r);
821
821
  }
@@ -1122,7 +1122,7 @@ class Yo {
1122
1122
  }
1123
1123
  }
1124
1124
  const q0 = /* @__PURE__ */ Object.create(null);
1125
- let tn = class Rl {
1125
+ let Xt = class Rl {
1126
1126
  /**
1127
1127
  @internal
1128
1128
  */
@@ -1491,8 +1491,8 @@ let tn = class Rl {
1491
1491
  return i.type.checkAttrs(i.attrs), i;
1492
1492
  }
1493
1493
  };
1494
- tn.prototype.text = void 0;
1495
- class Xo extends tn {
1494
+ Xt.prototype.text = void 0;
1495
+ class Xo extends Xt {
1496
1496
  /**
1497
1497
  @internal
1498
1498
  */
@@ -1535,7 +1535,7 @@ function Bf(t, e) {
1535
1535
  e = t[n].type.name + "(" + e + ")";
1536
1536
  return e;
1537
1537
  }
1538
- class On {
1538
+ class Rn {
1539
1539
  /**
1540
1540
  @internal
1541
1541
  */
@@ -1548,7 +1548,7 @@ class On {
1548
1548
  static parse(e, n) {
1549
1549
  let r = new G0(e, n);
1550
1550
  if (r.next == null)
1551
- return On.empty;
1551
+ return Rn.empty;
1552
1552
  let o = _f(r);
1553
1553
  r.next && r.err("Unexpected trailing text");
1554
1554
  let i = t2(e2(o));
@@ -1697,7 +1697,7 @@ class On {
1697
1697
  `);
1698
1698
  }
1699
1699
  }
1700
- On.empty = new On(!0);
1700
+ Rn.empty = new Rn(!0);
1701
1701
  class G0 {
1702
1702
  constructor(e, n) {
1703
1703
  this.string = e, this.nodeTypes = n, this.inline = null, this.pos = 0, this.tokens = e.split(/\s*(?=\b|\W|$)/), this.tokens[this.tokens.length - 1] == "" && this.tokens.pop(), this.tokens[0] == "" && this.tokens.shift();
@@ -1860,7 +1860,7 @@ function t2(t) {
1860
1860
  });
1861
1861
  });
1862
1862
  });
1863
- let i = e[r.join(",")] = new On(r.indexOf(t.length - 1) > -1);
1863
+ let i = e[r.join(",")] = new Rn(r.indexOf(t.length - 1) > -1);
1864
1864
  for (let s = 0; s < o.length; s++) {
1865
1865
  let l = o[s][1].sort(Hf);
1866
1866
  i.next.push({ type: o[s][0], next: e[l.join(",")] || n(l) });
@@ -1943,7 +1943,7 @@ let cu = class Uf {
1943
1943
  True for node types that allow no content.
1944
1944
  */
1945
1945
  get isLeaf() {
1946
- return this.contentMatch == On.empty;
1946
+ return this.contentMatch == Rn.empty;
1947
1947
  }
1948
1948
  /**
1949
1949
  True when this node is an atom, i.e. when it does not have
@@ -1998,7 +1998,7 @@ let cu = class Uf {
1998
1998
  create(e = null, n, r) {
1999
1999
  if (this.isText)
2000
2000
  throw new Error("NodeType.create can't construct text nodes");
2001
- return new tn(this, this.computeAttrs(e), A.from(n), ne.setFrom(r));
2001
+ return new Xt(this, this.computeAttrs(e), A.from(n), ne.setFrom(r));
2002
2002
  }
2003
2003
  /**
2004
2004
  Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but check the given content
@@ -2006,7 +2006,7 @@ let cu = class Uf {
2006
2006
  if it doesn't match.
2007
2007
  */
2008
2008
  createChecked(e = null, n, r) {
2009
- return n = A.from(n), this.checkContent(n), new tn(this, this.computeAttrs(e), n, ne.setFrom(r));
2009
+ return n = A.from(n), this.checkContent(n), new Xt(this, this.computeAttrs(e), n, ne.setFrom(r));
2010
2010
  }
2011
2011
  /**
2012
2012
  Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but see if it is
@@ -2024,7 +2024,7 @@ let cu = class Uf {
2024
2024
  n = s.append(n);
2025
2025
  }
2026
2026
  let o = this.contentMatch.matchFragment(n), i = o && o.fillBefore(A.empty, !0);
2027
- return i ? new tn(this, e, n.append(i), ne.setFrom(r)) : null;
2027
+ return i ? new Xt(this, e, n.append(i), ne.setFrom(r)) : null;
2028
2028
  }
2029
2029
  /**
2030
2030
  Returns true if the given fragment is valid content for this node
@@ -2184,7 +2184,7 @@ class Wf {
2184
2184
  if (o in this.marks)
2185
2185
  throw new RangeError(o + " can not be both a node and a mark");
2186
2186
  let i = this.nodes[o], s = i.spec.content || "", l = i.spec.marks;
2187
- if (i.contentMatch = r[s] || (r[s] = On.parse(s, this.nodes)), i.inlineContent = i.contentMatch.inlineContent, i.spec.linebreakReplacement) {
2187
+ if (i.contentMatch = r[s] || (r[s] = Rn.parse(s, this.nodes)), i.inlineContent = i.contentMatch.inlineContent, i.spec.linebreakReplacement) {
2188
2188
  if (this.linebreakReplacement)
2189
2189
  throw new RangeError("Multiple linebreak nodes defined");
2190
2190
  if (!i.isInline || !i.isLeaf)
@@ -2197,7 +2197,7 @@ class Wf {
2197
2197
  let i = this.marks[o], s = i.spec.excludes;
2198
2198
  i.excluded = s == null ? [i] : s == "" ? [] : uu(this, s.split(" "));
2199
2199
  }
2200
- this.nodeFromJSON = (o) => tn.fromJSON(this, o), this.markFromJSON = (o) => ne.fromJSON(this, o), this.topNodeType = this.nodes[this.spec.topNode || "doc"], this.cached.wrappings = /* @__PURE__ */ Object.create(null);
2200
+ this.nodeFromJSON = (o) => Xt.fromJSON(this, o), this.markFromJSON = (o) => ne.fromJSON(this, o), this.topNodeType = this.nodes[this.spec.topNode || "doc"], this.cached.wrappings = /* @__PURE__ */ Object.create(null);
2201
2201
  }
2202
2202
  /**
2203
2203
  Create a node in this schema. The `type` may be a string or a
@@ -2260,7 +2260,7 @@ function i2(t) {
2260
2260
  function s2(t) {
2261
2261
  return t.style != null;
2262
2262
  }
2263
- class nn {
2263
+ class Qt {
2264
2264
  /**
2265
2265
  Create a parser that targets the given schema, using the given
2266
2266
  parsing rules.
@@ -2372,7 +2372,7 @@ class nn {
2372
2372
  [priority](https://prosemirror.net/docs/ref/#model.GenericParseRule.priority).
2373
2373
  */
2374
2374
  static fromSchema(e) {
2375
- return e.cached.domParser || (e.cached.domParser = new nn(e, nn.schemaRules(e)));
2375
+ return e.cached.domParser || (e.cached.domParser = new Qt(e, Qt.schemaRules(e)));
2376
2376
  }
2377
2377
  }
2378
2378
  const jf = {
@@ -2767,7 +2767,7 @@ function pu(t, e) {
2767
2767
  return !0;
2768
2768
  }
2769
2769
  }
2770
- class _n {
2770
+ class Bn {
2771
2771
  /**
2772
2772
  Create a serializer. `nodes` should map node names to functions
2773
2773
  that take a node and return a description of the corresponding
@@ -2854,7 +2854,7 @@ class _n {
2854
2854
  properties in a schema's node and mark specs.
2855
2855
  */
2856
2856
  static fromSchema(e) {
2857
- return e.cached.domSerializer || (e.cached.domSerializer = new _n(this.nodesFromSchema(e), this.marksFromSchema(e)));
2857
+ return e.cached.domSerializer || (e.cached.domSerializer = new Bn(this.nodesFromSchema(e), this.marksFromSchema(e)));
2858
2858
  }
2859
2859
  /**
2860
2860
  Gather the serializers in a schema's node specs into an object.
@@ -3278,7 +3278,7 @@ function Sa(t, e, n) {
3278
3278
  }
3279
3279
  return A.fromArray(r);
3280
3280
  }
3281
- class Xt extends Ie {
3281
+ class Jt extends Ie {
3282
3282
  /**
3283
3283
  Create a mark step.
3284
3284
  */
@@ -3294,10 +3294,10 @@ class Xt extends Ie {
3294
3294
  }
3295
3295
  map(e) {
3296
3296
  let n = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1);
3297
- return n.deleted && r.deleted || n.pos >= r.pos ? null : new Xt(n.pos, r.pos, this.mark);
3297
+ return n.deleted && r.deleted || n.pos >= r.pos ? null : new Jt(n.pos, r.pos, this.mark);
3298
3298
  }
3299
3299
  merge(e) {
3300
- return e instanceof Xt && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new Xt(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
3300
+ return e instanceof Jt && e.mark.eq(this.mark) && this.from <= e.to && this.to >= e.from ? new Jt(Math.min(this.from, e.from), Math.max(this.to, e.to), this.mark) : null;
3301
3301
  }
3302
3302
  toJSON() {
3303
3303
  return {
@@ -3313,10 +3313,10 @@ class Xt extends Ie {
3313
3313
  static fromJSON(e, n) {
3314
3314
  if (typeof n.from != "number" || typeof n.to != "number")
3315
3315
  throw new RangeError("Invalid input for AddMarkStep.fromJSON");
3316
- return new Xt(n.from, n.to, e.markFromJSON(n.mark));
3316
+ return new Jt(n.from, n.to, e.markFromJSON(n.mark));
3317
3317
  }
3318
3318
  }
3319
- Ie.jsonID("addMark", Xt);
3319
+ Ie.jsonID("addMark", Jt);
3320
3320
  class it extends Ie {
3321
3321
  /**
3322
3322
  Create a mark-removing step.
@@ -3329,7 +3329,7 @@ class it extends Ie {
3329
3329
  return me.fromReplace(e, this.from, this.to, r);
3330
3330
  }
3331
3331
  invert() {
3332
- return new Xt(this.from, this.to, this.mark);
3332
+ return new Jt(this.from, this.to, this.mark);
3333
3333
  }
3334
3334
  map(e) {
3335
3335
  let n = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1);
@@ -3356,7 +3356,7 @@ class it extends Ie {
3356
3356
  }
3357
3357
  }
3358
3358
  Ie.jsonID("removeMark", it);
3359
- class Qt extends Ie {
3359
+ class Zt extends Ie {
3360
3360
  /**
3361
3361
  Create a node mark step.
3362
3362
  */
@@ -3377,15 +3377,15 @@ class Qt extends Ie {
3377
3377
  if (r.length == n.marks.length) {
3378
3378
  for (let o = 0; o < n.marks.length; o++)
3379
3379
  if (!n.marks[o].isInSet(r))
3380
- return new Qt(this.pos, n.marks[o]);
3381
- return new Qt(this.pos, this.mark);
3380
+ return new Zt(this.pos, n.marks[o]);
3381
+ return new Zt(this.pos, this.mark);
3382
3382
  }
3383
3383
  }
3384
- return new Nn(this.pos, this.mark);
3384
+ return new On(this.pos, this.mark);
3385
3385
  }
3386
3386
  map(e) {
3387
3387
  let n = e.mapResult(this.pos, 1);
3388
- return n.deletedAfter ? null : new Qt(n.pos, this.mark);
3388
+ return n.deletedAfter ? null : new Zt(n.pos, this.mark);
3389
3389
  }
3390
3390
  toJSON() {
3391
3391
  return { stepType: "addNodeMark", pos: this.pos, mark: this.mark.toJSON() };
@@ -3396,11 +3396,11 @@ class Qt extends Ie {
3396
3396
  static fromJSON(e, n) {
3397
3397
  if (typeof n.pos != "number")
3398
3398
  throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");
3399
- return new Qt(n.pos, e.markFromJSON(n.mark));
3399
+ return new Zt(n.pos, e.markFromJSON(n.mark));
3400
3400
  }
3401
3401
  }
3402
- Ie.jsonID("addNodeMark", Qt);
3403
- class Nn extends Ie {
3402
+ Ie.jsonID("addNodeMark", Zt);
3403
+ class On extends Ie {
3404
3404
  /**
3405
3405
  Create a mark-removing step.
3406
3406
  */
@@ -3416,11 +3416,11 @@ class Nn extends Ie {
3416
3416
  }
3417
3417
  invert(e) {
3418
3418
  let n = e.nodeAt(this.pos);
3419
- return !n || !this.mark.isInSet(n.marks) ? this : new Qt(this.pos, this.mark);
3419
+ return !n || !this.mark.isInSet(n.marks) ? this : new Zt(this.pos, this.mark);
3420
3420
  }
3421
3421
  map(e) {
3422
3422
  let n = e.mapResult(this.pos, 1);
3423
- return n.deletedAfter ? null : new Nn(n.pos, this.mark);
3423
+ return n.deletedAfter ? null : new On(n.pos, this.mark);
3424
3424
  }
3425
3425
  toJSON() {
3426
3426
  return { stepType: "removeNodeMark", pos: this.pos, mark: this.mark.toJSON() };
@@ -3431,10 +3431,10 @@ class Nn extends Ie {
3431
3431
  static fromJSON(e, n) {
3432
3432
  if (typeof n.pos != "number")
3433
3433
  throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");
3434
- return new Nn(n.pos, e.markFromJSON(n.mark));
3434
+ return new On(n.pos, e.markFromJSON(n.mark));
3435
3435
  }
3436
3436
  }
3437
- Ie.jsonID("removeNodeMark", Nn);
3437
+ Ie.jsonID("removeNodeMark", On);
3438
3438
  class be extends Ie {
3439
3439
  /**
3440
3440
  The given `slice` should fit the 'gap' between `from` and
@@ -3569,7 +3569,7 @@ function p2(t, e, n, r) {
3569
3569
  let f = Math.max(c, e), h = Math.min(c + a.nodeSize, n), p = r.addToSet(d);
3570
3570
  for (let m = 0; m < d.length; m++)
3571
3571
  d[m].isInSet(p) || (s && s.to == f && s.mark.eq(d[m]) ? s.to = h : o.push(s = new it(f, h, d[m])));
3572
- l && l.to == f ? l.to = h : i.push(l = new Xt(f, h, r));
3572
+ l && l.to == f ? l.to = h : i.push(l = new Jt(f, h, r));
3573
3573
  }
3574
3574
  }), o.forEach((a) => t.step(a)), i.forEach((a) => t.step(a));
3575
3575
  }
@@ -3762,7 +3762,7 @@ function k2(t, e, n = 1, r) {
3762
3762
  }
3763
3763
  t.step(new be(e, e, new D(i.append(s), n, n), !0));
3764
3764
  }
3765
- function pn(t, e) {
3765
+ function dn(t, e) {
3766
3766
  let n = t.resolve(e), r = n.index();
3767
3767
  return eh(n.nodeBefore, n.nodeAfter) && n.parent.canReplace(r, r + 1);
3768
3768
  }
@@ -4380,7 +4380,7 @@ class sh {
4380
4380
  Add a mark to the node at position `pos`.
4381
4381
  */
4382
4382
  addNodeMark(e, n) {
4383
- return this.step(new Qt(e, n)), this;
4383
+ return this.step(new Zt(e, n)), this;
4384
4384
  }
4385
4385
  /**
4386
4386
  Remove a mark (or all marks of the given type) from the node at
@@ -4391,11 +4391,11 @@ class sh {
4391
4391
  if (!r)
4392
4392
  throw new RangeError("No node at position " + e);
4393
4393
  if (n instanceof ne)
4394
- n.isInSet(r.marks) && this.step(new Nn(e, n));
4394
+ n.isInSet(r.marks) && this.step(new On(e, n));
4395
4395
  else {
4396
4396
  let o = r.marks, i, s = [];
4397
4397
  for (; i = n.isInSet(o); )
4398
- s.push(new Nn(e, i)), o = i.removeFromSet(o);
4398
+ s.push(new On(e, i)), o = i.removeFromSet(o);
4399
4399
  for (let l = s.length - 1; l >= 0; l--)
4400
4400
  this.step(s[l]);
4401
4401
  }
@@ -4531,11 +4531,11 @@ let q = class {
4531
4531
  found.
4532
4532
  */
4533
4533
  static findFrom(e, n, r = !1) {
4534
- let o = e.parent.inlineContent ? new z(e) : Gn(e.node(0), e.parent, e.pos, e.index(), n, r);
4534
+ let o = e.parent.inlineContent ? new z(e) : qn(e.node(0), e.parent, e.pos, e.index(), n, r);
4535
4535
  if (o)
4536
4536
  return o;
4537
4537
  for (let i = e.depth - 1; i >= 0; i--) {
4538
- let s = n < 0 ? Gn(e.node(0), e.node(i), e.before(i + 1), e.index(i), n, r) : Gn(e.node(0), e.node(i), e.after(i + 1), e.index(i) + 1, n, r);
4538
+ let s = n < 0 ? qn(e.node(0), e.node(i), e.before(i + 1), e.index(i), n, r) : qn(e.node(0), e.node(i), e.after(i + 1), e.index(i) + 1, n, r);
4539
4539
  if (s)
4540
4540
  return s;
4541
4541
  }
@@ -4556,14 +4556,14 @@ let q = class {
4556
4556
  exists.
4557
4557
  */
4558
4558
  static atStart(e) {
4559
- return Gn(e, e, 0, 0, 1) || new je(e);
4559
+ return qn(e, e, 0, 0, 1) || new je(e);
4560
4560
  }
4561
4561
  /**
4562
4562
  Find the cursor or leaf node selection closest to the end of the
4563
4563
  given document.
4564
4564
  */
4565
4565
  static atEnd(e) {
4566
- return Gn(e, e, e.content.size, e.childCount, -1) || new je(e);
4566
+ return qn(e, e, e.content.size, e.childCount, -1) || new je(e);
4567
4567
  }
4568
4568
  /**
4569
4569
  Deserialize the JSON representation of a selection. Must be
@@ -4802,7 +4802,7 @@ const P2 = {
4802
4802
  return new je(t);
4803
4803
  }
4804
4804
  };
4805
- function Gn(t, e, n, r, o, i = !1) {
4805
+ function qn(t, e, n, r, o, i = !1) {
4806
4806
  if (e.inlineContent)
4807
4807
  return z.create(t, n);
4808
4808
  for (let s = r - (o > 0 ? 0 : 1); o > 0 ? s < e.childCount : s >= 0; s += o) {
@@ -4811,7 +4811,7 @@ function Gn(t, e, n, r, o, i = !1) {
4811
4811
  if (!i && _.isSelectable(l))
4812
4812
  return _.create(t, n - (o < 0 ? l.nodeSize : 0));
4813
4813
  } else {
4814
- let a = Gn(t, l, n + o, o < 0 ? l.childCount : 0, o, i);
4814
+ let a = qn(t, l, n + o, o < 0 ? l.childCount : 0, o, i);
4815
4815
  if (a)
4816
4816
  return a;
4817
4817
  }
@@ -5180,7 +5180,7 @@ class Qn {
5180
5180
  let o = new Ps(e.schema, e.plugins), i = new Qn(o);
5181
5181
  return o.fields.forEach((s) => {
5182
5182
  if (s.name == "doc")
5183
- i.doc = tn.fromJSON(e.schema, n.doc);
5183
+ i.doc = Xt.fromJSON(e.schema, n.doc);
5184
5184
  else if (s.name == "selection")
5185
5185
  i.selection = q.fromJSON(i.doc, n.selection);
5186
5186
  else if (s.name == "storedMarks")
@@ -5399,7 +5399,7 @@ function Ra(t) {
5399
5399
  const F2 = (t, e) => {
5400
5400
  let n = t.selection, r = n instanceof _, o;
5401
5401
  if (r) {
5402
- if (n.node.isTextblock || !pn(t.doc, n.from))
5402
+ if (n.node.isTextblock || !dn(t.doc, n.from))
5403
5403
  return !1;
5404
5404
  o = n.from;
5405
5405
  } else if (o = qi(t.doc, n.from, -1), o == null)
@@ -5412,7 +5412,7 @@ const F2 = (t, e) => {
5412
5412
  }, V2 = (t, e) => {
5413
5413
  let n = t.selection, r;
5414
5414
  if (n instanceof _) {
5415
- if (n.node.isTextblock || !pn(t.doc, n.to))
5415
+ if (n.node.isTextblock || !dn(t.doc, n.to))
5416
5416
  return !1;
5417
5417
  r = n.to;
5418
5418
  } else if (r = qi(t.doc, n.to, 1), r == null)
@@ -5505,7 +5505,7 @@ const j2 = W2(), K2 = (t, e) => {
5505
5505
  };
5506
5506
  function q2(t, e, n) {
5507
5507
  let r = e.nodeBefore, o = e.nodeAfter, i = e.index();
5508
- 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 || pn(t.doc, e.pos)) ? !1 : (n && n(t.tr.join(e.pos).scrollIntoView()), !0);
5508
+ 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 || dn(t.doc, e.pos)) ? !1 : (n && n(t.tr.join(e.pos).scrollIntoView()), !0);
5509
5509
  }
5510
5510
  function bh(t, e, n, r) {
5511
5511
  let o = e.nodeBefore, i = e.nodeAfter, s, l, a = o.type.spec.isolating || i.type.spec.isolating;
@@ -5519,7 +5519,7 @@ function bh(t, e, n, r) {
5519
5519
  p = A.from(s[b].create(null, p));
5520
5520
  p = A.from(o.copy(p));
5521
5521
  let m = t.tr.step(new Ce(e.pos - 1, h, e.pos, h, new D(p, 1, 0), s.length, !0)), y = m.doc.resolve(h + 2 * s.length);
5522
- y.nodeAfter && y.nodeAfter.type == o.type && pn(m.doc, y.pos) && m.join(y.pos), n(m.scrollIntoView());
5522
+ y.nodeAfter && y.nodeAfter.type == o.type && dn(m.doc, y.pos) && m.join(y.pos), n(m.scrollIntoView());
5523
5523
  }
5524
5524
  return !0;
5525
5525
  }
@@ -5653,7 +5653,7 @@ function ty(t, e, n, r) {
5653
5653
  return !1;
5654
5654
  o.lift(r, l);
5655
5655
  let a = o.doc.resolve(o.mapping.map(i, -1) - 1);
5656
- return pn(o.doc, a.pos) && a.nodeBefore.type == a.nodeAfter.type && o.join(a.pos), e(o.scrollIntoView()), !0;
5656
+ return dn(o.doc, a.pos) && a.nodeBefore.type == a.nodeAfter.type && o.join(a.pos), e(o.scrollIntoView()), !0;
5657
5657
  }
5658
5658
  function ny(t, e, n) {
5659
5659
  let r = t.tr, o = n.parent;
@@ -5700,7 +5700,7 @@ const Mt = function(t, e, n) {
5700
5700
  return r.setEnd(t, n ?? t.nodeValue.length), r.setStart(t, e || 0), r;
5701
5701
  }, oy = function() {
5702
5702
  Ll = null;
5703
- }, In = function(t, e, n, r) {
5703
+ }, Nn = function(t, e, n, r) {
5704
5704
  return n && (Mu(t, e, n, r, -1) || Mu(t, e, n, r, 1));
5705
5705
  }, iy = /^(img|br|input|textarea|hr)$/i;
5706
5706
  function Mu(t, e, n, r, o) {
@@ -5773,9 +5773,9 @@ function Qr(t) {
5773
5773
  return e && e.node && e.node.isBlock && (e.dom == t || e.contentDOM == t);
5774
5774
  }
5775
5775
  const Zi = function(t) {
5776
- return t.focusNode && In(t.focusNode, t.focusOffset, t.anchorNode, t.anchorOffset);
5776
+ return t.focusNode && Nn(t.focusNode, t.focusOffset, t.anchorNode, t.anchorOffset);
5777
5777
  };
5778
- function bn(t, e) {
5778
+ function gn(t, e) {
5779
5779
  let n = document.createEvent("Event");
5780
5780
  return n.initEvent("keydown", !0, !0), n.keyCode = t, n.key = n.code = e, n;
5781
5781
  }
@@ -5799,9 +5799,9 @@ function uy(t, e, n) {
5799
5799
  return { node: r.startContainer, offset: Math.min(Qe(r.startContainer), r.startOffset) };
5800
5800
  }
5801
5801
  }
5802
- const mt = typeof navigator < "u" ? navigator : null, Tu = typeof document < "u" ? document : null, mn = mt && mt.userAgent || "", Dl = /Edge\/(\d+)/.exec(mn), wh = /MSIE \d/.exec(mn), Pl = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(mn), Fe = !!(wh || Pl || Dl), rn = wh ? document.documentMode : Pl ? +Pl[1] : Dl ? +Dl[1] : 0, et = !Fe && /gecko\/(\d+)/i.test(mn);
5803
- et && +(/Firefox\/(\d+)/.exec(mn) || [0, 0])[1];
5804
- const Bl = !Fe && /Chrome\/(\d+)/.exec(mn), Oe = !!Bl, xh = Bl ? +Bl[1] : 0, De = !Fe && !!mt && /Apple Computer/.test(mt.vendor), lr = De && (/Mobile\/\w+/.test(mn) || !!mt && mt.maxTouchPoints > 2), Xe = lr || (mt ? /Mac/.test(mt.platform) : !1), dy = mt ? /Win/.test(mt.platform) : !1, Tt = /Android \d/.test(mn), eo = !!Tu && "webkitFontSmoothing" in Tu.documentElement.style, fy = eo ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
5802
+ const mt = typeof navigator < "u" ? navigator : null, Tu = typeof document < "u" ? document : null, fn = mt && mt.userAgent || "", Dl = /Edge\/(\d+)/.exec(fn), wh = /MSIE \d/.exec(fn), Pl = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(fn), Fe = !!(wh || Pl || Dl), en = wh ? document.documentMode : Pl ? +Pl[1] : Dl ? +Dl[1] : 0, et = !Fe && /gecko\/(\d+)/i.test(fn);
5803
+ et && +(/Firefox\/(\d+)/.exec(fn) || [0, 0])[1];
5804
+ const Bl = !Fe && /Chrome\/(\d+)/.exec(fn), Oe = !!Bl, xh = Bl ? +Bl[1] : 0, De = !Fe && !!mt && /Apple Computer/.test(mt.vendor), lr = De && (/Mobile\/\w+/.test(fn) || !!mt && mt.maxTouchPoints > 2), Xe = lr || (mt ? /Mac/.test(mt.platform) : !1), dy = mt ? /Win/.test(mt.platform) : !1, Tt = /Android \d/.test(fn), eo = !!Tu && "webkitFontSmoothing" in Tu.documentElement.style, fy = eo ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
5805
5805
  function hy(t) {
5806
5806
  let e = t.defaultView && t.defaultView.visualViewport;
5807
5807
  return e ? {
@@ -5881,18 +5881,18 @@ function kh(t, e) {
5881
5881
  r.scrollTop != o + e && (r.scrollTop = o + e), r.scrollLeft != i && (r.scrollLeft = i);
5882
5882
  }
5883
5883
  }
5884
- let Un = null;
5884
+ let zn = null;
5885
5885
  function yy(t) {
5886
5886
  if (t.setActive)
5887
5887
  return t.setActive();
5888
- if (Un)
5889
- return t.focus(Un);
5888
+ if (zn)
5889
+ return t.focus(zn);
5890
5890
  let e = Sh(t);
5891
- t.focus(Un == null ? {
5891
+ t.focus(zn == null ? {
5892
5892
  get preventScroll() {
5893
- return Un = { preventScroll: !0 }, !0;
5893
+ return zn = { preventScroll: !0 }, !0;
5894
5894
  }
5895
- } : void 0), Un || (Un = !1, kh(e, 0));
5895
+ } : void 0), zn || (zn = !1, kh(e, 0));
5896
5896
  }
5897
5897
  function Eh(t, e) {
5898
5898
  let n, r = 2e8, o, i = 0, s = e.top, l = e.top, a, c;
@@ -6135,7 +6135,7 @@ let Ou = null, Nu = null, Iu = !1;
6135
6135
  function Ty(t, e, n) {
6136
6136
  return Ou == e && Nu == n ? Iu : (Ou = e, Nu = n, Iu = n == "up" || n == "down" ? ky(t, e, n) : My(t, e, n));
6137
6137
  }
6138
- const tt = 0, Lu = 1, Cn = 2, gt = 3;
6138
+ const tt = 0, Lu = 1, bn = 2, gt = 3;
6139
6139
  class to {
6140
6140
  constructor(e, n, r, o) {
6141
6141
  this.parent = e, this.children = n, this.dom = r, this.contentDOM = o, this.dirty = tt, r.pmViewDesc = this;
@@ -6418,7 +6418,7 @@ class to {
6418
6418
  let h = u.focusNode.childNodes[u.focusOffset];
6419
6419
  h && h.contentEditable == "false" && (o = !0);
6420
6420
  }
6421
- if (!(o || d && De) && In(l.node, l.offset, u.anchorNode, u.anchorOffset) && In(a.node, a.offset, u.focusNode, u.focusOffset))
6421
+ if (!(o || d && De) && Nn(l.node, l.offset, u.anchorNode, u.anchorOffset) && Nn(a.node, a.offset, u.focusNode, u.focusOffset))
6422
6422
  return;
6423
6423
  let f = !1;
6424
6424
  if ((c.extend || e == n) && !(d && et)) {
@@ -6451,19 +6451,19 @@ class to {
6451
6451
  if (r == s ? e <= s && n >= r : e < s && n > r) {
6452
6452
  let l = r + i.border, a = s - i.border;
6453
6453
  if (e >= l && n <= a) {
6454
- this.dirty = e == r || n == s ? Cn : Lu, e == l && n == a && (i.contentLost || i.dom.parentNode != this.contentDOM) ? i.dirty = gt : i.markDirty(e - l, n - l);
6454
+ this.dirty = e == r || n == s ? bn : Lu, e == l && n == a && (i.contentLost || i.dom.parentNode != this.contentDOM) ? i.dirty = gt : i.markDirty(e - l, n - l);
6455
6455
  return;
6456
6456
  } else
6457
- i.dirty = i.dom == i.contentDOM && i.dom.parentNode == this.contentDOM && !i.children.length ? Cn : gt;
6457
+ i.dirty = i.dom == i.contentDOM && i.dom.parentNode == this.contentDOM && !i.children.length ? bn : gt;
6458
6458
  }
6459
6459
  r = s;
6460
6460
  }
6461
- this.dirty = Cn;
6461
+ this.dirty = bn;
6462
6462
  }
6463
6463
  markParentsDirty() {
6464
6464
  let e = 1;
6465
6465
  for (let n = this.parent; n; n = n.parent, e++) {
6466
- let r = e == 1 ? Cn : Lu;
6466
+ let r = e == 1 ? bn : Lu;
6467
6467
  n.dirty < r && (n.dirty = r);
6468
6468
  }
6469
6469
  }
@@ -6540,13 +6540,13 @@ class Ay extends to {
6540
6540
  return e.type === "characterData" && e.target.nodeValue == e.oldValue;
6541
6541
  }
6542
6542
  }
6543
- class Ln extends to {
6543
+ class In extends to {
6544
6544
  constructor(e, n, r, o, i) {
6545
6545
  super(e, [], r, o), this.mark = n, this.spec = i;
6546
6546
  }
6547
6547
  static create(e, n, r, o) {
6548
6548
  let i = o.nodeViews[n.type.name], s = i && i(n, o, r);
6549
- return (!s || !s.dom) && (s = _n.renderSpec(document, n.type.spec.toDOM(n, r), null, n.attrs)), new Ln(e, n, s.dom, s.contentDOM || s.dom, s);
6549
+ return (!s || !s.dom) && (s = Bn.renderSpec(document, n.type.spec.toDOM(n, r), null, n.attrs)), new In(e, n, s.dom, s.contentDOM || s.dom, s);
6550
6550
  }
6551
6551
  parseRule() {
6552
6552
  return this.dirty & gt || this.mark.type.spec.reparseInView ? null : { mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM };
@@ -6563,7 +6563,7 @@ class Ln extends to {
6563
6563
  }
6564
6564
  }
6565
6565
  slice(e, n, r) {
6566
- let o = Ln.create(this.parent, this.mark, !0, r), i = this.children, s = this.size;
6566
+ let o = In.create(this.parent, this.mark, !0, r), i = this.children, s = this.size;
6567
6567
  n < s && (i = Hl(i, n, s, r)), e > 0 && (i = Hl(i, 0, e, r));
6568
6568
  for (let l = 0; l < i.length; l++)
6569
6569
  i[l].parent = o;
@@ -6576,7 +6576,7 @@ class Ln extends to {
6576
6576
  this.spec.destroy && this.spec.destroy(), super.destroy();
6577
6577
  }
6578
6578
  }
6579
- class on extends to {
6579
+ class tn extends to {
6580
6580
  constructor(e, n, r, o, i, s, l, a, c) {
6581
6581
  super(e, [], i, s), this.node = n, this.outerDeco = r, this.innerDeco = o, this.nodeDOM = l;
6582
6582
  }
@@ -6601,10 +6601,10 @@ class on extends to {
6601
6601
  u = document.createTextNode(n.text);
6602
6602
  else if (u.nodeType != 3)
6603
6603
  throw new RangeError("Text must be rendered as a DOM text node");
6604
- } else u || ({ dom: u, contentDOM: d } = _n.renderSpec(document, n.type.spec.toDOM(n), null, n.attrs));
6604
+ } else u || ({ dom: u, contentDOM: d } = Bn.renderSpec(document, n.type.spec.toDOM(n), null, n.attrs));
6605
6605
  !d && !n.isText && u.nodeName != "BR" && (u.hasAttribute("contenteditable") || (u.contentEditable = "false"), n.type.spec.draggable && (u.draggable = !0));
6606
6606
  let f = u;
6607
- return u = Lh(u, r, n), c ? a = new Ry(e, n, r, o, u, d || null, f, c, i, s + 1) : n.isText ? new Yi(e, n, r, o, u, f, i) : new on(e, n, r, o, u, d || null, f, i, s + 1);
6607
+ return u = Lh(u, r, n), c ? a = new Ry(e, n, r, o, u, d || null, f, c, i, s + 1) : n.isText ? new Yi(e, n, r, o, u, f, i) : new tn(e, n, r, o, u, d || null, f, i, s + 1);
6608
6608
  }
6609
6609
  parseRule() {
6610
6610
  if (this.node.type.spec.reparseInView)
@@ -6647,7 +6647,7 @@ class on extends to {
6647
6647
  a.syncToMarks(c.marks, r, e);
6648
6648
  let h;
6649
6649
  a.findNodeMatch(c, u, d, f) || l && e.state.selection.from > o && e.state.selection.to < o + c.nodeSize && (h = a.findIndexWithChild(i.node)) > -1 && a.updateNodeAt(c, u, d, h, e) || a.updateNextNode(c, u, d, e, f, o) || a.addNode(c, u, d, e, o), o += c.nodeSize;
6650
- }), a.syncToMarks([], r, e), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == Cn) && (s && this.protectLocalComposition(e, s), Nh(this.contentDOM, this.children, e), lr && Py(this.dom));
6650
+ }), a.syncToMarks([], r, e), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == bn) && (s && this.protectLocalComposition(e, s), Nh(this.contentDOM, this.children, e), lr && Py(this.dom));
6651
6651
  }
6652
6652
  localCompositionInfo(e, n) {
6653
6653
  let { from: r, to: o } = e.state.selection;
@@ -6704,10 +6704,10 @@ class on extends to {
6704
6704
  }
6705
6705
  function Du(t, e, n, r, o) {
6706
6706
  Lh(r, e, t);
6707
- let i = new on(void 0, t, e, n, r, r, r, o, 0);
6707
+ let i = new tn(void 0, t, e, n, r, r, r, o, 0);
6708
6708
  return i.contentDOM && i.updateChildren(o, 0), i;
6709
6709
  }
6710
- class Yi extends on {
6710
+ class Yi extends tn {
6711
6711
  constructor(e, n, r, o, i, s, l) {
6712
6712
  super(e, n, r, o, i, null, s, l, 0);
6713
6713
  }
@@ -6764,7 +6764,7 @@ class Oh extends to {
6764
6764
  return this.dom.nodeName == "IMG";
6765
6765
  }
6766
6766
  }
6767
- class Ry extends on {
6767
+ class Ry extends tn {
6768
6768
  constructor(e, n, r, o, i, s, l, a, c, u) {
6769
6769
  super(e, n, r, o, i, s, l, c, u), this.spec = a;
6770
6770
  }
@@ -6808,7 +6808,7 @@ function Nh(t, e, n) {
6808
6808
  r = r.nextSibling;
6809
6809
  } else
6810
6810
  o = !0, t.insertBefore(l, r);
6811
- if (s instanceof Ln) {
6811
+ if (s instanceof In) {
6812
6812
  let a = r ? r.previousSibling : t.lastChild;
6813
6813
  Nh(s.contentDOM, s.children, n), r = a ? a.nextSibling : t.firstChild;
6814
6814
  }
@@ -6821,11 +6821,11 @@ const Er = function(t) {
6821
6821
  t && (this.nodeName = t);
6822
6822
  };
6823
6823
  Er.prototype = /* @__PURE__ */ Object.create(null);
6824
- const wn = [new Er()];
6824
+ const Cn = [new Er()];
6825
6825
  function _l(t, e, n) {
6826
6826
  if (t.length == 0)
6827
- return wn;
6828
- let r = n ? wn[0] : new Er(), o = [r];
6827
+ return Cn;
6828
+ let r = n ? Cn[0] : new Er(), o = [r];
6829
6829
  for (let i = 0; i < t.length; i++) {
6830
6830
  let s = t[i].type.attrs;
6831
6831
  if (s) {
@@ -6839,16 +6839,16 @@ function _l(t, e, n) {
6839
6839
  return o;
6840
6840
  }
6841
6841
  function Ih(t, e, n, r) {
6842
- if (n == wn && r == wn)
6842
+ if (n == Cn && r == Cn)
6843
6843
  return e;
6844
6844
  let o = e;
6845
6845
  for (let i = 0; i < r.length; i++) {
6846
6846
  let s = r[i], l = n[i];
6847
6847
  if (i) {
6848
6848
  let a;
6849
- l && l.nodeName == s.nodeName && o != t && (a = o.parentNode) && a.nodeName.toLowerCase() == s.nodeName || (a = document.createElement(s.nodeName), a.pmIsDeco = !0, a.appendChild(o), l = wn[0]), o = a;
6849
+ l && l.nodeName == s.nodeName && o != t && (a = o.parentNode) && a.nodeName.toLowerCase() == s.nodeName || (a = document.createElement(s.nodeName), a.pmIsDeco = !0, a.appendChild(o), l = Cn[0]), o = a;
6850
6850
  }
6851
- Oy(o, l || wn[0], s);
6851
+ Oy(o, l || Cn[0], s);
6852
6852
  }
6853
6853
  return o;
6854
6854
  }
@@ -6875,7 +6875,7 @@ function Oy(t, e, n) {
6875
6875
  }
6876
6876
  }
6877
6877
  function Lh(t, e, n) {
6878
- return Ih(t, t, wn, _l(e, n, t.nodeType != 1));
6878
+ return Ih(t, t, Cn, _l(e, n, t.nodeType != 1));
6879
6879
  }
6880
6880
  function Qo(t, e) {
6881
6881
  if (t.length != e.length)
@@ -6927,7 +6927,7 @@ class Ny {
6927
6927
  if (l > -1)
6928
6928
  l > this.index && (this.changed = !0, this.destroyBetween(this.index, l)), this.top = this.top.children[this.index];
6929
6929
  else {
6930
- let a = Ln.create(this.top, e[i], n, r);
6930
+ let a = In.create(this.top, e[i], n, r);
6931
6931
  this.top.children.splice(this.index, 0, a), this.top = a, this.changed = !0;
6932
6932
  }
6933
6933
  this.index = 0, i++;
@@ -6951,7 +6951,7 @@ class Ny {
6951
6951
  }
6952
6952
  updateNodeAt(e, n, r, o, i) {
6953
6953
  let s = this.top.children[o];
6954
- return s.dirty == gt && s.dom == s.contentDOM && (s.dirty = Cn), s.update(e, n, r, i) ? (this.destroyBetween(this.index, o), this.index++, !0) : !1;
6954
+ return s.dirty == gt && s.dom == s.contentDOM && (s.dirty = bn), s.update(e, n, r, i) ? (this.destroyBetween(this.index, o), this.index++, !0) : !1;
6955
6955
  }
6956
6956
  findIndexWithChild(e) {
6957
6957
  for (; ; ) {
@@ -6975,7 +6975,7 @@ class Ny {
6975
6975
  updateNextNode(e, n, r, o, i, s) {
6976
6976
  for (let l = this.index; l < this.top.children.length; l++) {
6977
6977
  let a = this.top.children[l];
6978
- if (a instanceof on) {
6978
+ if (a instanceof tn) {
6979
6979
  let c = this.preMatch.matched.get(a);
6980
6980
  if (c != null && c != i)
6981
6981
  return !1;
@@ -6983,7 +6983,7 @@ class Ny {
6983
6983
  if (!f && a.update(e, n, r, o))
6984
6984
  return this.destroyBetween(this.index, l), a.dom != u && (this.changed = !0), this.index++, !0;
6985
6985
  if (!f && (d = this.recreateWrapper(a, e, n, r, o, s)))
6986
- return this.destroyBetween(this.index, l), this.top.children[this.index] = d, d.contentDOM && (d.dirty = Cn, d.updateChildren(o, s + 1), d.dirty = tt), this.changed = !0, this.index++, !0;
6986
+ return this.destroyBetween(this.index, l), this.top.children[this.index] = d, d.contentDOM && (d.dirty = bn, d.updateChildren(o, s + 1), d.dirty = tt), this.changed = !0, this.index++, !0;
6987
6987
  break;
6988
6988
  }
6989
6989
  }
@@ -6994,7 +6994,7 @@ class Ny {
6994
6994
  recreateWrapper(e, n, r, o, i, s) {
6995
6995
  if (e.dirty || n.isAtom || !e.children.length || !e.node.content.eq(n.content) || !Qo(r, e.outerDeco) || !o.eq(e.innerDeco))
6996
6996
  return null;
6997
- let l = on.create(this.top, n, r, o, i, s);
6997
+ let l = tn.create(this.top, n, r, o, i, s);
6998
6998
  if (l.contentDOM) {
6999
6999
  l.children = e.children, e.children = [];
7000
7000
  for (let a of l.children)
@@ -7004,7 +7004,7 @@ class Ny {
7004
7004
  }
7005
7005
  // Insert the node as a newly created node desc.
7006
7006
  addNode(e, n, r, o, i) {
7007
- let s = on.create(this.top, e, n, r, o, i);
7007
+ let s = tn.create(this.top, e, n, r, o, i);
7008
7008
  s.contentDOM && s.updateChildren(o, i + 1), this.top.children.splice(this.index++, 0, s), this.changed = !0;
7009
7009
  }
7010
7010
  placeWidget(e, n, r) {
@@ -7020,7 +7020,7 @@ class Ny {
7020
7020
  // contentEditable.
7021
7021
  addTextblockHacks() {
7022
7022
  let e = this.top.children[this.index - 1], n = this.top;
7023
- for (; e instanceof Ln; )
7023
+ for (; e instanceof In; )
7024
7024
  n = e, e = n.children[n.children.length - 1];
7025
7025
  (!e || // Empty textblock
7026
7026
  !(e instanceof Yi) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((De || Oe) && e && e.dom.contentEditable == "false" && this.addHackNode("IMG", n), this.addHackNode("BR", this.top));
@@ -7046,7 +7046,7 @@ function Iy(t, e) {
7046
7046
  for (; ; )
7047
7047
  if (r) {
7048
7048
  let c = n.children[r - 1];
7049
- if (c instanceof Ln)
7049
+ if (c instanceof In)
7050
7050
  n = c, r = c.children.length;
7051
7051
  else {
7052
7052
  l = c, r--;
@@ -7201,7 +7201,7 @@ function Nt(t, e = !1) {
7201
7201
  if (Ph(t, n), !!Dh(t)) {
7202
7202
  if (!e && t.input.mouseDown && t.input.mouseDown.allowDefault && Oe) {
7203
7203
  let r = t.domSelectionRange(), o = t.domObserver.currentSelection;
7204
- if (r.anchorNode && o.anchorNode && In(r.anchorNode, r.anchorOffset, o.anchorNode, o.anchorOffset)) {
7204
+ if (r.anchorNode && o.anchorNode && Nn(r.anchorNode, r.anchorOffset, o.anchorNode, o.anchorOffset)) {
7205
7205
  t.input.mouseDown.delayedSelectionSync = !0, t.domObserver.setCurSelection();
7206
7206
  return;
7207
7207
  }
@@ -7248,7 +7248,7 @@ function Hy(t) {
7248
7248
  if (!e)
7249
7249
  return;
7250
7250
  let n = t.cursorWrapper.dom, r = n.nodeName == "IMG";
7251
- r ? e.collapse(n.parentNode, Ee(n) + 1) : e.collapse(n, 0), !r && !t.state.selection.visible && Fe && rn <= 11 && (n.disabled = !0, n.disabled = !1);
7251
+ r ? e.collapse(n.parentNode, Ee(n) + 1) : e.collapse(n, 0), !r && !t.state.selection.visible && Fe && en <= 11 && (n.disabled = !0, n.disabled = !1);
7252
7252
  }
7253
7253
  function Ph(t, e) {
7254
7254
  if (e instanceof _) {
@@ -7278,13 +7278,13 @@ function Bh(t) {
7278
7278
  }
7279
7279
  function $y(t) {
7280
7280
  let e = t.docView.domFromPos(t.state.selection.anchor, 0), n = t.domSelectionRange();
7281
- return In(e.node, e.offset, n.anchorNode, n.anchorOffset);
7281
+ return Nn(e.node, e.offset, n.anchorNode, n.anchorOffset);
7282
7282
  }
7283
7283
  function $l(t, e) {
7284
7284
  let { $anchor: n, $head: r } = t.selection, o = e > 0 ? n.max(r) : n.min(r), i = o.parent.inlineContent ? o.depth ? t.doc.resolve(e > 0 ? o.after() : o.before()) : null : o;
7285
7285
  return i && q.findFrom(i, e);
7286
7286
  }
7287
- function jt(t, e) {
7287
+ function Wt(t, e) {
7288
7288
  return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()), !0;
7289
7289
  }
7290
7290
  function Vu(t, e, n) {
@@ -7295,25 +7295,25 @@ function Vu(t, e, n) {
7295
7295
  if (!i || i.isText || !i.isLeaf)
7296
7296
  return !1;
7297
7297
  let s = t.state.doc.resolve(o.pos + i.nodeSize * (e < 0 ? -1 : 1));
7298
- return jt(t, new z(r.$anchor, s));
7298
+ return Wt(t, new z(r.$anchor, s));
7299
7299
  } else if (r.empty) {
7300
7300
  if (t.endOfTextblock(e > 0 ? "forward" : "backward")) {
7301
7301
  let o = $l(t.state, e);
7302
- return o && o instanceof _ ? jt(t, o) : !1;
7302
+ return o && o instanceof _ ? Wt(t, o) : !1;
7303
7303
  } else if (!(Xe && n.indexOf("m") > -1)) {
7304
7304
  let o = r.$head, i = o.textOffset ? null : e < 0 ? o.nodeBefore : o.nodeAfter, s;
7305
7305
  if (!i || i.isText)
7306
7306
  return !1;
7307
7307
  let l = e < 0 ? o.pos - i.nodeSize : o.pos;
7308
- return i.isAtom || (s = t.docView.descAt(l)) && !s.contentDOM ? _.isSelectable(i) ? jt(t, new _(e < 0 ? t.state.doc.resolve(o.pos - i.nodeSize) : o)) : eo ? jt(t, new z(t.state.doc.resolve(e < 0 ? l : l + i.nodeSize))) : !1 : !1;
7308
+ return i.isAtom || (s = t.docView.descAt(l)) && !s.contentDOM ? _.isSelectable(i) ? Wt(t, new _(e < 0 ? t.state.doc.resolve(o.pos - i.nodeSize) : o)) : eo ? Wt(t, new z(t.state.doc.resolve(e < 0 ? l : l + i.nodeSize))) : !1 : !1;
7309
7309
  }
7310
7310
  } else return !1;
7311
7311
  else {
7312
7312
  if (r instanceof _ && r.node.isInline)
7313
- return jt(t, new z(e > 0 ? r.$to : r.$from));
7313
+ return Wt(t, new z(e > 0 ? r.$to : r.$from));
7314
7314
  {
7315
7315
  let o = $l(t.state, e);
7316
- return o ? jt(t, o) : !1;
7316
+ return o ? Wt(t, o) : !1;
7317
7317
  }
7318
7318
  }
7319
7319
  }
@@ -7324,7 +7324,7 @@ function Mr(t, e) {
7324
7324
  let n = t.pmViewDesc;
7325
7325
  return n && n.size == 0 && (e < 0 || t.nextSibling || t.nodeName != "BR");
7326
7326
  }
7327
- function Wn(t, e) {
7327
+ function Un(t, e) {
7328
7328
  return e < 0 ? Fy(t) : Vy(t);
7329
7329
  }
7330
7330
  function Fy(t) {
@@ -7466,11 +7466,11 @@ function Uu(t, e, n) {
7466
7466
  if (!o.parent.inlineContent || t.endOfTextblock(e < 0 ? "up" : "down")) {
7467
7467
  let s = $l(t.state, e);
7468
7468
  if (s && s instanceof _)
7469
- return jt(t, s);
7469
+ return Wt(t, s);
7470
7470
  }
7471
7471
  if (!o.parent.inlineContent) {
7472
7472
  let s = e < 0 ? o : i, l = r instanceof je ? q.near(s, e) : q.findFrom(s, e);
7473
- return l ? jt(t, l) : !1;
7473
+ return l ? Wt(t, l) : !1;
7474
7474
  }
7475
7475
  return !1;
7476
7476
  }
@@ -7511,22 +7511,22 @@ function jy(t) {
7511
7511
  function Ky(t, e) {
7512
7512
  let n = e.keyCode, r = jy(e);
7513
7513
  if (n == 8 || Xe && n == 72 && r == "c")
7514
- return Wu(t, -1) || Wn(t, -1);
7514
+ return Wu(t, -1) || Un(t, -1);
7515
7515
  if (n == 46 && !e.shiftKey || Xe && n == 68 && r == "c")
7516
- return Wu(t, 1) || Wn(t, 1);
7516
+ return Wu(t, 1) || Un(t, 1);
7517
7517
  if (n == 13 || n == 27)
7518
7518
  return !0;
7519
7519
  if (n == 37 || Xe && n == 66 && r == "c") {
7520
7520
  let o = n == 37 ? zu(t, t.state.selection.from) == "ltr" ? -1 : 1 : -1;
7521
- return Vu(t, o, r) || Wn(t, o);
7521
+ return Vu(t, o, r) || Un(t, o);
7522
7522
  } else if (n == 39 || Xe && n == 70 && r == "c") {
7523
7523
  let o = n == 39 ? zu(t, t.state.selection.from) == "ltr" ? 1 : -1 : 1;
7524
- return Vu(t, o, r) || Wn(t, o);
7524
+ return Vu(t, o, r) || Un(t, o);
7525
7525
  } else {
7526
7526
  if (n == 38 || Xe && n == 80 && r == "c")
7527
- return Uu(t, -1, r) || Wn(t, -1);
7527
+ return Uu(t, -1, r) || Un(t, -1);
7528
7528
  if (n == 40 || Xe && n == 78 && r == "c")
7529
- return Wy(t) || Uu(t, 1, r) || Wn(t, 1);
7529
+ return Wy(t) || Uu(t, 1, r) || Un(t, 1);
7530
7530
  if (r == (Xe ? "m" : "c") && (n == 66 || n == 73 || n == 89 || n == 90))
7531
7531
  return !0;
7532
7532
  }
@@ -7542,7 +7542,7 @@ function Pa(t, e) {
7542
7542
  let h = r.firstChild;
7543
7543
  n.push(h.type.name, h.attrs != h.type.defaultAttrs ? h.attrs : null), r = h.content;
7544
7544
  }
7545
- let s = t.someProp("clipboardSerializer") || _n.fromSchema(t.state.schema), l = Uh(), a = l.createElement("div");
7545
+ let s = t.someProp("clipboardSerializer") || Bn.fromSchema(t.state.schema), l = Uh(), a = l.createElement("div");
7546
7546
  a.appendChild(s.serializeFragment(r, { document: l }));
7547
7547
  let c = a.firstChild, u, d = 0;
7548
7548
  for (; c && c.nodeType == 1 && (u = zh[c.nodeName.toLowerCase()]); ) {
@@ -7577,7 +7577,7 @@ function Hh(t, e, n, r, o) {
7577
7577
  if (d)
7578
7578
  l = d;
7579
7579
  else {
7580
- let f = o.marks(), { schema: h } = t.state, p = _n.fromSchema(h);
7580
+ let f = o.marks(), { schema: h } = t.state, p = Bn.fromSchema(h);
7581
7581
  s = document.createElement("div"), e.split(/(?:\r\n?|\n)+/).forEach((m) => {
7582
7582
  let y = s.appendChild(document.createElement("p"));
7583
7583
  m && y.appendChild(p.serializeNode(h.text(m, f)));
@@ -7597,7 +7597,7 @@ function Hh(t, e, n, r, o) {
7597
7597
  break;
7598
7598
  s = f;
7599
7599
  }
7600
- if (l || (l = (t.someProp("clipboardParser") || t.someProp("domParser") || nn.fromSchema(t.state.schema)).parseSlice(s, {
7600
+ if (l || (l = (t.someProp("clipboardParser") || t.someProp("domParser") || Qt.fromSchema(t.state.schema)).parseSlice(s, {
7601
7601
  preserveWhitespace: !!(a || u),
7602
7602
  context: o,
7603
7603
  ruleFromNode(f) {
@@ -7737,7 +7737,7 @@ function tv(t) {
7737
7737
  }
7738
7738
  De && t.dom.addEventListener("input", () => null), zl(t);
7739
7739
  }
7740
- function en(t, e) {
7740
+ function Yt(t, e) {
7741
7741
  t.input.lastSelectionOrigin = e, t.input.lastSelectionTime = Date.now();
7742
7742
  }
7743
7743
  function nv(t) {
@@ -7777,9 +7777,9 @@ Be.keydown = (t, e) => {
7777
7777
  if (n.keyCode != 229 && t.domObserver.forceFlush(), lr && n.keyCode == 13 && !n.ctrlKey && !n.altKey && !n.metaKey) {
7778
7778
  let r = Date.now();
7779
7779
  t.input.lastIOSEnter = r, t.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
7780
- t.input.lastIOSEnter == r && (t.someProp("handleKeyDown", (o) => o(t, bn(13, "Enter"))), t.input.lastIOSEnter = 0);
7780
+ t.input.lastIOSEnter == r && (t.someProp("handleKeyDown", (o) => o(t, gn(13, "Enter"))), t.input.lastIOSEnter = 0);
7781
7781
  }, 200);
7782
- } else t.someProp("handleKeyDown", (r) => r(t, n)) || Ky(t, n) ? n.preventDefault() : en(t, "key");
7782
+ } else t.someProp("handleKeyDown", (r) => r(t, n)) || Ky(t, n) ? n.preventDefault() : Yt(t, "key");
7783
7783
  };
7784
7784
  Be.keyup = (t, e) => {
7785
7785
  e.keyCode == 16 && (t.input.shiftKey = !1);
@@ -7878,7 +7878,7 @@ Pe.mousedown = (t, e) => {
7878
7878
  let r = Ha(t), o = Date.now(), i = "singleClick";
7879
7879
  o - t.input.lastClick.time < 500 && iv(n, t.input.lastClick) && !n[Wh] && t.input.lastClick.button == n.button && (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, button: n.button };
7880
7880
  let s = t.posAtCoords(Xi(n));
7881
- s && (i == "singleClick" ? (t.input.mouseDown && t.input.mouseDown.done(), t.input.mouseDown = new fv(t, s, n, !!r)) : (i == "doubleClick" ? cv : uv)(t, s.pos, s.inside, n) ? n.preventDefault() : en(t, "pointer"));
7881
+ s && (i == "singleClick" ? (t.input.mouseDown && t.input.mouseDown.done(), t.input.mouseDown = new fv(t, s, n, !!r)) : (i == "doubleClick" ? cv : uv)(t, s.pos, s.inside, n) ? n.preventDefault() : Yt(t, "pointer"));
7882
7882
  };
7883
7883
  class fv {
7884
7884
  constructor(e, n, r, o) {
@@ -7900,7 +7900,7 @@ class fv {
7900
7900
  setUneditable: !!(this.target && et && !this.target.hasAttribute("contentEditable"))
7901
7901
  }), this.target && this.mightDrag && (this.mightDrag.addAttr || this.mightDrag.setUneditable) && (this.view.domObserver.stop(), this.mightDrag.addAttr && (this.target.draggable = !0), this.mightDrag.setUneditable && setTimeout(() => {
7902
7902
  this.view.input.mouseDown == this && this.target.setAttribute("contentEditable", "false");
7903
- }, 20), this.view.domObserver.start()), e.root.addEventListener("mouseup", this.up = this.up.bind(this)), e.root.addEventListener("mousemove", this.move = this.move.bind(this)), en(e, "pointer");
7903
+ }, 20), this.view.domObserver.start()), e.root.addEventListener("mouseup", this.up = this.up.bind(this)), e.root.addEventListener("mousemove", this.move = this.move.bind(this)), Yt(e, "pointer");
7904
7904
  }
7905
7905
  done() {
7906
7906
  this.view.root.removeEventListener("mouseup", this.up), this.view.root.removeEventListener("mousemove", this.move), this.mightDrag && this.target && (this.view.domObserver.stop(), this.mightDrag.addAttr && this.target.removeAttribute("draggable"), this.mightDrag.setUneditable && this.target.removeAttribute("contentEditable"), this.view.domObserver.start()), this.delayedSelectionSync && setTimeout(() => Nt(this.view)), this.view.input.mouseDown = null;
@@ -7909,7 +7909,7 @@ class fv {
7909
7909
  if (this.done(), !this.view.dom.contains(e.target))
7910
7910
  return;
7911
7911
  let n = this.pos;
7912
- this.view.state.doc != this.startDoc && (n = this.view.posAtCoords(Xi(e))), this.updateAllowDefault(e), this.allowDefault || !n ? en(this.view, "pointer") : av(this.view, n.pos, n.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
7912
+ this.view.state.doc != this.startDoc && (n = this.view.posAtCoords(Xi(e))), this.updateAllowDefault(e), this.allowDefault || !n ? Yt(this.view, "pointer") : av(this.view, n.pos, n.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
7913
7913
  De && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
7914
7914
  // cursor, but still report that the node is selected
7915
7915
  // when asked through getSelection. You'll then get a
@@ -7917,20 +7917,20 @@ class fv {
7917
7917
  // (hidden) cursor is doesn't change the selection, and
7918
7918
  // thus doesn't get a reaction from ProseMirror. This
7919
7919
  // works around that.
7920
- Oe && !this.view.state.selection.visible && Math.min(Math.abs(n.pos - this.view.state.selection.from), Math.abs(n.pos - this.view.state.selection.to)) <= 2) ? (tr(this.view, q.near(this.view.state.doc.resolve(n.pos))), e.preventDefault()) : en(this.view, "pointer");
7920
+ Oe && !this.view.state.selection.visible && Math.min(Math.abs(n.pos - this.view.state.selection.from), Math.abs(n.pos - this.view.state.selection.to)) <= 2) ? (tr(this.view, q.near(this.view.state.doc.resolve(n.pos))), e.preventDefault()) : Yt(this.view, "pointer");
7921
7921
  }
7922
7922
  move(e) {
7923
- this.updateAllowDefault(e), en(this.view, "pointer"), e.buttons == 0 && this.done();
7923
+ this.updateAllowDefault(e), Yt(this.view, "pointer"), e.buttons == 0 && this.done();
7924
7924
  }
7925
7925
  updateAllowDefault(e) {
7926
7926
  !this.allowDefault && (Math.abs(this.event.x - e.clientX) > 4 || Math.abs(this.event.y - e.clientY) > 4) && (this.allowDefault = !0);
7927
7927
  }
7928
7928
  }
7929
7929
  Pe.touchstart = (t) => {
7930
- t.input.lastTouch = Date.now(), Ha(t), en(t, "pointer");
7930
+ t.input.lastTouch = Date.now(), Ha(t), Yt(t, "pointer");
7931
7931
  };
7932
7932
  Pe.touchmove = (t) => {
7933
- t.input.lastTouch = Date.now(), en(t, "pointer");
7933
+ t.input.lastTouch = Date.now(), Yt(t, "pointer");
7934
7934
  };
7935
7935
  Pe.contextmenu = (t) => Ha(t);
7936
7936
  function jh(t, e) {
@@ -8013,7 +8013,7 @@ function gv(t, e) {
8013
8013
  n.parentNode && n.parentNode.removeChild(n), t.focus();
8014
8014
  }, 50);
8015
8015
  }
8016
- const Hr = Fe && rn < 15 || lr && fy < 604;
8016
+ const Hr = Fe && en < 15 || lr && fy < 604;
8017
8017
  Pe.copy = Be.cut = (t, e) => {
8018
8018
  let n = e, r = t.state.selection, o = n.type == "cut";
8019
8019
  if (r.empty)
@@ -8142,7 +8142,7 @@ Pe.beforeinput = (t, e) => {
8142
8142
  t.domObserver.flushSoon();
8143
8143
  let { domChangeCount: r } = t.input;
8144
8144
  setTimeout(() => {
8145
- if (t.input.domChangeCount != r || (t.dom.blur(), t.focus(), t.someProp("handleKeyDown", (i) => i(t, bn(8, "Backspace")))))
8145
+ if (t.input.domChangeCount != r || (t.dom.blur(), t.focus(), t.someProp("handleKeyDown", (i) => i(t, gn(8, "Backspace")))))
8146
8146
  return;
8147
8147
  let { $cursor: o } = t.state.selection;
8148
8148
  o && o.pos > 0 && t.dispatch(t.state.tr.delete(o.pos - 1, o.pos).scrollIntoView());
@@ -8164,7 +8164,7 @@ function Fr(t, e) {
8164
8164
  }
8165
8165
  class ni {
8166
8166
  constructor(e, n) {
8167
- this.toDOM = e, this.spec = n || Mn, this.side = this.spec.side || 0;
8167
+ this.toDOM = e, this.spec = n || En, this.side = this.spec.side || 0;
8168
8168
  }
8169
8169
  map(e, n, r, o) {
8170
8170
  let { pos: i, deleted: s } = e.mapResult(n.from + o, this.side < 0 ? -1 : 1);
@@ -8180,9 +8180,9 @@ class ni {
8180
8180
  this.spec.destroy && this.spec.destroy(e);
8181
8181
  }
8182
8182
  }
8183
- class sn {
8183
+ class nn {
8184
8184
  constructor(e, n) {
8185
- this.attrs = e, this.spec = n || Mn;
8185
+ this.attrs = e, this.spec = n || En;
8186
8186
  }
8187
8187
  map(e, n, r, o) {
8188
8188
  let i = e.map(n.from + o, this.spec.inclusiveStart ? -1 : 1) - r, s = e.map(n.to + o, this.spec.inclusiveEnd ? 1 : -1) - r;
@@ -8192,17 +8192,17 @@ class sn {
8192
8192
  return n.from < n.to;
8193
8193
  }
8194
8194
  eq(e) {
8195
- return this == e || e instanceof sn && Fr(this.attrs, e.attrs) && Fr(this.spec, e.spec);
8195
+ return this == e || e instanceof nn && Fr(this.attrs, e.attrs) && Fr(this.spec, e.spec);
8196
8196
  }
8197
8197
  static is(e) {
8198
- return e.type instanceof sn;
8198
+ return e.type instanceof nn;
8199
8199
  }
8200
8200
  destroy() {
8201
8201
  }
8202
8202
  }
8203
8203
  class $a {
8204
8204
  constructor(e, n) {
8205
- this.attrs = e, this.spec = n || Mn;
8205
+ this.attrs = e, this.spec = n || En;
8206
8206
  }
8207
8207
  map(e, n, r, o) {
8208
8208
  let i = e.mapResult(n.from + o, 1);
@@ -8262,7 +8262,7 @@ class Le {
8262
8262
  each inline node between `from` and `to`.
8263
8263
  */
8264
8264
  static inline(e, n, r, o) {
8265
- return new Le(e, n, new sn(r, o));
8265
+ return new Le(e, n, new nn(r, o));
8266
8266
  }
8267
8267
  /**
8268
8268
  Creates a node decoration. `from` and `to` should point precisely
@@ -8283,7 +8283,7 @@ class Le {
8283
8283
  @internal
8284
8284
  */
8285
8285
  get inline() {
8286
- return this.type instanceof sn;
8286
+ return this.type instanceof nn;
8287
8287
  }
8288
8288
  /**
8289
8289
  @internal
@@ -8292,13 +8292,13 @@ class Le {
8292
8292
  return this.type instanceof ni;
8293
8293
  }
8294
8294
  }
8295
- const Jn = [], Mn = {};
8295
+ const Gn = [], En = {};
8296
8296
  class ae {
8297
8297
  /**
8298
8298
  @internal
8299
8299
  */
8300
8300
  constructor(e, n) {
8301
- this.local = e.length ? e : Jn, this.children = n.length ? n : Jn;
8301
+ this.local = e.length ? e : Gn, this.children = n.length ? n : Gn;
8302
8302
  }
8303
8303
  /**
8304
8304
  Create a set of decorations, using the structure of the given
@@ -8306,7 +8306,7 @@ class ae {
8306
8306
  you must make a copy if you want need to preserve that.
8307
8307
  */
8308
8308
  static create(e, n) {
8309
- return n.length ? ri(n, e, 0, Mn) : Re;
8309
+ return n.length ? ri(n, e, 0, En) : Re;
8310
8310
  }
8311
8311
  /**
8312
8312
  Find all decorations in this set which touch the given range
@@ -8336,7 +8336,7 @@ class ae {
8336
8336
  document.
8337
8337
  */
8338
8338
  map(e, n, r) {
8339
- return this == Re || e.maps.length == 0 ? this : this.mapInner(e, n, 0, 0, r || Mn);
8339
+ return this == Re || e.maps.length == 0 ? this : this.mapInner(e, n, 0, 0, r || En);
8340
8340
  }
8341
8341
  /**
8342
8342
  @internal
@@ -8347,7 +8347,7 @@ class ae {
8347
8347
  let a = this.local[l].map(e, r, o);
8348
8348
  a && a.type.valid(n, a) ? (s || (s = [])).push(a) : i.onRemove && i.onRemove(this.local[l].spec);
8349
8349
  }
8350
- return this.children.length ? Cv(this.children, s || [], e, n, r, o, i) : s ? new ae(s.sort(Tn), Jn) : Re;
8350
+ return this.children.length ? Cv(this.children, s || [], e, n, r, o, i) : s ? new ae(s.sort(Mn), Gn) : Re;
8351
8351
  }
8352
8352
  /**
8353
8353
  Add the given array of decorations to the ones in the set,
@@ -8365,13 +8365,13 @@ class ae {
8365
8365
  if (u = Xh(n, l, c)) {
8366
8366
  for (o || (o = this.children.slice()); i < o.length && o[i] < a; )
8367
8367
  i += 3;
8368
- o[i] == a ? o[i + 2] = o[i + 2].addInner(l, u, c + 1) : o.splice(i, 0, a, a + l.nodeSize, ri(u, l, c + 1, Mn)), i += 3;
8368
+ o[i] == a ? o[i + 2] = o[i + 2].addInner(l, u, c + 1) : o.splice(i, 0, a, a + l.nodeSize, ri(u, l, c + 1, En)), i += 3;
8369
8369
  }
8370
8370
  });
8371
8371
  let s = Yh(i ? Qh(n) : n, -r);
8372
8372
  for (let l = 0; l < s.length; l++)
8373
8373
  s[l].type.valid(e, s[l]) || s.splice(l--, 1);
8374
- return new ae(s.length ? this.local.concat(s).sort(Tn) : this.local, o || this.children);
8374
+ return new ae(s.length ? this.local.concat(s).sort(Mn) : this.local, o || this.children);
8375
8375
  }
8376
8376
  /**
8377
8377
  Create a new set that contains the decorations in this set, minus
@@ -8414,14 +8414,14 @@ class ae {
8414
8414
  let i = e + 1, s = i + n.content.size;
8415
8415
  for (let l = 0; l < this.local.length; l++) {
8416
8416
  let a = this.local[l];
8417
- if (a.from < s && a.to > i && a.type instanceof sn) {
8417
+ if (a.from < s && a.to > i && a.type instanceof nn) {
8418
8418
  let c = Math.max(i, a.from) - i, u = Math.min(s, a.to) - i;
8419
8419
  c < u && (o || (o = [])).push(a.copy(c, u));
8420
8420
  }
8421
8421
  }
8422
8422
  if (o) {
8423
- let l = new ae(o.sort(Tn), Jn);
8424
- return r ? new Zt([l, r]) : l;
8423
+ let l = new ae(o.sort(Mn), Gn);
8424
+ return r ? new qt([l, r]) : l;
8425
8425
  }
8426
8426
  return r || Re;
8427
8427
  }
@@ -8452,12 +8452,12 @@ class ae {
8452
8452
  */
8453
8453
  localsInner(e) {
8454
8454
  if (this == Re)
8455
- return Jn;
8456
- if (e.inlineContent || !this.local.some(sn.is))
8455
+ return Gn;
8456
+ if (e.inlineContent || !this.local.some(nn.is))
8457
8457
  return this.local;
8458
8458
  let n = [];
8459
8459
  for (let r = 0; r < this.local.length; r++)
8460
- this.local[r].type instanceof sn || n.push(this.local[r]);
8460
+ this.local[r].type instanceof nn || n.push(this.local[r]);
8461
8461
  return n;
8462
8462
  }
8463
8463
  forEachSet(e) {
@@ -8467,13 +8467,13 @@ class ae {
8467
8467
  ae.empty = new ae([], []);
8468
8468
  ae.removeOverlap = Fa;
8469
8469
  const Re = ae.empty;
8470
- class Zt {
8470
+ class qt {
8471
8471
  constructor(e) {
8472
8472
  this.members = e;
8473
8473
  }
8474
8474
  map(e, n) {
8475
- const r = this.members.map((o) => o.map(e, n, Mn));
8476
- return Zt.from(r);
8475
+ const r = this.members.map((o) => o.map(e, n, En));
8476
+ return qt.from(r);
8477
8477
  }
8478
8478
  forChild(e, n) {
8479
8479
  if (n.isLeaf)
@@ -8481,12 +8481,12 @@ class Zt {
8481
8481
  let r = [];
8482
8482
  for (let o = 0; o < this.members.length; o++) {
8483
8483
  let i = this.members[o].forChild(e, n);
8484
- i != Re && (i instanceof Zt ? r = r.concat(i.members) : r.push(i));
8484
+ i != Re && (i instanceof qt ? r = r.concat(i.members) : r.push(i));
8485
8485
  }
8486
- return Zt.from(r);
8486
+ return qt.from(r);
8487
8487
  }
8488
8488
  eq(e) {
8489
- if (!(e instanceof Zt) || e.members.length != this.members.length)
8489
+ if (!(e instanceof qt) || e.members.length != this.members.length)
8490
8490
  return !1;
8491
8491
  for (let n = 0; n < this.members.length; n++)
8492
8492
  if (!this.members[n].eq(e.members[n]))
@@ -8506,7 +8506,7 @@ class Zt {
8506
8506
  n.push(i[s]);
8507
8507
  }
8508
8508
  }
8509
- return n ? Fa(r ? n : n.sort(Tn)) : Jn;
8509
+ return n ? Fa(r ? n : n.sort(Mn)) : Gn;
8510
8510
  }
8511
8511
  // Create a group for the given array of decoration sets, or return
8512
8512
  // a single set when possible.
@@ -8517,7 +8517,7 @@ class Zt {
8517
8517
  case 1:
8518
8518
  return e[0];
8519
8519
  default:
8520
- return new Zt(e.every((n) => n instanceof ae) ? e : e.reduce((n, r) => n.concat(r instanceof ae ? r : r.members), []));
8520
+ return new qt(e.every((n) => n instanceof ae) ? e : e.reduce((n, r) => n.concat(r instanceof ae ? r : r.members), []));
8521
8521
  }
8522
8522
  }
8523
8523
  forEachSet(e) {
@@ -8572,7 +8572,7 @@ function Cv(t, e, n, r, o, i, s) {
8572
8572
  l.splice(f, 0, u.children[d], u.children[d + 1], u.children[d + 2]);
8573
8573
  }
8574
8574
  }
8575
- return new ae(e.sort(Tn), l);
8575
+ return new ae(e.sort(Mn), l);
8576
8576
  }
8577
8577
  function Yh(t, e) {
8578
8578
  if (!e || !t.length)
@@ -8621,12 +8621,12 @@ function ri(t, e, n, r) {
8621
8621
  u != Re && o.push(a, a + l.nodeSize, u);
8622
8622
  }
8623
8623
  });
8624
- let s = Yh(i ? Qh(t) : t, -n).sort(Tn);
8624
+ let s = Yh(i ? Qh(t) : t, -n).sort(Mn);
8625
8625
  for (let l = 0; l < s.length; l++)
8626
8626
  s[l].type.valid(e, s[l]) || (r.onRemove && r.onRemove(s[l].spec), s.splice(l--, 1));
8627
8627
  return s.length || o.length ? new ae(s, o) : Re;
8628
8628
  }
8629
- function Tn(t, e) {
8629
+ function Mn(t, e) {
8630
8630
  return t.from - e.from || t.to - e.to;
8631
8631
  }
8632
8632
  function Fa(t) {
@@ -8648,7 +8648,7 @@ function Fa(t) {
8648
8648
  return e;
8649
8649
  }
8650
8650
  function Gu(t, e, n) {
8651
- for (; e < t.length && Tn(n, t[e]) > 0; )
8651
+ for (; e < t.length && Mn(n, t[e]) > 0; )
8652
8652
  e++;
8653
8653
  t.splice(e, 0, n);
8654
8654
  }
@@ -8657,7 +8657,7 @@ function Fs(t) {
8657
8657
  return t.someProp("decorations", (n) => {
8658
8658
  let r = n(t.state);
8659
8659
  r && r != Re && e.push(r);
8660
- }), t.cursorWrapper && e.push(ae.create(t.state.doc, [t.cursorWrapper.deco])), Zt.from(e);
8660
+ }), t.cursorWrapper && e.push(ae.create(t.state.doc, [t.cursorWrapper.deco])), qt.from(e);
8661
8661
  }
8662
8662
  const xv = {
8663
8663
  childList: !0,
@@ -8666,7 +8666,7 @@ const xv = {
8666
8666
  attributes: !0,
8667
8667
  attributeOldValue: !0,
8668
8668
  subtree: !0
8669
- }, Sv = Fe && rn <= 11;
8669
+ }, Sv = Fe && en <= 11;
8670
8670
  class kv {
8671
8671
  constructor() {
8672
8672
  this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
@@ -8686,7 +8686,7 @@ class Ev {
8686
8686
  this.view = e, this.handleDOMChange = n, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new kv(), this.onCharData = null, this.suppressingSelectionUpdates = !1, this.lastChangedTextNode = null, this.observer = window.MutationObserver && new window.MutationObserver((r) => {
8687
8687
  for (let o = 0; o < r.length; o++)
8688
8688
  this.queue.push(r[o]);
8689
- Fe && rn <= 11 && r.some((o) => o.type == "childList" && o.removedNodes.length || o.type == "characterData" && o.oldValue.length > o.target.nodeValue.length) ? this.flushSoon() : this.flush();
8689
+ Fe && en <= 11 && r.some((o) => o.type == "childList" && o.removedNodes.length || o.type == "characterData" && o.oldValue.length > o.target.nodeValue.length) ? this.flushSoon() : this.flush();
8690
8690
  }), Sv && (this.onCharData = (r) => {
8691
8691
  this.queue.push({ target: r.target, type: "characterData", oldValue: r.prevValue }), this.flushSoon();
8692
8692
  }), this.onSelectionChange = this.onSelectionChange.bind(this);
@@ -8727,9 +8727,9 @@ class Ev {
8727
8727
  if (Fu(this.view)) {
8728
8728
  if (this.suppressingSelectionUpdates)
8729
8729
  return Nt(this.view);
8730
- if (Fe && rn <= 11 && !this.view.state.selection.empty) {
8730
+ if (Fe && en <= 11 && !this.view.state.selection.empty) {
8731
8731
  let e = this.view.domSelectionRange();
8732
- if (e.focusNode && In(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset))
8732
+ if (e.focusNode && Nn(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset))
8733
8733
  return this.flushSoon();
8734
8734
  }
8735
8735
  this.flush();
@@ -8805,7 +8805,7 @@ class Ev {
8805
8805
  if (r.contentDOM && r.contentDOM != r.dom && !r.contentDOM.contains(e.target))
8806
8806
  return { from: r.posBefore, to: r.posAfter };
8807
8807
  let o = e.previousSibling, i = e.nextSibling;
8808
- if (Fe && rn <= 11 && e.addedNodes.length)
8808
+ if (Fe && en <= 11 && e.addedNodes.length)
8809
8809
  for (let u = 0; u < e.addedNodes.length; u++) {
8810
8810
  let { previousSibling: d, nextSibling: f } = e.addedNodes[u];
8811
8811
  (!d || Array.prototype.indexOf.call(e.addedNodes, d) < 0) && (o = d), (!f || Array.prototype.indexOf.call(e.addedNodes, f) < 0) && (i = f);
@@ -8833,7 +8833,7 @@ function Mv(t) {
8833
8833
  }
8834
8834
  function Yu(t, e) {
8835
8835
  let n = e.startContainer, r = e.startOffset, o = e.endContainer, i = e.endOffset, s = t.domAtPos(t.state.selection.anchor);
8836
- return In(s.node, s.offset, o, i) && ([n, r, o, i] = [o, i, n, r]), { anchorNode: n, anchorOffset: r, focusNode: o, focusOffset: i };
8836
+ return Nn(s.node, s.offset, o, i) && ([n, r, o, i] = [o, i, n, r]), { anchorNode: n, anchorOffset: r, focusNode: o, focusOffset: i };
8837
8837
  }
8838
8838
  function Tv(t, e) {
8839
8839
  if (e.getComposedRanges) {
@@ -8867,7 +8867,7 @@ function Rv(t, e, n) {
8867
8867
  if (!C || C.size)
8868
8868
  break;
8869
8869
  }
8870
- let d = t.state.doc, f = t.someProp("domParser") || nn.fromSchema(t.state.schema), h = d.resolve(s), p = null, m = f.parse(r, {
8870
+ let d = t.state.doc, f = t.someProp("domParser") || Qt.fromSchema(t.state.schema), h = d.resolve(s), p = null, m = f.parse(r, {
8871
8871
  topNode: h.parent,
8872
8872
  topMatch: h.parent.contentMatchAt(h.index()),
8873
8873
  topOpen: !0,
@@ -8904,7 +8904,7 @@ function Iv(t, e, n, r, o) {
8904
8904
  if (t.input.compositionPendingChanges = 0, e < 0) {
8905
8905
  let S = t.input.lastSelectionTime > Date.now() - 50 ? t.input.lastSelectionOrigin : null, M = La(t, S);
8906
8906
  if (M && !t.state.selection.eq(M)) {
8907
- if (Oe && Tt && t.input.lastKeyCode === 13 && Date.now() - 100 < t.input.lastKeyCodeTime && t.someProp("handleKeyDown", (B) => B(t, bn(13, "Enter"))))
8907
+ if (Oe && Tt && t.input.lastKeyCode === 13 && Date.now() - 100 < t.input.lastKeyCodeTime && t.someProp("handleKeyDown", (B) => B(t, gn(13, "Enter"))))
8908
8908
  return;
8909
8909
  let N = t.state.tr.setSelection(M);
8910
8910
  S == "pointer" ? N.setMeta("pointer", !0) : S == "key" && N.scrollIntoView(), i && N.setMeta("composition", i), t.dispatch(N);
@@ -8916,7 +8916,7 @@ function Iv(t, e, n, r, o) {
8916
8916
  let a = t.state.selection, c = Rv(t, e, n), u = t.state.doc, d = u.slice(c.from, c.to), f, h;
8917
8917
  t.input.lastKeyCode === 8 && Date.now() - 100 < t.input.lastKeyCodeTime ? (f = t.state.selection.to, h = "end") : (f = t.state.selection.from, h = "start"), t.input.lastKeyCode = null;
8918
8918
  let p = Pv(d.content, c.doc.content, c.from, f, h);
8919
- if (p && t.input.domChangeCount++, (lr && t.input.lastIOSEnter > Date.now() - 225 || Tt) && o.some((S) => S.nodeType == 1 && !Nv.test(S.nodeName)) && (!p || p.endA >= p.endB) && t.someProp("handleKeyDown", (S) => S(t, bn(13, "Enter")))) {
8919
+ if (p && t.input.domChangeCount++, (lr && t.input.lastIOSEnter > Date.now() - 225 || Tt) && o.some((S) => S.nodeType == 1 && !Nv.test(S.nodeName)) && (!p || p.endA >= p.endB) && t.someProp("handleKeyDown", (S) => S(t, gn(13, "Enter")))) {
8920
8920
  t.input.lastIOSEnter = 0;
8921
8921
  return;
8922
8922
  }
@@ -8933,19 +8933,19 @@ function Iv(t, e, n, r, o) {
8933
8933
  }
8934
8934
  return;
8935
8935
  }
8936
- t.state.selection.from < t.state.selection.to && p.start == p.endB && t.state.selection instanceof z && (p.start > t.state.selection.from && p.start <= t.state.selection.from + 2 && t.state.selection.from >= c.from ? p.start = t.state.selection.from : p.endA < t.state.selection.to && p.endA >= t.state.selection.to - 2 && t.state.selection.to <= c.to && (p.endB += t.state.selection.to - p.endA, p.endA = t.state.selection.to)), Fe && rn <= 11 && p.endB == p.start + 1 && p.endA == p.start && p.start > c.from && c.doc.textBetween(p.start - c.from - 1, p.start - c.from + 1) == "  " && (p.start--, p.endA--, p.endB--);
8936
+ t.state.selection.from < t.state.selection.to && p.start == p.endB && t.state.selection instanceof z && (p.start > t.state.selection.from && p.start <= t.state.selection.from + 2 && t.state.selection.from >= c.from ? p.start = t.state.selection.from : p.endA < t.state.selection.to && p.endA >= t.state.selection.to - 2 && t.state.selection.to <= c.to && (p.endB += t.state.selection.to - p.endA, p.endA = t.state.selection.to)), Fe && en <= 11 && p.endB == p.start + 1 && p.endA == p.start && p.start > c.from && c.doc.textBetween(p.start - c.from - 1, p.start - c.from + 1) == "  " && (p.start--, p.endA--, p.endB--);
8937
8937
  let m = c.doc.resolveNoCache(p.start - c.from), y = c.doc.resolveNoCache(p.endB - c.from), b = u.resolve(p.start), C = m.sameParent(y) && m.parent.inlineContent && b.end() >= p.endA;
8938
- if ((lr && t.input.lastIOSEnter > Date.now() - 225 && (!C || o.some((S) => S.nodeName == "DIV" || S.nodeName == "P")) || !C && m.pos < c.doc.content.size && (!m.sameParent(y) || !m.parent.inlineContent) && m.pos < y.pos && !/\S/.test(c.doc.textBetween(m.pos, y.pos, "", ""))) && t.someProp("handleKeyDown", (S) => S(t, bn(13, "Enter")))) {
8938
+ if ((lr && t.input.lastIOSEnter > Date.now() - 225 && (!C || o.some((S) => S.nodeName == "DIV" || S.nodeName == "P")) || !C && m.pos < c.doc.content.size && (!m.sameParent(y) || !m.parent.inlineContent) && m.pos < y.pos && !/\S/.test(c.doc.textBetween(m.pos, y.pos, "", ""))) && t.someProp("handleKeyDown", (S) => S(t, gn(13, "Enter")))) {
8939
8939
  t.input.lastIOSEnter = 0;
8940
8940
  return;
8941
8941
  }
8942
- if (t.state.selection.anchor > p.start && Dv(u, p.start, p.endA, m, y) && t.someProp("handleKeyDown", (S) => S(t, bn(8, "Backspace")))) {
8942
+ if (t.state.selection.anchor > p.start && Dv(u, p.start, p.endA, m, y) && t.someProp("handleKeyDown", (S) => S(t, gn(8, "Backspace")))) {
8943
8943
  Tt && Oe && t.domObserver.suppressSelectionUpdates();
8944
8944
  return;
8945
8945
  }
8946
8946
  Oe && p.endB == p.start && (t.input.lastChromeDelete = Date.now()), Tt && !C && m.start() != y.start() && y.parentOffset == 0 && m.depth == y.depth && c.sel && c.sel.anchor == c.sel.head && c.sel.head == p.endA && (p.endB -= 2, y = c.doc.resolveNoCache(p.endB - c.from), setTimeout(() => {
8947
8947
  t.someProp("handleKeyDown", function(S) {
8948
- return S(t, bn(13, "Enter"));
8948
+ return S(t, gn(13, "Enter"));
8949
8949
  });
8950
8950
  }, 20));
8951
8951
  let w = p.start, x = p.endA, E = (S) => {
@@ -8958,7 +8958,7 @@ function Iv(t, e, n, r, o) {
8958
8958
  }, k;
8959
8959
  if (C)
8960
8960
  if (m.pos == y.pos) {
8961
- Fe && rn <= 11 && m.parentOffset == 0 && (t.domObserver.suppressSelectionUpdates(), setTimeout(() => Nt(t), 20));
8961
+ Fe && en <= 11 && m.parentOffset == 0 && (t.domObserver.suppressSelectionUpdates(), setTimeout(() => Nt(t), 20));
8962
8962
  let S = E(t.state.tr.delete(w, x)), M = u.resolve(p.start).marksAcross(u.resolve(p.endA));
8963
8963
  M && S.ensureMarks(M), t.dispatch(S);
8964
8964
  } else if (
@@ -9429,7 +9429,7 @@ function od(t) {
9429
9429
  if (t.spec.state || t.spec.filterTransaction || t.spec.appendTransaction)
9430
9430
  throw new RangeError("Plugins passed directly to the view must not have a state component");
9431
9431
  }
9432
- var cn = {
9432
+ var sn = {
9433
9433
  8: "Backspace",
9434
9434
  9: "Tab",
9435
9435
  10: "Enter",
@@ -9508,13 +9508,13 @@ var cn = {
9508
9508
  221: "}",
9509
9509
  222: '"'
9510
9510
  }, Hv = typeof navigator < "u" && /Mac/.test(navigator.platform), $v = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
9511
- for (var Me = 0; Me < 10; Me++) cn[48 + Me] = cn[96 + Me] = String(Me);
9512
- for (var Me = 1; Me <= 24; Me++) cn[Me + 111] = "F" + Me;
9511
+ for (var Me = 0; Me < 10; Me++) sn[48 + Me] = sn[96 + Me] = String(Me);
9512
+ for (var Me = 1; Me <= 24; Me++) sn[Me + 111] = "F" + Me;
9513
9513
  for (var Me = 65; Me <= 90; Me++)
9514
- cn[Me] = String.fromCharCode(Me + 32), oi[Me] = String.fromCharCode(Me);
9515
- for (var zs in cn) oi.hasOwnProperty(zs) || (oi[zs] = cn[zs]);
9514
+ sn[Me] = String.fromCharCode(Me + 32), oi[Me] = String.fromCharCode(Me);
9515
+ for (var zs in sn) oi.hasOwnProperty(zs) || (oi[zs] = sn[zs]);
9516
9516
  function Fv(t) {
9517
- var e = Hv && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || $v && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? oi : cn)[t.keyCode] || t.key || "Unidentified";
9517
+ var e = Hv && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || $v && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? oi : sn)[t.keyCode] || t.key || "Unidentified";
9518
9518
  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;
9519
9519
  }
9520
9520
  const Vv = typeof navigator < "u" && /Mac|iP(hone|[oa]d)/.test(navigator.platform), zv = typeof navigator < "u" && /Win/.test(navigator.platform);
@@ -9564,7 +9564,7 @@ function tp(t) {
9564
9564
  return !0;
9565
9565
  }
9566
9566
  if ((r.altKey || r.metaKey || r.ctrlKey) && // Ctrl-Alt may be used for AltGr on Windows
9567
- !(zv && r.ctrlKey && r.altKey) && (i = cn[r.keyCode]) && i != o) {
9567
+ !(zv && r.ctrlKey && r.altKey) && (i = sn[r.keyCode]) && i != o) {
9568
9568
  let l = e[Us(i, r)];
9569
9569
  if (l && l(n.state, n.dispatch, n))
9570
9570
  return !0;
@@ -9855,7 +9855,7 @@ var ib = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
9855
9855
  function op(t) {
9856
9856
  return t instanceof z;
9857
9857
  }
9858
- function xn(t = 0, e = 0, n = 0) {
9858
+ function wn(t = 0, e = 0, n = 0) {
9859
9859
  return Math.min(Math.max(t, e), n);
9860
9860
  }
9861
9861
  function ip(t, e = null) {
@@ -9867,7 +9867,7 @@ function ip(t, e = null) {
9867
9867
  if (e === "end")
9868
9868
  return r;
9869
9869
  const o = n.from, i = r.to;
9870
- return e === "all" ? z.create(t, xn(0, o, i), xn(t.content.size, o, i)) : z.create(t, xn(e, o, i), xn(e, o, i));
9870
+ return e === "all" ? z.create(t, wn(0, o, i), wn(t.content.size, o, i)) : z.create(t, wn(e, o, i), wn(e, o, i));
9871
9871
  }
9872
9872
  function sp() {
9873
9873
  return navigator.platform === "Android" || /android/i.test(navigator.userAgent);
@@ -9907,7 +9907,7 @@ function Co(t) {
9907
9907
  return lp(n);
9908
9908
  }
9909
9909
  function Vr(t, e, n) {
9910
- if (t instanceof tn || t instanceof A)
9910
+ if (t instanceof Xt || t instanceof A)
9911
9911
  return t;
9912
9912
  n = {
9913
9913
  slice: !0,
@@ -9947,12 +9947,12 @@ function Vr(t, e, n) {
9947
9947
  }
9948
9948
  })
9949
9949
  });
9950
- if (n.slice ? nn.fromSchema(a).parseSlice(Co(t), n.parseOptions) : nn.fromSchema(a).parse(Co(t), n.parseOptions), n.errorOnInvalidContent && s)
9950
+ if (n.slice ? Qt.fromSchema(a).parseSlice(Co(t), n.parseOptions) : Qt.fromSchema(a).parse(Co(t), n.parseOptions), n.errorOnInvalidContent && s)
9951
9951
  throw new Error("[tiptap error]: Invalid HTML content", {
9952
9952
  cause: new Error(`Invalid element found: ${l}`)
9953
9953
  });
9954
9954
  }
9955
- const i = nn.fromSchema(e);
9955
+ const i = Qt.fromSchema(e);
9956
9956
  return n.slice ? i.parseSlice(Co(t), n.parseOptions).content : i.parse(Co(t), n.parseOptions);
9957
9957
  }
9958
9958
  return Vr("", e, n);
@@ -10093,7 +10093,7 @@ var xb = (t) => ({ editor: e, view: n, tr: r, dispatch: o }) => {
10093
10093
  u && o && r.maybeStep(u);
10094
10094
  }), !0;
10095
10095
  };
10096
- function un(t, e, n = {}) {
10096
+ function ln(t, e, n = {}) {
10097
10097
  const { from: r, to: o, empty: i } = t.selection, s = e ? ge(e, t.schema) : null, l = [];
10098
10098
  t.doc.nodesBetween(r, o, (d, f) => {
10099
10099
  if (d.isText)
@@ -10110,7 +10110,7 @@ function un(t, e, n = {}) {
10110
10110
  }
10111
10111
  var Sb = (t, e = {}) => ({ state: n, dispatch: r }) => {
10112
10112
  const o = ge(t, n.schema);
10113
- return un(n, o, e) ? z2(n, r) : !1;
10113
+ return ln(n, o, e) ? z2(n, r) : !1;
10114
10114
  }, kb = () => ({ state: t, dispatch: e }) => vh(t, e), Eb = (t) => ({ state: e, dispatch: n }) => {
10115
10115
  const r = ge(t, e.schema);
10116
10116
  return ey(r)(e, n);
@@ -10236,7 +10236,7 @@ function ja(t) {
10236
10236
  }).flat(10);
10237
10237
  }
10238
10238
  function Ka(t, e) {
10239
- const n = _n.fromSchema(e).serializeFragment(t), o = document.implementation.createHTMLDocument().createElement("div");
10239
+ const n = Bn.fromSchema(e).serializeFragment(t), o = document.implementation.createHTMLDocument().createElement("div");
10240
10240
  return o.appendChild(n), o.innerHTML;
10241
10241
  }
10242
10242
  function dp(t) {
@@ -10656,9 +10656,9 @@ function Wl(t, e, n = {}) {
10656
10656
  }
10657
10657
  function Jb(t, e, n = {}) {
10658
10658
  if (!e)
10659
- return un(t, null, n) || Wl(t, null, n);
10659
+ return ln(t, null, n) || Wl(t, null, n);
10660
10660
  const r = ns(e, t.schema);
10661
- return r === "node" ? un(t, e, n) : r === "mark" ? Wl(t, e, n) : !1;
10661
+ return r === "node" ? ln(t, e, n) : r === "mark" ? Wl(t, e, n) : !1;
10662
10662
  }
10663
10663
  var Zb = (t, e) => {
10664
10664
  const { $from: n, $to: r, $anchor: o } = t.selection;
@@ -10773,13 +10773,13 @@ var Qb = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
10773
10773
  return n.selection.$anchor.sameParent(n.selection.$head) && (s = n.selection.$anchor.parent.attrs), i.isTextblock ? o().command(({ commands: l }) => Eu(i, { ...s, ...e })(n) ? !0 : l.clearNodes()).command(({ state: l }) => Eu(i, { ...s, ...e })(l, r)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
10774
10774
  }, nC = (t) => ({ tr: e, dispatch: n }) => {
10775
10775
  if (n) {
10776
- const { doc: r } = e, o = xn(t, 0, r.content.size), i = _.create(r, o);
10776
+ const { doc: r } = e, o = wn(t, 0, r.content.size), i = _.create(r, o);
10777
10777
  e.setSelection(i);
10778
10778
  }
10779
10779
  return !0;
10780
10780
  }, rC = (t) => ({ tr: e, dispatch: n }) => {
10781
10781
  if (n) {
10782
- const { doc: r } = e, { from: o, to: i } = typeof t == "number" ? { from: t, to: t } : t, s = z.atStart(r).from, l = z.atEnd(r).to, a = xn(o, s, l), c = xn(i, s, l), u = z.create(r, a, c);
10782
+ const { doc: r } = e, { from: o, to: i } = typeof t == "number" ? { from: t, to: t } : t, s = z.atStart(r).from, l = z.atEnd(r).to, a = wn(o, s, l), c = wn(i, s, l), u = z.create(r, a, c);
10783
10783
  e.setSelection(u);
10784
10784
  }
10785
10785
  return !0;
@@ -10886,7 +10886,7 @@ var iC = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, editor
10886
10886
  if (r === void 0)
10887
10887
  return !0;
10888
10888
  const o = t.doc.nodeAt(r);
10889
- return n.node.type === o?.type && pn(t.doc, n.pos) && t.join(n.pos), !0;
10889
+ return n.node.type === o?.type && dn(t.doc, n.pos) && t.join(n.pos), !0;
10890
10890
  }, Ks = (t, e) => {
10891
10891
  const n = rs((s) => s.type === e)(t.selection);
10892
10892
  if (!n)
@@ -10895,7 +10895,7 @@ var iC = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, editor
10895
10895
  if (r === void 0)
10896
10896
  return !0;
10897
10897
  const o = t.doc.nodeAt(r);
10898
- return n.node.type === o?.type && pn(t.doc, r) && t.join(r), !0;
10898
+ return n.node.type === o?.type && dn(t.doc, r) && t.join(r), !0;
10899
10899
  }, lC = (t, e, n, r = {}) => ({ editor: o, tr: i, state: s, dispatch: l, chain: a, commands: c, can: u }) => {
10900
10900
  const { extensions: d, splittableMarks: f } = o.extensionManager, h = ge(t, s.schema), p = ge(e, s.schema), { selection: m, storedMarks: y } = s, { $from: b, $to: C } = m, w = b.blockRange(C), x = y || m.$to.parentOffset && m.$from.marks();
10901
10901
  if (!w)
@@ -10915,12 +10915,12 @@ var iC = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, editor
10915
10915
  const { extendEmptyMarkRange: i = !1 } = n, s = _t(t, r.schema);
10916
10916
  return Wl(r, s, e) ? o.unsetMark(s, { extendEmptyMarkRange: i }) : o.setMark(s, e);
10917
10917
  }, cC = (t, e, n = {}) => ({ state: r, commands: o }) => {
10918
- const i = ge(t, r.schema), s = ge(e, r.schema), l = un(r, i, n);
10918
+ const i = ge(t, r.schema), s = ge(e, r.schema), l = ln(r, i, n);
10919
10919
  let a;
10920
10920
  return r.selection.$anchor.sameParent(r.selection.$head) && (a = r.selection.$anchor.parent.attrs), l ? o.setNode(s, a) : o.setNode(i, { ...a, ...n });
10921
10921
  }, uC = (t, e = {}) => ({ state: n, commands: r }) => {
10922
10922
  const o = ge(t, n.schema);
10923
- return un(n, o, e) ? r.lift(o) : r.wrapIn(o, e);
10923
+ return ln(n, o, e) ? r.lift(o) : r.wrapIn(o, e);
10924
10924
  }, dC = () => ({ state: t, dispatch: e }) => {
10925
10925
  const n = t.plugins;
10926
10926
  for (let r = 0; r < n.length; r += 1) {
@@ -11866,7 +11866,7 @@ var Q = class Cp extends Za {
11866
11866
  })
11867
11867
  ];
11868
11868
  }
11869
- }), AC = class Zn {
11869
+ }), AC = class Jn {
11870
11870
  constructor(e, n, r = !1, o = null) {
11871
11871
  this.currentNode = null, this.actualDepth = null, this.isBlock = r, this.resolvedPos = e, this.editor = n, this.currentNode = o;
11872
11872
  }
@@ -11925,15 +11925,15 @@ var Q = class Cp extends Za {
11925
11925
  if (this.depth === 0)
11926
11926
  return null;
11927
11927
  const e = this.resolvedPos.start(this.resolvedPos.depth - 1), n = this.resolvedPos.doc.resolve(e);
11928
- return new Zn(n, this.editor);
11928
+ return new Jn(n, this.editor);
11929
11929
  }
11930
11930
  get before() {
11931
11931
  let e = this.resolvedPos.doc.resolve(this.from - (this.isBlock ? 1 : 2));
11932
- return e.depth !== this.depth && (e = this.resolvedPos.doc.resolve(this.from - 3)), new Zn(e, this.editor);
11932
+ return e.depth !== this.depth && (e = this.resolvedPos.doc.resolve(this.from - 3)), new Jn(e, this.editor);
11933
11933
  }
11934
11934
  get after() {
11935
11935
  let e = this.resolvedPos.doc.resolve(this.to + (this.isBlock ? 2 : 1));
11936
- return e.depth !== this.depth && (e = this.resolvedPos.doc.resolve(this.to + 3)), new Zn(e, this.editor);
11936
+ return e.depth !== this.depth && (e = this.resolvedPos.doc.resolve(this.to + 3)), new Jn(e, this.editor);
11937
11937
  }
11938
11938
  get children() {
11939
11939
  const e = [];
@@ -11944,8 +11944,8 @@ var Q = class Cp extends Za {
11944
11944
  const l = this.resolvedPos.doc.resolve(s);
11945
11945
  if (!o && l.depth <= this.depth)
11946
11946
  return;
11947
- const a = new Zn(l, this.editor, o, o ? n : null);
11948
- o && (a.actualDepth = this.depth + 1), e.push(new Zn(l, this.editor, o, o ? n : null));
11947
+ const a = new Jn(l, this.editor, o, o ? n : null);
11948
+ o && (a.actualDepth = this.depth + 1), e.push(new Jn(l, this.editor, o, o ? n : null));
11949
11949
  }), e;
11950
11950
  }
11951
11951
  get firstChild() {
@@ -12489,7 +12489,7 @@ var NC = class extends yC {
12489
12489
  return this.$pos(0);
12490
12490
  }
12491
12491
  };
12492
- function Dn(t) {
12492
+ function Ln(t) {
12493
12493
  return new no({
12494
12494
  find: t.find,
12495
12495
  handler: ({ state: e, range: n, match: r }) => {
@@ -12579,7 +12579,7 @@ function ar(t) {
12579
12579
  o().updateAttributes(d, i).run();
12580
12580
  }
12581
12581
  const u = s.doc.resolve(n.from - 1).nodeBefore;
12582
- u && u.type === t.type && pn(s.doc, n.from - 1) && (!t.joinPredicate || t.joinPredicate(r, u)) && s.join(n.from - 1);
12582
+ u && u.type === t.type && dn(s.doc, n.from - 1) && (!t.joinPredicate || t.joinPredicate(r, u)) && s.join(n.from - 1);
12583
12583
  },
12584
12584
  undoable: t.undoable
12585
12585
  });
@@ -13091,7 +13091,7 @@ var _e = class Np extends Za {
13091
13091
  this.editor.commands.deleteRange({ from: t, to: e });
13092
13092
  }
13093
13093
  };
13094
- function dn(t) {
13094
+ function an(t) {
13095
13095
  return new xC({
13096
13096
  find: t.find,
13097
13097
  handler: ({ state: e, range: n, match: r, pasteEvent: o }) => {
@@ -13397,7 +13397,7 @@ var XC = class extends pe.Component {
13397
13397
  ...t
13398
13398
  });
13399
13399
  }
13400
- ), ew = pe.memo(QC), tw = typeof window < "u" ? ji : Rn, nw = class {
13400
+ ), ew = pe.memo(QC), tw = typeof window < "u" ? ji : An, nw = class {
13401
13401
  constructor(t) {
13402
13402
  this.transactionNumber = 0, this.lastTransactionNumber = 0, this.subscribers = /* @__PURE__ */ new Set(), this.editor = t, this.lastSnapshot = { editor: t, transactionNumber: 0 }, this.getSnapshot = this.getSnapshot.bind(this), this.getServerSnapshot = this.getServerSnapshot.bind(this), this.watch = this.watch.bind(this), this.subscribe = this.subscribe.bind(this);
13403
13403
  }
@@ -13617,7 +13617,7 @@ function iw(t = {}, e = []) {
13617
13617
  r.getEditor,
13618
13618
  r.getServerSnapshot
13619
13619
  );
13620
- return Ef(o), Rn(r.onRender(e)), Ip({
13620
+ return Ef(o), An(r.onRender(e)), Ip({
13621
13621
  editor: o,
13622
13622
  selector: ({ transactionNumber: i }) => t.shouldRerenderOnTransaction === !1 || t.shouldRerenderOnTransaction === void 0 ? null : t.immediatelyRender && i === 0 ? 0 : i + 1
13623
13623
  }), o;
@@ -14013,11 +14013,11 @@ var si = (t, e) => {
14013
14013
  },
14014
14014
  addInputRules() {
14015
14015
  return [
14016
- Dn({
14016
+ Ln({
14017
14017
  find: ww,
14018
14018
  type: this.type
14019
14019
  }),
14020
- Dn({
14020
+ Ln({
14021
14021
  find: Sw,
14022
14022
  type: this.type
14023
14023
  })
@@ -14025,11 +14025,11 @@ var si = (t, e) => {
14025
14025
  },
14026
14026
  addPasteRules() {
14027
14027
  return [
14028
- dn({
14028
+ an({
14029
14029
  find: xw,
14030
14030
  type: this.type
14031
14031
  }),
14032
- dn({
14032
+ an({
14033
14033
  find: kw,
14034
14034
  type: this.type
14035
14035
  })
@@ -14068,7 +14068,7 @@ var si = (t, e) => {
14068
14068
  },
14069
14069
  addInputRules() {
14070
14070
  return [
14071
- Dn({
14071
+ Ln({
14072
14072
  find: Mw,
14073
14073
  type: this.type
14074
14074
  })
@@ -14076,7 +14076,7 @@ var si = (t, e) => {
14076
14076
  },
14077
14077
  addPasteRules() {
14078
14078
  return [
14079
- dn({
14079
+ an({
14080
14080
  find: Tw,
14081
14081
  type: this.type
14082
14082
  })
@@ -14506,11 +14506,11 @@ var si = (t, e) => {
14506
14506
  },
14507
14507
  addInputRules() {
14508
14508
  return [
14509
- Dn({
14509
+ Ln({
14510
14510
  find: Bw,
14511
14511
  type: this.type
14512
14512
  }),
14513
- Dn({
14513
+ Ln({
14514
14514
  find: Hw,
14515
14515
  type: this.type
14516
14516
  })
@@ -14518,11 +14518,11 @@ var si = (t, e) => {
14518
14518
  },
14519
14519
  addPasteRules() {
14520
14520
  return [
14521
- dn({
14521
+ an({
14522
14522
  find: _w,
14523
14523
  type: this.type
14524
14524
  }),
14525
- dn({
14525
+ an({
14526
14526
  find: $w,
14527
14527
  type: this.type
14528
14528
  })
@@ -14533,7 +14533,7 @@ const Vw = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4
14533
14533
  function jw(t, e) {
14534
14534
  return t in e || (e[t] = []), e[t];
14535
14535
  }
14536
- function Sn(t, e, n) {
14536
+ function xn(t, e, n) {
14537
14537
  e[Gl] && (e[Tr] = !0, e[Cr] = !0), e[Jl] && (e[Tr] = !0, e[Zl] = !0), e[Tr] && (e[Cr] = !0), e[Zl] && (e[Cr] = !0), e[Cr] && (e[Yl] = !0), e[Hp] && (e[Yl] = !0);
14538
14538
  for (const r in e) {
14539
14539
  const o = jw(r, n);
@@ -14605,7 +14605,7 @@ $e.prototype = {
14605
14605
  tr(t, e, n, r) {
14606
14606
  r = r || $e.groups;
14607
14607
  let o;
14608
- return e && e.j ? o = e : (o = new $e(e), n && r && Sn(e, n, r)), this.jr.push([t, o]), o;
14608
+ return e && e.j ? o = e : (o = new $e(e), n && r && xn(e, n, r)), this.jr.push([t, o]), o;
14609
14609
  },
14610
14610
  /**
14611
14611
  * Short for "take transitions", will take as many sequential transitions as
@@ -14663,14 +14663,14 @@ $e.prototype = {
14663
14663
  if (r)
14664
14664
  if (s.t && typeof s.t == "string") {
14665
14665
  const a = Object.assign(Kw(s.t, r), n);
14666
- Sn(i, a, r);
14667
- } else n && Sn(i, n, r);
14666
+ xn(i, a, r);
14667
+ } else n && xn(i, n, r);
14668
14668
  s.t = i;
14669
14669
  }
14670
14670
  return o.j[t] = s, s;
14671
14671
  }
14672
14672
  };
14673
- const G = (t, e, n, r, o) => t.ta(e, n, r, o), ue = (t, e, n, r, o) => t.tr(e, n, r, o), Cd = (t, e, n, r, o) => t.ts(e, n, r, o), O = (t, e, n, r, o) => t.tt(e, n, r, o), Et = "WORD", Xl = "UWORD", $p = "ASCIINUMERICAL", Fp = "ALPHANUMERICAL", Wr = "LOCALHOST", Ql = "TLD", ea = "UTLD", Vo = "SCHEME", Yn = "SLASH_SCHEME", tc = "NUM", ta = "WS", nc = "NL", Ar = "OPENBRACE", Rr = "CLOSEBRACE", li = "OPENBRACKET", ai = "CLOSEBRACKET", ci = "OPENPAREN", ui = "CLOSEPAREN", di = "OPENANGLEBRACKET", fi = "CLOSEANGLEBRACKET", hi = "FULLWIDTHLEFTPAREN", pi = "FULLWIDTHRIGHTPAREN", mi = "LEFTCORNERBRACKET", gi = "RIGHTCORNERBRACKET", yi = "LEFTWHITECORNERBRACKET", vi = "RIGHTWHITECORNERBRACKET", bi = "FULLWIDTHLESSTHAN", Ci = "FULLWIDTHGREATERTHAN", wi = "AMPERSAND", xi = "APOSTROPHE", Si = "ASTERISK", Kt = "AT", ki = "BACKSLASH", Ei = "BACKTICK", Mi = "CARET", Yt = "COLON", rc = "COMMA", Ti = "DOLLAR", at = "DOT", Ai = "EQUALS", oc = "EXCLAMATION", Ye = "HYPHEN", Or = "PERCENT", Ri = "PIPE", Oi = "PLUS", Ni = "POUND", Nr = "QUERY", ic = "QUOTE", Vp = "FULLWIDTHMIDDLEDOT", sc = "SEMI", ct = "SLASH", Ir = "TILDE", Ii = "UNDERSCORE", zp = "EMOJI", Li = "SYM";
14673
+ const G = (t, e, n, r, o) => t.ta(e, n, r, o), ue = (t, e, n, r, o) => t.tr(e, n, r, o), Cd = (t, e, n, r, o) => t.ts(e, n, r, o), O = (t, e, n, r, o) => t.tt(e, n, r, o), Et = "WORD", Xl = "UWORD", $p = "ASCIINUMERICAL", Fp = "ALPHANUMERICAL", Wr = "LOCALHOST", Ql = "TLD", ea = "UTLD", Vo = "SCHEME", Zn = "SLASH_SCHEME", tc = "NUM", ta = "WS", nc = "NL", Ar = "OPENBRACE", Rr = "CLOSEBRACE", li = "OPENBRACKET", ai = "CLOSEBRACKET", ci = "OPENPAREN", ui = "CLOSEPAREN", di = "OPENANGLEBRACKET", fi = "CLOSEANGLEBRACKET", hi = "FULLWIDTHLEFTPAREN", pi = "FULLWIDTHRIGHTPAREN", mi = "LEFTCORNERBRACKET", gi = "RIGHTCORNERBRACKET", yi = "LEFTWHITECORNERBRACKET", vi = "RIGHTWHITECORNERBRACKET", bi = "FULLWIDTHLESSTHAN", Ci = "FULLWIDTHGREATERTHAN", wi = "AMPERSAND", xi = "APOSTROPHE", Si = "ASTERISK", jt = "AT", ki = "BACKSLASH", Ei = "BACKTICK", Mi = "CARET", Gt = "COLON", rc = "COMMA", Ti = "DOLLAR", at = "DOT", Ai = "EQUALS", oc = "EXCLAMATION", Ye = "HYPHEN", Or = "PERCENT", Ri = "PIPE", Oi = "PLUS", Ni = "POUND", Nr = "QUERY", ic = "QUOTE", Vp = "FULLWIDTHMIDDLEDOT", sc = "SEMI", ct = "SLASH", Ir = "TILDE", Ii = "UNDERSCORE", zp = "EMOJI", Li = "SYM";
14674
14674
  var Up = /* @__PURE__ */ Object.freeze({
14675
14675
  __proto__: null,
14676
14676
  ALPHANUMERICAL: Fp,
@@ -14678,7 +14678,7 @@ var Up = /* @__PURE__ */ Object.freeze({
14678
14678
  APOSTROPHE: xi,
14679
14679
  ASCIINUMERICAL: $p,
14680
14680
  ASTERISK: Si,
14681
- AT: Kt,
14681
+ AT: jt,
14682
14682
  BACKSLASH: ki,
14683
14683
  BACKTICK: Ei,
14684
14684
  CARET: Mi,
@@ -14686,7 +14686,7 @@ var Up = /* @__PURE__ */ Object.freeze({
14686
14686
  CLOSEBRACE: Rr,
14687
14687
  CLOSEBRACKET: ai,
14688
14688
  CLOSEPAREN: ui,
14689
- COLON: Yt,
14689
+ COLON: Gt,
14690
14690
  COMMA: rc,
14691
14691
  DOLLAR: Ti,
14692
14692
  DOT: at,
@@ -14719,7 +14719,7 @@ var Up = /* @__PURE__ */ Object.freeze({
14719
14719
  SCHEME: Vo,
14720
14720
  SEMI: sc,
14721
14721
  SLASH: ct,
14722
- SLASH_SCHEME: Yn,
14722
+ SLASH_SCHEME: Zn,
14723
14723
  SYM: Li,
14724
14724
  TILDE: Ir,
14725
14725
  TLD: Ql,
@@ -14736,7 +14736,7 @@ function Jw(t = []) {
14736
14736
  const e = {};
14737
14737
  $e.groups = e;
14738
14738
  const n = new $e();
14739
- Eo == null && (Eo = xd(Vw)), Mo == null && (Mo = xd(zw)), O(n, "'", xi), O(n, "{", Ar), O(n, "}", Rr), O(n, "[", li), O(n, "]", ai), O(n, "(", ci), O(n, ")", ui), O(n, "<", di), O(n, ">", fi), O(n, "(", hi), O(n, ")", pi), O(n, "「", mi), O(n, "」", gi), O(n, "『", yi), O(n, "』", vi), O(n, "<", bi), O(n, ">", Ci), O(n, "&", wi), O(n, "*", Si), O(n, "@", Kt), O(n, "`", Ei), O(n, "^", Mi), O(n, ":", Yt), O(n, ",", rc), O(n, "$", Ti), O(n, ".", at), O(n, "=", Ai), O(n, "!", oc), O(n, "-", Ye), O(n, "%", Or), O(n, "|", Ri), O(n, "+", Oi), O(n, "#", Ni), O(n, "?", Nr), O(n, '"', ic), O(n, "/", ct), O(n, ";", sc), O(n, "~", Ir), O(n, "_", Ii), O(n, "\\", ki), O(n, "・", Vp);
14739
+ Eo == null && (Eo = xd(Vw)), Mo == null && (Mo = xd(zw)), O(n, "'", xi), O(n, "{", Ar), O(n, "}", Rr), O(n, "[", li), O(n, "]", ai), O(n, "(", ci), O(n, ")", ui), O(n, "<", di), O(n, ">", fi), O(n, "(", hi), O(n, ")", pi), O(n, "「", mi), O(n, "」", gi), O(n, "『", yi), O(n, "』", vi), O(n, "<", bi), O(n, ">", Ci), O(n, "&", wi), O(n, "*", Si), O(n, "@", jt), O(n, "`", Ei), O(n, "^", Mi), O(n, ":", Gt), O(n, ",", rc), O(n, "$", Ti), O(n, ".", at), O(n, "=", Ai), O(n, "!", oc), O(n, "-", Ye), O(n, "%", Or), O(n, "|", Ri), O(n, "+", Oi), O(n, "#", Ni), O(n, "?", Nr), O(n, '"', ic), O(n, "/", ct), O(n, ";", sc), O(n, "~", Ir), O(n, "_", Ii), O(n, "\\", ki), O(n, "・", Vp);
14740
14740
  const r = ue(n, kt, tc, {
14741
14741
  [Gl]: !0
14742
14742
  });
@@ -14772,16 +14772,16 @@ function Jw(t = []) {
14772
14772
  Ft(n, Eo[m], Ql, Et, h);
14773
14773
  for (let m = 0; m < Mo.length; m++)
14774
14774
  Ft(n, Mo[m], ea, Xl, p);
14775
- Sn(Ql, {
14775
+ xn(Ql, {
14776
14776
  tld: !0,
14777
14777
  ascii: !0
14778
- }, e), Sn(ea, {
14778
+ }, e), xn(ea, {
14779
14779
  utld: !0,
14780
14780
  alpha: !0
14781
- }, e), Ft(n, "file", Vo, Et, h), Ft(n, "mailto", Vo, Et, h), Ft(n, "http", Yn, Et, h), Ft(n, "https", Yn, Et, h), Ft(n, "ftp", Yn, Et, h), Ft(n, "ftps", Yn, Et, h), Sn(Vo, {
14781
+ }, e), Ft(n, "file", Vo, Et, h), Ft(n, "mailto", Vo, Et, h), Ft(n, "http", Zn, Et, h), Ft(n, "https", Zn, Et, h), Ft(n, "ftp", Zn, Et, h), Ft(n, "ftps", Zn, Et, h), xn(Vo, {
14782
14782
  scheme: !0,
14783
14783
  ascii: !0
14784
- }, e), Sn(Yn, {
14784
+ }, e), xn(Zn, {
14785
14785
  slashscheme: !0,
14786
14786
  ascii: !0
14787
14787
  }, e), t = t.sort((m, y) => m[0] > y[0] ? 1 : -1);
@@ -15086,18 +15086,18 @@ const kd = ls("email", {
15086
15086
  */
15087
15087
  hasProtocol() {
15088
15088
  const t = this.tk;
15089
- return t.length >= 2 && t[0].t !== Wr && t[1].t === Yt;
15089
+ return t.length >= 2 && t[0].t !== Wr && t[1].t === Gt;
15090
15090
  }
15091
15091
  }), Je = (t) => new $e(t);
15092
15092
  function Xw({
15093
15093
  groups: t
15094
15094
  }) {
15095
- const e = t.domain.concat([wi, Si, Kt, ki, Ei, Mi, Ti, Ai, Ye, tc, Or, Ri, Oi, Ni, ct, Li, Ir, Ii]), n = [xi, Yt, rc, at, oc, Or, Nr, ic, sc, di, fi, Ar, Rr, ai, li, ci, ui, hi, pi, mi, gi, yi, vi, bi, Ci], r = [wi, xi, Si, ki, Ei, Mi, Ti, Ai, Ye, Ar, Rr, Or, Ri, Oi, Ni, Nr, ct, Li, Ir, Ii], o = Je(), i = O(o, Ir);
15095
+ const e = t.domain.concat([wi, Si, jt, ki, Ei, Mi, Ti, Ai, Ye, tc, Or, Ri, Oi, Ni, ct, Li, Ir, Ii]), n = [xi, Gt, rc, at, oc, Or, Nr, ic, sc, di, fi, Ar, Rr, ai, li, ci, ui, hi, pi, mi, gi, yi, vi, bi, Ci], r = [wi, xi, Si, ki, Ei, Mi, Ti, Ai, Ye, Ar, Rr, Or, Ri, Oi, Ni, Nr, ct, Li, Ir, Ii], o = Je(), i = O(o, Ir);
15096
15096
  G(i, r, i), G(i, t.domain, i);
15097
15097
  const s = Je(), l = Je(), a = Je();
15098
15098
  G(o, t.domain, s), G(o, t.scheme, l), G(o, t.slashscheme, a), G(s, r, i), G(s, t.domain, s);
15099
- const c = O(s, Kt);
15100
- O(i, Kt, c), O(l, Kt, c), O(a, Kt, c);
15099
+ const c = O(s, jt);
15100
+ O(i, jt, c), O(l, jt, c), O(a, jt, c);
15101
15101
  const u = O(i, at);
15102
15102
  G(u, r, i), G(u, t.domain, i);
15103
15103
  const d = Je();
@@ -15108,17 +15108,17 @@ function Xw({
15108
15108
  G(f, t.tld, h), G(f, t.utld, h), O(c, Wr, h);
15109
15109
  const p = O(d, Ye);
15110
15110
  O(p, Ye, p), G(p, t.domain, d), G(h, t.domain, d), O(h, at, f), O(h, Ye, p);
15111
- const m = O(h, Yt);
15111
+ const m = O(h, Gt);
15112
15112
  G(m, t.numeric, kd);
15113
15113
  const y = O(s, Ye), b = O(s, at);
15114
15114
  O(y, Ye, y), G(y, t.domain, s), G(b, r, i), G(b, t.domain, s);
15115
15115
  const C = Je(To);
15116
- G(b, t.tld, C), G(b, t.utld, C), G(C, t.domain, s), G(C, r, i), O(C, at, b), O(C, Ye, y), O(C, Kt, c);
15117
- const w = O(C, Yt), x = Je(To);
15116
+ G(b, t.tld, C), G(b, t.utld, C), G(C, t.domain, s), G(C, r, i), O(C, at, b), O(C, Ye, y), O(C, jt, c);
15117
+ const w = O(C, Gt), x = Je(To);
15118
15118
  G(w, t.numeric, x);
15119
15119
  const E = Je(To), k = Je();
15120
15120
  G(E, e, E), G(E, n, k), G(k, e, E), G(k, n, k), O(C, ct, E), O(x, ct, E);
15121
- const S = O(l, Yt), M = O(a, Yt), N = O(M, ct), B = O(N, ct);
15121
+ const S = O(l, Gt), M = O(a, Gt), N = O(M, ct), B = O(N, ct);
15122
15122
  G(l, t.domain, s), O(l, at, b), O(l, Ye, y), G(a, t.domain, s), O(a, at, b), O(a, Ye, y), G(S, t.domain, E), O(S, ct, E), O(S, Nr, E), G(B, t.domain, E), G(B, e, E), O(B, ct, E);
15123
15123
  const U = [
15124
15124
  [Ar, Rr],
@@ -15329,7 +15329,7 @@ function u7(t) {
15329
15329
  }
15330
15330
  });
15331
15331
  }
15332
- function vn(t, e) {
15332
+ function mn(t, e) {
15333
15333
  const n = ["http", "https", "ftp", "ftps", "mailto", "tel", "callto", "sms", "cid", "xmpp"];
15334
15334
  return e && e.forEach((r) => {
15335
15335
  const o = typeof r == "string" ? r : r.scheme;
@@ -15375,7 +15375,7 @@ var d7 = lt.create({
15375
15375
  rel: "noopener noreferrer nofollow",
15376
15376
  class: null
15377
15377
  },
15378
- isAllowedUri: (t, e) => !!vn(t, e.protocols),
15378
+ isAllowedUri: (t, e) => !!mn(t, e.protocols),
15379
15379
  validate: (t) => !!t,
15380
15380
  shouldAutoLink: (t) => !!t
15381
15381
  };
@@ -15406,7 +15406,7 @@ var d7 = lt.create({
15406
15406
  getAttrs: (t) => {
15407
15407
  const e = t.getAttribute("href");
15408
15408
  return !e || !this.options.isAllowedUri(e, {
15409
- defaultValidate: (n) => !!vn(n, this.options.protocols),
15409
+ defaultValidate: (n) => !!mn(n, this.options.protocols),
15410
15410
  protocols: this.options.protocols,
15411
15411
  defaultProtocol: this.options.defaultProtocol
15412
15412
  }) ? !1 : null;
@@ -15416,7 +15416,7 @@ var d7 = lt.create({
15416
15416
  },
15417
15417
  renderHTML({ HTMLAttributes: t }) {
15418
15418
  return this.options.isAllowedUri(t.href, {
15419
- defaultValidate: (e) => !!vn(e, this.options.protocols),
15419
+ defaultValidate: (e) => !!mn(e, this.options.protocols),
15420
15420
  protocols: this.options.protocols,
15421
15421
  defaultProtocol: this.options.defaultProtocol
15422
15422
  }) ? ["a", re(this.options.HTMLAttributes, t), 0] : ["a", re(this.options.HTMLAttributes, { ...t, href: "" }), 0];
@@ -15436,7 +15436,7 @@ var d7 = lt.create({
15436
15436
  setLink: (t) => ({ chain: e }) => {
15437
15437
  const { href: n } = t;
15438
15438
  return this.options.isAllowedUri(n, {
15439
- defaultValidate: (r) => !!vn(r, this.options.protocols),
15439
+ defaultValidate: (r) => !!mn(r, this.options.protocols),
15440
15440
  protocols: this.options.protocols,
15441
15441
  defaultProtocol: this.options.defaultProtocol
15442
15442
  }) ? e().setMark(this.name, t).setMeta("preventAutolink", !0).run() : !1;
@@ -15444,7 +15444,7 @@ var d7 = lt.create({
15444
15444
  toggleLink: (t) => ({ chain: e }) => {
15445
15445
  const { href: n } = t || {};
15446
15446
  return n && !this.options.isAllowedUri(n, {
15447
- defaultValidate: (r) => !!vn(r, this.options.protocols),
15447
+ defaultValidate: (r) => !!mn(r, this.options.protocols),
15448
15448
  protocols: this.options.protocols,
15449
15449
  defaultProtocol: this.options.defaultProtocol
15450
15450
  }) ? !1 : e().toggleMark(this.name, t, { extendEmptyMarkRange: !0 }).setMeta("preventAutolink", !0).run();
@@ -15454,13 +15454,13 @@ var d7 = lt.create({
15454
15454
  },
15455
15455
  addPasteRules() {
15456
15456
  return [
15457
- dn({
15457
+ an({
15458
15458
  find: (t) => {
15459
15459
  const e = [];
15460
15460
  if (t) {
15461
15461
  const { protocols: n, defaultProtocol: r } = this.options, o = Kp(t).filter(
15462
15462
  (i) => i.isLink && this.options.isAllowedUri(i.value, {
15463
- defaultValidate: (s) => !!vn(s, n),
15463
+ defaultValidate: (s) => !!mn(s, n),
15464
15464
  protocols: n,
15465
15465
  defaultProtocol: r
15466
15466
  })
@@ -15494,7 +15494,7 @@ var d7 = lt.create({
15494
15494
  type: this.type,
15495
15495
  defaultProtocol: this.options.defaultProtocol,
15496
15496
  validate: (r) => this.options.isAllowedUri(r, {
15497
- defaultValidate: (o) => !!vn(o, e),
15497
+ defaultValidate: (o) => !!mn(o, e),
15498
15498
  protocols: e,
15499
15499
  defaultProtocol: n
15500
15500
  }),
@@ -15684,7 +15684,7 @@ var ro = (t, e) => {
15684
15684
  return !0;
15685
15685
  if (t.state.selection.from !== t.state.selection.to)
15686
15686
  return !1;
15687
- if (!un(t.state, e) && Jp(t.state, e, n)) {
15687
+ if (!ln(t.state, e) && Jp(t.state, e, n)) {
15688
15688
  const { $anchor: l } = t.state.selection, a = t.state.doc.resolve(l.before() - 1), c = [];
15689
15689
  a.node().descendants((f, h) => {
15690
15690
  f.type.name === e && c.push({ node: f, pos: h });
@@ -15695,7 +15695,7 @@ var ro = (t, e) => {
15695
15695
  const d = t.state.doc.resolve(a.start() + u.pos + 1);
15696
15696
  return t.chain().cut({ from: l.start() - 1, to: l.end() + 1 }, d.end()).joinForward().run();
15697
15697
  }
15698
- if (!un(t.state, e) || !Yb(t.state))
15698
+ if (!ln(t.state, e) || !Yb(t.state))
15699
15699
  return !1;
15700
15700
  const r = ro(e, t.state);
15701
15701
  if (!r)
@@ -15709,7 +15709,7 @@ var ro = (t, e) => {
15709
15709
  const n = uc(t, e), r = ro(t, e);
15710
15710
  return !r || !n ? !1 : n < r.depth;
15711
15711
  }, ra = (t, e) => {
15712
- if (!un(t.state, e) || !Zb(t.state, e))
15712
+ if (!ln(t.state, e) || !Zb(t.state, e))
15713
15713
  return !1;
15714
15714
  const { selection: n } = t.state, { $from: r, $to: o } = n;
15715
15715
  return !n.empty && r.sameParent(o) ? !1 : Xp(e, t.state) ? t.chain().focus(t.state.selection.from + 4).lift(e).joinBackward().run() : Qp(e, t.state) ? t.chain().joinForward().joinBackward().run() : t.commands.joinItemForward();
@@ -16296,7 +16296,7 @@ var x7 = _e.create({
16296
16296
  },
16297
16297
  addInputRules() {
16298
16298
  return [
16299
- Dn({
16299
+ Ln({
16300
16300
  find: S7,
16301
16301
  type: this.type
16302
16302
  })
@@ -16304,7 +16304,7 @@ var x7 = _e.create({
16304
16304
  },
16305
16305
  addPasteRules() {
16306
16306
  return [
16307
- dn({
16307
+ an({
16308
16308
  find: k7,
16309
16309
  type: this.type
16310
16310
  })
@@ -16886,26 +16886,26 @@ let Vt = class lm {
16886
16886
  }
16887
16887
  }
16888
16888
  };
16889
- class qt {
16889
+ class Kt {
16890
16890
  constructor(e, n, r, o, i) {
16891
16891
  this.done = e, this.undone = n, this.prevRanges = r, this.prevTime = o, this.prevComposition = i;
16892
16892
  }
16893
16893
  }
16894
16894
  const F7 = 20;
16895
16895
  function V7(t, e, n, r) {
16896
- let o = n.getMeta(An), i;
16896
+ let o = n.getMeta(Tn), i;
16897
16897
  if (o)
16898
16898
  return o.historyState;
16899
- n.getMeta(W7) && (t = new qt(t.done, t.undone, null, 0, -1));
16899
+ n.getMeta(W7) && (t = new Kt(t.done, t.undone, null, 0, -1));
16900
16900
  let s = n.getMeta("appendedTransaction");
16901
16901
  if (n.steps.length == 0)
16902
16902
  return t;
16903
- if (s && s.getMeta(An))
16904
- return s.getMeta(An).redo ? new qt(t.done.addTransform(n, void 0, r, zo(e)), t.undone, Id(n.mapping.maps), t.prevTime, t.prevComposition) : new qt(t.done, t.undone.addTransform(n, void 0, r, zo(e)), null, t.prevTime, t.prevComposition);
16903
+ if (s && s.getMeta(Tn))
16904
+ return s.getMeta(Tn).redo ? new Kt(t.done.addTransform(n, void 0, r, zo(e)), t.undone, Id(n.mapping.maps), t.prevTime, t.prevComposition) : new Kt(t.done, t.undone.addTransform(n, void 0, r, zo(e)), null, t.prevTime, t.prevComposition);
16905
16905
  if (n.getMeta("addToHistory") !== !1 && !(s && s.getMeta("addToHistory") === !1)) {
16906
16906
  let l = n.getMeta("composition"), a = t.prevTime == 0 || !s && t.prevComposition != l && (t.prevTime < (n.time || 0) - r.newGroupDelay || !z7(n, t.prevRanges)), c = s ? ol(t.prevRanges, n.mapping) : Id(n.mapping.maps);
16907
- return new qt(t.done.addTransform(n, a ? e.selection.getBookmark() : void 0, r, zo(e)), ot.empty, c, n.time, l ?? t.prevComposition);
16908
- } else return (i = n.getMeta("rebased")) ? new qt(t.done.rebased(n, i), t.undone.rebased(n, i), ol(t.prevRanges, n.mapping), t.prevTime, t.prevComposition) : new qt(t.done.addMaps(n.mapping.maps), t.undone.addMaps(n.mapping.maps), ol(t.prevRanges, n.mapping), t.prevTime, t.prevComposition);
16907
+ return new Kt(t.done.addTransform(n, a ? e.selection.getBookmark() : void 0, r, zo(e)), ot.empty, c, n.time, l ?? t.prevComposition);
16908
+ } else return (i = n.getMeta("rebased")) ? new Kt(t.done.rebased(n, i), t.undone.rebased(n, i), ol(t.prevRanges, n.mapping), t.prevTime, t.prevComposition) : new Kt(t.done.addMaps(n.mapping.maps), t.undone.addMaps(n.mapping.maps), ol(t.prevRanges, n.mapping), t.prevTime, t.prevComposition);
16909
16909
  }
16910
16910
  function z7(t, e) {
16911
16911
  if (!e)
@@ -16935,11 +16935,11 @@ function ol(t, e) {
16935
16935
  return n;
16936
16936
  }
16937
16937
  function U7(t, e, n) {
16938
- let r = zo(e), o = An.get(e).spec.config, i = (n ? t.undone : t.done).popEvent(e, r);
16938
+ let r = zo(e), o = Tn.get(e).spec.config, i = (n ? t.undone : t.done).popEvent(e, r);
16939
16939
  if (!i)
16940
16940
  return null;
16941
- let s = i.selection.resolve(i.transform.doc), l = (n ? t.done : t.undone).addTransform(i.transform, e.selection.getBookmark(), o, r), a = new qt(n ? l : i.remaining, n ? i.remaining : l, null, 0, -1);
16942
- return i.transform.setSelection(s).setMeta(An, { redo: n, historyState: a });
16941
+ let s = i.selection.resolve(i.transform.doc), l = (n ? t.done : t.undone).addTransform(i.transform, e.selection.getBookmark(), o, r), a = new Kt(n ? l : i.remaining, n ? i.remaining : l, null, 0, -1);
16942
+ return i.transform.setSelection(s).setMeta(Tn, { redo: n, historyState: a });
16943
16943
  }
16944
16944
  let il = !1, Ld = null;
16945
16945
  function zo(t) {
@@ -16954,16 +16954,16 @@ function zo(t) {
16954
16954
  }
16955
16955
  return il;
16956
16956
  }
16957
- const An = new ve("history"), W7 = new ve("closeHistory");
16957
+ const Tn = new ve("history"), W7 = new ve("closeHistory");
16958
16958
  function j7(t = {}) {
16959
16959
  return t = {
16960
16960
  depth: t.depth || 100,
16961
16961
  newGroupDelay: t.newGroupDelay || 500
16962
16962
  }, new ce({
16963
- key: An,
16963
+ key: Tn,
16964
16964
  state: {
16965
16965
  init() {
16966
- return new qt(ot.empty, ot.empty, null, 0, -1);
16966
+ return new Kt(ot.empty, ot.empty, null, 0, -1);
16967
16967
  },
16968
16968
  apply(e, n, r) {
16969
16969
  return V7(n, r, e, t);
@@ -16982,7 +16982,7 @@ function j7(t = {}) {
16982
16982
  }
16983
16983
  function am(t, e) {
16984
16984
  return (n, r) => {
16985
- let o = An.getState(n);
16985
+ let o = Tn.getState(n);
16986
16986
  if (!o || (t ? o.undone : o.done).eventCount == 0)
16987
16987
  return !1;
16988
16988
  if (r) {
@@ -17479,7 +17479,7 @@ var J7 = Q.create({
17479
17479
  },
17480
17480
  addInputRules() {
17481
17481
  return [
17482
- Dn({
17482
+ Ln({
17483
17483
  find: x4,
17484
17484
  type: this.type
17485
17485
  })
@@ -17487,7 +17487,7 @@ var J7 = Q.create({
17487
17487
  },
17488
17488
  addPasteRules() {
17489
17489
  return [
17490
- dn({
17490
+ an({
17491
17491
  find: S4,
17492
17492
  type: this.type
17493
17493
  })
@@ -18091,20 +18091,20 @@ function pm(t) {
18091
18091
  const e = Lt(t);
18092
18092
  return It(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : Ke(e) && oo(e) ? e : pm(e);
18093
18093
  }
18094
- function ln(t, e, n) {
18094
+ function rn(t, e, n) {
18095
18095
  var r;
18096
18096
  e === void 0 && (e = []), n === void 0 && (n = !0);
18097
18097
  const o = pm(t), i = o === ((r = t.ownerDocument) == null ? void 0 : r.body), s = Ve(o);
18098
18098
  if (i) {
18099
18099
  const l = ia(s);
18100
- return e.concat(s, s.visualViewport || [], oo(o) ? o : [], l && n ? ln(l) : []);
18100
+ return e.concat(s, s.visualViewport || [], oo(o) ? o : [], l && n ? rn(l) : []);
18101
18101
  }
18102
- return e.concat(o, ln(o, [], n));
18102
+ return e.concat(o, rn(o, [], n));
18103
18103
  }
18104
18104
  function ia(t) {
18105
18105
  return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
18106
18106
  }
18107
- const Y4 = ["top", "right", "bottom", "left"], fn = Math.min, Ue = Math.max, Pi = Math.round, Oo = Math.floor, pt = (t) => ({
18107
+ const Y4 = ["top", "right", "bottom", "left"], cn = Math.min, Ue = Math.max, Pi = Math.round, Oo = Math.floor, pt = (t) => ({
18108
18108
  x: t,
18109
18109
  y: t
18110
18110
  }), X4 = {
@@ -18117,7 +18117,7 @@ const Y4 = ["top", "right", "bottom", "left"], fn = Math.min, Ue = Math.max, Pi
18117
18117
  end: "start"
18118
18118
  };
18119
18119
  function sa(t, e, n) {
18120
- return Ue(t, fn(e, n));
18120
+ return Ue(t, cn(e, n));
18121
18121
  }
18122
18122
  function Dt(t, e) {
18123
18123
  return typeof t == "function" ? t(e) : t;
@@ -18455,7 +18455,7 @@ function cr(t, e) {
18455
18455
  }
18456
18456
  return !1;
18457
18457
  }
18458
- function Xn(t) {
18458
+ function Yn(t) {
18459
18459
  return "composedPath" in t ? t.composedPath()[0] : t.target;
18460
18460
  }
18461
18461
  function ll(t, e) {
@@ -18738,7 +18738,7 @@ const U5 = (t) => ({
18738
18738
  }, h = gc(o), p = mc(h), m = await s.getDimensions(c), y = h === "y", b = y ? "top" : "left", C = y ? "bottom" : "right", w = y ? "clientHeight" : "clientWidth", x = i.reference[p] + i.reference[h] - f[h] - i.floating[p], E = f[h] - i.reference[h], k = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c));
18739
18739
  let S = k ? k[w] : 0;
18740
18740
  (!S || !await (s.isElement == null ? void 0 : s.isElement(k))) && (S = l.floating[w] || i.floating[p]);
18741
- const M = x / 2 - E / 2, N = S / 2 - m[p] / 2 - 1, B = fn(d[b], N), U = fn(d[C], N), W = B, $ = S - m[p] - U, I = S / 2 - m[p] / 2 + M, H = sa(W, I, $), F = !a.arrow && hr(o) != null && I !== H && i.reference[p] / 2 - (I < W ? B : U) - m[p] / 2 < 0, L = F ? I < W ? I - W : I - $ : 0;
18741
+ const M = x / 2 - E / 2, N = S / 2 - m[p] / 2 - 1, B = cn(d[b], N), U = cn(d[C], N), W = B, $ = S - m[p] - U, I = S / 2 - m[p] / 2 + M, H = sa(W, I, $), F = !a.arrow && hr(o) != null && I !== H && i.reference[p] / 2 - (I < W ? B : U) - m[p] / 2 < 0, L = F ? I < W ? I - W : I - $ : 0;
18742
18742
  return {
18743
18743
  [h]: f[h] + L,
18744
18744
  data: {
@@ -19054,7 +19054,7 @@ const q5 = function(t) {
19054
19054
  } = i.floating;
19055
19055
  let y, b;
19056
19056
  d === "top" || d === "bottom" ? (y = d, b = f === (await (s.isRTL == null ? void 0 : s.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (b = d, y = f === "end" ? "top" : "bottom");
19057
- const C = m - u.top - u.bottom, w = p - u.left - u.right, x = fn(m - u[y], C), E = fn(p - u[b], w), k = !e.middlewareData.shift;
19057
+ const C = m - u.top - u.bottom, w = p - u.left - u.right, x = cn(m - u[y], C), E = cn(p - u[b], w), k = !e.middlewareData.shift;
19058
19058
  let S = x, M = E;
19059
19059
  if ((n = e.middlewareData.shift) != null && n.enabled.x && (M = w), (r = e.middlewareData.shift) != null && r.enabled.y && (S = C), k && !f) {
19060
19060
  const B = Ue(u.left, 0), U = Ue(u.right, 0), W = Ue(u.top, 0), $ = Ue(u.bottom, 0);
@@ -19113,7 +19113,7 @@ function Tm(t) {
19113
19113
  function X5(t, e, n) {
19114
19114
  return e === void 0 && (e = !1), !n || e && n !== Ve(t) ? !1 : e;
19115
19115
  }
19116
- function Pn(t, e, n, r) {
19116
+ function Dn(t, e, n, r) {
19117
19117
  e === void 0 && (e = !1), n === void 0 && (n = !1);
19118
19118
  const o = t.getBoundingClientRect(), i = yc(t);
19119
19119
  let s = pt(1);
@@ -19137,7 +19137,7 @@ function Pn(t, e, n, r) {
19137
19137
  }
19138
19138
  function fs(t, e) {
19139
19139
  const n = ds(t).scrollLeft;
19140
- return e ? e.left + n : Pn(yt(t)).left + n;
19140
+ return e ? e.left + n : Dn(yt(t)).left + n;
19141
19141
  }
19142
19142
  function Am(t, e) {
19143
19143
  const n = t.getBoundingClientRect(), r = n.left + e.scrollLeft - fs(t, n), o = n.top + e.scrollTop;
@@ -19162,7 +19162,7 @@ function Q5(t) {
19162
19162
  }, c = pt(1);
19163
19163
  const u = pt(0), d = Ke(r);
19164
19164
  if ((d || !d && !i) && ((fr(r) !== "body" || oo(s)) && (a = ds(r)), Ke(r))) {
19165
- const h = Pn(r);
19165
+ const h = Dn(r);
19166
19166
  c = nr(r), u.x = h.x + r.clientLeft, u.y = h.y + r.clientTop;
19167
19167
  }
19168
19168
  const f = s && !d && !i ? Am(s, a) : pt(0);
@@ -19210,7 +19210,7 @@ function n3(t, e) {
19210
19210
  }
19211
19211
  const r3 = /* @__PURE__ */ new Set(["absolute", "fixed"]);
19212
19212
  function o3(t, e) {
19213
- const n = Pn(t, !0, e === "fixed"), r = n.top + t.clientTop, o = n.left + t.clientLeft, i = Ke(t) ? nr(t) : pt(1), s = t.clientWidth * i.x, l = t.clientHeight * i.y, a = o * i.x, c = r * i.y;
19213
+ const n = Dn(t, !0, e === "fixed"), r = n.top + t.clientTop, o = n.left + t.clientLeft, i = Ke(t) ? nr(t) : pt(1), s = t.clientWidth * i.x, l = t.clientHeight * i.y, a = o * i.x, c = r * i.y;
19214
19214
  return {
19215
19215
  width: s,
19216
19216
  height: l,
@@ -19245,7 +19245,7 @@ function i3(t, e) {
19245
19245
  const n = e.get(t);
19246
19246
  if (n)
19247
19247
  return n;
19248
- let r = ln(t, [], !1).filter((l) => oe(l) && fr(l) !== "body"), o = null;
19248
+ let r = rn(t, [], !1).filter((l) => oe(l) && fr(l) !== "body"), o = null;
19249
19249
  const i = rt(t).position === "fixed";
19250
19250
  let s = i ? Lt(t) : t;
19251
19251
  for (; oe(s) && !It(s); ) {
@@ -19263,7 +19263,7 @@ function s3(t) {
19263
19263
  } = t;
19264
19264
  const s = [...n === "clippingAncestors" ? cs(e) ? [] : i3(e, this._c) : [].concat(n), r], l = s[0], a = s.reduce((c, u) => {
19265
19265
  const d = Kd(e, u, o);
19266
- return c.top = Ue(d.top, c.top), c.right = fn(d.right, c.right), c.bottom = fn(d.bottom, c.bottom), c.left = Ue(d.left, c.left), c;
19266
+ return c.top = Ue(d.top, c.top), c.right = cn(d.right, c.right), c.bottom = cn(d.bottom, c.bottom), c.left = Ue(d.left, c.left), c;
19267
19267
  }, Kd(e, l, o));
19268
19268
  return {
19269
19269
  width: a.right - a.left,
@@ -19283,7 +19283,7 @@ function l3(t) {
19283
19283
  };
19284
19284
  }
19285
19285
  function a3(t, e, n) {
19286
- const r = Ke(e), o = yt(e), i = n === "fixed", s = Pn(t, !0, i, e);
19286
+ const r = Ke(e), o = yt(e), i = n === "fixed", s = Dn(t, !0, i, e);
19287
19287
  let l = {
19288
19288
  scrollLeft: 0,
19289
19289
  scrollTop: 0
@@ -19294,7 +19294,7 @@ function a3(t, e, n) {
19294
19294
  }
19295
19295
  if (r || !r && !i)
19296
19296
  if ((fr(e) !== "body" || oo(o)) && (l = ds(e)), r) {
19297
- const h = Pn(e, !0, i, e);
19297
+ const h = Dn(e, !0, i, e);
19298
19298
  a.x = h.x + e.clientLeft, a.y = h.y + e.clientTop;
19299
19299
  } else o && c();
19300
19300
  i && !r && o && c();
@@ -19384,7 +19384,7 @@ function f3(t, e) {
19384
19384
  return;
19385
19385
  const p = Oo(d), m = Oo(o.clientWidth - (u + f)), y = Oo(o.clientHeight - (d + h)), b = Oo(u), w = {
19386
19386
  rootMargin: -p + "px " + -m + "px " + -y + "px " + -b + "px",
19387
- threshold: Ue(0, fn(1, a)) || 1
19387
+ threshold: Ue(0, cn(1, a)) || 1
19388
19388
  };
19389
19389
  let x = !0;
19390
19390
  function E(k) {
@@ -19419,7 +19419,7 @@ function Im(t, e, n, r) {
19419
19419
  elementResize: s = typeof ResizeObserver == "function",
19420
19420
  layoutShift: l = typeof IntersectionObserver == "function",
19421
19421
  animationFrame: a = !1
19422
- } = r, c = yc(t), u = o || i ? [...c ? ln(c) : [], ...ln(e)] : [];
19422
+ } = r, c = yc(t), u = o || i ? [...c ? rn(c) : [], ...rn(e)] : [];
19423
19423
  u.forEach((b) => {
19424
19424
  o && b.addEventListener("scroll", n, {
19425
19425
  passive: !0
@@ -19434,10 +19434,10 @@ function Im(t, e, n, r) {
19434
19434
  (w = h) == null || w.observe(e);
19435
19435
  })), n();
19436
19436
  }), c && !a && h.observe(c), h.observe(e));
19437
- let p, m = a ? Pn(t) : null;
19437
+ let p, m = a ? Dn(t) : null;
19438
19438
  a && y();
19439
19439
  function y() {
19440
- const b = Pn(t);
19440
+ const b = Dn(t);
19441
19441
  m && !Nm(m, b) && n(), m = b, p = requestAnimationFrame(y);
19442
19442
  }
19443
19443
  return n(), () => {
@@ -20126,9 +20126,9 @@ function W3(t, e) {
20126
20126
  var H;
20127
20127
  const F = () => {
20128
20128
  var L;
20129
- M(I), (L = Xn(I)) == null || L.removeEventListener("keydown", F);
20129
+ M(I), (L = Yn(I)) == null || L.removeEventListener("keydown", F);
20130
20130
  };
20131
- (H = Xn(I)) == null || H.addEventListener("keydown", F);
20131
+ (H = Yn(I)) == null || H.addEventListener("keydown", F);
20132
20132
  }), B = ut((I) => {
20133
20133
  var H;
20134
20134
  const F = i.current.insideReactTree;
@@ -20136,7 +20136,7 @@ function W3(t, e) {
20136
20136
  const L = C.current;
20137
20137
  if (C.current = !1, c === "click" && L || F || typeof b == "function" && !b(I))
20138
20138
  return;
20139
- const T = Xn(I), R = "[" + io("inert") + "]", j = ht(o.floating).querySelectorAll(R);
20139
+ const T = Yn(I), R = "[" + io("inert") + "]", j = ht(o.floating).querySelectorAll(R);
20140
20140
  let ee = oe(T) ? T : null;
20141
20141
  for (; ee && !It(ee); ) {
20142
20142
  const le = Lt(ee);
@@ -20150,8 +20150,8 @@ function W3(t, e) {
20150
20150
  Array.from(j).every((le) => !cr(ee, le)))
20151
20151
  return;
20152
20152
  if (Ke(T) && $) {
20153
- const le = It(T), ye = rt(T), Y = /auto|scroll/, te = le || Y.test(ye.overflowX), Ge = le || Y.test(ye.overflowY), wt = te && T.clientWidth > 0 && T.scrollWidth > T.clientWidth, Vn = Ge && T.clientHeight > 0 && T.scrollHeight > T.clientHeight, Ms = ye.direction === "rtl", zn = Vn && (Ms ? I.offsetX <= T.offsetWidth - T.clientWidth : I.offsetX > T.clientWidth), P0 = wt && I.offsetY > T.clientHeight;
20154
- if (zn || P0)
20153
+ const le = It(T), ye = rt(T), Y = /auto|scroll/, te = le || Y.test(ye.overflowX), Ge = le || Y.test(ye.overflowY), wt = te && T.clientWidth > 0 && T.scrollWidth > T.clientWidth, Fn = Ge && T.clientHeight > 0 && T.scrollHeight > T.clientHeight, Ms = ye.direction === "rtl", Vn = Fn && (Ms ? I.offsetX <= T.offsetWidth - T.clientWidth : I.offsetX > T.clientWidth), P0 = wt && I.offsetY > T.clientHeight;
20154
+ if (Vn || P0)
20155
20155
  return;
20156
20156
  }
20157
20157
  const K = (H = i.current.floatingContext) == null ? void 0 : H.nodeId, Z = m && Uo(m.nodesRef.current, K).some((le) => {
@@ -20177,9 +20177,9 @@ function W3(t, e) {
20177
20177
  var H;
20178
20178
  const F = () => {
20179
20179
  var L;
20180
- B(I), (L = Xn(I)) == null || L.removeEventListener(c, F);
20180
+ B(I), (L = Yn(I)) == null || L.removeEventListener(c, F);
20181
20181
  };
20182
- (H = Xn(I)) == null || H.addEventListener(c, F);
20182
+ (H = Yn(I)) == null || H.addEventListener(c, F);
20183
20183
  });
20184
20184
  g.useEffect(() => {
20185
20185
  if (!n || !s)
@@ -20205,7 +20205,7 @@ function W3(t, e) {
20205
20205
  const T = ht(o.floating);
20206
20206
  l && (T.addEventListener("keydown", E ? N : M, E), T.addEventListener("compositionstart", F), T.addEventListener("compositionend", L)), b && T.addEventListener(c, k ? U : B, k);
20207
20207
  let R = [];
20208
- return f && (oe(o.domReference) && (R = ln(o.domReference)), oe(o.floating) && (R = R.concat(ln(o.floating))), !oe(o.reference) && o.reference && o.reference.contextElement && (R = R.concat(ln(o.reference.contextElement)))), R = R.filter((j) => {
20208
+ return f && (oe(o.domReference) && (R = rn(o.domReference)), oe(o.floating) && (R = R.concat(rn(o.floating))), !oe(o.reference) && o.reference && o.reference.contextElement && (R = R.concat(rn(o.reference.contextElement)))), R = R.filter((j) => {
20209
20209
  var ee;
20210
20210
  return j !== ((ee = T.defaultView) == null ? void 0 : ee.visualViewport);
20211
20211
  }), R.forEach((j) => {
@@ -20394,7 +20394,7 @@ function q3(t, e) {
20394
20394
  },
20395
20395
  onFocus(h) {
20396
20396
  if (c.current) return;
20397
- const p = Xn(h.nativeEvent);
20397
+ const p = Yn(h.nativeEvent);
20398
20398
  if (a && oe(p)) {
20399
20399
  if (hl() && !h.relatedTarget) {
20400
20400
  if (!d.current && !O5(p))
@@ -20727,7 +20727,7 @@ function nx(t, e) {
20727
20727
  return console.error(`Error getting node at position ${e}:`, n), null;
20728
20728
  }
20729
20729
  }
20730
- function gn(t) {
20730
+ function hn(t) {
20731
20731
  const { editor: e, node: n, nodePos: r } = t;
20732
20732
  if (!e || !e.state?.doc) return null;
20733
20733
  const o = n != null, i = bt(r);
@@ -20849,7 +20849,7 @@ const sx = ({
20849
20849
  }
20850
20850
  );
20851
20851
  he.displayName = "Button";
20852
- const Bn = g.forwardRef(({ className: t, children: e, orientation: n = "vertical", ...r }, o) => /* @__PURE__ */ v(
20852
+ const Pn = g.forwardRef(({ className: t, children: e, orientation: n = "vertical", ...r }, o) => /* @__PURE__ */ v(
20853
20853
  "div",
20854
20854
  {
20855
20855
  ref: o,
@@ -20860,7 +20860,7 @@ const Bn = g.forwardRef(({ className: t, children: e, orientation: n = "vertical
20860
20860
  children: e
20861
20861
  }
20862
20862
  ));
20863
- Bn.displayName = "ButtonGroup";
20863
+ Pn.displayName = "ButtonGroup";
20864
20864
  function lf({
20865
20865
  orientation: t = "horizontal",
20866
20866
  size: e,
@@ -21022,7 +21022,7 @@ const af = (t, e) => {
21022
21022
  }
21023
21023
  );
21024
21024
  Km.displayName = "Toolbar";
21025
- const Gt = g.forwardRef(
21025
+ const yn = g.forwardRef(
21026
21026
  ({ children: t, className: e, ...n }, r) => /* @__PURE__ */ v(
21027
21027
  "div",
21028
21028
  {
@@ -21034,11 +21034,11 @@ const Gt = g.forwardRef(
21034
21034
  }
21035
21035
  )
21036
21036
  );
21037
- Gt.displayName = "ToolbarGroup";
21038
- const Jt = g.forwardRef(
21037
+ yn.displayName = "ToolbarGroup";
21038
+ const vn = g.forwardRef(
21039
21039
  ({ ...t }, e) => /* @__PURE__ */ v(ps, { ref: e, orientation: "vertical", decorative: !0, ...t })
21040
21040
  );
21041
- Jt.displayName = "ToolbarSeparator";
21041
+ vn.displayName = "ToolbarSeparator";
21042
21042
  const qm = g.memo(
21043
21043
  ({ className: t, ...e }) => /* @__PURE__ */ v(
21044
21044
  "svg",
@@ -21466,7 +21466,7 @@ const Gm = () => /* @__PURE__ */ P(
21466
21466
  width: t.attrs.width || 300,
21467
21467
  height: t.attrs.height || "auto"
21468
21468
  }), l = Rt(null), a = Rt(null), c = Rt(t.attrs.width || 300), u = t.attrs.imageId || `img-${Date.now()}`;
21469
- Rn(() => {
21469
+ An(() => {
21470
21470
  s({
21471
21471
  width: t.attrs.width || 300,
21472
21472
  height: t.attrs.height || "auto"
@@ -22054,7 +22054,7 @@ function Jr(t, e, n = !0) {
22054
22054
  try {
22055
22055
  const o = t.view.state, i = o.selection;
22056
22056
  if (i.empty || i instanceof z) {
22057
- const s = gn({
22057
+ const s = hn({
22058
22058
  editor: t,
22059
22059
  node: o.selection.$anchor.node(1)
22060
22060
  })?.pos;
@@ -22076,7 +22076,7 @@ function wx(t, e) {
22076
22076
  const o = t.view;
22077
22077
  let i = o.state, s = i.tr;
22078
22078
  if (i.selection.empty || i.selection instanceof z) {
22079
- const d = gn({
22079
+ const d = hn({
22080
22080
  editor: t,
22081
22081
  node: i.selection.$anchor.node(1)
22082
22082
  })?.pos;
@@ -22209,8 +22209,8 @@ function Sx(...t) {
22209
22209
  };
22210
22210
  return n.scopeName = e.scopeName, n;
22211
22211
  }
22212
- var hn = globalThis?.document ? g.useLayoutEffect : () => {
22213
- }, kx = g[" useInsertionEffect ".trim().toString()] || hn;
22212
+ var un = globalThis?.document ? g.useLayoutEffect : () => {
22213
+ }, kx = g[" useInsertionEffect ".trim().toString()] || un;
22214
22214
  function Sc({
22215
22215
  prop: t,
22216
22216
  defaultProp: e,
@@ -22649,7 +22649,7 @@ var Jx = g[" useId ".trim().toString()] || (() => {
22649
22649
  }), Zx = 0;
22650
22650
  function Fi(t) {
22651
22651
  const [e, n] = g.useState(Jx());
22652
- return hn(() => {
22652
+ return un(() => {
22653
22653
  n((r) => r ?? String(Zx++));
22654
22654
  }, [t]), t || (e ? `radix-${e}` : "");
22655
22655
  }
@@ -22672,7 +22672,7 @@ f1.displayName = Yx;
22672
22672
  var Xx = f1;
22673
22673
  function Qx(t) {
22674
22674
  const [e, n] = g.useState(void 0);
22675
- return hn(() => {
22675
+ return un(() => {
22676
22676
  if (t) {
22677
22677
  n({ width: t.offsetWidth, height: t.offsetHeight });
22678
22678
  const r = new ResizeObserver((o) => {
@@ -22751,8 +22751,8 @@ var Tc = "PopperContent", [tS, nS] = h1(Tc), v1 = g.forwardRef(
22751
22751
  k3({
22752
22752
  ...$,
22753
22753
  apply: ({ elements: Y, rects: te, availableWidth: Ge, availableHeight: wt }) => {
22754
- const { width: Vn, height: Ms } = te.reference, zn = Y.floating.style;
22755
- zn.setProperty("--radix-popper-available-width", `${Ge}px`), zn.setProperty("--radix-popper-available-height", `${wt}px`), zn.setProperty("--radix-popper-anchor-width", `${Vn}px`), zn.setProperty("--radix-popper-anchor-height", `${Ms}px`);
22754
+ const { width: Fn, height: Ms } = te.reference, Vn = Y.floating.style;
22755
+ Vn.setProperty("--radix-popper-available-width", `${Ge}px`), Vn.setProperty("--radix-popper-available-height", `${wt}px`), Vn.setProperty("--radix-popper-anchor-width", `${Fn}px`), Vn.setProperty("--radix-popper-anchor-height", `${Ms}px`);
22756
22756
  }
22757
22757
  }),
22758
22758
  x && M3({ element: x, padding: l }),
@@ -22760,11 +22760,11 @@ var Tc = "PopperContent", [tS, nS] = h1(Tc), v1 = g.forwardRef(
22760
22760
  f && E3({ strategy: "referenceHidden", ...$ })
22761
22761
  ]
22762
22762
  }), [R, j] = w1(F), ee = Bt(p);
22763
- hn(() => {
22763
+ un(() => {
22764
22764
  L && ee?.();
22765
22765
  }, [L, ee]);
22766
22766
  const K = T.arrow?.x, Z = T.arrow?.y, qe = T.arrow?.centerOffset !== 0, [le, ye] = g.useState();
22767
- return hn(() => {
22767
+ return un(() => {
22768
22768
  b && ye(window.getComputedStyle(b).zIndex);
22769
22769
  }, [b]), /* @__PURE__ */ v(
22770
22770
  "div",
@@ -22890,7 +22890,7 @@ function w1(t) {
22890
22890
  }
22891
22891
  var x1 = m1, Ac = y1, S1 = v1, k1 = C1, sS = "Portal", Rc = g.forwardRef((t, e) => {
22892
22892
  const { container: n, ...r } = t, [o, i] = g.useState(!1);
22893
- hn(() => i(!0), []);
22893
+ un(() => i(!0), []);
22894
22894
  const s = n || o && globalThis?.document?.body;
22895
22895
  return s ? Mf.createPortal(/* @__PURE__ */ v(Ae.div, { ...r, ref: e }), s) : null;
22896
22896
  });
@@ -22898,11 +22898,11 @@ Rc.displayName = sS;
22898
22898
  function lS(t, e) {
22899
22899
  return g.useReducer((n, r) => e[n][r] ?? n, t);
22900
22900
  }
22901
- var Hn = (t) => {
22901
+ var _n = (t) => {
22902
22902
  const { present: e, children: n } = t, r = aS(e), o = typeof n == "function" ? n({ present: r.isPresent }) : g.Children.only(n), i = Ne(r.ref, cS(o));
22903
22903
  return typeof n == "function" || r.isPresent ? g.cloneElement(o, { ref: i }) : null;
22904
22904
  };
22905
- Hn.displayName = "Presence";
22905
+ _n.displayName = "Presence";
22906
22906
  function aS(t) {
22907
22907
  const [e, n] = g.useState(), r = g.useRef(null), o = g.useRef(t), i = g.useRef("none"), s = t ? "mounted" : "unmounted", [l, a] = lS(s, {
22908
22908
  mounted: {
@@ -22920,13 +22920,13 @@ function aS(t) {
22920
22920
  return g.useEffect(() => {
22921
22921
  const c = Io(r.current);
22922
22922
  i.current = l === "mounted" ? c : "none";
22923
- }, [l]), hn(() => {
22923
+ }, [l]), un(() => {
22924
22924
  const c = r.current, u = o.current;
22925
22925
  if (u !== t) {
22926
22926
  const f = i.current, h = Io(c);
22927
22927
  t ? a("MOUNT") : h === "none" || c?.display === "none" ? a("UNMOUNT") : a(u && f !== h ? "ANIMATION_OUT" : "UNMOUNT"), o.current = t;
22928
22928
  }
22929
- }, [t, a]), hn(() => {
22929
+ }, [t, a]), un(() => {
22930
22930
  if (e) {
22931
22931
  let c;
22932
22932
  const u = e.ownerDocument.defaultView ?? window, d = (h) => {
@@ -23128,7 +23128,7 @@ var CS = T1, wS = R1, xS = function(t) {
23128
23128
  return null;
23129
23129
  var e = Array.isArray(t) ? t[0] : t;
23130
23130
  return e.ownerDocument.body;
23131
- }, jn = /* @__PURE__ */ new WeakMap(), Lo = /* @__PURE__ */ new WeakMap(), Do = {}, bl = 0, N1 = function(t) {
23131
+ }, Wn = /* @__PURE__ */ new WeakMap(), Lo = /* @__PURE__ */ new WeakMap(), Do = {}, bl = 0, N1 = function(t) {
23132
23132
  return t && (t.host || N1(t.parentNode));
23133
23133
  }, SS = function(t, e) {
23134
23134
  return e.map(function(n) {
@@ -23152,8 +23152,8 @@ var CS = T1, wS = R1, xS = function(t) {
23152
23152
  u(f);
23153
23153
  else
23154
23154
  try {
23155
- var h = f.getAttribute(r), p = h !== null && h !== "false", m = (jn.get(f) || 0) + 1, y = (i.get(f) || 0) + 1;
23156
- jn.set(f, m), i.set(f, y), s.push(f), m === 1 && p && Lo.set(f, !0), y === 1 && f.setAttribute(n, "true"), p || f.setAttribute(r, "true");
23155
+ var h = f.getAttribute(r), p = h !== null && h !== "false", m = (Wn.get(f) || 0) + 1, y = (i.get(f) || 0) + 1;
23156
+ Wn.set(f, m), i.set(f, y), s.push(f), m === 1 && p && Lo.set(f, !0), y === 1 && f.setAttribute(n, "true"), p || f.setAttribute(r, "true");
23157
23157
  } catch (b) {
23158
23158
  console.error("aria-hidden: cannot operate on ", f, b);
23159
23159
  }
@@ -23161,9 +23161,9 @@ var CS = T1, wS = R1, xS = function(t) {
23161
23161
  };
23162
23162
  return u(e), l.clear(), bl++, function() {
23163
23163
  s.forEach(function(d) {
23164
- var f = jn.get(d) - 1, h = i.get(d) - 1;
23165
- jn.set(d, f), i.set(d, h), f || (Lo.has(d) || d.removeAttribute(r), Lo.delete(d)), h || d.removeAttribute(n);
23166
- }), bl--, bl || (jn = /* @__PURE__ */ new WeakMap(), jn = /* @__PURE__ */ new WeakMap(), Lo = /* @__PURE__ */ new WeakMap(), Do = {});
23164
+ var f = Wn.get(d) - 1, h = i.get(d) - 1;
23165
+ Wn.set(d, f), i.set(d, h), f || (Lo.has(d) || d.removeAttribute(r), Lo.delete(d)), h || d.removeAttribute(n);
23166
+ }), bl--, bl || (Wn = /* @__PURE__ */ new WeakMap(), Wn = /* @__PURE__ */ new WeakMap(), Lo = /* @__PURE__ */ new WeakMap(), Do = {});
23167
23167
  };
23168
23168
  }, I1 = function(t, e, n) {
23169
23169
  n === void 0 && (n = "data-aria-hidden");
@@ -23474,7 +23474,7 @@ if (typeof window < "u")
23474
23474
  } catch {
23475
23475
  ga = !1;
23476
23476
  }
23477
- var Kn = ga ? { passive: !1 } : !1, GS = function(t) {
23477
+ var jn = ga ? { passive: !1 } : !1, GS = function(t) {
23478
23478
  return t.tagName === "TEXTAREA";
23479
23479
  }, _1 = function(t, e) {
23480
23480
  if (!(t instanceof Element))
@@ -23550,7 +23550,7 @@ var Kn = ga ? { passive: !1 } : !1, GS = function(t) {
23550
23550
  .block-interactivity-`.concat(t, ` {pointer-events: none;}
23551
23551
  .allow-interactivity-`).concat(t, ` {pointer-events: all;}
23552
23552
  `);
23553
- }, rk = 0, qn = [];
23553
+ }, rk = 0, Kn = [];
23554
23554
  function ok(t) {
23555
23555
  var e = g.useRef([]), n = g.useRef([0, 0]), r = g.useRef(), o = g.useState(rk++)[0], i = g.useState(B1)[0], s = g.useRef(t);
23556
23556
  g.useEffect(function() {
@@ -23585,7 +23585,7 @@ function ok(t) {
23585
23585
  return ek(N, y, m, N === "h" ? w : x);
23586
23586
  }, []), a = g.useCallback(function(m) {
23587
23587
  var y = m;
23588
- if (!(!qn.length || qn[qn.length - 1] !== i)) {
23588
+ if (!(!Kn.length || Kn[Kn.length - 1] !== i)) {
23589
23589
  var b = "deltaY" in y ? Cf(y) : Bo(y), C = e.current.filter(function(E) {
23590
23590
  return E.name === y.type && (E.target === y.target || y.target === E.shadowParent) && tk(E.delta, b);
23591
23591
  })[0];
@@ -23615,14 +23615,14 @@ function ok(t) {
23615
23615
  c(m.type, Bo(m), m.target, l(m, t.lockRef.current));
23616
23616
  }, []);
23617
23617
  g.useEffect(function() {
23618
- return qn.push(i), t.setCallbacks({
23618
+ return Kn.push(i), t.setCallbacks({
23619
23619
  onScrollCapture: d,
23620
23620
  onWheelCapture: d,
23621
23621
  onTouchMoveCapture: f
23622
- }), document.addEventListener("wheel", a, Kn), document.addEventListener("touchmove", a, Kn), document.addEventListener("touchstart", u, Kn), function() {
23623
- qn = qn.filter(function(m) {
23622
+ }), document.addEventListener("wheel", a, jn), document.addEventListener("touchmove", a, jn), document.addEventListener("touchstart", u, jn), function() {
23623
+ Kn = Kn.filter(function(m) {
23624
23624
  return m !== i;
23625
- }), document.removeEventListener("wheel", a, Kn), document.removeEventListener("touchmove", a, Kn), document.removeEventListener("touchstart", u, Kn);
23625
+ }), document.removeEventListener("wheel", a, jn), document.removeEventListener("touchmove", a, jn), document.removeEventListener("touchstart", u, jn);
23626
23626
  };
23627
23627
  }, []);
23628
23628
  var h = t.removeScrollBar, p = t.inert;
@@ -23649,11 +23649,11 @@ var ya = ["Enter", " "], lk = ["ArrowDown", "PageUp", "Home"], F1 = ["ArrowUp",
23649
23649
  }, uk = {
23650
23650
  ltr: ["ArrowLeft"],
23651
23651
  rtl: ["ArrowRight"]
23652
- }, ao = "Menu", [Yr, dk, fk] = s1(ao), [$n, V1] = pr(ao, [
23652
+ }, ao = "Menu", [Yr, dk, fk] = s1(ao), [Hn, V1] = pr(ao, [
23653
23653
  fk,
23654
23654
  gs,
23655
23655
  M1
23656
- ]), vs = gs(), z1 = M1(), [hk, Fn] = $n(ao), [pk, co] = $n(ao), U1 = (t) => {
23656
+ ]), vs = gs(), z1 = M1(), [hk, $n] = Hn(ao), [pk, co] = Hn(ao), U1 = (t) => {
23657
23657
  const { __scopeMenu: e, open: n = !1, children: r, dir: o, onOpenChange: i, modal: s = !0 } = t, l = vs(e), [a, c] = g.useState(null), u = g.useRef(!1), d = Bt(i), f = l1(o);
23658
23658
  return g.useEffect(() => {
23659
23659
  const h = () => {
@@ -23692,21 +23692,21 @@ var mk = "MenuAnchor", Nc = g.forwardRef(
23692
23692
  }
23693
23693
  );
23694
23694
  Nc.displayName = mk;
23695
- var Ic = "MenuPortal", [gk, W1] = $n(Ic, {
23695
+ var Ic = "MenuPortal", [gk, W1] = Hn(Ic, {
23696
23696
  forceMount: void 0
23697
23697
  }), j1 = (t) => {
23698
- const { __scopeMenu: e, forceMount: n, children: r, container: o } = t, i = Fn(Ic, e);
23699
- return /* @__PURE__ */ v(gk, { scope: e, forceMount: n, children: /* @__PURE__ */ v(Hn, { present: n || i.open, children: /* @__PURE__ */ v(Rc, { asChild: !0, container: o, children: r }) }) });
23698
+ const { __scopeMenu: e, forceMount: n, children: r, container: o } = t, i = $n(Ic, e);
23699
+ return /* @__PURE__ */ v(gk, { scope: e, forceMount: n, children: /* @__PURE__ */ v(_n, { present: n || i.open, children: /* @__PURE__ */ v(Rc, { asChild: !0, container: o, children: r }) }) });
23700
23700
  };
23701
23701
  j1.displayName = Ic;
23702
- var nt = "MenuContent", [yk, Lc] = $n(nt), K1 = g.forwardRef(
23702
+ var nt = "MenuContent", [yk, Lc] = Hn(nt), K1 = g.forwardRef(
23703
23703
  (t, e) => {
23704
- const n = W1(nt, t.__scopeMenu), { forceMount: r = n.forceMount, ...o } = t, i = Fn(nt, t.__scopeMenu), s = co(nt, t.__scopeMenu);
23705
- return /* @__PURE__ */ v(Yr.Provider, { scope: t.__scopeMenu, children: /* @__PURE__ */ v(Hn, { present: r || i.open, children: /* @__PURE__ */ v(Yr.Slot, { scope: t.__scopeMenu, children: s.modal ? /* @__PURE__ */ v(vk, { ...o, ref: e }) : /* @__PURE__ */ v(bk, { ...o, ref: e }) }) }) });
23704
+ const n = W1(nt, t.__scopeMenu), { forceMount: r = n.forceMount, ...o } = t, i = $n(nt, t.__scopeMenu), s = co(nt, t.__scopeMenu);
23705
+ return /* @__PURE__ */ v(Yr.Provider, { scope: t.__scopeMenu, children: /* @__PURE__ */ v(_n, { present: r || i.open, children: /* @__PURE__ */ v(Yr.Slot, { scope: t.__scopeMenu, children: s.modal ? /* @__PURE__ */ v(vk, { ...o, ref: e }) : /* @__PURE__ */ v(bk, { ...o, ref: e }) }) }) });
23706
23706
  }
23707
23707
  ), vk = g.forwardRef(
23708
23708
  (t, e) => {
23709
- const n = Fn(nt, t.__scopeMenu), r = g.useRef(null), o = Ne(e, r);
23709
+ const n = $n(nt, t.__scopeMenu), r = g.useRef(null), o = Ne(e, r);
23710
23710
  return g.useEffect(() => {
23711
23711
  const i = r.current;
23712
23712
  if (i) return I1(i);
@@ -23728,7 +23728,7 @@ var nt = "MenuContent", [yk, Lc] = $n(nt), K1 = g.forwardRef(
23728
23728
  );
23729
23729
  }
23730
23730
  ), bk = g.forwardRef((t, e) => {
23731
- const n = Fn(nt, t.__scopeMenu);
23731
+ const n = $n(nt, t.__scopeMenu);
23732
23732
  return /* @__PURE__ */ v(
23733
23733
  Dc,
23734
23734
  {
@@ -23757,7 +23757,7 @@ var nt = "MenuContent", [yk, Lc] = $n(nt), K1 = g.forwardRef(
23757
23757
  onDismiss: h,
23758
23758
  disableOutsideScroll: p,
23759
23759
  ...m
23760
- } = t, y = Fn(nt, n), b = co(nt, n), C = vs(n), w = z1(n), x = dk(n), [E, k] = g.useState(null), S = g.useRef(null), M = Ne(e, S, y.onContentChange), N = g.useRef(0), B = g.useRef(""), U = g.useRef(0), W = g.useRef(null), $ = g.useRef("right"), I = g.useRef(0), H = p ? Oc : g.Fragment, F = p ? { as: Ck, allowPinchZoom: !0 } : void 0, L = (R) => {
23760
+ } = t, y = $n(nt, n), b = co(nt, n), C = vs(n), w = z1(n), x = dk(n), [E, k] = g.useState(null), S = g.useRef(null), M = Ne(e, S, y.onContentChange), N = g.useRef(0), B = g.useRef(""), U = g.useRef(0), W = g.useRef(null), $ = g.useRef("right"), I = g.useRef(0), H = p ? Oc : g.Fragment, F = p ? { as: Ck, allowPinchZoom: !0 } : void 0, L = (R) => {
23761
23761
  const j = B.current + R, ee = x().filter((Y) => !Y.disabled), K = document.activeElement, Z = ee.find((Y) => Y.ref.current === K)?.textValue, qe = ee.map((Y) => Y.textValue), le = Ik(qe, j, Z), ye = ee.find((Y) => Y.textValue === le)?.ref.current;
23762
23762
  (function Y(te) {
23763
23763
  B.current = te, window.clearTimeout(N.current), te !== "" && (N.current = window.setTimeout(() => Y(""), 1e3));
@@ -23976,7 +23976,7 @@ var G1 = g.forwardRef(
23976
23976
  }
23977
23977
  );
23978
23978
  J1.displayName = Sk;
23979
- var Z1 = "MenuRadioGroup", [kk, Ek] = $n(
23979
+ var Z1 = "MenuRadioGroup", [kk, Ek] = Hn(
23980
23980
  Z1,
23981
23981
  { value: void 0, onValueChange: () => {
23982
23982
  } }
@@ -24008,14 +24008,14 @@ var X1 = "MenuRadioItem", Q1 = g.forwardRef(
24008
24008
  }
24009
24009
  );
24010
24010
  Q1.displayName = X1;
24011
- var Bc = "MenuItemIndicator", [eg, Mk] = $n(
24011
+ var Bc = "MenuItemIndicator", [eg, Mk] = Hn(
24012
24012
  Bc,
24013
24013
  { checked: !1 }
24014
24014
  ), tg = g.forwardRef(
24015
24015
  (t, e) => {
24016
24016
  const { __scopeMenu: n, forceMount: r, ...o } = t, i = Mk(Bc, n);
24017
24017
  return /* @__PURE__ */ v(
24018
- Hn,
24018
+ _n,
24019
24019
  {
24020
24020
  present: r || zi(i.checked) || i.checked === !0,
24021
24021
  children: /* @__PURE__ */ v(
@@ -24053,9 +24053,9 @@ var Ak = "MenuArrow", rg = g.forwardRef(
24053
24053
  }
24054
24054
  );
24055
24055
  rg.displayName = Ak;
24056
- var Rk = "MenuSub", [kM, og] = $n(Rk), wr = "MenuSubTrigger", ig = g.forwardRef(
24056
+ var Rk = "MenuSub", [kM, og] = Hn(Rk), wr = "MenuSubTrigger", ig = g.forwardRef(
24057
24057
  (t, e) => {
24058
- const n = Fn(wr, t.__scopeMenu), r = co(wr, t.__scopeMenu), o = og(wr, t.__scopeMenu), i = Lc(wr, t.__scopeMenu), s = g.useRef(null), { pointerGraceTimerRef: l, onPointerGraceIntentChange: a } = i, c = { __scopeMenu: t.__scopeMenu }, u = g.useCallback(() => {
24058
+ const n = $n(wr, t.__scopeMenu), r = co(wr, t.__scopeMenu), o = og(wr, t.__scopeMenu), i = Lc(wr, t.__scopeMenu), s = g.useRef(null), { pointerGraceTimerRef: l, onPointerGraceIntentChange: a } = i, c = { __scopeMenu: t.__scopeMenu }, u = g.useCallback(() => {
24059
24059
  s.current && window.clearTimeout(s.current), s.current = null;
24060
24060
  }, []);
24061
24061
  return g.useEffect(() => u, [u]), g.useEffect(() => {
@@ -24123,8 +24123,8 @@ var Rk = "MenuSub", [kM, og] = $n(Rk), wr = "MenuSubTrigger", ig = g.forwardRef(
24123
24123
  ig.displayName = wr;
24124
24124
  var sg = "MenuSubContent", lg = g.forwardRef(
24125
24125
  (t, e) => {
24126
- const n = W1(nt, t.__scopeMenu), { forceMount: r = n.forceMount, ...o } = t, i = Fn(nt, t.__scopeMenu), s = co(nt, t.__scopeMenu), l = og(sg, t.__scopeMenu), a = g.useRef(null), c = Ne(e, a);
24127
- return /* @__PURE__ */ v(Yr.Provider, { scope: t.__scopeMenu, children: /* @__PURE__ */ v(Hn, { present: r || i.open, children: /* @__PURE__ */ v(Yr.Slot, { scope: t.__scopeMenu, children: /* @__PURE__ */ v(
24126
+ const n = W1(nt, t.__scopeMenu), { forceMount: r = n.forceMount, ...o } = t, i = $n(nt, t.__scopeMenu), s = co(nt, t.__scopeMenu), l = og(sg, t.__scopeMenu), a = g.useRef(null), c = Ne(e, a);
24127
+ return /* @__PURE__ */ v(Yr.Provider, { scope: t.__scopeMenu, children: /* @__PURE__ */ v(_n, { present: r || i.open, children: /* @__PURE__ */ v(Yr.Slot, { scope: t.__scopeMenu, children: /* @__PURE__ */ v(
24128
24128
  Dc,
24129
24129
  {
24130
24130
  id: l.contentId,
@@ -24484,7 +24484,7 @@ const kg = g.forwardRef(
24484
24484
  ]
24485
24485
  }
24486
24486
  ) }),
24487
- /* @__PURE__ */ v($c, { align: "start", portal: r, children: /* @__PURE__ */ v(uo, { children: /* @__PURE__ */ v(fo, { children: /* @__PURE__ */ v(Bn, { children: e.map((m) => /* @__PURE__ */ v(Sg, { asChild: !0, children: /* @__PURE__ */ v(
24487
+ /* @__PURE__ */ v($c, { align: "start", portal: r, children: /* @__PURE__ */ v(uo, { children: /* @__PURE__ */ v(fo, { children: /* @__PURE__ */ v(Pn, { children: e.map((m) => /* @__PURE__ */ v(Sg, { asChild: !0, children: /* @__PURE__ */ v(
24488
24488
  Jm,
24489
24489
  {
24490
24490
  editor: l,
@@ -24627,7 +24627,7 @@ const Tg = ["shift", "alt", "meta", "mod", "ctrl", "control"], R9 = {
24627
24627
  ControlLeft: "ctrl",
24628
24628
  ControlRight: "ctrl"
24629
24629
  };
24630
- function an(t) {
24630
+ function on(t) {
24631
24631
  return (R9[t.trim()] || t.trim()).toLowerCase().replace(/key|digit|numpad/, "");
24632
24632
  }
24633
24633
  function Ag(t) {
@@ -24638,7 +24638,7 @@ function Sl(t, e = ",") {
24638
24638
  }
24639
24639
  function kl(t, e = "+", n = ">", r = !1, o) {
24640
24640
  let i = [], s = !1;
24641
- t = t.trim(), t.includes(n) ? (s = !0, i = t.toLocaleLowerCase().split(n).map((c) => an(c))) : i = t.toLocaleLowerCase().split(e).map((c) => an(c));
24641
+ t = t.trim(), t.includes(n) ? (s = !0, i = t.toLocaleLowerCase().split(n).map((c) => on(c))) : i = t.toLocaleLowerCase().split(e).map((c) => on(c));
24642
24642
  const l = {
24643
24643
  alt: i.includes("alt"),
24644
24644
  ctrl: i.includes("ctrl") || i.includes("control"),
@@ -24656,9 +24656,9 @@ function kl(t, e = "+", n = ">", r = !1, o) {
24656
24656
  };
24657
24657
  }
24658
24658
  typeof document < "u" && (document.addEventListener("keydown", (t) => {
24659
- t.code !== void 0 && Rg([an(t.code)]);
24659
+ t.code !== void 0 && Rg([on(t.code)]);
24660
24660
  }), document.addEventListener("keyup", (t) => {
24661
- t.code !== void 0 && Og([an(t.code)]);
24661
+ t.code !== void 0 && Og([on(t.code)]);
24662
24662
  })), typeof window < "u" && (window.addEventListener("blur", () => {
24663
24663
  At.clear();
24664
24664
  }), window.addEventListener("contextmenu", () => {
@@ -24718,7 +24718,7 @@ function B9(t, e) {
24718
24718
  ), !0) : e ? t.some((n) => e.includes(n)) || t.includes("*") : !0;
24719
24719
  }
24720
24720
  const _9 = (t, e, n = !1) => {
24721
- const { alt: r, meta: o, mod: i, shift: s, ctrl: l, keys: a, useKey: c } = e, { code: u, key: d, ctrlKey: f, metaKey: h, shiftKey: p, altKey: m } = t, y = an(u);
24721
+ const { alt: r, meta: o, mod: i, shift: s, ctrl: l, keys: a, useKey: c } = e, { code: u, key: d, ctrlKey: f, metaKey: h, shiftKey: p, altKey: m } = t, y = on(u);
24722
24722
  if (c && a?.length === 1 && a.includes(d))
24723
24723
  return !0;
24724
24724
  if (!a?.includes(y) && !["ctrl", "control", "unknown", "meta", "alt", "shift", "os"].includes(y))
@@ -24755,7 +24755,7 @@ function z9(t) {
24755
24755
  }
24756
24756
  const Sf = (t) => {
24757
24757
  t.stopPropagation(), t.preventDefault(), t.stopImmediatePropagation();
24758
- }, U9 = typeof window < "u" ? ji : Rn;
24758
+ }, U9 = typeof window < "u" ? ji : An;
24759
24759
  function Lg(t, e, n, r) {
24760
24760
  const o = Rt(null), i = Rt(!1), s = Array.isArray(n) ? Array.isArray(r) ? void 0 : r : n, l = Vc(t) ? t.join(s?.delimiter) : t, a = Array.isArray(n) ? n : Array.isArray(r) ? r : void 0, c = Ml(e, a ?? []), u = Rt(c);
24761
24761
  a ? u.current = c : u.current = e;
@@ -24791,7 +24791,7 @@ function Lg(t, e, n, r) {
24791
24791
  m = setTimeout(() => {
24792
24792
  p = [];
24793
24793
  }, d?.sequenceTimeoutMs ?? 1e3);
24794
- const M = S.useKey ? x.key : an(x.code);
24794
+ const M = S.useKey ? x.key : on(x.code);
24795
24795
  if (Ag(M.toLowerCase()))
24796
24796
  return;
24797
24797
  p.push(M);
@@ -24813,9 +24813,9 @@ function Lg(t, e, n, r) {
24813
24813
  });
24814
24814
  }
24815
24815
  }, b = (x) => {
24816
- x.code !== void 0 && (Rg(an(x.code)), (d?.keydown === void 0 && d?.keyup !== !0 || d?.keydown) && y(x));
24816
+ x.code !== void 0 && (Rg(on(x.code)), (d?.keydown === void 0 && d?.keyup !== !0 || d?.keydown) && y(x));
24817
24817
  }, C = (x) => {
24818
- x.code !== void 0 && (Og(an(x.code)), i.current = !1, d?.keyup && y(x, !0));
24818
+ x.code !== void 0 && (Og(on(x.code)), i.current = !1, d?.keyup && y(x, !0));
24819
24819
  }, w = o.current || s?.document || document;
24820
24820
  return w.addEventListener("keyup", C, s?.eventListenerOptions), w.addEventListener("keydown", b, s?.eventListenerOptions), h && Sl(l, d?.delimiter).forEach(
24821
24821
  (x) => h.addHotkey(
@@ -25233,7 +25233,7 @@ function xs(t, e, n = !0) {
25233
25233
  try {
25234
25234
  const o = t.view.state, i = o.selection;
25235
25235
  if (i.empty || i instanceof z) {
25236
- const s = gn({
25236
+ const s = hn({
25237
25237
  editor: t,
25238
25238
  node: o.selection.$anchor.node(1)
25239
25239
  })?.pos;
@@ -25263,7 +25263,7 @@ function Z9(t, e) {
25263
25263
  const n = t.view;
25264
25264
  let r = n.state, o = r.tr;
25265
25265
  if (r.selection.empty || r.selection instanceof z) {
25266
- const l = gn({
25266
+ const l = hn({
25267
25267
  editor: t,
25268
25268
  node: r.selection.$anchor.node(1)
25269
25269
  })?.pos;
@@ -25436,7 +25436,7 @@ function sE({
25436
25436
  ]
25437
25437
  }
25438
25438
  ) }),
25439
- /* @__PURE__ */ v($c, { align: "start", portal: o, children: /* @__PURE__ */ v(uo, { children: /* @__PURE__ */ v(fo, { children: /* @__PURE__ */ v(Bn, { children: c.map((m) => /* @__PURE__ */ v(Sg, { asChild: !0, children: /* @__PURE__ */ v(
25439
+ /* @__PURE__ */ v($c, { align: "start", portal: o, children: /* @__PURE__ */ v(uo, { children: /* @__PURE__ */ v(fo, { children: /* @__PURE__ */ v(Pn, { children: c.map((m) => /* @__PURE__ */ v(Sg, { asChild: !0, children: /* @__PURE__ */ v(
25440
25440
  Pg,
25441
25441
  {
25442
25442
  editor: s,
@@ -25569,7 +25569,7 @@ function Kc(t, e = !0) {
25569
25569
  try {
25570
25570
  const r = t.view.state, o = r.selection;
25571
25571
  if (o.empty || o instanceof z) {
25572
- const i = gn({
25572
+ const i = hn({
25573
25573
  editor: t,
25574
25574
  node: r.selection.$anchor.node(1)
25575
25575
  })?.pos;
@@ -25586,7 +25586,7 @@ function aE(t) {
25586
25586
  const e = t.view;
25587
25587
  let n = e.state, r = n.tr;
25588
25588
  if (n.selection.empty || n.selection instanceof z) {
25589
- const l = gn({
25589
+ const l = hn({
25590
25590
  editor: t,
25591
25591
  node: n.selection.$anchor.node(1)
25592
25592
  })?.pos;
@@ -25751,7 +25751,7 @@ function qc(t, e = !0) {
25751
25751
  try {
25752
25752
  const r = t.view.state, o = r.selection;
25753
25753
  if (o.empty || o instanceof z) {
25754
- const i = gn({
25754
+ const i = hn({
25755
25755
  editor: t,
25756
25756
  node: r.selection.$anchor.node(1)
25757
25757
  })?.pos;
@@ -25768,7 +25768,7 @@ function fE(t) {
25768
25768
  const e = t.view;
25769
25769
  let n = e.state, r = n.tr;
25770
25770
  if (n.selection.empty || n.selection instanceof z) {
25771
- const l = gn({
25771
+ const l = hn({
25772
25772
  editor: t,
25773
25773
  node: n.selection.$anchor.node(1)
25774
25774
  })?.pos;
@@ -25870,7 +25870,7 @@ const Ss = g.memo(
25870
25870
  Ss.displayName = "HighlighterIcon";
25871
25871
  var ks = "Popover", [jg] = pr(ks, [
25872
25872
  gs
25873
- ]), po = gs(), [mE, yn] = jg(ks), Kg = (t) => {
25873
+ ]), po = gs(), [mE, pn] = jg(ks), Kg = (t) => {
25874
25874
  const {
25875
25875
  __scopePopover: e,
25876
25876
  children: n,
@@ -25904,14 +25904,14 @@ var ks = "Popover", [jg] = pr(ks, [
25904
25904
  Kg.displayName = ks;
25905
25905
  var qg = "PopoverAnchor", gE = g.forwardRef(
25906
25906
  (t, e) => {
25907
- const { __scopePopover: n, ...r } = t, o = yn(qg, n), i = po(n), { onCustomAnchorAdd: s, onCustomAnchorRemove: l } = o;
25907
+ const { __scopePopover: n, ...r } = t, o = pn(qg, n), i = po(n), { onCustomAnchorAdd: s, onCustomAnchorRemove: l } = o;
25908
25908
  return g.useEffect(() => (s(), () => l()), [s, l]), /* @__PURE__ */ v(Ac, { ...i, ...r, ref: e });
25909
25909
  }
25910
25910
  );
25911
25911
  gE.displayName = qg;
25912
25912
  var Gg = "PopoverTrigger", Jg = g.forwardRef(
25913
25913
  (t, e) => {
25914
- const { __scopePopover: n, ...r } = t, o = yn(Gg, n), i = po(n), s = Ne(e, o.triggerRef), l = /* @__PURE__ */ v(
25914
+ const { __scopePopover: n, ...r } = t, o = pn(Gg, n), i = po(n), s = Ne(e, o.triggerRef), l = /* @__PURE__ */ v(
25915
25915
  Ae.button,
25916
25916
  {
25917
25917
  type: "button",
@@ -25931,20 +25931,20 @@ Jg.displayName = Gg;
25931
25931
  var Gc = "PopoverPortal", [yE, vE] = jg(Gc, {
25932
25932
  forceMount: void 0
25933
25933
  }), Zg = (t) => {
25934
- const { __scopePopover: e, forceMount: n, children: r, container: o } = t, i = yn(Gc, e);
25935
- return /* @__PURE__ */ v(yE, { scope: e, forceMount: n, children: /* @__PURE__ */ v(Hn, { present: n || i.open, children: /* @__PURE__ */ v(Rc, { asChild: !0, container: o, children: r }) }) });
25934
+ const { __scopePopover: e, forceMount: n, children: r, container: o } = t, i = pn(Gc, e);
25935
+ return /* @__PURE__ */ v(yE, { scope: e, forceMount: n, children: /* @__PURE__ */ v(_n, { present: n || i.open, children: /* @__PURE__ */ v(Rc, { asChild: !0, container: o, children: r }) }) });
25936
25936
  };
25937
25937
  Zg.displayName = Gc;
25938
25938
  var ur = "PopoverContent", Yg = g.forwardRef(
25939
25939
  (t, e) => {
25940
- const n = vE(ur, t.__scopePopover), { forceMount: r = n.forceMount, ...o } = t, i = yn(ur, t.__scopePopover);
25941
- return /* @__PURE__ */ v(Hn, { present: r || i.open, children: i.modal ? /* @__PURE__ */ v(CE, { ...o, ref: e }) : /* @__PURE__ */ v(wE, { ...o, ref: e }) });
25940
+ const n = vE(ur, t.__scopePopover), { forceMount: r = n.forceMount, ...o } = t, i = pn(ur, t.__scopePopover);
25941
+ return /* @__PURE__ */ v(_n, { present: r || i.open, children: i.modal ? /* @__PURE__ */ v(CE, { ...o, ref: e }) : /* @__PURE__ */ v(wE, { ...o, ref: e }) });
25942
25942
  }
25943
25943
  );
25944
25944
  Yg.displayName = ur;
25945
25945
  var bE = /* @__PURE__ */ Zr("PopoverContent.RemoveScroll"), CE = g.forwardRef(
25946
25946
  (t, e) => {
25947
- const n = yn(ur, t.__scopePopover), r = g.useRef(null), o = Ne(e, r), i = g.useRef(!1);
25947
+ const n = pn(ur, t.__scopePopover), r = g.useRef(null), o = Ne(e, r), i = g.useRef(!1);
25948
25948
  return g.useEffect(() => {
25949
25949
  const s = r.current;
25950
25950
  if (s) return I1(s);
@@ -25976,7 +25976,7 @@ var bE = /* @__PURE__ */ Zr("PopoverContent.RemoveScroll"), CE = g.forwardRef(
25976
25976
  }
25977
25977
  ), wE = g.forwardRef(
25978
25978
  (t, e) => {
25979
- const n = yn(ur, t.__scopePopover), r = g.useRef(!1), o = g.useRef(!1);
25979
+ const n = pn(ur, t.__scopePopover), r = g.useRef(!1), o = g.useRef(!1);
25980
25980
  return /* @__PURE__ */ v(
25981
25981
  Xg,
25982
25982
  {
@@ -26008,7 +26008,7 @@ var bE = /* @__PURE__ */ Zr("PopoverContent.RemoveScroll"), CE = g.forwardRef(
26008
26008
  onFocusOutside: c,
26009
26009
  onInteractOutside: u,
26010
26010
  ...d
26011
- } = t, f = yn(ur, n), h = po(n);
26011
+ } = t, f = pn(ur, n), h = po(n);
26012
26012
  return u1(), /* @__PURE__ */ v(
26013
26013
  Ec,
26014
26014
  {
@@ -26053,7 +26053,7 @@ var bE = /* @__PURE__ */ Zr("PopoverContent.RemoveScroll"), CE = g.forwardRef(
26053
26053
  }
26054
26054
  ), Qg = "PopoverClose", xE = g.forwardRef(
26055
26055
  (t, e) => {
26056
- const { __scopePopover: n, ...r } = t, o = yn(Qg, n);
26056
+ const { __scopePopover: n, ...r } = t, o = pn(Qg, n);
26057
26057
  return /* @__PURE__ */ v(
26058
26058
  Ae.button,
26059
26059
  {
@@ -26355,7 +26355,7 @@ function s0({
26355
26355
  tabIndex: 0,
26356
26356
  style: r ? { boxShadow: "none", border: 0 } : {},
26357
26357
  children: /* @__PURE__ */ v(fo, { style: r ? { padding: 0 } : {}, children: /* @__PURE__ */ P(Fc, { orientation: "horizontal", children: [
26358
- /* @__PURE__ */ v(Bn, { orientation: "horizontal", children: e.map((l, a) => /* @__PURE__ */ v(
26358
+ /* @__PURE__ */ v(Pn, { orientation: "horizontal", children: e.map((l, a) => /* @__PURE__ */ v(
26359
26359
  o0,
26360
26360
  {
26361
26361
  editor: t,
@@ -26368,7 +26368,7 @@ function s0({
26368
26368
  l.value
26369
26369
  )) }),
26370
26370
  /* @__PURE__ */ v(ps, {}),
26371
- /* @__PURE__ */ v(Bn, { orientation: "horizontal", children: /* @__PURE__ */ v(
26371
+ /* @__PURE__ */ v(Pn, { orientation: "horizontal", children: /* @__PURE__ */ v(
26372
26372
  he,
26373
26373
  {
26374
26374
  onClick: n,
@@ -26597,7 +26597,7 @@ const u0 = ({
26597
26597
  autoCapitalize: "off"
26598
26598
  }
26599
26599
  ) }),
26600
- /* @__PURE__ */ v(Bn, { orientation: "horizontal", children: /* @__PURE__ */ v(
26600
+ /* @__PURE__ */ v(Pn, { orientation: "horizontal", children: /* @__PURE__ */ v(
26601
26601
  he,
26602
26602
  {
26603
26603
  type: "button",
@@ -26609,7 +26609,7 @@ const u0 = ({
26609
26609
  }
26610
26610
  ) }),
26611
26611
  /* @__PURE__ */ v(ps, {}),
26612
- /* @__PURE__ */ P(Bn, { orientation: "horizontal", children: [
26612
+ /* @__PURE__ */ P(Pn, { orientation: "horizontal", children: [
26613
26613
  /* @__PURE__ */ v(
26614
26614
  he,
26615
26615
  {
@@ -26811,7 +26811,7 @@ function VE({
26811
26811
  }) {
26812
26812
  return /* @__PURE__ */ v(Ct, { children: vt({ shortcutKeys: e }) });
26813
26813
  }
26814
- const Wt = g.forwardRef(
26814
+ const Xn = g.forwardRef(
26815
26815
  ({
26816
26816
  editor: t,
26817
26817
  type: e,
@@ -26867,7 +26867,7 @@ const Wt = g.forwardRef(
26867
26867
  ) : null;
26868
26868
  }
26869
26869
  );
26870
- Wt.displayName = "MarkButton";
26870
+ Xn.displayName = "MarkButton";
26871
26871
  const m0 = g.memo(
26872
26872
  ({ className: t, ...e }) => /* @__PURE__ */ v(
26873
26873
  "svg",
@@ -27671,8 +27671,8 @@ function aM() {
27671
27671
  return H = te, $ = setTimeout(Z, S), F ? R(te) : W;
27672
27672
  }
27673
27673
  function ee(te) {
27674
- var Ge = te - I, wt = te - H, Vn = S - Ge;
27675
- return L ? p(Vn, U - wt) : Vn;
27674
+ var Ge = te - I, wt = te - H, Fn = S - Ge;
27675
+ return L ? p(Fn, U - wt) : Fn;
27676
27676
  }
27677
27677
  function K(te) {
27678
27678
  var Ge = te - I, wt = te - H;
@@ -27745,7 +27745,7 @@ function aM() {
27745
27745
  var cM = aM();
27746
27746
  const uM = /* @__PURE__ */ Tf(cM), dM = (t) => {
27747
27747
  const e = Rt(t);
27748
- e.current = t, Rn(
27748
+ e.current = t, An(
27749
27749
  () => () => {
27750
27750
  e.current();
27751
27751
  },
@@ -27893,58 +27893,47 @@ const yM = ({
27893
27893
  isMobile: n
27894
27894
  }) => /* @__PURE__ */ P(ze, { children: [
27895
27895
  /* @__PURE__ */ v(lf, {}),
27896
- /* @__PURE__ */ P(Gt, { children: [
27896
+ /* @__PURE__ */ P(yn, { children: [
27897
27897
  /* @__PURE__ */ v(Ca, { action: "undo" }),
27898
27898
  /* @__PURE__ */ v(Ca, { action: "redo" })
27899
27899
  ] }),
27900
- /* @__PURE__ */ v(Jt, {}),
27901
- /* @__PURE__ */ P(Gt, { children: [
27900
+ /* @__PURE__ */ v(vn, {}),
27901
+ /* @__PURE__ */ P(yn, { children: [
27902
27902
  /* @__PURE__ */ v(kg, { levels: [1, 2, 3, 4], portal: n }),
27903
- /* @__PURE__ */ v(
27904
- sE,
27905
- {
27906
- types: ["bulletList", "orderedList", "taskList"],
27907
- portal: n
27908
- }
27909
- ),
27903
+ /* @__PURE__ */ v(sE, { types: ["bulletList", "orderedList", "taskList"], portal: n }),
27910
27904
  /* @__PURE__ */ v(Hg, {}),
27911
27905
  /* @__PURE__ */ v(Vg, {})
27912
27906
  ] }),
27913
- /* @__PURE__ */ v(Jt, {}),
27914
- /* @__PURE__ */ P(Gt, { children: [
27915
- /* @__PURE__ */ v(Wt, { type: "bold" }),
27916
- /* @__PURE__ */ v(Wt, { type: "italic" }),
27917
- /* @__PURE__ */ v(Wt, { type: "strike" }),
27918
- /* @__PURE__ */ v(Wt, { type: "code" }),
27919
- /* @__PURE__ */ v(Wt, { type: "underline" }),
27907
+ /* @__PURE__ */ v(vn, {}),
27908
+ /* @__PURE__ */ P(yn, { children: [
27909
+ /* @__PURE__ */ v(Xn, { type: "bold" }),
27910
+ /* @__PURE__ */ v(Xn, { type: "italic" }),
27911
+ /* @__PURE__ */ v(Xn, { type: "strike" }),
27912
+ /* @__PURE__ */ v(Xn, { type: "code" }),
27913
+ /* @__PURE__ */ v(Xn, { type: "underline" }),
27920
27914
  n ? /* @__PURE__ */ v(Yc, { onClick: t }) : /* @__PURE__ */ v(DE, {}),
27921
27915
  n ? /* @__PURE__ */ v(Xc, { onClick: e }) : /* @__PURE__ */ v(d0, {})
27922
27916
  ] }),
27923
- /* @__PURE__ */ v(Jt, {}),
27924
- /* @__PURE__ */ P(Gt, { children: [
27925
- /* @__PURE__ */ v(Wt, { type: "superscript" }),
27926
- /* @__PURE__ */ v(Wt, { type: "subscript" })
27927
- ] }),
27928
- /* @__PURE__ */ v(Jt, {}),
27929
- /* @__PURE__ */ P(Gt, { children: [
27917
+ /* @__PURE__ */ v(vn, {}),
27918
+ /* @__PURE__ */ P(yn, { children: [
27930
27919
  /* @__PURE__ */ v(xr, { align: "left" }),
27931
27920
  /* @__PURE__ */ v(xr, { align: "center" }),
27932
27921
  /* @__PURE__ */ v(xr, { align: "right" }),
27933
27922
  /* @__PURE__ */ v(xr, { align: "justify" })
27934
27923
  ] }),
27935
- /* @__PURE__ */ v(Jt, {}),
27936
- /* @__PURE__ */ v(Gt, { children: /* @__PURE__ */ v(Mg, { text: "Add" }) }),
27924
+ /* @__PURE__ */ v(vn, {}),
27925
+ /* @__PURE__ */ v(yn, { children: /* @__PURE__ */ v(Mg, { text: "Add" }) }),
27937
27926
  /* @__PURE__ */ v(lf, {}),
27938
- n && /* @__PURE__ */ v(Jt, {})
27927
+ n && /* @__PURE__ */ v(vn, {})
27939
27928
  ] }), vM = ({
27940
27929
  type: t,
27941
27930
  onBack: e
27942
27931
  }) => /* @__PURE__ */ P(ze, { children: [
27943
- /* @__PURE__ */ v(Gt, { children: /* @__PURE__ */ P(he, { "data-style": "ghost", onClick: e, children: [
27932
+ /* @__PURE__ */ v(yn, { children: /* @__PURE__ */ P(he, { "data-style": "ghost", onClick: e, children: [
27944
27933
  /* @__PURE__ */ v(N0, { className: "tiptap-button-icon" }),
27945
27934
  t === "highlighter" ? /* @__PURE__ */ v(Ss, { className: "tiptap-button-icon" }) : /* @__PURE__ */ v(Es, { className: "tiptap-button-icon" })
27946
27935
  ] }) }),
27947
- /* @__PURE__ */ v(Jt, {}),
27936
+ /* @__PURE__ */ v(vn, {}),
27948
27937
  t === "highlighter" ? /* @__PURE__ */ v(s0, {}) : /* @__PURE__ */ v(_E, {})
27949
27938
  ] });
27950
27939
  function EM(t) {
@@ -27972,9 +27961,7 @@ function EM(t) {
27972
27961
  accept: "image/*",
27973
27962
  maxSize: 1 * 1024 * 1024 * 1024,
27974
27963
  // limit: props.maxImageCount || 3,
27975
- upload: (a, c, u) => Promise.resolve(
27976
- t.onUploadImage?.(a, c, u) || ""
27977
- )
27964
+ upload: (a, c, u) => Promise.resolve(t.onUploadImage?.(a, c, u) || "")
27978
27965
  // upload: (file) => props.onUploadImage(file)
27979
27966
  // // onError:
27980
27967
  // // props.onImageUploadError ||
@@ -28011,9 +27998,9 @@ function EM(t) {
28011
27998
  editor: s,
28012
27999
  overlayHeight: i.current?.getBoundingClientRect().height ?? 0
28013
28000
  });
28014
- return Rn(() => {
28001
+ return An(() => {
28015
28002
  !e && r !== "main" && o("main");
28016
- }, [e, r]), Rn(() => () => {
28003
+ }, [e, r]), An(() => () => {
28017
28004
  s && s.commands.clearContent();
28018
28005
  }, [s]), /* @__PURE__ */ v("div", { className: "simple-editor-wrapper", children: /* @__PURE__ */ P(ec.Provider, { value: { editor: s }, children: [
28019
28006
  /* @__PURE__ */ v(
@@ -28053,12 +28040,12 @@ export {
28053
28040
  Mg as ImageUploadButton,
28054
28041
  sE as ListDropdownMenu,
28055
28042
  sf as MAX_FILE_SIZE,
28056
- Wt as MarkButton,
28043
+ Xn as MarkButton,
28057
28044
  xr as TextAlignButton,
28058
28045
  EM as TiptapEditor,
28059
28046
  Km as Toolbar,
28060
- Gt as ToolbarGroup,
28061
- Jt as ToolbarSeparator,
28047
+ yn as ToolbarGroup,
28048
+ vn as ToolbarSeparator,
28062
28049
  Ca as UndoRedoButton,
28063
28050
  SM as onUploadImage,
28064
28051
  ho as useIsMobile,