@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.
- package/dist/{Lexical.prod-BAE-wnll.js → Lexical.prod-sd_e2sqT.js} +648 -627
- package/dist/Lexical.prod-sd_e2sqT.js.map +1 -0
- package/dist/{LexicalClipboard.prod-BS4qAkmJ.js → LexicalClipboard.prod-Co2PF1UJ.js} +44 -42
- package/dist/LexicalClipboard.prod-Co2PF1UJ.js.map +1 -0
- package/dist/{LexicalLink.prod-C6Or2Yo6.js → LexicalLink.prod-BCE6Bg2N.js} +354 -334
- package/dist/LexicalLink.prod-BCE6Bg2N.js.map +1 -0
- package/dist/{LexicalList.prod-rTq41CO0.js → LexicalList.prod-CIB0K0ja.js} +141 -138
- package/dist/LexicalList.prod-CIB0K0ja.js.map +1 -0
- package/dist/{LexicalSelection.prod-fLzEGOT_.js → LexicalSelection.prod-CCmcTP6S.js} +41 -41
- package/dist/{LexicalSelection.prod-fLzEGOT_.js.map → LexicalSelection.prod-CCmcTP6S.js.map} +1 -1
- package/dist/{LexicalTable.prod-BBI7yaOy.js → LexicalTable.prod-Oa2YPHLl.js} +359 -359
- package/dist/LexicalTable.prod-Oa2YPHLl.js.map +1 -0
- package/dist/{LexicalUtils.prod-D8DAKg7O.js → LexicalUtils.prod-CjKjgnmx.js} +43 -43
- package/dist/{LexicalUtils.prod-D8DAKg7O.js.map → LexicalUtils.prod-CjKjgnmx.js.map} +1 -1
- package/dist/{TableCellResizerPlugin-HPo4ZkHo.js → TableCellResizerPlugin-DATbSzfg.js} +51 -51
- package/dist/{TableCellResizerPlugin-HPo4ZkHo.js.map → TableCellResizerPlugin-DATbSzfg.js.map} +1 -1
- package/dist/{TablePlugin-BLbsvcuu.js → TablePlugin-CqCjNBW_.js} +83 -83
- package/dist/{TablePlugin-BLbsvcuu.js.map → TablePlugin-CqCjNBW_.js.map} +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
- package/dist/components/FormInput/FormInput.js +1 -1
- package/dist/components/InputField/InputField.stories.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +1 -1
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.js +1 -1
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +7 -7
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +2 -2
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +52 -52
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +25 -25
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +7 -7
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +27 -27
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +16 -16
- package/dist/components/RteEditor/Plugins/index.js +2 -2
- package/dist/components/RteEditor/RteEditor.js +185 -185
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +8 -8
- package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +11 -11
- package/dist/components/SelectListbox/components/SelectButton.js +17 -17
- package/dist/components/SelectListbox/components/SelectButton.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +6 -6
- package/dist/Lexical.prod-BAE-wnll.js.map +0 -1
- package/dist/LexicalClipboard.prod-BS4qAkmJ.js.map +0 -1
- package/dist/LexicalLink.prod-C6Or2Yo6.js.map +0 -1
- package/dist/LexicalList.prod-rTq41CO0.js.map +0 -1
- package/dist/LexicalTable.prod-BBI7yaOy.js.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { U as
|
|
2
|
-
import { aK as
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
if (
|
|
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 (;
|
|
8
|
-
let e =
|
|
9
|
-
for (
|
|
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) &&
|
|
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 (
|
|
19
|
+
if (ot = 0, R--, t) throw n;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
if (
|
|
23
|
-
|
|
21
|
+
function Re(n) {
|
|
22
|
+
if (R > 0) return n();
|
|
23
|
+
R++;
|
|
24
24
|
try {
|
|
25
25
|
return n();
|
|
26
26
|
} finally {
|
|
27
|
-
|
|
27
|
+
X();
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
let
|
|
31
|
-
function
|
|
32
|
-
const t =
|
|
33
|
-
|
|
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
|
-
|
|
37
|
+
p = t;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
let
|
|
41
|
-
function
|
|
42
|
-
if (
|
|
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 !==
|
|
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
|
|
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
|
|
50
|
-
return new
|
|
49
|
+
function le(n, t) {
|
|
50
|
+
return new E(n, t);
|
|
51
51
|
}
|
|
52
|
-
function
|
|
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
|
|
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
|
|
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
|
|
74
|
-
|
|
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
|
|
76
|
+
function Ct(n) {
|
|
77
77
|
const t = n.u;
|
|
78
78
|
if (n.u = void 0, typeof t == "function") {
|
|
79
|
-
|
|
80
|
-
const e =
|
|
81
|
-
|
|
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,
|
|
85
|
+
throw n.f &= -2, n.f |= 8, ht(n), i;
|
|
86
86
|
} finally {
|
|
87
|
-
|
|
87
|
+
p = e, X();
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
function
|
|
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,
|
|
93
|
+
n.x = void 0, n.s = void 0, Ct(n);
|
|
94
94
|
}
|
|
95
|
-
function
|
|
96
|
-
if (
|
|
97
|
-
|
|
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
|
|
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
|
|
103
|
-
const e = new
|
|
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
|
|
112
|
+
function Ue(n, t = {}) {
|
|
113
113
|
const e = {};
|
|
114
114
|
for (const i in n) {
|
|
115
|
-
const o = t[i], s =
|
|
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
|
-
|
|
120
|
+
E.prototype.brand = oe, E.prototype.h = function() {
|
|
121
121
|
return !0;
|
|
122
|
-
},
|
|
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 :
|
|
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
|
-
},
|
|
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 &&
|
|
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
|
-
},
|
|
137
|
-
return
|
|
138
|
-
const t = this.value, e =
|
|
139
|
-
|
|
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
|
-
|
|
143
|
+
p = e;
|
|
144
144
|
}
|
|
145
145
|
}, { name: "sub" });
|
|
146
|
-
},
|
|
146
|
+
}, E.prototype.valueOf = function() {
|
|
147
147
|
return this.value;
|
|
148
|
-
},
|
|
148
|
+
}, E.prototype.toString = function() {
|
|
149
149
|
return this.value + "";
|
|
150
|
-
},
|
|
150
|
+
}, E.prototype.toJSON = function() {
|
|
151
151
|
return this.value;
|
|
152
|
-
},
|
|
153
|
-
const n =
|
|
154
|
-
|
|
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
|
-
|
|
158
|
+
p = n;
|
|
159
159
|
}
|
|
160
|
-
}, Object.defineProperty(
|
|
161
|
-
const n =
|
|
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 (
|
|
166
|
-
this.v = n, this.i++,
|
|
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
|
-
|
|
170
|
+
X();
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
-
} }),
|
|
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 ===
|
|
176
|
-
if (this.g =
|
|
177
|
-
const n =
|
|
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
|
-
|
|
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
|
|
186
|
-
},
|
|
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
|
-
|
|
192
|
-
},
|
|
193
|
-
if (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
|
-
},
|
|
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(
|
|
202
|
+
}, Object.defineProperty(C.prototype, "value", { get() {
|
|
203
203
|
if (1 & this.f) throw new Error("Cycle detected");
|
|
204
|
-
const n =
|
|
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
|
-
} }),
|
|
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
|
-
},
|
|
216
|
+
}, T.prototype.S = function() {
|
|
217
217
|
if (1 & this.f) throw new Error("Cycle detected");
|
|
218
|
-
this.f |= 1, this.f &= -9,
|
|
219
|
-
const n =
|
|
220
|
-
return
|
|
221
|
-
},
|
|
222
|
-
2 & this.f || (this.f |= 2, this.o =
|
|
223
|
-
},
|
|
224
|
-
this.f |= 8, 1 & this.f ||
|
|
225
|
-
},
|
|
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
|
|
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
|
|
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] =
|
|
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
|
|
243
|
-
function
|
|
244
|
-
return n.id ===
|
|
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
|
|
247
|
-
return n.id ===
|
|
249
|
+
function Lt(n) {
|
|
250
|
+
return n.id === Tt;
|
|
248
251
|
}
|
|
249
|
-
function
|
|
252
|
+
function ce(n) {
|
|
250
253
|
return (function(t) {
|
|
251
|
-
return t.id ===
|
|
252
|
-
})(n) ||
|
|
254
|
+
return t.id === at;
|
|
255
|
+
})(n) || m(305, String(n.id), String(at)), Object.assign(n, { id: Tt });
|
|
253
256
|
}
|
|
254
|
-
const
|
|
255
|
-
class
|
|
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:
|
|
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) :
|
|
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
|
-
|
|
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:
|
|
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:
|
|
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 !==
|
|
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:
|
|
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 !==
|
|
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:
|
|
301
|
+
return Object.assign(s, { id: Y });
|
|
299
302
|
})(i), () => {
|
|
300
303
|
const s = this.state;
|
|
301
|
-
s.id !==
|
|
302
|
-
return Object.assign(r, { id:
|
|
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 !==
|
|
310
|
-
return Object.assign(o, { id:
|
|
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 &&
|
|
317
|
+
return this._signal === void 0 && m(311), this._signal;
|
|
315
318
|
}
|
|
316
319
|
getInitResult() {
|
|
317
|
-
this.extension.init === void 0 &&
|
|
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) ||
|
|
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 >=
|
|
331
|
-
})(t) ||
|
|
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 &&
|
|
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 &&
|
|
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 >=
|
|
349
|
-
})(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) ||
|
|
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 >=
|
|
363
|
-
})(t) ||
|
|
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
|
|
369
|
-
function
|
|
370
|
-
const n =
|
|
371
|
-
n.isEmpty() && n.append(
|
|
371
|
+
const _t = { tag: qt };
|
|
372
|
+
function he() {
|
|
373
|
+
const n = Xt();
|
|
374
|
+
n.isEmpty() && n.append(Qt());
|
|
372
375
|
}
|
|
373
|
-
const
|
|
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 (
|
|
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: [
|
|
390
|
-
function
|
|
392
|
+
}, name: "@lexical/extension/InitialState", nodes: [Jt, wt, Bt, Gt, Vt] }), yt = Symbol.for("@lexical/extension/LexicalBuilder");
|
|
393
|
+
function Et() {
|
|
391
394
|
}
|
|
392
|
-
function
|
|
395
|
+
function pe(n) {
|
|
393
396
|
throw n;
|
|
394
397
|
}
|
|
395
|
-
function
|
|
398
|
+
function B(n) {
|
|
396
399
|
return Array.isArray(n) ? n : [n];
|
|
397
400
|
}
|
|
398
|
-
const
|
|
399
|
-
class
|
|
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 =
|
|
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 = [
|
|
413
|
-
for (const i of t) e.push(
|
|
414
|
-
return new
|
|
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[
|
|
418
|
-
return e && (e.PACKAGE_VERSION !==
|
|
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 =
|
|
422
|
-
return e === void 0 &&
|
|
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(
|
|
428
|
+
const { $initialEditorState: t, onError: e, ...i } = this.buildCreateEditorArgs(), o = Object.assign(Wt({ ...i, ...e ? { onError: (s) => {
|
|
426
429
|
e(s, o);
|
|
427
|
-
} } : {} }), { [
|
|
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 =
|
|
435
|
+
let t = Et;
|
|
433
436
|
function e() {
|
|
434
437
|
try {
|
|
435
438
|
t();
|
|
436
439
|
} finally {
|
|
437
|
-
t =
|
|
440
|
+
t = Et;
|
|
438
441
|
}
|
|
439
442
|
}
|
|
440
443
|
const i = Object.assign(this.constructEditor(), { dispose: e, [Symbol.dispose]: e });
|
|
441
|
-
return t =
|
|
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 &&
|
|
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 &&
|
|
458
|
-
const e =
|
|
459
|
-
typeof i.name != "string" &&
|
|
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 &&
|
|
462
|
-
o = new
|
|
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" &&
|
|
465
|
-
for (const r of i.conflictsWith || []) this.extensionNameMap.has(r) &&
|
|
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 =
|
|
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 (
|
|
480
|
+
if (Lt(s)) return;
|
|
478
481
|
const r = i.extension.name;
|
|
479
482
|
var a;
|
|
480
|
-
|
|
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 =
|
|
489
|
+
s = ce(s), i.state = s, t.push(i);
|
|
487
490
|
};
|
|
488
|
-
for (const i of this.extensionNameMap.values())
|
|
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 &&
|
|
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
|
|
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
|
|
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 &&
|
|
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 &&
|
|
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 =
|
|
536
|
+
return t.onError || (t.onError = pe), t;
|
|
534
537
|
}
|
|
535
538
|
}
|
|
536
|
-
function
|
|
537
|
-
const e =
|
|
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
|
|
541
|
-
class
|
|
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
|
|
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),
|
|
562
|
+
return this.updateLinkDOM(null, e, t), jt(e, t.theme.link), e;
|
|
560
563
|
}
|
|
561
564
|
updateLinkDOM(t, e, i) {
|
|
562
|
-
if (
|
|
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:
|
|
577
|
+
return { a: (t) => ({ conversion: ve, priority: 1 }) };
|
|
575
578
|
}
|
|
576
579
|
static importJSON(t) {
|
|
577
|
-
return
|
|
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 =
|
|
586
|
+
t = Nt(t);
|
|
584
587
|
try {
|
|
585
|
-
const e = new URL(
|
|
586
|
-
if (!
|
|
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 =
|
|
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 (!
|
|
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
|
|
654
|
+
function ve(n) {
|
|
652
655
|
let t = null;
|
|
653
|
-
if (
|
|
656
|
+
if (dt(n)) {
|
|
654
657
|
const e = n.textContent;
|
|
655
|
-
(e !== null && e !== "" || n.children.length > 0) && (t =
|
|
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
|
|
660
|
-
return
|
|
662
|
+
function L(n = "", t) {
|
|
663
|
+
return Rt(new j(n, t));
|
|
661
664
|
}
|
|
662
665
|
function b(n) {
|
|
663
|
-
return n instanceof
|
|
666
|
+
return n instanceof j;
|
|
664
667
|
}
|
|
665
|
-
class
|
|
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
|
|
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
|
|
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 (
|
|
704
|
-
const o =
|
|
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
|
|
711
|
-
return
|
|
713
|
+
function ut(n = "", t) {
|
|
714
|
+
return Rt(new Q(n, t));
|
|
712
715
|
}
|
|
713
|
-
function
|
|
714
|
-
return n instanceof
|
|
716
|
+
function N(n) {
|
|
717
|
+
return n instanceof Q;
|
|
715
718
|
}
|
|
716
|
-
const
|
|
717
|
-
function
|
|
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
|
|
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
|
|
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 =
|
|
736
|
-
if (r === null || !
|
|
737
|
-
if (
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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)
|
|
755
|
-
const
|
|
756
|
-
|
|
757
|
-
const c = l.
|
|
758
|
-
|
|
759
|
-
|
|
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 =
|
|
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 =
|
|
771
|
-
if (!
|
|
772
|
-
const c =
|
|
773
|
-
if (u(),
|
|
774
|
-
const
|
|
775
|
-
if (
|
|
776
|
-
const v =
|
|
777
|
-
if (
|
|
778
|
-
const
|
|
779
|
-
|
|
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 (
|
|
782
|
-
const
|
|
783
|
-
|
|
801
|
+
if (y) {
|
|
802
|
+
const x = y.getParent();
|
|
803
|
+
x && v.focus.set(x.getKey(), y.getIndexWithinParent() + (d ? 0 : 1), "element");
|
|
784
804
|
}
|
|
785
|
-
|
|
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 =
|
|
812
|
+
const c = I(l, b);
|
|
793
813
|
if (c) {
|
|
794
814
|
h(c);
|
|
795
815
|
continue;
|
|
796
816
|
}
|
|
797
|
-
if (
|
|
817
|
+
if (O(l)) {
|
|
798
818
|
if (!l.isInline()) continue;
|
|
799
819
|
if (b(l)) {
|
|
800
|
-
if (!(
|
|
820
|
+
if (!(N(l) || u !== null && u.getParentOrThrow().isParentOf(l))) {
|
|
801
821
|
h(l), u = l;
|
|
802
822
|
continue;
|
|
803
823
|
}
|
|
804
|
-
for (const
|
|
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 =
|
|
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
|
|
815
|
-
function
|
|
816
|
-
return n.match(/^[a-z][a-z0-9+.-]*:/i) || n.match(/^[/#.]/) ? n : n.includes("@") ? `mailto:${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
|
|
819
|
-
return
|
|
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
|
|
822
|
-
if (typeof e == "string") return !(i !== void 0 && !i(e)) && (
|
|
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
|
|
845
|
+
return nt(s, { ...o, rel: a, target: r, title: f }), !0;
|
|
826
846
|
}
|
|
827
|
-
},
|
|
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(
|
|
832
|
-
const s =
|
|
833
|
-
if (!
|
|
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) =>
|
|
836
|
-
},
|
|
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
|
|
859
|
+
function Ce(n, t, e = {}) {
|
|
840
860
|
const i = (s) => {
|
|
841
861
|
const r = s.target;
|
|
842
|
-
if (!
|
|
843
|
-
const a =
|
|
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 =
|
|
867
|
+
const c = ie(r);
|
|
848
868
|
if (c !== null) {
|
|
849
|
-
const d =
|
|
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
|
|
853
|
-
let v =
|
|
872
|
+
const g = (function(y, S) {
|
|
873
|
+
let v = y;
|
|
854
874
|
for (; v != null; ) {
|
|
855
|
-
if (
|
|
875
|
+
if (S(v)) return v;
|
|
856
876
|
v = v.parentNode;
|
|
857
877
|
}
|
|
858
878
|
return null;
|
|
859
|
-
})(r,
|
|
860
|
-
|
|
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(
|
|
865
|
-
if (
|
|
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
|
|
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
|
|
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
|
|
889
|
-
function
|
|
890
|
-
return
|
|
908
|
+
const Se = /[.,;\s]/;
|
|
909
|
+
function H(n) {
|
|
910
|
+
return Se.test(n);
|
|
891
911
|
}
|
|
892
|
-
function
|
|
893
|
-
return
|
|
912
|
+
function It(n) {
|
|
913
|
+
return H(n[n.length - 1]);
|
|
894
914
|
}
|
|
895
|
-
function
|
|
896
|
-
return
|
|
915
|
+
function ft(n) {
|
|
916
|
+
return H(n[0]);
|
|
897
917
|
}
|
|
898
|
-
function
|
|
918
|
+
function Pt(n) {
|
|
899
919
|
let t = n.getPreviousSibling();
|
|
900
|
-
return
|
|
920
|
+
return O(t) && (t = t.getLastDescendant()), t === null || Ut(t) || $(t) && It(t.getTextContent());
|
|
901
921
|
}
|
|
902
|
-
function
|
|
922
|
+
function At(n) {
|
|
903
923
|
let t = n.getNextSibling();
|
|
904
|
-
return
|
|
924
|
+
return O(t) && (t = t.getFirstDescendant()), t === null || Ut(t) || $(t) && ft(t.getTextContent());
|
|
905
925
|
}
|
|
906
|
-
function
|
|
907
|
-
return (n > 0 ?
|
|
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
|
|
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
|
|
920
|
-
const o =
|
|
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 =
|
|
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
|
|
935
|
-
if (
|
|
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,
|
|
938
|
-
f.push(v), h =
|
|
957
|
+
const [v, x] = g.splitText(e - S);
|
|
958
|
+
f.push(v), h = x;
|
|
939
959
|
}
|
|
940
|
-
a +=
|
|
960
|
+
a += y;
|
|
941
961
|
}
|
|
942
|
-
const u =
|
|
943
|
-
return c.setFormat(r.getFormat()), c.setDetail(r.getDetail()), c.setStyle(r.getStyle()), o.append(c, ...f), l && l === r && (
|
|
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
|
|
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 (
|
|
970
|
+
if (!$(h) || !h.isSimpleText()) return V(n), void e(null, n.getURL());
|
|
951
971
|
}
|
|
952
|
-
const s = n.getTextContent(), r =
|
|
953
|
-
if (r === null || r.text !== s || !
|
|
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
|
|
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
|
|
968
|
-
function
|
|
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
|
|
992
|
+
return Z(n.registerNodeTransform(wt, (s) => {
|
|
973
993
|
const r = s.getParentOrThrow(), a = s.getPreviousSibling();
|
|
974
|
-
if (
|
|
994
|
+
if (N(r) && !r.getIsUnlinked()) it(r, e, o);
|
|
975
995
|
else if (!b(r)) {
|
|
976
|
-
if (s.isSimpleText() && (
|
|
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 &&
|
|
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
|
|
987
|
-
for (; (
|
|
988
|
-
const v =
|
|
989
|
-
if (
|
|
990
|
-
const [
|
|
991
|
-
c =
|
|
992
|
-
} else
|
|
993
|
-
|
|
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
|
|
1000
|
-
!
|
|
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(
|
|
1004
|
-
const r =
|
|
1005
|
-
return s !== null || !
|
|
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
|
-
|
|
1027
|
+
N(f) && (f.setIsUnlinked(!f.getIsUnlinked()), f.markDirty());
|
|
1008
1028
|
}), !1;
|
|
1009
|
-
},
|
|
1029
|
+
}, st));
|
|
1010
1030
|
}
|
|
1011
1031
|
export {
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
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
|
-
|
|
1044
|
+
j as y,
|
|
1045
|
+
Ce as z
|
|
1026
1046
|
};
|
|
1027
|
-
//# sourceMappingURL=LexicalLink.prod-
|
|
1047
|
+
//# sourceMappingURL=LexicalLink.prod-BCE6Bg2N.js.map
|