@nine-lab/nine-ux 0.1.118 → 0.1.119

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/nine-ux.js CHANGED
@@ -1,11 +1,11 @@
1
- var El = Object.defineProperty;
1
+ var Al = Object.defineProperty;
2
2
  var ui = (n) => {
3
3
  throw TypeError(n);
4
4
  };
5
- var Al = (n, e, t) => e in n ? El(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
6
- var be = (n, e, t) => Al(n, typeof e != "symbol" ? e + "" : e, t), _n = (n, e, t) => e.has(n) || ui("Cannot " + t);
5
+ var Nl = (n, e, t) => e in n ? Al(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
6
+ var be = (n, e, t) => Nl(n, typeof e != "symbol" ? e + "" : e, t), _n = (n, e, t) => e.has(n) || ui("Cannot " + t);
7
7
  var O = (n, e, t) => (_n(n, e, "read from private field"), t ? t.call(n) : e.get(n)), B = (n, e, t) => e.has(n) ? ui("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), Y = (n, e, t, r) => (_n(n, e, "write to private field"), r ? r.call(n, t) : e.set(n, t), t), R = (n, e, t) => (_n(n, e, "access private method"), t);
8
- import { trace as Nl, nine as As } from "@nine-lab/nine-util";
8
+ import { trace as Dl, nine as As } from "@nine-lab/nine-util";
9
9
  const fi = `
10
10
  dialog::backdrop {
11
11
  background: rgba(0, 0, 0, 0.3);
@@ -418,7 +418,7 @@ dialog.out { animation: nx-fade-out 0.3s forwards; }
418
418
  @keyframes nx-fade-out { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(0.9); } }
419
419
  `;
420
420
  var Ee, j, Dn, In, Rn;
421
- class Dl extends HTMLElement {
421
+ class Ns extends HTMLElement {
422
422
  constructor() {
423
423
  super();
424
424
  B(this, Ee);
@@ -472,7 +472,7 @@ class Dl extends HTMLElement {
472
472
  }
473
473
  connectedCallback() {
474
474
  const t = this.innerHTML, r = this.getAttribute("title") || "Details";
475
- Nl.log("================================", fi), this.innerHTML = `
475
+ Dl.log("================================", fi), this.innerHTML = `
476
476
  <style>${fi}</style>
477
477
 
478
478
  <dialog>
@@ -507,7 +507,8 @@ class Dl extends HTMLElement {
507
507
  }
508
508
  }
509
509
  Ee = new WeakMap(), j = new WeakMap(), Dn = new WeakMap(), In = new WeakMap(), Rn = new WeakMap();
510
- customElements.get("nine-dialog") || customElements.define("nine-dialog", Dl);
510
+ customElements.get("nine-dialog") || customElements.define("nine-dialog", Ns);
511
+ customElements.get("nine-dialog1") || customElements.define("nine-dialog1", Ns);
511
512
  class $r extends HTMLElement {
512
513
  constructor() {
513
514
  super(), this.attachShadow({ mode: "open" });
@@ -832,7 +833,7 @@ K.from = function(n) {
832
833
  if (n) for (var t in n) e.push(t, n[t]);
833
834
  return new K(e);
834
835
  };
835
- function Ns(n, e, t) {
836
+ function Ds(n, e, t) {
836
837
  for (let r = 0; ; r++) {
837
838
  if (r == n.childCount || r == e.childCount)
838
839
  return n.childCount == e.childCount ? null : t;
@@ -849,14 +850,14 @@ function Ns(n, e, t) {
849
850
  return t;
850
851
  }
851
852
  if (i.content.size || s.content.size) {
852
- let o = Ns(i.content, s.content, t + 1);
853
+ let o = Ds(i.content, s.content, t + 1);
853
854
  if (o != null)
854
855
  return o;
855
856
  }
856
857
  t += i.nodeSize;
857
858
  }
858
859
  }
859
- function Ds(n, e, t, r) {
860
+ function Is(n, e, t, r) {
860
861
  for (let i = n.childCount, s = e.childCount; ; ) {
861
862
  if (i == 0 || s == 0)
862
863
  return i == s ? null : { a: t, b: r };
@@ -874,7 +875,7 @@ function Ds(n, e, t, r) {
874
875
  return { a: t, b: r };
875
876
  }
876
877
  if (o.content.size || l.content.size) {
877
- let c = Ds(o.content, l.content, t - 1, r - 1);
878
+ let c = Is(o.content, l.content, t - 1, r - 1);
878
879
  if (c)
879
880
  return c;
880
881
  }
@@ -1043,7 +1044,7 @@ class b {
1043
1044
  fragment differ, or `null` if they are the same.
1044
1045
  */
1045
1046
  findDiffStart(e, t = 0) {
1046
- return Ns(this, e, t);
1047
+ return Ds(this, e, t);
1047
1048
  }
1048
1049
  /**
1049
1050
  Find the first position, searching from the end, at which this
@@ -1052,7 +1053,7 @@ class b {
1052
1053
  nodes, an object with two separate positions is returned.
1053
1054
  */
1054
1055
  findDiffEnd(e, t = this.size, r = e.size) {
1055
- return Ds(this, e, t, r);
1056
+ return Is(this, e, t, r);
1056
1057
  }
1057
1058
  /**
1058
1059
  Find the index and inner offset corresponding to a given relative
@@ -1296,14 +1297,14 @@ class k {
1296
1297
  @internal
1297
1298
  */
1298
1299
  insertAt(e, t) {
1299
- let r = Rs(this.content, e + this.openStart, t);
1300
+ let r = Ps(this.content, e + this.openStart, t);
1300
1301
  return r && new k(r, this.openStart, this.openEnd);
1301
1302
  }
1302
1303
  /**
1303
1304
  @internal
1304
1305
  */
1305
1306
  removeBetween(e, t) {
1306
- return new k(Is(this.content, e + this.openStart, t + this.openStart), this.openStart, this.openEnd);
1307
+ return new k(Rs(this.content, e + this.openStart, t + this.openStart), this.openStart, this.openEnd);
1307
1308
  }
1308
1309
  /**
1309
1310
  Tests whether this slice is equal to another slice.
@@ -1351,7 +1352,7 @@ class k {
1351
1352
  }
1352
1353
  }
1353
1354
  k.empty = new k(b.empty, 0, 0);
1354
- function Is(n, e, t) {
1355
+ function Rs(n, e, t) {
1355
1356
  let { index: r, offset: i } = n.findIndex(e), s = n.maybeChild(r), { index: o, offset: l } = n.findIndex(t);
1356
1357
  if (i == e || s.isText) {
1357
1358
  if (l != t && !n.child(o).isText)
@@ -1360,13 +1361,13 @@ function Is(n, e, t) {
1360
1361
  }
1361
1362
  if (r != o)
1362
1363
  throw new RangeError("Removing non-flat range");
1363
- return n.replaceChild(r, s.copy(Is(s.content, e - i - 1, t - i - 1)));
1364
+ return n.replaceChild(r, s.copy(Rs(s.content, e - i - 1, t - i - 1)));
1364
1365
  }
1365
- function Rs(n, e, t, r) {
1366
+ function Ps(n, e, t, r) {
1366
1367
  let { index: i, offset: s } = n.findIndex(e), o = n.maybeChild(i);
1367
1368
  if (s == e || o.isText)
1368
1369
  return r && !r.canReplace(i, i, t) ? null : n.cut(0, e).append(t).append(n.cut(e));
1369
- let l = Rs(o.content, e - s - 1, t, o);
1370
+ let l = Ps(o.content, e - s - 1, t, o);
1370
1371
  return l && n.replaceChild(i, o.copy(l));
1371
1372
  }
1372
1373
  function Bl(n, e, t) {
@@ -1374,12 +1375,12 @@ function Bl(n, e, t) {
1374
1375
  throw new bn("Inserted content deeper than insertion position");
1375
1376
  if (n.depth - t.openStart != e.depth - t.openEnd)
1376
1377
  throw new bn("Inconsistent open depths");
1377
- return Ps(n, e, t, 0);
1378
+ return Bs(n, e, t, 0);
1378
1379
  }
1379
- function Ps(n, e, t, r) {
1380
+ function Bs(n, e, t, r) {
1380
1381
  let i = n.index(r), s = n.node(r);
1381
1382
  if (i == e.index(r) && r < n.depth - t.openStart) {
1382
- let o = Ps(n, e, t, r + 1);
1383
+ let o = Bs(n, e, t, r + 1);
1383
1384
  return s.copy(s.content.replaceChild(i, o));
1384
1385
  } else if (t.content.size)
1385
1386
  if (!t.openStart && !t.openEnd && n.depth == r && e.depth == r) {
@@ -1387,17 +1388,17 @@ function Ps(n, e, t, r) {
1387
1388
  return tt(o, l.cut(0, n.parentOffset).append(t.content).append(l.cut(e.parentOffset)));
1388
1389
  } else {
1389
1390
  let { start: o, end: l } = Ll(t, n);
1390
- return tt(s, Ls(n, o, l, e, r));
1391
+ return tt(s, zs(n, o, l, e, r));
1391
1392
  }
1392
1393
  else return tt(s, kn(n, e, r));
1393
1394
  }
1394
- function Bs(n, e) {
1395
+ function Ls(n, e) {
1395
1396
  if (!e.type.compatibleContent(n.type))
1396
1397
  throw new bn("Cannot join " + e.type.name + " onto " + n.type.name);
1397
1398
  }
1398
1399
  function kr(n, e, t) {
1399
1400
  let r = n.node(t);
1400
- return Bs(r, e.node(t)), r;
1401
+ return Ls(r, e.node(t)), r;
1401
1402
  }
1402
1403
  function et(n, e) {
1403
1404
  let t = e.length - 1;
@@ -1413,9 +1414,9 @@ function Rt(n, e, t, r) {
1413
1414
  function tt(n, e) {
1414
1415
  return n.type.checkContent(e), n.copy(e);
1415
1416
  }
1416
- function Ls(n, e, t, r, i) {
1417
+ function zs(n, e, t, r, i) {
1417
1418
  let s = n.depth > i && kr(n, e, i + 1), o = r.depth > i && kr(t, r, i + 1), l = [];
1418
- return Rt(null, n, i, l), s && o && e.index(i) == t.index(i) ? (Bs(s, o), et(tt(s, Ls(n, e, t, r, i + 1)), l)) : (s && et(tt(s, kn(n, e, i + 1)), l), Rt(e, t, i, l), o && et(tt(o, kn(t, r, i + 1)), l)), Rt(r, null, i, l), new b(l);
1419
+ return Rt(null, n, i, l), s && o && e.index(i) == t.index(i) ? (Ls(s, o), et(tt(s, zs(n, e, t, r, i + 1)), l)) : (s && et(tt(s, kn(n, e, i + 1)), l), Rt(e, t, i, l), o && et(tt(o, kn(t, r, i + 1)), l)), Rt(r, null, i, l), new b(l);
1419
1420
  }
1420
1421
  function kn(n, e, t) {
1421
1422
  let r = [];
@@ -2004,7 +2005,7 @@ let $e = class xr {
2004
2005
  if (this.type.spec.toDebugString)
2005
2006
  return this.type.spec.toDebugString(this);
2006
2007
  let e = this.type.name;
2007
- return this.content.size && (e += "(" + this.content.toStringInner() + ")"), zs(this.marks, e);
2008
+ return this.content.size && (e += "(" + this.content.toStringInner() + ")"), Fs(this.marks, e);
2008
2009
  }
2009
2010
  /**
2010
2011
  Get the content match in this node at the given index.
@@ -2108,7 +2109,7 @@ class Sn extends $e {
2108
2109
  this.text = r;
2109
2110
  }
2110
2111
  toString() {
2111
- return this.type.spec.toDebugString ? this.type.spec.toDebugString(this) : zs(this.marks, JSON.stringify(this.text));
2112
+ return this.type.spec.toDebugString ? this.type.spec.toDebugString(this) : Fs(this.marks, JSON.stringify(this.text));
2112
2113
  }
2113
2114
  get textContent() {
2114
2115
  return this.text;
@@ -2136,7 +2137,7 @@ class Sn extends $e {
2136
2137
  return e.text = this.text, e;
2137
2138
  }
2138
2139
  }
2139
- function zs(n, e) {
2140
+ function Fs(n, e) {
2140
2141
  for (let t = n.length - 1; t >= 0; t--)
2141
2142
  e = n[t].type.name + "(" + e + ")";
2142
2143
  return e;
@@ -2155,7 +2156,7 @@ class st {
2155
2156
  let r = new Vl(e, t);
2156
2157
  if (r.next == null)
2157
2158
  return st.empty;
2158
- let i = Fs(r);
2159
+ let i = $s(r);
2159
2160
  r.next && r.err("Unexpected trailing text");
2160
2161
  let s = Ul(Jl(i));
2161
2162
  return _l(s, r), s;
@@ -2318,7 +2319,7 @@ class Vl {
2318
2319
  throw new SyntaxError(e + " (in content expression '" + this.string + "')");
2319
2320
  }
2320
2321
  }
2321
- function Fs(n) {
2322
+ function $s(n) {
2322
2323
  let e = [];
2323
2324
  do
2324
2325
  e.push(Hl(n));
@@ -2369,7 +2370,7 @@ function jl(n, e) {
2369
2370
  }
2370
2371
  function Kl(n) {
2371
2372
  if (n.eat("(")) {
2372
- let e = Fs(n);
2373
+ let e = $s(n);
2373
2374
  return n.eat(")") || n.err("Missing closing paren"), e;
2374
2375
  } else if (/\W/.test(n.next))
2375
2376
  n.err("Unexpected token '" + n.next + "'");
@@ -2432,12 +2433,12 @@ function Jl(n) {
2432
2433
  }
2433
2434
  }
2434
2435
  }
2435
- function $s(n, e) {
2436
+ function Vs(n, e) {
2436
2437
  return e - n;
2437
2438
  }
2438
2439
  function mi(n, e) {
2439
2440
  let t = [];
2440
- return r(e), t.sort($s);
2441
+ return r(e), t.sort(Vs);
2441
2442
  function r(i) {
2442
2443
  let s = n[i];
2443
2444
  if (s.length == 1 && !s[0].term)
@@ -2468,7 +2469,7 @@ function Ul(n) {
2468
2469
  });
2469
2470
  let s = e[r.join(",")] = new st(r.indexOf(n.length - 1) > -1);
2470
2471
  for (let o = 0; o < i.length; o++) {
2471
- let l = i[o][1].sort($s);
2472
+ let l = i[o][1].sort(Vs);
2472
2473
  s.next.push({ type: i[o][0], next: e[l.join(",")] || t(l) });
2473
2474
  }
2474
2475
  return s;
@@ -2484,7 +2485,7 @@ function _l(n, e) {
2484
2485
  s && e.err("Only non-generatable nodes (" + o.join(", ") + ") in a required position (see https://prosemirror.net/docs/guide/#generatable)");
2485
2486
  }
2486
2487
  }
2487
- function Vs(n) {
2488
+ function Hs(n) {
2488
2489
  let e = /* @__PURE__ */ Object.create(null);
2489
2490
  for (let t in n) {
2490
2491
  let r = n[t];
@@ -2494,7 +2495,7 @@ function Vs(n) {
2494
2495
  }
2495
2496
  return e;
2496
2497
  }
2497
- function Hs(n, e) {
2498
+ function Ws(n, e) {
2498
2499
  let t = /* @__PURE__ */ Object.create(null);
2499
2500
  for (let r in n) {
2500
2501
  let i = e && e[r];
@@ -2509,7 +2510,7 @@ function Hs(n, e) {
2509
2510
  }
2510
2511
  return t;
2511
2512
  }
2512
- function Ws(n, e, t, r) {
2513
+ function qs(n, e, t, r) {
2513
2514
  for (let i in e)
2514
2515
  if (!(i in n))
2515
2516
  throw new RangeError(`Unsupported attribute ${i} for ${t} of type ${i}`);
@@ -2518,19 +2519,19 @@ function Ws(n, e, t, r) {
2518
2519
  s.validate && s.validate(e[i]);
2519
2520
  }
2520
2521
  }
2521
- function qs(n, e) {
2522
+ function js(n, e) {
2522
2523
  let t = /* @__PURE__ */ Object.create(null);
2523
2524
  if (e)
2524
2525
  for (let r in e)
2525
2526
  t[r] = new Xl(n, r, e[r]);
2526
2527
  return t;
2527
2528
  }
2528
- let gi = class js {
2529
+ let gi = class Ks {
2529
2530
  /**
2530
2531
  @internal
2531
2532
  */
2532
2533
  constructor(e, t, r) {
2533
- this.name = e, this.schema = t, this.spec = r, this.markSet = null, this.groups = r.group ? r.group.split(" ") : [], this.attrs = qs(e, r.attrs), this.defaultAttrs = Vs(this.attrs), this.contentMatch = null, this.inlineContent = null, this.isBlock = !(r.inline || e == "text"), this.isText = e == "text";
2534
+ this.name = e, this.schema = t, this.spec = r, this.markSet = null, this.groups = r.group ? r.group.split(" ") : [], this.attrs = js(e, r.attrs), this.defaultAttrs = Hs(this.attrs), this.contentMatch = null, this.inlineContent = null, this.isBlock = !(r.inline || e == "text"), this.isText = e == "text";
2534
2535
  }
2535
2536
  /**
2536
2537
  True if this is an inline type.
@@ -2591,7 +2592,7 @@ let gi = class js {
2591
2592
  @internal
2592
2593
  */
2593
2594
  computeAttrs(e) {
2594
- return !e && this.defaultAttrs ? this.defaultAttrs : Hs(this.attrs, e);
2595
+ return !e && this.defaultAttrs ? this.defaultAttrs : Ws(this.attrs, e);
2595
2596
  }
2596
2597
  /**
2597
2598
  Create a `Node` of this type. The given attributes are
@@ -2658,7 +2659,7 @@ let gi = class js {
2658
2659
  @internal
2659
2660
  */
2660
2661
  checkAttrs(e) {
2661
- Ws(this.attrs, e, "node", this.name);
2662
+ qs(this.attrs, e, "node", this.name);
2662
2663
  }
2663
2664
  /**
2664
2665
  Check whether the given mark type is allowed in this node.
@@ -2693,7 +2694,7 @@ let gi = class js {
2693
2694
  */
2694
2695
  static compile(e, t) {
2695
2696
  let r = /* @__PURE__ */ Object.create(null);
2696
- e.forEach((s, o) => r[s] = new js(s, t, o));
2697
+ e.forEach((s, o) => r[s] = new Ks(s, t, o));
2697
2698
  let i = t.spec.topNode || "doc";
2698
2699
  if (!r[i])
2699
2700
  throw new RangeError("Schema is missing its top node type ('" + i + "')");
@@ -2725,8 +2726,8 @@ class Bn {
2725
2726
  @internal
2726
2727
  */
2727
2728
  constructor(e, t, r, i) {
2728
- this.name = e, this.rank = t, this.schema = r, this.spec = i, this.attrs = qs(e, i.attrs), this.excluded = null;
2729
- let s = Vs(this.attrs);
2729
+ this.name = e, this.rank = t, this.schema = r, this.spec = i, this.attrs = js(e, i.attrs), this.excluded = null;
2730
+ let s = Hs(this.attrs);
2730
2731
  this.instance = s ? new N(this, s) : null;
2731
2732
  }
2732
2733
  /**
@@ -2735,7 +2736,7 @@ class Bn {
2735
2736
  they have defaults, will be added.
2736
2737
  */
2737
2738
  create(e = null) {
2738
- return !e && this.instance ? this.instance : new N(this, Hs(this.attrs, e));
2739
+ return !e && this.instance ? this.instance : new N(this, Ws(this.attrs, e));
2739
2740
  }
2740
2741
  /**
2741
2742
  @internal
@@ -2765,7 +2766,7 @@ class Bn {
2765
2766
  @internal
2766
2767
  */
2767
2768
  checkAttrs(e) {
2768
- Ws(this.attrs, e, "mark", this.name);
2769
+ qs(this.attrs, e, "mark", this.name);
2769
2770
  }
2770
2771
  /**
2771
2772
  Queries whether a given mark type is
@@ -2775,7 +2776,7 @@ class Bn {
2775
2776
  return this.excluded.indexOf(e) > -1;
2776
2777
  }
2777
2778
  }
2778
- class Ks {
2779
+ class Js {
2779
2780
  /**
2780
2781
  Construct a schema from a schema [specification](https://prosemirror.net/docs/ref/#model.SchemaSpec).
2781
2782
  */
@@ -2981,7 +2982,7 @@ class Ve {
2981
2982
  return e.cached.domParser || (e.cached.domParser = new Ve(e, Ve.schemaRules(e)));
2982
2983
  }
2983
2984
  }
2984
- const Js = {
2985
+ const Us = {
2985
2986
  address: !0,
2986
2987
  article: !0,
2987
2988
  aside: !0,
@@ -3021,7 +3022,7 @@ const Js = {
3021
3022
  script: !0,
3022
3023
  style: !0,
3023
3024
  title: !0
3024
- }, Us = { ol: !0, ul: !0 }, $t = 1, Sr = 2, Pt = 4;
3025
+ }, _s = { ol: !0, ul: !0 }, $t = 1, Sr = 2, Pt = 4;
3025
3026
  function bi(n, e, t) {
3026
3027
  return e != null ? (e ? $t : 0) | (e === "full" ? Sr : 0) : n && n.whitespace == "pre" ? $t | Sr : t & ~Pt;
3027
3028
  }
@@ -3055,7 +3056,7 @@ class on {
3055
3056
  return !e && this.match && (t = t.append(this.match.fillBefore(b.empty, !0))), this.type ? this.type.create(this.attrs, t, this.marks) : t;
3056
3057
  }
3057
3058
  inlineContext(e) {
3058
- return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !Js.hasOwnProperty(e.parentNode.nodeName.toLowerCase());
3059
+ return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !Us.hasOwnProperty(e.parentNode.nodeName.toLowerCase());
3059
3060
  }
3060
3061
  }
3061
3062
  class ki {
@@ -3101,14 +3102,14 @@ class ki {
3101
3102
  let i = this.localPreserveWS, s = this.top;
3102
3103
  (e.tagName == "PRE" || /pre/.test(e.style && e.style.whiteSpace)) && (this.localPreserveWS = !0);
3103
3104
  let o = e.nodeName.toLowerCase(), l;
3104
- Us.hasOwnProperty(o) && this.parser.normalizeLists && ea(e);
3105
+ _s.hasOwnProperty(o) && this.parser.normalizeLists && ea(e);
3105
3106
  let a = this.options.ruleFromNode && this.options.ruleFromNode(e) || (l = this.parser.matchTag(e, this, r));
3106
3107
  e: if (a ? a.ignore : Ql.hasOwnProperty(o))
3107
3108
  this.findInside(e), this.ignoreFallback(e, t);
3108
3109
  else if (!a || a.skip || a.closeParent) {
3109
3110
  a && a.closeParent ? this.open = Math.max(0, this.open - 1) : a && a.skip.nodeType && (e = a.skip);
3110
3111
  let c, d = this.needsBlock;
3111
- if (Js.hasOwnProperty(o))
3112
+ if (Us.hasOwnProperty(o))
3112
3113
  s.content.length && s.content[0].isInline && this.open && (this.open--, s = this.top), c = !0, s.type || (this.needsBlock = !0);
3113
3114
  else if (!e.firstChild) {
3114
3115
  this.leafFallback(e, t);
@@ -3343,7 +3344,7 @@ class ki {
3343
3344
  function ea(n) {
3344
3345
  for (let e = n.firstChild, t = null; e; e = e.nextSibling) {
3345
3346
  let r = e.nodeType == 1 ? e.nodeName.toLowerCase() : null;
3346
- r && Us.hasOwnProperty(r) && t ? (t.appendChild(e), e = t) : r == "li" ? t = e : r && (t = null);
3347
+ r && _s.hasOwnProperty(r) && t ? (t.appendChild(e), e = t) : r == "li" ? t = e : r && (t = null);
3347
3348
  }
3348
3349
  }
3349
3350
  function ta(n, e) {
@@ -3549,17 +3550,17 @@ function hn(n, e, t, r) {
3549
3550
  }
3550
3551
  return { dom: a, contentDOM: l };
3551
3552
  }
3552
- const _s = 65535, Gs = Math.pow(2, 16);
3553
+ const Gs = 65535, Xs = Math.pow(2, 16);
3553
3554
  function ia(n, e) {
3554
- return n + e * Gs;
3555
+ return n + e * Xs;
3555
3556
  }
3556
3557
  function Ci(n) {
3557
- return n & _s;
3558
+ return n & Gs;
3558
3559
  }
3559
3560
  function sa(n) {
3560
- return (n - (n & _s)) / Gs;
3561
+ return (n - (n & Gs)) / Xs;
3561
3562
  }
3562
- const Xs = 1, Ys = 2, pn = 4, Zs = 8;
3563
+ const Ys = 1, Zs = 2, pn = 4, Qs = 8;
3563
3564
  class wr {
3564
3565
  /**
3565
3566
  @internal
@@ -3573,19 +3574,19 @@ class wr {
3573
3574
  argument from the document.
3574
3575
  */
3575
3576
  get deleted() {
3576
- return (this.delInfo & Zs) > 0;
3577
+ return (this.delInfo & Qs) > 0;
3577
3578
  }
3578
3579
  /**
3579
3580
  Tells you whether the token before the mapped position was deleted.
3580
3581
  */
3581
3582
  get deletedBefore() {
3582
- return (this.delInfo & (Xs | pn)) > 0;
3583
+ return (this.delInfo & (Ys | pn)) > 0;
3583
3584
  }
3584
3585
  /**
3585
3586
  True when the token after the mapped position was deleted.
3586
3587
  */
3587
3588
  get deletedAfter() {
3588
- return (this.delInfo & (Ys | pn)) > 0;
3589
+ return (this.delInfo & (Zs | pn)) > 0;
3589
3590
  }
3590
3591
  /**
3591
3592
  Tells whether any of the steps mapped through deletes across the
@@ -3636,8 +3637,8 @@ class le {
3636
3637
  let f = c ? e == a ? -1 : e == u ? 1 : t : t, h = a + i + (f < 0 ? 0 : d);
3637
3638
  if (r)
3638
3639
  return h;
3639
- let p = e == (t < 0 ? a : u) ? null : ia(l / 3, e - a), m = e == a ? Ys : e == u ? Xs : pn;
3640
- return (t < 0 ? e != a : e != u) && (m |= Zs), new wr(h, m, p);
3640
+ let p = e == (t < 0 ? a : u) ? null : ia(l / 3, e - a), m = e == a ? Zs : e == u ? Ys : pn;
3641
+ return (t < 0 ? e != a : e != u) && (m |= Qs), new wr(h, m, p);
3641
3642
  }
3642
3643
  i += d - c;
3643
3644
  }
@@ -4302,13 +4303,13 @@ function ha(n, e, t, r, i) {
4302
4303
  let h = r.whitespace == "pre", p = !!r.contentMatch.matchType(r.schema.linebreakReplacement);
4303
4304
  h && !p ? c = !1 : !h && p && (c = !0);
4304
4305
  }
4305
- c === !1 && eo(n, o, l, s), Wr(n, n.mapping.slice(s).map(l, 1), r, void 0, c === null);
4306
+ c === !1 && to(n, o, l, s), Wr(n, n.mapping.slice(s).map(l, 1), r, void 0, c === null);
4306
4307
  let d = n.mapping.slice(s), u = d.map(l, 1), f = d.map(l + o.nodeSize, 1);
4307
- return n.step(new V(u, f, u + 1, f - 1, new k(b.from(r.create(a, null, o.marks)), 0, 0), 1, !0)), c === !0 && Qs(n, o, l, s), !1;
4308
+ return n.step(new V(u, f, u + 1, f - 1, new k(b.from(r.create(a, null, o.marks)), 0, 0), 1, !0)), c === !0 && eo(n, o, l, s), !1;
4308
4309
  }
4309
4310
  });
4310
4311
  }
4311
- function Qs(n, e, t, r) {
4312
+ function eo(n, e, t, r) {
4312
4313
  e.forEach((i, s) => {
4313
4314
  if (i.isText) {
4314
4315
  let o, l = /\r?\n|\r/g;
@@ -4319,7 +4320,7 @@ function Qs(n, e, t, r) {
4319
4320
  }
4320
4321
  });
4321
4322
  }
4322
- function eo(n, e, t, r) {
4323
+ function to(n, e, t, r) {
4323
4324
  e.forEach((i, s) => {
4324
4325
  if (i.type == i.type.schema.linebreakReplacement) {
4325
4326
  let o = n.mapping.slice(r).map(t + 1 + s);
@@ -4372,7 +4373,7 @@ function ga(n, e, t = 1, r) {
4372
4373
  }
4373
4374
  function Ke(n, e) {
4374
4375
  let t = n.resolve(e), r = t.index();
4375
- return to(t.nodeBefore, t.nodeAfter) && t.parent.canReplace(r, r + 1);
4376
+ return no(t.nodeBefore, t.nodeAfter) && t.parent.canReplace(r, r + 1);
4376
4377
  }
4377
4378
  function ya(n, e) {
4378
4379
  e.content.size || n.type.compatibleContent(e.type);
@@ -4384,14 +4385,14 @@ function ya(n, e) {
4384
4385
  }
4385
4386
  return t.validEnd;
4386
4387
  }
4387
- function to(n, e) {
4388
+ function no(n, e) {
4388
4389
  return !!(n && e && !n.isLeaf && ya(n, e));
4389
4390
  }
4390
4391
  function Ln(n, e, t = -1) {
4391
4392
  let r = n.resolve(e);
4392
4393
  for (let i = r.depth; ; i--) {
4393
4394
  let s, o, l = r.index(i);
4394
- if (i == r.depth ? (s = r.nodeBefore, o = r.nodeAfter) : t > 0 ? (s = r.node(i + 1), l++, o = r.node(i).maybeChild(l)) : (s = r.node(i).maybeChild(l - 1), o = r.node(i + 1)), s && !s.isTextblock && to(s, o) && r.node(i).canReplace(l, l + 1))
4395
+ if (i == r.depth ? (s = r.nodeBefore, o = r.nodeAfter) : t > 0 ? (s = r.node(i + 1), l++, o = r.node(i).maybeChild(l)) : (s = r.node(i).maybeChild(l - 1), o = r.node(i + 1)), s && !s.isTextblock && no(s, o) && r.node(i).canReplace(l, l + 1))
4395
4396
  return e;
4396
4397
  if (i == 0)
4397
4398
  break;
@@ -4407,13 +4408,13 @@ function ba(n, e, t) {
4407
4408
  let l = n.steps.length;
4408
4409
  if (r === !1) {
4409
4410
  let d = n.doc.resolve(e + t);
4410
- eo(n, d.node(), d.before(), l);
4411
+ to(n, d.node(), d.before(), l);
4411
4412
  }
4412
4413
  o.inlineContent && Wr(n, e + t - 1, o, s.node().contentMatchAt(s.index()), r == null);
4413
4414
  let a = n.mapping.slice(l), c = a.map(e - t);
4414
4415
  if (n.step(new L(c, a.map(e + t, -1), k.empty, !0)), r === !0) {
4415
4416
  let d = n.doc.resolve(c);
4416
- Qs(n, d.node(), d.before(), n.steps.length);
4417
+ eo(n, d.node(), d.before(), n.steps.length);
4417
4418
  }
4418
4419
  return n;
4419
4420
  }
@@ -4439,7 +4440,7 @@ function ka(n, e, t) {
4439
4440
  }
4440
4441
  return null;
4441
4442
  }
4442
- function no(n, e, t) {
4443
+ function ro(n, e, t) {
4443
4444
  let r = n.resolve(e);
4444
4445
  if (!t.content.size)
4445
4446
  return e;
@@ -4464,9 +4465,9 @@ function zn(n, e, t = e, r = k.empty) {
4464
4465
  if (e == t && !r.size)
4465
4466
  return null;
4466
4467
  let i = n.resolve(e), s = n.resolve(t);
4467
- return ro(i, s, r) ? new L(e, t, r) : new xa(i, s, r).fit();
4468
+ return io(i, s, r) ? new L(e, t, r) : new xa(i, s, r).fit();
4468
4469
  }
4469
- function ro(n, e, t) {
4470
+ function io(n, e, t) {
4470
4471
  return !t.openStart && !t.openEnd && n.start() == e.start() && n.parent.canReplace(n.index(), e.index(), t.content);
4471
4472
  }
4472
4473
  class xa {
@@ -4560,7 +4561,7 @@ class xa {
4560
4561
  let m = l.child(c), g = u.matchType(m.type);
4561
4562
  if (!g)
4562
4563
  break;
4563
- c++, (c > 1 || a == 0 || m.content.size) && (u = g, d.push(io(m.mark(f.allowedMarks(m.marks)), c == 1 ? a : 0, c == l.childCount ? h : -1)));
4564
+ c++, (c > 1 || a == 0 || m.content.size) && (u = g, d.push(so(m.mark(f.allowedMarks(m.marks)), c == 1 ? a : 0, c == l.childCount ? h : -1)));
4564
4565
  }
4565
4566
  let p = c == l.childCount;
4566
4567
  p || (h = -1), this.placed = Nt(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();
@@ -4627,11 +4628,11 @@ function Zn(n, e) {
4627
4628
  n = n.firstChild.content;
4628
4629
  return n;
4629
4630
  }
4630
- function io(n, e, t) {
4631
+ function so(n, e, t) {
4631
4632
  if (e <= 0)
4632
4633
  return n;
4633
4634
  let r = n.content;
4634
- return e > 1 && (r = r.replaceChild(0, io(r.firstChild, e - 1, r.childCount == 1 ? t - 1 : 0))), e > 0 && (r = n.type.contentMatch.fillBefore(r).append(r), t <= 0 && (r = r.append(n.type.contentMatch.matchFragment(r).fillBefore(b.empty, !0)))), n.copy(r);
4635
+ return e > 1 && (r = r.replaceChild(0, so(r.firstChild, e - 1, r.childCount == 1 ? t - 1 : 0))), e > 0 && (r = n.type.contentMatch.fillBefore(r).append(r), t <= 0 && (r = r.append(n.type.contentMatch.matchFragment(r).fillBefore(b.empty, !0)))), n.copy(r);
4635
4636
  }
4636
4637
  function Qn(n, e, t, r, i) {
4637
4638
  let s = n.node(e), o = i ? n.indexAfter(e) : n.index(e);
@@ -4653,9 +4654,9 @@ function Ma(n, e, t, r) {
4653
4654
  if (!r.size)
4654
4655
  return n.deleteRange(e, t);
4655
4656
  let i = n.doc.resolve(e), s = n.doc.resolve(t);
4656
- if (ro(i, s, r))
4657
+ if (io(i, s, r))
4657
4658
  return n.step(new L(e, t, r));
4658
- let o = oo(i, s);
4659
+ let o = lo(i, s);
4659
4660
  o[o.length - 1] == 0 && o.pop();
4660
4661
  let l = -(i.depth + 1);
4661
4662
  o.unshift(l);
@@ -4687,7 +4688,7 @@ function Ma(n, e, t, r) {
4687
4688
  g < 0 && (y = !1, g = -g);
4688
4689
  let T = i.node(g - 1), M = i.index(g - 1);
4689
4690
  if (T.canReplaceWith(M, M, p.type, p.marks))
4690
- return n.replace(i.before(g), y ? s.after(g) : t, new k(so(r.content, 0, r.openStart, h), h, r.openEnd));
4691
+ return n.replace(i.before(g), y ? s.after(g) : t, new k(oo(r.content, 0, r.openStart, h), h, r.openEnd));
4691
4692
  }
4692
4693
  }
4693
4694
  let u = n.steps.length;
@@ -4696,10 +4697,10 @@ function Ma(n, e, t, r) {
4696
4697
  h < 0 || (e = i.before(h), t = s.after(h));
4697
4698
  }
4698
4699
  }
4699
- function so(n, e, t, r, i) {
4700
+ function oo(n, e, t, r, i) {
4700
4701
  if (e < t) {
4701
4702
  let s = n.firstChild;
4702
- n = n.replaceChild(0, s.copy(so(s.content, e + 1, t, r, s)));
4703
+ n = n.replaceChild(0, s.copy(oo(s.content, e + 1, t, r, s)));
4703
4704
  }
4704
4705
  if (e > r) {
4705
4706
  let s = i.contentMatchAt(0), o = s.fillBefore(n).append(n);
@@ -4730,7 +4731,7 @@ function Ta(n, e, t) {
4730
4731
  r = n.doc.resolve(e), i = n.doc.resolve(t);
4731
4732
  }
4732
4733
  }
4733
- let s = oo(r, i);
4734
+ let s = lo(r, i);
4734
4735
  for (let o = 0; o < s.length; o++) {
4735
4736
  let l = s[o], a = o == s.length - 1;
4736
4737
  if (a && l == 0 || r.node(l).type.contentMatch.validEnd)
@@ -4743,7 +4744,7 @@ function Ta(n, e, t) {
4743
4744
  return n.delete(r.before(o), t);
4744
4745
  n.delete(e, t);
4745
4746
  }
4746
- function oo(n, e) {
4747
+ function lo(n, e) {
4747
4748
  let t = [], r = Math.min(n.depth, e.depth);
4748
4749
  for (let i = r; i >= 0; i--) {
4749
4750
  let s = n.start(i);
@@ -5838,10 +5839,10 @@ class gt {
5838
5839
  }), s;
5839
5840
  }
5840
5841
  }
5841
- function lo(n, e, t) {
5842
+ function ao(n, e, t) {
5842
5843
  for (let r in n) {
5843
5844
  let i = n[r];
5844
- i instanceof Function ? i = i.bind(e) : r == "handleDOMEvents" && (i = lo(i, e, {})), t[r] = i;
5845
+ i instanceof Function ? i = i.bind(e) : r == "handleDOMEvents" && (i = ao(i, e, {})), t[r] = i;
5845
5846
  }
5846
5847
  return t;
5847
5848
  }
@@ -5850,7 +5851,7 @@ class oe {
5850
5851
  Create a plugin.
5851
5852
  */
5852
5853
  constructor(e) {
5853
- this.spec = e, this.props = {}, e.props && lo(e.props, this, this.props), this.key = e.key ? e.key.key : ao("plugin");
5854
+ this.spec = e, this.props = {}, e.props && ao(e.props, this, this.props), this.key = e.key ? e.key.key : co("plugin");
5854
5855
  }
5855
5856
  /**
5856
5857
  Extract the plugin's state field from an editor state.
@@ -5860,7 +5861,7 @@ class oe {
5860
5861
  }
5861
5862
  }
5862
5863
  const nr = /* @__PURE__ */ Object.create(null);
5863
- function ao(n) {
5864
+ function co(n) {
5864
5865
  return n in nr ? n + "$" + ++nr[n] : (nr[n] = 0, n + "$");
5865
5866
  }
5866
5867
  class Ce {
@@ -5868,7 +5869,7 @@ class Ce {
5868
5869
  Create a plugin key.
5869
5870
  */
5870
5871
  constructor(e = "key") {
5871
- this.key = ao(e);
5872
+ this.key = co(e);
5872
5873
  }
5873
5874
  /**
5874
5875
  Get the active plugin with this key, if any, from an editor
@@ -5997,9 +5998,9 @@ function za(n, e, t) {
5997
5998
  return { node: r.startContainer, offset: Math.min(fe(r.startContainer), r.startOffset) };
5998
5999
  }
5999
6000
  }
6000
- const Se = typeof navigator < "u" ? navigator : null, Ri = typeof document < "u" ? document : null, Je = Se && Se.userAgent || "", Tr = /Edge\/(\d+)/.exec(Je), co = /MSIE \d/.exec(Je), Or = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Je), se = !!(co || Or || Tr), He = co ? document.documentMode : Or ? +Or[1] : Tr ? +Tr[1] : 0, pe = !se && /gecko\/(\d+)/i.test(Je);
6001
+ const Se = typeof navigator < "u" ? navigator : null, Ri = typeof document < "u" ? document : null, Je = Se && Se.userAgent || "", Tr = /Edge\/(\d+)/.exec(Je), uo = /MSIE \d/.exec(Je), Or = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Je), se = !!(uo || Or || Tr), He = uo ? document.documentMode : Or ? +Or[1] : Tr ? +Tr[1] : 0, pe = !se && /gecko\/(\d+)/i.test(Je);
6001
6002
  pe && +(/Firefox\/(\d+)/.exec(Je) || [0, 0])[1];
6002
- const vr = !se && /Chrome\/(\d+)/.exec(Je), _ = !!vr, uo = vr ? +vr[1] : 0, Q = !se && !!Se && /Apple Computer/.test(Se.vendor), Ct = Q && (/Mobile\/\w+/.test(Je) || !!Se && Se.maxTouchPoints > 2), ue = Ct || (Se ? /Mac/.test(Se.platform) : !1), fo = Se ? /Win/.test(Se.platform) : !1, Ae = /Android \d/.test(Je), nn = !!Ri && "webkitFontSmoothing" in Ri.documentElement.style, Fa = nn ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
6003
+ const vr = !se && /Chrome\/(\d+)/.exec(Je), _ = !!vr, fo = vr ? +vr[1] : 0, Q = !se && !!Se && /Apple Computer/.test(Se.vendor), Ct = Q && (/Mobile\/\w+/.test(Je) || !!Se && Se.maxTouchPoints > 2), ue = Ct || (Se ? /Mac/.test(Se.platform) : !1), ho = Se ? /Win/.test(Se.platform) : !1, Ae = /Android \d/.test(Je), nn = !!Ri && "webkitFontSmoothing" in Ri.documentElement.style, Fa = nn ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
6003
6004
  function $a(n) {
6004
6005
  let e = n.defaultView && n.defaultView.visualViewport;
6005
6006
  return e ? {
@@ -6061,9 +6062,9 @@ function Ha(n) {
6061
6062
  break;
6062
6063
  }
6063
6064
  }
6064
- return { refDOM: r, refTop: i, stack: ho(n.dom) };
6065
+ return { refDOM: r, refTop: i, stack: po(n.dom) };
6065
6066
  }
6066
- function ho(n) {
6067
+ function po(n) {
6067
6068
  let e = [], t = n.ownerDocument;
6068
6069
  for (let r = n; r && (e.push({ dom: r, top: r.scrollTop, left: r.scrollLeft }), n != t); r = Mt(r))
6069
6070
  ;
@@ -6071,9 +6072,9 @@ function ho(n) {
6071
6072
  }
6072
6073
  function Wa({ refDOM: n, refTop: e, stack: t }) {
6073
6074
  let r = n ? n.getBoundingClientRect().top : 0;
6074
- po(t, r == 0 ? 0 : r - e);
6075
+ mo(t, r == 0 ? 0 : r - e);
6075
6076
  }
6076
- function po(n, e) {
6077
+ function mo(n, e) {
6077
6078
  for (let t = 0; t < n.length; t++) {
6078
6079
  let { dom: r, top: i, left: s } = n[t];
6079
6080
  r.scrollTop != i + e && (r.scrollTop = i + e), r.scrollLeft != s && (r.scrollLeft = s);
@@ -6085,14 +6086,14 @@ function qa(n) {
6085
6086
  return n.setActive();
6086
6087
  if (ft)
6087
6088
  return n.focus(ft);
6088
- let e = ho(n);
6089
+ let e = po(n);
6089
6090
  n.focus(ft == null ? {
6090
6091
  get preventScroll() {
6091
6092
  return ft = { preventScroll: !0 }, !0;
6092
6093
  }
6093
- } : void 0), ft || (ft = !1, po(e, 0));
6094
+ } : void 0), ft || (ft = !1, mo(e, 0));
6094
6095
  }
6095
- function mo(n, e) {
6096
+ function go(n, e) {
6096
6097
  let t, r = 2e8, i, s = 0, o = e.top, l = e.top, a, c;
6097
6098
  for (let d = n.firstChild, u = 0; d; d = d.nextSibling, u++) {
6098
6099
  let f;
@@ -6118,7 +6119,7 @@ function mo(n, e) {
6118
6119
  !t && (e.left >= p.right && e.top >= p.top || e.left >= p.left && e.top >= p.bottom) && (s = u + 1);
6119
6120
  }
6120
6121
  }
6121
- return !t && a && (t = a, i = c, r = 0), t && t.nodeType == 3 ? ja(t, i) : !t || r && t.nodeType == 1 ? { node: n, offset: s } : mo(t, i);
6122
+ return !t && a && (t = a, i = c, r = 0), t && t.nodeType == 3 ? ja(t, i) : !t || r && t.nodeType == 1 ? { node: n, offset: s } : go(t, i);
6122
6123
  }
6123
6124
  function ja(n, e) {
6124
6125
  let t = n.nodeValue.length, r = document.createRange(), i;
@@ -6140,7 +6141,7 @@ function Ka(n, e) {
6140
6141
  return t && /^li$/i.test(t.nodeName) && e.left < n.getBoundingClientRect().left ? t : n;
6141
6142
  }
6142
6143
  function Ja(n, e, t) {
6143
- let { node: r, offset: i } = mo(e, t), s = -1;
6144
+ let { node: r, offset: i } = go(e, t), s = -1;
6144
6145
  if (r.nodeType == 1 && !r.firstChild) {
6145
6146
  let o = r.getBoundingClientRect();
6146
6147
  s = o.left != o.right && t.left > (o.left + o.right) / 2 ? 1 : -1;
@@ -6160,7 +6161,7 @@ function Ua(n, e, t, r) {
6160
6161
  }
6161
6162
  return i > -1 ? i : n.docView.posFromDOM(e, t, -1);
6162
6163
  }
6163
- function go(n, e, t) {
6164
+ function yo(n, e, t) {
6164
6165
  let r = n.childNodes.length;
6165
6166
  if (r && t.top < t.bottom)
6166
6167
  for (let i = Math.max(0, Math.min(r - 1, Math.floor(r * (e.top - t.top) / (t.bottom - t.top)) - 2)), s = i; ; ) {
@@ -6170,7 +6171,7 @@ function go(n, e, t) {
6170
6171
  for (let a = 0; a < l.length; a++) {
6171
6172
  let c = l[a];
6172
6173
  if (Kr(e, c))
6173
- return go(o, e, c);
6174
+ return yo(o, e, c);
6174
6175
  }
6175
6176
  }
6176
6177
  if ((s = (s + 1) % r) == i)
@@ -6184,7 +6185,7 @@ function _a(n, e) {
6184
6185
  let o = (n.root.elementFromPoint ? n.root : t).elementFromPoint(e.left, e.top), l;
6185
6186
  if (!o || !n.dom.contains(o.nodeType != 1 ? o.parentNode : o)) {
6186
6187
  let c = n.dom.getBoundingClientRect();
6187
- if (!Kr(e, c) || (o = go(n.dom, e, c), !o))
6188
+ if (!Kr(e, c) || (o = yo(n.dom, e, c), !o))
6188
6189
  return null;
6189
6190
  }
6190
6191
  if (Q)
@@ -6215,7 +6216,7 @@ function Ie(n, e) {
6215
6216
  return Array.prototype.find.call(t, Bi) || n.getBoundingClientRect();
6216
6217
  }
6217
6218
  const Ga = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
6218
- function yo(n, e, t) {
6219
+ function bo(n, e, t) {
6219
6220
  let { node: r, offset: i, atom: s } = n.docView.domFromPos(e, t < 0 ? -1 : 1), o = nn || pe;
6220
6221
  if (r.nodeType == 3)
6221
6222
  if (o && (Ga.test(r.nodeValue) || (t < 0 ? !i : i == r.nodeValue.length))) {
@@ -6273,7 +6274,7 @@ function rr(n, e) {
6273
6274
  let t = e ? n.top : n.bottom;
6274
6275
  return { top: t, bottom: t, left: n.left, right: n.right };
6275
6276
  }
6276
- function bo(n, e, t) {
6277
+ function ko(n, e, t) {
6277
6278
  let r = n.state, i = n.root.activeElement;
6278
6279
  r != e && n.updateState(e), i != n.dom && n.focus();
6279
6280
  try {
@@ -6284,7 +6285,7 @@ function bo(n, e, t) {
6284
6285
  }
6285
6286
  function Xa(n, e, t) {
6286
6287
  let r = e.selection, i = t == "up" ? r.$from : r.$to;
6287
- return bo(n, e, () => {
6288
+ return ko(n, e, () => {
6288
6289
  let { node: s } = n.docView.domFromPos(i.pos, t == "up" ? -1 : 1);
6289
6290
  for (; ; ) {
6290
6291
  let l = n.docView.nearestDesc(s, !0);
@@ -6296,7 +6297,7 @@ function Xa(n, e, t) {
6296
6297
  }
6297
6298
  s = l.dom.parentNode;
6298
6299
  }
6299
- let o = yo(n, i.pos, 1);
6300
+ let o = bo(n, i.pos, 1);
6300
6301
  for (let l = s.firstChild; l; l = l.nextSibling) {
6301
6302
  let a;
6302
6303
  if (l.nodeType == 1)
@@ -6320,7 +6321,7 @@ function Za(n, e, t) {
6320
6321
  if (!r.parent.isTextblock)
6321
6322
  return !1;
6322
6323
  let i = r.parentOffset, s = !i, o = i == r.parent.content.size, l = n.domSelection();
6323
- return l ? !Ya.test(r.parent.textContent) || !l.modify ? t == "left" || t == "backward" ? s : o : bo(n, e, () => {
6324
+ return l ? !Ya.test(r.parent.textContent) || !l.modify ? t == "left" || t == "backward" ? s : o : ko(n, e, () => {
6324
6325
  let { focusNode: a, focusOffset: c, anchorNode: d, anchorOffset: u } = n.domSelectionRange(), f = l.caretBidiLevel;
6325
6326
  l.modify("move", t, "character");
6326
6327
  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;
@@ -6507,7 +6508,7 @@ class rn {
6507
6508
  let r = 0, i = 0;
6508
6509
  for (let s = 0; r < this.children.length; r++) {
6509
6510
  let o = this.children[r], l = s + o.size;
6510
- if (l > e || o instanceof xo) {
6511
+ if (l > e || o instanceof So) {
6511
6512
  i = e - s;
6512
6513
  break;
6513
6514
  }
@@ -6515,7 +6516,7 @@ class rn {
6515
6516
  }
6516
6517
  if (i)
6517
6518
  return this.children[r].domFromPos(i - this.children[r].border, t);
6518
- for (let s; r && !(s = this.children[r - 1]).size && s instanceof ko && s.side >= 0; r--)
6519
+ for (let s; r && !(s = this.children[r - 1]).size && s instanceof xo && s.side >= 0; r--)
6519
6520
  ;
6520
6521
  if (t <= 0) {
6521
6522
  let s, o = !0;
@@ -6680,7 +6681,7 @@ class rn {
6680
6681
  return !1;
6681
6682
  }
6682
6683
  }
6683
- class ko extends rn {
6684
+ class xo extends rn {
6684
6685
  constructor(e, t, r, i) {
6685
6686
  let s, o = t.type.toDOM;
6686
6687
  if (typeof o == "function" && (o = o(r, () => {
@@ -6804,7 +6805,7 @@ class We extends rn {
6804
6805
  } else d || ({ dom: d, contentDOM: u } = ut.renderSpec(document, t.type.spec.toDOM(t), null, t.attrs));
6805
6806
  !u && !t.isText && d.nodeName != "BR" && (d.hasAttribute("contenteditable") || (d.contentEditable = "false"), t.type.spec.draggable && (d.draggable = !0));
6806
6807
  let f = d;
6807
- return d = Mo(d, r, t), c ? a = new tc(e, t, r, i, d, u || null, f, c, s, o + 1) : t.isText ? new Vn(e, t, r, i, d, f, s) : new We(e, t, r, i, d, u || null, f, s, o + 1);
6808
+ return d = Co(d, r, t), c ? a = new tc(e, t, r, i, d, u || null, f, c, s, o + 1) : t.isText ? new Vn(e, t, r, i, d, f, s) : new We(e, t, r, i, d, u || null, f, s, o + 1);
6808
6809
  }
6809
6810
  parseRule() {
6810
6811
  if (this.node.type.spec.reparseInView)
@@ -6847,7 +6848,7 @@ class We extends rn {
6847
6848
  a.syncToMarks(c.marks, r, e, f);
6848
6849
  let h;
6849
6850
  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;
6850
- }), a.syncToMarks([], r, e, 0), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == Xe) && (o && this.protectLocalComposition(e, o), So(this.contentDOM, this.children, e), Ct && lc(this.dom));
6851
+ }), a.syncToMarks([], r, e, 0), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == Xe) && (o && this.protectLocalComposition(e, o), wo(this.contentDOM, this.children, e), Ct && lc(this.dom));
6851
6852
  }
6852
6853
  localCompositionInfo(e, t) {
6853
6854
  let { from: r, to: i } = e.state.selection;
@@ -6888,7 +6889,7 @@ class We extends rn {
6888
6889
  if (wn(e, this.outerDeco))
6889
6890
  return;
6890
6891
  let t = this.nodeDOM.nodeType != 1, r = this.dom;
6891
- this.dom = wo(this.dom, this.nodeDOM, Er(this.outerDeco, this.node, t), Er(e, this.node, t)), this.dom != r && (r.pmViewDesc = void 0, this.dom.pmViewDesc = this), this.outerDeco = e;
6892
+ this.dom = Mo(this.dom, this.nodeDOM, Er(this.outerDeco, this.node, t), Er(e, this.node, t)), this.dom != r && (r.pmViewDesc = void 0, this.dom.pmViewDesc = this), this.outerDeco = e;
6892
6893
  }
6893
6894
  // Mark this node as being the selected node.
6894
6895
  selectNode() {
@@ -6903,7 +6904,7 @@ class We extends rn {
6903
6904
  }
6904
6905
  }
6905
6906
  function Vi(n, e, t, r, i) {
6906
- Mo(r, e, n);
6907
+ Co(r, e, n);
6907
6908
  let s = new We(void 0, n, e, t, r, r, r, i, 0);
6908
6909
  return s.contentDOM && s.updateChildren(i, 0), s;
6909
6910
  }
@@ -6950,7 +6951,7 @@ class Vn extends We {
6950
6951
  return this.node.text == e;
6951
6952
  }
6952
6953
  }
6953
- class xo extends rn {
6954
+ class So extends rn {
6954
6955
  parseRule() {
6955
6956
  return { ignore: !0 };
6956
6957
  }
@@ -6998,7 +6999,7 @@ class tc extends We {
6998
6999
  return this.spec.ignoreMutation ? this.spec.ignoreMutation(e) : super.ignoreMutation(e);
6999
7000
  }
7000
7001
  }
7001
- function So(n, e, t) {
7002
+ function wo(n, e, t) {
7002
7003
  let r = n.firstChild, i = !1;
7003
7004
  for (let s = 0; s < e.length; s++) {
7004
7005
  let o = e[s], l = o.dom;
@@ -7010,7 +7011,7 @@ function So(n, e, t) {
7010
7011
  i = !0, n.insertBefore(l, r);
7011
7012
  if (o instanceof at) {
7012
7013
  let a = r ? r.previousSibling : n.lastChild;
7013
- So(o.contentDOM, o.children, t), r = a ? a.nextSibling : n.firstChild;
7014
+ wo(o.contentDOM, o.children, t), r = a ? a.nextSibling : n.firstChild;
7014
7015
  }
7015
7016
  }
7016
7017
  for (; r; )
@@ -7038,7 +7039,7 @@ function Er(n, e, t) {
7038
7039
  }
7039
7040
  return i;
7040
7041
  }
7041
- function wo(n, e, t, r) {
7042
+ function Mo(n, e, t, r) {
7042
7043
  if (t == Ye && r == Ye)
7043
7044
  return e;
7044
7045
  let i = e;
@@ -7074,8 +7075,8 @@ function nc(n, e, t) {
7074
7075
  t.style && (n.style.cssText += t.style);
7075
7076
  }
7076
7077
  }
7077
- function Mo(n, e, t) {
7078
- return wo(n, n, Ye, Er(e, t, n.nodeType != 1));
7078
+ function Co(n, e, t) {
7079
+ return Mo(n, n, Ye, Er(e, t, n.nodeType != 1));
7079
7080
  }
7080
7081
  function wn(n, e) {
7081
7082
  if (n.length != e.length)
@@ -7213,7 +7214,7 @@ class rc {
7213
7214
  if (i && i.matchesWidget(e) && (e == i.widget || !i.widget.type.toDOM.parentNode))
7214
7215
  this.index++;
7215
7216
  else {
7216
- let s = new ko(this.top, e, t, r);
7217
+ let s = new xo(this.top, e, t, r);
7217
7218
  this.top.children.splice(this.index++, 0, s), this.changed = !0;
7218
7219
  }
7219
7220
  }
@@ -7232,7 +7233,7 @@ class rc {
7232
7233
  else {
7233
7234
  let r = document.createElement(e);
7234
7235
  e == "IMG" && (r.className = "ProseMirror-separator", r.alt = ""), e == "BR" && (r.className = "ProseMirror-trailingBreak");
7235
- let i = new xo(this.top, [], r, null);
7236
+ let i = new So(this.top, [], r, null);
7236
7237
  t != this.top ? t.children.push(i) : t.children.splice(this.index++, 0, i), this.changed = !0;
7237
7238
  }
7238
7239
  }
@@ -7394,12 +7395,12 @@ function Jr(n, e = null) {
7394
7395
  }
7395
7396
  return c;
7396
7397
  }
7397
- function Co(n) {
7398
- return n.editable ? n.hasFocus() : Oo(n) && document.activeElement && document.activeElement.contains(n.dom);
7398
+ function To(n) {
7399
+ return n.editable ? n.hasFocus() : vo(n) && document.activeElement && document.activeElement.contains(n.dom);
7399
7400
  }
7400
7401
  function De(n, e = !1) {
7401
7402
  let t = n.state.selection;
7402
- if (To(n, t), !!Co(n)) {
7403
+ if (Oo(n, t), !!To(n)) {
7403
7404
  if (!e && n.input.mouseDown && n.input.mouseDown.allowDefault && _) {
7404
7405
  let r = n.domSelectionRange(), i = n.domObserver.currentSelection;
7405
7406
  if (r.anchorNode && i.anchorNode && lt(r.anchorNode, r.anchorOffset, i.anchorNode, i.anchorOffset)) {
@@ -7416,7 +7417,7 @@ function De(n, e = !1) {
7416
7417
  n.domObserver.setCurSelection(), n.domObserver.connectSelection();
7417
7418
  }
7418
7419
  }
7419
- const Wi = Q || _ && uo < 63;
7420
+ const Wi = Q || _ && fo < 63;
7420
7421
  function qi(n, e) {
7421
7422
  let { node: t, offset: r } = n.docView.domFromPos(e, 0), i = r < t.childNodes.length ? t.childNodes[r] : null, s = r ? t.childNodes[r - 1] : null;
7422
7423
  if (Q && i && i.contentEditable == "false")
@@ -7440,7 +7441,7 @@ function cc(n) {
7440
7441
  let t = n.domSelectionRange(), r = t.anchorNode, i = t.anchorOffset;
7441
7442
  e.addEventListener("selectionchange", n.input.hideSelectionGuard = () => {
7442
7443
  (t.anchorNode != r || t.anchorOffset != i) && (e.removeEventListener("selectionchange", n.input.hideSelectionGuard), setTimeout(() => {
7443
- (!Co(n) || n.state.selection.visible) && n.dom.classList.remove("ProseMirror-hideselection");
7444
+ (!To(n) || n.state.selection.visible) && n.dom.classList.remove("ProseMirror-hideselection");
7444
7445
  }, 20));
7445
7446
  });
7446
7447
  }
@@ -7451,7 +7452,7 @@ function dc(n) {
7451
7452
  let t = n.cursorWrapper.dom, r = t.nodeName == "IMG";
7452
7453
  r ? e.collapse(t.parentNode, J(t) + 1) : e.collapse(t, 0), !r && !n.state.selection.visible && se && He <= 11 && (t.disabled = !0, t.disabled = !1);
7453
7454
  }
7454
- function To(n, e) {
7455
+ function Oo(n, e) {
7455
7456
  if (e instanceof S) {
7456
7457
  let t = n.docView.descAt(e.from);
7457
7458
  t != n.lastSelectedViewDesc && (Ki(n), t && t.selectNode(), n.lastSelectedViewDesc = t);
@@ -7465,9 +7466,9 @@ function Ur(n, e, t, r) {
7465
7466
  return n.someProp("createSelectionBetween", (i) => i(n, e, t)) || w.between(e, t, r);
7466
7467
  }
7467
7468
  function Ji(n) {
7468
- return n.editable && !n.hasFocus() ? !1 : Oo(n);
7469
+ return n.editable && !n.hasFocus() ? !1 : vo(n);
7469
7470
  }
7470
- function Oo(n) {
7471
+ function vo(n) {
7471
7472
  let e = n.domSelectionRange();
7472
7473
  if (!e.anchorNode)
7473
7474
  return !1;
@@ -7547,7 +7548,7 @@ function fc(n) {
7547
7548
  break;
7548
7549
  }
7549
7550
  } else {
7550
- if (vo(t))
7551
+ if (Eo(t))
7551
7552
  break;
7552
7553
  {
7553
7554
  let l = t.previousSibling;
@@ -7579,7 +7580,7 @@ function hc(n) {
7579
7580
  else
7580
7581
  break;
7581
7582
  } else {
7582
- if (vo(t))
7583
+ if (Eo(t))
7583
7584
  break;
7584
7585
  {
7585
7586
  let l = t.nextSibling;
@@ -7596,7 +7597,7 @@ function hc(n) {
7596
7597
  }
7597
7598
  s && Dr(n, s, o);
7598
7599
  }
7599
- function vo(n) {
7600
+ function Eo(n) {
7600
7601
  let e = n.pmViewDesc;
7601
7602
  return e && e.node && e.node.isBlock;
7602
7603
  }
@@ -7644,7 +7645,7 @@ function Dr(n, e, t) {
7644
7645
  }
7645
7646
  function _i(n, e) {
7646
7647
  let t = n.state.doc.resolve(e);
7647
- if (!(_ || fo) && t.parent.inlineContent) {
7648
+ if (!(_ || ho) && t.parent.inlineContent) {
7648
7649
  let i = n.coordsAtPos(e);
7649
7650
  if (e > t.start()) {
7650
7651
  let s = n.coordsAtPos(e - 1), o = (s.top + s.bottom) / 2;
@@ -7743,10 +7744,10 @@ function _r(n, e) {
7743
7744
  let h = r.firstChild;
7744
7745
  t.push(h.type.name, h.attrs != h.type.defaultAttrs ? h.attrs : null), r = h.content;
7745
7746
  }
7746
- let o = n.someProp("clipboardSerializer") || ut.fromSchema(n.state.schema), l = Ro(), a = l.createElement("div");
7747
+ let o = n.someProp("clipboardSerializer") || ut.fromSchema(n.state.schema), l = Po(), a = l.createElement("div");
7747
7748
  a.appendChild(o.serializeFragment(r, { document: l }));
7748
7749
  let c = a.firstChild, d, u = 0;
7749
- for (; c && c.nodeType == 1 && (d = Io[c.nodeName.toLowerCase()]); ) {
7750
+ for (; c && c.nodeType == 1 && (d = Ro[c.nodeName.toLowerCase()]); ) {
7750
7751
  for (let h = d.length - 1; h >= 0; h--) {
7751
7752
  let p = l.createElement(d[h]);
7752
7753
  for (; a.firstChild; )
@@ -7761,7 +7762,7 @@ function _r(n, e) {
7761
7762
  `);
7762
7763
  return { dom: a, text: f, slice: e };
7763
7764
  }
7764
- function Eo(n, e, t, r, i) {
7765
+ function Ao(n, e, t, r, i) {
7765
7766
  let s = i.parent.type.spec.code, o, l;
7766
7767
  if (!t && !e)
7767
7768
  return null;
@@ -7830,11 +7831,11 @@ function xc(n, e) {
7830
7831
  let a = i.findWrapping(l.type), c;
7831
7832
  if (!a)
7832
7833
  return o = null;
7833
- if (c = o.length && s.length && No(a, s, l, o[o.length - 1], 0))
7834
+ if (c = o.length && s.length && Do(a, s, l, o[o.length - 1], 0))
7834
7835
  o[o.length - 1] = c;
7835
7836
  else {
7836
- o.length && (o[o.length - 1] = Do(o[o.length - 1], s.length));
7837
- let d = Ao(l, a);
7837
+ o.length && (o[o.length - 1] = Io(o[o.length - 1], s.length));
7838
+ let d = No(l, a);
7838
7839
  o.push(d), i = i.matchType(d.type), s = a;
7839
7840
  }
7840
7841
  }), o)
@@ -7842,24 +7843,24 @@ function xc(n, e) {
7842
7843
  }
7843
7844
  return n;
7844
7845
  }
7845
- function Ao(n, e, t = 0) {
7846
+ function No(n, e, t = 0) {
7846
7847
  for (let r = e.length - 1; r >= t; r--)
7847
7848
  n = e[r].create(null, b.from(n));
7848
7849
  return n;
7849
7850
  }
7850
- function No(n, e, t, r, i) {
7851
+ function Do(n, e, t, r, i) {
7851
7852
  if (i < n.length && i < e.length && n[i] == e[i]) {
7852
- let s = No(n, e, t, r.lastChild, i + 1);
7853
+ let s = Do(n, e, t, r.lastChild, i + 1);
7853
7854
  if (s)
7854
7855
  return r.copy(r.content.replaceChild(r.childCount - 1, s));
7855
7856
  if (r.contentMatchAt(r.childCount).matchType(i == n.length - 1 ? t.type : n[i + 1]))
7856
- return r.copy(r.content.append(b.from(Ao(t, n, i + 1))));
7857
+ return r.copy(r.content.append(b.from(No(t, n, i + 1))));
7857
7858
  }
7858
7859
  }
7859
- function Do(n, e) {
7860
+ function Io(n, e) {
7860
7861
  if (e == 0)
7861
7862
  return n;
7862
- let t = n.content.replaceChild(n.childCount - 1, Do(n.lastChild, e - 1)), r = n.contentMatchAt(n.childCount).fillBefore(b.empty, !0);
7863
+ let t = n.content.replaceChild(n.childCount - 1, Io(n.lastChild, e - 1)), r = n.contentMatchAt(n.childCount).fillBefore(b.empty, !0);
7863
7864
  return n.copy(t.append(r));
7864
7865
  }
7865
7866
  function Ir(n, e, t, r, i, s) {
@@ -7869,7 +7870,7 @@ function Ir(n, e, t, r, i, s) {
7869
7870
  function Zi(n, e, t) {
7870
7871
  return e < n.openStart && (n = new k(Ir(n.content, -1, e, n.openStart, 0, n.openEnd), e, n.openEnd)), t < n.openEnd && (n = new k(Ir(n.content, 1, t, n.openEnd, 0, 0), n.openStart, t)), n;
7871
7872
  }
7872
- const Io = {
7873
+ const Ro = {
7873
7874
  thead: ["table"],
7874
7875
  tbody: ["table"],
7875
7876
  tfoot: ["table"],
@@ -7881,7 +7882,7 @@ const Io = {
7881
7882
  th: ["table", "tbody", "tr"]
7882
7883
  };
7883
7884
  let Qi = null;
7884
- function Ro() {
7885
+ function Po() {
7885
7886
  return Qi || (Qi = document.implementation.createHTMLDocument("title"));
7886
7887
  }
7887
7888
  let sr = null;
@@ -7892,8 +7893,8 @@ function Sc(n) {
7892
7893
  function wc(n) {
7893
7894
  let e = /^(\s*<meta [^>]*>)*/.exec(n);
7894
7895
  e && (n = n.slice(e[0].length));
7895
- let t = Ro().createElement("div"), r = /<([a-z][^>\s]+)/i.exec(n), i;
7896
- if ((i = r && Io[r[1].toLowerCase()]) && (n = i.map((s) => "<" + s + ">").join("") + n + i.map((s) => "</" + s + ">").reverse().join("")), t.innerHTML = Sc(n), i)
7896
+ let t = Po().createElement("div"), r = /<([a-z][^>\s]+)/i.exec(n), i;
7897
+ if ((i = r && Ro[r[1].toLowerCase()]) && (n = i.map((s) => "<" + s + ">").join("") + n + i.map((s) => "</" + s + ">").reverse().join("")), t.innerHTML = Sc(n), i)
7897
7898
  for (let s = 0; s < i.length; s++)
7898
7899
  t = t.querySelector(i[s]) || t;
7899
7900
  return t;
@@ -7974,7 +7975,7 @@ function Nc(n, e) {
7974
7975
  }
7975
7976
  ne.keydown = (n, e) => {
7976
7977
  let t = e;
7977
- if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !Bo(n, t) && (n.input.lastKeyCode = t.keyCode, n.input.lastKeyCodeTime = Date.now(), !(Ae && _ && t.keyCode == 13)))
7978
+ if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !Lo(n, t) && (n.input.lastKeyCode = t.keyCode, n.input.lastKeyCodeTime = Date.now(), !(Ae && _ && t.keyCode == 13)))
7978
7979
  if (t.keyCode != 229 && n.domObserver.forceFlush(), Ct && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
7979
7980
  let r = Date.now();
7980
7981
  n.input.lastIOSEnter = r, n.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
@@ -7987,7 +7988,7 @@ ne.keyup = (n, e) => {
7987
7988
  };
7988
7989
  ne.keypress = (n, e) => {
7989
7990
  let t = e;
7990
- if (Bo(n, t) || !t.charCode || t.ctrlKey && !t.altKey || ue && t.metaKey)
7991
+ if (Lo(n, t) || !t.charCode || t.ctrlKey && !t.altKey || ue && t.metaKey)
7991
7992
  return;
7992
7993
  if (n.someProp("handleKeyPress", (i) => i(n, t))) {
7993
7994
  t.preventDefault();
@@ -8072,18 +8073,18 @@ function zc(n, e, t) {
8072
8073
  function Yr(n) {
8073
8074
  return Cn(n);
8074
8075
  }
8075
- const Po = ue ? "metaKey" : "ctrlKey";
8076
+ const Bo = ue ? "metaKey" : "ctrlKey";
8076
8077
  te.mousedown = (n, e) => {
8077
8078
  let t = e;
8078
8079
  n.input.shiftKey = t.shiftKey;
8079
8080
  let r = Yr(n), i = Date.now(), s = "singleClick";
8080
- i - n.input.lastClick.time < 500 && Dc(t, n.input.lastClick) && !t[Po] && 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 };
8081
+ i - n.input.lastClick.time < 500 && Dc(t, n.input.lastClick) && !t[Bo] && 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 };
8081
8082
  let o = n.posAtCoords(Hn(t));
8082
8083
  o && (s == "singleClick" ? (n.input.mouseDown && n.input.mouseDown.done(), n.input.mouseDown = new Fc(n, o, t, !!r)) : (s == "doubleClick" ? Bc : Lc)(n, o.pos, o.inside, t) ? t.preventDefault() : Fe(n, "pointer"));
8083
8084
  };
8084
8085
  class Fc {
8085
8086
  constructor(e, t, r, i) {
8086
- 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[Po], this.allowDefault = r.shiftKey;
8087
+ 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[Bo], this.allowDefault = r.shiftKey;
8087
8088
  let s, o;
8088
8089
  if (t.inside > -1)
8089
8090
  s = e.state.doc.nodeAt(t.inside), o = t.inside;
@@ -8134,7 +8135,7 @@ te.touchmove = (n) => {
8134
8135
  n.input.lastTouch = Date.now(), Fe(n, "pointer");
8135
8136
  };
8136
8137
  te.contextmenu = (n) => Yr(n);
8137
- function Bo(n, e) {
8138
+ function Lo(n, e) {
8138
8139
  return n.composing ? !0 : Q && Math.abs(e.timeStamp - n.input.compositionEndedAt) < 500 ? (n.input.compositionEndedAt = -2e8, !0) : !1;
8139
8140
  }
8140
8141
  const $c = Ae ? 5e3 : -1;
@@ -8142,7 +8143,7 @@ ne.compositionstart = ne.compositionupdate = (n) => {
8142
8143
  if (!n.composing) {
8143
8144
  n.domObserver.flush();
8144
8145
  let { state: e } = n, t = e.selection.$to;
8145
- if (e.selection instanceof w && (e.storedMarks || !t.textOffset && t.parentOffset && t.nodeBefore.marks.some((r) => r.type.spec.inclusive === !1) || _ && fo && Vc(n)))
8146
+ if (e.selection instanceof w && (e.storedMarks || !t.textOffset && t.parentOffset && t.nodeBefore.marks.some((r) => r.type.spec.inclusive === !1) || _ && ho && Vc(n)))
8146
8147
  n.markCursor = n.state.storedMarks || t.marks(), Cn(n, !0), n.markCursor = null;
8147
8148
  else if (Cn(n, !e.selection.empty), pe && e.selection.empty && t.parentOffset && !t.textOffset && t.nodeBefore.marks.length) {
8148
8149
  let r = n.domSelectionRange();
@@ -8160,7 +8161,7 @@ ne.compositionstart = ne.compositionupdate = (n) => {
8160
8161
  }
8161
8162
  n.input.composing = !0;
8162
8163
  }
8163
- Lo(n, $c);
8164
+ zo(n, $c);
8164
8165
  };
8165
8166
  function Vc(n) {
8166
8167
  let { focusNode: e, focusOffset: t } = n.domSelectionRange();
@@ -8170,12 +8171,12 @@ function Vc(n) {
8170
8171
  return r.nodeType == 1 && r.contentEditable == "false";
8171
8172
  }
8172
8173
  ne.compositionend = (n, e) => {
8173
- n.composing && (n.input.composing = !1, n.input.compositionEndedAt = e.timeStamp, n.input.compositionPendingChanges = n.domObserver.pendingRecords().length ? n.input.compositionID : 0, n.input.compositionNode = null, n.input.badSafariComposition ? n.domObserver.forceFlush() : n.input.compositionPendingChanges && Promise.resolve().then(() => n.domObserver.flush()), n.input.compositionID++, Lo(n, 20));
8174
+ n.composing && (n.input.composing = !1, n.input.compositionEndedAt = e.timeStamp, n.input.compositionPendingChanges = n.domObserver.pendingRecords().length ? n.input.compositionID : 0, n.input.compositionNode = null, n.input.badSafariComposition ? n.domObserver.forceFlush() : n.input.compositionPendingChanges && Promise.resolve().then(() => n.domObserver.flush()), n.input.compositionID++, zo(n, 20));
8174
8175
  };
8175
- function Lo(n, e) {
8176
+ function zo(n, e) {
8176
8177
  clearTimeout(n.input.composingTimeout), e > -1 && (n.input.composingTimeout = setTimeout(() => Cn(n), e));
8177
8178
  }
8178
- function zo(n) {
8179
+ function Fo(n) {
8179
8180
  for (n.composing && (n.input.composing = !1, n.input.compositionEndedAt = Wc()); n.input.compositionNodes.length > 0; )
8180
8181
  n.input.compositionNodes.pop().markParentsDirty();
8181
8182
  }
@@ -8204,7 +8205,7 @@ function Wc() {
8204
8205
  }
8205
8206
  function Cn(n, e = !1) {
8206
8207
  if (!(Ae && n.domObserver.flushingSoon >= 0)) {
8207
- if (n.domObserver.forceFlush(), zo(n), e || n.docView && n.docView.dirty) {
8208
+ if (n.domObserver.forceFlush(), Fo(n), e || n.docView && n.docView.dirty) {
8208
8209
  let t = Jr(n), r = n.state.selection;
8209
8210
  return t && !t.eq(r) ? n.dispatch(n.state.tr.setSelection(t)) : (n.markCursor || e) && !r.$from.node(r.$from.sharedDepth(r.to)).inlineContent ? n.dispatch(n.state.tr.deleteSelection()) : n.updateState(n.state), !0;
8210
8211
  }
@@ -8243,7 +8244,7 @@ function Kc(n, e) {
8243
8244
  }, 50);
8244
8245
  }
8245
8246
  function qt(n, e, t, r, i) {
8246
- let s = Eo(n, e, t, r, n.state.selection.$from);
8247
+ let s = Ao(n, e, t, r, n.state.selection.$from);
8247
8248
  if (n.someProp("handlePaste", (a) => a(n, i, s || k.empty)))
8248
8249
  return !0;
8249
8250
  if (!s)
@@ -8251,7 +8252,7 @@ function qt(n, e, t, r, i) {
8251
8252
  let o = jc(s), l = o ? n.state.tr.replaceSelectionWith(o, r) : n.state.tr.replaceSelection(s);
8252
8253
  return n.dispatch(l.scrollIntoView().setMeta("paste", !0).setMeta("uiEvent", "paste")), !0;
8253
8254
  }
8254
- function Fo(n) {
8255
+ function $o(n) {
8255
8256
  let e = n.getData("text/plain") || n.getData("Text");
8256
8257
  if (e)
8257
8258
  return e;
@@ -8263,15 +8264,15 @@ ne.paste = (n, e) => {
8263
8264
  if (n.composing && !Ae)
8264
8265
  return;
8265
8266
  let r = Wt ? null : t.clipboardData, i = n.input.shiftKey && n.input.lastKeyCode != 45;
8266
- r && qt(n, Fo(r), r.getData("text/html"), i, t) ? t.preventDefault() : Kc(n, t);
8267
+ r && qt(n, $o(r), r.getData("text/html"), i, t) ? t.preventDefault() : Kc(n, t);
8267
8268
  };
8268
- class $o {
8269
+ class Vo {
8269
8270
  constructor(e, t, r) {
8270
8271
  this.slice = e, this.move = t, this.node = r;
8271
8272
  }
8272
8273
  }
8273
8274
  const Jc = ue ? "altKey" : "ctrlKey";
8274
- function Vo(n, e) {
8275
+ function Ho(n, e) {
8275
8276
  let t;
8276
8277
  return n.someProp("dragCopies", (r) => {
8277
8278
  t = t || r(e);
@@ -8291,7 +8292,7 @@ te.dragstart = (n, e) => {
8291
8292
  }
8292
8293
  }
8293
8294
  let l = (o || n.state.selection).content(), { dom: a, text: c, slice: d } = _r(n, l);
8294
- (!t.dataTransfer.files.length || !_ || uo > 120) && t.dataTransfer.clearData(), t.dataTransfer.setData(Wt ? "Text" : "text/html", a.innerHTML), t.dataTransfer.effectAllowed = "copyMove", Wt || t.dataTransfer.setData("text/plain", c), n.dragging = new $o(d, Vo(n, t), o);
8295
+ (!t.dataTransfer.files.length || !_ || fo > 120) && t.dataTransfer.clearData(), t.dataTransfer.setData(Wt ? "Text" : "text/html", a.innerHTML), t.dataTransfer.effectAllowed = "copyMove", Wt || t.dataTransfer.setData("text/plain", c), n.dragging = new Vo(d, Ho(n, t), o);
8295
8296
  };
8296
8297
  te.dragend = (n) => {
8297
8298
  let e = n.dragging;
@@ -8316,8 +8317,8 @@ function Uc(n, e, t) {
8316
8317
  let i = n.state.doc.resolve(r.pos), s = t && t.slice;
8317
8318
  s ? n.someProp("transformPasted", (h) => {
8318
8319
  s = h(s, n, !1);
8319
- }) : s = Eo(n, Fo(e.dataTransfer), Wt ? null : e.dataTransfer.getData("text/html"), !1, i);
8320
- let o = !!(t && Vo(n, e));
8320
+ }) : s = Ao(n, $o(e.dataTransfer), Wt ? null : e.dataTransfer.getData("text/html"), !1, i);
8321
+ let o = !!(t && Ho(n, e));
8321
8322
  if (n.someProp("handleDrop", (h) => h(n, e, s || k.empty, o))) {
8322
8323
  e.preventDefault();
8323
8324
  return;
@@ -8325,7 +8326,7 @@ function Uc(n, e, t) {
8325
8326
  if (!s)
8326
8327
  return;
8327
8328
  e.preventDefault();
8328
- let l = s ? no(n.state.doc, i.pos, s) : i.pos;
8329
+ let l = s ? ro(n.state.doc, i.pos, s) : i.pos;
8329
8330
  l == null && (l = i.pos);
8330
8331
  let a = n.state.tr;
8331
8332
  if (o) {
@@ -8578,13 +8579,13 @@ class $ {
8578
8579
  let i, s = 0;
8579
8580
  e.forEach((l, a) => {
8580
8581
  let c = a + r, d;
8581
- if (d = Wo(t, l, c)) {
8582
+ if (d = qo(t, l, c)) {
8582
8583
  for (i || (i = this.children.slice()); s < i.length && i[s] < a; )
8583
8584
  s += 3;
8584
8585
  i[s] == a ? i[s + 2] = i[s + 2].addInner(l, d, c + 1) : i.splice(s, 0, a, a + l.nodeSize, On(d, l, c + 1, nt)), s += 3;
8585
8586
  }
8586
8587
  });
8587
- let o = Ho(s ? qo(t) : t, -r);
8588
+ let o = Wo(s ? jo(t) : t, -r);
8588
8589
  for (let l = 0; l < o.length; l++)
8589
8590
  o[l].type.valid(e, o[l]) || o.splice(l--, 1);
8590
8591
  return new $(o.length ? this.local.concat(o).sort(rt) : this.local, i || this.children);
@@ -8790,7 +8791,7 @@ function _c(n, e, t, r, i, s, o) {
8790
8791
  }
8791
8792
  return new $(e.sort(rt), l);
8792
8793
  }
8793
- function Ho(n, e) {
8794
+ function Wo(n, e) {
8794
8795
  if (!e || !n.length)
8795
8796
  return n;
8796
8797
  let t = [];
@@ -8813,7 +8814,7 @@ function Gc(n, e, t, r, i, s, o) {
8813
8814
  n[a + 1] == -1 && l(n[a + 2], e[a] + s + 1);
8814
8815
  return t;
8815
8816
  }
8816
- function Wo(n, e, t) {
8817
+ function qo(n, e, t) {
8817
8818
  if (e.isLeaf)
8818
8819
  return null;
8819
8820
  let r = t + e.nodeSize, i = null;
@@ -8821,7 +8822,7 @@ function Wo(n, e, t) {
8821
8822
  (o = n[s]) && o.from > t && o.to < r && ((i || (i = [])).push(o), n[s] = null);
8822
8823
  return i;
8823
8824
  }
8824
- function qo(n) {
8825
+ function jo(n) {
8825
8826
  let e = [];
8826
8827
  for (let t = 0; t < n.length; t++)
8827
8828
  n[t] != null && e.push(n[t]);
@@ -8830,14 +8831,14 @@ function qo(n) {
8830
8831
  function On(n, e, t, r) {
8831
8832
  let i = [], s = !1;
8832
8833
  e.forEach((l, a) => {
8833
- let c = Wo(n, l, a + t);
8834
+ let c = qo(n, l, a + t);
8834
8835
  if (c) {
8835
8836
  s = !0;
8836
8837
  let d = On(c, l, t + a + 1, r);
8837
8838
  d != Z && i.push(a, a + l.nodeSize, d);
8838
8839
  }
8839
8840
  });
8840
- let o = Ho(s ? qo(n) : n, -t).sort(rt);
8841
+ let o = Wo(s ? jo(n) : n, -t).sort(rt);
8841
8842
  for (let l = 0; l < o.length; l++)
8842
8843
  o[l].type.valid(e, o[l]) || (r.onRemove && r.onRemove(o[l].spec), o.splice(l--, 1));
8843
8844
  return o.length || i.length ? new $(o, i) : Z;
@@ -9153,7 +9154,7 @@ function ld(n, e, t, r, i) {
9153
9154
  if (n.input.compositionPendingChanges = 0, e < 0) {
9154
9155
  let C = n.input.lastSelectionTime > Date.now() - 50 ? n.input.lastSelectionOrigin : null, A = Jr(n, C);
9155
9156
  if (A && !n.state.selection.eq(A)) {
9156
- if (_ && Ae && n.input.lastKeyCode === 13 && Date.now() - 100 < n.input.lastKeyCodeTime && n.someProp("handleKeyDown", (vl) => vl(n, _e(13, "Enter"))))
9157
+ if (_ && Ae && n.input.lastKeyCode === 13 && Date.now() - 100 < n.input.lastKeyCodeTime && n.someProp("handleKeyDown", (El) => El(n, _e(13, "Enter"))))
9157
9158
  return;
9158
9159
  let X = n.state.tr.setSelection(A);
9159
9160
  C == "pointer" ? X.setMeta("pointer", !0) : C == "key" && X.scrollIntoView(), s && X.setMeta("composition", s), n.dispatch(X);
@@ -9297,7 +9298,7 @@ function ss(n) {
9297
9298
  let e = n.charCodeAt(0), t = n.charCodeAt(1);
9298
9299
  return e >= 56320 && e <= 57343 && t >= 55296 && t <= 56319;
9299
9300
  }
9300
- class jo {
9301
+ class Ko {
9301
9302
  /**
9302
9303
  Create a view. `place` may be a DOM node that the editor should
9303
9304
  be appended to, a function that will place it into the document,
@@ -9362,7 +9363,7 @@ class jo {
9362
9363
  updateStateInner(e, t) {
9363
9364
  var r;
9364
9365
  let i = this.state, s = !1, o = !1;
9365
- e.storedMarks && this.composing && (zo(this), o = !0), this.state = e;
9366
+ e.storedMarks && this.composing && (Fo(this), o = !0), this.state = e;
9366
9367
  let l = i.plugins != e.plugins || this._props.plugins != t.plugins;
9367
9368
  if (l || this._props.plugins != t.plugins || this._props.nodeViews != t.nodeViews) {
9368
9369
  let h = ds(this);
@@ -9379,7 +9380,7 @@ class jo {
9379
9380
  let p = _ ? this.trackWrites = this.domSelectionRange().focusNode : null;
9380
9381
  this.composing && (this.input.compositionNode = Hc(this)), (s || !this.docView.update(e.doc, c, a, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = Vi(e.doc, c, a, this.dom, this)), p && (!this.trackWrites || !this.dom.contains(this.trackWrites)) && (h = !0);
9381
9382
  }
9382
- h || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && uc(this)) ? De(this, h) : (To(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
9383
+ h || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && uc(this)) ? De(this, h) : (Oo(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
9383
9384
  }
9384
9385
  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 && Wa(f);
9385
9386
  }
@@ -9426,7 +9427,7 @@ class jo {
9426
9427
  let s = r.from + (this.state.doc.content.size - t.doc.content.size);
9427
9428
  (s > 0 && s < this.state.doc.content.size && this.state.doc.nodeAt(s)) == r.node && (i = s);
9428
9429
  }
9429
- this.dragging = new $o(e.slice, e.move, i < 0 ? void 0 : S.create(this.state.doc, i));
9430
+ this.dragging = new Vo(e.slice, e.move, i < 0 ? void 0 : S.create(this.state.doc, i));
9430
9431
  }
9431
9432
  someProp(e, t) {
9432
9433
  let r = this._props && this._props[e], i;
@@ -9513,7 +9514,7 @@ class jo {
9513
9514
  otherwise the element after.
9514
9515
  */
9515
9516
  coordsAtPos(e, t = 1) {
9516
- return yo(this, e, t);
9517
+ return bo(this, e, t);
9517
9518
  }
9518
9519
  /**
9519
9520
  Find the DOM position that corresponds to the given document
@@ -9629,7 +9630,7 @@ class jo {
9629
9630
  return this.root.getSelection();
9630
9631
  }
9631
9632
  }
9632
- jo.prototype.dispatch = function(n) {
9633
+ Ko.prototype.dispatch = function(n) {
9633
9634
  let e = this._props.dispatchTransaction;
9634
9635
  e ? e.call(this, n) : this.updateState(this.state.apply(n));
9635
9636
  };
@@ -9798,9 +9799,9 @@ function cr(n, e, t = !0) {
9798
9799
  return e.altKey && (n = "Alt-" + n), e.ctrlKey && (n = "Ctrl-" + n), e.metaKey && (n = "Meta-" + n), t && e.shiftKey && (n = "Shift-" + n), n;
9799
9800
  }
9800
9801
  function xd(n) {
9801
- return new oe({ props: { handleKeyDown: Ko(n) } });
9802
+ return new oe({ props: { handleKeyDown: Jo(n) } });
9802
9803
  }
9803
- function Ko(n) {
9804
+ function Jo(n) {
9804
9805
  let e = kd(n);
9805
9806
  return function(t, r) {
9806
9807
  let i = md(r), s, o = e[cr(i, r)];
@@ -9823,12 +9824,12 @@ function Ko(n) {
9823
9824
  };
9824
9825
  }
9825
9826
  const ei = (n, e) => n.selection.empty ? !1 : (e && e(n.tr.deleteSelection().scrollIntoView()), !0);
9826
- function Jo(n, e) {
9827
+ function Uo(n, e) {
9827
9828
  let { $cursor: t } = n.selection;
9828
9829
  return !t || (e ? !e.endOfTextblock("backward", n) : t.parentOffset > 0) ? null : t;
9829
9830
  }
9830
- const Uo = (n, e, t) => {
9831
- let r = Jo(n, t);
9831
+ const _o = (n, e, t) => {
9832
+ let r = Uo(n, t);
9832
9833
  if (!r)
9833
9834
  return !1;
9834
9835
  let i = ti(r);
@@ -9837,7 +9838,7 @@ const Uo = (n, e, t) => {
9837
9838
  return l == null ? !1 : (e && e(n.tr.lift(o, l).scrollIntoView()), !0);
9838
9839
  }
9839
9840
  let s = i.nodeBefore;
9840
- if (nl(n, i, e, -1))
9841
+ if (rl(n, i, e, -1))
9841
9842
  return !0;
9842
9843
  if (r.parent.content.size == 0 && (Tt(s, "end") || S.isSelectable(s)))
9843
9844
  for (let o = r.depth; ; o--) {
@@ -9854,19 +9855,19 @@ const Uo = (n, e, t) => {
9854
9855
  }
9855
9856
  return s.isAtom && i.depth == r.depth - 1 ? (e && e(n.tr.delete(i.pos - s.nodeSize, i.pos).scrollIntoView()), !0) : !1;
9856
9857
  }, Sd = (n, e, t) => {
9857
- let r = Jo(n, t);
9858
+ let r = Uo(n, t);
9858
9859
  if (!r)
9859
9860
  return !1;
9860
9861
  let i = ti(r);
9861
- return i ? _o(n, i, e) : !1;
9862
+ return i ? Go(n, i, e) : !1;
9862
9863
  }, wd = (n, e, t) => {
9863
- let r = Xo(n, t);
9864
+ let r = Yo(n, t);
9864
9865
  if (!r)
9865
9866
  return !1;
9866
9867
  let i = ni(r);
9867
- return i ? _o(n, i, e) : !1;
9868
+ return i ? Go(n, i, e) : !1;
9868
9869
  };
9869
- function _o(n, e, t) {
9870
+ function Go(n, e, t) {
9870
9871
  let r = e.nodeBefore, i = r, s = e.pos - 1;
9871
9872
  for (; !i.isTextblock; s--) {
9872
9873
  if (i.type.spec.isolating)
@@ -9903,7 +9904,7 @@ function Tt(n, e, t = !1) {
9903
9904
  }
9904
9905
  return !1;
9905
9906
  }
9906
- const Go = (n, e, t) => {
9907
+ const Xo = (n, e, t) => {
9907
9908
  let { $head: r, empty: i } = n.selection, s = r;
9908
9909
  if (!i)
9909
9910
  return !1;
@@ -9925,19 +9926,19 @@ function ti(n) {
9925
9926
  }
9926
9927
  return null;
9927
9928
  }
9928
- function Xo(n, e) {
9929
+ function Yo(n, e) {
9929
9930
  let { $cursor: t } = n.selection;
9930
9931
  return !t || (e ? !e.endOfTextblock("forward", n) : t.parentOffset < t.parent.content.size) ? null : t;
9931
9932
  }
9932
- const Yo = (n, e, t) => {
9933
- let r = Xo(n, t);
9933
+ const Zo = (n, e, t) => {
9934
+ let r = Yo(n, t);
9934
9935
  if (!r)
9935
9936
  return !1;
9936
9937
  let i = ni(r);
9937
9938
  if (!i)
9938
9939
  return !1;
9939
9940
  let s = i.nodeAfter;
9940
- if (nl(n, i, e, 1))
9941
+ if (rl(n, i, e, 1))
9941
9942
  return !0;
9942
9943
  if (r.parent.content.size == 0 && (Tt(s, "start") || S.isSelectable(s))) {
9943
9944
  let o = zn(n.doc, r.before(), r.after(), k.empty);
@@ -9950,7 +9951,7 @@ const Yo = (n, e, t) => {
9950
9951
  }
9951
9952
  }
9952
9953
  return s.isAtom && i.depth == r.depth - 1 ? (e && e(n.tr.delete(i.pos, i.pos + s.nodeSize).scrollIntoView()), !0) : !1;
9953
- }, Zo = (n, e, t) => {
9954
+ }, Qo = (n, e, t) => {
9954
9955
  let { $head: r, empty: i } = n.selection, s = r;
9955
9956
  if (!i)
9956
9957
  return !1;
@@ -9998,7 +9999,7 @@ const Md = (n, e) => {
9998
9999
  }, Td = (n, e) => {
9999
10000
  let { $from: t, $to: r } = n.selection, i = t.blockRange(r), s = i && Ot(i);
10000
10001
  return s == null ? !1 : (e && e(n.tr.lift(i, s).scrollIntoView()), !0);
10001
- }, Qo = (n, e) => {
10002
+ }, el = (n, e) => {
10002
10003
  let { $head: t, $anchor: r } = n.selection;
10003
10004
  return !t.parent.type.spec.code || !t.sameParent(r) ? !1 : (e && e(n.tr.insertText(`
10004
10005
  `).scrollIntoView()), !0);
@@ -10023,7 +10024,7 @@ const Od = (n, e) => {
10023
10024
  a.setSelection(v.near(a.doc.resolve(l), 1)), e(a.scrollIntoView());
10024
10025
  }
10025
10026
  return !0;
10026
- }, el = (n, e) => {
10027
+ }, tl = (n, e) => {
10027
10028
  let t = n.selection, { $from: r, $to: i } = t;
10028
10029
  if (t instanceof ce || r.parent.inlineContent || i.parent.inlineContent)
10029
10030
  return !1;
@@ -10035,7 +10036,7 @@ const Od = (n, e) => {
10035
10036
  l.setSelection(w.create(l.doc, o + 1)), e(l.scrollIntoView());
10036
10037
  }
10037
10038
  return !0;
10038
- }, tl = (n, e) => {
10039
+ }, nl = (n, e) => {
10039
10040
  let { $cursor: t } = n.selection;
10040
10041
  if (!t || t.parent.content.size)
10041
10042
  return !1;
@@ -10084,7 +10085,7 @@ function Nd(n, e, t) {
10084
10085
  let r = e.nodeBefore, i = e.nodeAfter, s = e.index();
10085
10086
  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 || Ke(n.doc, e.pos)) ? !1 : (t && t(n.tr.join(e.pos).scrollIntoView()), !0);
10086
10087
  }
10087
- function nl(n, e, t, r) {
10088
+ function rl(n, e, t, r) {
10088
10089
  let i = e.nodeBefore, s = e.nodeAfter, o, l, a = i.type.spec.isolating || s.type.spec.isolating;
10089
10090
  if (!a && Nd(n, e, t))
10090
10091
  return !0;
@@ -10123,7 +10124,7 @@ function nl(n, e, t, r) {
10123
10124
  }
10124
10125
  return !1;
10125
10126
  }
10126
- function rl(n) {
10127
+ function il(n) {
10127
10128
  return function(e, t) {
10128
10129
  let r = e.selection, i = n < 0 ? r.$from : r.$to, s = i.depth;
10129
10130
  for (; i.node(s).isInline; ) {
@@ -10134,7 +10135,7 @@ function rl(n) {
10134
10135
  return i.node(s).isTextblock ? (t && t(e.tr.setSelection(w.create(e.doc, n < 0 ? i.start(s) : i.end(s)))), !0) : !1;
10135
10136
  };
10136
10137
  }
10137
- const Dd = rl(-1), Id = rl(1);
10138
+ const Dd = il(-1), Id = il(1);
10138
10139
  function Rd(n, e = null) {
10139
10140
  return function(t, r) {
10140
10141
  let { $from: i, $to: s } = t.selection, o = i.blockRange(s), l = o && qr(o, n, e);
@@ -10179,9 +10180,9 @@ function ii(...n) {
10179
10180
  return !1;
10180
10181
  };
10181
10182
  }
10182
- ii(ei, Uo, Go);
10183
- ii(ei, Yo, Zo);
10184
- ii(Qo, el, tl, Ed);
10183
+ ii(ei, _o, Xo);
10184
+ ii(ei, Zo, Qo);
10185
+ ii(el, tl, nl, Ed);
10185
10186
  typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os < "u" && os.platform && os.platform() == "darwin";
10186
10187
  function Pd(n, e = null) {
10187
10188
  return function(t, r) {
@@ -10387,7 +10388,7 @@ function jn(n) {
10387
10388
  markExtensions: r
10388
10389
  };
10389
10390
  }
10390
- function il(n) {
10391
+ function sl(n) {
10391
10392
  const e = [], { nodeExtensions: t, markExtensions: r } = jn(n), i = [...t, ...r], s = {
10392
10393
  default: null,
10393
10394
  rendered: !0,
@@ -10479,11 +10480,11 @@ function Pr(n, e) {
10479
10480
  [t.name]: n.attrs[t.name]
10480
10481
  }).reduce((t, r) => q(t, r), {});
10481
10482
  }
10482
- function sl(n) {
10483
+ function ol(n) {
10483
10484
  return typeof n == "function";
10484
10485
  }
10485
10486
  function E(n, e = void 0, ...t) {
10486
- return sl(n) ? e ? n.bind(e)(...t) : n(...t) : n;
10487
+ return ol(n) ? e ? n.bind(e)(...t) : n(...t) : n;
10487
10488
  }
10488
10489
  function Wd(n = {}) {
10489
10490
  return Object.keys(n).length === 0 && n.constructor === Object;
@@ -10517,7 +10518,7 @@ function ps(n) {
10517
10518
  }
10518
10519
  function jd(n, e) {
10519
10520
  var t;
10520
- const r = il(n), { nodeExtensions: i, markExtensions: s } = jn(n), o = (t = i.find((c) => x(c, "topNode"))) === null || t === void 0 ? void 0 : t.name, l = Object.fromEntries(i.map((c) => {
10521
+ const r = sl(n), { nodeExtensions: i, markExtensions: s } = jn(n), o = (t = i.find((c) => x(c, "topNode"))) === null || t === void 0 ? void 0 : t.name, l = Object.fromEntries(i.map((c) => {
10521
10522
  const d = r.filter((y) => y.type === c.name), u = {
10522
10523
  name: c.name,
10523
10524
  options: c.options,
@@ -10587,7 +10588,7 @@ function jd(n, e) {
10587
10588
  HTMLAttributes: Pr(g, d)
10588
10589
  })), [c.name, h];
10589
10590
  }));
10590
- return new Ks({
10591
+ return new Js({
10591
10592
  topNode: o,
10592
10593
  nodes: l,
10593
10594
  marks: a
@@ -11065,7 +11066,7 @@ class yt {
11065
11066
  * @returns An array of attributes
11066
11067
  */
11067
11068
  get attributes() {
11068
- return il(this.extensions);
11069
+ return sl(this.extensions);
11069
11070
  }
11070
11071
  /**
11071
11072
  * Get all node views from the extensions.
@@ -11157,7 +11158,7 @@ class G {
11157
11158
  })), t;
11158
11159
  }
11159
11160
  }
11160
- function ol(n, e, t) {
11161
+ function ll(n, e, t) {
11161
11162
  const { from: r, to: i } = e, { blockSeparator: s = `
11162
11163
 
11163
11164
  `, textSerializers: o = {} } = t || {};
@@ -11177,7 +11178,7 @@ function ol(n, e, t) {
11177
11178
  a.isText && (l += (f = a == null ? void 0 : a.text) === null || f === void 0 ? void 0 : f.slice(Math.max(r, c) - c, i - c));
11178
11179
  }), l;
11179
11180
  }
11180
- function ll(n) {
11181
+ function al(n) {
11181
11182
  return Object.fromEntries(Object.entries(n.nodes).filter(([, e]) => e.spec.toText).map(([e, t]) => [e, t.spec.toText]));
11182
11183
  }
11183
11184
  const nu = G.create({
@@ -11193,8 +11194,8 @@ const nu = G.create({
11193
11194
  key: new Ce("clipboardTextSerializer"),
11194
11195
  props: {
11195
11196
  clipboardTextSerializer: () => {
11196
- const { editor: n } = this, { state: e, schema: t } = n, { doc: r, selection: i } = e, { ranges: s } = i, o = Math.min(...s.map((d) => d.$from.pos)), l = Math.max(...s.map((d) => d.$to.pos)), a = ll(t);
11197
- return ol(r, { from: o, to: l }, {
11197
+ const { editor: n } = this, { state: e, schema: t } = n, { doc: r, selection: i } = e, { ranges: s } = i, o = Math.min(...s.map((d) => d.$from.pos)), l = Math.max(...s.map((d) => d.$to.pos)), a = al(t);
11198
+ return ll(r, { from: o, to: l }, {
11198
11199
  ...this.options.blockSeparator !== void 0 ? { blockSeparator: this.options.blockSeparator } : {},
11199
11200
  textSerializers: a
11200
11201
  });
@@ -11223,7 +11224,7 @@ const nu = G.create({
11223
11224
  (p || p === 0) && e.lift(h, p);
11224
11225
  });
11225
11226
  }), !0;
11226
- }, ou = (n) => (e) => n(e), lu = () => ({ state: n, dispatch: e }) => el(n, e), au = (n, e) => ({ editor: t, tr: r }) => {
11227
+ }, ou = (n) => (e) => n(e), lu = () => ({ state: n, dispatch: e }) => tl(n, e), au = (n, e) => ({ editor: t, tr: r }) => {
11227
11228
  const { state: i } = t, s = i.doc.slice(n.from, n.to);
11228
11229
  r.deleteRange(n.from, n.to);
11229
11230
  const o = r.mapping.map(e);
@@ -11261,7 +11262,7 @@ function En(n, e, t = { strict: !0 }) {
11261
11262
  const r = Object.keys(e);
11262
11263
  return r.length ? r.every((i) => t.strict ? e[i] === n[i] : oi(e[i]) ? e[i].test(n[i]) : e[i] === n[i]) : !0;
11263
11264
  }
11264
- function al(n, e, t = {}) {
11265
+ function cl(n, e, t = {}) {
11265
11266
  return n.find((r) => r.type === e && En(
11266
11267
  // Only check equality for the attributes that are provided
11267
11268
  Object.fromEntries(Object.keys(t).map((i) => [i, r.attrs[i]])),
@@ -11269,14 +11270,14 @@ function al(n, e, t = {}) {
11269
11270
  ));
11270
11271
  }
11271
11272
  function gs(n, e, t = {}) {
11272
- return !!al(n, e, t);
11273
+ return !!cl(n, e, t);
11273
11274
  }
11274
11275
  function li(n, e, t) {
11275
11276
  var r;
11276
11277
  if (!n || !e)
11277
11278
  return;
11278
11279
  let i = n.parent.childAfter(n.parentOffset);
11279
- if ((!i.node || !i.node.marks.some((d) => d.type === e)) && (i = n.parent.childBefore(n.parentOffset)), !i.node || !i.node.marks.some((d) => d.type === e) || (t = t || ((r = i.node.marks[0]) === null || r === void 0 ? void 0 : r.attrs), !al([...i.node.marks], e, t)))
11280
+ if ((!i.node || !i.node.marks.some((d) => d.type === e)) && (i = n.parent.childBefore(n.parentOffset)), !i.node || !i.node.marks.some((d) => d.type === e) || (t = t || ((r = i.node.marks[0]) === null || r === void 0 ? void 0 : r.attrs), !cl([...i.node.marks], e, t)))
11280
11281
  return;
11281
11282
  let o = i.index, l = n.start() + i.offset, a = o + 1, c = l + i.node.nodeSize;
11282
11283
  for (; o > 0 && gs([...n.parent.child(o - 1).marks], e, t); )
@@ -11313,13 +11314,13 @@ const mu = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
11313
11314
  return !0;
11314
11315
  return !1;
11315
11316
  };
11316
- function cl(n) {
11317
+ function dl(n) {
11317
11318
  return n instanceof w;
11318
11319
  }
11319
11320
  function Ze(n = 0, e = 0, t = 0) {
11320
11321
  return Math.min(Math.max(n, e), t);
11321
11322
  }
11322
- function dl(n, e = null) {
11323
+ function ul(n, e = null) {
11323
11324
  if (!e)
11324
11325
  return null;
11325
11326
  const t = v.atStart(n), r = v.atEnd(n);
@@ -11358,21 +11359,21 @@ const bu = (n = null, e = {}) => ({ editor: t, view: r, tr: i, dispatch: s }) =>
11358
11359
  };
11359
11360
  if (r.hasFocus() && n === null || n === !1)
11360
11361
  return !0;
11361
- if (s && n === null && !cl(t.state.selection))
11362
+ if (s && n === null && !dl(t.state.selection))
11362
11363
  return o(), !0;
11363
- const l = dl(i.doc, n) || t.state.selection, a = t.state.selection.eq(l);
11364
+ const l = ul(i.doc, n) || t.state.selection, a = t.state.selection.eq(l);
11364
11365
  return s && (a || i.setSelection(l), a && i.storedMarks && i.setStoredMarks(i.storedMarks), o()), !0;
11365
- }, ku = (n, e) => (t) => n.every((r, i) => e(r, { ...t, index: i })), xu = (n, e) => ({ tr: t, commands: r }) => r.insertContentAt({ from: t.selection.from, to: t.selection.to }, n, e), ul = (n) => {
11366
+ }, ku = (n, e) => (t) => n.every((r, i) => e(r, { ...t, index: i })), xu = (n, e) => ({ tr: t, commands: r }) => r.insertContentAt({ from: t.selection.from, to: t.selection.to }, n, e), fl = (n) => {
11366
11367
  const e = n.childNodes;
11367
11368
  for (let t = e.length - 1; t >= 0; t -= 1) {
11368
11369
  const r = e[t];
11369
- r.nodeType === 3 && r.nodeValue && /^(\n\s\s|\n)$/.test(r.nodeValue) ? n.removeChild(r) : r.nodeType === 1 && ul(r);
11370
+ r.nodeType === 3 && r.nodeValue && /^(\n\s\s|\n)$/.test(r.nodeValue) ? n.removeChild(r) : r.nodeType === 1 && fl(r);
11370
11371
  }
11371
11372
  return n;
11372
11373
  };
11373
11374
  function un(n) {
11374
11375
  const e = `<body>${n}</body>`, t = new window.DOMParser().parseFromString(e, "text/html").body;
11375
- return ul(t);
11376
+ return fl(t);
11376
11377
  }
11377
11378
  function Kt(n, e, t) {
11378
11379
  if (n instanceof $e || n instanceof b)
@@ -11397,7 +11398,7 @@ function Kt(n, e, t) {
11397
11398
  if (i) {
11398
11399
  if (t.errorOnInvalidContent) {
11399
11400
  let o = !1, l = "";
11400
- const a = new Ks({
11401
+ const a = new Js({
11401
11402
  topNode: e.spec.topNode,
11402
11403
  marks: e.spec.marks,
11403
11404
  // Prosemirror's schemas are executed such that: the last to execute, matches last
@@ -11499,7 +11500,7 @@ const wu = (n) => !("type" in n), Mu = (n, e, t) => ({ tr: r, dispatch: i, edito
11499
11500
  t.updateSelection && Su(r, r.steps.length - 1, -1), t.applyInputRules && r.setMeta("applyInputRules", { from: d, text: m }), t.applyPasteRules && r.setMeta("applyPasteRules", { from: d, text: m });
11500
11501
  }
11501
11502
  return !0;
11502
- }, Cu = () => ({ state: n, dispatch: e }) => Md(n, e), Tu = () => ({ state: n, dispatch: e }) => Cd(n, e), Ou = () => ({ state: n, dispatch: e }) => Uo(n, e), vu = () => ({ state: n, dispatch: e }) => Yo(n, e), Eu = () => ({ state: n, dispatch: e, tr: t }) => {
11503
+ }, Cu = () => ({ state: n, dispatch: e }) => Md(n, e), Tu = () => ({ state: n, dispatch: e }) => Cd(n, e), Ou = () => ({ state: n, dispatch: e }) => _o(n, e), vu = () => ({ state: n, dispatch: e }) => Zo(n, e), Eu = () => ({ state: n, dispatch: e, tr: t }) => {
11503
11504
  try {
11504
11505
  const r = Ln(n.doc, n.selection.$from.pos, -1);
11505
11506
  return r == null ? !1 : (t.join(r, 2), e && e(t), !0);
@@ -11514,7 +11515,7 @@ const wu = (n) => !("type" in n), Mu = (n, e, t) => ({ tr: r, dispatch: i, edito
11514
11515
  return !1;
11515
11516
  }
11516
11517
  }, Nu = () => ({ state: n, dispatch: e }) => Sd(n, e), Du = () => ({ state: n, dispatch: e }) => wd(n, e);
11517
- function fl() {
11518
+ function hl() {
11518
11519
  return typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1;
11519
11520
  }
11520
11521
  function Iu(n) {
@@ -11533,7 +11534,7 @@ function Iu(n) {
11533
11534
  else if (/^s(hift)?$/i.test(a))
11534
11535
  s = !0;
11535
11536
  else if (/^mod$/i.test(a))
11536
- An() || fl() ? o = !0 : i = !0;
11537
+ An() || hl() ? o = !0 : i = !0;
11537
11538
  else
11538
11539
  throw new Error(`Unrecognized modifier name: ${a}`);
11539
11540
  }
@@ -11574,10 +11575,10 @@ function Jt(n, e, t = {}) {
11574
11575
  const Pu = (n, e = {}) => ({ state: t, dispatch: r }) => {
11575
11576
  const i = W(n, t.schema);
11576
11577
  return Jt(t, i, e) ? Td(t, r) : !1;
11577
- }, Bu = () => ({ state: n, dispatch: e }) => tl(n, e), Lu = (n) => ({ state: e, dispatch: t }) => {
11578
+ }, Bu = () => ({ state: n, dispatch: e }) => nl(n, e), Lu = (n) => ({ state: e, dispatch: t }) => {
11578
11579
  const r = W(n, e.schema);
11579
11580
  return zd(r)(e, t);
11580
- }, zu = () => ({ state: n, dispatch: e }) => Qo(n, e);
11581
+ }, zu = () => ({ state: n, dispatch: e }) => el(n, e);
11581
11582
  function Un(n, e) {
11582
11583
  return e.nodes[n] ? "node" : e.marks[n] ? "mark" : null;
11583
11584
  }
@@ -11601,7 +11602,7 @@ const Fu = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
11601
11602
  n.setSelection(t);
11602
11603
  }
11603
11604
  return !0;
11604
- }, Hu = () => ({ state: n, dispatch: e }) => Go(n, e), Wu = () => ({ state: n, dispatch: e }) => Zo(n, e), qu = () => ({ state: n, dispatch: e }) => Ad(n, e), ju = () => ({ state: n, dispatch: e }) => Id(n, e), Ku = () => ({ state: n, dispatch: e }) => Dd(n, e);
11605
+ }, Hu = () => ({ state: n, dispatch: e }) => Xo(n, e), Wu = () => ({ state: n, dispatch: e }) => Qo(n, e), qu = () => ({ state: n, dispatch: e }) => Ad(n, e), ju = () => ({ state: n, dispatch: e }) => Id(n, e), Ku = () => ({ state: n, dispatch: e }) => Dd(n, e);
11605
11606
  function Br(n, e, t = {}, r = {}) {
11606
11607
  return Kt(n, e, {
11607
11608
  slice: !1,
@@ -11623,7 +11624,7 @@ const Ju = (n, e = !1, t = {}, r = {}) => ({ editor: i, tr: s, dispatch: o, comm
11623
11624
  errorOnInvalidContent: (c = r.errorOnInvalidContent) !== null && c !== void 0 ? c : i.options.enableContentCheck
11624
11625
  });
11625
11626
  };
11626
- function hl(n, e) {
11627
+ function pl(n, e) {
11627
11628
  const t = Ue(e, n.schema), { from: r, to: i, empty: s } = n.selection, o = [];
11628
11629
  s ? (n.storedMarks && o.push(...n.storedMarks), o.push(...n.selection.$head.marks())) : n.doc.nodesBetween(r, i, (a) => {
11629
11630
  o.push(...a.marks);
@@ -11659,7 +11660,7 @@ function Gu(n, e) {
11659
11660
  from: 0,
11660
11661
  to: n.content.size
11661
11662
  };
11662
- return ol(n, t, e);
11663
+ return ll(n, t, e);
11663
11664
  }
11664
11665
  function Xu(n, e) {
11665
11666
  const t = W(e, n.schema), { from: r, to: i } = n.selection, s = [];
@@ -11671,9 +11672,9 @@ function Xu(n, e) {
11671
11672
  }
11672
11673
  function Yu(n, e) {
11673
11674
  const t = Un(typeof e == "string" ? e : e.name, n.schema);
11674
- return t === "node" ? Xu(n, e) : t === "mark" ? hl(n, e) : {};
11675
+ return t === "node" ? Xu(n, e) : t === "mark" ? pl(n, e) : {};
11675
11676
  }
11676
- function pl(n, e, t) {
11677
+ function ml(n, e, t) {
11677
11678
  const r = [];
11678
11679
  return n === e ? t.resolve(n).marks().forEach((i) => {
11679
11680
  const s = t.resolve(n), o = li(s, i.type);
@@ -11764,7 +11765,7 @@ function ef(n, e, t) {
11764
11765
  var r;
11765
11766
  const { selection: i } = e;
11766
11767
  let s = null;
11767
- if (cl(i) && (s = i.$cursor), s) {
11768
+ if (dl(i) && (s = i.$cursor), s) {
11768
11769
  const l = (r = n.storedMarks) !== null && r !== void 0 ? r : s.marks();
11769
11770
  return !!t.isInSet(l) || !l.some((a) => a.type.excludes(t));
11770
11771
  }
@@ -11786,7 +11787,7 @@ const tf = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
11786
11787
  const { selection: s } = t, { empty: o, ranges: l } = s, a = Ue(n, r.schema);
11787
11788
  if (i)
11788
11789
  if (o) {
11789
- const c = hl(r, a);
11790
+ const c = pl(r, a);
11790
11791
  t.addStoredMark(a.create({
11791
11792
  ...c,
11792
11793
  ...e
@@ -12201,7 +12202,7 @@ const Sf = G.create({
12201
12202
  "Ctrl-a": () => this.editor.commands.selectTextblockStart(),
12202
12203
  "Ctrl-e": () => this.editor.commands.selectTextblockEnd()
12203
12204
  };
12204
- return An() || fl() ? s : i;
12205
+ return An() || hl() ? s : i;
12205
12206
  },
12206
12207
  addProseMirrorPlugins() {
12207
12208
  return [
@@ -12575,7 +12576,7 @@ class Df extends Hd {
12575
12576
  * @returns The new editor state
12576
12577
  */
12577
12578
  registerPlugin(e, t) {
12578
- const r = sl(t) ? t(e, [...this.state.plugins]) : [...this.state.plugins, e], i = this.state.reconfigure({ plugins: r });
12579
+ const r = ol(t) ? t(e, [...this.state.plugins]) : [...this.state.plugins, e], i = this.state.reconfigure({ plugins: r });
12579
12580
  return this.view.updateState(i), i;
12580
12581
  }
12581
12582
  /**
@@ -12651,8 +12652,8 @@ class Df extends Hd {
12651
12652
  }
12652
12653
  }), t = Br(this.options.content, this.schema, this.options.parseOptions, { errorOnInvalidContent: !1 });
12653
12654
  }
12654
- const r = dl(t, this.options.autofocus);
12655
- this.view = new jo(this.options.element, {
12655
+ const r = ul(t, this.options.autofocus);
12656
+ this.view = new Ko(this.options.element, {
12656
12657
  ...this.options.editorProps,
12657
12658
  attributes: {
12658
12659
  // add `role="textbox"` to the editor element
@@ -12768,7 +12769,7 @@ class Df extends Hd {
12768
12769
  return Gu(this.state.doc, {
12769
12770
  blockSeparator: t,
12770
12771
  textSerializers: {
12771
- ...ll(this.schema),
12772
+ ...al(this.schema),
12772
12773
  ...r
12773
12774
  }
12774
12775
  });
@@ -12830,7 +12831,7 @@ function ct(n) {
12830
12831
  const { tr: s } = e, o = r[r.length - 1], l = r[0];
12831
12832
  if (o) {
12832
12833
  const a = l.search(/\S/), c = t.from + l.indexOf(o), d = c + o.length;
12833
- if (pl(t.from, t.to, e.doc).filter((h) => h.mark.type.excluded.find((m) => m === n.type && m !== h.mark.type)).filter((h) => h.to > c).length)
12834
+ if (ml(t.from, t.to, e.doc).filter((h) => h.mark.type.excluded.find((m) => m === n.type && m !== h.mark.type)).filter((h) => h.to > c).length)
12834
12835
  return null;
12835
12836
  d < t.to && s.delete(d, t.to), c > t.from && s.delete(t.from + a, c);
12836
12837
  const f = t.from + a + o.length;
@@ -12839,7 +12840,7 @@ function ct(n) {
12839
12840
  }
12840
12841
  });
12841
12842
  }
12842
- function ml(n) {
12843
+ function gl(n) {
12843
12844
  return new Kn({
12844
12845
  find: n.find,
12845
12846
  handler: ({ state: e, range: t, match: r }) => {
@@ -12940,7 +12941,7 @@ function dt(n) {
12940
12941
  let c = t.to;
12941
12942
  if (l) {
12942
12943
  const d = a.search(/\S/), u = t.from + a.indexOf(l), f = u + l.length;
12943
- if (pl(t.from, t.to, e.doc).filter((p) => p.mark.type.excluded.find((g) => g === n.type && g !== p.mark.type)).filter((p) => p.to > u).length)
12944
+ if (ml(t.from, t.to, e.doc).filter((p) => p.mark.type.excluded.find((g) => g === n.type && g !== p.mark.type)).filter((p) => p.to > u).length)
12944
12945
  return null;
12945
12946
  f < t.to && o.delete(f, t.to), u > t.from && o.delete(t.from + d, u), c = t.from + d + l.length, o.addMark(t.from + d, c, n.type.create(s || {})), o.removeStoredMark(n.type);
12946
12947
  }
@@ -13357,7 +13358,7 @@ class Xf {
13357
13358
  if (t && !s) {
13358
13359
  let o = t.pos;
13359
13360
  if (this.editorView.dragging && this.editorView.dragging.slice) {
13360
- let l = no(this.editorView.state.doc, o, this.editorView.dragging.slice);
13361
+ let l = ro(this.editorView.state.doc, o, this.editorView.dragging.slice);
13361
13362
  l != null && (o = l);
13362
13363
  }
13363
13364
  this.setCursor(o), this.scheduleRemoval(5e3);
@@ -13488,7 +13489,7 @@ class di {
13488
13489
  return P.valid(t) ? new P(t) : v.near(t);
13489
13490
  }
13490
13491
  }
13491
- function gl(n) {
13492
+ function yl(n) {
13492
13493
  return n.isAtom || n.spec.isolating || n.spec.createGapCursor;
13493
13494
  }
13494
13495
  function Zf(n) {
@@ -13500,7 +13501,7 @@ function Zf(n) {
13500
13501
  continue;
13501
13502
  }
13502
13503
  for (let i = r.child(t - 1); ; i = i.lastChild) {
13503
- if (i.childCount == 0 && !i.inlineContent || gl(i.type))
13504
+ if (i.childCount == 0 && !i.inlineContent || yl(i.type))
13504
13505
  return !0;
13505
13506
  if (i.inlineContent)
13506
13507
  return !1;
@@ -13517,7 +13518,7 @@ function Qf(n) {
13517
13518
  continue;
13518
13519
  }
13519
13520
  for (let i = r.child(t); ; i = i.firstChild) {
13520
- if (i.childCount == 0 && !i.inlineContent || gl(i.type))
13521
+ if (i.childCount == 0 && !i.inlineContent || yl(i.type))
13521
13522
  return !0;
13522
13523
  if (i.inlineContent)
13523
13524
  return !1;
@@ -13538,7 +13539,7 @@ function eh() {
13538
13539
  }
13539
13540
  });
13540
13541
  }
13541
- const th = Ko({
13542
+ const th = Jo({
13542
13543
  ArrowLeft: fn("horiz", -1),
13543
13544
  ArrowRight: fn("horiz", 1),
13544
13545
  ArrowUp: fn("vert", -1),
@@ -13731,9 +13732,9 @@ H.prototype.map = function(e, t, r) {
13731
13732
  }, t, r), i;
13732
13733
  };
13733
13734
  H.from = function(e) {
13734
- return e instanceof H ? e : e && e.length ? new yl(e) : H.empty;
13735
+ return e instanceof H ? e : e && e.length ? new bl(e) : H.empty;
13735
13736
  };
13736
- var yl = /* @__PURE__ */ function(n) {
13737
+ var bl = /* @__PURE__ */ function(n) {
13737
13738
  function e(r) {
13738
13739
  n.call(this), this.values = r;
13739
13740
  }
@@ -13765,7 +13766,7 @@ var yl = /* @__PURE__ */ function(n) {
13765
13766
  return 0;
13766
13767
  }, Object.defineProperties(e.prototype, t), e;
13767
13768
  }(H);
13768
- H.empty = new yl([]);
13769
+ H.empty = new bl([]);
13769
13770
  var ah = /* @__PURE__ */ function(n) {
13770
13771
  function e(t, r) {
13771
13772
  n.call(this), this.left = t, this.right = r, this.length = t.length + r.length, this.depth = Math.max(t.depth, r.depth) + 1;
@@ -14019,14 +14020,14 @@ function gh(n = {}) {
14019
14020
  props: {
14020
14021
  handleDOMEvents: {
14021
14022
  beforeinput(e, t) {
14022
- let r = t.inputType, i = r == "historyUndo" ? kl : r == "historyRedo" ? xl : null;
14023
+ let r = t.inputType, i = r == "historyUndo" ? xl : r == "historyRedo" ? Sl : null;
14023
14024
  return !i || !e.editable ? !1 : (t.preventDefault(), i(e.state, e.dispatch));
14024
14025
  }
14025
14026
  }
14026
14027
  }
14027
14028
  });
14028
14029
  }
14029
- function bl(n, e) {
14030
+ function kl(n, e) {
14030
14031
  return (t, r) => {
14031
14032
  let i = it.getState(t);
14032
14033
  if (!i || (n ? i.undone : i.done).eventCount == 0)
@@ -14038,7 +14039,7 @@ function bl(n, e) {
14038
14039
  return !0;
14039
14040
  };
14040
14041
  }
14041
- const kl = bl(!1, !0), xl = bl(!0, !0), yh = G.create({
14042
+ const xl = kl(!1, !0), Sl = kl(!0, !0), yh = G.create({
14042
14043
  name: "history",
14043
14044
  addOptions() {
14044
14045
  return {
@@ -14048,8 +14049,8 @@ const kl = bl(!1, !0), xl = bl(!0, !0), yh = G.create({
14048
14049
  },
14049
14050
  addCommands() {
14050
14051
  return {
14051
- undo: () => ({ state: n, dispatch: e }) => kl(n, e),
14052
- redo: () => ({ state: n, dispatch: e }) => xl(n, e)
14052
+ undo: () => ({ state: n, dispatch: e }) => xl(n, e),
14053
+ redo: () => ({ state: n, dispatch: e }) => Sl(n, e)
14053
14054
  };
14054
14055
  },
14055
14056
  addProseMirrorPlugins() {
@@ -14113,7 +14114,7 @@ const kl = bl(!1, !0), xl = bl(!0, !0), yh = G.create({
14113
14114
  },
14114
14115
  addInputRules() {
14115
14116
  return [
14116
- ml({
14117
+ gl({
14117
14118
  find: /^(?:---|—-|___\s|\*\*\*\s)$/,
14118
14119
  type: this.type
14119
14120
  })
@@ -14592,7 +14593,7 @@ const kl = bl(!1, !0), xl = bl(!0, !0), yh = G.create({
14592
14593
  },
14593
14594
  addInputRules() {
14594
14595
  return [
14595
- ml({
14596
+ gl({
14596
14597
  find: Vh,
14597
14598
  type: this.type,
14598
14599
  getAttributes: (n) => {
@@ -14603,7 +14604,7 @@ const kl = bl(!1, !0), xl = bl(!0, !0), yh = G.create({
14603
14604
  ];
14604
14605
  }
14605
14606
  });
14606
- var ie, Qt, en, de, Fr, Sl, wl, Ml, Cl;
14607
+ var ie, Qt, en, de, Fr, wl, Ml, Cl, Tl;
14607
14608
  class Wh extends Pl {
14608
14609
  constructor() {
14609
14610
  super();
@@ -14613,7 +14614,7 @@ class Wh extends Pl {
14613
14614
  B(this, en, null);
14614
14615
  }
14615
14616
  connectedCallback() {
14616
- super.connectedCallback() && (R(this, de, Sl).call(this), R(this, de, wl).call(this), R(this, de, Fr).call(this));
14617
+ super.connectedCallback() && (R(this, de, wl).call(this), R(this, de, Ml).call(this), R(this, de, Fr).call(this));
14617
14618
  }
14618
14619
  get value() {
14619
14620
  return O(this, ie).getHTML();
@@ -14654,11 +14655,11 @@ Fr = function() {
14654
14655
  const r = this.shadowRoot.querySelector(".menu-bar");
14655
14656
  r && (r.style.display = t ? "none" : "flex");
14656
14657
  }
14657
- }, Sl = function() {
14658
+ }, wl = function() {
14658
14659
  const t = zt.getComponentCssPath("nineEditor.css"), r = t ? `@import "${t}";` : "";
14659
14660
  this.shadowRoot.innerHTML = `
14660
14661
  <style>
14661
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.118/dist/css/nineEditor.css";
14662
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.119/dist/css/nineEditor.css";
14662
14663
  ${r}
14663
14664
  </style>
14664
14665
 
@@ -14697,7 +14698,7 @@ Fr = function() {
14697
14698
  const s = i.target.value;
14698
14699
  console.log(i.target, s), O(this, ie).chain().focus().setMark("textStyle", { fontSize: s }).run();
14699
14700
  };
14700
- }, wl = function() {
14701
+ }, Ml = function() {
14701
14702
  Y(this, ie, new Df({
14702
14703
  element: O(this, Qt),
14703
14704
  editable: !this.readonly,
@@ -14730,10 +14731,10 @@ Fr = function() {
14730
14731
  this.dispatchEvent(new CustomEvent("change", { detail: t.getHTML() }));
14731
14732
  },
14732
14733
  onSelectionUpdate: ({ editor: t }) => {
14733
- this.readonly || R(this, de, Ml).call(this, t);
14734
+ this.readonly || R(this, de, Cl).call(this, t);
14734
14735
  }
14735
- })), R(this, de, Cl).call(this);
14736
- }, Ml = function(t) {
14736
+ })), R(this, de, Tl).call(this);
14737
+ }, Cl = function(t) {
14737
14738
  this.shadowRoot.querySelectorAll("[data-cmd]").forEach((o) => {
14738
14739
  t.isActive(o.dataset.cmd) ? o.classList.add("is-active") : o.classList.remove("is-active");
14739
14740
  }), this.shadowRoot.querySelectorAll("[data-align]").forEach((o) => {
@@ -14743,7 +14744,7 @@ Fr = function() {
14743
14744
  i && (i.value = r.fontSize || "14px");
14744
14745
  const s = this.shadowRoot.querySelector("#color-picker");
14745
14746
  s && (s.value = r.color || "#000000");
14746
- }, Cl = function() {
14747
+ }, Tl = function() {
14747
14748
  const t = O(this, ie);
14748
14749
  this.shadowRoot.querySelectorAll("[data-cmd]").forEach((r) => {
14749
14750
  r.onclick = () => {
@@ -14773,7 +14774,7 @@ const ve = typeof window < "u" && window.nine ? window.nine : As, vs = {
14773
14774
  });
14774
14775
  };
14775
14776
  qh();
14776
- var xt, St, ye, Tl, It, Ol;
14777
+ var xt, St, ye, Ol, It, vl;
14777
14778
  class jh extends HTMLElement {
14778
14779
  constructor() {
14779
14780
  super();
@@ -14792,7 +14793,7 @@ class jh extends HTMLElement {
14792
14793
  R(this, ye, It).call(this);
14793
14794
  }
14794
14795
  }
14795
- xt = new WeakMap(), St = new WeakMap(), ye = new WeakSet(), Tl = async function() {
14796
+ xt = new WeakMap(), St = new WeakMap(), ye = new WeakSet(), Ol = async function() {
14796
14797
  const t = this.getAttribute("code") || "";
14797
14798
  try {
14798
14799
  await navigator.clipboard.writeText(t), Y(this, xt, !0), R(this, ye, It).call(this), setTimeout(() => {
@@ -14805,7 +14806,7 @@ xt = new WeakMap(), St = new WeakMap(), ye = new WeakSet(), Tl = async function(
14805
14806
  const t = this.getAttribute("lang") || "Bash", r = this.getAttribute("code") || this.textContent.trim() || "", i = this.getAttribute("css-path");
14806
14807
  O(this, St).innerHTML = `
14807
14808
  <style>
14808
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.118/dist/css/nine-code-block.css";
14809
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.119/dist/css/nine-code-block.css";
14809
14810
  ${i ? `@import "${i}";` : ""}
14810
14811
  </style>
14811
14812
 
@@ -14820,16 +14821,16 @@ xt = new WeakMap(), St = new WeakMap(), ye = new WeakSet(), Tl = async function(
14820
14821
  <button class="copy-btn ${O(this, xt) ? "copied" : ""}" aria-label="Copy Code"></button>
14821
14822
  </div>
14822
14823
  <div class="content">
14823
- <pre><code>${R(this, ye, Ol).call(this, r)}</code></pre>
14824
+ <pre><code>${R(this, ye, vl).call(this, r)}</code></pre>
14824
14825
  </div>
14825
14826
  </div>
14826
- `, O(this, St).querySelector(".copy-btn").onclick = () => R(this, ye, Tl).call(this);
14827
- }, Ol = function(t) {
14827
+ `, O(this, St).querySelector(".copy-btn").onclick = () => R(this, ye, Ol).call(this);
14828
+ }, vl = function(t) {
14828
14829
  const r = document.createElement("div");
14829
14830
  return r.textContent = t, r.innerHTML;
14830
14831
  };
14831
14832
  typeof window < "u" && (customElements.get("nine-code-block") || customElements.define("nine-code-block", jh));
14832
14833
  typeof window < "u" && (customElements.get("nine-editor") || customElements.define("nine-editor", Wh));
14833
14834
  export {
14834
- Dl as nineDialog
14835
+ Ns as nineDialog
14835
14836
  };