@uva-glass/component-library 3.27.0 → 3.27.1
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-m3GJsAAT.js → Lexical.prod-UwAbgYpF.js} +1043 -1036
- package/dist/Lexical.prod-UwAbgYpF.js.map +1 -0
- package/dist/{LexicalClipboard.prod-HyvHKdDm.js → LexicalClipboard.prod-DHIGjydG.js} +25 -25
- package/dist/{LexicalClipboard.prod-HyvHKdDm.js.map → LexicalClipboard.prod-DHIGjydG.js.map} +1 -1
- package/dist/{LexicalLink.prod-D0qasaVP.js → LexicalLink.prod-Bsa9J7L-.js} +13 -13
- package/dist/{LexicalLink.prod-D0qasaVP.js.map → LexicalLink.prod-Bsa9J7L-.js.map} +1 -1
- package/dist/{LexicalList.prod-CQz14k_F.js → LexicalList.prod-jxGuZd4b.js} +26 -26
- package/dist/{LexicalList.prod-CQz14k_F.js.map → LexicalList.prod-jxGuZd4b.js.map} +1 -1
- package/dist/LexicalSelection.prod-xk5MiZnZ.js +101 -0
- package/dist/LexicalSelection.prod-xk5MiZnZ.js.map +1 -0
- package/dist/{LexicalTable.prod-BHKhA4PF.js → LexicalTable.prod-BSjs04iE.js} +164 -164
- package/dist/{LexicalTable.prod-BHKhA4PF.js.map → LexicalTable.prod-BSjs04iE.js.map} +1 -1
- package/dist/{LexicalUtils.prod-Vqqof-U-.js → LexicalUtils.prod-cQutjKA3.js} +43 -43
- package/dist/{LexicalUtils.prod-Vqqof-U-.js.map → LexicalUtils.prod-cQutjKA3.js.map} +1 -1
- package/dist/{TablePlugin-CykqKW6X.js → TablePlugin-NmJsn2fm.js} +4 -4
- package/dist/{TablePlugin-CykqKW6X.js.map → TablePlugin-NmJsn2fm.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 +1 -1
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +2 -2
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +2 -2
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +30 -30
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +12 -12
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +3 -3
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +3 -3
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +2 -2
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +7 -7
- package/dist/components/RteEditor/Plugins/index.js +1 -1
- package/dist/components/RteEditor/RteEditor.js +74 -74
- package/dist/components/RteEditor/helpers.js +4 -4
- package/dist/components/index.js +1 -1
- package/dist/{helpers-5AryUrYu.js → helpers-DZIm3MiJ.js} +4 -4
- package/dist/{helpers-5AryUrYu.js.map → helpers-DZIm3MiJ.js.map} +1 -1
- package/dist/index.js +1 -1
- package/package.json +6 -6
- package/dist/Lexical.prod-m3GJsAAT.js.map +0 -1
- package/dist/LexicalSelection.prod-Bh25dAig.js +0 -101
- package/dist/LexicalSelection.prod-Bh25dAig.js.map +0 -1
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var se = (n, e, t) =>
|
|
1
|
+
var Ds = Object.defineProperty;
|
|
2
|
+
var Ps = (n, e, t) => e in n ? Ds(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var se = (n, e, t) => Ps(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
function T(n, ...e) {
|
|
5
5
|
const t = new URL("https://lexical.dev/docs/error"), r = new URLSearchParams();
|
|
6
6
|
r.append("code", n);
|
|
7
7
|
for (const i of e) r.append("v", i);
|
|
8
8
|
throw t.search = r.toString(), Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
|
|
9
9
|
}
|
|
10
|
-
const ae = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0,
|
|
11
|
-
function
|
|
10
|
+
const ae = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, Fs = ae && "documentMode" in document ? document.documentMode : null, fe = ae && /Mac|iPod|iPhone|iPad/.test(navigator.platform), We = ae && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent), Xt = !(!ae || !("InputEvent" in window) || Fs) && "getTargetRanges" in new window.InputEvent("input"), St = ae && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), it = ae && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Ls = ae && /Android/.test(navigator.userAgent), Ei = ae && /^(?=.*Chrome).*/i.test(navigator.userAgent), Fr = ae && Ls && Ei, Qt = ae && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !Ei;
|
|
11
|
+
function Zt(...n) {
|
|
12
12
|
const e = [];
|
|
13
13
|
for (const t of n) if (t && typeof t == "string") for (const [r] of t.matchAll(/\S+/g)) e.push(r);
|
|
14
14
|
return e;
|
|
15
15
|
}
|
|
16
|
-
const
|
|
16
|
+
const Is = 1, Ks = 3, zs = 9, Bs = 11, Je = 0, Mi = 1, st = 2, Rs = 0, Ws = 1, Js = 2, en = 4, tn = 8, or = 128, Us = 1792 | (112 | (3 | en | tn) | or), lr = 1, ar = 2, cr = 3, ur = 4, fr = 5, dr = 6, gn = St || it || Qt ? " " : "", ke = `
|
|
17
17
|
|
|
18
|
-
`,
|
|
19
|
-
function
|
|
18
|
+
`, js = We ? " " : gn, Ai = "֑-߿יִ-﷽ﹰ-ﻼ", Oi = "A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--", $s = new RegExp("^[^" + Oi + "]*[" + Ai + "]"), Vs = new RegExp("^[^" + Ai + "]*[" + Oi + "]"), Ue = { bold: 1, capitalize: 1024, code: 16, highlight: or, italic: 2, lowercase: 256, strikethrough: en, subscript: 32, superscript: 64, underline: tn, uppercase: 512 }, Ys = { directionless: 1, unmergeable: 2 }, Lr = { center: ar, end: dr, justify: ur, left: lr, right: cr, start: fr }, Hs = { [ar]: "center", [dr]: "end", [ur]: "justify", [lr]: "left", [cr]: "right", [fr]: "start" }, qs = { normal: 0, segmented: 2, token: 1 }, Gs = { [Rs]: "normal", [Js]: "segmented", [Ws]: "token" }, Xs = "$";
|
|
19
|
+
function Di(n, e, t, r, i, s) {
|
|
20
20
|
let o = n.getFirstChild();
|
|
21
21
|
for (; o !== null; ) {
|
|
22
22
|
const l = o.__key;
|
|
23
|
-
o.__parent === e && (v(o) &&
|
|
23
|
+
o.__parent === e && (v(o) && Di(o, l, t, r, i, s), t.has(l) || s.delete(l), i.push(l)), o = o.getNextSibling();
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
const
|
|
27
|
-
let
|
|
28
|
-
function
|
|
29
|
-
|
|
26
|
+
const Qs = 100;
|
|
27
|
+
let jn = !1, hr = 0;
|
|
28
|
+
function Zs(n) {
|
|
29
|
+
hr = n.timeStamp;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function An(n, e, t) {
|
|
32
32
|
const r = n.nodeName === "BR", i = e.__lexicalLineBreak;
|
|
33
|
-
return i && (n === i || r && n.previousSibling === i) || r &&
|
|
33
|
+
return i && (n === i || r && n.previousSibling === i) || r && Tn(n, t) !== void 0;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function eo(n, e, t) {
|
|
36
36
|
const r = Te(oe(t));
|
|
37
37
|
let i = null, s = null;
|
|
38
38
|
r !== null && r.anchorNode === n && (i = r.anchorOffset, s = r.focusOffset);
|
|
39
39
|
const o = n.nodeValue;
|
|
40
|
-
o !== null &&
|
|
40
|
+
o !== null && br(e, o, i, s, !1);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function to(n, e, t) {
|
|
43
43
|
if (O(n)) {
|
|
44
44
|
const r = n.anchor.getNode();
|
|
45
45
|
if (r.is(t) && n.format !== r.getFormat()) return !1;
|
|
46
46
|
}
|
|
47
47
|
return be(e) && t.isAttached();
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
for (let i = n; i && !
|
|
51
|
-
const s =
|
|
49
|
+
function no(n, e, t, r) {
|
|
50
|
+
for (let i = n; i && !cl(i); i = Pt(i)) {
|
|
51
|
+
const s = Tn(i, e);
|
|
52
52
|
if (s !== void 0) {
|
|
53
|
-
const o =
|
|
53
|
+
const o = $(s, t);
|
|
54
54
|
if (o) return z(o) || !ee(i) ? void 0 : [i, o];
|
|
55
|
-
} else if (i === r) return [r,
|
|
55
|
+
} else if (i === r) return [r, Ss(t)];
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
|
|
60
|
-
const r = performance.now() -
|
|
58
|
+
function Pi(n, e, t) {
|
|
59
|
+
jn = !0;
|
|
60
|
+
const r = performance.now() - hr > Qs;
|
|
61
61
|
try {
|
|
62
62
|
te(n, () => {
|
|
63
63
|
const i = L() || function(f) {
|
|
@@ -68,17 +68,17 @@ function Di(n, e, t) {
|
|
|
68
68
|
}(n), s = /* @__PURE__ */ new Map(), o = n.getRootElement(), l = n._editorState, a = n._blockCursorElement;
|
|
69
69
|
let c = !1, u = "";
|
|
70
70
|
for (let f = 0; f < e.length; f++) {
|
|
71
|
-
const g = e[f], d = g.type, _ = g.target, p =
|
|
71
|
+
const g = e[f], d = g.type, _ = g.target, p = no(_, n, l, o);
|
|
72
72
|
if (!p) continue;
|
|
73
73
|
const [x, y] = p;
|
|
74
|
-
if (d === "characterData") r && M(y) && be(_) &&
|
|
74
|
+
if (d === "characterData") r && M(y) && be(_) && to(i, _, y) && eo(_, y, n);
|
|
75
75
|
else if (d === "childList") {
|
|
76
76
|
c = !0;
|
|
77
77
|
const m = g.addedNodes;
|
|
78
78
|
for (let C = 0; C < m.length; C++) {
|
|
79
|
-
const w = m[C], k =
|
|
80
|
-
if (S != null && w !== a && k === null && !
|
|
81
|
-
if (
|
|
79
|
+
const w = m[C], k = xs(w), S = w.parentNode;
|
|
80
|
+
if (S != null && w !== a && k === null && !An(w, S, n)) {
|
|
81
|
+
if (We) {
|
|
82
82
|
const A = (ee(w) ? w.innerText : null) || w.nodeValue;
|
|
83
83
|
A && (u += A);
|
|
84
84
|
}
|
|
@@ -90,7 +90,7 @@ function Di(n, e, t) {
|
|
|
90
90
|
let C = 0;
|
|
91
91
|
for (let w = 0; w < N; w++) {
|
|
92
92
|
const k = b[w];
|
|
93
|
-
(
|
|
93
|
+
(An(k, _, n) || a === k) && (_.appendChild(k), C++);
|
|
94
94
|
}
|
|
95
95
|
N !== C && s.set(x, y);
|
|
96
96
|
}
|
|
@@ -103,29 +103,29 @@ function Di(n, e, t) {
|
|
|
103
103
|
const g = h[f], d = g.addedNodes, _ = g.target;
|
|
104
104
|
for (let p = 0; p < d.length; p++) {
|
|
105
105
|
const x = d[p], y = x.parentNode;
|
|
106
|
-
y == null || x.nodeName !== "BR" ||
|
|
106
|
+
y == null || x.nodeName !== "BR" || An(x, _, n) || y.removeChild(x);
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
t.takeRecords();
|
|
110
110
|
}
|
|
111
|
-
i !== null && (c && ie(i),
|
|
111
|
+
i !== null && (c && ie(i), We && bs(n) && i.insertRawText(u));
|
|
112
112
|
});
|
|
113
113
|
} finally {
|
|
114
|
-
|
|
114
|
+
jn = !1;
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function Fi(n) {
|
|
118
118
|
const e = n._observer;
|
|
119
|
-
e !== null &&
|
|
119
|
+
e !== null && Pi(n, e.takeRecords(), e);
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function Li(n) {
|
|
122
122
|
(function(e) {
|
|
123
|
-
|
|
123
|
+
hr === 0 && oe(e).addEventListener("textInput", Zs, !0);
|
|
124
124
|
})(n), n._observer = new MutationObserver((e, t) => {
|
|
125
|
-
|
|
125
|
+
Pi(n, e, t);
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
|
-
class
|
|
128
|
+
class gr {
|
|
129
129
|
constructor(e, t = /* @__PURE__ */ new Map(), r = void 0, i = /* @__PURE__ */ new Map(), s = void 0) {
|
|
130
130
|
this.node = e, this.sharedConfigMap = t, this.unknownState = r, this.knownState = i;
|
|
131
131
|
const o = s !== void 0 ? s : function(l, a, c) {
|
|
@@ -155,14 +155,14 @@ class hr {
|
|
|
155
155
|
toJSON() {
|
|
156
156
|
const e = { ...this.unknownState };
|
|
157
157
|
for (const [t, r] of this.knownState) t.isEqual(r, t.defaultValue) ? delete e[t.key] : e[t.key] = t.unparse(r);
|
|
158
|
-
return
|
|
158
|
+
return Bt(e) ? { [Xs]: e } : {};
|
|
159
159
|
}
|
|
160
160
|
getWritable(e) {
|
|
161
161
|
if (this.node === e) return this;
|
|
162
|
-
const t = new Map(this.knownState), r =
|
|
162
|
+
const t = new Map(this.knownState), r = Bt(i = this.unknownState) && { ...i };
|
|
163
163
|
var i;
|
|
164
164
|
if (r) for (const s of t.keys()) delete r[s.key];
|
|
165
|
-
return new
|
|
165
|
+
return new gr(e, this.sharedConfigMap, Bt(r), t, this.size);
|
|
166
166
|
}
|
|
167
167
|
updateFromKnown(e, t) {
|
|
168
168
|
const r = e.key;
|
|
@@ -178,17 +178,17 @@ class hr {
|
|
|
178
178
|
const { knownState: t } = this;
|
|
179
179
|
for (const r of t.keys()) t.set(r, r.defaultValue);
|
|
180
180
|
if (this.size = t.size, this.unknownState = {}, e) for (const [r, i] of Object.entries(e)) this.updateFromUnknown(r, i);
|
|
181
|
-
this.unknownState =
|
|
181
|
+
this.unknownState = Bt(this.unknownState);
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function Bt(n) {
|
|
185
185
|
if (n) for (const e in n) return n;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
188
|
-
const e = n.getWritable(), t = e.__state ? e.__state.getWritable(e) : new
|
|
187
|
+
function ro(n) {
|
|
188
|
+
const e = n.getWritable(), t = e.__state ? e.__state.getWritable(e) : new gr(e);
|
|
189
189
|
return e.__state = t, t;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function Ir(n, e) {
|
|
192
192
|
const t = n.__mode, r = n.__format, i = n.__style, s = e.__mode, o = e.__format, l = e.__style, a = n.__state, c = e.__state;
|
|
193
193
|
return (t === null || t === s) && (r === null || r === o) && (i === null || i === l) && (n.__state === null || a === c || function(u, h) {
|
|
194
194
|
if (u === h) return !0;
|
|
@@ -211,17 +211,17 @@ function Lr(n, e) {
|
|
|
211
211
|
return !(u && g(u, h) || h && g(h, u) || u && d(u, h) || h && d(h, u));
|
|
212
212
|
}(a, c));
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function Kr(n, e) {
|
|
215
215
|
const t = n.mergeWithSibling(e), r = R()._normalizedNodes;
|
|
216
216
|
return r.add(n.__key), r.add(e.__key), t;
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function zr(n) {
|
|
219
219
|
let e, t, r = n;
|
|
220
220
|
if (r.__text !== "" || !r.isSimpleText() || r.isUnmergeable()) {
|
|
221
221
|
for (; (e = r.getPreviousSibling()) !== null && M(e) && e.isSimpleText() && !e.isUnmergeable(); ) {
|
|
222
222
|
if (e.__text !== "") {
|
|
223
|
-
if (
|
|
224
|
-
r =
|
|
223
|
+
if (Ir(e, r)) {
|
|
224
|
+
r = Kr(e, r);
|
|
225
225
|
break;
|
|
226
226
|
}
|
|
227
227
|
break;
|
|
@@ -230,8 +230,8 @@ function Kr(n) {
|
|
|
230
230
|
}
|
|
231
231
|
for (; (t = r.getNextSibling()) !== null && M(t) && t.isSimpleText() && !t.isUnmergeable(); ) {
|
|
232
232
|
if (t.__text !== "") {
|
|
233
|
-
if (
|
|
234
|
-
r =
|
|
233
|
+
if (Ir(r, t)) {
|
|
234
|
+
r = Kr(r, t);
|
|
235
235
|
break;
|
|
236
236
|
}
|
|
237
237
|
break;
|
|
@@ -241,9 +241,9 @@ function Kr(n) {
|
|
|
241
241
|
} else r.remove();
|
|
242
242
|
}
|
|
243
243
|
function $n(n) {
|
|
244
|
-
return
|
|
244
|
+
return Br(n.anchor), Br(n.focus), n;
|
|
245
245
|
}
|
|
246
|
-
function
|
|
246
|
+
function Br(n) {
|
|
247
247
|
for (; n.type === "element"; ) {
|
|
248
248
|
const e = n.getNode(), t = n.offset;
|
|
249
249
|
let r, i;
|
|
@@ -255,44 +255,44 @@ function zr(n) {
|
|
|
255
255
|
n.set(r.__key, i ? r.getChildrenSize() : 0, "element", !0);
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
|
-
let De, Q,
|
|
259
|
-
function
|
|
260
|
-
const t =
|
|
258
|
+
let De, Q, vt, _n, Vn, Yn, je, le, Hn, kt, J = "", X = "", ce = null, ue = "", Se = "", Ii = !1, Tt = !1, $t = null;
|
|
259
|
+
function nn(n, e) {
|
|
260
|
+
const t = je.get(n);
|
|
261
261
|
if (e !== null) {
|
|
262
|
-
const r =
|
|
262
|
+
const r = Xn(n);
|
|
263
263
|
r.parentNode === e && e.removeChild(r);
|
|
264
264
|
}
|
|
265
265
|
if (le.has(n) || Q._keyToDOMMap.delete(n), v(t)) {
|
|
266
|
-
const r =
|
|
267
|
-
|
|
266
|
+
const r = sn(t, je);
|
|
267
|
+
qn(r, 0, r.length - 1, null);
|
|
268
268
|
}
|
|
269
|
-
t !== void 0 &&
|
|
269
|
+
t !== void 0 && Nr(kt, vt, _n, t, "destroyed");
|
|
270
270
|
}
|
|
271
|
-
function
|
|
271
|
+
function qn(n, e, t, r) {
|
|
272
272
|
let i = e;
|
|
273
273
|
for (; i <= t; ++i) {
|
|
274
274
|
const s = n[i];
|
|
275
|
-
s !== void 0 &&
|
|
275
|
+
s !== void 0 && nn(s, r);
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
function Ie(n, e) {
|
|
279
279
|
n.setProperty("text-align", e);
|
|
280
280
|
}
|
|
281
|
-
const
|
|
282
|
-
function
|
|
281
|
+
const io = "40px";
|
|
282
|
+
function Ki(n, e) {
|
|
283
283
|
const t = De.theme.indent;
|
|
284
284
|
if (typeof t == "string") {
|
|
285
285
|
const i = n.classList.contains(t);
|
|
286
286
|
e > 0 && !i ? n.classList.add(t) : e < 1 && i && n.classList.remove(t);
|
|
287
287
|
}
|
|
288
|
-
const r = getComputedStyle(n).getPropertyValue("--lexical-indent-base-value") ||
|
|
288
|
+
const r = getComputedStyle(n).getPropertyValue("--lexical-indent-base-value") || io;
|
|
289
289
|
n.style.setProperty("padding-inline-start", e === 0 ? "" : `calc(${e} * ${r})`);
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function zi(n, e) {
|
|
292
292
|
const t = n.style;
|
|
293
|
-
e === 0 ? Ie(t, "") : e ===
|
|
293
|
+
e === 0 ? Ie(t, "") : e === lr ? Ie(t, "left") : e === ar ? Ie(t, "center") : e === cr ? Ie(t, "right") : e === ur ? Ie(t, "justify") : e === fr ? Ie(t, "start") : e === dr && Ie(t, "end");
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function rn(n, e) {
|
|
296
296
|
const t = le.get(n);
|
|
297
297
|
t === void 0 && T(60);
|
|
298
298
|
const r = t.createDOM(De, Q);
|
|
@@ -304,63 +304,63 @@ function nn(n, e) {
|
|
|
304
304
|
})(s, o, i), l.set(i, s);
|
|
305
305
|
}(n, r, Q), M(t) ? r.setAttribute("data-lexical-text", "true") : z(t) && r.setAttribute("data-lexical-decorator", "true"), v(t)) {
|
|
306
306
|
const i = t.__indent, s = t.__size;
|
|
307
|
-
if (i !== 0 &&
|
|
307
|
+
if (i !== 0 && Ki(r, i), s !== 0) {
|
|
308
308
|
const l = s - 1;
|
|
309
309
|
(function(a, c, u, h) {
|
|
310
310
|
const f = X;
|
|
311
|
-
X = "",
|
|
312
|
-
})(
|
|
311
|
+
X = "", Gn(a, u, 0, c, u.getDOMSlot(h)), Ri(u, h), X = f;
|
|
312
|
+
})(sn(t, le), l, t, r);
|
|
313
313
|
}
|
|
314
314
|
const o = t.__format;
|
|
315
|
-
o !== 0 &&
|
|
315
|
+
o !== 0 && zi(r, o), t.isInline() || Bi(null, t, r), bn(t) && (J += ke, Se += ke);
|
|
316
316
|
} else {
|
|
317
317
|
const i = t.getTextContent();
|
|
318
318
|
if (z(t)) {
|
|
319
319
|
const s = t.decorate(Q, De);
|
|
320
|
-
s !== null &&
|
|
320
|
+
s !== null && Wi(n, s), r.contentEditable = "false";
|
|
321
321
|
} else M(t) && (t.isDirectionless() || (X += i));
|
|
322
322
|
J += i, Se += i;
|
|
323
323
|
}
|
|
324
|
-
return e !== null && e.insertChild(r),
|
|
324
|
+
return e !== null && e.insertChild(r), Nr(kt, vt, _n, t, "created"), r;
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function Gn(n, e, t, r, i) {
|
|
327
327
|
const s = J;
|
|
328
328
|
J = "";
|
|
329
329
|
let o = t;
|
|
330
330
|
for (; o <= r; ++o) {
|
|
331
|
-
|
|
331
|
+
rn(n[o], i);
|
|
332
332
|
const l = le.get(n[o]);
|
|
333
333
|
l !== null && M(l) && (ce === null && (ce = l.getFormat()), ue === "" && (ue = l.getStyle()));
|
|
334
334
|
}
|
|
335
|
-
|
|
335
|
+
bn(e) && (J += ke), i.element.__lexicalTextContent = J, J = s + J;
|
|
336
336
|
}
|
|
337
|
-
function
|
|
337
|
+
function Rr(n, e) {
|
|
338
338
|
if (n) {
|
|
339
339
|
const t = n.__last;
|
|
340
340
|
if (t) {
|
|
341
341
|
const r = e.get(t);
|
|
342
|
-
if (r) return
|
|
342
|
+
if (r) return nt(r) ? "line-break" : z(r) && r.isInline() ? "decorator" : null;
|
|
343
343
|
}
|
|
344
344
|
return "empty";
|
|
345
345
|
}
|
|
346
346
|
return null;
|
|
347
347
|
}
|
|
348
|
-
function
|
|
349
|
-
const r =
|
|
348
|
+
function Bi(n, e, t) {
|
|
349
|
+
const r = Rr(n, je), i = Rr(e, le);
|
|
350
350
|
r !== i && e.getDOMSlot(t).setManagedLineBreak(i);
|
|
351
351
|
}
|
|
352
|
-
function
|
|
352
|
+
function Ri(n, e) {
|
|
353
353
|
const t = e.__lexicalDirTextContent || "", r = e.__lexicalDir || "";
|
|
354
354
|
if (t !== X || r !== $t) {
|
|
355
355
|
const i = X === "", s = i ? $t : function(o) {
|
|
356
|
-
return
|
|
356
|
+
return $s.test(o) ? "rtl" : Vs.test(o) ? "ltr" : null;
|
|
357
357
|
}(X);
|
|
358
358
|
if (s !== r) {
|
|
359
359
|
const o = e.classList, l = De.theme;
|
|
360
360
|
let a = r !== null ? l[r] : void 0, c = s !== null ? l[s] : void 0;
|
|
361
361
|
if (a !== void 0) {
|
|
362
362
|
if (typeof a == "string") {
|
|
363
|
-
const u =
|
|
363
|
+
const u = Zt(a);
|
|
364
364
|
a = l[r] = u;
|
|
365
365
|
}
|
|
366
366
|
o.remove(...a);
|
|
@@ -369,19 +369,19 @@ function Bi(n, e) {
|
|
|
369
369
|
else {
|
|
370
370
|
if (c !== void 0) {
|
|
371
371
|
if (typeof c == "string") {
|
|
372
|
-
const u =
|
|
372
|
+
const u = Zt(c);
|
|
373
373
|
c = l[s] = u;
|
|
374
374
|
}
|
|
375
375
|
c !== void 0 && o.add(...c);
|
|
376
376
|
}
|
|
377
377
|
e.dir = s;
|
|
378
378
|
}
|
|
379
|
-
|
|
379
|
+
Tt || (n.getWritable().__dir = s);
|
|
380
380
|
}
|
|
381
381
|
$t = s, e.__lexicalDirTextContent = X, e.__lexicalDir = s;
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
|
-
function
|
|
384
|
+
function so(n, e, t) {
|
|
385
385
|
const r = X;
|
|
386
386
|
var i;
|
|
387
387
|
X = "", ce = null, ue = "", function(s, o, l) {
|
|
@@ -390,9 +390,9 @@ function ro(n, e, t) {
|
|
|
390
390
|
const h = l.element;
|
|
391
391
|
if (c === 1 && u === 1) {
|
|
392
392
|
const f = s.__first, g = o.__first;
|
|
393
|
-
if (f === g)
|
|
393
|
+
if (f === g) _t(f, h);
|
|
394
394
|
else {
|
|
395
|
-
const _ =
|
|
395
|
+
const _ = Xn(f), p = rn(g, null);
|
|
396
396
|
try {
|
|
397
397
|
h.replaceChild(p, _);
|
|
398
398
|
} catch (x) {
|
|
@@ -402,32 +402,32 @@ function ro(n, e, t) {
|
|
|
402
402
|
}
|
|
403
403
|
throw x;
|
|
404
404
|
}
|
|
405
|
-
|
|
405
|
+
nn(f, null);
|
|
406
406
|
}
|
|
407
407
|
const d = le.get(g);
|
|
408
408
|
M(d) && (ce === null && (ce = d.getFormat()), ue === "" && (ue = d.getStyle()));
|
|
409
409
|
} else {
|
|
410
|
-
const f =
|
|
411
|
-
if (f.length !== c && T(227), g.length !== u && T(228), c === 0) u !== 0 &&
|
|
410
|
+
const f = sn(s, je), g = sn(o, le);
|
|
411
|
+
if (f.length !== c && T(227), g.length !== u && T(228), c === 0) u !== 0 && Gn(g, o, 0, u - 1, l);
|
|
412
412
|
else if (u === 0) {
|
|
413
413
|
if (c !== 0) {
|
|
414
414
|
const d = l.after == null && l.before == null && l.element.__lexicalLineBreak == null;
|
|
415
|
-
|
|
415
|
+
qn(f, 0, c - 1, d ? null : h), d && (h.textContent = "");
|
|
416
416
|
}
|
|
417
417
|
} else (function(d, _, p, x, y, m) {
|
|
418
418
|
const b = x - 1, N = y - 1;
|
|
419
419
|
let C, w, k = m.getFirstChild(), S = 0, A = 0;
|
|
420
420
|
for (; S <= b && A <= N; ) {
|
|
421
421
|
const K = _[S], P = p[A];
|
|
422
|
-
if (K === P) k =
|
|
422
|
+
if (K === P) k = On(_t(P, m.element)), S++, A++;
|
|
423
423
|
else {
|
|
424
424
|
C === void 0 && (C = new Set(_)), w === void 0 && (w = new Set(p));
|
|
425
425
|
const V = w.has(K), _e = C.has(P);
|
|
426
426
|
if (V) if (_e) {
|
|
427
|
-
const pe =
|
|
428
|
-
pe === k ? k =
|
|
429
|
-
} else
|
|
430
|
-
else k =
|
|
427
|
+
const pe = lt(Q, P);
|
|
428
|
+
pe === k ? k = On(_t(P, m.element)) : (m.withBefore(k).insertChild(pe), _t(P, m.element)), S++, A++;
|
|
429
|
+
} else rn(P, m.withBefore(k)), A++;
|
|
430
|
+
else k = On(Xn(K)), nn(K, m.element), S++;
|
|
431
431
|
}
|
|
432
432
|
const B = le.get(P);
|
|
433
433
|
B !== null && M(B) && (ce === null && (ce = B.getFormat()), ue === "" && (ue = B.getStyle()));
|
|
@@ -435,16 +435,16 @@ function ro(n, e, t) {
|
|
|
435
435
|
const F = S > b, W = A > N;
|
|
436
436
|
if (F && !W) {
|
|
437
437
|
const K = p[N + 1], P = K === void 0 ? null : Q.getElementByKey(K);
|
|
438
|
-
|
|
439
|
-
} else W && !F &&
|
|
438
|
+
Gn(p, d, A, N, m.withBefore(P));
|
|
439
|
+
} else W && !F && qn(_, S, b, m.element);
|
|
440
440
|
})(o, f, g, c, u, l);
|
|
441
441
|
}
|
|
442
|
-
|
|
443
|
-
}(n, e, e.getDOMSlot(t)),
|
|
444
|
-
ue === "" || ue === s.__textStyle ||
|
|
442
|
+
bn(o) && (J += ke), h.__lexicalTextContent = J, J = a + J;
|
|
443
|
+
}(n, e, e.getDOMSlot(t)), Ri(e, t), i = e, ce == null || ce === i.__textFormat || Tt || i.setTextFormat(ce), function(s) {
|
|
444
|
+
ue === "" || ue === s.__textStyle || Tt || s.setTextStyle(ue);
|
|
445
445
|
}(e), X = r;
|
|
446
446
|
}
|
|
447
|
-
function
|
|
447
|
+
function sn(n, e) {
|
|
448
448
|
const t = [];
|
|
449
449
|
let r = n.__first;
|
|
450
450
|
for (; r !== null; ) {
|
|
@@ -453,11 +453,11 @@ function rn(n, e) {
|
|
|
453
453
|
}
|
|
454
454
|
return t;
|
|
455
455
|
}
|
|
456
|
-
function
|
|
457
|
-
const t =
|
|
456
|
+
function _t(n, e) {
|
|
457
|
+
const t = je.get(n);
|
|
458
458
|
let r = le.get(n);
|
|
459
459
|
t !== void 0 && r !== void 0 || T(61);
|
|
460
|
-
const i =
|
|
460
|
+
const i = Ii || Yn.has(n) || Vn.has(n), s = lt(Q, n);
|
|
461
461
|
if (t === r && !i) {
|
|
462
462
|
if (v(t)) {
|
|
463
463
|
const o = s.__lexicalTextContent;
|
|
@@ -470,112 +470,112 @@ function gt(n, e) {
|
|
|
470
470
|
}
|
|
471
471
|
return s;
|
|
472
472
|
}
|
|
473
|
-
if (t !== r && i &&
|
|
474
|
-
const o =
|
|
475
|
-
return e === null && T(62), e.replaceChild(o, s),
|
|
473
|
+
if (t !== r && i && Nr(kt, vt, _n, r, "updated"), r.updateDOM(t, s, De)) {
|
|
474
|
+
const o = rn(n, null);
|
|
475
|
+
return e === null && T(62), e.replaceChild(o, s), nn(n, null), o;
|
|
476
476
|
}
|
|
477
477
|
if (v(t) && v(r)) {
|
|
478
478
|
const o = r.__indent;
|
|
479
|
-
o !== t.__indent &&
|
|
479
|
+
o !== t.__indent && Ki(s, o);
|
|
480
480
|
const l = r.__format;
|
|
481
|
-
l !== t.__format &&
|
|
481
|
+
l !== t.__format && zi(s, l), i && (so(t, r, s), ne(r) || r.isInline() || Bi(t, r, s)), bn(r) && (J += ke, Se += ke);
|
|
482
482
|
} else {
|
|
483
483
|
const o = r.getTextContent();
|
|
484
484
|
if (z(r)) {
|
|
485
485
|
const l = r.decorate(Q, De);
|
|
486
|
-
l !== null &&
|
|
486
|
+
l !== null && Wi(n, l);
|
|
487
487
|
} else M(r) && !r.isDirectionless() && (X += o);
|
|
488
488
|
J += o, Se += o;
|
|
489
489
|
}
|
|
490
|
-
if (!
|
|
490
|
+
if (!Tt && ne(r) && r.__cachedText !== Se) {
|
|
491
491
|
const o = r.getWritable();
|
|
492
492
|
o.__cachedText = Se, r = o;
|
|
493
493
|
}
|
|
494
494
|
return s;
|
|
495
495
|
}
|
|
496
|
-
function
|
|
496
|
+
function Wi(n, e) {
|
|
497
497
|
let t = Q._pendingDecorators;
|
|
498
498
|
const r = Q._decorators;
|
|
499
499
|
if (t === null) {
|
|
500
500
|
if (r[n] === e) return;
|
|
501
|
-
t =
|
|
501
|
+
t = Cs(Q);
|
|
502
502
|
}
|
|
503
503
|
t[n] = e;
|
|
504
504
|
}
|
|
505
|
-
function
|
|
505
|
+
function On(n) {
|
|
506
506
|
let e = n.nextSibling;
|
|
507
507
|
return e !== null && e === Q._blockCursorElement && (e = e.nextSibling), e;
|
|
508
508
|
}
|
|
509
|
-
function
|
|
510
|
-
J = "", Se = "", X = "",
|
|
509
|
+
function oo(n, e, t, r, i, s) {
|
|
510
|
+
J = "", Se = "", X = "", Ii = r === st, $t = null, Q = t, De = t._config, vt = t._nodes, _n = Q._listeners.mutation, Vn = i, Yn = s, je = n._nodeMap, le = e._nodeMap, Tt = e._readOnly, Hn = new Map(t._keyToDOMMap);
|
|
511
511
|
const o = /* @__PURE__ */ new Map();
|
|
512
|
-
return
|
|
512
|
+
return kt = o, _t("root", null), Q = void 0, vt = void 0, Vn = void 0, Yn = void 0, je = void 0, le = void 0, De = void 0, Hn = void 0, kt = void 0, o;
|
|
513
513
|
}
|
|
514
|
-
function
|
|
515
|
-
const e =
|
|
514
|
+
function Xn(n) {
|
|
515
|
+
const e = Hn.get(n);
|
|
516
516
|
return e === void 0 && T(75, n), e;
|
|
517
517
|
}
|
|
518
518
|
function D(n) {
|
|
519
519
|
return { type: n };
|
|
520
520
|
}
|
|
521
|
-
const
|
|
522
|
-
if (
|
|
523
|
-
if (
|
|
524
|
-
|
|
525
|
-
}),
|
|
521
|
+
const Ji = D("SELECTION_CHANGE_COMMAND"), bl = D("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"), lo = D("CLICK_COMMAND"), on = D("DELETE_CHARACTER_COMMAND"), Vt = D("INSERT_LINE_BREAK_COMMAND"), Wr = D("INSERT_PARAGRAPH_COMMAND"), pt = D("CONTROLLED_TEXT_INSERTION_COMMAND"), Ui = D("PASTE_COMMAND"), Jr = D("REMOVE_TEXT_COMMAND"), ln = D("DELETE_WORD_COMMAND"), an = D("DELETE_LINE_COMMAND"), ze = D("FORMAT_TEXT_COMMAND"), ji = D("UNDO_COMMAND"), $i = D("REDO_COMMAND"), ao = D("KEYDOWN_COMMAND"), co = D("KEY_ARROW_RIGHT_COMMAND"), uo = D("MOVE_TO_END"), fo = D("KEY_ARROW_LEFT_COMMAND"), ho = D("MOVE_TO_START"), go = D("KEY_ARROW_UP_COMMAND"), _o = D("KEY_ARROW_DOWN_COMMAND"), Qn = D("KEY_ENTER_COMMAND"), po = D("KEY_SPACE_COMMAND"), yo = D("KEY_BACKSPACE_COMMAND"), mo = D("KEY_ESCAPE_COMMAND"), xo = D("KEY_DELETE_COMMAND"), Co = D("KEY_TAB_COMMAND"), Nl = D("INSERT_TAB_COMMAND"), wl = D("INDENT_CONTENT_COMMAND"), El = D("OUTDENT_CONTENT_COMMAND"), So = D("DROP_COMMAND"), Ml = D("FORMAT_ELEMENT_COMMAND"), vo = D("DRAGSTART_COMMAND"), ko = D("DRAGOVER_COMMAND"), To = D("DRAGEND_COMMAND"), Vi = D("COPY_COMMAND"), Yi = D("CUT_COMMAND"), Ur = D("SELECT_ALL_COMMAND"), Al = D("CLEAR_EDITOR_COMMAND"), Ol = D("CLEAR_HISTORY_COMMAND"), Dl = D("CAN_REDO_COMMAND"), Pl = D("CAN_UNDO_COMMAND"), bo = D("FOCUS_COMMAND"), No = D("BLUR_COMMAND"), wo = D("KEY_MODIFIER_COMMAND"), me = Object.freeze({}), Zn = 30, er = [["keydown", function(n, e) {
|
|
522
|
+
if (yt = n.timeStamp, Hi = n.key, !e.isComposing() && !E(e, ao, n) && n.key != null) {
|
|
523
|
+
if (Dn && mi(n)) return te(e, () => {
|
|
524
|
+
Rt(e, Pn);
|
|
525
|
+
}), Dn = !1, void (Pn = "");
|
|
526
526
|
if (function(t) {
|
|
527
527
|
return I(t, "ArrowRight", { shiftKey: "any" });
|
|
528
|
-
}(n)) E(e,
|
|
528
|
+
}(n)) E(e, co, n);
|
|
529
529
|
else if (function(t) {
|
|
530
530
|
return I(t, "ArrowRight", Ce);
|
|
531
|
-
}(n)) E(e,
|
|
531
|
+
}(n)) E(e, uo, n);
|
|
532
532
|
else if (function(t) {
|
|
533
533
|
return I(t, "ArrowLeft", { shiftKey: "any" });
|
|
534
|
-
}(n)) E(e,
|
|
534
|
+
}(n)) E(e, fo, n);
|
|
535
535
|
else if (function(t) {
|
|
536
536
|
return I(t, "ArrowLeft", Ce);
|
|
537
|
-
}(n)) E(e,
|
|
537
|
+
}(n)) E(e, ho, n);
|
|
538
538
|
else if (function(t) {
|
|
539
539
|
return I(t, "ArrowUp", { altKey: "any", shiftKey: "any" });
|
|
540
|
-
}(n)) E(e,
|
|
540
|
+
}(n)) E(e, go, n);
|
|
541
541
|
else if (function(t) {
|
|
542
542
|
return I(t, "ArrowDown", { altKey: "any", shiftKey: "any" });
|
|
543
|
-
}(n)) E(e,
|
|
543
|
+
}(n)) E(e, _o, n);
|
|
544
544
|
else if (function(t) {
|
|
545
545
|
return I(t, "Enter", { altKey: "any", ctrlKey: "any", metaKey: "any", shiftKey: !0 });
|
|
546
|
-
}(n))
|
|
546
|
+
}(n)) mt = !0, E(e, Qn, n);
|
|
547
547
|
else if (function(t) {
|
|
548
548
|
return t.key === " ";
|
|
549
|
-
}(n)) E(e,
|
|
549
|
+
}(n)) E(e, po, n);
|
|
550
550
|
else if (function(t) {
|
|
551
551
|
return fe && I(t, "o", { ctrlKey: !0 });
|
|
552
|
-
}(n)) n.preventDefault(),
|
|
552
|
+
}(n)) n.preventDefault(), mt = !0, E(e, Vt, !0);
|
|
553
553
|
else if (function(t) {
|
|
554
554
|
return I(t, "Enter", { altKey: "any", ctrlKey: "any", metaKey: "any" });
|
|
555
|
-
}(n))
|
|
555
|
+
}(n)) mt = !1, E(e, Qn, n);
|
|
556
556
|
else if (function(t) {
|
|
557
557
|
return I(t, "Backspace", { shiftKey: "any" }) || fe && I(t, "h", { ctrlKey: !0 });
|
|
558
|
-
}(n))
|
|
558
|
+
}(n)) mi(n) ? E(e, yo, n) : (n.preventDefault(), E(e, on, !0));
|
|
559
559
|
else if (function(t) {
|
|
560
560
|
return t.key === "Escape";
|
|
561
|
-
}(n)) E(e,
|
|
561
|
+
}(n)) E(e, mo, n);
|
|
562
562
|
else if (function(t) {
|
|
563
563
|
return I(t, "Delete", {}) || fe && I(t, "d", { ctrlKey: !0 });
|
|
564
564
|
}(n)) (function(t) {
|
|
565
565
|
return t.key === "Delete";
|
|
566
|
-
})(n) ? E(e,
|
|
566
|
+
})(n) ? E(e, xo, n) : (n.preventDefault(), E(e, on, !1));
|
|
567
567
|
else if (function(t) {
|
|
568
|
-
return I(t, "Backspace",
|
|
569
|
-
}(n)) n.preventDefault(), E(e,
|
|
568
|
+
return I(t, "Backspace", yi);
|
|
569
|
+
}(n)) n.preventDefault(), E(e, ln, !0);
|
|
570
570
|
else if (function(t) {
|
|
571
|
-
return I(t, "Delete",
|
|
572
|
-
}(n)) n.preventDefault(), E(e,
|
|
571
|
+
return I(t, "Delete", yi);
|
|
572
|
+
}(n)) n.preventDefault(), E(e, ln, !1);
|
|
573
573
|
else if (function(t) {
|
|
574
574
|
return fe && I(t, "Backspace", { metaKey: !0 });
|
|
575
|
-
}(n)) n.preventDefault(), E(e,
|
|
575
|
+
}(n)) n.preventDefault(), E(e, an, !0);
|
|
576
576
|
else if (function(t) {
|
|
577
577
|
return fe && (I(t, "Delete", { metaKey: !0 }) || I(t, "k", { ctrlKey: !0 }));
|
|
578
|
-
}(n)) n.preventDefault(), E(e,
|
|
578
|
+
}(n)) n.preventDefault(), E(e, an, !1);
|
|
579
579
|
else if (function(t) {
|
|
580
580
|
return I(t, "b", Ce);
|
|
581
581
|
}(n)) n.preventDefault(), E(e, ze, "bold");
|
|
@@ -587,65 +587,65 @@ const Wi = D("SELECTION_CHANGE_COMMAND"), Tl = D("SELECTION_INSERT_CLIPBOARD_NOD
|
|
|
587
587
|
}(n)) n.preventDefault(), E(e, ze, "italic");
|
|
588
588
|
else if (function(t) {
|
|
589
589
|
return I(t, "Tab", { shiftKey: "any" });
|
|
590
|
-
}(n)) E(e,
|
|
590
|
+
}(n)) E(e, Co, n);
|
|
591
591
|
else if (function(t) {
|
|
592
592
|
return I(t, "z", Ce);
|
|
593
|
-
}(n)) n.preventDefault(), E(e,
|
|
593
|
+
}(n)) n.preventDefault(), E(e, ji, void 0);
|
|
594
594
|
else if (function(t) {
|
|
595
595
|
return fe ? I(t, "z", { metaKey: !0, shiftKey: !0 }) : I(t, "y", { ctrlKey: !0 }) || I(t, "z", { ctrlKey: !0, shiftKey: !0 });
|
|
596
596
|
}(n)) n.preventDefault(), E(e, $i, void 0);
|
|
597
597
|
else {
|
|
598
598
|
const t = e._editorState._selection;
|
|
599
|
-
t === null || O(t) ?
|
|
599
|
+
t === null || O(t) ? xi(n) && (n.preventDefault(), E(e, Ur, n)) : function(r) {
|
|
600
600
|
return I(r, "c", Ce);
|
|
601
|
-
}(n) ? (n.preventDefault(), E(e,
|
|
601
|
+
}(n) ? (n.preventDefault(), E(e, Vi, n)) : function(r) {
|
|
602
602
|
return I(r, "x", Ce);
|
|
603
|
-
}(n) ? (n.preventDefault(), E(e,
|
|
603
|
+
}(n) ? (n.preventDefault(), E(e, Yi, n)) : xi(n) && (n.preventDefault(), E(e, Ur, n));
|
|
604
604
|
}
|
|
605
605
|
(function(t) {
|
|
606
606
|
return t.ctrlKey || t.shiftKey || t.altKey || t.metaKey;
|
|
607
|
-
})(n) && E(e,
|
|
607
|
+
})(n) && E(e, wo, n);
|
|
608
608
|
}
|
|
609
609
|
}], ["pointerdown", function(n, e) {
|
|
610
610
|
const t = n.target, r = n.pointerType;
|
|
611
|
-
|
|
612
|
-
|
|
611
|
+
Ft(t) && r !== "touch" && r !== "pen" && n.button === 0 && te(e, () => {
|
|
612
|
+
gi(t) || (nr = !0);
|
|
613
613
|
});
|
|
614
614
|
}], ["compositionstart", function(n, e) {
|
|
615
615
|
te(e, () => {
|
|
616
616
|
const t = L();
|
|
617
617
|
if (O(t) && !e.isComposing()) {
|
|
618
618
|
const r = t.anchor, i = t.anchor.getNode();
|
|
619
|
-
H(r.key), (n.timeStamp <
|
|
619
|
+
H(r.key), (n.timeStamp < yt + Zn || r.type === "element" || !t.isCollapsed() || i.getFormat() !== t.format || M(i) && i.getStyle() !== t.style) && E(e, pt, js);
|
|
620
620
|
}
|
|
621
621
|
});
|
|
622
622
|
}], ["compositionend", function(n, e) {
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
}) : (
|
|
623
|
+
We ? gt = !0 : it || !St && !Qt ? te(e, () => {
|
|
624
|
+
Rt(e, n.data);
|
|
625
|
+
}) : (Dn = !0, Pn = n.data);
|
|
626
626
|
}], ["input", function(n, e) {
|
|
627
627
|
n.stopPropagation(), te(e, () => {
|
|
628
|
-
if (ee(n.target) &&
|
|
629
|
-
const t = L(), r = n.data, i =
|
|
630
|
-
if (r != null && O(t) &&
|
|
631
|
-
|
|
628
|
+
if (ee(n.target) && gi(n.target)) return;
|
|
629
|
+
const t = L(), r = n.data, i = Zi(n);
|
|
630
|
+
if (r != null && O(t) && Xi(t, i, r, n.timeStamp, !1)) {
|
|
631
|
+
gt && (Rt(e, r), gt = !1);
|
|
632
632
|
const s = t.anchor.getNode(), o = Te(oe(e));
|
|
633
633
|
if (o === null) return;
|
|
634
634
|
const l = t.isBackward(), a = l ? t.anchor.offset : t.focus.offset, c = l ? t.focus.offset : t.anchor.offset;
|
|
635
|
-
|
|
635
|
+
Xt && !t.isCollapsed() && M(s) && o.anchorNode !== null && s.getTextContent().slice(0, a) + r + s.getTextContent().slice(a + c) === Ts(o.anchorNode) || E(e, pt, r);
|
|
636
636
|
const u = r.length;
|
|
637
|
-
|
|
637
|
+
We && u > 1 && n.inputType === "insertCompositionText" && !e.isComposing() && (t.anchor.offset -= u), St || it || Qt || !e.isComposing() || (yt = 0, H(null));
|
|
638
638
|
} else
|
|
639
|
-
|
|
639
|
+
Tr(!1, e, r !== null ? r : void 0), gt && (Rt(e, r || void 0), gt = !1);
|
|
640
640
|
(function() {
|
|
641
641
|
G();
|
|
642
642
|
const s = R();
|
|
643
|
-
|
|
643
|
+
Fi(s);
|
|
644
644
|
})();
|
|
645
|
-
}, { event: n }),
|
|
645
|
+
}, { event: n }), Ze = null;
|
|
646
646
|
}], ["click", function(n, e) {
|
|
647
647
|
te(e, () => {
|
|
648
|
-
const t = L(), r = Te(oe(e)), i =
|
|
648
|
+
const t = L(), r = Te(oe(e)), i = ft();
|
|
649
649
|
if (r) {
|
|
650
650
|
if (O(t)) {
|
|
651
651
|
const s = t.anchor, o = s.getNode();
|
|
@@ -663,41 +663,41 @@ const Wi = D("SELECTION_CHANGE_COMMAND"), Tl = D("SELECTION_INSERT_CLIPBOARD_NOD
|
|
|
663
663
|
}
|
|
664
664
|
} else if (n.pointerType === "touch" || n.pointerType === "pen") {
|
|
665
665
|
const s = r.anchorNode;
|
|
666
|
-
(ee(s) || be(s)) && ie(
|
|
666
|
+
(ee(s) || be(s)) && ie(mn(i, r, e, n));
|
|
667
667
|
}
|
|
668
668
|
}
|
|
669
|
-
E(e,
|
|
669
|
+
E(e, lo, n);
|
|
670
670
|
});
|
|
671
671
|
}], ["cut", me], ["copy", me], ["dragstart", me], ["dragover", me], ["dragend", me], ["paste", me], ["focus", me], ["blur", me], ["drop", me]];
|
|
672
|
-
|
|
673
|
-
const i = t.inputType, s =
|
|
674
|
-
i === "deleteCompositionText" ||
|
|
672
|
+
Xt && er.push(["beforeinput", (n, e) => function(t, r) {
|
|
673
|
+
const i = t.inputType, s = Zi(t);
|
|
674
|
+
i === "deleteCompositionText" || We && bs(r) || i !== "insertCompositionText" && te(r, () => {
|
|
675
675
|
const o = L();
|
|
676
676
|
if (i === "deleteContentBackward") {
|
|
677
677
|
if (o === null) {
|
|
678
|
-
const g =
|
|
678
|
+
const g = ft();
|
|
679
679
|
if (!O(g)) return;
|
|
680
680
|
ie(g.clone());
|
|
681
681
|
}
|
|
682
682
|
if (O(o)) {
|
|
683
683
|
const g = o.anchor.key === o.focus.key;
|
|
684
|
-
if (l = t.timeStamp,
|
|
685
|
-
if (H(null),
|
|
684
|
+
if (l = t.timeStamp, Hi === "MediaLast" && l < yt + Zn && r.isComposing() && g) {
|
|
685
|
+
if (H(null), yt = 0, setTimeout(() => {
|
|
686
686
|
te(r, () => {
|
|
687
687
|
H(null);
|
|
688
688
|
});
|
|
689
|
-
},
|
|
689
|
+
}, Zn), O(o)) {
|
|
690
690
|
const d = o.anchor.getNode();
|
|
691
|
-
d.markDirty(), M(d) || T(142),
|
|
691
|
+
d.markDirty(), M(d) || T(142), Qi(o, d);
|
|
692
692
|
}
|
|
693
693
|
} else {
|
|
694
694
|
H(null), t.preventDefault();
|
|
695
695
|
const d = o.anchor.getNode(), _ = d.getTextContent(), p = d.canInsertTextAfter(), x = o.anchor.offset === 0 && o.focus.offset === _.length;
|
|
696
|
-
let y =
|
|
697
|
-
if (y && o.isCollapsed() && (y = !z(
|
|
698
|
-
E(r,
|
|
696
|
+
let y = Fr && g && !x && p;
|
|
697
|
+
if (y && o.isCollapsed() && (y = !z(Xo(o.anchor, !0))), !y) {
|
|
698
|
+
E(r, on, !0);
|
|
699
699
|
const m = L();
|
|
700
|
-
|
|
700
|
+
Fr && O(m) && m.isCollapsed() && (Ke = m, setTimeout(() => Ke = null));
|
|
701
701
|
}
|
|
702
702
|
}
|
|
703
703
|
return;
|
|
@@ -706,53 +706,53 @@ Gt && Zn.push(["beforeinput", (n, e) => function(t, r) {
|
|
|
706
706
|
var l;
|
|
707
707
|
if (!O(o)) return;
|
|
708
708
|
const a = t.data;
|
|
709
|
-
|
|
709
|
+
Ze !== null && Tr(!1, r, Ze), o.dirty && Ze === null || !o.isCollapsed() || ne(o.anchor.getNode()) || s === null || o.applyDOMRange(s), Ze = null;
|
|
710
710
|
const c = o.anchor, u = o.focus, h = c.getNode(), f = u.getNode();
|
|
711
711
|
if (i !== "insertText" && i !== "insertTranspose") switch (t.preventDefault(), i) {
|
|
712
712
|
case "insertFromYank":
|
|
713
713
|
case "insertFromDrop":
|
|
714
714
|
case "insertReplacementText":
|
|
715
|
-
E(r,
|
|
715
|
+
E(r, pt, t);
|
|
716
716
|
break;
|
|
717
717
|
case "insertFromComposition":
|
|
718
|
-
H(null), E(r,
|
|
718
|
+
H(null), E(r, pt, t);
|
|
719
719
|
break;
|
|
720
720
|
case "insertLineBreak":
|
|
721
|
-
H(null), E(r,
|
|
721
|
+
H(null), E(r, Vt, !1);
|
|
722
722
|
break;
|
|
723
723
|
case "insertParagraph":
|
|
724
|
-
H(null),
|
|
724
|
+
H(null), mt && !it ? (mt = !1, E(r, Vt, !1)) : E(r, Wr, void 0);
|
|
725
725
|
break;
|
|
726
726
|
case "insertFromPaste":
|
|
727
727
|
case "insertFromPasteAsQuotation":
|
|
728
|
-
E(r,
|
|
728
|
+
E(r, Ui, t);
|
|
729
729
|
break;
|
|
730
730
|
case "deleteByComposition":
|
|
731
731
|
(function(g, d) {
|
|
732
|
-
return g !== d || v(g) || v(d) || !g
|
|
733
|
-
})(h, f) && E(r,
|
|
732
|
+
return g !== d || v(g) || v(d) || !Be(g) || !Be(d);
|
|
733
|
+
})(h, f) && E(r, Jr, t);
|
|
734
734
|
break;
|
|
735
735
|
case "deleteByDrag":
|
|
736
736
|
case "deleteByCut":
|
|
737
|
-
E(r,
|
|
737
|
+
E(r, Jr, t);
|
|
738
738
|
break;
|
|
739
739
|
case "deleteContent":
|
|
740
|
-
E(r,
|
|
740
|
+
E(r, on, !1);
|
|
741
741
|
break;
|
|
742
742
|
case "deleteWordBackward":
|
|
743
|
-
E(r,
|
|
743
|
+
E(r, ln, !0);
|
|
744
744
|
break;
|
|
745
745
|
case "deleteWordForward":
|
|
746
|
-
E(r,
|
|
746
|
+
E(r, ln, !1);
|
|
747
747
|
break;
|
|
748
748
|
case "deleteHardLineBackward":
|
|
749
749
|
case "deleteSoftLineBackward":
|
|
750
|
-
E(r,
|
|
750
|
+
E(r, an, !0);
|
|
751
751
|
break;
|
|
752
752
|
case "deleteContentForward":
|
|
753
753
|
case "deleteHardLineForward":
|
|
754
754
|
case "deleteSoftLineForward":
|
|
755
|
-
E(r,
|
|
755
|
+
E(r, an, !1);
|
|
756
756
|
break;
|
|
757
757
|
case "formatStrikeThrough":
|
|
758
758
|
E(r, ze, "strikethrough");
|
|
@@ -767,46 +767,46 @@ Gt && Zn.push(["beforeinput", (n, e) => function(t, r) {
|
|
|
767
767
|
E(r, ze, "underline");
|
|
768
768
|
break;
|
|
769
769
|
case "historyUndo":
|
|
770
|
-
E(r,
|
|
770
|
+
E(r, ji, void 0);
|
|
771
771
|
break;
|
|
772
772
|
case "historyRedo":
|
|
773
773
|
E(r, $i, void 0);
|
|
774
774
|
}
|
|
775
775
|
else {
|
|
776
776
|
if (a === `
|
|
777
|
-
`) t.preventDefault(), E(r,
|
|
778
|
-
else if (a === ke) t.preventDefault(), E(r,
|
|
777
|
+
`) t.preventDefault(), E(r, Vt, !1);
|
|
778
|
+
else if (a === ke) t.preventDefault(), E(r, Wr, void 0);
|
|
779
779
|
else if (a == null && t.dataTransfer) {
|
|
780
780
|
const g = t.dataTransfer.getData("text/plain");
|
|
781
781
|
t.preventDefault(), o.insertRawText(g);
|
|
782
|
-
} else a != null &&
|
|
783
|
-
|
|
782
|
+
} else a != null && Xi(o, s, a, t.timeStamp, !0) ? (t.preventDefault(), E(r, pt, a)) : Ze = a;
|
|
783
|
+
qi = t.timeStamp;
|
|
784
784
|
}
|
|
785
785
|
});
|
|
786
786
|
}(n, e)]);
|
|
787
|
-
let
|
|
788
|
-
const
|
|
789
|
-
let
|
|
790
|
-
function
|
|
787
|
+
let yt = 0, Hi = null, qi = 0, Ze = null;
|
|
788
|
+
const cn = /* @__PURE__ */ new WeakMap();
|
|
789
|
+
let tr = !1, nr = !1, mt = !1, gt = !1, Dn = !1, Pn = "", Ke = null, Gi = [0, "", 0, "root", 0];
|
|
790
|
+
function Xi(n, e, t, r, i) {
|
|
791
791
|
const s = n.anchor, o = n.focus, l = s.getNode(), a = R(), c = Te(oe(a)), u = c !== null ? c.anchorNode : null, h = s.key, f = a.getElementByKey(h), g = t.length;
|
|
792
|
-
return h !== o.key || !M(l) || (!i && (!
|
|
792
|
+
return h !== o.key || !M(l) || (!i && (!Xt || qi < r + 50) || l.isDirty() && g < 2 || vs(t)) && s.offset !== o.offset && !l.isComposing() || we(l) || l.isDirty() && g > 1 || (i || !Xt) && f !== null && !l.isComposing() && u !== ot(f) || c !== null && e !== null && (!e.collapsed || e.startContainer !== c.anchorNode || e.startOffset !== c.anchorOffset) || l.getFormat() !== n.format || l.getStyle() !== n.style || function(d, _) {
|
|
793
793
|
if (_.isSegmented()) return !0;
|
|
794
794
|
if (!d.isCollapsed()) return !1;
|
|
795
|
-
const p = d.anchor.offset, x = _.getParentOrThrow(), y = _
|
|
795
|
+
const p = d.anchor.offset, x = _.getParentOrThrow(), y = Be(_);
|
|
796
796
|
return p === 0 ? !_.canInsertTextBefore() || !x.canInsertTextBefore() && !_.isComposing() || y || function(m) {
|
|
797
797
|
const b = m.getPreviousSibling();
|
|
798
798
|
return (M(b) || v(b) && b.isInline()) && !b.canInsertTextAfter();
|
|
799
799
|
}(_) : p === _.getTextContentSize() && (!_.canInsertTextAfter() || !x.canInsertTextAfter() && !_.isComposing() || y);
|
|
800
800
|
}(n, l);
|
|
801
801
|
}
|
|
802
|
-
function
|
|
802
|
+
function jr(n, e) {
|
|
803
803
|
return be(n) && n.nodeValue !== null && e !== 0 && e !== n.nodeValue.length;
|
|
804
804
|
}
|
|
805
805
|
function $r(n, e, t) {
|
|
806
806
|
const { anchorNode: r, anchorOffset: i, focusNode: s, focusOffset: o } = n;
|
|
807
|
-
|
|
807
|
+
tr && (tr = !1, jr(r, i) && jr(s, o) && !Ke) || te(e, () => {
|
|
808
808
|
if (!t) return void ie(null);
|
|
809
|
-
if (!
|
|
809
|
+
if (!vn(e, r, s)) return;
|
|
810
810
|
let l = L();
|
|
811
811
|
if (Ke && O(l) && l.isCollapsed()) {
|
|
812
812
|
const a = l.anchor, c = Ke.anchor;
|
|
@@ -816,20 +816,20 @@ function $r(n, e, t) {
|
|
|
816
816
|
const a = l.anchor, c = a.getNode();
|
|
817
817
|
if (l.isCollapsed()) {
|
|
818
818
|
n.type === "Range" && n.anchorNode === n.focusNode && (l.dirty = !0);
|
|
819
|
-
const u = oe(e).event, h = u ? u.timeStamp : performance.now(), [f, g, d, _, p] =
|
|
820
|
-
if (h < p + 200 && a.offset === d && a.key === _)
|
|
821
|
-
else if (a.type === "text") M(c) || T(141),
|
|
819
|
+
const u = oe(e).event, h = u ? u.timeStamp : performance.now(), [f, g, d, _, p] = Gi, x = re(), y = e.isComposing() === !1 && x.getTextContent() === "";
|
|
820
|
+
if (h < p + 200 && a.offset === d && a.key === _) Yt(l, f, g);
|
|
821
|
+
else if (a.type === "text") M(c) || T(141), Qi(l, c);
|
|
822
822
|
else if (a.type === "element" && !y) {
|
|
823
823
|
v(c) || T(259);
|
|
824
824
|
const m = a.getNode();
|
|
825
825
|
m.isEmpty() ? function(b, N) {
|
|
826
826
|
const C = N.getTextFormat(), w = N.getTextStyle();
|
|
827
|
-
|
|
828
|
-
}(l, m) :
|
|
827
|
+
Yt(b, C, w);
|
|
828
|
+
}(l, m) : Yt(l, 0, "");
|
|
829
829
|
}
|
|
830
830
|
} else {
|
|
831
831
|
const u = a.key, h = l.focus.key, f = l.getNodes(), g = f.length, d = l.isBackward(), _ = d ? o : i, p = d ? i : o, x = d ? h : u, y = d ? u : h;
|
|
832
|
-
let m =
|
|
832
|
+
let m = Us, b = !1;
|
|
833
833
|
for (let N = 0; N < g; N++) {
|
|
834
834
|
const C = f[N], w = C.getTextContentSize();
|
|
835
835
|
if (M(C) && w !== 0 && !(N === 0 && C.__key === x && _ === w || N === g - 1 && C.__key === y && p === 0) && (b = !0, m &= C.getFormat(), m === 0)) break;
|
|
@@ -837,78 +837,78 @@ function $r(n, e, t) {
|
|
|
837
837
|
l.format = b ? m : 0;
|
|
838
838
|
}
|
|
839
839
|
}
|
|
840
|
-
E(e,
|
|
840
|
+
E(e, Ji, void 0);
|
|
841
841
|
});
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function Yt(n, e, t) {
|
|
844
844
|
n.format === e && n.style === t || (n.format = e, n.style = t, n.dirty = !0);
|
|
845
845
|
}
|
|
846
|
-
function
|
|
847
|
-
|
|
846
|
+
function Qi(n, e) {
|
|
847
|
+
Yt(n, e.getFormat(), e.getStyle());
|
|
848
848
|
}
|
|
849
|
-
function
|
|
849
|
+
function Zi(n) {
|
|
850
850
|
if (!n.getTargetRanges) return null;
|
|
851
851
|
const e = n.getTargetRanges();
|
|
852
852
|
return e.length === 0 ? null : e[0];
|
|
853
853
|
}
|
|
854
|
-
function
|
|
854
|
+
function Rt(n, e) {
|
|
855
855
|
const t = n._compositionKey;
|
|
856
856
|
if (H(null), t !== null && e != null) {
|
|
857
857
|
if (e === "") {
|
|
858
|
-
const r =
|
|
859
|
-
return void (i !== null && i.nodeValue !== null && M(r) &&
|
|
858
|
+
const r = $(t), i = ot(n.getElementByKey(t));
|
|
859
|
+
return void (i !== null && i.nodeValue !== null && M(r) && br(r, i.nodeValue, null, null, !0));
|
|
860
860
|
}
|
|
861
861
|
if (e[e.length - 1] === `
|
|
862
862
|
`) {
|
|
863
863
|
const r = L();
|
|
864
864
|
if (O(r)) {
|
|
865
865
|
const i = r.focus;
|
|
866
|
-
return r.anchor.set(i.key, i.offset, i.type), void E(n,
|
|
866
|
+
return r.anchor.set(i.key, i.offset, i.type), void E(n, Qn, null);
|
|
867
867
|
}
|
|
868
868
|
}
|
|
869
869
|
}
|
|
870
|
-
|
|
870
|
+
Tr(!0, n, e);
|
|
871
871
|
}
|
|
872
|
-
function
|
|
872
|
+
function es(n) {
|
|
873
873
|
let e = n.__lexicalEventHandles;
|
|
874
874
|
return e === void 0 && (e = [], n.__lexicalEventHandles = e), e;
|
|
875
875
|
}
|
|
876
|
-
const
|
|
877
|
-
function
|
|
878
|
-
const e =
|
|
876
|
+
const tt = /* @__PURE__ */ new Map();
|
|
877
|
+
function ts(n) {
|
|
878
|
+
const e = rl(n.target);
|
|
879
879
|
if (e === null) return;
|
|
880
|
-
const t =
|
|
880
|
+
const t = ys(e.anchorNode);
|
|
881
881
|
if (t === null) return;
|
|
882
|
-
|
|
883
|
-
const a =
|
|
884
|
-
(ee(c) || be(c)) && ie(
|
|
882
|
+
nr && (nr = !1, te(t, () => {
|
|
883
|
+
const a = ft(), c = e.anchorNode;
|
|
884
|
+
(ee(c) || be(c)) && ie(mn(a, e, t, n));
|
|
885
885
|
}));
|
|
886
|
-
const r =
|
|
887
|
-
l !== t && $r(e, l, !1), $r(e, t, !0), t !== i ?
|
|
886
|
+
const r = kr(t), i = r[r.length - 1], s = i._key, o = tt.get(s), l = o || i;
|
|
887
|
+
l !== t && $r(e, l, !1), $r(e, t, !0), t !== i ? tt.set(s, t) : o && tt.delete(s);
|
|
888
888
|
}
|
|
889
|
-
function
|
|
889
|
+
function Vr(n) {
|
|
890
890
|
n._lexicalHandled = !0;
|
|
891
891
|
}
|
|
892
|
-
function
|
|
892
|
+
function Yr(n) {
|
|
893
893
|
return n._lexicalHandled === !0;
|
|
894
894
|
}
|
|
895
|
-
function
|
|
896
|
-
const e = n.ownerDocument, t =
|
|
895
|
+
function Eo(n) {
|
|
896
|
+
const e = n.ownerDocument, t = cn.get(e);
|
|
897
897
|
if (t === void 0) return;
|
|
898
898
|
const r = t - 1;
|
|
899
|
-
r >= 0 || T(164),
|
|
900
|
-
const i =
|
|
901
|
-
|
|
899
|
+
r >= 0 || T(164), cn.set(e, r), r === 0 && e.removeEventListener("selectionchange", ts);
|
|
900
|
+
const i = kn(n);
|
|
901
|
+
Sr(i) ? (function(o) {
|
|
902
902
|
if (o._parentEditor !== null) {
|
|
903
|
-
const l =
|
|
904
|
-
|
|
905
|
-
} else
|
|
903
|
+
const l = kr(o), a = l[l.length - 1]._key;
|
|
904
|
+
tt.get(a) === o && tt.delete(a);
|
|
905
|
+
} else tt.delete(o._key);
|
|
906
906
|
}(i), n.__lexicalEditor = null) : i && T(198);
|
|
907
|
-
const s =
|
|
907
|
+
const s = es(n);
|
|
908
908
|
for (let o = 0; o < s.length; o++) s[o]();
|
|
909
909
|
n.__lexicalEventHandles = [];
|
|
910
910
|
}
|
|
911
|
-
function
|
|
911
|
+
function rr(n, e, t) {
|
|
912
912
|
G();
|
|
913
913
|
const r = n.__key, i = n.getParent();
|
|
914
914
|
if (i === null) return;
|
|
@@ -916,20 +916,20 @@ function nr(n, e, t) {
|
|
|
916
916
|
const a = L();
|
|
917
917
|
if (!O(a) || !v(l)) return a;
|
|
918
918
|
const { anchor: c, focus: u } = a, h = c.getNode(), f = u.getNode();
|
|
919
|
-
return
|
|
919
|
+
return ir(h, l) && c.set(l.__key, 0, "element"), ir(f, l) && u.set(l.__key, 0, "element"), a;
|
|
920
920
|
}(n);
|
|
921
921
|
let o = !1;
|
|
922
922
|
if (O(s) && e) {
|
|
923
923
|
const l = s.anchor, a = s.focus;
|
|
924
|
-
l.key === r && (
|
|
925
|
-
} else
|
|
924
|
+
l.key === r && (fn(l, n, i, n.getPreviousSibling(), n.getNextSibling()), o = !0), a.key === r && (fn(a, n, i, n.getPreviousSibling(), n.getNextSibling()), o = !0);
|
|
925
|
+
} else yr(s) && e && n.isSelected() && n.selectPrevious();
|
|
926
926
|
if (O(s) && e && !o) {
|
|
927
927
|
const l = n.getIndexWithinParent();
|
|
928
|
-
|
|
929
|
-
} else
|
|
930
|
-
t || Le(i) || i.canBeEmpty() || !i.isEmpty() ||
|
|
928
|
+
Re(n), un(s, i, l, -1);
|
|
929
|
+
} else Re(n);
|
|
930
|
+
t || Le(i) || i.canBeEmpty() || !i.isEmpty() || rr(i, e), e && s && ne(i) && i.isEmpty() && i.selectEnd();
|
|
931
931
|
}
|
|
932
|
-
class
|
|
932
|
+
class pn {
|
|
933
933
|
static getType() {
|
|
934
934
|
T(64, this.name);
|
|
935
935
|
}
|
|
@@ -940,7 +940,7 @@ class _n {
|
|
|
940
940
|
this.__parent = e.__parent, this.__next = e.__next, this.__prev = e.__prev, this.__state = e.__state;
|
|
941
941
|
}
|
|
942
942
|
constructor(e) {
|
|
943
|
-
this.__type = this.constructor.getType(), this.__parent = null, this.__prev = null, this.__next = null, Object.defineProperty(this, "__state", { configurable: !0, enumerable: !1, value: void 0, writable: !0 }),
|
|
943
|
+
this.__type = this.constructor.getType(), this.__parent = null, this.__prev = null, this.__next = null, Object.defineProperty(this, "__state", { configurable: !0, enumerable: !1, value: void 0, writable: !0 }), ms(this, e);
|
|
944
944
|
}
|
|
945
945
|
getType() {
|
|
946
946
|
return this.__type;
|
|
@@ -952,7 +952,7 @@ class _n {
|
|
|
952
952
|
let e = this.__key;
|
|
953
953
|
for (; e !== null; ) {
|
|
954
954
|
if (e === "root") return !0;
|
|
955
|
-
const t =
|
|
955
|
+
const t = $(e);
|
|
956
956
|
if (t === null) break;
|
|
957
957
|
e = t.__parent;
|
|
958
958
|
}
|
|
@@ -988,7 +988,7 @@ class _n {
|
|
|
988
988
|
}
|
|
989
989
|
getParent() {
|
|
990
990
|
const e = this.getLatest().__parent;
|
|
991
|
-
return e === null ? null :
|
|
991
|
+
return e === null ? null : $(e);
|
|
992
992
|
}
|
|
993
993
|
getParentOrThrow() {
|
|
994
994
|
const e = this.getParent();
|
|
@@ -1021,7 +1021,7 @@ class _n {
|
|
|
1021
1021
|
}
|
|
1022
1022
|
getPreviousSibling() {
|
|
1023
1023
|
const e = this.getLatest().__prev;
|
|
1024
|
-
return e === null ? null :
|
|
1024
|
+
return e === null ? null : $(e);
|
|
1025
1025
|
}
|
|
1026
1026
|
getPreviousSiblings() {
|
|
1027
1027
|
const e = [], t = this.getParent();
|
|
@@ -1032,7 +1032,7 @@ class _n {
|
|
|
1032
1032
|
}
|
|
1033
1033
|
getNextSibling() {
|
|
1034
1034
|
const e = this.getLatest().__next;
|
|
1035
|
-
return e === null ? null :
|
|
1035
|
+
return e === null ? null : $(e);
|
|
1036
1036
|
}
|
|
1037
1037
|
getNextSiblings() {
|
|
1038
1038
|
const e = [];
|
|
@@ -1041,18 +1041,18 @@ class _n {
|
|
|
1041
1041
|
return e;
|
|
1042
1042
|
}
|
|
1043
1043
|
getCommonAncestor(e) {
|
|
1044
|
-
const t = v(this) ? this : this.getParent(), r = v(e) ? e : e.getParent(), i = t && r ?
|
|
1044
|
+
const t = v(this) ? this : this.getParent(), r = v(e) ? e : e.getParent(), i = t && r ? qt(t, r) : null;
|
|
1045
1045
|
return i ? i.commonAncestor : null;
|
|
1046
1046
|
}
|
|
1047
1047
|
is(e) {
|
|
1048
1048
|
return e != null && this.__key === e.__key;
|
|
1049
1049
|
}
|
|
1050
1050
|
isBefore(e) {
|
|
1051
|
-
const t =
|
|
1052
|
-
return t !== null && (t.type === "descendant" || (t.type === "branch" ?
|
|
1051
|
+
const t = qt(this, e);
|
|
1052
|
+
return t !== null && (t.type === "descendant" || (t.type === "branch" ? As(t) === -1 : (t.type !== "same" && t.type !== "ancestor" && T(279), !1)));
|
|
1053
1053
|
}
|
|
1054
1054
|
isParentOf(e) {
|
|
1055
|
-
const t =
|
|
1055
|
+
const t = qt(this, e);
|
|
1056
1056
|
return t !== null && t.type === "ancestor";
|
|
1057
1057
|
}
|
|
1058
1058
|
getNodesBetween(e) {
|
|
@@ -1087,15 +1087,15 @@ class _n {
|
|
|
1087
1087
|
return e !== null && e.has(this.__key);
|
|
1088
1088
|
}
|
|
1089
1089
|
getLatest() {
|
|
1090
|
-
const e =
|
|
1090
|
+
const e = $(this.__key);
|
|
1091
1091
|
return e === null && T(113), e;
|
|
1092
1092
|
}
|
|
1093
1093
|
getWritable() {
|
|
1094
1094
|
G();
|
|
1095
1095
|
const e = Fe(), t = R(), r = e._nodeMap, i = this.__key, s = this.getLatest(), o = t._cloneNotNeeded, l = L();
|
|
1096
|
-
if (l !== null && l.setCachedNodes(null), o.has(i)) return
|
|
1097
|
-
const a =
|
|
1098
|
-
return o.add(i),
|
|
1096
|
+
if (l !== null && l.setCachedNodes(null), o.has(i)) return hn(s), s;
|
|
1097
|
+
const a = ll(s);
|
|
1098
|
+
return o.add(i), hn(a), r.set(i, a), a;
|
|
1099
1099
|
}
|
|
1100
1100
|
getTextContent() {
|
|
1101
1101
|
return "";
|
|
@@ -1122,38 +1122,38 @@ class _n {
|
|
|
1122
1122
|
updateFromJSON(e) {
|
|
1123
1123
|
return function(t, r) {
|
|
1124
1124
|
const i = t.getWritable();
|
|
1125
|
-
return (r || i.__state) &&
|
|
1125
|
+
return (r || i.__state) && ro(t).updateFromJSON(r), i;
|
|
1126
1126
|
}(this, e.$);
|
|
1127
1127
|
}
|
|
1128
1128
|
static transform() {
|
|
1129
1129
|
return null;
|
|
1130
1130
|
}
|
|
1131
1131
|
remove(e) {
|
|
1132
|
-
|
|
1132
|
+
rr(this, !0, e);
|
|
1133
1133
|
}
|
|
1134
1134
|
replace(e, t) {
|
|
1135
1135
|
G();
|
|
1136
1136
|
let r = L();
|
|
1137
|
-
r !== null && (r = r.clone()),
|
|
1137
|
+
r !== null && (r = r.clone()), Rn(this, e);
|
|
1138
1138
|
const i = this.getLatest(), s = this.__key, o = e.__key, l = e.getWritable(), a = this.getParentOrThrow().getWritable(), c = a.__size;
|
|
1139
|
-
|
|
1139
|
+
Re(l);
|
|
1140
1140
|
const u = i.getPreviousSibling(), h = i.getNextSibling(), f = i.__prev, g = i.__next, d = i.__parent;
|
|
1141
|
-
if (
|
|
1141
|
+
if (rr(i, !1, !0), u === null ? a.__first = o : u.getWritable().__next = o, l.__prev = f, h === null ? a.__last = o : h.getWritable().__prev = o, l.__next = g, l.__parent = d, a.__size = c, t && (v(this) && v(l) || T(139), this.getChildren().forEach((_) => {
|
|
1142
1142
|
l.append(_);
|
|
1143
1143
|
})), O(r)) {
|
|
1144
1144
|
ie(r);
|
|
1145
1145
|
const _ = r.anchor, p = r.focus;
|
|
1146
|
-
_.key === s &&
|
|
1146
|
+
_.key === s && Xr(_, l), p.key === s && Xr(p, l);
|
|
1147
1147
|
}
|
|
1148
|
-
return
|
|
1148
|
+
return Me() === s && H(o), l;
|
|
1149
1149
|
}
|
|
1150
1150
|
insertAfter(e, t = !0) {
|
|
1151
|
-
G(),
|
|
1151
|
+
G(), Rn(this, e);
|
|
1152
1152
|
const r = this.getWritable(), i = e.getWritable(), s = i.getParent(), o = L();
|
|
1153
1153
|
let l = !1, a = !1;
|
|
1154
1154
|
if (s !== null) {
|
|
1155
1155
|
const g = e.getIndexWithinParent();
|
|
1156
|
-
if (
|
|
1156
|
+
if (Re(i), O(o)) {
|
|
1157
1157
|
const d = s.__key, _ = o.anchor, p = o.focus;
|
|
1158
1158
|
l = _.type === "element" && _.key === d && _.offset === g + 1, a = p.type === "element" && p.key === d && p.offset === g + 1;
|
|
1159
1159
|
}
|
|
@@ -1161,20 +1161,20 @@ class _n {
|
|
|
1161
1161
|
const c = this.getNextSibling(), u = this.getParentOrThrow().getWritable(), h = i.__key, f = r.__next;
|
|
1162
1162
|
if (c === null ? u.__last = h : c.getWritable().__prev = h, u.__size++, r.__next = h, i.__next = f, i.__prev = r.__key, i.__parent = r.__parent, t && O(o)) {
|
|
1163
1163
|
const g = this.getIndexWithinParent();
|
|
1164
|
-
|
|
1164
|
+
un(o, u, g + 1);
|
|
1165
1165
|
const d = u.__key;
|
|
1166
1166
|
l && o.anchor.set(d, g + 2, "element"), a && o.focus.set(d, g + 2, "element");
|
|
1167
1167
|
}
|
|
1168
1168
|
return e;
|
|
1169
1169
|
}
|
|
1170
1170
|
insertBefore(e, t = !0) {
|
|
1171
|
-
G(),
|
|
1171
|
+
G(), Rn(this, e);
|
|
1172
1172
|
const r = this.getWritable(), i = e.getWritable(), s = i.__key;
|
|
1173
|
-
|
|
1173
|
+
Re(i);
|
|
1174
1174
|
const o = this.getPreviousSibling(), l = this.getParentOrThrow().getWritable(), a = r.__prev, c = this.getIndexWithinParent();
|
|
1175
1175
|
o === null ? l.__first = s : o.getWritable().__next = s, l.__size++, r.__prev = s, i.__prev = a, i.__next = r.__key, i.__parent = r.__parent;
|
|
1176
1176
|
const u = L();
|
|
1177
|
-
return t && O(u) &&
|
|
1177
|
+
return t && O(u) && un(u, this.getParentOrThrow(), c), e;
|
|
1178
1178
|
}
|
|
1179
1179
|
isParentRequired() {
|
|
1180
1180
|
return !1;
|
|
@@ -1217,12 +1217,12 @@ class _n {
|
|
|
1217
1217
|
this.markDirty();
|
|
1218
1218
|
}
|
|
1219
1219
|
}
|
|
1220
|
-
class
|
|
1220
|
+
class Et extends pn {
|
|
1221
1221
|
static getType() {
|
|
1222
1222
|
return "linebreak";
|
|
1223
1223
|
}
|
|
1224
1224
|
static clone(e) {
|
|
1225
|
-
return new
|
|
1225
|
+
return new Et(e.__key);
|
|
1226
1226
|
}
|
|
1227
1227
|
constructor(e) {
|
|
1228
1228
|
super(e);
|
|
@@ -1243,57 +1243,57 @@ class wt extends _n {
|
|
|
1243
1243
|
static importDOM() {
|
|
1244
1244
|
return { br: (e) => function(t) {
|
|
1245
1245
|
const r = t.parentElement;
|
|
1246
|
-
if (r !== null &&
|
|
1246
|
+
if (r !== null && Si(r)) {
|
|
1247
1247
|
const i = r.firstChild;
|
|
1248
|
-
if (i === t || i.nextSibling === t &&
|
|
1248
|
+
if (i === t || i.nextSibling === t && Wt(i)) {
|
|
1249
1249
|
const s = r.lastChild;
|
|
1250
|
-
if (s === t || s.previousSibling === t &&
|
|
1250
|
+
if (s === t || s.previousSibling === t && Wt(s)) return !0;
|
|
1251
1251
|
}
|
|
1252
1252
|
}
|
|
1253
1253
|
return !1;
|
|
1254
1254
|
}(e) || function(t) {
|
|
1255
1255
|
const r = t.parentElement;
|
|
1256
|
-
if (r !== null &&
|
|
1256
|
+
if (r !== null && Si(r)) {
|
|
1257
1257
|
const i = r.firstChild;
|
|
1258
|
-
if (i === t || i.nextSibling === t &&
|
|
1258
|
+
if (i === t || i.nextSibling === t && Wt(i)) return !1;
|
|
1259
1259
|
const s = r.lastChild;
|
|
1260
|
-
if (s === t || s.previousSibling === t &&
|
|
1260
|
+
if (s === t || s.previousSibling === t && Wt(s)) return !0;
|
|
1261
1261
|
}
|
|
1262
1262
|
return !1;
|
|
1263
|
-
}(e) ? null : { conversion:
|
|
1263
|
+
}(e) ? null : { conversion: Mo, priority: 0 } };
|
|
1264
1264
|
}
|
|
1265
1265
|
static importJSON(e) {
|
|
1266
|
-
return
|
|
1266
|
+
return bt().updateFromJSON(e);
|
|
1267
1267
|
}
|
|
1268
1268
|
}
|
|
1269
|
-
function
|
|
1270
|
-
return { node:
|
|
1269
|
+
function Mo(n) {
|
|
1270
|
+
return { node: bt() };
|
|
1271
1271
|
}
|
|
1272
|
-
function
|
|
1273
|
-
return
|
|
1272
|
+
function bt() {
|
|
1273
|
+
return Nn(new Et());
|
|
1274
1274
|
}
|
|
1275
|
-
function
|
|
1276
|
-
return n instanceof
|
|
1275
|
+
function nt(n) {
|
|
1276
|
+
return n instanceof Et;
|
|
1277
1277
|
}
|
|
1278
|
-
function
|
|
1278
|
+
function Wt(n) {
|
|
1279
1279
|
return be(n) && /^( |\t|\r?\n)+$/.test(n.textContent || "");
|
|
1280
1280
|
}
|
|
1281
|
-
function Pn(n, e) {
|
|
1282
|
-
return 16 & e ? "code" : e & sr ? "mark" : 32 & e ? "sub" : 64 & e ? "sup" : null;
|
|
1283
|
-
}
|
|
1284
1281
|
function Fn(n, e) {
|
|
1282
|
+
return 16 & e ? "code" : e & or ? "mark" : 32 & e ? "sub" : 64 & e ? "sup" : null;
|
|
1283
|
+
}
|
|
1284
|
+
function Ln(n, e) {
|
|
1285
1285
|
return 1 & e ? "strong" : 2 & e ? "em" : "span";
|
|
1286
1286
|
}
|
|
1287
|
-
function
|
|
1287
|
+
function ns(n, e, t, r, i) {
|
|
1288
1288
|
const s = r.classList;
|
|
1289
|
-
let o =
|
|
1290
|
-
o !== void 0 && s.add(...o), o =
|
|
1289
|
+
let o = rt(i, "base");
|
|
1290
|
+
o !== void 0 && s.add(...o), o = rt(i, "underlineStrikethrough");
|
|
1291
1291
|
let l = !1;
|
|
1292
|
-
const a = e &
|
|
1293
|
-
o !== void 0 && (t &
|
|
1294
|
-
for (const c in
|
|
1295
|
-
const u =
|
|
1296
|
-
if (o =
|
|
1292
|
+
const a = e & tn && e & en;
|
|
1293
|
+
o !== void 0 && (t & tn && t & en ? (l = !0, a || s.add(...o)) : a && s.remove(...o));
|
|
1294
|
+
for (const c in Ue) {
|
|
1295
|
+
const u = Ue[c];
|
|
1296
|
+
if (o = rt(i, c), o !== void 0) if (t & u) {
|
|
1297
1297
|
if (l && (c === "underline" || c === "strikethrough")) {
|
|
1298
1298
|
e & u && s.remove(...o);
|
|
1299
1299
|
continue;
|
|
@@ -1302,12 +1302,12 @@ function ts(n, e, t, r, i) {
|
|
|
1302
1302
|
} else e & u && s.remove(...o);
|
|
1303
1303
|
}
|
|
1304
1304
|
}
|
|
1305
|
-
function
|
|
1306
|
-
const r = e.firstChild, i = t.isComposing(), s = n + (i ?
|
|
1305
|
+
function rs(n, e, t) {
|
|
1306
|
+
const r = e.firstChild, i = t.isComposing(), s = n + (i ? gn : "");
|
|
1307
1307
|
if (r == null) e.textContent = s;
|
|
1308
1308
|
else {
|
|
1309
1309
|
const o = r.nodeValue;
|
|
1310
|
-
if (o !== s) if (i ||
|
|
1310
|
+
if (o !== s) if (i || We) {
|
|
1311
1311
|
const [l, a, c] = function(u, h) {
|
|
1312
1312
|
const f = u.length, g = h.length;
|
|
1313
1313
|
let d = 0, _ = 0;
|
|
@@ -1319,21 +1319,21 @@ function ns(n, e, t) {
|
|
|
1319
1319
|
} else r.nodeValue = s;
|
|
1320
1320
|
}
|
|
1321
1321
|
}
|
|
1322
|
-
function
|
|
1323
|
-
|
|
1322
|
+
function Hr(n, e, t, r, i, s) {
|
|
1323
|
+
rs(i, n, e);
|
|
1324
1324
|
const o = s.theme.text;
|
|
1325
|
-
o !== void 0 &&
|
|
1325
|
+
o !== void 0 && ns(0, 0, r, n, o);
|
|
1326
1326
|
}
|
|
1327
|
-
function
|
|
1327
|
+
function Jt(n, e) {
|
|
1328
1328
|
const t = document.createElement(e);
|
|
1329
1329
|
return t.appendChild(n), t;
|
|
1330
1330
|
}
|
|
1331
|
-
class
|
|
1331
|
+
class ut extends pn {
|
|
1332
1332
|
static getType() {
|
|
1333
1333
|
return "text";
|
|
1334
1334
|
}
|
|
1335
1335
|
static clone(e) {
|
|
1336
|
-
return new
|
|
1336
|
+
return new ut(e.__text, e.__key);
|
|
1337
1337
|
}
|
|
1338
1338
|
afterCloneFrom(e) {
|
|
1339
1339
|
super.afterCloneFrom(e), this.__text = e.__text, this.__format = e.__format, this.__style = e.__style, this.__mode = e.__mode, this.__detail = e.__detail;
|
|
@@ -1349,7 +1349,7 @@ class ct extends _n {
|
|
|
1349
1349
|
}
|
|
1350
1350
|
getMode() {
|
|
1351
1351
|
const e = this.getLatest();
|
|
1352
|
-
return
|
|
1352
|
+
return Gs[e.__mode];
|
|
1353
1353
|
}
|
|
1354
1354
|
getStyle() {
|
|
1355
1355
|
return this.getLatest().__style;
|
|
@@ -1358,7 +1358,7 @@ class ct extends _n {
|
|
|
1358
1358
|
return this.getLatest().__mode === 1;
|
|
1359
1359
|
}
|
|
1360
1360
|
isComposing() {
|
|
1361
|
-
return this.__key ===
|
|
1361
|
+
return this.__key === Me();
|
|
1362
1362
|
}
|
|
1363
1363
|
isSegmented() {
|
|
1364
1364
|
return this.getLatest().__mode === 2;
|
|
@@ -1370,7 +1370,7 @@ class ct extends _n {
|
|
|
1370
1370
|
return !!(2 & this.getLatest().__detail);
|
|
1371
1371
|
}
|
|
1372
1372
|
hasFormat(e) {
|
|
1373
|
-
const t =
|
|
1373
|
+
const t = Ue[e];
|
|
1374
1374
|
return !!(this.getFormat() & t);
|
|
1375
1375
|
}
|
|
1376
1376
|
isSimpleText() {
|
|
@@ -1380,7 +1380,7 @@ class ct extends _n {
|
|
|
1380
1380
|
return this.getLatest().__text;
|
|
1381
1381
|
}
|
|
1382
1382
|
getFormatFlags(e, t) {
|
|
1383
|
-
return
|
|
1383
|
+
return dn(this.getLatest().__format, e, t);
|
|
1384
1384
|
}
|
|
1385
1385
|
canHaveFormat() {
|
|
1386
1386
|
return !0;
|
|
@@ -1389,30 +1389,30 @@ class ct extends _n {
|
|
|
1389
1389
|
return !0;
|
|
1390
1390
|
}
|
|
1391
1391
|
createDOM(e, t) {
|
|
1392
|
-
const r = this.__format, i =
|
|
1392
|
+
const r = this.__format, i = Fn(0, r), s = Ln(0, r), o = i === null ? s : i, l = document.createElement(o);
|
|
1393
1393
|
let a = l;
|
|
1394
|
-
this.hasFormat("code") && l.setAttribute("spellcheck", "false"), i !== null && (a = document.createElement(s), l.appendChild(a)),
|
|
1394
|
+
this.hasFormat("code") && l.setAttribute("spellcheck", "false"), i !== null && (a = document.createElement(s), l.appendChild(a)), Hr(a, this, 0, r, this.__text, e);
|
|
1395
1395
|
const c = this.__style;
|
|
1396
1396
|
return c !== "" && (l.style.cssText = c), l;
|
|
1397
1397
|
}
|
|
1398
1398
|
updateDOM(e, t, r) {
|
|
1399
|
-
const i = this.__text, s = e.__format, o = this.__format, l =
|
|
1399
|
+
const i = this.__text, s = e.__format, o = this.__format, l = Fn(0, s), a = Fn(0, o), c = Ln(0, s), u = Ln(0, o);
|
|
1400
1400
|
if ((l === null ? c : l) !== (a === null ? u : a)) return !0;
|
|
1401
1401
|
if (l === a && c !== u) {
|
|
1402
1402
|
const _ = t.firstChild;
|
|
1403
1403
|
_ == null && T(48);
|
|
1404
1404
|
const p = document.createElement(u);
|
|
1405
|
-
return
|
|
1405
|
+
return Hr(p, this, 0, o, i, r), t.replaceChild(p, _), !1;
|
|
1406
1406
|
}
|
|
1407
1407
|
let h = t;
|
|
1408
|
-
a !== null && l !== null && (h = t.firstChild, h == null && T(49)),
|
|
1408
|
+
a !== null && l !== null && (h = t.firstChild, h == null && T(49)), rs(i, h, this);
|
|
1409
1409
|
const f = r.theme.text;
|
|
1410
|
-
f !== void 0 && s !== o &&
|
|
1410
|
+
f !== void 0 && s !== o && ns(0, s, o, h, f);
|
|
1411
1411
|
const g = e.__style, d = this.__style;
|
|
1412
1412
|
return g !== d && (t.style.cssText = d), !1;
|
|
1413
1413
|
}
|
|
1414
1414
|
static importDOM() {
|
|
1415
|
-
return { "#text": () => ({ conversion:
|
|
1415
|
+
return { "#text": () => ({ conversion: Po, priority: 0 }), b: () => ({ conversion: Oo, priority: 0 }), code: () => ({ conversion: xe, priority: 0 }), em: () => ({ conversion: xe, priority: 0 }), i: () => ({ conversion: xe, priority: 0 }), mark: () => ({ conversion: xe, priority: 0 }), s: () => ({ conversion: xe, priority: 0 }), span: () => ({ conversion: Ao, priority: 0 }), strong: () => ({ conversion: xe, priority: 0 }), sub: () => ({ conversion: xe, priority: 0 }), sup: () => ({ conversion: xe, priority: 0 }), u: () => ({ conversion: xe, priority: 0 }) };
|
|
1416
1416
|
}
|
|
1417
1417
|
static importJSON(e) {
|
|
1418
1418
|
return Y().updateFromJSON(e);
|
|
@@ -1422,7 +1422,7 @@ class ct extends _n {
|
|
|
1422
1422
|
}
|
|
1423
1423
|
exportDOM(e) {
|
|
1424
1424
|
let { element: t } = super.exportDOM(e);
|
|
1425
|
-
return ee(t) || T(132), t.style.whiteSpace = "pre-wrap", this.hasFormat("lowercase") ? t.style.textTransform = "lowercase" : this.hasFormat("uppercase") ? t.style.textTransform = "uppercase" : this.hasFormat("capitalize") && (t.style.textTransform = "capitalize"), this.hasFormat("bold") && (t =
|
|
1425
|
+
return ee(t) || T(132), t.style.whiteSpace = "pre-wrap", this.hasFormat("lowercase") ? t.style.textTransform = "lowercase" : this.hasFormat("uppercase") ? t.style.textTransform = "uppercase" : this.hasFormat("capitalize") && (t.style.textTransform = "capitalize"), this.hasFormat("bold") && (t = Jt(t, "b")), this.hasFormat("italic") && (t = Jt(t, "i")), this.hasFormat("strikethrough") && (t = Jt(t, "s")), this.hasFormat("underline") && (t = Jt(t, "u")), { element: t };
|
|
1426
1426
|
}
|
|
1427
1427
|
exportJSON() {
|
|
1428
1428
|
return { detail: this.getDetail(), format: this.getFormat(), mode: this.getMode(), style: this.getStyle(), text: this.getTextContent(), ...super.exportJSON() };
|
|
@@ -1431,18 +1431,18 @@ class ct extends _n {
|
|
|
1431
1431
|
}
|
|
1432
1432
|
setFormat(e) {
|
|
1433
1433
|
const t = this.getWritable();
|
|
1434
|
-
return t.__format = typeof e == "string" ?
|
|
1434
|
+
return t.__format = typeof e == "string" ? Ue[e] : e, t;
|
|
1435
1435
|
}
|
|
1436
1436
|
setDetail(e) {
|
|
1437
1437
|
const t = this.getWritable();
|
|
1438
|
-
return t.__detail = typeof e == "string" ?
|
|
1438
|
+
return t.__detail = typeof e == "string" ? Ys[e] : e, t;
|
|
1439
1439
|
}
|
|
1440
1440
|
setStyle(e) {
|
|
1441
1441
|
const t = this.getWritable();
|
|
1442
1442
|
return t.__style = e, t;
|
|
1443
1443
|
}
|
|
1444
1444
|
toggleFormat(e) {
|
|
1445
|
-
const t =
|
|
1445
|
+
const t = dn(this.getFormat(), e, null);
|
|
1446
1446
|
return this.setFormat(t);
|
|
1447
1447
|
}
|
|
1448
1448
|
toggleDirectionless() {
|
|
@@ -1454,7 +1454,7 @@ class ct extends _n {
|
|
|
1454
1454
|
return e.__detail ^= 2, e;
|
|
1455
1455
|
}
|
|
1456
1456
|
setMode(e) {
|
|
1457
|
-
const t =
|
|
1457
|
+
const t = qs[e];
|
|
1458
1458
|
if (this.__mode === t) return this;
|
|
1459
1459
|
const r = this.getWritable();
|
|
1460
1460
|
return r.__mode = t, r;
|
|
@@ -1472,9 +1472,9 @@ class ct extends _n {
|
|
|
1472
1472
|
const a = o.length;
|
|
1473
1473
|
r === void 0 && (r = a), i === void 0 && (i = a);
|
|
1474
1474
|
} else r = 0, i = 0;
|
|
1475
|
-
if (!O(s)) return
|
|
1475
|
+
if (!O(s)) return ls(l, r, l, i, "text", "text");
|
|
1476
1476
|
{
|
|
1477
|
-
const a =
|
|
1477
|
+
const a = Me();
|
|
1478
1478
|
a !== s.anchor.key && a !== s.focus.key || H(l), s.setTextNodeRange(this, r, this, i);
|
|
1479
1479
|
}
|
|
1480
1480
|
return s;
|
|
@@ -1508,7 +1508,7 @@ class ct extends _n {
|
|
|
1508
1508
|
G();
|
|
1509
1509
|
const t = this.getLatest(), r = t.getTextContent();
|
|
1510
1510
|
if (r === "") return [];
|
|
1511
|
-
const i = t.__key, s =
|
|
1511
|
+
const i = t.__key, s = Me(), o = r.length;
|
|
1512
1512
|
e.sort((k, S) => k - S), e.push(o);
|
|
1513
1513
|
const l = [], a = e.length;
|
|
1514
1514
|
for (let k = 0, S = 0; k < o && S <= a; S++) {
|
|
@@ -1526,7 +1526,7 @@ class ct extends _n {
|
|
|
1526
1526
|
const [k, S] = m.isBackward() ? [m.focus, m.anchor] : [m.anchor, m.focus];
|
|
1527
1527
|
k.type === "text" && k.key === i && (x = k), S.type === "text" && S.key === i && (y = S);
|
|
1528
1528
|
}
|
|
1529
|
-
t.isSegmented() ? (f = Y(u), f.__format = g, f.__style = d, f.__detail = _, p = !0) :
|
|
1529
|
+
t.isSegmented() ? (f = Y(u), f.__format = g, f.__style = d, f.__detail = _, p = !0) : f = t.setTextContent(u);
|
|
1530
1530
|
const b = [f];
|
|
1531
1531
|
for (let k = 1; k < c; k++) {
|
|
1532
1532
|
const S = Y(l[k]);
|
|
@@ -1548,10 +1548,10 @@ class ct extends _n {
|
|
|
1548
1548
|
if (h !== null) {
|
|
1549
1549
|
(function(A) {
|
|
1550
1550
|
const F = A.getPreviousSibling(), W = A.getNextSibling();
|
|
1551
|
-
F !== null &&
|
|
1551
|
+
F !== null && hn(F), W !== null && hn(W);
|
|
1552
1552
|
})(this);
|
|
1553
1553
|
const k = h.getWritable(), S = this.getIndexWithinParent();
|
|
1554
|
-
p ? (k.splice(S, 0, b), this.remove()) : k.splice(S, 1, b), O(m) &&
|
|
1554
|
+
p ? (k.splice(S, 0, b), this.remove()) : k.splice(S, 1, b), O(m) && un(m, h, S, c - 1);
|
|
1555
1555
|
}
|
|
1556
1556
|
return b;
|
|
1557
1557
|
}
|
|
@@ -1559,11 +1559,11 @@ class ct extends _n {
|
|
|
1559
1559
|
const t = e === this.getPreviousSibling();
|
|
1560
1560
|
t || e === this.getNextSibling() || T(50);
|
|
1561
1561
|
const r = this.__key, i = e.__key, s = this.__text, o = s.length;
|
|
1562
|
-
|
|
1562
|
+
Me() === i && H(r);
|
|
1563
1563
|
const l = L();
|
|
1564
1564
|
if (O(l)) {
|
|
1565
1565
|
const h = l.anchor, f = l.focus;
|
|
1566
|
-
h !== null && h.key === i &&
|
|
1566
|
+
h !== null && h.key === i && si(h, t, r, e, o), f !== null && f.key === i && si(f, t, r, e, o);
|
|
1567
1567
|
}
|
|
1568
1568
|
const a = e.__text, c = t ? a + s : s + a;
|
|
1569
1569
|
this.setTextContent(c);
|
|
@@ -1574,30 +1574,30 @@ class ct extends _n {
|
|
|
1574
1574
|
return !1;
|
|
1575
1575
|
}
|
|
1576
1576
|
}
|
|
1577
|
-
function
|
|
1578
|
-
return { forChild:
|
|
1577
|
+
function Ao(n) {
|
|
1578
|
+
return { forChild: _r(n.style), node: null };
|
|
1579
1579
|
}
|
|
1580
|
-
function
|
|
1580
|
+
function Oo(n) {
|
|
1581
1581
|
const e = n, t = e.style.fontWeight === "normal";
|
|
1582
|
-
return { forChild:
|
|
1582
|
+
return { forChild: _r(e.style, t ? void 0 : "bold"), node: null };
|
|
1583
1583
|
}
|
|
1584
|
-
const
|
|
1585
|
-
function
|
|
1584
|
+
const qr = /* @__PURE__ */ new WeakMap();
|
|
1585
|
+
function Do(n) {
|
|
1586
1586
|
if (!ee(n)) return !1;
|
|
1587
1587
|
if (n.nodeName === "PRE") return !0;
|
|
1588
1588
|
const e = n.style.whiteSpace;
|
|
1589
1589
|
return typeof e == "string" && e.startsWith("pre");
|
|
1590
1590
|
}
|
|
1591
|
-
function
|
|
1591
|
+
function Po(n) {
|
|
1592
1592
|
const e = n;
|
|
1593
1593
|
n.parentElement === null && T(129);
|
|
1594
1594
|
let t = e.textContent || "";
|
|
1595
1595
|
if (function(r) {
|
|
1596
1596
|
let i, s = r.parentNode;
|
|
1597
1597
|
const o = [r];
|
|
1598
|
-
for (; s !== null && (i =
|
|
1598
|
+
for (; s !== null && (i = qr.get(s)) === void 0 && !Do(s); ) o.push(s), s = s.parentNode;
|
|
1599
1599
|
const l = i === void 0 ? s : i;
|
|
1600
|
-
for (let a = 0; a < o.length; a++)
|
|
1600
|
+
for (let a = 0; a < o.length; a++) qr.set(o[a], l);
|
|
1601
1601
|
return l;
|
|
1602
1602
|
}(e) !== null) {
|
|
1603
1603
|
const r = t.split(/(\r?\n|\t)/), i = [], s = r.length;
|
|
@@ -1605,14 +1605,14 @@ function Oo(n) {
|
|
|
1605
1605
|
const l = r[o];
|
|
1606
1606
|
l === `
|
|
1607
1607
|
` || l === `\r
|
|
1608
|
-
` ? i.push(
|
|
1608
|
+
` ? i.push(bt()) : l === " " ? i.push(pr()) : l !== "" && i.push(Y(l));
|
|
1609
1609
|
}
|
|
1610
1610
|
return { node: i };
|
|
1611
1611
|
}
|
|
1612
1612
|
if (t = t.replace(/\r/g, "").replace(/[ \t\n]+/g, " "), t === "") return { node: null };
|
|
1613
1613
|
if (t[0] === " ") {
|
|
1614
1614
|
let r = e, i = !0;
|
|
1615
|
-
for (; r !== null && (r =
|
|
1615
|
+
for (; r !== null && (r = Gr(r, !1)) !== null; ) {
|
|
1616
1616
|
const s = r.textContent || "";
|
|
1617
1617
|
if (s.length > 0) {
|
|
1618
1618
|
/[ \t\n]$/.test(s) && (t = t.slice(1)), i = !1;
|
|
@@ -1623,7 +1623,7 @@ function Oo(n) {
|
|
|
1623
1623
|
}
|
|
1624
1624
|
if (t[t.length - 1] === " ") {
|
|
1625
1625
|
let r = e, i = !0;
|
|
1626
|
-
for (; r !== null && (r =
|
|
1626
|
+
for (; r !== null && (r = Gr(r, !0)) !== null; )
|
|
1627
1627
|
if ((r.textContent || "").replace(/^( |\t|\r?\n)+/, "").length > 0) {
|
|
1628
1628
|
i = !1;
|
|
1629
1629
|
break;
|
|
@@ -1632,7 +1632,7 @@ function Oo(n) {
|
|
|
1632
1632
|
}
|
|
1633
1633
|
return t === "" ? { node: null } : { node: Y(t) };
|
|
1634
1634
|
}
|
|
1635
|
-
function
|
|
1635
|
+
function Gr(n, e) {
|
|
1636
1636
|
let t = n;
|
|
1637
1637
|
for (; ; ) {
|
|
1638
1638
|
let r;
|
|
@@ -1643,7 +1643,7 @@ function qr(n, e) {
|
|
|
1643
1643
|
}
|
|
1644
1644
|
if (t = r, ee(t)) {
|
|
1645
1645
|
const s = t.style.display;
|
|
1646
|
-
if (s === "" && !
|
|
1646
|
+
if (s === "" && !sl(t) || s !== "" && !s.startsWith("inline")) return null;
|
|
1647
1647
|
}
|
|
1648
1648
|
let i = t;
|
|
1649
1649
|
for (; (i = e ? t.firstChild : t.lastChild) !== null; ) t = i;
|
|
@@ -1651,27 +1651,27 @@ function qr(n, e) {
|
|
|
1651
1651
|
if (t.nodeName === "BR") return null;
|
|
1652
1652
|
}
|
|
1653
1653
|
}
|
|
1654
|
-
const
|
|
1654
|
+
const Fo = { code: "code", em: "italic", i: "italic", mark: "highlight", s: "strikethrough", strong: "bold", sub: "subscript", sup: "superscript", u: "underline" };
|
|
1655
1655
|
function xe(n) {
|
|
1656
|
-
const e =
|
|
1657
|
-
return e === void 0 ? { node: null } : { forChild:
|
|
1656
|
+
const e = Fo[n.nodeName.toLowerCase()];
|
|
1657
|
+
return e === void 0 ? { node: null } : { forChild: _r(n.style, e), node: null };
|
|
1658
1658
|
}
|
|
1659
1659
|
function Y(n = "") {
|
|
1660
|
-
return
|
|
1660
|
+
return Nn(new ut(n));
|
|
1661
1661
|
}
|
|
1662
1662
|
function M(n) {
|
|
1663
|
-
return n instanceof
|
|
1663
|
+
return n instanceof ut;
|
|
1664
1664
|
}
|
|
1665
|
-
function
|
|
1665
|
+
function _r(n, e) {
|
|
1666
1666
|
const t = n.fontWeight, r = n.textDecoration.split(" "), i = t === "700" || t === "bold", s = r.includes("line-through"), o = n.fontStyle === "italic", l = r.includes("underline"), a = n.verticalAlign;
|
|
1667
1667
|
return (c) => (M(c) && (i && !c.hasFormat("bold") && c.toggleFormat("bold"), s && !c.hasFormat("strikethrough") && c.toggleFormat("strikethrough"), o && !c.hasFormat("italic") && c.toggleFormat("italic"), l && !c.hasFormat("underline") && c.toggleFormat("underline"), a !== "sub" || c.hasFormat("subscript") || c.toggleFormat("subscript"), a !== "super" || c.hasFormat("superscript") || c.toggleFormat("superscript"), e && !c.hasFormat(e) && c.toggleFormat(e)), c);
|
|
1668
1668
|
}
|
|
1669
|
-
class
|
|
1669
|
+
class Mt extends ut {
|
|
1670
1670
|
static getType() {
|
|
1671
1671
|
return "tab";
|
|
1672
1672
|
}
|
|
1673
1673
|
static clone(e) {
|
|
1674
|
-
return new
|
|
1674
|
+
return new Mt(e.__key);
|
|
1675
1675
|
}
|
|
1676
1676
|
constructor(e) {
|
|
1677
1677
|
super(" ", e), this.__detail = 2;
|
|
@@ -1680,14 +1680,17 @@ class Et extends ct {
|
|
|
1680
1680
|
return null;
|
|
1681
1681
|
}
|
|
1682
1682
|
createDOM(e) {
|
|
1683
|
-
const t = super.createDOM(e), r =
|
|
1683
|
+
const t = super.createDOM(e), r = rt(e.theme, "tab");
|
|
1684
1684
|
return r !== void 0 && t.classList.add(...r), t;
|
|
1685
1685
|
}
|
|
1686
1686
|
static importJSON(e) {
|
|
1687
|
-
return
|
|
1687
|
+
return pr().updateFromJSON(e);
|
|
1688
1688
|
}
|
|
1689
1689
|
setTextContent(e) {
|
|
1690
|
-
return e !== " " && e !== "" && T(126), super.setTextContent(
|
|
1690
|
+
return e !== " " && e !== "" && T(126), super.setTextContent(" ");
|
|
1691
|
+
}
|
|
1692
|
+
spliceText(e, t, r, i) {
|
|
1693
|
+
return r === "" && t === 0 || r === " " && t === 1 || T(286), this;
|
|
1691
1694
|
}
|
|
1692
1695
|
setDetail(e) {
|
|
1693
1696
|
return e !== 2 && T(127), this;
|
|
@@ -1702,13 +1705,13 @@ class Et extends ct {
|
|
|
1702
1705
|
return !1;
|
|
1703
1706
|
}
|
|
1704
1707
|
}
|
|
1705
|
-
function
|
|
1706
|
-
return
|
|
1708
|
+
function pr() {
|
|
1709
|
+
return Nn(new Mt());
|
|
1707
1710
|
}
|
|
1708
|
-
function
|
|
1709
|
-
return n instanceof
|
|
1711
|
+
function is(n) {
|
|
1712
|
+
return n instanceof Mt;
|
|
1710
1713
|
}
|
|
1711
|
-
class
|
|
1714
|
+
class Lo {
|
|
1712
1715
|
constructor(e, t, r) {
|
|
1713
1716
|
this._selection = null, this.key = e, this.offset = t, this.type = r;
|
|
1714
1717
|
}
|
|
@@ -1716,21 +1719,21 @@ class Fo {
|
|
|
1716
1719
|
return this.key === e.key && this.offset === e.offset && this.type === e.type;
|
|
1717
1720
|
}
|
|
1718
1721
|
isBefore(e) {
|
|
1719
|
-
return this.key === e.key ? this.offset < e.offset :
|
|
1722
|
+
return this.key === e.key ? this.offset < e.offset : Ms(de(qe(this, "next")), de(qe(e, "next"))) < 0;
|
|
1720
1723
|
}
|
|
1721
1724
|
getNode() {
|
|
1722
|
-
const e =
|
|
1725
|
+
const e = $(this.key);
|
|
1723
1726
|
return e === null && T(20), e;
|
|
1724
1727
|
}
|
|
1725
1728
|
set(e, t, r, i) {
|
|
1726
1729
|
const s = this._selection, o = this.key;
|
|
1727
|
-
i && this.key === e && this.offset === t && this.type === r || (this.key = e, this.offset = t, this.type = r,
|
|
1730
|
+
i && this.key === e && this.offset === t && this.type === r || (this.key = e, this.offset = t, this.type = r, At() || (Me() === o && H(e), s !== null && (s.setCachedNodes(null), s.dirty = !0)));
|
|
1728
1731
|
}
|
|
1729
1732
|
}
|
|
1730
1733
|
function ge(n, e, t) {
|
|
1731
|
-
return new
|
|
1734
|
+
return new Lo(n, e, t);
|
|
1732
1735
|
}
|
|
1733
|
-
function
|
|
1736
|
+
function In(n, e) {
|
|
1734
1737
|
let t = e.__key, r = n.offset, i = "element";
|
|
1735
1738
|
if (M(e)) {
|
|
1736
1739
|
i = "text";
|
|
@@ -1746,13 +1749,13 @@ function Ln(n, e) {
|
|
|
1746
1749
|
}
|
|
1747
1750
|
n.set(t, r, i);
|
|
1748
1751
|
}
|
|
1749
|
-
function
|
|
1752
|
+
function Xr(n, e) {
|
|
1750
1753
|
if (v(e)) {
|
|
1751
1754
|
const t = e.getLastDescendant();
|
|
1752
|
-
v(t) || M(t) ?
|
|
1753
|
-
} else
|
|
1755
|
+
v(t) || M(t) ? In(n, t) : In(n, e);
|
|
1756
|
+
} else In(n, e);
|
|
1754
1757
|
}
|
|
1755
|
-
class
|
|
1758
|
+
class yn {
|
|
1756
1759
|
constructor(e) {
|
|
1757
1760
|
this._cachedNodes = null, this._nodes = e, this.dirty = !1;
|
|
1758
1761
|
}
|
|
@@ -1763,7 +1766,7 @@ class pn {
|
|
|
1763
1766
|
this._cachedNodes = e;
|
|
1764
1767
|
}
|
|
1765
1768
|
is(e) {
|
|
1766
|
-
if (!
|
|
1769
|
+
if (!yr(e)) return !1;
|
|
1767
1770
|
const t = this._nodes, r = e._nodes;
|
|
1768
1771
|
return t.size === r.size && Array.from(t).every((i) => r.has(i));
|
|
1769
1772
|
}
|
|
@@ -1789,7 +1792,7 @@ class pn {
|
|
|
1789
1792
|
return this._nodes.has(e);
|
|
1790
1793
|
}
|
|
1791
1794
|
clone() {
|
|
1792
|
-
return new
|
|
1795
|
+
return new yn(new Set(this._nodes));
|
|
1793
1796
|
}
|
|
1794
1797
|
extract() {
|
|
1795
1798
|
return this.getNodes();
|
|
@@ -1814,10 +1817,10 @@ class pn {
|
|
|
1814
1817
|
if (e !== null) return e;
|
|
1815
1818
|
const t = this._nodes, r = [];
|
|
1816
1819
|
for (const i of t) {
|
|
1817
|
-
const s =
|
|
1820
|
+
const s = $(i);
|
|
1818
1821
|
s !== null && r.push(s);
|
|
1819
1822
|
}
|
|
1820
|
-
return
|
|
1823
|
+
return At() || (this._cachedNodes = r), r;
|
|
1821
1824
|
}
|
|
1822
1825
|
getTextContent() {
|
|
1823
1826
|
const e = this.getNodes();
|
|
@@ -1827,17 +1830,17 @@ class pn {
|
|
|
1827
1830
|
}
|
|
1828
1831
|
deleteNodes() {
|
|
1829
1832
|
const e = this.getNodes();
|
|
1830
|
-
if ((L() ||
|
|
1833
|
+
if ((L() || ft()) === this && e[0]) {
|
|
1831
1834
|
const t = q(e[0], "next");
|
|
1832
|
-
|
|
1835
|
+
ml(He(t, t));
|
|
1833
1836
|
}
|
|
1834
1837
|
for (const t of e) t.remove();
|
|
1835
1838
|
}
|
|
1836
1839
|
}
|
|
1837
1840
|
function O(n) {
|
|
1838
|
-
return n instanceof
|
|
1841
|
+
return n instanceof Xe;
|
|
1839
1842
|
}
|
|
1840
|
-
class
|
|
1843
|
+
class Xe {
|
|
1841
1844
|
constructor(e, t, r, i) {
|
|
1842
1845
|
this.anchor = e, this.focus = t, e._selection = this, t._selection = this, this._cachedNodes = null, this.format = r, this.style = i, this.dirty = !1;
|
|
1843
1846
|
}
|
|
@@ -1867,7 +1870,7 @@ class qe {
|
|
|
1867
1870
|
const { origin: u } = c;
|
|
1868
1871
|
v(u) && a.has(u) || i.push(u);
|
|
1869
1872
|
}
|
|
1870
|
-
if (o && i.push(o.caret.origin),
|
|
1873
|
+
if (o && i.push(o.caret.origin), at(r.focus) && v(r.focus.origin) && r.focus.getNodeAtCaret() === null) for (let c = Pe(r.focus.origin, "previous"); he(c) && l.has(c.origin) && !c.origin.isEmpty() && c.origin.is(i[i.length - 1]); c = Ar(c)) l.delete(c.origin), i.pop();
|
|
1871
1874
|
for (; i.length > 1; ) {
|
|
1872
1875
|
const c = i[i.length - 1];
|
|
1873
1876
|
if (!v(c) || a.has(c) || c.isEmpty() || l.has(c)) break;
|
|
@@ -1878,8 +1881,8 @@ class qe {
|
|
|
1878
1881
|
i.push(f);
|
|
1879
1882
|
}
|
|
1880
1883
|
return i;
|
|
1881
|
-
}(
|
|
1882
|
-
return
|
|
1884
|
+
}(Os(Ni(this), "next"));
|
|
1885
|
+
return At() || (this._cachedNodes = t), t;
|
|
1883
1886
|
}
|
|
1884
1887
|
setTextNodeRange(e, t, r, i) {
|
|
1885
1888
|
this.anchor.set(e.__key, t, "text"), this.focus.set(r.__key, i, "text");
|
|
@@ -1887,7 +1890,7 @@ class qe {
|
|
|
1887
1890
|
getTextContent() {
|
|
1888
1891
|
const e = this.getNodes();
|
|
1889
1892
|
if (e.length === 0) return "";
|
|
1890
|
-
const t = e[0], r = e[e.length - 1], i = this.anchor, s = this.focus, o = i.isBefore(s), [l, a] =
|
|
1893
|
+
const t = e[0], r = e[e.length - 1], i = this.anchor, s = this.focus, o = i.isBefore(s), [l, a] = Zr(this);
|
|
1891
1894
|
let c = "", u = !0;
|
|
1892
1895
|
for (let h = 0; h < e.length; h++) {
|
|
1893
1896
|
const f = e[h];
|
|
@@ -1896,28 +1899,28 @@ class qe {
|
|
|
1896
1899
|
else if (u = !1, M(f)) {
|
|
1897
1900
|
let g = f.getTextContent();
|
|
1898
1901
|
f === t ? f === r ? i.type === "element" && s.type === "element" && s.offset !== i.offset || (g = l < a ? g.slice(l, a) : g.slice(a, l)) : g = o ? g.slice(l) : g.slice(a) : f === r && (g = o ? g.slice(0, a) : g.slice(0, l)), c += g;
|
|
1899
|
-
} else !z(f) && !
|
|
1902
|
+
} else !z(f) && !nt(f) || f === r && this.isCollapsed() || (c += f.getTextContent());
|
|
1900
1903
|
}
|
|
1901
1904
|
return c;
|
|
1902
1905
|
}
|
|
1903
1906
|
applyDOMRange(e) {
|
|
1904
|
-
const t = R(), r = t.getEditorState()._selection, i =
|
|
1907
|
+
const t = R(), r = t.getEditorState()._selection, i = os(e.startContainer, e.startOffset, e.endContainer, e.endOffset, t, r);
|
|
1905
1908
|
if (i === null) return;
|
|
1906
1909
|
const [s, o] = i;
|
|
1907
1910
|
this.anchor.set(s.key, s.offset, s.type, !0), this.focus.set(o.key, o.offset, o.type, !0), $n(this);
|
|
1908
1911
|
}
|
|
1909
1912
|
clone() {
|
|
1910
1913
|
const e = this.anchor, t = this.focus;
|
|
1911
|
-
return new
|
|
1914
|
+
return new Xe(ge(e.key, e.offset, e.type), ge(t.key, t.offset, t.type), this.format, this.style);
|
|
1912
1915
|
}
|
|
1913
1916
|
toggleFormat(e) {
|
|
1914
|
-
this.format =
|
|
1917
|
+
this.format = dn(this.format, e, null), this.dirty = !0;
|
|
1915
1918
|
}
|
|
1916
1919
|
setStyle(e) {
|
|
1917
1920
|
this.style = e, this.dirty = !0;
|
|
1918
1921
|
}
|
|
1919
1922
|
hasFormat(e) {
|
|
1920
|
-
const t =
|
|
1923
|
+
const t = Ue[e];
|
|
1921
1924
|
return !!(this.format & t);
|
|
1922
1925
|
}
|
|
1923
1926
|
insertRawText(e) {
|
|
@@ -1926,7 +1929,7 @@ class qe {
|
|
|
1926
1929
|
const o = t[s];
|
|
1927
1930
|
o === `
|
|
1928
1931
|
` || o === `\r
|
|
1929
|
-
` ? r.push(
|
|
1932
|
+
` ? r.push(bt()) : o === " " ? r.push(pr()) : r.push(Y(o));
|
|
1930
1933
|
}
|
|
1931
1934
|
this.insertNodes(r);
|
|
1932
1935
|
}
|
|
@@ -1936,7 +1939,7 @@ class qe {
|
|
|
1936
1939
|
!this.isCollapsed() && r.isBefore(t) && (o = r, l = t), o.type === "element" && function(p, x, y, m) {
|
|
1937
1940
|
const b = p.getNode(), N = b.getChildAtIndex(p.offset), C = Y(), w = ne(b) ? Ae().append(C) : C;
|
|
1938
1941
|
C.setFormat(y), C.setStyle(m), N === null ? b.append(w) : N.insertBefore(w), p.is(x) && x.set(C.__key, 0, "text"), p.set(C.__key, 0, "text");
|
|
1939
|
-
}(o, l, i, s), l.type === "element" &&
|
|
1942
|
+
}(o, l, i, s), l.type === "element" && wt(l, de(qe(l, "next")));
|
|
1940
1943
|
const a = o.offset;
|
|
1941
1944
|
let c = l.offset;
|
|
1942
1945
|
const u = this.getNodes(), h = u.length;
|
|
@@ -1944,27 +1947,27 @@ class qe {
|
|
|
1944
1947
|
M(f) || T(26);
|
|
1945
1948
|
const g = f.getTextContent().length, d = f.getParentOrThrow();
|
|
1946
1949
|
let _ = u[h - 1];
|
|
1947
|
-
if (h === 1 && l.type === "element" && (c = g, l.set(o.key, c, "text")), this.isCollapsed() && a === g && (
|
|
1950
|
+
if (h === 1 && l.type === "element" && (c = g, l.set(o.key, c, "text")), this.isCollapsed() && a === g && (we(f) || !f.canInsertTextAfter() || !d.canInsertTextAfter() && f.getNextSibling() === null)) {
|
|
1948
1951
|
let p = f.getNextSibling();
|
|
1949
|
-
if (M(p) && p.canInsertTextBefore() && !
|
|
1950
|
-
} else if (this.isCollapsed() && a === 0 && (
|
|
1952
|
+
if (M(p) && p.canInsertTextBefore() && !we(p) || (p = Y(), p.setFormat(i), p.setStyle(s), d.canInsertTextAfter() ? f.insertAfter(p) : d.insertAfter(p)), p.select(0, 0), f = p, e !== "") return void this.insertText(e);
|
|
1953
|
+
} else if (this.isCollapsed() && a === 0 && (we(f) || !f.canInsertTextBefore() || !d.canInsertTextBefore() && f.getPreviousSibling() === null)) {
|
|
1951
1954
|
let p = f.getPreviousSibling();
|
|
1952
|
-
if (M(p) && !
|
|
1955
|
+
if (M(p) && !we(p) || (p = Y(), p.setFormat(i), d.canInsertTextBefore() ? f.insertBefore(p) : d.insertBefore(p)), p.select(), f = p, e !== "") return void this.insertText(e);
|
|
1953
1956
|
} else if (f.isSegmented() && a !== g) {
|
|
1954
1957
|
const p = Y(f.getTextContent());
|
|
1955
1958
|
p.setFormat(i), f.replace(p), f = p;
|
|
1956
1959
|
} else if (!this.isCollapsed() && e !== "") {
|
|
1957
1960
|
const p = _.getParent();
|
|
1958
|
-
if (!d.canInsertTextBefore() || !d.canInsertTextAfter() || v(p) && (!p.canInsertTextBefore() || !p.canInsertTextAfter())) return this.insertText(""),
|
|
1961
|
+
if (!d.canInsertTextBefore() || !d.canInsertTextAfter() || v(p) && (!p.canInsertTextBefore() || !p.canInsertTextAfter())) return this.insertText(""), ss(this.anchor, this.focus, null), void this.insertText(e);
|
|
1959
1962
|
}
|
|
1960
1963
|
if (h === 1) {
|
|
1961
|
-
if (f
|
|
1964
|
+
if (Be(f)) {
|
|
1962
1965
|
const m = Y(e);
|
|
1963
1966
|
return m.select(), void f.replace(m);
|
|
1964
1967
|
}
|
|
1965
1968
|
const p = f.getFormat(), x = f.getStyle();
|
|
1966
1969
|
if (a !== c || p === i && x === s) {
|
|
1967
|
-
if (
|
|
1970
|
+
if (is(f)) {
|
|
1968
1971
|
const m = Y(e);
|
|
1969
1972
|
return m.setFormat(i), m.setStyle(s), m.select(), void f.replace(m);
|
|
1970
1973
|
}
|
|
@@ -1988,7 +1991,7 @@ class qe {
|
|
|
1988
1991
|
if (!x.is(y) && y.isInline()) do
|
|
1989
1992
|
m = y, y = y.getParentOrThrow();
|
|
1990
1993
|
while (y.isInline());
|
|
1991
|
-
if (l.type === "text" && (c !== 0 || _.getTextContent() === "") || l.type === "element" && _.getIndexWithinParent() < c) if (M(_) && !_
|
|
1994
|
+
if (l.type === "text" && (c !== 0 || _.getTextContent() === "") || l.type === "element" && _.getIndexWithinParent() < c) if (M(_) && !Be(_) && c !== _.getTextContentSize()) {
|
|
1992
1995
|
if (_.isSegmented()) {
|
|
1993
1996
|
const k = Y(_.getTextContent());
|
|
1994
1997
|
_.replace(k), _ = k;
|
|
@@ -2012,7 +2015,7 @@ class qe {
|
|
|
2012
2015
|
(F === 0 || A[F - 1].is(S)) && (p.delete(k.__key), S = k), k = k.getParent();
|
|
2013
2016
|
}
|
|
2014
2017
|
}
|
|
2015
|
-
if (f
|
|
2018
|
+
if (Be(f)) if (a === g) f.select();
|
|
2016
2019
|
else {
|
|
2017
2020
|
const k = Y(e);
|
|
2018
2021
|
k.select(), f.replace(k);
|
|
@@ -2026,7 +2029,7 @@ class qe {
|
|
|
2026
2029
|
}
|
|
2027
2030
|
removeText() {
|
|
2028
2031
|
const e = L() === this;
|
|
2029
|
-
|
|
2032
|
+
Gt(this, xl(Ni(this))), e && L() !== this && ie(this);
|
|
2030
2033
|
}
|
|
2031
2034
|
formatText(e, t = null) {
|
|
2032
2035
|
if (this.isCollapsed()) return this.toggleFormat(e), void H(null);
|
|
@@ -2051,16 +2054,16 @@ class qe {
|
|
|
2051
2054
|
const y = h.type === "text" ? h.offset : x.getTextContentSize();
|
|
2052
2055
|
if (g.is(x)) {
|
|
2053
2056
|
if (d === y) return;
|
|
2054
|
-
if (
|
|
2057
|
+
if (we(g) || d === 0 && y === g.getTextContentSize()) g.setFormat(_);
|
|
2055
2058
|
else {
|
|
2056
2059
|
const b = g.splitText(d, y), N = d === 0 ? b[0] : b[1];
|
|
2057
2060
|
N.setFormat(_), u.type === "text" && u.set(N.__key, 0, "text"), h.type === "text" && h.set(N.__key, y - d, "text");
|
|
2058
2061
|
}
|
|
2059
2062
|
return void (this.format = _);
|
|
2060
2063
|
}
|
|
2061
|
-
d === 0 ||
|
|
2064
|
+
d === 0 || we(g) || ([, g] = g.splitText(d), d = 0), g.setFormat(_);
|
|
2062
2065
|
const m = x.getFormatFlags(e, _);
|
|
2063
|
-
y > 0 && (y === x.getTextContentSize() ||
|
|
2066
|
+
y > 0 && (y === x.getTextContentSize() || we(x) || ([x] = x.splitText(y)), x.setFormat(m));
|
|
2064
2067
|
for (let b = f + 1; b < p; b++) {
|
|
2065
2068
|
const N = i[b], C = N.getFormatFlags(e, m);
|
|
2066
2069
|
N.setFormat(C);
|
|
@@ -2074,25 +2077,25 @@ class qe {
|
|
|
2074
2077
|
const d = L();
|
|
2075
2078
|
return O(d) || T(134), d.insertNodes(e);
|
|
2076
2079
|
}
|
|
2077
|
-
const t = (this.isBackward() ? this.focus : this.anchor).getNode(), r =
|
|
2080
|
+
const t = (this.isBackward() ? this.focus : this.anchor).getNode(), r = Jn(t, Ee), i = e[e.length - 1];
|
|
2078
2081
|
if (v(r) && "__language" in r) {
|
|
2079
2082
|
if ("__language" in e[0]) this.insertText(e[0].getTextContent());
|
|
2080
2083
|
else {
|
|
2081
|
-
const d =
|
|
2084
|
+
const d = Kn(this);
|
|
2082
2085
|
r.splice(d, 0, e), i.selectEnd();
|
|
2083
2086
|
}
|
|
2084
2087
|
return;
|
|
2085
2088
|
}
|
|
2086
2089
|
if (!e.some((d) => (v(d) || z(d)) && !d.isInline())) {
|
|
2087
2090
|
v(r) || T(211, t.constructor.name, t.getType());
|
|
2088
|
-
const d =
|
|
2091
|
+
const d = Kn(this);
|
|
2089
2092
|
return r.splice(d, 0, e), void i.selectEnd();
|
|
2090
2093
|
}
|
|
2091
2094
|
const s = function(d) {
|
|
2092
2095
|
const _ = Ae();
|
|
2093
2096
|
let p = null;
|
|
2094
2097
|
for (let x = 0; x < d.length; x++) {
|
|
2095
|
-
const y = d[x], m =
|
|
2098
|
+
const y = d[x], m = nt(y);
|
|
2096
2099
|
if (m || z(y) && y.isInline() || v(y) && y.isInline() || M(y) || y.isParentRequired()) {
|
|
2097
2100
|
if (p === null && (p = y.createParentElementNode(), _.append(p), m)) continue;
|
|
2098
2101
|
p !== null && p.append(y);
|
|
@@ -2102,7 +2105,7 @@ class qe {
|
|
|
2102
2105
|
}(e), o = s.getLastDescendant(), l = s.getChildren(), a = !v(r) || !r.isEmpty() ? this.insertParagraph() : null, c = l[l.length - 1];
|
|
2103
2106
|
let u = l[0];
|
|
2104
2107
|
var h;
|
|
2105
|
-
v(h = u) &&
|
|
2108
|
+
v(h = u) && Ee(h) && !h.isEmpty() && v(r) && (!r.isEmpty() || r.canMergeWhenEmpty()) && (v(r) || T(211, t.constructor.name, t.getType()), r.append(...u.getChildren()), u = l[1]), u && (r === null && T(212, t.constructor.name, t.getType()), function(d, _, p) {
|
|
2106
2109
|
const x = _.getParentOrThrow().getLastChild();
|
|
2107
2110
|
let y = _;
|
|
2108
2111
|
const m = [_];
|
|
@@ -2110,23 +2113,23 @@ class qe {
|
|
|
2110
2113
|
let b = d;
|
|
2111
2114
|
for (const N of m) b = b.insertAfter(N);
|
|
2112
2115
|
}(r, u));
|
|
2113
|
-
const f =
|
|
2114
|
-
a && v(f) && (a.canMergeWhenEmpty() ||
|
|
2116
|
+
const f = Jn(o, Ee);
|
|
2117
|
+
a && v(f) && (a.canMergeWhenEmpty() || Ee(c)) && (f.append(...a.getChildren()), a.remove()), v(r) && r.isEmpty() && r.remove(), o.selectEnd();
|
|
2115
2118
|
const g = v(r) ? r.getLastChild() : null;
|
|
2116
|
-
|
|
2119
|
+
nt(g) && f !== r && g.remove();
|
|
2117
2120
|
}
|
|
2118
2121
|
insertParagraph() {
|
|
2119
2122
|
if (this.anchor.key === "root") {
|
|
2120
2123
|
const o = Ae();
|
|
2121
2124
|
return re().splice(this.anchor.offset, 0, [o]), o.select(), o;
|
|
2122
2125
|
}
|
|
2123
|
-
const e =
|
|
2126
|
+
const e = Kn(this), t = Jn(this.anchor.getNode(), Ee);
|
|
2124
2127
|
v(t) || T(213);
|
|
2125
2128
|
const r = t.getChildAtIndex(e), i = r ? [r, ...r.getNextSiblings()] : [], s = t.insertNewAfter(this, !1);
|
|
2126
2129
|
return s ? (s.append(...i), s.selectStart(), s) : null;
|
|
2127
2130
|
}
|
|
2128
2131
|
insertLineBreak(e) {
|
|
2129
|
-
const t =
|
|
2132
|
+
const t = bt();
|
|
2130
2133
|
if (this.insertNodes([t]), e) {
|
|
2131
2134
|
const r = t.getParentOrThrow(), i = t.getIndexWithinParent();
|
|
2132
2135
|
r.select(i, i);
|
|
@@ -2135,7 +2138,7 @@ class qe {
|
|
|
2135
2138
|
extract() {
|
|
2136
2139
|
const e = this.getNodes(), t = e.length, r = t - 1, i = this.anchor, s = this.focus;
|
|
2137
2140
|
let o = e[0], l = e[r];
|
|
2138
|
-
const [a, c] =
|
|
2141
|
+
const [a, c] = Zr(this);
|
|
2139
2142
|
if (t === 0) return [];
|
|
2140
2143
|
if (t === 1) {
|
|
2141
2144
|
if (M(o) && !this.isCollapsed()) {
|
|
@@ -2156,24 +2159,24 @@ class qe {
|
|
|
2156
2159
|
return e;
|
|
2157
2160
|
}
|
|
2158
2161
|
modify(e, t, r) {
|
|
2159
|
-
if (
|
|
2162
|
+
if (oi(this, e, t, r)) return;
|
|
2160
2163
|
const i = e === "move", s = R(), o = Te(oe(s));
|
|
2161
2164
|
if (!o) return;
|
|
2162
2165
|
const l = s._blockCursorElement, a = s._rootElement, c = this.focus.getNode();
|
|
2163
|
-
if (a === null || l === null || !v(c) || c.isInline() || c.canBeEmpty() ||
|
|
2164
|
-
let u =
|
|
2165
|
-
this.anchor.type === "text" && (u =
|
|
2166
|
+
if (a === null || l === null || !v(c) || c.isInline() || c.canBeEmpty() || sr(l, s, a), this.dirty) {
|
|
2167
|
+
let u = lt(s, this.anchor.key), h = lt(s, this.focus.key);
|
|
2168
|
+
this.anchor.type === "text" && (u = ot(u)), this.focus.type === "text" && (h = ot(h)), u && h && cs(o, u, this.anchor.offset, h, this.focus.offset);
|
|
2166
2169
|
}
|
|
2167
2170
|
if (function(u, h, f, g) {
|
|
2168
2171
|
u.modify(h, f, g);
|
|
2169
2172
|
}(o, e, t ? "backward" : "forward", r), o.rangeCount > 0) {
|
|
2170
|
-
const u = o.getRangeAt(0), h = this.anchor.getNode(), f = ne(h) ? h :
|
|
2173
|
+
const u = o.getRangeAt(0), h = this.anchor.getNode(), f = ne(h) ? h : el(h);
|
|
2171
2174
|
if (this.applyDOMRange(u), this.dirty = !0, !i) {
|
|
2172
2175
|
const g = this.getNodes(), d = [];
|
|
2173
2176
|
let _ = !1;
|
|
2174
2177
|
for (let p = 0; p < g.length; p++) {
|
|
2175
2178
|
const x = g[p];
|
|
2176
|
-
|
|
2179
|
+
ir(x, f) ? d.push(x) : _ = !0;
|
|
2177
2180
|
}
|
|
2178
2181
|
if (_ && d.length > 0) if (t) {
|
|
2179
2182
|
const p = d[0];
|
|
@@ -2188,7 +2191,7 @@ class qe {
|
|
|
2188
2191
|
}(this);
|
|
2189
2192
|
}
|
|
2190
2193
|
}
|
|
2191
|
-
r === "lineboundary" &&
|
|
2194
|
+
r === "lineboundary" && oi(this, e, t, r, "decorators");
|
|
2192
2195
|
}
|
|
2193
2196
|
forwardDeletion(e, t, r) {
|
|
2194
2197
|
if (!r && (e.type === "element" && v(t) && e.offset === t.getChildrenSize() || e.type === "text" && e.offset === t.getTextContentSize())) {
|
|
@@ -2203,7 +2206,7 @@ class qe {
|
|
|
2203
2206
|
const r = this.anchor;
|
|
2204
2207
|
let i = r.getNode();
|
|
2205
2208
|
if (this.forwardDeletion(r, i, e)) return;
|
|
2206
|
-
const s =
|
|
2209
|
+
const s = ws(qe(r, e ? "previous" : "next"));
|
|
2207
2210
|
if (s.getTextSlices().every((l) => l === null || l.distance === 0)) {
|
|
2208
2211
|
let l = { type: "initial" };
|
|
2209
2212
|
for (const a of s.iterNodeCarets("shadowRoot")) if (he(a)) {
|
|
@@ -2212,7 +2215,7 @@ class qe {
|
|
|
2212
2215
|
if (l.type === "merge-block") break;
|
|
2213
2216
|
if (v(s.anchor.origin) && s.anchor.origin.isEmpty()) {
|
|
2214
2217
|
const c = de(a);
|
|
2215
|
-
|
|
2218
|
+
Gt(this, He(c, c)), s.anchor.origin.remove();
|
|
2216
2219
|
}
|
|
2217
2220
|
return;
|
|
2218
2221
|
}
|
|
@@ -2220,7 +2223,7 @@ class qe {
|
|
|
2220
2223
|
}
|
|
2221
2224
|
} else {
|
|
2222
2225
|
if (l.type === "merge-block") break;
|
|
2223
|
-
if (
|
|
2226
|
+
if (at(a)) {
|
|
2224
2227
|
if (v(a.origin)) {
|
|
2225
2228
|
if (a.origin.isInline()) {
|
|
2226
2229
|
if (!a.origin.isParentOf(s.anchor.origin)) break;
|
|
@@ -2230,7 +2233,7 @@ class qe {
|
|
|
2230
2233
|
if (z(a.origin)) {
|
|
2231
2234
|
if (!a.origin.isIsolated()) if (l.type === "merge-next-block" && (a.origin.isKeyboardSelectable() || !a.origin.isInline()) && v(s.anchor.origin) && s.anchor.origin.isEmpty()) {
|
|
2232
2235
|
s.anchor.origin.remove();
|
|
2233
|
-
const c =
|
|
2236
|
+
const c = as();
|
|
2234
2237
|
c.add(a.origin.getKey()), ie(c);
|
|
2235
2238
|
} else a.origin.remove();
|
|
2236
2239
|
return;
|
|
@@ -2240,27 +2243,27 @@ class qe {
|
|
|
2240
2243
|
}
|
|
2241
2244
|
if (l.type === "merge-block") {
|
|
2242
2245
|
const { caret: a, block: c } = l;
|
|
2243
|
-
return
|
|
2246
|
+
return Gt(this, He(!a.origin.isEmpty() && c.isEmpty() ? Lt(q(c, a.direction)) : s.anchor, a)), this.removeText();
|
|
2244
2247
|
}
|
|
2245
2248
|
}
|
|
2246
2249
|
const o = this.focus;
|
|
2247
2250
|
if (this.modify("extend", e, "character"), this.isCollapsed()) {
|
|
2248
|
-
if (e && r.offset === 0 &&
|
|
2251
|
+
if (e && r.offset === 0 && ei(this, r.getNode())) return;
|
|
2249
2252
|
} else {
|
|
2250
2253
|
const l = o.type === "text" ? o.getNode() : null;
|
|
2251
2254
|
if (i = r.type === "text" ? r.getNode() : null, l !== null && l.isSegmented()) {
|
|
2252
2255
|
const a = o.offset, c = l.getTextContentSize();
|
|
2253
|
-
if (l.is(i) || e && a !== c || !e && a !== 0) return void
|
|
2256
|
+
if (l.is(i) || e && a !== c || !e && a !== 0) return void ti(l, e, a);
|
|
2254
2257
|
} else if (i !== null && i.isSegmented()) {
|
|
2255
2258
|
const a = r.offset, c = i.getTextContentSize();
|
|
2256
|
-
if (i.is(l) || e && a !== 0 || !e && a !== c) return void
|
|
2259
|
+
if (i.is(l) || e && a !== 0 || !e && a !== c) return void ti(i, e, a);
|
|
2257
2260
|
}
|
|
2258
2261
|
(function(a, c) {
|
|
2259
2262
|
const u = a.anchor, h = a.focus, f = u.getNode(), g = h.getNode();
|
|
2260
2263
|
if (f === g && u.type === "text" && h.type === "text") {
|
|
2261
2264
|
const d = u.offset, _ = h.offset, p = d < _, x = p ? d : _, y = p ? _ : d, m = y - 1;
|
|
2262
2265
|
x !== m && function(b) {
|
|
2263
|
-
return !(
|
|
2266
|
+
return !(vs(b) || Io(b));
|
|
2264
2267
|
}(f.getTextContent().slice(x, y)) && (c ? h.set(h.key, m, h.type) : u.set(u.key, m, u.type));
|
|
2265
2268
|
}
|
|
2266
2269
|
})(this, e);
|
|
@@ -2268,7 +2271,7 @@ class qe {
|
|
|
2268
2271
|
}
|
|
2269
2272
|
if (this.removeText(), e && !t && this.isCollapsed() && this.anchor.type === "element" && this.anchor.offset === 0) {
|
|
2270
2273
|
const r = this.anchor.getNode();
|
|
2271
|
-
r.isEmpty() && ne(r.getParent()) && r.getPreviousSibling() === null &&
|
|
2274
|
+
r.isEmpty() && ne(r.getParent()) && r.getPreviousSibling() === null && ei(this, r);
|
|
2272
2275
|
}
|
|
2273
2276
|
}
|
|
2274
2277
|
deleteLine(e) {
|
|
@@ -2289,22 +2292,22 @@ class qe {
|
|
|
2289
2292
|
return [this.anchor, this.focus];
|
|
2290
2293
|
}
|
|
2291
2294
|
}
|
|
2292
|
-
function
|
|
2293
|
-
return n instanceof
|
|
2295
|
+
function yr(n) {
|
|
2296
|
+
return n instanceof yn;
|
|
2294
2297
|
}
|
|
2295
|
-
function
|
|
2298
|
+
function Qr(n) {
|
|
2296
2299
|
const e = n.offset;
|
|
2297
2300
|
if (n.type === "text") return e;
|
|
2298
2301
|
const t = n.getNode();
|
|
2299
2302
|
return e === t.getChildrenSize() ? t.getTextContent().length : 0;
|
|
2300
2303
|
}
|
|
2301
|
-
function
|
|
2304
|
+
function Zr(n) {
|
|
2302
2305
|
const e = n.getStartEndPoints();
|
|
2303
2306
|
if (e === null) return [0, 0];
|
|
2304
2307
|
const [t, r] = e;
|
|
2305
|
-
return t.type === "element" && r.type === "element" && t.key === r.key && t.offset === r.offset ? [0, 0] : [
|
|
2308
|
+
return t.type === "element" && r.type === "element" && t.key === r.key && t.offset === r.offset ? [0, 0] : [Qr(t), Qr(r)];
|
|
2306
2309
|
}
|
|
2307
|
-
function
|
|
2310
|
+
function ei(n, e) {
|
|
2308
2311
|
for (let t = e; t; t = t.getParent()) {
|
|
2309
2312
|
if (v(t)) {
|
|
2310
2313
|
if (t.collapseAtStart(n)) return !0;
|
|
@@ -2314,7 +2317,7 @@ function Zr(n, e) {
|
|
|
2314
2317
|
}
|
|
2315
2318
|
return !1;
|
|
2316
2319
|
}
|
|
2317
|
-
const
|
|
2320
|
+
const Io = (() => {
|
|
2318
2321
|
try {
|
|
2319
2322
|
const n = new RegExp("\\p{Emoji}", "u"), e = n.test.bind(n);
|
|
2320
2323
|
if (e("❤️") && e("#️⃣") && e("👍")) return e;
|
|
@@ -2322,7 +2325,7 @@ const Lo = (() => {
|
|
|
2322
2325
|
}
|
|
2323
2326
|
return () => !1;
|
|
2324
2327
|
})();
|
|
2325
|
-
function
|
|
2328
|
+
function ti(n, e, t) {
|
|
2326
2329
|
const r = n, i = r.getTextContent().split(/(?=\s)/g), s = i.length;
|
|
2327
2330
|
let o = 0, l = 0;
|
|
2328
2331
|
for (let c = 0; c < s; c++) {
|
|
@@ -2335,7 +2338,7 @@ function ei(n, e, t) {
|
|
|
2335
2338
|
const a = i.join("").trim();
|
|
2336
2339
|
a === "" ? r.remove() : (r.setTextContent(a), r.select(l, l));
|
|
2337
2340
|
}
|
|
2338
|
-
function
|
|
2341
|
+
function ni(n, e, t, r) {
|
|
2339
2342
|
let i, s = e;
|
|
2340
2343
|
if (ee(n)) {
|
|
2341
2344
|
let o = !1;
|
|
@@ -2347,9 +2350,9 @@ function ti(n, e, t, r) {
|
|
|
2347
2350
|
const f = c.parentNode;
|
|
2348
2351
|
n === f && e > Array.prototype.indexOf.call(f.children, c) && s--;
|
|
2349
2352
|
}
|
|
2350
|
-
if (i =
|
|
2353
|
+
if (i = et(u), M(i)) s = pi(i, o);
|
|
2351
2354
|
else {
|
|
2352
|
-
let f =
|
|
2355
|
+
let f = et(n);
|
|
2353
2356
|
if (f === null) return null;
|
|
2354
2357
|
if (v(f)) {
|
|
2355
2358
|
const g = r.getElementByKey(f.getKey());
|
|
@@ -2362,17 +2365,17 @@ function ti(n, e, t, r) {
|
|
|
2362
2365
|
const p = o ? _.getLastDescendant() : _.getFirstDescendant();
|
|
2363
2366
|
p === null ? f = _ : (_ = p, f = v(_) ? _ : _.getParentOrThrow()), s = 0;
|
|
2364
2367
|
}
|
|
2365
|
-
M(_) ? (i = _, f = null, s =
|
|
2368
|
+
M(_) ? (i = _, f = null, s = pi(_, o)) : _ !== f && o && !h && (v(f) || T(216), s = Math.min(f.getChildrenSize(), s + 1));
|
|
2366
2369
|
} else {
|
|
2367
2370
|
const g = f.getIndexWithinParent();
|
|
2368
|
-
s = e === 0 && z(f) &&
|
|
2371
|
+
s = e === 0 && z(f) && et(n) === f ? g : g + 1, f = f.getParentOrThrow();
|
|
2369
2372
|
}
|
|
2370
2373
|
if (v(f)) return ge(f.__key, s, "element");
|
|
2371
2374
|
}
|
|
2372
|
-
} else i =
|
|
2375
|
+
} else i = et(n);
|
|
2373
2376
|
return M(i) ? ge(i.__key, s, "text") : null;
|
|
2374
2377
|
}
|
|
2375
|
-
function
|
|
2378
|
+
function ri(n, e, t) {
|
|
2376
2379
|
const r = n.offset, i = n.getNode();
|
|
2377
2380
|
if (r === 0) {
|
|
2378
2381
|
const s = i.getPreviousSibling(), o = i.getParent();
|
|
@@ -2391,10 +2394,10 @@ function ni(n, e, t) {
|
|
|
2391
2394
|
}
|
|
2392
2395
|
}
|
|
2393
2396
|
}
|
|
2394
|
-
function
|
|
2397
|
+
function ss(n, e, t) {
|
|
2395
2398
|
if (n.type === "text" && e.type === "text") {
|
|
2396
2399
|
const r = n.isBefore(e), i = n.is(e);
|
|
2397
|
-
|
|
2400
|
+
ri(n, r, i), ri(e, !r, i), i && e.set(n.key, n.offset, n.type);
|
|
2398
2401
|
const s = R();
|
|
2399
2402
|
if (s.isComposing() && s._compositionKey !== n.key && O(t)) {
|
|
2400
2403
|
const o = t.anchor, l = t.focus;
|
|
@@ -2402,55 +2405,55 @@ function rs(n, e, t) {
|
|
|
2402
2405
|
}
|
|
2403
2406
|
}
|
|
2404
2407
|
}
|
|
2405
|
-
function
|
|
2406
|
-
if (n === null || t === null || !
|
|
2407
|
-
const o =
|
|
2408
|
+
function os(n, e, t, r, i, s) {
|
|
2409
|
+
if (n === null || t === null || !vn(i, n, t)) return null;
|
|
2410
|
+
const o = ni(n, e, O(s) ? s.anchor : null, i);
|
|
2408
2411
|
if (o === null) return null;
|
|
2409
|
-
const l =
|
|
2412
|
+
const l = ni(t, r, O(s) ? s.focus : null, i);
|
|
2410
2413
|
if (l === null) return null;
|
|
2411
2414
|
if (o.type === "element" && l.type === "element") {
|
|
2412
|
-
const a =
|
|
2415
|
+
const a = et(n), c = et(t);
|
|
2413
2416
|
if (z(a) && z(c)) return null;
|
|
2414
2417
|
}
|
|
2415
|
-
return
|
|
2418
|
+
return ss(o, l, s), [o, l];
|
|
2416
2419
|
}
|
|
2417
|
-
function
|
|
2420
|
+
function Fl(n) {
|
|
2418
2421
|
return v(n) && !n.isInline();
|
|
2419
2422
|
}
|
|
2420
|
-
function
|
|
2421
|
-
const o = Fe(), l = new
|
|
2423
|
+
function ls(n, e, t, r, i, s) {
|
|
2424
|
+
const o = Fe(), l = new Xe(ge(n, e, i), ge(t, r, s), 0, "");
|
|
2422
2425
|
return l.dirty = !0, o._selection = l, l;
|
|
2423
2426
|
}
|
|
2424
|
-
function
|
|
2427
|
+
function Ko() {
|
|
2425
2428
|
const n = ge("root", 0, "element"), e = ge("root", 0, "element");
|
|
2426
|
-
return new
|
|
2429
|
+
return new Xe(n, e, 0, "");
|
|
2427
2430
|
}
|
|
2428
|
-
function
|
|
2429
|
-
return new
|
|
2431
|
+
function as() {
|
|
2432
|
+
return new yn(/* @__PURE__ */ new Set());
|
|
2430
2433
|
}
|
|
2431
|
-
function
|
|
2432
|
-
return
|
|
2434
|
+
function Ll(n, e) {
|
|
2435
|
+
return mn(null, n, e, null);
|
|
2433
2436
|
}
|
|
2434
|
-
function
|
|
2437
|
+
function mn(n, e, t, r) {
|
|
2435
2438
|
const i = t._window;
|
|
2436
2439
|
if (i === null) return null;
|
|
2437
|
-
const s = r || i.event, o = s ? s.type : void 0, l = o === "selectionchange", a = !
|
|
2440
|
+
const s = r || i.event, o = s ? s.type : void 0, l = o === "selectionchange", a = !jn && (l || o === "beforeinput" || o === "compositionstart" || o === "compositionend" || o === "click" && s && s.detail === 3 || o === "drop" || o === void 0);
|
|
2438
2441
|
let c, u, h, f;
|
|
2439
2442
|
if (O(n) && !a) return n.clone();
|
|
2440
2443
|
if (e === null) return null;
|
|
2441
|
-
if (c = e.anchorNode, u = e.focusNode, h = e.anchorOffset, f = e.focusOffset, l && O(n) && !
|
|
2442
|
-
const g =
|
|
2444
|
+
if (c = e.anchorNode, u = e.focusNode, h = e.anchorOffset, f = e.focusOffset, l && O(n) && !vn(t, c, u)) return n.clone();
|
|
2445
|
+
const g = os(c, h, u, f, t, n);
|
|
2443
2446
|
if (g === null) return null;
|
|
2444
2447
|
const [d, _] = g;
|
|
2445
|
-
return new
|
|
2448
|
+
return new Xe(d, _, O(n) ? n.format : 0, O(n) ? n.style : "");
|
|
2446
2449
|
}
|
|
2447
2450
|
function L() {
|
|
2448
2451
|
return Fe()._selection;
|
|
2449
2452
|
}
|
|
2450
|
-
function
|
|
2453
|
+
function ft() {
|
|
2451
2454
|
return R()._editorState._selection;
|
|
2452
2455
|
}
|
|
2453
|
-
function
|
|
2456
|
+
function un(n, e, t, r = 1) {
|
|
2454
2457
|
const i = n.anchor, s = n.focus, o = i.getNode(), l = s.getNode();
|
|
2455
2458
|
if (!e.is(o) && !e.is(l)) return;
|
|
2456
2459
|
const a = e.__key;
|
|
@@ -2458,7 +2461,7 @@ function cn(n, e, t, r = 1) {
|
|
|
2458
2461
|
const c = i.offset;
|
|
2459
2462
|
if (t <= c && r > 0 || t < c && r < 0) {
|
|
2460
2463
|
const u = Math.max(0, c + r);
|
|
2461
|
-
i.set(a, u, "element"), s.set(a, u, "element"),
|
|
2464
|
+
i.set(a, u, "element"), s.set(a, u, "element"), ii(n);
|
|
2462
2465
|
}
|
|
2463
2466
|
} else {
|
|
2464
2467
|
const c = n.isBackward(), u = c ? s : i, h = u.getNode(), f = c ? i : s, g = f.getNode();
|
|
@@ -2471,9 +2474,9 @@ function cn(n, e, t, r = 1) {
|
|
|
2471
2474
|
(t <= d && r > 0 || t < d && r < 0) && f.set(a, Math.max(0, d + r), "element");
|
|
2472
2475
|
}
|
|
2473
2476
|
}
|
|
2474
|
-
|
|
2477
|
+
ii(n);
|
|
2475
2478
|
}
|
|
2476
|
-
function
|
|
2479
|
+
function ii(n) {
|
|
2477
2480
|
const e = n.anchor, t = e.offset, r = n.focus, i = r.offset, s = e.getNode(), o = r.getNode();
|
|
2478
2481
|
if (n.isCollapsed()) {
|
|
2479
2482
|
if (!v(s)) return;
|
|
@@ -2499,33 +2502,33 @@ function ri(n) {
|
|
|
2499
2502
|
}
|
|
2500
2503
|
}
|
|
2501
2504
|
}
|
|
2502
|
-
function
|
|
2505
|
+
function fn(n, e, t, r, i) {
|
|
2503
2506
|
let s = null, o = 0, l = null;
|
|
2504
2507
|
r !== null ? (s = r.__key, M(r) ? (o = r.getTextContentSize(), l = "text") : v(r) && (o = r.getChildrenSize(), l = "element")) : i !== null && (s = i.__key, M(i) ? l = "text" : v(i) && (l = "element")), s !== null && l !== null ? n.set(s, o, l) : (o = e.getIndexWithinParent(), o === -1 && (o = t.getChildrenSize()), n.set(t.__key, o, "element"));
|
|
2505
2508
|
}
|
|
2506
|
-
function
|
|
2509
|
+
function si(n, e, t, r, i) {
|
|
2507
2510
|
n.type === "text" ? n.set(t, n.offset + (e ? 0 : i), "text") : n.offset > r.getIndexWithinParent() && n.set(n.key, n.offset - 1, "element");
|
|
2508
2511
|
}
|
|
2509
|
-
function
|
|
2512
|
+
function cs(n, e, t, r, i) {
|
|
2510
2513
|
try {
|
|
2511
2514
|
n.setBaseAndExtent(e, t, r, i);
|
|
2512
2515
|
} catch {
|
|
2513
2516
|
}
|
|
2514
2517
|
}
|
|
2515
|
-
function
|
|
2518
|
+
function zo(n, e, t, r, i, s, o) {
|
|
2516
2519
|
const l = r.anchorNode, a = r.focusNode, c = r.anchorOffset, u = r.focusOffset, h = document.activeElement;
|
|
2517
|
-
if (i.has(
|
|
2518
|
-
if (!O(e)) return void (n !== null &&
|
|
2519
|
-
const f = e.anchor, g = e.focus, d = f.key, _ = g.key, p =
|
|
2520
|
+
if (i.has(Jo) && h !== s || h !== null && ps(h)) return;
|
|
2521
|
+
if (!O(e)) return void (n !== null && vn(t, l, a) && r.removeAllRanges());
|
|
2522
|
+
const f = e.anchor, g = e.focus, d = f.key, _ = g.key, p = lt(t, d), x = lt(t, _), y = f.offset, m = g.offset, b = e.format, N = e.style, C = e.isCollapsed();
|
|
2520
2523
|
let w = p, k = x, S = !1;
|
|
2521
2524
|
if (f.type === "text") {
|
|
2522
|
-
w =
|
|
2525
|
+
w = ot(p);
|
|
2523
2526
|
const B = f.getNode();
|
|
2524
2527
|
S = B.getFormat() !== b || B.getStyle() !== N;
|
|
2525
2528
|
} else O(n) && n.anchor.type === "text" && (S = !0);
|
|
2526
2529
|
var A, F, W, K, P;
|
|
2527
|
-
if (g.type === "text" && (k =
|
|
2528
|
-
if (
|
|
2530
|
+
if (g.type === "text" && (k = ot(x)), w !== null && k !== null && (C && (n === null || S || O(n) && (n.format !== b || n.style !== N)) && (A = b, F = N, W = y, K = d, P = performance.now(), Gi = [A, F, W, K, P]), c !== y || u !== m || l !== w || a !== k || r.type === "Range" && C || (h !== null && s.contains(h) || s.focus({ preventScroll: !0 }), f.type === "element"))) {
|
|
2531
|
+
if (cs(r, w, y, k, m), !i.has(Uo) && e.isCollapsed() && s !== null && s === document.activeElement) {
|
|
2529
2532
|
const B = O(e) && e.anchor.type === "element" ? w.childNodes[y] || null : r.rangeCount > 0 ? r.getRangeAt(0) : null;
|
|
2530
2533
|
if (B !== null) {
|
|
2531
2534
|
let V;
|
|
@@ -2534,51 +2537,51 @@ function Ko(n, e, t, r, i, s, o) {
|
|
|
2534
2537
|
_e.selectNode(B), V = _e.getBoundingClientRect();
|
|
2535
2538
|
} else V = B.getBoundingClientRect();
|
|
2536
2539
|
(function(_e, pe, ye) {
|
|
2537
|
-
const
|
|
2538
|
-
if (
|
|
2539
|
-
let { top:
|
|
2540
|
+
const dt = Ns(ye), Dr = wr(dt);
|
|
2541
|
+
if (dt === null || Dr === null) return;
|
|
2542
|
+
let { top: wn, bottom: En } = pe, It = 0, Kt = 0, Ne = ye;
|
|
2540
2543
|
for (; Ne !== null; ) {
|
|
2541
|
-
const
|
|
2542
|
-
if (
|
|
2544
|
+
const Mn = Ne === dt.body;
|
|
2545
|
+
if (Mn) It = 0, Kt = oe(_e).innerHeight;
|
|
2543
2546
|
else {
|
|
2544
|
-
const
|
|
2545
|
-
|
|
2547
|
+
const zt = Ne.getBoundingClientRect();
|
|
2548
|
+
It = zt.top, Kt = zt.bottom;
|
|
2546
2549
|
}
|
|
2547
|
-
let
|
|
2548
|
-
if (
|
|
2550
|
+
let ht = 0;
|
|
2551
|
+
if (wn < It ? ht = -(It - wn) : En > Kt && (ht = En - Kt), ht !== 0) if (Mn) Dr.scrollBy(0, ht);
|
|
2549
2552
|
else {
|
|
2550
|
-
const
|
|
2551
|
-
Ne.scrollTop +=
|
|
2552
|
-
const
|
|
2553
|
-
|
|
2553
|
+
const zt = Ne.scrollTop;
|
|
2554
|
+
Ne.scrollTop += ht;
|
|
2555
|
+
const Pr = Ne.scrollTop - zt;
|
|
2556
|
+
wn -= Pr, En -= Pr;
|
|
2554
2557
|
}
|
|
2555
|
-
if (
|
|
2556
|
-
Ne =
|
|
2558
|
+
if (Mn) break;
|
|
2559
|
+
Ne = Pt(Ne);
|
|
2557
2560
|
}
|
|
2558
2561
|
})(t, V, s);
|
|
2559
2562
|
}
|
|
2560
2563
|
}
|
|
2561
|
-
|
|
2564
|
+
tr = !0;
|
|
2562
2565
|
}
|
|
2563
2566
|
}
|
|
2564
|
-
function
|
|
2565
|
-
let e = L() ||
|
|
2567
|
+
function Il(n) {
|
|
2568
|
+
let e = L() || ft();
|
|
2566
2569
|
e === null && (e = re().selectEnd()), e.insertNodes(n);
|
|
2567
2570
|
}
|
|
2568
|
-
function
|
|
2571
|
+
function Kn(n) {
|
|
2569
2572
|
let e = n;
|
|
2570
2573
|
n.isCollapsed() || e.removeText();
|
|
2571
2574
|
const t = L();
|
|
2572
2575
|
O(t) && (e = t), O(e) || T(161);
|
|
2573
2576
|
const r = e.anchor;
|
|
2574
2577
|
let i = r.getNode(), s = r.offset;
|
|
2575
|
-
for (; !
|
|
2578
|
+
for (; !Ee(i); ) {
|
|
2576
2579
|
const o = i;
|
|
2577
|
-
if ([i, s] =
|
|
2580
|
+
if ([i, s] = Bo(i, s), o.is(i)) break;
|
|
2578
2581
|
}
|
|
2579
2582
|
return s;
|
|
2580
2583
|
}
|
|
2581
|
-
function
|
|
2584
|
+
function Bo(n, e) {
|
|
2582
2585
|
const t = n.getParent();
|
|
2583
2586
|
if (!t) {
|
|
2584
2587
|
const i = Ae();
|
|
@@ -2593,25 +2596,25 @@ function zo(n, e) {
|
|
|
2593
2596
|
if (!v(n) || e === 0) return [t, n.getIndexWithinParent()];
|
|
2594
2597
|
const r = n.getChildAtIndex(e);
|
|
2595
2598
|
if (r) {
|
|
2596
|
-
const i = new
|
|
2599
|
+
const i = new Xe(ge(n.__key, e, "element"), ge(n.__key, e, "element"), 0, ""), s = n.insertNewAfter(i);
|
|
2597
2600
|
s && s.append(r, ...r.getNextSiblings());
|
|
2598
2601
|
}
|
|
2599
2602
|
return [t, n.getIndexWithinParent() + 1];
|
|
2600
2603
|
}
|
|
2601
|
-
function
|
|
2604
|
+
function oi(n, e, t, r, i = "decorators-and-blocks") {
|
|
2602
2605
|
if (e === "move" && r === "character" && !n.isCollapsed()) {
|
|
2603
2606
|
const [u, h] = t === n.isBackward() ? [n.focus, n.anchor] : [n.anchor, n.focus];
|
|
2604
2607
|
return h.set(u.key, u.offset, u.type), !0;
|
|
2605
2608
|
}
|
|
2606
|
-
const s =
|
|
2609
|
+
const s = qe(n.focus, t ? "previous" : "next"), o = r === "lineboundary", l = e === "move";
|
|
2607
2610
|
let a = s, c = i === "decorators-and-blocks";
|
|
2608
|
-
if (!
|
|
2611
|
+
if (!Cl(a)) {
|
|
2609
2612
|
for (const u of a) {
|
|
2610
2613
|
c = !1;
|
|
2611
2614
|
const { origin: h } = u;
|
|
2612
2615
|
if (!z(h) || h.isIsolated() || (a = u, !o || !h.isInline())) break;
|
|
2613
2616
|
}
|
|
2614
|
-
if (c) for (const u of
|
|
2617
|
+
if (c) for (const u of ws(s).iterNodeCarets(e === "extend" ? "shadowRoot" : "root")) {
|
|
2615
2618
|
if (he(u)) u.origin.isInline() || (a = u);
|
|
2616
2619
|
else {
|
|
2617
2620
|
if (v(u.origin)) continue;
|
|
@@ -2622,34 +2625,34 @@ function si(n, e, t, r, i = "decorators-and-blocks") {
|
|
|
2622
2625
|
}
|
|
2623
2626
|
if (a === s) return !1;
|
|
2624
2627
|
if (l && !o && z(a.origin) && a.origin.isKeyboardSelectable()) {
|
|
2625
|
-
const u =
|
|
2628
|
+
const u = as();
|
|
2626
2629
|
return u.add(a.origin.getKey()), ie(u), !0;
|
|
2627
2630
|
}
|
|
2628
|
-
return a = de(a), l &&
|
|
2631
|
+
return a = de(a), l && wt(n.anchor, a), wt(n.focus, a), c || !o;
|
|
2629
2632
|
}
|
|
2630
|
-
let U = null,
|
|
2631
|
-
const
|
|
2632
|
-
function
|
|
2633
|
+
let U = null, j = null, Z = !1, zn = !1, Ht = 0;
|
|
2634
|
+
const li = { characterData: !0, childList: !0, subtree: !0 };
|
|
2635
|
+
function At() {
|
|
2633
2636
|
return Z || U !== null && U._readOnly;
|
|
2634
2637
|
}
|
|
2635
2638
|
function G() {
|
|
2636
2639
|
Z && T(13);
|
|
2637
2640
|
}
|
|
2638
|
-
function
|
|
2639
|
-
|
|
2641
|
+
function us() {
|
|
2642
|
+
Ht > 99 && T(14);
|
|
2640
2643
|
}
|
|
2641
2644
|
function Fe() {
|
|
2642
|
-
return U === null && T(195,
|
|
2645
|
+
return U === null && T(195, fs()), U;
|
|
2643
2646
|
}
|
|
2644
2647
|
function R() {
|
|
2645
|
-
return
|
|
2648
|
+
return j === null && T(196, fs()), j;
|
|
2646
2649
|
}
|
|
2647
|
-
function
|
|
2650
|
+
function fs() {
|
|
2648
2651
|
let n = 0;
|
|
2649
|
-
const e = /* @__PURE__ */ new Set(), t =
|
|
2652
|
+
const e = /* @__PURE__ */ new Set(), t = Sn.version;
|
|
2650
2653
|
if (typeof window < "u") for (const i of document.querySelectorAll("[contenteditable]")) {
|
|
2651
|
-
const s =
|
|
2652
|
-
if (
|
|
2654
|
+
const s = kn(i);
|
|
2655
|
+
if (Sr(s)) n++;
|
|
2653
2656
|
else if (s) {
|
|
2654
2657
|
let o = String(s.constructor.version || "<0.17.1");
|
|
2655
2658
|
o === t && (o += " (separately built, likely a bundler configuration issue)"), e.add(o);
|
|
@@ -2658,10 +2661,10 @@ function cs() {
|
|
|
2658
2661
|
let r = ` Detected on the page: ${n} compatible editor(s) with version ${t}`;
|
|
2659
2662
|
return e.size && (r += ` and incompatible editors with versions ${Array.from(e).join(", ")}`), r;
|
|
2660
2663
|
}
|
|
2661
|
-
function
|
|
2662
|
-
return
|
|
2664
|
+
function Ro() {
|
|
2665
|
+
return j;
|
|
2663
2666
|
}
|
|
2664
|
-
function
|
|
2667
|
+
function ai(n, e, t) {
|
|
2665
2668
|
const r = e.__type, i = function(l, a) {
|
|
2666
2669
|
const c = l._nodes.get(a);
|
|
2667
2670
|
return c === void 0 && T(30, a), c;
|
|
@@ -2671,73 +2674,73 @@ function li(n, e, t) {
|
|
|
2671
2674
|
const o = s.length;
|
|
2672
2675
|
for (let l = 0; l < o && (s[l](e), e.isAttached()); l++) ;
|
|
2673
2676
|
}
|
|
2674
|
-
function
|
|
2677
|
+
function ci(n, e) {
|
|
2675
2678
|
return n !== void 0 && n.__key !== e && n.isAttached();
|
|
2676
2679
|
}
|
|
2677
|
-
function
|
|
2680
|
+
function ds(n, e) {
|
|
2678
2681
|
if (!e) return;
|
|
2679
2682
|
const t = n._updateTags;
|
|
2680
2683
|
let r = e;
|
|
2681
2684
|
Array.isArray(e) || (r = [e]);
|
|
2682
2685
|
for (const i of r) t.add(i);
|
|
2683
2686
|
}
|
|
2684
|
-
function
|
|
2685
|
-
return
|
|
2687
|
+
function Kl(n) {
|
|
2688
|
+
return mr(n, R()._nodes);
|
|
2686
2689
|
}
|
|
2687
|
-
function
|
|
2690
|
+
function mr(n, e) {
|
|
2688
2691
|
const t = n.type, r = e.get(t);
|
|
2689
2692
|
r === void 0 && T(17, t);
|
|
2690
2693
|
const i = r.klass;
|
|
2691
2694
|
n.type !== i.getType() && T(18, i.name);
|
|
2692
2695
|
const s = i.importJSON(n), o = n.children;
|
|
2693
2696
|
if (v(s) && Array.isArray(o)) for (let l = 0; l < o.length; l++) {
|
|
2694
|
-
const a =
|
|
2697
|
+
const a = mr(o[l], e);
|
|
2695
2698
|
s.append(a);
|
|
2696
2699
|
}
|
|
2697
2700
|
return s;
|
|
2698
2701
|
}
|
|
2699
|
-
function
|
|
2700
|
-
const r = U, i = Z, s =
|
|
2701
|
-
U = e, Z = !0,
|
|
2702
|
+
function ui(n, e, t) {
|
|
2703
|
+
const r = U, i = Z, s = j;
|
|
2704
|
+
U = e, Z = !0, j = n;
|
|
2702
2705
|
try {
|
|
2703
2706
|
return t();
|
|
2704
2707
|
} finally {
|
|
2705
|
-
U = r, Z = i,
|
|
2708
|
+
U = r, Z = i, j = s;
|
|
2706
2709
|
}
|
|
2707
2710
|
}
|
|
2708
2711
|
function ve(n, e) {
|
|
2709
2712
|
const t = n._pendingEditorState, r = n._rootElement, i = n._headless || r === null;
|
|
2710
2713
|
if (t === null) return;
|
|
2711
|
-
const s = n._editorState, o = s._selection, l = t._selection, a = n._dirtyType !==
|
|
2714
|
+
const s = n._editorState, o = s._selection, l = t._selection, a = n._dirtyType !== Je, c = U, u = Z, h = j, f = n._updating, g = n._observer;
|
|
2712
2715
|
let d = null;
|
|
2713
2716
|
if (n._pendingEditorState = null, n._editorState = t, !i && a && g !== null) {
|
|
2714
|
-
|
|
2717
|
+
j = n, U = t, Z = !1, n._updating = !0;
|
|
2715
2718
|
try {
|
|
2716
2719
|
const C = n._dirtyType, w = n._dirtyElements, k = n._dirtyLeaves;
|
|
2717
|
-
g.disconnect(), d =
|
|
2720
|
+
g.disconnect(), d = oo(s, t, n, C, w, k);
|
|
2718
2721
|
} catch (C) {
|
|
2719
|
-
if (C instanceof Error && n._onError(C),
|
|
2720
|
-
return
|
|
2722
|
+
if (C instanceof Error && n._onError(C), zn) throw C;
|
|
2723
|
+
return _s(n, null, r, t), Li(n), n._dirtyType = st, zn = !0, ve(n, s), void (zn = !1);
|
|
2721
2724
|
} finally {
|
|
2722
|
-
g.observe(r,
|
|
2725
|
+
g.observe(r, li), n._updating = f, U = c, Z = u, j = h;
|
|
2723
2726
|
}
|
|
2724
2727
|
}
|
|
2725
2728
|
t._readOnly || (t._readOnly = !0);
|
|
2726
2729
|
const _ = n._dirtyLeaves, p = n._dirtyElements, x = n._normalizedNodes, y = n._updateTags, m = n._deferred;
|
|
2727
|
-
a && (n._dirtyType =
|
|
2730
|
+
a && (n._dirtyType = Je, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements = /* @__PURE__ */ new Map(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set()), function(C, w) {
|
|
2728
2731
|
const k = C._decorators;
|
|
2729
2732
|
let S = C._pendingDecorators || k;
|
|
2730
2733
|
const A = w._nodeMap;
|
|
2731
2734
|
let F;
|
|
2732
|
-
for (F in S) A.has(F) || (S === k && (S =
|
|
2735
|
+
for (F in S) A.has(F) || (S === k && (S = Cs(C)), delete S[F]);
|
|
2733
2736
|
}(n, t);
|
|
2734
2737
|
const b = i ? null : Te(oe(n));
|
|
2735
|
-
if (n._editable && b !== null && (a || l === null || l.dirty) && r !== null && !y.has(
|
|
2736
|
-
|
|
2738
|
+
if (n._editable && b !== null && (a || l === null || l.dirty) && r !== null && !y.has(jo)) {
|
|
2739
|
+
j = n, U = t;
|
|
2737
2740
|
try {
|
|
2738
2741
|
if (g !== null && g.disconnect(), a || l === null || l.dirty) {
|
|
2739
2742
|
const C = n._blockCursorElement;
|
|
2740
|
-
C !== null &&
|
|
2743
|
+
C !== null && sr(C, n, r), zo(o, l, n, b, y, r);
|
|
2741
2744
|
}
|
|
2742
2745
|
(function(C, w, k) {
|
|
2743
2746
|
let S = C._blockCursorElement;
|
|
@@ -2745,12 +2748,12 @@ function ve(n, e) {
|
|
|
2745
2748
|
const A = k.anchor, F = A.getNode(), W = A.offset;
|
|
2746
2749
|
let K = !1, P = null;
|
|
2747
2750
|
if (W === F.getChildrenSize())
|
|
2748
|
-
|
|
2751
|
+
Wn(F.getChildAtIndex(W - 1)) && (K = !0);
|
|
2749
2752
|
else {
|
|
2750
2753
|
const B = F.getChildAtIndex(W);
|
|
2751
|
-
if (B !== null &&
|
|
2754
|
+
if (B !== null && Wn(B)) {
|
|
2752
2755
|
const V = B.getPreviousSibling();
|
|
2753
|
-
(V === null ||
|
|
2756
|
+
(V === null || Wn(V)) && (K = !0, P = C.getElementByKey(B.__key));
|
|
2754
2757
|
}
|
|
2755
2758
|
}
|
|
2756
2759
|
if (K) {
|
|
@@ -2761,8 +2764,8 @@ function ve(n, e) {
|
|
|
2761
2764
|
let ye = _e.blockCursor;
|
|
2762
2765
|
if (ye !== void 0) {
|
|
2763
2766
|
if (typeof ye == "string") {
|
|
2764
|
-
const
|
|
2765
|
-
ye = _e.blockCursor =
|
|
2767
|
+
const dt = Zt(ye);
|
|
2768
|
+
ye = _e.blockCursor = dt;
|
|
2766
2769
|
}
|
|
2767
2770
|
ye !== void 0 && pe.classList.add(...ye);
|
|
2768
2771
|
}
|
|
@@ -2770,10 +2773,10 @@ function ve(n, e) {
|
|
|
2770
2773
|
}(C._config)), w.style.caretColor = "transparent", void (P === null ? B.appendChild(S) : B.insertBefore(S, P));
|
|
2771
2774
|
}
|
|
2772
2775
|
}
|
|
2773
|
-
S !== null &&
|
|
2776
|
+
S !== null && sr(S, C, w);
|
|
2774
2777
|
})(n, r, l);
|
|
2775
2778
|
} finally {
|
|
2776
|
-
g !== null && g.observe(r,
|
|
2779
|
+
g !== null && g.observe(r, li), j = h, U = c;
|
|
2777
2780
|
}
|
|
2778
2781
|
}
|
|
2779
2782
|
d !== null && function(C, w, k, S, A) {
|
|
@@ -2782,12 +2785,12 @@ function ve(n, e) {
|
|
|
2782
2785
|
const [P, B] = F[K], V = w.get(B);
|
|
2783
2786
|
V !== void 0 && P(V, { dirtyLeaves: S, prevEditorState: A, updateTags: k });
|
|
2784
2787
|
}
|
|
2785
|
-
}(n, d, y, _, s), O(l) || l === null || o !== null && o.is(l) || n.dispatchCommand(
|
|
2788
|
+
}(n, d, y, _, s), O(l) || l === null || o !== null && o.is(l) || n.dispatchCommand(Ji, void 0);
|
|
2786
2789
|
const N = n._pendingDecorators;
|
|
2787
|
-
N !== null && (n._decorators = N, n._pendingDecorators = null,
|
|
2788
|
-
const S =
|
|
2789
|
-
S !== A &&
|
|
2790
|
-
}(n, e || s, t),
|
|
2790
|
+
N !== null && (n._decorators = N, n._pendingDecorators = null, xt("decorator", n, !0, N)), function(C, w, k) {
|
|
2791
|
+
const S = _i(w), A = _i(k);
|
|
2792
|
+
S !== A && xt("textcontent", C, !0, A);
|
|
2793
|
+
}(n, e || s, t), xt("update", n, !0, { dirtyElements: p, dirtyLeaves: _, editorState: t, mutatedNodes: d, normalizedNodes: x, prevEditorState: e || s, tags: y }), function(C, w) {
|
|
2791
2794
|
if (C._deferred = [], w.length !== 0) {
|
|
2792
2795
|
const k = C._updating;
|
|
2793
2796
|
C._updating = !0;
|
|
@@ -2803,12 +2806,12 @@ function ve(n, e) {
|
|
|
2803
2806
|
const k = w.shift();
|
|
2804
2807
|
if (k) {
|
|
2805
2808
|
const [S, A] = k;
|
|
2806
|
-
|
|
2809
|
+
xr(C, S, A);
|
|
2807
2810
|
}
|
|
2808
2811
|
}
|
|
2809
2812
|
}(n);
|
|
2810
2813
|
}
|
|
2811
|
-
function
|
|
2814
|
+
function xt(n, e, t, ...r) {
|
|
2812
2815
|
const i = e._updating;
|
|
2813
2816
|
e._updating = t;
|
|
2814
2817
|
try {
|
|
@@ -2818,7 +2821,7 @@ function mt(n, e, t, ...r) {
|
|
|
2818
2821
|
e._updating = i;
|
|
2819
2822
|
}
|
|
2820
2823
|
}
|
|
2821
|
-
function
|
|
2824
|
+
function fi(n, e) {
|
|
2822
2825
|
const t = n._updates;
|
|
2823
2826
|
let r = e || !1;
|
|
2824
2827
|
for (; t.length !== 0; ) {
|
|
@@ -2831,30 +2834,30 @@ function ui(n, e) {
|
|
|
2831
2834
|
const a = n._pendingEditorState;
|
|
2832
2835
|
a === null && T(191), a._flushSync = !0;
|
|
2833
2836
|
}
|
|
2834
|
-
l && n._deferred.push(l),
|
|
2837
|
+
l && n._deferred.push(l), ds(n, o.tag);
|
|
2835
2838
|
}
|
|
2836
2839
|
s();
|
|
2837
2840
|
}
|
|
2838
2841
|
}
|
|
2839
2842
|
return r;
|
|
2840
2843
|
}
|
|
2841
|
-
function
|
|
2844
|
+
function xr(n, e, t) {
|
|
2842
2845
|
const r = n._updateTags;
|
|
2843
2846
|
let i, s = !1, o = !1;
|
|
2844
|
-
t !== void 0 && (i = t.onUpdate,
|
|
2847
|
+
t !== void 0 && (i = t.onUpdate, ds(n, t.tag), s = t.skipTransforms || !1, o = t.discrete || !1), i && n._deferred.push(i);
|
|
2845
2848
|
const l = n._editorState;
|
|
2846
2849
|
let a = n._pendingEditorState, c = !1;
|
|
2847
|
-
(a === null || a._readOnly) && (a = n._pendingEditorState =
|
|
2848
|
-
const u = U, h = Z, f =
|
|
2849
|
-
U = a, Z = !1, n._updating = !0,
|
|
2850
|
+
(a === null || a._readOnly) && (a = n._pendingEditorState = hs(a || l), c = !0), a._flushSync = o;
|
|
2851
|
+
const u = U, h = Z, f = j, g = n._updating;
|
|
2852
|
+
U = a, Z = !1, n._updating = !0, j = n;
|
|
2850
2853
|
const d = n._headless || n.getRootElement() === null;
|
|
2851
2854
|
try {
|
|
2852
2855
|
c && (d ? l._selection !== null && (a._selection = l._selection.clone()) : a._selection = function(y, m) {
|
|
2853
2856
|
const b = y.getEditorState()._selection, N = Te(oe(y));
|
|
2854
|
-
return O(b) || b == null ?
|
|
2857
|
+
return O(b) || b == null ? mn(b, N, y, m) : b.clone();
|
|
2855
2858
|
}(n, t && t.event || null));
|
|
2856
2859
|
const p = n._compositionKey;
|
|
2857
|
-
e(), s =
|
|
2860
|
+
e(), s = fi(n, s), function(y, m) {
|
|
2858
2861
|
const b = m.getEditorState()._selection, N = y._selection;
|
|
2859
2862
|
if (O(N)) {
|
|
2860
2863
|
const C = N.anchor, w = N.focus;
|
|
@@ -2864,24 +2867,24 @@ function mr(n, e, t) {
|
|
|
2864
2867
|
k !== S && S.selectionTransform(b, N);
|
|
2865
2868
|
}
|
|
2866
2869
|
}
|
|
2867
|
-
}(a, n), n._dirtyType !==
|
|
2870
|
+
}(a, n), n._dirtyType !== Je && (s ? function(y, m) {
|
|
2868
2871
|
const b = m._dirtyLeaves, N = y._nodeMap;
|
|
2869
2872
|
for (const C of b) {
|
|
2870
2873
|
const w = N.get(C);
|
|
2871
|
-
M(w) && w.isAttached() && w.isSimpleText() && !w.isUnmergeable() &&
|
|
2874
|
+
M(w) && w.isAttached() && w.isSimpleText() && !w.isUnmergeable() && zr(w);
|
|
2872
2875
|
}
|
|
2873
2876
|
}(a, n) : function(y, m) {
|
|
2874
|
-
const b = m._dirtyLeaves, N = m._dirtyElements, C = y._nodeMap, w =
|
|
2877
|
+
const b = m._dirtyLeaves, N = m._dirtyElements, C = y._nodeMap, w = Me(), k = /* @__PURE__ */ new Map();
|
|
2875
2878
|
let S = b, A = S.size, F = N, W = F.size;
|
|
2876
2879
|
for (; A > 0 || W > 0; ) {
|
|
2877
2880
|
if (A > 0) {
|
|
2878
2881
|
m._dirtyLeaves = /* @__PURE__ */ new Set();
|
|
2879
2882
|
for (const K of S) {
|
|
2880
2883
|
const P = C.get(K);
|
|
2881
|
-
M(P) && P.isAttached() && P.isSimpleText() && !P.isUnmergeable() &&
|
|
2884
|
+
M(P) && P.isAttached() && P.isSimpleText() && !P.isUnmergeable() && zr(P), P !== void 0 && ci(P, w) && ai(m, P, k), b.add(K);
|
|
2882
2885
|
}
|
|
2883
2886
|
if (S = m._dirtyLeaves, A = S.size, A > 0) {
|
|
2884
|
-
|
|
2887
|
+
Ht++;
|
|
2885
2888
|
continue;
|
|
2886
2889
|
}
|
|
2887
2890
|
}
|
|
@@ -2890,16 +2893,16 @@ function mr(n, e, t) {
|
|
|
2890
2893
|
const P = K[0], B = K[1];
|
|
2891
2894
|
if (N.set(P, B), !B) continue;
|
|
2892
2895
|
const V = C.get(P);
|
|
2893
|
-
V !== void 0 &&
|
|
2896
|
+
V !== void 0 && ci(V, w) && ai(m, V, k);
|
|
2894
2897
|
}
|
|
2895
|
-
S = m._dirtyLeaves, A = S.size, F = m._dirtyElements, W = F.size,
|
|
2898
|
+
S = m._dirtyLeaves, A = S.size, F = m._dirtyElements, W = F.size, Ht++;
|
|
2896
2899
|
}
|
|
2897
2900
|
m._dirtyLeaves = b, m._dirtyElements = N;
|
|
2898
|
-
}(a, n),
|
|
2901
|
+
}(a, n), fi(n), function(y, m, b, N) {
|
|
2899
2902
|
const C = y._nodeMap, w = m._nodeMap, k = [];
|
|
2900
2903
|
for (const [S] of N) {
|
|
2901
2904
|
const A = w.get(S);
|
|
2902
|
-
A !== void 0 && (A.isAttached() || (v(A) &&
|
|
2905
|
+
A !== void 0 && (A.isAttached() || (v(A) && Di(A, S, C, w, k, N), C.has(S) || N.delete(S), k.push(S)));
|
|
2903
2906
|
}
|
|
2904
2907
|
for (const S of k) w.delete(S);
|
|
2905
2908
|
for (const S of b) {
|
|
@@ -2911,37 +2914,37 @@ function mr(n, e, t) {
|
|
|
2911
2914
|
if (O(x)) {
|
|
2912
2915
|
const y = a._nodeMap, m = x.anchor.key, b = x.focus.key;
|
|
2913
2916
|
y.get(m) !== void 0 && y.get(b) !== void 0 || T(19);
|
|
2914
|
-
} else
|
|
2917
|
+
} else yr(x) && x._nodes.size === 0 && (a._selection = null);
|
|
2915
2918
|
} catch (p) {
|
|
2916
|
-
return p instanceof Error && n._onError(p), n._pendingEditorState = l, n._dirtyType =
|
|
2919
|
+
return p instanceof Error && n._onError(p), n._pendingEditorState = l, n._dirtyType = st, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements.clear(), void ve(n);
|
|
2917
2920
|
} finally {
|
|
2918
|
-
U = u, Z = h,
|
|
2921
|
+
U = u, Z = h, j = f, n._updating = g, Ht = 0;
|
|
2919
2922
|
}
|
|
2920
|
-
n._dirtyType !==
|
|
2923
|
+
n._dirtyType !== Je || n._deferred.length > 0 || function(p, x) {
|
|
2921
2924
|
const y = x.getEditorState()._selection, m = p._selection;
|
|
2922
2925
|
if (m !== null) {
|
|
2923
2926
|
if (m.dirty || !m.is(y)) return !0;
|
|
2924
2927
|
} else if (y !== null) return !0;
|
|
2925
2928
|
return !1;
|
|
2926
|
-
}(a, n) ? a._flushSync ? (a._flushSync = !1, ve(n)) : c &&
|
|
2929
|
+
}(a, n) ? a._flushSync ? (a._flushSync = !1, ve(n)) : c && Ho(() => {
|
|
2927
2930
|
ve(n);
|
|
2928
2931
|
}) : (a._flushSync = !1, c && (r.clear(), n._deferred = [], n._pendingEditorState = null));
|
|
2929
2932
|
}
|
|
2930
2933
|
function te(n, e, t) {
|
|
2931
|
-
|
|
2934
|
+
j === n && t === void 0 ? e() : xr(n, e, t);
|
|
2932
2935
|
}
|
|
2933
|
-
class
|
|
2936
|
+
class Ct {
|
|
2934
2937
|
constructor(e, t, r) {
|
|
2935
2938
|
this.element = e, this.before = t || null, this.after = r || null;
|
|
2936
2939
|
}
|
|
2937
2940
|
withBefore(e) {
|
|
2938
|
-
return new
|
|
2941
|
+
return new Ct(this.element, e, this.after);
|
|
2939
2942
|
}
|
|
2940
2943
|
withAfter(e) {
|
|
2941
|
-
return new
|
|
2944
|
+
return new Ct(this.element, this.before, e);
|
|
2942
2945
|
}
|
|
2943
2946
|
withElement(e) {
|
|
2944
|
-
return this.element === e ? this : new
|
|
2947
|
+
return this.element === e ? this : new Ct(e, this.before, this.after);
|
|
2945
2948
|
}
|
|
2946
2949
|
insertChild(e) {
|
|
2947
2950
|
const t = this.before || this.getManagedLineBreak();
|
|
@@ -2963,7 +2966,7 @@ class xt {
|
|
|
2963
2966
|
setManagedLineBreak(e) {
|
|
2964
2967
|
if (e === null) this.removeManagedLineBreak();
|
|
2965
2968
|
else {
|
|
2966
|
-
const t = e === "decorator" && (
|
|
2969
|
+
const t = e === "decorator" && (it || St);
|
|
2967
2970
|
this.insertManagedLineBreak(t);
|
|
2968
2971
|
}
|
|
2969
2972
|
}
|
|
@@ -2996,9 +2999,9 @@ class xt {
|
|
|
2996
2999
|
const a = this.getFirstChildOffset();
|
|
2997
3000
|
return [e, Math.min(a + e.getChildrenSize(), Math.max(a, i))];
|
|
2998
3001
|
}
|
|
2999
|
-
const s =
|
|
3002
|
+
const s = di(t, r);
|
|
3000
3003
|
s.push(i);
|
|
3001
|
-
const o =
|
|
3004
|
+
const o = di(t, this.element);
|
|
3002
3005
|
let l = e.getIndexWithinParent();
|
|
3003
3006
|
for (let a = 0; a < o.length; a++) {
|
|
3004
3007
|
const c = s[a], u = o[a];
|
|
@@ -3011,7 +3014,7 @@ class xt {
|
|
|
3011
3014
|
return [e.getParentOrThrow(), l];
|
|
3012
3015
|
}
|
|
3013
3016
|
}
|
|
3014
|
-
function
|
|
3017
|
+
function di(n, e) {
|
|
3015
3018
|
const t = [];
|
|
3016
3019
|
let r = e;
|
|
3017
3020
|
for (; r !== n && r !== null; r = r.parentNode) {
|
|
@@ -3021,7 +3024,7 @@ function fi(n, e) {
|
|
|
3021
3024
|
}
|
|
3022
3025
|
return r !== n && T(225), t.reverse();
|
|
3023
3026
|
}
|
|
3024
|
-
class
|
|
3027
|
+
class xn extends pn {
|
|
3025
3028
|
constructor(e) {
|
|
3026
3029
|
super(e), this.__first = null, this.__last = null, this.__size = 0, this.__format = 0, this.__style = "", this.__indent = 0, this.__dir = null, this.__textFormat = 0, this.__textStyle = "";
|
|
3027
3030
|
}
|
|
@@ -3033,7 +3036,7 @@ class mn extends _n {
|
|
|
3033
3036
|
}
|
|
3034
3037
|
getFormatType() {
|
|
3035
3038
|
const e = this.getFormat();
|
|
3036
|
-
return
|
|
3039
|
+
return Hs[e] || "";
|
|
3037
3040
|
}
|
|
3038
3041
|
getStyle() {
|
|
3039
3042
|
return this.getLatest().__style;
|
|
@@ -3108,7 +3111,7 @@ class mn extends _n {
|
|
|
3108
3111
|
}
|
|
3109
3112
|
getFirstChild() {
|
|
3110
3113
|
const e = this.getLatest().__first;
|
|
3111
|
-
return e === null ? null :
|
|
3114
|
+
return e === null ? null : $(e);
|
|
3112
3115
|
}
|
|
3113
3116
|
getFirstChildOrThrow() {
|
|
3114
3117
|
const e = this.getFirstChild();
|
|
@@ -3116,7 +3119,7 @@ class mn extends _n {
|
|
|
3116
3119
|
}
|
|
3117
3120
|
getLastChild() {
|
|
3118
3121
|
const e = this.getLatest().__last;
|
|
3119
|
-
return e === null ? null :
|
|
3122
|
+
return e === null ? null : $(e);
|
|
3120
3123
|
}
|
|
3121
3124
|
getLastChildOrThrow() {
|
|
3122
3125
|
const e = this.getLastChild();
|
|
@@ -3164,17 +3167,17 @@ class mn extends _n {
|
|
|
3164
3167
|
}
|
|
3165
3168
|
hasFormat(e) {
|
|
3166
3169
|
if (e !== "") {
|
|
3167
|
-
const t =
|
|
3170
|
+
const t = Lr[e];
|
|
3168
3171
|
return !!(this.getFormat() & t);
|
|
3169
3172
|
}
|
|
3170
3173
|
return !1;
|
|
3171
3174
|
}
|
|
3172
3175
|
hasTextFormat(e) {
|
|
3173
|
-
const t =
|
|
3176
|
+
const t = Ue[e];
|
|
3174
3177
|
return !!(this.getTextFormat() & t);
|
|
3175
3178
|
}
|
|
3176
3179
|
getFormatFlags(e, t) {
|
|
3177
|
-
return
|
|
3180
|
+
return dn(this.getLatest().__textFormat, e, t);
|
|
3178
3181
|
}
|
|
3179
3182
|
getTextStyle() {
|
|
3180
3183
|
return this.getLatest().__textStyle;
|
|
@@ -3195,7 +3198,7 @@ class mn extends _n {
|
|
|
3195
3198
|
}
|
|
3196
3199
|
i === void 0 && (i = o), s === void 0 && (s = o);
|
|
3197
3200
|
const l = this.__key;
|
|
3198
|
-
return O(r) ? (r.anchor.set(l, i, "element"), r.focus.set(l, s, "element"), r.dirty = !0, r) :
|
|
3201
|
+
return O(r) ? (r.anchor.set(l, i, "element"), r.focus.set(l, s, "element"), r.dirty = !0, r) : ls(l, i, l, s, "element", "element");
|
|
3199
3202
|
}
|
|
3200
3203
|
selectStart() {
|
|
3201
3204
|
const e = this.getFirstDescendant();
|
|
@@ -3217,7 +3220,7 @@ class mn extends _n {
|
|
|
3217
3220
|
return t.__dir = e, t;
|
|
3218
3221
|
}
|
|
3219
3222
|
setFormat(e) {
|
|
3220
|
-
return this.getWritable().__format = e !== "" ?
|
|
3223
|
+
return this.getWritable().__format = e !== "" ? Lr[e] : 0, this;
|
|
3221
3224
|
}
|
|
3222
3225
|
setStyle(e) {
|
|
3223
3226
|
return this.getWritable().__style = e || "", this;
|
|
@@ -3248,7 +3251,7 @@ class mn extends _n {
|
|
|
3248
3251
|
for (let _ = 0; _ < t; _++) {
|
|
3249
3252
|
d === null && T(100);
|
|
3250
3253
|
const p = d.getNextSibling(), x = d.__key;
|
|
3251
|
-
|
|
3254
|
+
Re(d.getWritable()), c.push(x), d = p;
|
|
3252
3255
|
}
|
|
3253
3256
|
}
|
|
3254
3257
|
let g = h;
|
|
@@ -3256,7 +3259,7 @@ class mn extends _n {
|
|
|
3256
3259
|
const _ = r[d];
|
|
3257
3260
|
g !== null && _.is(g) && (h = g = g.getPreviousSibling());
|
|
3258
3261
|
const p = _.getWritable();
|
|
3259
|
-
p.__parent === l && f--,
|
|
3262
|
+
p.__parent === l && f--, Re(p);
|
|
3260
3263
|
const x = _.__key;
|
|
3261
3264
|
if (g === null) o.__first = x, p.__prev = null;
|
|
3262
3265
|
else {
|
|
@@ -3278,13 +3281,13 @@ class mn extends _n {
|
|
|
3278
3281
|
const d = L();
|
|
3279
3282
|
if (O(d)) {
|
|
3280
3283
|
const _ = new Set(c), p = new Set(a), { anchor: x, focus: y } = d;
|
|
3281
|
-
|
|
3284
|
+
hi(x, _, p) && fn(x, x.getNode(), this, h, u), hi(y, _, p) && fn(y, y.getNode(), this, h, u), f !== 0 || this.canBeEmpty() || Le(this) || this.remove();
|
|
3282
3285
|
}
|
|
3283
3286
|
}
|
|
3284
3287
|
return o;
|
|
3285
3288
|
}
|
|
3286
3289
|
getDOMSlot(e) {
|
|
3287
|
-
return new
|
|
3290
|
+
return new Ct(e);
|
|
3288
3291
|
}
|
|
3289
3292
|
exportDOM(e) {
|
|
3290
3293
|
const { element: t } = super.exportDOM(e);
|
|
@@ -3355,9 +3358,9 @@ class mn extends _n {
|
|
|
3355
3358
|
}
|
|
3356
3359
|
}
|
|
3357
3360
|
function v(n) {
|
|
3358
|
-
return n instanceof
|
|
3361
|
+
return n instanceof xn;
|
|
3359
3362
|
}
|
|
3360
|
-
function
|
|
3363
|
+
function hi(n, e, t) {
|
|
3361
3364
|
let r = n.getNode();
|
|
3362
3365
|
for (; r; ) {
|
|
3363
3366
|
const i = r.__key;
|
|
@@ -3366,7 +3369,7 @@ function di(n, e, t) {
|
|
|
3366
3369
|
}
|
|
3367
3370
|
return !1;
|
|
3368
3371
|
}
|
|
3369
|
-
class
|
|
3372
|
+
class Wo extends pn {
|
|
3370
3373
|
decorate(e, t) {
|
|
3371
3374
|
T(47);
|
|
3372
3375
|
}
|
|
@@ -3381,14 +3384,14 @@ class Ro extends _n {
|
|
|
3381
3384
|
}
|
|
3382
3385
|
}
|
|
3383
3386
|
function z(n) {
|
|
3384
|
-
return n instanceof
|
|
3387
|
+
return n instanceof Wo;
|
|
3385
3388
|
}
|
|
3386
|
-
class
|
|
3389
|
+
class Ot extends xn {
|
|
3387
3390
|
static getType() {
|
|
3388
3391
|
return "root";
|
|
3389
3392
|
}
|
|
3390
3393
|
static clone() {
|
|
3391
|
-
return new
|
|
3394
|
+
return new Ot();
|
|
3392
3395
|
}
|
|
3393
3396
|
constructor() {
|
|
3394
3397
|
super("root"), this.__cachedText = null;
|
|
@@ -3398,7 +3401,7 @@ class At extends mn {
|
|
|
3398
3401
|
}
|
|
3399
3402
|
getTextContent() {
|
|
3400
3403
|
const e = this.__cachedText;
|
|
3401
|
-
return !
|
|
3404
|
+
return !At() && R()._dirtyType !== Je || e === null ? super.getTextContent() : e;
|
|
3402
3405
|
}
|
|
3403
3406
|
remove() {
|
|
3404
3407
|
T(52);
|
|
@@ -3427,28 +3430,28 @@ class At extends mn {
|
|
|
3427
3430
|
}
|
|
3428
3431
|
}
|
|
3429
3432
|
function ne(n) {
|
|
3430
|
-
return n instanceof
|
|
3433
|
+
return n instanceof Ot;
|
|
3431
3434
|
}
|
|
3432
|
-
function
|
|
3433
|
-
return new
|
|
3435
|
+
function hs(n) {
|
|
3436
|
+
return new Cn(new Map(n._nodeMap));
|
|
3434
3437
|
}
|
|
3435
|
-
function
|
|
3436
|
-
return new
|
|
3438
|
+
function Cr() {
|
|
3439
|
+
return new Cn(/* @__PURE__ */ new Map([["root", new Ot()]]));
|
|
3437
3440
|
}
|
|
3438
|
-
function
|
|
3441
|
+
function gs(n) {
|
|
3439
3442
|
const e = n.exportJSON(), t = n.constructor;
|
|
3440
3443
|
if (e.type !== t.getType() && T(130, t.name), v(n)) {
|
|
3441
3444
|
const r = e.children;
|
|
3442
3445
|
Array.isArray(r) || T(59, t.name);
|
|
3443
3446
|
const i = n.getChildren();
|
|
3444
3447
|
for (let s = 0; s < i.length; s++) {
|
|
3445
|
-
const o =
|
|
3448
|
+
const o = gs(i[s]);
|
|
3446
3449
|
r.push(o);
|
|
3447
3450
|
}
|
|
3448
3451
|
}
|
|
3449
3452
|
return e;
|
|
3450
3453
|
}
|
|
3451
|
-
class
|
|
3454
|
+
class Cn {
|
|
3452
3455
|
constructor(e, t) {
|
|
3453
3456
|
this._nodeMap = e, this._selection = t || null, this._flushSync = !1, this._readOnly = !1;
|
|
3454
3457
|
}
|
|
@@ -3456,18 +3459,18 @@ class xn {
|
|
|
3456
3459
|
return this._nodeMap.size === 1 && this._selection === null;
|
|
3457
3460
|
}
|
|
3458
3461
|
read(e, t) {
|
|
3459
|
-
return
|
|
3462
|
+
return ui(t && t.editor || null, this, e);
|
|
3460
3463
|
}
|
|
3461
3464
|
clone(e) {
|
|
3462
|
-
const t = new
|
|
3465
|
+
const t = new Cn(this._nodeMap, e === void 0 ? this._selection : e);
|
|
3463
3466
|
return t._readOnly = !0, t;
|
|
3464
3467
|
}
|
|
3465
3468
|
toJSON() {
|
|
3466
|
-
return
|
|
3469
|
+
return ui(null, this, () => ({ root: gs(re()) }));
|
|
3467
3470
|
}
|
|
3468
3471
|
}
|
|
3469
|
-
const
|
|
3470
|
-
class $o extends
|
|
3472
|
+
const zl = "historic", Bl = "history-push", Bn = "history-merge", Rl = "paste", Jo = "collaboration", Uo = "skip-scroll-into-view", jo = "skip-dom-selection";
|
|
3473
|
+
class $o extends xn {
|
|
3471
3474
|
static getType() {
|
|
3472
3475
|
return "artificial";
|
|
3473
3476
|
}
|
|
@@ -3475,22 +3478,22 @@ class $o extends mn {
|
|
|
3475
3478
|
return document.createElement("div");
|
|
3476
3479
|
}
|
|
3477
3480
|
}
|
|
3478
|
-
class
|
|
3481
|
+
class Dt extends xn {
|
|
3479
3482
|
static getType() {
|
|
3480
3483
|
return "paragraph";
|
|
3481
3484
|
}
|
|
3482
3485
|
static clone(e) {
|
|
3483
|
-
return new
|
|
3486
|
+
return new Dt(e.__key);
|
|
3484
3487
|
}
|
|
3485
3488
|
createDOM(e) {
|
|
3486
|
-
const t = document.createElement("p"), r =
|
|
3489
|
+
const t = document.createElement("p"), r = rt(e.theme, "paragraph");
|
|
3487
3490
|
return r !== void 0 && t.classList.add(...r), t;
|
|
3488
3491
|
}
|
|
3489
3492
|
updateDOM(e, t, r) {
|
|
3490
3493
|
return !1;
|
|
3491
3494
|
}
|
|
3492
3495
|
static importDOM() {
|
|
3493
|
-
return { p: (e) => ({ conversion:
|
|
3496
|
+
return { p: (e) => ({ conversion: Vo, priority: 0 }) };
|
|
3494
3497
|
}
|
|
3495
3498
|
exportDOM(e) {
|
|
3496
3499
|
const { element: t } = super.exportDOM(e);
|
|
@@ -3522,25 +3525,25 @@ class Ot extends mn {
|
|
|
3522
3525
|
return !1;
|
|
3523
3526
|
}
|
|
3524
3527
|
}
|
|
3525
|
-
function
|
|
3528
|
+
function Vo(n) {
|
|
3526
3529
|
const e = Ae();
|
|
3527
|
-
return n.style && (e.setFormat(n.style.textAlign),
|
|
3530
|
+
return n.style && (e.setFormat(n.style.textAlign), al(n, e)), { node: e };
|
|
3528
3531
|
}
|
|
3529
3532
|
function Ae() {
|
|
3530
|
-
return
|
|
3533
|
+
return Nn(new Dt());
|
|
3531
3534
|
}
|
|
3532
|
-
function
|
|
3533
|
-
return n instanceof
|
|
3535
|
+
function Wl(n) {
|
|
3536
|
+
return n instanceof Dt;
|
|
3534
3537
|
}
|
|
3535
|
-
const
|
|
3536
|
-
function
|
|
3538
|
+
const Jl = 0, Ul = 1, jl = 3, $l = 4;
|
|
3539
|
+
function _s(n, e, t, r) {
|
|
3537
3540
|
const i = n._keyToDOMMap;
|
|
3538
|
-
i.clear(), n._editorState =
|
|
3541
|
+
i.clear(), n._editorState = Cr(), n._pendingEditorState = r, n._compositionKey = null, n._dirtyType = Je, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements.clear(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set(), n._updates = [], n._blockCursorElement = null;
|
|
3539
3542
|
const s = n._observer;
|
|
3540
3543
|
s !== null && (s.disconnect(), n._observer = null), e !== null && (e.textContent = ""), t !== null && (t.textContent = "", i.set("root", t));
|
|
3541
3544
|
}
|
|
3542
|
-
function
|
|
3543
|
-
const e = n || {}, t =
|
|
3545
|
+
function Vl(n) {
|
|
3546
|
+
const e = n || {}, t = Ro(), r = e.theme || {}, i = n === void 0 ? t : e.parentEditor || null, s = e.disableEvents || !1, o = Cr(), l = e.namespace || (i !== null ? i._config.namespace : ks()), a = e.editorState, c = [Ot, ut, Et, Mt, Dt, $o, ...e.nodes || []], { onError: u, html: h } = e, f = e.editable === void 0 || e.editable;
|
|
3544
3547
|
let g;
|
|
3545
3548
|
if (n === void 0 && t !== null) g = t._nodes;
|
|
3546
3549
|
else {
|
|
@@ -3555,7 +3558,7 @@ function jl(n) {
|
|
|
3555
3558
|
b !== null && N.add(b), g.set(m, { exportDOM: h && h.export ? h.export.get(p) : void 0, klass: p, replace: x, replaceWithKlass: y, transforms: N });
|
|
3556
3559
|
}
|
|
3557
3560
|
}
|
|
3558
|
-
const d = new
|
|
3561
|
+
const d = new Sn(o, i, g, { disableEvents: s, namespace: l, theme: r }, u || console.error, function(_, p) {
|
|
3559
3562
|
const x = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Set(), m = (b) => {
|
|
3560
3563
|
Object.keys(b).forEach((N) => {
|
|
3561
3564
|
let C = x.get(N);
|
|
@@ -3570,11 +3573,11 @@ function jl(n) {
|
|
|
3570
3573
|
C !== null && m(C);
|
|
3571
3574
|
}), p && m(p), x;
|
|
3572
3575
|
}(g, h ? h.import : void 0), f, n);
|
|
3573
|
-
return a !== void 0 && (d._pendingEditorState = a, d._dirtyType =
|
|
3576
|
+
return a !== void 0 && (d._pendingEditorState = a, d._dirtyType = st), d;
|
|
3574
3577
|
}
|
|
3575
|
-
class
|
|
3578
|
+
class Sn {
|
|
3576
3579
|
constructor(e, t, r, i, s, o, l, a) {
|
|
3577
|
-
this._createEditorArgs = a, this._parentEditor = t, this._rootElement = null, this._editorState = e, this._pendingEditorState = null, this._compositionKey = null, this._deferred = [], this._keyToDOMMap = /* @__PURE__ */ new Map(), this._updates = [], this._updating = !1, this._listeners = { decorator: /* @__PURE__ */ new Set(), editable: /* @__PURE__ */ new Set(), mutation: /* @__PURE__ */ new Map(), root: /* @__PURE__ */ new Set(), textcontent: /* @__PURE__ */ new Set(), update: /* @__PURE__ */ new Set() }, this._commands = /* @__PURE__ */ new Map(), this._config = i, this._nodes = r, this._decorators = {}, this._pendingDecorators = null, this._dirtyType =
|
|
3580
|
+
this._createEditorArgs = a, this._parentEditor = t, this._rootElement = null, this._editorState = e, this._pendingEditorState = null, this._compositionKey = null, this._deferred = [], this._keyToDOMMap = /* @__PURE__ */ new Map(), this._updates = [], this._updating = !1, this._listeners = { decorator: /* @__PURE__ */ new Set(), editable: /* @__PURE__ */ new Set(), mutation: /* @__PURE__ */ new Map(), root: /* @__PURE__ */ new Set(), textcontent: /* @__PURE__ */ new Set(), update: /* @__PURE__ */ new Set() }, this._commands = /* @__PURE__ */ new Map(), this._config = i, this._nodes = r, this._decorators = {}, this._pendingDecorators = null, this._dirtyType = Je, this._cloneNotNeeded = /* @__PURE__ */ new Set(), this._dirtyLeaves = /* @__PURE__ */ new Set(), this._dirtyElements = /* @__PURE__ */ new Map(), this._normalizedNodes = /* @__PURE__ */ new Set(), this._updateTags = /* @__PURE__ */ new Set(), this._observer = null, this._key = ks(), this._onError = s, this._htmlConversions = o, this._editable = l, this._headless = t !== null && t._headless, this._window = null, this._blockCursorElement = null;
|
|
3578
3581
|
}
|
|
3579
3582
|
isComposing() {
|
|
3580
3583
|
return this._compositionKey != null;
|
|
@@ -3637,7 +3640,7 @@ class Cn {
|
|
|
3637
3640
|
return e;
|
|
3638
3641
|
}
|
|
3639
3642
|
initializeMutationListener(e, t) {
|
|
3640
|
-
const r = this._editorState, i =
|
|
3643
|
+
const r = this._editorState, i = ki(r).get(t.getType());
|
|
3641
3644
|
if (!i) return;
|
|
3642
3645
|
const s = /* @__PURE__ */ new Map();
|
|
3643
3646
|
for (const o of i.keys()) s.set(o, "created");
|
|
@@ -3654,17 +3657,17 @@ class Cn {
|
|
|
3654
3657
|
i.push(o);
|
|
3655
3658
|
}
|
|
3656
3659
|
return function(o, l) {
|
|
3657
|
-
const a =
|
|
3660
|
+
const a = ki(o.getEditorState()), c = [];
|
|
3658
3661
|
for (const u of l) {
|
|
3659
3662
|
const h = a.get(u);
|
|
3660
3663
|
h && c.push(h);
|
|
3661
3664
|
}
|
|
3662
3665
|
c.length !== 0 && o.update(() => {
|
|
3663
3666
|
for (const u of c) for (const h of u.keys()) {
|
|
3664
|
-
const f =
|
|
3667
|
+
const f = $(h);
|
|
3665
3668
|
f && f.markDirty();
|
|
3666
3669
|
}
|
|
3667
|
-
}, o._pendingEditorState === null ? { tag:
|
|
3670
|
+
}, o._pendingEditorState === null ? { tag: Bn } : void 0);
|
|
3668
3671
|
}(this, i.map((o) => o.klass.getType())), () => {
|
|
3669
3672
|
i.forEach((o) => o.transforms.delete(t));
|
|
3670
3673
|
};
|
|
@@ -3690,39 +3693,39 @@ class Cn {
|
|
|
3690
3693
|
setRootElement(e) {
|
|
3691
3694
|
const t = this._rootElement;
|
|
3692
3695
|
if (e !== t) {
|
|
3693
|
-
const r =
|
|
3694
|
-
if (this._rootElement = e,
|
|
3695
|
-
const s =
|
|
3696
|
-
o.userSelect = "text", o.whiteSpace = "pre-wrap", o.wordBreak = "break-word", e.setAttribute("data-lexical-editor", "true"), this._window = s, this._dirtyType =
|
|
3697
|
-
const c = l.ownerDocument, u =
|
|
3698
|
-
(u === void 0 || u < 1) && c.addEventListener("selectionchange",
|
|
3699
|
-
const h =
|
|
3700
|
-
for (let f = 0; f <
|
|
3701
|
-
const [g, d] =
|
|
3702
|
-
|
|
3696
|
+
const r = rt(this._config.theme, "root"), i = this._pendingEditorState || this._editorState;
|
|
3697
|
+
if (this._rootElement = e, _s(this, t, e, i), t !== null && (this._config.disableEvents || Eo(t), r != null && t.classList.remove(...r)), e !== null) {
|
|
3698
|
+
const s = wr(e), o = e.style;
|
|
3699
|
+
o.userSelect = "text", o.whiteSpace = "pre-wrap", o.wordBreak = "break-word", e.setAttribute("data-lexical-editor", "true"), this._window = s, this._dirtyType = st, Li(this), this._updateTags.add(Bn), ve(this), this._config.disableEvents || function(l, a) {
|
|
3700
|
+
const c = l.ownerDocument, u = cn.get(c);
|
|
3701
|
+
(u === void 0 || u < 1) && c.addEventListener("selectionchange", ts), cn.set(c, (u || 0) + 1), l.__lexicalEditor = a;
|
|
3702
|
+
const h = es(l);
|
|
3703
|
+
for (let f = 0; f < er.length; f++) {
|
|
3704
|
+
const [g, d] = er[f], _ = typeof d == "function" ? (p) => {
|
|
3705
|
+
Yr(p) || (Vr(p), (a.isEditable() || g === "click") && d(p, a));
|
|
3703
3706
|
} : (p) => {
|
|
3704
|
-
if (
|
|
3705
|
-
|
|
3707
|
+
if (Yr(p)) return;
|
|
3708
|
+
Vr(p);
|
|
3706
3709
|
const x = a.isEditable();
|
|
3707
3710
|
switch (g) {
|
|
3708
3711
|
case "cut":
|
|
3709
|
-
return x && E(a,
|
|
3712
|
+
return x && E(a, Yi, p);
|
|
3710
3713
|
case "copy":
|
|
3711
|
-
return E(a,
|
|
3714
|
+
return E(a, Vi, p);
|
|
3712
3715
|
case "paste":
|
|
3713
|
-
return x && E(a,
|
|
3716
|
+
return x && E(a, Ui, p);
|
|
3714
3717
|
case "dragstart":
|
|
3715
|
-
return x && E(a,
|
|
3718
|
+
return x && E(a, vo, p);
|
|
3716
3719
|
case "dragover":
|
|
3717
|
-
return x && E(a,
|
|
3720
|
+
return x && E(a, ko, p);
|
|
3718
3721
|
case "dragend":
|
|
3719
|
-
return x && E(a,
|
|
3722
|
+
return x && E(a, To, p);
|
|
3720
3723
|
case "focus":
|
|
3721
|
-
return x && E(a,
|
|
3724
|
+
return x && E(a, bo, p);
|
|
3722
3725
|
case "blur":
|
|
3723
|
-
return x && E(a,
|
|
3726
|
+
return x && E(a, No, p);
|
|
3724
3727
|
case "drop":
|
|
3725
|
-
return x && E(a,
|
|
3728
|
+
return x && E(a, So, p);
|
|
3726
3729
|
}
|
|
3727
3730
|
};
|
|
3728
3731
|
l.addEventListener(g, _), h.push(() => {
|
|
@@ -3730,8 +3733,8 @@ class Cn {
|
|
|
3730
3733
|
});
|
|
3731
3734
|
}
|
|
3732
3735
|
}(e, this), r != null && e.classList.add(...r);
|
|
3733
|
-
} else this._window = null, this._updateTags.add(
|
|
3734
|
-
|
|
3736
|
+
} else this._window = null, this._updateTags.add(Bn), ve(this);
|
|
3737
|
+
xt("root", this, !1, e, t);
|
|
3735
3738
|
}
|
|
3736
3739
|
}
|
|
3737
3740
|
getElementByKey(e) {
|
|
@@ -3743,21 +3746,21 @@ class Cn {
|
|
|
3743
3746
|
setEditorState(e, t) {
|
|
3744
3747
|
e.isEmpty() && T(38);
|
|
3745
3748
|
let r = e;
|
|
3746
|
-
r._readOnly && (r =
|
|
3749
|
+
r._readOnly && (r = hs(e), r._selection = e._selection ? e._selection.clone() : null), Fi(this);
|
|
3747
3750
|
const i = this._pendingEditorState, s = this._updateTags, o = t !== void 0 ? t.tag : null;
|
|
3748
|
-
i === null || i.isEmpty() || (o != null && s.add(o), ve(this)), this._pendingEditorState = r, this._dirtyType =
|
|
3751
|
+
i === null || i.isEmpty() || (o != null && s.add(o), ve(this)), this._pendingEditorState = r, this._dirtyType = st, this._dirtyElements.set("root", !1), this._compositionKey = null, o != null && s.add(o), this._updating || ve(this);
|
|
3749
3752
|
}
|
|
3750
3753
|
parseEditorState(e, t) {
|
|
3751
3754
|
return function(r, i, s) {
|
|
3752
|
-
const o =
|
|
3753
|
-
i._dirtyElements = /* @__PURE__ */ new Map(), i._dirtyLeaves = /* @__PURE__ */ new Set(), i._cloneNotNeeded = /* @__PURE__ */ new Set(), i._dirtyType = 0, U = o, Z = !1,
|
|
3755
|
+
const o = Cr(), l = U, a = Z, c = j, u = i._dirtyElements, h = i._dirtyLeaves, f = i._cloneNotNeeded, g = i._dirtyType;
|
|
3756
|
+
i._dirtyElements = /* @__PURE__ */ new Map(), i._dirtyLeaves = /* @__PURE__ */ new Set(), i._cloneNotNeeded = /* @__PURE__ */ new Set(), i._dirtyType = 0, U = o, Z = !1, j = i;
|
|
3754
3757
|
try {
|
|
3755
3758
|
const d = i._nodes;
|
|
3756
|
-
|
|
3759
|
+
mr(r.root, d), s && s(), o._readOnly = !0;
|
|
3757
3760
|
} catch (d) {
|
|
3758
3761
|
d instanceof Error && i._onError(d);
|
|
3759
3762
|
} finally {
|
|
3760
|
-
i._dirtyElements = u, i._dirtyLeaves = h, i._cloneNotNeeded = f, i._dirtyType = g, U = l, Z = a,
|
|
3763
|
+
i._dirtyElements = u, i._dirtyLeaves = h, i._cloneNotNeeded = f, i._dirtyType = g, U = l, Z = a, j = c;
|
|
3761
3764
|
}
|
|
3762
3765
|
return o;
|
|
3763
3766
|
}(typeof e == "string" ? JSON.parse(e) : e, this, t);
|
|
@@ -3767,14 +3770,14 @@ class Cn {
|
|
|
3767
3770
|
}
|
|
3768
3771
|
update(e, t) {
|
|
3769
3772
|
(function(r, i, s) {
|
|
3770
|
-
r._updating ? r._updates.push([i, s]) :
|
|
3773
|
+
r._updating ? r._updates.push([i, s]) : xr(r, i, s);
|
|
3771
3774
|
})(this, e, t);
|
|
3772
3775
|
}
|
|
3773
3776
|
focus(e, t = {}) {
|
|
3774
3777
|
const r = this._rootElement;
|
|
3775
3778
|
r !== null && (r.setAttribute("autocapitalize", "off"), te(this, () => {
|
|
3776
3779
|
const i = L(), s = re();
|
|
3777
|
-
i !== null ? i.dirty || ie(i.clone()) : s.getChildrenSize() !== 0 && (t.defaultSelection === "rootStart" ? s.selectStart() : s.selectEnd()),
|
|
3780
|
+
i !== null ? i.dirty || ie(i.clone()) : s.getChildrenSize() !== 0 && (t.defaultSelection === "rootStart" ? s.selectStart() : s.selectEnd()), Qo("focus"), Zo(() => {
|
|
3778
3781
|
r.removeAttribute("autocapitalize"), e && e();
|
|
3779
3782
|
});
|
|
3780
3783
|
}), this._pendingEditorState === null && r.removeAttribute("autocapitalize"));
|
|
@@ -3789,59 +3792,62 @@ class Cn {
|
|
|
3789
3792
|
return this._editable;
|
|
3790
3793
|
}
|
|
3791
3794
|
setEditable(e) {
|
|
3792
|
-
this._editable !== e && (this._editable = e,
|
|
3795
|
+
this._editable !== e && (this._editable = e, xt("editable", this, !0, e));
|
|
3793
3796
|
}
|
|
3794
3797
|
toJSON() {
|
|
3795
3798
|
return { editorState: this._editorState.toJSON() };
|
|
3796
3799
|
}
|
|
3797
3800
|
}
|
|
3798
|
-
|
|
3799
|
-
let
|
|
3800
|
-
const
|
|
3801
|
+
Sn.version = "0.32.1+prod.esm";
|
|
3802
|
+
let Yo = 1;
|
|
3803
|
+
const Ho = typeof queueMicrotask == "function" ? queueMicrotask : (n) => {
|
|
3801
3804
|
Promise.resolve().then(n);
|
|
3802
3805
|
};
|
|
3803
|
-
function
|
|
3804
|
-
return z(
|
|
3806
|
+
function gi(n) {
|
|
3807
|
+
return z(vr(n));
|
|
3805
3808
|
}
|
|
3806
|
-
function
|
|
3809
|
+
function ps(n) {
|
|
3807
3810
|
const e = document.activeElement;
|
|
3808
3811
|
if (!ee(e)) return !1;
|
|
3809
3812
|
const t = e.nodeName;
|
|
3810
|
-
return z(
|
|
3813
|
+
return z(vr(n)) && (t === "INPUT" || t === "TEXTAREA" || e.contentEditable === "true" && kn(e) == null);
|
|
3811
3814
|
}
|
|
3812
|
-
function
|
|
3815
|
+
function vn(n, e, t) {
|
|
3813
3816
|
const r = n.getRootElement();
|
|
3814
3817
|
try {
|
|
3815
|
-
return r !== null && r.contains(e) && r.contains(t) && e !== null && !
|
|
3818
|
+
return r !== null && r.contains(e) && r.contains(t) && e !== null && !ps(e) && ys(e) === n;
|
|
3816
3819
|
} catch {
|
|
3817
3820
|
return !1;
|
|
3818
3821
|
}
|
|
3819
3822
|
}
|
|
3820
|
-
function
|
|
3821
|
-
return n instanceof
|
|
3823
|
+
function Sr(n) {
|
|
3824
|
+
return n instanceof Sn;
|
|
3822
3825
|
}
|
|
3823
|
-
function
|
|
3826
|
+
function ys(n) {
|
|
3824
3827
|
let e = n;
|
|
3825
3828
|
for (; e != null; ) {
|
|
3826
|
-
const t =
|
|
3827
|
-
if (
|
|
3828
|
-
e =
|
|
3829
|
+
const t = kn(e);
|
|
3830
|
+
if (Sr(t)) return t;
|
|
3831
|
+
e = Pt(e);
|
|
3829
3832
|
}
|
|
3830
3833
|
return null;
|
|
3831
3834
|
}
|
|
3832
|
-
function
|
|
3835
|
+
function kn(n) {
|
|
3833
3836
|
return n ? n.__lexicalEditor : null;
|
|
3834
3837
|
}
|
|
3835
|
-
function
|
|
3836
|
-
return n
|
|
3838
|
+
function Be(n) {
|
|
3839
|
+
return is(n) || n.isToken();
|
|
3840
|
+
}
|
|
3841
|
+
function we(n) {
|
|
3842
|
+
return Be(n) || n.isSegmented();
|
|
3837
3843
|
}
|
|
3838
3844
|
function be(n) {
|
|
3839
|
-
return
|
|
3845
|
+
return Ft(n) && n.nodeType === Ks;
|
|
3840
3846
|
}
|
|
3841
|
-
function
|
|
3842
|
-
return
|
|
3847
|
+
function qo(n) {
|
|
3848
|
+
return Ft(n) && n.nodeType === zs;
|
|
3843
3849
|
}
|
|
3844
|
-
function
|
|
3850
|
+
function ot(n) {
|
|
3845
3851
|
let e = n;
|
|
3846
3852
|
for (; e != null; ) {
|
|
3847
3853
|
if (be(e)) return e;
|
|
@@ -3849,30 +3855,30 @@ function st(n) {
|
|
|
3849
3855
|
}
|
|
3850
3856
|
return null;
|
|
3851
3857
|
}
|
|
3852
|
-
function
|
|
3853
|
-
const r =
|
|
3858
|
+
function dn(n, e, t) {
|
|
3859
|
+
const r = Ue[e];
|
|
3854
3860
|
if (t !== null && (n & r) == (t & r)) return n;
|
|
3855
3861
|
let i = n ^ r;
|
|
3856
3862
|
return e === "subscript" ? i &= -65 : e === "superscript" ? i &= -33 : e === "lowercase" ? (i &= -513, i &= -1025) : e === "uppercase" ? (i &= -257, i &= -1025) : e === "capitalize" && (i &= -257, i &= -513), i;
|
|
3857
3863
|
}
|
|
3858
|
-
function
|
|
3859
|
-
return M(n) ||
|
|
3864
|
+
function Yl(n) {
|
|
3865
|
+
return M(n) || nt(n) || z(n);
|
|
3860
3866
|
}
|
|
3861
|
-
function
|
|
3867
|
+
function ms(n, e) {
|
|
3862
3868
|
if (e != null) return void (n.__key = e);
|
|
3863
|
-
G(),
|
|
3864
|
-
const t = R(), r = Fe(), i = "" +
|
|
3865
|
-
r._nodeMap.set(i, n), v(n) ? t._dirtyElements.set(i, !0) : t._dirtyLeaves.add(i), t._cloneNotNeeded.add(i), t._dirtyType =
|
|
3869
|
+
G(), us();
|
|
3870
|
+
const t = R(), r = Fe(), i = "" + Yo++;
|
|
3871
|
+
r._nodeMap.set(i, n), v(n) ? t._dirtyElements.set(i, !0) : t._dirtyLeaves.add(i), t._cloneNotNeeded.add(i), t._dirtyType = Mi, n.__key = i;
|
|
3866
3872
|
}
|
|
3867
|
-
function
|
|
3873
|
+
function Re(n) {
|
|
3868
3874
|
const e = n.getParent();
|
|
3869
3875
|
if (e !== null) {
|
|
3870
3876
|
const t = n.getWritable(), r = e.getWritable(), i = n.getPreviousSibling(), s = n.getNextSibling(), o = s !== null ? s.__key : null, l = i !== null ? i.__key : null, a = i !== null ? i.getWritable() : null, c = s !== null ? s.getWritable() : null;
|
|
3871
3877
|
i === null && (r.__first = o), s === null && (r.__last = l), a !== null && (a.__next = o), c !== null && (c.__prev = l), t.__prev = null, t.__next = null, t.__parent = null, r.__size--;
|
|
3872
3878
|
}
|
|
3873
3879
|
}
|
|
3874
|
-
function
|
|
3875
|
-
|
|
3880
|
+
function hn(n) {
|
|
3881
|
+
us();
|
|
3876
3882
|
const e = n.getLatest(), t = e.__parent, r = Fe(), i = R(), s = r._nodeMap, o = i._dirtyElements;
|
|
3877
3883
|
t !== null && function(a, c, u) {
|
|
3878
3884
|
let h = a;
|
|
@@ -3884,56 +3890,56 @@ function dn(n) {
|
|
|
3884
3890
|
}
|
|
3885
3891
|
}(t, s, o);
|
|
3886
3892
|
const l = e.__key;
|
|
3887
|
-
i._dirtyType =
|
|
3893
|
+
i._dirtyType = Mi, v(n) ? o.set(l, !0) : i._dirtyLeaves.add(l);
|
|
3888
3894
|
}
|
|
3889
3895
|
function H(n) {
|
|
3890
3896
|
G();
|
|
3891
3897
|
const e = R(), t = e._compositionKey;
|
|
3892
3898
|
if (n !== t) {
|
|
3893
3899
|
if (e._compositionKey = n, t !== null) {
|
|
3894
|
-
const r =
|
|
3900
|
+
const r = $(t);
|
|
3895
3901
|
r !== null && r.getWritable();
|
|
3896
3902
|
}
|
|
3897
3903
|
if (n !== null) {
|
|
3898
|
-
const r =
|
|
3904
|
+
const r = $(n);
|
|
3899
3905
|
r !== null && r.getWritable();
|
|
3900
3906
|
}
|
|
3901
3907
|
}
|
|
3902
3908
|
}
|
|
3903
|
-
function
|
|
3904
|
-
return
|
|
3909
|
+
function Me() {
|
|
3910
|
+
return At() ? null : R()._compositionKey;
|
|
3905
3911
|
}
|
|
3906
|
-
function
|
|
3912
|
+
function $(n, e) {
|
|
3907
3913
|
const t = (e || Fe())._nodeMap.get(n);
|
|
3908
3914
|
return t === void 0 ? null : t;
|
|
3909
3915
|
}
|
|
3910
|
-
function
|
|
3911
|
-
const t =
|
|
3912
|
-
return t !== void 0 ?
|
|
3916
|
+
function xs(n, e) {
|
|
3917
|
+
const t = Tn(n, R());
|
|
3918
|
+
return t !== void 0 ? $(t, e) : null;
|
|
3913
3919
|
}
|
|
3914
|
-
function
|
|
3920
|
+
function Tn(n, e) {
|
|
3915
3921
|
return n[`__lexicalKey_${e._key}`];
|
|
3916
3922
|
}
|
|
3917
|
-
function
|
|
3923
|
+
function vr(n, e) {
|
|
3918
3924
|
let t = n;
|
|
3919
3925
|
for (; t != null; ) {
|
|
3920
|
-
const r =
|
|
3926
|
+
const r = xs(t, e);
|
|
3921
3927
|
if (r !== null) return r;
|
|
3922
|
-
t =
|
|
3928
|
+
t = Pt(t);
|
|
3923
3929
|
}
|
|
3924
3930
|
return null;
|
|
3925
3931
|
}
|
|
3926
|
-
function
|
|
3932
|
+
function Cs(n) {
|
|
3927
3933
|
const e = n._decorators, t = Object.assign({}, e);
|
|
3928
3934
|
return n._pendingDecorators = t, t;
|
|
3929
3935
|
}
|
|
3930
|
-
function
|
|
3936
|
+
function _i(n) {
|
|
3931
3937
|
return n.read(() => re().getTextContent());
|
|
3932
3938
|
}
|
|
3933
3939
|
function re() {
|
|
3934
|
-
return
|
|
3940
|
+
return Ss(Fe());
|
|
3935
3941
|
}
|
|
3936
|
-
function
|
|
3942
|
+
function Ss(n) {
|
|
3937
3943
|
return n._nodeMap.get("root");
|
|
3938
3944
|
}
|
|
3939
3945
|
function ie(n) {
|
|
@@ -3941,63 +3947,63 @@ function ie(n) {
|
|
|
3941
3947
|
const e = Fe();
|
|
3942
3948
|
n !== null && (n.dirty = !0, n.setCachedNodes(null)), e._selection = n;
|
|
3943
3949
|
}
|
|
3944
|
-
function
|
|
3950
|
+
function et(n) {
|
|
3945
3951
|
const e = R(), t = function(r, i) {
|
|
3946
3952
|
let s = r;
|
|
3947
3953
|
for (; s != null; ) {
|
|
3948
|
-
const o =
|
|
3954
|
+
const o = Tn(s, i);
|
|
3949
3955
|
if (o !== void 0) return o;
|
|
3950
|
-
s =
|
|
3956
|
+
s = Pt(s);
|
|
3951
3957
|
}
|
|
3952
3958
|
return null;
|
|
3953
3959
|
}(n, e);
|
|
3954
|
-
return t === null ? n === e.getRootElement() ?
|
|
3960
|
+
return t === null ? n === e.getRootElement() ? $("root") : null : $(t);
|
|
3955
3961
|
}
|
|
3956
|
-
function
|
|
3962
|
+
function pi(n, e) {
|
|
3957
3963
|
return e ? n.getTextContentSize() : 0;
|
|
3958
3964
|
}
|
|
3959
|
-
function
|
|
3965
|
+
function vs(n) {
|
|
3960
3966
|
return /[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(n);
|
|
3961
3967
|
}
|
|
3962
|
-
function
|
|
3968
|
+
function kr(n) {
|
|
3963
3969
|
const e = [];
|
|
3964
3970
|
let t = n;
|
|
3965
3971
|
for (; t !== null; ) e.push(t), t = t._parentEditor;
|
|
3966
3972
|
return e;
|
|
3967
3973
|
}
|
|
3968
|
-
function
|
|
3974
|
+
function ks() {
|
|
3969
3975
|
return Math.random().toString(36).replace(/[^a-z]+/g, "").substring(0, 5);
|
|
3970
3976
|
}
|
|
3971
|
-
function
|
|
3977
|
+
function Ts(n) {
|
|
3972
3978
|
return be(n) ? n.nodeValue : null;
|
|
3973
3979
|
}
|
|
3974
|
-
function
|
|
3980
|
+
function Tr(n, e, t) {
|
|
3975
3981
|
const r = Te(oe(e));
|
|
3976
3982
|
if (r === null) return;
|
|
3977
3983
|
const i = r.anchorNode;
|
|
3978
3984
|
let { anchorOffset: s, focusOffset: o } = r;
|
|
3979
3985
|
if (i !== null) {
|
|
3980
|
-
let l =
|
|
3981
|
-
const a =
|
|
3986
|
+
let l = Ts(i);
|
|
3987
|
+
const a = vr(i);
|
|
3982
3988
|
if (l !== null && M(a)) {
|
|
3983
|
-
if (l ===
|
|
3989
|
+
if (l === gn && t) {
|
|
3984
3990
|
const c = t.length;
|
|
3985
3991
|
l = t, s = c, o = c;
|
|
3986
3992
|
}
|
|
3987
|
-
l !== null &&
|
|
3993
|
+
l !== null && br(a, l, s, o, n);
|
|
3988
3994
|
}
|
|
3989
3995
|
}
|
|
3990
3996
|
}
|
|
3991
|
-
function
|
|
3997
|
+
function br(n, e, t, r, i) {
|
|
3992
3998
|
let s = n;
|
|
3993
3999
|
if (s.isAttached() && (i || !s.isDirty())) {
|
|
3994
4000
|
const o = s.isComposing();
|
|
3995
4001
|
let l = e;
|
|
3996
|
-
(o || i) && e[e.length - 1] ===
|
|
4002
|
+
(o || i) && e[e.length - 1] === gn && (l = e.slice(0, -1));
|
|
3997
4003
|
const a = s.getTextContent();
|
|
3998
4004
|
if (i || l !== a) {
|
|
3999
4005
|
if (l === "") {
|
|
4000
|
-
if (H(null),
|
|
4006
|
+
if (H(null), St || it || Qt) s.remove();
|
|
4001
4007
|
else {
|
|
4002
4008
|
const _ = R();
|
|
4003
4009
|
setTimeout(() => {
|
|
@@ -4008,7 +4014,7 @@ function Tr(n, e, t, r, i) {
|
|
|
4008
4014
|
}
|
|
4009
4015
|
return;
|
|
4010
4016
|
}
|
|
4011
|
-
const c = s.getParent(), u =
|
|
4017
|
+
const c = s.getParent(), u = ft(), h = s.getTextContentSize(), f = Me(), g = s.getKey();
|
|
4012
4018
|
if (s.isToken() || f !== null && g === f && !o || O(u) && (c !== null && !c.canInsertTextBefore() && u.anchor.offset === 0 || u.anchor.key === n.__key && u.anchor.offset === 0 && !s.canInsertTextBefore() && !o || u.focus.key === n.__key && u.focus.offset === h && !s.canInsertTextAfter() && !o)) return void s.markDirty();
|
|
4013
4019
|
const d = L();
|
|
4014
4020
|
if (!O(d) || t === null || r === null) return void s.setTextContent(l);
|
|
@@ -4020,24 +4026,24 @@ function Tr(n, e, t, r, i) {
|
|
|
4020
4026
|
}
|
|
4021
4027
|
}
|
|
4022
4028
|
}
|
|
4023
|
-
function
|
|
4029
|
+
function Ut(n, e, t) {
|
|
4024
4030
|
const r = e[t] || !1;
|
|
4025
4031
|
return r === "any" || r === n[t];
|
|
4026
4032
|
}
|
|
4027
|
-
function
|
|
4028
|
-
return
|
|
4033
|
+
function Go(n, e) {
|
|
4034
|
+
return Ut(n, e, "altKey") && Ut(n, e, "ctrlKey") && Ut(n, e, "shiftKey") && Ut(n, e, "metaKey");
|
|
4029
4035
|
}
|
|
4030
4036
|
function I(n, e, t) {
|
|
4031
|
-
return
|
|
4037
|
+
return Go(n, t) && n.key.toLowerCase() === e.toLowerCase();
|
|
4032
4038
|
}
|
|
4033
|
-
const Ce = { ctrlKey: !fe, metaKey: fe },
|
|
4034
|
-
function
|
|
4039
|
+
const Ce = { ctrlKey: !fe, metaKey: fe }, yi = { altKey: fe, ctrlKey: !fe };
|
|
4040
|
+
function mi(n) {
|
|
4035
4041
|
return n.key === "Backspace";
|
|
4036
4042
|
}
|
|
4037
|
-
function
|
|
4043
|
+
function xi(n) {
|
|
4038
4044
|
return I(n, "a", Ce);
|
|
4039
4045
|
}
|
|
4040
|
-
function
|
|
4046
|
+
function Hl(n) {
|
|
4041
4047
|
const e = re();
|
|
4042
4048
|
if (O(n)) {
|
|
4043
4049
|
const t = n.anchor, r = n.focus, i = t.getNode().getTopLevelElementOrThrow().getParentOrThrow();
|
|
@@ -4048,18 +4054,18 @@ function Yl(n) {
|
|
|
4048
4054
|
return ie($n(t)), t;
|
|
4049
4055
|
}
|
|
4050
4056
|
}
|
|
4051
|
-
function
|
|
4057
|
+
function rt(n, e) {
|
|
4052
4058
|
n.__lexicalClassNameCache === void 0 && (n.__lexicalClassNameCache = {});
|
|
4053
4059
|
const t = n.__lexicalClassNameCache, r = t[e];
|
|
4054
4060
|
if (r !== void 0) return r;
|
|
4055
4061
|
const i = n[e];
|
|
4056
4062
|
if (typeof i == "string") {
|
|
4057
|
-
const s =
|
|
4063
|
+
const s = Zt(i);
|
|
4058
4064
|
return t[e] = s, s;
|
|
4059
4065
|
}
|
|
4060
4066
|
return i;
|
|
4061
4067
|
}
|
|
4062
|
-
function
|
|
4068
|
+
function Nr(n, e, t, r, i) {
|
|
4063
4069
|
if (t.size === 0) return;
|
|
4064
4070
|
const s = r.__type, o = r.__key, l = e.get(s);
|
|
4065
4071
|
l === void 0 && T(33, s);
|
|
@@ -4069,31 +4075,31 @@ function br(n, e, t, r, i) {
|
|
|
4069
4075
|
const u = c.get(o), h = u === "destroyed" && i === "created";
|
|
4070
4076
|
(u === void 0 || h) && c.set(o, h ? "updated" : i);
|
|
4071
4077
|
}
|
|
4072
|
-
function
|
|
4078
|
+
function Ci(n, e, t) {
|
|
4073
4079
|
const r = n.getParent();
|
|
4074
4080
|
let i = t, s = n;
|
|
4075
4081
|
return r !== null && (e && t === 0 ? (i = s.getIndexWithinParent(), s = r) : e || t !== s.getChildrenSize() || (i = s.getIndexWithinParent() + 1, s = r)), s.getChildAtIndex(e ? i - 1 : i);
|
|
4076
4082
|
}
|
|
4077
|
-
function
|
|
4083
|
+
function Xo(n, e) {
|
|
4078
4084
|
const t = n.offset;
|
|
4079
4085
|
if (n.type === "element")
|
|
4080
|
-
return
|
|
4086
|
+
return Ci(n.getNode(), e, t);
|
|
4081
4087
|
{
|
|
4082
4088
|
const r = n.getNode();
|
|
4083
4089
|
if (e && t === 0 || !e && t === r.getTextContentSize()) {
|
|
4084
4090
|
const i = e ? r.getPreviousSibling() : r.getNextSibling();
|
|
4085
|
-
return i === null ?
|
|
4091
|
+
return i === null ? Ci(r.getParentOrThrow(), e, r.getIndexWithinParent() + (e ? 0 : 1)) : i;
|
|
4086
4092
|
}
|
|
4087
4093
|
}
|
|
4088
4094
|
return null;
|
|
4089
4095
|
}
|
|
4090
|
-
function
|
|
4096
|
+
function bs(n) {
|
|
4091
4097
|
const e = oe(n).event, t = e && e.inputType;
|
|
4092
4098
|
return t === "insertFromPaste" || t === "insertFromPasteAsQuotation";
|
|
4093
4099
|
}
|
|
4094
4100
|
function E(n, e, t) {
|
|
4095
4101
|
return function(r, i, s) {
|
|
4096
|
-
const o =
|
|
4102
|
+
const o = kr(r);
|
|
4097
4103
|
for (let l = 4; l >= 0; l--) for (let a = 0; a < o.length; a++) {
|
|
4098
4104
|
const c = o[a], u = c._commands.get(i);
|
|
4099
4105
|
if (u !== void 0) {
|
|
@@ -4110,27 +4116,27 @@ function E(n, e, t) {
|
|
|
4110
4116
|
return !1;
|
|
4111
4117
|
}(n, e, t);
|
|
4112
4118
|
}
|
|
4113
|
-
function
|
|
4119
|
+
function bn(n) {
|
|
4114
4120
|
return !ne(n) && !n.isLastChild() && !n.isInline();
|
|
4115
4121
|
}
|
|
4116
|
-
function
|
|
4122
|
+
function lt(n, e) {
|
|
4117
4123
|
const t = n._keyToDOMMap.get(e);
|
|
4118
4124
|
return t === void 0 && T(75, e), t;
|
|
4119
4125
|
}
|
|
4120
|
-
function
|
|
4126
|
+
function Pt(n) {
|
|
4121
4127
|
const e = n.assignedSlot || n.parentElement;
|
|
4122
|
-
return
|
|
4128
|
+
return il(e) ? e.host : e;
|
|
4123
4129
|
}
|
|
4124
|
-
function
|
|
4125
|
-
return
|
|
4130
|
+
function Ns(n) {
|
|
4131
|
+
return qo(n) ? n : ee(n) ? n.ownerDocument : null;
|
|
4126
4132
|
}
|
|
4127
|
-
function
|
|
4133
|
+
function Qo(n) {
|
|
4128
4134
|
G(), R()._updateTags.add(n);
|
|
4129
4135
|
}
|
|
4130
|
-
function
|
|
4136
|
+
function Zo(n) {
|
|
4131
4137
|
G(), R()._deferred.push(n);
|
|
4132
4138
|
}
|
|
4133
|
-
function
|
|
4139
|
+
function ir(n, e) {
|
|
4134
4140
|
let t = n.getParent();
|
|
4135
4141
|
for (; t !== null; ) {
|
|
4136
4142
|
if (t.is(e)) return !0;
|
|
@@ -4138,18 +4144,18 @@ function rr(n, e) {
|
|
|
4138
4144
|
}
|
|
4139
4145
|
return !1;
|
|
4140
4146
|
}
|
|
4141
|
-
function
|
|
4142
|
-
const e =
|
|
4147
|
+
function wr(n) {
|
|
4148
|
+
const e = Ns(n);
|
|
4143
4149
|
return e ? e.defaultView : null;
|
|
4144
4150
|
}
|
|
4145
4151
|
function oe(n) {
|
|
4146
4152
|
const e = n._window;
|
|
4147
4153
|
return e === null && T(78), e;
|
|
4148
4154
|
}
|
|
4149
|
-
function
|
|
4155
|
+
function ql(n) {
|
|
4150
4156
|
return v(n) && n.isInline() || z(n) && n.isInline();
|
|
4151
4157
|
}
|
|
4152
|
-
function
|
|
4158
|
+
function el(n) {
|
|
4153
4159
|
let e = n.getParentOrThrow();
|
|
4154
4160
|
for (; e !== null; ) {
|
|
4155
4161
|
if (Le(e)) return e;
|
|
@@ -4160,11 +4166,11 @@ function Zo(n) {
|
|
|
4160
4166
|
function Le(n) {
|
|
4161
4167
|
return ne(n) || v(n) && n.isShadowRoot();
|
|
4162
4168
|
}
|
|
4163
|
-
function
|
|
4169
|
+
function tl(n) {
|
|
4164
4170
|
const e = n.constructor.clone(n);
|
|
4165
|
-
return
|
|
4171
|
+
return ms(e, null), e;
|
|
4166
4172
|
}
|
|
4167
|
-
function
|
|
4173
|
+
function Nn(n) {
|
|
4168
4174
|
const e = R(), t = n.constructor.getType(), r = e._nodes.get(t);
|
|
4169
4175
|
r === void 0 && T(200, n.constructor.name, t);
|
|
4170
4176
|
const { replace: i, replaceWithKlass: s } = r;
|
|
@@ -4174,17 +4180,17 @@ function bn(n) {
|
|
|
4174
4180
|
}
|
|
4175
4181
|
return n;
|
|
4176
4182
|
}
|
|
4177
|
-
function
|
|
4183
|
+
function Rn(n, e) {
|
|
4178
4184
|
!ne(n.getParent()) || v(e) || z(e) || T(99);
|
|
4179
4185
|
}
|
|
4180
|
-
function
|
|
4181
|
-
const e =
|
|
4186
|
+
function nl(n) {
|
|
4187
|
+
const e = $(n);
|
|
4182
4188
|
return e === null && T(63, n), e;
|
|
4183
4189
|
}
|
|
4184
|
-
function
|
|
4190
|
+
function Wn(n) {
|
|
4185
4191
|
return (z(n) || v(n) && !n.canBeEmpty()) && !n.isInline();
|
|
4186
4192
|
}
|
|
4187
|
-
function
|
|
4193
|
+
function sr(n, e, t) {
|
|
4188
4194
|
t.style.removeProperty("caret-color"), e._blockCursorElement = null;
|
|
4189
4195
|
const r = n.parentElement;
|
|
4190
4196
|
r !== null && r.removeChild(n);
|
|
@@ -4192,49 +4198,49 @@ function ir(n, e, t) {
|
|
|
4192
4198
|
function Te(n) {
|
|
4193
4199
|
return ae ? (n || window).getSelection() : null;
|
|
4194
4200
|
}
|
|
4195
|
-
function
|
|
4196
|
-
const e =
|
|
4201
|
+
function rl(n) {
|
|
4202
|
+
const e = wr(n);
|
|
4197
4203
|
return e ? e.getSelection() : null;
|
|
4198
4204
|
}
|
|
4199
|
-
function
|
|
4205
|
+
function Gl(n) {
|
|
4200
4206
|
return ee(n) && n.tagName === "A";
|
|
4201
4207
|
}
|
|
4202
4208
|
function ee(n) {
|
|
4203
|
-
return
|
|
4209
|
+
return Ft(n) && n.nodeType === Is;
|
|
4204
4210
|
}
|
|
4205
|
-
function
|
|
4211
|
+
function Ft(n) {
|
|
4206
4212
|
return typeof n == "object" && n !== null && "nodeType" in n && typeof n.nodeType == "number";
|
|
4207
4213
|
}
|
|
4208
|
-
function rl(n) {
|
|
4209
|
-
return Pt(n) && n.nodeType === Ks;
|
|
4210
|
-
}
|
|
4211
4214
|
function il(n) {
|
|
4215
|
+
return Ft(n) && n.nodeType === Bs;
|
|
4216
|
+
}
|
|
4217
|
+
function sl(n) {
|
|
4212
4218
|
const e = new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/, "i");
|
|
4213
4219
|
return n.nodeName.match(e) !== null;
|
|
4214
4220
|
}
|
|
4215
|
-
function
|
|
4221
|
+
function Si(n) {
|
|
4216
4222
|
const e = new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/, "i");
|
|
4217
4223
|
return n.nodeName.match(e) !== null;
|
|
4218
4224
|
}
|
|
4219
|
-
function
|
|
4225
|
+
function Ee(n) {
|
|
4220
4226
|
if (z(n) && !n.isInline()) return !0;
|
|
4221
4227
|
if (!v(n) || Le(n)) return !1;
|
|
4222
|
-
const e = n.getFirstChild(), t = e === null ||
|
|
4228
|
+
const e = n.getFirstChild(), t = e === null || nt(e) || M(e) || e.isInline();
|
|
4223
4229
|
return !n.isInline() && n.canBeEmpty() !== !1 && t;
|
|
4224
4230
|
}
|
|
4225
|
-
function
|
|
4231
|
+
function Jn(n, e) {
|
|
4226
4232
|
let t = n;
|
|
4227
4233
|
for (; t !== null && t.getParent() !== null && !e(t); ) t = t.getParentOrThrow();
|
|
4228
4234
|
return e(t) ? t : null;
|
|
4229
4235
|
}
|
|
4230
|
-
function
|
|
4236
|
+
function Xl() {
|
|
4231
4237
|
return R();
|
|
4232
4238
|
}
|
|
4233
|
-
const
|
|
4234
|
-
function
|
|
4235
|
-
if (!n._readOnly && n.isEmpty()) return
|
|
4239
|
+
const vi = /* @__PURE__ */ new WeakMap(), ol = /* @__PURE__ */ new Map();
|
|
4240
|
+
function ki(n) {
|
|
4241
|
+
if (!n._readOnly && n.isEmpty()) return ol;
|
|
4236
4242
|
n._readOnly || T(192);
|
|
4237
|
-
let e =
|
|
4243
|
+
let e = vi.get(n);
|
|
4238
4244
|
return e || (e = function(t) {
|
|
4239
4245
|
const r = /* @__PURE__ */ new Map();
|
|
4240
4246
|
for (const [i, s] of t._nodeMap) {
|
|
@@ -4243,29 +4249,29 @@ function vi(n) {
|
|
|
4243
4249
|
l || (l = /* @__PURE__ */ new Map(), r.set(o, l)), l.set(i, s);
|
|
4244
4250
|
}
|
|
4245
4251
|
return r;
|
|
4246
|
-
}(n),
|
|
4252
|
+
}(n), vi.set(n, e)), e;
|
|
4247
4253
|
}
|
|
4248
|
-
function
|
|
4254
|
+
function ll(n) {
|
|
4249
4255
|
const e = n.constructor.clone(n);
|
|
4250
4256
|
return e.afterCloneFrom(n), e;
|
|
4251
4257
|
}
|
|
4252
|
-
function
|
|
4258
|
+
function al(n, e) {
|
|
4253
4259
|
const t = parseInt(n.style.paddingInlineStart, 10) || 0, r = Math.round(t / 40);
|
|
4254
4260
|
e.setIndent(r);
|
|
4255
4261
|
}
|
|
4256
|
-
function
|
|
4262
|
+
function Ql(n) {
|
|
4257
4263
|
n.__lexicalUnmanaged = !0;
|
|
4258
4264
|
}
|
|
4259
|
-
function
|
|
4265
|
+
function cl(n) {
|
|
4260
4266
|
return n.__lexicalUnmanaged === !0;
|
|
4261
4267
|
}
|
|
4262
|
-
const
|
|
4263
|
-
class
|
|
4268
|
+
const ul = { next: "previous", previous: "next" };
|
|
4269
|
+
class Er {
|
|
4264
4270
|
constructor(e) {
|
|
4265
4271
|
this.origin = e;
|
|
4266
4272
|
}
|
|
4267
4273
|
[Symbol.iterator]() {
|
|
4268
|
-
return
|
|
4274
|
+
return Es({ hasNext: at, initial: this.getAdjacentCaret(), map: (e) => e, step: (e) => e.getAdjacentCaret() });
|
|
4269
4275
|
}
|
|
4270
4276
|
getAdjacentCaret() {
|
|
4271
4277
|
return q(this.getNodeAtCaret(), this.direction);
|
|
@@ -4305,7 +4311,7 @@ class wr {
|
|
|
4305
4311
|
return this;
|
|
4306
4312
|
}
|
|
4307
4313
|
}
|
|
4308
|
-
class
|
|
4314
|
+
class Nt extends Er {
|
|
4309
4315
|
constructor() {
|
|
4310
4316
|
super(...arguments);
|
|
4311
4317
|
se(this, "type", "child");
|
|
@@ -4315,10 +4321,10 @@ class bt extends wr {
|
|
|
4315
4321
|
return t === this.origin ? this : Pe(t, this.direction);
|
|
4316
4322
|
}
|
|
4317
4323
|
getParentCaret(t = "root") {
|
|
4318
|
-
return q(
|
|
4324
|
+
return q(Mr(this.getParentAtCaret(), t), this.direction);
|
|
4319
4325
|
}
|
|
4320
4326
|
getFlipped() {
|
|
4321
|
-
const t =
|
|
4327
|
+
const t = Qe(this.direction);
|
|
4322
4328
|
return q(this.getNodeAtCaret(), t) || Pe(this.origin, t);
|
|
4323
4329
|
}
|
|
4324
4330
|
getParentAtCaret() {
|
|
@@ -4328,20 +4334,20 @@ class bt extends wr {
|
|
|
4328
4334
|
return this;
|
|
4329
4335
|
}
|
|
4330
4336
|
isSameNodeCaret(t) {
|
|
4331
|
-
return t instanceof
|
|
4337
|
+
return t instanceof Nt && this.direction === t.direction && this.origin.is(t.origin);
|
|
4332
4338
|
}
|
|
4333
4339
|
isSamePointCaret(t) {
|
|
4334
4340
|
return this.isSameNodeCaret(t);
|
|
4335
4341
|
}
|
|
4336
4342
|
}
|
|
4337
|
-
const
|
|
4338
|
-
function
|
|
4339
|
-
return
|
|
4343
|
+
const fl = { root: ne, shadowRoot: Le };
|
|
4344
|
+
function Qe(n) {
|
|
4345
|
+
return ul[n];
|
|
4340
4346
|
}
|
|
4341
|
-
function
|
|
4342
|
-
return
|
|
4347
|
+
function Mr(n, e = "root") {
|
|
4348
|
+
return fl[e](n) ? null : n;
|
|
4343
4349
|
}
|
|
4344
|
-
class
|
|
4350
|
+
class $e extends Er {
|
|
4345
4351
|
constructor() {
|
|
4346
4352
|
super(...arguments);
|
|
4347
4353
|
se(this, "type", "sibling");
|
|
@@ -4360,20 +4366,20 @@ class Ue extends wr {
|
|
|
4360
4366
|
return v(this.origin) ? Pe(this.origin, this.direction) : null;
|
|
4361
4367
|
}
|
|
4362
4368
|
getParentCaret(t = "root") {
|
|
4363
|
-
return q(
|
|
4369
|
+
return q(Mr(this.getParentAtCaret(), t), this.direction);
|
|
4364
4370
|
}
|
|
4365
4371
|
getFlipped() {
|
|
4366
|
-
const t =
|
|
4372
|
+
const t = Qe(this.direction);
|
|
4367
4373
|
return q(this.getNodeAtCaret(), t) || Pe(this.origin.getParentOrThrow(), t);
|
|
4368
4374
|
}
|
|
4369
4375
|
isSamePointCaret(t) {
|
|
4370
|
-
return t instanceof
|
|
4376
|
+
return t instanceof $e && this.direction === t.direction && this.origin.is(t.origin);
|
|
4371
4377
|
}
|
|
4372
4378
|
isSameNodeCaret(t) {
|
|
4373
|
-
return (t instanceof
|
|
4379
|
+
return (t instanceof $e || t instanceof Ve) && this.direction === t.direction && this.origin.is(t.origin);
|
|
4374
4380
|
}
|
|
4375
4381
|
}
|
|
4376
|
-
class
|
|
4382
|
+
class Ve extends Er {
|
|
4377
4383
|
constructor(t, r) {
|
|
4378
4384
|
super(t);
|
|
4379
4385
|
se(this, "type", "text");
|
|
@@ -4381,7 +4387,7 @@ class $e extends wr {
|
|
|
4381
4387
|
}
|
|
4382
4388
|
getLatest() {
|
|
4383
4389
|
const t = this.origin.getLatest();
|
|
4384
|
-
return t === this.origin ? this :
|
|
4390
|
+
return t === this.origin ? this : Ye(t, this.direction, this.offset);
|
|
4385
4391
|
}
|
|
4386
4392
|
getParentAtCaret() {
|
|
4387
4393
|
return this.origin.getParent();
|
|
@@ -4390,31 +4396,31 @@ class $e extends wr {
|
|
|
4390
4396
|
return null;
|
|
4391
4397
|
}
|
|
4392
4398
|
getParentCaret(t = "root") {
|
|
4393
|
-
return q(
|
|
4399
|
+
return q(Mr(this.getParentAtCaret(), t), this.direction);
|
|
4394
4400
|
}
|
|
4395
4401
|
getFlipped() {
|
|
4396
|
-
return
|
|
4402
|
+
return Ye(this.origin, Qe(this.direction), this.offset);
|
|
4397
4403
|
}
|
|
4398
4404
|
isSamePointCaret(t) {
|
|
4399
|
-
return t instanceof
|
|
4405
|
+
return t instanceof Ve && this.direction === t.direction && this.origin.is(t.origin) && this.offset === t.offset;
|
|
4400
4406
|
}
|
|
4401
4407
|
isSameNodeCaret(t) {
|
|
4402
|
-
return (t instanceof
|
|
4408
|
+
return (t instanceof $e || t instanceof Ve) && this.direction === t.direction && this.origin.is(t.origin);
|
|
4403
4409
|
}
|
|
4404
4410
|
getSiblingCaret() {
|
|
4405
4411
|
return q(this.origin, this.direction);
|
|
4406
4412
|
}
|
|
4407
4413
|
}
|
|
4408
4414
|
function Oe(n) {
|
|
4409
|
-
return n instanceof
|
|
4415
|
+
return n instanceof Ve;
|
|
4410
4416
|
}
|
|
4411
|
-
function
|
|
4412
|
-
return n instanceof
|
|
4417
|
+
function at(n) {
|
|
4418
|
+
return n instanceof $e;
|
|
4413
4419
|
}
|
|
4414
4420
|
function he(n) {
|
|
4415
|
-
return n instanceof
|
|
4421
|
+
return n instanceof Nt;
|
|
4416
4422
|
}
|
|
4417
|
-
const
|
|
4423
|
+
const dl = { next: class extends Ve {
|
|
4418
4424
|
constructor() {
|
|
4419
4425
|
super(...arguments);
|
|
4420
4426
|
se(this, "direction", "next");
|
|
@@ -4425,7 +4431,7 @@ const fl = { next: class extends $e {
|
|
|
4425
4431
|
insert(e) {
|
|
4426
4432
|
return this.origin.insertAfter(e), this;
|
|
4427
4433
|
}
|
|
4428
|
-
}, previous: class extends
|
|
4434
|
+
}, previous: class extends Ve {
|
|
4429
4435
|
constructor() {
|
|
4430
4436
|
super(...arguments);
|
|
4431
4437
|
se(this, "direction", "previous");
|
|
@@ -4436,7 +4442,7 @@ const fl = { next: class extends $e {
|
|
|
4436
4442
|
insert(e) {
|
|
4437
4443
|
return this.origin.insertBefore(e), this;
|
|
4438
4444
|
}
|
|
4439
|
-
} },
|
|
4445
|
+
} }, hl = { next: class extends $e {
|
|
4440
4446
|
constructor() {
|
|
4441
4447
|
super(...arguments);
|
|
4442
4448
|
se(this, "direction", "next");
|
|
@@ -4447,7 +4453,7 @@ const fl = { next: class extends $e {
|
|
|
4447
4453
|
insert(e) {
|
|
4448
4454
|
return this.origin.insertAfter(e), this;
|
|
4449
4455
|
}
|
|
4450
|
-
}, previous: class extends
|
|
4456
|
+
}, previous: class extends $e {
|
|
4451
4457
|
constructor() {
|
|
4452
4458
|
super(...arguments);
|
|
4453
4459
|
se(this, "direction", "previous");
|
|
@@ -4458,7 +4464,7 @@ const fl = { next: class extends $e {
|
|
|
4458
4464
|
insert(e) {
|
|
4459
4465
|
return this.origin.insertBefore(e), this;
|
|
4460
4466
|
}
|
|
4461
|
-
} },
|
|
4467
|
+
} }, gl = { next: class extends Nt {
|
|
4462
4468
|
constructor() {
|
|
4463
4469
|
super(...arguments);
|
|
4464
4470
|
se(this, "direction", "next");
|
|
@@ -4469,7 +4475,7 @@ const fl = { next: class extends $e {
|
|
|
4469
4475
|
insert(e) {
|
|
4470
4476
|
return this.origin.splice(0, 0, [e]), this;
|
|
4471
4477
|
}
|
|
4472
|
-
}, previous: class extends
|
|
4478
|
+
}, previous: class extends Nt {
|
|
4473
4479
|
constructor() {
|
|
4474
4480
|
super(...arguments);
|
|
4475
4481
|
se(this, "direction", "previous");
|
|
@@ -4482,12 +4488,12 @@ const fl = { next: class extends $e {
|
|
|
4482
4488
|
}
|
|
4483
4489
|
} };
|
|
4484
4490
|
function q(n, e) {
|
|
4485
|
-
return n ? new
|
|
4491
|
+
return n ? new hl[e](n) : null;
|
|
4486
4492
|
}
|
|
4487
|
-
function
|
|
4488
|
-
return n ? new
|
|
4493
|
+
function Ye(n, e, t) {
|
|
4494
|
+
return n ? new dl[e](n, ct(n, t)) : null;
|
|
4489
4495
|
}
|
|
4490
|
-
function
|
|
4496
|
+
function ct(n, e) {
|
|
4491
4497
|
const t = n.getTextContentSize();
|
|
4492
4498
|
let r = e === "next" ? t : e === "previous" ? 0 : e;
|
|
4493
4499
|
return (r < 0 || r > t) && (function(i, ...s) {
|
|
@@ -4497,26 +4503,26 @@ function at(n, e) {
|
|
|
4497
4503
|
o.search = l.toString(), console.warn(`Minified Lexical warning #${i}; visit ${o.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
|
|
4498
4504
|
}(284, String(e), String(t), n.getKey()), r = r < 0 ? 0 : t), r;
|
|
4499
4505
|
}
|
|
4500
|
-
function
|
|
4501
|
-
return new
|
|
4506
|
+
function Ti(n, e) {
|
|
4507
|
+
return new pl(n, e);
|
|
4502
4508
|
}
|
|
4503
4509
|
function Pe(n, e) {
|
|
4504
|
-
return v(n) ? new
|
|
4510
|
+
return v(n) ? new gl[e](n) : null;
|
|
4505
4511
|
}
|
|
4506
|
-
function
|
|
4512
|
+
function _l(n) {
|
|
4507
4513
|
return n && n.getChildCaret() || n;
|
|
4508
4514
|
}
|
|
4509
|
-
function
|
|
4510
|
-
return n &&
|
|
4515
|
+
function Ar(n) {
|
|
4516
|
+
return n && _l(n.getAdjacentCaret());
|
|
4511
4517
|
}
|
|
4512
|
-
class
|
|
4518
|
+
class Or {
|
|
4513
4519
|
constructor(e, t, r) {
|
|
4514
4520
|
se(this, "type", "node-caret-range");
|
|
4515
4521
|
this.anchor = e, this.focus = t, this.direction = r;
|
|
4516
4522
|
}
|
|
4517
4523
|
getLatest() {
|
|
4518
4524
|
const e = this.anchor.getLatest(), t = this.focus.getLatest();
|
|
4519
|
-
return e === this.anchor && t === this.focus ? this : new
|
|
4525
|
+
return e === this.anchor && t === this.focus ? this : new Or(e, t, this.direction);
|
|
4520
4526
|
}
|
|
4521
4527
|
isCollapsed() {
|
|
4522
4528
|
return this.anchor.isSamePointCaret(this.focus);
|
|
@@ -4525,25 +4531,25 @@ class Ar {
|
|
|
4525
4531
|
const e = (i) => {
|
|
4526
4532
|
const s = this[i].getLatest();
|
|
4527
4533
|
return Oe(s) ? function(o, l) {
|
|
4528
|
-
const { direction: a, origin: c } = o, u =
|
|
4529
|
-
return
|
|
4534
|
+
const { direction: a, origin: c } = o, u = ct(c, l === "focus" ? Qe(a) : a);
|
|
4535
|
+
return Ti(o, u - o.offset);
|
|
4530
4536
|
}(s, i) : null;
|
|
4531
4537
|
}, t = e("anchor"), r = e("focus");
|
|
4532
4538
|
if (t && r) {
|
|
4533
4539
|
const { caret: i } = t, { caret: s } = r;
|
|
4534
|
-
if (i.isSameNodeCaret(s)) return [
|
|
4540
|
+
if (i.isSameNodeCaret(s)) return [Ti(i, s.offset - i.offset), null];
|
|
4535
4541
|
}
|
|
4536
4542
|
return [t, r];
|
|
4537
4543
|
}
|
|
4538
4544
|
iterNodeCarets(e = "root") {
|
|
4539
|
-
const t = Oe(this.anchor) ? this.anchor.getSiblingCaret() : this.anchor.getLatest(), r = this.focus.getLatest(), i = Oe(r), s = (o) => o.isSameNodeCaret(r) ? null :
|
|
4540
|
-
return
|
|
4545
|
+
const t = Oe(this.anchor) ? this.anchor.getSiblingCaret() : this.anchor.getLatest(), r = this.focus.getLatest(), i = Oe(r), s = (o) => o.isSameNodeCaret(r) ? null : Ar(o) || o.getParentCaret(e);
|
|
4546
|
+
return Es({ hasNext: (o) => o !== null && !(i && r.isSameNodeCaret(o)), initial: t.isSameNodeCaret(r) ? null : s(t), map: (o) => o, step: s });
|
|
4541
4547
|
}
|
|
4542
4548
|
[Symbol.iterator]() {
|
|
4543
4549
|
return this.iterNodeCarets("root");
|
|
4544
4550
|
}
|
|
4545
4551
|
}
|
|
4546
|
-
class
|
|
4552
|
+
class pl {
|
|
4547
4553
|
constructor(e, t) {
|
|
4548
4554
|
se(this, "type", "slice");
|
|
4549
4555
|
this.caret = e, this.distance = t;
|
|
@@ -4561,19 +4567,19 @@ class _l {
|
|
|
4561
4567
|
}
|
|
4562
4568
|
removeTextSlice() {
|
|
4563
4569
|
const { caret: { origin: e, direction: t } } = this, [r, i] = this.getSliceIndices(), s = e.getTextContent();
|
|
4564
|
-
return
|
|
4570
|
+
return Ye(e.setTextContent(s.slice(0, r) + s.slice(i)), t, r);
|
|
4565
4571
|
}
|
|
4566
4572
|
}
|
|
4567
|
-
function
|
|
4568
|
-
return
|
|
4573
|
+
function ws(n) {
|
|
4574
|
+
return He(n, q(re(), n.direction));
|
|
4569
4575
|
}
|
|
4570
|
-
function
|
|
4571
|
-
return
|
|
4576
|
+
function yl(n) {
|
|
4577
|
+
return He(n, n);
|
|
4572
4578
|
}
|
|
4573
|
-
function
|
|
4574
|
-
return n.direction !== e.direction && T(265), new
|
|
4579
|
+
function He(n, e) {
|
|
4580
|
+
return n.direction !== e.direction && T(265), new Or(n, e, n.direction);
|
|
4575
4581
|
}
|
|
4576
|
-
function
|
|
4582
|
+
function Es(n) {
|
|
4577
4583
|
const { initial: e, hasNext: t, step: r, map: i } = n;
|
|
4578
4584
|
let s = e;
|
|
4579
4585
|
return { [Symbol.iterator]() {
|
|
@@ -4584,8 +4590,8 @@ function Ns(n) {
|
|
|
4584
4590
|
return s = r(s), o;
|
|
4585
4591
|
} };
|
|
4586
4592
|
}
|
|
4587
|
-
function
|
|
4588
|
-
const t =
|
|
4593
|
+
function Ms(n, e) {
|
|
4594
|
+
const t = qt(n.origin, e.origin);
|
|
4589
4595
|
switch (t === null && T(275, n.origin.getKey(), e.origin.getKey()), t.type) {
|
|
4590
4596
|
case "same": {
|
|
4591
4597
|
const r = n.type === "text", i = e.type === "text";
|
|
@@ -4598,10 +4604,10 @@ function ws(n, e) {
|
|
|
4598
4604
|
case "descendant":
|
|
4599
4605
|
return e.type === "child" ? 1 : -1;
|
|
4600
4606
|
case "branch":
|
|
4601
|
-
return
|
|
4607
|
+
return As(t);
|
|
4602
4608
|
}
|
|
4603
4609
|
}
|
|
4604
|
-
function
|
|
4610
|
+
function As(n) {
|
|
4605
4611
|
const { a: e, b: t } = n, r = e.__key, i = t.__key;
|
|
4606
4612
|
let s = e, o = t;
|
|
4607
4613
|
for (; s && o; s = s.getNextSibling(), o = o.getNextSibling()) {
|
|
@@ -4610,67 +4616,67 @@ function Es(n) {
|
|
|
4610
4616
|
}
|
|
4611
4617
|
return s === null ? 1 : -1;
|
|
4612
4618
|
}
|
|
4613
|
-
function
|
|
4619
|
+
function jt(n, e) {
|
|
4614
4620
|
return e.is(n);
|
|
4615
4621
|
}
|
|
4616
|
-
function
|
|
4622
|
+
function bi(n) {
|
|
4617
4623
|
return v(n) ? [n.getLatest(), null] : [n.getParent(), n.getLatest()];
|
|
4618
4624
|
}
|
|
4619
|
-
function
|
|
4625
|
+
function qt(n, e) {
|
|
4620
4626
|
if (n.is(e)) return { commonAncestor: n, type: "same" };
|
|
4621
4627
|
const t = /* @__PURE__ */ new Map();
|
|
4622
|
-
for (let [r, i] =
|
|
4623
|
-
for (let [r, i] =
|
|
4628
|
+
for (let [r, i] = bi(n); r; i = r, r = r.getParent()) t.set(r, i);
|
|
4629
|
+
for (let [r, i] = bi(e); r; i = r, r = r.getParent()) {
|
|
4624
4630
|
const s = t.get(r);
|
|
4625
|
-
if (s !== void 0) return s === null ? (
|
|
4631
|
+
if (s !== void 0) return s === null ? (jt(n, r) || T(276), { commonAncestor: r, type: "ancestor" }) : i === null ? (jt(e, r) || T(277), { commonAncestor: r, type: "descendant" }) : ((v(s) || jt(n, s)) && (v(i) || jt(e, i)) && r.is(s.getParent()) && r.is(i.getParent()) || T(278), { a: s, b: i, commonAncestor: r, type: "branch" });
|
|
4626
4632
|
}
|
|
4627
4633
|
return null;
|
|
4628
4634
|
}
|
|
4629
|
-
function
|
|
4630
|
-
const { type: t, key: r, offset: i } = n, s =
|
|
4631
|
-
return t === "text" ? (M(s) || T(266, s.getType(), r),
|
|
4635
|
+
function qe(n, e) {
|
|
4636
|
+
const { type: t, key: r, offset: i } = n, s = nl(n.key);
|
|
4637
|
+
return t === "text" ? (M(s) || T(266, s.getType(), r), Ye(s, e, i)) : (v(s) || T(267, s.getType(), r), Sl(s, n.offset, e));
|
|
4632
4638
|
}
|
|
4633
|
-
function
|
|
4639
|
+
function wt(n, e) {
|
|
4634
4640
|
const { origin: t, direction: r } = e, i = r === "next";
|
|
4635
|
-
Oe(e) ? n.set(t.getKey(), e.offset, "text") :
|
|
4641
|
+
Oe(e) ? n.set(t.getKey(), e.offset, "text") : at(e) ? M(t) ? n.set(t.getKey(), ct(t, r), "text") : n.set(t.getParentOrThrow().getKey(), t.getIndexWithinParent() + (i ? 1 : 0), "element") : (he(e) && v(t) || T(268), n.set(t.getKey(), i ? 0 : t.getChildrenSize(), "element"));
|
|
4636
4642
|
}
|
|
4637
|
-
function
|
|
4638
|
-
const e = L(), t = O(e) ? e :
|
|
4639
|
-
return
|
|
4643
|
+
function ml(n) {
|
|
4644
|
+
const e = L(), t = O(e) ? e : Ko();
|
|
4645
|
+
return Gt(t, n), ie(t), t;
|
|
4640
4646
|
}
|
|
4641
|
-
function
|
|
4642
|
-
|
|
4647
|
+
function Gt(n, e) {
|
|
4648
|
+
wt(n.anchor, e.anchor), wt(n.focus, e.focus);
|
|
4643
4649
|
}
|
|
4644
|
-
function
|
|
4645
|
-
const { anchor: e, focus: t } = n, r =
|
|
4646
|
-
return
|
|
4650
|
+
function Ni(n) {
|
|
4651
|
+
const { anchor: e, focus: t } = n, r = qe(e, "next"), i = qe(t, "next"), s = Ms(r, i) <= 0 ? "next" : "previous";
|
|
4652
|
+
return He(Ge(r, s), Ge(i, s));
|
|
4647
4653
|
}
|
|
4648
|
-
function
|
|
4649
|
-
const { direction: e, origin: t } = n, r = q(t,
|
|
4654
|
+
function Lt(n) {
|
|
4655
|
+
const { direction: e, origin: t } = n, r = q(t, Qe(e)).getNodeAtCaret();
|
|
4650
4656
|
return r ? q(r, e) : Pe(t.getParentOrThrow(), e);
|
|
4651
4657
|
}
|
|
4652
|
-
function
|
|
4658
|
+
function wi(n, e = "root") {
|
|
4653
4659
|
const t = [n];
|
|
4654
|
-
for (let r = he(n) ? n.getParentCaret(e) : n.getSiblingCaret(); r !== null; r = r.getParentCaret(e)) t.push(
|
|
4660
|
+
for (let r = he(n) ? n.getParentCaret(e) : n.getSiblingCaret(); r !== null; r = r.getParentCaret(e)) t.push(Lt(r));
|
|
4655
4661
|
return t;
|
|
4656
4662
|
}
|
|
4657
|
-
function
|
|
4663
|
+
function Un(n) {
|
|
4658
4664
|
return !!n && n.origin.isAttached();
|
|
4659
4665
|
}
|
|
4660
|
-
function
|
|
4666
|
+
function xl(n, e = "removeEmptySlices") {
|
|
4661
4667
|
if (n.isCollapsed()) return n;
|
|
4662
4668
|
const t = "root", r = "next";
|
|
4663
4669
|
let i = e;
|
|
4664
|
-
const s =
|
|
4670
|
+
const s = Os(n, r), o = wi(s.anchor, t), l = wi(s.focus.getFlipped(), t), a = /* @__PURE__ */ new Set(), c = [];
|
|
4665
4671
|
for (const d of s.iterNodeCarets(t)) if (he(d)) a.add(d.origin.getKey());
|
|
4666
|
-
else if (
|
|
4672
|
+
else if (at(d)) {
|
|
4667
4673
|
const { origin: _ } = d;
|
|
4668
4674
|
v(_) && !a.has(_.getKey()) || c.push(_);
|
|
4669
4675
|
}
|
|
4670
4676
|
for (const d of c) d.remove();
|
|
4671
4677
|
for (const d of s.getTextSlices()) {
|
|
4672
4678
|
if (!d) continue;
|
|
4673
|
-
const { origin: _ } = d.caret, p = _.getTextContentSize(), x =
|
|
4679
|
+
const { origin: _ } = d.caret, p = _.getTextContentSize(), x = Lt(q(_, r)), y = _.getMode();
|
|
4674
4680
|
if (Math.abs(d.distance) === p && i === "removeEmptySlices" || y === "token" && d.distance !== 0) x.remove();
|
|
4675
4681
|
else if (d.distance !== 0) {
|
|
4676
4682
|
i = "removeEmptySlices";
|
|
@@ -4678,17 +4684,17 @@ function ml(n, e = "removeEmptySlices") {
|
|
|
4678
4684
|
const b = d.caret.origin;
|
|
4679
4685
|
if (y === "segmented") {
|
|
4680
4686
|
const N = m.origin, C = Y(N.getTextContent()).setStyle(N.getStyle()).setFormat(N.getFormat());
|
|
4681
|
-
x.replaceOrInsert(C), m =
|
|
4687
|
+
x.replaceOrInsert(C), m = Ye(C, r, m.offset);
|
|
4682
4688
|
}
|
|
4683
4689
|
b.is(o[0].origin) && (o[0] = m), b.is(l[0].origin) && (l[0] = m.getFlipped());
|
|
4684
4690
|
}
|
|
4685
4691
|
}
|
|
4686
4692
|
let u, h;
|
|
4687
|
-
for (const d of o) if (
|
|
4693
|
+
for (const d of o) if (Un(d)) {
|
|
4688
4694
|
u = de(d);
|
|
4689
4695
|
break;
|
|
4690
4696
|
}
|
|
4691
|
-
for (const d of l) if (
|
|
4697
|
+
for (const d of l) if (Un(d)) {
|
|
4692
4698
|
h = de(d);
|
|
4693
4699
|
break;
|
|
4694
4700
|
}
|
|
@@ -4711,66 +4717,66 @@ function ml(n, e = "removeEmptySlices") {
|
|
|
4711
4717
|
!W && F(P) && (W = P);
|
|
4712
4718
|
}
|
|
4713
4719
|
return W;
|
|
4714
|
-
}, k = w(m,
|
|
4720
|
+
}, k = w(m, Ee), S = k && w(b, (A) => p.has(A.getKey()) && Ee(A));
|
|
4715
4721
|
return k && S ? [k, S] : null;
|
|
4716
4722
|
}(u, h, a);
|
|
4717
4723
|
if (f) {
|
|
4718
4724
|
const [d, _] = f;
|
|
4719
4725
|
Pe(d, "previous").splice(0, _.getChildren()), _.remove();
|
|
4720
4726
|
}
|
|
4721
|
-
const g = [u, h, ...o, ...l].find(
|
|
4727
|
+
const g = [u, h, ...o, ...l].find(Un);
|
|
4722
4728
|
if (g)
|
|
4723
|
-
return
|
|
4729
|
+
return yl(Ge(de(g), n.direction));
|
|
4724
4730
|
T(269, JSON.stringify(o.map((d) => d.origin.__key)));
|
|
4725
4731
|
}
|
|
4726
4732
|
function de(n) {
|
|
4727
4733
|
const e = function(i) {
|
|
4728
4734
|
let s = i;
|
|
4729
4735
|
for (; he(s); ) {
|
|
4730
|
-
const o =
|
|
4736
|
+
const o = Ar(s);
|
|
4731
4737
|
if (!he(o)) break;
|
|
4732
4738
|
s = o;
|
|
4733
4739
|
}
|
|
4734
4740
|
return s;
|
|
4735
4741
|
}(n.getLatest()), { direction: t } = e;
|
|
4736
|
-
if (M(e.origin)) return Oe(e) ? e :
|
|
4742
|
+
if (M(e.origin)) return Oe(e) ? e : Ye(e.origin, t, t);
|
|
4737
4743
|
const r = e.getAdjacentCaret();
|
|
4738
|
-
return
|
|
4744
|
+
return at(r) && M(r.origin) ? Ye(r.origin, t, Qe(t)) : e;
|
|
4739
4745
|
}
|
|
4740
|
-
function
|
|
4741
|
-
return Oe(n) && n.offset !==
|
|
4746
|
+
function Cl(n) {
|
|
4747
|
+
return Oe(n) && n.offset !== ct(n.origin, n.direction);
|
|
4742
4748
|
}
|
|
4743
|
-
function
|
|
4749
|
+
function Ge(n, e) {
|
|
4744
4750
|
return n.direction === e ? n : n.getFlipped();
|
|
4745
4751
|
}
|
|
4746
|
-
function
|
|
4747
|
-
return n.direction === e ? n :
|
|
4752
|
+
function Os(n, e) {
|
|
4753
|
+
return n.direction === e ? n : He(Ge(n.focus, e), Ge(n.anchor, e));
|
|
4748
4754
|
}
|
|
4749
|
-
function
|
|
4755
|
+
function Sl(n, e, t) {
|
|
4750
4756
|
let r = Pe(n, "next");
|
|
4751
4757
|
for (let i = 0; i < e; i++) {
|
|
4752
4758
|
const s = r.getAdjacentCaret();
|
|
4753
4759
|
if (s === null) break;
|
|
4754
4760
|
r = s;
|
|
4755
4761
|
}
|
|
4756
|
-
return
|
|
4762
|
+
return Ge(r, t);
|
|
4757
4763
|
}
|
|
4758
|
-
function
|
|
4764
|
+
function vl(n) {
|
|
4759
4765
|
const { origin: e, offset: t, direction: r } = n;
|
|
4760
|
-
if (t ===
|
|
4761
|
-
if (t ===
|
|
4766
|
+
if (t === ct(e, r)) return n.getSiblingCaret();
|
|
4767
|
+
if (t === ct(e, Qe(r))) return Lt(n.getSiblingCaret());
|
|
4762
4768
|
const [i] = e.splitText(t);
|
|
4763
|
-
return M(i) || T(281),
|
|
4769
|
+
return M(i) || T(281), Ge(q(i, "next"), r);
|
|
4764
4770
|
}
|
|
4765
|
-
function
|
|
4771
|
+
function kl(n, e) {
|
|
4766
4772
|
return !0;
|
|
4767
4773
|
}
|
|
4768
|
-
function
|
|
4774
|
+
function Zl(n, { $copyElementNode: e = tl, $splitTextPointCaretNext: t = vl, rootMode: r = "shadowRoot", $shouldSplit: i = kl } = {}) {
|
|
4769
4775
|
if (Oe(n)) return t(n);
|
|
4770
4776
|
const s = n.getParentCaret(r);
|
|
4771
4777
|
if (s) {
|
|
4772
4778
|
const { origin: o } = s;
|
|
4773
|
-
if (he(n) && (!o.canBeEmpty() || !i(o, "first"))) return
|
|
4779
|
+
if (he(n) && (!o.canBeEmpty() || !i(o, "first"))) return Lt(s);
|
|
4774
4780
|
const l = function(a) {
|
|
4775
4781
|
const c = [];
|
|
4776
4782
|
for (let u = a.getAdjacentCaret(); u; u = u.getAdjacentCaret()) c.push(u.origin);
|
|
@@ -4782,122 +4788,123 @@ function Ql(n, { $copyElementNode: e = el, $splitTextPointCaretNext: t = Sl, roo
|
|
|
4782
4788
|
}
|
|
4783
4789
|
export {
|
|
4784
4790
|
Te as $,
|
|
4785
|
-
|
|
4786
|
-
|
|
4791
|
+
go as A,
|
|
4792
|
+
co as B,
|
|
4787
4793
|
ln as C,
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4794
|
+
an as D,
|
|
4795
|
+
on as E,
|
|
4796
|
+
Wl as F,
|
|
4797
|
+
$l as G,
|
|
4792
4798
|
yo as H,
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4799
|
+
Ul as I,
|
|
4800
|
+
ut as J,
|
|
4801
|
+
jl as K,
|
|
4802
|
+
Jl as L,
|
|
4803
|
+
xo as M,
|
|
4798
4804
|
L as N,
|
|
4799
|
-
|
|
4805
|
+
mo as O,
|
|
4800
4806
|
Ae as P,
|
|
4801
4807
|
M as Q,
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
+
ze as R,
|
|
4809
|
+
Ml as S,
|
|
4810
|
+
fo as T,
|
|
4811
|
+
Yi as U,
|
|
4812
|
+
Pe as V,
|
|
4813
|
+
pt as W,
|
|
4808
4814
|
Y as X,
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4815
|
+
Co as Y,
|
|
4816
|
+
bo as Z,
|
|
4817
|
+
Ji as _,
|
|
4818
|
+
ee as a,
|
|
4813
4819
|
zl as a$,
|
|
4814
|
-
|
|
4815
|
-
|
|
4820
|
+
Ll as a0,
|
|
4821
|
+
Ko as a1,
|
|
4816
4822
|
ne as a2,
|
|
4817
4823
|
ge as a3,
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4824
|
+
qe as a4,
|
|
4825
|
+
Cl as a5,
|
|
4826
|
+
ws as a6,
|
|
4827
|
+
at as a7,
|
|
4822
4828
|
he as a8,
|
|
4823
4829
|
q as a9,
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4830
|
+
ll as aA,
|
|
4831
|
+
il as aB,
|
|
4832
|
+
pr as aC,
|
|
4833
|
+
Vi as aD,
|
|
4834
|
+
Kl as aE,
|
|
4835
|
+
vn as aF,
|
|
4836
|
+
Vl as aG,
|
|
4837
|
+
Bn as aH,
|
|
4838
|
+
po as aI,
|
|
4839
|
+
ps as aJ,
|
|
4840
|
+
Rl as aK,
|
|
4841
|
+
Ur as aL,
|
|
4842
|
+
Hl as aM,
|
|
4843
|
+
ko as aN,
|
|
4844
|
+
vo as aO,
|
|
4845
|
+
So as aP,
|
|
4846
|
+
Qn as aQ,
|
|
4847
|
+
Vt as aR,
|
|
4848
|
+
El as aS,
|
|
4849
|
+
Xo as aT,
|
|
4850
|
+
wl as aU,
|
|
4851
|
+
Nl as aV,
|
|
4852
|
+
Il as aW,
|
|
4853
|
+
Jr as aX,
|
|
4854
|
+
ys as aY,
|
|
4855
|
+
Ol as aZ,
|
|
4856
|
+
Al as a_,
|
|
4857
|
+
Ar as aa,
|
|
4858
|
+
At as ab,
|
|
4859
|
+
Ue as ac,
|
|
4860
|
+
Dt as ad,
|
|
4861
|
+
Ui as ae,
|
|
4856
4862
|
re as af,
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4863
|
+
Es as ag,
|
|
4864
|
+
ml as ah,
|
|
4865
|
+
yl as ai,
|
|
4866
|
+
Ge as aj,
|
|
4867
|
+
Zl as ak,
|
|
4862
4868
|
Oe as al,
|
|
4863
4869
|
z as am,
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
$
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4870
|
+
we as an,
|
|
4871
|
+
Zr as ao,
|
|
4872
|
+
Ee as ap,
|
|
4873
|
+
ao as aq,
|
|
4874
|
+
Pl as ar,
|
|
4875
|
+
Dl as as,
|
|
4876
|
+
ji as at,
|
|
4877
|
+
$i as au,
|
|
4878
|
+
$o as av,
|
|
4879
|
+
bt as aw,
|
|
4880
|
+
Fl as ax,
|
|
4881
|
+
Si as ay,
|
|
4882
|
+
sl as az,
|
|
4883
|
+
Wr as b,
|
|
4884
|
+
Bl as b0,
|
|
4878
4885
|
O as c,
|
|
4879
4886
|
v as d,
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4887
|
+
wt as e,
|
|
4888
|
+
xn as f,
|
|
4889
|
+
yr as g,
|
|
4890
|
+
ql as h,
|
|
4891
|
+
Yl as i,
|
|
4892
|
+
nt as j,
|
|
4893
|
+
Ql as k,
|
|
4894
|
+
vr as l,
|
|
4895
|
+
ie as m,
|
|
4896
|
+
Nn as n,
|
|
4890
4897
|
D as o,
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4898
|
+
de as p,
|
|
4899
|
+
lo as q,
|
|
4900
|
+
bl as r,
|
|
4901
|
+
Ft as s,
|
|
4902
|
+
Le as t,
|
|
4903
|
+
Gl as u,
|
|
4897
4904
|
$n as v,
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4905
|
+
ft as w,
|
|
4906
|
+
Xl as x,
|
|
4907
|
+
$ as y,
|
|
4908
|
+
_o as z
|
|
4902
4909
|
};
|
|
4903
|
-
//# sourceMappingURL=Lexical.prod-
|
|
4910
|
+
//# sourceMappingURL=Lexical.prod-UwAbgYpF.js.map
|