@uva-glass/component-library 3.52.4 → 3.52.6

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-BAE-wnll.js → Lexical.prod-sd_e2sqT.js} +648 -627
  2. package/dist/Lexical.prod-sd_e2sqT.js.map +1 -0
  3. package/dist/{LexicalClipboard.prod-BS4qAkmJ.js → LexicalClipboard.prod-Co2PF1UJ.js} +44 -42
  4. package/dist/LexicalClipboard.prod-Co2PF1UJ.js.map +1 -0
  5. package/dist/{LexicalLink.prod-C6Or2Yo6.js → LexicalLink.prod-BCE6Bg2N.js} +354 -334
  6. package/dist/LexicalLink.prod-BCE6Bg2N.js.map +1 -0
  7. package/dist/{LexicalList.prod-rTq41CO0.js → LexicalList.prod-CIB0K0ja.js} +141 -138
  8. package/dist/LexicalList.prod-CIB0K0ja.js.map +1 -0
  9. package/dist/{LexicalSelection.prod-fLzEGOT_.js → LexicalSelection.prod-CCmcTP6S.js} +41 -41
  10. package/dist/{LexicalSelection.prod-fLzEGOT_.js.map → LexicalSelection.prod-CCmcTP6S.js.map} +1 -1
  11. package/dist/{LexicalTable.prod-BBI7yaOy.js → LexicalTable.prod-Oa2YPHLl.js} +359 -359
  12. package/dist/LexicalTable.prod-Oa2YPHLl.js.map +1 -0
  13. package/dist/{LexicalUtils.prod-D8DAKg7O.js → LexicalUtils.prod-CjKjgnmx.js} +43 -43
  14. package/dist/{LexicalUtils.prod-D8DAKg7O.js.map → LexicalUtils.prod-CjKjgnmx.js.map} +1 -1
  15. package/dist/{TableCellResizerPlugin-HPo4ZkHo.js → TableCellResizerPlugin-DATbSzfg.js} +51 -51
  16. package/dist/{TableCellResizerPlugin-HPo4ZkHo.js.map → TableCellResizerPlugin-DATbSzfg.js.map} +1 -1
  17. package/dist/{TablePlugin-BLbsvcuu.js → TablePlugin-CqCjNBW_.js} +83 -83
  18. package/dist/{TablePlugin-BLbsvcuu.js.map → TablePlugin-CqCjNBW_.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 +1 -1
  27. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
  28. package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
  29. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
  30. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +7 -7
  31. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +2 -2
  32. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +1 -1
  33. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +52 -52
  34. package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
  35. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +25 -25
  36. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +7 -7
  37. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +4 -4
  38. package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +1 -1
  39. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
  40. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +4 -4
  41. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +27 -27
  42. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  43. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +16 -16
  44. package/dist/components/RteEditor/Plugins/index.js +2 -2
  45. package/dist/components/RteEditor/RteEditor.js +185 -185
  46. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  47. package/dist/components/RteEditor/helpers.js +8 -8
  48. package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +11 -11
  49. package/dist/components/SelectListbox/components/SelectButton.js +17 -17
  50. package/dist/components/SelectListbox/components/SelectButton.js.map +1 -1
  51. package/dist/components/index.js +1 -1
  52. package/dist/index.js +1 -1
  53. package/package.json +6 -6
  54. package/dist/Lexical.prod-BAE-wnll.js.map +0 -1
  55. package/dist/LexicalClipboard.prod-BS4qAkmJ.js.map +0 -1
  56. package/dist/LexicalLink.prod-C6Or2Yo6.js.map +0 -1
  57. package/dist/LexicalList.prod-rTq41CO0.js.map +0 -1
  58. package/dist/LexicalTable.prod-BBI7yaOy.js.map +0 -1
@@ -1,14 +1,14 @@
1
- import { U as J, l as At, L as Pt } from "./LexicalUtils.prod-D8DAKg7O.js";
2
- import { aK as $t, aL as jt, aM as Ft, aN as Wt, Y as bt, aO as Jt, aP as zt, ad as Kt, aQ as Bt, aR as Zt, ah as Gt, A as Vt, aS as Ht, p as Qt, aT as ot, h as N, y as U, o as Et, Z as Yt, a as R, F as q, r as A, _ as qt, aU as Xt, j as te, d as C, n as dt, aV as X, B as Nt, m as ht, a1 as ee, ae as ne } from "./Lexical.prod-BAE-wnll.js";
3
- const ie = Symbol.for("preact-signals");
4
- function K() {
5
- if (w > 1) return void w--;
1
+ import { U as Z, l as jt, L as Kt } from "./LexicalUtils.prod-CjKjgnmx.js";
2
+ import { aK as Wt, aL as zt, aM as Ft, aN as Jt, X as wt, aO as Bt, aP as Gt, ac as Vt, aQ as Zt, aR as Ht, ah as Xt, L as Qt, aS as qt, C as Yt, aT as dt, y as w, S as O, f as Rt, r as te, b as U, z as st, l as $, u as ee, aU as ne, v as ie, d as I, s as pt, aV as rt, k as Ut, o as mt, a0 as se, ad as re } from "./Lexical.prod-sd_e2sqT.js";
3
+ const oe = Symbol.for("preact-signals");
4
+ function X() {
5
+ if (R > 1) return void R--;
6
6
  let n, t = !1;
7
- for (; L !== void 0; ) {
8
- let e = L;
9
- for (L = void 0, tt++; e !== void 0; ) {
7
+ for (; P !== void 0; ) {
8
+ let e = P;
9
+ for (P = void 0, ot++; e !== void 0; ) {
10
10
  const i = e.o;
11
- if (e.o = void 0, e.f &= -3, !(8 & e.f) && wt(e)) try {
11
+ if (e.o = void 0, e.f &= -3, !(8 & e.f) && Ot(e)) try {
12
12
  e.c();
13
13
  } catch (o) {
14
14
  t || (n = o, t = !0);
@@ -16,44 +16,44 @@ function K() {
16
16
  e = i;
17
17
  }
18
18
  }
19
- if (tt = 0, w--, t) throw n;
19
+ if (ot = 0, R--, t) throw n;
20
20
  }
21
- function be(n) {
22
- if (w > 0) return n();
23
- w++;
21
+ function Re(n) {
22
+ if (R > 0) return n();
23
+ R++;
24
24
  try {
25
25
  return n();
26
26
  } finally {
27
- K();
27
+ X();
28
28
  }
29
29
  }
30
- let g, L;
31
- function gt(n) {
32
- const t = g;
33
- g = void 0;
30
+ let p, P;
31
+ function vt(n) {
32
+ const t = p;
33
+ p = void 0;
34
34
  try {
35
35
  return n();
36
36
  } finally {
37
- g = t;
37
+ p = t;
38
38
  }
39
39
  }
40
- let w = 0, tt = 0, F = 0;
41
- function pt(n) {
42
- if (g === void 0) return;
40
+ let R = 0, ot = 0, G = 0;
41
+ function xt(n) {
42
+ if (p === void 0) return;
43
43
  let t = n.n;
44
- return t === void 0 || t.t !== g ? (t = { i: 0, S: n, p: g.s, n: void 0, t: g, e: void 0, x: void 0, r: t }, g.s !== void 0 && (g.s.n = t), g.s = t, n.n = t, 32 & g.f && n.S(t), t) : t.i === -1 ? (t.i = 0, t.n !== void 0 && (t.n.p = t.p, t.p !== void 0 && (t.p.n = t.n), t.p = g.s, t.n = void 0, g.s.n = t, g.s = t), t) : void 0;
44
+ return t === void 0 || t.t !== p ? (t = { i: 0, S: n, p: p.s, n: void 0, t: p, e: void 0, x: void 0, r: t }, p.s !== void 0 && (p.s.n = t), p.s = t, n.n = t, 32 & p.f && n.S(t), t) : t.i === -1 ? (t.i = 0, t.n !== void 0 && (t.n.p = t.p, t.p !== void 0 && (t.p.n = t.n), t.p = p.s, t.n = void 0, p.s.n = t, p.s = t), t) : void 0;
45
45
  }
46
- function _(n, t) {
46
+ function E(n, t) {
47
47
  this.v = n, this.i = 0, this.n = void 0, this.t = void 0, this.W = t?.watched, this.Z = t?.unwatched, this.name = t?.name;
48
48
  }
49
- function se(n, t) {
50
- return new _(n, t);
49
+ function le(n, t) {
50
+ return new E(n, t);
51
51
  }
52
- function wt(n) {
52
+ function Ot(n) {
53
53
  for (let t = n.s; t !== void 0; t = t.n) if (t.S.i !== t.i || !t.S.h() || t.S.i !== t.i) return !0;
54
54
  return !1;
55
55
  }
56
- function mt(n) {
56
+ function St(n) {
57
57
  for (let t = n.s; t !== void 0; t = t.n) {
58
58
  const e = t.S.n;
59
59
  if (e !== void 0 && (t.r = e), t.S.n = t, t.i = -1, t.n === void 0) {
@@ -62,7 +62,7 @@ function mt(n) {
62
62
  }
63
63
  }
64
64
  }
65
- function Rt(n) {
65
+ function kt(n) {
66
66
  let t, e = n.s;
67
67
  for (; e !== void 0; ) {
68
68
  const i = e.p;
@@ -70,37 +70,37 @@ function Rt(n) {
70
70
  }
71
71
  n.s = t;
72
72
  }
73
- function O(n, t) {
74
- _.call(this, void 0), this.x = n, this.s = void 0, this.g = F - 1, this.f = 4, this.W = t?.watched, this.Z = t?.unwatched, this.name = t?.name;
73
+ function C(n, t) {
74
+ E.call(this, void 0), this.x = n, this.s = void 0, this.g = G - 1, this.f = 4, this.W = t?.watched, this.Z = t?.unwatched, this.name = t?.name;
75
75
  }
76
- function Ut(n) {
76
+ function Ct(n) {
77
77
  const t = n.u;
78
78
  if (n.u = void 0, typeof t == "function") {
79
- w++;
80
- const e = g;
81
- g = void 0;
79
+ R++;
80
+ const e = p;
81
+ p = void 0;
82
82
  try {
83
83
  t();
84
84
  } catch (i) {
85
- throw n.f &= -2, n.f |= 8, lt(n), i;
85
+ throw n.f &= -2, n.f |= 8, ht(n), i;
86
86
  } finally {
87
- g = e, K();
87
+ p = e, X();
88
88
  }
89
89
  }
90
90
  }
91
- function lt(n) {
91
+ function ht(n) {
92
92
  for (let t = n.s; t !== void 0; t = t.n) t.S.U(t);
93
- n.x = void 0, n.s = void 0, Ut(n);
93
+ n.x = void 0, n.s = void 0, Ct(n);
94
94
  }
95
- function re(n) {
96
- if (g !== this) throw new Error("Out-of-order effect");
97
- Rt(this), g = n, this.f &= -2, 8 & this.f && lt(this), K();
95
+ function ae(n) {
96
+ if (p !== this) throw new Error("Out-of-order effect");
97
+ kt(this), p = n, this.f &= -2, 8 & this.f && ht(this), X();
98
98
  }
99
- function D(n, t) {
99
+ function T(n, t) {
100
100
  this.x = n, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32, this.name = t?.name;
101
101
  }
102
- function et(n, t) {
103
- const e = new D(n, t);
102
+ function lt(n, t) {
103
+ const e = new T(n, t);
104
104
  try {
105
105
  e.c();
106
106
  } catch (o) {
@@ -109,102 +109,102 @@ function et(n, t) {
109
109
  const i = e.d.bind(e);
110
110
  return i[Symbol.dispose] = i, i;
111
111
  }
112
- function Ee(n, t = {}) {
112
+ function Ue(n, t = {}) {
113
113
  const e = {};
114
114
  for (const i in n) {
115
- const o = t[i], s = se(o === void 0 ? n[i] : o);
115
+ const o = t[i], s = le(o === void 0 ? n[i] : o);
116
116
  e[i] = s;
117
117
  }
118
118
  return e;
119
119
  }
120
- _.prototype.brand = ie, _.prototype.h = function() {
120
+ E.prototype.brand = oe, E.prototype.h = function() {
121
121
  return !0;
122
- }, _.prototype.S = function(n) {
122
+ }, E.prototype.S = function(n) {
123
123
  const t = this.t;
124
- t !== n && n.e === void 0 && (n.x = t, this.t = n, t !== void 0 ? t.e = n : gt(() => {
124
+ t !== n && n.e === void 0 && (n.x = t, this.t = n, t !== void 0 ? t.e = n : vt(() => {
125
125
  var e;
126
126
  (e = this.W) == null || e.call(this);
127
127
  }));
128
- }, _.prototype.U = function(n) {
128
+ }, E.prototype.U = function(n) {
129
129
  if (this.t !== void 0) {
130
130
  const t = n.e, e = n.x;
131
- t !== void 0 && (t.x = e, n.e = void 0), e !== void 0 && (e.e = t, n.x = void 0), n === this.t && (this.t = e, e === void 0 && gt(() => {
131
+ t !== void 0 && (t.x = e, n.e = void 0), e !== void 0 && (e.e = t, n.x = void 0), n === this.t && (this.t = e, e === void 0 && vt(() => {
132
132
  var i;
133
133
  (i = this.Z) == null || i.call(this);
134
134
  }));
135
135
  }
136
- }, _.prototype.subscribe = function(n) {
137
- return et(() => {
138
- const t = this.value, e = g;
139
- g = void 0;
136
+ }, E.prototype.subscribe = function(n) {
137
+ return lt(() => {
138
+ const t = this.value, e = p;
139
+ p = void 0;
140
140
  try {
141
141
  n(t);
142
142
  } finally {
143
- g = e;
143
+ p = e;
144
144
  }
145
145
  }, { name: "sub" });
146
- }, _.prototype.valueOf = function() {
146
+ }, E.prototype.valueOf = function() {
147
147
  return this.value;
148
- }, _.prototype.toString = function() {
148
+ }, E.prototype.toString = function() {
149
149
  return this.value + "";
150
- }, _.prototype.toJSON = function() {
150
+ }, E.prototype.toJSON = function() {
151
151
  return this.value;
152
- }, _.prototype.peek = function() {
153
- const n = g;
154
- g = void 0;
152
+ }, E.prototype.peek = function() {
153
+ const n = p;
154
+ p = void 0;
155
155
  try {
156
156
  return this.value;
157
157
  } finally {
158
- g = n;
158
+ p = n;
159
159
  }
160
- }, Object.defineProperty(_.prototype, "value", { get() {
161
- const n = pt(this);
160
+ }, Object.defineProperty(E.prototype, "value", { get() {
161
+ const n = xt(this);
162
162
  return n !== void 0 && (n.i = this.i), this.v;
163
163
  }, set(n) {
164
164
  if (n !== this.v) {
165
- if (tt > 100) throw new Error("Cycle detected");
166
- this.v = n, this.i++, F++, w++;
165
+ if (ot > 100) throw new Error("Cycle detected");
166
+ this.v = n, this.i++, G++, R++;
167
167
  try {
168
168
  for (let t = this.t; t !== void 0; t = t.x) t.t.N();
169
169
  } finally {
170
- K();
170
+ X();
171
171
  }
172
172
  }
173
- } }), O.prototype = new _(), O.prototype.h = function() {
173
+ } }), C.prototype = new E(), C.prototype.h = function() {
174
174
  if (this.f &= -3, 1 & this.f) return !1;
175
- if ((36 & this.f) == 32 || (this.f &= -5, this.g === F)) return !0;
176
- if (this.g = F, this.f |= 1, this.i > 0 && !wt(this)) return this.f &= -2, !0;
177
- const n = g;
175
+ if ((36 & this.f) == 32 || (this.f &= -5, this.g === G)) return !0;
176
+ if (this.g = G, this.f |= 1, this.i > 0 && !Ot(this)) return this.f &= -2, !0;
177
+ const n = p;
178
178
  try {
179
- mt(this), g = this;
179
+ St(this), p = this;
180
180
  const t = this.x();
181
181
  (16 & this.f || this.v !== t || this.i === 0) && (this.v = t, this.f &= -17, this.i++);
182
182
  } catch (t) {
183
183
  this.v = t, this.f |= 16, this.i++;
184
184
  }
185
- return g = n, Rt(this), this.f &= -2, !0;
186
- }, O.prototype.S = function(n) {
185
+ return p = n, kt(this), this.f &= -2, !0;
186
+ }, C.prototype.S = function(n) {
187
187
  if (this.t === void 0) {
188
188
  this.f |= 36;
189
189
  for (let t = this.s; t !== void 0; t = t.n) t.S.S(t);
190
190
  }
191
- _.prototype.S.call(this, n);
192
- }, O.prototype.U = function(n) {
193
- if (this.t !== void 0 && (_.prototype.U.call(this, n), this.t === void 0)) {
191
+ E.prototype.S.call(this, n);
192
+ }, C.prototype.U = function(n) {
193
+ if (this.t !== void 0 && (E.prototype.U.call(this, n), this.t === void 0)) {
194
194
  this.f &= -33;
195
195
  for (let t = this.s; t !== void 0; t = t.n) t.S.U(t);
196
196
  }
197
- }, O.prototype.N = function() {
197
+ }, C.prototype.N = function() {
198
198
  if (!(2 & this.f)) {
199
199
  this.f |= 6;
200
200
  for (let n = this.t; n !== void 0; n = n.x) n.t.N();
201
201
  }
202
- }, Object.defineProperty(O.prototype, "value", { get() {
202
+ }, Object.defineProperty(C.prototype, "value", { get() {
203
203
  if (1 & this.f) throw new Error("Cycle detected");
204
- const n = pt(this);
204
+ const n = xt(this);
205
205
  if (this.h(), n !== void 0 && (n.i = this.i), 16 & this.f) throw this.v;
206
206
  return this.v;
207
- } }), D.prototype.c = function() {
207
+ } }), T.prototype.c = function() {
208
208
  const n = this.S();
209
209
  try {
210
210
  if (8 & this.f || this.x === void 0) return;
@@ -213,46 +213,49 @@ _.prototype.brand = ie, _.prototype.h = function() {
213
213
  } finally {
214
214
  n();
215
215
  }
216
- }, D.prototype.S = function() {
216
+ }, T.prototype.S = function() {
217
217
  if (1 & this.f) throw new Error("Cycle detected");
218
- this.f |= 1, this.f &= -9, Ut(this), mt(this), w++;
219
- const n = g;
220
- return g = this, re.bind(this, n);
221
- }, D.prototype.N = function() {
222
- 2 & this.f || (this.f |= 2, this.o = L, L = this);
223
- }, D.prototype.d = function() {
224
- this.f |= 8, 1 & this.f || lt(this);
225
- }, D.prototype.dispose = function() {
218
+ this.f |= 1, this.f &= -9, Ct(this), St(this), R++;
219
+ const n = p;
220
+ return p = this, ae.bind(this, n);
221
+ }, T.prototype.N = function() {
222
+ 2 & this.f || (this.f |= 2, this.o = P, P = this);
223
+ }, T.prototype.d = function() {
224
+ this.f |= 8, 1 & this.f || ht(this);
225
+ }, T.prototype.dispose = function() {
226
226
  this.d();
227
227
  };
228
- function p(n, ...t) {
228
+ function ue(n) {
229
+ return (typeof n.nodes == "function" ? n.nodes() : n.nodes) || [];
230
+ }
231
+ function m(n, ...t) {
229
232
  const e = new URL("https://lexical.dev/docs/error"), i = new URLSearchParams();
230
233
  i.append("code", n);
231
234
  for (const o of t) i.append("v", o);
232
235
  throw e.search = i.toString(), Error(`Minified Lexical error #${n}; visit ${e.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
233
236
  }
234
- function Ot(n, t) {
237
+ function Dt(n, t) {
235
238
  if (n && t && !Array.isArray(t) && typeof n == "object" && typeof t == "object") {
236
239
  const e = n, i = t;
237
- for (const o in i) e[o] = Ot(e[o], i[o]);
240
+ for (const o in i) e[o] = Dt(e[o], i[o]);
238
241
  return n;
239
242
  }
240
243
  return t;
241
244
  }
242
- const at = 0, nt = 1, kt = 2, Z = 3, $ = 4, k = 5, G = 6, T = 7;
243
- function V(n) {
244
- return n.id === at;
245
+ const gt = 0, at = 1, Tt = 2, q = 3, J = 4, D = 5, Y = 6, M = 7;
246
+ function tt(n) {
247
+ return n.id === gt;
245
248
  }
246
- function Ct(n) {
247
- return n.id === kt;
249
+ function Lt(n) {
250
+ return n.id === Tt;
248
251
  }
249
- function oe(n) {
252
+ function ce(n) {
250
253
  return (function(t) {
251
- return t.id === nt;
252
- })(n) || p(305, String(n.id), String(nt)), Object.assign(n, { id: kt });
254
+ return t.id === at;
255
+ })(n) || m(305, String(n.id), String(at)), Object.assign(n, { id: Tt });
253
256
  }
254
- const le = /* @__PURE__ */ new Set();
255
- class ae {
257
+ const fe = /* @__PURE__ */ new Set();
258
+ class de {
256
259
  builder;
257
260
  configs;
258
261
  _dependency;
@@ -261,64 +264,64 @@ class ae {
261
264
  state;
262
265
  _signal;
263
266
  constructor(t, e) {
264
- this.builder = t, this.extension = e, this.configs = /* @__PURE__ */ new Set(), this.state = { id: at };
267
+ this.builder = t, this.extension = e, this.configs = /* @__PURE__ */ new Set(), this.state = { id: gt };
265
268
  }
266
269
  mergeConfigs() {
267
270
  let t = this.extension.config || {};
268
- const e = this.extension.mergeConfig ? this.extension.mergeConfig.bind(this.extension) : jt;
271
+ const e = this.extension.mergeConfig ? this.extension.mergeConfig.bind(this.extension) : zt;
269
272
  for (const i of this.configs) t = e(t, i);
270
273
  return t;
271
274
  }
272
275
  init(t) {
273
276
  const e = this.state;
274
- Ct(e) || p(306, String(e.id));
277
+ Lt(e) || m(306, String(e.id));
275
278
  const i = { getDependency: this.getInitDependency.bind(this), getDirectDependentNames: this.getDirectDependentNames.bind(this), getPeer: this.getInitPeer.bind(this), getPeerNameSet: this.getPeerNameSet.bind(this) }, o = { ...i, getDependency: this.getDependency.bind(this), getInitResult: this.getInitResult.bind(this), getPeer: this.getPeer.bind(this) }, s = (function(a, f, h) {
276
- return Object.assign(a, { config: f, id: Z, registerState: h });
279
+ return Object.assign(a, { config: f, id: q, registerState: h });
277
280
  })(e, this.mergeConfigs(), i);
278
281
  let r;
279
282
  this.state = s, this.extension.init && (r = this.extension.init(t, s.config, i)), this.state = (function(a, f, h) {
280
- return Object.assign(a, { id: $, initResult: f, registerState: h });
283
+ return Object.assign(a, { id: J, initResult: f, registerState: h });
281
284
  })(s, r, o);
282
285
  }
283
286
  build(t) {
284
287
  const e = this.state;
285
288
  let i;
286
- e.id !== $ && p(307, String(e.id), String(k)), this.extension.build && (i = this.extension.build(t, e.config, e.registerState));
289
+ e.id !== J && m(307, String(e.id), String(D)), this.extension.build && (i = this.extension.build(t, e.config, e.registerState));
287
290
  const o = { ...e.registerState, getOutput: () => i, getSignal: this.getSignal.bind(this) };
288
291
  this.state = (function(s, r, a) {
289
- return Object.assign(s, { id: k, output: r, registerState: a });
292
+ return Object.assign(s, { id: D, output: r, registerState: a });
290
293
  })(e, i, o);
291
294
  }
292
295
  register(t, e) {
293
296
  this._signal = e;
294
297
  const i = this.state;
295
- i.id !== k && p(308, String(i.id), String(k));
298
+ i.id !== D && m(308, String(i.id), String(D));
296
299
  const o = this.extension.register && this.extension.register(t, i.config, i.registerState);
297
300
  return this.state = (function(s) {
298
- return Object.assign(s, { id: G });
301
+ return Object.assign(s, { id: Y });
299
302
  })(i), () => {
300
303
  const s = this.state;
301
- s.id !== T && p(309, String(i.id), String(T)), this.state = (function(r) {
302
- return Object.assign(r, { id: k });
304
+ s.id !== M && m(309, String(i.id), String(M)), this.state = (function(r) {
305
+ return Object.assign(r, { id: D });
303
306
  })(s), o && o();
304
307
  };
305
308
  }
306
309
  afterRegistration(t) {
307
310
  const e = this.state;
308
311
  let i;
309
- return e.id !== G && p(310, String(e.id), String(G)), this.extension.afterRegistration && (i = this.extension.afterRegistration(t, e.config, e.registerState)), this.state = (function(o) {
310
- return Object.assign(o, { id: T });
312
+ return e.id !== Y && m(310, String(e.id), String(Y)), this.extension.afterRegistration && (i = this.extension.afterRegistration(t, e.config, e.registerState)), this.state = (function(o) {
313
+ return Object.assign(o, { id: M });
311
314
  })(e), i;
312
315
  }
313
316
  getSignal() {
314
- return this._signal === void 0 && p(311), this._signal;
317
+ return this._signal === void 0 && m(311), this._signal;
315
318
  }
316
319
  getInitResult() {
317
- this.extension.init === void 0 && p(312, this.extension.name);
320
+ this.extension.init === void 0 && m(312, this.extension.name);
318
321
  const t = this.state;
319
322
  return (function(e) {
320
- return e.id >= $;
321
- })(t) || p(313, String(t.id), String($)), t.initResult;
323
+ return e.id >= J;
324
+ })(t) || m(313, String(t.id), String(J)), t.initResult;
322
325
  }
323
326
  getInitPeer(t) {
324
327
  const e = this.builder.extensionNameMap.get(t);
@@ -327,8 +330,8 @@ class ae {
327
330
  getExtensionInitDependency() {
328
331
  const t = this.state;
329
332
  return (function(e) {
330
- return e.id >= Z;
331
- })(t) || p(314, String(t.id), String(Z)), { config: t.config };
333
+ return e.id >= q;
334
+ })(t) || m(314, String(t.id), String(q)), { config: t.config };
332
335
  }
333
336
  getPeer(t) {
334
337
  const e = this.builder.extensionNameMap.get(t);
@@ -336,20 +339,20 @@ class ae {
336
339
  }
337
340
  getInitDependency(t) {
338
341
  const e = this.builder.getExtensionRep(t);
339
- return e === void 0 && p(315, this.extension.name, t.name), e.getExtensionInitDependency();
342
+ return e === void 0 && m(315, this.extension.name, t.name), e.getExtensionInitDependency();
340
343
  }
341
344
  getDependency(t) {
342
345
  const e = this.builder.getExtensionRep(t);
343
- return e === void 0 && p(315, this.extension.name, t.name), e.getExtensionDependency();
346
+ return e === void 0 && m(315, this.extension.name, t.name), e.getExtensionDependency();
344
347
  }
345
348
  getState() {
346
349
  const t = this.state;
347
350
  return (function(e) {
348
- return e.id >= T;
349
- })(t) || p(316, String(t.id), String(T)), t;
351
+ return e.id >= M;
352
+ })(t) || m(316, String(t.id), String(M)), t;
350
353
  }
351
354
  getDirectDependentNames() {
352
- return this.builder.incomingEdges.get(this.extension.name) || le;
355
+ return this.builder.incomingEdges.get(this.extension.name) || fe;
353
356
  }
354
357
  getPeerNameSet() {
355
358
  let t = this._peerNameSet;
@@ -359,23 +362,23 @@ class ae {
359
362
  if (!this._dependency) {
360
363
  const t = this.state;
361
364
  (function(e) {
362
- return e.id >= k;
363
- })(t) || p(317, this.extension.name), this._dependency = { config: t.config, init: t.initResult, output: t.output };
365
+ return e.id >= D;
366
+ })(t) || m(317, this.extension.name), this._dependency = { config: t.config, init: t.initResult, output: t.output };
364
367
  }
365
368
  return this._dependency;
366
369
  }
367
370
  }
368
- const vt = { tag: Ht };
369
- function ue() {
370
- const n = Gt();
371
- n.isEmpty() && n.append(Vt());
371
+ const _t = { tag: qt };
372
+ function he() {
373
+ const n = Xt();
374
+ n.isEmpty() && n.append(Qt());
372
375
  }
373
- const ce = Ft({ config: Bt({ setOptions: vt, updateOptions: vt }), init: ({ $initialEditorState: n = ue }) => ({ $initialEditorState: n, initialized: !1 }), afterRegistration(n, { updateOptions: t, setOptions: e }, i) {
376
+ const ge = Ft({ config: Zt({ setOptions: _t, updateOptions: _t }), init: ({ $initialEditorState: n = he }) => ({ $initialEditorState: n, initialized: !1 }), afterRegistration(n, { updateOptions: t, setOptions: e }, i) {
374
377
  const o = i.getInitResult();
375
378
  if (!o.initialized) {
376
379
  o.initialized = !0;
377
380
  const { $initialEditorState: s } = o;
378
- if (Zt(s)) n.setEditorState(s, e);
381
+ if (Ht(s)) n.setEditorState(s, e);
379
382
  else if (typeof s == "function") n.update(() => {
380
383
  s(n);
381
384
  }, t);
@@ -386,17 +389,17 @@ const ce = Ft({ config: Bt({ setOptions: vt, updateOptions: vt }), init: ({ $ini
386
389
  }
387
390
  return () => {
388
391
  };
389
- }, name: "@lexical/extension/InitialState", nodes: [Wt, bt, Jt, zt, Kt] }), xt = Symbol.for("@lexical/extension/LexicalBuilder");
390
- function _t() {
392
+ }, name: "@lexical/extension/InitialState", nodes: [Jt, wt, Bt, Gt, Vt] }), yt = Symbol.for("@lexical/extension/LexicalBuilder");
393
+ function Et() {
391
394
  }
392
- function fe(n) {
395
+ function pe(n) {
393
396
  throw n;
394
397
  }
395
- function j(n) {
398
+ function B(n) {
396
399
  return Array.isArray(n) ? n : [n];
397
400
  }
398
- const H = "0.37.0+prod.esm";
399
- class M {
401
+ const et = "0.38.2+prod.esm";
402
+ class A {
400
403
  roots;
401
404
  extensionNameMap;
402
405
  outgoingConfigEdges;
@@ -405,47 +408,47 @@ class M {
405
408
  _sortedExtensionReps;
406
409
  PACKAGE_VERSION;
407
410
  constructor(t) {
408
- this.outgoingConfigEdges = /* @__PURE__ */ new Map(), this.incomingEdges = /* @__PURE__ */ new Map(), this.extensionNameMap = /* @__PURE__ */ new Map(), this.conflicts = /* @__PURE__ */ new Map(), this.PACKAGE_VERSION = H, this.roots = t;
411
+ this.outgoingConfigEdges = /* @__PURE__ */ new Map(), this.incomingEdges = /* @__PURE__ */ new Map(), this.extensionNameMap = /* @__PURE__ */ new Map(), this.conflicts = /* @__PURE__ */ new Map(), this.PACKAGE_VERSION = et, this.roots = t;
409
412
  for (const e of t) this.addExtension(e);
410
413
  }
411
414
  static fromExtensions(t) {
412
- const e = [j(ce)];
413
- for (const i of t) e.push(j(i));
414
- return new M(e);
415
+ const e = [B(ge)];
416
+ for (const i of t) e.push(B(i));
417
+ return new A(e);
415
418
  }
416
419
  static maybeFromEditor(t) {
417
- const e = t[xt];
418
- return e && (e.PACKAGE_VERSION !== H && p(292, e.PACKAGE_VERSION, H), e instanceof M || p(293)), e;
420
+ const e = t[yt];
421
+ return e && (e.PACKAGE_VERSION !== et && m(292, e.PACKAGE_VERSION, et), e instanceof A || m(293)), e;
419
422
  }
420
423
  static fromEditor(t) {
421
- const e = M.maybeFromEditor(t);
422
- return e === void 0 && p(294), e;
424
+ const e = A.maybeFromEditor(t);
425
+ return e === void 0 && m(294), e;
423
426
  }
424
427
  constructEditor() {
425
- const { $initialEditorState: t, onError: e, ...i } = this.buildCreateEditorArgs(), o = Object.assign($t({ ...i, ...e ? { onError: (s) => {
428
+ const { $initialEditorState: t, onError: e, ...i } = this.buildCreateEditorArgs(), o = Object.assign(Wt({ ...i, ...e ? { onError: (s) => {
426
429
  e(s, o);
427
- } } : {} }), { [xt]: this });
430
+ } } : {} }), { [yt]: this });
428
431
  for (const s of this.sortedExtensionReps()) s.build(o);
429
432
  return o;
430
433
  }
431
434
  buildEditor() {
432
- let t = _t;
435
+ let t = Et;
433
436
  function e() {
434
437
  try {
435
438
  t();
436
439
  } finally {
437
- t = _t;
440
+ t = Et;
438
441
  }
439
442
  }
440
443
  const i = Object.assign(this.constructEditor(), { dispose: e, [Symbol.dispose]: e });
441
- return t = J(this.registerEditor(i), () => i.setRootElement(null)), i;
444
+ return t = Z(this.registerEditor(i), () => i.setRootElement(null)), i;
442
445
  }
443
446
  hasExtensionByName(t) {
444
447
  return this.extensionNameMap.has(t);
445
448
  }
446
449
  getExtensionRep(t) {
447
450
  const e = this.extensionNameMap.get(t.name);
448
- if (e) return e.extension !== t && p(295, t.name), e;
451
+ if (e) return e.extension !== t && m(295, t.name), e;
449
452
  }
450
453
  addEdge(t, e, i) {
451
454
  const o = this.outgoingConfigEdges.get(t);
@@ -454,17 +457,17 @@ class M {
454
457
  s ? s.add(t) : this.incomingEdges.set(e, /* @__PURE__ */ new Set([t]));
455
458
  }
456
459
  addExtension(t) {
457
- this._sortedExtensionReps !== void 0 && p(296);
458
- const e = j(t), [i] = e;
459
- typeof i.name != "string" && p(297, typeof i.name);
460
+ this._sortedExtensionReps !== void 0 && m(296);
461
+ const e = B(t), [i] = e;
462
+ typeof i.name != "string" && m(297, typeof i.name);
460
463
  let o = this.extensionNameMap.get(i.name);
461
- if (o !== void 0 && o.extension !== i && p(298, i.name), !o) {
462
- o = new ae(this, i), this.extensionNameMap.set(i.name, o);
464
+ if (o !== void 0 && o.extension !== i && m(298, i.name), !o) {
465
+ o = new de(this, i), this.extensionNameMap.set(i.name, o);
463
466
  const s = this.conflicts.get(i.name);
464
- typeof s == "string" && p(299, i.name, s);
465
- for (const r of i.conflictsWith || []) this.extensionNameMap.has(r) && p(299, i.name, r), this.conflicts.set(r, i.name);
467
+ typeof s == "string" && m(299, i.name, s);
468
+ for (const r of i.conflictsWith || []) this.extensionNameMap.has(r) && m(299, i.name, r), this.conflicts.set(r, i.name);
466
469
  for (const r of i.dependencies || []) {
467
- const a = j(r);
470
+ const a = B(r);
468
471
  this.addEdge(i.name, a[0].name, a.slice(1)), this.addExtension(a);
469
472
  }
470
473
  for (const [r, a] of i.peerDependencies || []) this.addEdge(i.name, r, a ? [a] : []);
@@ -474,25 +477,25 @@ class M {
474
477
  if (this._sortedExtensionReps) return this._sortedExtensionReps;
475
478
  const t = [], e = (i, o) => {
476
479
  let s = i.state;
477
- if (Ct(s)) return;
480
+ if (Lt(s)) return;
478
481
  const r = i.extension.name;
479
482
  var a;
480
- V(s) || p(300, r, o || "[unknown]"), V(a = s) || p(304, String(a.id), String(at)), s = Object.assign(a, { id: nt }), i.state = s;
483
+ tt(s) || m(300, r, o || "[unknown]"), tt(a = s) || m(304, String(a.id), String(gt)), s = Object.assign(a, { id: at }), i.state = s;
481
484
  const f = this.outgoingConfigEdges.get(r);
482
485
  if (f) for (const h of f.keys()) {
483
486
  const u = this.extensionNameMap.get(h);
484
487
  u && e(u, r);
485
488
  }
486
- s = oe(s), i.state = s, t.push(i);
489
+ s = ce(s), i.state = s, t.push(i);
487
490
  };
488
- for (const i of this.extensionNameMap.values()) V(i.state) && e(i);
491
+ for (const i of this.extensionNameMap.values()) tt(i.state) && e(i);
489
492
  for (const i of t) for (const [o, s] of this.outgoingConfigEdges.get(i.extension.name) || []) if (s.length > 0) {
490
493
  const r = this.extensionNameMap.get(o);
491
494
  if (r) for (const a of s) r.configs.add(a);
492
495
  }
493
496
  for (const [i, ...o] of this.roots) if (o.length > 0) {
494
497
  const s = this.extensionNameMap.get(i.name);
495
- s === void 0 && p(301, i.name);
498
+ s === void 0 && m(301, i.name);
496
499
  for (const r of o) s.configs.add(r);
497
500
  }
498
501
  return this._sortedExtensionReps = t, this._sortedExtensionReps;
@@ -507,16 +510,16 @@ class M {
507
510
  const a = r.afterRegistration(t);
508
511
  a && o.push(a);
509
512
  }
510
- return J(...o);
513
+ return Z(...o);
511
514
  }
512
515
  buildCreateEditorArgs() {
513
516
  const t = {}, e = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = {}, r = {}, a = this.sortedExtensionReps();
514
517
  for (const u of a) {
515
518
  const { extension: l } = u;
516
- if (l.onError !== void 0 && (t.onError = l.onError), l.disableEvents !== void 0 && (t.disableEvents = l.disableEvents), l.parentEditor !== void 0 && (t.parentEditor = l.parentEditor), l.editable !== void 0 && (t.editable = l.editable), l.namespace !== void 0 && (t.namespace = l.namespace), l.$initialEditorState !== void 0 && (t.$initialEditorState = l.$initialEditorState), l.nodes) for (const c of l.nodes) {
519
+ if (l.onError !== void 0 && (t.onError = l.onError), l.disableEvents !== void 0 && (t.disableEvents = l.disableEvents), l.parentEditor !== void 0 && (t.parentEditor = l.parentEditor), l.editable !== void 0 && (t.editable = l.editable), l.namespace !== void 0 && (t.namespace = l.namespace), l.$initialEditorState !== void 0 && (t.$initialEditorState = l.$initialEditorState), l.nodes) for (const c of ue(l)) {
517
520
  if (typeof c != "function") {
518
521
  const d = i.get(c.replace);
519
- d && p(302, l.name, c.replace.name, d.extension.name), i.set(c.replace, u);
522
+ d && m(302, l.name, c.replace.name, d.extension.name), i.set(c.replace, u);
520
523
  }
521
524
  e.add(c);
522
525
  }
@@ -524,21 +527,21 @@ class M {
524
527
  if (l.html.export) for (const [c, d] of l.html.export.entries()) o.set(c, d);
525
528
  l.html.import && Object.assign(s, l.html.import);
526
529
  }
527
- l.theme && Ot(r, l.theme);
530
+ l.theme && Dt(r, l.theme);
528
531
  }
529
532
  Object.keys(r).length > 0 && (t.theme = r), e.size && (t.nodes = [...e]);
530
533
  const f = Object.keys(s).length > 0, h = o.size > 0;
531
534
  (f || h) && (t.html = {}, f && (t.html.import = s), h && (t.html.export = o));
532
535
  for (const u of a) u.init(t);
533
- return t.onError || (t.onError = fe), t;
536
+ return t.onError || (t.onError = pe), t;
534
537
  }
535
538
  }
536
- function Ne(n, t) {
537
- const e = M.fromEditor(n).extensionNameMap.get(t);
539
+ function Oe(n, t) {
540
+ const e = A.fromEditor(n).extensionNameMap.get(t);
538
541
  return e ? e.getExtensionDependency() : void 0;
539
542
  }
540
- const de = /* @__PURE__ */ new Set(["http:", "https:", "mailto:", "sms:", "tel:"]);
541
- class P extends Qt {
543
+ const me = /* @__PURE__ */ new Set(["http:", "https:", "mailto:", "sms:", "tel:"]);
544
+ class j extends Yt {
542
545
  __url;
543
546
  __target;
544
547
  __rel;
@@ -547,7 +550,7 @@ class P extends Qt {
547
550
  return "link";
548
551
  }
549
552
  static clone(t) {
550
- return new P(t.__url, { rel: t.__rel, target: t.__target, title: t.__title }, t.__key);
553
+ return new j(t.__url, { rel: t.__rel, target: t.__target, title: t.__title }, t.__key);
551
554
  }
552
555
  constructor(t = "", e = {}, i) {
553
556
  super(i);
@@ -556,10 +559,10 @@ class P extends Qt {
556
559
  }
557
560
  createDOM(t) {
558
561
  const e = document.createElement("a");
559
- return this.updateLinkDOM(null, e, t), At(e, t.theme.link), e;
562
+ return this.updateLinkDOM(null, e, t), jt(e, t.theme.link), e;
560
563
  }
561
564
  updateLinkDOM(t, e, i) {
562
- if (ot(e)) {
565
+ if (dt(e)) {
563
566
  t && t.__url === this.__url || (e.href = this.sanitizeUrl(this.__url));
564
567
  for (const o of ["target", "rel", "title"]) {
565
568
  const s = `__${o}`, r = this[s];
@@ -571,19 +574,19 @@ class P extends Qt {
571
574
  return this.updateLinkDOM(t, e, i), !1;
572
575
  }
573
576
  static importDOM() {
574
- return { a: (t) => ({ conversion: he, priority: 1 }) };
577
+ return { a: (t) => ({ conversion: ve, priority: 1 }) };
575
578
  }
576
579
  static importJSON(t) {
577
- return I().updateFromJSON(t);
580
+ return L().updateFromJSON(t);
578
581
  }
579
582
  updateFromJSON(t) {
580
583
  return super.updateFromJSON(t).setURL(t.url).setRel(t.rel || null).setTarget(t.target || null).setTitle(t.title || null);
581
584
  }
582
585
  sanitizeUrl(t) {
583
- t = yt(t);
586
+ t = Nt(t);
584
587
  try {
585
- const e = new URL(yt(t));
586
- if (!de.has(e.protocol)) return "about:blank";
588
+ const e = new URL(Nt(t));
589
+ if (!me.has(e.protocol)) return "about:blank";
587
590
  } catch {
588
591
  return t;
589
592
  }
@@ -621,7 +624,7 @@ class P extends Qt {
621
624
  return e.__title = t, e;
622
625
  }
623
626
  insertNewAfter(t, e = !0) {
624
- const i = I(this.__url, { rel: this.__rel, target: this.__target, title: this.__title });
627
+ const i = L(this.__url, { rel: this.__rel, target: this.__target, title: this.__title });
625
628
  return this.insertAfter(i, e), i;
626
629
  }
627
630
  canInsertTextBefore() {
@@ -637,7 +640,7 @@ class P extends Qt {
637
640
  return !0;
638
641
  }
639
642
  extractWithChild(t, e, i) {
640
- if (!N(e)) return !1;
643
+ if (!w(e)) return !1;
641
644
  const o = e.anchor.getNode(), s = e.focus.getNode();
642
645
  return this.isParentOf(o) && this.isParentOf(s) && e.getTextContent().length > 0;
643
646
  }
@@ -648,21 +651,21 @@ class P extends Qt {
648
651
  return this.__url.startsWith("https://") || this.__url.startsWith("http://");
649
652
  }
650
653
  }
651
- function he(n) {
654
+ function ve(n) {
652
655
  let t = null;
653
- if (ot(n)) {
656
+ if (dt(n)) {
654
657
  const e = n.textContent;
655
- (e !== null && e !== "" || n.children.length > 0) && (t = I(n.getAttribute("href") || "", { rel: n.getAttribute("rel"), target: n.getAttribute("target"), title: n.getAttribute("title") }));
658
+ (e !== null && e !== "" || n.children.length > 0) && (t = L(n.getAttribute("href") || "", { rel: n.getAttribute("rel"), target: n.getAttribute("target"), title: n.getAttribute("title") }));
656
659
  }
657
660
  return { node: t };
658
661
  }
659
- function I(n = "", t) {
660
- return Et(new P(n, t));
662
+ function L(n = "", t) {
663
+ return Rt(new j(n, t));
661
664
  }
662
665
  function b(n) {
663
- return n instanceof P;
666
+ return n instanceof j;
664
667
  }
665
- class B extends P {
668
+ class Q extends j {
666
669
  __isUnlinked;
667
670
  constructor(t = "", e = {}, i) {
668
671
  super(t, e, i), this.__isUnlinked = e.isUnlinked !== void 0 && e.isUnlinked !== null && e.isUnlinked;
@@ -671,7 +674,7 @@ class B extends P {
671
674
  return "autolink";
672
675
  }
673
676
  static clone(t) {
674
- return new B(t.__url, { isUnlinked: t.__isUnlinked, rel: t.__rel, target: t.__target, title: t.__title }, t.__key);
677
+ return new Q(t.__url, { isUnlinked: t.__isUnlinked, rel: t.__rel, target: t.__target, title: t.__title }, t.__key);
675
678
  }
676
679
  getIsUnlinked() {
677
680
  return this.__isUnlinked;
@@ -687,7 +690,7 @@ class B extends P {
687
690
  return super.updateDOM(t, e, i) || t.__isUnlinked !== this.__isUnlinked;
688
691
  }
689
692
  static importJSON(t) {
690
- return it().updateFromJSON(t);
693
+ return ut().updateFromJSON(t);
691
694
  }
692
695
  updateFromJSON(t) {
693
696
  return super.updateFromJSON(t).setIsUnlinked(t.isUnlinked || !1);
@@ -700,24 +703,24 @@ class B extends P {
700
703
  }
701
704
  insertNewAfter(t, e = !0) {
702
705
  const i = this.getParentOrThrow().insertNewAfter(t, e);
703
- if (U(i)) {
704
- const o = it(this.__url, { isUnlinked: this.__isUnlinked, rel: this.__rel, target: this.__target, title: this.__title });
706
+ if (O(i)) {
707
+ const o = ut(this.__url, { isUnlinked: this.__isUnlinked, rel: this.__rel, target: this.__target, title: this.__title });
705
708
  return i.append(o), o;
706
709
  }
707
710
  return null;
708
711
  }
709
712
  }
710
- function it(n = "", t) {
711
- return Et(new B(n, t));
713
+ function ut(n = "", t) {
714
+ return Rt(new Q(n, t));
712
715
  }
713
- function E(n) {
714
- return n instanceof B;
716
+ function N(n) {
717
+ return n instanceof Q;
715
718
  }
716
- const st = Yt("TOGGLE_LINK_COMMAND");
717
- function St(n, t) {
719
+ const ct = te("TOGGLE_LINK_COMMAND");
720
+ function bt(n, t) {
718
721
  if (n.type === "element") {
719
722
  const e = n.getNode();
720
- return U(e) || (function(i, ...o) {
723
+ return O(e) || (function(i, ...o) {
721
724
  const s = new URL("https://lexical.dev/docs/error"), r = new URLSearchParams();
722
725
  r.append("code", i);
723
726
  for (const a of o) r.append("v", a);
@@ -726,143 +729,160 @@ function St(n, t) {
726
729
  }
727
730
  return null;
728
731
  }
729
- function Q(n, t = {}) {
732
+ function nt(n, t = {}) {
730
733
  let e;
731
734
  if (n && typeof n == "object") {
732
735
  const { url: u, ...l } = n;
733
736
  e = u, t = { ...l, ...t };
734
737
  } else e = n;
735
- const { target: i, title: o } = t, s = t.rel === void 0 ? "noreferrer" : t.rel, r = R();
736
- if (r === null || !N(r) && !X(r)) return;
737
- if (X(r)) {
738
+ const { target: i, title: o } = t, s = t.rel === void 0 ? "noreferrer" : t.rel, r = U();
739
+ if (r === null || !w(r) && !rt(r)) return;
740
+ if (rt(r)) {
738
741
  const u = r.getNodes();
739
742
  return u.length === 0 ? void 0 : void u.forEach((l) => {
740
743
  if (e === null) {
741
- const c = C(l, (d) => !E(d) && b(d));
744
+ const c = I(l, (d) => !N(d) && b(d));
742
745
  c && (c.insertBefore(l), c.getChildren().length === 0 && c.remove());
743
746
  } else {
744
- const c = C(l, (d) => !E(d) && b(d));
747
+ const c = I(l, (d) => !N(d) && b(d));
745
748
  if (c) c.setURL(e), i !== void 0 && c.setTarget(i), s !== void 0 && c.setRel(s);
746
749
  else {
747
- const d = I(e, { rel: s, target: i });
750
+ const d = L(e, { rel: s, target: i });
748
751
  l.insertBefore(d), d.append(l);
749
752
  }
750
753
  }
751
754
  });
752
755
  }
753
756
  const a = r.extract();
754
- if (e === null) return void a.forEach((u) => {
755
- const l = C(u, (c) => !E(c) && b(c));
756
- if (l) {
757
- const c = l.getChildren();
758
- for (let d = 0; d < c.length; d++) l.insertBefore(c[d]);
759
- l.remove();
760
- }
761
- });
757
+ if (e === null) {
758
+ const u = /* @__PURE__ */ new Set();
759
+ return void a.forEach((l) => {
760
+ const c = l.getParent();
761
+ if (b(c) && !N(c)) {
762
+ const d = c.getKey();
763
+ if (u.has(d)) return;
764
+ (function(g, y) {
765
+ const S = new Set(y.filter((_) => g.isParentOf(_)).map((_) => _.getKey())), v = g.getChildren(), x = v.filter((_) => S.has(_.getKey()));
766
+ if (x.length === v.length) return v.forEach((_) => g.insertBefore(_)), void g.remove();
767
+ const K = v.findIndex((_) => S.has(_.getKey())), W = v.findLastIndex((_) => S.has(_.getKey())), z = K === 0, F = W === v.length - 1;
768
+ if (z) x.forEach((_) => g.insertBefore(_));
769
+ else if (F) for (let _ = x.length - 1; _ >= 0; _--) g.insertAfter(x[_]);
770
+ else {
771
+ for (let k = x.length - 1; k >= 0; k--) g.insertAfter(x[k]);
772
+ const _ = v.slice(W + 1);
773
+ if (_.length > 0) {
774
+ const k = L(g.getURL(), { rel: g.getRel(), target: g.getTarget(), title: g.getTitle() });
775
+ x[x.length - 1].insertAfter(k), _.forEach(($t) => k.append($t));
776
+ }
777
+ }
778
+ })(c, a), u.add(d);
779
+ }
780
+ });
781
+ }
762
782
  const f = /* @__PURE__ */ new Set(), h = (u) => {
763
783
  f.has(u.getKey()) || (f.add(u.getKey()), u.setURL(e), i !== void 0 && u.setTarget(i), s !== void 0 && u.setRel(s), o !== void 0 && u.setTitle(o));
764
784
  };
765
785
  if (a.length === 1) {
766
- const u = a[0], l = C(u, b);
786
+ const u = a[0], l = I(u, b);
767
787
  if (l !== null) return h(l);
768
788
  }
769
789
  (function(u) {
770
- const l = R();
771
- if (!N(l)) return u();
772
- const c = ht(l), d = c.isBackward(), m = St(c.anchor, d ? -1 : 0), S = St(c.focus, d ? 0 : -1);
773
- if (u(), m || S) {
774
- const x = R();
775
- if (N(x)) {
776
- const v = x.clone();
777
- if (m) {
778
- const y = m.getParent();
779
- y && v.anchor.set(y.getKey(), m.getIndexWithinParent() + (d ? 1 : 0), "element");
790
+ const l = U();
791
+ if (!w(l)) return u();
792
+ const c = mt(l), d = c.isBackward(), g = bt(c.anchor, d ? -1 : 0), y = bt(c.focus, d ? 0 : -1);
793
+ if (u(), g || y) {
794
+ const S = U();
795
+ if (w(S)) {
796
+ const v = S.clone();
797
+ if (g) {
798
+ const x = g.getParent();
799
+ x && v.anchor.set(x.getKey(), g.getIndexWithinParent() + (d ? 1 : 0), "element");
780
800
  }
781
- if (S) {
782
- const y = S.getParent();
783
- y && v.focus.set(y.getKey(), S.getIndexWithinParent() + (d ? 0 : 1), "element");
801
+ if (y) {
802
+ const x = y.getParent();
803
+ x && v.focus.set(x.getKey(), y.getIndexWithinParent() + (d ? 0 : 1), "element");
784
804
  }
785
- ee(ht(v));
805
+ se(mt(v));
786
806
  }
787
807
  }
788
808
  })(() => {
789
809
  let u = null;
790
810
  for (const l of a) {
791
811
  if (!l.isAttached()) continue;
792
- const c = C(l, b);
812
+ const c = I(l, b);
793
813
  if (c) {
794
814
  h(c);
795
815
  continue;
796
816
  }
797
- if (U(l)) {
817
+ if (O(l)) {
798
818
  if (!l.isInline()) continue;
799
819
  if (b(l)) {
800
- if (!(E(l) || u !== null && u.getParentOrThrow().isParentOf(l))) {
820
+ if (!(N(l) || u !== null && u.getParentOrThrow().isParentOf(l))) {
801
821
  h(l), u = l;
802
822
  continue;
803
823
  }
804
- for (const m of l.getChildren()) l.insertBefore(m);
824
+ for (const g of l.getChildren()) l.insertBefore(g);
805
825
  l.remove();
806
826
  continue;
807
827
  }
808
828
  }
809
829
  const d = l.getPreviousSibling();
810
- b(d) && d.is(u) ? d.append(l) : (u = I(e, { rel: s, target: i, title: o }), l.insertAfter(u), u.append(l));
830
+ b(d) && d.is(u) ? d.append(l) : (u = L(e, { rel: s, target: i, title: o }), l.insertAfter(u), u.append(l));
811
831
  }
812
832
  });
813
833
  }
814
- const ge = /^\+?[0-9\s()-]{5,}$/;
815
- function yt(n) {
816
- return n.match(/^[a-z][a-z0-9+.-]*:/i) || n.match(/^[/#.]/) ? n : n.includes("@") ? `mailto:${n}` : ge.test(n) ? `tel:${n}` : `https://${n}`;
834
+ const xe = /^\+?[0-9\s()-]{5,}$/;
835
+ function Nt(n) {
836
+ return n.match(/^[a-z][a-z0-9+.-]*:/i) || n.match(/^[/#.]/) ? n : n.includes("@") ? `mailto:${n}` : xe.test(n) ? `tel:${n}` : `https://${n}`;
817
837
  }
818
- function we(n, t) {
819
- return J(et(() => n.registerCommand(st, (e) => {
838
+ function ke(n, t) {
839
+ return Z(lt(() => n.registerCommand(ct, (e) => {
820
840
  const i = t.validateUrl.peek(), o = t.attributes.peek();
821
- if (e === null) return Q(null), !0;
822
- if (typeof e == "string") return !(i !== void 0 && !i(e)) && (Q(e, o), !0);
841
+ if (e === null) return nt(null), !0;
842
+ if (typeof e == "string") return !(i !== void 0 && !i(e)) && (nt(e, o), !0);
823
843
  {
824
844
  const { url: s, target: r, rel: a, title: f } = e;
825
- return Q(s, { ...o, rel: a, target: r, title: f }), !0;
845
+ return nt(s, { ...o, rel: a, target: r, title: f }), !0;
826
846
  }
827
- }, q)), et(() => {
847
+ }, st)), lt(() => {
828
848
  const e = t.validateUrl.value;
829
849
  if (!e) return;
830
850
  const i = t.attributes.value;
831
- return n.registerCommand(ne, (o) => {
832
- const s = R();
833
- if (!N(s) || s.isCollapsed() || !Pt(o, ClipboardEvent) || o.clipboardData === null) return !1;
851
+ return n.registerCommand(re, (o) => {
852
+ const s = U();
853
+ if (!w(s) || s.isCollapsed() || !Kt(o, ClipboardEvent) || o.clipboardData === null) return !1;
834
854
  const r = o.clipboardData.getData("text");
835
- return !!e(r) && !s.getNodes().some((a) => U(a)) && (n.dispatchCommand(st, { ...i, url: r }), o.preventDefault(), !0);
836
- }, q);
855
+ return !!e(r) && !s.getNodes().some((a) => O(a)) && (n.dispatchCommand(ct, { ...i, url: r }), o.preventDefault(), !0);
856
+ }, st);
837
857
  }));
838
858
  }
839
- function Re(n, t, e = {}) {
859
+ function Ce(n, t, e = {}) {
840
860
  const i = (s) => {
841
861
  const r = s.target;
842
- if (!qt(r)) return;
843
- const a = Xt(r);
862
+ if (!ee(r)) return;
863
+ const a = ne(r);
844
864
  if (a === null) return;
845
865
  let f = null, h = null;
846
866
  if (a.update(() => {
847
- const c = te(r);
867
+ const c = ie(r);
848
868
  if (c !== null) {
849
- const d = C(c, U);
869
+ const d = I(c, O);
850
870
  if (!t.disabled.peek()) if (b(d)) f = d.sanitizeUrl(d.getURL()), h = d.getTarget();
851
871
  else {
852
- const m = (function(S, x) {
853
- let v = S;
872
+ const g = (function(y, S) {
873
+ let v = y;
854
874
  for (; v != null; ) {
855
- if (x(v)) return v;
875
+ if (S(v)) return v;
856
876
  v = v.parentNode;
857
877
  }
858
878
  return null;
859
- })(r, ot);
860
- m !== null && (f = m.href, h = m.target);
879
+ })(r, dt);
880
+ g !== null && (f = g.href, h = g.target);
861
881
  }
862
882
  }
863
883
  }), f === null || f === "") return;
864
- const u = n.getEditorState().read(R);
865
- if (N(u) && !u.isCollapsed()) return void s.preventDefault();
884
+ const u = n.getEditorState().read(U);
885
+ if (w(u) && !u.isCollapsed()) return void s.preventDefault();
866
886
  const l = s.type === "auxclick" && s.button === 1;
867
887
  window.open(f, t.newTab.peek() || l || s.metaKey || s.ctrlKey || h === "_blank" ? "_blank" : "_self"), s.preventDefault();
868
888
  }, o = (s) => {
@@ -872,41 +892,41 @@ function Re(n, t, e = {}) {
872
892
  r !== null && (r.removeEventListener("click", i), r.removeEventListener("mouseup", o)), s !== null && (s.addEventListener("click", i, e), s.addEventListener("mouseup", o, e));
873
893
  });
874
894
  }
875
- function Ue(n, t = (e) => e) {
895
+ function De(n, t = (e) => e) {
876
896
  return (e) => {
877
897
  const i = n.exec(e);
878
898
  return i === null ? null : { index: i.index, length: i[0].length, text: i[0], url: t(i[0]) };
879
899
  };
880
900
  }
881
- function Dt(n, t) {
901
+ function Mt(n, t) {
882
902
  for (let e = 0; e < t.length; e++) {
883
903
  const i = t[e](n);
884
904
  if (i) return i;
885
905
  }
886
906
  return null;
887
907
  }
888
- const pe = /[.,;\s]/;
889
- function z(n) {
890
- return pe.test(n);
908
+ const Se = /[.,;\s]/;
909
+ function H(n) {
910
+ return Se.test(n);
891
911
  }
892
- function Tt(n) {
893
- return z(n[n.length - 1]);
912
+ function It(n) {
913
+ return H(n[n.length - 1]);
894
914
  }
895
- function rt(n) {
896
- return z(n[0]);
915
+ function ft(n) {
916
+ return H(n[0]);
897
917
  }
898
- function Lt(n) {
918
+ function Pt(n) {
899
919
  let t = n.getPreviousSibling();
900
- return U(t) && (t = t.getLastDescendant()), t === null || Nt(t) || A(t) && Tt(t.getTextContent());
920
+ return O(t) && (t = t.getLastDescendant()), t === null || Ut(t) || $(t) && It(t.getTextContent());
901
921
  }
902
- function Mt(n) {
922
+ function At(n) {
903
923
  let t = n.getNextSibling();
904
- return U(t) && (t = t.getFirstDescendant()), t === null || Nt(t) || A(t) && rt(t.getTextContent());
924
+ return O(t) && (t = t.getFirstDescendant()), t === null || Ut(t) || $(t) && ft(t.getTextContent());
905
925
  }
906
- function me(n, t, e, i) {
907
- return (n > 0 ? z(e[n - 1]) : Lt(i[0])) ? t < e.length ? z(e[t]) : Mt(i[i.length - 1]) : !1;
926
+ function _e(n, t, e, i) {
927
+ return (n > 0 ? H(e[n - 1]) : Pt(i[0])) ? t < e.length ? H(e[t]) : At(i[i.length - 1]) : !1;
908
928
  }
909
- function ve(n, t, e) {
929
+ function ye(n, t, e) {
910
930
  const i = [], o = [], s = [];
911
931
  let r = 0, a = 0;
912
932
  const f = [...n];
@@ -916,12 +936,12 @@ function ve(n, t, e) {
916
936
  }
917
937
  return [r, i, o, s];
918
938
  }
919
- function xe(n, t, e, i) {
920
- const o = it(i.url, i.attributes);
939
+ function Ee(n, t, e, i) {
940
+ const o = ut(i.url, i.attributes);
921
941
  if (n.length === 1) {
922
942
  let s, r = n[0];
923
943
  t === 0 ? [s, r] = r.splitText(e) : [, s, r] = r.splitText(t, e);
924
- const a = dt(i.text);
944
+ const a = pt(i.text);
925
945
  return a.setFormat(s.getFormat()), a.setDetail(s.getDetail()), a.setStyle(s.getStyle()), o.append(a), s.replace(o), r;
926
946
  }
927
947
  if (n.length > 1) {
@@ -931,26 +951,26 @@ function xe(n, t, e, i) {
931
951
  const f = [];
932
952
  let h;
933
953
  for (let d = 1; d < n.length; d++) {
934
- const m = n[d], S = m.getTextContent().length, x = a;
935
- if (x < e) if (a + S <= e) f.push(m);
954
+ const g = n[d], y = g.getTextContent().length, S = a;
955
+ if (S < e) if (a + y <= e) f.push(g);
936
956
  else {
937
- const [v, y] = m.splitText(e - x);
938
- f.push(v), h = y;
957
+ const [v, x] = g.splitText(e - S);
958
+ f.push(v), h = x;
939
959
  }
940
- a += S;
960
+ a += y;
941
961
  }
942
- const u = R(), l = u ? u.getNodes().find(A) : void 0, c = dt(r.getTextContent());
943
- return c.setFormat(r.getFormat()), c.setDetail(r.getDetail()), c.setStyle(r.getStyle()), o.append(c, ...f), l && l === r && (N(u) ? c.select(u.anchor.offset, u.focus.offset) : X(u) && c.select(0, c.getTextContent().length)), r.replace(o), h;
962
+ const u = U(), l = u ? u.getNodes().find($) : void 0, c = pt(r.getTextContent());
963
+ return c.setFormat(r.getFormat()), c.setDetail(r.getDetail()), c.setStyle(r.getStyle()), o.append(c, ...f), l && l === r && (w(u) ? c.select(u.anchor.offset, u.focus.offset) : rt(u) && c.select(0, c.getTextContent().length)), r.replace(o), h;
944
964
  }
945
965
  }
946
- function Y(n, t, e) {
966
+ function it(n, t, e) {
947
967
  const i = n.getChildren(), o = i.length;
948
968
  for (let f = 0; f < o; f++) {
949
969
  const h = i[f];
950
- if (!A(h) || !h.isSimpleText()) return W(n), void e(null, n.getURL());
970
+ if (!$(h) || !h.isSimpleText()) return V(n), void e(null, n.getURL());
951
971
  }
952
- const s = n.getTextContent(), r = Dt(s, t);
953
- if (r === null || r.text !== s || !Lt(n) || !Mt(n)) return W(n), void e(null, n.getURL());
972
+ const s = n.getTextContent(), r = Mt(s, t);
973
+ if (r === null || r.text !== s || !Pt(n) || !At(n)) return V(n), void e(null, n.getURL());
954
974
  const a = n.getURL();
955
975
  if (a !== r.url && (n.setURL(r.url), e(r.url, a)), r.attributes) {
956
976
  const f = n.getRel();
@@ -959,69 +979,69 @@ function Y(n, t, e) {
959
979
  h !== r.attributes.target && (n.setTarget(r.attributes.target || null), e(r.attributes.target || null, h));
960
980
  }
961
981
  }
962
- function W(n) {
982
+ function V(n) {
963
983
  const t = n.getChildren();
964
984
  for (let e = t.length - 1; e >= 0; e--) n.insertAfter(t[e]);
965
985
  return n.remove(), t.map((e) => e.getLatest());
966
986
  }
967
- const _e = { changeHandlers: [], matchers: [] };
968
- function Oe(n, t = _e) {
987
+ const be = { changeHandlers: [], matchers: [] };
988
+ function Te(n, t = be) {
969
989
  const { matchers: e, changeHandlers: i } = t, o = (s, r) => {
970
990
  for (const a of i) a(s, r);
971
991
  };
972
- return J(n.registerNodeTransform(bt, (s) => {
992
+ return Z(n.registerNodeTransform(wt, (s) => {
973
993
  const r = s.getParentOrThrow(), a = s.getPreviousSibling();
974
- if (E(r) && !r.getIsUnlinked()) Y(r, e, o);
994
+ if (N(r) && !r.getIsUnlinked()) it(r, e, o);
975
995
  else if (!b(r)) {
976
- if (s.isSimpleText() && (rt(s.getTextContent()) || !E(a))) {
996
+ if (s.isSimpleText() && (ft(s.getTextContent()) || !N(a))) {
977
997
  const f = (function(h) {
978
998
  const u = [h];
979
999
  let l = h.getNextSibling();
980
- for (; l !== null && A(l) && l.isSimpleText() && (u.push(l), !/[\s]/.test(l.getTextContent())); ) l = l.getNextSibling();
1000
+ for (; l !== null && $(l) && l.isSimpleText() && (u.push(l), !/[\s]/.test(l.getTextContent())); ) l = l.getNextSibling();
981
1001
  return u;
982
1002
  })(s);
983
1003
  (function(h, u, l) {
984
1004
  let c = [...h];
985
1005
  const d = c.map((v) => v.getTextContent()).join("");
986
- let m, S = d, x = 0;
987
- for (; (m = Dt(S, u)) && m !== null; ) {
988
- const v = m.index, y = v + m.length;
989
- if (me(x + v, x + y, d, c)) {
990
- const [ut, , It, ct] = ve(c, x + v, x + y), ft = xe(It, x + v - ut, x + y - ut, m);
991
- c = ft ? [ft, ...ct] : ct, l(m.url, null), x = 0;
992
- } else x += y;
993
- S = S.substring(y);
1006
+ let g, y = d, S = 0;
1007
+ for (; (g = Mt(y, u)) && g !== null; ) {
1008
+ const v = g.index, x = v + g.length;
1009
+ if (_e(S + v, S + x, d, c)) {
1010
+ const [K, , W, z] = ye(c, S + v, S + x), F = Ee(W, S + v - K, S + x - K, g);
1011
+ c = F ? [F, ...z] : z, l(g.url, null), S = 0;
1012
+ } else S += x;
1013
+ y = y.substring(x);
994
1014
  }
995
1015
  })(f, e, o);
996
1016
  }
997
1017
  (function(f, h, u) {
998
1018
  const l = f.getPreviousSibling(), c = f.getNextSibling(), d = f.getTextContent();
999
- var m;
1000
- !E(l) || l.getIsUnlinked() || rt(d) && (m = d, !(l.isEmailURI() ? /^\.[a-zA-Z]{2,}/.test(m) : /^\.[a-zA-Z0-9]{1,}/.test(m))) || (l.append(f), Y(l, h, u), u(null, l.getURL())), !E(c) || c.getIsUnlinked() || Tt(d) || (W(c), Y(c, h, u), u(null, c.getURL()));
1019
+ var g;
1020
+ !N(l) || l.getIsUnlinked() || ft(d) && (g = d, !(l.isEmailURI() ? /^\.[a-zA-Z]{2,}/.test(g) : /^\.[a-zA-Z0-9]{1,}/.test(g))) || (l.append(f), it(l, h, u), u(null, l.getURL())), !N(c) || c.getIsUnlinked() || It(d) || (V(c), it(c, h, u), u(null, c.getURL()));
1001
1021
  })(s, e, o);
1002
1022
  }
1003
- }), n.registerCommand(st, (s) => {
1004
- const r = R();
1005
- return s !== null || !N(r) || r.extract().forEach((a) => {
1023
+ }), n.registerCommand(ct, (s) => {
1024
+ const r = U();
1025
+ return s !== null || !w(r) || r.extract().forEach((a) => {
1006
1026
  const f = a.getParent();
1007
- E(f) && (f.setIsUnlinked(!f.getIsUnlinked()), f.markDirty());
1027
+ N(f) && (f.setIsUnlinked(!f.getIsUnlinked()), f.markDirty());
1008
1028
  }), !1;
1009
- }, q));
1029
+ }, st));
1010
1030
  }
1011
1031
  export {
1012
- B as A,
1013
- Ne as F,
1014
- Ue as H,
1015
- Q as J,
1016
- Re as K,
1017
- st as P,
1018
- P as R,
1019
- M as T,
1020
- Ee as a,
1021
- be as b,
1022
- et as d,
1023
- Oe as l,
1032
+ Q as A,
1033
+ A as B,
1034
+ ke as F,
1035
+ Oe as G,
1036
+ De as H,
1037
+ nt as J,
1038
+ ct as P,
1039
+ Ue as a,
1040
+ Re as b,
1041
+ lt as d,
1042
+ Te as l,
1024
1043
  b as w,
1025
- we as z
1044
+ j as y,
1045
+ Ce as z
1026
1046
  };
1027
- //# sourceMappingURL=LexicalLink.prod-C6Or2Yo6.js.map
1047
+ //# sourceMappingURL=LexicalLink.prod-BCE6Bg2N.js.map