@nine-lab/nine-ux 0.1.63 → 0.1.64

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.
@@ -5,8 +5,8 @@ var li = (n) => {
5
5
  var Sl = (n, e, t) => e in n ? xl(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
6
6
  var ye = (n, e, t) => Sl(n, typeof e != "symbol" ? e + "" : e, t), Jn = (n, e, t) => e.has(n) || li("Cannot " + t);
7
7
  var O = (n, e, t) => (Jn(n, e, "read from private field"), t ? t.call(n) : e.get(n)), F = (n, e, t) => e.has(n) ? li("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), oe = (n, e, t, r) => (Jn(n, e, "write to private field"), r ? r.call(n, t) : e.set(n, t), t), q = (n, e, t) => (Jn(n, e, "access private method"), t);
8
- import { nine as Rt, subscribeConfig as Ml } from "@nine-lab/nine-util";
9
- const wl = `
8
+ import { nine as yt, subscribeConfig as Ml, trace as wl } from "@nine-lab/nine-util";
9
+ const Cl = `
10
10
  dialog::backdrop {
11
11
  background: rgba(0, 0, 0, 0.3);
12
12
  }
@@ -404,7 +404,7 @@ dialog.out { animation: nx-fade-out 0.3s forwards; }
404
404
  @keyframes nx-fade-out { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(0.9); } }
405
405
  `;
406
406
  var Oe, j, Nn, An, Dn;
407
- class Cl extends HTMLElement {
407
+ class Tl extends HTMLElement {
408
408
  constructor() {
409
409
  super();
410
410
  F(this, Oe);
@@ -459,7 +459,7 @@ class Cl extends HTMLElement {
459
459
  connectedCallback() {
460
460
  const t = this.innerHTML, r = this.getAttribute("title") || "Details";
461
461
  this.innerHTML = `
462
- <style>${wl}</style>
462
+ <style>${Cl}</style>
463
463
 
464
464
  <dialog>
465
465
  <div class="head">
@@ -493,7 +493,7 @@ class Cl extends HTMLElement {
493
493
  }
494
494
  }
495
495
  Oe = new WeakMap(), j = new WeakMap(), Nn = new WeakMap(), An = new WeakMap(), Dn = new WeakMap();
496
- customElements.get("nine-dialog") || customElements.define("nine-dialog", Cl);
496
+ customElements.get("nine-dialog") || customElements.define("nine-dialog", Tl);
497
497
  class hn extends HTMLElement {
498
498
  constructor() {
499
499
  super(), this.attachShadow({ mode: "open" });
@@ -569,7 +569,7 @@ ye(pn, "alert", async (e, t = "Alert", r = {}) => {
569
569
  customElements.get("nine-confirm-popup") || customElements.define("nine-confirm-popup", hn);
570
570
  customElements.get("nine-alert-popup") || customElements.define("nine-alert-popup", pn);
571
571
  var jt, Kt, hr;
572
- class Tl {
572
+ class Ol {
573
573
  constructor() {
574
574
  F(this, Kt);
575
575
  F(this, jt, "");
@@ -577,7 +577,7 @@ class Tl {
577
577
  // 1. 값만 깔끔하게 반환
578
578
  get cssPath() {
579
579
  var e;
580
- return ((e = Rt.config.ux) == null ? void 0 : e.cssPath) || O(this, jt);
580
+ return ((e = yt.config.ux) == null ? void 0 : e.cssPath) || O(this, jt);
581
581
  }
582
582
  set cssPath(e) {
583
583
  oe(this, jt, e);
@@ -626,9 +626,9 @@ jt = new WeakMap(), Kt = new WeakSet(), hr = function(e, t, r, i) {
626
626
  l || (l = !0, o[e](t, r, s));
627
627
  }), a;
628
628
  };
629
- const Ae = new Tl();
630
- var Jt, Ze, Ut, ae, Tt, pr, mr, _t, In;
631
- class Ol extends HTMLElement {
629
+ const Ae = new Ol();
630
+ var Jt, Ze, Ut, ae, Ot, pr, mr, _t, In;
631
+ class vl extends HTMLElement {
632
632
  constructor() {
633
633
  super();
634
634
  F(this, ae);
@@ -639,7 +639,7 @@ class Ol extends HTMLElement {
639
639
  F(this, Ut, !1);
640
640
  ye(this, "getData", () => {
641
641
  const t = {};
642
- return q(this, ae, Tt).call(this).forEach((r) => {
642
+ return q(this, ae, Ot).call(this).forEach((r) => {
643
643
  const i = r.name;
644
644
  if (!i) return;
645
645
  let s;
@@ -652,7 +652,7 @@ class Ol extends HTMLElement {
652
652
  });
653
653
  // 파라미터가 있으면 해당 값으로, 없으면 전체 공백 초기화
654
654
  ye(this, "clearData", (t = {}) => {
655
- q(this, ae, mr).call(this), q(this, ae, Tt).call(this).forEach((r) => {
655
+ q(this, ae, mr).call(this), q(this, ae, Ot).call(this).forEach((r) => {
656
656
  const i = r.name;
657
657
  if (!i) return;
658
658
  const s = t && t[i] !== void 0 ? t[i] : "";
@@ -663,7 +663,7 @@ class Ol extends HTMLElement {
663
663
  if (!t || typeof t != "object") return;
664
664
  q(this, ae, mr).call(this);
665
665
  let r = !1;
666
- q(this, ae, Tt).call(this).forEach((i) => {
666
+ q(this, ae, Ot).call(this).forEach((i) => {
667
667
  const s = i.name;
668
668
  !s || !t.hasOwnProperty(s) || q(this, ae, pr).call(this, i, t[s]) && (r = !0);
669
669
  }), r && (this.changed = !0);
@@ -701,7 +701,7 @@ class Ol extends HTMLElement {
701
701
  }
702
702
  }
703
703
  Jt = new WeakMap(), Ze = new WeakMap(), Ut = new WeakMap(), ae = new WeakSet(), // 공통 쿼리 함수: 현재 root(Shadow 또는 Light DOM)에서 요소를 찾음
704
- Tt = function() {
704
+ Ot = function() {
705
705
  return ninegrid.querySelectorAll("input[name], textarea[name], select[name], nx-editor[name]", O(this, Ze));
706
706
  }, // [공통 로직 1] 특정 요소에 값을 쓰거나 초기화하는 핵심 함수
707
707
  pr = function(t, r) {
@@ -721,7 +721,7 @@ pr = function(t, r) {
721
721
  return o;
722
722
  }, // [공통 로직 2] 이벤트 리스너 일괄 등록
723
723
  mr = function() {
724
- q(this, ae, Tt).call(this).forEach((t) => {
724
+ q(this, ae, Ot).call(this).forEach((t) => {
725
725
  t.removeEventListener("input", O(this, _t)), t.addEventListener("input", O(this, _t));
726
726
  });
727
727
  }, _t = new WeakMap(), In = new WeakMap();
@@ -1362,7 +1362,7 @@ function vs(n, e, t, r) {
1362
1362
  let l = vs(o.content, e - s - 1, t, o);
1363
1363
  return l && n.replaceChild(i, o.copy(l));
1364
1364
  }
1365
- function vl(n, e, t) {
1365
+ function El(n, e, t) {
1366
1366
  if (t.openStart > n.depth)
1367
1367
  throw new gn("Inserted content deeper than insertion position");
1368
1368
  if (n.depth - t.openStart != e.depth - t.openEnd)
@@ -1379,7 +1379,7 @@ function Es(n, e, t, r) {
1379
1379
  let o = n.parent, l = o.content;
1380
1380
  return et(o, l.cut(0, n.parentOffset).append(t.content).append(l.cut(e.parentOffset)));
1381
1381
  } else {
1382
- let { start: o, end: l } = El(t, n);
1382
+ let { start: o, end: l } = Nl(t, n);
1383
1383
  return et(s, As(n, o, l, e, r));
1384
1384
  }
1385
1385
  else return et(s, yn(n, e, r));
@@ -1396,7 +1396,7 @@ function Qe(n, e) {
1396
1396
  let t = e.length - 1;
1397
1397
  t >= 0 && n.isText && n.sameMarkup(e[t]) ? e[t] = n.withText(e[t].text + n.text) : e.push(n);
1398
1398
  }
1399
- function Nt(n, e, t, r) {
1399
+ function At(n, e, t, r) {
1400
1400
  let i = (e || n).node(t), s = 0, o = e ? e.index(t) : i.childCount;
1401
1401
  n && (s = n.index(t), n.depth > t ? s++ : n.textOffset && (Qe(n.nodeAfter, r), s++));
1402
1402
  for (let l = s; l < o; l++)
@@ -1408,17 +1408,17 @@ function et(n, e) {
1408
1408
  }
1409
1409
  function As(n, e, t, r, i) {
1410
1410
  let s = n.depth > i && yr(n, e, i + 1), o = r.depth > i && yr(t, r, i + 1), l = [];
1411
- return Nt(null, n, i, l), s && o && e.index(i) == t.index(i) ? (Ns(s, o), Qe(et(s, As(n, e, t, r, i + 1)), l)) : (s && Qe(et(s, yn(n, e, i + 1)), l), Nt(e, t, i, l), o && Qe(et(o, yn(t, r, i + 1)), l)), Nt(r, null, i, l), new b(l);
1411
+ return At(null, n, i, l), s && o && e.index(i) == t.index(i) ? (Ns(s, o), Qe(et(s, As(n, e, t, r, i + 1)), l)) : (s && Qe(et(s, yn(n, e, i + 1)), l), At(e, t, i, l), o && Qe(et(o, yn(t, r, i + 1)), l)), At(r, null, i, l), new b(l);
1412
1412
  }
1413
1413
  function yn(n, e, t) {
1414
1414
  let r = [];
1415
- if (Nt(null, n, t, r), n.depth > t) {
1415
+ if (At(null, n, t, r), n.depth > t) {
1416
1416
  let i = yr(n, e, t + 1);
1417
1417
  Qe(et(i, yn(n, e, t + 1)), r);
1418
1418
  }
1419
- return Nt(e, null, t, r), new b(r);
1419
+ return At(e, null, t, r), new b(r);
1420
1420
  }
1421
- function El(n, e) {
1421
+ function Nl(n, e) {
1422
1422
  let t = e.depth - n.openStart, i = e.node(t).copy(n.content);
1423
1423
  for (let s = t - 1; s >= 0; s--)
1424
1424
  i = e.node(s).copy(b.from(i));
@@ -1669,17 +1669,17 @@ class Pt {
1669
1669
  return o;
1670
1670
  }
1671
1671
  else
1672
- ai.set(e, r = new Nl());
1672
+ ai.set(e, r = new Al());
1673
1673
  let i = r.elts[r.i] = Pt.resolve(e, t);
1674
- return r.i = (r.i + 1) % Al, i;
1674
+ return r.i = (r.i + 1) % Dl, i;
1675
1675
  }
1676
1676
  }
1677
- class Nl {
1677
+ class Al {
1678
1678
  constructor() {
1679
1679
  this.elts = [], this.i = 0;
1680
1680
  }
1681
1681
  }
1682
- const Al = 12, ai = /* @__PURE__ */ new WeakMap();
1682
+ const Dl = 12, ai = /* @__PURE__ */ new WeakMap();
1683
1683
  class bn {
1684
1684
  /**
1685
1685
  Construct a node range. `$from` and `$to` should point into the
@@ -1720,7 +1720,7 @@ class bn {
1720
1720
  return this.$to.indexAfter(this.depth);
1721
1721
  }
1722
1722
  }
1723
- const Dl = /* @__PURE__ */ Object.create(null);
1723
+ const Il = /* @__PURE__ */ Object.create(null);
1724
1724
  let Fe = class br {
1725
1725
  /**
1726
1726
  @internal
@@ -1839,7 +1839,7 @@ let Fe = class br {
1839
1839
  attributes, and marks.
1840
1840
  */
1841
1841
  hasMarkup(e, t, r) {
1842
- return this.type == e && mn(this.attrs, t || e.defaultAttrs || Dl) && A.sameSet(this.marks, r || A.none);
1842
+ return this.type == e && mn(this.attrs, t || e.defaultAttrs || Il) && A.sameSet(this.marks, r || A.none);
1843
1843
  }
1844
1844
  /**
1845
1845
  Create a new node with the same markup as this node, containing
@@ -1882,7 +1882,7 @@ let Fe = class br {
1882
1882
  [`ReplaceError`](https://prosemirror.net/docs/ref/#model.ReplaceError) is thrown.
1883
1883
  */
1884
1884
  replace(e, t, r) {
1885
- return vl(this.resolve(e), this.resolve(t), r);
1885
+ return El(this.resolve(e), this.resolve(t), r);
1886
1886
  }
1887
1887
  /**
1888
1888
  Find the node directly after the given position.
@@ -2145,13 +2145,13 @@ class it {
2145
2145
  @internal
2146
2146
  */
2147
2147
  static parse(e, t) {
2148
- let r = new Il(e, t);
2148
+ let r = new Rl(e, t);
2149
2149
  if (r.next == null)
2150
2150
  return it.empty;
2151
2151
  let i = Is(r);
2152
2152
  r.next && r.err("Unexpected trailing text");
2153
- let s = $l(Fl(i));
2154
- return Vl(s, r), s;
2153
+ let s = Vl($l(i));
2154
+ return Hl(s, r), s;
2155
2155
  }
2156
2156
  /**
2157
2157
  Match a node type, returning a match after that node if
@@ -2297,7 +2297,7 @@ class it {
2297
2297
  }
2298
2298
  }
2299
2299
  it.empty = new it(!0);
2300
- class Il {
2300
+ class Rl {
2301
2301
  constructor(e, t) {
2302
2302
  this.string = e, this.nodeTypes = t, this.inline = null, this.pos = 0, this.tokens = e.split(/\s*(?=\b|\W|$)/), this.tokens[this.tokens.length - 1] == "" && this.tokens.pop(), this.tokens[0] == "" && this.tokens.shift();
2303
2303
  }
@@ -2314,19 +2314,19 @@ class Il {
2314
2314
  function Is(n) {
2315
2315
  let e = [];
2316
2316
  do
2317
- e.push(Rl(n));
2317
+ e.push(Pl(n));
2318
2318
  while (n.eat("|"));
2319
2319
  return e.length == 1 ? e[0] : { type: "choice", exprs: e };
2320
2320
  }
2321
- function Rl(n) {
2321
+ function Pl(n) {
2322
2322
  let e = [];
2323
2323
  do
2324
- e.push(Pl(n));
2324
+ e.push(Bl(n));
2325
2325
  while (n.next && n.next != ")" && n.next != "|");
2326
2326
  return e.length == 1 ? e[0] : { type: "seq", exprs: e };
2327
2327
  }
2328
- function Pl(n) {
2329
- let e = zl(n);
2328
+ function Bl(n) {
2329
+ let e = Fl(n);
2330
2330
  for (; ; )
2331
2331
  if (n.eat("+"))
2332
2332
  e = { type: "plus", expr: e };
@@ -2335,7 +2335,7 @@ function Pl(n) {
2335
2335
  else if (n.eat("?"))
2336
2336
  e = { type: "opt", expr: e };
2337
2337
  else if (n.eat("{"))
2338
- e = Bl(n, e);
2338
+ e = Ll(n, e);
2339
2339
  else
2340
2340
  break;
2341
2341
  return e;
@@ -2345,11 +2345,11 @@ function ci(n) {
2345
2345
  let e = Number(n.next);
2346
2346
  return n.pos++, e;
2347
2347
  }
2348
- function Bl(n, e) {
2348
+ function Ll(n, e) {
2349
2349
  let t = ci(n), r = t;
2350
2350
  return n.eat(",") && (n.next != "}" ? r = ci(n) : r = -1), n.eat("}") || n.err("Unclosed braced range"), { type: "range", min: t, max: r, expr: e };
2351
2351
  }
2352
- function Ll(n, e) {
2352
+ function zl(n, e) {
2353
2353
  let t = n.nodeTypes, r = t[e];
2354
2354
  if (r)
2355
2355
  return [r];
@@ -2360,18 +2360,18 @@ function Ll(n, e) {
2360
2360
  }
2361
2361
  return i.length == 0 && n.err("No node type or group '" + e + "' found"), i;
2362
2362
  }
2363
- function zl(n) {
2363
+ function Fl(n) {
2364
2364
  if (n.eat("(")) {
2365
2365
  let e = Is(n);
2366
2366
  return n.eat(")") || n.err("Missing closing paren"), e;
2367
2367
  } else if (/\W/.test(n.next))
2368
2368
  n.err("Unexpected token '" + n.next + "'");
2369
2369
  else {
2370
- let e = Ll(n, n.next).map((t) => (n.inline == null ? n.inline = t.isInline : n.inline != t.isInline && n.err("Mixing inline and block content"), { type: "name", value: t }));
2370
+ let e = zl(n, n.next).map((t) => (n.inline == null ? n.inline = t.isInline : n.inline != t.isInline && n.err("Mixing inline and block content"), { type: "name", value: t }));
2371
2371
  return n.pos++, e.length == 1 ? e[0] : { type: "choice", exprs: e };
2372
2372
  }
2373
2373
  }
2374
- function Fl(n) {
2374
+ function $l(n) {
2375
2375
  let e = [[]];
2376
2376
  return i(s(n, 0), t()), e;
2377
2377
  function t() {
@@ -2442,7 +2442,7 @@ function di(n, e) {
2442
2442
  }
2443
2443
  }
2444
2444
  }
2445
- function $l(n) {
2445
+ function Vl(n) {
2446
2446
  let e = /* @__PURE__ */ Object.create(null);
2447
2447
  return t(di(n, 0));
2448
2448
  function t(r) {
@@ -2467,7 +2467,7 @@ function $l(n) {
2467
2467
  return s;
2468
2468
  }
2469
2469
  }
2470
- function Vl(n, e) {
2470
+ function Hl(n, e) {
2471
2471
  for (let t = 0, r = [n]; t < r.length; t++) {
2472
2472
  let i = r[t], s = !i.validEnd, o = [];
2473
2473
  for (let l = 0; l < i.next.length; l++) {
@@ -2515,7 +2515,7 @@ function zs(n, e) {
2515
2515
  let t = /* @__PURE__ */ Object.create(null);
2516
2516
  if (e)
2517
2517
  for (let r in e)
2518
- t[r] = new Wl(n, r, e[r]);
2518
+ t[r] = new ql(n, r, e[r]);
2519
2519
  return t;
2520
2520
  }
2521
2521
  let ui = class Fs {
@@ -2697,7 +2697,7 @@ let ui = class Fs {
2697
2697
  return r;
2698
2698
  }
2699
2699
  };
2700
- function Hl(n, e, t) {
2700
+ function Wl(n, e, t) {
2701
2701
  let r = t.split("|");
2702
2702
  return (i) => {
2703
2703
  let s = i === null ? "null" : typeof i;
@@ -2705,9 +2705,9 @@ function Hl(n, e, t) {
2705
2705
  throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${s}`);
2706
2706
  };
2707
2707
  }
2708
- class Wl {
2708
+ class ql {
2709
2709
  constructor(e, t, r) {
2710
- this.hasDefault = Object.prototype.hasOwnProperty.call(r, "default"), this.default = r.default, this.validate = typeof r.validate == "string" ? Hl(e, t, r.validate) : r.validate;
2710
+ this.hasDefault = Object.prototype.hasOwnProperty.call(r, "default"), this.default = r.default, this.validate = typeof r.validate == "string" ? Wl(e, t, r.validate) : r.validate;
2711
2711
  }
2712
2712
  get isRequired() {
2713
2713
  return !this.hasDefault;
@@ -2853,10 +2853,10 @@ function fi(n, e) {
2853
2853
  }
2854
2854
  return t;
2855
2855
  }
2856
- function ql(n) {
2856
+ function jl(n) {
2857
2857
  return n.tag != null;
2858
2858
  }
2859
- function jl(n) {
2859
+ function Kl(n) {
2860
2860
  return n.style != null;
2861
2861
  }
2862
2862
  class $e {
@@ -2868,9 +2868,9 @@ class $e {
2868
2868
  this.schema = e, this.rules = t, this.tags = [], this.styles = [];
2869
2869
  let r = this.matchedStyles = [];
2870
2870
  t.forEach((i) => {
2871
- if (ql(i))
2871
+ if (jl(i))
2872
2872
  this.tags.push(i);
2873
- else if (jl(i)) {
2873
+ else if (Kl(i)) {
2874
2874
  let s = /[^=]*/.exec(i.style)[0];
2875
2875
  r.indexOf(s) < 0 && r.push(s), this.styles.push(i);
2876
2876
  }
@@ -2906,7 +2906,7 @@ class $e {
2906
2906
  matchTag(e, t, r) {
2907
2907
  for (let i = r ? this.tags.indexOf(r) + 1 : 0; i < this.tags.length; i++) {
2908
2908
  let s = this.tags[i];
2909
- if (Ul(e, s.tag) && (s.namespace === void 0 || e.namespaceURI == s.namespace) && (!s.context || t.matchesContext(s.context))) {
2909
+ if (_l(e, s.tag) && (s.namespace === void 0 || e.namespaceURI == s.namespace) && (!s.context || t.matchesContext(s.context))) {
2910
2910
  if (s.getAttrs) {
2911
2911
  let o = s.getAttrs(e);
2912
2912
  if (o === !1)
@@ -3007,20 +3007,20 @@ const Vs = {
3007
3007
  table: !0,
3008
3008
  tfoot: !0,
3009
3009
  ul: !0
3010
- }, Kl = {
3010
+ }, Jl = {
3011
3011
  head: !0,
3012
3012
  noscript: !0,
3013
3013
  object: !0,
3014
3014
  script: !0,
3015
3015
  style: !0,
3016
3016
  title: !0
3017
- }, Hs = { ol: !0, ul: !0 }, Bt = 1, kr = 2, At = 4;
3017
+ }, Hs = { ol: !0, ul: !0 }, Bt = 1, kr = 2, Dt = 4;
3018
3018
  function hi(n, e, t) {
3019
- return e != null ? (e ? Bt : 0) | (e === "full" ? kr : 0) : n && n.whitespace == "pre" ? Bt | kr : t & ~At;
3019
+ return e != null ? (e ? Bt : 0) | (e === "full" ? kr : 0) : n && n.whitespace == "pre" ? Bt | kr : t & ~Dt;
3020
3020
  }
3021
3021
  class tn {
3022
3022
  constructor(e, t, r, i, s, o) {
3023
- this.type = e, this.attrs = t, this.marks = r, this.solid = i, this.options = o, this.content = [], this.activeMarks = A.none, this.match = s || (o & At ? null : e.contentMatch);
3023
+ this.type = e, this.attrs = t, this.marks = r, this.solid = i, this.options = o, this.content = [], this.activeMarks = A.none, this.match = s || (o & Dt ? null : e.contentMatch);
3024
3024
  }
3025
3025
  findWrapping(e) {
3026
3026
  if (!this.match) {
@@ -3054,7 +3054,7 @@ class tn {
3054
3054
  class pi {
3055
3055
  constructor(e, t, r) {
3056
3056
  this.parser = e, this.options = t, this.isOpen = r, this.open = 0, this.localPreserveWS = !1;
3057
- let i = t.topNode, s, o = hi(null, t.preserveWhitespace, 0) | (r ? At : 0);
3057
+ let i = t.topNode, s, o = hi(null, t.preserveWhitespace, 0) | (r ? Dt : 0);
3058
3058
  i ? s = new tn(i.type, i.attrs, A.none, !0, t.topMatch || i.type.contentMatch, o) : r ? s = new tn(null, null, A.none, !0, null, o) : s = new tn(e.schema.topNodeType, null, A.none, !0, null, o), this.nodes = [s], this.find = t.findPositions, this.needsBlock = !1;
3059
3059
  }
3060
3060
  get top() {
@@ -3094,9 +3094,9 @@ class pi {
3094
3094
  let i = this.localPreserveWS, s = this.top;
3095
3095
  (e.tagName == "PRE" || /pre/.test(e.style && e.style.whiteSpace)) && (this.localPreserveWS = !0);
3096
3096
  let o = e.nodeName.toLowerCase(), l;
3097
- Hs.hasOwnProperty(o) && this.parser.normalizeLists && Jl(e);
3097
+ Hs.hasOwnProperty(o) && this.parser.normalizeLists && Ul(e);
3098
3098
  let a = this.options.ruleFromNode && this.options.ruleFromNode(e) || (l = this.parser.matchTag(e, this, r));
3099
- e: if (a ? a.ignore : Kl.hasOwnProperty(o))
3099
+ e: if (a ? a.ignore : Jl.hasOwnProperty(o))
3100
3100
  this.findInside(e), this.ignoreFallback(e, t);
3101
3101
  else if (!a || a.skip || a.closeParent) {
3102
3102
  a && a.closeParent ? this.open = Math.max(0, this.open - 1) : a && a.skip.nodeType && (e = a.skip);
@@ -3237,7 +3237,7 @@ class pi {
3237
3237
  let o = this.top;
3238
3238
  o.match = o.match && o.match.matchType(e);
3239
3239
  let l = hi(e, s, o.options);
3240
- o.options & At && o.content.length == 0 && (l |= At);
3240
+ o.options & Dt && o.content.length == 0 && (l |= Dt);
3241
3241
  let a = A.none;
3242
3242
  return r = r.filter((c) => (o.type ? o.type.allowsMarkType(c.type) : gi(c.type, e)) ? (a = c.addToSet(a), !1) : !0), this.nodes.push(new tn(e, t, a, i, null, l)), this.open++, r;
3243
3243
  }
@@ -3333,13 +3333,13 @@ class pi {
3333
3333
  }
3334
3334
  }
3335
3335
  }
3336
- function Jl(n) {
3336
+ function Ul(n) {
3337
3337
  for (let e = n.firstChild, t = null; e; e = e.nextSibling) {
3338
3338
  let r = e.nodeType == 1 ? e.nodeName.toLowerCase() : null;
3339
3339
  r && Hs.hasOwnProperty(r) && t ? (t.appendChild(e), e = t) : r == "li" ? t = e : r && (t = null);
3340
3340
  }
3341
3341
  }
3342
- function Ul(n, e) {
3342
+ function _l(n, e) {
3343
3343
  return (n.matches || n.msMatchesSelector || n.webkitMatchesSelector || n.mozMatchesSelector).call(n, e);
3344
3344
  }
3345
3345
  function mi(n) {
@@ -3482,11 +3482,11 @@ function _n(n) {
3482
3482
  return n.document || window.document;
3483
3483
  }
3484
3484
  const bi = /* @__PURE__ */ new WeakMap();
3485
- function _l(n) {
3485
+ function Gl(n) {
3486
3486
  let e = bi.get(n);
3487
- return e === void 0 && bi.set(n, e = Gl(n)), e;
3487
+ return e === void 0 && bi.set(n, e = Xl(n)), e;
3488
3488
  }
3489
- function Gl(n) {
3489
+ function Xl(n) {
3490
3490
  let e = null;
3491
3491
  function t(r) {
3492
3492
  if (r && typeof r == "object")
@@ -3512,7 +3512,7 @@ function cn(n, e, t, r) {
3512
3512
  let i = e[0], s;
3513
3513
  if (typeof i != "string")
3514
3514
  throw new RangeError("Invalid array passed to renderSpec");
3515
- if (r && (s = _l(r)) && s.indexOf(e) > -1)
3515
+ if (r && (s = Gl(r)) && s.indexOf(e) > -1)
3516
3516
  throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");
3517
3517
  let o = i.indexOf(" ");
3518
3518
  o > 0 && (t = i.slice(0, o), i = i.slice(o + 1));
@@ -3543,13 +3543,13 @@ function cn(n, e, t, r) {
3543
3543
  return { dom: a, contentDOM: l };
3544
3544
  }
3545
3545
  const Ws = 65535, qs = Math.pow(2, 16);
3546
- function Xl(n, e) {
3546
+ function Yl(n, e) {
3547
3547
  return n + e * qs;
3548
3548
  }
3549
3549
  function ki(n) {
3550
3550
  return n & Ws;
3551
3551
  }
3552
- function Yl(n) {
3552
+ function Zl(n) {
3553
3553
  return (n - (n & Ws)) / qs;
3554
3554
  }
3555
3555
  const js = 1, Ks = 2, dn = 4, Js = 8;
@@ -3607,7 +3607,7 @@ class le {
3607
3607
  if (!this.inverted)
3608
3608
  for (let i = 0; i < r; i++)
3609
3609
  t += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];
3610
- return this.ranges[r * 3] + t + Yl(e);
3610
+ return this.ranges[r * 3] + t + Zl(e);
3611
3611
  }
3612
3612
  mapResult(e, t = 1) {
3613
3613
  return this._map(e, t, !1);
@@ -3629,7 +3629,7 @@ class le {
3629
3629
  let f = c ? e == a ? -1 : e == u ? 1 : t : t, h = a + i + (f < 0 ? 0 : d);
3630
3630
  if (r)
3631
3631
  return h;
3632
- let p = e == (t < 0 ? a : u) ? null : Xl(l / 3, e - a), m = e == a ? Ks : e == u ? js : dn;
3632
+ let p = e == (t < 0 ? a : u) ? null : Yl(l / 3, e - a), m = e == a ? Ks : e == u ? js : dn;
3633
3633
  return (t < 0 ? e != a : e != u) && (m |= Js), new xr(h, m, p);
3634
3634
  }
3635
3635
  i += d - c;
@@ -4159,7 +4159,7 @@ function Sr(n, e, t) {
4159
4159
  }
4160
4160
  return !1;
4161
4161
  }
4162
- function Zl(n, e, t, r) {
4162
+ function Ql(n, e, t, r) {
4163
4163
  let i = [], s = [], o, l;
4164
4164
  n.doc.nodesBetween(e, t, (a, c, d) => {
4165
4165
  if (!a.isInline)
@@ -4173,7 +4173,7 @@ function Zl(n, e, t, r) {
4173
4173
  }
4174
4174
  }), i.forEach((a) => n.step(a)), s.forEach((a) => n.step(a));
4175
4175
  }
4176
- function Ql(n, e, t, r) {
4176
+ function ea(n, e, t, r) {
4177
4177
  let i = [], s = 0;
4178
4178
  n.doc.nodesBetween(e, t, (o, l) => {
4179
4179
  if (!o.isInline)
@@ -4223,22 +4223,22 @@ function Fr(n, e, t, r = t.contentMatch, i = !0) {
4223
4223
  for (let a = o.length - 1; a >= 0; a--)
4224
4224
  n.step(o[a]);
4225
4225
  }
4226
- function ea(n, e, t) {
4226
+ function ta(n, e, t) {
4227
4227
  return (e == 0 || n.canReplace(e, n.childCount)) && (t == n.childCount || n.canReplace(0, t));
4228
4228
  }
4229
- function wt(n) {
4229
+ function Ct(n) {
4230
4230
  let t = n.parent.content.cutByIndex(n.startIndex, n.endIndex);
4231
4231
  for (let r = n.depth, i = 0, s = 0; ; --r) {
4232
4232
  let o = n.$from.node(r), l = n.$from.index(r) + i, a = n.$to.indexAfter(r) - s;
4233
4233
  if (r < n.depth && o.canReplace(l, a, t))
4234
4234
  return r;
4235
- if (r == 0 || o.type.spec.isolating || !ea(o, l, a))
4235
+ if (r == 0 || o.type.spec.isolating || !ta(o, l, a))
4236
4236
  break;
4237
4237
  l && (i = 1), a < o.childCount && (s = 1);
4238
4238
  }
4239
4239
  return null;
4240
4240
  }
4241
- function ta(n, e, t) {
4241
+ function na(n, e, t) {
4242
4242
  let { $from: r, $to: i, depth: s } = e, o = r.before(s + 1), l = i.after(s + 1), a = o, c = l, d = b.empty, u = 0;
4243
4243
  for (let p = s, m = !1; p > t; p--)
4244
4244
  m || r.index(p) > 0 ? (m = !0, d = b.from(r.node(p).copy(d)), u++) : a--;
@@ -4248,20 +4248,20 @@ function ta(n, e, t) {
4248
4248
  n.step(new $(a, c, o, l, new k(d.append(f), u, h), d.size - u, !0));
4249
4249
  }
4250
4250
  function $r(n, e, t = null, r = n) {
4251
- let i = na(n, e), s = i && ra(r, e);
4251
+ let i = ra(n, e), s = i && ia(r, e);
4252
4252
  return s ? i.map(xi).concat({ type: e, attrs: t }).concat(s.map(xi)) : null;
4253
4253
  }
4254
4254
  function xi(n) {
4255
4255
  return { type: n, attrs: null };
4256
4256
  }
4257
- function na(n, e) {
4257
+ function ra(n, e) {
4258
4258
  let { parent: t, startIndex: r, endIndex: i } = n, s = t.contentMatchAt(r).findWrapping(e);
4259
4259
  if (!s)
4260
4260
  return null;
4261
4261
  let o = s.length ? s[0] : e;
4262
4262
  return t.canReplaceWith(r, i, o) ? s : null;
4263
4263
  }
4264
- function ra(n, e) {
4264
+ function ia(n, e) {
4265
4265
  let { parent: t, startIndex: r, endIndex: i } = n, s = t.child(r), o = e.contentMatch.findWrapping(s.type);
4266
4266
  if (!o)
4267
4267
  return null;
@@ -4270,7 +4270,7 @@ function ra(n, e) {
4270
4270
  a = a.matchType(t.child(c).type);
4271
4271
  return !a || !a.validEnd ? null : o;
4272
4272
  }
4273
- function ia(n, e, t) {
4273
+ function sa(n, e, t) {
4274
4274
  let r = b.empty;
4275
4275
  for (let o = t.length - 1; o >= 0; o--) {
4276
4276
  if (r.size) {
@@ -4283,13 +4283,13 @@ function ia(n, e, t) {
4283
4283
  let i = e.start, s = e.end;
4284
4284
  n.step(new $(i, s, i, s, new k(r, 0, 0), t.length, !0));
4285
4285
  }
4286
- function sa(n, e, t, r, i) {
4286
+ function oa(n, e, t, r, i) {
4287
4287
  if (!r.isTextblock)
4288
4288
  throw new RangeError("Type given to setBlockType should be a textblock");
4289
4289
  let s = n.steps.length;
4290
4290
  n.doc.nodesBetween(e, t, (o, l) => {
4291
4291
  let a = typeof i == "function" ? i(o) : i;
4292
- if (o.isTextblock && !o.hasMarkup(r, a) && oa(n.doc, n.mapping.slice(s).map(l), r)) {
4292
+ if (o.isTextblock && !o.hasMarkup(r, a) && la(n.doc, n.mapping.slice(s).map(l), r)) {
4293
4293
  let c = null;
4294
4294
  if (r.schema.linebreakReplacement) {
4295
4295
  let h = r.whitespace == "pre", p = !!r.contentMatch.matchType(r.schema.linebreakReplacement);
@@ -4321,11 +4321,11 @@ function _s(n, e, t, r) {
4321
4321
  }
4322
4322
  });
4323
4323
  }
4324
- function oa(n, e, t) {
4324
+ function la(n, e, t) {
4325
4325
  let r = n.resolve(e), i = r.index();
4326
4326
  return r.parent.canReplaceWith(i, i + 1, t);
4327
4327
  }
4328
- function la(n, e, t, r, i) {
4328
+ function aa(n, e, t, r, i) {
4329
4329
  let s = n.doc.nodeAt(e);
4330
4330
  if (!s)
4331
4331
  throw new RangeError("No node at given position");
@@ -4354,7 +4354,7 @@ function Ee(n, e, t = 1, r) {
4354
4354
  let l = i.indexAfter(s), a = r && r[0];
4355
4355
  return i.node(s).canReplaceWith(l, l, a ? a.type : i.node(s + 1).type);
4356
4356
  }
4357
- function aa(n, e, t = 1, r) {
4357
+ function ca(n, e, t = 1, r) {
4358
4358
  let i = n.doc.resolve(e), s = b.empty, o = b.empty;
4359
4359
  for (let l = i.depth, a = i.depth - t, c = t - 1; l > a; l--, c--) {
4360
4360
  s = b.from(i.node(l).copy(s));
@@ -4367,7 +4367,7 @@ function je(n, e) {
4367
4367
  let t = n.resolve(e), r = t.index();
4368
4368
  return Gs(t.nodeBefore, t.nodeAfter) && t.parent.canReplace(r, r + 1);
4369
4369
  }
4370
- function ca(n, e) {
4370
+ function da(n, e) {
4371
4371
  e.content.size || n.type.compatibleContent(e.type);
4372
4372
  let t = n.contentMatchAt(n.childCount), { linebreakReplacement: r } = n.type.schema;
4373
4373
  for (let i = 0; i < e.childCount; i++) {
@@ -4378,7 +4378,7 @@ function ca(n, e) {
4378
4378
  return t.validEnd;
4379
4379
  }
4380
4380
  function Gs(n, e) {
4381
- return !!(n && e && !n.isLeaf && ca(n, e));
4381
+ return !!(n && e && !n.isLeaf && da(n, e));
4382
4382
  }
4383
4383
  function Pn(n, e, t = -1) {
4384
4384
  let r = n.resolve(e);
@@ -4391,7 +4391,7 @@ function Pn(n, e, t = -1) {
4391
4391
  e = t < 0 ? r.before(i) : r.after(i);
4392
4392
  }
4393
4393
  }
4394
- function da(n, e, t) {
4394
+ function ua(n, e, t) {
4395
4395
  let r = null, { linebreakReplacement: i } = n.doc.type.schema, s = n.doc.resolve(e - t), o = s.node().type;
4396
4396
  if (i && o.inlineContent) {
4397
4397
  let d = o.whitespace == "pre", u = !!o.contentMatch.matchType(i);
@@ -4410,7 +4410,7 @@ function da(n, e, t) {
4410
4410
  }
4411
4411
  return n;
4412
4412
  }
4413
- function ua(n, e, t) {
4413
+ function fa(n, e, t) {
4414
4414
  let r = n.resolve(e);
4415
4415
  if (r.parent.canReplaceWith(r.index(), r.index(), t))
4416
4416
  return e;
@@ -4457,12 +4457,12 @@ function Bn(n, e, t = e, r = k.empty) {
4457
4457
  if (e == t && !r.size)
4458
4458
  return null;
4459
4459
  let i = n.resolve(e), s = n.resolve(t);
4460
- return Ys(i, s, r) ? new P(e, t, r) : new fa(i, s, r).fit();
4460
+ return Ys(i, s, r) ? new P(e, t, r) : new ha(i, s, r).fit();
4461
4461
  }
4462
4462
  function Ys(n, e, t) {
4463
4463
  return !t.openStart && !t.openEnd && n.start() == e.start() && n.parent.canReplace(n.index(), e.index(), t.content);
4464
4464
  }
4465
- class fa {
4465
+ class ha {
4466
4466
  constructor(e, t, r) {
4467
4467
  this.$from = e, this.$to = t, this.unplaced = r, this.frontier = [], this.placed = b.empty;
4468
4468
  for (let i = 0; i <= e.depth; i++) {
@@ -4529,9 +4529,9 @@ class fa {
4529
4529
  let { content: e, openStart: t, openEnd: r } = this.unplaced, i = Xn(e, t);
4530
4530
  if (i.childCount <= 1 && t > 0) {
4531
4531
  let s = e.size - t <= t + i.size;
4532
- this.unplaced = new k(Ot(e, t - 1, 1), t - 1, s ? t - 1 : r);
4532
+ this.unplaced = new k(vt(e, t - 1, 1), t - 1, s ? t - 1 : r);
4533
4533
  } else
4534
- this.unplaced = new k(Ot(e, t, 1), t, r);
4534
+ this.unplaced = new k(vt(e, t, 1), t, r);
4535
4535
  }
4536
4536
  // Move content from the unplaced slice at `sliceDepth` to the
4537
4537
  // frontier node at `frontierDepth`. Close that frontier node when
@@ -4556,12 +4556,12 @@ class fa {
4556
4556
  c++, (c > 1 || a == 0 || m.content.size) && (u = g, d.push(Zs(m.mark(f.allowedMarks(m.marks)), c == 1 ? a : 0, c == l.childCount ? h : -1)));
4557
4557
  }
4558
4558
  let p = c == l.childCount;
4559
- p || (h = -1), this.placed = vt(this.placed, t, b.from(d)), this.frontier[t].match = u, p && h < 0 && r && r.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
4559
+ p || (h = -1), this.placed = Et(this.placed, t, b.from(d)), this.frontier[t].match = u, p && h < 0 && r && r.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
4560
4560
  for (let m = 0, g = l; m < h; m++) {
4561
4561
  let y = g.lastChild;
4562
4562
  this.frontier.push({ type: y.type, match: y.contentMatchAt(y.childCount) }), g = y.content;
4563
4563
  }
4564
- this.unplaced = p ? e == 0 ? k.empty : new k(Ot(o.content, e - 1, 1), e - 1, h < 0 ? o.openEnd : e - 1) : new k(Ot(o.content, e, c), o.openStart, o.openEnd);
4564
+ this.unplaced = p ? e == 0 ? k.empty : new k(vt(o.content, e - 1, 1), e - 1, h < 0 ? o.openEnd : e - 1) : new k(vt(o.content, e, c), o.openStart, o.openEnd);
4565
4565
  }
4566
4566
  mustMoveInline() {
4567
4567
  if (!this.$to.parent.isTextblock)
@@ -4593,7 +4593,7 @@ class fa {
4593
4593
  return null;
4594
4594
  for (; this.depth > t.depth; )
4595
4595
  this.closeFrontierNode();
4596
- t.fit.childCount && (this.placed = vt(this.placed, t.depth, t.fit)), e = t.move;
4596
+ t.fit.childCount && (this.placed = Et(this.placed, t.depth, t.fit)), e = t.move;
4597
4597
  for (let r = t.depth + 1; r <= e.depth; r++) {
4598
4598
  let i = e.node(r), s = i.type.contentMatch.fillBefore(i.content, !0, e.index(r));
4599
4599
  this.openFrontierNode(i.type, i.attrs, s);
@@ -4602,18 +4602,18 @@ class fa {
4602
4602
  }
4603
4603
  openFrontierNode(e, t = null, r) {
4604
4604
  let i = this.frontier[this.depth];
4605
- i.match = i.match.matchType(e), this.placed = vt(this.placed, this.depth, b.from(e.create(t, r))), this.frontier.push({ type: e, match: e.contentMatch });
4605
+ i.match = i.match.matchType(e), this.placed = Et(this.placed, this.depth, b.from(e.create(t, r))), this.frontier.push({ type: e, match: e.contentMatch });
4606
4606
  }
4607
4607
  closeFrontierNode() {
4608
4608
  let t = this.frontier.pop().match.fillBefore(b.empty, !0);
4609
- t.childCount && (this.placed = vt(this.placed, this.frontier.length, t));
4609
+ t.childCount && (this.placed = Et(this.placed, this.frontier.length, t));
4610
4610
  }
4611
4611
  }
4612
- function Ot(n, e, t) {
4613
- return e == 0 ? n.cutByIndex(t, n.childCount) : n.replaceChild(0, n.firstChild.copy(Ot(n.firstChild.content, e - 1, t)));
4614
- }
4615
4612
  function vt(n, e, t) {
4616
- return e == 0 ? n.append(t) : n.replaceChild(n.childCount - 1, n.lastChild.copy(vt(n.lastChild.content, e - 1, t)));
4613
+ return e == 0 ? n.cutByIndex(t, n.childCount) : n.replaceChild(0, n.firstChild.copy(vt(n.firstChild.content, e - 1, t)));
4614
+ }
4615
+ function Et(n, e, t) {
4616
+ return e == 0 ? n.append(t) : n.replaceChild(n.childCount - 1, n.lastChild.copy(Et(n.lastChild.content, e - 1, t)));
4617
4617
  }
4618
4618
  function Xn(n, e) {
4619
4619
  for (let t = 0; t < e; t++)
@@ -4631,18 +4631,18 @@ function Yn(n, e, t, r, i) {
4631
4631
  if (o == s.childCount && !t.compatibleContent(s.type))
4632
4632
  return null;
4633
4633
  let l = r.fillBefore(s.content, !0, o);
4634
- return l && !ha(t, s.content, o) ? l : null;
4634
+ return l && !pa(t, s.content, o) ? l : null;
4635
4635
  }
4636
- function ha(n, e, t) {
4636
+ function pa(n, e, t) {
4637
4637
  for (let r = t; r < e.childCount; r++)
4638
4638
  if (!n.allowsMarks(e.child(r).marks))
4639
4639
  return !0;
4640
4640
  return !1;
4641
4641
  }
4642
- function pa(n) {
4642
+ function ma(n) {
4643
4643
  return n.spec.defining || n.spec.definingForContent;
4644
4644
  }
4645
- function ma(n, e, t, r) {
4645
+ function ga(n, e, t, r) {
4646
4646
  if (!r.size)
4647
4647
  return n.deleteRange(e, t);
4648
4648
  let i = n.doc.resolve(e), s = n.doc.resolve(t);
@@ -4666,7 +4666,7 @@ function ma(n, e, t, r) {
4666
4666
  f = p.content;
4667
4667
  }
4668
4668
  for (let f = d - 1; f >= 0; f--) {
4669
- let h = c[f], p = pa(h.type);
4669
+ let h = c[f], p = ma(h.type);
4670
4670
  if (p && !h.sameMarkup(i.node(Math.abs(l) - 1)))
4671
4671
  d = f;
4672
4672
  else if (p || !h.type.isTextblock)
@@ -4700,14 +4700,14 @@ function Qs(n, e, t, r, i) {
4700
4700
  }
4701
4701
  return n;
4702
4702
  }
4703
- function ga(n, e, t, r) {
4703
+ function ya(n, e, t, r) {
4704
4704
  if (!r.isInline && e == t && n.doc.resolve(e).parent.content.size) {
4705
- let i = ua(n.doc, e, r.type);
4705
+ let i = fa(n.doc, e, r.type);
4706
4706
  i != null && (e = t = i);
4707
4707
  }
4708
4708
  n.replaceRange(e, t, new k(b.from(r), 0, 0));
4709
4709
  }
4710
- function ya(n, e, t) {
4710
+ function ba(n, e, t) {
4711
4711
  let r = n.doc.resolve(e), i = n.doc.resolve(t);
4712
4712
  if (r.parent.isTextblock && i.parent.isTextblock && r.start() != i.start() && r.parentOffset == 0 && i.parentOffset == 0) {
4713
4713
  let o = r.sharedDepth(t), l = !1;
@@ -4746,7 +4746,7 @@ function eo(n, e) {
4746
4746
  }
4747
4747
  return t;
4748
4748
  }
4749
- class yt extends Q {
4749
+ class bt extends Q {
4750
4750
  /**
4751
4751
  Construct an attribute step.
4752
4752
  */
@@ -4768,11 +4768,11 @@ class yt extends Q {
4768
4768
  return le.empty;
4769
4769
  }
4770
4770
  invert(e) {
4771
- return new yt(this.pos, this.attr, e.nodeAt(this.pos).attrs[this.attr]);
4771
+ return new bt(this.pos, this.attr, e.nodeAt(this.pos).attrs[this.attr]);
4772
4772
  }
4773
4773
  map(e) {
4774
4774
  let t = e.mapResult(this.pos, 1);
4775
- return t.deletedAfter ? null : new yt(t.pos, this.attr, this.value);
4775
+ return t.deletedAfter ? null : new bt(t.pos, this.attr, this.value);
4776
4776
  }
4777
4777
  toJSON() {
4778
4778
  return { stepType: "attr", pos: this.pos, attr: this.attr, value: this.value };
@@ -4780,10 +4780,10 @@ class yt extends Q {
4780
4780
  static fromJSON(e, t) {
4781
4781
  if (typeof t.pos != "number" || typeof t.attr != "string")
4782
4782
  throw new RangeError("Invalid input for AttrStep.fromJSON");
4783
- return new yt(t.pos, t.attr, t.value);
4783
+ return new bt(t.pos, t.attr, t.value);
4784
4784
  }
4785
4785
  }
4786
- Q.jsonID("attr", yt);
4786
+ Q.jsonID("attr", bt);
4787
4787
  class zt extends Q {
4788
4788
  /**
4789
4789
  Construct an attribute step.
@@ -4818,16 +4818,16 @@ class zt extends Q {
4818
4818
  }
4819
4819
  }
4820
4820
  Q.jsonID("docAttr", zt);
4821
- let kt = class extends Error {
4821
+ let xt = class extends Error {
4822
4822
  };
4823
- kt = function n(e) {
4823
+ xt = function n(e) {
4824
4824
  let t = Error.call(this, e);
4825
4825
  return t.__proto__ = n.prototype, t;
4826
4826
  };
4827
- kt.prototype = Object.create(Error.prototype);
4828
- kt.prototype.constructor = kt;
4829
- kt.prototype.name = "TransformError";
4830
- class ba {
4827
+ xt.prototype = Object.create(Error.prototype);
4828
+ xt.prototype.constructor = xt;
4829
+ xt.prototype.name = "TransformError";
4830
+ class ka {
4831
4831
  /**
4832
4832
  Create a transform that starts with the given document.
4833
4833
  */
@@ -4847,7 +4847,7 @@ class ba {
4847
4847
  step(e) {
4848
4848
  let t = this.maybeStep(e);
4849
4849
  if (t.failed)
4850
- throw new kt(t.failed);
4850
+ throw new xt(t.failed);
4851
4851
  return this;
4852
4852
  }
4853
4853
  /**
@@ -4934,7 +4934,7 @@ class ba {
4934
4934
  control over what happens.
4935
4935
  */
4936
4936
  replaceRange(e, t, r) {
4937
- return ma(this, e, t, r), this;
4937
+ return ga(this, e, t, r), this;
4938
4938
  }
4939
4939
  /**
4940
4940
  Replace the given range with a node, but use `from` and `to` as
@@ -4946,14 +4946,14 @@ class ba {
4946
4946
  that parent node.
4947
4947
  */
4948
4948
  replaceRangeWith(e, t, r) {
4949
- return ga(this, e, t, r), this;
4949
+ return ya(this, e, t, r), this;
4950
4950
  }
4951
4951
  /**
4952
4952
  Delete the given range, expanding it to cover fully covered
4953
4953
  parent nodes until a valid replace is found.
4954
4954
  */
4955
4955
  deleteRange(e, t) {
4956
- return ya(this, e, t), this;
4956
+ return ba(this, e, t), this;
4957
4957
  }
4958
4958
  /**
4959
4959
  Split the content in the given range off from its parent, if there
@@ -4963,14 +4963,14 @@ class ba {
4963
4963
  sure the lift is valid.
4964
4964
  */
4965
4965
  lift(e, t) {
4966
- return ta(this, e, t), this;
4966
+ return na(this, e, t), this;
4967
4967
  }
4968
4968
  /**
4969
4969
  Join the blocks around the given position. If depth is 2, their
4970
4970
  last and first siblings are also joined, and so on.
4971
4971
  */
4972
4972
  join(e, t = 1) {
4973
- return da(this, e, t), this;
4973
+ return ua(this, e, t), this;
4974
4974
  }
4975
4975
  /**
4976
4976
  Wrap the given [range](https://prosemirror.net/docs/ref/#model.NodeRange) in the given set of wrappers.
@@ -4978,21 +4978,21 @@ class ba {
4978
4978
  probably be computed with [`findWrapping`](https://prosemirror.net/docs/ref/#transform.findWrapping).
4979
4979
  */
4980
4980
  wrap(e, t) {
4981
- return ia(this, e, t), this;
4981
+ return sa(this, e, t), this;
4982
4982
  }
4983
4983
  /**
4984
4984
  Set the type of all textblocks (partly) between `from` and `to` to
4985
4985
  the given node type with the given attributes.
4986
4986
  */
4987
4987
  setBlockType(e, t = e, r, i = null) {
4988
- return sa(this, e, t, r, i), this;
4988
+ return oa(this, e, t, r, i), this;
4989
4989
  }
4990
4990
  /**
4991
4991
  Change the type, attributes, and/or marks of the node at `pos`.
4992
4992
  When `type` isn't given, the existing node type is preserved,
4993
4993
  */
4994
4994
  setNodeMarkup(e, t, r = null, i) {
4995
- return la(this, e, t, r, i), this;
4995
+ return aa(this, e, t, r, i), this;
4996
4996
  }
4997
4997
  /**
4998
4998
  Set a single attribute on a given node to a new value.
@@ -5000,7 +5000,7 @@ class ba {
5000
5000
  to set attributes on the document itself.
5001
5001
  */
5002
5002
  setNodeAttribute(e, t, r) {
5003
- return this.step(new yt(e, t, r)), this;
5003
+ return this.step(new bt(e, t, r)), this;
5004
5004
  }
5005
5005
  /**
5006
5006
  Set a single attribute on the document to a new value.
@@ -5041,13 +5041,13 @@ class ba {
5041
5041
  use after the split (with the outermost nodes coming first).
5042
5042
  */
5043
5043
  split(e, t = 1, r) {
5044
- return aa(this, e, t, r), this;
5044
+ return ca(this, e, t, r), this;
5045
5045
  }
5046
5046
  /**
5047
5047
  Add the given mark to the inline content between `from` and `to`.
5048
5048
  */
5049
5049
  addMark(e, t, r) {
5050
- return Zl(this, e, t, r), this;
5050
+ return Ql(this, e, t, r), this;
5051
5051
  }
5052
5052
  /**
5053
5053
  Remove marks from inline nodes between `from` and `to`. When
@@ -5056,7 +5056,7 @@ class ba {
5056
5056
  remove all marks of any type.
5057
5057
  */
5058
5058
  removeMark(e, t, r) {
5059
- return Ql(this, e, t, r), this;
5059
+ return ea(this, e, t, r), this;
5060
5060
  }
5061
5061
  /**
5062
5062
  Removes all marks and nodes from the content of the node at
@@ -5076,7 +5076,7 @@ class v {
5076
5076
  `$head`.
5077
5077
  */
5078
5078
  constructor(e, t, r) {
5079
- this.$anchor = e, this.$head = t, this.ranges = r || [new ka(e.min(t), e.max(t))];
5079
+ this.$anchor = e, this.$head = t, this.ranges = r || [new xa(e.min(t), e.max(t))];
5080
5080
  }
5081
5081
  /**
5082
5082
  The selection's anchor, as an unresolved position.
@@ -5234,7 +5234,7 @@ class v {
5234
5234
  }
5235
5235
  }
5236
5236
  v.prototype.visible = !0;
5237
- class ka {
5237
+ class xa {
5238
5238
  /**
5239
5239
  Create a range.
5240
5240
  */
@@ -5422,11 +5422,11 @@ class ce extends v {
5422
5422
  return e instanceof ce;
5423
5423
  }
5424
5424
  getBookmark() {
5425
- return xa;
5425
+ return Sa;
5426
5426
  }
5427
5427
  }
5428
5428
  v.jsonID("all", ce);
5429
- const xa = {
5429
+ const Sa = {
5430
5430
  map() {
5431
5431
  return this;
5432
5432
  },
@@ -5464,7 +5464,7 @@ function wi(n, e, t) {
5464
5464
  }), n.setSelection(v.near(n.doc.resolve(o), t));
5465
5465
  }
5466
5466
  const Ci = 1, nn = 2, Ti = 4;
5467
- class Sa extends ba {
5467
+ class Ma extends ka {
5468
5468
  /**
5469
5469
  @internal
5470
5470
  */
@@ -5618,13 +5618,13 @@ class Sa extends ba {
5618
5618
  function Oi(n, e) {
5619
5619
  return !e || !n ? n : n.bind(e);
5620
5620
  }
5621
- class Et {
5621
+ class Nt {
5622
5622
  constructor(e, t, r) {
5623
5623
  this.name = e, this.init = Oi(t.init, r), this.apply = Oi(t.apply, r);
5624
5624
  }
5625
5625
  }
5626
- const Ma = [
5627
- new Et("doc", {
5626
+ const wa = [
5627
+ new Nt("doc", {
5628
5628
  init(n) {
5629
5629
  return n.doc || n.schema.topNodeType.createAndFill();
5630
5630
  },
@@ -5632,7 +5632,7 @@ const Ma = [
5632
5632
  return n.doc;
5633
5633
  }
5634
5634
  }),
5635
- new Et("selection", {
5635
+ new Nt("selection", {
5636
5636
  init(n, e) {
5637
5637
  return n.selection || v.atStart(e.doc);
5638
5638
  },
@@ -5640,7 +5640,7 @@ const Ma = [
5640
5640
  return n.selection;
5641
5641
  }
5642
5642
  }),
5643
- new Et("storedMarks", {
5643
+ new Nt("storedMarks", {
5644
5644
  init(n) {
5645
5645
  return n.storedMarks || null;
5646
5646
  },
@@ -5648,7 +5648,7 @@ const Ma = [
5648
5648
  return r.selection.$cursor ? n.storedMarks : null;
5649
5649
  }
5650
5650
  }),
5651
- new Et("scrollToSelection", {
5651
+ new Nt("scrollToSelection", {
5652
5652
  init() {
5653
5653
  return 0;
5654
5654
  },
@@ -5659,10 +5659,10 @@ const Ma = [
5659
5659
  ];
5660
5660
  class Qn {
5661
5661
  constructor(e, t) {
5662
- this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = Ma.slice(), t && t.forEach((r) => {
5662
+ this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = wa.slice(), t && t.forEach((r) => {
5663
5663
  if (this.pluginsByKey[r.key])
5664
5664
  throw new RangeError("Adding different instances of a keyed plugin (" + r.key + ")");
5665
- this.plugins.push(r), this.pluginsByKey[r.key] = r, r.spec.state && this.fields.push(new Et(r.key, r.spec.state, r));
5665
+ this.plugins.push(r), this.pluginsByKey[r.key] = r, r.spec.state && this.fields.push(new Nt(r.key, r.spec.state, r));
5666
5666
  });
5667
5667
  }
5668
5668
  }
@@ -5752,7 +5752,7 @@ class mt {
5752
5752
  Accessor that constructs and returns a new [transaction](https://prosemirror.net/docs/ref/#state.Transaction) from this state.
5753
5753
  */
5754
5754
  get tr() {
5755
- return new Sa(this);
5755
+ return new Ma(this);
5756
5756
  }
5757
5757
  /**
5758
5758
  Create a new state.
@@ -5881,7 +5881,7 @@ const J = function(n) {
5881
5881
  for (var e = 0; ; e++)
5882
5882
  if (n = n.previousSibling, !n)
5883
5883
  return e;
5884
- }, xt = function(n) {
5884
+ }, St = function(n) {
5885
5885
  let e = n.assignedSlot || n.parentNode;
5886
5886
  return e && e.nodeType == 11 ? e.host : e;
5887
5887
  };
@@ -5889,18 +5889,18 @@ let Mr = null;
5889
5889
  const Te = function(n, e, t) {
5890
5890
  let r = Mr || (Mr = document.createRange());
5891
5891
  return r.setEnd(n, t ?? n.nodeValue.length), r.setStart(n, e || 0), r;
5892
- }, wa = function() {
5892
+ }, Ca = function() {
5893
5893
  Mr = null;
5894
5894
  }, ot = function(n, e, t, r) {
5895
5895
  return t && (vi(n, e, t, r, -1) || vi(n, e, t, r, 1));
5896
- }, Ca = /^(img|br|input|textarea|hr)$/i;
5896
+ }, Ta = /^(img|br|input|textarea|hr)$/i;
5897
5897
  function vi(n, e, t, r, i) {
5898
5898
  for (var s; ; ) {
5899
5899
  if (n == t && e == r)
5900
5900
  return !0;
5901
5901
  if (e == (i < 0 ? 0 : fe(n))) {
5902
5902
  let o = n.parentNode;
5903
- if (!o || o.nodeType != 1 || Yt(n) || Ca.test(n.nodeName) || n.contentEditable == "false")
5903
+ if (!o || o.nodeType != 1 || Yt(n) || Ta.test(n.nodeName) || n.contentEditable == "false")
5904
5904
  return !1;
5905
5905
  e = J(n) + (i < 0 ? 0 : 1), n = o;
5906
5906
  } else if (n.nodeType == 1) {
@@ -5919,7 +5919,7 @@ function vi(n, e, t, r, i) {
5919
5919
  function fe(n) {
5920
5920
  return n.nodeType == 3 ? n.nodeValue.length : n.childNodes.length;
5921
5921
  }
5922
- function Ta(n, e) {
5922
+ function Oa(n, e) {
5923
5923
  for (; ; ) {
5924
5924
  if (n.nodeType == 3 && e)
5925
5925
  return n;
@@ -5933,7 +5933,7 @@ function Ta(n, e) {
5933
5933
  return null;
5934
5934
  }
5935
5935
  }
5936
- function Oa(n, e) {
5936
+ function va(n, e) {
5937
5937
  for (; ; ) {
5938
5938
  if (n.nodeType == 3 && e < n.nodeValue.length)
5939
5939
  return n;
@@ -5947,7 +5947,7 @@ function Oa(n, e) {
5947
5947
  return null;
5948
5948
  }
5949
5949
  }
5950
- function va(n, e, t) {
5950
+ function Ea(n, e, t) {
5951
5951
  for (let r = e == 0, i = e == fe(n); r || i; ) {
5952
5952
  if (n == t)
5953
5953
  return !0;
@@ -5970,13 +5970,13 @@ function Ue(n, e) {
5970
5970
  let t = document.createEvent("Event");
5971
5971
  return t.initEvent("keydown", !0, !0), t.keyCode = n, t.key = t.code = e, t;
5972
5972
  }
5973
- function Ea(n) {
5973
+ function Na(n) {
5974
5974
  let e = n.activeElement;
5975
5975
  for (; e && e.shadowRoot; )
5976
5976
  e = e.shadowRoot.activeElement;
5977
5977
  return e;
5978
5978
  }
5979
- function Na(n, e, t) {
5979
+ function Aa(n, e, t) {
5980
5980
  if (n.caretPositionFromPoint)
5981
5981
  try {
5982
5982
  let r = n.caretPositionFromPoint(e, t);
@@ -5992,8 +5992,8 @@ function Na(n, e, t) {
5992
5992
  }
5993
5993
  const xe = typeof navigator < "u" ? navigator : null, Ei = typeof document < "u" ? document : null, Ke = xe && xe.userAgent || "", wr = /Edge\/(\d+)/.exec(Ke), ro = /MSIE \d/.exec(Ke), Cr = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ke), ie = !!(ro || Cr || wr), Ve = ro ? document.documentMode : Cr ? +Cr[1] : wr ? +wr[1] : 0, pe = !ie && /gecko\/(\d+)/i.test(Ke);
5994
5994
  pe && +(/Firefox\/(\d+)/.exec(Ke) || [0, 0])[1];
5995
- const Tr = !ie && /Chrome\/(\d+)/.exec(Ke), _ = !!Tr, io = Tr ? +Tr[1] : 0, Z = !ie && !!xe && /Apple Computer/.test(xe.vendor), St = Z && (/Mobile\/\w+/.test(Ke) || !!xe && xe.maxTouchPoints > 2), ue = St || (xe ? /Mac/.test(xe.platform) : !1), so = xe ? /Win/.test(xe.platform) : !1, ve = /Android \d/.test(Ke), Zt = !!Ei && "webkitFontSmoothing" in Ei.documentElement.style, Aa = Zt ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
5996
- function Da(n) {
5995
+ const Tr = !ie && /Chrome\/(\d+)/.exec(Ke), _ = !!Tr, io = Tr ? +Tr[1] : 0, Z = !ie && !!xe && /Apple Computer/.test(xe.vendor), Mt = Z && (/Mobile\/\w+/.test(Ke) || !!xe && xe.maxTouchPoints > 2), ue = Mt || (xe ? /Mac/.test(xe.platform) : !1), so = xe ? /Win/.test(xe.platform) : !1, ve = /Android \d/.test(Ke), Zt = !!Ei && "webkitFontSmoothing" in Ei.documentElement.style, Da = Zt ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
5996
+ function Ia(n) {
5997
5997
  let e = n.defaultView && n.defaultView.visualViewport;
5998
5998
  return e ? {
5999
5999
  left: 0,
@@ -6010,7 +6010,7 @@ function Da(n) {
6010
6010
  function Ce(n, e) {
6011
6011
  return typeof n == "number" ? n : n[e];
6012
6012
  }
6013
- function Ia(n) {
6013
+ function Ra(n) {
6014
6014
  let e = n.getBoundingClientRect(), t = e.width / n.offsetWidth || 1, r = e.height / n.offsetHeight || 1;
6015
6015
  return {
6016
6016
  left: e.left,
@@ -6023,10 +6023,10 @@ function Ni(n, e, t) {
6023
6023
  let r = n.someProp("scrollThreshold") || 0, i = n.someProp("scrollMargin") || 5, s = n.dom.ownerDocument;
6024
6024
  for (let o = t || n.dom; o; ) {
6025
6025
  if (o.nodeType != 1) {
6026
- o = xt(o);
6026
+ o = St(o);
6027
6027
  continue;
6028
6028
  }
6029
- let l = o, a = l == s.body, c = a ? Da(s) : Ia(l), d = 0, u = 0;
6029
+ let l = o, a = l == s.body, c = a ? Ia(s) : Ra(l), d = 0, u = 0;
6030
6030
  if (e.top < c.top + Ce(r, "top") ? u = -(c.top - e.top + Ce(i, "top")) : e.bottom > c.bottom - Ce(r, "bottom") && (u = e.bottom - e.top > c.bottom - c.top ? e.top + Ce(i, "top") - c.top : e.bottom - c.bottom + Ce(i, "bottom")), e.left < c.left + Ce(r, "left") ? d = -(c.left - e.left + Ce(i, "left")) : e.right > c.right - Ce(r, "right") && (d = e.right - c.right + Ce(i, "right")), d || u)
6031
6031
  if (a)
6032
6032
  s.defaultView.scrollBy(d, u);
@@ -6039,10 +6039,10 @@ function Ni(n, e, t) {
6039
6039
  let f = a ? "fixed" : getComputedStyle(o).position;
6040
6040
  if (/^(fixed|sticky)$/.test(f))
6041
6041
  break;
6042
- o = f == "absolute" ? o.offsetParent : xt(o);
6042
+ o = f == "absolute" ? o.offsetParent : St(o);
6043
6043
  }
6044
6044
  }
6045
- function Ra(n) {
6045
+ function Pa(n) {
6046
6046
  let e = n.dom.getBoundingClientRect(), t = Math.max(0, e.top), r, i;
6047
6047
  for (let s = (e.left + e.right) / 2, o = t + 1; o < Math.min(innerHeight, e.bottom); o += 5) {
6048
6048
  let l = n.root.elementFromPoint(s, o);
@@ -6058,11 +6058,11 @@ function Ra(n) {
6058
6058
  }
6059
6059
  function oo(n) {
6060
6060
  let e = [], t = n.ownerDocument;
6061
- for (let r = n; r && (e.push({ dom: r, top: r.scrollTop, left: r.scrollLeft }), n != t); r = xt(r))
6061
+ for (let r = n; r && (e.push({ dom: r, top: r.scrollTop, left: r.scrollLeft }), n != t); r = St(r))
6062
6062
  ;
6063
6063
  return e;
6064
6064
  }
6065
- function Pa({ refDOM: n, refTop: e, stack: t }) {
6065
+ function Ba({ refDOM: n, refTop: e, stack: t }) {
6066
6066
  let r = n ? n.getBoundingClientRect().top : 0;
6067
6067
  lo(t, r == 0 ? 0 : r - e);
6068
6068
  }
@@ -6073,7 +6073,7 @@ function lo(n, e) {
6073
6073
  }
6074
6074
  }
6075
6075
  let ut = null;
6076
- function Ba(n) {
6076
+ function La(n) {
6077
6077
  if (n.setActive)
6078
6078
  return n.setActive();
6079
6079
  if (ut)
@@ -6111,9 +6111,9 @@ function ao(n, e) {
6111
6111
  !t && (e.left >= p.right && e.top >= p.top || e.left >= p.left && e.top >= p.bottom) && (s = u + 1);
6112
6112
  }
6113
6113
  }
6114
- return !t && a && (t = a, i = c, r = 0), t && t.nodeType == 3 ? La(t, i) : !t || r && t.nodeType == 1 ? { node: n, offset: s } : ao(t, i);
6114
+ return !t && a && (t = a, i = c, r = 0), t && t.nodeType == 3 ? za(t, i) : !t || r && t.nodeType == 1 ? { node: n, offset: s } : ao(t, i);
6115
6115
  }
6116
- function La(n, e) {
6116
+ function za(n, e) {
6117
6117
  let t = n.nodeValue.length, r = document.createRange(), i;
6118
6118
  for (let s = 0; s < t; s++) {
6119
6119
  r.setEnd(n, s + 1), r.setStart(n, s);
@@ -6128,11 +6128,11 @@ function La(n, e) {
6128
6128
  function Hr(n, e) {
6129
6129
  return n.left >= e.left - 1 && n.left <= e.right + 1 && n.top >= e.top - 1 && n.top <= e.bottom + 1;
6130
6130
  }
6131
- function za(n, e) {
6131
+ function Fa(n, e) {
6132
6132
  let t = n.parentNode;
6133
6133
  return t && /^li$/i.test(t.nodeName) && e.left < n.getBoundingClientRect().left ? t : n;
6134
6134
  }
6135
- function Fa(n, e, t) {
6135
+ function $a(n, e, t) {
6136
6136
  let { node: r, offset: i } = ao(e, t), s = -1;
6137
6137
  if (r.nodeType == 1 && !r.firstChild) {
6138
6138
  let o = r.getBoundingClientRect();
@@ -6140,7 +6140,7 @@ function Fa(n, e, t) {
6140
6140
  }
6141
6141
  return n.docView.posFromDOM(r, i, s);
6142
6142
  }
6143
- function $a(n, e, t, r) {
6143
+ function Va(n, e, t, r) {
6144
6144
  let i = -1;
6145
6145
  for (let s = e, o = !1; s != n.dom; ) {
6146
6146
  let l = n.docView.nearestDesc(s, !0), a;
@@ -6171,8 +6171,8 @@ function co(n, e, t) {
6171
6171
  }
6172
6172
  return n;
6173
6173
  }
6174
- function Va(n, e) {
6175
- let t = n.dom.ownerDocument, r, i = 0, s = Na(t, e.left, e.top);
6174
+ function Ha(n, e) {
6175
+ let t = n.dom.ownerDocument, r, i = 0, s = Aa(t, e.left, e.top);
6176
6176
  s && ({ node: r, offset: i } = s);
6177
6177
  let o = (n.root.elementFromPoint ? n.root : t).elementFromPoint(e.left, e.top), l;
6178
6178
  if (!o || !n.dom.contains(o.nodeType != 1 ? o.parentNode : o)) {
@@ -6181,17 +6181,17 @@ function Va(n, e) {
6181
6181
  return null;
6182
6182
  }
6183
6183
  if (Z)
6184
- for (let c = o; r && c; c = xt(c))
6184
+ for (let c = o; r && c; c = St(c))
6185
6185
  c.draggable && (r = void 0);
6186
- if (o = za(o, e), r) {
6186
+ if (o = Fa(o, e), r) {
6187
6187
  if (pe && r.nodeType == 1 && (i = Math.min(i, r.childNodes.length), i < r.childNodes.length)) {
6188
6188
  let d = r.childNodes[i], u;
6189
6189
  d.nodeName == "IMG" && (u = d.getBoundingClientRect()).right <= e.left && u.bottom > e.top && i++;
6190
6190
  }
6191
6191
  let c;
6192
- Zt && i && r.nodeType == 1 && (c = r.childNodes[i - 1]).nodeType == 1 && c.contentEditable == "false" && c.getBoundingClientRect().top >= e.top && i--, r == n.dom && i == r.childNodes.length - 1 && r.lastChild.nodeType == 1 && e.top > r.lastChild.getBoundingClientRect().bottom ? l = n.state.doc.content.size : (i == 0 || r.nodeType != 1 || r.childNodes[i - 1].nodeName != "BR") && (l = $a(n, r, i, e));
6192
+ Zt && i && r.nodeType == 1 && (c = r.childNodes[i - 1]).nodeType == 1 && c.contentEditable == "false" && c.getBoundingClientRect().top >= e.top && i--, r == n.dom && i == r.childNodes.length - 1 && r.lastChild.nodeType == 1 && e.top > r.lastChild.getBoundingClientRect().bottom ? l = n.state.doc.content.size : (i == 0 || r.nodeType != 1 || r.childNodes[i - 1].nodeName != "BR") && (l = Va(n, r, i, e));
6193
6193
  }
6194
- l == null && (l = Fa(n, o, e));
6194
+ l == null && (l = $a(n, o, e));
6195
6195
  let a = n.docView.nearestDesc(o, !0);
6196
6196
  return { pos: l, inside: a ? a.posAtStart - a.border : -1 };
6197
6197
  }
@@ -6207,24 +6207,24 @@ function De(n, e) {
6207
6207
  }
6208
6208
  return Array.prototype.find.call(t, Ai) || n.getBoundingClientRect();
6209
6209
  }
6210
- const Ha = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
6210
+ const Wa = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
6211
6211
  function uo(n, e, t) {
6212
6212
  let { node: r, offset: i, atom: s } = n.docView.domFromPos(e, t < 0 ? -1 : 1), o = Zt || pe;
6213
6213
  if (r.nodeType == 3)
6214
- if (o && (Ha.test(r.nodeValue) || (t < 0 ? !i : i == r.nodeValue.length))) {
6214
+ if (o && (Wa.test(r.nodeValue) || (t < 0 ? !i : i == r.nodeValue.length))) {
6215
6215
  let a = De(Te(r, i, i), t);
6216
6216
  if (pe && i && /\s/.test(r.nodeValue[i - 1]) && i < r.nodeValue.length) {
6217
6217
  let c = De(Te(r, i - 1, i - 1), -1);
6218
6218
  if (c.top == a.top) {
6219
6219
  let d = De(Te(r, i, i + 1), -1);
6220
6220
  if (d.top != a.top)
6221
- return Ct(d, d.left < c.left);
6221
+ return Tt(d, d.left < c.left);
6222
6222
  }
6223
6223
  }
6224
6224
  return a;
6225
6225
  } else {
6226
6226
  let a = i, c = i, d = t < 0 ? 1 : -1;
6227
- return t < 0 && !i ? (c++, d = -1) : t >= 0 && i == r.nodeValue.length ? (a--, d = 1) : t < 0 ? a-- : c++, Ct(De(Te(r, a, c), d), d < 0);
6227
+ return t < 0 && !i ? (c++, d = -1) : t >= 0 && i == r.nodeValue.length ? (a--, d = 1) : t < 0 ? a-- : c++, Tt(De(Te(r, a, c), d), d < 0);
6228
6228
  }
6229
6229
  if (!n.state.doc.resolve(e - (s || 0)).parent.inlineContent) {
6230
6230
  if (s == null && i && (t < 0 || i == fe(r))) {
@@ -6242,7 +6242,7 @@ function uo(n, e, t) {
6242
6242
  if (s == null && i && (t < 0 || i == fe(r))) {
6243
6243
  let a = r.childNodes[i - 1], c = a.nodeType == 3 ? Te(a, fe(a) - (o ? 0 : 1)) : a.nodeType == 1 && (a.nodeName != "BR" || !a.nextSibling) ? a : null;
6244
6244
  if (c)
6245
- return Ct(De(c, 1), !1);
6245
+ return Tt(De(c, 1), !1);
6246
6246
  }
6247
6247
  if (s == null && i < fe(r)) {
6248
6248
  let a = r.childNodes[i];
@@ -6250,11 +6250,11 @@ function uo(n, e, t) {
6250
6250
  a = a.nextSibling;
6251
6251
  let c = a ? a.nodeType == 3 ? Te(a, 0, o ? 0 : 1) : a.nodeType == 1 ? a : null : null;
6252
6252
  if (c)
6253
- return Ct(De(c, -1), !0);
6253
+ return Tt(De(c, -1), !0);
6254
6254
  }
6255
- return Ct(De(r.nodeType == 3 ? Te(r) : r, -t), t >= 0);
6255
+ return Tt(De(r.nodeType == 3 ? Te(r) : r, -t), t >= 0);
6256
6256
  }
6257
- function Ct(n, e) {
6257
+ function Tt(n, e) {
6258
6258
  if (n.width == 0)
6259
6259
  return n;
6260
6260
  let t = e ? n.left : n.right;
@@ -6275,7 +6275,7 @@ function fo(n, e, t) {
6275
6275
  r != e && n.updateState(r), i != n.dom && i && i.focus();
6276
6276
  }
6277
6277
  }
6278
- function Wa(n, e, t) {
6278
+ function qa(n, e, t) {
6279
6279
  let r = e.selection, i = t == "up" ? r.$from : r.$to;
6280
6280
  return fo(n, e, () => {
6281
6281
  let { node: s } = n.docView.domFromPos(i.pos, t == "up" ? -1 : 1);
@@ -6307,13 +6307,13 @@ function Wa(n, e, t) {
6307
6307
  return !0;
6308
6308
  });
6309
6309
  }
6310
- const qa = /[\u0590-\u08ac]/;
6311
- function ja(n, e, t) {
6310
+ const ja = /[\u0590-\u08ac]/;
6311
+ function Ka(n, e, t) {
6312
6312
  let { $head: r } = e.selection;
6313
6313
  if (!r.parent.isTextblock)
6314
6314
  return !1;
6315
6315
  let i = r.parentOffset, s = !i, o = i == r.parent.content.size, l = n.domSelection();
6316
- return l ? !qa.test(r.parent.textContent) || !l.modify ? t == "left" || t == "backward" ? s : o : fo(n, e, () => {
6316
+ return l ? !ja.test(r.parent.textContent) || !l.modify ? t == "left" || t == "backward" ? s : o : fo(n, e, () => {
6317
6317
  let { focusNode: a, focusOffset: c, anchorNode: d, anchorOffset: u } = n.domSelectionRange(), f = l.caretBidiLevel;
6318
6318
  l.modify("move", t, "character");
6319
6319
  let h = r.depth ? n.docView.domAfterPos(r.before()) : n.dom, { focusNode: p, focusOffset: m } = n.domSelectionRange(), g = p && !h.contains(p.nodeType == 1 ? p : p.parentNode) || a == p && c == m;
@@ -6325,8 +6325,8 @@ function ja(n, e, t) {
6325
6325
  }) : r.pos == r.start() || r.pos == r.end();
6326
6326
  }
6327
6327
  let Di = null, Ii = null, Ri = !1;
6328
- function Ka(n, e, t) {
6329
- return Di == e && Ii == t ? Ri : (Di = e, Ii = t, Ri = t == "up" || t == "down" ? Wa(n, e, t) : ja(n, e, t));
6328
+ function Ja(n, e, t) {
6329
+ return Di == e && Ii == t ? Ri : (Di = e, Ii = t, Ri = t == "up" || t == "down" ? qa(n, e, t) : Ka(n, e, t));
6330
6330
  }
6331
6331
  const me = 0, Pi = 1, Ge = 2, Se = 3;
6332
6332
  class Qt {
@@ -6716,7 +6716,7 @@ class ho extends Qt {
6716
6716
  return this.widget.type.side;
6717
6717
  }
6718
6718
  }
6719
- class Ja extends Qt {
6719
+ class Ua extends Qt {
6720
6720
  constructor(e, t, r, i) {
6721
6721
  super(e, [], t, null), this.textDOM = r, this.text = i;
6722
6722
  }
@@ -6797,7 +6797,7 @@ class He extends Qt {
6797
6797
  } else d || ({ dom: d, contentDOM: u } = dt.renderSpec(document, t.type.spec.toDOM(t), null, t.attrs));
6798
6798
  !u && !t.isText && d.nodeName != "BR" && (d.hasAttribute("contenteditable") || (d.contentEditable = "false"), t.type.spec.draggable && (d.draggable = !0));
6799
6799
  let f = d;
6800
- return d = yo(d, r, t), c ? a = new Ua(e, t, r, i, d, u || null, f, c, s, o + 1) : t.isText ? new Fn(e, t, r, i, d, f, s) : new He(e, t, r, i, d, u || null, f, s, o + 1);
6800
+ return d = yo(d, r, t), c ? a = new _a(e, t, r, i, d, u || null, f, c, s, o + 1) : t.isText ? new Fn(e, t, r, i, d, f, s) : new He(e, t, r, i, d, u || null, f, s, o + 1);
6801
6801
  }
6802
6802
  parseRule() {
6803
6803
  if (this.node.type.spec.reparseInView)
@@ -6833,14 +6833,14 @@ class He extends Qt {
6833
6833
  // separate step, syncs the DOM inside `this.contentDOM` to
6834
6834
  // `this.children`.
6835
6835
  updateChildren(e, t) {
6836
- let r = this.node.inlineContent, i = t, s = e.composing ? this.localCompositionInfo(e, t) : null, o = s && s.pos > -1 ? s : null, l = s && s.pos < 0, a = new Ga(this, o && o.node, e);
6837
- Za(this.node, this.innerDeco, (c, d, u) => {
6836
+ let r = this.node.inlineContent, i = t, s = e.composing ? this.localCompositionInfo(e, t) : null, o = s && s.pos > -1 ? s : null, l = s && s.pos < 0, a = new Xa(this, o && o.node, e);
6837
+ Qa(this.node, this.innerDeco, (c, d, u) => {
6838
6838
  c.spec.marks ? a.syncToMarks(c.spec.marks, r, e, d) : c.type.side >= 0 && !u && a.syncToMarks(d == this.node.childCount ? A.none : this.node.child(d).marks, r, e, d), a.placeWidget(c, e, i);
6839
6839
  }, (c, d, u, f) => {
6840
6840
  a.syncToMarks(c.marks, r, e, f);
6841
6841
  let h;
6842
6842
  a.findNodeMatch(c, d, u, f) || l && e.state.selection.from > i && e.state.selection.to < i + c.nodeSize && (h = a.findIndexWithChild(s.node)) > -1 && a.updateNodeAt(c, d, u, h, e) || a.updateNextNode(c, d, u, e, f, i) || a.addNode(c, d, u, e, i), i += c.nodeSize;
6843
- }), a.syncToMarks([], r, e, 0), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == Ge) && (o && this.protectLocalComposition(e, o), mo(this.contentDOM, this.children, e), St && Qa(this.dom));
6843
+ }), a.syncToMarks([], r, e, 0), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == Ge) && (o && this.protectLocalComposition(e, o), mo(this.contentDOM, this.children, e), Mt && ec(this.dom));
6844
6844
  }
6845
6845
  localCompositionInfo(e, t) {
6846
6846
  let { from: r, to: i } = e.state.selection;
@@ -6850,7 +6850,7 @@ class He extends Qt {
6850
6850
  if (!s || !this.dom.contains(s.parentNode))
6851
6851
  return null;
6852
6852
  if (this.node.inlineContent) {
6853
- let o = s.nodeValue, l = ec(this.node.content, o, r - t, i - t);
6853
+ let o = s.nodeValue, l = tc(this.node.content, o, r - t, i - t);
6854
6854
  return l < 0 ? null : { node: s, pos: l, text: o };
6855
6855
  } else
6856
6856
  return { node: s, pos: -1, text: "" };
@@ -6866,7 +6866,7 @@ class He extends Qt {
6866
6866
  s.parentNode.removeChild(s.nextSibling);
6867
6867
  s.pmViewDesc && (s.pmViewDesc = void 0);
6868
6868
  }
6869
- let o = new Ja(this, s, t, i);
6869
+ let o = new Ua(this, s, t, i);
6870
6870
  e.input.compositionNodes.push(o), this.children = vr(this.children, r, r + i.length, e, o);
6871
6871
  }
6872
6872
  // If this desc must be updated to match the given node decoration,
@@ -6957,7 +6957,7 @@ class po extends Qt {
6957
6957
  return this.dom.nodeName == "IMG";
6958
6958
  }
6959
6959
  }
6960
- class Ua extends He {
6960
+ class _a extends He {
6961
6961
  constructor(e, t, r, i, s, o, l, a, c, d) {
6962
6962
  super(e, t, r, i, s, o, l, c, d), this.spec = a;
6963
6963
  }
@@ -7010,22 +7010,22 @@ function mo(n, e, t) {
7010
7010
  r = Li(r), i = !0;
7011
7011
  i && t.trackWrites == n && (t.trackWrites = null);
7012
7012
  }
7013
- const Dt = function(n) {
7013
+ const It = function(n) {
7014
7014
  n && (this.nodeName = n);
7015
7015
  };
7016
- Dt.prototype = /* @__PURE__ */ Object.create(null);
7017
- const Xe = [new Dt()];
7016
+ It.prototype = /* @__PURE__ */ Object.create(null);
7017
+ const Xe = [new It()];
7018
7018
  function Or(n, e, t) {
7019
7019
  if (n.length == 0)
7020
7020
  return Xe;
7021
- let r = t ? Xe[0] : new Dt(), i = [r];
7021
+ let r = t ? Xe[0] : new It(), i = [r];
7022
7022
  for (let s = 0; s < n.length; s++) {
7023
7023
  let o = n[s].type.attrs;
7024
7024
  if (o) {
7025
- o.nodeName && i.push(r = new Dt(o.nodeName));
7025
+ o.nodeName && i.push(r = new It(o.nodeName));
7026
7026
  for (let l in o) {
7027
7027
  let a = o[l];
7028
- a != null && (t && i.length == 1 && i.push(r = new Dt(e.isInline ? "span" : "div")), l == "class" ? r.class = (r.class ? r.class + " " : "") + a : l == "style" ? r.style = (r.style ? r.style + ";" : "") + a : l != "nodeName" && (r[l] = a));
7028
+ a != null && (t && i.length == 1 && i.push(r = new It(e.isInline ? "span" : "div")), l == "class" ? r.class = (r.class ? r.class + " " : "") + a : l == "style" ? r.style = (r.style ? r.style + ";" : "") + a : l != "nodeName" && (r[l] = a));
7029
7029
  }
7030
7030
  }
7031
7031
  }
@@ -7041,11 +7041,11 @@ function go(n, e, t, r) {
7041
7041
  let a;
7042
7042
  l && l.nodeName == o.nodeName && i != n && (a = i.parentNode) && a.nodeName.toLowerCase() == o.nodeName || (a = document.createElement(o.nodeName), a.pmIsDeco = !0, a.appendChild(i), l = Xe[0]), i = a;
7043
7043
  }
7044
- _a(i, l || Xe[0], o);
7044
+ Ga(i, l || Xe[0], o);
7045
7045
  }
7046
7046
  return i;
7047
7047
  }
7048
- function _a(n, e, t) {
7048
+ function Ga(n, e, t) {
7049
7049
  for (let r in e)
7050
7050
  r != "class" && r != "style" && r != "nodeName" && !(r in t) && n.removeAttribute(r);
7051
7051
  for (let r in t)
@@ -7082,9 +7082,9 @@ function Li(n) {
7082
7082
  let e = n.nextSibling;
7083
7083
  return n.parentNode.removeChild(n), e;
7084
7084
  }
7085
- class Ga {
7085
+ class Xa {
7086
7086
  constructor(e, t, r) {
7087
- this.lock = t, this.view = r, this.index = 0, this.stack = [], this.changed = !1, this.top = e, this.preMatch = Xa(e.node.content, e);
7087
+ this.lock = t, this.view = r, this.index = 0, this.stack = [], this.changed = !1, this.top = e, this.preMatch = Ya(e.node.content, e);
7088
7088
  }
7089
7089
  // Destroy and remove the children between the given indices in
7090
7090
  // `this.top`.
@@ -7233,7 +7233,7 @@ class Ga {
7233
7233
  return this.lock && (e == this.lock || e.nodeType == 1 && e.contains(this.lock.parentNode));
7234
7234
  }
7235
7235
  }
7236
- function Xa(n, e) {
7236
+ function Ya(n, e) {
7237
7237
  let t = e, r = t.children.length, i = n.childCount, s = /* @__PURE__ */ new Map(), o = [];
7238
7238
  e: for (; i > 0; ) {
7239
7239
  let l;
@@ -7260,10 +7260,10 @@ function Xa(n, e) {
7260
7260
  }
7261
7261
  return { index: i, matched: s, matches: o.reverse() };
7262
7262
  }
7263
- function Ya(n, e) {
7263
+ function Za(n, e) {
7264
7264
  return n.type.side - e.type.side;
7265
7265
  }
7266
- function Za(n, e, t, r) {
7266
+ function Qa(n, e, t, r) {
7267
7267
  let i = e.locals(n), s = 0;
7268
7268
  if (i.length == 0) {
7269
7269
  for (let c = 0; c < n.childCount; c++) {
@@ -7281,7 +7281,7 @@ function Za(n, e, t, r) {
7281
7281
  }
7282
7282
  if (d)
7283
7283
  if (u) {
7284
- u.sort(Ya);
7284
+ u.sort(Za);
7285
7285
  for (let g = 0; g < u.length; g++)
7286
7286
  t(u[g], c, !!a);
7287
7287
  } else
@@ -7311,13 +7311,13 @@ function Za(n, e, t, r) {
7311
7311
  r(f, m, e.forChild(s, f), h), s = p;
7312
7312
  }
7313
7313
  }
7314
- function Qa(n) {
7314
+ function ec(n) {
7315
7315
  if (n.nodeName == "UL" || n.nodeName == "OL") {
7316
7316
  let e = n.style.cssText;
7317
7317
  n.style.cssText = e + "; list-style: square !important", window.getComputedStyle(n).listStyle, n.style.cssText = e;
7318
7318
  }
7319
7319
  }
7320
- function ec(n, e, t, r) {
7320
+ function tc(n, e, t, r) {
7321
7321
  for (let i = 0, s = 0; i < n.childCount && s <= r; ) {
7322
7322
  let o = n.child(i++), l = s;
7323
7323
  if (s += o.nodeSize, !o.isText)
@@ -7361,7 +7361,7 @@ function Wr(n, e = null) {
7361
7361
  for (a = o; i && !i.node; )
7362
7362
  i = i.parent;
7363
7363
  let u = i.node;
7364
- if (i && u.isAtom && S.isSelectable(u) && i.parent && !(u.isInline && va(t.focusNode, t.focusOffset, i.dom))) {
7364
+ if (i && u.isAtom && S.isSelectable(u) && i.parent && !(u.isInline && Ea(t.focusNode, t.focusOffset, i.dom))) {
7365
7365
  let f = i.posBefore;
7366
7366
  c = new S(o == f ? l : r.resolve(f));
7367
7367
  }
@@ -7401,10 +7401,10 @@ function Ne(n, e = !1) {
7401
7401
  }
7402
7402
  }
7403
7403
  if (n.domObserver.disconnectSelection(), n.cursorWrapper)
7404
- nc(n);
7404
+ rc(n);
7405
7405
  else {
7406
7406
  let { anchor: r, head: i } = t, s, o;
7407
- zi && !(t instanceof M) && (t.$from.parent.inlineContent || (s = Fi(n, t.from)), !t.empty && !t.$from.parent.inlineContent && (o = Fi(n, t.to))), n.docView.setSelection(r, i, n, e), zi && (s && $i(s), o && $i(o)), t.visible ? n.dom.classList.remove("ProseMirror-hideselection") : (n.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && tc(n));
7407
+ zi && !(t instanceof M) && (t.$from.parent.inlineContent || (s = Fi(n, t.from)), !t.empty && !t.$from.parent.inlineContent && (o = Fi(n, t.to))), n.docView.setSelection(r, i, n, e), zi && (s && $i(s), o && $i(o)), t.visible ? n.dom.classList.remove("ProseMirror-hideselection") : (n.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && nc(n));
7408
7408
  }
7409
7409
  n.domObserver.setCurSelection(), n.domObserver.connectSelection();
7410
7410
  }
@@ -7427,7 +7427,7 @@ function nr(n) {
7427
7427
  function $i(n) {
7428
7428
  n.contentEditable = "false", n.wasDraggable && (n.draggable = !0, n.wasDraggable = null);
7429
7429
  }
7430
- function tc(n) {
7430
+ function nc(n) {
7431
7431
  let e = n.dom.ownerDocument;
7432
7432
  e.removeEventListener("selectionchange", n.input.hideSelectionGuard);
7433
7433
  let t = n.domSelectionRange(), r = t.anchorNode, i = t.anchorOffset;
@@ -7437,7 +7437,7 @@ function tc(n) {
7437
7437
  }, 20));
7438
7438
  });
7439
7439
  }
7440
- function nc(n) {
7440
+ function rc(n) {
7441
7441
  let e = n.domSelection();
7442
7442
  if (!e)
7443
7443
  return;
@@ -7470,7 +7470,7 @@ function xo(n) {
7470
7470
  return !1;
7471
7471
  }
7472
7472
  }
7473
- function rc(n) {
7473
+ function ic(n) {
7474
7474
  let e = n.docView.domFromPos(n.state.selection.anchor, 0), t = n.domSelectionRange();
7475
7475
  return ot(e.node, e.offset, t.anchorNode, t.anchorOffset);
7476
7476
  }
@@ -7514,25 +7514,25 @@ function Wi(n, e, t) {
7514
7514
  function Sn(n) {
7515
7515
  return n.nodeType == 3 ? n.nodeValue.length : n.childNodes.length;
7516
7516
  }
7517
- function It(n, e) {
7517
+ function Rt(n, e) {
7518
7518
  let t = n.pmViewDesc;
7519
7519
  return t && t.size == 0 && (e < 0 || n.nextSibling || n.nodeName != "BR");
7520
7520
  }
7521
7521
  function ft(n, e) {
7522
- return e < 0 ? ic(n) : sc(n);
7522
+ return e < 0 ? sc(n) : oc(n);
7523
7523
  }
7524
- function ic(n) {
7524
+ function sc(n) {
7525
7525
  let e = n.domSelectionRange(), t = e.focusNode, r = e.focusOffset;
7526
7526
  if (!t)
7527
7527
  return;
7528
7528
  let i, s, o = !1;
7529
- for (pe && t.nodeType == 1 && r < Sn(t) && It(t.childNodes[r], -1) && (o = !0); ; )
7529
+ for (pe && t.nodeType == 1 && r < Sn(t) && Rt(t.childNodes[r], -1) && (o = !0); ; )
7530
7530
  if (r > 0) {
7531
7531
  if (t.nodeType != 1)
7532
7532
  break;
7533
7533
  {
7534
7534
  let l = t.childNodes[r - 1];
7535
- if (It(l, -1))
7535
+ if (Rt(l, -1))
7536
7536
  i = t, s = --r;
7537
7537
  else if (l.nodeType == 3)
7538
7538
  t = l, r = t.nodeValue.length;
@@ -7544,7 +7544,7 @@ function ic(n) {
7544
7544
  break;
7545
7545
  {
7546
7546
  let l = t.previousSibling;
7547
- for (; l && It(l, -1); )
7547
+ for (; l && Rt(l, -1); )
7548
7548
  i = t.parentNode, s = J(l), l = l.previousSibling;
7549
7549
  if (l)
7550
7550
  t = l, r = Sn(t);
@@ -7557,7 +7557,7 @@ function ic(n) {
7557
7557
  }
7558
7558
  o ? Nr(n, t, r) : i && Nr(n, i, s);
7559
7559
  }
7560
- function sc(n) {
7560
+ function oc(n) {
7561
7561
  let e = n.domSelectionRange(), t = e.focusNode, r = e.focusOffset;
7562
7562
  if (!t)
7563
7563
  return;
@@ -7567,7 +7567,7 @@ function sc(n) {
7567
7567
  if (t.nodeType != 1)
7568
7568
  break;
7569
7569
  let l = t.childNodes[r];
7570
- if (It(l, 1))
7570
+ if (Rt(l, 1))
7571
7571
  s = t, o = ++r;
7572
7572
  else
7573
7573
  break;
@@ -7576,7 +7576,7 @@ function sc(n) {
7576
7576
  break;
7577
7577
  {
7578
7578
  let l = t.nextSibling;
7579
- for (; l && It(l, 1); )
7579
+ for (; l && Rt(l, 1); )
7580
7580
  s = l.parentNode, o = J(l) + 1, l = l.nextSibling;
7581
7581
  if (l)
7582
7582
  t = l, r = 0, i = Sn(t);
@@ -7593,7 +7593,7 @@ function So(n) {
7593
7593
  let e = n.pmViewDesc;
7594
7594
  return e && e.node && e.node.isBlock;
7595
7595
  }
7596
- function oc(n, e) {
7596
+ function lc(n, e) {
7597
7597
  for (; n && e == n.childNodes.length && !Yt(n); )
7598
7598
  e = J(n) + 1, n = n.parentNode;
7599
7599
  for (; n && e < n.childNodes.length; ) {
@@ -7605,7 +7605,7 @@ function oc(n, e) {
7605
7605
  n = t, e = 0;
7606
7606
  }
7607
7607
  }
7608
- function lc(n, e) {
7608
+ function ac(n, e) {
7609
7609
  for (; n && !e && !Yt(n); )
7610
7610
  e = J(n), n = n.parentNode;
7611
7611
  for (; n && e; ) {
@@ -7620,7 +7620,7 @@ function lc(n, e) {
7620
7620
  function Nr(n, e, t) {
7621
7621
  if (e.nodeType != 3) {
7622
7622
  let s, o;
7623
- (o = oc(e, t)) ? (e = o, t = 0) : (s = lc(e, t)) && (e = s, t = s.nodeValue.length);
7623
+ (o = lc(e, t)) ? (e = o, t = 0) : (s = ac(e, t)) && (e = s, t = s.nodeValue.length);
7624
7624
  }
7625
7625
  let r = n.domSelection();
7626
7626
  if (!r)
@@ -7688,7 +7688,7 @@ function Ki(n, e) {
7688
7688
  function Ji(n, e, t) {
7689
7689
  n.domObserver.stop(), e.contentEditable = t, n.domObserver.start();
7690
7690
  }
7691
- function ac(n) {
7691
+ function cc(n) {
7692
7692
  if (!Z || n.state.selection.$head.parentOffset > 0)
7693
7693
  return !1;
7694
7694
  let { focusNode: e, focusOffset: t } = n.domSelectionRange();
@@ -7698,12 +7698,12 @@ function ac(n) {
7698
7698
  }
7699
7699
  return !1;
7700
7700
  }
7701
- function cc(n) {
7701
+ function dc(n) {
7702
7702
  let e = "";
7703
7703
  return n.ctrlKey && (e += "c"), n.metaKey && (e += "m"), n.altKey && (e += "a"), n.shiftKey && (e += "s"), e;
7704
7704
  }
7705
- function dc(n, e) {
7706
- let t = e.keyCode, r = cc(e);
7705
+ function uc(n, e) {
7706
+ let t = e.keyCode, r = dc(e);
7707
7707
  if (t == 8 || ue && t == 72 && r == "c")
7708
7708
  return Ki(n, -1) || ft(n, -1);
7709
7709
  if (t == 46 && !e.shiftKey || ue && t == 68 && r == "c")
@@ -7720,7 +7720,7 @@ function dc(n, e) {
7720
7720
  if (t == 38 || ue && t == 80 && r == "c")
7721
7721
  return ji(n, -1, r) || ft(n, -1);
7722
7722
  if (t == 40 || ue && t == 78 && r == "c")
7723
- return ac(n) || ji(n, 1, r) || ft(n, 1);
7723
+ return cc(n) || ji(n, 1, r) || ft(n, 1);
7724
7724
  if (r == (ue ? "m" : "c") && (t == 66 || t == 73 || t == 89 || t == 90))
7725
7725
  return !0;
7726
7726
  }
@@ -7780,7 +7780,7 @@ function Mo(n, e, t, r, i) {
7780
7780
  } else
7781
7781
  n.someProp("transformPastedHTML", (u) => {
7782
7782
  t = u(t, n);
7783
- }), o = pc(t), Zt && mc(o);
7783
+ }), o = mc(t), Zt && gc(o);
7784
7784
  let c = o && o.querySelector("[data-pm-slice]"), d = c && /^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice") || "");
7785
7785
  if (d && d[3])
7786
7786
  for (let u = +d[3]; u > 0; u--) {
@@ -7795,11 +7795,11 @@ function Mo(n, e, t, r, i) {
7795
7795
  preserveWhitespace: !!(a || d),
7796
7796
  context: i,
7797
7797
  ruleFromNode(f) {
7798
- return f.nodeName == "BR" && !f.nextSibling && f.parentNode && !uc.test(f.parentNode.nodeName) ? { ignore: !0 } : null;
7798
+ return f.nodeName == "BR" && !f.nextSibling && f.parentNode && !fc.test(f.parentNode.nodeName) ? { ignore: !0 } : null;
7799
7799
  }
7800
7800
  })), d)
7801
- l = gc(Ui(l, +d[1], +d[2]), d[4]);
7802
- else if (l = k.maxOpen(fc(l.content, i), !0), l.openStart || l.openEnd) {
7801
+ l = yc(Ui(l, +d[1], +d[2]), d[4]);
7802
+ else if (l = k.maxOpen(hc(l.content, i), !0), l.openStart || l.openEnd) {
7803
7803
  let u = 0, f = 0;
7804
7804
  for (let h = l.content.firstChild; u < l.openStart && !h.type.spec.isolating; u++, h = h.firstChild)
7805
7805
  ;
@@ -7811,8 +7811,8 @@ function Mo(n, e, t, r, i) {
7811
7811
  l = u(l, n, a);
7812
7812
  }), l;
7813
7813
  }
7814
- const uc = /^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;
7815
- function fc(n, e) {
7814
+ const fc = /^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;
7815
+ function hc(n, e) {
7816
7816
  if (n.childCount < 2)
7817
7817
  return n;
7818
7818
  for (let t = e.depth; t >= 0; t--) {
@@ -7878,27 +7878,27 @@ function vo() {
7878
7878
  return _i || (_i = document.implementation.createHTMLDocument("title"));
7879
7879
  }
7880
7880
  let rr = null;
7881
- function hc(n) {
7881
+ function pc(n) {
7882
7882
  let e = window.trustedTypes;
7883
7883
  return e ? (rr || (rr = e.defaultPolicy || e.createPolicy("ProseMirrorClipboard", { createHTML: (t) => t })), rr.createHTML(n)) : n;
7884
7884
  }
7885
- function pc(n) {
7885
+ function mc(n) {
7886
7886
  let e = /^(\s*<meta [^>]*>)*/.exec(n);
7887
7887
  e && (n = n.slice(e[0].length));
7888
7888
  let t = vo().createElement("div"), r = /<([a-z][^>\s]+)/i.exec(n), i;
7889
- if ((i = r && Oo[r[1].toLowerCase()]) && (n = i.map((s) => "<" + s + ">").join("") + n + i.map((s) => "</" + s + ">").reverse().join("")), t.innerHTML = hc(n), i)
7889
+ if ((i = r && Oo[r[1].toLowerCase()]) && (n = i.map((s) => "<" + s + ">").join("") + n + i.map((s) => "</" + s + ">").reverse().join("")), t.innerHTML = pc(n), i)
7890
7890
  for (let s = 0; s < i.length; s++)
7891
7891
  t = t.querySelector(i[s]) || t;
7892
7892
  return t;
7893
7893
  }
7894
- function mc(n) {
7894
+ function gc(n) {
7895
7895
  let e = n.querySelectorAll(_ ? "span:not([class]):not([style])" : "span.Apple-converted-space");
7896
7896
  for (let t = 0; t < e.length; t++) {
7897
7897
  let r = e[t];
7898
7898
  r.childNodes.length == 1 && r.textContent == " " && r.parentNode && r.parentNode.replaceChild(n.ownerDocument.createTextNode(" "), r);
7899
7899
  }
7900
7900
  }
7901
- function gc(n, e) {
7901
+ function yc(n, e) {
7902
7902
  if (!n.size)
7903
7903
  return n;
7904
7904
  let t = n.content.firstChild.type.schema, r;
@@ -7916,25 +7916,25 @@ function gc(n, e) {
7916
7916
  }
7917
7917
  return new k(i, s, o);
7918
7918
  }
7919
- const ee = {}, te = {}, yc = { touchstart: !0, touchmove: !0 };
7920
- class bc {
7919
+ const ee = {}, te = {}, bc = { touchstart: !0, touchmove: !0 };
7920
+ class kc {
7921
7921
  constructor() {
7922
7922
  this.shiftKey = !1, this.mouseDown = null, this.lastKeyCode = null, this.lastKeyCodeTime = 0, this.lastClick = { time: 0, x: 0, y: 0, type: "", button: 0 }, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastIOSEnter = 0, this.lastIOSEnterFallbackTimeout = -1, this.lastFocus = 0, this.lastTouch = 0, this.lastChromeDelete = 0, this.composing = !1, this.compositionNode = null, this.composingTimeout = -1, this.compositionNodes = [], this.compositionEndedAt = -2e8, this.compositionID = 1, this.badSafariComposition = !1, this.compositionPendingChanges = 0, this.domChangeCount = 0, this.eventHandlers = /* @__PURE__ */ Object.create(null), this.hideSelectionGuard = null;
7923
7923
  }
7924
7924
  }
7925
- function kc(n) {
7925
+ function xc(n) {
7926
7926
  for (let e in ee) {
7927
7927
  let t = ee[e];
7928
7928
  n.dom.addEventListener(e, n.input.eventHandlers[e] = (r) => {
7929
- Sc(n, r) && !Kr(n, r) && (n.editable || !(r.type in te)) && t(n, r);
7930
- }, yc[e] ? { passive: !0 } : void 0);
7929
+ Mc(n, r) && !Kr(n, r) && (n.editable || !(r.type in te)) && t(n, r);
7930
+ }, bc[e] ? { passive: !0 } : void 0);
7931
7931
  }
7932
7932
  Z && n.dom.addEventListener("input", () => null), Dr(n);
7933
7933
  }
7934
7934
  function ze(n, e) {
7935
7935
  n.input.lastSelectionOrigin = e, n.input.lastSelectionTime = Date.now();
7936
7936
  }
7937
- function xc(n) {
7937
+ function Sc(n) {
7938
7938
  n.domObserver.stop();
7939
7939
  for (let e in n.input.eventHandlers)
7940
7940
  n.dom.removeEventListener(e, n.input.eventHandlers[e]);
@@ -7952,7 +7952,7 @@ function Kr(n, e) {
7952
7952
  return r ? r(n, e) || e.defaultPrevented : !1;
7953
7953
  });
7954
7954
  }
7955
- function Sc(n, e) {
7955
+ function Mc(n, e) {
7956
7956
  if (!e.bubbles)
7957
7957
  return !0;
7958
7958
  if (e.defaultPrevented)
@@ -7962,18 +7962,18 @@ function Sc(n, e) {
7962
7962
  return !1;
7963
7963
  return !0;
7964
7964
  }
7965
- function Mc(n, e) {
7965
+ function wc(n, e) {
7966
7966
  !Kr(n, e) && ee[e.type] && (n.editable || !(e.type in te)) && ee[e.type](n, e);
7967
7967
  }
7968
7968
  te.keydown = (n, e) => {
7969
7969
  let t = e;
7970
7970
  if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !No(n, t) && (n.input.lastKeyCode = t.keyCode, n.input.lastKeyCodeTime = Date.now(), !(ve && _ && t.keyCode == 13)))
7971
- if (t.keyCode != 229 && n.domObserver.forceFlush(), St && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
7971
+ if (t.keyCode != 229 && n.domObserver.forceFlush(), Mt && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
7972
7972
  let r = Date.now();
7973
7973
  n.input.lastIOSEnter = r, n.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
7974
7974
  n.input.lastIOSEnter == r && (n.someProp("handleKeyDown", (i) => i(n, Ue(13, "Enter"))), n.input.lastIOSEnter = 0);
7975
7975
  }, 200);
7976
- } else n.someProp("handleKeyDown", (r) => r(n, t)) || dc(n, t) ? t.preventDefault() : ze(n, "key");
7976
+ } else n.someProp("handleKeyDown", (r) => r(n, t)) || uc(n, t) ? t.preventDefault() : ze(n, "key");
7977
7977
  };
7978
7978
  te.keyup = (n, e) => {
7979
7979
  e.keyCode == 16 && (n.input.shiftKey = !1);
@@ -7995,7 +7995,7 @@ te.keypress = (n, e) => {
7995
7995
  function $n(n) {
7996
7996
  return { left: n.clientX, top: n.clientY };
7997
7997
  }
7998
- function wc(n, e) {
7998
+ function Cc(n, e) {
7999
7999
  let t = e.x - n.clientX, r = e.y - n.clientY;
8000
8000
  return t * t + r * r < 100;
8001
8001
  }
@@ -8008,19 +8008,19 @@ function Jr(n, e, t, r, i) {
8008
8008
  return !0;
8009
8009
  return !1;
8010
8010
  }
8011
- function bt(n, e, t) {
8011
+ function kt(n, e, t) {
8012
8012
  if (n.focused || n.focus(), n.state.selection.eq(e))
8013
8013
  return;
8014
8014
  let r = n.state.tr.setSelection(e);
8015
8015
  r.setMeta("pointer", !0), n.dispatch(r);
8016
8016
  }
8017
- function Cc(n, e) {
8017
+ function Tc(n, e) {
8018
8018
  if (e == -1)
8019
8019
  return !1;
8020
8020
  let t = n.state.doc.resolve(e), r = t.nodeAfter;
8021
- return r && r.isAtom && S.isSelectable(r) ? (bt(n, new S(t)), !0) : !1;
8021
+ return r && r.isAtom && S.isSelectable(r) ? (kt(n, new S(t)), !0) : !1;
8022
8022
  }
8023
- function Tc(n, e) {
8023
+ function Oc(n, e) {
8024
8024
  if (e == -1)
8025
8025
  return !1;
8026
8026
  let t = n.state.selection, r, i;
@@ -8033,30 +8033,30 @@ function Tc(n, e) {
8033
8033
  break;
8034
8034
  }
8035
8035
  }
8036
- return i != null ? (bt(n, S.create(n.state.doc, i)), !0) : !1;
8036
+ return i != null ? (kt(n, S.create(n.state.doc, i)), !0) : !1;
8037
8037
  }
8038
- function Oc(n, e, t, r, i) {
8039
- return Jr(n, "handleClickOn", e, t, r) || n.someProp("handleClick", (s) => s(n, e, r)) || (i ? Tc(n, t) : Cc(n, t));
8038
+ function vc(n, e, t, r, i) {
8039
+ return Jr(n, "handleClickOn", e, t, r) || n.someProp("handleClick", (s) => s(n, e, r)) || (i ? Oc(n, t) : Tc(n, t));
8040
8040
  }
8041
- function vc(n, e, t, r) {
8041
+ function Ec(n, e, t, r) {
8042
8042
  return Jr(n, "handleDoubleClickOn", e, t, r) || n.someProp("handleDoubleClick", (i) => i(n, e, r));
8043
8043
  }
8044
- function Ec(n, e, t, r) {
8045
- return Jr(n, "handleTripleClickOn", e, t, r) || n.someProp("handleTripleClick", (i) => i(n, e, r)) || Nc(n, t, r);
8044
+ function Nc(n, e, t, r) {
8045
+ return Jr(n, "handleTripleClickOn", e, t, r) || n.someProp("handleTripleClick", (i) => i(n, e, r)) || Ac(n, t, r);
8046
8046
  }
8047
- function Nc(n, e, t) {
8047
+ function Ac(n, e, t) {
8048
8048
  if (t.button != 0)
8049
8049
  return !1;
8050
8050
  let r = n.state.doc;
8051
8051
  if (e == -1)
8052
- return r.inlineContent ? (bt(n, M.create(r, 0, r.content.size)), !0) : !1;
8052
+ return r.inlineContent ? (kt(n, M.create(r, 0, r.content.size)), !0) : !1;
8053
8053
  let i = r.resolve(e);
8054
8054
  for (let s = i.depth + 1; s > 0; s--) {
8055
8055
  let o = s > i.depth ? i.nodeAfter : i.node(s), l = i.before(s);
8056
8056
  if (o.inlineContent)
8057
- bt(n, M.create(r, l + 1, l + 1 + o.content.size));
8057
+ kt(n, M.create(r, l + 1, l + 1 + o.content.size));
8058
8058
  else if (S.isSelectable(o))
8059
- bt(n, S.create(r, l));
8059
+ kt(n, S.create(r, l));
8060
8060
  else
8061
8061
  continue;
8062
8062
  return !0;
@@ -8070,11 +8070,11 @@ ee.mousedown = (n, e) => {
8070
8070
  let t = e;
8071
8071
  n.input.shiftKey = t.shiftKey;
8072
8072
  let r = Ur(n), i = Date.now(), s = "singleClick";
8073
- i - n.input.lastClick.time < 500 && wc(t, n.input.lastClick) && !t[Eo] && n.input.lastClick.button == t.button && (n.input.lastClick.type == "singleClick" ? s = "doubleClick" : n.input.lastClick.type == "doubleClick" && (s = "tripleClick")), n.input.lastClick = { time: i, x: t.clientX, y: t.clientY, type: s, button: t.button };
8073
+ i - n.input.lastClick.time < 500 && Cc(t, n.input.lastClick) && !t[Eo] && n.input.lastClick.button == t.button && (n.input.lastClick.type == "singleClick" ? s = "doubleClick" : n.input.lastClick.type == "doubleClick" && (s = "tripleClick")), n.input.lastClick = { time: i, x: t.clientX, y: t.clientY, type: s, button: t.button };
8074
8074
  let o = n.posAtCoords($n(t));
8075
- o && (s == "singleClick" ? (n.input.mouseDown && n.input.mouseDown.done(), n.input.mouseDown = new Ac(n, o, t, !!r)) : (s == "doubleClick" ? vc : Ec)(n, o.pos, o.inside, t) ? t.preventDefault() : ze(n, "pointer"));
8075
+ o && (s == "singleClick" ? (n.input.mouseDown && n.input.mouseDown.done(), n.input.mouseDown = new Dc(n, o, t, !!r)) : (s == "doubleClick" ? Ec : Nc)(n, o.pos, o.inside, t) ? t.preventDefault() : ze(n, "pointer"));
8076
8076
  };
8077
- class Ac {
8077
+ class Dc {
8078
8078
  constructor(e, t, r, i) {
8079
8079
  this.view = e, this.pos = t, this.event = r, this.flushed = i, this.delayedSelectionSync = !1, this.mightDrag = null, this.startDoc = e.state.doc, this.selectNode = !!r[Eo], this.allowDefault = r.shiftKey;
8080
8080
  let s, o;
@@ -8103,7 +8103,7 @@ class Ac {
8103
8103
  if (this.done(), !this.view.dom.contains(e.target))
8104
8104
  return;
8105
8105
  let t = this.pos;
8106
- this.view.state.doc != this.startDoc && (t = this.view.posAtCoords($n(e))), this.updateAllowDefault(e), this.allowDefault || !t ? ze(this.view, "pointer") : Oc(this.view, t.pos, t.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
8106
+ this.view.state.doc != this.startDoc && (t = this.view.posAtCoords($n(e))), this.updateAllowDefault(e), this.allowDefault || !t ? ze(this.view, "pointer") : vc(this.view, t.pos, t.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
8107
8107
  Z && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
8108
8108
  // cursor, but still report that the node is selected
8109
8109
  // when asked through getSelection. You'll then get a
@@ -8111,7 +8111,7 @@ class Ac {
8111
8111
  // (hidden) cursor is doesn't change the selection, and
8112
8112
  // thus doesn't get a reaction from ProseMirror. This
8113
8113
  // works around that.
8114
- _ && !this.view.state.selection.visible && Math.min(Math.abs(t.pos - this.view.state.selection.from), Math.abs(t.pos - this.view.state.selection.to)) <= 2) ? (bt(this.view, v.near(this.view.state.doc.resolve(t.pos))), e.preventDefault()) : ze(this.view, "pointer");
8114
+ _ && !this.view.state.selection.visible && Math.min(Math.abs(t.pos - this.view.state.selection.from), Math.abs(t.pos - this.view.state.selection.to)) <= 2) ? (kt(this.view, v.near(this.view.state.doc.resolve(t.pos))), e.preventDefault()) : ze(this.view, "pointer");
8115
8115
  }
8116
8116
  move(e) {
8117
8117
  this.updateAllowDefault(e), ze(this.view, "pointer"), e.buttons == 0 && this.done();
@@ -8130,12 +8130,12 @@ ee.contextmenu = (n) => Ur(n);
8130
8130
  function No(n, e) {
8131
8131
  return n.composing ? !0 : Z && Math.abs(e.timeStamp - n.input.compositionEndedAt) < 500 ? (n.input.compositionEndedAt = -2e8, !0) : !1;
8132
8132
  }
8133
- const Dc = ve ? 5e3 : -1;
8133
+ const Ic = ve ? 5e3 : -1;
8134
8134
  te.compositionstart = te.compositionupdate = (n) => {
8135
8135
  if (!n.composing) {
8136
8136
  n.domObserver.flush();
8137
8137
  let { state: e } = n, t = e.selection.$to;
8138
- if (e.selection instanceof M && (e.storedMarks || !t.textOffset && t.parentOffset && t.nodeBefore.marks.some((r) => r.type.spec.inclusive === !1) || _ && so && Ic(n)))
8138
+ if (e.selection instanceof M && (e.storedMarks || !t.textOffset && t.parentOffset && t.nodeBefore.marks.some((r) => r.type.spec.inclusive === !1) || _ && so && Rc(n)))
8139
8139
  n.markCursor = n.state.storedMarks || t.marks(), Mn(n, !0), n.markCursor = null;
8140
8140
  else if (Mn(n, !e.selection.empty), pe && e.selection.empty && t.parentOffset && !t.textOffset && t.nodeBefore.marks.length) {
8141
8141
  let r = n.domSelectionRange();
@@ -8153,9 +8153,9 @@ te.compositionstart = te.compositionupdate = (n) => {
8153
8153
  }
8154
8154
  n.input.composing = !0;
8155
8155
  }
8156
- Ao(n, Dc);
8156
+ Ao(n, Ic);
8157
8157
  };
8158
- function Ic(n) {
8158
+ function Rc(n) {
8159
8159
  let { focusNode: e, focusOffset: t } = n.domSelectionRange();
8160
8160
  if (!e || e.nodeType != 1 || t >= e.childNodes.length)
8161
8161
  return !1;
@@ -8169,14 +8169,14 @@ function Ao(n, e) {
8169
8169
  clearTimeout(n.input.composingTimeout), e > -1 && (n.input.composingTimeout = setTimeout(() => Mn(n), e));
8170
8170
  }
8171
8171
  function Do(n) {
8172
- for (n.composing && (n.input.composing = !1, n.input.compositionEndedAt = Pc()); n.input.compositionNodes.length > 0; )
8172
+ for (n.composing && (n.input.composing = !1, n.input.compositionEndedAt = Bc()); n.input.compositionNodes.length > 0; )
8173
8173
  n.input.compositionNodes.pop().markParentsDirty();
8174
8174
  }
8175
- function Rc(n) {
8175
+ function Pc(n) {
8176
8176
  let e = n.domSelectionRange();
8177
8177
  if (!e.focusNode)
8178
8178
  return null;
8179
- let t = Ta(e.focusNode, e.focusOffset), r = Oa(e.focusNode, e.focusOffset);
8179
+ let t = Oa(e.focusNode, e.focusOffset), r = va(e.focusNode, e.focusOffset);
8180
8180
  if (t && r && t != r) {
8181
8181
  let i = r.pmViewDesc, s = n.domObserver.lastChangedTextNode;
8182
8182
  if (t == s || r == s)
@@ -8191,7 +8191,7 @@ function Rc(n) {
8191
8191
  }
8192
8192
  return t || r;
8193
8193
  }
8194
- function Pc() {
8194
+ function Bc() {
8195
8195
  let n = document.createEvent("Event");
8196
8196
  return n.initEvent("event", !0, !0), n.timeStamp;
8197
8197
  }
@@ -8204,7 +8204,7 @@ function Mn(n, e = !1) {
8204
8204
  return !1;
8205
8205
  }
8206
8206
  }
8207
- function Bc(n, e) {
8207
+ function Lc(n, e) {
8208
8208
  if (!n.dom.parentNode)
8209
8209
  return;
8210
8210
  let t = n.dom.parentNode.appendChild(document.createElement("div"));
@@ -8214,18 +8214,18 @@ function Bc(n, e) {
8214
8214
  t.parentNode && t.parentNode.removeChild(t), n.focus();
8215
8215
  }, 50);
8216
8216
  }
8217
- const Ft = ie && Ve < 15 || St && Aa < 604;
8217
+ const Ft = ie && Ve < 15 || Mt && Da < 604;
8218
8218
  ee.copy = te.cut = (n, e) => {
8219
8219
  let t = e, r = n.state.selection, i = t.type == "cut";
8220
8220
  if (r.empty)
8221
8221
  return;
8222
8222
  let s = Ft ? null : t.clipboardData, o = r.content(), { dom: l, text: a } = jr(n, o);
8223
- s ? (t.preventDefault(), s.clearData(), s.setData("text/html", l.innerHTML), s.setData("text/plain", a)) : Bc(n, l), i && n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
8223
+ s ? (t.preventDefault(), s.clearData(), s.setData("text/html", l.innerHTML), s.setData("text/plain", a)) : Lc(n, l), i && n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
8224
8224
  };
8225
- function Lc(n) {
8225
+ function zc(n) {
8226
8226
  return n.openStart == 0 && n.openEnd == 0 && n.content.childCount == 1 ? n.content.firstChild : null;
8227
8227
  }
8228
- function zc(n, e) {
8228
+ function Fc(n, e) {
8229
8229
  if (!n.dom.parentNode)
8230
8230
  return;
8231
8231
  let t = n.input.shiftKey || n.state.selection.$from.parent.type.spec.code, r = n.dom.parentNode.appendChild(document.createElement(t ? "textarea" : "div"));
@@ -8241,7 +8241,7 @@ function $t(n, e, t, r, i) {
8241
8241
  return !0;
8242
8242
  if (!s)
8243
8243
  return !1;
8244
- let o = Lc(s), l = o ? n.state.tr.replaceSelectionWith(o, r) : n.state.tr.replaceSelection(s);
8244
+ let o = zc(s), l = o ? n.state.tr.replaceSelectionWith(o, r) : n.state.tr.replaceSelection(s);
8245
8245
  return n.dispatch(l.scrollIntoView().setMeta("paste", !0).setMeta("uiEvent", "paste")), !0;
8246
8246
  }
8247
8247
  function Io(n) {
@@ -8256,19 +8256,19 @@ te.paste = (n, e) => {
8256
8256
  if (n.composing && !ve)
8257
8257
  return;
8258
8258
  let r = Ft ? null : t.clipboardData, i = n.input.shiftKey && n.input.lastKeyCode != 45;
8259
- r && $t(n, Io(r), r.getData("text/html"), i, t) ? t.preventDefault() : zc(n, t);
8259
+ r && $t(n, Io(r), r.getData("text/html"), i, t) ? t.preventDefault() : Fc(n, t);
8260
8260
  };
8261
8261
  class Ro {
8262
8262
  constructor(e, t, r) {
8263
8263
  this.slice = e, this.move = t, this.node = r;
8264
8264
  }
8265
8265
  }
8266
- const Fc = ue ? "altKey" : "ctrlKey";
8266
+ const $c = ue ? "altKey" : "ctrlKey";
8267
8267
  function Po(n, e) {
8268
8268
  let t;
8269
8269
  return n.someProp("dragCopies", (r) => {
8270
8270
  t = t || r(e);
8271
- }), t != null ? !t : !e[Fc];
8271
+ }), t != null ? !t : !e[$c];
8272
8272
  }
8273
8273
  ee.dragstart = (n, e) => {
8274
8274
  let t = e, r = n.input.mouseDown;
@@ -8295,12 +8295,12 @@ ee.dragend = (n) => {
8295
8295
  te.dragover = te.dragenter = (n, e) => e.preventDefault();
8296
8296
  te.drop = (n, e) => {
8297
8297
  try {
8298
- $c(n, e, n.dragging);
8298
+ Vc(n, e, n.dragging);
8299
8299
  } finally {
8300
8300
  n.dragging = null;
8301
8301
  }
8302
8302
  };
8303
- function $c(n, e, t) {
8303
+ function Vc(n, e, t) {
8304
8304
  if (!e.dataTransfer)
8305
8305
  return;
8306
8306
  let r = n.posAtCoords($n(e));
@@ -8556,7 +8556,7 @@ class z {
8556
8556
  let a = this.local[l].map(e, r, i);
8557
8557
  a && a.type.valid(t, a) ? (o || (o = [])).push(a) : s.onRemove && s.onRemove(this.local[l].spec);
8558
8558
  }
8559
- return this.children.length ? Vc(this.children, o || [], e, t, r, i, s) : o ? new z(o.sort(nt), pt) : Y;
8559
+ return this.children.length ? Hc(this.children, o || [], e, t, r, i, s) : o ? new z(o.sort(nt), pt) : Y;
8560
8560
  }
8561
8561
  /**
8562
8562
  Add the given array of decorations to the ones in the set,
@@ -8734,7 +8734,7 @@ class Pe {
8734
8734
  this.members[t].forEachSet(e);
8735
8735
  }
8736
8736
  }
8737
- function Vc(n, e, t, r, i, s, o) {
8737
+ function Hc(n, e, t, r, i, s, o) {
8738
8738
  let l = n.slice();
8739
8739
  for (let c = 0, d = s; c < t.maps.length; c++) {
8740
8740
  let u = 0;
@@ -8770,7 +8770,7 @@ function Vc(n, e, t, r, i, s, o) {
8770
8770
  a = !0;
8771
8771
  }
8772
8772
  if (a) {
8773
- let c = Hc(l, n, e, t, i, s, o), d = Cn(c, r, 0, o);
8773
+ let c = Wc(l, n, e, t, i, s, o), d = Cn(c, r, 0, o);
8774
8774
  e = d.local;
8775
8775
  for (let u = 0; u < l.length; u += 3)
8776
8776
  l[u + 1] < 0 && (l.splice(u, 3), u -= 3);
@@ -8793,7 +8793,7 @@ function Bo(n, e) {
8793
8793
  }
8794
8794
  return t;
8795
8795
  }
8796
- function Hc(n, e, t, r, i, s, o) {
8796
+ function Wc(n, e, t, r, i, s, o) {
8797
8797
  function l(a, c) {
8798
8798
  for (let d = 0; d < a.local.length; d++) {
8799
8799
  let u = a.local[d].map(r, i, c);
@@ -8868,15 +8868,15 @@ function ir(n) {
8868
8868
  r && r != Y && e.push(r);
8869
8869
  }), n.cursorWrapper && e.push(z.create(n.state.doc, [n.cursorWrapper.deco])), Pe.from(e);
8870
8870
  }
8871
- const Wc = {
8871
+ const qc = {
8872
8872
  childList: !0,
8873
8873
  characterData: !0,
8874
8874
  characterDataOldValue: !0,
8875
8875
  attributes: !0,
8876
8876
  attributeOldValue: !0,
8877
8877
  subtree: !0
8878
- }, qc = ie && Ve <= 11;
8879
- class jc {
8878
+ }, jc = ie && Ve <= 11;
8879
+ class Kc {
8880
8880
  constructor() {
8881
8881
  this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
8882
8882
  }
@@ -8890,13 +8890,13 @@ class jc {
8890
8890
  return e.anchorNode == this.anchorNode && e.anchorOffset == this.anchorOffset && e.focusNode == this.focusNode && e.focusOffset == this.focusOffset;
8891
8891
  }
8892
8892
  }
8893
- class Kc {
8893
+ class Jc {
8894
8894
  constructor(e, t) {
8895
- this.view = e, this.handleDOMChange = t, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new jc(), this.onCharData = null, this.suppressingSelectionUpdates = !1, this.lastChangedTextNode = null, this.observer = window.MutationObserver && new window.MutationObserver((r) => {
8895
+ this.view = e, this.handleDOMChange = t, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new Kc(), this.onCharData = null, this.suppressingSelectionUpdates = !1, this.lastChangedTextNode = null, this.observer = window.MutationObserver && new window.MutationObserver((r) => {
8896
8896
  for (let i = 0; i < r.length; i++)
8897
8897
  this.queue.push(r[i]);
8898
8898
  ie && Ve <= 11 && r.some((i) => i.type == "childList" && i.removedNodes.length || i.type == "characterData" && i.oldValue.length > i.target.nodeValue.length) ? this.flushSoon() : Z && e.composing && r.some((i) => i.type == "childList" && i.target.nodeName == "TR") ? (e.input.badSafariComposition = !0, this.flushSoon()) : this.flush();
8899
- }), qc && (this.onCharData = (r) => {
8899
+ }), jc && (this.onCharData = (r) => {
8900
8900
  this.queue.push({ target: r.target, type: "characterData", oldValue: r.prevValue }), this.flushSoon();
8901
8901
  }), this.onSelectionChange = this.onSelectionChange.bind(this);
8902
8902
  }
@@ -8909,7 +8909,7 @@ class Kc {
8909
8909
  this.flushingSoon > -1 && (window.clearTimeout(this.flushingSoon), this.flushingSoon = -1, this.flush());
8910
8910
  }
8911
8911
  start() {
8912
- this.observer && (this.observer.takeRecords(), this.observer.observe(this.view.dom, Wc)), this.onCharData && this.view.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.connectSelection();
8912
+ this.observer && (this.observer.takeRecords(), this.observer.observe(this.view.dom, qc)), this.onCharData && this.view.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.connectSelection();
8913
8913
  }
8914
8914
  stop() {
8915
8915
  if (this.observer) {
@@ -8951,9 +8951,9 @@ class Kc {
8951
8951
  if (!e.focusNode)
8952
8952
  return !0;
8953
8953
  let t = /* @__PURE__ */ new Set(), r;
8954
- for (let s = e.focusNode; s; s = xt(s))
8954
+ for (let s = e.focusNode; s; s = St(s))
8955
8955
  t.add(s);
8956
- for (let s = e.anchorNode; s; s = xt(s))
8956
+ for (let s = e.anchorNode; s; s = St(s))
8957
8957
  if (t.has(s)) {
8958
8958
  r = s;
8959
8959
  break;
@@ -9004,12 +9004,12 @@ class Kc {
9004
9004
  let { focusNode: u } = this.currentSelection;
9005
9005
  for (let f of d) {
9006
9006
  let h = f.parentNode;
9007
- h && h.nodeName == "LI" && (!u || _c(e, u) != h) && f.remove();
9007
+ h && h.nodeName == "LI" && (!u || Gc(e, u) != h) && f.remove();
9008
9008
  }
9009
9009
  }
9010
9010
  }
9011
9011
  let c = null;
9012
- s < 0 && i && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && zn(r) && (c = Wr(e)) && c.eq(v.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, Ne(e), this.currentSelection.set(r), e.scrollToSelection()) : (s > -1 || i) && (s > -1 && (e.docView.markDirty(s, o), Jc(e)), e.input.badSafariComposition && (e.input.badSafariComposition = !1, Gc(e, a)), this.handleDOMChange(s, o, l, a), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(r) || Ne(e), this.currentSelection.set(r));
9012
+ s < 0 && i && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && zn(r) && (c = Wr(e)) && c.eq(v.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, Ne(e), this.currentSelection.set(r), e.scrollToSelection()) : (s > -1 || i) && (s > -1 && (e.docView.markDirty(s, o), Uc(e)), e.input.badSafariComposition && (e.input.badSafariComposition = !1, Xc(e, a)), this.handleDOMChange(s, o, l, a), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(r) || Ne(e), this.currentSelection.set(r));
9013
9013
  }
9014
9014
  registerMutation(e, t) {
9015
9015
  if (t.indexOf(e.target) > -1)
@@ -9045,7 +9045,7 @@ class Kc {
9045
9045
  }
9046
9046
  }
9047
9047
  let Xi = /* @__PURE__ */ new WeakMap(), Yi = !1;
9048
- function Jc(n) {
9048
+ function Uc(n) {
9049
9049
  if (!Xi.has(n) && (Xi.set(n, null), ["normal", "nowrap", "pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace) !== -1)) {
9050
9050
  if (n.requiresGeckoHackNode = pe, Yi)
9051
9051
  return;
@@ -9056,7 +9056,7 @@ function Zi(n, e) {
9056
9056
  let t = e.startContainer, r = e.startOffset, i = e.endContainer, s = e.endOffset, o = n.domAtPos(n.state.selection.anchor);
9057
9057
  return ot(o.node, o.offset, i, s) && ([t, r, i, s] = [i, s, t, r]), { anchorNode: t, anchorOffset: r, focusNode: i, focusOffset: s };
9058
9058
  }
9059
- function Uc(n, e) {
9059
+ function _c(n, e) {
9060
9060
  if (e.getComposedRanges) {
9061
9061
  let i = e.getComposedRanges(n.root)[0];
9062
9062
  if (i)
@@ -9068,7 +9068,7 @@ function Uc(n, e) {
9068
9068
  }
9069
9069
  return n.dom.addEventListener("beforeinput", r, !0), document.execCommand("indent"), n.dom.removeEventListener("beforeinput", r, !0), t ? Zi(n, t) : null;
9070
9070
  }
9071
- function _c(n, e) {
9071
+ function Gc(n, e) {
9072
9072
  for (let t = e.parentNode; t && t != n.dom; t = t.parentNode) {
9073
9073
  let r = n.docView.nearestDesc(t, !0);
9074
9074
  if (r && r.node.isBlock)
@@ -9076,7 +9076,7 @@ function _c(n, e) {
9076
9076
  }
9077
9077
  return null;
9078
9078
  }
9079
- function Gc(n, e) {
9079
+ function Xc(n, e) {
9080
9080
  var t;
9081
9081
  let { focusNode: r, focusOffset: i } = n.domSelectionRange();
9082
9082
  for (let s of e)
@@ -9097,7 +9097,7 @@ function Gc(n, e) {
9097
9097
  s.parentNode.removeChild(s);
9098
9098
  }
9099
9099
  }
9100
- function Xc(n, e, t) {
9100
+ function Yc(n, e, t) {
9101
9101
  let { node: r, fromOffset: i, toOffset: s, from: o, to: l } = n.docView.parseRange(e, t), a = n.domSelectionRange(), c, d = a.anchorNode;
9102
9102
  if (d && n.dom.contains(d.nodeType == 1 ? d : d.parentNode) && (c = [{ node: d, offset: a.anchorOffset }], zn(a) || c.push({ node: a.focusNode, offset: a.focusOffset })), _ && n.input.lastKeyCode === 8)
9103
9103
  for (let g = s; g > i; g--) {
@@ -9117,7 +9117,7 @@ function Xc(n, e, t) {
9117
9117
  to: s,
9118
9118
  preserveWhitespace: h.parent.type.whitespace == "pre" ? "full" : !0,
9119
9119
  findPositions: c,
9120
- ruleFromNode: Yc,
9120
+ ruleFromNode: Zc,
9121
9121
  context: h
9122
9122
  });
9123
9123
  if (c && c[0].pos != null) {
@@ -9126,7 +9126,7 @@ function Xc(n, e, t) {
9126
9126
  }
9127
9127
  return { doc: m, sel: p, from: o, to: l };
9128
9128
  }
9129
- function Yc(n) {
9129
+ function Zc(n) {
9130
9130
  let e = n.pmViewDesc;
9131
9131
  if (e)
9132
9132
  return e.parseRule();
@@ -9140,8 +9140,8 @@ function Yc(n) {
9140
9140
  return { ignore: !0 };
9141
9141
  return null;
9142
9142
  }
9143
- const Zc = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;
9144
- function Qc(n, e, t, r, i) {
9143
+ const Qc = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;
9144
+ function ed(n, e, t, r, i) {
9145
9145
  let s = n.input.compositionPendingChanges || (n.composing ? n.input.compositionID : 0);
9146
9146
  if (n.input.compositionPendingChanges = 0, e < 0) {
9147
9147
  let C = n.input.lastSelectionTime > Date.now() - 50 ? n.input.lastSelectionOrigin : null, N = Wr(n, C);
@@ -9155,10 +9155,10 @@ function Qc(n, e, t, r, i) {
9155
9155
  }
9156
9156
  let o = n.state.doc.resolve(e), l = o.sharedDepth(t);
9157
9157
  e = o.before(l + 1), t = n.state.doc.resolve(t).after(l + 1);
9158
- let a = n.state.selection, c = Xc(n, e, t), d = n.state.doc, u = d.slice(c.from, c.to), f, h;
9158
+ let a = n.state.selection, c = Yc(n, e, t), d = n.state.doc, u = d.slice(c.from, c.to), f, h;
9159
9159
  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;
9160
- let p = nd(u.content, c.doc.content, c.from, f, h);
9161
- if (p && n.input.domChangeCount++, (St && n.input.lastIOSEnter > Date.now() - 225 || ve) && i.some((C) => C.nodeType == 1 && !Zc.test(C.nodeName)) && (!p || p.endA >= p.endB) && n.someProp("handleKeyDown", (C) => C(n, Ue(13, "Enter")))) {
9160
+ let p = rd(u.content, c.doc.content, c.from, f, h);
9161
+ if (p && n.input.domChangeCount++, (Mt && n.input.lastIOSEnter > Date.now() - 225 || ve) && i.some((C) => C.nodeType == 1 && !Qc.test(C.nodeName)) && (!p || p.endA >= p.endB) && n.someProp("handleKeyDown", (C) => C(n, Ue(13, "Enter")))) {
9162
9162
  n.input.lastIOSEnter = 0;
9163
9163
  return;
9164
9164
  }
@@ -9177,11 +9177,11 @@ function Qc(n, e, t, r, i) {
9177
9177
  }
9178
9178
  n.state.selection.from < n.state.selection.to && p.start == p.endB && n.state.selection instanceof M && (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)), ie && Ve <= 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--);
9179
9179
  let m = c.doc.resolveNoCache(p.start - c.from), g = c.doc.resolveNoCache(p.endB - c.from), y = d.resolve(p.start), T = m.sameParent(g) && m.parent.inlineContent && y.end() >= p.endA;
9180
- if ((St && n.input.lastIOSEnter > Date.now() - 225 && (!T || i.some((C) => C.nodeName == "DIV" || C.nodeName == "P")) || !T && 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", (C) => C(n, Ue(13, "Enter")))) {
9180
+ if ((Mt && n.input.lastIOSEnter > Date.now() - 225 && (!T || i.some((C) => C.nodeName == "DIV" || C.nodeName == "P")) || !T && 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", (C) => C(n, Ue(13, "Enter")))) {
9181
9181
  n.input.lastIOSEnter = 0;
9182
9182
  return;
9183
9183
  }
9184
- if (n.state.selection.anchor > p.start && td(d, p.start, p.endA, m, g) && n.someProp("handleKeyDown", (C) => C(n, Ue(8, "Backspace")))) {
9184
+ if (n.state.selection.anchor > p.start && nd(d, p.start, p.endA, m, g) && n.someProp("handleKeyDown", (C) => C(n, Ue(8, "Backspace")))) {
9185
9185
  ve && _ && n.domObserver.suppressSelectionUpdates();
9186
9186
  return;
9187
9187
  }
@@ -9205,7 +9205,7 @@ function Qc(n, e, t, r, i) {
9205
9205
  N && C.ensureMarks(N), n.dispatch(C);
9206
9206
  } else if (
9207
9207
  // Adding or removing a mark
9208
- p.endA == p.endB && (L = ed(m.parent.content.cut(m.parentOffset, g.parentOffset), y.parent.content.cut(y.parentOffset, p.endA - y.start())))
9208
+ p.endA == p.endB && (L = td(m.parent.content.cut(m.parentOffset, g.parentOffset), y.parent.content.cut(y.parentOffset, p.endA - y.start())))
9209
9209
  ) {
9210
9210
  let C = D(n.state.tr);
9211
9211
  L.type == "add" ? C.addMark(w, I, L.mark) : C.removeMark(w, I, L.mark), n.dispatch(C);
@@ -9220,7 +9220,7 @@ function Qc(n, e, t, r, i) {
9220
9220
  function Qi(n, e, t) {
9221
9221
  return Math.max(t.anchor, t.head) > e.content.size ? null : qr(n, e.resolve(t.anchor), e.resolve(t.head));
9222
9222
  }
9223
- function ed(n, e) {
9223
+ function td(n, e) {
9224
9224
  let t = n.firstChild.marks, r = e.firstChild.marks, i = t, s = r, o, l, a;
9225
9225
  for (let d = 0; d < r.length; d++)
9226
9226
  i = r[d].removeFromSet(i);
@@ -9238,7 +9238,7 @@ function ed(n, e) {
9238
9238
  if (b.from(c).eq(n))
9239
9239
  return { mark: l, type: o };
9240
9240
  }
9241
- function td(n, e, t, r, i) {
9241
+ function nd(n, e, t, r, i) {
9242
9242
  if (
9243
9243
  // The content must have shrunk
9244
9244
  t - e <= i.pos - r.pos || // newEnd must point directly at or after the end of the block that newStart points into
@@ -9266,7 +9266,7 @@ function sr(n, e, t) {
9266
9266
  }
9267
9267
  return i;
9268
9268
  }
9269
- function nd(n, e, t, r, i) {
9269
+ function rd(n, e, t, r, i) {
9270
9270
  let s = n.findDiffStart(e, t);
9271
9271
  if (s == null)
9272
9272
  return null;
@@ -9299,7 +9299,7 @@ class Fo {
9299
9299
  added to the document.
9300
9300
  */
9301
9301
  constructor(e, t) {
9302
- this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new bc(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(ss), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = rs(this), ns(this), this.nodeViews = is(this), this.docView = Bi(this.state.doc, ts(this), ir(this), this.dom, this), this.domObserver = new Kc(this, (r, i, s, o) => Qc(this, r, i, s, o)), this.domObserver.start(), kc(this), this.updatePluginViews();
9302
+ this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new kc(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(ss), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = rs(this), ns(this), this.nodeViews = is(this), this.docView = Bi(this.state.doc, ts(this), ir(this), this.dom, this), this.domObserver = new Jc(this, (r, i, s, o) => ed(this, r, i, s, o)), this.domObserver.start(), xc(this), this.updatePluginViews();
9303
9303
  }
9304
9304
  /**
9305
9305
  Holds `true` when a
@@ -9359,22 +9359,22 @@ class Fo {
9359
9359
  let l = i.plugins != e.plugins || this._props.plugins != t.plugins;
9360
9360
  if (l || this._props.plugins != t.plugins || this._props.nodeViews != t.nodeViews) {
9361
9361
  let h = is(this);
9362
- id(h, this.nodeViews) && (this.nodeViews = h, s = !0);
9362
+ sd(h, this.nodeViews) && (this.nodeViews = h, s = !0);
9363
9363
  }
9364
9364
  (l || t.handleDOMEvents != this._props.handleDOMEvents) && Dr(this), this.editable = rs(this), ns(this);
9365
9365
  let a = ir(this), c = ts(this), d = i.plugins != e.plugins && !i.doc.eq(e.doc) ? "reset" : e.scrollToSelection > i.scrollToSelection ? "to selection" : "preserve", u = s || !this.docView.matchesNode(e.doc, c, a);
9366
9366
  (u || !e.selection.eq(i.selection)) && (o = !0);
9367
- let f = d == "preserve" && o && this.dom.style.overflowAnchor == null && Ra(this);
9367
+ let f = d == "preserve" && o && this.dom.style.overflowAnchor == null && Pa(this);
9368
9368
  if (o) {
9369
9369
  this.domObserver.stop();
9370
- let h = u && (ie || _) && !this.composing && !i.selection.empty && !e.selection.empty && rd(i.selection, e.selection);
9370
+ let h = u && (ie || _) && !this.composing && !i.selection.empty && !e.selection.empty && id(i.selection, e.selection);
9371
9371
  if (u) {
9372
9372
  let p = _ ? this.trackWrites = this.domSelectionRange().focusNode : null;
9373
- this.composing && (this.input.compositionNode = Rc(this)), (s || !this.docView.update(e.doc, c, a, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = Bi(e.doc, c, a, this.dom, this)), p && (!this.trackWrites || !this.dom.contains(this.trackWrites)) && (h = !0);
9373
+ this.composing && (this.input.compositionNode = Pc(this)), (s || !this.docView.update(e.doc, c, a, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = Bi(e.doc, c, a, this.dom, this)), p && (!this.trackWrites || !this.dom.contains(this.trackWrites)) && (h = !0);
9374
9374
  }
9375
- h || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && rc(this)) ? Ne(this, h) : (ko(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
9375
+ h || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && ic(this)) ? Ne(this, h) : (ko(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
9376
9376
  }
9377
- this.updatePluginViews(i), !((r = this.dragging) === null || r === void 0) && r.node && !i.doc.eq(e.doc) && this.updateDraggedNode(this.dragging, i), d == "reset" ? this.dom.scrollTop = 0 : d == "to selection" ? this.scrollToSelection() : f && Pa(f);
9377
+ this.updatePluginViews(i), !((r = this.dragging) === null || r === void 0) && r.node && !i.doc.eq(e.doc) && this.updateDraggedNode(this.dragging, i), d == "reset" ? this.dom.scrollTop = 0 : d == "to selection" ? this.scrollToSelection() : f && Ba(f);
9378
9378
  }
9379
9379
  /**
9380
9380
  @internal
@@ -9461,7 +9461,7 @@ class Fo {
9461
9461
  Focus the editor.
9462
9462
  */
9463
9463
  focus() {
9464
- this.domObserver.stop(), this.editable && Ba(this.dom), Ne(this), this.domObserver.start();
9464
+ this.domObserver.stop(), this.editable && La(this.dom), Ne(this), this.domObserver.start();
9465
9465
  }
9466
9466
  /**
9467
9467
  Get the document root in which the editor exists. This will
@@ -9495,7 +9495,7 @@ class Fo {
9495
9495
  the top level, not in any node.
9496
9496
  */
9497
9497
  posAtCoords(e) {
9498
- return Va(this, e);
9498
+ return Ha(this, e);
9499
9499
  }
9500
9500
  /**
9501
9501
  Returns the viewport rectangle at a given document position.
@@ -9560,7 +9560,7 @@ class Fo {
9560
9560
  pass a different state.
9561
9561
  */
9562
9562
  endOfTextblock(e, t) {
9563
- return Ka(this, t || this.state, e);
9563
+ return Ja(this, t || this.state, e);
9564
9564
  }
9565
9565
  /**
9566
9566
  Run the editor's paste logic with the given HTML string. The
@@ -9592,7 +9592,7 @@ class Fo {
9592
9592
  views](https://prosemirror.net/docs/ref/#view.NodeView).
9593
9593
  */
9594
9594
  destroy() {
9595
- this.docView && (xc(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], ir(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null, wa());
9595
+ this.docView && (Sc(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], ir(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null, Ca());
9596
9596
  }
9597
9597
  /**
9598
9598
  This is true when the view has been
@@ -9606,14 +9606,14 @@ class Fo {
9606
9606
  Used for testing.
9607
9607
  */
9608
9608
  dispatchEvent(e) {
9609
- return Mc(this, e);
9609
+ return wc(this, e);
9610
9610
  }
9611
9611
  /**
9612
9612
  @internal
9613
9613
  */
9614
9614
  domSelectionRange() {
9615
9615
  let e = this.domSelection();
9616
- return e ? Z && this.root.nodeType === 11 && Ea(this.dom.ownerDocument) == this.dom && Uc(this, e) || e : { focusNode: null, focusOffset: 0, anchorNode: null, anchorOffset: 0 };
9616
+ return e ? Z && this.root.nodeType === 11 && Na(this.dom.ownerDocument) == this.dom && _c(this, e) || e : { focusNode: null, focusOffset: 0, anchorNode: null, anchorOffset: 0 };
9617
9617
  }
9618
9618
  /**
9619
9619
  @internal
@@ -9644,7 +9644,7 @@ function ns(n) {
9644
9644
  function rs(n) {
9645
9645
  return !n.someProp("editable", (e) => e(n.state) === !1);
9646
9646
  }
9647
- function rd(n, e) {
9647
+ function id(n, e) {
9648
9648
  let t = Math.min(n.$anchor.sharedDepth(n.head), e.$anchor.sharedDepth(e.head));
9649
9649
  return n.$anchor.start(t) != e.$anchor.start(t);
9650
9650
  }
@@ -9656,7 +9656,7 @@ function is(n) {
9656
9656
  }
9657
9657
  return n.someProp("nodeViews", t), n.someProp("markViews", t), e;
9658
9658
  }
9659
- function id(n, e) {
9659
+ function sd(n, e) {
9660
9660
  let t = 0, r = 0;
9661
9661
  for (let i in n) {
9662
9662
  if (n[i] != e[i])
@@ -9749,18 +9749,18 @@ var qe = {
9749
9749
  220: "|",
9750
9750
  221: "}",
9751
9751
  222: '"'
9752
- }, sd = typeof navigator < "u" && /Mac/.test(navigator.platform), od = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
9752
+ }, od = typeof navigator < "u" && /Mac/.test(navigator.platform), ld = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
9753
9753
  for (var U = 0; U < 10; U++) qe[48 + U] = qe[96 + U] = String(U);
9754
9754
  for (var U = 1; U <= 24; U++) qe[U + 111] = "F" + U;
9755
9755
  for (var U = 65; U <= 90; U++)
9756
9756
  qe[U] = String.fromCharCode(U + 32), Tn[U] = String.fromCharCode(U);
9757
9757
  for (var or in qe) Tn.hasOwnProperty(or) || (Tn[or] = qe[or]);
9758
- function ld(n) {
9759
- var e = sd && n.metaKey && n.shiftKey && !n.ctrlKey && !n.altKey || od && n.shiftKey && n.key && n.key.length == 1 || n.key == "Unidentified", t = !e && n.key || (n.shiftKey ? Tn : qe)[n.keyCode] || n.key || "Unidentified";
9758
+ function ad(n) {
9759
+ var e = od && n.metaKey && n.shiftKey && !n.ctrlKey && !n.altKey || ld && n.shiftKey && n.key && n.key.length == 1 || n.key == "Unidentified", t = !e && n.key || (n.shiftKey ? Tn : qe)[n.keyCode] || n.key || "Unidentified";
9760
9760
  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;
9761
9761
  }
9762
- const ad = typeof navigator < "u" && /Mac|iP(hone|[oa]d)/.test(navigator.platform), cd = typeof navigator < "u" && /Win/.test(navigator.platform);
9763
- function dd(n) {
9762
+ const cd = typeof navigator < "u" && /Mac|iP(hone|[oa]d)/.test(navigator.platform), dd = typeof navigator < "u" && /Win/.test(navigator.platform);
9763
+ function ud(n) {
9764
9764
  let e = n.split(/-(?!$)/), t = e[e.length - 1];
9765
9765
  t == "Space" && (t = " ");
9766
9766
  let r, i, s, o;
@@ -9775,28 +9775,28 @@ function dd(n) {
9775
9775
  else if (/^s(hift)?$/i.test(a))
9776
9776
  s = !0;
9777
9777
  else if (/^mod$/i.test(a))
9778
- ad ? o = !0 : i = !0;
9778
+ cd ? o = !0 : i = !0;
9779
9779
  else
9780
9780
  throw new Error("Unrecognized modifier name: " + a);
9781
9781
  }
9782
9782
  return r && (t = "Alt-" + t), i && (t = "Ctrl-" + t), o && (t = "Meta-" + t), s && (t = "Shift-" + t), t;
9783
9783
  }
9784
- function ud(n) {
9784
+ function fd(n) {
9785
9785
  let e = /* @__PURE__ */ Object.create(null);
9786
9786
  for (let t in n)
9787
- e[dd(t)] = n[t];
9787
+ e[ud(t)] = n[t];
9788
9788
  return e;
9789
9789
  }
9790
9790
  function lr(n, e, t = !0) {
9791
9791
  return e.altKey && (n = "Alt-" + n), e.ctrlKey && (n = "Ctrl-" + n), e.metaKey && (n = "Meta-" + n), t && e.shiftKey && (n = "Shift-" + n), n;
9792
9792
  }
9793
- function fd(n) {
9793
+ function hd(n) {
9794
9794
  return new se({ props: { handleKeyDown: $o(n) } });
9795
9795
  }
9796
9796
  function $o(n) {
9797
- let e = ud(n);
9797
+ let e = fd(n);
9798
9798
  return function(t, r) {
9799
- let i = ld(r), s, o = e[lr(i, r)];
9799
+ let i = ad(r), s, o = e[lr(i, r)];
9800
9800
  if (o && o(t.state, t.dispatch, t))
9801
9801
  return !0;
9802
9802
  if (i.length == 1 && i != " ") {
@@ -9806,7 +9806,7 @@ function $o(n) {
9806
9806
  return !0;
9807
9807
  }
9808
9808
  if ((r.altKey || r.metaKey || r.ctrlKey) && // Ctrl-Alt may be used for AltGr on Windows
9809
- !(cd && r.ctrlKey && r.altKey) && (s = qe[r.keyCode]) && s != i) {
9809
+ !(dd && r.ctrlKey && r.altKey) && (s = qe[r.keyCode]) && s != i) {
9810
9810
  let l = e[lr(s, r)];
9811
9811
  if (l && l(t.state, t.dispatch, t))
9812
9812
  return !0;
@@ -9826,19 +9826,19 @@ const Ho = (n, e, t) => {
9826
9826
  return !1;
9827
9827
  let i = Yr(r);
9828
9828
  if (!i) {
9829
- let o = r.blockRange(), l = o && wt(o);
9829
+ let o = r.blockRange(), l = o && Ct(o);
9830
9830
  return l == null ? !1 : (e && e(n.tr.lift(o, l).scrollIntoView()), !0);
9831
9831
  }
9832
9832
  let s = i.nodeBefore;
9833
9833
  if (Xo(n, i, e, -1))
9834
9834
  return !0;
9835
- if (r.parent.content.size == 0 && (Mt(s, "end") || S.isSelectable(s)))
9835
+ if (r.parent.content.size == 0 && (wt(s, "end") || S.isSelectable(s)))
9836
9836
  for (let o = r.depth; ; o--) {
9837
9837
  let l = Bn(n.doc, r.before(o), r.after(o), k.empty);
9838
9838
  if (l && l.slice.size < l.to - l.from) {
9839
9839
  if (e) {
9840
9840
  let a = n.tr.step(l);
9841
- a.setSelection(Mt(s, "end") ? v.findFrom(a.doc.resolve(a.mapping.map(i.pos, -1)), -1) : S.create(a.doc, i.pos - s.nodeSize)), e(a.scrollIntoView());
9841
+ a.setSelection(wt(s, "end") ? v.findFrom(a.doc.resolve(a.mapping.map(i.pos, -1)), -1) : S.create(a.doc, i.pos - s.nodeSize)), e(a.scrollIntoView());
9842
9842
  }
9843
9843
  return !0;
9844
9844
  }
@@ -9846,13 +9846,13 @@ const Ho = (n, e, t) => {
9846
9846
  break;
9847
9847
  }
9848
9848
  return s.isAtom && i.depth == r.depth - 1 ? (e && e(n.tr.delete(i.pos - s.nodeSize, i.pos).scrollIntoView()), !0) : !1;
9849
- }, hd = (n, e, t) => {
9849
+ }, pd = (n, e, t) => {
9850
9850
  let r = Vo(n, t);
9851
9851
  if (!r)
9852
9852
  return !1;
9853
9853
  let i = Yr(r);
9854
9854
  return i ? Wo(n, i, e) : !1;
9855
- }, pd = (n, e, t) => {
9855
+ }, md = (n, e, t) => {
9856
9856
  let r = jo(n, t);
9857
9857
  if (!r)
9858
9858
  return !1;
@@ -9887,7 +9887,7 @@ function Wo(n, e, t) {
9887
9887
  }
9888
9888
  return !0;
9889
9889
  }
9890
- function Mt(n, e, t = !1) {
9890
+ function wt(n, e, t = !1) {
9891
9891
  for (let r = n; r; r = e == "start" ? r.firstChild : r.lastChild) {
9892
9892
  if (r.isTextblock)
9893
9893
  return !0;
@@ -9932,12 +9932,12 @@ const Ko = (n, e, t) => {
9932
9932
  let s = i.nodeAfter;
9933
9933
  if (Xo(n, i, e, 1))
9934
9934
  return !0;
9935
- if (r.parent.content.size == 0 && (Mt(s, "start") || S.isSelectable(s))) {
9935
+ if (r.parent.content.size == 0 && (wt(s, "start") || S.isSelectable(s))) {
9936
9936
  let o = Bn(n.doc, r.before(), r.after(), k.empty);
9937
9937
  if (o && o.slice.size < o.to - o.from) {
9938
9938
  if (e) {
9939
9939
  let l = n.tr.step(o);
9940
- l.setSelection(Mt(s, "start") ? v.findFrom(l.doc.resolve(l.mapping.map(i.pos)), 1) : S.create(l.doc, l.mapping.map(i.pos))), e(l.scrollIntoView());
9940
+ l.setSelection(wt(s, "start") ? v.findFrom(l.doc.resolve(l.mapping.map(i.pos)), 1) : S.create(l.doc, l.mapping.map(i.pos))), e(l.scrollIntoView());
9941
9941
  }
9942
9942
  return !0;
9943
9943
  }
@@ -9966,7 +9966,7 @@ function Zr(n) {
9966
9966
  }
9967
9967
  return null;
9968
9968
  }
9969
- const md = (n, e) => {
9969
+ const gd = (n, e) => {
9970
9970
  let t = n.selection, r = t instanceof S, i;
9971
9971
  if (r) {
9972
9972
  if (t.node.isTextblock || !je(n.doc, t.from))
@@ -9979,7 +9979,7 @@ const md = (n, e) => {
9979
9979
  r && s.setSelection(S.create(s.doc, i - n.doc.resolve(i).nodeBefore.nodeSize)), e(s.scrollIntoView());
9980
9980
  }
9981
9981
  return !0;
9982
- }, gd = (n, e) => {
9982
+ }, yd = (n, e) => {
9983
9983
  let t = n.selection, r;
9984
9984
  if (t instanceof S) {
9985
9985
  if (t.node.isTextblock || !je(n.doc, t.to))
@@ -9988,8 +9988,8 @@ const md = (n, e) => {
9988
9988
  } else if (r = Pn(n.doc, t.to, 1), r == null)
9989
9989
  return !1;
9990
9990
  return e && e(n.tr.join(r).scrollIntoView()), !0;
9991
- }, yd = (n, e) => {
9992
- let { $from: t, $to: r } = n.selection, i = t.blockRange(r), s = i && wt(i);
9991
+ }, bd = (n, e) => {
9992
+ let { $from: t, $to: r } = n.selection, i = t.blockRange(r), s = i && Ct(i);
9993
9993
  return s == null ? !1 : (e && e(n.tr.lift(i, s).scrollIntoView()), !0);
9994
9994
  }, Uo = (n, e) => {
9995
9995
  let { $head: t, $anchor: r } = n.selection;
@@ -10004,7 +10004,7 @@ function Qr(n) {
10004
10004
  }
10005
10005
  return null;
10006
10006
  }
10007
- const bd = (n, e) => {
10007
+ const kd = (n, e) => {
10008
10008
  let { $head: t, $anchor: r } = n.selection;
10009
10009
  if (!t.parent.type.spec.code || !t.sameParent(r))
10010
10010
  return !1;
@@ -10037,10 +10037,10 @@ const bd = (n, e) => {
10037
10037
  if (Ee(n.doc, s))
10038
10038
  return e && e(n.tr.split(s).scrollIntoView()), !0;
10039
10039
  }
10040
- let r = t.blockRange(), i = r && wt(r);
10040
+ let r = t.blockRange(), i = r && Ct(r);
10041
10041
  return i == null ? !1 : (e && e(n.tr.lift(r, i).scrollIntoView()), !0);
10042
10042
  };
10043
- function kd(n) {
10043
+ function xd(n) {
10044
10044
  return (e, t) => {
10045
10045
  let { $from: r, $to: i } = e.selection;
10046
10046
  if (e.selection instanceof S && e.selection.node.isBlock)
@@ -10069,17 +10069,17 @@ function kd(n) {
10069
10069
  return t && t(d.scrollIntoView()), !0;
10070
10070
  };
10071
10071
  }
10072
- const xd = kd(), Sd = (n, e) => {
10072
+ const Sd = xd(), Md = (n, e) => {
10073
10073
  let { $from: t, to: r } = n.selection, i, s = t.sharedDepth(r);
10074
10074
  return s == 0 ? !1 : (i = t.before(s), e && e(n.tr.setSelection(S.create(n.doc, i))), !0);
10075
10075
  };
10076
- function Md(n, e, t) {
10076
+ function wd(n, e, t) {
10077
10077
  let r = e.nodeBefore, i = e.nodeAfter, s = e.index();
10078
10078
  return !r || !i || !r.type.compatibleContent(i.type) ? !1 : !r.content.size && e.parent.canReplace(s - 1, s) ? (t && t(n.tr.delete(e.pos - r.nodeSize, e.pos).scrollIntoView()), !0) : !e.parent.canReplace(s, s + 1) || !(i.isTextblock || je(n.doc, e.pos)) ? !1 : (t && t(n.tr.join(e.pos).scrollIntoView()), !0);
10079
10079
  }
10080
10080
  function Xo(n, e, t, r) {
10081
10081
  let i = e.nodeBefore, s = e.nodeAfter, o, l, a = i.type.spec.isolating || s.type.spec.isolating;
10082
- if (!a && Md(n, e, t))
10082
+ if (!a && wd(n, e, t))
10083
10083
  return !0;
10084
10084
  let c = !a && e.parent.canReplace(e.index(), e.index() + 1);
10085
10085
  if (c && (o = (l = i.contentMatchAt(i.childCount)).findWrapping(s.type)) && l.matchType(o[0] || s.type).validEnd) {
@@ -10093,10 +10093,10 @@ function Xo(n, e, t, r) {
10093
10093
  }
10094
10094
  return !0;
10095
10095
  }
10096
- let d = s.type.spec.isolating || r > 0 && a ? null : v.findFrom(e, 1), u = d && d.$from.blockRange(d.$to), f = u && wt(u);
10096
+ let d = s.type.spec.isolating || r > 0 && a ? null : v.findFrom(e, 1), u = d && d.$from.blockRange(d.$to), f = u && Ct(u);
10097
10097
  if (f != null && f >= e.depth)
10098
10098
  return t && t(n.tr.lift(u, f).scrollIntoView()), !0;
10099
- if (c && Mt(s, "start", !0) && Mt(i, "end")) {
10099
+ if (c && wt(s, "start", !0) && wt(i, "end")) {
10100
10100
  let h = i, p = [];
10101
10101
  for (; p.push(h), !h.isTextblock; )
10102
10102
  h = h.lastChild;
@@ -10127,8 +10127,8 @@ function Yo(n) {
10127
10127
  return i.node(s).isTextblock ? (t && t(e.tr.setSelection(M.create(e.doc, n < 0 ? i.start(s) : i.end(s)))), !0) : !1;
10128
10128
  };
10129
10129
  }
10130
- const wd = Yo(-1), Cd = Yo(1);
10131
- function Td(n, e = null) {
10130
+ const Cd = Yo(-1), Td = Yo(1);
10131
+ function Od(n, e = null) {
10132
10132
  return function(t, r) {
10133
10133
  let { $from: i, $to: s } = t.selection, o = i.blockRange(s), l = o && $r(o, n, e);
10134
10134
  return l ? (r && r(t.tr.wrap(o, l).scrollIntoView()), !0) : !1;
@@ -10174,18 +10174,18 @@ function ei(...n) {
10174
10174
  }
10175
10175
  ei(Xr, Ho, qo);
10176
10176
  ei(Xr, Ko, Jo);
10177
- ei(Uo, _o, Go, xd);
10177
+ ei(Uo, _o, Go, Sd);
10178
10178
  typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os < "u" && os.platform && os.platform() == "darwin";
10179
- function Od(n, e = null) {
10179
+ function vd(n, e = null) {
10180
10180
  return function(t, r) {
10181
10181
  let { $from: i, $to: s } = t.selection, o = i.blockRange(s);
10182
10182
  if (!o)
10183
10183
  return !1;
10184
10184
  let l = r ? t.tr : null;
10185
- return vd(l, o, n, e) ? (r && r(l.scrollIntoView()), !0) : !1;
10185
+ return Ed(l, o, n, e) ? (r && r(l.scrollIntoView()), !0) : !1;
10186
10186
  };
10187
10187
  }
10188
- function vd(n, e, t, r = null) {
10188
+ function Ed(n, e, t, r = null) {
10189
10189
  let i = !1, s = e, o = e.$from.doc;
10190
10190
  if (e.depth >= 2 && e.$from.node(e.depth - 1).type.compatibleContent(t) && e.startIndex == 0) {
10191
10191
  if (e.$from.index(e.depth - 1) == 0)
@@ -10194,9 +10194,9 @@ function vd(n, e, t, r = null) {
10194
10194
  s = new bn(a, a, e.depth), e.endIndex < e.parent.childCount && (e = new bn(e.$from, o.resolve(e.$to.end(e.depth)), e.depth)), i = !0;
10195
10195
  }
10196
10196
  let l = $r(s, t, r, e);
10197
- return l ? (n && Ed(n, e, l, i, t), !0) : !1;
10197
+ return l ? (n && Nd(n, e, l, i, t), !0) : !1;
10198
10198
  }
10199
- function Ed(n, e, t, r, i) {
10199
+ function Nd(n, e, t, r, i) {
10200
10200
  let s = b.empty;
10201
10201
  for (let d = t.length - 1; d >= 0; d--)
10202
10202
  s = b.from(t[d].type.create(t[d].attrs, s));
@@ -10209,23 +10209,23 @@ function Ed(n, e, t, r, i) {
10209
10209
  !f && Ee(n.doc, a, l) && (n.split(a, l), a += 2 * l), a += c.child(d).nodeSize;
10210
10210
  return n;
10211
10211
  }
10212
- function Nd(n) {
10212
+ function Ad(n) {
10213
10213
  return function(e, t) {
10214
10214
  let { $from: r, $to: i } = e.selection, s = r.blockRange(i, (o) => o.childCount > 0 && o.firstChild.type == n);
10215
- return s ? t ? r.node(s.depth - 1).type == n ? Ad(e, t, n, s) : Dd(e, t, s) : !0 : !1;
10215
+ return s ? t ? r.node(s.depth - 1).type == n ? Dd(e, t, n, s) : Id(e, t, s) : !0 : !1;
10216
10216
  };
10217
10217
  }
10218
- function Ad(n, e, t, r) {
10218
+ function Dd(n, e, t, r) {
10219
10219
  let i = n.tr, s = r.end, o = r.$to.end(r.depth);
10220
10220
  s < o && (i.step(new $(s - 1, o, s, o, new k(b.from(t.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new bn(i.doc.resolve(r.$from.pos), i.doc.resolve(o), r.depth));
10221
- const l = wt(r);
10221
+ const l = Ct(r);
10222
10222
  if (l == null)
10223
10223
  return !1;
10224
10224
  i.lift(r, l);
10225
10225
  let a = i.doc.resolve(i.mapping.map(s, -1) - 1);
10226
10226
  return je(i.doc, a.pos) && a.nodeBefore.type == a.nodeAfter.type && i.join(a.pos), e(i.scrollIntoView()), !0;
10227
10227
  }
10228
- function Dd(n, e, t) {
10228
+ function Id(n, e, t) {
10229
10229
  let r = n.tr, i = t.parent;
10230
10230
  for (let h = t.end, p = t.endIndex - 1, m = t.startIndex; p > m; p--)
10231
10231
  h -= i.child(p).nodeSize, r.delete(h - 1, h + 1);
@@ -10238,7 +10238,7 @@ function Dd(n, e, t) {
10238
10238
  let u = s.pos, f = u + o.nodeSize;
10239
10239
  return r.step(new $(u - (l ? 1 : 0), f + (a ? 1 : 0), u + 1, f - 1, new k((l ? b.empty : b.from(i.copy(b.empty))).append(a ? b.empty : b.from(i.copy(b.empty))), l ? 0 : 1, a ? 0 : 1), l ? 0 : 1)), e(r.scrollIntoView()), !0;
10240
10240
  }
10241
- function Id(n) {
10241
+ function Rd(n) {
10242
10242
  return function(e, t) {
10243
10243
  let { $from: r, $to: i } = e.selection, s = r.blockRange(i, (c) => c.childCount > 0 && c.firstChild.type == n);
10244
10244
  if (!s)
@@ -10341,7 +10341,7 @@ class Hn {
10341
10341
  return l;
10342
10342
  }
10343
10343
  }
10344
- class Rd {
10344
+ class Pd {
10345
10345
  constructor() {
10346
10346
  this.callbacks = {};
10347
10347
  }
@@ -10478,10 +10478,10 @@ function Qo(n) {
10478
10478
  function E(n, e = void 0, ...t) {
10479
10479
  return Qo(n) ? e ? n.bind(e)(...t) : n(...t) : n;
10480
10480
  }
10481
- function Pd(n = {}) {
10481
+ function Bd(n = {}) {
10482
10482
  return Object.keys(n).length === 0 && n.constructor === Object;
10483
10483
  }
10484
- function Bd(n) {
10484
+ function Ld(n) {
10485
10485
  return typeof n != "string" ? n : n.match(/^[+-]?(?:\d*\.)?\d+$/) ? Number(n) : n === "true" ? !0 : n === "false" ? !1 : n;
10486
10486
  }
10487
10487
  function as(n, e) {
@@ -10492,7 +10492,7 @@ function as(n, e) {
10492
10492
  if (r === !1)
10493
10493
  return !1;
10494
10494
  const i = e.reduce((s, o) => {
10495
- const l = o.attribute.parseHTML ? o.attribute.parseHTML(t) : Bd(t.getAttribute(o.name));
10495
+ const l = o.attribute.parseHTML ? o.attribute.parseHTML(t) : Ld(t.getAttribute(o.name));
10496
10496
  return l == null ? s : {
10497
10497
  ...s,
10498
10498
  [o.name]: l
@@ -10505,10 +10505,10 @@ function as(n, e) {
10505
10505
  function cs(n) {
10506
10506
  return Object.fromEntries(
10507
10507
  // @ts-ignore
10508
- Object.entries(n).filter(([e, t]) => e === "attrs" && Pd(t) ? !1 : t != null)
10508
+ Object.entries(n).filter(([e, t]) => e === "attrs" && Bd(t) ? !1 : t != null)
10509
10509
  );
10510
10510
  }
10511
- function Ld(n, e) {
10511
+ function zd(n, e) {
10512
10512
  var t;
10513
10513
  const r = Zo(n), { nodeExtensions: i, markExtensions: s } = Wn(n), o = (t = i.find((c) => x(c, "topNode"))) === null || t === void 0 ? void 0 : t.name, l = Object.fromEntries(i.map((c) => {
10514
10514
  const d = r.filter((y) => y.type === c.name), u = {
@@ -10596,7 +10596,7 @@ function ti(n, e) {
10596
10596
  const t = dt.fromSchema(e).serializeFragment(n), i = document.implementation.createHTMLDocument().createElement("div");
10597
10597
  return i.appendChild(t), i.innerHTML;
10598
10598
  }
10599
- const zd = (n, e = 500) => {
10599
+ const Fd = (n, e = 500) => {
10600
10600
  let t = "";
10601
10601
  const r = n.parentOffset;
10602
10602
  return n.parent.nodesBetween(Math.max(0, r - e), r, (i, s, o, l) => {
@@ -10618,7 +10618,7 @@ class qn {
10618
10618
  this.find = e.find, this.handler = e.handler;
10619
10619
  }
10620
10620
  }
10621
- const Fd = (n, e) => {
10621
+ const $d = (n, e) => {
10622
10622
  if (ni(e))
10623
10623
  return e.exec(n);
10624
10624
  const t = e(n);
@@ -10639,11 +10639,11 @@ function rn(n) {
10639
10639
  )
10640
10640
  return !1;
10641
10641
  let d = !1;
10642
- const u = zd(c) + s;
10642
+ const u = Fd(c) + s;
10643
10643
  return o.forEach((f) => {
10644
10644
  if (d)
10645
10645
  return;
10646
- const h = Fd(u, f.find);
10646
+ const h = $d(u, f.find);
10647
10647
  if (!h)
10648
10648
  return;
10649
10649
  const p = a.state.tr, m = Vn({
@@ -10671,7 +10671,7 @@ function rn(n) {
10671
10671
  }), a.dispatch(p), d = !0);
10672
10672
  }), d;
10673
10673
  }
10674
- function $d(n) {
10674
+ function Vd(n) {
10675
10675
  const { editor: e, rules: t } = n, r = new se({
10676
10676
  state: {
10677
10677
  init() {
@@ -10743,11 +10743,11 @@ function $d(n) {
10743
10743
  });
10744
10744
  return r;
10745
10745
  }
10746
- function Vd(n) {
10746
+ function Hd(n) {
10747
10747
  return Object.prototype.toString.call(n).slice(8, -1);
10748
10748
  }
10749
10749
  function sn(n) {
10750
- return Vd(n) !== "Object" ? !1 : n.constructor === Object && Object.getPrototypeOf(n) === Object.prototype;
10750
+ return Hd(n) !== "Object" ? !1 : n.constructor === Object && Object.getPrototypeOf(n) === Object.prototype;
10751
10751
  }
10752
10752
  function jn(n, e) {
10753
10753
  const t = { ...n };
@@ -10801,15 +10801,15 @@ class Me {
10801
10801
  return !1;
10802
10802
  }
10803
10803
  }
10804
- function Hd(n) {
10804
+ function Wd(n) {
10805
10805
  return typeof n == "number";
10806
10806
  }
10807
- class Wd {
10807
+ class qd {
10808
10808
  constructor(e) {
10809
10809
  this.find = e.find, this.handler = e.handler;
10810
10810
  }
10811
10811
  }
10812
- const qd = (n, e, t) => {
10812
+ const jd = (n, e, t) => {
10813
10813
  if (ni(e))
10814
10814
  return [...n.matchAll(e)];
10815
10815
  const r = e(n, t);
@@ -10818,7 +10818,7 @@ const qd = (n, e, t) => {
10818
10818
  return s.index = i.index, s.input = n, s.data = i.data, i.replaceWith && (i.text.includes(i.replaceWith) || console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'), s.push(i.replaceWith)), s;
10819
10819
  }) : [];
10820
10820
  };
10821
- function jd(n) {
10821
+ function Kd(n) {
10822
10822
  const { editor: e, state: t, from: r, to: i, rule: s, pasteEvent: o, dropEvent: l } = n, { commands: a, chain: c, can: d } = new Hn({
10823
10823
  editor: e,
10824
10824
  state: t
@@ -10827,7 +10827,7 @@ function jd(n) {
10827
10827
  if (!h.isTextblock || h.type.spec.code)
10828
10828
  return;
10829
10829
  const m = Math.max(r, p), g = Math.min(i, p + h.content.size), y = h.textBetween(m - p, g - p, void 0, "");
10830
- qd(y, s.find, o).forEach((w) => {
10830
+ jd(y, s.find, o).forEach((w) => {
10831
10831
  if (w.index === void 0)
10832
10832
  return;
10833
10833
  const I = m + w.index + 1, D = I + w[0].length, L = {
@@ -10848,14 +10848,14 @@ function jd(n) {
10848
10848
  }), u.every((h) => h !== null);
10849
10849
  }
10850
10850
  let on = null;
10851
- const Kd = (n) => {
10851
+ const Jd = (n) => {
10852
10852
  var e;
10853
10853
  const t = new ClipboardEvent("paste", {
10854
10854
  clipboardData: new DataTransfer()
10855
10855
  });
10856
10856
  return (e = t.clipboardData) === null || e === void 0 || e.setData("text/html", n), t;
10857
10857
  };
10858
- function Jd(n) {
10858
+ function Ud(n) {
10859
10859
  const { editor: e, rules: t } = n;
10860
10860
  let r = null, i = !1, s = !1, o = typeof ClipboardEvent < "u" ? new ClipboardEvent("paste") : null, l;
10861
10861
  try {
@@ -10868,7 +10868,7 @@ function Jd(n) {
10868
10868
  state: d,
10869
10869
  transaction: m
10870
10870
  });
10871
- if (!(!jd({
10871
+ if (!(!Kd({
10872
10872
  editor: e,
10873
10873
  state: g,
10874
10874
  from: Math.max(u - 1, 0),
@@ -10926,7 +10926,7 @@ function Jd(n) {
10926
10926
  if (T) {
10927
10927
  let { text: D } = y;
10928
10928
  typeof D == "string" ? D = D : D = ti(b.from(D), h.schema);
10929
- const { from: L } = y, C = L + D.length, N = Kd(D);
10929
+ const { from: L } = y, C = L + D.length, N = Jd(D);
10930
10930
  return a({
10931
10931
  rule: d,
10932
10932
  state: h,
@@ -10936,7 +10936,7 @@ function Jd(n) {
10936
10936
  });
10937
10937
  }
10938
10938
  const w = f.doc.content.findDiffStart(h.doc.content), I = f.doc.content.findDiffEnd(h.doc.content);
10939
- if (!(!Hd(w) || !I || w === I.b))
10939
+ if (!(!Wd(w) || !I || w === I.b))
10940
10940
  return a({
10941
10941
  rule: d,
10942
10942
  state: h,
@@ -10947,13 +10947,13 @@ function Jd(n) {
10947
10947
  }
10948
10948
  }));
10949
10949
  }
10950
- function Ud(n) {
10950
+ function _d(n) {
10951
10951
  const e = n.filter((t, r) => n.indexOf(t) !== r);
10952
10952
  return Array.from(new Set(e));
10953
10953
  }
10954
10954
  class gt {
10955
10955
  constructor(e, t) {
10956
- this.splittableMarks = [], this.editor = t, this.extensions = gt.resolve(e), this.schema = Ld(this.extensions, t), this.setupExtensions();
10956
+ this.splittableMarks = [], this.editor = t, this.extensions = gt.resolve(e), this.schema = zd(this.extensions, t), this.setupExtensions();
10957
10957
  }
10958
10958
  /**
10959
10959
  * Returns a flattened and sorted extension list while
@@ -10962,7 +10962,7 @@ class gt {
10962
10962
  * @returns An flattened and sorted array of Tiptap extensions
10963
10963
  */
10964
10964
  static resolve(e) {
10965
- const t = gt.sort(gt.flatten(e)), r = Ud(t.map((i) => i.name));
10965
+ const t = gt.sort(gt.flatten(e)), r = _d(t.map((i) => i.name));
10966
10966
  return r.length && console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map((i) => `'${i}'`).join(", ")}]. This can lead to issues.`), t;
10967
10967
  }
10968
10968
  /**
@@ -11028,7 +11028,7 @@ class gt {
11028
11028
  const m = Object.fromEntries(Object.entries(c()).map(([g, y]) => [g, () => y({ editor: e })]));
11029
11029
  d = { ...d, ...m };
11030
11030
  }
11031
- const u = fd(d);
11031
+ const u = hd(d);
11032
11032
  a.push(u);
11033
11033
  const f = x(o, "addInputRules", l);
11034
11034
  ds(o, e.options.enableInputRules) && f && r.push(...f());
@@ -11042,11 +11042,11 @@ class gt {
11042
11042
  return a;
11043
11043
  }).flat();
11044
11044
  return [
11045
- $d({
11045
+ Vd({
11046
11046
  editor: e,
11047
11047
  rules: r
11048
11048
  }),
11049
- ...Jd({
11049
+ ...Ud({
11050
11050
  editor: e,
11051
11051
  rules: i
11052
11052
  }),
@@ -11173,7 +11173,7 @@ function el(n, e, t) {
11173
11173
  function tl(n) {
11174
11174
  return Object.fromEntries(Object.entries(n.nodes).filter(([, e]) => e.spec.toText).map(([e, t]) => [e, t.spec.toText]));
11175
11175
  }
11176
- const _d = G.create({
11176
+ const Gd = G.create({
11177
11177
  name: "clipboardTextSerializer",
11178
11178
  addOptions() {
11179
11179
  return {
@@ -11196,10 +11196,10 @@ const _d = G.create({
11196
11196
  })
11197
11197
  ];
11198
11198
  }
11199
- }), Gd = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
11199
+ }), Xd = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
11200
11200
  var t;
11201
11201
  n.isDestroyed || (e.dom.blur(), (t = window == null ? void 0 : window.getSelection()) === null || t === void 0 || t.removeAllRanges());
11202
- }), !0), Xd = (n = !1) => ({ commands: e }) => e.setContent("", n), Yd = () => ({ state: n, tr: e, dispatch: t }) => {
11202
+ }), !0), Yd = (n = !1) => ({ commands: e }) => e.setContent("", n), Zd = () => ({ state: n, tr: e, dispatch: t }) => {
11203
11203
  const { selection: r } = e, { ranges: i } = r;
11204
11204
  return t && i.forEach(({ $from: s, $to: o }) => {
11205
11205
  n.doc.nodesBetween(s.pos, o.pos, (l, a) => {
@@ -11208,7 +11208,7 @@ const _d = G.create({
11208
11208
  const { doc: c, mapping: d } = e, u = c.resolve(d.map(a)), f = c.resolve(d.map(a + l.nodeSize)), h = u.blockRange(f);
11209
11209
  if (!h)
11210
11210
  return;
11211
- const p = wt(h);
11211
+ const p = Ct(h);
11212
11212
  if (l.type.isTextblock) {
11213
11213
  const { defaultType: m } = u.parent.contentMatchAt(u.index());
11214
11214
  e.setNodeMarkup(h.start, m);
@@ -11216,12 +11216,12 @@ const _d = G.create({
11216
11216
  (p || p === 0) && e.lift(h, p);
11217
11217
  });
11218
11218
  }), !0;
11219
- }, Zd = (n) => (e) => n(e), Qd = () => ({ state: n, dispatch: e }) => _o(n, e), eu = (n, e) => ({ editor: t, tr: r }) => {
11219
+ }, Qd = (n) => (e) => n(e), eu = () => ({ state: n, dispatch: e }) => _o(n, e), tu = (n, e) => ({ editor: t, tr: r }) => {
11220
11220
  const { state: i } = t, s = i.doc.slice(n.from, n.to);
11221
11221
  r.deleteRange(n.from, n.to);
11222
11222
  const o = r.mapping.map(e);
11223
11223
  return r.insert(o, s.content), r.setSelection(new M(r.doc.resolve(Math.max(o - 1, 0)))), !0;
11224
- }, tu = () => ({ tr: n, dispatch: e }) => {
11224
+ }, nu = () => ({ tr: n, dispatch: e }) => {
11225
11225
  const { selection: t } = n, r = t.$anchor.node();
11226
11226
  if (r.content.size > 0)
11227
11227
  return !1;
@@ -11235,7 +11235,7 @@ const _d = G.create({
11235
11235
  return !0;
11236
11236
  }
11237
11237
  return !1;
11238
- }, nu = (n) => ({ tr: e, state: t, dispatch: r }) => {
11238
+ }, ru = (n) => ({ tr: e, state: t, dispatch: r }) => {
11239
11239
  const i = H(n, t.schema), s = e.selection.$anchor;
11240
11240
  for (let o = s.depth; o > 0; o -= 1)
11241
11241
  if (s.node(o).type === i) {
@@ -11246,10 +11246,10 @@ const _d = G.create({
11246
11246
  return !0;
11247
11247
  }
11248
11248
  return !1;
11249
- }, ru = (n) => ({ tr: e, dispatch: t }) => {
11249
+ }, iu = (n) => ({ tr: e, dispatch: t }) => {
11250
11250
  const { from: r, to: i } = n;
11251
11251
  return t && e.delete(r, i), !0;
11252
- }, iu = () => ({ state: n, dispatch: e }) => Xr(n, e), su = () => ({ commands: n }) => n.keyboardShortcut("Enter"), ou = () => ({ state: n, dispatch: e }) => bd(n, e);
11252
+ }, su = () => ({ state: n, dispatch: e }) => Xr(n, e), ou = () => ({ commands: n }) => n.keyboardShortcut("Enter"), lu = () => ({ state: n, dispatch: e }) => kd(n, e);
11253
11253
  function On(n, e, t = { strict: !0 }) {
11254
11254
  const r = Object.keys(e);
11255
11255
  return r.length ? r.every((i) => t.strict ? e[i] === n[i] : ni(e[i]) ? e[i].test(n[i]) : e[i] === n[i]) : !0;
@@ -11289,7 +11289,7 @@ function Je(n, e) {
11289
11289
  }
11290
11290
  return n;
11291
11291
  }
11292
- const lu = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
11292
+ const au = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
11293
11293
  const s = Je(n, r.schema), { doc: o, selection: l } = t, { $from: a, from: c, to: d } = l;
11294
11294
  if (i) {
11295
11295
  const u = ri(a, s, e);
@@ -11299,7 +11299,7 @@ const lu = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
11299
11299
  }
11300
11300
  }
11301
11301
  return !0;
11302
- }, au = (n) => (e) => {
11302
+ }, cu = (n) => (e) => {
11303
11303
  const t = typeof n == "function" ? n(e) : n;
11304
11304
  for (let r = 0; r < t.length; r += 1)
11305
11305
  if (t[r](e))
@@ -11336,17 +11336,17 @@ function vn() {
11336
11336
  "iPod"
11337
11337
  ].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document;
11338
11338
  }
11339
- function cu() {
11339
+ function du() {
11340
11340
  return typeof navigator < "u" ? /^((?!chrome|android).)*safari/i.test(navigator.userAgent) : !1;
11341
11341
  }
11342
- const du = (n = null, e = {}) => ({ editor: t, view: r, tr: i, dispatch: s }) => {
11342
+ const uu = (n = null, e = {}) => ({ editor: t, view: r, tr: i, dispatch: s }) => {
11343
11343
  e = {
11344
11344
  scrollIntoView: !0,
11345
11345
  ...e
11346
11346
  };
11347
11347
  const o = () => {
11348
11348
  (vn() || fs()) && r.dom.focus(), requestAnimationFrame(() => {
11349
- t.isDestroyed || (r.focus(), cu() && !vn() && !fs() && r.dom.focus({ preventScroll: !0 }));
11349
+ t.isDestroyed || (r.focus(), du() && !vn() && !fs() && r.dom.focus({ preventScroll: !0 }));
11350
11350
  });
11351
11351
  };
11352
11352
  if (r.hasFocus() && n === null || n === !1)
@@ -11355,7 +11355,7 @@ const du = (n = null, e = {}) => ({ editor: t, view: r, tr: i, dispatch: s }) =>
11355
11355
  return o(), !0;
11356
11356
  const l = il(i.doc, n) || t.state.selection, a = t.state.selection.eq(l);
11357
11357
  return s && (a || i.setSelection(l), a && i.storedMarks && i.setStoredMarks(i.storedMarks), o()), !0;
11358
- }, uu = (n, e) => (t) => n.every((r, i) => e(r, { ...t, index: i })), fu = (n, e) => ({ tr: t, commands: r }) => r.insertContentAt({ from: t.selection.from, to: t.selection.to }, n, e), sl = (n) => {
11358
+ }, fu = (n, e) => (t) => n.every((r, i) => e(r, { ...t, index: i })), hu = (n, e) => ({ tr: t, commands: r }) => r.insertContentAt({ from: t.selection.from, to: t.selection.to }, n, e), sl = (n) => {
11359
11359
  const e = n.childNodes;
11360
11360
  for (let t = e.length - 1; t >= 0; t -= 1) {
11361
11361
  const r = e[t];
@@ -11416,7 +11416,7 @@ function Ht(n, e, t) {
11416
11416
  }
11417
11417
  return Ht("", e, t);
11418
11418
  }
11419
- function hu(n, e, t) {
11419
+ function pu(n, e, t) {
11420
11420
  const r = n.steps.length - 1;
11421
11421
  if (r < e)
11422
11422
  return;
@@ -11429,7 +11429,7 @@ function hu(n, e, t) {
11429
11429
  o === 0 && (o = d);
11430
11430
  }), n.setSelection(v.near(n.doc.resolve(o), t));
11431
11431
  }
11432
- const pu = (n) => !("type" in n), mu = (n, e, t) => ({ tr: r, dispatch: i, editor: s }) => {
11432
+ const mu = (n) => !("type" in n), gu = (n, e, t) => ({ tr: r, dispatch: i, editor: s }) => {
11433
11433
  var o;
11434
11434
  if (i) {
11435
11435
  t = {
@@ -11470,7 +11470,7 @@ const pu = (n) => !("type" in n), mu = (n, e, t) => ({ tr: r, dispatch: i, edito
11470
11470
  return a(g), !1;
11471
11471
  }
11472
11472
  let { from: d, to: u } = typeof n == "number" ? { from: n, to: n } : { from: n.from, to: n.to }, f = !0, h = !0;
11473
- if ((pu(l) ? l : [l]).forEach((g) => {
11473
+ if ((mu(l) ? l : [l]).forEach((g) => {
11474
11474
  g.check(), f = f ? g.isText && g.marks.length === 0 : !1, h = h ? g.isBlock : !1;
11475
11475
  }), d === u && h) {
11476
11476
  const { parent: g } = r.doc.resolve(d);
@@ -11489,28 +11489,28 @@ const pu = (n) => !("type" in n), mu = (n, e, t) => ({ tr: r, dispatch: i, edito
11489
11489
  r.insertText(m, d, u);
11490
11490
  } else
11491
11491
  m = l, r.replaceWith(d, u, m);
11492
- t.updateSelection && hu(r, r.steps.length - 1, -1), t.applyInputRules && r.setMeta("applyInputRules", { from: d, text: m }), t.applyPasteRules && r.setMeta("applyPasteRules", { from: d, text: m });
11492
+ t.updateSelection && pu(r, r.steps.length - 1, -1), t.applyInputRules && r.setMeta("applyInputRules", { from: d, text: m }), t.applyPasteRules && r.setMeta("applyPasteRules", { from: d, text: m });
11493
11493
  }
11494
11494
  return !0;
11495
- }, gu = () => ({ state: n, dispatch: e }) => md(n, e), yu = () => ({ state: n, dispatch: e }) => gd(n, e), bu = () => ({ state: n, dispatch: e }) => Ho(n, e), ku = () => ({ state: n, dispatch: e }) => Ko(n, e), xu = () => ({ state: n, dispatch: e, tr: t }) => {
11495
+ }, yu = () => ({ state: n, dispatch: e }) => gd(n, e), bu = () => ({ state: n, dispatch: e }) => yd(n, e), ku = () => ({ state: n, dispatch: e }) => Ho(n, e), xu = () => ({ state: n, dispatch: e }) => Ko(n, e), Su = () => ({ state: n, dispatch: e, tr: t }) => {
11496
11496
  try {
11497
11497
  const r = Pn(n.doc, n.selection.$from.pos, -1);
11498
11498
  return r == null ? !1 : (t.join(r, 2), e && e(t), !0);
11499
11499
  } catch {
11500
11500
  return !1;
11501
11501
  }
11502
- }, Su = () => ({ state: n, dispatch: e, tr: t }) => {
11502
+ }, Mu = () => ({ state: n, dispatch: e, tr: t }) => {
11503
11503
  try {
11504
11504
  const r = Pn(n.doc, n.selection.$from.pos, 1);
11505
11505
  return r == null ? !1 : (t.join(r, 2), e && e(t), !0);
11506
11506
  } catch {
11507
11507
  return !1;
11508
11508
  }
11509
- }, Mu = () => ({ state: n, dispatch: e }) => hd(n, e), wu = () => ({ state: n, dispatch: e }) => pd(n, e);
11509
+ }, wu = () => ({ state: n, dispatch: e }) => pd(n, e), Cu = () => ({ state: n, dispatch: e }) => md(n, e);
11510
11510
  function ol() {
11511
11511
  return typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1;
11512
11512
  }
11513
- function Cu(n) {
11513
+ function Tu(n) {
11514
11514
  const e = n.split(/-(?!$)/);
11515
11515
  let t = e[e.length - 1];
11516
11516
  t === "Space" && (t = " ");
@@ -11532,8 +11532,8 @@ function Cu(n) {
11532
11532
  }
11533
11533
  return r && (t = `Alt-${t}`), i && (t = `Ctrl-${t}`), o && (t = `Meta-${t}`), s && (t = `Shift-${t}`), t;
11534
11534
  }
11535
- const Tu = (n) => ({ editor: e, view: t, tr: r, dispatch: i }) => {
11536
- const s = Cu(n).split(/-(?!$)/), o = s.find((c) => !["Alt", "Ctrl", "Meta", "Shift"].includes(c)), l = new KeyboardEvent("keydown", {
11535
+ const Ou = (n) => ({ editor: e, view: t, tr: r, dispatch: i }) => {
11536
+ const s = Tu(n).split(/-(?!$)/), o = s.find((c) => !["Alt", "Ctrl", "Meta", "Shift"].includes(c)), l = new KeyboardEvent("keydown", {
11537
11537
  key: o === "Space" ? " " : o,
11538
11538
  altKey: s.includes("Alt"),
11539
11539
  ctrlKey: s.includes("Ctrl"),
@@ -11564,13 +11564,13 @@ function Wt(n, e, t = {}) {
11564
11564
  const a = i - r, c = l.filter((u) => o ? o.name === u.node.type.name : !0).filter((u) => On(u.node.attrs, t, { strict: !1 }));
11565
11565
  return s ? !!c.length : c.reduce((u, f) => u + f.to - f.from, 0) >= a;
11566
11566
  }
11567
- const Ou = (n, e = {}) => ({ state: t, dispatch: r }) => {
11567
+ const vu = (n, e = {}) => ({ state: t, dispatch: r }) => {
11568
11568
  const i = H(n, t.schema);
11569
- return Wt(t, i, e) ? yd(t, r) : !1;
11570
- }, vu = () => ({ state: n, dispatch: e }) => Go(n, e), Eu = (n) => ({ state: e, dispatch: t }) => {
11569
+ return Wt(t, i, e) ? bd(t, r) : !1;
11570
+ }, Eu = () => ({ state: n, dispatch: e }) => Go(n, e), Nu = (n) => ({ state: e, dispatch: t }) => {
11571
11571
  const r = H(n, e.schema);
11572
- return Nd(r)(e, t);
11573
- }, Nu = () => ({ state: n, dispatch: e }) => Uo(n, e);
11572
+ return Ad(r)(e, t);
11573
+ }, Au = () => ({ state: n, dispatch: e }) => Uo(n, e);
11574
11574
  function Kn(n, e) {
11575
11575
  return e.nodes[n] ? "node" : e.marks[n] ? "mark" : null;
11576
11576
  }
@@ -11578,7 +11578,7 @@ function hs(n, e) {
11578
11578
  const t = typeof e == "string" ? [e] : e;
11579
11579
  return Object.keys(n).reduce((r, i) => (t.includes(i) || (r[i] = n[i]), r), {});
11580
11580
  }
11581
- const Au = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
11581
+ const Du = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
11582
11582
  let s = null, o = null;
11583
11583
  const l = Kn(typeof n == "string" ? n : n.name, r.schema);
11584
11584
  return l ? (l === "node" && (s = H(n, r.schema)), l === "mark" && (o = Je(n, r.schema)), i && t.selection.ranges.forEach((a) => {
@@ -11588,13 +11588,13 @@ const Au = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
11588
11588
  });
11589
11589
  });
11590
11590
  }), !0) : !1;
11591
- }, Du = () => ({ tr: n, dispatch: e }) => (e && n.scrollIntoView(), !0), Iu = () => ({ tr: n, dispatch: e }) => {
11591
+ }, Iu = () => ({ tr: n, dispatch: e }) => (e && n.scrollIntoView(), !0), Ru = () => ({ tr: n, dispatch: e }) => {
11592
11592
  if (e) {
11593
11593
  const t = new ce(n.doc);
11594
11594
  n.setSelection(t);
11595
11595
  }
11596
11596
  return !0;
11597
- }, Ru = () => ({ state: n, dispatch: e }) => qo(n, e), Pu = () => ({ state: n, dispatch: e }) => Jo(n, e), Bu = () => ({ state: n, dispatch: e }) => Sd(n, e), Lu = () => ({ state: n, dispatch: e }) => Cd(n, e), zu = () => ({ state: n, dispatch: e }) => wd(n, e);
11597
+ }, Pu = () => ({ state: n, dispatch: e }) => qo(n, e), Bu = () => ({ state: n, dispatch: e }) => Jo(n, e), Lu = () => ({ state: n, dispatch: e }) => Md(n, e), zu = () => ({ state: n, dispatch: e }) => Td(n, e), Fu = () => ({ state: n, dispatch: e }) => Cd(n, e);
11598
11598
  function Rr(n, e, t = {}, r = {}) {
11599
11599
  return Ht(n, e, {
11600
11600
  slice: !1,
@@ -11602,7 +11602,7 @@ function Rr(n, e, t = {}, r = {}) {
11602
11602
  errorOnInvalidContent: r.errorOnInvalidContent
11603
11603
  });
11604
11604
  }
11605
- const Fu = (n, e = !1, t = {}, r = {}) => ({ editor: i, tr: s, dispatch: o, commands: l }) => {
11605
+ const $u = (n, e = !1, t = {}, r = {}) => ({ editor: i, tr: s, dispatch: o, commands: l }) => {
11606
11606
  var a, c;
11607
11607
  const { doc: d } = s;
11608
11608
  if (t.preserveWhitespace !== "full") {
@@ -11624,7 +11624,7 @@ function ll(n, e) {
11624
11624
  const l = o.find((a) => a.type.name === t.name);
11625
11625
  return l ? { ...l.attrs } : {};
11626
11626
  }
11627
- function $u(n) {
11627
+ function Vu(n) {
11628
11628
  for (let e = 0; e < n.edgeCount; e += 1) {
11629
11629
  const { type: t } = n.edge(e);
11630
11630
  if (t.isTextblock && !t.hasRequiredAttrs())
@@ -11632,7 +11632,7 @@ function $u(n) {
11632
11632
  }
11633
11633
  return null;
11634
11634
  }
11635
- function Vu(n, e) {
11635
+ function Hu(n, e) {
11636
11636
  for (let t = n.depth; t > 0; t -= 1) {
11637
11637
  const r = n.node(t);
11638
11638
  if (e(r))
@@ -11645,16 +11645,16 @@ function Vu(n, e) {
11645
11645
  }
11646
11646
  }
11647
11647
  function ii(n) {
11648
- return (e) => Vu(e.$from, n);
11648
+ return (e) => Hu(e.$from, n);
11649
11649
  }
11650
- function Hu(n, e) {
11650
+ function Wu(n, e) {
11651
11651
  const t = {
11652
11652
  from: 0,
11653
11653
  to: n.content.size
11654
11654
  };
11655
11655
  return el(n, t, e);
11656
11656
  }
11657
- function Wu(n, e) {
11657
+ function qu(n, e) {
11658
11658
  const t = H(e, n.schema), { from: r, to: i } = n.selection, s = [];
11659
11659
  n.doc.nodesBetween(r, i, (l) => {
11660
11660
  s.push(l);
@@ -11662,9 +11662,9 @@ function Wu(n, e) {
11662
11662
  const o = s.reverse().find((l) => l.type.name === t.name);
11663
11663
  return o ? { ...o.attrs } : {};
11664
11664
  }
11665
- function qu(n, e) {
11665
+ function ju(n, e) {
11666
11666
  const t = Kn(typeof e == "string" ? e : e.name, n.schema);
11667
- return t === "node" ? Wu(n, e) : t === "mark" ? ll(n, e) : {};
11667
+ return t === "node" ? qu(n, e) : t === "mark" ? ll(n, e) : {};
11668
11668
  }
11669
11669
  function al(n, e, t) {
11670
11670
  const r = [];
@@ -11711,7 +11711,7 @@ function Pr(n, e, t = {}) {
11711
11711
  const a = l.filter((u) => s ? s.name === u.mark.type.name : !0).filter((u) => On(u.mark.attrs, t, { strict: !1 })).reduce((u, f) => u + f.to - f.from, 0), c = l.filter((u) => s ? u.mark.type !== s && u.mark.type.excludes(s) : !0).reduce((u, f) => u + f.to - f.from, 0);
11712
11712
  return (a > 0 ? a + c : a) >= o;
11713
11713
  }
11714
- function ju(n, e, t = {}) {
11714
+ function Ku(n, e, t = {}) {
11715
11715
  if (!e)
11716
11716
  return Wt(n, null, t) || Pr(n, null, t);
11717
11717
  const r = Kn(e, n.schema);
@@ -11750,10 +11750,10 @@ function si(n, { checkChildren: e = !0, ignoreWhitespace: t = !1 } = {}) {
11750
11750
  }
11751
11751
  return !1;
11752
11752
  }
11753
- function Ku(n) {
11753
+ function Ju(n) {
11754
11754
  return n instanceof S;
11755
11755
  }
11756
- function Ju(n, e, t) {
11756
+ function Uu(n, e, t) {
11757
11757
  var r;
11758
11758
  const { selection: i } = e;
11759
11759
  let s = null;
@@ -11775,7 +11775,7 @@ function Ju(n, e, t) {
11775
11775
  }), c;
11776
11776
  });
11777
11777
  }
11778
- const Uu = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
11778
+ const _u = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
11779
11779
  const { selection: s } = t, { empty: o, ranges: l } = s, a = Je(n, r.schema);
11780
11780
  if (i)
11781
11781
  if (o) {
@@ -11797,26 +11797,26 @@ const Uu = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
11797
11797
  }) : t.addMark(p, m, a.create(e));
11798
11798
  });
11799
11799
  });
11800
- return Ju(r, t, a);
11801
- }, _u = (n, e) => ({ tr: t }) => (t.setMeta(n, e), !0), Gu = (n, e = {}) => ({ state: t, dispatch: r, chain: i }) => {
11800
+ return Uu(r, t, a);
11801
+ }, Gu = (n, e) => ({ tr: t }) => (t.setMeta(n, e), !0), Xu = (n, e = {}) => ({ state: t, dispatch: r, chain: i }) => {
11802
11802
  const s = H(n, t.schema);
11803
11803
  let o;
11804
11804
  return t.selection.$anchor.sameParent(t.selection.$head) && (o = t.selection.$anchor.parent.attrs), s.isTextblock ? i().command(({ commands: l }) => ls(s, { ...o, ...e })(t) ? !0 : l.clearNodes()).command(({ state: l }) => ls(s, { ...o, ...e })(l, r)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
11805
- }, Xu = (n) => ({ tr: e, dispatch: t }) => {
11805
+ }, Yu = (n) => ({ tr: e, dispatch: t }) => {
11806
11806
  if (t) {
11807
11807
  const { doc: r } = e, i = Ye(n, 0, r.content.size), s = S.create(r, i);
11808
11808
  e.setSelection(s);
11809
11809
  }
11810
11810
  return !0;
11811
- }, Yu = (n) => ({ tr: e, dispatch: t }) => {
11811
+ }, Zu = (n) => ({ tr: e, dispatch: t }) => {
11812
11812
  if (t) {
11813
11813
  const { doc: r } = e, { from: i, to: s } = typeof n == "number" ? { from: n, to: n } : n, o = M.atStart(r).from, l = M.atEnd(r).to, a = Ye(i, o, l), c = Ye(s, o, l), d = M.create(r, a, c);
11814
11814
  e.setSelection(d);
11815
11815
  }
11816
11816
  return !0;
11817
- }, Zu = (n) => ({ state: e, dispatch: t }) => {
11817
+ }, Qu = (n) => ({ state: e, dispatch: t }) => {
11818
11818
  const r = H(n, e.schema);
11819
- return Id(r)(e, t);
11819
+ return Rd(r)(e, t);
11820
11820
  };
11821
11821
  function ms(n, e) {
11822
11822
  const t = n.storedMarks || n.selection.$to.parentOffset && n.selection.$from.marks();
@@ -11825,13 +11825,13 @@ function ms(n, e) {
11825
11825
  n.tr.ensureMarks(r);
11826
11826
  }
11827
11827
  }
11828
- const Qu = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor: i }) => {
11828
+ const ef = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor: i }) => {
11829
11829
  const { selection: s, doc: o } = e, { $from: l, $to: a } = s, c = i.extensionManager.attributes, d = un(c, l.node().type.name, l.node().attrs);
11830
11830
  if (s instanceof S && s.node.isBlock)
11831
11831
  return !l.parentOffset || !Ee(o, l.pos) ? !1 : (r && (n && ms(t, i.extensionManager.splittableMarks), e.split(l.pos).scrollIntoView()), !0);
11832
11832
  if (!l.parent.isBlock)
11833
11833
  return !1;
11834
- const u = a.parentOffset === a.parent.content.size, f = l.depth === 0 ? void 0 : $u(l.node(-1).contentMatchAt(l.indexAfter(-1)));
11834
+ const u = a.parentOffset === a.parent.content.size, f = l.depth === 0 ? void 0 : Vu(l.node(-1).contentMatchAt(l.indexAfter(-1)));
11835
11835
  let h = u && f ? [
11836
11836
  {
11837
11837
  type: f,
@@ -11851,7 +11851,7 @@ const Qu = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
11851
11851
  n && ms(t, i.extensionManager.splittableMarks), e.scrollIntoView();
11852
11852
  }
11853
11853
  return p;
11854
- }, ef = (n, e = {}) => ({ tr: t, state: r, dispatch: i, editor: s }) => {
11854
+ }, tf = (n, e = {}) => ({ tr: t, state: r, dispatch: i, editor: s }) => {
11855
11855
  var o;
11856
11856
  const l = H(n, r.schema), { $from: a, $to: c } = r.selection, d = r.selection.node;
11857
11857
  if (d && d.isBlock || a.depth < 2 || !a.sameParent(c))
@@ -11924,7 +11924,7 @@ const Qu = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
11924
11924
  return !0;
11925
11925
  const i = n.doc.nodeAt(r);
11926
11926
  return t.node.type === (i == null ? void 0 : i.type) && je(n.doc, r) && n.join(r), !0;
11927
- }, tf = (n, e, t, r = {}) => ({ editor: i, tr: s, state: o, dispatch: l, chain: a, commands: c, can: d }) => {
11927
+ }, nf = (n, e, t, r = {}) => ({ editor: i, tr: s, state: o, dispatch: l, chain: a, commands: c, can: d }) => {
11928
11928
  const { extensions: u, splittableMarks: f } = i.extensionManager, h = H(n, o.schema), p = H(e, o.schema), { selection: m, storedMarks: g } = o, { $from: y, $to: T } = m, w = y.blockRange(T), I = g || m.$to.parentOffset && m.$from.marks();
11929
11929
  if (!w)
11930
11930
  return !1;
@@ -11939,17 +11939,17 @@ const Qu = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
11939
11939
  const L = d().wrapInList(h, r), C = I.filter((N) => f.includes(N.type.name));
11940
11940
  return s.ensureMarks(C), L ? !0 : c.clearNodes();
11941
11941
  }).wrapInList(h, r).command(() => cr(s, h)).command(() => dr(s, h)).run();
11942
- }, nf = (n, e = {}, t = {}) => ({ state: r, commands: i }) => {
11942
+ }, rf = (n, e = {}, t = {}) => ({ state: r, commands: i }) => {
11943
11943
  const { extendEmptyMarkRange: s = !1 } = t, o = Je(n, r.schema);
11944
11944
  return Pr(r, o, e) ? i.unsetMark(o, { extendEmptyMarkRange: s }) : i.setMark(o, e);
11945
- }, rf = (n, e, t = {}) => ({ state: r, commands: i }) => {
11945
+ }, sf = (n, e, t = {}) => ({ state: r, commands: i }) => {
11946
11946
  const s = H(n, r.schema), o = H(e, r.schema), l = Wt(r, s, t);
11947
11947
  let a;
11948
11948
  return r.selection.$anchor.sameParent(r.selection.$head) && (a = r.selection.$anchor.parent.attrs), l ? i.setNode(o, a) : i.setNode(s, { ...a, ...t });
11949
- }, sf = (n, e = {}) => ({ state: t, commands: r }) => {
11949
+ }, of = (n, e = {}) => ({ state: t, commands: r }) => {
11950
11950
  const i = H(n, t.schema);
11951
11951
  return Wt(t, i, e) ? r.lift(i) : r.wrapIn(i, e);
11952
- }, of = () => ({ state: n, dispatch: e }) => {
11952
+ }, lf = () => ({ state: n, dispatch: e }) => {
11953
11953
  const t = n.plugins;
11954
11954
  for (let r = 0; r < t.length; r += 1) {
11955
11955
  const i = t[r];
@@ -11969,12 +11969,12 @@ const Qu = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
11969
11969
  }
11970
11970
  }
11971
11971
  return !1;
11972
- }, lf = () => ({ tr: n, dispatch: e }) => {
11972
+ }, af = () => ({ tr: n, dispatch: e }) => {
11973
11973
  const { selection: t } = n, { empty: r, ranges: i } = t;
11974
11974
  return r || e && i.forEach((s) => {
11975
11975
  n.removeMark(s.$from.pos, s.$to.pos);
11976
11976
  }), !0;
11977
- }, af = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
11977
+ }, cf = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
11978
11978
  var s;
11979
11979
  const { extendEmptyMarkRange: o = !1 } = e, { selection: l } = t, a = Je(n, r.schema), { $from: c, empty: d, ranges: u } = l;
11980
11980
  if (!i)
@@ -11988,7 +11988,7 @@ const Qu = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
11988
11988
  t.removeMark(f.$from.pos, f.$to.pos, a);
11989
11989
  });
11990
11990
  return t.removeStoredMark(a), !0;
11991
- }, cf = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
11991
+ }, df = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
11992
11992
  let s = null, o = null;
11993
11993
  const l = Kn(typeof n == "string" ? n : n.name, r.schema);
11994
11994
  return l ? (l === "node" && (s = H(n, r.schema)), l === "mark" && (o = Je(n, r.schema)), i && t.selection.ranges.forEach((a) => {
@@ -12019,82 +12019,82 @@ const Qu = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12019
12019
  }));
12020
12020
  }));
12021
12021
  }), !0) : !1;
12022
- }, df = (n, e = {}) => ({ state: t, dispatch: r }) => {
12023
- const i = H(n, t.schema);
12024
- return Td(i, e)(t, r);
12025
12022
  }, uf = (n, e = {}) => ({ state: t, dispatch: r }) => {
12026
12023
  const i = H(n, t.schema);
12027
12024
  return Od(i, e)(t, r);
12025
+ }, ff = (n, e = {}) => ({ state: t, dispatch: r }) => {
12026
+ const i = H(n, t.schema);
12027
+ return vd(i, e)(t, r);
12028
12028
  };
12029
- var ff = /* @__PURE__ */ Object.freeze({
12029
+ var hf = /* @__PURE__ */ Object.freeze({
12030
12030
  __proto__: null,
12031
- blur: Gd,
12032
- clearContent: Xd,
12033
- clearNodes: Yd,
12034
- command: Zd,
12035
- createParagraphNear: Qd,
12036
- cut: eu,
12037
- deleteCurrentNode: tu,
12038
- deleteNode: nu,
12039
- deleteRange: ru,
12040
- deleteSelection: iu,
12041
- enter: su,
12042
- exitCode: ou,
12043
- extendMarkRange: lu,
12044
- first: au,
12045
- focus: du,
12046
- forEach: uu,
12047
- insertContent: fu,
12048
- insertContentAt: mu,
12049
- joinBackward: bu,
12050
- joinDown: yu,
12051
- joinForward: ku,
12052
- joinItemBackward: xu,
12053
- joinItemForward: Su,
12054
- joinTextblockBackward: Mu,
12055
- joinTextblockForward: wu,
12056
- joinUp: gu,
12057
- keyboardShortcut: Tu,
12058
- lift: Ou,
12059
- liftEmptyBlock: vu,
12060
- liftListItem: Eu,
12061
- newlineInCode: Nu,
12062
- resetAttributes: Au,
12063
- scrollIntoView: Du,
12064
- selectAll: Iu,
12065
- selectNodeBackward: Ru,
12066
- selectNodeForward: Pu,
12067
- selectParentNode: Bu,
12068
- selectTextblockEnd: Lu,
12069
- selectTextblockStart: zu,
12070
- setContent: Fu,
12071
- setMark: Uu,
12072
- setMeta: _u,
12073
- setNode: Gu,
12074
- setNodeSelection: Xu,
12075
- setTextSelection: Yu,
12076
- sinkListItem: Zu,
12077
- splitBlock: Qu,
12078
- splitListItem: ef,
12079
- toggleList: tf,
12080
- toggleMark: nf,
12081
- toggleNode: rf,
12082
- toggleWrap: sf,
12083
- undoInputRule: of,
12084
- unsetAllMarks: lf,
12085
- unsetMark: af,
12086
- updateAttributes: cf,
12087
- wrapIn: df,
12088
- wrapInList: uf
12031
+ blur: Xd,
12032
+ clearContent: Yd,
12033
+ clearNodes: Zd,
12034
+ command: Qd,
12035
+ createParagraphNear: eu,
12036
+ cut: tu,
12037
+ deleteCurrentNode: nu,
12038
+ deleteNode: ru,
12039
+ deleteRange: iu,
12040
+ deleteSelection: su,
12041
+ enter: ou,
12042
+ exitCode: lu,
12043
+ extendMarkRange: au,
12044
+ first: cu,
12045
+ focus: uu,
12046
+ forEach: fu,
12047
+ insertContent: hu,
12048
+ insertContentAt: gu,
12049
+ joinBackward: ku,
12050
+ joinDown: bu,
12051
+ joinForward: xu,
12052
+ joinItemBackward: Su,
12053
+ joinItemForward: Mu,
12054
+ joinTextblockBackward: wu,
12055
+ joinTextblockForward: Cu,
12056
+ joinUp: yu,
12057
+ keyboardShortcut: Ou,
12058
+ lift: vu,
12059
+ liftEmptyBlock: Eu,
12060
+ liftListItem: Nu,
12061
+ newlineInCode: Au,
12062
+ resetAttributes: Du,
12063
+ scrollIntoView: Iu,
12064
+ selectAll: Ru,
12065
+ selectNodeBackward: Pu,
12066
+ selectNodeForward: Bu,
12067
+ selectParentNode: Lu,
12068
+ selectTextblockEnd: zu,
12069
+ selectTextblockStart: Fu,
12070
+ setContent: $u,
12071
+ setMark: _u,
12072
+ setMeta: Gu,
12073
+ setNode: Xu,
12074
+ setNodeSelection: Yu,
12075
+ setTextSelection: Zu,
12076
+ sinkListItem: Qu,
12077
+ splitBlock: ef,
12078
+ splitListItem: tf,
12079
+ toggleList: nf,
12080
+ toggleMark: rf,
12081
+ toggleNode: sf,
12082
+ toggleWrap: of,
12083
+ undoInputRule: lf,
12084
+ unsetAllMarks: af,
12085
+ unsetMark: cf,
12086
+ updateAttributes: df,
12087
+ wrapIn: uf,
12088
+ wrapInList: ff
12089
12089
  });
12090
- const hf = G.create({
12090
+ const pf = G.create({
12091
12091
  name: "commands",
12092
12092
  addCommands() {
12093
12093
  return {
12094
- ...ff
12094
+ ...hf
12095
12095
  };
12096
12096
  }
12097
- }), pf = G.create({
12097
+ }), mf = G.create({
12098
12098
  name: "drop",
12099
12099
  addProseMirrorPlugins() {
12100
12100
  return [
@@ -12113,7 +12113,7 @@ const hf = G.create({
12113
12113
  })
12114
12114
  ];
12115
12115
  }
12116
- }), mf = G.create({
12116
+ }), gf = G.create({
12117
12117
  name: "editable",
12118
12118
  addProseMirrorPlugins() {
12119
12119
  return [
@@ -12125,13 +12125,13 @@ const hf = G.create({
12125
12125
  })
12126
12126
  ];
12127
12127
  }
12128
- }), gf = new we("focusEvents"), yf = G.create({
12128
+ }), yf = new we("focusEvents"), bf = G.create({
12129
12129
  name: "focusEvents",
12130
12130
  addProseMirrorPlugins() {
12131
12131
  const { editor: n } = this;
12132
12132
  return [
12133
12133
  new se({
12134
- key: gf,
12134
+ key: yf,
12135
12135
  props: {
12136
12136
  handleDOMEvents: {
12137
12137
  focus: (e, t) => {
@@ -12149,7 +12149,7 @@ const hf = G.create({
12149
12149
  })
12150
12150
  ];
12151
12151
  }
12152
- }), bf = G.create({
12152
+ }), kf = G.create({
12153
12153
  name: "keymap",
12154
12154
  addKeyboardShortcuts() {
12155
12155
  const n = () => this.editor.commands.first(({ commands: o }) => [
@@ -12227,7 +12227,7 @@ const hf = G.create({
12227
12227
  })
12228
12228
  ];
12229
12229
  }
12230
- }), kf = G.create({
12230
+ }), xf = G.create({
12231
12231
  name: "paste",
12232
12232
  addProseMirrorPlugins() {
12233
12233
  return [
@@ -12245,7 +12245,7 @@ const hf = G.create({
12245
12245
  })
12246
12246
  ];
12247
12247
  }
12248
- }), xf = G.create({
12248
+ }), Sf = G.create({
12249
12249
  name: "tabindex",
12250
12250
  addProseMirrorPlugins() {
12251
12251
  return [
@@ -12384,7 +12384,7 @@ class _e {
12384
12384
  }), this.editor.view.dispatch(t);
12385
12385
  }
12386
12386
  }
12387
- const Sf = `.ProseMirror {
12387
+ const Mf = `.ProseMirror {
12388
12388
  position: relative;
12389
12389
  }
12390
12390
 
@@ -12459,14 +12459,14 @@ img.ProseMirror-separator {
12459
12459
  .tippy-box[data-animation=fade][data-state=hidden] {
12460
12460
  opacity: 0
12461
12461
  }`;
12462
- function Mf(n, e, t) {
12462
+ function wf(n, e, t) {
12463
12463
  const r = document.querySelector("style[data-tiptap-style]");
12464
12464
  if (r !== null)
12465
12465
  return r;
12466
12466
  const i = document.createElement("style");
12467
12467
  return e && i.setAttribute("nonce", e), i.setAttribute("data-tiptap-style", ""), i.innerHTML = n, document.getElementsByTagName("head")[0].appendChild(i), i;
12468
12468
  }
12469
- class wf extends Rd {
12469
+ class Cf extends Pd {
12470
12470
  constructor(e = {}) {
12471
12471
  super(), this.isFocused = !1, this.isInitialized = !1, this.extensionStorage = {}, this.options = {
12472
12472
  element: document.createElement("div"),
@@ -12529,7 +12529,7 @@ class wf extends Rd {
12529
12529
  * Inject CSS styles.
12530
12530
  */
12531
12531
  injectCSS() {
12532
- this.options.injectCSS && document && (this.css = Mf(Sf, this.options.injectNonce));
12532
+ this.options.injectCSS && document && (this.css = wf(Mf, this.options.injectNonce));
12533
12533
  }
12534
12534
  /**
12535
12535
  * Update editor options.
@@ -12598,16 +12598,16 @@ class wf extends Rd {
12598
12598
  createExtensionManager() {
12599
12599
  var e, t;
12600
12600
  const i = [...this.options.enableCoreExtensions ? [
12601
- mf,
12602
- _d.configure({
12601
+ gf,
12602
+ Gd.configure({
12603
12603
  blockSeparator: (t = (e = this.options.coreExtensionOptions) === null || e === void 0 ? void 0 : e.clipboardTextSerializer) === null || t === void 0 ? void 0 : t.blockSeparator
12604
12604
  }),
12605
- hf,
12606
- yf,
12607
- bf,
12608
- xf,
12609
12605
  pf,
12610
- kf
12606
+ bf,
12607
+ kf,
12608
+ Sf,
12609
+ mf,
12610
+ xf
12611
12611
  ].filter((s) => typeof this.options.enableCoreExtensions == "object" ? this.options.enableCoreExtensions[s.name] !== !1 : !0) : [], ...this.options.extensions].filter((s) => ["extension", "node", "mark"].includes(s == null ? void 0 : s.type));
12612
12612
  this.extensionManager = new gt(i, this);
12613
12613
  }
@@ -12733,11 +12733,11 @@ class wf extends Rd {
12733
12733
  * Get attributes of the currently selected node or mark.
12734
12734
  */
12735
12735
  getAttributes(e) {
12736
- return qu(this.state, e);
12736
+ return ju(this.state, e);
12737
12737
  }
12738
12738
  isActive(e, t) {
12739
12739
  const r = typeof e == "string" ? e : null, i = typeof e == "string" ? t : e;
12740
- return ju(this.state, r, i);
12740
+ return Ku(this.state, r, i);
12741
12741
  }
12742
12742
  /**
12743
12743
  * Get the document as JSON.
@@ -12758,7 +12758,7 @@ class wf extends Rd {
12758
12758
  const { blockSeparator: t = `
12759
12759
 
12760
12760
  `, textSerializers: r = {} } = e || {};
12761
- return Hu(this.state.doc, {
12761
+ return Wu(this.state.doc, {
12762
12762
  blockSeparator: t,
12763
12763
  textSerializers: {
12764
12764
  ...tl(this.schema),
@@ -12923,7 +12923,7 @@ class ne {
12923
12923
  }
12924
12924
  }
12925
12925
  function ct(n) {
12926
- return new Wd({
12926
+ return new qd({
12927
12927
  find: n.find,
12928
12928
  handler: ({ state: e, range: t, match: r, pasteEvent: i }) => {
12929
12929
  const s = E(n.getAttributes, void 0, r, i);
@@ -12940,7 +12940,7 @@ function ct(n) {
12940
12940
  }
12941
12941
  });
12942
12942
  }
12943
- function Cf(n, e) {
12943
+ function Tf(n, e) {
12944
12944
  const { selection: t } = n, { $from: r } = t;
12945
12945
  if (t instanceof S) {
12946
12946
  const s = r.index();
@@ -12955,7 +12955,7 @@ function Cf(n, e) {
12955
12955
  }
12956
12956
  return !1;
12957
12957
  }
12958
- const Tf = /^\s*>\s$/, Of = ne.create({
12958
+ const Of = /^\s*>\s$/, vf = ne.create({
12959
12959
  name: "blockquote",
12960
12960
  addOptions() {
12961
12961
  return {
@@ -12988,12 +12988,12 @@ const Tf = /^\s*>\s$/, Of = ne.create({
12988
12988
  addInputRules() {
12989
12989
  return [
12990
12990
  qt({
12991
- find: Tf,
12991
+ find: Of,
12992
12992
  type: this.type
12993
12993
  })
12994
12994
  ];
12995
12995
  }
12996
- }), vf = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Ef = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, Nf = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, Af = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, Df = Me.create({
12996
+ }), Ef = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Nf = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, Af = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, Df = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, If = Me.create({
12997
12997
  name: "bold",
12998
12998
  addOptions() {
12999
12999
  return {
@@ -13038,11 +13038,11 @@ const Tf = /^\s*>\s$/, Of = ne.create({
13038
13038
  addInputRules() {
13039
13039
  return [
13040
13040
  at({
13041
- find: vf,
13041
+ find: Ef,
13042
13042
  type: this.type
13043
13043
  }),
13044
13044
  at({
13045
- find: Nf,
13045
+ find: Af,
13046
13046
  type: this.type
13047
13047
  })
13048
13048
  ];
@@ -13050,16 +13050,16 @@ const Tf = /^\s*>\s$/, Of = ne.create({
13050
13050
  addPasteRules() {
13051
13051
  return [
13052
13052
  ct({
13053
- find: Ef,
13053
+ find: Nf,
13054
13054
  type: this.type
13055
13055
  }),
13056
13056
  ct({
13057
- find: Af,
13057
+ find: Df,
13058
13058
  type: this.type
13059
13059
  })
13060
13060
  ];
13061
13061
  }
13062
- }), If = "listItem", gs = "textStyle", ys = /^\s*([-+*])\s$/, Rf = ne.create({
13062
+ }), Rf = "listItem", gs = "textStyle", ys = /^\s*([-+*])\s$/, Pf = ne.create({
13063
13063
  name: "bulletList",
13064
13064
  addOptions() {
13065
13065
  return {
@@ -13083,7 +13083,7 @@ const Tf = /^\s*>\s$/, Of = ne.create({
13083
13083
  },
13084
13084
  addCommands() {
13085
13085
  return {
13086
- toggleBulletList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(If, this.editor.getAttributes(gs)).run() : n.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
13086
+ toggleBulletList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(Rf, this.editor.getAttributes(gs)).run() : n.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
13087
13087
  };
13088
13088
  },
13089
13089
  addKeyboardShortcuts() {
@@ -13107,7 +13107,7 @@ const Tf = /^\s*>\s$/, Of = ne.create({
13107
13107
  n
13108
13108
  ];
13109
13109
  }
13110
- }), Pf = /(^|[^`])`([^`]+)`(?!`)/, Bf = /(^|[^`])`([^`]+)`(?!`)/g, Lf = Me.create({
13110
+ }), Bf = /(^|[^`])`([^`]+)`(?!`)/, Lf = /(^|[^`])`([^`]+)`(?!`)/g, zf = Me.create({
13111
13111
  name: "code",
13112
13112
  addOptions() {
13113
13113
  return {
@@ -13140,7 +13140,7 @@ const Tf = /^\s*>\s$/, Of = ne.create({
13140
13140
  addInputRules() {
13141
13141
  return [
13142
13142
  at({
13143
- find: Pf,
13143
+ find: Bf,
13144
13144
  type: this.type
13145
13145
  })
13146
13146
  ];
@@ -13148,12 +13148,12 @@ const Tf = /^\s*>\s$/, Of = ne.create({
13148
13148
  addPasteRules() {
13149
13149
  return [
13150
13150
  ct({
13151
- find: Bf,
13151
+ find: Lf,
13152
13152
  type: this.type
13153
13153
  })
13154
13154
  ];
13155
13155
  }
13156
- }), zf = /^```([a-z]+)?[\s\n]$/, Ff = /^~~~([a-z]+)?[\s\n]$/, $f = ne.create({
13156
+ }), Ff = /^```([a-z]+)?[\s\n]$/, $f = /^~~~([a-z]+)?[\s\n]$/, Vf = ne.create({
13157
13157
  name: "codeBlock",
13158
13158
  addOptions() {
13159
13159
  return {
@@ -13244,14 +13244,14 @@ const Tf = /^\s*>\s$/, Of = ne.create({
13244
13244
  addInputRules() {
13245
13245
  return [
13246
13246
  Br({
13247
- find: zf,
13247
+ find: Ff,
13248
13248
  type: this.type,
13249
13249
  getAttributes: (n) => ({
13250
13250
  language: n[1]
13251
13251
  })
13252
13252
  }),
13253
13253
  Br({
13254
- find: Ff,
13254
+ find: $f,
13255
13255
  type: this.type,
13256
13256
  getAttributes: (n) => ({
13257
13257
  language: n[1]
@@ -13280,19 +13280,19 @@ const Tf = /^\s*>\s$/, Of = ne.create({
13280
13280
  })
13281
13281
  ];
13282
13282
  }
13283
- }), Vf = ne.create({
13283
+ }), Hf = ne.create({
13284
13284
  name: "doc",
13285
13285
  topNode: !0,
13286
13286
  content: "block+"
13287
13287
  });
13288
- function Hf(n = {}) {
13288
+ function Wf(n = {}) {
13289
13289
  return new se({
13290
13290
  view(e) {
13291
- return new Wf(e, n);
13291
+ return new qf(e, n);
13292
13292
  }
13293
13293
  });
13294
13294
  }
13295
- class Wf {
13295
+ class qf {
13296
13296
  constructor(e, t) {
13297
13297
  var r;
13298
13298
  this.editorView = e, this.cursorPos = null, this.element = null, this.timeout = -1, this.width = (r = t.width) !== null && r !== void 0 ? r : 1, this.color = t.color === !1 ? void 0 : t.color || "black", this.class = t.class, this.handlers = ["dragover", "dragend", "drop", "dragleave"].map((i) => {
@@ -13366,7 +13366,7 @@ class Wf {
13366
13366
  this.editorView.dom.contains(e.relatedTarget) || this.setCursor(null);
13367
13367
  }
13368
13368
  }
13369
- const qf = G.create({
13369
+ const jf = G.create({
13370
13370
  name: "dropCursor",
13371
13371
  addOptions() {
13372
13372
  return {
@@ -13377,7 +13377,7 @@ const qf = G.create({
13377
13377
  },
13378
13378
  addProseMirrorPlugins() {
13379
13379
  return [
13380
- Hf(this.options)
13380
+ Wf(this.options)
13381
13381
  ];
13382
13382
  }
13383
13383
  });
@@ -13420,7 +13420,7 @@ class R extends v {
13420
13420
  */
13421
13421
  static valid(e) {
13422
13422
  let t = e.parent;
13423
- if (t.inlineContent || !jf(e) || !Kf(e))
13423
+ if (t.inlineContent || !Kf(e) || !Jf(e))
13424
13424
  return !1;
13425
13425
  let r = t.type.spec.allowGapCursor;
13426
13426
  if (r != null)
@@ -13484,7 +13484,7 @@ class oi {
13484
13484
  function dl(n) {
13485
13485
  return n.isAtom || n.spec.isolating || n.spec.createGapCursor;
13486
13486
  }
13487
- function jf(n) {
13487
+ function Kf(n) {
13488
13488
  for (let e = n.depth; e >= 0; e--) {
13489
13489
  let t = n.index(e), r = n.node(e);
13490
13490
  if (t == 0) {
@@ -13501,7 +13501,7 @@ function jf(n) {
13501
13501
  }
13502
13502
  return !0;
13503
13503
  }
13504
- function Kf(n) {
13504
+ function Jf(n) {
13505
13505
  for (let e = n.depth; e >= 0; e--) {
13506
13506
  let t = n.indexAfter(e), r = n.node(e);
13507
13507
  if (t == r.childCount) {
@@ -13518,20 +13518,20 @@ function Kf(n) {
13518
13518
  }
13519
13519
  return !0;
13520
13520
  }
13521
- function Jf() {
13521
+ function Uf() {
13522
13522
  return new se({
13523
13523
  props: {
13524
- decorations: Xf,
13524
+ decorations: Yf,
13525
13525
  createSelectionBetween(n, e, t) {
13526
13526
  return e.pos == t.pos && R.valid(t) ? new R(t) : null;
13527
13527
  },
13528
- handleClick: _f,
13529
- handleKeyDown: Uf,
13530
- handleDOMEvents: { beforeinput: Gf }
13528
+ handleClick: Gf,
13529
+ handleKeyDown: _f,
13530
+ handleDOMEvents: { beforeinput: Xf }
13531
13531
  }
13532
13532
  });
13533
13533
  }
13534
- const Uf = $o({
13534
+ const _f = $o({
13535
13535
  ArrowLeft: an("horiz", -1),
13536
13536
  ArrowRight: an("horiz", 1),
13537
13537
  ArrowUp: an("vert", -1),
@@ -13550,7 +13550,7 @@ function an(n, e) {
13550
13550
  return c ? (i && i(r.tr.setSelection(new R(c))), !0) : !1;
13551
13551
  };
13552
13552
  }
13553
- function _f(n, e, t) {
13553
+ function Gf(n, e, t) {
13554
13554
  if (!n || !n.editable)
13555
13555
  return !1;
13556
13556
  let r = n.state.doc.resolve(e);
@@ -13559,7 +13559,7 @@ function _f(n, e, t) {
13559
13559
  let i = n.posAtCoords({ left: t.clientX, top: t.clientY });
13560
13560
  return i && i.inside > -1 && S.isSelectable(n.state.doc.nodeAt(i.inside)) ? !1 : (n.dispatch(n.state.tr.setSelection(new R(r))), !0);
13561
13561
  }
13562
- function Gf(n, e) {
13562
+ function Xf(n, e) {
13563
13563
  if (e.inputType != "insertCompositionText" || !(n.state.selection instanceof R))
13564
13564
  return !1;
13565
13565
  let { $from: t } = n.state.selection, r = t.parent.contentMatchAt(t.index()).findWrapping(n.state.schema.nodes.text);
@@ -13571,17 +13571,17 @@ function Gf(n, e) {
13571
13571
  let s = n.state.tr.replace(t.pos, t.pos, new k(i, 0, 0));
13572
13572
  return s.setSelection(M.near(s.doc.resolve(t.pos + 1))), n.dispatch(s), !1;
13573
13573
  }
13574
- function Xf(n) {
13574
+ function Yf(n) {
13575
13575
  if (!(n.selection instanceof R))
13576
13576
  return null;
13577
13577
  let e = document.createElement("div");
13578
13578
  return e.className = "ProseMirror-gapcursor", z.create(n.doc, [he.widget(n.selection.head, e, { key: "gapcursor" })]);
13579
13579
  }
13580
- const Yf = G.create({
13580
+ const Zf = G.create({
13581
13581
  name: "gapCursor",
13582
13582
  addProseMirrorPlugins() {
13583
13583
  return [
13584
- Jf()
13584
+ Uf()
13585
13585
  ];
13586
13586
  },
13587
13587
  extendNodeSchema(n) {
@@ -13595,7 +13595,7 @@ const Yf = G.create({
13595
13595
  allowGapCursor: (e = E(x(n, "allowGapCursor", t))) !== null && e !== void 0 ? e : null
13596
13596
  };
13597
13597
  }
13598
- }), Zf = ne.create({
13598
+ }), Qf = ne.create({
13599
13599
  name: "hardBreak",
13600
13600
  addOptions() {
13601
13601
  return {
@@ -13645,7 +13645,7 @@ const Yf = G.create({
13645
13645
  "Shift-Enter": () => this.editor.commands.setHardBreak()
13646
13646
  };
13647
13647
  }
13648
- }), Qf = ne.create({
13648
+ }), eh = ne.create({
13649
13649
  name: "heading",
13650
13650
  addOptions() {
13651
13651
  return {
@@ -13704,7 +13704,7 @@ V.prototype.prepend = function(e) {
13704
13704
  return e.length ? V.from(e).append(this) : this;
13705
13705
  };
13706
13706
  V.prototype.appendInner = function(e) {
13707
- return new eh(this, e);
13707
+ return new th(this, e);
13708
13708
  };
13709
13709
  V.prototype.slice = function(e, t) {
13710
13710
  return e === void 0 && (e = 0), t === void 0 && (t = this.length), e >= t ? V.empty : this.sliceInner(Math.max(0, e), Math.min(this.length, t));
@@ -13759,7 +13759,7 @@ var ul = /* @__PURE__ */ function(n) {
13759
13759
  }, Object.defineProperties(e.prototype, t), e;
13760
13760
  }(V);
13761
13761
  V.empty = new ul([]);
13762
- var eh = /* @__PURE__ */ function(n) {
13762
+ var th = /* @__PURE__ */ function(n) {
13763
13763
  function e(t, r) {
13764
13764
  n.call(this), this.left = t, this.right = r, this.length = t.length + r.length, this.depth = Math.max(t.depth, r.depth) + 1;
13765
13765
  }
@@ -13792,7 +13792,7 @@ var eh = /* @__PURE__ */ function(n) {
13792
13792
  return this.left.depth >= Math.max(this.right.depth, r.depth) + 1 ? new e(this.left, new e(this.right, r)) : new e(this, r);
13793
13793
  }, e;
13794
13794
  }(V);
13795
- const th = 500;
13795
+ const nh = 500;
13796
13796
  class ge {
13797
13797
  constructor(e, t) {
13798
13798
  this.items = e, this.eventCount = t;
@@ -13834,7 +13834,7 @@ class ge {
13834
13834
  (h = a && a.merge(f)) && (f = h, d ? s.pop() : l = l.slice(0, l.length - 1)), s.push(f), t && (o++, t = void 0), i || (a = f);
13835
13835
  }
13836
13836
  let c = o - r.depth;
13837
- return c > rh && (l = nh(l, c), o -= c), new ge(l.append(s), o);
13837
+ return c > ih && (l = rh(l, c), o -= c), new ge(l.append(s), o);
13838
13838
  }
13839
13839
  remapping(e, t) {
13840
13840
  let r = new Lt();
@@ -13874,7 +13874,7 @@ class ge {
13874
13874
  for (let f = t; f < o; f++)
13875
13875
  c.push(new be(s.maps[f]));
13876
13876
  let d = this.items.slice(0, i).append(c).append(r), u = new ge(d, l);
13877
- return u.emptyItemCount() > th && (u = u.compress(this.items.length - r.length)), u;
13877
+ return u.emptyItemCount() > nh && (u = u.compress(this.items.length - r.length)), u;
13878
13878
  }
13879
13879
  emptyItemCount() {
13880
13880
  let e = 0;
@@ -13906,7 +13906,7 @@ class ge {
13906
13906
  }
13907
13907
  }
13908
13908
  ge.empty = new ge(V.empty, 0);
13909
- function nh(n, e) {
13909
+ function rh(n, e) {
13910
13910
  let t;
13911
13911
  return n.forEach((r, i) => {
13912
13912
  if (r.selection && e-- == 0)
@@ -13930,23 +13930,23 @@ class Re {
13930
13930
  this.done = e, this.undone = t, this.prevRanges = r, this.prevTime = i, this.prevComposition = s;
13931
13931
  }
13932
13932
  }
13933
- const rh = 20;
13934
- function ih(n, e, t, r) {
13933
+ const ih = 20;
13934
+ function sh(n, e, t, r) {
13935
13935
  let i = t.getMeta(rt), s;
13936
13936
  if (i)
13937
13937
  return i.historyState;
13938
- t.getMeta(lh) && (n = new Re(n.done, n.undone, null, 0, -1));
13938
+ t.getMeta(ah) && (n = new Re(n.done, n.undone, null, 0, -1));
13939
13939
  let o = t.getMeta("appendedTransaction");
13940
13940
  if (t.steps.length == 0)
13941
13941
  return n;
13942
13942
  if (o && o.getMeta(rt))
13943
13943
  return o.getMeta(rt).redo ? new Re(n.done.addTransform(t, void 0, r, fn(e)), n.undone, bs(t.mapping.maps), n.prevTime, n.prevComposition) : new Re(n.done, n.undone.addTransform(t, void 0, r, fn(e)), null, n.prevTime, n.prevComposition);
13944
13944
  if (t.getMeta("addToHistory") !== !1 && !(o && o.getMeta("addToHistory") === !1)) {
13945
- let l = t.getMeta("composition"), a = n.prevTime == 0 || !o && n.prevComposition != l && (n.prevTime < (t.time || 0) - r.newGroupDelay || !sh(t, n.prevRanges)), c = o ? ur(n.prevRanges, t.mapping) : bs(t.mapping.maps);
13945
+ let l = t.getMeta("composition"), a = n.prevTime == 0 || !o && n.prevComposition != l && (n.prevTime < (t.time || 0) - r.newGroupDelay || !oh(t, n.prevRanges)), c = o ? ur(n.prevRanges, t.mapping) : bs(t.mapping.maps);
13946
13946
  return new Re(n.done.addTransform(t, a ? e.selection.getBookmark() : void 0, r, fn(e)), ge.empty, c, t.time, l ?? n.prevComposition);
13947
13947
  } else return (s = t.getMeta("rebased")) ? new Re(n.done.rebased(t, s), n.undone.rebased(t, s), ur(n.prevRanges, t.mapping), n.prevTime, n.prevComposition) : new Re(n.done.addMaps(t.mapping.maps), n.undone.addMaps(t.mapping.maps), ur(n.prevRanges, t.mapping), n.prevTime, n.prevComposition);
13948
13948
  }
13949
- function sh(n, e) {
13949
+ function oh(n, e) {
13950
13950
  if (!e)
13951
13951
  return !1;
13952
13952
  if (!n.docChanged)
@@ -13973,7 +13973,7 @@ function ur(n, e) {
13973
13973
  }
13974
13974
  return t;
13975
13975
  }
13976
- function oh(n, e, t) {
13976
+ function lh(n, e, t) {
13977
13977
  let r = fn(e), i = rt.get(e).spec.config, s = (t ? n.undone : n.done).popEvent(e, r);
13978
13978
  if (!s)
13979
13979
  return null;
@@ -13993,8 +13993,8 @@ function fn(n) {
13993
13993
  }
13994
13994
  return fr;
13995
13995
  }
13996
- const rt = new we("history"), lh = new we("closeHistory");
13997
- function ah(n = {}) {
13996
+ const rt = new we("history"), ah = new we("closeHistory");
13997
+ function ch(n = {}) {
13998
13998
  return n = {
13999
13999
  depth: n.depth || 100,
14000
14000
  newGroupDelay: n.newGroupDelay || 500
@@ -14005,7 +14005,7 @@ function ah(n = {}) {
14005
14005
  return new Re(ge.empty, ge.empty, null, 0, -1);
14006
14006
  },
14007
14007
  apply(e, t, r) {
14008
- return ih(t, r, e, n);
14008
+ return sh(t, r, e, n);
14009
14009
  }
14010
14010
  },
14011
14011
  config: n,
@@ -14025,13 +14025,13 @@ function fl(n, e) {
14025
14025
  if (!i || (n ? i.undone : i.done).eventCount == 0)
14026
14026
  return !1;
14027
14027
  if (r) {
14028
- let s = oh(i, t, n);
14028
+ let s = lh(i, t, n);
14029
14029
  s && r(e ? s.scrollIntoView() : s);
14030
14030
  }
14031
14031
  return !0;
14032
14032
  };
14033
14033
  }
14034
- const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14034
+ const hl = fl(!1, !0), pl = fl(!0, !0), dh = G.create({
14035
14035
  name: "history",
14036
14036
  addOptions() {
14037
14037
  return {
@@ -14047,7 +14047,7 @@ const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14047
14047
  },
14048
14048
  addProseMirrorPlugins() {
14049
14049
  return [
14050
- ah(this.options)
14050
+ ch(this.options)
14051
14051
  ];
14052
14052
  },
14053
14053
  addKeyboardShortcuts() {
@@ -14060,7 +14060,7 @@ const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14060
14060
  "Shift-Mod-я": () => this.editor.commands.redo()
14061
14061
  };
14062
14062
  }
14063
- }), dh = ne.create({
14063
+ }), uh = ne.create({
14064
14064
  name: "horizontalRule",
14065
14065
  addOptions() {
14066
14066
  return {
@@ -14077,7 +14077,7 @@ const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14077
14077
  addCommands() {
14078
14078
  return {
14079
14079
  setHorizontalRule: () => ({ chain: n, state: e }) => {
14080
- if (!Cf(e, e.schema.nodes[this.name]))
14080
+ if (!Tf(e, e.schema.nodes[this.name]))
14081
14081
  return !1;
14082
14082
  const { selection: t } = e, { $from: r, $to: i } = t, s = n();
14083
14083
  return r.parentOffset === 0 ? s.insertContentAt({
@@ -14085,7 +14085,7 @@ const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14085
14085
  to: i.pos
14086
14086
  }, {
14087
14087
  type: this.name
14088
- }) : Ku(t) ? s.insertContentAt(i.pos, {
14088
+ }) : Ju(t) ? s.insertContentAt(i.pos, {
14089
14089
  type: this.name
14090
14090
  }) : s.insertContent({ type: this.name }), s.command(({ tr: o, dispatch: l }) => {
14091
14091
  var a;
@@ -14112,7 +14112,7 @@ const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14112
14112
  })
14113
14113
  ];
14114
14114
  }
14115
- }), uh = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, fh = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, hh = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, ph = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, mh = Me.create({
14115
+ }), fh = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, hh = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, ph = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, mh = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, gh = Me.create({
14116
14116
  name: "italic",
14117
14117
  addOptions() {
14118
14118
  return {
@@ -14156,11 +14156,11 @@ const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14156
14156
  addInputRules() {
14157
14157
  return [
14158
14158
  at({
14159
- find: uh,
14159
+ find: fh,
14160
14160
  type: this.type
14161
14161
  }),
14162
14162
  at({
14163
- find: hh,
14163
+ find: ph,
14164
14164
  type: this.type
14165
14165
  })
14166
14166
  ];
@@ -14168,16 +14168,16 @@ const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14168
14168
  addPasteRules() {
14169
14169
  return [
14170
14170
  ct({
14171
- find: fh,
14171
+ find: hh,
14172
14172
  type: this.type
14173
14173
  }),
14174
14174
  ct({
14175
- find: ph,
14175
+ find: mh,
14176
14176
  type: this.type
14177
14177
  })
14178
14178
  ];
14179
14179
  }
14180
- }), gh = ne.create({
14180
+ }), yh = ne.create({
14181
14181
  name: "listItem",
14182
14182
  addOptions() {
14183
14183
  return {
@@ -14205,7 +14205,7 @@ const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14205
14205
  "Shift-Tab": () => this.editor.commands.liftListItem(this.name)
14206
14206
  };
14207
14207
  }
14208
- }), yh = "listItem", xs = "textStyle", Ss = /^(\d+)\.\s$/, bh = ne.create({
14208
+ }), bh = "listItem", xs = "textStyle", Ss = /^(\d+)\.\s$/, kh = ne.create({
14209
14209
  name: "orderedList",
14210
14210
  addOptions() {
14211
14211
  return {
@@ -14244,7 +14244,7 @@ const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14244
14244
  },
14245
14245
  addCommands() {
14246
14246
  return {
14247
- toggleOrderedList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(yh, this.editor.getAttributes(xs)).run() : n.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
14247
+ toggleOrderedList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(bh, this.editor.getAttributes(xs)).run() : n.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
14248
14248
  };
14249
14249
  },
14250
14250
  addKeyboardShortcuts() {
@@ -14271,7 +14271,7 @@ const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14271
14271
  n
14272
14272
  ];
14273
14273
  }
14274
- }), kh = ne.create({
14274
+ }), xh = ne.create({
14275
14275
  name: "paragraph",
14276
14276
  priority: 1e3,
14277
14277
  addOptions() {
@@ -14299,7 +14299,7 @@ const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14299
14299
  "Mod-Alt-0": () => this.editor.commands.setParagraph()
14300
14300
  };
14301
14301
  }
14302
- }), xh = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/, Sh = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g, Mh = Me.create({
14302
+ }), Sh = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/, Mh = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g, wh = Me.create({
14303
14303
  name: "strike",
14304
14304
  addOptions() {
14305
14305
  return {
@@ -14342,7 +14342,7 @@ const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14342
14342
  addInputRules() {
14343
14343
  return [
14344
14344
  at({
14345
- find: xh,
14345
+ find: Sh,
14346
14346
  type: this.type
14347
14347
  })
14348
14348
  ];
@@ -14350,21 +14350,21 @@ const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14350
14350
  addPasteRules() {
14351
14351
  return [
14352
14352
  ct({
14353
- find: Sh,
14353
+ find: Mh,
14354
14354
  type: this.type
14355
14355
  })
14356
14356
  ];
14357
14357
  }
14358
- }), wh = ne.create({
14358
+ }), Ch = ne.create({
14359
14359
  name: "text",
14360
14360
  group: "inline"
14361
- }), Ch = G.create({
14361
+ }), Th = G.create({
14362
14362
  name: "starterKit",
14363
14363
  addExtensions() {
14364
14364
  const n = [];
14365
- return this.options.bold !== !1 && n.push(Df.configure(this.options.bold)), this.options.blockquote !== !1 && n.push(Of.configure(this.options.blockquote)), this.options.bulletList !== !1 && n.push(Rf.configure(this.options.bulletList)), this.options.code !== !1 && n.push(Lf.configure(this.options.code)), this.options.codeBlock !== !1 && n.push($f.configure(this.options.codeBlock)), this.options.document !== !1 && n.push(Vf.configure(this.options.document)), this.options.dropcursor !== !1 && n.push(qf.configure(this.options.dropcursor)), this.options.gapcursor !== !1 && n.push(Yf.configure(this.options.gapcursor)), this.options.hardBreak !== !1 && n.push(Zf.configure(this.options.hardBreak)), this.options.heading !== !1 && n.push(Qf.configure(this.options.heading)), this.options.history !== !1 && n.push(ch.configure(this.options.history)), this.options.horizontalRule !== !1 && n.push(dh.configure(this.options.horizontalRule)), this.options.italic !== !1 && n.push(mh.configure(this.options.italic)), this.options.listItem !== !1 && n.push(gh.configure(this.options.listItem)), this.options.orderedList !== !1 && n.push(bh.configure(this.options.orderedList)), this.options.paragraph !== !1 && n.push(kh.configure(this.options.paragraph)), this.options.strike !== !1 && n.push(Mh.configure(this.options.strike)), this.options.text !== !1 && n.push(wh.configure(this.options.text)), n;
14365
+ return this.options.bold !== !1 && n.push(If.configure(this.options.bold)), this.options.blockquote !== !1 && n.push(vf.configure(this.options.blockquote)), this.options.bulletList !== !1 && n.push(Pf.configure(this.options.bulletList)), this.options.code !== !1 && n.push(zf.configure(this.options.code)), this.options.codeBlock !== !1 && n.push(Vf.configure(this.options.codeBlock)), this.options.document !== !1 && n.push(Hf.configure(this.options.document)), this.options.dropcursor !== !1 && n.push(jf.configure(this.options.dropcursor)), this.options.gapcursor !== !1 && n.push(Zf.configure(this.options.gapcursor)), this.options.hardBreak !== !1 && n.push(Qf.configure(this.options.hardBreak)), this.options.heading !== !1 && n.push(eh.configure(this.options.heading)), this.options.history !== !1 && n.push(dh.configure(this.options.history)), this.options.horizontalRule !== !1 && n.push(uh.configure(this.options.horizontalRule)), this.options.italic !== !1 && n.push(gh.configure(this.options.italic)), this.options.listItem !== !1 && n.push(yh.configure(this.options.listItem)), this.options.orderedList !== !1 && n.push(kh.configure(this.options.orderedList)), this.options.paragraph !== !1 && n.push(xh.configure(this.options.paragraph)), this.options.strike !== !1 && n.push(wh.configure(this.options.strike)), this.options.text !== !1 && n.push(Ch.configure(this.options.text)), n;
14366
14366
  }
14367
- }), Th = (n) => {
14367
+ }), Oh = (n) => {
14368
14368
  if (!n.children.length)
14369
14369
  return;
14370
14370
  const e = n.querySelectorAll("span");
@@ -14373,7 +14373,7 @@ const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14373
14373
  const s = t.getAttribute("style"), o = (i = (r = t.parentElement) === null || r === void 0 ? void 0 : r.closest("span")) === null || i === void 0 ? void 0 : i.getAttribute("style");
14374
14374
  t.setAttribute("style", `${o};${s}`);
14375
14375
  });
14376
- }, Oh = Me.create({
14376
+ }, vh = Me.create({
14377
14377
  name: "textStyle",
14378
14378
  priority: 101,
14379
14379
  addOptions() {
@@ -14386,7 +14386,7 @@ const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14386
14386
  return [
14387
14387
  {
14388
14388
  tag: "span",
14389
- getAttrs: (n) => n.hasAttribute("style") ? (this.options.mergeNestedSpanStyles && Th(n), {}) : !1
14389
+ getAttrs: (n) => n.hasAttribute("style") ? (this.options.mergeNestedSpanStyles && Oh(n), {}) : !1
14390
14390
  }
14391
14391
  ];
14392
14392
  },
@@ -14405,7 +14405,7 @@ const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14405
14405
  }
14406
14406
  };
14407
14407
  }
14408
- }), vh = G.create({
14408
+ }), Eh = G.create({
14409
14409
  name: "color",
14410
14410
  addOptions() {
14411
14411
  return {
@@ -14437,7 +14437,7 @@ const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14437
14437
  unsetColor: () => ({ chain: n }) => n().setMark("textStyle", { color: null }).removeEmptyTextStyle().run()
14438
14438
  };
14439
14439
  }
14440
- }), Eh = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/, Nh = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g, Ah = Me.create({
14440
+ }), Nh = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/, Ah = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g, Dh = Me.create({
14441
14441
  name: "highlight",
14442
14442
  addOptions() {
14443
14443
  return {
@@ -14482,7 +14482,7 @@ const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14482
14482
  addInputRules() {
14483
14483
  return [
14484
14484
  at({
14485
- find: Eh,
14485
+ find: Nh,
14486
14486
  type: this.type
14487
14487
  })
14488
14488
  ];
@@ -14490,12 +14490,12 @@ const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14490
14490
  addPasteRules() {
14491
14491
  return [
14492
14492
  ct({
14493
- find: Nh,
14493
+ find: Ah,
14494
14494
  type: this.type
14495
14495
  })
14496
14496
  ];
14497
14497
  }
14498
- }), Dh = G.create({
14498
+ }), Ih = G.create({
14499
14499
  name: "textAlign",
14500
14500
  addOptions() {
14501
14501
  return {
@@ -14536,7 +14536,7 @@ const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14536
14536
  "Mod-Shift-j": () => this.editor.commands.setTextAlign("justify")
14537
14537
  };
14538
14538
  }
14539
- }), Ih = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Rh = ne.create({
14539
+ }), Rh = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, Ph = ne.create({
14540
14540
  name: "image",
14541
14541
  addOptions() {
14542
14542
  return {
@@ -14586,7 +14586,7 @@ const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14586
14586
  addInputRules() {
14587
14587
  return [
14588
14588
  cl({
14589
- find: Ih,
14589
+ find: Rh,
14590
14590
  type: this.type,
14591
14591
  getAttributes: (n) => {
14592
14592
  const [, , e, t, r] = n;
@@ -14597,7 +14597,7 @@ const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14597
14597
  }
14598
14598
  });
14599
14599
  var re, Gt, Xt, de, Lr, ml, gl, yl, bl;
14600
- class Ph extends Ol {
14600
+ class Bh extends vl {
14601
14601
  constructor() {
14602
14602
  super();
14603
14603
  F(this, de);
@@ -14651,7 +14651,7 @@ Lr = function() {
14651
14651
  const t = Ae.getComponentCssPath("nineEditor.css"), r = t ? `@import "${t}";` : "";
14652
14652
  this.shadowRoot.innerHTML = `
14653
14653
  <style>
14654
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.63/dist/css/nineEditor.css";
14654
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.64/dist/css/nineEditor.css";
14655
14655
  ${r}
14656
14656
  </style>
14657
14657
 
@@ -14691,22 +14691,22 @@ Lr = function() {
14691
14691
  console.log(i.target, s), O(this, re).chain().focus().setMark("textStyle", { fontSize: s }).run();
14692
14692
  };
14693
14693
  }, gl = function() {
14694
- oe(this, re, new wf({
14694
+ oe(this, re, new Cf({
14695
14695
  element: O(this, Gt),
14696
14696
  editable: !this.readonly,
14697
14697
  // 4. 생성 시 readonly 여부 반영
14698
14698
  extensions: [
14699
- Ch,
14699
+ Th,
14700
14700
  // 기본 셋 (Bold, Italic, Strike 등 포함)
14701
14701
  //Underline, // StarterKit에 없으므로 유지
14702
- vh,
14702
+ Eh,
14703
14703
  // StarterKit에 없으므로 유지
14704
- Ah.configure({ multicolor: !0 }),
14705
- Dh.configure({ types: ["heading", "paragraph"] }),
14706
- Rh.configure({ inline: !0, allowBase64: !0 }),
14704
+ Dh.configure({ multicolor: !0 }),
14705
+ Ih.configure({ types: ["heading", "paragraph"] }),
14706
+ Ph.configure({ inline: !0, allowBase64: !0 }),
14707
14707
  // TextStyle은 여기서 'extend'로 직접 정의하므로
14708
14708
  // 배열에 별도의 TextStyle을 또 넣지 마세요.
14709
- Oh.extend({
14709
+ vh.extend({
14710
14710
  addAttributes() {
14711
14711
  return {
14712
14712
  fontSize: {
@@ -14757,15 +14757,16 @@ const Ms = {
14757
14757
  confirm: window.confirm
14758
14758
  }, ws = () => {
14759
14759
  var t, r;
14760
- const { nativeOverride: n } = ((r = (t = Rt) == null ? void 0 : t.config) == null ? void 0 : r.ux) || {}, e = Array.isArray(n) ? n : n === !0 ? ["alert", "confirm"] : [];
14761
- console.log(e), window.alert = e.includes("alert") ? (i) => Ae.alert(i) : Ms.alert, window.confirm = e.includes("confirm") ? async (i) => await Ae.confirm(i) : Ms.confirm, Rt.config.debug && e.length > 0 && console.log(`[nine-ux] Native API Overridden: ${e.join(", ")}`);
14762
- }, Bh = () => {
14760
+ wl.log(yt);
14761
+ const { nativeOverride: n } = ((r = (t = yt) == null ? void 0 : t.config) == null ? void 0 : r.ux) || {}, e = Array.isArray(n) ? n : n === !0 ? ["alert", "confirm"] : [];
14762
+ console.log(e), window.alert = e.includes("alert") ? (i) => Ae.alert(i) : Ms.alert, window.confirm = e.includes("confirm") ? async (i) => await Ae.confirm(i) : Ms.confirm, yt.config.debug && e.length > 0 && console.log(`[nine-ux] Native API Overridden: ${e.join(", ")}`);
14763
+ }, Lh = () => {
14763
14764
  ws(), Ml((n) => {
14764
14765
  (n === "ux" || n === "config") && ws();
14765
14766
  });
14766
14767
  };
14767
- Bh();
14768
- Rt.alert = Ae.alert.bind(Ae);
14769
- Rt.confirm = Ae.confirm.bind(Ae);
14770
- typeof window < "u" && (customElements.get("nine-editor") || customElements.define("nine-editor", Ph));
14768
+ Lh();
14769
+ yt.alert = Ae.alert.bind(Ae);
14770
+ yt.confirm = Ae.confirm.bind(Ae);
14771
+ typeof window < "u" && (customElements.get("nine-editor") || customElements.define("nine-editor", Bh));
14771
14772
  //# sourceMappingURL=nine-ux.es.js.map