laif-ds 0.2.83 → 0.2.85
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/CHANGELOG.md +30 -0
- package/dist/agent-docs/adoption-report.json +17 -13
- package/dist/agent-docs/components/AppEditor.md +117 -7
- package/dist/agent-docs/manifest.json +119 -13
- package/dist/components/editor/nodes/mention-node.js +113 -0
- package/dist/components/editor/plugins/mention-plugin.js +224 -0
- package/dist/components/editor/plugins/toolbar/mention-insert-toolbar-plugin.js +41 -0
- package/dist/components/ui/app-editor.js +150 -112
- package/dist/index.d.ts +40 -4
- package/dist/node_modules/@lexical/markdown/LexicalMarkdown.prod.js +5 -5
- package/dist/node_modules/@lexical/react/LexicalTypeaheadMenuPlugin.prod.js +220 -0
- package/dist/node_modules/lexical/Lexical.prod.js +314 -303
- package/dist/styles.v3.css +1 -1
- package/package.json +1 -1
- /package/dist/agent-docs/{truncated-cell.md → components/truncated-cell.md} +0 -0
|
@@ -5,15 +5,15 @@ function v(n, ...e) {
|
|
|
5
5
|
for (const i of e) r.append("v", i);
|
|
6
6
|
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.`);
|
|
7
7
|
}
|
|
8
|
-
const le = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, As = le && "documentMode" in document ? document.documentMode : null, ue = le && /Mac|iPod|iPhone|iPad/.test(navigator.platform), ze = le && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent), Vt = !(!le || !("InputEvent" in window) || As) && "getTargetRanges" in new window.InputEvent("input"), Ct = le && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), tt = le && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, ws = le && /Android/.test(navigator.userAgent), bi = le && /^(?=.*Chrome).*/i.test(navigator.userAgent),
|
|
8
|
+
const le = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, As = le && "documentMode" in document ? document.documentMode : null, ue = le && /Mac|iPod|iPhone|iPad/.test(navigator.platform), ze = le && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent), Vt = !(!le || !("InputEvent" in window) || As) && "getTargetRanges" in new window.InputEvent("input"), Ct = le && /Version\/[\d.]+.*Safari/.test(navigator.userAgent), tt = le && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, ws = le && /Android/.test(navigator.userAgent), bi = le && /^(?=.*Chrome).*/i.test(navigator.userAgent), Lr = le && ws && bi, jt = le && /AppleWebKit\/[\d.]+/.test(navigator.userAgent) && !bi;
|
|
9
9
|
function qt(...n) {
|
|
10
10
|
const e = [];
|
|
11
11
|
for (const t of n) if (t && typeof t == "string") for (const [r] of t.matchAll(/\S+/g)) e.push(r);
|
|
12
12
|
return e;
|
|
13
13
|
}
|
|
14
|
-
const Ds = 1, Ps = 3, Ls = 9, Is = 11, We = 0, Mi = 1, nt = 2, Fs = 0, Rs = 1, Ks = 2, Xt = 4, Qt = 8,
|
|
14
|
+
const Ds = 1, Ps = 3, Ls = 9, Is = 11, We = 0, Mi = 1, nt = 2, Fs = 0, Rs = 1, Ks = 2, Xt = 4, Qt = 8, ir = 128, Bs = 1792 | (112 | (3 | Xt | Qt) | ir), sr = 1, or = 2, lr = 3, ar = 4, cr = 5, ur = 6, fn = Ct || tt || jt ? " " : "", Ne = `
|
|
15
15
|
|
|
16
|
-
`, zs = ze ? " " : fn, Oi = "֑-߿יִ-﷽ﹰ-ﻼ", Ai = "A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--", Ws = new RegExp("^[^" + Ai + "]*[" + Oi + "]"), $s = new RegExp("^[^" + Oi + "]*[" + Ai + "]"), $e = { bold: 1, capitalize: 1024, code: 16, highlight:
|
|
16
|
+
`, zs = ze ? " " : fn, Oi = "֑-߿יִ-﷽ﹰ-ﻼ", Ai = "A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--", Ws = new RegExp("^[^" + Ai + "]*[" + Oi + "]"), $s = new RegExp("^[^" + Oi + "]*[" + Ai + "]"), $e = { bold: 1, capitalize: 1024, code: 16, highlight: ir, italic: 2, lowercase: 256, strikethrough: Xt, subscript: 32, superscript: 64, underline: Qt, uppercase: 512 }, Us = { directionless: 1, unmergeable: 2 }, Ir = { center: or, end: ur, justify: ar, left: sr, right: lr, start: cr }, Ys = { [or]: "center", [ur]: "end", [ar]: "justify", [sr]: "left", [lr]: "right", [cr]: "start" }, Js = { normal: 0, segmented: 2, token: 1 }, Hs = { [Fs]: "normal", [Ks]: "segmented", [Rs]: "token" }, Gs = "$";
|
|
17
17
|
function wi(n, e, t, r, i, s) {
|
|
18
18
|
let o = n.getFirstChild();
|
|
19
19
|
for (; o !== null; ) {
|
|
@@ -22,9 +22,9 @@ function wi(n, e, t, r, i, s) {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
const Vs = 100;
|
|
25
|
-
let Wn = !1,
|
|
25
|
+
let Wn = !1, fr = 0;
|
|
26
26
|
function js(n) {
|
|
27
|
-
|
|
27
|
+
fr = n.timeStamp;
|
|
28
28
|
}
|
|
29
29
|
function bn(n, e, t) {
|
|
30
30
|
const r = n.nodeName === "BR", i = e.__lexicalLineBreak;
|
|
@@ -35,14 +35,14 @@ function qs(n, e, t) {
|
|
|
35
35
|
let i = null, s = null;
|
|
36
36
|
r !== null && r.anchorNode === n && (i = r.anchorOffset, s = r.focusOffset);
|
|
37
37
|
const o = n.nodeValue;
|
|
38
|
-
o !== null &&
|
|
38
|
+
o !== null && vr(e, o, i, s, !1);
|
|
39
39
|
}
|
|
40
40
|
function Xs(n, e, t) {
|
|
41
41
|
if (w(n)) {
|
|
42
42
|
const r = n.anchor.getNode();
|
|
43
43
|
if (r.is(t) && n.format !== r.getFormat()) return !1;
|
|
44
44
|
}
|
|
45
|
-
return
|
|
45
|
+
return ke(e) && t.isAttached();
|
|
46
46
|
}
|
|
47
47
|
function Qs(n, e, t, r) {
|
|
48
48
|
for (let i = n; i && !sl(i); i = wt(i)) {
|
|
@@ -55,7 +55,7 @@ function Qs(n, e, t, r) {
|
|
|
55
55
|
}
|
|
56
56
|
function Di(n, e, t) {
|
|
57
57
|
Wn = !0;
|
|
58
|
-
const r = performance.now() -
|
|
58
|
+
const r = performance.now() - fr > Vs;
|
|
59
59
|
try {
|
|
60
60
|
te(n, (() => {
|
|
61
61
|
const i = I() || (function(f) {
|
|
@@ -69,7 +69,7 @@ function Di(n, e, t) {
|
|
|
69
69
|
const g = e[f], d = g.type, _ = g.target, p = Qs(_, n, l, o);
|
|
70
70
|
if (!p) continue;
|
|
71
71
|
const [C, y] = p;
|
|
72
|
-
if (d === "characterData") r && O(y) &&
|
|
72
|
+
if (d === "characterData") r && O(y) && ke(_) && Xs(i, _, y) && qs(_, y, n);
|
|
73
73
|
else if (d === "childList") {
|
|
74
74
|
c = !0;
|
|
75
75
|
const m = g.addedNodes;
|
|
@@ -118,12 +118,12 @@ function Pi(n) {
|
|
|
118
118
|
}
|
|
119
119
|
function Li(n) {
|
|
120
120
|
(function(e) {
|
|
121
|
-
|
|
121
|
+
fr === 0 && se(e).addEventListener("textInput", js, !0);
|
|
122
122
|
})(n), n._observer = new MutationObserver(((e, t) => {
|
|
123
123
|
Di(n, e, t);
|
|
124
124
|
}));
|
|
125
125
|
}
|
|
126
|
-
class
|
|
126
|
+
class dr {
|
|
127
127
|
constructor(e, t = /* @__PURE__ */ new Map(), r = void 0, i = /* @__PURE__ */ new Map(), s = void 0) {
|
|
128
128
|
this.node = e, this.sharedConfigMap = t, this.unknownState = r, this.knownState = i;
|
|
129
129
|
const o = s !== void 0 ? s : (function(l, a, c) {
|
|
@@ -160,7 +160,7 @@ class fr {
|
|
|
160
160
|
const t = new Map(this.knownState), r = Ft(i = this.unknownState) && { ...i };
|
|
161
161
|
var i;
|
|
162
162
|
if (r) for (const s of t.keys()) delete r[s.key];
|
|
163
|
-
return new
|
|
163
|
+
return new dr(e, this.sharedConfigMap, Ft(r), t, this.size);
|
|
164
164
|
}
|
|
165
165
|
updateFromKnown(e, t) {
|
|
166
166
|
const r = e.key;
|
|
@@ -183,10 +183,10 @@ function Ft(n) {
|
|
|
183
183
|
if (n) for (const e in n) return n;
|
|
184
184
|
}
|
|
185
185
|
function Zs(n) {
|
|
186
|
-
const e = n.getWritable(), t = e.__state ? e.__state.getWritable(e) : new
|
|
186
|
+
const e = n.getWritable(), t = e.__state ? e.__state.getWritable(e) : new dr(e);
|
|
187
187
|
return e.__state = t, t;
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function Fr(n, e) {
|
|
190
190
|
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;
|
|
191
191
|
return (t === null || t === s) && (r === null || r === o) && (i === null || i === l) && (n.__state === null || a === c || (function(u, h) {
|
|
192
192
|
if (u === h) return !0;
|
|
@@ -209,17 +209,17 @@ function Ir(n, e) {
|
|
|
209
209
|
return !(u && g(u, h) || h && g(h, u) || u && d(u, h) || h && d(h, u));
|
|
210
210
|
})(a, c));
|
|
211
211
|
}
|
|
212
|
-
function
|
|
212
|
+
function Rr(n, e) {
|
|
213
213
|
const t = n.mergeWithSibling(e), r = z()._normalizedNodes;
|
|
214
214
|
return r.add(n.__key), r.add(e.__key), t;
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function Kr(n) {
|
|
217
217
|
let e, t, r = n;
|
|
218
218
|
if (r.__text !== "" || !r.isSimpleText() || r.isUnmergeable()) {
|
|
219
219
|
for (; (e = r.getPreviousSibling()) !== null && O(e) && e.isSimpleText() && !e.isUnmergeable(); ) {
|
|
220
220
|
if (e.__text !== "") {
|
|
221
|
-
if (
|
|
222
|
-
r =
|
|
221
|
+
if (Fr(e, r)) {
|
|
222
|
+
r = Rr(e, r);
|
|
223
223
|
break;
|
|
224
224
|
}
|
|
225
225
|
break;
|
|
@@ -228,8 +228,8 @@ function Rr(n) {
|
|
|
228
228
|
}
|
|
229
229
|
for (; (t = r.getNextSibling()) !== null && O(t) && t.isSimpleText() && !t.isUnmergeable(); ) {
|
|
230
230
|
if (t.__text !== "") {
|
|
231
|
-
if (
|
|
232
|
-
r =
|
|
231
|
+
if (Fr(r, t)) {
|
|
232
|
+
r = Rr(r, t);
|
|
233
233
|
break;
|
|
234
234
|
}
|
|
235
235
|
break;
|
|
@@ -239,9 +239,9 @@ function Rr(n) {
|
|
|
239
239
|
} else r.remove();
|
|
240
240
|
}
|
|
241
241
|
function $n(n) {
|
|
242
|
-
return
|
|
242
|
+
return Br(n.anchor), Br(n.focus), n;
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function Br(n) {
|
|
245
245
|
for (; n.type === "element"; ) {
|
|
246
246
|
const e = n.getNode(), t = n.offset;
|
|
247
247
|
let r, i;
|
|
@@ -253,7 +253,7 @@ function Kr(n) {
|
|
|
253
253
|
n.set(r.__key, i ? r.getChildrenSize() : 0, "element", !0);
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
|
-
let
|
|
256
|
+
let we, Q, xt, dn, Un, Yn, Ue, oe, Jn, St, $ = "", X = "", ae = null, ce = "", Ce = "", Ii = !1, Nt = !1, $t = null;
|
|
257
257
|
function Zt(n, e) {
|
|
258
258
|
const t = Ue.get(n);
|
|
259
259
|
if (e !== null) {
|
|
@@ -264,7 +264,7 @@ function Zt(n, e) {
|
|
|
264
264
|
const r = tn(t, Ue);
|
|
265
265
|
Hn(r, 0, r.length - 1, null);
|
|
266
266
|
}
|
|
267
|
-
t !== void 0 &&
|
|
267
|
+
t !== void 0 && kr(St, xt, dn, t, "destroyed");
|
|
268
268
|
}
|
|
269
269
|
function Hn(n, e, t, r) {
|
|
270
270
|
let i = e;
|
|
@@ -278,7 +278,7 @@ function Le(n, e) {
|
|
|
278
278
|
}
|
|
279
279
|
const eo = "40px";
|
|
280
280
|
function Fi(n, e) {
|
|
281
|
-
const t =
|
|
281
|
+
const t = we.theme.indent;
|
|
282
282
|
if (typeof t == "string") {
|
|
283
283
|
const i = n.classList.contains(t);
|
|
284
284
|
e > 0 && !i ? n.classList.add(t) : e < 1 && i && n.classList.remove(t);
|
|
@@ -288,12 +288,12 @@ function Fi(n, e) {
|
|
|
288
288
|
}
|
|
289
289
|
function Ri(n, e) {
|
|
290
290
|
const t = n.style;
|
|
291
|
-
e === 0 ? Le(t, "") : e ===
|
|
291
|
+
e === 0 ? Le(t, "") : e === sr ? Le(t, "left") : e === or ? Le(t, "center") : e === lr ? Le(t, "right") : e === ar ? Le(t, "justify") : e === cr ? Le(t, "start") : e === ur && Le(t, "end");
|
|
292
292
|
}
|
|
293
293
|
function en(n, e) {
|
|
294
294
|
const t = oe.get(n);
|
|
295
295
|
t === void 0 && v(60);
|
|
296
|
-
const r = t.createDOM(
|
|
296
|
+
const r = t.createDOM(we, Q);
|
|
297
297
|
if ((function(i, s, o) {
|
|
298
298
|
const l = o._keyToDOMMap;
|
|
299
299
|
(function(a, c, u) {
|
|
@@ -314,12 +314,12 @@ function en(n, e) {
|
|
|
314
314
|
} else {
|
|
315
315
|
const i = t.getTextContent();
|
|
316
316
|
if (K(t)) {
|
|
317
|
-
const s = t.decorate(Q,
|
|
317
|
+
const s = t.decorate(Q, we);
|
|
318
318
|
s !== null && zi(n, s), r.contentEditable = "false";
|
|
319
319
|
} else O(t) && (t.isDirectionless() || (X += i));
|
|
320
320
|
$ += i, Ce += i;
|
|
321
321
|
}
|
|
322
|
-
return e !== null && e.insertChild(r),
|
|
322
|
+
return e !== null && e.insertChild(r), kr(St, xt, dn, t, "created"), r;
|
|
323
323
|
}
|
|
324
324
|
function Gn(n, e, t, r, i) {
|
|
325
325
|
const s = $;
|
|
@@ -332,7 +332,7 @@ function Gn(n, e, t, r, i) {
|
|
|
332
332
|
}
|
|
333
333
|
Sn(e) && ($ += Ne), i.element.__lexicalTextContent = $, $ = s + $;
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function zr(n, e) {
|
|
336
336
|
if (n) {
|
|
337
337
|
const t = n.__last;
|
|
338
338
|
if (t) {
|
|
@@ -344,7 +344,7 @@ function Br(n, e) {
|
|
|
344
344
|
return null;
|
|
345
345
|
}
|
|
346
346
|
function Ki(n, e, t) {
|
|
347
|
-
const r =
|
|
347
|
+
const r = zr(n, Ue), i = zr(e, oe);
|
|
348
348
|
r !== i && e.getDOMSlot(t).setManagedLineBreak(i);
|
|
349
349
|
}
|
|
350
350
|
function Bi(n, e) {
|
|
@@ -354,7 +354,7 @@ function Bi(n, e) {
|
|
|
354
354
|
return Ws.test(o) ? "rtl" : $s.test(o) ? "ltr" : null;
|
|
355
355
|
})(X);
|
|
356
356
|
if (s !== r) {
|
|
357
|
-
const o = e.classList, l =
|
|
357
|
+
const o = e.classList, l = we.theme;
|
|
358
358
|
let a = r !== null ? l[r] : void 0, c = s !== null ? l[s] : void 0;
|
|
359
359
|
if (a !== void 0) {
|
|
360
360
|
if (typeof a == "string") {
|
|
@@ -468,7 +468,7 @@ function ht(n, e) {
|
|
|
468
468
|
}
|
|
469
469
|
return s;
|
|
470
470
|
}
|
|
471
|
-
if (t !== r && i &&
|
|
471
|
+
if (t !== r && i && kr(St, xt, dn, r, "updated"), r.updateDOM(t, s, we)) {
|
|
472
472
|
const o = en(n, null);
|
|
473
473
|
return e === null && v(62), e.replaceChild(o, s), Zt(n, null), o;
|
|
474
474
|
}
|
|
@@ -480,7 +480,7 @@ function ht(n, e) {
|
|
|
480
480
|
} else {
|
|
481
481
|
const o = r.getTextContent();
|
|
482
482
|
if (K(r)) {
|
|
483
|
-
const l = r.decorate(Q,
|
|
483
|
+
const l = r.decorate(Q, we);
|
|
484
484
|
l !== null && zi(n, l);
|
|
485
485
|
} else O(r) && !r.isDirectionless() && (X += o);
|
|
486
486
|
$ += o, Ce += o;
|
|
@@ -505,9 +505,9 @@ function Mn(n) {
|
|
|
505
505
|
return e !== null && e === Q._blockCursorElement && (e = e.nextSibling), e;
|
|
506
506
|
}
|
|
507
507
|
function no(n, e, t, r, i, s) {
|
|
508
|
-
$ = "", Ce = "", X = "", Ii = r === nt, $t = null, Q = t,
|
|
508
|
+
$ = "", Ce = "", X = "", Ii = r === nt, $t = null, Q = t, we = t._config, xt = t._nodes, dn = Q._listeners.mutation, Un = i, Yn = s, Ue = n._nodeMap, oe = e._nodeMap, Nt = e._readOnly, Jn = new Map(t._keyToDOMMap);
|
|
509
509
|
const o = /* @__PURE__ */ new Map();
|
|
510
|
-
return St = o, ht("root", null), Q = void 0, xt = void 0, Un = void 0, Yn = void 0, Ue = void 0, oe = void 0,
|
|
510
|
+
return St = o, ht("root", null), Q = void 0, xt = void 0, Un = void 0, Yn = void 0, Ue = void 0, oe = void 0, we = void 0, Jn = void 0, St = void 0, o;
|
|
511
511
|
}
|
|
512
512
|
function Vn(n) {
|
|
513
513
|
const e = Jn.get(n);
|
|
@@ -516,9 +516,9 @@ function Vn(n) {
|
|
|
516
516
|
function D(n) {
|
|
517
517
|
return { type: n };
|
|
518
518
|
}
|
|
519
|
-
const Wi = D("SELECTION_CHANGE_COMMAND"), ml = D("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"), ro = D("CLICK_COMMAND"), nn = D("DELETE_CHARACTER_COMMAND"), Ut = D("INSERT_LINE_BREAK_COMMAND"),
|
|
519
|
+
const Wi = D("SELECTION_CHANGE_COMMAND"), ml = D("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"), ro = D("CLICK_COMMAND"), nn = D("DELETE_CHARACTER_COMMAND"), Ut = D("INSERT_LINE_BREAK_COMMAND"), Wr = D("INSERT_PARAGRAPH_COMMAND"), gt = D("CONTROLLED_TEXT_INSERTION_COMMAND"), $i = D("PASTE_COMMAND"), $r = D("REMOVE_TEXT_COMMAND"), rn = D("DELETE_WORD_COMMAND"), sn = D("DELETE_LINE_COMMAND"), Fe = D("FORMAT_TEXT_COMMAND"), Ui = D("UNDO_COMMAND"), Yi = D("REDO_COMMAND"), io = D("KEYDOWN_COMMAND"), so = D("KEY_ARROW_RIGHT_COMMAND"), oo = D("MOVE_TO_END"), lo = D("KEY_ARROW_LEFT_COMMAND"), ao = D("MOVE_TO_START"), co = D("KEY_ARROW_UP_COMMAND"), uo = D("KEY_ARROW_DOWN_COMMAND"), jn = D("KEY_ENTER_COMMAND"), fo = D("KEY_SPACE_COMMAND"), ho = D("KEY_BACKSPACE_COMMAND"), go = D("KEY_ESCAPE_COMMAND"), _o = D("KEY_DELETE_COMMAND"), po = D("KEY_TAB_COMMAND"), Cl = D("INSERT_TAB_COMMAND"), xl = D("INDENT_CONTENT_COMMAND"), Sl = D("OUTDENT_CONTENT_COMMAND"), yo = D("DROP_COMMAND"), Nl = D("FORMAT_ELEMENT_COMMAND"), mo = D("DRAGSTART_COMMAND"), Co = D("DRAGOVER_COMMAND"), xo = D("DRAGEND_COMMAND"), Ji = D("COPY_COMMAND"), Hi = D("CUT_COMMAND"), Ur = D("SELECT_ALL_COMMAND"), Tl = D("CLEAR_EDITOR_COMMAND"), vl = D("CLEAR_HISTORY_COMMAND"), kl = D("CAN_REDO_COMMAND"), El = D("CAN_UNDO_COMMAND"), So = D("FOCUS_COMMAND"), No = D("BLUR_COMMAND"), To = D("KEY_MODIFIER_COMMAND"), pe = Object.freeze({}), qn = 30, Xn = [["keydown", function(n, e) {
|
|
520
520
|
if (_t = n.timeStamp, Gi = n.key, !e.isComposing() && !M(e, io, n) && n.key != null) {
|
|
521
|
-
if (On &&
|
|
521
|
+
if (On && mi(n)) return te(e, (() => {
|
|
522
522
|
Rt(e, An);
|
|
523
523
|
})), On = !1, void (An = "");
|
|
524
524
|
if ((function(t) {
|
|
@@ -553,7 +553,7 @@ const Wi = D("SELECTION_CHANGE_COMMAND"), ml = D("SELECTION_INSERT_CLIPBOARD_NOD
|
|
|
553
553
|
})(n)) pt = !1, M(e, jn, n);
|
|
554
554
|
else if ((function(t) {
|
|
555
555
|
return F(t, "Backspace", { shiftKey: "any" }) || ue && F(t, "h", { ctrlKey: !0 });
|
|
556
|
-
})(n))
|
|
556
|
+
})(n)) mi(n) ? M(e, ho, n) : (n.preventDefault(), M(e, nn, !0));
|
|
557
557
|
else if ((function(t) {
|
|
558
558
|
return t.key === "Escape";
|
|
559
559
|
})(n)) M(e, go, n);
|
|
@@ -563,10 +563,10 @@ const Wi = D("SELECTION_CHANGE_COMMAND"), ml = D("SELECTION_INSERT_CLIPBOARD_NOD
|
|
|
563
563
|
return t.key === "Delete";
|
|
564
564
|
})(n) ? M(e, _o, n) : (n.preventDefault(), M(e, nn, !1));
|
|
565
565
|
else if ((function(t) {
|
|
566
|
-
return F(t, "Backspace",
|
|
566
|
+
return F(t, "Backspace", yi);
|
|
567
567
|
})(n)) n.preventDefault(), M(e, rn, !0);
|
|
568
568
|
else if ((function(t) {
|
|
569
|
-
return F(t, "Delete",
|
|
569
|
+
return F(t, "Delete", yi);
|
|
570
570
|
})(n)) n.preventDefault(), M(e, rn, !1);
|
|
571
571
|
else if ((function(t) {
|
|
572
572
|
return ue && F(t, "Backspace", { metaKey: !0 });
|
|
@@ -594,11 +594,11 @@ const Wi = D("SELECTION_CHANGE_COMMAND"), ml = D("SELECTION_INSERT_CLIPBOARD_NOD
|
|
|
594
594
|
})(n)) n.preventDefault(), M(e, Yi, void 0);
|
|
595
595
|
else {
|
|
596
596
|
const t = e._editorState._selection;
|
|
597
|
-
t === null || w(t) ?
|
|
597
|
+
t === null || w(t) ? Ci(n) && (n.preventDefault(), M(e, Ur, n)) : (function(r) {
|
|
598
598
|
return F(r, "c", me);
|
|
599
599
|
})(n) ? (n.preventDefault(), M(e, Ji, n)) : (function(r) {
|
|
600
600
|
return F(r, "x", me);
|
|
601
|
-
})(n) ? (n.preventDefault(), M(e, Hi, n)) :
|
|
601
|
+
})(n) ? (n.preventDefault(), M(e, Hi, n)) : Ci(n) && (n.preventDefault(), M(e, Ur, n));
|
|
602
602
|
}
|
|
603
603
|
(function(t) {
|
|
604
604
|
return t.ctrlKey || t.shiftKey || t.altKey || t.metaKey;
|
|
@@ -607,7 +607,7 @@ const Wi = D("SELECTION_CHANGE_COMMAND"), ml = D("SELECTION_INSERT_CLIPBOARD_NOD
|
|
|
607
607
|
}], ["pointerdown", function(n, e) {
|
|
608
608
|
const t = n.target, r = n.pointerType;
|
|
609
609
|
Dt(t) && r !== "touch" && r !== "pen" && n.button === 0 && te(e, (() => {
|
|
610
|
-
|
|
610
|
+
gi(t) || (Zn = !0);
|
|
611
611
|
}));
|
|
612
612
|
}], ["compositionstart", function(n, e) {
|
|
613
613
|
te(e, (() => {
|
|
@@ -623,7 +623,7 @@ const Wi = D("SELECTION_CHANGE_COMMAND"), ml = D("SELECTION_INSERT_CLIPBOARD_NOD
|
|
|
623
623
|
})) : (On = !0, An = n.data);
|
|
624
624
|
}], ["input", function(n, e) {
|
|
625
625
|
n.stopPropagation(), te(e, (() => {
|
|
626
|
-
if (ee(n.target) &&
|
|
626
|
+
if (ee(n.target) && gi(n.target)) return;
|
|
627
627
|
const t = I(), r = n.data, i = Qi(n);
|
|
628
628
|
if (r != null && w(t) && qi(t, i, r, n.timeStamp, !1)) {
|
|
629
629
|
dt && (Rt(e, r), dt = !1);
|
|
@@ -634,7 +634,7 @@ const Wi = D("SELECTION_CHANGE_COMMAND"), ml = D("SELECTION_INSERT_CLIPBOARD_NOD
|
|
|
634
634
|
const u = r.length;
|
|
635
635
|
ze && u > 1 && n.inputType === "insertCompositionText" && !e.isComposing() && (t.anchor.offset -= u), Ct || tt || jt || !e.isComposing() || (_t = 0, V(null));
|
|
636
636
|
} else
|
|
637
|
-
|
|
637
|
+
Tr(!1, e, r !== null ? r : void 0), dt && (Rt(e, r || void 0), dt = !1);
|
|
638
638
|
(function() {
|
|
639
639
|
j();
|
|
640
640
|
const s = z();
|
|
@@ -661,7 +661,7 @@ const Wi = D("SELECTION_CHANGE_COMMAND"), ml = D("SELECTION_INSERT_CLIPBOARD_NOD
|
|
|
661
661
|
}
|
|
662
662
|
} else if (n.pointerType === "touch" || n.pointerType === "pen") {
|
|
663
663
|
const s = r.anchorNode;
|
|
664
|
-
(ee(s) ||
|
|
664
|
+
(ee(s) || ke(s)) && ie(pr(i, r, e, n));
|
|
665
665
|
}
|
|
666
666
|
}
|
|
667
667
|
M(e, ro, n);
|
|
@@ -691,11 +691,11 @@ Vt && Xn.push(["beforeinput", (n, e) => (function(t, r) {
|
|
|
691
691
|
} else {
|
|
692
692
|
V(null), t.preventDefault();
|
|
693
693
|
const d = o.anchor.getNode(), _ = d.getTextContent(), p = d.canInsertTextAfter(), C = o.anchor.offset === 0 && o.focus.offset === _.length;
|
|
694
|
-
let y =
|
|
694
|
+
let y = Lr && g && !C && p;
|
|
695
695
|
if (y && o.isCollapsed() && (y = !K(Vo(o.anchor, !0))), !y) {
|
|
696
696
|
M(r, nn, !0);
|
|
697
697
|
const m = I();
|
|
698
|
-
|
|
698
|
+
Lr && w(m) && m.isCollapsed() && (Ie = m, setTimeout((() => Ie = null)));
|
|
699
699
|
}
|
|
700
700
|
}
|
|
701
701
|
return;
|
|
@@ -704,7 +704,7 @@ Vt && Xn.push(["beforeinput", (n, e) => (function(t, r) {
|
|
|
704
704
|
var l;
|
|
705
705
|
if (!w(o)) return;
|
|
706
706
|
const a = t.data;
|
|
707
|
-
qe !== null &&
|
|
707
|
+
qe !== null && Tr(!1, r, qe), o.dirty && qe === null || !o.isCollapsed() || ne(o.anchor.getNode()) || s === null || o.applyDOMRange(s), qe = null;
|
|
708
708
|
const c = o.anchor, u = o.focus, h = c.getNode(), f = u.getNode();
|
|
709
709
|
if (i !== "insertText" && i !== "insertTranspose") switch (t.preventDefault(), i) {
|
|
710
710
|
case "insertFromYank":
|
|
@@ -719,7 +719,7 @@ Vt && Xn.push(["beforeinput", (n, e) => (function(t, r) {
|
|
|
719
719
|
V(null), M(r, Ut, !1);
|
|
720
720
|
break;
|
|
721
721
|
case "insertParagraph":
|
|
722
|
-
V(null), pt && !tt ? (pt = !1, M(r, Ut, !1)) : M(r,
|
|
722
|
+
V(null), pt && !tt ? (pt = !1, M(r, Ut, !1)) : M(r, Wr, void 0);
|
|
723
723
|
break;
|
|
724
724
|
case "insertFromPaste":
|
|
725
725
|
case "insertFromPasteAsQuotation":
|
|
@@ -728,11 +728,11 @@ Vt && Xn.push(["beforeinput", (n, e) => (function(t, r) {
|
|
|
728
728
|
case "deleteByComposition":
|
|
729
729
|
(function(g, d) {
|
|
730
730
|
return g !== d || N(g) || N(d) || !Re(g) || !Re(d);
|
|
731
|
-
})(h, f) && M(r,
|
|
731
|
+
})(h, f) && M(r, $r, t);
|
|
732
732
|
break;
|
|
733
733
|
case "deleteByDrag":
|
|
734
734
|
case "deleteByCut":
|
|
735
|
-
M(r,
|
|
735
|
+
M(r, $r, t);
|
|
736
736
|
break;
|
|
737
737
|
case "deleteContent":
|
|
738
738
|
M(r, nn, !1);
|
|
@@ -773,7 +773,7 @@ Vt && Xn.push(["beforeinput", (n, e) => (function(t, r) {
|
|
|
773
773
|
else {
|
|
774
774
|
if (a === `
|
|
775
775
|
`) t.preventDefault(), M(r, Ut, !1);
|
|
776
|
-
else if (a === Ne) t.preventDefault(), M(r,
|
|
776
|
+
else if (a === Ne) t.preventDefault(), M(r, Wr, void 0);
|
|
777
777
|
else if (a == null && t.dataTransfer) {
|
|
778
778
|
const g = t.dataTransfer.getData("text/plain");
|
|
779
779
|
t.preventDefault(), o.insertRawText(g);
|
|
@@ -787,7 +787,7 @@ const on = /* @__PURE__ */ new WeakMap();
|
|
|
787
787
|
let Qn = !1, Zn = !1, pt = !1, dt = !1, On = !1, An = "", Ie = null, ji = [0, "", 0, "root", 0];
|
|
788
788
|
function qi(n, e, t, r, i) {
|
|
789
789
|
const s = n.anchor, o = n.focus, l = s.getNode(), a = z(), c = Te(se(a)), u = c !== null ? c.anchorNode : null, h = s.key, f = a.getElementByKey(h), g = t.length;
|
|
790
|
-
return h !== o.key || !O(l) || (!i && (!Vt || Vi < r + 50) || l.isDirty() && g < 2 || xs(t)) && s.offset !== o.offset && !l.isComposing() ||
|
|
790
|
+
return h !== o.key || !O(l) || (!i && (!Vt || Vi < r + 50) || l.isDirty() && g < 2 || xs(t)) && s.offset !== o.offset && !l.isComposing() || be(l) || l.isDirty() && g > 1 || (i || !Vt) && f !== null && !l.isComposing() && u !== rt(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, _) {
|
|
791
791
|
if (_.isSegmented()) return !0;
|
|
792
792
|
if (!d.isCollapsed()) return !1;
|
|
793
793
|
const p = d.anchor.offset, C = _.getParentOrThrow(), y = Re(_);
|
|
@@ -797,12 +797,12 @@ function qi(n, e, t, r, i) {
|
|
|
797
797
|
})(_) : p === _.getTextContentSize() && (!_.canInsertTextAfter() || !C.canInsertTextAfter() && !_.isComposing() || y);
|
|
798
798
|
})(n, l);
|
|
799
799
|
}
|
|
800
|
-
function
|
|
801
|
-
return
|
|
800
|
+
function Yr(n, e) {
|
|
801
|
+
return ke(n) && n.nodeValue !== null && e !== 0 && e !== n.nodeValue.length;
|
|
802
802
|
}
|
|
803
|
-
function
|
|
803
|
+
function Jr(n, e, t) {
|
|
804
804
|
const { anchorNode: r, anchorOffset: i, focusNode: s, focusOffset: o } = n;
|
|
805
|
-
Qn && (Qn = !1,
|
|
805
|
+
Qn && (Qn = !1, Yr(r, i) && Yr(s, o) && !Ie) || te(e, (() => {
|
|
806
806
|
if (!t) return void ie(null);
|
|
807
807
|
if (!mn(e, r, s)) return;
|
|
808
808
|
let l = I();
|
|
@@ -854,7 +854,7 @@ function Rt(n, e) {
|
|
|
854
854
|
if (V(null), t !== null && e != null) {
|
|
855
855
|
if (e === "") {
|
|
856
856
|
const r = J(t), i = rt(n.getElementByKey(t));
|
|
857
|
-
return void (i !== null && i.nodeValue !== null && O(r) &&
|
|
857
|
+
return void (i !== null && i.nodeValue !== null && O(r) && vr(r, i.nodeValue, null, null, !0));
|
|
858
858
|
}
|
|
859
859
|
if (e[e.length - 1] === `
|
|
860
860
|
`) {
|
|
@@ -865,7 +865,7 @@ function Rt(n, e) {
|
|
|
865
865
|
}
|
|
866
866
|
}
|
|
867
867
|
}
|
|
868
|
-
|
|
868
|
+
Tr(!0, n, e);
|
|
869
869
|
}
|
|
870
870
|
function Zi(n) {
|
|
871
871
|
let e = n.__lexicalEventHandles;
|
|
@@ -879,15 +879,15 @@ function es(n) {
|
|
|
879
879
|
if (t === null) return;
|
|
880
880
|
Zn && (Zn = !1, te(t, (() => {
|
|
881
881
|
const a = at(), c = e.anchorNode;
|
|
882
|
-
(ee(c) ||
|
|
882
|
+
(ee(c) || ke(c)) && ie(pr(a, e, t, n));
|
|
883
883
|
})));
|
|
884
|
-
const r =
|
|
885
|
-
l !== t &&
|
|
884
|
+
const r = Nr(t), i = r[r.length - 1], s = i._key, o = Qe.get(s), l = o || i;
|
|
885
|
+
l !== t && Jr(e, l, !1), Jr(e, t, !0), t !== i ? Qe.set(s, t) : o && Qe.delete(s);
|
|
886
886
|
}
|
|
887
|
-
function
|
|
887
|
+
function Hr(n) {
|
|
888
888
|
n._lexicalHandled = !0;
|
|
889
889
|
}
|
|
890
|
-
function
|
|
890
|
+
function Gr(n) {
|
|
891
891
|
return n._lexicalHandled === !0;
|
|
892
892
|
}
|
|
893
893
|
function vo(n) {
|
|
@@ -896,9 +896,9 @@ function vo(n) {
|
|
|
896
896
|
const r = t - 1;
|
|
897
897
|
r >= 0 || v(164), on.set(e, r), r === 0 && e.removeEventListener("selectionchange", es);
|
|
898
898
|
const i = Cn(n);
|
|
899
|
-
|
|
899
|
+
xr(i) ? ((function(o) {
|
|
900
900
|
if (o._parentEditor !== null) {
|
|
901
|
-
const l =
|
|
901
|
+
const l = Nr(o), a = l[l.length - 1]._key;
|
|
902
902
|
Qe.get(a) === o && Qe.delete(a);
|
|
903
903
|
} else Qe.delete(o._key);
|
|
904
904
|
})(i), n.__lexicalEditor = null) : i && v(198);
|
|
@@ -920,7 +920,7 @@ function er(n, e, t) {
|
|
|
920
920
|
if (w(s) && e) {
|
|
921
921
|
const l = s.anchor, a = s.focus;
|
|
922
922
|
l.key === r && (an(l, n, i, n.getPreviousSibling(), n.getNextSibling()), o = !0), a.key === r && (an(a, n, i, n.getPreviousSibling(), n.getNextSibling()), o = !0);
|
|
923
|
-
} else
|
|
923
|
+
} else _r(s) && e && n.isSelected() && n.selectPrevious();
|
|
924
924
|
if (w(s) && e && !o) {
|
|
925
925
|
const l = n.getIndexWithinParent();
|
|
926
926
|
Ke(n), ln(s, i, l, -1);
|
|
@@ -1090,7 +1090,7 @@ class hn {
|
|
|
1090
1090
|
}
|
|
1091
1091
|
getWritable() {
|
|
1092
1092
|
j();
|
|
1093
|
-
const e =
|
|
1093
|
+
const e = ve(), t = z(), r = e._nodeMap, i = this.__key, s = this.getLatest(), o = t._cloneNotNeeded, l = I();
|
|
1094
1094
|
if (l !== null && l.setCachedNodes(null), o.has(i)) return un(s), s;
|
|
1095
1095
|
const a = rl(s);
|
|
1096
1096
|
return o.add(i), un(a), r.set(i, a), a;
|
|
@@ -1141,9 +1141,9 @@ class hn {
|
|
|
1141
1141
|
}))), w(r)) {
|
|
1142
1142
|
ie(r);
|
|
1143
1143
|
const _ = r.anchor, p = r.focus;
|
|
1144
|
-
_.key === s &&
|
|
1144
|
+
_.key === s && Xr(_, l), p.key === s && Xr(p, l);
|
|
1145
1145
|
}
|
|
1146
|
-
return
|
|
1146
|
+
return Oe() === s && V(o), l;
|
|
1147
1147
|
}
|
|
1148
1148
|
insertAfter(e, t = !0) {
|
|
1149
1149
|
j(), Rn(this, e);
|
|
@@ -1178,7 +1178,7 @@ class hn {
|
|
|
1178
1178
|
return !1;
|
|
1179
1179
|
}
|
|
1180
1180
|
createParentElementNode() {
|
|
1181
|
-
return
|
|
1181
|
+
return Ae();
|
|
1182
1182
|
}
|
|
1183
1183
|
selectStart() {
|
|
1184
1184
|
return this.selectPrevious();
|
|
@@ -1241,7 +1241,7 @@ class Et extends hn {
|
|
|
1241
1241
|
static importDOM() {
|
|
1242
1242
|
return { br: (e) => (function(t) {
|
|
1243
1243
|
const r = t.parentElement;
|
|
1244
|
-
if (r !== null &&
|
|
1244
|
+
if (r !== null && Si(r)) {
|
|
1245
1245
|
const i = r.firstChild;
|
|
1246
1246
|
if (i === t || i.nextSibling === t && Kt(i)) {
|
|
1247
1247
|
const s = r.lastChild;
|
|
@@ -1251,7 +1251,7 @@ class Et extends hn {
|
|
|
1251
1251
|
return !1;
|
|
1252
1252
|
})(e) || (function(t) {
|
|
1253
1253
|
const r = t.parentElement;
|
|
1254
|
-
if (r !== null &&
|
|
1254
|
+
if (r !== null && Si(r)) {
|
|
1255
1255
|
const i = r.firstChild;
|
|
1256
1256
|
if (i === t || i.nextSibling === t && Kt(i)) return !1;
|
|
1257
1257
|
const s = r.lastChild;
|
|
@@ -1274,10 +1274,10 @@ function Ze(n) {
|
|
|
1274
1274
|
return n instanceof Et;
|
|
1275
1275
|
}
|
|
1276
1276
|
function Kt(n) {
|
|
1277
|
-
return
|
|
1277
|
+
return ke(n) && /^( |\t|\r?\n)+$/.test(n.textContent || "");
|
|
1278
1278
|
}
|
|
1279
1279
|
function wn(n, e) {
|
|
1280
|
-
return 16 & e ? "code" : e &
|
|
1280
|
+
return 16 & e ? "code" : e & ir ? "mark" : 32 & e ? "sub" : 64 & e ? "sup" : null;
|
|
1281
1281
|
}
|
|
1282
1282
|
function Dn(n, e) {
|
|
1283
1283
|
return 1 & e ? "strong" : 2 & e ? "em" : "span";
|
|
@@ -1317,7 +1317,7 @@ function ns(n, e, t) {
|
|
|
1317
1317
|
} else r.nodeValue = s;
|
|
1318
1318
|
}
|
|
1319
1319
|
}
|
|
1320
|
-
function
|
|
1320
|
+
function Vr(n, e, t, r, i, s) {
|
|
1321
1321
|
ns(i, n, e);
|
|
1322
1322
|
const o = s.theme.text;
|
|
1323
1323
|
o !== void 0 && ts(0, 0, r, n, o);
|
|
@@ -1356,7 +1356,7 @@ class lt extends hn {
|
|
|
1356
1356
|
return this.getLatest().__mode === 1;
|
|
1357
1357
|
}
|
|
1358
1358
|
isComposing() {
|
|
1359
|
-
return this.__key ===
|
|
1359
|
+
return this.__key === Oe();
|
|
1360
1360
|
}
|
|
1361
1361
|
isSegmented() {
|
|
1362
1362
|
return this.getLatest().__mode === 2;
|
|
@@ -1389,7 +1389,7 @@ class lt extends hn {
|
|
|
1389
1389
|
createDOM(e, t) {
|
|
1390
1390
|
const r = this.__format, i = wn(0, r), s = Dn(0, r), o = i === null ? s : i, l = document.createElement(o);
|
|
1391
1391
|
let a = l;
|
|
1392
|
-
this.hasFormat("code") && l.setAttribute("spellcheck", "false"), i !== null && (a = document.createElement(s), l.appendChild(a)),
|
|
1392
|
+
this.hasFormat("code") && l.setAttribute("spellcheck", "false"), i !== null && (a = document.createElement(s), l.appendChild(a)), Vr(a, this, 0, r, this.__text, e);
|
|
1393
1393
|
const c = this.__style;
|
|
1394
1394
|
return c !== "" && (l.style.cssText = c), l;
|
|
1395
1395
|
}
|
|
@@ -1400,7 +1400,7 @@ class lt extends hn {
|
|
|
1400
1400
|
const _ = t.firstChild;
|
|
1401
1401
|
_ == null && v(48);
|
|
1402
1402
|
const p = document.createElement(u);
|
|
1403
|
-
return
|
|
1403
|
+
return Vr(p, this, 0, o, i, r), t.replaceChild(p, _), !1;
|
|
1404
1404
|
}
|
|
1405
1405
|
let h = t;
|
|
1406
1406
|
a !== null && l !== null && (h = t.firstChild, h == null && v(49)), ns(i, h, this);
|
|
@@ -1472,7 +1472,7 @@ class lt extends hn {
|
|
|
1472
1472
|
} else r = 0, i = 0;
|
|
1473
1473
|
if (!w(s)) return os(l, r, l, i, "text", "text");
|
|
1474
1474
|
{
|
|
1475
|
-
const a =
|
|
1475
|
+
const a = Oe();
|
|
1476
1476
|
a !== s.anchor.key && a !== s.focus.key || V(l), s.setTextNodeRange(this, r, this, i);
|
|
1477
1477
|
}
|
|
1478
1478
|
return s;
|
|
@@ -1506,7 +1506,7 @@ class lt extends hn {
|
|
|
1506
1506
|
j();
|
|
1507
1507
|
const t = this.getLatest(), r = t.getTextContent();
|
|
1508
1508
|
if (r === "") return [];
|
|
1509
|
-
const i = t.__key, s =
|
|
1509
|
+
const i = t.__key, s = Oe(), o = r.length;
|
|
1510
1510
|
e.sort(((T, S) => T - S)), e.push(o);
|
|
1511
1511
|
const l = [], a = e.length;
|
|
1512
1512
|
for (let T = 0, S = 0; T < o && S <= a; S++) {
|
|
@@ -1557,11 +1557,11 @@ class lt extends hn {
|
|
|
1557
1557
|
const t = e === this.getPreviousSibling();
|
|
1558
1558
|
t || e === this.getNextSibling() || v(50);
|
|
1559
1559
|
const r = this.__key, i = e.__key, s = this.__text, o = s.length;
|
|
1560
|
-
|
|
1560
|
+
Oe() === i && V(r);
|
|
1561
1561
|
const l = I();
|
|
1562
1562
|
if (w(l)) {
|
|
1563
1563
|
const h = l.anchor, f = l.focus;
|
|
1564
|
-
h !== null && h.key === i &&
|
|
1564
|
+
h !== null && h.key === i && si(h, t, r, e, o), f !== null && f.key === i && si(f, t, r, e, o);
|
|
1565
1565
|
}
|
|
1566
1566
|
const a = e.__text, c = t ? a + s : s + a;
|
|
1567
1567
|
this.setTextContent(c);
|
|
@@ -1573,13 +1573,13 @@ class lt extends hn {
|
|
|
1573
1573
|
}
|
|
1574
1574
|
}
|
|
1575
1575
|
function Eo(n) {
|
|
1576
|
-
return { forChild:
|
|
1576
|
+
return { forChild: hr(n.style), node: null };
|
|
1577
1577
|
}
|
|
1578
1578
|
function bo(n) {
|
|
1579
1579
|
const e = n, t = e.style.fontWeight === "normal";
|
|
1580
|
-
return { forChild:
|
|
1580
|
+
return { forChild: hr(e.style, t ? void 0 : "bold"), node: null };
|
|
1581
1581
|
}
|
|
1582
|
-
const
|
|
1582
|
+
const jr = /* @__PURE__ */ new WeakMap();
|
|
1583
1583
|
function Mo(n) {
|
|
1584
1584
|
if (!ee(n)) return !1;
|
|
1585
1585
|
if (n.nodeName === "PRE") return !0;
|
|
@@ -1593,9 +1593,9 @@ function Oo(n) {
|
|
|
1593
1593
|
if ((function(r) {
|
|
1594
1594
|
let i, s = r.parentNode;
|
|
1595
1595
|
const o = [r];
|
|
1596
|
-
for (; s !== null && (i =
|
|
1596
|
+
for (; s !== null && (i = jr.get(s)) === void 0 && !Mo(s); ) o.push(s), s = s.parentNode;
|
|
1597
1597
|
const l = i === void 0 ? s : i;
|
|
1598
|
-
for (let a = 0; a < o.length; a++)
|
|
1598
|
+
for (let a = 0; a < o.length; a++) jr.set(o[a], l);
|
|
1599
1599
|
return l;
|
|
1600
1600
|
})(e) !== null) {
|
|
1601
1601
|
const r = t.split(/(\r?\n|\t)/), i = [], s = r.length;
|
|
@@ -1603,14 +1603,14 @@ function Oo(n) {
|
|
|
1603
1603
|
const l = r[o];
|
|
1604
1604
|
l === `
|
|
1605
1605
|
` || l === `\r
|
|
1606
|
-
` ? i.push(Tt()) : l === " " ? i.push(
|
|
1606
|
+
` ? i.push(Tt()) : l === " " ? i.push(gr()) : l !== "" && i.push(G(l));
|
|
1607
1607
|
}
|
|
1608
1608
|
return { node: i };
|
|
1609
1609
|
}
|
|
1610
1610
|
if (t = t.replace(/\r/g, "").replace(/[ \t\n]+/g, " "), t === "") return { node: null };
|
|
1611
1611
|
if (t[0] === " ") {
|
|
1612
1612
|
let r = e, i = !0;
|
|
1613
|
-
for (; r !== null && (r =
|
|
1613
|
+
for (; r !== null && (r = qr(r, !1)) !== null; ) {
|
|
1614
1614
|
const s = r.textContent || "";
|
|
1615
1615
|
if (s.length > 0) {
|
|
1616
1616
|
/[ \t\n]$/.test(s) && (t = t.slice(1)), i = !1;
|
|
@@ -1621,7 +1621,7 @@ function Oo(n) {
|
|
|
1621
1621
|
}
|
|
1622
1622
|
if (t[t.length - 1] === " ") {
|
|
1623
1623
|
let r = e, i = !0;
|
|
1624
|
-
for (; r !== null && (r =
|
|
1624
|
+
for (; r !== null && (r = qr(r, !0)) !== null; )
|
|
1625
1625
|
if ((r.textContent || "").replace(/^( |\t|\r?\n)+/, "").length > 0) {
|
|
1626
1626
|
i = !1;
|
|
1627
1627
|
break;
|
|
@@ -1630,7 +1630,7 @@ function Oo(n) {
|
|
|
1630
1630
|
}
|
|
1631
1631
|
return t === "" ? { node: null } : { node: G(t) };
|
|
1632
1632
|
}
|
|
1633
|
-
function
|
|
1633
|
+
function qr(n, e) {
|
|
1634
1634
|
let t = n;
|
|
1635
1635
|
for (; ; ) {
|
|
1636
1636
|
let r;
|
|
@@ -1645,14 +1645,14 @@ function jr(n, e) {
|
|
|
1645
1645
|
}
|
|
1646
1646
|
let i = t;
|
|
1647
1647
|
for (; (i = e ? t.firstChild : t.lastChild) !== null; ) t = i;
|
|
1648
|
-
if (
|
|
1648
|
+
if (ke(t)) return t;
|
|
1649
1649
|
if (t.nodeName === "BR") return null;
|
|
1650
1650
|
}
|
|
1651
1651
|
}
|
|
1652
1652
|
const Ao = { code: "code", em: "italic", i: "italic", mark: "highlight", s: "strikethrough", strong: "bold", sub: "subscript", sup: "superscript", u: "underline" };
|
|
1653
1653
|
function ye(n) {
|
|
1654
1654
|
const e = Ao[n.nodeName.toLowerCase()];
|
|
1655
|
-
return e === void 0 ? { node: null } : { forChild:
|
|
1655
|
+
return e === void 0 ? { node: null } : { forChild: hr(n.style, e), node: null };
|
|
1656
1656
|
}
|
|
1657
1657
|
function G(n = "") {
|
|
1658
1658
|
return Nn(new lt(n));
|
|
@@ -1660,7 +1660,7 @@ function G(n = "") {
|
|
|
1660
1660
|
function O(n) {
|
|
1661
1661
|
return n instanceof lt;
|
|
1662
1662
|
}
|
|
1663
|
-
function
|
|
1663
|
+
function hr(n, e) {
|
|
1664
1664
|
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;
|
|
1665
1665
|
return (c) => (O(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);
|
|
1666
1666
|
}
|
|
@@ -1682,7 +1682,7 @@ class bt extends lt {
|
|
|
1682
1682
|
return r !== void 0 && t.classList.add(...r), t;
|
|
1683
1683
|
}
|
|
1684
1684
|
static importJSON(e) {
|
|
1685
|
-
return
|
|
1685
|
+
return gr().updateFromJSON(e);
|
|
1686
1686
|
}
|
|
1687
1687
|
setTextContent(e) {
|
|
1688
1688
|
return e !== " " && e !== "" && v(126), super.setTextContent(" ");
|
|
@@ -1703,7 +1703,7 @@ class bt extends lt {
|
|
|
1703
1703
|
return !1;
|
|
1704
1704
|
}
|
|
1705
1705
|
}
|
|
1706
|
-
function
|
|
1706
|
+
function gr() {
|
|
1707
1707
|
return Nn(new bt());
|
|
1708
1708
|
}
|
|
1709
1709
|
function rs(n) {
|
|
@@ -1725,7 +1725,7 @@ class wo {
|
|
|
1725
1725
|
}
|
|
1726
1726
|
set(e, t, r, i) {
|
|
1727
1727
|
const s = this._selection, o = this.key;
|
|
1728
|
-
i && this.key === e && this.offset === t && this.type === r || (this.key = e, this.offset = t, this.type = r, Mt() || (
|
|
1728
|
+
i && this.key === e && this.offset === t && this.type === r || (this.key = e, this.offset = t, this.type = r, Mt() || (Oe() === o && V(e), s !== null && (s.setCachedNodes(null), s.dirty = !0)));
|
|
1729
1729
|
}
|
|
1730
1730
|
}
|
|
1731
1731
|
function de(n, e, t) {
|
|
@@ -1747,7 +1747,7 @@ function Pn(n, e) {
|
|
|
1747
1747
|
}
|
|
1748
1748
|
n.set(t, r, i);
|
|
1749
1749
|
}
|
|
1750
|
-
function
|
|
1750
|
+
function Xr(n, e) {
|
|
1751
1751
|
if (N(e)) {
|
|
1752
1752
|
const t = e.getLastDescendant();
|
|
1753
1753
|
N(t) || O(t) ? Pn(n, t) : Pn(n, e);
|
|
@@ -1764,7 +1764,7 @@ class gn {
|
|
|
1764
1764
|
this._cachedNodes = e;
|
|
1765
1765
|
}
|
|
1766
1766
|
is(e) {
|
|
1767
|
-
if (!
|
|
1767
|
+
if (!_r(e)) return !1;
|
|
1768
1768
|
const t = this._nodes, r = e._nodes;
|
|
1769
1769
|
return t.size === r.size && Array.from(t).every(((i) => r.has(i)));
|
|
1770
1770
|
}
|
|
@@ -1868,7 +1868,7 @@ class je {
|
|
|
1868
1868
|
const { origin: u } = c;
|
|
1869
1869
|
N(u) && a.has(u) || i.push(u);
|
|
1870
1870
|
}
|
|
1871
|
-
if (o && i.push(o.caret.origin), st(r.focus) && N(r.focus.origin) && r.focus.getNodeAtCaret() === null) for (let c =
|
|
1871
|
+
if (o && i.push(o.caret.origin), st(r.focus) && N(r.focus.origin) && r.focus.getNodeAtCaret() === null) for (let c = De(r.focus.origin, "previous"); Se(c) && l.has(c.origin) && !c.origin.isEmpty() && c.origin.is(i[i.length - 1]); c = Or(c)) l.delete(c.origin), i.pop();
|
|
1872
1872
|
for (; i.length > 1; ) {
|
|
1873
1873
|
const c = i[i.length - 1];
|
|
1874
1874
|
if (!N(c) || a.has(c) || c.isEmpty() || l.has(c)) break;
|
|
@@ -1888,7 +1888,7 @@ class je {
|
|
|
1888
1888
|
getTextContent() {
|
|
1889
1889
|
const e = this.getNodes();
|
|
1890
1890
|
if (e.length === 0) return "";
|
|
1891
|
-
const t = e[0], r = e[e.length - 1], i = this.anchor, s = this.focus, o = i.isBefore(s), [l, a] =
|
|
1891
|
+
const t = e[0], r = e[e.length - 1], i = this.anchor, s = this.focus, o = i.isBefore(s), [l, a] = Zr(this);
|
|
1892
1892
|
let c = "", u = !0;
|
|
1893
1893
|
for (let h = 0; h < e.length; h++) {
|
|
1894
1894
|
const f = e[h];
|
|
@@ -1927,7 +1927,7 @@ class je {
|
|
|
1927
1927
|
const o = t[s];
|
|
1928
1928
|
o === `
|
|
1929
1929
|
` || o === `\r
|
|
1930
|
-
` ? r.push(Tt()) : o === " " ? r.push(
|
|
1930
|
+
` ? r.push(Tt()) : o === " " ? r.push(gr()) : r.push(G(o));
|
|
1931
1931
|
}
|
|
1932
1932
|
this.insertNodes(r);
|
|
1933
1933
|
}
|
|
@@ -1935,7 +1935,7 @@ class je {
|
|
|
1935
1935
|
const t = this.anchor, r = this.focus, i = this.format, s = this.style;
|
|
1936
1936
|
let o = t, l = r;
|
|
1937
1937
|
!this.isCollapsed() && r.isBefore(t) && (o = r, l = t), o.type === "element" && (function(p, C, y, m) {
|
|
1938
|
-
const k = p.getNode(), E = k.getChildAtIndex(p.offset), x = G(), b = ne(k) ?
|
|
1938
|
+
const k = p.getNode(), E = k.getChildAtIndex(p.offset), x = G(), b = ne(k) ? Ae().append(x) : x;
|
|
1939
1939
|
x.setFormat(y), x.setStyle(m), E === null ? k.append(b) : E.insertBefore(b), p.is(C) && C.set(x.__key, 0, "text"), p.set(x.__key, 0, "text");
|
|
1940
1940
|
})(o, l, i, s), l.type === "element" && kt(l, fe(Ve(l, "next")));
|
|
1941
1941
|
const a = o.offset;
|
|
@@ -1945,12 +1945,12 @@ class je {
|
|
|
1945
1945
|
O(f) || v(26);
|
|
1946
1946
|
const g = f.getTextContent().length, d = f.getParentOrThrow();
|
|
1947
1947
|
let _ = u[h - 1];
|
|
1948
|
-
if (h === 1 && l.type === "element" && (c = g, l.set(o.key, c, "text")), this.isCollapsed() && a === g && (
|
|
1948
|
+
if (h === 1 && l.type === "element" && (c = g, l.set(o.key, c, "text")), this.isCollapsed() && a === g && (be(f) || !f.canInsertTextAfter() || !d.canInsertTextAfter() && f.getNextSibling() === null)) {
|
|
1949
1949
|
let p = f.getNextSibling();
|
|
1950
|
-
if (O(p) && p.canInsertTextBefore() && !
|
|
1951
|
-
} else if (this.isCollapsed() && a === 0 && (
|
|
1950
|
+
if (O(p) && p.canInsertTextBefore() && !be(p) || (p = G(), 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);
|
|
1951
|
+
} else if (this.isCollapsed() && a === 0 && (be(f) || !f.canInsertTextBefore() || !d.canInsertTextBefore() && f.getPreviousSibling() === null)) {
|
|
1952
1952
|
let p = f.getPreviousSibling();
|
|
1953
|
-
if (O(p) && !
|
|
1953
|
+
if (O(p) && !be(p) || (p = G(), p.setFormat(i), d.canInsertTextBefore() ? f.insertBefore(p) : d.insertBefore(p)), p.select(), f = p, e !== "") return void this.insertText(e);
|
|
1954
1954
|
} else if (f.isSegmented() && a !== g) {
|
|
1955
1955
|
const p = G(f.getTextContent());
|
|
1956
1956
|
p.setFormat(i), f.replace(p), f = p;
|
|
@@ -2052,16 +2052,16 @@ class je {
|
|
|
2052
2052
|
const y = h.type === "text" ? h.offset : C.getTextContentSize();
|
|
2053
2053
|
if (g.is(C)) {
|
|
2054
2054
|
if (d === y) return;
|
|
2055
|
-
if (
|
|
2055
|
+
if (be(g) || d === 0 && y === g.getTextContentSize()) g.setFormat(_);
|
|
2056
2056
|
else {
|
|
2057
2057
|
const k = g.splitText(d, y), E = d === 0 ? k[0] : k[1];
|
|
2058
2058
|
E.setFormat(_), u.type === "text" && u.set(E.__key, 0, "text"), h.type === "text" && h.set(E.__key, y - d, "text");
|
|
2059
2059
|
}
|
|
2060
2060
|
return void (this.format = _);
|
|
2061
2061
|
}
|
|
2062
|
-
d === 0 ||
|
|
2062
|
+
d === 0 || be(g) || ([, g] = g.splitText(d), d = 0), g.setFormat(_);
|
|
2063
2063
|
const m = C.getFormatFlags(e, _);
|
|
2064
|
-
y > 0 && (y === C.getTextContentSize() ||
|
|
2064
|
+
y > 0 && (y === C.getTextContentSize() || be(C) || ([C] = C.splitText(y)), C.setFormat(m));
|
|
2065
2065
|
for (let k = f + 1; k < p; k++) {
|
|
2066
2066
|
const E = i[k], x = E.getFormatFlags(e, m);
|
|
2067
2067
|
E.setFormat(x);
|
|
@@ -2075,7 +2075,7 @@ class je {
|
|
|
2075
2075
|
const d = I();
|
|
2076
2076
|
return w(d) || v(134), d.insertNodes(e);
|
|
2077
2077
|
}
|
|
2078
|
-
const t = (this.isBackward() ? this.focus : this.anchor).getNode(), r = Bn(t,
|
|
2078
|
+
const t = (this.isBackward() ? this.focus : this.anchor).getNode(), r = Bn(t, Me), i = e[e.length - 1];
|
|
2079
2079
|
if (N(r) && "__language" in r) {
|
|
2080
2080
|
if ("__language" in e[0]) this.insertText(e[0].getTextContent());
|
|
2081
2081
|
else {
|
|
@@ -2090,7 +2090,7 @@ class je {
|
|
|
2090
2090
|
return r.splice(d, 0, e), void i.selectEnd();
|
|
2091
2091
|
}
|
|
2092
2092
|
const s = (function(d) {
|
|
2093
|
-
const _ =
|
|
2093
|
+
const _ = Ae();
|
|
2094
2094
|
let p = null;
|
|
2095
2095
|
for (let C = 0; C < d.length; C++) {
|
|
2096
2096
|
const y = d[C], m = Ze(y);
|
|
@@ -2103,7 +2103,7 @@ class je {
|
|
|
2103
2103
|
})(e), o = s.getLastDescendant(), l = s.getChildren(), a = !N(r) || !r.isEmpty() ? this.insertParagraph() : null, c = l[l.length - 1];
|
|
2104
2104
|
let u = l[0];
|
|
2105
2105
|
var h;
|
|
2106
|
-
N(h = u) &&
|
|
2106
|
+
N(h = u) && Me(h) && !h.isEmpty() && N(r) && (!r.isEmpty() || r.canMergeWhenEmpty()) && (N(r) || v(211, t.constructor.name, t.getType()), r.append(...u.getChildren()), u = l[1]), u && (r === null && v(212, t.constructor.name, t.getType()), (function(d, _, p) {
|
|
2107
2107
|
const C = _.getParentOrThrow().getLastChild();
|
|
2108
2108
|
let y = _;
|
|
2109
2109
|
const m = [_];
|
|
@@ -2111,17 +2111,17 @@ class je {
|
|
|
2111
2111
|
let k = d;
|
|
2112
2112
|
for (const E of m) k = k.insertAfter(E);
|
|
2113
2113
|
})(r, u));
|
|
2114
|
-
const f = Bn(o,
|
|
2115
|
-
a && N(f) && (a.canMergeWhenEmpty() ||
|
|
2114
|
+
const f = Bn(o, Me);
|
|
2115
|
+
a && N(f) && (a.canMergeWhenEmpty() || Me(c)) && (f.append(...a.getChildren()), a.remove()), N(r) && r.isEmpty() && r.remove(), o.selectEnd();
|
|
2116
2116
|
const g = N(r) ? r.getLastChild() : null;
|
|
2117
2117
|
Ze(g) && f !== r && g.remove();
|
|
2118
2118
|
}
|
|
2119
2119
|
insertParagraph() {
|
|
2120
2120
|
if (this.anchor.key === "root") {
|
|
2121
|
-
const o =
|
|
2121
|
+
const o = Ae();
|
|
2122
2122
|
return re().splice(this.anchor.offset, 0, [o]), o.select(), o;
|
|
2123
2123
|
}
|
|
2124
|
-
const e = Ln(this), t = Bn(this.anchor.getNode(),
|
|
2124
|
+
const e = Ln(this), t = Bn(this.anchor.getNode(), Me);
|
|
2125
2125
|
N(t) || v(213);
|
|
2126
2126
|
const r = t.getChildAtIndex(e), i = r ? [r, ...r.getNextSiblings()] : [], s = t.insertNewAfter(this, !1);
|
|
2127
2127
|
return s ? (s.append(...i), s.selectStart(), s) : null;
|
|
@@ -2136,7 +2136,7 @@ class je {
|
|
|
2136
2136
|
extract() {
|
|
2137
2137
|
const e = this.getNodes(), t = e.length, r = t - 1, i = this.anchor, s = this.focus;
|
|
2138
2138
|
let o = e[0], l = e[r];
|
|
2139
|
-
const [a, c] =
|
|
2139
|
+
const [a, c] = Zr(this);
|
|
2140
2140
|
if (t === 0) return [];
|
|
2141
2141
|
if (t === 1) {
|
|
2142
2142
|
if (O(o) && !this.isCollapsed()) {
|
|
@@ -2157,7 +2157,7 @@ class je {
|
|
|
2157
2157
|
return e;
|
|
2158
2158
|
}
|
|
2159
2159
|
modify(e, t, r) {
|
|
2160
|
-
if (
|
|
2160
|
+
if (oi(this, e, t, r)) return;
|
|
2161
2161
|
const i = e === "move", s = z(), o = Te(se(s));
|
|
2162
2162
|
if (!o) return;
|
|
2163
2163
|
const l = s._blockCursorElement, a = s._rootElement, c = this.focus.getNode();
|
|
@@ -2189,7 +2189,7 @@ class je {
|
|
|
2189
2189
|
})(this);
|
|
2190
2190
|
}
|
|
2191
2191
|
}
|
|
2192
|
-
r === "lineboundary" &&
|
|
2192
|
+
r === "lineboundary" && oi(this, e, t, r, "decorators");
|
|
2193
2193
|
}
|
|
2194
2194
|
forwardDeletion(e, t, r) {
|
|
2195
2195
|
if (!r && (e.type === "element" && N(t) && e.offset === t.getChildrenSize() || e.type === "text" && e.offset === t.getTextContentSize())) {
|
|
@@ -2241,20 +2241,20 @@ class je {
|
|
|
2241
2241
|
}
|
|
2242
2242
|
if (l.type === "merge-block") {
|
|
2243
2243
|
const { caret: a, block: c } = l;
|
|
2244
|
-
return Gt(this, Ge(!a.origin.isEmpty() && c.isEmpty() ?
|
|
2244
|
+
return Gt(this, Ge(!a.origin.isEmpty() && c.isEmpty() ? wr(q(c, a.direction)) : s.anchor, a)), this.removeText();
|
|
2245
2245
|
}
|
|
2246
2246
|
}
|
|
2247
2247
|
const o = this.focus;
|
|
2248
2248
|
if (this.modify("extend", e, "character"), this.isCollapsed()) {
|
|
2249
|
-
if (e && r.offset === 0 &&
|
|
2249
|
+
if (e && r.offset === 0 && ei(this, r.getNode())) return;
|
|
2250
2250
|
} else {
|
|
2251
2251
|
const l = o.type === "text" ? o.getNode() : null;
|
|
2252
2252
|
if (i = r.type === "text" ? r.getNode() : null, l !== null && l.isSegmented()) {
|
|
2253
2253
|
const a = o.offset, c = l.getTextContentSize();
|
|
2254
|
-
if (l.is(i) || e && a !== c || !e && a !== 0) return void
|
|
2254
|
+
if (l.is(i) || e && a !== c || !e && a !== 0) return void ti(l, e, a);
|
|
2255
2255
|
} else if (i !== null && i.isSegmented()) {
|
|
2256
2256
|
const a = r.offset, c = i.getTextContentSize();
|
|
2257
|
-
if (i.is(l) || e && a !== 0 || !e && a !== c) return void
|
|
2257
|
+
if (i.is(l) || e && a !== 0 || !e && a !== c) return void ti(i, e, a);
|
|
2258
2258
|
}
|
|
2259
2259
|
(function(a, c) {
|
|
2260
2260
|
const u = a.anchor, h = a.focus, f = u.getNode(), g = h.getNode();
|
|
@@ -2269,7 +2269,7 @@ class je {
|
|
|
2269
2269
|
}
|
|
2270
2270
|
if (this.removeText(), e && !t && this.isCollapsed() && this.anchor.type === "element" && this.anchor.offset === 0) {
|
|
2271
2271
|
const r = this.anchor.getNode();
|
|
2272
|
-
r.isEmpty() && ne(r.getParent()) && r.getPreviousSibling() === null &&
|
|
2272
|
+
r.isEmpty() && ne(r.getParent()) && r.getPreviousSibling() === null && ei(this, r);
|
|
2273
2273
|
}
|
|
2274
2274
|
}
|
|
2275
2275
|
deleteLine(e) {
|
|
@@ -2290,22 +2290,22 @@ class je {
|
|
|
2290
2290
|
return [this.anchor, this.focus];
|
|
2291
2291
|
}
|
|
2292
2292
|
}
|
|
2293
|
-
function
|
|
2293
|
+
function _r(n) {
|
|
2294
2294
|
return n instanceof gn;
|
|
2295
2295
|
}
|
|
2296
|
-
function
|
|
2296
|
+
function Qr(n) {
|
|
2297
2297
|
const e = n.offset;
|
|
2298
2298
|
if (n.type === "text") return e;
|
|
2299
2299
|
const t = n.getNode();
|
|
2300
2300
|
return e === t.getChildrenSize() ? t.getTextContent().length : 0;
|
|
2301
2301
|
}
|
|
2302
|
-
function
|
|
2302
|
+
function Zr(n) {
|
|
2303
2303
|
const e = n.getStartEndPoints();
|
|
2304
2304
|
if (e === null) return [0, 0];
|
|
2305
2305
|
const [t, r] = e;
|
|
2306
|
-
return t.type === "element" && r.type === "element" && t.key === r.key && t.offset === r.offset ? [0, 0] : [
|
|
2306
|
+
return t.type === "element" && r.type === "element" && t.key === r.key && t.offset === r.offset ? [0, 0] : [Qr(t), Qr(r)];
|
|
2307
2307
|
}
|
|
2308
|
-
function
|
|
2308
|
+
function ei(n, e) {
|
|
2309
2309
|
for (let t = e; t; t = t.getParent()) {
|
|
2310
2310
|
if (N(t)) {
|
|
2311
2311
|
if (t.collapseAtStart(n)) return !0;
|
|
@@ -2323,7 +2323,7 @@ const Do = (() => {
|
|
|
2323
2323
|
}
|
|
2324
2324
|
return () => !1;
|
|
2325
2325
|
})();
|
|
2326
|
-
function
|
|
2326
|
+
function ti(n, e, t) {
|
|
2327
2327
|
const r = n, i = r.getTextContent().split(/(?=\s)/g), s = i.length;
|
|
2328
2328
|
let o = 0, l = 0;
|
|
2329
2329
|
for (let c = 0; c < s; c++) {
|
|
@@ -2336,7 +2336,7 @@ function ei(n, e, t) {
|
|
|
2336
2336
|
const a = i.join("").trim();
|
|
2337
2337
|
a === "" ? r.remove() : (r.setTextContent(a), r.select(l, l));
|
|
2338
2338
|
}
|
|
2339
|
-
function
|
|
2339
|
+
function ni(n, e, t, r) {
|
|
2340
2340
|
let i, s = e;
|
|
2341
2341
|
if (ee(n)) {
|
|
2342
2342
|
let o = !1;
|
|
@@ -2348,7 +2348,7 @@ function ti(n, e, t, r) {
|
|
|
2348
2348
|
const f = c.parentNode;
|
|
2349
2349
|
n === f && e > Array.prototype.indexOf.call(f.children, c) && s--;
|
|
2350
2350
|
}
|
|
2351
|
-
if (i = Xe(u), O(i)) s =
|
|
2351
|
+
if (i = Xe(u), O(i)) s = pi(i, o);
|
|
2352
2352
|
else {
|
|
2353
2353
|
let f = Xe(n);
|
|
2354
2354
|
if (f === null) return null;
|
|
@@ -2363,7 +2363,7 @@ function ti(n, e, t, r) {
|
|
|
2363
2363
|
const p = o ? _.getLastDescendant() : _.getFirstDescendant();
|
|
2364
2364
|
p === null ? f = _ : (_ = p, f = N(_) ? _ : _.getParentOrThrow()), s = 0;
|
|
2365
2365
|
}
|
|
2366
|
-
O(_) ? (i = _, f = null, s =
|
|
2366
|
+
O(_) ? (i = _, f = null, s = pi(_, o)) : _ !== f && o && !h && (N(f) || v(216), s = Math.min(f.getChildrenSize(), s + 1));
|
|
2367
2367
|
} else {
|
|
2368
2368
|
const g = f.getIndexWithinParent();
|
|
2369
2369
|
s = e === 0 && K(f) && Xe(n) === f ? g : g + 1, f = f.getParentOrThrow();
|
|
@@ -2373,7 +2373,7 @@ function ti(n, e, t, r) {
|
|
|
2373
2373
|
} else i = Xe(n);
|
|
2374
2374
|
return O(i) ? de(i.__key, s, "text") : null;
|
|
2375
2375
|
}
|
|
2376
|
-
function
|
|
2376
|
+
function ri(n, e, t) {
|
|
2377
2377
|
const r = n.offset, i = n.getNode();
|
|
2378
2378
|
if (r === 0) {
|
|
2379
2379
|
const s = i.getPreviousSibling(), o = i.getParent();
|
|
@@ -2395,7 +2395,7 @@ function ni(n, e, t) {
|
|
|
2395
2395
|
function is(n, e, t) {
|
|
2396
2396
|
if (n.type === "text" && e.type === "text") {
|
|
2397
2397
|
const r = n.isBefore(e), i = n.is(e);
|
|
2398
|
-
|
|
2398
|
+
ri(n, r, i), ri(e, !r, i), i && e.set(n.key, n.offset, n.type);
|
|
2399
2399
|
const s = z();
|
|
2400
2400
|
if (s.isComposing() && s._compositionKey !== n.key && w(t)) {
|
|
2401
2401
|
const o = t.anchor, l = t.focus;
|
|
@@ -2405,9 +2405,9 @@ function is(n, e, t) {
|
|
|
2405
2405
|
}
|
|
2406
2406
|
function ss(n, e, t, r, i, s) {
|
|
2407
2407
|
if (n === null || t === null || !mn(i, n, t)) return null;
|
|
2408
|
-
const o =
|
|
2408
|
+
const o = ni(n, e, w(s) ? s.anchor : null, i);
|
|
2409
2409
|
if (o === null) return null;
|
|
2410
|
-
const l =
|
|
2410
|
+
const l = ni(t, r, w(s) ? s.focus : null, i);
|
|
2411
2411
|
if (l === null) return null;
|
|
2412
2412
|
if (o.type === "element" && l.type === "element") {
|
|
2413
2413
|
const a = Xe(n), c = Xe(t);
|
|
@@ -2419,7 +2419,7 @@ function bl(n) {
|
|
|
2419
2419
|
return N(n) && !n.isInline();
|
|
2420
2420
|
}
|
|
2421
2421
|
function os(n, e, t, r, i, s) {
|
|
2422
|
-
const o =
|
|
2422
|
+
const o = ve(), l = new je(de(n, e, i), de(t, r, s), 0, "");
|
|
2423
2423
|
return l.dirty = !0, o._selection = l, l;
|
|
2424
2424
|
}
|
|
2425
2425
|
function Po() {
|
|
@@ -2429,7 +2429,7 @@ function Po() {
|
|
|
2429
2429
|
function ls() {
|
|
2430
2430
|
return new gn(/* @__PURE__ */ new Set());
|
|
2431
2431
|
}
|
|
2432
|
-
function
|
|
2432
|
+
function pr(n, e, t, r) {
|
|
2433
2433
|
const i = t._window;
|
|
2434
2434
|
if (i === null) return null;
|
|
2435
2435
|
const s = r || i.event, o = s ? s.type : void 0, l = o === "selectionchange", a = !Wn && (l || o === "beforeinput" || o === "compositionstart" || o === "compositionend" || o === "click" && s && s.detail === 3 || o === "drop" || o === void 0);
|
|
@@ -2443,7 +2443,7 @@ function _r(n, e, t, r) {
|
|
|
2443
2443
|
return new je(d, _, w(n) ? n.format : 0, w(n) ? n.style : "");
|
|
2444
2444
|
}
|
|
2445
2445
|
function I() {
|
|
2446
|
-
return
|
|
2446
|
+
return ve()._selection;
|
|
2447
2447
|
}
|
|
2448
2448
|
function at() {
|
|
2449
2449
|
return z()._editorState._selection;
|
|
@@ -2456,7 +2456,7 @@ function ln(n, e, t, r = 1) {
|
|
|
2456
2456
|
const c = i.offset;
|
|
2457
2457
|
if (t <= c && r > 0 || t < c && r < 0) {
|
|
2458
2458
|
const u = Math.max(0, c + r);
|
|
2459
|
-
i.set(a, u, "element"), s.set(a, u, "element"),
|
|
2459
|
+
i.set(a, u, "element"), s.set(a, u, "element"), ii(n);
|
|
2460
2460
|
}
|
|
2461
2461
|
} else {
|
|
2462
2462
|
const c = n.isBackward(), u = c ? s : i, h = u.getNode(), f = c ? i : s, g = f.getNode();
|
|
@@ -2469,9 +2469,9 @@ function ln(n, e, t, r = 1) {
|
|
|
2469
2469
|
(t <= d && r > 0 || t < d && r < 0) && f.set(a, Math.max(0, d + r), "element");
|
|
2470
2470
|
}
|
|
2471
2471
|
}
|
|
2472
|
-
|
|
2472
|
+
ii(n);
|
|
2473
2473
|
}
|
|
2474
|
-
function
|
|
2474
|
+
function ii(n) {
|
|
2475
2475
|
const e = n.anchor, t = e.offset, r = n.focus, i = r.offset, s = e.getNode(), o = r.getNode();
|
|
2476
2476
|
if (n.isCollapsed()) {
|
|
2477
2477
|
if (!N(s)) return;
|
|
@@ -2501,7 +2501,7 @@ function an(n, e, t, r, i) {
|
|
|
2501
2501
|
let s = null, o = 0, l = null;
|
|
2502
2502
|
r !== null ? (s = r.__key, O(r) ? (o = r.getTextContentSize(), l = "text") : N(r) && (o = r.getChildrenSize(), l = "element")) : i !== null && (s = i.__key, O(i) ? l = "text" : N(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"));
|
|
2503
2503
|
}
|
|
2504
|
-
function
|
|
2504
|
+
function si(n, e, t, r, i) {
|
|
2505
2505
|
n.type === "text" ? n.set(t, n.offset + (e ? 0 : i), "text") : n.offset > r.getIndexWithinParent() && n.set(n.key, n.offset - 1, "element");
|
|
2506
2506
|
}
|
|
2507
2507
|
function as(n, e, t, r, i) {
|
|
@@ -2532,26 +2532,26 @@ function Lo(n, e, t, r, i, s, o) {
|
|
|
2532
2532
|
he.selectNode(B), H = he.getBoundingClientRect();
|
|
2533
2533
|
} else H = B.getBoundingClientRect();
|
|
2534
2534
|
(function(he, ge, _e) {
|
|
2535
|
-
const ut = vs(_e),
|
|
2536
|
-
if (ut === null ||
|
|
2537
|
-
let { top: vn, bottom: kn } = ge, Pt = 0, Lt = 0,
|
|
2538
|
-
for (;
|
|
2539
|
-
const En =
|
|
2535
|
+
const ut = vs(_e), Dr = Er(ut);
|
|
2536
|
+
if (ut === null || Dr === null) return;
|
|
2537
|
+
let { top: vn, bottom: kn } = ge, Pt = 0, Lt = 0, Ee = _e;
|
|
2538
|
+
for (; Ee !== null; ) {
|
|
2539
|
+
const En = Ee === ut.body;
|
|
2540
2540
|
if (En) Pt = 0, Lt = se(he).innerHeight;
|
|
2541
2541
|
else {
|
|
2542
|
-
const It =
|
|
2542
|
+
const It = Ee.getBoundingClientRect();
|
|
2543
2543
|
Pt = It.top, Lt = It.bottom;
|
|
2544
2544
|
}
|
|
2545
2545
|
let ft = 0;
|
|
2546
|
-
if (vn < Pt ? ft = -(Pt - vn) : kn > Lt && (ft = kn - Lt), ft !== 0) if (En)
|
|
2546
|
+
if (vn < Pt ? ft = -(Pt - vn) : kn > Lt && (ft = kn - Lt), ft !== 0) if (En) Dr.scrollBy(0, ft);
|
|
2547
2547
|
else {
|
|
2548
|
-
const It =
|
|
2549
|
-
|
|
2550
|
-
const
|
|
2551
|
-
vn -=
|
|
2548
|
+
const It = Ee.scrollTop;
|
|
2549
|
+
Ee.scrollTop += ft;
|
|
2550
|
+
const Pr = Ee.scrollTop - It;
|
|
2551
|
+
vn -= Pr, kn -= Pr;
|
|
2552
2552
|
}
|
|
2553
2553
|
if (En) break;
|
|
2554
|
-
|
|
2554
|
+
Ee = wt(Ee);
|
|
2555
2555
|
}
|
|
2556
2556
|
})(t, H, s);
|
|
2557
2557
|
}
|
|
@@ -2570,7 +2570,7 @@ function Ln(n) {
|
|
|
2570
2570
|
w(t) && (e = t), w(e) || v(161);
|
|
2571
2571
|
const r = e.anchor;
|
|
2572
2572
|
let i = r.getNode(), s = r.offset;
|
|
2573
|
-
for (; !
|
|
2573
|
+
for (; !Me(i); ) {
|
|
2574
2574
|
const o = i;
|
|
2575
2575
|
if ([i, s] = Io(i, s), o.is(i)) break;
|
|
2576
2576
|
}
|
|
@@ -2579,7 +2579,7 @@ function Ln(n) {
|
|
|
2579
2579
|
function Io(n, e) {
|
|
2580
2580
|
const t = n.getParent();
|
|
2581
2581
|
if (!t) {
|
|
2582
|
-
const i =
|
|
2582
|
+
const i = Ae();
|
|
2583
2583
|
return re().append(i), i.select(), [re(), 0];
|
|
2584
2584
|
}
|
|
2585
2585
|
if (O(n)) {
|
|
@@ -2596,7 +2596,7 @@ function Io(n, e) {
|
|
|
2596
2596
|
}
|
|
2597
2597
|
return [t, n.getIndexWithinParent() + 1];
|
|
2598
2598
|
}
|
|
2599
|
-
function
|
|
2599
|
+
function oi(n, e, t, r, i = "decorators-and-blocks") {
|
|
2600
2600
|
if (e === "move" && r === "character" && !n.isCollapsed()) {
|
|
2601
2601
|
const [u, h] = t === n.isBackward() ? [n.focus, n.anchor] : [n.anchor, n.focus];
|
|
2602
2602
|
return h.set(u.key, u.offset, u.type), !0;
|
|
@@ -2626,7 +2626,7 @@ function si(n, e, t, r, i = "decorators-and-blocks") {
|
|
|
2626
2626
|
return a = fe(a), l && kt(n.anchor, a), kt(n.focus, a), c || !o;
|
|
2627
2627
|
}
|
|
2628
2628
|
let U = null, Y = null, Z = !1, In = !1, Jt = 0;
|
|
2629
|
-
const
|
|
2629
|
+
const li = { characterData: !0, childList: !0, subtree: !0 };
|
|
2630
2630
|
function Mt() {
|
|
2631
2631
|
return Z || U !== null && U._readOnly;
|
|
2632
2632
|
}
|
|
@@ -2636,7 +2636,7 @@ function j() {
|
|
|
2636
2636
|
function cs() {
|
|
2637
2637
|
Jt > 99 && v(14);
|
|
2638
2638
|
}
|
|
2639
|
-
function
|
|
2639
|
+
function ve() {
|
|
2640
2640
|
return U === null && v(195, us()), U;
|
|
2641
2641
|
}
|
|
2642
2642
|
function z() {
|
|
@@ -2647,7 +2647,7 @@ function us() {
|
|
|
2647
2647
|
const e = /* @__PURE__ */ new Set(), t = yn.version;
|
|
2648
2648
|
if (typeof window < "u") for (const i of document.querySelectorAll("[contenteditable]")) {
|
|
2649
2649
|
const s = Cn(i);
|
|
2650
|
-
if (
|
|
2650
|
+
if (xr(s)) n++;
|
|
2651
2651
|
else if (s) {
|
|
2652
2652
|
let o = String(s.constructor.version || "<0.17.1");
|
|
2653
2653
|
o === t && (o += " (separately built, likely a bundler configuration issue)"), e.add(o);
|
|
@@ -2659,7 +2659,7 @@ function us() {
|
|
|
2659
2659
|
function Fo() {
|
|
2660
2660
|
return Y;
|
|
2661
2661
|
}
|
|
2662
|
-
function
|
|
2662
|
+
function ai(n, e, t) {
|
|
2663
2663
|
const r = e.__type, i = (function(l, a) {
|
|
2664
2664
|
const c = l._nodes.get(a);
|
|
2665
2665
|
return c === void 0 && v(30, a), c;
|
|
@@ -2669,7 +2669,7 @@ function li(n, e, t) {
|
|
|
2669
2669
|
const o = s.length;
|
|
2670
2670
|
for (let l = 0; l < o && (s[l](e), e.isAttached()); l++) ;
|
|
2671
2671
|
}
|
|
2672
|
-
function
|
|
2672
|
+
function ci(n, e) {
|
|
2673
2673
|
return n !== void 0 && n.__key !== e && n.isAttached();
|
|
2674
2674
|
}
|
|
2675
2675
|
function fs(n, e) {
|
|
@@ -2680,21 +2680,21 @@ function fs(n, e) {
|
|
|
2680
2680
|
for (const i of r) t.add(i);
|
|
2681
2681
|
}
|
|
2682
2682
|
function Ol(n) {
|
|
2683
|
-
return
|
|
2683
|
+
return yr(n, z()._nodes);
|
|
2684
2684
|
}
|
|
2685
|
-
function
|
|
2685
|
+
function yr(n, e) {
|
|
2686
2686
|
const t = n.type, r = e.get(t);
|
|
2687
2687
|
r === void 0 && v(17, t);
|
|
2688
2688
|
const i = r.klass;
|
|
2689
2689
|
n.type !== i.getType() && v(18, i.name);
|
|
2690
2690
|
const s = i.importJSON(n), o = n.children;
|
|
2691
2691
|
if (N(s) && Array.isArray(o)) for (let l = 0; l < o.length; l++) {
|
|
2692
|
-
const a =
|
|
2692
|
+
const a = yr(o[l], e);
|
|
2693
2693
|
s.append(a);
|
|
2694
2694
|
}
|
|
2695
2695
|
return s;
|
|
2696
2696
|
}
|
|
2697
|
-
function
|
|
2697
|
+
function ui(n, e, t) {
|
|
2698
2698
|
const r = U, i = Z, s = Y;
|
|
2699
2699
|
U = e, Z = !0, Y = n;
|
|
2700
2700
|
try {
|
|
@@ -2717,7 +2717,7 @@ function xe(n, e) {
|
|
|
2717
2717
|
if (x instanceof Error && n._onError(x), In) throw x;
|
|
2718
2718
|
return gs(n, null, r, t), Li(n), n._dirtyType = nt, In = !0, xe(n, s), void (In = !1);
|
|
2719
2719
|
} finally {
|
|
2720
|
-
g.observe(r,
|
|
2720
|
+
g.observe(r, li), n._updating = f, U = c, Z = u, Y = h;
|
|
2721
2721
|
}
|
|
2722
2722
|
}
|
|
2723
2723
|
t._readOnly || (t._readOnly = !0);
|
|
@@ -2771,7 +2771,7 @@ function xe(n, e) {
|
|
|
2771
2771
|
S !== null && nr(S, x, b);
|
|
2772
2772
|
})(n, r, l);
|
|
2773
2773
|
} finally {
|
|
2774
|
-
g !== null && g.observe(r,
|
|
2774
|
+
g !== null && g.observe(r, li), Y = h, U = c;
|
|
2775
2775
|
}
|
|
2776
2776
|
}
|
|
2777
2777
|
d !== null && (function(x, b, T, S, A) {
|
|
@@ -2783,7 +2783,7 @@ function xe(n, e) {
|
|
|
2783
2783
|
})(n, d, y, _, s), w(l) || l === null || o !== null && o.is(l) || n.dispatchCommand(Wi, void 0);
|
|
2784
2784
|
const E = n._pendingDecorators;
|
|
2785
2785
|
E !== null && (n._decorators = E, n._pendingDecorators = null, yt("decorator", n, !0, E)), (function(x, b, T) {
|
|
2786
|
-
const S =
|
|
2786
|
+
const S = _i(b), A = _i(T);
|
|
2787
2787
|
S !== A && yt("textcontent", x, !0, A);
|
|
2788
2788
|
})(n, e || s, t), yt("update", n, !0, { dirtyElements: p, dirtyLeaves: _, editorState: t, mutatedNodes: d, normalizedNodes: C, prevEditorState: e || s, tags: y }), (function(x, b) {
|
|
2789
2789
|
if (x._deferred = [], b.length !== 0) {
|
|
@@ -2801,7 +2801,7 @@ function xe(n, e) {
|
|
|
2801
2801
|
const T = b.shift();
|
|
2802
2802
|
if (T) {
|
|
2803
2803
|
const [S, A] = T;
|
|
2804
|
-
|
|
2804
|
+
mr(x, S, A);
|
|
2805
2805
|
}
|
|
2806
2806
|
}
|
|
2807
2807
|
})(n);
|
|
@@ -2816,7 +2816,7 @@ function yt(n, e, t, ...r) {
|
|
|
2816
2816
|
e._updating = i;
|
|
2817
2817
|
}
|
|
2818
2818
|
}
|
|
2819
|
-
function
|
|
2819
|
+
function fi(n, e) {
|
|
2820
2820
|
const t = n._updates;
|
|
2821
2821
|
let r = e || !1;
|
|
2822
2822
|
for (; t.length !== 0; ) {
|
|
@@ -2836,7 +2836,7 @@ function ui(n, e) {
|
|
|
2836
2836
|
}
|
|
2837
2837
|
return r;
|
|
2838
2838
|
}
|
|
2839
|
-
function
|
|
2839
|
+
function mr(n, e, t) {
|
|
2840
2840
|
const r = n._updateTags;
|
|
2841
2841
|
let i, s = !1, o = !1;
|
|
2842
2842
|
t !== void 0 && (i = t.onUpdate, fs(n, t.tag), s = t.skipTransforms || !1, o = t.discrete || !1), i && n._deferred.push(i);
|
|
@@ -2849,10 +2849,10 @@ function yr(n, e, t) {
|
|
|
2849
2849
|
try {
|
|
2850
2850
|
c && (d ? l._selection !== null && (a._selection = l._selection.clone()) : a._selection = (function(y, m) {
|
|
2851
2851
|
const k = y.getEditorState()._selection, E = Te(se(y));
|
|
2852
|
-
return w(k) || k == null ?
|
|
2852
|
+
return w(k) || k == null ? pr(k, E, y, m) : k.clone();
|
|
2853
2853
|
})(n, t && t.event || null));
|
|
2854
2854
|
const p = n._compositionKey;
|
|
2855
|
-
e(), s =
|
|
2855
|
+
e(), s = fi(n, s), (function(y, m) {
|
|
2856
2856
|
const k = m.getEditorState()._selection, E = y._selection;
|
|
2857
2857
|
if (w(E)) {
|
|
2858
2858
|
const x = E.anchor, b = E.focus;
|
|
@@ -2866,17 +2866,17 @@ function yr(n, e, t) {
|
|
|
2866
2866
|
const k = m._dirtyLeaves, E = y._nodeMap;
|
|
2867
2867
|
for (const x of k) {
|
|
2868
2868
|
const b = E.get(x);
|
|
2869
|
-
O(b) && b.isAttached() && b.isSimpleText() && !b.isUnmergeable() &&
|
|
2869
|
+
O(b) && b.isAttached() && b.isSimpleText() && !b.isUnmergeable() && Kr(b);
|
|
2870
2870
|
}
|
|
2871
2871
|
})(a, n) : (function(y, m) {
|
|
2872
|
-
const k = m._dirtyLeaves, E = m._dirtyElements, x = y._nodeMap, b =
|
|
2872
|
+
const k = m._dirtyLeaves, E = m._dirtyElements, x = y._nodeMap, b = Oe(), T = /* @__PURE__ */ new Map();
|
|
2873
2873
|
let S = k, A = S.size, L = E, W = L.size;
|
|
2874
2874
|
for (; A > 0 || W > 0; ) {
|
|
2875
2875
|
if (A > 0) {
|
|
2876
2876
|
m._dirtyLeaves = /* @__PURE__ */ new Set();
|
|
2877
2877
|
for (const R of S) {
|
|
2878
2878
|
const P = x.get(R);
|
|
2879
|
-
O(P) && P.isAttached() && P.isSimpleText() && !P.isUnmergeable() &&
|
|
2879
|
+
O(P) && P.isAttached() && P.isSimpleText() && !P.isUnmergeable() && Kr(P), P !== void 0 && ci(P, b) && ai(m, P, T), k.add(R);
|
|
2880
2880
|
}
|
|
2881
2881
|
if (S = m._dirtyLeaves, A = S.size, A > 0) {
|
|
2882
2882
|
Jt++;
|
|
@@ -2888,12 +2888,12 @@ function yr(n, e, t) {
|
|
|
2888
2888
|
const P = R[0], B = R[1];
|
|
2889
2889
|
if (E.set(P, B), !B) continue;
|
|
2890
2890
|
const H = x.get(P);
|
|
2891
|
-
H !== void 0 &&
|
|
2891
|
+
H !== void 0 && ci(H, b) && ai(m, H, T);
|
|
2892
2892
|
}
|
|
2893
2893
|
S = m._dirtyLeaves, A = S.size, L = m._dirtyElements, W = L.size, Jt++;
|
|
2894
2894
|
}
|
|
2895
2895
|
m._dirtyLeaves = k, m._dirtyElements = E;
|
|
2896
|
-
})(a, n),
|
|
2896
|
+
})(a, n), fi(n), (function(y, m, k, E) {
|
|
2897
2897
|
const x = y._nodeMap, b = m._nodeMap, T = [];
|
|
2898
2898
|
for (const [S] of E) {
|
|
2899
2899
|
const A = b.get(S);
|
|
@@ -2909,7 +2909,7 @@ function yr(n, e, t) {
|
|
|
2909
2909
|
if (w(C)) {
|
|
2910
2910
|
const y = a._nodeMap, m = C.anchor.key, k = C.focus.key;
|
|
2911
2911
|
y.get(m) !== void 0 && y.get(k) !== void 0 || v(19);
|
|
2912
|
-
} else
|
|
2912
|
+
} else _r(C) && C._nodes.size === 0 && (a._selection = null);
|
|
2913
2913
|
} catch (p) {
|
|
2914
2914
|
return p instanceof Error && n._onError(p), n._pendingEditorState = l, n._dirtyType = nt, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements.clear(), void xe(n);
|
|
2915
2915
|
} finally {
|
|
@@ -2926,7 +2926,7 @@ function yr(n, e, t) {
|
|
|
2926
2926
|
})) : (a._flushSync = !1, c && (r.clear(), n._deferred = [], n._pendingEditorState = null));
|
|
2927
2927
|
}
|
|
2928
2928
|
function te(n, e, t) {
|
|
2929
|
-
Y === n && t === void 0 ? e() :
|
|
2929
|
+
Y === n && t === void 0 ? e() : mr(n, e, t);
|
|
2930
2930
|
}
|
|
2931
2931
|
class mt {
|
|
2932
2932
|
constructor(e, t, r) {
|
|
@@ -2994,9 +2994,9 @@ class mt {
|
|
|
2994
2994
|
const a = this.getFirstChildOffset();
|
|
2995
2995
|
return [e, Math.min(a + e.getChildrenSize(), Math.max(a, i))];
|
|
2996
2996
|
}
|
|
2997
|
-
const s =
|
|
2997
|
+
const s = di(t, r);
|
|
2998
2998
|
s.push(i);
|
|
2999
|
-
const o =
|
|
2999
|
+
const o = di(t, this.element);
|
|
3000
3000
|
let l = e.getIndexWithinParent();
|
|
3001
3001
|
for (let a = 0; a < o.length; a++) {
|
|
3002
3002
|
const c = s[a], u = o[a];
|
|
@@ -3009,7 +3009,7 @@ class mt {
|
|
|
3009
3009
|
return [e.getParentOrThrow(), l];
|
|
3010
3010
|
}
|
|
3011
3011
|
}
|
|
3012
|
-
function
|
|
3012
|
+
function di(n, e) {
|
|
3013
3013
|
const t = [];
|
|
3014
3014
|
let r = e;
|
|
3015
3015
|
for (; r !== n && r !== null; r = r.parentNode) {
|
|
@@ -3162,7 +3162,7 @@ class _n extends hn {
|
|
|
3162
3162
|
}
|
|
3163
3163
|
hasFormat(e) {
|
|
3164
3164
|
if (e !== "") {
|
|
3165
|
-
const t =
|
|
3165
|
+
const t = Ir[e];
|
|
3166
3166
|
return !!(this.getFormat() & t);
|
|
3167
3167
|
}
|
|
3168
3168
|
return !1;
|
|
@@ -3215,7 +3215,7 @@ class _n extends hn {
|
|
|
3215
3215
|
return t.__dir = e, t;
|
|
3216
3216
|
}
|
|
3217
3217
|
setFormat(e) {
|
|
3218
|
-
return this.getWritable().__format = e !== "" ?
|
|
3218
|
+
return this.getWritable().__format = e !== "" ? Ir[e] : 0, this;
|
|
3219
3219
|
}
|
|
3220
3220
|
setStyle(e) {
|
|
3221
3221
|
return this.getWritable().__style = e || "", this;
|
|
@@ -3276,7 +3276,7 @@ class _n extends hn {
|
|
|
3276
3276
|
const d = I();
|
|
3277
3277
|
if (w(d)) {
|
|
3278
3278
|
const _ = new Set(c), p = new Set(a), { anchor: C, focus: y } = d;
|
|
3279
|
-
|
|
3279
|
+
hi(C, _, p) && an(C, C.getNode(), this, h, u), hi(y, _, p) && an(y, y.getNode(), this, h, u), f !== 0 || this.canBeEmpty() || Pe(this) || this.remove();
|
|
3280
3280
|
}
|
|
3281
3281
|
}
|
|
3282
3282
|
return o;
|
|
@@ -3355,7 +3355,7 @@ class _n extends hn {
|
|
|
3355
3355
|
function N(n) {
|
|
3356
3356
|
return n instanceof _n;
|
|
3357
3357
|
}
|
|
3358
|
-
function
|
|
3358
|
+
function hi(n, e, t) {
|
|
3359
3359
|
let r = n.getNode();
|
|
3360
3360
|
for (; r; ) {
|
|
3361
3361
|
const i = r.__key;
|
|
@@ -3430,7 +3430,7 @@ function ne(n) {
|
|
|
3430
3430
|
function ds(n) {
|
|
3431
3431
|
return new pn(new Map(n._nodeMap));
|
|
3432
3432
|
}
|
|
3433
|
-
function
|
|
3433
|
+
function Cr() {
|
|
3434
3434
|
return new pn(/* @__PURE__ */ new Map([["root", new Ot()]]));
|
|
3435
3435
|
}
|
|
3436
3436
|
function hs(n) {
|
|
@@ -3454,14 +3454,14 @@ class pn {
|
|
|
3454
3454
|
return this._nodeMap.size === 1 && this._selection === null;
|
|
3455
3455
|
}
|
|
3456
3456
|
read(e, t) {
|
|
3457
|
-
return
|
|
3457
|
+
return ui(t && t.editor || null, this, e);
|
|
3458
3458
|
}
|
|
3459
3459
|
clone(e) {
|
|
3460
3460
|
const t = new pn(this._nodeMap, e === void 0 ? this._selection : e);
|
|
3461
3461
|
return t._readOnly = !0, t;
|
|
3462
3462
|
}
|
|
3463
3463
|
toJSON() {
|
|
3464
|
-
return
|
|
3464
|
+
return ui(null, this, (() => ({ root: hs(re()) })));
|
|
3465
3465
|
}
|
|
3466
3466
|
}
|
|
3467
3467
|
const Al = "historic", wl = "history-push", Fn = "history-merge", Dl = "paste", Ko = "collaboration", Bo = "skip-scroll-into-view", zo = "skip-dom-selection";
|
|
@@ -3500,13 +3500,13 @@ class At extends _n {
|
|
|
3500
3500
|
return { element: t };
|
|
3501
3501
|
}
|
|
3502
3502
|
static importJSON(e) {
|
|
3503
|
-
return
|
|
3503
|
+
return Ae().updateFromJSON(e);
|
|
3504
3504
|
}
|
|
3505
3505
|
exportJSON() {
|
|
3506
3506
|
return { ...super.exportJSON(), textFormat: this.getTextFormat(), textStyle: this.getTextStyle() };
|
|
3507
3507
|
}
|
|
3508
3508
|
insertNewAfter(e, t) {
|
|
3509
|
-
const r =
|
|
3509
|
+
const r = Ae();
|
|
3510
3510
|
r.setTextFormat(e.format), r.setTextStyle(e.style);
|
|
3511
3511
|
const i = this.getDirection();
|
|
3512
3512
|
return r.setDirection(i), r.setFormat(this.getFormatType()), r.setStyle(this.getStyle()), this.insertAfter(r, t), r;
|
|
@@ -3521,10 +3521,10 @@ class At extends _n {
|
|
|
3521
3521
|
}
|
|
3522
3522
|
}
|
|
3523
3523
|
function $o(n) {
|
|
3524
|
-
const e =
|
|
3524
|
+
const e = Ae();
|
|
3525
3525
|
return n.style && (e.setFormat(n.style.textAlign), il(n, e)), { node: e };
|
|
3526
3526
|
}
|
|
3527
|
-
function
|
|
3527
|
+
function Ae() {
|
|
3528
3528
|
return Nn(new At());
|
|
3529
3529
|
}
|
|
3530
3530
|
function Pl(n) {
|
|
@@ -3533,12 +3533,12 @@ function Pl(n) {
|
|
|
3533
3533
|
const Ll = 0, Il = 1, Fl = 4;
|
|
3534
3534
|
function gs(n, e, t, r) {
|
|
3535
3535
|
const i = n._keyToDOMMap;
|
|
3536
|
-
i.clear(), n._editorState =
|
|
3536
|
+
i.clear(), n._editorState = Cr(), n._pendingEditorState = r, n._compositionKey = null, n._dirtyType = We, 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;
|
|
3537
3537
|
const s = n._observer;
|
|
3538
3538
|
s !== null && (s.disconnect(), n._observer = null), e !== null && (e.textContent = ""), t !== null && (t.textContent = "", i.set("root", t));
|
|
3539
3539
|
}
|
|
3540
3540
|
function Rl(n) {
|
|
3541
|
-
const e = n || {}, t = Fo(), r = e.theme || {}, i = n === void 0 ? t : e.parentEditor || null, s = e.disableEvents || !1, o =
|
|
3541
|
+
const e = n || {}, t = Fo(), 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 : Ss()), a = e.editorState, c = [Ot, lt, Et, bt, At, Wo, ...e.nodes || []], { onError: u, html: h } = e, f = e.editable === void 0 || e.editable;
|
|
3542
3542
|
let g;
|
|
3543
3543
|
if (n === void 0 && t !== null) g = t._nodes;
|
|
3544
3544
|
else {
|
|
@@ -3635,7 +3635,7 @@ class yn {
|
|
|
3635
3635
|
return e;
|
|
3636
3636
|
}
|
|
3637
3637
|
initializeMutationListener(e, t) {
|
|
3638
|
-
const r = this._editorState, i =
|
|
3638
|
+
const r = this._editorState, i = rr(r).get(t.getType());
|
|
3639
3639
|
if (!i) return;
|
|
3640
3640
|
const s = /* @__PURE__ */ new Map();
|
|
3641
3641
|
for (const o of i.keys()) s.set(o, "created");
|
|
@@ -3652,7 +3652,7 @@ class yn {
|
|
|
3652
3652
|
i.push(o);
|
|
3653
3653
|
}
|
|
3654
3654
|
return (function(o, l) {
|
|
3655
|
-
const a =
|
|
3655
|
+
const a = rr(o.getEditorState()), c = [];
|
|
3656
3656
|
for (const u of l) {
|
|
3657
3657
|
const h = a.get(u);
|
|
3658
3658
|
h && c.push(h);
|
|
@@ -3690,17 +3690,17 @@ class yn {
|
|
|
3690
3690
|
if (e !== t) {
|
|
3691
3691
|
const r = et(this._config.theme, "root"), i = this._pendingEditorState || this._editorState;
|
|
3692
3692
|
if (this._rootElement = e, gs(this, t, e, i), t !== null && (this._config.disableEvents || vo(t), r != null && t.classList.remove(...r)), e !== null) {
|
|
3693
|
-
const s =
|
|
3693
|
+
const s = Er(e), o = e.style;
|
|
3694
3694
|
o.userSelect = "text", o.whiteSpace = "pre-wrap", o.wordBreak = "break-word", e.setAttribute("data-lexical-editor", "true"), this._window = s, this._dirtyType = nt, Li(this), this._updateTags.add(Fn), xe(this), this._config.disableEvents || (function(l, a) {
|
|
3695
3695
|
const c = l.ownerDocument, u = on.get(c);
|
|
3696
3696
|
(u === void 0 || u < 1) && c.addEventListener("selectionchange", es), on.set(c, (u || 0) + 1), l.__lexicalEditor = a;
|
|
3697
3697
|
const h = Zi(l);
|
|
3698
3698
|
for (let f = 0; f < Xn.length; f++) {
|
|
3699
3699
|
const [g, d] = Xn[f], _ = typeof d == "function" ? (p) => {
|
|
3700
|
-
|
|
3700
|
+
Gr(p) || (Hr(p), (a.isEditable() || g === "click") && d(p, a));
|
|
3701
3701
|
} : (p) => {
|
|
3702
|
-
if (
|
|
3703
|
-
|
|
3702
|
+
if (Gr(p)) return;
|
|
3703
|
+
Hr(p);
|
|
3704
3704
|
const C = a.isEditable();
|
|
3705
3705
|
switch (g) {
|
|
3706
3706
|
case "cut":
|
|
@@ -3747,11 +3747,11 @@ class yn {
|
|
|
3747
3747
|
}
|
|
3748
3748
|
parseEditorState(e, t) {
|
|
3749
3749
|
return (function(r, i, s) {
|
|
3750
|
-
const o =
|
|
3750
|
+
const o = Cr(), l = U, a = Z, c = Y, u = i._dirtyElements, h = i._dirtyLeaves, f = i._cloneNotNeeded, g = i._dirtyType;
|
|
3751
3751
|
i._dirtyElements = /* @__PURE__ */ new Map(), i._dirtyLeaves = /* @__PURE__ */ new Set(), i._cloneNotNeeded = /* @__PURE__ */ new Set(), i._dirtyType = 0, U = o, Z = !1, Y = i;
|
|
3752
3752
|
try {
|
|
3753
3753
|
const d = i._nodes;
|
|
3754
|
-
|
|
3754
|
+
yr(r.root, d), s && s(), o._readOnly = !0;
|
|
3755
3755
|
} catch (d) {
|
|
3756
3756
|
d instanceof Error && i._onError(d);
|
|
3757
3757
|
} finally {
|
|
@@ -3765,7 +3765,7 @@ class yn {
|
|
|
3765
3765
|
}
|
|
3766
3766
|
update(e, t) {
|
|
3767
3767
|
(function(r, i, s) {
|
|
3768
|
-
r._updating ? r._updates.push([i, s]) :
|
|
3768
|
+
r._updating ? r._updates.push([i, s]) : mr(r, i, s);
|
|
3769
3769
|
})(this, e, t);
|
|
3770
3770
|
}
|
|
3771
3771
|
focus(e, t = {}) {
|
|
@@ -3798,14 +3798,14 @@ let Uo = 1;
|
|
|
3798
3798
|
const Yo = typeof queueMicrotask == "function" ? queueMicrotask : (n) => {
|
|
3799
3799
|
Promise.resolve().then(n);
|
|
3800
3800
|
};
|
|
3801
|
-
function
|
|
3802
|
-
return K(
|
|
3801
|
+
function gi(n) {
|
|
3802
|
+
return K(Sr(n));
|
|
3803
3803
|
}
|
|
3804
3804
|
function _s(n) {
|
|
3805
3805
|
const e = document.activeElement;
|
|
3806
3806
|
if (!ee(e)) return !1;
|
|
3807
3807
|
const t = e.nodeName;
|
|
3808
|
-
return K(
|
|
3808
|
+
return K(Sr(n)) && (t === "INPUT" || t === "TEXTAREA" || e.contentEditable === "true" && Cn(e) == null);
|
|
3809
3809
|
}
|
|
3810
3810
|
function mn(n, e, t) {
|
|
3811
3811
|
const r = n.getRootElement();
|
|
@@ -3815,14 +3815,14 @@ function mn(n, e, t) {
|
|
|
3815
3815
|
return !1;
|
|
3816
3816
|
}
|
|
3817
3817
|
}
|
|
3818
|
-
function
|
|
3818
|
+
function xr(n) {
|
|
3819
3819
|
return n instanceof yn;
|
|
3820
3820
|
}
|
|
3821
3821
|
function ps(n) {
|
|
3822
3822
|
let e = n;
|
|
3823
3823
|
for (; e != null; ) {
|
|
3824
3824
|
const t = Cn(e);
|
|
3825
|
-
if (
|
|
3825
|
+
if (xr(t)) return t;
|
|
3826
3826
|
e = wt(e);
|
|
3827
3827
|
}
|
|
3828
3828
|
return null;
|
|
@@ -3833,10 +3833,10 @@ function Cn(n) {
|
|
|
3833
3833
|
function Re(n) {
|
|
3834
3834
|
return rs(n) || n.isToken();
|
|
3835
3835
|
}
|
|
3836
|
-
function
|
|
3836
|
+
function be(n) {
|
|
3837
3837
|
return Re(n) || n.isSegmented();
|
|
3838
3838
|
}
|
|
3839
|
-
function
|
|
3839
|
+
function ke(n) {
|
|
3840
3840
|
return Dt(n) && n.nodeType === Ps;
|
|
3841
3841
|
}
|
|
3842
3842
|
function Jo(n) {
|
|
@@ -3845,7 +3845,7 @@ function Jo(n) {
|
|
|
3845
3845
|
function rt(n) {
|
|
3846
3846
|
let e = n;
|
|
3847
3847
|
for (; e != null; ) {
|
|
3848
|
-
if (
|
|
3848
|
+
if (ke(e)) return e;
|
|
3849
3849
|
e = e.firstChild;
|
|
3850
3850
|
}
|
|
3851
3851
|
return null;
|
|
@@ -3862,7 +3862,7 @@ function Kl(n) {
|
|
|
3862
3862
|
function Ho(n, e) {
|
|
3863
3863
|
if (e != null) return void (n.__key = e);
|
|
3864
3864
|
j(), cs();
|
|
3865
|
-
const t = z(), r =
|
|
3865
|
+
const t = z(), r = ve(), i = "" + Uo++;
|
|
3866
3866
|
r._nodeMap.set(i, n), N(n) ? t._dirtyElements.set(i, !0) : t._dirtyLeaves.add(i), t._cloneNotNeeded.add(i), t._dirtyType = Mi, n.__key = i;
|
|
3867
3867
|
}
|
|
3868
3868
|
function Ke(n) {
|
|
@@ -3874,7 +3874,7 @@ function Ke(n) {
|
|
|
3874
3874
|
}
|
|
3875
3875
|
function un(n) {
|
|
3876
3876
|
cs();
|
|
3877
|
-
const e = n.getLatest(), t = e.__parent, r =
|
|
3877
|
+
const e = n.getLatest(), t = e.__parent, r = ve(), i = z(), s = r._nodeMap, o = i._dirtyElements;
|
|
3878
3878
|
t !== null && (function(a, c, u) {
|
|
3879
3879
|
let h = a;
|
|
3880
3880
|
for (; h !== null; ) {
|
|
@@ -3901,11 +3901,11 @@ function V(n) {
|
|
|
3901
3901
|
}
|
|
3902
3902
|
}
|
|
3903
3903
|
}
|
|
3904
|
-
function
|
|
3904
|
+
function Oe() {
|
|
3905
3905
|
return Mt() ? null : z()._compositionKey;
|
|
3906
3906
|
}
|
|
3907
3907
|
function J(n, e) {
|
|
3908
|
-
const t = (e ||
|
|
3908
|
+
const t = (e || ve())._nodeMap.get(n);
|
|
3909
3909
|
return t === void 0 ? null : t;
|
|
3910
3910
|
}
|
|
3911
3911
|
function ys(n, e) {
|
|
@@ -3915,7 +3915,7 @@ function ys(n, e) {
|
|
|
3915
3915
|
function xn(n, e) {
|
|
3916
3916
|
return n[`__lexicalKey_${e._key}`];
|
|
3917
3917
|
}
|
|
3918
|
-
function
|
|
3918
|
+
function Sr(n, e) {
|
|
3919
3919
|
let t = n;
|
|
3920
3920
|
for (; t != null; ) {
|
|
3921
3921
|
const r = ys(t, e);
|
|
@@ -3928,18 +3928,18 @@ function ms(n) {
|
|
|
3928
3928
|
const e = n._decorators, t = Object.assign({}, e);
|
|
3929
3929
|
return n._pendingDecorators = t, t;
|
|
3930
3930
|
}
|
|
3931
|
-
function
|
|
3931
|
+
function _i(n) {
|
|
3932
3932
|
return n.read((() => re().getTextContent()));
|
|
3933
3933
|
}
|
|
3934
3934
|
function re() {
|
|
3935
|
-
return Cs(
|
|
3935
|
+
return Cs(ve());
|
|
3936
3936
|
}
|
|
3937
3937
|
function Cs(n) {
|
|
3938
3938
|
return n._nodeMap.get("root");
|
|
3939
3939
|
}
|
|
3940
3940
|
function ie(n) {
|
|
3941
3941
|
j();
|
|
3942
|
-
const e =
|
|
3942
|
+
const e = ve();
|
|
3943
3943
|
n !== null && (n.dirty = !0, n.setCachedNodes(null)), e._selection = n;
|
|
3944
3944
|
}
|
|
3945
3945
|
function Xe(n) {
|
|
@@ -3954,13 +3954,13 @@ function Xe(n) {
|
|
|
3954
3954
|
})(n, e);
|
|
3955
3955
|
return t === null ? n === e.getRootElement() ? J("root") : null : J(t);
|
|
3956
3956
|
}
|
|
3957
|
-
function
|
|
3957
|
+
function pi(n, e) {
|
|
3958
3958
|
return e ? n.getTextContentSize() : 0;
|
|
3959
3959
|
}
|
|
3960
3960
|
function xs(n) {
|
|
3961
3961
|
return /[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(n);
|
|
3962
3962
|
}
|
|
3963
|
-
function
|
|
3963
|
+
function Nr(n) {
|
|
3964
3964
|
const e = [];
|
|
3965
3965
|
let t = n;
|
|
3966
3966
|
for (; t !== null; ) e.push(t), t = t._parentEditor;
|
|
@@ -3970,26 +3970,26 @@ function Ss() {
|
|
|
3970
3970
|
return Math.random().toString(36).replace(/[^a-z]+/g, "").substring(0, 5);
|
|
3971
3971
|
}
|
|
3972
3972
|
function Ns(n) {
|
|
3973
|
-
return
|
|
3973
|
+
return ke(n) ? n.nodeValue : null;
|
|
3974
3974
|
}
|
|
3975
|
-
function
|
|
3975
|
+
function Tr(n, e, t) {
|
|
3976
3976
|
const r = Te(se(e));
|
|
3977
3977
|
if (r === null) return;
|
|
3978
3978
|
const i = r.anchorNode;
|
|
3979
3979
|
let { anchorOffset: s, focusOffset: o } = r;
|
|
3980
3980
|
if (i !== null) {
|
|
3981
3981
|
let l = Ns(i);
|
|
3982
|
-
const a =
|
|
3982
|
+
const a = Sr(i);
|
|
3983
3983
|
if (l !== null && O(a)) {
|
|
3984
3984
|
if (l === fn && t) {
|
|
3985
3985
|
const c = t.length;
|
|
3986
3986
|
l = t, s = c, o = c;
|
|
3987
3987
|
}
|
|
3988
|
-
l !== null &&
|
|
3988
|
+
l !== null && vr(a, l, s, o, n);
|
|
3989
3989
|
}
|
|
3990
3990
|
}
|
|
3991
3991
|
}
|
|
3992
|
-
function
|
|
3992
|
+
function vr(n, e, t, r, i) {
|
|
3993
3993
|
let s = n;
|
|
3994
3994
|
if (s.isAttached() && (i || !s.isDirty())) {
|
|
3995
3995
|
const o = s.isComposing();
|
|
@@ -4009,7 +4009,7 @@ function Tr(n, e, t, r, i) {
|
|
|
4009
4009
|
}
|
|
4010
4010
|
return;
|
|
4011
4011
|
}
|
|
4012
|
-
const c = s.getParent(), u = at(), h = s.getTextContentSize(), f =
|
|
4012
|
+
const c = s.getParent(), u = at(), h = s.getTextContentSize(), f = Oe(), g = s.getKey();
|
|
4013
4013
|
if (s.isToken() || f !== null && g === f && !o || w(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();
|
|
4014
4014
|
const d = I();
|
|
4015
4015
|
if (!w(d) || t === null || r === null) return void s.setTextContent(l);
|
|
@@ -4031,11 +4031,11 @@ function Go(n, e) {
|
|
|
4031
4031
|
function F(n, e, t) {
|
|
4032
4032
|
return Go(n, t) && n.key.toLowerCase() === e.toLowerCase();
|
|
4033
4033
|
}
|
|
4034
|
-
const me = { ctrlKey: !ue, metaKey: ue },
|
|
4035
|
-
function
|
|
4034
|
+
const me = { ctrlKey: !ue, metaKey: ue }, yi = { altKey: ue, ctrlKey: !ue };
|
|
4035
|
+
function mi(n) {
|
|
4036
4036
|
return n.key === "Backspace";
|
|
4037
4037
|
}
|
|
4038
|
-
function
|
|
4038
|
+
function Ci(n) {
|
|
4039
4039
|
return F(n, "a", me);
|
|
4040
4040
|
}
|
|
4041
4041
|
function Bl(n) {
|
|
@@ -4060,7 +4060,7 @@ function et(n, e) {
|
|
|
4060
4060
|
}
|
|
4061
4061
|
return i;
|
|
4062
4062
|
}
|
|
4063
|
-
function
|
|
4063
|
+
function kr(n, e, t, r, i) {
|
|
4064
4064
|
if (t.size === 0) return;
|
|
4065
4065
|
const s = r.__type, o = r.__key, l = e.get(s);
|
|
4066
4066
|
l === void 0 && v(33, s);
|
|
@@ -4070,7 +4070,17 @@ function vr(n, e, t, r, i) {
|
|
|
4070
4070
|
const u = c.get(o), h = u === "destroyed" && i === "created";
|
|
4071
4071
|
(u === void 0 || h) && c.set(o, h ? "updated" : i);
|
|
4072
4072
|
}
|
|
4073
|
-
function
|
|
4073
|
+
function zl(n) {
|
|
4074
|
+
const e = n.getType(), t = ve();
|
|
4075
|
+
if (t._readOnly) {
|
|
4076
|
+
const s = rr(t).get(e);
|
|
4077
|
+
return s ? Array.from(s.values()) : [];
|
|
4078
|
+
}
|
|
4079
|
+
const r = t._nodeMap, i = [];
|
|
4080
|
+
for (const [, s] of r) s instanceof n && s.__type === e && s.isAttached() && i.push(s);
|
|
4081
|
+
return i;
|
|
4082
|
+
}
|
|
4083
|
+
function xi(n, e, t) {
|
|
4074
4084
|
const r = n.getParent();
|
|
4075
4085
|
let i = t, s = n;
|
|
4076
4086
|
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);
|
|
@@ -4078,12 +4088,12 @@ function Ci(n, e, t) {
|
|
|
4078
4088
|
function Vo(n, e) {
|
|
4079
4089
|
const t = n.offset;
|
|
4080
4090
|
if (n.type === "element")
|
|
4081
|
-
return
|
|
4091
|
+
return xi(n.getNode(), e, t);
|
|
4082
4092
|
{
|
|
4083
4093
|
const r = n.getNode();
|
|
4084
4094
|
if (e && t === 0 || !e && t === r.getTextContentSize()) {
|
|
4085
4095
|
const i = e ? r.getPreviousSibling() : r.getNextSibling();
|
|
4086
|
-
return i === null ?
|
|
4096
|
+
return i === null ? xi(r.getParentOrThrow(), e, r.getIndexWithinParent() + (e ? 0 : 1)) : i;
|
|
4087
4097
|
}
|
|
4088
4098
|
}
|
|
4089
4099
|
return null;
|
|
@@ -4094,7 +4104,7 @@ function Ts(n) {
|
|
|
4094
4104
|
}
|
|
4095
4105
|
function M(n, e, t) {
|
|
4096
4106
|
return (function(r, i, s) {
|
|
4097
|
-
const o =
|
|
4107
|
+
const o = Nr(r);
|
|
4098
4108
|
for (let l = 4; l >= 0; l--) for (let a = 0; a < o.length; a++) {
|
|
4099
4109
|
const c = o[a], u = c._commands.get(i);
|
|
4100
4110
|
if (u !== void 0) {
|
|
@@ -4139,7 +4149,7 @@ function tr(n, e) {
|
|
|
4139
4149
|
}
|
|
4140
4150
|
return !1;
|
|
4141
4151
|
}
|
|
4142
|
-
function
|
|
4152
|
+
function Er(n) {
|
|
4143
4153
|
const e = vs(n);
|
|
4144
4154
|
return e ? e.defaultView : null;
|
|
4145
4155
|
}
|
|
@@ -4147,7 +4157,7 @@ function se(n) {
|
|
|
4147
4157
|
const e = n._window;
|
|
4148
4158
|
return e === null && v(78), e;
|
|
4149
4159
|
}
|
|
4150
|
-
function
|
|
4160
|
+
function Wl(n) {
|
|
4151
4161
|
return N(n) && n.isInline() || K(n) && n.isInline();
|
|
4152
4162
|
}
|
|
4153
4163
|
function Xo(n) {
|
|
@@ -4190,10 +4200,10 @@ function Te(n) {
|
|
|
4190
4200
|
return le ? (n || window).getSelection() : null;
|
|
4191
4201
|
}
|
|
4192
4202
|
function Zo(n) {
|
|
4193
|
-
const e =
|
|
4203
|
+
const e = Er(n);
|
|
4194
4204
|
return e ? e.getSelection() : null;
|
|
4195
4205
|
}
|
|
4196
|
-
function
|
|
4206
|
+
function $l(n) {
|
|
4197
4207
|
return ee(n) && n.tagName === "A";
|
|
4198
4208
|
}
|
|
4199
4209
|
function ee(n) {
|
|
@@ -4209,11 +4219,11 @@ function tl(n) {
|
|
|
4209
4219
|
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");
|
|
4210
4220
|
return n.nodeName.match(e) !== null;
|
|
4211
4221
|
}
|
|
4212
|
-
function
|
|
4222
|
+
function Si(n) {
|
|
4213
4223
|
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");
|
|
4214
4224
|
return n.nodeName.match(e) !== null;
|
|
4215
4225
|
}
|
|
4216
|
-
function
|
|
4226
|
+
function Me(n) {
|
|
4217
4227
|
if (K(n) && !n.isInline()) return !0;
|
|
4218
4228
|
if (!N(n) || Pe(n)) return !1;
|
|
4219
4229
|
const e = n.getFirstChild(), t = e === null || Ze(e) || O(e) || e.isInline();
|
|
@@ -4224,14 +4234,14 @@ function Bn(n, e) {
|
|
|
4224
4234
|
for (; t !== null && t.getParent() !== null && !e(t); ) t = t.getParentOrThrow();
|
|
4225
4235
|
return e(t) ? t : null;
|
|
4226
4236
|
}
|
|
4227
|
-
function
|
|
4237
|
+
function Ul() {
|
|
4228
4238
|
return z();
|
|
4229
4239
|
}
|
|
4230
|
-
const
|
|
4231
|
-
function
|
|
4240
|
+
const Ni = /* @__PURE__ */ new WeakMap(), nl = /* @__PURE__ */ new Map();
|
|
4241
|
+
function rr(n) {
|
|
4232
4242
|
if (!n._readOnly && n.isEmpty()) return nl;
|
|
4233
4243
|
n._readOnly || v(192);
|
|
4234
|
-
let e =
|
|
4244
|
+
let e = Ni.get(n);
|
|
4235
4245
|
return e || (e = (function(t) {
|
|
4236
4246
|
const r = /* @__PURE__ */ new Map();
|
|
4237
4247
|
for (const [i, s] of t._nodeMap) {
|
|
@@ -4240,7 +4250,7 @@ function Ni(n) {
|
|
|
4240
4250
|
l || (l = /* @__PURE__ */ new Map(), r.set(o, l)), l.set(i, s);
|
|
4241
4251
|
}
|
|
4242
4252
|
return r;
|
|
4243
|
-
})(n),
|
|
4253
|
+
})(n), Ni.set(n, e)), e;
|
|
4244
4254
|
}
|
|
4245
4255
|
function rl(n) {
|
|
4246
4256
|
const e = n.constructor.clone(n);
|
|
@@ -4250,14 +4260,14 @@ function il(n, e) {
|
|
|
4250
4260
|
const t = parseInt(n.style.paddingInlineStart, 10) || 0, r = Math.round(t / 40);
|
|
4251
4261
|
e.setIndent(r);
|
|
4252
4262
|
}
|
|
4253
|
-
function
|
|
4263
|
+
function Yl(n) {
|
|
4254
4264
|
n.__lexicalUnmanaged = !0;
|
|
4255
4265
|
}
|
|
4256
4266
|
function sl(n) {
|
|
4257
4267
|
return n.__lexicalUnmanaged === !0;
|
|
4258
4268
|
}
|
|
4259
4269
|
const ol = { next: "previous", previous: "next" };
|
|
4260
|
-
class
|
|
4270
|
+
class br {
|
|
4261
4271
|
constructor(e) {
|
|
4262
4272
|
this.origin = e;
|
|
4263
4273
|
}
|
|
@@ -4302,18 +4312,18 @@ class Er {
|
|
|
4302
4312
|
return this;
|
|
4303
4313
|
}
|
|
4304
4314
|
}
|
|
4305
|
-
class vt extends
|
|
4315
|
+
class vt extends br {
|
|
4306
4316
|
type = "child";
|
|
4307
4317
|
getLatest() {
|
|
4308
4318
|
const e = this.origin.getLatest();
|
|
4309
|
-
return e === this.origin ? this :
|
|
4319
|
+
return e === this.origin ? this : De(e, this.direction);
|
|
4310
4320
|
}
|
|
4311
4321
|
getParentCaret(e = "root") {
|
|
4312
|
-
return q(
|
|
4322
|
+
return q(Mr(this.getParentAtCaret(), e), this.direction);
|
|
4313
4323
|
}
|
|
4314
4324
|
getFlipped() {
|
|
4315
4325
|
const e = ct(this.direction);
|
|
4316
|
-
return q(this.getNodeAtCaret(), e) ||
|
|
4326
|
+
return q(this.getNodeAtCaret(), e) || De(this.origin, e);
|
|
4317
4327
|
}
|
|
4318
4328
|
getParentAtCaret() {
|
|
4319
4329
|
return this.origin;
|
|
@@ -4332,10 +4342,10 @@ const ll = { root: ne, shadowRoot: Pe };
|
|
|
4332
4342
|
function ct(n) {
|
|
4333
4343
|
return ol[n];
|
|
4334
4344
|
}
|
|
4335
|
-
function
|
|
4345
|
+
function Mr(n, e = "root") {
|
|
4336
4346
|
return ll[e](n) ? null : n;
|
|
4337
4347
|
}
|
|
4338
|
-
class Ye extends
|
|
4348
|
+
class Ye extends br {
|
|
4339
4349
|
type = "sibling";
|
|
4340
4350
|
getLatest() {
|
|
4341
4351
|
const e = this.origin.getLatest();
|
|
@@ -4348,14 +4358,14 @@ class Ye extends Er {
|
|
|
4348
4358
|
return this.origin.getParent();
|
|
4349
4359
|
}
|
|
4350
4360
|
getChildCaret() {
|
|
4351
|
-
return N(this.origin) ?
|
|
4361
|
+
return N(this.origin) ? De(this.origin, this.direction) : null;
|
|
4352
4362
|
}
|
|
4353
4363
|
getParentCaret(e = "root") {
|
|
4354
|
-
return q(
|
|
4364
|
+
return q(Mr(this.getParentAtCaret(), e), this.direction);
|
|
4355
4365
|
}
|
|
4356
4366
|
getFlipped() {
|
|
4357
4367
|
const e = ct(this.direction);
|
|
4358
|
-
return q(this.getNodeAtCaret(), e) ||
|
|
4368
|
+
return q(this.getNodeAtCaret(), e) || De(this.origin.getParentOrThrow(), e);
|
|
4359
4369
|
}
|
|
4360
4370
|
isSamePointCaret(e) {
|
|
4361
4371
|
return e instanceof Ye && this.direction === e.direction && this.origin.is(e.origin);
|
|
@@ -4364,7 +4374,7 @@ class Ye extends Er {
|
|
|
4364
4374
|
return (e instanceof Ye || e instanceof Je) && this.direction === e.direction && this.origin.is(e.origin);
|
|
4365
4375
|
}
|
|
4366
4376
|
}
|
|
4367
|
-
class Je extends
|
|
4377
|
+
class Je extends br {
|
|
4368
4378
|
type = "text";
|
|
4369
4379
|
constructor(e, t) {
|
|
4370
4380
|
super(e), this.offset = t;
|
|
@@ -4380,7 +4390,7 @@ class Je extends Er {
|
|
|
4380
4390
|
return null;
|
|
4381
4391
|
}
|
|
4382
4392
|
getParentCaret(e = "root") {
|
|
4383
|
-
return q(
|
|
4393
|
+
return q(Mr(this.getParentAtCaret(), e), this.direction);
|
|
4384
4394
|
}
|
|
4385
4395
|
getFlipped() {
|
|
4386
4396
|
return He(this.origin, ct(this.direction), this.offset);
|
|
@@ -4472,23 +4482,23 @@ function Tn(n, e) {
|
|
|
4472
4482
|
function Ti(n, e) {
|
|
4473
4483
|
return new dl(n, e);
|
|
4474
4484
|
}
|
|
4475
|
-
function
|
|
4485
|
+
function De(n, e) {
|
|
4476
4486
|
return N(n) ? new ul[e](n) : null;
|
|
4477
4487
|
}
|
|
4478
4488
|
function fl(n) {
|
|
4479
4489
|
return n && n.getChildCaret() || n;
|
|
4480
4490
|
}
|
|
4481
|
-
function
|
|
4491
|
+
function Or(n) {
|
|
4482
4492
|
return n && fl(n.getAdjacentCaret());
|
|
4483
4493
|
}
|
|
4484
|
-
class
|
|
4494
|
+
class Ar {
|
|
4485
4495
|
type = "node-caret-range";
|
|
4486
4496
|
constructor(e, t, r) {
|
|
4487
4497
|
this.anchor = e, this.focus = t, this.direction = r;
|
|
4488
4498
|
}
|
|
4489
4499
|
getLatest() {
|
|
4490
4500
|
const e = this.anchor.getLatest(), t = this.focus.getLatest();
|
|
4491
|
-
return e === this.anchor && t === this.focus ? this : new
|
|
4501
|
+
return e === this.anchor && t === this.focus ? this : new Ar(e, t, this.direction);
|
|
4492
4502
|
}
|
|
4493
4503
|
isCollapsed() {
|
|
4494
4504
|
return this.anchor.isSamePointCaret(this.focus);
|
|
@@ -4508,7 +4518,7 @@ class Or {
|
|
|
4508
4518
|
return [t, r];
|
|
4509
4519
|
}
|
|
4510
4520
|
iterNodeCarets(e = "root") {
|
|
4511
|
-
const t = Be(this.anchor) ? this.anchor.getSiblingCaret() : this.anchor.getLatest(), r = this.focus.getLatest(), i = Be(r), s = (o) => o.isSameNodeCaret(r) ? null :
|
|
4521
|
+
const t = Be(this.anchor) ? this.anchor.getSiblingCaret() : this.anchor.getLatest(), r = this.focus.getLatest(), i = Be(r), s = (o) => o.isSameNodeCaret(r) ? null : Or(o) || o.getParentCaret(e);
|
|
4512
4522
|
return Es({ hasNext: (o) => o !== null && !(i && r.isSameNodeCaret(o)), initial: t.isSameNodeCaret(r) ? null : s(t), map: (o) => o, step: s });
|
|
4513
4523
|
}
|
|
4514
4524
|
[Symbol.iterator]() {
|
|
@@ -4543,7 +4553,7 @@ function hl(n) {
|
|
|
4543
4553
|
return Ge(n, n);
|
|
4544
4554
|
}
|
|
4545
4555
|
function Ge(n, e) {
|
|
4546
|
-
return n.direction !== e.direction && v(265), new
|
|
4556
|
+
return n.direction !== e.direction && v(265), new Ar(n, e, n.direction);
|
|
4547
4557
|
}
|
|
4548
4558
|
function Es(n) {
|
|
4549
4559
|
const { initial: e, hasNext: t, step: r, map: i } = n;
|
|
@@ -4617,13 +4627,13 @@ function ki(n) {
|
|
|
4617
4627
|
const { anchor: e, focus: t } = n, r = Ve(e, "next"), i = Ve(t, "next"), s = bs(r, i) <= 0 ? "next" : "previous";
|
|
4618
4628
|
return Ge(ot(r, s), ot(i, s));
|
|
4619
4629
|
}
|
|
4620
|
-
function
|
|
4630
|
+
function wr(n) {
|
|
4621
4631
|
const { direction: e, origin: t } = n, r = q(t, ct(e)).getNodeAtCaret();
|
|
4622
|
-
return r ? q(r, e) :
|
|
4632
|
+
return r ? q(r, e) : De(t.getParentOrThrow(), e);
|
|
4623
4633
|
}
|
|
4624
4634
|
function Ei(n, e = "root") {
|
|
4625
4635
|
const t = [n];
|
|
4626
|
-
for (let r = Se(n) ? n.getParentCaret(e) : n.getSiblingCaret(); r !== null; r = r.getParentCaret(e)) t.push(
|
|
4636
|
+
for (let r = Se(n) ? n.getParentCaret(e) : n.getSiblingCaret(); r !== null; r = r.getParentCaret(e)) t.push(wr(r));
|
|
4627
4637
|
return t;
|
|
4628
4638
|
}
|
|
4629
4639
|
function zn(n) {
|
|
@@ -4642,7 +4652,7 @@ function _l(n, e = "removeEmptySlices") {
|
|
|
4642
4652
|
for (const d of c) d.remove();
|
|
4643
4653
|
for (const d of s.getTextSlices()) {
|
|
4644
4654
|
if (!d) continue;
|
|
4645
|
-
const { origin: _ } = d.caret, p = _.getTextContentSize(), C =
|
|
4655
|
+
const { origin: _ } = d.caret, p = _.getTextContentSize(), C = wr(q(_, r)), y = _.getMode();
|
|
4646
4656
|
if (Math.abs(d.distance) === p && i === "removeEmptySlices" || y === "token" && d.distance !== 0) C.remove();
|
|
4647
4657
|
else if (d.distance !== 0) {
|
|
4648
4658
|
i = "removeEmptySlices";
|
|
@@ -4683,12 +4693,12 @@ function _l(n, e = "removeEmptySlices") {
|
|
|
4683
4693
|
!W && L(P) && (W = P);
|
|
4684
4694
|
}
|
|
4685
4695
|
return W;
|
|
4686
|
-
}, T = b(m,
|
|
4696
|
+
}, T = b(m, Me), S = T && b(k, ((A) => p.has(A.getKey()) && Me(A)));
|
|
4687
4697
|
return T && S ? [T, S] : null;
|
|
4688
4698
|
})(u, h, a);
|
|
4689
4699
|
if (f) {
|
|
4690
4700
|
const [d, _] = f;
|
|
4691
|
-
|
|
4701
|
+
De(d, "previous").splice(0, _.getChildren()), _.remove();
|
|
4692
4702
|
}
|
|
4693
4703
|
const g = [u, h, ...o, ...l].find(zn);
|
|
4694
4704
|
if (g)
|
|
@@ -4699,7 +4709,7 @@ function fe(n) {
|
|
|
4699
4709
|
const e = (function(i) {
|
|
4700
4710
|
let s = i;
|
|
4701
4711
|
for (; Se(s); ) {
|
|
4702
|
-
const o =
|
|
4712
|
+
const o = Or(s);
|
|
4703
4713
|
if (!Se(o)) break;
|
|
4704
4714
|
s = o;
|
|
4705
4715
|
}
|
|
@@ -4719,7 +4729,7 @@ function Os(n, e) {
|
|
|
4719
4729
|
return n.direction === e ? n : Ge(ot(n.focus, e), ot(n.anchor, e));
|
|
4720
4730
|
}
|
|
4721
4731
|
function yl(n, e, t) {
|
|
4722
|
-
let r =
|
|
4732
|
+
let r = De(n, "next");
|
|
4723
4733
|
for (let i = 0; i < e; i++) {
|
|
4724
4734
|
const s = r.getAdjacentCaret();
|
|
4725
4735
|
if (s === null) break;
|
|
@@ -4736,26 +4746,26 @@ export {
|
|
|
4736
4746
|
bs as $comparePointCaretNext,
|
|
4737
4747
|
Tt as $createLineBreakNode,
|
|
4738
4748
|
ls as $createNodeSelection,
|
|
4739
|
-
|
|
4749
|
+
Ae as $createParagraphNode,
|
|
4740
4750
|
de as $createPoint,
|
|
4741
4751
|
Po as $createRangeSelection,
|
|
4742
|
-
|
|
4752
|
+
gr as $createTabNode,
|
|
4743
4753
|
G as $createTextNode,
|
|
4744
4754
|
ks as $extendCaretToRange,
|
|
4745
|
-
|
|
4755
|
+
Or as $getAdjacentChildCaret,
|
|
4746
4756
|
Vo as $getAdjacentNode,
|
|
4747
4757
|
ot as $getCaretInDirection,
|
|
4748
4758
|
Ge as $getCaretRange,
|
|
4749
4759
|
Os as $getCaretRangeInDirection,
|
|
4750
|
-
|
|
4751
|
-
|
|
4760
|
+
Zr as $getCharacterOffsets,
|
|
4761
|
+
De as $getChildCaret,
|
|
4752
4762
|
yl as $getChildCaretAtIndex,
|
|
4753
4763
|
fl as $getChildCaretOrSelf,
|
|
4754
4764
|
hl as $getCollapsedCaretRange,
|
|
4755
4765
|
Ht as $getCommonAncestor,
|
|
4756
4766
|
Ms as $getCommonAncestorResultBranchOrder,
|
|
4757
|
-
|
|
4758
|
-
|
|
4767
|
+
Ul as $getEditor,
|
|
4768
|
+
Sr as $getNearestNodeFromDOMNode,
|
|
4759
4769
|
Xo as $getNearestRootOrShadowRoot,
|
|
4760
4770
|
J as $getNodeByKey,
|
|
4761
4771
|
Qo as $getNodeByKeyOrThrow,
|
|
@@ -4774,10 +4784,10 @@ export {
|
|
|
4774
4784
|
K as $isDecoratorNode,
|
|
4775
4785
|
N as $isElementNode,
|
|
4776
4786
|
pl as $isExtendableTextPointCaret,
|
|
4777
|
-
|
|
4787
|
+
Wl as $isInlineElementOrDecoratorNode,
|
|
4778
4788
|
Kl as $isLeafNode,
|
|
4779
4789
|
Ze as $isLineBreakNode,
|
|
4780
|
-
|
|
4790
|
+
_r as $isNodeSelection,
|
|
4781
4791
|
Pl as $isParagraphNode,
|
|
4782
4792
|
w as $isRangeSelection,
|
|
4783
4793
|
ne as $isRootNode,
|
|
@@ -4786,14 +4796,15 @@ export {
|
|
|
4786
4796
|
rs as $isTabNode,
|
|
4787
4797
|
O as $isTextNode,
|
|
4788
4798
|
Be as $isTextPointCaret,
|
|
4789
|
-
|
|
4799
|
+
be as $isTokenOrSegmented,
|
|
4790
4800
|
Re as $isTokenOrTab,
|
|
4801
|
+
zl as $nodesOfType,
|
|
4791
4802
|
fe as $normalizeCaret,
|
|
4792
4803
|
$n as $normalizeSelection__EXPERIMENTAL,
|
|
4793
4804
|
qo as $onUpdate,
|
|
4794
4805
|
Ol as $parseSerializedNode,
|
|
4795
4806
|
_l as $removeTextFromCaretRange,
|
|
4796
|
-
|
|
4807
|
+
wr as $rewindSiblingCaret,
|
|
4797
4808
|
Bl as $selectAll,
|
|
4798
4809
|
V as $setCompositionKey,
|
|
4799
4810
|
kt as $setPointFromCaret,
|
|
@@ -4831,11 +4842,11 @@ export {
|
|
|
4831
4842
|
wl as HISTORY_PUSH_TAG,
|
|
4832
4843
|
xl as INDENT_CONTENT_COMMAND,
|
|
4833
4844
|
Ut as INSERT_LINE_BREAK_COMMAND,
|
|
4834
|
-
|
|
4845
|
+
Wr as INSERT_PARAGRAPH_COMMAND,
|
|
4835
4846
|
Cl as INSERT_TAB_COMMAND,
|
|
4836
|
-
|
|
4847
|
+
Me as INTERNAL_$isBlock,
|
|
4837
4848
|
Bs as IS_ALL_FORMATTING,
|
|
4838
|
-
|
|
4849
|
+
ir as IS_HIGHLIGHT,
|
|
4839
4850
|
Xt as IS_STRIKETHROUGH,
|
|
4840
4851
|
Qt as IS_UNDERLINE,
|
|
4841
4852
|
uo as KEY_ARROW_DOWN_COMMAND,
|
|
@@ -4859,11 +4870,11 @@ export {
|
|
|
4859
4870
|
Dl as PASTE_TAG,
|
|
4860
4871
|
At as ParagraphNode,
|
|
4861
4872
|
Yi as REDO_COMMAND,
|
|
4862
|
-
|
|
4873
|
+
$r as REMOVE_TEXT_COMMAND,
|
|
4863
4874
|
Ot as RootNode,
|
|
4864
4875
|
Wi as SELECTION_CHANGE_COMMAND,
|
|
4865
4876
|
ml as SELECTION_INSERT_CLIPBOARD_NODES_COMMAND,
|
|
4866
|
-
|
|
4877
|
+
Ur as SELECT_ALL_COMMAND,
|
|
4867
4878
|
zo as SKIP_DOM_SELECTION_TAG,
|
|
4868
4879
|
Bo as SKIP_SCROLL_INTO_VIEW_TAG,
|
|
4869
4880
|
$e as TEXT_TYPE_TO_FORMAT,
|
|
@@ -4879,23 +4890,23 @@ export {
|
|
|
4879
4890
|
rt as getDOMTextNode,
|
|
4880
4891
|
Cn as getEditorPropertyFromDOMNode,
|
|
4881
4892
|
ps as getNearestEditorFromDOMNode,
|
|
4882
|
-
|
|
4893
|
+
Si as isBlockDomNode,
|
|
4883
4894
|
Mt as isCurrentlyReadOnlyMode,
|
|
4884
4895
|
Jo as isDOMDocumentNode,
|
|
4885
4896
|
Dt as isDOMNode,
|
|
4886
|
-
|
|
4897
|
+
ke as isDOMTextNode,
|
|
4887
4898
|
sl as isDOMUnmanaged,
|
|
4888
4899
|
el as isDocumentFragment,
|
|
4889
4900
|
F as isExactShortcutMatch,
|
|
4890
|
-
|
|
4901
|
+
$l as isHTMLAnchorElement,
|
|
4891
4902
|
ee as isHTMLElement,
|
|
4892
4903
|
tl as isInlineDomNode,
|
|
4893
|
-
|
|
4904
|
+
xr as isLexicalEditor,
|
|
4894
4905
|
Go as isModifierMatch,
|
|
4895
4906
|
_s as isSelectionCapturedInDecoratorInput,
|
|
4896
4907
|
mn as isSelectionWithinEditor,
|
|
4897
4908
|
Es as makeStepwiseIterator,
|
|
4898
4909
|
Ke as removeFromParent,
|
|
4899
|
-
|
|
4910
|
+
Yl as setDOMUnmanaged,
|
|
4900
4911
|
il as setNodeIndentFromDOM
|
|
4901
4912
|
};
|