@nine-lab/nine-ux 0.1.57 → 0.1.59

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.
@@ -320,55 +320,66 @@ const wl = `
320
320
  }
321
321
 
322
322
 
323
- /* 1. 기본 애니메이션 설정 */
323
+ /* --- Animation Core --- */
324
324
  :host {
325
- --animation-duration: 0.3s;
325
+ --nx-duration: 0.4s;
326
+ --nx-timing: cubic-bezier(0.34, 1.56, 0.64, 1); /* 탄력 있는 효과 */
326
327
  }
327
328
 
328
329
  dialog {
329
- transition: opacity var(--animation-duration) ease,
330
- transform var(--animation-duration) cubic-bezier(0.34, 1.56, 0.64, 1);
330
+ opacity: 0;
331
331
  }
332
332
 
333
- /* 2. Fade In 효과 */
334
- :host(.fade-in) dialog {
335
- animation: fade-in var(--animation-duration) forwards;
336
- }
333
+ /* 1. Fade (서서히 나타남) */
334
+ :host(.fade) dialog { animation: nx-fade-in var(--nx-duration) forwards; }
335
+ @keyframes nx-fade-in { from { opacity: 0; } to { opacity: 1; } }
337
336
 
338
- @keyframes fade-in {
339
- from { opacity: 0; }
340
- to { opacity: 1; }
341
- }
337
+ /* 2. Zoom (커지며 나타남) */
338
+ :host(.zoom) dialog { animation: nx-zoom-in var(--nx-duration) var(--nx-timing) forwards; }
339
+ @keyframes nx-zoom-in { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }
342
340
 
343
- /* 3. Zoom In 효과 */
344
- :host(.zoom-in) dialog {
345
- animation: zoom-in var(--animation-duration) forwards;
346
- }
341
+ /* 3. Slide (상하좌우) */
342
+ :host(.moveUp) dialog { animation: nx-move-up var(--nx-duration) var(--nx-timing) forwards; }
343
+ :host(.moveDown) dialog { animation: nx-move-down var(--nx-duration) var(--nx-timing) forwards; }
344
+ :host(.moveLeft) dialog { animation: nx-move-left var(--nx-duration) var(--nx-timing) forwards; }
345
+ :host(.moveRight) dialog { animation: nx-move-right var(--nx-duration) var(--nx-timing) forwards; }
347
346
 
348
- @keyframes zoom-in {
349
- from { opacity: 0; transform: scale(0.8); }
350
- to { opacity: 1; transform: scale(1); }
351
- }
347
+ @keyframes nx-move-up { from { opacity: 0; transform: translateY(100px); } to { opacity: 1; transform: translateY(0); } }
348
+ @keyframes nx-move-down { from { opacity: 0; transform: translateY(-100px); } to { opacity: 1; transform: translateY(0); } }
349
+ @keyframes nx-move-left { from { opacity: 0; transform: translateX(100px); } to { opacity: 1; transform: translateX(0); } }
350
+ @keyframes nx-move-right { from { opacity: 0; transform: translateX(-100px); } to { opacity: 1; transform: translateY(0); } }
352
351
 
353
- /* 4. 닫기 애니메이션 (out 클래스 대응) */
354
- dialog.out {
355
- animation: fade-out var(--animation-duration) forwards;
356
- pointer-events: none;
352
+ /* 4. Shake (에러 흔들림) */
353
+ :host(.shake) dialog { animation: nx-shake 0.4s linear forwards; opacity: 1; }
354
+ @keyframes nx-shake {
355
+ 0%, 100% { transform: translateX(0); }
356
+ 25% { transform: translateX(-10px); }
357
+ 50% { transform: translateX(10px); }
358
+ 75% { transform: translateX(-10px); }
357
359
  }
358
360
 
359
- @keyframes fade-out {
360
- from { opacity: 1; transform: scale(1); }
361
- to { opacity: 0; transform: scale(0.95); }
361
+ /* 5. Road Runner (왼쪽에서 튀어나와 오른쪽으로 도망) */
362
+ :host(.roadRunner) dialog { animation: roadRunnerIn 0.5s var(--nx-timing) forwards; }
363
+ @keyframes roadRunnerIn {
364
+ 0% { transform: translateX(-1500px) skewX(30deg); opacity: 1; }
365
+ 70% { transform: translateX(30px) skewX(0deg); opacity: 1; }
366
+ 100% { transform: translateX(0); opacity: 1; }
362
367
  }
363
368
 
364
- /* 5. 백드롭(배경) 애니메이션 */
365
- dialog::backdrop {
366
- transition: opacity var(--animation-duration) ease;
367
- }
369
+ /* --- Out Animations (닫힐 때) --- */
370
+ dialog.out { pointer-events: none; }
368
371
 
369
- :host(.fade-in) dialog::backdrop {
370
- background: rgba(0, 0, 0, 0.3);
372
+ /* Road Runner 전용 퇴장 (오른쪽으로 광속 탈출) */
373
+ :host(.roadRunner) dialog.out { animation: roadRunnerOut 0.5s ease-in forwards; }
374
+ @keyframes roadRunnerOut {
375
+ 0% { transform: translateX(0); opacity: 1; }
376
+ 30% { transform: translateX(-30px) skewX(-30deg); opacity: 1; }
377
+ 100% { transform: translateX(1500px) skewX(-30deg); opacity: 0; }
371
378
  }
379
+
380
+ /* 일반 퇴장 (기본) */
381
+ dialog.out { animation: nx-fade-out 0.3s forwards; }
382
+ @keyframes nx-fade-out { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(0.9); } }
372
383
  `;
373
384
  var Oe, j, Nn, An, Dn;
374
385
  class Cl extends HTMLElement {
@@ -575,11 +586,18 @@ jt = new WeakMap(), Kt = new WeakSet(), hr = function(e, t, r, i) {
575
586
  const s = { class: i, animation: "fade-in" }, o = e === "alert" ? pn : hn;
576
587
  let l = !1;
577
588
  const a = {
589
+ // 테마
578
590
  rgb: () => (s.class = "rgb", a),
579
591
  classic: () => (s.class = "classic", a),
580
- fade: () => (s.animation = "fade-in", a),
581
- zoom: () => (s.animation = "zoom-in", a),
582
- // await 사용 호출됨
592
+ // 애니메이션 메서드들
593
+ fade: () => (s.animation = "fade", a),
594
+ zoom: () => (s.animation = "zoom", a),
595
+ up: () => (s.animation = "moveUp", a),
596
+ down: () => (s.animation = "moveDown", a),
597
+ left: () => (s.animation = "moveLeft", a),
598
+ right: () => (s.animation = "moveRight", a),
599
+ shake: () => (s.animation = "shake", a),
600
+ run: () => (s.animation = "roadRunner", a),
583
601
  then: (c, d) => (l = !0, o[e](t, r, s).then(c, d))
584
602
  };
585
603
  return Promise.resolve().then(() => {
@@ -1249,7 +1267,7 @@ class k {
1249
1267
  @internal
1250
1268
  */
1251
1269
  insertAt(e, t) {
1252
- let r = Es(this.content, e + this.openStart, t);
1270
+ let r = vs(this.content, e + this.openStart, t);
1253
1271
  return r && new k(r, this.openStart, this.openEnd);
1254
1272
  }
1255
1273
  /**
@@ -1315,31 +1333,31 @@ function Os(n, e, t) {
1315
1333
  throw new RangeError("Removing non-flat range");
1316
1334
  return n.replaceChild(r, s.copy(Os(s.content, e - i - 1, t - i - 1)));
1317
1335
  }
1318
- function Es(n, e, t, r) {
1336
+ function vs(n, e, t, r) {
1319
1337
  let { index: i, offset: s } = n.findIndex(e), o = n.maybeChild(i);
1320
1338
  if (s == e || o.isText)
1321
1339
  return r && !r.canReplace(i, i, t) ? null : n.cut(0, e).append(t).append(n.cut(e));
1322
- let l = Es(o.content, e - s - 1, t, o);
1340
+ let l = vs(o.content, e - s - 1, t, o);
1323
1341
  return l && n.replaceChild(i, o.copy(l));
1324
1342
  }
1325
- function El(n, e, t) {
1343
+ function vl(n, e, t) {
1326
1344
  if (t.openStart > n.depth)
1327
1345
  throw new gn("Inserted content deeper than insertion position");
1328
1346
  if (n.depth - t.openStart != e.depth - t.openEnd)
1329
1347
  throw new gn("Inconsistent open depths");
1330
- return vs(n, e, t, 0);
1348
+ return Es(n, e, t, 0);
1331
1349
  }
1332
- function vs(n, e, t, r) {
1350
+ function Es(n, e, t, r) {
1333
1351
  let i = n.index(r), s = n.node(r);
1334
1352
  if (i == e.index(r) && r < n.depth - t.openStart) {
1335
- let o = vs(n, e, t, r + 1);
1353
+ let o = Es(n, e, t, r + 1);
1336
1354
  return s.copy(s.content.replaceChild(i, o));
1337
1355
  } else if (t.content.size)
1338
1356
  if (!t.openStart && !t.openEnd && n.depth == r && e.depth == r) {
1339
1357
  let o = n.parent, l = o.content;
1340
1358
  return et(o, l.cut(0, n.parentOffset).append(t.content).append(l.cut(e.parentOffset)));
1341
1359
  } else {
1342
- let { start: o, end: l } = vl(t, n);
1360
+ let { start: o, end: l } = El(t, n);
1343
1361
  return et(s, As(n, o, l, e, r));
1344
1362
  }
1345
1363
  else return et(s, yn(n, e, r));
@@ -1378,7 +1396,7 @@ function yn(n, e, t) {
1378
1396
  }
1379
1397
  return Nt(e, null, t, r), new b(r);
1380
1398
  }
1381
- function vl(n, e) {
1399
+ function El(n, e) {
1382
1400
  let t = e.depth - n.openStart, i = e.node(t).copy(n.content);
1383
1401
  for (let s = t - 1; s >= 0; s--)
1384
1402
  i = e.node(s).copy(b.from(i));
@@ -1842,7 +1860,7 @@ let Fe = class br {
1842
1860
  [`ReplaceError`](https://prosemirror.net/docs/ref/#model.ReplaceError) is thrown.
1843
1861
  */
1844
1862
  replace(e, t, r) {
1845
- return El(this.resolve(e), this.resolve(t), r);
1863
+ return vl(this.resolve(e), this.resolve(t), r);
1846
1864
  }
1847
1865
  /**
1848
1866
  Find the node directly after the given position.
@@ -3503,13 +3521,13 @@ function cn(n, e, t, r) {
3503
3521
  return { dom: a, contentDOM: l };
3504
3522
  }
3505
3523
  const Ws = 65535, qs = Math.pow(2, 16);
3506
- function Yl(n, e) {
3524
+ function Xl(n, e) {
3507
3525
  return n + e * qs;
3508
3526
  }
3509
3527
  function ki(n) {
3510
3528
  return n & Ws;
3511
3529
  }
3512
- function Xl(n) {
3530
+ function Yl(n) {
3513
3531
  return (n - (n & Ws)) / qs;
3514
3532
  }
3515
3533
  const js = 1, Ks = 2, dn = 4, Js = 8;
@@ -3567,7 +3585,7 @@ class le {
3567
3585
  if (!this.inverted)
3568
3586
  for (let i = 0; i < r; i++)
3569
3587
  t += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];
3570
- return this.ranges[r * 3] + t + Xl(e);
3588
+ return this.ranges[r * 3] + t + Yl(e);
3571
3589
  }
3572
3590
  mapResult(e, t = 1) {
3573
3591
  return this._map(e, t, !1);
@@ -3589,7 +3607,7 @@ class le {
3589
3607
  let f = c ? e == a ? -1 : e == u ? 1 : t : t, h = a + i + (f < 0 ? 0 : d);
3590
3608
  if (r)
3591
3609
  return h;
3592
- let p = e == (t < 0 ? a : u) ? null : Yl(l / 3, e - a), m = e == a ? Ks : e == u ? js : dn;
3610
+ let p = e == (t < 0 ? a : u) ? null : Xl(l / 3, e - a), m = e == a ? Ks : e == u ? js : dn;
3593
3611
  return (t < 0 ? e != a : e != u) && (m |= Js), new xr(h, m, p);
3594
3612
  }
3595
3613
  i += d - c;
@@ -4297,7 +4315,7 @@ function la(n, e, t, r, i) {
4297
4315
  throw new RangeError("Invalid content for node type " + t.name);
4298
4316
  n.step(new $(e, e + s.nodeSize, e + 1, e + s.nodeSize - 1, new k(b.from(o), 0, 0), 1, !0));
4299
4317
  }
4300
- function ve(n, e, t = 1, r) {
4318
+ function Ee(n, e, t = 1, r) {
4301
4319
  let i = n.resolve(e), s = i.depth - t, o = r && r[r.length - 1] || i.parent;
4302
4320
  if (s < 0 || i.parent.type.spec.isolating || !i.parent.canReplace(i.index(), i.parent.childCount) || !o.type.validContent(i.parent.content.cutByIndex(i.index(), i.parent.childCount)))
4303
4321
  return !1;
@@ -4392,7 +4410,7 @@ function ua(n, e, t) {
4392
4410
  }
4393
4411
  return null;
4394
4412
  }
4395
- function Ys(n, e, t) {
4413
+ function Xs(n, e, t) {
4396
4414
  let r = n.resolve(e);
4397
4415
  if (!t.content.size)
4398
4416
  return e;
@@ -4417,9 +4435,9 @@ function Bn(n, e, t = e, r = k.empty) {
4417
4435
  if (e == t && !r.size)
4418
4436
  return null;
4419
4437
  let i = n.resolve(e), s = n.resolve(t);
4420
- return Xs(i, s, r) ? new P(e, t, r) : new fa(i, s, r).fit();
4438
+ return Ys(i, s, r) ? new P(e, t, r) : new fa(i, s, r).fit();
4421
4439
  }
4422
- function Xs(n, e, t) {
4440
+ function Ys(n, e, t) {
4423
4441
  return !t.openStart && !t.openEnd && n.start() == e.start() && n.parent.canReplace(n.index(), e.index(), t.content);
4424
4442
  }
4425
4443
  class fa {
@@ -4468,7 +4486,7 @@ class fa {
4468
4486
  for (let t = 1; t <= 2; t++)
4469
4487
  for (let r = t == 1 ? e : this.unplaced.openStart; r >= 0; r--) {
4470
4488
  let i, s = null;
4471
- r ? (s = Yn(this.unplaced.content, r - 1).firstChild, i = s.content) : i = this.unplaced.content;
4489
+ r ? (s = Xn(this.unplaced.content, r - 1).firstChild, i = s.content) : i = this.unplaced.content;
4472
4490
  let o = i.firstChild;
4473
4491
  for (let l = this.depth; l >= 0; l--) {
4474
4492
  let { type: a, match: c } = this.frontier[l], d, u = null;
@@ -4482,11 +4500,11 @@ class fa {
4482
4500
  }
4483
4501
  }
4484
4502
  openMore() {
4485
- let { content: e, openStart: t, openEnd: r } = this.unplaced, i = Yn(e, t);
4503
+ let { content: e, openStart: t, openEnd: r } = this.unplaced, i = Xn(e, t);
4486
4504
  return !i.childCount || i.firstChild.isLeaf ? !1 : (this.unplaced = new k(e, t + 1, Math.max(r, i.size + t >= e.size - r ? t + 1 : 0)), !0);
4487
4505
  }
4488
4506
  dropNode() {
4489
- let { content: e, openStart: t, openEnd: r } = this.unplaced, i = Yn(e, t);
4507
+ let { content: e, openStart: t, openEnd: r } = this.unplaced, i = Xn(e, t);
4490
4508
  if (i.childCount <= 1 && t > 0) {
4491
4509
  let s = e.size - t <= t + i.size;
4492
4510
  this.unplaced = new k(Ot(e, t - 1, 1), t - 1, s ? t - 1 : r);
@@ -4516,7 +4534,7 @@ class fa {
4516
4534
  c++, (c > 1 || a == 0 || m.content.size) && (u = g, d.push(Zs(m.mark(f.allowedMarks(m.marks)), c == 1 ? a : 0, c == l.childCount ? h : -1)));
4517
4535
  }
4518
4536
  let p = c == l.childCount;
4519
- p || (h = -1), this.placed = Et(this.placed, t, b.from(d)), this.frontier[t].match = u, p && h < 0 && r && r.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
4537
+ p || (h = -1), this.placed = vt(this.placed, t, b.from(d)), this.frontier[t].match = u, p && h < 0 && r && r.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
4520
4538
  for (let m = 0, g = l; m < h; m++) {
4521
4539
  let y = g.lastChild;
4522
4540
  this.frontier.push({ type: y.type, match: y.contentMatchAt(y.childCount) }), g = y.content;
@@ -4527,7 +4545,7 @@ class fa {
4527
4545
  if (!this.$to.parent.isTextblock)
4528
4546
  return -1;
4529
4547
  let e = this.frontier[this.depth], t;
4530
- if (!e.type.isTextblock || !Xn(this.$to, this.$to.depth, e.type, e.match, !1) || this.$to.depth == this.depth && (t = this.findCloseLevel(this.$to)) && t.depth == this.depth)
4548
+ if (!e.type.isTextblock || !Yn(this.$to, this.$to.depth, e.type, e.match, !1) || this.$to.depth == this.depth && (t = this.findCloseLevel(this.$to)) && t.depth == this.depth)
4531
4549
  return -1;
4532
4550
  let { depth: r } = this.$to, i = this.$to.after(r);
4533
4551
  for (; r > 1 && i == this.$to.end(--r); )
@@ -4536,10 +4554,10 @@ class fa {
4536
4554
  }
4537
4555
  findCloseLevel(e) {
4538
4556
  e: for (let t = Math.min(this.depth, e.depth); t >= 0; t--) {
4539
- let { match: r, type: i } = this.frontier[t], s = t < e.depth && e.end(t + 1) == e.pos + (e.depth - (t + 1)), o = Xn(e, t, i, r, s);
4557
+ let { match: r, type: i } = this.frontier[t], s = t < e.depth && e.end(t + 1) == e.pos + (e.depth - (t + 1)), o = Yn(e, t, i, r, s);
4540
4558
  if (o) {
4541
4559
  for (let l = t - 1; l >= 0; l--) {
4542
- let { match: a, type: c } = this.frontier[l], d = Xn(e, l, c, a, !0);
4560
+ let { match: a, type: c } = this.frontier[l], d = Yn(e, l, c, a, !0);
4543
4561
  if (!d || d.childCount)
4544
4562
  continue e;
4545
4563
  }
@@ -4553,7 +4571,7 @@ class fa {
4553
4571
  return null;
4554
4572
  for (; this.depth > t.depth; )
4555
4573
  this.closeFrontierNode();
4556
- t.fit.childCount && (this.placed = Et(this.placed, t.depth, t.fit)), e = t.move;
4574
+ t.fit.childCount && (this.placed = vt(this.placed, t.depth, t.fit)), e = t.move;
4557
4575
  for (let r = t.depth + 1; r <= e.depth; r++) {
4558
4576
  let i = e.node(r), s = i.type.contentMatch.fillBefore(i.content, !0, e.index(r));
4559
4577
  this.openFrontierNode(i.type, i.attrs, s);
@@ -4562,20 +4580,20 @@ class fa {
4562
4580
  }
4563
4581
  openFrontierNode(e, t = null, r) {
4564
4582
  let i = this.frontier[this.depth];
4565
- i.match = i.match.matchType(e), this.placed = Et(this.placed, this.depth, b.from(e.create(t, r))), this.frontier.push({ type: e, match: e.contentMatch });
4583
+ i.match = i.match.matchType(e), this.placed = vt(this.placed, this.depth, b.from(e.create(t, r))), this.frontier.push({ type: e, match: e.contentMatch });
4566
4584
  }
4567
4585
  closeFrontierNode() {
4568
4586
  let t = this.frontier.pop().match.fillBefore(b.empty, !0);
4569
- t.childCount && (this.placed = Et(this.placed, this.frontier.length, t));
4587
+ t.childCount && (this.placed = vt(this.placed, this.frontier.length, t));
4570
4588
  }
4571
4589
  }
4572
4590
  function Ot(n, e, t) {
4573
4591
  return e == 0 ? n.cutByIndex(t, n.childCount) : n.replaceChild(0, n.firstChild.copy(Ot(n.firstChild.content, e - 1, t)));
4574
4592
  }
4575
- function Et(n, e, t) {
4576
- return e == 0 ? n.append(t) : n.replaceChild(n.childCount - 1, n.lastChild.copy(Et(n.lastChild.content, e - 1, t)));
4593
+ function vt(n, e, t) {
4594
+ return e == 0 ? n.append(t) : n.replaceChild(n.childCount - 1, n.lastChild.copy(vt(n.lastChild.content, e - 1, t)));
4577
4595
  }
4578
- function Yn(n, e) {
4596
+ function Xn(n, e) {
4579
4597
  for (let t = 0; t < e; t++)
4580
4598
  n = n.firstChild.content;
4581
4599
  return n;
@@ -4586,7 +4604,7 @@ function Zs(n, e, t) {
4586
4604
  let r = n.content;
4587
4605
  return e > 1 && (r = r.replaceChild(0, Zs(r.firstChild, e - 1, r.childCount == 1 ? t - 1 : 0))), e > 0 && (r = n.type.contentMatch.fillBefore(r).append(r), t <= 0 && (r = r.append(n.type.contentMatch.matchFragment(r).fillBefore(b.empty, !0)))), n.copy(r);
4588
4606
  }
4589
- function Xn(n, e, t, r, i) {
4607
+ function Yn(n, e, t, r, i) {
4590
4608
  let s = n.node(e), o = i ? n.indexAfter(e) : n.index(e);
4591
4609
  if (o == s.childCount && !t.compatibleContent(s.type))
4592
4610
  return null;
@@ -4606,7 +4624,7 @@ function ma(n, e, t, r) {
4606
4624
  if (!r.size)
4607
4625
  return n.deleteRange(e, t);
4608
4626
  let i = n.doc.resolve(e), s = n.doc.resolve(t);
4609
- if (Xs(i, s, r))
4627
+ if (Ys(i, s, r))
4610
4628
  return n.step(new P(e, t, r));
4611
4629
  let o = eo(i, s);
4612
4630
  o[o.length - 1] == 0 && o.pop();
@@ -5029,7 +5047,7 @@ class ba {
5029
5047
  }
5030
5048
  }
5031
5049
  const Zn = /* @__PURE__ */ Object.create(null);
5032
- class E {
5050
+ class v {
5033
5051
  /**
5034
5052
  Initialize a selection with the head and anchor and ranges. If no
5035
5053
  ranges are given, constructs a single range across `$anchor` and
@@ -5193,7 +5211,7 @@ class E {
5193
5211
  return M.between(this.$anchor, this.$head).getBookmark();
5194
5212
  }
5195
5213
  }
5196
- E.prototype.visible = !0;
5214
+ v.prototype.visible = !0;
5197
5215
  class ka {
5198
5216
  /**
5199
5217
  Create a range.
@@ -5206,7 +5224,7 @@ let Si = !1;
5206
5224
  function Mi(n) {
5207
5225
  !Si && !n.parent.inlineContent && (Si = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + n.parent.type.name + ")"));
5208
5226
  }
5209
- class M extends E {
5227
+ class M extends v {
5210
5228
  /**
5211
5229
  Construct a text selection between the given points.
5212
5230
  */
@@ -5223,7 +5241,7 @@ class M extends E {
5223
5241
  map(e, t) {
5224
5242
  let r = e.resolve(t.map(this.head));
5225
5243
  if (!r.parent.inlineContent)
5226
- return E.near(r);
5244
+ return v.near(r);
5227
5245
  let i = e.resolve(t.map(this.anchor));
5228
5246
  return new M(i.parent.inlineContent ? i : r, r);
5229
5247
  }
@@ -5268,16 +5286,16 @@ class M extends E {
5268
5286
  static between(e, t, r) {
5269
5287
  let i = e.pos - t.pos;
5270
5288
  if ((!r || i) && (r = i >= 0 ? 1 : -1), !t.parent.inlineContent) {
5271
- let s = E.findFrom(t, r, !0) || E.findFrom(t, -r, !0);
5289
+ let s = v.findFrom(t, r, !0) || v.findFrom(t, -r, !0);
5272
5290
  if (s)
5273
5291
  t = s.$head;
5274
5292
  else
5275
- return E.near(t, r);
5293
+ return v.near(t, r);
5276
5294
  }
5277
- return e.parent.inlineContent || (i == 0 ? e = t : (e = (E.findFrom(e, -r, !0) || E.findFrom(e, r, !0)).$anchor, e.pos < t.pos != i < 0 && (e = t))), new M(e, t);
5295
+ return e.parent.inlineContent || (i == 0 ? e = t : (e = (v.findFrom(e, -r, !0) || v.findFrom(e, r, !0)).$anchor, e.pos < t.pos != i < 0 && (e = t))), new M(e, t);
5278
5296
  }
5279
5297
  }
5280
- E.jsonID("text", M);
5298
+ v.jsonID("text", M);
5281
5299
  class Ln {
5282
5300
  constructor(e, t) {
5283
5301
  this.anchor = e, this.head = t;
@@ -5289,7 +5307,7 @@ class Ln {
5289
5307
  return M.between(e.resolve(this.anchor), e.resolve(this.head));
5290
5308
  }
5291
5309
  }
5292
- class S extends E {
5310
+ class S extends v {
5293
5311
  /**
5294
5312
  Create a node selection. Does not verify the validity of its
5295
5313
  argument.
@@ -5300,7 +5318,7 @@ class S extends E {
5300
5318
  }
5301
5319
  map(e, t) {
5302
5320
  let { deleted: r, pos: i } = t.mapResult(this.anchor), s = e.resolve(i);
5303
- return r ? E.near(s) : new S(s);
5321
+ return r ? v.near(s) : new S(s);
5304
5322
  }
5305
5323
  content() {
5306
5324
  return new k(b.from(this.node), 0, 0);
@@ -5337,7 +5355,7 @@ class S extends E {
5337
5355
  }
5338
5356
  }
5339
5357
  S.prototype.visible = !1;
5340
- E.jsonID("node", S);
5358
+ v.jsonID("node", S);
5341
5359
  class Vr {
5342
5360
  constructor(e) {
5343
5361
  this.anchor = e;
@@ -5348,10 +5366,10 @@ class Vr {
5348
5366
  }
5349
5367
  resolve(e) {
5350
5368
  let t = e.resolve(this.anchor), r = t.nodeAfter;
5351
- return r && S.isSelectable(r) ? new S(t) : E.near(t);
5369
+ return r && S.isSelectable(r) ? new S(t) : v.near(t);
5352
5370
  }
5353
5371
  }
5354
- class ce extends E {
5372
+ class ce extends v {
5355
5373
  /**
5356
5374
  Create an all-selection over the given document.
5357
5375
  */
@@ -5361,7 +5379,7 @@ class ce extends E {
5361
5379
  replace(e, t = k.empty) {
5362
5380
  if (t == k.empty) {
5363
5381
  e.delete(0, e.doc.content.size);
5364
- let r = E.atStart(e.doc);
5382
+ let r = v.atStart(e.doc);
5365
5383
  r.eq(e.selection) || e.setSelection(r);
5366
5384
  } else
5367
5385
  super.replace(e, t);
@@ -5385,7 +5403,7 @@ class ce extends E {
5385
5403
  return xa;
5386
5404
  }
5387
5405
  }
5388
- E.jsonID("all", ce);
5406
+ v.jsonID("all", ce);
5389
5407
  const xa = {
5390
5408
  map() {
5391
5409
  return this;
@@ -5421,7 +5439,7 @@ function wi(n, e, t) {
5421
5439
  let s = n.mapping.maps[r], o;
5422
5440
  s.forEach((l, a, c, d) => {
5423
5441
  o == null && (o = d);
5424
- }), n.setSelection(E.near(n.doc.resolve(o), t));
5442
+ }), n.setSelection(v.near(n.doc.resolve(o), t));
5425
5443
  }
5426
5444
  const Ci = 1, nn = 2, Ti = 4;
5427
5445
  class Sa extends ba {
@@ -5536,7 +5554,7 @@ class Sa extends ba {
5536
5554
  let o = this.doc.resolve(t);
5537
5555
  s = r == t ? o.marks() : o.marksAcross(this.doc.resolve(r));
5538
5556
  }
5539
- return this.replaceRangeWith(t, r, i.text(e, s)), !this.selection.empty && this.selection.to == t + e.length && this.setSelection(E.near(this.selection.$to)), this;
5557
+ return this.replaceRangeWith(t, r, i.text(e, s)), !this.selection.empty && this.selection.to == t + e.length && this.setSelection(v.near(this.selection.$to)), this;
5540
5558
  }
5541
5559
  }
5542
5560
  /**
@@ -5578,13 +5596,13 @@ class Sa extends ba {
5578
5596
  function Oi(n, e) {
5579
5597
  return !e || !n ? n : n.bind(e);
5580
5598
  }
5581
- class vt {
5599
+ class Et {
5582
5600
  constructor(e, t, r) {
5583
5601
  this.name = e, this.init = Oi(t.init, r), this.apply = Oi(t.apply, r);
5584
5602
  }
5585
5603
  }
5586
5604
  const Ma = [
5587
- new vt("doc", {
5605
+ new Et("doc", {
5588
5606
  init(n) {
5589
5607
  return n.doc || n.schema.topNodeType.createAndFill();
5590
5608
  },
@@ -5592,15 +5610,15 @@ const Ma = [
5592
5610
  return n.doc;
5593
5611
  }
5594
5612
  }),
5595
- new vt("selection", {
5613
+ new Et("selection", {
5596
5614
  init(n, e) {
5597
- return n.selection || E.atStart(e.doc);
5615
+ return n.selection || v.atStart(e.doc);
5598
5616
  },
5599
5617
  apply(n) {
5600
5618
  return n.selection;
5601
5619
  }
5602
5620
  }),
5603
- new vt("storedMarks", {
5621
+ new Et("storedMarks", {
5604
5622
  init(n) {
5605
5623
  return n.storedMarks || null;
5606
5624
  },
@@ -5608,7 +5626,7 @@ const Ma = [
5608
5626
  return r.selection.$cursor ? n.storedMarks : null;
5609
5627
  }
5610
5628
  }),
5611
- new vt("scrollToSelection", {
5629
+ new Et("scrollToSelection", {
5612
5630
  init() {
5613
5631
  return 0;
5614
5632
  },
@@ -5622,7 +5640,7 @@ class Qn {
5622
5640
  this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = Ma.slice(), t && t.forEach((r) => {
5623
5641
  if (this.pluginsByKey[r.key])
5624
5642
  throw new RangeError("Adding different instances of a keyed plugin (" + r.key + ")");
5625
- this.plugins.push(r), this.pluginsByKey[r.key] = r, r.spec.state && this.fields.push(new vt(r.key, r.spec.state, r));
5643
+ this.plugins.push(r), this.pluginsByKey[r.key] = r, r.spec.state && this.fields.push(new Et(r.key, r.spec.state, r));
5626
5644
  });
5627
5645
  }
5628
5646
  }
@@ -5774,7 +5792,7 @@ class mt {
5774
5792
  if (o.name == "doc")
5775
5793
  s.doc = Fe.fromJSON(e.schema, t.doc);
5776
5794
  else if (o.name == "selection")
5777
- s.selection = E.fromJSON(s.doc, t.selection);
5795
+ s.selection = v.fromJSON(s.doc, t.selection);
5778
5796
  else if (o.name == "storedMarks")
5779
5797
  t.storedMarks && (s.storedMarks = t.storedMarks.map(e.schema.markFromJSON));
5780
5798
  else {
@@ -5852,15 +5870,15 @@ const Te = function(n, e, t) {
5852
5870
  }, wa = function() {
5853
5871
  Mr = null;
5854
5872
  }, ot = function(n, e, t, r) {
5855
- return t && (Ei(n, e, t, r, -1) || Ei(n, e, t, r, 1));
5873
+ return t && (vi(n, e, t, r, -1) || vi(n, e, t, r, 1));
5856
5874
  }, Ca = /^(img|br|input|textarea|hr)$/i;
5857
- function Ei(n, e, t, r, i) {
5875
+ function vi(n, e, t, r, i) {
5858
5876
  for (var s; ; ) {
5859
5877
  if (n == t && e == r)
5860
5878
  return !0;
5861
5879
  if (e == (i < 0 ? 0 : fe(n))) {
5862
5880
  let o = n.parentNode;
5863
- if (!o || o.nodeType != 1 || Xt(n) || Ca.test(n.nodeName) || n.contentEditable == "false")
5881
+ if (!o || o.nodeType != 1 || Yt(n) || Ca.test(n.nodeName) || n.contentEditable == "false")
5864
5882
  return !1;
5865
5883
  e = J(n) + (i < 0 ? 0 : 1), n = o;
5866
5884
  } else if (n.nodeType == 1) {
@@ -5887,7 +5905,7 @@ function Ta(n, e) {
5887
5905
  if (n.contentEditable == "false")
5888
5906
  return null;
5889
5907
  n = n.childNodes[e - 1], e = fe(n);
5890
- } else if (n.parentNode && !Xt(n))
5908
+ } else if (n.parentNode && !Yt(n))
5891
5909
  e = J(n), n = n.parentNode;
5892
5910
  else
5893
5911
  return null;
@@ -5901,13 +5919,13 @@ function Oa(n, e) {
5901
5919
  if (n.contentEditable == "false")
5902
5920
  return null;
5903
5921
  n = n.childNodes[e], e = 0;
5904
- } else if (n.parentNode && !Xt(n))
5922
+ } else if (n.parentNode && !Yt(n))
5905
5923
  e = J(n) + 1, n = n.parentNode;
5906
5924
  else
5907
5925
  return null;
5908
5926
  }
5909
5927
  }
5910
- function Ea(n, e, t) {
5928
+ function va(n, e, t) {
5911
5929
  for (let r = e == 0, i = e == fe(n); r || i; ) {
5912
5930
  if (n == t)
5913
5931
  return !0;
@@ -5917,7 +5935,7 @@ function Ea(n, e, t) {
5917
5935
  r = r && s == 0, i = i && s == fe(n);
5918
5936
  }
5919
5937
  }
5920
- function Xt(n) {
5938
+ function Yt(n) {
5921
5939
  let e;
5922
5940
  for (let t = n; t && !(e = t.pmViewDesc); t = t.parentNode)
5923
5941
  ;
@@ -5930,7 +5948,7 @@ function Ue(n, e) {
5930
5948
  let t = document.createEvent("Event");
5931
5949
  return t.initEvent("keydown", !0, !0), t.keyCode = n, t.key = t.code = e, t;
5932
5950
  }
5933
- function va(n) {
5951
+ function Ea(n) {
5934
5952
  let e = n.activeElement;
5935
5953
  for (; e && e.shadowRoot; )
5936
5954
  e = e.shadowRoot.activeElement;
@@ -5950,9 +5968,9 @@ function Na(n, e, t) {
5950
5968
  return { node: r.startContainer, offset: Math.min(fe(r.startContainer), r.startOffset) };
5951
5969
  }
5952
5970
  }
5953
- const xe = typeof navigator < "u" ? navigator : null, vi = typeof document < "u" ? document : null, Ke = xe && xe.userAgent || "", wr = /Edge\/(\d+)/.exec(Ke), ro = /MSIE \d/.exec(Ke), Cr = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ke), ie = !!(ro || Cr || wr), Ve = ro ? document.documentMode : Cr ? +Cr[1] : wr ? +wr[1] : 0, pe = !ie && /gecko\/(\d+)/i.test(Ke);
5971
+ const xe = typeof navigator < "u" ? navigator : null, Ei = typeof document < "u" ? document : null, Ke = xe && xe.userAgent || "", wr = /Edge\/(\d+)/.exec(Ke), ro = /MSIE \d/.exec(Ke), Cr = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ke), ie = !!(ro || Cr || wr), Ve = ro ? document.documentMode : Cr ? +Cr[1] : wr ? +wr[1] : 0, pe = !ie && /gecko\/(\d+)/i.test(Ke);
5954
5972
  pe && +(/Firefox\/(\d+)/.exec(Ke) || [0, 0])[1];
5955
- const Tr = !ie && /Chrome\/(\d+)/.exec(Ke), _ = !!Tr, io = Tr ? +Tr[1] : 0, Z = !ie && !!xe && /Apple Computer/.test(xe.vendor), St = Z && (/Mobile\/\w+/.test(Ke) || !!xe && xe.maxTouchPoints > 2), ue = St || (xe ? /Mac/.test(xe.platform) : !1), so = xe ? /Win/.test(xe.platform) : !1, Ee = /Android \d/.test(Ke), Zt = !!vi && "webkitFontSmoothing" in vi.documentElement.style, Aa = Zt ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
5973
+ const Tr = !ie && /Chrome\/(\d+)/.exec(Ke), _ = !!Tr, io = Tr ? +Tr[1] : 0, Z = !ie && !!xe && /Apple Computer/.test(xe.vendor), St = Z && (/Mobile\/\w+/.test(Ke) || !!xe && xe.maxTouchPoints > 2), ue = St || (xe ? /Mac/.test(xe.platform) : !1), so = xe ? /Win/.test(xe.platform) : !1, ve = /Android \d/.test(Ke), Zt = !!Ei && "webkitFontSmoothing" in Ei.documentElement.style, Aa = Zt ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
5956
5974
  function Da(n) {
5957
5975
  let e = n.defaultView && n.defaultView.visualViewport;
5958
5976
  return e ? {
@@ -6717,7 +6735,7 @@ class lt extends Qt {
6717
6735
  }
6718
6736
  slice(e, t, r) {
6719
6737
  let i = lt.create(this.parent, this.mark, !0, r), s = this.children, o = this.size;
6720
- t < o && (s = Er(s, t, o, r)), e > 0 && (s = Er(s, 0, e, r));
6738
+ t < o && (s = vr(s, t, o, r)), e > 0 && (s = vr(s, 0, e, r));
6721
6739
  for (let l = 0; l < s.length; l++)
6722
6740
  s[l].parent = i;
6723
6741
  return i.children = s, i;
@@ -6827,7 +6845,7 @@ class He extends Qt {
6827
6845
  s.pmViewDesc && (s.pmViewDesc = void 0);
6828
6846
  }
6829
6847
  let o = new Ja(this, s, t, i);
6830
- e.input.compositionNodes.push(o), this.children = Er(this.children, r, r + i.length, e, o);
6848
+ e.input.compositionNodes.push(o), this.children = vr(this.children, r, r + i.length, e, o);
6831
6849
  }
6832
6850
  // If this desc must be updated to match the given node decoration,
6833
6851
  // do so and return true.
@@ -6974,11 +6992,11 @@ const Dt = function(n) {
6974
6992
  n && (this.nodeName = n);
6975
6993
  };
6976
6994
  Dt.prototype = /* @__PURE__ */ Object.create(null);
6977
- const Ye = [new Dt()];
6995
+ const Xe = [new Dt()];
6978
6996
  function Or(n, e, t) {
6979
6997
  if (n.length == 0)
6980
- return Ye;
6981
- let r = t ? Ye[0] : new Dt(), i = [r];
6998
+ return Xe;
6999
+ let r = t ? Xe[0] : new Dt(), i = [r];
6982
7000
  for (let s = 0; s < n.length; s++) {
6983
7001
  let o = n[s].type.attrs;
6984
7002
  if (o) {
@@ -6992,16 +7010,16 @@ function Or(n, e, t) {
6992
7010
  return i;
6993
7011
  }
6994
7012
  function go(n, e, t, r) {
6995
- if (t == Ye && r == Ye)
7013
+ if (t == Xe && r == Xe)
6996
7014
  return e;
6997
7015
  let i = e;
6998
7016
  for (let s = 0; s < r.length; s++) {
6999
7017
  let o = r[s], l = t[s];
7000
7018
  if (s) {
7001
7019
  let a;
7002
- l && l.nodeName == o.nodeName && i != n && (a = i.parentNode) && a.nodeName.toLowerCase() == o.nodeName || (a = document.createElement(o.nodeName), a.pmIsDeco = !0, a.appendChild(i), l = Ye[0]), i = a;
7020
+ l && l.nodeName == o.nodeName && i != n && (a = i.parentNode) && a.nodeName.toLowerCase() == o.nodeName || (a = document.createElement(o.nodeName), a.pmIsDeco = !0, a.appendChild(i), l = Xe[0]), i = a;
7003
7021
  }
7004
- _a(i, l || Ye[0], o);
7022
+ _a(i, l || Xe[0], o);
7005
7023
  }
7006
7024
  return i;
7007
7025
  }
@@ -7028,7 +7046,7 @@ function _a(n, e, t) {
7028
7046
  }
7029
7047
  }
7030
7048
  function yo(n, e, t) {
7031
- return go(n, n, Ye, Or(e, t, n.nodeType != 1));
7049
+ return go(n, n, Xe, Or(e, t, n.nodeType != 1));
7032
7050
  }
7033
7051
  function xn(n, e) {
7034
7052
  if (n.length != e.length)
@@ -7044,7 +7062,7 @@ function Li(n) {
7044
7062
  }
7045
7063
  class Ga {
7046
7064
  constructor(e, t, r) {
7047
- this.lock = t, this.view = r, this.index = 0, this.stack = [], this.changed = !1, this.top = e, this.preMatch = Ya(e.node.content, e);
7065
+ this.lock = t, this.view = r, this.index = 0, this.stack = [], this.changed = !1, this.top = e, this.preMatch = Xa(e.node.content, e);
7048
7066
  }
7049
7067
  // Destroy and remove the children between the given indices in
7050
7068
  // `this.top`.
@@ -7193,7 +7211,7 @@ class Ga {
7193
7211
  return this.lock && (e == this.lock || e.nodeType == 1 && e.contains(this.lock.parentNode));
7194
7212
  }
7195
7213
  }
7196
- function Ya(n, e) {
7214
+ function Xa(n, e) {
7197
7215
  let t = e, r = t.children.length, i = n.childCount, s = /* @__PURE__ */ new Map(), o = [];
7198
7216
  e: for (; i > 0; ) {
7199
7217
  let l;
@@ -7220,7 +7238,7 @@ function Ya(n, e) {
7220
7238
  }
7221
7239
  return { index: i, matched: s, matches: o.reverse() };
7222
7240
  }
7223
- function Xa(n, e) {
7241
+ function Ya(n, e) {
7224
7242
  return n.type.side - e.type.side;
7225
7243
  }
7226
7244
  function Za(n, e, t, r) {
@@ -7241,7 +7259,7 @@ function Za(n, e, t, r) {
7241
7259
  }
7242
7260
  if (d)
7243
7261
  if (u) {
7244
- u.sort(Xa);
7262
+ u.sort(Ya);
7245
7263
  for (let g = 0; g < u.length; g++)
7246
7264
  t(u[g], c, !!a);
7247
7265
  } else
@@ -7301,7 +7319,7 @@ function ec(n, e, t, r) {
7301
7319
  }
7302
7320
  return -1;
7303
7321
  }
7304
- function Er(n, e, t, r, i) {
7322
+ function vr(n, e, t, r, i) {
7305
7323
  let s = [];
7306
7324
  for (let o = 0, l = 0; o < n.length; o++) {
7307
7325
  let a = n[o], c = l, d = l += a.size;
@@ -7321,7 +7339,7 @@ function Wr(n, e = null) {
7321
7339
  for (a = o; i && !i.node; )
7322
7340
  i = i.parent;
7323
7341
  let u = i.node;
7324
- if (i && u.isAtom && S.isSelectable(u) && i.parent && !(u.isInline && Ea(t.focusNode, t.focusOffset, i.dom))) {
7342
+ if (i && u.isAtom && S.isSelectable(u) && i.parent && !(u.isInline && va(t.focusNode, t.focusOffset, i.dom))) {
7325
7343
  let f = i.posBefore;
7326
7344
  c = new S(o == f ? l : r.resolve(f));
7327
7345
  }
@@ -7434,9 +7452,9 @@ function rc(n) {
7434
7452
  let e = n.docView.domFromPos(n.state.selection.anchor, 0), t = n.domSelectionRange();
7435
7453
  return ot(e.node, e.offset, t.anchorNode, t.anchorOffset);
7436
7454
  }
7437
- function vr(n, e) {
7455
+ function Er(n, e) {
7438
7456
  let { $anchor: t, $head: r } = n.selection, i = e > 0 ? t.max(r) : t.min(r), s = i.parent.inlineContent ? i.depth ? n.doc.resolve(e > 0 ? i.after() : i.before()) : null : i;
7439
- return s && E.findFrom(s, e);
7457
+ return s && v.findFrom(s, e);
7440
7458
  }
7441
7459
  function Ie(n, e) {
7442
7460
  return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()), !0;
@@ -7452,7 +7470,7 @@ function Wi(n, e, t) {
7452
7470
  return Ie(n, new M(r.$anchor, o));
7453
7471
  } else if (r.empty) {
7454
7472
  if (n.endOfTextblock(e > 0 ? "forward" : "backward")) {
7455
- let i = vr(n.state, e);
7473
+ let i = Er(n.state, e);
7456
7474
  return i && i instanceof S ? Ie(n, i) : !1;
7457
7475
  } else if (!(ue && t.indexOf("m") > -1)) {
7458
7476
  let i = r.$head, s = i.textOffset ? null : e < 0 ? i.nodeBefore : i.nodeAfter, o;
@@ -7466,7 +7484,7 @@ function Wi(n, e, t) {
7466
7484
  if (r instanceof S && r.node.isInline)
7467
7485
  return Ie(n, new M(e > 0 ? r.$to : r.$from));
7468
7486
  {
7469
- let i = vr(n.state, e);
7487
+ let i = Er(n.state, e);
7470
7488
  return i ? Ie(n, i) : !1;
7471
7489
  }
7472
7490
  }
@@ -7554,7 +7572,7 @@ function So(n) {
7554
7572
  return e && e.node && e.node.isBlock;
7555
7573
  }
7556
7574
  function oc(n, e) {
7557
- for (; n && e == n.childNodes.length && !Xt(n); )
7575
+ for (; n && e == n.childNodes.length && !Yt(n); )
7558
7576
  e = J(n) + 1, n = n.parentNode;
7559
7577
  for (; n && e < n.childNodes.length; ) {
7560
7578
  let t = n.childNodes[e];
@@ -7566,7 +7584,7 @@ function oc(n, e) {
7566
7584
  }
7567
7585
  }
7568
7586
  function lc(n, e) {
7569
- for (; n && !e && !Xt(n); )
7587
+ for (; n && !e && !Yt(n); )
7570
7588
  e = J(n), n = n.parentNode;
7571
7589
  for (; n && e; ) {
7572
7590
  let t = n.childNodes[e - 1];
@@ -7618,12 +7636,12 @@ function ji(n, e, t) {
7618
7636
  return !1;
7619
7637
  let { $from: i, $to: s } = r;
7620
7638
  if (!i.parent.inlineContent || n.endOfTextblock(e < 0 ? "up" : "down")) {
7621
- let o = vr(n.state, e);
7639
+ let o = Er(n.state, e);
7622
7640
  if (o && o instanceof S)
7623
7641
  return Ie(n, o);
7624
7642
  }
7625
7643
  if (!i.parent.inlineContent) {
7626
- let o = e < 0 ? i : s, l = r instanceof ce ? E.near(o, e) : E.findFrom(o, e);
7644
+ let o = e < 0 ? i : s, l = r instanceof ce ? v.near(o, e) : v.findFrom(o, e);
7627
7645
  return l ? Ie(n, l) : !1;
7628
7646
  }
7629
7647
  return !1;
@@ -7696,7 +7714,7 @@ function jr(n, e) {
7696
7714
  let h = r.firstChild;
7697
7715
  t.push(h.type.name, h.attrs != h.type.defaultAttrs ? h.attrs : null), r = h.content;
7698
7716
  }
7699
- let o = n.someProp("clipboardSerializer") || dt.fromSchema(n.state.schema), l = Eo(), a = l.createElement("div");
7717
+ let o = n.someProp("clipboardSerializer") || dt.fromSchema(n.state.schema), l = vo(), a = l.createElement("div");
7700
7718
  a.appendChild(o.serializeFragment(r, { document: l }));
7701
7719
  let c = a.firstChild, d, u = 0;
7702
7720
  for (; c && c.nodeType == 1 && (d = Oo[c.nodeName.toLowerCase()]); ) {
@@ -7834,7 +7852,7 @@ const Oo = {
7834
7852
  th: ["table", "tbody", "tr"]
7835
7853
  };
7836
7854
  let _i = null;
7837
- function Eo() {
7855
+ function vo() {
7838
7856
  return _i || (_i = document.implementation.createHTMLDocument("title"));
7839
7857
  }
7840
7858
  let rr = null;
@@ -7845,7 +7863,7 @@ function hc(n) {
7845
7863
  function pc(n) {
7846
7864
  let e = /^(\s*<meta [^>]*>)*/.exec(n);
7847
7865
  e && (n = n.slice(e[0].length));
7848
- let t = Eo().createElement("div"), r = /<([a-z][^>\s]+)/i.exec(n), i;
7866
+ let t = vo().createElement("div"), r = /<([a-z][^>\s]+)/i.exec(n), i;
7849
7867
  if ((i = r && Oo[r[1].toLowerCase()]) && (n = i.map((s) => "<" + s + ">").join("") + n + i.map((s) => "</" + s + ">").reverse().join("")), t.innerHTML = hc(n), i)
7850
7868
  for (let s = 0; s < i.length; s++)
7851
7869
  t = t.querySelector(i[s]) || t;
@@ -7927,7 +7945,7 @@ function Mc(n, e) {
7927
7945
  }
7928
7946
  te.keydown = (n, e) => {
7929
7947
  let t = e;
7930
- if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !No(n, t) && (n.input.lastKeyCode = t.keyCode, n.input.lastKeyCodeTime = Date.now(), !(Ee && _ && t.keyCode == 13)))
7948
+ if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !No(n, t) && (n.input.lastKeyCode = t.keyCode, n.input.lastKeyCodeTime = Date.now(), !(ve && _ && t.keyCode == 13)))
7931
7949
  if (t.keyCode != 229 && n.domObserver.forceFlush(), St && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
7932
7950
  let r = Date.now();
7933
7951
  n.input.lastIOSEnter = r, n.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
@@ -7998,10 +8016,10 @@ function Tc(n, e) {
7998
8016
  function Oc(n, e, t, r, i) {
7999
8017
  return Jr(n, "handleClickOn", e, t, r) || n.someProp("handleClick", (s) => s(n, e, r)) || (i ? Tc(n, t) : Cc(n, t));
8000
8018
  }
8001
- function Ec(n, e, t, r) {
8019
+ function vc(n, e, t, r) {
8002
8020
  return Jr(n, "handleDoubleClickOn", e, t, r) || n.someProp("handleDoubleClick", (i) => i(n, e, r));
8003
8021
  }
8004
- function vc(n, e, t, r) {
8022
+ function Ec(n, e, t, r) {
8005
8023
  return Jr(n, "handleTripleClickOn", e, t, r) || n.someProp("handleTripleClick", (i) => i(n, e, r)) || Nc(n, t, r);
8006
8024
  }
8007
8025
  function Nc(n, e, t) {
@@ -8025,18 +8043,18 @@ function Nc(n, e, t) {
8025
8043
  function Ur(n) {
8026
8044
  return Mn(n);
8027
8045
  }
8028
- const vo = ue ? "metaKey" : "ctrlKey";
8046
+ const Eo = ue ? "metaKey" : "ctrlKey";
8029
8047
  ee.mousedown = (n, e) => {
8030
8048
  let t = e;
8031
8049
  n.input.shiftKey = t.shiftKey;
8032
8050
  let r = Ur(n), i = Date.now(), s = "singleClick";
8033
- i - n.input.lastClick.time < 500 && wc(t, n.input.lastClick) && !t[vo] && n.input.lastClick.button == t.button && (n.input.lastClick.type == "singleClick" ? s = "doubleClick" : n.input.lastClick.type == "doubleClick" && (s = "tripleClick")), n.input.lastClick = { time: i, x: t.clientX, y: t.clientY, type: s, button: t.button };
8051
+ i - n.input.lastClick.time < 500 && wc(t, n.input.lastClick) && !t[Eo] && n.input.lastClick.button == t.button && (n.input.lastClick.type == "singleClick" ? s = "doubleClick" : n.input.lastClick.type == "doubleClick" && (s = "tripleClick")), n.input.lastClick = { time: i, x: t.clientX, y: t.clientY, type: s, button: t.button };
8034
8052
  let o = n.posAtCoords($n(t));
8035
- o && (s == "singleClick" ? (n.input.mouseDown && n.input.mouseDown.done(), n.input.mouseDown = new Ac(n, o, t, !!r)) : (s == "doubleClick" ? Ec : vc)(n, o.pos, o.inside, t) ? t.preventDefault() : ze(n, "pointer"));
8053
+ o && (s == "singleClick" ? (n.input.mouseDown && n.input.mouseDown.done(), n.input.mouseDown = new Ac(n, o, t, !!r)) : (s == "doubleClick" ? vc : Ec)(n, o.pos, o.inside, t) ? t.preventDefault() : ze(n, "pointer"));
8036
8054
  };
8037
8055
  class Ac {
8038
8056
  constructor(e, t, r, i) {
8039
- this.view = e, this.pos = t, this.event = r, this.flushed = i, this.delayedSelectionSync = !1, this.mightDrag = null, this.startDoc = e.state.doc, this.selectNode = !!r[vo], this.allowDefault = r.shiftKey;
8057
+ this.view = e, this.pos = t, this.event = r, this.flushed = i, this.delayedSelectionSync = !1, this.mightDrag = null, this.startDoc = e.state.doc, this.selectNode = !!r[Eo], this.allowDefault = r.shiftKey;
8040
8058
  let s, o;
8041
8059
  if (t.inside > -1)
8042
8060
  s = e.state.doc.nodeAt(t.inside), o = t.inside;
@@ -8071,7 +8089,7 @@ class Ac {
8071
8089
  // (hidden) cursor is doesn't change the selection, and
8072
8090
  // thus doesn't get a reaction from ProseMirror. This
8073
8091
  // works around that.
8074
- _ && !this.view.state.selection.visible && Math.min(Math.abs(t.pos - this.view.state.selection.from), Math.abs(t.pos - this.view.state.selection.to)) <= 2) ? (bt(this.view, E.near(this.view.state.doc.resolve(t.pos))), e.preventDefault()) : ze(this.view, "pointer");
8092
+ _ && !this.view.state.selection.visible && Math.min(Math.abs(t.pos - this.view.state.selection.from), Math.abs(t.pos - this.view.state.selection.to)) <= 2) ? (bt(this.view, v.near(this.view.state.doc.resolve(t.pos))), e.preventDefault()) : ze(this.view, "pointer");
8075
8093
  }
8076
8094
  move(e) {
8077
8095
  this.updateAllowDefault(e), ze(this.view, "pointer"), e.buttons == 0 && this.done();
@@ -8090,7 +8108,7 @@ ee.contextmenu = (n) => Ur(n);
8090
8108
  function No(n, e) {
8091
8109
  return n.composing ? !0 : Z && Math.abs(e.timeStamp - n.input.compositionEndedAt) < 500 ? (n.input.compositionEndedAt = -2e8, !0) : !1;
8092
8110
  }
8093
- const Dc = Ee ? 5e3 : -1;
8111
+ const Dc = ve ? 5e3 : -1;
8094
8112
  te.compositionstart = te.compositionupdate = (n) => {
8095
8113
  if (!n.composing) {
8096
8114
  n.domObserver.flush();
@@ -8156,7 +8174,7 @@ function Pc() {
8156
8174
  return n.initEvent("event", !0, !0), n.timeStamp;
8157
8175
  }
8158
8176
  function Mn(n, e = !1) {
8159
- if (!(Ee && n.domObserver.flushingSoon >= 0)) {
8177
+ if (!(ve && n.domObserver.flushingSoon >= 0)) {
8160
8178
  if (n.domObserver.forceFlush(), Do(n), e || n.docView && n.docView.dirty) {
8161
8179
  let t = Wr(n), r = n.state.selection;
8162
8180
  return t && !t.eq(r) ? n.dispatch(n.state.tr.setSelection(t)) : (n.markCursor || e) && !r.$from.node(r.$from.sharedDepth(r.to)).inlineContent ? n.dispatch(n.state.tr.deleteSelection()) : n.updateState(n.state), !0;
@@ -8213,7 +8231,7 @@ function Io(n) {
8213
8231
  }
8214
8232
  te.paste = (n, e) => {
8215
8233
  let t = e;
8216
- if (n.composing && !Ee)
8234
+ if (n.composing && !ve)
8217
8235
  return;
8218
8236
  let r = Ft ? null : t.clipboardData, i = n.input.shiftKey && n.input.lastKeyCode != 45;
8219
8237
  r && $t(n, Io(r), r.getData("text/html"), i, t) ? t.preventDefault() : zc(n, t);
@@ -8278,7 +8296,7 @@ function $c(n, e, t) {
8278
8296
  if (!s)
8279
8297
  return;
8280
8298
  e.preventDefault();
8281
- let l = s ? Ys(n.state.doc, i.pos, s) : i.pos;
8299
+ let l = s ? Xs(n.state.doc, i.pos, s) : i.pos;
8282
8300
  l == null && (l = i.pos);
8283
8301
  let a = n.state.tr;
8284
8302
  if (o) {
@@ -8307,7 +8325,7 @@ ee.blur = (n, e) => {
8307
8325
  n.focused && (n.domObserver.stop(), n.dom.classList.remove("ProseMirror-focused"), n.domObserver.start(), t.relatedTarget && n.dom.contains(t.relatedTarget) && n.domObserver.currentSelection.clear(), n.focused = !1);
8308
8326
  };
8309
8327
  ee.beforeinput = (n, e) => {
8310
- if (_ && Ee && e.inputType == "deleteContentBackward") {
8328
+ if (_ && ve && e.inputType == "deleteContentBackward") {
8311
8329
  n.domObserver.flushSoon();
8312
8330
  let { domChangeCount: r } = n.input;
8313
8331
  setTimeout(() => {
@@ -8475,7 +8493,7 @@ class z {
8475
8493
  you must make a copy if you want need to preserve that.
8476
8494
  */
8477
8495
  static create(e, t) {
8478
- return t.length ? Cn(t, e, 0, tt) : X;
8496
+ return t.length ? Cn(t, e, 0, tt) : Y;
8479
8497
  }
8480
8498
  /**
8481
8499
  Find all decorations in this set which touch the given range
@@ -8505,7 +8523,7 @@ class z {
8505
8523
  document.
8506
8524
  */
8507
8525
  map(e, t, r) {
8508
- return this == X || e.maps.length == 0 ? this : this.mapInner(e, t, 0, 0, r || tt);
8526
+ return this == Y || e.maps.length == 0 ? this : this.mapInner(e, t, 0, 0, r || tt);
8509
8527
  }
8510
8528
  /**
8511
8529
  @internal
@@ -8516,7 +8534,7 @@ class z {
8516
8534
  let a = this.local[l].map(e, r, i);
8517
8535
  a && a.type.valid(t, a) ? (o || (o = [])).push(a) : s.onRemove && s.onRemove(this.local[l].spec);
8518
8536
  }
8519
- return this.children.length ? Vc(this.children, o || [], e, t, r, i, s) : o ? new z(o.sort(nt), pt) : X;
8537
+ return this.children.length ? Vc(this.children, o || [], e, t, r, i, s) : o ? new z(o.sort(nt), pt) : Y;
8520
8538
  }
8521
8539
  /**
8522
8540
  Add the given array of decorations to the ones in the set,
@@ -8525,7 +8543,7 @@ class z {
8525
8543
  structure.
8526
8544
  */
8527
8545
  add(e, t) {
8528
- return t.length ? this == X ? z.create(e, t) : this.addInner(e, t, 0) : this;
8546
+ return t.length ? this == Y ? z.create(e, t) : this.addInner(e, t, 0) : this;
8529
8547
  }
8530
8548
  addInner(e, t, r) {
8531
8549
  let i, s = 0;
@@ -8547,7 +8565,7 @@ class z {
8547
8565
  the ones in the given array.
8548
8566
  */
8549
8567
  remove(e) {
8550
- return e.length == 0 || this == X ? this : this.removeInner(e, 0);
8568
+ return e.length == 0 || this == Y ? this : this.removeInner(e, 0);
8551
8569
  }
8552
8570
  removeInner(e, t) {
8553
8571
  let r = this.children, i = this.local;
@@ -8559,7 +8577,7 @@ class z {
8559
8577
  continue;
8560
8578
  r == this.children && (r = this.children.slice());
8561
8579
  let c = r[s + 2].removeInner(o, l + 1);
8562
- c != X ? r[s + 2] = c : (r.splice(s, 3), s -= 3);
8580
+ c != Y ? r[s + 2] = c : (r.splice(s, 3), s -= 3);
8563
8581
  }
8564
8582
  if (i.length) {
8565
8583
  for (let s = 0, o; s < e.length; s++)
@@ -8567,10 +8585,10 @@ class z {
8567
8585
  for (let l = 0; l < i.length; l++)
8568
8586
  i[l].eq(o, t) && (i == this.local && (i = this.local.slice()), i.splice(l--, 1));
8569
8587
  }
8570
- return r == this.children && i == this.local ? this : i.length || r.length ? new z(i, r) : X;
8588
+ return r == this.children && i == this.local ? this : i.length || r.length ? new z(i, r) : Y;
8571
8589
  }
8572
8590
  forChild(e, t) {
8573
- if (this == X)
8591
+ if (this == Y)
8574
8592
  return this;
8575
8593
  if (t.isLeaf)
8576
8594
  return z.empty;
@@ -8592,7 +8610,7 @@ class z {
8592
8610
  let l = new z(i.sort(nt), pt);
8593
8611
  return r ? new Pe([l, r]) : l;
8594
8612
  }
8595
- return r || X;
8613
+ return r || Y;
8596
8614
  }
8597
8615
  /**
8598
8616
  @internal
@@ -8620,7 +8638,7 @@ class z {
8620
8638
  @internal
8621
8639
  */
8622
8640
  localsInner(e) {
8623
- if (this == X)
8641
+ if (this == Y)
8624
8642
  return pt;
8625
8643
  if (e.inlineContent || !this.local.some(We.is))
8626
8644
  return this.local;
@@ -8635,7 +8653,7 @@ class z {
8635
8653
  }
8636
8654
  z.empty = new z([], []);
8637
8655
  z.removeOverlap = Gr;
8638
- const X = z.empty;
8656
+ const Y = z.empty;
8639
8657
  class Pe {
8640
8658
  constructor(e) {
8641
8659
  this.members = e;
@@ -8650,7 +8668,7 @@ class Pe {
8650
8668
  let r = [];
8651
8669
  for (let i = 0; i < this.members.length; i++) {
8652
8670
  let s = this.members[i].forChild(e, t);
8653
- s != X && (s instanceof Pe ? r = r.concat(s.members) : r.push(s));
8671
+ s != Y && (s instanceof Pe ? r = r.concat(s.members) : r.push(s));
8654
8672
  }
8655
8673
  return Pe.from(r);
8656
8674
  }
@@ -8682,7 +8700,7 @@ class Pe {
8682
8700
  static from(e) {
8683
8701
  switch (e.length) {
8684
8702
  case 0:
8685
- return X;
8703
+ return Y;
8686
8704
  case 1:
8687
8705
  return e[0];
8688
8706
  default:
@@ -8725,7 +8743,7 @@ function Vc(n, e, t, r, i, s, o) {
8725
8743
  let f = t.map(n[c + 1] + s, -1), h = f - i, { index: p, offset: m } = r.content.findIndex(u), g = r.maybeChild(p);
8726
8744
  if (g && m == u && m + g.nodeSize == h) {
8727
8745
  let y = l[c + 2].mapInner(t, g, d + 1, n[c] + s + 1, o);
8728
- y != X ? (l[c] = u, l[c + 1] = h, l[c + 2] = y) : (l[c + 1] = -2, a = !0);
8746
+ y != Y ? (l[c] = u, l[c + 1] = h, l[c + 2] = y) : (l[c + 1] = -2, a = !0);
8729
8747
  } else
8730
8748
  a = !0;
8731
8749
  }
@@ -8787,13 +8805,13 @@ function Cn(n, e, t, r) {
8787
8805
  if (c) {
8788
8806
  s = !0;
8789
8807
  let d = Cn(c, l, t + a + 1, r);
8790
- d != X && i.push(a, a + l.nodeSize, d);
8808
+ d != Y && i.push(a, a + l.nodeSize, d);
8791
8809
  }
8792
8810
  });
8793
8811
  let o = Bo(s ? zo(n) : n, -t).sort(nt);
8794
8812
  for (let l = 0; l < o.length; l++)
8795
8813
  o[l].type.valid(e, o[l]) || (r.onRemove && r.onRemove(o[l].spec), o.splice(l--, 1));
8796
- return o.length || i.length ? new z(o, i) : X;
8814
+ return o.length || i.length ? new z(o, i) : Y;
8797
8815
  }
8798
8816
  function nt(n, e) {
8799
8817
  return n.from - e.from || n.to - e.to;
@@ -8825,7 +8843,7 @@ function ir(n) {
8825
8843
  let e = [];
8826
8844
  return n.someProp("decorations", (t) => {
8827
8845
  let r = t(n.state);
8828
- r && r != X && e.push(r);
8846
+ r && r != Y && e.push(r);
8829
8847
  }), n.cursorWrapper && e.push(z.create(n.state.doc, [n.cursorWrapper.deco])), Pe.from(e);
8830
8848
  }
8831
8849
  const Wc = {
@@ -8969,7 +8987,7 @@ class Kc {
8969
8987
  }
8970
8988
  }
8971
8989
  let c = null;
8972
- s < 0 && i && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && zn(r) && (c = Wr(e)) && c.eq(E.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, Ne(e), this.currentSelection.set(r), e.scrollToSelection()) : (s > -1 || i) && (s > -1 && (e.docView.markDirty(s, o), Jc(e)), e.input.badSafariComposition && (e.input.badSafariComposition = !1, Gc(e, a)), this.handleDOMChange(s, o, l, a), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(r) || Ne(e), this.currentSelection.set(r));
8990
+ s < 0 && i && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && zn(r) && (c = Wr(e)) && c.eq(v.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, Ne(e), this.currentSelection.set(r), e.scrollToSelection()) : (s > -1 || i) && (s > -1 && (e.docView.markDirty(s, o), Jc(e)), e.input.badSafariComposition && (e.input.badSafariComposition = !1, Gc(e, a)), this.handleDOMChange(s, o, l, a), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(r) || Ne(e), this.currentSelection.set(r));
8973
8991
  }
8974
8992
  registerMutation(e, t) {
8975
8993
  if (t.indexOf(e.target) > -1)
@@ -9004,12 +9022,12 @@ class Kc {
9004
9022
  });
9005
9023
  }
9006
9024
  }
9007
- let Yi = /* @__PURE__ */ new WeakMap(), Xi = !1;
9025
+ let Xi = /* @__PURE__ */ new WeakMap(), Yi = !1;
9008
9026
  function Jc(n) {
9009
- if (!Yi.has(n) && (Yi.set(n, null), ["normal", "nowrap", "pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace) !== -1)) {
9010
- if (n.requiresGeckoHackNode = pe, Xi)
9027
+ if (!Xi.has(n) && (Xi.set(n, null), ["normal", "nowrap", "pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace) !== -1)) {
9028
+ if (n.requiresGeckoHackNode = pe, Yi)
9011
9029
  return;
9012
- console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."), Xi = !0;
9030
+ console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."), Yi = !0;
9013
9031
  }
9014
9032
  }
9015
9033
  function Zi(n, e) {
@@ -9057,7 +9075,7 @@ function Gc(n, e) {
9057
9075
  s.parentNode.removeChild(s);
9058
9076
  }
9059
9077
  }
9060
- function Yc(n, e, t) {
9078
+ function Xc(n, e, t) {
9061
9079
  let { node: r, fromOffset: i, toOffset: s, from: o, to: l } = n.docView.parseRange(e, t), a = n.domSelectionRange(), c, d = a.anchorNode;
9062
9080
  if (d && n.dom.contains(d.nodeType == 1 ? d : d.parentNode) && (c = [{ node: d, offset: a.anchorOffset }], zn(a) || c.push({ node: a.focusNode, offset: a.focusOffset })), _ && n.input.lastKeyCode === 8)
9063
9081
  for (let g = s; g > i; g--) {
@@ -9077,7 +9095,7 @@ function Yc(n, e, t) {
9077
9095
  to: s,
9078
9096
  preserveWhitespace: h.parent.type.whitespace == "pre" ? "full" : !0,
9079
9097
  findPositions: c,
9080
- ruleFromNode: Xc,
9098
+ ruleFromNode: Yc,
9081
9099
  context: h
9082
9100
  });
9083
9101
  if (c && c[0].pos != null) {
@@ -9086,7 +9104,7 @@ function Yc(n, e, t) {
9086
9104
  }
9087
9105
  return { doc: m, sel: p, from: o, to: l };
9088
9106
  }
9089
- function Xc(n) {
9107
+ function Yc(n) {
9090
9108
  let e = n.pmViewDesc;
9091
9109
  if (e)
9092
9110
  return e.parseRule();
@@ -9106,19 +9124,19 @@ function Qc(n, e, t, r, i) {
9106
9124
  if (n.input.compositionPendingChanges = 0, e < 0) {
9107
9125
  let C = n.input.lastSelectionTime > Date.now() - 50 ? n.input.lastSelectionOrigin : null, N = Wr(n, C);
9108
9126
  if (N && !n.state.selection.eq(N)) {
9109
- if (_ && Ee && n.input.lastKeyCode === 13 && Date.now() - 100 < n.input.lastKeyCodeTime && n.someProp("handleKeyDown", (kl) => kl(n, Ue(13, "Enter"))))
9127
+ if (_ && ve && n.input.lastKeyCode === 13 && Date.now() - 100 < n.input.lastKeyCodeTime && n.someProp("handleKeyDown", (kl) => kl(n, Ue(13, "Enter"))))
9110
9128
  return;
9111
- let Y = n.state.tr.setSelection(N);
9112
- C == "pointer" ? Y.setMeta("pointer", !0) : C == "key" && Y.scrollIntoView(), s && Y.setMeta("composition", s), n.dispatch(Y);
9129
+ let X = n.state.tr.setSelection(N);
9130
+ C == "pointer" ? X.setMeta("pointer", !0) : C == "key" && X.scrollIntoView(), s && X.setMeta("composition", s), n.dispatch(X);
9113
9131
  }
9114
9132
  return;
9115
9133
  }
9116
9134
  let o = n.state.doc.resolve(e), l = o.sharedDepth(t);
9117
9135
  e = o.before(l + 1), t = n.state.doc.resolve(t).after(l + 1);
9118
- let a = n.state.selection, c = Yc(n, e, t), d = n.state.doc, u = d.slice(c.from, c.to), f, h;
9136
+ let a = n.state.selection, c = Xc(n, e, t), d = n.state.doc, u = d.slice(c.from, c.to), f, h;
9119
9137
  n.input.lastKeyCode === 8 && Date.now() - 100 < n.input.lastKeyCodeTime ? (f = n.state.selection.to, h = "end") : (f = n.state.selection.from, h = "start"), n.input.lastKeyCode = null;
9120
9138
  let p = nd(u.content, c.doc.content, c.from, f, h);
9121
- if (p && n.input.domChangeCount++, (St && n.input.lastIOSEnter > Date.now() - 225 || Ee) && i.some((C) => C.nodeType == 1 && !Zc.test(C.nodeName)) && (!p || p.endA >= p.endB) && n.someProp("handleKeyDown", (C) => C(n, Ue(13, "Enter")))) {
9139
+ if (p && n.input.domChangeCount++, (St && n.input.lastIOSEnter > Date.now() - 225 || ve) && i.some((C) => C.nodeType == 1 && !Zc.test(C.nodeName)) && (!p || p.endA >= p.endB) && n.someProp("handleKeyDown", (C) => C(n, Ue(13, "Enter")))) {
9122
9140
  n.input.lastIOSEnter = 0;
9123
9141
  return;
9124
9142
  }
@@ -9142,10 +9160,10 @@ function Qc(n, e, t, r, i) {
9142
9160
  return;
9143
9161
  }
9144
9162
  if (n.state.selection.anchor > p.start && td(d, p.start, p.endA, m, g) && n.someProp("handleKeyDown", (C) => C(n, Ue(8, "Backspace")))) {
9145
- Ee && _ && n.domObserver.suppressSelectionUpdates();
9163
+ ve && _ && n.domObserver.suppressSelectionUpdates();
9146
9164
  return;
9147
9165
  }
9148
- _ && p.endB == p.start && (n.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(() => {
9166
+ _ && p.endB == p.start && (n.input.lastChromeDelete = Date.now()), ve && !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(() => {
9149
9167
  n.someProp("handleKeyDown", function(C) {
9150
9168
  return C(n, Ue(13, "Enter"));
9151
9169
  });
@@ -9153,8 +9171,8 @@ function Qc(n, e, t, r, i) {
9153
9171
  let w = p.start, I = p.endA, D = (C) => {
9154
9172
  let N = C || n.state.tr.replace(w, I, c.doc.slice(p.start - c.from, p.endB - c.from));
9155
9173
  if (c.sel) {
9156
- let Y = Qi(n, N.doc, c.sel);
9157
- Y && !(_ && n.composing && Y.empty && (p.start != p.endB || n.input.lastChromeDelete < Date.now() - 100) && (Y.head == w || Y.head == N.mapping.map(I) - 1) || ie && Y.empty && Y.head == w) && N.setSelection(Y);
9174
+ let X = Qi(n, N.doc, c.sel);
9175
+ X && !(_ && n.composing && X.empty && (p.start != p.endB || n.input.lastChromeDelete < Date.now() - 100) && (X.head == w || X.head == N.mapping.map(I) - 1) || ie && X.empty && X.head == w) && N.setSelection(X);
9158
9176
  }
9159
9177
  return s && N.setMeta("composition", s), N.scrollIntoView();
9160
9178
  }, L;
@@ -9171,7 +9189,7 @@ function Qc(n, e, t, r, i) {
9171
9189
  L.type == "add" ? C.addMark(w, I, L.mark) : C.removeMark(w, I, L.mark), n.dispatch(C);
9172
9190
  } else if (m.parent.child(m.index()).isText && m.index() == g.index() - (g.textOffset ? 0 : 1)) {
9173
9191
  let C = m.parent.textBetween(m.parentOffset, g.parentOffset), N = () => D(n.state.tr.insertText(C, w, I));
9174
- n.someProp("handleTextInput", (Y) => Y(n, w, I, C, N)) || n.dispatch(N());
9192
+ n.someProp("handleTextInput", (X) => X(n, w, I, C, N)) || n.dispatch(N());
9175
9193
  } else
9176
9194
  n.dispatch(D());
9177
9195
  else
@@ -9573,7 +9591,7 @@ class Fo {
9573
9591
  */
9574
9592
  domSelectionRange() {
9575
9593
  let e = this.domSelection();
9576
- return e ? Z && this.root.nodeType === 11 && va(this.dom.ownerDocument) == this.dom && Uc(this, e) || e : { focusNode: null, focusOffset: 0, anchorNode: null, anchorOffset: 0 };
9594
+ return e ? Z && this.root.nodeType === 11 && Ea(this.dom.ownerDocument) == this.dom && Uc(this, e) || e : { focusNode: null, focusOffset: 0, anchorNode: null, anchorOffset: 0 };
9577
9595
  }
9578
9596
  /**
9579
9597
  @internal
@@ -9775,7 +9793,7 @@ function $o(n) {
9775
9793
  return !1;
9776
9794
  };
9777
9795
  }
9778
- const Yr = (n, e) => n.selection.empty ? !1 : (e && e(n.tr.deleteSelection().scrollIntoView()), !0);
9796
+ const Xr = (n, e) => n.selection.empty ? !1 : (e && e(n.tr.deleteSelection().scrollIntoView()), !0);
9779
9797
  function Vo(n, e) {
9780
9798
  let { $cursor: t } = n.selection;
9781
9799
  return !t || (e ? !e.endOfTextblock("backward", n) : t.parentOffset > 0) ? null : t;
@@ -9784,13 +9802,13 @@ const Ho = (n, e, t) => {
9784
9802
  let r = Vo(n, t);
9785
9803
  if (!r)
9786
9804
  return !1;
9787
- let i = Xr(r);
9805
+ let i = Yr(r);
9788
9806
  if (!i) {
9789
9807
  let o = r.blockRange(), l = o && wt(o);
9790
9808
  return l == null ? !1 : (e && e(n.tr.lift(o, l).scrollIntoView()), !0);
9791
9809
  }
9792
9810
  let s = i.nodeBefore;
9793
- if (Yo(n, i, e, -1))
9811
+ if (Xo(n, i, e, -1))
9794
9812
  return !0;
9795
9813
  if (r.parent.content.size == 0 && (Mt(s, "end") || S.isSelectable(s)))
9796
9814
  for (let o = r.depth; ; o--) {
@@ -9798,7 +9816,7 @@ const Ho = (n, e, t) => {
9798
9816
  if (l && l.slice.size < l.to - l.from) {
9799
9817
  if (e) {
9800
9818
  let a = n.tr.step(l);
9801
- a.setSelection(Mt(s, "end") ? E.findFrom(a.doc.resolve(a.mapping.map(i.pos, -1)), -1) : S.create(a.doc, i.pos - s.nodeSize)), e(a.scrollIntoView());
9819
+ a.setSelection(Mt(s, "end") ? v.findFrom(a.doc.resolve(a.mapping.map(i.pos, -1)), -1) : S.create(a.doc, i.pos - s.nodeSize)), e(a.scrollIntoView());
9802
9820
  }
9803
9821
  return !0;
9804
9822
  }
@@ -9810,7 +9828,7 @@ const Ho = (n, e, t) => {
9810
9828
  let r = Vo(n, t);
9811
9829
  if (!r)
9812
9830
  return !1;
9813
- let i = Xr(r);
9831
+ let i = Yr(r);
9814
9832
  return i ? Wo(n, i, e) : !1;
9815
9833
  }, pd = (n, e, t) => {
9816
9834
  let r = jo(n, t);
@@ -9863,12 +9881,12 @@ const qo = (n, e, t) => {
9863
9881
  if (r.parent.isTextblock) {
9864
9882
  if (t ? !t.endOfTextblock("backward", n) : r.parentOffset > 0)
9865
9883
  return !1;
9866
- s = Xr(r);
9884
+ s = Yr(r);
9867
9885
  }
9868
9886
  let o = s && s.nodeBefore;
9869
9887
  return !o || !S.isSelectable(o) ? !1 : (e && e(n.tr.setSelection(S.create(n.doc, s.pos - o.nodeSize)).scrollIntoView()), !0);
9870
9888
  };
9871
- function Xr(n) {
9889
+ function Yr(n) {
9872
9890
  if (!n.parent.type.spec.isolating)
9873
9891
  for (let e = n.depth - 1; e >= 0; e--) {
9874
9892
  if (n.index(e) > 0)
@@ -9890,14 +9908,14 @@ const Ko = (n, e, t) => {
9890
9908
  if (!i)
9891
9909
  return !1;
9892
9910
  let s = i.nodeAfter;
9893
- if (Yo(n, i, e, 1))
9911
+ if (Xo(n, i, e, 1))
9894
9912
  return !0;
9895
9913
  if (r.parent.content.size == 0 && (Mt(s, "start") || S.isSelectable(s))) {
9896
9914
  let o = Bn(n.doc, r.before(), r.after(), k.empty);
9897
9915
  if (o && o.slice.size < o.to - o.from) {
9898
9916
  if (e) {
9899
9917
  let l = n.tr.step(o);
9900
- l.setSelection(Mt(s, "start") ? E.findFrom(l.doc.resolve(l.mapping.map(i.pos)), 1) : S.create(l.doc, l.mapping.map(i.pos))), e(l.scrollIntoView());
9918
+ l.setSelection(Mt(s, "start") ? v.findFrom(l.doc.resolve(l.mapping.map(i.pos)), 1) : S.create(l.doc, l.mapping.map(i.pos))), e(l.scrollIntoView());
9901
9919
  }
9902
9920
  return !0;
9903
9921
  }
@@ -9973,7 +9991,7 @@ const bd = (n, e) => {
9973
9991
  return !1;
9974
9992
  if (e) {
9975
9993
  let l = t.after(), a = n.tr.replaceWith(l, l, o.createAndFill());
9976
- a.setSelection(E.near(a.doc.resolve(l), 1)), e(a.scrollIntoView());
9994
+ a.setSelection(v.near(a.doc.resolve(l), 1)), e(a.scrollIntoView());
9977
9995
  }
9978
9996
  return !0;
9979
9997
  }, _o = (n, e) => {
@@ -9994,7 +10012,7 @@ const bd = (n, e) => {
9994
10012
  return !1;
9995
10013
  if (t.depth > 1 && t.after() != t.end(-1)) {
9996
10014
  let s = t.before();
9997
- if (ve(n.doc, s))
10015
+ if (Ee(n.doc, s))
9998
10016
  return e && e(n.tr.split(s).scrollIntoView()), !0;
9999
10017
  }
10000
10018
  let r = t.blockRange(), i = r && wt(r);
@@ -10004,7 +10022,7 @@ function kd(n) {
10004
10022
  return (e, t) => {
10005
10023
  let { $from: r, $to: i } = e.selection;
10006
10024
  if (e.selection instanceof S && e.selection.node.isBlock)
10007
- return !r.parentOffset || !ve(e.doc, r.pos) ? !1 : (t && t(e.tr.split(r.pos).scrollIntoView()), !0);
10025
+ return !r.parentOffset || !Ee(e.doc, r.pos) ? !1 : (t && t(e.tr.split(r.pos).scrollIntoView()), !0);
10008
10026
  if (!r.depth)
10009
10027
  return !1;
10010
10028
  let s = [], o, l, a = !1, c = !1;
@@ -10019,8 +10037,8 @@ function kd(n) {
10019
10037
  }
10020
10038
  let d = e.tr;
10021
10039
  (e.selection instanceof M || e.selection instanceof ce) && d.deleteSelection();
10022
- let u = d.mapping.map(r.pos), f = ve(d.doc, u, s.length, s);
10023
- if (f || (s[0] = l ? { type: l } : null, f = ve(d.doc, u, s.length, s)), !f)
10040
+ let u = d.mapping.map(r.pos), f = Ee(d.doc, u, s.length, s);
10041
+ if (f || (s[0] = l ? { type: l } : null, f = Ee(d.doc, u, s.length, s)), !f)
10024
10042
  return !1;
10025
10043
  if (d.split(u, s.length, s), !a && c && r.node(o).type != l) {
10026
10044
  let h = d.mapping.map(r.before(o)), p = d.doc.resolve(h);
@@ -10037,7 +10055,7 @@ function Md(n, e, t) {
10037
10055
  let r = e.nodeBefore, i = e.nodeAfter, s = e.index();
10038
10056
  return !r || !i || !r.type.compatibleContent(i.type) ? !1 : !r.content.size && e.parent.canReplace(s - 1, s) ? (t && t(n.tr.delete(e.pos - r.nodeSize, e.pos).scrollIntoView()), !0) : !e.parent.canReplace(s, s + 1) || !(i.isTextblock || je(n.doc, e.pos)) ? !1 : (t && t(n.tr.join(e.pos).scrollIntoView()), !0);
10039
10057
  }
10040
- function Yo(n, e, t, r) {
10058
+ function Xo(n, e, t, r) {
10041
10059
  let i = e.nodeBefore, s = e.nodeAfter, o, l, a = i.type.spec.isolating || s.type.spec.isolating;
10042
10060
  if (!a && Md(n, e, t))
10043
10061
  return !0;
@@ -10053,7 +10071,7 @@ function Yo(n, e, t, r) {
10053
10071
  }
10054
10072
  return !0;
10055
10073
  }
10056
- let d = s.type.spec.isolating || r > 0 && a ? null : E.findFrom(e, 1), u = d && d.$from.blockRange(d.$to), f = u && wt(u);
10074
+ let d = s.type.spec.isolating || r > 0 && a ? null : v.findFrom(e, 1), u = d && d.$from.blockRange(d.$to), f = u && wt(u);
10057
10075
  if (f != null && f >= e.depth)
10058
10076
  return t && t(n.tr.lift(u, f).scrollIntoView()), !0;
10059
10077
  if (c && Mt(s, "start", !0) && Mt(i, "end")) {
@@ -10076,7 +10094,7 @@ function Yo(n, e, t, r) {
10076
10094
  }
10077
10095
  return !1;
10078
10096
  }
10079
- function Xo(n) {
10097
+ function Yo(n) {
10080
10098
  return function(e, t) {
10081
10099
  let r = e.selection, i = n < 0 ? r.$from : r.$to, s = i.depth;
10082
10100
  for (; i.node(s).isInline; ) {
@@ -10087,7 +10105,7 @@ function Xo(n) {
10087
10105
  return i.node(s).isTextblock ? (t && t(e.tr.setSelection(M.create(e.doc, n < 0 ? i.start(s) : i.end(s)))), !0) : !1;
10088
10106
  };
10089
10107
  }
10090
- const wd = Xo(-1), Cd = Xo(1);
10108
+ const wd = Yo(-1), Cd = Yo(1);
10091
10109
  function Td(n, e = null) {
10092
10110
  return function(t, r) {
10093
10111
  let { $from: i, $to: s } = t.selection, o = i.blockRange(s), l = o && $r(o, n, e);
@@ -10132,8 +10150,8 @@ function ei(...n) {
10132
10150
  return !1;
10133
10151
  };
10134
10152
  }
10135
- ei(Yr, Ho, qo);
10136
- ei(Yr, Ko, Jo);
10153
+ ei(Xr, Ho, qo);
10154
+ ei(Xr, Ko, Jo);
10137
10155
  ei(Uo, _o, Go, xd);
10138
10156
  typeof navigator < "u" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os < "u" && os.platform && os.platform() == "darwin";
10139
10157
  function Od(n, e = null) {
@@ -10142,10 +10160,10 @@ function Od(n, e = null) {
10142
10160
  if (!o)
10143
10161
  return !1;
10144
10162
  let l = r ? t.tr : null;
10145
- return Ed(l, o, n, e) ? (r && r(l.scrollIntoView()), !0) : !1;
10163
+ return vd(l, o, n, e) ? (r && r(l.scrollIntoView()), !0) : !1;
10146
10164
  };
10147
10165
  }
10148
- function Ed(n, e, t, r = null) {
10166
+ function vd(n, e, t, r = null) {
10149
10167
  let i = !1, s = e, o = e.$from.doc;
10150
10168
  if (e.depth >= 2 && e.$from.node(e.depth - 1).type.compatibleContent(t) && e.startIndex == 0) {
10151
10169
  if (e.$from.index(e.depth - 1) == 0)
@@ -10154,9 +10172,9 @@ function Ed(n, e, t, r = null) {
10154
10172
  s = new bn(a, a, e.depth), e.endIndex < e.parent.childCount && (e = new bn(e.$from, o.resolve(e.$to.end(e.depth)), e.depth)), i = !0;
10155
10173
  }
10156
10174
  let l = $r(s, t, r, e);
10157
- return l ? (n && vd(n, e, l, i, t), !0) : !1;
10175
+ return l ? (n && Ed(n, e, l, i, t), !0) : !1;
10158
10176
  }
10159
- function vd(n, e, t, r, i) {
10177
+ function Ed(n, e, t, r, i) {
10160
10178
  let s = b.empty;
10161
10179
  for (let d = t.length - 1; d >= 0; d--)
10162
10180
  s = b.from(t[d].type.create(t[d].attrs, s));
@@ -10166,7 +10184,7 @@ function vd(n, e, t, r, i) {
10166
10184
  t[d].type == i && (o = d + 1);
10167
10185
  let l = t.length - o, a = e.start + t.length - (r ? 2 : 0), c = e.parent;
10168
10186
  for (let d = e.startIndex, u = e.endIndex, f = !0; d < u; d++, f = !1)
10169
- !f && ve(n.doc, a, l) && (n.split(a, l), a += 2 * l), a += c.child(d).nodeSize;
10187
+ !f && Ee(n.doc, a, l) && (n.split(a, l), a += 2 * l), a += c.child(d).nodeSize;
10170
10188
  return n;
10171
10189
  }
10172
10190
  function Nd(n) {
@@ -10435,7 +10453,7 @@ function Ir(n, e) {
10435
10453
  function Qo(n) {
10436
10454
  return typeof n == "function";
10437
10455
  }
10438
- function v(n, e = void 0, ...t) {
10456
+ function E(n, e = void 0, ...t) {
10439
10457
  return Qo(n) ? e ? n.bind(e)(...t) : n(...t) : n;
10440
10458
  }
10441
10459
  function Pd(n = {}) {
@@ -10484,23 +10502,23 @@ function Ld(n, e) {
10484
10502
  };
10485
10503
  }, {}), h = cs({
10486
10504
  ...f,
10487
- content: v(x(c, "content", u)),
10488
- marks: v(x(c, "marks", u)),
10489
- group: v(x(c, "group", u)),
10490
- inline: v(x(c, "inline", u)),
10491
- atom: v(x(c, "atom", u)),
10492
- selectable: v(x(c, "selectable", u)),
10493
- draggable: v(x(c, "draggable", u)),
10494
- code: v(x(c, "code", u)),
10495
- whitespace: v(x(c, "whitespace", u)),
10496
- linebreakReplacement: v(x(c, "linebreakReplacement", u)),
10497
- defining: v(x(c, "defining", u)),
10498
- isolating: v(x(c, "isolating", u)),
10505
+ content: E(x(c, "content", u)),
10506
+ marks: E(x(c, "marks", u)),
10507
+ group: E(x(c, "group", u)),
10508
+ inline: E(x(c, "inline", u)),
10509
+ atom: E(x(c, "atom", u)),
10510
+ selectable: E(x(c, "selectable", u)),
10511
+ draggable: E(x(c, "draggable", u)),
10512
+ code: E(x(c, "code", u)),
10513
+ whitespace: E(x(c, "whitespace", u)),
10514
+ linebreakReplacement: E(x(c, "linebreakReplacement", u)),
10515
+ defining: E(x(c, "defining", u)),
10516
+ isolating: E(x(c, "isolating", u)),
10499
10517
  attrs: Object.fromEntries(d.map((y) => {
10500
10518
  var T;
10501
10519
  return [y.name, { default: (T = y == null ? void 0 : y.attribute) === null || T === void 0 ? void 0 : T.default }];
10502
10520
  }))
10503
- }), p = v(x(c, "parseHTML", u));
10521
+ }), p = E(x(c, "parseHTML", u));
10504
10522
  p && (h.parseDOM = p.map((y) => as(y, d)));
10505
10523
  const m = x(c, "renderHTML", u);
10506
10524
  m && (h.toDOM = (y) => m({
@@ -10523,16 +10541,16 @@ function Ld(n, e) {
10523
10541
  };
10524
10542
  }, {}), h = cs({
10525
10543
  ...f,
10526
- inclusive: v(x(c, "inclusive", u)),
10527
- excludes: v(x(c, "excludes", u)),
10528
- group: v(x(c, "group", u)),
10529
- spanning: v(x(c, "spanning", u)),
10530
- code: v(x(c, "code", u)),
10544
+ inclusive: E(x(c, "inclusive", u)),
10545
+ excludes: E(x(c, "excludes", u)),
10546
+ group: E(x(c, "group", u)),
10547
+ spanning: E(x(c, "spanning", u)),
10548
+ code: E(x(c, "code", u)),
10531
10549
  attrs: Object.fromEntries(d.map((g) => {
10532
10550
  var y;
10533
10551
  return [g.name, { default: (y = g == null ? void 0 : g.attribute) === null || y === void 0 ? void 0 : y.default }];
10534
10552
  }))
10535
- }), p = v(x(c, "parseHTML", u));
10553
+ }), p = E(x(c, "parseHTML", u));
10536
10554
  p && (h.parseDOM = p.map((g) => as(g, d)));
10537
10555
  const m = x(c, "renderHTML", u);
10538
10556
  return m && (h.toDOM = (g) => m({
@@ -10723,9 +10741,9 @@ class Me {
10723
10741
  }, this.config = {
10724
10742
  ...this.config,
10725
10743
  ...e
10726
- }, this.name = this.config.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = v(x(this, "addOptions", {
10744
+ }, this.name = this.config.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = E(x(this, "addOptions", {
10727
10745
  name: this.name
10728
- }))), this.storage = v(x(this, "addStorage", {
10746
+ }))), this.storage = E(x(this, "addStorage", {
10729
10747
  name: this.name,
10730
10748
  options: this.options
10731
10749
  })) || {};
@@ -10742,9 +10760,9 @@ class Me {
10742
10760
  }
10743
10761
  extend(e = {}) {
10744
10762
  const t = new Me(e);
10745
- return t.parent = this, this.child = t, t.name = e.name ? e.name : t.parent.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`), t.options = v(x(t, "addOptions", {
10763
+ return t.parent = this, this.child = t, t.name = e.name ? e.name : t.parent.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`), t.options = E(x(t, "addOptions", {
10746
10764
  name: t.name
10747
- })), t.storage = v(x(t, "addStorage", {
10765
+ })), t.storage = E(x(t, "addStorage", {
10748
10766
  name: t.name,
10749
10767
  options: t.options
10750
10768
  })), t;
@@ -11069,7 +11087,7 @@ class gt {
11069
11087
  editor: this.editor,
11070
11088
  type: ar(e.name, this.schema)
11071
11089
  };
11072
- e.type === "mark" && (!((t = v(x(e, "keepOnSplit", r))) !== null && t !== void 0) || t) && this.splittableMarks.push(e.name);
11090
+ e.type === "mark" && (!((t = E(x(e, "keepOnSplit", r))) !== null && t !== void 0) || t) && this.splittableMarks.push(e.name);
11073
11091
  const i = x(e, "onBeforeCreate", r), s = x(e, "onCreate", r), o = x(e, "onUpdate", r), l = x(e, "onSelectionUpdate", r), a = x(e, "onTransaction", r), c = x(e, "onFocus", r), d = x(e, "onBlur", r), u = x(e, "onDestroy", r);
11074
11092
  i && this.editor.on("beforeCreate", i), s && this.editor.on("create", s), o && this.editor.on("update", o), l && this.editor.on("selectionUpdate", l), a && this.editor.on("transaction", a), c && this.editor.on("focus", c), d && this.editor.on("blur", d), u && this.editor.on("destroy", u);
11075
11093
  });
@@ -11083,9 +11101,9 @@ class G {
11083
11101
  }, this.config = {
11084
11102
  ...this.config,
11085
11103
  ...e
11086
- }, this.name = this.config.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = v(x(this, "addOptions", {
11104
+ }, this.name = this.config.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = E(x(this, "addOptions", {
11087
11105
  name: this.name
11088
- }))), this.storage = v(x(this, "addStorage", {
11106
+ }))), this.storage = E(x(this, "addStorage", {
11089
11107
  name: this.name,
11090
11108
  options: this.options
11091
11109
  })) || {};
@@ -11102,9 +11120,9 @@ class G {
11102
11120
  }
11103
11121
  extend(e = {}) {
11104
11122
  const t = new G({ ...this.config, ...e });
11105
- return t.parent = this, this.child = t, t.name = e.name ? e.name : t.parent.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`), t.options = v(x(t, "addOptions", {
11123
+ return t.parent = this, this.child = t, t.name = e.name ? e.name : t.parent.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`), t.options = E(x(t, "addOptions", {
11106
11124
  name: t.name
11107
- })), t.storage = v(x(t, "addStorage", {
11125
+ })), t.storage = E(x(t, "addStorage", {
11108
11126
  name: t.name,
11109
11127
  options: t.options
11110
11128
  })), t;
@@ -11159,7 +11177,7 @@ const _d = G.create({
11159
11177
  }), Gd = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
11160
11178
  var t;
11161
11179
  n.isDestroyed || (e.dom.blur(), (t = window == null ? void 0 : window.getSelection()) === null || t === void 0 || t.removeAllRanges());
11162
- }), !0), Yd = (n = !1) => ({ commands: e }) => e.setContent("", n), Xd = () => ({ state: n, tr: e, dispatch: t }) => {
11180
+ }), !0), Xd = (n = !1) => ({ commands: e }) => e.setContent("", n), Yd = () => ({ state: n, tr: e, dispatch: t }) => {
11163
11181
  const { selection: r } = e, { ranges: i } = r;
11164
11182
  return t && i.forEach(({ $from: s, $to: o }) => {
11165
11183
  n.doc.nodesBetween(s.pos, o.pos, (l, a) => {
@@ -11209,7 +11227,7 @@ const _d = G.create({
11209
11227
  }, ru = (n) => ({ tr: e, dispatch: t }) => {
11210
11228
  const { from: r, to: i } = n;
11211
11229
  return t && e.delete(r, i), !0;
11212
- }, iu = () => ({ state: n, dispatch: e }) => Yr(n, e), su = () => ({ commands: n }) => n.keyboardShortcut("Enter"), ou = () => ({ state: n, dispatch: e }) => bd(n, e);
11230
+ }, iu = () => ({ state: n, dispatch: e }) => Xr(n, e), su = () => ({ commands: n }) => n.keyboardShortcut("Enter"), ou = () => ({ state: n, dispatch: e }) => bd(n, e);
11213
11231
  function On(n, e, t = { strict: !0 }) {
11214
11232
  const r = Object.keys(e);
11215
11233
  return r.length ? r.every((i) => t.strict ? e[i] === n[i] : ni(e[i]) ? e[i].test(n[i]) : e[i] === n[i]) : !0;
@@ -11269,24 +11287,24 @@ const lu = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
11269
11287
  function rl(n) {
11270
11288
  return n instanceof M;
11271
11289
  }
11272
- function Xe(n = 0, e = 0, t = 0) {
11290
+ function Ye(n = 0, e = 0, t = 0) {
11273
11291
  return Math.min(Math.max(n, e), t);
11274
11292
  }
11275
11293
  function il(n, e = null) {
11276
11294
  if (!e)
11277
11295
  return null;
11278
- const t = E.atStart(n), r = E.atEnd(n);
11296
+ const t = v.atStart(n), r = v.atEnd(n);
11279
11297
  if (e === "start" || e === !0)
11280
11298
  return t;
11281
11299
  if (e === "end")
11282
11300
  return r;
11283
11301
  const i = t.from, s = r.to;
11284
- return e === "all" ? M.create(n, Xe(0, i, s), Xe(n.content.size, i, s)) : M.create(n, Xe(e, i, s), Xe(e, i, s));
11302
+ return e === "all" ? M.create(n, Ye(0, i, s), Ye(n.content.size, i, s)) : M.create(n, Ye(e, i, s), Ye(e, i, s));
11285
11303
  }
11286
11304
  function fs() {
11287
11305
  return navigator.platform === "Android" || /android/i.test(navigator.userAgent);
11288
11306
  }
11289
- function En() {
11307
+ function vn() {
11290
11308
  return [
11291
11309
  "iPad Simulator",
11292
11310
  "iPhone Simulator",
@@ -11305,8 +11323,8 @@ const du = (n = null, e = {}) => ({ editor: t, view: r, tr: i, dispatch: s }) =>
11305
11323
  ...e
11306
11324
  };
11307
11325
  const o = () => {
11308
- (En() || fs()) && r.dom.focus(), requestAnimationFrame(() => {
11309
- t.isDestroyed || (r.focus(), cu() && !En() && !fs() && r.dom.focus({ preventScroll: !0 }));
11326
+ (vn() || fs()) && r.dom.focus(), requestAnimationFrame(() => {
11327
+ t.isDestroyed || (r.focus(), cu() && !vn() && !fs() && r.dom.focus({ preventScroll: !0 }));
11310
11328
  });
11311
11329
  };
11312
11330
  if (r.hasFocus() && n === null || n === !1)
@@ -11387,7 +11405,7 @@ function hu(n, e, t) {
11387
11405
  let o = 0;
11388
11406
  s.forEach((l, a, c, d) => {
11389
11407
  o === 0 && (o = d);
11390
- }), n.setSelection(E.near(n.doc.resolve(o), t));
11408
+ }), n.setSelection(v.near(n.doc.resolve(o), t));
11391
11409
  }
11392
11410
  const pu = (n) => !("type" in n), mu = (n, e, t) => ({ tr: r, dispatch: i, editor: s }) => {
11393
11411
  var o;
@@ -11486,7 +11504,7 @@ function Cu(n) {
11486
11504
  else if (/^s(hift)?$/i.test(a))
11487
11505
  s = !0;
11488
11506
  else if (/^mod$/i.test(a))
11489
- En() || ol() ? o = !0 : i = !0;
11507
+ vn() || ol() ? o = !0 : i = !0;
11490
11508
  else
11491
11509
  throw new Error(`Unrecognized modifier name: ${a}`);
11492
11510
  }
@@ -11527,7 +11545,7 @@ function Wt(n, e, t = {}) {
11527
11545
  const Ou = (n, e = {}) => ({ state: t, dispatch: r }) => {
11528
11546
  const i = H(n, t.schema);
11529
11547
  return Wt(t, i, e) ? yd(t, r) : !1;
11530
- }, Eu = () => ({ state: n, dispatch: e }) => Go(n, e), vu = (n) => ({ state: e, dispatch: t }) => {
11548
+ }, vu = () => ({ state: n, dispatch: e }) => Go(n, e), Eu = (n) => ({ state: e, dispatch: t }) => {
11531
11549
  const r = H(n, e.schema);
11532
11550
  return Nd(r)(e, t);
11533
11551
  }, Nu = () => ({ state: n, dispatch: e }) => Uo(n, e);
@@ -11685,7 +11703,7 @@ function ps(n, e) {
11685
11703
  name: r.name,
11686
11704
  options: r.options,
11687
11705
  storage: r.storage
11688
- }, s = v(x(r, "group", i));
11706
+ }, s = E(x(r, "group", i));
11689
11707
  return typeof s != "string" ? !1 : s.split(" ").includes("list");
11690
11708
  }
11691
11709
  function si(n, { checkChildren: e = !0, ignoreWhitespace: t = !1 } = {}) {
@@ -11762,15 +11780,15 @@ const Uu = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
11762
11780
  const s = H(n, t.schema);
11763
11781
  let o;
11764
11782
  return t.selection.$anchor.sameParent(t.selection.$head) && (o = t.selection.$anchor.parent.attrs), s.isTextblock ? i().command(({ commands: l }) => ls(s, { ...o, ...e })(t) ? !0 : l.clearNodes()).command(({ state: l }) => ls(s, { ...o, ...e })(l, r)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
11765
- }, Yu = (n) => ({ tr: e, dispatch: t }) => {
11783
+ }, Xu = (n) => ({ tr: e, dispatch: t }) => {
11766
11784
  if (t) {
11767
- const { doc: r } = e, i = Xe(n, 0, r.content.size), s = S.create(r, i);
11785
+ const { doc: r } = e, i = Ye(n, 0, r.content.size), s = S.create(r, i);
11768
11786
  e.setSelection(s);
11769
11787
  }
11770
11788
  return !0;
11771
- }, Xu = (n) => ({ tr: e, dispatch: t }) => {
11789
+ }, Yu = (n) => ({ tr: e, dispatch: t }) => {
11772
11790
  if (t) {
11773
- const { doc: r } = e, { from: i, to: s } = typeof n == "number" ? { from: n, to: n } : n, o = M.atStart(r).from, l = M.atEnd(r).to, a = Xe(i, o, l), c = Xe(s, o, l), d = M.create(r, a, c);
11791
+ const { doc: r } = e, { from: i, to: s } = typeof n == "number" ? { from: n, to: n } : n, o = M.atStart(r).from, l = M.atEnd(r).to, a = Ye(i, o, l), c = Ye(s, o, l), d = M.create(r, a, c);
11774
11792
  e.setSelection(d);
11775
11793
  }
11776
11794
  return !0;
@@ -11788,7 +11806,7 @@ function ms(n, e) {
11788
11806
  const Qu = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor: i }) => {
11789
11807
  const { selection: s, doc: o } = e, { $from: l, $to: a } = s, c = i.extensionManager.attributes, d = un(c, l.node().type.name, l.node().attrs);
11790
11808
  if (s instanceof S && s.node.isBlock)
11791
- return !l.parentOffset || !ve(o, l.pos) ? !1 : (r && (n && ms(t, i.extensionManager.splittableMarks), e.split(l.pos).scrollIntoView()), !0);
11809
+ return !l.parentOffset || !Ee(o, l.pos) ? !1 : (r && (n && ms(t, i.extensionManager.splittableMarks), e.split(l.pos).scrollIntoView()), !0);
11792
11810
  if (!l.parent.isBlock)
11793
11811
  return !1;
11794
11812
  const u = a.parentOffset === a.parent.content.size, f = l.depth === 0 ? void 0 : $u(l.node(-1).contentMatchAt(l.indexAfter(-1)));
@@ -11797,8 +11815,8 @@ const Qu = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
11797
11815
  type: f,
11798
11816
  attrs: d
11799
11817
  }
11800
- ] : void 0, p = ve(e.doc, e.mapping.map(l.pos), 1, h);
11801
- if (!h && !p && ve(e.doc, e.mapping.map(l.pos), 1, f ? [{ type: f }] : void 0) && (p = !0, h = f ? [
11818
+ ] : void 0, p = Ee(e.doc, e.mapping.map(l.pos), 1, h);
11819
+ if (!h && !p && Ee(e.doc, e.mapping.map(l.pos), 1, f ? [{ type: f }] : void 0) && (p = !0, h = f ? [
11802
11820
  {
11803
11821
  type: f,
11804
11822
  attrs: d
@@ -11836,10 +11854,10 @@ const Qu = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
11836
11854
  const L = a.before(a.depth - (T - 1));
11837
11855
  t.replace(L, a.after(-w), new k(y, 4 - T, 0));
11838
11856
  let C = -1;
11839
- t.doc.nodesBetween(L, t.doc.content.size, (N, Y) => {
11857
+ t.doc.nodesBetween(L, t.doc.content.size, (N, X) => {
11840
11858
  if (C > -1)
11841
11859
  return !1;
11842
- N.isTextblock && N.content.size === 0 && (C = Y + 1);
11860
+ N.isTextblock && N.content.size === 0 && (C = X + 1);
11843
11861
  }), C > -1 && t.setSelection(M.near(t.doc.resolve(C))), t.scrollIntoView();
11844
11862
  }
11845
11863
  return !0;
@@ -11856,7 +11874,7 @@ const Qu = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
11856
11874
  { type: l, attrs: p },
11857
11875
  { type: h, attrs: m }
11858
11876
  ] : [{ type: l, attrs: p }];
11859
- if (!ve(t.doc, a.pos, 2))
11877
+ if (!Ee(t.doc, a.pos, 2))
11860
11878
  return !1;
11861
11879
  if (i) {
11862
11880
  const { selection: y, storedMarks: T } = r, { splittableMarks: w } = s.extensionManager, I = T || y.$to.parentOffset && y.$from.marks();
@@ -11989,8 +12007,8 @@ const Qu = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
11989
12007
  var ff = /* @__PURE__ */ Object.freeze({
11990
12008
  __proto__: null,
11991
12009
  blur: Gd,
11992
- clearContent: Yd,
11993
- clearNodes: Xd,
12010
+ clearContent: Xd,
12011
+ clearNodes: Yd,
11994
12012
  command: Zd,
11995
12013
  createParagraphNear: Qd,
11996
12014
  cut: eu,
@@ -12016,8 +12034,8 @@ var ff = /* @__PURE__ */ Object.freeze({
12016
12034
  joinUp: gu,
12017
12035
  keyboardShortcut: Tu,
12018
12036
  lift: Ou,
12019
- liftEmptyBlock: Eu,
12020
- liftListItem: vu,
12037
+ liftEmptyBlock: vu,
12038
+ liftListItem: Eu,
12021
12039
  newlineInCode: Nu,
12022
12040
  resetAttributes: Au,
12023
12041
  scrollIntoView: Du,
@@ -12031,8 +12049,8 @@ var ff = /* @__PURE__ */ Object.freeze({
12031
12049
  setMark: Uu,
12032
12050
  setMeta: _u,
12033
12051
  setNode: Gu,
12034
- setNodeSelection: Yu,
12035
- setTextSelection: Xu,
12052
+ setNodeSelection: Xu,
12053
+ setTextSelection: Yu,
12036
12054
  sinkListItem: Zu,
12037
12055
  splitBlock: Qu,
12038
12056
  splitListItem: ef,
@@ -12116,7 +12134,7 @@ const hf = G.create({
12116
12134
  () => o.undoInputRule(),
12117
12135
  // maybe convert first text block node to default node
12118
12136
  () => o.command(({ tr: l }) => {
12119
- const { selection: a, doc: c } = l, { empty: d, $anchor: u } = a, { pos: f, parent: h } = u, p = u.parent.isTextblock && f > 0 ? l.doc.resolve(f - 1) : u, m = p.parent.type.spec.isolating, g = u.pos - u.parentOffset, y = m && p.parent.childCount === 1 ? g === u.pos : E.atStart(c).from === f;
12137
+ const { selection: a, doc: c } = l, { empty: d, $anchor: u } = a, { pos: f, parent: h } = u, p = u.parent.isTextblock && f > 0 ? l.doc.resolve(f - 1) : u, m = p.parent.type.spec.isolating, g = u.pos - u.parentOffset, y = m && p.parent.childCount === 1 ? g === u.pos : v.atStart(c).from === f;
12120
12138
  return !d || !h.type.isTextblock || h.textContent.length || !y || y && u.parent.type.name === "paragraph" ? !1 : o.clearNodes();
12121
12139
  }),
12122
12140
  () => o.deleteSelection(),
@@ -12154,7 +12172,7 @@ const hf = G.create({
12154
12172
  "Ctrl-a": () => this.editor.commands.selectTextblockStart(),
12155
12173
  "Ctrl-e": () => this.editor.commands.selectTextblockEnd()
12156
12174
  };
12157
- return En() || ol() ? s : i;
12175
+ return vn() || ol() ? s : i;
12158
12176
  },
12159
12177
  addProseMirrorPlugins() {
12160
12178
  return [
@@ -12171,7 +12189,7 @@ const hf = G.create({
12171
12189
  const r = n.some((m) => m.docChanged) && !e.doc.eq(t.doc), i = n.some((m) => m.getMeta("preventClearDocument"));
12172
12190
  if (!r || i)
12173
12191
  return;
12174
- const { empty: s, from: o, to: l } = e.selection, a = E.atStart(e.doc).from, c = E.atEnd(e.doc).to;
12192
+ const { empty: s, from: o, to: l } = e.selection, a = v.atStart(e.doc).from, c = v.atEnd(e.doc).to;
12175
12193
  if (s || !(o === a && l === c) || !si(t.doc))
12176
12194
  return;
12177
12195
  const f = t.tr, h = Vn({
@@ -12777,7 +12795,7 @@ function at(n) {
12777
12795
  return new qn({
12778
12796
  find: n.find,
12779
12797
  handler: ({ state: e, range: t, match: r }) => {
12780
- const i = v(n.getAttributes, void 0, r);
12798
+ const i = E(n.getAttributes, void 0, r);
12781
12799
  if (i === !1 || i === null)
12782
12800
  return null;
12783
12801
  const { tr: s } = e, o = r[r.length - 1], l = r[0];
@@ -12796,7 +12814,7 @@ function cl(n) {
12796
12814
  return new qn({
12797
12815
  find: n.find,
12798
12816
  handler: ({ state: e, range: t, match: r }) => {
12799
- const i = v(n.getAttributes, void 0, r) || {}, { tr: s } = e, o = t.from;
12817
+ const i = E(n.getAttributes, void 0, r) || {}, { tr: s } = e, o = t.from;
12800
12818
  let l = t.to;
12801
12819
  const a = n.type.create(i);
12802
12820
  if (r[1]) {
@@ -12817,7 +12835,7 @@ function Br(n) {
12817
12835
  return new qn({
12818
12836
  find: n.find,
12819
12837
  handler: ({ state: e, range: t, match: r }) => {
12820
- const i = e.doc.resolve(t.from), s = v(n.getAttributes, void 0, r) || {};
12838
+ const i = e.doc.resolve(t.from), s = E(n.getAttributes, void 0, r) || {};
12821
12839
  if (!i.node(-1).canReplaceWith(i.index(-1), i.indexAfter(-1), n.type))
12822
12840
  return null;
12823
12841
  e.tr.delete(t.from, t.to).setBlockType(t.from, t.from, n.type, s);
@@ -12828,7 +12846,7 @@ function qt(n) {
12828
12846
  return new qn({
12829
12847
  find: n.find,
12830
12848
  handler: ({ state: e, range: t, match: r, chain: i }) => {
12831
- const s = v(n.getAttributes, void 0, r) || {}, o = e.tr.delete(t.from, t.to), a = o.doc.resolve(t.from).blockRange(), c = a && $r(a, n.type, s);
12849
+ const s = E(n.getAttributes, void 0, r) || {}, o = e.tr.delete(t.from, t.to), a = o.doc.resolve(t.from).blockRange(), c = a && $r(a, n.type, s);
12832
12850
  if (!c)
12833
12851
  return null;
12834
12852
  if (o.wrap(a, c), n.keepMarks && n.editor) {
@@ -12855,9 +12873,9 @@ class ne {
12855
12873
  }, this.config = {
12856
12874
  ...this.config,
12857
12875
  ...e
12858
- }, this.name = this.config.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = v(x(this, "addOptions", {
12876
+ }, this.name = this.config.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = E(x(this, "addOptions", {
12859
12877
  name: this.name
12860
- }))), this.storage = v(x(this, "addStorage", {
12878
+ }))), this.storage = E(x(this, "addStorage", {
12861
12879
  name: this.name,
12862
12880
  options: this.options
12863
12881
  })) || {};
@@ -12874,9 +12892,9 @@ class ne {
12874
12892
  }
12875
12893
  extend(e = {}) {
12876
12894
  const t = new ne(e);
12877
- return t.parent = this, this.child = t, t.name = e.name ? e.name : t.parent.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`), t.options = v(x(t, "addOptions", {
12895
+ return t.parent = this, this.child = t, t.name = e.name ? e.name : t.parent.name, e.defaultOptions && Object.keys(e.defaultOptions).length > 0 && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`), t.options = E(x(t, "addOptions", {
12878
12896
  name: t.name
12879
- })), t.storage = v(x(t, "addStorage", {
12897
+ })), t.storage = E(x(t, "addStorage", {
12880
12898
  name: t.name,
12881
12899
  options: t.options
12882
12900
  })), t;
@@ -12886,7 +12904,7 @@ function ct(n) {
12886
12904
  return new Wd({
12887
12905
  find: n.find,
12888
12906
  handler: ({ state: e, range: t, match: r, pasteEvent: i }) => {
12889
- const s = v(n.getAttributes, void 0, r, i);
12907
+ const s = E(n.getAttributes, void 0, r, i);
12890
12908
  if (s === !1 || s === null)
12891
12909
  return null;
12892
12910
  const { tr: o } = e, l = r[r.length - 1], a = r[0];
@@ -12953,7 +12971,7 @@ const Tf = /^\s*>\s$/, Of = ne.create({
12953
12971
  })
12954
12972
  ];
12955
12973
  }
12956
- }), Ef = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, vf = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, Nf = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, Af = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, Df = Me.create({
12974
+ }), vf = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Ef = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, Nf = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, Af = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, Df = Me.create({
12957
12975
  name: "bold",
12958
12976
  addOptions() {
12959
12977
  return {
@@ -12998,7 +13016,7 @@ const Tf = /^\s*>\s$/, Of = ne.create({
12998
13016
  addInputRules() {
12999
13017
  return [
13000
13018
  at({
13001
- find: Ef,
13019
+ find: vf,
13002
13020
  type: this.type
13003
13021
  }),
13004
13022
  at({
@@ -13010,7 +13028,7 @@ const Tf = /^\s*>\s$/, Of = ne.create({
13010
13028
  addPasteRules() {
13011
13029
  return [
13012
13030
  ct({
13013
- find: vf,
13031
+ find: Ef,
13014
13032
  type: this.type
13015
13033
  }),
13016
13034
  ct({
@@ -13197,7 +13215,7 @@ const Tf = /^\s*>\s$/, Of = ne.create({
13197
13215
  if (!s || i.parent.type !== this.type || !(i.parentOffset === i.parent.nodeSize - 2))
13198
13216
  return !1;
13199
13217
  const l = i.after();
13200
- return l === void 0 ? !1 : r.nodeAt(l) ? n.commands.command(({ tr: c }) => (c.setSelection(E.near(r.resolve(l))), !0)) : n.commands.exitCode();
13218
+ return l === void 0 ? !1 : r.nodeAt(l) ? n.commands.command(({ tr: c }) => (c.setSelection(v.near(r.resolve(l))), !0)) : n.commands.exitCode();
13201
13219
  }
13202
13220
  };
13203
13221
  },
@@ -13310,7 +13328,7 @@ class Wf {
13310
13328
  if (t && !s) {
13311
13329
  let o = t.pos;
13312
13330
  if (this.editorView.dragging && this.editorView.dragging.slice) {
13313
- let l = Ys(this.editorView.state.doc, o, this.editorView.dragging.slice);
13331
+ let l = Xs(this.editorView.state.doc, o, this.editorView.dragging.slice);
13314
13332
  l != null && (o = l);
13315
13333
  }
13316
13334
  this.setCursor(o), this.scheduleRemoval(5e3);
@@ -13341,7 +13359,7 @@ const qf = G.create({
13341
13359
  ];
13342
13360
  }
13343
13361
  });
13344
- class R extends E {
13362
+ class R extends v {
13345
13363
  /**
13346
13364
  Create a gap cursor.
13347
13365
  */
@@ -13350,7 +13368,7 @@ class R extends E {
13350
13368
  }
13351
13369
  map(e, t) {
13352
13370
  let r = e.resolve(t.map(this.head));
13353
- return R.valid(r) ? new R(r) : E.near(r);
13371
+ return R.valid(r) ? new R(r) : v.near(r);
13354
13372
  }
13355
13373
  content() {
13356
13374
  return k.empty;
@@ -13428,7 +13446,7 @@ class R extends E {
13428
13446
  }
13429
13447
  R.prototype.visible = !1;
13430
13448
  R.findFrom = R.findGapCursorFrom;
13431
- E.jsonID("gapcursor", R);
13449
+ v.jsonID("gapcursor", R);
13432
13450
  class oi {
13433
13451
  constructor(e) {
13434
13452
  this.pos = e;
@@ -13438,7 +13456,7 @@ class oi {
13438
13456
  }
13439
13457
  resolve(e) {
13440
13458
  let t = e.resolve(this.pos);
13441
- return R.valid(t) ? new R(t) : E.near(t);
13459
+ return R.valid(t) ? new R(t) : v.near(t);
13442
13460
  }
13443
13461
  }
13444
13462
  function dl(n) {
@@ -13481,7 +13499,7 @@ function Kf(n) {
13481
13499
  function Jf() {
13482
13500
  return new se({
13483
13501
  props: {
13484
- decorations: Yf,
13502
+ decorations: Xf,
13485
13503
  createSelectionBetween(n, e, t) {
13486
13504
  return e.pos == t.pos && R.valid(t) ? new R(t) : null;
13487
13505
  },
@@ -13531,13 +13549,13 @@ function Gf(n, e) {
13531
13549
  let s = n.state.tr.replace(t.pos, t.pos, new k(i, 0, 0));
13532
13550
  return s.setSelection(M.near(s.doc.resolve(t.pos + 1))), n.dispatch(s), !1;
13533
13551
  }
13534
- function Yf(n) {
13552
+ function Xf(n) {
13535
13553
  if (!(n.selection instanceof R))
13536
13554
  return null;
13537
13555
  let e = document.createElement("div");
13538
13556
  return e.className = "ProseMirror-gapcursor", z.create(n.doc, [he.widget(n.selection.head, e, { key: "gapcursor" })]);
13539
13557
  }
13540
- const Xf = G.create({
13558
+ const Yf = G.create({
13541
13559
  name: "gapCursor",
13542
13560
  addProseMirrorPlugins() {
13543
13561
  return [
@@ -13552,7 +13570,7 @@ const Xf = G.create({
13552
13570
  storage: n.storage
13553
13571
  };
13554
13572
  return {
13555
- allowGapCursor: (e = v(x(n, "allowGapCursor", t))) !== null && e !== void 0 ? e : null
13573
+ allowGapCursor: (e = E(x(n, "allowGapCursor", t))) !== null && e !== void 0 ? e : null
13556
13574
  };
13557
13575
  }
13558
13576
  }), Zf = ne.create({
@@ -13655,10 +13673,10 @@ const Xf = G.create({
13655
13673
  }));
13656
13674
  }
13657
13675
  });
13658
- var vn = 200, V = function() {
13676
+ var En = 200, V = function() {
13659
13677
  };
13660
13678
  V.prototype.append = function(e) {
13661
- return e.length ? (e = V.from(e), !this.length && e || e.length < vn && this.leafAppend(e) || this.length < vn && e.leafPrepend(this) || this.appendInner(e)) : this;
13679
+ return e.length ? (e = V.from(e), !this.length && e || e.length < En && this.leafAppend(e) || this.length < En && e.leafPrepend(this) || this.appendInner(e)) : this;
13662
13680
  };
13663
13681
  V.prototype.prepend = function(e) {
13664
13682
  return e.length ? V.from(e).append(this) : this;
@@ -13707,10 +13725,10 @@ var ul = /* @__PURE__ */ function(n) {
13707
13725
  if (i(this.values[a], l + a) === !1)
13708
13726
  return !1;
13709
13727
  }, e.prototype.leafAppend = function(i) {
13710
- if (this.length + i.length <= vn)
13728
+ if (this.length + i.length <= En)
13711
13729
  return new e(this.values.concat(i.flatten()));
13712
13730
  }, e.prototype.leafPrepend = function(i) {
13713
- if (this.length + i.length <= vn)
13731
+ if (this.length + i.length <= En)
13714
13732
  return new e(i.flatten().concat(this.values));
13715
13733
  }, t.length.get = function() {
13716
13734
  return this.values.length;
@@ -14322,7 +14340,7 @@ const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14322
14340
  name: "starterKit",
14323
14341
  addExtensions() {
14324
14342
  const n = [];
14325
- return this.options.bold !== !1 && n.push(Df.configure(this.options.bold)), this.options.blockquote !== !1 && n.push(Of.configure(this.options.blockquote)), this.options.bulletList !== !1 && n.push(Rf.configure(this.options.bulletList)), this.options.code !== !1 && n.push(Lf.configure(this.options.code)), this.options.codeBlock !== !1 && n.push($f.configure(this.options.codeBlock)), this.options.document !== !1 && n.push(Vf.configure(this.options.document)), this.options.dropcursor !== !1 && n.push(qf.configure(this.options.dropcursor)), this.options.gapcursor !== !1 && n.push(Xf.configure(this.options.gapcursor)), this.options.hardBreak !== !1 && n.push(Zf.configure(this.options.hardBreak)), this.options.heading !== !1 && n.push(Qf.configure(this.options.heading)), this.options.history !== !1 && n.push(ch.configure(this.options.history)), this.options.horizontalRule !== !1 && n.push(dh.configure(this.options.horizontalRule)), this.options.italic !== !1 && n.push(mh.configure(this.options.italic)), this.options.listItem !== !1 && n.push(gh.configure(this.options.listItem)), this.options.orderedList !== !1 && n.push(bh.configure(this.options.orderedList)), this.options.paragraph !== !1 && n.push(kh.configure(this.options.paragraph)), this.options.strike !== !1 && n.push(Mh.configure(this.options.strike)), this.options.text !== !1 && n.push(wh.configure(this.options.text)), n;
14343
+ return this.options.bold !== !1 && n.push(Df.configure(this.options.bold)), this.options.blockquote !== !1 && n.push(Of.configure(this.options.blockquote)), this.options.bulletList !== !1 && n.push(Rf.configure(this.options.bulletList)), this.options.code !== !1 && n.push(Lf.configure(this.options.code)), this.options.codeBlock !== !1 && n.push($f.configure(this.options.codeBlock)), this.options.document !== !1 && n.push(Vf.configure(this.options.document)), this.options.dropcursor !== !1 && n.push(qf.configure(this.options.dropcursor)), this.options.gapcursor !== !1 && n.push(Yf.configure(this.options.gapcursor)), this.options.hardBreak !== !1 && n.push(Zf.configure(this.options.hardBreak)), this.options.heading !== !1 && n.push(Qf.configure(this.options.heading)), this.options.history !== !1 && n.push(ch.configure(this.options.history)), this.options.horizontalRule !== !1 && n.push(dh.configure(this.options.horizontalRule)), this.options.italic !== !1 && n.push(mh.configure(this.options.italic)), this.options.listItem !== !1 && n.push(gh.configure(this.options.listItem)), this.options.orderedList !== !1 && n.push(bh.configure(this.options.orderedList)), this.options.paragraph !== !1 && n.push(kh.configure(this.options.paragraph)), this.options.strike !== !1 && n.push(Mh.configure(this.options.strike)), this.options.text !== !1 && n.push(wh.configure(this.options.text)), n;
14326
14344
  }
14327
14345
  }), Th = (n) => {
14328
14346
  if (!n.children.length)
@@ -14365,7 +14383,7 @@ const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14365
14383
  }
14366
14384
  };
14367
14385
  }
14368
- }), Eh = G.create({
14386
+ }), vh = G.create({
14369
14387
  name: "color",
14370
14388
  addOptions() {
14371
14389
  return {
@@ -14397,7 +14415,7 @@ const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14397
14415
  unsetColor: () => ({ chain: n }) => n().setMark("textStyle", { color: null }).removeEmptyTextStyle().run()
14398
14416
  };
14399
14417
  }
14400
- }), vh = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/, Nh = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g, Ah = Me.create({
14418
+ }), Eh = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/, Nh = /(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g, Ah = Me.create({
14401
14419
  name: "highlight",
14402
14420
  addOptions() {
14403
14421
  return {
@@ -14442,7 +14460,7 @@ const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14442
14460
  addInputRules() {
14443
14461
  return [
14444
14462
  at({
14445
- find: vh,
14463
+ find: Eh,
14446
14464
  type: this.type
14447
14465
  })
14448
14466
  ];
@@ -14556,14 +14574,14 @@ const hl = fl(!1, !0), pl = fl(!0, !0), ch = G.create({
14556
14574
  ];
14557
14575
  }
14558
14576
  });
14559
- var re, Gt, Yt, de, Lr, ml, gl, yl, bl;
14577
+ var re, Gt, Xt, de, Lr, ml, gl, yl, bl;
14560
14578
  class Ph extends Ol {
14561
14579
  constructor() {
14562
14580
  super();
14563
14581
  F(this, de);
14564
14582
  F(this, re, null);
14565
14583
  F(this, Gt, null);
14566
- F(this, Yt, null);
14584
+ F(this, Xt, null);
14567
14585
  }
14568
14586
  connectedCallback() {
14569
14587
  super.connectedCallback() && (q(this, de, ml).call(this), q(this, de, gl).call(this), q(this, de, Lr).call(this));
@@ -14574,7 +14592,7 @@ class Ph extends Ol {
14574
14592
  set value(t) {
14575
14593
  let r = t || "";
14576
14594
  r && !/<\/?[a-z][^>]*>/i.test(r) && (r = r.split(`
14577
- `).map((i) => `<p>${i}</p>`).join("")), O(this, re) ? O(this, re).commands.setContent(r, !1) : oe(this, Yt, r);
14595
+ `).map((i) => `<p>${i}</p>`).join("")), O(this, re) ? O(this, re).commands.setContent(r, !1) : oe(this, Xt, r);
14578
14596
  }
14579
14597
  get id() {
14580
14598
  return this.getAttribute("id");
@@ -14599,7 +14617,7 @@ class Ph extends Ol {
14599
14617
  O(this, re) && (O(this, re).destroy(), oe(this, re, null));
14600
14618
  }
14601
14619
  }
14602
- re = new WeakMap(), Gt = new WeakMap(), Yt = new WeakMap(), de = new WeakSet(), // 2. 에디터 상태 업데이트 로직 분리
14620
+ re = new WeakMap(), Gt = new WeakMap(), Xt = new WeakMap(), de = new WeakSet(), // 2. 에디터 상태 업데이트 로직 분리
14603
14621
  Lr = function() {
14604
14622
  if (O(this, re)) {
14605
14623
  const t = this.readonly;
@@ -14611,7 +14629,7 @@ Lr = function() {
14611
14629
  const t = Ae.getComponentCssPath("nineEditor.css"), r = t ? `@import "${t}";` : "";
14612
14630
  this.shadowRoot.innerHTML = `
14613
14631
  <style>
14614
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.57/dist/css/nineEditor.css";
14632
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-ux@0.1.59/dist/css/nineEditor.css";
14615
14633
  ${r}
14616
14634
  </style>
14617
14635
 
@@ -14659,7 +14677,7 @@ Lr = function() {
14659
14677
  Ch,
14660
14678
  // 기본 셋 (Bold, Italic, Strike 등 포함)
14661
14679
  //Underline, // StarterKit에 없으므로 유지
14662
- Eh,
14680
+ vh,
14663
14681
  // StarterKit에 없으므로 유지
14664
14682
  Ah.configure({ multicolor: !0 }),
14665
14683
  Dh.configure({ types: ["heading", "paragraph"] }),
@@ -14678,7 +14696,7 @@ Lr = function() {
14678
14696
  }
14679
14697
  })
14680
14698
  ],
14681
- content: O(this, Yt) || this.originContents || "",
14699
+ content: O(this, Xt) || this.originContents || "",
14682
14700
  onUpdate: ({ editor: t }) => {
14683
14701
  this.dispatchEvent(new CustomEvent("change", { detail: t.getHTML() }));
14684
14702
  },