zt-react-milkdown 0.1.20 → 0.1.22
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/index.cjs +7 -7
- package/dist/index.mjs +760 -700
- package/dist/src/core/createEditor.d.ts.map +1 -1
- package/dist/src/plugins/custom/code-block/code-block-language-picker.d.ts.map +1 -1
- package/dist/src/plugins/custom/code-block/code-block-language.d.ts +16 -0
- package/dist/src/plugins/custom/code-block/code-block-language.d.ts.map +1 -1
- package/dist/src/plugins/custom/code-block/index.d.ts +2 -0
- package/dist/src/plugins/custom/code-block/index.d.ts.map +1 -1
- package/dist/src/plugins/custom/heading/heading-backspace-empty-paragraph.d.ts +3 -0
- package/dist/src/plugins/custom/heading/heading-backspace-empty-paragraph.d.ts.map +1 -0
- package/dist/src/plugins/custom/heading/index.d.ts +3 -0
- package/dist/src/plugins/custom/heading/index.d.ts.map +1 -0
- package/dist/src/plugins/preset-common.d.ts +2 -0
- package/dist/src/plugins/preset-common.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -18964,7 +18964,7 @@ var tE = [
|
|
|
18964
18964
|
});
|
|
18965
18965
|
}, aE = (e, t = {}) => {
|
|
18966
18966
|
let n = [], r = t.includeRuntime ?? !0;
|
|
18967
|
-
return iE(n, "listener", e.listener), iE(n, "commonmark", e.commonmark), iE(n, "gfm", e.gfm), iE(n, "history", e.history), iE(n, "code-block-prism", e.codeBlockPrism), iE(n, "code-block-language-picker", e.codeBlockLanguagePicker), r && (iE(n, "clipboard", e.clipboard), iE(n, "indent", e.indent)), iE(n, "image-delete-selection", e.imageDeleteSelection), iE(n, "table-arrow-entry", e.tableArrowEntry), iE(n, "block-boundary-navigation", e.blockBoundaryNavigation), iE(n, "math-backspace-entry", e.mathBackspaceEntry), iE(n, "blockquote-backspace-lift", e.blockquoteBackspaceLift), iE(n, "table-focus-actions", e.tableFocusActions), iE(n, "selection-tooltip", e.selectionTooltip), iE(n, "gap-cursor", e.gapCursor), iE(n, "drop-cursor", e.dropCursor), iE(n, "math", e.math), iE(n, "math-inline-edit", e.mathInlineEdit), iE(n, "math-inline-arrow-navigation", e.mathInlineArrowNavigation), iE(n, "task-list-toggle", e.taskListToggle), iE(n, "tab-space-indent", e.tabSpaceIndent), iE(n, "code-block-mod-a-select", e.codeBlockModASelect), e.slash && iE(n, "slash", e.slash), n;
|
|
18967
|
+
return iE(n, "listener", e.listener), iE(n, "commonmark", e.commonmark), iE(n, "gfm", e.gfm), iE(n, "history", e.history), iE(n, "code-block-prism", e.codeBlockPrism), iE(n, "code-block-language-picker", e.codeBlockLanguagePicker), r && (iE(n, "clipboard", e.clipboard), iE(n, "indent", e.indent)), iE(n, "image-delete-selection", e.imageDeleteSelection), iE(n, "table-arrow-entry", e.tableArrowEntry), iE(n, "block-boundary-navigation", e.blockBoundaryNavigation), iE(n, "heading-backspace-empty-paragraph", e.headingBackspaceEmptyParagraph), iE(n, "math-backspace-entry", e.mathBackspaceEntry), iE(n, "blockquote-backspace-lift", e.blockquoteBackspaceLift), iE(n, "table-focus-actions", e.tableFocusActions), iE(n, "selection-tooltip", e.selectionTooltip), iE(n, "gap-cursor", e.gapCursor), iE(n, "drop-cursor", e.dropCursor), iE(n, "math", e.math), iE(n, "math-inline-edit", e.mathInlineEdit), iE(n, "math-inline-arrow-navigation", e.mathInlineArrowNavigation), iE(n, "task-list-toggle", e.taskListToggle), iE(n, "tab-space-indent", e.tabSpaceIndent), iE(n, "code-block-mod-a-select", e.codeBlockModASelect), e.slash && iE(n, "slash", e.slash), n;
|
|
18968
18968
|
};
|
|
18969
18969
|
//#endregion
|
|
18970
18970
|
//#region node_modules/.pnpm/prosemirror-dropcursor@1.8.2/node_modules/prosemirror-dropcursor/dist/index.js
|
|
@@ -48728,16 +48728,75 @@ var JU = "math_inline", YU = "math_block", XU = /(?:\$)([^$]+)(?:\$)$/, ZU = /^\
|
|
|
48728
48728
|
}, uW = t_(() => new hr({
|
|
48729
48729
|
key: new vr("zt-md-blockquote-backspace-lift"),
|
|
48730
48730
|
props: { handleKeyDown: (e, t) => sW(t) ? !1 : lW(e, t) }
|
|
48731
|
-
})), dW = "
|
|
48731
|
+
})), dW = "Backspace", fW = "heading", pW = "paragraph", mW = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, hW = (e) => {
|
|
48732
|
+
if (e.type.name !== pW) return !1;
|
|
48733
|
+
let t = e.textContent;
|
|
48734
|
+
return t.trim().length === 0 && e.content.size === t.length;
|
|
48735
|
+
}, gW = (e) => {
|
|
48736
|
+
if (e.parent.type.name !== fW || e.parentOffset !== 0 || e.depth < 1) return null;
|
|
48737
|
+
let t = e.index(e.depth - 1);
|
|
48738
|
+
if (t <= 0) return null;
|
|
48739
|
+
let n = e.node(e.depth - 1).child(t - 1);
|
|
48740
|
+
if (!hW(n)) return null;
|
|
48741
|
+
let r = e.before(e.depth);
|
|
48742
|
+
return {
|
|
48743
|
+
from: r - n.nodeSize,
|
|
48744
|
+
to: r
|
|
48745
|
+
};
|
|
48746
|
+
}, _W = (e, t) => {
|
|
48747
|
+
if (t.key !== dW || t.defaultPrevented || t.altKey || t.ctrlKey || t.metaKey || t.shiftKey || !mW(e)) return !1;
|
|
48748
|
+
let { selection: n } = e.state;
|
|
48749
|
+
if (!n.empty) return !1;
|
|
48750
|
+
let r = gW(n.$from);
|
|
48751
|
+
if (!r) return !1;
|
|
48752
|
+
t.preventDefault();
|
|
48753
|
+
let i = e.state.tr.delete(r.from, r.to);
|
|
48754
|
+
return i.setSelection(A.create(i.doc, r.from + 1)).scrollIntoView(), e.dispatch(i), !0;
|
|
48755
|
+
}, vW = t_(() => new hr({
|
|
48756
|
+
key: new vr("zt-md-heading-backspace-empty-paragraph"),
|
|
48757
|
+
props: { handleKeyDown: (e, t) => _W(e, t) }
|
|
48758
|
+
})), yW = "text", bW = {
|
|
48732
48759
|
svg: "svg",
|
|
48733
48760
|
html: "html"
|
|
48734
|
-
},
|
|
48761
|
+
}, xW = {
|
|
48735
48762
|
html: !0,
|
|
48736
48763
|
svg: !0
|
|
48737
|
-
},
|
|
48764
|
+
}, SW = (e) => {
|
|
48738
48765
|
let t = e.trim().toLowerCase();
|
|
48739
|
-
return t ? t.startsWith("canvas-") ? Object.entries(
|
|
48740
|
-
},
|
|
48766
|
+
return t ? t.startsWith("canvas-") ? Object.entries(bW).find(([e]) => t.includes(e))?.[1] ?? t : t : yW;
|
|
48767
|
+
}, CW = (e) => (t) => {
|
|
48768
|
+
let n = e(t);
|
|
48769
|
+
return {
|
|
48770
|
+
...n,
|
|
48771
|
+
attrs: {
|
|
48772
|
+
...n.attrs,
|
|
48773
|
+
language: {
|
|
48774
|
+
default: yW,
|
|
48775
|
+
validate: "string"
|
|
48776
|
+
}
|
|
48777
|
+
},
|
|
48778
|
+
parseMarkdown: {
|
|
48779
|
+
...n.parseMarkdown,
|
|
48780
|
+
runner: (e, t, r) => {
|
|
48781
|
+
let i = {
|
|
48782
|
+
...t,
|
|
48783
|
+
lang: SW(String(t.lang ?? ""))
|
|
48784
|
+
};
|
|
48785
|
+
n.parseMarkdown.runner(e, i, r);
|
|
48786
|
+
}
|
|
48787
|
+
},
|
|
48788
|
+
toMarkdown: {
|
|
48789
|
+
...n.toMarkdown,
|
|
48790
|
+
runner: (e, t) => {
|
|
48791
|
+
let n = SW(String(t.attrs.language ?? ""));
|
|
48792
|
+
e.addNode("code", void 0, t.content.firstChild?.text || "", { lang: n });
|
|
48793
|
+
}
|
|
48794
|
+
}
|
|
48795
|
+
};
|
|
48796
|
+
}, wW = (e) => {
|
|
48797
|
+
let t = e.get(Ly.key);
|
|
48798
|
+
e.set(Ly.key, CW(t));
|
|
48799
|
+
}, TW = (e) => xW[SW(e)] === !0, EW = "code_block", DW = 1200, OW = "html", kW = "ZT_MD_CODE_BLOCK_PREVIEW_LAYOUT", AW = [
|
|
48741
48800
|
"default-src 'none'",
|
|
48742
48801
|
"style-src 'unsafe-inline'",
|
|
48743
48802
|
"img-src data: blob:",
|
|
@@ -48748,16 +48807,16 @@ var JU = "math_inline", YU = "math_block", XU = /(?:\$)([^$]+)(?:\$)$/, ZU = /^\
|
|
|
48748
48807
|
"object-src 'none'",
|
|
48749
48808
|
"form-action 'none'",
|
|
48750
48809
|
"base-uri 'none'"
|
|
48751
|
-
],
|
|
48810
|
+
], jW = (e) => p(i(e, {
|
|
48752
48811
|
size: 14,
|
|
48753
48812
|
strokeWidth: 2,
|
|
48754
48813
|
"aria-hidden": "true"
|
|
48755
|
-
})),
|
|
48814
|
+
})), MW = jW(tD), NW = jW(YE), PW = jW(AD), FW = jW(rD), IW = jW($E), LW = (e, t) => `<!doctype html>
|
|
48756
48815
|
<html>
|
|
48757
48816
|
<head>
|
|
48758
48817
|
<meta charset="UTF-8" />
|
|
48759
48818
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
48760
|
-
<meta http-equiv="Content-Security-Policy" content="${[...
|
|
48819
|
+
<meta http-equiv="Content-Security-Policy" content="${[...AW, ...t ? ["script-src 'unsafe-inline'"] : []].join("; ")}" />
|
|
48761
48820
|
<style>
|
|
48762
48821
|
*, *::before, *::after { box-sizing: border-box; }
|
|
48763
48822
|
html, body { min-height: 100%; margin: 0; }
|
|
@@ -48766,7 +48825,7 @@ var JU = "math_inline", YU = "math_block", XU = /(?:\$)([^$]+)(?:\$)$/, ZU = /^\
|
|
|
48766
48825
|
</style>
|
|
48767
48826
|
</head>
|
|
48768
48827
|
<body>${e}</body>
|
|
48769
|
-
</html>`,
|
|
48828
|
+
</html>`, RW = (e) => typeof e == "function" ? e() : null, zW = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, BW = class {
|
|
48770
48829
|
syncLanguageAttribute(e) {
|
|
48771
48830
|
let t = typeof e.attrs.language == "string" ? e.attrs.language.trim() : "";
|
|
48772
48831
|
if (!t) {
|
|
@@ -48777,25 +48836,25 @@ var JU = "math_inline", YU = "math_block", XU = /(?:\$)([^$]+)(?:\$)$/, ZU = /^\
|
|
|
48777
48836
|
}
|
|
48778
48837
|
constructor(e, t, n, r) {
|
|
48779
48838
|
this.previewFrame = null, this.isPreviewAvailable = !1, this.isPreviewMode = !1, this.renderedPreviewKey = null, this.copyFeedbackTimer = null, this.handlePreviewClick = (e) => {
|
|
48780
|
-
e.preventDefault(), e.stopPropagation(), this.isPreviewAvailable && (this.isPreviewMode = !this.isPreviewMode, this.syncPreviewState(), this.view.dispatch(this.view.state.tr.setMeta(
|
|
48839
|
+
e.preventDefault(), e.stopPropagation(), this.isPreviewAvailable && (this.isPreviewMode = !this.isPreviewMode, this.syncPreviewState(), this.view.dispatch(this.view.state.tr.setMeta(kW, !0)));
|
|
48781
48840
|
}, this.handlePreviewKeyDown = (e) => {
|
|
48782
48841
|
if (e.defaultPrevented || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || e.key !== "ArrowUp" && e.key !== "ArrowDown") return;
|
|
48783
|
-
let t =
|
|
48842
|
+
let t = RW(this.getPos);
|
|
48784
48843
|
t !== null && IE(this.view, t, this.node, e.key) && e.preventDefault();
|
|
48785
48844
|
}, this.handleCopyClick = (e) => {
|
|
48786
|
-
if (e.preventDefault(), e.stopPropagation(), !
|
|
48845
|
+
if (e.preventDefault(), e.stopPropagation(), !zW(this.view)) return;
|
|
48787
48846
|
let t = this.node.textContent;
|
|
48788
48847
|
(typeof navigator < "u" && navigator.clipboard?.writeText ? navigator.clipboard.writeText(t) : Promise.resolve()).then(() => {
|
|
48789
|
-
this.copyButton.innerHTML =
|
|
48790
|
-
this.copyButton.innerHTML =
|
|
48791
|
-
},
|
|
48848
|
+
this.copyButton.innerHTML = NW, this.copyButton.dataset.copied = "true", this.copyFeedbackTimer !== null && clearTimeout(this.copyFeedbackTimer), this.copyFeedbackTimer = setTimeout(() => {
|
|
48849
|
+
this.copyButton.innerHTML = MW, delete this.copyButton.dataset.copied, this.copyFeedbackTimer = null;
|
|
48850
|
+
}, DW);
|
|
48792
48851
|
}).catch(() => {});
|
|
48793
48852
|
}, this.handleDeleteClick = (e) => {
|
|
48794
|
-
e.preventDefault(), e.stopPropagation(),
|
|
48795
|
-
}, this.node = e, this.view = t, this.getPos = n, this.messages = r, this.dom = document.createElement("div"), this.dom.className = "zt-md-code-block", this.dom.dataset.type =
|
|
48853
|
+
e.preventDefault(), e.stopPropagation(), zW(this.view) && this.deleteCurrentCodeBlock();
|
|
48854
|
+
}, this.node = e, this.view = t, this.getPos = n, this.messages = r, this.dom = document.createElement("div"), this.dom.className = "zt-md-code-block", this.dom.dataset.type = EW, this.contentDOM = document.createElement("pre"), this.previewContainer = document.createElement("div"), this.previewContainer.className = "zt-md-code-block-preview", this.previewContainer.contentEditable = "false", this.previewContainer.hidden = !0, this.previewContainer.tabIndex = -1, this.previewContainer.setAttribute("role", "region"), this.previewContainer.setAttribute("aria-label", r.codeBlockPreviewAriaLabel), this.actionsContainer = document.createElement("span"), this.actionsContainer.className = "zt-md-code-block-actions", this.actionsContainer.contentEditable = "false", this.previewButton = document.createElement("button"), this.previewButton.type = "button", this.previewButton.className = "zt-md-code-block-action-button", this.previewButton.hidden = !0, this.previewButton.innerHTML = FW, this.copyButton = document.createElement("button"), this.copyButton.type = "button", this.copyButton.className = "zt-md-code-block-action-button zt-md-code-block-editable-action", this.copyButton.setAttribute("aria-label", r.codeBlockCopyAriaLabel), this.copyButton.innerHTML = MW, this.deleteButton = document.createElement("button"), this.deleteButton.type = "button", this.deleteButton.className = "zt-md-code-block-action-button zt-md-code-block-editable-action zt-md-code-block-action-button-danger", this.deleteButton.setAttribute("aria-label", r.codeBlockDeleteAriaLabel), this.deleteButton.innerHTML = PW, this.actionsContainer.append(this.previewButton, this.copyButton, this.deleteButton), this.dom.append(this.contentDOM, this.previewContainer, this.actionsContainer), this.updateEditableState(), this.syncLanguageAttribute(e), this.syncPreviewAvailability(e), this.previewButton.addEventListener("click", this.handlePreviewClick), this.copyButton.addEventListener("click", this.handleCopyClick), this.deleteButton.addEventListener("click", this.handleDeleteClick), this.previewContainer.addEventListener("keydown", this.handlePreviewKeyDown);
|
|
48796
48855
|
}
|
|
48797
48856
|
deleteCurrentCodeBlock() {
|
|
48798
|
-
let e =
|
|
48857
|
+
let e = RW(this.getPos);
|
|
48799
48858
|
if (e === null) return;
|
|
48800
48859
|
let t = this.view.state.tr.delete(e, e + this.node.nodeSize), n = Math.min(e, t.doc.content.size);
|
|
48801
48860
|
t.setSelection(A.near(t.doc.resolve(n), -1)).scrollIntoView(), this.view.dispatch(t), requestAnimationFrame(() => {
|
|
@@ -48803,36 +48862,36 @@ var JU = "math_inline", YU = "math_block", XU = /(?:\$)([^$]+)(?:\$)$/, ZU = /^\
|
|
|
48803
48862
|
});
|
|
48804
48863
|
}
|
|
48805
48864
|
updateEditableState() {
|
|
48806
|
-
this.dom.dataset.editable =
|
|
48865
|
+
this.dom.dataset.editable = zW(this.view) ? "true" : "false";
|
|
48807
48866
|
}
|
|
48808
48867
|
syncPreviewAvailability(e) {
|
|
48809
48868
|
let t = typeof e.attrs.language == "string" ? e.attrs.language : "";
|
|
48810
|
-
this.isPreviewAvailable =
|
|
48869
|
+
this.isPreviewAvailable = TW(t), this.isPreviewAvailable || (this.isPreviewMode = !1), this.previewButton.hidden = !this.isPreviewAvailable, this.syncPreviewState(), this.syncActionsVisibility();
|
|
48811
48870
|
}
|
|
48812
48871
|
syncPreviewState() {
|
|
48813
48872
|
let e = this.isPreviewAvailable && this.isPreviewMode, t = e ? this.messages.codeBlockSourceAriaLabel : this.messages.codeBlockPreviewAriaLabel;
|
|
48814
|
-
if (this.dom.dataset.viewMode = e ? "preview" : "source", this.previewContainer.hidden = !e, this.previewContainer.tabIndex = e ? 0 : -1, this.previewButton.dataset.active = e ? "true" : "false", this.previewButton.setAttribute("aria-pressed", e ? "true" : "false"), this.previewButton.setAttribute("aria-label", t), this.previewButton.title = t, this.previewButton.innerHTML = e ?
|
|
48873
|
+
if (this.dom.dataset.viewMode = e ? "preview" : "source", this.previewContainer.hidden = !e, this.previewContainer.tabIndex = e ? 0 : -1, this.previewButton.dataset.active = e ? "true" : "false", this.previewButton.setAttribute("aria-pressed", e ? "true" : "false"), this.previewButton.setAttribute("aria-label", t), this.previewButton.title = t, this.previewButton.innerHTML = e ? IW : FW, e) {
|
|
48815
48874
|
this.contentDOM.setAttribute("aria-hidden", "true"), this.renderPreview();
|
|
48816
48875
|
return;
|
|
48817
48876
|
}
|
|
48818
48877
|
this.contentDOM.removeAttribute("aria-hidden"), this.clearPreview();
|
|
48819
48878
|
}
|
|
48820
48879
|
syncActionsVisibility() {
|
|
48821
|
-
let e =
|
|
48880
|
+
let e = zW(this.view) || this.isPreviewAvailable;
|
|
48822
48881
|
this.actionsContainer.dataset.visible = e ? "true" : "false";
|
|
48823
48882
|
}
|
|
48824
48883
|
renderPreview() {
|
|
48825
|
-
let e = this.node.textContent, t =
|
|
48884
|
+
let e = this.node.textContent, t = SW(String(this.node.attrs.language ?? "")), n = t === OW, r = `${t}\u0000${e}`;
|
|
48826
48885
|
if (this.renderedPreviewKey === r) return;
|
|
48827
48886
|
this.renderedPreviewKey = r;
|
|
48828
48887
|
let i = document.createElement("iframe");
|
|
48829
|
-
i.className = "zt-md-code-block-preview-frame", i.title = this.messages.codeBlockPreviewAriaLabel, i.tabIndex = -1, i.referrerPolicy = "no-referrer", i.setAttribute("sandbox", n ? "allow-scripts" : ""), i.srcdoc =
|
|
48888
|
+
i.className = "zt-md-code-block-preview-frame", i.title = this.messages.codeBlockPreviewAriaLabel, i.tabIndex = -1, i.referrerPolicy = "no-referrer", i.setAttribute("sandbox", n ? "allow-scripts" : ""), i.srcdoc = LW(e, n), this.previewContainer.replaceChildren(i), this.previewFrame = i;
|
|
48830
48889
|
}
|
|
48831
48890
|
clearPreview() {
|
|
48832
48891
|
this.renderedPreviewKey = null, this.previewFrame?.remove(), this.previewFrame = null;
|
|
48833
48892
|
}
|
|
48834
48893
|
update(e) {
|
|
48835
|
-
return e.type.name ===
|
|
48894
|
+
return e.type.name === EW ? (this.node = e, this.updateEditableState(), this.syncLanguageAttribute(e), this.syncPreviewAvailability(e), !0) : !1;
|
|
48836
48895
|
}
|
|
48837
48896
|
stopEvent(e) {
|
|
48838
48897
|
let t = e.target;
|
|
@@ -48842,14 +48901,14 @@ var JU = "math_inline", YU = "math_block", XU = /(?:\$)([^$]+)(?:\$)$/, ZU = /^\
|
|
|
48842
48901
|
return e.type === "selection" ? !1 : e.type === "attributes" && (e.target === this.dom && e.attributeName === "data-view-mode" || e.target === this.contentDOM && e.attributeName === "aria-hidden") ? !0 : this.actionsContainer.contains(e.target) || this.previewContainer.contains(e.target);
|
|
48843
48902
|
}
|
|
48844
48903
|
destroy() {
|
|
48845
|
-
this.previewButton.removeEventListener("click", this.handlePreviewClick), this.copyButton.removeEventListener("click", this.handleCopyClick), this.deleteButton.removeEventListener("click", this.handleDeleteClick), this.previewContainer.removeEventListener("keydown", this.handlePreviewKeyDown), this.copyFeedbackTimer !== null && (clearTimeout(this.copyFeedbackTimer), this.copyFeedbackTimer = null), this.copyButton.innerHTML =
|
|
48904
|
+
this.previewButton.removeEventListener("click", this.handlePreviewClick), this.copyButton.removeEventListener("click", this.handleCopyClick), this.deleteButton.removeEventListener("click", this.handleDeleteClick), this.previewContainer.removeEventListener("keydown", this.handlePreviewKeyDown), this.copyFeedbackTimer !== null && (clearTimeout(this.copyFeedbackTimer), this.copyFeedbackTimer = null), this.copyButton.innerHTML = MW, delete this.copyButton.dataset.copied, this.clearPreview();
|
|
48846
48905
|
}
|
|
48847
|
-
},
|
|
48906
|
+
}, VW = (e = IO()) => (t, n, r) => new BW(t, n, typeof r == "function" ? () => {
|
|
48848
48907
|
let e = r();
|
|
48849
48908
|
return typeof e == "number" ? e : 0;
|
|
48850
48909
|
} : !1, e);
|
|
48851
|
-
|
|
48852
|
-
function
|
|
48910
|
+
HW.displayName = "clike", HW.aliases = [];
|
|
48911
|
+
function HW(e) {
|
|
48853
48912
|
e.languages.clike = {
|
|
48854
48913
|
comment: [{
|
|
48855
48914
|
pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
|
|
@@ -48877,9 +48936,9 @@ function MW(e) {
|
|
|
48877
48936
|
punctuation: /[{}[\];(),.:]/
|
|
48878
48937
|
};
|
|
48879
48938
|
}
|
|
48880
|
-
|
|
48881
|
-
function
|
|
48882
|
-
e.register(
|
|
48939
|
+
UW.displayName = "c", UW.aliases = [];
|
|
48940
|
+
function UW(e) {
|
|
48941
|
+
e.register(HW), e.languages.c = e.languages.extend("clike", {
|
|
48883
48942
|
comment: {
|
|
48884
48943
|
pattern: /\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,
|
|
48885
48944
|
greedy: !0
|
|
@@ -48933,9 +48992,9 @@ function NW(e) {
|
|
|
48933
48992
|
}
|
|
48934
48993
|
} }), e.languages.insertBefore("c", "function", { constant: /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/ }), delete e.languages.c.boolean;
|
|
48935
48994
|
}
|
|
48936
|
-
|
|
48937
|
-
function
|
|
48938
|
-
e.register(
|
|
48995
|
+
WW.displayName = "cpp", WW.aliases = [];
|
|
48996
|
+
function WW(e) {
|
|
48997
|
+
e.register(UW), (function(e) {
|
|
48939
48998
|
var t = /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/, n = "\\b(?!<keyword>)\\w+(?:\\s*\\.\\s*\\w+)*\\b".replace(/<keyword>/g, function() {
|
|
48940
48999
|
return t.source;
|
|
48941
49000
|
});
|
|
@@ -48997,16 +49056,16 @@ function PW(e) {
|
|
|
48997
49056
|
} }), e.languages.insertBefore("inside", "double-colon", { "class-name": /\b[a-z_]\w*\b(?!\s*::)/i }, e.languages.cpp["base-clause"]);
|
|
48998
49057
|
})(e);
|
|
48999
49058
|
}
|
|
49000
|
-
|
|
49001
|
-
function
|
|
49002
|
-
e.register(
|
|
49059
|
+
GW.displayName = "arduino", GW.aliases = ["ino"];
|
|
49060
|
+
function GW(e) {
|
|
49061
|
+
e.register(WW), e.languages.arduino = e.languages.extend("cpp", {
|
|
49003
49062
|
keyword: /\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,
|
|
49004
49063
|
constant: /\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,
|
|
49005
49064
|
builtin: /\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/
|
|
49006
49065
|
}), e.languages.ino = e.languages.arduino;
|
|
49007
49066
|
}
|
|
49008
|
-
|
|
49009
|
-
function
|
|
49067
|
+
KW.displayName = "bash", KW.aliases = ["sh", "shell"];
|
|
49068
|
+
function KW(e) {
|
|
49010
49069
|
(function(e) {
|
|
49011
49070
|
var t = "\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b", n = {
|
|
49012
49071
|
pattern: /(^(["']?)\w+\2)[ \t]+\S.*/,
|
|
@@ -49181,9 +49240,9 @@ function IW(e) {
|
|
|
49181
49240
|
e.languages.sh = e.languages.bash, e.languages.shell = e.languages.bash;
|
|
49182
49241
|
})(e);
|
|
49183
49242
|
}
|
|
49184
|
-
|
|
49185
|
-
function
|
|
49186
|
-
e.register(
|
|
49243
|
+
qW.displayName = "csharp", qW.aliases = ["cs", "dotnet"];
|
|
49244
|
+
function qW(e) {
|
|
49245
|
+
e.register(HW), (function(e) {
|
|
49187
49246
|
function t(e, t) {
|
|
49188
49247
|
return e.replace(/<<(\d+)>>/g, function(e, n) {
|
|
49189
49248
|
return "(?:" + t[+n] + ")";
|
|
@@ -49418,7 +49477,7 @@ function LW(e) {
|
|
|
49418
49477
|
}), e.languages.dotnet = e.languages.cs = e.languages.csharp;
|
|
49419
49478
|
})(e);
|
|
49420
49479
|
}
|
|
49421
|
-
|
|
49480
|
+
JW.displayName = "markup", JW.aliases = [
|
|
49422
49481
|
"atom",
|
|
49423
49482
|
"html",
|
|
49424
49483
|
"mathml",
|
|
@@ -49427,7 +49486,7 @@ RW.displayName = "markup", RW.aliases = [
|
|
|
49427
49486
|
"svg",
|
|
49428
49487
|
"xml"
|
|
49429
49488
|
];
|
|
49430
|
-
function
|
|
49489
|
+
function JW(e) {
|
|
49431
49490
|
e.languages.markup = {
|
|
49432
49491
|
comment: {
|
|
49433
49492
|
pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
|
|
@@ -49544,8 +49603,8 @@ function RW(e) {
|
|
|
49544
49603
|
});
|
|
49545
49604
|
} }), e.languages.html = e.languages.markup, e.languages.mathml = e.languages.markup, e.languages.svg = e.languages.markup, e.languages.xml = e.languages.extend("markup", {}), e.languages.ssml = e.languages.xml, e.languages.atom = e.languages.xml, e.languages.rss = e.languages.xml;
|
|
49546
49605
|
}
|
|
49547
|
-
|
|
49548
|
-
function
|
|
49606
|
+
YW.displayName = "css", YW.aliases = [];
|
|
49607
|
+
function YW(e) {
|
|
49549
49608
|
(function(e) {
|
|
49550
49609
|
var t = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
|
|
49551
49610
|
e.languages.css = {
|
|
@@ -49600,8 +49659,8 @@ function zW(e) {
|
|
|
49600
49659
|
n && (n.tag.addInlined("style", "css"), n.tag.addAttribute("style", "css"));
|
|
49601
49660
|
})(e);
|
|
49602
49661
|
}
|
|
49603
|
-
|
|
49604
|
-
function
|
|
49662
|
+
XW.displayName = "diff", XW.aliases = [];
|
|
49663
|
+
function XW(e) {
|
|
49605
49664
|
(function(e) {
|
|
49606
49665
|
e.languages.diff = { coord: [
|
|
49607
49666
|
/^(?:\*{3}|-{3}|\+{3}).*$/m,
|
|
@@ -49635,9 +49694,9 @@ function BW(e) {
|
|
|
49635
49694
|
}), Object.defineProperty(e.languages.diff, "PREFIXES", { value: t });
|
|
49636
49695
|
})(e);
|
|
49637
49696
|
}
|
|
49638
|
-
|
|
49639
|
-
function
|
|
49640
|
-
e.register(
|
|
49697
|
+
ZW.displayName = "go", ZW.aliases = [];
|
|
49698
|
+
function ZW(e) {
|
|
49699
|
+
e.register(HW), e.languages.go = e.languages.extend("clike", {
|
|
49641
49700
|
string: {
|
|
49642
49701
|
pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,
|
|
49643
49702
|
lookbehind: !0,
|
|
@@ -49657,8 +49716,8 @@ function VW(e) {
|
|
|
49657
49716
|
greedy: !0
|
|
49658
49717
|
} }), delete e.languages.go["class-name"];
|
|
49659
49718
|
}
|
|
49660
|
-
|
|
49661
|
-
function
|
|
49719
|
+
QW.displayName = "ini", QW.aliases = [];
|
|
49720
|
+
function QW(e) {
|
|
49662
49721
|
e.languages.ini = {
|
|
49663
49722
|
comment: {
|
|
49664
49723
|
pattern: /(^[ \f\t\v]*)[#;][^\n\r]*/m,
|
|
@@ -49693,9 +49752,9 @@ function HW(e) {
|
|
|
49693
49752
|
punctuation: /=/
|
|
49694
49753
|
};
|
|
49695
49754
|
}
|
|
49696
|
-
|
|
49697
|
-
function
|
|
49698
|
-
e.register(
|
|
49755
|
+
$W.displayName = "java", $W.aliases = [];
|
|
49756
|
+
function $W(e) {
|
|
49757
|
+
e.register(HW), (function(e) {
|
|
49699
49758
|
var t = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/, n = "(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*", r = {
|
|
49700
49759
|
pattern: RegExp("(^|[^\\w.])" + n + "[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b"),
|
|
49701
49760
|
lookbehind: !0,
|
|
@@ -49793,8 +49852,8 @@ function UW(e) {
|
|
|
49793
49852
|
});
|
|
49794
49853
|
})(e);
|
|
49795
49854
|
}
|
|
49796
|
-
|
|
49797
|
-
function
|
|
49855
|
+
eG.displayName = "regex", eG.aliases = [];
|
|
49856
|
+
function eG(e) {
|
|
49798
49857
|
(function(e) {
|
|
49799
49858
|
var t = {
|
|
49800
49859
|
pattern: /\\[\\(){}[\]^$+*?|.]/,
|
|
@@ -49873,9 +49932,9 @@ function WW(e) {
|
|
|
49873
49932
|
};
|
|
49874
49933
|
})(e);
|
|
49875
49934
|
}
|
|
49876
|
-
|
|
49877
|
-
function
|
|
49878
|
-
e.register(
|
|
49935
|
+
tG.displayName = "javascript", tG.aliases = ["js"];
|
|
49936
|
+
function tG(e) {
|
|
49937
|
+
e.register(HW), e.languages.javascript = e.languages.extend("clike", {
|
|
49879
49938
|
"class-name": [e.languages.clike["class-name"], {
|
|
49880
49939
|
pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
|
|
49881
49940
|
lookbehind: !0
|
|
@@ -49976,8 +50035,8 @@ function GW(e) {
|
|
|
49976
50035
|
alias: "property"
|
|
49977
50036
|
} }), e.languages.markup && (e.languages.markup.tag.addInlined("script", "javascript"), e.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)", "javascript")), e.languages.js = e.languages.javascript;
|
|
49978
50037
|
}
|
|
49979
|
-
|
|
49980
|
-
function
|
|
50038
|
+
nG.displayName = "json", nG.aliases = ["webmanifest"];
|
|
50039
|
+
function nG(e) {
|
|
49981
50040
|
e.languages.json = {
|
|
49982
50041
|
property: {
|
|
49983
50042
|
pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
|
|
@@ -50003,9 +50062,9 @@ function KW(e) {
|
|
|
50003
50062
|
}
|
|
50004
50063
|
}, e.languages.webmanifest = e.languages.json;
|
|
50005
50064
|
}
|
|
50006
|
-
|
|
50007
|
-
function
|
|
50008
|
-
e.register(
|
|
50065
|
+
rG.displayName = "kotlin", rG.aliases = ["kt", "kts"];
|
|
50066
|
+
function rG(e) {
|
|
50067
|
+
e.register(HW), (function(e) {
|
|
50009
50068
|
e.languages.kotlin = e.languages.extend("clike", {
|
|
50010
50069
|
keyword: {
|
|
50011
50070
|
pattern: /(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,
|
|
@@ -50068,9 +50127,9 @@ function qW(e) {
|
|
|
50068
50127
|
} }), e.languages.kt = e.languages.kotlin, e.languages.kts = e.languages.kotlin;
|
|
50069
50128
|
})(e);
|
|
50070
50129
|
}
|
|
50071
|
-
|
|
50072
|
-
function
|
|
50073
|
-
e.register(
|
|
50130
|
+
iG.displayName = "less", iG.aliases = [];
|
|
50131
|
+
function iG(e) {
|
|
50132
|
+
e.register(YW), e.languages.less = e.languages.extend("css", {
|
|
50074
50133
|
comment: [/\/\*[\s\S]*?\*\//, {
|
|
50075
50134
|
pattern: /(^|[^\\])\/\/.*/,
|
|
50076
50135
|
lookbehind: !0
|
|
@@ -50097,8 +50156,8 @@ function JW(e) {
|
|
|
50097
50156
|
}
|
|
50098
50157
|
});
|
|
50099
50158
|
}
|
|
50100
|
-
|
|
50101
|
-
function
|
|
50159
|
+
aG.displayName = "lua", aG.aliases = [];
|
|
50160
|
+
function aG(e) {
|
|
50102
50161
|
e.languages.lua = {
|
|
50103
50162
|
comment: /^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,
|
|
50104
50163
|
string: {
|
|
@@ -50115,8 +50174,8 @@ function YW(e) {
|
|
|
50115
50174
|
punctuation: /[\[\](){},;]|\.+|:+/
|
|
50116
50175
|
};
|
|
50117
50176
|
}
|
|
50118
|
-
|
|
50119
|
-
function
|
|
50177
|
+
oG.displayName = "makefile", oG.aliases = [];
|
|
50178
|
+
function oG(e) {
|
|
50120
50179
|
e.languages.makefile = {
|
|
50121
50180
|
comment: {
|
|
50122
50181
|
pattern: /(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,
|
|
@@ -50145,8 +50204,8 @@ function XW(e) {
|
|
|
50145
50204
|
punctuation: /[:;(){}]/
|
|
50146
50205
|
};
|
|
50147
50206
|
}
|
|
50148
|
-
|
|
50149
|
-
function
|
|
50207
|
+
sG.displayName = "yaml", sG.aliases = ["yml"];
|
|
50208
|
+
function sG(e) {
|
|
50150
50209
|
(function(e) {
|
|
50151
50210
|
var t = /[*&][^\s[\]{},]+/, n = /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/, r = "(?:" + n.source + "(?:[ ]+" + t.source + ")?|" + t.source + "(?:[ ]+" + n.source + ")?)", i = "(?:[^\\s\\x00-\\x08\\x0e-\\x1f!\"#%&'*,\\-:>?@[\\]`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-]<PLAIN>)(?:[ \\t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*".replace(/<PLAIN>/g, function() {
|
|
50152
50211
|
return "[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]";
|
|
@@ -50214,9 +50273,9 @@ function ZW(e) {
|
|
|
50214
50273
|
}, e.languages.yml = e.languages.yaml;
|
|
50215
50274
|
})(e);
|
|
50216
50275
|
}
|
|
50217
|
-
|
|
50218
|
-
function
|
|
50219
|
-
e.register(
|
|
50276
|
+
cG.displayName = "markdown", cG.aliases = ["md"];
|
|
50277
|
+
function cG(e) {
|
|
50278
|
+
e.register(JW), (function(e) {
|
|
50220
50279
|
var t = "(?:\\\\.|[^\\\\\\n\\r]|(?:\\n|\\r\\n?)(?![\\r\\n]))";
|
|
50221
50280
|
function n(e) {
|
|
50222
50281
|
return e = e.replace(/<inner>/g, function() {
|
|
@@ -50453,9 +50512,9 @@ function QW(e) {
|
|
|
50453
50512
|
}), RegExp(e.languages.markup.tag.pattern.source, "gi"), String.fromCodePoint || String.fromCharCode, e.languages.md = e.languages.markdown;
|
|
50454
50513
|
})(e);
|
|
50455
50514
|
}
|
|
50456
|
-
|
|
50457
|
-
function
|
|
50458
|
-
e.register(
|
|
50515
|
+
lG.displayName = "objectivec", lG.aliases = ["objc"];
|
|
50516
|
+
function lG(e) {
|
|
50517
|
+
e.register(UW), e.languages.objectivec = e.languages.extend("c", {
|
|
50459
50518
|
string: {
|
|
50460
50519
|
pattern: /@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
|
|
50461
50520
|
greedy: !0
|
|
@@ -50464,8 +50523,8 @@ function $W(e) {
|
|
|
50464
50523
|
operator: /-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/
|
|
50465
50524
|
}), delete e.languages.objectivec["class-name"], e.languages.objc = e.languages.objectivec;
|
|
50466
50525
|
}
|
|
50467
|
-
|
|
50468
|
-
function
|
|
50526
|
+
uG.displayName = "perl", uG.aliases = [];
|
|
50527
|
+
function uG(e) {
|
|
50469
50528
|
(function(e) {
|
|
50470
50529
|
var t = "(?:\\((?:[^()\\\\]|\\\\[\\s\\S])*\\)|\\{(?:[^{}\\\\]|\\\\[\\s\\S])*\\}|\\[(?:[^[\\]\\\\]|\\\\[\\s\\S])*\\]|<(?:[^<>\\\\]|\\\\[\\s\\S])*>)";
|
|
50471
50530
|
e.languages.perl = {
|
|
@@ -50546,9 +50605,9 @@ function eG(e) {
|
|
|
50546
50605
|
};
|
|
50547
50606
|
})(e);
|
|
50548
50607
|
}
|
|
50549
|
-
|
|
50550
|
-
function
|
|
50551
|
-
e.register(
|
|
50608
|
+
dG.displayName = "markup-templating", dG.aliases = [];
|
|
50609
|
+
function dG(e) {
|
|
50610
|
+
e.register(JW), (function(e) {
|
|
50552
50611
|
function t(e, t) {
|
|
50553
50612
|
return "___" + e.toUpperCase() + t + "___";
|
|
50554
50613
|
}
|
|
@@ -50586,9 +50645,9 @@ function tG(e) {
|
|
|
50586
50645
|
});
|
|
50587
50646
|
})(e);
|
|
50588
50647
|
}
|
|
50589
|
-
|
|
50590
|
-
function
|
|
50591
|
-
e.register(
|
|
50648
|
+
fG.displayName = "php", fG.aliases = [];
|
|
50649
|
+
function fG(e) {
|
|
50650
|
+
e.register(dG), (function(e) {
|
|
50592
50651
|
var t = /\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/, n = [
|
|
50593
50652
|
{
|
|
50594
50653
|
pattern: /\b(?:false|true)\b/i,
|
|
@@ -50864,8 +50923,8 @@ function nG(e) {
|
|
|
50864
50923
|
});
|
|
50865
50924
|
})(e);
|
|
50866
50925
|
}
|
|
50867
|
-
|
|
50868
|
-
function
|
|
50926
|
+
pG.displayName = "python", pG.aliases = ["py"];
|
|
50927
|
+
function pG(e) {
|
|
50869
50928
|
e.languages.python = {
|
|
50870
50929
|
comment: {
|
|
50871
50930
|
pattern: /(^|[^\\])#.*/,
|
|
@@ -50925,8 +50984,8 @@ function rG(e) {
|
|
|
50925
50984
|
punctuation: /[{}[\];(),.:]/
|
|
50926
50985
|
}, e.languages.python["string-interpolation"].inside.interpolation.inside.rest = e.languages.python, e.languages.py = e.languages.python;
|
|
50927
50986
|
}
|
|
50928
|
-
|
|
50929
|
-
function
|
|
50987
|
+
mG.displayName = "r", mG.aliases = [];
|
|
50988
|
+
function mG(e) {
|
|
50930
50989
|
e.languages.r = {
|
|
50931
50990
|
comment: /#.*/,
|
|
50932
50991
|
string: {
|
|
@@ -50945,9 +51004,9 @@ function iG(e) {
|
|
|
50945
51004
|
punctuation: /[(){}\[\],;]/
|
|
50946
51005
|
};
|
|
50947
51006
|
}
|
|
50948
|
-
|
|
50949
|
-
function
|
|
50950
|
-
e.register(
|
|
51007
|
+
hG.displayName = "ruby", hG.aliases = ["rb"];
|
|
51008
|
+
function hG(e) {
|
|
51009
|
+
e.register(HW), (function(e) {
|
|
50951
51010
|
e.languages.ruby = e.languages.extend("clike", {
|
|
50952
51011
|
comment: {
|
|
50953
51012
|
pattern: /#.*|^=begin\s[\s\S]*?^=end/m,
|
|
@@ -51102,8 +51161,8 @@ function aG(e) {
|
|
|
51102
51161
|
}), e.languages.rb = e.languages.ruby;
|
|
51103
51162
|
})(e);
|
|
51104
51163
|
}
|
|
51105
|
-
|
|
51106
|
-
function
|
|
51164
|
+
gG.displayName = "rust", gG.aliases = [];
|
|
51165
|
+
function gG(e) {
|
|
51107
51166
|
(function(e) {
|
|
51108
51167
|
for (var t = "\\/\\*(?:[^*/]|\\*(?!\\/)|\\/(?!\\*)|<self>)*\\*\\/", n = 0; n < 2; n++) t = t.replace(/<self>/g, function() {
|
|
51109
51168
|
return t;
|
|
@@ -51195,9 +51254,9 @@ function oG(e) {
|
|
|
51195
51254
|
}, e.languages.rust["closure-params"].inside.rest = e.languages.rust, e.languages.rust.attribute.inside.string = e.languages.rust.string;
|
|
51196
51255
|
})(e);
|
|
51197
51256
|
}
|
|
51198
|
-
|
|
51199
|
-
function
|
|
51200
|
-
e.register(
|
|
51257
|
+
_G.displayName = "sass", _G.aliases = [];
|
|
51258
|
+
function _G(e) {
|
|
51259
|
+
e.register(YW), (function(e) {
|
|
51201
51260
|
e.languages.sass = e.languages.extend("css", { comment: {
|
|
51202
51261
|
pattern: /^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,
|
|
51203
51262
|
lookbehind: !0,
|
|
@@ -51242,9 +51301,9 @@ function sG(e) {
|
|
|
51242
51301
|
} });
|
|
51243
51302
|
})(e);
|
|
51244
51303
|
}
|
|
51245
|
-
|
|
51246
|
-
function
|
|
51247
|
-
e.register(
|
|
51304
|
+
vG.displayName = "scss", vG.aliases = [];
|
|
51305
|
+
function vG(e) {
|
|
51306
|
+
e.register(YW), e.languages.scss = e.languages.extend("css", {
|
|
51248
51307
|
comment: {
|
|
51249
51308
|
pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,
|
|
51250
51309
|
lookbehind: !0
|
|
@@ -51296,8 +51355,8 @@ function cG(e) {
|
|
|
51296
51355
|
}
|
|
51297
51356
|
}), e.languages.scss.atrule.inside.rest = e.languages.scss;
|
|
51298
51357
|
}
|
|
51299
|
-
|
|
51300
|
-
function
|
|
51358
|
+
yG.displayName = "sql", yG.aliases = [];
|
|
51359
|
+
function yG(e) {
|
|
51301
51360
|
e.languages.sql = {
|
|
51302
51361
|
comment: {
|
|
51303
51362
|
pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,
|
|
@@ -51326,8 +51385,8 @@ function lG(e) {
|
|
|
51326
51385
|
punctuation: /[;[\]()`,.]/
|
|
51327
51386
|
};
|
|
51328
51387
|
}
|
|
51329
|
-
|
|
51330
|
-
function
|
|
51388
|
+
bG.displayName = "swift", bG.aliases = [];
|
|
51389
|
+
function bG(e) {
|
|
51331
51390
|
e.languages.swift = {
|
|
51332
51391
|
comment: {
|
|
51333
51392
|
pattern: /(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,
|
|
@@ -51422,9 +51481,9 @@ function uG(e) {
|
|
|
51422
51481
|
t.inside.interpolation.inside = e.languages.swift;
|
|
51423
51482
|
});
|
|
51424
51483
|
}
|
|
51425
|
-
|
|
51426
|
-
function
|
|
51427
|
-
e.register(
|
|
51484
|
+
xG.displayName = "typescript", xG.aliases = ["ts"];
|
|
51485
|
+
function xG(e) {
|
|
51486
|
+
e.register(tG), (function(e) {
|
|
51428
51487
|
e.languages.typescript = e.languages.extend("javascript", {
|
|
51429
51488
|
"class-name": {
|
|
51430
51489
|
pattern: /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,
|
|
@@ -51461,8 +51520,8 @@ function dG(e) {
|
|
|
51461
51520
|
}), e.languages.ts = e.languages.typescript;
|
|
51462
51521
|
})(e);
|
|
51463
51522
|
}
|
|
51464
|
-
|
|
51465
|
-
function
|
|
51523
|
+
SG.displayName = "basic", SG.aliases = [];
|
|
51524
|
+
function SG(e) {
|
|
51466
51525
|
e.languages.basic = {
|
|
51467
51526
|
comment: {
|
|
51468
51527
|
pattern: /(?:!|REM\b).+/i,
|
|
@@ -51479,9 +51538,9 @@ function fG(e) {
|
|
|
51479
51538
|
punctuation: /[,;:()]/
|
|
51480
51539
|
};
|
|
51481
51540
|
}
|
|
51482
|
-
|
|
51483
|
-
function
|
|
51484
|
-
e.register(
|
|
51541
|
+
CG.displayName = "vbnet", CG.aliases = [];
|
|
51542
|
+
function CG(e) {
|
|
51543
|
+
e.register(SG), e.languages.vbnet = e.languages.extend("basic", {
|
|
51485
51544
|
comment: [{
|
|
51486
51545
|
pattern: /(?:!|REM\b).+/i,
|
|
51487
51546
|
inside: { keyword: /^REM/i }
|
|
@@ -51501,117 +51560,117 @@ function pG(e) {
|
|
|
51501
51560
|
}
|
|
51502
51561
|
//#endregion
|
|
51503
51562
|
//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/schema.js
|
|
51504
|
-
var
|
|
51563
|
+
var wG = class {
|
|
51505
51564
|
constructor(e, t, n) {
|
|
51506
51565
|
this.normal = t, this.property = e, n && (this.space = n);
|
|
51507
51566
|
}
|
|
51508
51567
|
};
|
|
51509
|
-
|
|
51568
|
+
wG.prototype.normal = {}, wG.prototype.property = {}, wG.prototype.space = void 0;
|
|
51510
51569
|
//#endregion
|
|
51511
51570
|
//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/merge.js
|
|
51512
|
-
function
|
|
51571
|
+
function TG(e, t) {
|
|
51513
51572
|
let n = {}, r = {};
|
|
51514
51573
|
for (let t of e) Object.assign(n, t.property), Object.assign(r, t.normal);
|
|
51515
|
-
return new
|
|
51574
|
+
return new wG(n, r, t);
|
|
51516
51575
|
}
|
|
51517
51576
|
//#endregion
|
|
51518
51577
|
//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/normalize.js
|
|
51519
|
-
function
|
|
51578
|
+
function EG(e) {
|
|
51520
51579
|
return e.toLowerCase();
|
|
51521
51580
|
}
|
|
51522
51581
|
//#endregion
|
|
51523
51582
|
//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/info.js
|
|
51524
|
-
var
|
|
51583
|
+
var DG = class {
|
|
51525
51584
|
constructor(e, t) {
|
|
51526
51585
|
this.attribute = t, this.property = e;
|
|
51527
51586
|
}
|
|
51528
51587
|
};
|
|
51529
|
-
|
|
51588
|
+
DG.prototype.attribute = "", DG.prototype.booleanish = !1, DG.prototype.boolean = !1, DG.prototype.commaOrSpaceSeparated = !1, DG.prototype.commaSeparated = !1, DG.prototype.defined = !1, DG.prototype.mustUseProperty = !1, DG.prototype.number = !1, DG.prototype.overloadedBoolean = !1, DG.prototype.property = "", DG.prototype.spaceSeparated = !1, DG.prototype.space = void 0;
|
|
51530
51589
|
//#endregion
|
|
51531
51590
|
//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/types.js
|
|
51532
|
-
var
|
|
51533
|
-
boolean: () =>
|
|
51534
|
-
booleanish: () =>
|
|
51535
|
-
commaOrSpaceSeparated: () =>
|
|
51536
|
-
commaSeparated: () =>
|
|
51591
|
+
var OG = /* @__PURE__ */ te({
|
|
51592
|
+
boolean: () => AG,
|
|
51593
|
+
booleanish: () => jG,
|
|
51594
|
+
commaOrSpaceSeparated: () => FG,
|
|
51595
|
+
commaSeparated: () => PG,
|
|
51537
51596
|
number: () => Q,
|
|
51538
|
-
overloadedBoolean: () =>
|
|
51539
|
-
spaceSeparated: () =>
|
|
51540
|
-
}),
|
|
51541
|
-
function
|
|
51542
|
-
return 2 ** ++
|
|
51597
|
+
overloadedBoolean: () => MG,
|
|
51598
|
+
spaceSeparated: () => NG
|
|
51599
|
+
}), kG = 0, AG = IG(), jG = IG(), MG = IG(), Q = IG(), NG = IG(), PG = IG(), FG = IG();
|
|
51600
|
+
function IG() {
|
|
51601
|
+
return 2 ** ++kG;
|
|
51543
51602
|
}
|
|
51544
51603
|
//#endregion
|
|
51545
51604
|
//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/defined-info.js
|
|
51546
|
-
var
|
|
51605
|
+
var LG = Object.keys(OG), RG = class extends DG {
|
|
51547
51606
|
constructor(e, t, n, r) {
|
|
51548
51607
|
let i = -1;
|
|
51549
|
-
if (super(e, t),
|
|
51550
|
-
let e =
|
|
51551
|
-
|
|
51608
|
+
if (super(e, t), zG(this, "space", r), typeof n == "number") for (; ++i < LG.length;) {
|
|
51609
|
+
let e = LG[i];
|
|
51610
|
+
zG(this, LG[i], (n & OG[e]) === OG[e]);
|
|
51552
51611
|
}
|
|
51553
51612
|
}
|
|
51554
51613
|
};
|
|
51555
|
-
|
|
51556
|
-
function
|
|
51614
|
+
RG.prototype.defined = !0;
|
|
51615
|
+
function zG(e, t, n) {
|
|
51557
51616
|
n && (e[t] = n);
|
|
51558
51617
|
}
|
|
51559
51618
|
//#endregion
|
|
51560
51619
|
//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/create.js
|
|
51561
|
-
function
|
|
51620
|
+
function BG(e) {
|
|
51562
51621
|
let t = {}, n = {};
|
|
51563
51622
|
for (let [r, i] of Object.entries(e.properties)) {
|
|
51564
|
-
let a = new
|
|
51565
|
-
e.mustUseProperty && e.mustUseProperty.includes(r) && (a.mustUseProperty = !0), t[r] = a, n[
|
|
51623
|
+
let a = new RG(r, e.transform(e.attributes || {}, r), i, e.space);
|
|
51624
|
+
e.mustUseProperty && e.mustUseProperty.includes(r) && (a.mustUseProperty = !0), t[r] = a, n[EG(r)] = r, n[EG(a.attribute)] = r;
|
|
51566
51625
|
}
|
|
51567
|
-
return new
|
|
51626
|
+
return new wG(t, n, e.space);
|
|
51568
51627
|
}
|
|
51569
51628
|
//#endregion
|
|
51570
51629
|
//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/aria.js
|
|
51571
|
-
var
|
|
51630
|
+
var VG = BG({
|
|
51572
51631
|
properties: {
|
|
51573
51632
|
ariaActiveDescendant: null,
|
|
51574
|
-
ariaAtomic:
|
|
51633
|
+
ariaAtomic: jG,
|
|
51575
51634
|
ariaAutoComplete: null,
|
|
51576
|
-
ariaBusy:
|
|
51577
|
-
ariaChecked:
|
|
51635
|
+
ariaBusy: jG,
|
|
51636
|
+
ariaChecked: jG,
|
|
51578
51637
|
ariaColCount: Q,
|
|
51579
51638
|
ariaColIndex: Q,
|
|
51580
51639
|
ariaColSpan: Q,
|
|
51581
|
-
ariaControls:
|
|
51640
|
+
ariaControls: NG,
|
|
51582
51641
|
ariaCurrent: null,
|
|
51583
|
-
ariaDescribedBy:
|
|
51642
|
+
ariaDescribedBy: NG,
|
|
51584
51643
|
ariaDetails: null,
|
|
51585
|
-
ariaDisabled:
|
|
51586
|
-
ariaDropEffect:
|
|
51644
|
+
ariaDisabled: jG,
|
|
51645
|
+
ariaDropEffect: NG,
|
|
51587
51646
|
ariaErrorMessage: null,
|
|
51588
|
-
ariaExpanded:
|
|
51589
|
-
ariaFlowTo:
|
|
51590
|
-
ariaGrabbed:
|
|
51647
|
+
ariaExpanded: jG,
|
|
51648
|
+
ariaFlowTo: NG,
|
|
51649
|
+
ariaGrabbed: jG,
|
|
51591
51650
|
ariaHasPopup: null,
|
|
51592
|
-
ariaHidden:
|
|
51651
|
+
ariaHidden: jG,
|
|
51593
51652
|
ariaInvalid: null,
|
|
51594
51653
|
ariaKeyShortcuts: null,
|
|
51595
51654
|
ariaLabel: null,
|
|
51596
|
-
ariaLabelledBy:
|
|
51655
|
+
ariaLabelledBy: NG,
|
|
51597
51656
|
ariaLevel: Q,
|
|
51598
51657
|
ariaLive: null,
|
|
51599
|
-
ariaModal:
|
|
51600
|
-
ariaMultiLine:
|
|
51601
|
-
ariaMultiSelectable:
|
|
51658
|
+
ariaModal: jG,
|
|
51659
|
+
ariaMultiLine: jG,
|
|
51660
|
+
ariaMultiSelectable: jG,
|
|
51602
51661
|
ariaOrientation: null,
|
|
51603
|
-
ariaOwns:
|
|
51662
|
+
ariaOwns: NG,
|
|
51604
51663
|
ariaPlaceholder: null,
|
|
51605
51664
|
ariaPosInSet: Q,
|
|
51606
|
-
ariaPressed:
|
|
51607
|
-
ariaReadOnly:
|
|
51665
|
+
ariaPressed: jG,
|
|
51666
|
+
ariaReadOnly: jG,
|
|
51608
51667
|
ariaRelevant: null,
|
|
51609
|
-
ariaRequired:
|
|
51610
|
-
ariaRoleDescription:
|
|
51668
|
+
ariaRequired: jG,
|
|
51669
|
+
ariaRoleDescription: NG,
|
|
51611
51670
|
ariaRowCount: Q,
|
|
51612
51671
|
ariaRowIndex: Q,
|
|
51613
51672
|
ariaRowSpan: Q,
|
|
51614
|
-
ariaSelected:
|
|
51673
|
+
ariaSelected: jG,
|
|
51615
51674
|
ariaSetSize: Q,
|
|
51616
51675
|
ariaSort: null,
|
|
51617
51676
|
ariaValueMax: Q,
|
|
@@ -51626,17 +51685,17 @@ var jG = AG({
|
|
|
51626
51685
|
});
|
|
51627
51686
|
//#endregion
|
|
51628
51687
|
//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/case-sensitive-transform.js
|
|
51629
|
-
function
|
|
51688
|
+
function HG(e, t) {
|
|
51630
51689
|
return t in e ? e[t] : t;
|
|
51631
51690
|
}
|
|
51632
51691
|
//#endregion
|
|
51633
51692
|
//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/util/case-insensitive-transform.js
|
|
51634
|
-
function
|
|
51635
|
-
return
|
|
51693
|
+
function UG(e, t) {
|
|
51694
|
+
return HG(e, t.toLowerCase());
|
|
51636
51695
|
}
|
|
51637
51696
|
//#endregion
|
|
51638
51697
|
//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/lib/html.js
|
|
51639
|
-
var
|
|
51698
|
+
var WG = BG({
|
|
51640
51699
|
attributes: {
|
|
51641
51700
|
acceptcharset: "accept-charset",
|
|
51642
51701
|
classname: "class",
|
|
@@ -51651,45 +51710,45 @@ var PG = AG({
|
|
|
51651
51710
|
],
|
|
51652
51711
|
properties: {
|
|
51653
51712
|
abbr: null,
|
|
51654
|
-
accept:
|
|
51655
|
-
acceptCharset:
|
|
51656
|
-
accessKey:
|
|
51713
|
+
accept: PG,
|
|
51714
|
+
acceptCharset: NG,
|
|
51715
|
+
accessKey: NG,
|
|
51657
51716
|
action: null,
|
|
51658
51717
|
allow: null,
|
|
51659
|
-
allowFullScreen:
|
|
51660
|
-
allowPaymentRequest:
|
|
51661
|
-
allowUserMedia:
|
|
51718
|
+
allowFullScreen: AG,
|
|
51719
|
+
allowPaymentRequest: AG,
|
|
51720
|
+
allowUserMedia: AG,
|
|
51662
51721
|
alt: null,
|
|
51663
51722
|
as: null,
|
|
51664
|
-
async:
|
|
51723
|
+
async: AG,
|
|
51665
51724
|
autoCapitalize: null,
|
|
51666
|
-
autoComplete:
|
|
51667
|
-
autoFocus:
|
|
51668
|
-
autoPlay:
|
|
51669
|
-
blocking:
|
|
51725
|
+
autoComplete: NG,
|
|
51726
|
+
autoFocus: AG,
|
|
51727
|
+
autoPlay: AG,
|
|
51728
|
+
blocking: NG,
|
|
51670
51729
|
capture: null,
|
|
51671
51730
|
charSet: null,
|
|
51672
|
-
checked:
|
|
51731
|
+
checked: AG,
|
|
51673
51732
|
cite: null,
|
|
51674
|
-
className:
|
|
51733
|
+
className: NG,
|
|
51675
51734
|
cols: Q,
|
|
51676
51735
|
colSpan: null,
|
|
51677
51736
|
content: null,
|
|
51678
|
-
contentEditable:
|
|
51679
|
-
controls:
|
|
51680
|
-
controlsList:
|
|
51681
|
-
coords: Q |
|
|
51737
|
+
contentEditable: jG,
|
|
51738
|
+
controls: AG,
|
|
51739
|
+
controlsList: NG,
|
|
51740
|
+
coords: Q | PG,
|
|
51682
51741
|
crossOrigin: null,
|
|
51683
51742
|
data: null,
|
|
51684
51743
|
dateTime: null,
|
|
51685
51744
|
decoding: null,
|
|
51686
|
-
default:
|
|
51687
|
-
defer:
|
|
51745
|
+
default: AG,
|
|
51746
|
+
defer: AG,
|
|
51688
51747
|
dir: null,
|
|
51689
51748
|
dirName: null,
|
|
51690
|
-
disabled:
|
|
51691
|
-
download:
|
|
51692
|
-
draggable:
|
|
51749
|
+
disabled: AG,
|
|
51750
|
+
download: MG,
|
|
51751
|
+
draggable: jG,
|
|
51693
51752
|
encType: null,
|
|
51694
51753
|
enterKeyHint: null,
|
|
51695
51754
|
fetchPriority: null,
|
|
@@ -51697,36 +51756,36 @@ var PG = AG({
|
|
|
51697
51756
|
formAction: null,
|
|
51698
51757
|
formEncType: null,
|
|
51699
51758
|
formMethod: null,
|
|
51700
|
-
formNoValidate:
|
|
51759
|
+
formNoValidate: AG,
|
|
51701
51760
|
formTarget: null,
|
|
51702
|
-
headers:
|
|
51761
|
+
headers: NG,
|
|
51703
51762
|
height: Q,
|
|
51704
|
-
hidden:
|
|
51763
|
+
hidden: MG,
|
|
51705
51764
|
high: Q,
|
|
51706
51765
|
href: null,
|
|
51707
51766
|
hrefLang: null,
|
|
51708
|
-
htmlFor:
|
|
51709
|
-
httpEquiv:
|
|
51767
|
+
htmlFor: NG,
|
|
51768
|
+
httpEquiv: NG,
|
|
51710
51769
|
id: null,
|
|
51711
51770
|
imageSizes: null,
|
|
51712
51771
|
imageSrcSet: null,
|
|
51713
|
-
inert:
|
|
51772
|
+
inert: AG,
|
|
51714
51773
|
inputMode: null,
|
|
51715
51774
|
integrity: null,
|
|
51716
51775
|
is: null,
|
|
51717
|
-
isMap:
|
|
51776
|
+
isMap: AG,
|
|
51718
51777
|
itemId: null,
|
|
51719
|
-
itemProp:
|
|
51720
|
-
itemRef:
|
|
51721
|
-
itemScope:
|
|
51722
|
-
itemType:
|
|
51778
|
+
itemProp: NG,
|
|
51779
|
+
itemRef: NG,
|
|
51780
|
+
itemScope: AG,
|
|
51781
|
+
itemType: NG,
|
|
51723
51782
|
kind: null,
|
|
51724
51783
|
label: null,
|
|
51725
51784
|
lang: null,
|
|
51726
51785
|
language: null,
|
|
51727
51786
|
list: null,
|
|
51728
51787
|
loading: null,
|
|
51729
|
-
loop:
|
|
51788
|
+
loop: AG,
|
|
51730
51789
|
low: Q,
|
|
51731
51790
|
manifest: null,
|
|
51732
51791
|
max: null,
|
|
@@ -51735,12 +51794,12 @@ var PG = AG({
|
|
|
51735
51794
|
method: null,
|
|
51736
51795
|
min: null,
|
|
51737
51796
|
minLength: Q,
|
|
51738
|
-
multiple:
|
|
51739
|
-
muted:
|
|
51797
|
+
multiple: AG,
|
|
51798
|
+
muted: AG,
|
|
51740
51799
|
name: null,
|
|
51741
51800
|
nonce: null,
|
|
51742
|
-
noModule:
|
|
51743
|
-
noValidate:
|
|
51801
|
+
noModule: AG,
|
|
51802
|
+
noValidate: AG,
|
|
51744
51803
|
onAbort: null,
|
|
51745
51804
|
onAfterPrint: null,
|
|
51746
51805
|
onAuxClick: null,
|
|
@@ -51829,38 +51888,38 @@ var PG = AG({
|
|
|
51829
51888
|
onVolumeChange: null,
|
|
51830
51889
|
onWaiting: null,
|
|
51831
51890
|
onWheel: null,
|
|
51832
|
-
open:
|
|
51891
|
+
open: AG,
|
|
51833
51892
|
optimum: Q,
|
|
51834
51893
|
pattern: null,
|
|
51835
|
-
ping:
|
|
51894
|
+
ping: NG,
|
|
51836
51895
|
placeholder: null,
|
|
51837
|
-
playsInline:
|
|
51896
|
+
playsInline: AG,
|
|
51838
51897
|
popover: null,
|
|
51839
51898
|
popoverTarget: null,
|
|
51840
51899
|
popoverTargetAction: null,
|
|
51841
51900
|
poster: null,
|
|
51842
51901
|
preload: null,
|
|
51843
|
-
readOnly:
|
|
51902
|
+
readOnly: AG,
|
|
51844
51903
|
referrerPolicy: null,
|
|
51845
|
-
rel:
|
|
51846
|
-
required:
|
|
51847
|
-
reversed:
|
|
51904
|
+
rel: NG,
|
|
51905
|
+
required: AG,
|
|
51906
|
+
reversed: AG,
|
|
51848
51907
|
rows: Q,
|
|
51849
51908
|
rowSpan: Q,
|
|
51850
|
-
sandbox:
|
|
51909
|
+
sandbox: NG,
|
|
51851
51910
|
scope: null,
|
|
51852
|
-
scoped:
|
|
51853
|
-
seamless:
|
|
51854
|
-
selected:
|
|
51855
|
-
shadowRootClonable:
|
|
51856
|
-
shadowRootDelegatesFocus:
|
|
51911
|
+
scoped: AG,
|
|
51912
|
+
seamless: AG,
|
|
51913
|
+
selected: AG,
|
|
51914
|
+
shadowRootClonable: AG,
|
|
51915
|
+
shadowRootDelegatesFocus: AG,
|
|
51857
51916
|
shadowRootMode: null,
|
|
51858
51917
|
shape: null,
|
|
51859
51918
|
size: Q,
|
|
51860
51919
|
sizes: null,
|
|
51861
51920
|
slot: null,
|
|
51862
51921
|
span: Q,
|
|
51863
|
-
spellCheck:
|
|
51922
|
+
spellCheck: jG,
|
|
51864
51923
|
src: null,
|
|
51865
51924
|
srcDoc: null,
|
|
51866
51925
|
srcLang: null,
|
|
@@ -51873,15 +51932,15 @@ var PG = AG({
|
|
|
51873
51932
|
title: null,
|
|
51874
51933
|
translate: null,
|
|
51875
51934
|
type: null,
|
|
51876
|
-
typeMustMatch:
|
|
51935
|
+
typeMustMatch: AG,
|
|
51877
51936
|
useMap: null,
|
|
51878
|
-
value:
|
|
51937
|
+
value: jG,
|
|
51879
51938
|
width: Q,
|
|
51880
51939
|
wrap: null,
|
|
51881
51940
|
writingSuggestions: null,
|
|
51882
51941
|
align: null,
|
|
51883
51942
|
aLink: null,
|
|
51884
|
-
archive:
|
|
51943
|
+
archive: NG,
|
|
51885
51944
|
axis: null,
|
|
51886
51945
|
background: null,
|
|
51887
51946
|
bgColor: null,
|
|
@@ -51898,8 +51957,8 @@ var PG = AG({
|
|
|
51898
51957
|
codeBase: null,
|
|
51899
51958
|
codeType: null,
|
|
51900
51959
|
color: null,
|
|
51901
|
-
compact:
|
|
51902
|
-
declare:
|
|
51960
|
+
compact: AG,
|
|
51961
|
+
declare: AG,
|
|
51903
51962
|
event: null,
|
|
51904
51963
|
face: null,
|
|
51905
51964
|
frame: null,
|
|
@@ -51911,10 +51970,10 @@ var PG = AG({
|
|
|
51911
51970
|
lowSrc: null,
|
|
51912
51971
|
marginHeight: Q,
|
|
51913
51972
|
marginWidth: Q,
|
|
51914
|
-
noResize:
|
|
51915
|
-
noHref:
|
|
51916
|
-
noShade:
|
|
51917
|
-
noWrap:
|
|
51973
|
+
noResize: AG,
|
|
51974
|
+
noHref: AG,
|
|
51975
|
+
noShade: AG,
|
|
51976
|
+
noWrap: AG,
|
|
51918
51977
|
object: null,
|
|
51919
51978
|
profile: null,
|
|
51920
51979
|
prompt: null,
|
|
@@ -51922,7 +51981,7 @@ var PG = AG({
|
|
|
51922
51981
|
rightMargin: Q,
|
|
51923
51982
|
rules: null,
|
|
51924
51983
|
scheme: null,
|
|
51925
|
-
scrolling:
|
|
51984
|
+
scrolling: jG,
|
|
51926
51985
|
standby: null,
|
|
51927
51986
|
summary: null,
|
|
51928
51987
|
text: null,
|
|
@@ -51935,8 +51994,8 @@ var PG = AG({
|
|
|
51935
51994
|
allowTransparency: null,
|
|
51936
51995
|
autoCorrect: null,
|
|
51937
51996
|
autoSave: null,
|
|
51938
|
-
disablePictureInPicture:
|
|
51939
|
-
disableRemotePlayback:
|
|
51997
|
+
disablePictureInPicture: AG,
|
|
51998
|
+
disableRemotePlayback: AG,
|
|
51940
51999
|
prefix: null,
|
|
51941
52000
|
property: null,
|
|
51942
52001
|
results: Q,
|
|
@@ -51944,8 +52003,8 @@ var PG = AG({
|
|
|
51944
52003
|
unselectable: null
|
|
51945
52004
|
},
|
|
51946
52005
|
space: "html",
|
|
51947
|
-
transform:
|
|
51948
|
-
}),
|
|
52006
|
+
transform: UG
|
|
52007
|
+
}), GG = BG({
|
|
51949
52008
|
attributes: {
|
|
51950
52009
|
accentHeight: "accent-height",
|
|
51951
52010
|
alignmentBaseline: "alignment-baseline",
|
|
@@ -52121,7 +52180,7 @@ var PG = AG({
|
|
|
52121
52180
|
timelineBegin: "timelinebegin"
|
|
52122
52181
|
},
|
|
52123
52182
|
properties: {
|
|
52124
|
-
about:
|
|
52183
|
+
about: FG,
|
|
52125
52184
|
accentHeight: Q,
|
|
52126
52185
|
accumulate: null,
|
|
52127
52186
|
additive: null,
|
|
@@ -52143,7 +52202,7 @@ var PG = AG({
|
|
|
52143
52202
|
by: null,
|
|
52144
52203
|
calcMode: null,
|
|
52145
52204
|
capHeight: Q,
|
|
52146
|
-
className:
|
|
52205
|
+
className: NG,
|
|
52147
52206
|
clip: null,
|
|
52148
52207
|
clipPath: null,
|
|
52149
52208
|
clipPathUnits: null,
|
|
@@ -52170,7 +52229,7 @@ var PG = AG({
|
|
|
52170
52229
|
dur: null,
|
|
52171
52230
|
divisor: Q,
|
|
52172
52231
|
dominantBaseline: null,
|
|
52173
|
-
download:
|
|
52232
|
+
download: AG,
|
|
52174
52233
|
dx: null,
|
|
52175
52234
|
dy: null,
|
|
52176
52235
|
edgeMode: null,
|
|
@@ -52203,9 +52262,9 @@ var PG = AG({
|
|
|
52203
52262
|
from: null,
|
|
52204
52263
|
fx: null,
|
|
52205
52264
|
fy: null,
|
|
52206
|
-
g1:
|
|
52207
|
-
g2:
|
|
52208
|
-
glyphName:
|
|
52265
|
+
g1: PG,
|
|
52266
|
+
g2: PG,
|
|
52267
|
+
glyphName: PG,
|
|
52209
52268
|
glyphOrientationHorizontal: null,
|
|
52210
52269
|
glyphOrientationVertical: null,
|
|
52211
52270
|
glyphRef: null,
|
|
@@ -52233,7 +52292,7 @@ var PG = AG({
|
|
|
52233
52292
|
k2: Q,
|
|
52234
52293
|
k3: Q,
|
|
52235
52294
|
k4: Q,
|
|
52236
|
-
kernelMatrix:
|
|
52295
|
+
kernelMatrix: FG,
|
|
52237
52296
|
kernelUnitLength: null,
|
|
52238
52297
|
keyPoints: null,
|
|
52239
52298
|
keySplines: null,
|
|
@@ -52375,7 +52434,7 @@ var PG = AG({
|
|
|
52375
52434
|
patternTransform: null,
|
|
52376
52435
|
patternUnits: null,
|
|
52377
52436
|
phase: null,
|
|
52378
|
-
ping:
|
|
52437
|
+
ping: NG,
|
|
52379
52438
|
pitch: null,
|
|
52380
52439
|
playbackOrder: null,
|
|
52381
52440
|
pointerEvents: null,
|
|
@@ -52387,21 +52446,21 @@ var PG = AG({
|
|
|
52387
52446
|
preserveAspectRatio: null,
|
|
52388
52447
|
primitiveUnits: null,
|
|
52389
52448
|
propagate: null,
|
|
52390
|
-
property:
|
|
52449
|
+
property: FG,
|
|
52391
52450
|
r: null,
|
|
52392
52451
|
radius: null,
|
|
52393
52452
|
referrerPolicy: null,
|
|
52394
52453
|
refX: null,
|
|
52395
52454
|
refY: null,
|
|
52396
|
-
rel:
|
|
52397
|
-
rev:
|
|
52455
|
+
rel: FG,
|
|
52456
|
+
rev: FG,
|
|
52398
52457
|
renderingIntent: null,
|
|
52399
52458
|
repeatCount: null,
|
|
52400
52459
|
repeatDur: null,
|
|
52401
|
-
requiredExtensions:
|
|
52402
|
-
requiredFeatures:
|
|
52403
|
-
requiredFonts:
|
|
52404
|
-
requiredFormats:
|
|
52460
|
+
requiredExtensions: FG,
|
|
52461
|
+
requiredFeatures: FG,
|
|
52462
|
+
requiredFonts: FG,
|
|
52463
|
+
requiredFormats: FG,
|
|
52405
52464
|
resource: null,
|
|
52406
52465
|
restart: null,
|
|
52407
52466
|
result: null,
|
|
@@ -52429,7 +52488,7 @@ var PG = AG({
|
|
|
52429
52488
|
strikethroughThickness: Q,
|
|
52430
52489
|
string: null,
|
|
52431
52490
|
stroke: null,
|
|
52432
|
-
strokeDashArray:
|
|
52491
|
+
strokeDashArray: FG,
|
|
52433
52492
|
strokeDashOffset: null,
|
|
52434
52493
|
strokeLineCap: null,
|
|
52435
52494
|
strokeLineJoin: null,
|
|
@@ -52443,7 +52502,7 @@ var PG = AG({
|
|
|
52443
52502
|
syncMaster: null,
|
|
52444
52503
|
syncTolerance: null,
|
|
52445
52504
|
syncToleranceDefault: null,
|
|
52446
|
-
systemLanguage:
|
|
52505
|
+
systemLanguage: FG,
|
|
52447
52506
|
tabIndex: Q,
|
|
52448
52507
|
tableValues: null,
|
|
52449
52508
|
target: null,
|
|
@@ -52457,7 +52516,7 @@ var PG = AG({
|
|
|
52457
52516
|
title: null,
|
|
52458
52517
|
transformBehavior: null,
|
|
52459
52518
|
type: null,
|
|
52460
|
-
typeOf:
|
|
52519
|
+
typeOf: FG,
|
|
52461
52520
|
to: null,
|
|
52462
52521
|
transform: null,
|
|
52463
52522
|
transformOrigin: null,
|
|
@@ -52499,8 +52558,8 @@ var PG = AG({
|
|
|
52499
52558
|
zoomAndPan: null
|
|
52500
52559
|
},
|
|
52501
52560
|
space: "svg",
|
|
52502
|
-
transform:
|
|
52503
|
-
}),
|
|
52561
|
+
transform: HG
|
|
52562
|
+
}), KG = BG({
|
|
52504
52563
|
properties: {
|
|
52505
52564
|
xLinkActuate: null,
|
|
52506
52565
|
xLinkArcRole: null,
|
|
@@ -52514,15 +52573,15 @@ var PG = AG({
|
|
|
52514
52573
|
transform(e, t) {
|
|
52515
52574
|
return "xlink:" + t.slice(5).toLowerCase();
|
|
52516
52575
|
}
|
|
52517
|
-
}),
|
|
52576
|
+
}), qG = BG({
|
|
52518
52577
|
attributes: { xmlnsxlink: "xmlns:xlink" },
|
|
52519
52578
|
properties: {
|
|
52520
52579
|
xmlnsXLink: null,
|
|
52521
52580
|
xmlns: null
|
|
52522
52581
|
},
|
|
52523
52582
|
space: "xmlns",
|
|
52524
|
-
transform:
|
|
52525
|
-
}),
|
|
52583
|
+
transform: UG
|
|
52584
|
+
}), JG = BG({
|
|
52526
52585
|
properties: {
|
|
52527
52586
|
xmlBase: null,
|
|
52528
52587
|
xmlLang: null,
|
|
@@ -52532,49 +52591,49 @@ var PG = AG({
|
|
|
52532
52591
|
transform(e, t) {
|
|
52533
52592
|
return "xml:" + t.slice(3).toLowerCase();
|
|
52534
52593
|
}
|
|
52535
|
-
}),
|
|
52536
|
-
function
|
|
52537
|
-
let n =
|
|
52594
|
+
}), YG = /[A-Z]/g, XG = /-[a-z]/g, ZG = /^data[-\w.:]+$/i;
|
|
52595
|
+
function QG(e, t) {
|
|
52596
|
+
let n = EG(t), r = t, i = DG;
|
|
52538
52597
|
if (n in e.normal) return e.property[e.normal[n]];
|
|
52539
|
-
if (n.length > 4 && n.slice(0, 4) === "data" &&
|
|
52598
|
+
if (n.length > 4 && n.slice(0, 4) === "data" && ZG.test(t)) {
|
|
52540
52599
|
if (t.charAt(4) === "-") {
|
|
52541
|
-
let e = t.slice(5).replace(
|
|
52600
|
+
let e = t.slice(5).replace(XG, eK);
|
|
52542
52601
|
r = "data" + e.charAt(0).toUpperCase() + e.slice(1);
|
|
52543
52602
|
} else {
|
|
52544
52603
|
let e = t.slice(4);
|
|
52545
|
-
if (!
|
|
52546
|
-
let n = e.replace(
|
|
52604
|
+
if (!XG.test(e)) {
|
|
52605
|
+
let n = e.replace(YG, $G);
|
|
52547
52606
|
n.charAt(0) !== "-" && (n = "-" + n), t = "data" + n;
|
|
52548
52607
|
}
|
|
52549
52608
|
}
|
|
52550
|
-
i =
|
|
52609
|
+
i = RG;
|
|
52551
52610
|
}
|
|
52552
52611
|
return new i(r, t);
|
|
52553
52612
|
}
|
|
52554
|
-
function
|
|
52613
|
+
function $G(e) {
|
|
52555
52614
|
return "-" + e.toLowerCase();
|
|
52556
52615
|
}
|
|
52557
|
-
function
|
|
52616
|
+
function eK(e) {
|
|
52558
52617
|
return e.charAt(1).toUpperCase();
|
|
52559
52618
|
}
|
|
52560
52619
|
//#endregion
|
|
52561
52620
|
//#region node_modules/.pnpm/property-information@7.1.0/node_modules/property-information/index.js
|
|
52562
|
-
var
|
|
52563
|
-
|
|
52564
|
-
|
|
52565
|
-
|
|
52566
|
-
|
|
52567
|
-
|
|
52568
|
-
], "html"),
|
|
52569
|
-
|
|
52570
|
-
|
|
52571
|
-
|
|
52572
|
-
|
|
52573
|
-
|
|
52621
|
+
var tK = TG([
|
|
52622
|
+
VG,
|
|
52623
|
+
WG,
|
|
52624
|
+
KG,
|
|
52625
|
+
qG,
|
|
52626
|
+
JG
|
|
52627
|
+
], "html"), nK = TG([
|
|
52628
|
+
VG,
|
|
52629
|
+
GG,
|
|
52630
|
+
KG,
|
|
52631
|
+
qG,
|
|
52632
|
+
JG
|
|
52574
52633
|
], "svg");
|
|
52575
52634
|
//#endregion
|
|
52576
52635
|
//#region node_modules/.pnpm/comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens/index.js
|
|
52577
|
-
function
|
|
52636
|
+
function rK(e) {
|
|
52578
52637
|
let t = [], n = String(e || ""), r = n.indexOf(","), i = 0, a = !1;
|
|
52579
52638
|
for (; !a;) {
|
|
52580
52639
|
r === -1 && (r = n.length, a = !0);
|
|
@@ -52585,12 +52644,12 @@ function qG(e) {
|
|
|
52585
52644
|
}
|
|
52586
52645
|
//#endregion
|
|
52587
52646
|
//#region node_modules/.pnpm/hast-util-parse-selector@4.0.0/node_modules/hast-util-parse-selector/lib/index.js
|
|
52588
|
-
var
|
|
52589
|
-
function
|
|
52647
|
+
var iK = /[#.]/g;
|
|
52648
|
+
function aK(e, t) {
|
|
52590
52649
|
let n = e || "", r = {}, i = 0, a, o;
|
|
52591
52650
|
for (; i < n.length;) {
|
|
52592
|
-
|
|
52593
|
-
let e =
|
|
52651
|
+
iK.lastIndex = i;
|
|
52652
|
+
let e = iK.exec(n), t = n.slice(i, e ? e.index : n.length);
|
|
52594
52653
|
t && (a ? a === "#" ? r.id = t : Array.isArray(r.className) ? r.className.push(t) : r.className = [t] : o = t, i += t.length), e && (a = e[0], i++);
|
|
52595
52654
|
}
|
|
52596
52655
|
return {
|
|
@@ -52602,14 +52661,14 @@ function YG(e, t) {
|
|
|
52602
52661
|
}
|
|
52603
52662
|
//#endregion
|
|
52604
52663
|
//#region node_modules/.pnpm/space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.js
|
|
52605
|
-
function
|
|
52664
|
+
function oK(e) {
|
|
52606
52665
|
let t = String(e || "").trim();
|
|
52607
52666
|
return t ? t.split(/[ \t\n\r\f]+/g) : [];
|
|
52608
52667
|
}
|
|
52609
52668
|
//#endregion
|
|
52610
52669
|
//#region node_modules/.pnpm/hastscript@9.0.1/node_modules/hastscript/lib/create-h.js
|
|
52611
|
-
function
|
|
52612
|
-
let r = n ?
|
|
52670
|
+
function sK(e, t, n) {
|
|
52671
|
+
let r = n ? pK(n) : void 0;
|
|
52613
52672
|
function i(n, i, ...a) {
|
|
52614
52673
|
let o;
|
|
52615
52674
|
if (n == null) {
|
|
@@ -52620,12 +52679,12 @@ function ZG(e, t, n) {
|
|
|
52620
52679
|
let e = i;
|
|
52621
52680
|
a.unshift(e);
|
|
52622
52681
|
} else {
|
|
52623
|
-
o =
|
|
52682
|
+
o = aK(n, t);
|
|
52624
52683
|
let s = o.tagName.toLowerCase(), c = r ? r.get(s) : void 0;
|
|
52625
|
-
if (o.tagName = c || s,
|
|
52626
|
-
else for (let [t, n] of Object.entries(i))
|
|
52684
|
+
if (o.tagName = c || s, cK(i)) a.unshift(i);
|
|
52685
|
+
else for (let [t, n] of Object.entries(i)) lK(e, o.properties, t, n);
|
|
52627
52686
|
}
|
|
52628
|
-
for (let e of a)
|
|
52687
|
+
for (let e of a) uK(o.children, e);
|
|
52629
52688
|
return o.type === "element" && o.tagName === "template" && (o.content = {
|
|
52630
52689
|
type: "root",
|
|
52631
52690
|
children: o.children
|
|
@@ -52633,7 +52692,7 @@ function ZG(e, t, n) {
|
|
|
52633
52692
|
}
|
|
52634
52693
|
return i;
|
|
52635
52694
|
}
|
|
52636
|
-
function
|
|
52695
|
+
function cK(e) {
|
|
52637
52696
|
if (typeof e != "object" || !e || Array.isArray(e)) return !0;
|
|
52638
52697
|
if (typeof e.type != "string") return !1;
|
|
52639
52698
|
let t = e, n = Object.keys(e);
|
|
@@ -52647,54 +52706,54 @@ function QG(e) {
|
|
|
52647
52706
|
}
|
|
52648
52707
|
return !!("children" in e && Array.isArray(e.children));
|
|
52649
52708
|
}
|
|
52650
|
-
function
|
|
52651
|
-
let i =
|
|
52709
|
+
function lK(e, t, n, r) {
|
|
52710
|
+
let i = QG(e, n), a;
|
|
52652
52711
|
if (r != null) {
|
|
52653
52712
|
if (typeof r == "number") {
|
|
52654
52713
|
if (Number.isNaN(r)) return;
|
|
52655
52714
|
a = r;
|
|
52656
|
-
} else a = typeof r == "boolean" ? r : typeof r == "string" ? i.spaceSeparated ?
|
|
52715
|
+
} else a = typeof r == "boolean" ? r : typeof r == "string" ? i.spaceSeparated ? oK(r) : i.commaSeparated ? rK(r) : i.commaOrSpaceSeparated ? oK(rK(r).join(" ")) : dK(i, i.property, r) : Array.isArray(r) ? [...r] : i.property === "style" ? fK(r) : String(r);
|
|
52657
52716
|
if (Array.isArray(a)) {
|
|
52658
52717
|
let e = [];
|
|
52659
|
-
for (let t of a) e.push(
|
|
52718
|
+
for (let t of a) e.push(dK(i, i.property, t));
|
|
52660
52719
|
a = e;
|
|
52661
52720
|
}
|
|
52662
52721
|
i.property === "className" && Array.isArray(t.className) && (a = t.className.concat(a)), t[i.property] = a;
|
|
52663
52722
|
}
|
|
52664
52723
|
}
|
|
52665
|
-
function
|
|
52724
|
+
function uK(e, t) {
|
|
52666
52725
|
if (t != null) if (typeof t == "number" || typeof t == "string") e.push({
|
|
52667
52726
|
type: "text",
|
|
52668
52727
|
value: String(t)
|
|
52669
52728
|
});
|
|
52670
|
-
else if (Array.isArray(t)) for (let n of t)
|
|
52671
|
-
else if (typeof t == "object" && "type" in t) t.type === "root" ?
|
|
52729
|
+
else if (Array.isArray(t)) for (let n of t) uK(e, n);
|
|
52730
|
+
else if (typeof t == "object" && "type" in t) t.type === "root" ? uK(e, t.children) : e.push(t);
|
|
52672
52731
|
else throw Error("Expected node, nodes, or string, got `" + t + "`");
|
|
52673
52732
|
}
|
|
52674
|
-
function
|
|
52733
|
+
function dK(e, t, n) {
|
|
52675
52734
|
if (typeof n == "string") {
|
|
52676
52735
|
if (e.number && n && !Number.isNaN(Number(n))) return Number(n);
|
|
52677
|
-
if ((e.boolean || e.overloadedBoolean) && (n === "" ||
|
|
52736
|
+
if ((e.boolean || e.overloadedBoolean) && (n === "" || EG(n) === EG(t))) return !0;
|
|
52678
52737
|
}
|
|
52679
52738
|
return n;
|
|
52680
52739
|
}
|
|
52681
|
-
function
|
|
52740
|
+
function fK(e) {
|
|
52682
52741
|
let t = [];
|
|
52683
52742
|
for (let [n, r] of Object.entries(e)) t.push([n, r].join(": "));
|
|
52684
52743
|
return t.join("; ");
|
|
52685
52744
|
}
|
|
52686
|
-
function
|
|
52745
|
+
function pK(e) {
|
|
52687
52746
|
let t = /* @__PURE__ */ new Map();
|
|
52688
52747
|
for (let n of e) t.set(n.toLowerCase(), n);
|
|
52689
52748
|
return t;
|
|
52690
52749
|
}
|
|
52691
52750
|
//#endregion
|
|
52692
52751
|
//#region node_modules/.pnpm/hastscript@9.0.1/node_modules/hastscript/lib/svg-case-sensitive-tag-names.js
|
|
52693
|
-
var
|
|
52694
|
-
|
|
52752
|
+
var mK = /* @__PURE__ */ "altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath".split("."), hK = sK(tK, "div");
|
|
52753
|
+
sK(nK, "g", mK);
|
|
52695
52754
|
//#endregion
|
|
52696
52755
|
//#region node_modules/.pnpm/character-entities-legacy@3.0.0/node_modules/character-entities-legacy/index.js
|
|
52697
|
-
var
|
|
52756
|
+
var gK = /* @__PURE__ */ "AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml".split("."), _K = {
|
|
52698
52757
|
0: "�",
|
|
52699
52758
|
128: "€",
|
|
52700
52759
|
130: "‚",
|
|
@@ -52726,30 +52785,30 @@ var oK = /* @__PURE__ */ "AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.C
|
|
|
52726
52785
|
};
|
|
52727
52786
|
//#endregion
|
|
52728
52787
|
//#region node_modules/.pnpm/is-decimal@2.0.1/node_modules/is-decimal/index.js
|
|
52729
|
-
function
|
|
52788
|
+
function vK(e) {
|
|
52730
52789
|
let t = typeof e == "string" ? e.charCodeAt(0) : e;
|
|
52731
52790
|
return t >= 48 && t <= 57;
|
|
52732
52791
|
}
|
|
52733
52792
|
//#endregion
|
|
52734
52793
|
//#region node_modules/.pnpm/is-hexadecimal@2.0.1/node_modules/is-hexadecimal/index.js
|
|
52735
|
-
function
|
|
52794
|
+
function yK(e) {
|
|
52736
52795
|
let t = typeof e == "string" ? e.charCodeAt(0) : e;
|
|
52737
52796
|
return t >= 97 && t <= 102 || t >= 65 && t <= 70 || t >= 48 && t <= 57;
|
|
52738
52797
|
}
|
|
52739
52798
|
//#endregion
|
|
52740
52799
|
//#region node_modules/.pnpm/is-alphabetical@2.0.1/node_modules/is-alphabetical/index.js
|
|
52741
|
-
function
|
|
52800
|
+
function bK(e) {
|
|
52742
52801
|
let t = typeof e == "string" ? e.charCodeAt(0) : e;
|
|
52743
52802
|
return t >= 97 && t <= 122 || t >= 65 && t <= 90;
|
|
52744
52803
|
}
|
|
52745
52804
|
//#endregion
|
|
52746
52805
|
//#region node_modules/.pnpm/is-alphanumerical@2.0.1/node_modules/is-alphanumerical/index.js
|
|
52747
|
-
function
|
|
52748
|
-
return
|
|
52806
|
+
function xK(e) {
|
|
52807
|
+
return bK(e) || vK(e);
|
|
52749
52808
|
}
|
|
52750
52809
|
//#endregion
|
|
52751
52810
|
//#region node_modules/.pnpm/parse-entities@4.0.2/node_modules/parse-entities/lib/index.js
|
|
52752
|
-
var
|
|
52811
|
+
var SK = [
|
|
52753
52812
|
"",
|
|
52754
52813
|
"Named character references must be terminated by a semicolon",
|
|
52755
52814
|
"Numeric character references must be terminated by a semicolon",
|
|
@@ -52759,7 +52818,7 @@ var fK = [
|
|
|
52759
52818
|
"Numeric character references cannot be disallowed",
|
|
52760
52819
|
"Numeric character references cannot be outside the permissible Unicode range"
|
|
52761
52820
|
];
|
|
52762
|
-
function
|
|
52821
|
+
function CK(e, t) {
|
|
52763
52822
|
let n = t || {}, r = typeof n.additional == "string" ? n.additional.charCodeAt(0) : n.additional, i = [], a = 0, o = -1, s = "", c, l;
|
|
52764
52823
|
n.position && ("start" in n.position || "indent" in n.position ? (l = n.position.indent, c = n.position.start) : c = n.position);
|
|
52765
52824
|
let u = (c ? c.line : 0) || 1, d = (c ? c.column : 0) || 1, f = m(), p;
|
|
@@ -52775,11 +52834,11 @@ function pK(e, t) {
|
|
|
52775
52834
|
let t = e.charCodeAt(l);
|
|
52776
52835
|
t === 88 || t === 120 ? (u = "hexadecimal", l = ++c) : u = "decimal";
|
|
52777
52836
|
} else u = "named";
|
|
52778
|
-
let _ = "", v = "", y = "", b = u === "named" ?
|
|
52837
|
+
let _ = "", v = "", y = "", b = u === "named" ? xK : u === "decimal" ? vK : yK;
|
|
52779
52838
|
for (l--; ++l <= e.length;) {
|
|
52780
52839
|
let t = e.charCodeAt(l);
|
|
52781
52840
|
if (!b(t)) break;
|
|
52782
|
-
y += String.fromCharCode(t), u === "named" &&
|
|
52841
|
+
y += String.fromCharCode(t), u === "named" && gK.includes(y) && (_ = y, v = Qr(y));
|
|
52783
52842
|
}
|
|
52784
52843
|
let x = e.charCodeAt(l) === 59;
|
|
52785
52844
|
if (x) {
|
|
@@ -52795,18 +52854,18 @@ function pK(e, t) {
|
|
|
52795
52854
|
let t = _ ? 1 : 3;
|
|
52796
52855
|
if (n.attribute) {
|
|
52797
52856
|
let n = e.charCodeAt(l);
|
|
52798
|
-
n === 61 ? (h(t, S), v = "") :
|
|
52857
|
+
n === 61 ? (h(t, S), v = "") : xK(n) ? v = "" : h(t, S);
|
|
52799
52858
|
} else h(t, S);
|
|
52800
52859
|
}
|
|
52801
52860
|
C = v;
|
|
52802
52861
|
} else {
|
|
52803
52862
|
x || h(2, S);
|
|
52804
52863
|
let e = Number.parseInt(y, u === "hexadecimal" ? 16 : 10);
|
|
52805
|
-
if (
|
|
52806
|
-
else if (e in
|
|
52864
|
+
if (wK(e)) h(7, S), C = "�";
|
|
52865
|
+
else if (e in _K) h(6, S), C = _K[e];
|
|
52807
52866
|
else {
|
|
52808
52867
|
let t = "";
|
|
52809
|
-
|
|
52868
|
+
TK(e) && h(6, S), e > 65535 && (e -= 65536, t += String.fromCharCode(e >>> 10 | 55296), e = 56320 | e & 1023), C = t + String.fromCharCode(e);
|
|
52810
52869
|
}
|
|
52811
52870
|
}
|
|
52812
52871
|
if (C) {
|
|
@@ -52828,7 +52887,7 @@ function pK(e, t) {
|
|
|
52828
52887
|
}
|
|
52829
52888
|
function h(e, t) {
|
|
52830
52889
|
let r;
|
|
52831
|
-
n.warning && (r = m(), r.column += t, r.offset += t, n.warning.call(n.warningContext || void 0,
|
|
52890
|
+
n.warning && (r = m(), r.column += t, r.offset += t, n.warning.call(n.warningContext || void 0, SK[e], r, e));
|
|
52832
52891
|
}
|
|
52833
52892
|
function g() {
|
|
52834
52893
|
s &&= (i.push(s), n.text && n.text.call(n.textContext || void 0, s, {
|
|
@@ -52837,31 +52896,31 @@ function pK(e, t) {
|
|
|
52837
52896
|
}), "");
|
|
52838
52897
|
}
|
|
52839
52898
|
}
|
|
52840
|
-
function
|
|
52899
|
+
function wK(e) {
|
|
52841
52900
|
return e >= 55296 && e <= 57343 || e > 1114111;
|
|
52842
52901
|
}
|
|
52843
|
-
function
|
|
52902
|
+
function TK(e) {
|
|
52844
52903
|
return e >= 1 && e <= 8 || e === 11 || e >= 13 && e <= 31 || e >= 127 && e <= 159 || e >= 64976 && e <= 65007 || (e & 65535) == 65535 || (e & 65535) == 65534;
|
|
52845
52904
|
}
|
|
52846
52905
|
//#endregion
|
|
52847
52906
|
//#region node_modules/.pnpm/refractor@5.0.0/node_modules/refractor/lib/prism-core.js
|
|
52848
|
-
var
|
|
52907
|
+
var EK = 0, DK = {}, OK = {
|
|
52849
52908
|
util: {
|
|
52850
52909
|
type: function(e) {
|
|
52851
52910
|
return Object.prototype.toString.call(e).slice(8, -1);
|
|
52852
52911
|
},
|
|
52853
52912
|
objId: function(e) {
|
|
52854
|
-
return e.__id || Object.defineProperty(e, "__id", { value: ++
|
|
52913
|
+
return e.__id || Object.defineProperty(e, "__id", { value: ++EK }), e.__id;
|
|
52855
52914
|
},
|
|
52856
52915
|
clone: function e(t, n) {
|
|
52857
52916
|
n ||= {};
|
|
52858
52917
|
var r, i;
|
|
52859
|
-
switch (
|
|
52918
|
+
switch (OK.util.type(t)) {
|
|
52860
52919
|
case "Object":
|
|
52861
|
-
if (i =
|
|
52920
|
+
if (i = OK.util.objId(t), n[i]) return n[i];
|
|
52862
52921
|
for (var a in r = {}, n[i] = r, t) t.hasOwnProperty(a) && (r[a] = e(t[a], n));
|
|
52863
52922
|
return r;
|
|
52864
|
-
case "Array": return i =
|
|
52923
|
+
case "Array": return i = OK.util.objId(t), n[i] ? n[i] : (r = [], n[i] = r, t.forEach(function(t, i) {
|
|
52865
52924
|
r[i] = e(t, n);
|
|
52866
52925
|
}), r);
|
|
52867
52926
|
default: return t;
|
|
@@ -52869,33 +52928,33 @@ var gK = 0, _K = {}, vK = {
|
|
|
52869
52928
|
}
|
|
52870
52929
|
},
|
|
52871
52930
|
languages: {
|
|
52872
|
-
plain:
|
|
52873
|
-
plaintext:
|
|
52874
|
-
text:
|
|
52875
|
-
txt:
|
|
52931
|
+
plain: DK,
|
|
52932
|
+
plaintext: DK,
|
|
52933
|
+
text: DK,
|
|
52934
|
+
txt: DK,
|
|
52876
52935
|
extend: function(e, t) {
|
|
52877
|
-
var n =
|
|
52936
|
+
var n = OK.util.clone(OK.languages[e]);
|
|
52878
52937
|
for (var r in t) n[r] = t[r];
|
|
52879
52938
|
return n;
|
|
52880
52939
|
},
|
|
52881
52940
|
insertBefore: function(e, t, n, r) {
|
|
52882
|
-
r ||=
|
|
52941
|
+
r ||= OK.languages;
|
|
52883
52942
|
var i = r[e], a = {};
|
|
52884
52943
|
for (var o in i) if (i.hasOwnProperty(o)) {
|
|
52885
52944
|
if (o == t) for (var s in n) n.hasOwnProperty(s) && (a[s] = n[s]);
|
|
52886
52945
|
n.hasOwnProperty(o) || (a[o] = i[o]);
|
|
52887
52946
|
}
|
|
52888
52947
|
var c = r[e];
|
|
52889
|
-
return r[e] = a,
|
|
52948
|
+
return r[e] = a, OK.languages.DFS(OK.languages, function(t, n) {
|
|
52890
52949
|
n === c && t != e && (this[t] = a);
|
|
52891
52950
|
}), a;
|
|
52892
52951
|
},
|
|
52893
52952
|
DFS: function e(t, n, r, i) {
|
|
52894
52953
|
i ||= {};
|
|
52895
|
-
var a =
|
|
52954
|
+
var a = OK.util.objId;
|
|
52896
52955
|
for (var o in t) if (t.hasOwnProperty(o)) {
|
|
52897
52956
|
n.call(t, o, t[o], r || o);
|
|
52898
|
-
var s = t[o], c =
|
|
52957
|
+
var s = t[o], c = OK.util.type(s);
|
|
52899
52958
|
c === "Object" && !i[a(s)] ? (i[a(s)] = !0, e(s, n, null, i)) : c === "Array" && !i[a(s)] && (i[a(s)] = !0, e(s, n, o, i));
|
|
52900
52959
|
}
|
|
52901
52960
|
}
|
|
@@ -52907,8 +52966,8 @@ var gK = 0, _K = {}, vK = {
|
|
|
52907
52966
|
grammar: t,
|
|
52908
52967
|
language: n
|
|
52909
52968
|
};
|
|
52910
|
-
if (
|
|
52911
|
-
return r.tokens =
|
|
52969
|
+
if (OK.hooks.run("before-tokenize", r), !r.grammar) throw Error("The language \"" + r.language + "\" has no grammar.");
|
|
52970
|
+
return r.tokens = OK.tokenize(r.code, r.grammar), OK.hooks.run("after-tokenize", r), kK.stringify(OK.util.encode(r.tokens), r.language);
|
|
52912
52971
|
},
|
|
52913
52972
|
tokenize: function(e, t) {
|
|
52914
52973
|
var n = t.rest;
|
|
@@ -52916,26 +52975,26 @@ var gK = 0, _K = {}, vK = {
|
|
|
52916
52975
|
for (var r in n) t[r] = n[r];
|
|
52917
52976
|
delete t.rest;
|
|
52918
52977
|
}
|
|
52919
|
-
var i = new
|
|
52920
|
-
return
|
|
52978
|
+
var i = new MK();
|
|
52979
|
+
return NK(i, i.head, e), jK(e, i, t, i.head, 0), FK(i);
|
|
52921
52980
|
},
|
|
52922
52981
|
hooks: {
|
|
52923
52982
|
all: {},
|
|
52924
52983
|
add: function(e, t) {
|
|
52925
|
-
var n =
|
|
52984
|
+
var n = OK.hooks.all;
|
|
52926
52985
|
n[e] = n[e] || [], n[e].push(t);
|
|
52927
52986
|
},
|
|
52928
52987
|
run: function(e, t) {
|
|
52929
|
-
var n =
|
|
52988
|
+
var n = OK.hooks.all[e];
|
|
52930
52989
|
if (!(!n || !n.length)) for (var r = 0, i; i = n[r++];) i(t);
|
|
52931
52990
|
}
|
|
52932
52991
|
},
|
|
52933
|
-
Token:
|
|
52992
|
+
Token: kK
|
|
52934
52993
|
};
|
|
52935
|
-
function
|
|
52994
|
+
function kK(e, t, n, r) {
|
|
52936
52995
|
this.type = e, this.content = t, this.alias = n, this.length = (r || "").length | 0;
|
|
52937
52996
|
}
|
|
52938
|
-
function
|
|
52997
|
+
function AK(e, t, n, r) {
|
|
52939
52998
|
e.lastIndex = t;
|
|
52940
52999
|
var i = e.exec(n);
|
|
52941
53000
|
if (i && r && i[1]) {
|
|
@@ -52944,7 +53003,7 @@ function bK(e, t, n, r) {
|
|
|
52944
53003
|
}
|
|
52945
53004
|
return i;
|
|
52946
53005
|
}
|
|
52947
|
-
function
|
|
53006
|
+
function jK(e, t, n, r, i, a) {
|
|
52948
53007
|
for (var o in n) if (!(!n.hasOwnProperty(o) || !n[o])) {
|
|
52949
53008
|
var s = n[o];
|
|
52950
53009
|
s = Array.isArray(s) ? s : [s];
|
|
@@ -52958,34 +53017,34 @@ function xK(e, t, n, r, i, a) {
|
|
|
52958
53017
|
for (var h = l.pattern || l, g = r.next, _ = i; g !== t.tail && !(a && _ >= a.reach); _ += g.value.length, g = g.next) {
|
|
52959
53018
|
var v = g.value;
|
|
52960
53019
|
if (t.length > e.length) return;
|
|
52961
|
-
if (!(v instanceof
|
|
53020
|
+
if (!(v instanceof kK)) {
|
|
52962
53021
|
var y = 1, b;
|
|
52963
53022
|
if (f) {
|
|
52964
|
-
if (b =
|
|
53023
|
+
if (b = AK(h, _, e, d), !b || b.index >= e.length) break;
|
|
52965
53024
|
var x = b.index, S = b.index + b[0].length, C = _;
|
|
52966
53025
|
for (C += g.value.length; x >= C;) g = g.next, C += g.value.length;
|
|
52967
|
-
if (C -= g.value.length, _ = C, g.value instanceof
|
|
53026
|
+
if (C -= g.value.length, _ = C, g.value instanceof kK) continue;
|
|
52968
53027
|
for (var w = g; w !== t.tail && (C < S || typeof w.value == "string"); w = w.next) y++, C += w.value.length;
|
|
52969
53028
|
y--, v = e.slice(_, C), b.index -= _;
|
|
52970
|
-
} else if (b =
|
|
53029
|
+
} else if (b = AK(h, 0, v, d), !b) continue;
|
|
52971
53030
|
var x = b.index, T = b[0], E = v.slice(0, x), ee = v.slice(x + T.length), te = _ + v.length;
|
|
52972
53031
|
a && te > a.reach && (a.reach = te);
|
|
52973
53032
|
var ne = g.prev;
|
|
52974
|
-
E && (ne =
|
|
52975
|
-
var re = new
|
|
52976
|
-
if (g =
|
|
53033
|
+
E && (ne = NK(t, ne, E), _ += E.length), PK(t, ne, y);
|
|
53034
|
+
var re = new kK(o, u ? OK.tokenize(T, u) : T, p, T);
|
|
53035
|
+
if (g = NK(t, ne, re), ee && NK(t, g, ee), y > 1) {
|
|
52977
53036
|
var ie = {
|
|
52978
53037
|
cause: o + "," + c,
|
|
52979
53038
|
reach: te
|
|
52980
53039
|
};
|
|
52981
|
-
|
|
53040
|
+
jK(e, t, n, g.prev, _, ie), a && ie.reach > a.reach && (a.reach = ie.reach);
|
|
52982
53041
|
}
|
|
52983
53042
|
}
|
|
52984
53043
|
}
|
|
52985
53044
|
}
|
|
52986
53045
|
}
|
|
52987
53046
|
}
|
|
52988
|
-
function
|
|
53047
|
+
function MK() {
|
|
52989
53048
|
var e = {
|
|
52990
53049
|
value: null,
|
|
52991
53050
|
prev: null,
|
|
@@ -52997,7 +53056,7 @@ function SK() {
|
|
|
52997
53056
|
};
|
|
52998
53057
|
e.next = t, this.head = e, this.tail = t, this.length = 0;
|
|
52999
53058
|
}
|
|
53000
|
-
function
|
|
53059
|
+
function NK(e, t, n) {
|
|
53001
53060
|
var r = t.next, i = {
|
|
53002
53061
|
value: n,
|
|
53003
53062
|
prev: t,
|
|
@@ -53005,22 +53064,22 @@ function CK(e, t, n) {
|
|
|
53005
53064
|
};
|
|
53006
53065
|
return t.next = i, r.prev = i, e.length++, i;
|
|
53007
53066
|
}
|
|
53008
|
-
function
|
|
53067
|
+
function PK(e, t, n) {
|
|
53009
53068
|
for (var r = t.next, i = 0; i < n && r !== e.tail; i++) r = r.next;
|
|
53010
53069
|
t.next = r, r.prev = t, e.length -= i;
|
|
53011
53070
|
}
|
|
53012
|
-
function
|
|
53071
|
+
function FK(e) {
|
|
53013
53072
|
for (var t = [], n = e.head.next; n !== e.tail;) t.push(n.value), n = n.next;
|
|
53014
53073
|
return t;
|
|
53015
53074
|
}
|
|
53016
|
-
var
|
|
53075
|
+
var IK = OK;
|
|
53017
53076
|
//#endregion
|
|
53018
53077
|
//#region node_modules/.pnpm/refractor@5.0.0/node_modules/refractor/lib/core.js
|
|
53019
|
-
function
|
|
53020
|
-
|
|
53021
|
-
var $ = new
|
|
53022
|
-
$.highlight =
|
|
53023
|
-
function
|
|
53078
|
+
function LK() {}
|
|
53079
|
+
LK.prototype = IK;
|
|
53080
|
+
var $ = new LK();
|
|
53081
|
+
$.highlight = RK, $.register = zK, $.alias = BK, $.registered = VK, $.listLanguages = HK, $.util.encode = WK, $.Token.stringify = UK;
|
|
53082
|
+
function RK(e, t) {
|
|
53024
53083
|
if (typeof e != "string") throw TypeError("Expected `string` for `value`, got `" + e + "`");
|
|
53025
53084
|
let n, r;
|
|
53026
53085
|
/* c8 ignore next 2 */
|
|
@@ -53032,14 +53091,14 @@ function OK(e, t) {
|
|
|
53032
53091
|
}
|
|
53033
53092
|
return {
|
|
53034
53093
|
type: "root",
|
|
53035
|
-
children:
|
|
53094
|
+
children: IK.highlight.call($, e, n, r)
|
|
53036
53095
|
};
|
|
53037
53096
|
}
|
|
53038
|
-
function
|
|
53097
|
+
function zK(e) {
|
|
53039
53098
|
if (typeof e != "function" || !e.displayName) throw Error("Expected `function` for `syntax`, got `" + e + "`");
|
|
53040
53099
|
Object.hasOwn($.languages, e.displayName) || e($);
|
|
53041
53100
|
}
|
|
53042
|
-
function
|
|
53101
|
+
function BK(e, t) {
|
|
53043
53102
|
let n = $.languages, r = {};
|
|
53044
53103
|
typeof e == "string" ? t && (r[e] = t) : r = e;
|
|
53045
53104
|
let i;
|
|
@@ -53048,65 +53107,65 @@ function AK(e, t) {
|
|
|
53048
53107
|
for (; ++a < t.length;) n[t[a]] = n[i];
|
|
53049
53108
|
}
|
|
53050
53109
|
}
|
|
53051
|
-
function
|
|
53110
|
+
function VK(e) {
|
|
53052
53111
|
if (typeof e != "string") throw TypeError("Expected `string` for `aliasOrLanguage`, got `" + e + "`");
|
|
53053
53112
|
return Object.hasOwn($.languages, e);
|
|
53054
53113
|
}
|
|
53055
|
-
function
|
|
53114
|
+
function HK() {
|
|
53056
53115
|
let e = $.languages, t = [], n;
|
|
53057
53116
|
for (n in e) Object.hasOwn(e, n) && typeof e[n] == "object" && t.push(n);
|
|
53058
53117
|
return t;
|
|
53059
53118
|
}
|
|
53060
|
-
function
|
|
53119
|
+
function UK(e, t) {
|
|
53061
53120
|
if (typeof e == "string") return {
|
|
53062
53121
|
type: "text",
|
|
53063
53122
|
value: e
|
|
53064
53123
|
};
|
|
53065
53124
|
if (Array.isArray(e)) {
|
|
53066
53125
|
let n = [], r = -1;
|
|
53067
|
-
for (; ++r < e.length;) e[r] !== null && e[r] !== void 0 && e[r] !== "" && n.push(
|
|
53126
|
+
for (; ++r < e.length;) e[r] !== null && e[r] !== void 0 && e[r] !== "" && n.push(UK(e[r], t));
|
|
53068
53127
|
return n;
|
|
53069
53128
|
}
|
|
53070
53129
|
let n = {
|
|
53071
53130
|
attributes: {},
|
|
53072
53131
|
classes: ["token", e.type],
|
|
53073
|
-
content:
|
|
53132
|
+
content: UK(e.content, t),
|
|
53074
53133
|
language: t,
|
|
53075
53134
|
tag: "span",
|
|
53076
53135
|
type: e.type
|
|
53077
53136
|
};
|
|
53078
|
-
return e.alias && n.classes.push(...typeof e.alias == "string" ? [e.alias] : e.alias), $.hooks.run("wrap", n),
|
|
53137
|
+
return e.alias && n.classes.push(...typeof e.alias == "string" ? [e.alias] : e.alias), $.hooks.run("wrap", n), hK(n.tag + "." + n.classes.join("."), GK(n.attributes), n.content);
|
|
53079
53138
|
}
|
|
53080
|
-
function
|
|
53139
|
+
function WK(e) {
|
|
53081
53140
|
return e;
|
|
53082
53141
|
}
|
|
53083
|
-
function
|
|
53142
|
+
function GK(e) {
|
|
53084
53143
|
let t;
|
|
53085
|
-
for (t in e) Object.hasOwn(e, t) && (e[t] =
|
|
53144
|
+
for (t in e) Object.hasOwn(e, t) && (e[t] = CK(e[t]));
|
|
53086
53145
|
return e;
|
|
53087
53146
|
}
|
|
53088
|
-
$.register(
|
|
53147
|
+
$.register(HW), $.register(UW), $.register(WW), $.register(GW), $.register(KW), $.register(qW), $.register(JW), $.register(YW), $.register(XW), $.register(ZW), $.register(QW), $.register($W), $.register(eG), $.register(tG), $.register(nG), $.register(rG), $.register(iG), $.register(aG), $.register(oG), $.register(sG), $.register(cG), $.register(lG), $.register(uG), $.register(dG), $.register(fG), $.register(pG), $.register(mG), $.register(hG), $.register(gG), $.register(_G), $.register(vG), $.register(yG), $.register(bG), $.register(xG), $.register(SG), $.register(CG);
|
|
53089
53148
|
//#endregion
|
|
53090
53149
|
//#region src/lib/global-scroll-listener.ts
|
|
53091
|
-
var
|
|
53092
|
-
Array.from(
|
|
53093
|
-
},
|
|
53094
|
-
|
|
53150
|
+
var KK = /* @__PURE__ */ new Set(), qK = !1, JK = () => typeof document < "u", YK = (e) => {
|
|
53151
|
+
Array.from(KK).forEach((t) => t(e));
|
|
53152
|
+
}, XK = () => {
|
|
53153
|
+
qK || !JK() || (document.addEventListener("scroll", YK, {
|
|
53095
53154
|
capture: !0,
|
|
53096
53155
|
passive: !0
|
|
53097
|
-
}),
|
|
53098
|
-
},
|
|
53099
|
-
!
|
|
53100
|
-
},
|
|
53101
|
-
if (!
|
|
53156
|
+
}), qK = !0);
|
|
53157
|
+
}, ZK = () => {
|
|
53158
|
+
!qK || !JK() || (document.removeEventListener("scroll", YK, !0), qK = !1);
|
|
53159
|
+
}, QK = (e) => {
|
|
53160
|
+
if (!JK()) return () => void 0;
|
|
53102
53161
|
let t = !0;
|
|
53103
|
-
return
|
|
53104
|
-
t && (t = !1,
|
|
53162
|
+
return KK.add(e), XK(), () => {
|
|
53163
|
+
t && (t = !1, KK.delete(e), KK.size === 0 && ZK());
|
|
53105
53164
|
};
|
|
53106
|
-
},
|
|
53165
|
+
}, $K = (e) => e ? e.closest(".zt-md-editor") ?? e : null, eq = (e, t, n) => {
|
|
53107
53166
|
let r = typeof window > "u" ? e.bottom : window.innerHeight, i = n?.top ?? 0, a = n?.bottom ?? r, o = e.top - i, s = a - e.bottom;
|
|
53108
53167
|
return s < t && o > s ? "top" : "bottom";
|
|
53109
|
-
},
|
|
53168
|
+
}, tq = (e, t) => {
|
|
53110
53169
|
let n = t.getBoundingClientRect();
|
|
53111
53170
|
return {
|
|
53112
53171
|
anchorTopInContent: e.top - n.top + t.scrollTop,
|
|
@@ -53114,28 +53173,28 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
53114
53173
|
anchorLeftInContent: e.left - n.left + t.scrollLeft,
|
|
53115
53174
|
anchorRightInContent: e.right - n.left + t.scrollLeft
|
|
53116
53175
|
};
|
|
53117
|
-
},
|
|
53176
|
+
}, nq = (e) => {
|
|
53118
53177
|
let { anchor: t, overlaySize: n, horizontalAlign: r = "start" } = e, i = t.anchorRightInContent ?? t.anchorLeftInContent;
|
|
53119
53178
|
return r === "end" ? i - n.width : r === "center" ? t.anchorLeftInContent + (i - t.anchorLeftInContent - n.width) / 2 : t.anchorLeftInContent;
|
|
53120
|
-
},
|
|
53121
|
-
let { wrapper: t, anchor: n, overlaySize: r, placement: i, offsetY: a, boundaryInset: o } = e, s = t.getBoundingClientRect(), c = t.scrollLeft + o, l = t.scrollLeft + t.clientWidth - r.width - o, u =
|
|
53179
|
+
}, rq = (e) => {
|
|
53180
|
+
let { wrapper: t, anchor: n, overlaySize: r, placement: i, offsetY: a, boundaryInset: o } = e, s = t.getBoundingClientRect(), c = t.scrollLeft + o, l = t.scrollLeft + t.clientWidth - r.width - o, u = nq(e), d = Math.min(Math.max(u, c), Math.max(c, l)), f = i === "top" ? n.anchorTopInContent - (r.height ?? 0) - a : n.anchorBottomInContent + a;
|
|
53122
53181
|
return {
|
|
53123
53182
|
left: s.left + d - t.scrollLeft,
|
|
53124
53183
|
top: s.top + f - t.scrollTop
|
|
53125
53184
|
};
|
|
53126
|
-
},
|
|
53127
|
-
let n =
|
|
53185
|
+
}, iq = (e, t) => {
|
|
53186
|
+
let n = rq(e), r = t.getBoundingClientRect();
|
|
53128
53187
|
return {
|
|
53129
53188
|
left: n.left - r.left,
|
|
53130
53189
|
top: n.top - r.top
|
|
53131
53190
|
};
|
|
53132
|
-
},
|
|
53191
|
+
}, aq = (e) => {
|
|
53133
53192
|
let t = 0, n = null, r = null, i = () => {
|
|
53134
53193
|
typeof window > "u" || (t && window.cancelAnimationFrame(t), t = window.requestAnimationFrame(() => {
|
|
53135
53194
|
t = 0, e();
|
|
53136
53195
|
}));
|
|
53137
53196
|
}, a = () => {
|
|
53138
|
-
window.addEventListener("resize", i), r ||=
|
|
53197
|
+
window.addEventListener("resize", i), r ||= QK(i);
|
|
53139
53198
|
}, o = () => {
|
|
53140
53199
|
window.removeEventListener("resize", i), r?.(), r = null;
|
|
53141
53200
|
}, s = (e) => {
|
|
@@ -53150,16 +53209,16 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
53150
53209
|
typeof window < "u" && t && (window.cancelAnimationFrame(t), t = 0), o(), s(null);
|
|
53151
53210
|
}
|
|
53152
53211
|
};
|
|
53153
|
-
},
|
|
53212
|
+
}, oq = (e, t, n, r) => {
|
|
53154
53213
|
let i = t.top - r.top, a = r.bottom - t.bottom;
|
|
53155
53214
|
return e === "top" ? i < n && a > i ? "bottom" : "top" : a < n && i > a ? "top" : "bottom";
|
|
53156
|
-
},
|
|
53215
|
+
}, sq = ({ open: e, portalContainer: t, editorWrapper: n, defaultPlacement: r = "bottom", horizontalAlign: i = "start", offsetY: a = 8, boundaryInset: s = 2, fallbackWidth: u, fallbackHeight: f, onOutside: p }) => {
|
|
53157
53216
|
let m = d(null), h = d(null), g = d(e), _ = o(() => {
|
|
53158
53217
|
let e = m.current, o = h.current;
|
|
53159
53218
|
if (!g.current || !e || !o || !t || !n) return;
|
|
53160
|
-
let c = e.getBoundingClientRect(), l = n.getBoundingClientRect(), d = o.offsetWidth || u, p = o.offsetHeight || f, _ =
|
|
53219
|
+
let c = e.getBoundingClientRect(), l = n.getBoundingClientRect(), d = o.offsetWidth || u, p = o.offsetHeight || f, _ = oq(r, c, p, l), v = iq({
|
|
53161
53220
|
wrapper: n,
|
|
53162
|
-
anchor:
|
|
53221
|
+
anchor: tq(c, n),
|
|
53163
53222
|
overlaySize: {
|
|
53164
53223
|
width: d,
|
|
53165
53224
|
height: p
|
|
@@ -53190,7 +53249,7 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
53190
53249
|
_();
|
|
53191
53250
|
}, [e, _]), c(() => {
|
|
53192
53251
|
if (!e) return;
|
|
53193
|
-
let t =
|
|
53252
|
+
let t = aq(_);
|
|
53194
53253
|
return t.bindGlobal(), t.bindWrapper(n ?? null), t.schedule(), () => {
|
|
53195
53254
|
t.destroy();
|
|
53196
53255
|
};
|
|
@@ -53213,7 +53272,7 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
53213
53272
|
panelRef: v,
|
|
53214
53273
|
updatePosition: _
|
|
53215
53274
|
};
|
|
53216
|
-
},
|
|
53275
|
+
}, cq = ({ panel: e, portalContainer: t, className: n, role: r, onMouseDown: a, children: o }) => !e.open || !t ? null : _(i("div", {
|
|
53217
53276
|
ref: e.panelRef,
|
|
53218
53277
|
role: r,
|
|
53219
53278
|
className: n,
|
|
@@ -53222,7 +53281,7 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
53222
53281
|
visibility: "hidden"
|
|
53223
53282
|
},
|
|
53224
53283
|
onMouseDown: a
|
|
53225
|
-
}, o), t),
|
|
53284
|
+
}, o), t), lq = "code_block", uq = "ZT_MD_CODE_BLOCK_LANGUAGE_PICKER", dq = 8, fq = 96, pq = 26, mq = 224, hq = 220, gq = {
|
|
53226
53285
|
javascript: "JavaScript",
|
|
53227
53286
|
typescript: "TypeScript",
|
|
53228
53287
|
jsx: "JSX",
|
|
@@ -53239,46 +53298,46 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
53239
53298
|
yml: "YAML",
|
|
53240
53299
|
sql: "SQL",
|
|
53241
53300
|
xml: "XML"
|
|
53242
|
-
},
|
|
53243
|
-
let t =
|
|
53244
|
-
return
|
|
53245
|
-
},
|
|
53246
|
-
let t = $.listLanguages(), n = [...new Set(t.map((e) =>
|
|
53301
|
+
}, _q = (e) => {
|
|
53302
|
+
let t = SW(e);
|
|
53303
|
+
return gq[t] ?? t;
|
|
53304
|
+
}, vq = (e) => {
|
|
53305
|
+
let t = $.listLanguages(), n = [...new Set(t.map((e) => SW(e)).filter((e) => e !== yW))].sort((e, t) => e.localeCompare(t));
|
|
53247
53306
|
return [{
|
|
53248
|
-
value:
|
|
53307
|
+
value: yW,
|
|
53249
53308
|
label: e.codeBlockLanguagePlainText
|
|
53250
53309
|
}, ...n.map((e) => ({
|
|
53251
53310
|
value: e,
|
|
53252
|
-
label:
|
|
53311
|
+
label: _q(e)
|
|
53253
53312
|
}))];
|
|
53254
|
-
},
|
|
53313
|
+
}, yq = (e) => {
|
|
53255
53314
|
let t = e.state.selection.$from;
|
|
53256
53315
|
for (let e = t.depth; e >= 0; --e) {
|
|
53257
53316
|
let n = t.node(e);
|
|
53258
|
-
if (n.type.name ===
|
|
53317
|
+
if (n.type.name === lq) return {
|
|
53259
53318
|
position: e === 0 ? 0 : t.before(e),
|
|
53260
53319
|
node: n
|
|
53261
53320
|
};
|
|
53262
53321
|
}
|
|
53263
53322
|
return null;
|
|
53264
|
-
},
|
|
53323
|
+
}, bq = (e, t) => {
|
|
53265
53324
|
let n = e.nodeDOM(t);
|
|
53266
53325
|
return n instanceof HTMLPreElement ? n : n instanceof HTMLElement ? n.querySelector("pre") : null;
|
|
53267
|
-
},
|
|
53268
|
-
let [t, r] = f(!1), [a, o] = f(""), [s, p] = f(0), m = d(null), h = d(null), g =
|
|
53326
|
+
}, xq = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, Sq = (e) => {
|
|
53327
|
+
let [t, r] = f(!1), [a, o] = f(""), [s, p] = f(0), m = d(null), h = d(null), g = SW(e.currentLanguage), _ = _q(g), v = u(() => vq(e.messages), [e.messages]), y = u(() => {
|
|
53269
53328
|
let e = a.trim().toLowerCase();
|
|
53270
53329
|
return e ? v.filter((t) => {
|
|
53271
53330
|
let n = t.label.toLowerCase(), r = t.value.toLowerCase();
|
|
53272
53331
|
return n.includes(e) || r.includes(e);
|
|
53273
53332
|
}) : v;
|
|
53274
|
-
}, [a, v]), b =
|
|
53333
|
+
}, [a, v]), b = sq({
|
|
53275
53334
|
open: t,
|
|
53276
53335
|
portalContainer: e.portalContainer,
|
|
53277
53336
|
editorWrapper: e.collisionBoundary,
|
|
53278
53337
|
horizontalAlign: "end",
|
|
53279
53338
|
offsetY: 6,
|
|
53280
|
-
fallbackWidth:
|
|
53281
|
-
fallbackHeight:
|
|
53339
|
+
fallbackWidth: mq,
|
|
53340
|
+
fallbackHeight: hq,
|
|
53282
53341
|
onOutside: () => r(!1)
|
|
53283
53342
|
}), x = (e) => e instanceof HTMLElement ? e.closest("input, textarea, [contenteditable]:not([contenteditable=\"false\"])") !== null : !1, S = (e) => {
|
|
53284
53343
|
x(e.target) || e.preventDefault();
|
|
@@ -53327,7 +53386,7 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
53327
53386
|
size: 14,
|
|
53328
53387
|
strokeWidth: 2,
|
|
53329
53388
|
"aria-hidden": "true"
|
|
53330
|
-
}))), i(
|
|
53389
|
+
}))), i(cq, {
|
|
53331
53390
|
panel: b,
|
|
53332
53391
|
portalContainer: e.portalContainer,
|
|
53333
53392
|
className: "zt-md-code-language-picker-panel",
|
|
@@ -53370,28 +53429,28 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
53370
53429
|
strokeWidth: 2,
|
|
53371
53430
|
"aria-hidden": "true"
|
|
53372
53431
|
}) : null)) : i("div", { className: "zt-md-code-language-picker-empty" }, "-"))));
|
|
53373
|
-
},
|
|
53432
|
+
}, Cq = class {
|
|
53374
53433
|
constructor(e, t, n) {
|
|
53375
|
-
this.currentCodeBlockPosition = null, this.currentPreElement = null, this.currentActionsContainer = null, this.currentRenderedLanguage = null, this.hasPositionContext = !1, this.repositionScheduler =
|
|
53434
|
+
this.currentCodeBlockPosition = null, this.currentPreElement = null, this.currentActionsContainer = null, this.currentRenderedLanguage = null, this.hasPositionContext = !1, this.repositionScheduler = aq(() => {
|
|
53376
53435
|
this.hasPositionContext && this.updateOverlayPosition();
|
|
53377
53436
|
}), this.handlePickerLayoutChange = () => {
|
|
53378
53437
|
this.hasPositionContext && this.updateOverlayPosition();
|
|
53379
|
-
}, this.view = e, this.messages = t, this.portalContainer = n, this.editorWrapper =
|
|
53438
|
+
}, this.view = e, this.messages = t, this.portalContainer = n, this.editorWrapper = $K(e.dom), this.host = document.createElement("span"), this.host.className = "zt-md-code-language-picker-host", this.hostRoot = m(this.host), this.repositionScheduler.bindGlobal(), this.repositionScheduler.bindWrapper(this.editorWrapper), this.update(e);
|
|
53380
53439
|
}
|
|
53381
53440
|
applyLanguage(e) {
|
|
53382
53441
|
if (this.currentCodeBlockPosition === null) return;
|
|
53383
53442
|
let t = this.view.state.doc.nodeAt(this.currentCodeBlockPosition);
|
|
53384
|
-
if (!t || t.type.name !==
|
|
53385
|
-
let n =
|
|
53443
|
+
if (!t || t.type.name !== lq) return;
|
|
53444
|
+
let n = SW(e), r = {
|
|
53386
53445
|
...t.attrs,
|
|
53387
53446
|
language: n
|
|
53388
53447
|
};
|
|
53389
|
-
if (
|
|
53448
|
+
if (String(t.attrs.language ?? "") === n) return;
|
|
53390
53449
|
let i = this.view.state.tr.setNodeMarkup(this.currentCodeBlockPosition, t.type, r, t.marks);
|
|
53391
53450
|
this.view.dispatch(i), this.view.focus();
|
|
53392
53451
|
}
|
|
53393
53452
|
render(e) {
|
|
53394
|
-
this.currentRenderedLanguage !== null && this.currentRenderedLanguage === e || (this.hostRoot.render(i(
|
|
53453
|
+
this.currentRenderedLanguage !== null && this.currentRenderedLanguage === e || (this.hostRoot.render(i(Sq, {
|
|
53395
53454
|
currentLanguage: e,
|
|
53396
53455
|
messages: this.messages,
|
|
53397
53456
|
portalContainer: this.portalContainer,
|
|
@@ -53408,14 +53467,14 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
53408
53467
|
}
|
|
53409
53468
|
updateOverlayPosition() {
|
|
53410
53469
|
if (!this.editorWrapper || !this.currentPreElement || this.host.parentElement !== this.portalContainer) return;
|
|
53411
|
-
let e = this.currentPreElement.getBoundingClientRect(), t =
|
|
53470
|
+
let e = this.currentPreElement.getBoundingClientRect(), t = tq(e, this.editorWrapper), n = t.anchorRightInContent ?? t.anchorLeftInContent + e.width, r = Math.max(0, Math.min(e.width, this.editorWrapper.clientWidth) - dq * 2);
|
|
53412
53471
|
this.host.style.setProperty("--zt-md-code-language-picker-max-width", `${r}px`);
|
|
53413
|
-
let i = this.host.offsetWidth || Math.min(
|
|
53472
|
+
let i = this.host.offsetWidth || Math.min(fq, r), a = this.host.offsetHeight || pq, o = iq({
|
|
53414
53473
|
wrapper: this.editorWrapper,
|
|
53415
53474
|
anchor: {
|
|
53416
|
-
anchorLeftInContent: n - i -
|
|
53417
|
-
anchorTopInContent: t.anchorTopInContent + e.height - a -
|
|
53418
|
-
anchorBottomInContent: t.anchorTopInContent + e.height - a -
|
|
53475
|
+
anchorLeftInContent: n - i - dq,
|
|
53476
|
+
anchorTopInContent: t.anchorTopInContent + e.height - a - dq,
|
|
53477
|
+
anchorBottomInContent: t.anchorTopInContent + e.height - a - dq
|
|
53419
53478
|
},
|
|
53420
53479
|
overlaySize: { width: i },
|
|
53421
53480
|
placement: "top",
|
|
@@ -53425,35 +53484,35 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
53425
53484
|
this.host.style.left = `${o.left}px`, this.host.style.top = `${o.top}px`;
|
|
53426
53485
|
}
|
|
53427
53486
|
update(e) {
|
|
53428
|
-
if (this.view = e, !
|
|
53487
|
+
if (this.view = e, !xq(e) || !this.editorWrapper) {
|
|
53429
53488
|
this.detach();
|
|
53430
53489
|
return;
|
|
53431
53490
|
}
|
|
53432
|
-
let t =
|
|
53491
|
+
let t = yq(e);
|
|
53433
53492
|
if (!t) {
|
|
53434
53493
|
this.detach();
|
|
53435
53494
|
return;
|
|
53436
53495
|
}
|
|
53437
|
-
let n =
|
|
53496
|
+
let n = bq(e, t.position);
|
|
53438
53497
|
if (!n) {
|
|
53439
53498
|
this.detach();
|
|
53440
53499
|
return;
|
|
53441
53500
|
}
|
|
53442
53501
|
let r = n.parentElement?.querySelector(":scope > .zt-md-code-block-actions") ?? null;
|
|
53443
53502
|
this.syncFocusedActionsContainer(r), this.host.parentElement !== this.portalContainer && this.portalContainer.append(this.host);
|
|
53444
|
-
let i =
|
|
53503
|
+
let i = SW(String(t.node.attrs.language ?? "")), a = this.currentCodeBlockPosition === t.position && this.currentPreElement === n && this.currentRenderedLanguage !== null && this.currentRenderedLanguage === i;
|
|
53445
53504
|
this.currentCodeBlockPosition = t.position, this.currentPreElement = n, this.hasPositionContext = !0, this.updateOverlayPosition(), a || this.render(i), this.repositionScheduler.schedule();
|
|
53446
53505
|
}
|
|
53447
53506
|
destroy() {
|
|
53448
53507
|
this.detach(), this.repositionScheduler.destroy(), this.hostRoot.unmount();
|
|
53449
53508
|
}
|
|
53450
|
-
},
|
|
53451
|
-
key: new vr(
|
|
53452
|
-
view: (n) => new
|
|
53453
|
-
})),
|
|
53509
|
+
}, wq = (e, t) => t_(() => new hr({
|
|
53510
|
+
key: new vr(uq),
|
|
53511
|
+
view: (n) => new Cq(n, e, t)
|
|
53512
|
+
})), Tq = "code_block", Eq = "a", Dq = "zt-md-code-block-mod-a-select", Oq = (e) => e.key.toLowerCase() !== Eq || e.defaultPrevented || e.altKey || e.shiftKey || !e.ctrlKey && !e.metaKey, kq = (e) => {
|
|
53454
53513
|
for (let t = e.depth; t >= 0; --t) {
|
|
53455
53514
|
let n = e.node(t);
|
|
53456
|
-
if (n.type.name !==
|
|
53515
|
+
if (n.type.name !== Tq) continue;
|
|
53457
53516
|
let r = t === 0 ? 0 : e.before(t);
|
|
53458
53517
|
return {
|
|
53459
53518
|
codeBlockStart: r + 1,
|
|
@@ -53461,47 +53520,47 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
53461
53520
|
};
|
|
53462
53521
|
}
|
|
53463
53522
|
return null;
|
|
53464
|
-
},
|
|
53465
|
-
let n = e.state.selection.$from, r =
|
|
53523
|
+
}, Aq = (e, t) => {
|
|
53524
|
+
let n = e.state.selection.$from, r = kq(n);
|
|
53466
53525
|
if (!r) return !1;
|
|
53467
53526
|
let i = e.state.tr.setSelection(A.create(e.state.doc, r.codeBlockStart, r.codeBlockEnd));
|
|
53468
53527
|
return t.preventDefault(), e.dispatch(i), !0;
|
|
53469
|
-
},
|
|
53470
|
-
key: new vr(
|
|
53471
|
-
props: { handleKeyDown: (e, t) =>
|
|
53472
|
-
})),
|
|
53528
|
+
}, jq = t_(() => new hr({
|
|
53529
|
+
key: new vr(Dq),
|
|
53530
|
+
props: { handleKeyDown: (e, t) => Oq(t) ? !1 : Aq(e, t) }
|
|
53531
|
+
})), Mq = "code_block", Nq = "ZT_MD_CODE_BLOCK_PRISM", Pq = (e, t = []) => e.flatMap((e) => {
|
|
53473
53532
|
if (e.type === "element") {
|
|
53474
53533
|
let n = [...t, ...e.properties?.className ?? []];
|
|
53475
|
-
return
|
|
53534
|
+
return Pq(e.children ?? [], n);
|
|
53476
53535
|
}
|
|
53477
53536
|
return [{
|
|
53478
53537
|
text: e.value ?? "",
|
|
53479
53538
|
className: t
|
|
53480
53539
|
}];
|
|
53481
|
-
}),
|
|
53540
|
+
}), Fq = (e, t) => t.listLanguages().includes(e), Iq = (e, t) => {
|
|
53482
53541
|
let n = [];
|
|
53483
|
-
return Fu((e) => e.type.name ===
|
|
53542
|
+
return Fu((e) => e.type.name === Mq)(e).forEach((e) => {
|
|
53484
53543
|
let r = String(e.node.attrs.language ?? "");
|
|
53485
|
-
if (!r || !
|
|
53544
|
+
if (!r || !Fq(r, t)) return;
|
|
53486
53545
|
let i = e.pos + 1;
|
|
53487
|
-
|
|
53546
|
+
Pq(t.highlight(e.node.textContent, r).children).forEach((e) => {
|
|
53488
53547
|
let t = i + e.text.length;
|
|
53489
53548
|
e.className.length > 0 && n.push(Hm.inline(i, t, { class: e.className.join(" ") })), i = t;
|
|
53490
53549
|
});
|
|
53491
53550
|
}), Gm.create(e, n);
|
|
53492
|
-
},
|
|
53551
|
+
}, Lq = t_(() => {
|
|
53493
53552
|
let e = $;
|
|
53494
53553
|
return new hr({
|
|
53495
|
-
key: new vr(
|
|
53554
|
+
key: new vr(Nq),
|
|
53496
53555
|
state: {
|
|
53497
|
-
init: (t, n) =>
|
|
53498
|
-
apply: (t, n) => t.docChanged ?
|
|
53556
|
+
init: (t, n) => Iq(n.doc, e),
|
|
53557
|
+
apply: (t, n) => t.docChanged ? Iq(t.doc, e) : n.map(t.mapping, t.doc)
|
|
53499
53558
|
},
|
|
53500
53559
|
props: { decorations(e) {
|
|
53501
53560
|
return this.getState(e);
|
|
53502
53561
|
} }
|
|
53503
53562
|
});
|
|
53504
|
-
}),
|
|
53563
|
+
}), Rq = class {
|
|
53505
53564
|
#e;
|
|
53506
53565
|
#t;
|
|
53507
53566
|
#n;
|
|
@@ -53566,7 +53625,7 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
53566
53625
|
#d;
|
|
53567
53626
|
#f;
|
|
53568
53627
|
#p;
|
|
53569
|
-
},
|
|
53628
|
+
}, zq = "zt-md-selection-tooltip", Bq = (e) => [
|
|
53570
53629
|
{
|
|
53571
53630
|
command: "strong",
|
|
53572
53631
|
icon: JE,
|
|
@@ -53597,7 +53656,7 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
53597
53656
|
title: e.selectionTooltipLinkTitle,
|
|
53598
53657
|
markNames: ["link"]
|
|
53599
53658
|
}
|
|
53600
|
-
],
|
|
53659
|
+
], Vq = {
|
|
53601
53660
|
paragraph: jD,
|
|
53602
53661
|
heading1: iD,
|
|
53603
53662
|
heading2: aD,
|
|
@@ -53610,68 +53669,68 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
53610
53669
|
taskList: hD,
|
|
53611
53670
|
blockquote: kD,
|
|
53612
53671
|
codeBlock: $E
|
|
53613
|
-
},
|
|
53672
|
+
}, Hq = (e) => [
|
|
53614
53673
|
{
|
|
53615
53674
|
command: "paragraph",
|
|
53616
|
-
icon:
|
|
53675
|
+
icon: Vq.paragraph,
|
|
53617
53676
|
label: e.selectionTooltipTransformParagraphLabel
|
|
53618
53677
|
},
|
|
53619
53678
|
{
|
|
53620
53679
|
command: "heading1",
|
|
53621
|
-
icon:
|
|
53680
|
+
icon: Vq.heading1,
|
|
53622
53681
|
label: e.selectionTooltipTransformHeading1Label
|
|
53623
53682
|
},
|
|
53624
53683
|
{
|
|
53625
53684
|
command: "heading2",
|
|
53626
|
-
icon:
|
|
53685
|
+
icon: Vq.heading2,
|
|
53627
53686
|
label: e.selectionTooltipTransformHeading2Label
|
|
53628
53687
|
},
|
|
53629
53688
|
{
|
|
53630
53689
|
command: "heading3",
|
|
53631
|
-
icon:
|
|
53690
|
+
icon: Vq.heading3,
|
|
53632
53691
|
label: e.selectionTooltipTransformHeading3Label
|
|
53633
53692
|
},
|
|
53634
53693
|
{
|
|
53635
53694
|
command: "heading4",
|
|
53636
|
-
icon:
|
|
53695
|
+
icon: Vq.heading4,
|
|
53637
53696
|
label: e.selectionTooltipTransformHeading4Label
|
|
53638
53697
|
},
|
|
53639
53698
|
{
|
|
53640
53699
|
command: "heading5",
|
|
53641
|
-
icon:
|
|
53700
|
+
icon: Vq.heading5,
|
|
53642
53701
|
label: e.selectionTooltipTransformHeading5Label
|
|
53643
53702
|
},
|
|
53644
53703
|
{
|
|
53645
53704
|
command: "heading6",
|
|
53646
|
-
icon:
|
|
53705
|
+
icon: Vq.heading6,
|
|
53647
53706
|
label: e.selectionTooltipTransformHeading6Label
|
|
53648
53707
|
},
|
|
53649
53708
|
{
|
|
53650
53709
|
command: "bulletList",
|
|
53651
|
-
icon:
|
|
53710
|
+
icon: Vq.bulletList,
|
|
53652
53711
|
label: e.selectionTooltipTransformBulletListLabel
|
|
53653
53712
|
},
|
|
53654
53713
|
{
|
|
53655
53714
|
command: "orderedList",
|
|
53656
|
-
icon:
|
|
53715
|
+
icon: Vq.orderedList,
|
|
53657
53716
|
label: e.selectionTooltipTransformOrderedListLabel
|
|
53658
53717
|
},
|
|
53659
53718
|
{
|
|
53660
53719
|
command: "taskList",
|
|
53661
|
-
icon:
|
|
53720
|
+
icon: Vq.taskList,
|
|
53662
53721
|
label: e.selectionTooltipTransformTaskListLabel
|
|
53663
53722
|
},
|
|
53664
53723
|
{
|
|
53665
53724
|
command: "blockquote",
|
|
53666
|
-
icon:
|
|
53725
|
+
icon: Vq.blockquote,
|
|
53667
53726
|
label: e.selectionTooltipTransformBlockquoteLabel
|
|
53668
53727
|
},
|
|
53669
53728
|
{
|
|
53670
53729
|
command: "codeBlock",
|
|
53671
|
-
icon:
|
|
53730
|
+
icon: Vq.codeBlock,
|
|
53672
53731
|
label: e.selectionTooltipTransformCodeBlockLabel
|
|
53673
53732
|
}
|
|
53674
|
-
],
|
|
53733
|
+
], Uq = (e, t) => e(t.state, t.dispatch, t), Wq = (e, t) => {
|
|
53675
53734
|
let n = e?.state?.selection?.$from;
|
|
53676
53735
|
if (!n || !e?.dispatch) return !1;
|
|
53677
53736
|
for (let r = n.depth; r > 0; --r) {
|
|
@@ -53685,17 +53744,17 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
53685
53744
|
})), !0;
|
|
53686
53745
|
}
|
|
53687
53746
|
return !1;
|
|
53688
|
-
},
|
|
53747
|
+
}, Gq = {
|
|
53689
53748
|
heading1: 1,
|
|
53690
53749
|
heading2: 2,
|
|
53691
53750
|
heading3: 3,
|
|
53692
53751
|
heading4: 4,
|
|
53693
53752
|
heading5: 5,
|
|
53694
53753
|
heading6: 6
|
|
53695
|
-
},
|
|
53754
|
+
}, Kq = {
|
|
53696
53755
|
bulletList: "bullet_list",
|
|
53697
53756
|
orderedList: "ordered_list"
|
|
53698
|
-
},
|
|
53757
|
+
}, qq = [
|
|
53699
53758
|
"codeBlock",
|
|
53700
53759
|
"heading1",
|
|
53701
53760
|
"heading2",
|
|
@@ -53708,35 +53767,35 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
53708
53767
|
"bulletList",
|
|
53709
53768
|
"blockquote",
|
|
53710
53769
|
"paragraph"
|
|
53711
|
-
],
|
|
53770
|
+
], Jq = async (e, t) => {
|
|
53712
53771
|
if (!e?.state || !e?.dispatch) return !1;
|
|
53713
53772
|
let n = e.state.schema.nodes;
|
|
53714
53773
|
if (t === "paragraph") {
|
|
53715
53774
|
let t = n.paragraph;
|
|
53716
|
-
return t ?
|
|
53775
|
+
return t ? Uq(Gl(t), e) : !1;
|
|
53717
53776
|
}
|
|
53718
|
-
if (t in
|
|
53719
|
-
let r = n.heading, i =
|
|
53720
|
-
return !r || typeof i != "number" ? !1 :
|
|
53777
|
+
if (t in Gq) {
|
|
53778
|
+
let r = n.heading, i = Gq[t];
|
|
53779
|
+
return !r || typeof i != "number" ? !1 : Uq(Gl(r, { level: i }), e);
|
|
53721
53780
|
}
|
|
53722
53781
|
if (t === "blockquote") {
|
|
53723
53782
|
let t = n.blockquote;
|
|
53724
|
-
return t ?
|
|
53783
|
+
return t ? Uq(Wl(t), e) : !1;
|
|
53725
53784
|
}
|
|
53726
53785
|
if (t === "taskList") {
|
|
53727
53786
|
let t = n.bullet_list;
|
|
53728
|
-
return !t || !
|
|
53787
|
+
return !t || !Uq(Iv(t), e) ? !1 : Wq(e, !1);
|
|
53729
53788
|
}
|
|
53730
53789
|
if (t === "codeBlock") {
|
|
53731
53790
|
let t = n.code_block;
|
|
53732
|
-
return t ?
|
|
53791
|
+
return t ? Uq(Gl(t, { language: "text" }), e) : !1;
|
|
53733
53792
|
}
|
|
53734
|
-
if (t in
|
|
53735
|
-
let r = n[
|
|
53736
|
-
return r ?
|
|
53793
|
+
if (t in Kq) {
|
|
53794
|
+
let r = n[Kq[t]];
|
|
53795
|
+
return r ? Uq(Iv(r), e) : !1;
|
|
53737
53796
|
}
|
|
53738
53797
|
return !1;
|
|
53739
|
-
},
|
|
53798
|
+
}, Yq = (e) => {
|
|
53740
53799
|
let t = e.state.selection.$from, n = /* @__PURE__ */ new Set();
|
|
53741
53800
|
for (let e = t.depth; e > 0; --e) {
|
|
53742
53801
|
let r = t.node(e), i = r.type.name;
|
|
@@ -53775,34 +53834,34 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
53775
53834
|
i === "paragraph" && n.add("paragraph");
|
|
53776
53835
|
}
|
|
53777
53836
|
return n.has("taskList") && n.delete("bulletList"), n.size === 0 && n.add("paragraph"), n;
|
|
53778
|
-
},
|
|
53779
|
-
let t =
|
|
53780
|
-
return
|
|
53781
|
-
},
|
|
53837
|
+
}, Xq = (e) => {
|
|
53838
|
+
let t = Yq(e);
|
|
53839
|
+
return qq.find((e) => t.has(e)) || "paragraph";
|
|
53840
|
+
}, Zq = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, Qq = (e, t) => {
|
|
53782
53841
|
let n = e.state.schema.marks, r = t.find((e) => n[e]);
|
|
53783
53842
|
return r ? n[r] ?? null : null;
|
|
53784
|
-
},
|
|
53843
|
+
}, $q = (e, t) => {
|
|
53785
53844
|
let { from: n, to: r } = e.selection;
|
|
53786
53845
|
return e.doc.rangeHasMark(n, r, t);
|
|
53787
|
-
},
|
|
53846
|
+
}, eJ = (e, t) => {
|
|
53788
53847
|
let { from: n, to: r } = e.selection, i = "";
|
|
53789
53848
|
return e.doc.nodesBetween(n, r, (e) => {
|
|
53790
53849
|
let n = e.marks.find((e) => e.type === t);
|
|
53791
53850
|
return n ? (i = typeof n.attrs.href == "string" ? n.attrs.href : "", !1) : !0;
|
|
53792
53851
|
}), i;
|
|
53793
|
-
},
|
|
53852
|
+
}, tJ = (e) => {
|
|
53794
53853
|
Jl(e.markType)(e.view.state, e.view.dispatch, e.view), e.view.focus();
|
|
53795
|
-
},
|
|
53854
|
+
}, nJ = (e) => {
|
|
53796
53855
|
e.toggleLinkPopover(e.view);
|
|
53797
|
-
},
|
|
53856
|
+
}, rJ = (e, t) => {
|
|
53798
53857
|
({
|
|
53799
|
-
strong:
|
|
53800
|
-
em:
|
|
53801
|
-
strike:
|
|
53802
|
-
inlineCode:
|
|
53803
|
-
link:
|
|
53858
|
+
strong: tJ,
|
|
53859
|
+
em: tJ,
|
|
53860
|
+
strike: tJ,
|
|
53861
|
+
inlineCode: tJ,
|
|
53862
|
+
link: nJ
|
|
53804
53863
|
})[e](t);
|
|
53805
|
-
},
|
|
53864
|
+
}, iJ = (e, t, n, r, a) => {
|
|
53806
53865
|
let o = document.createElement("button");
|
|
53807
53866
|
o.type = "button", o.className = "zt-md-selection-tooltip-button", o.dataset.command = e.command, o.title = e.title, o.setAttribute("aria-label", e.title);
|
|
53808
53867
|
let s = document.createElement("span");
|
|
@@ -53816,20 +53875,20 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
53816
53875
|
}), o.addEventListener("click", (i) => {
|
|
53817
53876
|
i.preventDefault();
|
|
53818
53877
|
let a = n();
|
|
53819
|
-
!a || a.state.selection.empty ||
|
|
53878
|
+
!a || a.state.selection.empty || rJ(e.command, {
|
|
53820
53879
|
view: a,
|
|
53821
53880
|
markType: t,
|
|
53822
53881
|
toggleLinkPopover: r
|
|
53823
53882
|
});
|
|
53824
53883
|
}), o;
|
|
53825
|
-
},
|
|
53884
|
+
}, aJ = (e, t, n, r, i, a) => {
|
|
53826
53885
|
let o = document.createElement("div");
|
|
53827
53886
|
return o.className = "zt-md-selection-tooltip", o.append(i), t.forEach((t) => {
|
|
53828
|
-
let i =
|
|
53829
|
-
i && t.command !== "link" && o.append(
|
|
53887
|
+
let i = Qq(e, t.markNames);
|
|
53888
|
+
i && t.command !== "link" && o.append(iJ(t, i, n, r, a));
|
|
53830
53889
|
}), o;
|
|
53831
|
-
},
|
|
53832
|
-
let t =
|
|
53890
|
+
}, oJ = (e) => {
|
|
53891
|
+
let t = sq({
|
|
53833
53892
|
open: e.open,
|
|
53834
53893
|
portalContainer: e.portalContainer,
|
|
53835
53894
|
editorWrapper: e.collisionBoundary,
|
|
@@ -53845,7 +53904,7 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
53845
53904
|
e.onOpenChange(!1);
|
|
53846
53905
|
return;
|
|
53847
53906
|
}
|
|
53848
|
-
|
|
53907
|
+
Jq(n, t).then(() => {
|
|
53849
53908
|
e.onOpenChange(!1), n.focus();
|
|
53850
53909
|
});
|
|
53851
53910
|
};
|
|
@@ -53868,7 +53927,7 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
53868
53927
|
size: e.iconSize,
|
|
53869
53928
|
strokeWidth: e.iconStrokeWidth,
|
|
53870
53929
|
"aria-hidden": "true"
|
|
53871
|
-
})), i(
|
|
53930
|
+
})), i(cq, {
|
|
53872
53931
|
panel: t,
|
|
53873
53932
|
portalContainer: e.portalContainer,
|
|
53874
53933
|
className: "zt-md-selection-transform-popover !w-[176px] p-1",
|
|
@@ -53889,7 +53948,7 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
53889
53948
|
"aria-hidden": "true"
|
|
53890
53949
|
}), i("span", { className: "zt-md-selection-transform-item-label" }, t.label));
|
|
53891
53950
|
}))));
|
|
53892
|
-
},
|
|
53951
|
+
}, sJ = (e) => {
|
|
53893
53952
|
let [t, r] = f(""), a = d(null), o = (e) => {
|
|
53894
53953
|
e.preventDefault();
|
|
53895
53954
|
}, s = (t) => {
|
|
@@ -53898,7 +53957,7 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
53898
53957
|
e.onOpenChange(!1);
|
|
53899
53958
|
return;
|
|
53900
53959
|
}
|
|
53901
|
-
let r =
|
|
53960
|
+
let r = Qq(n, ["link"]);
|
|
53902
53961
|
if (!r) {
|
|
53903
53962
|
e.onOpenChange(!1);
|
|
53904
53963
|
return;
|
|
@@ -53910,13 +53969,13 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
53910
53969
|
e.onOpenChange(!1);
|
|
53911
53970
|
return;
|
|
53912
53971
|
}
|
|
53913
|
-
let n = e.getCurrentView(), i = n ?
|
|
53972
|
+
let n = e.getCurrentView(), i = n ? Qq(n, ["link"]) : null;
|
|
53914
53973
|
if (!n || !i || n.state.selection.empty) {
|
|
53915
53974
|
e.onOpenChange(!1);
|
|
53916
53975
|
return;
|
|
53917
53976
|
}
|
|
53918
|
-
r(WO(
|
|
53919
|
-
}, u =
|
|
53977
|
+
r(WO(eJ(n.state, i))), e.onOpenChange(!0);
|
|
53978
|
+
}, u = sq({
|
|
53920
53979
|
open: e.open,
|
|
53921
53980
|
portalContainer: e.portalContainer,
|
|
53922
53981
|
editorWrapper: e.collisionBoundary,
|
|
@@ -53928,7 +53987,7 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
53928
53987
|
});
|
|
53929
53988
|
return c(() => {
|
|
53930
53989
|
if (!e.open) return;
|
|
53931
|
-
let t = e.getCurrentView(), n = t ?
|
|
53990
|
+
let t = e.getCurrentView(), n = t ? Qq(t, ["link"]) : null;
|
|
53932
53991
|
(!t || !n || t.state.selection.empty) && e.onOpenChange(!1);
|
|
53933
53992
|
}, [
|
|
53934
53993
|
e.open,
|
|
@@ -53957,7 +54016,7 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
53957
54016
|
}, i("span", { className: "zt-md-selection-tooltip-button-icon" }, i(mD, {
|
|
53958
54017
|
size: e.iconSize,
|
|
53959
54018
|
strokeWidth: e.iconStrokeWidth
|
|
53960
|
-
}))), i(
|
|
54019
|
+
}))), i(cq, {
|
|
53961
54020
|
panel: u,
|
|
53962
54021
|
portalContainer: e.portalContainer,
|
|
53963
54022
|
className: "zt-md-selection-link-popover w-fit min-w-0 gap-0 p-2"
|
|
@@ -53990,29 +54049,29 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
53990
54049
|
size: e.iconSize,
|
|
53991
54050
|
strokeWidth: e.iconStrokeWidth
|
|
53992
54051
|
})))));
|
|
53993
|
-
},
|
|
54052
|
+
}, cJ = (e, t, n) => {
|
|
53994
54053
|
n.forEach((n) => {
|
|
53995
|
-
let r =
|
|
54054
|
+
let r = Qq(t, n.markNames);
|
|
53996
54055
|
if (!r) return;
|
|
53997
54056
|
let i = e.querySelector(`[data-command="${n.command}"]`);
|
|
53998
|
-
i instanceof HTMLButtonElement && (i.dataset.active =
|
|
54057
|
+
i instanceof HTMLButtonElement && (i.dataset.active = $q(t.state, r) ? "true" : "false");
|
|
53999
54058
|
});
|
|
54000
|
-
},
|
|
54059
|
+
}, lJ = (e) => {
|
|
54001
54060
|
let { from: t, to: n } = e.state.selection, r = !1;
|
|
54002
54061
|
return e.state.doc.nodesBetween(t, n, (e) => e.type.name === "code_block" ? (r = !0, !1) : !0), r;
|
|
54003
|
-
},
|
|
54062
|
+
}, uJ = (e, t, n) => (r) => {
|
|
54004
54063
|
let { selection: i, doc: a } = r.state, o = e.contains(document.activeElement);
|
|
54005
|
-
return !
|
|
54006
|
-
},
|
|
54007
|
-
let r =
|
|
54064
|
+
return !Zq(r) || i.empty || !(i instanceof A) || !r.hasFocus() && !o && !t() && !n() || lJ(r) ? !1 : e.childElementCount > 0 && a.textBetween(i.from, i.to).trim().length > 0;
|
|
54065
|
+
}, dJ = (e, t, n) => {
|
|
54066
|
+
let r = Bq(n), a = Hq(n), o = e, s = !1, c = !1, l = !1, u = [], d = document.createElement("span"), f = m(d), p = document.createElement("span"), h = null, g = m(p), _ = t.closest(".zt-md-editor"), v = (e) => {
|
|
54008
54067
|
s !== e && (s = e, S());
|
|
54009
54068
|
}, y = (e) => {
|
|
54010
54069
|
c !== e && (c = e, x());
|
|
54011
54070
|
}, b = (e) => {
|
|
54012
54071
|
e.state.selection.empty || v(!s);
|
|
54013
54072
|
}, x = () => {
|
|
54014
|
-
let e = o ?
|
|
54015
|
-
f.render(i(
|
|
54073
|
+
let e = o ? Yq(o) : new Set(["paragraph"]), r = o ? Xq(o) : "paragraph", s = a.find((e) => e.command === r) ?? a[0];
|
|
54074
|
+
f.render(i(oJ, {
|
|
54016
54075
|
getCurrentView: () => o,
|
|
54017
54076
|
portalContainer: t,
|
|
54018
54077
|
collisionBoundary: _,
|
|
@@ -54026,7 +54085,7 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
54026
54085
|
activeCommands: e
|
|
54027
54086
|
}));
|
|
54028
54087
|
}, S = () => {
|
|
54029
|
-
g.render(i(
|
|
54088
|
+
g.render(i(sJ, {
|
|
54030
54089
|
getCurrentView: () => o,
|
|
54031
54090
|
portalContainer: t,
|
|
54032
54091
|
collisionBoundary: _,
|
|
@@ -54039,9 +54098,9 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
54039
54098
|
onOpenChange: v,
|
|
54040
54099
|
messages: n
|
|
54041
54100
|
}));
|
|
54042
|
-
}, C =
|
|
54043
|
-
x(),
|
|
54044
|
-
let w =
|
|
54101
|
+
}, C = aJ(e, r, () => o, b, d, u);
|
|
54102
|
+
x(), Qq(e, ["link"]) && (C.append(p), S());
|
|
54103
|
+
let w = uJ(C, () => s, () => c), T = new Rq({
|
|
54045
54104
|
content: C,
|
|
54046
54105
|
debounce: 80,
|
|
54047
54106
|
offset: 8,
|
|
@@ -54065,9 +54124,9 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
54065
54124
|
};
|
|
54066
54125
|
return e.dom.addEventListener("blur", re), document.addEventListener("mousedown", ie, !0), {
|
|
54067
54126
|
update: (e, t) => {
|
|
54068
|
-
if (o = e, o.state.selection.empty && (v(!1), y(!1)),
|
|
54069
|
-
let e =
|
|
54070
|
-
h.dataset.active = e &&
|
|
54127
|
+
if (o = e, o.state.selection.empty && (v(!1), y(!1)), cJ(C, o, r), x(), h) {
|
|
54128
|
+
let e = Qq(o, ["link"]);
|
|
54129
|
+
h.dataset.active = e && $q(o.state, e) ? "true" : "false";
|
|
54071
54130
|
}
|
|
54072
54131
|
if (!w(o)) {
|
|
54073
54132
|
T.hide(), ee();
|
|
@@ -54081,21 +54140,21 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
54081
54140
|
}), T.destroy(), C.remove();
|
|
54082
54141
|
}
|
|
54083
54142
|
};
|
|
54084
|
-
},
|
|
54085
|
-
key: new vr(
|
|
54086
|
-
view: (n) =>
|
|
54087
|
-
})),
|
|
54143
|
+
}, fJ = (e, t) => t_(() => new hr({
|
|
54144
|
+
key: new vr(zq),
|
|
54145
|
+
view: (n) => dJ(n, e, t)
|
|
54146
|
+
})), pJ = (e, t) => e(t.state, t.dispatch, t), mJ = (e) => {
|
|
54088
54147
|
let t = e?.state?.selection?.$from;
|
|
54089
54148
|
if (!t) return !1;
|
|
54090
54149
|
for (let e = t.depth; e > 0; --e) if (t.node(e)?.type?.name === "table") return !0;
|
|
54091
54150
|
return !1;
|
|
54092
|
-
},
|
|
54151
|
+
}, hJ = (e, t) => {
|
|
54093
54152
|
let n = e?.state?.doc;
|
|
54094
54153
|
if (!n || typeof t != "number") return -1;
|
|
54095
54154
|
let r = Math.min(Math.max(t, 0), n.content.size), i = n.resolve(r);
|
|
54096
54155
|
for (let e = i.depth; e > 0; --e) if (i.node(e)?.type?.name === "table") return i.before(e);
|
|
54097
54156
|
return -1;
|
|
54098
|
-
},
|
|
54157
|
+
}, gJ = (e, t, n, r) => {
|
|
54099
54158
|
let i = e?.state?.schema?.nodes;
|
|
54100
54159
|
if (!i) return null;
|
|
54101
54160
|
let a = i.table, o = i.table_header_row, s = i.table_row, c = i.table_header, l = i.table_cell;
|
|
@@ -54105,21 +54164,21 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
54105
54164
|
return i.create(null, u);
|
|
54106
54165
|
});
|
|
54107
54166
|
return a.create(null, f);
|
|
54108
|
-
},
|
|
54109
|
-
if (!e?.state || !e?.dispatch ||
|
|
54110
|
-
let t = e.state.selection.from, n =
|
|
54167
|
+
}, _J = async (e) => {
|
|
54168
|
+
if (!e?.state || !e?.dispatch || mJ(e)) return !1;
|
|
54169
|
+
let t = e.state.selection.from, n = gJ(e, 3, 3, !0);
|
|
54111
54170
|
if (!n) return !1;
|
|
54112
54171
|
e.dispatch(e.state.tr.replaceSelectionWith(n).scrollIntoView());
|
|
54113
|
-
let r =
|
|
54114
|
-
if (r < 0 && t > 0 && (r =
|
|
54172
|
+
let r = hJ(e, t);
|
|
54173
|
+
if (r < 0 && t > 0 && (r = hJ(e, t - 1)), r < 0) return !0;
|
|
54115
54174
|
let i = r + 2;
|
|
54116
54175
|
if (i > e.state.doc.content.size) return !0;
|
|
54117
54176
|
let a = A.near(e.state.doc.resolve(i), 1);
|
|
54118
54177
|
return e.dispatch(e.state.tr.setSelection(a).scrollIntoView()), e.focus(), !0;
|
|
54119
|
-
},
|
|
54178
|
+
}, vJ = (e, t) => {
|
|
54120
54179
|
let n = e?.state?.schema?.marks ?? {}, r = t.find((e) => n[e]);
|
|
54121
54180
|
return r ? n[r] ?? null : null;
|
|
54122
|
-
},
|
|
54181
|
+
}, yJ = new Set([
|
|
54123
54182
|
"paragraph",
|
|
54124
54183
|
"heading1",
|
|
54125
54184
|
"heading2",
|
|
@@ -54132,7 +54191,7 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
54132
54191
|
"taskList",
|
|
54133
54192
|
"blockquote",
|
|
54134
54193
|
"codeBlock"
|
|
54135
|
-
]),
|
|
54194
|
+
]), bJ = (e) => yJ.has(e), xJ = async (e) => {
|
|
54136
54195
|
let t = e?.state?.schema?.nodes?.math_inline;
|
|
54137
54196
|
if (!t || !e?.dispatch) return !1;
|
|
54138
54197
|
let n = e.state.selection.from, r = t.create({ value: "" });
|
|
@@ -54140,18 +54199,18 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
54140
54199
|
type: "open",
|
|
54141
54200
|
position: n
|
|
54142
54201
|
}).scrollIntoView()), !0;
|
|
54143
|
-
},
|
|
54202
|
+
}, SJ = async (e, t) => {
|
|
54144
54203
|
if (!e?.state || !e?.dispatch) return !1;
|
|
54145
54204
|
let n = e.state.schema?.nodes ?? {};
|
|
54146
|
-
if (
|
|
54205
|
+
if (bJ(t)) return Jq(e, t);
|
|
54147
54206
|
if (t === "inlineCode") {
|
|
54148
|
-
let t =
|
|
54149
|
-
return t ?
|
|
54207
|
+
let t = vJ(e, ["inlineCode", "code_inline"]);
|
|
54208
|
+
return t ? pJ(Jl(t), e) : !1;
|
|
54150
54209
|
}
|
|
54151
|
-
if (t === "inlineMath") return
|
|
54210
|
+
if (t === "inlineMath") return xJ(e);
|
|
54152
54211
|
if (t === "mathBlock") {
|
|
54153
54212
|
let t = n.math_block;
|
|
54154
|
-
if (!t || !
|
|
54213
|
+
if (!t || !pJ(Gl(t), e)) return !1;
|
|
54155
54214
|
let r = e.state.selection?.$from;
|
|
54156
54215
|
if (!r) return !0;
|
|
54157
54216
|
let i = null;
|
|
@@ -54163,8 +54222,8 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
54163
54222
|
let a = j.create(e.state.doc, i);
|
|
54164
54223
|
return e.dispatch(e.state.tr.setSelection(a).scrollIntoView()), !0;
|
|
54165
54224
|
}
|
|
54166
|
-
return t === "table" ?
|
|
54167
|
-
},
|
|
54225
|
+
return t === "table" ? _J(e) : !1;
|
|
54226
|
+
}, CJ = (e) => typeof e?.props?.editable == "function" ? e.props.editable(e.state) : !!e?.editable, wJ = [
|
|
54168
54227
|
{
|
|
54169
54228
|
id: "paragraph",
|
|
54170
54229
|
label: "普通文本",
|
|
@@ -54284,7 +54343,7 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
54284
54343
|
icon: "Image",
|
|
54285
54344
|
command: "image"
|
|
54286
54345
|
}
|
|
54287
|
-
],
|
|
54346
|
+
], TJ = [
|
|
54288
54347
|
{
|
|
54289
54348
|
id: "paragraph",
|
|
54290
54349
|
label: "Paragraph",
|
|
@@ -54404,7 +54463,7 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
54404
54463
|
icon: "Image",
|
|
54405
54464
|
command: "image"
|
|
54406
54465
|
}
|
|
54407
|
-
],
|
|
54466
|
+
], EJ = (e, t = "zh-CN") => e?.items && e.items.length > 0 ? e.items : t === "en-US" ? TJ : wJ, DJ = (e) => {
|
|
54408
54467
|
let t = e?.state?.selection?.$from;
|
|
54409
54468
|
if (!t) return !1;
|
|
54410
54469
|
let n = String(t.parent?.type?.name ?? "");
|
|
@@ -54414,17 +54473,17 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
54414
54473
|
if (n === "table" || n === "table_cell" || n === "table_header") return !0;
|
|
54415
54474
|
}
|
|
54416
54475
|
return !1;
|
|
54417
|
-
},
|
|
54476
|
+
}, OJ = (e) => {
|
|
54418
54477
|
let t = e?.state, n = t?.selection?.$from;
|
|
54419
54478
|
if (!t || !n) return "";
|
|
54420
54479
|
let r = n.start(), i = n.pos;
|
|
54421
54480
|
return t.doc.textBetween(r, i, "\n", "\n");
|
|
54422
|
-
},
|
|
54423
|
-
let t =
|
|
54481
|
+
}, kJ = (e) => {
|
|
54482
|
+
let t = OJ(e), n = t.lastIndexOf("/");
|
|
54424
54483
|
if (n < 0) return null;
|
|
54425
54484
|
let r = t.slice(n + 1);
|
|
54426
54485
|
return /\s/.test(r) ? null : r;
|
|
54427
|
-
},
|
|
54486
|
+
}, AJ = (e, t) => {
|
|
54428
54487
|
if (t === null || t.length === 0) return e;
|
|
54429
54488
|
let n = t.toLowerCase();
|
|
54430
54489
|
return e.filter((e) => [
|
|
@@ -54433,24 +54492,24 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
54433
54492
|
e.command,
|
|
54434
54493
|
e.id
|
|
54435
54494
|
].some((e) => String(e).toLowerCase().startsWith(n)));
|
|
54436
|
-
},
|
|
54437
|
-
if (!
|
|
54495
|
+
}, jJ = (e, t) => {
|
|
54496
|
+
if (!CJ(e)) return {
|
|
54438
54497
|
visibleItems: [],
|
|
54439
54498
|
shouldShow: !1
|
|
54440
54499
|
};
|
|
54441
|
-
let n =
|
|
54500
|
+
let n = kJ(e), r = AJ(t, n);
|
|
54442
54501
|
return {
|
|
54443
54502
|
visibleItems: r,
|
|
54444
|
-
shouldShow: !
|
|
54503
|
+
shouldShow: !DJ(e) && n !== null && r.length > 0
|
|
54445
54504
|
};
|
|
54446
|
-
},
|
|
54505
|
+
}, MJ = (e) => {
|
|
54447
54506
|
let t = e?.state, n = t?.selection?.$from;
|
|
54448
54507
|
if (!t || !n || !e?.dispatch) return !1;
|
|
54449
54508
|
let r = n.start(), i = n.pos, a = t.doc.textBetween(r, i, "\n", "\n").lastIndexOf("/");
|
|
54450
54509
|
if (a < 0) return !1;
|
|
54451
54510
|
let o = r + a, s = t.tr.delete(o, i);
|
|
54452
54511
|
return e.dispatch(s.scrollIntoView()), !0;
|
|
54453
|
-
},
|
|
54512
|
+
}, NJ = {
|
|
54454
54513
|
Type: jD,
|
|
54455
54514
|
Heading1: iD,
|
|
54456
54515
|
Heading2: aD,
|
|
@@ -54468,7 +54527,7 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
54468
54527
|
TextQuote: kD,
|
|
54469
54528
|
Sigma: xD,
|
|
54470
54529
|
Table: TD
|
|
54471
|
-
},
|
|
54530
|
+
}, PJ = QE, FJ = (e, t, n, r) => {
|
|
54472
54531
|
r.splice(0).forEach((e) => {
|
|
54473
54532
|
e.unmount();
|
|
54474
54533
|
}), e.innerHTML = "";
|
|
@@ -54482,7 +54541,7 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
54482
54541
|
s.className = "slash-menu-item", s.dataset.command = t.command, s.dataset.selected = o === n ? "true" : "false";
|
|
54483
54542
|
let c = document.createElement("span");
|
|
54484
54543
|
c.className = "slash-menu-item-icon";
|
|
54485
|
-
let l = t.icon ?
|
|
54544
|
+
let l = t.icon ? NJ[t.icon] ?? PJ : null;
|
|
54486
54545
|
if (l) {
|
|
54487
54546
|
let e = m(c);
|
|
54488
54547
|
e.render(i(l, {
|
|
@@ -54493,12 +54552,12 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
54493
54552
|
let u = document.createElement("span");
|
|
54494
54553
|
u.className = "slash-menu-item-label", u.textContent = t.label, s.appendChild(c), s.appendChild(u), e.appendChild(s);
|
|
54495
54554
|
});
|
|
54496
|
-
},
|
|
54555
|
+
}, IJ = (e) => {
|
|
54497
54556
|
let t = document.createElement("div");
|
|
54498
54557
|
t.className = "slash-menu", t.style.display = "none", e.appendChild(t);
|
|
54499
54558
|
let n = !1, r = "", i = !1, a = null, o = [], s = () => {
|
|
54500
54559
|
if (!n || !a) return;
|
|
54501
|
-
let { editorWrapper: r, anchorTopInContent: i, anchorBottomInContent: o, anchorLeftInContent: s, placement: c, offsetY: l } = a, u =
|
|
54560
|
+
let { editorWrapper: r, anchorTopInContent: i, anchorBottomInContent: o, anchorLeftInContent: s, placement: c, offsetY: l } = a, u = iq({
|
|
54502
54561
|
wrapper: r,
|
|
54503
54562
|
anchor: {
|
|
54504
54563
|
anchorTopInContent: i,
|
|
@@ -54511,7 +54570,7 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
54511
54570
|
boundaryInset: 4
|
|
54512
54571
|
}, e);
|
|
54513
54572
|
t.style.left = `${u.left}px`, t.style.top = `${u.top}px`, t.dataset.placement = c;
|
|
54514
|
-
}, c =
|
|
54573
|
+
}, c = aq(() => {
|
|
54515
54574
|
n && s();
|
|
54516
54575
|
}), l = () => {
|
|
54517
54576
|
t.style.top = "", t.style.left = "", t.style.transform = "", delete t.dataset.placement;
|
|
@@ -54530,7 +54589,7 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
54530
54589
|
},
|
|
54531
54590
|
renderIfNeeded: (e, n) => {
|
|
54532
54591
|
let i = `${e.map((e) => e.command).join("|")}::${n}`;
|
|
54533
|
-
r !== i && (
|
|
54592
|
+
r !== i && (FJ(t, e, n, o), r = i);
|
|
54534
54593
|
},
|
|
54535
54594
|
scrollActiveItemIntoView: (e) => {
|
|
54536
54595
|
let n = t.querySelector(".slash-menu-item[data-selected=\"true\"]");
|
|
@@ -54552,7 +54611,7 @@ var IK = /* @__PURE__ */ new Set(), LK = !1, RK = () => typeof document < "u", z
|
|
|
54552
54611
|
};
|
|
54553
54612
|
//#endregion
|
|
54554
54613
|
//#region node_modules/.pnpm/@milkdown+plugin-slash@7.21.1/node_modules/@milkdown/plugin-slash/lib/index.js
|
|
54555
|
-
function
|
|
54614
|
+
function LJ(e) {
|
|
54556
54615
|
let t = r_({}, `${e}_SLASH_SPEC`), n = t_((n) => {
|
|
54557
54616
|
let r = n.get(t.key);
|
|
54558
54617
|
return new hr({
|
|
@@ -54570,29 +54629,29 @@ function DJ(e) {
|
|
|
54570
54629
|
}
|
|
54571
54630
|
//#endregion
|
|
54572
54631
|
//#region src/plugins/custom/slash-menu/slash-menu.ts
|
|
54573
|
-
var
|
|
54632
|
+
var RJ = (e, t) => {
|
|
54574
54633
|
if (!(!e || typeof e != "object")) return e[t];
|
|
54575
|
-
},
|
|
54576
|
-
if (typeof
|
|
54577
|
-
let e =
|
|
54634
|
+
}, zJ = () => {
|
|
54635
|
+
if (typeof LJ != "function") return console.error("[zt-md/slash] slashFactory not found"), null;
|
|
54636
|
+
let e = LJ("zt-md-slash"), t = Array.isArray(e) ? e[0] : void 0, n = Array.isArray(e) ? e[1] : e, r = Array.isArray(e) ? e[2] : void 0;
|
|
54578
54637
|
if (!n) return null;
|
|
54579
|
-
let i = Array.isArray(e) ? e.filter((e, t) => t < 2 && e != null) : [n], a =
|
|
54638
|
+
let i = Array.isArray(e) ? e.filter((e, t) => t < 2 && e != null) : [n], a = RJ(t, "key") ?? RJ(n, "key") ?? RJ(r, "key") ?? RJ(e, "key");
|
|
54580
54639
|
return i.length === 0 || a === void 0 ? null : {
|
|
54581
54640
|
plugins: i,
|
|
54582
54641
|
key: a
|
|
54583
54642
|
};
|
|
54584
|
-
},
|
|
54643
|
+
}, BJ = (e, t, n, r, i = "zh-CN") => {
|
|
54585
54644
|
if (t?.enabled === !1) return {
|
|
54586
54645
|
plugins: [],
|
|
54587
54646
|
config: null
|
|
54588
54647
|
};
|
|
54589
54648
|
try {
|
|
54590
|
-
let a =
|
|
54649
|
+
let a = zJ();
|
|
54591
54650
|
if (!a) return {
|
|
54592
54651
|
plugins: [],
|
|
54593
54652
|
config: null
|
|
54594
54653
|
};
|
|
54595
|
-
let o =
|
|
54654
|
+
let o = EJ(t, i), s = IJ(e), c = 0, l = null, u = o, d = !1, f = new Set([
|
|
54596
54655
|
"ArrowDown",
|
|
54597
54656
|
"ArrowUp",
|
|
54598
54657
|
"Enter",
|
|
@@ -54607,18 +54666,18 @@ var OJ = (e, t) => {
|
|
|
54607
54666
|
let n = e?.coordsAtPos?.(t);
|
|
54608
54667
|
return n ? new DOMRect(n.left, n.top, Math.max(n.right - n.left, 1), n.bottom - n.top) : null;
|
|
54609
54668
|
}, h = (e) => {
|
|
54610
|
-
if (!
|
|
54669
|
+
if (!CJ(e)) {
|
|
54611
54670
|
u = [], d = !1, s.updatePositionContext(null), s.setVisible(!1);
|
|
54612
54671
|
return;
|
|
54613
54672
|
}
|
|
54614
|
-
let t =
|
|
54673
|
+
let t = jJ(e, o);
|
|
54615
54674
|
if (u = t.visibleItems, d = t.shouldShow, t.shouldShow && c >= u.length && (c = 0), t.shouldShow && !s.isVisible() && (c = 0), !t.shouldShow) {
|
|
54616
54675
|
s.updatePositionContext(null), s.setVisible(!1);
|
|
54617
54676
|
return;
|
|
54618
54677
|
}
|
|
54619
|
-
let n = m(e), r =
|
|
54678
|
+
let n = m(e), r = $K(e?.dom);
|
|
54620
54679
|
if (n && r) {
|
|
54621
|
-
let e =
|
|
54680
|
+
let e = eq(n, 320), t = tq(n, r);
|
|
54622
54681
|
s.updatePositionContext({
|
|
54623
54682
|
editorWrapper: r,
|
|
54624
54683
|
anchorTopInContent: t.anchorTopInContent,
|
|
@@ -54632,13 +54691,13 @@ var OJ = (e, t) => {
|
|
|
54632
54691
|
s.updatePosition();
|
|
54633
54692
|
});
|
|
54634
54693
|
}, g = async () => {
|
|
54635
|
-
if (!
|
|
54694
|
+
if (!CJ(l)) {
|
|
54636
54695
|
d = !1, s.updatePositionContext(null), s.setVisible(!1);
|
|
54637
54696
|
return;
|
|
54638
54697
|
}
|
|
54639
54698
|
if (!l || c < 0 || c >= u.length) return;
|
|
54640
54699
|
let t = u[c];
|
|
54641
|
-
if (
|
|
54700
|
+
if (MJ(l)) {
|
|
54642
54701
|
if (t.command === "image") {
|
|
54643
54702
|
s.setVisible(!1), n && NI({
|
|
54644
54703
|
portalContainer: e,
|
|
@@ -54648,7 +54707,7 @@ var OJ = (e, t) => {
|
|
|
54648
54707
|
});
|
|
54649
54708
|
return;
|
|
54650
54709
|
}
|
|
54651
|
-
await
|
|
54710
|
+
await SJ(l, t.command) && (s.setVisible(!1), t.command === "mathBlock" && queueMicrotask(() => {
|
|
54652
54711
|
let e = l?.dom?.querySelector?.(".zt-md-math-block-editing .zt-md-math-block-textarea");
|
|
54653
54712
|
!e || document.activeElement === e || e.focus();
|
|
54654
54713
|
}));
|
|
@@ -54682,22 +54741,22 @@ var OJ = (e, t) => {
|
|
|
54682
54741
|
config: null
|
|
54683
54742
|
};
|
|
54684
54743
|
}
|
|
54685
|
-
},
|
|
54744
|
+
}, VJ = "table", HJ = "ArrowUp", UJ = (e) => e.key !== HJ || e.defaultPrevented || e.altKey || e.ctrlKey || e.metaKey, WJ = (e, t) => {
|
|
54686
54745
|
let n = t.nodeBefore;
|
|
54687
|
-
return !n || n.type.name !==
|
|
54746
|
+
return !n || n.type.name !== VJ ? null : {
|
|
54688
54747
|
tableNode: n,
|
|
54689
54748
|
tableStart: e - n.nodeSize
|
|
54690
54749
|
};
|
|
54691
|
-
},
|
|
54750
|
+
}, GJ = (e) => {
|
|
54692
54751
|
if (e.parent.type.name !== "paragraph" || e.parentOffset !== 0 || e.parent.childCount > 0 || e.depth < 1) return null;
|
|
54693
54752
|
let t = e.index(e.depth - 1);
|
|
54694
54753
|
if (t <= 0) return null;
|
|
54695
54754
|
let n = e.node(e.depth - 1).child(t - 1);
|
|
54696
|
-
return n.type.name ===
|
|
54755
|
+
return n.type.name === VJ ? {
|
|
54697
54756
|
tableNode: n,
|
|
54698
54757
|
tableStart: e.before(e.depth) - n.nodeSize
|
|
54699
54758
|
} : null;
|
|
54700
|
-
},
|
|
54759
|
+
}, KJ = (e, t) => {
|
|
54701
54760
|
if (e.childCount === 0) return null;
|
|
54702
54761
|
let n = e.childCount - 1, r = e.child(n);
|
|
54703
54762
|
if (r.childCount === 0) return null;
|
|
@@ -54706,21 +54765,21 @@ var OJ = (e, t) => {
|
|
|
54706
54765
|
let a = r.childCount - 1, o = r.child(a), s = 0;
|
|
54707
54766
|
for (let e = 0; e < a; e += 1) s += r.child(e).nodeSize;
|
|
54708
54767
|
return t + 1 + i + 1 + s + o.nodeSize - 1;
|
|
54709
|
-
},
|
|
54768
|
+
}, qJ = (e) => {
|
|
54710
54769
|
let { selection: t } = e.state, n = t.$from, r = null;
|
|
54711
|
-
if (t instanceof dE ? r =
|
|
54712
|
-
let i =
|
|
54770
|
+
if (t instanceof dE ? r = WJ(t.from, n) : t.empty && (r = GJ(n)), !r) return !1;
|
|
54771
|
+
let i = KJ(r.tableNode, r.tableStart);
|
|
54713
54772
|
if (i === null) return !1;
|
|
54714
54773
|
let a = e.state.tr.setSelection(A.near(e.state.doc.resolve(i), -1)).scrollIntoView();
|
|
54715
54774
|
return e.dispatch(a), e.focus(), !0;
|
|
54716
|
-
},
|
|
54775
|
+
}, JJ = t_(() => new hr({
|
|
54717
54776
|
key: new vr("zt-md-table-arrow-entry"),
|
|
54718
|
-
props: { handleKeyDown: (e, t) =>
|
|
54719
|
-
})),
|
|
54777
|
+
props: { handleKeyDown: (e, t) => UJ(t) ? !1 : qJ(e) }
|
|
54778
|
+
})), YJ = "table", XJ = "table_header_row", ZJ = "table_row", QJ = "table_header", $J = "table_cell", eY = (e) => {
|
|
54720
54779
|
let t = e.selection.$from, n = -1, r = -1;
|
|
54721
54780
|
for (let e = t.depth; e >= 0; --e) {
|
|
54722
54781
|
let i = t.node(e);
|
|
54723
|
-
if (r < 0 && (i.type.name ===
|
|
54782
|
+
if (r < 0 && (i.type.name === $J || i.type.name === QJ) && (r = t.index(e - 1)), n < 0 && (i.type.name === ZJ || i.type.name === XJ) && (n = t.index(e - 1)), i.type.name === YJ) return {
|
|
54724
54783
|
tableNode: i,
|
|
54725
54784
|
tableStart: e === 0 ? 0 : t.before(e),
|
|
54726
54785
|
tableNodeSize: i.nodeSize,
|
|
@@ -54729,7 +54788,7 @@ var OJ = (e, t) => {
|
|
|
54729
54788
|
};
|
|
54730
54789
|
}
|
|
54731
54790
|
return null;
|
|
54732
|
-
},
|
|
54791
|
+
}, tY = (e, t, n, r) => {
|
|
54733
54792
|
if (n < 0 || n >= e.childCount) return null;
|
|
54734
54793
|
let i = 0;
|
|
54735
54794
|
for (let t = 0; t < n; t += 1) i += e.child(t).nodeSize;
|
|
@@ -54738,16 +54797,16 @@ var OJ = (e, t) => {
|
|
|
54738
54797
|
let o = 0;
|
|
54739
54798
|
for (let e = 0; e < r; e += 1) o += a.child(e).nodeSize;
|
|
54740
54799
|
return t + 1 + i + 1 + o + 1 + 1;
|
|
54741
|
-
},
|
|
54800
|
+
}, nY = (e) => {
|
|
54742
54801
|
if (e.columnIndex < 0 || e.tableNode.childCount === 0) return !1;
|
|
54743
54802
|
let t = e.tableNode.child(0);
|
|
54744
54803
|
return e.columnIndex < t.childCount;
|
|
54745
|
-
},
|
|
54746
|
-
let i =
|
|
54804
|
+
}, rY = (e, t, n, r) => {
|
|
54805
|
+
let i = tY(t.tableNode, t.tableStart, n, r);
|
|
54747
54806
|
if (i === null) return !1;
|
|
54748
54807
|
let a = e.state.tr.setSelection(A.near(e.state.tr.doc.resolve(i), 1));
|
|
54749
54808
|
return e.dispatch(a), !0;
|
|
54750
|
-
},
|
|
54809
|
+
}, iY = (e, t) => t(e.state, e.dispatch, e) ? (e.dispatch(e.state.tr.scrollIntoView()), e.focus(), !0) : !1, aY = (e, t, n) => t.rowIndex < 0 || t.columnIndex < 0 || !rY(e, t, t.rowIndex, t.columnIndex) ? !1 : iY(e, n === "above" ? Ux : Wx), oY = (e, t) => t.rowIndex <= 0 || t.columnIndex < 0 || !rY(e, t, t.rowIndex, t.columnIndex) ? !1 : iY(e, Kx), sY = (e, t, n) => t.rowIndex < 0 || t.columnIndex < 0 || !rY(e, t, t.rowIndex, t.columnIndex) ? !1 : iY(e, n === "left" ? Lx : Rx), cY = (e, t) => t.rowIndex < 0 || t.columnIndex < 0 || (t.tableNode.childCount > 0 ? t.tableNode.child(0).childCount : 0) <= 1 || !rY(e, t, t.rowIndex, t.columnIndex) ? !1 : iY(e, Bx), lY = (e, t, n) => {
|
|
54751
54810
|
if (t.columnIndex < 0) return !1;
|
|
54752
54811
|
let r = Ub.get(t.tableNode), i = t.tableStart + 1, a = t.columnIndex, o = e.state.tr;
|
|
54753
54812
|
for (let e = 0; e < r.height; e += 1) {
|
|
@@ -54762,14 +54821,14 @@ var OJ = (e, t) => {
|
|
|
54762
54821
|
o.setNodeMarkup(c, l.type, u, l.marks);
|
|
54763
54822
|
}
|
|
54764
54823
|
return o.docChanged ? (o.scrollIntoView(), e.dispatch(o), e.focus(), !0) : !1;
|
|
54765
|
-
},
|
|
54766
|
-
let t =
|
|
54767
|
-
!t || t.rowIndex <= 0 ||
|
|
54768
|
-
},
|
|
54769
|
-
let t =
|
|
54770
|
-
!t || t.rowIndex < 0 || t.columnIndex < 0 ||
|
|
54771
|
-
},
|
|
54772
|
-
let [t, r] = f(!1), a =
|
|
54824
|
+
}, uY = (e) => {
|
|
54825
|
+
let t = eY(e.state);
|
|
54826
|
+
!t || t.rowIndex <= 0 || oY(e, t);
|
|
54827
|
+
}, dY = (e) => {
|
|
54828
|
+
let t = eY(e.state);
|
|
54829
|
+
!t || t.rowIndex < 0 || t.columnIndex < 0 || cY(e, t);
|
|
54830
|
+
}, fY = (e) => {
|
|
54831
|
+
let [t, r] = f(!1), a = sq({
|
|
54773
54832
|
open: t,
|
|
54774
54833
|
portalContainer: e.portalContainer,
|
|
54775
54834
|
editorWrapper: e.collisionBoundary,
|
|
@@ -54801,7 +54860,7 @@ var OJ = (e, t) => {
|
|
|
54801
54860
|
size: 14,
|
|
54802
54861
|
strokeWidth: 2,
|
|
54803
54862
|
"aria-hidden": "true"
|
|
54804
|
-
})), i(
|
|
54863
|
+
})), i(cq, {
|
|
54805
54864
|
panel: a,
|
|
54806
54865
|
portalContainer: e.portalContainer,
|
|
54807
54866
|
className: "zt-md-table-action-popover",
|
|
@@ -54869,13 +54928,13 @@ var OJ = (e, t) => {
|
|
|
54869
54928
|
e.onDeleteColumn(), r(!1);
|
|
54870
54929
|
}
|
|
54871
54930
|
}, e.messages.tableDeleteColumnLabel))));
|
|
54872
|
-
},
|
|
54931
|
+
}, pY = "zt-md-table-focus-actions", mY = 0, hY = 24, gY = 4, _Y = 4, vY = "top", yY = "left", bY = (e) => p(i(e, {
|
|
54873
54932
|
size: 14,
|
|
54874
54933
|
strokeWidth: 2,
|
|
54875
54934
|
"aria-hidden": "true"
|
|
54876
|
-
})),
|
|
54935
|
+
})), xY = bY(AD), SY = bY(OD), CY = bY(DD), wY = bY(ED), TY = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, EY = class {
|
|
54877
54936
|
constructor(e, t, n) {
|
|
54878
|
-
this.currentTableStart = null, this.currentTableNodeSize = null, this.currentColumnIndex = null, this.currentColumnAlignment =
|
|
54937
|
+
this.currentTableStart = null, this.currentTableNodeSize = null, this.currentColumnIndex = null, this.currentColumnAlignment = yY, this.currentTableElement = null, this.hasPositionContext = !1, this.repositionScheduler = aq(() => {
|
|
54879
54938
|
this.hasPositionContext && this.updateOverlayPosition();
|
|
54880
54939
|
}), this.handleActionsMouseDown = (e) => {
|
|
54881
54940
|
e.preventDefault();
|
|
@@ -54890,41 +54949,41 @@ var OJ = (e, t) => {
|
|
|
54890
54949
|
}, this.handleAlignRightClick = () => {
|
|
54891
54950
|
this.applyColumnAlignment("right");
|
|
54892
54951
|
}, this.handleInsertRowBelow = () => {
|
|
54893
|
-
let e =
|
|
54894
|
-
!e || e.rowIndex < 0 ||
|
|
54952
|
+
let e = eY(this.view.state);
|
|
54953
|
+
!e || e.rowIndex < 0 || aY(this.view, e, "below");
|
|
54895
54954
|
}, this.handleInsertRowAbove = () => {
|
|
54896
|
-
let e =
|
|
54897
|
-
!e || e.rowIndex <= 0 ||
|
|
54955
|
+
let e = eY(this.view.state);
|
|
54956
|
+
!e || e.rowIndex <= 0 || aY(this.view, e, "above");
|
|
54898
54957
|
}, this.handleInsertColumnLeft = () => {
|
|
54899
54958
|
this.insertColumn("left");
|
|
54900
54959
|
}, this.handleInsertColumnRight = () => {
|
|
54901
54960
|
this.insertColumn("right");
|
|
54902
54961
|
}, this.handleDeleteRow = () => {
|
|
54903
|
-
|
|
54962
|
+
uY(this.view);
|
|
54904
54963
|
}, this.handleDeleteColumn = () => {
|
|
54905
|
-
|
|
54906
|
-
}, this.view = e, this.messages = t, this.portalContainer = n, this.editorWrapper =
|
|
54964
|
+
dY(this.view);
|
|
54965
|
+
}, this.view = e, this.messages = t, this.portalContainer = n, this.editorWrapper = $K(e.dom), this.actionsContainer = document.createElement("div"), this.actionsContainer.className = "zt-md-table-actions-overlay", this.deleteButton = document.createElement("button"), this.deleteButton.type = "button", this.deleteButton.className = "zt-md-table-action-button zt-md-table-action-button-danger", this.deleteButton.style.display = "inline-flex", this.deleteButton.setAttribute("aria-label", t.tableDeleteAriaLabel), this.deleteButton.innerHTML = xY, this.alignLeftButton = this.createColumnAlignmentButton(t.tableAlignLeftAriaLabel, SY), this.alignCenterButton = this.createColumnAlignmentButton(t.tableAlignCenterAriaLabel, CY), this.alignRightButton = this.createColumnAlignmentButton(t.tableAlignRightAriaLabel, wY), this.moreActionsMount = document.createElement("span"), this.moreActionsMount.className = "zt-md-table-more-actions-mount", this.moreActionsRoot = m(this.moreActionsMount), this.actionsContainer.append(this.moreActionsMount, this.alignLeftButton, this.alignCenterButton, this.alignRightButton, this.deleteButton), this.actionsContainer.addEventListener("mousedown", this.handleActionsMouseDown), this.deleteButton.addEventListener("click", this.handleDeleteClick), this.alignLeftButton.addEventListener("click", this.handleAlignLeftClick), this.alignCenterButton.addEventListener("click", this.handleAlignCenterClick), this.alignRightButton.addEventListener("click", this.handleAlignRightClick), this.repositionScheduler.bindGlobal(), this.repositionScheduler.bindWrapper(this.editorWrapper), this.update(e);
|
|
54907
54966
|
}
|
|
54908
54967
|
createColumnAlignmentButton(e, t) {
|
|
54909
54968
|
let n = document.createElement("button");
|
|
54910
54969
|
return n.type = "button", n.className = "zt-md-table-action-button", n.style.display = "inline-flex", n.setAttribute("aria-label", e), n.innerHTML = t, n;
|
|
54911
54970
|
}
|
|
54912
54971
|
resolveColumnAlignment(e) {
|
|
54913
|
-
return e === "center" || e === "right" ? e :
|
|
54972
|
+
return e === "center" || e === "right" ? e : yY;
|
|
54914
54973
|
}
|
|
54915
54974
|
updateAlignmentButtonsState(e) {
|
|
54916
54975
|
this.alignLeftButton.disabled = !e, this.alignCenterButton.disabled = !e, this.alignRightButton.disabled = !e, this.alignLeftButton.classList.toggle("zt-md-table-action-button-active", e && this.currentColumnAlignment === "left"), this.alignCenterButton.classList.toggle("zt-md-table-action-button-active", e && this.currentColumnAlignment === "center"), this.alignRightButton.classList.toggle("zt-md-table-action-button-active", e && this.currentColumnAlignment === "right");
|
|
54917
54976
|
}
|
|
54918
54977
|
applyColumnAlignment(e) {
|
|
54919
|
-
let t =
|
|
54920
|
-
!t || t.rowIndex < 0 || t.columnIndex < 0 ||
|
|
54978
|
+
let t = eY(this.view.state);
|
|
54979
|
+
!t || t.rowIndex < 0 || t.columnIndex < 0 || lY(this.view, t, e);
|
|
54921
54980
|
}
|
|
54922
54981
|
insertColumn(e) {
|
|
54923
|
-
let t =
|
|
54924
|
-
!t || t.rowIndex < 0 || t.columnIndex < 0 ||
|
|
54982
|
+
let t = eY(this.view.state);
|
|
54983
|
+
!t || t.rowIndex < 0 || t.columnIndex < 0 || sY(this.view, t, e);
|
|
54925
54984
|
}
|
|
54926
54985
|
renderMoreActions(e, t, n, r) {
|
|
54927
|
-
this.moreActionsRoot.render(i(
|
|
54986
|
+
this.moreActionsRoot.render(i(fY, {
|
|
54928
54987
|
messages: this.messages,
|
|
54929
54988
|
portalContainer: this.portalContainer,
|
|
54930
54989
|
collisionBoundary: this.editorWrapper,
|
|
@@ -54947,7 +55006,7 @@ var OJ = (e, t) => {
|
|
|
54947
55006
|
}
|
|
54948
55007
|
resolveTableAnchor(e, t) {
|
|
54949
55008
|
if (!this.editorWrapper) return null;
|
|
54950
|
-
let n = e.getBoundingClientRect(), r =
|
|
55009
|
+
let n = e.getBoundingClientRect(), r = tq(n, this.editorWrapper), i = n.width, a = r.anchorLeftInContent + i - t - mY, o = r.anchorTopInContent - hY + gY;
|
|
54951
55010
|
return {
|
|
54952
55011
|
anchorLeftInContent: a,
|
|
54953
55012
|
anchorTopInContent: o,
|
|
@@ -54964,22 +55023,22 @@ var OJ = (e, t) => {
|
|
|
54964
55023
|
if (e === null) return;
|
|
54965
55024
|
let t = this.resolveTableAnchor(this.currentTableElement, e);
|
|
54966
55025
|
if (!t) return;
|
|
54967
|
-
let n =
|
|
55026
|
+
let n = iq({
|
|
54968
55027
|
wrapper: this.editorWrapper,
|
|
54969
55028
|
anchor: t,
|
|
54970
55029
|
overlaySize: { width: e },
|
|
54971
|
-
placement:
|
|
55030
|
+
placement: vY,
|
|
54972
55031
|
offsetY: 0,
|
|
54973
|
-
boundaryInset:
|
|
55032
|
+
boundaryInset: _Y
|
|
54974
55033
|
}, this.portalContainer);
|
|
54975
55034
|
this.actionsContainer.style.left = `${n.left}px`, this.actionsContainer.style.top = `${n.top}px`;
|
|
54976
55035
|
}
|
|
54977
55036
|
update(e) {
|
|
54978
|
-
if (this.view = e, !this.editorWrapper || !
|
|
55037
|
+
if (this.view = e, !this.editorWrapper || !TY(e)) {
|
|
54979
55038
|
this.detach();
|
|
54980
55039
|
return;
|
|
54981
55040
|
}
|
|
54982
|
-
let t =
|
|
55041
|
+
let t = eY(e.state);
|
|
54983
55042
|
if (!t) {
|
|
54984
55043
|
this.detach();
|
|
54985
55044
|
return;
|
|
@@ -54995,108 +55054,109 @@ var OJ = (e, t) => {
|
|
|
54995
55054
|
return;
|
|
54996
55055
|
}
|
|
54997
55056
|
this.actionsContainer.parentElement !== this.portalContainer && this.portalContainer.append(this.actionsContainer);
|
|
54998
|
-
let i =
|
|
55057
|
+
let i = nY(t), a = i && t.tableNode.child(0).childCount > 1, o = t.rowIndex > 0, s = t.rowIndex > 0, c = t.tableNode.childCount > 0 ? t.tableNode.child(0) : null;
|
|
54999
55058
|
this.currentColumnIndex = i ? t.columnIndex : null, this.currentColumnAlignment = this.resolveColumnAlignment(this.currentColumnIndex === null ? null : c?.maybeChild(this.currentColumnIndex)?.attrs?.alignment), this.updateAlignmentButtonsState(i), this.renderMoreActions(o, i, s, a), this.currentTableElement = r, this.currentTableStart = t.tableStart, this.currentTableNodeSize = t.tableNodeSize, this.hasPositionContext = !0, this.updateOverlayPosition(), this.repositionScheduler.schedule();
|
|
55000
55059
|
}
|
|
55001
55060
|
detach() {
|
|
55002
|
-
this.moreActionsRoot.render(null), this.actionsContainer.remove(), this.currentTableElement = null, this.currentTableStart = null, this.currentTableNodeSize = null, this.currentColumnIndex = null, this.currentColumnAlignment =
|
|
55061
|
+
this.moreActionsRoot.render(null), this.actionsContainer.remove(), this.currentTableElement = null, this.currentTableStart = null, this.currentTableNodeSize = null, this.currentColumnIndex = null, this.currentColumnAlignment = yY, this.updateAlignmentButtonsState(!1), this.hasPositionContext = !1;
|
|
55003
55062
|
}
|
|
55004
55063
|
destroy() {
|
|
55005
55064
|
this.detach(), this.repositionScheduler.destroy(), this.moreActionsRoot.unmount(), this.actionsContainer.removeEventListener("mousedown", this.handleActionsMouseDown), this.deleteButton.removeEventListener("click", this.handleDeleteClick), this.alignLeftButton.removeEventListener("click", this.handleAlignLeftClick), this.alignCenterButton.removeEventListener("click", this.handleAlignCenterClick), this.alignRightButton.removeEventListener("click", this.handleAlignRightClick);
|
|
55006
55065
|
}
|
|
55007
|
-
},
|
|
55066
|
+
}, DY = (e, t) => {
|
|
55008
55067
|
let n = IO(void 0, t);
|
|
55009
55068
|
return t_(() => new hr({
|
|
55010
|
-
key: new vr(
|
|
55011
|
-
view: (t) => new
|
|
55069
|
+
key: new vr(pY),
|
|
55070
|
+
view: (t) => new EY(t, n, e)
|
|
55012
55071
|
}));
|
|
55013
|
-
},
|
|
55072
|
+
}, OY = "list_item", kY = "li[data-item-type=\"task\"]", AY = 24, jY = (e, t) => {
|
|
55014
55073
|
let n = t.getBoundingClientRect();
|
|
55015
|
-
return e.clientX >= n.left && e.clientX <= n.left +
|
|
55016
|
-
},
|
|
55074
|
+
return e.clientX >= n.left && e.clientX <= n.left + AY && e.clientY >= n.top && e.clientY <= n.top + AY;
|
|
55075
|
+
}, MY = (e) => {
|
|
55017
55076
|
if (!(e instanceof Element)) return null;
|
|
55018
|
-
let t = e.closest(
|
|
55077
|
+
let t = e.closest(kY);
|
|
55019
55078
|
return t instanceof HTMLElement ? t : null;
|
|
55020
|
-
},
|
|
55079
|
+
}, NY = (e, t) => {
|
|
55021
55080
|
if (!e.editable) return !1;
|
|
55022
|
-
let n =
|
|
55023
|
-
return !n || !
|
|
55024
|
-
},
|
|
55081
|
+
let n = MY(t.target);
|
|
55082
|
+
return !n || !jY(t, n) ? !1 : (t.preventDefault(), !0);
|
|
55083
|
+
}, PY = (e, t) => {
|
|
55025
55084
|
let n = e.posAtDOM(t, 0) - 1, r = e.state.doc.nodeAt(n);
|
|
55026
|
-
return !r || r.type.name !==
|
|
55085
|
+
return !r || r.type.name !== OY || r.attrs.checked == null ? !1 : (e.dispatch(e.state.tr.setNodeMarkup(n, void 0, {
|
|
55027
55086
|
...r.attrs,
|
|
55028
55087
|
checked: !r.attrs.checked
|
|
55029
55088
|
})), !0);
|
|
55030
|
-
},
|
|
55031
|
-
mousedown: (e, t) =>
|
|
55032
|
-
dblclick: (e, t) =>
|
|
55089
|
+
}, FY = t_(() => new hr({ props: { handleDOMEvents: {
|
|
55090
|
+
mousedown: (e, t) => NY(e, t),
|
|
55091
|
+
dblclick: (e, t) => NY(e, t),
|
|
55033
55092
|
click: (e, t) => {
|
|
55034
55093
|
if (!e.editable) return !1;
|
|
55035
|
-
let n =
|
|
55036
|
-
return !n || !
|
|
55094
|
+
let n = MY(t.target);
|
|
55095
|
+
return !n || !jY(t, n) || !PY(e, n) ? !1 : (t.preventDefault(), !0);
|
|
55037
55096
|
}
|
|
55038
|
-
} } })),
|
|
55097
|
+
} } })), IY = "Tab", LY = 4, RY = /^ */, zY = "list_item", BY = (e) => typeof e.props.editable == "function" ? e.props.editable(e.state) : e.editable, VY = (e) => {
|
|
55039
55098
|
let { $from: t } = e.selection;
|
|
55040
55099
|
for (let e = t.depth; e >= 0; --e) {
|
|
55041
55100
|
let n = t.node(e);
|
|
55042
|
-
if (n.type.name ===
|
|
55101
|
+
if (n.type.name === zY) return n.type;
|
|
55043
55102
|
}
|
|
55044
55103
|
return null;
|
|
55045
|
-
},
|
|
55104
|
+
}, HY = (e) => {
|
|
55046
55105
|
let { selection: t, doc: n } = e;
|
|
55047
55106
|
if (t.empty) return [t.$from.start()];
|
|
55048
55107
|
let r = /* @__PURE__ */ new Set();
|
|
55049
55108
|
return n.nodesBetween(t.from, t.to, (e, t) => {
|
|
55050
55109
|
e.isTextblock && r.add(t + 1);
|
|
55051
55110
|
}), Array.from(r);
|
|
55052
|
-
},
|
|
55053
|
-
let { state: n } = e, r = " ".repeat(
|
|
55111
|
+
}, UY = (e, t) => {
|
|
55112
|
+
let { state: n } = e, r = " ".repeat(LY), i = HY(n).sort((e, t) => t - e), a = n.tr;
|
|
55054
55113
|
return n.selection.empty ? a.insertText(r, n.selection.to) : i.forEach((e) => {
|
|
55055
55114
|
a.insertText(r, e);
|
|
55056
55115
|
}), a.docChanged ? (t.preventDefault(), e.dispatch(a), !0) : !1;
|
|
55057
|
-
},
|
|
55116
|
+
}, WY = (e, t) => {
|
|
55058
55117
|
let { state: n } = e, { selection: r } = n;
|
|
55059
55118
|
if (!(r instanceof A)) return !1;
|
|
55060
|
-
let i =
|
|
55119
|
+
let i = HY(n).sort((e, t) => t - e), a = n.tr;
|
|
55061
55120
|
return i.forEach((e) => {
|
|
55062
|
-
let t = n.doc.resolve(e).parent.textContent.match(
|
|
55121
|
+
let t = n.doc.resolve(e).parent.textContent.match(RY)?.[0].length ?? 0, r = Math.min(t, LY);
|
|
55063
55122
|
r <= 0 || a.delete(e, e + r);
|
|
55064
55123
|
}), a.docChanged ? (t.preventDefault(), e.dispatch(a), !0) : !1;
|
|
55065
|
-
},
|
|
55124
|
+
}, GY = t_(() => new hr({
|
|
55066
55125
|
key: new vr("zt-md-tab-space-indent"),
|
|
55067
55126
|
props: { handleKeyDown: (e, t) => {
|
|
55068
55127
|
let n = e;
|
|
55069
|
-
if (!
|
|
55070
|
-
let r =
|
|
55128
|
+
if (!BY(n) || t.defaultPrevented || t.key !== IY || t.altKey || t.ctrlKey || t.metaKey) return !1;
|
|
55129
|
+
let r = VY(n.state);
|
|
55071
55130
|
if (r) {
|
|
55072
55131
|
let e = (t.shiftKey ? Bv(r) : Uv(r))(n.state, n.dispatch);
|
|
55073
55132
|
return t.preventDefault(), e || !0;
|
|
55074
55133
|
}
|
|
55075
|
-
return t.shiftKey ?
|
|
55134
|
+
return t.shiftKey ? WY(n, t) : UY(n, t);
|
|
55076
55135
|
} }
|
|
55077
|
-
})),
|
|
55136
|
+
})), KY = (e) => {
|
|
55078
55137
|
let t = e.target;
|
|
55079
55138
|
if (!(t instanceof Element)) return null;
|
|
55080
55139
|
let n = t.closest("a[href]");
|
|
55081
55140
|
return n instanceof HTMLAnchorElement ? n : null;
|
|
55082
|
-
},
|
|
55083
|
-
let n =
|
|
55141
|
+
}, qY = (e) => e?.type.name === "image", JY = (e, t) => {
|
|
55142
|
+
let n = KY(e);
|
|
55084
55143
|
if (!n) return !1;
|
|
55085
55144
|
let r = WO(n.getAttribute("href"));
|
|
55086
55145
|
return !r || t || !e.ctrlKey ? !1 : (e.preventDefault(), e.stopPropagation(), window.open(r, "_blank", "noopener,noreferrer"), !0);
|
|
55087
|
-
},
|
|
55088
|
-
let t = e.messages ?? IO(), n =
|
|
55146
|
+
}, YY = (e, t) => !t || !KY(e) ? !1 : (e.preventDefault(), e.stopPropagation(), !0), XY = (e) => {
|
|
55147
|
+
let t = e.messages ?? IO(), n = DY(e.contentPortalContainer, t), r = fJ(e.contentPortalContainer, t), i = wq(t, e.contentPortalContainer), a = pU(t, e.contentPortalContainer), o = BJ(e.portalContainer, e.slashMenu, t, e.imageUpload, e.locale), s = o.plugins, c = {
|
|
55089
55148
|
listener: Fv,
|
|
55090
55149
|
commonmark: Bb,
|
|
55091
55150
|
gfm: nE,
|
|
55092
55151
|
history: G_,
|
|
55093
|
-
codeBlockPrism:
|
|
55152
|
+
codeBlockPrism: Lq,
|
|
55094
55153
|
codeBlockLanguagePicker: i,
|
|
55095
55154
|
clipboard: m_,
|
|
55096
55155
|
indent: Y_,
|
|
55097
55156
|
imageDeleteSelection: Tk,
|
|
55098
|
-
tableArrowEntry:
|
|
55157
|
+
tableArrowEntry: JJ,
|
|
55099
55158
|
blockBoundaryNavigation: LE,
|
|
55159
|
+
headingBackspaceEmptyParagraph: vW,
|
|
55100
55160
|
mathBackspaceEntry: zI,
|
|
55101
55161
|
blockquoteBackspaceLift: uW,
|
|
55102
55162
|
tableFocusActions: n,
|
|
@@ -55106,20 +55166,20 @@ var OJ = (e, t) => {
|
|
|
55106
55166
|
math: rW,
|
|
55107
55167
|
mathInlineEdit: a,
|
|
55108
55168
|
mathInlineArrowNavigation: FU,
|
|
55109
|
-
taskListToggle:
|
|
55110
|
-
tabSpaceIndent:
|
|
55111
|
-
codeBlockModASelect:
|
|
55169
|
+
taskListToggle: FY,
|
|
55170
|
+
tabSpaceIndent: GY,
|
|
55171
|
+
codeBlockModASelect: jq,
|
|
55112
55172
|
slash: s.length > 0 ? s : null
|
|
55113
55173
|
}, l = aE(c, { includeRuntime: !1 }), u = aE(c, { includeRuntime: !0 }).filter((e) => e.name === "clipboard" || e.name === "indent"), d = qg.make();
|
|
55114
55174
|
d.config((n) => {
|
|
55115
|
-
rk(n, e.imageUpload?.allowedProtocols), n.set(zg, e.root), n.set(Tg, e.markdown), n.set(Rg, {
|
|
55175
|
+
wW(n), rk(n, e.imageUpload?.allowedProtocols), n.set(zg, e.root), n.set(Tg, e.markdown), n.set(Rg, {
|
|
55116
55176
|
editable: () => !e.readOnly,
|
|
55117
55177
|
handleDOMEvents: {
|
|
55118
|
-
mousedown: (t, n) => n instanceof MouseEvent ?
|
|
55119
|
-
click: (t, n) => n instanceof MouseEvent ?
|
|
55178
|
+
mousedown: (t, n) => n instanceof MouseEvent ? YY(n, e.readOnly) : !1,
|
|
55179
|
+
click: (t, n) => n instanceof MouseEvent ? YY(n, e.readOnly) : !1
|
|
55120
55180
|
},
|
|
55121
|
-
handleClick: (t, n, r) =>
|
|
55122
|
-
handleClickOn: (t, n, r, i, a, o) =>
|
|
55181
|
+
handleClick: (t, n, r) => JY(r, e.readOnly),
|
|
55182
|
+
handleClickOn: (t, n, r, i, a, o) => JY(a, e.readOnly) ? !0 : e.readOnly && o && qY(r) ? (a.preventDefault(), !0) : !1
|
|
55123
55183
|
});
|
|
55124
55184
|
let r = n.get(Hh) ?? [];
|
|
55125
55185
|
n.set(Hh, [
|
|
@@ -55127,7 +55187,7 @@ var OJ = (e, t) => {
|
|
|
55127
55187
|
["image", fk(t)],
|
|
55128
55188
|
["math_block", aU(t)],
|
|
55129
55189
|
["math_inline", yU(t)],
|
|
55130
|
-
["code_block",
|
|
55190
|
+
["code_block", VW(t)]
|
|
55131
55191
|
]), n.get(Nv).markdownUpdated((t, n) => {
|
|
55132
55192
|
e.onChange(n);
|
|
55133
55193
|
}), o.config && o.config(n);
|
|
@@ -55161,7 +55221,7 @@ var OJ = (e, t) => {
|
|
|
55161
55221
|
p(e);
|
|
55162
55222
|
}
|
|
55163
55223
|
};
|
|
55164
|
-
},
|
|
55224
|
+
}, ZY = (e, t, n, r) => {
|
|
55165
55225
|
let i = e, a = i.create.bind(e);
|
|
55166
55226
|
return i.create = async () => {
|
|
55167
55227
|
try {
|
|
@@ -55171,10 +55231,10 @@ var OJ = (e, t) => {
|
|
|
55171
55231
|
throw console.error("Milkdown init failed:", e), r(e), e;
|
|
55172
55232
|
}
|
|
55173
55233
|
}, i;
|
|
55174
|
-
},
|
|
55234
|
+
}, QY = (e) => {
|
|
55175
55235
|
let t = d(null), n = d(e.markdown), r = d(e.onMarkdownChange), i = d(e.onInitError), a = d(e.onInitReady), o = d(null), s = ce((r) => {
|
|
55176
55236
|
t.current = null, e.focusEditorRef && (e.focusEditorRef.current = null), n.current = e.markdown;
|
|
55177
|
-
let s =
|
|
55237
|
+
let s = XY({
|
|
55178
55238
|
root: r,
|
|
55179
55239
|
portalContainer: e.portalContainer,
|
|
55180
55240
|
contentPortalContainer: e.contentPortalContainer,
|
|
@@ -55188,7 +55248,7 @@ var OJ = (e, t) => {
|
|
|
55188
55248
|
n.current = e, o.current?.(e);
|
|
55189
55249
|
}
|
|
55190
55250
|
});
|
|
55191
|
-
return
|
|
55251
|
+
return ZY(s.editor, s.installRuntimePlugins, () => {
|
|
55192
55252
|
t.current = s, e.focusEditorRef && (e.focusEditorRef.current = s.focusEditor), a.current?.();
|
|
55193
55253
|
}, (e) => {
|
|
55194
55254
|
i.current?.(e);
|
|
@@ -55222,10 +55282,10 @@ var OJ = (e, t) => {
|
|
|
55222
55282
|
let r = t.current;
|
|
55223
55283
|
!r || s.loading || e.markdown !== n.current && (n.current = e.markdown, r.setMarkdown(e.markdown));
|
|
55224
55284
|
}, [s.loading, e.markdown]);
|
|
55225
|
-
},
|
|
55285
|
+
}, $Y = 160, eX = {
|
|
55226
55286
|
"zh-CN": "只读",
|
|
55227
55287
|
"en-US": "Read only"
|
|
55228
|
-
},
|
|
55288
|
+
}, tX = (e) => e.length === 0 ? "\"\"" : `"${e.replace(/\\/g, "\\\\").replace(/"/g, "\\\"").replace(/\r\n|\r|\n/g, "\\A ")}"`, nX = (e) => (QY({
|
|
55229
55289
|
markdown: e.markdown,
|
|
55230
55290
|
portalContainer: e.portalContainer,
|
|
55231
55291
|
contentPortalContainer: e.contentPortalContainer,
|
|
@@ -55239,13 +55299,13 @@ var OJ = (e, t) => {
|
|
|
55239
55299
|
onMarkdownChange: e.onMarkdownChange,
|
|
55240
55300
|
onInitReady: e.onInitReady,
|
|
55241
55301
|
onInitError: e.onInitError
|
|
55242
|
-
}), /* @__PURE__ */ y(oe, {})),
|
|
55243
|
-
let [t, n] = f(""), [r, i] = f(null), [a, s] = f(null), c = d(null), l = e.theme ?? "light", p = e.readOnly ?? !1, m =
|
|
55302
|
+
}), /* @__PURE__ */ y(oe, {})), rX = (e) => {
|
|
55303
|
+
let [t, n] = f(""), [r, i] = f(null), [a, s] = f(null), c = d(null), l = e.theme ?? "light", p = e.readOnly ?? !1, m = eX[e.locale ?? "zh-CN"], h = e.debounceMs ?? $Y, { markdown: g, setMarkdown: _ } = de(e.value, e.defaultValue, e.onChange), v = u(() => IO(e.locale, e.messages, e.placeholder), [
|
|
55244
55304
|
e.locale,
|
|
55245
55305
|
e.messages,
|
|
55246
55306
|
e.placeholder
|
|
55247
55307
|
]), x = {
|
|
55248
|
-
"--zt-gap-placeholder-content":
|
|
55308
|
+
"--zt-gap-placeholder-content": tX(v.placeholder),
|
|
55249
55309
|
...e.maxHeight === void 0 ? {} : {
|
|
55250
55310
|
maxHeight: e.maxHeight,
|
|
55251
55311
|
overflowY: "auto"
|
|
@@ -55288,7 +55348,7 @@ var OJ = (e, t) => {
|
|
|
55288
55348
|
"aria-readonly": p,
|
|
55289
55349
|
onMouseDown: T,
|
|
55290
55350
|
style: x,
|
|
55291
|
-
children: [r && a ? /* @__PURE__ */ y(se, { children: /* @__PURE__ */ y(
|
|
55351
|
+
children: [r && a ? /* @__PURE__ */ y(se, { children: /* @__PURE__ */ y(nX, {
|
|
55292
55352
|
markdown: g,
|
|
55293
55353
|
locale: e.locale,
|
|
55294
55354
|
portalContainer: r,
|
|
@@ -55316,4 +55376,4 @@ var OJ = (e, t) => {
|
|
|
55316
55376
|
});
|
|
55317
55377
|
};
|
|
55318
55378
|
//#endregion
|
|
55319
|
-
export {
|
|
55379
|
+
export { rX as MilkdownEditor };
|