@uva-glass/component-library 3.57.2 → 3.57.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/ActionList-D2GC2qPX.js.map +1 -1
- package/dist/AddCatalogueLinkForm-Di0xm7Ep.js.map +1 -1
- package/dist/ClipboardButton-Cg6LGUiD.js.map +1 -1
- package/dist/ControlsButton-Byx4XQtB.js.map +1 -1
- package/dist/CopyableText-BKsM-TuS.js.map +1 -1
- package/dist/DataTable-Cgn_RKTA.js.map +1 -1
- package/dist/{Lexical.prod-nAj5fF96.js → Lexical.prod-Dy5aDppc.js} +2449 -1794
- package/dist/Lexical.prod-Dy5aDppc.js.map +1 -0
- package/dist/LexicalClipboard.prod-CS8a49uL.js +398 -0
- package/dist/LexicalClipboard.prod-CS8a49uL.js.map +1 -0
- package/dist/{LexicalComposerContext.prod-DumMmRBt.js → LexicalComposerContext.prod-D4HOlWII.js} +3 -3
- package/dist/LexicalComposerContext.prod-D4HOlWII.js.map +1 -0
- package/dist/LexicalHtml.prod-BtzosUOH.js +1611 -0
- package/dist/LexicalHtml.prod-BtzosUOH.js.map +1 -0
- package/dist/LexicalLink.prod-DzgwWhQM.js +646 -0
- package/dist/LexicalLink.prod-DzgwWhQM.js.map +1 -0
- package/dist/LexicalList.prod-icY8mpm6.js +710 -0
- package/dist/LexicalList.prod-icY8mpm6.js.map +1 -0
- package/dist/{LexicalTable.prod-BpHQYpBM.js → LexicalTable.prod-Bf0is-op.js} +674 -750
- package/dist/LexicalTable.prod-Bf0is-op.js.map +1 -0
- package/dist/LexicalUtils.prod-CjGUKarD.js +259 -0
- package/dist/LexicalUtils.prod-CjGUKarD.js.map +1 -0
- package/dist/{LinkContextMenu-Byu3AEqp.js → LinkContextMenu-C8ehPbP8.js} +2 -2
- package/dist/{LinkContextMenu-Byu3AEqp.js.map → LinkContextMenu-C8ehPbP8.js.map} +1 -1
- package/dist/MenuLink-sK2_W2zs.js.map +1 -1
- package/dist/MetaDataList-Co9WCexh.js.map +1 -1
- package/dist/MultiSelectBox-D34qAgzc.js.map +1 -1
- package/dist/OverlayStepBar-BiC06Itd.js.map +1 -1
- package/dist/{PasteHandlerPlugin-DyTXcFsj.js → PasteHandlerPlugin-CSo_lOE8.js} +6 -6
- package/dist/{PasteHandlerPlugin-DyTXcFsj.js.map → PasteHandlerPlugin-CSo_lOE8.js.map} +1 -1
- package/dist/Periods-B4ms3N24.js.map +1 -1
- package/dist/SortableProvider-D-6Ttz0h.js.map +1 -1
- package/dist/{TableCellContextMenu--4IdoKAU.js → TableCellContextMenu-Cu5iXYSJ.js} +2 -2
- package/dist/{TableCellContextMenu--4IdoKAU.js.map → TableCellContextMenu-Cu5iXYSJ.js.map} +1 -1
- package/dist/{TableCellResizerPlugin-Dn8Ks2Lm.js → TableCellResizerPlugin-Bb2blXnq.js} +43 -43
- package/dist/TableCellResizerPlugin-Bb2blXnq.js.map +1 -0
- package/dist/VarIndicator-D0cnlcIf.js.map +1 -1
- package/dist/{chunk-5WKL7XVT-3IraU-Ja.js → chunk-5WKL7XVT-CvOIS3NE.js} +15 -15
- package/dist/{chunk-5WKL7XVT-3IraU-Ja.js.map → chunk-5WKL7XVT-CvOIS3NE.js.map} +1 -1
- package/dist/{client-BcEWjSJP.js → client-CXlG3hNo.js} +956 -957
- package/dist/{client-BcEWjSJP.js.map → client-CXlG3hNo.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.stories.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.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.stories.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.stories.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.stories.js.map +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.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 +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +3 -3
- package/dist/components/CheckboxTree/CheckboxTree.stories.js.map +1 -1
- package/dist/components/CheckboxTree/index.js +1 -1
- package/dist/components/Chip/Chip.stories.js +1 -1
- package/dist/components/ControlsButton/ControlsButton.stories.js +1 -1
- package/dist/components/CopyableText/CopyableText.stories.js.map +1 -1
- package/dist/components/DataTable/DataTable.stories.js +2 -2
- package/dist/components/DataTable/DataTable.stories.js.map +1 -1
- package/dist/components/Drawer/Drawer.stories.js +1 -1
- package/dist/components/Drawer/Drawer.stories.js.map +1 -1
- package/dist/components/EmptyStateDataDisplay/EmptyStateDataDisplay.stories.js.map +1 -1
- package/dist/components/FeedbackBar/FeedbackBar.stories.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 +1 -1
- package/dist/components/FormInput/FormInput.stories.js +2 -2
- package/dist/components/FormInput/index.js +1 -1
- package/dist/components/GridRow/GridRow.stories.js.map +1 -1
- package/dist/components/Icon/Icon.stories.js.map +1 -1
- package/dist/components/IconButton/IconButton.stories.js +1 -1
- package/dist/components/IconButton/IconButton.stories.js.map +1 -1
- package/dist/components/InfoBanner/InfoBanner.stories.js.map +1 -1
- package/dist/components/InfoMessage/InfoMessage.stories.js.map +1 -1
- package/dist/components/InputField/InputField.stories.js +1 -1
- 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.stories.js.map +1 -1
- package/dist/components/MetaDataBar/MetaDataBar.stories.js.map +1 -1
- package/dist/components/MetaDataBar/MetaDataBar.test.js +1 -1
- package/dist/components/MetaDataBar/MetaDataBar.test.js.map +1 -1
- package/dist/components/MetaDataList/MetaDataList.stories.js.map +1 -1
- package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
- package/dist/components/ModalDialog/ModalDialog.stories.js.map +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 +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.stories.js +1 -1
- package/dist/components/MultiSelectBox/MultiSelectBox.stories.js.map +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.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/OverlayCloseButton/OverlayCloseButton.stories.js.map +1 -1
- package/dist/components/PageOverlay/PageOverlay.stories.js.map +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.stories.js +2 -2
- package/dist/components/PeriodSelector/PeriodSelector.stories.js.map +1 -1
- package/dist/components/PeriodSelector/index.js +1 -1
- package/dist/components/Periods/Periods.stories.js.map +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js.map +1 -1
- package/dist/components/RadioButton/RadioButton.stories.js.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.stories.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.stories.js.map +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 +1 -1
- package/dist/components/RadioTabSelector/RadioTabSelector.stories.js +2 -2
- package/dist/components/RadioTabSelector/index.js +1 -1
- package/dist/components/Repeater/Repeater.stories.js.map +1 -1
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
- package/dist/components/RteEditor/EditorHeader/index.js +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js +35 -35
- package/dist/components/RteEditor/Plugins/CourseCataloguePlugin/CourseCataloguePlugin.js.map +1 -1
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/HistoryPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +15 -15
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/TableCellResizerPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/TableCellResizerPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/index.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +33 -33
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js.map +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +2 -2
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/index.js +4 -4
- package/dist/components/RteEditor/RteEditor.js +1 -1
- package/dist/components/RteEditor/RteEditor.stories.js +1 -1
- package/dist/components/RteEditor/RteEditor.stories.js.map +1 -1
- package/dist/components/RteEditor/helpers.js +7 -7
- package/dist/components/RteEditor/helpers.js.map +1 -1
- package/dist/components/RteEditor/index.js +1 -1
- package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js +18 -18
- package/dist/components/RteEditor/nodes/CourseCatalogueNode/CourseCatalogueNode.js.map +1 -1
- package/dist/components/RteEditor/nodes/TableWrapperNode/TableWrapperNode.js +22 -22
- package/dist/components/SearchField/SearcheField.stories.js.map +1 -1
- package/dist/components/SectionNotification/SectionNotification.stories.js.map +1 -1
- package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
- package/dist/components/SelectListbox/SelectListBox.stories.js.map +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/SelectOption.js.map +1 -1
- package/dist/components/Slider/Slider.stories.js.map +1 -1
- package/dist/components/Sortable/Sortable.stories.js +1 -1
- package/dist/components/Sortable/Sortable.stories.js.map +1 -1
- package/dist/components/Spinner/Spinner.stories.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/StatusPill/StatusPill.stories.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.stories.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/WeekSelector/WeekSelector.js.map +1 -1
- package/dist/components/WeekSelector/WeekSelector.stories.js.map +1 -1
- package/dist/components/WeekSelector/components/WeekSelectorOption.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/components-CgBF6db6.js +2013 -0
- package/dist/components-CgBF6db6.js.map +1 -0
- package/dist/{dist-C6Ar8a59.js → dist-oLwM--0y.js} +14 -14
- package/dist/{dist-C6Ar8a59.js.map → dist-oLwM--0y.js.map} +1 -1
- package/dist/{esm-B6Pg-v2v.js → esm-BXzGXYWZ.js} +3 -3
- package/dist/{esm-B6Pg-v2v.js.map → esm-BXzGXYWZ.js.map} +1 -1
- package/dist/{helpers-BzYayeT-.js → helpers-MMNO9vlK.js} +9 -9
- package/dist/helpers-MMNO9vlK.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/{react-18-DbbN8Pdb.js → react-18-BwdnKC48.js} +3 -3
- package/dist/react-18-BwdnKC48.js.map +1 -0
- package/dist/{react.esm-56DGmlLk.js → react.esm-DwWzhs9e.js} +17 -17
- package/dist/react.esm-DwWzhs9e.js.map +1 -0
- package/dist/setupTests.js +2 -2
- package/dist/setupTests.js.map +1 -1
- package/dist/storybook__react.d.js +266 -266
- package/dist/storybook__react.d.js.map +1 -1
- package/dist/{test-WxLxsxwA.js → test-Gtly6H2f.js} +7 -5
- package/dist/{test-WxLxsxwA.js.map → test-Gtly6H2f.js.map} +1 -1
- package/dist/{test-utils-CMrZ33U0.js → test-utils-BVa31HVj.js} +2 -2
- package/dist/{test-utils-CMrZ33U0.js.map → test-utils-BVa31HVj.js.map} +1 -1
- package/package.json +21 -22
- package/dist/Lexical.prod-nAj5fF96.js.map +0 -1
- package/dist/LexicalClipboard.prod-B9sWgdS2.js +0 -348
- package/dist/LexicalClipboard.prod-B9sWgdS2.js.map +0 -1
- package/dist/LexicalComposerContext.prod-DumMmRBt.js.map +0 -1
- package/dist/LexicalHtml.prod-RCMsF0qt.js +0 -2139
- package/dist/LexicalHtml.prod-RCMsF0qt.js.map +0 -1
- package/dist/LexicalLink.prod-BcBNTFEb.js +0 -707
- package/dist/LexicalLink.prod-BcBNTFEb.js.map +0 -1
- package/dist/LexicalList.prod-THQt9B32.js +0 -890
- package/dist/LexicalList.prod-THQt9B32.js.map +0 -1
- package/dist/LexicalTable.prod-BpHQYpBM.js.map +0 -1
- package/dist/LexicalUtils.prod-7S6iuu9A.js +0 -347
- package/dist/LexicalUtils.prod-7S6iuu9A.js.map +0 -1
- package/dist/TableCellResizerPlugin-Dn8Ks2Lm.js.map +0 -1
- package/dist/components-KU0q76JR.js +0 -2150
- package/dist/components-KU0q76JR.js.map +0 -1
- package/dist/helpers-BzYayeT-.js.map +0 -1
- package/dist/react-18-DbbN8Pdb.js.map +0 -1
- package/dist/react.esm-56DGmlLk.js.map +0 -1
- /package/dist/{chunk-CWhphoD1.js → rolldown-runtime-CWhphoD1.js} +0 -0
|
@@ -0,0 +1,646 @@
|
|
|
1
|
+
import { Bt as e, Ct as t, Dn as n, Dr as r, K as i, M as a, Mr as o, Qn as s, St as c, Wt as l, Z as u, _r as d, ar as f, c as p, g as m, gn as h, ln as ee, lr as g, lt as _, n as v, nr as y, p as b, qn as x, sr as S, tr as C, un as w, wn as T, x as te, zt as ne } from "./Lexical.prod-Dy5aDppc.js";
|
|
2
|
+
import { a as re } from "./LexicalUtils.prod-CjGUKarD.js";
|
|
3
|
+
import { T as ie, f as ae } from "./LexicalHtml.prod-BtzosUOH.js";
|
|
4
|
+
//#region node_modules/.pnpm/@lexical+link@0.46.0_typescript@5.9.3/node_modules/@lexical/link/dist/LexicalLink.prod.mjs
|
|
5
|
+
var oe = /* @__PURE__ */ new Set([
|
|
6
|
+
"http:",
|
|
7
|
+
"https:",
|
|
8
|
+
"mailto:",
|
|
9
|
+
"sms:",
|
|
10
|
+
"tel:"
|
|
11
|
+
]), E = class e extends _ {
|
|
12
|
+
__url;
|
|
13
|
+
__target;
|
|
14
|
+
__rel;
|
|
15
|
+
__title;
|
|
16
|
+
static getType() {
|
|
17
|
+
return "link";
|
|
18
|
+
}
|
|
19
|
+
static clone(t) {
|
|
20
|
+
return new e(t.__url, {
|
|
21
|
+
rel: t.__rel,
|
|
22
|
+
target: t.__target,
|
|
23
|
+
title: t.__title
|
|
24
|
+
}, t.__key);
|
|
25
|
+
}
|
|
26
|
+
constructor(e = "", t = {}, n) {
|
|
27
|
+
super(n);
|
|
28
|
+
let { target: r = null, rel: i = null, title: a = null } = t;
|
|
29
|
+
this.__url = e, this.__target = r, this.__rel = i, this.__title = a;
|
|
30
|
+
}
|
|
31
|
+
afterCloneFrom(e) {
|
|
32
|
+
super.afterCloneFrom(e), this.__url = e.__url, this.__rel = e.__rel, this.__target = e.__target, this.__title = e.__title;
|
|
33
|
+
}
|
|
34
|
+
createDOM(e) {
|
|
35
|
+
let t = document.createElement("a");
|
|
36
|
+
return this.updateLinkDOM(null, t, e), r(t, e.theme.link), t;
|
|
37
|
+
}
|
|
38
|
+
updateLinkDOM(e, t, n) {
|
|
39
|
+
if (g(t)) {
|
|
40
|
+
e && e.__url === this.__url || (t.href = this.sanitizeUrl(this.__url));
|
|
41
|
+
for (let n of [
|
|
42
|
+
"target",
|
|
43
|
+
"rel",
|
|
44
|
+
"title"
|
|
45
|
+
]) {
|
|
46
|
+
let r = `__${n}`, i = this[r];
|
|
47
|
+
e && e[r] === i || (i ? t[n] = i : t.removeAttribute(n));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
updateDOM(e, t, n) {
|
|
52
|
+
return this.updateLinkDOM(e, t, n), !1;
|
|
53
|
+
}
|
|
54
|
+
static importDOM() {
|
|
55
|
+
return { a: (e) => ({
|
|
56
|
+
conversion: A,
|
|
57
|
+
priority: 1
|
|
58
|
+
}) };
|
|
59
|
+
}
|
|
60
|
+
static importJSON(e) {
|
|
61
|
+
return j().updateFromJSON(e);
|
|
62
|
+
}
|
|
63
|
+
updateFromJSON(e) {
|
|
64
|
+
return super.updateFromJSON(e).setURL(e.url).setRel(e.rel || null).setTarget(e.target || null).setTitle(e.title || null);
|
|
65
|
+
}
|
|
66
|
+
sanitizeUrl(e) {
|
|
67
|
+
e = B(e);
|
|
68
|
+
try {
|
|
69
|
+
let t = new URL(B(e));
|
|
70
|
+
if (!oe.has(t.protocol)) return "about:blank";
|
|
71
|
+
} catch {
|
|
72
|
+
return e;
|
|
73
|
+
}
|
|
74
|
+
return e;
|
|
75
|
+
}
|
|
76
|
+
exportJSON() {
|
|
77
|
+
return {
|
|
78
|
+
...super.exportJSON(),
|
|
79
|
+
rel: this.getRel(),
|
|
80
|
+
target: this.getTarget(),
|
|
81
|
+
title: this.getTitle(),
|
|
82
|
+
url: this.getURL()
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
getURL() {
|
|
86
|
+
return this.getLatest().__url;
|
|
87
|
+
}
|
|
88
|
+
setURL(e) {
|
|
89
|
+
let t = this.getWritable();
|
|
90
|
+
return t.__url = e, t;
|
|
91
|
+
}
|
|
92
|
+
getTarget() {
|
|
93
|
+
return this.getLatest().__target;
|
|
94
|
+
}
|
|
95
|
+
setTarget(e) {
|
|
96
|
+
let t = this.getWritable();
|
|
97
|
+
return t.__target = e, t;
|
|
98
|
+
}
|
|
99
|
+
getRel() {
|
|
100
|
+
return this.getLatest().__rel;
|
|
101
|
+
}
|
|
102
|
+
setRel(e) {
|
|
103
|
+
let t = this.getWritable();
|
|
104
|
+
return t.__rel = e, t;
|
|
105
|
+
}
|
|
106
|
+
getTitle() {
|
|
107
|
+
return this.getLatest().__title;
|
|
108
|
+
}
|
|
109
|
+
setTitle(e) {
|
|
110
|
+
let t = this.getWritable();
|
|
111
|
+
return t.__title = e, t;
|
|
112
|
+
}
|
|
113
|
+
insertNewAfter(e, t = !0) {
|
|
114
|
+
let n = a(this);
|
|
115
|
+
return this.insertAfter(n, t), n;
|
|
116
|
+
}
|
|
117
|
+
canInsertTextBefore() {
|
|
118
|
+
return !1;
|
|
119
|
+
}
|
|
120
|
+
canInsertTextAfter() {
|
|
121
|
+
return !1;
|
|
122
|
+
}
|
|
123
|
+
canBeEmpty() {
|
|
124
|
+
return !1;
|
|
125
|
+
}
|
|
126
|
+
isInline() {
|
|
127
|
+
return !0;
|
|
128
|
+
}
|
|
129
|
+
extractWithChild(e, t, n) {
|
|
130
|
+
if (!h(t)) return !1;
|
|
131
|
+
let r = t.anchor.getNode(), i = t.focus.getNode();
|
|
132
|
+
return (this.is(r) || this.isParentOf(r)) && (this.is(i) || this.isParentOf(i)) && t.getTextContent().length > 0;
|
|
133
|
+
}
|
|
134
|
+
isEmailURI() {
|
|
135
|
+
return this.__url.startsWith("mailto:");
|
|
136
|
+
}
|
|
137
|
+
isWebSiteURI() {
|
|
138
|
+
return this.__url.startsWith("https://") || this.__url.startsWith("http://");
|
|
139
|
+
}
|
|
140
|
+
shouldMergeAdjacentLink(e) {
|
|
141
|
+
return this.getType() === e.getType() && this.__url === e.__url && this.__target === e.__target && this.__rel === e.__rel && this.__title === e.__title;
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
function D(e) {
|
|
145
|
+
let t = s(e, "next");
|
|
146
|
+
return [t, t.getFlipped()];
|
|
147
|
+
}
|
|
148
|
+
function O(t, n) {
|
|
149
|
+
for (let r of n) if (r.origin.isAttached()) {
|
|
150
|
+
e(t, S(r));
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
function k(e) {
|
|
155
|
+
let n = i(), r = null, o = null;
|
|
156
|
+
function s() {
|
|
157
|
+
h(n) && (O(n.anchor, r), O(n.focus, o), u(n));
|
|
158
|
+
}
|
|
159
|
+
h(n) && (r = D(n.anchor), o = D(n.focus));
|
|
160
|
+
let c = !1;
|
|
161
|
+
for (let t of b(e, "next")) {
|
|
162
|
+
let n = t.origin;
|
|
163
|
+
if (m(n) && !n.isInline()) {
|
|
164
|
+
let r = n.getChildren();
|
|
165
|
+
if (r.length > 0) {
|
|
166
|
+
let t = a(e);
|
|
167
|
+
t.append(...r), n.append(t), c = !0;
|
|
168
|
+
}
|
|
169
|
+
ee(n, l(t), { $shouldSplit: () => !1 });
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
function d(e, n, r) {
|
|
173
|
+
let [i, a] = e, o = (e) => t(e) && e.origin.is(n);
|
|
174
|
+
if (!o(i) && !o(a)) return e;
|
|
175
|
+
let s = S(b(r, "next"));
|
|
176
|
+
return [s, s.getFlipped()];
|
|
177
|
+
}
|
|
178
|
+
if (e.isAttached()) {
|
|
179
|
+
let t = e.getPreviousSibling();
|
|
180
|
+
if (M(t) && t.shouldMergeAdjacentLink(e)) return r &&= d(r, t, e), o &&= d(o, t, e), t.append(...e.getChildren()), e.remove(), void s();
|
|
181
|
+
let n = e.getNextSibling();
|
|
182
|
+
M(n) && e.shouldMergeAdjacentLink(n) && (r &&= d(r, e, n), o &&= d(o, e, n), e.append(...n.getChildren()), n.remove(), c = !0);
|
|
183
|
+
}
|
|
184
|
+
if (c) {
|
|
185
|
+
if (!e.canBeEmpty() && e.isEmpty()) {
|
|
186
|
+
let t = e.getParent();
|
|
187
|
+
e.remove(), t && t.isEmpty() && t.remove();
|
|
188
|
+
}
|
|
189
|
+
s();
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
function A(e) {
|
|
193
|
+
let t = null;
|
|
194
|
+
if (g(e)) {
|
|
195
|
+
let n = e.textContent;
|
|
196
|
+
(n !== null && n !== "" || e.children.length > 0) && (t = j(e.getAttribute("href") || "", {
|
|
197
|
+
rel: e.getAttribute("rel"),
|
|
198
|
+
target: e.getAttribute("target"),
|
|
199
|
+
title: e.getAttribute("title")
|
|
200
|
+
}));
|
|
201
|
+
}
|
|
202
|
+
return { node: t };
|
|
203
|
+
}
|
|
204
|
+
function j(e = "", t) {
|
|
205
|
+
return o(new E(e, t));
|
|
206
|
+
}
|
|
207
|
+
function M(e) {
|
|
208
|
+
return e instanceof E;
|
|
209
|
+
}
|
|
210
|
+
var N = class e extends E {
|
|
211
|
+
__isUnlinked;
|
|
212
|
+
constructor(e = "", t = {}, n) {
|
|
213
|
+
super(e, t, n), this.__isUnlinked = t.isUnlinked !== void 0 && t.isUnlinked !== null && t.isUnlinked;
|
|
214
|
+
}
|
|
215
|
+
afterCloneFrom(e) {
|
|
216
|
+
super.afterCloneFrom(e), this.__isUnlinked = e.__isUnlinked;
|
|
217
|
+
}
|
|
218
|
+
static getType() {
|
|
219
|
+
return "autolink";
|
|
220
|
+
}
|
|
221
|
+
static clone(t) {
|
|
222
|
+
return new e(t.__url, {
|
|
223
|
+
isUnlinked: t.__isUnlinked,
|
|
224
|
+
rel: t.__rel,
|
|
225
|
+
target: t.__target,
|
|
226
|
+
title: t.__title
|
|
227
|
+
}, t.__key);
|
|
228
|
+
}
|
|
229
|
+
shouldMergeAdjacentLink(e) {
|
|
230
|
+
return !1;
|
|
231
|
+
}
|
|
232
|
+
getIsUnlinked() {
|
|
233
|
+
return this.__isUnlinked;
|
|
234
|
+
}
|
|
235
|
+
setIsUnlinked(e) {
|
|
236
|
+
let t = this.getWritable();
|
|
237
|
+
return t.__isUnlinked = e, t;
|
|
238
|
+
}
|
|
239
|
+
createDOM(e) {
|
|
240
|
+
return this.__isUnlinked ? document.createElement("span") : super.createDOM(e);
|
|
241
|
+
}
|
|
242
|
+
updateDOM(e, t, n) {
|
|
243
|
+
return super.updateDOM(e, t, n) || e.__isUnlinked !== this.__isUnlinked;
|
|
244
|
+
}
|
|
245
|
+
static importJSON(e) {
|
|
246
|
+
return P().updateFromJSON(e);
|
|
247
|
+
}
|
|
248
|
+
updateFromJSON(e) {
|
|
249
|
+
return super.updateFromJSON(e).setIsUnlinked(e.isUnlinked || !1);
|
|
250
|
+
}
|
|
251
|
+
static importDOM() {
|
|
252
|
+
return null;
|
|
253
|
+
}
|
|
254
|
+
exportJSON() {
|
|
255
|
+
return {
|
|
256
|
+
...super.exportJSON(),
|
|
257
|
+
isUnlinked: this.__isUnlinked
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
insertNewAfter(e, t = !0) {
|
|
261
|
+
let n = P(this.__url, {
|
|
262
|
+
isUnlinked: this.__isUnlinked,
|
|
263
|
+
rel: this.__rel,
|
|
264
|
+
target: this.__target,
|
|
265
|
+
title: this.__title
|
|
266
|
+
});
|
|
267
|
+
return this.insertAfter(n, t), n;
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
function P(e = "", t) {
|
|
271
|
+
return o(new N(e, t));
|
|
272
|
+
}
|
|
273
|
+
function F(e) {
|
|
274
|
+
return e instanceof N;
|
|
275
|
+
}
|
|
276
|
+
var I = /* @__PURE__ */ te("TOGGLE_LINK_COMMAND");
|
|
277
|
+
function L(e, t) {
|
|
278
|
+
if (e.type === "element") {
|
|
279
|
+
let n = e.getNode();
|
|
280
|
+
return m(n) || function(e, ...t) {
|
|
281
|
+
let n = new URL("https://lexical.dev/docs/error"), r = new URLSearchParams();
|
|
282
|
+
r.append("code", e);
|
|
283
|
+
for (let e of t) r.append("v", e);
|
|
284
|
+
throw n.search = r.toString(), Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
|
|
285
|
+
}(252), n.getChildren()[e.offset + t] || null;
|
|
286
|
+
}
|
|
287
|
+
return null;
|
|
288
|
+
}
|
|
289
|
+
function R(e, t = {}) {
|
|
290
|
+
let n;
|
|
291
|
+
if (e && typeof e == "object") {
|
|
292
|
+
let { url: r, ...i } = e;
|
|
293
|
+
n = r, t = {
|
|
294
|
+
...i,
|
|
295
|
+
...t
|
|
296
|
+
};
|
|
297
|
+
} else n = e;
|
|
298
|
+
let { target: r, title: o } = t, s = t.rel === void 0 ? "noreferrer" : t.rel, c = i();
|
|
299
|
+
if (c === null || !h(c) && !x(c)) return;
|
|
300
|
+
if (x(c)) {
|
|
301
|
+
let e = c.getNodes();
|
|
302
|
+
if (e.length === 0) return;
|
|
303
|
+
e.forEach((e) => {
|
|
304
|
+
if (n === null) {
|
|
305
|
+
let t = v(e, (e) => !F(e) && M(e));
|
|
306
|
+
t && (t.insertBefore(e), t.getChildren().length === 0 && t.remove());
|
|
307
|
+
} else {
|
|
308
|
+
let t = v(e, (e) => !F(e) && M(e));
|
|
309
|
+
if (t) t.setURL(n), r !== void 0 && t.setTarget(r), s !== void 0 && t.setRel(s);
|
|
310
|
+
else {
|
|
311
|
+
let t = j(n, {
|
|
312
|
+
rel: s,
|
|
313
|
+
target: r
|
|
314
|
+
});
|
|
315
|
+
e.insertBefore(t), t.append(e);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
if (c.isCollapsed() && n === null) for (let e of c.getNodes()) {
|
|
322
|
+
let t = v(e, (e) => !F(e) && M(e));
|
|
323
|
+
t !== null && (t.getParentOrThrow().splice(t.getIndexWithinParent(), 0, t.getChildren()), t.remove());
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
let l = c.extract();
|
|
327
|
+
if (n === null) {
|
|
328
|
+
let e = /* @__PURE__ */ new Set();
|
|
329
|
+
l.forEach((t) => {
|
|
330
|
+
let n = v(t, (e) => !F(e) && M(e));
|
|
331
|
+
if (n !== null) {
|
|
332
|
+
let t = n.getKey();
|
|
333
|
+
if (e.has(t)) return;
|
|
334
|
+
(function(e, t) {
|
|
335
|
+
let n = new Set(t.filter((t) => e.isParentOf(t)).map((e) => e.getKey())), r = e.getChildren(), i = (r) => n.has(r.getKey()) || m(r) && t.some((t) => e.isParentOf(t) && r.isParentOf(t)), o = r.filter(i);
|
|
336
|
+
if (o.length === r.length) return r.forEach((t) => e.insertBefore(t)), void e.remove();
|
|
337
|
+
let s = r.findIndex(i), c = r.findLastIndex(i), l = s === 0, u = c === r.length - 1;
|
|
338
|
+
if (l) o.forEach((t) => e.insertBefore(t));
|
|
339
|
+
else if (u) for (let t = o.length - 1; t >= 0; t--) e.insertAfter(o[t]);
|
|
340
|
+
else {
|
|
341
|
+
for (let t = o.length - 1; t >= 0; t--) e.insertAfter(o[t]);
|
|
342
|
+
let t = r.slice(c + 1);
|
|
343
|
+
if (t.length > 0) {
|
|
344
|
+
let n = a(e);
|
|
345
|
+
o[o.length - 1].insertAfter(n), t.forEach((e) => n.append(e));
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
})(n, l), e.add(t);
|
|
349
|
+
}
|
|
350
|
+
});
|
|
351
|
+
return;
|
|
352
|
+
}
|
|
353
|
+
let d = /* @__PURE__ */ new Set(), f = (e) => {
|
|
354
|
+
d.has(e.getKey()) || (d.add(e.getKey()), e.setURL(n), r !== void 0 && e.setTarget(r), s !== void 0 && e.setRel(s), o !== void 0 && e.setTitle(o));
|
|
355
|
+
};
|
|
356
|
+
if (l.length === 1) {
|
|
357
|
+
let e = l[0], t = v(e, M);
|
|
358
|
+
if (t !== null) return f(t);
|
|
359
|
+
}
|
|
360
|
+
(function(e) {
|
|
361
|
+
let t = i();
|
|
362
|
+
if (!h(t)) return e();
|
|
363
|
+
let n = u(t), r = n.isBackward(), a = L(n.anchor, r ? -1 : 0), o = L(n.focus, r ? 0 : -1);
|
|
364
|
+
if (e(), a || o) {
|
|
365
|
+
let e = i();
|
|
366
|
+
if (h(e)) {
|
|
367
|
+
let t = e.clone();
|
|
368
|
+
if (a) {
|
|
369
|
+
let e = a.getParent();
|
|
370
|
+
e && t.anchor.set(e.getKey(), a.getIndexWithinParent() + +!!r, "element");
|
|
371
|
+
}
|
|
372
|
+
if (o) {
|
|
373
|
+
let e = o.getParent();
|
|
374
|
+
e && t.focus.set(e.getKey(), o.getIndexWithinParent() + +!r, "element");
|
|
375
|
+
}
|
|
376
|
+
w(u(t));
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
})(() => {
|
|
380
|
+
let e = null;
|
|
381
|
+
for (let t of l) {
|
|
382
|
+
if (!t.isAttached()) continue;
|
|
383
|
+
let i = v(t, M);
|
|
384
|
+
if (i) {
|
|
385
|
+
f(i);
|
|
386
|
+
continue;
|
|
387
|
+
}
|
|
388
|
+
if (m(t)) {
|
|
389
|
+
if (!t.isInline()) continue;
|
|
390
|
+
if (M(t)) {
|
|
391
|
+
if (!(F(t) || e !== null && e.getParentOrThrow().isParentOf(t))) {
|
|
392
|
+
f(t), e = t;
|
|
393
|
+
continue;
|
|
394
|
+
}
|
|
395
|
+
for (let e of t.getChildren()) t.insertBefore(e);
|
|
396
|
+
t.remove();
|
|
397
|
+
continue;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
let a = t.getPreviousSibling();
|
|
401
|
+
M(a) && a.is(e) ? a.append(t) : (e = j(n, {
|
|
402
|
+
rel: s,
|
|
403
|
+
target: r,
|
|
404
|
+
title: o
|
|
405
|
+
}), t.insertAfter(e), e.append(t));
|
|
406
|
+
}
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
var z = /^\+?[0-9\s()-]{5,}$/;
|
|
410
|
+
function B(e) {
|
|
411
|
+
return e.match(/^[a-z][a-z0-9+.-]*:/i) || e.match(/^[/#.]/) ? e : e.includes("@") ? `mailto:${e}` : z.test(e) ? `tel:${e}` : `https://${e}`;
|
|
412
|
+
}
|
|
413
|
+
ae.tag("a");
|
|
414
|
+
function V(e, t) {
|
|
415
|
+
return c(e.registerNodeTransform(E, k), e.registerCommand(I, (e) => {
|
|
416
|
+
let n = t.validateUrl.peek(), r = t.attributes.peek();
|
|
417
|
+
if (e === null) return R(null), !0;
|
|
418
|
+
if (typeof e == "string") return !(n !== void 0 && !n(e)) && (R(e, r), !0);
|
|
419
|
+
{
|
|
420
|
+
let { url: t, target: n, rel: i, title: a } = e;
|
|
421
|
+
return R(t, {
|
|
422
|
+
...r,
|
|
423
|
+
rel: i,
|
|
424
|
+
target: n,
|
|
425
|
+
title: a
|
|
426
|
+
}), !0;
|
|
427
|
+
}
|
|
428
|
+
}, 0), ie(() => {
|
|
429
|
+
let r = t.validateUrl.value;
|
|
430
|
+
if (!r) return;
|
|
431
|
+
let a = t.attributes.value;
|
|
432
|
+
return e.registerCommand(n, (t) => {
|
|
433
|
+
let n = i();
|
|
434
|
+
if (!h(n) || n.isCollapsed() || !re(t, ClipboardEvent) || t.clipboardData === null) return !1;
|
|
435
|
+
let o = t.clipboardData.getData("text");
|
|
436
|
+
return r(o) ? !n.getNodes().some((e) => m(e) || T(e) && !e.isSimpleText()) && (e.dispatchCommand(I, {
|
|
437
|
+
...a,
|
|
438
|
+
url: o
|
|
439
|
+
}), t.preventDefault(), !0) : !1;
|
|
440
|
+
}, 1);
|
|
441
|
+
}));
|
|
442
|
+
}
|
|
443
|
+
function H(e, t, n = {}) {
|
|
444
|
+
let r = (n) => {
|
|
445
|
+
let r = n.target;
|
|
446
|
+
if (!d(r)) return;
|
|
447
|
+
let a = p(r);
|
|
448
|
+
if (a === null) return;
|
|
449
|
+
let o = null, s = null;
|
|
450
|
+
if (a.update(() => {
|
|
451
|
+
let e = ne(r);
|
|
452
|
+
if (e !== null) {
|
|
453
|
+
let n = v(e, m);
|
|
454
|
+
if (!t.disabled.peek()) if (M(n)) o = n.sanitizeUrl(n.getURL()), s = n.getTarget();
|
|
455
|
+
else {
|
|
456
|
+
let e = function(e, t) {
|
|
457
|
+
let n = e;
|
|
458
|
+
for (; n != null;) {
|
|
459
|
+
if (t(n)) return n;
|
|
460
|
+
n = n.parentNode;
|
|
461
|
+
}
|
|
462
|
+
return null;
|
|
463
|
+
}(r, g);
|
|
464
|
+
e !== null && (o = e.href, s = e.target);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
}), o === null || o === "") return;
|
|
468
|
+
let c = e.read("latest", i);
|
|
469
|
+
if (h(c) && !c.isCollapsed()) return void n.preventDefault();
|
|
470
|
+
let l = n.type === "auxclick" && n.button === 1;
|
|
471
|
+
window.open(o, t.newTab.peek() || l || n.metaKey || n.ctrlKey || s === "_blank" ? "_blank" : "_self"), n.preventDefault();
|
|
472
|
+
}, a = (e) => {
|
|
473
|
+
e.button === 1 && r(e);
|
|
474
|
+
};
|
|
475
|
+
return e.registerRootListener((e) => {
|
|
476
|
+
if (e) return e.addEventListener("click", r, n), e.addEventListener("mouseup", a, n), () => {
|
|
477
|
+
e.removeEventListener("click", r), e.removeEventListener("mouseup", a);
|
|
478
|
+
};
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
function U(e, t = (e) => e) {
|
|
482
|
+
return (n) => {
|
|
483
|
+
let r = e.exec(n);
|
|
484
|
+
return r === null ? null : {
|
|
485
|
+
index: r.index,
|
|
486
|
+
length: r[0].length,
|
|
487
|
+
text: r[0],
|
|
488
|
+
url: t(r[0])
|
|
489
|
+
};
|
|
490
|
+
};
|
|
491
|
+
}
|
|
492
|
+
function W(e, t) {
|
|
493
|
+
for (let n = 0; n < t.length; n++) {
|
|
494
|
+
let r = t[n](e);
|
|
495
|
+
if (r) return r;
|
|
496
|
+
}
|
|
497
|
+
return null;
|
|
498
|
+
}
|
|
499
|
+
var G = /[.,;\s]/;
|
|
500
|
+
function K(e, t) {
|
|
501
|
+
return t.test(e);
|
|
502
|
+
}
|
|
503
|
+
function q(e, t) {
|
|
504
|
+
return K(e[e.length - 1], t);
|
|
505
|
+
}
|
|
506
|
+
function J(e, t) {
|
|
507
|
+
return K(e[0], t);
|
|
508
|
+
}
|
|
509
|
+
function Y(e, t) {
|
|
510
|
+
let n = e.getPreviousSibling();
|
|
511
|
+
return m(n) && (n = n.getLastDescendant()), n === null || C(n) || T(n) && q(n.getTextContent(), t);
|
|
512
|
+
}
|
|
513
|
+
function X(e, t) {
|
|
514
|
+
let n = e.getNextSibling();
|
|
515
|
+
return m(n) && (n = n.getFirstDescendant()), n === null || C(n) || T(n) && J(n.getTextContent(), t);
|
|
516
|
+
}
|
|
517
|
+
function se(e, t, n, r, i) {
|
|
518
|
+
return (e > 0 ? K(r[e - 1], n) : Y(i[0], n)) ? t < r.length ? K(r[t], n) : X(i[i.length - 1], n) : !1;
|
|
519
|
+
}
|
|
520
|
+
function ce(e, t, n) {
|
|
521
|
+
let r = [], i = [], a = [], o = 0, s = 0, c = [...e];
|
|
522
|
+
for (; c.length > 0;) {
|
|
523
|
+
let e = c[0], l = e.getTextContent().length, u = s;
|
|
524
|
+
s + l <= t ? (r.push(e), o += l) : u >= n ? a.push(e) : i.push(e), s += l, c.shift();
|
|
525
|
+
}
|
|
526
|
+
return [
|
|
527
|
+
o,
|
|
528
|
+
r,
|
|
529
|
+
i,
|
|
530
|
+
a
|
|
531
|
+
];
|
|
532
|
+
}
|
|
533
|
+
function le(e, t, n, r) {
|
|
534
|
+
let a = P(r.url, r.attributes);
|
|
535
|
+
if (e.length === 1) {
|
|
536
|
+
let i, o = e[0];
|
|
537
|
+
t === 0 ? [i, o] = o.splitText(n) : [, i, o] = o.splitText(t, n);
|
|
538
|
+
let s = f(r.text);
|
|
539
|
+
return s.setFormat(i.getFormat()), s.setDetail(i.getDetail()), s.setStyle(i.getStyle()), a.append(s), i.replace(a), o;
|
|
540
|
+
}
|
|
541
|
+
if (e.length > 1) {
|
|
542
|
+
let r = e[0], o, s = r.getTextContent().length;
|
|
543
|
+
t === 0 ? o = r : [, o] = r.splitText(t);
|
|
544
|
+
let c = [], l;
|
|
545
|
+
for (let t = 1; t < e.length; t++) {
|
|
546
|
+
let r = e[t], i = r.getTextContent().length, a = s;
|
|
547
|
+
if (a < n) if (s + i <= n) c.push(r);
|
|
548
|
+
else {
|
|
549
|
+
let [e, t] = r.splitText(n - a);
|
|
550
|
+
c.push(e), l = t;
|
|
551
|
+
}
|
|
552
|
+
s += i;
|
|
553
|
+
}
|
|
554
|
+
let u = i(), d = u ? u.getNodes().find(T) : void 0, p = f(o.getTextContent());
|
|
555
|
+
return p.setFormat(o.getFormat()), p.setDetail(o.getDetail()), p.setStyle(o.getStyle()), a.append(p, ...c), d && d === o && (h(u) ? p.select(u.anchor.offset, u.focus.offset) : x(u) && p.select(0, p.getTextContent().length)), o.replace(a), l;
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
function Z(e, t, n, r) {
|
|
559
|
+
let i = e.getChildren(), a = i.length;
|
|
560
|
+
for (let t = 0; t < a; t++) {
|
|
561
|
+
let r = i[t];
|
|
562
|
+
if (!T(r) || !r.isSimpleText()) return Q(e), void n(null, e.getURL());
|
|
563
|
+
}
|
|
564
|
+
let o = e.getTextContent(), s = W(o, t);
|
|
565
|
+
if (s === null || s.text !== o || !Y(e, r) || !X(e, r)) return Q(e), void n(null, e.getURL());
|
|
566
|
+
let c = e.getURL();
|
|
567
|
+
if (c !== s.url && (e.setURL(s.url), n(s.url, c)), s.attributes) {
|
|
568
|
+
let t = e.getRel();
|
|
569
|
+
t !== s.attributes.rel && (e.setRel(s.attributes.rel || null), n(s.attributes.rel || null, t));
|
|
570
|
+
let r = e.getTarget();
|
|
571
|
+
r !== s.attributes.target && (e.setTarget(s.attributes.target || null), n(s.attributes.target || null, r));
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
function Q(e) {
|
|
575
|
+
let t = e.getChildren();
|
|
576
|
+
for (let n = t.length - 1; n >= 0; n--) e.insertAfter(t[n]);
|
|
577
|
+
return e.remove(), t.map((e) => e.getLatest());
|
|
578
|
+
}
|
|
579
|
+
var $ = {
|
|
580
|
+
changeHandlers: [],
|
|
581
|
+
excludeParents: [],
|
|
582
|
+
matchers: [],
|
|
583
|
+
separatorRegex: G
|
|
584
|
+
};
|
|
585
|
+
function ue(e, t = $) {
|
|
586
|
+
let { matchers: n, changeHandlers: r, excludeParents: a, separatorRegex: o = G } = t, s = (e, t) => {
|
|
587
|
+
for (let n of r) n(e, t);
|
|
588
|
+
};
|
|
589
|
+
return c(e.registerNodeTransform(y, (e) => {
|
|
590
|
+
let t = e.getParentOrThrow(), r = e.getPreviousSibling();
|
|
591
|
+
F(t) ? Z(t, n, s, o) : !M(t) && !a.some((e) => e(t)) && (e.isSimpleText() && (J(e.getTextContent(), o) || !F(r)) && (function(e, t, n, r) {
|
|
592
|
+
for (let t of e) {
|
|
593
|
+
let e = t.getParent();
|
|
594
|
+
if (F(e) && !e.getIsUnlinked()) return;
|
|
595
|
+
}
|
|
596
|
+
let i = [...e], a = i.map((e) => e.getTextContent()).join(""), o, s = a, c = 0;
|
|
597
|
+
for (; (o = W(s, t)) && o !== null;) {
|
|
598
|
+
let e = o.index, t = e + o.length;
|
|
599
|
+
if (se(c + e, c + t, r, a, i)) {
|
|
600
|
+
let [r, , a, l] = ce(i, c + e, c + t), u = !1;
|
|
601
|
+
for (let e of a) {
|
|
602
|
+
let t = e.getParent();
|
|
603
|
+
if (F(t) && !t.getIsUnlinked()) {
|
|
604
|
+
u = !0;
|
|
605
|
+
break;
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
if (u) {
|
|
609
|
+
c += t, s = s.substring(t);
|
|
610
|
+
continue;
|
|
611
|
+
}
|
|
612
|
+
let d = le(a, c + e - r, c + t - r, o);
|
|
613
|
+
i = d ? [d, ...l] : l, n(o.url, null), c = 0;
|
|
614
|
+
} else c += t;
|
|
615
|
+
s = s.substring(t);
|
|
616
|
+
}
|
|
617
|
+
})(function(e) {
|
|
618
|
+
let t = [e], n = e.getNextSibling();
|
|
619
|
+
for (; n !== null && T(n) && n.isSimpleText() && (t.push(n), !/[\s]/.test(n.getTextContent()));) n = n.getNextSibling();
|
|
620
|
+
return t;
|
|
621
|
+
}(e), n, s, o), (function(e, t, n, r) {
|
|
622
|
+
let i = e.getParent(), a = e.getPreviousSibling(), o = e.getNextSibling(), s = e.getTextContent();
|
|
623
|
+
if (!F(i) || i.getIsUnlinked()) {
|
|
624
|
+
if (F(a) && !a.getIsUnlinked() && a.is(e.getPreviousSibling()) && e.getParent() === a.getParent()) {
|
|
625
|
+
if (!J(s, r)) return Q(a), void n(null, a.getURL());
|
|
626
|
+
if (c = s, a.isEmailURI() ? /^\.[a-zA-Z]{2,}/.test(c) : /^\.[a-zA-Z0-9]{1,}/.test(c)) {
|
|
627
|
+
let i = a.getTextContent() + s, o = W(i, t);
|
|
628
|
+
o !== null && o.text === i && (a.append(e), Z(a, t, n, r), n(null, a.getURL()));
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
var c;
|
|
632
|
+
!F(o) || o.getIsUnlinked() || q(s, r) || o.is(e.getNextSibling()) && e.getParent() === o.getParent() && (Q(o), n(null, o.getURL()));
|
|
633
|
+
}
|
|
634
|
+
})(e, n, s, o));
|
|
635
|
+
}), e.registerCommand(I, (e) => {
|
|
636
|
+
let t = i();
|
|
637
|
+
return e !== null || !h(t) || t.extract().forEach((e) => {
|
|
638
|
+
let t = e.getParent();
|
|
639
|
+
F(t) && (t.setIsUnlinked(!t.getIsUnlinked()), t.markDirty());
|
|
640
|
+
}), !1;
|
|
641
|
+
}, 1));
|
|
642
|
+
}
|
|
643
|
+
//#endregion
|
|
644
|
+
export { V as a, E as c, U as i, N as n, R as o, H as r, I as s, ue as t };
|
|
645
|
+
|
|
646
|
+
//# sourceMappingURL=LexicalLink.prod-DzgwWhQM.js.map
|