@8btc/whiteboard 0.0.20-alpha.7 → 0.0.20-alpha.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +624 -624
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -7,9 +7,9 @@ var W = (n, e, t) => ey(n, typeof e != "symbol" ? e + "" : e, t), Qs = (n, e, t)
7
7
  var b = (n, e, t) => (Qs(n, e, "read from private field"), t ? t.call(n) : e.get(n)), P = (n, e, t) => e.has(n) ? ru("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), G = (n, e, t, r) => (Qs(n, e, "write to private field"), r ? r.call(n, t) : e.set(n, t), t), ae = (n, e, t) => (Qs(n, e, "access private method"), t);
8
8
  import { jsxs as ce, jsx as E, Fragment as Mr } from "react/jsx-runtime";
9
9
  import * as T from "react";
10
- import nt, { useState as ye, useEffect as be, useRef as et, useContext as Ar, createContext as Or, useLayoutEffect as As, useDebugValue as ty, forwardRef as xe, useMemo as nn, isValidElement as iu, version as ny, cloneElement as ry, Fragment as iy, useCallback as Qe, memo as $t } from "react";
10
+ import nt, { useState as ge, useEffect as be, useRef as et, useContext as Ar, createContext as Or, useLayoutEffect as As, useDebugValue as ty, forwardRef as xe, useMemo as nn, isValidElement as iu, version as ny, cloneElement as ry, Fragment as iy, useCallback as Qe, memo as $t } from "react";
11
11
  import me from "konva";
12
- import { N as oe, I as ut, R as te } from "./const-CNw7pZuI.js";
12
+ import { N as ie, I as ut, R as te } from "./const-CNw7pZuI.js";
13
13
  import oy from "mitt";
14
14
  import { v4 as Vr } from "uuid";
15
15
  import { Slot as sy } from "@radix-ui/react-slot";
@@ -133,7 +133,7 @@ class my {
133
133
  return;
134
134
  const t = b(this, X).getPointerPosition(), r = e.target;
135
135
  let i = null;
136
- r.getParent()?.className === "Transformer" ? i = r.getParent().nodes() : r === b(this, X) ? i = r : (i = r.findAncestor((o) => o.hasName(oe.selectable), !0), i && b(this, Q)._selectNodes([i.id()])), b(this, Q)._showContextMenu({
136
+ r.getParent()?.className === "Transformer" ? i = r.getParent().nodes() : r === b(this, X) ? i = r : (i = r.findAncestor((o) => o.hasName(ie.selectable), !0), i && b(this, Q)._selectNodes([i.id()])), b(this, Q)._showContextMenu({
137
137
  x: t ? t.x : 0,
138
138
  y: t ? t.y : 0,
139
139
  clientX: e.evt.clientX,
@@ -519,7 +519,7 @@ function ou(n, e) {
519
519
  ...i,
520
520
  width: t,
521
521
  height: r,
522
- name: `${oe.nodeRoot} ${oe.selectable} ${oe.rect}`,
522
+ name: `${ie.nodeRoot} ${ie.selectable} ${ie.rect}`,
523
523
  draggable: !0
524
524
  };
525
525
  }
@@ -532,7 +532,7 @@ function su(n, e) {
532
532
  return {
533
533
  ...n,
534
534
  ...i,
535
- name: `${oe.nodeRoot} ${oe.selectable} ${oe.image}`,
535
+ name: `${ie.nodeRoot} ${ie.selectable} ${ie.image}`,
536
536
  draggable: !0
537
537
  };
538
538
  }
@@ -545,7 +545,7 @@ function lu(n, e) {
545
545
  return {
546
546
  ...n,
547
547
  ...i,
548
- name: `${oe.nodeRoot} ${oe.selectable} ${oe.video}`,
548
+ name: `${ie.nodeRoot} ${ie.selectable} ${ie.video}`,
549
549
  draggable: !0
550
550
  };
551
551
  }
@@ -556,7 +556,7 @@ function au(n, e) {
556
556
  ...i,
557
557
  width: t,
558
558
  height: r,
559
- name: `${oe.nodeRoot} ${oe.imageMarker} ${n.$_parentId}`
559
+ name: `${ie.nodeRoot} ${ie.imageMarker} ${n.$_parentId}`
560
560
  };
561
561
  }
562
562
  function cu(n, e) {
@@ -566,7 +566,7 @@ function cu(n, e) {
566
566
  ...i,
567
567
  width: t,
568
568
  height: r,
569
- name: `${oe.nodeRoot} ${oe.selectable} ${oe.html}`,
569
+ name: `${ie.nodeRoot} ${ie.selectable} ${ie.html}`,
570
570
  draggable: !0
571
571
  };
572
572
  }
@@ -580,7 +580,7 @@ function uu(n, e) {
580
580
  align: "left",
581
581
  ...n,
582
582
  ...t,
583
- name: `${oe.nodeRoot} ${oe.selectable} ${oe.text}`,
583
+ name: `${ie.nodeRoot} ${ie.selectable} ${ie.text}`,
584
584
  draggable: !0
585
585
  };
586
586
  }
@@ -590,7 +590,7 @@ function du(n, e) {
590
590
  cornerRadius: 0,
591
591
  ...n,
592
592
  ...t,
593
- name: `${oe.nodeRoot} ${oe.richText}`,
593
+ name: `${ie.nodeRoot} ${ie.selectable} ${ie.richText}`,
594
594
  draggable: !0
595
595
  };
596
596
  }
@@ -675,7 +675,7 @@ Pf = function() {
675
675
  });
676
676
  };
677
677
  var Bt, Vl, mi, gi, _f, Ul;
678
- class ky extends Qn {
678
+ class Sy extends Qn {
679
679
  constructor(t, r, i = !1) {
680
680
  super();
681
681
  P(this, Bt);
@@ -796,14 +796,14 @@ Ul = function() {
796
796
  y: w,
797
797
  width: x,
798
798
  height: C
799
- }), u.getChildren().forEach((k) => {
800
- k.getClassName() === "Rect" ? k.setAttrs({ width: x, height: C }) : k.getClassName() === "Group" && k.setAttrs({ x, y: C });
799
+ }), u.getChildren().forEach((S) => {
800
+ S.getClassName() === "Rect" ? S.setAttrs({ width: x, height: C }) : S.getClassName() === "Group" && S.setAttrs({ x, y: C });
801
801
  }), fu(u)?.syncConfigFromElement();
802
802
  }
803
803
  });
804
804
  };
805
805
  var yt, Je, mn, At, pr, mr, Tr, Bf, $f;
806
- class Sy extends Qn {
806
+ class ky extends Qn {
807
807
  constructor(t, r, i = !1) {
808
808
  super();
809
809
  P(this, Tr);
@@ -835,7 +835,7 @@ class Sy extends Qn {
835
835
  createElement() {
836
836
  const t = Math.max(this.config.width ?? te.MIN_SIZE, te.MIN_SIZE), r = Math.max(this.config.height ?? te.MIN_SIZE, te.MIN_SIZE), i = new me.Group({
837
837
  id: this.config.id,
838
- name: `${oe.nodeRoot} ${oe.imageMarker} ${this.config.$_parentId}`,
838
+ name: `${ie.nodeRoot} ${ie.imageMarker} ${this.config.$_parentId}`,
839
839
  x: this.config.x,
840
840
  y: this.config.y,
841
841
  width: t,
@@ -1015,11 +1015,11 @@ zf = function() {
1015
1015
  this.syncConfigFromElement(), this.core._rebuildStateAfterNodeChange(this, !0);
1016
1016
  });
1017
1017
  };
1018
- var bi, ks, Ss, Ff, Af;
1018
+ var bi, Ss, ks, Ff, Af;
1019
1019
  let Ty = (Af = class extends Qn {
1020
1020
  constructor(t, r, i = !1) {
1021
1021
  super();
1022
- P(this, Ss);
1022
+ P(this, ks);
1023
1023
  W(this, "core");
1024
1024
  W(this, "config");
1025
1025
  W(this, "element");
@@ -1032,7 +1032,7 @@ let Ty = (Af = class extends Qn {
1032
1032
  /**
1033
1033
  * 编辑文字
1034
1034
  */
1035
- P(this, ks, () => {
1035
+ P(this, Ss, () => {
1036
1036
  const t = this.element, r = this.core.getCanvasTransformer(), i = t.getClientRect(), o = document.createElement("textarea");
1037
1037
  this.core.getStage().getContent().appendChild(o), o.name = "text-editor", o.draggable = !1, o.value = t.text(), o.style.position = "absolute", o.style.top = i.y + "px", o.style.left = i.x + "px", o.style.minWidth = "2px", o.style.fieldSizing = "content", o.style.whiteSpace = "nowrap", o.style.height = t.height() + "px", o.style.fontSize = t.fontSize() + "px", o.style.border = "none", o.style.padding = "0px", o.style.margin = "0px", o.style.overflow = "hidden", o.style.background = "none", o.style.outline = "none", o.style.resize = "none", o.style.lineHeight = t.lineHeight().toString(), o.style.fontFamily = t.fontFamily(), o.style.transformOrigin = "left top", o.style.textAlign = t.align(), o.style.color = t.fill().toString();
1038
1038
  const s = t.rotation();
@@ -1062,8 +1062,8 @@ let Ty = (Af = class extends Qn {
1062
1062
  this.core.on("viewport:change", u), window.addEventListener("click", c), window.addEventListener("touchstart", c);
1063
1063
  });
1064
1064
  });
1065
- this.core = t, this.config = uu(r, this.core.getTheme()), this.element = this.createElement(), this.rect = new me.Rect(this.config), tr(this.element, this), this.isDraft = i, ae(this, Ss, Ff).call(this), setTimeout(() => {
1066
- b(this, ks).call(this);
1065
+ this.core = t, this.config = uu(r, this.core.getTheme()), this.element = this.createElement(), this.rect = new me.Rect(this.config), tr(this.element, this), this.isDraft = i, ae(this, ks, Ff).call(this), setTimeout(() => {
1066
+ b(this, Ss).call(this);
1067
1067
  });
1068
1068
  }
1069
1069
  getID() {
@@ -1103,7 +1103,7 @@ let Ty = (Af = class extends Qn {
1103
1103
  destroy() {
1104
1104
  this.core.off("toolType:change", b(this, bi)), this.element.destroy();
1105
1105
  }
1106
- }, bi = new WeakMap(), ks = new WeakMap(), Ss = new WeakSet(), /**
1106
+ }, bi = new WeakMap(), Ss = new WeakMap(), ks = new WeakSet(), /**
1107
1107
  * 设置事件处理器
1108
1108
  */
1109
1109
  Ff = function() {
@@ -3873,10 +3873,10 @@ function Cu(n) {
3873
3873
  function tl(n) {
3874
3874
  return n.document || window.document;
3875
3875
  }
3876
- const ku = /* @__PURE__ */ new WeakMap();
3876
+ const Su = /* @__PURE__ */ new WeakMap();
3877
3877
  function Gy(n) {
3878
- let e = ku.get(n);
3879
- return e === void 0 && ku.set(n, e = Jy(n)), e;
3878
+ let e = Su.get(n);
3879
+ return e === void 0 && Su.set(n, e = Jy(n)), e;
3880
3880
  }
3881
3881
  function Jy(n) {
3882
3882
  let e = null;
@@ -3938,7 +3938,7 @@ const oh = 65535, sh = Math.pow(2, 16);
3938
3938
  function Yy(n, e) {
3939
3939
  return n + e * sh;
3940
3940
  }
3941
- function Su(n) {
3941
+ function ku(n) {
3942
3942
  return n & oh;
3943
3943
  }
3944
3944
  function Xy(n) {
@@ -3995,7 +3995,7 @@ class Ze {
3995
3995
  @internal
3996
3996
  */
3997
3997
  recover(e) {
3998
- let t = 0, r = Su(e);
3998
+ let t = 0, r = ku(e);
3999
3999
  if (!this.inverted)
4000
4000
  for (let i = 0; i < r; i++)
4001
4001
  t += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];
@@ -4032,7 +4032,7 @@ class Ze {
4032
4032
  @internal
4033
4033
  */
4034
4034
  touches(e, t) {
4035
- let r = 0, i = Su(t), o = this.inverted ? 2 : 1, s = this.inverted ? 1 : 2;
4035
+ let r = 0, i = ku(t), o = this.inverted ? 2 : 1, s = this.inverted ? 1 : 2;
4036
4036
  for (let l = 0; l < this.ranges.length; l += 3) {
4037
4037
  let a = this.ranges[l] - (this.inverted ? r : 0);
4038
4038
  if (a > e)
@@ -4426,7 +4426,7 @@ class qn extends $e {
4426
4426
  }
4427
4427
  }
4428
4428
  $e.jsonID("removeNodeMark", qn);
4429
- class ke extends $e {
4429
+ class Se extends $e {
4430
4430
  /**
4431
4431
  The given `slice` should fit the 'gap' between `from` and
4432
4432
  `to`—the depths must line up, and the surrounding nodes must be
@@ -4446,21 +4446,21 @@ class ke extends $e {
4446
4446
  return new Ze([this.from, this.to - this.from, this.slice.size]);
4447
4447
  }
4448
4448
  invert(e) {
4449
- return new ke(this.from, this.from + this.slice.size, e.slice(this.from, this.to));
4449
+ return new Se(this.from, this.from + this.slice.size, e.slice(this.from, this.to));
4450
4450
  }
4451
4451
  map(e) {
4452
4452
  let t = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1);
4453
- return t.deletedAcross && r.deletedAcross ? null : new ke(t.pos, Math.max(t.pos, r.pos), this.slice, this.structure);
4453
+ return t.deletedAcross && r.deletedAcross ? null : new Se(t.pos, Math.max(t.pos, r.pos), this.slice, this.structure);
4454
4454
  }
4455
4455
  merge(e) {
4456
- if (!(e instanceof ke) || e.structure || this.structure)
4456
+ if (!(e instanceof Se) || e.structure || this.structure)
4457
4457
  return null;
4458
4458
  if (this.from + this.slice.size == e.from && !this.slice.openEnd && !e.slice.openStart) {
4459
4459
  let t = this.slice.size + e.slice.size == 0 ? I.empty : new I(this.slice.content.append(e.slice.content), this.slice.openStart, e.slice.openEnd);
4460
- return new ke(this.from, this.to + (e.to - e.from), t, this.structure);
4460
+ return new Se(this.from, this.to + (e.to - e.from), t, this.structure);
4461
4461
  } else if (e.to == this.from && !this.slice.openStart && !e.slice.openEnd) {
4462
4462
  let t = this.slice.size + e.slice.size == 0 ? I.empty : new I(e.slice.content.append(this.slice.content), e.slice.openStart, this.slice.openEnd);
4463
- return new ke(e.from, this.to, t, this.structure);
4463
+ return new Se(e.from, this.to, t, this.structure);
4464
4464
  } else
4465
4465
  return null;
4466
4466
  }
@@ -4474,11 +4474,11 @@ class ke extends $e {
4474
4474
  static fromJSON(e, t) {
4475
4475
  if (typeof t.from != "number" || typeof t.to != "number")
4476
4476
  throw new RangeError("Invalid input for ReplaceStep.fromJSON");
4477
- return new ke(t.from, t.to, I.fromJSON(e, t.slice), !!t.structure);
4477
+ return new Se(t.from, t.to, I.fromJSON(e, t.slice), !!t.structure);
4478
4478
  }
4479
4479
  }
4480
- $e.jsonID("replace", ke);
4481
- class Se extends $e {
4480
+ $e.jsonID("replace", Se);
4481
+ class ke extends $e {
4482
4482
  /**
4483
4483
  Create a replace-around step with the given range and gap.
4484
4484
  `insert` should be the point in the slice into which the content
@@ -4509,11 +4509,11 @@ class Se extends $e {
4509
4509
  }
4510
4510
  invert(e) {
4511
4511
  let t = this.gapTo - this.gapFrom;
4512
- return new Se(this.from, this.from + this.slice.size + t, this.from + this.insert, this.from + this.insert + t, e.slice(this.from, this.to).removeBetween(this.gapFrom - this.from, this.gapTo - this.from), this.gapFrom - this.from, this.structure);
4512
+ return new ke(this.from, this.from + this.slice.size + t, this.from + this.insert, this.from + this.insert + t, e.slice(this.from, this.to).removeBetween(this.gapFrom - this.from, this.gapTo - this.from), this.gapFrom - this.from, this.structure);
4513
4513
  }
4514
4514
  map(e) {
4515
4515
  let t = e.mapResult(this.from, 1), r = e.mapResult(this.to, -1), i = this.from == this.gapFrom ? t.pos : e.map(this.gapFrom, -1), o = this.to == this.gapTo ? r.pos : e.map(this.gapTo, 1);
4516
- return t.deletedAcross && r.deletedAcross || i < t.pos || o > r.pos ? null : new Se(t.pos, r.pos, i, o, this.slice, this.insert, this.structure);
4516
+ return t.deletedAcross && r.deletedAcross || i < t.pos || o > r.pos ? null : new ke(t.pos, r.pos, i, o, this.slice, this.insert, this.structure);
4517
4517
  }
4518
4518
  toJSON() {
4519
4519
  let e = {
@@ -4532,10 +4532,10 @@ class Se extends $e {
4532
4532
  static fromJSON(e, t) {
4533
4533
  if (typeof t.from != "number" || typeof t.to != "number" || typeof t.gapFrom != "number" || typeof t.gapTo != "number" || typeof t.insert != "number")
4534
4534
  throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");
4535
- return new Se(t.from, t.to, t.gapFrom, t.gapTo, I.fromJSON(e, t.slice), t.insert, !!t.structure);
4535
+ return new ke(t.from, t.to, t.gapFrom, t.gapTo, I.fromJSON(e, t.slice), t.insert, !!t.structure);
4536
4536
  }
4537
4537
  }
4538
- $e.jsonID("replaceAround", Se);
4538
+ $e.jsonID("replaceAround", ke);
4539
4539
  function Jl(n, e, t) {
4540
4540
  let r = n.resolve(e), i = t - e, o = r.depth;
4541
4541
  for (; i > 0 && o > 0 && r.indexAfter(o) == r.node(o).childCount; )
@@ -4594,7 +4594,7 @@ function Ba(n, e, t, r = t.contentMatch, i = !0) {
4594
4594
  for (let a = 0; a < o.childCount; a++) {
4595
4595
  let c = o.child(a), u = l + c.nodeSize, d = r.matchType(c.type);
4596
4596
  if (!d)
4597
- s.push(new ke(l, u, I.empty));
4597
+ s.push(new Se(l, u, I.empty));
4598
4598
  else {
4599
4599
  r = d;
4600
4600
  for (let f = 0; f < c.marks.length; f++)
@@ -4602,7 +4602,7 @@ function Ba(n, e, t, r = t.contentMatch, i = !0) {
4602
4602
  if (i && c.isText && t.whitespace != "pre") {
4603
4603
  let f, h = /\r?\n|\r/g, p;
4604
4604
  for (; f = h.exec(c.text); )
4605
- p || (p = new I(M.from(t.schema.text(" ", t.allowedMarks(c.marks))), 0, 0)), s.push(new ke(l + f.index, l + f.index + f[0].length, p));
4605
+ p || (p = new I(M.from(t.schema.text(" ", t.allowedMarks(c.marks))), 0, 0)), s.push(new Se(l + f.index, l + f.index + f[0].length, p));
4606
4606
  }
4607
4607
  }
4608
4608
  l = u;
@@ -4636,7 +4636,7 @@ function t0(n, e, t) {
4636
4636
  let f = M.empty, h = 0;
4637
4637
  for (let p = o, m = !1; p > t; p--)
4638
4638
  m || i.after(p + 1) < i.end(p) ? (m = !0, f = M.from(i.node(p).copy(f)), h++) : c++;
4639
- n.step(new Se(a, c, s, l, new I(u.append(f), d, h), u.size - d, !0));
4639
+ n.step(new ke(a, c, s, l, new I(u.append(f), d, h), u.size - d, !0));
4640
4640
  }
4641
4641
  function $a(n, e, t = null, r = n) {
4642
4642
  let i = n0(n, e), o = i && r0(r, e);
@@ -4672,7 +4672,7 @@ function i0(n, e, t) {
4672
4672
  r = M.from(t[s].type.create(t[s].attrs, r));
4673
4673
  }
4674
4674
  let i = e.start, o = e.end;
4675
- n.step(new Se(i, o, i, o, new I(r, 0, 0), t.length, !0));
4675
+ n.step(new ke(i, o, i, o, new I(r, 0, 0), t.length, !0));
4676
4676
  }
4677
4677
  function o0(n, e, t, r, i) {
4678
4678
  if (!r.isTextblock)
@@ -4688,7 +4688,7 @@ function o0(n, e, t, r, i) {
4688
4688
  }
4689
4689
  c === !1 && dh(n, s, l, o), Ba(n, n.mapping.slice(o).map(l, 1), r, void 0, c === null);
4690
4690
  let u = n.mapping.slice(o), d = u.map(l, 1), f = u.map(l + s.nodeSize, 1);
4691
- return n.step(new Se(d, f, d + 1, f - 1, new I(M.from(r.create(a, null, s.marks)), 0, 0), 1, !0)), c === !0 && uh(n, s, l, o), !1;
4691
+ return n.step(new ke(d, f, d + 1, f - 1, new I(M.from(r.create(a, null, s.marks)), 0, 0), 1, !0)), c === !0 && uh(n, s, l, o), !1;
4692
4692
  }
4693
4693
  });
4694
4694
  }
@@ -4726,7 +4726,7 @@ function l0(n, e, t, r, i) {
4726
4726
  return n.replaceWith(e, e + o.nodeSize, s);
4727
4727
  if (!t.validContent(o.content))
4728
4728
  throw new RangeError("Invalid content for node type " + t.name);
4729
- n.step(new Se(e, e + o.nodeSize, e + 1, e + o.nodeSize - 1, new I(M.from(s), 0, 0), 1, !0));
4729
+ n.step(new ke(e, e + o.nodeSize, e + 1, e + o.nodeSize - 1, new I(M.from(s), 0, 0), 1, !0));
4730
4730
  }
4731
4731
  function Qt(n, e, t = 1, r) {
4732
4732
  let i = n.resolve(e), o = i.depth - t, s = r && r[r.length - 1] || i.parent;
@@ -4752,7 +4752,7 @@ function a0(n, e, t = 1, r) {
4752
4752
  let u = r && r[c];
4753
4753
  s = M.from(u ? u.type.create(u.attrs, s) : i.node(l).copy(s));
4754
4754
  }
4755
- n.step(new ke(e, e, new I(o.append(s), t, t), !0));
4755
+ n.step(new Se(e, e, new I(o.append(s), t, t), !0));
4756
4756
  }
4757
4757
  function Nn(n, e) {
4758
4758
  let t = n.resolve(e), r = t.index();
@@ -4795,7 +4795,7 @@ function u0(n, e, t) {
4795
4795
  }
4796
4796
  s.inlineContent && Ba(n, e + t - 1, s, o.node().contentMatchAt(o.index()), r == null);
4797
4797
  let a = n.mapping.slice(l), c = a.map(e - t);
4798
- if (n.step(new ke(c, a.map(e + t, -1), I.empty, !0)), r === !0) {
4798
+ if (n.step(new Se(c, a.map(e + t, -1), I.empty, !0)), r === !0) {
4799
4799
  let u = n.doc.resolve(c);
4800
4800
  uh(n, u.node(), u.before(), n.steps.length);
4801
4801
  }
@@ -4848,7 +4848,7 @@ function Rs(n, e, t = e, r = I.empty) {
4848
4848
  if (e == t && !r.size)
4849
4849
  return null;
4850
4850
  let i = n.resolve(e), o = n.resolve(t);
4851
- return ph(i, o, r) ? new ke(e, t, r) : new f0(i, o, r).fit();
4851
+ return ph(i, o, r) ? new Se(e, t, r) : new f0(i, o, r).fit();
4852
4852
  }
4853
4853
  function ph(n, e, t) {
4854
4854
  return !t.openStart && !t.openEnd && n.start() == e.start() && n.parent.canReplace(n.index(), e.index(), t.content);
@@ -4881,7 +4881,7 @@ class f0 {
4881
4881
  for (; s && l && o.childCount == 1; )
4882
4882
  o = o.firstChild.content, s--, l--;
4883
4883
  let a = new I(o, s, l);
4884
- return e > -1 ? new Se(r.pos, e, this.$to.pos, this.$to.end(), a, t) : a.size || r.pos != this.$to.pos ? new ke(r.pos, i.pos, a) : null;
4884
+ return e > -1 ? new ke(r.pos, e, this.$to.pos, this.$to.end(), a, t) : a.size || r.pos != this.$to.pos ? new Se(r.pos, i.pos, a) : null;
4885
4885
  }
4886
4886
  // Find a position on the start spine of `this.unplaced` that has
4887
4887
  // content that can be moved somewhere on the frontier. Returns two
@@ -5038,7 +5038,7 @@ function m0(n, e, t, r) {
5038
5038
  return n.deleteRange(e, t);
5039
5039
  let i = n.doc.resolve(e), o = n.doc.resolve(t);
5040
5040
  if (ph(i, o, r))
5041
- return n.step(new ke(e, t, r));
5041
+ return n.step(new Se(e, t, r));
5042
5042
  let s = yh(i, o);
5043
5043
  s[s.length - 1] == 0 && s.pop();
5044
5044
  let l = -(i.depth + 1);
@@ -5832,7 +5832,7 @@ function Au(n, e, t) {
5832
5832
  if (r < e)
5833
5833
  return;
5834
5834
  let i = n.steps[r];
5835
- if (!(i instanceof ke || i instanceof Se))
5835
+ if (!(i instanceof Se || i instanceof ke))
5836
5836
  return;
5837
5837
  let o = n.mapping.maps[r], s;
5838
5838
  o.forEach((l, a, c, u) => {
@@ -6258,7 +6258,7 @@ function Ch(n, e) {
6258
6258
  let { $cursor: t } = n.selection;
6259
6259
  return !t || (e ? !e.endOfTextblock("backward", n) : t.parentOffset > 0) ? null : t;
6260
6260
  }
6261
- const kh = (n, e, t) => {
6261
+ const Sh = (n, e, t) => {
6262
6262
  let r = Ch(n, t);
6263
6263
  if (!r)
6264
6264
  return !1;
@@ -6289,15 +6289,15 @@ const kh = (n, e, t) => {
6289
6289
  if (!r)
6290
6290
  return !1;
6291
6291
  let i = Ha(r);
6292
- return i ? Sh(n, i, e) : !1;
6292
+ return i ? kh(n, i, e) : !1;
6293
6293
  }, C0 = (n, e, t) => {
6294
6294
  let r = Th(n, t);
6295
6295
  if (!r)
6296
6296
  return !1;
6297
6297
  let i = Va(r);
6298
- return i ? Sh(n, i, e) : !1;
6298
+ return i ? kh(n, i, e) : !1;
6299
6299
  };
6300
- function Sh(n, e, t) {
6300
+ function kh(n, e, t) {
6301
6301
  let r = e.nodeBefore, i = r, o = e.pos - 1;
6302
6302
  for (; !i.isTextblock; o--) {
6303
6303
  if (i.type.spec.isolating)
@@ -6317,7 +6317,7 @@ function Sh(n, e, t) {
6317
6317
  l = u;
6318
6318
  }
6319
6319
  let c = Rs(n.doc, o, a, I.empty);
6320
- if (!c || c.from != o || c instanceof ke && c.slice.size >= a - o)
6320
+ if (!c || c.from != o || c instanceof Se && c.slice.size >= a - o)
6321
6321
  return !1;
6322
6322
  if (t) {
6323
6323
  let u = n.tr.step(c);
@@ -6404,7 +6404,7 @@ function Va(n) {
6404
6404
  }
6405
6405
  return null;
6406
6406
  }
6407
- const k0 = (n, e) => {
6407
+ const S0 = (n, e) => {
6408
6408
  let t = n.selection, r = t instanceof z, i;
6409
6409
  if (r) {
6410
6410
  if (t.node.isTextblock || !Nn(n.doc, t.from))
@@ -6417,7 +6417,7 @@ const k0 = (n, e) => {
6417
6417
  r && o.setSelection(z.create(o.doc, i - n.doc.resolve(i).nodeBefore.nodeSize)), e(o.scrollIntoView());
6418
6418
  }
6419
6419
  return !0;
6420
- }, S0 = (n, e) => {
6420
+ }, k0 = (n, e) => {
6421
6421
  let t = n.selection, r;
6422
6422
  if (t instanceof z) {
6423
6423
  if (t.node.isTextblock || !Nn(n.doc, t.to))
@@ -6526,7 +6526,7 @@ function Ih(n, e, t, r) {
6526
6526
  for (let y = s.length - 1; y >= 0; y--)
6527
6527
  p = M.from(s[y].create(null, p));
6528
6528
  p = M.from(i.copy(p));
6529
- let m = n.tr.step(new Se(e.pos - 1, h, e.pos, h, new I(p, 1, 0), s.length, !0)), g = m.doc.resolve(h + 2 * s.length);
6529
+ let m = n.tr.step(new ke(e.pos - 1, h, e.pos, h, new I(p, 1, 0), s.length, !0)), g = m.doc.resolve(h + 2 * s.length);
6530
6530
  g.nodeAfter && g.nodeAfter.type == i.type && Nn(m.doc, g.pos) && m.join(g.pos), t(m.scrollIntoView());
6531
6531
  }
6532
6532
  return !0;
@@ -6546,7 +6546,7 @@ function Ih(n, e, t, r) {
6546
6546
  let y = M.empty;
6547
6547
  for (let w = p.length - 1; w >= 0; w--)
6548
6548
  y = M.from(p[w].copy(y));
6549
- let v = n.tr.step(new Se(e.pos - p.length, e.pos + o.nodeSize, e.pos + g, e.pos + o.nodeSize - g, new I(y, p.length, 0), 0, !0));
6549
+ let v = n.tr.step(new ke(e.pos - p.length, e.pos + o.nodeSize, e.pos + g, e.pos + o.nodeSize - g, new I(y, p.length, 0), 0, !0));
6550
6550
  t(v.scrollIntoView());
6551
6551
  }
6552
6552
  return !0;
@@ -6610,7 +6610,7 @@ function Wa(...n) {
6610
6610
  return !1;
6611
6611
  };
6612
6612
  }
6613
- Wa(Fa, kh, Eh);
6613
+ Wa(Fa, Sh, Eh);
6614
6614
  Wa(Fa, Mh, Ah);
6615
6615
  Wa(Oh, Nh, Rh, A0);
6616
6616
  typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os < "u" && os.platform && os.platform() == "darwin";
@@ -6638,7 +6638,7 @@ function _0(n, e, t, r, i) {
6638
6638
  let o = M.empty;
6639
6639
  for (let u = t.length - 1; u >= 0; u--)
6640
6640
  o = M.from(t[u].type.create(t[u].attrs, o));
6641
- n.step(new Se(e.start - (r ? 2 : 0), e.end, e.start, e.end, new I(o, 0, 0), t.length, !0));
6641
+ n.step(new ke(e.start - (r ? 2 : 0), e.end, e.start, e.end, new I(o, 0, 0), t.length, !0));
6642
6642
  let s = 0;
6643
6643
  for (let u = 0; u < t.length; u++)
6644
6644
  t[u].type == i && (s = u + 1);
@@ -6655,7 +6655,7 @@ function B0(n) {
6655
6655
  }
6656
6656
  function $0(n, e, t, r) {
6657
6657
  let i = n.tr, o = r.end, s = r.$to.end(r.depth);
6658
- o < s && (i.step(new Se(o - 1, s, o, s, new I(M.from(t.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new uo(i.doc.resolve(r.$from.pos), i.doc.resolve(s), r.depth));
6658
+ o < s && (i.step(new ke(o - 1, s, o, s, new I(M.from(t.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new uo(i.doc.resolve(r.$from.pos), i.doc.resolve(s), r.depth));
6659
6659
  const l = Nr(r);
6660
6660
  if (l == null)
6661
6661
  return !1;
@@ -6674,7 +6674,7 @@ function z0(n, e, t) {
6674
6674
  if (!c.canReplace(u + (l ? 0 : 1), u + 1, s.content.append(a ? M.empty : M.from(i))))
6675
6675
  return !1;
6676
6676
  let d = o.pos, f = d + s.nodeSize;
6677
- return r.step(new Se(d - (l ? 1 : 0), f + (a ? 1 : 0), d + 1, f - 1, new I((l ? M.empty : M.from(i.copy(M.empty))).append(a ? M.empty : M.from(i.copy(M.empty))), l ? 0 : 1, a ? 0 : 1), l ? 0 : 1)), e(r.scrollIntoView()), !0;
6677
+ return r.step(new ke(d - (l ? 1 : 0), f + (a ? 1 : 0), d + 1, f - 1, new I((l ? M.empty : M.from(i.copy(M.empty))).append(a ? M.empty : M.from(i.copy(M.empty))), l ? 0 : 1, a ? 0 : 1), l ? 0 : 1)), e(r.scrollIntoView()), !0;
6678
6678
  }
6679
6679
  function F0(n) {
6680
6680
  return function(e, t) {
@@ -6689,7 +6689,7 @@ function F0(n) {
6689
6689
  return !1;
6690
6690
  if (t) {
6691
6691
  let c = a.lastChild && a.lastChild.type == l.type, u = M.from(c ? n.create() : null), d = new I(M.from(n.create(null, M.from(l.type.create(null, u)))), c ? 3 : 1, 0), f = o.start, h = o.end;
6692
- t(e.tr.step(new Se(f - (c ? 3 : 1), h, f, h, d, 1, !0)).scrollIntoView());
6692
+ t(e.tr.step(new ke(f - (c ? 3 : 1), h, f, h, d, 1, !0)).scrollIntoView());
6693
6693
  }
6694
6694
  return !0;
6695
6695
  };
@@ -7586,7 +7586,7 @@ class Jn extends Mi {
7586
7586
  this.spec.destroy && this.spec.destroy(), super.destroy();
7587
7587
  }
7588
7588
  }
7589
- class kn extends Mi {
7589
+ class Sn extends Mi {
7590
7590
  constructor(e, t, r, i, o, s, l, a, c) {
7591
7591
  super(e, [], o, s), this.node = t, this.outerDeco = r, this.innerDeco = i, this.nodeDOM = l;
7592
7592
  }
@@ -7614,7 +7614,7 @@ class kn extends Mi {
7614
7614
  } else u || ({ dom: u, contentDOM: d } = nr.renderSpec(document, t.type.spec.toDOM(t), null, t.attrs));
7615
7615
  !d && !t.isText && u.nodeName != "BR" && (u.hasAttribute("contenteditable") || (u.contentEditable = "false"), t.type.spec.draggable && (u.draggable = !0));
7616
7616
  let f = u;
7617
- return u = qh(u, r, t), c ? a = new d1(e, t, r, i, u, d || null, f, c, o, s + 1) : t.isText ? new Ls(e, t, r, i, u, f, o) : new kn(e, t, r, i, u, d || null, f, o, s + 1);
7617
+ return u = qh(u, r, t), c ? a = new d1(e, t, r, i, u, d || null, f, c, o, s + 1) : t.isText ? new Ls(e, t, r, i, u, f, o) : new Sn(e, t, r, i, u, d || null, f, o, s + 1);
7618
7618
  }
7619
7619
  parseRule() {
7620
7620
  if (this.node.type.spec.reparseInView)
@@ -7714,10 +7714,10 @@ class kn extends Mi {
7714
7714
  }
7715
7715
  function Hu(n, e, t, r, i) {
7716
7716
  qh(r, e, n);
7717
- let o = new kn(void 0, n, e, t, r, r, r, i, 0);
7717
+ let o = new Sn(void 0, n, e, t, r, r, r, i, 0);
7718
7718
  return o.contentDOM && o.updateChildren(i, 0), o;
7719
7719
  }
7720
- class Ls extends kn {
7720
+ class Ls extends Sn {
7721
7721
  constructor(e, t, r, i, o, s, l) {
7722
7722
  super(e, t, r, i, o, null, s, l, 0);
7723
7723
  }
@@ -7774,7 +7774,7 @@ class Wh extends Mi {
7774
7774
  return this.dom.nodeName == "IMG";
7775
7775
  }
7776
7776
  }
7777
- class d1 extends kn {
7777
+ class d1 extends Sn {
7778
7778
  constructor(e, t, r, i, o, s, l, a, c, u) {
7779
7779
  super(e, t, r, i, o, s, l, c, u), this.spec = a;
7780
7780
  }
@@ -7986,7 +7986,7 @@ class h1 {
7986
7986
  updateNextNode(e, t, r, i, o, s) {
7987
7987
  for (let l = this.index; l < this.top.children.length; l++) {
7988
7988
  let a = this.top.children[l];
7989
- if (a instanceof kn) {
7989
+ if (a instanceof Sn) {
7990
7990
  let c = this.preMatch.matched.get(a);
7991
7991
  if (c != null && c != o)
7992
7992
  return !1;
@@ -8005,7 +8005,7 @@ class h1 {
8005
8005
  recreateWrapper(e, t, r, i, o, s) {
8006
8006
  if (e.dirty || t.isAtom || !e.children.length || !e.node.content.eq(t.content) || !ho(r, e.outerDeco) || !i.eq(e.innerDeco))
8007
8007
  return null;
8008
- let l = kn.create(this.top, t, r, i, o, s);
8008
+ let l = Sn.create(this.top, t, r, i, o, s);
8009
8009
  if (l.contentDOM) {
8010
8010
  l.children = e.children, e.children = [];
8011
8011
  for (let a of l.children)
@@ -8015,7 +8015,7 @@ class h1 {
8015
8015
  }
8016
8016
  // Insert the node as a newly created node desc.
8017
8017
  addNode(e, t, r, i, o) {
8018
- let s = kn.create(this.top, e, t, r, i, o);
8018
+ let s = Sn.create(this.top, e, t, r, i, o);
8019
8019
  s.contentDOM && s.updateChildren(i, o + 1), this.top.children.splice(this.index++, 0, s), this.changed = !0;
8020
8020
  }
8021
8021
  placeWidget(e, t, r) {
@@ -8336,7 +8336,7 @@ function Kr(n, e) {
8336
8336
  return t && t.size == 0 && (e < 0 || n.nextSibling || n.nodeName != "BR");
8337
8337
  }
8338
8338
  function or(n, e) {
8339
- return e < 0 ? C1(n) : k1(n);
8339
+ return e < 0 ? C1(n) : S1(n);
8340
8340
  }
8341
8341
  function C1(n) {
8342
8342
  let e = n.domSelectionRange(), t = e.focusNode, r = e.focusOffset;
@@ -8374,7 +8374,7 @@ function C1(n) {
8374
8374
  }
8375
8375
  s ? ra(n, t, r) : i && ra(n, i, o);
8376
8376
  }
8377
- function k1(n) {
8377
+ function S1(n) {
8378
8378
  let e = n.domSelectionRange(), t = e.focusNode, r = e.focusOffset;
8379
8379
  if (!t)
8380
8380
  return;
@@ -8410,7 +8410,7 @@ function Xh(n) {
8410
8410
  let e = n.pmViewDesc;
8411
8411
  return e && e.node && e.node.isBlock;
8412
8412
  }
8413
- function S1(n, e) {
8413
+ function k1(n, e) {
8414
8414
  for (; n && e == n.childNodes.length && !Ei(n); )
8415
8415
  e = Ae(n) + 1, n = n.parentNode;
8416
8416
  for (; n && e < n.childNodes.length; ) {
@@ -8437,7 +8437,7 @@ function E1(n, e) {
8437
8437
  function ra(n, e, t) {
8438
8438
  if (e.nodeType != 3) {
8439
8439
  let o, s;
8440
- (s = S1(e, t)) ? (e = s, t = 0) : (o = E1(e, t)) && (e = o, t = o.nodeValue.length);
8440
+ (s = k1(e, t)) ? (e = s, t = 0) : (o = E1(e, t)) && (e = o, t = o.nodeValue.length);
8441
8441
  }
8442
8442
  let r = n.domSelection();
8443
8443
  if (!r)
@@ -9204,7 +9204,7 @@ class go {
9204
9204
  this.spec.destroy && this.spec.destroy(e);
9205
9205
  }
9206
9206
  }
9207
- class Sn {
9207
+ class kn {
9208
9208
  constructor(e, t) {
9209
9209
  this.attrs = e, this.spec = t || Un;
9210
9210
  }
@@ -9216,10 +9216,10 @@ class Sn {
9216
9216
  return t.from < t.to;
9217
9217
  }
9218
9218
  eq(e) {
9219
- return this == e || e instanceof Sn && si(this.attrs, e.attrs) && si(this.spec, e.spec);
9219
+ return this == e || e instanceof kn && si(this.attrs, e.attrs) && si(this.spec, e.spec);
9220
9220
  }
9221
9221
  static is(e) {
9222
- return e.type instanceof Sn;
9222
+ return e.type instanceof kn;
9223
9223
  }
9224
9224
  destroy() {
9225
9225
  }
@@ -9286,7 +9286,7 @@ class He {
9286
9286
  each inline node between `from` and `to`.
9287
9287
  */
9288
9288
  static inline(e, t, r, i) {
9289
- return new He(e, t, new Sn(r, i));
9289
+ return new He(e, t, new kn(r, i));
9290
9290
  }
9291
9291
  /**
9292
9292
  Creates a node decoration. `from` and `to` should point precisely
@@ -9307,7 +9307,7 @@ class He {
9307
9307
  @internal
9308
9308
  */
9309
9309
  get inline() {
9310
- return this.type instanceof Sn;
9310
+ return this.type instanceof kn;
9311
9311
  }
9312
9312
  /**
9313
9313
  @internal
@@ -9438,7 +9438,7 @@ class fe {
9438
9438
  let o = e + 1, s = o + t.content.size;
9439
9439
  for (let l = 0; l < this.local.length; l++) {
9440
9440
  let a = this.local[l];
9441
- if (a.from < s && a.to > o && a.type instanceof Sn) {
9441
+ if (a.from < s && a.to > o && a.type instanceof kn) {
9442
9442
  let c = Math.max(o, a.from) - o, u = Math.min(s, a.to) - o;
9443
9443
  c < u && (i || (i = [])).push(a.copy(c, u));
9444
9444
  }
@@ -9477,11 +9477,11 @@ class fe {
9477
9477
  localsInner(e) {
9478
9478
  if (this == Pe)
9479
9479
  return lr;
9480
- if (e.inlineContent || !this.local.some(Sn.is))
9480
+ if (e.inlineContent || !this.local.some(kn.is))
9481
9481
  return this.local;
9482
9482
  let t = [];
9483
9483
  for (let r = 0; r < this.local.length; r++)
9484
- this.local[r].type instanceof Sn || t.push(this.local[r]);
9484
+ this.local[r].type instanceof kn || t.push(this.local[r]);
9485
9485
  return t;
9486
9486
  }
9487
9487
  forEachSet(e) {
@@ -9953,12 +9953,12 @@ const gb = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|df
9953
9953
  function yb(n, e, t, r, i) {
9954
9954
  let o = n.input.compositionPendingChanges || (n.composing ? n.input.compositionID : 0);
9955
9955
  if (n.input.compositionPendingChanges = 0, e < 0) {
9956
- let k = n.input.lastSelectionTime > Date.now() - 50 ? n.input.lastSelectionOrigin : null, N = Ka(n, k);
9956
+ let S = n.input.lastSelectionTime > Date.now() - 50 ? n.input.lastSelectionOrigin : null, N = Ka(n, S);
9957
9957
  if (N && !n.state.selection.eq(N)) {
9958
9958
  if (Ne && Yt && n.input.lastKeyCode === 13 && Date.now() - 100 < n.input.lastKeyCodeTime && n.someProp("handleKeyDown", (L) => L(n, Bn(13, "Enter"))))
9959
9959
  return;
9960
9960
  let _ = n.state.tr.setSelection(N);
9961
- k == "pointer" ? _.setMeta("pointer", !0) : k == "key" && _.scrollIntoView(), o && _.setMeta("composition", o), n.dispatch(_);
9961
+ S == "pointer" ? _.setMeta("pointer", !0) : S == "key" && _.scrollIntoView(), o && _.setMeta("composition", o), n.dispatch(_);
9962
9962
  }
9963
9963
  return;
9964
9964
  }
@@ -9967,7 +9967,7 @@ function yb(n, e, t, r, i) {
9967
9967
  let a = n.state.selection, c = pb(n, e, t), u = n.state.doc, d = u.slice(c.from, c.to), f, h;
9968
9968
  n.input.lastKeyCode === 8 && Date.now() - 100 < n.input.lastKeyCodeTime ? (f = n.state.selection.to, h = "end") : (f = n.state.selection.from, h = "start"), n.input.lastKeyCode = null;
9969
9969
  let p = wb(d.content, c.doc.content, c.from, f, h);
9970
- if (p && n.input.domChangeCount++, (xr && n.input.lastIOSEnter > Date.now() - 225 || Yt) && i.some((k) => k.nodeType == 1 && !gb.test(k.nodeName)) && (!p || p.endA >= p.endB) && n.someProp("handleKeyDown", (k) => k(n, Bn(13, "Enter")))) {
9970
+ if (p && n.input.domChangeCount++, (xr && n.input.lastIOSEnter > Date.now() - 225 || Yt) && i.some((S) => S.nodeType == 1 && !gb.test(S.nodeName)) && (!p || p.endA >= p.endB) && n.someProp("handleKeyDown", (S) => S(n, Bn(13, "Enter")))) {
9971
9971
  n.input.lastIOSEnter = 0;
9972
9972
  return;
9973
9973
  }
@@ -9976,9 +9976,9 @@ function yb(n, e, t, r, i) {
9976
9976
  p = { start: a.from, endA: a.to, endB: a.to };
9977
9977
  else {
9978
9978
  if (c.sel) {
9979
- let k = od(n, n.state.doc, c.sel);
9980
- if (k && !k.eq(n.state.selection)) {
9981
- let N = n.state.tr.setSelection(k);
9979
+ let S = od(n, n.state.doc, c.sel);
9980
+ if (S && !S.eq(n.state.selection)) {
9981
+ let N = n.state.tr.setSelection(S);
9982
9982
  o && N.setMeta("composition", o), n.dispatch(N);
9983
9983
  }
9984
9984
  }
@@ -9986,41 +9986,41 @@ function yb(n, e, t, r, i) {
9986
9986
  }
9987
9987
  n.state.selection.from < n.state.selection.to && p.start == p.endB && n.state.selection instanceof U && (p.start > n.state.selection.from && p.start <= n.state.selection.from + 2 && n.state.selection.from >= c.from ? p.start = n.state.selection.from : p.endA < n.state.selection.to && p.endA >= n.state.selection.to - 2 && n.state.selection.to <= c.to && (p.endB += n.state.selection.to - p.endA, p.endA = n.state.selection.to)), je && Cn <= 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--);
9988
9988
  let m = c.doc.resolveNoCache(p.start - c.from), g = c.doc.resolveNoCache(p.endB - c.from), y = u.resolve(p.start), v = m.sameParent(g) && m.parent.inlineContent && y.end() >= p.endA;
9989
- if ((xr && n.input.lastIOSEnter > Date.now() - 225 && (!v || i.some((k) => k.nodeName == "DIV" || k.nodeName == "P")) || !v && m.pos < c.doc.content.size && (!m.sameParent(g) || !m.parent.inlineContent) && m.pos < g.pos && !/\S/.test(c.doc.textBetween(m.pos, g.pos, "", ""))) && n.someProp("handleKeyDown", (k) => k(n, Bn(13, "Enter")))) {
9989
+ if ((xr && n.input.lastIOSEnter > Date.now() - 225 && (!v || i.some((S) => S.nodeName == "DIV" || S.nodeName == "P")) || !v && m.pos < c.doc.content.size && (!m.sameParent(g) || !m.parent.inlineContent) && m.pos < g.pos && !/\S/.test(c.doc.textBetween(m.pos, g.pos, "", ""))) && n.someProp("handleKeyDown", (S) => S(n, Bn(13, "Enter")))) {
9990
9990
  n.input.lastIOSEnter = 0;
9991
9991
  return;
9992
9992
  }
9993
- if (n.state.selection.anchor > p.start && vb(u, p.start, p.endA, m, g) && n.someProp("handleKeyDown", (k) => k(n, Bn(8, "Backspace")))) {
9993
+ if (n.state.selection.anchor > p.start && vb(u, p.start, p.endA, m, g) && n.someProp("handleKeyDown", (S) => S(n, Bn(8, "Backspace")))) {
9994
9994
  Yt && Ne && n.domObserver.suppressSelectionUpdates();
9995
9995
  return;
9996
9996
  }
9997
9997
  Ne && p.endB == p.start && (n.input.lastChromeDelete = Date.now()), Yt && !v && m.start() != g.start() && g.parentOffset == 0 && m.depth == g.depth && c.sel && c.sel.anchor == c.sel.head && c.sel.head == p.endA && (p.endB -= 2, g = c.doc.resolveNoCache(p.endB - c.from), setTimeout(() => {
9998
- n.someProp("handleKeyDown", function(k) {
9999
- return k(n, Bn(13, "Enter"));
9998
+ n.someProp("handleKeyDown", function(S) {
9999
+ return S(n, Bn(13, "Enter"));
10000
10000
  });
10001
10001
  }, 20));
10002
- let w = p.start, x = p.endA, C = (k) => {
10003
- let N = k || n.state.tr.replace(w, x, c.doc.slice(p.start - c.from, p.endB - c.from));
10002
+ let w = p.start, x = p.endA, C = (S) => {
10003
+ let N = S || n.state.tr.replace(w, x, c.doc.slice(p.start - c.from, p.endB - c.from));
10004
10004
  if (c.sel) {
10005
10005
  let _ = od(n, N.doc, c.sel);
10006
10006
  _ && !(Ne && n.composing && _.empty && (p.start != p.endB || n.input.lastChromeDelete < Date.now() - 100) && (_.head == w || _.head == N.mapping.map(x) - 1) || je && _.empty && _.head == w) && N.setSelection(_);
10007
10007
  }
10008
10008
  return o && N.setMeta("composition", o), N.scrollIntoView();
10009
- }, S;
10009
+ }, k;
10010
10010
  if (v)
10011
10011
  if (m.pos == g.pos) {
10012
10012
  je && Cn <= 11 && m.parentOffset == 0 && (n.domObserver.suppressSelectionUpdates(), setTimeout(() => en(n), 20));
10013
- let k = C(n.state.tr.delete(w, x)), N = u.resolve(p.start).marksAcross(u.resolve(p.endA));
10014
- N && k.ensureMarks(N), n.dispatch(k);
10013
+ let S = C(n.state.tr.delete(w, x)), N = u.resolve(p.start).marksAcross(u.resolve(p.endA));
10014
+ N && S.ensureMarks(N), n.dispatch(S);
10015
10015
  } else if (
10016
10016
  // Adding or removing a mark
10017
- p.endA == p.endB && (S = bb(m.parent.content.cut(m.parentOffset, g.parentOffset), y.parent.content.cut(y.parentOffset, p.endA - y.start())))
10017
+ p.endA == p.endB && (k = bb(m.parent.content.cut(m.parentOffset, g.parentOffset), y.parent.content.cut(y.parentOffset, p.endA - y.start())))
10018
10018
  ) {
10019
- let k = C(n.state.tr);
10020
- S.type == "add" ? k.addMark(w, x, S.mark) : k.removeMark(w, x, S.mark), n.dispatch(k);
10019
+ let S = C(n.state.tr);
10020
+ k.type == "add" ? S.addMark(w, x, k.mark) : S.removeMark(w, x, k.mark), n.dispatch(S);
10021
10021
  } else if (m.parent.child(m.index()).isText && m.index() == g.index() - (g.textOffset ? 0 : 1)) {
10022
- let k = m.parent.textBetween(m.parentOffset, g.parentOffset), N = () => C(n.state.tr.insertText(k, w, x));
10023
- n.someProp("handleTextInput", (_) => _(n, w, x, k, N)) || n.dispatch(N());
10022
+ let S = m.parent.textBetween(m.parentOffset, g.parentOffset), N = () => C(n.state.tr.insertText(S, w, x));
10023
+ n.someProp("handleTextInput", (_) => _(n, w, x, S, N)) || n.dispatch(N());
10024
10024
  } else
10025
10025
  n.dispatch(C());
10026
10026
  else
@@ -10558,14 +10558,14 @@ var Mn = {
10558
10558
  220: "|",
10559
10559
  221: "}",
10560
10560
  222: '"'
10561
- }, kb = typeof navigator < "u" && /Mac/.test(navigator.platform), Sb = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
10561
+ }, Sb = typeof navigator < "u" && /Mac/.test(navigator.platform), kb = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
10562
10562
  for (var Oe = 0; Oe < 10; Oe++) Mn[48 + Oe] = Mn[96 + Oe] = String(Oe);
10563
10563
  for (var Oe = 1; Oe <= 24; Oe++) Mn[Oe + 111] = "F" + Oe;
10564
10564
  for (var Oe = 65; Oe <= 90; Oe++)
10565
10565
  Mn[Oe] = String.fromCharCode(Oe + 32), bo[Oe] = String.fromCharCode(Oe);
10566
10566
  for (var hl in Mn) bo.hasOwnProperty(hl) || (bo[hl] = Mn[hl]);
10567
10567
  function Eb(n) {
10568
- var e = kb && n.metaKey && n.shiftKey && !n.ctrlKey && !n.altKey || Sb && n.shiftKey && n.key && n.key.length == 1 || n.key == "Unidentified", t = !e && n.key || (n.shiftKey ? bo : Mn)[n.keyCode] || n.key || "Unidentified";
10568
+ var e = Sb && n.metaKey && n.shiftKey && !n.ctrlKey && !n.altKey || kb && n.shiftKey && n.key && n.key.length == 1 || n.key == "Unidentified", t = !e && n.key || (n.shiftKey ? bo : Mn)[n.keyCode] || n.key || "Unidentified";
10569
10569
  return t == "Esc" && (t = "Escape"), t == "Del" && (t = "Delete"), t == "Left" && (t = "ArrowLeft"), t == "Up" && (t = "ArrowUp"), t == "Right" && (t = "ArrowRight"), t == "Down" && (t = "ArrowDown"), t;
10570
10570
  }
10571
10571
  const Tb = typeof navigator < "u" && /Mac|iP(hone|[oa]d)/.test(navigator.platform), Mb = typeof navigator < "u" && /Win/.test(navigator.platform);
@@ -11022,7 +11022,7 @@ function Yb(n, e, t) {
11022
11022
  if (r < e)
11023
11023
  return;
11024
11024
  const i = n.steps[r];
11025
- if (!(i instanceof ke || i instanceof Se))
11025
+ if (!(i instanceof Se || i instanceof ke))
11026
11026
  return;
11027
11027
  const o = n.mapping.maps[r];
11028
11028
  let s = 0;
@@ -11096,7 +11096,7 @@ var Xb = (n) => !("type" in n), Zb = (n, e, t) => ({ tr: r, dispatch: i, editor:
11096
11096
  t.updateSelection && Yb(r, r.steps.length - 1, -1), t.applyInputRules && r.setMeta("applyInputRules", { from: u, text: m }), t.applyPasteRules && r.setMeta("applyPasteRules", { from: u, text: m });
11097
11097
  }
11098
11098
  return !0;
11099
- }, Qb = () => ({ state: n, dispatch: e }) => k0(n, e), ev = () => ({ state: n, dispatch: e }) => S0(n, e), tv = () => ({ state: n, dispatch: e }) => kh(n, e), nv = () => ({ state: n, dispatch: e }) => Mh(n, e), rv = () => ({ state: n, dispatch: e, tr: t }) => {
11099
+ }, Qb = () => ({ state: n, dispatch: e }) => S0(n, e), ev = () => ({ state: n, dispatch: e }) => k0(n, e), tv = () => ({ state: n, dispatch: e }) => Sh(n, e), nv = () => ({ state: n, dispatch: e }) => Mh(n, e), rv = () => ({ state: n, dispatch: e, tr: t }) => {
11100
11100
  try {
11101
11101
  const r = Ns(n.doc, n.selection.$from.pos, -1);
11102
11102
  return r == null ? !1 : (t.join(r, 2), e && e(t), !0);
@@ -11250,7 +11250,7 @@ function Cv(n) {
11250
11250
  }
11251
11251
  return null;
11252
11252
  }
11253
- function kv(n, e, t) {
11253
+ function Sv(n, e, t) {
11254
11254
  const r = [];
11255
11255
  return n.nodesBetween(e.from, e.to, (i, o) => {
11256
11256
  t(i) && r.push({
@@ -11259,7 +11259,7 @@ function kv(n, e, t) {
11259
11259
  });
11260
11260
  }), r;
11261
11261
  }
11262
- function Sv(n, e) {
11262
+ function kv(n, e) {
11263
11263
  for (let t = n.depth; t > 0; t -= 1) {
11264
11264
  const r = n.node(t);
11265
11265
  if (e(r))
@@ -11272,7 +11272,7 @@ function Sv(n, e) {
11272
11272
  }
11273
11273
  }
11274
11274
  function zs(n) {
11275
- return (e) => Sv(e.$from, n);
11275
+ return (e) => kv(e.$from, n);
11276
11276
  }
11277
11277
  function $(n, e, t) {
11278
11278
  return n.config[e] === void 0 && n.parent ? $(n.parent, e, t) : typeof n.config[e] == "function" ? n.config[e].bind({
@@ -11311,7 +11311,7 @@ function Cr(n) {
11311
11311
  markExtensions: r
11312
11312
  };
11313
11313
  }
11314
- function kp(n) {
11314
+ function Sp(n) {
11315
11315
  const e = [], { nodeExtensions: t, markExtensions: r } = Cr(n), i = [...t, ...r], o = {
11316
11316
  default: null,
11317
11317
  validate: void 0,
@@ -11374,7 +11374,7 @@ function kp(n) {
11374
11374
  });
11375
11375
  }), e;
11376
11376
  }
11377
- function ge(...n) {
11377
+ function ye(...n) {
11378
11378
  return n.filter((e) => !!e).reduce((e, t) => {
11379
11379
  const r = { ...e };
11380
11380
  return Object.entries(t).forEach(([i, o]) => {
@@ -11402,7 +11402,7 @@ function ge(...n) {
11402
11402
  function ai(n, e) {
11403
11403
  return e.filter((t) => t.type === n.type.name).filter((t) => t.attribute.rendered).map((t) => t.attribute.renderHTML ? t.attribute.renderHTML(n.attrs) || {} : {
11404
11404
  [t.name]: n.attrs[t.name]
11405
- }).reduce((t, r) => ge(t, r), {});
11405
+ }).reduce((t, r) => ye(t, r), {});
11406
11406
  }
11407
11407
  function Tv(n) {
11408
11408
  return typeof n != "string" ? n : n.match(/^[+-]?(?:\d*\.)?\d+$/) ? Number(n) : n === "true" ? !0 : n === "false" ? !1 : n;
@@ -11438,7 +11438,7 @@ function yd(n) {
11438
11438
  }
11439
11439
  function Mv(n, e) {
11440
11440
  var t;
11441
- const r = kp(n), { nodeExtensions: i, markExtensions: o } = Cr(n), s = (t = i.find((c) => $(c, "topNode"))) == null ? void 0 : t.name, l = Object.fromEntries(
11441
+ const r = Sp(n), { nodeExtensions: i, markExtensions: o } = Cr(n), s = (t = i.find((c) => $(c, "topNode"))) == null ? void 0 : t.name, l = Object.fromEntries(
11442
11442
  i.map((c) => {
11443
11443
  const u = r.filter((y) => y.type === c.name), d = {
11444
11444
  name: c.name,
@@ -11528,7 +11528,7 @@ function xo(n) {
11528
11528
  return i > o ? -1 : i < o ? 1 : 0;
11529
11529
  });
11530
11530
  }
11531
- function Sp(n) {
11531
+ function kp(n) {
11532
11532
  const e = xo(oc(n)), t = Av(e.map((r) => r.name));
11533
11533
  return t.length && console.warn(
11534
11534
  `[tiptap warn]: Duplicate extension names found: [${t.map((r) => `'${r}'`).join(", ")}]. This can lead to issues.`
@@ -11943,14 +11943,14 @@ var qv = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
11943
11943
  ...e
11944
11944
  }, C = ((s = l.contentMatch.defaultType) == null ? void 0 : s.createAndFill(x)) || void 0;
11945
11945
  y = y.append(M.from(l.createAndFill(null, C) || void 0));
11946
- const S = a.before(a.depth - (v - 1));
11947
- t.replace(S, a.after(-w), new I(y, 4 - v, 0));
11948
- let k = -1;
11949
- t.doc.nodesBetween(S, t.doc.content.size, (N, _) => {
11950
- if (k > -1)
11946
+ const k = a.before(a.depth - (v - 1));
11947
+ t.replace(k, a.after(-w), new I(y, 4 - v, 0));
11948
+ let S = -1;
11949
+ t.doc.nodesBetween(k, t.doc.content.size, (N, _) => {
11950
+ if (S > -1)
11951
11951
  return !1;
11952
- N.isTextblock && N.content.size === 0 && (k = _ + 1);
11953
- }), k > -1 && t.setSelection(U.near(t.doc.resolve(k))), t.scrollIntoView();
11952
+ N.isTextblock && N.content.size === 0 && (S = _ + 1);
11953
+ }), S > -1 && t.setSelection(U.near(t.doc.resolve(S))), t.scrollIntoView();
11954
11954
  }
11955
11955
  return !0;
11956
11956
  }
@@ -11972,7 +11972,7 @@ var qv = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
11972
11972
  const { selection: y, storedMarks: v } = r, { splittableMarks: w } = o.extensionManager, x = v || y.$to.parentOffset && y.$from.marks();
11973
11973
  if (t.split(a.pos, 2, g).scrollIntoView(), !x || !i)
11974
11974
  return !0;
11975
- const C = x.filter((S) => w.includes(S.type.name));
11975
+ const C = x.filter((k) => w.includes(k.type.name));
11976
11976
  t.ensureMarks(C);
11977
11977
  }
11978
11978
  return !0;
@@ -11998,7 +11998,7 @@ var qv = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
11998
11998
  const { extensions: d, splittableMarks: f } = i.extensionManager, h = we(n, s.schema), p = we(e, s.schema), { selection: m, storedMarks: g } = s, { $from: y, $to: v } = m, w = y.blockRange(v), x = g || m.$to.parentOffset && m.$from.marks();
11999
11999
  if (!w)
12000
12000
  return !1;
12001
- const C = zs((S) => vd(S.type.name, d))(m);
12001
+ const C = zs((k) => vd(k.type.name, d))(m);
12002
12002
  if (w.depth >= 1 && C && w.depth - C.depth <= 1) {
12003
12003
  if (C.node.type === h)
12004
12004
  return c.liftListItem(p);
@@ -12006,8 +12006,8 @@ var qv = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
12006
12006
  return a().command(() => (o.setNodeMarkup(C.pos, h), !0)).command(() => ml(o, h)).command(() => gl(o, h)).run();
12007
12007
  }
12008
12008
  return !t || !x || !l ? a().command(() => u().wrapInList(h, r) ? !0 : c.clearNodes()).wrapInList(h, r).command(() => ml(o, h)).command(() => gl(o, h)).run() : a().command(() => {
12009
- const S = u().wrapInList(h, r), k = x.filter((N) => f.includes(N.type.name));
12010
- return o.ensureMarks(k), S ? !0 : c.clearNodes();
12009
+ const k = u().wrapInList(h, r), S = x.filter((N) => f.includes(N.type.name));
12010
+ return o.ensureMarks(S), k ? !0 : c.clearNodes();
12011
12011
  }).wrapInList(h, r).command(() => ml(o, h)).command(() => gl(o, h)).run();
12012
12012
  }, Yv = (n, e = {}, t = {}) => ({ state: r, commands: i }) => {
12013
12013
  const { extendEmptyMarkRange: o = !1 } = t, s = on(n, r.schema);
@@ -12380,11 +12380,11 @@ function hw(n) {
12380
12380
  var m, g, y, v, w;
12381
12381
  if ((g = (m = h.type) == null ? void 0 : m.spec) != null && g.code || !(h.isText || h.isTextblock || h.isInline))
12382
12382
  return;
12383
- const x = (w = (v = (y = h.content) == null ? void 0 : y.size) != null ? v : h.nodeSize) != null ? w : 0, C = Math.max(r, p), S = Math.min(i, p + x);
12384
- if (C >= S)
12383
+ const x = (w = (v = (y = h.content) == null ? void 0 : y.size) != null ? v : h.nodeSize) != null ? w : 0, C = Math.max(r, p), k = Math.min(i, p + x);
12384
+ if (C >= k)
12385
12385
  return;
12386
- const k = h.isText ? h.text || "" : h.textBetween(C - p, S - p, void 0, "");
12387
- fw(k, o.find, s).forEach((_) => {
12386
+ const S = h.isText ? h.text || "" : h.textBetween(C - p, k - p, void 0, "");
12387
+ fw(S, o.find, s).forEach((_) => {
12388
12388
  if (_.index === void 0)
12389
12389
  return;
12390
12390
  const L = C + _.index + 1, j = L + _[0].length, J = {
@@ -12488,12 +12488,12 @@ function mw(n) {
12488
12488
  if (v) {
12489
12489
  let { text: C } = y;
12490
12490
  typeof C == "string" ? C = C : C = sc(M.from(C), h.schema);
12491
- const { from: S } = y, k = S + C.length, N = pw(C);
12491
+ const { from: k } = y, S = k + C.length, N = pw(C);
12492
12492
  return a({
12493
12493
  rule: u,
12494
12494
  state: h,
12495
- from: S,
12496
- to: { b: k },
12495
+ from: k,
12496
+ to: { b: S },
12497
12497
  pasteEvt: N
12498
12498
  });
12499
12499
  }
@@ -12511,7 +12511,7 @@ function mw(n) {
12511
12511
  }
12512
12512
  var Vs = class {
12513
12513
  constructor(n, e) {
12514
- this.splittableMarks = [], this.editor = e, this.baseExtensions = n, this.extensions = Sp(n), this.schema = Mv(this.extensions, e), this.setupExtensions();
12514
+ this.splittableMarks = [], this.editor = e, this.baseExtensions = n, this.extensions = kp(n), this.schema = Mv(this.extensions, e), this.setupExtensions();
12515
12515
  }
12516
12516
  /**
12517
12517
  * Get all commands from the extensions.
@@ -12595,7 +12595,7 @@ var Vs = class {
12595
12595
  * @returns An array of attributes
12596
12596
  */
12597
12597
  get attributes() {
12598
- return kp(this.extensions);
12598
+ return Sp(this.extensions);
12599
12599
  }
12600
12600
  /**
12601
12601
  * Get all node views from the extensions.
@@ -12720,7 +12720,7 @@ var Vs = class {
12720
12720
  });
12721
12721
  }
12722
12722
  };
12723
- Vs.resolve = Sp;
12723
+ Vs.resolve = kp;
12724
12724
  Vs.sort = xo;
12725
12725
  Vs.flatten = oc;
12726
12726
  var gw = {};
@@ -12818,7 +12818,7 @@ var ne = class Pp extends cc {
12818
12818
  u.steps.forEach((h, p) => {
12819
12819
  var m, g;
12820
12820
  if (h instanceof wt) {
12821
- const y = f.slice(p).map(h.from, -1), v = f.slice(p).map(h.to), w = f.invert().map(y, -1), x = f.invert().map(v), C = (m = u.doc.nodeAt(y - 1)) == null ? void 0 : m.marks.some((k) => k.eq(h.mark)), S = (g = u.doc.nodeAt(v)) == null ? void 0 : g.marks.some((k) => k.eq(h.mark));
12821
+ const y = f.slice(p).map(h.from, -1), v = f.slice(p).map(h.to), w = f.invert().map(y, -1), x = f.invert().map(v), C = (m = u.doc.nodeAt(y - 1)) == null ? void 0 : m.marks.some((S) => S.eq(h.mark)), k = (g = u.doc.nodeAt(v)) == null ? void 0 : g.marks.some((S) => S.eq(h.mark));
12822
12822
  this.editor.emit("delete", {
12823
12823
  type: "mark",
12824
12824
  mark: h.mark,
@@ -12832,7 +12832,7 @@ var ne = class Pp extends cc {
12832
12832
  from: y,
12833
12833
  to: v
12834
12834
  },
12835
- partial: !!(S || C),
12835
+ partial: !!(k || C),
12836
12836
  editor: this.editor,
12837
12837
  transaction: n,
12838
12838
  combinedTransform: u
@@ -13734,7 +13734,7 @@ function aa(n) {
13734
13734
  undoable: n.undoable
13735
13735
  });
13736
13736
  }
13737
- function kr(n) {
13737
+ function Sr(n) {
13738
13738
  return new Hs({
13739
13739
  find: n.find,
13740
13740
  handler: ({ state: e, range: t, match: r, chain: i }) => {
@@ -13773,9 +13773,9 @@ function Cw(n, e) {
13773
13773
  }
13774
13774
  return !1;
13775
13775
  }
13776
- var kw = {};
13777
- tc(kw, {
13778
- createAtomBlockMarkdownSpec: () => Sw,
13776
+ var Sw = {};
13777
+ tc(Sw, {
13778
+ createAtomBlockMarkdownSpec: () => kw,
13779
13779
  createBlockMarkdownSpec: () => Ew,
13780
13780
  createInlineMarkdownSpec: () => Aw,
13781
13781
  parseAttributes: () => uc,
@@ -13812,7 +13812,7 @@ function dc(n) {
13812
13812
  t === "class" || t === "id" || (r === !0 ? e.push(t) : r !== !1 && r != null && e.push(`${t}="${String(r)}"`));
13813
13813
  }), e.join(" ");
13814
13814
  }
13815
- function Sw(n) {
13815
+ function kw(n) {
13816
13816
  const {
13817
13817
  nodeName: e,
13818
13818
  name: t,
@@ -13905,10 +13905,10 @@ function Ew(n) {
13905
13905
  const [y, v = ""] = g, w = i(v);
13906
13906
  let x = 1;
13907
13907
  const C = y.length;
13908
- let S = "";
13909
- const k = /^:::([\w-]*)(\s.*)?/gm, N = d.slice(C);
13910
- for (k.lastIndex = 0; ; ) {
13911
- const _ = k.exec(N);
13908
+ let k = "";
13909
+ const S = /^:::([\w-]*)(\s.*)?/gm, N = d.slice(C);
13910
+ for (S.lastIndex = 0; ; ) {
13911
+ const _ = S.exec(N);
13912
13912
  if (_ === null)
13913
13913
  break;
13914
13914
  const L = _.index, j = _[1];
@@ -13917,10 +13917,10 @@ function Ew(n) {
13917
13917
  x += 1;
13918
13918
  else if (x -= 1, x === 0) {
13919
13919
  const J = N.slice(0, L);
13920
- S = J.trim();
13920
+ k = J.trim();
13921
13921
  const K = d.slice(0, C + L + _[0].length);
13922
13922
  let R = [];
13923
- if (S)
13923
+ if (k)
13924
13924
  if (l === "block")
13925
13925
  for (R = h.blockTokens(J), R.forEach((B) => {
13926
13926
  B.text && (!B.tokens || B.tokens.length === 0) && (B.tokens = h.inlineTokens(B.text));
@@ -13932,12 +13932,12 @@ function Ew(n) {
13932
13932
  break;
13933
13933
  }
13934
13934
  else
13935
- R = h.inlineTokens(S);
13935
+ R = h.inlineTokens(k);
13936
13936
  return {
13937
13937
  type: e,
13938
13938
  raw: K,
13939
13939
  attributes: w,
13940
- content: S,
13940
+ content: k,
13941
13941
  tokens: R
13942
13942
  };
13943
13943
  }
@@ -14064,10 +14064,10 @@ function ca(n, e, t) {
14064
14064
  for (u += 1; u < l.length; ) {
14065
14065
  const C = l[u];
14066
14066
  if (C.trim() === "") {
14067
- const k = l.slice(u + 1).findIndex((L) => L.trim() !== "");
14068
- if (k === -1)
14067
+ const S = l.slice(u + 1).findIndex((L) => L.trim() !== "");
14068
+ if (S === -1)
14069
14069
  break;
14070
- if ((((i = (r = l[u + 1 + k].match(/^(\s*)/)) == null ? void 0 : r[1]) == null ? void 0 : i.length) || 0) > m) {
14070
+ if ((((i = (r = l[u + 1 + S].match(/^(\s*)/)) == null ? void 0 : r[1]) == null ? void 0 : i.length) || 0) > m) {
14071
14071
  y.push(C), c = `${c}${C}
14072
14072
  `, u += 1;
14073
14073
  continue;
@@ -14083,7 +14083,7 @@ function ca(n, e, t) {
14083
14083
  let v;
14084
14084
  const w = y.slice(1);
14085
14085
  if (w.length > 0) {
14086
- const C = w.map((S) => S.slice(m + d)).join(`
14086
+ const C = w.map((k) => k.slice(m + d)).join(`
14087
14087
  `);
14088
14088
  C.trim() && (e.customNestedParser ? v = e.customNestedParser(C) : v = t.blockTokens(C));
14089
14089
  }
@@ -14195,7 +14195,7 @@ var Co = (n, e) => {
14195
14195
  return [{ tag: "blockquote" }];
14196
14196
  },
14197
14197
  renderHTML({ HTMLAttributes: n }) {
14198
- return /* @__PURE__ */ Co("blockquote", { ...ge(this.options.HTMLAttributes, n), children: /* @__PURE__ */ Co("slot", {}) });
14198
+ return /* @__PURE__ */ Co("blockquote", { ...ye(this.options.HTMLAttributes, n), children: /* @__PURE__ */ Co("slot", {}) });
14199
14199
  },
14200
14200
  parseMarkdown: (n, e) => e.createNode("blockquote", void 0, e.parseChildren(n.tokens || [])),
14201
14201
  renderMarkdown: (n, e) => {
@@ -14225,7 +14225,7 @@ ${t}
14225
14225
  },
14226
14226
  addInputRules() {
14227
14227
  return [
14228
- kr({
14228
+ Sr({
14229
14229
  find: Nw,
14230
14230
  type: this.type
14231
14231
  })
@@ -14258,7 +14258,7 @@ ${t}
14258
14258
  ];
14259
14259
  },
14260
14260
  renderHTML({ HTMLAttributes: n }) {
14261
- return /* @__PURE__ */ Co("strong", { ...ge(this.options.HTMLAttributes, n), children: /* @__PURE__ */ Co("slot", {}) });
14261
+ return /* @__PURE__ */ Co("strong", { ...ye(this.options.HTMLAttributes, n), children: /* @__PURE__ */ Co("slot", {}) });
14262
14262
  },
14263
14263
  markdownTokenName: "strong",
14264
14264
  parseMarkdown: (n, e) => e.applyMark("bold", e.parseInline(n.tokens || [])),
@@ -14314,7 +14314,7 @@ ${t}
14314
14314
  return [{ tag: "code" }];
14315
14315
  },
14316
14316
  renderHTML({ HTMLAttributes: n }) {
14317
- return ["code", ge(this.options.HTMLAttributes, n), 0];
14317
+ return ["code", ye(this.options.HTMLAttributes, n), 0];
14318
14318
  },
14319
14319
  markdownTokenName: "codespan",
14320
14320
  parseMarkdown: (n, e) => e.applyMark("code", [{ type: "text", text: n.text || "" }]),
@@ -14392,7 +14392,7 @@ ${t}
14392
14392
  renderHTML({ node: n, HTMLAttributes: e }) {
14393
14393
  return [
14394
14394
  "pre",
14395
- ge(this.options.HTMLAttributes, e),
14395
+ ye(this.options.HTMLAttributes, e),
14396
14396
  [
14397
14397
  "code",
14398
14398
  {
@@ -14466,19 +14466,19 @@ ${t}
14466
14466
  `);
14467
14467
  let p = 0, m = 0;
14468
14468
  const g = c - u;
14469
- for (let S = 0; S < h.length; S += 1) {
14470
- if (m + h[S].length >= g) {
14471
- p = S;
14469
+ for (let k = 0; k < h.length; k += 1) {
14470
+ if (m + h[k].length >= g) {
14471
+ p = k;
14472
14472
  break;
14473
14473
  }
14474
- m += h[S].length + 1;
14474
+ m += h[k].length + 1;
14475
14475
  }
14476
14476
  const v = ((a = h[p].match(/^ */)) == null ? void 0 : a[0]) || "", w = Math.min(v.length, t);
14477
14477
  if (w === 0)
14478
14478
  return !0;
14479
14479
  let x = u;
14480
- for (let S = 0; S < p; S += 1)
14481
- x += h[S].length + 1;
14480
+ for (let k = 0; k < p; k += 1)
14481
+ x += h[k].length + 1;
14482
14482
  return l.delete(x, x + w), c - x <= w && l.setSelection(U.create(l.doc, x)), !0;
14483
14483
  }) : n.commands.command(({ tr: l }) => {
14484
14484
  const { from: a, to: c } = i, f = r.doc.textBetween(a, c, `
@@ -14580,7 +14580,7 @@ ${t}
14580
14580
  return [{ tag: "br" }];
14581
14581
  },
14582
14582
  renderHTML({ HTMLAttributes: n }) {
14583
- return ["br", ge(this.options.HTMLAttributes, n)];
14583
+ return ["br", ye(this.options.HTMLAttributes, n)];
14584
14584
  },
14585
14585
  renderText() {
14586
14586
  return `
@@ -14643,7 +14643,7 @@ ${t}
14643
14643
  }));
14644
14644
  },
14645
14645
  renderHTML({ node: n, HTMLAttributes: e }) {
14646
- return [`h${this.options.levels.includes(n.attrs.level) ? n.attrs.level : this.options.levels[0]}`, ge(this.options.HTMLAttributes, e), 0];
14646
+ return [`h${this.options.levels.includes(n.attrs.level) ? n.attrs.level : this.options.levels[0]}`, ye(this.options.HTMLAttributes, e), 0];
14647
14647
  },
14648
14648
  parseMarkdown: (n, e) => e.createNode("heading", { level: n.depth || 1 }, e.parseInline(n.tokens || [])),
14649
14649
  renderMarkdown: (n, e) => {
@@ -14688,7 +14688,7 @@ ${t}
14688
14688
  return [{ tag: "hr" }];
14689
14689
  },
14690
14690
  renderHTML({ HTMLAttributes: n }) {
14691
- return ["hr", ge(this.options.HTMLAttributes, n)];
14691
+ return ["hr", ye(this.options.HTMLAttributes, n)];
14692
14692
  },
14693
14693
  markdownTokenName: "hr",
14694
14694
  parseMarkdown: (n, e) => e.createNode("horizontalRule"),
@@ -14751,7 +14751,7 @@ ${t}
14751
14751
  ];
14752
14752
  },
14753
14753
  renderHTML({ HTMLAttributes: n }) {
14754
- return ["em", ge(this.options.HTMLAttributes, n), 0];
14754
+ return ["em", ye(this.options.HTMLAttributes, n), 0];
14755
14755
  },
14756
14756
  addCommands() {
14757
14757
  return {
@@ -14935,7 +14935,7 @@ We.prototype = {
14935
14935
  return i.j[n] = s, s;
14936
14936
  }
14937
14937
  };
14938
- const q = (n, e, t, r, i) => n.ta(e, t, r, i), he = (n, e, t, r, i) => n.tr(e, t, r, i), xd = (n, e, t, r, i) => n.ts(e, t, r, i), A = (n, e, t, r, i) => n.tt(e, t, r, i), Wt = "WORD", pa = "UWORD", Jp = "ASCIINUMERICAL", Yp = "ALPHANUMERICAL", ci = "LOCALHOST", ma = "TLD", ga = "UTLD", to = "SCHEME", ar = "SLASH_SCHEME", hc = "NUM", ya = "WS", pc = "NL", Gr = "OPENBRACE", Jr = "CLOSEBRACE", ko = "OPENBRACKET", So = "CLOSEBRACKET", Eo = "OPENPAREN", To = "CLOSEPAREN", Mo = "OPENANGLEBRACKET", Ao = "CLOSEANGLEBRACKET", Oo = "FULLWIDTHLEFTPAREN", No = "FULLWIDTHRIGHTPAREN", Ro = "LEFTCORNERBRACKET", Io = "RIGHTCORNERBRACKET", Do = "LEFTWHITECORNERBRACKET", Lo = "RIGHTWHITECORNERBRACKET", Po = "FULLWIDTHLESSTHAN", _o = "FULLWIDTHGREATERTHAN", Bo = "AMPERSAND", $o = "APOSTROPHE", zo = "ASTERISK", dn = "AT", Fo = "BACKSLASH", Ho = "BACKTICK", Vo = "CARET", pn = "COLON", mc = "COMMA", Uo = "DOLLAR", Et = "DOT", Wo = "EQUALS", gc = "EXCLAMATION", st = "HYPHEN", Yr = "PERCENT", jo = "PIPE", Ko = "PLUS", qo = "POUND", Xr = "QUERY", yc = "QUOTE", Xp = "FULLWIDTHMIDDLEDOT", bc = "SEMI", Tt = "SLASH", Zr = "TILDE", Go = "UNDERSCORE", Zp = "EMOJI", Jo = "SYM";
14938
+ const q = (n, e, t, r, i) => n.ta(e, t, r, i), he = (n, e, t, r, i) => n.tr(e, t, r, i), xd = (n, e, t, r, i) => n.ts(e, t, r, i), A = (n, e, t, r, i) => n.tt(e, t, r, i), Wt = "WORD", pa = "UWORD", Jp = "ASCIINUMERICAL", Yp = "ALPHANUMERICAL", ci = "LOCALHOST", ma = "TLD", ga = "UTLD", to = "SCHEME", ar = "SLASH_SCHEME", hc = "NUM", ya = "WS", pc = "NL", Gr = "OPENBRACE", Jr = "CLOSEBRACE", So = "OPENBRACKET", ko = "CLOSEBRACKET", Eo = "OPENPAREN", To = "CLOSEPAREN", Mo = "OPENANGLEBRACKET", Ao = "CLOSEANGLEBRACKET", Oo = "FULLWIDTHLEFTPAREN", No = "FULLWIDTHRIGHTPAREN", Ro = "LEFTCORNERBRACKET", Io = "RIGHTCORNERBRACKET", Do = "LEFTWHITECORNERBRACKET", Lo = "RIGHTWHITECORNERBRACKET", Po = "FULLWIDTHLESSTHAN", _o = "FULLWIDTHGREATERTHAN", Bo = "AMPERSAND", $o = "APOSTROPHE", zo = "ASTERISK", dn = "AT", Fo = "BACKSLASH", Ho = "BACKTICK", Vo = "CARET", pn = "COLON", mc = "COMMA", Uo = "DOLLAR", Et = "DOT", Wo = "EQUALS", gc = "EXCLAMATION", st = "HYPHEN", Yr = "PERCENT", jo = "PIPE", Ko = "PLUS", qo = "POUND", Xr = "QUERY", yc = "QUOTE", Xp = "FULLWIDTHMIDDLEDOT", bc = "SEMI", Tt = "SLASH", Zr = "TILDE", Go = "UNDERSCORE", Zp = "EMOJI", Jo = "SYM";
14939
14939
  var Qp = /* @__PURE__ */ Object.freeze({
14940
14940
  __proto__: null,
14941
14941
  ALPHANUMERICAL: Yp,
@@ -14949,7 +14949,7 @@ var Qp = /* @__PURE__ */ Object.freeze({
14949
14949
  CARET: Vo,
14950
14950
  CLOSEANGLEBRACKET: Ao,
14951
14951
  CLOSEBRACE: Jr,
14952
- CLOSEBRACKET: So,
14952
+ CLOSEBRACKET: ko,
14953
14953
  CLOSEPAREN: To,
14954
14954
  COLON: pn,
14955
14955
  COMMA: mc,
@@ -14971,7 +14971,7 @@ var Qp = /* @__PURE__ */ Object.freeze({
14971
14971
  NUM: hc,
14972
14972
  OPENANGLEBRACKET: Mo,
14973
14973
  OPENBRACE: Gr,
14974
- OPENBRACKET: ko,
14974
+ OPENBRACKET: So,
14975
14975
  OPENPAREN: Eo,
14976
14976
  PERCENT: Yr,
14977
14977
  PIPE: jo,
@@ -15001,7 +15001,7 @@ function sx(n = []) {
15001
15001
  const e = {};
15002
15002
  We.groups = e;
15003
15003
  const t = new We();
15004
- Fi == null && (Fi = kd(Zw)), Hi == null && (Hi = kd(Qw)), A(t, "'", $o), A(t, "{", Gr), A(t, "}", Jr), A(t, "[", ko), A(t, "]", So), A(t, "(", Eo), A(t, ")", To), A(t, "<", Mo), A(t, ">", Ao), A(t, "(", Oo), A(t, ")", No), A(t, "「", Ro), A(t, "」", Io), A(t, "『", Do), A(t, "』", Lo), A(t, "<", Po), A(t, ">", _o), A(t, "&", Bo), A(t, "*", zo), A(t, "@", dn), A(t, "`", Ho), A(t, "^", Vo), A(t, ":", pn), A(t, ",", mc), A(t, "$", Uo), A(t, ".", Et), A(t, "=", Wo), A(t, "!", gc), A(t, "-", st), A(t, "%", Yr), A(t, "|", jo), A(t, "+", Ko), A(t, "#", qo), A(t, "?", Xr), A(t, '"', yc), A(t, "/", Tt), A(t, ";", bc), A(t, "~", Zr), A(t, "_", Go), A(t, "\\", Fo), A(t, "・", Xp);
15004
+ Fi == null && (Fi = Sd(Zw)), Hi == null && (Hi = Sd(Qw)), A(t, "'", $o), A(t, "{", Gr), A(t, "}", Jr), A(t, "[", So), A(t, "]", ko), A(t, "(", Eo), A(t, ")", To), A(t, "<", Mo), A(t, ">", Ao), A(t, "(", Oo), A(t, ")", No), A(t, "「", Ro), A(t, "」", Io), A(t, "『", Do), A(t, "』", Lo), A(t, "<", Po), A(t, ">", _o), A(t, "&", Bo), A(t, "*", zo), A(t, "@", dn), A(t, "`", Ho), A(t, "^", Vo), A(t, ":", pn), A(t, ",", mc), A(t, "$", Uo), A(t, ".", Et), A(t, "=", Wo), A(t, "!", gc), A(t, "-", st), A(t, "%", Yr), A(t, "|", jo), A(t, "+", Ko), A(t, "#", qo), A(t, "?", Xr), A(t, '"', yc), A(t, "/", Tt), A(t, ";", bc), A(t, "~", Zr), A(t, "_", Go), A(t, "\\", Fo), A(t, "・", Xp);
15005
15005
  const r = he(t, Ut, hc, {
15006
15006
  [ua]: !0
15007
15007
  });
@@ -15105,7 +15105,7 @@ function an(n, e, t, r, i) {
15105
15105
  }
15106
15106
  return o = new We(t), o.jr = i.slice(), n.j[e[s - 1]] = o, o;
15107
15107
  }
15108
- function kd(n) {
15108
+ function Sd(n) {
15109
15109
  const e = [], t = [];
15110
15110
  let r = 0, i = "0123456789";
15111
15111
  for (; r < n.length; ) {
@@ -15125,8 +15125,8 @@ function kd(n) {
15125
15125
  const ui = {
15126
15126
  defaultProtocol: "http",
15127
15127
  events: null,
15128
- format: Sd,
15129
- formatHref: Sd,
15128
+ format: kd,
15129
+ formatHref: kd,
15130
15130
  nl2br: !1,
15131
15131
  tagName: "a",
15132
15132
  target: null,
@@ -15208,7 +15208,7 @@ vc.prototype = {
15208
15208
  return (this.get("render", null, n) || this.defaultRender)(e, n.t, n);
15209
15209
  }
15210
15210
  };
15211
- function Sd(n) {
15211
+ function kd(n) {
15212
15212
  return n;
15213
15213
  }
15214
15214
  function tm(n, e) {
@@ -15357,7 +15357,7 @@ const Ed = Us("email", {
15357
15357
  function cx({
15358
15358
  groups: n
15359
15359
  }) {
15360
- const e = n.domain.concat([Bo, zo, dn, Fo, Ho, Vo, Uo, Wo, st, hc, Yr, jo, Ko, qo, Tt, Jo, Zr, Go]), t = [$o, pn, mc, Et, gc, Yr, Xr, yc, bc, Mo, Ao, Gr, Jr, So, ko, Eo, To, Oo, No, Ro, Io, Do, Lo, Po, _o], r = [Bo, $o, zo, Fo, Ho, Vo, Uo, Wo, st, Gr, Jr, Yr, jo, Ko, qo, Xr, Tt, Jo, Zr, Go], i = it(), o = A(i, Zr);
15360
+ const e = n.domain.concat([Bo, zo, dn, Fo, Ho, Vo, Uo, Wo, st, hc, Yr, jo, Ko, qo, Tt, Jo, Zr, Go]), t = [$o, pn, mc, Et, gc, Yr, Xr, yc, bc, Mo, Ao, Gr, Jr, ko, So, Eo, To, Oo, No, Ro, Io, Do, Lo, Po, _o], r = [Bo, $o, zo, Fo, Ho, Vo, Uo, Wo, st, Gr, Jr, Yr, jo, Ko, qo, Xr, Tt, Jo, Zr, Go], i = it(), o = A(i, Zr);
15361
15361
  q(o, r, o), q(o, n.domain, o);
15362
15362
  const s = it(), l = it(), a = it();
15363
15363
  q(i, n.domain, s), q(i, n.scheme, l), q(i, n.slashscheme, a), q(s, r, o), q(s, n.domain, s);
@@ -15381,14 +15381,14 @@ function cx({
15381
15381
  q(y, n.tld, v), q(y, n.utld, v), q(v, n.domain, s), q(v, r, o), A(v, Et, y), A(v, st, g), A(v, dn, c);
15382
15382
  const w = A(v, pn), x = it(Vi);
15383
15383
  q(w, n.numeric, x);
15384
- const C = it(Vi), S = it();
15385
- q(C, e, C), q(C, t, S), q(S, e, C), q(S, t, S), A(v, Tt, C), A(x, Tt, C);
15386
- const k = A(l, pn), N = A(a, pn), _ = A(N, Tt), L = A(_, Tt);
15387
- q(l, n.domain, s), A(l, Et, y), A(l, st, g), q(a, n.domain, s), A(a, Et, y), A(a, st, g), q(k, n.domain, C), A(k, Tt, C), A(k, Xr, C), q(L, n.domain, C), q(L, e, C), A(L, Tt, C);
15384
+ const C = it(Vi), k = it();
15385
+ q(C, e, C), q(C, t, k), q(k, e, C), q(k, t, k), A(v, Tt, C), A(x, Tt, C);
15386
+ const S = A(l, pn), N = A(a, pn), _ = A(N, Tt), L = A(_, Tt);
15387
+ q(l, n.domain, s), A(l, Et, y), A(l, st, g), q(a, n.domain, s), A(a, Et, y), A(a, st, g), q(S, n.domain, C), A(S, Tt, C), A(S, Xr, C), q(L, n.domain, C), q(L, e, C), A(L, Tt, C);
15388
15388
  const j = [
15389
15389
  [Gr, Jr],
15390
15390
  // {}
15391
- [ko, So],
15391
+ [So, ko],
15392
15392
  // []
15393
15393
  [Eo, To],
15394
15394
  // ()
@@ -15405,7 +15405,7 @@ function cx({
15405
15405
  ];
15406
15406
  for (let J = 0; J < j.length; J++) {
15407
15407
  const [K, R] = j[J], B = A(C, K);
15408
- A(S, K, B), A(B, R, C);
15408
+ A(k, K, B), A(B, R, C);
15409
15409
  const V = it(Vi);
15410
15410
  q(B, e, V);
15411
15411
  const D = it();
@@ -15427,14 +15427,14 @@ function ux(n, e, t) {
15427
15427
  if (f < 0)
15428
15428
  i -= u, i < r && (s.push(t[i]), i++);
15429
15429
  else {
15430
- s.length > 0 && (o.push(kl(Td, e, s)), s = []), i -= f, u -= f;
15430
+ s.length > 0 && (o.push(Sl(Td, e, s)), s = []), i -= f, u -= f;
15431
15431
  const h = d.t, p = t.slice(i - u, i);
15432
- o.push(kl(h, e, p));
15432
+ o.push(Sl(h, e, p));
15433
15433
  }
15434
15434
  }
15435
- return s.length > 0 && o.push(kl(Td, e, s)), o;
15435
+ return s.length > 0 && o.push(Sl(Td, e, s)), o;
15436
15436
  }
15437
- function kl(n, e, t) {
15437
+ function Sl(n, e, t) {
15438
15438
  const r = t[0].s, i = t[t.length - 1].e, o = e.slice(r, i);
15439
15439
  return new n(o, t);
15440
15440
  }
@@ -15502,7 +15502,7 @@ function vx(n) {
15502
15502
  return;
15503
15503
  const { tr: s } = r, l = xp(t.doc, [...e]);
15504
15504
  if (Ap(l).forEach(({ newRange: c }) => {
15505
- const u = kv(r.doc, c, (h) => h.isTextblock);
15505
+ const u = Sv(r.doc, c, (h) => h.isTextblock);
15506
15506
  let d, f;
15507
15507
  if (u.length > 1)
15508
15508
  d = u[0], f = r.doc.textBetween(
@@ -15697,7 +15697,7 @@ var Cx = sn.create({
15697
15697
  defaultValidate: (e) => !!Pn(e, this.options.protocols),
15698
15698
  protocols: this.options.protocols,
15699
15699
  defaultProtocol: this.options.defaultProtocol
15700
- }) ? ["a", ge(this.options.HTMLAttributes, n), 0] : ["a", ge(this.options.HTMLAttributes, { ...n, href: "" }), 0];
15700
+ }) ? ["a", ye(this.options.HTMLAttributes, n), 0] : ["a", ye(this.options.HTMLAttributes, { ...n, href: "" }), 0];
15701
15701
  },
15702
15702
  markdownTokenName: "link",
15703
15703
  parseMarkdown: (n, e) => e.applyMark("link", e.parseInline(n.tokens || []), {
@@ -15794,9 +15794,9 @@ var Cx = sn.create({
15794
15794
  })
15795
15795
  ), n;
15796
15796
  }
15797
- }), kx = Object.defineProperty, Sx = (n, e) => {
15797
+ }), Sx = Object.defineProperty, kx = (n, e) => {
15798
15798
  for (var t in e)
15799
- kx(n, t, { get: e[t], enumerable: !0 });
15799
+ Sx(n, t, { get: e[t], enumerable: !0 });
15800
15800
  }, Ex = "listItem", Ad = "textStyle", Od = /^\s*([-+*])\s$/, rm = rt.create({
15801
15801
  name: "bulletList",
15802
15802
  addOptions() {
@@ -15815,7 +15815,7 @@ var Cx = sn.create({
15815
15815
  return [{ tag: "ul" }];
15816
15816
  },
15817
15817
  renderHTML({ HTMLAttributes: n }) {
15818
- return ["ul", ge(this.options.HTMLAttributes, n), 0];
15818
+ return ["ul", ye(this.options.HTMLAttributes, n), 0];
15819
15819
  },
15820
15820
  markdownTokenName: "list",
15821
15821
  parseMarkdown: (n, e) => n.type !== "list" || n.ordered ? [] : {
@@ -15838,11 +15838,11 @@ var Cx = sn.create({
15838
15838
  };
15839
15839
  },
15840
15840
  addInputRules() {
15841
- let n = kr({
15841
+ let n = Sr({
15842
15842
  find: Od,
15843
15843
  type: this.type
15844
15844
  });
15845
- return (this.options.keepMarks || this.options.keepAttributes) && (n = kr({
15845
+ return (this.options.keepMarks || this.options.keepAttributes) && (n = Sr({
15846
15846
  find: Od,
15847
15847
  type: this.type,
15848
15848
  keepMarks: this.options.keepMarks,
@@ -15870,7 +15870,7 @@ var Cx = sn.create({
15870
15870
  ];
15871
15871
  },
15872
15872
  renderHTML({ HTMLAttributes: n }) {
15873
- return ["li", ge(this.options.HTMLAttributes, n), 0];
15873
+ return ["li", ye(this.options.HTMLAttributes, n), 0];
15874
15874
  },
15875
15875
  markdownTokenName: "list_item",
15876
15876
  parseMarkdown: (n, e) => {
@@ -15922,7 +15922,7 @@ var Cx = sn.create({
15922
15922
  };
15923
15923
  }
15924
15924
  }), Tx = {};
15925
- Sx(Tx, {
15925
+ kx(Tx, {
15926
15926
  findListItemPos: () => Ai,
15927
15927
  getNextListDepth: () => Cc,
15928
15928
  handleBackspace: () => ba,
@@ -16181,7 +16181,7 @@ var Rx = "listItem", Rd = "textStyle", Id = /^(\d+)\.\s$/, fm = rt.create({
16181
16181
  },
16182
16182
  renderHTML({ HTMLAttributes: n }) {
16183
16183
  const { start: e, ...t } = n;
16184
- return e === 1 ? ["ol", ge(this.options.HTMLAttributes, t), 0] : ["ol", ge(this.options.HTMLAttributes, n), 0];
16184
+ return e === 1 ? ["ol", ye(this.options.HTMLAttributes, t), 0] : ["ol", ye(this.options.HTMLAttributes, n), 0];
16185
16185
  },
16186
16186
  markdownTokenName: "list",
16187
16187
  parseMarkdown: (n, e) => {
@@ -16237,13 +16237,13 @@ var Rx = "listItem", Rd = "textStyle", Id = /^(\d+)\.\s$/, fm = rt.create({
16237
16237
  };
16238
16238
  },
16239
16239
  addInputRules() {
16240
- let n = kr({
16240
+ let n = Sr({
16241
16241
  find: Id,
16242
16242
  type: this.type,
16243
16243
  getAttributes: (e) => ({ start: +e[1] }),
16244
16244
  joinPredicate: (e, t) => t.childCount + t.attrs.start === +e[1]
16245
16245
  });
16246
- return (this.options.keepMarks || this.options.keepAttributes) && (n = kr({
16246
+ return (this.options.keepMarks || this.options.keepAttributes) && (n = Sr({
16247
16247
  find: Id,
16248
16248
  type: this.type,
16249
16249
  keepMarks: this.options.keepMarks,
@@ -16293,7 +16293,7 @@ var Rx = "listItem", Rd = "textStyle", Id = /^(\d+)\.\s$/, fm = rt.create({
16293
16293
  renderHTML({ node: n, HTMLAttributes: e }) {
16294
16294
  return [
16295
16295
  "li",
16296
- ge(this.options.HTMLAttributes, e, {
16296
+ ye(this.options.HTMLAttributes, e, {
16297
16297
  "data-type": this.name
16298
16298
  }),
16299
16299
  [
@@ -16380,7 +16380,7 @@ var Rx = "listItem", Rd = "textStyle", Id = /^(\d+)\.\s$/, fm = rt.create({
16380
16380
  },
16381
16381
  addInputRules() {
16382
16382
  return [
16383
- kr({
16383
+ Sr({
16384
16384
  find: Ix,
16385
16385
  type: this.type,
16386
16386
  getAttributes: (n) => ({
@@ -16410,7 +16410,7 @@ var Rx = "listItem", Rd = "textStyle", Id = /^(\d+)\.\s$/, fm = rt.create({
16410
16410
  ];
16411
16411
  },
16412
16412
  renderHTML({ HTMLAttributes: n }) {
16413
- return ["ul", ge(this.options.HTMLAttributes, n, { "data-type": this.name }), 0];
16413
+ return ["ul", ye(this.options.HTMLAttributes, n, { "data-type": this.name }), 0];
16414
16414
  },
16415
16415
  parseMarkdown: (n, e) => e.createNode("taskList", {}, e.parseChildren(n.items || [])),
16416
16416
  renderMarkdown: (n, e) => n.content ? e.renderChildren(n.content, `
@@ -16523,7 +16523,7 @@ var Dd = "&nbsp;", Px = " ", _x = rt.create({
16523
16523
  return [{ tag: "p" }];
16524
16524
  },
16525
16525
  renderHTML({ HTMLAttributes: n }) {
16526
- return ["p", ge(this.options.HTMLAttributes, n), 0];
16526
+ return ["p", ye(this.options.HTMLAttributes, n), 0];
16527
16527
  },
16528
16528
  parseMarkdown: (n, e) => {
16529
16529
  const t = n.tokens || [];
@@ -16574,7 +16574,7 @@ var Dd = "&nbsp;", Px = " ", _x = rt.create({
16574
16574
  ];
16575
16575
  },
16576
16576
  renderHTML({ HTMLAttributes: n }) {
16577
- return ["s", ge(this.options.HTMLAttributes, n), 0];
16577
+ return ["s", ye(this.options.HTMLAttributes, n), 0];
16578
16578
  },
16579
16579
  markdownTokenName: "del",
16580
16580
  parseMarkdown: (n, e) => e.applyMark("strike", e.parseInline(n.tokens || [])),
@@ -16635,7 +16635,7 @@ var Dd = "&nbsp;", Px = " ", _x = rt.create({
16635
16635
  ];
16636
16636
  },
16637
16637
  renderHTML({ HTMLAttributes: n }) {
16638
- return ["u", ge(this.options.HTMLAttributes, n), 0];
16638
+ return ["u", ye(this.options.HTMLAttributes, n), 0];
16639
16639
  },
16640
16640
  parseMarkdown(n, e) {
16641
16641
  return e.applyMark(this.name || "underline", e.parseInline(n.tokens || []));
@@ -16789,7 +16789,7 @@ class pe extends H {
16789
16789
  @internal
16790
16790
  */
16791
16791
  getBookmark() {
16792
- return new kc(this.anchor);
16792
+ return new Sc(this.anchor);
16793
16793
  }
16794
16794
  /**
16795
16795
  @internal
@@ -16845,12 +16845,12 @@ class pe extends H {
16845
16845
  pe.prototype.visible = !1;
16846
16846
  pe.findFrom = pe.findGapCursorFrom;
16847
16847
  H.jsonID("gapcursor", pe);
16848
- class kc {
16848
+ class Sc {
16849
16849
  constructor(e) {
16850
16850
  this.pos = e;
16851
16851
  }
16852
16852
  map(e) {
16853
- return new kc(e.map(this.pos));
16853
+ return new Sc(e.map(this.pos));
16854
16854
  }
16855
16855
  resolve(e) {
16856
16856
  let t = e.resolve(this.pos);
@@ -17200,9 +17200,9 @@ function tC(n, e, t, r) {
17200
17200
  if (s && s.getMeta(jn))
17201
17201
  return s.getMeta(jn).redo ? new fn(n.done.addTransform(t, void 0, r, no(e)), n.undone, Ld(t.mapping.maps), n.prevTime, n.prevComposition) : new fn(n.done, n.undone.addTransform(t, void 0, r, no(e)), null, n.prevTime, n.prevComposition);
17202
17202
  if (t.getMeta("addToHistory") !== !1 && !(s && s.getMeta("addToHistory") === !1)) {
17203
- let l = t.getMeta("composition"), a = n.prevTime == 0 || !s && n.prevComposition != l && (n.prevTime < (t.time || 0) - r.newGroupDelay || !nC(t, n.prevRanges)), c = s ? Sl(n.prevRanges, t.mapping) : Ld(t.mapping.maps);
17203
+ let l = t.getMeta("composition"), a = n.prevTime == 0 || !s && n.prevComposition != l && (n.prevTime < (t.time || 0) - r.newGroupDelay || !nC(t, n.prevRanges)), c = s ? kl(n.prevRanges, t.mapping) : Ld(t.mapping.maps);
17204
17204
  return new fn(n.done.addTransform(t, a ? e.selection.getBookmark() : void 0, r, no(e)), vt.empty, c, t.time, l ?? n.prevComposition);
17205
- } else return (o = t.getMeta("rebased")) ? new fn(n.done.rebased(t, o), n.undone.rebased(t, o), Sl(n.prevRanges, t.mapping), n.prevTime, n.prevComposition) : new fn(n.done.addMaps(t.mapping.maps), n.undone.addMaps(t.mapping.maps), Sl(n.prevRanges, t.mapping), n.prevTime, n.prevComposition);
17205
+ } else return (o = t.getMeta("rebased")) ? new fn(n.done.rebased(t, o), n.undone.rebased(t, o), kl(n.prevRanges, t.mapping), n.prevTime, n.prevComposition) : new fn(n.done.addMaps(t.mapping.maps), n.undone.addMaps(t.mapping.maps), kl(n.prevRanges, t.mapping), n.prevTime, n.prevComposition);
17206
17206
  }
17207
17207
  function nC(n, e) {
17208
17208
  if (!e)
@@ -17221,7 +17221,7 @@ function Ld(n) {
17221
17221
  n[t].forEach((r, i, o, s) => e.push(o, s));
17222
17222
  return e;
17223
17223
  }
17224
- function Sl(n, e) {
17224
+ function kl(n, e) {
17225
17225
  if (!n)
17226
17226
  return null;
17227
17227
  let t = [];
@@ -17607,7 +17607,7 @@ var cC = ne.create({
17607
17607
  ];
17608
17608
  },
17609
17609
  renderHTML({ HTMLAttributes: n }) {
17610
- return ["mark", ge(this.options.HTMLAttributes, n), 0];
17610
+ return ["mark", ye(this.options.HTMLAttributes, n), 0];
17611
17611
  },
17612
17612
  renderMarkdown: (n, e) => `==${e.renderChildren(n)}==`,
17613
17613
  parseMarkdown: (n, e) => e.applyMark("highlight", e.parseInline(n.tokens || [])),
@@ -17689,7 +17689,7 @@ var cC = ne.create({
17689
17689
  ];
17690
17690
  },
17691
17691
  renderHTML({ HTMLAttributes: n }) {
17692
- return ["span", ge(this.options.HTMLAttributes, n), 0];
17692
+ return ["span", ye(this.options.HTMLAttributes, n), 0];
17693
17693
  },
17694
17694
  addCommands() {
17695
17695
  return {
@@ -17916,7 +17916,7 @@ class CC extends Qn {
17916
17916
  content: t,
17917
17917
  autofocus: !0
17918
17918
  });
17919
- this.editor = r, this.core._registerTextEditor(r), r.on("focus", () => {
17919
+ r.scaleWhenCreate = this.config.scaleWhenCreate || 1, this.editor = r, this.core._registerTextEditor(r), r.on("focus", () => {
17920
17920
  window.addEventListener("click", b(this, Ci));
17921
17921
  }), window.addEventListener("keydown", b(this, xi));
17922
17922
  });
@@ -17931,9 +17931,9 @@ class CC extends Qn {
17931
17931
  this.resizeObserver = new ResizeObserver((t) => {
17932
17932
  for (const r of t) {
17933
17933
  let i = !1;
17934
- const o = r.contentRect.height * this.config.htmlScale;
17934
+ const o = r.contentRect.height * this.config.htmlScale / this.config.scaleWhenCreate;
17935
17935
  Math.abs(o - this.element.height()) > 1 && (this.element.height(o), i = !0);
17936
- const s = r.contentRect.width * this.config.htmlScale;
17936
+ const s = r.contentRect.width * this.config.htmlScale / this.config.scaleWhenCreate;
17937
17937
  s - this.element.width() > 1 && !this.config.lockX && (this.element.width(s), i = !0), i && (this.syncConfigFromElement(), this.core._rebuildStateAfterNodeChange(this, !1), this.core.getCanvasTransformer().emitPositionChange());
17938
17938
  }
17939
17939
  }), this.resizeObserver.observe(this.htmlEditorElement);
@@ -18016,8 +18016,8 @@ Cm = function() {
18016
18016
  this.attachEditor();
18017
18017
  });
18018
18018
  };
18019
- var Zn, wa, ki, Si, km;
18020
- class kC extends Qn {
18019
+ var Zn, wa, Si, ki, Sm;
18020
+ class SC extends Qn {
18021
18021
  constructor(t, r, i = !1) {
18022
18022
  super();
18023
18023
  P(this, Zn);
@@ -18028,16 +18028,16 @@ class kC extends Qn {
18028
18028
  W(this, "imgCover");
18029
18029
  W(this, "playIcon");
18030
18030
  W(this, "isDraft");
18031
- P(this, ki, (t) => {
18031
+ P(this, Si, (t) => {
18032
18032
  const r = t === "select";
18033
18033
  this.element.listening(r);
18034
18034
  });
18035
- P(this, Si, () => {
18035
+ P(this, ki, () => {
18036
18036
  this.getElement().getLayer() && this.core._rebuildStateAfterNodeChange([this], !0);
18037
18037
  });
18038
18038
  this.core = t, this.config = lu(r, this.core.getTheme());
18039
18039
  const { group: o, image: s, imgCover: l, playIcon: a } = this.createElement();
18040
- this.element = o, this.cover = s, this.imgCover = l, this.playIcon = a, this.element = o, tr(this.element, this), this.isDraft = i, ae(this, Zn, wa).call(this), ae(this, Zn, km).call(this, this.getElement());
18040
+ this.element = o, this.cover = s, this.imgCover = l, this.playIcon = a, this.element = o, tr(this.element, this), this.isDraft = i, ae(this, Zn, wa).call(this), ae(this, Zn, Sm).call(this, this.getElement());
18041
18041
  }
18042
18042
  getID() {
18043
18043
  return this.config.id;
@@ -18112,7 +18112,7 @@ class kC extends Qn {
18112
18112
  * 销毁
18113
18113
  */
18114
18114
  destroy() {
18115
- this.core.off("toolType:change", b(this, ki)), this.element.destroy();
18115
+ this.core.off("toolType:change", b(this, Si)), this.element.destroy();
18116
18116
  }
18117
18117
  getConfig() {
18118
18118
  return {
@@ -18140,20 +18140,20 @@ wa = function() {
18140
18140
  }, r.onerror = () => {
18141
18141
  console.error("Failed to load image:", t);
18142
18142
  };
18143
- }, ki = new WeakMap(), Si = new WeakMap(), /**
18143
+ }, Si = new WeakMap(), ki = new WeakMap(), /**
18144
18144
  * 设置事件处理器
18145
18145
  */
18146
- km = function(t) {
18147
- this.core.on("toolType:change", b(this, ki)), t.on("transform", (r) => {
18146
+ Sm = function(t) {
18147
+ this.core.on("toolType:change", b(this, Si)), t.on("transform", (r) => {
18148
18148
  const i = r.target, o = Math.max(ut.MIN_SIZE, this.cover.width() * i.scaleX()), s = Math.max(
18149
18149
  ut.MIN_SIZE,
18150
18150
  this.cover.height() * i.scaleY()
18151
18151
  );
18152
18152
  this.cover.width(o), this.cover.height(s), this.imgCover.width(o), this.imgCover.height(s), this.playIcon.x(o / 2), this.playIcon.y(s / 2), t.scale({ x: 1, y: 1 });
18153
18153
  }), t.on("transformend", () => {
18154
- this.syncConfigFromElement(), b(this, Si).call(this);
18154
+ this.syncConfigFromElement(), b(this, ki).call(this);
18155
18155
  }), t.on("dragend", () => {
18156
- this.syncConfigFromElement(), b(this, Si).call(this);
18156
+ this.syncConfigFromElement(), b(this, ki).call(this);
18157
18157
  });
18158
18158
  };
18159
18159
  function $d(n, e, t, r = !1) {
@@ -18165,9 +18165,9 @@ function $d(n, e, t, r = !1) {
18165
18165
  r
18166
18166
  );
18167
18167
  case "image":
18168
- return new ky(n, t, r);
18168
+ return new Sy(n, t, r);
18169
18169
  case "image-marker":
18170
- return new Sy(
18170
+ return new ky(
18171
18171
  n,
18172
18172
  t,
18173
18173
  r
@@ -18183,7 +18183,7 @@ function $d(n, e, t, r = !1) {
18183
18183
  r
18184
18184
  );
18185
18185
  case "video":
18186
- return new kC(n, t, r);
18186
+ return new SC(n, t, r);
18187
18187
  default:
18188
18188
  return null;
18189
18189
  }
@@ -18191,7 +18191,7 @@ function $d(n, e, t, r = !1) {
18191
18191
  function zd(n, e) {
18192
18192
  return Math.min(Math.max(n, e[0]), e[1]);
18193
18193
  }
18194
- const SC = (n, e, t) => ({
18194
+ const kC = (n, e, t) => ({
18195
18195
  ...t,
18196
18196
  $_type: n,
18197
18197
  id: Vr(),
@@ -18208,7 +18208,7 @@ function EC(n, e, t) {
18208
18208
  };
18209
18209
  }
18210
18210
  if (["rectangle", "image", "image-marker", "html"].includes(n.$_type)) {
18211
- const [i, o] = Sm(t, r);
18211
+ const [i, o] = km(t, r);
18212
18212
  return {
18213
18213
  ...n,
18214
18214
  x: i.x,
@@ -18223,7 +18223,7 @@ function EC(n, e, t) {
18223
18223
  y: r.y
18224
18224
  } : n;
18225
18225
  }
18226
- function Sm(n, e) {
18226
+ function km(n, e) {
18227
18227
  let t = n.x, r = n.y, i = e.x, o = e.y, s;
18228
18228
  return t > i && (s = Math.abs(t - i), t = i, i = t + s), r > o && (s = Math.abs(r - o), r = o, o = r + s), [
18229
18229
  { x: t, y: r },
@@ -18459,7 +18459,7 @@ class MC extends yy {
18459
18459
  */
18460
18460
  _createDraftNode(t, r) {
18461
18461
  b(this, Te) && b(this, Te).destroy();
18462
- const i = SC(
18462
+ const i = kC(
18463
18463
  t,
18464
18464
  b(this, Xe)[0],
18465
18465
  r
@@ -18557,14 +18557,14 @@ class MC extends yy {
18557
18557
  */
18558
18558
  _updateSelectRect() {
18559
18559
  if (!b(this, Ye)) return;
18560
- const [t, r] = Sm(...b(this, Xe));
18560
+ const [t, r] = km(...b(this, Xe));
18561
18561
  b(this, Ye).setAttrs({
18562
18562
  x: t.x,
18563
18563
  y: t.y,
18564
18564
  width: r.x - t.x,
18565
18565
  height: r.y - t.y
18566
18566
  });
18567
- const i = b(this, Ye).getClientRect(), s = b(this, lt).find(`.${oe.selectable}`).filter((l) => {
18567
+ const i = b(this, Ye).getClientRect(), s = b(this, lt).find(`.${ie.selectable}`).filter((l) => {
18568
18568
  const a = l.getClientRect();
18569
18569
  return me.Util.haveIntersection(i, a);
18570
18570
  });
@@ -18590,7 +18590,7 @@ class MC extends yy {
18590
18590
  if (s.length === 0)
18591
18591
  b(this, bt).clearNodes();
18592
18592
  else {
18593
- const l = this.getStage().find(`.${oe.selectable}`).filter((a) => s.includes(a.id()));
18593
+ const l = this.getStage().find(`.${ie.selectable}`).filter((a) => s.includes(a.id()));
18594
18594
  b(this, bt).setNodes(l);
18595
18595
  }
18596
18596
  this._updateState({ selectedNodeIds: s }, !1), this._emit("nodes:selected", s);
@@ -18664,7 +18664,7 @@ class MC extends yy {
18664
18664
  }
18665
18665
  // 在调整节点上下层级后调用,同步到 store 中
18666
18666
  _syncNodesZIndexToStore() {
18667
- const t = this.getStage().find(`.${oe.nodeRoot}`).map((s) => s.id()).filter((s) => s), r = this.getState().nodes || [], i = /* @__PURE__ */ new Map();
18667
+ const t = this.getStage().find(`.${ie.nodeRoot}`).map((s) => s.id()).filter((s) => s), r = this.getState().nodes || [], i = /* @__PURE__ */ new Map();
18668
18668
  t.forEach((s, l) => {
18669
18669
  i.set(s, l);
18670
18670
  });
@@ -18942,15 +18942,15 @@ class AC extends MC {
18942
18942
  const r = e?.padding ?? 50, i = e?.scale === !0, o = e?.nodeIds;
18943
18943
  let s = 1 / 0, l = 1 / 0, a = -1 / 0, c = -1 / 0;
18944
18944
  const u = this.getMainLayer(), d = this.getState().selectedNodeIds || [], f = o && o.length > 0, h = !f && d.length > 0, p = f ? o : h ? d : null;
18945
- if (u.children.forEach((k) => {
18946
- if (k.visible() && k.getClassName() !== "Transformer" && k.hasName(oe.selectable)) {
18945
+ if (u.children.forEach((S) => {
18946
+ if (S.visible() && S.getClassName() !== "Transformer" && S.hasName(ie.selectable)) {
18947
18947
  if (p) {
18948
- const R = k.id();
18948
+ const R = S.id();
18949
18949
  if (!p.includes(R)) return;
18950
18950
  }
18951
- const N = k.getAttrs(), _ = N.x || 0, L = N.y || 0, j = N.width || 0, J = N.height || 0;
18951
+ const N = S.getAttrs(), _ = N.x || 0, L = N.y || 0, j = N.width || 0, J = N.height || 0;
18952
18952
  if (N.rotation || 0) {
18953
- const R = k.getClientRect({ skipTransform: !1 }), B = this.getStage(), V = B.scaleX(), D = B.x(), O = B.y(), F = (R.x - D) / V, Y = (R.y - O) / V, Re = (R.x + R.width - D) / V, Z = (R.y + R.height - O) / V;
18953
+ const R = S.getClientRect({ skipTransform: !1 }), B = this.getStage(), V = B.scaleX(), D = B.x(), O = B.y(), F = (R.x - D) / V, Y = (R.y - O) / V, Re = (R.x + R.width - D) / V, Z = (R.y + R.height - O) / V;
18954
18954
  s = Math.min(s, F), l = Math.min(l, Y), a = Math.max(a, Re), c = Math.max(c, Z);
18955
18955
  } else
18956
18956
  s = Math.min(s, _), l = Math.min(l, L), a = Math.max(a, _ + j), c = Math.max(c, L + J);
@@ -18959,11 +18959,11 @@ class AC extends MC {
18959
18959
  const m = a - s, g = c - l, y = s + m / 2, v = l + g / 2;
18960
18960
  let x = this.getState().viewport.scale;
18961
18961
  if (i) {
18962
- const k = (this.getStage().width() - r * 2) / m, N = (this.getStage().height() - r * 2) / g;
18963
- x = Math.min(k, N, 1);
18962
+ const S = (this.getStage().width() - r * 2) / m, N = (this.getStage().height() - r * 2) / g;
18963
+ x = Math.min(S, N, 1);
18964
18964
  }
18965
- const C = this.getStage().width() / 2 - y * x, S = this.getStage().height() / 2 - v * x;
18966
- this.updateViewport({ x: C, y: S, scale: x }, !0);
18965
+ const C = this.getStage().width() / 2 - y * x, k = this.getStage().height() / 2 - v * x;
18966
+ this.updateViewport({ x: C, y: k, scale: x }, !0);
18967
18967
  }
18968
18968
  /**
18969
18969
  * 导出当前状态
@@ -19097,7 +19097,7 @@ function Qr({
19097
19097
  );
19098
19098
  }
19099
19099
  function DC({ api: n }) {
19100
- const [e, t] = ye(n.getState().viewport);
19100
+ const [e, t] = ge(n.getState().viewport);
19101
19101
  be(() => {
19102
19102
  n.on("viewport:change", (a) => {
19103
19103
  t(a);
@@ -19153,7 +19153,7 @@ function DC({ api: n }) {
19153
19153
  ] });
19154
19154
  }
19155
19155
  function LC({ api: n }) {
19156
- const [e, t] = ye(n.canUndo()), [r, i] = ye(n.canRedo());
19156
+ const [e, t] = ge(n.canUndo()), [r, i] = ge(n.canRedo());
19157
19157
  return be(() => {
19158
19158
  const o = () => {
19159
19159
  t(n.canUndo()), i(n.canRedo());
@@ -19187,7 +19187,7 @@ function LC({ api: n }) {
19187
19187
  ] });
19188
19188
  }
19189
19189
  function iM({ setApi: n, theme: e }) {
19190
- const t = et(null), [r, i] = ye(null), [o, s] = ye({ x: 0, y: 0, scale: 1 });
19190
+ const t = et(null), [r, i] = ge(null), [o, s] = ge({ x: 0, y: 0, scale: 1 });
19191
19191
  return be(() => {
19192
19192
  if (!t.current) return;
19193
19193
  const l = new AC(t.current, {
@@ -19223,7 +19223,7 @@ function iM({ setApi: n, theme: e }) {
19223
19223
  ] });
19224
19224
  }
19225
19225
  function oM(n) {
19226
- const [e, t] = ye(null);
19226
+ const [e, t] = ge(null);
19227
19227
  return be(() => {
19228
19228
  if (!n) return;
19229
19229
  const i = ({
@@ -19305,7 +19305,7 @@ function oM(n) {
19305
19305
  }
19306
19306
  };
19307
19307
  }
19308
- const Am = ["top", "right", "bottom", "left"], Hd = ["start", "end"], Vd = /* @__PURE__ */ Am.reduce((n, e) => n.concat(e, e + "-" + Hd[0], e + "-" + Hd[1]), []), kt = Math.min, _e = Math.max, Xo = Math.round, Wi = Math.floor, Dt = (n) => ({
19308
+ const Am = ["top", "right", "bottom", "left"], Hd = ["start", "end"], Vd = /* @__PURE__ */ Am.reduce((n, e) => n.concat(e, e + "-" + Hd[0], e + "-" + Hd[1]), []), St = Math.min, _e = Math.max, Xo = Math.round, Wi = Math.floor, Dt = (n) => ({
19309
19309
  x: n,
19310
19310
  y: n
19311
19311
  }), PC = {
@@ -19314,8 +19314,8 @@ const Am = ["top", "right", "bottom", "left"], Hd = ["start", "end"], Vd = /* @_
19314
19314
  bottom: "top",
19315
19315
  top: "bottom"
19316
19316
  };
19317
- function ka(n, e, t) {
19318
- return _e(n, kt(e, t));
19317
+ function Sa(n, e, t) {
19318
+ return _e(n, St(e, t));
19319
19319
  }
19320
19320
  function ln(n, e) {
19321
19321
  return typeof n == "function" ? n(e) : n;
@@ -19329,7 +19329,7 @@ function xt(n) {
19329
19329
  function Om(n) {
19330
19330
  return n === "x" ? "y" : "x";
19331
19331
  }
19332
- function Sc(n) {
19332
+ function kc(n) {
19333
19333
  return n === "y" ? "height" : "width";
19334
19334
  }
19335
19335
  function Rt(n) {
@@ -19341,7 +19341,7 @@ function Ec(n) {
19341
19341
  }
19342
19342
  function Nm(n, e, t) {
19343
19343
  t === void 0 && (t = !1);
19344
- const r = xt(n), i = Ec(n), o = Sc(i);
19344
+ const r = xt(n), i = Ec(n), o = kc(i);
19345
19345
  let s = i === "x" ? r === (t ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
19346
19346
  return e.reference[o] > e.floating[o] && (s = Qo(s)), [s, Qo(s)];
19347
19347
  }
@@ -19391,7 +19391,7 @@ function Tc(n) {
19391
19391
  left: n
19392
19392
  };
19393
19393
  }
19394
- function Sr(n) {
19394
+ function kr(n) {
19395
19395
  const {
19396
19396
  x: e,
19397
19397
  y: t,
@@ -19414,7 +19414,7 @@ function jd(n, e, t) {
19414
19414
  reference: r,
19415
19415
  floating: i
19416
19416
  } = n;
19417
- const o = Rt(e), s = Ec(e), l = Sc(s), a = ht(e), c = o === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[l] / 2 - i[l] / 2;
19417
+ const o = Rt(e), s = Ec(e), l = kc(s), a = ht(e), c = o === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[l] / 2 - i[l] / 2;
19418
19418
  let h;
19419
19419
  switch (a) {
19420
19420
  case "top":
@@ -19473,7 +19473,7 @@ async function VC(n, e) {
19473
19473
  elementContext: d = "floating",
19474
19474
  altBoundary: f = !1,
19475
19475
  padding: h = 0
19476
- } = ln(e, n), p = Tc(h), g = l[f ? d === "floating" ? "reference" : "floating" : d], y = Sr(await o.getClippingRect({
19476
+ } = ln(e, n), p = Tc(h), g = l[f ? d === "floating" ? "reference" : "floating" : d], y = kr(await o.getClippingRect({
19477
19477
  element: (t = await (o.isElement == null ? void 0 : o.isElement(g))) == null || t ? g : g.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(l.floating)),
19478
19478
  boundary: c,
19479
19479
  rootBoundary: u,
@@ -19489,7 +19489,7 @@ async function VC(n, e) {
19489
19489
  } : {
19490
19490
  x: 1,
19491
19491
  y: 1
19492
- }, C = Sr(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
19492
+ }, C = kr(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
19493
19493
  elements: l,
19494
19494
  rect: v,
19495
19495
  offsetParent: w,
@@ -19532,7 +19532,7 @@ const UC = 50, WC = async (n, e, t) => {
19532
19532
  x: w,
19533
19533
  y: x,
19534
19534
  data: C,
19535
- reset: S
19535
+ reset: k
19536
19536
  } = await v({
19537
19537
  x: u,
19538
19538
  y: d,
@@ -19550,11 +19550,11 @@ const UC = 50, WC = async (n, e, t) => {
19550
19550
  u = w ?? u, d = x ?? d, p[y] = {
19551
19551
  ...p[y],
19552
19552
  ...C
19553
- }, S && h < UC && (h++, typeof S == "object" && (S.placement && (f = S.placement), S.rects && (c = S.rects === !0 ? await s.getElementRects({
19553
+ }, k && h < UC && (h++, typeof k == "object" && (k.placement && (f = k.placement), k.rects && (c = k.rects === !0 ? await s.getElementRects({
19554
19554
  reference: n,
19555
19555
  floating: e,
19556
19556
  strategy: i
19557
- }) : S.rects), {
19557
+ }) : k.rects), {
19558
19558
  x: u,
19559
19559
  y: d
19560
19560
  } = jd(c, f, a)), m = -1);
@@ -19587,10 +19587,10 @@ const UC = 50, WC = async (n, e, t) => {
19587
19587
  const d = Tc(u), f = {
19588
19588
  x: t,
19589
19589
  y: r
19590
- }, h = Ec(i), p = Sc(h), m = await s.getDimensions(c), g = h === "y", y = g ? "top" : "left", v = g ? "bottom" : "right", w = g ? "clientHeight" : "clientWidth", x = o.reference[p] + o.reference[h] - f[h] - o.floating[p], C = f[h] - o.reference[h], S = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c));
19591
- let k = S ? S[w] : 0;
19592
- (!k || !await (s.isElement == null ? void 0 : s.isElement(S))) && (k = l.floating[w] || o.floating[p]);
19593
- const N = x / 2 - C / 2, _ = k / 2 - m[p] / 2 - 1, L = kt(d[y], _), j = kt(d[v], _), J = L, K = k - m[p] - j, R = k / 2 - m[p] / 2 + N, B = ka(J, R, K), V = !a.arrow && xt(i) != null && R !== B && o.reference[p] / 2 - (R < J ? L : j) - m[p] / 2 < 0, D = V ? R < J ? R - J : R - K : 0;
19590
+ }, h = Ec(i), p = kc(h), m = await s.getDimensions(c), g = h === "y", y = g ? "top" : "left", v = g ? "bottom" : "right", w = g ? "clientHeight" : "clientWidth", x = o.reference[p] + o.reference[h] - f[h] - o.floating[p], C = f[h] - o.reference[h], k = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c));
19591
+ let S = k ? k[w] : 0;
19592
+ (!S || !await (s.isElement == null ? void 0 : s.isElement(k))) && (S = l.floating[w] || o.floating[p]);
19593
+ const N = x / 2 - C / 2, _ = S / 2 - m[p] / 2 - 1, L = St(d[y], _), j = St(d[v], _), J = L, K = S - m[p] - j, R = S / 2 - m[p] / 2 + N, B = Sa(J, R, K), V = !a.arrow && xt(i) != null && R !== B && o.reference[p] / 2 - (R < J ? L : j) - m[p] / 2 < 0, D = V ? R < J ? R - J : R - K : 0;
19594
19594
  return {
19595
19595
  [h]: f[h] + D,
19596
19596
  data: {
@@ -19638,18 +19638,18 @@ const qC = function(n) {
19638
19638
  const x = [g[ht(v)], g[w[0]], g[w[1]]], C = [...((r = s.autoPlacement) == null ? void 0 : r.overflows) || [], {
19639
19639
  placement: v,
19640
19640
  overflows: x
19641
- }], S = m[y + 1];
19642
- if (S)
19641
+ }], k = m[y + 1];
19642
+ if (k)
19643
19643
  return {
19644
19644
  data: {
19645
19645
  index: y + 1,
19646
19646
  overflows: C
19647
19647
  },
19648
19648
  reset: {
19649
- placement: S
19649
+ placement: k
19650
19650
  }
19651
19651
  };
19652
- const k = C.map((L) => {
19652
+ const S = C.map((L) => {
19653
19653
  const j = xt(L.placement);
19654
19654
  return [L.placement, j && u ? (
19655
19655
  // Check along the mainAxis and main crossAxis side.
@@ -19658,12 +19658,12 @@ const qC = function(n) {
19658
19658
  // Check only the mainAxis.
19659
19659
  L.overflows[0]
19660
19660
  ), L.overflows];
19661
- }).sort((L, j) => L[1] - j[1]), _ = ((i = k.filter((L) => L[2].slice(
19661
+ }).sort((L, j) => L[1] - j[1]), _ = ((i = S.filter((L) => L[2].slice(
19662
19662
  0,
19663
19663
  // Aligned placements should not check their opposite crossAxis
19664
19664
  // side.
19665
19665
  xt(L[0]) ? 2 : 3
19666
- ).every((j) => j <= 0))[0]) == null ? void 0 : i[0]) || k[0][0];
19666
+ ).every((j) => j <= 0))[0]) == null ? void 0 : i[0]) || S[0][0];
19667
19667
  return _ !== l ? {
19668
19668
  data: {
19669
19669
  index: y + 1,
@@ -19699,9 +19699,9 @@ const qC = function(n) {
19699
19699
  } = ln(n, e);
19700
19700
  if ((t = o.arrow) != null && t.alignmentOffset)
19701
19701
  return {};
19702
- const y = ht(i), v = Rt(l), w = ht(l) === l, x = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), C = f || (w || !m ? [Qo(l)] : _C(l)), S = p !== "none";
19703
- !f && S && C.push(...FC(l, m, p, x));
19704
- const k = [l, ...C], N = await a.detectOverflow(e, g), _ = [];
19702
+ const y = ht(i), v = Rt(l), w = ht(l) === l, x = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), C = f || (w || !m ? [Qo(l)] : _C(l)), k = p !== "none";
19703
+ !f && k && C.push(...FC(l, m, p, x));
19704
+ const S = [l, ...C], N = await a.detectOverflow(e, g), _ = [];
19705
19705
  let L = ((r = o.flip) == null ? void 0 : r.overflows) || [];
19706
19706
  if (u && _.push(N[y]), d) {
19707
19707
  const R = Nm(i, s, x);
@@ -19712,7 +19712,7 @@ const qC = function(n) {
19712
19712
  overflows: _
19713
19713
  }], !_.every((R) => R <= 0)) {
19714
19714
  var j, J;
19715
- const R = (((j = o.flip) == null ? void 0 : j.index) || 0) + 1, B = k[R];
19715
+ const R = (((j = o.flip) == null ? void 0 : j.index) || 0) + 1, B = S[R];
19716
19716
  if (B && (!(d === "alignment" ? v !== Rt(B) : !1) || // We leave the current main axis only if every placement on that axis
19717
19717
  // overflows the main axis.
19718
19718
  L.every((O) => Rt(O.placement) === v ? O.overflows[0] > 0 : !0)))
@@ -19731,7 +19731,7 @@ const qC = function(n) {
19731
19731
  case "bestFit": {
19732
19732
  var K;
19733
19733
  const D = (K = L.filter((O) => {
19734
- if (S) {
19734
+ if (k) {
19735
19735
  const F = Rt(O.placement);
19736
19736
  return F === v || // Create a bias to the `y` side axis due to horizontal
19737
19737
  // reading directions favoring greater width.
@@ -19812,7 +19812,7 @@ const JC = function(n) {
19812
19812
  };
19813
19813
  };
19814
19814
  function Rm(n) {
19815
- const e = kt(...n.map((o) => o.left)), t = kt(...n.map((o) => o.top)), r = _e(...n.map((o) => o.right)), i = _e(...n.map((o) => o.bottom));
19815
+ const e = St(...n.map((o) => o.left)), t = St(...n.map((o) => o.top)), r = _e(...n.map((o) => o.right)), i = _e(...n.map((o) => o.bottom));
19816
19816
  return {
19817
19817
  x: e,
19818
19818
  y: t,
@@ -19827,7 +19827,7 @@ function YC(n) {
19827
19827
  const o = e[i];
19828
19828
  !r || o.y - r.y > r.height / 2 ? t.push([o]) : t[t.length - 1].push(o), r = o;
19829
19829
  }
19830
- return t.map((i) => Sr(Rm(i)));
19830
+ return t.map((i) => kr(Rm(i)));
19831
19831
  }
19832
19832
  const XC = function(n) {
19833
19833
  return n === void 0 && (n = {}), {
@@ -19844,7 +19844,7 @@ const XC = function(n) {
19844
19844
  padding: l = 2,
19845
19845
  x: a,
19846
19846
  y: c
19847
- } = ln(n, e), u = Array.from(await (o.getClientRects == null ? void 0 : o.getClientRects(r.reference)) || []), d = YC(u), f = Sr(Rm(u)), h = Tc(l);
19847
+ } = ln(n, e), u = Array.from(await (o.getClientRects == null ? void 0 : o.getClientRects(r.reference)) || []), d = YC(u), f = kr(Rm(u)), h = Tc(l);
19848
19848
  function p() {
19849
19849
  if (d.length === 2 && d[0].left > d[1].right && a != null && c != null)
19850
19850
  return d.find((g) => a > g.left - h.left && a < g.right + h.right && c > g.top - h.top && c < g.bottom + h.bottom) || f;
@@ -19862,15 +19862,15 @@ const XC = function(n) {
19862
19862
  y: K
19863
19863
  };
19864
19864
  }
19865
- const g = ht(t) === "left", y = _e(...d.map((L) => L.right)), v = kt(...d.map((L) => L.left)), w = d.filter((L) => g ? L.left === v : L.right === y), x = w[0].top, C = w[w.length - 1].bottom, S = v, k = y, N = k - S, _ = C - x;
19865
+ const g = ht(t) === "left", y = _e(...d.map((L) => L.right)), v = St(...d.map((L) => L.left)), w = d.filter((L) => g ? L.left === v : L.right === y), x = w[0].top, C = w[w.length - 1].bottom, k = v, S = y, N = S - k, _ = C - x;
19866
19866
  return {
19867
19867
  top: x,
19868
19868
  bottom: C,
19869
- left: S,
19870
- right: k,
19869
+ left: k,
19870
+ right: S,
19871
19871
  width: N,
19872
19872
  height: _,
19873
- x: S,
19873
+ x: k,
19874
19874
  y: x
19875
19875
  };
19876
19876
  }
@@ -19918,7 +19918,7 @@ async function QC(n, e) {
19918
19918
  y: h * u
19919
19919
  };
19920
19920
  }
19921
- const ek = function(n) {
19921
+ const eS = function(n) {
19922
19922
  return n === void 0 && (n = 0), {
19923
19923
  name: "offset",
19924
19924
  options: n,
@@ -19940,7 +19940,7 @@ const ek = function(n) {
19940
19940
  };
19941
19941
  }
19942
19942
  };
19943
- }, tk = function(n) {
19943
+ }, tS = function(n) {
19944
19944
  return n === void 0 && (n = {}), {
19945
19945
  name: "shift",
19946
19946
  options: n,
@@ -19973,11 +19973,11 @@ const ek = function(n) {
19973
19973
  let p = u[h], m = u[f];
19974
19974
  if (s) {
19975
19975
  const y = h === "y" ? "top" : "left", v = h === "y" ? "bottom" : "right", w = p + d[y], x = p - d[v];
19976
- p = ka(w, p, x);
19976
+ p = Sa(w, p, x);
19977
19977
  }
19978
19978
  if (l) {
19979
19979
  const y = f === "y" ? "top" : "left", v = f === "y" ? "bottom" : "right", w = m + d[y], x = m - d[v];
19980
- m = ka(w, m, x);
19980
+ m = Sa(w, m, x);
19981
19981
  }
19982
19982
  const g = a.fn({
19983
19983
  ...e,
@@ -19997,7 +19997,7 @@ const ek = function(n) {
19997
19997
  };
19998
19998
  }
19999
19999
  };
20000
- }, nk = function(n) {
20000
+ }, nS = function(n) {
20001
20001
  return n === void 0 && (n = {}), {
20002
20002
  name: "size",
20003
20003
  options: n,
@@ -20018,16 +20018,16 @@ const ek = function(n) {
20018
20018
  } = o.floating;
20019
20019
  let g, y;
20020
20020
  d === "top" || d === "bottom" ? (g = d, y = f === (await (s.isRTL == null ? void 0 : s.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (y = d, g = f === "end" ? "top" : "bottom");
20021
- const v = m - u.top - u.bottom, w = p - u.left - u.right, x = kt(m - u[g], v), C = kt(p - u[y], w), S = !e.middlewareData.shift;
20022
- let k = x, N = C;
20023
- if ((t = e.middlewareData.shift) != null && t.enabled.x && (N = w), (r = e.middlewareData.shift) != null && r.enabled.y && (k = v), S && !f) {
20021
+ const v = m - u.top - u.bottom, w = p - u.left - u.right, x = St(m - u[g], v), C = St(p - u[y], w), k = !e.middlewareData.shift;
20022
+ let S = x, N = C;
20023
+ if ((t = e.middlewareData.shift) != null && t.enabled.x && (N = w), (r = e.middlewareData.shift) != null && r.enabled.y && (S = v), k && !f) {
20024
20024
  const L = _e(u.left, 0), j = _e(u.right, 0), J = _e(u.top, 0), K = _e(u.bottom, 0);
20025
- h ? N = p - 2 * (L !== 0 || j !== 0 ? L + j : _e(u.left, u.right)) : k = m - 2 * (J !== 0 || K !== 0 ? J + K : _e(u.top, u.bottom));
20025
+ h ? N = p - 2 * (L !== 0 || j !== 0 ? L + j : _e(u.left, u.right)) : S = m - 2 * (J !== 0 || K !== 0 ? J + K : _e(u.top, u.bottom));
20026
20026
  }
20027
20027
  await a({
20028
20028
  ...e,
20029
20029
  availableWidth: N,
20030
- availableHeight: k
20030
+ availableHeight: S
20031
20031
  });
20032
20032
  const _ = await s.getDimensions(l.floating);
20033
20033
  return p !== _.width || m !== _.height ? {
@@ -20055,13 +20055,13 @@ function zt(n) {
20055
20055
  function Mc(n) {
20056
20056
  return Ws() ? n instanceof Node || n instanceof Ke(n).Node : !1;
20057
20057
  }
20058
- function ie(n) {
20058
+ function oe(n) {
20059
20059
  return Ws() ? n instanceof Element || n instanceof Ke(n).Element : !1;
20060
20060
  }
20061
20061
  function mt(n) {
20062
20062
  return Ws() ? n instanceof HTMLElement || n instanceof Ke(n).HTMLElement : !1;
20063
20063
  }
20064
- function Sa(n) {
20064
+ function ka(n) {
20065
20065
  return !Ws() || typeof ShadowRoot > "u" ? !1 : n instanceof ShadowRoot || n instanceof Ke(n).ShadowRoot;
20066
20066
  }
20067
20067
  function Oi(n) {
@@ -20073,7 +20073,7 @@ function Oi(n) {
20073
20073
  } = pt(n);
20074
20074
  return /auto|scroll|overlay|hidden|clip/.test(e + r + t) && i !== "inline" && i !== "contents";
20075
20075
  }
20076
- function rk(n) {
20076
+ function rS(n) {
20077
20077
  return /^(table|td|th)$/.test(Rr(n));
20078
20078
  }
20079
20079
  function js(n) {
@@ -20088,13 +20088,13 @@ function js(n) {
20088
20088
  return !1;
20089
20089
  }
20090
20090
  }
20091
- const ik = /transform|translate|scale|rotate|perspective|filter/, ok = /paint|layout|strict|content/, _n = (n) => !!n && n !== "none";
20091
+ const iS = /transform|translate|scale|rotate|perspective|filter/, oS = /paint|layout|strict|content/, _n = (n) => !!n && n !== "none";
20092
20092
  let Tl;
20093
20093
  function Ac(n) {
20094
- const e = ie(n) ? pt(n) : n;
20095
- return _n(e.transform) || _n(e.translate) || _n(e.scale) || _n(e.rotate) || _n(e.perspective) || !Ks() && (_n(e.backdropFilter) || _n(e.filter)) || ik.test(e.willChange || "") || ok.test(e.contain || "");
20094
+ const e = oe(n) ? pt(n) : n;
20095
+ return _n(e.transform) || _n(e.translate) || _n(e.scale) || _n(e.rotate) || _n(e.perspective) || !Ks() && (_n(e.backdropFilter) || _n(e.filter)) || iS.test(e.willChange || "") || oS.test(e.contain || "");
20096
20096
  }
20097
- function sk(n) {
20097
+ function sS(n) {
20098
20098
  let e = rn(n);
20099
20099
  for (; mt(e) && !tn(e); ) {
20100
20100
  if (Ac(e))
@@ -20115,7 +20115,7 @@ function pt(n) {
20115
20115
  return Ke(n).getComputedStyle(n);
20116
20116
  }
20117
20117
  function qs(n) {
20118
- return ie(n) ? {
20118
+ return oe(n) ? {
20119
20119
  scrollLeft: n.scrollLeft,
20120
20120
  scrollTop: n.scrollTop
20121
20121
  } : {
@@ -20130,10 +20130,10 @@ function rn(n) {
20130
20130
  // Step into the shadow DOM of the parent of a slotted node.
20131
20131
  n.assignedSlot || // DOM Element detected.
20132
20132
  n.parentNode || // ShadowRoot detected.
20133
- Sa(n) && n.host || // Fallback.
20133
+ ka(n) && n.host || // Fallback.
20134
20134
  zt(n)
20135
20135
  );
20136
- return Sa(e) ? e.host : e;
20136
+ return ka(e) ? e.host : e;
20137
20137
  }
20138
20138
  function Im(n) {
20139
20139
  const e = rn(n);
@@ -20163,7 +20163,7 @@ function Dm(n) {
20163
20163
  };
20164
20164
  }
20165
20165
  function Oc(n) {
20166
- return ie(n) ? n : n.contextElement;
20166
+ return oe(n) ? n : n.contextElement;
20167
20167
  }
20168
20168
  function hr(n) {
20169
20169
  const e = Oc(n);
@@ -20180,33 +20180,33 @@ function hr(n) {
20180
20180
  y: l
20181
20181
  };
20182
20182
  }
20183
- const lk = /* @__PURE__ */ Dt(0);
20183
+ const lS = /* @__PURE__ */ Dt(0);
20184
20184
  function Lm(n) {
20185
20185
  const e = Ke(n);
20186
- return !Ks() || !e.visualViewport ? lk : {
20186
+ return !Ks() || !e.visualViewport ? lS : {
20187
20187
  x: e.visualViewport.offsetLeft,
20188
20188
  y: e.visualViewport.offsetTop
20189
20189
  };
20190
20190
  }
20191
- function ak(n, e, t) {
20191
+ function aS(n, e, t) {
20192
20192
  return e === void 0 && (e = !1), !t || e && t !== Ke(n) ? !1 : e;
20193
20193
  }
20194
20194
  function Xn(n, e, t, r) {
20195
20195
  e === void 0 && (e = !1), t === void 0 && (t = !1);
20196
20196
  const i = n.getBoundingClientRect(), o = Oc(n);
20197
20197
  let s = Dt(1);
20198
- e && (r ? ie(r) && (s = hr(r)) : s = hr(n));
20199
- const l = ak(o, t, r) ? Lm(o) : Dt(0);
20198
+ e && (r ? oe(r) && (s = hr(r)) : s = hr(n));
20199
+ const l = aS(o, t, r) ? Lm(o) : Dt(0);
20200
20200
  let a = (i.left + l.x) / s.x, c = (i.top + l.y) / s.y, u = i.width / s.x, d = i.height / s.y;
20201
20201
  if (o) {
20202
- const f = Ke(o), h = r && ie(r) ? Ke(r) : r;
20202
+ const f = Ke(o), h = r && oe(r) ? Ke(r) : r;
20203
20203
  let p = f, m = Ea(p);
20204
20204
  for (; m && r && h !== p; ) {
20205
20205
  const g = hr(m), y = m.getBoundingClientRect(), v = pt(m), w = y.left + (m.clientLeft + parseFloat(v.paddingLeft)) * g.x, x = y.top + (m.clientTop + parseFloat(v.paddingTop)) * g.y;
20206
20206
  a *= g.x, c *= g.y, u *= g.x, d *= g.y, a += w, c += x, p = Ke(m), m = Ea(p);
20207
20207
  }
20208
20208
  }
20209
- return Sr({
20209
+ return kr({
20210
20210
  width: u,
20211
20211
  height: d,
20212
20212
  x: a,
@@ -20224,7 +20224,7 @@ function Pm(n, e) {
20224
20224
  y: i
20225
20225
  };
20226
20226
  }
20227
- function ck(n) {
20227
+ function cS(n) {
20228
20228
  let {
20229
20229
  elements: e,
20230
20230
  rect: t,
@@ -20251,10 +20251,10 @@ function ck(n) {
20251
20251
  y: t.y * c.y - a.scrollTop * c.y + u.y + f.y
20252
20252
  };
20253
20253
  }
20254
- function uk(n) {
20254
+ function uS(n) {
20255
20255
  return Array.from(n.getClientRects());
20256
20256
  }
20257
- function dk(n) {
20257
+ function dS(n) {
20258
20258
  const e = zt(n), t = qs(n), r = n.ownerDocument.body, i = _e(e.scrollWidth, e.clientWidth, r.scrollWidth, r.clientWidth), o = _e(e.scrollHeight, e.clientHeight, r.scrollHeight, r.clientHeight);
20259
20259
  let s = -t.scrollLeft + Gs(n);
20260
20260
  const l = -t.scrollTop;
@@ -20266,7 +20266,7 @@ function dk(n) {
20266
20266
  };
20267
20267
  }
20268
20268
  const Gd = 25;
20269
- function fk(n, e) {
20269
+ function fS(n, e) {
20270
20270
  const t = Ke(n), r = zt(n), i = t.visualViewport;
20271
20271
  let o = r.clientWidth, s = r.clientHeight, l = 0, a = 0;
20272
20272
  if (i) {
@@ -20286,7 +20286,7 @@ function fk(n, e) {
20286
20286
  y: a
20287
20287
  };
20288
20288
  }
20289
- function hk(n, e) {
20289
+ function hS(n, e) {
20290
20290
  const t = Xn(n, !0, e === "fixed"), r = t.top + n.clientTop, i = t.left + n.clientLeft, o = mt(n) ? hr(n) : Dt(1), s = n.clientWidth * o.x, l = n.clientHeight * o.y, a = i * o.x, c = r * o.y;
20291
20291
  return {
20292
20292
  width: s,
@@ -20298,11 +20298,11 @@ function hk(n, e) {
20298
20298
  function Jd(n, e, t) {
20299
20299
  let r;
20300
20300
  if (e === "viewport")
20301
- r = fk(n, t);
20301
+ r = fS(n, t);
20302
20302
  else if (e === "document")
20303
- r = dk(zt(n));
20304
- else if (ie(e))
20305
- r = hk(e, t);
20303
+ r = dS(zt(n));
20304
+ else if (oe(e))
20305
+ r = hS(e, t);
20306
20306
  else {
20307
20307
  const i = Lm(n);
20308
20308
  r = {
@@ -20312,37 +20312,37 @@ function Jd(n, e, t) {
20312
20312
  height: e.height
20313
20313
  };
20314
20314
  }
20315
- return Sr(r);
20315
+ return kr(r);
20316
20316
  }
20317
20317
  function _m(n, e) {
20318
20318
  const t = rn(n);
20319
- return t === e || !ie(t) || tn(t) ? !1 : pt(t).position === "fixed" || _m(t, e);
20319
+ return t === e || !oe(t) || tn(t) ? !1 : pt(t).position === "fixed" || _m(t, e);
20320
20320
  }
20321
- function pk(n, e) {
20321
+ function pS(n, e) {
20322
20322
  const t = e.get(n);
20323
20323
  if (t)
20324
20324
  return t;
20325
- let r = En(n, [], !1).filter((l) => ie(l) && Rr(l) !== "body"), i = null;
20325
+ let r = En(n, [], !1).filter((l) => oe(l) && Rr(l) !== "body"), i = null;
20326
20326
  const o = pt(n).position === "fixed";
20327
20327
  let s = o ? rn(n) : n;
20328
- for (; ie(s) && !tn(s); ) {
20328
+ for (; oe(s) && !tn(s); ) {
20329
20329
  const l = pt(s), a = Ac(s);
20330
20330
  !a && l.position === "fixed" && (i = null), (o ? !a && !i : !a && l.position === "static" && !!i && (i.position === "absolute" || i.position === "fixed") || Oi(s) && !a && _m(n, s)) ? r = r.filter((u) => u !== s) : i = l, s = rn(s);
20331
20331
  }
20332
20332
  return e.set(n, r), r;
20333
20333
  }
20334
- function mk(n) {
20334
+ function mS(n) {
20335
20335
  let {
20336
20336
  element: e,
20337
20337
  boundary: t,
20338
20338
  rootBoundary: r,
20339
20339
  strategy: i
20340
20340
  } = n;
20341
- const s = [...t === "clippingAncestors" ? js(e) ? [] : pk(e, this._c) : [].concat(t), r], l = Jd(e, s[0], i);
20341
+ const s = [...t === "clippingAncestors" ? js(e) ? [] : pS(e, this._c) : [].concat(t), r], l = Jd(e, s[0], i);
20342
20342
  let a = l.top, c = l.right, u = l.bottom, d = l.left;
20343
20343
  for (let f = 1; f < s.length; f++) {
20344
20344
  const h = Jd(e, s[f], i);
20345
- a = _e(h.top, a), c = kt(h.right, c), u = kt(h.bottom, u), d = _e(h.left, d);
20345
+ a = _e(h.top, a), c = St(h.right, c), u = St(h.bottom, u), d = _e(h.left, d);
20346
20346
  }
20347
20347
  return {
20348
20348
  width: c - d,
@@ -20351,7 +20351,7 @@ function mk(n) {
20351
20351
  y: a
20352
20352
  };
20353
20353
  }
20354
- function gk(n) {
20354
+ function gS(n) {
20355
20355
  const {
20356
20356
  width: e,
20357
20357
  height: t
@@ -20361,7 +20361,7 @@ function gk(n) {
20361
20361
  height: t
20362
20362
  };
20363
20363
  }
20364
- function yk(n, e, t) {
20364
+ function yS(n, e, t) {
20365
20365
  const r = mt(e), i = zt(e), o = t === "fixed", s = Xn(n, !0, o, e);
20366
20366
  let l = {
20367
20367
  scrollLeft: 0,
@@ -20403,21 +20403,21 @@ function Bm(n, e) {
20403
20403
  if (!mt(n)) {
20404
20404
  let i = rn(n);
20405
20405
  for (; i && !tn(i); ) {
20406
- if (ie(i) && !Ml(i))
20406
+ if (oe(i) && !Ml(i))
20407
20407
  return i;
20408
20408
  i = rn(i);
20409
20409
  }
20410
20410
  return t;
20411
20411
  }
20412
20412
  let r = Yd(n, e);
20413
- for (; r && rk(r) && Ml(r); )
20413
+ for (; r && rS(r) && Ml(r); )
20414
20414
  r = Yd(r, e);
20415
- return r && tn(r) && Ml(r) && !Ac(r) ? t : r || sk(n) || t;
20415
+ return r && tn(r) && Ml(r) && !Ac(r) ? t : r || sS(n) || t;
20416
20416
  }
20417
- const bk = async function(n) {
20417
+ const bS = async function(n) {
20418
20418
  const e = this.getOffsetParent || Bm, t = this.getDimensions, r = await t(n.floating);
20419
20419
  return {
20420
- reference: yk(n.reference, await e(n.floating), n.strategy),
20420
+ reference: yS(n.reference, await e(n.floating), n.strategy),
20421
20421
  floating: {
20422
20422
  x: 0,
20423
20423
  y: 0,
@@ -20426,25 +20426,25 @@ const bk = async function(n) {
20426
20426
  }
20427
20427
  };
20428
20428
  };
20429
- function vk(n) {
20429
+ function vS(n) {
20430
20430
  return pt(n).direction === "rtl";
20431
20431
  }
20432
- const wk = {
20433
- convertOffsetParentRelativeRectToViewportRelativeRect: ck,
20432
+ const wS = {
20433
+ convertOffsetParentRelativeRectToViewportRelativeRect: cS,
20434
20434
  getDocumentElement: zt,
20435
- getClippingRect: mk,
20435
+ getClippingRect: mS,
20436
20436
  getOffsetParent: Bm,
20437
- getElementRects: bk,
20438
- getClientRects: uk,
20439
- getDimensions: gk,
20437
+ getElementRects: bS,
20438
+ getClientRects: uS,
20439
+ getDimensions: gS,
20440
20440
  getScale: hr,
20441
- isElement: ie,
20442
- isRTL: vk
20441
+ isElement: oe,
20442
+ isRTL: vS
20443
20443
  };
20444
20444
  function $m(n, e) {
20445
20445
  return n.x === e.x && n.y === e.y && n.width === e.width && n.height === e.height;
20446
20446
  }
20447
- function xk(n, e) {
20447
+ function xS(n, e) {
20448
20448
  let t = null, r;
20449
20449
  const i = zt(n);
20450
20450
  function o() {
@@ -20463,19 +20463,19 @@ function xk(n, e) {
20463
20463
  return;
20464
20464
  const p = Wi(d), m = Wi(i.clientWidth - (u + f)), g = Wi(i.clientHeight - (d + h)), y = Wi(u), w = {
20465
20465
  rootMargin: -p + "px " + -m + "px " + -g + "px " + -y + "px",
20466
- threshold: _e(0, kt(1, a)) || 1
20466
+ threshold: _e(0, St(1, a)) || 1
20467
20467
  };
20468
20468
  let x = !0;
20469
- function C(S) {
20470
- const k = S[0].intersectionRatio;
20471
- if (k !== a) {
20469
+ function C(k) {
20470
+ const S = k[0].intersectionRatio;
20471
+ if (S !== a) {
20472
20472
  if (!x)
20473
20473
  return s();
20474
- k ? s(!1, k) : r = setTimeout(() => {
20474
+ S ? s(!1, S) : r = setTimeout(() => {
20475
20475
  s(!1, 1e-7);
20476
20476
  }, 1e3);
20477
20477
  }
20478
- k === 1 && !$m(c, n.getBoundingClientRect()) && s(), x = !1;
20478
+ S === 1 && !$m(c, n.getBoundingClientRect()) && s(), x = !1;
20479
20479
  }
20480
20480
  try {
20481
20481
  t = new IntersectionObserver(C, {
@@ -20490,7 +20490,7 @@ function xk(n, e) {
20490
20490
  }
20491
20491
  return s(!0), o;
20492
20492
  }
20493
- function Ck(n, e, t, r) {
20493
+ function CS(n, e, t, r) {
20494
20494
  r === void 0 && (r = {});
20495
20495
  const {
20496
20496
  ancestorScroll: i = !0,
@@ -20504,7 +20504,7 @@ function Ck(n, e, t, r) {
20504
20504
  passive: !0
20505
20505
  }), o && y.addEventListener("resize", t);
20506
20506
  });
20507
- const d = c && l ? xk(c, t) : null;
20507
+ const d = c && l ? xS(c, t) : null;
20508
20508
  let f = -1, h = null;
20509
20509
  s && (h = new ResizeObserver((y) => {
20510
20510
  let [v] = y;
@@ -20526,9 +20526,9 @@ function Ck(n, e, t, r) {
20526
20526
  }), d?.(), (y = h) == null || y.disconnect(), h = null, a && cancelAnimationFrame(p);
20527
20527
  };
20528
20528
  }
20529
- const Nc = ek, zm = qC, Rc = tk, Ic = GC, Fm = nk, Hm = JC, Vm = jC, Um = XC, Dc = (n, e, t) => {
20529
+ const Nc = eS, zm = qC, Rc = tS, Ic = GC, Fm = nS, Hm = JC, Vm = jC, Um = XC, Dc = (n, e, t) => {
20530
20530
  const r = /* @__PURE__ */ new Map(), i = {
20531
- platform: wk,
20531
+ platform: wS,
20532
20532
  ...t
20533
20533
  }, o = {
20534
20534
  ...i.platform,
@@ -20609,12 +20609,12 @@ var qt = class {
20609
20609
  }
20610
20610
  }
20611
20611
  static get(n) {
20612
- return Ta(n) || Ma(n, kk(n));
20612
+ return Ta(n) || Ma(n, SS(n));
20613
20613
  }
20614
20614
  };
20615
- function kk(n) {
20615
+ function SS(n) {
20616
20616
  if (n.type.spec.tableRole != "table") throw new RangeError("Not a table node: " + n.type.name);
20617
- const e = Sk(n), t = n.childCount, r = [];
20617
+ const e = kS(n), t = n.childCount, r = [];
20618
20618
  let i = 0, o = null;
20619
20619
  const s = [];
20620
20620
  for (let c = 0, u = e * t; c < u; c++) r[c] = 0;
@@ -20642,10 +20642,10 @@ function kk(n) {
20642
20642
  pos: u,
20643
20643
  n: g - C
20644
20644
  });
20645
- const S = v && v[C];
20646
- if (S) {
20647
- const k = (x + C) % e * 2, N = s[k];
20648
- N == null || N != S && s[k + 1] == 1 ? (s[k] = S, s[k + 1] = 1) : N == S && s[k + 1]++;
20645
+ const k = v && v[C];
20646
+ if (k) {
20647
+ const S = (x + C) % e * 2, N = s[S];
20648
+ N == null || N != k && s[S + 1] == 1 ? (s[S] = k, s[S + 1] = 1) : N == k && s[S + 1]++;
20649
20649
  }
20650
20650
  }
20651
20651
  }
@@ -20664,9 +20664,9 @@ function kk(n) {
20664
20664
  const l = new qt(e, t, r, o);
20665
20665
  let a = !1;
20666
20666
  for (let c = 0; !a && c < s.length; c += 2) s[c] != null && s[c + 1] < t && (a = !0);
20667
- return a && Ek(l, s, n), l;
20667
+ return a && ES(l, s, n), l;
20668
20668
  }
20669
- function Sk(n) {
20669
+ function kS(n) {
20670
20670
  let e = -1, t = !1;
20671
20671
  for (let r = 0; r < n.childCount; r++) {
20672
20672
  const i = n.child(r);
@@ -20686,7 +20686,7 @@ function Sk(n) {
20686
20686
  }
20687
20687
  return e;
20688
20688
  }
20689
- function Ek(n, e, t) {
20689
+ function ES(n, e, t) {
20690
20690
  n.problems || (n.problems = []);
20691
20691
  const r = {};
20692
20692
  for (let i = 0; i < n.map.length; i++) {
@@ -20699,7 +20699,7 @@ function Ek(n, e, t) {
20699
20699
  const a = s.attrs;
20700
20700
  for (let c = 0; c < a.colspan; c++) {
20701
20701
  const u = e[(i + c) % n.width * 2];
20702
- u != null && (!a.colwidth || a.colwidth[c] != u) && ((l || (l = Tk(a)))[c] = u);
20702
+ u != null && (!a.colwidth || a.colwidth[c] != u) && ((l || (l = TS(a)))[c] = u);
20703
20703
  }
20704
20704
  l && n.problems.unshift({
20705
20705
  type: "colwidth mismatch",
@@ -20708,7 +20708,7 @@ function Ek(n, e, t) {
20708
20708
  });
20709
20709
  }
20710
20710
  }
20711
- function Tk(n) {
20711
+ function TS(n) {
20712
20712
  if (n.colwidth) return n.colwidth.slice();
20713
20713
  const e = [];
20714
20714
  for (let t = 0; t < n.colspan; t++) e.push(0);
@@ -20726,7 +20726,7 @@ function Lc(n) {
20726
20726
  return e;
20727
20727
  }
20728
20728
  new ue("selectingCells");
20729
- function Mk(n) {
20729
+ function MS(n) {
20730
20730
  for (let e = n.depth - 1; e > 0; e--) if (n.node(e).type.spec.tableRole == "row") return n.node(0).resolve(n.before(e + 1));
20731
20731
  return null;
20732
20732
  }
@@ -20735,15 +20735,15 @@ function Wm(n) {
20735
20735
  for (let t = e.depth; t > 0; t--) if (e.node(t).type.spec.tableRole == "row") return !0;
20736
20736
  return !1;
20737
20737
  }
20738
- function Ak(n) {
20738
+ function AS(n) {
20739
20739
  const e = n.selection;
20740
20740
  if ("$anchorCell" in e && e.$anchorCell) return e.$anchorCell.pos > e.$headCell.pos ? e.$anchorCell : e.$headCell;
20741
20741
  if ("node" in e && e.node && e.node.type.spec.tableRole == "cell") return e.$anchor;
20742
- const t = Mk(e.$head) || Ok(e.$head);
20742
+ const t = MS(e.$head) || OS(e.$head);
20743
20743
  if (t) return t;
20744
20744
  throw new RangeError(`No cell found around position ${e.head}`);
20745
20745
  }
20746
- function Ok(n) {
20746
+ function OS(n) {
20747
20747
  for (let e = n.nodeAfter, t = n.pos; e; e = e.firstChild, t++) {
20748
20748
  const r = e.type.spec.tableRole;
20749
20749
  if (r == "cell" || r == "header_cell") return n.doc.resolve(t);
@@ -20875,12 +20875,12 @@ var Lt = class jt extends H {
20875
20875
  return new jt(e.resolve(t), e.resolve(r));
20876
20876
  }
20877
20877
  getBookmark() {
20878
- return new Nk(this.$anchorCell.pos, this.$headCell.pos);
20878
+ return new NS(this.$anchorCell.pos, this.$headCell.pos);
20879
20879
  }
20880
20880
  };
20881
20881
  Lt.prototype.visible = !1;
20882
20882
  H.jsonID("cell", Lt);
20883
- var Nk = class qm {
20883
+ var NS = class qm {
20884
20884
  constructor(e, t) {
20885
20885
  this.anchor = e, this.head = t;
20886
20886
  }
@@ -20894,7 +20894,7 @@ var Nk = class qm {
20894
20894
  };
20895
20895
  new ue("fix-tables");
20896
20896
  function Gm(n) {
20897
- const e = n.selection, t = Ak(n), r = t.node(-1), i = t.start(-1), o = qt.get(r);
20897
+ const e = n.selection, t = AS(n), r = t.node(-1), i = t.start(-1), o = qt.get(r);
20898
20898
  return {
20899
20899
  ...e instanceof Lt ? o.rectBetween(e.$anchorCell.pos - i, e.$headCell.pos - i) : o.findCell(t.pos - i),
20900
20900
  tableStart: i,
@@ -20902,7 +20902,7 @@ function Gm(n) {
20902
20902
  table: r
20903
20903
  };
20904
20904
  }
20905
- function Rk(n) {
20905
+ function RS(n) {
20906
20906
  return function(e, t) {
20907
20907
  if (!Wm(e)) return !1;
20908
20908
  if (t) {
@@ -20938,7 +20938,7 @@ function Qd(n, e, t) {
20938
20938
  return !0;
20939
20939
  }
20940
20940
  function Pc(n, e) {
20941
- return e = e || { useDeprecatedLogic: !1 }, e.useDeprecatedLogic ? Rk(n) : function(t, r) {
20941
+ return e = e || { useDeprecatedLogic: !1 }, e.useDeprecatedLogic ? RS(n) : function(t, r) {
20942
20942
  if (!Wm(t)) return !1;
20943
20943
  if (r) {
20944
20944
  const i = Lc(t.schema), o = Gm(t), s = t.tr, l = Qd("row", o, i), a = Qd("column", o, i), c = (n === "column" ? l : n === "row" && a) ? 1 : 0, u = n == "column" ? {
@@ -21036,11 +21036,11 @@ function Jm(n, e, t) {
21036
21036
  return null;
21037
21037
  }
21038
21038
  new ue("tableColumnResizing");
21039
- function Ik(n, e) {
21039
+ function IS(n, e) {
21040
21040
  const t = Math.min(n.top, e.top), r = Math.max(n.bottom, e.bottom), i = Math.min(n.left, e.left), s = Math.max(n.right, e.right) - i, l = r - t, a = i, c = t;
21041
21041
  return new DOMRect(a, c, s, l);
21042
21042
  }
21043
- var Dk = class {
21043
+ var DS = class {
21044
21044
  constructor({
21045
21045
  editor: n,
21046
21046
  element: e,
@@ -21154,7 +21154,7 @@ var Dk = class {
21154
21154
  const { $anchorCell: l, $headCell: a } = r, c = l ? l.pos : a.pos, u = a ? a.pos : l.pos, d = this.view.nodeDOM(c), f = this.view.nodeDOM(u);
21155
21155
  if (!d || !f)
21156
21156
  return;
21157
- const h = d === f ? d.getBoundingClientRect() : Ik(
21157
+ const h = d === f ? d.getBoundingClientRect() : IS(
21158
21158
  d.getBoundingClientRect(),
21159
21159
  f.getBoundingClientRect()
21160
21160
  );
@@ -21228,7 +21228,7 @@ var Dk = class {
21228
21228
  }
21229
21229
  }, Ym = (n) => new le({
21230
21230
  key: typeof n.pluginKey == "string" ? new ue(n.pluginKey) : n.pluginKey,
21231
- view: (e) => new Dk({ view: e, ...n })
21231
+ view: (e) => new DS({ view: e, ...n })
21232
21232
  });
21233
21233
  ne.create({
21234
21234
  name: "bubbleMenu",
@@ -21258,7 +21258,7 @@ ne.create({
21258
21258
  });
21259
21259
  var Gi = { exports: {} }, Al = {};
21260
21260
  var ef;
21261
- function Lk() {
21261
+ function LS() {
21262
21262
  if (ef) return Al;
21263
21263
  ef = 1;
21264
21264
  var n = nt;
@@ -21300,7 +21300,7 @@ function Lk() {
21300
21300
  }
21301
21301
  var Ol = {};
21302
21302
  var tf;
21303
- function Pk() {
21303
+ function PS() {
21304
21304
  return tf || (tf = 1, process.env.NODE_ENV !== "production" && (function() {
21305
21305
  function n(h, p) {
21306
21306
  return h === p && (h !== 0 || 1 / h === 1 / p) || h !== h && p !== p;
@@ -21354,10 +21354,10 @@ function Pk() {
21354
21354
  }
21355
21355
  var nf;
21356
21356
  function _c() {
21357
- return nf || (nf = 1, process.env.NODE_ENV === "production" ? Gi.exports = Lk() : Gi.exports = Pk()), Gi.exports;
21357
+ return nf || (nf = 1, process.env.NODE_ENV === "production" ? Gi.exports = LS() : Gi.exports = PS()), Gi.exports;
21358
21358
  }
21359
- var _k = _c();
21360
- const { getOwnPropertyNames: Bk, getOwnPropertySymbols: $k } = Object, { hasOwnProperty: zk } = Object.prototype;
21359
+ var _S = _c();
21360
+ const { getOwnPropertyNames: BS, getOwnPropertySymbols: $S } = Object, { hasOwnProperty: zS } = Object.prototype;
21361
21361
  function Nl(n, e) {
21362
21362
  return function(r, i, o) {
21363
21363
  return n(r, i, o) && e(r, i, o);
@@ -21375,24 +21375,24 @@ function Ji(n) {
21375
21375
  return o.delete(t), o.delete(r), a;
21376
21376
  };
21377
21377
  }
21378
- function Fk(n) {
21378
+ function FS(n) {
21379
21379
  return n?.[Symbol.toStringTag];
21380
21380
  }
21381
21381
  function rf(n) {
21382
- return Bk(n).concat($k(n));
21382
+ return BS(n).concat($S(n));
21383
21383
  }
21384
- const Hk = (
21384
+ const HS = (
21385
21385
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
21386
- Object.hasOwn || ((n, e) => zk.call(n, e))
21386
+ Object.hasOwn || ((n, e) => zS.call(n, e))
21387
21387
  );
21388
21388
  function rr(n, e) {
21389
21389
  return n === e || !n && !e && n !== n && e !== e;
21390
21390
  }
21391
- const Vk = "__v", Uk = "__o", Wk = "_owner", { getOwnPropertyDescriptor: of, keys: sf } = Object;
21392
- function jk(n, e) {
21391
+ const VS = "__v", US = "__o", WS = "_owner", { getOwnPropertyDescriptor: of, keys: sf } = Object;
21392
+ function jS(n, e) {
21393
21393
  return n.byteLength === e.byteLength && es(new Uint8Array(n), new Uint8Array(e));
21394
21394
  }
21395
- function Kk(n, e, t) {
21395
+ function KS(n, e, t) {
21396
21396
  let r = n.length;
21397
21397
  if (e.length !== r)
21398
21398
  return !1;
@@ -21401,16 +21401,16 @@ function Kk(n, e, t) {
21401
21401
  return !1;
21402
21402
  return !0;
21403
21403
  }
21404
- function qk(n, e) {
21404
+ function qS(n, e) {
21405
21405
  return n.byteLength === e.byteLength && es(new Uint8Array(n.buffer, n.byteOffset, n.byteLength), new Uint8Array(e.buffer, e.byteOffset, e.byteLength));
21406
21406
  }
21407
- function Gk(n, e) {
21407
+ function GS(n, e) {
21408
21408
  return rr(n.getTime(), e.getTime());
21409
21409
  }
21410
- function Jk(n, e) {
21410
+ function JS(n, e) {
21411
21411
  return n.name === e.name && n.message === e.message && n.cause === e.cause && n.stack === e.stack;
21412
21412
  }
21413
- function Yk(n, e) {
21413
+ function YS(n, e) {
21414
21414
  return n === e;
21415
21415
  }
21416
21416
  function lf(n, e, t) {
@@ -21442,8 +21442,8 @@ function lf(n, e, t) {
21442
21442
  }
21443
21443
  return !0;
21444
21444
  }
21445
- const Xk = rr;
21446
- function Zk(n, e, t) {
21445
+ const XS = rr;
21446
+ function ZS(n, e, t) {
21447
21447
  const r = sf(n);
21448
21448
  let i = r.length;
21449
21449
  if (sf(e).length !== i)
@@ -21464,10 +21464,10 @@ function Pr(n, e, t) {
21464
21464
  return !1;
21465
21465
  return !0;
21466
21466
  }
21467
- function Qk(n, e) {
21467
+ function QS(n, e) {
21468
21468
  return rr(n.valueOf(), e.valueOf());
21469
21469
  }
21470
- function eS(n, e) {
21470
+ function ek(n, e) {
21471
21471
  return n.source === e.source && n.flags === e.flags;
21472
21472
  }
21473
21473
  function af(n, e, t) {
@@ -21502,13 +21502,13 @@ function es(n, e) {
21502
21502
  return !1;
21503
21503
  return !0;
21504
21504
  }
21505
- function tS(n, e) {
21505
+ function tk(n, e) {
21506
21506
  return n.hostname === e.hostname && n.pathname === e.pathname && n.protocol === e.protocol && n.port === e.port && n.hash === e.hash && n.username === e.username && n.password === e.password;
21507
21507
  }
21508
21508
  function Xm(n, e, t, r) {
21509
- return (r === Wk || r === Uk || r === Vk) && (n.$$typeof || e.$$typeof) ? !0 : Hk(e, r) && t.equals(n[r], e[r], r, r, n, e, t);
21509
+ return (r === WS || r === US || r === VS) && (n.$$typeof || e.$$typeof) ? !0 : HS(e, r) && t.equals(n[r], e[r], r, r, n, e, t);
21510
21510
  }
21511
- const nS = "[object ArrayBuffer]", rS = "[object Arguments]", iS = "[object Boolean]", oS = "[object DataView]", sS = "[object Date]", lS = "[object Error]", aS = "[object Map]", cS = "[object Number]", uS = "[object Object]", dS = "[object RegExp]", fS = "[object Set]", hS = "[object String]", pS = {
21511
+ const nk = "[object ArrayBuffer]", rk = "[object Arguments]", ik = "[object Boolean]", ok = "[object DataView]", sk = "[object Date]", lk = "[object Error]", ak = "[object Map]", ck = "[object Number]", uk = "[object Object]", dk = "[object RegExp]", fk = "[object Set]", hk = "[object String]", pk = {
21512
21512
  "[object Int8Array]": !0,
21513
21513
  "[object Uint8Array]": !0,
21514
21514
  "[object Uint8ClampedArray]": !0,
@@ -21521,8 +21521,8 @@ const nS = "[object ArrayBuffer]", rS = "[object Arguments]", iS = "[object Bool
21521
21521
  "[object Float64Array]": !0,
21522
21522
  "[object BigInt64Array]": !0,
21523
21523
  "[object BigUint64Array]": !0
21524
- }, mS = "[object URL]", gS = Object.prototype.toString;
21525
- function yS({ areArrayBuffersEqual: n, areArraysEqual: e, areDataViewsEqual: t, areDatesEqual: r, areErrorsEqual: i, areFunctionsEqual: o, areMapsEqual: s, areNumbersEqual: l, areObjectsEqual: a, arePrimitiveWrappersEqual: c, areRegExpsEqual: u, areSetsEqual: d, areTypedArraysEqual: f, areUrlsEqual: h, unknownTagComparators: p }) {
21524
+ }, mk = "[object URL]", gk = Object.prototype.toString;
21525
+ function yk({ areArrayBuffersEqual: n, areArraysEqual: e, areDataViewsEqual: t, areDatesEqual: r, areErrorsEqual: i, areFunctionsEqual: o, areMapsEqual: s, areNumbersEqual: l, areObjectsEqual: a, arePrimitiveWrappersEqual: c, areRegExpsEqual: u, areSetsEqual: d, areTypedArraysEqual: f, areUrlsEqual: h, unknownTagComparators: p }) {
21526
21526
  return function(g, y, v) {
21527
21527
  if (g === y)
21528
21528
  return !0;
@@ -21548,59 +21548,59 @@ function yS({ areArrayBuffersEqual: n, areArraysEqual: e, areDataViewsEqual: t,
21548
21548
  return s(g, y, v);
21549
21549
  if (x === Set)
21550
21550
  return d(g, y, v);
21551
- const C = gS.call(g);
21552
- if (C === sS)
21551
+ const C = gk.call(g);
21552
+ if (C === sk)
21553
21553
  return r(g, y, v);
21554
- if (C === dS)
21554
+ if (C === dk)
21555
21555
  return u(g, y, v);
21556
- if (C === aS)
21556
+ if (C === ak)
21557
21557
  return s(g, y, v);
21558
- if (C === fS)
21558
+ if (C === fk)
21559
21559
  return d(g, y, v);
21560
- if (C === uS)
21560
+ if (C === uk)
21561
21561
  return typeof g.then != "function" && typeof y.then != "function" && a(g, y, v);
21562
- if (C === mS)
21562
+ if (C === mk)
21563
21563
  return h(g, y, v);
21564
- if (C === lS)
21564
+ if (C === lk)
21565
21565
  return i(g, y, v);
21566
- if (C === rS)
21566
+ if (C === rk)
21567
21567
  return a(g, y, v);
21568
- if (pS[C])
21568
+ if (pk[C])
21569
21569
  return f(g, y, v);
21570
- if (C === nS)
21570
+ if (C === nk)
21571
21571
  return n(g, y, v);
21572
- if (C === oS)
21572
+ if (C === ok)
21573
21573
  return t(g, y, v);
21574
- if (C === iS || C === cS || C === hS)
21574
+ if (C === ik || C === ck || C === hk)
21575
21575
  return c(g, y, v);
21576
21576
  if (p) {
21577
- let S = p[C];
21578
- if (!S) {
21579
- const k = Fk(g);
21580
- k && (S = p[k]);
21577
+ let k = p[C];
21578
+ if (!k) {
21579
+ const S = FS(g);
21580
+ S && (k = p[S]);
21581
21581
  }
21582
- if (S)
21583
- return S(g, y, v);
21582
+ if (k)
21583
+ return k(g, y, v);
21584
21584
  }
21585
21585
  return !1;
21586
21586
  };
21587
21587
  }
21588
- function bS({ circular: n, createCustomConfig: e, strict: t }) {
21588
+ function bk({ circular: n, createCustomConfig: e, strict: t }) {
21589
21589
  let r = {
21590
- areArrayBuffersEqual: jk,
21591
- areArraysEqual: t ? Pr : Kk,
21592
- areDataViewsEqual: qk,
21593
- areDatesEqual: Gk,
21594
- areErrorsEqual: Jk,
21595
- areFunctionsEqual: Yk,
21590
+ areArrayBuffersEqual: jS,
21591
+ areArraysEqual: t ? Pr : KS,
21592
+ areDataViewsEqual: qS,
21593
+ areDatesEqual: GS,
21594
+ areErrorsEqual: JS,
21595
+ areFunctionsEqual: YS,
21596
21596
  areMapsEqual: t ? Nl(lf, Pr) : lf,
21597
- areNumbersEqual: Xk,
21598
- areObjectsEqual: t ? Pr : Zk,
21599
- arePrimitiveWrappersEqual: Qk,
21600
- areRegExpsEqual: eS,
21597
+ areNumbersEqual: XS,
21598
+ areObjectsEqual: t ? Pr : ZS,
21599
+ arePrimitiveWrappersEqual: QS,
21600
+ areRegExpsEqual: ek,
21601
21601
  areSetsEqual: t ? Nl(af, Pr) : af,
21602
21602
  areTypedArraysEqual: t ? Nl(es, Pr) : es,
21603
- areUrlsEqual: tS,
21603
+ areUrlsEqual: tk,
21604
21604
  unknownTagComparators: void 0
21605
21605
  };
21606
21606
  if (e && (r = Object.assign({}, r, e(r))), n) {
@@ -21614,12 +21614,12 @@ function bS({ circular: n, createCustomConfig: e, strict: t }) {
21614
21614
  }
21615
21615
  return r;
21616
21616
  }
21617
- function vS(n) {
21617
+ function vk(n) {
21618
21618
  return function(e, t, r, i, o, s, l) {
21619
21619
  return n(e, t, l);
21620
21620
  };
21621
21621
  }
21622
- function wS({ circular: n, comparator: e, createState: t, equals: r, strict: i }) {
21622
+ function wk({ circular: n, comparator: e, createState: t, equals: r, strict: i }) {
21623
21623
  if (t)
21624
21624
  return function(l, a) {
21625
21625
  const { cache: c = n ? /* @__PURE__ */ new WeakMap() : void 0, meta: u } = t();
@@ -21649,7 +21649,7 @@ function wS({ circular: n, comparator: e, createState: t, equals: r, strict: i }
21649
21649
  return e(l, a, o);
21650
21650
  };
21651
21651
  }
21652
- const xS = In();
21652
+ const xk = In();
21653
21653
  In({ strict: !0 });
21654
21654
  In({ circular: !0 });
21655
21655
  In({
@@ -21673,12 +21673,12 @@ In({
21673
21673
  strict: !0
21674
21674
  });
21675
21675
  function In(n = {}) {
21676
- const { circular: e = !1, createInternalComparator: t, createState: r, strict: i = !1 } = n, o = bS(n), s = yS(o), l = t ? t(s) : vS(s);
21677
- return wS({ circular: e, comparator: s, createState: r, equals: l, strict: i });
21676
+ const { circular: e = !1, createInternalComparator: t, createState: r, strict: i = !1 } = n, o = bk(n), s = yk(o), l = t ? t(s) : vk(s);
21677
+ return wk({ circular: e, comparator: s, createState: r, equals: l, strict: i });
21678
21678
  }
21679
21679
  var Yi = { exports: {} }, Rl = {};
21680
21680
  var cf;
21681
- function CS() {
21681
+ function Ck() {
21682
21682
  if (cf) return Rl;
21683
21683
  cf = 1;
21684
21684
  var n = nt, e = _c();
@@ -21694,18 +21694,18 @@ function CS() {
21694
21694
  } else m = p.current;
21695
21695
  p = l(
21696
21696
  function() {
21697
- function y(S) {
21697
+ function y(k) {
21698
21698
  if (!v) {
21699
- if (v = !0, w = S, S = f(S), h !== void 0 && m.hasValue) {
21700
- var k = m.value;
21701
- if (h(k, S))
21702
- return x = k;
21699
+ if (v = !0, w = k, k = f(k), h !== void 0 && m.hasValue) {
21700
+ var S = m.value;
21701
+ if (h(S, k))
21702
+ return x = S;
21703
21703
  }
21704
- return x = S;
21704
+ return x = k;
21705
21705
  }
21706
- if (k = x, r(w, S)) return k;
21707
- var N = f(S);
21708
- return h !== void 0 && h(k, N) ? (w = S, k) : (w = S, x = N);
21706
+ if (S = x, r(w, k)) return S;
21707
+ var N = f(k);
21708
+ return h !== void 0 && h(S, N) ? (w = k, S) : (w = k, x = N);
21709
21709
  }
21710
21710
  var v = !1, w, x, C = d === void 0 ? null : d;
21711
21711
  return [
@@ -21730,7 +21730,7 @@ function CS() {
21730
21730
  }
21731
21731
  var Il = {};
21732
21732
  var uf;
21733
- function kS() {
21733
+ function Sk() {
21734
21734
  return uf || (uf = 1, process.env.NODE_ENV !== "production" && (function() {
21735
21735
  function n(c, u) {
21736
21736
  return c === u && (c !== 0 || 1 / c === 1 / u) || c !== c && u !== u;
@@ -21745,19 +21745,19 @@ function kS() {
21745
21745
  } else m = p.current;
21746
21746
  p = l(
21747
21747
  function() {
21748
- function y(S) {
21748
+ function y(k) {
21749
21749
  if (!v) {
21750
- if (v = !0, w = S, S = f(S), h !== void 0 && m.hasValue) {
21751
- var k = m.value;
21752
- if (h(k, S))
21753
- return x = k;
21750
+ if (v = !0, w = k, k = f(k), h !== void 0 && m.hasValue) {
21751
+ var S = m.value;
21752
+ if (h(S, k))
21753
+ return x = S;
21754
21754
  }
21755
- return x = S;
21755
+ return x = k;
21756
21756
  }
21757
- if (k = x, r(w, S))
21758
- return k;
21759
- var N = f(S);
21760
- return h !== void 0 && h(k, N) ? (w = S, k) : (w = S, x = N);
21757
+ if (S = x, r(w, k))
21758
+ return S;
21759
+ var N = f(k);
21760
+ return h !== void 0 && h(S, N) ? (w = k, S) : (w = k, x = N);
21761
21761
  }
21762
21762
  var v = !1, w, x, C = d === void 0 ? null : d;
21763
21763
  return [
@@ -21782,22 +21782,22 @@ function kS() {
21782
21782
  })()), Il;
21783
21783
  }
21784
21784
  var df;
21785
- function SS() {
21786
- return df || (df = 1, process.env.NODE_ENV === "production" ? Yi.exports = CS() : Yi.exports = kS()), Yi.exports;
21785
+ function kk() {
21786
+ return df || (df = 1, process.env.NODE_ENV === "production" ? Yi.exports = Ck() : Yi.exports = Sk()), Yi.exports;
21787
21787
  }
21788
- var ES = SS(), TS = (...n) => (e) => {
21788
+ var Ek = kk(), Tk = (...n) => (e) => {
21789
21789
  n.forEach((t) => {
21790
21790
  typeof t == "function" ? t(e) : t && (t.current = e);
21791
21791
  });
21792
- }, MS = ({ contentComponent: n }) => {
21793
- const e = _k.useSyncExternalStore(
21792
+ }, Mk = ({ contentComponent: n }) => {
21793
+ const e = _S.useSyncExternalStore(
21794
21794
  n.subscribe,
21795
21795
  n.getSnapshot,
21796
21796
  n.getServerSnapshot
21797
21797
  );
21798
21798
  return /* @__PURE__ */ E(Mr, { children: Object.values(e) });
21799
21799
  };
21800
- function AS() {
21800
+ function Ak() {
21801
21801
  const n = /* @__PURE__ */ new Set();
21802
21802
  let e = {};
21803
21803
  return {
@@ -21833,7 +21833,7 @@ function AS() {
21833
21833
  }
21834
21834
  };
21835
21835
  }
21836
- var OS = class extends nt.Component {
21836
+ var Ok = class extends nt.Component {
21837
21837
  constructor(n) {
21838
21838
  var e;
21839
21839
  super(n), this.editorContentRef = nt.createRef(), this.initialized = !1, this.state = {
@@ -21855,7 +21855,7 @@ var OS = class extends nt.Component {
21855
21855
  const t = this.editorContentRef.current;
21856
21856
  t.append(...e.view.dom.parentNode.childNodes), e.setOptions({
21857
21857
  element: t
21858
- }), e.contentComponent = AS(), this.state.hasContentComponentInitialized || (this.unsubscribeToContentComponent = e.contentComponent.subscribe(() => {
21858
+ }), e.contentComponent = Ak(), this.state.hasContentComponentInitialized || (this.unsubscribeToContentComponent = e.contentComponent.subscribe(() => {
21859
21859
  this.setState((r) => r.hasContentComponentInitialized ? r : {
21860
21860
  hasContentComponentInitialized: !0
21861
21861
  }), this.unsubscribeToContentComponent && this.unsubscribeToContentComponent();
@@ -21883,20 +21883,20 @@ var OS = class extends nt.Component {
21883
21883
  render() {
21884
21884
  const { editor: n, innerRef: e, ...t } = this.props;
21885
21885
  return /* @__PURE__ */ ce(Mr, { children: [
21886
- /* @__PURE__ */ E("div", { ref: TS(e, this.editorContentRef), ...t }),
21887
- n?.contentComponent && /* @__PURE__ */ E(MS, { contentComponent: n.contentComponent })
21886
+ /* @__PURE__ */ E("div", { ref: Tk(e, this.editorContentRef), ...t }),
21887
+ n?.contentComponent && /* @__PURE__ */ E(Mk, { contentComponent: n.contentComponent })
21888
21888
  ] });
21889
21889
  }
21890
- }, NS = xe(
21890
+ }, Nk = xe(
21891
21891
  (n, e) => {
21892
21892
  const t = nt.useMemo(() => Math.floor(Math.random() * 4294967295).toString(), [n.editor]);
21893
- return nt.createElement(OS, {
21893
+ return nt.createElement(Ok, {
21894
21894
  key: t,
21895
21895
  innerRef: e,
21896
21896
  ...n
21897
21897
  });
21898
21898
  }
21899
- ), RS = nt.memo(NS), IS = typeof window < "u" ? As : be, DS = class {
21899
+ ), Rk = nt.memo(Nk), Ik = typeof window < "u" ? As : be, Dk = class {
21900
21900
  constructor(n) {
21901
21901
  this.transactionNumber = 0, this.lastTransactionNumber = 0, this.subscribers = /* @__PURE__ */ new Set(), this.editor = n, this.lastSnapshot = { editor: n, 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);
21902
21902
  }
@@ -21934,31 +21934,31 @@ var OS = class extends nt.Component {
21934
21934
  }
21935
21935
  }
21936
21936
  };
21937
- function LS(n) {
21937
+ function Lk(n) {
21938
21938
  var e;
21939
- const [t] = ye(() => new DS(n.editor)), r = ES.useSyncExternalStoreWithSelector(
21939
+ const [t] = ge(() => new Dk(n.editor)), r = Ek.useSyncExternalStoreWithSelector(
21940
21940
  t.subscribe,
21941
21941
  t.getSnapshot,
21942
21942
  t.getServerSnapshot,
21943
21943
  n.selector,
21944
- (e = n.equalityFn) != null ? e : xS
21944
+ (e = n.equalityFn) != null ? e : xk
21945
21945
  );
21946
- return IS(() => t.watch(n.editor), [n.editor, t]), ty(r), r;
21946
+ return Ik(() => t.watch(n.editor), [n.editor, t]), ty(r), r;
21947
21947
  }
21948
21948
  process.env.NODE_ENV;
21949
21949
  var Bc = Or({
21950
21950
  editor: null
21951
21951
  });
21952
21952
  Bc.Consumer;
21953
- var $c = () => Ar(Bc), PS = Or({
21953
+ var $c = () => Ar(Bc), Pk = Or({
21954
21954
  onDragStart: () => {
21955
21955
  },
21956
21956
  nodeViewContentChildren: void 0,
21957
21957
  nodeViewContentRef: () => {
21958
21958
  }
21959
- }), _S = () => Ar(PS);
21959
+ }), _k = () => Ar(Pk);
21960
21960
  nt.forwardRef((n, e) => {
21961
- const { onDragStart: t } = _S(), r = n.as || "div";
21961
+ const { onDragStart: t } = _k(), r = n.as || "div";
21962
21962
  return (
21963
21963
  // @ts-ignore
21964
21964
  /* @__PURE__ */ E(
@@ -21986,7 +21986,7 @@ var zc = Or({
21986
21986
  }
21987
21987
  });
21988
21988
  zc.displayName = "TiptapContext";
21989
- var BS = () => Ar(zc);
21989
+ var Bk = () => Ar(zc);
21990
21990
  function Zm({ editor: n, instance: e, children: t }) {
21991
21991
  const r = n ?? e;
21992
21992
  if (!r)
@@ -21996,8 +21996,8 @@ function Zm({ editor: n, instance: e, children: t }) {
21996
21996
  }
21997
21997
  Zm.displayName = "Tiptap";
21998
21998
  function Qm({ ...n }) {
21999
- const { editor: e } = BS();
22000
- return /* @__PURE__ */ E(RS, { editor: e, ...n });
21999
+ const { editor: e } = Bk();
22000
+ return /* @__PURE__ */ E(Rk, { editor: e, ...n });
22001
22001
  }
22002
22002
  Qm.displayName = "Tiptap.Content";
22003
22003
  Object.assign(Zm, {
@@ -22007,7 +22007,7 @@ Object.assign(Zm, {
22007
22007
  */
22008
22008
  Content: Qm
22009
22009
  });
22010
- var $S = class {
22010
+ var $k = class {
22011
22011
  constructor({
22012
22012
  editor: n,
22013
22013
  element: e,
@@ -22144,7 +22144,7 @@ var $S = class {
22144
22144
  }
22145
22145
  }, eg = (n) => new le({
22146
22146
  key: typeof n.pluginKey == "string" ? new ue(n.pluginKey) : n.pluginKey,
22147
- view: (e) => new $S({ view: e, ...n })
22147
+ view: (e) => new $k({ view: e, ...n })
22148
22148
  });
22149
22149
  ne.create({
22150
22150
  name: "floatingMenu",
@@ -22179,7 +22179,7 @@ ne.create({
22179
22179
  ] : [];
22180
22180
  }
22181
22181
  });
22182
- var zS = nt.forwardRef(
22182
+ var zk = nt.forwardRef(
22183
22183
  ({
22184
22184
  pluginKey: n = "bubbleMenu",
22185
22185
  editor: e,
@@ -22204,7 +22204,7 @@ var zS = nt.forwardRef(
22204
22204
  options: l
22205
22205
  }, m = et(p);
22206
22206
  m.current = p;
22207
- const [g, y] = ye(!1), v = et(!0);
22207
+ const [g, y] = ge(!1), v = et(!0);
22208
22208
  return be(() => {
22209
22209
  if (h?.isDestroyed)
22210
22210
  return;
@@ -22274,7 +22274,7 @@ nt.forwardRef(
22274
22274
  options: s
22275
22275
  }, p = et(h);
22276
22276
  p.current = h;
22277
- const [m, g] = ye(!1), y = et(!0);
22277
+ const [m, g] = ge(!1), y = et(!0);
22278
22278
  return be(() => {
22279
22279
  if (f?.isDestroyed)
22280
22280
  return;
@@ -22314,7 +22314,7 @@ nt.forwardRef(
22314
22314
  }, [m, f, t, r, o, s, i]), Nf(/* @__PURE__ */ E("div", { ...a, children: l }), u.current);
22315
22315
  }
22316
22316
  );
22317
- const FS = {
22317
+ const Fk = {
22318
22318
  mod: "⌘",
22319
22319
  command: "⌘",
22320
22320
  meta: "⌘",
@@ -22329,21 +22329,21 @@ const FS = {
22329
22329
  escape: "⎋",
22330
22330
  capslock: "⇪"
22331
22331
  };
22332
- function St(...n) {
22332
+ function kt(...n) {
22333
22333
  return n.filter(Boolean).join(" ");
22334
22334
  }
22335
- function HS() {
22335
+ function Hk() {
22336
22336
  return typeof navigator < "u" && navigator.platform.toLowerCase().includes("mac");
22337
22337
  }
22338
- const VS = (n, e, t = !0) => {
22338
+ const Vk = (n, e, t = !0) => {
22339
22339
  if (e) {
22340
22340
  const r = n.toLowerCase();
22341
- return FS[r] || (t ? n.toUpperCase() : n);
22341
+ return Fk[r] || (t ? n.toUpperCase() : n);
22342
22342
  }
22343
22343
  return t ? n.charAt(0).toUpperCase() + n.slice(1) : n;
22344
22344
  }, Js = (n) => {
22345
22345
  const { shortcutKeys: e, delimiter: t = "+", capitalize: r = !0 } = n;
22346
- return e ? e.split(t).map((i) => i.trim()).map((i) => VS(i, HS(), r)) : [];
22346
+ return e ? e.split(t).map((i) => i.trim()).map((i) => Vk(i, Hk(), r)) : [];
22347
22347
  }, Ni = (n, e) => e?.schema ? e.schema.spec.marks.get(n) !== void 0 : !1;
22348
22348
  function tg(n, e) {
22349
22349
  if (!n) return !1;
@@ -22377,7 +22377,7 @@ function Dn(n) {
22377
22377
  () => n || e,
22378
22378
  [n, e]
22379
22379
  );
22380
- return LS({
22380
+ return Lk({
22381
22381
  editor: t,
22382
22382
  selector(i) {
22383
22383
  return i.editor ? {
@@ -22392,7 +22392,7 @@ function Dn(n) {
22392
22392
  }
22393
22393
  }) || { editor: null };
22394
22394
  }
22395
- var US = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert] *)", "textarea:not([inert]):not([inert] *)", "a[href]:not([inert]):not([inert] *)", "button:not([inert]):not([inert] *)", "[tabindex]:not(slot):not([inert]):not([inert] *)", "audio[controls]:not([inert]):not([inert] *)", "video[controls]:not([inert]):not([inert] *)", '[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)', "details>summary:first-of-type:not([inert]):not([inert] *)", "details:not([inert]):not([inert] *)"], Aa = /* @__PURE__ */ US.join(","), ng = typeof Element > "u", di = ng ? function() {
22395
+ var Uk = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert] *)", "textarea:not([inert]):not([inert] *)", "a[href]:not([inert]):not([inert] *)", "button:not([inert]):not([inert] *)", "[tabindex]:not(slot):not([inert]):not([inert] *)", "audio[controls]:not([inert]):not([inert] *)", "video[controls]:not([inert]):not([inert] *)", '[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)', "details>summary:first-of-type:not([inert]):not([inert] *)", "details:not([inert]):not([inert] *)"], Aa = /* @__PURE__ */ Uk.join(","), ng = typeof Element > "u", di = ng ? function() {
22396
22396
  } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, ts = !ng && Element.prototype.getRootNode ? function(n) {
22397
22397
  var e;
22398
22398
  return n == null || (e = n.getRootNode) === null || e === void 0 ? void 0 : e.call(n);
@@ -22405,10 +22405,10 @@ var US = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
22405
22405
  // lookup upward, in case it is not defined.
22406
22406
  (typeof e.closest == "function" ? e.closest("[inert]") : ns(e.parentNode));
22407
22407
  return s;
22408
- }, WS = function(e) {
22408
+ }, Wk = function(e) {
22409
22409
  var t, r = e == null || (t = e.getAttribute) === null || t === void 0 ? void 0 : t.call(e, "contenteditable");
22410
22410
  return r === "" || r === "true";
22411
- }, jS = function(e, t, r) {
22411
+ }, jk = function(e, t, r) {
22412
22412
  if (ns(e))
22413
22413
  return [];
22414
22414
  var i = Array.prototype.slice.apply(e.querySelectorAll(Aa));
@@ -22444,26 +22444,26 @@ var US = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
22444
22444
  }, ig = function(e) {
22445
22445
  if (!e)
22446
22446
  throw new Error("No node provided");
22447
- return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || WS(e)) && !rg(e) ? 0 : e.tabIndex;
22448
- }, KS = function(e, t) {
22447
+ return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || Wk(e)) && !rg(e) ? 0 : e.tabIndex;
22448
+ }, Kk = function(e, t) {
22449
22449
  var r = ig(e);
22450
22450
  return r < 0 && t && !rg(e) ? 0 : r;
22451
- }, qS = function(e, t) {
22451
+ }, qk = function(e, t) {
22452
22452
  return e.tabIndex === t.tabIndex ? e.documentOrder - t.documentOrder : e.tabIndex - t.tabIndex;
22453
22453
  }, og = function(e) {
22454
22454
  return e.tagName === "INPUT";
22455
- }, GS = function(e) {
22455
+ }, Gk = function(e) {
22456
22456
  return og(e) && e.type === "hidden";
22457
- }, JS = function(e) {
22457
+ }, Jk = function(e) {
22458
22458
  var t = e.tagName === "DETAILS" && Array.prototype.slice.apply(e.children).some(function(r) {
22459
22459
  return r.tagName === "SUMMARY";
22460
22460
  });
22461
22461
  return t;
22462
- }, YS = function(e, t) {
22462
+ }, Yk = function(e, t) {
22463
22463
  for (var r = 0; r < e.length; r++)
22464
22464
  if (e[r].checked && e[r].form === t)
22465
22465
  return e[r];
22466
- }, XS = function(e) {
22466
+ }, Xk = function(e) {
22467
22467
  if (!e.name)
22468
22468
  return !0;
22469
22469
  var t = e.form || ts(e), r = function(l) {
@@ -22477,12 +22477,12 @@ var US = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
22477
22477
  } catch (s) {
22478
22478
  return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", s.message), !1;
22479
22479
  }
22480
- var o = YS(i, e.form);
22480
+ var o = Yk(i, e.form);
22481
22481
  return !o || o === e;
22482
- }, ZS = function(e) {
22482
+ }, Zk = function(e) {
22483
22483
  return og(e) && e.type === "radio";
22484
- }, QS = function(e) {
22485
- return ZS(e) && !XS(e);
22484
+ }, Qk = function(e) {
22485
+ return Zk(e) && !Xk(e);
22486
22486
  }, eE = function(e) {
22487
22487
  var t, r = e && ts(e), i = (t = r) === null || t === void 0 ? void 0 : t.host, o = !1;
22488
22488
  if (r && r !== e) {
@@ -22553,17 +22553,17 @@ var US = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
22553
22553
  }
22554
22554
  return !1;
22555
22555
  }, rE = function(e, t) {
22556
- return !(t.disabled || GS(t) || tE(t, e) || // For a details element with a summary, the summary element gets the focus
22557
- JS(t) || nE(t));
22556
+ return !(t.disabled || Gk(t) || tE(t, e) || // For a details element with a summary, the summary element gets the focus
22557
+ Jk(t) || nE(t));
22558
22558
  }, hf = function(e, t) {
22559
- return !(QS(t) || ig(t) < 0 || !rE(e, t));
22559
+ return !(Qk(t) || ig(t) < 0 || !rE(e, t));
22560
22560
  }, iE = function(e) {
22561
22561
  var t = parseInt(e.getAttribute("tabindex"), 10);
22562
22562
  return !!(isNaN(t) || t >= 0);
22563
22563
  }, sg = function(e) {
22564
22564
  var t = [], r = [];
22565
22565
  return e.forEach(function(i, o) {
22566
- var s = !!i.scopeParent, l = s ? i.scopeParent : i, a = KS(l, s), c = s ? sg(i.candidates) : l;
22566
+ var s = !!i.scopeParent, l = s ? i.scopeParent : i, a = Kk(l, s), c = s ? sg(i.candidates) : l;
22567
22567
  a === 0 ? s ? t.push.apply(t, c) : t.push(l) : r.push({
22568
22568
  documentOrder: o,
22569
22569
  tabIndex: a,
@@ -22571,7 +22571,7 @@ var US = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
22571
22571
  isScope: s,
22572
22572
  content: c
22573
22573
  });
22574
- }), r.sort(qS).reduce(function(i, o) {
22574
+ }), r.sort(qk).reduce(function(i, o) {
22575
22575
  return o.isScope ? i.push.apply(i, o.content) : i.push(o.content), i;
22576
22576
  }, []).concat(t);
22577
22577
  }, lg = function(e, t) {
@@ -22582,7 +22582,7 @@ var US = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
22582
22582
  flatten: !1,
22583
22583
  getShadowRoot: t.getShadowRoot,
22584
22584
  shadowRootFilter: iE
22585
- }) : r = jS(e, t.includeContainer, hf.bind(null, t)), sg(r);
22585
+ }) : r = jk(e, t.includeContainer, hf.bind(null, t)), sg(r);
22586
22586
  };
22587
22587
  function oE() {
22588
22588
  const n = navigator.userAgentData;
@@ -22622,7 +22622,7 @@ function Er(n, e) {
22622
22622
  const t = e.getRootNode == null ? void 0 : e.getRootNode();
22623
22623
  if (n.contains(e))
22624
22624
  return !0;
22625
- if (t && Sa(t)) {
22625
+ if (t && ka(t)) {
22626
22626
  let r = e;
22627
22627
  for (; r; ) {
22628
22628
  if (n === r)
@@ -22737,8 +22737,8 @@ function mf(n) {
22737
22737
  delete t.dataset.tabindex, r ? t.setAttribute("tabindex", r) : t.removeAttribute("tabindex");
22738
22738
  });
22739
22739
  }
22740
- var kE = typeof document < "u", SE = function() {
22741
- }, oo = kE ? As : SE;
22740
+ var SE = typeof document < "u", kE = function() {
22741
+ }, oo = SE ? As : kE;
22742
22742
  function rs(n, e) {
22743
22743
  if (n === e)
22744
22744
  return !0;
@@ -22806,18 +22806,18 @@ function EE(n) {
22806
22806
  }), [f, h] = T.useState(r);
22807
22807
  rs(f, r) || h(r);
22808
22808
  const [p, m] = T.useState(null), [g, y] = T.useState(null), v = T.useCallback((O) => {
22809
- O !== S.current && (S.current = O, m(O));
22809
+ O !== k.current && (k.current = O, m(O));
22810
22810
  }, []), w = T.useCallback((O) => {
22811
- O !== k.current && (k.current = O, y(O));
22812
- }, []), x = o || p, C = s || g, S = T.useRef(null), k = T.useRef(null), N = T.useRef(u), _ = a != null, L = Pl(a), j = Pl(i), J = Pl(c), K = T.useCallback(() => {
22813
- if (!S.current || !k.current)
22811
+ O !== S.current && (S.current = O, y(O));
22812
+ }, []), x = o || p, C = s || g, k = T.useRef(null), S = T.useRef(null), N = T.useRef(u), _ = a != null, L = Pl(a), j = Pl(i), J = Pl(c), K = T.useCallback(() => {
22813
+ if (!k.current || !S.current)
22814
22814
  return;
22815
22815
  const O = {
22816
22816
  placement: e,
22817
22817
  strategy: t,
22818
22818
  middleware: f
22819
22819
  };
22820
- j.current && (O.platform = j.current), Dc(S.current, k.current, O).then((F) => {
22820
+ j.current && (O.platform = j.current), Dc(k.current, S.current, O).then((F) => {
22821
22821
  const Y = {
22822
22822
  ...F,
22823
22823
  // The floating element's position may be recomputed while it's closed
@@ -22841,15 +22841,15 @@ function EE(n) {
22841
22841
  oo(() => (R.current = !0, () => {
22842
22842
  R.current = !1;
22843
22843
  }), []), oo(() => {
22844
- if (x && (S.current = x), C && (k.current = C), x && C) {
22844
+ if (x && (k.current = x), C && (S.current = C), x && C) {
22845
22845
  if (L.current)
22846
22846
  return L.current(x, C, K);
22847
22847
  K();
22848
22848
  }
22849
22849
  }, [x, C, K, L, _]);
22850
22850
  const B = T.useMemo(() => ({
22851
- reference: S,
22852
- floating: k,
22851
+ reference: k,
22852
+ floating: S,
22853
22853
  setReference: v,
22854
22854
  setFloating: w
22855
22855
  }), [v, w]), V = T.useMemo(() => ({
@@ -23014,7 +23014,7 @@ function $E(n, e) {
23014
23014
  mouseOnly: u = !1,
23015
23015
  restMs: d = 0,
23016
23016
  move: f = !0
23017
- } = e, h = Uc(), p = Vc(), m = Xi(c), g = Xi(a), y = Xi(t), v = Xi(d), w = T.useRef(), x = T.useRef(-1), C = T.useRef(), S = T.useRef(-1), k = T.useRef(!0), N = T.useRef(!1), _ = T.useRef(() => {
23017
+ } = e, h = Uc(), p = Vc(), m = Xi(c), g = Xi(a), y = Xi(t), v = Xi(d), w = T.useRef(), x = T.useRef(-1), C = T.useRef(), k = T.useRef(-1), S = T.useRef(!0), N = T.useRef(!1), _ = T.useRef(() => {
23018
23018
  }), L = T.useRef(!1), j = Nt(() => {
23019
23019
  var D;
23020
23020
  const O = (D = i.current.openEvent) == null ? void 0 : D.type;
@@ -23026,7 +23026,7 @@ function $E(n, e) {
23026
23026
  let {
23027
23027
  open: F
23028
23028
  } = O;
23029
- F || (ot(x), ot(S), k.current = !0, L.current = !1);
23029
+ F || (ot(x), ot(k), S.current = !0, L.current = !1);
23030
23030
  }
23031
23031
  return o.on("openchange", D), () => {
23032
23032
  o.off("openchange", D);
@@ -23056,7 +23056,7 @@ function $E(n, e) {
23056
23056
  T.useEffect(() => {
23057
23057
  if (!l) return;
23058
23058
  function D(Z) {
23059
- if (ot(x), k.current = !1, u && !Ra(w.current) || Bl(v.current) > 0 && !_l(g.current, "open"))
23059
+ if (ot(x), S.current = !1, u && !Ra(w.current) || Bl(v.current) > 0 && !_l(g.current, "open"))
23060
23060
  return;
23061
23061
  const Ce = _l(g.current, "open", w.current);
23062
23062
  Ce ? x.current = window.setTimeout(() => {
@@ -23070,7 +23070,7 @@ function $E(n, e) {
23070
23070
  }
23071
23071
  _.current();
23072
23072
  const Ce = It(s.floating);
23073
- if (ot(S), L.current = !1, m.current && i.current.floatingContext) {
23073
+ if (ot(k), L.current = !1, m.current && i.current.floatingContext) {
23074
23074
  t || ot(x), C.current = m.current({
23075
23075
  ...i.current.floatingContext,
23076
23076
  tree: h,
@@ -23105,7 +23105,7 @@ function $E(n, e) {
23105
23105
  function Re(Z) {
23106
23106
  B() || J(Z, !1);
23107
23107
  }
23108
- if (ie(s.domReference)) {
23108
+ if (oe(s.domReference)) {
23109
23109
  const Z = s.domReference, Ce = s.floating;
23110
23110
  return t && Z.addEventListener("mouseleave", F), f && Z.addEventListener("mousemove", D, {
23111
23111
  once: !0
@@ -23118,7 +23118,7 @@ function $E(n, e) {
23118
23118
  if (l && t && (D = m.current) != null && (D = D.__options) != null && D.blockPointerEvents && j()) {
23119
23119
  N.current = !0;
23120
23120
  const F = s.floating;
23121
- if (ie(s.domReference) && F) {
23121
+ if (oe(s.domReference) && F) {
23122
23122
  var O;
23123
23123
  const Y = It(s.floating).body;
23124
23124
  Y.setAttribute(xf, "");
@@ -23131,7 +23131,7 @@ function $E(n, e) {
23131
23131
  }, [l, t, p, s, h, m, j]), Ct(() => {
23132
23132
  t || (w.current = void 0, L.current = !1, K(), R());
23133
23133
  }, [t, K, R]), T.useEffect(() => () => {
23134
- K(), ot(x), ot(S), R();
23134
+ K(), ot(x), ot(k), R();
23135
23135
  }, [l, s.domReference, K, R]);
23136
23136
  const V = T.useMemo(() => {
23137
23137
  function D(O) {
@@ -23145,9 +23145,9 @@ function $E(n, e) {
23145
23145
  nativeEvent: F
23146
23146
  } = O;
23147
23147
  function Y() {
23148
- !k.current && !y.current && r(!0, F, "hover");
23148
+ !S.current && !y.current && r(!0, F, "hover");
23149
23149
  }
23150
- u && !Ra(w.current) || t || Bl(v.current) === 0 || L.current && O.movementX ** 2 + O.movementY ** 2 < 2 || (ot(S), w.current === "touch" ? Y() : (L.current = !0, S.current = window.setTimeout(Y, Bl(v.current))));
23150
+ u && !Ra(w.current) || t || Bl(v.current) === 0 || L.current && O.movementX ** 2 + O.movementY ** 2 < 2 || (ot(k), w.current === "touch" ? Y() : (L.current = !0, k.current = window.setTimeout(Y, Bl(v.current))));
23151
23151
  }
23152
23152
  };
23153
23153
  }, [u, r, t, y, v]);
@@ -23211,7 +23211,7 @@ const HE = {
23211
23211
  width: "1px",
23212
23212
  top: 0,
23213
23213
  left: 0
23214
- }, kf = /* @__PURE__ */ T.forwardRef(function(e, t) {
23214
+ }, Sf = /* @__PURE__ */ T.forwardRef(function(e, t) {
23215
23215
  const [r, i] = T.useState();
23216
23216
  Ct(() => {
23217
23217
  ag() && i("button");
@@ -23234,7 +23234,7 @@ const HE = {
23234
23234
  position: "fixed",
23235
23235
  top: 0,
23236
23236
  left: 0
23237
- }, hg = /* @__PURE__ */ T.createContext(null), Sf = /* @__PURE__ */ Ri("portal");
23237
+ }, hg = /* @__PURE__ */ T.createContext(null), kf = /* @__PURE__ */ Ri("portal");
23238
23238
  function UE(n) {
23239
23239
  n === void 0 && (n = {});
23240
23240
  const {
@@ -23250,7 +23250,7 @@ function UE(n) {
23250
23250
  const a = e ? document.getElementById(e) : null;
23251
23251
  if (!a) return;
23252
23252
  const c = document.createElement("div");
23253
- c.id = r, c.setAttribute(Sf, ""), a.appendChild(c), l.current = c, s(c);
23253
+ c.id = r, c.setAttribute(kf, ""), a.appendChild(c), l.current = c, s(c);
23254
23254
  }, [e, r]), Ct(() => {
23255
23255
  if (t === null || !r || l.current) return;
23256
23256
  let a = t || i?.portalNode;
@@ -23258,7 +23258,7 @@ function UE(n) {
23258
23258
  let c = null;
23259
23259
  e && (c = document.createElement("div"), c.id = e, a.appendChild(c));
23260
23260
  const u = document.createElement("div");
23261
- u.id = r, u.setAttribute(Sf, ""), a = c || a, a.appendChild(u), l.current = u, s(u);
23261
+ u.id = r, u.setAttribute(kf, ""), a = c || a, a.appendChild(u), l.current = u, s(u);
23262
23262
  }, [e, t, r, i]), o;
23263
23263
  }
23264
23264
  function WE(n) {
@@ -23298,7 +23298,7 @@ function WE(n) {
23298
23298
  portalNode: o,
23299
23299
  setFocusManagerState: l
23300
23300
  }), [i, o]),
23301
- children: [p && o && /* @__PURE__ */ E(kf, {
23301
+ children: [p && o && /* @__PURE__ */ E(Sf, {
23302
23302
  "data-type": "outside",
23303
23303
  ref: a,
23304
23304
  onFocus: (m) => {
@@ -23313,7 +23313,7 @@ function WE(n) {
23313
23313
  }), p && o && /* @__PURE__ */ E("span", {
23314
23314
  "aria-owns": o.id,
23315
23315
  style: VE
23316
- }), o && /* @__PURE__ */ Of.createPortal(e, o), p && o && /* @__PURE__ */ E(kf, {
23316
+ }), o && /* @__PURE__ */ Of.createPortal(e, o), p && o && /* @__PURE__ */ E(Sf, {
23317
23317
  "data-type": "outside",
23318
23318
  ref: c,
23319
23319
  onFocus: (m) => {
@@ -23365,10 +23365,10 @@ function GE(n, e) {
23365
23365
  outsidePress: x
23366
23366
  } = Ef(h), {
23367
23367
  escapeKey: C,
23368
- outsidePress: S
23369
- } = Ef(p), k = T.useRef(!1), N = Nt((R) => {
23368
+ outsidePress: k
23369
+ } = Ef(p), S = T.useRef(!1), N = Nt((R) => {
23370
23370
  var B;
23371
- if (!t || !s || !l || R.key !== "Escape" || k.current)
23371
+ if (!t || !s || !l || R.key !== "Escape" || S.current)
23372
23372
  return;
23373
23373
  const V = (B = o.current.floatingContext) == null ? void 0 : B.nodeId, D = m ? io(m.nodesRef.current, V) : [];
23374
23374
  if (!w && (R.stopPropagation(), D.length > 0)) {
@@ -23398,14 +23398,14 @@ function GE(n, e) {
23398
23398
  if (v.current = !1, c === "click" && D || V || typeof y == "function" && !y(R))
23399
23399
  return;
23400
23400
  const O = cr(R), F = "[" + Ri("inert") + "]", Y = It(i.floating).querySelectorAll(F);
23401
- let Re = ie(O) ? O : null;
23401
+ let Re = oe(O) ? O : null;
23402
23402
  for (; Re && !tn(Re); ) {
23403
23403
  const Ie = rn(Re);
23404
- if (tn(Ie) || !ie(Ie))
23404
+ if (tn(Ie) || !oe(Ie))
23405
23405
  break;
23406
23406
  Re = Ie;
23407
23407
  }
23408
- if (Y.length && ie(O) && !uE(O) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
23408
+ if (Y.length && oe(O) && !uE(O) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
23409
23409
  !Er(O, i.floating) && // If the target root element contains none of the markers, then the
23410
23410
  // element was injected after the floating element rendered.
23411
23411
  Array.from(Y).every((Ie) => !Er(Re, Ie)))
@@ -23451,12 +23451,12 @@ function GE(n, e) {
23451
23451
  r(!1, Y, "ancestor-scroll");
23452
23452
  }
23453
23453
  function V() {
23454
- window.clearTimeout(R), k.current = !0;
23454
+ window.clearTimeout(R), S.current = !0;
23455
23455
  }
23456
23456
  function D() {
23457
23457
  R = window.setTimeout(
23458
23458
  () => {
23459
- k.current = !1;
23459
+ S.current = !1;
23460
23460
  },
23461
23461
  // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
23462
23462
  // Only apply to WebKit for the test to remain 0ms.
@@ -23464,9 +23464,9 @@ function GE(n, e) {
23464
23464
  );
23465
23465
  }
23466
23466
  const O = It(i.floating);
23467
- l && (O.addEventListener("keydown", C ? _ : N, C), O.addEventListener("compositionstart", V), O.addEventListener("compositionend", D)), y && O.addEventListener(c, S ? j : L, S);
23467
+ l && (O.addEventListener("keydown", C ? _ : N, C), O.addEventListener("compositionstart", V), O.addEventListener("compositionend", D)), y && O.addEventListener(c, k ? j : L, k);
23468
23468
  let F = [];
23469
- return f && (ie(i.domReference) && (F = En(i.domReference)), ie(i.floating) && (F = F.concat(En(i.floating))), !ie(i.reference) && i.reference && i.reference.contextElement && (F = F.concat(En(i.reference.contextElement)))), F = F.filter((Y) => {
23469
+ return f && (oe(i.domReference) && (F = En(i.domReference)), oe(i.floating) && (F = F.concat(En(i.floating))), !oe(i.reference) && i.reference && i.reference.contextElement && (F = F.concat(En(i.reference.contextElement)))), F = F.filter((Y) => {
23470
23470
  var Re;
23471
23471
  return Y !== ((Re = O.defaultView) == null ? void 0 : Re.visualViewport);
23472
23472
  }), F.forEach((Y) => {
@@ -23474,11 +23474,11 @@ function GE(n, e) {
23474
23474
  passive: !0
23475
23475
  });
23476
23476
  }), () => {
23477
- l && (O.removeEventListener("keydown", C ? _ : N, C), O.removeEventListener("compositionstart", V), O.removeEventListener("compositionend", D)), y && O.removeEventListener(c, S ? j : L, S), F.forEach((Y) => {
23477
+ l && (O.removeEventListener("keydown", C ? _ : N, C), O.removeEventListener("compositionstart", V), O.removeEventListener("compositionend", D)), y && O.removeEventListener(c, k ? j : L, k), F.forEach((Y) => {
23478
23478
  Y.removeEventListener("scroll", B);
23479
23479
  }), window.clearTimeout(R);
23480
23480
  };
23481
- }, [o, i, l, y, c, t, r, f, s, w, x, N, C, _, L, S, j]), T.useEffect(() => {
23481
+ }, [o, i, l, y, c, t, r, f, s, w, x, N, C, _, L, k, j]), T.useEffect(() => {
23482
23482
  o.current.insideReactTree = !1;
23483
23483
  }, [o, y, c]);
23484
23484
  const J = T.useMemo(() => ({
@@ -23519,7 +23519,7 @@ function JE(n) {
23519
23519
  } = n, i = Hc(), o = T.useRef({}), [s] = T.useState(() => PE()), l = Vc() != null;
23520
23520
  if (process.env.NODE_ENV !== "production") {
23521
23521
  const h = r.reference;
23522
- h && !ie(h) && LE("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
23522
+ h && !oe(h) && LE("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
23523
23523
  }
23524
23524
  const [a, c] = T.useState(r.reference), u = Nt((h, p, m) => {
23525
23525
  o.current.openEvent = h ? p : void 0, s.emit("openchange", {
@@ -23569,17 +23569,17 @@ function YE(n) {
23569
23569
  }
23570
23570
  }
23571
23571
  }), p = T.useCallback((w) => {
23572
- const x = ie(w) ? {
23572
+ const x = oe(w) ? {
23573
23573
  getBoundingClientRect: () => w.getBoundingClientRect(),
23574
23574
  getClientRects: () => w.getClientRects(),
23575
23575
  contextElement: w
23576
23576
  } : w;
23577
23577
  a(x), h.refs.setReference(x);
23578
23578
  }, [h.refs]), m = T.useCallback((w) => {
23579
- (ie(w) || w === null) && (d.current = w, s(w)), (ie(h.refs.reference.current) || h.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
23579
+ (oe(w) || w === null) && (d.current = w, s(w)), (oe(h.refs.reference.current) || h.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
23580
23580
  // `null` to support `positionReference` + an unstable `reference`
23581
23581
  // callback ref.
23582
- w !== null && !ie(w)) && h.refs.setReference(w);
23582
+ w !== null && !oe(w)) && h.refs.setReference(w);
23583
23583
  }, [h.refs]), g = T.useMemo(() => ({
23584
23584
  ...h.refs,
23585
23585
  setReference: m,
@@ -23657,7 +23657,7 @@ function XE(n, e) {
23657
23657
  onFocus(h) {
23658
23658
  if (c.current) return;
23659
23659
  const p = cr(h.nativeEvent);
23660
- if (a && ie(p)) {
23660
+ if (a && oe(p)) {
23661
23661
  if ($l() && !h.relatedTarget) {
23662
23662
  if (!d.current && !dE(p))
23663
23663
  return;
@@ -23668,7 +23668,7 @@ function XE(n, e) {
23668
23668
  },
23669
23669
  onBlur(h) {
23670
23670
  c.current = !1;
23671
- const p = h.relatedTarget, m = h.nativeEvent, g = ie(p) && p.hasAttribute(Ri("focus-guard")) && p.getAttribute("data-type") === "outside";
23671
+ const p = h.relatedTarget, m = h.nativeEvent, g = oe(p) && p.hasAttribute(Ri("focus-guard")) && p.getAttribute("data-type") === "outside";
23672
23672
  u.current = window.setTimeout(() => {
23673
23673
  var y;
23674
23674
  const v = Na(s.domReference ? s.domReference.ownerDocument : document);
@@ -23821,11 +23821,11 @@ function tT({
23821
23821
  delay: i = 600,
23822
23822
  closeDelay: o = 0
23823
23823
  } = {}) {
23824
- const [s, l] = ye(n), a = t ?? s, c = r ?? l, u = YE({
23824
+ const [s, l] = ge(n), a = t ?? s, c = r ?? l, u = YE({
23825
23825
  placement: e,
23826
23826
  open: a,
23827
23827
  onOpenChange: c,
23828
- whileElementsMounted: Ck,
23828
+ whileElementsMounted: CS,
23829
23829
  middleware: [
23830
23830
  TE(4),
23831
23831
  AE({
@@ -23953,7 +23953,7 @@ const nT = ({
23953
23953
  return !t || !r ? /* @__PURE__ */ E(
23954
23954
  "button",
23955
23955
  {
23956
- className: St("tiptap-button", n),
23956
+ className: kt("tiptap-button", n),
23957
23957
  ref: a,
23958
23958
  "data-style": o,
23959
23959
  "data-size": s,
@@ -23964,7 +23964,7 @@ const nT = ({
23964
23964
  /* @__PURE__ */ E(
23965
23965
  gg,
23966
23966
  {
23967
- className: St("tiptap-button", n),
23967
+ className: kt("tiptap-button", n),
23968
23968
  ref: a,
23969
23969
  "data-style": o,
23970
23970
  "data-size": s,
@@ -23984,7 +23984,7 @@ const fi = xe(({ className: n, children: e, orientation: t = "vertical", ...r },
23984
23984
  "div",
23985
23985
  {
23986
23986
  ref: i,
23987
- className: St("tiptap-button-group", n),
23987
+ className: kt("tiptap-button-group", n),
23988
23988
  "data-orientation": t,
23989
23989
  role: "group",
23990
23990
  ...r,
@@ -24228,7 +24228,7 @@ const Cg = $t(({ className: n, ...e }) => /* @__PURE__ */ ce(
24228
24228
  }
24229
24229
  ));
24230
24230
  Cg.displayName = "SubscriptIcon";
24231
- const kg = $t(({ className: n, ...e }) => /* @__PURE__ */ ce(
24231
+ const Sg = $t(({ className: n, ...e }) => /* @__PURE__ */ ce(
24232
24232
  "svg",
24233
24233
  {
24234
24234
  width: "24",
@@ -24269,8 +24269,8 @@ const kg = $t(({ className: n, ...e }) => /* @__PURE__ */ ce(
24269
24269
  ]
24270
24270
  }
24271
24271
  ));
24272
- kg.displayName = "SuperscriptIcon";
24273
- const Sg = $t(({ className: n, ...e }) => /* @__PURE__ */ E(
24272
+ Sg.displayName = "SuperscriptIcon";
24273
+ const kg = $t(({ className: n, ...e }) => /* @__PURE__ */ E(
24274
24274
  "svg",
24275
24275
  {
24276
24276
  width: "24",
@@ -24291,14 +24291,14 @@ const Sg = $t(({ className: n, ...e }) => /* @__PURE__ */ E(
24291
24291
  )
24292
24292
  }
24293
24293
  ));
24294
- Sg.displayName = "UnderlineIcon";
24294
+ kg.displayName = "UnderlineIcon";
24295
24295
  const iT = {
24296
24296
  bold: bg,
24297
24297
  italic: wg,
24298
- underline: Sg,
24298
+ underline: kg,
24299
24299
  strike: xg,
24300
24300
  code: vg,
24301
- superscript: kg,
24301
+ superscript: Sg,
24302
24302
  subscript: Cg
24303
24303
  }, Eg = {
24304
24304
  bold: "mod+b",
@@ -24331,7 +24331,7 @@ function cT(n) {
24331
24331
  type: t,
24332
24332
  hideWhenUnavailable: r = !1,
24333
24333
  onToggled: i
24334
- } = n, { editor: o } = Dn(e), [s, l] = ye(!0), a = Wc(o, t), c = oT(o, t);
24334
+ } = n, { editor: o } = Dn(e), [s, l] = ge(!0), a = Wc(o, t), c = oT(o, t);
24335
24335
  be(() => {
24336
24336
  if (!o) return;
24337
24337
  const d = () => {
@@ -24366,7 +24366,7 @@ function Tg({
24366
24366
  orientation: s = "vertical",
24367
24367
  autoSelectFirstItem: l = !0
24368
24368
  }) {
24369
- const [a, c] = ye(
24369
+ const [a, c] = ge(
24370
24370
  l ? 0 : -1
24371
24371
  );
24372
24372
  return be(() => {
@@ -24421,7 +24421,7 @@ function Tg({
24421
24421
  };
24422
24422
  }
24423
24423
  function Xs(n = "max", e = 768) {
24424
- const [t, r] = ye(void 0);
24424
+ const [t, r] = ge(void 0);
24425
24425
  return be(() => {
24426
24426
  const i = n === "min" ? `(min-width: ${e}px)` : `(max-width: ${e - 1}px)`, o = window.matchMedia(i), s = (l) => r(l.matches);
24427
24427
  return r(o.matches), o.addEventListener("change", s), () => o.removeEventListener("change", s);
@@ -24493,7 +24493,7 @@ function Og({
24493
24493
  align: e,
24494
24494
  sideOffset: t,
24495
24495
  side: "top",
24496
- className: St("tiptap-popover", n),
24496
+ className: kt("tiptap-popover", n),
24497
24497
  ...r
24498
24498
  }
24499
24499
  ) });
@@ -24504,7 +24504,7 @@ const qc = xe(
24504
24504
  return /* @__PURE__ */ E(
24505
24505
  "div",
24506
24506
  {
24507
- className: St("tiptap-separator", t),
24507
+ className: kt("tiptap-separator", t),
24508
24508
  "data-orientation": e,
24509
24509
  ...s,
24510
24510
  ...r,
@@ -24515,7 +24515,7 @@ const qc = xe(
24515
24515
  );
24516
24516
  qc.displayName = "Separator";
24517
24517
  const Gc = xe(
24518
- ({ className: n, ...e }, t) => /* @__PURE__ */ E("div", { ref: t, className: St("tiptap-card", n), ...e })
24518
+ ({ className: n, ...e }, t) => /* @__PURE__ */ E("div", { ref: t, className: kt("tiptap-card", n), ...e })
24519
24519
  );
24520
24520
  Gc.displayName = "Card";
24521
24521
  const uT = xe(
@@ -24523,14 +24523,14 @@ const uT = xe(
24523
24523
  "div",
24524
24524
  {
24525
24525
  ref: t,
24526
- className: St("tiptap-card-header", n),
24526
+ className: kt("tiptap-card-header", n),
24527
24527
  ...e
24528
24528
  }
24529
24529
  )
24530
24530
  );
24531
24531
  uT.displayName = "CardHeader";
24532
24532
  const Jc = xe(
24533
- ({ className: n, ...e }, t) => /* @__PURE__ */ E("div", { ref: t, className: St("tiptap-card-body", n), ...e })
24533
+ ({ className: n, ...e }, t) => /* @__PURE__ */ E("div", { ref: t, className: kt("tiptap-card-body", n), ...e })
24534
24534
  );
24535
24535
  Jc.displayName = "CardBody";
24536
24536
  const Yc = xe(({ className: n, orientation: e = "vertical", ...t }, r) => /* @__PURE__ */ E(
@@ -24538,7 +24538,7 @@ const Yc = xe(({ className: n, orientation: e = "vertical", ...t }, r) => /* @__
24538
24538
  {
24539
24539
  ref: r,
24540
24540
  "data-orientation": e,
24541
- className: St("tiptap-card-item-group", n),
24541
+ className: kt("tiptap-card-item-group", n),
24542
24542
  ...t
24543
24543
  }
24544
24544
  ));
@@ -24548,7 +24548,7 @@ const dT = xe(
24548
24548
  "div",
24549
24549
  {
24550
24550
  ref: t,
24551
- className: St("tiptap-card-group-label", n),
24551
+ className: kt("tiptap-card-group-label", n),
24552
24552
  ...e
24553
24553
  }
24554
24554
  )
@@ -24559,7 +24559,7 @@ const fT = xe(
24559
24559
  "div",
24560
24560
  {
24561
24561
  ref: t,
24562
- className: St("tiptap-card-footer", n),
24562
+ className: kt("tiptap-card-footer", n),
24563
24563
  ...e
24564
24564
  }
24565
24565
  )
@@ -24601,8 +24601,8 @@ const Ng = xe(
24601
24601
  mode: i,
24602
24602
  onApplied: o
24603
24603
  }), x = Qe(
24604
- (S) => {
24605
- l?.(S), !S.defaultPrevented && (y(), S.preventDefault(), S.stopPropagation());
24604
+ (k) => {
24605
+ l?.(k), !k.defaultPrevented && (y(), k.preventDefault(), k.stopPropagation());
24606
24606
  },
24607
24607
  [y, l]
24608
24608
  ), C = nn(
@@ -24774,7 +24774,7 @@ const CT = (n, e, t = !1) => {
24774
24774
  return !1;
24775
24775
  }
24776
24776
  return a && a.length === 1 && a.includes(g) ? !0 : a && a.length > 0 ? a.includes(g) ? mT(a) : !1 : !a || a.length === 0;
24777
- }, kT = Or(void 0), ST = () => Ar(kT);
24777
+ }, ST = Or(void 0), kT = () => Ar(ST);
24778
24778
  function _g(n, e) {
24779
24779
  return n && e && typeof n == "object" && typeof e == "object" ? Object.keys(n).length === Object.keys(e).length && // @ts-expect-error TS7053
24780
24780
  Object.keys(n).reduce((t, r) => t && _g(n[r], e[r]), !0) : n === e;
@@ -24800,7 +24800,7 @@ const Tf = (n) => {
24800
24800
  function Bg(n, e, t, r) {
24801
24801
  const i = et(null), o = et(!1), s = Array.isArray(t) ? Array.isArray(r) ? void 0 : r : t, l = Xc(n) ? n.join(s?.delimiter) : n, a = Array.isArray(t) ? t : Array.isArray(r) ? r : void 0, c = Qe(e, a ?? []), u = et(c);
24802
24802
  a ? u.current = c : u.current = e;
24803
- const d = MT(s), { activeScopes: f } = TT(), h = ST();
24803
+ const d = MT(s), { activeScopes: f } = TT(), h = kT();
24804
24804
  return AT(() => {
24805
24805
  if (d?.enabled === !1 || !xT(f, d?.scopes))
24806
24806
  return;
@@ -24808,49 +24808,49 @@ function Bg(n, e, t, r) {
24808
24808
  const g = (x, C = !1) => {
24809
24809
  if (!(vT(x) && !Pg(x, d?.enableOnFormTags))) {
24810
24810
  if (i.current !== null) {
24811
- const S = i.current.getRootNode();
24812
- if ((S instanceof Document || S instanceof ShadowRoot) && S.activeElement !== i.current && !i.current.contains(S.activeElement)) {
24811
+ const k = i.current.getRootNode();
24812
+ if ((k instanceof Document || k instanceof ShadowRoot) && k.activeElement !== i.current && !i.current.contains(k.activeElement)) {
24813
24813
  Tf(x);
24814
24814
  return;
24815
24815
  }
24816
24816
  }
24817
- x.target?.isContentEditable && !d?.enableOnContentEditable || Fl(l, d?.delimiter).forEach((S) => {
24818
- if (S.includes(d?.splitKey ?? "+") && S.includes(d?.sequenceSplitKey ?? ">")) {
24817
+ x.target?.isContentEditable && !d?.enableOnContentEditable || Fl(l, d?.delimiter).forEach((k) => {
24818
+ if (k.includes(d?.splitKey ?? "+") && k.includes(d?.sequenceSplitKey ?? ">")) {
24819
24819
  console.warn(
24820
- `Hotkey ${S} contains both ${d?.splitKey ?? "+"} and ${d?.sequenceSplitKey ?? ">"} which is not supported.`
24820
+ `Hotkey ${k} contains both ${d?.splitKey ?? "+"} and ${d?.sequenceSplitKey ?? ">"} which is not supported.`
24821
24821
  );
24822
24822
  return;
24823
24823
  }
24824
- const k = Hl(
24825
- S,
24824
+ const S = Hl(
24825
+ k,
24826
24826
  d?.splitKey,
24827
24827
  d?.sequenceSplitKey,
24828
24828
  d?.useKey,
24829
24829
  d?.description,
24830
24830
  d?.metadata
24831
24831
  );
24832
- if (k.isSequence) {
24832
+ if (S.isSequence) {
24833
24833
  m = setTimeout(() => {
24834
24834
  p = [];
24835
24835
  }, d?.sequenceTimeoutMs ?? 1e3);
24836
- const N = k.useKey ? x.key : Tn(x.code);
24836
+ const N = S.useKey ? x.key : Tn(x.code);
24837
24837
  if (Ig(N.toLowerCase()))
24838
24838
  return;
24839
24839
  p.push(N);
24840
- const _ = k.keys?.[p.length - 1];
24840
+ const _ = S.keys?.[p.length - 1];
24841
24841
  if (N !== _) {
24842
24842
  p = [], m && clearTimeout(m);
24843
24843
  return;
24844
24844
  }
24845
- p.length === k.keys?.length && (u.current(x, k), m && clearTimeout(m), p = []);
24846
- } else if (CT(x, k, d?.ignoreModifiers) || k.keys?.includes("*")) {
24845
+ p.length === S.keys?.length && (u.current(x, S), m && clearTimeout(m), p = []);
24846
+ } else if (CT(x, S, d?.ignoreModifiers) || S.keys?.includes("*")) {
24847
24847
  if (d?.ignoreEventWhen?.(x) || C && o.current)
24848
24848
  return;
24849
- if (gT(x, k, d?.preventDefault), !yT(x, k, d?.enabled)) {
24849
+ if (gT(x, S, d?.preventDefault), !yT(x, S, d?.enabled)) {
24850
24850
  Tf(x);
24851
24851
  return;
24852
24852
  }
24853
- u.current(x, k), C || (o.current = !0);
24853
+ u.current(x, S), C || (o.current = !0);
24854
24854
  }
24855
24855
  });
24856
24856
  }
@@ -25009,7 +25009,7 @@ function Qc(n) {
25009
25009
  mode: o = "mark",
25010
25010
  useColorValue: s = !1,
25011
25011
  onApplied: l
25012
- } = n, { editor: a } = Dn(e), c = Xs(), [u, d] = ye(!0), f = Zc(a, o), h = r && OT(r, s), p = NT(a, h, o);
25012
+ } = n, { editor: a } = Dn(e), c = Xs(), [u, d] = ge(!0), f = Zc(a, o), h = r && OT(r, s), p = NT(a, h, o);
25013
25013
  be(() => {
25014
25014
  if (!a) return;
25015
25015
  const y = () => {
@@ -25160,7 +25160,7 @@ function LT({
25160
25160
  onApplied: i,
25161
25161
  ...o
25162
25162
  }) {
25163
- const { editor: s } = Dn(n), [l, a] = ye(!1), { isVisible: c, canColorHighlight: u, isActive: d, label: f, Icon: h } = Qc({
25163
+ const { editor: s } = Dn(n), [l, a] = ge(!1), { isVisible: c, canColorHighlight: u, isActive: d, label: f, Icon: h } = Qc({
25164
25164
  editor: s,
25165
25165
  hideWhenUnavailable: t,
25166
25166
  onApplied: i
@@ -25351,7 +25351,7 @@ function nu({
25351
25351
  useColorValue: i = !1,
25352
25352
  onApplied: o
25353
25353
  } = {}) {
25354
- const { editor: s } = Dn(n), l = Xs(), [a, c] = ye(!0), [u, d] = ye(!1), f = tu(s);
25354
+ const { editor: s } = Dn(n), l = Xs(), [a, c] = ge(!0), [u, d] = ge(!1), f = tu(s);
25355
25355
  be(() => {
25356
25356
  if (!s) {
25357
25357
  c(!1);
@@ -25497,7 +25497,7 @@ function FT({
25497
25497
  onApplied: i,
25498
25498
  ...o
25499
25499
  }) {
25500
- const { editor: s } = Dn(n), [l, a] = ye(!1), { isVisible: c, canTextColor: u, isActive: d, label: f, Icon: h } = nu({
25500
+ const { editor: s } = Dn(n), [l, a] = ge(!1), { isVisible: c, canTextColor: u, isActive: d, label: f, Icon: h } = nu({
25501
25501
  editor: s,
25502
25502
  hideWhenUnavailable: t,
25503
25503
  onApplied: i
@@ -25540,7 +25540,7 @@ function VT({
25540
25540
  editor: n,
25541
25541
  fonts: e = HT
25542
25542
  }) {
25543
- const [t, r] = ye(
25543
+ const [t, r] = ge(
25544
25544
  void 0
25545
25545
  ), i = Qe(() => n ? n.can().setFontFamily("") : !1, [n]), o = Qe(
25546
25546
  (a) => n ? a ? n.isActive("textStyle", { fontFamily: a }) : !n.isActive("textStyle", { fontFamily: /.+/ }) : !1,
@@ -25607,22 +25607,22 @@ const jg = xe(({ editor: n, fonts: e }, t) => {
25607
25607
  });
25608
25608
  jg.displayName = "FontFamilySelect";
25609
25609
  function sM({ api: n }) {
25610
- const [e, t] = ye(null), [r, i] = ye(1);
25610
+ const [e, t] = ge(null), [r, i] = ge(1), [o, s] = ge(1);
25611
25611
  return be(() => {
25612
25612
  if (!n) return;
25613
- const o = (a) => {
25614
- t(a);
25615
- }, s = () => {
25613
+ const l = (u) => {
25614
+ t(u), s(u.scaleWhenCreate || 1);
25615
+ }, a = () => {
25616
25616
  t(null);
25617
- }, l = (a) => {
25618
- i(a);
25617
+ }, c = (u) => {
25618
+ i(u);
25619
25619
  };
25620
- return n.on("texteditor:register", o), n.on("texteditor:unregister", s), n.on("viewport:scale:change", l), () => {
25621
- n.off("texteditor:register", o), n.off("texteditor:unregister", s);
25620
+ return n.on("texteditor:register", l), n.on("texteditor:unregister", a), n.on("viewport:scale:change", c), () => {
25621
+ n.off("texteditor:register", l), n.off("texteditor:unregister", a), n.off("viewport:scale:change", c);
25622
25622
  };
25623
- }, [n]), !n || !e ? null : /* @__PURE__ */ E(Mr, { children: e && /* @__PURE__ */ ce(zS, { className: "rich-text-bubble-menu bubble-menu", editor: e, appendTo: () => document.getElementById("rich-text-html-element"), style: {
25623
+ }, [n]), !n || !e ? null : /* @__PURE__ */ E(Mr, { children: e && /* @__PURE__ */ ce(zk, { className: "rich-text-bubble-menu bubble-menu", editor: e, appendTo: () => document.getElementById("rich-text-html-element"), style: {
25624
25624
  transformOrigin: "bottom center",
25625
- transform: `scale(${1 / r})`
25625
+ transform: `scale(${o / r})`
25626
25626
  }, options: {
25627
25627
  shift: !1
25628
25628
  }, children: [
@@ -25639,7 +25639,7 @@ export {
25639
25639
  AC as CanvasApi,
25640
25640
  vy as DARK_THEME,
25641
25641
  Df as DEFAULT_THEME,
25642
- oe as NODE_NAMES,
25642
+ ie as NODE_NAMES,
25643
25643
  nM as THEME_PRESETS,
25644
25644
  sM as TipTapBubbleMenu,
25645
25645
  iM as Whiteboard,