@nine-lab/nine-ux 0.1.137 β†’ 0.1.139

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/nine-ux.js CHANGED
@@ -1043,7 +1043,7 @@ class Ft {
1043
1043
  return e.blockRange(this);
1044
1044
  for (let n = this.depth - (this.parent.inlineContent || this.pos == e.pos ? 1 : 0); n >= 0; n--)
1045
1045
  if (e.pos <= this.end(n) && (!t || t(this.node(n))))
1046
- return new Cn(this, e, n);
1046
+ return new wn(this, e, n);
1047
1047
  return null;
1048
1048
  }
1049
1049
  /**
@@ -1111,7 +1111,7 @@ class Hl {
1111
1111
  }
1112
1112
  }
1113
1113
  const Wl = 12, pi = /* @__PURE__ */ new WeakMap();
1114
- class Cn {
1114
+ class wn {
1115
1115
  /**
1116
1116
  Construct a node range. `$from` and `$to` should point into the
1117
1117
  same node until at least the given `depth`, since a node range
@@ -1522,7 +1522,7 @@ let ze = class xr {
1522
1522
  }
1523
1523
  };
1524
1524
  ze.prototype.text = void 0;
1525
- class wn extends ze {
1525
+ class Cn extends ze {
1526
1526
  /**
1527
1527
  @internal
1528
1528
  */
@@ -1544,10 +1544,10 @@ class wn extends ze {
1544
1544
  return this.text.length;
1545
1545
  }
1546
1546
  mark(e) {
1547
- return e == this.marks ? this : new wn(this.type, this.attrs, this.text, e);
1547
+ return e == this.marks ? this : new Cn(this.type, this.attrs, this.text, e);
1548
1548
  }
1549
1549
  withText(e) {
1550
- return e == this.text ? this : new wn(this.type, this.attrs, e, this.marks);
1550
+ return e == this.text ? this : new Cn(this.type, this.attrs, e, this.marks);
1551
1551
  }
1552
1552
  cut(e = 0, t = this.text.length) {
1553
1553
  return e == 0 && t == this.text.length ? this : this.withText(this.text.slice(e, t));
@@ -2250,7 +2250,7 @@ class Ks {
2250
2250
  */
2251
2251
  text(e, t) {
2252
2252
  let n = this.nodes.text;
2253
- return new wn(n, n.defaultAttrs, e, D.setFrom(t));
2253
+ return new Cn(n, n.defaultAttrs, e, D.setFrom(t));
2254
2254
  }
2255
2255
  /**
2256
2256
  Create a mark with the given type and attributes.
@@ -2891,17 +2891,17 @@ class ct {
2891
2891
  This can be useful as a base to build a custom serializer from.
2892
2892
  */
2893
2893
  static nodesFromSchema(e) {
2894
- let t = Ci(e.nodes);
2894
+ let t = wi(e.nodes);
2895
2895
  return t.text || (t.text = (n) => n.text), t;
2896
2896
  }
2897
2897
  /**
2898
2898
  Gather the serializers in a schema's mark specs into an object.
2899
2899
  */
2900
2900
  static marksFromSchema(e) {
2901
- return Ci(e.marks);
2901
+ return wi(e.marks);
2902
2902
  }
2903
2903
  }
2904
- function Ci(r) {
2904
+ function wi(r) {
2905
2905
  let e = {};
2906
2906
  for (let t in r) {
2907
2907
  let n = r[t].spec.toDOM;
@@ -2912,10 +2912,10 @@ function Ci(r) {
2912
2912
  function Yn(r) {
2913
2913
  return r.document || window.document;
2914
2914
  }
2915
- const wi = /* @__PURE__ */ new WeakMap();
2915
+ const Ci = /* @__PURE__ */ new WeakMap();
2916
2916
  function oa(r) {
2917
- let e = wi.get(r);
2918
- return e === void 0 && wi.set(r, e = la(r)), e;
2917
+ let e = Ci.get(r);
2918
+ return e === void 0 && Ci.set(r, e = la(r)), e;
2919
2919
  }
2920
2920
  function la(r) {
2921
2921
  let e = null;
@@ -3479,7 +3479,7 @@ class L extends ee {
3479
3479
  super(), this.from = e, this.to = t, this.slice = n, this.structure = i;
3480
3480
  }
3481
3481
  apply(e) {
3482
- return this.structure && Cr(e, this.from, this.to) ? z.fail("Structure replace would overwrite content") : z.fromReplace(e, this.from, this.to, this.slice);
3482
+ return this.structure && wr(e, this.from, this.to) ? z.fail("Structure replace would overwrite content") : z.fromReplace(e, this.from, this.to, this.slice);
3483
3483
  }
3484
3484
  getMap() {
3485
3485
  return new le([this.from, this.to - this.from, this.slice.size]);
@@ -3529,7 +3529,7 @@ class H extends ee {
3529
3529
  super(), this.from = e, this.to = t, this.gapFrom = n, this.gapTo = i, this.slice = s, this.insert = o, this.structure = l;
3530
3530
  }
3531
3531
  apply(e) {
3532
- if (this.structure && (Cr(e, this.from, this.gapFrom) || Cr(e, this.gapTo, this.to)))
3532
+ if (this.structure && (wr(e, this.from, this.gapFrom) || wr(e, this.gapTo, this.to)))
3533
3533
  return z.fail("Structure gap-replace would overwrite content");
3534
3534
  let t = e.slice(this.gapFrom, this.gapTo);
3535
3535
  if (t.openStart || t.openEnd)
@@ -3576,7 +3576,7 @@ class H extends ee {
3576
3576
  }
3577
3577
  }
3578
3578
  ee.jsonID("replaceAround", H);
3579
- function Cr(r, e, t) {
3579
+ function wr(r, e, t) {
3580
3580
  let n = r.resolve(e), i = t - e, s = n.depth;
3581
3581
  for (; i > 0 && s > 0 && n.indexAfter(s) == n.node(s).childCount; )
3582
3582
  s--, i--;
@@ -3841,7 +3841,7 @@ function Ma(r, e, t) {
3841
3841
  }
3842
3842
  return r;
3843
3843
  }
3844
- function Ca(r, e, t) {
3844
+ function wa(r, e, t) {
3845
3845
  let n = r.resolve(e);
3846
3846
  if (n.parent.canReplaceWith(n.index(), n.index(), t))
3847
3847
  return e;
@@ -3888,12 +3888,12 @@ function zn(r, e, t = e, n = k.empty) {
3888
3888
  if (e == t && !n.size)
3889
3889
  return null;
3890
3890
  let i = r.resolve(e), s = r.resolve(t);
3891
- return io(i, s, n) ? new L(e, t, n) : new wa(i, s, n).fit();
3891
+ return io(i, s, n) ? new L(e, t, n) : new Ca(i, s, n).fit();
3892
3892
  }
3893
3893
  function io(r, e, t) {
3894
3894
  return !t.openStart && !t.openEnd && r.start() == e.start() && r.parent.canReplace(r.index(), e.index(), t.content);
3895
3895
  }
3896
- class wa {
3896
+ class Ca {
3897
3897
  constructor(e, t, n) {
3898
3898
  this.$from = e, this.$to = t, this.unplaced = n, this.frontier = [], this.placed = b.empty;
3899
3899
  for (let i = 0; i <= e.depth; i++) {
@@ -4109,8 +4109,8 @@ function Ea(r, e, t, n) {
4109
4109
  for (let m = 0; m < o.length; m++) {
4110
4110
  let g = o[(m + a) % o.length], y = !0;
4111
4111
  g < 0 && (y = !1, g = -g);
4112
- let T = i.node(g - 1), C = i.index(g - 1);
4113
- if (T.canReplaceWith(C, C, p.type, p.marks))
4112
+ let T = i.node(g - 1), w = i.index(g - 1);
4113
+ if (T.canReplaceWith(w, w, p.type, p.marks))
4114
4114
  return r.replace(i.before(g), y ? s.after(g) : t, new k(oo(n.content, 0, n.openStart, h), h, n.openEnd));
4115
4115
  }
4116
4116
  }
@@ -4133,7 +4133,7 @@ function oo(r, e, t, n, i) {
4133
4133
  }
4134
4134
  function Aa(r, e, t, n) {
4135
4135
  if (!n.isInline && e == t && r.doc.resolve(e).parent.content.size) {
4136
- let i = Ca(r.doc, e, n.type);
4136
+ let i = wa(r.doc, e, n.type);
4137
4137
  i != null && (e = t = i);
4138
4138
  }
4139
4139
  r.replaceRange(e, t, new k(b.from(n), 0, 0));
@@ -4249,15 +4249,15 @@ class Wt extends ee {
4249
4249
  }
4250
4250
  }
4251
4251
  ee.jsonID("docAttr", Wt);
4252
- let wt = class extends Error {
4252
+ let Ct = class extends Error {
4253
4253
  };
4254
- wt = function r(e) {
4254
+ Ct = function r(e) {
4255
4255
  let t = Error.call(this, e);
4256
4256
  return t.__proto__ = r.prototype, t;
4257
4257
  };
4258
- wt.prototype = Object.create(Error.prototype);
4259
- wt.prototype.constructor = wt;
4260
- wt.prototype.name = "TransformError";
4258
+ Ct.prototype = Object.create(Error.prototype);
4259
+ Ct.prototype.constructor = Ct;
4260
+ Ct.prototype.name = "TransformError";
4261
4261
  class va {
4262
4262
  /**
4263
4263
  Create a transform that starts with the given document.
@@ -4278,7 +4278,7 @@ class va {
4278
4278
  step(e) {
4279
4279
  let t = this.maybeStep(e);
4280
4280
  if (t.failed)
4281
- throw new wt(t.failed);
4281
+ throw new Ct(t.failed);
4282
4282
  return this;
4283
4283
  }
4284
4284
  /**
@@ -5287,7 +5287,7 @@ const nr = /* @__PURE__ */ Object.create(null);
5287
5287
  function co(r) {
5288
5288
  return r in nr ? r + "$" + ++nr[r] : (nr[r] = 0, r + "$");
5289
5289
  }
5290
- class Ce {
5290
+ class we {
5291
5291
  /**
5292
5292
  Create a plugin key.
5293
5293
  */
@@ -5316,12 +5316,12 @@ const K = function(r) {
5316
5316
  let e = r.assignedSlot || r.parentNode;
5317
5317
  return e && e.nodeType == 11 ? e.host : e;
5318
5318
  };
5319
- let wr = null;
5319
+ let Cr = null;
5320
5320
  const Te = function(r, e, t) {
5321
- let n = wr || (wr = document.createRange());
5321
+ let n = Cr || (Cr = document.createRange());
5322
5322
  return n.setEnd(r, t ?? r.nodeValue.length), n.setStart(r, e || 0), n;
5323
5323
  }, Ba = function() {
5324
- wr = null;
5324
+ Cr = null;
5325
5325
  }, st = function(r, e, t, n) {
5326
5326
  return t && (Ri(r, e, t, n, -1) || Ri(r, e, t, n, 1));
5327
5327
  }, La = /^(img|br|input|textarea|hr)$/i;
@@ -5438,7 +5438,7 @@ function qa(r) {
5438
5438
  bottom: r.documentElement.clientHeight
5439
5439
  };
5440
5440
  }
5441
- function we(r, e) {
5441
+ function Ce(r, e) {
5442
5442
  return typeof r == "number" ? r : r[e];
5443
5443
  }
5444
5444
  function ja(r) {
@@ -5458,7 +5458,7 @@ function Bi(r, e, t) {
5458
5458
  continue;
5459
5459
  }
5460
5460
  let l = o, a = l == s.body, c = a ? qa(s) : ja(l), d = 0, u = 0;
5461
- if (e.top < c.top + we(n, "top") ? u = -(c.top - e.top + we(i, "top")) : e.bottom > c.bottom - we(n, "bottom") && (u = e.bottom - e.top > c.bottom - c.top ? e.top + we(i, "top") - c.top : e.bottom - c.bottom + we(i, "bottom")), e.left < c.left + we(n, "left") ? d = -(c.left - e.left + we(i, "left")) : e.right > c.right - we(n, "right") && (d = e.right - c.right + we(i, "right")), d || u)
5461
+ if (e.top < c.top + Ce(n, "top") ? u = -(c.top - e.top + Ce(i, "top")) : e.bottom > c.bottom - Ce(n, "bottom") && (u = e.bottom - e.top > c.bottom - c.top ? e.top + Ce(i, "top") - c.top : e.bottom - c.bottom + Ce(i, "bottom")), e.left < c.left + Ce(n, "left") ? d = -(c.left - e.left + Ce(i, "left")) : e.right > c.right - Ce(n, "right") && (d = e.right - c.right + Ce(i, "right")), d || u)
5462
5462
  if (a)
5463
5463
  s.defaultView.scrollBy(d, u);
5464
5464
  else {
@@ -6228,7 +6228,7 @@ class Ve extends sn {
6228
6228
  } else d || ({ dom: d, contentDOM: u } = ct.renderSpec(document, t.type.spec.toDOM(t), null, t.attrs));
6229
6229
  !u && !t.isText && d.nodeName != "BR" && (d.hasAttribute("contenteditable") || (d.contentEditable = "false"), t.type.spec.draggable && (d.draggable = !0));
6230
6230
  let f = d;
6231
- return d = wo(d, n, t), c ? a = new sc(e, t, n, i, d, u || null, f, c, s, o + 1) : t.isText ? new Vn(e, t, n, i, d, f, s) : new Ve(e, t, n, i, d, u || null, f, s, o + 1);
6231
+ return d = Co(d, n, t), c ? a = new sc(e, t, n, i, d, u || null, f, c, s, o + 1) : t.isText ? new Vn(e, t, n, i, d, f, s) : new Ve(e, t, n, i, d, u || null, f, s, o + 1);
6232
6232
  }
6233
6233
  parseRule() {
6234
6234
  if (this.node.type.spec.reparseInView)
@@ -6312,7 +6312,7 @@ class Ve extends sn {
6312
6312
  if (Tn(e, this.outerDeco))
6313
6313
  return;
6314
6314
  let t = this.nodeDOM.nodeType != 1, n = this.dom;
6315
- this.dom = Co(this.dom, this.nodeDOM, Ar(this.outerDeco, this.node, t), Ar(e, this.node, t)), this.dom != n && (n.pmViewDesc = void 0, this.dom.pmViewDesc = this), this.outerDeco = e;
6315
+ this.dom = wo(this.dom, this.nodeDOM, Ar(this.outerDeco, this.node, t), Ar(e, this.node, t)), this.dom != n && (n.pmViewDesc = void 0, this.dom.pmViewDesc = this), this.outerDeco = e;
6316
6316
  }
6317
6317
  // Mark this node as being the selected node.
6318
6318
  selectNode() {
@@ -6327,7 +6327,7 @@ class Ve extends sn {
6327
6327
  }
6328
6328
  }
6329
6329
  function Hi(r, e, t, n, i) {
6330
- wo(n, e, r);
6330
+ Co(n, e, r);
6331
6331
  let s = new Ve(void 0, r, e, t, n, n, n, i, 0);
6332
6332
  return s.contentDOM && s.updateChildren(i, 0), s;
6333
6333
  }
@@ -6462,7 +6462,7 @@ function Ar(r, e, t) {
6462
6462
  }
6463
6463
  return i;
6464
6464
  }
6465
- function Co(r, e, t, n) {
6465
+ function wo(r, e, t, n) {
6466
6466
  if (t == Ge && n == Ge)
6467
6467
  return e;
6468
6468
  let i = e;
@@ -6498,8 +6498,8 @@ function oc(r, e, t) {
6498
6498
  t.style && (r.style.cssText += t.style);
6499
6499
  }
6500
6500
  }
6501
- function wo(r, e, t) {
6502
- return Co(r, r, Ge, Ar(e, t, r.nodeType != 1));
6501
+ function Co(r, e, t) {
6502
+ return wo(r, r, Ge, Ar(e, t, r.nodeType != 1));
6503
6503
  }
6504
6504
  function Tn(r, e) {
6505
6505
  if (r.length != e.length)
@@ -7226,11 +7226,11 @@ function No(r, e, t, n, i) {
7226
7226
  preserveWhitespace: !!(a || d),
7227
7227
  context: i,
7228
7228
  ruleFromNode(f) {
7229
- return f.nodeName == "BR" && !f.nextSibling && f.parentNode && !Cc.test(f.parentNode.nodeName) ? { ignore: !0 } : null;
7229
+ return f.nodeName == "BR" && !f.nextSibling && f.parentNode && !wc.test(f.parentNode.nodeName) ? { ignore: !0 } : null;
7230
7230
  }
7231
7231
  })), d)
7232
7232
  l = Ac(Qi(l, +d[1], +d[2]), d[4]);
7233
- else if (l = k.maxOpen(wc(l.content, i), !0), l.openStart || l.openEnd) {
7233
+ else if (l = k.maxOpen(Cc(l.content, i), !0), l.openStart || l.openEnd) {
7234
7234
  let u = 0, f = 0;
7235
7235
  for (let h = l.content.firstChild; u < l.openStart && !h.type.spec.isolating; u++, h = h.firstChild)
7236
7236
  ;
@@ -7242,8 +7242,8 @@ function No(r, e, t, n, i) {
7242
7242
  l = u(l, r, a);
7243
7243
  }), l;
7244
7244
  }
7245
- const Cc = /^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;
7246
- function wc(r, e) {
7245
+ const wc = /^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;
7246
+ function Cc(r, e) {
7247
7247
  if (r.childCount < 2)
7248
7248
  return r;
7249
7249
  for (let t = e.depth; t >= 0; t--) {
@@ -8175,8 +8175,8 @@ function Zc(r, e, t, n, i, s, o) {
8175
8175
  let T = l[y + 1];
8176
8176
  if (T < 0 || f > T + d - u)
8177
8177
  continue;
8178
- let C = l[y] + d - u;
8179
- h >= C ? l[y + 1] = f <= C ? -2 : -1 : f >= d && g && (l[y] += g, l[y + 1] += g);
8178
+ let w = l[y] + d - u;
8179
+ h >= w ? l[y + 1] = f <= w ? -2 : -1 : f >= d && g && (l[y] += g, l[y + 1] += g);
8180
8180
  }
8181
8181
  u += g;
8182
8182
  }), d = t.maps[c].map(d, -1);
@@ -8575,12 +8575,12 @@ const dd = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|df
8575
8575
  function ud(r, e, t, n, i) {
8576
8576
  let s = r.input.compositionPendingChanges || (r.composing ? r.input.compositionID : 0);
8577
8577
  if (r.input.compositionPendingChanges = 0, e < 0) {
8578
- let w = r.input.lastSelectionTime > Date.now() - 50 ? r.input.lastSelectionOrigin : null, N = _r(r, w);
8578
+ let C = r.input.lastSelectionTime > Date.now() - 50 ? r.input.lastSelectionOrigin : null, N = _r(r, C);
8579
8579
  if (N && !r.state.selection.eq(N)) {
8580
8580
  if (_ && Ee && r.input.lastKeyCode === 13 && Date.now() - 100 < r.input.lastKeyCodeTime && r.someProp("handleKeyDown", (Dl) => Dl(r, Ke(13, "Enter"))))
8581
8581
  return;
8582
8582
  let Y = r.state.tr.setSelection(N);
8583
- w == "pointer" ? Y.setMeta("pointer", !0) : w == "key" && Y.scrollIntoView(), s && Y.setMeta("composition", s), r.dispatch(Y);
8583
+ C == "pointer" ? Y.setMeta("pointer", !0) : C == "key" && Y.scrollIntoView(), s && Y.setMeta("composition", s), r.dispatch(Y);
8584
8584
  }
8585
8585
  return;
8586
8586
  }
@@ -8589,7 +8589,7 @@ function ud(r, e, t, n, i) {
8589
8589
  let a = r.state.selection, c = ad(r, e, t), d = r.state.doc, u = d.slice(c.from, c.to), f, h;
8590
8590
  r.input.lastKeyCode === 8 && Date.now() - 100 < r.input.lastKeyCodeTime ? (f = r.state.selection.to, h = "end") : (f = r.state.selection.from, h = "start"), r.input.lastKeyCode = null;
8591
8591
  let p = pd(u.content, c.doc.content, c.from, f, h);
8592
- if (p && r.input.domChangeCount++, (Ot && r.input.lastIOSEnter > Date.now() - 225 || Ee) && i.some((w) => w.nodeType == 1 && !dd.test(w.nodeName)) && (!p || p.endA >= p.endB) && r.someProp("handleKeyDown", (w) => w(r, Ke(13, "Enter")))) {
8592
+ if (p && r.input.domChangeCount++, (Ot && r.input.lastIOSEnter > Date.now() - 225 || Ee) && i.some((C) => C.nodeType == 1 && !dd.test(C.nodeName)) && (!p || p.endA >= p.endB) && r.someProp("handleKeyDown", (C) => C(r, Ke(13, "Enter")))) {
8593
8593
  r.input.lastIOSEnter = 0;
8594
8594
  return;
8595
8595
  }
@@ -8598,9 +8598,9 @@ function ud(r, e, t, n, i) {
8598
8598
  p = { start: a.from, endA: a.to, endB: a.to };
8599
8599
  else {
8600
8600
  if (c.sel) {
8601
- let w = ss(r, r.state.doc, c.sel);
8602
- if (w && !w.eq(r.state.selection)) {
8603
- let N = r.state.tr.setSelection(w);
8601
+ let C = ss(r, r.state.doc, c.sel);
8602
+ if (C && !C.eq(r.state.selection)) {
8603
+ let N = r.state.tr.setSelection(C);
8604
8604
  s && N.setMeta("composition", s), r.dispatch(N);
8605
8605
  }
8606
8606
  }
@@ -8608,41 +8608,41 @@ function ud(r, e, t, n, i) {
8608
8608
  }
8609
8609
  r.state.selection.from < r.state.selection.to && p.start == p.endB && r.state.selection instanceof M && (p.start > r.state.selection.from && p.start <= r.state.selection.from + 2 && r.state.selection.from >= c.from ? p.start = r.state.selection.from : p.endA < r.state.selection.to && p.endA >= r.state.selection.to - 2 && r.state.selection.to <= c.to && (p.endB += r.state.selection.to - p.endA, p.endA = r.state.selection.to)), se && Fe <= 11 && p.endB == p.start + 1 && p.endA == p.start && p.start > c.from && c.doc.textBetween(p.start - c.from - 1, p.start - c.from + 1) == " Β " && (p.start--, p.endA--, p.endB--);
8610
8610
  let m = c.doc.resolveNoCache(p.start - c.from), g = c.doc.resolveNoCache(p.endB - c.from), y = d.resolve(p.start), T = m.sameParent(g) && m.parent.inlineContent && y.end() >= p.endA;
8611
- if ((Ot && r.input.lastIOSEnter > Date.now() - 225 && (!T || i.some((w) => w.nodeName == "DIV" || w.nodeName == "P")) || !T && m.pos < c.doc.content.size && (!m.sameParent(g) || !m.parent.inlineContent) && m.pos < g.pos && !/\S/.test(c.doc.textBetween(m.pos, g.pos, "", ""))) && r.someProp("handleKeyDown", (w) => w(r, Ke(13, "Enter")))) {
8611
+ if ((Ot && r.input.lastIOSEnter > Date.now() - 225 && (!T || i.some((C) => C.nodeName == "DIV" || C.nodeName == "P")) || !T && m.pos < c.doc.content.size && (!m.sameParent(g) || !m.parent.inlineContent) && m.pos < g.pos && !/\S/.test(c.doc.textBetween(m.pos, g.pos, "", ""))) && r.someProp("handleKeyDown", (C) => C(r, Ke(13, "Enter")))) {
8612
8612
  r.input.lastIOSEnter = 0;
8613
8613
  return;
8614
8614
  }
8615
- if (r.state.selection.anchor > p.start && hd(d, p.start, p.endA, m, g) && r.someProp("handleKeyDown", (w) => w(r, Ke(8, "Backspace")))) {
8615
+ if (r.state.selection.anchor > p.start && hd(d, p.start, p.endA, m, g) && r.someProp("handleKeyDown", (C) => C(r, Ke(8, "Backspace")))) {
8616
8616
  Ee && _ && r.domObserver.suppressSelectionUpdates();
8617
8617
  return;
8618
8618
  }
8619
8619
  _ && p.endB == p.start && (r.input.lastChromeDelete = Date.now()), Ee && !T && m.start() != g.start() && g.parentOffset == 0 && m.depth == g.depth && c.sel && c.sel.anchor == c.sel.head && c.sel.head == p.endA && (p.endB -= 2, g = c.doc.resolveNoCache(p.endB - c.from), setTimeout(() => {
8620
- r.someProp("handleKeyDown", function(w) {
8621
- return w(r, Ke(13, "Enter"));
8620
+ r.someProp("handleKeyDown", function(C) {
8621
+ return C(r, Ke(13, "Enter"));
8622
8622
  });
8623
8623
  }, 20));
8624
- let C = p.start, R = p.endA, I = (w) => {
8625
- let N = w || r.state.tr.replace(C, R, c.doc.slice(p.start - c.from, p.endB - c.from));
8624
+ let w = p.start, R = p.endA, I = (C) => {
8625
+ let N = C || r.state.tr.replace(w, R, c.doc.slice(p.start - c.from, p.endB - c.from));
8626
8626
  if (c.sel) {
8627
8627
  let Y = ss(r, N.doc, c.sel);
8628
- Y && !(_ && r.composing && Y.empty && (p.start != p.endB || r.input.lastChromeDelete < Date.now() - 100) && (Y.head == C || Y.head == N.mapping.map(R) - 1) || se && Y.empty && Y.head == C) && N.setSelection(Y);
8628
+ Y && !(_ && r.composing && Y.empty && (p.start != p.endB || r.input.lastChromeDelete < Date.now() - 100) && (Y.head == w || Y.head == N.mapping.map(R) - 1) || se && Y.empty && Y.head == w) && N.setSelection(Y);
8629
8629
  }
8630
8630
  return s && N.setMeta("composition", s), N.scrollIntoView();
8631
8631
  }, F;
8632
8632
  if (T)
8633
8633
  if (m.pos == g.pos) {
8634
8634
  se && Fe <= 11 && m.parentOffset == 0 && (r.domObserver.suppressSelectionUpdates(), setTimeout(() => Ne(r), 20));
8635
- let w = I(r.state.tr.delete(C, R)), N = d.resolve(p.start).marksAcross(d.resolve(p.endA));
8636
- N && w.ensureMarks(N), r.dispatch(w);
8635
+ let C = I(r.state.tr.delete(w, R)), N = d.resolve(p.start).marksAcross(d.resolve(p.endA));
8636
+ N && C.ensureMarks(N), r.dispatch(C);
8637
8637
  } else if (
8638
8638
  // Adding or removing a mark
8639
8639
  p.endA == p.endB && (F = fd(m.parent.content.cut(m.parentOffset, g.parentOffset), y.parent.content.cut(y.parentOffset, p.endA - y.start())))
8640
8640
  ) {
8641
- let w = I(r.state.tr);
8642
- F.type == "add" ? w.addMark(C, R, F.mark) : w.removeMark(C, R, F.mark), r.dispatch(w);
8641
+ let C = I(r.state.tr);
8642
+ F.type == "add" ? C.addMark(w, R, F.mark) : C.removeMark(w, R, F.mark), r.dispatch(C);
8643
8643
  } else if (m.parent.child(m.index()).isText && m.index() == g.index() - (g.textOffset ? 0 : 1)) {
8644
- let w = m.parent.textBetween(m.parentOffset, g.parentOffset), N = () => I(r.state.tr.insertText(w, C, R));
8645
- r.someProp("handleTextInput", (Y) => Y(r, C, R, w, N)) || r.dispatch(N());
8644
+ let C = m.parent.textBetween(m.parentOffset, g.parentOffset), N = () => I(r.state.tr.insertText(C, w, R));
8645
+ r.someProp("handleTextInput", (Y) => Y(r, w, R, C, N)) || r.dispatch(N());
8646
8646
  } else
8647
8647
  r.dispatch(I());
8648
8648
  else
@@ -9212,7 +9212,7 @@ function Md(r) {
9212
9212
  }
9213
9213
  return n && (t = "Alt-" + t), i && (t = "Ctrl-" + t), o && (t = "Meta-" + t), s && (t = "Shift-" + t), t;
9214
9214
  }
9215
- function Cd(r) {
9215
+ function wd(r) {
9216
9216
  let e = /* @__PURE__ */ Object.create(null);
9217
9217
  for (let t in r)
9218
9218
  e[Md(t)] = r[t];
@@ -9221,11 +9221,11 @@ function Cd(r) {
9221
9221
  function cr(r, e, t = !0) {
9222
9222
  return e.altKey && (r = "Alt-" + r), e.ctrlKey && (r = "Ctrl-" + r), e.metaKey && (r = "Meta-" + r), t && e.shiftKey && (r = "Shift-" + r), r;
9223
9223
  }
9224
- function wd(r) {
9224
+ function Cd(r) {
9225
9225
  return new oe({ props: { handleKeyDown: Ko(r) } });
9226
9226
  }
9227
9227
  function Ko(r) {
9228
- let e = Cd(r);
9228
+ let e = wd(r);
9229
9229
  return function(t, n) {
9230
9230
  let i = kd(n), s, o = e[cr(i, n)];
9231
9231
  if (o && o(t.state, t.dispatch, t))
@@ -9537,8 +9537,8 @@ function rl(r, e, t, n) {
9537
9537
  if (h.canReplace(h.childCount, h.childCount, m.content)) {
9538
9538
  if (t) {
9539
9539
  let y = b.empty;
9540
- for (let C = p.length - 1; C >= 0; C--)
9541
- y = b.from(p[C].copy(y));
9540
+ for (let w = p.length - 1; w >= 0; w--)
9541
+ y = b.from(p[w].copy(y));
9542
9542
  let T = r.tr.step(new H(e.pos - p.length, e.pos + s.nodeSize, e.pos + g, e.pos + s.nodeSize - g, new k(y, p.length, 0), 0, !0));
9543
9543
  t(T.scrollIntoView());
9544
9544
  }
@@ -9622,7 +9622,7 @@ function Fd(r, e, t, n = null) {
9622
9622
  if (e.$from.index(e.depth - 1) == 0)
9623
9623
  return !1;
9624
9624
  let a = o.resolve(e.start - 2);
9625
- s = new Cn(a, a, e.depth), e.endIndex < e.parent.childCount && (e = new Cn(e.$from, o.resolve(e.$to.end(e.depth)), e.depth)), i = !0;
9625
+ s = new wn(a, a, e.depth), e.endIndex < e.parent.childCount && (e = new wn(e.$from, o.resolve(e.$to.end(e.depth)), e.depth)), i = !0;
9626
9626
  }
9627
9627
  let l = Jr(s, t, n, e);
9628
9628
  return l ? (r && Vd(r, e, l, i, t), !0) : !1;
@@ -9648,7 +9648,7 @@ function Hd(r) {
9648
9648
  }
9649
9649
  function Wd(r, e, t, n) {
9650
9650
  let i = r.tr, s = n.end, o = n.$to.end(n.depth);
9651
- s < o && (i.step(new H(s - 1, o, s, o, new k(b.from(t.create(null, n.parent.copy())), 1, 0), 1, !0)), n = new Cn(i.doc.resolve(n.$from.pos), i.doc.resolve(o), n.depth));
9651
+ s < o && (i.step(new H(s - 1, o, s, o, new k(b.from(t.create(null, n.parent.copy())), 1, 0), 1, !0)), n = new wn(i.doc.resolve(n.$from.pos), i.doc.resolve(o), n.depth));
9652
9652
  const l = At(n);
9653
9653
  if (l == null)
9654
9654
  return !1;
@@ -9948,10 +9948,10 @@ function _d(r, e) {
9948
9948
  storage: c.storage,
9949
9949
  editor: e
9950
9950
  }, f = r.reduce((y, T) => {
9951
- const C = x(T, "extendNodeSchema", u);
9951
+ const w = x(T, "extendNodeSchema", u);
9952
9952
  return {
9953
9953
  ...y,
9954
- ...C ? C(c) : {}
9954
+ ...w ? w(c) : {}
9955
9955
  };
9956
9956
  }, {}), h = ms({
9957
9957
  ...f,
@@ -10083,7 +10083,7 @@ function dn(r) {
10083
10083
  }), g = {
10084
10084
  from: n - (h[0].length - s.length),
10085
10085
  to: i
10086
- }, { commands: y, chain: T, can: C } = new qn({
10086
+ }, { commands: y, chain: T, can: w } = new qn({
10087
10087
  editor: t,
10088
10088
  state: m
10089
10089
  });
@@ -10093,7 +10093,7 @@ function dn(r) {
10093
10093
  match: h,
10094
10094
  commands: y,
10095
10095
  chain: T,
10096
- can: C
10096
+ can: w
10097
10097
  }) === null || !p.steps.length || (p.setMeta(l, {
10098
10098
  transform: p,
10099
10099
  from: n,
@@ -10258,23 +10258,23 @@ function nu(r) {
10258
10258
  if (!h.isTextblock || h.type.spec.code)
10259
10259
  return;
10260
10260
  const m = Math.max(n, p), g = Math.min(i, p + h.content.size), y = h.textBetween(m - p, g - p, void 0, "οΏΌ");
10261
- tu(y, s.find, o).forEach((C) => {
10262
- if (C.index === void 0)
10261
+ tu(y, s.find, o).forEach((w) => {
10262
+ if (w.index === void 0)
10263
10263
  return;
10264
- const R = m + C.index + 1, I = R + C[0].length, F = {
10264
+ const R = m + w.index + 1, I = R + w[0].length, F = {
10265
10265
  from: t.tr.mapping.map(R),
10266
10266
  to: t.tr.mapping.map(I)
10267
- }, w = s.handler({
10267
+ }, C = s.handler({
10268
10268
  state: t,
10269
10269
  range: F,
10270
- match: C,
10270
+ match: w,
10271
10271
  commands: a,
10272
10272
  chain: c,
10273
10273
  can: d,
10274
10274
  pasteEvent: o,
10275
10275
  dropEvent: l
10276
10276
  });
10277
- u.push(w);
10277
+ u.push(C);
10278
10278
  });
10279
10279
  }), u.every((h) => h !== null);
10280
10280
  }
@@ -10357,21 +10357,21 @@ function iu(r) {
10357
10357
  if (T) {
10358
10358
  let { text: I } = y;
10359
10359
  typeof I == "string" ? I = I : I = li(b.from(I), h.schema);
10360
- const { from: F } = y, w = F + I.length, N = ru(I);
10360
+ const { from: F } = y, C = F + I.length, N = ru(I);
10361
10361
  return a({
10362
10362
  rule: d,
10363
10363
  state: h,
10364
10364
  from: F,
10365
- to: { b: w },
10365
+ to: { b: C },
10366
10366
  pasteEvt: N
10367
10367
  });
10368
10368
  }
10369
- const C = f.doc.content.findDiffStart(h.doc.content), R = f.doc.content.findDiffEnd(h.doc.content);
10370
- if (!(!Qd(C) || !R || C === R.b))
10369
+ const w = f.doc.content.findDiffStart(h.doc.content), R = f.doc.content.findDiffEnd(h.doc.content);
10370
+ if (!(!Qd(w) || !R || w === R.b))
10371
10371
  return a({
10372
10372
  rule: d,
10373
10373
  state: h,
10374
- from: C,
10374
+ from: w,
10375
10375
  to: R,
10376
10376
  pasteEvt: o
10377
10377
  });
@@ -10459,7 +10459,7 @@ class gt {
10459
10459
  const m = Object.fromEntries(Object.entries(c()).map(([g, y]) => [g, () => y({ editor: e })]));
10460
10460
  d = { ...d, ...m };
10461
10461
  }
10462
- const u = wd(d);
10462
+ const u = Cd(d);
10463
10463
  a.push(u);
10464
10464
  const f = x(o, "addInputRules", l);
10465
10465
  gs(o, e.options.enableInputRules) && f && n.push(...f());
@@ -10614,7 +10614,7 @@ const ou = G.create({
10614
10614
  addProseMirrorPlugins() {
10615
10615
  return [
10616
10616
  new oe({
10617
- key: new Ce("clipboardTextSerializer"),
10617
+ key: new we("clipboardTextSerializer"),
10618
10618
  props: {
10619
10619
  clipboardTextSerializer: () => {
10620
10620
  const { editor: r } = this, { state: e, schema: t } = r, { doc: n, selection: i } = e, { ranges: s } = i, o = Math.min(...s.map((d) => d.$from.pos)), l = Math.max(...s.map((d) => d.$to.pos)), a = al(t);
@@ -10786,7 +10786,7 @@ const Mu = (r = null, e = {}) => ({ editor: t, view: n, tr: i, dispatch: s }) =>
10786
10786
  return o(), !0;
10787
10787
  const l = ul(i.doc, r) || t.state.selection, a = t.state.selection.eq(l);
10788
10788
  return s && (a || i.setSelection(l), a && i.storedMarks && i.setStoredMarks(i.storedMarks), o()), !0;
10789
- }, Cu = (r, e) => (t) => r.every((n, i) => e(n, { ...t, index: i })), wu = (r, e) => ({ tr: t, commands: n }) => n.insertContentAt({ from: t.selection.from, to: t.selection.to }, r, e), fl = (r) => {
10789
+ }, wu = (r, e) => (t) => r.every((n, i) => e(n, { ...t, index: i })), Cu = (r, e) => ({ tr: t, commands: n }) => n.insertContentAt({ from: t.selection.from, to: t.selection.to }, r, e), fl = (r) => {
10790
10790
  const e = r.childNodes;
10791
10791
  for (let t = e.length - 1; t >= 0; t -= 1) {
10792
10792
  const n = e[t];
@@ -11130,8 +11130,8 @@ function Lr(r, e, t = {}) {
11130
11130
  r.doc.nodesBetween(h, p, (m, g) => {
11131
11131
  if (!m.isText && !m.marks.length)
11132
11132
  return;
11133
- const y = Math.max(h, g), T = Math.min(p, g + m.nodeSize), C = T - y;
11134
- o += C, l.push(...m.marks.map((R) => ({
11133
+ const y = Math.max(h, g), T = Math.min(p, g + m.nodeSize), w = T - y;
11134
+ o += w, l.push(...m.marks.map((R) => ({
11135
11135
  mark: R,
11136
11136
  from: y,
11137
11137
  to: T
@@ -11299,19 +11299,19 @@ const ff = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, edit
11299
11299
  const T = a.index(-1) ? 1 : a.index(-2) ? 2 : 3;
11300
11300
  for (let N = a.depth - T; N >= a.depth - 3; N -= 1)
11301
11301
  y = b.from(a.node(N).copy(y));
11302
- const C = a.indexAfter(-1) < a.node(-2).childCount ? 1 : a.indexAfter(-2) < a.node(-3).childCount ? 2 : 3, R = {
11302
+ const w = a.indexAfter(-1) < a.node(-2).childCount ? 1 : a.indexAfter(-2) < a.node(-3).childCount ? 2 : 3, R = {
11303
11303
  ...yn(f, a.node().type.name, a.node().attrs),
11304
11304
  ...e
11305
11305
  }, I = ((o = l.contentMatch.defaultType) === null || o === void 0 ? void 0 : o.createAndFill(R)) || void 0;
11306
11306
  y = y.append(b.from(l.createAndFill(null, I) || void 0));
11307
11307
  const F = a.before(a.depth - (T - 1));
11308
- t.replace(F, a.after(-C), new k(y, 4 - T, 0));
11309
- let w = -1;
11308
+ t.replace(F, a.after(-w), new k(y, 4 - T, 0));
11309
+ let C = -1;
11310
11310
  t.doc.nodesBetween(F, t.doc.content.size, (N, Y) => {
11311
- if (w > -1)
11311
+ if (C > -1)
11312
11312
  return !1;
11313
- N.isTextblock && N.content.size === 0 && (w = Y + 1);
11314
- }), w > -1 && t.setSelection(M.near(t.doc.resolve(w))), t.scrollIntoView();
11313
+ N.isTextblock && N.content.size === 0 && (C = Y + 1);
11314
+ }), C > -1 && t.setSelection(M.near(t.doc.resolve(C))), t.scrollIntoView();
11315
11315
  }
11316
11316
  return !0;
11317
11317
  }
@@ -11330,10 +11330,10 @@ const ff = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, edit
11330
11330
  if (!Ae(t.doc, a.pos, 2))
11331
11331
  return !1;
11332
11332
  if (i) {
11333
- const { selection: y, storedMarks: T } = n, { splittableMarks: C } = s.extensionManager, R = T || y.$to.parentOffset && y.$from.marks();
11333
+ const { selection: y, storedMarks: T } = n, { splittableMarks: w } = s.extensionManager, R = T || y.$to.parentOffset && y.$from.marks();
11334
11334
  if (t.split(a.pos, 2, g).scrollIntoView(), !R || !i)
11335
11335
  return !0;
11336
- const I = R.filter((F) => C.includes(F.type.name));
11336
+ const I = R.filter((F) => w.includes(F.type.name));
11337
11337
  t.ensureMarks(I);
11338
11338
  }
11339
11339
  return !0;
@@ -11356,19 +11356,19 @@ const ff = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, edit
11356
11356
  const i = r.doc.nodeAt(n);
11357
11357
  return t.node.type === (i == null ? void 0 : i.type) && qe(r.doc, n) && r.join(n), !0;
11358
11358
  }, pf = (r, e, t, n = {}) => ({ editor: i, tr: s, state: o, dispatch: l, chain: a, commands: c, can: d }) => {
11359
- const { extensions: u, splittableMarks: f } = i.extensionManager, h = q(r, o.schema), p = q(e, o.schema), { selection: m, storedMarks: g } = o, { $from: y, $to: T } = m, C = y.blockRange(T), R = g || m.$to.parentOffset && m.$from.marks();
11360
- if (!C)
11359
+ const { extensions: u, splittableMarks: f } = i.extensionManager, h = q(r, o.schema), p = q(e, o.schema), { selection: m, storedMarks: g } = o, { $from: y, $to: T } = m, w = y.blockRange(T), R = g || m.$to.parentOffset && m.$from.marks();
11360
+ if (!w)
11361
11361
  return !1;
11362
11362
  const I = di((F) => xs(F.type.name, u))(m);
11363
- if (C.depth >= 1 && I && C.depth - I.depth <= 1) {
11363
+ if (w.depth >= 1 && I && w.depth - I.depth <= 1) {
11364
11364
  if (I.node.type === h)
11365
11365
  return c.liftListItem(p);
11366
11366
  if (xs(I.node.type.name, u) && h.validContent(I.node.content) && l)
11367
11367
  return a().command(() => (s.setNodeMarkup(I.pos, h), !0)).command(() => ur(s, h)).command(() => fr(s, h)).run();
11368
11368
  }
11369
11369
  return !t || !R || !l ? a().command(() => d().wrapInList(h, n) ? !0 : c.clearNodes()).wrapInList(h, n).command(() => ur(s, h)).command(() => fr(s, h)).run() : a().command(() => {
11370
- const F = d().wrapInList(h, n), w = R.filter((N) => f.includes(N.type.name));
11371
- return s.ensureMarks(w), F ? !0 : c.clearNodes();
11370
+ const F = d().wrapInList(h, n), C = R.filter((N) => f.includes(N.type.name));
11371
+ return s.ensureMarks(C), F ? !0 : c.clearNodes();
11372
11372
  }).wrapInList(h, n).command(() => ur(s, h)).command(() => fr(s, h)).run();
11373
11373
  }, mf = (r, e = {}, t = {}) => ({ state: n, commands: i }) => {
11374
11374
  const { extendEmptyMarkRange: s = !1 } = t, o = Je(r, n.schema);
@@ -11433,8 +11433,8 @@ const ff = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, edit
11433
11433
  ...e
11434
11434
  }), o && m.marks.length && m.marks.forEach((y) => {
11435
11435
  if (o === y.type) {
11436
- const T = Math.max(g, c), C = Math.min(g + m.nodeSize, d);
11437
- t.addMark(T, C, o.create({
11436
+ const T = Math.max(g, c), w = Math.min(g + m.nodeSize, d);
11437
+ t.addMark(T, w, o.create({
11438
11438
  ...y.attrs,
11439
11439
  ...e
11440
11440
  }));
@@ -11453,11 +11453,11 @@ const ff = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, edit
11453
11453
  }, Mf = (r, e = {}) => ({ state: t, dispatch: n }) => {
11454
11454
  const i = q(r, t.schema);
11455
11455
  return zd(i, e)(t, n);
11456
- }, Cf = (r, e = {}) => ({ state: t, dispatch: n }) => {
11456
+ }, wf = (r, e = {}) => ({ state: t, dispatch: n }) => {
11457
11457
  const i = q(r, t.schema);
11458
11458
  return $d(i, e)(t, n);
11459
11459
  };
11460
- var wf = /* @__PURE__ */ Object.freeze({
11460
+ var Cf = /* @__PURE__ */ Object.freeze({
11461
11461
  __proto__: null,
11462
11462
  blur: lu,
11463
11463
  clearContent: au,
@@ -11474,8 +11474,8 @@ var wf = /* @__PURE__ */ Object.freeze({
11474
11474
  extendMarkRange: ku,
11475
11475
  first: xu,
11476
11476
  focus: Mu,
11477
- forEach: Cu,
11478
- insertContent: wu,
11477
+ forEach: wu,
11478
+ insertContent: Cu,
11479
11479
  insertContentAt: Eu,
11480
11480
  joinBackward: vu,
11481
11481
  joinDown: Nu,
@@ -11516,13 +11516,13 @@ var wf = /* @__PURE__ */ Object.freeze({
11516
11516
  unsetMark: xf,
11517
11517
  updateAttributes: Sf,
11518
11518
  wrapIn: Mf,
11519
- wrapInList: Cf
11519
+ wrapInList: wf
11520
11520
  });
11521
11521
  const Tf = G.create({
11522
11522
  name: "commands",
11523
11523
  addCommands() {
11524
11524
  return {
11525
- ...wf
11525
+ ...Cf
11526
11526
  };
11527
11527
  }
11528
11528
  }), Of = G.create({
@@ -11530,7 +11530,7 @@ const Tf = G.create({
11530
11530
  addProseMirrorPlugins() {
11531
11531
  return [
11532
11532
  new oe({
11533
- key: new Ce("tiptapDrop"),
11533
+ key: new we("tiptapDrop"),
11534
11534
  props: {
11535
11535
  handleDrop: (r, e, t, n) => {
11536
11536
  this.editor.emit("drop", {
@@ -11549,14 +11549,14 @@ const Tf = G.create({
11549
11549
  addProseMirrorPlugins() {
11550
11550
  return [
11551
11551
  new oe({
11552
- key: new Ce("editable"),
11552
+ key: new we("editable"),
11553
11553
  props: {
11554
11554
  editable: () => this.editor.options.editable
11555
11555
  }
11556
11556
  })
11557
11557
  ];
11558
11558
  }
11559
- }), Af = new Ce("focusEvents"), Nf = G.create({
11559
+ }), Af = new we("focusEvents"), Nf = G.create({
11560
11560
  name: "focusEvents",
11561
11561
  addProseMirrorPlugins() {
11562
11562
  const { editor: r } = this;
@@ -11635,7 +11635,7 @@ const Tf = G.create({
11635
11635
  // This is an alternative to ProseMirror's `AllSelection`, which doesn’t work well
11636
11636
  // with many other commands.
11637
11637
  new oe({
11638
- key: new Ce("clearDocument"),
11638
+ key: new we("clearDocument"),
11639
11639
  appendTransaction: (r, e, t) => {
11640
11640
  if (r.some((m) => m.getMeta("composition")))
11641
11641
  return;
@@ -11663,7 +11663,7 @@ const Tf = G.create({
11663
11663
  addProseMirrorPlugins() {
11664
11664
  return [
11665
11665
  new oe({
11666
- key: new Ce("tiptapPaste"),
11666
+ key: new we("tiptapPaste"),
11667
11667
  props: {
11668
11668
  handlePaste: (r, e, t) => {
11669
11669
  this.editor.emit("paste", {
@@ -11681,7 +11681,7 @@ const Tf = G.create({
11681
11681
  addProseMirrorPlugins() {
11682
11682
  return [
11683
11683
  new oe({
11684
- key: new Ce("tabindex"),
11684
+ key: new we("tabindex"),
11685
11685
  props: {
11686
11686
  attributes: () => this.editor.isEditable ? { tabindex: "0" } : {}
11687
11687
  }
@@ -12490,7 +12490,7 @@ const zf = /^\s*>\s$/, $f = re.create({
12490
12490
  })
12491
12491
  ];
12492
12492
  }
12493
- }), jf = "listItem", Ms = "textStyle", Cs = /^\s*([-+*])\s$/, Jf = re.create({
12493
+ }), jf = "listItem", Ms = "textStyle", ws = /^\s*([-+*])\s$/, Jf = re.create({
12494
12494
  name: "bulletList",
12495
12495
  addOptions() {
12496
12496
  return {
@@ -12524,11 +12524,11 @@ const zf = /^\s*>\s$/, $f = re.create({
12524
12524
  },
12525
12525
  addInputRules() {
12526
12526
  let r = _t({
12527
- find: Cs,
12527
+ find: ws,
12528
12528
  type: this.type
12529
12529
  });
12530
12530
  return (this.options.keepMarks || this.options.keepAttributes) && (r = _t({
12531
- find: Cs,
12531
+ find: ws,
12532
12532
  type: this.type,
12533
12533
  keepMarks: this.options.keepMarks,
12534
12534
  keepAttributes: this.options.keepAttributes,
@@ -12695,7 +12695,7 @@ const zf = /^\s*>\s$/, $f = re.create({
12695
12695
  // this plugin creates a code block for pasted content from VS Code
12696
12696
  // we can also detect the copied code language
12697
12697
  new oe({
12698
- key: new Ce("codeBlockVSCodeHandler"),
12698
+ key: new we("codeBlockVSCodeHandler"),
12699
12699
  props: {
12700
12700
  handlePaste: (r, e) => {
12701
12701
  if (!e.clipboardData || this.editor.isActive(this.type.name))
@@ -13371,9 +13371,9 @@ function gh(r, e, t, n) {
13371
13371
  if (t.steps.length == 0)
13372
13372
  return r;
13373
13373
  if (o && o.getMeta(nt))
13374
- return o.getMeta(nt).redo ? new Ie(r.done.addTransform(t, void 0, n, bn(e)), r.undone, ws(t.mapping.maps), r.prevTime, r.prevComposition) : new Ie(r.done, r.undone.addTransform(t, void 0, n, bn(e)), null, r.prevTime, r.prevComposition);
13374
+ return o.getMeta(nt).redo ? new Ie(r.done.addTransform(t, void 0, n, bn(e)), r.undone, Cs(t.mapping.maps), r.prevTime, r.prevComposition) : new Ie(r.done, r.undone.addTransform(t, void 0, n, bn(e)), null, r.prevTime, r.prevComposition);
13375
13375
  if (t.getMeta("addToHistory") !== !1 && !(o && o.getMeta("addToHistory") === !1)) {
13376
- let l = t.getMeta("composition"), a = r.prevTime == 0 || !o && r.prevComposition != l && (r.prevTime < (t.time || 0) - n.newGroupDelay || !yh(t, r.prevRanges)), c = o ? hr(r.prevRanges, t.mapping) : ws(t.mapping.maps);
13376
+ let l = t.getMeta("composition"), a = r.prevTime == 0 || !o && r.prevComposition != l && (r.prevTime < (t.time || 0) - n.newGroupDelay || !yh(t, r.prevRanges)), c = o ? hr(r.prevRanges, t.mapping) : Cs(t.mapping.maps);
13377
13377
  return new Ie(r.done.addTransform(t, a ? e.selection.getBookmark() : void 0, n, bn(e)), ge.empty, c, t.time, l ?? r.prevComposition);
13378
13378
  } else return (s = t.getMeta("rebased")) ? new Ie(r.done.rebased(t, s), r.undone.rebased(t, s), hr(r.prevRanges, t.mapping), r.prevTime, r.prevComposition) : new Ie(r.done.addMaps(t.mapping.maps), r.undone.addMaps(t.mapping.maps), hr(r.prevRanges, t.mapping), r.prevTime, r.prevComposition);
13379
13379
  }
@@ -13388,7 +13388,7 @@ function yh(r, e) {
13388
13388
  n <= e[s + 1] && i >= e[s] && (t = !0);
13389
13389
  }), t;
13390
13390
  }
13391
- function ws(r) {
13391
+ function Cs(r) {
13392
13392
  let e = [];
13393
13393
  for (let t = r.length - 1; t >= 0 && e.length == 0; t--)
13394
13394
  r[t].forEach((n, i, s, o) => e.push(s, o));
@@ -13424,7 +13424,7 @@ function bn(r) {
13424
13424
  }
13425
13425
  return pr;
13426
13426
  }
13427
- const nt = new Ce("history"), kh = new Ce("closeHistory");
13427
+ const nt = new we("history"), kh = new we("closeHistory");
13428
13428
  function xh(r = {}) {
13429
13429
  return r = {
13430
13430
  depth: r.depth || 100,
@@ -13543,7 +13543,7 @@ const xl = kl(!1, !0), Sl = kl(!0, !0), Sh = G.create({
13543
13543
  })
13544
13544
  ];
13545
13545
  }
13546
- }), Ch = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, wh = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, Th = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, Oh = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, Eh = Me.create({
13546
+ }), wh = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, Ch = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, Th = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, Oh = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, Eh = Me.create({
13547
13547
  name: "italic",
13548
13548
  addOptions() {
13549
13549
  return {
@@ -13587,7 +13587,7 @@ const xl = kl(!1, !0), Sl = kl(!0, !0), Sh = G.create({
13587
13587
  addInputRules() {
13588
13588
  return [
13589
13589
  lt({
13590
- find: Ch,
13590
+ find: wh,
13591
13591
  type: this.type
13592
13592
  }),
13593
13593
  lt({
@@ -13599,7 +13599,7 @@ const xl = kl(!1, !0), Sl = kl(!0, !0), Sh = G.create({
13599
13599
  addPasteRules() {
13600
13600
  return [
13601
13601
  at({
13602
- find: wh,
13602
+ find: Ch,
13603
13603
  type: this.type
13604
13604
  }),
13605
13605
  at({
@@ -14027,7 +14027,7 @@ const xl = kl(!1, !0), Sl = kl(!0, !0), Sh = G.create({
14027
14027
  ];
14028
14028
  }
14029
14029
  });
14030
- var ie, en, tn, de, $r, Ml, Cl, wl, Tl;
14030
+ var ie, en, tn, de, $r, Ml, wl, Cl, Tl;
14031
14031
  class Kh extends $l {
14032
14032
  constructor() {
14033
14033
  super();
@@ -14037,7 +14037,7 @@ class Kh extends $l {
14037
14037
  B(this, tn, null);
14038
14038
  }
14039
14039
  connectedCallback() {
14040
- super.connectedCallback() && (A(this, de, Ml).call(this), A(this, de, Cl).call(this), A(this, de, $r).call(this));
14040
+ super.connectedCallback() && (A(this, de, Ml).call(this), A(this, de, wl).call(this), A(this, de, $r).call(this));
14041
14041
  }
14042
14042
  get value() {
14043
14043
  return v(this, ie).getHTML();
@@ -14082,7 +14082,7 @@ $r = function() {
14082
14082
  const t = kn.getComponentCssPath("nineEditor.css"), n = t ? `@import "${t}";` : "";
14083
14083
  this.shadowRoot.innerHTML = `
14084
14084
  <style>
14085
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.137/dist/css/nineEditor.css";
14085
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.139/dist/css/nineEditor.css";
14086
14086
  ${n}
14087
14087
  </style>
14088
14088
 
@@ -14121,7 +14121,7 @@ $r = function() {
14121
14121
  const s = i.target.value;
14122
14122
  console.log(i.target, s), v(this, ie).chain().focus().setMark("textStyle", { fontSize: s }).run();
14123
14123
  };
14124
- }, Cl = function() {
14124
+ }, wl = function() {
14125
14125
  X(this, ie, new Bf({
14126
14126
  element: v(this, en),
14127
14127
  editable: !this.readonly,
@@ -14154,10 +14154,10 @@ $r = function() {
14154
14154
  this.dispatchEvent(new CustomEvent("change", { detail: t.getHTML() }));
14155
14155
  },
14156
14156
  onSelectionUpdate: ({ editor: t }) => {
14157
- this.readonly || A(this, de, wl).call(this, t);
14157
+ this.readonly || A(this, de, Cl).call(this, t);
14158
14158
  }
14159
14159
  })), A(this, de, Tl).call(this);
14160
- }, wl = function(t) {
14160
+ }, Cl = function(t) {
14161
14161
  this.shadowRoot.querySelectorAll("[data-cmd]").forEach((o) => {
14162
14162
  t.isActive(o.dataset.cmd) ? o.classList.add("is-active") : o.classList.remove("is-active");
14163
14163
  }), this.shadowRoot.querySelectorAll("[data-align]").forEach((o) => {
@@ -14229,7 +14229,7 @@ kt = new WeakMap(), xt = new WeakMap(), ye = new WeakSet(), Ol = async function(
14229
14229
  const t = this.getAttribute("lang") || "Bash", n = this.getAttribute("code") || this.textContent.trim() || "", i = this.getAttribute("css-path");
14230
14230
  v(this, xt).innerHTML = `
14231
14231
  <style>
14232
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.137/dist/css/nine-code-block.css";
14232
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.139/dist/css/nine-code-block.css";
14233
14233
  ${i ? `@import "${i}";` : ""}
14234
14234
  </style>
14235
14235
 
@@ -14253,18 +14253,18 @@ kt = new WeakMap(), xt = new WeakMap(), ye = new WeakSet(), Ol = async function(
14253
14253
  return n.textContent = t, n.innerHTML;
14254
14254
  };
14255
14255
  typeof window < "u" && (customElements.get("nine-code-block") || customElements.define("nine-code-block", _h));
14256
- var St, Mt, Ct, $, Al, Nl, Fr, Vr, Hr, vl, Wr;
14256
+ var St, Mt, wt, $, Al, Nl, Fr, Vr, Hr, vl, Wr;
14257
14257
  class Gh extends HTMLElement {
14258
14258
  constructor() {
14259
14259
  super();
14260
14260
  B(this, $);
14261
14261
  B(this, St);
14262
14262
  B(this, Mt);
14263
- B(this, Ct, []);
14263
+ B(this, wt, []);
14264
14264
  this.attachShadow({ mode: "open" });
14265
14265
  }
14266
14266
  set data(t) {
14267
- X(this, Ct, t), A(this, $, Nl).call(this), A(this, $, Hr).call(this);
14267
+ X(this, wt, t), A(this, $, Nl).call(this), A(this, $, Hr).call(this);
14268
14268
  }
14269
14269
  connectedCallback() {
14270
14270
  A(this, $, Al).call(this), setTimeout(() => A(this, $, Hr).call(this), 300);
@@ -14280,16 +14280,16 @@ class Gh extends HTMLElement {
14280
14280
  A(this, $, Fr).call(this, "collapse"), document.body.style.width = `calc(100% - ${v(this, St)}px)`;
14281
14281
  }
14282
14282
  }
14283
- St = new WeakMap(), Mt = new WeakMap(), Ct = new WeakMap(), $ = new WeakSet(), Al = function() {
14283
+ St = new WeakMap(), Mt = new WeakMap(), wt = new WeakMap(), $ = new WeakSet(), Al = function() {
14284
14284
  X(this, St, Number(this.getAttribute("min-width") || 48)), X(this, Mt, Number(this.getAttribute("max-width") || 256));
14285
14285
  const t = kn.getComponentCssPath("nineMenu.css");
14286
14286
  this.shadowRoot.innerHTML = `
14287
14287
  <style>
14288
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.137/dist/css/nineMenu.css";
14288
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.139/dist/css/nineMenu.css";
14289
14289
  ${t ? `@import "${t}";` : ""}
14290
- :host {
14291
- --min-width: ${v(this, St)}px;
14292
- --max-width: ${v(this, Mt)}px;
14290
+ :host {
14291
+ --min-width: ${v(this, St)}px;
14292
+ --max-width: ${v(this, Mt)}px;
14293
14293
  display: flex;
14294
14294
  flex-direction: column;
14295
14295
  }
@@ -14297,16 +14297,16 @@ St = new WeakMap(), Mt = new WeakMap(), Ct = new WeakMap(), $ = new WeakSet(), A
14297
14297
  <slot name="head"></slot>
14298
14298
  <div class="body-wrapper" style="height: 100%; overflow: auto;"><slot></slot></div>
14299
14299
  <slot name="foot"></slot>
14300
- `, this.addEventListener("mouseenter", () => A(this, $, Fr).call(this, "hover")), this.addEventListener("mouseleave", () => A(this, $, Vr).call(this, "hover")), document.documentElement.style.overflowX = "hidden", document.body.style.float = "right", document.body.style.transition = "width 0.5s ease-in-out", this.collapse();
14300
+ `, this.addEventListener("mouseover", () => A(this, $, Fr).call(this, "hover")), this.addEventListener("mouseout", () => A(this, $, Vr).call(this, "hover")), document.body.style.float = "right", document.body.style.transition = "width 0.5s ease-in-out", this.collapse();
14301
14301
  }, Nl = function() {
14302
- if (!v(this, Ct).length) return;
14302
+ if (!v(this, wt).length) return;
14303
14303
  let t = this.querySelector("nine-side-menu-body");
14304
14304
  if (!t) {
14305
14305
  t = document.createElement("nine-side-menu-body");
14306
14306
  const n = this.querySelector("nine-side-menu-head");
14307
14307
  n ? n.after(t) : this.prepend(t);
14308
14308
  }
14309
- t.innerHTML = v(this, Ct).map((n) => {
14309
+ t.innerHTML = v(this, wt).map((n) => {
14310
14310
  const i = n.level === 1, s = n.isNew ? '<span style="color:#ff5722;margin-left:4px;">●</span>' : "";
14311
14311
  return `<nine-side-menu-item type="${i ? "group" : "item"}"
14312
14312
  icon-class="${i ? "icon-home" : "icon-base"}"
@@ -14314,8 +14314,7 @@ St = new WeakMap(), Mt = new WeakMap(), Ct = new WeakMap(), $ = new WeakSet(), A
14314
14314
  ${n.name}${s}
14315
14315
  </nine-side-menu-item>`;
14316
14316
  }).join("");
14317
- }, // πŸ’‘ [κΈ°μ‘΄ 둜직 볡원] 클래슀 일괄 μ „νŒŒ 처리 λ©”μ„œλ“œ
14318
- Fr = function(t) {
14317
+ }, Fr = function(t) {
14319
14318
  this.classList.add(t), this.querySelectorAll("nine-side-menu-head, nine-side-menu-foot, nine-side-menu-body, nine-side-menu-item").forEach((n) => {
14320
14319
  n.classList.add(t);
14321
14320
  });
@@ -14323,8 +14322,7 @@ Fr = function(t) {
14323
14322
  this.classList.remove(t), this.querySelectorAll("nine-side-menu-head, nine-side-menu-foot, nine-side-menu-body, nine-side-menu-item").forEach((n) => {
14324
14323
  n.classList.remove(t);
14325
14324
  });
14326
- }, // πŸ’‘ [κΈ°μ‘΄ 둜직 볡원] URL μžλ™ λ§€μΉ­ 및 ν™œμ„±ν™”
14327
- Hr = function() {
14325
+ }, Hr = function() {
14328
14326
  if (this.querySelector("nine-side-menu-item.active")) return;
14329
14327
  const t = window.location.pathname, n = this.querySelector(`nine-side-menu-item[href="${t}"]`);
14330
14328
  n && (n.classList.add("active"), A(this, $, vl).call(this, n));
@@ -14345,10 +14343,19 @@ Hr = function() {
14345
14343
  };
14346
14344
  class Yh extends HTMLElement {
14347
14345
  connectedCallback() {
14348
- const e = this.innerHTML.trim();
14346
+ const e = this.getAttribute("icon-color") || "#eee", t = this.innerHTML.trim();
14349
14347
  this.innerHTML = `
14350
- <div class="logo-box">${e}</div>
14351
- <div class="icon-box">
14348
+ <style>
14349
+ :host {
14350
+ --icon-color: ${e};
14351
+ }
14352
+ </style>
14353
+
14354
+ <div class="logo-box">
14355
+ ${t}
14356
+ </div>
14357
+
14358
+ <div class="icon-box">
14352
14359
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="icon" viewBox="0 0 16 16">
14353
14360
  <path d="M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"/>
14354
14361
  </svg>
@@ -14358,20 +14365,53 @@ class Yh extends HTMLElement {
14358
14365
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="icon" viewBox="0 0 16 16">
14359
14366
  <path fill-rule="evenodd" d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5"/>
14360
14367
  </svg>
14361
- </div>`;
14362
- const t = this.closest("nine-side-menu");
14363
- if (!t) return;
14364
- const n = this.querySelectorAll(".icon");
14365
- n[0] && (n[0].onclick = (i) => {
14366
- i.stopPropagation(), t.expand();
14367
- }), n[1] && (n[1].onclick = (i) => {
14368
- i.stopPropagation(), t.collapse();
14369
- }), n[2] && (n[2].onclick = (i) => {
14370
- i.stopPropagation(), t.collapse();
14371
- });
14368
+ </div>
14369
+ `;
14370
+ const n = this.closest("nine-side-menu");
14371
+ n && (this.querySelector(".icon:nth-of-type(1)").addEventListener("click", (i) => {
14372
+ n.expand();
14373
+ }), this.querySelectorAll(".icon:nth-of-type(2),.icon:nth-of-type(3)").forEach((i) => {
14374
+ i.addEventListener("click", (s) => {
14375
+ n.collapse();
14376
+ });
14377
+ }));
14372
14378
  }
14373
14379
  }
14374
14380
  class Xh extends HTMLElement {
14381
+ connectedCallback() {
14382
+ const e = this.getAttribute("icon-color") || "#eee", t = this.innerHTML.trim();
14383
+ this.innerHTML = `
14384
+ <style>
14385
+ :host {
14386
+ --icon-color: ${e};
14387
+ }
14388
+ </style>
14389
+
14390
+ <div class="logo-box">
14391
+ ${t}
14392
+ </div>
14393
+
14394
+ <div class="icon-box">
14395
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="icon" viewBox="0 0 16 16">
14396
+ <path d="M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"/>
14397
+ </svg>
14398
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="icon" viewBox="0 0 16 16">
14399
+ <path fill-rule="evenodd" d="M6 12.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m-4-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5m4-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m-4-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5"/>
14400
+ </svg>
14401
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" class="icon" viewBox="0 0 16 16">
14402
+ <path fill-rule="evenodd" d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5m0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5"/>
14403
+ </svg>
14404
+ </div>
14405
+ `;
14406
+ const n = this.closest("nine-side-menu");
14407
+ n && (this.querySelector(".icon:nth-of-type(1)").addEventListener("click", () => {
14408
+ n.expand();
14409
+ }), this.querySelectorAll(".icon:nth-of-type(2), .icon:nth-of-type(3)").forEach((i) => {
14410
+ i.addEventListener("click", (s) => {
14411
+ n.collapse();
14412
+ });
14413
+ }));
14414
+ }
14375
14415
  }
14376
14416
  class Zh extends HTMLElement {
14377
14417
  }
@@ -14379,7 +14419,7 @@ class Qh extends HTMLElement {
14379
14419
  connectedCallback() {
14380
14420
  const e = this.getAttribute("type") || "item", t = this.getAttribute("icon-class") || "icon-base";
14381
14421
  this.classList.add(e), this.classList.add("collapse");
14382
- const n = e === "group" ? '<div class="expand-icon" style="cursor:pointer; margin-left:auto;"></div>' : "";
14422
+ const n = e === "group" ? '<div class="expand-icon"></div>' : "";
14383
14423
  this.innerHTML = `
14384
14424
  <li>
14385
14425
  <div class="icon ${t}"></div>
@@ -14406,7 +14446,7 @@ class Qh extends HTMLElement {
14406
14446
  const on = (r, e) => !customElements.get(r) && customElements.define(r, e);
14407
14447
  on("nine-side-menu", Gh);
14408
14448
  on("nine-side-menu-head", Yh);
14409
- on("nine-side-menu-body", Xh);
14410
- on("nine-side-menu-foot", Zh);
14449
+ on("nine-side-menu-body", Zh);
14450
+ on("nine-side-menu-foot", Xh);
14411
14451
  on("nine-side-menu-item", Qh);
14412
14452
  typeof window < "u" && (customElements.get("nine-editor") || customElements.define("nine-editor", Kh));