bi-components-library 1.3.7-next.6 → 1.3.7-next.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -2200,7 +2200,7 @@ function kc(e) {
2200
2200
  function Ac(e) {
2201
2201
  return e && typeof e == "number" ? e : 1;
2202
2202
  }
2203
- class mt extends Error {
2203
+ class pt extends Error {
2204
2204
  /**
2205
2205
  * Create a message for `reason`.
2206
2206
  *
@@ -2274,19 +2274,19 @@ class mt extends Error {
2274
2274
  this.ancestors = a.ancestors || void 0, this.cause = a.cause || void 0, this.column = s ? s.column : void 0, this.fatal = void 0, this.file = "", this.message = l, this.line = s ? s.line : void 0, this.name = Tl(a.place) || "1:1", this.place = a.place || void 0, this.reason = this.message, this.ruleId = a.ruleId || void 0, this.source = a.source || void 0, this.stack = i && a.cause && typeof a.cause.stack == "string" ? a.cause.stack : "", this.actual = void 0, this.expected = void 0, this.note = void 0, this.url = void 0;
2275
2275
  }
2276
2276
  }
2277
- mt.prototype.file = "";
2278
- mt.prototype.name = "";
2279
- mt.prototype.reason = "";
2280
- mt.prototype.message = "";
2281
- mt.prototype.stack = "";
2282
- mt.prototype.column = void 0;
2283
- mt.prototype.line = void 0;
2284
- mt.prototype.ancestors = void 0;
2285
- mt.prototype.cause = void 0;
2286
- mt.prototype.fatal = void 0;
2287
- mt.prototype.place = void 0;
2288
- mt.prototype.ruleId = void 0;
2289
- mt.prototype.source = void 0;
2277
+ pt.prototype.file = "";
2278
+ pt.prototype.name = "";
2279
+ pt.prototype.reason = "";
2280
+ pt.prototype.message = "";
2281
+ pt.prototype.stack = "";
2282
+ pt.prototype.column = void 0;
2283
+ pt.prototype.line = void 0;
2284
+ pt.prototype.ancestors = void 0;
2285
+ pt.prototype.cause = void 0;
2286
+ pt.prototype.fatal = void 0;
2287
+ pt.prototype.place = void 0;
2288
+ pt.prototype.ruleId = void 0;
2289
+ pt.prototype.source = void 0;
2290
2290
  const qo = {}.hasOwnProperty, tg = /* @__PURE__ */ new Map(), ng = /[A-Z]/g, rg = /* @__PURE__ */ new Set(["table", "tbody", "thead", "tfoot", "tr"]), lg = /* @__PURE__ */ new Set(["td", "th"]), _h = "https://github.com/syntax-tree/hast-util-to-jsx-runtime";
2291
2291
  function ag(e, t) {
2292
2292
  if (!t || t.Fragment === void 0)
@@ -2509,7 +2509,7 @@ function gg(e, t) {
2509
2509
  const r = (
2510
2510
  /** @type {Error} */
2511
2511
  n
2512
- ), l = new mt("Cannot parse `style` attribute", {
2512
+ ), l = new pt("Cannot parse `style` attribute", {
2513
2513
  ancestors: e.ancestors,
2514
2514
  cause: r,
2515
2515
  ruleId: "style",
@@ -2550,7 +2550,7 @@ function Rh(e, t, n) {
2550
2550
  Ll(e);
2551
2551
  }
2552
2552
  function Ll(e, t) {
2553
- const n = new mt(
2553
+ const n = new pt(
2554
2554
  "Cannot handle MDX estrees without `createEvaluater`",
2555
2555
  {
2556
2556
  ancestors: e.ancestors,
@@ -5018,7 +5018,7 @@ function C2(e) {
5018
5018
  return le;
5019
5019
  }
5020
5020
  function l(j, le, pe) {
5021
- let Te = le - 1, Le = -1, It = !1, Lt, ct, yn, En;
5021
+ let Te = le - 1, Le = -1, It = !1, Lt, ut, yn, En;
5022
5022
  for (; ++Te <= pe; ) {
5023
5023
  const Xe = j[Te];
5024
5024
  switch (Xe[1].type) {
@@ -5044,14 +5044,14 @@ function C2(e) {
5044
5044
  if (!Le && Xe[0] === "enter" && Xe[1].type === "listItemPrefix" || Le === -1 && Xe[0] === "exit" && (Xe[1].type === "listUnordered" || Xe[1].type === "listOrdered")) {
5045
5045
  if (Lt) {
5046
5046
  let sn = Te;
5047
- for (ct = void 0; sn--; ) {
5047
+ for (ut = void 0; sn--; ) {
5048
5048
  const Ct = j[sn];
5049
5049
  if (Ct[1].type === "lineEnding" || Ct[1].type === "lineEndingBlank") {
5050
5050
  if (Ct[0] === "exit") continue;
5051
- ct && (j[ct][1].type = "lineEndingBlank", It = !0), Ct[1].type = "lineEnding", ct = sn;
5051
+ ut && (j[ut][1].type = "lineEndingBlank", It = !0), Ct[1].type = "lineEnding", ut = sn;
5052
5052
  } else if (!(Ct[1].type === "linePrefix" || Ct[1].type === "blockQuotePrefix" || Ct[1].type === "blockQuotePrefixWhitespace" || Ct[1].type === "blockQuoteMarker" || Ct[1].type === "listItemIndent")) break;
5053
5053
  }
5054
- yn && (!ct || yn < ct) && (Lt._spread = !0), Lt.end = Object.assign({}, ct ? j[ct][1].start : Xe[1].end), j.splice(ct || Te, 0, ["exit", Lt, Xe[2]]), Te++, pe++;
5054
+ yn && (!ut || yn < ut) && (Lt._spread = !0), Lt.end = Object.assign({}, ut ? j[ut][1].start : Xe[1].end), j.splice(ut || Te, 0, ["exit", Lt, Xe[2]]), Te++, pe++;
5055
5055
  }
5056
5056
  if (Xe[1].type === "listItemPrefix") {
5057
5057
  const sn = {
@@ -6917,7 +6917,7 @@ class tp {
6917
6917
  * Message.
6918
6918
  */
6919
6919
  message(t, n, r) {
6920
- const l = new mt(
6920
+ const l = new pt(
6921
6921
  // @ts-expect-error: the overloads are fine.
6922
6922
  t,
6923
6923
  n,
@@ -12092,7 +12092,7 @@ class md {
12092
12092
  break;
12093
12093
  }
12094
12094
  case L.IN_BODY: {
12095
- bt(this, t);
12095
+ mt(this, t);
12096
12096
  break;
12097
12097
  }
12098
12098
  case L.IN_TABLE: {
@@ -12459,7 +12459,7 @@ function xl(e, t) {
12459
12459
  function k3(e, t) {
12460
12460
  switch (t.tagID) {
12461
12461
  case p.HTML: {
12462
- bt(e, t);
12462
+ mt(e, t);
12463
12463
  break;
12464
12464
  }
12465
12465
  case p.HEAD: {
@@ -12480,7 +12480,7 @@ function Sl(e, t) {
12480
12480
  function qt(e, t) {
12481
12481
  switch (t.tagID) {
12482
12482
  case p.HTML: {
12483
- bt(e, t);
12483
+ mt(e, t);
12484
12484
  break;
12485
12485
  }
12486
12486
  case p.BASE:
@@ -12549,7 +12549,7 @@ function kl(e, t) {
12549
12549
  function w3(e, t) {
12550
12550
  switch (t.tagID) {
12551
12551
  case p.HTML: {
12552
- bt(e, t);
12552
+ mt(e, t);
12553
12553
  break;
12554
12554
  }
12555
12555
  case p.BASEFONT:
@@ -12591,7 +12591,7 @@ function Al(e, t) {
12591
12591
  function _3(e, t) {
12592
12592
  switch (t.tagID) {
12593
12593
  case p.HTML: {
12594
- bt(e, t);
12594
+ mt(e, t);
12595
12595
  break;
12596
12596
  }
12597
12597
  case p.BODY: {
@@ -12657,7 +12657,7 @@ function yi(e, t) {
12657
12657
  break;
12658
12658
  }
12659
12659
  case Oe.START_TAG: {
12660
- bt(e, t);
12660
+ mt(e, t);
12661
12661
  break;
12662
12662
  }
12663
12663
  case Oe.END_TAG: {
@@ -12788,7 +12788,7 @@ function aT(e, t) {
12788
12788
  function gd(e, t) {
12789
12789
  e._reconstructActiveFormattingElements(), e._insertElement(t, K.HTML);
12790
12790
  }
12791
- function bt(e, t) {
12791
+ function mt(e, t) {
12792
12792
  switch (t.tagID) {
12793
12793
  case p.I:
12794
12794
  case p.S:
@@ -13294,7 +13294,7 @@ function pl(e, t) {
13294
13294
  const Np = /* @__PURE__ */ new Set([p.CAPTION, p.COL, p.COLGROUP, p.TBODY, p.TD, p.TFOOT, p.TH, p.THEAD, p.TR]);
13295
13295
  function AT(e, t) {
13296
13296
  const n = t.tagID;
13297
- Np.has(n) ? e.openElements.hasInTableScope(p.CAPTION) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(p.CAPTION), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = L.IN_TABLE, Vr(e, t)) : bt(e, t);
13297
+ Np.has(n) ? e.openElements.hasInTableScope(p.CAPTION) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(p.CAPTION), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = L.IN_TABLE, Vr(e, t)) : mt(e, t);
13298
13298
  }
13299
13299
  function NT(e, t) {
13300
13300
  const n = t.tagID;
@@ -13322,7 +13322,7 @@ function NT(e, t) {
13322
13322
  function au(e, t) {
13323
13323
  switch (t.tagID) {
13324
13324
  case p.HTML: {
13325
- bt(e, t);
13325
+ mt(e, t);
13326
13326
  break;
13327
13327
  }
13328
13328
  case p.COL: {
@@ -13457,7 +13457,7 @@ function wp(e, t) {
13457
13457
  }
13458
13458
  function IT(e, t) {
13459
13459
  const n = t.tagID;
13460
- Np.has(n) ? (e.openElements.hasInTableScope(p.TD) || e.openElements.hasInTableScope(p.TH)) && (e._closeTableCell(), Ci(e, t)) : bt(e, t);
13460
+ Np.has(n) ? (e.openElements.hasInTableScope(p.TD) || e.openElements.hasInTableScope(p.TH)) && (e._closeTableCell(), Ci(e, t)) : mt(e, t);
13461
13461
  }
13462
13462
  function _T(e, t) {
13463
13463
  const n = t.tagID;
@@ -13488,7 +13488,7 @@ function _T(e, t) {
13488
13488
  function Ip(e, t) {
13489
13489
  switch (t.tagID) {
13490
13490
  case p.HTML: {
13491
- bt(e, t);
13491
+ mt(e, t);
13492
13492
  break;
13493
13493
  }
13494
13494
  case p.OPTION: {
@@ -13584,7 +13584,7 @@ function RT(e, t) {
13584
13584
  break;
13585
13585
  }
13586
13586
  default:
13587
- e.tmplInsertionModeStack[0] = L.IN_BODY, e.insertionMode = L.IN_BODY, bt(e, t);
13587
+ e.tmplInsertionModeStack[0] = L.IN_BODY, e.insertionMode = L.IN_BODY, mt(e, t);
13588
13588
  }
13589
13589
  }
13590
13590
  function DT(e, t) {
@@ -13594,7 +13594,7 @@ function Op(e, t) {
13594
13594
  e.openElements.tmplCount > 0 ? (e.openElements.popUntilTagNamePopped(p.TEMPLATE), e.activeFormattingElements.clearToLastMarker(), e.tmplInsertionModeStack.shift(), e._resetInsertionMode(), e.onEof(t)) : lu(e, t);
13595
13595
  }
13596
13596
  function LT(e, t) {
13597
- t.tagID === p.HTML ? bt(e, t) : Ga(e, t);
13597
+ t.tagID === p.HTML ? mt(e, t) : Ga(e, t);
13598
13598
  }
13599
13599
  function Mp(e, t) {
13600
13600
  var n;
@@ -13613,7 +13613,7 @@ function Ga(e, t) {
13613
13613
  function PT(e, t) {
13614
13614
  switch (t.tagID) {
13615
13615
  case p.HTML: {
13616
- bt(e, t);
13616
+ mt(e, t);
13617
13617
  break;
13618
13618
  }
13619
13619
  case p.FRAMESET: {
@@ -13636,7 +13636,7 @@ function BT(e, t) {
13636
13636
  function FT(e, t) {
13637
13637
  switch (t.tagID) {
13638
13638
  case p.HTML: {
13639
- bt(e, t);
13639
+ mt(e, t);
13640
13640
  break;
13641
13641
  }
13642
13642
  case p.NOFRAMES: {
@@ -13649,7 +13649,7 @@ function HT(e, t) {
13649
13649
  t.tagID === p.HTML && (e.insertionMode = L.AFTER_AFTER_FRAMESET);
13650
13650
  }
13651
13651
  function UT(e, t) {
13652
- t.tagID === p.HTML ? bt(e, t) : Pa(e, t);
13652
+ t.tagID === p.HTML ? mt(e, t) : Pa(e, t);
13653
13653
  }
13654
13654
  function Pa(e, t) {
13655
13655
  e.insertionMode = L.IN_BODY, yi(e, t);
@@ -13657,7 +13657,7 @@ function Pa(e, t) {
13657
13657
  function zT(e, t) {
13658
13658
  switch (t.tagID) {
13659
13659
  case p.HTML: {
13660
- bt(e, t);
13660
+ mt(e, t);
13661
13661
  break;
13662
13662
  }
13663
13663
  case p.NOFRAMES: {
@@ -24390,11 +24390,11 @@ const b4 = h0(
24390
24390
  "markdown-module",
24391
24391
  "MarkdownModuleNode"
24392
24392
  );
24393
- function it(e) {
24393
+ function at(e) {
24394
24394
  this.content = e;
24395
24395
  }
24396
- it.prototype = {
24397
- constructor: it,
24396
+ at.prototype = {
24397
+ constructor: at,
24398
24398
  find: function(e) {
24399
24399
  for (var t = 0; t < this.content.length; t += 2)
24400
24400
  if (this.content[t] === e) return t;
@@ -24413,7 +24413,7 @@ it.prototype = {
24413
24413
  // given, the key of the binding will be replaced with that key.
24414
24414
  update: function(e, t, n) {
24415
24415
  var r = n && n != e ? this.remove(n) : this, l = r.find(e), a = r.content.slice();
24416
- return l == -1 ? a.push(n || e, t) : (a[l + 1] = t, n && (a[l] = n)), new it(a);
24416
+ return l == -1 ? a.push(n || e, t) : (a[l + 1] = t, n && (a[l] = n)), new at(a);
24417
24417
  },
24418
24418
  // :: (string) → OrderedMap
24419
24419
  // Return a map with the given key removed, if it existed.
@@ -24421,25 +24421,25 @@ it.prototype = {
24421
24421
  var t = this.find(e);
24422
24422
  if (t == -1) return this;
24423
24423
  var n = this.content.slice();
24424
- return n.splice(t, 2), new it(n);
24424
+ return n.splice(t, 2), new at(n);
24425
24425
  },
24426
24426
  // :: (string, any) → OrderedMap
24427
24427
  // Add a new key to the start of the map.
24428
24428
  addToStart: function(e, t) {
24429
- return new it([e, t].concat(this.remove(e).content));
24429
+ return new at([e, t].concat(this.remove(e).content));
24430
24430
  },
24431
24431
  // :: (string, any) → OrderedMap
24432
24432
  // Add a new key to the end of the map.
24433
24433
  addToEnd: function(e, t) {
24434
24434
  var n = this.remove(e).content.slice();
24435
- return n.push(e, t), new it(n);
24435
+ return n.push(e, t), new at(n);
24436
24436
  },
24437
24437
  // :: (string, string, any) → OrderedMap
24438
24438
  // Add a key after the given key. If `place` is not found, the new
24439
24439
  // key is added to the end.
24440
24440
  addBefore: function(e, t, n) {
24441
24441
  var r = this.remove(t), l = r.content.slice(), a = r.find(e);
24442
- return l.splice(a == -1 ? l.length : a, 0, t, n), new it(l);
24442
+ return l.splice(a == -1 ? l.length : a, 0, t, n), new at(l);
24443
24443
  },
24444
24444
  // :: ((key: string, value: any))
24445
24445
  // Call the given function for each key/value pair in the map, in
@@ -24452,20 +24452,20 @@ it.prototype = {
24452
24452
  // Create a new map by prepending the keys in this map that don't
24453
24453
  // appear in `map` before the keys in `map`.
24454
24454
  prepend: function(e) {
24455
- return e = it.from(e), e.size ? new it(e.content.concat(this.subtract(e).content)) : this;
24455
+ return e = at.from(e), e.size ? new at(e.content.concat(this.subtract(e).content)) : this;
24456
24456
  },
24457
24457
  // :: (union<Object, OrderedMap>) → OrderedMap
24458
24458
  // Create a new map by appending the keys in this map that don't
24459
24459
  // appear in `map` after the keys in `map`.
24460
24460
  append: function(e) {
24461
- return e = it.from(e), e.size ? new it(this.subtract(e).content.concat(e.content)) : this;
24461
+ return e = at.from(e), e.size ? new at(this.subtract(e).content.concat(e.content)) : this;
24462
24462
  },
24463
24463
  // :: (union<Object, OrderedMap>) → OrderedMap
24464
24464
  // Create a map containing all the keys in this map that don't
24465
24465
  // appear in `map`.
24466
24466
  subtract: function(e) {
24467
24467
  var t = this;
24468
- e = it.from(e);
24468
+ e = at.from(e);
24469
24469
  for (var n = 0; n < e.content.length; n += 2)
24470
24470
  t = t.remove(e.content[n]);
24471
24471
  return t;
@@ -24484,11 +24484,11 @@ it.prototype = {
24484
24484
  return this.content.length >> 1;
24485
24485
  }
24486
24486
  };
24487
- it.from = function(e) {
24488
- if (e instanceof it) return e;
24487
+ at.from = function(e) {
24488
+ if (e instanceof at) return e;
24489
24489
  var t = [];
24490
24490
  if (e) for (var n in e) t.push(n, e[n]);
24491
- return new it(t);
24491
+ return new at(t);
24492
24492
  };
24493
24493
  function p0(e, t, n) {
24494
24494
  for (let r = 0; ; r++) {
@@ -26443,7 +26443,7 @@ class I0 {
26443
26443
  let n = this.spec = {};
26444
26444
  for (let l in t)
26445
26445
  n[l] = t[l];
26446
- n.nodes = it.from(t.nodes), n.marks = it.from(t.marks || {}), this.nodes = Ud.compile(this.spec.nodes, this), this.marks = xi.compile(this.spec.marks, this);
26446
+ n.nodes = at.from(t.nodes), n.marks = at.from(t.marks || {}), this.nodes = Ud.compile(this.spec.nodes, this), this.marks = xi.compile(this.spec.marks, this);
26447
26447
  let r = /* @__PURE__ */ Object.create(null);
26448
26448
  for (let l in this.nodes) {
26449
26449
  if (l in this.marks)
@@ -27462,7 +27462,7 @@ class $l {
27462
27462
  }
27463
27463
  }
27464
27464
  const As = /* @__PURE__ */ Object.create(null);
27465
- class gt {
27465
+ class bt {
27466
27466
  /**
27467
27467
  Get the step map that represents the changes made by this step,
27468
27468
  and which can be used to transform between positions in the old
@@ -27545,7 +27545,7 @@ function hu(e, t, n) {
27545
27545
  }
27546
27546
  return Q.fromArray(r);
27547
27547
  }
27548
- class Rn extends gt {
27548
+ class Rn extends bt {
27549
27549
  /**
27550
27550
  Create a mark step.
27551
27551
  */
@@ -27583,8 +27583,8 @@ class Rn extends gt {
27583
27583
  return new Rn(n.from, n.to, t.markFromJSON(n.mark));
27584
27584
  }
27585
27585
  }
27586
- gt.jsonID("addMark", Rn);
27587
- class Zt extends gt {
27586
+ bt.jsonID("addMark", Rn);
27587
+ class Zt extends bt {
27588
27588
  /**
27589
27589
  Create a mark-removing step.
27590
27590
  */
@@ -27622,8 +27622,8 @@ class Zt extends gt {
27622
27622
  return new Zt(n.from, n.to, t.markFromJSON(n.mark));
27623
27623
  }
27624
27624
  }
27625
- gt.jsonID("removeMark", Zt);
27626
- class Dn extends gt {
27625
+ bt.jsonID("removeMark", Zt);
27626
+ class Dn extends bt {
27627
27627
  /**
27628
27628
  Create a node mark step.
27629
27629
  */
@@ -27666,8 +27666,8 @@ class Dn extends gt {
27666
27666
  return new Dn(n.pos, t.markFromJSON(n.mark));
27667
27667
  }
27668
27668
  }
27669
- gt.jsonID("addNodeMark", Dn);
27670
- class Er extends gt {
27669
+ bt.jsonID("addNodeMark", Dn);
27670
+ class Er extends bt {
27671
27671
  /**
27672
27672
  Create a mark-removing step.
27673
27673
  */
@@ -27701,8 +27701,8 @@ class Er extends gt {
27701
27701
  return new Er(n.pos, t.markFromJSON(n.mark));
27702
27702
  }
27703
27703
  }
27704
- gt.jsonID("removeNodeMark", Er);
27705
- class Ge extends gt {
27704
+ bt.jsonID("removeNodeMark", Er);
27705
+ class Ge extends bt {
27706
27706
  /**
27707
27707
  The given `slice` should fit the 'gap' between `from` and
27708
27708
  `to`—the depths must line up, and the surrounding nodes must be
@@ -27754,8 +27754,8 @@ class Ge extends gt {
27754
27754
  }
27755
27755
  }
27756
27756
  Ge.MAP_BIAS = 1;
27757
- gt.jsonID("replace", Ge);
27758
- class et extends gt {
27757
+ bt.jsonID("replace", Ge);
27758
+ class et extends bt {
27759
27759
  /**
27760
27760
  Create a replace-around step with the given range and gap.
27761
27761
  `insert` should be the point in the slice into which the content
@@ -27812,7 +27812,7 @@ class et extends gt {
27812
27812
  return new et(n.from, n.to, n.gapFrom, n.gapTo, ue.fromJSON(t, n.slice), n.insert, !!n.structure);
27813
27813
  }
27814
27814
  }
27815
- gt.jsonID("replaceAround", et);
27815
+ bt.jsonID("replaceAround", et);
27816
27816
  function go(e, t, n) {
27817
27817
  let r = e.resolve(t), l = n - t, a = r.depth;
27818
27818
  for (; l > 0 && a > 0 && r.indexAfter(a) == r.node(a).childCount; )
@@ -28414,7 +28414,7 @@ function q0(e, t) {
28414
28414
  }
28415
28415
  return n;
28416
28416
  }
28417
- class Ur extends gt {
28417
+ class Ur extends bt {
28418
28418
  /**
28419
28419
  Construct an attribute step.
28420
28420
  */
@@ -28451,8 +28451,8 @@ class Ur extends gt {
28451
28451
  return new Ur(n.pos, n.attr, n.value);
28452
28452
  }
28453
28453
  }
28454
- gt.jsonID("attr", Ur);
28455
- class ql extends gt {
28454
+ bt.jsonID("attr", Ur);
28455
+ class ql extends bt {
28456
28456
  /**
28457
28457
  Construct an attribute step.
28458
28458
  */
@@ -28485,7 +28485,7 @@ class ql extends gt {
28485
28485
  return new ql(n.attr, n.value);
28486
28486
  }
28487
28487
  }
28488
- gt.jsonID("docAttr", ql);
28488
+ bt.jsonID("docAttr", ql);
28489
28489
  let $r = class extends Error {
28490
28490
  };
28491
28491
  $r = function e(t) {
@@ -29545,7 +29545,7 @@ class Wt {
29545
29545
  return t[this.key];
29546
29546
  }
29547
29547
  }
29548
- const st = function(e) {
29548
+ const it = function(e) {
29549
29549
  for (var t = 0; ; t++)
29550
29550
  if (e = e.previousSibling, !e)
29551
29551
  return t;
@@ -29570,7 +29570,7 @@ function nf(e, t, n, r, l) {
29570
29570
  let i = e.parentNode;
29571
29571
  if (!i || i.nodeType != 1 || aa(e) || bx.test(e.nodeName) || e.contentEditable == "false")
29572
29572
  return !1;
29573
- t = st(e) + (l < 0 ? 0 : 1), e = i;
29573
+ t = it(e) + (l < 0 ? 0 : 1), e = i;
29574
29574
  } else if (e.nodeType == 1) {
29575
29575
  let i = e.childNodes[t + (l < 0 ? -1 : 0)];
29576
29576
  if (i.nodeType == 1 && i.contentEditable == "false")
@@ -29596,7 +29596,7 @@ function gx(e, t) {
29596
29596
  return null;
29597
29597
  e = e.childNodes[t - 1], t = Ht(e);
29598
29598
  } else if (e.parentNode && !aa(e))
29599
- t = st(e), e = e.parentNode;
29599
+ t = it(e), e = e.parentNode;
29600
29600
  else
29601
29601
  return null;
29602
29602
  }
@@ -29610,7 +29610,7 @@ function vx(e, t) {
29610
29610
  return null;
29611
29611
  e = e.childNodes[t], t = 0;
29612
29612
  } else if (e.parentNode && !aa(e))
29613
- t = st(e) + 1, e = e.parentNode;
29613
+ t = it(e) + 1, e = e.parentNode;
29614
29614
  else
29615
29615
  return null;
29616
29616
  }
@@ -29619,7 +29619,7 @@ function yx(e, t, n) {
29619
29619
  for (let r = t == 0, l = t == Ht(e); r || l; ) {
29620
29620
  if (e == n)
29621
29621
  return !0;
29622
- let a = st(e);
29622
+ let a = it(e);
29623
29623
  if (e = e.parentNode, !e)
29624
29624
  return !1;
29625
29625
  r = r && a == 0, l = l && a == Ht(e);
@@ -29660,7 +29660,7 @@ function Tx(e, t, n) {
29660
29660
  }
29661
29661
  const tn = typeof navigator < "u" ? navigator : null, rf = typeof document < "u" ? document : null, jn = tn && tn.userAgent || "", yo = /Edge\/(\d+)/.exec(jn), j0 = /MSIE \d/.exec(jn), Eo = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(jn), At = !!(j0 || Eo || yo), Bn = j0 ? document.documentMode : Eo ? +Eo[1] : yo ? +yo[1] : 0, Ut = !At && /gecko\/(\d+)/i.test(jn);
29662
29662
  Ut && +(/Firefox\/(\d+)/.exec(jn) || [0, 0])[1];
29663
- const To = !At && /Chrome\/(\d+)/.exec(jn), ut = !!To, G0 = To ? +To[1] : 0, ht = !At && !!tn && /Apple Computer/.test(tn.vendor), Wr = ht && (/Mobile\/\w+/.test(jn) || !!tn && tn.maxTouchPoints > 2), Pt = Wr || (tn ? /Mac/.test(tn.platform) : !1), K0 = tn ? /Win/.test(tn.platform) : !1, fn = /Android \d/.test(jn), ia = !!rf && "webkitFontSmoothing" in rf.documentElement.style, Cx = ia ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
29663
+ const To = !At && /Chrome\/(\d+)/.exec(jn), ot = !!To, G0 = To ? +To[1] : 0, ft = !At && !!tn && /Apple Computer/.test(tn.vendor), Wr = ft && (/Mobile\/\w+/.test(jn) || !!tn && tn.maxTouchPoints > 2), Pt = Wr || (tn ? /Mac/.test(tn.platform) : !1), K0 = tn ? /Win/.test(tn.platform) : !1, fn = /Android \d/.test(jn), ia = !!rf && "webkitFontSmoothing" in rf.documentElement.style, Cx = ia ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
29664
29664
  function xx(e) {
29665
29665
  let t = e.defaultView && e.defaultView.visualViewport;
29666
29666
  return t ? {
@@ -29848,7 +29848,7 @@ function Mx(e, t) {
29848
29848
  if (!gu(t, u) || (i = Z0(e.dom, t, u), !i))
29849
29849
  return null;
29850
29850
  }
29851
- if (ht)
29851
+ if (ft)
29852
29852
  for (let u = i; r && u; u = qr(u))
29853
29853
  u.draggable && (r = void 0);
29854
29854
  if (i = Ix(i, t), r) {
@@ -30092,7 +30092,7 @@ class sa {
30092
30092
  }
30093
30093
  let l;
30094
30094
  if (t == this.dom && this.contentDOM)
30095
- l = n > st(this.contentDOM);
30095
+ l = n > it(this.contentDOM);
30096
30096
  else if (this.contentDOM && this.contentDOM != this.dom && this.dom.contains(this.contentDOM))
30097
30097
  l = t.compareDocumentPosition(this.contentDOM) & 2;
30098
30098
  else if (this.dom.firstChild) {
@@ -30182,12 +30182,12 @@ class sa {
30182
30182
  let a, i = !0;
30183
30183
  for (; a = r ? this.children[r - 1] : null, !(!a || a.dom.parentNode == this.contentDOM); r--, i = !1)
30184
30184
  ;
30185
- return a && n && i && !a.border && !a.domAtom ? a.domFromPos(a.size, n) : { node: this.contentDOM, offset: a ? st(a.dom) + 1 : 0 };
30185
+ return a && n && i && !a.border && !a.domAtom ? a.domFromPos(a.size, n) : { node: this.contentDOM, offset: a ? it(a.dom) + 1 : 0 };
30186
30186
  } else {
30187
30187
  let a, i = !0;
30188
30188
  for (; a = r < this.children.length ? this.children[r] : null, !(!a || a.dom.parentNode == this.contentDOM); r++, i = !1)
30189
30189
  ;
30190
- return a && i && !a.border && !a.domAtom ? a.domFromPos(0, n) : { node: this.contentDOM, offset: a ? st(a.dom) : this.contentDOM.childNodes.length };
30190
+ return a && i && !a.border && !a.domAtom ? a.domFromPos(0, n) : { node: this.contentDOM, offset: a ? it(a.dom) : this.contentDOM.childNodes.length };
30191
30191
  }
30192
30192
  }
30193
30193
  // Used to find a DOM range in a single parent for a given changed
@@ -30206,7 +30206,7 @@ class sa {
30206
30206
  for (let d = s; d > 0; d--) {
30207
30207
  let h = this.children[d - 1];
30208
30208
  if (h.size && h.dom.parentNode == this.contentDOM && !h.emptyChildAt(1)) {
30209
- l = st(h.dom) + 1;
30209
+ l = it(h.dom) + 1;
30210
30210
  break;
30211
30211
  }
30212
30212
  t -= h.size;
@@ -30218,7 +30218,7 @@ class sa {
30218
30218
  for (let c = s + 1; c < this.children.length; c++) {
30219
30219
  let d = this.children[c];
30220
30220
  if (d.size && d.dom.parentNode == this.contentDOM && !d.emptyChildAt(-1)) {
30221
- a = st(d.dom);
30221
+ a = it(d.dom);
30222
30222
  break;
30223
30223
  }
30224
30224
  n += d.size;
@@ -30256,14 +30256,14 @@ class sa {
30256
30256
  m = b;
30257
30257
  }
30258
30258
  let s = this.domFromPos(t, t ? -1 : 1), o = n == t ? s : this.domFromPos(n, n ? -1 : 1), u = r.root.getSelection(), c = r.domSelectionRange(), d = !1;
30259
- if ((Ut || ht) && t == n) {
30259
+ if ((Ut || ft) && t == n) {
30260
30260
  let { node: f, offset: m } = s;
30261
30261
  if (f.nodeType == 3) {
30262
30262
  if (d = !!(m && f.nodeValue[m - 1] == `
30263
30263
  `), d && m == f.nodeValue.length)
30264
30264
  for (let g = f, b; g; g = g.parentNode) {
30265
30265
  if (b = g.nextSibling) {
30266
- b.nodeName == "BR" && (s = o = { node: b.parentNode, offset: st(b) + 1 });
30266
+ b.nodeName == "BR" && (s = o = { node: b.parentNode, offset: it(b) + 1 });
30267
30267
  break;
30268
30268
  }
30269
30269
  let y = g.pmViewDesc;
@@ -30279,7 +30279,7 @@ class sa {
30279
30279
  let f = c.focusNode.childNodes[c.focusOffset];
30280
30280
  f && f.contentEditable == "false" && (l = !0);
30281
30281
  }
30282
- if (!(l || d && ht) && Tr(s.node, s.offset, c.anchorNode, c.anchorOffset) && Tr(o.node, o.offset, c.focusNode, c.focusOffset))
30282
+ if (!(l || d && ft) && Tr(s.node, s.offset, c.anchorNode, c.anchorOffset) && Tr(o.node, o.offset, c.focusNode, c.focusOffset))
30283
30283
  return;
30284
30284
  let h = !1;
30285
30285
  if ((u.extend || t == n) && !(d && Ut)) {
@@ -30885,7 +30885,7 @@ class zx {
30885
30885
  for (; t instanceof Cr; )
30886
30886
  n = t, t = n.children[n.children.length - 1];
30887
30887
  (!t || // Empty textblock
30888
- !(t instanceof wi) || /\n$/.test(t.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(t.node.text)) && ((ht || ut) && t && t.dom.contentEditable == "false" && this.addHackNode("IMG", n), this.addHackNode("BR", this.top));
30888
+ !(t instanceof wi) || /\n$/.test(t.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(t.node.text)) && ((ft || ot) && t && t.dom.contentEditable == "false" && this.addHackNode("IMG", n), this.addHackNode("BR", this.top));
30889
30889
  }
30890
30890
  addHackNode(t, n) {
30891
30891
  if (n == this.top && this.index < n.children.length && n.children[this.index].matchesHack(t))
@@ -31061,7 +31061,7 @@ function sm(e) {
31061
31061
  function pn(e, t = !1) {
31062
31062
  let n = e.state.selection;
31063
31063
  if (om(e, n), !!sm(e)) {
31064
- if (!t && e.input.mouseDown && e.input.mouseDown.allowDefault && ut) {
31064
+ if (!t && e.input.mouseDown && e.input.mouseDown.allowDefault && ot) {
31065
31065
  let r = e.domSelectionRange(), l = e.domObserver.currentSelection;
31066
31066
  if (r.anchorNode && l.anchorNode && Tr(r.anchorNode, r.anchorOffset, l.anchorNode, l.anchorOffset)) {
31067
31067
  e.input.mouseDown.delayedSelectionSync = !0, e.domObserver.setCurSelection();
@@ -31077,10 +31077,10 @@ function pn(e, t = !1) {
31077
31077
  e.domObserver.setCurSelection(), e.domObserver.connectSelection();
31078
31078
  }
31079
31079
  }
31080
- const hf = ht || ut && G0 < 63;
31080
+ const hf = ft || ot && G0 < 63;
31081
31081
  function pf(e, t) {
31082
31082
  let { node: n, offset: r } = e.docView.domFromPos(t, 0), l = r < n.childNodes.length ? n.childNodes[r] : null, a = r ? n.childNodes[r - 1] : null;
31083
- if (ht && l && l.contentEditable == "false")
31083
+ if (ft && l && l.contentEditable == "false")
31084
31084
  return Rs(l);
31085
31085
  if ((!l || l.contentEditable == "false") && (!a || a.contentEditable == "false")) {
31086
31086
  if (l)
@@ -31090,7 +31090,7 @@ function pf(e, t) {
31090
31090
  }
31091
31091
  }
31092
31092
  function Rs(e) {
31093
- return e.contentEditable = "true", ht && e.draggable && (e.draggable = !1, e.wasDraggable = !0), e;
31093
+ return e.contentEditable = "true", ft && e.draggable && (e.draggable = !1, e.wasDraggable = !0), e;
31094
31094
  }
31095
31095
  function mf(e) {
31096
31096
  e.contentEditable = "false", e.wasDraggable && (e.draggable = !0, e.wasDraggable = null);
@@ -31110,7 +31110,7 @@ function Gx(e) {
31110
31110
  if (!t)
31111
31111
  return;
31112
31112
  let n = e.cursorWrapper.dom, r = n.nodeName == "IMG";
31113
- r ? t.collapse(n.parentNode, st(n) + 1) : t.collapse(n, 0), !r && !e.state.selection.visible && At && Bn <= 11 && (n.disabled = !0, n.disabled = !1);
31113
+ r ? t.collapse(n.parentNode, it(n) + 1) : t.collapse(n, 0), !r && !e.state.selection.visible && At && Bn <= 11 && (n.disabled = !0, n.disabled = !1);
31114
31114
  }
31115
31115
  function om(e, t) {
31116
31116
  if (t instanceof ge) {
@@ -31213,7 +31213,7 @@ function Qx(e) {
31213
31213
  {
31214
31214
  let s = n.previousSibling;
31215
31215
  for (; s && Ml(s, -1); )
31216
- l = n.parentNode, a = st(s), s = s.previousSibling;
31216
+ l = n.parentNode, a = it(s), s = s.previousSibling;
31217
31217
  if (s)
31218
31218
  n = s, r = ni(n);
31219
31219
  else {
@@ -31245,7 +31245,7 @@ function Xx(e) {
31245
31245
  {
31246
31246
  let s = n.nextSibling;
31247
31247
  for (; s && Ml(s, 1); )
31248
- a = s.parentNode, i = st(s) + 1, s = s.nextSibling;
31248
+ a = s.parentNode, i = it(s) + 1, s = s.nextSibling;
31249
31249
  if (s)
31250
31250
  n = s, r = 0, l = ni(n);
31251
31251
  else {
@@ -31263,7 +31263,7 @@ function cm(e) {
31263
31263
  }
31264
31264
  function Jx(e, t) {
31265
31265
  for (; e && t == e.childNodes.length && !aa(e); )
31266
- t = st(e) + 1, e = e.parentNode;
31266
+ t = it(e) + 1, e = e.parentNode;
31267
31267
  for (; e && t < e.childNodes.length; ) {
31268
31268
  let n = e.childNodes[t];
31269
31269
  if (n.nodeType == 3)
@@ -31275,7 +31275,7 @@ function Jx(e, t) {
31275
31275
  }
31276
31276
  function Zx(e, t) {
31277
31277
  for (; e && !t && !aa(e); )
31278
- t = st(e), e = e.parentNode;
31278
+ t = it(e), e = e.parentNode;
31279
31279
  for (; e && t; ) {
31280
31280
  let n = e.childNodes[t - 1];
31281
31281
  if (n.nodeType == 3)
@@ -31305,7 +31305,7 @@ function ko(e, t, n) {
31305
31305
  }
31306
31306
  function yf(e, t) {
31307
31307
  let n = e.state.doc.resolve(t);
31308
- if (!(ut || K0) && n.parent.inlineContent) {
31308
+ if (!(ot || K0) && n.parent.inlineContent) {
31309
31309
  let l = e.coordsAtPos(t);
31310
31310
  if (t > n.start()) {
31311
31311
  let a = e.coordsAtPos(t - 1), i = (a.top + a.bottom) / 2;
@@ -31357,7 +31357,7 @@ function Cf(e, t, n) {
31357
31357
  e.domObserver.stop(), t.contentEditable = n, e.domObserver.start();
31358
31358
  }
31359
31359
  function eS(e) {
31360
- if (!ht || e.state.selection.$head.parentOffset > 0)
31360
+ if (!ft || e.state.selection.$head.parentOffset > 0)
31361
31361
  return !1;
31362
31362
  let { focusNode: t, focusOffset: n } = e.domSelectionRange();
31363
31363
  if (t && t.nodeType == 1 && n == 0 && t.firstChild && t.firstChild.contentEditable == "false") {
@@ -31560,7 +31560,7 @@ function iS(e) {
31560
31560
  return n;
31561
31561
  }
31562
31562
  function sS(e) {
31563
- let t = e.querySelectorAll(ut ? "span:not([class]):not([style])" : "span.Apple-converted-space");
31563
+ let t = e.querySelectorAll(ot ? "span:not([class]):not([style])" : "span.Apple-converted-space");
31564
31564
  for (let n = 0; n < t.length; n++) {
31565
31565
  let r = t[n];
31566
31566
  r.childNodes.length == 1 && r.textContent == " " && r.parentNode && r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "), r);
@@ -31597,7 +31597,7 @@ function dS(e) {
31597
31597
  hS(e, r) && !Tu(e, r) && (e.editable || !(r.type in yt)) && n(e, r);
31598
31598
  }, uS[t] ? { passive: !0 } : void 0);
31599
31599
  }
31600
- ht && e.dom.addEventListener("input", () => null), No(e);
31600
+ ft && e.dom.addEventListener("input", () => null), No(e);
31601
31601
  }
31602
31602
  function Ln(e, t) {
31603
31603
  e.input.lastSelectionOrigin = t, e.input.lastSelectionTime = Date.now();
@@ -31635,7 +31635,7 @@ function pS(e, t) {
31635
31635
  }
31636
31636
  yt.keydown = (e, t) => {
31637
31637
  let n = t;
31638
- if (e.input.shiftKey = n.keyCode == 16 || n.shiftKey, !vm(e, n) && (e.input.lastKeyCode = n.keyCode, e.input.lastKeyCodeTime = Date.now(), !(fn && ut && n.keyCode == 13)))
31638
+ if (e.input.shiftKey = n.keyCode == 16 || n.shiftKey, !vm(e, n) && (e.input.lastKeyCode = n.keyCode, e.input.lastKeyCodeTime = Date.now(), !(fn && ot && n.keyCode == 13)))
31639
31639
  if (n.keyCode != 229 && e.domObserver.forceFlush(), Wr && n.keyCode == 13 && !n.ctrlKey && !n.altKey && !n.metaKey) {
31640
31640
  let r = Date.now();
31641
31641
  e.input.lastIOSEnter = r, e.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
@@ -31772,14 +31772,14 @@ class CS {
31772
31772
  return;
31773
31773
  let n = this.pos;
31774
31774
  this.view.state.doc != this.startDoc && (n = this.view.posAtCoords(Ii(t))), this.updateAllowDefault(t), this.allowDefault || !n ? Ln(this.view, "pointer") : vS(this.view, n.pos, n.inside, t, this.selectNode) ? t.preventDefault() : t.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
31775
- ht && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
31775
+ ft && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
31776
31776
  // cursor, but still report that the node is selected
31777
31777
  // when asked through getSelection. You'll then get a
31778
31778
  // situation where clicking at the point where that
31779
31779
  // (hidden) cursor is doesn't change the selection, and
31780
31780
  // thus doesn't get a reaction from ProseMirror. This
31781
31781
  // works around that.
31782
- ut && !this.view.state.selection.visible && Math.min(Math.abs(n.pos - this.view.state.selection.from), Math.abs(n.pos - this.view.state.selection.to)) <= 2) ? (zr(this.view, Ne.near(this.view.state.doc.resolve(n.pos))), t.preventDefault()) : Ln(this.view, "pointer");
31782
+ ot && !this.view.state.selection.visible && Math.min(Math.abs(n.pos - this.view.state.selection.from), Math.abs(n.pos - this.view.state.selection.to)) <= 2) ? (zr(this.view, Ne.near(this.view.state.doc.resolve(n.pos))), t.preventDefault()) : Ln(this.view, "pointer");
31783
31783
  }
31784
31784
  move(t) {
31785
31785
  this.updateAllowDefault(t), Ln(this.view, "pointer"), t.buttons == 0 && this.done();
@@ -31796,14 +31796,14 @@ vt.touchmove = (e) => {
31796
31796
  };
31797
31797
  vt.contextmenu = (e) => xu(e);
31798
31798
  function vm(e, t) {
31799
- return e.composing ? !0 : ht && Math.abs(t.timeStamp - e.input.compositionEndedAt) < 500 ? (e.input.compositionEndedAt = -2e8, !0) : !1;
31799
+ return e.composing ? !0 : ft && Math.abs(t.timeStamp - e.input.compositionEndedAt) < 500 ? (e.input.compositionEndedAt = -2e8, !0) : !1;
31800
31800
  }
31801
31801
  const xS = fn ? 5e3 : -1;
31802
31802
  yt.compositionstart = yt.compositionupdate = (e) => {
31803
31803
  if (!e.composing) {
31804
31804
  e.domObserver.flush();
31805
31805
  let { state: t } = e, n = t.selection.$to;
31806
- if (t.selection instanceof Ee && (t.storedMarks || !n.textOffset && n.parentOffset && n.nodeBefore.marks.some((r) => r.type.spec.inclusive === !1) || ut && K0 && SS(e)))
31806
+ if (t.selection instanceof Ee && (t.storedMarks || !n.textOffset && n.parentOffset && n.nodeBefore.marks.some((r) => r.type.spec.inclusive === !1) || ot && K0 && SS(e)))
31807
31807
  e.markCursor = e.state.storedMarks || n.marks(), ri(e, !0), e.markCursor = null;
31808
31808
  else if (ri(e, !t.selection.empty), Ut && t.selection.empty && n.parentOffset && !n.textOffset && n.nodeBefore.marks.length) {
31809
31809
  let r = e.domSelectionRange();
@@ -31952,7 +31952,7 @@ vt.dragstart = (e, t) => {
31952
31952
  }
31953
31953
  }
31954
31954
  let s = (i || e.state.selection).content(), { dom: o, text: u, slice: c } = Eu(e, s);
31955
- (!n.dataTransfer.files.length || !ut || G0 > 120) && n.dataTransfer.clearData(), n.dataTransfer.setData(Wl ? "Text" : "text/html", o.innerHTML), n.dataTransfer.effectAllowed = "copyMove", Wl || n.dataTransfer.setData("text/plain", u), e.dragging = new Cm(c, xm(e, n), i);
31955
+ (!n.dataTransfer.files.length || !ot || G0 > 120) && n.dataTransfer.clearData(), n.dataTransfer.setData(Wl ? "Text" : "text/html", o.innerHTML), n.dataTransfer.effectAllowed = "copyMove", Wl || n.dataTransfer.setData("text/plain", u), e.dragging = new Cm(c, xm(e, n), i);
31956
31956
  };
31957
31957
  vt.dragend = (e) => {
31958
31958
  let t = e.dragging;
@@ -32015,7 +32015,7 @@ vt.blur = (e, t) => {
32015
32015
  e.focused && (e.domObserver.stop(), e.dom.classList.remove("ProseMirror-focused"), e.domObserver.start(), n.relatedTarget && e.dom.contains(n.relatedTarget) && e.domObserver.currentSelection.clear(), e.focused = !1);
32016
32016
  };
32017
32017
  vt.beforeinput = (e, t) => {
32018
- if (ut && fn && t.inputType == "deleteContentBackward") {
32018
+ if (ot && fn && t.inputType == "deleteContentBackward") {
32019
32019
  e.domObserver.flushSoon();
32020
32020
  let { domChangeCount: r } = e.input;
32021
32021
  setTimeout(() => {
@@ -32183,7 +32183,7 @@ class Ke {
32183
32183
  you must make a copy if you want need to preserve that.
32184
32184
  */
32185
32185
  static create(t, n) {
32186
- return n.length ? ai(n, t, 0, pr) : ft;
32186
+ return n.length ? ai(n, t, 0, pr) : dt;
32187
32187
  }
32188
32188
  /**
32189
32189
  Find all decorations in this set which touch the given range
@@ -32213,7 +32213,7 @@ class Ke {
32213
32213
  document.
32214
32214
  */
32215
32215
  map(t, n, r) {
32216
- return this == ft || t.maps.length == 0 ? this : this.mapInner(t, n, 0, 0, r || pr);
32216
+ return this == dt || t.maps.length == 0 ? this : this.mapInner(t, n, 0, 0, r || pr);
32217
32217
  }
32218
32218
  /**
32219
32219
  @internal
@@ -32224,7 +32224,7 @@ class Ke {
32224
32224
  let o = this.local[s].map(t, r, l);
32225
32225
  o && o.type.valid(n, o) ? (i || (i = [])).push(o) : a.onRemove && a.onRemove(this.local[s].spec);
32226
32226
  }
32227
- return this.children.length ? MS(this.children, i || [], t, n, r, l, a) : i ? new Ke(i.sort(mr), Rr) : ft;
32227
+ return this.children.length ? MS(this.children, i || [], t, n, r, l, a) : i ? new Ke(i.sort(mr), Rr) : dt;
32228
32228
  }
32229
32229
  /**
32230
32230
  Add the given array of decorations to the ones in the set,
@@ -32233,7 +32233,7 @@ class Ke {
32233
32233
  structure.
32234
32234
  */
32235
32235
  add(t, n) {
32236
- return n.length ? this == ft ? Ke.create(t, n) : this.addInner(t, n, 0) : this;
32236
+ return n.length ? this == dt ? Ke.create(t, n) : this.addInner(t, n, 0) : this;
32237
32237
  }
32238
32238
  addInner(t, n, r) {
32239
32239
  let l, a = 0;
@@ -32255,7 +32255,7 @@ class Ke {
32255
32255
  the ones in the given array.
32256
32256
  */
32257
32257
  remove(t) {
32258
- return t.length == 0 || this == ft ? this : this.removeInner(t, 0);
32258
+ return t.length == 0 || this == dt ? this : this.removeInner(t, 0);
32259
32259
  }
32260
32260
  removeInner(t, n) {
32261
32261
  let r = this.children, l = this.local;
@@ -32267,7 +32267,7 @@ class Ke {
32267
32267
  continue;
32268
32268
  r == this.children && (r = this.children.slice());
32269
32269
  let u = r[a + 2].removeInner(i, s + 1);
32270
- u != ft ? r[a + 2] = u : (r.splice(a, 3), a -= 3);
32270
+ u != dt ? r[a + 2] = u : (r.splice(a, 3), a -= 3);
32271
32271
  }
32272
32272
  if (l.length) {
32273
32273
  for (let a = 0, i; a < t.length; a++)
@@ -32275,10 +32275,10 @@ class Ke {
32275
32275
  for (let s = 0; s < l.length; s++)
32276
32276
  l[s].eq(i, n) && (l == this.local && (l = this.local.slice()), l.splice(s--, 1));
32277
32277
  }
32278
- return r == this.children && l == this.local ? this : l.length || r.length ? new Ke(l, r) : ft;
32278
+ return r == this.children && l == this.local ? this : l.length || r.length ? new Ke(l, r) : dt;
32279
32279
  }
32280
32280
  forChild(t, n) {
32281
- if (this == ft)
32281
+ if (this == dt)
32282
32282
  return this;
32283
32283
  if (n.isLeaf)
32284
32284
  return Ke.empty;
@@ -32300,7 +32300,7 @@ class Ke {
32300
32300
  let s = new Ke(l.sort(mr), Rr);
32301
32301
  return r ? new On([s, r]) : s;
32302
32302
  }
32303
- return r || ft;
32303
+ return r || dt;
32304
32304
  }
32305
32305
  /**
32306
32306
  @internal
@@ -32328,7 +32328,7 @@ class Ke {
32328
32328
  @internal
32329
32329
  */
32330
32330
  localsInner(t) {
32331
- if (this == ft)
32331
+ if (this == dt)
32332
32332
  return Rr;
32333
32333
  if (t.inlineContent || !this.local.some(Hn.is))
32334
32334
  return this.local;
@@ -32343,7 +32343,7 @@ class Ke {
32343
32343
  }
32344
32344
  Ke.empty = new Ke([], []);
32345
32345
  Ke.removeOverlap = ku;
32346
- const ft = Ke.empty;
32346
+ const dt = Ke.empty;
32347
32347
  class On {
32348
32348
  constructor(t) {
32349
32349
  this.members = t;
@@ -32358,7 +32358,7 @@ class On {
32358
32358
  let r = [];
32359
32359
  for (let l = 0; l < this.members.length; l++) {
32360
32360
  let a = this.members[l].forChild(t, n);
32361
- a != ft && (a instanceof On ? r = r.concat(a.members) : r.push(a));
32361
+ a != dt && (a instanceof On ? r = r.concat(a.members) : r.push(a));
32362
32362
  }
32363
32363
  return On.from(r);
32364
32364
  }
@@ -32390,7 +32390,7 @@ class On {
32390
32390
  static from(t) {
32391
32391
  switch (t.length) {
32392
32392
  case 0:
32393
- return ft;
32393
+ return dt;
32394
32394
  case 1:
32395
32395
  return t[0];
32396
32396
  default:
@@ -32433,7 +32433,7 @@ function MS(e, t, n, r, l, a, i) {
32433
32433
  let h = n.map(e[u + 1] + a, -1), f = h - l, { index: m, offset: g } = r.content.findIndex(d), b = r.maybeChild(m);
32434
32434
  if (b && g == d && g + b.nodeSize == f) {
32435
32435
  let y = s[u + 2].mapInner(n, b, c + 1, e[u] + a + 1, i);
32436
- y != ft ? (s[u] = d, s[u + 1] = f, s[u + 2] = y) : (s[u + 1] = -2, o = !0);
32436
+ y != dt ? (s[u] = d, s[u + 1] = f, s[u + 2] = y) : (s[u + 1] = -2, o = !0);
32437
32437
  } else
32438
32438
  o = !0;
32439
32439
  }
@@ -32495,13 +32495,13 @@ function ai(e, t, n, r) {
32495
32495
  if (u) {
32496
32496
  a = !0;
32497
32497
  let c = ai(u, s, n + o + 1, r);
32498
- c != ft && l.push(o, o + s.nodeSize, c);
32498
+ c != dt && l.push(o, o + s.nodeSize, c);
32499
32499
  }
32500
32500
  });
32501
32501
  let i = Sm(a ? Am(e) : e, -n).sort(mr);
32502
32502
  for (let s = 0; s < i.length; s++)
32503
32503
  i[s].type.valid(t, i[s]) || (r.onRemove && r.onRemove(i[s].spec), i.splice(s--, 1));
32504
- return i.length || l.length ? new Ke(i, l) : ft;
32504
+ return i.length || l.length ? new Ke(i, l) : dt;
32505
32505
  }
32506
32506
  function mr(e, t) {
32507
32507
  return e.from - t.from || e.to - t.to;
@@ -32533,7 +32533,7 @@ function Ls(e) {
32533
32533
  let t = [];
32534
32534
  return e.someProp("decorations", (n) => {
32535
32535
  let r = n(e.state);
32536
- r && r != ft && t.push(r);
32536
+ r && r != dt && t.push(r);
32537
32537
  }), e.cursorWrapper && t.push(Ke.create(e.state.doc, [e.cursorWrapper.deco])), On.from(t);
32538
32538
  }
32539
32539
  const DS = {
@@ -32563,7 +32563,7 @@ class BS {
32563
32563
  this.view = t, this.handleDOMChange = n, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new PS(), this.onCharData = null, this.suppressingSelectionUpdates = !1, this.lastChangedTextNode = null, this.observer = window.MutationObserver && new window.MutationObserver((r) => {
32564
32564
  for (let l = 0; l < r.length; l++)
32565
32565
  this.queue.push(r[l]);
32566
- At && Bn <= 11 && r.some((l) => l.type == "childList" && l.removedNodes.length || l.type == "characterData" && l.oldValue.length > l.target.nodeValue.length) ? this.flushSoon() : ht && t.composing && r.some((l) => l.type == "childList" && l.target.nodeName == "TR") ? (t.input.badSafariComposition = !0, this.flushSoon()) : this.flush();
32566
+ At && Bn <= 11 && r.some((l) => l.type == "childList" && l.removedNodes.length || l.type == "characterData" && l.oldValue.length > l.target.nodeValue.length) ? this.flushSoon() : ft && t.composing && r.some((l) => l.type == "childList" && l.target.nodeName == "TR") ? (t.input.badSafariComposition = !0, this.flushSoon()) : this.flush();
32567
32567
  }), LS && (this.onCharData = (r) => {
32568
32568
  this.queue.push({ target: r.target, type: "characterData", oldValue: r.prevValue }), this.flushSoon();
32569
32569
  }), this.onSelectionChange = this.onSelectionChange.bind(this);
@@ -32699,7 +32699,7 @@ class BS {
32699
32699
  let { previousSibling: d, nextSibling: h } = t.addedNodes[c];
32700
32700
  (!d || Array.prototype.indexOf.call(t.addedNodes, d) < 0) && (l = d), (!h || Array.prototype.indexOf.call(t.addedNodes, h) < 0) && (a = h);
32701
32701
  }
32702
- let i = l && l.parentNode == t.target ? st(l) + 1 : 0, s = r.localPosFromDOM(t.target, i, -1), o = a && a.parentNode == t.target ? st(a) : t.target.childNodes.length, u = r.localPosFromDOM(t.target, o, 1);
32702
+ let i = l && l.parentNode == t.target ? it(l) + 1 : 0, s = r.localPosFromDOM(t.target, i, -1), o = a && a.parentNode == t.target ? it(a) : t.target.childNodes.length, u = r.localPosFromDOM(t.target, o, 1);
32703
32703
  return { from: s, to: u };
32704
32704
  } else return t.type == "attributes" ? { from: r.posAtStart - r.border, to: r.posAtEnd + r.border } : (this.lastChangedTextNode = t.target, {
32705
32705
  from: r.posAtStart,
@@ -32767,7 +32767,7 @@ function zS(e, t) {
32767
32767
  }
32768
32768
  function VS(e, t, n) {
32769
32769
  let { node: r, fromOffset: l, toOffset: a, from: i, to: s } = e.docView.parseRange(t, n), o = e.domSelectionRange(), u, c = o.anchorNode;
32770
- if (c && e.dom.contains(c.nodeType == 1 ? c : c.parentNode) && (u = [{ node: c, offset: o.anchorOffset }], Ni(o) || u.push({ node: o.focusNode, offset: o.focusOffset })), ut && e.input.lastKeyCode === 8)
32770
+ if (c && e.dom.contains(c.nodeType == 1 ? c : c.parentNode) && (u = [{ node: c, offset: o.anchorOffset }], Ni(o) || u.push({ node: o.focusNode, offset: o.focusOffset })), ot && e.input.lastKeyCode === 8)
32771
32771
  for (let b = a; b > l; b--) {
32772
32772
  let y = r.childNodes[b - 1], A = y.pmViewDesc;
32773
32773
  if (y.nodeName == "BR" && !A) {
@@ -32799,10 +32799,10 @@ function $S(e) {
32799
32799
  if (t)
32800
32800
  return t.parseRule();
32801
32801
  if (e.nodeName == "BR" && e.parentNode) {
32802
- if (ht && /^(ul|ol)$/i.test(e.parentNode.nodeName)) {
32802
+ if (ft && /^(ul|ol)$/i.test(e.parentNode.nodeName)) {
32803
32803
  let n = document.createElement("div");
32804
32804
  return n.appendChild(document.createElement("li")), { skip: n };
32805
- } else if (e.parentNode.lastChild == e || ht && /^(tr|table)$/i.test(e.parentNode.nodeName))
32805
+ } else if (e.parentNode.lastChild == e || ft && /^(tr|table)$/i.test(e.parentNode.nodeName))
32806
32806
  return { ignore: !0 };
32807
32807
  } else if (e.nodeName == "IMG" && e.getAttribute("mark-placeholder"))
32808
32808
  return { ignore: !0 };
@@ -32814,7 +32814,7 @@ function WS(e, t, n, r, l) {
32814
32814
  if (e.input.compositionPendingChanges = 0, t < 0) {
32815
32815
  let w = e.input.lastSelectionTime > Date.now() - 50 ? e.input.lastSelectionOrigin : null, N = vu(e, w);
32816
32816
  if (N && !e.state.selection.eq(N)) {
32817
- if (ut && fn && e.input.lastKeyCode === 13 && Date.now() - 100 < e.input.lastKeyCodeTime && e.someProp("handleKeyDown", (O) => O(e, rr(13, "Enter"))))
32817
+ if (ot && fn && e.input.lastKeyCode === 13 && Date.now() - 100 < e.input.lastKeyCodeTime && e.someProp("handleKeyDown", (O) => O(e, rr(13, "Enter"))))
32818
32818
  return;
32819
32819
  let S = e.state.tr.setSelection(N);
32820
32820
  w == "pointer" ? S.setMeta("pointer", !0) : w == "key" && S.scrollIntoView(), a && S.setMeta("composition", a), e.dispatch(S);
@@ -32850,10 +32850,10 @@ function WS(e, t, n, r, l) {
32850
32850
  return;
32851
32851
  }
32852
32852
  if (e.state.selection.anchor > m.start && jS(c, m.start, m.endA, g, b) && e.someProp("handleKeyDown", (w) => w(e, rr(8, "Backspace")))) {
32853
- fn && ut && e.domObserver.suppressSelectionUpdates();
32853
+ fn && ot && e.domObserver.suppressSelectionUpdates();
32854
32854
  return;
32855
32855
  }
32856
- ut && m.endB == m.start && (e.input.lastChromeDelete = Date.now()), fn && !A && g.start() != b.start() && b.parentOffset == 0 && g.depth == b.depth && u.sel && u.sel.anchor == u.sel.head && u.sel.head == m.endA && (m.endB -= 2, b = u.doc.resolveNoCache(m.endB - u.from), setTimeout(() => {
32856
+ ot && m.endB == m.start && (e.input.lastChromeDelete = Date.now()), fn && !A && g.start() != b.start() && b.parentOffset == 0 && g.depth == b.depth && u.sel && u.sel.anchor == u.sel.head && u.sel.head == m.endA && (m.endB -= 2, b = u.doc.resolveNoCache(m.endB - u.from), setTimeout(() => {
32857
32857
  e.someProp("handleKeyDown", function(w) {
32858
32858
  return w(e, rr(13, "Enter"));
32859
32859
  });
@@ -32862,7 +32862,7 @@ function WS(e, t, n, r, l) {
32862
32862
  let N = w || e.state.tr.replace(k, D, u.doc.slice(m.start - u.from, m.endB - u.from));
32863
32863
  if (u.sel) {
32864
32864
  let S = If(e, N.doc, u.sel);
32865
- S && !(ut && e.composing && S.empty && (m.start != m.endB || e.input.lastChromeDelete < Date.now() - 100) && (S.head == k || S.head == N.mapping.map(D) - 1) || At && S.empty && S.head == k) && N.setSelection(S);
32865
+ S && !(ot && e.composing && S.empty && (m.start != m.endB || e.input.lastChromeDelete < Date.now() - 100) && (S.head == k || S.head == N.mapping.map(D) - 1) || At && S.empty && S.head == k) && N.setSelection(S);
32866
32866
  }
32867
32867
  return a && N.setMeta("composition", a), N.scrollIntoView();
32868
32868
  }, C;
@@ -33035,9 +33035,9 @@ class Nm {
33035
33035
  let h = c == "preserve" && i && this.dom.style.overflowAnchor == null && kx(this);
33036
33036
  if (i) {
33037
33037
  this.domObserver.stop();
33038
- let f = d && (At || ut) && !this.composing && !l.selection.empty && !t.selection.empty && KS(l.selection, t.selection);
33038
+ let f = d && (At || ot) && !this.composing && !l.selection.empty && !t.selection.empty && KS(l.selection, t.selection);
33039
33039
  if (d) {
33040
- let m = ut ? this.trackWrites = this.domSelectionRange().focusNode : null;
33040
+ let m = ot ? this.trackWrites = this.domSelectionRange().focusNode : null;
33041
33041
  this.composing && (this.input.compositionNode = kS(this)), (a || !this.docView.update(t.doc, u, o, this)) && (this.docView.updateOuterDeco(u), this.docView.destroy(), this.docView = df(t.doc, u, o, this.dom, this)), m && (!this.trackWrites || !this.dom.contains(this.trackWrites)) && (f = !0);
33042
33042
  }
33043
33043
  f || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && Kx(this)) ? pn(this, f) : (om(this, t.selection), this.domObserver.setCurSelection()), this.domObserver.start();
@@ -33281,7 +33281,7 @@ class Nm {
33281
33281
  */
33282
33282
  domSelectionRange() {
33283
33283
  let t = this.domSelection();
33284
- return t ? ht && this.root.nodeType === 11 && Ex(this.dom.ownerDocument) == this.dom && HS(this, t) || t : { focusNode: null, focusOffset: 0, anchorNode: null, anchorOffset: 0 };
33284
+ return t ? ft && this.root.nodeType === 11 && Ex(this.dom.ownerDocument) == this.dom && HS(this, t) || t : { focusNode: null, focusOffset: 0, anchorNode: null, anchorOffset: 0 };
33285
33285
  }
33286
33286
  /**
33287
33287
  @internal
@@ -33418,10 +33418,10 @@ var Un = {
33418
33418
  221: "}",
33419
33419
  222: '"'
33420
33420
  }, XS = typeof navigator < "u" && /Mac/.test(navigator.platform), JS = typeof navigator < "u" && /MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);
33421
- for (var ot = 0; ot < 10; ot++) Un[48 + ot] = Un[96 + ot] = String(ot);
33422
- for (var ot = 1; ot <= 24; ot++) Un[ot + 111] = "F" + ot;
33423
- for (var ot = 65; ot <= 90; ot++)
33424
- Un[ot] = String.fromCharCode(ot + 32), ii[ot] = String.fromCharCode(ot);
33421
+ for (var st = 0; st < 10; st++) Un[48 + st] = Un[96 + st] = String(st);
33422
+ for (var st = 1; st <= 24; st++) Un[st + 111] = "F" + st;
33423
+ for (var st = 65; st <= 90; st++)
33424
+ Un[st] = String.fromCharCode(st + 32), ii[st] = String.fromCharCode(st);
33425
33425
  for (var Bs in Un) ii.hasOwnProperty(Bs) || (ii[Bs] = Un[Bs]);
33426
33426
  function ZS(e) {
33427
33427
  var t = XS && e.metaKey && e.shiftKey && !e.ctrlKey && !e.altKey || JS && e.shiftKey && e.key && e.key.length == 1 || e.key == "Unidentified", n = !t && e.key || (e.shiftKey ? ii : Un)[e.keyCode] || e.key || "Unidentified";
@@ -34783,7 +34783,7 @@ class Br {
34783
34783
  });
34784
34784
  }
34785
34785
  }
34786
- class pt {
34786
+ class ht {
34787
34787
  constructor(t = {}) {
34788
34788
  this.type = "extension", this.name = "extension", this.parent = null, this.child = null, this.config = {
34789
34789
  name: this.name,
@@ -34799,7 +34799,7 @@ class pt {
34799
34799
  })) || {};
34800
34800
  }
34801
34801
  static create(t = {}) {
34802
- return new pt(t);
34802
+ return new ht(t);
34803
34803
  }
34804
34804
  configure(t = {}) {
34805
34805
  const n = this.extend({
@@ -34809,7 +34809,7 @@ class pt {
34809
34809
  return n.name = this.name, n.parent = this.parent, n;
34810
34810
  }
34811
34811
  extend(t = {}) {
34812
- const n = new pt({ ...this.config, ...t });
34812
+ const n = new ht({ ...this.config, ...t });
34813
34813
  return n.parent = this, this.child = n, n.name = t.name ? t.name : n.parent.name, t.defaultOptions && Object.keys(t.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`), n.options = Ie(ce(n, "addOptions", {
34814
34814
  name: n.name
34815
34815
  })), n.storage = Ie(ce(n, "addStorage", {
@@ -34841,7 +34841,7 @@ function $m(e, t, n) {
34841
34841
  function qm(e) {
34842
34842
  return Object.fromEntries(Object.entries(e.nodes).filter(([, t]) => t.spec.toText).map(([t, n]) => [t, n.spec.toText]));
34843
34843
  }
34844
- const U5 = pt.create({
34844
+ const U5 = ht.create({
34845
34845
  name: "clipboardTextSerializer",
34846
34846
  addOptions() {
34847
34847
  return {
@@ -35755,14 +35755,14 @@ var r8 = /* @__PURE__ */ Object.freeze({
35755
35755
  wrapIn: t8,
35756
35756
  wrapInList: n8
35757
35757
  });
35758
- const l8 = pt.create({
35758
+ const l8 = ht.create({
35759
35759
  name: "commands",
35760
35760
  addCommands() {
35761
35761
  return {
35762
35762
  ...r8
35763
35763
  };
35764
35764
  }
35765
- }), a8 = pt.create({
35765
+ }), a8 = ht.create({
35766
35766
  name: "drop",
35767
35767
  addProseMirrorPlugins() {
35768
35768
  return [
@@ -35781,7 +35781,7 @@ const l8 = pt.create({
35781
35781
  })
35782
35782
  ];
35783
35783
  }
35784
- }), i8 = pt.create({
35784
+ }), i8 = ht.create({
35785
35785
  name: "editable",
35786
35786
  addProseMirrorPlugins() {
35787
35787
  return [
@@ -35793,7 +35793,7 @@ const l8 = pt.create({
35793
35793
  })
35794
35794
  ];
35795
35795
  }
35796
- }), s8 = new Wt("focusEvents"), o8 = pt.create({
35796
+ }), s8 = new Wt("focusEvents"), o8 = ht.create({
35797
35797
  name: "focusEvents",
35798
35798
  addProseMirrorPlugins() {
35799
35799
  const { editor: e } = this;
@@ -35817,7 +35817,7 @@ const l8 = pt.create({
35817
35817
  })
35818
35818
  ];
35819
35819
  }
35820
- }), u8 = pt.create({
35820
+ }), u8 = ht.create({
35821
35821
  name: "keymap",
35822
35822
  addKeyboardShortcuts() {
35823
35823
  const e = () => this.editor.commands.first(({ commands: i }) => [
@@ -35895,7 +35895,7 @@ const l8 = pt.create({
35895
35895
  })
35896
35896
  ];
35897
35897
  }
35898
- }), c8 = pt.create({
35898
+ }), c8 = ht.create({
35899
35899
  name: "paste",
35900
35900
  addProseMirrorPlugins() {
35901
35901
  return [
@@ -35913,7 +35913,7 @@ const l8 = pt.create({
35913
35913
  })
35914
35914
  ];
35915
35915
  }
35916
- }), d8 = pt.create({
35916
+ }), d8 = ht.create({
35917
35917
  name: "tabindex",
35918
35918
  addProseMirrorPlugins() {
35919
35919
  return [
@@ -37628,7 +37628,7 @@ class nA {
37628
37628
  this.editorView.dom.contains(t.relatedTarget) || this.setCursor(null);
37629
37629
  }
37630
37630
  }
37631
- const rA = pt.create({
37631
+ const rA = ht.create({
37632
37632
  name: "dropCursor",
37633
37633
  addOptions() {
37634
37634
  return {
@@ -37839,7 +37839,7 @@ function cA(e) {
37839
37839
  let t = document.createElement("div");
37840
37840
  return t.className = "ProseMirror-gapcursor", Ke.create(e.doc, [Rt.widget(e.selection.head, t, { key: "gapcursor" })]);
37841
37841
  }
37842
- const dA = pt.create({
37842
+ const dA = ht.create({
37843
37843
  name: "gapCursor",
37844
37844
  addProseMirrorPlugins() {
37845
37845
  return [
@@ -38293,7 +38293,7 @@ function eb(e, t) {
38293
38293
  return !0;
38294
38294
  };
38295
38295
  }
38296
- const tb = eb(!1, !0), nb = eb(!0, !0), xA = pt.create({
38296
+ const tb = eb(!1, !0), nb = eb(!0, !0), xA = ht.create({
38297
38297
  name: "history",
38298
38298
  addOptions() {
38299
38299
  return {
@@ -38620,13 +38620,13 @@ const tb = eb(!1, !0), nb = eb(!0, !0), xA = pt.create({
38620
38620
  }), BA = Nt.create({
38621
38621
  name: "text",
38622
38622
  group: "inline"
38623
- }), FA = pt.create({
38623
+ }), FA = ht.create({
38624
38624
  name: "starterKit",
38625
38625
  addExtensions() {
38626
38626
  const e = [];
38627
38627
  return this.options.bold !== !1 && e.push(W8.configure(this.options.bold)), this.options.blockquote !== !1 && e.push(U8.configure(this.options.blockquote)), this.options.bulletList !== !1 && e.push(j8.configure(this.options.bulletList)), this.options.code !== !1 && e.push(Q8.configure(this.options.code)), this.options.codeBlock !== !1 && e.push(Z8.configure(this.options.codeBlock)), this.options.document !== !1 && e.push(eA.configure(this.options.document)), this.options.dropcursor !== !1 && e.push(rA.configure(this.options.dropcursor)), this.options.gapcursor !== !1 && e.push(dA.configure(this.options.gapcursor)), this.options.hardBreak !== !1 && e.push(fA.configure(this.options.hardBreak)), this.options.heading !== !1 && e.push(hA.configure(this.options.heading)), this.options.history !== !1 && e.push(xA.configure(this.options.history)), this.options.horizontalRule !== !1 && e.push(SA.configure(this.options.horizontalRule)), this.options.italic !== !1 && e.push(IA.configure(this.options.italic)), this.options.listItem !== !1 && e.push(_A.configure(this.options.listItem)), this.options.orderedList !== !1 && e.push(MA.configure(this.options.orderedList)), this.options.paragraph !== !1 && e.push(RA.configure(this.options.paragraph)), this.options.strike !== !1 && e.push(PA.configure(this.options.strike)), this.options.text !== !1 && e.push(BA.configure(this.options.text)), e;
38628
38628
  }
38629
- }), HA = pt.create({
38629
+ }), HA = ht.create({
38630
38630
  name: "placeholder",
38631
38631
  addOptions() {
38632
38632
  return {
@@ -40784,7 +40784,7 @@ const Ew = (e) => {
40784
40784
  scrollContainerRef: Bu,
40785
40785
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
40786
40786
  autoCollapseOnScroll: Fu
40787
- } = e, [jt, vn] = G({}), [j, le] = G({}), [pe, Te] = G(u ?? []), [Le, It] = G({}), [Lt, ct] = G(cN), [yn, En] = G(() => /* @__PURE__ */ new Set()), [Xe, sn] = G(() => /* @__PURE__ */ new Set()), [Ct, Eb] = G(() => /* @__PURE__ */ new Set()), [Hu, ll] = G({}), [Kn, Tb] = G(null), [Cb, Uu] = G(null), Fi = te(null);
40787
+ } = e, [jt, vn] = G({}), [j, le] = G({}), [pe, Te] = G(u ?? []), [Le, It] = G({}), [Lt, ut] = G(cN), [yn, En] = G(() => /* @__PURE__ */ new Set()), [Xe, sn] = G(() => /* @__PURE__ */ new Set()), [Ct, Eb] = G(() => /* @__PURE__ */ new Set()), [Hu, ll] = G({}), [Kn, Tb] = G(null), [Cb, Uu] = G(null), Fi = te(null);
40788
40788
  Ue(() => {
40789
40789
  const H = Fi.current?.ownerDocument ?? document, ne = H.createElement("div");
40790
40790
  return ne.className = "rte-message-host", ne.style.cssText = "position:fixed;inset:0;z-index:2000000000;pointer-events:none;", H.body.appendChild(ne), Uu(ne), () => {
@@ -40843,7 +40843,7 @@ const Ew = (e) => {
40843
40843
  qA(i, jt, vn, xt, j, le);
40844
40844
  const sl = te(/* @__PURE__ */ new Map()), Qu = te(""), Xu = (t.find((H) => H.type === "tag")?.text || "") + "||" + t.filter((H) => H.key && H.type !== "report-module" && H.type !== "markdown-module").map((H) => `${H.type}:${H.key}`).join("|");
40845
40845
  Qu.current !== Xu && (Qu.current = Xu, sl.current = /* @__PURE__ */ new Map());
40846
- const [at, ol] = G(null), [Gt, er] = G(!1);
40846
+ const [gt, ol] = G(null), [Gt, er] = G(!1);
40847
40847
  be(() => {
40848
40848
  fe !== void 0 && ol(fe);
40849
40849
  }, [fe]), be(() => {
@@ -40881,7 +40881,7 @@ const Ew = (e) => {
40881
40881
  (re) => re.key === ae && re.type === "markdown-module"
40882
40882
  ) && vn((re) => {
40883
40883
  const me = { ...re, [H]: ne };
40884
- return Object.keys(me).filter((ke) => ke.startsWith(`${ae}__module_`)).every((ke) => rc(me[ke])) && (ct((ke) => {
40884
+ return Object.keys(me).filter((ke) => ke.startsWith(`${ae}__module_`)).every((ke) => rc(me[ke])) && (ut((ke) => {
40885
40885
  if (!ke.markdownModules[ae]) return ke;
40886
40886
  const Pe = { ...ke.markdownModules };
40887
40887
  return delete Pe[ae], { ...ke, markdownModules: Pe };
@@ -40891,7 +40891,7 @@ const Ew = (e) => {
40891
40891
  }
40892
40892
  if (typeof ne == "string" && ne.trim() === "") {
40893
40893
  const ae = xt.find((se) => se.key === H);
40894
- ae?.type === "report-url" ? (ct((se) => {
40894
+ ae?.type === "report-url" ? (ut((se) => {
40895
40895
  if (!se.reportModules[H]) return se;
40896
40896
  const re = { ...se.reportModules };
40897
40897
  return delete re[H], { ...se, reportModules: re };
@@ -40899,7 +40899,7 @@ const Ew = (e) => {
40899
40899
  if (!(H in se)) return se;
40900
40900
  const re = { ...se };
40901
40901
  return delete re[H], re;
40902
- })) : (ae?.type === "markdown" || ae?.type === "markdown-name") && ct((se) => {
40902
+ })) : (ae?.type === "markdown" || ae?.type === "markdown-name") && ut((se) => {
40903
40903
  if (!se.markdownModules[H]) return se;
40904
40904
  const re = { ...se.markdownModules };
40905
40905
  return delete re[H], { ...se, markdownModules: re };
@@ -40926,8 +40926,8 @@ const Ew = (e) => {
40926
40926
  if (Ce === H) continue;
40927
40927
  const Pe = Ce.match(/^(.+)_(\d+)$/);
40928
40928
  if (Pe && Pe[1] === ae) {
40929
- const dt = parseInt(Pe[2], 10);
40930
- dt > re ? me[`${ae}_${dt - 1}`] = ke : me[Ce] = ke;
40929
+ const ct = parseInt(Pe[2], 10);
40930
+ ct > re ? me[`${ae}_${ct - 1}`] = ke : me[Ce] = ke;
40931
40931
  } else
40932
40932
  me[Ce] = ke;
40933
40933
  }
@@ -40960,7 +40960,7 @@ const Ew = (e) => {
40960
40960
  ), Hb = $(
40961
40961
  (H, ne) => {
40962
40962
  ca(H, ne).then((oe) => {
40963
- oe.status === "success" && ct((ae) => ({
40963
+ oe.status === "success" && ut((ae) => ({
40964
40964
  ...ae,
40965
40965
  reportModules: { ...ae.reportModules, [H]: oe.modules }
40966
40966
  }));
@@ -40977,7 +40977,7 @@ const Ew = (e) => {
40977
40977
  const oe = da(H, ne, "report-url").then((se) => {
40978
40978
  se.status === "success" && ll((re) => ({ ...re, [H]: se.name }));
40979
40979
  }), ae = ca(H, ne).then((se) => {
40980
- se.status === "success" ? (ct((re) => ({
40980
+ se.status === "success" ? (ut((re) => ({
40981
40981
  ...re,
40982
40982
  reportModules: { ...re.reportModules, [H]: se.modules }
40983
40983
  })), vn((re) => {
@@ -41043,13 +41043,13 @@ const Ew = (e) => {
41043
41043
  });
41044
41044
  try {
41045
41045
  const re = await oe(H, ne), me = Date.now() - se;
41046
- me < 500 && await new Promise((Ce) => setTimeout(Ce, 500 - me)), re && (ct((Ce) => ({
41046
+ me < 500 && await new Promise((Ce) => setTimeout(Ce, 500 - me)), re && (ut((Ce) => ({
41047
41047
  ...Ce,
41048
41048
  markdownModules: { ...Ce.markdownModules, [H]: re.modules }
41049
41049
  })), vn((Ce) => {
41050
41050
  const ke = { ...Ce };
41051
- return re.modules.forEach((Pe, dt) => {
41052
- ke[`${H}__module_${dt}`] = Pe.content;
41051
+ return re.modules.forEach((Pe, ct) => {
41052
+ ke[`${H}__module_${ct}`] = Pe.content;
41053
41053
  }), ke;
41054
41054
  }));
41055
41055
  } finally {
@@ -41079,14 +41079,14 @@ const Ew = (e) => {
41079
41079
  }, [pe, o]);
41080
41080
  const Qi = $(async () => {
41081
41081
  if (r || l || Xe.size > 0 || Ct.size > 0) return;
41082
- const H = Wi ? 1 : at ? 2 : Gt ? 3 : void 0, ne = H === void 0 ? void 0 : {
41083
- ...at ? { skillCode: at.id, skillName: at.title } : {},
41082
+ const H = Wi ? 1 : gt ? 2 : Gt ? 3 : void 0, ne = H === void 0 ? void 0 : {
41083
+ ...gt ? { skillCode: gt.id, skillName: gt.title } : {},
41084
41084
  generateImage: H
41085
41085
  };
41086
41086
  if (t.length === 0) {
41087
41087
  const re = Jn.trim();
41088
41088
  if (!re && !pe.length) return;
41089
- const me = at ? `${at.title} ${re}` : re;
41089
+ const me = re;
41090
41090
  if (pe.length) {
41091
41091
  const Ce = new FormData();
41092
41092
  me && Ce.append("prompt", me), pe.forEach((ke) => Ce.append("files", ke)), n(Ce, me, ne);
@@ -41109,7 +41109,7 @@ const Ew = (e) => {
41109
41109
  }, [
41110
41110
  t.length,
41111
41111
  Jn,
41112
- at,
41112
+ gt,
41113
41113
  Wi,
41114
41114
  Gt,
41115
41115
  xt,
@@ -41139,7 +41139,7 @@ const Ew = (e) => {
41139
41139
  return ju(me), Gu(Math.max(0, Math.round(re.top - se.top))), me > 0;
41140
41140
  }, []);
41141
41141
  Ue(() => {
41142
- if (!at && !Gt) {
41142
+ if (!gt && !Gt) {
41143
41143
  ju(0), Gu(0);
41144
41144
  return;
41145
41145
  }
@@ -41157,9 +41157,9 @@ const Ew = (e) => {
41157
41157
  return re.observe(se), () => {
41158
41158
  H = !0, ne && cancelAnimationFrame(ne), re.disconnect();
41159
41159
  };
41160
- }, [at, Gt, t.length, Xi]), be(() => {
41161
- !at && !Gt || t.length > 0 || al.current?.focus();
41162
- }, [at, Gt, t.length]);
41160
+ }, [gt, Gt, t.length, Xi]), be(() => {
41161
+ !gt && !Gt || t.length > 0 || al.current?.focus();
41162
+ }, [gt, Gt, t.length]);
41163
41163
  const [Wb, lc] = G(!1);
41164
41164
  be(() => {
41165
41165
  const H = (ne) => {
@@ -41248,7 +41248,7 @@ const Ew = (e) => {
41248
41248
  let Pe = 0;
41249
41249
  for (const pa of Array.from(re.children))
41250
41250
  pa !== H && (Pe += pa.offsetHeight);
41251
- const dt = getComputedStyle(re), Ji = parseFloat(dt.paddingTop) + parseFloat(dt.paddingBottom);
41251
+ const ct = getComputedStyle(re), Ji = parseFloat(ct.paddingTop) + parseFloat(ct.paddingBottom);
41252
41252
  me = Math.max(0, re.clientHeight - Pe - Ji);
41253
41253
  }
41254
41254
  H.style.maxHeight = oe;
@@ -41261,10 +41261,10 @@ const Ew = (e) => {
41261
41261
  const re = Array.from(se.getClientRects()).filter((me) => me.height > 0);
41262
41262
  if (re.length > 0) {
41263
41263
  const me = Math.min(...re.map((tr) => tr.top)), Ce = parseFloat(getComputedStyle(H).lineHeight) || 34, ke = Math.max(Ce, 1), Pe = me + ke * 0.5;
41264
- let dt = 0;
41264
+ let ct = 0;
41265
41265
  for (const tr of re)
41266
- tr.top < Pe && (dt = Math.max(dt, tr.bottom));
41267
- const Ji = dt > 0 ? Math.ceil(dt - oe.top) : 0, pa = getComputedStyle(H), Qb = parseFloat(pa.paddingTop) || 0, Xb = Math.ceil(Qb + ke), Zi = Math.max(Ji, Xb);
41266
+ tr.top < Pe && (ct = Math.max(ct, tr.bottom));
41267
+ const Ji = ct > 0 ? Math.ceil(ct - oe.top) : 0, pa = getComputedStyle(H), Qb = parseFloat(pa.paddingTop) || 0, Xb = Math.ceil(Qb + ke), Zi = Math.max(Ji, Xb);
41268
41268
  Zi > 0 && Nb((tr) => tr === Zi ? tr : Zi);
41269
41269
  }
41270
41270
  } catch {
@@ -41368,11 +41368,11 @@ const Ew = (e) => {
41368
41368
  const ae = [];
41369
41369
  let se = !1;
41370
41370
  for (const Pe of Array.from(ne)) {
41371
- const dt = (Pe.name || "").split(".").pop()?.toLowerCase() || "";
41372
- hc.has(dt) ? ae.push(Pe) : se = !0;
41371
+ const ct = (Pe.name || "").split(".").pop()?.toLowerCase() || "";
41372
+ hc.has(ct) ? ae.push(Pe) : se = !0;
41373
41373
  }
41374
41374
  if (se && Hi.current?.error("粘贴文件中含不支持的类型,已自动过滤"), ae.length === 0) return;
41375
- const re = 50 * 1024 * 1024, me = pe.reduce((Pe, dt) => Pe + dt.size, 0), Ce = [];
41375
+ const re = 50 * 1024 * 1024, me = pe.reduce((Pe, ct) => Pe + ct.size, 0), Ce = [];
41376
41376
  let ke = me;
41377
41377
  for (const Pe of ae) {
41378
41378
  if (ke + Pe.size > re) {
@@ -41402,11 +41402,11 @@ const Ew = (e) => {
41402
41402
  "div",
41403
41403
  {
41404
41404
  ref: Qn,
41405
- className: `rte-editor rte-editor-default${at || Gt ? " rte-editor-default-with-skill" : ""}`,
41405
+ className: `rte-editor rte-editor-default${gt || Gt ? " rte-editor-default-with-skill" : ""}`,
41406
41406
  style: oc,
41407
41407
  onClick: uc,
41408
41408
  children: [
41409
- (at || Gt) && /* @__PURE__ */ v("span", { ref: zi, className: "rte-skill-inline-tag-wrap", contentEditable: !1, children: at ? /* @__PURE__ */ v(Po, { title: at.title, onClose: () => Ju(null) }) : /* @__PURE__ */ v(Po, { title: "AI生图", exitTip: "点击退出 AI 生图", onClose: () => {
41409
+ (gt || Gt) && /* @__PURE__ */ v("span", { ref: zi, className: "rte-skill-inline-tag-wrap", contentEditable: !1, children: gt ? /* @__PURE__ */ v(Po, { title: gt.title, onClose: () => Ju(null) }) : /* @__PURE__ */ v(Po, { title: "AI生图", exitTip: "点击退出 AI 生图", onClose: () => {
41410
41410
  er(!1), we?.();
41411
41411
  } }) }),
41412
41412
  /* @__PURE__ */ v(
@@ -41417,7 +41417,7 @@ const Ew = (e) => {
41417
41417
  value: Jn,
41418
41418
  onChange: (H) => Yu(H.target.value),
41419
41419
  onKeyDown: $b,
41420
- placeholder: Gt ? "请描述你想要的图片" : at?.usageInstruction || a || "",
41420
+ placeholder: Gt ? "请描述你想要的图片" : gt?.usageInstruction || a || "",
41421
41421
  disabled: l,
41422
41422
  rows: 1,
41423
41423
  style: {
@@ -41491,7 +41491,7 @@ const Ew = (e) => {
41491
41491
  onAgentSelect: Ib,
41492
41492
  hideAgentButton: _e === "hideAgent",
41493
41493
  currentAgent: Zn,
41494
- selectedSkill: at,
41494
+ selectedSkill: gt,
41495
41495
  onSkillSelect: Ju,
41496
41496
  onSkillCardClick: B,
41497
41497
  onSkillAction: E,