@uva-glass/component-library 3.5.0 → 3.6.1

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.
Files changed (82) hide show
  1. package/dist/{Lexical.prod-CniF7zEE.js → Lexical.prod-CWyHQUEM.js} +738 -736
  2. package/dist/Lexical.prod-CWyHQUEM.js.map +1 -0
  3. package/dist/{LexicalClipboard.prod-BXVNkwwS.js → LexicalClipboard.prod-DbqSWANZ.js} +41 -41
  4. package/dist/{LexicalClipboard.prod-BXVNkwwS.js.map → LexicalClipboard.prod-DbqSWANZ.js.map} +1 -1
  5. package/dist/LexicalLink.prod-DbxnRszt.js +275 -0
  6. package/dist/LexicalLink.prod-DbxnRszt.js.map +1 -0
  7. package/dist/{LexicalList.prod-BUcoZhe4.js → LexicalList.prod-pZmYrwOC.js} +212 -172
  8. package/dist/LexicalList.prod-pZmYrwOC.js.map +1 -0
  9. package/dist/{LexicalSelection.prod-BfAlhGGm.js → LexicalSelection.prod-DkvWlcln.js} +14 -14
  10. package/dist/{LexicalSelection.prod-BfAlhGGm.js.map → LexicalSelection.prod-DkvWlcln.js.map} +1 -1
  11. package/dist/LexicalTable.prod-C6duSS2P.js +1720 -0
  12. package/dist/LexicalTable.prod-C6duSS2P.js.map +1 -0
  13. package/dist/{LexicalUtils.prod-DVr8VsHc.js → LexicalUtils.prod-Dny9Fu94.js} +43 -43
  14. package/dist/{LexicalUtils.prod-DVr8VsHc.js.map → LexicalUtils.prod-Dny9Fu94.js.map} +1 -1
  15. package/dist/{TablePlugin-MjKuocl4.js → TablePlugin-Ba6PaBhf.js} +28 -28
  16. package/dist/{TablePlugin-MjKuocl4.js.map → TablePlugin-Ba6PaBhf.js.map} +1 -1
  17. package/dist/components/Accordion/Accordion.test.js +2 -2
  18. package/dist/components/AccordionCard/AccordionCard.test.js +2 -2
  19. package/dist/components/ActionList/ActionList.test.js +2 -2
  20. package/dist/components/AppStatusBar/AppStatusBar.test.js +1 -1
  21. package/dist/components/Attention/Attention.test.js +1 -1
  22. package/dist/components/Backdrop/Backdrop.test.js +1 -1
  23. package/dist/components/Buttons/Button.test.js +1 -1
  24. package/dist/components/Buttons/LinkButton.test.js +1 -1
  25. package/dist/components/Buttons/MenuButton.test.js +1 -1
  26. package/dist/components/Card/Card.test.js +1 -1
  27. package/dist/components/Checkbox/Checkbox.test.js +1 -1
  28. package/dist/components/CheckboxButton/CheckboxButton.test.js +1 -1
  29. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +1 -1
  30. package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
  31. package/dist/components/FeedbackBar/FeedbackBar.test.js +1 -1
  32. package/dist/components/FormInput/FormInput.js +1 -1
  33. package/dist/components/Icon/icons/index.d.ts +12 -0
  34. package/dist/components/Icon/icons/index.js +163 -153
  35. package/dist/components/Icon/icons/index.js.map +1 -1
  36. package/dist/components/InputField/InputField.stories.js +1 -1
  37. package/dist/components/Label/Label.test.js +1 -1
  38. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  39. package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
  40. package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
  41. package/dist/components/MultiSelect/index.js +1 -1
  42. package/dist/components/OverlayStepBar/OverlayStepBar.js +1 -1
  43. package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
  44. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
  45. package/dist/components/RadioGroup/Radiogroup.test.js +1 -1
  46. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  47. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +1 -1
  48. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +2 -2
  49. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +2 -2
  50. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
  51. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +35 -35
  52. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  53. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +25 -25
  54. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +13 -13
  55. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
  56. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +3 -3
  57. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +11 -11
  58. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  59. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +7 -7
  60. package/dist/components/RteEditor/Plugins/index.js +1 -1
  61. package/dist/components/RteEditor/RteEditor.js +237 -235
  62. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  63. package/dist/components/RteEditor/helpers.js +4 -4
  64. package/dist/components/StatusBadge/StatusBadge.test.js +1 -1
  65. package/dist/components/TextArea/TextArea.test.js +1 -1
  66. package/dist/components/Timeline/Timeline.test.js +2 -2
  67. package/dist/components/VarIndicator/VarIndicator.test.js +2 -2
  68. package/dist/components/index.js +1 -1
  69. package/dist/{helpers-ChM6xtQG.js → helpers-BUwfVZhW.js} +15 -15
  70. package/dist/{helpers-ChM6xtQG.js.map → helpers-BUwfVZhW.js.map} +1 -1
  71. package/dist/{index-hwMTfLfH.js → index-Ck15_vKo.js} +2 -2
  72. package/dist/{index-hwMTfLfH.js.map → index-Ck15_vKo.js.map} +1 -1
  73. package/dist/index.js +1 -1
  74. package/dist/{react.esm-DI5ilWeT.js → react.esm-CMg7bmSn.js} +372 -366
  75. package/dist/{react.esm-DI5ilWeT.js.map → react.esm-CMg7bmSn.js.map} +1 -1
  76. package/package.json +28 -28
  77. package/dist/Lexical.prod-CniF7zEE.js.map +0 -1
  78. package/dist/LexicalLink.prod-Du8ZoNsh.js +0 -259
  79. package/dist/LexicalLink.prod-Du8ZoNsh.js.map +0 -1
  80. package/dist/LexicalList.prod-BUcoZhe4.js.map +0 -1
  81. package/dist/LexicalTable.prod-CYafu_j9.js +0 -1555
  82. package/dist/LexicalTable.prod-CYafu_j9.js.map +0 -1
@@ -1,21 +1,21 @@
1
- var Fs = Object.defineProperty;
2
- var Ls = (n, e, t) => e in n ? Fs(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var te = (n, e, t) => Ls(n, typeof e != "symbol" ? e + "" : e, t);
1
+ var Ps = Object.defineProperty;
2
+ var Fs = (n, e, t) => e in n ? Ps(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var re = (n, e, t) => Fs(n, typeof e != "symbol" ? e + "" : e, t);
4
4
  function T(n, ...e) {
5
5
  const t = new URL("https://lexical.dev/docs/error"), r = new URLSearchParams();
6
6
  r.append("code", n);
7
7
  for (const i of e) r.append("v", i);
8
8
  throw t.search = r.toString(), Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
9
9
  }
10
- const le = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, As = le && "documentMode" in document ? document.documentMode : null, se = le && /Mac|iPod|iPhone|iPad/.test(navigator.platform), we = le && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent), Gt = !(!le || !("InputEvent" in window) || As) && "getTargetRanges" in new window.InputEvent("input"), St = le && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), tt = le && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Os = le && /Android/.test(navigator.userAgent), Ni = le && /^(?=.*Chrome).*/i.test(navigator.userAgent), Ar = le && Os && Ni, Qt = le && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !Ni;
10
+ const le = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Ls = le && "documentMode" in document ? document.documentMode : null, se = le && /Mac|iPod|iPhone|iPad/.test(navigator.platform), we = le && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent), Gt = !(!le || !("InputEvent" in window) || Ls) && "getTargetRanges" in new window.InputEvent("input"), St = le && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), tt = le && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, As = le && /Android/.test(navigator.userAgent), Ni = le && /^(?=.*Chrome).*/i.test(navigator.userAgent), Ar = le && As && Ni, Qt = le && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !Ni;
11
11
  function Xt(...n) {
12
12
  const e = [];
13
13
  for (const t of n) if (t && typeof t == "string") for (const [r] of t.matchAll(/\S+/g)) e.push(r);
14
14
  return e;
15
15
  }
16
- const Ms = 1, Ds = 3, Is = 9, zs = 11, ze = 0, Ei = 1, nt = 2, Bs = 0, Ws = 1, Rs = 2, Yt = 4, Zt = 8, ir = 128, Ks = 1792 | (112 | (3 | Yt | Zt) | ir), sr = 1, or = 2, lr = 3, ar = 4, cr = 5, ur = 6, dn = St || tt || Qt ? " " : "​", Se = `
16
+ const Os = 1, Ms = 3, Is = 9, Ds = 11, ze = 0, Ei = 1, nt = 2, zs = 0, Bs = 1, Ws = 2, Yt = 4, Zt = 8, ir = 128, Rs = 1792 | (112 | (3 | Yt | Zt) | ir), sr = 1, or = 2, lr = 3, ar = 4, cr = 5, ur = 6, dn = St || tt || Qt ? " " : "​", Se = `
17
17
 
18
- `, Js = we ? " " : dn, Pi = "֑-߿יִ-﷽ﹰ-ﻼ", Fi = "A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿", js = new RegExp("^[^" + Fi + "]*[" + Pi + "]"), $s = new RegExp("^[^" + Pi + "]*[" + Fi + "]"), Be = { bold: 1, capitalize: 1024, code: 16, highlight: ir, italic: 2, lowercase: 256, strikethrough: Yt, subscript: 32, superscript: 64, underline: Zt, uppercase: 512 }, Us = { directionless: 1, unmergeable: 2 }, Or = { center: or, end: ur, justify: ar, left: sr, right: lr, start: cr }, Vs = { [or]: "center", [ur]: "end", [ar]: "justify", [sr]: "left", [lr]: "right", [cr]: "start" }, qs = { normal: 0, segmented: 2, token: 1 }, Hs = { [Bs]: "normal", [Rs]: "segmented", [Ws]: "token" }, Gs = "$";
18
+ `, Ks = we ? " " : dn, Pi = "֑-߿יִ-﷽ﹰ-ﻼ", Fi = "A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿", Js = new RegExp("^[^" + Fi + "]*[" + Pi + "]"), js = new RegExp("^[^" + Pi + "]*[" + Fi + "]"), Be = { bold: 1, capitalize: 1024, code: 16, highlight: ir, italic: 2, lowercase: 256, strikethrough: Yt, subscript: 32, superscript: 64, underline: Zt, uppercase: 512 }, $s = { directionless: 1, unmergeable: 2 }, Or = { center: or, end: ur, justify: ar, left: sr, right: lr, start: cr }, Us = { [or]: "center", [ur]: "end", [ar]: "justify", [sr]: "left", [lr]: "right", [cr]: "start" }, Vs = { normal: 0, segmented: 2, token: 1 }, qs = { [zs]: "normal", [Ws]: "segmented", [Bs]: "token" }, Hs = "$";
19
19
  function Li(n, e, t, r, i, s) {
20
20
  let o = n.getFirstChild();
21
21
  for (; o !== null; ) {
@@ -23,60 +23,60 @@ function Li(n, e, t, r, i, s) {
23
23
  o.__parent === e && (k(o) && Li(o, l, t, r, i, s), t.has(l) || s.delete(l), i.push(l)), o = o.getNextSibling();
24
24
  }
25
25
  }
26
- const Qs = 100;
26
+ const Gs = 100;
27
27
  let Kn = !1, fr = 0;
28
- function Xs(n) {
28
+ function Qs(n) {
29
29
  fr = n.timeStamp;
30
30
  }
31
31
  function En(n, e, t) {
32
32
  const r = n.nodeName === "BR", i = e.__lexicalLineBreak;
33
33
  return i && (n === i || r && n.previousSibling === i) || r && kn(n, t) !== void 0;
34
34
  }
35
- function Ys(n, e, t) {
35
+ function Xs(n, e, t) {
36
36
  const r = Ce(ie(t));
37
37
  let i = null, s = null;
38
38
  r !== null && r.anchorNode === n && (i = r.anchorOffset, s = r.focusOffset);
39
39
  const o = n.nodeValue;
40
40
  o !== null && br(e, o, i, s, !1);
41
41
  }
42
- function Zs(n, e, t) {
42
+ function Ys(n, e, t) {
43
43
  if (L(n)) {
44
44
  const r = n.anchor.getNode();
45
45
  if (r.is(t) && n.format !== r.getFormat()) return !1;
46
46
  }
47
47
  return ke(e) && t.isAttached();
48
48
  }
49
- function eo(n, e, t, r) {
50
- for (let i = n; i && !il(i); i = At(i)) {
49
+ function Zs(n, e, t, r) {
50
+ for (let i = n; i && !rl(i); i = At(i)) {
51
51
  const s = kn(i, e);
52
52
  if (s !== void 0) {
53
53
  const o = j(s, t);
54
- if (o) return I(o) || !Y(i) ? void 0 : [i, o];
55
- } else if (i === r) return [r, xs(t)];
54
+ if (o) return D(o) || !Y(i) ? void 0 : [i, o];
55
+ } else if (i === r) return [r, ys(t)];
56
56
  }
57
57
  }
58
58
  function Ai(n, e, t) {
59
59
  Kn = !0;
60
- const r = performance.now() - fr > Qs;
60
+ const r = performance.now() - fr > Gs;
61
61
  try {
62
- ne(n, () => {
62
+ Z(n, () => {
63
63
  const i = M() || function(f) {
64
64
  return f.getEditorState().read(() => {
65
- const _ = M();
66
- return _ !== null ? _.clone() : null;
65
+ const g = M();
66
+ return g !== null ? g.clone() : null;
67
67
  });
68
68
  }(n), s = /* @__PURE__ */ new Map(), o = n.getRootElement(), l = n._editorState, a = n._blockCursorElement;
69
69
  let c = !1, u = "";
70
70
  for (let f = 0; f < e.length; f++) {
71
- const _ = e[f], h = _.type, p = _.target, g = eo(p, n, l, o);
72
- if (!g) continue;
73
- const [x, m] = g;
74
- if (h === "characterData") r && P(m) && ke(p) && Zs(i, p, m) && Ys(p, m, n);
71
+ const g = e[f], h = g.type, _ = g.target, p = Zs(_, n, l, o);
72
+ if (!p) continue;
73
+ const [x, m] = p;
74
+ if (h === "characterData") r && P(m) && ke(_) && Ys(i, _, m) && Xs(_, m, n);
75
75
  else if (h === "childList") {
76
76
  c = !0;
77
- const y = _.addedNodes;
77
+ const y = g.addedNodes;
78
78
  for (let S = 0; S < y.length; S++) {
79
- const N = y[S], b = ms(N), C = N.parentNode;
79
+ const N = y[S], b = ps(N), C = N.parentNode;
80
80
  if (C != null && N !== a && b === null && !En(N, C, n)) {
81
81
  if (we) {
82
82
  const F = (Y(N) ? N.innerText : null) || N.nodeValue;
@@ -85,30 +85,30 @@ function Ai(n, e, t) {
85
85
  C.removeChild(N);
86
86
  }
87
87
  }
88
- const v = _.removedNodes, w = v.length;
88
+ const v = g.removedNodes, w = v.length;
89
89
  if (w > 0) {
90
90
  let S = 0;
91
91
  for (let N = 0; N < w; N++) {
92
92
  const b = v[N];
93
- (En(b, p, n) || a === b) && (p.appendChild(b), S++);
93
+ (En(b, _, n) || a === b) && (_.appendChild(b), S++);
94
94
  }
95
95
  w !== S && s.set(x, m);
96
96
  }
97
97
  }
98
98
  }
99
- if (s.size > 0) for (const [f, _] of s) _.reconcileObservedMutation(f, n);
99
+ if (s.size > 0) for (const [f, g] of s) g.reconcileObservedMutation(f, n);
100
100
  const d = t.takeRecords();
101
101
  if (d.length > 0) {
102
102
  for (let f = 0; f < d.length; f++) {
103
- const _ = d[f], h = _.addedNodes, p = _.target;
104
- for (let g = 0; g < h.length; g++) {
105
- const x = h[g], m = x.parentNode;
106
- m == null || x.nodeName !== "BR" || En(x, p, n) || m.removeChild(x);
103
+ const g = d[f], h = g.addedNodes, _ = g.target;
104
+ for (let p = 0; p < h.length; p++) {
105
+ const x = h[p], m = x.parentNode;
106
+ m == null || x.nodeName !== "BR" || En(x, _, n) || m.removeChild(x);
107
107
  }
108
108
  }
109
109
  t.takeRecords();
110
110
  }
111
- i !== null && (c && re(i), we && bs(n) && i.insertRawText(u));
111
+ i !== null && (c && ne(i), we && ks(n) && i.insertRawText(u));
112
112
  });
113
113
  } finally {
114
114
  Kn = !1;
@@ -120,7 +120,7 @@ function Oi(n) {
120
120
  }
121
121
  function Mi(n) {
122
122
  (function(e) {
123
- fr === 0 && ie(e).addEventListener("textInput", Xs, !0);
123
+ fr === 0 && ie(e).addEventListener("textInput", Qs, !0);
124
124
  })(n), n._observer = new MutationObserver((e, t) => {
125
125
  Ai(n, e, t);
126
126
  });
@@ -155,7 +155,7 @@ class dr {
155
155
  toJSON() {
156
156
  const e = { ...this.unknownState };
157
157
  for (const [t, r] of this.knownState) t.isEqual(r, t.defaultValue) ? delete e[t.key] : e[t.key] = t.unparse(r);
158
- return Bt(e) ? { [Gs]: e } : {};
158
+ return Bt(e) ? { [Hs]: e } : {};
159
159
  }
160
160
  getWritable(e) {
161
161
  if (this.node === e) return this;
@@ -184,7 +184,7 @@ class dr {
184
184
  function Bt(n) {
185
185
  if (n) for (const e in n) return n;
186
186
  }
187
- function to(n) {
187
+ function eo(n) {
188
188
  const e = n.getWritable(), t = e.__state ? e.__state.getWritable(e) : new dr(e);
189
189
  return e.__state = t, t;
190
190
  }
@@ -193,35 +193,35 @@ function Mr(n, e) {
193
193
  return (t === null || t === s) && (r === null || r === o) && (i === null || i === l) && (n.__state === null || a === c || function(u, d) {
194
194
  if (u === d) return !0;
195
195
  if (u && d && u.size !== d.size) return !1;
196
- const f = /* @__PURE__ */ new Set(), _ = (p, g) => {
197
- for (const [x, m] of p.knownState) {
196
+ const f = /* @__PURE__ */ new Set(), g = (_, p) => {
197
+ for (const [x, m] of _.knownState) {
198
198
  if (f.has(x.key)) continue;
199
199
  f.add(x.key);
200
- const y = g ? g.getValue(x) : x.defaultValue;
200
+ const y = p ? p.getValue(x) : x.defaultValue;
201
201
  if (y !== m && !x.isEqual(y, m)) return !0;
202
202
  }
203
203
  return !1;
204
- }, h = (p, g) => {
205
- const { unknownState: x } = p, m = g ? g.unknownState : void 0;
204
+ }, h = (_, p) => {
205
+ const { unknownState: x } = _, m = p ? p.unknownState : void 0;
206
206
  if (x) {
207
207
  for (const [y, v] of Object.entries(x)) if (!f.has(y) && (f.add(y), v !== (m ? m[y] : void 0))) return !0;
208
208
  }
209
209
  return !1;
210
210
  };
211
- return !(u && _(u, d) || d && _(d, u) || u && h(u, d) || d && h(d, u));
211
+ return !(u && g(u, d) || d && g(d, u) || u && h(u, d) || d && h(d, u));
212
212
  }(a, c));
213
213
  }
214
- function Dr(n, e) {
214
+ function Ir(n, e) {
215
215
  const t = n.mergeWithSibling(e), r = B()._normalizedNodes;
216
216
  return r.add(n.__key), r.add(e.__key), t;
217
217
  }
218
- function Ir(n) {
218
+ function Dr(n) {
219
219
  let e, t, r = n;
220
220
  if (r.__text !== "" || !r.isSimpleText() || r.isUnmergeable()) {
221
221
  for (; (e = r.getPreviousSibling()) !== null && P(e) && e.isSimpleText() && !e.isUnmergeable(); ) {
222
222
  if (e.__text !== "") {
223
223
  if (Mr(e, r)) {
224
- r = Dr(e, r);
224
+ r = Ir(e, r);
225
225
  break;
226
226
  }
227
227
  break;
@@ -231,7 +231,7 @@ function Ir(n) {
231
231
  for (; (t = r.getNextSibling()) !== null && P(t) && t.isSimpleText() && !t.isUnmergeable(); ) {
232
232
  if (t.__text !== "") {
233
233
  if (Mr(r, t)) {
234
- r = Dr(r, t);
234
+ r = Ir(r, t);
235
235
  break;
236
236
  }
237
237
  break;
@@ -255,7 +255,7 @@ function zr(n) {
255
255
  n.set(r.__key, i ? r.getChildrenSize() : 0, "element", !0);
256
256
  }
257
257
  }
258
- let Pe, Q, Ct, hn, jn, $n, We, oe, Un, kt, R = "", G = "", ae = null, ce = "", ye = "", Di = !1, bt = !1, jt = null;
258
+ let Pe, Q, Ct, hn, jn, $n, We, oe, Un, kt, R = "", G = "", ae = null, ce = "", ye = "", Ii = !1, bt = !1, jt = null;
259
259
  function en(n, e) {
260
260
  const t = We.get(n);
261
261
  if (e !== null) {
@@ -278,14 +278,14 @@ function Vn(n, e, t, r) {
278
278
  function Oe(n, e) {
279
279
  n.setProperty("text-align", e);
280
280
  }
281
- const no = "40px";
282
- function Ii(n, e) {
281
+ const to = "40px";
282
+ function Di(n, e) {
283
283
  const t = Pe.theme.indent;
284
284
  if (typeof t == "string") {
285
285
  const i = n.classList.contains(t);
286
286
  e > 0 && !i ? n.classList.add(t) : e < 1 && i && n.classList.remove(t);
287
287
  }
288
- const r = getComputedStyle(n).getPropertyValue("--lexical-indent-base-value") || no;
288
+ const r = getComputedStyle(n).getPropertyValue("--lexical-indent-base-value") || to;
289
289
  n.style.setProperty("padding-inline-start", e === 0 ? "" : `calc(${e} * ${r})`);
290
290
  }
291
291
  function zi(n, e) {
@@ -302,9 +302,9 @@ function tn(n, e) {
302
302
  const d = `__lexicalKey_${c._key}`;
303
303
  a[d] = u;
304
304
  })(s, o, i), l.set(i, s);
305
- }(n, r, Q), P(t) ? r.setAttribute("data-lexical-text", "true") : I(t) && r.setAttribute("data-lexical-decorator", "true"), k(t)) {
305
+ }(n, r, Q), P(t) ? r.setAttribute("data-lexical-text", "true") : D(t) && r.setAttribute("data-lexical-decorator", "true"), k(t)) {
306
306
  const i = t.__indent, s = t.__size;
307
- if (i !== 0 && Ii(r, i), s !== 0) {
307
+ if (i !== 0 && Di(r, i), s !== 0) {
308
308
  const l = s - 1;
309
309
  (function(a, c, u, d) {
310
310
  const f = G;
@@ -315,7 +315,7 @@ function tn(n, e) {
315
315
  o !== 0 && zi(r, o), t.isInline() || Bi(null, t, r), bn(t) && (R += Se, ye += Se);
316
316
  } else {
317
317
  const i = t.getTextContent();
318
- if (I(t)) {
318
+ if (D(t)) {
319
319
  const s = t.decorate(Q, Pe);
320
320
  s !== null && Ri(n, s), r.contentEditable = "false";
321
321
  } else P(t) && (t.isDirectionless() || (G += i));
@@ -339,7 +339,7 @@ function Br(n, e) {
339
339
  const t = n.__last;
340
340
  if (t) {
341
341
  const r = e.get(t);
342
- if (r) return Ze(r) ? "line-break" : I(r) && r.isInline() ? "decorator" : null;
342
+ if (r) return Ze(r) ? "line-break" : D(r) && r.isInline() ? "decorator" : null;
343
343
  }
344
344
  return "empty";
345
345
  }
@@ -353,7 +353,7 @@ function Wi(n, e) {
353
353
  const t = e.__lexicalDirTextContent || "", r = e.__lexicalDir || "";
354
354
  if (t !== G || r !== jt) {
355
355
  const i = G === "", s = i ? jt : function(o) {
356
- return js.test(o) ? "rtl" : $s.test(o) ? "ltr" : null;
356
+ return Js.test(o) ? "rtl" : js.test(o) ? "ltr" : null;
357
357
  }(G);
358
358
  if (s !== r) {
359
359
  const o = e.classList, l = Pe.theme;
@@ -381,7 +381,7 @@ function Wi(n, e) {
381
381
  jt = s, e.__lexicalDirTextContent = G, e.__lexicalDir = s;
382
382
  }
383
383
  }
384
- function ro(n, e, t) {
384
+ function no(n, e, t) {
385
385
  const r = G;
386
386
  var i;
387
387
  G = "", ae = null, ce = "", function(s, o, l) {
@@ -389,55 +389,55 @@ function ro(n, e, t) {
389
389
  R = "";
390
390
  const d = l.element;
391
391
  if (c === 1 && u === 1) {
392
- const f = s.__first, _ = o.__first;
393
- if (f === _) ht(f, d);
392
+ const f = s.__first, g = o.__first;
393
+ if (f === g) ht(f, d);
394
394
  else {
395
- const p = Hn(f), g = tn(_, null);
395
+ const _ = Hn(f), p = tn(g, null);
396
396
  try {
397
- d.replaceChild(g, p);
397
+ d.replaceChild(p, _);
398
398
  } catch (x) {
399
399
  if (typeof x == "object" && x != null) {
400
- const m = `${x.toString()} Parent: ${d.tagName}, new child: {tag: ${g.tagName} key: ${_}}, old child: {tag: ${p.tagName}, key: ${f}}.`;
400
+ const m = `${x.toString()} Parent: ${d.tagName}, new child: {tag: ${p.tagName} key: ${g}}, old child: {tag: ${_.tagName}, key: ${f}}.`;
401
401
  throw new Error(m);
402
402
  }
403
403
  throw x;
404
404
  }
405
405
  en(f, null);
406
406
  }
407
- const h = oe.get(_);
407
+ const h = oe.get(g);
408
408
  P(h) && (ae === null && (ae = h.getFormat()), ce === "" && (ce = h.getStyle()));
409
409
  } else {
410
- const f = nn(s, We), _ = nn(o, oe);
411
- if (f.length !== c && T(227), _.length !== u && T(228), c === 0) u !== 0 && qn(_, o, 0, u - 1, l);
410
+ const f = nn(s, We), g = nn(o, oe);
411
+ if (f.length !== c && T(227), g.length !== u && T(228), c === 0) u !== 0 && qn(g, o, 0, u - 1, l);
412
412
  else if (u === 0) {
413
413
  if (c !== 0) {
414
414
  const h = l.after == null && l.before == null && l.element.__lexicalLineBreak == null;
415
415
  Vn(f, 0, c - 1, h ? null : d), h && (d.textContent = "");
416
416
  }
417
- } else (function(h, p, g, x, m, y) {
417
+ } else (function(h, _, p, x, m, y) {
418
418
  const v = x - 1, w = m - 1;
419
419
  let S, N, b = y.getFirstChild(), C = 0, F = 0;
420
420
  for (; C <= v && F <= w; ) {
421
- const D = p[C], A = g[F];
422
- if (D === A) b = Pn(ht(A, y.element)), C++, F++;
421
+ const I = _[C], A = p[F];
422
+ if (I === A) b = Pn(ht(A, y.element)), C++, F++;
423
423
  else {
424
- S === void 0 && (S = new Set(p)), N === void 0 && (N = new Set(g));
425
- const $ = N.has(D), he = S.has(A);
424
+ S === void 0 && (S = new Set(_)), N === void 0 && (N = new Set(p));
425
+ const $ = N.has(I), he = S.has(A);
426
426
  if ($) if (he) {
427
427
  const ge = it(Q, A);
428
428
  ge === b ? b = Pn(ht(A, y.element)) : (y.withBefore(b).insertChild(ge), ht(A, y.element)), C++, F++;
429
429
  } else tn(A, y.withBefore(b)), F++;
430
- else b = Pn(Hn(D)), en(D, y.element), C++;
430
+ else b = Pn(Hn(I)), en(I, y.element), C++;
431
431
  }
432
432
  const z = oe.get(A);
433
433
  z !== null && P(z) && (ae === null && (ae = z.getFormat()), ce === "" && (ce = z.getStyle()));
434
434
  }
435
435
  const O = C > v, W = F > w;
436
436
  if (O && !W) {
437
- const D = g[w + 1], A = D === void 0 ? null : Q.getElementByKey(D);
438
- qn(g, h, F, w, y.withBefore(A));
439
- } else W && !O && Vn(p, C, v, y.element);
440
- })(o, f, _, c, u, l);
437
+ const I = p[w + 1], A = I === void 0 ? null : Q.getElementByKey(I);
438
+ qn(p, h, F, w, y.withBefore(A));
439
+ } else W && !O && Vn(_, C, v, y.element);
440
+ })(o, f, g, c, u, l);
441
441
  }
442
442
  bn(o) && (R += Se), d.__lexicalTextContent = R, R = a + R;
443
443
  }(n, e, e.getDOMSlot(t)), Wi(e, t), i = e, ae == null || ae === i.__textFormat || bt || i.setTextFormat(ae), function(s) {
@@ -457,7 +457,7 @@ function ht(n, e) {
457
457
  const t = We.get(n);
458
458
  let r = oe.get(n);
459
459
  t !== void 0 && r !== void 0 || T(61);
460
- const i = Di || $n.has(n) || jn.has(n), s = it(Q, n);
460
+ const i = Ii || $n.has(n) || jn.has(n), s = it(Q, n);
461
461
  if (t === r && !i) {
462
462
  if (k(t)) {
463
463
  const o = s.__lexicalTextContent;
@@ -476,18 +476,18 @@ function ht(n, e) {
476
476
  }
477
477
  if (k(t) && k(r)) {
478
478
  const o = r.__indent;
479
- o !== t.__indent && Ii(s, o);
479
+ o !== t.__indent && Di(s, o);
480
480
  const l = r.__format;
481
- l !== t.__format && zi(s, l), i && (ro(t, r, s), Z(r) || r.isInline() || Bi(t, r, s)), bn(r) && (R += Se, ye += Se);
481
+ l !== t.__format && zi(s, l), i && (no(t, r, s), ee(r) || r.isInline() || Bi(t, r, s)), bn(r) && (R += Se, ye += Se);
482
482
  } else {
483
483
  const o = r.getTextContent();
484
- if (I(r)) {
484
+ if (D(r)) {
485
485
  const l = r.decorate(Q, Pe);
486
486
  l !== null && Ri(n, l);
487
487
  } else P(r) && !r.isDirectionless() && (G += o);
488
488
  R += o, ye += o;
489
489
  }
490
- if (!bt && Z(r) && r.__cachedText !== ye) {
490
+ if (!bt && ee(r) && r.__cachedText !== ye) {
491
491
  const o = r.getWritable();
492
492
  o.__cachedText = ye, r = o;
493
493
  }
@@ -498,7 +498,7 @@ function Ri(n, e) {
498
498
  const r = Q._decorators;
499
499
  if (t === null) {
500
500
  if (r[n] === e) return;
501
- t = ys(Q);
501
+ t = ms(Q);
502
502
  }
503
503
  t[n] = e;
504
504
  }
@@ -506,8 +506,8 @@ function Pn(n) {
506
506
  let e = n.nextSibling;
507
507
  return e !== null && e === Q._blockCursorElement && (e = e.nextSibling), e;
508
508
  }
509
- function io(n, e, t, r, i, s) {
510
- R = "", ye = "", G = "", Di = r === nt, jt = null, Q = t, Pe = t._config, Ct = t._nodes, hn = Q._listeners.mutation, jn = i, $n = s, We = n._nodeMap, oe = e._nodeMap, bt = e._readOnly, Un = new Map(t._keyToDOMMap);
509
+ function ro(n, e, t, r, i, s) {
510
+ R = "", ye = "", G = "", Ii = r === nt, jt = null, Q = t, Pe = t._config, Ct = t._nodes, hn = Q._listeners.mutation, jn = i, $n = s, We = n._nodeMap, oe = e._nodeMap, bt = e._readOnly, Un = new Map(t._keyToDOMMap);
511
511
  const o = /* @__PURE__ */ new Map();
512
512
  return kt = o, ht("root", null), Q = void 0, Ct = void 0, jn = void 0, $n = void 0, We = void 0, oe = void 0, Pe = void 0, Un = void 0, kt = void 0, o;
513
513
  }
@@ -515,44 +515,44 @@ function Hn(n) {
515
515
  const e = Un.get(n);
516
516
  return e === void 0 && T(75, n), e;
517
517
  }
518
- function Sl(n) {
518
+ function xl(n) {
519
519
  return {};
520
520
  }
521
- const Ki = {}, Cl = {}, so = {}, rn = {}, $t = {}, Wr = {}, _t = {}, Ji = {}, Rr = {}, sn = {}, on = {}, De = {}, ji = {}, $i = {}, oo = {}, lo = {}, ao = {}, co = {}, uo = {}, fo = {}, ho = {}, Gn = {}, go = {}, _o = {}, po = {}, mo = {}, yo = {}, kl = {}, bl = {}, Tl = {}, xo = {}, vl = {}, So = {}, Co = {}, ko = {}, Ui = {}, Vi = {}, Kr = {}, wl = {}, Nl = {}, El = {}, Pl = {}, bo = {}, To = {}, vo = {}, pe = Object.freeze({}), Qn = 30, Xn = [["keydown", function(n, e) {
521
+ const Ki = {}, Sl = {}, io = {}, rn = {}, $t = {}, Wr = {}, _t = {}, Ji = {}, Rr = {}, sn = {}, on = {}, Ie = {}, ji = {}, $i = {}, so = {}, oo = {}, lo = {}, ao = {}, co = {}, uo = {}, fo = {}, Gn = {}, ho = {}, go = {}, _o = {}, po = {}, mo = {}, Cl = {}, kl = {}, bl = {}, yo = {}, Tl = {}, xo = {}, So = {}, Co = {}, Ui = {}, Vi = {}, Kr = {}, vl = {}, wl = {}, Nl = {}, El = {}, ko = {}, bo = {}, To = {}, pe = Object.freeze({}), Qn = 30, Xn = [["keydown", function(n, e) {
522
522
  if (pt = n.timeStamp, Yn = n.key, e.isComposing()) return;
523
523
  const { key: t, shiftKey: r, ctrlKey: i, metaKey: s, altKey: o } = n;
524
- if (!E(e, oo, n) && t != null) {
525
- if (Fn && He(Yn)) return ne(e, () => {
524
+ if (!E(e, so, n) && t != null) {
525
+ if (Fn && He(Yn)) return Z(e, () => {
526
526
  Wt(e, Ln);
527
527
  }), Fn = !1, void (Ln = "");
528
528
  if (function(l, a, c, u) {
529
529
  return pi(l) && !a && !u && !c;
530
- }(t, i, o, s)) E(e, lo, n);
530
+ }(t, i, o, s)) E(e, oo, n);
531
531
  else if (function(l, a, c, u, d) {
532
532
  return pi(l) && !u && !c && (a || d);
533
- }(t, i, r, o, s)) E(e, ao, n);
533
+ }(t, i, r, o, s)) E(e, lo, n);
534
534
  else if (function(l, a, c, u) {
535
535
  return _i(l) && !a && !u && !c;
536
- }(t, i, o, s)) E(e, co, n);
536
+ }(t, i, o, s)) E(e, ao, n);
537
537
  else if (function(l, a, c, u, d) {
538
538
  return _i(l) && !u && !c && (a || d);
539
- }(t, i, r, o, s)) E(e, uo, n);
539
+ }(t, i, r, o, s)) E(e, co, n);
540
540
  else if (/* @__PURE__ */ function(l, a, c) {
541
541
  return /* @__PURE__ */ function(u) {
542
542
  return u === "ArrowUp";
543
543
  }(l) && !a && !c;
544
- }(t, i, s)) E(e, fo, n);
544
+ }(t, i, s)) E(e, uo, n);
545
545
  else if (/* @__PURE__ */ function(l, a, c) {
546
546
  return /* @__PURE__ */ function(u) {
547
547
  return u === "ArrowDown";
548
548
  }(l) && !a && !c;
549
- }(t, i, s)) E(e, ho, n);
549
+ }(t, i, s)) E(e, fo, n);
550
550
  else if (function(l, a) {
551
551
  return mi(l) && a;
552
552
  }(t, r)) mt = !0, E(e, Gn, n);
553
553
  else if (/* @__PURE__ */ function(l) {
554
554
  return l === " ";
555
- }(t)) E(e, go, n);
555
+ }(t)) E(e, ho, n);
556
556
  else if (function(l, a) {
557
557
  return se && a && l.toLowerCase() === "o";
558
558
  }(t, i)) n.preventDefault(), mt = !0, E(e, $t, !0);
@@ -561,13 +561,13 @@ const Ki = {}, Cl = {}, so = {}, rn = {}, $t = {}, Wr = {}, _t = {}, Ji = {}, Rr
561
561
  }(t, r)) mt = !1, E(e, Gn, n);
562
562
  else if (function(l, a, c, u) {
563
563
  return se ? !a && !c && (He(l) || l.toLowerCase() === "h" && u) : u || a || c ? !1 : He(l);
564
- }(t, o, s, i)) He(t) ? E(e, _o, n) : (n.preventDefault(), E(e, rn, !0));
564
+ }(t, o, s, i)) He(t) ? E(e, go, n) : (n.preventDefault(), E(e, rn, !0));
565
565
  else if (/* @__PURE__ */ function(l) {
566
566
  return l === "Escape";
567
- }(t)) E(e, po, n);
567
+ }(t)) E(e, _o, n);
568
568
  else if (function(l, a, c, u, d) {
569
569
  return se ? !(c || u || d) && (dt(l) || l.toLowerCase() === "d" && a) : a || u || d ? !1 : dt(l);
570
- }(t, i, r, o, s)) dt(t) ? E(e, mo, n) : (n.preventDefault(), E(e, rn, !1));
570
+ }(t, i, r, o, s)) dt(t) ? E(e, po, n) : (n.preventDefault(), E(e, rn, !1));
571
571
  else if (function(l, a, c) {
572
572
  return He(l) && (se ? a : c);
573
573
  }(t, o, i)) n.preventDefault(), E(e, sn, !0);
@@ -577,21 +577,21 @@ const Ki = {}, Cl = {}, so = {}, rn = {}, $t = {}, Wr = {}, _t = {}, Ji = {}, Rr
577
577
  else if (function(l, a) {
578
578
  return se && a && He(l);
579
579
  }(t, s)) n.preventDefault(), E(e, on, !0);
580
- else if (function(l, a) {
581
- return se && a && dt(l);
582
- }(t, s)) n.preventDefault(), E(e, on, !1);
580
+ else if (function(l, a, c) {
581
+ return se && (a && dt(l) || c && l.toLowerCase() === "k");
582
+ }(t, s, i)) n.preventDefault(), E(e, on, !1);
583
583
  else if (function(l, a, c, u) {
584
584
  return l.toLowerCase() === "b" && !a && gt(c, u);
585
- }(t, o, s, i)) n.preventDefault(), E(e, De, "bold");
585
+ }(t, o, s, i)) n.preventDefault(), E(e, Ie, "bold");
586
586
  else if (function(l, a, c, u) {
587
587
  return l.toLowerCase() === "u" && !a && gt(c, u);
588
- }(t, o, s, i)) n.preventDefault(), E(e, De, "underline");
588
+ }(t, o, s, i)) n.preventDefault(), E(e, Ie, "underline");
589
589
  else if (function(l, a, c, u) {
590
590
  return l.toLowerCase() === "i" && !a && gt(c, u);
591
- }(t, o, s, i)) n.preventDefault(), E(e, De, "italic");
591
+ }(t, o, s, i)) n.preventDefault(), E(e, Ie, "italic");
592
592
  else if (/* @__PURE__ */ function(l, a, c, u) {
593
593
  return l === "Tab" && !a && !c && !u;
594
- }(t, o, i, s)) E(e, yo, n);
594
+ }(t, o, i, s)) E(e, mo, n);
595
595
  else if (function(l, a, c, u) {
596
596
  return l.toLowerCase() === "z" && !a && gt(c, u);
597
597
  }(t, r, s, i)) n.preventDefault(), E(e, ji, void 0);
@@ -608,27 +608,27 @@ const Ki = {}, Cl = {}, so = {}, rn = {}, $t = {}, Wr = {}, _t = {}, Ji = {}, Rr
608
608
  }
609
609
  /* @__PURE__ */ (function(l, a, c, u) {
610
610
  return l || a || c || u;
611
- })(i, r, o, s) && E(e, vo, n);
611
+ })(i, r, o, s) && E(e, To, n);
612
612
  }
613
613
  }], ["pointerdown", function(n, e) {
614
614
  const t = n.target, r = n.pointerType;
615
- Ot(t) && r !== "touch" && n.button === 0 && ne(e, () => {
615
+ Ot(t) && r !== "touch" && n.button === 0 && Z(e, () => {
616
616
  di(t) || (er = !0);
617
617
  });
618
618
  }], ["compositionstart", function(n, e) {
619
- ne(e, () => {
619
+ Z(e, () => {
620
620
  const t = M();
621
621
  if (L(t) && !e.isComposing()) {
622
622
  const r = t.anchor, i = t.anchor.getNode();
623
- V(r.key), (n.timeStamp < pt + Qn || r.type === "element" || !t.isCollapsed() || i.getFormat() !== t.format || P(i) && i.getStyle() !== t.style) && E(e, _t, Js);
623
+ V(r.key), (n.timeStamp < pt + Qn || r.type === "element" || !t.isCollapsed() || i.getFormat() !== t.format || P(i) && i.getStyle() !== t.style) && E(e, _t, Ks);
624
624
  }
625
625
  });
626
626
  }], ["compositionend", function(n, e) {
627
- we ? ft = !0 : tt || !St && !Qt ? ne(e, () => {
627
+ we ? ft = !0 : tt || !St && !Qt ? Z(e, () => {
628
628
  Wt(e, n.data);
629
629
  }) : (Fn = !0, Ln = n.data);
630
630
  }], ["input", function(n, e) {
631
- n.stopPropagation(), ne(e, () => {
631
+ n.stopPropagation(), Z(e, () => {
632
632
  if (Y(n.target) && di(n.target)) return;
633
633
  const t = M(), r = n.data, i = Xi(n);
634
634
  if (r != null && L(t) && Gi(t, i, r, n.timeStamp, !1)) {
@@ -636,7 +636,7 @@ const Ki = {}, Cl = {}, so = {}, rn = {}, $t = {}, Wr = {}, _t = {}, Ji = {}, Rr
636
636
  const s = t.anchor.getNode(), o = Ce(ie(e));
637
637
  if (o === null) return;
638
638
  const l = t.isBackward(), a = l ? t.anchor.offset : t.focus.offset, c = l ? t.focus.offset : t.anchor.offset;
639
- Gt && !t.isCollapsed() && P(s) && o.anchorNode !== null && s.getTextContent().slice(0, a) + r + s.getTextContent().slice(a + c) === ks(o.anchorNode) || E(e, _t, r);
639
+ Gt && !t.isCollapsed() && P(s) && o.anchorNode !== null && s.getTextContent().slice(0, a) + r + s.getTextContent().slice(a + c) === Cs(o.anchorNode) || E(e, _t, r);
640
640
  const u = r.length;
641
641
  we && u > 1 && n.inputType === "insertCompositionText" && !e.isComposing() && (t.anchor.offset -= u), St || tt || Qt || !e.isComposing() || (pt = 0, V(null));
642
642
  } else
@@ -648,16 +648,16 @@ const Ki = {}, Cl = {}, so = {}, rn = {}, $t = {}, Wr = {}, _t = {}, Ji = {}, Rr
648
648
  })();
649
649
  }, { event: n }), Ge = null;
650
650
  }], ["click", function(n, e) {
651
- ne(e, () => {
651
+ Z(e, () => {
652
652
  const t = M(), r = Ce(ie(e)), i = at();
653
653
  if (r) {
654
654
  if (L(t)) {
655
655
  const s = t.anchor, o = s.getNode();
656
- if (s.type === "element" && s.offset === 0 && t.isCollapsed() && !Z(o) && ee().getChildrenSize() === 1 && o.getTopLevelElementOrThrow().isEmpty() && i !== null && t.is(i)) r.removeAllRanges(), t.dirty = !0;
656
+ if (s.type === "element" && s.offset === 0 && t.isCollapsed() && !ee(o) && te().getChildrenSize() === 1 && o.getTopLevelElementOrThrow().isEmpty() && i !== null && t.is(i)) r.removeAllRanges(), t.dirty = !0;
657
657
  else if (n.detail === 3 && !t.isCollapsed() && o !== t.focus.getNode()) {
658
658
  const l = function(a, c) {
659
659
  let u = a;
660
- for (; u !== ee() && u != null; ) {
660
+ for (; u !== te() && u != null; ) {
661
661
  if (c(u)) return u;
662
662
  u = u.getParent();
663
663
  }
@@ -667,27 +667,27 @@ const Ki = {}, Cl = {}, so = {}, rn = {}, $t = {}, Wr = {}, _t = {}, Ji = {}, Rr
667
667
  }
668
668
  } else if (n.pointerType === "touch") {
669
669
  const s = r.anchorNode;
670
- (Y(s) || ke(s)) && re(pn(i, r, e, n));
670
+ (Y(s) || ke(s)) && ne(pn(i, r, e, n));
671
671
  }
672
672
  }
673
- E(e, so, n);
673
+ E(e, io, n);
674
674
  });
675
675
  }], ["cut", pe], ["copy", pe], ["dragstart", pe], ["dragover", pe], ["dragend", pe], ["paste", pe], ["focus", pe], ["blur", pe], ["drop", pe]];
676
676
  Gt && Xn.push(["beforeinput", (n, e) => function(t, r) {
677
677
  const i = t.inputType, s = Xi(t);
678
- i === "deleteCompositionText" || we && bs(r) || i !== "insertCompositionText" && ne(r, () => {
678
+ i === "deleteCompositionText" || we && ks(r) || i !== "insertCompositionText" && Z(r, () => {
679
679
  const o = M();
680
680
  if (i === "deleteContentBackward") {
681
681
  if (o === null) {
682
- const _ = at();
683
- if (!L(_)) return;
684
- re(_.clone());
682
+ const g = at();
683
+ if (!L(g)) return;
684
+ ne(g.clone());
685
685
  }
686
686
  if (L(o)) {
687
- const _ = o.anchor.key === o.focus.key;
688
- if (l = t.timeStamp, Yn === "MediaLast" && l < pt + Qn && r.isComposing() && _) {
687
+ const g = o.anchor.key === o.focus.key;
688
+ if (l = t.timeStamp, Yn === "MediaLast" && l < pt + Qn && r.isComposing() && g) {
689
689
  if (V(null), pt = 0, setTimeout(() => {
690
- ne(r, () => {
690
+ Z(r, () => {
691
691
  V(null);
692
692
  });
693
693
  }, Qn), L(o)) {
@@ -696,9 +696,9 @@ Gt && Xn.push(["beforeinput", (n, e) => function(t, r) {
696
696
  }
697
697
  } else {
698
698
  V(null), t.preventDefault();
699
- const h = o.anchor.getNode(), p = h.getTextContent(), g = h.canInsertTextAfter(), x = o.anchor.offset === 0 && o.focus.offset === p.length;
700
- let m = Ar && _ && !x && g;
701
- if (m && o.isCollapsed() && (m = !I(Vo(o.anchor, !0))), !m) {
699
+ const h = o.anchor.getNode(), _ = h.getTextContent(), p = h.canInsertTextAfter(), x = o.anchor.offset === 0 && o.focus.offset === _.length;
700
+ let m = Ar && g && !x && p;
701
+ if (m && o.isCollapsed() && (m = !D(Uo(o.anchor, !0))), !m) {
702
702
  E(r, rn, !0);
703
703
  const y = M();
704
704
  Ar && L(y) && y.isCollapsed() && (Me = y, setTimeout(() => Me = null));
@@ -710,7 +710,7 @@ Gt && Xn.push(["beforeinput", (n, e) => function(t, r) {
710
710
  var l;
711
711
  if (!L(o)) return;
712
712
  const a = t.data;
713
- Ge !== null && kr(!1, r, Ge), o.dirty && Ge === null || !o.isCollapsed() || Z(o.anchor.getNode()) || s === null || o.applyDOMRange(s), Ge = null;
713
+ Ge !== null && kr(!1, r, Ge), o.dirty && Ge === null || !o.isCollapsed() || ee(o.anchor.getNode()) || s === null || o.applyDOMRange(s), Ge = null;
714
714
  const c = o.anchor, u = o.focus, d = c.getNode(), f = u.getNode();
715
715
  if (i !== "insertText" && i !== "insertTranspose") switch (t.preventDefault(), i) {
716
716
  case "insertFromYank":
@@ -732,8 +732,8 @@ Gt && Xn.push(["beforeinput", (n, e) => function(t, r) {
732
732
  E(r, Ji, t);
733
733
  break;
734
734
  case "deleteByComposition":
735
- (function(_, h) {
736
- return _ !== h || k(_) || k(h) || !_.isToken() || !h.isToken();
735
+ (function(g, h) {
736
+ return g !== h || k(g) || k(h) || !g.isToken() || !h.isToken();
737
737
  })(d, f) && E(r, Rr, t);
738
738
  break;
739
739
  case "deleteByDrag":
@@ -759,16 +759,16 @@ Gt && Xn.push(["beforeinput", (n, e) => function(t, r) {
759
759
  E(r, on, !1);
760
760
  break;
761
761
  case "formatStrikeThrough":
762
- E(r, De, "strikethrough");
762
+ E(r, Ie, "strikethrough");
763
763
  break;
764
764
  case "formatBold":
765
- E(r, De, "bold");
765
+ E(r, Ie, "bold");
766
766
  break;
767
767
  case "formatItalic":
768
- E(r, De, "italic");
768
+ E(r, Ie, "italic");
769
769
  break;
770
770
  case "formatUnderline":
771
- E(r, De, "underline");
771
+ E(r, Ie, "underline");
772
772
  break;
773
773
  case "historyUndo":
774
774
  E(r, ji, void 0);
@@ -781,8 +781,8 @@ Gt && Xn.push(["beforeinput", (n, e) => function(t, r) {
781
781
  `) t.preventDefault(), E(r, $t, !1);
782
782
  else if (a === Se) t.preventDefault(), E(r, Wr, void 0);
783
783
  else if (a == null && t.dataTransfer) {
784
- const _ = t.dataTransfer.getData("text/plain");
785
- t.preventDefault(), o.insertRawText(_);
784
+ const g = t.dataTransfer.getData("text/plain");
785
+ t.preventDefault(), o.insertRawText(g);
786
786
  } else a != null && Gi(o, s, a, t.timeStamp, !0) ? (t.preventDefault(), E(r, _t, a)) : Ge = a;
787
787
  qi = t.timeStamp;
788
788
  }
@@ -792,15 +792,15 @@ let pt = 0, Yn = null, qi = 0, Ge = null;
792
792
  const ln = /* @__PURE__ */ new WeakMap();
793
793
  let Zn = !1, er = !1, mt = !1, ft = !1, Fn = !1, Ln = "", Me = null, Hi = [0, "", 0, "root", 0];
794
794
  function Gi(n, e, t, r, i) {
795
- const s = n.anchor, o = n.focus, l = s.getNode(), a = B(), c = Ce(ie(a)), u = c !== null ? c.anchorNode : null, d = s.key, f = a.getElementByKey(d), _ = t.length;
796
- return d !== o.key || !P(l) || (!i && (!Gt || qi < r + 50) || l.isDirty() && _ < 2 || Ss(t)) && s.offset !== o.offset && !l.isComposing() || Qe(l) || l.isDirty() && _ > 1 || (i || !Gt) && f !== null && !l.isComposing() && u !== rt(f) || c !== null && e !== null && (!e.collapsed || e.startContainer !== c.anchorNode || e.startOffset !== c.anchorOffset) || l.getFormat() !== n.format || l.getStyle() !== n.style || function(h, p) {
797
- if (p.isSegmented()) return !0;
795
+ const s = n.anchor, o = n.focus, l = s.getNode(), a = B(), c = Ce(ie(a)), u = c !== null ? c.anchorNode : null, d = s.key, f = a.getElementByKey(d), g = t.length;
796
+ return d !== o.key || !P(l) || (!i && (!Gt || qi < r + 50) || l.isDirty() && g < 2 || xs(t)) && s.offset !== o.offset && !l.isComposing() || Qe(l) || l.isDirty() && g > 1 || (i || !Gt) && f !== null && !l.isComposing() && u !== rt(f) || c !== null && e !== null && (!e.collapsed || e.startContainer !== c.anchorNode || e.startOffset !== c.anchorOffset) || l.getFormat() !== n.format || l.getStyle() !== n.style || function(h, _) {
797
+ if (_.isSegmented()) return !0;
798
798
  if (!h.isCollapsed()) return !1;
799
- const g = h.anchor.offset, x = p.getParentOrThrow(), m = p.isToken();
800
- return g === 0 ? !p.canInsertTextBefore() || !x.canInsertTextBefore() && !p.isComposing() || m || function(y) {
799
+ const p = h.anchor.offset, x = _.getParentOrThrow(), m = _.isToken();
800
+ return p === 0 ? !_.canInsertTextBefore() || !x.canInsertTextBefore() && !_.isComposing() || m || function(y) {
801
801
  const v = y.getPreviousSibling();
802
802
  return (P(v) || k(v) && v.isInline()) && !v.canInsertTextAfter();
803
- }(p) : g === p.getTextContentSize() && (!p.canInsertTextAfter() || !x.canInsertTextAfter() && !p.isComposing() || m);
803
+ }(_) : p === _.getTextContentSize() && (!_.canInsertTextAfter() || !x.canInsertTextAfter() && !_.isComposing() || m);
804
804
  }(n, l);
805
805
  }
806
806
  function Jr(n, e) {
@@ -808,20 +808,20 @@ function Jr(n, e) {
808
808
  }
809
809
  function jr(n, e, t) {
810
810
  const { anchorNode: r, anchorOffset: i, focusNode: s, focusOffset: o } = n;
811
- Zn && (Zn = !1, Jr(r, i) && Jr(s, o) && !Me) || ne(e, () => {
812
- if (!t) return void re(null);
811
+ Zn && (Zn = !1, Jr(r, i) && Jr(s, o) && !Me) || Z(e, () => {
812
+ if (!t) return void ne(null);
813
813
  if (!Sn(e, r, s)) return;
814
814
  let l = M();
815
815
  if (Me && L(l) && l.isCollapsed()) {
816
816
  const a = l.anchor, c = Me.anchor;
817
- (a.key === c.key && a.offset === c.offset + 1 || a.offset === 1 && c.getNode().is(a.getNode().getPreviousSibling())) && (l = Me.clone(), re(l));
817
+ (a.key === c.key && a.offset === c.offset + 1 || a.offset === 1 && c.getNode().is(a.getNode().getPreviousSibling())) && (l = Me.clone(), ne(l));
818
818
  }
819
819
  if (Me = null, L(l)) {
820
820
  const a = l.anchor, c = a.getNode();
821
821
  if (l.isCollapsed()) {
822
822
  n.type === "Range" && n.anchorNode === n.focusNode && (l.dirty = !0);
823
- const u = ie(e).event, d = u ? u.timeStamp : performance.now(), [f, _, h, p, g] = Hi, x = ee(), m = e.isComposing() === !1 && x.getTextContent() === "";
824
- if (d < g + 200 && a.offset === h && a.key === p) Ut(l, f, _);
823
+ const u = ie(e).event, d = u ? u.timeStamp : performance.now(), [f, g, h, _, p] = Hi, x = te(), m = e.isComposing() === !1 && x.getTextContent() === "";
824
+ if (d < p + 200 && a.offset === h && a.key === _) Ut(l, f, g);
825
825
  else if (a.type === "text") P(c) || T(141), Qi(l, c);
826
826
  else if (a.type === "element" && !m) {
827
827
  k(c) || T(259);
@@ -832,11 +832,11 @@ function jr(n, e, t) {
832
832
  }(l, y) : Ut(l, 0, "");
833
833
  }
834
834
  } else {
835
- const u = a.key, d = l.focus.key, f = l.getNodes(), _ = f.length, h = l.isBackward(), p = h ? o : i, g = h ? i : o, x = h ? d : u, m = h ? u : d;
836
- let y = Ks, v = !1;
837
- for (let w = 0; w < _; w++) {
835
+ const u = a.key, d = l.focus.key, f = l.getNodes(), g = f.length, h = l.isBackward(), _ = h ? o : i, p = h ? i : o, x = h ? d : u, m = h ? u : d;
836
+ let y = Rs, v = !1;
837
+ for (let w = 0; w < g; w++) {
838
838
  const S = f[w], N = S.getTextContentSize();
839
- if (P(S) && N !== 0 && !(w === 0 && S.__key === x && p === N || w === _ - 1 && S.__key === m && g === 0) && (v = !0, y &= S.getFormat(), y === 0)) break;
839
+ if (P(S) && N !== 0 && !(w === 0 && S.__key === x && _ === N || w === g - 1 && S.__key === m && p === 0) && (v = !0, y &= S.getFormat(), y === 0)) break;
840
840
  }
841
841
  l.format = v ? y : 0;
842
842
  }
@@ -879,13 +879,13 @@ function Yi(n) {
879
879
  }
880
880
  const Ye = /* @__PURE__ */ new Map();
881
881
  function Zi(n) {
882
- const e = Yo(n.target);
882
+ const e = Xo(n.target);
883
883
  if (e === null) return;
884
- const t = _s(e.anchorNode);
884
+ const t = gs(e.anchorNode);
885
885
  if (t === null) return;
886
- er && (er = !1, ne(t, () => {
886
+ er && (er = !1, Z(t, () => {
887
887
  const a = at(), c = e.anchorNode;
888
- (Y(c) || ke(c)) && re(pn(a, e, t, n));
888
+ (Y(c) || ke(c)) && ne(pn(a, e, t, n));
889
889
  }));
890
890
  const r = Cr(t), i = r[r.length - 1], s = i._key, o = Ye.get(s), l = o || i;
891
891
  l !== t && jr(e, l, !1), jr(e, t, !0), t !== i ? Ye.set(s, t) : o && Ye.delete(s);
@@ -896,7 +896,7 @@ function $r(n) {
896
896
  function Ur(n) {
897
897
  return n._lexicalHandled === !0;
898
898
  }
899
- function wo(n) {
899
+ function vo(n) {
900
900
  const e = n.ownerDocument, t = ln.get(e);
901
901
  if (t === void 0) return;
902
902
  const r = t - 1;
@@ -929,9 +929,9 @@ function tr(n, e, t) {
929
929
  } else _r(s) && e && n.isSelected() && n.selectPrevious();
930
930
  if (L(s) && e && !o) {
931
931
  const l = n.getIndexWithinParent();
932
- Ie(n), an(s, i, l, -1);
933
- } else Ie(n);
934
- t || Ae(i) || i.canBeEmpty() || !i.isEmpty() || tr(i, e), e && s && Z(i) && i.isEmpty() && i.selectEnd();
932
+ De(n), an(s, i, l, -1);
933
+ } else De(n);
934
+ t || Ae(i) || i.canBeEmpty() || !i.isEmpty() || tr(i, e), e && s && ee(i) && i.isEmpty() && i.selectEnd();
935
935
  }
936
936
  class gn {
937
937
  static getType() {
@@ -944,7 +944,7 @@ class gn {
944
944
  this.__parent = e.__parent, this.__next = e.__next, this.__prev = e.__prev, this.__state = e.__state;
945
945
  }
946
946
  constructor(e) {
947
- this.__type = this.constructor.getType(), this.__parent = null, this.__prev = null, this.__next = null, Object.defineProperty(this, "__state", { configurable: !0, enumerable: !1, value: void 0, writable: !0 }), ps(this, e);
947
+ this.__type = this.constructor.getType(), this.__parent = null, this.__prev = null, this.__next = null, Object.defineProperty(this, "__state", { configurable: !0, enumerable: !1, value: void 0, writable: !0 }), _s(this, e);
948
948
  }
949
949
  getType() {
950
950
  return this.__type;
@@ -970,7 +970,7 @@ class gn {
970
970
  if (L(t) && t.anchor.type === "element" && t.focus.type === "element") {
971
971
  if (t.isCollapsed()) return !1;
972
972
  const i = this.getParent();
973
- if (I(this) && this.isInline() && i) {
973
+ if (D(this) && this.isInline() && i) {
974
974
  const s = t.isBackward() ? t.focus : t.anchor;
975
975
  if (i.is(s.getNode()) && s.offset === i.getChildrenSize() && this.is(i.getLastChild())) return !1;
976
976
  }
@@ -1002,7 +1002,7 @@ class gn {
1002
1002
  let e = this;
1003
1003
  for (; e !== null; ) {
1004
1004
  const t = e.getParent();
1005
- if (Ae(t)) return k(e) || e === this && I(e) || T(194), e;
1005
+ if (Ae(t)) return k(e) || e === this && D(e) || T(194), e;
1006
1006
  e = t;
1007
1007
  }
1008
1008
  return null;
@@ -1053,7 +1053,7 @@ class gn {
1053
1053
  }
1054
1054
  isBefore(e) {
1055
1055
  const t = qt(this, e);
1056
- return t !== null && (t.type === "descendant" || (t.type === "branch" ? Es(t) === -1 : (t.type !== "same" && t.type !== "ancestor" && T(279), !1)));
1056
+ return t !== null && (t.type === "descendant" || (t.type === "branch" ? Ns(t) === -1 : (t.type !== "same" && t.type !== "ancestor" && T(279), !1)));
1057
1057
  }
1058
1058
  isParentOf(e) {
1059
1059
  const t = qt(this, e);
@@ -1098,7 +1098,7 @@ class gn {
1098
1098
  H();
1099
1099
  const e = Le(), t = B(), r = e._nodeMap, i = this.__key, s = this.getLatest(), o = t._cloneNotNeeded, l = M();
1100
1100
  if (l !== null && l.setCachedNodes(null), o.has(i)) return fn(s), s;
1101
- const a = nl(s);
1101
+ const a = tl(s);
1102
1102
  return o.add(i), fn(a), r.set(i, a), a;
1103
1103
  }
1104
1104
  getTextContent() {
@@ -1126,7 +1126,7 @@ class gn {
1126
1126
  updateFromJSON(e) {
1127
1127
  return function(t, r) {
1128
1128
  const i = t.getWritable();
1129
- return (r || i.__state) && to(t).updateFromJSON(r), i;
1129
+ return (r || i.__state) && eo(t).updateFromJSON(r), i;
1130
1130
  }(this, e.$);
1131
1131
  }
1132
1132
  static transform() {
@@ -1140,14 +1140,14 @@ class gn {
1140
1140
  let r = M();
1141
1141
  r !== null && (r = r.clone()), zn(this, e);
1142
1142
  const i = this.getLatest(), s = this.__key, o = e.__key, l = e.getWritable(), a = this.getParentOrThrow().getWritable(), c = a.__size;
1143
- Ie(l);
1144
- const u = i.getPreviousSibling(), d = i.getNextSibling(), f = i.__prev, _ = i.__next, h = i.__parent;
1145
- if (tr(i, !1, !0), u === null ? a.__first = o : u.getWritable().__next = o, l.__prev = f, d === null ? a.__last = o : d.getWritable().__prev = o, l.__next = _, l.__parent = h, a.__size = c, t && (k(this) && k(l) || T(139), this.getChildren().forEach((p) => {
1146
- l.append(p);
1143
+ De(l);
1144
+ const u = i.getPreviousSibling(), d = i.getNextSibling(), f = i.__prev, g = i.__next, h = i.__parent;
1145
+ if (tr(i, !1, !0), u === null ? a.__first = o : u.getWritable().__next = o, l.__prev = f, d === null ? a.__last = o : d.getWritable().__prev = o, l.__next = g, l.__parent = h, a.__size = c, t && (k(this) && k(l) || T(139), this.getChildren().forEach((_) => {
1146
+ l.append(_);
1147
1147
  })), L(r)) {
1148
- re(r);
1149
- const p = r.anchor, g = r.focus;
1150
- p.key === s && Gr(p, l), g.key === s && Gr(g, l);
1148
+ ne(r);
1149
+ const _ = r.anchor, p = r.focus;
1150
+ _.key === s && Gr(_, l), p.key === s && Gr(p, l);
1151
1151
  }
1152
1152
  return ve() === s && V(o), l;
1153
1153
  }
@@ -1156,25 +1156,25 @@ class gn {
1156
1156
  const r = this.getWritable(), i = e.getWritable(), s = i.getParent(), o = M();
1157
1157
  let l = !1, a = !1;
1158
1158
  if (s !== null) {
1159
- const _ = e.getIndexWithinParent();
1160
- if (Ie(i), L(o)) {
1161
- const h = s.__key, p = o.anchor, g = o.focus;
1162
- l = p.type === "element" && p.key === h && p.offset === _ + 1, a = g.type === "element" && g.key === h && g.offset === _ + 1;
1159
+ const g = e.getIndexWithinParent();
1160
+ if (De(i), L(o)) {
1161
+ const h = s.__key, _ = o.anchor, p = o.focus;
1162
+ l = _.type === "element" && _.key === h && _.offset === g + 1, a = p.type === "element" && p.key === h && p.offset === g + 1;
1163
1163
  }
1164
1164
  }
1165
1165
  const c = this.getNextSibling(), u = this.getParentOrThrow().getWritable(), d = i.__key, f = r.__next;
1166
1166
  if (c === null ? u.__last = d : c.getWritable().__prev = d, u.__size++, r.__next = d, i.__next = f, i.__prev = r.__key, i.__parent = r.__parent, t && L(o)) {
1167
- const _ = this.getIndexWithinParent();
1168
- an(o, u, _ + 1);
1167
+ const g = this.getIndexWithinParent();
1168
+ an(o, u, g + 1);
1169
1169
  const h = u.__key;
1170
- l && o.anchor.set(h, _ + 2, "element"), a && o.focus.set(h, _ + 2, "element");
1170
+ l && o.anchor.set(h, g + 2, "element"), a && o.focus.set(h, g + 2, "element");
1171
1171
  }
1172
1172
  return e;
1173
1173
  }
1174
1174
  insertBefore(e, t = !0) {
1175
1175
  H(), zn(this, e);
1176
1176
  const r = this.getWritable(), i = e.getWritable(), s = i.__key;
1177
- Ie(i);
1177
+ De(i);
1178
1178
  const o = this.getPreviousSibling(), l = this.getParentOrThrow().getWritable(), a = r.__prev, c = this.getIndexWithinParent();
1179
1179
  o === null ? l.__first = s : o.getWritable().__next = s, l.__size++, r.__prev = s, i.__prev = a, i.__next = r.__key, i.__parent = r.__parent;
1180
1180
  const u = M();
@@ -1264,13 +1264,13 @@ class Nt extends gn {
1264
1264
  if (s === t || s.previousSibling === t && Rt(s)) return !0;
1265
1265
  }
1266
1266
  return !1;
1267
- }(e) ? null : { conversion: No, priority: 0 } };
1267
+ }(e) ? null : { conversion: wo, priority: 0 } };
1268
1268
  }
1269
1269
  static importJSON(e) {
1270
1270
  return Tt().updateFromJSON(e);
1271
1271
  }
1272
1272
  }
1273
- function No(n) {
1273
+ function wo(n) {
1274
1274
  return { node: Tt() };
1275
1275
  }
1276
1276
  function Tt() {
@@ -1313,11 +1313,11 @@ function ts(n, e, t) {
1313
1313
  const o = r.nodeValue;
1314
1314
  if (o !== s) if (i || we) {
1315
1315
  const [l, a, c] = function(u, d) {
1316
- const f = u.length, _ = d.length;
1317
- let h = 0, p = 0;
1318
- for (; h < f && h < _ && u[h] === d[h]; ) h++;
1319
- for (; p + h < f && p + h < _ && u[f - p - 1] === d[_ - p - 1]; ) p++;
1320
- return [h, f - h - p, d.slice(h, _ - p)];
1316
+ const f = u.length, g = d.length;
1317
+ let h = 0, _ = 0;
1318
+ for (; h < f && h < g && u[h] === d[h]; ) h++;
1319
+ for (; _ + h < f && _ + h < g && u[f - _ - 1] === d[g - _ - 1]; ) _++;
1320
+ return [h, f - h - _, d.slice(h, g - _)];
1321
1321
  }(o, s);
1322
1322
  a !== 0 && r.deleteData(l, a), r.insertData(l, c);
1323
1323
  } else r.nodeValue = s;
@@ -1353,7 +1353,7 @@ class lt extends gn {
1353
1353
  }
1354
1354
  getMode() {
1355
1355
  const e = this.getLatest();
1356
- return Hs[e.__mode];
1356
+ return qs[e.__mode];
1357
1357
  }
1358
1358
  getStyle() {
1359
1359
  return this.getLatest().__style;
@@ -1403,20 +1403,20 @@ class lt extends gn {
1403
1403
  const i = this.__text, s = e.__format, o = this.__format, l = An(0, s), a = An(0, o), c = On(0, s), u = On(0, o);
1404
1404
  if ((l === null ? c : l) !== (a === null ? u : a)) return !0;
1405
1405
  if (l === a && c !== u) {
1406
- const p = t.firstChild;
1407
- p == null && T(48);
1408
- const g = document.createElement(u);
1409
- return Vr(g, this, 0, o, i, r), t.replaceChild(g, p), !1;
1406
+ const _ = t.firstChild;
1407
+ _ == null && T(48);
1408
+ const p = document.createElement(u);
1409
+ return Vr(p, this, 0, o, i, r), t.replaceChild(p, _), !1;
1410
1410
  }
1411
1411
  let d = t;
1412
1412
  a !== null && l !== null && (d = t.firstChild, d == null && T(49)), ts(i, d, this);
1413
1413
  const f = r.theme.text;
1414
1414
  f !== void 0 && s !== o && es(0, s, o, d, f);
1415
- const _ = e.__style, h = this.__style;
1416
- return _ !== h && (t.style.cssText = h), !1;
1415
+ const g = e.__style, h = this.__style;
1416
+ return g !== h && (t.style.cssText = h), !1;
1417
1417
  }
1418
1418
  static importDOM() {
1419
- return { "#text": () => ({ conversion: Lo, priority: 0 }), b: () => ({ conversion: Po, priority: 0 }), code: () => ({ conversion: me, priority: 0 }), em: () => ({ conversion: me, priority: 0 }), i: () => ({ conversion: me, priority: 0 }), mark: () => ({ conversion: me, priority: 0 }), s: () => ({ conversion: me, priority: 0 }), span: () => ({ conversion: Eo, priority: 0 }), strong: () => ({ conversion: me, priority: 0 }), sub: () => ({ conversion: me, priority: 0 }), sup: () => ({ conversion: me, priority: 0 }), u: () => ({ conversion: me, priority: 0 }) };
1419
+ return { "#text": () => ({ conversion: Fo, priority: 0 }), b: () => ({ conversion: Eo, priority: 0 }), code: () => ({ conversion: me, priority: 0 }), em: () => ({ conversion: me, priority: 0 }), i: () => ({ conversion: me, priority: 0 }), mark: () => ({ conversion: me, priority: 0 }), s: () => ({ conversion: me, priority: 0 }), span: () => ({ conversion: No, priority: 0 }), strong: () => ({ conversion: me, priority: 0 }), sub: () => ({ conversion: me, priority: 0 }), sup: () => ({ conversion: me, priority: 0 }), u: () => ({ conversion: me, priority: 0 }) };
1420
1420
  }
1421
1421
  static importJSON(e) {
1422
1422
  return U().updateFromJSON(e);
@@ -1426,7 +1426,7 @@ class lt extends gn {
1426
1426
  }
1427
1427
  exportDOM(e) {
1428
1428
  let { element: t } = super.exportDOM(e);
1429
- return Y(t) || T(132), t.style.whiteSpace = "pre-wrap", this.hasFormat("bold") && (t = Kt(t, "b")), this.hasFormat("italic") && (t = Kt(t, "i")), this.hasFormat("strikethrough") && (t = Kt(t, "s")), this.hasFormat("underline") && (t = Kt(t, "u")), { element: t };
1429
+ return Y(t) || T(132), t.style.whiteSpace = "pre-wrap", this.hasFormat("lowercase") ? t.style.textTransform = "lowercase" : this.hasFormat("uppercase") ? t.style.textTransform = "uppercase" : this.hasFormat("capitalize") && (t.style.textTransform = "capitalize"), this.hasFormat("bold") && (t = Kt(t, "b")), this.hasFormat("italic") && (t = Kt(t, "i")), this.hasFormat("strikethrough") && (t = Kt(t, "s")), this.hasFormat("underline") && (t = Kt(t, "u")), { element: t };
1430
1430
  }
1431
1431
  exportJSON() {
1432
1432
  return { detail: this.getDetail(), format: this.getFormat(), mode: this.getMode(), style: this.getStyle(), text: this.getTextContent(), ...super.exportJSON() };
@@ -1439,7 +1439,7 @@ class lt extends gn {
1439
1439
  }
1440
1440
  setDetail(e) {
1441
1441
  const t = this.getWritable();
1442
- return t.__detail = typeof e == "string" ? Us[e] : e, t;
1442
+ return t.__detail = typeof e == "string" ? $s[e] : e, t;
1443
1443
  }
1444
1444
  setStyle(e) {
1445
1445
  const t = this.getWritable();
@@ -1458,7 +1458,7 @@ class lt extends gn {
1458
1458
  return e.__detail ^= 2, e;
1459
1459
  }
1460
1460
  setMode(e) {
1461
- const t = qs[e];
1461
+ const t = Vs[e];
1462
1462
  if (this.__mode === t) return this;
1463
1463
  const r = this.getWritable();
1464
1464
  return r.__mode = t, r;
@@ -1523,18 +1523,18 @@ class lt extends gn {
1523
1523
  if (c === 1) return [t];
1524
1524
  const u = l[0], d = t.getParent();
1525
1525
  let f;
1526
- const _ = t.getFormat(), h = t.getStyle(), p = t.__detail;
1527
- let g = !1, x = null, m = null;
1526
+ const g = t.getFormat(), h = t.getStyle(), _ = t.__detail;
1527
+ let p = !1, x = null, m = null;
1528
1528
  const y = M();
1529
1529
  if (L(y)) {
1530
1530
  const [b, C] = y.isBackward() ? [y.focus, y.anchor] : [y.anchor, y.focus];
1531
1531
  b.type === "text" && b.key === i && (x = b), C.type === "text" && C.key === i && (m = C);
1532
1532
  }
1533
- t.isSegmented() ? (f = U(u), f.__format = _, f.__style = h, f.__detail = p, g = !0) : (f = t.getWritable(), f.__text = u);
1533
+ t.isSegmented() ? (f = U(u), f.__format = g, f.__style = h, f.__detail = _, p = !0) : (f = t.getWritable(), f.__text = u);
1534
1534
  const v = [f];
1535
1535
  for (let b = 1; b < c; b++) {
1536
1536
  const C = U(l[b]);
1537
- C.__format = _, C.__style = h, C.__detail = p;
1537
+ C.__format = g, C.__style = h, C.__detail = _;
1538
1538
  const F = C.__key;
1539
1539
  s === i && V(F), v.push(C);
1540
1540
  }
@@ -1555,7 +1555,7 @@ class lt extends gn {
1555
1555
  O !== null && fn(O), W !== null && fn(W);
1556
1556
  })(this);
1557
1557
  const b = d.getWritable(), C = this.getIndexWithinParent();
1558
- g ? (b.splice(C, 0, v), this.remove()) : b.splice(C, 1, v), L(y) && an(y, d, C, c - 1);
1558
+ p ? (b.splice(C, 0, v), this.remove()) : b.splice(C, 1, v), L(y) && an(y, d, C, c - 1);
1559
1559
  }
1560
1560
  return v;
1561
1561
  }
@@ -1578,28 +1578,28 @@ class lt extends gn {
1578
1578
  return !1;
1579
1579
  }
1580
1580
  }
1581
- function Eo(n) {
1581
+ function No(n) {
1582
1582
  return { forChild: hr(n.style), node: null };
1583
1583
  }
1584
- function Po(n) {
1584
+ function Eo(n) {
1585
1585
  const e = n, t = e.style.fontWeight === "normal";
1586
1586
  return { forChild: hr(e.style, t ? void 0 : "bold"), node: null };
1587
1587
  }
1588
1588
  const qr = /* @__PURE__ */ new WeakMap();
1589
- function Fo(n) {
1589
+ function Po(n) {
1590
1590
  if (!Y(n)) return !1;
1591
1591
  if (n.nodeName === "PRE") return !0;
1592
1592
  const e = n.style.whiteSpace;
1593
1593
  return typeof e == "string" && e.startsWith("pre");
1594
1594
  }
1595
- function Lo(n) {
1595
+ function Fo(n) {
1596
1596
  const e = n;
1597
1597
  n.parentElement === null && T(129);
1598
1598
  let t = e.textContent || "";
1599
1599
  if (function(r) {
1600
1600
  let i, s = r.parentNode;
1601
1601
  const o = [r];
1602
- for (; s !== null && (i = qr.get(s)) === void 0 && !Fo(s); ) o.push(s), s = s.parentNode;
1602
+ for (; s !== null && (i = qr.get(s)) === void 0 && !Po(s); ) o.push(s), s = s.parentNode;
1603
1603
  const l = i === void 0 ? s : i;
1604
1604
  for (let a = 0; a < o.length; a++) qr.set(o[a], l);
1605
1605
  return l;
@@ -1647,7 +1647,7 @@ function Hr(n, e) {
1647
1647
  }
1648
1648
  if (t = r, Y(t)) {
1649
1649
  const s = t.style.display;
1650
- if (s === "" && !el(t) || s !== "" && !s.startsWith("inline")) return null;
1650
+ if (s === "" && !Zo(t) || s !== "" && !s.startsWith("inline")) return null;
1651
1651
  }
1652
1652
  let i = t;
1653
1653
  for (; (i = e ? t.firstChild : t.lastChild) !== null; ) t = i;
@@ -1655,9 +1655,9 @@ function Hr(n, e) {
1655
1655
  if (t.nodeName === "BR") return null;
1656
1656
  }
1657
1657
  }
1658
- const Ao = { code: "code", em: "italic", i: "italic", mark: "highlight", s: "strikethrough", strong: "bold", sub: "subscript", sup: "superscript", u: "underline" };
1658
+ const Lo = { code: "code", em: "italic", i: "italic", mark: "highlight", s: "strikethrough", strong: "bold", sub: "subscript", sup: "superscript", u: "underline" };
1659
1659
  function me(n) {
1660
- const e = Ao[n.nodeName.toLowerCase()];
1660
+ const e = Lo[n.nodeName.toLowerCase()];
1661
1661
  return e === void 0 ? { node: null } : { forChild: hr(n.style, e), node: null };
1662
1662
  }
1663
1663
  function U(n = "") {
@@ -1709,10 +1709,10 @@ class Et extends lt {
1709
1709
  function gr() {
1710
1710
  return Tn(new Et());
1711
1711
  }
1712
- function Oo(n) {
1712
+ function Ao(n) {
1713
1713
  return n instanceof Et;
1714
1714
  }
1715
- class Mo {
1715
+ class Oo {
1716
1716
  constructor(e, t, r) {
1717
1717
  this._selection = null, this.key = e, this.offset = t, this.type = r;
1718
1718
  }
@@ -1720,7 +1720,7 @@ class Mo {
1720
1720
  return this.key === e.key && this.offset === e.offset && this.type === e.type;
1721
1721
  }
1722
1722
  isBefore(e) {
1723
- return this.key === e.key ? this.offset < e.offset : Ns(ue($e(this, "next")), ue($e(e, "next"))) < 0;
1723
+ return this.key === e.key ? this.offset < e.offset : ws(ue($e(this, "next")), ue($e(e, "next"))) < 0;
1724
1724
  }
1725
1725
  getNode() {
1726
1726
  const e = j(this.key);
@@ -1732,7 +1732,7 @@ class Mo {
1732
1732
  }
1733
1733
  }
1734
1734
  function de(n, e, t) {
1735
- return new Mo(n, e, t);
1735
+ return new Oo(n, e, t);
1736
1736
  }
1737
1737
  function Mn(n, e) {
1738
1738
  let t = e.__key, r = n.offset, i = "element";
@@ -1833,7 +1833,7 @@ class _n {
1833
1833
  const e = this.getNodes();
1834
1834
  if ((M() || at()) === this && e[0]) {
1835
1835
  const t = q(e[0], "next");
1836
- hl(je(t, t));
1836
+ dl(je(t, t));
1837
1837
  }
1838
1838
  for (const t of e) t.remove();
1839
1839
  }
@@ -1878,11 +1878,11 @@ class Ve {
1878
1878
  i.pop();
1879
1879
  }
1880
1880
  if (i.length === 0 && r.isCollapsed()) {
1881
- const c = ue(r.anchor), u = ue(r.anchor.getFlipped()), d = (_) => Ee(_) ? _.origin : _.getNodeAtCaret(), f = d(c) || d(u) || (r.anchor.getNodeAtCaret() ? c.origin : u.origin);
1881
+ const c = ue(r.anchor), u = ue(r.anchor.getFlipped()), d = (g) => Ee(g) ? g.origin : g.getNodeAtCaret(), f = d(c) || d(u) || (r.anchor.getNodeAtCaret() ? c.origin : u.origin);
1882
1882
  i.push(f);
1883
1883
  }
1884
1884
  return i;
1885
- }(Ps(vi(this), "next"));
1885
+ }(Es(vi(this), "next"));
1886
1886
  return Pt() || (this._cachedNodes = t), t;
1887
1887
  }
1888
1888
  setTextNodeRange(e, t, r, i) {
@@ -1898,9 +1898,9 @@ class Ve {
1898
1898
  if (k(f) && !f.isInline()) u || (c += `
1899
1899
  `), u = !f.isEmpty();
1900
1900
  else if (u = !1, P(f)) {
1901
- let _ = f.getTextContent();
1902
- f === t ? f === r ? i.type === "element" && s.type === "element" && s.offset !== i.offset || (_ = l < a ? _.slice(l, a) : _.slice(a, l)) : _ = o ? _.slice(l) : _.slice(a) : f === r && (_ = o ? _.slice(0, a) : _.slice(0, l)), c += _;
1903
- } else !I(f) && !Ze(f) || f === r && this.isCollapsed() || (c += f.getTextContent());
1901
+ let g = f.getTextContent();
1902
+ f === t ? f === r ? i.type === "element" && s.type === "element" && s.offset !== i.offset || (g = l < a ? g.slice(l, a) : g.slice(a, l)) : g = o ? g.slice(l) : g.slice(a) : f === r && (g = o ? g.slice(0, a) : g.slice(0, l)), c += g;
1903
+ } else !D(f) && !Ze(f) || f === r && this.isCollapsed() || (c += f.getTextContent());
1904
1904
  }
1905
1905
  return c;
1906
1906
  }
@@ -1937,38 +1937,38 @@ class Ve {
1937
1937
  insertText(e) {
1938
1938
  const t = this.anchor, r = this.focus, i = this.format, s = this.style;
1939
1939
  let o = t, l = r;
1940
- !this.isCollapsed() && r.isBefore(t) && (o = r, l = t), o.type === "element" && function(g, x, m, y) {
1941
- const v = g.getNode(), w = v.getChildAtIndex(g.offset), S = U(), N = Z(v) ? Ne().append(S) : S;
1942
- S.setFormat(m), S.setStyle(y), w === null ? v.append(N) : w.insertBefore(N), g.is(x) && x.set(S.__key, 0, "text"), g.set(S.__key, 0, "text");
1940
+ !this.isCollapsed() && r.isBefore(t) && (o = r, l = t), o.type === "element" && function(p, x, m, y) {
1941
+ const v = p.getNode(), w = v.getChildAtIndex(p.offset), S = U(), N = ee(v) ? Ne().append(S) : S;
1942
+ S.setFormat(m), S.setStyle(y), w === null ? v.append(N) : w.insertBefore(N), p.is(x) && x.set(S.__key, 0, "text"), p.set(S.__key, 0, "text");
1943
1943
  }(o, l, i, s), l.type === "element" && wt(l, ue($e(l, "next")));
1944
1944
  const a = o.offset;
1945
1945
  let c = l.offset;
1946
1946
  const u = this.getNodes(), d = u.length;
1947
1947
  let f = u[0];
1948
1948
  P(f) || T(26);
1949
- const _ = f.getTextContent().length, h = f.getParentOrThrow();
1950
- let p = u[d - 1];
1951
- if (d === 1 && l.type === "element" && (c = _, l.set(o.key, c, "text")), this.isCollapsed() && a === _ && (f.isSegmented() || f.isToken() || !f.canInsertTextAfter() || !h.canInsertTextAfter() && f.getNextSibling() === null)) {
1952
- let g = f.getNextSibling();
1953
- if (P(g) && g.canInsertTextBefore() && !Qe(g) || (g = U(), g.setFormat(i), g.setStyle(s), h.canInsertTextAfter() ? f.insertAfter(g) : h.insertAfter(g)), g.select(0, 0), f = g, e !== "") return void this.insertText(e);
1949
+ const g = f.getTextContent().length, h = f.getParentOrThrow();
1950
+ let _ = u[d - 1];
1951
+ if (d === 1 && l.type === "element" && (c = g, l.set(o.key, c, "text")), this.isCollapsed() && a === g && (f.isSegmented() || f.isToken() || !f.canInsertTextAfter() || !h.canInsertTextAfter() && f.getNextSibling() === null)) {
1952
+ let p = f.getNextSibling();
1953
+ if (P(p) && p.canInsertTextBefore() && !Qe(p) || (p = U(), p.setFormat(i), p.setStyle(s), h.canInsertTextAfter() ? f.insertAfter(p) : h.insertAfter(p)), p.select(0, 0), f = p, e !== "") return void this.insertText(e);
1954
1954
  } else if (this.isCollapsed() && a === 0 && (f.isSegmented() || f.isToken() || !f.canInsertTextBefore() || !h.canInsertTextBefore() && f.getPreviousSibling() === null)) {
1955
- let g = f.getPreviousSibling();
1956
- if (P(g) && !Qe(g) || (g = U(), g.setFormat(i), h.canInsertTextBefore() ? f.insertBefore(g) : h.insertBefore(g)), g.select(), f = g, e !== "") return void this.insertText(e);
1957
- } else if (f.isSegmented() && a !== _) {
1958
- const g = U(f.getTextContent());
1959
- g.setFormat(i), f.replace(g), f = g;
1955
+ let p = f.getPreviousSibling();
1956
+ if (P(p) && !Qe(p) || (p = U(), p.setFormat(i), h.canInsertTextBefore() ? f.insertBefore(p) : h.insertBefore(p)), p.select(), f = p, e !== "") return void this.insertText(e);
1957
+ } else if (f.isSegmented() && a !== g) {
1958
+ const p = U(f.getTextContent());
1959
+ p.setFormat(i), f.replace(p), f = p;
1960
1960
  } else if (!this.isCollapsed() && e !== "") {
1961
- const g = p.getParent();
1962
- if (!h.canInsertTextBefore() || !h.canInsertTextAfter() || k(g) && (!g.canInsertTextBefore() || !g.canInsertTextAfter())) return this.insertText(""), ns(this.anchor, this.focus, null), void this.insertText(e);
1961
+ const p = _.getParent();
1962
+ if (!h.canInsertTextBefore() || !h.canInsertTextAfter() || k(p) && (!p.canInsertTextBefore() || !p.canInsertTextAfter())) return this.insertText(""), ns(this.anchor, this.focus, null), void this.insertText(e);
1963
1963
  }
1964
1964
  if (d === 1) {
1965
1965
  if (f.isToken()) {
1966
1966
  const y = U(e);
1967
1967
  return y.select(), void f.replace(y);
1968
1968
  }
1969
- const g = f.getFormat(), x = f.getStyle();
1970
- if (a !== c || g === i && x === s) {
1971
- if (Oo(f)) {
1969
+ const p = f.getFormat(), x = f.getStyle();
1970
+ if (a !== c || p === i && x === s) {
1971
+ if (Ao(f)) {
1972
1972
  const y = U(e);
1973
1973
  return y.setFormat(i), y.setStyle(s), y.select(), void f.replace(y);
1974
1974
  }
@@ -1985,24 +1985,24 @@ class Ve {
1985
1985
  f.setFormat(i), f.setStyle(s);
1986
1986
  }
1987
1987
  const m = c - a;
1988
- f = f.spliceText(a, m, e, !0), f.getTextContent() === "" ? f.remove() : this.anchor.type === "text" && (f.isComposing() ? this.anchor.offset -= e.length : (this.format = g, this.style = x));
1988
+ f = f.spliceText(a, m, e, !0), f.getTextContent() === "" ? f.remove() : this.anchor.type === "text" && (f.isComposing() ? this.anchor.offset -= e.length : (this.format = p, this.style = x));
1989
1989
  } else {
1990
- const g = /* @__PURE__ */ new Set([...f.getParentKeys(), ...p.getParentKeys()]), x = k(f) ? f : f.getParentOrThrow();
1991
- let m = k(p) ? p : p.getParentOrThrow(), y = p;
1990
+ const p = /* @__PURE__ */ new Set([...f.getParentKeys(), ..._.getParentKeys()]), x = k(f) ? f : f.getParentOrThrow();
1991
+ let m = k(_) ? _ : _.getParentOrThrow(), y = _;
1992
1992
  if (!x.is(m) && m.isInline()) do
1993
1993
  y = m, m = m.getParentOrThrow();
1994
1994
  while (m.isInline());
1995
- if (l.type === "text" && (c !== 0 || p.getTextContent() === "") || l.type === "element" && p.getIndexWithinParent() < c) if (P(p) && !p.isToken() && c !== p.getTextContentSize()) {
1996
- if (p.isSegmented()) {
1997
- const b = U(p.getTextContent());
1998
- p.replace(b), p = b;
1995
+ if (l.type === "text" && (c !== 0 || _.getTextContent() === "") || l.type === "element" && _.getIndexWithinParent() < c) if (P(_) && !_.isToken() && c !== _.getTextContentSize()) {
1996
+ if (_.isSegmented()) {
1997
+ const b = U(_.getTextContent());
1998
+ _.replace(b), _ = b;
1999
1999
  }
2000
- Z(l.getNode()) || l.type !== "text" || (p = p.spliceText(0, c, "")), g.add(p.__key);
2000
+ ee(l.getNode()) || l.type !== "text" || (_ = _.spliceText(0, c, "")), p.add(_.__key);
2001
2001
  } else {
2002
- const b = p.getParentOrThrow();
2003
- b.canBeEmpty() || b.getChildrenSize() !== 1 ? p.remove() : b.remove();
2002
+ const b = _.getParentOrThrow();
2003
+ b.canBeEmpty() || b.getChildrenSize() !== 1 ? _.remove() : b.remove();
2004
2004
  }
2005
- else g.add(p.__key);
2005
+ else p.add(_.__key);
2006
2006
  const v = m.getChildren(), w = new Set(u), S = x.is(m), N = x.isInline() && f.getNextSibling() === null ? x : f;
2007
2007
  for (let b = v.length - 1; b >= 0; b--) {
2008
2008
  const C = v[b];
@@ -2013,24 +2013,24 @@ class Ve {
2013
2013
  let b = m, C = null;
2014
2014
  for (; b !== null; ) {
2015
2015
  const F = b.getChildren(), O = F.length;
2016
- (O === 0 || F[O - 1].is(C)) && (g.delete(b.__key), C = b), b = b.getParent();
2016
+ (O === 0 || F[O - 1].is(C)) && (p.delete(b.__key), C = b), b = b.getParent();
2017
2017
  }
2018
2018
  }
2019
- if (f.isToken()) if (a === _) f.select();
2019
+ if (f.isToken()) if (a === g) f.select();
2020
2020
  else {
2021
2021
  const b = U(e);
2022
2022
  b.select(), f.replace(b);
2023
2023
  }
2024
- else f = f.spliceText(a, _ - a, e, !0), f.getTextContent() === "" ? f.remove() : f.isComposing() && this.anchor.type === "text" && (this.anchor.offset -= e.length);
2024
+ else f = f.spliceText(a, g - a, e, !0), f.getTextContent() === "" ? f.remove() : f.isComposing() && this.anchor.type === "text" && (this.anchor.offset -= e.length);
2025
2025
  for (let b = 1; b < d; b++) {
2026
2026
  const C = u[b], F = C.__key;
2027
- g.has(F) || C.remove();
2027
+ p.has(F) || C.remove();
2028
2028
  }
2029
2029
  }
2030
2030
  }
2031
2031
  removeText() {
2032
2032
  const e = M() === this;
2033
- Ht(this, gl(vi(this))), e && M() !== this && re(this);
2033
+ Ht(this, hl(vi(this))), e && M() !== this && ne(this);
2034
2034
  }
2035
2035
  formatText(e, t = null) {
2036
2036
  if (this.isCollapsed()) return this.toggleFormat(e), void V(null);
@@ -2046,30 +2046,30 @@ class Ve {
2046
2046
  }, o = i.length;
2047
2047
  if (o === 0) return this.toggleFormat(e), V(null), void s(t);
2048
2048
  const l = this.anchor, a = this.focus, c = this.isBackward(), u = c ? a : l, d = c ? l : a;
2049
- let f = 0, _ = i[0], h = u.type === "element" ? 0 : u.offset;
2050
- if (u.type === "text" && h === _.getTextContentSize() && (f = 1, _ = i[1], h = 0), _ == null) return;
2051
- const p = _.getFormatFlags(e, t);
2052
- s(p);
2053
- const g = o - 1;
2054
- let x = i[g];
2049
+ let f = 0, g = i[0], h = u.type === "element" ? 0 : u.offset;
2050
+ if (u.type === "text" && h === g.getTextContentSize() && (f = 1, g = i[1], h = 0), g == null) return;
2051
+ const _ = g.getFormatFlags(e, t);
2052
+ s(_);
2053
+ const p = o - 1;
2054
+ let x = i[p];
2055
2055
  const m = d.type === "text" ? d.offset : x.getTextContentSize();
2056
- if (_.is(x)) {
2056
+ if (g.is(x)) {
2057
2057
  if (h === m) return;
2058
- if (Qe(_) || h === 0 && m === _.getTextContentSize()) _.setFormat(p);
2058
+ if (Qe(g) || h === 0 && m === g.getTextContentSize()) g.setFormat(_);
2059
2059
  else {
2060
- const v = _.splitText(h, m), w = h === 0 ? v[0] : v[1];
2061
- w.setFormat(p), u.type === "text" && u.set(w.__key, 0, "text"), d.type === "text" && d.set(w.__key, m - h, "text");
2060
+ const v = g.splitText(h, m), w = h === 0 ? v[0] : v[1];
2061
+ w.setFormat(_), u.type === "text" && u.set(w.__key, 0, "text"), d.type === "text" && d.set(w.__key, m - h, "text");
2062
2062
  }
2063
- return void (this.format = p);
2063
+ return void (this.format = _);
2064
2064
  }
2065
- h === 0 || Qe(_) || ([, _] = _.splitText(h), h = 0), _.setFormat(p);
2066
- const y = x.getFormatFlags(e, p);
2065
+ h === 0 || Qe(g) || ([, g] = g.splitText(h), h = 0), g.setFormat(_);
2066
+ const y = x.getFormatFlags(e, _);
2067
2067
  m > 0 && (m === x.getTextContentSize() || Qe(x) || ([x] = x.splitText(m)), x.setFormat(y));
2068
- for (let v = f + 1; v < g; v++) {
2068
+ for (let v = f + 1; v < p; v++) {
2069
2069
  const w = i[v], S = w.getFormatFlags(e, y);
2070
2070
  w.setFormat(S);
2071
2071
  }
2072
- u.type === "text" && u.set(_.__key, h, "text"), d.type === "text" && d.set(x.__key, m, "text"), this.format = p | y;
2072
+ u.type === "text" && u.set(g.__key, h, "text"), d.type === "text" && d.set(x.__key, m, "text"), this.format = _ | y;
2073
2073
  }
2074
2074
  insertNodes(e) {
2075
2075
  if (e.length === 0) return;
@@ -2082,49 +2082,49 @@ class Ve {
2082
2082
  if (k(r) && "__language" in r) {
2083
2083
  if ("__language" in e[0]) this.insertText(e[0].getTextContent());
2084
2084
  else {
2085
- const h = Dn(this);
2085
+ const h = In(this);
2086
2086
  r.splice(h, 0, e), i.selectEnd();
2087
2087
  }
2088
2088
  return;
2089
2089
  }
2090
- if (!e.some((h) => (k(h) || I(h)) && !h.isInline())) {
2090
+ if (!e.some((h) => (k(h) || D(h)) && !h.isInline())) {
2091
2091
  k(r) || T(211, t.constructor.name, t.getType());
2092
- const h = Dn(this);
2092
+ const h = In(this);
2093
2093
  return r.splice(h, 0, e), void i.selectEnd();
2094
2094
  }
2095
2095
  const s = function(h) {
2096
- const p = Ne();
2097
- let g = null;
2096
+ const _ = Ne();
2097
+ let p = null;
2098
2098
  for (let x = 0; x < h.length; x++) {
2099
2099
  const m = h[x], y = Ze(m);
2100
- if (y || I(m) && m.isInline() || k(m) && m.isInline() || P(m) || m.isParentRequired()) {
2101
- if (g === null && (g = m.createParentElementNode(), p.append(g), y)) continue;
2102
- g !== null && g.append(m);
2103
- } else p.append(m), g = null;
2100
+ if (y || D(m) && m.isInline() || k(m) && m.isInline() || P(m) || m.isParentRequired()) {
2101
+ if (p === null && (p = m.createParentElementNode(), _.append(p), y)) continue;
2102
+ p !== null && p.append(m);
2103
+ } else _.append(m), p = null;
2104
2104
  }
2105
- return p;
2105
+ return _;
2106
2106
  }(e), o = s.getLastDescendant(), l = s.getChildren(), a = !k(r) || !r.isEmpty() ? this.insertParagraph() : null, c = l[l.length - 1];
2107
2107
  let u = l[0];
2108
2108
  var d;
2109
- k(d = u) && Te(d) && !d.isEmpty() && k(r) && (!r.isEmpty() || r.canMergeWhenEmpty()) && (k(r) || T(211, t.constructor.name, t.getType()), r.append(...u.getChildren()), u = l[1]), u && (r === null && T(212, t.constructor.name, t.getType()), function(h, p, g) {
2110
- const x = p.getParentOrThrow().getLastChild();
2111
- let m = p;
2112
- const y = [p];
2109
+ k(d = u) && Te(d) && !d.isEmpty() && k(r) && (!r.isEmpty() || r.canMergeWhenEmpty()) && (k(r) || T(211, t.constructor.name, t.getType()), r.append(...u.getChildren()), u = l[1]), u && (r === null && T(212, t.constructor.name, t.getType()), function(h, _, p) {
2110
+ const x = _.getParentOrThrow().getLastChild();
2111
+ let m = _;
2112
+ const y = [_];
2113
2113
  for (; m !== x; ) m.getNextSibling() || T(140), m = m.getNextSibling(), y.push(m);
2114
2114
  let v = h;
2115
2115
  for (const w of y) v = v.insertAfter(w);
2116
2116
  }(r, u));
2117
2117
  const f = Wn(o, Te);
2118
2118
  a && k(f) && (a.canMergeWhenEmpty() || Te(c)) && (f.append(...a.getChildren()), a.remove()), k(r) && r.isEmpty() && r.remove(), o.selectEnd();
2119
- const _ = k(r) ? r.getLastChild() : null;
2120
- Ze(_) && f !== r && _.remove();
2119
+ const g = k(r) ? r.getLastChild() : null;
2120
+ Ze(g) && f !== r && g.remove();
2121
2121
  }
2122
2122
  insertParagraph() {
2123
2123
  if (this.anchor.key === "root") {
2124
2124
  const o = Ne();
2125
- return ee().splice(this.anchor.offset, 0, [o]), o.select(), o;
2125
+ return te().splice(this.anchor.offset, 0, [o]), o.select(), o;
2126
2126
  }
2127
- const e = Dn(this), t = Wn(this.anchor.getNode(), Te);
2127
+ const e = In(this), t = Wn(this.anchor.getNode(), Te);
2128
2128
  k(t) || T(213);
2129
2129
  const r = t.getChildAtIndex(e), i = r ? [r, ...r.getNextSiblings()] : [], s = t.insertNewAfter(this, !1);
2130
2130
  return s ? (s.append(...i), s.selectStart(), s) : null;
@@ -2143,7 +2143,7 @@ class Ve {
2143
2143
  if (t === 0) return [];
2144
2144
  if (t === 1) {
2145
2145
  if (P(o) && !this.isCollapsed()) {
2146
- const d = a > c ? c : a, f = a > c ? a : c, _ = o.splitText(d, f), h = d === 0 ? _[0] : _[1];
2146
+ const d = a > c ? c : a, f = a > c ? a : c, g = o.splitText(d, f), h = d === 0 ? g[0] : g[1];
2147
2147
  return h != null ? [h] : [];
2148
2148
  }
2149
2149
  return [o];
@@ -2168,26 +2168,26 @@ class Ve {
2168
2168
  let u = it(s, this.anchor.key), d = it(s, this.focus.key);
2169
2169
  this.anchor.type === "text" && (u = rt(u)), this.focus.type === "text" && (d = rt(d)), u && d && os(o, u, this.anchor.offset, d, this.focus.offset);
2170
2170
  }
2171
- if (function(u, d, f, _) {
2172
- u.modify(d, f, _);
2171
+ if (function(u, d, f, g) {
2172
+ u.modify(d, f, g);
2173
2173
  }(o, e, t ? "backward" : "forward", r), o.rangeCount > 0) {
2174
- const u = o.getRangeAt(0), d = this.anchor.getNode(), f = Z(d) ? d : Go(d);
2174
+ const u = o.getRangeAt(0), d = this.anchor.getNode(), f = ee(d) ? d : Ho(d);
2175
2175
  if (this.applyDOMRange(u), this.dirty = !0, !i) {
2176
- const _ = this.getNodes(), h = [];
2177
- let p = !1;
2178
- for (let g = 0; g < _.length; g++) {
2179
- const x = _[g];
2180
- nr(x, f) ? h.push(x) : p = !0;
2176
+ const g = this.getNodes(), h = [];
2177
+ let _ = !1;
2178
+ for (let p = 0; p < g.length; p++) {
2179
+ const x = g[p];
2180
+ nr(x, f) ? h.push(x) : _ = !0;
2181
2181
  }
2182
- if (p && h.length > 0) if (t) {
2183
- const g = h[0];
2184
- k(g) ? g.selectStart() : g.getParentOrThrow().selectStart();
2182
+ if (_ && h.length > 0) if (t) {
2183
+ const p = h[0];
2184
+ k(p) ? p.selectStart() : p.getParentOrThrow().selectStart();
2185
2185
  } else {
2186
- const g = h[h.length - 1];
2187
- k(g) ? g.selectEnd() : g.getParentOrThrow().selectEnd();
2186
+ const p = h[h.length - 1];
2187
+ k(p) ? p.selectEnd() : p.getParentOrThrow().selectEnd();
2188
2188
  }
2189
- o.anchorNode === u.startContainer && o.anchorOffset === u.startOffset || function(g) {
2190
- const x = g.focus, m = g.anchor, y = m.key, v = m.offset, w = m.type;
2189
+ o.anchorNode === u.startContainer && o.anchorOffset === u.startOffset || function(p) {
2190
+ const x = p.focus, m = p.anchor, y = m.key, v = m.offset, w = m.type;
2191
2191
  m.set(x.key, x.offset, x.type, !0), x.set(y, v, w, !0);
2192
2192
  }(this);
2193
2193
  }
@@ -2207,7 +2207,7 @@ class Ve {
2207
2207
  const r = this.anchor;
2208
2208
  let i = r.getNode();
2209
2209
  if (this.forwardDeletion(r, i, e)) return;
2210
- const s = vs($e(r, e ? "previous" : "next"));
2210
+ const s = Ts($e(r, e ? "previous" : "next"));
2211
2211
  if (s.getTextSlices().every((l) => l === null || l.distance === 0)) {
2212
2212
  let l = { type: "initial" };
2213
2213
  for (const a of s.iterNodeCarets("shadowRoot")) if (fe(a)) {
@@ -2231,11 +2231,11 @@ class Ve {
2231
2231
  } else l = { block: a.origin, type: "merge-next-block" };
2232
2232
  continue;
2233
2233
  }
2234
- if (I(a.origin)) {
2234
+ if (D(a.origin)) {
2235
2235
  if (!a.origin.isIsolated()) if (l.type === "merge-next-block" && (a.origin.isKeyboardSelectable() || !a.origin.isInline()) && k(s.anchor.origin) && s.anchor.origin.isEmpty()) {
2236
2236
  s.anchor.origin.remove();
2237
2237
  const c = ss();
2238
- c.add(a.origin.getKey()), re(c);
2238
+ c.add(a.origin.getKey()), ne(c);
2239
2239
  } else a.origin.remove();
2240
2240
  return;
2241
2241
  }
@@ -2260,11 +2260,11 @@ class Ve {
2260
2260
  if (i.is(l) || e && a !== 0 || !e && a !== c) return void Zr(i, e, a);
2261
2261
  }
2262
2262
  (function(a, c) {
2263
- const u = a.anchor, d = a.focus, f = u.getNode(), _ = d.getNode();
2264
- if (f === _ && u.type === "text" && d.type === "text") {
2265
- const h = u.offset, p = d.offset, g = h < p, x = g ? h : p, m = g ? p : h, y = m - 1;
2263
+ const u = a.anchor, d = a.focus, f = u.getNode(), g = d.getNode();
2264
+ if (f === g && u.type === "text" && d.type === "text") {
2265
+ const h = u.offset, _ = d.offset, p = h < _, x = p ? h : _, m = p ? _ : h, y = m - 1;
2266
2266
  x !== y && function(v) {
2267
- return !(Ss(v) || Do(v));
2267
+ return !(xs(v) || Mo(v));
2268
2268
  }(f.getTextContent().slice(x, m)) && (c ? d.set(d.key, y, d.type) : u.set(u.key, y, u.type));
2269
2269
  }
2270
2270
  })(this, e);
@@ -2272,7 +2272,7 @@ class Ve {
2272
2272
  }
2273
2273
  if (this.removeText(), e && !t && this.isCollapsed() && this.anchor.type === "element" && this.anchor.offset === 0) {
2274
2274
  const r = this.anchor.getNode();
2275
- r.isEmpty() && Z(r.getParent()) && r.getPreviousSibling() === null && Yr(this, r);
2275
+ r.isEmpty() && ee(r.getParent()) && r.getPreviousSibling() === null && Yr(this, r);
2276
2276
  }
2277
2277
  }
2278
2278
  deleteLine(e) {
@@ -2318,7 +2318,7 @@ function Yr(n, e) {
2318
2318
  }
2319
2319
  return !1;
2320
2320
  }
2321
- const Do = (() => {
2321
+ const Mo = (() => {
2322
2322
  try {
2323
2323
  const n = new RegExp("\\p{Emoji}", "u"), e = n.test.bind(n);
2324
2324
  if (e("❤️") && e("#️⃣") && e("👍")) return e;
@@ -2356,20 +2356,20 @@ function ei(n, e, t, r) {
2356
2356
  let f = Xe(n);
2357
2357
  if (f === null) return null;
2358
2358
  if (k(f)) {
2359
- const _ = r.getElementByKey(f.getKey());
2360
- _ === null && T(214), [f, s] = f.getDOMSlot(_).resolveChildIndex(f, _, n, e), k(f) || T(215), o && s >= f.getChildrenSize() && (s = Math.max(0, f.getChildrenSize() - 1));
2361
- let p = f.getChildAtIndex(s);
2362
- if (k(p) && function(g, x, m) {
2363
- const y = g.getParent();
2359
+ const g = r.getElementByKey(f.getKey());
2360
+ g === null && T(214), [f, s] = f.getDOMSlot(g).resolveChildIndex(f, g, n, e), k(f) || T(215), o && s >= f.getChildrenSize() && (s = Math.max(0, f.getChildrenSize() - 1));
2361
+ let _ = f.getChildAtIndex(s);
2362
+ if (k(_) && function(p, x, m) {
2363
+ const y = p.getParent();
2364
2364
  return m === null || y === null || !y.canBeEmpty() || y !== m.getNode();
2365
- }(p, 0, t)) {
2366
- const g = o ? p.getLastDescendant() : p.getFirstDescendant();
2367
- g === null ? f = p : (p = g, f = k(p) ? p : p.getParentOrThrow()), s = 0;
2365
+ }(_, 0, t)) {
2366
+ const p = o ? _.getLastDescendant() : _.getFirstDescendant();
2367
+ p === null ? f = _ : (_ = p, f = k(_) ? _ : _.getParentOrThrow()), s = 0;
2368
2368
  }
2369
- P(p) ? (i = p, f = null, s = gi(p, o)) : p !== f && o && !d && (k(f) || T(216), s = Math.min(f.getChildrenSize(), s + 1));
2369
+ P(_) ? (i = _, f = null, s = gi(_, o)) : _ !== f && o && !d && (k(f) || T(216), s = Math.min(f.getChildrenSize(), s + 1));
2370
2370
  } else {
2371
- const _ = f.getIndexWithinParent();
2372
- s = e === 0 && I(f) && Xe(n) === f ? _ : _ + 1, f = f.getParentOrThrow();
2371
+ const g = f.getIndexWithinParent();
2372
+ s = e === 0 && D(f) && Xe(n) === f ? g : g + 1, f = f.getParentOrThrow();
2373
2373
  }
2374
2374
  if (k(f)) return de(f.__key, s, "element");
2375
2375
  }
@@ -2414,11 +2414,11 @@ function rs(n, e, t, r, i, s) {
2414
2414
  if (l === null) return null;
2415
2415
  if (o.type === "element" && l.type === "element") {
2416
2416
  const a = Xe(n), c = Xe(t);
2417
- if (I(a) && I(c)) return null;
2417
+ if (D(a) && D(c)) return null;
2418
2418
  }
2419
2419
  return ns(o, l, s), [o, l];
2420
2420
  }
2421
- function Fl(n) {
2421
+ function Pl(n) {
2422
2422
  return k(n) && !n.isInline();
2423
2423
  }
2424
2424
  function is(n, e, t, r, i, s) {
@@ -2432,7 +2432,7 @@ function Io() {
2432
2432
  function ss() {
2433
2433
  return new _n(/* @__PURE__ */ new Set());
2434
2434
  }
2435
- function Ll(n, e) {
2435
+ function Fl(n, e) {
2436
2436
  return pn(null, n, e, null);
2437
2437
  }
2438
2438
  function pn(n, e, t, r) {
@@ -2443,10 +2443,10 @@ function pn(n, e, t, r) {
2443
2443
  if (L(n) && !a) return n.clone();
2444
2444
  if (e === null) return null;
2445
2445
  if (c = e.anchorNode, u = e.focusNode, d = e.anchorOffset, f = e.focusOffset, l && L(n) && !Sn(t, c, u)) return n.clone();
2446
- const _ = rs(c, d, u, f, t, n);
2447
- if (_ === null) return null;
2448
- const [h, p] = _;
2449
- return new Ve(h, p, L(n) ? n.format : 0, L(n) ? n.style : "");
2446
+ const g = rs(c, d, u, f, t, n);
2447
+ if (g === null) return null;
2448
+ const [h, _] = g;
2449
+ return new Ve(h, _, L(n) ? n.format : 0, L(n) ? n.style : "");
2450
2450
  }
2451
2451
  function M() {
2452
2452
  return Le()._selection;
@@ -2465,12 +2465,12 @@ function an(n, e, t, r = 1) {
2465
2465
  i.set(a, u, "element"), s.set(a, u, "element"), ni(n);
2466
2466
  }
2467
2467
  } else {
2468
- const c = n.isBackward(), u = c ? s : i, d = u.getNode(), f = c ? i : s, _ = f.getNode();
2468
+ const c = n.isBackward(), u = c ? s : i, d = u.getNode(), f = c ? i : s, g = f.getNode();
2469
2469
  if (e.is(d)) {
2470
2470
  const h = u.offset;
2471
2471
  (t <= h && r > 0 || t < h && r < 0) && u.set(a, Math.max(0, h + r), "element");
2472
2472
  }
2473
- if (e.is(_)) {
2473
+ if (e.is(g)) {
2474
2474
  const h = f.offset;
2475
2475
  (t <= h && r > 0 || t < h && r < 0) && f.set(a, Math.max(0, h + r), "element");
2476
2476
  }
@@ -2516,19 +2516,19 @@ function os(n, e, t, r, i) {
2516
2516
  } catch {
2517
2517
  }
2518
2518
  }
2519
- function zo(n, e, t, r, i, s, o) {
2519
+ function Do(n, e, t, r, i, s, o) {
2520
2520
  const l = r.anchorNode, a = r.focusNode, c = r.anchorOffset, u = r.focusOffset, d = document.activeElement;
2521
- if (i.has("collaboration") && d !== s || d !== null && gs(d)) return;
2521
+ if (i.has("collaboration") && d !== s || d !== null && hs(d)) return;
2522
2522
  if (!L(e)) return void (n !== null && Sn(t, l, a) && r.removeAllRanges());
2523
- const f = e.anchor, _ = e.focus, h = f.key, p = _.key, g = it(t, h), x = it(t, p), m = f.offset, y = _.offset, v = e.format, w = e.style, S = e.isCollapsed();
2524
- let N = g, b = x, C = !1;
2523
+ const f = e.anchor, g = e.focus, h = f.key, _ = g.key, p = it(t, h), x = it(t, _), m = f.offset, y = g.offset, v = e.format, w = e.style, S = e.isCollapsed();
2524
+ let N = p, b = x, C = !1;
2525
2525
  if (f.type === "text") {
2526
- N = rt(g);
2526
+ N = rt(p);
2527
2527
  const z = f.getNode();
2528
2528
  C = z.getFormat() !== v || z.getStyle() !== w;
2529
2529
  } else L(n) && n.anchor.type === "text" && (C = !0);
2530
- var F, O, W, D, A;
2531
- if (_.type === "text" && (b = rt(x)), N !== null && b !== null && (S && (n === null || C || L(n) && (n.format !== v || n.style !== w)) && (F = v, O = w, W = m, D = h, A = performance.now(), Hi = [F, O, W, D, A]), c !== m || u !== y || l !== N || a !== b || r.type === "Range" && S || (d !== null && s.contains(d) || s.focus({ preventScroll: !0 }), f.type === "element"))) {
2530
+ var F, O, W, I, A;
2531
+ if (g.type === "text" && (b = rt(x)), N !== null && b !== null && (S && (n === null || C || L(n) && (n.format !== v || n.style !== w)) && (F = v, O = w, W = m, I = h, A = performance.now(), Hi = [F, O, W, I, A]), c !== m || u !== y || l !== N || a !== b || r.type === "Range" && S || (d !== null && s.contains(d) || s.focus({ preventScroll: !0 }), f.type === "element"))) {
2532
2532
  if (os(r, N, m, b, y), !i.has("skip-scroll-into-view") && e.isCollapsed() && s !== null && s === document.activeElement) {
2533
2533
  const z = L(e) && e.anchor.type === "element" ? N.childNodes[m] || null : r.rangeCount > 0 ? r.getRangeAt(0) : null;
2534
2534
  if (z !== null) {
@@ -2538,18 +2538,18 @@ function zo(n, e, t, r, i, s, o) {
2538
2538
  he.selectNode(z), $ = he.getBoundingClientRect();
2539
2539
  } else $ = z.getBoundingClientRect();
2540
2540
  (function(he, ge, _e) {
2541
- const ct = Ts(_e), Fr = vr(ct);
2541
+ const ct = bs(_e), Fr = vr(ct);
2542
2542
  if (ct === null || Fr === null) return;
2543
- let { top: vn, bottom: wn } = ge, Dt = 0, It = 0, be = _e;
2543
+ let { top: vn, bottom: wn } = ge, It = 0, Dt = 0, be = _e;
2544
2544
  for (; be !== null; ) {
2545
2545
  const Nn = be === ct.body;
2546
- if (Nn) Dt = 0, It = ie(he).innerHeight;
2546
+ if (Nn) It = 0, Dt = ie(he).innerHeight;
2547
2547
  else {
2548
2548
  const zt = be.getBoundingClientRect();
2549
- Dt = zt.top, It = zt.bottom;
2549
+ It = zt.top, Dt = zt.bottom;
2550
2550
  }
2551
2551
  let ut = 0;
2552
- if (vn < Dt ? ut = -(Dt - vn) : wn > It && (ut = wn - It), ut !== 0) if (Nn) Fr.scrollBy(0, ut);
2552
+ if (vn < It ? ut = -(It - vn) : wn > Dt && (ut = wn - Dt), ut !== 0) if (Nn) Fr.scrollBy(0, ut);
2553
2553
  else {
2554
2554
  const zt = be.scrollTop;
2555
2555
  be.scrollTop += ut;
@@ -2565,11 +2565,11 @@ function zo(n, e, t, r, i, s, o) {
2565
2565
  Zn = !0;
2566
2566
  }
2567
2567
  }
2568
- function Al(n) {
2568
+ function Ll(n) {
2569
2569
  let e = M() || at();
2570
- e === null && (e = ee().selectEnd()), e.insertNodes(n);
2570
+ e === null && (e = te().selectEnd()), e.insertNodes(n);
2571
2571
  }
2572
- function Dn(n) {
2572
+ function In(n) {
2573
2573
  let e = n;
2574
2574
  n.isCollapsed() || e.removeText();
2575
2575
  const t = M();
@@ -2578,15 +2578,15 @@ function Dn(n) {
2578
2578
  let i = r.getNode(), s = r.offset;
2579
2579
  for (; !Te(i); ) {
2580
2580
  const o = i;
2581
- if ([i, s] = Bo(i, s), o.is(i)) break;
2581
+ if ([i, s] = zo(i, s), o.is(i)) break;
2582
2582
  }
2583
2583
  return s;
2584
2584
  }
2585
- function Bo(n, e) {
2585
+ function zo(n, e) {
2586
2586
  const t = n.getParent();
2587
2587
  if (!t) {
2588
2588
  const i = Ne();
2589
- return ee().append(i), i.select(), [ee(), 0];
2589
+ return te().append(i), i.select(), [te(), 0];
2590
2590
  }
2591
2591
  if (P(n)) {
2592
2592
  const i = n.splitText(e);
@@ -2609,32 +2609,32 @@ function ii(n, e, t, r, i = "decorators-and-blocks") {
2609
2609
  }
2610
2610
  const s = $e(n.focus, t ? "previous" : "next"), o = r === "lineboundary", l = e === "move";
2611
2611
  let a = s, c = i === "decorators-and-blocks";
2612
- if (!_l(a)) {
2612
+ if (!gl(a)) {
2613
2613
  for (const u of a) {
2614
2614
  c = !1;
2615
2615
  const { origin: d } = u;
2616
- if (!I(d) || d.isIsolated() || (a = u, !o || !d.isInline())) break;
2616
+ if (!D(d) || d.isIsolated() || (a = u, !o || !d.isInline())) break;
2617
2617
  }
2618
- if (c) for (const u of vs(s).iterNodeCarets(e === "extend" ? "shadowRoot" : "root")) {
2618
+ if (c) for (const u of Ts(s).iterNodeCarets(e === "extend" ? "shadowRoot" : "root")) {
2619
2619
  if (fe(u)) u.origin.isInline() || (a = u);
2620
2620
  else {
2621
2621
  if (k(u.origin)) continue;
2622
- I(u.origin) && !u.origin.isInline() && (a = u);
2622
+ D(u.origin) && !u.origin.isInline() && (a = u);
2623
2623
  }
2624
2624
  break;
2625
2625
  }
2626
2626
  }
2627
2627
  if (a === s) return !1;
2628
- if (l && !o && I(a.origin) && a.origin.isKeyboardSelectable()) {
2628
+ if (l && !o && D(a.origin) && a.origin.isKeyboardSelectable()) {
2629
2629
  const u = ss();
2630
- return u.add(a.origin.getKey()), re(u), !0;
2630
+ return u.add(a.origin.getKey()), ne(u), !0;
2631
2631
  }
2632
2632
  return a = ue(a), l && wt(n.anchor, a), wt(n.focus, a), c || !o;
2633
2633
  }
2634
- let J = null, K = null, X = !1, In = !1, Vt = 0;
2634
+ let K = null, J = null, X = !1, Dn = !1, Vt = 0;
2635
2635
  const si = { characterData: !0, childList: !0, subtree: !0 };
2636
2636
  function Pt() {
2637
- return X || J !== null && J._readOnly;
2637
+ return X || K !== null && K._readOnly;
2638
2638
  }
2639
2639
  function H() {
2640
2640
  X && T(13);
@@ -2643,10 +2643,10 @@ function ls() {
2643
2643
  Vt > 99 && T(14);
2644
2644
  }
2645
2645
  function Le() {
2646
- return J === null && T(195, as()), J;
2646
+ return K === null && T(195, as()), K;
2647
2647
  }
2648
2648
  function B() {
2649
- return K === null && T(196, as()), K;
2649
+ return J === null && T(196, as()), J;
2650
2650
  }
2651
2651
  function as() {
2652
2652
  let n = 0;
@@ -2662,8 +2662,8 @@ function as() {
2662
2662
  let r = ` Detected on the page: ${n} compatible editor(s) with version ${t}`;
2663
2663
  return e.size && (r += ` and incompatible editors with versions ${Array.from(e).join(", ")}`), r;
2664
2664
  }
2665
- function Wo() {
2666
- return K;
2665
+ function Bo() {
2666
+ return J;
2667
2667
  }
2668
2668
  function oi(n, e, t) {
2669
2669
  const r = e.__type, i = function(l, a) {
@@ -2685,7 +2685,7 @@ function cs(n, e) {
2685
2685
  Array.isArray(e) || (r = [e]);
2686
2686
  for (const i of r) t.add(i);
2687
2687
  }
2688
- function Ol(n) {
2688
+ function Al(n) {
2689
2689
  return pr(n, B()._nodes);
2690
2690
  }
2691
2691
  function pr(n, e) {
@@ -2701,63 +2701,63 @@ function pr(n, e) {
2701
2701
  return s;
2702
2702
  }
2703
2703
  function ai(n, e, t) {
2704
- const r = J, i = X, s = K;
2705
- J = e, X = !0, K = n;
2704
+ const r = K, i = X, s = J;
2705
+ K = e, X = !0, J = n;
2706
2706
  try {
2707
2707
  return t();
2708
2708
  } finally {
2709
- J = r, X = i, K = s;
2709
+ K = r, X = i, J = s;
2710
2710
  }
2711
2711
  }
2712
2712
  function xe(n, e) {
2713
2713
  const t = n._pendingEditorState, r = n._rootElement, i = n._headless || r === null;
2714
2714
  if (t === null) return;
2715
- const s = n._editorState, o = s._selection, l = t._selection, a = n._dirtyType !== ze, c = J, u = X, d = K, f = n._updating, _ = n._observer;
2715
+ const s = n._editorState, o = s._selection, l = t._selection, a = n._dirtyType !== ze, c = K, u = X, d = J, f = n._updating, g = n._observer;
2716
2716
  let h = null;
2717
- if (n._pendingEditorState = null, n._editorState = t, !i && a && _ !== null) {
2718
- K = n, J = t, X = !1, n._updating = !0;
2717
+ if (n._pendingEditorState = null, n._editorState = t, !i && a && g !== null) {
2718
+ J = n, K = t, X = !1, n._updating = !0;
2719
2719
  try {
2720
2720
  const S = n._dirtyType, N = n._dirtyElements, b = n._dirtyLeaves;
2721
- _.disconnect(), h = io(s, t, n, S, N, b);
2721
+ g.disconnect(), h = ro(s, t, n, S, N, b);
2722
2722
  } catch (S) {
2723
- if (S instanceof Error && n._onError(S), In) throw S;
2724
- return hs(n, null, r, t), Mi(n), n._dirtyType = nt, In = !0, xe(n, s), void (In = !1);
2723
+ if (S instanceof Error && n._onError(S), Dn) throw S;
2724
+ return ds(n, null, r, t), Mi(n), n._dirtyType = nt, Dn = !0, xe(n, s), void (Dn = !1);
2725
2725
  } finally {
2726
- _.observe(r, si), n._updating = f, J = c, X = u, K = d;
2726
+ g.observe(r, si), n._updating = f, K = c, X = u, J = d;
2727
2727
  }
2728
2728
  }
2729
2729
  t._readOnly || (t._readOnly = !0);
2730
- const p = n._dirtyLeaves, g = n._dirtyElements, x = n._normalizedNodes, m = n._updateTags, y = n._deferred;
2730
+ const _ = n._dirtyLeaves, p = n._dirtyElements, x = n._normalizedNodes, m = n._updateTags, y = n._deferred;
2731
2731
  a && (n._dirtyType = ze, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements = /* @__PURE__ */ new Map(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set()), function(S, N) {
2732
2732
  const b = S._decorators;
2733
2733
  let C = S._pendingDecorators || b;
2734
2734
  const F = N._nodeMap;
2735
2735
  let O;
2736
- for (O in C) F.has(O) || (C === b && (C = ys(S)), delete C[O]);
2736
+ for (O in C) F.has(O) || (C === b && (C = ms(S)), delete C[O]);
2737
2737
  }(n, t);
2738
2738
  const v = i ? null : Ce(ie(n));
2739
2739
  if (n._editable && v !== null && (a || l === null || l.dirty) && r !== null && !m.has("skip-dom-selection")) {
2740
- K = n, J = t;
2740
+ J = n, K = t;
2741
2741
  try {
2742
- if (_ !== null && _.disconnect(), a || l === null || l.dirty) {
2742
+ if (g !== null && g.disconnect(), a || l === null || l.dirty) {
2743
2743
  const S = n._blockCursorElement;
2744
- S !== null && rr(S, n, r), zo(o, l, n, v, m, r);
2744
+ S !== null && rr(S, n, r), Do(o, l, n, v, m, r);
2745
2745
  }
2746
2746
  (function(S, N, b) {
2747
2747
  let C = S._blockCursorElement;
2748
2748
  if (L(b) && b.isCollapsed() && b.anchor.type === "element" && N.contains(document.activeElement)) {
2749
2749
  const F = b.anchor, O = F.getNode(), W = F.offset;
2750
- let D = !1, A = null;
2750
+ let I = !1, A = null;
2751
2751
  if (W === O.getChildrenSize())
2752
- Bn(O.getChildAtIndex(W - 1)) && (D = !0);
2752
+ Bn(O.getChildAtIndex(W - 1)) && (I = !0);
2753
2753
  else {
2754
2754
  const z = O.getChildAtIndex(W);
2755
2755
  if (z !== null && Bn(z)) {
2756
2756
  const $ = z.getPreviousSibling();
2757
- ($ === null || Bn($)) && (D = !0, A = S.getElementByKey(z.__key));
2757
+ ($ === null || Bn($)) && (I = !0, A = S.getElementByKey(z.__key));
2758
2758
  }
2759
2759
  }
2760
- if (D) {
2760
+ if (I) {
2761
2761
  const z = S.getElementByKey(O.__key);
2762
2762
  return C === null && (S._blockCursorElement = C = function($) {
2763
2763
  const he = $.theme, ge = document.createElement("div");
@@ -2777,21 +2777,21 @@ function xe(n, e) {
2777
2777
  C !== null && rr(C, S, N);
2778
2778
  })(n, r, l);
2779
2779
  } finally {
2780
- _ !== null && _.observe(r, si), K = d, J = c;
2780
+ g !== null && g.observe(r, si), J = d, K = c;
2781
2781
  }
2782
2782
  }
2783
2783
  h !== null && function(S, N, b, C, F) {
2784
2784
  const O = Array.from(S._listeners.mutation), W = O.length;
2785
- for (let D = 0; D < W; D++) {
2786
- const [A, z] = O[D], $ = N.get(z);
2785
+ for (let I = 0; I < W; I++) {
2786
+ const [A, z] = O[I], $ = N.get(z);
2787
2787
  $ !== void 0 && A($, { dirtyLeaves: C, prevEditorState: F, updateTags: b });
2788
2788
  }
2789
- }(n, h, m, p, s), L(l) || l === null || o !== null && o.is(l) || n.dispatchCommand(Ki, void 0);
2789
+ }(n, h, m, _, s), L(l) || l === null || o !== null && o.is(l) || n.dispatchCommand(Ki, void 0);
2790
2790
  const w = n._pendingDecorators;
2791
2791
  w !== null && (n._decorators = w, n._pendingDecorators = null, yt("decorator", n, !0, w)), function(S, N, b) {
2792
2792
  const C = hi(N), F = hi(b);
2793
2793
  C !== F && yt("textcontent", S, !0, F);
2794
- }(n, e || s, t), yt("update", n, !0, { dirtyElements: g, dirtyLeaves: p, editorState: t, mutatedNodes: h, normalizedNodes: x, prevEditorState: e || s, tags: m }), function(S, N) {
2794
+ }(n, e || s, t), yt("update", n, !0, { dirtyElements: p, dirtyLeaves: _, editorState: t, mutatedNodes: h, normalizedNodes: x, prevEditorState: e || s, tags: m }), function(S, N) {
2795
2795
  if (S._deferred = [], N.length !== 0) {
2796
2796
  const b = S._updating;
2797
2797
  S._updating = !0;
@@ -2822,26 +2822,6 @@ function yt(n, e, t, ...r) {
2822
2822
  e._updating = i;
2823
2823
  }
2824
2824
  }
2825
- function us(n, e, t) {
2826
- if (n._updating === !1 || K !== n) {
2827
- let i = !1;
2828
- return n.update(() => {
2829
- i = us(n, e, t);
2830
- }), i;
2831
- }
2832
- const r = Cr(n);
2833
- for (let i = 4; i >= 0; i--) for (let s = 0; s < r.length; s++) {
2834
- const o = r[s]._commands.get(e);
2835
- if (o !== void 0) {
2836
- const l = o[i];
2837
- if (l !== void 0) {
2838
- const a = Array.from(l), c = a.length;
2839
- for (let u = 0; u < c; u++) if (a[u](t, n) === !0) return !0;
2840
- }
2841
- }
2842
- }
2843
- return !1;
2844
- }
2845
2825
  function ci(n, e) {
2846
2826
  const t = n._updates;
2847
2827
  let r = e || !1;
@@ -2868,16 +2848,16 @@ function mr(n, e, t) {
2868
2848
  t !== void 0 && (i = t.onUpdate, cs(n, t.tag), s = t.skipTransforms || !1, o = t.discrete || !1), i && n._deferred.push(i);
2869
2849
  const l = n._editorState;
2870
2850
  let a = n._pendingEditorState, c = !1;
2871
- (a === null || a._readOnly) && (a = n._pendingEditorState = fs(a || l), c = !0), a._flushSync = o;
2872
- const u = J, d = X, f = K, _ = n._updating;
2873
- J = a, X = !1, n._updating = !0, K = n;
2851
+ (a === null || a._readOnly) && (a = n._pendingEditorState = us(a || l), c = !0), a._flushSync = o;
2852
+ const u = K, d = X, f = J, g = n._updating;
2853
+ K = a, X = !1, n._updating = !0, J = n;
2874
2854
  const h = n._headless || n.getRootElement() === null;
2875
2855
  try {
2876
2856
  c && (h ? l._selection !== null && (a._selection = l._selection.clone()) : a._selection = function(m, y) {
2877
2857
  const v = m.getEditorState()._selection, w = Ce(ie(m));
2878
2858
  return L(v) || v == null ? pn(v, w, m, y) : v.clone();
2879
2859
  }(n, t && t.event || null));
2880
- const g = n._compositionKey;
2860
+ const p = n._compositionKey;
2881
2861
  e(), s = ci(n, s), function(m, y) {
2882
2862
  const v = y.getEditorState()._selection, w = m._selection;
2883
2863
  if (L(w)) {
@@ -2892,7 +2872,7 @@ function mr(n, e, t) {
2892
2872
  const v = y._dirtyLeaves, w = m._nodeMap;
2893
2873
  for (const S of v) {
2894
2874
  const N = w.get(S);
2895
- P(N) && N.isAttached() && N.isSimpleText() && !N.isUnmergeable() && Ir(N);
2875
+ P(N) && N.isAttached() && N.isSimpleText() && !N.isUnmergeable() && Dr(N);
2896
2876
  }
2897
2877
  }(a, n) : function(m, y) {
2898
2878
  const v = y._dirtyLeaves, w = y._dirtyElements, S = m._nodeMap, N = ve(), b = /* @__PURE__ */ new Map();
@@ -2900,9 +2880,9 @@ function mr(n, e, t) {
2900
2880
  for (; F > 0 || W > 0; ) {
2901
2881
  if (F > 0) {
2902
2882
  y._dirtyLeaves = /* @__PURE__ */ new Set();
2903
- for (const D of C) {
2904
- const A = S.get(D);
2905
- P(A) && A.isAttached() && A.isSimpleText() && !A.isUnmergeable() && Ir(A), A !== void 0 && li(A, N) && oi(y, A, b), v.add(D);
2883
+ for (const I of C) {
2884
+ const A = S.get(I);
2885
+ P(A) && A.isAttached() && A.isSimpleText() && !A.isUnmergeable() && Dr(A), A !== void 0 && li(A, N) && oi(y, A, b), v.add(I);
2906
2886
  }
2907
2887
  if (C = y._dirtyLeaves, F = C.size, F > 0) {
2908
2888
  Vt++;
@@ -2910,8 +2890,8 @@ function mr(n, e, t) {
2910
2890
  }
2911
2891
  }
2912
2892
  y._dirtyLeaves = /* @__PURE__ */ new Set(), y._dirtyElements = /* @__PURE__ */ new Map(), O.delete("root") && O.set("root", !0);
2913
- for (const D of O) {
2914
- const A = D[0], z = D[1];
2893
+ for (const I of O) {
2894
+ const A = I[0], z = I[1];
2915
2895
  if (w.set(A, z), !z) continue;
2916
2896
  const $ = S.get(A);
2917
2897
  $ !== void 0 && li($, N) && oi(y, $, b);
@@ -2930,29 +2910,29 @@ function mr(n, e, t) {
2930
2910
  const F = N.get(C);
2931
2911
  F === void 0 || F.isAttached() || (S.has(C) || v.delete(C), N.delete(C));
2932
2912
  }
2933
- }(l, a, n._dirtyLeaves, n._dirtyElements)), g !== n._compositionKey && (a._flushSync = !0);
2913
+ }(l, a, n._dirtyLeaves, n._dirtyElements)), p !== n._compositionKey && (a._flushSync = !0);
2934
2914
  const x = a._selection;
2935
2915
  if (L(x)) {
2936
2916
  const m = a._nodeMap, y = x.anchor.key, v = x.focus.key;
2937
2917
  m.get(y) !== void 0 && m.get(v) !== void 0 || T(19);
2938
2918
  } else _r(x) && x._nodes.size === 0 && (a._selection = null);
2939
- } catch (g) {
2940
- return g instanceof Error && n._onError(g), n._pendingEditorState = l, n._dirtyType = nt, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements.clear(), void xe(n);
2919
+ } catch (p) {
2920
+ return p instanceof Error && n._onError(p), n._pendingEditorState = l, n._dirtyType = nt, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements.clear(), void xe(n);
2941
2921
  } finally {
2942
- J = u, X = d, K = f, n._updating = _, Vt = 0;
2922
+ K = u, X = d, J = f, n._updating = g, Vt = 0;
2943
2923
  }
2944
- n._dirtyType !== ze || n._deferred.length > 0 || function(g, x) {
2945
- const m = x.getEditorState()._selection, y = g._selection;
2924
+ n._dirtyType !== ze || n._deferred.length > 0 || function(p, x) {
2925
+ const m = x.getEditorState()._selection, y = p._selection;
2946
2926
  if (y !== null) {
2947
2927
  if (y.dirty || !y.is(m)) return !0;
2948
2928
  } else if (m !== null) return !0;
2949
2929
  return !1;
2950
- }(a, n) ? a._flushSync ? (a._flushSync = !1, xe(n)) : c && $o(() => {
2930
+ }(a, n) ? a._flushSync ? (a._flushSync = !1, xe(n)) : c && jo(() => {
2951
2931
  xe(n);
2952
2932
  }) : (a._flushSync = !1, c && (r.clear(), n._deferred = [], n._pendingEditorState = null));
2953
2933
  }
2954
- function ne(n, e, t) {
2955
- n._updating ? K === n ? e() : n._updates.push([e, t]) : mr(n, e, t);
2934
+ function Z(n, e, t) {
2935
+ J === n && t === void 0 ? e() : mr(n, e, t);
2956
2936
  }
2957
2937
  class xt {
2958
2938
  constructor(e, t, r) {
@@ -3057,7 +3037,7 @@ class mn extends gn {
3057
3037
  }
3058
3038
  getFormatType() {
3059
3039
  const e = this.getFormat();
3060
- return Vs[e] || "";
3040
+ return Us[e] || "";
3061
3041
  }
3062
3042
  getStyle() {
3063
3043
  return this.getLatest().__style;
@@ -3269,40 +3249,40 @@ class mn extends gn {
3269
3249
  }
3270
3250
  if (t > 0) {
3271
3251
  let h = d === null ? this.getFirstChild() : d.getNextSibling();
3272
- for (let p = 0; p < t; p++) {
3252
+ for (let _ = 0; _ < t; _++) {
3273
3253
  h === null && T(100);
3274
- const g = h.getNextSibling(), x = h.__key;
3275
- Ie(h.getWritable()), c.push(x), h = g;
3254
+ const p = h.getNextSibling(), x = h.__key;
3255
+ De(h.getWritable()), c.push(x), h = p;
3276
3256
  }
3277
3257
  }
3278
- let _ = d;
3258
+ let g = d;
3279
3259
  for (let h = 0; h < i; h++) {
3280
- const p = r[h];
3281
- _ !== null && p.is(_) && (d = _ = _.getPreviousSibling());
3282
- const g = p.getWritable();
3283
- g.__parent === l && f--, Ie(g);
3284
- const x = p.__key;
3285
- if (_ === null) o.__first = x, g.__prev = null;
3260
+ const _ = r[h];
3261
+ g !== null && _.is(g) && (d = g = g.getPreviousSibling());
3262
+ const p = _.getWritable();
3263
+ p.__parent === l && f--, De(p);
3264
+ const x = _.__key;
3265
+ if (g === null) o.__first = x, p.__prev = null;
3286
3266
  else {
3287
- const m = _.getWritable();
3288
- m.__next = x, g.__prev = m.__key;
3267
+ const m = g.getWritable();
3268
+ m.__next = x, p.__prev = m.__key;
3289
3269
  }
3290
- p.__key === l && T(76), g.__parent = l, a.push(x), _ = p;
3270
+ _.__key === l && T(76), p.__parent = l, a.push(x), g = _;
3291
3271
  }
3292
3272
  if (e + t === s)
3293
- _ !== null && (_.getWritable().__next = null, o.__last = _.__key);
3273
+ g !== null && (g.getWritable().__next = null, o.__last = g.__key);
3294
3274
  else if (u !== null) {
3295
3275
  const h = u.getWritable();
3296
- if (_ !== null) {
3297
- const p = _.getWritable();
3298
- h.__prev = _.__key, p.__next = u.__key;
3276
+ if (g !== null) {
3277
+ const _ = g.getWritable();
3278
+ h.__prev = g.__key, _.__next = u.__key;
3299
3279
  } else h.__prev = null;
3300
3280
  }
3301
3281
  if (o.__size = f, c.length) {
3302
3282
  const h = M();
3303
3283
  if (L(h)) {
3304
- const p = new Set(c), g = new Set(a), { anchor: x, focus: m } = h;
3305
- fi(x, p, g) && cn(x, x.getNode(), this, d, u), fi(m, p, g) && cn(m, m.getNode(), this, d, u), f !== 0 || this.canBeEmpty() || Ae(this) || this.remove();
3284
+ const _ = new Set(c), p = new Set(a), { anchor: x, focus: m } = h;
3285
+ fi(x, _, p) && cn(x, x.getNode(), this, d, u), fi(m, _, p) && cn(m, m.getNode(), this, d, u), f !== 0 || this.canBeEmpty() || Ae(this) || this.remove();
3306
3286
  }
3307
3287
  }
3308
3288
  return o;
@@ -3390,7 +3370,7 @@ function fi(n, e, t) {
3390
3370
  }
3391
3371
  return !1;
3392
3372
  }
3393
- class Ro extends gn {
3373
+ class Wo extends gn {
3394
3374
  decorate(e, t) {
3395
3375
  T(47);
3396
3376
  }
@@ -3404,8 +3384,8 @@ class Ro extends gn {
3404
3384
  return !0;
3405
3385
  }
3406
3386
  }
3407
- function I(n) {
3408
- return n instanceof Ro;
3387
+ function D(n) {
3388
+ return n instanceof Wo;
3409
3389
  }
3410
3390
  class Ft extends mn {
3411
3391
  static getType() {
@@ -3440,33 +3420,33 @@ class Ft extends mn {
3440
3420
  return !1;
3441
3421
  }
3442
3422
  splice(e, t, r) {
3443
- for (const i of r) k(i) || I(i) || T(282);
3423
+ for (const i of r) k(i) || D(i) || T(282);
3444
3424
  return super.splice(e, t, r);
3445
3425
  }
3446
3426
  static importJSON(e) {
3447
- return ee().updateFromJSON(e);
3427
+ return te().updateFromJSON(e);
3448
3428
  }
3449
3429
  collapseAtStart() {
3450
3430
  return !0;
3451
3431
  }
3452
3432
  }
3453
- function Z(n) {
3433
+ function ee(n) {
3454
3434
  return n instanceof Ft;
3455
3435
  }
3456
- function fs(n) {
3436
+ function us(n) {
3457
3437
  return new yn(new Map(n._nodeMap));
3458
3438
  }
3459
3439
  function yr() {
3460
3440
  return new yn(/* @__PURE__ */ new Map([["root", new Ft()]]));
3461
3441
  }
3462
- function ds(n) {
3442
+ function fs(n) {
3463
3443
  const e = n.exportJSON(), t = n.constructor;
3464
3444
  if (e.type !== t.getType() && T(130, t.name), k(n)) {
3465
3445
  const r = e.children;
3466
3446
  Array.isArray(r) || T(59, t.name);
3467
3447
  const i = n.getChildren();
3468
3448
  for (let s = 0; s < i.length; s++) {
3469
- const o = ds(i[s]);
3449
+ const o = fs(i[s]);
3470
3450
  r.push(o);
3471
3451
  }
3472
3452
  }
@@ -3487,10 +3467,10 @@ class yn {
3487
3467
  return t._readOnly = !0, t;
3488
3468
  }
3489
3469
  toJSON() {
3490
- return ai(null, this, () => ({ root: ds(ee()) }));
3470
+ return ai(null, this, () => ({ root: fs(te()) }));
3491
3471
  }
3492
3472
  }
3493
- class Ko extends mn {
3473
+ class Ro extends mn {
3494
3474
  static getType() {
3495
3475
  return "artificial";
3496
3476
  }
@@ -3513,7 +3493,7 @@ class Lt extends mn {
3513
3493
  return !1;
3514
3494
  }
3515
3495
  static importDOM() {
3516
- return { p: (e) => ({ conversion: Jo, priority: 0 }) };
3496
+ return { p: (e) => ({ conversion: Ko, priority: 0 }) };
3517
3497
  }
3518
3498
  exportDOM(e) {
3519
3499
  const { element: t } = super.exportDOM(e);
@@ -3545,59 +3525,59 @@ class Lt extends mn {
3545
3525
  return !1;
3546
3526
  }
3547
3527
  }
3548
- function Jo(n) {
3528
+ function Ko(n) {
3549
3529
  const e = Ne();
3550
- return n.style && (e.setFormat(n.style.textAlign), rl(n, e)), { node: e };
3530
+ return n.style && (e.setFormat(n.style.textAlign), nl(n, e)), { node: e };
3551
3531
  }
3552
3532
  function Ne() {
3553
3533
  return Tn(new Lt());
3554
3534
  }
3555
- function Ml(n) {
3535
+ function Ol(n) {
3556
3536
  return n instanceof Lt;
3557
3537
  }
3558
- const Dl = 0, Il = 1, zl = 3, Bl = 4;
3559
- function hs(n, e, t, r) {
3538
+ const Ml = 0, Il = 1, Dl = 3, zl = 4;
3539
+ function ds(n, e, t, r) {
3560
3540
  const i = n._keyToDOMMap;
3561
3541
  i.clear(), n._editorState = yr(), n._pendingEditorState = r, n._compositionKey = null, n._dirtyType = ze, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements.clear(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set(), n._updates = [], n._blockCursorElement = null;
3562
3542
  const s = n._observer;
3563
3543
  s !== null && (s.disconnect(), n._observer = null), e !== null && (e.textContent = ""), t !== null && (t.textContent = "", i.set("root", t));
3564
3544
  }
3565
- function Wl(n) {
3566
- const e = n || {}, t = Wo(), r = e.theme || {}, i = n === void 0 ? t : e.parentEditor || null, s = e.disableEvents || !1, o = yr(), l = e.namespace || (i !== null ? i._config.namespace : Cs()), a = e.editorState, c = [Ft, lt, Nt, Et, Lt, Ko, ...e.nodes || []], { onError: u, html: d } = e, f = e.editable === void 0 || e.editable;
3567
- let _;
3568
- if (n === void 0 && t !== null) _ = t._nodes;
3545
+ function Bl(n) {
3546
+ const e = n || {}, t = Bo(), r = e.theme || {}, i = n === void 0 ? t : e.parentEditor || null, s = e.disableEvents || !1, o = yr(), l = e.namespace || (i !== null ? i._config.namespace : Ss()), a = e.editorState, c = [Ft, lt, Nt, Et, Lt, Ro, ...e.nodes || []], { onError: u, html: d } = e, f = e.editable === void 0 || e.editable;
3547
+ let g;
3548
+ if (n === void 0 && t !== null) g = t._nodes;
3569
3549
  else {
3570
- _ = /* @__PURE__ */ new Map();
3571
- for (let p = 0; p < c.length; p++) {
3572
- let g = c[p], x = null, m = null;
3573
- if (typeof g != "function") {
3574
- const S = g;
3575
- g = S.replace, x = S.with, m = S.withKlass || null;
3550
+ g = /* @__PURE__ */ new Map();
3551
+ for (let _ = 0; _ < c.length; _++) {
3552
+ let p = c[_], x = null, m = null;
3553
+ if (typeof p != "function") {
3554
+ const S = p;
3555
+ p = S.replace, x = S.with, m = S.withKlass || null;
3576
3556
  }
3577
- const y = g.getType(), v = g.transform(), w = /* @__PURE__ */ new Set();
3578
- v !== null && w.add(v), _.set(y, { exportDOM: d && d.export ? d.export.get(g) : void 0, klass: g, replace: x, replaceWithKlass: m, transforms: w });
3557
+ const y = p.getType(), v = p.transform(), w = /* @__PURE__ */ new Set();
3558
+ v !== null && w.add(v), g.set(y, { exportDOM: d && d.export ? d.export.get(p) : void 0, klass: p, replace: x, replaceWithKlass: m, transforms: w });
3579
3559
  }
3580
3560
  }
3581
- const h = new xn(o, i, _, { disableEvents: s, namespace: l, theme: r }, u || console.error, function(p, g) {
3561
+ const h = new xn(o, i, g, { disableEvents: s, namespace: l, theme: r }, u || console.error, function(_, p) {
3582
3562
  const x = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Set(), y = (v) => {
3583
3563
  Object.keys(v).forEach((w) => {
3584
3564
  let S = x.get(w);
3585
3565
  S === void 0 && (S = [], x.set(w, S)), S.push(v[w]);
3586
3566
  });
3587
3567
  };
3588
- return p.forEach((v) => {
3568
+ return _.forEach((v) => {
3589
3569
  const w = v.klass.importDOM;
3590
3570
  if (w == null || m.has(w)) return;
3591
3571
  m.add(w);
3592
3572
  const S = w.call(v.klass);
3593
3573
  S !== null && y(S);
3594
- }), g && y(g), x;
3595
- }(_, d ? d.import : void 0), f, n);
3574
+ }), p && y(p), x;
3575
+ }(g, d ? d.import : void 0), f, n);
3596
3576
  return a !== void 0 && (h._pendingEditorState = a, h._dirtyType = nt), h;
3597
3577
  }
3598
3578
  class xn {
3599
3579
  constructor(e, t, r, i, s, o, l, a) {
3600
- this._createEditorArgs = a, this._parentEditor = t, this._rootElement = null, this._editorState = e, this._pendingEditorState = null, this._compositionKey = null, this._deferred = [], this._keyToDOMMap = /* @__PURE__ */ new Map(), this._updates = [], this._updating = !1, this._listeners = { decorator: /* @__PURE__ */ new Set(), editable: /* @__PURE__ */ new Set(), mutation: /* @__PURE__ */ new Map(), root: /* @__PURE__ */ new Set(), textcontent: /* @__PURE__ */ new Set(), update: /* @__PURE__ */ new Set() }, this._commands = /* @__PURE__ */ new Map(), this._config = i, this._nodes = r, this._decorators = {}, this._pendingDecorators = null, this._dirtyType = ze, this._cloneNotNeeded = /* @__PURE__ */ new Set(), this._dirtyLeaves = /* @__PURE__ */ new Set(), this._dirtyElements = /* @__PURE__ */ new Map(), this._normalizedNodes = /* @__PURE__ */ new Set(), this._updateTags = /* @__PURE__ */ new Set(), this._observer = null, this._key = Cs(), this._onError = s, this._htmlConversions = o, this._editable = l, this._headless = t !== null && t._headless, this._window = null, this._blockCursorElement = null;
3580
+ this._createEditorArgs = a, this._parentEditor = t, this._rootElement = null, this._editorState = e, this._pendingEditorState = null, this._compositionKey = null, this._deferred = [], this._keyToDOMMap = /* @__PURE__ */ new Map(), this._updates = [], this._updating = !1, this._listeners = { decorator: /* @__PURE__ */ new Set(), editable: /* @__PURE__ */ new Set(), mutation: /* @__PURE__ */ new Map(), root: /* @__PURE__ */ new Set(), textcontent: /* @__PURE__ */ new Set(), update: /* @__PURE__ */ new Set() }, this._commands = /* @__PURE__ */ new Map(), this._config = i, this._nodes = r, this._decorators = {}, this._pendingDecorators = null, this._dirtyType = ze, this._cloneNotNeeded = /* @__PURE__ */ new Set(), this._dirtyLeaves = /* @__PURE__ */ new Set(), this._dirtyElements = /* @__PURE__ */ new Map(), this._normalizedNodes = /* @__PURE__ */ new Set(), this._updateTags = /* @__PURE__ */ new Set(), this._observer = null, this._key = Ss(), this._onError = s, this._htmlConversions = o, this._editable = l, this._headless = t !== null && t._headless, this._window = null, this._blockCursorElement = null;
3601
3581
  }
3602
3582
  isComposing() {
3603
3583
  return this._compositionKey != null;
@@ -3714,42 +3694,42 @@ class xn {
3714
3694
  const t = this._rootElement;
3715
3695
  if (e !== t) {
3716
3696
  const r = et(this._config.theme, "root"), i = this._pendingEditorState || this._editorState;
3717
- if (this._rootElement = e, hs(this, t, e, i), t !== null && (this._config.disableEvents || wo(t), r != null && t.classList.remove(...r)), e !== null) {
3697
+ if (this._rootElement = e, ds(this, t, e, i), t !== null && (this._config.disableEvents || vo(t), r != null && t.classList.remove(...r)), e !== null) {
3718
3698
  const s = vr(e), o = e.style;
3719
3699
  o.userSelect = "text", o.whiteSpace = "pre-wrap", o.wordBreak = "break-word", e.setAttribute("data-lexical-editor", "true"), this._window = s, this._dirtyType = nt, Mi(this), this._updateTags.add("history-merge"), xe(this), this._config.disableEvents || function(l, a) {
3720
3700
  const c = l.ownerDocument, u = ln.get(c);
3721
3701
  (u === void 0 || u < 1) && c.addEventListener("selectionchange", Zi), ln.set(c, (u || 0) + 1), l.__lexicalEditor = a;
3722
3702
  const d = Yi(l);
3723
3703
  for (let f = 0; f < Xn.length; f++) {
3724
- const [_, h] = Xn[f], p = typeof h == "function" ? (g) => {
3725
- Ur(g) || ($r(g), (a.isEditable() || _ === "click") && h(g, a));
3726
- } : (g) => {
3727
- if (Ur(g)) return;
3728
- $r(g);
3704
+ const [g, h] = Xn[f], _ = typeof h == "function" ? (p) => {
3705
+ Ur(p) || ($r(p), (a.isEditable() || g === "click") && h(p, a));
3706
+ } : (p) => {
3707
+ if (Ur(p)) return;
3708
+ $r(p);
3729
3709
  const x = a.isEditable();
3730
- switch (_) {
3710
+ switch (g) {
3731
3711
  case "cut":
3732
- return x && E(a, Vi, g);
3712
+ return x && E(a, Vi, p);
3733
3713
  case "copy":
3734
- return E(a, Ui, g);
3714
+ return E(a, Ui, p);
3735
3715
  case "paste":
3736
- return x && E(a, Ji, g);
3716
+ return x && E(a, Ji, p);
3737
3717
  case "dragstart":
3738
- return x && E(a, So, g);
3718
+ return x && E(a, xo, p);
3739
3719
  case "dragover":
3740
- return x && E(a, Co, g);
3720
+ return x && E(a, So, p);
3741
3721
  case "dragend":
3742
- return x && E(a, ko, g);
3722
+ return x && E(a, Co, p);
3743
3723
  case "focus":
3744
- return x && E(a, bo, g);
3724
+ return x && E(a, ko, p);
3745
3725
  case "blur":
3746
- return x && E(a, To, g);
3726
+ return x && E(a, bo, p);
3747
3727
  case "drop":
3748
- return x && E(a, xo, g);
3728
+ return x && E(a, yo, p);
3749
3729
  }
3750
3730
  };
3751
- l.addEventListener(_, p), d.push(() => {
3752
- l.removeEventListener(_, p);
3731
+ l.addEventListener(g, _), d.push(() => {
3732
+ l.removeEventListener(g, _);
3753
3733
  });
3754
3734
  }
3755
3735
  }(e, this), r != null && e.classList.add(...r);
@@ -3766,21 +3746,21 @@ class xn {
3766
3746
  setEditorState(e, t) {
3767
3747
  e.isEmpty() && T(38);
3768
3748
  let r = e;
3769
- r._readOnly && (r = fs(e), r._selection = e._selection ? e._selection.clone() : null), Oi(this);
3749
+ r._readOnly && (r = us(e), r._selection = e._selection ? e._selection.clone() : null), Oi(this);
3770
3750
  const i = this._pendingEditorState, s = this._updateTags, o = t !== void 0 ? t.tag : null;
3771
3751
  i === null || i.isEmpty() || (o != null && s.add(o), xe(this)), this._pendingEditorState = r, this._dirtyType = nt, this._dirtyElements.set("root", !1), this._compositionKey = null, o != null && s.add(o), this._updating || xe(this);
3772
3752
  }
3773
3753
  parseEditorState(e, t) {
3774
3754
  return function(r, i, s) {
3775
- const o = yr(), l = J, a = X, c = K, u = i._dirtyElements, d = i._dirtyLeaves, f = i._cloneNotNeeded, _ = i._dirtyType;
3776
- i._dirtyElements = /* @__PURE__ */ new Map(), i._dirtyLeaves = /* @__PURE__ */ new Set(), i._cloneNotNeeded = /* @__PURE__ */ new Set(), i._dirtyType = 0, J = o, X = !1, K = i;
3755
+ const o = yr(), l = K, a = X, c = J, u = i._dirtyElements, d = i._dirtyLeaves, f = i._cloneNotNeeded, g = i._dirtyType;
3756
+ i._dirtyElements = /* @__PURE__ */ new Map(), i._dirtyLeaves = /* @__PURE__ */ new Set(), i._cloneNotNeeded = /* @__PURE__ */ new Set(), i._dirtyType = 0, K = o, X = !1, J = i;
3777
3757
  try {
3778
3758
  const h = i._nodes;
3779
3759
  pr(r.root, h), s && s(), o._readOnly = !0;
3780
3760
  } catch (h) {
3781
3761
  h instanceof Error && i._onError(h);
3782
3762
  } finally {
3783
- i._dirtyElements = u, i._dirtyLeaves = d, i._cloneNotNeeded = f, i._dirtyType = _, J = l, X = a, K = c;
3763
+ i._dirtyElements = u, i._dirtyLeaves = d, i._cloneNotNeeded = f, i._dirtyType = g, K = l, X = a, J = c;
3784
3764
  }
3785
3765
  return o;
3786
3766
  }(typeof e == "string" ? JSON.parse(e) : e, this, t);
@@ -3795,9 +3775,9 @@ class xn {
3795
3775
  }
3796
3776
  focus(e, t = {}) {
3797
3777
  const r = this._rootElement;
3798
- r !== null && (r.setAttribute("autocapitalize", "off"), ne(this, () => {
3799
- const i = M(), s = ee();
3800
- i !== null ? i.dirty = !0 : s.getChildrenSize() !== 0 && (t.defaultSelection === "rootStart" ? s.selectStart() : s.selectEnd()), qo("focus"), Ho(() => {
3778
+ r !== null && (r.setAttribute("autocapitalize", "off"), Z(this, () => {
3779
+ const i = M(), s = te();
3780
+ i !== null ? i.dirty || ne(i.clone()) : s.getChildrenSize() !== 0 && (t.defaultSelection === "rootStart" ? s.selectStart() : s.selectEnd()), Vo("focus"), qo(() => {
3801
3781
  r.removeAttribute("autocapitalize"), e && e();
3802
3782
  });
3803
3783
  }), this._pendingEditorState === null && r.removeAttribute("autocapitalize"));
@@ -3818,24 +3798,24 @@ class xn {
3818
3798
  return { editorState: this._editorState.toJSON() };
3819
3799
  }
3820
3800
  }
3821
- xn.version = "0.29.0+prod.esm";
3822
- let jo = 1;
3823
- const $o = typeof queueMicrotask == "function" ? queueMicrotask : (n) => {
3801
+ xn.version = "0.30.0+prod.esm";
3802
+ let Jo = 1;
3803
+ const jo = typeof queueMicrotask == "function" ? queueMicrotask : (n) => {
3824
3804
  Promise.resolve().then(n);
3825
3805
  };
3826
3806
  function di(n) {
3827
- return I(Sr(n));
3807
+ return D(Sr(n));
3828
3808
  }
3829
- function gs(n) {
3809
+ function hs(n) {
3830
3810
  const e = document.activeElement;
3831
3811
  if (!Y(e)) return !1;
3832
3812
  const t = e.nodeName;
3833
- return I(Sr(n)) && (t === "INPUT" || t === "TEXTAREA" || e.contentEditable === "true" && Cn(e) == null);
3813
+ return D(Sr(n)) && (t === "INPUT" || t === "TEXTAREA" || e.contentEditable === "true" && Cn(e) == null);
3834
3814
  }
3835
3815
  function Sn(n, e, t) {
3836
3816
  const r = n.getRootElement();
3837
3817
  try {
3838
- return r !== null && r.contains(e) && r.contains(t) && e !== null && !gs(e) && _s(e) === n;
3818
+ return r !== null && r.contains(e) && r.contains(t) && e !== null && !hs(e) && gs(e) === n;
3839
3819
  } catch {
3840
3820
  return !1;
3841
3821
  }
@@ -3843,7 +3823,7 @@ function Sn(n, e, t) {
3843
3823
  function xr(n) {
3844
3824
  return n instanceof xn;
3845
3825
  }
3846
- function _s(n) {
3826
+ function gs(n) {
3847
3827
  let e = n;
3848
3828
  for (; e != null; ) {
3849
3829
  const t = Cn(e);
@@ -3859,9 +3839,9 @@ function Qe(n) {
3859
3839
  return n.isToken() || n.isSegmented();
3860
3840
  }
3861
3841
  function ke(n) {
3862
- return Ot(n) && n.nodeType === Ds;
3842
+ return Ot(n) && n.nodeType === Ms;
3863
3843
  }
3864
- function Uo(n) {
3844
+ function $o(n) {
3865
3845
  return Ot(n) && n.nodeType === Is;
3866
3846
  }
3867
3847
  function rt(n) {
@@ -3878,16 +3858,16 @@ function un(n, e, t) {
3878
3858
  let i = n ^ r;
3879
3859
  return e === "subscript" ? i &= -65 : e === "superscript" ? i &= -33 : e === "lowercase" ? (i &= -513, i &= -1025) : e === "uppercase" ? (i &= -257, i &= -1025) : e === "capitalize" && (i &= -257, i &= -513), i;
3880
3860
  }
3881
- function Rl(n) {
3882
- return P(n) || Ze(n) || I(n);
3861
+ function Wl(n) {
3862
+ return P(n) || Ze(n) || D(n);
3883
3863
  }
3884
- function ps(n, e) {
3864
+ function _s(n, e) {
3885
3865
  if (e != null) return void (n.__key = e);
3886
3866
  H(), ls();
3887
- const t = B(), r = Le(), i = "" + jo++;
3867
+ const t = B(), r = Le(), i = "" + Jo++;
3888
3868
  r._nodeMap.set(i, n), k(n) ? t._dirtyElements.set(i, !0) : t._dirtyLeaves.add(i), t._cloneNotNeeded.add(i), t._dirtyType = Ei, n.__key = i;
3889
3869
  }
3890
- function Ie(n) {
3870
+ function De(n) {
3891
3871
  const e = n.getParent();
3892
3872
  if (e !== null) {
3893
3873
  const t = n.getWritable(), r = e.getWritable(), i = n.getPreviousSibling(), s = n.getNextSibling();
@@ -3954,7 +3934,7 @@ function j(n, e) {
3954
3934
  const t = (e || Le())._nodeMap.get(n);
3955
3935
  return t === void 0 ? null : t;
3956
3936
  }
3957
- function ms(n, e) {
3937
+ function ps(n, e) {
3958
3938
  const t = kn(n, B());
3959
3939
  return t !== void 0 ? j(t, e) : null;
3960
3940
  }
@@ -3964,26 +3944,26 @@ function kn(n, e) {
3964
3944
  function Sr(n, e) {
3965
3945
  let t = n;
3966
3946
  for (; t != null; ) {
3967
- const r = ms(t, e);
3947
+ const r = ps(t, e);
3968
3948
  if (r !== null) return r;
3969
3949
  t = At(t);
3970
3950
  }
3971
3951
  return null;
3972
3952
  }
3973
- function ys(n) {
3953
+ function ms(n) {
3974
3954
  const e = n._decorators, t = Object.assign({}, e);
3975
3955
  return n._pendingDecorators = t, t;
3976
3956
  }
3977
3957
  function hi(n) {
3978
- return n.read(() => ee().getTextContent());
3958
+ return n.read(() => te().getTextContent());
3979
3959
  }
3980
- function ee() {
3981
- return xs(Le());
3960
+ function te() {
3961
+ return ys(Le());
3982
3962
  }
3983
- function xs(n) {
3963
+ function ys(n) {
3984
3964
  return n._nodeMap.get("root");
3985
3965
  }
3986
- function re(n) {
3966
+ function ne(n) {
3987
3967
  H();
3988
3968
  const e = Le();
3989
3969
  n !== null && (n.dirty = !0, n.setCachedNodes(null)), e._selection = n;
@@ -4003,7 +3983,7 @@ function Xe(n) {
4003
3983
  function gi(n, e) {
4004
3984
  return e ? n.getTextContentSize() : 0;
4005
3985
  }
4006
- function Ss(n) {
3986
+ function xs(n) {
4007
3987
  return /[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(n);
4008
3988
  }
4009
3989
  function Cr(n) {
@@ -4012,10 +3992,10 @@ function Cr(n) {
4012
3992
  for (; t !== null; ) e.push(t), t = t._parentEditor;
4013
3993
  return e;
4014
3994
  }
4015
- function Cs() {
3995
+ function Ss() {
4016
3996
  return Math.random().toString(36).replace(/[^a-z]+/g, "").substring(0, 5);
4017
3997
  }
4018
- function ks(n) {
3998
+ function Cs(n) {
4019
3999
  return ke(n) ? n.nodeValue : null;
4020
4000
  }
4021
4001
  function kr(n, e, t) {
@@ -4024,7 +4004,7 @@ function kr(n, e, t) {
4024
4004
  const i = r.anchorNode;
4025
4005
  let { anchorOffset: s, focusOffset: o } = r;
4026
4006
  if (i !== null) {
4027
- let l = ks(i);
4007
+ let l = Cs(i);
4028
4008
  const a = Sr(i);
4029
4009
  if (l !== null && P(a)) {
4030
4010
  if (l === dn && t) {
@@ -4046,22 +4026,22 @@ function br(n, e, t, r, i) {
4046
4026
  if (l === "") {
4047
4027
  if (V(null), St || tt || Qt) s.remove();
4048
4028
  else {
4049
- const p = B();
4029
+ const _ = B();
4050
4030
  setTimeout(() => {
4051
- p.update(() => {
4031
+ _.update(() => {
4052
4032
  s.isAttached() && s.remove();
4053
4033
  });
4054
4034
  }, 20);
4055
4035
  }
4056
4036
  return;
4057
4037
  }
4058
- const c = s.getParent(), u = at(), d = s.getTextContentSize(), f = ve(), _ = s.getKey();
4059
- if (s.isToken() || f !== null && _ === f && !o || L(u) && (c !== null && !c.canInsertTextBefore() && u.anchor.offset === 0 || u.anchor.key === n.__key && u.anchor.offset === 0 && !s.canInsertTextBefore() && !o || u.focus.key === n.__key && u.focus.offset === d && !s.canInsertTextAfter() && !o)) return void s.markDirty();
4038
+ const c = s.getParent(), u = at(), d = s.getTextContentSize(), f = ve(), g = s.getKey();
4039
+ if (s.isToken() || f !== null && g === f && !o || L(u) && (c !== null && !c.canInsertTextBefore() && u.anchor.offset === 0 || u.anchor.key === n.__key && u.anchor.offset === 0 && !s.canInsertTextBefore() && !o || u.focus.key === n.__key && u.focus.offset === d && !s.canInsertTextAfter() && !o)) return void s.markDirty();
4060
4040
  const h = M();
4061
4041
  if (!L(h) || t === null || r === null) return void s.setTextContent(l);
4062
4042
  if (h.setTextNodeRange(s, t, s, r), s.isSegmented()) {
4063
- const p = U(s.getTextContent());
4064
- s.replace(p), s = p;
4043
+ const _ = U(s.getTextContent());
4044
+ s.replace(_), s = _;
4065
4045
  }
4066
4046
  s.setTextContent(l);
4067
4047
  }
@@ -4088,15 +4068,15 @@ function dt(n) {
4088
4068
  function yi(n, e, t) {
4089
4069
  return n.toLowerCase() === "a" && gt(e, t);
4090
4070
  }
4091
- function Kl(n) {
4092
- const e = ee();
4071
+ function Rl(n) {
4072
+ const e = te();
4093
4073
  if (L(n)) {
4094
4074
  const t = n.anchor, r = n.focus, i = t.getNode().getTopLevelElementOrThrow().getParentOrThrow();
4095
4075
  return t.set(i.getKey(), 0, "element"), r.set(i.getKey(), i.getChildrenSize(), "element"), Jn(n), n;
4096
4076
  }
4097
4077
  {
4098
4078
  const t = e.select(0, e.getChildrenSize());
4099
- return re(Jn(t)), t;
4079
+ return ne(Jn(t)), t;
4100
4080
  }
4101
4081
  }
4102
4082
  function et(n, e) {
@@ -4125,7 +4105,7 @@ function xi(n, e, t) {
4125
4105
  let i = t, s = n;
4126
4106
  return r !== null && (e && t === 0 ? (i = s.getIndexWithinParent(), s = r) : e || t !== s.getChildrenSize() || (i = s.getIndexWithinParent() + 1, s = r)), s.getChildAtIndex(e ? i - 1 : i);
4127
4107
  }
4128
- function Vo(n, e) {
4108
+ function Uo(n, e) {
4129
4109
  const t = n.offset;
4130
4110
  if (n.type === "element")
4131
4111
  return xi(n.getNode(), e, t);
@@ -4138,15 +4118,31 @@ function Vo(n, e) {
4138
4118
  }
4139
4119
  return null;
4140
4120
  }
4141
- function bs(n) {
4121
+ function ks(n) {
4142
4122
  const e = ie(n).event, t = e && e.inputType;
4143
4123
  return t === "insertFromPaste" || t === "insertFromPasteAsQuotation";
4144
4124
  }
4145
4125
  function E(n, e, t) {
4146
- return us(n, e, t);
4126
+ return function(r, i, s) {
4127
+ const o = Cr(r);
4128
+ for (let l = 4; l >= 0; l--) for (let a = 0; a < o.length; a++) {
4129
+ const c = o[a], u = c._commands.get(i);
4130
+ if (u !== void 0) {
4131
+ const d = u[l];
4132
+ if (d !== void 0) {
4133
+ const f = Array.from(d), g = f.length;
4134
+ let h = !1;
4135
+ if (Z(c, () => {
4136
+ for (let _ = 0; _ < g; _++) if (f[_](s, r)) return void (h = !0);
4137
+ }), h) return h;
4138
+ }
4139
+ }
4140
+ }
4141
+ return !1;
4142
+ }(n, e, t);
4147
4143
  }
4148
4144
  function bn(n) {
4149
- return !Z(n) && !n.isLastChild() && !n.isInline();
4145
+ return !ee(n) && !n.isLastChild() && !n.isInline();
4150
4146
  }
4151
4147
  function it(n, e) {
4152
4148
  const t = n._keyToDOMMap.get(e);
@@ -4154,15 +4150,15 @@ function it(n, e) {
4154
4150
  }
4155
4151
  function At(n) {
4156
4152
  const e = n.assignedSlot || n.parentElement;
4157
- return Zo(e) ? e.host : e;
4153
+ return Yo(e) ? e.host : e;
4158
4154
  }
4159
- function Ts(n) {
4160
- return Uo(n) ? n : Y(n) ? n.ownerDocument : null;
4155
+ function bs(n) {
4156
+ return $o(n) ? n : Y(n) ? n.ownerDocument : null;
4161
4157
  }
4162
- function qo(n) {
4158
+ function Vo(n) {
4163
4159
  H(), B()._updateTags.add(n);
4164
4160
  }
4165
- function Ho(n) {
4161
+ function qo(n) {
4166
4162
  H(), B()._deferred.push(n);
4167
4163
  }
4168
4164
  function nr(n, e) {
@@ -4174,17 +4170,17 @@ function nr(n, e) {
4174
4170
  return !1;
4175
4171
  }
4176
4172
  function vr(n) {
4177
- const e = Ts(n);
4173
+ const e = bs(n);
4178
4174
  return e ? e.defaultView : null;
4179
4175
  }
4180
4176
  function ie(n) {
4181
4177
  const e = n._window;
4182
4178
  return e === null && T(78), e;
4183
4179
  }
4184
- function Jl(n) {
4185
- return k(n) && n.isInline() || I(n) && n.isInline();
4180
+ function Kl(n) {
4181
+ return k(n) && n.isInline() || D(n) && n.isInline();
4186
4182
  }
4187
- function Go(n) {
4183
+ function Ho(n) {
4188
4184
  let e = n.getParentOrThrow();
4189
4185
  for (; e !== null; ) {
4190
4186
  if (Ae(e)) return e;
@@ -4193,11 +4189,11 @@ function Go(n) {
4193
4189
  return e;
4194
4190
  }
4195
4191
  function Ae(n) {
4196
- return Z(n) || k(n) && n.isShadowRoot();
4192
+ return ee(n) || k(n) && n.isShadowRoot();
4197
4193
  }
4198
- function Qo(n) {
4194
+ function Go(n) {
4199
4195
  const e = n.constructor.clone(n);
4200
- return ps(e, null), e;
4196
+ return _s(e, null), e;
4201
4197
  }
4202
4198
  function Tn(n) {
4203
4199
  const e = B(), t = n.constructor.getType(), r = e._nodes.get(t);
@@ -4210,14 +4206,14 @@ function Tn(n) {
4210
4206
  return n;
4211
4207
  }
4212
4208
  function zn(n, e) {
4213
- !Z(n.getParent()) || k(e) || I(e) || T(99);
4209
+ !ee(n.getParent()) || k(e) || D(e) || T(99);
4214
4210
  }
4215
- function Xo(n) {
4211
+ function Qo(n) {
4216
4212
  const e = j(n);
4217
4213
  return e === null && T(63, n), e;
4218
4214
  }
4219
4215
  function Bn(n) {
4220
- return (I(n) || k(n) && !n.canBeEmpty()) && !n.isInline();
4216
+ return (D(n) || k(n) && !n.canBeEmpty()) && !n.isInline();
4221
4217
  }
4222
4218
  function rr(n, e, t) {
4223
4219
  t.style.removeProperty("caret-color"), e._blockCursorElement = null;
@@ -4227,23 +4223,23 @@ function rr(n, e, t) {
4227
4223
  function Ce(n) {
4228
4224
  return le ? (n || window).getSelection() : null;
4229
4225
  }
4230
- function Yo(n) {
4226
+ function Xo(n) {
4231
4227
  const e = vr(n);
4232
4228
  return e ? e.getSelection() : null;
4233
4229
  }
4234
- function jl(n) {
4230
+ function Jl(n) {
4235
4231
  return Y(n) && n.tagName === "A";
4236
4232
  }
4237
4233
  function Y(n) {
4238
- return Ot(n) && n.nodeType === Ms;
4234
+ return Ot(n) && n.nodeType === Os;
4239
4235
  }
4240
4236
  function Ot(n) {
4241
4237
  return typeof n == "object" && n !== null && "nodeType" in n && typeof n.nodeType == "number";
4242
4238
  }
4243
- function Zo(n) {
4244
- return Ot(n) && n.nodeType === zs;
4239
+ function Yo(n) {
4240
+ return Ot(n) && n.nodeType === Ds;
4245
4241
  }
4246
- function el(n) {
4242
+ function Zo(n) {
4247
4243
  const e = new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/, "i");
4248
4244
  return n.nodeName.match(e) !== null;
4249
4245
  }
@@ -4252,7 +4248,7 @@ function Si(n) {
4252
4248
  return n.nodeName.match(e) !== null;
4253
4249
  }
4254
4250
  function Te(n) {
4255
- if (I(n) && !n.isInline()) return !0;
4251
+ if (D(n) && !n.isInline()) return !0;
4256
4252
  if (!k(n) || Ae(n)) return !1;
4257
4253
  const e = n.getFirstChild(), t = e === null || Ze(e) || P(e) || e.isInline();
4258
4254
  return !n.isInline() && n.canBeEmpty() !== !1 && t;
@@ -4262,12 +4258,12 @@ function Wn(n, e) {
4262
4258
  for (; t !== null && t.getParent() !== null && !e(t); ) t = t.getParentOrThrow();
4263
4259
  return e(t) ? t : null;
4264
4260
  }
4265
- function $l() {
4261
+ function jl() {
4266
4262
  return B();
4267
4263
  }
4268
- const Ci = /* @__PURE__ */ new WeakMap(), tl = /* @__PURE__ */ new Map();
4264
+ const Ci = /* @__PURE__ */ new WeakMap(), el = /* @__PURE__ */ new Map();
4269
4265
  function ki(n) {
4270
- if (!n._readOnly && n.isEmpty()) return tl;
4266
+ if (!n._readOnly && n.isEmpty()) return el;
4271
4267
  n._readOnly || T(192);
4272
4268
  let e = Ci.get(n);
4273
4269
  return e || (e = function(t) {
@@ -4280,27 +4276,27 @@ function ki(n) {
4280
4276
  return r;
4281
4277
  }(n), Ci.set(n, e)), e;
4282
4278
  }
4283
- function nl(n) {
4279
+ function tl(n) {
4284
4280
  const e = n.constructor.clone(n);
4285
4281
  return e.afterCloneFrom(n), e;
4286
4282
  }
4287
- function rl(n, e) {
4288
- const t = (parseInt(n.style.paddingInlineStart, 10) || 0) / 40;
4289
- e.setIndent(t);
4283
+ function nl(n, e) {
4284
+ const t = parseInt(n.style.paddingInlineStart, 10) || 0, r = Math.round(t / 40);
4285
+ e.setIndent(r);
4290
4286
  }
4291
- function Ul(n) {
4287
+ function $l(n) {
4292
4288
  n.__lexicalUnmanaged = !0;
4293
4289
  }
4294
- function il(n) {
4290
+ function rl(n) {
4295
4291
  return n.__lexicalUnmanaged === !0;
4296
4292
  }
4297
- const sl = { next: "previous", previous: "next" };
4293
+ const il = { next: "previous", previous: "next" };
4298
4294
  class wr {
4299
4295
  constructor(e) {
4300
4296
  this.origin = e;
4301
4297
  }
4302
4298
  [Symbol.iterator]() {
4303
- return ws({ hasNext: st, initial: this.getAdjacentCaret(), map: (e) => e, step: (e) => e.getAdjacentCaret() });
4299
+ return vs({ hasNext: st, initial: this.getAdjacentCaret(), map: (e) => e, step: (e) => e.getAdjacentCaret() });
4304
4300
  }
4305
4301
  getAdjacentCaret() {
4306
4302
  return q(this.getNodeAtCaret(), this.direction);
@@ -4343,7 +4339,7 @@ class wr {
4343
4339
  class vt extends wr {
4344
4340
  constructor() {
4345
4341
  super(...arguments);
4346
- te(this, "type", "child");
4342
+ re(this, "type", "child");
4347
4343
  }
4348
4344
  getLatest() {
4349
4345
  const t = this.origin.getLatest();
@@ -4369,17 +4365,17 @@ class vt extends wr {
4369
4365
  return this.isSameNodeCaret(t);
4370
4366
  }
4371
4367
  }
4372
- const ol = { root: Z, shadowRoot: Ae };
4368
+ const sl = { root: ee, shadowRoot: Ae };
4373
4369
  function qe(n) {
4374
- return sl[n];
4370
+ return il[n];
4375
4371
  }
4376
4372
  function Nr(n, e = "root") {
4377
- return ol[e](n) ? null : n;
4373
+ return sl[e](n) ? null : n;
4378
4374
  }
4379
4375
  class Re extends wr {
4380
4376
  constructor() {
4381
4377
  super(...arguments);
4382
- te(this, "type", "sibling");
4378
+ re(this, "type", "sibling");
4383
4379
  }
4384
4380
  getLatest() {
4385
4381
  const t = this.origin.getLatest();
@@ -4411,7 +4407,7 @@ class Re extends wr {
4411
4407
  class Ke extends wr {
4412
4408
  constructor(t, r) {
4413
4409
  super(t);
4414
- te(this, "type", "text");
4410
+ re(this, "type", "text");
4415
4411
  this.offset = r;
4416
4412
  }
4417
4413
  getLatest() {
@@ -4449,10 +4445,10 @@ function st(n) {
4449
4445
  function fe(n) {
4450
4446
  return n instanceof vt;
4451
4447
  }
4452
- const ll = { next: class extends Ke {
4448
+ const ol = { next: class extends Ke {
4453
4449
  constructor() {
4454
4450
  super(...arguments);
4455
- te(this, "direction", "next");
4451
+ re(this, "direction", "next");
4456
4452
  }
4457
4453
  getNodeAtCaret() {
4458
4454
  return this.origin.getNextSibling();
@@ -4463,7 +4459,7 @@ const ll = { next: class extends Ke {
4463
4459
  }, previous: class extends Ke {
4464
4460
  constructor() {
4465
4461
  super(...arguments);
4466
- te(this, "direction", "previous");
4462
+ re(this, "direction", "previous");
4467
4463
  }
4468
4464
  getNodeAtCaret() {
4469
4465
  return this.origin.getPreviousSibling();
@@ -4471,10 +4467,10 @@ const ll = { next: class extends Ke {
4471
4467
  insert(e) {
4472
4468
  return this.origin.insertBefore(e), this;
4473
4469
  }
4474
- } }, al = { next: class extends Re {
4470
+ } }, ll = { next: class extends Re {
4475
4471
  constructor() {
4476
4472
  super(...arguments);
4477
- te(this, "direction", "next");
4473
+ re(this, "direction", "next");
4478
4474
  }
4479
4475
  getNodeAtCaret() {
4480
4476
  return this.origin.getNextSibling();
@@ -4485,7 +4481,7 @@ const ll = { next: class extends Ke {
4485
4481
  }, previous: class extends Re {
4486
4482
  constructor() {
4487
4483
  super(...arguments);
4488
- te(this, "direction", "previous");
4484
+ re(this, "direction", "previous");
4489
4485
  }
4490
4486
  getNodeAtCaret() {
4491
4487
  return this.origin.getPreviousSibling();
@@ -4493,10 +4489,10 @@ const ll = { next: class extends Ke {
4493
4489
  insert(e) {
4494
4490
  return this.origin.insertBefore(e), this;
4495
4491
  }
4496
- } }, cl = { next: class extends vt {
4492
+ } }, al = { next: class extends vt {
4497
4493
  constructor() {
4498
4494
  super(...arguments);
4499
- te(this, "direction", "next");
4495
+ re(this, "direction", "next");
4500
4496
  }
4501
4497
  getNodeAtCaret() {
4502
4498
  return this.origin.getFirstChild();
@@ -4507,7 +4503,7 @@ const ll = { next: class extends Ke {
4507
4503
  }, previous: class extends vt {
4508
4504
  constructor() {
4509
4505
  super(...arguments);
4510
- te(this, "direction", "previous");
4506
+ re(this, "direction", "previous");
4511
4507
  }
4512
4508
  getNodeAtCaret() {
4513
4509
  return this.origin.getLastChild();
@@ -4517,30 +4513,36 @@ const ll = { next: class extends Ke {
4517
4513
  }
4518
4514
  } };
4519
4515
  function q(n, e) {
4520
- return n ? new al[e](n) : null;
4516
+ return n ? new ll[e](n) : null;
4521
4517
  }
4522
4518
  function Je(n, e, t) {
4523
- return n ? new ll[e](n, ot(n, t)) : null;
4519
+ return n ? new ol[e](n, ot(n, t)) : null;
4524
4520
  }
4525
4521
  function ot(n, e) {
4526
- const t = n.getTextContentSize(), r = e === "next" ? t : e === "previous" ? 0 : e;
4527
- return r >= 0 && r <= t || T(274, String(e), String(t)), r;
4522
+ const t = n.getTextContentSize();
4523
+ let r = e === "next" ? t : e === "previous" ? 0 : e;
4524
+ return (r < 0 || r > t) && (function(i, ...s) {
4525
+ const o = new URL("https://lexical.dev/docs/error"), l = new URLSearchParams();
4526
+ l.append("code", i);
4527
+ for (const a of s) l.append("v", a);
4528
+ o.search = l.toString(), console.warn(`Minified Lexical warning #${i}; visit ${o.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
4529
+ }(284, String(e), String(t), n.getKey()), r = r < 0 ? 0 : t), r;
4528
4530
  }
4529
4531
  function bi(n, e) {
4530
- return new fl(n, e);
4532
+ return new ul(n, e);
4531
4533
  }
4532
4534
  function Fe(n, e) {
4533
- return k(n) ? new cl[e](n) : null;
4535
+ return k(n) ? new al[e](n) : null;
4534
4536
  }
4535
- function ul(n) {
4537
+ function cl(n) {
4536
4538
  return n && n.getChildCaret() || n;
4537
4539
  }
4538
4540
  function Er(n) {
4539
- return n && ul(n.getAdjacentCaret());
4541
+ return n && cl(n.getAdjacentCaret());
4540
4542
  }
4541
4543
  class Pr {
4542
4544
  constructor(e, t, r) {
4543
- te(this, "type", "node-caret-range");
4545
+ re(this, "type", "node-caret-range");
4544
4546
  this.anchor = e, this.focus = t, this.direction = r;
4545
4547
  }
4546
4548
  getLatest() {
@@ -4566,15 +4568,15 @@ class Pr {
4566
4568
  }
4567
4569
  iterNodeCarets(e = "root") {
4568
4570
  const t = Ee(this.anchor) ? this.anchor.getSiblingCaret() : this.anchor.getLatest(), r = this.focus.getLatest(), i = Ee(r), s = (o) => o.isSameNodeCaret(r) ? null : Er(o) || o.getParentCaret(e);
4569
- return ws({ hasNext: (o) => o !== null && !(i && r.isSameNodeCaret(o)), initial: t.isSameNodeCaret(r) ? null : s(t), map: (o) => o, step: s });
4571
+ return vs({ hasNext: (o) => o !== null && !(i && r.isSameNodeCaret(o)), initial: t.isSameNodeCaret(r) ? null : s(t), map: (o) => o, step: s });
4570
4572
  }
4571
4573
  [Symbol.iterator]() {
4572
4574
  return this.iterNodeCarets("root");
4573
4575
  }
4574
4576
  }
4575
- class fl {
4577
+ class ul {
4576
4578
  constructor(e, t) {
4577
- te(this, "type", "slice");
4579
+ re(this, "type", "slice");
4578
4580
  this.caret = e, this.distance = t;
4579
4581
  }
4580
4582
  getSliceIndices() {
@@ -4593,16 +4595,16 @@ class fl {
4593
4595
  return Je(e.setTextContent(s.slice(0, r) + s.slice(i)), t, r);
4594
4596
  }
4595
4597
  }
4596
- function vs(n) {
4597
- return je(n, q(ee(), n.direction));
4598
+ function Ts(n) {
4599
+ return je(n, q(te(), n.direction));
4598
4600
  }
4599
- function dl(n) {
4601
+ function fl(n) {
4600
4602
  return je(n, n);
4601
4603
  }
4602
4604
  function je(n, e) {
4603
4605
  return n.direction !== e.direction && T(265), new Pr(n, e, n.direction);
4604
4606
  }
4605
- function ws(n) {
4607
+ function vs(n) {
4606
4608
  const { initial: e, hasNext: t, step: r, map: i } = n;
4607
4609
  let s = e;
4608
4610
  return { [Symbol.iterator]() {
@@ -4613,7 +4615,7 @@ function ws(n) {
4613
4615
  return s = r(s), o;
4614
4616
  } };
4615
4617
  }
4616
- function Ns(n, e) {
4618
+ function ws(n, e) {
4617
4619
  const t = qt(n.origin, e.origin);
4618
4620
  switch (t === null && T(275, n.origin.getKey(), e.origin.getKey()), t.type) {
4619
4621
  case "same": {
@@ -4627,10 +4629,10 @@ function Ns(n, e) {
4627
4629
  case "descendant":
4628
4630
  return e.type === "child" ? 1 : -1;
4629
4631
  case "branch":
4630
- return Es(t);
4632
+ return Ns(t);
4631
4633
  }
4632
4634
  }
4633
- function Es(n) {
4635
+ function Ns(n) {
4634
4636
  const { a: e, b: t } = n, r = e.__key, i = t.__key;
4635
4637
  let s = e, o = t;
4636
4638
  for (; s && o; s = s.getNextSibling(), o = o.getNextSibling()) {
@@ -4656,22 +4658,22 @@ function qt(n, e) {
4656
4658
  return null;
4657
4659
  }
4658
4660
  function $e(n, e) {
4659
- const { type: t, key: r, offset: i } = n, s = Xo(n.key);
4660
- return t === "text" ? (P(s) || T(266, s.getType(), r), Je(s, e, i)) : (k(s) || T(267, s.getType(), r), pl(s, n.offset, e));
4661
+ const { type: t, key: r, offset: i } = n, s = Qo(n.key);
4662
+ return t === "text" ? (P(s) || T(266, s.getType(), r), Je(s, e, i)) : (k(s) || T(267, s.getType(), r), _l(s, n.offset, e));
4661
4663
  }
4662
4664
  function wt(n, e) {
4663
4665
  const { origin: t, direction: r } = e, i = r === "next";
4664
4666
  Ee(e) ? n.set(t.getKey(), e.offset, "text") : st(e) ? P(t) ? n.set(t.getKey(), ot(t, r), "text") : n.set(t.getParentOrThrow().getKey(), t.getIndexWithinParent() + (i ? 1 : 0), "element") : (fe(e) && k(t) || T(268), n.set(t.getKey(), i ? 0 : t.getChildrenSize(), "element"));
4665
4667
  }
4666
- function hl(n) {
4668
+ function dl(n) {
4667
4669
  const e = M(), t = L(e) ? e : Io();
4668
- return Ht(t, n), re(t), t;
4670
+ return Ht(t, n), ne(t), t;
4669
4671
  }
4670
4672
  function Ht(n, e) {
4671
4673
  wt(n.anchor, e.anchor), wt(n.focus, e.focus);
4672
4674
  }
4673
4675
  function vi(n) {
4674
- const { anchor: e, focus: t } = n, r = $e(e, "next"), i = $e(t, "next"), s = Ns(r, i) <= 0 ? "next" : "previous";
4676
+ const { anchor: e, focus: t } = n, r = $e(e, "next"), i = $e(t, "next"), s = ws(r, i) <= 0 ? "next" : "previous";
4675
4677
  return je(Ue(r, s), Ue(i, s));
4676
4678
  }
4677
4679
  function Mt(n) {
@@ -4686,21 +4688,21 @@ function wi(n, e = "root") {
4686
4688
  function Rn(n) {
4687
4689
  return !!n && n.origin.isAttached();
4688
4690
  }
4689
- function gl(n, e = "removeEmptySlices") {
4691
+ function hl(n, e = "removeEmptySlices") {
4690
4692
  if (n.isCollapsed()) return n;
4691
4693
  const t = "root", r = "next";
4692
4694
  let i = e;
4693
- const s = Ps(n, r), o = wi(s.anchor, t), l = wi(s.focus.getFlipped(), t), a = /* @__PURE__ */ new Set(), c = [];
4695
+ const s = Es(n, r), o = wi(s.anchor, t), l = wi(s.focus.getFlipped(), t), a = /* @__PURE__ */ new Set(), c = [];
4694
4696
  for (const h of s.iterNodeCarets(t)) if (fe(h)) a.add(h.origin.getKey());
4695
4697
  else if (st(h)) {
4696
- const { origin: p } = h;
4697
- k(p) && !a.has(p.getKey()) || c.push(p);
4698
+ const { origin: _ } = h;
4699
+ k(_) && !a.has(_.getKey()) || c.push(_);
4698
4700
  }
4699
4701
  for (const h of c) h.remove();
4700
4702
  for (const h of s.getTextSlices()) {
4701
4703
  if (!h) continue;
4702
- const { origin: p } = h.caret, g = p.getTextContentSize(), x = Mt(q(p, r)), m = p.getMode();
4703
- if (Math.abs(h.distance) === g && i === "removeEmptySlices" || m === "token" && h.distance !== 0) x.remove();
4704
+ const { origin: _ } = h.caret, p = _.getTextContentSize(), x = Mt(q(_, r)), m = _.getMode();
4705
+ if (Math.abs(h.distance) === p && i === "removeEmptySlices" || m === "token" && h.distance !== 0) x.remove();
4704
4706
  else if (h.distance !== 0) {
4705
4707
  i = "removeEmptySlices";
4706
4708
  let y = h.removeTextSlice();
@@ -4721,9 +4723,9 @@ function gl(n, e = "removeEmptySlices") {
4721
4723
  d = ue(h);
4722
4724
  break;
4723
4725
  }
4724
- const f = function(h, p, g) {
4725
- if (!h || !p) return null;
4726
- const x = h.getParentAtCaret(), m = p.getParentAtCaret();
4726
+ const f = function(h, _, p) {
4727
+ if (!h || !_) return null;
4728
+ const x = h.getParentAtCaret(), m = _.getParentAtCaret();
4727
4729
  if (!x || !m) return null;
4728
4730
  const y = x.getParents().reverse();
4729
4731
  y.push(x);
@@ -4734,22 +4736,22 @@ function gl(n, e = "removeEmptySlices") {
4734
4736
  for (S = 0; S < w && y[S] === v[S]; S++) ;
4735
4737
  const N = (F, O) => {
4736
4738
  let W;
4737
- for (let D = S; D < F.length; D++) {
4738
- const A = F[D];
4739
+ for (let I = S; I < F.length; I++) {
4740
+ const A = F[I];
4739
4741
  if (Ae(A)) return;
4740
4742
  !W && O(A) && (W = A);
4741
4743
  }
4742
4744
  return W;
4743
- }, b = N(y, Te), C = b && N(v, (F) => g.has(F.getKey()) && Te(F));
4745
+ }, b = N(y, Te), C = b && N(v, (F) => p.has(F.getKey()) && Te(F));
4744
4746
  return b && C ? [b, C] : null;
4745
4747
  }(u, d, a);
4746
4748
  if (f) {
4747
- const [h, p] = f;
4748
- Fe(h, "previous").splice(0, p.getChildren()), p.remove();
4749
+ const [h, _] = f;
4750
+ Fe(h, "previous").splice(0, _.getChildren()), _.remove();
4749
4751
  }
4750
- const _ = [u, d, ...o, ...l].find(Rn);
4751
- if (_)
4752
- return dl(Ue(ue(_), n.direction));
4752
+ const g = [u, d, ...o, ...l].find(Rn);
4753
+ if (g)
4754
+ return fl(Ue(ue(g), n.direction));
4753
4755
  T(269, JSON.stringify(o.map((h) => h.origin.__key)));
4754
4756
  }
4755
4757
  function ue(n) {
@@ -4766,16 +4768,16 @@ function ue(n) {
4766
4768
  const r = e.getAdjacentCaret();
4767
4769
  return st(r) && P(r.origin) ? Je(r.origin, t, qe(t)) : e;
4768
4770
  }
4769
- function _l(n) {
4771
+ function gl(n) {
4770
4772
  return Ee(n) && n.offset !== ot(n.origin, n.direction);
4771
4773
  }
4772
4774
  function Ue(n, e) {
4773
4775
  return n.direction === e ? n : n.getFlipped();
4774
4776
  }
4775
- function Ps(n, e) {
4777
+ function Es(n, e) {
4776
4778
  return n.direction === e ? n : je(Ue(n.focus, e), Ue(n.anchor, e));
4777
4779
  }
4778
- function pl(n, e, t) {
4780
+ function _l(n, e, t) {
4779
4781
  let r = Fe(n, "next");
4780
4782
  for (let i = 0; i < e; i++) {
4781
4783
  const s = r.getAdjacentCaret();
@@ -4784,17 +4786,17 @@ function pl(n, e, t) {
4784
4786
  }
4785
4787
  return Ue(r, t);
4786
4788
  }
4787
- function ml(n) {
4789
+ function pl(n) {
4788
4790
  const { origin: e, offset: t, direction: r } = n;
4789
4791
  if (t === ot(e, r)) return n.getSiblingCaret();
4790
4792
  if (t === ot(e, qe(r))) return Mt(n.getSiblingCaret());
4791
4793
  const [i] = e.splitText(t);
4792
4794
  return P(i) || T(281), Ue(q(i, "next"), r);
4793
4795
  }
4794
- function yl(n, e) {
4796
+ function ml(n, e) {
4795
4797
  return !0;
4796
4798
  }
4797
- function Vl(n, { $copyElementNode: e = Qo, $splitTextPointCaretNext: t = ml, rootMode: r = "shadowRoot", $shouldSplit: i = yl } = {}) {
4799
+ function Ul(n, { $copyElementNode: e = Go, $splitTextPointCaretNext: t = pl, rootMode: r = "shadowRoot", $shouldSplit: i = ml } = {}) {
4798
4800
  if (Ee(n)) return t(n);
4799
4801
  const s = n.getParentCaret(r);
4800
4802
  if (s) {
@@ -4810,119 +4812,119 @@ function Vl(n, { $copyElementNode: e = Qo, $splitTextPointCaretNext: t = ml, roo
4810
4812
  return s;
4811
4813
  }
4812
4814
  export {
4813
- Jl as $,
4814
- zl as A,
4815
- Fe as B,
4815
+ Kl as $,
4816
+ sn as A,
4817
+ on as B,
4816
4818
  Jn as C,
4817
- on as D,
4818
- Dl as E,
4819
- rn as F,
4820
- _o as G,
4821
- Tn as H,
4822
- mo as I,
4819
+ rn as D,
4820
+ Il as E,
4821
+ Dl as F,
4822
+ Wl as G,
4823
+ zl as H,
4824
+ go as I,
4823
4825
  lt as J,
4824
- Vi as K,
4825
- Bl as L,
4826
+ po as K,
4827
+ _o as L,
4826
4828
  Ze as M,
4827
4829
  Ml as N,
4828
- De as O,
4829
- Il as P,
4830
- Rl as Q,
4831
- vl as R,
4832
- _t as S,
4833
- yo as T,
4830
+ Vi as O,
4831
+ Ie as P,
4832
+ Tl as Q,
4833
+ _t as R,
4834
+ mo as S,
4835
+ Ne as T,
4834
4836
  Ae as U,
4835
- bo as V,
4837
+ ko as V,
4836
4838
  Ki as W,
4837
4839
  U as X,
4838
4840
  P as Y,
4839
- Ce as Z,
4840
- Ll as _,
4841
+ wt as Z,
4842
+ Ce as _,
4841
4843
  M as a,
4842
- Io as a0,
4843
- Z as a1,
4844
- de as a2,
4845
- $e as a3,
4846
- _l as a4,
4847
- vs as a5,
4848
- st as a6,
4849
- fe as a7,
4850
- q as a8,
4851
- Er as a9,
4852
- gr as aA,
4853
- Ui as aB,
4854
- Ol as aC,
4855
- Sn as aD,
4856
- _r as aE,
4857
- Wl as aF,
4858
- go as aG,
4859
- gs as aH,
4844
+ Fl as a0,
4845
+ Io as a1,
4846
+ ee as a2,
4847
+ de as a3,
4848
+ $e as a4,
4849
+ gl as a5,
4850
+ Ts as a6,
4851
+ st as a7,
4852
+ fe as a8,
4853
+ q as a9,
4854
+ Yo as aA,
4855
+ gr as aB,
4856
+ Ui as aC,
4857
+ Al as aD,
4858
+ Sn as aE,
4859
+ Bl as aF,
4860
+ ho as aG,
4861
+ hs as aH,
4860
4862
  Kr as aI,
4861
- Kl as aJ,
4862
- Co as aK,
4863
- So as aL,
4864
- xo as aM,
4863
+ Rl as aJ,
4864
+ So as aK,
4865
+ xo as aL,
4866
+ yo as aM,
4865
4867
  Gn as aN,
4866
4868
  $t as aO,
4867
- Tl as aP,
4868
- Vo as aQ,
4869
- bl as aR,
4870
- kl as aS,
4871
- Al as aT,
4869
+ bl as aP,
4870
+ Uo as aQ,
4871
+ kl as aR,
4872
+ Cl as aS,
4873
+ Ll as aT,
4872
4874
  Rr as aU,
4873
- _s as aV,
4874
- Nl as aW,
4875
- wl as aX,
4876
- Pt as aa,
4877
- Be as ab,
4878
- Lt as ac,
4879
- Ji as ad,
4880
- ee as ae,
4881
- ws as af,
4882
- hl as ag,
4875
+ gs as aV,
4876
+ wl as aW,
4877
+ vl as aX,
4878
+ Er as aa,
4879
+ Pt as ab,
4880
+ Be as ac,
4881
+ Lt as ad,
4882
+ Ji as ae,
4883
+ te as af,
4884
+ vs as ag,
4883
4885
  dl as ah,
4884
- Ue as ai,
4885
- Vl as aj,
4886
- Ee as ak,
4887
- I as al,
4888
- Xr as am,
4889
- Te as an,
4890
- oo as ao,
4891
- Pl as ap,
4886
+ fl as ai,
4887
+ Ue as aj,
4888
+ Ul as ak,
4889
+ Ee as al,
4890
+ D as am,
4891
+ Xr as an,
4892
+ Te as ao,
4893
+ so as ap,
4892
4894
  El as aq,
4893
- ji as ar,
4894
- $i as as,
4895
- Ko as at,
4896
- Tt as au,
4897
- Fl as av,
4898
- Si as aw,
4899
- el as ax,
4900
- nl as ay,
4901
- Zo as az,
4895
+ Nl as ar,
4896
+ ji as as,
4897
+ $i as at,
4898
+ Ro as au,
4899
+ Tt as av,
4900
+ Pl as aw,
4901
+ Si as ax,
4902
+ Zo as ay,
4903
+ tl as az,
4902
4904
  Wr as b,
4903
4905
  L as c,
4904
- mn as d,
4905
- ue as e,
4906
- $l as f,
4907
- so as g,
4908
- k as h,
4909
- Cl as i,
4910
- Ot as j,
4911
- at as k,
4912
- j as l,
4913
- Ul as m,
4914
- jl as n,
4915
- Sl as o,
4916
- ho as p,
4917
- fo as q,
4918
- Y as r,
4919
- Sr as s,
4920
- wt as t,
4921
- re as u,
4922
- co as v,
4923
- Ne as w,
4924
- lo as x,
4925
- po as y,
4926
- sn as z
4906
+ k as d,
4907
+ Jl as e,
4908
+ mn as f,
4909
+ ne as g,
4910
+ jl as h,
4911
+ Sr as i,
4912
+ io as j,
4913
+ Sl as k,
4914
+ ue as l,
4915
+ at as m,
4916
+ Y as n,
4917
+ xl as o,
4918
+ $l as p,
4919
+ Tn as q,
4920
+ Ot as r,
4921
+ j as s,
4922
+ fo as t,
4923
+ _r as u,
4924
+ uo as v,
4925
+ Ol as w,
4926
+ ao as x,
4927
+ oo as y,
4928
+ Fe as z
4927
4929
  };
4928
- //# sourceMappingURL=Lexical.prod-CniF7zEE.js.map
4930
+ //# sourceMappingURL=Lexical.prod-CWyHQUEM.js.map