@uva-glass/component-library 3.42.2 → 3.42.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Lexical.prod-C1B_JvcI.js → Lexical.prod-qYl_ifJ6.js} +221 -221
- package/dist/Lexical.prod-qYl_ifJ6.js.map +1 -0
- package/dist/{LexicalClipboard.prod-Dd64YQH0.js → LexicalClipboard.prod-DIGbXq4v.js} +25 -25
- package/dist/{LexicalClipboard.prod-Dd64YQH0.js.map → LexicalClipboard.prod-DIGbXq4v.js.map} +1 -1
- package/dist/{LexicalComposerContext.prod-DLlRM5wP.js → LexicalComposerContext.prod-DOyoZx0P.js} +3 -3
- package/dist/{LexicalComposerContext.prod-DLlRM5wP.js.map → LexicalComposerContext.prod-DOyoZx0P.js.map} +1 -1
- package/dist/{LexicalLink.prod-ldhpNY9X.js → LexicalLink.prod-ZZwC5ABn.js} +14 -14
- package/dist/{LexicalLink.prod-ldhpNY9X.js.map → LexicalLink.prod-ZZwC5ABn.js.map} +1 -1
- package/dist/{LexicalList.prod-7DmvPZ_J.js → LexicalList.prod-UurCu6DK.js} +30 -30
- package/dist/{LexicalList.prod-7DmvPZ_J.js.map → LexicalList.prod-UurCu6DK.js.map} +1 -1
- package/dist/{LexicalSelection.prod-Dmiwka3x.js → LexicalSelection.prod-DXruZeFN.js} +2 -2
- package/dist/{LexicalSelection.prod-Dmiwka3x.js.map → LexicalSelection.prod-DXruZeFN.js.map} +1 -1
- package/dist/{LexicalTable.prod-iqHmKv_G.js → LexicalTable.prod-COFf1Spn.js} +115 -115
- package/dist/{LexicalTable.prod-iqHmKv_G.js.map → LexicalTable.prod-COFf1Spn.js.map} +1 -1
- package/dist/{LexicalUtils.prod-w0fZ_Z8S.js → LexicalUtils.prod-C3To3vrm.js} +5 -5
- package/dist/{LexicalUtils.prod-w0fZ_Z8S.js.map → LexicalUtils.prod-C3To3vrm.js.map} +1 -1
- package/dist/SortableProvider-l8-7ClBJ.js.map +1 -1
- package/dist/TableCellResizerPlugin-B9MT1fxA.js +248 -0
- package/dist/TableCellResizerPlugin-B9MT1fxA.js.map +1 -0
- package/dist/{TablePlugin-cMMBdz-x.js → TablePlugin-FQQwnq2m.js} +7 -7
- package/dist/{TablePlugin-cMMBdz-x.js.map → TablePlugin-FQQwnq2m.js.map} +1 -1
- package/dist/{client-BIzWgcD3.js → client-BK9NlSVR.js} +13 -13
- package/dist/{client-BIzWgcD3.js.map → client-BK9NlSVR.js.map} +1 -1
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/Accordion/Accordion.test.js +3 -3
- package/dist/components/Accordion/Accordion.test.js.map +1 -1
- package/dist/components/AccordionCard/AccordionCard.js.map +1 -1
- package/dist/components/AccordionCard/AccordionCard.test.js +3 -3
- package/dist/components/AccordionCard/AccordionCard.test.js.map +1 -1
- package/dist/components/ActionList/ActionList.js.map +1 -1
- package/dist/components/ActionList/ActionList.test.js +3 -3
- package/dist/components/ActionList/ActionList.test.js.map +1 -1
- package/dist/components/AppStatusBar/AppStatusBar.test.js +2 -2
- package/dist/components/AppStatusBar/AppStatusBar.test.js.map +1 -1
- package/dist/components/Attention/Attention.test.js +2 -2
- package/dist/components/Attention/Attention.test.js.map +1 -1
- package/dist/components/Backdrop/Backdrop.test.js +2 -2
- package/dist/components/Backdrop/Backdrop.test.js.map +1 -1
- package/dist/components/Buttons/Button.stories.js +1 -1
- package/dist/components/Buttons/Button.test.js +2 -2
- package/dist/components/Buttons/Button.test.js.map +1 -1
- package/dist/components/Buttons/LinkButton.stories.js +1 -1
- package/dist/components/Buttons/LinkButton.test.js +2 -2
- package/dist/components/Buttons/LinkButton.test.js.map +1 -1
- package/dist/components/Buttons/MenuButton.stories.js +1 -1
- package/dist/components/Buttons/MenuButton.test.js +2 -2
- package/dist/components/Buttons/MenuButton.test.js.map +1 -1
- package/dist/components/Card/Card.test.js +2 -2
- package/dist/components/Card/Card.test.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.stories.js +1 -1
- package/dist/components/Checkbox/Checkbox.test.js +3 -3
- package/dist/components/Checkbox/Checkbox.test.js.map +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js.map +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js +2 -2
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.test.js.map +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.js +2 -2
- package/dist/components/CheckboxTree/CheckboxTree.js.map +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +2 -2
- package/dist/components/CheckboxTree/CheckboxTree.stories.js.map +1 -1
- package/dist/components/Chip/Chip.stories.js +1 -1
- package/dist/components/ControlsButton/ControlsButton.stories.js +1 -1
- package/dist/components/Drawer/Drawer.js.map +1 -1
- package/dist/components/Drawer/Drawer.stories.js +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.js.map +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.test.js +2 -2
- package/dist/components/FeedbackBar/FeedbackBar.test.js.map +1 -1
- package/dist/components/FormInput/FormInput.js +2 -2
- package/dist/components/FormInput/FormInput.js.map +1 -1
- package/dist/components/FormInput/FormInput.stories.js +1 -1
- package/dist/components/IconButton/IconButton.stories.js +1 -1
- package/dist/components/InputField/InputField.js.map +1 -1
- package/dist/components/InputField/InputField.stories.js +3 -3
- package/dist/components/InputField/InputField.stories.js.map +1 -1
- package/dist/components/Label/Label.test.js +2 -2
- package/dist/components/Label/Label.test.js.map +1 -1
- package/dist/components/MenuLink/MenuLink.js.map +1 -1
- package/dist/components/ModalDialog/ModalDialog.js.map +1 -1
- package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
- package/dist/components/MultiSelect/MultiSelect.stories.js.map +1 -1
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +2 -2
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.js.map +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.stories.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.test.js +2 -2
- package/dist/components/MultiSelectBox/MultiSelectBox.test.js.map +1 -1
- package/dist/components/Notification/Notification.js.map +1 -1
- package/dist/components/Notification/Notification.stories.js +1 -1
- package/dist/components/Notification/Notification.test.js +2 -2
- package/dist/components/Notification/Notification.test.js.map +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
- package/dist/components/OverlayStepBar/OverlayStepBar.js.map +1 -1
- package/dist/components/OverlayStepBar/OverlayStepBar.stories.js.map +1 -1
- package/dist/components/PageOverlay/PageOverlay.js.map +1 -1
- package/dist/components/PageOverlay/PageOverlay.stories.js.map +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +2 -2
- package/dist/components/PeriodSelector/PeriodSelector.js.map +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
- package/dist/components/Periods/Periods.js.map +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.js.map +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +2 -2
- package/dist/components/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.stories.js +1 -1
- package/dist/components/RadioGroup/Radiogroup.test.js +2 -2
- package/dist/components/RadioGroup/Radiogroup.test.js.map +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.js +2 -2
- package/dist/components/RadioTabSelector/RadioTabSelector.js.map +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.stories.js +1 -1
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +2 -2
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +2 -2
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +3 -3
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +6 -6
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +5 -5
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +7 -6
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +2 -2
- package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +6 -6
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.d.ts +2 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +39 -29
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +5 -5
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/index.js +2 -2
- package/dist/components/RteEditor/Providers/LanguageProvider.js.map +1 -1
- package/dist/components/RteEditor/RteEditor.js +149 -149
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +13 -14
- package/dist/components/RteEditor/helpers.js.map +1 -1
- package/dist/components/RteEditor/hooks/useFlyout.js.map +1 -1
- package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +4 -4
- package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js.map +1 -1
- package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
- package/dist/components/SelectListbox/SelectProvider.js.map +1 -1
- package/dist/components/SelectListbox/components/SelectButton.js.map +1 -1
- package/dist/components/SelectListbox/components/SelectContainer.js.map +1 -1
- package/dist/components/SelectListbox/components/SelectOption.js.map +1 -1
- package/dist/components/Sortable/Sortable.stories.js +1 -1
- package/dist/components/Sortable/components/SortableItem.js.map +1 -1
- package/dist/components/Sortable/sortableReducer.js.map +1 -1
- package/dist/components/Spinner/Spinner.js.map +1 -1
- package/dist/components/StatusBadge/StatusBadge.test.js +2 -2
- package/dist/components/StatusBadge/StatusBadge.test.js.map +1 -1
- package/dist/components/TextArea/TextArea.js.map +1 -1
- package/dist/components/TextArea/TextArea.stories.js +1 -1
- package/dist/components/TextArea/TextArea.test.js +3 -3
- package/dist/components/TextArea/TextArea.test.js.map +1 -1
- package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +1 -1
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/VarIndicator/VarIndicator.stories.js +1 -1
- package/dist/components/VarIndicator/VarIndicator.test.js +3 -3
- package/dist/components/VarIndicator/VarIndicator.test.js.map +1 -1
- package/dist/components/hooks/useDebounce.js +2 -2
- package/dist/components/hooks/useDebounce.js.map +1 -1
- package/dist/components/hooks/useOnClickOutside.js.map +1 -1
- package/dist/components/hooks/usePositionedFloaters.js.map +1 -1
- package/dist/components/hooks/useResponsive.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{helpers-BO6Gg9y6.js → helpers-D3SODeVc.js} +19 -19
- package/dist/{helpers-BO6Gg9y6.js.map → helpers-D3SODeVc.js.map} +1 -1
- package/dist/{index-BwBhYsdx.js → index-B32mP_-H.js} +2219 -2342
- package/dist/index-B32mP_-H.js.map +1 -0
- package/dist/{index-B7xrLR5N.js → index-BVrrnUn0.js} +16 -16
- package/dist/{index-B7xrLR5N.js.map → index-BVrrnUn0.js.map} +1 -1
- package/dist/{index-BYGu3RV5.js → index-BamlKH-k.js} +43 -43
- package/dist/{index-BYGu3RV5.js.map → index-BamlKH-k.js.map} +1 -1
- package/dist/{index-BeAF9HWV.js → index-iImjiPdB.js} +16 -16
- package/dist/{index-BeAF9HWV.js.map → index-iImjiPdB.js.map} +1 -1
- package/dist/{index-nrPtQ1dv.js → index-yEhaxKq-.js} +3 -3
- package/dist/{index-nrPtQ1dv.js.map → index-yEhaxKq-.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/{react-18-CbXtwYTX.js → react-18-DXfB7ZX7.js} +2 -2
- package/dist/{react-18-CbXtwYTX.js.map → react-18-DXfB7ZX7.js.map} +1 -1
- package/dist/{react.esm-CJKnSGEF.js → react.esm-WLX_DeH0.js} +19 -19
- package/dist/react.esm-WLX_DeH0.js.map +1 -0
- package/dist/setupTests.js +1 -1
- package/dist/setupTests.js.map +1 -1
- package/dist/storyComponents/ClipboardButton/ClipboardButton.js.map +1 -1
- package/dist/storybook__react.d.js +13 -13
- package/dist/storybook__react.d.js.map +1 -1
- package/dist/{test-utils-ea_YDVtd.js → test-utils-BP59mSnn.js} +3 -3
- package/dist/{test-utils-ea_YDVtd.js.map → test-utils-BP59mSnn.js.map} +1 -1
- package/package.json +1 -1
- package/dist/Lexical.prod-C1B_JvcI.js.map +0 -1
- package/dist/TableCellResizerPlugin-Bao8R6Lv.js +0 -241
- package/dist/TableCellResizerPlugin-Bao8R6Lv.js.map +0 -1
- package/dist/index-BwBhYsdx.js.map +0 -1
- package/dist/react.esm-CJKnSGEF.js.map +0 -1
|
@@ -56,13 +56,13 @@ function Ri(n, e, t) {
|
|
|
56
56
|
$n = !0;
|
|
57
57
|
const r = performance.now() - gr > oo;
|
|
58
58
|
try {
|
|
59
|
-
te(n, () => {
|
|
60
|
-
const i = L() || function(f) {
|
|
61
|
-
return f.getEditorState().read(() => {
|
|
59
|
+
te(n, (() => {
|
|
60
|
+
const i = L() || (function(f) {
|
|
61
|
+
return f.getEditorState().read((() => {
|
|
62
62
|
const g = L();
|
|
63
63
|
return g !== null ? g.clone() : null;
|
|
64
|
-
});
|
|
65
|
-
}(n), s = /* @__PURE__ */ new Map(), o = n.getRootElement(), l = n._editorState, a = n._blockCursorElement;
|
|
64
|
+
}));
|
|
65
|
+
})(n), s = /* @__PURE__ */ new Map(), o = n.getRootElement(), l = n._editorState, a = n._blockCursorElement;
|
|
66
66
|
let c = !1, u = "";
|
|
67
67
|
for (let f = 0; f < e.length; f++) {
|
|
68
68
|
const g = e[f], h = g.type, _ = g.target, p = uo(_, n, l, o);
|
|
@@ -106,7 +106,7 @@ function Ri(n, e, t) {
|
|
|
106
106
|
t.takeRecords();
|
|
107
107
|
}
|
|
108
108
|
i !== null && (c && ie(i), We && Is(n) && i.insertRawText(u));
|
|
109
|
-
});
|
|
109
|
+
}));
|
|
110
110
|
} finally {
|
|
111
111
|
$n = !1;
|
|
112
112
|
}
|
|
@@ -118,9 +118,9 @@ function Wi(n) {
|
|
|
118
118
|
function Ji(n) {
|
|
119
119
|
(function(e) {
|
|
120
120
|
gr === 0 && oe(e).addEventListener("textInput", lo, !0);
|
|
121
|
-
})(n), n._observer = new MutationObserver((e, t) => {
|
|
121
|
+
})(n), n._observer = new MutationObserver(((e, t) => {
|
|
122
122
|
Ri(n, e, t);
|
|
123
|
-
});
|
|
123
|
+
}));
|
|
124
124
|
}
|
|
125
125
|
function fo(n) {
|
|
126
126
|
const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set();
|
|
@@ -136,14 +136,14 @@ function fo(n) {
|
|
|
136
136
|
class _r {
|
|
137
137
|
constructor(e, t, r = void 0, i = /* @__PURE__ */ new Map(), s = void 0) {
|
|
138
138
|
this.node = e, this.sharedNodeState = t, this.unknownState = r, this.knownState = i;
|
|
139
|
-
const { sharedConfigMap: o } = this.sharedNodeState, l = s !== void 0 ? s : function(a, c, u) {
|
|
139
|
+
const { sharedConfigMap: o } = this.sharedNodeState, l = s !== void 0 ? s : (function(a, c, u) {
|
|
140
140
|
let d = u.size;
|
|
141
141
|
if (c) for (const f in c) {
|
|
142
142
|
const g = a.get(f);
|
|
143
143
|
g && u.has(g) || d++;
|
|
144
144
|
}
|
|
145
145
|
return d;
|
|
146
|
-
}(o, r, i);
|
|
146
|
+
})(o, r, i);
|
|
147
147
|
this.size = l;
|
|
148
148
|
}
|
|
149
149
|
getValue(e) {
|
|
@@ -169,14 +169,14 @@ class _r {
|
|
|
169
169
|
getWritable(e) {
|
|
170
170
|
if (this.node === e) return this;
|
|
171
171
|
const { sharedNodeState: t, unknownState: r } = this, i = new Map(this.knownState);
|
|
172
|
-
return new _r(e, t, function(s, o, l) {
|
|
172
|
+
return new _r(e, t, (function(s, o, l) {
|
|
173
173
|
let a;
|
|
174
174
|
if (l) for (const [c, u] of Object.entries(l)) {
|
|
175
175
|
const d = s.get(c);
|
|
176
176
|
d ? o.has(d) || o.set(d, d.parse(u)) : (a = a || {}, a[c] = u);
|
|
177
177
|
}
|
|
178
178
|
return a;
|
|
179
|
-
}(t.sharedConfigMap, i, r), i, this.size);
|
|
179
|
+
})(t.sharedConfigMap, i, r), i, this.size);
|
|
180
180
|
}
|
|
181
181
|
updateFromKnown(e, t) {
|
|
182
182
|
const r = e.key;
|
|
@@ -228,12 +228,12 @@ function Jr(n, e) {
|
|
|
228
228
|
}
|
|
229
229
|
function jr(n, e) {
|
|
230
230
|
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;
|
|
231
|
-
return (t === null || t === s) && (r === null || r === o) && (i === null || i === l) && (n.__state === null || a === c || function(u, d) {
|
|
231
|
+
return (t === null || t === s) && (r === null || r === o) && (i === null || i === l) && (n.__state === null || a === c || (function(u, d) {
|
|
232
232
|
if (u === d) return !0;
|
|
233
233
|
if (u && d && u.size !== d.size) return !1;
|
|
234
234
|
const f = /* @__PURE__ */ new Set();
|
|
235
235
|
return !(u && Rr(f, u, d) || d && Rr(f, d, u) || u && Wr(f, u, d) || d && Wr(f, d, u));
|
|
236
|
-
}(a, c));
|
|
236
|
+
})(a, c));
|
|
237
237
|
}
|
|
238
238
|
function $r(n, e) {
|
|
239
239
|
const t = n.mergeWithSibling(e), r = R()._normalizedNodes;
|
|
@@ -320,13 +320,13 @@ function sn(n, e) {
|
|
|
320
320
|
const t = le.get(n);
|
|
321
321
|
t === void 0 && T(60);
|
|
322
322
|
const r = t.createDOM(De, Q);
|
|
323
|
-
if (function(i, s, o) {
|
|
323
|
+
if ((function(i, s, o) {
|
|
324
324
|
const l = o._keyToDOMMap;
|
|
325
325
|
(function(a, c, u) {
|
|
326
326
|
const d = `__lexicalKey_${c._key}`;
|
|
327
327
|
a[d] = u;
|
|
328
328
|
})(s, o, i), l.set(i, s);
|
|
329
|
-
}(n, r, Q), M(t) ? r.setAttribute("data-lexical-text", "true") : z(t) && r.setAttribute("data-lexical-decorator", "true"), v(t)) {
|
|
329
|
+
})(n, r, Q), M(t) ? r.setAttribute("data-lexical-text", "true") : z(t) && r.setAttribute("data-lexical-decorator", "true"), v(t)) {
|
|
330
330
|
const i = t.__indent, s = t.__size;
|
|
331
331
|
if (i !== 0 && Ui(r, i), s !== 0) {
|
|
332
332
|
const l = s - 1;
|
|
@@ -376,9 +376,9 @@ function Yi(n, e, t) {
|
|
|
376
376
|
function Hi(n, e) {
|
|
377
377
|
const t = e.__lexicalDirTextContent || "", r = e.__lexicalDir || "";
|
|
378
378
|
if (t !== X || r !== Vt) {
|
|
379
|
-
const i = X === "", s = i ? Vt : function(o) {
|
|
379
|
+
const i = X === "", s = i ? Vt : (function(o) {
|
|
380
380
|
return eo.test(o) ? "rtl" : to.test(o) ? "ltr" : null;
|
|
381
|
-
}(X);
|
|
381
|
+
})(X);
|
|
382
382
|
if (s !== r) {
|
|
383
383
|
const o = e.classList, l = De.theme;
|
|
384
384
|
let a = r !== null ? l[r] : void 0, c = s !== null ? l[s] : void 0;
|
|
@@ -408,7 +408,7 @@ function Hi(n, e) {
|
|
|
408
408
|
function _o(n, e, t) {
|
|
409
409
|
const r = X;
|
|
410
410
|
var i;
|
|
411
|
-
X = "", ce = null, ue = "", function(s, o, l) {
|
|
411
|
+
X = "", ce = null, ue = "", (function(s, o, l) {
|
|
412
412
|
const a = J, c = s.__size, u = o.__size;
|
|
413
413
|
J = "";
|
|
414
414
|
const d = l.element;
|
|
@@ -464,9 +464,9 @@ function _o(n, e, t) {
|
|
|
464
464
|
})(o, f, g, c, u, l);
|
|
465
465
|
}
|
|
466
466
|
Nn(o) && (J += ke), d.__lexicalTextContent = J, J = a + J;
|
|
467
|
-
}(n, e, e.getDOMSlot(t)), Hi(e, t), i = e, ce == null || ce === i.__textFormat || Nt || i.setTextFormat(ce), function(s) {
|
|
467
|
+
})(n, e, e.getDOMSlot(t)), Hi(e, t), i = e, ce == null || ce === i.__textFormat || Nt || i.setTextFormat(ce), (function(s) {
|
|
468
468
|
ue === "" || ue === s.__textStyle || Nt || s.setTextStyle(ue);
|
|
469
|
-
}(e), X = r;
|
|
469
|
+
})(e), X = r;
|
|
470
470
|
}
|
|
471
471
|
function on(n, e) {
|
|
472
472
|
const t = [];
|
|
@@ -544,87 +544,87 @@ function D(n) {
|
|
|
544
544
|
}
|
|
545
545
|
const Gi = D("SELECTION_CHANGE_COMMAND"), Pl = D("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"), yo = D("CLICK_COMMAND"), ln = D("DELETE_CHARACTER_COMMAND"), Yt = D("INSERT_LINE_BREAK_COMMAND"), Hr = D("INSERT_PARAGRAPH_COMMAND"), yt = D("CONTROLLED_TEXT_INSERTION_COMMAND"), Xi = D("PASTE_COMMAND"), qr = D("REMOVE_TEXT_COMMAND"), an = D("DELETE_WORD_COMMAND"), cn = D("DELETE_LINE_COMMAND"), ze = D("FORMAT_TEXT_COMMAND"), Qi = D("UNDO_COMMAND"), Zi = D("REDO_COMMAND"), mo = D("KEYDOWN_COMMAND"), xo = D("KEY_ARROW_RIGHT_COMMAND"), Co = D("MOVE_TO_END"), So = D("KEY_ARROW_LEFT_COMMAND"), vo = D("MOVE_TO_START"), ko = D("KEY_ARROW_UP_COMMAND"), To = D("KEY_ARROW_DOWN_COMMAND"), Qn = D("KEY_ENTER_COMMAND"), No = D("KEY_SPACE_COMMAND"), bo = D("KEY_BACKSPACE_COMMAND"), wo = D("KEY_ESCAPE_COMMAND"), Eo = D("KEY_DELETE_COMMAND"), Mo = D("KEY_TAB_COMMAND"), Fl = D("INSERT_TAB_COMMAND"), Ll = D("INDENT_CONTENT_COMMAND"), Il = D("OUTDENT_CONTENT_COMMAND"), Oo = D("DROP_COMMAND"), Kl = D("FORMAT_ELEMENT_COMMAND"), Ao = D("DRAGSTART_COMMAND"), Do = D("DRAGOVER_COMMAND"), Po = D("DRAGEND_COMMAND"), es = D("COPY_COMMAND"), ts = D("CUT_COMMAND"), Gr = D("SELECT_ALL_COMMAND"), zl = D("CLEAR_EDITOR_COMMAND"), Bl = D("CLEAR_HISTORY_COMMAND"), Rl = D("CAN_REDO_COMMAND"), Wl = D("CAN_UNDO_COMMAND"), Fo = D("FOCUS_COMMAND"), Lo = D("BLUR_COMMAND"), Io = D("KEY_MODIFIER_COMMAND"), me = Object.freeze({}), Zn = 30, er = [["keydown", function(n, e) {
|
|
546
546
|
if (mt = n.timeStamp, ns = n.key, !e.isComposing() && !E(e, mo, n) && n.key != null) {
|
|
547
|
-
if (Dn && Ni(n)) return te(e, () => {
|
|
547
|
+
if (Dn && Ni(n)) return te(e, (() => {
|
|
548
548
|
Wt(e, Pn);
|
|
549
|
-
}), Dn = !1, void (Pn = "");
|
|
550
|
-
if (function(t) {
|
|
549
|
+
})), Dn = !1, void (Pn = "");
|
|
550
|
+
if ((function(t) {
|
|
551
551
|
return I(t, "ArrowRight", { shiftKey: "any" });
|
|
552
|
-
}(n)) E(e, xo, n);
|
|
553
|
-
else if (function(t) {
|
|
552
|
+
})(n)) E(e, xo, n);
|
|
553
|
+
else if ((function(t) {
|
|
554
554
|
return I(t, "ArrowRight", Ce);
|
|
555
|
-
}(n)) E(e, Co, n);
|
|
556
|
-
else if (function(t) {
|
|
555
|
+
})(n)) E(e, Co, n);
|
|
556
|
+
else if ((function(t) {
|
|
557
557
|
return I(t, "ArrowLeft", { shiftKey: "any" });
|
|
558
|
-
}(n)) E(e, So, n);
|
|
559
|
-
else if (function(t) {
|
|
558
|
+
})(n)) E(e, So, n);
|
|
559
|
+
else if ((function(t) {
|
|
560
560
|
return I(t, "ArrowLeft", Ce);
|
|
561
|
-
}(n)) E(e, vo, n);
|
|
562
|
-
else if (function(t) {
|
|
561
|
+
})(n)) E(e, vo, n);
|
|
562
|
+
else if ((function(t) {
|
|
563
563
|
return I(t, "ArrowUp", { altKey: "any", shiftKey: "any" });
|
|
564
|
-
}(n)) E(e, ko, n);
|
|
565
|
-
else if (function(t) {
|
|
564
|
+
})(n)) E(e, ko, n);
|
|
565
|
+
else if ((function(t) {
|
|
566
566
|
return I(t, "ArrowDown", { altKey: "any", shiftKey: "any" });
|
|
567
|
-
}(n)) E(e, To, n);
|
|
568
|
-
else if (function(t) {
|
|
567
|
+
})(n)) E(e, To, n);
|
|
568
|
+
else if ((function(t) {
|
|
569
569
|
return I(t, "Enter", { altKey: "any", ctrlKey: "any", metaKey: "any", shiftKey: !0 });
|
|
570
|
-
}(n)) xt = !0, E(e, Qn, n);
|
|
571
|
-
else if (function(t) {
|
|
570
|
+
})(n)) xt = !0, E(e, Qn, n);
|
|
571
|
+
else if ((function(t) {
|
|
572
572
|
return t.key === " ";
|
|
573
|
-
}(n)) E(e, No, n);
|
|
574
|
-
else if (function(t) {
|
|
573
|
+
})(n)) E(e, No, n);
|
|
574
|
+
else if ((function(t) {
|
|
575
575
|
return fe && I(t, "o", { ctrlKey: !0 });
|
|
576
|
-
}(n)) n.preventDefault(), xt = !0, E(e, Yt, !0);
|
|
577
|
-
else if (function(t) {
|
|
576
|
+
})(n)) n.preventDefault(), xt = !0, E(e, Yt, !0);
|
|
577
|
+
else if ((function(t) {
|
|
578
578
|
return I(t, "Enter", { altKey: "any", ctrlKey: "any", metaKey: "any" });
|
|
579
|
-
}(n)) xt = !1, E(e, Qn, n);
|
|
580
|
-
else if (function(t) {
|
|
579
|
+
})(n)) xt = !1, E(e, Qn, n);
|
|
580
|
+
else if ((function(t) {
|
|
581
581
|
return I(t, "Backspace", { shiftKey: "any" }) || fe && I(t, "h", { ctrlKey: !0 });
|
|
582
|
-
}(n)) Ni(n) ? E(e, bo, n) : (n.preventDefault(), E(e, ln, !0));
|
|
583
|
-
else if (function(t) {
|
|
582
|
+
})(n)) Ni(n) ? E(e, bo, n) : (n.preventDefault(), E(e, ln, !0));
|
|
583
|
+
else if ((function(t) {
|
|
584
584
|
return t.key === "Escape";
|
|
585
|
-
}(n)) E(e, wo, n);
|
|
586
|
-
else if (function(t) {
|
|
585
|
+
})(n)) E(e, wo, n);
|
|
586
|
+
else if ((function(t) {
|
|
587
587
|
return I(t, "Delete", {}) || fe && I(t, "d", { ctrlKey: !0 });
|
|
588
|
-
}(n)) (function(t) {
|
|
588
|
+
})(n)) (function(t) {
|
|
589
589
|
return t.key === "Delete";
|
|
590
590
|
})(n) ? E(e, Eo, n) : (n.preventDefault(), E(e, ln, !1));
|
|
591
|
-
else if (function(t) {
|
|
591
|
+
else if ((function(t) {
|
|
592
592
|
return I(t, "Backspace", Ti);
|
|
593
|
-
}(n)) n.preventDefault(), E(e, an, !0);
|
|
594
|
-
else if (function(t) {
|
|
593
|
+
})(n)) n.preventDefault(), E(e, an, !0);
|
|
594
|
+
else if ((function(t) {
|
|
595
595
|
return I(t, "Delete", Ti);
|
|
596
|
-
}(n)) n.preventDefault(), E(e, an, !1);
|
|
597
|
-
else if (function(t) {
|
|
596
|
+
})(n)) n.preventDefault(), E(e, an, !1);
|
|
597
|
+
else if ((function(t) {
|
|
598
598
|
return fe && I(t, "Backspace", { metaKey: !0 });
|
|
599
|
-
}(n)) n.preventDefault(), E(e, cn, !0);
|
|
600
|
-
else if (function(t) {
|
|
599
|
+
})(n)) n.preventDefault(), E(e, cn, !0);
|
|
600
|
+
else if ((function(t) {
|
|
601
601
|
return fe && (I(t, "Delete", { metaKey: !0 }) || I(t, "k", { ctrlKey: !0 }));
|
|
602
|
-
}(n)) n.preventDefault(), E(e, cn, !1);
|
|
603
|
-
else if (function(t) {
|
|
602
|
+
})(n)) n.preventDefault(), E(e, cn, !1);
|
|
603
|
+
else if ((function(t) {
|
|
604
604
|
return I(t, "b", Ce);
|
|
605
|
-
}(n)) n.preventDefault(), E(e, ze, "bold");
|
|
606
|
-
else if (function(t) {
|
|
605
|
+
})(n)) n.preventDefault(), E(e, ze, "bold");
|
|
606
|
+
else if ((function(t) {
|
|
607
607
|
return I(t, "u", Ce);
|
|
608
|
-
}(n)) n.preventDefault(), E(e, ze, "underline");
|
|
609
|
-
else if (function(t) {
|
|
608
|
+
})(n)) n.preventDefault(), E(e, ze, "underline");
|
|
609
|
+
else if ((function(t) {
|
|
610
610
|
return I(t, "i", Ce);
|
|
611
|
-
}(n)) n.preventDefault(), E(e, ze, "italic");
|
|
612
|
-
else if (function(t) {
|
|
611
|
+
})(n)) n.preventDefault(), E(e, ze, "italic");
|
|
612
|
+
else if ((function(t) {
|
|
613
613
|
return I(t, "Tab", { shiftKey: "any" });
|
|
614
|
-
}(n)) E(e, Mo, n);
|
|
615
|
-
else if (function(t) {
|
|
614
|
+
})(n)) E(e, Mo, n);
|
|
615
|
+
else if ((function(t) {
|
|
616
616
|
return I(t, "z", Ce);
|
|
617
|
-
}(n)) n.preventDefault(), E(e, Qi, void 0);
|
|
618
|
-
else if (function(t) {
|
|
617
|
+
})(n)) n.preventDefault(), E(e, Qi, void 0);
|
|
618
|
+
else if ((function(t) {
|
|
619
619
|
return fe ? I(t, "z", { metaKey: !0, shiftKey: !0 }) : I(t, "y", { ctrlKey: !0 }) || I(t, "z", { ctrlKey: !0, shiftKey: !0 });
|
|
620
|
-
}(n)) n.preventDefault(), E(e, Zi, void 0);
|
|
620
|
+
})(n)) n.preventDefault(), E(e, Zi, void 0);
|
|
621
621
|
else {
|
|
622
622
|
const t = e._editorState._selection;
|
|
623
|
-
t === null || A(t) ? bi(n) && (n.preventDefault(), E(e, Gr, n)) : function(r) {
|
|
623
|
+
t === null || A(t) ? bi(n) && (n.preventDefault(), E(e, Gr, n)) : (function(r) {
|
|
624
624
|
return I(r, "c", Ce);
|
|
625
|
-
}(n) ? (n.preventDefault(), E(e, es, n)) : function(r) {
|
|
625
|
+
})(n) ? (n.preventDefault(), E(e, es, n)) : (function(r) {
|
|
626
626
|
return I(r, "x", Ce);
|
|
627
|
-
}(n) ? (n.preventDefault(), E(e, ts, n)) : bi(n) && (n.preventDefault(), E(e, Gr, n));
|
|
627
|
+
})(n) ? (n.preventDefault(), E(e, ts, n)) : bi(n) && (n.preventDefault(), E(e, Gr, n));
|
|
628
628
|
}
|
|
629
629
|
(function(t) {
|
|
630
630
|
return t.ctrlKey || t.shiftKey || t.altKey || t.metaKey;
|
|
@@ -632,23 +632,23 @@ const Gi = D("SELECTION_CHANGE_COMMAND"), Pl = D("SELECTION_INSERT_CLIPBOARD_NOD
|
|
|
632
632
|
}
|
|
633
633
|
}], ["pointerdown", function(n, e) {
|
|
634
634
|
const t = n.target, r = n.pointerType;
|
|
635
|
-
It(t) && r !== "touch" && r !== "pen" && n.button === 0 && te(e, () => {
|
|
635
|
+
It(t) && r !== "touch" && r !== "pen" && n.button === 0 && te(e, (() => {
|
|
636
636
|
Si(t) || (nr = !0);
|
|
637
|
-
});
|
|
637
|
+
}));
|
|
638
638
|
}], ["compositionstart", function(n, e) {
|
|
639
|
-
te(e, () => {
|
|
639
|
+
te(e, (() => {
|
|
640
640
|
const t = L();
|
|
641
641
|
if (A(t) && !e.isComposing()) {
|
|
642
642
|
const r = t.anchor, i = t.anchor.getNode();
|
|
643
643
|
Y(r.key), (n.timeStamp < mt + Zn || r.type === "element" || !t.isCollapsed() || i.getFormat() !== t.format || M(i) && i.getStyle() !== t.style) && E(e, yt, Zs);
|
|
644
644
|
}
|
|
645
|
-
});
|
|
645
|
+
}));
|
|
646
646
|
}], ["compositionend", function(n, e) {
|
|
647
|
-
We ? gt = !0 : it || !vt && !Zt ? te(e, () => {
|
|
647
|
+
We ? gt = !0 : it || !vt && !Zt ? te(e, (() => {
|
|
648
648
|
Wt(e, n.data);
|
|
649
|
-
}) : (Dn = !0, Pn = n.data);
|
|
649
|
+
})) : (Dn = !0, Pn = n.data);
|
|
650
650
|
}], ["input", function(n, e) {
|
|
651
|
-
n.stopPropagation(), te(e, () => {
|
|
651
|
+
n.stopPropagation(), te(e, (() => {
|
|
652
652
|
if (ee(n.target) && Si(n.target)) return;
|
|
653
653
|
const t = L(), r = n.data, i = ls(n);
|
|
654
654
|
if (r != null && A(t) && ss(t, i, r, n.timeStamp, !1)) {
|
|
@@ -666,23 +666,23 @@ const Gi = D("SELECTION_CHANGE_COMMAND"), Pl = D("SELECTION_INSERT_CLIPBOARD_NOD
|
|
|
666
666
|
const s = R();
|
|
667
667
|
Wi(s);
|
|
668
668
|
})();
|
|
669
|
-
}, { event: n }), Ze = null;
|
|
669
|
+
}), { event: n }), Ze = null;
|
|
670
670
|
}], ["click", function(n, e) {
|
|
671
|
-
te(e, () => {
|
|
671
|
+
te(e, (() => {
|
|
672
672
|
const t = L(), r = Te(oe(e)), i = ft();
|
|
673
673
|
if (r) {
|
|
674
674
|
if (A(t)) {
|
|
675
675
|
const s = t.anchor, o = s.getNode();
|
|
676
676
|
if (s.type === "element" && s.offset === 0 && t.isCollapsed() && !ne(o) && re().getChildrenSize() === 1 && o.getTopLevelElementOrThrow().isEmpty() && i !== null && t.is(i)) r.removeAllRanges(), t.dirty = !0;
|
|
677
677
|
else if (n.detail === 3 && !t.isCollapsed() && o !== t.focus.getNode()) {
|
|
678
|
-
const l = function(a, c) {
|
|
678
|
+
const l = (function(a, c) {
|
|
679
679
|
let u = a;
|
|
680
680
|
for (; u !== re() && u != null; ) {
|
|
681
681
|
if (c(u)) return u;
|
|
682
682
|
u = u.getParent();
|
|
683
683
|
}
|
|
684
684
|
return null;
|
|
685
|
-
}(o, (a) => v(a) && !a.isInline());
|
|
685
|
+
})(o, ((a) => v(a) && !a.isInline()));
|
|
686
686
|
v(l) && l.select(0);
|
|
687
687
|
}
|
|
688
688
|
} else if (n.pointerType === "touch" || n.pointerType === "pen") {
|
|
@@ -691,11 +691,11 @@ const Gi = D("SELECTION_CHANGE_COMMAND"), Pl = D("SELECTION_INSERT_CLIPBOARD_NOD
|
|
|
691
691
|
}
|
|
692
692
|
}
|
|
693
693
|
E(e, yo, n);
|
|
694
|
-
});
|
|
694
|
+
}));
|
|
695
695
|
}], ["cut", me], ["copy", me], ["dragstart", me], ["dragover", me], ["dragend", me], ["paste", me], ["focus", me], ["blur", me], ["drop", me]];
|
|
696
|
-
Qt && er.push(["beforeinput", (n, e) => function(t, r) {
|
|
696
|
+
Qt && er.push(["beforeinput", (n, e) => (function(t, r) {
|
|
697
697
|
const i = t.inputType, s = ls(t);
|
|
698
|
-
i === "deleteCompositionText" || We && Is(r) || i !== "insertCompositionText" && te(r, () => {
|
|
698
|
+
i === "deleteCompositionText" || We && Is(r) || i !== "insertCompositionText" && te(r, (() => {
|
|
699
699
|
const o = L();
|
|
700
700
|
if (i === "deleteContentBackward") {
|
|
701
701
|
if (o === null) {
|
|
@@ -706,11 +706,11 @@ Qt && er.push(["beforeinput", (n, e) => function(t, r) {
|
|
|
706
706
|
if (A(o)) {
|
|
707
707
|
const g = o.anchor.key === o.focus.key;
|
|
708
708
|
if (l = t.timeStamp, ns === "MediaLast" && l < mt + Zn && r.isComposing() && g) {
|
|
709
|
-
if (Y(null), mt = 0, setTimeout(() => {
|
|
710
|
-
te(r, () => {
|
|
709
|
+
if (Y(null), mt = 0, setTimeout((() => {
|
|
710
|
+
te(r, (() => {
|
|
711
711
|
Y(null);
|
|
712
|
-
});
|
|
713
|
-
}, Zn), A(o)) {
|
|
712
|
+
}));
|
|
713
|
+
}), Zn), A(o)) {
|
|
714
714
|
const h = o.anchor.getNode();
|
|
715
715
|
h.markDirty(), M(h) || T(142), os(o, h);
|
|
716
716
|
}
|
|
@@ -721,7 +721,7 @@ Qt && er.push(["beforeinput", (n, e) => function(t, r) {
|
|
|
721
721
|
if (y && o.isCollapsed() && (y = !z(sl(o.anchor, !0))), !y) {
|
|
722
722
|
E(r, ln, !0);
|
|
723
723
|
const m = L();
|
|
724
|
-
Ir && A(m) && m.isCollapsed() && (Ke = m, setTimeout(() => Ke = null));
|
|
724
|
+
Ir && A(m) && m.isCollapsed() && (Ke = m, setTimeout((() => Ke = null)));
|
|
725
725
|
}
|
|
726
726
|
}
|
|
727
727
|
return;
|
|
@@ -806,29 +806,29 @@ Qt && er.push(["beforeinput", (n, e) => function(t, r) {
|
|
|
806
806
|
} else a != null && ss(o, s, a, t.timeStamp, !0) ? (t.preventDefault(), E(r, yt, a)) : Ze = a;
|
|
807
807
|
rs = t.timeStamp;
|
|
808
808
|
}
|
|
809
|
-
});
|
|
810
|
-
}(n, e)]);
|
|
809
|
+
}));
|
|
810
|
+
})(n, e)]);
|
|
811
811
|
let mt = 0, ns = null, rs = 0, Ze = null;
|
|
812
812
|
const un = /* @__PURE__ */ new WeakMap();
|
|
813
813
|
let tr = !1, nr = !1, xt = !1, gt = !1, Dn = !1, Pn = "", Ke = null, is = [0, "", 0, "root", 0];
|
|
814
814
|
function ss(n, e, t, r, i) {
|
|
815
815
|
const s = n.anchor, o = n.focus, l = s.getNode(), a = R(), c = Te(oe(a)), u = c !== null ? c.anchorNode : null, d = s.key, f = a.getElementByKey(d), g = t.length;
|
|
816
|
-
return d !== o.key || !M(l) || (!i && (!Qt || rs < r + 50) || l.isDirty() && g < 2 || Ps(t)) && s.offset !== o.offset && !l.isComposing() || we(l) || l.isDirty() && g > 1 || (i || !Qt) && f !== null && !l.isComposing() && u !== ot(f) || c !== null && e !== null && (!e.collapsed || e.startContainer !== c.anchorNode || e.startOffset !== c.anchorOffset) || l.getFormat() !== n.format || l.getStyle() !== n.style || function(h, _) {
|
|
816
|
+
return d !== o.key || !M(l) || (!i && (!Qt || rs < r + 50) || l.isDirty() && g < 2 || Ps(t)) && s.offset !== o.offset && !l.isComposing() || we(l) || l.isDirty() && g > 1 || (i || !Qt) && f !== null && !l.isComposing() && u !== ot(f) || c !== null && e !== null && (!e.collapsed || e.startContainer !== c.anchorNode || e.startOffset !== c.anchorOffset) || l.getFormat() !== n.format || l.getStyle() !== n.style || (function(h, _) {
|
|
817
817
|
if (_.isSegmented()) return !0;
|
|
818
818
|
if (!h.isCollapsed()) return !1;
|
|
819
819
|
const p = h.anchor.offset, x = _.getParentOrThrow(), y = Be(_);
|
|
820
|
-
return p === 0 ? !_.canInsertTextBefore() || !x.canInsertTextBefore() && !_.isComposing() || y || function(m) {
|
|
820
|
+
return p === 0 ? !_.canInsertTextBefore() || !x.canInsertTextBefore() && !_.isComposing() || y || (function(m) {
|
|
821
821
|
const N = m.getPreviousSibling();
|
|
822
822
|
return (M(N) || v(N) && N.isInline()) && !N.canInsertTextAfter();
|
|
823
|
-
}(_) : p === _.getTextContentSize() && (!_.canInsertTextAfter() || !x.canInsertTextAfter() && !_.isComposing() || y);
|
|
824
|
-
}(n, l);
|
|
823
|
+
})(_) : p === _.getTextContentSize() && (!_.canInsertTextAfter() || !x.canInsertTextAfter() && !_.isComposing() || y);
|
|
824
|
+
})(n, l);
|
|
825
825
|
}
|
|
826
826
|
function Xr(n, e) {
|
|
827
827
|
return Ne(n) && n.nodeValue !== null && e !== 0 && e !== n.nodeValue.length;
|
|
828
828
|
}
|
|
829
829
|
function Qr(n, e, t) {
|
|
830
830
|
const { anchorNode: r, anchorOffset: i, focusNode: s, focusOffset: o } = n;
|
|
831
|
-
tr && (tr = !1, Xr(r, i) && Xr(s, o) && !Ke) || te(e, () => {
|
|
831
|
+
tr && (tr = !1, Xr(r, i) && Xr(s, o) && !Ke) || te(e, (() => {
|
|
832
832
|
if (!t) return void ie(null);
|
|
833
833
|
if (!vn(e, r, s)) return;
|
|
834
834
|
let l = L();
|
|
@@ -846,10 +846,10 @@ function Qr(n, e, t) {
|
|
|
846
846
|
else if (a.type === "element" && !y) {
|
|
847
847
|
v(c) || T(259);
|
|
848
848
|
const m = a.getNode();
|
|
849
|
-
m.isEmpty() ? function(N, b) {
|
|
849
|
+
m.isEmpty() ? (function(N, b) {
|
|
850
850
|
const C = b.getTextFormat(), w = b.getTextStyle();
|
|
851
851
|
Ht(N, C, w);
|
|
852
|
-
}(l, m) : Ht(l, 0, "");
|
|
852
|
+
})(l, m) : Ht(l, 0, "");
|
|
853
853
|
}
|
|
854
854
|
} else {
|
|
855
855
|
const u = a.key, d = l.focus.key, f = l.getNodes(), g = f.length, h = l.isBackward(), _ = h ? o : i, p = h ? i : o, x = h ? d : u, y = h ? u : d;
|
|
@@ -862,7 +862,7 @@ function Qr(n, e, t) {
|
|
|
862
862
|
}
|
|
863
863
|
}
|
|
864
864
|
E(e, Gi, void 0);
|
|
865
|
-
});
|
|
865
|
+
}));
|
|
866
866
|
}
|
|
867
867
|
function Ht(n, e, t) {
|
|
868
868
|
n.format === e && n.style === t || (n.format = e, n.style = t, n.dirty = !0);
|
|
@@ -903,10 +903,10 @@ function cs(n) {
|
|
|
903
903
|
if (e === null) return;
|
|
904
904
|
const t = Es(e.anchorNode);
|
|
905
905
|
if (t === null) return;
|
|
906
|
-
nr && (nr = !1, te(t, () => {
|
|
906
|
+
nr && (nr = !1, te(t, (() => {
|
|
907
907
|
const a = ft(), c = e.anchorNode;
|
|
908
908
|
(ee(c) || Ne(c)) && ie(mn(a, e, t, n));
|
|
909
|
-
}));
|
|
909
|
+
})));
|
|
910
910
|
const r = Tr(t), i = r[r.length - 1], s = i._key, o = tt.get(s), l = o || i;
|
|
911
911
|
l !== t && Qr(e, l, !1), Qr(e, t, !0), t !== i ? tt.set(s, t) : o && tt.delete(s);
|
|
912
912
|
}
|
|
@@ -922,12 +922,12 @@ function Ko(n) {
|
|
|
922
922
|
const r = t - 1;
|
|
923
923
|
r >= 0 || T(164), un.set(e, r), r === 0 && e.removeEventListener("selectionchange", cs);
|
|
924
924
|
const i = kn(n);
|
|
925
|
-
vr(i) ? (function(o) {
|
|
925
|
+
vr(i) ? ((function(o) {
|
|
926
926
|
if (o._parentEditor !== null) {
|
|
927
927
|
const l = Tr(o), a = l[l.length - 1]._key;
|
|
928
928
|
tt.get(a) === o && tt.delete(a);
|
|
929
929
|
} else tt.delete(o._key);
|
|
930
|
-
}(i), n.__lexicalEditor = null) : i && T(198);
|
|
930
|
+
})(i), n.__lexicalEditor = null) : i && T(198);
|
|
931
931
|
const s = as(n);
|
|
932
932
|
for (let o = 0; o < s.length; o++) s[o]();
|
|
933
933
|
n.__lexicalEventHandles = [];
|
|
@@ -936,12 +936,12 @@ function rr(n, e, t) {
|
|
|
936
936
|
G();
|
|
937
937
|
const r = n.__key, i = n.getParent();
|
|
938
938
|
if (i === null) return;
|
|
939
|
-
const s = function(l) {
|
|
939
|
+
const s = (function(l) {
|
|
940
940
|
const a = L();
|
|
941
941
|
if (!A(a) || !v(l)) return a;
|
|
942
942
|
const { anchor: c, focus: u } = a, d = c.getNode(), f = u.getNode();
|
|
943
943
|
return sr(d, l) && c.set(l.__key, 0, "element"), sr(f, l) && u.set(l.__key, 0, "element"), a;
|
|
944
|
-
}(n);
|
|
944
|
+
})(n);
|
|
945
945
|
let o = !1;
|
|
946
946
|
if (A(s) && e) {
|
|
947
947
|
const l = s.anchor, a = s.focus;
|
|
@@ -996,7 +996,7 @@ class ct {
|
|
|
996
996
|
isSelected(e) {
|
|
997
997
|
const t = e || L();
|
|
998
998
|
if (t == null) return !1;
|
|
999
|
-
const r = t.getNodes().some((i) => i.__key === this.__key);
|
|
999
|
+
const r = t.getNodes().some(((i) => i.__key === this.__key));
|
|
1000
1000
|
if (M(this)) return r;
|
|
1001
1001
|
if (A(t) && t.anchor.type === "element" && t.focus.type === "element") {
|
|
1002
1002
|
if (t.isCollapsed()) return !1;
|
|
@@ -1155,12 +1155,12 @@ class ct {
|
|
|
1155
1155
|
T(18, this.name);
|
|
1156
1156
|
}
|
|
1157
1157
|
updateFromJSON(e) {
|
|
1158
|
-
return function(t, r) {
|
|
1158
|
+
return (function(t, r) {
|
|
1159
1159
|
const i = t.getWritable(), s = r.$;
|
|
1160
1160
|
let o = s;
|
|
1161
1161
|
for (const l of ji(i).flatKeys) l in r && (o !== void 0 && o !== s || (o = { ...s }), o[l] = r[l]);
|
|
1162
1162
|
return (i.__state || o) && ho(t).updateFromJSON(o), i;
|
|
1163
|
-
}(this, e);
|
|
1163
|
+
})(this, e);
|
|
1164
1164
|
}
|
|
1165
1165
|
static transform() {
|
|
1166
1166
|
return null;
|
|
@@ -1175,9 +1175,9 @@ class ct {
|
|
|
1175
1175
|
const i = this.getLatest(), s = this.__key, o = e.__key, l = e.getWritable(), a = this.getParentOrThrow().getWritable(), c = a.__size;
|
|
1176
1176
|
Re(l);
|
|
1177
1177
|
const u = i.getPreviousSibling(), d = i.getNextSibling(), f = i.__prev, g = i.__next, h = i.__parent;
|
|
1178
|
-
if (rr(i, !1, !0), u === null ? a.__first = o : u.getWritable().__next = o, l.__prev = f, d === null ? a.__last = o : d.getWritable().__prev = o, l.__next = g, l.__parent = h, a.__size = c, t && (v(this) && v(l) || T(139), this.getChildren().forEach((_) => {
|
|
1178
|
+
if (rr(i, !1, !0), u === null ? a.__first = o : u.getWritable().__next = o, l.__prev = f, d === null ? a.__last = o : d.getWritable().__prev = o, l.__next = g, l.__parent = h, a.__size = c, t && (v(this) && v(l) || T(139), this.getChildren().forEach(((_) => {
|
|
1179
1179
|
l.append(_);
|
|
1180
|
-
})), A(r)) {
|
|
1180
|
+
}))), A(r)) {
|
|
1181
1181
|
ie(r);
|
|
1182
1182
|
const _ = r.anchor, p = r.focus;
|
|
1183
1183
|
_.key === s && ii(_, l), p.key === s && ii(p, l);
|
|
@@ -1278,7 +1278,7 @@ class Mt extends ct {
|
|
|
1278
1278
|
return !0;
|
|
1279
1279
|
}
|
|
1280
1280
|
static importDOM() {
|
|
1281
|
-
return { br: (e) => function(t) {
|
|
1281
|
+
return { br: (e) => (function(t) {
|
|
1282
1282
|
const r = t.parentElement;
|
|
1283
1283
|
if (r !== null && Ei(r)) {
|
|
1284
1284
|
const i = r.firstChild;
|
|
@@ -1288,7 +1288,7 @@ class Mt extends ct {
|
|
|
1288
1288
|
}
|
|
1289
1289
|
}
|
|
1290
1290
|
return !1;
|
|
1291
|
-
}(e) || function(t) {
|
|
1291
|
+
})(e) || (function(t) {
|
|
1292
1292
|
const r = t.parentElement;
|
|
1293
1293
|
if (r !== null && Ei(r)) {
|
|
1294
1294
|
const i = r.firstChild;
|
|
@@ -1297,7 +1297,7 @@ class Mt extends ct {
|
|
|
1297
1297
|
if (s === t || s.previousSibling === t && Jt(s)) return !0;
|
|
1298
1298
|
}
|
|
1299
1299
|
return !1;
|
|
1300
|
-
}(e) ? null : { conversion: zo, priority: 0 } };
|
|
1300
|
+
})(e) ? null : { conversion: zo, priority: 0 } };
|
|
1301
1301
|
}
|
|
1302
1302
|
static importJSON(e) {
|
|
1303
1303
|
return bt().updateFromJSON(e);
|
|
@@ -1345,13 +1345,13 @@ function fs(n, e, t) {
|
|
|
1345
1345
|
else {
|
|
1346
1346
|
const o = r.nodeValue;
|
|
1347
1347
|
if (o !== s) if (i || We) {
|
|
1348
|
-
const [l, a, c] = function(u, d) {
|
|
1348
|
+
const [l, a, c] = (function(u, d) {
|
|
1349
1349
|
const f = u.length, g = d.length;
|
|
1350
1350
|
let h = 0, _ = 0;
|
|
1351
1351
|
for (; h < f && h < g && u[h] === d[h]; ) h++;
|
|
1352
1352
|
for (; _ + h < f && _ + h < g && u[f - _ - 1] === d[g - _ - 1]; ) _++;
|
|
1353
1353
|
return [h, f - h - _, d.slice(h, g - _)];
|
|
1354
|
-
}(o, s);
|
|
1354
|
+
})(o, s);
|
|
1355
1355
|
a !== 0 && r.deleteData(l, a), r.insertData(l, c);
|
|
1356
1356
|
} else r.nodeValue = s;
|
|
1357
1357
|
}
|
|
@@ -1546,7 +1546,7 @@ class ut extends ct {
|
|
|
1546
1546
|
const t = this.getLatest(), r = t.getTextContent();
|
|
1547
1547
|
if (r === "") return [];
|
|
1548
1548
|
const i = t.__key, s = Me(), o = r.length;
|
|
1549
|
-
e.sort((k, S) => k - S), e.push(o);
|
|
1549
|
+
e.sort(((k, S) => k - S)), e.push(o);
|
|
1550
1550
|
const l = [], a = e.length;
|
|
1551
1551
|
for (let k = 0, S = 0; k < o && S <= a; S++) {
|
|
1552
1552
|
const O = e[S];
|
|
@@ -1629,14 +1629,14 @@ function Jo(n) {
|
|
|
1629
1629
|
const e = n;
|
|
1630
1630
|
n.parentElement === null && T(129);
|
|
1631
1631
|
let t = e.textContent || "";
|
|
1632
|
-
if (function(r) {
|
|
1632
|
+
if ((function(r) {
|
|
1633
1633
|
let i, s = r.parentNode;
|
|
1634
1634
|
const o = [r];
|
|
1635
1635
|
for (; s !== null && (i = ni.get(s)) === void 0 && !Wo(s); ) o.push(s), s = s.parentNode;
|
|
1636
1636
|
const l = i === void 0 ? s : i;
|
|
1637
1637
|
for (let a = 0; a < o.length; a++) ni.set(o[a], l);
|
|
1638
1638
|
return l;
|
|
1639
|
-
}(e) !== null) {
|
|
1639
|
+
})(e) !== null) {
|
|
1640
1640
|
const r = t.split(/(\r?\n|\t)/), i = [], s = r.length;
|
|
1641
1641
|
for (let o = 0; o < s; o++) {
|
|
1642
1642
|
const l = r[o];
|
|
@@ -1805,7 +1805,7 @@ class yn {
|
|
|
1805
1805
|
is(e) {
|
|
1806
1806
|
if (!mr(e)) return !1;
|
|
1807
1807
|
const t = this._nodes, r = e._nodes;
|
|
1808
|
-
return t.size === r.size && Array.from(t).every((i) => r.has(i));
|
|
1808
|
+
return t.size === r.size && Array.from(t).every(((i) => r.has(i)));
|
|
1809
1809
|
}
|
|
1810
1810
|
isCollapsed() {
|
|
1811
1811
|
return !1;
|
|
@@ -1896,7 +1896,7 @@ class Xe {
|
|
|
1896
1896
|
getNodes() {
|
|
1897
1897
|
const e = this._cachedNodes;
|
|
1898
1898
|
if (e !== null) return e;
|
|
1899
|
-
const t = function(r) {
|
|
1899
|
+
const t = (function(r) {
|
|
1900
1900
|
const i = [], [s, o] = r.getTextSlices();
|
|
1901
1901
|
s && i.push(s.caret.origin);
|
|
1902
1902
|
const l = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set();
|
|
@@ -1918,7 +1918,7 @@ class Xe {
|
|
|
1918
1918
|
i.push(f);
|
|
1919
1919
|
}
|
|
1920
1920
|
return i;
|
|
1921
|
-
}(Js(Pi(this), "next"));
|
|
1921
|
+
})(Js(Pi(this), "next"));
|
|
1922
1922
|
return At() || (this._cachedNodes = t), t;
|
|
1923
1923
|
}
|
|
1924
1924
|
setTextNodeRange(e, t, r, i) {
|
|
@@ -1976,10 +1976,10 @@ class Xe {
|
|
|
1976
1976
|
insertText(e) {
|
|
1977
1977
|
const t = this.anchor, r = this.focus, i = this.format, s = this.style;
|
|
1978
1978
|
let o = t, l = r;
|
|
1979
|
-
!this.isCollapsed() && r.isBefore(t) && (o = r, l = t), o.type === "element" && function(p, x, y, m) {
|
|
1979
|
+
!this.isCollapsed() && r.isBefore(t) && (o = r, l = t), o.type === "element" && (function(p, x, y, m) {
|
|
1980
1980
|
const N = p.getNode(), b = N.getChildAtIndex(p.offset), C = V(), w = ne(N) ? Oe().append(C) : C;
|
|
1981
1981
|
C.setFormat(y), C.setStyle(m), b === null ? N.append(w) : b.insertBefore(w), p.is(x) && x.set(C.__key, 0, "text"), p.set(C.__key, 0, "text");
|
|
1982
|
-
}(o, l, i, s), l.type === "element" && Et(l, de(qe(l, "next")));
|
|
1982
|
+
})(o, l, i, s), l.type === "element" && Et(l, de(qe(l, "next")));
|
|
1983
1983
|
const a = o.offset;
|
|
1984
1984
|
let c = l.offset;
|
|
1985
1985
|
const u = this.getNodes(), d = u.length;
|
|
@@ -2076,12 +2076,12 @@ class Xe {
|
|
|
2076
2076
|
const r = this.getNodes(), i = [];
|
|
2077
2077
|
for (const N of r) M(N) && i.push(N);
|
|
2078
2078
|
const s = (N) => {
|
|
2079
|
-
r.forEach((b) => {
|
|
2079
|
+
r.forEach(((b) => {
|
|
2080
2080
|
if (v(b)) {
|
|
2081
2081
|
const C = b.getFormatFlags(e, N);
|
|
2082
2082
|
b.setTextFormat(C);
|
|
2083
2083
|
}
|
|
2084
|
-
});
|
|
2084
|
+
}));
|
|
2085
2085
|
}, o = i.length;
|
|
2086
2086
|
if (o === 0) return this.toggleFormat(e), Y(null), void s(t);
|
|
2087
2087
|
const l = this.anchor, a = this.focus, c = this.isBackward(), u = c ? a : l, d = c ? l : a;
|
|
@@ -2126,12 +2126,12 @@ class Xe {
|
|
|
2126
2126
|
}
|
|
2127
2127
|
return;
|
|
2128
2128
|
}
|
|
2129
|
-
if (!e.some((h) => (v(h) || z(h)) && !h.isInline())) {
|
|
2129
|
+
if (!e.some(((h) => (v(h) || z(h)) && !h.isInline()))) {
|
|
2130
2130
|
v(r) || T(211, t.constructor.name, t.getType());
|
|
2131
2131
|
const h = Kn(this);
|
|
2132
2132
|
return r.splice(h, 0, e), void i.selectEnd();
|
|
2133
2133
|
}
|
|
2134
|
-
const s = function(h) {
|
|
2134
|
+
const s = (function(h) {
|
|
2135
2135
|
const _ = Oe();
|
|
2136
2136
|
let p = null;
|
|
2137
2137
|
for (let x = 0; x < h.length; x++) {
|
|
@@ -2142,17 +2142,17 @@ class Xe {
|
|
|
2142
2142
|
} else _.append(y), p = null;
|
|
2143
2143
|
}
|
|
2144
2144
|
return _;
|
|
2145
|
-
}(e), o = s.getLastDescendant(), l = s.getChildren(), a = !v(r) || !r.isEmpty() ? this.insertParagraph() : null, c = l[l.length - 1];
|
|
2145
|
+
})(e), o = s.getLastDescendant(), l = s.getChildren(), a = !v(r) || !r.isEmpty() ? this.insertParagraph() : null, c = l[l.length - 1];
|
|
2146
2146
|
let u = l[0];
|
|
2147
2147
|
var d;
|
|
2148
|
-
v(d = u) && Ee(d) && !d.isEmpty() && v(r) && (!r.isEmpty() || r.canMergeWhenEmpty()) && (v(r) || T(211, t.constructor.name, t.getType()), r.append(...u.getChildren()), u = l[1]), u && (r === null && T(212, t.constructor.name, t.getType()), function(h, _, p) {
|
|
2148
|
+
v(d = u) && Ee(d) && !d.isEmpty() && v(r) && (!r.isEmpty() || r.canMergeWhenEmpty()) && (v(r) || T(211, t.constructor.name, t.getType()), r.append(...u.getChildren()), u = l[1]), u && (r === null && T(212, t.constructor.name, t.getType()), (function(h, _, p) {
|
|
2149
2149
|
const x = _.getParentOrThrow().getLastChild();
|
|
2150
2150
|
let y = _;
|
|
2151
2151
|
const m = [_];
|
|
2152
2152
|
for (; y !== x; ) y.getNextSibling() || T(140), y = y.getNextSibling(), m.push(y);
|
|
2153
2153
|
let N = h;
|
|
2154
2154
|
for (const b of m) N = N.insertAfter(b);
|
|
2155
|
-
}(r, u));
|
|
2155
|
+
})(r, u));
|
|
2156
2156
|
const f = Jn(o, Ee);
|
|
2157
2157
|
a && v(f) && (a.canMergeWhenEmpty() || Ee(c)) && (f.append(...a.getChildren()), a.remove()), v(r) && r.isEmpty() && r.remove(), o.selectEnd();
|
|
2158
2158
|
const g = v(r) ? r.getLastChild() : null;
|
|
@@ -2207,9 +2207,9 @@ class Xe {
|
|
|
2207
2207
|
let u = lt(s, this.anchor.key), d = lt(s, this.focus.key);
|
|
2208
2208
|
this.anchor.type === "text" && (u = ot(u)), this.focus.type === "text" && (d = ot(d)), u && d && ys(o, u, this.anchor.offset, d, this.focus.offset);
|
|
2209
2209
|
}
|
|
2210
|
-
if (function(u, d, f, g) {
|
|
2210
|
+
if ((function(u, d, f, g) {
|
|
2211
2211
|
u.modify(d, f, g);
|
|
2212
|
-
}(o, e, t ? "backward" : "forward", r), o.rangeCount > 0) {
|
|
2212
|
+
})(o, e, t ? "backward" : "forward", r), o.rangeCount > 0) {
|
|
2213
2213
|
const u = o.getRangeAt(0), d = this.anchor.getNode(), f = ne(d) ? d : al(d);
|
|
2214
2214
|
if (this.applyDOMRange(u), this.dirty = !0, !i) {
|
|
2215
2215
|
const g = this.getNodes(), h = [];
|
|
@@ -2225,10 +2225,10 @@ class Xe {
|
|
|
2225
2225
|
const p = h[h.length - 1];
|
|
2226
2226
|
v(p) ? p.selectEnd() : p.getParentOrThrow().selectEnd();
|
|
2227
2227
|
}
|
|
2228
|
-
o.anchorNode === u.startContainer && o.anchorOffset === u.startOffset || function(p) {
|
|
2228
|
+
o.anchorNode === u.startContainer && o.anchorOffset === u.startOffset || (function(p) {
|
|
2229
2229
|
const x = p.focus, y = p.anchor, m = y.key, N = y.offset, b = y.type;
|
|
2230
2230
|
y.set(x.key, x.offset, x.type, !0), x.set(m, N, b, !0);
|
|
2231
|
-
}(this);
|
|
2231
|
+
})(this);
|
|
2232
2232
|
}
|
|
2233
2233
|
}
|
|
2234
2234
|
r === "lineboundary" && hi(this, e, t, r, "decorators");
|
|
@@ -2247,7 +2247,7 @@ class Xe {
|
|
|
2247
2247
|
let i = r.getNode();
|
|
2248
2248
|
if (this.forwardDeletion(r, i, e)) return;
|
|
2249
2249
|
const s = zs(qe(r, e ? "previous" : "next"));
|
|
2250
|
-
if (s.getTextSlices().every((l) => l === null || l.distance === 0)) {
|
|
2250
|
+
if (s.getTextSlices().every(((l) => l === null || l.distance === 0))) {
|
|
2251
2251
|
let l = { type: "initial" };
|
|
2252
2252
|
for (const a of s.iterNodeCarets("shadowRoot")) if (he(a)) {
|
|
2253
2253
|
if (!a.origin.isInline()) {
|
|
@@ -2302,9 +2302,9 @@ class Xe {
|
|
|
2302
2302
|
const u = a.anchor, d = a.focus, f = u.getNode(), g = d.getNode();
|
|
2303
2303
|
if (f === g && u.type === "text" && d.type === "text") {
|
|
2304
2304
|
const h = u.offset, _ = d.offset, p = h < _, x = p ? h : _, y = p ? _ : h, m = y - 1;
|
|
2305
|
-
x !== m && function(N) {
|
|
2305
|
+
x !== m && (function(N) {
|
|
2306
2306
|
return !(Ps(N) || Uo(N));
|
|
2307
|
-
}(f.getTextContent().slice(x, y)) && (c ? d.set(d.key, m, d.type) : u.set(u.key, m, u.type));
|
|
2307
|
+
})(f.getTextContent().slice(x, y)) && (c ? d.set(d.key, m, d.type) : u.set(u.key, m, u.type));
|
|
2308
2308
|
}
|
|
2309
2309
|
})(this, e);
|
|
2310
2310
|
}
|
|
@@ -2398,10 +2398,10 @@ function ci(n, e, t, r) {
|
|
|
2398
2398
|
const g = r.getElementByKey(f.getKey());
|
|
2399
2399
|
g === null && T(214), [f, s] = f.getDOMSlot(g).resolveChildIndex(f, g, n, e), v(f) || T(215), o && s >= f.getChildrenSize() && (s = Math.max(0, f.getChildrenSize() - 1));
|
|
2400
2400
|
let _ = f.getChildAtIndex(s);
|
|
2401
|
-
if (v(_) && function(p, x, y) {
|
|
2401
|
+
if (v(_) && (function(p, x, y) {
|
|
2402
2402
|
const m = p.getParent();
|
|
2403
2403
|
return y === null || m === null || !m.canBeEmpty() || m !== y.getNode();
|
|
2404
|
-
}(_, 0, t)) {
|
|
2404
|
+
})(_, 0, t)) {
|
|
2405
2405
|
const p = o ? _.getLastDescendant() : _.getFirstDescendant();
|
|
2406
2406
|
p === null ? f = _ : (_ = p, f = v(_) ? _ : _.getParentOrThrow()), s = 0;
|
|
2407
2407
|
}
|
|
@@ -2764,13 +2764,13 @@ function ve(n, e) {
|
|
|
2764
2764
|
}
|
|
2765
2765
|
t._readOnly || (t._readOnly = !0);
|
|
2766
2766
|
const _ = n._dirtyLeaves, p = n._dirtyElements, x = n._normalizedNodes, y = n._updateTags, m = n._deferred;
|
|
2767
|
-
a && (n._dirtyType = Je, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements = /* @__PURE__ */ new Map(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set()), function(C, w) {
|
|
2767
|
+
a && (n._dirtyType = Je, n._cloneNotNeeded.clear(), n._dirtyLeaves = /* @__PURE__ */ new Set(), n._dirtyElements = /* @__PURE__ */ new Map(), n._normalizedNodes = /* @__PURE__ */ new Set(), n._updateTags = /* @__PURE__ */ new Set()), (function(C, w) {
|
|
2768
2768
|
const k = C._decorators;
|
|
2769
2769
|
let S = C._pendingDecorators || k;
|
|
2770
2770
|
const O = w._nodeMap;
|
|
2771
2771
|
let F;
|
|
2772
2772
|
for (F in S) O.has(F) || (S === k && (S = As(C)), delete S[F]);
|
|
2773
|
-
}(n, t);
|
|
2773
|
+
})(n, t);
|
|
2774
2774
|
const N = i ? null : Te(oe(n));
|
|
2775
2775
|
if (n._editable && N !== null && (a || l === null || l.dirty) && r !== null && !y.has(Qo)) {
|
|
2776
2776
|
$ = n, j = t;
|
|
@@ -2795,7 +2795,7 @@ function ve(n, e) {
|
|
|
2795
2795
|
}
|
|
2796
2796
|
if (K) {
|
|
2797
2797
|
const B = C.getElementByKey(F.__key);
|
|
2798
|
-
return S === null && (C._blockCursorElement = S = function(q) {
|
|
2798
|
+
return S === null && (C._blockCursorElement = S = (function(q) {
|
|
2799
2799
|
const se = q.theme, pe = document.createElement("div");
|
|
2800
2800
|
pe.contentEditable = "false", pe.setAttribute("data-lexical-cursor", "true");
|
|
2801
2801
|
let ye = se.blockCursor;
|
|
@@ -2807,7 +2807,7 @@ function ve(n, e) {
|
|
|
2807
2807
|
ye !== void 0 && pe.classList.add(...ye);
|
|
2808
2808
|
}
|
|
2809
2809
|
return pe;
|
|
2810
|
-
}(C._config)), w.style.caretColor = "transparent", void (P === null ? B.appendChild(S) : B.insertBefore(S, P));
|
|
2810
|
+
})(C._config)), w.style.caretColor = "transparent", void (P === null ? B.appendChild(S) : B.insertBefore(S, P));
|
|
2811
2811
|
}
|
|
2812
2812
|
}
|
|
2813
2813
|
S !== null && or(S, C, w);
|
|
@@ -2816,7 +2816,7 @@ function ve(n, e) {
|
|
|
2816
2816
|
g !== null && g.observe(r, gi), $ = d, j = c;
|
|
2817
2817
|
}
|
|
2818
2818
|
}
|
|
2819
|
-
h !== null && function(C, w, k, S, O) {
|
|
2819
|
+
h !== null && (function(C, w, k, S, O) {
|
|
2820
2820
|
const F = Array.from(C._listeners.mutation), W = F.length;
|
|
2821
2821
|
for (let K = 0; K < W; K++) {
|
|
2822
2822
|
const [P, B] = F[K];
|
|
@@ -2825,12 +2825,12 @@ function ve(n, e) {
|
|
|
2825
2825
|
se !== void 0 && P(se, { dirtyLeaves: S, prevEditorState: O, updateTags: k });
|
|
2826
2826
|
}
|
|
2827
2827
|
}
|
|
2828
|
-
}(n, h, y, _, s), A(l) || l === null || o !== null && o.is(l) || n.dispatchCommand(Gi, void 0);
|
|
2828
|
+
})(n, h, y, _, s), A(l) || l === null || o !== null && o.is(l) || n.dispatchCommand(Gi, void 0);
|
|
2829
2829
|
const b = n._pendingDecorators;
|
|
2830
|
-
b !== null && (n._decorators = b, n._pendingDecorators = null, Ct("decorator", n, !0, b)), function(C, w, k) {
|
|
2830
|
+
b !== null && (n._decorators = b, n._pendingDecorators = null, Ct("decorator", n, !0, b)), (function(C, w, k) {
|
|
2831
2831
|
const S = vi(w), O = vi(k);
|
|
2832
2832
|
S !== O && Ct("textcontent", C, !0, O);
|
|
2833
|
-
}(n, e || s, t), Ct("update", n, !0, { dirtyElements: p, dirtyLeaves: _, editorState: t, mutatedNodes: h, normalizedNodes: x, prevEditorState: e || s, tags: y }), function(C, w) {
|
|
2833
|
+
})(n, e || s, t), Ct("update", n, !0, { dirtyElements: p, dirtyLeaves: _, editorState: t, mutatedNodes: h, normalizedNodes: x, prevEditorState: e || s, tags: y }), (function(C, w) {
|
|
2834
2834
|
if (C._deferred = [], w.length !== 0) {
|
|
2835
2835
|
const k = C._updating;
|
|
2836
2836
|
C._updating = !0;
|
|
@@ -2840,7 +2840,7 @@ function ve(n, e) {
|
|
|
2840
2840
|
C._updating = k;
|
|
2841
2841
|
}
|
|
2842
2842
|
}
|
|
2843
|
-
}(n, m), function(C) {
|
|
2843
|
+
})(n, m), (function(C) {
|
|
2844
2844
|
const w = C._updates;
|
|
2845
2845
|
if (w.length !== 0) {
|
|
2846
2846
|
const k = w.shift();
|
|
@@ -2849,7 +2849,7 @@ function ve(n, e) {
|
|
|
2849
2849
|
xn(C, S, O);
|
|
2850
2850
|
}
|
|
2851
2851
|
}
|
|
2852
|
-
}(n);
|
|
2852
|
+
})(n);
|
|
2853
2853
|
}
|
|
2854
2854
|
function Ct(n, e, t, ...r) {
|
|
2855
2855
|
const i = e._updating;
|
|
@@ -2886,12 +2886,12 @@ function xn(n, e, t) {
|
|
|
2886
2886
|
const h = n._headless || n.getRootElement() === null;
|
|
2887
2887
|
Sr(null);
|
|
2888
2888
|
try {
|
|
2889
|
-
c && (h ? l._selection !== null && (a._selection = l._selection.clone()) : a._selection = function(y, m) {
|
|
2889
|
+
c && (h ? l._selection !== null && (a._selection = l._selection.clone()) : a._selection = (function(y, m) {
|
|
2890
2890
|
const N = y.getEditorState()._selection, b = Te(oe(y));
|
|
2891
2891
|
return A(N) || N == null ? mn(N, b, y, m) : N.clone();
|
|
2892
|
-
}(n, t && t.event || null));
|
|
2892
|
+
})(n, t && t.event || null));
|
|
2893
2893
|
const p = n._compositionKey;
|
|
2894
|
-
e(), s = mi(n, s), function(y, m) {
|
|
2894
|
+
e(), s = mi(n, s), (function(y, m) {
|
|
2895
2895
|
const N = m.getEditorState()._selection, b = y._selection;
|
|
2896
2896
|
if (A(b)) {
|
|
2897
2897
|
const C = b.anchor, w = b.focus;
|
|
@@ -2901,13 +2901,13 @@ function xn(n, e, t) {
|
|
|
2901
2901
|
k !== S && S.selectionTransform(N, b);
|
|
2902
2902
|
}
|
|
2903
2903
|
}
|
|
2904
|
-
}(a, n), n._dirtyType !== Je && (s ? function(y, m) {
|
|
2904
|
+
})(a, n), n._dirtyType !== Je && (s ? (function(y, m) {
|
|
2905
2905
|
const N = m._dirtyLeaves, b = y._nodeMap;
|
|
2906
2906
|
for (const C of N) {
|
|
2907
2907
|
const w = b.get(C);
|
|
2908
2908
|
M(w) && w.isAttached() && w.isSimpleText() && !w.isUnmergeable() && Ur(w);
|
|
2909
2909
|
}
|
|
2910
|
-
}(a, n) : function(y, m) {
|
|
2910
|
+
})(a, n) : (function(y, m) {
|
|
2911
2911
|
const N = m._dirtyLeaves, b = m._dirtyElements, C = y._nodeMap, w = Me(), k = /* @__PURE__ */ new Map();
|
|
2912
2912
|
let S = N, O = S.size, F = b, W = F.size;
|
|
2913
2913
|
for (; O > 0 || W > 0; ) {
|
|
@@ -2932,7 +2932,7 @@ function xn(n, e, t) {
|
|
|
2932
2932
|
S = m._dirtyLeaves, O = S.size, F = m._dirtyElements, W = F.size, qt++;
|
|
2933
2933
|
}
|
|
2934
2934
|
m._dirtyLeaves = N, m._dirtyElements = b;
|
|
2935
|
-
}(a, n), mi(n), function(y, m, N, b) {
|
|
2935
|
+
})(a, n), mi(n), (function(y, m, N, b) {
|
|
2936
2936
|
const C = y._nodeMap, w = m._nodeMap, k = [];
|
|
2937
2937
|
for (const [S] of b) {
|
|
2938
2938
|
const O = w.get(S);
|
|
@@ -2943,7 +2943,7 @@ function xn(n, e, t) {
|
|
|
2943
2943
|
const O = w.get(S);
|
|
2944
2944
|
O === void 0 || O.isAttached() || (C.has(S) || N.delete(S), w.delete(S));
|
|
2945
2945
|
}
|
|
2946
|
-
}(l, a, n._dirtyLeaves, n._dirtyElements)), p !== n._compositionKey && (a._flushSync = !0);
|
|
2946
|
+
})(l, a, n._dirtyLeaves, n._dirtyElements)), p !== n._compositionKey && (a._flushSync = !0);
|
|
2947
2947
|
const x = a._selection;
|
|
2948
2948
|
if (A(x)) {
|
|
2949
2949
|
const y = a._nodeMap, m = x.anchor.key, N = x.focus.key;
|
|
@@ -2954,15 +2954,15 @@ function xn(n, e, t) {
|
|
|
2954
2954
|
} finally {
|
|
2955
2955
|
j = u, Z = d, $ = f, n._updating = g, qt = 0;
|
|
2956
2956
|
}
|
|
2957
|
-
n._dirtyType !== Je || n._deferred.length > 0 || function(p, x) {
|
|
2957
|
+
n._dirtyType !== Je || n._deferred.length > 0 || (function(p, x) {
|
|
2958
2958
|
const y = x.getEditorState()._selection, m = p._selection;
|
|
2959
2959
|
if (m !== null) {
|
|
2960
2960
|
if (m.dirty || !m.is(y)) return !0;
|
|
2961
2961
|
} else if (y !== null) return !0;
|
|
2962
2962
|
return !1;
|
|
2963
|
-
}(a, n) ? a._flushSync ? (a._flushSync = !1, ve(n)) : c && nl(() => {
|
|
2963
|
+
})(a, n) ? a._flushSync ? (a._flushSync = !1, ve(n)) : c && nl((() => {
|
|
2964
2964
|
ve(n);
|
|
2965
|
-
}) : (a._flushSync = !1, c && (r.clear(), n._deferred = [], n._pendingEditorState = null));
|
|
2965
|
+
})) : (a._flushSync = !1, c && (r.clear(), n._deferred = [], n._pendingEditorState = null));
|
|
2966
2966
|
}
|
|
2967
2967
|
function te(n, e, t) {
|
|
2968
2968
|
$ === n && t === void 0 ? e() : xn(n, e, t);
|
|
@@ -3244,7 +3244,7 @@ class Dt extends ct {
|
|
|
3244
3244
|
}
|
|
3245
3245
|
clear() {
|
|
3246
3246
|
const e = this.getWritable();
|
|
3247
|
-
return this.getChildren().forEach((t) => t.remove()), e;
|
|
3247
|
+
return this.getChildren().forEach(((t) => t.remove())), e;
|
|
3248
3248
|
}
|
|
3249
3249
|
append(...e) {
|
|
3250
3250
|
return this.splice(this.getChildrenSize(), 0, e);
|
|
@@ -3500,7 +3500,7 @@ class Cn {
|
|
|
3500
3500
|
return t._readOnly = !0, t;
|
|
3501
3501
|
}
|
|
3502
3502
|
toJSON() {
|
|
3503
|
-
return yi(null, this, () => ({ root: ks(re()) }));
|
|
3503
|
+
return yi(null, this, (() => ({ root: ks(re()) })));
|
|
3504
3504
|
}
|
|
3505
3505
|
}
|
|
3506
3506
|
const Yl = "historic", Hl = "history-push", Bn = "history-merge", ql = "paste", Go = "collaboration", Xo = "skip-scroll-into-view", Qo = "skip-dom-selection";
|
|
@@ -3592,21 +3592,21 @@ function na(n) {
|
|
|
3592
3592
|
m && m.$transform && C.add(m.$transform), b !== null && C.add(b), g.set(N, { exportDOM: d && d.export ? d.export.get(p) : void 0, klass: p, replace: x, replaceWithKlass: y, sharedNodeState: fo(c[_]), transforms: C });
|
|
3593
3593
|
}
|
|
3594
3594
|
}
|
|
3595
|
-
const h = new Sn(o, i, g, { disableEvents: s, namespace: l, theme: r }, u || console.error, function(_, p) {
|
|
3595
|
+
const h = new Sn(o, i, g, { disableEvents: s, namespace: l, theme: r }, u || console.error, (function(_, p) {
|
|
3596
3596
|
const x = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Set(), m = (N) => {
|
|
3597
|
-
Object.keys(N).forEach((b) => {
|
|
3597
|
+
Object.keys(N).forEach(((b) => {
|
|
3598
3598
|
let C = x.get(b);
|
|
3599
3599
|
C === void 0 && (C = [], x.set(b, C)), C.push(N[b]);
|
|
3600
|
-
});
|
|
3600
|
+
}));
|
|
3601
3601
|
};
|
|
3602
|
-
return _.forEach((N) => {
|
|
3602
|
+
return _.forEach(((N) => {
|
|
3603
3603
|
const b = N.klass.importDOM;
|
|
3604
3604
|
if (b == null || y.has(b)) return;
|
|
3605
3605
|
y.add(b);
|
|
3606
3606
|
const C = b.call(N.klass);
|
|
3607
3607
|
C !== null && m(C);
|
|
3608
|
-
}), p && m(p), x;
|
|
3609
|
-
}(g, d ? d.import : void 0), f, n);
|
|
3608
|
+
})), p && m(p), x;
|
|
3609
|
+
})(g, d ? d.import : void 0), f, n);
|
|
3610
3610
|
return a !== void 0 && (h._pendingEditorState = a, h._dirtyType = st), h;
|
|
3611
3611
|
}
|
|
3612
3612
|
class Sn {
|
|
@@ -3654,7 +3654,7 @@ class Sn {
|
|
|
3654
3654
|
s === void 0 && T(36, String(e));
|
|
3655
3655
|
const o = s[r];
|
|
3656
3656
|
return o.add(t), () => {
|
|
3657
|
-
o.delete(t), s.every((l) => l.size === 0) && i.delete(e);
|
|
3657
|
+
o.delete(t), s.every(((l) => l.size === 0)) && i.delete(e);
|
|
3658
3658
|
};
|
|
3659
3659
|
}
|
|
3660
3660
|
registerMutationListener(e, t, r) {
|
|
@@ -3691,20 +3691,20 @@ class Sn {
|
|
|
3691
3691
|
const o = this.registerNodeTransformToKlass(s, t);
|
|
3692
3692
|
i.push(o);
|
|
3693
3693
|
}
|
|
3694
|
-
return function(o, l) {
|
|
3694
|
+
return (function(o, l) {
|
|
3695
3695
|
const a = Oi(o.getEditorState()), c = [];
|
|
3696
3696
|
for (const u of l) {
|
|
3697
3697
|
const d = a.get(u);
|
|
3698
3698
|
d && c.push(d);
|
|
3699
3699
|
}
|
|
3700
|
-
c.length !== 0 && o.update(() => {
|
|
3700
|
+
c.length !== 0 && o.update((() => {
|
|
3701
3701
|
for (const u of c) for (const d of u.keys()) {
|
|
3702
3702
|
const f = U(d);
|
|
3703
3703
|
f && f.markDirty();
|
|
3704
3704
|
}
|
|
3705
|
-
}, o._pendingEditorState === null ? { tag: Bn } : void 0);
|
|
3706
|
-
}(this, i.map((o) => o.klass.getType())), () => {
|
|
3707
|
-
i.forEach((o) => o.transforms.delete(t));
|
|
3705
|
+
}), o._pendingEditorState === null ? { tag: Bn } : void 0);
|
|
3706
|
+
})(this, i.map(((o) => o.klass.getType()))), () => {
|
|
3707
|
+
i.forEach(((o) => o.transforms.delete(t)));
|
|
3708
3708
|
};
|
|
3709
3709
|
}
|
|
3710
3710
|
hasNode(e) {
|
|
@@ -3731,7 +3731,7 @@ class Sn {
|
|
|
3731
3731
|
const r = rt(this._config.theme, "root"), i = this._pendingEditorState || this._editorState;
|
|
3732
3732
|
if (this._rootElement = e, Ts(this, t, e, i), t !== null && (this._config.disableEvents || Ko(t), r != null && t.classList.remove(...r)), e !== null) {
|
|
3733
3733
|
const s = Er(e), o = e.style;
|
|
3734
|
-
o.userSelect = "text", o.whiteSpace = "pre-wrap", o.wordBreak = "break-word", e.setAttribute("data-lexical-editor", "true"), this._window = s, this._dirtyType = st, Ji(this), this._updateTags.add(Bn), ve(this), this._config.disableEvents || function(l, a) {
|
|
3734
|
+
o.userSelect = "text", o.whiteSpace = "pre-wrap", o.wordBreak = "break-word", e.setAttribute("data-lexical-editor", "true"), this._window = s, this._dirtyType = st, Ji(this), this._updateTags.add(Bn), ve(this), this._config.disableEvents || (function(l, a) {
|
|
3735
3735
|
const c = l.ownerDocument, u = un.get(c);
|
|
3736
3736
|
(u === void 0 || u < 1) && c.addEventListener("selectionchange", cs), un.set(c, (u || 0) + 1), l.__lexicalEditor = a;
|
|
3737
3737
|
const d = as(l);
|
|
@@ -3763,11 +3763,11 @@ class Sn {
|
|
|
3763
3763
|
return x && E(a, Oo, p);
|
|
3764
3764
|
}
|
|
3765
3765
|
};
|
|
3766
|
-
l.addEventListener(g, _), d.push(() => {
|
|
3766
|
+
l.addEventListener(g, _), d.push((() => {
|
|
3767
3767
|
l.removeEventListener(g, _);
|
|
3768
|
-
});
|
|
3768
|
+
}));
|
|
3769
3769
|
}
|
|
3770
|
-
}(e, this), r != null && e.classList.add(...r);
|
|
3770
|
+
})(e, this), r != null && e.classList.add(...r);
|
|
3771
3771
|
} else this._window = null, this._updateTags.add(Bn), ve(this);
|
|
3772
3772
|
Ct("root", this, !1, e, t);
|
|
3773
3773
|
}
|
|
@@ -3786,7 +3786,7 @@ class Sn {
|
|
|
3786
3786
|
i === null || i.isEmpty() || (o != null && s.add(o), ve(this)), this._pendingEditorState = r, this._dirtyType = st, this._dirtyElements.set("root", !1), this._compositionKey = null, o != null && s.add(o), this._updating || ve(this);
|
|
3787
3787
|
}
|
|
3788
3788
|
parseEditorState(e, t) {
|
|
3789
|
-
return function(r, i, s) {
|
|
3789
|
+
return (function(r, i, s) {
|
|
3790
3790
|
const o = Cr(), l = j, a = Z, c = $, u = i._dirtyElements, d = i._dirtyLeaves, f = i._cloneNotNeeded, g = i._dirtyType;
|
|
3791
3791
|
i._dirtyElements = /* @__PURE__ */ new Map(), i._dirtyLeaves = /* @__PURE__ */ new Set(), i._cloneNotNeeded = /* @__PURE__ */ new Set(), i._dirtyType = 0, j = o, Z = !1, $ = i, Sr(null);
|
|
3792
3792
|
try {
|
|
@@ -3798,7 +3798,7 @@ class Sn {
|
|
|
3798
3798
|
i._dirtyElements = u, i._dirtyLeaves = d, i._cloneNotNeeded = f, i._dirtyType = g, j = l, Z = a, $ = c;
|
|
3799
3799
|
}
|
|
3800
3800
|
return o;
|
|
3801
|
-
}(typeof e == "string" ? JSON.parse(e) : e, this, t);
|
|
3801
|
+
})(typeof e == "string" ? JSON.parse(e) : e, this, t);
|
|
3802
3802
|
}
|
|
3803
3803
|
read(e) {
|
|
3804
3804
|
return ve(this), this.getEditorState().read(e, { editor: this });
|
|
@@ -3810,12 +3810,12 @@ class Sn {
|
|
|
3810
3810
|
}
|
|
3811
3811
|
focus(e, t = {}) {
|
|
3812
3812
|
const r = this._rootElement;
|
|
3813
|
-
r !== null && (r.setAttribute("autocapitalize", "off"), te(this, () => {
|
|
3813
|
+
r !== null && (r.setAttribute("autocapitalize", "off"), te(this, (() => {
|
|
3814
3814
|
const i = L(), s = re();
|
|
3815
|
-
i !== null ? i.dirty || ie(i.clone()) : s.getChildrenSize() !== 0 && (t.defaultSelection === "rootStart" ? s.selectStart() : s.selectEnd()), ol("focus"), ll(() => {
|
|
3815
|
+
i !== null ? i.dirty || ie(i.clone()) : s.getChildrenSize() !== 0 && (t.defaultSelection === "rootStart" ? s.selectStart() : s.selectEnd()), ol("focus"), ll((() => {
|
|
3816
3816
|
r.removeAttribute("autocapitalize"), e && e();
|
|
3817
|
-
});
|
|
3818
|
-
}), this._pendingEditorState === null && r.removeAttribute("autocapitalize"));
|
|
3817
|
+
}));
|
|
3818
|
+
})), this._pendingEditorState === null && r.removeAttribute("autocapitalize"));
|
|
3819
3819
|
}
|
|
3820
3820
|
blur() {
|
|
3821
3821
|
const e = this._rootElement;
|
|
@@ -3911,10 +3911,10 @@ function ra(n) {
|
|
|
3911
3911
|
return M(n) || nt(n) || z(n);
|
|
3912
3912
|
}
|
|
3913
3913
|
function Ms(n, e) {
|
|
3914
|
-
const t = function() {
|
|
3914
|
+
const t = (function() {
|
|
3915
3915
|
const o = ir;
|
|
3916
3916
|
return ir = null, o;
|
|
3917
|
-
}();
|
|
3917
|
+
})();
|
|
3918
3918
|
if ((e = e || t && t.__key) != null) return void (n.__key = e);
|
|
3919
3919
|
G(), ms();
|
|
3920
3920
|
const r = R(), i = Fe(), s = "" + tl++;
|
|
@@ -3930,7 +3930,7 @@ function Re(n) {
|
|
|
3930
3930
|
function gn(n) {
|
|
3931
3931
|
ms();
|
|
3932
3932
|
const e = n.getLatest(), t = e.__parent, r = Fe(), i = R(), s = r._nodeMap, o = i._dirtyElements;
|
|
3933
|
-
t !== null && function(a, c, u) {
|
|
3933
|
+
t !== null && (function(a, c, u) {
|
|
3934
3934
|
let d = a;
|
|
3935
3935
|
for (; d !== null; ) {
|
|
3936
3936
|
if (u.has(d)) return;
|
|
@@ -3938,7 +3938,7 @@ function gn(n) {
|
|
|
3938
3938
|
if (f === void 0) break;
|
|
3939
3939
|
u.set(d, !1), d = f.__parent;
|
|
3940
3940
|
}
|
|
3941
|
-
}(t, s, o);
|
|
3941
|
+
})(t, s, o);
|
|
3942
3942
|
const l = e.__key;
|
|
3943
3943
|
i._dirtyType = Ii, v(n) ? o.set(l, !0) : i._dirtyLeaves.add(l);
|
|
3944
3944
|
}
|
|
@@ -3984,7 +3984,7 @@ function As(n) {
|
|
|
3984
3984
|
return n._pendingDecorators = t, t;
|
|
3985
3985
|
}
|
|
3986
3986
|
function vi(n) {
|
|
3987
|
-
return n.read(() => re().getTextContent());
|
|
3987
|
+
return n.read((() => re().getTextContent()));
|
|
3988
3988
|
}
|
|
3989
3989
|
function re() {
|
|
3990
3990
|
return Ds(Fe());
|
|
@@ -3998,7 +3998,7 @@ function ie(n) {
|
|
|
3998
3998
|
n !== null && (n.dirty = !0, n.setCachedNodes(null)), e._selection = n;
|
|
3999
3999
|
}
|
|
4000
4000
|
function et(n) {
|
|
4001
|
-
const e = R(), t = function(r, i) {
|
|
4001
|
+
const e = R(), t = (function(r, i) {
|
|
4002
4002
|
let s = r;
|
|
4003
4003
|
for (; s != null; ) {
|
|
4004
4004
|
const o = Tn(s, i);
|
|
@@ -4006,7 +4006,7 @@ function et(n) {
|
|
|
4006
4006
|
s = Lt(s);
|
|
4007
4007
|
}
|
|
4008
4008
|
return null;
|
|
4009
|
-
}(n, e);
|
|
4009
|
+
})(n, e);
|
|
4010
4010
|
return t === null ? n === e.getRootElement() ? U("root") : null : U(t);
|
|
4011
4011
|
}
|
|
4012
4012
|
function Ps(n) {
|
|
@@ -4053,11 +4053,11 @@ function br(n, e, t, r, i) {
|
|
|
4053
4053
|
if (Y(null), vt || it || Zt) s.remove();
|
|
4054
4054
|
else {
|
|
4055
4055
|
const _ = R();
|
|
4056
|
-
setTimeout(() => {
|
|
4057
|
-
_.update(() => {
|
|
4056
|
+
setTimeout((() => {
|
|
4057
|
+
_.update((() => {
|
|
4058
4058
|
s.isAttached() && s.remove();
|
|
4059
|
-
});
|
|
4060
|
-
}, 20);
|
|
4059
|
+
}));
|
|
4060
|
+
}), 20);
|
|
4061
4061
|
}
|
|
4062
4062
|
return;
|
|
4063
4063
|
}
|
|
@@ -4154,7 +4154,7 @@ function Is(n) {
|
|
|
4154
4154
|
return t === "insertFromPaste" || t === "insertFromPasteAsQuotation";
|
|
4155
4155
|
}
|
|
4156
4156
|
function E(n, e, t) {
|
|
4157
|
-
return function(r, i, s) {
|
|
4157
|
+
return (function(r, i, s) {
|
|
4158
4158
|
const o = Tr(r);
|
|
4159
4159
|
for (let l = 4; l >= 0; l--) for (let a = 0; a < o.length; a++) {
|
|
4160
4160
|
const c = o[a], u = c._commands.get(i);
|
|
@@ -4163,14 +4163,14 @@ function E(n, e, t) {
|
|
|
4163
4163
|
if (d !== void 0) {
|
|
4164
4164
|
const f = Array.from(d), g = f.length;
|
|
4165
4165
|
let h = !1;
|
|
4166
|
-
if (te(c, () => {
|
|
4166
|
+
if (te(c, (() => {
|
|
4167
4167
|
for (let _ = 0; _ < g; _++) if (f[_](s, r)) return void (h = !0);
|
|
4168
|
-
}), h) return h;
|
|
4168
|
+
})), h) return h;
|
|
4169
4169
|
}
|
|
4170
4170
|
}
|
|
4171
4171
|
}
|
|
4172
4172
|
return !1;
|
|
4173
|
-
}(n, e, t);
|
|
4173
|
+
})(n, e, t);
|
|
4174
4174
|
}
|
|
4175
4175
|
function Nn(n) {
|
|
4176
4176
|
return !ne(n) && !n.isLastChild() && !n.isInline();
|
|
@@ -4297,7 +4297,7 @@ function Oi(n) {
|
|
|
4297
4297
|
if (!n._readOnly && n.isEmpty()) return _l;
|
|
4298
4298
|
n._readOnly || T(192);
|
|
4299
4299
|
let e = Mi.get(n);
|
|
4300
|
-
return e || (e = function(t) {
|
|
4300
|
+
return e || (e = (function(t) {
|
|
4301
4301
|
const r = /* @__PURE__ */ new Map();
|
|
4302
4302
|
for (const [i, s] of t._nodeMap) {
|
|
4303
4303
|
const o = s.__type;
|
|
@@ -4305,7 +4305,7 @@ function Oi(n) {
|
|
|
4305
4305
|
l || (l = /* @__PURE__ */ new Map(), r.set(o, l)), l.set(i, s);
|
|
4306
4306
|
}
|
|
4307
4307
|
return r;
|
|
4308
|
-
}(n), Mi.set(n, e)), e;
|
|
4308
|
+
})(n), Mi.set(n, e)), e;
|
|
4309
4309
|
}
|
|
4310
4310
|
function pl(n) {
|
|
4311
4311
|
const e = n.constructor.clone(n);
|
|
@@ -4322,14 +4322,14 @@ function ml(n) {
|
|
|
4322
4322
|
return n.__lexicalUnmanaged === !0;
|
|
4323
4323
|
}
|
|
4324
4324
|
function _t(n, e) {
|
|
4325
|
-
return function(t, r) {
|
|
4325
|
+
return (function(t, r) {
|
|
4326
4326
|
return Object.prototype.hasOwnProperty.call(t, r);
|
|
4327
|
-
}(n, e) && n[e] !== ct[e];
|
|
4327
|
+
})(n, e) && n[e] !== ct[e];
|
|
4328
4328
|
}
|
|
4329
4329
|
function Mr(n) {
|
|
4330
|
-
const e = zr in n.prototype ? n.prototype[zr]() : void 0, t = /* @__PURE__ */ function(o) {
|
|
4330
|
+
const e = zr in n.prototype ? n.prototype[zr]() : void 0, t = /* @__PURE__ */ (function(o) {
|
|
4331
4331
|
return o === Ss || o === Dt || o === ct;
|
|
4332
|
-
}(n), r = !t && _t(n, "getType") ? n.getType() : void 0;
|
|
4332
|
+
})(n), r = !t && _t(n, "getType") ? n.getType() : void 0;
|
|
4333
4333
|
let i, s = r;
|
|
4334
4334
|
if (e) if (r) i = e[r];
|
|
4335
4335
|
else for (const [o, l] of Object.entries(e)) s = o, i = l;
|
|
@@ -4545,12 +4545,12 @@ function Ye(n, e, t) {
|
|
|
4545
4545
|
function ge(n, e, t = "error") {
|
|
4546
4546
|
const r = n.getTextContentSize();
|
|
4547
4547
|
let i = e === "next" ? r : e === "previous" ? 0 : e;
|
|
4548
|
-
return (i < 0 || i > r) && (t !== "clamp" && function(s, ...o) {
|
|
4548
|
+
return (i < 0 || i > r) && (t !== "clamp" && (function(s, ...o) {
|
|
4549
4549
|
const l = new URL("https://lexical.dev/docs/error"), a = new URLSearchParams();
|
|
4550
4550
|
a.append("code", s);
|
|
4551
4551
|
for (const c of o) a.append("v", c);
|
|
4552
4552
|
l.search = a.toString(), console.warn(`Minified Lexical warning #${s}; visit ${l.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
|
|
4553
|
-
}(284, String(e), String(r), n.getKey()), i = i < 0 ? 0 : r), i;
|
|
4553
|
+
})(284, String(e), String(r), n.getKey()), i = i < 0 ? 0 : r), i;
|
|
4554
4554
|
}
|
|
4555
4555
|
function Ai(n, e) {
|
|
4556
4556
|
return new Nl(n, e);
|
|
@@ -4579,10 +4579,10 @@ class Pr {
|
|
|
4579
4579
|
getTextSlices() {
|
|
4580
4580
|
const e = (i) => {
|
|
4581
4581
|
const s = this[i].getLatest();
|
|
4582
|
-
return Ae(s) ? function(o, l) {
|
|
4582
|
+
return Ae(s) ? (function(o, l) {
|
|
4583
4583
|
const { direction: a, origin: c } = o, u = ge(c, l === "focus" ? Qe(a) : a);
|
|
4584
4584
|
return Ai(o, u - o.offset);
|
|
4585
|
-
}(s, i) : null;
|
|
4585
|
+
})(s, i) : null;
|
|
4586
4586
|
}, t = e("anchor"), r = e("focus");
|
|
4587
4587
|
if (t && r) {
|
|
4588
4588
|
const { caret: i } = t, { caret: s } = r;
|
|
@@ -4644,9 +4644,9 @@ function Rs(n, e) {
|
|
|
4644
4644
|
switch (t === null && T(275, n.origin.getKey(), e.origin.getKey()), t.type) {
|
|
4645
4645
|
case "same": {
|
|
4646
4646
|
const r = n.type === "text", i = e.type === "text";
|
|
4647
|
-
return r && i ? function(s, o) {
|
|
4647
|
+
return r && i ? (function(s, o) {
|
|
4648
4648
|
return Math.sign(s - o);
|
|
4649
|
-
}(n.offset, e.offset) : n.type === e.type ? 0 : r ? -1 : i ? 1 : n.type === "child" ? -1 : 1;
|
|
4649
|
+
})(n.offset, e.offset) : n.type === e.type ? 0 : r ? -1 : i ? 1 : n.type === "child" ? -1 : 1;
|
|
4650
4650
|
}
|
|
4651
4651
|
case "ancestor":
|
|
4652
4652
|
return n.type === "child" ? -1 : 1;
|
|
@@ -4747,7 +4747,7 @@ function El(n, e = "removeEmptySlices") {
|
|
|
4747
4747
|
d = de(h);
|
|
4748
4748
|
break;
|
|
4749
4749
|
}
|
|
4750
|
-
const f = function(h, _, p) {
|
|
4750
|
+
const f = (function(h, _, p) {
|
|
4751
4751
|
if (!h || !_) return null;
|
|
4752
4752
|
const x = h.getParentAtCaret(), y = _.getParentAtCaret();
|
|
4753
4753
|
if (!x || !y) return null;
|
|
@@ -4766,9 +4766,9 @@ function El(n, e = "removeEmptySlices") {
|
|
|
4766
4766
|
!W && F(P) && (W = P);
|
|
4767
4767
|
}
|
|
4768
4768
|
return W;
|
|
4769
|
-
}, k = w(m, Ee), S = k && w(N, (O) => p.has(O.getKey()) && Ee(O));
|
|
4769
|
+
}, k = w(m, Ee), S = k && w(N, ((O) => p.has(O.getKey()) && Ee(O)));
|
|
4770
4770
|
return k && S ? [k, S] : null;
|
|
4771
|
-
}(u, d, a);
|
|
4771
|
+
})(u, d, a);
|
|
4772
4772
|
if (f) {
|
|
4773
4773
|
const [h, _] = f;
|
|
4774
4774
|
Pe(h, "previous").splice(0, _.getChildren()), _.remove();
|
|
@@ -4776,10 +4776,10 @@ function El(n, e = "removeEmptySlices") {
|
|
|
4776
4776
|
const g = [u, d, ...o, ...l].find(jn);
|
|
4777
4777
|
if (g)
|
|
4778
4778
|
return bl(Ge(de(g), n.direction));
|
|
4779
|
-
T(269, JSON.stringify(o.map((h) => h.origin.__key)));
|
|
4779
|
+
T(269, JSON.stringify(o.map(((h) => h.origin.__key))));
|
|
4780
4780
|
}
|
|
4781
4781
|
function de(n) {
|
|
4782
|
-
const e = function(i) {
|
|
4782
|
+
const e = (function(i) {
|
|
4783
4783
|
let s = i;
|
|
4784
4784
|
for (; he(s); ) {
|
|
4785
4785
|
const o = Dr(s);
|
|
@@ -4787,7 +4787,7 @@ function de(n) {
|
|
|
4787
4787
|
s = o;
|
|
4788
4788
|
}
|
|
4789
4789
|
return s;
|
|
4790
|
-
}(n.getLatest()), { direction: t } = e;
|
|
4790
|
+
})(n.getLatest()), { direction: t } = e;
|
|
4791
4791
|
if (M(e.origin)) return Ae(e) ? e : Ye(e.origin, t, t);
|
|
4792
4792
|
const r = e.getAdjacentCaret();
|
|
4793
4793
|
return at(r) && M(r.origin) ? Ye(r.origin, t, Qe(t)) : e;
|
|
@@ -4826,11 +4826,11 @@ function aa(n, { $copyElementNode: e = cl, $splitTextPointCaretNext: t = Al, roo
|
|
|
4826
4826
|
if (s) {
|
|
4827
4827
|
const { origin: o } = s;
|
|
4828
4828
|
if (he(n) && (!o.canBeEmpty() || !i(o, "first"))) return Kt(s);
|
|
4829
|
-
const l = function(a) {
|
|
4829
|
+
const l = (function(a) {
|
|
4830
4830
|
const c = [];
|
|
4831
4831
|
for (let u = a.getAdjacentCaret(); u; u = u.getAdjacentCaret()) c.push(u.origin);
|
|
4832
4832
|
return c;
|
|
4833
|
-
}(n);
|
|
4833
|
+
})(n);
|
|
4834
4834
|
(l.length > 0 || o.canBeEmpty() && i(o, "last")) && s.insert(e(o).splice(0, 0, l));
|
|
4835
4835
|
}
|
|
4836
4836
|
return s;
|
|
@@ -4960,4 +4960,4 @@ export {
|
|
|
4960
4960
|
mr as y,
|
|
4961
4961
|
xo as z
|
|
4962
4962
|
};
|
|
4963
|
-
//# sourceMappingURL=Lexical.prod-
|
|
4963
|
+
//# sourceMappingURL=Lexical.prod-qYl_ifJ6.js.map
|