@uva-glass/component-library 3.0.10 → 3.0.12

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 (114) hide show
  1. package/dist/Column-BL3dsYxn.js +101 -0
  2. package/dist/{Column-BUyVh2Oo.js.map → Column-BL3dsYxn.js.map} +1 -1
  3. package/dist/{Lexical.prod-CoFvB6ST.js → Lexical.prod-pVkgOp1j.js} +6 -6
  4. package/dist/Lexical.prod-pVkgOp1j.js.map +1 -0
  5. package/dist/{LexicalClipboard.prod-BceK2u8q.js → LexicalClipboard.prod-DIvwPtmL.js} +4 -4
  6. package/dist/{LexicalClipboard.prod-BceK2u8q.js.map → LexicalClipboard.prod-DIvwPtmL.js.map} +1 -1
  7. package/dist/{LexicalLink.prod-DgAdBBH7.js → LexicalLink.prod-NMeHB9CR.js} +3 -3
  8. package/dist/{LexicalLink.prod-DgAdBBH7.js.map → LexicalLink.prod-NMeHB9CR.js.map} +1 -1
  9. package/dist/{LexicalList.prod-BsGg0KUo.js → LexicalList.prod-CicvwkCx.js} +10 -8
  10. package/dist/LexicalList.prod-CicvwkCx.js.map +1 -0
  11. package/dist/{LexicalSelection.prod-CajyzNb9.js → LexicalSelection.prod-mQvH0_ap.js} +2 -2
  12. package/dist/{LexicalSelection.prod-CajyzNb9.js.map → LexicalSelection.prod-mQvH0_ap.js.map} +1 -1
  13. package/dist/{LexicalTable.prod-CNsOdwua.js → LexicalTable.prod-Bb6g8CAC.js} +240 -231
  14. package/dist/LexicalTable.prod-Bb6g8CAC.js.map +1 -0
  15. package/dist/{LexicalUtils.prod-CqRL6ZhZ.js → LexicalUtils.prod-C_aSRWfh.js} +2 -2
  16. package/dist/{LexicalUtils.prod-CqRL6ZhZ.js.map → LexicalUtils.prod-C_aSRWfh.js.map} +1 -1
  17. package/dist/{TablePlugin-CFD5PSMc.js → TablePlugin-o1MveXq2.js} +4 -4
  18. package/dist/{TablePlugin-CFD5PSMc.js.map → TablePlugin-o1MveXq2.js.map} +1 -1
  19. package/dist/TimelineItem-DmrymETS.js +52 -0
  20. package/dist/TimelineItem-DmrymETS.js.map +1 -0
  21. package/dist/__mocks__/svgrMock.js.map +1 -1
  22. package/dist/assets/Column.css +1 -1
  23. package/dist/assets/TimelineItem.css +1 -0
  24. package/dist/assets/VarIndicator.css +1 -1
  25. package/dist/assets/variables.css +3 -3
  26. package/dist/components/Accordion/Accordion.test.js.map +1 -1
  27. package/dist/components/AccordionCard/AccordionCard.test.js.map +1 -1
  28. package/dist/components/ActionList/ActionList.test.js.map +1 -1
  29. package/dist/components/AppStatusBar/AppStatusBar.test.js.map +1 -1
  30. package/dist/components/Attention/Attention.test.js.map +1 -1
  31. package/dist/components/Backdrop/Backdrop.test.js.map +1 -1
  32. package/dist/components/Buttons/Button.test.js.map +1 -1
  33. package/dist/components/Buttons/LinkButton.test.js +1 -1
  34. package/dist/components/Buttons/LinkButton.test.js.map +1 -1
  35. package/dist/components/Buttons/MenuButton.test.js +1 -1
  36. package/dist/components/Buttons/MenuButton.test.js.map +1 -1
  37. package/dist/components/Card/Card.test.d.ts +0 -0
  38. package/dist/components/Card/Card.test.js +10 -0
  39. package/dist/components/Card/Card.test.js.map +1 -0
  40. package/dist/components/Checkbox/Checkbox.test.d.ts +0 -0
  41. package/dist/components/Checkbox/Checkbox.test.js +16 -0
  42. package/dist/components/Checkbox/Checkbox.test.js.map +1 -0
  43. package/dist/components/CheckboxButton/CheckboxButton.test.d.ts +0 -0
  44. package/dist/components/CheckboxButton/CheckboxButton.test.js +51 -0
  45. package/dist/components/CheckboxButton/CheckboxButton.test.js.map +1 -0
  46. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.d.ts +0 -0
  47. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +90 -0
  48. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js.map +1 -0
  49. package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
  50. package/dist/components/FormInput/FormInput.js +1 -1
  51. package/dist/components/GridRow/Column/Column.js +1 -1
  52. package/dist/components/GridRow/Column/index.js +1 -1
  53. package/dist/components/GridRow/GridRow.js +1 -1
  54. package/dist/components/InputField/InputField.stories.js +1 -1
  55. package/dist/components/Label/Label.test.js.map +1 -1
  56. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  57. package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
  58. package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
  59. package/dist/components/MultiSelect/index.js +1 -1
  60. package/dist/components/OverlayStepBar/OverlayStepBar.js +1 -1
  61. package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
  62. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
  63. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  64. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +1 -1
  65. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +2 -2
  66. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +2 -2
  67. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
  68. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +4 -4
  69. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  70. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +3 -3
  71. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +3 -3
  72. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
  73. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +3 -3
  74. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +2 -2
  75. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  76. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +3 -3
  77. package/dist/components/RteEditor/Plugins/index.js +1 -1
  78. package/dist/components/RteEditor/RteEditor.js +31 -31
  79. package/dist/components/RteEditor/helpers.js +4 -4
  80. package/dist/components/Timeline/Timeline.d.ts +28 -0
  81. package/dist/components/Timeline/Timeline.js +29 -0
  82. package/dist/components/Timeline/Timeline.js.map +1 -0
  83. package/dist/components/Timeline/Timeline.stories.d.ts +5 -0
  84. package/dist/components/Timeline/Timeline.stories.js +43 -0
  85. package/dist/components/Timeline/Timeline.stories.js.map +1 -0
  86. package/dist/components/Timeline/Timeline.test.d.ts +0 -0
  87. package/dist/components/Timeline/Timeline.test.js +80 -0
  88. package/dist/components/Timeline/Timeline.test.js.map +1 -0
  89. package/dist/components/Timeline/TimelineItem.d.ts +2 -0
  90. package/dist/components/Timeline/TimelineItem.js +7 -0
  91. package/dist/components/Timeline/TimelineItem.js.map +1 -0
  92. package/dist/components/Timeline/index.d.ts +1 -0
  93. package/dist/components/Timeline/index.js +5 -0
  94. package/dist/components/Timeline/index.js.map +1 -0
  95. package/dist/components/Timeline/mockTimelineItem.d.ts +30 -0
  96. package/dist/components/Timeline/mockTimelineItem.js +95 -0
  97. package/dist/components/Timeline/mockTimelineItem.js.map +1 -0
  98. package/dist/components/VarIndicator/VarIndicator.js +11 -11
  99. package/dist/components/VarIndicator/VarIndicator.js.map +1 -1
  100. package/dist/components/VarIndicator/VarIndicator.stories.js.map +1 -1
  101. package/dist/components/VarIndicator/VarIndicator.test.js.map +1 -1
  102. package/dist/components/index.d.ts +1 -0
  103. package/dist/components/index.js +23 -21
  104. package/dist/components/index.js.map +1 -1
  105. package/dist/{helpers-C-JeRM2f.js → helpers-CtrLGKFA.js} +4 -4
  106. package/dist/{helpers-C-JeRM2f.js.map → helpers-CtrLGKFA.js.map} +1 -1
  107. package/dist/index.js +23 -21
  108. package/dist/index.js.map +1 -1
  109. package/dist/setupTests.js.map +1 -1
  110. package/package.json +8 -8
  111. package/dist/Column-BUyVh2Oo.js +0 -101
  112. package/dist/Lexical.prod-CoFvB6ST.js.map +0 -1
  113. package/dist/LexicalList.prod-BsGg0KUo.js.map +0 -1
  114. package/dist/LexicalTable.prod-CNsOdwua.js.map +0 -1
@@ -1,6 +1,6 @@
1
- import { h as N, e as X, T as mt, n as ie, $ as kt, A as $t, P as Ct, w as Mt, E as zt } from "./LexicalUtils.prod-CqRL6ZhZ.js";
2
- import { f as Pe, e as be, U as Be, d as P, T as j, O as Lt, X as de, Q as He, _ as Pt, h as pt, r as V, i as Bt, N as Ke, j as _t, l as z, o as Ht, n as ce, a as L, k as ye, m as Wt, p as Dt, q as It, u as Jt, F as Ae, L as Xt, v as Yt, x as St, y as qt, z as I, A as Ut, B as jt, G as Vt, I as Qt, J as Gt, K as Zt, M as en, P as tn, S as ne, V as Ze, g as q, W as xe, Y as nn, b as wt, Z as on, w as bt, a0 as rn, $ as ln, a1 as Ne, a2 as sn, a3 as an, a4 as et, a5 as cn, a6 as tt, D as un, a7 as nt, s as ot, c as Ce, a8 as hn, C as dn, a9 as fn, aa as gn } from "./Lexical.prod-CoFvB6ST.js";
3
- import { _ as mn, M as Cn } from "./LexicalClipboard.prod-BceK2u8q.js";
1
+ import { h as N, e as X, T as pt, n as se, $ as Mt, A as zt, P as _t, w as Lt, E as Pt } from "./LexicalUtils.prod-C_aSRWfh.js";
2
+ import { f as Pe, e as we, U as Be, d as P, T as j, O as Bt, X as he, Q as He, _ as Ht, h as St, r as V, i as Wt, N as Ke, j as wt, l as z, o as Dt, n as ae, a as L, k as be, m as It, p as Jt, q as Xt, u as Yt, F as Ae, L as qt, v as Ut, x as bt, y as jt, z as I, A as Vt, B as Qt, G as Gt, I as Zt, J as en, K as tn, M as nn, P as on, S as ne, V as Ze, g as q, W as xe, Y as rn, b as yt, Z as ln, w as Nt, a0 as sn, $ as an, a1 as ye, a2 as cn, a3 as un, a4 as et, a5 as hn, a6 as tt, D as dn, a7 as nt, s as ot, c as me, a8 as fn, C as gn, a9 as mn, aa as Cn } from "./Lexical.prod-pVkgOp1j.js";
3
+ import { _ as pn, M as _n } from "./LexicalClipboard.prod-DIvwPtmL.js";
4
4
  const We = /^(\d+(?:\.\d+)?)px$/, D = { BOTH: 3, COLUMN: 2, NO_STATUS: 0, ROW: 1 };
5
5
  class Z extends Pe {
6
6
  static getType() {
@@ -16,7 +16,7 @@ class Z extends Pe {
16
16
  return { td: (e) => ({ conversion: rt, priority: 0 }), th: (e) => ({ conversion: rt, priority: 0 }) };
17
17
  }
18
18
  static importJSON(e) {
19
- return fe().updateFromJSON(e);
19
+ return de().updateFromJSON(e);
20
20
  }
21
21
  updateFromJSON(e) {
22
22
  return super.updateFromJSON(e).setHeaderStyles(e.headerState).setColSpan(e.colSpan || 1).setRowSpan(e.rowSpan || 1).setWidth(e.width || void 0).setBackgroundColor(e.backgroundColor || null).setVerticalAlign(e.verticalAlign || void 0);
@@ -30,7 +30,7 @@ class Z extends Pe {
30
30
  }
31
31
  exportDOM(e) {
32
32
  const t = super.exportDOM(e);
33
- if (be(t.element)) {
33
+ if (we(t.element)) {
34
34
  const o = t.element;
35
35
  o.setAttribute("data-temporary-table-cell-lexical-key", this.getKey()), o.style.border = "1px solid black", this.__colSpan > 1 && (o.colSpan = this.__colSpan), this.__rowSpan > 1 && (o.rowSpan = this.__rowSpan), o.style.width = `${this.getWidth() || 75}px`, o.style.verticalAlign = this.getVerticalAlign() || "top", o.style.textAlign = "start", this.__backgroundColor === null && this.hasHeader() && (o.style.backgroundColor = "#f2f3f5");
36
36
  }
@@ -117,7 +117,7 @@ function rt(n) {
117
117
  const e = n, t = n.nodeName.toLowerCase();
118
118
  let o;
119
119
  We.test(e.style.width) && (o = parseFloat(e.style.width));
120
- const r = fe(t === "th" ? D.ROW : D.NO_STATUS, e.colSpan, o);
120
+ const r = de(t === "th" ? D.ROW : D.NO_STATUS, e.colSpan, o);
121
121
  r.__rowSpan = e.rowSpan;
122
122
  const s = e.style.backgroundColor;
123
123
  s !== "" && (r.__backgroundColor = s);
@@ -127,34 +127,34 @@ function rt(n) {
127
127
  return { after: (i) => (i.length === 0 && i.push(j()), i), forChild: (i, u) => {
128
128
  if (S(u) && !P(i)) {
129
129
  const g = j();
130
- return Lt(i) && i.getTextContent() === `
131
- ` ? null : (de(i) && (f && i.toggleFormat("bold"), h && i.toggleFormat("strikethrough"), C && i.toggleFormat("italic"), p && i.toggleFormat("underline")), g.append(i), g);
130
+ return Bt(i) && i.getTextContent() === `
131
+ ` ? null : (he(i) && (f && i.toggleFormat("bold"), h && i.toggleFormat("strikethrough"), C && i.toggleFormat("italic"), p && i.toggleFormat("underline")), g.append(i), g);
132
132
  }
133
133
  return i;
134
134
  }, node: r };
135
135
  }
136
- function fe(n = D.NO_STATUS, e = 1, t) {
136
+ function de(n = D.NO_STATUS, e = 1, t) {
137
137
  return Be(new Z(n, e, t));
138
138
  }
139
139
  function S(n) {
140
140
  return n instanceof Z;
141
141
  }
142
- const pn = Ht();
142
+ const Sn = Dt();
143
143
  function w(n, ...e) {
144
144
  const t = new URL("https://lexical.dev/docs/error"), o = new URLSearchParams();
145
145
  o.append("code", n);
146
146
  for (const r of e) o.append("v", r);
147
147
  throw t.search = o.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.`);
148
148
  }
149
- class ge extends Pe {
149
+ class fe extends Pe {
150
150
  static getType() {
151
151
  return "tablerow";
152
152
  }
153
153
  static clone(e) {
154
- return new ge(e.__height, e.__key);
154
+ return new fe(e.__height, e.__key);
155
155
  }
156
156
  static importDOM() {
157
- return { tr: (e) => ({ conversion: _n, priority: 0 }) };
157
+ return { tr: (e) => ({ conversion: wn, priority: 0 }) };
158
158
  }
159
159
  static importJSON(e) {
160
160
  return De().updateFromJSON(e);
@@ -196,55 +196,55 @@ class ge extends Pe {
196
196
  return !1;
197
197
  }
198
198
  }
199
- function _n(n) {
199
+ function wn(n) {
200
200
  const e = n;
201
201
  let t;
202
- return We.test(e.style.height) && (t = parseFloat(e.style.height)), { after: (o) => mt(o, S), node: De(t) };
202
+ return We.test(e.style.height) && (t = parseFloat(e.style.height)), { after: (o) => pt(o, S), node: De(t) };
203
203
  }
204
204
  function De(n) {
205
- return Be(new ge(n));
205
+ return Be(new fe(n));
206
206
  }
207
207
  function k(n) {
208
- return n instanceof ge;
208
+ return n instanceof fe;
209
209
  }
210
- const Ie = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Sn = Ie && "documentMode" in document ? document.documentMode : null, wn = Ie && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);
211
- function bn(n, e, t = !0) {
210
+ const Ie = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, bn = Ie && "documentMode" in document ? document.documentMode : null, lt = Ie && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);
211
+ function yn(n, e, t = !0) {
212
212
  const o = qe();
213
213
  for (let r = 0; r < n; r++) {
214
214
  const s = De();
215
215
  for (let l = 0; l < e; l++) {
216
216
  let a = D.NO_STATUS;
217
217
  typeof t == "object" ? (r === 0 && t.rows && (a |= D.ROW), l === 0 && t.columns && (a |= D.COLUMN)) : t && (r === 0 && (a |= D.ROW), l === 0 && (a |= D.COLUMN));
218
- const c = fe(a), f = j();
218
+ const c = de(a), f = j();
219
219
  f.append(He()), c.append(f), s.append(c);
220
220
  }
221
221
  o.append(s);
222
222
  }
223
223
  return o;
224
224
  }
225
- function Jn(n) {
225
+ function Xn(n) {
226
226
  const e = N(n, (t) => S(t));
227
227
  return S(e) ? e : null;
228
228
  }
229
- function yt(n) {
229
+ function xt(n) {
230
230
  const e = N(n, (t) => k(t));
231
231
  if (k(e)) return e;
232
232
  throw new Error("Expected table cell to be inside of table row.");
233
233
  }
234
- function yn(n) {
234
+ function Nn(n) {
235
235
  const e = N(n, (t) => K(t));
236
236
  if (K(e)) return e;
237
237
  throw new Error("Expected table cell to be inside of table.");
238
238
  }
239
- function Xn(n) {
240
- const e = yt(n);
241
- return yn(e).getChildren().findIndex((t) => t.is(e));
242
- }
243
239
  function Yn(n) {
244
- return yt(n).getChildren().findIndex((e) => e.is(n));
240
+ const e = xt(n);
241
+ return Nn(e).getChildren().findIndex((t) => t.is(e));
242
+ }
243
+ function qn(n) {
244
+ return xt(n).getChildren().findIndex((e) => e.is(n));
245
245
  }
246
- Ie && "InputEvent" in window && !Sn && new window.InputEvent("input");
247
- function qn(n, e) {
246
+ Ie && "InputEvent" in window && !bn && new window.InputEvent("input");
247
+ function Un(n, e) {
248
248
  const t = n.getChildren();
249
249
  for (let o = 0; o < t.length; o++) {
250
250
  const r = t[o];
@@ -315,7 +315,7 @@ function $e(n, e, t) {
315
315
  } while (o);
316
316
  return { maxColumn: l, maxRow: a, minColumn: r, minRow: s };
317
317
  }
318
- function lt(n) {
318
+ function st(n) {
319
319
  const [e, , t] = oe(n), o = t.getChildren(), r = o.length, s = o[0].getChildren().length, l = new Array(r);
320
320
  for (let a = 0; a < r; a++) l[a] = new Array(s);
321
321
  for (let a = 0; a < r; a++) {
@@ -331,7 +331,7 @@ function lt(n) {
331
331
  }
332
332
  return null;
333
333
  }
334
- function st(n) {
334
+ function it(n) {
335
335
  const [[e, t, o, r], [s, l, a, c]] = ["anchor", "focus"].map((f) => {
336
336
  const h = n[f].getNode(), C = N(h, S);
337
337
  S(C) || w(238, f, h.getKey(), h.getType());
@@ -368,7 +368,7 @@ class Te {
368
368
  this.dirty = this.dirty || e !== this.tableKey || t !== this.anchor.key || o !== this.focus.key, this.tableKey = e, this.anchor.key = t, this.focus.key = o, this._cachedNodes = null;
369
369
  }
370
370
  clone() {
371
- return new Te(this.tableKey, Ne(this.anchor.key, this.anchor.offset, this.anchor.type), Ne(this.focus.key, this.focus.offset, this.focus.type));
371
+ return new Te(this.tableKey, ye(this.anchor.key, this.anchor.offset, this.anchor.type), ye(this.focus.key, this.focus.offset, this.focus.type));
372
372
  }
373
373
  isCollapsed() {
374
374
  return !1;
@@ -384,19 +384,19 @@ class Te {
384
384
  let t = 0;
385
385
  this.getNodes().filter(S).forEach((r) => {
386
386
  const s = r.getFirstChild();
387
- bt(s) && (t |= s.getTextFormat());
387
+ Nt(s) && (t |= s.getTextFormat());
388
388
  });
389
- const o = gn[e];
389
+ const o = Cn[e];
390
390
  return !!(t & o);
391
391
  }
392
392
  insertNodes(e) {
393
393
  const t = this.focus.getNode();
394
- P(t) || w(151), dn(t.select(0, t.getChildrenSize())).insertNodes(e);
394
+ P(t) || w(151), gn(t.select(0, t.getChildrenSize())).insertNodes(e);
395
395
  }
396
396
  getShape() {
397
- const { anchorCell: e, focusCell: t } = st(this), o = lt(e);
397
+ const { anchorCell: e, focusCell: t } = it(this), o = st(e);
398
398
  o === null && w(153);
399
- const r = lt(t);
399
+ const r = st(t);
400
400
  r === null && w(155);
401
401
  const s = Math.min(o.columnIndex, r.columnIndex), l = Math.max(o.columnIndex + o.colSpan - 1, r.columnIndex + r.colSpan - 1), a = Math.min(o.rowIndex, r.rowIndex), c = Math.max(o.rowIndex + o.rowSpan - 1, r.rowIndex + r.rowSpan - 1);
402
402
  return { fromX: Math.min(s, l), fromY: Math.min(a, c), toX: Math.max(s, l), toY: Math.max(a, c) };
@@ -405,7 +405,7 @@ class Te {
405
405
  if (!this.isValid()) return [];
406
406
  const e = this._cachedNodes;
407
407
  if (e !== null) return e;
408
- const { anchorTable: t, anchorCell: o, focusCell: r } = st(this), s = r.getParents()[1];
408
+ const { anchorTable: t, anchorCell: o, focusCell: r } = it(this), s = r.getParents()[1];
409
409
  if (s !== t) {
410
410
  if (t.isParentOf(r)) {
411
411
  const d = s.getParent();
@@ -420,12 +420,12 @@ class Te {
420
420
  let u = null;
421
421
  for (let d = C; d <= p; d++) for (let m = f; m <= h; m++) {
422
422
  const { cell: _ } = l[d][m], b = _.getParent();
423
- k(b) || w(160), b !== u && (i.set(b.getKey(), b), u = b), i.has(_.getKey()) || xn(_, (y) => {
423
+ k(b) || w(160), b !== u && (i.set(b.getKey(), b), u = b), i.has(_.getKey()) || Tn(_, (y) => {
424
424
  i.set(y.getKey(), y);
425
425
  });
426
426
  }
427
427
  const g = Array.from(i.values());
428
- return fn() || (this._cachedNodes = g), g;
428
+ return mn() || (this._cachedNodes = g), g;
429
429
  }
430
430
  getTextContent() {
431
431
  const e = this.getNodes().filter((o) => S(o));
@@ -441,29 +441,29 @@ class Te {
441
441
  function v(n) {
442
442
  return n instanceof Te;
443
443
  }
444
- function Nt() {
445
- const n = Ne("root", 0, "element"), e = Ne("root", 0, "element");
444
+ function Tt() {
445
+ const n = ye("root", 0, "element"), e = ye("root", 0, "element");
446
446
  return new Te("root", n, e);
447
447
  }
448
- function Nn(n, e, t) {
448
+ function xn(n, e, t) {
449
449
  n.getKey(), e.getKey(), t.getKey();
450
- const o = L(), r = v(o) ? o.clone() : Nt();
450
+ const o = L(), r = v(o) ? o.clone() : Tt();
451
451
  return r.set(n.getKey(), e.getKey(), t.getKey()), r;
452
452
  }
453
- function xn(n, e) {
453
+ function Tn(n, e) {
454
454
  const t = [[n]];
455
455
  for (let o = t.at(-1); o !== void 0 && t.length > 0; o = t.at(-1)) {
456
456
  const r = o.pop();
457
457
  r === void 0 ? t.pop() : e(r) !== !1 && P(r) && t.push(r.getChildren());
458
458
  }
459
459
  }
460
- function xt(n, e = pt()) {
461
- const t = ye(n);
460
+ function Ft(n, e = St()) {
461
+ const t = be(n);
462
462
  K(t) || w(231, n);
463
463
  const o = Q(t, e.getElementByKey(n));
464
464
  return o === null && w(232, n), { tableElement: o, tableNode: t };
465
465
  }
466
- class Tn {
466
+ class Fn {
467
467
  constructor(e, t) {
468
468
  this.isHighlightingCells = !1, this.anchorX = -1, this.anchorY = -1, this.focusX = -1, this.focusY = -1, this.listenersToRemove = /* @__PURE__ */ new Set(), this.tableNodeKey = t, this.editor = e, this.table = { columns: 0, domRows: [], rows: 0 }, this.tableSelection = null, this.anchorCellNodeKey = null, this.focusCellNodeKey = null, this.anchorCell = null, this.focusCell = null, this.hasHijackedSelectionStyles = !1, this.isSelecting = !1, this.shouldCheckSelection = !1, this.abortController = new AbortController(), this.listenerOptions = { signal: this.abortController.signal }, this.nextFocus = null, this.trackTable();
469
469
  }
@@ -474,7 +474,7 @@ class Tn {
474
474
  this.abortController.abort("removeListeners"), Array.from(this.listenersToRemove).forEach((e) => e()), this.listenersToRemove.clear();
475
475
  }
476
476
  $lookup() {
477
- return xt(this.tableNodeKey, this.editor);
477
+ return Ft(this.tableNodeKey, this.editor);
478
478
  }
479
479
  trackTable() {
480
480
  const e = new MutationObserver((t) => {
@@ -489,23 +489,23 @@ class Tn {
489
489
  }
490
490
  if (!o) return;
491
491
  const { tableNode: r, tableElement: s } = this.$lookup();
492
- this.table = le(r, s);
492
+ this.table = re(r, s);
493
493
  }, { editor: this.editor });
494
494
  });
495
495
  this.editor.getEditorState().read(() => {
496
496
  const { tableNode: t, tableElement: o } = this.$lookup();
497
- this.table = le(t, o), e.observe(o, { attributes: !0, childList: !0, subtree: !0 });
497
+ this.table = re(t, o), e.observe(o, { attributes: !0, childList: !0, subtree: !0 });
498
498
  }, { editor: this.editor });
499
499
  }
500
500
  $clearHighlight() {
501
501
  const e = this.editor;
502
502
  this.isHighlightingCells = !1, this.anchorX = -1, this.anchorY = -1, this.focusX = -1, this.focusY = -1, this.tableSelection = null, this.anchorCellNodeKey = null, this.focusCellNodeKey = null, this.anchorCell = null, this.focusCell = null, this.hasHijackedSelectionStyles = !1, this.$enableHighlightStyle();
503
503
  const { tableNode: t, tableElement: o } = this.$lookup();
504
- pe(e, le(t, o), null), L() !== null && (q(null), e.dispatchCommand(ne, void 0));
504
+ Ce(e, re(t, o), null), L() !== null && (q(null), e.dispatchCommand(ne, void 0));
505
505
  }
506
506
  $enableHighlightStyle() {
507
507
  const e = this.editor, { tableElement: t } = this.$lookup();
508
- ie(t, e._config.theme.tableSelection), t.classList.remove("disable-selection"), this.hasHijackedSelectionStyles = !1;
508
+ se(t, e._config.theme.tableSelection), t.classList.remove("disable-selection"), this.hasHijackedSelectionStyles = !1;
509
509
  }
510
510
  $disableHighlightStyle() {
511
511
  const { tableElement: e } = this.$lookup();
@@ -515,7 +515,7 @@ class Tn {
515
515
  if (e !== null) {
516
516
  e.tableKey !== this.tableNodeKey && w(233, e.tableKey, this.tableNodeKey);
517
517
  const t = this.editor;
518
- this.tableSelection = e, this.isHighlightingCells = !0, this.$disableHighlightStyle(), this.updateDOMSelection(), pe(t, this.table, this.tableSelection);
518
+ this.tableSelection = e, this.isHighlightingCells = !0, this.$disableHighlightStyle(), this.updateDOMSelection(), Ce(t, this.table, this.tableSelection);
519
519
  } else this.$clearHighlight();
520
520
  }
521
521
  setShouldCheckSelection() {
@@ -544,19 +544,19 @@ class Tn {
544
544
  } else this.isHighlightingCells = !0, this.$disableHighlightStyle();
545
545
  if (this.focusX = s, this.focusY = l, this.isHighlightingCells) {
546
546
  const a = ze(r, e.elem);
547
- if (this.tableSelection != null && this.anchorCellNodeKey != null && a !== null) return this.focusCellNodeKey = a.getKey(), this.tableSelection = Nn(r, this.$getAnchorTableCellOrThrow(), a), q(this.tableSelection), o.dispatchCommand(ne, void 0), pe(o, this.table, this.tableSelection), !0;
547
+ if (this.tableSelection != null && this.anchorCellNodeKey != null && a !== null) return this.focusCellNodeKey = a.getKey(), this.tableSelection = xn(r, this.$getAnchorTableCellOrThrow(), a), q(this.tableSelection), o.dispatchCommand(ne, void 0), Ce(o, this.table, this.tableSelection), !0;
548
548
  }
549
549
  return !1;
550
550
  }
551
551
  $getAnchorTableCell() {
552
- return this.anchorCellNodeKey ? ye(this.anchorCellNodeKey) : null;
552
+ return this.anchorCellNodeKey ? be(this.anchorCellNodeKey) : null;
553
553
  }
554
554
  $getAnchorTableCellOrThrow() {
555
555
  const e = this.$getAnchorTableCell();
556
556
  return e === null && w(234), e;
557
557
  }
558
558
  $getFocusTableCell() {
559
- return this.focusCellNodeKey ? ye(this.focusCellNodeKey) : null;
559
+ return this.focusCellNodeKey ? be(this.focusCellNodeKey) : null;
560
560
  }
561
561
  $getFocusTableCellOrThrow() {
562
562
  const e = this.$getFocusTableCell();
@@ -567,21 +567,21 @@ class Tn {
567
567
  const { tableNode: t } = this.$lookup(), o = ze(t, e.elem);
568
568
  if (o !== null) {
569
569
  const r = o.getKey();
570
- this.tableSelection = this.tableSelection != null ? this.tableSelection.clone() : Nt(), this.anchorCellNodeKey = r;
570
+ this.tableSelection = this.tableSelection != null ? this.tableSelection.clone() : Tt(), this.anchorCellNodeKey = r;
571
571
  }
572
572
  }
573
573
  $formatCells(e) {
574
574
  const t = L();
575
575
  v(t) || w(236);
576
- const o = on(), r = o.anchor, s = o.focus, l = t.getNodes().filter(S);
576
+ const o = ln(), r = o.anchor, s = o.focus, l = t.getNodes().filter(S);
577
577
  l.length > 0 || w(237);
578
- const a = l[0].getFirstChild(), c = bt(a) ? a.getFormatFlags(e, null) : null;
578
+ const a = l[0].getFirstChild(), c = Nt(a) ? a.getFormatFlags(e, null) : null;
579
579
  l.forEach((f) => {
580
580
  r.set(f.getKey(), 0, "element"), s.set(f.getKey(), f.getChildrenSize(), "element"), o.formatText(e, c);
581
581
  }), q(t), this.editor.dispatchCommand(ne, void 0);
582
582
  }
583
583
  $clearText() {
584
- const { editor: e } = this, t = ye(this.tableNodeKey);
584
+ const { editor: e } = this, t = be(this.tableNodeKey);
585
585
  if (!K(t)) throw new Error("Expected TableNode.");
586
586
  const o = L();
587
587
  v(o) || w(253);
@@ -589,7 +589,7 @@ class Tn {
589
589
  if (r.length === this.table.columns * this.table.rows) {
590
590
  t.selectPrevious();
591
591
  const s = t.getParent();
592
- return t.remove(), void (rn(s) && s.isEmpty() && e.dispatchCommand(wt, void 0));
592
+ return t.remove(), void (sn(s) && s.isEmpty() && e.dispatchCommand(yt, void 0));
593
593
  }
594
594
  r.forEach((s) => {
595
595
  if (P(s)) {
@@ -598,10 +598,10 @@ class Tn {
598
598
  c !== l && c.remove();
599
599
  });
600
600
  }
601
- }), pe(e, this.table, null), q(null), e.dispatchCommand(ne, void 0);
601
+ }), Ce(e, this.table, null), q(null), e.dispatchCommand(ne, void 0);
602
602
  }
603
603
  }
604
- const Me = "__lexicalTableSelection", Fn = (n) => !(1 & ~n.buttons);
604
+ const Me = "__lexicalTableSelection", vn = (n) => !(1 & ~n.buttons);
605
605
  function Q(n, e) {
606
606
  if (!e) return e;
607
607
  const t = e.nodeName === "TABLE" ? e : n.getDOMSlot(e).element;
@@ -610,45 +610,44 @@ function Q(n, e) {
610
610
  function Xe(n) {
611
611
  return n._window;
612
612
  }
613
- function ue(n, e) {
613
+ function ce(n, e) {
614
614
  for (let t = e, o = null; t !== null; t = t.getParent()) {
615
615
  if (n.is(t)) return o;
616
616
  S(t) && (o = t);
617
617
  }
618
618
  return null;
619
619
  }
620
- const vn = [[Wt, "down"], [Dt, "up"], [It, "backward"], [Jt, "forward"]], Rn = [Yt, St, qt], Kn = [Ut, jt];
621
- function An(n, e, t, o) {
620
+ const Rn = [[It, "down"], [Jt, "up"], [Xt, "backward"], [Yt, "forward"]], Kn = [Ut, bt, jt], An = [Vt, Qt];
621
+ function On(n, e, t, o) {
622
622
  const r = t.getRootElement(), s = Xe(t);
623
623
  r !== null && s !== null || w(246);
624
- const l = new Tn(t, n.getKey()), a = Q(n, e);
624
+ const l = new Fn(t, n.getKey()), a = Q(n, e);
625
625
  (function(i, u) {
626
- it(i) !== null && w(205), i[Me] = u;
626
+ at(i) !== null && w(205), i[Me] = u;
627
627
  })(a, l), l.listenersToRemove.add(() => function(i, u) {
628
- it(i) === u && delete i[Me];
628
+ at(i) === u && delete i[Me];
629
629
  }(a, l));
630
630
  const c = (i) => {
631
- if (i.button !== 0 || !ce(i.target) || !s) return;
632
- const u = re(i.target);
631
+ if (i.button !== 0 || !ae(i.target) || !s) return;
632
+ const u = Ne(i.target);
633
633
  u !== null && t.update(() => {
634
634
  const g = Ze();
635
- if (wn && i.shiftKey && J(g, n) && (z(g) || v(g))) {
636
- const d = g.anchor.getNode(), m = ue(n, g.anchor.getNode());
637
- m ? (l.$setAnchorCellForSelection(he(l, m)), l.$setFocusCellForSelection(u), Y(i)) : (n.isBefore(d) ? n.selectStart() : n.selectEnd()).anchor.set(g.anchor.key, g.anchor.offset, g.anchor.type);
635
+ if (lt && i.shiftKey && J(g, n) && (z(g) || v(g))) {
636
+ const d = g.anchor.getNode(), m = ce(n, g.anchor.getNode());
637
+ m ? (l.$setAnchorCellForSelection(ue(l, m)), l.$setFocusCellForSelection(u), Y(i)) : (n.isBefore(d) ? n.selectStart() : n.selectEnd()).anchor.set(g.anchor.key, g.anchor.offset, g.anchor.type);
638
638
  } else l.$setAnchorCellForSelection(u);
639
639
  }), (() => {
640
640
  if (l.isSelecting) return;
641
641
  const g = () => {
642
642
  l.isSelecting = !1, s.removeEventListener("mouseup", g), s.removeEventListener("mousemove", d);
643
643
  }, d = (m) => {
644
- if (!ce(m.target)) return;
645
- if (!Fn(m) && l.isSelecting) return l.isSelecting = !1, s.removeEventListener("mouseup", g), void s.removeEventListener("mousemove", d);
646
- const _ = !a.contains(m.target);
647
- let b = null;
648
- if (_) {
649
- for (const y of document.elementsFromPoint(m.clientX, m.clientY)) if (b = a.contains(y) ? re(y) : null, b) break;
650
- } else b = re(m.target);
651
- !b || l.focusCell !== null && b.elem === l.focusCell.elem || (l.setNextFocus({ focusCell: b, override: _ }), t.dispatchCommand(ne, void 0));
644
+ if (!vn(m) && l.isSelecting) return l.isSelecting = !1, s.removeEventListener("mouseup", g), void s.removeEventListener("mousemove", d);
645
+ if (!ae(m.target)) return;
646
+ let _ = null;
647
+ const b = !(lt || a.contains(m.target));
648
+ if (b) _ = ct(a, m.target);
649
+ else for (const y of document.elementsFromPoint(m.clientX, m.clientY)) if (_ = ct(a, y), _) break;
650
+ !_ || l.focusCell !== null && _.elem === l.focusCell.elem || (l.setNextFocus({ focusCell: _, override: b }), t.dispatchCommand(ne, void 0));
652
651
  };
653
652
  l.isSelecting = !0, s.addEventListener("mouseup", g, l.listenerOptions), s.addEventListener("mousemove", d, l.listenerOptions);
654
653
  })();
@@ -657,14 +656,14 @@ function An(n, e, t, o) {
657
656
  a.removeEventListener("mousedown", c);
658
657
  });
659
658
  const f = (i) => {
660
- i.detail >= 3 && ce(i.target) && re(i.target) !== null && i.preventDefault();
659
+ i.detail >= 3 && ae(i.target) && Ne(i.target) !== null && i.preventDefault();
661
660
  };
662
661
  a.addEventListener("mousedown", f, l.listenerOptions), l.listenersToRemove.add(() => {
663
662
  a.removeEventListener("mousedown", f);
664
663
  });
665
664
  const h = (i) => {
666
665
  const u = i.target;
667
- i.button === 0 && ce(u) && t.update(() => {
666
+ i.button === 0 && ae(u) && t.update(() => {
668
667
  const g = L();
669
668
  v(g) && g.tableKey === l.tableNodeKey && r.contains(u) && l.$clearHighlight();
670
669
  });
@@ -672,11 +671,11 @@ function An(n, e, t, o) {
672
671
  s.addEventListener("mousedown", h, l.listenerOptions), l.listenersToRemove.add(() => {
673
672
  s.removeEventListener("mousedown", h);
674
673
  });
675
- for (const [i, u] of vn) l.listenersToRemove.add(t.registerCommand(i, (g) => vt(t, g, u, n, l), Ae));
676
- l.listenersToRemove.add(t.registerCommand(Xt, (i) => {
674
+ for (const [i, u] of Rn) l.listenersToRemove.add(t.registerCommand(i, (g) => Kt(t, g, u, n, l), Ae));
675
+ l.listenersToRemove.add(t.registerCommand(qt, (i) => {
677
676
  const u = L();
678
677
  if (v(u)) {
679
- const g = ue(n, u.focus.getNode());
678
+ const g = ce(n, u.focus.getNode());
680
679
  if (g !== null) return Y(i), g.selectEnd(), !0;
681
680
  }
682
681
  return !1;
@@ -686,16 +685,16 @@ function An(n, e, t, o) {
686
685
  if (!J(u, n)) return !1;
687
686
  if (v(u)) return l.$clearText(), !0;
688
687
  if (z(u)) {
689
- if (!S(ue(n, u.anchor.getNode()))) return !1;
688
+ if (!S(ce(n, u.anchor.getNode()))) return !1;
690
689
  const g = u.anchor.getNode(), d = u.focus.getNode(), m = n.isParentOf(g), _ = n.isParentOf(d);
691
690
  if (m && !_ || _ && !m) return l.$clearText(), !0;
692
691
  const b = N(u.anchor.getNode(), (F) => P(F)), y = b && N(b, (F) => P(F) && S(F.getParent()));
693
692
  if (!P(y) || !P(b)) return !1;
694
- if (i === St && y.getPreviousSibling() === null) return !0;
693
+ if (i === bt && y.getPreviousSibling() === null) return !0;
695
694
  }
696
695
  return !1;
697
696
  };
698
- for (const i of Rn) l.listenersToRemove.add(t.registerCommand(i, C(i), I));
697
+ for (const i of Kn) l.listenersToRemove.add(t.registerCommand(i, C(i), I));
699
698
  const p = (i) => {
700
699
  const u = L();
701
700
  if (!v(u) && !z(u)) return !1;
@@ -706,17 +705,17 @@ function An(n, e, t, o) {
706
705
  }
707
706
  return !!J(u, n) && !!v(u) && (i && (i.preventDefault(), i.stopPropagation()), l.$clearText(), !0);
708
707
  };
709
- for (const i of Kn) l.listenersToRemove.add(t.registerCommand(i, p, I));
710
- return l.listenersToRemove.add(t.registerCommand(Vt, (i) => {
708
+ for (const i of An) l.listenersToRemove.add(t.registerCommand(i, p, I));
709
+ return l.listenersToRemove.add(t.registerCommand(Gt, (i) => {
711
710
  const u = L();
712
711
  if (u) {
713
712
  if (!v(u) && !z(u)) return !1;
714
- mn(t, zt(i, ClipboardEvent) ? i : null, Cn(u));
713
+ pn(t, Pt(i, ClipboardEvent) ? i : null, _n(u));
715
714
  const g = p(i);
716
715
  return z(u) ? (u.removeText(), !0) : g;
717
716
  }
718
717
  return !1;
719
- }, I)), l.listenersToRemove.add(t.registerCommand(Qt, (i) => {
718
+ }, I)), l.listenersToRemove.add(t.registerCommand(Zt, (i) => {
720
719
  const u = L();
721
720
  if (!J(u, n)) return !1;
722
721
  if (v(u)) return l.$formatCells(i), !0;
@@ -725,7 +724,7 @@ function An(n, e, t, o) {
725
724
  if (!S(g)) return !1;
726
725
  }
727
726
  return !1;
728
- }, I)), l.listenersToRemove.add(t.registerCommand(Gt, (i) => {
727
+ }, I)), l.listenersToRemove.add(t.registerCommand(en, (i) => {
729
728
  const u = L();
730
729
  if (!v(u) || !J(u, n)) return !1;
731
730
  const g = u.anchor.getNode(), d = u.focus.getNode();
@@ -752,7 +751,7 @@ function An(n, e, t, o) {
752
751
  }
753
752
  }
754
753
  return !0;
755
- }, I)), l.listenersToRemove.add(t.registerCommand(Zt, (i) => {
754
+ }, I)), l.listenersToRemove.add(t.registerCommand(tn, (i) => {
756
755
  const u = L();
757
756
  if (!J(u, n)) return !1;
758
757
  if (v(u)) return l.$clearHighlight(), !1;
@@ -760,16 +759,16 @@ function An(n, e, t, o) {
760
759
  const g = N(u.anchor.getNode(), (d) => S(d));
761
760
  if (!S(g)) return !1;
762
761
  if (typeof i == "string") {
763
- const d = ut(t, u, n);
764
- if (d) return ct(d, n, [He(i)]), !0;
762
+ const d = dt(t, u, n);
763
+ if (d) return ht(d, n, [He(i)]), !0;
765
764
  }
766
765
  }
767
766
  return !1;
768
- }, I)), o && l.listenersToRemove.add(t.registerCommand(en, (i) => {
767
+ }, I)), o && l.listenersToRemove.add(t.registerCommand(nn, (i) => {
769
768
  const u = L();
770
769
  if (!z(u) || !u.isCollapsed() || !J(u, n)) return !1;
771
- const g = we(u.anchor.getNode());
772
- return !(g === null || !n.is(se(g))) && (Y(i), function(d, m) {
770
+ const g = Se(u.anchor.getNode());
771
+ return !(g === null || !n.is(le(g))) && (Y(i), function(d, m) {
773
772
  const _ = m === "next" ? "getNextSibling" : "getPreviousSibling", b = m === "next" ? "getFirstChild" : "getLastChild", y = d[_]();
774
773
  if (P(y)) return y.selectEnd();
775
774
  const F = N(d, k);
@@ -781,29 +780,29 @@ function An(n, e, t, o) {
781
780
  const T = N(F, K);
782
781
  T === null && w(248), m === "next" ? T.selectNext() : T.selectPrevious();
783
782
  }(g, i.shiftKey ? "previous" : "next"), !0);
784
- }, I)), l.listenersToRemove.add(t.registerCommand(tn, (i) => n.isSelected(), Ae)), l.listenersToRemove.add(t.registerCommand(_t, (i) => {
783
+ }, I)), l.listenersToRemove.add(t.registerCommand(on, (i) => n.isSelected(), Ae)), l.listenersToRemove.add(t.registerCommand(wt, (i) => {
785
784
  const { nodes: u, selection: g } = i, d = g.getStartEndPoints(), m = v(g), _ = z(g) && N(g.anchor.getNode(), (H) => S(H)) !== null && N(g.focus.getNode(), (H) => S(H)) !== null || m;
786
785
  if (u.length !== 1 || !K(u[0]) || !_ || d === null) return !1;
787
786
  const [b] = d, y = u[0], F = y.getChildren(), T = y.getFirstChildOrThrow().getChildrenSize(), $ = y.getChildrenSize(), E = N(b.getNode(), (H) => S(H)), x = E && N(E, (H) => k(H)), O = x && N(x, (H) => K(H));
788
787
  if (!S(E) || !k(x) || !K(O)) return !1;
789
- const A = x.getIndexWithinParent(), R = Math.min(O.getChildrenSize() - 1, A + $ - 1), M = E.getIndexWithinParent(), B = Math.min(x.getChildrenSize() - 1, M + T - 1), ae = Math.min(M, B), Fe = Math.min(A, R), ve = Math.max(M, B), W = Math.max(A, R), Kt = O.getChildren();
788
+ const A = x.getIndexWithinParent(), R = Math.min(O.getChildrenSize() - 1, A + $ - 1), M = E.getIndexWithinParent(), B = Math.min(x.getChildrenSize() - 1, M + T - 1), ie = Math.min(M, B), Fe = Math.min(A, R), ve = Math.max(M, B), W = Math.max(A, R), Ot = O.getChildren();
790
789
  let Ue = 0;
791
790
  for (let H = Fe; H <= W; H++) {
792
- const je = Kt[H];
791
+ const je = Ot[H];
793
792
  if (!k(je)) return !1;
794
793
  const Ve = F[Ue];
795
794
  if (!k(Ve)) return !1;
796
- const At = je.getChildren(), Ot = Ve.getChildren();
795
+ const Et = je.getChildren(), kt = Ve.getChildren();
797
796
  let Qe = 0;
798
- for (let Re = ae; Re <= ve; Re++) {
799
- const me = At[Re];
800
- if (!S(me)) return !1;
801
- const Ge = Ot[Qe];
797
+ for (let Re = ie; Re <= ve; Re++) {
798
+ const ge = Et[Re];
799
+ if (!S(ge)) return !1;
800
+ const Ge = kt[Qe];
802
801
  if (!S(Ge)) return !1;
803
- const Et = me.getChildren();
802
+ const $t = ge.getChildren();
804
803
  Ge.getChildren().forEach((ee) => {
805
- de(ee) && j().append(ee), me.append(ee);
806
- }), Et.forEach((ee) => ee.remove()), Qe++;
804
+ he(ee) && j().append(ee), ge.append(ee);
805
+ }), $t.forEach((ee) => ee.remove()), Qe++;
807
806
  }
808
807
  Ue++;
809
808
  }
@@ -816,14 +815,14 @@ function An(n, e, t, o) {
816
815
  if (d !== l.anchorCell && J(i, n)) return l.$setFocusCellForSelection(d), !0;
817
816
  }
818
817
  if (l.getAndClearShouldCheckSelection() && z(u) && z(i) && i.isCollapsed()) {
819
- const d = i.anchor.getNode(), m = n.getFirstChild(), _ = we(d);
818
+ const d = i.anchor.getNode(), m = n.getFirstChild(), _ = Se(d);
820
819
  if (_ !== null && k(m)) {
821
820
  const b = m.getFirstChild();
822
821
  if (S(b) && n.is(N(_, (y) => y.is(n) || y.is(b)))) return b.selectStart(), !0;
823
822
  }
824
823
  }
825
824
  if (z(i)) {
826
- const { anchor: d, focus: m } = i, _ = d.getNode(), b = m.getNode(), y = we(_), F = we(b), T = !(!y || !n.is(se(y))), $ = !(!F || !n.is(se(F))), E = T !== $, x = T && $, O = i.isBackward();
825
+ const { anchor: d, focus: m } = i, _ = d.getNode(), b = m.getNode(), y = Se(_), F = Se(b), T = !(!y || !n.is(le(y))), $ = !(!F || !n.is(le(F))), E = T !== $, x = T && $, O = i.isBackward();
827
826
  if (E) {
828
827
  const A = i.clone();
829
828
  if ($) {
@@ -833,14 +832,14 @@ function An(n, e, t, o) {
833
832
  const [R] = U(n, y, y), M = R[0][0].cell, B = R[R.length - 1].at(-1).cell;
834
833
  A.anchor.set(O ? B.getKey() : M.getKey(), O ? B.getChildrenSize() : 0, "element");
835
834
  }
836
- q(A), at(t, l);
837
- } else x && (y.is(F) || (l.$setAnchorCellForSelection(he(l, y)), l.$setFocusCellForSelection(he(l, F), !0)));
835
+ q(A), ut(t, l);
836
+ } else x && (y.is(F) || (l.$setAnchorCellForSelection(ue(l, y)), l.$setFocusCellForSelection(ue(l, F), !0)));
838
837
  } else if (i && v(i) && i.is(u) && i.tableKey === n.getKey()) {
839
838
  const d = xe(s);
840
839
  if (d && d.anchorNode && d.focusNode) {
841
840
  const m = V(d.focusNode), _ = m && !n.isParentOf(m), b = V(d.anchorNode), y = b && n.isParentOf(b);
842
841
  if (_ && y && d.rangeCount > 0) {
843
- const F = nn(d, t);
842
+ const F = rn(d, t);
844
843
  F && (F.anchor.set(n.getKey(), i.isBackward() ? n.getChildrenSize() : 0, "element"), d.removeAllRanges(), q(F));
845
844
  }
846
845
  }
@@ -848,20 +847,20 @@ function An(n, e, t, o) {
848
847
  return i && !i.is(u) && (v(i) || v(u)) && l.tableSelection && !l.tableSelection.is(u) ? (v(i) && i.tableKey === l.tableNodeKey ? l.$updateTableTableSelection(i) : !v(i) && v(u) && u.tableKey === l.tableNodeKey && l.$updateTableTableSelection(null), !1) : (l.hasHijackedSelectionStyles && !n.isSelected() ? function(d, m) {
849
848
  m.$enableHighlightStyle(), Ye(m.table, (_) => {
850
849
  const b = _.elem;
851
- _.highlighted = !1, Ft(d, _), b.getAttribute("style") || b.removeAttribute("style");
850
+ _.highlighted = !1, Rt(d, _), b.getAttribute("style") || b.removeAttribute("style");
852
851
  });
853
- }(t, l) : !l.hasHijackedSelectionStyles && n.isSelected() && at(t, l), !1);
854
- }, I)), l.listenersToRemove.add(t.registerCommand(wt, () => {
852
+ }(t, l) : !l.hasHijackedSelectionStyles && n.isSelected() && ut(t, l), !1);
853
+ }, I)), l.listenersToRemove.add(t.registerCommand(yt, () => {
855
854
  const i = L();
856
855
  if (!z(i) || !i.isCollapsed() || !J(i, n)) return !1;
857
- const u = ut(t, i, n);
858
- return !!u && (ct(u, n), !0);
856
+ const u = dt(t, i, n);
857
+ return !!u && (ht(u, n), !0);
859
858
  }, I)), l;
860
859
  }
861
- function it(n) {
860
+ function at(n) {
862
861
  return n[Me] || null;
863
862
  }
864
- function re(n) {
863
+ function Ne(n) {
865
864
  let e = n;
866
865
  for (; e != null; ) {
867
866
  const t = e.nodeName;
@@ -873,7 +872,17 @@ function re(n) {
873
872
  }
874
873
  return null;
875
874
  }
876
- function le(n, e) {
875
+ function ct(n, e) {
876
+ if (!n.contains(e)) return null;
877
+ let t = null;
878
+ for (let o = e; o != null; o = o.parentNode) {
879
+ if (o === n) return t;
880
+ const r = o.nodeName;
881
+ r !== "TD" && r !== "TH" || (t = o._cell || null);
882
+ }
883
+ return null;
884
+ }
885
+ function re(n, e) {
877
886
  const t = [], o = { columns: 0, domRows: t, rows: 0 };
878
887
  let r = Q(n, e).querySelector("tr"), s = 0, l = 0;
879
888
  for (t.length = 0; r != null; ) {
@@ -904,11 +913,11 @@ function le(n, e) {
904
913
  }
905
914
  return o.columns = s + 1, o.rows = l + 1, o;
906
915
  }
907
- function pe(n, e, t) {
916
+ function Ce(n, e, t) {
908
917
  const o = new Set(t ? t.getNodes() : []);
909
918
  Ye(e, (r, s) => {
910
919
  const l = r.elem;
911
- o.has(s) ? (r.highlighted = !0, Tt(n, r)) : (r.highlighted = !1, Ft(n, r), l.getAttribute("style") || l.removeAttribute("style"));
920
+ o.has(s) ? (r.highlighted = !0, vt(n, r)) : (r.highlighted = !1, Rt(n, r), l.getAttribute("style") || l.removeAttribute("style"));
912
921
  });
913
922
  }
914
923
  function Ye(n, e) {
@@ -923,21 +932,21 @@ function Ye(n, e) {
923
932
  }
924
933
  }
925
934
  }
926
- function at(n, e) {
935
+ function ut(n, e) {
927
936
  e.$disableHighlightStyle(), Ye(e.table, (t) => {
928
- t.highlighted = !0, Tt(n, t);
937
+ t.highlighted = !0, vt(n, t);
929
938
  });
930
939
  }
931
- const On = (n, e, t, o, r) => {
940
+ const En = (n, e, t, o, r) => {
932
941
  const s = r === "forward";
933
942
  switch (r) {
934
943
  case "backward":
935
944
  case "forward":
936
- return t !== (s ? n.table.columns - 1 : 0) ? Se(e.getCellNodeFromCordsOrThrow(t + (s ? 1 : -1), o, n.table), s) : o !== (s ? n.table.rows - 1 : 0) ? Se(e.getCellNodeFromCordsOrThrow(s ? 0 : n.table.columns - 1, o + (s ? 1 : -1), n.table), s) : s ? e.selectNext() : e.selectPrevious(), !0;
945
+ return t !== (s ? n.table.columns - 1 : 0) ? _e(e.getCellNodeFromCordsOrThrow(t + (s ? 1 : -1), o, n.table), s) : o !== (s ? n.table.rows - 1 : 0) ? _e(e.getCellNodeFromCordsOrThrow(s ? 0 : n.table.columns - 1, o + (s ? 1 : -1), n.table), s) : s ? e.selectNext() : e.selectPrevious(), !0;
937
946
  case "up":
938
- return o !== 0 ? Se(e.getCellNodeFromCordsOrThrow(t, o - 1, n.table), !1) : e.selectPrevious(), !0;
947
+ return o !== 0 ? _e(e.getCellNodeFromCordsOrThrow(t, o - 1, n.table), !1) : e.selectPrevious(), !0;
939
948
  case "down":
940
- return o !== n.table.rows - 1 ? Se(e.getCellNodeFromCordsOrThrow(t, o + 1, n.table), !0) : e.selectNext(), !0;
949
+ return o !== n.table.rows - 1 ? _e(e.getCellNodeFromCordsOrThrow(t, o + 1, n.table), !0) : e.selectNext(), !0;
941
950
  default:
942
951
  return !1;
943
952
  }
@@ -956,7 +965,7 @@ function Oe(n, e) {
956
965
  }
957
966
  return [t, o];
958
967
  }
959
- function _e([n, e]) {
968
+ function pe([n, e]) {
960
969
  return [n === "minColumn" ? "maxColumn" : "minColumn", e === "minRow" ? "maxRow" : "minRow"];
961
970
  }
962
971
  function te(n, e, [t, o]) {
@@ -965,18 +974,18 @@ function te(n, e, [t, o]) {
965
974
  const l = e[t], a = s[l];
966
975
  return a === void 0 && w(250, t, String(l)), a;
967
976
  }
968
- function En(n, e, t, o, r) {
977
+ function kn(n, e, t, o, r) {
969
978
  const s = $e(e, t, o), l = function(T, $) {
970
979
  const { minColumn: E, maxColumn: x, minRow: O, maxRow: A } = $;
971
- let R = 1, M = 1, B = 1, ae = 1;
980
+ let R = 1, M = 1, B = 1, ie = 1;
972
981
  const Fe = T[O], ve = T[A];
973
- for (let W = E; W <= x; W++) R = Math.max(R, Fe[W].cell.__rowSpan), ae = Math.max(ae, ve[W].cell.__rowSpan);
982
+ for (let W = E; W <= x; W++) R = Math.max(R, Fe[W].cell.__rowSpan), ie = Math.max(ie, ve[W].cell.__rowSpan);
974
983
  for (let W = O; W <= A; W++) M = Math.max(M, T[W][E].cell.__colSpan), B = Math.max(B, T[W][x].cell.__colSpan);
975
- return { bottomSpan: ae, leftSpan: M, rightSpan: B, topSpan: R };
984
+ return { bottomSpan: ie, leftSpan: M, rightSpan: B, topSpan: R };
976
985
  }(e, s), { topSpan: a, leftSpan: c, bottomSpan: f, rightSpan: h } = l, C = function(T, $) {
977
986
  const E = Oe(T, $);
978
987
  return E === null && w(249, $.cell.getKey()), E;
979
- }(s, t), [p, i] = _e(C);
988
+ }(s, t), [p, i] = pe(C);
980
989
  let u = s[p], g = s[i];
981
990
  r === "forward" ? u += p === "maxColumn" ? 1 : c : r === "backward" ? u -= p === "minColumn" ? 1 : h : r === "down" ? g += i === "maxRow" ? 1 : a : r === "up" && (g -= i === "minRow" ? 1 : f);
982
991
  const d = e[g];
@@ -985,12 +994,12 @@ function En(n, e, t, o, r) {
985
994
  if (m === void 0) return !1;
986
995
  const [_, b] = function(T, $, E) {
987
996
  const x = $e(T, $, E), O = Oe(x, $);
988
- if (O) return [te(T, x, O), te(T, x, _e(O))];
997
+ if (O) return [te(T, x, O), te(T, x, pe(O))];
989
998
  const A = Oe(x, E);
990
- if (A) return [te(T, x, _e(A)), te(T, x, A)];
999
+ if (A) return [te(T, x, pe(A)), te(T, x, A)];
991
1000
  const R = ["minColumn", "minRow"];
992
- return [te(T, x, R), te(T, x, _e(R))];
993
- }(e, t, m), y = he(n, _.cell), F = he(n, b.cell);
1001
+ return [te(T, x, R), te(T, x, pe(R))];
1002
+ }(e, t, m), y = ue(n, _.cell), F = ue(n, b.cell);
994
1003
  return n.$setAnchorCellForSelection(y), n.$setFocusCellForSelection(F, !0), !0;
995
1004
  }
996
1005
  function J(n, e) {
@@ -1000,33 +1009,33 @@ function J(n, e) {
1000
1009
  }
1001
1010
  return !1;
1002
1011
  }
1003
- function Se(n, e) {
1012
+ function _e(n, e) {
1004
1013
  e ? n.selectStart() : n.selectEnd();
1005
1014
  }
1006
- function Tt(n, e) {
1015
+ function vt(n, e) {
1007
1016
  const t = e.elem, o = n._config.theme;
1008
1017
  S(V(t)) || w(131), X(t, o.tableCellSelected);
1009
1018
  }
1010
- function Ft(n, e) {
1019
+ function Rt(n, e) {
1011
1020
  const t = e.elem;
1012
1021
  S(V(t)) || w(131);
1013
1022
  const o = n._config.theme;
1014
- ie(t, o.tableCellSelected);
1023
+ se(t, o.tableCellSelected);
1015
1024
  }
1016
- function we(n) {
1025
+ function Se(n) {
1017
1026
  const e = N(n, S);
1018
1027
  return S(e) ? e : null;
1019
1028
  }
1020
- function se(n) {
1029
+ function le(n) {
1021
1030
  const e = N(n, K);
1022
1031
  return K(e) ? e : null;
1023
1032
  }
1024
- function kn(n, e, t, o, r, s, l) {
1025
- const a = sn(t.focus, r ? "previous" : "next");
1026
- if (an(a)) return !1;
1033
+ function $n(n, e, t, o, r, s, l) {
1034
+ const a = cn(t.focus, r ? "previous" : "next");
1035
+ if (un(a)) return !1;
1027
1036
  let c = a;
1028
1037
  for (const d of et(a).iterNodeCarets("shadowRoot")) {
1029
- if (!cn(d) || !P(d.origin)) return !1;
1038
+ if (!hn(d) || !P(d.origin)) return !1;
1030
1039
  c = d;
1031
1040
  }
1032
1041
  const f = c.getParentAtCaret();
@@ -1035,34 +1044,34 @@ function kn(n, e, t, o, r, s, l) {
1035
1044
  for (const m of et(d).iterNodeCarets("root")) {
1036
1045
  const { origin: _ } = m;
1037
1046
  if (S(_)) {
1038
- if (tt(m)) return un(_, d.direction);
1047
+ if (tt(m)) return dn(_, d.direction);
1039
1048
  } else if (!k(_)) break;
1040
1049
  }
1041
1050
  return null;
1042
1051
  }(nt(h, c.direction)), p = N(h, K);
1043
1052
  if (!p || !p.is(s)) return !1;
1044
- const i = n.getElementByKey(h.getKey()), u = re(i);
1053
+ const i = n.getElementByKey(h.getKey()), u = Ne(i);
1045
1054
  if (!i || !u) return !1;
1046
- const g = $n(n, p);
1055
+ const g = Mn(n, p);
1047
1056
  if (l.table = g, C) if (o === "extend") {
1048
- const d = re(n.getElementByKey(C.origin.getKey()));
1057
+ const d = Ne(n.getElementByKey(C.origin.getKey()));
1049
1058
  if (!d) return !1;
1050
1059
  l.$setAnchorCellForSelection(u), l.$setFocusCellForSelection(d, !0);
1051
1060
  } else {
1052
1061
  const d = ot(C);
1053
- Ce(t.anchor, d), Ce(t.focus, d);
1062
+ me(t.anchor, d), me(t.focus, d);
1054
1063
  }
1055
1064
  else if (o === "extend") l.$setAnchorCellForSelection(u), l.$setFocusCellForSelection(u, !0);
1056
1065
  else {
1057
1066
  const d = function(m) {
1058
- const _ = hn(m);
1067
+ const _ = fn(m);
1059
1068
  return tt(_) ? ot(_) : m;
1060
1069
  }(nt(p, a.direction));
1061
- Ce(t.anchor, d), Ce(t.focus, d);
1070
+ me(t.anchor, d), me(t.focus, d);
1062
1071
  }
1063
1072
  return Y(e), !0;
1064
1073
  }
1065
- function vt(n, e, t, o, r) {
1074
+ function Kt(n, e, t, o, r) {
1066
1075
  if ((t === "up" || t === "down") && function(l) {
1067
1076
  const a = l.getRootElement();
1068
1077
  return a ? a.hasAttribute("aria-controls") && a.getAttribute("aria-controls") === "typeahead-menu" : !1;
@@ -1093,13 +1102,13 @@ function vt(n, e, t, o, r) {
1093
1102
  let f = 0;
1094
1103
  t === "up" && P(c) && (f = c.getChildrenSize());
1095
1104
  let h = c;
1096
- t === "up" && P(c) && (h = c.getLastChild() || c, f = de(h) ? h.getTextContentSize() : 0);
1105
+ t === "up" && P(c) && (h = c.getLastChild() || c, f = he(h) ? h.getTextContentSize() : 0);
1097
1106
  const C = s.clone();
1098
- return C.focus.set(h.getKey(), f, de(h) ? "text" : "element"), q(C), Y(e), !0;
1107
+ return C.focus.set(h.getKey(), f, he(h) ? "text" : "element"), q(C), Y(e), !0;
1099
1108
  }
1100
- if (ln(l)) {
1109
+ if (an(l)) {
1101
1110
  const a = t === "up" ? s.getNodes()[s.getNodes().length - 1] : s.getNodes()[0];
1102
- if (a && ue(o, a) !== null) {
1111
+ if (a && ce(o, a) !== null) {
1103
1112
  const c = o.getFirstDescendant(), f = o.getLastDescendant();
1104
1113
  if (!c || !f) return !1;
1105
1114
  const [h] = oe(c), [C] = oe(f), p = o.getCordsFromCellNode(h, r.table), i = o.getCordsFromCellNode(C, r.table), u = o.getDOMCellFromCordsOrThrow(p.x, p.y, r.table), g = o.getDOMCellFromCordsOrThrow(i.x, i.y, r.table);
@@ -1120,18 +1129,18 @@ function vt(n, e, t, o, r) {
1120
1129
  }
1121
1130
  }
1122
1131
  }
1123
- return t === "down" && Rt(n) && r.setShouldCheckSelection(), !1;
1132
+ return t === "down" && At(n) && r.setShouldCheckSelection(), !1;
1124
1133
  }
1125
1134
  if (z(s)) {
1126
1135
  if (t === "backward" || t === "forward")
1127
- return kn(n, e, s, e.shiftKey ? "extend" : "move", t === "backward", o, r);
1136
+ return $n(n, e, s, e.shiftKey ? "extend" : "move", t === "backward", o, r);
1128
1137
  if (s.isCollapsed()) {
1129
1138
  const { anchor: l, focus: a } = s, c = N(l.getNode(), S), f = N(a.getNode(), S);
1130
1139
  if (!S(c) || !c.is(f)) return !1;
1131
- const h = se(c);
1140
+ const h = le(c);
1132
1141
  if (h !== o && h != null) {
1133
1142
  const m = Q(h, n.getElementByKey(h.getKey()));
1134
- if (m != null) return r.table = le(h, m), vt(n, e, t, h, r);
1143
+ if (m != null) return r.table = re(h, m), Kt(n, e, t, h, r);
1135
1144
  }
1136
1145
  const C = n.getElementByKey(c.__key), p = n.getElementByKey(l.key);
1137
1146
  if (p == null || C == null) return !1;
@@ -1150,7 +1159,7 @@ function vt(n, e, t, o, r) {
1150
1159
  if (t === "up" ? d.top > i.top - i.height : i.bottom + i.height > d.bottom) {
1151
1160
  Y(e);
1152
1161
  const m = o.getCordsFromCellNode(c, r.table);
1153
- if (!e.shiftKey) return On(r, o, m.x, m.y, t);
1162
+ if (!e.shiftKey) return En(r, o, m.x, m.y, t);
1154
1163
  {
1155
1164
  const _ = o.getDOMCellFromCordsOrThrow(m.x, m.y, r.table);
1156
1165
  r.$setAnchorCellForSelection(_), r.$setFocusCellForSelection(_, !0);
@@ -1164,10 +1173,10 @@ function vt(n, e, t, o, r) {
1164
1173
  const C = Q(h, n.getElementByKey(h.getKey()));
1165
1174
  if (!S(c) || !S(f) || !K(h) || C == null) return !1;
1166
1175
  r.$updateTableTableSelection(s);
1167
- const p = le(h, C), i = o.getCordsFromCellNode(c, p), u = o.getDOMCellFromCordsOrThrow(i.x, i.y, p);
1176
+ const p = re(h, C), i = o.getCordsFromCellNode(c, p), u = o.getDOMCellFromCordsOrThrow(i.x, i.y, p);
1168
1177
  if (r.$setAnchorCellForSelection(u), Y(e), e.shiftKey) {
1169
1178
  const [g, d, m] = U(o, c, f);
1170
- return En(r, g, d, m, t);
1179
+ return kn(r, g, d, m, t);
1171
1180
  }
1172
1181
  return f.selectEnd(), !0;
1173
1182
  }
@@ -1176,11 +1185,11 @@ function vt(n, e, t, o, r) {
1176
1185
  function Y(n) {
1177
1186
  n.preventDefault(), n.stopImmediatePropagation(), n.stopPropagation();
1178
1187
  }
1179
- function ct(n, e, t) {
1188
+ function ht(n, e, t) {
1180
1189
  const o = j();
1181
1190
  n === "first" ? e.insertBefore(o) : e.insertAfter(o), o.append(...t || []), o.selectEnd();
1182
1191
  }
1183
- function ut(n, e, t) {
1192
+ function dt(n, e, t) {
1184
1193
  const o = t.getParent();
1185
1194
  if (!o) return;
1186
1195
  const r = xe(Xe(n));
@@ -1194,14 +1203,14 @@ function ut(n, e, t) {
1194
1203
  const [h, C] = U(t, c, c), p = h[0][0], i = h[h.length - 1][h[0].length - 1], { startRow: u, startColumn: g } = C, d = u === p.startRow && g === p.startColumn, m = u === i.startRow && g === i.startColumn;
1195
1204
  return d ? "first" : m ? "last" : void 0;
1196
1205
  }
1197
- function he(n, e) {
1206
+ function ue(n, e) {
1198
1207
  const { tableNode: t } = n.$lookup(), o = t.getCordsFromCellNode(e, n.table);
1199
1208
  return t.getDOMCellFromCordsOrThrow(o.x, o.y, n.table);
1200
1209
  }
1201
1210
  function ze(n, e, t) {
1202
- return ue(n, V(e, t));
1211
+ return ce(n, V(e, t));
1203
1212
  }
1204
- function ht(n, e, t, o) {
1213
+ function ft(n, e, t, o) {
1205
1214
  const r = n.querySelector("colgroup");
1206
1215
  if (!r) return;
1207
1216
  const s = [];
@@ -1211,14 +1220,14 @@ function ht(n, e, t, o) {
1211
1220
  }
1212
1221
  r.replaceChildren(...s);
1213
1222
  }
1214
- function dt(n, e, t) {
1215
- t ? (X(n, e.theme.tableRowStriping), n.setAttribute("data-lexical-row-striping", "true")) : (ie(n, e.theme.tableRowStriping), n.removeAttribute("data-lexical-row-striping"));
1223
+ function gt(n, e, t) {
1224
+ t ? (X(n, e.theme.tableRowStriping), n.setAttribute("data-lexical-row-striping", "true")) : (se(n, e.theme.tableRowStriping), n.removeAttribute("data-lexical-row-striping"));
1216
1225
  }
1217
- function ft(n, e, t) {
1218
- t > 0 ? (X(n, e.theme.tableFrozenColumn), n.setAttribute("data-lexical-frozen-column", "true")) : (ie(n, e.theme.tableFrozenColumn), n.removeAttribute("data-lexical-frozen-column"));
1226
+ function mt(n, e, t) {
1227
+ t > 0 ? (X(n, e.theme.tableFrozenColumn), n.setAttribute("data-lexical-frozen-column", "true")) : (se(n, e.theme.tableFrozenColumn), n.removeAttribute("data-lexical-frozen-column"));
1219
1228
  }
1220
- function gt(n, e, t) {
1221
- t > 0 ? (X(n, e.theme.tableFrozenRow), n.setAttribute("data-lexical-frozen-row", "true")) : (ie(n, e.theme.tableFrozenRow), n.removeAttribute("data-lexical-frozen-row"));
1229
+ function Ct(n, e, t) {
1230
+ t > 0 ? (X(n, e.theme.tableFrozenRow), n.setAttribute("data-lexical-frozen-row", "true")) : (se(n, e.theme.tableFrozenRow), n.removeAttribute("data-lexical-frozen-row"));
1222
1231
  }
1223
1232
  function Ee(n, e, t) {
1224
1233
  if (!e.theme.tableAlignment) return;
@@ -1227,13 +1236,13 @@ function Ee(n, e, t) {
1227
1236
  const l = e.theme.tableAlignment[s];
1228
1237
  l && (s === t ? r : o).push(l);
1229
1238
  }
1230
- ie(n, ...o), X(n, ...r);
1239
+ se(n, ...o), X(n, ...r);
1231
1240
  }
1232
1241
  const Le = /* @__PURE__ */ new WeakSet();
1233
- function Rt(n = pt()) {
1242
+ function At(n = St()) {
1234
1243
  return Le.has(n);
1235
1244
  }
1236
- function Un(n, e) {
1245
+ function jn(n, e) {
1237
1246
  e ? Le.add(n) : Le.delete(n);
1238
1247
  }
1239
1248
  class G extends Pe {
@@ -1254,7 +1263,7 @@ class G extends Pe {
1254
1263
  super.afterCloneFrom(e), this.__colWidths = e.__colWidths, this.__rowStriping = e.__rowStriping, this.__frozenColumnCount = e.__frozenColumnCount, this.__frozenRowCount = e.__frozenRowCount;
1255
1264
  }
1256
1265
  static importDOM() {
1257
- return { table: (e) => ({ conversion: Mn, priority: 1 }) };
1266
+ return { table: (e) => ({ conversion: zn, priority: 1 }) };
1258
1267
  }
1259
1268
  static importJSON(e) {
1260
1269
  return qe().updateFromJSON(e);
@@ -1279,21 +1288,21 @@ class G extends Pe {
1279
1288
  const o = document.createElement("table");
1280
1289
  this.__style && (o.style.cssText = this.__style);
1281
1290
  const r = document.createElement("colgroup");
1282
- if (o.appendChild(r), ht(o, 0, this.getColumnCount(), this.getColWidths()), Pt(r), X(o, e.theme.table), Ee(o, e, this.getFormatType()), this.__frozenColumnCount && ft(o, e, this.__frozenColumnCount), this.__frozenRowCount && gt(o, e, this.__frozenRowCount), this.__rowStriping && dt(o, e, !0), Rt(t)) {
1291
+ if (o.appendChild(r), ft(o, 0, this.getColumnCount(), this.getColWidths()), Ht(r), X(o, e.theme.table), Ee(o, e, this.getFormatType()), this.__frozenColumnCount && mt(o, e, this.__frozenColumnCount), this.__frozenRowCount && Ct(o, e, this.__frozenRowCount), this.__rowStriping && gt(o, e, !0), At(t)) {
1283
1292
  const s = document.createElement("div"), l = e.theme.tableScrollableWrapper;
1284
1293
  return l ? X(s, l) : s.style.cssText = "overflow-x: auto;", s.appendChild(o), s;
1285
1294
  }
1286
1295
  return o;
1287
1296
  }
1288
1297
  updateDOM(e, t, o) {
1289
- e.__rowStriping !== this.__rowStriping && dt(t, o, this.__rowStriping), e.__frozenColumnCount !== this.__frozenColumnCount && ft(t, o, this.__frozenColumnCount), e.__frozenRowCount !== this.__frozenRowCount && gt(t, o, this.__frozenRowCount), ht(t, 0, this.getColumnCount(), this.getColWidths());
1298
+ e.__rowStriping !== this.__rowStriping && gt(t, o, this.__rowStriping), e.__frozenColumnCount !== this.__frozenColumnCount && mt(t, o, this.__frozenColumnCount), e.__frozenRowCount !== this.__frozenRowCount && Ct(t, o, this.__frozenRowCount), ft(t, 0, this.getColumnCount(), this.getColWidths());
1290
1299
  const r = this.getDOMSlot(t).element;
1291
1300
  return e.__style !== this.__style && (r.style.cssText = this.__style), Ee(r, o, this.getFormatType()), !1;
1292
1301
  }
1293
1302
  exportDOM(e) {
1294
1303
  const t = super.exportDOM(e), { element: o } = t;
1295
1304
  return { after: (r) => {
1296
- if (t.after && (r = t.after(r), this.__format && Ee(r, e._config, this.getFormatType())), be(r) && r.nodeName !== "TABLE" && (r = r.querySelector("table")), !be(r)) return null;
1305
+ if (t.after && (r = t.after(r), this.__format && Ee(r, e._config, this.getFormatType())), we(r) && r.nodeName !== "TABLE" && (r = r.querySelector("table")), !we(r)) return null;
1297
1306
  const [s] = Je(this, null, null), l = /* @__PURE__ */ new Map();
1298
1307
  for (const h of s) for (const C of h) {
1299
1308
  const p = C.cell.getKey();
@@ -1322,7 +1331,7 @@ class G extends Pe {
1322
1331
  r.append(h);
1323
1332
  }
1324
1333
  return r;
1325
- }, element: be(o) && o.nodeName !== "TABLE" ? o.querySelector("table") : o };
1334
+ }, element: we(o) && o.nodeName !== "TABLE" ? o.querySelector("table") : o };
1326
1335
  }
1327
1336
  canBeEmpty() {
1328
1337
  return !1;
@@ -1401,11 +1410,11 @@ class G extends Pe {
1401
1410
  }), t;
1402
1411
  }
1403
1412
  }
1404
- function $n(n, e) {
1413
+ function Mn(n, e) {
1405
1414
  const t = n.getElementByKey(e.getKey());
1406
- return t === null && w(230), le(e, t);
1415
+ return t === null && w(230), re(e, t);
1407
1416
  }
1408
- function Mn(n) {
1417
+ function zn(n) {
1409
1418
  const e = qe();
1410
1419
  n.hasAttribute("data-lexical-row-striping") && e.setRowStriping(!0);
1411
1420
  const t = n.querySelector(":scope > colgroup");
@@ -1421,7 +1430,7 @@ function Mn(n) {
1421
1430
  }
1422
1431
  o && e.setColWidths(o);
1423
1432
  }
1424
- return { after: (o) => mt(o, k), node: e };
1433
+ return { after: (o) => pt(o, k), node: e };
1425
1434
  }
1426
1435
  function qe() {
1427
1436
  return Be(new G());
@@ -1429,22 +1438,22 @@ function qe() {
1429
1438
  function K(n) {
1430
1439
  return n instanceof G;
1431
1440
  }
1432
- function zn({ rows: n, columns: e, includeHeaders: t }) {
1441
+ function Ln({ rows: n, columns: e, includeHeaders: t }) {
1433
1442
  const o = L();
1434
- if (!o || !z(o) || se(o.anchor.getNode())) return !1;
1435
- const r = bn(Number(n), Number(e), t);
1436
- Mt(r);
1443
+ if (!o || !z(o) || le(o.anchor.getNode())) return !1;
1444
+ const r = yn(Number(n), Number(e), t);
1445
+ Lt(r);
1437
1446
  const s = r.getFirstDescendant();
1438
- return de(s) && s.select(), !0;
1439
- }
1440
- function Ln(n) {
1441
- k(n.getParent()) ? n.isEmpty() && n.append(j()) : n.remove();
1447
+ return he(s) && s.select(), !0;
1442
1448
  }
1443
1449
  function Pn(n) {
1444
- K(n.getParent()) ? Ct(n, S) : n.remove();
1450
+ k(n.getParent()) ? n.isEmpty() && n.append(j()) : n.remove();
1445
1451
  }
1446
1452
  function Bn(n) {
1447
- Ct(n, k);
1453
+ K(n.getParent()) ? _t(n, S) : n.remove();
1454
+ }
1455
+ function Hn(n) {
1456
+ _t(n, k);
1448
1457
  const [e] = Je(n, null, null), t = e.reduce((r, s) => Math.max(r, s.length), 0), o = n.getChildren();
1449
1458
  for (let r = 0; r < e.length; ++r) {
1450
1459
  const s = o[r];
@@ -1452,19 +1461,19 @@ function Bn(n) {
1452
1461
  k(s) || w(254, s.constructor.name, s.getType());
1453
1462
  const l = e[r].reduce((a, c) => c ? 1 + a : a, 0);
1454
1463
  if (l !== t) for (let a = l; a < t; ++a) {
1455
- const c = fe();
1464
+ const c = de();
1456
1465
  c.append(j()), s.append(c);
1457
1466
  }
1458
1467
  }
1459
1468
  }
1460
- function Hn(n) {
1461
- if (n.detail < 3 || !ce(n.target)) return !1;
1469
+ function Wn(n) {
1470
+ if (n.detail < 3 || !ae(n.target)) return !1;
1462
1471
  const e = V(n.target);
1463
1472
  if (e === null) return !1;
1464
1473
  const t = N(e, (o) => P(o) && !o.isInline());
1465
1474
  return t === null ? !1 : !!S(t.getParent()) && (t.select(0), !0);
1466
1475
  }
1467
- function jn(n) {
1476
+ function Vn(n) {
1468
1477
  return n.registerNodeTransform(Z, (e) => {
1469
1478
  if (e.getColSpan() > 1 || e.getRowSpan() > 1) {
1470
1479
  const [, , t] = oe(e), [o] = U(t, e, e), r = o.length, s = o[0].length;
@@ -1479,8 +1488,8 @@ function jn(n) {
1479
1488
  if (C.startRow === c && C.startColumn === h) f = p, a.push(p);
1480
1489
  else if (p.getColSpan() > 1 || p.getRowSpan() > 1) {
1481
1490
  S(p) || w(176);
1482
- const i = fe(p.__headerState);
1483
- f !== null ? f.insertAfter(i) : $t(l, i);
1491
+ const i = de(p.__headerState);
1492
+ f !== null ? f.insertAfter(i) : zt(l, i);
1484
1493
  }
1485
1494
  }
1486
1495
  }
@@ -1488,16 +1497,16 @@ function jn(n) {
1488
1497
  }
1489
1498
  });
1490
1499
  }
1491
- function Vn(n, e = !0) {
1500
+ function Qn(n, e = !0) {
1492
1501
  const t = /* @__PURE__ */ new Map(), o = (s, l, a) => {
1493
- const c = Q(s, a), f = An(s, c, n, e);
1502
+ const c = Q(s, a), f = On(s, c, n, e);
1494
1503
  t.set(l, [f, c]);
1495
1504
  }, r = n.registerMutationListener(G, (s) => {
1496
1505
  n.getEditorState().read(() => {
1497
1506
  for (const [l, a] of s) {
1498
1507
  const c = t.get(l);
1499
1508
  if (a === "created" || a === "updated") {
1500
- const { tableNode: f, tableElement: h } = xt(l);
1509
+ const { tableNode: f, tableElement: h } = Ft(l);
1501
1510
  c === void 0 ? o(f, l, h) : h !== c[1] && (c[0].removeListeners(), t.delete(l), o(f, l, h));
1502
1511
  } else a === "destroyed" && c !== void 0 && (c[0].removeListeners(), t.delete(l));
1503
1512
  }
@@ -1508,26 +1517,26 @@ function Vn(n, e = !0) {
1508
1517
  for (const [, [s]] of t) s.removeListeners();
1509
1518
  };
1510
1519
  }
1511
- function Qn(n) {
1512
- return n.hasNodes([G]) || w(255), kt(n.registerCommand(pn, zn, Ke), n.registerCommand(_t, ({ nodes: e, selection: t }) => z(t) ? se(t.anchor.getNode()) !== null && e.some(K) : !1, Ke), n.registerCommand(Bt, Hn, Ke), n.registerNodeTransform(G, Bn), n.registerNodeTransform(ge, Pn), n.registerNodeTransform(Z, Ln));
1520
+ function Gn(n) {
1521
+ return n.hasNodes([G]) || w(255), Mt(n.registerCommand(Sn, Ln, Ke), n.registerCommand(wt, ({ nodes: e, selection: t }) => z(t) ? le(t.anchor.getNode()) !== null && e.some(K) : !1, Ke), n.registerCommand(Wt, Wn, Ke), n.registerNodeTransform(G, Hn), n.registerNodeTransform(fe, Bn), n.registerNodeTransform(Z, Pn));
1513
1522
  }
1514
1523
  export {
1515
- bn as $,
1524
+ yn as $,
1516
1525
  De as A,
1517
- Yn as B,
1518
- ge as F,
1519
- Xn as H,
1520
- Jn as L,
1521
- yn as W,
1522
- qn as X,
1523
- Un as Z,
1526
+ qn as B,
1527
+ fe as F,
1528
+ Yn as H,
1529
+ Xn as L,
1530
+ Nn as W,
1531
+ Un as X,
1524
1532
  Z as b,
1525
1533
  Vn as d,
1526
- G as e,
1534
+ jn as e,
1527
1535
  Qn as f,
1528
- jn as h,
1536
+ Gn as g,
1537
+ G as t,
1529
1538
  S as v,
1530
- fe as x,
1531
- yt as z
1539
+ de as x,
1540
+ xt as z
1532
1541
  };
1533
- //# sourceMappingURL=LexicalTable.prod-CNsOdwua.js.map
1542
+ //# sourceMappingURL=LexicalTable.prod-Bb6g8CAC.js.map