@oomol-lab/open-flow 0.1.0-beta.4 → 0.1.0-beta.5
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/browser/{DesignerIcon-DdfuH2jW.js → DesignerIcon-XKBRy_0Q.js} +640 -640
- package/dist/browser/createResourceDialog-Cf7QpXp6.js +505 -0
- package/dist/browser/{dist-BMqL-qR5.js → dist-BMRLCebL.js} +291 -292
- package/dist/browser/{dist-DWADUsVB.js → dist-By46o5UV.js} +47 -47
- package/dist/browser/{dist-CJpzJrLM.js → dist-Cc0y2Pli.js} +811 -812
- package/dist/browser/{dist-DUzA0Ukh.js → dist-Dg_VXC8f.js} +134 -135
- package/dist/browser/{dist-3Mj8q8Pr.js → dist-DmuE3M0R.js} +53 -54
- package/dist/browser/{dist-BN4ZCyOB.js → dist-DpDLsYtO.js} +14 -15
- package/dist/browser/dist-DxahK_I8.js +2688 -0
- package/dist/browser/{dist-CPuF50D9.js → dist-meg_oHVR.js} +335 -335
- package/dist/browser/{esm-C9jQK70n.js → esm-xWDFFpGd.js} +5 -6
- package/dist/browser/flow-authoring-module.d.ts +2 -2
- package/dist/browser/flow-authoring-node.d.ts +2 -2
- package/dist/browser/flow-authoring.js +469 -209
- package/dist/browser/flow-change.d.ts +96 -8
- package/dist/browser/flow-change.js +319 -96
- package/dist/browser/{flowChanges-Bs-ZcJV8.js → flowChanges-CeMiiZIO.js} +1578 -1541
- package/dist/browser/{flowRunInputEditorStore-BYa8zFLC.js → flowRunInputEditorStore-DDidwd8h.js} +9 -1
- package/dist/browser/{flowWorkspace-BewofPeU.js → flowWorkspace-VnS8nLMT.js} +9354 -9349
- package/dist/browser/{getPseudoElementBounds-qDxSDwzN.js → getPseudoElementBounds-5LArT6Xc.js} +494 -474
- package/dist/browser/icons-CRxvozBE.js +726 -0
- package/dist/browser/{typeScriptSession-CwMPjseS.js → typeScriptSession-Bj2HDFRd.js} +255 -256
- package/dist/browser/{waitNotificationInputs-DtrPBwA1.js → waitNotificationInputs-ClCAEIAM.js} +2 -2
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.js +547 -611
- package/dist/browser/{workbenchSelect-CX8KtT7L.js → workbenchSelect-Cf1zlVm9.js} +398 -398
- package/dist/common/control-api-conformance.js +21 -19
- package/dist/common/control-api.d.ts +4 -11
- package/dist/common/control-api.js +6 -18
- package/package.json +1 -1
- package/dist/browser/createResourceDialog-4YQKl8lG.js +0 -505
- package/dist/browser/dist-BpopSHwP.js +0 -1543
- package/dist/browser/dist-CUSrALSX.js +0 -1620
- package/dist/browser/icons-DRoMXL5h.js +0 -521
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as
|
|
3
|
-
import { c as
|
|
4
|
-
import { D as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { n as ce } from "./dist-CeSZ2xSM.js";
|
|
1
|
+
import { D as e, E as t, P as n, S as r, b as i } from "./dist-DxahK_I8.js";
|
|
2
|
+
import { n as a } from "./dist-Dg_VXC8f.js";
|
|
3
|
+
import { c as o, l as s, m as c, o as l, p as u, r as d, s as f } from "./dist-Mecbzdl2.js";
|
|
4
|
+
import { D as p, E as m, T as h, a as g, b as _, f as ee, r as te, s as ne, y as re } from "./dist-BKuSVKCC.js";
|
|
5
|
+
import { c as ie, l as ae, n as oe } from "./dist-meg_oHVR.js";
|
|
6
|
+
import { n as se } from "./dist-CeSZ2xSM.js";
|
|
8
7
|
//#region ../../node_modules/.bun/marked@15.0.12/node_modules/marked/lib/marked.esm.js
|
|
9
|
-
function
|
|
8
|
+
function ce() {
|
|
10
9
|
return {
|
|
11
10
|
async: !1,
|
|
12
11
|
breaks: !1,
|
|
@@ -20,22 +19,22 @@ function le() {
|
|
|
20
19
|
walkTokens: null
|
|
21
20
|
};
|
|
22
21
|
}
|
|
23
|
-
var
|
|
24
|
-
function
|
|
25
|
-
|
|
22
|
+
var v = ce();
|
|
23
|
+
function le(e) {
|
|
24
|
+
v = e;
|
|
26
25
|
}
|
|
27
|
-
var
|
|
28
|
-
function
|
|
26
|
+
var y = { exec: () => null };
|
|
27
|
+
function b(e, t = "") {
|
|
29
28
|
let n = typeof e == "string" ? e : e.source, r = {
|
|
30
29
|
replace: (e, t) => {
|
|
31
30
|
let i = typeof t == "string" ? t : t.source;
|
|
32
|
-
return i = i.replace(
|
|
31
|
+
return i = i.replace(x.caret, "$1"), n = n.replace(e, i), r;
|
|
33
32
|
},
|
|
34
33
|
getRegex: () => new RegExp(n, t)
|
|
35
34
|
};
|
|
36
35
|
return r;
|
|
37
36
|
}
|
|
38
|
-
var
|
|
37
|
+
var x = {
|
|
39
38
|
codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
|
|
40
39
|
outputLinkReplace: /\\([\[\]])/g,
|
|
41
40
|
indentCodeCompensation: /^(\s+)(?:```)/,
|
|
@@ -92,113 +91,113 @@ var b = {
|
|
|
92
91
|
fencesBeginRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}(?:\`\`\`|~~~)`),
|
|
93
92
|
headingBeginRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}#`),
|
|
94
93
|
htmlBeginRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}<(?:[a-z].*>|!--)`, "i")
|
|
95
|
-
},
|
|
96
|
-
blockquote:
|
|
97
|
-
code:
|
|
98
|
-
def:
|
|
99
|
-
fences:
|
|
100
|
-
heading:
|
|
101
|
-
hr:
|
|
102
|
-
html:
|
|
94
|
+
}, ue = /^(?:[ \t]*(?:\n|$))+/, de = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, fe = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, S = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, pe = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, C = /(?:[*+-]|\d{1,9}[.)])/, me = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, he = b(me).replace(/bull/g, C).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), ge = b(me).replace(/bull/g, C).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), w = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, _e = /^[^\n]+/, T = /(?!\s*\])(?:\\.|[^\[\]\\])+/, ve = b(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", T).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), ye = b(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, C).getRegex(), E = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", D = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, be = b("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", D).replace("tag", E).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), xe = b(w).replace("hr", S).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", E).getRegex(), O = {
|
|
95
|
+
blockquote: b(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", xe).getRegex(),
|
|
96
|
+
code: de,
|
|
97
|
+
def: ve,
|
|
98
|
+
fences: fe,
|
|
99
|
+
heading: pe,
|
|
100
|
+
hr: S,
|
|
101
|
+
html: be,
|
|
102
|
+
lheading: he,
|
|
103
|
+
list: ye,
|
|
104
|
+
newline: ue,
|
|
105
|
+
paragraph: xe,
|
|
106
|
+
table: y,
|
|
107
|
+
text: _e
|
|
108
|
+
}, Se = b("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", S).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", E).getRegex(), Ce = {
|
|
109
|
+
...O,
|
|
103
110
|
lheading: ge,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}, Ce = y("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", x).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", T).getRegex(), we = {
|
|
110
|
-
...D,
|
|
111
|
-
lheading: _e,
|
|
112
|
-
table: Ce,
|
|
113
|
-
paragraph: y(C).replace("hr", x).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Ce).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", T).getRegex()
|
|
114
|
-
}, Te = {
|
|
115
|
-
...D,
|
|
116
|
-
html: y("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", E).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
|
|
111
|
+
table: Se,
|
|
112
|
+
paragraph: b(w).replace("hr", S).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Se).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", E).getRegex()
|
|
113
|
+
}, we = {
|
|
114
|
+
...O,
|
|
115
|
+
html: b("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", D).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
|
|
117
116
|
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
|
118
117
|
heading: /^(#{1,6})(.*)(?:\n+|$)/,
|
|
119
|
-
fences:
|
|
118
|
+
fences: y,
|
|
120
119
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
121
|
-
paragraph:
|
|
122
|
-
},
|
|
123
|
-
_backpedal:
|
|
124
|
-
anyPunctuation:
|
|
125
|
-
autolink:
|
|
126
|
-
blockSkip:
|
|
127
|
-
br:
|
|
128
|
-
code:
|
|
129
|
-
del:
|
|
130
|
-
emStrongLDelim:
|
|
120
|
+
paragraph: b(w).replace("hr", S).replace("heading", " *#{1,6} *[^\n]").replace("lheading", he).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
121
|
+
}, Te = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ee = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, De = /^( {2,}|\\)\n(?!\s*$)/, Oe = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, k = /[\p{P}\p{S}]/u, A = /[\s\p{P}\p{S}]/u, ke = /[^\s\p{P}\p{S}]/u, Ae = b(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, A).getRegex(), je = /(?!~)[\p{P}\p{S}]/u, Me = /(?!~)[\s\p{P}\p{S}]/u, Ne = /(?:[^\s\p{P}\p{S}]|~)/u, Pe = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g, Fe = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Ie = b(Fe, "u").replace(/punct/g, k).getRegex(), Le = b(Fe, "u").replace(/punct/g, je).getRegex(), Re = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", ze = b(Re, "gu").replace(/notPunctSpace/g, ke).replace(/punctSpace/g, A).replace(/punct/g, k).getRegex(), Be = b(Re, "gu").replace(/notPunctSpace/g, Ne).replace(/punctSpace/g, Me).replace(/punct/g, je).getRegex(), Ve = b("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ke).replace(/punctSpace/g, A).replace(/punct/g, k).getRegex(), He = b(/\\(punct)/, "gu").replace(/punct/g, k).getRegex(), Ue = b(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), We = b(D).replace("(?:-->|$)", "-->").getRegex(), Ge = b("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", We).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), j = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Ke = b(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", j).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), qe = b(/^!?\[(label)\]\[(ref)\]/).replace("label", j).replace("ref", T).getRegex(), Je = b(/^!?\[(ref)\](?:\[\])?/).replace("ref", T).getRegex(), M = {
|
|
122
|
+
_backpedal: y,
|
|
123
|
+
anyPunctuation: He,
|
|
124
|
+
autolink: Ue,
|
|
125
|
+
blockSkip: Pe,
|
|
126
|
+
br: De,
|
|
127
|
+
code: Ee,
|
|
128
|
+
del: y,
|
|
129
|
+
emStrongLDelim: Ie,
|
|
130
|
+
emStrongRDelimAst: ze,
|
|
131
|
+
emStrongRDelimUnd: Ve,
|
|
132
|
+
escape: Te,
|
|
133
|
+
link: Ke,
|
|
134
|
+
nolink: Je,
|
|
135
|
+
punctuation: Ae,
|
|
136
|
+
reflink: qe,
|
|
137
|
+
reflinkSearch: b("reflink|nolink(?!\\()", "g").replace("reflink", qe).replace("nolink", Je).getRegex(),
|
|
138
|
+
tag: Ge,
|
|
139
|
+
text: Oe,
|
|
140
|
+
url: y
|
|
141
|
+
}, Ye = {
|
|
142
|
+
...M,
|
|
143
|
+
link: b(/^!?\[(label)\]\((.*?)\)/).replace("label", j).getRegex(),
|
|
144
|
+
reflink: b(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", j).getRegex()
|
|
145
|
+
}, N = {
|
|
146
|
+
...M,
|
|
131
147
|
emStrongRDelimAst: Be,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
link: qe,
|
|
135
|
-
nolink: Ye,
|
|
136
|
-
punctuation: je,
|
|
137
|
-
reflink: Je,
|
|
138
|
-
reflinkSearch: y("reflink|nolink(?!\\()", "g").replace("reflink", Je).replace("nolink", Ye).getRegex(),
|
|
139
|
-
tag: Ke,
|
|
140
|
-
text: ke,
|
|
141
|
-
url: v
|
|
142
|
-
}, Xe = {
|
|
143
|
-
...j,
|
|
144
|
-
link: y(/^!?\[(label)\]\((.*?)\)/).replace("label", A).getRegex(),
|
|
145
|
-
reflink: y(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", A).getRegex()
|
|
146
|
-
}, M = {
|
|
147
|
-
...j,
|
|
148
|
-
emStrongRDelimAst: Ve,
|
|
149
|
-
emStrongLDelim: Re,
|
|
150
|
-
url: y(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
148
|
+
emStrongLDelim: Le,
|
|
149
|
+
url: b(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
151
150
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
152
151
|
del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,
|
|
153
152
|
text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
|
|
154
|
-
},
|
|
155
|
-
...
|
|
156
|
-
br:
|
|
157
|
-
text:
|
|
158
|
-
}, N = {
|
|
159
|
-
normal: D,
|
|
160
|
-
gfm: we,
|
|
161
|
-
pedantic: Te
|
|
153
|
+
}, Xe = {
|
|
154
|
+
...N,
|
|
155
|
+
br: b(De).replace("{2,}", "*").getRegex(),
|
|
156
|
+
text: b(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
162
157
|
}, P = {
|
|
163
|
-
normal:
|
|
164
|
-
gfm:
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
158
|
+
normal: O,
|
|
159
|
+
gfm: Ce,
|
|
160
|
+
pedantic: we
|
|
161
|
+
}, F = {
|
|
162
|
+
normal: M,
|
|
163
|
+
gfm: N,
|
|
164
|
+
breaks: Xe,
|
|
165
|
+
pedantic: Ye
|
|
166
|
+
}, Ze = {
|
|
168
167
|
"&": "&",
|
|
169
168
|
"<": "<",
|
|
170
169
|
">": ">",
|
|
171
170
|
"\"": """,
|
|
172
171
|
"'": "'"
|
|
173
|
-
},
|
|
174
|
-
function
|
|
172
|
+
}, Qe = (e) => Ze[e];
|
|
173
|
+
function I(e, t) {
|
|
175
174
|
if (t) {
|
|
176
|
-
if (
|
|
177
|
-
} else if (
|
|
175
|
+
if (x.escapeTest.test(e)) return e.replace(x.escapeReplace, Qe);
|
|
176
|
+
} else if (x.escapeTestNoEncode.test(e)) return e.replace(x.escapeReplaceNoEncode, Qe);
|
|
178
177
|
return e;
|
|
179
178
|
}
|
|
180
|
-
function
|
|
179
|
+
function $e(e) {
|
|
181
180
|
try {
|
|
182
|
-
e = encodeURI(e).replace(
|
|
181
|
+
e = encodeURI(e).replace(x.percentDecode, "%");
|
|
183
182
|
} catch {
|
|
184
183
|
return null;
|
|
185
184
|
}
|
|
186
185
|
return e;
|
|
187
186
|
}
|
|
188
|
-
function
|
|
189
|
-
let n = e.replace(
|
|
187
|
+
function et(e, t) {
|
|
188
|
+
let n = e.replace(x.findPipe, (e, t, n) => {
|
|
190
189
|
let r = !1, i = t;
|
|
191
190
|
for (; --i >= 0 && n[i] === "\\";) r = !r;
|
|
192
191
|
return r ? "|" : " |";
|
|
193
|
-
}).split(
|
|
192
|
+
}).split(x.splitPipe), r = 0;
|
|
194
193
|
if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) {
|
|
195
194
|
if (n.length > t) n.splice(t);
|
|
196
195
|
else for (; n.length < t;) n.push("");
|
|
197
196
|
}
|
|
198
|
-
for (; r < n.length; r++) n[r] = n[r].trim().replace(
|
|
197
|
+
for (; r < n.length; r++) n[r] = n[r].trim().replace(x.slashPipe, "|");
|
|
199
198
|
return n;
|
|
200
199
|
}
|
|
201
|
-
function
|
|
200
|
+
function L(e, t, n) {
|
|
202
201
|
let r = e.length;
|
|
203
202
|
if (r === 0) return "";
|
|
204
203
|
let i = 0;
|
|
@@ -210,7 +209,7 @@ function I(e, t, n) {
|
|
|
210
209
|
}
|
|
211
210
|
return e.slice(0, r - i);
|
|
212
211
|
}
|
|
213
|
-
function
|
|
212
|
+
function tt(e, t) {
|
|
214
213
|
if (e.indexOf(t[1]) === -1) return -1;
|
|
215
214
|
let n = 0;
|
|
216
215
|
for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
|
|
@@ -218,7 +217,7 @@ function nt(e, t) {
|
|
|
218
217
|
else if (e[r] === t[1] && (n--, n < 0)) return r;
|
|
219
218
|
return n > 0 ? -2 : -1;
|
|
220
219
|
}
|
|
221
|
-
function
|
|
220
|
+
function nt(e, t, n, r, i) {
|
|
222
221
|
let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1");
|
|
223
222
|
r.state.inLink = !0;
|
|
224
223
|
let c = {
|
|
@@ -231,7 +230,7 @@ function rt(e, t, n, r, i) {
|
|
|
231
230
|
};
|
|
232
231
|
return r.state.inLink = !1, c;
|
|
233
232
|
}
|
|
234
|
-
function
|
|
233
|
+
function rt(e, t, n) {
|
|
235
234
|
let r = e.match(n.other.indentCodeCompensation);
|
|
236
235
|
if (r === null) return t;
|
|
237
236
|
let i = r[1];
|
|
@@ -242,12 +241,12 @@ function it(e, t, n) {
|
|
|
242
241
|
return r.length >= i.length ? e.slice(i.length) : e;
|
|
243
242
|
}).join("\n");
|
|
244
243
|
}
|
|
245
|
-
var
|
|
244
|
+
var R = class {
|
|
246
245
|
options;
|
|
247
246
|
rules;
|
|
248
247
|
lexer;
|
|
249
248
|
constructor(e) {
|
|
250
|
-
this.options = e ||
|
|
249
|
+
this.options = e || v;
|
|
251
250
|
}
|
|
252
251
|
space(e) {
|
|
253
252
|
let t = this.rules.block.newline.exec(e);
|
|
@@ -264,14 +263,14 @@ var L = class {
|
|
|
264
263
|
type: "code",
|
|
265
264
|
raw: t[0],
|
|
266
265
|
codeBlockStyle: "indented",
|
|
267
|
-
text: this.options.pedantic ? e :
|
|
266
|
+
text: this.options.pedantic ? e : L(e, "\n")
|
|
268
267
|
};
|
|
269
268
|
}
|
|
270
269
|
}
|
|
271
270
|
fences(e) {
|
|
272
271
|
let t = this.rules.block.fences.exec(e);
|
|
273
272
|
if (t) {
|
|
274
|
-
let e = t[0], n =
|
|
273
|
+
let e = t[0], n = rt(e, t[3] || "", this.rules);
|
|
275
274
|
return {
|
|
276
275
|
type: "code",
|
|
277
276
|
raw: e,
|
|
@@ -285,7 +284,7 @@ var L = class {
|
|
|
285
284
|
if (t) {
|
|
286
285
|
let e = t[2].trim();
|
|
287
286
|
if (this.rules.other.endingHash.test(e)) {
|
|
288
|
-
let t =
|
|
287
|
+
let t = L(e, "#");
|
|
289
288
|
(this.options.pedantic || !t || this.rules.other.endingSpaceChar.test(t)) && (e = t.trim());
|
|
290
289
|
}
|
|
291
290
|
return {
|
|
@@ -301,13 +300,13 @@ var L = class {
|
|
|
301
300
|
let t = this.rules.block.hr.exec(e);
|
|
302
301
|
if (t) return {
|
|
303
302
|
type: "hr",
|
|
304
|
-
raw:
|
|
303
|
+
raw: L(t[0], "\n")
|
|
305
304
|
};
|
|
306
305
|
}
|
|
307
306
|
blockquote(e) {
|
|
308
307
|
let t = this.rules.block.blockquote.exec(e);
|
|
309
308
|
if (t) {
|
|
310
|
-
let e =
|
|
309
|
+
let e = L(t[0], "\n").split("\n"), n = "", r = "", i = [];
|
|
311
310
|
for (; e.length > 0;) {
|
|
312
311
|
let t = !1, a = [], o;
|
|
313
312
|
for (o = 0; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
|
|
@@ -422,7 +421,7 @@ ${c}` : c;
|
|
|
422
421
|
table(e) {
|
|
423
422
|
let t = this.rules.block.table.exec(e);
|
|
424
423
|
if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
|
|
425
|
-
let n =
|
|
424
|
+
let n = et(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [], a = {
|
|
426
425
|
type: "table",
|
|
427
426
|
raw: t[0],
|
|
428
427
|
header: [],
|
|
@@ -437,7 +436,7 @@ ${c}` : c;
|
|
|
437
436
|
header: !0,
|
|
438
437
|
align: a.align[e]
|
|
439
438
|
});
|
|
440
|
-
for (let e of i) a.rows.push(
|
|
439
|
+
for (let e of i) a.rows.push(et(e, a.header.length).map((e, t) => ({
|
|
441
440
|
text: e,
|
|
442
441
|
tokens: this.lexer.inline(e),
|
|
443
442
|
header: !1,
|
|
@@ -502,10 +501,10 @@ ${c}` : c;
|
|
|
502
501
|
let e = t[2].trim();
|
|
503
502
|
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(e)) {
|
|
504
503
|
if (!this.rules.other.endAngleBracket.test(e)) return;
|
|
505
|
-
let t =
|
|
504
|
+
let t = L(e.slice(0, -1), "\\");
|
|
506
505
|
if ((e.length - t.length) % 2 == 0) return;
|
|
507
506
|
} else {
|
|
508
|
-
let e =
|
|
507
|
+
let e = tt(t[2], "()");
|
|
509
508
|
if (e === -2) return;
|
|
510
509
|
if (e > -1) {
|
|
511
510
|
let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
|
|
@@ -517,7 +516,7 @@ ${c}` : c;
|
|
|
517
516
|
let e = this.rules.other.pedanticHrefTitle.exec(n);
|
|
518
517
|
e && (n = e[1], r = e[3]);
|
|
519
518
|
} else r = t[3] ? t[3].slice(1, -1) : "";
|
|
520
|
-
return n = n.trim(), this.rules.other.startAngleBracket.test(n) && (n = this.options.pedantic && !this.rules.other.endAngleBracket.test(e) ? n.slice(1) : n.slice(1, -1)),
|
|
519
|
+
return n = n.trim(), this.rules.other.startAngleBracket.test(n) && (n = this.options.pedantic && !this.rules.other.endAngleBracket.test(e) ? n.slice(1) : n.slice(1, -1)), nt(t, {
|
|
521
520
|
href: n && n.replace(this.rules.inline.anyPunctuation, "$1"),
|
|
522
521
|
title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
|
|
523
522
|
}, t[0], this.lexer, this.rules);
|
|
@@ -535,7 +534,7 @@ ${c}` : c;
|
|
|
535
534
|
text: e
|
|
536
535
|
};
|
|
537
536
|
}
|
|
538
|
-
return
|
|
537
|
+
return nt(n, e, n[0], this.lexer, this.rules);
|
|
539
538
|
}
|
|
540
539
|
}
|
|
541
540
|
emStrong(e, t, n = "") {
|
|
@@ -655,29 +654,29 @@ ${c}` : c;
|
|
|
655
654
|
};
|
|
656
655
|
}
|
|
657
656
|
}
|
|
658
|
-
},
|
|
657
|
+
}, z = class e {
|
|
659
658
|
tokens;
|
|
660
659
|
options;
|
|
661
660
|
state;
|
|
662
661
|
tokenizer;
|
|
663
662
|
inlineQueue;
|
|
664
663
|
constructor(e) {
|
|
665
|
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e ||
|
|
664
|
+
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || v, this.options.tokenizer = this.options.tokenizer || new R(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
|
|
666
665
|
inLink: !1,
|
|
667
666
|
inRawBlock: !1,
|
|
668
667
|
top: !0
|
|
669
668
|
};
|
|
670
669
|
let t = {
|
|
671
|
-
other:
|
|
672
|
-
block:
|
|
673
|
-
inline:
|
|
670
|
+
other: x,
|
|
671
|
+
block: P.normal,
|
|
672
|
+
inline: F.normal
|
|
674
673
|
};
|
|
675
|
-
this.options.pedantic ? (t.block =
|
|
674
|
+
this.options.pedantic ? (t.block = P.pedantic, t.inline = F.pedantic) : this.options.gfm && (t.block = P.gfm, t.inline = this.options.breaks ? F.breaks : F.gfm), this.tokenizer.rules = t;
|
|
676
675
|
}
|
|
677
676
|
static get rules() {
|
|
678
677
|
return {
|
|
679
|
-
block:
|
|
680
|
-
inline:
|
|
678
|
+
block: P,
|
|
679
|
+
inline: F
|
|
681
680
|
};
|
|
682
681
|
}
|
|
683
682
|
static lex(t, n) {
|
|
@@ -687,7 +686,7 @@ ${c}` : c;
|
|
|
687
686
|
return new e(n).inlineTokens(t);
|
|
688
687
|
}
|
|
689
688
|
lex(e) {
|
|
690
|
-
e = e.replace(
|
|
689
|
+
e = e.replace(x.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
|
|
691
690
|
for (let e = 0; e < this.inlineQueue.length; e++) {
|
|
692
691
|
let t = this.inlineQueue[e];
|
|
693
692
|
this.inlineTokens(t.src, t.tokens);
|
|
@@ -695,7 +694,7 @@ ${c}` : c;
|
|
|
695
694
|
return this.inlineQueue = [], this.tokens;
|
|
696
695
|
}
|
|
697
696
|
blockTokens(e, t = [], n = !1) {
|
|
698
|
-
for (this.options.pedantic && (e = e.replace(
|
|
697
|
+
for (this.options.pedantic && (e = e.replace(x.tabCharGlobal, " ").replace(x.spaceLine, "")); e;) {
|
|
699
698
|
let r;
|
|
700
699
|
if (this.options.extensions?.block?.some((n) => (r = n.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), !0) : !1)) continue;
|
|
701
700
|
if (r = this.tokenizer.space(e)) {
|
|
@@ -865,18 +864,18 @@ ${c}` : c;
|
|
|
865
864
|
}
|
|
866
865
|
return t;
|
|
867
866
|
}
|
|
868
|
-
},
|
|
867
|
+
}, B = class {
|
|
869
868
|
options;
|
|
870
869
|
parser;
|
|
871
870
|
constructor(e) {
|
|
872
|
-
this.options = e ||
|
|
871
|
+
this.options = e || v;
|
|
873
872
|
}
|
|
874
873
|
space(e) {
|
|
875
874
|
return "";
|
|
876
875
|
}
|
|
877
876
|
code({ text: e, lang: t, escaped: n }) {
|
|
878
|
-
let r = (t || "").match(
|
|
879
|
-
return r ? "<pre><code class=\"language-" +
|
|
877
|
+
let r = (t || "").match(x.notSpaceStart)?.[0], i = e.replace(x.endingNewline, "") + "\n";
|
|
878
|
+
return r ? "<pre><code class=\"language-" + I(r) + "\">" + (n ? i : I(i, !0)) + "</code></pre>\n" : "<pre><code>" + (n ? i : I(i, !0)) + "</code></pre>\n";
|
|
880
879
|
}
|
|
881
880
|
blockquote({ tokens: e }) {
|
|
882
881
|
return `<blockquote>
|
|
@@ -906,7 +905,7 @@ ${this.parser.parse(e)}</blockquote>
|
|
|
906
905
|
let t = "";
|
|
907
906
|
if (e.task) {
|
|
908
907
|
let n = this.checkbox({ checked: !!e.checked });
|
|
909
|
-
e.loose ? e.tokens[0]?.type === "paragraph" ? (e.tokens[0].text = n + " " + e.tokens[0].text, e.tokens[0].tokens && e.tokens[0].tokens.length > 0 && e.tokens[0].tokens[0].type === "text" && (e.tokens[0].tokens[0].text = n + " " +
|
|
908
|
+
e.loose ? e.tokens[0]?.type === "paragraph" ? (e.tokens[0].text = n + " " + e.tokens[0].text, e.tokens[0].tokens && e.tokens[0].tokens.length > 0 && e.tokens[0].tokens[0].type === "text" && (e.tokens[0].tokens[0].text = n + " " + I(e.tokens[0].tokens[0].text), e.tokens[0].tokens[0].escaped = !0)) : e.tokens.unshift({
|
|
910
909
|
type: "text",
|
|
911
910
|
raw: n + " ",
|
|
912
911
|
text: n + " ",
|
|
@@ -953,7 +952,7 @@ ${e}</tr>
|
|
|
953
952
|
return `<em>${this.parser.parseInline(e)}</em>`;
|
|
954
953
|
}
|
|
955
954
|
codespan({ text: e }) {
|
|
956
|
-
return `<code>${
|
|
955
|
+
return `<code>${I(e, !0)}</code>`;
|
|
957
956
|
}
|
|
958
957
|
br(e) {
|
|
959
958
|
return "<br>";
|
|
@@ -962,24 +961,24 @@ ${e}</tr>
|
|
|
962
961
|
return `<del>${this.parser.parseInline(e)}</del>`;
|
|
963
962
|
}
|
|
964
963
|
link({ href: e, title: t, tokens: n }) {
|
|
965
|
-
let r = this.parser.parseInline(n), i =
|
|
964
|
+
let r = this.parser.parseInline(n), i = $e(e);
|
|
966
965
|
if (i === null) return r;
|
|
967
966
|
e = i;
|
|
968
967
|
let a = "<a href=\"" + e + "\"";
|
|
969
|
-
return t && (a += " title=\"" +
|
|
968
|
+
return t && (a += " title=\"" + I(t) + "\""), a += ">" + r + "</a>", a;
|
|
970
969
|
}
|
|
971
970
|
image({ href: e, title: t, text: n, tokens: r }) {
|
|
972
971
|
r && (n = this.parser.parseInline(r, this.parser.textRenderer));
|
|
973
|
-
let i =
|
|
974
|
-
if (i === null) return
|
|
972
|
+
let i = $e(e);
|
|
973
|
+
if (i === null) return I(n);
|
|
975
974
|
e = i;
|
|
976
975
|
let a = `<img src="${e}" alt="${n}"`;
|
|
977
|
-
return t && (a += ` title="${
|
|
976
|
+
return t && (a += ` title="${I(t)}"`), a += ">", a;
|
|
978
977
|
}
|
|
979
978
|
text(e) {
|
|
980
|
-
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text :
|
|
979
|
+
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : I(e.text);
|
|
981
980
|
}
|
|
982
|
-
},
|
|
981
|
+
}, V = class {
|
|
983
982
|
strong({ text: e }) {
|
|
984
983
|
return e;
|
|
985
984
|
}
|
|
@@ -1007,12 +1006,12 @@ ${e}</tr>
|
|
|
1007
1006
|
br() {
|
|
1008
1007
|
return "";
|
|
1009
1008
|
}
|
|
1010
|
-
},
|
|
1009
|
+
}, H = class e {
|
|
1011
1010
|
options;
|
|
1012
1011
|
renderer;
|
|
1013
1012
|
textRenderer;
|
|
1014
1013
|
constructor(e) {
|
|
1015
|
-
this.options = e ||
|
|
1014
|
+
this.options = e || v, this.options.renderer = this.options.renderer || new B(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new V();
|
|
1016
1015
|
}
|
|
1017
1016
|
static parse(t, n) {
|
|
1018
1017
|
return new e(n).parse(t);
|
|
@@ -1159,11 +1158,11 @@ ${e}</tr>
|
|
|
1159
1158
|
}
|
|
1160
1159
|
return n;
|
|
1161
1160
|
}
|
|
1162
|
-
},
|
|
1161
|
+
}, U = class {
|
|
1163
1162
|
options;
|
|
1164
1163
|
block;
|
|
1165
1164
|
constructor(e) {
|
|
1166
|
-
this.options = e ||
|
|
1165
|
+
this.options = e || v;
|
|
1167
1166
|
}
|
|
1168
1167
|
static passThroughHooks = /* @__PURE__ */ new Set([
|
|
1169
1168
|
"preprocess",
|
|
@@ -1180,22 +1179,22 @@ ${e}</tr>
|
|
|
1180
1179
|
return e;
|
|
1181
1180
|
}
|
|
1182
1181
|
provideLexer() {
|
|
1183
|
-
return this.block ?
|
|
1182
|
+
return this.block ? z.lex : z.lexInline;
|
|
1184
1183
|
}
|
|
1185
1184
|
provideParser() {
|
|
1186
|
-
return this.block ?
|
|
1185
|
+
return this.block ? H.parse : H.parseInline;
|
|
1187
1186
|
}
|
|
1188
|
-
},
|
|
1189
|
-
defaults =
|
|
1187
|
+
}, it = class {
|
|
1188
|
+
defaults = ce();
|
|
1190
1189
|
options = this.setOptions;
|
|
1191
1190
|
parse = this.parseMarkdown(!0);
|
|
1192
1191
|
parseInline = this.parseMarkdown(!1);
|
|
1193
|
-
Parser =
|
|
1194
|
-
Renderer =
|
|
1195
|
-
TextRenderer =
|
|
1196
|
-
Lexer =
|
|
1197
|
-
Tokenizer =
|
|
1198
|
-
Hooks =
|
|
1192
|
+
Parser = H;
|
|
1193
|
+
Renderer = B;
|
|
1194
|
+
TextRenderer = V;
|
|
1195
|
+
Lexer = z;
|
|
1196
|
+
Tokenizer = R;
|
|
1197
|
+
Hooks = U;
|
|
1199
1198
|
constructor(...e) {
|
|
1200
1199
|
this.use(...e);
|
|
1201
1200
|
}
|
|
@@ -1246,7 +1245,7 @@ ${e}</tr>
|
|
|
1246
1245
|
}
|
|
1247
1246
|
"childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
|
|
1248
1247
|
}), n.extensions = t), e.renderer) {
|
|
1249
|
-
let t = this.defaults.renderer || new
|
|
1248
|
+
let t = this.defaults.renderer || new B(this.defaults);
|
|
1250
1249
|
for (let n in e.renderer) {
|
|
1251
1250
|
if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
|
|
1252
1251
|
if (["options", "parser"].includes(n)) continue;
|
|
@@ -1259,7 +1258,7 @@ ${e}</tr>
|
|
|
1259
1258
|
n.renderer = t;
|
|
1260
1259
|
}
|
|
1261
1260
|
if (e.tokenizer) {
|
|
1262
|
-
let t = this.defaults.tokenizer || new
|
|
1261
|
+
let t = this.defaults.tokenizer || new R(this.defaults);
|
|
1263
1262
|
for (let n in e.tokenizer) {
|
|
1264
1263
|
if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
|
|
1265
1264
|
if ([
|
|
@@ -1276,12 +1275,12 @@ ${e}</tr>
|
|
|
1276
1275
|
n.tokenizer = t;
|
|
1277
1276
|
}
|
|
1278
1277
|
if (e.hooks) {
|
|
1279
|
-
let t = this.defaults.hooks || new
|
|
1278
|
+
let t = this.defaults.hooks || new U();
|
|
1280
1279
|
for (let n in e.hooks) {
|
|
1281
1280
|
if (!(n in t)) throw Error(`hook '${n}' does not exist`);
|
|
1282
1281
|
if (["options", "block"].includes(n)) continue;
|
|
1283
1282
|
let r = n, i = e.hooks[r], a = t[r];
|
|
1284
|
-
t[r] =
|
|
1283
|
+
t[r] = U.passThroughHooks.has(n) ? (e) => {
|
|
1285
1284
|
if (this.defaults.async) return Promise.resolve(i.call(t, e)).then((e) => a.call(t, e));
|
|
1286
1285
|
let n = i.call(t, e);
|
|
1287
1286
|
return a.call(t, n);
|
|
@@ -1312,10 +1311,10 @@ ${e}</tr>
|
|
|
1312
1311
|
}, this;
|
|
1313
1312
|
}
|
|
1314
1313
|
lexer(e, t) {
|
|
1315
|
-
return
|
|
1314
|
+
return z.lex(e, t ?? this.defaults);
|
|
1316
1315
|
}
|
|
1317
1316
|
parser(e, t) {
|
|
1318
|
-
return
|
|
1317
|
+
return H.parse(e, t ?? this.defaults);
|
|
1319
1318
|
}
|
|
1320
1319
|
parseMarkdown(e) {
|
|
1321
1320
|
return (t, n) => {
|
|
@@ -1327,7 +1326,7 @@ ${e}</tr>
|
|
|
1327
1326
|
if (t == null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
|
|
1328
1327
|
if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
|
|
1329
1328
|
i.hooks && (i.hooks.options = i, i.hooks.block = e);
|
|
1330
|
-
let o = i.hooks ? i.hooks.provideLexer() : e ?
|
|
1329
|
+
let o = i.hooks ? i.hooks.provideLexer() : e ? z.lex : z.lexInline, s = i.hooks ? i.hooks.provideParser() : e ? H.parse : H.parseInline;
|
|
1331
1330
|
if (i.async) return Promise.resolve(i.hooks ? i.hooks.preprocess(t) : t).then((e) => o(e, i)).then((e) => i.hooks ? i.hooks.processAllTokens(e) : e).then((e) => i.walkTokens ? Promise.all(this.walkTokens(e, i.walkTokens)).then(() => e) : e).then((e) => s(e, i)).then((e) => i.hooks ? i.hooks.postprocess(e) : e).catch(a);
|
|
1332
1331
|
try {
|
|
1333
1332
|
i.hooks && (t = i.hooks.preprocess(t));
|
|
@@ -1343,61 +1342,61 @@ ${e}</tr>
|
|
|
1343
1342
|
onError(e, t) {
|
|
1344
1343
|
return (n) => {
|
|
1345
1344
|
if (n.message += "\nPlease report this to https://github.com/markedjs/marked.", e) {
|
|
1346
|
-
let e = "<p>An error occurred:</p><pre>" +
|
|
1345
|
+
let e = "<p>An error occurred:</p><pre>" + I(n.message + "", !0) + "</pre>";
|
|
1347
1346
|
return t ? Promise.resolve(e) : e;
|
|
1348
1347
|
}
|
|
1349
1348
|
if (t) return Promise.reject(n);
|
|
1350
1349
|
throw n;
|
|
1351
1350
|
};
|
|
1352
1351
|
}
|
|
1353
|
-
},
|
|
1354
|
-
function
|
|
1355
|
-
return
|
|
1352
|
+
}, W = new it();
|
|
1353
|
+
function G(e, t) {
|
|
1354
|
+
return W.parse(e, t);
|
|
1356
1355
|
}
|
|
1357
|
-
|
|
1358
|
-
return
|
|
1359
|
-
},
|
|
1360
|
-
return
|
|
1361
|
-
},
|
|
1362
|
-
return
|
|
1363
|
-
},
|
|
1356
|
+
G.options = G.setOptions = function(e) {
|
|
1357
|
+
return W.setOptions(e), G.defaults = W.defaults, le(G.defaults), G;
|
|
1358
|
+
}, G.getDefaults = ce, G.defaults = v, G.use = function(...e) {
|
|
1359
|
+
return W.use(...e), G.defaults = W.defaults, le(G.defaults), G;
|
|
1360
|
+
}, G.walkTokens = function(e, t) {
|
|
1361
|
+
return W.walkTokens(e, t);
|
|
1362
|
+
}, G.parseInline = W.parseInline, G.Parser = H, G.parser = H.parse, G.Renderer = B, G.TextRenderer = V, G.Lexer = z, G.lexer = z.lex, G.Tokenizer = R, G.Hooks = U, G.parse = G, G.options, G.setOptions, G.use, G.walkTokens, G.parseInline, H.parse, z.lex;
|
|
1364
1363
|
//#endregion
|
|
1365
1364
|
//#region ../../node_modules/.bun/@codemirror+lsp-client@6.2.5/node_modules/@codemirror/lsp-client/dist/index.js
|
|
1366
|
-
var
|
|
1367
|
-
function
|
|
1368
|
-
let r =
|
|
1365
|
+
var K = null;
|
|
1366
|
+
function at(e, t, n) {
|
|
1367
|
+
let r = K;
|
|
1369
1368
|
try {
|
|
1370
|
-
return
|
|
1369
|
+
return K = {
|
|
1371
1370
|
view: e,
|
|
1372
1371
|
language: t
|
|
1373
1372
|
}, n();
|
|
1374
1373
|
} finally {
|
|
1375
|
-
|
|
1374
|
+
K = r;
|
|
1376
1375
|
}
|
|
1377
1376
|
}
|
|
1378
|
-
var
|
|
1379
|
-
if (!
|
|
1380
|
-
let
|
|
1381
|
-
if (!
|
|
1382
|
-
let
|
|
1383
|
-
|
|
1384
|
-
}
|
|
1385
|
-
if (!
|
|
1386
|
-
let
|
|
1387
|
-
|
|
1388
|
-
|
|
1377
|
+
var ot = /*@__PURE__*/ new it({ walkTokens(t) {
|
|
1378
|
+
if (!K || t.type != "code") return;
|
|
1379
|
+
let i = K.language && K.language(t.lang);
|
|
1380
|
+
if (!i) {
|
|
1381
|
+
let n = K.view.state.facet(e);
|
|
1382
|
+
n && n.name == t.lang && (i = n);
|
|
1383
|
+
}
|
|
1384
|
+
if (!i) return;
|
|
1385
|
+
let a = { style: (e) => r(K.view.state, e) }, o = "";
|
|
1386
|
+
n(t.text, i.parser.parse(t.text), a, (e, t) => {
|
|
1387
|
+
o += t ? `<span class="${t}">${q(e)}</span>` : q(e);
|
|
1389
1388
|
}, () => {
|
|
1390
|
-
|
|
1391
|
-
}), t.escaped = !0, t.text =
|
|
1389
|
+
o += "<br>";
|
|
1390
|
+
}), t.escaped = !0, t.text = o;
|
|
1392
1391
|
} });
|
|
1393
|
-
function
|
|
1392
|
+
function q(e) {
|
|
1394
1393
|
return e.replace(/[\n<&]/g, (e) => e == "\n" ? "<br>" : e == "<" ? "<" : "&");
|
|
1395
1394
|
}
|
|
1396
|
-
function
|
|
1395
|
+
function st(e, t) {
|
|
1397
1396
|
let n = t, r = e;
|
|
1398
|
-
return typeof r != "string" && (n = r.kind, r = r.value), n == "plaintext" ?
|
|
1397
|
+
return typeof r != "string" && (n = r.kind, r = r.value), n == "plaintext" ? q(r) : ot.parse(r, { async: !1 });
|
|
1399
1398
|
}
|
|
1400
|
-
function
|
|
1399
|
+
function ct(e, t) {
|
|
1401
1400
|
let n = e.lineAt(t);
|
|
1402
1401
|
return {
|
|
1403
1402
|
line: n.number - 1,
|
|
@@ -1413,32 +1412,32 @@ function lt(e, t) {
|
|
|
1413
1412
|
return t.character < 0 || t.character > n.length ? null : n.from + t.character;
|
|
1414
1413
|
}
|
|
1415
1414
|
var Y = class {
|
|
1416
|
-
constructor(
|
|
1417
|
-
if (this.view =
|
|
1418
|
-
let
|
|
1419
|
-
|
|
1415
|
+
constructor(t, { client: n, uri: r, languageID: i }) {
|
|
1416
|
+
if (this.view = t, this.client = n, this.uri = r, !i) {
|
|
1417
|
+
let n = t.state.facet(e);
|
|
1418
|
+
i = n ? n.name : "";
|
|
1420
1419
|
}
|
|
1421
|
-
|
|
1420
|
+
n.workspace.openFile(r, i, t), this.syncedDoc = t.state.doc, this.unsyncedChanges = d.empty(t.state.doc.length);
|
|
1422
1421
|
}
|
|
1423
1422
|
docToHTML(e, t = "plaintext") {
|
|
1424
|
-
let n =
|
|
1423
|
+
let n = at(this.view, this.client.config.highlightLanguage, () => st(e, t));
|
|
1425
1424
|
return this.client.config.sanitizeHTML ? this.client.config.sanitizeHTML(n) : n;
|
|
1426
1425
|
}
|
|
1427
1426
|
toPosition(e, t = this.view.state.doc) {
|
|
1428
|
-
return
|
|
1427
|
+
return ct(t, e);
|
|
1429
1428
|
}
|
|
1430
1429
|
fromPosition(e, t = this.view.state.doc) {
|
|
1431
1430
|
return J(t, e);
|
|
1432
1431
|
}
|
|
1433
1432
|
reportError(e, t) {
|
|
1434
|
-
|
|
1433
|
+
h(this.view, {
|
|
1435
1434
|
label: this.view.state.phrase(e) + ": " + (t.message || t),
|
|
1436
1435
|
class: "cm-lsp-message cm-lsp-message-error",
|
|
1437
1436
|
top: !0
|
|
1438
1437
|
});
|
|
1439
1438
|
}
|
|
1440
1439
|
clear() {
|
|
1441
|
-
this.syncedDoc = this.view.state.doc, this.unsyncedChanges =
|
|
1440
|
+
this.syncedDoc = this.view.state.doc, this.unsyncedChanges = d.empty(this.view.state.doc.length);
|
|
1442
1441
|
}
|
|
1443
1442
|
update(e) {
|
|
1444
1443
|
e.docChanged && (this.unsyncedChanges = this.unsyncedChanges.compose(e.changes));
|
|
@@ -1452,7 +1451,7 @@ var Y = class {
|
|
|
1452
1451
|
static create(e, t, n) {
|
|
1453
1452
|
return e.plugin(t, n);
|
|
1454
1453
|
}
|
|
1455
|
-
}, ut = /*@__PURE__*/
|
|
1454
|
+
}, ut = /*@__PURE__*/ g.fromClass(Y), dt = class {
|
|
1456
1455
|
constructor(e) {
|
|
1457
1456
|
this.client = e;
|
|
1458
1457
|
}
|
|
@@ -1512,7 +1511,7 @@ var Y = class {
|
|
|
1512
1511
|
let t = this.getFile(e);
|
|
1513
1512
|
t && (this.files = this.files.filter((e) => e != t), this.client.didClose(e));
|
|
1514
1513
|
}
|
|
1515
|
-
}, mt = /*@__PURE__*/
|
|
1514
|
+
}, mt = /*@__PURE__*/ te.baseTheme({
|
|
1516
1515
|
".cm-lsp-documentation": {
|
|
1517
1516
|
padding: "0 7px",
|
|
1518
1517
|
"& p, & pre": { margin: "2px 0" }
|
|
@@ -1617,7 +1616,7 @@ var Y = class {
|
|
|
1617
1616
|
}, _t = class {
|
|
1618
1617
|
constructor(e) {
|
|
1619
1618
|
this.client = e, this.mappings = /* @__PURE__ */ new Map(), this.startDocs = /* @__PURE__ */ new Map();
|
|
1620
|
-
for (let t of e.workspace.files) this.mappings.set(t.uri,
|
|
1619
|
+
for (let t of e.workspace.files) this.mappings.set(t.uri, d.empty(t.doc.length)), this.startDocs.set(t.uri, t.doc);
|
|
1621
1620
|
}
|
|
1622
1621
|
addChanges(e, t) {
|
|
1623
1622
|
let n = this.mappings.get(e);
|
|
@@ -1629,15 +1628,15 @@ var Y = class {
|
|
|
1629
1628
|
let n = this.client.workspace.getFile(e)?.getView(), r = n && Y.get(n);
|
|
1630
1629
|
return r ? t.composeDesc(r.unsyncedChanges) : t;
|
|
1631
1630
|
}
|
|
1632
|
-
mapPos(e, t,
|
|
1633
|
-
let
|
|
1634
|
-
return
|
|
1631
|
+
mapPos(e, t, n = -1, r = o.Simple) {
|
|
1632
|
+
let i = this.getMapping(e);
|
|
1633
|
+
return i ? i.mapPos(t, n, r) : t;
|
|
1635
1634
|
}
|
|
1636
|
-
mapPosition(e, t,
|
|
1637
|
-
let
|
|
1638
|
-
if (!
|
|
1639
|
-
let
|
|
1640
|
-
return s ? s.mapPos(
|
|
1635
|
+
mapPosition(e, t, n = -1, r = o.Simple) {
|
|
1636
|
+
let i = this.startDocs.get(e);
|
|
1637
|
+
if (!i) throw Error("Cannot map from a file that's not in the workspace");
|
|
1638
|
+
let a = J(i, t), s = this.getMapping(e);
|
|
1639
|
+
return s ? s.mapPos(a, n, r) : a;
|
|
1641
1640
|
}
|
|
1642
1641
|
destroy() {
|
|
1643
1642
|
this.client.activeMappings = this.client.activeMappings.filter((e) => e != this);
|
|
@@ -1650,7 +1649,7 @@ var Y = class {
|
|
|
1650
1649
|
if (t.type > 3) return;
|
|
1651
1650
|
let n;
|
|
1652
1651
|
for (let t of e.workspace.files) if (n = t.getView()) break;
|
|
1653
|
-
n &&
|
|
1652
|
+
n && h(n, {
|
|
1654
1653
|
label: t.message,
|
|
1655
1654
|
class: "cm-lsp-message cm-lsp-message-" + (t.type == 1 ? "error" : t.type == 2 ? "warning" : "info"),
|
|
1656
1655
|
top: !0
|
|
@@ -1812,8 +1811,8 @@ function bt(e, t, n, r) {
|
|
|
1812
1811
|
return n.iterChanges((e, n, r, a, o) => {
|
|
1813
1812
|
i.push({
|
|
1814
1813
|
range: {
|
|
1815
|
-
start:
|
|
1816
|
-
end:
|
|
1814
|
+
start: ct(t, e),
|
|
1815
|
+
end: ct(t, n)
|
|
1817
1816
|
},
|
|
1818
1817
|
text: o.toString()
|
|
1819
1818
|
});
|
|
@@ -1832,14 +1831,14 @@ function St(e) {
|
|
|
1832
1831
|
}
|
|
1833
1832
|
function Ct(e = {}) {
|
|
1834
1833
|
let t;
|
|
1835
|
-
if (e.override) t = [
|
|
1834
|
+
if (e.override) t = [oe({ override: [At] })];
|
|
1836
1835
|
else {
|
|
1837
1836
|
let e = [{ autocomplete: At }];
|
|
1838
|
-
t = [
|
|
1837
|
+
t = [oe(), l.languageData.of(() => e)];
|
|
1839
1838
|
}
|
|
1840
1839
|
return e.validFor && t.push(wt.of({ validFor: e.validFor })), t;
|
|
1841
1840
|
}
|
|
1842
|
-
var wt = /*@__PURE__*/
|
|
1841
|
+
var wt = /*@__PURE__*/ f.define({ combine: (e) => e.length ? e[0] : { validFor: null } });
|
|
1843
1842
|
function Tt(e, t, n, r) {
|
|
1844
1843
|
if (e.client.hasCapability("completionProvider") === !1) return Promise.resolve(null);
|
|
1845
1844
|
e.client.sync();
|
|
@@ -1882,7 +1881,7 @@ function Ot(e, t) {
|
|
|
1882
1881
|
}
|
|
1883
1882
|
function kt(e, t, n) {
|
|
1884
1883
|
return (r, i, a, o) => {
|
|
1885
|
-
let s =
|
|
1884
|
+
let s = ie(r.state, t, a, o), c = [];
|
|
1886
1885
|
for (let { from: t, to: r, text: i } of e) {
|
|
1887
1886
|
if (n) {
|
|
1888
1887
|
if (n.touchesRange(t, r)) continue;
|
|
@@ -1920,7 +1919,7 @@ var At = (e) => {
|
|
|
1920
1919
|
displayLabel: r.label,
|
|
1921
1920
|
type: r.kind && Nt[r.kind]
|
|
1922
1921
|
}, l = r.insertTextFormat ?? n.itemDefaults?.insertTextFormat;
|
|
1923
|
-
if (r.commitCharacters && r.commitCharacters != a && (c.commitCharacters = r.commitCharacters), r.detail && (c.detail = r.detail), r.sortText && (c.sortText = r.sortText), l == 2) c.apply = (e, t, n, r) =>
|
|
1922
|
+
if (r.commitCharacters && r.commitCharacters != a && (c.commitCharacters = r.commitCharacters), r.detail && (c.detail = r.detail), r.sortText && (c.sortText = r.sortText), l == 2) c.apply = (e, t, n, r) => ae(St(o))(e, t, n, r);
|
|
1924
1923
|
else if (r.additionalTextEdits) {
|
|
1925
1924
|
let t = [];
|
|
1926
1925
|
for (let n of r.additionalTextEdits) {
|
|
@@ -1990,7 +1989,7 @@ var Nt = {
|
|
|
1990
1989
|
25: "type"
|
|
1991
1990
|
};
|
|
1992
1991
|
function Pt(e = {}) {
|
|
1993
|
-
return
|
|
1992
|
+
return re(It, {
|
|
1994
1993
|
hideOn: (e) => e.docChanged,
|
|
1995
1994
|
hoverTime: e.hoverTime
|
|
1996
1995
|
});
|
|
@@ -2016,20 +2015,20 @@ function It(e, t) {
|
|
|
2016
2015
|
function Lt(e, t) {
|
|
2017
2016
|
return Array.isArray(t) ? t.map((t) => Rt(e, t)).join("<br>") : typeof t == "string" || typeof t == "object" && "language" in t ? Rt(e, t) : e.docToHTML(t);
|
|
2018
2017
|
}
|
|
2019
|
-
function Rt(t,
|
|
2020
|
-
if (typeof
|
|
2021
|
-
let { language:
|
|
2022
|
-
if (!
|
|
2023
|
-
let
|
|
2024
|
-
|
|
2025
|
-
}
|
|
2026
|
-
if (!
|
|
2027
|
-
let
|
|
2028
|
-
return
|
|
2029
|
-
|
|
2018
|
+
function Rt(t, i) {
|
|
2019
|
+
if (typeof i == "string") return t.docToHTML(i, "markdown");
|
|
2020
|
+
let { language: a, value: o } = i, s = t.client.config.highlightLanguage && t.client.config.highlightLanguage(a || "");
|
|
2021
|
+
if (!s) {
|
|
2022
|
+
let n = t.view.state.facet(e);
|
|
2023
|
+
n && (!a || n.name == a) && (s = n);
|
|
2024
|
+
}
|
|
2025
|
+
if (!s) return q(o);
|
|
2026
|
+
let c = "";
|
|
2027
|
+
return n(o, s.parser.parse(o), { style: (e) => r(t.view.state, e) }, (e, t) => {
|
|
2028
|
+
c += t ? `<span class="${t}">${q(e)}</span>` : q(e);
|
|
2030
2029
|
}, () => {
|
|
2031
|
-
|
|
2032
|
-
}),
|
|
2030
|
+
c += "<br>";
|
|
2031
|
+
}), c;
|
|
2033
2032
|
}
|
|
2034
2033
|
function zt(e, t) {
|
|
2035
2034
|
return e.client.request("textDocument/formatting", {
|
|
@@ -2040,21 +2039,21 @@ function zt(e, t) {
|
|
|
2040
2039
|
var Bt = [{
|
|
2041
2040
|
key: "Shift-Alt-f",
|
|
2042
2041
|
run: (e) => {
|
|
2043
|
-
let
|
|
2044
|
-
return
|
|
2045
|
-
tabSize:
|
|
2046
|
-
insertSpaces: e.state.facet(
|
|
2047
|
-
}).then((
|
|
2048
|
-
if (!
|
|
2049
|
-
let i =
|
|
2050
|
-
for (let e of
|
|
2051
|
-
let
|
|
2042
|
+
let n = Y.get(e);
|
|
2043
|
+
return n ? (n.client.sync(), n.client.withMapping((r) => zt(n, {
|
|
2044
|
+
tabSize: i(e.state),
|
|
2045
|
+
insertSpaces: e.state.facet(t).indexOf(" ") < 0
|
|
2046
|
+
}).then((t) => {
|
|
2047
|
+
if (!t) return;
|
|
2048
|
+
let i = r.getMapping(n.uri), a = [];
|
|
2049
|
+
for (let e of t) {
|
|
2050
|
+
let t = r.mapPosition(n.uri, e.range.start), o = r.mapPosition(n.uri, e.range.end);
|
|
2052
2051
|
if (i) {
|
|
2053
|
-
if (i.touchesRange(
|
|
2054
|
-
|
|
2052
|
+
if (i.touchesRange(t, o)) return;
|
|
2053
|
+
t = i.mapPos(t, 1), o = i.mapPos(o, -1);
|
|
2055
2054
|
}
|
|
2056
2055
|
a.push({
|
|
2057
|
-
from:
|
|
2056
|
+
from: t,
|
|
2058
2057
|
to: o,
|
|
2059
2058
|
insert: e.newText
|
|
2060
2059
|
});
|
|
@@ -2064,7 +2063,7 @@ var Bt = [{
|
|
|
2064
2063
|
userEvent: "format"
|
|
2065
2064
|
});
|
|
2066
2065
|
}, (e) => {
|
|
2067
|
-
|
|
2066
|
+
n.reportError("Formatting request failed", e);
|
|
2068
2067
|
})), !0) : !1;
|
|
2069
2068
|
},
|
|
2070
2069
|
preventDefault: !0
|
|
@@ -2079,12 +2078,12 @@ function Vt(e, t, n) {
|
|
|
2079
2078
|
var Ht = (e) => {
|
|
2080
2079
|
let t = e.state.wordAt(e.state.selection.main.head), n = Y.get(e);
|
|
2081
2080
|
if (!t || !n || n.client.hasCapability("renameProvider") === !1) return !1;
|
|
2082
|
-
let r = e.state.sliceDoc(t.from, t.to), i =
|
|
2081
|
+
let r = e.state.sliceDoc(t.from, t.to), i = ee(e, "cm-lsp-rename-panel");
|
|
2083
2082
|
if (i) {
|
|
2084
2083
|
let e = i.dom.querySelector("[name=name]");
|
|
2085
2084
|
e.value = r, e.select();
|
|
2086
2085
|
} else {
|
|
2087
|
-
let { close: t, result: n } =
|
|
2086
|
+
let { close: t, result: n } = h(e, {
|
|
2088
2087
|
label: e.state.phrase("New name"),
|
|
2089
2088
|
input: {
|
|
2090
2089
|
name: "name",
|
|
@@ -2131,7 +2130,7 @@ function Gt(e, t, n) {
|
|
|
2131
2130
|
textDocument: { uri: e.uri }
|
|
2132
2131
|
}));
|
|
2133
2132
|
}
|
|
2134
|
-
var X = /*@__PURE__*/
|
|
2133
|
+
var X = /*@__PURE__*/ g.fromClass(class {
|
|
2135
2134
|
constructor() {
|
|
2136
2135
|
this.activeRequest = null, this.delayedRequest = 0;
|
|
2137
2136
|
}
|
|
@@ -2196,7 +2195,7 @@ var Jt = class {
|
|
|
2196
2195
|
constructor(e, t, n) {
|
|
2197
2196
|
this.data = e, this.active = t, this.tooltip = n;
|
|
2198
2197
|
}
|
|
2199
|
-
}, Z = /*@__PURE__*/
|
|
2198
|
+
}, Z = /*@__PURE__*/ c.define({
|
|
2200
2199
|
create() {
|
|
2201
2200
|
return null;
|
|
2202
2201
|
},
|
|
@@ -2207,8 +2206,8 @@ var Jt = class {
|
|
|
2207
2206
|
pos: t.changes.mapPos(e.tooltip.pos)
|
|
2208
2207
|
}) : e;
|
|
2209
2208
|
},
|
|
2210
|
-
provide: (e) =>
|
|
2211
|
-
}), Q = /*@__PURE__*/
|
|
2209
|
+
provide: (e) => p.from(e, (e) => e && e.tooltip)
|
|
2210
|
+
}), Q = /*@__PURE__*/ u.define();
|
|
2212
2211
|
function Yt(e, t, n) {
|
|
2213
2212
|
return {
|
|
2214
2213
|
pos: n,
|
|
@@ -2250,7 +2249,7 @@ var Zt = [
|
|
|
2250
2249
|
key: "Mod-Shift-Space",
|
|
2251
2250
|
run: (e) => {
|
|
2252
2251
|
let t = e.plugin(X);
|
|
2253
|
-
t ||= (e.dispatch({ effects:
|
|
2252
|
+
t ||= (e.dispatch({ effects: u.appendConfig.of([Z, X]) }), e.plugin(X));
|
|
2254
2253
|
let n = e.state.field(Z);
|
|
2255
2254
|
if (!t || n === void 0) return !1;
|
|
2256
2255
|
let r = Y.get(e);
|
|
@@ -2288,7 +2287,7 @@ function Qt(e = {}) {
|
|
|
2288
2287
|
return [
|
|
2289
2288
|
Z,
|
|
2290
2289
|
X,
|
|
2291
|
-
e.keymap === !1 ? [] :
|
|
2290
|
+
e.keymap === !1 ? [] : s.high(_.of(Zt))
|
|
2292
2291
|
];
|
|
2293
2292
|
}
|
|
2294
2293
|
function $t(e, t) {
|
|
@@ -2343,7 +2342,7 @@ var rn = (e) => {
|
|
|
2343
2342
|
}, (e) => t.reportError("Finding references failed", e)).finally(() => {
|
|
2344
2343
|
r || n.destroy();
|
|
2345
2344
|
}), !0;
|
|
2346
|
-
}, an = (e) => e.state.field(on, !1) ? (e.dispatch({ effects: sn.of(null) }), !0) : !1, on = /*@__PURE__*/
|
|
2345
|
+
}, an = (e) => e.state.field(on, !1) ? (e.dispatch({ effects: sn.of(null) }), !0) : !1, on = /*@__PURE__*/ c.define({
|
|
2347
2346
|
create() {
|
|
2348
2347
|
return null;
|
|
2349
2348
|
},
|
|
@@ -2351,10 +2350,10 @@ var rn = (e) => {
|
|
|
2351
2350
|
for (let e of t.effects) if (e.is(sn)) return e.value;
|
|
2352
2351
|
return e;
|
|
2353
2352
|
},
|
|
2354
|
-
provide: (e) =>
|
|
2355
|
-
}), sn = /*@__PURE__*/
|
|
2353
|
+
provide: (e) => m.from(e)
|
|
2354
|
+
}), sn = /*@__PURE__*/ u.define();
|
|
2356
2355
|
function cn(e, t, n) {
|
|
2357
|
-
let r = ln(t, n), i = e.state.field(on, !1) === void 0 ?
|
|
2356
|
+
let r = ln(t, n), i = e.state.field(on, !1) === void 0 ? u.appendConfig.of(on.init(() => r)) : sn.of(r);
|
|
2358
2357
|
e.dispatch({ effects: i });
|
|
2359
2358
|
}
|
|
2360
2359
|
function ln(e, t) {
|
|
@@ -2443,7 +2442,7 @@ var dn = [{
|
|
|
2443
2442
|
function fn(e) {
|
|
2444
2443
|
return e == 1 ? "error" : e == 2 ? "warning" : e == 3 ? "info" : "hint";
|
|
2445
2444
|
}
|
|
2446
|
-
var pn = /*@__PURE__*/
|
|
2445
|
+
var pn = /*@__PURE__*/ g.fromClass(class {
|
|
2447
2446
|
constructor() {
|
|
2448
2447
|
this.pending = -1;
|
|
2449
2448
|
}
|
|
@@ -2465,7 +2464,7 @@ function mn() {
|
|
|
2465
2464
|
let n = e.workspace.getFile(t.uri);
|
|
2466
2465
|
if (!n || t.version != null && t.version != n.version) return !1;
|
|
2467
2466
|
let r = n.getView(), i = r && Y.get(r);
|
|
2468
|
-
return !r || !i ? !1 : (r.dispatch(
|
|
2467
|
+
return !r || !i ? !1 : (r.dispatch(se(r.state, t.diagnostics.map((e) => ({
|
|
2469
2468
|
from: i.unsyncedChanges.mapPos(i.fromPosition(e.range.start, i.syncedDoc)),
|
|
2470
2469
|
to: i.unsyncedChanges.mapPos(i.fromPosition(e.range.end, i.syncedDoc)),
|
|
2471
2470
|
severity: fn(e.severity ?? 1),
|
|
@@ -2479,7 +2478,7 @@ function hn() {
|
|
|
2479
2478
|
return [
|
|
2480
2479
|
Ct(),
|
|
2481
2480
|
Pt(),
|
|
2482
|
-
|
|
2481
|
+
_.of([
|
|
2483
2482
|
...Bt,
|
|
2484
2483
|
...Wt,
|
|
2485
2484
|
...tn,
|
|
@@ -2506,7 +2505,7 @@ function vn(e) {
|
|
|
2506
2505
|
}
|
|
2507
2506
|
//#endregion
|
|
2508
2507
|
//#region src/workbench/browser/typeScriptSession.ts
|
|
2509
|
-
var $, yn =
|
|
2508
|
+
var $, yn = a({ typescript: !0 }).language;
|
|
2510
2509
|
function bn(e) {
|
|
2511
2510
|
switch (e.toLowerCase()) {
|
|
2512
2511
|
case "javascript":
|
|
@@ -2526,7 +2525,7 @@ function xn(e) {
|
|
|
2526
2525
|
}
|
|
2527
2526
|
function Sn(e) {
|
|
2528
2527
|
let t = e.state.selection.main.head, n = e.state.wordAt(t) ?? (t == 0 ? null : e.state.wordAt(t - 1)), r = n == null ? t : Math.min(Math.max(t, n.from), n.to - 1);
|
|
2529
|
-
return
|
|
2528
|
+
return ne(e, r, 1, { until: (e) => e.docChanged || e.selection != null }), !0;
|
|
2530
2529
|
}
|
|
2531
2530
|
function Cn(e) {
|
|
2532
2531
|
let t = /* @__PURE__ */ new Set();
|
|
@@ -2547,7 +2546,7 @@ function Cn(e) {
|
|
|
2547
2546
|
}
|
|
2548
2547
|
async function wn() {
|
|
2549
2548
|
let e = new vn(), t = new yt({
|
|
2550
|
-
extensions: [...hn(),
|
|
2549
|
+
extensions: [...hn(), _.of([{
|
|
2551
2550
|
key: "Mod-k Mod-i",
|
|
2552
2551
|
preventDefault: !0,
|
|
2553
2552
|
run: Sn
|