@uva-glass/component-library 3.42.4 → 3.43.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 (61) hide show
  1. package/dist/{Lexical.prod-qYl_ifJ6.js → Lexical.prod-nXWuyOKD.js} +1299 -1322
  2. package/dist/Lexical.prod-nXWuyOKD.js.map +1 -0
  3. package/dist/{LexicalClipboard.prod-DIGbXq4v.js → LexicalClipboard.prod-BP8LNbol.js} +104 -104
  4. package/dist/LexicalClipboard.prod-BP8LNbol.js.map +1 -0
  5. package/dist/{LexicalLink.prod-ZZwC5ABn.js → LexicalLink.prod-Brzpgs_K.js} +51 -51
  6. package/dist/{LexicalLink.prod-ZZwC5ABn.js.map → LexicalLink.prod-Brzpgs_K.js.map} +1 -1
  7. package/dist/{LexicalList.prod-UurCu6DK.js → LexicalList.prod-D6IAptR7.js} +53 -53
  8. package/dist/{LexicalList.prod-UurCu6DK.js.map → LexicalList.prod-D6IAptR7.js.map} +1 -1
  9. package/dist/LexicalSelection.prod-ZvNRDI9l.js +119 -0
  10. package/dist/LexicalSelection.prod-ZvNRDI9l.js.map +1 -0
  11. package/dist/LexicalTable.prod-DJktN6jF.js +1763 -0
  12. package/dist/LexicalTable.prod-DJktN6jF.js.map +1 -0
  13. package/dist/{LexicalUtils.prod-C3To3vrm.js → LexicalUtils.prod-Ckfw0Hjt.js} +34 -34
  14. package/dist/{LexicalUtils.prod-C3To3vrm.js.map → LexicalUtils.prod-Ckfw0Hjt.js.map} +1 -1
  15. package/dist/{TableCellResizerPlugin-B9MT1fxA.js → TableCellResizerPlugin-DFzNK-ve.js} +32 -32
  16. package/dist/{TableCellResizerPlugin-B9MT1fxA.js.map → TableCellResizerPlugin-DFzNK-ve.js.map} +1 -1
  17. package/dist/{TablePlugin-FQQwnq2m.js → TablePlugin-CAoOq8iA.js} +52 -52
  18. package/dist/{TablePlugin-FQQwnq2m.js.map → TablePlugin-CAoOq8iA.js.map} +1 -1
  19. package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
  20. package/dist/components/FormInput/FormInput.js +1 -1
  21. package/dist/components/InputField/InputField.stories.js +1 -1
  22. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  23. package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
  24. package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
  25. package/dist/components/MultiSelect/index.js +1 -1
  26. package/dist/components/PeriodSelector/PeriodSelector.js +37 -37
  27. package/dist/components/PeriodSelector/PeriodSelector.js.map +1 -1
  28. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
  29. package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
  30. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  31. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +6 -6
  32. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +6 -6
  33. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +2 -2
  34. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
  35. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +35 -35
  36. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  37. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +27 -27
  38. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +5 -5
  39. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +4 -4
  40. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +1 -1
  41. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
  42. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +4 -4
  43. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +7 -7
  44. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  45. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +18 -18
  46. package/dist/components/RteEditor/Plugins/index.js +2 -2
  47. package/dist/components/RteEditor/RteEditor.js +233 -233
  48. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  49. package/dist/components/RteEditor/helpers.js +4 -4
  50. package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +16 -16
  51. package/dist/components/index.js +1 -1
  52. package/dist/{helpers-D3SODeVc.js → helpers-mE437H2Y.js} +38 -38
  53. package/dist/{helpers-D3SODeVc.js.map → helpers-mE437H2Y.js.map} +1 -1
  54. package/dist/index.js +1 -1
  55. package/package.json +19 -19
  56. package/dist/Lexical.prod-qYl_ifJ6.js.map +0 -1
  57. package/dist/LexicalClipboard.prod-DIGbXq4v.js.map +0 -1
  58. package/dist/LexicalSelection.prod-DXruZeFN.js +0 -103
  59. package/dist/LexicalSelection.prod-DXruZeFN.js.map +0 -1
  60. package/dist/LexicalTable.prod-COFf1Spn.js +0 -1763
  61. package/dist/LexicalTable.prod-COFf1Spn.js.map +0 -1
@@ -1,133 +1,133 @@
1
- import { b as E, z as W } from "./LexicalSelection.prod-DXruZeFN.js";
2
- import { ax as _, ay as O, ah as T, f as U, az as N, aA as D, aB as F, x as g, aC as R, s as w, aD as V, k as q, aE as L, B as G, _ as C, P as S, aF as K, a3 as k, aG as Y, V as j, r as Q, a7 as X, an as Z, aH as ee, o as ne, aI as te, aJ as oe, l as re } from "./Lexical.prod-qYl_ifJ6.js";
3
- import { L as le } from "./LexicalUtils.prod-C3To3vrm.js";
4
- function se(t, e) {
1
+ import { z as R, L as Z } from "./LexicalSelection.prod-ZvNRDI9l.js";
2
+ import { ax as P, ay as _, ah as b, s as B, az as T, aA as D, aB as F, h as g, aC as O, Z as w, aD as U, y as q, aE as L, F as G, a as C, w as S, aF as Y, a3 as J, aG as j, R as K, v as Q, a7 as V, an as X, aH as ee, t as ne, aI as te, aJ as oe, m as re } from "./Lexical.prod-nXWuyOKD.js";
3
+ import { L as le } from "./LexicalUtils.prod-Ckfw0Hjt.js";
4
+ function ie(t, e) {
5
5
  const l = e.body ? e.body.childNodes : [];
6
6
  let o = [];
7
- const s = [];
7
+ const i = [];
8
8
  for (let c = 0; c < l.length; c++) {
9
9
  const r = l[c];
10
- if (!J.has(r.nodeName)) {
11
- const n = B(r, t, s, !1);
10
+ if (!H.has(r.nodeName)) {
11
+ const n = k(r, t, i, !1);
12
12
  n !== null && (o = o.concat(n));
13
13
  }
14
14
  }
15
15
  return (function(c) {
16
- for (const r of c) r.getNextSibling() instanceof _ && r.insertAfter(O());
16
+ for (const r of c) r.getNextSibling() instanceof P && r.insertAfter(_());
17
17
  for (const r of c) {
18
18
  const n = r.getChildren();
19
19
  for (const a of n) r.insertBefore(a);
20
20
  r.remove();
21
21
  }
22
- })(s), o;
22
+ })(i), o;
23
23
  }
24
- function ie(t, e) {
24
+ function se(t, e) {
25
25
  if (typeof document > "u" || typeof window > "u" && global.window === void 0) throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");
26
- const l = document.createElement("div"), o = T().getChildren();
27
- for (let s = 0; s < o.length; s++)
28
- H(t, o[s], l, e);
26
+ const l = document.createElement("div"), o = b().getChildren();
27
+ for (let i = 0; i < o.length; i++)
28
+ $(t, o[i], l, e);
29
29
  return l.innerHTML;
30
30
  }
31
- function H(t, e, l, o = null) {
32
- let s = o === null || e.isSelected(o);
31
+ function $(t, e, l, o = null) {
32
+ let i = o === null || e.isSelected(o);
33
33
  const c = g(e) && e.excludeFromCopy("html");
34
34
  let r = e;
35
35
  if (o !== null) {
36
- let p = R(e);
37
- p = w(p) && o !== null ? E(o, p) : p, r = p;
36
+ let p = O(e);
37
+ p = w(p) && o !== null ? R(o, p) : p, r = p;
38
38
  }
39
- const n = g(r) ? r.getChildren() : [], a = V(t, r.getType());
40
- let i;
41
- i = a && a.exportDOM !== void 0 ? a.exportDOM(t, r) : r.exportDOM(t);
42
- const { element: u, after: h } = i;
39
+ const n = g(r) ? r.getChildren() : [], a = U(t, r.getType());
40
+ let s;
41
+ s = a && a.exportDOM !== void 0 ? a.exportDOM(t, r) : r.exportDOM(t);
42
+ const { element: u, after: h } = s;
43
43
  if (!u) return !1;
44
44
  const d = document.createDocumentFragment();
45
45
  for (let p = 0; p < n.length; p++) {
46
- const f = n[p], x = H(t, f, d, o);
47
- !s && g(e) && x && e.extractWithChild(f, o, "html") && (s = !0);
46
+ const f = n[p], y = $(t, f, d, o);
47
+ !i && g(e) && y && e.extractWithChild(f, o, "html") && (i = !0);
48
48
  }
49
- if (s && !c) {
49
+ if (i && !c) {
50
50
  if ((q(u) || L(u)) && u.append(d), l.append(u), h) {
51
51
  const p = h.call(r, u);
52
52
  p && (L(u) ? u.replaceChildren(p) : u.replaceWith(p));
53
53
  }
54
54
  } else l.append(d);
55
- return s;
55
+ return i;
56
56
  }
57
- const J = /* @__PURE__ */ new Set(["STYLE", "SCRIPT"]);
58
- function B(t, e, l, o, s = /* @__PURE__ */ new Map(), c) {
57
+ const H = /* @__PURE__ */ new Set(["STYLE", "SCRIPT"]);
58
+ function k(t, e, l, o, i = /* @__PURE__ */ new Map(), c) {
59
59
  let r = [];
60
- if (J.has(t.nodeName)) return r;
60
+ if (H.has(t.nodeName)) return r;
61
61
  let n = null;
62
- const a = (function(f, x) {
63
- const { nodeName: z } = f, A = x._htmlConversions.get(z.toLowerCase());
64
- let y = null;
65
- if (A !== void 0) for (const I of A) {
66
- const b = I(f);
67
- b !== null && (y === null || (y.priority || 0) <= (b.priority || 0)) && (y = b);
62
+ const a = (function(f, y) {
63
+ const { nodeName: I } = f, A = y._htmlConversions.get(I.toLowerCase());
64
+ let x = null;
65
+ if (A !== void 0) for (const W of A) {
66
+ const N = W(f);
67
+ N !== null && (x === null || (x.priority || 0) <= (N.priority || 0)) && (x = N);
68
68
  }
69
- return y !== null ? y.conversion : null;
70
- })(t, e), i = a ? a(t) : null;
69
+ return x !== null ? x.conversion : null;
70
+ })(t, e), s = a ? a(t) : null;
71
71
  let u = null;
72
- if (i !== null) {
73
- u = i.after;
74
- const f = i.node;
72
+ if (s !== null) {
73
+ u = s.after;
74
+ const f = s.node;
75
75
  if (n = Array.isArray(f) ? f[f.length - 1] : f, n !== null) {
76
- for (const [, x] of s) if (n = x(n, c), !n) break;
76
+ for (const [, y] of i) if (n = y(n, c), !n) break;
77
77
  n && r.push(...Array.isArray(f) ? f : [n]);
78
78
  }
79
- i.forChild != null && s.set(t.nodeName, i.forChild);
79
+ s.forChild != null && i.set(t.nodeName, s.forChild);
80
80
  }
81
81
  const h = t.childNodes;
82
82
  let d = [];
83
- const p = (n == null || !U(n)) && (n != null && N(n) || o);
84
- for (let f = 0; f < h.length; f++) d.push(...B(h[f], e, l, p, new Map(s), n));
83
+ const p = (n == null || !B(n)) && (n != null && T(n) || o);
84
+ for (let f = 0; f < h.length; f++) d.push(...k(h[f], e, l, p, new Map(i), n));
85
85
  return u != null && (d = u(d)), D(t) && (d = ae(t, d, p ? () => {
86
- const f = new _();
86
+ const f = new P();
87
87
  return l.push(f), f;
88
88
  } : G)), n == null ? d.length > 0 ? r = r.concat(d) : D(t) && (function(f) {
89
89
  return f.nextSibling == null || f.previousSibling == null ? !1 : F(f.nextSibling) && F(f.previousSibling);
90
- })(t) && (r = r.concat(O())) : g(n) && n.append(...d), r;
90
+ })(t) && (r = r.concat(_())) : g(n) && n.append(...d), r;
91
91
  }
92
92
  function ae(t, e, l) {
93
- const o = t.style.textAlign, s = [];
93
+ const o = t.style.textAlign, i = [];
94
94
  let c = [];
95
95
  for (let r = 0; r < e.length; r++) {
96
96
  const n = e[r];
97
- if (N(n)) o && !n.getFormat() && n.setFormat(o), s.push(n);
98
- else if (c.push(n), r === e.length - 1 || r < e.length - 1 && N(e[r + 1])) {
97
+ if (T(n)) o && !n.getFormat() && n.setFormat(o), i.push(n);
98
+ else if (c.push(n), r === e.length - 1 || r < e.length - 1 && T(e[r + 1])) {
99
99
  const a = l();
100
- a.setFormat(o), a.append(...c), s.push(a), c = [];
100
+ a.setFormat(o), a.append(...c), i.push(a), c = [];
101
101
  }
102
102
  }
103
- return s;
103
+ return i;
104
104
  }
105
105
  function v(t, ...e) {
106
106
  const l = new URL("https://lexical.dev/docs/error"), o = new URLSearchParams();
107
107
  o.append("code", t);
108
- for (const s of e) o.append("v", s);
108
+ for (const i of e) o.append("v", i);
109
109
  throw l.search = o.toString(), Error(`Minified Lexical error #${t}; visit ${l.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
110
110
  }
111
111
  function ce(t, e = S()) {
112
- return e == null && v(166), C(e) && e.isCollapsed() || e.getNodes().length === 0 ? "" : ie(t, e);
112
+ return e == null && v(166), C(e) && e.isCollapsed() || e.getNodes().length === 0 ? "" : se(t, e);
113
113
  }
114
114
  function ue(t, e = S()) {
115
115
  return e == null && v(166), C(e) && e.isCollapsed() || e.getNodes().length === 0 ? null : JSON.stringify(fe(t, e));
116
116
  }
117
- function ye(t, e, l) {
117
+ function xe(t, e, l) {
118
118
  const o = t.getData("application/x-lexical-editor");
119
119
  if (o) try {
120
120
  const n = JSON.parse(o);
121
121
  if (n.namespace === l._config.namespace && Array.isArray(n.nodes))
122
- return M(l, de(n.nodes), e);
122
+ return E(l, de(n.nodes), e);
123
123
  } catch {
124
124
  }
125
- const s = t.getData("text/html"), c = t.getData("text/plain");
126
- if (s && c !== s) try {
125
+ const i = t.getData("text/html"), c = t.getData("text/plain");
126
+ if (i && c !== i) try {
127
127
  const n = new DOMParser().parseFromString((function(a) {
128
- return window.trustedTypes && window.trustedTypes.createPolicy ? window.trustedTypes.createPolicy("lexical", { createHTML: (i) => i }).createHTML(a) : a;
129
- })(s), "text/html");
130
- return M(l, se(l, n), e);
128
+ return window.trustedTypes && window.trustedTypes.createPolicy ? window.trustedTypes.createPolicy("lexical", { createHTML: (s) => s }).createHTML(a) : a;
129
+ })(i), "text/html");
130
+ return E(l, ie(l, n), e);
131
131
  } catch {
132
132
  }
133
133
  const r = c || t.getData("text/uri-list");
@@ -135,25 +135,25 @@ function ye(t, e, l) {
135
135
  const n = r.split(/(\r?\n|\t)/);
136
136
  n[n.length - 1] === "" && n.pop();
137
137
  for (let a = 0; a < n.length; a++) {
138
- const i = S();
139
- if (C(i)) {
138
+ const s = S();
139
+ if (C(s)) {
140
140
  const u = n[a];
141
141
  u === `
142
142
  ` || u === `\r
143
- ` ? i.insertParagraph() : u === " " ? i.insertNodes([K()]) : i.insertText(u);
143
+ ` ? s.insertParagraph() : u === " " ? s.insertNodes([Y()]) : s.insertText(u);
144
144
  }
145
145
  }
146
146
  } else e.insertRawText(r);
147
147
  }
148
- function M(t, e, l) {
148
+ function E(t, e, l) {
149
149
  t.dispatchCommand(Q, { nodes: e, selection: l }) || (l.insertNodes(e), (function(o) {
150
150
  if (C(o) && o.isCollapsed()) {
151
- const s = o.anchor;
151
+ const i = o.anchor;
152
152
  let c = null;
153
- const r = X(s, "previous");
154
- if (r) if (Z(r)) c = r.origin;
153
+ const r = V(i, "previous");
154
+ if (r) if (X(r)) c = r.origin;
155
155
  else {
156
- const n = ee(r, ne(T(), "next").getFlipped());
156
+ const n = ee(r, ne(b(), "next").getFlipped());
157
157
  for (const a of n) {
158
158
  if (w(a.origin)) {
159
159
  c = a.origin;
@@ -169,76 +169,76 @@ function M(t, e, l) {
169
169
  }
170
170
  })(l));
171
171
  }
172
- function $(t, e, l, o = []) {
173
- let s = e === null || l.isSelected(e);
172
+ function z(t, e, l, o = []) {
173
+ let i = e === null || l.isSelected(e);
174
174
  const c = g(l) && l.excludeFromCopy("html");
175
175
  let r = l;
176
176
  if (e !== null) {
177
- let i = R(l);
178
- i = w(i) && e !== null ? E(e, i) : i, r = i;
177
+ let s = O(l);
178
+ s = w(s) && e !== null ? R(e, s) : s, r = s;
179
179
  }
180
- const n = g(r) ? r.getChildren() : [], a = (function(i) {
181
- const u = i.exportJSON(), h = i.constructor;
182
- if (u.type !== h.getType() && v(58, h.name), g(i)) {
180
+ const n = g(r) ? r.getChildren() : [], a = (function(s) {
181
+ const u = s.exportJSON(), h = s.constructor;
182
+ if (u.type !== h.getType() && v(58, h.name), g(s)) {
183
183
  const d = u.children;
184
184
  Array.isArray(d) || v(59, h.name);
185
185
  }
186
186
  return u;
187
187
  })(r);
188
188
  if (w(r)) {
189
- const i = r.__text;
190
- i.length > 0 ? a.text = i : s = !1;
189
+ const s = r.__text;
190
+ s.length > 0 ? a.text = s : i = !1;
191
191
  }
192
- for (let i = 0; i < n.length; i++) {
193
- const u = n[i], h = $(t, e, u, a.children);
194
- !s && g(l) && h && l.extractWithChild(u, e, "clone") && (s = !0);
192
+ for (let s = 0; s < n.length; s++) {
193
+ const u = n[s], h = z(t, e, u, a.children);
194
+ !i && g(l) && h && l.extractWithChild(u, e, "clone") && (i = !0);
195
195
  }
196
- if (s && !c) o.push(a);
197
- else if (Array.isArray(a.children)) for (let i = 0; i < a.children.length; i++) {
198
- const u = a.children[i];
196
+ if (i && !c) o.push(a);
197
+ else if (Array.isArray(a.children)) for (let s = 0; s < a.children.length; s++) {
198
+ const u = a.children[s];
199
199
  o.push(u);
200
200
  }
201
- return s;
201
+ return i;
202
202
  }
203
203
  function fe(t, e) {
204
- const l = [], o = T().getChildren();
205
- for (let s = 0; s < o.length; s++)
206
- $(t, e, o[s], l);
204
+ const l = [], o = b().getChildren();
205
+ for (let i = 0; i < o.length; i++)
206
+ z(t, e, o[i], l);
207
207
  return { namespace: t._config.namespace, nodes: l };
208
208
  }
209
209
  function de(t) {
210
210
  const e = [];
211
211
  for (let l = 0; l < t.length; l++) {
212
- const o = t[l], s = te(o);
213
- w(s) && W(s), e.push(s);
212
+ const o = t[l], i = te(o);
213
+ w(i) && Z(i), e.push(i);
214
214
  }
215
215
  return e;
216
216
  }
217
217
  let m = null;
218
218
  async function Ce(t, e, l) {
219
219
  if (m !== null) return !1;
220
- if (e !== null) return new Promise(((i, u) => {
220
+ if (e !== null) return new Promise(((s, u) => {
221
221
  t.update((() => {
222
- i(P(t, e, l));
222
+ s(M(t, e, l));
223
223
  }));
224
224
  }));
225
- const o = t.getRootElement(), s = t._window || window, c = window.document, r = k(s);
225
+ const o = t.getRootElement(), i = t._window || window, c = window.document, r = J(i);
226
226
  if (o === null || r === null) return !1;
227
227
  const n = c.createElement("span");
228
228
  n.style.cssText = "position: fixed; top: -1000px;", n.append(c.createTextNode("#")), o.append(n);
229
229
  const a = new Range();
230
- return a.setStart(n, 0), a.setEnd(n, 1), r.removeAllRanges(), r.addRange(a), new Promise(((i, u) => {
231
- const h = t.registerCommand(Y, ((d) => (le(d, ClipboardEvent) && (h(), m !== null && (window.clearTimeout(m), m = null), i(P(t, d, l))), !0)), j);
230
+ return a.setStart(n, 0), a.setEnd(n, 1), r.removeAllRanges(), r.addRange(a), new Promise(((s, u) => {
231
+ const h = t.registerCommand(j, ((d) => (le(d, ClipboardEvent) && (h(), m !== null && (window.clearTimeout(m), m = null), s(M(t, d, l))), !0)), K);
232
232
  m = window.setTimeout((() => {
233
- h(), m = null, i(!1);
233
+ h(), m = null, s(!1);
234
234
  }), 50), c.execCommand("copy"), n.remove();
235
235
  }));
236
236
  }
237
- function P(t, e, l) {
237
+ function M(t, e, l) {
238
238
  if (l === void 0) {
239
- const s = k(t._window);
240
- if (!s) return !1;
241
- const c = s.anchorNode, r = s.focusNode;
239
+ const i = J(t._window);
240
+ if (!i) return !1;
241
+ const c = i.anchorNode, r = i.focusNode;
242
242
  if (c !== null && r !== null && !oe(t, c, r)) return !1;
243
243
  const n = S();
244
244
  if (n === null) return !1;
@@ -253,8 +253,8 @@ function he(t = S()) {
253
253
  const e = { "text/plain": t ? t.getTextContent() : "" };
254
254
  if (t) {
255
255
  const l = re();
256
- for (const [o, s] of pe) {
257
- const c = s(l, t);
256
+ for (const [o, i] of pe) {
257
+ const c = i(l, t);
258
258
  c !== null && (e[o] = c);
259
259
  }
260
260
  }
@@ -267,10 +267,10 @@ function ge(t, e) {
267
267
  }
268
268
  }
269
269
  export {
270
- ye as A,
270
+ xe as A,
271
271
  Ce as F,
272
272
  he as J,
273
- ie as g,
274
- se as m
273
+ se as g,
274
+ ie as m
275
275
  };
276
- //# sourceMappingURL=LexicalClipboard.prod-DIGbXq4v.js.map
276
+ //# sourceMappingURL=LexicalClipboard.prod-BP8LNbol.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LexicalClipboard.prod-BP8LNbol.js","sources":["../node_modules/@lexical/html/LexicalHtml.prod.mjs","../node_modules/@lexical/clipboard/LexicalClipboard.prod.mjs"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport{$sliceSelectedTextNodeContent as e}from\"@lexical/selection\";import{isHTMLElement as n,isBlockDomNode as t}from\"@lexical/utils\";import{$getRoot as o,$isElementNode as l,$cloneWithProperties as r,$isTextNode as i,getRegisteredNode as s,isDocumentFragment as c,$isRootOrShadowRoot as u,$isBlockElementNode as f,$createLineBreakNode as a,ArtificialNode__DO_NOT_USE as d,isInlineDomNode as p,$createParagraphNode as h}from\"lexical\";function m(e,n){const t=n.body?n.body.childNodes:[];let o=[];const l=[];for(let n=0;n<t.length;n++){const r=t[n];if(!y.has(r.nodeName)){const n=w(r,e,l,!1);null!==n&&(o=o.concat(n))}}return function(e){for(const n of e)n.getNextSibling()instanceof d&&n.insertAfter(a());for(const n of e){const e=n.getChildren();for(const t of e)n.insertBefore(t);n.remove()}}(l),o}function g(e,n){if(\"undefined\"==typeof document||\"undefined\"==typeof window&&void 0===global.window)throw new Error(\"To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.\");const t=document.createElement(\"div\"),l=o().getChildren();for(let o=0;o<l.length;o++){x(e,l[o],t,n)}return t.innerHTML}function x(t,o,u,f=null){let a=null===f||o.isSelected(f);const d=l(o)&&o.excludeFromCopy(\"html\");let p=o;if(null!==f){let n=r(o);n=i(n)&&null!==f?e(f,n):n,p=n}const h=l(p)?p.getChildren():[],m=s(t,p.getType());let g;g=m&&void 0!==m.exportDOM?m.exportDOM(t,p):p.exportDOM(t);const{element:y,after:w}=g;if(!y)return!1;const b=document.createDocumentFragment();for(let e=0;e<h.length;e++){const n=h[e],r=x(t,n,b,f);!a&&l(o)&&r&&o.extractWithChild(n,f,\"html\")&&(a=!0)}if(a&&!d){if((n(y)||c(y))&&y.append(b),u.append(y),w){const e=w.call(p,y);e&&(c(y)?y.replaceChildren(e):y.replaceWith(e))}}else u.append(b);return a}const y=new Set([\"STYLE\",\"SCRIPT\"]);function w(e,n,o,r,i=new Map,s){let c=[];if(y.has(e.nodeName))return c;let m=null;const g=function(e,n){const{nodeName:t}=e,o=n._htmlConversions.get(t.toLowerCase());let l=null;if(void 0!==o)for(const n of o){const t=n(e);null!==t&&(null===l||(l.priority||0)<=(t.priority||0))&&(l=t)}return null!==l?l.conversion:null}(e,n),x=g?g(e):null;let C=null;if(null!==x){C=x.after;const n=x.node;if(m=Array.isArray(n)?n[n.length-1]:n,null!==m){for(const[,e]of i)if(m=e(m,s),!m)break;m&&c.push(...Array.isArray(n)?n:[m])}null!=x.forChild&&i.set(e.nodeName,x.forChild)}const S=e.childNodes;let v=[];const N=(null==m||!u(m))&&(null!=m&&f(m)||r);for(let e=0;e<S.length;e++)v.push(...w(S[e],n,o,N,new Map(i),m));return null!=C&&(v=C(v)),t(e)&&(v=b(e,v,N?()=>{const e=new d;return o.push(e),e}:h)),null==m?v.length>0?c=c.concat(v):t(e)&&function(e){if(null==e.nextSibling||null==e.previousSibling)return!1;return p(e.nextSibling)&&p(e.previousSibling)}(e)&&(c=c.concat(a())):l(m)&&m.append(...v),c}function b(e,n,t){const o=e.style.textAlign,l=[];let r=[];for(let e=0;e<n.length;e++){const i=n[e];if(f(i))o&&!i.getFormat()&&i.setFormat(o),l.push(i);else if(r.push(i),e===n.length-1||e<n.length-1&&f(n[e+1])){const e=t();e.setFormat(o),e.append(...r),l.push(e),r=[]}}return l}export{g as $generateHtmlFromNodes,m as $generateNodesFromDOM};\n","/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport{$generateHtmlFromNodes as t,$generateNodesFromDOM as e}from\"@lexical/html\";import{$addNodeStyle as n,$sliceSelectedTextNodeContent as o}from\"@lexical/selection\";import{objectKlassEquals as r}from\"@lexical/utils\";import{$isRangeSelection as i,$getSelection as l,$createTabNode as s,SELECTION_INSERT_CLIPBOARD_NODES_COMMAND as c,$caretFromPoint as a,$isTextPointCaret as u,$getCaretRange as f,$getChildCaret as d,$getRoot as p,$isTextNode as g,$isElementNode as m,$parseSerializedNode as h,getDOMSelection as x,COPY_COMMAND as w,COMMAND_PRIORITY_CRITICAL as y,isSelectionWithinEditor as T,$getEditor as v,$cloneWithProperties as C}from\"lexical\";function D(t,...e){const n=new URL(\"https://lexical.dev/docs/error\"),o=new URLSearchParams;o.append(\"code\",t);for(const t of e)o.append(\"v\",t);throw n.search=o.toString(),Error(`Minified Lexical error #${t}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function N(e,n=l()){return null==n&&D(166),i(n)&&n.isCollapsed()||0===n.getNodes().length?\"\":t(e,n)}function S(t,e=l()){return null==e&&D(166),i(e)&&e.isCollapsed()||0===e.getNodes().length?null:JSON.stringify(E(t,e))}function R(t,e){const n=t.getData(\"text/plain\")||t.getData(\"text/uri-list\");null!=n&&e.insertRawText(n)}function A(t,n,o){const r=t.getData(\"application/x-lexical-editor\");if(r)try{const t=JSON.parse(r);if(t.namespace===o._config.namespace&&Array.isArray(t.nodes)){return P(o,L(t.nodes),n)}}catch(t){}const c=t.getData(\"text/html\"),a=t.getData(\"text/plain\");if(c&&a!==c)try{const t=(new DOMParser).parseFromString(function(t){if(window.trustedTypes&&window.trustedTypes.createPolicy){return window.trustedTypes.createPolicy(\"lexical\",{createHTML:t=>t}).createHTML(t)}return t}(c),\"text/html\");return P(o,e(o,t),n)}catch(t){}const u=a||t.getData(\"text/uri-list\");if(null!=u)if(i(n)){const t=u.split(/(\\r?\\n|\\t)/);\"\"===t[t.length-1]&&t.pop();for(let e=0;e<t.length;e++){const n=l();if(i(n)){const o=t[e];\"\\n\"===o||\"\\r\\n\"===o?n.insertParagraph():\"\\t\"===o?n.insertNodes([s()]):n.insertText(o)}}}else n.insertRawText(u)}function P(t,e,n){t.dispatchCommand(c,{nodes:e,selection:n})||(n.insertNodes(e),function(t){if(i(t)&&t.isCollapsed()){const e=t.anchor;let n=null;const o=a(e,\"previous\");if(o)if(u(o))n=o.origin;else{const t=f(o,d(p(),\"next\").getFlipped());for(const e of t){if(g(e.origin)){n=e.origin;break}if(m(e.origin)&&!e.origin.isInline())break}}if(n&&g(n)){const e=n.getFormat(),o=n.getStyle();t.format===e&&t.style===o||(t.format=e,t.style=o,t.dirty=!0)}}}(n))}function _(t,e,n,r=[]){let i=null===e||n.isSelected(e);const l=m(n)&&n.excludeFromCopy(\"html\");let s=n;if(null!==e){let t=C(n);t=g(t)&&null!==e?o(e,t):t,s=t}const c=m(s)?s.getChildren():[],a=function(t){const e=t.exportJSON(),n=t.constructor;if(e.type!==n.getType()&&D(58,n.name),m(t)){const t=e.children;Array.isArray(t)||D(59,n.name)}return e}(s);if(g(s)){const t=s.__text;t.length>0?a.text=t:i=!1}for(let o=0;o<c.length;o++){const r=c[o],l=_(t,e,r,a.children);!i&&m(n)&&l&&n.extractWithChild(r,e,\"clone\")&&(i=!0)}if(i&&!l)r.push(a);else if(Array.isArray(a.children))for(let t=0;t<a.children.length;t++){const e=a.children[t];r.push(e)}return i}function E(t,e){const n=[],o=p().getChildren();for(let r=0;r<o.length;r++){_(t,e,o[r],n)}return{namespace:t._config.namespace,nodes:n}}function L(t){const e=[];for(let o=0;o<t.length;o++){const r=t[o],i=h(r);g(i)&&n(i),e.push(i)}return e}let b=null;async function F(t,e,n){if(null!==b)return!1;if(null!==e)return new Promise(((o,r)=>{t.update((()=>{o(M(t,e,n))}))}));const o=t.getRootElement(),i=t._window||window,l=window.document,s=x(i);if(null===o||null===s)return!1;const c=l.createElement(\"span\");c.style.cssText=\"position: fixed; top: -1000px;\",c.append(l.createTextNode(\"#\")),o.append(c);const a=new Range;return a.setStart(c,0),a.setEnd(c,1),s.removeAllRanges(),s.addRange(a),new Promise(((e,o)=>{const i=t.registerCommand(w,(o=>(r(o,ClipboardEvent)&&(i(),null!==b&&(window.clearTimeout(b),b=null),e(M(t,o,n))),!0)),y);b=window.setTimeout((()=>{i(),b=null,e(!1)}),50),l.execCommand(\"copy\"),c.remove()}))}function M(t,e,n){if(void 0===n){const e=x(t._window);if(!e)return!1;const o=e.anchorNode,r=e.focusNode;if(null!==o&&null!==r&&!T(t,o,r))return!1;const i=l();if(null===i)return!1;n=J(i)}e.preventDefault();const o=e.clipboardData;return null!==o&&(k(o,n),!0)}const O=[[\"text/html\",N],[\"application/x-lexical-editor\",S]];function J(t=l()){const e={\"text/plain\":t?t.getTextContent():\"\"};if(t){const n=v();for(const[o,r]of O){const i=r(n,t);null!==i&&(e[o]=i)}}return e}function k(t,e){for(const n in e){const o=e[n];void 0!==o&&t.setData(n,o)}}export{E as $generateJSONFromSelectedNodes,L as $generateNodesFromSerializedNodes,J as $getClipboardDataFromSelection,N as $getHtmlContent,S as $getLexicalContent,R as $insertDataTransferForPlainText,A as $insertDataTransferForRichText,P as $insertGeneratedNodes,F as copyToClipboard,k as setLexicalClipboardDataTransfer};\n"],"names":["m","e","n","t","l","y","w","d","a","g","o","x","u","f","p","r","i","h","s","b","c","C","S","v","N","D","E","A","P","L","_","F","T","J","k","O"],"mappings":";;;AAQkb,SAASA,GAAEC,GAAEC,GAAE;AAAC,QAAMC,IAAED,EAAE,OAAKA,EAAE,KAAK,aAAW,CAAA;AAAG,MAAI,IAAE,CAAA;AAAG,QAAME,IAAE,CAAA;AAAG,WAAQF,IAAE,GAAEA,IAAEC,EAAE,QAAOD,KAAI;AAAC,UAAM,IAAEC,EAAED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GAAE,CAAC,gCAA+BF,EAAC,CAAC;AAAE,SAASW,GAAE,IAAE7B,KAAI;AAAC,QAAM,IAAE,EAAC,cAAa,IAAE,EAAE,eAAc,IAAG,GAAE;AAAE,MAAG,GAAE;AAAC,UAAMF,IAAEqB,GAAC;AAAG,eAAS,CAAC,GAAER,CAAC,KAAIoB,IAAE;AAAC,YAAMnB,IAAED,EAAEb,GAAE,CAAC;AAAE,MAAOc,MAAP,SAAW,EAAE,CAAC,IAAEA;AAAA,IAAE;AAAA,EAAC;AAAC,SAAO;AAAC;AAAC,SAASkB,GAAE,GAAE,GAAE;AAAC,aAAUhC,KAAK,GAAE;AAAC,UAAM,IAAE,EAAEA,CAAC;AAAE,IAAS,MAAT,UAAY,EAAE,QAAQA,GAAE,CAAC;AAAA,EAAC;AAAC;","x_google_ignoreList":[0,1]}
@@ -1,6 +1,6 @@
1
- import { r as I, w } from "./LexicalUtils.prod-C3To3vrm.js";
2
- import { m as J, c as A, _ as O, x as L, d as W, g as D, P as x, y as T, E as R, M as E } from "./Lexical.prod-qYl_ifJ6.js";
3
- const C = /* @__PURE__ */ new Set(["http:", "https:", "mailto:", "sms:", "tel:"]);
1
+ import { r as I, w as v } from "./LexicalUtils.prod-Ckfw0Hjt.js";
2
+ import { d as J, e as y, a as k, h as L, o as W, l as D, w as T, f as x, g as R, k as C } from "./Lexical.prod-nXWuyOKD.js";
3
+ const E = /* @__PURE__ */ new Set(["http:", "https:", "mailto:", "sms:", "tel:"]);
4
4
  class d extends J {
5
5
  static getType() {
6
6
  return "link";
@@ -18,7 +18,7 @@ class d extends J {
18
18
  return this.updateLinkDOM(null, e, t), I(e, t.theme.link), e;
19
19
  }
20
20
  updateLinkDOM(t, e, s) {
21
- if (A(e)) {
21
+ if (y(e)) {
22
22
  t && t.__url === this.__url || (e.href = this.sanitizeUrl(this.__url));
23
23
  for (const u of ["target", "rel", "title"]) {
24
24
  const a = `__${u}`, c = this[a];
@@ -39,10 +39,10 @@ class d extends J {
39
39
  return super.updateFromJSON(t).setURL(t.url).setRel(t.rel || null).setTarget(t.target || null).setTitle(t.title || null);
40
40
  }
41
41
  sanitizeUrl(t) {
42
- t = y(t);
42
+ t = P(t);
43
43
  try {
44
- const e = new URL(y(t));
45
- if (!C.has(e.protocol)) return "about:blank";
44
+ const e = new URL(P(t));
45
+ if (!E.has(e.protocol)) return "about:blank";
46
46
  } catch {
47
47
  return t;
48
48
  }
@@ -96,7 +96,7 @@ class d extends J {
96
96
  return !0;
97
97
  }
98
98
  extractWithChild(t, e, s) {
99
- if (!O(e)) return !1;
99
+ if (!k(e)) return !1;
100
100
  const u = e.anchor.getNode(), a = e.focus.getNode();
101
101
  return this.isParentOf(u) && this.isParentOf(a) && e.getTextContent().length > 0;
102
102
  }
@@ -109,7 +109,7 @@ class d extends J {
109
109
  }
110
110
  function B(r) {
111
111
  let t = null;
112
- if (A(r)) {
112
+ if (y(r)) {
113
113
  const e = r.textContent;
114
114
  (e !== null && e !== "" || r.children.length > 0) && (t = g(r.getAttribute("href") || "", { rel: r.getAttribute("rel"), target: r.getAttribute("target"), title: r.getAttribute("title") }));
115
115
  }
@@ -118,10 +118,10 @@ function B(r) {
118
118
  function g(r = "", t) {
119
119
  return D(new d(r, t));
120
120
  }
121
- function _(r) {
121
+ function h(r) {
122
122
  return r instanceof d;
123
123
  }
124
- class k extends d {
124
+ class O extends d {
125
125
  constructor(t = "", e = {}, s) {
126
126
  super(t, e, s), this.__isUnlinked = e.isUnlinked !== void 0 && e.isUnlinked !== null && e.isUnlinked;
127
127
  }
@@ -129,7 +129,7 @@ class k extends d {
129
129
  return "autolink";
130
130
  }
131
131
  static clone(t) {
132
- return new k(t.__url, { isUnlinked: t.__isUnlinked, rel: t.__rel, target: t.__target, title: t.__title }, t.__key);
132
+ return new O(t.__url, { isUnlinked: t.__isUnlinked, rel: t.__rel, target: t.__target, title: t.__title }, t.__key);
133
133
  }
134
134
  getIsUnlinked() {
135
135
  return this.__isUnlinked;
@@ -145,7 +145,7 @@ class k extends d {
145
145
  return super.updateDOM(t, e, s) || t.__isUnlinked !== this.__isUnlinked;
146
146
  }
147
147
  static importJSON(t) {
148
- return M().updateFromJSON(t);
148
+ return b().updateFromJSON(t);
149
149
  }
150
150
  updateFromJSON(t) {
151
151
  return super.updateFromJSON(t).setIsUnlinked(t.isUnlinked || !1);
@@ -159,20 +159,20 @@ class k extends d {
159
159
  insertNewAfter(t, e = !0) {
160
160
  const s = this.getParentOrThrow().insertNewAfter(t, e);
161
161
  if (L(s)) {
162
- const u = M(this.__url, { isUnlinked: this.__isUnlinked, rel: this.__rel, target: this.__target, title: this.__title });
162
+ const u = b(this.__url, { isUnlinked: this.__isUnlinked, rel: this.__rel, target: this.__target, title: this.__title });
163
163
  return s.append(u), u;
164
164
  }
165
165
  return null;
166
166
  }
167
167
  }
168
- function M(r = "", t) {
169
- return D(new k(r, t));
168
+ function b(r = "", t) {
169
+ return D(new O(r, t));
170
170
  }
171
171
  function U(r) {
172
- return r instanceof k;
172
+ return r instanceof O;
173
173
  }
174
174
  const z = W("TOGGLE_LINK_COMMAND");
175
- function P(r, t) {
175
+ function M(r, t) {
176
176
  if (r.type === "element") {
177
177
  const e = r.getNode();
178
178
  return L(e) || (function(s, ...u) {
@@ -185,16 +185,16 @@ function P(r, t) {
185
185
  return null;
186
186
  }
187
187
  function G(r, t = {}) {
188
- const { target: e, title: s } = t, u = t.rel === void 0 ? "noreferrer" : t.rel, a = x();
189
- if (a === null || !O(a) && !T(a)) return;
190
- if (T(a)) {
188
+ const { target: e, title: s } = t, u = t.rel === void 0 ? "noreferrer" : t.rel, a = T();
189
+ if (a === null || !k(a) && !x(a)) return;
190
+ if (x(a)) {
191
191
  const i = a.getNodes();
192
192
  return i.length === 0 ? void 0 : void i.forEach(((n) => {
193
193
  if (r === null) {
194
- const l = w(n, ((o) => !U(o) && _(o)));
194
+ const l = v(n, ((o) => !U(o) && h(o)));
195
195
  l && (l.insertBefore(n), l.getChildren().length === 0 && l.remove());
196
196
  } else {
197
- const l = w(n, ((o) => !U(o) && _(o)));
197
+ const l = v(n, ((o) => !U(o) && h(o)));
198
198
  if (l) l.setURL(r), e !== void 0 && l.setTarget(e), u !== void 0 && l.setRel(u);
199
199
  else {
200
200
  const o = g(r, { rel: u, target: e });
@@ -205,81 +205,81 @@ function G(r, t = {}) {
205
205
  }
206
206
  const c = a.extract();
207
207
  if (r === null) return void c.forEach(((i) => {
208
- const n = w(i, ((l) => !U(l) && _(l)));
208
+ const n = v(i, ((l) => !U(l) && h(l)));
209
209
  if (n) {
210
210
  const l = n.getChildren();
211
211
  for (let o = 0; o < l.length; o++) n.insertBefore(l[o]);
212
212
  n.remove();
213
213
  }
214
214
  }));
215
- const p = /* @__PURE__ */ new Set(), v = (i) => {
215
+ const p = /* @__PURE__ */ new Set(), w = (i) => {
216
216
  p.has(i.getKey()) || (p.add(i.getKey()), i.setURL(r), e !== void 0 && i.setTarget(e), u !== void 0 && i.setRel(u), s !== void 0 && i.setTitle(s));
217
217
  };
218
218
  if (c.length === 1) {
219
- const i = b(c[0], _);
220
- if (i !== null) return v(i);
219
+ const i = A(c[0], h);
220
+ if (i !== null) return w(i);
221
221
  }
222
222
  (function(i) {
223
- const n = x();
224
- if (!O(n)) return i();
225
- const l = R(n), o = l.isBackward(), h = P(l.anchor, o ? -1 : 0), m = P(l.focus, o ? 0 : -1);
226
- if (i(), h || m) {
227
- const S = x();
228
- if (O(S)) {
223
+ const n = T();
224
+ if (!k(n)) return i();
225
+ const l = R(n), o = l.isBackward(), f = M(l.anchor, o ? -1 : 0), m = M(l.focus, o ? 0 : -1);
226
+ if (i(), f || m) {
227
+ const S = T();
228
+ if (k(S)) {
229
229
  const N = S.clone();
230
- if (h) {
231
- const f = h.getParent();
232
- f && N.anchor.set(f.getKey(), h.getIndexWithinParent() + (o ? 1 : 0), "element");
230
+ if (f) {
231
+ const _ = f.getParent();
232
+ _ && N.anchor.set(_.getKey(), f.getIndexWithinParent() + (o ? 1 : 0), "element");
233
233
  }
234
234
  if (m) {
235
- const f = m.getParent();
236
- f && N.focus.set(f.getKey(), m.getIndexWithinParent() + (o ? 0 : 1), "element");
235
+ const _ = m.getParent();
236
+ _ && N.focus.set(_.getKey(), m.getIndexWithinParent() + (o ? 0 : 1), "element");
237
237
  }
238
- E(R(N));
238
+ C(R(N));
239
239
  }
240
240
  }
241
241
  })((() => {
242
242
  let i = null;
243
243
  for (const n of c) {
244
244
  if (!n.isAttached()) continue;
245
- const l = b(n, _);
245
+ const l = A(n, h);
246
246
  if (l) {
247
- v(l);
247
+ w(l);
248
248
  continue;
249
249
  }
250
250
  if (L(n)) {
251
251
  if (!n.isInline()) continue;
252
- if (_(n)) {
252
+ if (h(n)) {
253
253
  if (!(U(n) || i !== null && i.getParentOrThrow().isParentOf(n))) {
254
- v(n), i = n;
254
+ w(n), i = n;
255
255
  continue;
256
256
  }
257
- for (const h of n.getChildren()) n.insertBefore(h);
257
+ for (const f of n.getChildren()) n.insertBefore(f);
258
258
  n.remove();
259
259
  continue;
260
260
  }
261
261
  }
262
262
  const o = n.getPreviousSibling();
263
- _(o) && o.is(i) ? o.append(n) : (i = g(r, { rel: u, target: e, title: s }), n.insertAfter(i), i.append(n));
263
+ h(o) && o.is(i) ? o.append(n) : (i = g(r, { rel: u, target: e, title: s }), n.insertAfter(i), i.append(n));
264
264
  }
265
265
  }));
266
266
  }
267
- function b(r, t) {
267
+ function A(r, t) {
268
268
  let e = r;
269
269
  for (; e !== null && e.getParent() !== null && !t(e); ) e = e.getParentOrThrow();
270
270
  return t(e) ? e : null;
271
271
  }
272
272
  const $ = /^\+?[0-9\s()-]{5,}$/;
273
- function y(r) {
273
+ function P(r) {
274
274
  return r.match(/^[a-z][a-z0-9+.-]*:/i) || r.match(/^[/#.]/) ? r : r.includes("@") ? `mailto:${r}` : $.test(r) ? `tel:${r}` : `https://${r}`;
275
275
  }
276
276
  export {
277
277
  U as O,
278
- M as U,
278
+ b as U,
279
279
  d as g,
280
280
  z as k,
281
- k as m,
282
- _ as p,
281
+ O as m,
282
+ h as p,
283
283
  G as v
284
284
  };
285
- //# sourceMappingURL=LexicalLink.prod-ZZwC5ABn.js.map
285
+ //# sourceMappingURL=LexicalLink.prod-Brzpgs_K.js.map