@siladev/qalam 0.4.0 → 0.4.2

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.
@@ -683,7 +683,7 @@ function wt(n, e) {
683
683
  let t = e.length - 1;
684
684
  t >= 0 && n.isText && n.sameMarkup(e[t]) ? e[t] = n.withText(e[t].text + n.text) : e.push(n);
685
685
  }
686
- function dn(n, e, t, r) {
686
+ function fn(n, e, t, r) {
687
687
  let s = (e || n).node(t), i = 0, o = e ? e.index(t) : s.childCount;
688
688
  n && (i = n.index(t), n.depth > t ? i++ : n.textOffset && (wt(n.nodeAfter, r), i++));
689
689
  for (let a = i; a < o; a++)
@@ -695,15 +695,15 @@ function Ct(n, e) {
695
695
  }
696
696
  function rl(n, e, t, r, s) {
697
697
  let i = n.depth > s && Fs(n, e, s + 1), o = r.depth > s && Fs(t, r, s + 1), a = [];
698
- return dn(null, n, s, a), i && o && e.index(s) == t.index(s) ? (nl(i, o), wt(Ct(i, rl(n, e, t, r, s + 1)), a)) : (i && wt(Ct(i, lr(n, e, s + 1)), a), dn(e, t, s, a), o && wt(Ct(o, lr(t, r, s + 1)), a)), dn(r, null, s, a), new x(a);
698
+ return fn(null, n, s, a), i && o && e.index(s) == t.index(s) ? (nl(i, o), wt(Ct(i, rl(n, e, t, r, s + 1)), a)) : (i && wt(Ct(i, lr(n, e, s + 1)), a), fn(e, t, s, a), o && wt(Ct(o, lr(t, r, s + 1)), a)), fn(r, null, s, a), new x(a);
699
699
  }
700
700
  function lr(n, e, t) {
701
701
  let r = [];
702
- if (dn(null, n, t, r), n.depth > t) {
702
+ if (fn(null, n, t, r), n.depth > t) {
703
703
  let s = Fs(n, e, t + 1);
704
704
  wt(Ct(s, lr(n, e, t + 1)), r);
705
705
  }
706
- return dn(e, null, t, r), new x(r);
706
+ return fn(e, null, t, r), new x(r);
707
707
  }
708
708
  function Qu(n, e) {
709
709
  let t = e.depth - n.openStart, s = e.node(t).copy(n.content);
@@ -714,7 +714,7 @@ function Qu(n, e) {
714
714
  end: s.resolveNoCache(s.content.size - n.openEnd - t)
715
715
  };
716
716
  }
717
- class wn {
717
+ class Cn {
718
718
  /**
719
719
  @internal
720
720
  */
@@ -942,7 +942,7 @@ class wn {
942
942
  break;
943
943
  i = c - 1, s += l + 1;
944
944
  }
945
- return new wn(t, r, i);
945
+ return new Cn(t, r, i);
946
946
  }
947
947
  /**
948
948
  @internal
@@ -957,7 +957,7 @@ class wn {
957
957
  }
958
958
  else
959
959
  ho.set(e, r = new Yu());
960
- let s = r.elts[r.i] = wn.resolve(e, t);
960
+ let s = r.elts[r.i] = Cn.resolve(e, t);
961
961
  return r.i = (r.i + 1) % Xu, s;
962
962
  }
963
963
  }
@@ -1212,13 +1212,13 @@ class Ae {
1212
1212
  [object](https://prosemirror.net/docs/ref/#model.ResolvedPos) with information about its context.
1213
1213
  */
1214
1214
  resolve(e) {
1215
- return wn.resolveCached(this, e);
1215
+ return Cn.resolveCached(this, e);
1216
1216
  }
1217
1217
  /**
1218
1218
  @internal
1219
1219
  */
1220
1220
  resolveNoCache(e) {
1221
- return wn.resolve(this, e);
1221
+ return Cn.resolve(this, e);
1222
1222
  }
1223
1223
  /**
1224
1224
  Test whether a given mark or mark type occurs in this document
@@ -2301,13 +2301,13 @@ const hl = {
2301
2301
  script: !0,
2302
2302
  style: !0,
2303
2303
  title: !0
2304
- }, pl = { ol: !0, ul: !0 }, Cn = 1, Vs = 2, fn = 4;
2304
+ }, pl = { ol: !0, ul: !0 }, vn = 1, Vs = 2, hn = 4;
2305
2305
  function bo(n, e, t) {
2306
- return e != null ? (e ? Cn : 0) | (e === "full" ? Vs : 0) : n && n.whitespace == "pre" ? Cn | Vs : t & ~fn;
2306
+ return e != null ? (e ? vn : 0) | (e === "full" ? Vs : 0) : n && n.whitespace == "pre" ? vn | Vs : t & ~hn;
2307
2307
  }
2308
2308
  class Wn {
2309
2309
  constructor(e, t, r, s, i, o) {
2310
- this.type = e, this.attrs = t, this.marks = r, this.solid = s, this.options = o, this.content = [], this.activeMarks = q.none, this.match = i || (o & fn ? null : e.contentMatch);
2310
+ this.type = e, this.attrs = t, this.marks = r, this.solid = s, this.options = o, this.content = [], this.activeMarks = q.none, this.match = i || (o & hn ? null : e.contentMatch);
2311
2311
  }
2312
2312
  findWrapping(e) {
2313
2313
  if (!this.match) {
@@ -2324,7 +2324,7 @@ class Wn {
2324
2324
  return this.match.findWrapping(e.type);
2325
2325
  }
2326
2326
  finish(e) {
2327
- if (!(this.options & Cn)) {
2327
+ if (!(this.options & vn)) {
2328
2328
  let r = this.content[this.content.length - 1], s;
2329
2329
  if (r && r.isText && (s = /[ \t\r\n\u000c]+$/.exec(r.text))) {
2330
2330
  let i = r;
@@ -2341,7 +2341,7 @@ class Wn {
2341
2341
  class ko {
2342
2342
  constructor(e, t, r) {
2343
2343
  this.parser = e, this.options = t, this.isOpen = r, this.open = 0, this.localPreserveWS = !1;
2344
- let s = t.topNode, i, o = bo(null, t.preserveWhitespace, 0) | (r ? fn : 0);
2344
+ let s = t.topNode, i, o = bo(null, t.preserveWhitespace, 0) | (r ? hn : 0);
2345
2345
  s ? i = new Wn(s.type, s.attrs, q.none, !0, t.topMatch || s.type.contentMatch, o) : r ? i = new Wn(null, null, q.none, !0, null, o) : i = new Wn(e.schema.topNodeType, null, q.none, !0, null, o), this.nodes = [i], this.find = t.findPositions, this.needsBlock = !1;
2346
2346
  }
2347
2347
  get top() {
@@ -2354,7 +2354,7 @@ class ko {
2354
2354
  e.nodeType == 3 ? this.addTextNode(e, t) : e.nodeType == 1 && this.addElement(e, t);
2355
2355
  }
2356
2356
  addTextNode(e, t) {
2357
- let r = e.nodeValue, s = this.top, i = s.options & Vs ? "full" : this.localPreserveWS || (s.options & Cn) > 0, { schema: o } = this.parser;
2357
+ let r = e.nodeValue, s = this.top, i = s.options & Vs ? "full" : this.localPreserveWS || (s.options & vn) > 0, { schema: o } = this.parser;
2358
2358
  if (i === "full" || s.inlineContext(e) || /[^ \t\r\n\u000c]/.test(r)) {
2359
2359
  if (i)
2360
2360
  if (i === "full")
@@ -2524,7 +2524,7 @@ class ko {
2524
2524
  let o = this.top;
2525
2525
  o.match = o.match && o.match.matchType(e);
2526
2526
  let a = bo(e, i, o.options);
2527
- o.options & fn && o.content.length == 0 && (a |= fn);
2527
+ o.options & hn && o.content.length == 0 && (a |= hn);
2528
2528
  let l = q.none;
2529
2529
  return r = r.filter((c) => (o.type ? o.type.allowsMarkType(c.type) : So(c.type, e)) ? (l = c.addToSet(l), !1) : !0), this.nodes.push(new Wn(e, t, l, s, null, a)), this.open++, r;
2530
2530
  }
@@ -2545,7 +2545,7 @@ class ko {
2545
2545
  for (let t = this.open; t >= 0; t--) {
2546
2546
  if (this.nodes[t] == e)
2547
2547
  return this.open = t, !0;
2548
- this.localPreserveWS && (this.nodes[t].options |= Cn);
2548
+ this.localPreserveWS && (this.nodes[t].options |= vn);
2549
2549
  }
2550
2550
  return !1;
2551
2551
  }
@@ -2973,7 +2973,7 @@ class be {
2973
2973
  }
2974
2974
  }
2975
2975
  be.empty = new be([]);
2976
- class vn {
2976
+ class Mn {
2977
2977
  /**
2978
2978
  Create a new mapping with the given position maps.
2979
2979
  */
@@ -2990,7 +2990,7 @@ class vn {
2990
2990
  Create a mapping that maps only through a part of this one.
2991
2991
  */
2992
2992
  slice(e = 0, t = this.maps.length) {
2993
- return new vn(this._maps, this.mirror, e, t);
2993
+ return new Mn(this._maps, this.mirror, e, t);
2994
2994
  }
2995
2995
  /**
2996
2996
  Add a step map to the end of this mapping. If `mirrors` is
@@ -3041,7 +3041,7 @@ class vn {
3041
3041
  Create an inverted version of this mapping.
3042
3042
  */
3043
3043
  invert() {
3044
- let e = new vn();
3044
+ let e = new Mn();
3045
3045
  return e.appendMappingInverted(this), e;
3046
3046
  }
3047
3047
  /**
@@ -3122,7 +3122,7 @@ class de {
3122
3122
  return hs[e] = t, t.prototype.jsonID = e, t;
3123
3123
  }
3124
3124
  }
3125
- class Q {
3125
+ class J {
3126
3126
  /**
3127
3127
  @internal
3128
3128
  */
@@ -3133,13 +3133,13 @@ class Q {
3133
3133
  Create a successful step result.
3134
3134
  */
3135
3135
  static ok(e) {
3136
- return new Q(e, null);
3136
+ return new J(e, null);
3137
3137
  }
3138
3138
  /**
3139
3139
  Create a failed step result.
3140
3140
  */
3141
3141
  static fail(e) {
3142
- return new Q(null, e);
3142
+ return new J(null, e);
3143
3143
  }
3144
3144
  /**
3145
3145
  Call [`Node.replace`](https://prosemirror.net/docs/ref/#model.Node.replace) with the given
@@ -3148,10 +3148,10 @@ class Q {
3148
3148
  */
3149
3149
  static fromReplace(e, t, r, s) {
3150
3150
  try {
3151
- return Q.ok(e.replace(t, r, s));
3151
+ return J.ok(e.replace(t, r, s));
3152
3152
  } catch (i) {
3153
3153
  if (i instanceof ar)
3154
- return Q.fail(i.message);
3154
+ return J.fail(i.message);
3155
3155
  throw i;
3156
3156
  }
3157
3157
  }
@@ -3173,7 +3173,7 @@ class rt extends de {
3173
3173
  }
3174
3174
  apply(e) {
3175
3175
  let t = e.slice(this.from, this.to), r = e.resolve(this.from), s = r.node(r.sharedDepth(this.to)), i = new M(bi(t.content, (o, a) => !o.isAtom || !a.type.allowsMarkType(this.mark.type) ? o : o.mark(this.mark.addToSet(o.marks)), s), t.openStart, t.openEnd);
3176
- return Q.fromReplace(e, this.from, this.to, i);
3176
+ return J.fromReplace(e, this.from, this.to, i);
3177
3177
  }
3178
3178
  invert() {
3179
3179
  return new Te(this.from, this.to, this.mark);
@@ -3212,7 +3212,7 @@ class Te extends de {
3212
3212
  }
3213
3213
  apply(e) {
3214
3214
  let t = e.slice(this.from, this.to), r = new M(bi(t.content, (s) => s.mark(this.mark.removeFromSet(s.marks)), e), t.openStart, t.openEnd);
3215
- return Q.fromReplace(e, this.from, this.to, r);
3215
+ return J.fromReplace(e, this.from, this.to, r);
3216
3216
  }
3217
3217
  invert() {
3218
3218
  return new rt(this.from, this.to, this.mark);
@@ -3252,9 +3252,9 @@ class st extends de {
3252
3252
  apply(e) {
3253
3253
  let t = e.nodeAt(this.pos);
3254
3254
  if (!t)
3255
- return Q.fail("No node at mark step's position");
3255
+ return J.fail("No node at mark step's position");
3256
3256
  let r = t.type.create(t.attrs, null, this.mark.addToSet(t.marks));
3257
- return Q.fromReplace(e, this.pos, this.pos + 1, new M(x.from(r), 0, t.isLeaf ? 0 : 1));
3257
+ return J.fromReplace(e, this.pos, this.pos + 1, new M(x.from(r), 0, t.isLeaf ? 0 : 1));
3258
3258
  }
3259
3259
  invert(e) {
3260
3260
  let t = e.nodeAt(this.pos);
@@ -3296,9 +3296,9 @@ class Nt extends de {
3296
3296
  apply(e) {
3297
3297
  let t = e.nodeAt(this.pos);
3298
3298
  if (!t)
3299
- return Q.fail("No node at mark step's position");
3299
+ return J.fail("No node at mark step's position");
3300
3300
  let r = t.type.create(t.attrs, null, this.mark.removeFromSet(t.marks));
3301
- return Q.fromReplace(e, this.pos, this.pos + 1, new M(x.from(r), 0, t.isLeaf ? 0 : 1));
3301
+ return J.fromReplace(e, this.pos, this.pos + 1, new M(x.from(r), 0, t.isLeaf ? 0 : 1));
3302
3302
  }
3303
3303
  invert(e) {
3304
3304
  let t = e.nodeAt(this.pos);
@@ -3335,7 +3335,7 @@ class ee extends de {
3335
3335
  super(), this.from = e, this.to = t, this.slice = r, this.structure = s;
3336
3336
  }
3337
3337
  apply(e) {
3338
- return this.structure && js(e, this.from, this.to) ? Q.fail("Structure replace would overwrite content") : Q.fromReplace(e, this.from, this.to, this.slice);
3338
+ return this.structure && js(e, this.from, this.to) ? J.fail("Structure replace would overwrite content") : J.fromReplace(e, this.from, this.to, this.slice);
3339
3339
  }
3340
3340
  getMap() {
3341
3341
  return new be([this.from, this.to - this.from, this.slice.size]);
@@ -3385,12 +3385,12 @@ class te extends de {
3385
3385
  }
3386
3386
  apply(e) {
3387
3387
  if (this.structure && (js(e, this.from, this.gapFrom) || js(e, this.gapTo, this.to)))
3388
- return Q.fail("Structure gap-replace would overwrite content");
3388
+ return J.fail("Structure gap-replace would overwrite content");
3389
3389
  let t = e.slice(this.gapFrom, this.gapTo);
3390
3390
  if (t.openStart || t.openEnd)
3391
- return Q.fail("Gap is not a flat range");
3391
+ return J.fail("Gap is not a flat range");
3392
3392
  let r = this.slice.insertAt(this.insert, t.content);
3393
- return r ? Q.fromReplace(e, this.from, this.to, r) : Q.fail("Content does not fit in gap");
3393
+ return r ? J.fromReplace(e, this.from, this.to, r) : J.fail("Content does not fit in gap");
3394
3394
  }
3395
3395
  getMap() {
3396
3396
  return new be([
@@ -3512,7 +3512,7 @@ function ki(n, e, t, r = t.contentMatch, s = !0) {
3512
3512
  function wd(n, e, t) {
3513
3513
  return (e == 0 || n.canReplace(e, n.childCount)) && (t == n.childCount || n.canReplace(0, t));
3514
3514
  }
3515
- function Yt(n) {
3515
+ function Xt(n) {
3516
3516
  let t = n.parent.content.cutByIndex(n.startIndex, n.endIndex);
3517
3517
  for (let r = n.depth, s = 0, i = 0; ; --r) {
3518
3518
  let o = n.$from.node(r), a = n.$from.index(r) + s, l = n.$to.indexAfter(r) - i;
@@ -3815,9 +3815,9 @@ class Ld {
3815
3815
  let { content: e, openStart: t, openEnd: r } = this.unplaced, s = ps(e, t);
3816
3816
  if (s.childCount <= 1 && t > 0) {
3817
3817
  let i = e.size - t <= t + s.size;
3818
- this.unplaced = new M(sn(e, t - 1, 1), t - 1, i ? t - 1 : r);
3818
+ this.unplaced = new M(on(e, t - 1, 1), t - 1, i ? t - 1 : r);
3819
3819
  } else
3820
- this.unplaced = new M(sn(e, t, 1), t, r);
3820
+ this.unplaced = new M(on(e, t, 1), t, r);
3821
3821
  }
3822
3822
  // Move content from the unplaced slice at `sliceDepth` to the
3823
3823
  // frontier node at `frontierDepth`. Close that frontier node when
@@ -3842,12 +3842,12 @@ class Ld {
3842
3842
  c++, (c > 1 || l == 0 || m.content.size) && (d = g, u.push(Ml(m.mark(f.allowedMarks(m.marks)), c == 1 ? l : 0, c == a.childCount ? h : -1)));
3843
3843
  }
3844
3844
  let p = c == a.childCount;
3845
- p || (h = -1), this.placed = on(this.placed, t, x.from(u)), this.frontier[t].match = d, p && h < 0 && r && r.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
3845
+ p || (h = -1), this.placed = an(this.placed, t, x.from(u)), this.frontier[t].match = d, p && h < 0 && r && r.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
3846
3846
  for (let m = 0, g = a; m < h; m++) {
3847
3847
  let y = g.lastChild;
3848
3848
  this.frontier.push({ type: y.type, match: y.contentMatchAt(y.childCount) }), g = y.content;
3849
3849
  }
3850
- this.unplaced = p ? e == 0 ? M.empty : new M(sn(o.content, e - 1, 1), e - 1, h < 0 ? o.openEnd : e - 1) : new M(sn(o.content, e, c), o.openStart, o.openEnd);
3850
+ this.unplaced = p ? e == 0 ? M.empty : new M(on(o.content, e - 1, 1), e - 1, h < 0 ? o.openEnd : e - 1) : new M(on(o.content, e, c), o.openStart, o.openEnd);
3851
3851
  }
3852
3852
  mustMoveInline() {
3853
3853
  if (!this.$to.parent.isTextblock)
@@ -3879,7 +3879,7 @@ class Ld {
3879
3879
  return null;
3880
3880
  for (; this.depth > t.depth; )
3881
3881
  this.closeFrontierNode();
3882
- t.fit.childCount && (this.placed = on(this.placed, t.depth, t.fit)), e = t.move;
3882
+ t.fit.childCount && (this.placed = an(this.placed, t.depth, t.fit)), e = t.move;
3883
3883
  for (let r = t.depth + 1; r <= e.depth; r++) {
3884
3884
  let s = e.node(r), i = s.type.contentMatch.fillBefore(s.content, !0, e.index(r));
3885
3885
  this.openFrontierNode(s.type, s.attrs, i);
@@ -3888,18 +3888,18 @@ class Ld {
3888
3888
  }
3889
3889
  openFrontierNode(e, t = null, r) {
3890
3890
  let s = this.frontier[this.depth];
3891
- s.match = s.match.matchType(e), this.placed = on(this.placed, this.depth, x.from(e.create(t, r))), this.frontier.push({ type: e, match: e.contentMatch });
3891
+ s.match = s.match.matchType(e), this.placed = an(this.placed, this.depth, x.from(e.create(t, r))), this.frontier.push({ type: e, match: e.contentMatch });
3892
3892
  }
3893
3893
  closeFrontierNode() {
3894
3894
  let t = this.frontier.pop().match.fillBefore(x.empty, !0);
3895
- t.childCount && (this.placed = on(this.placed, this.frontier.length, t));
3895
+ t.childCount && (this.placed = an(this.placed, this.frontier.length, t));
3896
3896
  }
3897
3897
  }
3898
- function sn(n, e, t) {
3899
- return e == 0 ? n.cutByIndex(t, n.childCount) : n.replaceChild(0, n.firstChild.copy(sn(n.firstChild.content, e - 1, t)));
3900
- }
3901
3898
  function on(n, e, t) {
3902
- return e == 0 ? n.append(t) : n.replaceChild(n.childCount - 1, n.lastChild.copy(on(n.lastChild.content, e - 1, t)));
3899
+ return e == 0 ? n.cutByIndex(t, n.childCount) : n.replaceChild(0, n.firstChild.copy(on(n.firstChild.content, e - 1, t)));
3900
+ }
3901
+ function an(n, e, t) {
3902
+ return e == 0 ? n.append(t) : n.replaceChild(n.childCount - 1, n.lastChild.copy(an(n.lastChild.content, e - 1, t)));
3903
3903
  }
3904
3904
  function ps(n, e) {
3905
3905
  for (let t = 0; t < e; t++)
@@ -4027,13 +4027,13 @@ class Ft extends de {
4027
4027
  apply(e) {
4028
4028
  let t = e.nodeAt(this.pos);
4029
4029
  if (!t)
4030
- return Q.fail("No node at attribute step's position");
4030
+ return J.fail("No node at attribute step's position");
4031
4031
  let r = /* @__PURE__ */ Object.create(null);
4032
4032
  for (let i in t.attrs)
4033
4033
  r[i] = t.attrs[i];
4034
4034
  r[this.attr] = this.value;
4035
4035
  let s = t.type.create(r, null, t.marks);
4036
- return Q.fromReplace(e, this.pos, this.pos + 1, new M(x.from(s), 0, t.isLeaf ? 0 : 1));
4036
+ return J.fromReplace(e, this.pos, this.pos + 1, new M(x.from(s), 0, t.isLeaf ? 0 : 1));
4037
4037
  }
4038
4038
  getMap() {
4039
4039
  return be.empty;
@@ -4055,7 +4055,7 @@ class Ft extends de {
4055
4055
  }
4056
4056
  }
4057
4057
  de.jsonID("attr", Ft);
4058
- class Mn extends de {
4058
+ class En extends de {
4059
4059
  /**
4060
4060
  Construct an attribute step.
4061
4061
  */
@@ -4068,13 +4068,13 @@ class Mn extends de {
4068
4068
  t[s] = e.attrs[s];
4069
4069
  t[this.attr] = this.value;
4070
4070
  let r = e.type.create(t, e.content, e.marks);
4071
- return Q.ok(r);
4071
+ return J.ok(r);
4072
4072
  }
4073
4073
  getMap() {
4074
4074
  return be.empty;
4075
4075
  }
4076
4076
  invert(e) {
4077
- return new Mn(this.attr, e.attrs[this.attr]);
4077
+ return new En(this.attr, e.attrs[this.attr]);
4078
4078
  }
4079
4079
  map(e) {
4080
4080
  return this;
@@ -4085,10 +4085,10 @@ class Mn extends de {
4085
4085
  static fromJSON(e, t) {
4086
4086
  if (typeof t.attr != "string")
4087
4087
  throw new RangeError("Invalid input for DocAttrStep.fromJSON");
4088
- return new Mn(t.attr, t.value);
4088
+ return new En(t.attr, t.value);
4089
4089
  }
4090
4090
  }
4091
- de.jsonID("docAttr", Mn);
4091
+ de.jsonID("docAttr", En);
4092
4092
  let Ht = class extends Error {
4093
4093
  };
4094
4094
  Ht = function n(e) {
@@ -4103,7 +4103,7 @@ class Al {
4103
4103
  Create a transform that starts with the given document.
4104
4104
  */
4105
4105
  constructor(e) {
4106
- this.doc = e, this.steps = [], this.docs = [], this.mapping = new vn();
4106
+ this.doc = e, this.steps = [], this.docs = [], this.mapping = new Mn();
4107
4107
  }
4108
4108
  /**
4109
4109
  The starting document.
@@ -4277,7 +4277,7 @@ class Al {
4277
4277
  Set a single attribute on the document to a new value.
4278
4278
  */
4279
4279
  setDocAttribute(e, t) {
4280
- return this.step(new Mn(e, t)), this;
4280
+ return this.step(new En(e, t)), this;
4281
4281
  }
4282
4282
  /**
4283
4283
  Add a mark to the node at position `pos`.
@@ -4889,13 +4889,13 @@ class Vd extends Al {
4889
4889
  function Io(n, e) {
4890
4890
  return !e || !n ? n : n.bind(e);
4891
4891
  }
4892
- class an {
4892
+ class ln {
4893
4893
  constructor(e, t, r) {
4894
4894
  this.name = e, this.init = Io(t.init, r), this.apply = Io(t.apply, r);
4895
4895
  }
4896
4896
  }
4897
4897
  const Hd = [
4898
- new an("doc", {
4898
+ new ln("doc", {
4899
4899
  init(n) {
4900
4900
  return n.doc || n.schema.topNodeType.createAndFill();
4901
4901
  },
@@ -4903,7 +4903,7 @@ const Hd = [
4903
4903
  return n.doc;
4904
4904
  }
4905
4905
  }),
4906
- new an("selection", {
4906
+ new ln("selection", {
4907
4907
  init(n, e) {
4908
4908
  return n.selection || B.atStart(e.doc);
4909
4909
  },
@@ -4911,7 +4911,7 @@ const Hd = [
4911
4911
  return n.selection;
4912
4912
  }
4913
4913
  }),
4914
- new an("storedMarks", {
4914
+ new ln("storedMarks", {
4915
4915
  init(n) {
4916
4916
  return n.storedMarks || null;
4917
4917
  },
@@ -4919,7 +4919,7 @@ const Hd = [
4919
4919
  return r.selection.$cursor ? n.storedMarks : null;
4920
4920
  }
4921
4921
  }),
4922
- new an("scrollToSelection", {
4922
+ new ln("scrollToSelection", {
4923
4923
  init() {
4924
4924
  return 0;
4925
4925
  },
@@ -4933,7 +4933,7 @@ class ys {
4933
4933
  this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = Hd.slice(), t && t.forEach((r) => {
4934
4934
  if (this.pluginsByKey[r.key])
4935
4935
  throw new RangeError("Adding different instances of a keyed plugin (" + r.key + ")");
4936
- this.plugins.push(r), this.pluginsByKey[r.key] = r, r.spec.state && this.fields.push(new an(r.key, r.spec.state, r));
4936
+ this.plugins.push(r), this.pluginsByKey[r.key] = r, r.spec.state && this.fields.push(new ln(r.key, r.spec.state, r));
4937
4937
  });
4938
4938
  }
4939
4939
  }
@@ -5127,7 +5127,7 @@ const bs = /* @__PURE__ */ Object.create(null);
5127
5127
  function Ol(n) {
5128
5128
  return n in bs ? n + "$" + ++bs[n] : (bs[n] = 0, n + "$");
5129
5129
  }
5130
- class J {
5130
+ class Q {
5131
5131
  /**
5132
5132
  Create a plugin key.
5133
5133
  */
@@ -5159,7 +5159,7 @@ const Rl = (n, e, t) => {
5159
5159
  return !1;
5160
5160
  let s = Ci(r);
5161
5161
  if (!s) {
5162
- let o = r.blockRange(), a = o && Yt(o);
5162
+ let o = r.blockRange(), a = o && Xt(o);
5163
5163
  return a == null ? !1 : (e && e(n.tr.lift(o, a).scrollIntoView()), !0);
5164
5164
  }
5165
5165
  let i = s.nodeBefore;
@@ -5322,7 +5322,7 @@ const Ud = (n, e) => {
5322
5322
  return !1;
5323
5323
  return e && e(n.tr.join(r).scrollIntoView()), !0;
5324
5324
  }, Jd = (n, e) => {
5325
- let { $from: t, $to: r } = n.selection, s = t.blockRange(r), i = s && Yt(s);
5325
+ let { $from: t, $to: r } = n.selection, s = t.blockRange(r), i = s && Xt(s);
5326
5326
  return i == null ? !1 : (e && e(n.tr.lift(s, i).scrollIntoView()), !0);
5327
5327
  }, _l = (n, e) => {
5328
5328
  let { $head: t, $anchor: r } = n.selection;
@@ -5370,7 +5370,7 @@ const Gd = (n, e) => {
5370
5370
  if (je(n.doc, i))
5371
5371
  return e && e(n.tr.split(i).scrollIntoView()), !0;
5372
5372
  }
5373
- let r = t.blockRange(), s = r && Yt(r);
5373
+ let r = t.blockRange(), s = r && Xt(r);
5374
5374
  return s == null ? !1 : (e && e(n.tr.lift(r, s).scrollIntoView()), !0);
5375
5375
  };
5376
5376
  function Qd(n) {
@@ -5426,7 +5426,7 @@ function Fl(n, e, t, r) {
5426
5426
  }
5427
5427
  return !0;
5428
5428
  }
5429
- let u = i.type.spec.isolating || r > 0 && l ? null : B.findFrom(e, 1), d = u && u.$from.blockRange(u.$to), f = d && Yt(d);
5429
+ let u = i.type.spec.isolating || r > 0 && l ? null : B.findFrom(e, 1), d = u && u.$from.blockRange(u.$to), f = d && Xt(d);
5430
5430
  if (f != null && f >= e.depth)
5431
5431
  return t && t(n.tr.lift(d, f).scrollIntoView()), !0;
5432
5432
  if (c && jt(i, "start", !0) && jt(s, "end")) {
@@ -5551,7 +5551,7 @@ function af(n) {
5551
5551
  function lf(n, e, t, r) {
5552
5552
  let s = n.tr, i = r.end, o = r.$to.end(r.depth);
5553
5553
  i < o && (s.step(new te(i - 1, o, i, o, new M(x.from(t.create(null, r.parent.copy())), 1, 0), 1, !0)), r = new cr(s.doc.resolve(r.$from.pos), s.doc.resolve(o), r.depth));
5554
- const a = Yt(r);
5554
+ const a = Xt(r);
5555
5555
  if (a == null)
5556
5556
  return !1;
5557
5557
  s.lift(r, a);
@@ -5612,7 +5612,7 @@ function Do(n, e, t, r, s) {
5612
5612
  return !0;
5613
5613
  if (e == (s < 0 ? 0 : Ce(n))) {
5614
5614
  let o = n.parentNode;
5615
- if (!o || o.nodeType != 1 || Pn(n) || ff.test(n.nodeName) || n.contentEditable == "false")
5615
+ if (!o || o.nodeType != 1 || Bn(n) || ff.test(n.nodeName) || n.contentEditable == "false")
5616
5616
  return !1;
5617
5617
  e = se(n) + (s < 0 ? 0 : 1), n = o;
5618
5618
  } else if (n.nodeType == 1) {
@@ -5639,7 +5639,7 @@ function hf(n, e) {
5639
5639
  if (n.contentEditable == "false")
5640
5640
  return null;
5641
5641
  n = n.childNodes[e - 1], e = Ce(n);
5642
- } else if (n.parentNode && !Pn(n))
5642
+ } else if (n.parentNode && !Bn(n))
5643
5643
  e = se(n), n = n.parentNode;
5644
5644
  else
5645
5645
  return null;
@@ -5653,7 +5653,7 @@ function pf(n, e) {
5653
5653
  if (n.contentEditable == "false")
5654
5654
  return null;
5655
5655
  n = n.childNodes[e], e = 0;
5656
- } else if (n.parentNode && !Pn(n))
5656
+ } else if (n.parentNode && !Bn(n))
5657
5657
  e = se(n) + 1, n = n.parentNode;
5658
5658
  else
5659
5659
  return null;
@@ -5669,7 +5669,7 @@ function mf(n, e, t) {
5669
5669
  r = r && i == 0, s = s && i == Ce(n);
5670
5670
  }
5671
5671
  }
5672
- function Pn(n) {
5672
+ function Bn(n) {
5673
5673
  let e;
5674
5674
  for (let t = n; t && !(e = t.pmViewDesc); t = t.parentNode)
5675
5675
  ;
@@ -5704,7 +5704,7 @@ function yf(n, e, t) {
5704
5704
  }
5705
5705
  const Pe = typeof navigator < "u" ? navigator : null, Lo = typeof document < "u" ? document : null, ft = Pe && Pe.userAgent || "", Us = /Edge\/(\d+)/.exec(ft), Hl = /MSIE \d/.exec(ft), Ks = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ft), ye = !!(Hl || Ks || Us), ot = Hl ? document.documentMode : Ks ? +Ks[1] : Us ? +Us[1] : 0, ve = !ye && /gecko\/(\d+)/i.test(ft);
5706
5706
  ve && +(/Firefox\/(\d+)/.exec(ft) || [0, 0])[1];
5707
- const Js = !ye && /Chrome\/(\d+)/.exec(ft), oe = !!Js, jl = Js ? +Js[1] : 0, ue = !ye && !!Pe && /Apple Computer/.test(Pe.vendor), Ut = ue && (/Mobile\/\w+/.test(ft) || !!Pe && Pe.maxTouchPoints > 2), we = Ut || (Pe ? /Mac/.test(Pe.platform) : !1), Wl = Pe ? /Win/.test(Pe.platform) : !1, Ve = /Android \d/.test(ft), Bn = !!Lo && "webkitFontSmoothing" in Lo.documentElement.style, bf = Bn ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
5707
+ const Js = !ye && /Chrome\/(\d+)/.exec(ft), oe = !!Js, jl = Js ? +Js[1] : 0, ue = !ye && !!Pe && /Apple Computer/.test(Pe.vendor), Ut = ue && (/Mobile\/\w+/.test(ft) || !!Pe && Pe.maxTouchPoints > 2), we = Ut || (Pe ? /Mac/.test(Pe.platform) : !1), Wl = Pe ? /Win/.test(Pe.platform) : !1, Ve = /Android \d/.test(ft), $n = !!Lo && "webkitFontSmoothing" in Lo.documentElement.style, bf = $n ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
5708
5708
  function kf(n) {
5709
5709
  let e = n.defaultView && n.defaultView.visualViewport;
5710
5710
  return e ? {
@@ -5901,7 +5901,7 @@ function Af(n, e) {
5901
5901
  u.nodeName == "IMG" && (d = u.getBoundingClientRect()).right <= e.left && d.bottom > e.top && s++;
5902
5902
  }
5903
5903
  let c;
5904
- Bn && s && r.nodeType == 1 && (c = r.childNodes[s - 1]).nodeType == 1 && c.contentEditable == "false" && c.getBoundingClientRect().top >= e.top && s--, r == n.dom && s == r.childNodes.length - 1 && r.lastChild.nodeType == 1 && e.top > r.lastChild.getBoundingClientRect().bottom ? a = n.state.doc.content.size : (s == 0 || r.nodeType != 1 || r.childNodes[s - 1].nodeName != "BR") && (a = Tf(n, r, s, e));
5904
+ $n && s && r.nodeType == 1 && (c = r.childNodes[s - 1]).nodeType == 1 && c.contentEditable == "false" && c.getBoundingClientRect().top >= e.top && s--, r == n.dom && s == r.childNodes.length - 1 && r.lastChild.nodeType == 1 && e.top > r.lastChild.getBoundingClientRect().bottom ? a = n.state.doc.content.size : (s == 0 || r.nodeType != 1 || r.childNodes[s - 1].nodeName != "BR") && (a = Tf(n, r, s, e));
5905
5905
  }
5906
5906
  a == null && (a = Ef(n, o, e));
5907
5907
  let l = n.docView.nearestDesc(o, !0);
@@ -5921,7 +5921,7 @@ function Ye(n, e) {
5921
5921
  }
5922
5922
  const Nf = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
5923
5923
  function Ql(n, e, t) {
5924
- let { node: r, offset: s, atom: i } = n.docView.domFromPos(e, t < 0 ? -1 : 1), o = Bn || ve;
5924
+ let { node: r, offset: s, atom: i } = n.docView.domFromPos(e, t < 0 ? -1 : 1), o = $n || ve;
5925
5925
  if (r.nodeType == 3)
5926
5926
  if (o && (Nf.test(r.nodeValue) || (t < 0 ? !s : s == r.nodeValue.length))) {
5927
5927
  let l = Ye(Fe(r, s, s), t);
@@ -5930,13 +5930,13 @@ function Ql(n, e, t) {
5930
5930
  if (c.top == l.top) {
5931
5931
  let u = Ye(Fe(r, s, s + 1), -1);
5932
5932
  if (u.top != l.top)
5933
- return en(u, u.left < c.left);
5933
+ return tn(u, u.left < c.left);
5934
5934
  }
5935
5935
  }
5936
5936
  return l;
5937
5937
  } else {
5938
5938
  let l = s, c = s, u = t < 0 ? 1 : -1;
5939
- return t < 0 && !s ? (c++, u = -1) : t >= 0 && s == r.nodeValue.length ? (l--, u = 1) : t < 0 ? l-- : c++, en(Ye(Fe(r, l, c), u), u < 0);
5939
+ return t < 0 && !s ? (c++, u = -1) : t >= 0 && s == r.nodeValue.length ? (l--, u = 1) : t < 0 ? l-- : c++, tn(Ye(Fe(r, l, c), u), u < 0);
5940
5940
  }
5941
5941
  if (!n.state.doc.resolve(e - (i || 0)).parent.inlineContent) {
5942
5942
  if (i == null && s && (t < 0 || s == Ce(r))) {
@@ -5954,7 +5954,7 @@ function Ql(n, e, t) {
5954
5954
  if (i == null && s && (t < 0 || s == Ce(r))) {
5955
5955
  let l = r.childNodes[s - 1], c = l.nodeType == 3 ? Fe(l, Ce(l) - (o ? 0 : 1)) : l.nodeType == 1 && (l.nodeName != "BR" || !l.nextSibling) ? l : null;
5956
5956
  if (c)
5957
- return en(Ye(c, 1), !1);
5957
+ return tn(Ye(c, 1), !1);
5958
5958
  }
5959
5959
  if (i == null && s < Ce(r)) {
5960
5960
  let l = r.childNodes[s];
@@ -5962,11 +5962,11 @@ function Ql(n, e, t) {
5962
5962
  l = l.nextSibling;
5963
5963
  let c = l ? l.nodeType == 3 ? Fe(l, 0, o ? 0 : 1) : l.nodeType == 1 ? l : null : null;
5964
5964
  if (c)
5965
- return en(Ye(c, -1), !0);
5965
+ return tn(Ye(c, -1), !0);
5966
5966
  }
5967
- return en(Ye(r.nodeType == 3 ? Fe(r) : r, -t), t >= 0);
5967
+ return tn(Ye(r.nodeType == 3 ? Fe(r) : r, -t), t >= 0);
5968
5968
  }
5969
- function en(n, e) {
5969
+ function tn(n, e) {
5970
5970
  if (n.width == 0)
5971
5971
  return n;
5972
5972
  let t = e ? n.left : n.right;
@@ -6041,7 +6041,7 @@ function Df(n, e, t) {
6041
6041
  return $o == e && _o == t ? zo : ($o = e, _o = t, zo = t == "up" || t == "down" ? Of(n, e, t) : Rf(n, e, t));
6042
6042
  }
6043
6043
  const Me = 0, qo = 1, yt = 2, Be = 3;
6044
- class $n {
6044
+ class _n {
6045
6045
  constructor(e, t, r, s) {
6046
6046
  this.parent = e, this.children = t, this.dom = r, this.contentDOM = s, this.dirty = Me, r.pmViewDesc = this;
6047
6047
  }
@@ -6385,7 +6385,7 @@ class $n {
6385
6385
  return !1;
6386
6386
  }
6387
6387
  }
6388
- class Xl extends $n {
6388
+ class Xl extends _n {
6389
6389
  constructor(e, t, r, s) {
6390
6390
  let i, o = t.type.toDOM;
6391
6391
  if (typeof o == "function" && (o = o(r, () => {
@@ -6428,7 +6428,7 @@ class Xl extends $n {
6428
6428
  return this.widget.type.side;
6429
6429
  }
6430
6430
  }
6431
- class Lf extends $n {
6431
+ class Lf extends _n {
6432
6432
  constructor(e, t, r, s) {
6433
6433
  super(e, [], t, null), this.textDOM = r, this.text = s;
6434
6434
  }
@@ -6445,7 +6445,7 @@ class Lf extends $n {
6445
6445
  return e.type === "characterData" && e.target.nodeValue == e.oldValue;
6446
6446
  }
6447
6447
  }
6448
- class It extends $n {
6448
+ class It extends _n {
6449
6449
  constructor(e, t, r, s, i) {
6450
6450
  super(e, [], r, s), this.mark = t, this.spec = i;
6451
6451
  }
@@ -6481,7 +6481,7 @@ class It extends $n {
6481
6481
  this.spec.destroy && this.spec.destroy(), super.destroy();
6482
6482
  }
6483
6483
  }
6484
- class at extends $n {
6484
+ class at extends _n {
6485
6485
  constructor(e, t, r, s, i, o, a, l, c) {
6486
6486
  super(e, [], i, o), this.node = t, this.outerDeco = r, this.innerDeco = s, this.nodeDOM = a;
6487
6487
  }
@@ -6655,7 +6655,7 @@ class ts extends at {
6655
6655
  return this.node.text == e;
6656
6656
  }
6657
6657
  }
6658
- class Zl extends $n {
6658
+ class Zl extends _n {
6659
6659
  parseRule() {
6660
6660
  return { ignore: !0 };
6661
6661
  }
@@ -6722,22 +6722,22 @@ function ec(n, e, t) {
6722
6722
  r = Vo(r), s = !0;
6723
6723
  s && t.trackWrites == n && (t.trackWrites = null);
6724
6724
  }
6725
- const hn = function(n) {
6725
+ const pn = function(n) {
6726
6726
  n && (this.nodeName = n);
6727
6727
  };
6728
- hn.prototype = /* @__PURE__ */ Object.create(null);
6729
- const bt = [new hn()];
6728
+ pn.prototype = /* @__PURE__ */ Object.create(null);
6729
+ const bt = [new pn()];
6730
6730
  function Gs(n, e, t) {
6731
6731
  if (n.length == 0)
6732
6732
  return bt;
6733
- let r = t ? bt[0] : new hn(), s = [r];
6733
+ let r = t ? bt[0] : new pn(), s = [r];
6734
6734
  for (let i = 0; i < n.length; i++) {
6735
6735
  let o = n[i].type.attrs;
6736
6736
  if (o) {
6737
- o.nodeName && s.push(r = new hn(o.nodeName));
6737
+ o.nodeName && s.push(r = new pn(o.nodeName));
6738
6738
  for (let a in o) {
6739
6739
  let l = o[a];
6740
- l != null && (t && s.length == 1 && s.push(r = new hn(e.isInline ? "span" : "div")), a == "class" ? r.class = (r.class ? r.class + " " : "") + l : a == "style" ? r.style = (r.style ? r.style + ";" : "") + l : a != "nodeName" && (r[a] = l));
6740
+ l != null && (t && s.length == 1 && s.push(r = new pn(e.isInline ? "span" : "div")), a == "class" ? r.class = (r.class ? r.class + " " : "") + l : a == "style" ? r.style = (r.style ? r.style + ";" : "") + l : a != "nodeName" && (r[a] = l));
6741
6741
  }
6742
6742
  }
6743
6743
  }
@@ -7211,7 +7211,7 @@ function Jo(n, e, t) {
7211
7211
  if (!i || i.isText)
7212
7212
  return !1;
7213
7213
  let a = e < 0 ? s.pos - i.nodeSize : s.pos;
7214
- return i.isAtom || (o = n.docView.descAt(a)) && !o.contentDOM ? N.isSelectable(i) ? Xe(n, new N(e < 0 ? n.state.doc.resolve(s.pos - i.nodeSize) : s)) : Bn ? Xe(n, new D(n.state.doc.resolve(e < 0 ? a : a + i.nodeSize))) : !1 : !1;
7214
+ return i.isAtom || (o = n.docView.descAt(a)) && !o.contentDOM ? N.isSelectable(i) ? Xe(n, new N(e < 0 ? n.state.doc.resolve(s.pos - i.nodeSize) : s)) : $n ? Xe(n, new D(n.state.doc.resolve(e < 0 ? a : a + i.nodeSize))) : !1 : !1;
7215
7215
  }
7216
7216
  } else return !1;
7217
7217
  else {
@@ -7226,7 +7226,7 @@ function Jo(n, e, t) {
7226
7226
  function fr(n) {
7227
7227
  return n.nodeType == 3 ? n.nodeValue.length : n.childNodes.length;
7228
7228
  }
7229
- function pn(n, e) {
7229
+ function mn(n, e) {
7230
7230
  let t = n.pmViewDesc;
7231
7231
  return t && t.size == 0 && (e < 0 || n.nextSibling || n.nodeName != "BR");
7232
7232
  }
@@ -7238,13 +7238,13 @@ function Uf(n) {
7238
7238
  if (!t)
7239
7239
  return;
7240
7240
  let s, i, o = !1;
7241
- for (ve && t.nodeType == 1 && r < fr(t) && pn(t.childNodes[r], -1) && (o = !0); ; )
7241
+ for (ve && t.nodeType == 1 && r < fr(t) && mn(t.childNodes[r], -1) && (o = !0); ; )
7242
7242
  if (r > 0) {
7243
7243
  if (t.nodeType != 1)
7244
7244
  break;
7245
7245
  {
7246
7246
  let a = t.childNodes[r - 1];
7247
- if (pn(a, -1))
7247
+ if (mn(a, -1))
7248
7248
  s = t, i = --r;
7249
7249
  else if (a.nodeType == 3)
7250
7250
  t = a, r = t.nodeValue.length;
@@ -7256,7 +7256,7 @@ function Uf(n) {
7256
7256
  break;
7257
7257
  {
7258
7258
  let a = t.previousSibling;
7259
- for (; a && pn(a, -1); )
7259
+ for (; a && mn(a, -1); )
7260
7260
  s = t.parentNode, i = se(a), a = a.previousSibling;
7261
7261
  if (a)
7262
7262
  t = a, r = fr(t);
@@ -7279,7 +7279,7 @@ function Kf(n) {
7279
7279
  if (t.nodeType != 1)
7280
7280
  break;
7281
7281
  let a = t.childNodes[r];
7282
- if (pn(a, 1))
7282
+ if (mn(a, 1))
7283
7283
  i = t, o = ++r;
7284
7284
  else
7285
7285
  break;
@@ -7288,7 +7288,7 @@ function Kf(n) {
7288
7288
  break;
7289
7289
  {
7290
7290
  let a = t.nextSibling;
7291
- for (; a && pn(a, 1); )
7291
+ for (; a && mn(a, 1); )
7292
7292
  i = a.parentNode, o = se(a) + 1, a = a.nextSibling;
7293
7293
  if (a)
7294
7294
  t = a, r = 0, s = fr(t);
@@ -7306,7 +7306,7 @@ function oc(n) {
7306
7306
  return e && e.node && e.node.isBlock;
7307
7307
  }
7308
7308
  function Jf(n, e) {
7309
- for (; n && e == n.childNodes.length && !Pn(n); )
7309
+ for (; n && e == n.childNodes.length && !Bn(n); )
7310
7310
  e = se(n) + 1, n = n.parentNode;
7311
7311
  for (; n && e < n.childNodes.length; ) {
7312
7312
  let t = n.childNodes[e];
@@ -7318,7 +7318,7 @@ function Jf(n, e) {
7318
7318
  }
7319
7319
  }
7320
7320
  function Gf(n, e) {
7321
- for (; n && !e && !Pn(n); )
7321
+ for (; n && !e && !Bn(n); )
7322
7322
  e = se(n), n = n.parentNode;
7323
7323
  for (; n && e; ) {
7324
7324
  let t = n.childNodes[e - 1];
@@ -7492,7 +7492,7 @@ function ac(n, e, t, r, s) {
7492
7492
  } else
7493
7493
  n.someProp("transformPastedHTML", (d) => {
7494
7494
  t = d(t, n);
7495
- }), o = nh(t), Bn && rh(o);
7495
+ }), o = nh(t), $n && rh(o);
7496
7496
  let c = o && o.querySelector("[data-pm-slice]"), u = c && /^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice") || "");
7497
7497
  if (u && u[3])
7498
7498
  for (let d = +u[3]; d > 0; d--) {
@@ -7926,12 +7926,12 @@ function Ch(n, e) {
7926
7926
  t.parentNode && t.parentNode.removeChild(t), n.focus();
7927
7927
  }, 50);
7928
7928
  }
7929
- const En = ye && ot < 15 || Ut && bf < 604;
7929
+ const Tn = ye && ot < 15 || Ut && bf < 604;
7930
7930
  he.copy = pe.cut = (n, e) => {
7931
7931
  let t = e, r = n.state.selection, s = t.type == "cut";
7932
7932
  if (r.empty)
7933
7933
  return;
7934
- let i = En ? null : t.clipboardData, o = r.content(), { dom: a, text: l } = Oi(n, o);
7934
+ let i = Tn ? null : t.clipboardData, o = r.content(), { dom: a, text: l } = Oi(n, o);
7935
7935
  i ? (t.preventDefault(), i.clearData(), i.setData("text/html", a.innerHTML), i.setData("text/plain", l)) : Ch(n, a), s && n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
7936
7936
  };
7937
7937
  function vh(n) {
@@ -7944,10 +7944,10 @@ function Mh(n, e) {
7944
7944
  t || (r.contentEditable = "true"), r.style.cssText = "position: fixed; left: -10000px; top: 10px", r.focus();
7945
7945
  let s = n.input.shiftKey && n.input.lastKeyCode != 45;
7946
7946
  setTimeout(() => {
7947
- n.focus(), r.parentNode && r.parentNode.removeChild(r), t ? Tn(n, r.value, null, s, e) : Tn(n, r.textContent, r.innerHTML, s, e);
7947
+ n.focus(), r.parentNode && r.parentNode.removeChild(r), t ? An(n, r.value, null, s, e) : An(n, r.textContent, r.innerHTML, s, e);
7948
7948
  }, 50);
7949
7949
  }
7950
- function Tn(n, e, t, r, s) {
7950
+ function An(n, e, t, r, s) {
7951
7951
  let i = ac(n, e, t, r, n.state.selection.$from);
7952
7952
  if (n.someProp("handlePaste", (l) => l(n, s, i || M.empty)))
7953
7953
  return !0;
@@ -7967,8 +7967,8 @@ pe.paste = (n, e) => {
7967
7967
  let t = e;
7968
7968
  if (n.composing && !Ve)
7969
7969
  return;
7970
- let r = En ? null : t.clipboardData, s = n.input.shiftKey && n.input.lastKeyCode != 45;
7971
- r && Tn(n, yc(r), r.getData("text/html"), s, t) ? t.preventDefault() : Mh(n, t);
7970
+ let r = Tn ? null : t.clipboardData, s = n.input.shiftKey && n.input.lastKeyCode != 45;
7971
+ r && An(n, yc(r), r.getData("text/html"), s, t) ? t.preventDefault() : Mh(n, t);
7972
7972
  };
7973
7973
  class bc {
7974
7974
  constructor(e, t, r) {
@@ -7994,7 +7994,7 @@ he.dragstart = (n, e) => {
7994
7994
  }
7995
7995
  }
7996
7996
  let a = (o || n.state.selection).content(), { dom: l, text: c, slice: u } = Oi(n, a);
7997
- (!t.dataTransfer.files.length || !oe || jl > 120) && t.dataTransfer.clearData(), t.dataTransfer.setData(En ? "Text" : "text/html", l.innerHTML), t.dataTransfer.effectAllowed = "copyMove", En || t.dataTransfer.setData("text/plain", c), n.dragging = new bc(u, kc(n, t), o);
7997
+ (!t.dataTransfer.files.length || !oe || jl > 120) && t.dataTransfer.clearData(), t.dataTransfer.setData(Tn ? "Text" : "text/html", l.innerHTML), t.dataTransfer.effectAllowed = "copyMove", Tn || t.dataTransfer.setData("text/plain", c), n.dragging = new bc(u, kc(n, t), o);
7998
7998
  };
7999
7999
  he.dragend = (n) => {
8000
8000
  let e = n.dragging;
@@ -8019,7 +8019,7 @@ function Th(n, e, t) {
8019
8019
  let s = n.state.doc.resolve(r.pos), i = t && t.slice;
8020
8020
  i ? n.someProp("transformPasted", (h) => {
8021
8021
  i = h(i, n, !1);
8022
- }) : i = ac(n, yc(e.dataTransfer), En ? null : e.dataTransfer.getData("text/html"), !1, s);
8022
+ }) : i = ac(n, yc(e.dataTransfer), Tn ? null : e.dataTransfer.getData("text/html"), !1, s);
8023
8023
  let o = !!(t && kc(n, e));
8024
8024
  if (n.someProp("handleDrop", (h) => h(n, e, i || M.empty, o))) {
8025
8025
  e.preventDefault();
@@ -8070,7 +8070,7 @@ he.beforeinput = (n, e) => {
8070
8070
  };
8071
8071
  for (let n in pe)
8072
8072
  he[n] = pe[n];
8073
- function An(n, e) {
8073
+ function Nn(n, e) {
8074
8074
  if (n == e)
8075
8075
  return !0;
8076
8076
  for (let t in n)
@@ -8093,7 +8093,7 @@ class pr {
8093
8093
  return !0;
8094
8094
  }
8095
8095
  eq(e) {
8096
- return this == e || e instanceof pr && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && An(this.spec, e.spec));
8096
+ return this == e || e instanceof pr && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && Nn(this.spec, e.spec));
8097
8097
  }
8098
8098
  destroy(e) {
8099
8099
  this.spec.destroy && this.spec.destroy(e);
@@ -8111,7 +8111,7 @@ class lt {
8111
8111
  return t.from < t.to;
8112
8112
  }
8113
8113
  eq(e) {
8114
- return this == e || e instanceof lt && An(this.attrs, e.attrs) && An(this.spec, e.spec);
8114
+ return this == e || e instanceof lt && Nn(this.attrs, e.attrs) && Nn(this.spec, e.spec);
8115
8115
  }
8116
8116
  static is(e) {
8117
8117
  return e.type instanceof lt;
@@ -8135,7 +8135,7 @@ class Li {
8135
8135
  return s == t.from && !(i = e.child(r)).isText && s + i.nodeSize == t.to;
8136
8136
  }
8137
8137
  eq(e) {
8138
- return this == e || e instanceof Li && An(this.attrs, e.attrs) && An(this.spec, e.spec);
8138
+ return this == e || e instanceof Li && Nn(this.attrs, e.attrs) && Nn(this.spec, e.spec);
8139
8139
  }
8140
8140
  destroy() {
8141
8141
  }
@@ -9272,13 +9272,13 @@ class Cc {
9272
9272
  [`handlePaste`](https://prosemirror.net/docs/ref/#view.EditorProps.handlePaste) hook.
9273
9273
  */
9274
9274
  pasteHTML(e, t) {
9275
- return Tn(this, "", e, !1, t || new ClipboardEvent("paste"));
9275
+ return An(this, "", e, !1, t || new ClipboardEvent("paste"));
9276
9276
  }
9277
9277
  /**
9278
9278
  Run the editor's paste logic with the given plain-text input.
9279
9279
  */
9280
9280
  pasteText(e, t) {
9281
- return Tn(this, e, null, !0, t || new ClipboardEvent("paste"));
9281
+ return An(this, e, null, !0, t || new ClipboardEvent("paste"));
9282
9282
  }
9283
9283
  /**
9284
9284
  Serialize the given slice as it would be if it was copied from
@@ -9690,7 +9690,7 @@ var np = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
9690
9690
  const { doc: c, mapping: u } = e, d = c.resolve(u.map(l)), f = c.resolve(u.map(l + a.nodeSize)), h = d.blockRange(f);
9691
9691
  if (!h)
9692
9692
  return;
9693
- const p = Yt(h);
9693
+ const p = Xt(h);
9694
9694
  if (a.type.isTextblock) {
9695
9695
  const { defaultType: m } = d.parent.contentMatchAt(d.index());
9696
9696
  e.setNodeMarkup(h.start, m);
@@ -9718,7 +9718,7 @@ var np = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
9718
9718
  }
9719
9719
  return !1;
9720
9720
  };
9721
- function Y(n, e) {
9721
+ function G(n, e) {
9722
9722
  if (typeof n == "string") {
9723
9723
  if (!e.nodes[n])
9724
9724
  throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);
@@ -9727,7 +9727,7 @@ function Y(n, e) {
9727
9727
  return n;
9728
9728
  }
9729
9729
  var cp = (n) => ({ tr: e, state: t, dispatch: r }) => {
9730
- const s = Y(n, t.schema), i = e.selection.$anchor;
9730
+ const s = G(n, t.schema), i = e.selection.$anchor;
9731
9731
  for (let o = i.depth; o > 0; o -= 1)
9732
9732
  if (i.node(o).type === s) {
9733
9733
  if (r) {
@@ -9820,7 +9820,7 @@ function Ac(n, e = null) {
9820
9820
  function ti() {
9821
9821
  return navigator.platform === "Android" || /android/i.test(navigator.userAgent);
9822
9822
  }
9823
- function Nn() {
9823
+ function On() {
9824
9824
  return ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(navigator.platform) || // iPad on iOS 13 detection
9825
9825
  navigator.userAgent.includes("Mac") && "ontouchend" in document;
9826
9826
  }
@@ -9833,7 +9833,7 @@ var yp = (n = null, e = {}) => ({ editor: t, view: r, tr: s, dispatch: i }) => {
9833
9833
  ...e
9834
9834
  };
9835
9835
  const o = () => {
9836
- (Nn() || ti()) && r.dom.focus(), gp() && !Nn() && !ti() && r.dom.focus({ preventScroll: !0 }), requestAnimationFrame(() => {
9836
+ (On() || ti()) && r.dom.focus(), gp() && !On() && !ti() && r.dom.focus({ preventScroll: !0 }), requestAnimationFrame(() => {
9837
9837
  t.isDestroyed || (r.focus(), e?.scrollIntoView && t.commands.scrollIntoView());
9838
9838
  });
9839
9839
  };
@@ -9855,13 +9855,13 @@ var yp = (n = null, e = {}) => ({ editor: t, view: r, tr: s, dispatch: i }) => {
9855
9855
  }
9856
9856
  return n;
9857
9857
  };
9858
- function ln(n) {
9858
+ function cn(n) {
9859
9859
  if (typeof window > "u")
9860
9860
  throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");
9861
9861
  const e = `<body>${n}</body>`, t = new window.DOMParser().parseFromString(e, "text/html").body;
9862
9862
  return Nc(t);
9863
9863
  }
9864
- function On(n, e, t) {
9864
+ function In(n, e, t) {
9865
9865
  if (n instanceof Ae || n instanceof x)
9866
9866
  return n;
9867
9867
  t = {
@@ -9879,7 +9879,7 @@ function On(n, e, t) {
9879
9879
  } catch (i) {
9880
9880
  if (t.errorOnInvalidContent)
9881
9881
  throw new Error("[tiptap error]: Invalid JSON content", { cause: i });
9882
- return console.warn("[tiptap warn]: Invalid content.", "Passed value:", n, "Error:", i), On("", e, t);
9882
+ return console.warn("[tiptap warn]: Invalid content.", "Passed value:", n, "Error:", i), In("", e, t);
9883
9883
  }
9884
9884
  if (s) {
9885
9885
  if (t.errorOnInvalidContent) {
@@ -9902,15 +9902,15 @@ function On(n, e, t) {
9902
9902
  }
9903
9903
  })
9904
9904
  });
9905
- if (t.slice ? He.fromSchema(l).parseSlice(ln(n), t.parseOptions) : He.fromSchema(l).parse(ln(n), t.parseOptions), t.errorOnInvalidContent && o)
9905
+ if (t.slice ? He.fromSchema(l).parseSlice(cn(n), t.parseOptions) : He.fromSchema(l).parse(cn(n), t.parseOptions), t.errorOnInvalidContent && o)
9906
9906
  throw new Error("[tiptap error]: Invalid HTML content", {
9907
9907
  cause: new Error(`Invalid element found: ${a}`)
9908
9908
  });
9909
9909
  }
9910
9910
  const i = He.fromSchema(e);
9911
- return t.slice ? i.parseSlice(ln(n), t.parseOptions).content : i.parse(ln(n), t.parseOptions);
9911
+ return t.slice ? i.parseSlice(cn(n), t.parseOptions).content : i.parse(cn(n), t.parseOptions);
9912
9912
  }
9913
- return On("", e, t);
9913
+ return In("", e, t);
9914
9914
  }
9915
9915
  function xp(n, e, t) {
9916
9916
  const r = n.steps.length - 1;
@@ -9950,7 +9950,7 @@ var Sp = (n) => !("type" in n), wp = (n, e, t) => ({ tr: r, dispatch: s, editor:
9950
9950
  };
9951
9951
  if (!t.errorOnInvalidContent && !i.options.enableContentCheck && i.options.emitContentError)
9952
9952
  try {
9953
- On(e, i.schema, {
9953
+ In(e, i.schema, {
9954
9954
  parseOptions: c,
9955
9955
  errorOnInvalidContent: !0
9956
9956
  });
@@ -9958,7 +9958,7 @@ var Sp = (n) => !("type" in n), wp = (n, e, t) => ({ tr: r, dispatch: s, editor:
9958
9958
  l(g);
9959
9959
  }
9960
9960
  try {
9961
- a = On(e, i.schema, {
9961
+ a = In(e, i.schema, {
9962
9962
  parseOptions: c,
9963
9963
  errorOnInvalidContent: (o = t.errorOnInvalidContent) != null ? o : i.options.enableContentCheck
9964
9964
  });
@@ -10025,7 +10025,7 @@ function Ip(n) {
10025
10025
  else if (/^s(hift)?$/i.test(l))
10026
10026
  i = !0;
10027
10027
  else if (/^mod$/i.test(l))
10028
- Nn() || Oc() ? o = !0 : s = !0;
10028
+ On() || Oc() ? o = !0 : s = !0;
10029
10029
  else
10030
10030
  throw new Error(`Unrecognized modifier name: ${l}`);
10031
10031
  }
@@ -10049,7 +10049,7 @@ var Rp = (n) => ({ editor: e, view: t, tr: r, dispatch: s }) => {
10049
10049
  }), !0;
10050
10050
  };
10051
10051
  function ut(n, e, t = {}) {
10052
- const { from: r, to: s, empty: i } = n.selection, o = e ? Y(e, n.schema) : null, a = [];
10052
+ const { from: r, to: s, empty: i } = n.selection, o = e ? G(e, n.schema) : null, a = [];
10053
10053
  n.doc.nodesBetween(r, s, (d, f) => {
10054
10054
  if (d.isText)
10055
10055
  return;
@@ -10064,10 +10064,10 @@ function ut(n, e, t = {}) {
10064
10064
  return i ? !!c.length : c.reduce((d, f) => d + f.to - f.from, 0) >= l;
10065
10065
  }
10066
10066
  var Dp = (n, e = {}) => ({ state: t, dispatch: r }) => {
10067
- const s = Y(n, t.schema);
10067
+ const s = G(n, t.schema);
10068
10068
  return ut(t, s, e) ? Jd(t, r) : !1;
10069
10069
  }, Lp = () => ({ state: n, dispatch: e }) => ql(n, e), Pp = (n) => ({ state: e, dispatch: t }) => {
10070
- const r = Y(n, e.schema);
10070
+ const r = G(n, e.schema);
10071
10071
  return af(r)(e, t);
10072
10072
  }, Bp = () => ({ state: n, dispatch: e }) => _l(n, e);
10073
10073
  function is(n, e) {
@@ -10085,7 +10085,7 @@ var $p = (n, e) => ({ tr: t, state: r, dispatch: s }) => {
10085
10085
  );
10086
10086
  if (!a)
10087
10087
  return !1;
10088
- a === "node" && (i = Y(n, r.schema)), a === "mark" && (o = Ue(n, r.schema));
10088
+ a === "node" && (i = G(n, r.schema)), a === "mark" && (o = Ue(n, r.schema));
10089
10089
  let l = !1;
10090
10090
  return t.selection.ranges.forEach((c) => {
10091
10091
  r.doc.nodesBetween(c.$from.pos, c.$to.pos, (u, d) => {
@@ -10102,7 +10102,7 @@ var $p = (n, e) => ({ tr: t, state: r, dispatch: s }) => {
10102
10102
  return !0;
10103
10103
  }, qp = () => ({ state: n, dispatch: e }) => Ll(n, e), Fp = () => ({ state: n, dispatch: e }) => $l(n, e), Vp = () => ({ state: n, dispatch: e }) => Xd(n, e), Hp = () => ({ state: n, dispatch: e }) => tf(n, e), jp = () => ({ state: n, dispatch: e }) => ef(n, e);
10104
10104
  function ni(n, e, t = {}, r = {}) {
10105
- return On(n, e, {
10105
+ return In(n, e, {
10106
10106
  slice: !1,
10107
10107
  parseOptions: t,
10108
10108
  errorOnInvalidContent: r.errorOnInvalidContent
@@ -10455,14 +10455,14 @@ function Xp(n) {
10455
10455
  const e = n.filter((t, r) => n.indexOf(t) !== r);
10456
10456
  return Array.from(new Set(e));
10457
10457
  }
10458
- function mn(n) {
10458
+ function gn(n) {
10459
10459
  return n.sort((t, r) => {
10460
10460
  const s = T(t, "priority") || 100, i = T(r, "priority") || 100;
10461
10461
  return s > i ? -1 : s < i ? 1 : 0;
10462
10462
  });
10463
10463
  }
10464
10464
  function Fi(n) {
10465
- const e = mn(zi(n)), t = Xp(e.map((r) => r.name));
10465
+ const e = gn(zi(n)), t = Xp(e.map((r) => r.name));
10466
10466
  return t.length && console.warn(
10467
10467
  `[tiptap warn]: Duplicate extension names found: [${t.map((r) => `'${r}'`).join(", ")}]. This can lead to issues.`
10468
10468
  ), e;
@@ -10471,8 +10471,8 @@ function Zp(n, e) {
10471
10471
  const t = Fi(n);
10472
10472
  return Pc(t, e);
10473
10473
  }
10474
- function k0(n, e) {
10475
- const t = Zp(e), r = ln(n);
10474
+ function b0(n, e) {
10475
+ const t = Zp(e), r = cn(n);
10476
10476
  return He.fromSchema(t).parse(r).toJSON();
10477
10477
  }
10478
10478
  function Bc(n, e, t) {
@@ -10508,7 +10508,7 @@ function $c(n) {
10508
10508
  );
10509
10509
  }
10510
10510
  function tm(n, e) {
10511
- const t = Y(e, n.schema), { from: r, to: s } = n.selection, i = [];
10511
+ const t = G(e, n.schema), { from: r, to: s } = n.selection, i = [];
10512
10512
  n.doc.nodesBetween(r, s, (a) => {
10513
10513
  i.push(a);
10514
10514
  });
@@ -10589,7 +10589,7 @@ var sm = (n, e, t, r = 20) => {
10589
10589
  }
10590
10590
  return [o, i];
10591
10591
  };
10592
- function tn(n, e) {
10592
+ function nn(n, e) {
10593
10593
  return e.nodes[n] || e.marks[n] || null;
10594
10594
  }
10595
10595
  function rr(n, e, t) {
@@ -10784,7 +10784,7 @@ var hm = (n, e = {}) => ({ tr: t, state: r, dispatch: s }) => {
10784
10784
  });
10785
10785
  return fm(r, t, l);
10786
10786
  }, pm = (n, e) => ({ tr: t }) => (t.setMeta(n, e), !0), mm = (n, e = {}) => ({ state: t, dispatch: r, chain: s }) => {
10787
- const i = Y(n, t.schema);
10787
+ const i = G(n, t.schema);
10788
10788
  let o;
10789
10789
  return t.selection.$anchor.sameParent(t.selection.$head) && (o = t.selection.$anchor.parent.attrs), i.isTextblock ? s().command(({ commands: a }) => Ro(i, { ...o, ...e })(t) ? !0 : a.clearNodes()).command(({ state: a }) => Ro(i, { ...o, ...e })(a, r)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
10790
10790
  }, gm = (n) => ({ tr: e, dispatch: t }) => {
@@ -10809,7 +10809,7 @@ var hm = (n, e = {}) => ({ tr: t, state: r, dispatch: s }) => {
10809
10809
  }
10810
10810
  return !0;
10811
10811
  }, km = (n) => ({ state: e, dispatch: t }) => {
10812
- const r = Y(n, e.schema);
10812
+ const r = G(n, e.schema);
10813
10813
  return uf(r)(e, t);
10814
10814
  };
10815
10815
  function xa(n, e) {
@@ -10847,7 +10847,7 @@ var xm = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
10847
10847
  return p;
10848
10848
  }, Sm = (n, e = {}) => ({ tr: t, state: r, dispatch: s, editor: i }) => {
10849
10849
  var o;
10850
- const a = Y(n, r.schema), { $from: l, $to: c } = r.selection, u = r.selection.node;
10850
+ const a = G(n, r.schema), { $from: l, $to: c } = r.selection, u = r.selection.node;
10851
10851
  if (u && u.isBlock || l.depth < 2 || !l.sameParent(c))
10852
10852
  return !1;
10853
10853
  const d = l.node(-1);
@@ -10922,7 +10922,7 @@ var xm = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
10922
10922
  const s = n.doc.nodeAt(r);
10923
10923
  return t.node.type === s?.type && dt(n.doc, r) && n.join(r), !0;
10924
10924
  }, wm = (n, e, t, r = {}) => ({ editor: s, tr: i, state: o, dispatch: a, chain: l, commands: c, can: u }) => {
10925
- const { extensions: d, splittableMarks: f } = s.extensionManager, h = Y(n, o.schema), p = Y(e, o.schema), { selection: m, storedMarks: g } = o, { $from: y, $to: b } = m, v = y.blockRange(b), A = g || m.$to.parentOffset && m.$from.marks();
10925
+ const { extensions: d, splittableMarks: f } = s.extensionManager, h = G(n, o.schema), p = G(e, o.schema), { selection: m, storedMarks: g } = o, { $from: y, $to: b } = m, v = y.blockRange(b), A = g || m.$to.parentOffset && m.$from.marks();
10926
10926
  if (!v)
10927
10927
  return !1;
10928
10928
  const C = as((O) => ka(O.type.name, d))(m);
@@ -10940,11 +10940,11 @@ var xm = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
10940
10940
  const { extendEmptyMarkRange: i = !1 } = t, o = Ue(n, r.schema);
10941
10941
  return ri(r, o, e) ? s.unsetMark(o, { extendEmptyMarkRange: i }) : s.setMark(o, e);
10942
10942
  }, vm = (n, e, t = {}) => ({ state: r, commands: s }) => {
10943
- const i = Y(n, r.schema), o = Y(e, r.schema), a = ut(r, i, t);
10943
+ const i = G(n, r.schema), o = G(e, r.schema), a = ut(r, i, t);
10944
10944
  let l;
10945
10945
  return r.selection.$anchor.sameParent(r.selection.$head) && (l = r.selection.$anchor.parent.attrs), a ? s.setNode(o, l) : s.setNode(i, { ...l, ...t });
10946
10946
  }, Mm = (n, e = {}) => ({ state: t, commands: r }) => {
10947
- const s = Y(n, t.schema);
10947
+ const s = G(n, t.schema);
10948
10948
  return ut(t, s, e) ? r.lift(s) : r.wrapIn(s, e);
10949
10949
  }, Em = () => ({ state: n, dispatch: e }) => {
10950
10950
  const t = n.plugins;
@@ -11002,7 +11002,7 @@ var xm = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
11002
11002
  );
11003
11003
  if (!a)
11004
11004
  return !1;
11005
- a === "node" && (i = Y(n, r.schema)), a === "mark" && (o = Ue(n, r.schema));
11005
+ a === "node" && (i = G(n, r.schema)), a === "mark" && (o = Ue(n, r.schema));
11006
11006
  let l = !1;
11007
11007
  return t.selection.ranges.forEach((c) => {
11008
11008
  const u = c.$from.pos, d = c.$to.pos;
@@ -11041,10 +11041,10 @@ var xm = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
11041
11041
  }));
11042
11042
  }), l;
11043
11043
  }, Im = (n, e = {}) => ({ state: t, dispatch: r }) => {
11044
- const s = Y(n, t.schema);
11044
+ const s = G(n, t.schema);
11045
11045
  return nf(s, e)(t, r);
11046
11046
  }, Rm = (n, e = {}) => ({ state: t, dispatch: r }) => {
11047
- const s = Y(n, t.schema);
11047
+ const s = G(n, t.schema);
11048
11048
  return rf(s, e)(t, r);
11049
11049
  }, Dm = class {
11050
11050
  constructor() {
@@ -11251,7 +11251,7 @@ var ji = class {
11251
11251
  const e = new this.constructor({ ...this.config, ...n });
11252
11252
  return e.parent = this, this.child = e, e.name = "name" in n ? n.name : e.parent.name, e;
11253
11253
  }
11254
- }, Xt = class Hc extends ji {
11254
+ }, Zt = class Hc extends ji {
11255
11255
  constructor() {
11256
11256
  super(...arguments), this.type = "mark";
11257
11257
  }
@@ -11451,7 +11451,7 @@ var cs = class {
11451
11451
  options: e.options,
11452
11452
  storage: this.editor.extensionStorage[e.name],
11453
11453
  editor: this.editor,
11454
- type: tn(e.name, this.schema)
11454
+ type: nn(e.name, this.schema)
11455
11455
  }, r = T(e, "addCommands", t);
11456
11456
  return r ? {
11457
11457
  ...n,
@@ -11465,20 +11465,20 @@ var cs = class {
11465
11465
  */
11466
11466
  get plugins() {
11467
11467
  const { editor: n } = this;
11468
- return mn([...this.extensions].reverse()).flatMap((r) => {
11468
+ return gn([...this.extensions].reverse()).flatMap((r) => {
11469
11469
  const s = {
11470
11470
  name: r.name,
11471
11471
  options: r.options,
11472
11472
  storage: this.editor.extensionStorage[r.name],
11473
11473
  editor: n,
11474
- type: tn(r.name, this.schema)
11474
+ type: nn(r.name, this.schema)
11475
11475
  }, i = [], o = T(
11476
11476
  r,
11477
11477
  "addKeyboardShortcuts",
11478
11478
  s
11479
11479
  );
11480
11480
  let a = {};
11481
- if (r.type === "mark" && T(r, "exitable", s) && (a.ArrowRight = () => Xt.handleExit({ editor: n, mark: r })), o) {
11481
+ if (r.type === "mark" && T(r, "exitable", s) && (a.ArrowRight = () => Zt.handleExit({ editor: n, mark: r })), o) {
11482
11482
  const f = Object.fromEntries(
11483
11483
  Object.entries(o()).map(([h, p]) => [h, () => p({ editor: n })])
11484
11484
  );
@@ -11537,7 +11537,7 @@ var cs = class {
11537
11537
  options: t.options,
11538
11538
  storage: this.editor.extensionStorage[t.name],
11539
11539
  editor: n,
11540
- type: Y(t.name, this.schema)
11540
+ type: G(t.name, this.schema)
11541
11541
  }, i = T(t, "addNodeView", s);
11542
11542
  if (!i)
11543
11543
  return [];
@@ -11570,13 +11570,13 @@ var cs = class {
11570
11570
  */
11571
11571
  dispatchTransaction(n) {
11572
11572
  const { editor: e } = this;
11573
- return mn([...this.extensions].reverse()).reduceRight((r, s) => {
11573
+ return gn([...this.extensions].reverse()).reduceRight((r, s) => {
11574
11574
  const i = {
11575
11575
  name: s.name,
11576
11576
  options: s.options,
11577
11577
  storage: this.editor.extensionStorage[s.name],
11578
11578
  editor: e,
11579
- type: tn(s.name, this.schema)
11579
+ type: nn(s.name, this.schema)
11580
11580
  }, o = T(
11581
11581
  s,
11582
11582
  "dispatchTransaction",
@@ -11594,14 +11594,14 @@ var cs = class {
11594
11594
  */
11595
11595
  transformPastedHTML(n) {
11596
11596
  const { editor: e } = this;
11597
- return mn([...this.extensions]).reduce(
11597
+ return gn([...this.extensions]).reduce(
11598
11598
  (r, s) => {
11599
11599
  const i = {
11600
11600
  name: s.name,
11601
11601
  options: s.options,
11602
11602
  storage: this.editor.extensionStorage[s.name],
11603
11603
  editor: e,
11604
- type: tn(s.name, this.schema)
11604
+ type: nn(s.name, this.schema)
11605
11605
  }, o = T(
11606
11606
  s,
11607
11607
  "transformPastedHTML",
@@ -11663,7 +11663,7 @@ var cs = class {
11663
11663
  options: e.options,
11664
11664
  storage: this.editor.extensionStorage[e.name],
11665
11665
  editor: this.editor,
11666
- type: tn(e.name, this.schema)
11666
+ type: nn(e.name, this.schema)
11667
11667
  };
11668
11668
  e.type === "mark" && ((t = z(T(e, "keepOnSplit", r))) == null || t) && this.splittableMarks.push(e.name);
11669
11669
  const s = T(e, "onBeforeCreate", r), i = T(e, "onCreate", r), o = T(e, "onUpdate", r), a = T(
@@ -11676,7 +11676,7 @@ var cs = class {
11676
11676
  }
11677
11677
  };
11678
11678
  cs.resolve = Fi;
11679
- cs.sort = mn;
11679
+ cs.sort = gn;
11680
11680
  cs.flatten = zi;
11681
11681
  var Hm = {};
11682
11682
  Bi(Hm, {
@@ -11692,7 +11692,7 @@ Bi(Hm, {
11692
11692
  TextDirection: () => tu,
11693
11693
  focusEventsPluginKey: () => Qc
11694
11694
  });
11695
- var G = class jc extends ji {
11695
+ var Y = class jc extends ji {
11696
11696
  constructor() {
11697
11697
  super(...arguments), this.type = "extension";
11698
11698
  }
@@ -11711,7 +11711,7 @@ var G = class jc extends ji {
11711
11711
  const t = typeof e == "function" ? e() : e;
11712
11712
  return super.extend(t);
11713
11713
  }
11714
- }, Wc = G.create({
11714
+ }, Wc = Y.create({
11715
11715
  name: "clipboardTextSerializer",
11716
11716
  addOptions() {
11717
11717
  return {
@@ -11721,7 +11721,7 @@ var G = class jc extends ji {
11721
11721
  addProseMirrorPlugins() {
11722
11722
  return [
11723
11723
  new j({
11724
- key: new J("clipboardTextSerializer"),
11724
+ key: new Q("clipboardTextSerializer"),
11725
11725
  props: {
11726
11726
  clipboardTextSerializer: () => {
11727
11727
  const { editor: n } = this, { state: e, schema: t } = n, { doc: r, selection: s } = e, { ranges: i } = s, o = Math.min(...i.map((u) => u.$from.pos)), a = Math.max(...i.map((u) => u.$to.pos)), l = $c(t);
@@ -11734,14 +11734,14 @@ var G = class jc extends ji {
11734
11734
  })
11735
11735
  ];
11736
11736
  }
11737
- }), Uc = G.create({
11737
+ }), Uc = Y.create({
11738
11738
  name: "commands",
11739
11739
  addCommands() {
11740
11740
  return {
11741
11741
  ...Mc
11742
11742
  };
11743
11743
  }
11744
- }), Kc = G.create({
11744
+ }), Kc = Y.create({
11745
11745
  name: "delete",
11746
11746
  onUpdate({ transaction: n, appendedTransactions: e }) {
11747
11747
  var t, r, s;
@@ -11797,12 +11797,12 @@ var G = class jc extends ji {
11797
11797
  };
11798
11798
  (s = (r = (t = this.editor.options.coreExtensionOptions) == null ? void 0 : t.delete) == null ? void 0 : r.async) == null || s ? setTimeout(i, 0) : i();
11799
11799
  }
11800
- }), Jc = G.create({
11800
+ }), Jc = Y.create({
11801
11801
  name: "drop",
11802
11802
  addProseMirrorPlugins() {
11803
11803
  return [
11804
11804
  new j({
11805
- key: new J("tiptapDrop"),
11805
+ key: new Q("tiptapDrop"),
11806
11806
  props: {
11807
11807
  handleDrop: (n, e, t, r) => {
11808
11808
  this.editor.emit("drop", {
@@ -11816,19 +11816,19 @@ var G = class jc extends ji {
11816
11816
  })
11817
11817
  ];
11818
11818
  }
11819
- }), Gc = G.create({
11819
+ }), Gc = Y.create({
11820
11820
  name: "editable",
11821
11821
  addProseMirrorPlugins() {
11822
11822
  return [
11823
11823
  new j({
11824
- key: new J("editable"),
11824
+ key: new Q("editable"),
11825
11825
  props: {
11826
11826
  editable: () => this.editor.options.editable
11827
11827
  }
11828
11828
  })
11829
11829
  ];
11830
11830
  }
11831
- }), Qc = new J("focusEvents"), Yc = G.create({
11831
+ }), Qc = new Q("focusEvents"), Yc = Y.create({
11832
11832
  name: "focusEvents",
11833
11833
  addProseMirrorPlugins() {
11834
11834
  const { editor: n } = this;
@@ -11852,7 +11852,7 @@ var G = class jc extends ji {
11852
11852
  })
11853
11853
  ];
11854
11854
  }
11855
- }), Xc = G.create({
11855
+ }), Xc = Y.create({
11856
11856
  name: "keymap",
11857
11857
  addKeyboardShortcuts() {
11858
11858
  const n = () => this.editor.commands.first(({ commands: o }) => [
@@ -11897,7 +11897,7 @@ var G = class jc extends ji {
11897
11897
  "Ctrl-a": () => this.editor.commands.selectTextblockStart(),
11898
11898
  "Ctrl-e": () => this.editor.commands.selectTextblockEnd()
11899
11899
  };
11900
- return Nn() || Oc() ? i : s;
11900
+ return On() || Oc() ? i : s;
11901
11901
  },
11902
11902
  addProseMirrorPlugins() {
11903
11903
  return [
@@ -11907,7 +11907,7 @@ var G = class jc extends ji {
11907
11907
  // This is an alternative to ProseMirror's `AllSelection`, which doesn’t work well
11908
11908
  // with many other commands.
11909
11909
  new j({
11910
- key: new J("clearDocument"),
11910
+ key: new Q("clearDocument"),
11911
11911
  appendTransaction: (n, e, t) => {
11912
11912
  if (n.some((m) => m.getMeta("composition")))
11913
11913
  return;
@@ -11930,12 +11930,12 @@ var G = class jc extends ji {
11930
11930
  })
11931
11931
  ];
11932
11932
  }
11933
- }), Zc = G.create({
11933
+ }), Zc = Y.create({
11934
11934
  name: "paste",
11935
11935
  addProseMirrorPlugins() {
11936
11936
  return [
11937
11937
  new j({
11938
- key: new J("tiptapPaste"),
11938
+ key: new Q("tiptapPaste"),
11939
11939
  props: {
11940
11940
  handlePaste: (n, e, t) => {
11941
11941
  this.editor.emit("paste", {
@@ -11948,19 +11948,19 @@ var G = class jc extends ji {
11948
11948
  })
11949
11949
  ];
11950
11950
  }
11951
- }), eu = G.create({
11951
+ }), eu = Y.create({
11952
11952
  name: "tabindex",
11953
11953
  addProseMirrorPlugins() {
11954
11954
  return [
11955
11955
  new j({
11956
- key: new J("tabindex"),
11956
+ key: new Q("tabindex"),
11957
11957
  props: {
11958
11958
  attributes: () => this.editor.isEditable ? { tabindex: "0" } : {}
11959
11959
  }
11960
11960
  })
11961
11961
  ];
11962
11962
  }
11963
- }), tu = G.create({
11963
+ }), tu = Y.create({
11964
11964
  name: "textDirection",
11965
11965
  addOptions() {
11966
11966
  return {
@@ -11992,7 +11992,7 @@ var G = class jc extends ji {
11992
11992
  addProseMirrorPlugins() {
11993
11993
  return [
11994
11994
  new j({
11995
- key: new J("textDirection"),
11995
+ key: new Q("textDirection"),
11996
11996
  props: {
11997
11997
  attributes: () => {
11998
11998
  const n = this.options.direction;
@@ -12004,7 +12004,7 @@ var G = class jc extends ji {
12004
12004
  })
12005
12005
  ];
12006
12006
  }
12007
- }), jm = class cn {
12007
+ }), jm = class un {
12008
12008
  constructor(e, t, r = !1, s = null) {
12009
12009
  this.currentNode = null, this.actualDepth = null, this.isBlock = r, this.resolvedPos = e, this.editor = t, this.currentNode = s;
12010
12010
  }
@@ -12063,15 +12063,15 @@ var G = class jc extends ji {
12063
12063
  if (this.depth === 0)
12064
12064
  return null;
12065
12065
  const e = this.resolvedPos.start(this.resolvedPos.depth - 1), t = this.resolvedPos.doc.resolve(e);
12066
- return new cn(t, this.editor);
12066
+ return new un(t, this.editor);
12067
12067
  }
12068
12068
  get before() {
12069
12069
  let e = this.resolvedPos.doc.resolve(this.from - (this.isBlock ? 1 : 2));
12070
- return e.depth !== this.depth && (e = this.resolvedPos.doc.resolve(this.from - 3)), new cn(e, this.editor);
12070
+ return e.depth !== this.depth && (e = this.resolvedPos.doc.resolve(this.from - 3)), new un(e, this.editor);
12071
12071
  }
12072
12072
  get after() {
12073
12073
  let e = this.resolvedPos.doc.resolve(this.to + (this.isBlock ? 2 : 1));
12074
- return e.depth !== this.depth && (e = this.resolvedPos.doc.resolve(this.to + 3)), new cn(e, this.editor);
12074
+ return e.depth !== this.depth && (e = this.resolvedPos.doc.resolve(this.to + 3)), new un(e, this.editor);
12075
12075
  }
12076
12076
  get children() {
12077
12077
  const e = [];
@@ -12082,7 +12082,7 @@ var G = class jc extends ji {
12082
12082
  const l = this.resolvedPos.doc.resolve(a);
12083
12083
  if (!s && !o && l.depth <= this.depth)
12084
12084
  return;
12085
- const c = new cn(l, this.editor, s, s || o ? t : null);
12085
+ const c = new un(l, this.editor, s, s || o ? t : null);
12086
12086
  s && (c.actualDepth = this.depth + 1), e.push(c);
12087
12087
  }), e;
12088
12088
  }
@@ -13166,7 +13166,7 @@ var fe = class nu extends ji {
13166
13166
  * @return `true` if it can safely be ignored.
13167
13167
  */
13168
13168
  ignoreMutation(n) {
13169
- return !this.dom || !this.contentDOM ? !0 : typeof this.options.ignoreMutation == "function" ? this.options.ignoreMutation({ mutation: n }) : this.node.isLeaf || this.node.isAtom ? !0 : n.type === "selection" || this.dom.contains(n.target) && n.type === "childList" && (Nn() || ti()) && this.editor.isFocused && [...Array.from(n.addedNodes), ...Array.from(n.removedNodes)].every((t) => t.isContentEditable) ? !1 : this.contentDOM === n.target && n.type === "attributes" ? !0 : !this.contentDOM.contains(n.target);
13169
+ return !this.dom || !this.contentDOM ? !0 : typeof this.options.ignoreMutation == "function" ? this.options.ignoreMutation({ mutation: n }) : this.node.isLeaf || this.node.isAtom ? !0 : n.type === "selection" || this.dom.contains(n.target) && n.type === "childList" && (On() || ti()) && this.editor.isFocused && [...Array.from(n.addedNodes), ...Array.from(n.removedNodes)].every((t) => t.isContentEditable) ? !1 : this.contentDOM === n.target && n.type === "attributes" ? !0 : !this.contentDOM.contains(n.target);
13170
13170
  }
13171
13171
  /**
13172
13172
  * Update the attributes of the prosemirror node.
@@ -13191,7 +13191,7 @@ var fe = class nu extends ji {
13191
13191
  this.editor.commands.deleteRange({ from: n, to: e });
13192
13192
  }
13193
13193
  };
13194
- function In(n) {
13194
+ function Rn(n) {
13195
13195
  return new _m({
13196
13196
  find: n.find,
13197
13197
  handler: ({ state: e, range: t, match: r, pasteEvent: s }) => {
@@ -13305,7 +13305,7 @@ function bg(n, e, t) {
13305
13305
  return !1;
13306
13306
  return !0;
13307
13307
  }
13308
- function nn(n, e, t) {
13308
+ function rn(n, e, t) {
13309
13309
  const r = Sa(n);
13310
13310
  let s = r.length;
13311
13311
  if (Sa(e).length !== s)
@@ -13440,18 +13440,18 @@ function $g({ areArrayBuffersEqual: n, areArraysEqual: e, areDataViewsEqual: t,
13440
13440
  function _g({ circular: n, createCustomConfig: e, strict: t }) {
13441
13441
  let r = {
13442
13442
  areArrayBuffersEqual: dg,
13443
- areArraysEqual: t ? nn : fg,
13443
+ areArraysEqual: t ? rn : fg,
13444
13444
  areDataViewsEqual: hg,
13445
13445
  areDatesEqual: pg,
13446
13446
  areErrorsEqual: mg,
13447
13447
  areFunctionsEqual: gg,
13448
- areMapsEqual: t ? As(va, nn) : va,
13448
+ areMapsEqual: t ? As(va, rn) : va,
13449
13449
  areNumbersEqual: yg,
13450
- areObjectsEqual: t ? nn : bg,
13450
+ areObjectsEqual: t ? rn : bg,
13451
13451
  arePrimitiveWrappersEqual: kg,
13452
13452
  areRegExpsEqual: xg,
13453
- areSetsEqual: t ? As(Ma, nn) : Ma,
13454
- areTypedArraysEqual: t ? As(kr, nn) : kr,
13453
+ areSetsEqual: t ? As(Ma, rn) : Ma,
13454
+ areTypedArraysEqual: t ? As(kr, rn) : kr,
13455
13455
  areUrlsEqual: Sg,
13456
13456
  unknownTagComparators: void 0
13457
13457
  };
@@ -14166,7 +14166,7 @@ var ny = class extends ng {
14166
14166
  }
14167
14167
  }
14168
14168
  };
14169
- function _n(n, e) {
14169
+ function zn(n, e) {
14170
14170
  return (t) => t.editor.contentComponent ? new ny(n, t, e) : {};
14171
14171
  }
14172
14172
  var Gi = yi({
@@ -14369,7 +14369,7 @@ var uy = fe.create({
14369
14369
  if (n === "svg")
14370
14370
  throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");
14371
14371
  return [n, r, t];
14372
- }, py = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, my = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, gy = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, yy = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, by = Xt.create({
14372
+ }, py = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, my = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, gy = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, yy = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, by = Zt.create({
14373
14373
  name: "bold",
14374
14374
  addOptions() {
14375
14375
  return {
@@ -14428,17 +14428,17 @@ var uy = fe.create({
14428
14428
  },
14429
14429
  addPasteRules() {
14430
14430
  return [
14431
- In({
14431
+ Rn({
14432
14432
  find: my,
14433
14433
  type: this.type
14434
14434
  }),
14435
- In({
14435
+ Rn({
14436
14436
  find: yy,
14437
14437
  type: this.type
14438
14438
  })
14439
14439
  ];
14440
14440
  }
14441
- }), ky = by, xy = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, Sy = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, wy = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, Cy = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, vy = Xt.create({
14441
+ }), ky = by, xy = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, Sy = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, wy = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, Cy = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, vy = Zt.create({
14442
14442
  name: "italic",
14443
14443
  addOptions() {
14444
14444
  return {
@@ -14496,23 +14496,23 @@ var uy = fe.create({
14496
14496
  },
14497
14497
  addPasteRules() {
14498
14498
  return [
14499
- In({
14499
+ Rn({
14500
14500
  find: Sy,
14501
14501
  type: this.type
14502
14502
  }),
14503
- In({
14503
+ Rn({
14504
14504
  find: Cy,
14505
14505
  type: this.type
14506
14506
  })
14507
14507
  ];
14508
14508
  }
14509
14509
  }), My = vy;
14510
- const Ey = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2", Ty = "ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2", oi = "numeric", ai = "ascii", li = "alpha", gn = "asciinumeric", un = "alphanumeric", ci = "domain", hu = "emoji", Ay = "scheme", Ny = "slashscheme", Ns = "whitespace";
14510
+ const Ey = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2", Ty = "ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2", oi = "numeric", ai = "ascii", li = "alpha", yn = "asciinumeric", dn = "alphanumeric", ci = "domain", hu = "emoji", Ay = "scheme", Ny = "slashscheme", Ns = "whitespace";
14511
14511
  function Oy(n, e) {
14512
14512
  return n in e || (e[n] = []), e[n];
14513
14513
  }
14514
14514
  function xt(n, e, t) {
14515
- e[oi] && (e[gn] = !0, e[un] = !0), e[ai] && (e[gn] = !0, e[li] = !0), e[gn] && (e[un] = !0), e[li] && (e[un] = !0), e[un] && (e[ci] = !0), e[hu] && (e[ci] = !0);
14515
+ e[oi] && (e[yn] = !0, e[dn] = !0), e[ai] && (e[yn] = !0, e[li] = !0), e[yn] && (e[dn] = !0), e[li] && (e[dn] = !0), e[dn] && (e[ci] = !0), e[hu] && (e[ci] = !0);
14516
14516
  for (const r in e) {
14517
14517
  const s = Oy(r, t);
14518
14518
  s.indexOf(n) < 0 && s.push(n);
@@ -14648,7 +14648,7 @@ ge.prototype = {
14648
14648
  return s.j[n] = o, o;
14649
14649
  }
14650
14650
  };
14651
- const P = (n, e, t, r, s) => n.ta(e, t, r, s), W = (n, e, t, r, s) => n.tr(e, t, r, s), Oa = (n, e, t, r, s) => n.ts(e, t, r, s), S = (n, e, t, r, s) => n.tt(e, t, r, s), qe = "WORD", ui = "UWORD", pu = "ASCIINUMERICAL", mu = "ALPHANUMERICAL", Rn = "LOCALHOST", di = "TLD", fi = "UTLD", sr = "SCHEME", zt = "SLASH_SCHEME", Qi = "NUM", hi = "WS", Yi = "NL", yn = "OPENBRACE", bn = "CLOSEBRACE", Sr = "OPENBRACKET", wr = "CLOSEBRACKET", Cr = "OPENPAREN", vr = "CLOSEPAREN", Mr = "OPENANGLEBRACKET", Er = "CLOSEANGLEBRACKET", Tr = "FULLWIDTHLEFTPAREN", Ar = "FULLWIDTHRIGHTPAREN", Nr = "LEFTCORNERBRACKET", Or = "RIGHTCORNERBRACKET", Ir = "LEFTWHITECORNERBRACKET", Rr = "RIGHTWHITECORNERBRACKET", Dr = "FULLWIDTHLESSTHAN", Lr = "FULLWIDTHGREATERTHAN", Pr = "AMPERSAND", Br = "APOSTROPHE", $r = "ASTERISK", Ze = "AT", _r = "BACKSLASH", zr = "BACKTICK", qr = "CARET", nt = "COLON", Xi = "COMMA", Fr = "DOLLAR", Ie = "DOT", Vr = "EQUALS", Zi = "EXCLAMATION", Se = "HYPHEN", kn = "PERCENT", Hr = "PIPE", jr = "PLUS", Wr = "POUND", xn = "QUERY", eo = "QUOTE", gu = "FULLWIDTHMIDDLEDOT", to = "SEMI", Re = "SLASH", Sn = "TILDE", Ur = "UNDERSCORE", yu = "EMOJI", Kr = "SYM";
14651
+ const P = (n, e, t, r, s) => n.ta(e, t, r, s), W = (n, e, t, r, s) => n.tr(e, t, r, s), Oa = (n, e, t, r, s) => n.ts(e, t, r, s), S = (n, e, t, r, s) => n.tt(e, t, r, s), qe = "WORD", ui = "UWORD", pu = "ASCIINUMERICAL", mu = "ALPHANUMERICAL", Dn = "LOCALHOST", di = "TLD", fi = "UTLD", sr = "SCHEME", zt = "SLASH_SCHEME", Qi = "NUM", hi = "WS", Yi = "NL", bn = "OPENBRACE", kn = "CLOSEBRACE", Sr = "OPENBRACKET", wr = "CLOSEBRACKET", Cr = "OPENPAREN", vr = "CLOSEPAREN", Mr = "OPENANGLEBRACKET", Er = "CLOSEANGLEBRACKET", Tr = "FULLWIDTHLEFTPAREN", Ar = "FULLWIDTHRIGHTPAREN", Nr = "LEFTCORNERBRACKET", Or = "RIGHTCORNERBRACKET", Ir = "LEFTWHITECORNERBRACKET", Rr = "RIGHTWHITECORNERBRACKET", Dr = "FULLWIDTHLESSTHAN", Lr = "FULLWIDTHGREATERTHAN", Pr = "AMPERSAND", Br = "APOSTROPHE", $r = "ASTERISK", Ze = "AT", _r = "BACKSLASH", zr = "BACKTICK", qr = "CARET", nt = "COLON", Xi = "COMMA", Fr = "DOLLAR", Ie = "DOT", Vr = "EQUALS", Zi = "EXCLAMATION", Se = "HYPHEN", xn = "PERCENT", Hr = "PIPE", jr = "PLUS", Wr = "POUND", Sn = "QUERY", eo = "QUOTE", gu = "FULLWIDTHMIDDLEDOT", to = "SEMI", Re = "SLASH", wn = "TILDE", Ur = "UNDERSCORE", yu = "EMOJI", Kr = "SYM";
14652
14652
  var bu = /* @__PURE__ */ Object.freeze({
14653
14653
  __proto__: null,
14654
14654
  ALPHANUMERICAL: mu,
@@ -14661,7 +14661,7 @@ var bu = /* @__PURE__ */ Object.freeze({
14661
14661
  BACKTICK: zr,
14662
14662
  CARET: qr,
14663
14663
  CLOSEANGLEBRACKET: Er,
14664
- CLOSEBRACE: bn,
14664
+ CLOSEBRACE: kn,
14665
14665
  CLOSEBRACKET: wr,
14666
14666
  CLOSEPAREN: vr,
14667
14667
  COLON: nt,
@@ -14679,18 +14679,18 @@ var bu = /* @__PURE__ */ Object.freeze({
14679
14679
  HYPHEN: Se,
14680
14680
  LEFTCORNERBRACKET: Nr,
14681
14681
  LEFTWHITECORNERBRACKET: Ir,
14682
- LOCALHOST: Rn,
14682
+ LOCALHOST: Dn,
14683
14683
  NL: Yi,
14684
14684
  NUM: Qi,
14685
14685
  OPENANGLEBRACKET: Mr,
14686
- OPENBRACE: yn,
14686
+ OPENBRACE: bn,
14687
14687
  OPENBRACKET: Sr,
14688
14688
  OPENPAREN: Cr,
14689
- PERCENT: kn,
14689
+ PERCENT: xn,
14690
14690
  PIPE: Hr,
14691
14691
  PLUS: jr,
14692
14692
  POUND: Wr,
14693
- QUERY: xn,
14693
+ QUERY: Sn,
14694
14694
  QUOTE: eo,
14695
14695
  RIGHTCORNERBRACKET: Or,
14696
14696
  RIGHTWHITECORNERBRACKET: Rr,
@@ -14699,7 +14699,7 @@ var bu = /* @__PURE__ */ Object.freeze({
14699
14699
  SLASH: Re,
14700
14700
  SLASH_SCHEME: zt,
14701
14701
  SYM: Kr,
14702
- TILDE: Sn,
14702
+ TILDE: wn,
14703
14703
  TLD: di,
14704
14704
  UNDERSCORE: Ur,
14705
14705
  UTLD: fi,
@@ -14707,30 +14707,30 @@ var bu = /* @__PURE__ */ Object.freeze({
14707
14707
  WORD: qe,
14708
14708
  WS: hi
14709
14709
  });
14710
- const _e = /[a-z]/, rn = new RegExp("\\p{L}", "u"), Os = new RegExp("\\p{Emoji}", "u"), ze = /\d/, Is = /\s/, Ia = "\r", Rs = `
14710
+ const _e = /[a-z]/, sn = new RegExp("\\p{L}", "u"), Os = new RegExp("\\p{Emoji}", "u"), ze = /\d/, Is = /\s/, Ia = "\r", Rs = `
14711
14711
  `, Ry = "️", Dy = "‍", Ds = "";
14712
14712
  let Yn = null, Xn = null;
14713
14713
  function Ly(n = []) {
14714
14714
  const e = {};
14715
14715
  ge.groups = e;
14716
14716
  const t = new ge();
14717
- Yn == null && (Yn = Ra(Ey)), Xn == null && (Xn = Ra(Ty)), S(t, "'", Br), S(t, "{", yn), S(t, "}", bn), S(t, "[", Sr), S(t, "]", wr), S(t, "(", Cr), S(t, ")", vr), S(t, "<", Mr), S(t, ">", Er), S(t, "(", Tr), S(t, ")", Ar), S(t, "「", Nr), S(t, "」", Or), S(t, "『", Ir), S(t, "』", Rr), S(t, "<", Dr), S(t, ">", Lr), S(t, "&", Pr), S(t, "*", $r), S(t, "@", Ze), S(t, "`", zr), S(t, "^", qr), S(t, ":", nt), S(t, ",", Xi), S(t, "$", Fr), S(t, ".", Ie), S(t, "=", Vr), S(t, "!", Zi), S(t, "-", Se), S(t, "%", kn), S(t, "|", Hr), S(t, "+", jr), S(t, "#", Wr), S(t, "?", xn), S(t, '"', eo), S(t, "/", Re), S(t, ";", to), S(t, "~", Sn), S(t, "_", Ur), S(t, "\\", _r), S(t, "・", gu);
14717
+ Yn == null && (Yn = Ra(Ey)), Xn == null && (Xn = Ra(Ty)), S(t, "'", Br), S(t, "{", bn), S(t, "}", kn), S(t, "[", Sr), S(t, "]", wr), S(t, "(", Cr), S(t, ")", vr), S(t, "<", Mr), S(t, ">", Er), S(t, "(", Tr), S(t, ")", Ar), S(t, "「", Nr), S(t, "」", Or), S(t, "『", Ir), S(t, "』", Rr), S(t, "<", Dr), S(t, ">", Lr), S(t, "&", Pr), S(t, "*", $r), S(t, "@", Ze), S(t, "`", zr), S(t, "^", qr), S(t, ":", nt), S(t, ",", Xi), S(t, "$", Fr), S(t, ".", Ie), S(t, "=", Vr), S(t, "!", Zi), S(t, "-", Se), S(t, "%", xn), S(t, "|", Hr), S(t, "+", jr), S(t, "#", Wr), S(t, "?", Sn), S(t, '"', eo), S(t, "/", Re), S(t, ";", to), S(t, "~", wn), S(t, "_", Ur), S(t, "\\", _r), S(t, "・", gu);
14718
14718
  const r = W(t, ze, Qi, {
14719
14719
  [oi]: !0
14720
14720
  });
14721
14721
  W(r, ze, r);
14722
14722
  const s = W(r, _e, pu, {
14723
- [gn]: !0
14724
- }), i = W(r, rn, mu, {
14725
- [un]: !0
14723
+ [yn]: !0
14724
+ }), i = W(r, sn, mu, {
14725
+ [dn]: !0
14726
14726
  }), o = W(t, _e, qe, {
14727
14727
  [ai]: !0
14728
14728
  });
14729
14729
  W(o, ze, s), W(o, _e, o), W(s, ze, s), W(s, _e, s);
14730
- const a = W(t, rn, ui, {
14730
+ const a = W(t, sn, ui, {
14731
14731
  [li]: !0
14732
14732
  });
14733
- W(a, _e), W(a, ze, i), W(a, rn, a), W(i, ze, i), W(i, _e), W(i, rn, i);
14733
+ W(a, _e), W(a, ze, i), W(a, sn, a), W(i, ze, i), W(i, _e), W(i, sn, i);
14734
14734
  const l = S(t, Rs, Yi, {
14735
14735
  [Ns]: !0
14736
14736
  }), c = S(t, Ia, hi, {
@@ -14745,7 +14745,7 @@ function Ly(n = []) {
14745
14745
  S(d, "#"), W(d, Os, d), S(d, Ry, d);
14746
14746
  const f = S(d, Dy);
14747
14747
  S(f, "#"), W(f, Os, d);
14748
- const h = [[_e, o], [ze, s]], p = [[_e, null], [rn, a], [ze, i]];
14748
+ const h = [[_e, o], [ze, s]], p = [[_e, null], [sn, a], [ze, i]];
14749
14749
  for (let m = 0; m < Yn.length; m++)
14750
14750
  Qe(t, Yn[m], di, qe, h);
14751
14751
  for (let m = 0; m < Xn.length; m++)
@@ -14769,9 +14769,9 @@ function Ly(n = []) {
14769
14769
  } : {
14770
14770
  [Ny]: !0
14771
14771
  };
14772
- g.indexOf("-") >= 0 ? b[ci] = !0 : _e.test(g) ? ze.test(g) ? b[gn] = !0 : b[ai] = !0 : b[oi] = !0, Oa(t, g, g, b);
14772
+ g.indexOf("-") >= 0 ? b[ci] = !0 : _e.test(g) ? ze.test(g) ? b[yn] = !0 : b[ai] = !0 : b[oi] = !0, Oa(t, g, g, b);
14773
14773
  }
14774
- return Oa(t, "localhost", Rn, {
14774
+ return Oa(t, "localhost", Dn, {
14775
14775
  ascii: !0
14776
14776
  }), t.jd = new ge(Kr), {
14777
14777
  start: t,
@@ -14835,7 +14835,7 @@ function Ra(n) {
14835
14835
  }
14836
14836
  return e;
14837
14837
  }
14838
- const Dn = {
14838
+ const Ln = {
14839
14839
  defaultProtocol: "http",
14840
14840
  events: null,
14841
14841
  format: Da,
@@ -14852,7 +14852,7 @@ const Dn = {
14852
14852
  render: null
14853
14853
  };
14854
14854
  function no(n, e = null) {
14855
- let t = Object.assign({}, Dn);
14855
+ let t = Object.assign({}, Ln);
14856
14856
  n && (t = Object.assign(t, n instanceof no ? n.o : n));
14857
14857
  const r = t.ignoreTags, s = [];
14858
14858
  for (let i = 0; i < r.length; i++)
@@ -14860,7 +14860,7 @@ function no(n, e = null) {
14860
14860
  this.o = t, e && (this.defaultRender = e), this.ignoreTags = s;
14861
14861
  }
14862
14862
  no.prototype = {
14863
- o: Dn,
14863
+ o: Ln,
14864
14864
  /**
14865
14865
  * @type string[]
14866
14866
  */
@@ -14896,7 +14896,7 @@ no.prototype = {
14896
14896
  get(n, e, t) {
14897
14897
  const r = e != null;
14898
14898
  let s = this.o[n];
14899
- return s && (typeof s == "object" ? (s = t.t in s ? s[t.t] : Dn[n], typeof s == "function" && r && (s = s(e, t))) : typeof s == "function" && r && (s = s(e, t.t, t)), s);
14899
+ return s && (typeof s == "object" ? (s = t.t in s ? s[t.t] : Ln[n], typeof s == "function" && r && (s = s(e, t))) : typeof s == "function" && r && (s = s(e, t.t, t)), s);
14900
14900
  },
14901
14901
  /**
14902
14902
  * @template {keyof Opts} L
@@ -14985,7 +14985,7 @@ xu.prototype = {
14985
14985
  @method toObject
14986
14986
  @param {string} [protocol] `'http'` by default
14987
14987
  */
14988
- toObject(n = Dn.defaultProtocol) {
14988
+ toObject(n = Ln.defaultProtocol) {
14989
14989
  return {
14990
14990
  type: this.t,
14991
14991
  value: this.toString(),
@@ -15055,7 +15055,7 @@ const La = us("email", {
15055
15055
  @param {string} [scheme] default scheme (e.g., 'https')
15056
15056
  @return {string} the full href
15057
15057
  */
15058
- toHref(n = Dn.defaultProtocol) {
15058
+ toHref(n = Ln.defaultProtocol) {
15059
15059
  return this.hasProtocol() ? this.v : `${n}://${this.v}`;
15060
15060
  },
15061
15061
  /**
@@ -15064,13 +15064,13 @@ const La = us("email", {
15064
15064
  */
15065
15065
  hasProtocol() {
15066
15066
  const n = this.tk;
15067
- return n.length >= 2 && n[0].t !== Rn && n[1].t === nt;
15067
+ return n.length >= 2 && n[0].t !== Dn && n[1].t === nt;
15068
15068
  }
15069
15069
  }), xe = (n) => new ge(n);
15070
15070
  function $y({
15071
15071
  groups: n
15072
15072
  }) {
15073
- const e = n.domain.concat([Pr, $r, Ze, _r, zr, qr, Fr, Vr, Se, Qi, kn, Hr, jr, Wr, Re, Kr, Sn, Ur]), t = [Br, nt, Xi, Ie, Zi, kn, xn, eo, to, Mr, Er, yn, bn, wr, Sr, Cr, vr, Tr, Ar, Nr, Or, Ir, Rr, Dr, Lr], r = [Pr, Br, $r, _r, zr, qr, Fr, Vr, Se, yn, bn, kn, Hr, jr, Wr, xn, Re, Kr, Sn, Ur], s = xe(), i = S(s, Sn);
15073
+ const e = n.domain.concat([Pr, $r, Ze, _r, zr, qr, Fr, Vr, Se, Qi, xn, Hr, jr, Wr, Re, Kr, wn, Ur]), t = [Br, nt, Xi, Ie, Zi, xn, Sn, eo, to, Mr, Er, bn, kn, wr, Sr, Cr, vr, Tr, Ar, Nr, Or, Ir, Rr, Dr, Lr], r = [Pr, Br, $r, _r, zr, qr, Fr, Vr, Se, bn, kn, xn, Hr, jr, Wr, Sn, Re, Kr, wn, Ur], s = xe(), i = S(s, wn);
15074
15074
  P(i, r, i), P(i, n.domain, i);
15075
15075
  const o = xe(), a = xe(), l = xe();
15076
15076
  P(s, n.domain, o), P(s, n.scheme, a), P(s, n.slashscheme, l), P(o, r, i), P(o, n.domain, o);
@@ -15083,7 +15083,7 @@ function $y({
15083
15083
  const f = S(d, Ie);
15084
15084
  P(f, n.domain, d);
15085
15085
  const h = xe(La);
15086
- P(f, n.tld, h), P(f, n.utld, h), S(c, Rn, h);
15086
+ P(f, n.tld, h), P(f, n.utld, h), S(c, Dn, h);
15087
15087
  const p = S(d, Se);
15088
15088
  S(p, Se, p), P(p, n.domain, d), P(h, n.domain, d), S(h, Ie, f), S(h, Se, p);
15089
15089
  const m = S(h, nt);
@@ -15097,9 +15097,9 @@ function $y({
15097
15097
  const C = xe(Zn), O = xe();
15098
15098
  P(C, e, C), P(C, t, O), P(O, e, C), P(O, t, O), S(b, Re, C), S(A, Re, C);
15099
15099
  const E = S(a, nt), $ = S(l, nt), _ = S($, Re), X = S(_, Re);
15100
- P(a, n.domain, o), S(a, Ie, y), S(a, Se, g), P(l, n.domain, o), S(l, Ie, y), S(l, Se, g), P(E, n.domain, C), S(E, Re, C), S(E, xn, C), P(X, n.domain, C), P(X, e, C), S(X, Re, C);
15100
+ P(a, n.domain, o), S(a, Ie, y), S(a, Se, g), P(l, n.domain, o), S(l, Ie, y), S(l, Se, g), P(E, n.domain, C), S(E, Re, C), S(E, Sn, C), P(X, n.domain, C), P(X, e, C), S(X, Re, C);
15101
15101
  const Ke = [
15102
- [yn, bn],
15102
+ [bn, kn],
15103
15103
  // {}
15104
15104
  [Sr, wr],
15105
15105
  // []
@@ -15124,7 +15124,7 @@ function $y({
15124
15124
  const L = xe();
15125
15125
  P(w, t), P(R, e, R), P(R, t, L), P(L, e, R), P(L, t, L), S(R, me, C), S(L, me, C);
15126
15126
  }
15127
- return S(s, Rn, b), S(s, Yi, By), {
15127
+ return S(s, Dn, b), S(s, Yi, By), {
15128
15128
  start: s,
15129
15129
  tokens: bu
15130
15130
  };
@@ -15208,7 +15208,7 @@ function Uy(n) {
15208
15208
  }
15209
15209
  function Ky(n) {
15210
15210
  return new j({
15211
- key: new J("autolink"),
15211
+ key: new Q("autolink"),
15212
15212
  appendTransaction: (e, t, r) => {
15213
15213
  const s = e.some((c) => c.docChanged) && !t.doc.eq(r.doc), i = e.some((c) => c.getMeta("preventAutolink"));
15214
15214
  if (!s || i)
@@ -15261,7 +15261,7 @@ function Ky(n) {
15261
15261
  }
15262
15262
  function Jy(n) {
15263
15263
  return new j({
15264
- key: new J("handleClickLink"),
15264
+ key: new Q("handleClickLink"),
15265
15265
  props: {
15266
15266
  handleClick: (e, t, r) => {
15267
15267
  var s, i;
@@ -15291,7 +15291,7 @@ function Jy(n) {
15291
15291
  }
15292
15292
  function Gy(n) {
15293
15293
  return new j({
15294
- key: new J("handlePasteLink"),
15294
+ key: new Q("handlePasteLink"),
15295
15295
  props: {
15296
15296
  handlePaste: (e, t, r) => {
15297
15297
  const { shouldAutoLink: s } = n, { state: i } = e, { selection: o } = i, { empty: a } = o;
@@ -15324,7 +15324,7 @@ function pt(n, e) {
15324
15324
  )
15325
15325
  );
15326
15326
  }
15327
- var Qy = Xt.create({
15327
+ var Qy = Zt.create({
15328
15328
  name: "link",
15329
15329
  priority: 1e3,
15330
15330
  keepOnSplit: !1,
@@ -15445,7 +15445,7 @@ var Qy = Xt.create({
15445
15445
  },
15446
15446
  addPasteRules() {
15447
15447
  return [
15448
- In({
15448
+ Rn({
15449
15449
  find: (n) => {
15450
15450
  const e = [];
15451
15451
  if (n) {
@@ -15636,7 +15636,7 @@ var Qy = Xt.create({
15636
15636
  }
15637
15637
  }), rb = {};
15638
15638
  Zy(rb, {
15639
- findListItemPos: () => zn,
15639
+ findListItemPos: () => qn,
15640
15640
  getNextListDepth: () => io,
15641
15641
  handleBackspace: () => pi,
15642
15642
  handleDelete: () => mi,
@@ -15647,14 +15647,14 @@ Zy(rb, {
15647
15647
  nextListIsDeeper: () => Mu,
15648
15648
  nextListIsHigher: () => Eu
15649
15649
  });
15650
- var zn = (n, e) => {
15651
- const { $from: t } = e.selection, r = Y(n, e.schema);
15650
+ var qn = (n, e) => {
15651
+ const { $from: t } = e.selection, r = G(n, e.schema);
15652
15652
  let s = null, i = t.depth, o = t.pos, a = null;
15653
15653
  for (; i > 0 && a === null; )
15654
15654
  s = t.node(i), s.type === r ? a = i : (i -= 1, o -= 1);
15655
15655
  return a === null ? null : { $pos: e.doc.resolve(o), depth: a };
15656
15656
  }, io = (n, e) => {
15657
- const t = zn(n, e);
15657
+ const t = qn(n, e);
15658
15658
  if (!t)
15659
15659
  return !1;
15660
15660
  const [, r] = sm(e, n, t.$pos.pos + 4);
@@ -15669,7 +15669,7 @@ var zn = (n, e) => {
15669
15669
  }, vu = (n, e, t) => {
15670
15670
  if (!t)
15671
15671
  return !1;
15672
- const r = Y(n, e.schema);
15672
+ const r = G(n, e.schema);
15673
15673
  let s = !1;
15674
15674
  return t.descendants((i) => {
15675
15675
  i.type === r && (s = !0);
@@ -15692,16 +15692,16 @@ var zn = (n, e) => {
15692
15692
  }
15693
15693
  if (!ut(n.state, e) || !lm(n.state))
15694
15694
  return !1;
15695
- const r = zn(e, n.state);
15695
+ const r = qn(e, n.state);
15696
15696
  if (!r)
15697
15697
  return !1;
15698
15698
  const i = n.state.doc.resolve(r.$pos.pos - 2).node(r.depth), o = vu(e, n.state, i);
15699
15699
  return Cu(e, n.state) && !o ? n.commands.joinItemBackward() : n.chain().liftListItem(e).run();
15700
15700
  }, Mu = (n, e) => {
15701
- const t = io(n, e), r = zn(n, e);
15701
+ const t = io(n, e), r = qn(n, e);
15702
15702
  return !r || !t ? !1 : t > r.depth;
15703
15703
  }, Eu = (n, e) => {
15704
- const t = io(n, e), r = zn(n, e);
15704
+ const t = io(n, e), r = qn(n, e);
15705
15705
  return !r || !t ? !1 : t < r.depth;
15706
15706
  }, mi = (n, e) => {
15707
15707
  if (!ut(n.state, e) || !am(n.state, e))
@@ -15712,7 +15712,7 @@ var zn = (n, e) => {
15712
15712
  var t;
15713
15713
  const { $anchor: r } = e.selection, s = e.doc.resolve(r.pos - r.parentOffset - 2);
15714
15714
  return !(s.index() === s.parent.childCount - 1 || ((t = s.nodeAfter) == null ? void 0 : t.type.name) !== n);
15715
- }, ib = G.create({
15715
+ }, ib = Y.create({
15716
15716
  name: "listKeymap",
15717
15717
  addOptions() {
15718
15718
  return {
@@ -16214,7 +16214,7 @@ var cb = "listItem", qa = "textStyle", Fa = /^(\d+)\.\s$/, Au = fe.create({
16214
16214
  "Mod-Shift-9": () => this.editor.commands.toggleTaskList()
16215
16215
  };
16216
16216
  }
16217
- }), hb = G.create({
16217
+ }), hb = Y.create({
16218
16218
  name: "listKit",
16219
16219
  addExtensions() {
16220
16220
  const n = [];
@@ -16297,7 +16297,7 @@ function oo(n) {
16297
16297
  }
16298
16298
  return -1;
16299
16299
  }
16300
- function qn(n) {
16300
+ function Yt(n) {
16301
16301
  const e = {};
16302
16302
  let t = 0;
16303
16303
  for (; t < n.length; ) {
@@ -16349,7 +16349,7 @@ function Nu(n) {
16349
16349
  function Ou(n) {
16350
16350
  return n.replace(new RegExp("(?<!\\\\)\\]", "g"), "\\]");
16351
16351
  }
16352
- function Ln({ className: n, value: e, placeholder: t, onChange: r }) {
16352
+ function Pn({ className: n, value: e, placeholder: t, onChange: r }) {
16353
16353
  return /* @__PURE__ */ k(
16354
16354
  "input",
16355
16355
  {
@@ -16376,7 +16376,7 @@ function kb({ node: n, updateAttributes: e }) {
16376
16376
  /* @__PURE__ */ I("div", { className: "qalam-blockquote-footer", contentEditable: !1, children: [
16377
16377
  /* @__PURE__ */ k("span", { className: "qalam-blockquote-meta-bracket", children: "[" }),
16378
16378
  /* @__PURE__ */ k(
16379
- Ln,
16379
+ Pn,
16380
16380
  {
16381
16381
  className: "qalam-blockquote-citation-input",
16382
16382
  value: t ?? "",
@@ -16401,14 +16401,24 @@ const xb = gb.extend({
16401
16401
  s = o.attrs.repeat;
16402
16402
  continue;
16403
16403
  }
16404
- const a = (o.content || []).map((u) => u.text || "").join("").trim(), l = a.match(/^\{(.+)\}$/);
16404
+ const a = (o.content || []).map((d) => d.text || "").join("").trim(), l = a.match(/^\{(.+)\}$/);
16405
16405
  if (l && !a.startsWith("\\{")) {
16406
- const u = qn(l[1]);
16407
- if (u.cite && (r = u.cite), typeof u.x == "number" && u.x > 1 && (s = u.x), r || s > 1) continue;
16406
+ const d = Yt(l[1]);
16407
+ if (d.cite && (r = d.cite), typeof d.x == "number" && d.x > 1 && (s = d.x), r || s > 1) continue;
16408
16408
  }
16409
- const c = a.match(/^\{x(\d+)\}$/);
16410
- if (c) {
16411
- s = parseInt(c[1]);
16409
+ if (o.content?.length) {
16410
+ const d = o.content[o.content.length - 1];
16411
+ if (d.type === "text" && d.text) {
16412
+ const f = d.text.match(/\n\{(.+)\}\s*$/);
16413
+ if (f) {
16414
+ const h = Yt(f[1]);
16415
+ h.cite && (r = h.cite), typeof h.x == "number" && h.x > 1 && (s = h.x), (r || s > 1) && (d.text = d.text.slice(0, -f[0].length), d.text || o.content.pop());
16416
+ }
16417
+ }
16418
+ }
16419
+ const u = (o.content || []).map((d) => d.text || "").join("").trim().match(/^\{x(\d+)\}$/);
16420
+ if (u) {
16421
+ s = parseInt(u[1]);
16412
16422
  continue;
16413
16423
  }
16414
16424
  o.attrs?.repeat && delete o.attrs.repeat;
@@ -16449,7 +16459,7 @@ const xb = gb.extend({
16449
16459
  };
16450
16460
  },
16451
16461
  addNodeView() {
16452
- return _n(kb);
16462
+ return zn(kb);
16453
16463
  }
16454
16464
  });
16455
16465
  function Sb({ node: n, updateAttributes: e, selected: t }) {
@@ -16466,7 +16476,7 @@ function Sb({ node: n, updateAttributes: e, selected: t }) {
16466
16476
  /* @__PURE__ */ I("span", { className: "qalam-quote-meta", contentEditable: !1, children: [
16467
16477
  /* @__PURE__ */ k("span", { className: "qalam-quote-meta-bracket", children: "[" }),
16468
16478
  /* @__PURE__ */ k(
16469
- Ln,
16479
+ Pn,
16470
16480
  {
16471
16481
  className: "qalam-quote-citation-input",
16472
16482
  value: r,
@@ -16507,7 +16517,7 @@ const wb = fe.create({
16507
16517
  }
16508
16518
  o = n.slice(u + 1, a - 1);
16509
16519
  }
16510
- const l = n.slice(0, a), c = o ? qn(o) : {};
16520
+ const l = n.slice(0, a), c = o ? Yt(o) : {};
16511
16521
  return {
16512
16522
  type: "quote",
16513
16523
  raw: l,
@@ -16560,7 +16570,7 @@ const wb = fe.create({
16560
16570
  ];
16561
16571
  },
16562
16572
  addNodeView() {
16563
- return _n(Sb, { as: "span" });
16573
+ return zn(Sb, { as: "span" });
16564
16574
  },
16565
16575
  addKeyboardShortcuts() {
16566
16576
  return {
@@ -17001,7 +17011,7 @@ class Ee {
17001
17011
  return c > Pb && (a = Lb(a, c), o -= c), new Ee(a.append(i), o);
17002
17012
  }
17003
17013
  remapping(e, t) {
17004
- let r = new vn();
17014
+ let r = new Mn();
17005
17015
  return this.items.forEach((s, i) => {
17006
17016
  let o = s.mirrorOffset != null && i - s.mirrorOffset >= e ? r.maps.length - s.mirrorOffset : void 0;
17007
17017
  r.appendMap(s.map, o);
@@ -17157,7 +17167,7 @@ function ir(n) {
17157
17167
  }
17158
17168
  return Bs;
17159
17169
  }
17160
- const Et = new J("history"), zb = new J("closeHistory");
17170
+ const Et = new Q("history"), zb = new Q("closeHistory");
17161
17171
  function qb(n = {}) {
17162
17172
  return n = {
17163
17173
  depth: n.depth || 100,
@@ -17196,7 +17206,7 @@ function Du(n, e) {
17196
17206
  };
17197
17207
  }
17198
17208
  const Lu = Du(!1, !0), Pu = Du(!0, !0);
17199
- G.create({
17209
+ Y.create({
17200
17210
  name: "characterCount",
17201
17211
  addOptions() {
17202
17212
  return {
@@ -17229,7 +17239,7 @@ G.create({
17229
17239
  let n = !1;
17230
17240
  return [
17231
17241
  new j({
17232
- key: new J("characterCount"),
17242
+ key: new Q("characterCount"),
17233
17243
  appendTransaction: (e, t, r) => {
17234
17244
  if (n)
17235
17245
  return;
@@ -17265,7 +17275,7 @@ G.create({
17265
17275
  ];
17266
17276
  }
17267
17277
  });
17268
- var Fb = G.create({
17278
+ var Fb = Y.create({
17269
17279
  name: "dropCursor",
17270
17280
  addOptions() {
17271
17281
  return {
@@ -17278,7 +17288,7 @@ var Fb = G.create({
17278
17288
  return [Cb(this.options)];
17279
17289
  }
17280
17290
  });
17281
- G.create({
17291
+ Y.create({
17282
17292
  name: "focus",
17283
17293
  addOptions() {
17284
17294
  return {
@@ -17289,7 +17299,7 @@ G.create({
17289
17299
  addProseMirrorPlugins() {
17290
17300
  return [
17291
17301
  new j({
17292
- key: new J("focus"),
17302
+ key: new Q("focus"),
17293
17303
  props: {
17294
17304
  decorations: ({ doc: n, selection: e }) => {
17295
17305
  const { isEditable: t, isFocused: r } = this.editor, { anchor: s } = e, i = [];
@@ -17321,7 +17331,7 @@ G.create({
17321
17331
  ];
17322
17332
  }
17323
17333
  });
17324
- var Vb = G.create({
17334
+ var Vb = Y.create({
17325
17335
  name: "gapCursor",
17326
17336
  addProseMirrorPlugins() {
17327
17337
  return [Tb()];
@@ -17341,7 +17351,7 @@ var Vb = G.create({
17341
17351
  function Hb(n) {
17342
17352
  return n.replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-]/g, "").replace(/^[0-9-]+/, "").replace(/^-+/, "").toLowerCase();
17343
17353
  }
17344
- G.create({
17354
+ Y.create({
17345
17355
  name: "placeholder",
17346
17356
  addOptions() {
17347
17357
  return {
@@ -17358,7 +17368,7 @@ G.create({
17358
17368
  const n = this.options.dataAttribute ? `data-${Hb(this.options.dataAttribute)}` : `data-${ja}`;
17359
17369
  return [
17360
17370
  new j({
17361
- key: new J("placeholder"),
17371
+ key: new Q("placeholder"),
17362
17372
  props: {
17363
17373
  decorations: ({ doc: e, selection: t }) => {
17364
17374
  const r = this.editor.isEditable || !this.options.showOnlyWhenEditable, { anchor: s } = t, i = [];
@@ -17389,7 +17399,7 @@ G.create({
17389
17399
  ];
17390
17400
  }
17391
17401
  });
17392
- G.create({
17402
+ Y.create({
17393
17403
  name: "selection",
17394
17404
  addOptions() {
17395
17405
  return {
@@ -17400,7 +17410,7 @@ G.create({
17400
17410
  const { editor: n, options: e } = this;
17401
17411
  return [
17402
17412
  new j({
17403
- key: new J("selection"),
17413
+ key: new Q("selection"),
17404
17414
  props: {
17405
17415
  decorations(t) {
17406
17416
  return t.selection.empty || n.isFocused || !n.isEditable || cm(t.selection) || n.view.dragging ? null : H.create(t.doc, [
@@ -17417,7 +17427,7 @@ G.create({
17417
17427
  function Wa({ types: n, node: e }) {
17418
17428
  return e && Array.isArray(n) && n.includes(e.type) || e?.type === n;
17419
17429
  }
17420
- G.create({
17430
+ Y.create({
17421
17431
  name: "trailingNode",
17422
17432
  addOptions() {
17423
17433
  return {
@@ -17427,7 +17437,7 @@ G.create({
17427
17437
  },
17428
17438
  addProseMirrorPlugins() {
17429
17439
  var n;
17430
- const e = new J(this.name), t = this.options.node || ((n = this.editor.schema.topNodeType.contentMatch.defaultType) == null ? void 0 : n.name) || "paragraph", r = Object.entries(this.editor.schema.nodes).map(([, s]) => s).filter((s) => (this.options.notAfter || []).concat(t).includes(s.name));
17440
+ const e = new Q(this.name), t = this.options.node || ((n = this.editor.schema.topNodeType.contentMatch.defaultType) == null ? void 0 : n.name) || "paragraph", r = Object.entries(this.editor.schema.nodes).map(([, s]) => s).filter((s) => (this.options.notAfter || []).concat(t).includes(s.name));
17431
17441
  return [
17432
17442
  new j({
17433
17443
  key: e,
@@ -17452,7 +17462,7 @@ G.create({
17452
17462
  ];
17453
17463
  }
17454
17464
  });
17455
- var jb = G.create({
17465
+ var jb = Y.create({
17456
17466
  name: "undoRedo",
17457
17467
  addOptions() {
17458
17468
  return {
@@ -17545,33 +17555,38 @@ const Qb = Au.extend({
17545
17555
  const s = r[0].trim().split(`
17546
17556
  `).map((i) => i.replace(/^أ\.\s/, ""));
17547
17557
  return {
17548
- type: "abjadList",
17558
+ type: "list",
17549
17559
  raw: r[0],
17560
+ ordered: !0,
17561
+ listType: "abjad",
17550
17562
  items: s.map((i) => ({ tokens: t.blockTokens(i) }))
17551
17563
  };
17552
17564
  }
17553
17565
  },
17554
- parseMarkdown: (n, e) => n.type === "abjadList" ? {
17555
- type: "orderedList",
17556
- attrs: { listType: "abjad" },
17557
- content: n.items.map((t) => ({
17558
- type: "listItem",
17559
- content: e.parseChildren(t.tokens || [])
17560
- }))
17561
- } : {
17562
- type: "orderedList",
17563
- attrs: { listType: "decimal" },
17564
- content: (n.items || []).map((t) => ({
17565
- type: "listItem",
17566
- content: e.parseChildren(t.tokens || [])
17567
- }))
17566
+ markdownTokenName: "list",
17567
+ parseMarkdown: (n, e) => {
17568
+ const t = n.ordered ? "orderedList" : "bulletList", r = n.listType === "abjad" ? "abjad" : n.ordered ? "decimal" : void 0, s = n.ordered && n.start !== void 0 && n.start !== "" ? Number(n.start) : void 0, i = {};
17569
+ return r && (i.listType = r), s && s > 1 && (i.start = s), {
17570
+ type: t,
17571
+ attrs: Object.keys(i).length ? i : void 0,
17572
+ content: (n.items || []).map((o) => {
17573
+ const l = (o.tokens || []).map((c) => c.type === "text" && c.tokens ? {
17574
+ type: "paragraph",
17575
+ content: e.parseInline(c.tokens)
17576
+ } : e.parseChildren([c])?.[0] ?? { type: "paragraph" });
17577
+ return {
17578
+ type: "listItem",
17579
+ content: l.length ? l : [{ type: "paragraph" }]
17580
+ };
17581
+ })
17582
+ };
17568
17583
  },
17569
17584
  renderMarkdown: (n, e) => {
17570
- const r = n.attrs?.listType === "abjad" ? "أ" : "1";
17571
- return (n.content || []).map((i) => {
17572
- const a = e.renderChildren(i.content || []).trimEnd().split(`
17573
- `), l = `${r}. ${a[0]}`, c = a.slice(1).map((u) => ` ${u}`);
17574
- return [l, ...c].join(`
17585
+ const t = n.type === "bulletList", r = n.attrs?.listType === "abjad", s = n.attrs?.start || 1;
17586
+ return (n.content || []).map((o, a) => {
17587
+ const l = t ? "-" : r ? "أ." : `${s + a}.`, u = e.renderChildren(o.content || []).trimEnd().split(`
17588
+ `), d = `${l} ${u[0]}`, f = u.slice(1).map((h) => ` ${h}`);
17589
+ return [d, ...f].join(`
17575
17590
  `);
17576
17591
  }).join(`
17577
17592
  `) + `
@@ -17687,8 +17702,8 @@ function Ka({ attrs: n, anchorRef: e, onSave: t, onClose: r, enableRepeat: s = !
17687
17702
  if (R === "repeat")
17688
17703
  Je.repeat = Math.max(1, parseInt(L) || 1);
17689
17704
  else {
17690
- const Zt = L ? parseInt(L) : null;
17691
- Je[R] = Zt && Zt > 0 ? Zt : null;
17705
+ const en = L ? parseInt(L) : null;
17706
+ Je[R] = en && en > 0 ? en : null;
17692
17707
  }
17693
17708
  return Z[w] = Je, Z;
17694
17709
  });
@@ -17704,7 +17719,7 @@ function Ka({ attrs: n, anchorRef: e, onSave: t, onClose: r, enableRepeat: s = !
17704
17719
  if (!w) return;
17705
17720
  const R = w.ac, L = [];
17706
17721
  for (let le = 0; le < d.length; le++) {
17707
- const Z = d[le], Je = Z.fromWord != null && Z.fromWord > 0 ? Z.fromWord : null, Zt = Z.toWord != null && Z.toWord > 0 ? Z.toWord : null;
17722
+ const Z = d[le], Je = Z.fromWord != null && Z.fromWord > 0 ? Z.fromWord : null, en = Z.toWord != null && Z.toWord > 0 ? Z.toWord : null;
17708
17723
  let Ge, Lt = Je;
17709
17724
  if (le === 0)
17710
17725
  Ge = Math.max(1, Math.min(Z.fromAya ?? 1, R));
@@ -17713,7 +17728,7 @@ function Ka({ attrs: n, anchorRef: e, onSave: t, onClose: r, enableRepeat: s = !
17713
17728
  if (Hn.toWord != null ? (Ge = co, Lt = Hn.toWord + 1) : (Ge = co + 1, Lt = null), Ge > R) break;
17714
17729
  }
17715
17730
  const lo = Z.toAya != null ? Math.max(Ge, Math.min(Z.toAya, R)) : null;
17716
- let Vn = Zt;
17731
+ let Vn = en;
17717
17732
  (lo ?? Ge) === Ge && Lt != null && Vn != null && Vn < Lt && (Vn = Lt), L.push({ fromAya: Ge, toAya: lo, fromWord: Lt, toWord: Vn, repeat: Z.repeat ?? 1 });
17718
17733
  }
17719
17734
  t({
@@ -17948,7 +17963,8 @@ const Ja = {
17948
17963
  function e0(n) {
17949
17964
  return n.map((e) => {
17950
17965
  let t = String(e.fromAya);
17951
- return e.fromWord != null ? (t += `:${e.fromWord}`, e.toAya != null && e.toAya !== e.fromAya ? (t += `-${e.toAya}`, e.toWord != null && (t += `:${e.toWord}`)) : e.toWord != null && (t += `-${e.toWord}`)) : e.toAya != null && e.toAya !== e.fromAya && (t += `-${e.toAya}`), e.repeat > 1 && (t += `x${e.repeat}`), t;
17966
+ const r = e.fromWord ?? (e.toWord != null ? 1 : null);
17967
+ return r != null ? (t += `:${r}`, e.toAya != null && e.toAya !== e.fromAya ? (t += `-${e.toAya}`, e.toWord != null && (t += `:${e.toWord}`)) : e.toWord != null && (t += `-${e.toWord}`)) : e.toAya != null && e.toAya !== e.fromAya && (t += `-${e.toAya}`), e.repeat > 1 && (t += `x${e.repeat}`), t;
17952
17968
  }).join(",");
17953
17969
  }
17954
17970
  function t0(n) {
@@ -17988,7 +18004,7 @@ const n0 = fe.create({
17988
18004
  }
17989
18005
  const o = n.slice(0, i), a = /^(\d+):([^:]+):(.+)$/.exec(r);
17990
18006
  if (!a) return;
17991
- const l = s ? qn(s) : {};
18007
+ const l = s ? Yt(s) : {};
17992
18008
  return {
17993
18009
  type: "quranRef",
17994
18010
  raw: o,
@@ -18055,12 +18071,12 @@ const n0 = fe.create({
18055
18071
  ];
18056
18072
  },
18057
18073
  addNodeView() {
18058
- return _n(Zb);
18074
+ return zn(Zb);
18059
18075
  },
18060
18076
  addProseMirrorPlugins() {
18061
18077
  return [
18062
18078
  new j({
18063
- key: new J("quranRefStripMarks"),
18079
+ key: new Q("quranRefStripMarks"),
18064
18080
  appendTransaction(n, e, t) {
18065
18081
  const { tr: r } = t;
18066
18082
  let s = !1;
@@ -18100,7 +18116,7 @@ function r0({ node: n, updateAttributes: e, selected: t }) {
18100
18116
  /* @__PURE__ */ I("span", { className: "qalam-hadith-meta", contentEditable: !1, children: [
18101
18117
  /* @__PURE__ */ k("span", { className: "qalam-hadith-meta-bracket", children: "[" }),
18102
18118
  /* @__PURE__ */ k(
18103
- Ln,
18119
+ Pn,
18104
18120
  {
18105
18121
  className: "qalam-hadith-citation-input",
18106
18122
  value: r,
@@ -18110,7 +18126,7 @@ function r0({ node: n, updateAttributes: e, selected: t }) {
18110
18126
  ),
18111
18127
  /* @__PURE__ */ k("span", { className: "qalam-hadith-meta-sep", children: "|" }),
18112
18128
  /* @__PURE__ */ k(
18113
- Ln,
18129
+ Pn,
18114
18130
  {
18115
18131
  className: "qalam-hadith-grade-input",
18116
18132
  value: s,
@@ -18151,7 +18167,7 @@ const s0 = fe.create({
18151
18167
  }
18152
18168
  o = n.slice(u + 1, a - 1);
18153
18169
  }
18154
- const l = n.slice(0, a), c = o ? qn(o) : {};
18170
+ const l = n.slice(0, a), c = o ? Yt(o) : {};
18155
18171
  return {
18156
18172
  type: "hadithRef",
18157
18173
  raw: l,
@@ -18203,7 +18219,7 @@ const s0 = fe.create({
18203
18219
  ];
18204
18220
  },
18205
18221
  addNodeView() {
18206
- return _n(r0, { as: "span" });
18222
+ return zn(r0, { as: "span" });
18207
18223
  },
18208
18224
  addKeyboardShortcuts() {
18209
18225
  return {
@@ -18216,7 +18232,7 @@ const s0 = fe.create({
18216
18232
  addProseMirrorPlugins() {
18217
18233
  return [
18218
18234
  new j({
18219
- key: new J("hadithRefQuotes"),
18235
+ key: new Q("hadithRefQuotes"),
18220
18236
  props: {
18221
18237
  decorations: (n) => {
18222
18238
  const e = [], t = n.schema.marks.propheticSpeech;
@@ -18398,7 +18414,7 @@ function i0({ node: n, getPos: e, editor: t, updateAttributes: r }) {
18398
18414
  /* @__PURE__ */ I("div", { className: "qalam-poem__citation", children: [
18399
18415
  /* @__PURE__ */ k("span", { className: "qalam-poem__citation-bracket", children: "[" }),
18400
18416
  /* @__PURE__ */ k(
18401
- Ln,
18417
+ Pn,
18402
18418
  {
18403
18419
  className: "qalam-poem__citation-input",
18404
18420
  value: s ?? "",
@@ -18489,7 +18505,7 @@ const o0 = fe.create({
18489
18505
  tokenize: (n) => {
18490
18506
  const e = /^:::poem(?:\{([^}]*)\})?\n([\s\S]*?)\n:::\n?/.exec(n);
18491
18507
  if (!e) return;
18492
- const t = e[1] ? qn(e[1]) : {};
18508
+ const t = e[1] ? Yt(e[1]) : {};
18493
18509
  return {
18494
18510
  type: "poem",
18495
18511
  raw: e[0],
@@ -18550,7 +18566,7 @@ ${i.join(`
18550
18566
  ];
18551
18567
  },
18552
18568
  addNodeView() {
18553
- return _n(i0);
18569
+ return zn(i0);
18554
18570
  },
18555
18571
  addCommands() {
18556
18572
  return {
@@ -18568,7 +18584,7 @@ function l0(n) {
18568
18584
  const e = n.toString().replace(/\d/g, (t) => "٠١٢٣٤٥٦٧٨٩"[parseInt(t)]);
18569
18585
  return n > 10 ? `(${e} مرة)` : `(${e} مرات)`;
18570
18586
  }
18571
- const c0 = Xt.create({
18587
+ const c0 = Zt.create({
18572
18588
  name: "repeat",
18573
18589
  markdownTokenizer: {
18574
18590
  name: "repeat",
@@ -18621,7 +18637,7 @@ const c0 = Xt.create({
18621
18637
  0
18622
18638
  ];
18623
18639
  }
18624
- }), u0 = Xt.create({
18640
+ }), u0 = Zt.create({
18625
18641
  name: "propheticSpeech",
18626
18642
  excludes: "",
18627
18643
  markdownTokenizer: {
@@ -18651,22 +18667,8 @@ const c0 = Xt.create({
18651
18667
  0
18652
18668
  ];
18653
18669
  }
18654
- }), d0 = G.create({
18655
- name: "strictSchema",
18656
- addProseMirrorPlugins() {
18657
- return [
18658
- new j({
18659
- key: new J("strictSchema"),
18660
- props: {
18661
- transformPasted(n) {
18662
- return n;
18663
- }
18664
- }
18665
- })
18666
- ];
18667
- }
18668
18670
  });
18669
- function f0({ editor: n, repeatConfig: e }) {
18671
+ function d0({ editor: n, repeatConfig: e }) {
18670
18672
  const t = iu({
18671
18673
  editor: n,
18672
18674
  selector: (m) => ({
@@ -18926,10 +18928,10 @@ function Bu(n) {
18926
18928
  }
18927
18929
  return Array.isArray(t.content) ? { ...t, content: t.content.map((r) => Bu(r)) } : t;
18928
18930
  }
18929
- function h0(n) {
18931
+ function f0(n) {
18930
18932
  return n === !1 ? { quran: !1, inline: !1, block: !1 } : n === void 0 || n === !0 ? { quran: !0, inline: !0, block: !0 } : { quran: n.quran ?? !0, inline: n.inline ?? !0, block: n.block ?? !0 };
18931
18933
  }
18932
- function x0({
18934
+ function k0({
18933
18935
  content: n,
18934
18936
  onChange: e,
18935
18937
  editable: t = !0,
@@ -18937,7 +18939,7 @@ function x0({
18937
18939
  className: s,
18938
18940
  repeat: i
18939
18941
  }) {
18940
- const o = h0(i), a = Yg({
18942
+ const o = f0(i), a = Yg({
18941
18943
  extensions: [
18942
18944
  iy,
18943
18945
  o.block ? cy : fu,
@@ -18959,8 +18961,7 @@ function x0({
18959
18961
  wb,
18960
18962
  a0,
18961
18963
  o0,
18962
- ...o.inline ? [c0] : [],
18963
- d0
18964
+ ...o.inline ? [c0] : []
18964
18965
  ],
18965
18966
  content: (() => {
18966
18967
  const l = n ?? { type: "doc", content: [{ type: "paragraph" }] };
@@ -18978,20 +18979,21 @@ function x0({
18978
18979
  }
18979
18980
  });
18980
18981
  return a ? (a.storage.__repeatConfig = o, /* @__PURE__ */ I("div", { className: `qalam-editor ${s ?? ""}`, children: [
18981
- t && /* @__PURE__ */ k(f0, { editor: a, repeatConfig: o }),
18982
+ t && /* @__PURE__ */ k(d0, { editor: a, repeatConfig: o }),
18982
18983
  /* @__PURE__ */ k("div", { className: "qalam-editor__scroll", children: /* @__PURE__ */ k(su, { editor: a }) })
18983
18984
  ] })) : null;
18984
18985
  }
18985
18986
  export {
18986
18987
  xb as B,
18987
- G as E,
18988
+ Y as E,
18988
18989
  s0 as H,
18989
18990
  c0 as I,
18990
18991
  hb as L,
18992
+ fe as N,
18991
18993
  cy as P,
18992
- x0 as Q,
18994
+ k0 as Q,
18993
18995
  n0 as a,
18994
- k0 as b,
18996
+ b0 as b,
18995
18997
  Mc as c,
18996
18998
  dy as d,
18997
18999
  ky as e,