@uva-glass/component-library 3.53.13 → 3.53.14

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 (65) hide show
  1. package/dist/{Lexical.prod-Dgzi-S1E.js → Lexical.prod-YJ1n9pVJ.js} +1334 -1305
  2. package/dist/Lexical.prod-YJ1n9pVJ.js.map +1 -0
  3. package/dist/{LexicalClipboard.prod-Dxc8c2F_.js → LexicalClipboard.prod-CDPAGlNs.js} +52 -52
  4. package/dist/{LexicalClipboard.prod-Dxc8c2F_.js.map → LexicalClipboard.prod-CDPAGlNs.js.map} +1 -1
  5. package/dist/{LexicalExtension.prod-CNBWjmfs.js → LexicalExtension.prod-2-giLTv9.js} +87 -88
  6. package/dist/LexicalExtension.prod-2-giLTv9.js.map +1 -0
  7. package/dist/LexicalLink.prod-u8L4ioQd.js +528 -0
  8. package/dist/LexicalLink.prod-u8L4ioQd.js.map +1 -0
  9. package/dist/LexicalList.prod-DMU0XSLO.js +630 -0
  10. package/dist/LexicalList.prod-DMU0XSLO.js.map +1 -0
  11. package/dist/{LexicalSelection.prod-B0uiXGSS.js → LexicalSelection.prod-CpZE7Sey.js} +41 -41
  12. package/dist/{LexicalSelection.prod-B0uiXGSS.js.map → LexicalSelection.prod-CpZE7Sey.js.map} +1 -1
  13. package/dist/LexicalTable.prod-BOlKc5zf.js +1846 -0
  14. package/dist/LexicalTable.prod-BOlKc5zf.js.map +1 -0
  15. package/dist/LexicalUtils.prod-BQnuAaA9.js +92 -0
  16. package/dist/LexicalUtils.prod-BQnuAaA9.js.map +1 -0
  17. package/dist/{TableCellResizerPlugin-9kvw_LpH.js → TableCellResizerPlugin-BTfuE_kM.js} +53 -53
  18. package/dist/{TableCellResizerPlugin-9kvw_LpH.js.map → TableCellResizerPlugin-BTfuE_kM.js.map} +1 -1
  19. package/dist/{TablePlugin-BlXaQ0U6.js → TablePlugin-bFqq2Yd9.js} +75 -75
  20. package/dist/{TablePlugin-BlXaQ0U6.js.map → TablePlugin-bFqq2Yd9.js.map} +1 -1
  21. package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
  22. package/dist/components/FormInput/FormInput.js +1 -1
  23. package/dist/components/InputField/InputField.stories.js +1 -1
  24. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  25. package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
  26. package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
  27. package/dist/components/MultiSelect/index.js +1 -1
  28. package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
  29. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
  30. package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
  31. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  32. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +8 -8
  33. package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js +58 -58
  34. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +4 -4
  35. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +1 -1
  36. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +61 -61
  37. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  38. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +25 -25
  39. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +13 -13
  40. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +4 -4
  41. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +1 -1
  42. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
  43. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +4 -4
  44. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +24 -24
  45. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  46. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +29 -29
  47. package/dist/components/RteEditor/Plugins/index.js +2 -2
  48. package/dist/components/RteEditor/RteEditor.js +252 -252
  49. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  50. package/dist/components/RteEditor/helpers.js +18 -18
  51. package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js +19 -19
  52. package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +12 -12
  53. package/dist/components/index.js +1 -1
  54. package/dist/index.js +1 -1
  55. package/package.json +15 -15
  56. package/dist/Lexical.prod-Dgzi-S1E.js.map +0 -1
  57. package/dist/LexicalExtension.prod-CNBWjmfs.js.map +0 -1
  58. package/dist/LexicalLink.prod-EEOzXxej.js +0 -502
  59. package/dist/LexicalLink.prod-EEOzXxej.js.map +0 -1
  60. package/dist/LexicalList.prod-DADZlhem.js +0 -627
  61. package/dist/LexicalList.prod-DADZlhem.js.map +0 -1
  62. package/dist/LexicalTable.prod-QpQxZNNH.js +0 -1814
  63. package/dist/LexicalTable.prod-QpQxZNNH.js.map +0 -1
  64. package/dist/LexicalUtils.prod-D1mwAww-.js +0 -114
  65. package/dist/LexicalUtils.prod-D1mwAww-.js.map +0 -1
@@ -1,24 +1,24 @@
1
- import { jsx as f, jsxs as F, Fragment as $e } from "react/jsx-runtime";
2
- import { t as Ye, r as qe, o as L } from "../../LexicalComposerContext.prod-DOyoZx0P.js";
3
- import { ar as Pe, al as A, $ as Ge, c as p, az as oe, at as ae, aA as H, M as se, U as Ve, p as I, b as g, a2 as Ze, V as c, aX as Qe, n as et, r as tt, i as rt, aY as nt, aZ as ot, X as at, k as T, aG as st, a_ as it, a$ as lt, b0 as ut, A as re, b1 as dt, b2 as ct, a7 as ft, S as mt, l as Le, P as pt, b3 as gt, b4 as ue, h as de, W as ht, G as Z, T as vt, a8 as De, b5 as ce, B as yt, N as Ct, y as bt, b6 as fe, z as Et, b7 as wt, b8 as St, aj as Te, aT as xt, a0 as _t, d as Be, Z as Nt, b9 as kt, a1 as $t, F as Pt, D as Lt, u as Dt, aI as Y, aH as q, ba as Tt, bb as Bt, aK as It, bc as ne, aJ as Rt, bd as Mt, be as Ft, ax as At } from "../../Lexical.prod-Dgzi-S1E.js";
1
+ import { jsx as f, jsxs as A, Fragment as ke } from "react/jsx-runtime";
2
+ import { t as qe, r as Xe, o as P } from "../../LexicalComposerContext.prod-DOyoZx0P.js";
3
+ import { aw as Le, J as F, j as Qe, a as p, aE as oe, ay as ae, aF as O, O as se, $ as Ze, _ as B, N as g, Q as H, a8 as Ge, y as d, b0 as Ve, s as et, n as tt, i as rt, b1 as nt, b2 as ot, a4 as at, l as D, aL as st, A as it, b3 as lt, b4 as ut, M as re, b5 as ct, b6 as dt, ad as ft, C as mt, r as Pe, Y as pt, b7 as gt, b8 as ue, d as ce, a3 as ht, a1 as G, a2 as vt, ae as Te, b9 as de, R as yt, T as Ct, K as bt, ba as fe, P as Et, bb as wt, bc as St, ap as De, aY as xt, a6 as _t, U as Re, a5 as Nt, bd as $t, a7 as kt, a0 as Lt, Z as Pt, x as Tt, aN as q, aM as X, be as Dt, bf as Rt, aP as Bt, bg as ne, aO as It, bh as Mt, bi as At, aC as Ft } from "../../Lexical.prod-YJ1n9pVJ.js";
4
4
  import * as Ut from "react";
5
- import { useMemo as O, useLayoutEffect as j, useEffect as b, useState as M, Suspense as zt, forwardRef as Ie, useCallback as Kt, Component as Ht, createElement as me, createContext as Ot, useId as jt } from "react";
6
- import { a as Wt, T as Jt } from "../../TableCellResizerPlugin-9kvw_LpH.js";
7
- import { B as Xt, a as ie, G as Yt, d as Re, F as qt, X as Gt } from "../../LexicalExtension.prod-CNBWjmfs.js";
8
- import { flushSync as Vt, createPortal as Zt } from "react-dom";
9
- import { U as W, P as z, E as Qt } from "../../LexicalUtils.prod-D1mwAww-.js";
10
- import { R as pe, F as ge, m as er, g as tr } from "../../LexicalClipboard.prod-Dxc8c2F_.js";
11
- import { A as he, Z as ve, n as ye } from "../../LexicalSelection.prod-B0uiXGSS.js";
12
- import { l as Me, n as Fe, L as rr, b as nr } from "../../LexicalList.prod-DADZlhem.js";
13
- import { y as Ae, F as or, A as Ue, l as ar, z as sr } from "../../LexicalLink.prod-EEOzXxej.js";
14
- import { u as ir, h as lr, d as ze, N as ur, y as dr, b as cr, T as Ke, E as fr } from "../../LexicalTable.prod-QpQxZNNH.js";
5
+ import { useMemo as j, useLayoutEffect as J, useEffect as b, useState as M, Suspense as Kt, forwardRef as Be, useCallback as zt, Component as Ot, createElement as me, createContext as Ht, useId as jt } from "react";
6
+ import { a as Jt, T as Wt } from "../../TableCellResizerPlugin-BTfuE_kM.js";
7
+ import { T as Yt, d as ie, F as qt, c as Ie, B as Xt, Q as Qt } from "../../LexicalExtension.prod-2-giLTv9.js";
8
+ import { flushSync as Zt, createPortal as Gt } from "react-dom";
9
+ import { R as pe, F as ge, m as Vt, g as er } from "../../LexicalClipboard.prod-CDPAGlNs.js";
10
+ import { A as he, Z as ve, n as ye } from "../../LexicalSelection.prod-CpZE7Sey.js";
11
+ import { A as K, y as tr } from "../../LexicalUtils.prod-BQnuAaA9.js";
12
+ import { l as Me, n as Ae, L as rr, b as nr } from "../../LexicalList.prod-DMU0XSLO.js";
13
+ import { N as Fe, K as or, w as Ue, l as ar, z as sr } from "../../LexicalLink.prod-u8L4ioQd.js";
14
+ import { f as ir, g as lr, m as Ke, R as ur, T as cr, x as dr, A as ze, W as fr } from "../../LexicalTable.prod-BOlKc5zf.js";
15
15
  import { c as Ce } from "../../clsx-OuTLNxxd.js";
16
16
  import { exportMap as mr, mergeBoldStrongTags as pr, cleanUpTable as gr } from "./helpers.js";
17
17
  import { validateUrl as hr, MATCHERS as vr } from "./Plugins/LinkPlugin/helpers.js";
18
- import { s as B } from "../../RteEditor.module-DaBh86FK.js";
18
+ import { s as R } from "../../RteEditor.module-DaBh86FK.js";
19
19
  import { ToolBarPlugin as yr } from "./Plugins/ToolbarPlugin/ToolbarPlugin.js";
20
20
  import { useTranslation as Cr } from "./hooks/useTranslation.js";
21
- import "../../TablePlugin-BlXaQ0U6.js";
21
+ import "../../TablePlugin-bFqq2Yd9.js";
22
22
  import "./Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
23
23
  import "./hooks/components/Flyout.js";
24
24
  import "../Accordion/Accordion.js";
@@ -47,75 +47,75 @@ import { UvaTheme as wr } from "./UvaTheme/UvaTheme.js";
47
47
  import { EditorHeader as Sr } from "./EditorHeader/EditorHeader.js";
48
48
  import { LanguageProvider as xr, useLanguage as _r } from "./Providers/LanguageProvider.js";
49
49
  import { TableWrapperNode as Nr } from "./nodes/TableWrapperNode/TableWrapperNode.js";
50
- import { CourseCatalogueNode as kr, CourseCatalogueLinkPlugin as $r } from "./nodes/CourseCatalogueNode/CourseCatalogueNode.js";
51
- const He = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Pr = He ? j : b, G = { tag: oe };
52
- function Lr({ initialConfig: r, children: e }) {
53
- const t = O(() => {
54
- const { theme: n, namespace: o, nodes: a, onError: s, editorState: i, html: l } = r, d = Ye(null, n), u = Pe({ editable: r.editable, html: l, namespace: o, nodes: a, onError: (m) => s(m, u), theme: n });
50
+ import { CourseCatalogueNode as $r, CourseCatalogueLinkPlugin as kr } from "./nodes/CourseCatalogueNode/CourseCatalogueNode.js";
51
+ const Oe = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Lr = Oe ? J : b, Q = { tag: oe };
52
+ function Pr({ initialConfig: r, children: e }) {
53
+ const t = j(() => {
54
+ const { theme: n, namespace: o, nodes: a, onError: s, editorState: i, html: l } = r, c = qe(null, n), u = Le({ editable: r.editable, html: l, namespace: o, nodes: a, onError: (m) => s(m, u), theme: n });
55
55
  return (function(m, h) {
56
56
  if (h !== null) {
57
57
  if (h === void 0) m.update(() => {
58
- const S = A();
58
+ const S = F();
59
59
  if (S.isEmpty()) {
60
- const y = Ge();
60
+ const y = Qe();
61
61
  S.append(y);
62
- const x = He ? document.activeElement : null;
62
+ const x = Oe ? document.activeElement : null;
63
63
  (p() !== null || x !== null && x === m.getRootElement()) && y.select();
64
64
  }
65
- }, G);
65
+ }, Q);
66
66
  else if (h !== null) switch (typeof h) {
67
67
  case "string": {
68
68
  const S = m.parseEditorState(h);
69
- m.setEditorState(S, G);
69
+ m.setEditorState(S, Q);
70
70
  break;
71
71
  }
72
72
  case "object":
73
- m.setEditorState(h, G);
73
+ m.setEditorState(h, Q);
74
74
  break;
75
75
  case "function":
76
76
  m.update(() => {
77
- A().isEmpty() && h(m);
78
- }, G);
77
+ F().isEmpty() && h(m);
78
+ }, Q);
79
79
  }
80
80
  }
81
- })(u, i), [u, d];
81
+ })(u, i), [u, c];
82
82
  }, []);
83
- return Pr(() => {
83
+ return Lr(() => {
84
84
  const n = r.editable, [o] = t;
85
85
  o.setEditable(n === void 0 || n);
86
- }, []), f(qe.Provider, { value: t, children: e });
86
+ }, []), f(Xe.Provider, { value: t, children: e });
87
87
  }
88
- const Dr = ae({ name: "@lexical/react/ReactProvider" });
89
- function Tr() {
90
- return A().getTextContent();
88
+ const Tr = ae({ name: "@lexical/react/ReactProvider" });
89
+ function Dr() {
90
+ return F().getTextContent();
91
91
  }
92
- function Br(r, e = !0) {
92
+ function Rr(r, e = !0) {
93
93
  if (r) return !1;
94
- let t = Tr();
94
+ let t = Dr();
95
95
  return e && (t = t.trim()), t === "";
96
96
  }
97
- function Ir(r) {
98
- if (!Br(r, !1)) return !1;
99
- const e = A().getChildren(), t = e.length;
97
+ function Br(r) {
98
+ if (!Rr(r, !1)) return !1;
99
+ const e = F().getChildren(), t = e.length;
100
100
  if (t > 1) return !1;
101
101
  for (let n = 0; n < t; n++) {
102
102
  const o = e[n];
103
- if (H(o)) return !1;
103
+ if (O(o)) return !1;
104
104
  if (se(o)) {
105
- if (!Ve(o) || o.__indent !== 0) return !1;
105
+ if (!Ze(o) || o.__indent !== 0) return !1;
106
106
  const a = o.getChildren(), s = a.length;
107
107
  for (let i = 0; i < s; i++) {
108
108
  const l = a[n];
109
- if (!I(l)) return !1;
109
+ if (!B(l)) return !1;
110
110
  }
111
111
  }
112
112
  }
113
113
  return !0;
114
114
  }
115
- function Oe(r) {
116
- return () => Ir(r);
115
+ function He(r) {
116
+ return () => Br(r);
117
117
  }
118
- function Rr(r) {
118
+ function Ir(r) {
119
119
  const e = window.location.origin, t = (n) => {
120
120
  if (n.origin !== e) return;
121
121
  const o = r.getRootElement();
@@ -133,13 +133,13 @@ function Rr(r) {
133
133
  if (i && i.functionId === "makeChanges") {
134
134
  const l = i.args;
135
135
  if (l) {
136
- const [d, u, m, h, S] = l;
136
+ const [c, u, m, h, S] = l;
137
137
  r.update(() => {
138
138
  const y = p();
139
139
  if (g(y)) {
140
140
  const x = y.anchor;
141
141
  let E = x.getNode(), C = 0, v = 0;
142
- if (I(E) && d >= 0 && u >= 0 && (C = d, v = d + u, y.setTextNodeRange(E, C, E, v)), C === v && m === "" || (y.insertRawText(m), E = x.getNode()), I(E)) {
142
+ if (B(E) && c >= 0 && u >= 0 && (C = c, v = c + u, y.setTextNodeRange(E, C, E, v)), C === v && m === "" || (y.insertRawText(m), E = x.getNode()), B(E)) {
143
143
  C = h, v = h + S;
144
144
  const _ = E.getTextContentSize();
145
145
  C = C > _ ? _ : C, v = v > _ ? _ : v, y.setTextNodeRange(E, C, E, v);
@@ -167,10 +167,10 @@ function be(r, e) {
167
167
  }
168
168
  return null;
169
169
  }
170
- const U = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Mr = U && "documentMode" in document ? document.documentMode : null, Fr = U && /Mac|iPod|iPhone|iPad/.test(navigator.platform), Ar = !(!U || !("InputEvent" in window) || Mr) && "getTargetRanges" in new window.InputEvent("input"), Ur = U && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), Ee = U && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, zr = U && /^(?=.*Chrome).*/i.test(navigator.userAgent), Kr = U && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && Fr && !zr, we = tt("DRAG_DROP_PASTE_FILE");
171
- function V(r) {
170
+ const U = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Mr = U && "documentMode" in document ? document.documentMode : null, Ar = U && /Mac|iPod|iPhone|iPad/.test(navigator.platform), Fr = !(!U || !("InputEvent" in window) || Mr) && "getTargetRanges" in new window.InputEvent("input"), Ur = U && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), Ee = U && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Kr = U && /^(?=.*Chrome).*/i.test(navigator.userAgent), zr = U && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && Ar && !Kr, we = tt("DRAG_DROP_PASTE_FILE");
171
+ function Z(r) {
172
172
  let e = null;
173
- if (z(r, DragEvent) ? e = r.dataTransfer : z(r, ClipboardEvent) && (e = r.clipboardData), e === null) return [!1, [], !1];
173
+ if (K(r, DragEvent) ? e = r.dataTransfer : K(r, ClipboardEvent) && (e = r.clipboardData), e === null) return [!1, [], !1];
174
174
  const t = e.types, n = t.includes("Files"), o = t.includes("text/html") || t.includes("text/plain");
175
175
  return [n, Array.from(e.files), o];
176
176
  }
@@ -181,7 +181,7 @@ function Se(r) {
181
181
  for (let o = 0; o < n.length; o++) {
182
182
  const a = n[o], s = a.getKey();
183
183
  if (t.has(s)) continue;
184
- const i = Be(a, (d) => se(d) && !d.isInline());
184
+ const i = Re(a, (c) => se(c) && !c.isInline());
185
185
  if (i === null) continue;
186
186
  const l = i.getKey();
187
187
  i.canIndent() && !t.has(l) && (t.add(l), r(i));
@@ -190,25 +190,25 @@ function Se(r) {
190
190
  }
191
191
  function xe(r) {
192
192
  const e = re(r);
193
- return H(e);
193
+ return O(e);
194
194
  }
195
- function Q(r) {
195
+ function V(r) {
196
196
  for (const e of ["lowercase", "uppercase", "capitalize"]) r.hasFormat(e) && r.toggleFormat(e);
197
197
  }
198
- function Hr(r) {
199
- return W(r.registerCommand(Dt, (e) => {
198
+ function Or(r) {
199
+ return H(r.registerCommand(Tt, (e) => {
200
200
  const t = p();
201
- return !!T(t) && (t.clear(), !0);
202
- }, c), r.registerCommand(Z, (e) => {
201
+ return !!D(t) && (t.clear(), !0);
202
+ }, d), r.registerCommand(G, (e) => {
203
203
  const t = p();
204
- return g(t) ? (t.deleteCharacter(e), !0) : !!T(t) && (t.deleteNodes(), !0);
205
- }, c), r.registerCommand(Lt, (e) => {
204
+ return g(t) ? (t.deleteCharacter(e), !0) : !!D(t) && (t.deleteNodes(), !0);
205
+ }, d), r.registerCommand(Pt, (e) => {
206
206
  const t = p();
207
207
  return !!g(t) && (t.deleteWord(e), !0);
208
- }, c), r.registerCommand(Pt, (e) => {
208
+ }, d), r.registerCommand(Lt, (e) => {
209
209
  const t = p();
210
210
  return !!g(t) && (t.deleteLine(e), !0);
211
- }, c), r.registerCommand($t, (e) => {
211
+ }, d), r.registerCommand(kt, (e) => {
212
212
  const t = p();
213
213
  if (typeof e == "string") t !== null && t.insertText(e);
214
214
  else {
@@ -221,60 +221,60 @@ function Hr(r) {
221
221
  }
222
222
  }
223
223
  return !0;
224
- }, c), r.registerCommand(kt, () => {
224
+ }, d), r.registerCommand($t, () => {
225
225
  const e = p();
226
226
  return !!g(e) && (e.removeText(), !0);
227
- }, c), r.registerCommand(Nt, (e) => {
227
+ }, d), r.registerCommand(Nt, (e) => {
228
228
  const t = p();
229
229
  return !!g(t) && (t.formatText(e), !0);
230
- }, c), r.registerCommand(_t, (e) => {
230
+ }, d), r.registerCommand(_t, (e) => {
231
231
  const t = p();
232
- if (!g(t) && !T(t)) return !1;
232
+ if (!g(t) && !D(t)) return !1;
233
233
  const n = t.getNodes();
234
234
  for (const o of n) {
235
- const a = Be(o, (s) => se(s) && !s.isInline());
235
+ const a = Re(o, (s) => se(s) && !s.isInline());
236
236
  a !== null && a.setFormat(e);
237
237
  }
238
238
  return !0;
239
- }, c), r.registerCommand(ue, (e) => {
239
+ }, d), r.registerCommand(ue, (e) => {
240
240
  const t = p();
241
241
  return !!g(t) && (t.insertLineBreak(e), !0);
242
- }, c), r.registerCommand(de, () => {
242
+ }, d), r.registerCommand(ce, () => {
243
243
  const e = p();
244
244
  return !!g(e) && (e.insertParagraph(), !0);
245
- }, c), r.registerCommand(St, () => (Te([xt()]), !0), c), r.registerCommand(wt, () => Se((e) => {
245
+ }, d), r.registerCommand(St, () => (De([xt()]), !0), d), r.registerCommand(wt, () => Se((e) => {
246
246
  const t = e.getIndent();
247
247
  e.setIndent(t + 1);
248
- }), c), r.registerCommand(ce, () => Se((e) => {
248
+ }), d), r.registerCommand(de, () => Se((e) => {
249
249
  const t = e.getIndent();
250
250
  t > 0 && e.setIndent(Math.max(0, t - 1));
251
- }), c), r.registerCommand(Et, (e) => {
251
+ }), d), r.registerCommand(Et, (e) => {
252
252
  const t = p();
253
- if (T(t)) {
253
+ if (D(t)) {
254
254
  const n = t.getNodes();
255
255
  if (n.length > 0) return e.preventDefault(), n[0].selectPrevious(), !0;
256
256
  } else if (g(t)) {
257
257
  const n = fe(t.focus, !0);
258
- if (!e.shiftKey && H(n) && !n.isIsolated() && !n.isInline()) return n.selectPrevious(), e.preventDefault(), !0;
258
+ if (!e.shiftKey && O(n) && !n.isIsolated() && !n.isInline()) return n.selectPrevious(), e.preventDefault(), !0;
259
259
  }
260
260
  return !1;
261
- }, c), r.registerCommand(bt, (e) => {
261
+ }, d), r.registerCommand(bt, (e) => {
262
262
  const t = p();
263
- if (T(t)) {
263
+ if (D(t)) {
264
264
  const n = t.getNodes();
265
265
  if (n.length > 0) return e.preventDefault(), n[0].selectNext(0, 0), !0;
266
266
  } else if (g(t)) {
267
267
  if ((function(o) {
268
268
  const a = o.focus;
269
- return a.key === "root" && a.offset === A().getChildrenSize();
269
+ return a.key === "root" && a.offset === F().getChildrenSize();
270
270
  })(t)) return e.preventDefault(), !0;
271
271
  const n = fe(t.focus, !1);
272
- if (!e.shiftKey && H(n) && !n.isIsolated() && !n.isInline()) return n.selectNext(), e.preventDefault(), !0;
272
+ if (!e.shiftKey && O(n) && !n.isIsolated() && !n.isInline()) return n.selectNext(), e.preventDefault(), !0;
273
273
  }
274
274
  return !1;
275
- }, c), r.registerCommand(Ct, (e) => {
275
+ }, d), r.registerCommand(Ct, (e) => {
276
276
  const t = p();
277
- if (T(t)) {
277
+ if (D(t)) {
278
278
  const n = t.getNodes();
279
279
  if (n.length > 0) return e.preventDefault(), he(n[0]) ? n[0].selectNext(0, 0) : n[0].selectPrevious(), !0;
280
280
  }
@@ -284,16 +284,16 @@ function Hr(r) {
284
284
  return e.preventDefault(), ye(t, n, !0), !0;
285
285
  }
286
286
  return !1;
287
- }, c), r.registerCommand(yt, (e) => {
287
+ }, d), r.registerCommand(yt, (e) => {
288
288
  const t = p();
289
- if (T(t)) {
289
+ if (D(t)) {
290
290
  const o = t.getNodes();
291
291
  if (o.length > 0) return e.preventDefault(), he(o[0]) ? o[0].selectPrevious() : o[0].selectNext(0, 0), !0;
292
292
  }
293
293
  if (!g(t)) return !1;
294
294
  const n = e.shiftKey;
295
295
  return !!ve(t, !1) && (e.preventDefault(), ye(t, n, !1), !0);
296
- }, c), r.registerCommand(vt, (e) => {
296
+ }, d), r.registerCommand(vt, (e) => {
297
297
  if (xe(e.target)) return !1;
298
298
  const t = p();
299
299
  if (g(t)) {
@@ -302,43 +302,43 @@ function Hr(r) {
302
302
  const { anchor: o } = n;
303
303
  if (o.offset !== 0) return !1;
304
304
  const a = o.getNode();
305
- if (De(a)) return !1;
306
- const s = Qt(a);
305
+ if (Te(a)) return !1;
306
+ const s = tr(a);
307
307
  return s.getIndent() > 0 && (s.is(a) || a.is(s.getFirstDescendant()));
308
- })(t)) return e.preventDefault(), r.dispatchCommand(ce, void 0);
308
+ })(t)) return e.preventDefault(), r.dispatchCommand(de, void 0);
309
309
  if (Ee && navigator.language === "ko-KR") return !1;
310
- } else if (!T(t)) return !1;
311
- return e.preventDefault(), r.dispatchCommand(Z, !0);
312
- }, c), r.registerCommand(ht, (e) => {
310
+ } else if (!D(t)) return !1;
311
+ return e.preventDefault(), r.dispatchCommand(G, !0);
312
+ }, d), r.registerCommand(ht, (e) => {
313
313
  if (xe(e.target)) return !1;
314
314
  const t = p();
315
- return !(!g(t) && !T(t)) && (e.preventDefault(), r.dispatchCommand(Z, !1));
316
- }, c), r.registerCommand(gt, (e) => {
315
+ return !(!g(t) && !D(t)) && (e.preventDefault(), r.dispatchCommand(G, !1));
316
+ }, d), r.registerCommand(gt, (e) => {
317
317
  const t = p();
318
318
  if (!g(t)) return !1;
319
- if (Q(t), e !== null) {
320
- if ((Ee || Ur || Kr) && Ar) return !1;
319
+ if (V(t), e !== null) {
320
+ if ((Ee || Ur || zr) && Fr) return !1;
321
321
  if (e.preventDefault(), e.shiftKey) return r.dispatchCommand(ue, !1);
322
322
  }
323
- return r.dispatchCommand(de, void 0);
324
- }, c), r.registerCommand(pt, () => {
323
+ return r.dispatchCommand(ce, void 0);
324
+ }, d), r.registerCommand(pt, () => {
325
325
  const e = p();
326
326
  return !!g(e) && (r.blur(), !0);
327
- }, c), r.registerCommand(ct, (e) => {
328
- const [, t] = V(e);
327
+ }, d), r.registerCommand(dt, (e) => {
328
+ const [, t] = Z(e);
329
329
  if (t.length > 0) {
330
330
  const o = be(e.clientX, e.clientY);
331
331
  if (o !== null) {
332
332
  const { offset: a, node: s } = o, i = re(s);
333
333
  if (i !== null) {
334
334
  const l = ft();
335
- if (I(i)) l.anchor.set(i.getKey(), a, "text"), l.focus.set(i.getKey(), a, "text");
335
+ if (B(i)) l.anchor.set(i.getKey(), a, "text"), l.focus.set(i.getKey(), a, "text");
336
336
  else {
337
337
  const u = i.getParentOrThrow().getKey(), m = i.getIndexWithinParent() + 1;
338
338
  l.anchor.set(u, m, "element"), l.focus.set(u, m, "element");
339
339
  }
340
- const d = mt(l);
341
- Le(d);
340
+ const c = mt(l);
341
+ Pe(c);
342
342
  }
343
343
  r.dispatchCommand(we, t);
344
344
  }
@@ -346,149 +346,149 @@ function Hr(r) {
346
346
  }
347
347
  const n = p();
348
348
  return !!g(n);
349
- }, c), r.registerCommand(dt, (e) => {
350
- const [t] = V(e), n = p();
349
+ }, d), r.registerCommand(ct, (e) => {
350
+ const [t] = Z(e), n = p();
351
351
  return !(t && !g(n));
352
- }, c), r.registerCommand(ut, (e) => {
353
- const [t] = V(e), n = p();
352
+ }, d), r.registerCommand(ut, (e) => {
353
+ const [t] = Z(e), n = p();
354
354
  if (t && !g(n)) return !1;
355
355
  const o = be(e.clientX, e.clientY);
356
356
  if (o !== null) {
357
357
  const a = re(o.node);
358
- H(a) && e.preventDefault();
358
+ O(a) && e.preventDefault();
359
359
  }
360
360
  return !0;
361
- }, c), r.registerCommand(it, () => (lt(), !0), c), r.registerCommand(st, (e) => (ge(r, z(e, ClipboardEvent) ? e : null), !0), c), r.registerCommand(at, (e) => ((async function(t, n) {
362
- await ge(n, z(t, ClipboardEvent) ? t : null), n.update(() => {
361
+ }, d), r.registerCommand(it, () => (lt(), !0), d), r.registerCommand(st, (e) => (ge(r, K(e, ClipboardEvent) ? e : null), !0), d), r.registerCommand(at, (e) => ((async function(t, n) {
362
+ await ge(n, K(t, ClipboardEvent) ? t : null), n.update(() => {
363
363
  const o = p();
364
- g(o) ? o.removeText() : T(o) && o.getNodes().forEach((a) => a.remove());
364
+ g(o) ? o.removeText() : D(o) && o.getNodes().forEach((a) => a.remove());
365
365
  });
366
- })(e, r), !0), c), r.registerCommand(et, (e) => {
367
- const [, t, n] = V(e);
366
+ })(e, r), !0), d), r.registerCommand(et, (e) => {
367
+ const [, t, n] = Z(e);
368
368
  return t.length > 0 && !n ? (r.dispatchCommand(we, t), !0) : rt(e.target) && nt(e.target) ? !1 : p() !== null && ((function(o, a) {
369
369
  o.preventDefault(), a.update(() => {
370
- const s = p(), i = z(o, InputEvent) || z(o, KeyboardEvent) ? null : o.clipboardData;
370
+ const s = p(), i = K(o, InputEvent) || K(o, KeyboardEvent) ? null : o.clipboardData;
371
371
  i != null && s !== null && pe(i, s, a);
372
372
  }, { tag: ot });
373
373
  })(e, r), !0);
374
- }, c), r.registerCommand(Qe, (e) => {
374
+ }, d), r.registerCommand(Ve, (e) => {
375
375
  const t = p();
376
- return g(t) && Q(t), !1;
377
- }, c), r.registerCommand(Ze, (e) => {
376
+ return g(t) && V(t), !1;
377
+ }, d), r.registerCommand(Ge, (e) => {
378
378
  const t = p();
379
- return g(t) && Q(t), !1;
380
- }, c));
379
+ return g(t) && V(t), !1;
380
+ }, d));
381
381
  }
382
- function Or(r, ...e) {
382
+ function Hr(r, ...e) {
383
383
  const t = new URL("https://lexical.dev/docs/error"), n = new URLSearchParams();
384
384
  n.append("code", r);
385
385
  for (const o of e) n.append("v", o);
386
386
  throw t.search = n.toString(), Error(`Minified Lexical error #${r}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
387
387
  }
388
- const le = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? j : b;
388
+ const le = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? J : b;
389
389
  function jr({ editor: r, ErrorBoundary: e }) {
390
390
  return (function(t, n) {
391
391
  const [o, a] = M(() => t.getDecorators());
392
392
  return le(() => t.registerDecoratorListener((s) => {
393
- Vt(() => {
393
+ Zt(() => {
394
394
  a(s);
395
395
  });
396
396
  }), [t]), b(() => {
397
397
  a(t.getDecorators());
398
- }, [t]), O(() => {
398
+ }, [t]), j(() => {
399
399
  const s = [], i = Object.keys(o);
400
400
  for (let l = 0; l < i.length; l++) {
401
- const d = i[l], u = f(n, { onError: (h) => t._onError(h), children: f(zt, { fallback: null, children: o[d] }) }), m = t.getElementByKey(d);
402
- m !== null && s.push(Zt(u, m, d));
401
+ const c = i[l], u = f(n, { onError: (h) => t._onError(h), children: f(Kt, { fallback: null, children: o[c] }) }), m = t.getElementByKey(c);
402
+ m !== null && s.push(Gt(u, m, c));
403
403
  }
404
404
  return s;
405
405
  }, [n, o, t]);
406
406
  })(r, e);
407
407
  }
408
- function Wr({ editor: r, ErrorBoundary: e }) {
408
+ function Jr({ editor: r, ErrorBoundary: e }) {
409
409
  return (function(t) {
410
- const n = Xt.maybeFromEditor(t);
411
- if (n && n.hasExtensionByName(Dr.name)) {
412
- for (const o of ["@lexical/plain-text", "@lexical/rich-text"]) n.hasExtensionByName(o) && Or(320, o);
410
+ const n = Yt.maybeFromEditor(t);
411
+ if (n && n.hasExtensionByName(Tr.name)) {
412
+ for (const o of ["@lexical/plain-text", "@lexical/rich-text"]) n.hasExtensionByName(o) && Hr(320, o);
413
413
  return !0;
414
414
  }
415
415
  return !1;
416
416
  })(r) ? null : f(jr, { editor: r, ErrorBoundary: e });
417
417
  }
418
418
  function _e(r) {
419
- return r.getEditorState().read(Oe(r.isComposing()));
419
+ return r.getEditorState().read(He(r.isComposing()));
420
420
  }
421
- function Jr({ contentEditable: r, placeholder: e = null, ErrorBoundary: t }) {
422
- const [n] = L();
421
+ function Wr({ contentEditable: r, placeholder: e = null, ErrorBoundary: t }) {
422
+ const [n] = P();
423
423
  return (function(o) {
424
- le(() => W(Hr(o), Rr(o)), [o]);
425
- })(n), F($e, { children: [r, f(Xr, { content: e }), f(Wr, { editor: n, ErrorBoundary: t })] });
424
+ le(() => H(Or(o), Ir(o)), [o]);
425
+ })(n), A(ke, { children: [r, f(Yr, { content: e }), f(Jr, { editor: n, ErrorBoundary: t })] });
426
426
  }
427
- function Xr({ content: r }) {
428
- const [e] = L(), t = (function(o) {
427
+ function Yr({ content: r }) {
428
+ const [e] = P(), t = (function(o) {
429
429
  const [a, s] = M(() => _e(o));
430
430
  return le(() => {
431
431
  function i() {
432
432
  const l = _e(o);
433
433
  s(l);
434
434
  }
435
- return i(), W(o.registerUpdateListener(() => {
435
+ return i(), H(o.registerUpdateListener(() => {
436
436
  i();
437
437
  }), o.registerEditableListener(() => {
438
438
  i();
439
439
  }));
440
440
  }, [o]), a;
441
- })(e), n = Wt();
441
+ })(e), n = Jt();
442
442
  return t ? typeof r == "function" ? r(n) : r : null;
443
443
  }
444
- const je = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? j : b;
445
- function Yr({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: n, ariaDescribedBy: o, ariaErrorMessage: a, ariaExpanded: s, ariaInvalid: i, ariaLabel: l, ariaLabelledBy: d, ariaMultiline: u, ariaOwns: m, ariaRequired: h, autoCapitalize: S, className: y, id: x, role: E = "textbox", spellCheck: C = !0, style: v, tabIndex: _, "data-testid": D, ...P }, $) {
446
- const [w, R] = M(r.isEditable()), N = Kt((k) => {
447
- k && k.ownerDocument && k.ownerDocument.defaultView ? r.setRootElement(k) : r.setRootElement(null);
448
- }, [r]), J = O(() => /* @__PURE__ */ (function(...k) {
449
- return (X) => {
450
- for (const K of k) typeof K == "function" ? K(X) : K != null && (K.current = X);
444
+ const je = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? J : b;
445
+ function qr({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: n, ariaDescribedBy: o, ariaErrorMessage: a, ariaExpanded: s, ariaInvalid: i, ariaLabel: l, ariaLabelledBy: c, ariaMultiline: u, ariaOwns: m, ariaRequired: h, autoCapitalize: S, className: y, id: x, role: E = "textbox", spellCheck: C = !0, style: v, tabIndex: _, "data-testid": T, ...L }, k) {
446
+ const [w, I] = M(r.isEditable()), N = zt(($) => {
447
+ $ && $.ownerDocument && $.ownerDocument.defaultView ? r.setRootElement($) : r.setRootElement(null);
448
+ }, [r]), W = j(() => /* @__PURE__ */ (function(...$) {
449
+ return (Y) => {
450
+ for (const z of $) typeof z == "function" ? z(Y) : z != null && (z.current = Y);
451
451
  };
452
- })($, N), [N, $]);
453
- return je(() => (R(r.isEditable()), r.registerEditableListener((k) => {
454
- R(k);
455
- })), [r]), f("div", { "aria-activedescendant": w ? e : void 0, "aria-autocomplete": w ? t : "none", "aria-controls": w ? n : void 0, "aria-describedby": o, ...a != null ? { "aria-errormessage": a } : {}, "aria-expanded": w && E === "combobox" ? !!s : void 0, ...i != null ? { "aria-invalid": i } : {}, "aria-label": l, "aria-labelledby": d, "aria-multiline": u, "aria-owns": w ? m : void 0, "aria-readonly": !w || void 0, "aria-required": h, autoCapitalize: S, className: y, contentEditable: w, "data-testid": D, id: x, ref: J, role: E, spellCheck: C, style: v, tabIndex: _, ...P });
452
+ })(k, N), [N, k]);
453
+ return je(() => (I(r.isEditable()), r.registerEditableListener(($) => {
454
+ I($);
455
+ })), [r]), f("div", { "aria-activedescendant": w ? e : void 0, "aria-autocomplete": w ? t : "none", "aria-controls": w ? n : void 0, "aria-describedby": o, ...a != null ? { "aria-errormessage": a } : {}, "aria-expanded": w && E === "combobox" ? !!s : void 0, ...i != null ? { "aria-invalid": i } : {}, "aria-label": l, "aria-labelledby": c, "aria-multiline": u, "aria-owns": w ? m : void 0, "aria-readonly": !w || void 0, "aria-required": h, autoCapitalize: S, className: y, contentEditable: w, "data-testid": T, id: x, ref: W, role: E, spellCheck: C, style: v, tabIndex: _, ...L });
456
456
  }
457
- const qr = Ie(Yr);
457
+ const Xr = Be(qr);
458
458
  function Ne(r) {
459
- return r.getEditorState().read(Oe(r.isComposing()));
459
+ return r.getEditorState().read(He(r.isComposing()));
460
460
  }
461
- const Gr = Ie(Vr);
462
- function Vr(r, e) {
463
- const { placeholder: t, ...n } = r, [o] = L();
464
- return F($e, { children: [f(qr, { editor: o, ...n, ref: e }), t != null && f(Zr, { editor: o, content: t })] });
461
+ const Qr = Be(Zr);
462
+ function Zr(r, e) {
463
+ const { placeholder: t, ...n } = r, [o] = P();
464
+ return A(ke, { children: [f(Xr, { editor: o, ...n, ref: e }), t != null && f(Gr, { editor: o, content: t })] });
465
465
  }
466
- function Zr({ content: r, editor: e }) {
466
+ function Gr({ content: r, editor: e }) {
467
467
  const t = (function(s) {
468
468
  const [i, l] = M(() => Ne(s));
469
469
  return je(() => {
470
- function d() {
470
+ function c() {
471
471
  const u = Ne(s);
472
472
  l(u);
473
473
  }
474
- return d(), W(s.registerUpdateListener(() => {
475
- d();
474
+ return c(), H(s.registerUpdateListener(() => {
475
+ c();
476
476
  }), s.registerEditableListener(() => {
477
- d();
477
+ c();
478
478
  }));
479
479
  }, [s]), i;
480
480
  })(e), [n, o] = M(e.isEditable());
481
- if (j(() => (o(e.isEditable()), e.registerEditableListener((s) => {
481
+ if (J(() => (o(e.isEditable()), e.registerEditableListener((s) => {
482
482
  o(s);
483
483
  })), [e]), !t) return null;
484
484
  let a = null;
485
485
  return typeof r == "function" ? a = r(n) : r !== null && (a = r), a === null ? null : f("div", { "aria-hidden": !0, children: a });
486
486
  }
487
- const Qr = Ot(null), ee = {
487
+ const Vr = Ht(null), ee = {
488
488
  didCatch: !1,
489
489
  error: null
490
490
  };
491
- class en extends Ht {
491
+ class en extends Ot {
492
492
  constructor(e) {
493
493
  super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = ee;
494
494
  }
@@ -531,7 +531,7 @@ class en extends Ht {
531
531
  throw s;
532
532
  }
533
533
  return me(
534
- Qr.Provider,
534
+ Vr.Provider,
535
535
  {
536
536
  value: {
537
537
  didCatch: a,
@@ -549,9 +549,9 @@ function tn(r = [], e = []) {
549
549
  function rn({ children: r, onError: e }) {
550
550
  return f(en, { fallback: f("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: e, children: r });
551
551
  }
552
- const nn = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? j : b;
552
+ const nn = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? J : b;
553
553
  function on({ ignoreHistoryMergeTagChange: r = !0, ignoreSelectionChange: e = !1, onChange: t }) {
554
- const [n] = L();
554
+ const [n] = P();
555
555
  return nn(() => {
556
556
  if (t) return n.registerUpdateListener(({ editorState: o, dirtyElements: a, dirtyLeaves: s, prevEditorState: i, tags: l }) => {
557
557
  e && a.size === 0 && s.size === 0 || r && l.has(oe) || i.isEmpty() || t(o, n, l);
@@ -559,9 +559,9 @@ function on({ ignoreHistoryMergeTagChange: r = !0, ignoreSelectionChange: e = !1
559
559
  }, [n, r, e, t]), null;
560
560
  }
561
561
  function an({ hasStrictIndent: r = !1 }) {
562
- const [e] = L();
562
+ const [e] = P();
563
563
  return b(() => {
564
- if (!e.hasNodes([Me, Fe])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
564
+ if (!e.hasNodes([Me, Ae])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
565
565
  }, [e]), b(() => {
566
566
  if (r) return rr(e);
567
567
  }, [e, r]), (function(t) {
@@ -569,9 +569,9 @@ function an({ hasStrictIndent: r = !1 }) {
569
569
  })(e), null;
570
570
  }
571
571
  function sn({ validateUrl: r, attributes: e }) {
572
- const [t] = L();
572
+ const [t] = P();
573
573
  return b(() => {
574
- if (!t.hasNodes([Ae])) throw new Error("LinkPlugin: LinkNode not registered on editor");
574
+ if (!t.hasNodes([Fe])) throw new Error("LinkPlugin: LinkNode not registered on editor");
575
575
  }), b(() => or(t, ie({ attributes: e, validateUrl: r })), [t, r, e]), null;
576
576
  }
577
577
  function ln(r, e, t) {
@@ -585,39 +585,39 @@ function ln(r, e, t) {
585
585
  }), b(() => ar(r, { changeHandlers: t ? [t] : [], matchers: e }), [r, e, t]);
586
586
  }
587
587
  function un({ matchers: r, onChange: e }) {
588
- const [t] = L();
588
+ const [t] = P();
589
589
  return ln(t, r, e), null;
590
590
  }
591
- function dn({ newTab: r = !0, disabled: e = !1 }) {
592
- const [t] = L();
591
+ function cn({ newTab: r = !0, disabled: e = !1 }) {
592
+ const [t] = P();
593
593
  return b(() => sr(t, ie({ disabled: e, newTab: r })), [t, r, e]), null;
594
594
  }
595
- function cn(r, e, t, n, o) {
595
+ function dn(r, e, t, n, o) {
596
596
  if (r === null || t.size === 0 && n.size === 0 && !o) return 0;
597
597
  const a = e._selection, s = r._selection;
598
598
  if (o) return 1;
599
599
  if (!(g(a) && g(s) && s.isCollapsed() && a.isCollapsed())) return 0;
600
600
  const i = (function(C, v, _) {
601
- const D = C._nodeMap, P = [];
602
- for (const $ of v) {
603
- const w = D.get($);
604
- w !== void 0 && P.push(w);
601
+ const T = C._nodeMap, L = [];
602
+ for (const k of v) {
603
+ const w = T.get(k);
604
+ w !== void 0 && L.push(w);
605
605
  }
606
- for (const [$, w] of _) {
606
+ for (const [k, w] of _) {
607
607
  if (!w) continue;
608
- const R = D.get($);
609
- R === void 0 || De(R) || P.push(R);
608
+ const I = T.get(k);
609
+ I === void 0 || Te(I) || L.push(I);
610
610
  }
611
- return P;
611
+ return L;
612
612
  })(e, t, n);
613
613
  if (i.length === 0) return 0;
614
614
  if (i.length > 1) {
615
615
  const C = e._nodeMap, v = C.get(a.anchor.key), _ = C.get(s.anchor.key);
616
- return v && _ && !r._nodeMap.has(v.__key) && I(v) && v.__text.length === 1 && a.anchor.offset === 1 ? 2 : 0;
616
+ return v && _ && !r._nodeMap.has(v.__key) && B(v) && v.__text.length === 1 && a.anchor.offset === 1 ? 2 : 0;
617
617
  }
618
- const l = i[0], d = r._nodeMap.get(l.__key);
619
- if (!I(d) || !I(l) || d.__mode !== l.__mode) return 0;
620
- const u = d.__text, m = l.__text;
618
+ const l = i[0], c = r._nodeMap.get(l.__key);
619
+ if (!B(c) || !B(l) || c.__mode !== l.__mode) return 0;
620
+ const u = c.__text, m = l.__text;
621
621
  if (u === m) return 0;
622
622
  const h = a.anchor, S = s.anchor;
623
623
  if (h.key !== S.key || h.type !== "text") return 0;
@@ -626,101 +626,101 @@ function cn(r, e, t, n, o) {
626
626
  }
627
627
  function fn(r, e) {
628
628
  let t = Date.now(), n = 0;
629
- return (o, a, s, i, l, d) => {
629
+ return (o, a, s, i, l, c) => {
630
630
  const u = Date.now();
631
- if (d.has(ne)) return n = 0, t = u, 2;
632
- const m = cn(o, a, i, l, r.isComposing()), h = (() => {
633
- const S = s === null || s.editor === r, y = d.has(Mt);
634
- if (!y && S && d.has(oe)) return 0;
631
+ if (c.has(ne)) return n = 0, t = u, 2;
632
+ const m = dn(o, a, i, l, r.isComposing()), h = (() => {
633
+ const S = s === null || s.editor === r, y = c.has(Mt);
634
+ if (!y && S && c.has(oe)) return 0;
635
635
  if (o === null) return 1;
636
636
  const x = a._selection;
637
637
  if (!(i.size > 0 || l.size > 0)) return x !== null ? 0 : 2;
638
638
  const E = typeof e == "number" ? e : e.peek();
639
639
  return y === !1 && m !== 0 && m === n && u < t + E && S || i.size === 1 && (function(C, v, _) {
640
- const D = v._nodeMap.get(C), P = _._nodeMap.get(C), $ = v._selection, w = _._selection;
641
- return !(g($) && g(w) && $.anchor.type === "element" && $.focus.type === "element" && w.anchor.type === "text" && w.focus.type === "text" || !I(D) || !I(P) || D.__parent !== P.__parent) && JSON.stringify(v.read(() => D.exportJSON())) === JSON.stringify(_.read(() => P.exportJSON()));
640
+ const T = v._nodeMap.get(C), L = _._nodeMap.get(C), k = v._selection, w = _._selection;
641
+ return !(g(k) && g(w) && k.anchor.type === "element" && k.focus.type === "element" && w.anchor.type === "text" && w.focus.type === "text" || !B(T) || !B(L) || T.__parent !== L.__parent) && JSON.stringify(v.read(() => T.exportJSON())) === JSON.stringify(_.read(() => L.exportJSON()));
642
642
  })(Array.from(i)[0], o, a) ? 0 : 1;
643
643
  })();
644
644
  return t = u, n = m, h;
645
645
  };
646
646
  }
647
- function ke(r) {
647
+ function $e(r) {
648
648
  r.undoStack = [], r.redoStack = [], r.current = null;
649
649
  }
650
- function We(r, e, t) {
650
+ function Je(r, e, t) {
651
651
  const n = fn(r, t);
652
- return W(r.registerCommand(Rt, () => ((function(a, s) {
652
+ return H(r.registerCommand(It, () => ((function(a, s) {
653
653
  const i = s.redoStack, l = s.undoStack;
654
654
  if (l.length !== 0) {
655
- const d = s.current, u = l.pop();
656
- d !== null && (i.push(d), a.dispatchCommand(Y, !0)), l.length === 0 && a.dispatchCommand(q, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: ne });
655
+ const c = s.current, u = l.pop();
656
+ c !== null && (i.push(c), a.dispatchCommand(q, !0)), l.length === 0 && a.dispatchCommand(X, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: ne });
657
657
  }
658
- })(r, e), !0), c), r.registerCommand(It, () => ((function(a, s) {
658
+ })(r, e), !0), d), r.registerCommand(Bt, () => ((function(a, s) {
659
659
  const i = s.redoStack, l = s.undoStack;
660
660
  if (i.length !== 0) {
661
- const d = s.current;
662
- d !== null && (l.push(d), a.dispatchCommand(q, !0));
661
+ const c = s.current;
662
+ c !== null && (l.push(c), a.dispatchCommand(X, !0));
663
663
  const u = i.pop();
664
- i.length === 0 && a.dispatchCommand(Y, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: ne });
664
+ i.length === 0 && a.dispatchCommand(q, !1), s.current = u || null, u && u.editor.setEditorState(u.editorState, { tag: ne });
665
665
  }
666
- })(r, e), !0), c), r.registerCommand(Bt, () => (ke(e), !1), c), r.registerCommand(Tt, () => (ke(e), r.dispatchCommand(Y, !1), r.dispatchCommand(q, !1), !0), c), r.registerUpdateListener(({ editorState: a, prevEditorState: s, dirtyLeaves: i, dirtyElements: l, tags: d }) => {
666
+ })(r, e), !0), d), r.registerCommand(Rt, () => ($e(e), !1), d), r.registerCommand(Dt, () => ($e(e), r.dispatchCommand(q, !1), r.dispatchCommand(X, !1), !0), d), r.registerUpdateListener(({ editorState: a, prevEditorState: s, dirtyLeaves: i, dirtyElements: l, tags: c }) => {
667
667
  const u = e.current, m = e.redoStack, h = e.undoStack, S = u === null ? null : u.editorState;
668
668
  if (u !== null && a === S) return;
669
- const y = n(s, a, u, i, l, d);
670
- if (y === 1) m.length !== 0 && (e.redoStack = [], r.dispatchCommand(Y, !1)), u !== null && (h.push({ ...u }), r.dispatchCommand(q, !0));
669
+ const y = n(s, a, u, i, l, c);
670
+ if (y === 1) m.length !== 0 && (e.redoStack = [], r.dispatchCommand(q, !1)), u !== null && (h.push({ ...u }), r.dispatchCommand(X, !0));
671
671
  else if (y === 2) return;
672
672
  e.current = { editor: r, editorState: a };
673
673
  }));
674
674
  }
675
- function Je() {
675
+ function We() {
676
676
  return { current: null, redoStack: [], undoStack: [] };
677
677
  }
678
- const te = ae({ build: (r, { delay: e, createInitialHistoryState: t, disabled: n }) => ie({ delay: e, disabled: n, historyState: t(r) }), config: At({ createInitialHistoryState: Je, delay: 300, disabled: typeof window > "u" }), name: "@lexical/history/History", register: (r, e, t) => {
678
+ const te = ae({ build: (r, { delay: e, createInitialHistoryState: t, disabled: n }) => ie({ delay: e, disabled: n, historyState: t(r) }), config: Ft({ createInitialHistoryState: We, delay: 300, disabled: typeof window > "u" }), name: "@lexical/history/History", register: (r, e, t) => {
679
679
  const n = t.getOutput();
680
- return Re(() => n.disabled.value ? void 0 : We(r, n.historyState.value, n.delay));
680
+ return Ie(() => n.disabled.value ? void 0 : Je(r, n.historyState.value, n.delay));
681
681
  } });
682
- ae({ dependencies: [Ft(te, { createInitialHistoryState: () => {
682
+ ae({ dependencies: [At(te, { createInitialHistoryState: () => {
683
683
  throw new Error("SharedHistory did not inherit parent history");
684
684
  }, disabled: !0 })], name: "@lexical/history/SharedHistory", register(r, e, t) {
685
685
  const { output: n } = t.getDependency(te), o = (function(s) {
686
- return s ? Yt(s, te.name) : null;
686
+ return s ? qt(s, te.name) : null;
687
687
  })(r._parentEditor);
688
688
  if (!o) return () => {
689
689
  };
690
690
  const a = o.output;
691
- return Re(() => qt(() => {
691
+ return Ie(() => Xt(() => {
692
692
  n.delay.value = a.delay.value, n.historyState.value = a.historyState.value, n.disabled.value = a.disabled.value;
693
693
  }));
694
694
  } });
695
695
  function mn({ delay: r, externalHistoryState: e }) {
696
- const [t] = L();
696
+ const [t] = P();
697
697
  return (function(n, o, a = 1e3) {
698
- const s = O(() => o || Je(), [o]);
699
- b(() => We(n, s, a), [a, n, s]);
698
+ const s = j(() => o || We(), [o]);
699
+ b(() => Je(n, s, a), [a, n, s]);
700
700
  })(t, e, r), null;
701
701
  }
702
702
  function pn({ hasCellMerge: r = !0, hasCellBackgroundColor: e = !0, hasTabHandler: t = !0, hasHorizontalScroll: n = !1, hasNestedTables: o = !1 }) {
703
- const [a] = L();
703
+ const [a] = P();
704
704
  b(() => {
705
- ir(a) !== n && (lr(a, n), a.registerNodeTransform(ze, () => {
705
+ ir(a) !== n && (lr(a, n), a.registerNodeTransform(Ke, () => {
706
706
  })());
707
707
  }, [a, n]);
708
- const s = O(() => Gt(!1), []);
709
- return s.peek() !== o && (s.value = o), b(() => ur(a, { hasNestedTables: s }), [a, s]), b(() => dr(a, t), [a, t]), b(() => {
710
- if (!r) return cr(a);
708
+ const s = j(() => Qt(!1), []);
709
+ return s.peek() !== o && (s.value = o), b(() => ur(a, { hasNestedTables: s }), [a, s]), b(() => cr(a, t), [a, t]), b(() => {
710
+ if (!r) return dr(a);
711
711
  }, [a, r]), b(() => {
712
- if (!e) return a.registerNodeTransform(Ke, (i) => {
712
+ if (!e) return a.registerNodeTransform(ze, (i) => {
713
713
  i.getBackgroundColor() !== null && i.setBackgroundColor(null);
714
714
  });
715
715
  }, [a, e, r]), null;
716
716
  }
717
717
  function gn({ editorRef: r }) {
718
- const [e] = L();
718
+ const [e] = P();
719
719
  return Ut.useEffect(() => {
720
720
  typeof r == "function" ? r(e) : typeof r == "object" && (r.current = e);
721
721
  }, [e]), null;
722
722
  }
723
- const Xe = 200, hn = ({
723
+ const Ye = 200, hn = ({
724
724
  currentLanguage: r = "NL",
725
725
  initialValue: e = "",
726
726
  placeholder: t = "",
@@ -730,13 +730,13 @@ const Xe = 200, hn = ({
730
730
  notValid: s = !1,
731
731
  notValidatedText: i = "",
732
732
  maxHeightInRem: l = "20rem",
733
- maxWords: d = Xe,
733
+ maxWords: c = Ye,
734
734
  rteRef: u = null,
735
735
  onChange: m,
736
736
  onCatalogueLinkSearch: h,
737
737
  catalogueSearchResponse: S = { state: "idle", results: [] }
738
738
  }) => {
739
- const { switchLanguage: y } = _r(), x = Cr(), [E] = M(() => Pe()), [C, v] = M(0), [_, D] = M(0), P = jt(), $ = {
739
+ const { switchLanguage: y } = _r(), x = Cr(), [E] = M(() => Le()), [C, v] = M(0), [_, T] = M(0), L = jt(), k = {
740
740
  html: {
741
741
  export: mr
742
742
  },
@@ -748,23 +748,23 @@ const Xe = 200, hn = ({
748
748
  },
749
749
  nodes: [
750
750
  Me,
751
- Fe,
752
751
  Ae,
752
+ Fe,
753
753
  Ue,
754
- Ke,
755
- fr,
756
754
  ze,
755
+ fr,
756
+ Ke,
757
757
  Nr,
758
- kr
758
+ $r
759
759
  ],
760
760
  editorState: (N) => {
761
- const k = new DOMParser().parseFromString(e, "text/html"), X = er(N, k);
762
- A().clear(), Te(X), Le(null);
761
+ const $ = new DOMParser().parseFromString(e, "text/html"), Y = Vt(N, $);
762
+ F().clear(), De(Y), Pe(null);
763
763
  }
764
- }, w = (N) => N.trim().length === 0 ? 0 : N.split(" ").length, R = (N, J) => {
764
+ }, w = (N) => N.trim().length === 0 ? 0 : N.split(" ").length, I = (N, W) => {
765
765
  N.read(() => {
766
- let k = "";
767
- v(w(A().getTextContent().replace(/\s+/g, " ").trim())), k = pr(tr(J)), k = gr(k), m(k);
766
+ let $ = "";
767
+ v(w(F().getTextContent().replace(/\s+/g, " ").trim())), $ = pr(er(W)), $ = gr($), m($);
768
768
  });
769
769
  };
770
770
  return b(() => {
@@ -772,22 +772,22 @@ const Xe = 200, hn = ({
772
772
  }, [r, y]), b(() => {
773
773
  const N = e.replace(/<br\s*\/?>|&nbsp;/gi, " ").replace(/<\/?[^>]+(>|$)|&[a-z]+;/g, "").replace(/\s+/g, " ").trim();
774
774
  v(w(N));
775
- }, [e]), /* @__PURE__ */ F("div", { className: B.editor__container, children: [
776
- /* @__PURE__ */ F("div", { className: B.editor__header, children: [
775
+ }, [e]), /* @__PURE__ */ A("div", { className: R.editor__container, children: [
776
+ /* @__PURE__ */ A("div", { className: R.editor__header, children: [
777
777
  /* @__PURE__ */ f(Sr, { label: n, info: o, required: a }),
778
- /* @__PURE__ */ F("div", { className: B["editor__header-word-count"], children: [
779
- /* @__PURE__ */ f("span", { className: Ce({ [B["editor__header-word-count--alert"]]: C > d }), children: C }),
778
+ /* @__PURE__ */ A("div", { className: R["editor__header-word-count"], children: [
779
+ /* @__PURE__ */ f("span", { className: Ce({ [R["editor__header-word-count--alert"]]: C > c }), children: C }),
780
780
  " / ",
781
- d
781
+ c
782
782
  ] })
783
783
  ] }),
784
784
  /* @__PURE__ */ f(
785
785
  "div",
786
786
  {
787
- className: Ce(B.editor, {
788
- [B["not-valid"]]: s
787
+ className: Ce(R.editor, {
788
+ [R["not-valid"]]: s
789
789
  }),
790
- children: /* @__PURE__ */ F(Lr, { initialConfig: $, children: [
790
+ children: /* @__PURE__ */ A(Pr, { initialConfig: k, children: [
791
791
  /* @__PURE__ */ f(
792
792
  yr,
793
793
  {
@@ -796,38 +796,38 @@ const Xe = 200, hn = ({
796
796
  catalogueSearchResponse: S
797
797
  }
798
798
  ),
799
- /* @__PURE__ */ F("div", { className: B["editor__field-wrapper"], children: [
799
+ /* @__PURE__ */ A("div", { className: R["editor__field-wrapper"], children: [
800
800
  /* @__PURE__ */ f(
801
- Jr,
801
+ Wr,
802
802
  {
803
803
  contentEditable: /* @__PURE__ */ f(
804
- Gr,
804
+ Qr,
805
805
  {
806
- className: B.editor__field,
806
+ className: R.editor__field,
807
807
  "aria-label": x.common.rteAriaLabel,
808
808
  "aria-placeholder": t,
809
809
  title: x.common.rteTitle,
810
- placeholder: /* @__PURE__ */ f("div", { className: B.editor__placeholder, children: t }),
810
+ placeholder: /* @__PURE__ */ f("div", { className: R.editor__placeholder, children: t }),
811
811
  spellCheck: !1,
812
- id: `${P}_rteEditor`,
812
+ id: `${L}_rteEditor`,
813
813
  style: { height: `${l}`, maxHeight: `${l}` },
814
- onScroll: (N) => D(N.currentTarget.scrollTop)
814
+ onScroll: (N) => T(N.currentTarget.scrollTop)
815
815
  }
816
816
  ),
817
- placeholder: /* @__PURE__ */ f("div", { className: B.editor__placeholder, children: t }),
817
+ placeholder: /* @__PURE__ */ f("div", { className: R.editor__placeholder, children: t }),
818
818
  ErrorBoundary: rn
819
819
  }
820
820
  ),
821
821
  /* @__PURE__ */ f(pn, {}),
822
- /* @__PURE__ */ f(Jt, {}),
822
+ /* @__PURE__ */ f(Wt, {}),
823
823
  /* @__PURE__ */ f(mn, {}),
824
824
  /* @__PURE__ */ f(an, {}),
825
825
  /* @__PURE__ */ f(sn, { validateUrl: hr }),
826
826
  /* @__PURE__ */ f(un, { matchers: vr }),
827
- /* @__PURE__ */ f(dn, {}),
828
- /* @__PURE__ */ f(on, { onChange: R }),
827
+ /* @__PURE__ */ f(cn, {}),
828
+ /* @__PURE__ */ f(on, { onChange: I }),
829
829
  /* @__PURE__ */ f(Er, {}),
830
- /* @__PURE__ */ f($r, {}),
830
+ /* @__PURE__ */ f(kr, {}),
831
831
  u && /* @__PURE__ */ f(gn, { editorRef: u })
832
832
  ] })
833
833
  ] })
@@ -844,8 +844,8 @@ const Xe = 200, hn = ({
844
844
  required: a = !1,
845
845
  notValid: s = !1,
846
846
  notValidatedText: i = "",
847
- maxWords: l = Xe,
848
- rteRef: d,
847
+ maxWords: l = Ye,
848
+ rteRef: c,
849
849
  onChange: u,
850
850
  onCatalogueLinkSearch: m,
851
851
  catalogueSearchResponse: h = { state: "idle", results: [] }
@@ -861,7 +861,7 @@ const Xe = 200, hn = ({
861
861
  notValid: s,
862
862
  notValidatedText: i,
863
863
  maxWords: l,
864
- rteRef: d,
864
+ rteRef: c,
865
865
  onChange: u,
866
866
  onCatalogueLinkSearch: m,
867
867
  catalogueSearchResponse: h