@uva-glass/component-library 3.14.1 → 3.15.0

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 (58) hide show
  1. package/dist/{Lexical.prod-D8x7Ii0F.js → Lexical.prod-qoFV025v.js} +1831 -1858
  2. package/dist/Lexical.prod-qoFV025v.js.map +1 -0
  3. package/dist/LexicalClipboard.prod-BFJoO5qv.js +255 -0
  4. package/dist/LexicalClipboard.prod-BFJoO5qv.js.map +1 -0
  5. package/dist/{LexicalLink.prod-CkldFE8u.js → LexicalLink.prod-BIN12UMz.js} +47 -47
  6. package/dist/{LexicalLink.prod-CkldFE8u.js.map → LexicalLink.prod-BIN12UMz.js.map} +1 -1
  7. package/dist/{LexicalList.prod-CsVDXdmw.js → LexicalList.prod-WlGaeo0L.js} +71 -71
  8. package/dist/LexicalList.prod-WlGaeo0L.js.map +1 -0
  9. package/dist/LexicalSelection.prod-B5grbYgk.js +97 -0
  10. package/dist/LexicalSelection.prod-B5grbYgk.js.map +1 -0
  11. package/dist/{LexicalTable.prod-rZbTmo9K.js → LexicalTable.prod-osQj1CQX.js} +551 -550
  12. package/dist/LexicalTable.prod-osQj1CQX.js.map +1 -0
  13. package/dist/{LexicalUtils.prod-CpMJ4I9h.js → LexicalUtils.prod-BpZsS7jD.js} +29 -29
  14. package/dist/{LexicalUtils.prod-CpMJ4I9h.js.map → LexicalUtils.prod-BpZsS7jD.js.map} +1 -1
  15. package/dist/{TablePlugin-WOgWan8s.js → TablePlugin-6tDdOCQy.js} +10 -10
  16. package/dist/{TablePlugin-WOgWan8s.js.map → TablePlugin-6tDdOCQy.js.map} +1 -1
  17. package/dist/assets/PageOverlay.css +1 -1
  18. package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
  19. package/dist/components/FormInput/FormInput.js +1 -1
  20. package/dist/components/InputField/InputField.stories.js +1 -1
  21. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  22. package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
  23. package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
  24. package/dist/components/MultiSelect/index.js +1 -1
  25. package/dist/components/PageOverlay/PageOverlay.js +31 -31
  26. package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
  27. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
  28. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  29. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +4 -4
  30. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +4 -4
  31. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +2 -2
  32. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
  33. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +33 -33
  34. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  35. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +24 -24
  36. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +5 -5
  37. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
  38. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +3 -3
  39. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +14 -14
  40. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  41. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +20 -20
  42. package/dist/components/RteEditor/Plugins/index.js +1 -1
  43. package/dist/components/RteEditor/RteEditor.js +451 -450
  44. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  45. package/dist/components/RteEditor/helpers.js +4 -4
  46. package/dist/components/Timeline/Timeline.test.js +1 -1
  47. package/dist/components/index.js +1 -1
  48. package/dist/{helpers-E_SsILnP.js → helpers-5RvdadYU.js} +25 -25
  49. package/dist/{helpers-E_SsILnP.js.map → helpers-5RvdadYU.js.map} +1 -1
  50. package/dist/index.js +1 -1
  51. package/package.json +7 -7
  52. package/dist/Lexical.prod-D8x7Ii0F.js.map +0 -1
  53. package/dist/LexicalClipboard.prod-D5GjiArS.js +0 -255
  54. package/dist/LexicalClipboard.prod-D5GjiArS.js.map +0 -1
  55. package/dist/LexicalList.prod-CsVDXdmw.js.map +0 -1
  56. package/dist/LexicalSelection.prod-JQDTaUpX.js +0 -90
  57. package/dist/LexicalSelection.prod-JQDTaUpX.js.map +0 -1
  58. package/dist/LexicalTable.prod-rZbTmo9K.js.map +0 -1
@@ -1,22 +1,22 @@
1
- import { jsx as h, jsxs as K, Fragment as Te } from "react/jsx-runtime";
2
- import { t as qe, r as Ve, o as P } from "../../LexicalComposerContext.prod-DLlRM5wP.js";
3
- import { aF as Pe, af as z, T as Re, a as p, am as W, d as J, w as Ge, Y as M, c as g, S as Xe, N as m, aG as Ye, ae as Ie, o as Qe, r as Me, aH as Ze, O as et, u as T, aC as tt, aI as rt, aJ as nt, aK as ot, i as te, aL as it, aM as st, a1 as at, C as lt, g as ut, L as ct, aN as dt, aO as de, b as fe, K as ft, D as re, I as mt, a2 as Oe, aP as me, y as pt, x as gt, t as ht, aQ as pe, v as vt, aR as Ct, aS as yt, aT as Et, aB as wt, Q as bt, P as St, aU as _t, R as kt, B as xt, A as Nt, j as Lt, E as ge, aV as Dt, e as $t, ar as X, aq as Y, aW as Tt, aX as Pt, at as Rt, as as It } from "../../Lexical.prod-D8x7Ii0F.js";
1
+ import { jsx as h, jsxs as K, Fragment as Re } from "react/jsx-runtime";
2
+ import { t as Xe, r as Ye, o as T } from "../../LexicalComposerContext.prod-DLlRM5wP.js";
3
+ import { aF as Ie, af as A, P as Me, N as p, aG as de, am as J, d as W, F as Qe, Q as M, c as g, V as Ze, L as m, aH as et, ae as Fe, o as tt, q as Oe, aI as rt, aJ as nt, U as ot, g as P, aC as at, aK as st, aL as it, aM as lt, k as te, aN as ut, aO as ct, a1 as dt, v as ft, y as mt, O as pt, aP as gt, aQ as me, a as pe, H as ht, D as re, G as vt, a2 as Ke, aR as ge, A as Ct, z as yt, t as Et, aS as he, x as wt, aT as bt, aU as _t, aV as St, aB as kt, R as xt, M as Nt, aW as Lt, S as Dt, C as $t, B as Pt, n as Tt, I as ve, aX as Rt, b as It, ar as X, aq as Y, aY as Mt, aZ as Ft, at as Ot, a_ as se, as as Kt, a$ as zt } from "../../Lexical.prod-qoFV025v.js";
4
4
  import * as ne from "react";
5
- import { useMemo as q, useLayoutEffect as U, useEffect as _, useState as O, useRef as Fe, Suspense as Mt, forwardRef as Ke, useCallback as Ot } from "react";
6
- import { j, L as A, y as Ft, w as ce } from "../../LexicalUtils.prod-CpMJ4I9h.js";
7
- import { flushSync as Kt, createPortal as At } from "react-dom";
8
- import { D as he, _ as ve, h as zt, m as Bt } from "../../LexicalClipboard.prod-D5GjiArS.js";
9
- import { W as Ce, G as ye } from "../../LexicalSelection.prod-JQDTaUpX.js";
10
- import { r as Ae, G as ze, v as Ut, T as jt } from "../../LexicalList.prod-CsVDXdmw.js";
11
- import { g as Be, k as Ee, N as oe, p as Ht, m as Wt } from "../../LexicalLink.prod-CkldFE8u.js";
12
- import { c as Jt, b as qt, w as Vt, S as Gt, y as Ue, O as Xt, a as Yt } from "../../LexicalTable.prod-rZbTmo9K.js";
13
- import { a as Qt, w as Zt, M as er } from "../../helpers-E_SsILnP.js";
14
- import { c as tr } from "../../clsx-OuTLNxxd.js";
15
- import { exportMap as rr, isStartingWithHtmlTag as nr, mergeBoldStrongTags as or } from "./helpers.js";
5
+ import { useMemo as q, useLayoutEffect as U, useEffect as S, useState as F, useRef as ze, Suspense as At, forwardRef as Ae, useCallback as Bt } from "react";
6
+ import { j as H, L as z, y as Ut, w as fe } from "../../LexicalUtils.prod-BpZsS7jD.js";
7
+ import { flushSync as Ht, createPortal as jt } from "react-dom";
8
+ import { D as Ce, _ as ye, h as Jt, m as Wt } from "../../LexicalClipboard.prod-BFJoO5qv.js";
9
+ import { X as Ee, J as we } from "../../LexicalSelection.prod-B5grbYgk.js";
10
+ import { r as Be, G as Ue, v as qt, T as Vt } from "../../LexicalList.prod-WlGaeo0L.js";
11
+ import { g as He, k as be, N as oe, p as Gt, m as Xt } from "../../LexicalLink.prod-BIN12UMz.js";
12
+ import { s as Yt, c as Qt, a as je, b as Zt, w as er, S as tr, y as Je, O as rr } from "../../LexicalTable.prod-osQj1CQX.js";
13
+ import { a as nr, w as or, M as ar } from "../../helpers-5RvdadYU.js";
14
+ import { c as sr } from "../../clsx-OuTLNxxd.js";
15
+ import { exportMap as ir, isStartingWithHtmlTag as lr, mergeBoldStrongTags as ur } from "./helpers.js";
16
16
  import { s as I } from "../../RteEditor.module-oFMKEW6f.js";
17
- import { ToolBarPlugin as ir } from "./Plugins/ToolbarPlugin/ToolbarPlugin.js";
18
- import { useTranslation as sr } from "./hooks/useTranslation.js";
19
- import "../../TablePlugin-WOgWan8s.js";
17
+ import { ToolBarPlugin as cr } from "./Plugins/ToolbarPlugin/ToolbarPlugin.js";
18
+ import { useTranslation as dr } from "./hooks/useTranslation.js";
19
+ import "../../TablePlugin-6tDdOCQy.js";
20
20
  import "./Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js";
21
21
  import "./hooks/components/Flyout.js";
22
22
  import "../Buttons/Button.js";
@@ -27,7 +27,7 @@ import "@react-aria/dialog";
27
27
  import "@react-aria/focus";
28
28
  import "@react-aria/overlays";
29
29
  import "../OverlayCloseButton/OverlayCloseButton.js";
30
- import { FeedbackBox as ar } from "../FeedbackBox/FeedbackBox.js";
30
+ import { FeedbackBox as fr } from "../FeedbackBox/FeedbackBox.js";
31
31
  import "../GridRow/GridRow.js";
32
32
  import "../IconButton/IconButton.js";
33
33
  import "../Input/Input.js";
@@ -37,22 +37,22 @@ import "../SelectListbox/SelectListbox.js";
37
37
  import "../SelectListbox/SelectProvider.js";
38
38
  import "../Sortable/components/SortableItem.js";
39
39
  import "../../SortableProvider-DZggDO3M.js";
40
- import { UvaTheme as lr } from "./UvaTheme/UvaTheme.js";
41
- import { EditorHeader as ur } from "./EditorHeader/EditorHeader.js";
42
- import { LanguageProvider as cr, useLanguage as dr } from "./Providers/LanguageProvider.js";
43
- import { PasteHandlerPlugin as fr } from "./Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js";
44
- const je = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, mr = je ? U : _, Q = { tag: "history-merge" };
45
- function pr({ initialConfig: r, children: e }) {
40
+ import { UvaTheme as mr } from "./UvaTheme/UvaTheme.js";
41
+ import { EditorHeader as pr } from "./EditorHeader/EditorHeader.js";
42
+ import { LanguageProvider as gr, useLanguage as hr } from "./Providers/LanguageProvider.js";
43
+ import { PasteHandlerPlugin as vr } from "./Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js";
44
+ const We = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Cr = We ? U : S, Q = { tag: de };
45
+ function yr({ initialConfig: r, children: e }) {
46
46
  const t = q(() => {
47
- const { theme: o, namespace: i, nodes: n, onError: s, editorState: a, html: l } = r, u = qe(null, o), c = Pe({ editable: r.editable, html: l, namespace: i, nodes: n, onError: (d) => s(d, c), theme: o });
47
+ const { theme: n, namespace: a, nodes: o, onError: s, editorState: i, html: l } = r, u = Xe(null, n), c = Ie({ editable: r.editable, html: l, namespace: a, nodes: o, onError: (d) => s(d, c), theme: n });
48
48
  return function(d, f) {
49
49
  if (f !== null) {
50
50
  if (f === void 0) d.update(() => {
51
- const v = z();
51
+ const v = A();
52
52
  if (v.isEmpty()) {
53
- const C = Re();
53
+ const C = Me();
54
54
  v.append(C);
55
- const w = je ? document.activeElement : null;
55
+ const w = We ? document.activeElement : null;
56
56
  (p() !== null || w !== null && w === d.getRootElement()) && C.select();
57
57
  }
58
58
  }, Q);
@@ -67,91 +67,91 @@ function pr({ initialConfig: r, children: e }) {
67
67
  break;
68
68
  case "function":
69
69
  d.update(() => {
70
- z().isEmpty() && f(d);
70
+ A().isEmpty() && f(d);
71
71
  }, Q);
72
72
  }
73
73
  }
74
- }(c, a), [c, u];
74
+ }(c, i), [c, u];
75
75
  }, []);
76
- return mr(() => {
77
- const o = r.editable, [i] = t;
78
- i.setEditable(o === void 0 || o);
79
- }, []), h(Ve.Provider, { value: t, children: e });
76
+ return Cr(() => {
77
+ const n = r.editable, [a] = t;
78
+ a.setEditable(n === void 0 || n);
79
+ }, []), h(Ye.Provider, { value: t, children: e });
80
80
  }
81
- const gr = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : _;
82
- function hr(r) {
81
+ const Er = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : S;
82
+ function wr(r) {
83
83
  return { initialValueFn: () => r.isEditable(), subscribe: (e) => r.registerEditableListener(e) };
84
84
  }
85
- function vr() {
85
+ function br() {
86
86
  return function(r) {
87
- const [e] = P(), t = q(() => r(e), [e, r]), [o, i] = O(() => t.initialValueFn()), n = Fe(o);
88
- return gr(() => {
89
- const { initialValueFn: s, subscribe: a } = t, l = s();
90
- return n.current !== l && (n.current = l, i(l)), a((u) => {
91
- n.current = u, i(u);
87
+ const [e] = T(), t = q(() => r(e), [e, r]), [n, a] = F(() => t.initialValueFn()), o = ze(n);
88
+ return Er(() => {
89
+ const { initialValueFn: s, subscribe: i } = t, l = s();
90
+ return o.current !== l && (o.current = l, a(l)), i((u) => {
91
+ o.current = u, a(u);
92
92
  });
93
- }, [t, r]), o;
94
- }(hr);
93
+ }, [t, r]), n;
94
+ }(wr);
95
95
  }
96
- function Cr() {
97
- return z().getTextContent();
96
+ function _r() {
97
+ return A().getTextContent();
98
98
  }
99
- function yr(r, e = !0) {
99
+ function Sr(r, e = !0) {
100
100
  if (r) return !1;
101
- let t = Cr();
101
+ let t = _r();
102
102
  return e && (t = t.trim()), t === "";
103
103
  }
104
- function Er(r) {
105
- if (!yr(r, !1)) return !1;
106
- const e = z().getChildren(), t = e.length;
104
+ function kr(r) {
105
+ if (!Sr(r, !1)) return !1;
106
+ const e = A().getChildren(), t = e.length;
107
107
  if (t > 1) return !1;
108
- for (let o = 0; o < t; o++) {
109
- const i = e[o];
110
- if (W(i)) return !1;
111
- if (J(i)) {
112
- if (!Ge(i) || i.__indent !== 0) return !1;
113
- const n = i.getChildren(), s = n.length;
114
- for (let a = 0; a < s; a++) {
115
- const l = n[o];
108
+ for (let n = 0; n < t; n++) {
109
+ const a = e[n];
110
+ if (J(a)) return !1;
111
+ if (W(a)) {
112
+ if (!Qe(a) || a.__indent !== 0) return !1;
113
+ const o = a.getChildren(), s = o.length;
114
+ for (let i = 0; i < s; i++) {
115
+ const l = o[n];
116
116
  if (!M(l)) return !1;
117
117
  }
118
118
  }
119
119
  }
120
120
  return !0;
121
121
  }
122
- function He(r) {
123
- return () => Er(r);
122
+ function qe(r) {
123
+ return () => kr(r);
124
124
  }
125
- function wr(r) {
126
- const e = window.location.origin, t = (o) => {
127
- if (o.origin !== e) return;
128
- const i = r.getRootElement();
129
- if (document.activeElement !== i) return;
130
- const n = o.data;
131
- if (typeof n == "string") {
125
+ function xr(r) {
126
+ const e = window.location.origin, t = (n) => {
127
+ if (n.origin !== e) return;
128
+ const a = r.getRootElement();
129
+ if (document.activeElement !== a) return;
130
+ const o = n.data;
131
+ if (typeof o == "string") {
132
132
  let s;
133
133
  try {
134
- s = JSON.parse(n);
134
+ s = JSON.parse(o);
135
135
  } catch {
136
136
  return;
137
137
  }
138
138
  if (s && s.protocol === "nuanria_messaging" && s.type === "request") {
139
- const a = s.payload;
140
- if (a && a.functionId === "makeChanges") {
141
- const l = a.args;
139
+ const i = s.payload;
140
+ if (i && i.functionId === "makeChanges") {
141
+ const l = i.args;
142
142
  if (l) {
143
143
  const [u, c, d, f, v, C] = l;
144
144
  r.update(() => {
145
145
  const w = p();
146
146
  if (g(w)) {
147
147
  const x = w.anchor;
148
- let y = x.getNode(), E = 0, S = 0;
149
- if (M(y) && u >= 0 && c >= 0 && (E = u, S = u + c, w.setTextNodeRange(y, E, y, S)), E === S && d === "" || (w.insertRawText(d), y = x.getNode()), M(y)) {
150
- E = f, S = f + v;
148
+ let y = x.getNode(), E = 0, _ = 0;
149
+ if (M(y) && u >= 0 && c >= 0 && (E = u, _ = u + c, w.setTextNodeRange(y, E, y, _)), E === _ && d === "" || (w.insertRawText(d), y = x.getNode()), M(y)) {
150
+ E = f, _ = f + v;
151
151
  const N = y.getTextContentSize();
152
- E = E > N ? N : E, S = S > N ? N : S, w.setTextNodeRange(y, E, y, S);
152
+ E = E > N ? N : E, _ = _ > N ? N : _, w.setTextNodeRange(y, E, y, _);
153
153
  }
154
- o.stopImmediatePropagation();
154
+ n.stopImmediatePropagation();
155
155
  }
156
156
  });
157
157
  }
@@ -163,7 +163,7 @@ function wr(r) {
163
163
  window.removeEventListener("message", t, !0);
164
164
  };
165
165
  }
166
- function we(r, e) {
166
+ function _e(r, e) {
167
167
  if (document.caretRangeFromPoint !== void 0) {
168
168
  const t = document.caretRangeFromPoint(r, e);
169
169
  return t === null ? null : { node: t.startContainer, offset: t.startOffset };
@@ -174,258 +174,258 @@ function we(r, e) {
174
174
  }
175
175
  return null;
176
176
  }
177
- const H = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, br = H && "documentMode" in document ? document.documentMode : null, Sr = !(!H || !("InputEvent" in window) || br) && "getTargetRanges" in new window.InputEvent("input"), _r = H && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), be = H && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, kr = H && /^(?=.*Chrome).*/i.test(navigator.userAgent), xr = H && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !kr, Se = Qe();
177
+ const j = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Nr = j && "documentMode" in document ? document.documentMode : null, Lr = !(!j || !("InputEvent" in window) || Nr) && "getTargetRanges" in new window.InputEvent("input"), Dr = j && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), Se = j && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, $r = j && /^(?=.*Chrome).*/i.test(navigator.userAgent), Pr = j && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !$r, ke = tt("DRAG_DROP_PASTE_FILE");
178
178
  function Z(r) {
179
179
  let e = null;
180
- if (A(r, DragEvent) ? e = r.dataTransfer : A(r, ClipboardEvent) && (e = r.clipboardData), e === null) return [!1, [], !1];
181
- const t = e.types, o = t.includes("Files"), i = t.includes("text/html") || t.includes("text/plain");
182
- return [o, Array.from(e.files), i];
180
+ if (z(r, DragEvent) ? e = r.dataTransfer : z(r, ClipboardEvent) && (e = r.clipboardData), e === null) return [!1, [], !1];
181
+ const t = e.types, n = t.includes("Files"), a = t.includes("text/html") || t.includes("text/plain");
182
+ return [n, Array.from(e.files), a];
183
183
  }
184
- function _e(r) {
184
+ function xe(r) {
185
185
  const e = p();
186
186
  if (!g(e)) return !1;
187
- const t = /* @__PURE__ */ new Set(), o = e.getNodes();
188
- for (let i = 0; i < o.length; i++) {
189
- const n = o[i], s = n.getKey();
187
+ const t = /* @__PURE__ */ new Set(), n = e.getNodes();
188
+ for (let a = 0; a < n.length; a++) {
189
+ const o = n[a], s = o.getKey();
190
190
  if (t.has(s)) continue;
191
- const a = ce(n, (u) => J(u) && !u.isInline());
192
- if (a === null) continue;
193
- const l = a.getKey();
194
- a.canIndent() && !t.has(l) && (t.add(l), r(a));
191
+ const i = fe(o, (u) => W(u) && !u.isInline());
192
+ if (i === null) continue;
193
+ const l = i.getKey();
194
+ i.canIndent() && !t.has(l) && (t.add(l), r(i));
195
195
  }
196
196
  return t.size > 0;
197
197
  }
198
- function ke(r) {
198
+ function Ne(r) {
199
199
  const e = te(r);
200
- return W(e);
200
+ return J(e);
201
201
  }
202
- function ie(r) {
202
+ function ae(r) {
203
203
  for (const e of ["lowercase", "uppercase", "capitalize"]) r.hasFormat(e) && r.toggleFormat(e);
204
204
  }
205
- function Nr(r) {
206
- return j(r.registerCommand(Lt, (e) => {
205
+ function Tr(r) {
206
+ return H(r.registerCommand(Tt, (e) => {
207
207
  const t = p();
208
- return !!T(t) && (t.clear(), !0);
208
+ return !!P(t) && (t.clear(), !0);
209
209
  }, 0), r.registerCommand(re, (e) => {
210
210
  const t = p();
211
- return g(t) ? (t.deleteCharacter(e), !0) : !!T(t) && (t.deleteNodes(), !0);
212
- }, m), r.registerCommand(Nt, (e) => {
211
+ return g(t) ? (t.deleteCharacter(e), !0) : !!P(t) && (t.deleteNodes(), !0);
212
+ }, m), r.registerCommand(Pt, (e) => {
213
213
  const t = p();
214
214
  return !!g(t) && (t.deleteWord(e), !0);
215
- }, m), r.registerCommand(xt, (e) => {
215
+ }, m), r.registerCommand($t, (e) => {
216
216
  const t = p();
217
217
  return !!g(t) && (t.deleteLine(e), !0);
218
- }, m), r.registerCommand(kt, (e) => {
218
+ }, m), r.registerCommand(Dt, (e) => {
219
219
  const t = p();
220
220
  if (typeof e == "string") t !== null && t.insertText(e);
221
221
  else {
222
222
  if (t === null) return !1;
223
- const o = e.dataTransfer;
224
- if (o != null) he(o, t, r);
223
+ const n = e.dataTransfer;
224
+ if (n != null) Ce(n, t, r);
225
225
  else if (g(t)) {
226
- const i = e.data;
227
- return i && t.insertText(i), !0;
226
+ const a = e.data;
227
+ return a && t.insertText(a), !0;
228
228
  }
229
229
  }
230
230
  return !0;
231
- }, m), r.registerCommand(_t, () => {
231
+ }, m), r.registerCommand(Lt, () => {
232
232
  const e = p();
233
233
  return !!g(e) && (e.removeText(), !0);
234
- }, m), r.registerCommand(St, (e) => {
234
+ }, m), r.registerCommand(Nt, (e) => {
235
235
  const t = p();
236
236
  return !!g(t) && (t.formatText(e), !0);
237
- }, m), r.registerCommand(bt, (e) => {
237
+ }, m), r.registerCommand(xt, (e) => {
238
238
  const t = p();
239
- if (!g(t) && !T(t)) return !1;
240
- const o = t.getNodes();
241
- for (const i of o) {
242
- const n = ce(i, (s) => J(s) && !s.isInline());
243
- n !== null && n.setFormat(e);
239
+ if (!g(t) && !P(t)) return !1;
240
+ const n = t.getNodes();
241
+ for (const a of n) {
242
+ const o = fe(a, (s) => W(s) && !s.isInline());
243
+ o !== null && o.setFormat(e);
244
244
  }
245
245
  return !0;
246
- }, m), r.registerCommand(de, (e) => {
246
+ }, m), r.registerCommand(me, (e) => {
247
247
  const t = p();
248
248
  return !!g(t) && (t.insertLineBreak(e), !0);
249
- }, m), r.registerCommand(fe, () => {
249
+ }, m), r.registerCommand(pe, () => {
250
250
  const e = p();
251
251
  return !!g(e) && (e.insertParagraph(), !0);
252
- }, m), r.registerCommand(yt, () => (Et([wt()]), !0), m), r.registerCommand(Ct, () => _e((e) => {
252
+ }, m), r.registerCommand(_t, () => (St([kt()]), !0), m), r.registerCommand(bt, () => xe((e) => {
253
253
  const t = e.getIndent();
254
254
  e.setIndent(t + 1);
255
- }), m), r.registerCommand(me, () => _e((e) => {
255
+ }), m), r.registerCommand(ge, () => xe((e) => {
256
256
  const t = e.getIndent();
257
257
  t > 0 && e.setIndent(Math.max(0, t - 1));
258
- }), m), r.registerCommand(vt, (e) => {
258
+ }), m), r.registerCommand(wt, (e) => {
259
259
  const t = p();
260
- if (T(t)) {
261
- const o = t.getNodes();
262
- if (o.length > 0) return o[0].selectPrevious(), !0;
260
+ if (P(t)) {
261
+ const n = t.getNodes();
262
+ if (n.length > 0) return n[0].selectPrevious(), !0;
263
263
  } else if (g(t)) {
264
- const o = pe(t.focus, !0);
265
- if (!e.shiftKey && W(o) && !o.isIsolated() && !o.isInline()) return o.selectPrevious(), e.preventDefault(), !0;
264
+ const n = he(t.focus, !0);
265
+ if (!e.shiftKey && J(n) && !n.isIsolated() && !n.isInline()) return n.selectPrevious(), e.preventDefault(), !0;
266
266
  }
267
267
  return !1;
268
- }, m), r.registerCommand(ht, (e) => {
268
+ }, m), r.registerCommand(Et, (e) => {
269
269
  const t = p();
270
- if (T(t)) {
271
- const o = t.getNodes();
272
- if (o.length > 0) return o[0].selectNext(0, 0), !0;
270
+ if (P(t)) {
271
+ const n = t.getNodes();
272
+ if (n.length > 0) return n[0].selectNext(0, 0), !0;
273
273
  } else if (g(t)) {
274
- if (function(i) {
275
- const n = i.focus;
276
- return n.key === "root" && n.offset === z().getChildrenSize();
274
+ if (function(a) {
275
+ const o = a.focus;
276
+ return o.key === "root" && o.offset === A().getChildrenSize();
277
277
  }(t)) return e.preventDefault(), !0;
278
- const o = pe(t.focus, !1);
279
- if (!e.shiftKey && W(o) && !o.isIsolated() && !o.isInline()) return o.selectNext(), e.preventDefault(), !0;
278
+ const n = he(t.focus, !1);
279
+ if (!e.shiftKey && J(n) && !n.isIsolated() && !n.isInline()) return n.selectNext(), e.preventDefault(), !0;
280
280
  }
281
281
  return !1;
282
- }, m), r.registerCommand(gt, (e) => {
282
+ }, m), r.registerCommand(yt, (e) => {
283
283
  const t = p();
284
- if (T(t)) {
285
- const o = t.getNodes();
286
- if (o.length > 0) return e.preventDefault(), o[0].selectPrevious(), !0;
284
+ if (P(t)) {
285
+ const n = t.getNodes();
286
+ if (n.length > 0) return e.preventDefault(), n[0].selectPrevious(), !0;
287
287
  }
288
288
  if (!g(t)) return !1;
289
- if (Ce(t, !0)) {
290
- const o = e.shiftKey;
291
- return e.preventDefault(), ye(t, o, !0), !0;
289
+ if (Ee(t, !0)) {
290
+ const n = e.shiftKey;
291
+ return e.preventDefault(), we(t, n, !0), !0;
292
292
  }
293
293
  return !1;
294
- }, m), r.registerCommand(pt, (e) => {
294
+ }, m), r.registerCommand(Ct, (e) => {
295
295
  const t = p();
296
- if (T(t)) {
297
- const i = t.getNodes();
298
- if (i.length > 0) return e.preventDefault(), i[0].selectNext(0, 0), !0;
296
+ if (P(t)) {
297
+ const a = t.getNodes();
298
+ if (a.length > 0) return e.preventDefault(), a[0].selectNext(0, 0), !0;
299
299
  }
300
300
  if (!g(t)) return !1;
301
- const o = e.shiftKey;
302
- return !!Ce(t, !1) && (e.preventDefault(), ye(t, o, !1), !0);
303
- }, m), r.registerCommand(mt, (e) => {
304
- if (ke(e.target)) return !1;
301
+ const n = e.shiftKey;
302
+ return !!Ee(t, !1) && (e.preventDefault(), we(t, n, !1), !0);
303
+ }, m), r.registerCommand(vt, (e) => {
304
+ if (Ne(e.target)) return !1;
305
305
  const t = p();
306
306
  if (g(t)) {
307
- const { anchor: o } = t, i = o.getNode();
308
- if (t.isCollapsed() && o.offset === 0 && !Oe(i) && Ft(i).getIndent() > 0)
309
- return e.preventDefault(), r.dispatchCommand(me, void 0);
310
- if (be && navigator.language === "ko-KR") return !1;
311
- } else if (!T(t)) return !1;
307
+ const { anchor: n } = t, a = n.getNode();
308
+ if (t.isCollapsed() && n.offset === 0 && !Ke(a) && Ut(a).getIndent() > 0)
309
+ return e.preventDefault(), r.dispatchCommand(ge, void 0);
310
+ if (Se && navigator.language === "ko-KR") return !1;
311
+ } else if (!P(t)) return !1;
312
312
  return e.preventDefault(), r.dispatchCommand(re, !0);
313
- }, m), r.registerCommand(ft, (e) => {
314
- if (ke(e.target)) return !1;
313
+ }, m), r.registerCommand(ht, (e) => {
314
+ if (Ne(e.target)) return !1;
315
315
  const t = p();
316
- return !(!g(t) && !T(t)) && (e.preventDefault(), r.dispatchCommand(re, !1));
317
- }, m), r.registerCommand(dt, (e) => {
316
+ return !(!g(t) && !P(t)) && (e.preventDefault(), r.dispatchCommand(re, !1));
317
+ }, m), r.registerCommand(gt, (e) => {
318
318
  const t = p();
319
319
  if (!g(t)) return !1;
320
- if (ie(t), e !== null) {
321
- if ((be || _r || xr) && Sr) return !1;
322
- if (e.preventDefault(), e.shiftKey) return r.dispatchCommand(de, !1);
320
+ if (ae(t), e !== null) {
321
+ if ((Se || Dr || Pr) && Lr) return !1;
322
+ if (e.preventDefault(), e.shiftKey) return r.dispatchCommand(me, !1);
323
323
  }
324
- return r.dispatchCommand(fe, void 0);
325
- }, m), r.registerCommand(ct, () => {
324
+ return r.dispatchCommand(pe, void 0);
325
+ }, m), r.registerCommand(pt, () => {
326
326
  const e = p();
327
327
  return !!g(e) && (r.blur(), !0);
328
- }, m), r.registerCommand(st, (e) => {
328
+ }, m), r.registerCommand(ct, (e) => {
329
329
  const [, t] = Z(e);
330
330
  if (t.length > 0) {
331
- const i = we(e.clientX, e.clientY);
332
- if (i !== null) {
333
- const { offset: n, node: s } = i, a = te(s);
334
- if (a !== null) {
335
- const l = at();
336
- if (M(a)) l.anchor.set(a.getKey(), n, "text"), l.focus.set(a.getKey(), n, "text");
331
+ const a = _e(e.clientX, e.clientY);
332
+ if (a !== null) {
333
+ const { offset: o, node: s } = a, i = te(s);
334
+ if (i !== null) {
335
+ const l = dt();
336
+ if (M(i)) l.anchor.set(i.getKey(), o, "text"), l.focus.set(i.getKey(), o, "text");
337
337
  else {
338
- const c = a.getParentOrThrow().getKey(), d = a.getIndexWithinParent() + 1;
338
+ const c = i.getParentOrThrow().getKey(), d = i.getIndexWithinParent() + 1;
339
339
  l.anchor.set(c, d, "element"), l.focus.set(c, d, "element");
340
340
  }
341
- const u = lt(l);
342
- ut(u);
341
+ const u = ft(l);
342
+ mt(u);
343
343
  }
344
- r.dispatchCommand(Se, t);
344
+ r.dispatchCommand(ke, t);
345
345
  }
346
346
  return e.preventDefault(), !0;
347
347
  }
348
- const o = p();
349
- return !!g(o);
350
- }, m), r.registerCommand(it, (e) => {
351
- const [t] = Z(e), o = p();
352
- return !(t && !g(o));
353
- }, m), r.registerCommand(ot, (e) => {
354
- const [t] = Z(e), o = p();
355
- if (t && !g(o)) return !1;
356
- const i = we(e.clientX, e.clientY);
357
- if (i !== null) {
358
- const n = te(i.node);
359
- W(n) && e.preventDefault();
348
+ const n = p();
349
+ return !!g(n);
350
+ }, m), r.registerCommand(ut, (e) => {
351
+ const [t] = Z(e), n = p();
352
+ return !(t && !g(n));
353
+ }, m), r.registerCommand(lt, (e) => {
354
+ const [t] = Z(e), n = p();
355
+ if (t && !g(n)) return !1;
356
+ const a = _e(e.clientX, e.clientY);
357
+ if (a !== null) {
358
+ const o = te(a.node);
359
+ J(o) && e.preventDefault();
360
360
  }
361
361
  return !0;
362
- }, m), r.registerCommand(rt, () => (nt(), !0), m), r.registerCommand(tt, (e) => (ve(r, A(e, ClipboardEvent) ? e : null), !0), m), r.registerCommand(et, (e) => (async function(t, o) {
363
- await ve(o, A(t, ClipboardEvent) ? t : null), o.update(() => {
364
- const i = p();
365
- g(i) ? i.removeText() : T(i) && i.getNodes().forEach((n) => n.remove());
362
+ }, m), r.registerCommand(st, () => (it(), !0), m), r.registerCommand(at, (e) => (ye(r, z(e, ClipboardEvent) ? e : null), !0), m), r.registerCommand(ot, (e) => (async function(t, n) {
363
+ await ye(n, z(t, ClipboardEvent) ? t : null), n.update(() => {
364
+ const a = p();
365
+ g(a) ? a.removeText() : P(a) && a.getNodes().forEach((o) => o.remove());
366
366
  });
367
- }(e, r), !0), m), r.registerCommand(Ie, (e) => {
368
- const [, t, o] = Z(e);
369
- return t.length > 0 && !o ? (r.dispatchCommand(Se, t), !0) : Me(e.target) && Ze(e.target) ? !1 : p() !== null && (function(i, n) {
370
- i.preventDefault(), n.update(() => {
371
- const s = p(), a = A(i, InputEvent) || A(i, KeyboardEvent) ? null : i.clipboardData;
372
- a != null && s !== null && he(a, s, n);
373
- }, { tag: "paste" });
367
+ }(e, r), !0), m), r.registerCommand(Fe, (e) => {
368
+ const [, t, n] = Z(e);
369
+ return t.length > 0 && !n ? (r.dispatchCommand(ke, t), !0) : Oe(e.target) && rt(e.target) ? !1 : p() !== null && (function(a, o) {
370
+ a.preventDefault(), o.update(() => {
371
+ const s = p(), i = z(a, InputEvent) || z(a, KeyboardEvent) ? null : a.clipboardData;
372
+ i != null && s !== null && Ce(i, s, o);
373
+ }, { tag: nt });
374
374
  }(e, r), !0);
375
- }, m), r.registerCommand(Ye, (e) => {
375
+ }, m), r.registerCommand(et, (e) => {
376
376
  const t = p();
377
- return g(t) && ie(t), !1;
378
- }, m), r.registerCommand(Xe, (e) => {
377
+ return g(t) && ae(t), !1;
378
+ }, m), r.registerCommand(Ze, (e) => {
379
379
  const t = p();
380
- return g(t) && ie(t), !1;
380
+ return g(t) && ae(t), !1;
381
381
  }, m));
382
382
  }
383
- const se = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : _;
384
- function xe(r) {
385
- return r.getEditorState().read(He(r.isComposing()));
383
+ const ie = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : S;
384
+ function Le(r) {
385
+ return r.getEditorState().read(qe(r.isComposing()));
386
386
  }
387
- function Lr({ contentEditable: r, placeholder: e = null, ErrorBoundary: t }) {
388
- const [o] = P(), i = function(n, s) {
389
- const [a, l] = O(() => n.getDecorators());
390
- return se(() => n.registerDecoratorListener((u) => {
391
- Kt(() => {
387
+ function Rr({ contentEditable: r, placeholder: e = null, ErrorBoundary: t }) {
388
+ const [n] = T(), a = function(o, s) {
389
+ const [i, l] = F(() => o.getDecorators());
390
+ return ie(() => o.registerDecoratorListener((u) => {
391
+ Ht(() => {
392
392
  l(u);
393
393
  });
394
- }), [n]), _(() => {
395
- l(n.getDecorators());
396
- }, [n]), q(() => {
397
- const u = [], c = Object.keys(a);
394
+ }), [o]), S(() => {
395
+ l(o.getDecorators());
396
+ }, [o]), q(() => {
397
+ const u = [], c = Object.keys(i);
398
398
  for (let d = 0; d < c.length; d++) {
399
- const f = c[d], v = h(s, { onError: (w) => n._onError(w), children: h(Mt, { fallback: null, children: a[f] }) }), C = n.getElementByKey(f);
400
- C !== null && u.push(At(v, C, f));
399
+ const f = c[d], v = h(s, { onError: (w) => o._onError(w), children: h(At, { fallback: null, children: i[f] }) }), C = o.getElementByKey(f);
400
+ C !== null && u.push(jt(v, C, f));
401
401
  }
402
402
  return u;
403
- }, [s, a, n]);
404
- }(o, t);
405
- return function(n) {
406
- se(() => j(Nr(n), wr(n)), [n]);
407
- }(o), K(Te, { children: [r, h(Dr, { content: e }), i] });
408
- }
409
- function Dr({ content: r }) {
410
- const [e] = P(), t = function(i) {
411
- const [n, s] = O(() => xe(i));
412
- return se(() => {
413
- function a() {
414
- const l = xe(i);
403
+ }, [s, i, o]);
404
+ }(n, t);
405
+ return function(o) {
406
+ ie(() => H(Tr(o), xr(o)), [o]);
407
+ }(n), K(Re, { children: [r, h(Ir, { content: e }), a] });
408
+ }
409
+ function Ir({ content: r }) {
410
+ const [e] = T(), t = function(a) {
411
+ const [o, s] = F(() => Le(a));
412
+ return ie(() => {
413
+ function i() {
414
+ const l = Le(a);
415
415
  s(l);
416
416
  }
417
- return a(), j(i.registerUpdateListener(() => {
418
- a();
419
- }), i.registerEditableListener(() => {
420
- a();
417
+ return i(), H(a.registerUpdateListener(() => {
418
+ i();
419
+ }), a.registerEditableListener(() => {
420
+ i();
421
421
  }));
422
- }, [i]), n;
423
- }(e), o = vr();
424
- return t ? typeof r == "function" ? r(o) : r : null;
422
+ }, [a]), o;
423
+ }(e), n = br();
424
+ return t ? typeof r == "function" ? r(n) : r : null;
425
425
  }
426
- const We = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : _;
427
- function $r({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: o, ariaDescribedBy: i, ariaErrorMessage: n, ariaExpanded: s, ariaInvalid: a, ariaLabel: l, ariaLabelledBy: u, ariaMultiline: c, ariaOwns: d, ariaRequired: f, autoCapitalize: v, className: C, id: w, role: x = "textbox", spellCheck: y = !0, style: E, tabIndex: S, "data-testid": N, ...b }, L) {
428
- const [k, R] = O(r.isEditable()), F = Ot((D) => {
426
+ const Ve = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : S;
427
+ function Mr({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaControls: n, ariaDescribedBy: a, ariaErrorMessage: o, ariaExpanded: s, ariaInvalid: i, ariaLabel: l, ariaLabelledBy: u, ariaMultiline: c, ariaOwns: d, ariaRequired: f, autoCapitalize: v, className: C, id: w, role: x = "textbox", spellCheck: y = !0, style: E, tabIndex: _, "data-testid": N, ...b }, L) {
428
+ const [k, R] = F(r.isEditable()), O = Bt((D) => {
429
429
  D && D.ownerDocument && D.ownerDocument.defaultView ? r.setRootElement(D) : r.setRootElement(null);
430
430
  }, [r]), B = q(() => /* @__PURE__ */ function(...D) {
431
431
  return (V) => {
@@ -433,137 +433,137 @@ function $r({ editor: r, ariaActiveDescendant: e, ariaAutoComplete: t, ariaContr
433
433
  typeof G == "function" ? G(V) : G != null && (G.current = V);
434
434
  });
435
435
  };
436
- }(L, F), [F, L]);
437
- return We(() => (R(r.isEditable()), r.registerEditableListener((D) => {
436
+ }(L, O), [O, L]);
437
+ return Ve(() => (R(r.isEditable()), r.registerEditableListener((D) => {
438
438
  R(D);
439
- })), [r]), h("div", { "aria-activedescendant": k ? e : void 0, "aria-autocomplete": k ? t : "none", "aria-controls": k ? o : void 0, "aria-describedby": i, ...n != null ? { "aria-errormessage": n } : {}, "aria-expanded": k && x === "combobox" ? !!s : void 0, ...a != null ? { "aria-invalid": a } : {}, "aria-label": l, "aria-labelledby": u, "aria-multiline": c, "aria-owns": k ? d : void 0, "aria-readonly": !k || void 0, "aria-required": f, autoCapitalize: v, className: C, contentEditable: k, "data-testid": N, id: w, ref: B, role: k ? x : void 0, spellCheck: y, style: E, tabIndex: S, ...b });
439
+ })), [r]), h("div", { "aria-activedescendant": k ? e : void 0, "aria-autocomplete": k ? t : "none", "aria-controls": k ? n : void 0, "aria-describedby": a, ...o != null ? { "aria-errormessage": o } : {}, "aria-expanded": k && x === "combobox" ? !!s : void 0, ...i != null ? { "aria-invalid": i } : {}, "aria-label": l, "aria-labelledby": u, "aria-multiline": c, "aria-owns": k ? d : void 0, "aria-readonly": !k || void 0, "aria-required": f, autoCapitalize: v, className: C, contentEditable: k, "data-testid": N, id: w, ref: B, role: k ? x : void 0, spellCheck: y, style: E, tabIndex: _, ...b });
440
440
  }
441
- const Tr = Ke($r);
442
- function Ne(r) {
443
- return r.getEditorState().read(He(r.isComposing()));
441
+ const Fr = Ae(Mr);
442
+ function De(r) {
443
+ return r.getEditorState().read(qe(r.isComposing()));
444
444
  }
445
- const Pr = Ke(Rr);
446
- function Rr(r, e) {
447
- const { placeholder: t, ...o } = r, [i] = P();
448
- return K(Te, { children: [h(Tr, { editor: i, ...o, ref: e }), t != null && h(Ir, { editor: i, content: t })] });
445
+ const Or = Ae(Kr);
446
+ function Kr(r, e) {
447
+ const { placeholder: t, ...n } = r, [a] = T();
448
+ return K(Re, { children: [h(Fr, { editor: a, ...n, ref: e }), t != null && h(zr, { editor: a, content: t })] });
449
449
  }
450
- function Ir({ content: r, editor: e }) {
450
+ function zr({ content: r, editor: e }) {
451
451
  const t = function(s) {
452
- const [a, l] = O(() => Ne(s));
453
- return We(() => {
452
+ const [i, l] = F(() => De(s));
453
+ return Ve(() => {
454
454
  function u() {
455
- const c = Ne(s);
455
+ const c = De(s);
456
456
  l(c);
457
457
  }
458
- return u(), j(s.registerUpdateListener(() => {
458
+ return u(), H(s.registerUpdateListener(() => {
459
459
  u();
460
460
  }), s.registerEditableListener(() => {
461
461
  u();
462
462
  }));
463
- }, [s]), a;
464
- }(e), [o, i] = O(e.isEditable());
465
- if (U(() => (i(e.isEditable()), e.registerEditableListener((s) => {
466
- i(s);
463
+ }, [s]), i;
464
+ }(e), [n, a] = F(e.isEditable());
465
+ if (U(() => (a(e.isEditable()), e.registerEditableListener((s) => {
466
+ a(s);
467
467
  })), [e]), !t) return null;
468
- let n = null;
469
- return typeof r == "function" ? n = r(o) : r !== null && (n = r), n === null ? null : h("div", { "aria-hidden": !0, children: n });
468
+ let o = null;
469
+ return typeof r == "function" ? o = r(n) : r !== null && (o = r), o === null ? null : h("div", { "aria-hidden": !0, children: o });
470
470
  }
471
- function ae(r, e) {
472
- return ae = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, o) {
473
- return t.__proto__ = o, t;
474
- }, ae(r, e);
471
+ function le(r, e) {
472
+ return le = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, n) {
473
+ return t.__proto__ = n, t;
474
+ }, le(r, e);
475
475
  }
476
- var Le = { error: null }, Mr = function(r) {
476
+ var $e = { error: null }, Ar = function(r) {
477
477
  var e, t;
478
- function o() {
479
- for (var n, s = arguments.length, a = new Array(s), l = 0; l < s; l++) a[l] = arguments[l];
480
- return (n = r.call.apply(r, [this].concat(a)) || this).state = Le, n.resetErrorBoundary = function() {
478
+ function n() {
479
+ for (var o, s = arguments.length, i = new Array(s), l = 0; l < s; l++) i[l] = arguments[l];
480
+ return (o = r.call.apply(r, [this].concat(i)) || this).state = $e, o.resetErrorBoundary = function() {
481
481
  for (var u, c = arguments.length, d = new Array(c), f = 0; f < c; f++) d[f] = arguments[f];
482
- n.props.onReset == null || (u = n.props).onReset.apply(u, d), n.reset();
483
- }, n;
482
+ o.props.onReset == null || (u = o.props).onReset.apply(u, d), o.reset();
483
+ }, o;
484
484
  }
485
- t = r, (e = o).prototype = Object.create(t.prototype), e.prototype.constructor = e, ae(e, t), o.getDerivedStateFromError = function(n) {
486
- return { error: n };
485
+ t = r, (e = n).prototype = Object.create(t.prototype), e.prototype.constructor = e, le(e, t), n.getDerivedStateFromError = function(o) {
486
+ return { error: o };
487
487
  };
488
- var i = o.prototype;
489
- return i.reset = function() {
490
- this.setState(Le);
491
- }, i.componentDidCatch = function(n, s) {
492
- var a, l;
493
- (a = (l = this.props).onError) == null || a.call(l, n, s);
494
- }, i.componentDidUpdate = function(n, s) {
495
- var a, l, u, c, d = this.state.error, f = this.props.resetKeys;
496
- d !== null && s.error !== null && ((u = n.resetKeys) === void 0 && (u = []), (c = f) === void 0 && (c = []), u.length !== c.length || u.some(function(v, C) {
488
+ var a = n.prototype;
489
+ return a.reset = function() {
490
+ this.setState($e);
491
+ }, a.componentDidCatch = function(o, s) {
492
+ var i, l;
493
+ (i = (l = this.props).onError) == null || i.call(l, o, s);
494
+ }, a.componentDidUpdate = function(o, s) {
495
+ var i, l, u, c, d = this.state.error, f = this.props.resetKeys;
496
+ d !== null && s.error !== null && ((u = o.resetKeys) === void 0 && (u = []), (c = f) === void 0 && (c = []), u.length !== c.length || u.some(function(v, C) {
497
497
  return !Object.is(v, c[C]);
498
- })) && ((a = (l = this.props).onResetKeysChange) == null || a.call(l, n.resetKeys, f), this.reset());
499
- }, i.render = function() {
500
- var n = this.state.error, s = this.props, a = s.fallbackRender, l = s.FallbackComponent, u = s.fallback;
501
- if (n !== null) {
502
- var c = { error: n, resetErrorBoundary: this.resetErrorBoundary };
498
+ })) && ((i = (l = this.props).onResetKeysChange) == null || i.call(l, o.resetKeys, f), this.reset());
499
+ }, a.render = function() {
500
+ var o = this.state.error, s = this.props, i = s.fallbackRender, l = s.FallbackComponent, u = s.fallback;
501
+ if (o !== null) {
502
+ var c = { error: o, resetErrorBoundary: this.resetErrorBoundary };
503
503
  if (ne.isValidElement(u)) return u;
504
- if (typeof a == "function") return a(c);
504
+ if (typeof i == "function") return i(c);
505
505
  if (l) return ne.createElement(l, c);
506
506
  throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop");
507
507
  }
508
508
  return this.props.children;
509
- }, o;
509
+ }, n;
510
510
  }(ne.Component);
511
- function Or({ children: r, onError: e }) {
512
- return h(Mr, { fallback: h("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: e, children: r });
513
- }
514
- const Fr = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : _;
515
- function Kr({ ignoreHistoryMergeTagChange: r = !0, ignoreSelectionChange: e = !1, onChange: t }) {
516
- const [o] = P();
517
- return Fr(() => {
518
- if (t) return o.registerUpdateListener(({ editorState: i, dirtyElements: n, dirtyLeaves: s, prevEditorState: a, tags: l }) => {
519
- e && n.size === 0 && s.size === 0 || r && l.has("history-merge") || a.isEmpty() || t(i, o, l);
511
+ function Br({ children: r, onError: e }) {
512
+ return h(Ar, { fallback: h("div", { style: { border: "1px solid #f00", color: "#f00", padding: "8px" }, children: "An error was thrown." }), onError: e, children: r });
513
+ }
514
+ const Ur = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? U : S;
515
+ function Hr({ ignoreHistoryMergeTagChange: r = !0, ignoreSelectionChange: e = !1, onChange: t }) {
516
+ const [n] = T();
517
+ return Ur(() => {
518
+ if (t) return n.registerUpdateListener(({ editorState: a, dirtyElements: o, dirtyLeaves: s, prevEditorState: i, tags: l }) => {
519
+ e && o.size === 0 && s.size === 0 || r && l.has(de) || i.isEmpty() || t(a, n, l);
520
520
  });
521
- }, [o, r, e, t]), null;
522
- }
523
- function Ar({ hasStrictIndent: r = !1 }) {
524
- const [e] = P();
525
- return _(() => {
526
- if (!e.hasNodes([Ae, ze])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
527
- }, [e]), _(() => {
528
- if (r) return Ut(e);
521
+ }, [n, r, e, t]), null;
522
+ }
523
+ function jr({ hasStrictIndent: r = !1 }) {
524
+ const [e] = T();
525
+ return S(() => {
526
+ if (!e.hasNodes([Be, Ue])) throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor");
527
+ }, [e]), S(() => {
528
+ if (r) return qt(e);
529
529
  }, [e, r]), function(t) {
530
- _(() => jt(t), [t]);
530
+ S(() => Vt(t), [t]);
531
531
  }(e), null;
532
532
  }
533
- function zr({ validateUrl: r, attributes: e }) {
534
- const [t] = P();
535
- return _(() => {
536
- if (!t.hasNodes([Be])) throw new Error("LinkPlugin: LinkNode not registered on editor");
537
- return j(t.registerCommand(Ee, (o) => {
538
- if (o === null) return oe(o), !0;
539
- if (typeof o == "string") return !(r !== void 0 && !r(o)) && (oe(o, e), !0);
533
+ function Jr({ validateUrl: r, attributes: e }) {
534
+ const [t] = T();
535
+ return S(() => {
536
+ if (!t.hasNodes([He])) throw new Error("LinkPlugin: LinkNode not registered on editor");
537
+ return H(t.registerCommand(be, (n) => {
538
+ if (n === null) return oe(n), !0;
539
+ if (typeof n == "string") return !(r !== void 0 && !r(n)) && (oe(n, e), !0);
540
540
  {
541
- const { url: i, target: n, rel: s, title: a } = o;
542
- return oe(i, { ...e, rel: s, target: n, title: a }), !0;
541
+ const { url: a, target: o, rel: s, title: i } = n;
542
+ return oe(a, { ...e, rel: s, target: o, title: i }), !0;
543
543
  }
544
- }, ge), r !== void 0 ? t.registerCommand(Ie, (o) => {
545
- const i = p();
546
- if (!g(i) || i.isCollapsed() || !A(o, ClipboardEvent) || o.clipboardData === null) return !1;
547
- const n = o.clipboardData.getData("text");
548
- return !!r(n) && !i.getNodes().some((s) => J(s)) && (t.dispatchCommand(Ee, { ...e, url: n }), o.preventDefault(), !0);
549
- }, ge) : () => {
544
+ }, ve), r !== void 0 ? t.registerCommand(Fe, (n) => {
545
+ const a = p();
546
+ if (!g(a) || a.isCollapsed() || !z(n, ClipboardEvent) || n.clipboardData === null) return !1;
547
+ const o = n.clipboardData.getData("text");
548
+ return !!r(o) && !a.getNodes().some((s) => W(s)) && (t.dispatchCommand(be, { ...e, url: o }), n.preventDefault(), !0);
549
+ }, ve) : () => {
550
550
  });
551
551
  }, [t, r, e]), null;
552
552
  }
553
- function Br({ newTab: r = !0, disabled: e = !1 }) {
554
- const [t] = P();
555
- return _(() => {
556
- const o = (n) => {
557
- const s = n.target;
558
- if (!Me(s)) return;
559
- const a = Dt(s);
560
- if (a === null) return;
553
+ function Wr({ newTab: r = !0, disabled: e = !1 }) {
554
+ const [t] = T();
555
+ return S(() => {
556
+ const n = (o) => {
557
+ const s = o.target;
558
+ if (!Oe(s)) return;
559
+ const i = Rt(s);
560
+ if (i === null) return;
561
561
  let l = null, u = null;
562
- if (a.update(() => {
562
+ if (i.update(() => {
563
563
  const f = te(s);
564
564
  if (f !== null) {
565
- const v = ce(f, J);
566
- if (!e) if (Ht(v)) l = v.sanitizeUrl(v.getURL()), u = v.getTarget();
565
+ const v = fe(f, W);
566
+ if (!e) if (Gt(v)) l = v.sanitizeUrl(v.getURL()), u = v.getTarget();
567
567
  else {
568
568
  const C = function(w, x) {
569
569
  let y = w;
@@ -572,188 +572,189 @@ function Br({ newTab: r = !0, disabled: e = !1 }) {
572
572
  y = y.parentNode;
573
573
  }
574
574
  return null;
575
- }(s, $t);
575
+ }(s, It);
576
576
  C !== null && (l = C.href, u = C.target);
577
577
  }
578
578
  }
579
579
  }), l === null || l === "") return;
580
580
  const c = t.getEditorState().read(p);
581
- if (g(c) && !c.isCollapsed()) return void n.preventDefault();
582
- const d = n.type === "auxclick" && n.button === 1;
583
- window.open(l, r || d || n.metaKey || n.ctrlKey || u === "_blank" ? "_blank" : "_self"), n.preventDefault();
584
- }, i = (n) => {
585
- n.button === 1 && o(n);
581
+ if (g(c) && !c.isCollapsed()) return void o.preventDefault();
582
+ const d = o.type === "auxclick" && o.button === 1;
583
+ window.open(l, r || d || o.metaKey || o.ctrlKey || u === "_blank" ? "_blank" : "_self"), o.preventDefault();
584
+ }, a = (o) => {
585
+ o.button === 1 && n(o);
586
586
  };
587
- return t.registerRootListener((n, s) => {
588
- s !== null && (s.removeEventListener("click", o), s.removeEventListener("mouseup", i)), n !== null && (n.addEventListener("click", o), n.addEventListener("mouseup", i));
587
+ return t.registerRootListener((o, s) => {
588
+ s !== null && (s.removeEventListener("click", n), s.removeEventListener("mouseup", a)), o !== null && (o.addEventListener("click", n), o.addEventListener("mouseup", a));
589
589
  });
590
590
  }, [t, r, e]), null;
591
591
  }
592
- const ee = 0, le = 1, ue = 2, $ = 0, Ur = 1, De = 2, jr = 3, Hr = 4;
593
- function Wr(r, e, t, o, i) {
594
- if (r === null || t.size === 0 && o.size === 0 && !i) return $;
595
- const n = e._selection, s = r._selection;
596
- if (i) return Ur;
597
- if (!(g(n) && g(s) && s.isCollapsed() && n.isCollapsed())) return $;
598
- const a = function(y, E, S) {
592
+ const ee = 0, ue = 1, ce = 2, $ = 0, qr = 1, Pe = 2, Vr = 3, Gr = 4;
593
+ function Xr(r, e, t, n, a) {
594
+ if (r === null || t.size === 0 && n.size === 0 && !a) return $;
595
+ const o = e._selection, s = r._selection;
596
+ if (a) return qr;
597
+ if (!(g(o) && g(s) && s.isCollapsed() && o.isCollapsed())) return $;
598
+ const i = function(y, E, _) {
599
599
  const N = y._nodeMap, b = [];
600
600
  for (const L of E) {
601
601
  const k = N.get(L);
602
602
  k !== void 0 && b.push(k);
603
603
  }
604
- for (const [L, k] of S) {
604
+ for (const [L, k] of _) {
605
605
  if (!k) continue;
606
606
  const R = N.get(L);
607
- R === void 0 || Oe(R) || b.push(R);
607
+ R === void 0 || Ke(R) || b.push(R);
608
608
  }
609
609
  return b;
610
- }(e, t, o);
611
- if (a.length === 0) return $;
612
- if (a.length > 1) {
613
- const y = e._nodeMap, E = y.get(n.anchor.key), S = y.get(s.anchor.key);
614
- return E && S && !r._nodeMap.has(E.__key) && M(E) && E.__text.length === 1 && n.anchor.offset === 1 ? De : $;
610
+ }(e, t, n);
611
+ if (i.length === 0) return $;
612
+ if (i.length > 1) {
613
+ const y = e._nodeMap, E = y.get(o.anchor.key), _ = y.get(s.anchor.key);
614
+ return E && _ && !r._nodeMap.has(E.__key) && M(E) && E.__text.length === 1 && o.anchor.offset === 1 ? Pe : $;
615
615
  }
616
- const l = a[0], u = r._nodeMap.get(l.__key);
616
+ const l = i[0], u = r._nodeMap.get(l.__key);
617
617
  if (!M(u) || !M(l) || u.__mode !== l.__mode) return $;
618
618
  const c = u.__text, d = l.__text;
619
619
  if (c === d) return $;
620
- const f = n.anchor, v = s.anchor;
620
+ const f = o.anchor, v = s.anchor;
621
621
  if (f.key !== v.key || f.type !== "text") return $;
622
622
  const C = f.offset, w = v.offset, x = d.length - c.length;
623
- return x === 1 && w === C - 1 ? De : x === -1 && w === C + 1 ? jr : x === -1 && w === C ? Hr : $;
623
+ return x === 1 && w === C - 1 ? Pe : x === -1 && w === C + 1 ? Vr : x === -1 && w === C ? Gr : $;
624
624
  }
625
- function Jr(r, e) {
626
- let t = Date.now(), o = $;
627
- return (i, n, s, a, l, u) => {
625
+ function Yr(r, e) {
626
+ let t = Date.now(), n = $;
627
+ return (a, o, s, i, l, u) => {
628
628
  const c = Date.now();
629
- if (u.has("historic")) return o = $, t = c, ue;
630
- const d = Wr(i, n, a, l, r.isComposing()), f = (() => {
631
- const v = s === null || s.editor === r, C = u.has("history-push");
632
- if (!C && v && u.has("history-merge")) return ee;
633
- if (i === null) return le;
634
- const w = n._selection;
635
- return a.size > 0 || l.size > 0 ? C === !1 && d !== $ && d === o && c < t + e && v || a.size === 1 && function(x, y, E) {
636
- const S = y._nodeMap.get(x), N = E._nodeMap.get(x), b = y._selection, L = E._selection;
637
- return !(g(b) && g(L) && b.anchor.type === "element" && b.focus.type === "element" && L.anchor.type === "text" && L.focus.type === "text" || !M(S) || !M(N) || S.__parent !== N.__parent) && JSON.stringify(y.read(() => S.exportJSON())) === JSON.stringify(E.read(() => N.exportJSON()));
638
- }(Array.from(a)[0], i, n) ? ee : le : w !== null ? ee : ue;
629
+ if (u.has(se)) return n = $, t = c, ce;
630
+ const d = Xr(a, o, i, l, r.isComposing()), f = (() => {
631
+ const v = s === null || s.editor === r, C = u.has(zt);
632
+ if (!C && v && u.has(de)) return ee;
633
+ if (a === null) return ue;
634
+ const w = o._selection;
635
+ return i.size > 0 || l.size > 0 ? C === !1 && d !== $ && d === n && c < t + e && v || i.size === 1 && function(x, y, E) {
636
+ const _ = y._nodeMap.get(x), N = E._nodeMap.get(x), b = y._selection, L = E._selection;
637
+ return !(g(b) && g(L) && b.anchor.type === "element" && b.focus.type === "element" && L.anchor.type === "text" && L.focus.type === "text" || !M(_) || !M(N) || _.__parent !== N.__parent) && JSON.stringify(y.read(() => _.exportJSON())) === JSON.stringify(E.read(() => N.exportJSON()));
638
+ }(Array.from(i)[0], a, o) ? ee : ue : w !== null ? ee : ce;
639
639
  })();
640
- return t = c, o = d, f;
640
+ return t = c, n = d, f;
641
641
  };
642
642
  }
643
- function $e(r) {
643
+ function Te(r) {
644
644
  r.undoStack = [], r.redoStack = [], r.current = null;
645
645
  }
646
- function qr(r, e, t) {
647
- const o = Jr(r, t);
648
- return j(r.registerCommand(It, () => (function(n, s) {
649
- const a = s.redoStack, l = s.undoStack;
646
+ function Qr(r, e, t) {
647
+ const n = Yr(r, t);
648
+ return H(r.registerCommand(Kt, () => (function(o, s) {
649
+ const i = s.redoStack, l = s.undoStack;
650
650
  if (l.length !== 0) {
651
651
  const u = s.current, c = l.pop();
652
- u !== null && (a.push(u), n.dispatchCommand(X, !0)), l.length === 0 && n.dispatchCommand(Y, !1), s.current = c || null, c && c.editor.setEditorState(c.editorState, { tag: "historic" });
652
+ u !== null && (i.push(u), o.dispatchCommand(X, !0)), l.length === 0 && o.dispatchCommand(Y, !1), s.current = c || null, c && c.editor.setEditorState(c.editorState, { tag: se });
653
653
  }
654
- }(r, e), !0), m), r.registerCommand(Rt, () => (function(n, s) {
655
- const a = s.redoStack, l = s.undoStack;
656
- if (a.length !== 0) {
654
+ }(r, e), !0), m), r.registerCommand(Ot, () => (function(o, s) {
655
+ const i = s.redoStack, l = s.undoStack;
656
+ if (i.length !== 0) {
657
657
  const u = s.current;
658
- u !== null && (l.push(u), n.dispatchCommand(Y, !0));
659
- const c = a.pop();
660
- a.length === 0 && n.dispatchCommand(X, !1), s.current = c || null, c && c.editor.setEditorState(c.editorState, { tag: "historic" });
658
+ u !== null && (l.push(u), o.dispatchCommand(Y, !0));
659
+ const c = i.pop();
660
+ i.length === 0 && o.dispatchCommand(X, !1), s.current = c || null, c && c.editor.setEditorState(c.editorState, { tag: se });
661
661
  }
662
- }(r, e), !0), m), r.registerCommand(Pt, () => ($e(e), !1), m), r.registerCommand(Tt, () => ($e(e), r.dispatchCommand(X, !1), r.dispatchCommand(Y, !1), !0), m), r.registerUpdateListener(({ editorState: n, prevEditorState: s, dirtyLeaves: a, dirtyElements: l, tags: u }) => {
662
+ }(r, e), !0), m), r.registerCommand(Ft, () => (Te(e), !1), m), r.registerCommand(Mt, () => (Te(e), r.dispatchCommand(X, !1), r.dispatchCommand(Y, !1), !0), m), r.registerUpdateListener(({ editorState: o, prevEditorState: s, dirtyLeaves: i, dirtyElements: l, tags: u }) => {
663
663
  const c = e.current, d = e.redoStack, f = e.undoStack, v = c === null ? null : c.editorState;
664
- if (c !== null && n === v) return;
665
- const C = o(s, n, c, a, l, u);
666
- if (C === le) d.length !== 0 && (e.redoStack = [], r.dispatchCommand(X, !1)), c !== null && (f.push({ ...c }), r.dispatchCommand(Y, !0));
667
- else if (C === ue) return;
668
- e.current = { editor: r, editorState: n };
664
+ if (c !== null && o === v) return;
665
+ const C = n(s, o, c, i, l, u);
666
+ if (C === ue) d.length !== 0 && (e.redoStack = [], r.dispatchCommand(X, !1)), c !== null && (f.push({ ...c }), r.dispatchCommand(Y, !0));
667
+ else if (C === ce) return;
668
+ e.current = { editor: r, editorState: o };
669
669
  }));
670
670
  }
671
- function Vr() {
671
+ function Zr() {
672
672
  return { current: null, redoStack: [], undoStack: [] };
673
673
  }
674
- function Gr({ delay: r, externalHistoryState: e }) {
675
- const [t] = P();
676
- return function(o, i, n = 1e3) {
677
- const s = q(() => i || Vr(), [i]);
678
- _(() => qr(o, s, n), [n, o, s]);
674
+ function en({ delay: r, externalHistoryState: e }) {
675
+ const [t] = T();
676
+ return function(n, a, o = 1e3) {
677
+ const s = q(() => a || Zr(), [a]);
678
+ S(() => Qr(n, s, o), [o, n, s]);
679
679
  }(t, e, r), null;
680
680
  }
681
- function Xr({ hasCellMerge: r = !0, hasCellBackgroundColor: e = !0, hasTabHandler: t = !0, hasHorizontalScroll: o = !1 }) {
682
- const [i] = P();
683
- return _(() => {
684
- Jt(i, o);
685
- }, [i, o]), _(() => qt(i), [i]), _(() => Vt(i, t), [i, t]), _(() => {
686
- if (!r) return Gt(i);
687
- }, [i, r]), _(() => {
688
- if (!e) return i.registerNodeTransform(Ue, (n) => {
689
- n.getBackgroundColor() !== null && n.setBackgroundColor(null);
681
+ function tn({ hasCellMerge: r = !0, hasCellBackgroundColor: e = !0, hasTabHandler: t = !0, hasHorizontalScroll: n = !1 }) {
682
+ const [a] = T();
683
+ return S(() => {
684
+ Yt(a) !== n && (Qt(a, n), a.registerNodeTransform(je, () => {
685
+ })());
686
+ }, [a, n]), S(() => Zt(a), [a]), S(() => er(a, t), [a, t]), S(() => {
687
+ if (!r) return tr(a);
688
+ }, [a, r]), S(() => {
689
+ if (!e) return a.registerNodeTransform(Je, (o) => {
690
+ o.getBackgroundColor() !== null && o.setBackgroundColor(null);
690
691
  });
691
- }, [i, e, r]), null;
692
+ }, [a, e, r]), null;
692
693
  }
693
- const Je = 200, Yr = ({
694
+ const Ge = 200, rn = ({
694
695
  currentLanguage: r = "NL",
695
696
  initialValue: e = "",
696
697
  placeholder: t = "",
697
- label: o = "",
698
- info: i = "",
699
- required: n = !1,
698
+ label: n = "",
699
+ info: a = "",
700
+ required: o = !1,
700
701
  notValidatedText: s = "",
701
- maxHeightInRem: a = "20rem",
702
- maxWords: l = Je,
702
+ maxHeightInRem: i = "20rem",
703
+ maxWords: l = Ge,
703
704
  onChange: u
704
705
  }) => {
705
- const { switchLanguage: c } = dr(), d = sr(), [f] = O(() => Pe()), [v, C] = O(0), [w, x] = O(0), y = Fe(null), E = {
706
+ const { switchLanguage: c } = hr(), d = dr(), [f] = F(() => Ie()), [v, C] = F(0), [w, x] = F(0), y = ze(null), E = {
706
707
  html: {
707
- export: rr
708
+ export: ir
708
709
  },
709
710
  namespace: "UvaRte",
710
711
  editor: f,
711
- theme: lr,
712
+ theme: mr,
712
713
  onError(b) {
713
714
  throw b;
714
715
  },
715
- nodes: [Ae, ze, Be, Wt, Ue, Xt, Yt],
716
+ nodes: [Be, Ue, He, Xt, Je, rr, je],
716
717
  editorState: (b) => {
717
- const k = new DOMParser().parseFromString(e, "text/html"), R = zt(b, k), F = z();
718
- if (F.clear(), nr(e))
718
+ const k = new DOMParser().parseFromString(e, "text/html"), R = Jt(b, k), O = A();
719
+ if (O.clear(), lr(e))
719
720
  R.forEach((B) => {
720
- F.append(B);
721
+ O.append(B);
721
722
  });
722
723
  else {
723
- const B = Re();
724
+ const B = Me();
724
725
  R.forEach((D, V) => {
725
- V === 0 ? (B.append(D), F.append(B)) : F.append(D);
726
+ V === 0 ? (B.append(D), O.append(B)) : O.append(D);
726
727
  });
727
728
  }
728
729
  }
729
- }, S = (b) => b.trim().length === 0 ? 0 : b.split(" ").length, N = (b, L) => {
730
+ }, _ = (b) => b.trim().length === 0 ? 0 : b.split(" ").length, N = (b, L) => {
730
731
  b.read(() => {
731
732
  let k = "";
732
- C(S(z().getTextContent().replace(/\s+/g, " ").trim())), k = or(Bt(L)), u(k);
733
+ C(_(A().getTextContent().replace(/\s+/g, " ").trim())), k = ur(Wt(L)), u(k);
733
734
  });
734
735
  };
735
- return _(() => {
736
+ return S(() => {
736
737
  c(r.toLocaleLowerCase());
737
- }, [r, c]), _(() => {
738
+ }, [r, c]), S(() => {
738
739
  const b = e.replace(/<br\s*\/?>|&nbsp;/gi, " ").replace(/<\/?[^>]+(>|$)|&[a-z]+;/g, "").replace(/\s+/g, " ").trim();
739
- C(S(b));
740
+ C(_(b));
740
741
  }, []), /* @__PURE__ */ K("div", { className: I.editor__container, children: [
741
742
  /* @__PURE__ */ K("div", { className: I.editor__header, children: [
742
- /* @__PURE__ */ h(ur, { label: o, info: i, required: n }),
743
+ /* @__PURE__ */ h(pr, { label: n, info: a, required: o }),
743
744
  /* @__PURE__ */ K("div", { className: I["editor__header-word-count"], children: [
744
- /* @__PURE__ */ h("span", { className: tr({ [I["editor__header-word-count--alert"]]: v > l }), children: v }),
745
+ /* @__PURE__ */ h("span", { className: sr({ [I["editor__header-word-count--alert"]]: v > l }), children: v }),
745
746
  " / ",
746
747
  l
747
748
  ] })
748
749
  ] }),
749
- /* @__PURE__ */ h("div", { className: I.editor, children: /* @__PURE__ */ K(pr, { initialConfig: E, children: [
750
- /* @__PURE__ */ h(ir, { editorScrollPosition: w }),
750
+ /* @__PURE__ */ h("div", { className: I.editor, children: /* @__PURE__ */ K(yr, { initialConfig: E, children: [
751
+ /* @__PURE__ */ h(cr, { editorScrollPosition: w }),
751
752
  /* @__PURE__ */ K("div", { className: I["editor__field-wrapper"], children: [
752
753
  /* @__PURE__ */ h(
753
- Lr,
754
+ Rr,
754
755
  {
755
756
  contentEditable: /* @__PURE__ */ h(
756
- Pr,
757
+ Or,
757
758
  {
758
759
  className: I.editor__field,
759
760
  "aria-label": d.common.rteAriaLabel,
@@ -762,53 +763,53 @@ const Je = 200, Yr = ({
762
763
  placeholder: /* @__PURE__ */ h("div", { className: I.editor__placeholder, children: t }),
763
764
  spellCheck: !1,
764
765
  id: "rteEditor",
765
- style: { height: `${a}`, maxHeight: `${a}` },
766
+ style: { height: `${i}`, maxHeight: `${i}` },
766
767
  onScroll: (b) => x(b.currentTarget.scrollTop),
767
768
  ref: y
768
769
  }
769
770
  ),
770
771
  placeholder: /* @__PURE__ */ h("div", { className: I.editor__placeholder, children: t }),
771
- ErrorBoundary: Or
772
+ ErrorBoundary: Br
772
773
  }
773
774
  ),
774
- /* @__PURE__ */ h(Xr, {}),
775
- /* @__PURE__ */ h(Gr, {}),
776
- /* @__PURE__ */ h(Ar, {}),
777
- /* @__PURE__ */ h(zr, { validateUrl: Qt }),
778
- /* @__PURE__ */ h(Zt, { matchers: er }),
779
- /* @__PURE__ */ h(Br, {}),
780
- /* @__PURE__ */ h(Kr, { onChange: N }),
781
- /* @__PURE__ */ h(fr, {})
775
+ /* @__PURE__ */ h(tn, {}),
776
+ /* @__PURE__ */ h(en, {}),
777
+ /* @__PURE__ */ h(jr, {}),
778
+ /* @__PURE__ */ h(Jr, { validateUrl: nr }),
779
+ /* @__PURE__ */ h(or, { matchers: ar }),
780
+ /* @__PURE__ */ h(Wr, {}),
781
+ /* @__PURE__ */ h(Hr, { onChange: N }),
782
+ /* @__PURE__ */ h(vr, {})
782
783
  ] })
783
784
  ] }) }),
784
- s !== "" && /* @__PURE__ */ h(ar, { level: "error", feedback: s })
785
+ s !== "" && /* @__PURE__ */ h(fr, { level: "error", feedback: s })
785
786
  ] });
786
- }, Bn = ({
787
+ }, Wn = ({
787
788
  currentLanguage: r = "NL",
788
789
  initialValue: e = "",
789
790
  placeholder: t = "",
790
- label: o = "",
791
- info: i = "",
792
- required: n = !1,
791
+ label: n = "",
792
+ info: a = "",
793
+ required: o = !1,
793
794
  notValidatedText: s = "",
794
- maxWords: a = Je,
795
+ maxWords: i = Ge,
795
796
  onChange: l
796
- }) => /* @__PURE__ */ h(cr, { children: /* @__PURE__ */ h(
797
- Yr,
797
+ }) => /* @__PURE__ */ h(gr, { children: /* @__PURE__ */ h(
798
+ rn,
798
799
  {
799
800
  currentLanguage: r,
800
801
  initialValue: e,
801
802
  placeholder: t,
802
- label: o,
803
- info: i,
804
- required: n,
803
+ label: n,
804
+ info: a,
805
+ required: o,
805
806
  notValidatedText: s,
806
- maxWords: a,
807
+ maxWords: i,
807
808
  onChange: l
808
809
  }
809
810
  ) });
810
811
  export {
811
- Yr as Rte,
812
- Bn as RteEditor
812
+ rn as Rte,
813
+ Wn as RteEditor
813
814
  };
814
815
  //# sourceMappingURL=RteEditor.js.map