novelaid-markdown 0.2.0
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/README.md +6 -0
- package/dist/blank-line-ClJSvRAu.js +129 -0
- package/dist/esm-Psdhd_27.js +1293 -0
- package/dist/index.d.ts +85 -0
- package/dist/index.js +195 -0
- package/dist/index.umd.cjs +30 -0
- package/dist/lib-DWIu06lZ.js +99 -0
- package/dist/react-markdown-BXmDW998.js +4220 -0
- package/dist/rehype-raw-_yRr8ewB.js +5224 -0
- package/dist/remark-gfm-Cfc5YeEq.js +1890 -0
- package/package.json +56 -0
|
@@ -0,0 +1,1890 @@
|
|
|
1
|
+
import { n as e, r as t, t as n } from "./lib-DWIu06lZ.js";
|
|
2
|
+
import { _ as r, a as i, b as a, c as o, f as s, g as c, h as l, i as u, m as d, n as f, o as p, p as m, r as h, t as g, v as ee, x as _ } from "./blank-line-ClJSvRAu.js";
|
|
3
|
+
//#region node_modules/ccount/index.js
|
|
4
|
+
function v(e, t) {
|
|
5
|
+
let n = String(e);
|
|
6
|
+
if (typeof t != "string") throw TypeError("Expected character");
|
|
7
|
+
let r = 0, i = n.indexOf(t);
|
|
8
|
+
for (; i !== -1;) r++, i = n.indexOf(t, i + t.length);
|
|
9
|
+
return r;
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region node_modules/mdast-util-find-and-replace/node_modules/escape-string-regexp/index.js
|
|
13
|
+
function y(e) {
|
|
14
|
+
if (typeof e != "string") throw TypeError("Expected a string");
|
|
15
|
+
return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region node_modules/mdast-util-find-and-replace/lib/index.js
|
|
19
|
+
function b(n, r, i) {
|
|
20
|
+
let a = t((i || {}).ignore || []), o = x(r), s = -1;
|
|
21
|
+
for (; ++s < o.length;) e(n, "text", c);
|
|
22
|
+
function c(e, t) {
|
|
23
|
+
let n = -1, r;
|
|
24
|
+
for (; ++n < t.length;) {
|
|
25
|
+
let e = t[n], i = r ? r.children : void 0;
|
|
26
|
+
if (a(e, i ? i.indexOf(e) : void 0, r)) return;
|
|
27
|
+
r = e;
|
|
28
|
+
}
|
|
29
|
+
if (r) return l(e, t);
|
|
30
|
+
}
|
|
31
|
+
function l(e, t) {
|
|
32
|
+
let n = t[t.length - 1], r = o[s][0], i = o[s][1], a = 0, c = n.children.indexOf(e), l = !1, u = [];
|
|
33
|
+
r.lastIndex = 0;
|
|
34
|
+
let d = r.exec(e.value);
|
|
35
|
+
for (; d;) {
|
|
36
|
+
let n = d.index, o = {
|
|
37
|
+
index: d.index,
|
|
38
|
+
input: d.input,
|
|
39
|
+
stack: [...t, e]
|
|
40
|
+
}, s = i(...d, o);
|
|
41
|
+
if (typeof s == "string" && (s = s.length > 0 ? {
|
|
42
|
+
type: "text",
|
|
43
|
+
value: s
|
|
44
|
+
} : void 0), s === !1 ? r.lastIndex = n + 1 : (a !== n && u.push({
|
|
45
|
+
type: "text",
|
|
46
|
+
value: e.value.slice(a, n)
|
|
47
|
+
}), Array.isArray(s) ? u.push(...s) : s && u.push(s), a = n + d[0].length, l = !0), !r.global) break;
|
|
48
|
+
d = r.exec(e.value);
|
|
49
|
+
}
|
|
50
|
+
return l ? (a < e.value.length && u.push({
|
|
51
|
+
type: "text",
|
|
52
|
+
value: e.value.slice(a)
|
|
53
|
+
}), n.children.splice(c, 1, ...u)) : u = [e], c + u.length;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function x(e) {
|
|
57
|
+
let t = [];
|
|
58
|
+
if (!Array.isArray(e)) throw TypeError("Expected find and replace tuple or list of tuples");
|
|
59
|
+
let n = !e[0] || Array.isArray(e[0]) ? e : [e], r = -1;
|
|
60
|
+
for (; ++r < n.length;) {
|
|
61
|
+
let e = n[r];
|
|
62
|
+
t.push([S(e[0]), C(e[1])]);
|
|
63
|
+
}
|
|
64
|
+
return t;
|
|
65
|
+
}
|
|
66
|
+
function S(e) {
|
|
67
|
+
return typeof e == "string" ? new RegExp(y(e), "g") : e;
|
|
68
|
+
}
|
|
69
|
+
function C(e) {
|
|
70
|
+
return typeof e == "function" ? e : function() {
|
|
71
|
+
return e;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region node_modules/mdast-util-gfm-autolink-literal/lib/index.js
|
|
76
|
+
var w = "phrasing", T = [
|
|
77
|
+
"autolink",
|
|
78
|
+
"link",
|
|
79
|
+
"image",
|
|
80
|
+
"label"
|
|
81
|
+
];
|
|
82
|
+
function E() {
|
|
83
|
+
return {
|
|
84
|
+
transforms: [oe],
|
|
85
|
+
enter: {
|
|
86
|
+
literalAutolink: te,
|
|
87
|
+
literalAutolinkEmail: O,
|
|
88
|
+
literalAutolinkHttp: O,
|
|
89
|
+
literalAutolinkWww: O
|
|
90
|
+
},
|
|
91
|
+
exit: {
|
|
92
|
+
literalAutolink: ae,
|
|
93
|
+
literalAutolinkEmail: ie,
|
|
94
|
+
literalAutolinkHttp: ne,
|
|
95
|
+
literalAutolinkWww: re
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function D() {
|
|
100
|
+
return { unsafe: [
|
|
101
|
+
{
|
|
102
|
+
character: "@",
|
|
103
|
+
before: "[+\\-.\\w]",
|
|
104
|
+
after: "[\\-.\\w]",
|
|
105
|
+
inConstruct: w,
|
|
106
|
+
notInConstruct: T
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
character: ".",
|
|
110
|
+
before: "[Ww]",
|
|
111
|
+
after: "[\\-.\\w]",
|
|
112
|
+
inConstruct: w,
|
|
113
|
+
notInConstruct: T
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
character: ":",
|
|
117
|
+
before: "[ps]",
|
|
118
|
+
after: "\\/",
|
|
119
|
+
inConstruct: w,
|
|
120
|
+
notInConstruct: T
|
|
121
|
+
}
|
|
122
|
+
] };
|
|
123
|
+
}
|
|
124
|
+
function te(e) {
|
|
125
|
+
this.enter({
|
|
126
|
+
type: "link",
|
|
127
|
+
title: null,
|
|
128
|
+
url: "",
|
|
129
|
+
children: []
|
|
130
|
+
}, e);
|
|
131
|
+
}
|
|
132
|
+
function O(e) {
|
|
133
|
+
this.config.enter.autolinkProtocol.call(this, e);
|
|
134
|
+
}
|
|
135
|
+
function ne(e) {
|
|
136
|
+
this.config.exit.autolinkProtocol.call(this, e);
|
|
137
|
+
}
|
|
138
|
+
function re(e) {
|
|
139
|
+
this.config.exit.data.call(this, e);
|
|
140
|
+
let t = this.stack[this.stack.length - 1];
|
|
141
|
+
t.type, t.url = "http://" + this.sliceSerialize(e);
|
|
142
|
+
}
|
|
143
|
+
function ie(e) {
|
|
144
|
+
this.config.exit.autolinkEmail.call(this, e);
|
|
145
|
+
}
|
|
146
|
+
function ae(e) {
|
|
147
|
+
this.exit(e);
|
|
148
|
+
}
|
|
149
|
+
function oe(e) {
|
|
150
|
+
b(e, [[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi, se], [/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu, ce]], { ignore: ["link", "linkReference"] });
|
|
151
|
+
}
|
|
152
|
+
function se(e, t, n, r, i) {
|
|
153
|
+
let a = "";
|
|
154
|
+
if (!de(i) || (/^w/i.test(t) && (n = t + n, t = "", a = "http://"), !le(n))) return !1;
|
|
155
|
+
let o = ue(n + r);
|
|
156
|
+
if (!o[0]) return !1;
|
|
157
|
+
let s = {
|
|
158
|
+
type: "link",
|
|
159
|
+
title: null,
|
|
160
|
+
url: a + t + o[0],
|
|
161
|
+
children: [{
|
|
162
|
+
type: "text",
|
|
163
|
+
value: t + o[0]
|
|
164
|
+
}]
|
|
165
|
+
};
|
|
166
|
+
return o[1] ? [s, {
|
|
167
|
+
type: "text",
|
|
168
|
+
value: o[1]
|
|
169
|
+
}] : s;
|
|
170
|
+
}
|
|
171
|
+
function ce(e, t, n, r) {
|
|
172
|
+
return !de(r, !0) || /[-\d_]$/.test(n) ? !1 : {
|
|
173
|
+
type: "link",
|
|
174
|
+
title: null,
|
|
175
|
+
url: "mailto:" + t + "@" + n,
|
|
176
|
+
children: [{
|
|
177
|
+
type: "text",
|
|
178
|
+
value: t + "@" + n
|
|
179
|
+
}]
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
function le(e) {
|
|
183
|
+
let t = e.split(".");
|
|
184
|
+
return !(t.length < 2 || t[t.length - 1] && (/_/.test(t[t.length - 1]) || !/[a-zA-Z\d]/.test(t[t.length - 1])) || t[t.length - 2] && (/_/.test(t[t.length - 2]) || !/[a-zA-Z\d]/.test(t[t.length - 2])));
|
|
185
|
+
}
|
|
186
|
+
function ue(e) {
|
|
187
|
+
let t = /[!"&'),.:;<>?\]}]+$/.exec(e);
|
|
188
|
+
if (!t) return [e, void 0];
|
|
189
|
+
e = e.slice(0, t.index);
|
|
190
|
+
let n = t[0], r = n.indexOf(")"), i = v(e, "("), a = v(e, ")");
|
|
191
|
+
for (; r !== -1 && i > a;) e += n.slice(0, r + 1), n = n.slice(r + 1), r = n.indexOf(")"), a++;
|
|
192
|
+
return [e, n];
|
|
193
|
+
}
|
|
194
|
+
function de(e, t) {
|
|
195
|
+
let n = e.input.charCodeAt(e.index - 1);
|
|
196
|
+
return (e.index === 0 || c(n) || l(n)) && (!t || n !== 47);
|
|
197
|
+
}
|
|
198
|
+
//#endregion
|
|
199
|
+
//#region node_modules/mdast-util-gfm-footnote/lib/index.js
|
|
200
|
+
k.peek = be;
|
|
201
|
+
function fe() {
|
|
202
|
+
this.buffer();
|
|
203
|
+
}
|
|
204
|
+
function pe(e) {
|
|
205
|
+
this.enter({
|
|
206
|
+
type: "footnoteReference",
|
|
207
|
+
identifier: "",
|
|
208
|
+
label: ""
|
|
209
|
+
}, e);
|
|
210
|
+
}
|
|
211
|
+
function me() {
|
|
212
|
+
this.buffer();
|
|
213
|
+
}
|
|
214
|
+
function he(e) {
|
|
215
|
+
this.enter({
|
|
216
|
+
type: "footnoteDefinition",
|
|
217
|
+
identifier: "",
|
|
218
|
+
label: "",
|
|
219
|
+
children: []
|
|
220
|
+
}, e);
|
|
221
|
+
}
|
|
222
|
+
function ge(e) {
|
|
223
|
+
let t = this.resume(), n = this.stack[this.stack.length - 1];
|
|
224
|
+
n.type, n.identifier = r(this.sliceSerialize(e)).toLowerCase(), n.label = t;
|
|
225
|
+
}
|
|
226
|
+
function _e(e) {
|
|
227
|
+
this.exit(e);
|
|
228
|
+
}
|
|
229
|
+
function ve(e) {
|
|
230
|
+
let t = this.resume(), n = this.stack[this.stack.length - 1];
|
|
231
|
+
n.type, n.identifier = r(this.sliceSerialize(e)).toLowerCase(), n.label = t;
|
|
232
|
+
}
|
|
233
|
+
function ye(e) {
|
|
234
|
+
this.exit(e);
|
|
235
|
+
}
|
|
236
|
+
function be() {
|
|
237
|
+
return "[";
|
|
238
|
+
}
|
|
239
|
+
function k(e, t, n, r) {
|
|
240
|
+
let i = n.createTracker(r), a = i.move("[^"), o = n.enter("footnoteReference"), s = n.enter("reference");
|
|
241
|
+
return a += i.move(n.safe(n.associationId(e), {
|
|
242
|
+
after: "]",
|
|
243
|
+
before: a
|
|
244
|
+
})), s(), o(), a += i.move("]"), a;
|
|
245
|
+
}
|
|
246
|
+
function xe() {
|
|
247
|
+
return {
|
|
248
|
+
enter: {
|
|
249
|
+
gfmFootnoteCallString: fe,
|
|
250
|
+
gfmFootnoteCall: pe,
|
|
251
|
+
gfmFootnoteDefinitionLabelString: me,
|
|
252
|
+
gfmFootnoteDefinition: he
|
|
253
|
+
},
|
|
254
|
+
exit: {
|
|
255
|
+
gfmFootnoteCallString: ge,
|
|
256
|
+
gfmFootnoteCall: _e,
|
|
257
|
+
gfmFootnoteDefinitionLabelString: ve,
|
|
258
|
+
gfmFootnoteDefinition: ye
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
function Se(e) {
|
|
263
|
+
let t = !1;
|
|
264
|
+
return e && e.firstLineBlank && (t = !0), {
|
|
265
|
+
handlers: {
|
|
266
|
+
footnoteDefinition: n,
|
|
267
|
+
footnoteReference: k
|
|
268
|
+
},
|
|
269
|
+
unsafe: [{
|
|
270
|
+
character: "[",
|
|
271
|
+
inConstruct: [
|
|
272
|
+
"label",
|
|
273
|
+
"phrasing",
|
|
274
|
+
"reference"
|
|
275
|
+
]
|
|
276
|
+
}]
|
|
277
|
+
};
|
|
278
|
+
function n(e, n, r, i) {
|
|
279
|
+
let a = r.createTracker(i), o = a.move("[^"), s = r.enter("footnoteDefinition"), c = r.enter("label");
|
|
280
|
+
return o += a.move(r.safe(r.associationId(e), {
|
|
281
|
+
before: o,
|
|
282
|
+
after: "]"
|
|
283
|
+
})), c(), o += a.move("]:"), e.children && e.children.length > 0 && (a.shift(4), o += a.move((t ? "\n" : " ") + r.indentLines(r.containerFlow(e, a.current()), t ? A : Ce))), s(), o;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
function Ce(e, t, n) {
|
|
287
|
+
return t === 0 ? e : A(e, t, n);
|
|
288
|
+
}
|
|
289
|
+
function A(e, t, n) {
|
|
290
|
+
return (n ? "" : " ") + e;
|
|
291
|
+
}
|
|
292
|
+
//#endregion
|
|
293
|
+
//#region node_modules/mdast-util-gfm-strikethrough/lib/index.js
|
|
294
|
+
var we = [
|
|
295
|
+
"autolink",
|
|
296
|
+
"destinationLiteral",
|
|
297
|
+
"destinationRaw",
|
|
298
|
+
"reference",
|
|
299
|
+
"titleQuote",
|
|
300
|
+
"titleApostrophe"
|
|
301
|
+
];
|
|
302
|
+
ke.peek = Ae;
|
|
303
|
+
function Te() {
|
|
304
|
+
return {
|
|
305
|
+
canContainEols: ["delete"],
|
|
306
|
+
enter: { strikethrough: De },
|
|
307
|
+
exit: { strikethrough: Oe }
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
function Ee() {
|
|
311
|
+
return {
|
|
312
|
+
unsafe: [{
|
|
313
|
+
character: "~",
|
|
314
|
+
inConstruct: "phrasing",
|
|
315
|
+
notInConstruct: we
|
|
316
|
+
}],
|
|
317
|
+
handlers: { delete: ke }
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
function De(e) {
|
|
321
|
+
this.enter({
|
|
322
|
+
type: "delete",
|
|
323
|
+
children: []
|
|
324
|
+
}, e);
|
|
325
|
+
}
|
|
326
|
+
function Oe(e) {
|
|
327
|
+
this.exit(e);
|
|
328
|
+
}
|
|
329
|
+
function ke(e, t, n, r) {
|
|
330
|
+
let i = n.createTracker(r), a = n.enter("strikethrough"), o = i.move("~~");
|
|
331
|
+
return o += n.containerPhrasing(e, {
|
|
332
|
+
...i.current(),
|
|
333
|
+
before: o,
|
|
334
|
+
after: "~"
|
|
335
|
+
}), o += i.move("~~"), a(), o;
|
|
336
|
+
}
|
|
337
|
+
function Ae() {
|
|
338
|
+
return "~";
|
|
339
|
+
}
|
|
340
|
+
//#endregion
|
|
341
|
+
//#region node_modules/markdown-table/index.js
|
|
342
|
+
function je(e) {
|
|
343
|
+
return e.length;
|
|
344
|
+
}
|
|
345
|
+
function Me(e, t) {
|
|
346
|
+
let n = t || {}, r = (n.align || []).concat(), i = n.stringLength || je, a = [], o = [], s = [], c = [], l = 0, u = -1;
|
|
347
|
+
for (; ++u < e.length;) {
|
|
348
|
+
let t = [], r = [], a = -1;
|
|
349
|
+
for (e[u].length > l && (l = e[u].length); ++a < e[u].length;) {
|
|
350
|
+
let o = Ne(e[u][a]);
|
|
351
|
+
if (n.alignDelimiters !== !1) {
|
|
352
|
+
let e = i(o);
|
|
353
|
+
r[a] = e, (c[a] === void 0 || e > c[a]) && (c[a] = e);
|
|
354
|
+
}
|
|
355
|
+
t.push(o);
|
|
356
|
+
}
|
|
357
|
+
o[u] = t, s[u] = r;
|
|
358
|
+
}
|
|
359
|
+
let d = -1;
|
|
360
|
+
if (typeof r == "object" && "length" in r) for (; ++d < l;) a[d] = Pe(r[d]);
|
|
361
|
+
else {
|
|
362
|
+
let e = Pe(r);
|
|
363
|
+
for (; ++d < l;) a[d] = e;
|
|
364
|
+
}
|
|
365
|
+
d = -1;
|
|
366
|
+
let f = [], p = [];
|
|
367
|
+
for (; ++d < l;) {
|
|
368
|
+
let e = a[d], t = "", r = "";
|
|
369
|
+
e === 99 ? (t = ":", r = ":") : e === 108 ? t = ":" : e === 114 && (r = ":");
|
|
370
|
+
let i = n.alignDelimiters === !1 ? 1 : Math.max(1, c[d] - t.length - r.length), o = t + "-".repeat(i) + r;
|
|
371
|
+
n.alignDelimiters !== !1 && (i = t.length + i + r.length, i > c[d] && (c[d] = i), p[d] = i), f[d] = o;
|
|
372
|
+
}
|
|
373
|
+
o.splice(1, 0, f), s.splice(1, 0, p), u = -1;
|
|
374
|
+
let m = [];
|
|
375
|
+
for (; ++u < o.length;) {
|
|
376
|
+
let e = o[u], t = s[u];
|
|
377
|
+
d = -1;
|
|
378
|
+
let r = [];
|
|
379
|
+
for (; ++d < l;) {
|
|
380
|
+
let i = e[d] || "", o = "", s = "";
|
|
381
|
+
if (n.alignDelimiters !== !1) {
|
|
382
|
+
let e = c[d] - (t[d] || 0), n = a[d];
|
|
383
|
+
n === 114 ? o = " ".repeat(e) : n === 99 ? e % 2 ? (o = " ".repeat(e / 2 + .5), s = " ".repeat(e / 2 - .5)) : (o = " ".repeat(e / 2), s = o) : s = " ".repeat(e);
|
|
384
|
+
}
|
|
385
|
+
n.delimiterStart !== !1 && !d && r.push("|"), n.padding !== !1 && !(n.alignDelimiters === !1 && i === "") && (n.delimiterStart !== !1 || d) && r.push(" "), n.alignDelimiters !== !1 && r.push(o), r.push(i), n.alignDelimiters !== !1 && r.push(s), n.padding !== !1 && r.push(" "), (n.delimiterEnd !== !1 || d !== l - 1) && r.push("|");
|
|
386
|
+
}
|
|
387
|
+
m.push(n.delimiterEnd === !1 ? r.join("").replace(/ +$/, "") : r.join(""));
|
|
388
|
+
}
|
|
389
|
+
return m.join("\n");
|
|
390
|
+
}
|
|
391
|
+
function Ne(e) {
|
|
392
|
+
return e == null ? "" : String(e);
|
|
393
|
+
}
|
|
394
|
+
function Pe(e) {
|
|
395
|
+
let t = typeof e == "string" ? e.codePointAt(0) : 0;
|
|
396
|
+
return t === 67 || t === 99 ? 99 : t === 76 || t === 108 ? 108 : t === 82 || t === 114 ? 114 : 0;
|
|
397
|
+
}
|
|
398
|
+
//#endregion
|
|
399
|
+
//#region node_modules/mdast-util-to-markdown/lib/handle/blockquote.js
|
|
400
|
+
function Fe(e, t, n, r) {
|
|
401
|
+
let i = n.enter("blockquote"), a = n.createTracker(r);
|
|
402
|
+
a.move("> "), a.shift(2);
|
|
403
|
+
let o = n.indentLines(n.containerFlow(e, a.current()), Ie);
|
|
404
|
+
return i(), o;
|
|
405
|
+
}
|
|
406
|
+
function Ie(e, t, n) {
|
|
407
|
+
return ">" + (n ? "" : " ") + e;
|
|
408
|
+
}
|
|
409
|
+
//#endregion
|
|
410
|
+
//#region node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.js
|
|
411
|
+
function Le(e, t) {
|
|
412
|
+
return Re(e, t.inConstruct, !0) && !Re(e, t.notInConstruct, !1);
|
|
413
|
+
}
|
|
414
|
+
function Re(e, t, n) {
|
|
415
|
+
if (typeof t == "string" && (t = [t]), !t || t.length === 0) return n;
|
|
416
|
+
let r = -1;
|
|
417
|
+
for (; ++r < t.length;) if (e.includes(t[r])) return !0;
|
|
418
|
+
return !1;
|
|
419
|
+
}
|
|
420
|
+
//#endregion
|
|
421
|
+
//#region node_modules/mdast-util-to-markdown/lib/handle/break.js
|
|
422
|
+
function ze(e, t, n, r) {
|
|
423
|
+
let i = -1;
|
|
424
|
+
for (; ++i < n.unsafe.length;) if (n.unsafe[i].character === "\n" && Le(n.stack, n.unsafe[i])) return /[ \t]/.test(r.before) ? "" : " ";
|
|
425
|
+
return "\\\n";
|
|
426
|
+
}
|
|
427
|
+
//#endregion
|
|
428
|
+
//#region node_modules/longest-streak/index.js
|
|
429
|
+
function Be(e, t) {
|
|
430
|
+
let n = String(e), r = n.indexOf(t), i = r, a = 0, o = 0;
|
|
431
|
+
if (typeof t != "string") throw TypeError("Expected substring");
|
|
432
|
+
for (; r !== -1;) r === i ? ++a > o && (o = a) : a = 1, i = r + t.length, r = n.indexOf(t, i);
|
|
433
|
+
return o;
|
|
434
|
+
}
|
|
435
|
+
//#endregion
|
|
436
|
+
//#region node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.js
|
|
437
|
+
function Ve(e, t) {
|
|
438
|
+
return !!(t.options.fences === !1 && e.value && !e.lang && /[^ \r\n]/.test(e.value) && !/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value));
|
|
439
|
+
}
|
|
440
|
+
//#endregion
|
|
441
|
+
//#region node_modules/mdast-util-to-markdown/lib/util/check-fence.js
|
|
442
|
+
function He(e) {
|
|
443
|
+
let t = e.options.fence || "`";
|
|
444
|
+
if (t !== "`" && t !== "~") throw Error("Cannot serialize code with `" + t + "` for `options.fence`, expected `` ` `` or `~`");
|
|
445
|
+
return t;
|
|
446
|
+
}
|
|
447
|
+
//#endregion
|
|
448
|
+
//#region node_modules/mdast-util-to-markdown/lib/handle/code.js
|
|
449
|
+
function Ue(e, t, n, r) {
|
|
450
|
+
let i = He(n), a = e.value || "", o = i === "`" ? "GraveAccent" : "Tilde";
|
|
451
|
+
if (Ve(e, n)) {
|
|
452
|
+
let e = n.enter("codeIndented"), t = n.indentLines(a, We);
|
|
453
|
+
return e(), t;
|
|
454
|
+
}
|
|
455
|
+
let s = n.createTracker(r), c = i.repeat(Math.max(Be(a, i) + 1, 3)), l = n.enter("codeFenced"), u = s.move(c);
|
|
456
|
+
if (e.lang) {
|
|
457
|
+
let t = n.enter(`codeFencedLang${o}`);
|
|
458
|
+
u += s.move(n.safe(e.lang, {
|
|
459
|
+
before: u,
|
|
460
|
+
after: " ",
|
|
461
|
+
encode: ["`"],
|
|
462
|
+
...s.current()
|
|
463
|
+
})), t();
|
|
464
|
+
}
|
|
465
|
+
if (e.lang && e.meta) {
|
|
466
|
+
let t = n.enter(`codeFencedMeta${o}`);
|
|
467
|
+
u += s.move(" "), u += s.move(n.safe(e.meta, {
|
|
468
|
+
before: u,
|
|
469
|
+
after: "\n",
|
|
470
|
+
encode: ["`"],
|
|
471
|
+
...s.current()
|
|
472
|
+
})), t();
|
|
473
|
+
}
|
|
474
|
+
return u += s.move("\n"), a && (u += s.move(a + "\n")), u += s.move(c), l(), u;
|
|
475
|
+
}
|
|
476
|
+
function We(e, t, n) {
|
|
477
|
+
return (n ? "" : " ") + e;
|
|
478
|
+
}
|
|
479
|
+
//#endregion
|
|
480
|
+
//#region node_modules/mdast-util-to-markdown/lib/util/check-quote.js
|
|
481
|
+
function j(e) {
|
|
482
|
+
let t = e.options.quote || "\"";
|
|
483
|
+
if (t !== "\"" && t !== "'") throw Error("Cannot serialize title with `" + t + "` for `options.quote`, expected `\"`, or `'`");
|
|
484
|
+
return t;
|
|
485
|
+
}
|
|
486
|
+
//#endregion
|
|
487
|
+
//#region node_modules/mdast-util-to-markdown/lib/handle/definition.js
|
|
488
|
+
function Ge(e, t, n, r) {
|
|
489
|
+
let i = j(n), a = i === "\"" ? "Quote" : "Apostrophe", o = n.enter("definition"), s = n.enter("label"), c = n.createTracker(r), l = c.move("[");
|
|
490
|
+
return l += c.move(n.safe(n.associationId(e), {
|
|
491
|
+
before: l,
|
|
492
|
+
after: "]",
|
|
493
|
+
...c.current()
|
|
494
|
+
})), l += c.move("]: "), s(), !e.url || /[\0- \u007F]/.test(e.url) ? (s = n.enter("destinationLiteral"), l += c.move("<"), l += c.move(n.safe(e.url, {
|
|
495
|
+
before: l,
|
|
496
|
+
after: ">",
|
|
497
|
+
...c.current()
|
|
498
|
+
})), l += c.move(">")) : (s = n.enter("destinationRaw"), l += c.move(n.safe(e.url, {
|
|
499
|
+
before: l,
|
|
500
|
+
after: e.title ? " " : "\n",
|
|
501
|
+
...c.current()
|
|
502
|
+
}))), s(), e.title && (s = n.enter(`title${a}`), l += c.move(" " + i), l += c.move(n.safe(e.title, {
|
|
503
|
+
before: l,
|
|
504
|
+
after: i,
|
|
505
|
+
...c.current()
|
|
506
|
+
})), l += c.move(i), s()), o(), l;
|
|
507
|
+
}
|
|
508
|
+
//#endregion
|
|
509
|
+
//#region node_modules/mdast-util-to-markdown/lib/util/check-emphasis.js
|
|
510
|
+
function Ke(e) {
|
|
511
|
+
let t = e.options.emphasis || "*";
|
|
512
|
+
if (t !== "*" && t !== "_") throw Error("Cannot serialize emphasis with `" + t + "` for `options.emphasis`, expected `*`, or `_`");
|
|
513
|
+
return t;
|
|
514
|
+
}
|
|
515
|
+
//#endregion
|
|
516
|
+
//#region node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.js
|
|
517
|
+
function M(e) {
|
|
518
|
+
return "&#x" + e.toString(16).toUpperCase() + ";";
|
|
519
|
+
}
|
|
520
|
+
//#endregion
|
|
521
|
+
//#region node_modules/mdast-util-to-markdown/lib/util/encode-info.js
|
|
522
|
+
function N(e, t, n) {
|
|
523
|
+
let r = h(e), i = h(t);
|
|
524
|
+
return r === void 0 ? i === void 0 ? n === "_" ? {
|
|
525
|
+
inside: !0,
|
|
526
|
+
outside: !0
|
|
527
|
+
} : {
|
|
528
|
+
inside: !1,
|
|
529
|
+
outside: !1
|
|
530
|
+
} : i === 1 ? {
|
|
531
|
+
inside: !0,
|
|
532
|
+
outside: !0
|
|
533
|
+
} : {
|
|
534
|
+
inside: !1,
|
|
535
|
+
outside: !0
|
|
536
|
+
} : r === 1 ? i === void 0 ? {
|
|
537
|
+
inside: !1,
|
|
538
|
+
outside: !1
|
|
539
|
+
} : i === 1 ? {
|
|
540
|
+
inside: !0,
|
|
541
|
+
outside: !0
|
|
542
|
+
} : {
|
|
543
|
+
inside: !1,
|
|
544
|
+
outside: !1
|
|
545
|
+
} : i === void 0 ? {
|
|
546
|
+
inside: !1,
|
|
547
|
+
outside: !1
|
|
548
|
+
} : i === 1 ? {
|
|
549
|
+
inside: !0,
|
|
550
|
+
outside: !1
|
|
551
|
+
} : {
|
|
552
|
+
inside: !1,
|
|
553
|
+
outside: !1
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
//#endregion
|
|
557
|
+
//#region node_modules/mdast-util-to-markdown/lib/handle/emphasis.js
|
|
558
|
+
qe.peek = Je;
|
|
559
|
+
function qe(e, t, n, r) {
|
|
560
|
+
let i = Ke(n), a = n.enter("emphasis"), o = n.createTracker(r), s = o.move(i), c = o.move(n.containerPhrasing(e, {
|
|
561
|
+
after: i,
|
|
562
|
+
before: s,
|
|
563
|
+
...o.current()
|
|
564
|
+
})), l = c.charCodeAt(0), u = N(r.before.charCodeAt(r.before.length - 1), l, i);
|
|
565
|
+
u.inside && (c = M(l) + c.slice(1));
|
|
566
|
+
let d = c.charCodeAt(c.length - 1), f = N(r.after.charCodeAt(0), d, i);
|
|
567
|
+
f.inside && (c = c.slice(0, -1) + M(d));
|
|
568
|
+
let p = o.move(i);
|
|
569
|
+
return a(), n.attentionEncodeSurroundingInfo = {
|
|
570
|
+
after: f.outside,
|
|
571
|
+
before: u.outside
|
|
572
|
+
}, s + c + p;
|
|
573
|
+
}
|
|
574
|
+
function Je(e, t, n) {
|
|
575
|
+
return n.options.emphasis || "*";
|
|
576
|
+
}
|
|
577
|
+
//#endregion
|
|
578
|
+
//#region node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js
|
|
579
|
+
function Ye(e, t) {
|
|
580
|
+
let r = !1;
|
|
581
|
+
return n(e, function(e) {
|
|
582
|
+
if ("value" in e && /\r?\n|\r/.test(e.value) || e.type === "break") return r = !0, !1;
|
|
583
|
+
}), !!((!e.depth || e.depth < 3) && _(e) && (t.options.setext || r));
|
|
584
|
+
}
|
|
585
|
+
//#endregion
|
|
586
|
+
//#region node_modules/mdast-util-to-markdown/lib/handle/heading.js
|
|
587
|
+
function Xe(e, t, n, r) {
|
|
588
|
+
let i = Math.max(Math.min(6, e.depth || 1), 1), a = n.createTracker(r);
|
|
589
|
+
if (Ye(e, n)) {
|
|
590
|
+
let t = n.enter("headingSetext"), r = n.enter("phrasing"), o = n.containerPhrasing(e, {
|
|
591
|
+
...a.current(),
|
|
592
|
+
before: "\n",
|
|
593
|
+
after: "\n"
|
|
594
|
+
});
|
|
595
|
+
return r(), t(), o + "\n" + (i === 1 ? "=" : "-").repeat(o.length - (Math.max(o.lastIndexOf("\r"), o.lastIndexOf("\n")) + 1));
|
|
596
|
+
}
|
|
597
|
+
let o = "#".repeat(i), s = n.enter("headingAtx"), c = n.enter("phrasing");
|
|
598
|
+
a.move(o + " ");
|
|
599
|
+
let l = n.containerPhrasing(e, {
|
|
600
|
+
before: "# ",
|
|
601
|
+
after: "\n",
|
|
602
|
+
...a.current()
|
|
603
|
+
});
|
|
604
|
+
return /^[\t ]/.test(l) && (l = M(l.charCodeAt(0)) + l.slice(1)), l = l ? o + " " + l : o, n.options.closeAtx && (l += " " + o), c(), s(), l;
|
|
605
|
+
}
|
|
606
|
+
//#endregion
|
|
607
|
+
//#region node_modules/mdast-util-to-markdown/lib/handle/html.js
|
|
608
|
+
Ze.peek = Qe;
|
|
609
|
+
function Ze(e) {
|
|
610
|
+
return e.value || "";
|
|
611
|
+
}
|
|
612
|
+
function Qe() {
|
|
613
|
+
return "<";
|
|
614
|
+
}
|
|
615
|
+
//#endregion
|
|
616
|
+
//#region node_modules/mdast-util-to-markdown/lib/handle/image.js
|
|
617
|
+
P.peek = $e;
|
|
618
|
+
function P(e, t, n, r) {
|
|
619
|
+
let i = j(n), a = i === "\"" ? "Quote" : "Apostrophe", o = n.enter("image"), s = n.enter("label"), c = n.createTracker(r), l = c.move("![");
|
|
620
|
+
return l += c.move(n.safe(e.alt, {
|
|
621
|
+
before: l,
|
|
622
|
+
after: "]",
|
|
623
|
+
...c.current()
|
|
624
|
+
})), l += c.move("]("), s(), !e.url && e.title || /[\0- \u007F]/.test(e.url) ? (s = n.enter("destinationLiteral"), l += c.move("<"), l += c.move(n.safe(e.url, {
|
|
625
|
+
before: l,
|
|
626
|
+
after: ">",
|
|
627
|
+
...c.current()
|
|
628
|
+
})), l += c.move(">")) : (s = n.enter("destinationRaw"), l += c.move(n.safe(e.url, {
|
|
629
|
+
before: l,
|
|
630
|
+
after: e.title ? " " : ")",
|
|
631
|
+
...c.current()
|
|
632
|
+
}))), s(), e.title && (s = n.enter(`title${a}`), l += c.move(" " + i), l += c.move(n.safe(e.title, {
|
|
633
|
+
before: l,
|
|
634
|
+
after: i,
|
|
635
|
+
...c.current()
|
|
636
|
+
})), l += c.move(i), s()), l += c.move(")"), o(), l;
|
|
637
|
+
}
|
|
638
|
+
function $e() {
|
|
639
|
+
return "!";
|
|
640
|
+
}
|
|
641
|
+
//#endregion
|
|
642
|
+
//#region node_modules/mdast-util-to-markdown/lib/handle/image-reference.js
|
|
643
|
+
F.peek = et;
|
|
644
|
+
function F(e, t, n, r) {
|
|
645
|
+
let i = e.referenceType, a = n.enter("imageReference"), o = n.enter("label"), s = n.createTracker(r), c = s.move("!["), l = n.safe(e.alt, {
|
|
646
|
+
before: c,
|
|
647
|
+
after: "]",
|
|
648
|
+
...s.current()
|
|
649
|
+
});
|
|
650
|
+
c += s.move(l + "]["), o();
|
|
651
|
+
let u = n.stack;
|
|
652
|
+
n.stack = [], o = n.enter("reference");
|
|
653
|
+
let d = n.safe(n.associationId(e), {
|
|
654
|
+
before: c,
|
|
655
|
+
after: "]",
|
|
656
|
+
...s.current()
|
|
657
|
+
});
|
|
658
|
+
return o(), n.stack = u, a(), i === "full" || !l || l !== d ? c += s.move(d + "]") : i === "shortcut" ? c = c.slice(0, -1) : c += s.move("]"), c;
|
|
659
|
+
}
|
|
660
|
+
function et() {
|
|
661
|
+
return "!";
|
|
662
|
+
}
|
|
663
|
+
//#endregion
|
|
664
|
+
//#region node_modules/mdast-util-to-markdown/lib/handle/inline-code.js
|
|
665
|
+
I.peek = tt;
|
|
666
|
+
function I(e, t, n) {
|
|
667
|
+
let r = e.value || "", i = "`", a = -1;
|
|
668
|
+
for (; RegExp("(^|[^`])" + i + "([^`]|$)").test(r);) i += "`";
|
|
669
|
+
for (/[^ \r\n]/.test(r) && (/^[ \r\n]/.test(r) && /[ \r\n]$/.test(r) || /^`|`$/.test(r)) && (r = " " + r + " "); ++a < n.unsafe.length;) {
|
|
670
|
+
let e = n.unsafe[a], t = n.compilePattern(e), i;
|
|
671
|
+
if (e.atBreak) for (; i = t.exec(r);) {
|
|
672
|
+
let e = i.index;
|
|
673
|
+
r.charCodeAt(e) === 10 && r.charCodeAt(e - 1) === 13 && e--, r = r.slice(0, e) + " " + r.slice(i.index + 1);
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
return i + r + i;
|
|
677
|
+
}
|
|
678
|
+
function tt() {
|
|
679
|
+
return "`";
|
|
680
|
+
}
|
|
681
|
+
//#endregion
|
|
682
|
+
//#region node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js
|
|
683
|
+
function L(e, t) {
|
|
684
|
+
let n = _(e);
|
|
685
|
+
return !!(!t.options.resourceLink && e.url && !e.title && e.children && e.children.length === 1 && e.children[0].type === "text" && (n === e.url || "mailto:" + n === e.url) && /^[a-z][a-z+.-]+:/i.test(e.url) && !/[\0- <>\u007F]/.test(e.url));
|
|
686
|
+
}
|
|
687
|
+
//#endregion
|
|
688
|
+
//#region node_modules/mdast-util-to-markdown/lib/handle/link.js
|
|
689
|
+
R.peek = nt;
|
|
690
|
+
function R(e, t, n, r) {
|
|
691
|
+
let i = j(n), a = i === "\"" ? "Quote" : "Apostrophe", o = n.createTracker(r), s, c;
|
|
692
|
+
if (L(e, n)) {
|
|
693
|
+
let t = n.stack;
|
|
694
|
+
n.stack = [], s = n.enter("autolink");
|
|
695
|
+
let r = o.move("<");
|
|
696
|
+
return r += o.move(n.containerPhrasing(e, {
|
|
697
|
+
before: r,
|
|
698
|
+
after: ">",
|
|
699
|
+
...o.current()
|
|
700
|
+
})), r += o.move(">"), s(), n.stack = t, r;
|
|
701
|
+
}
|
|
702
|
+
s = n.enter("link"), c = n.enter("label");
|
|
703
|
+
let l = o.move("[");
|
|
704
|
+
return l += o.move(n.containerPhrasing(e, {
|
|
705
|
+
before: l,
|
|
706
|
+
after: "](",
|
|
707
|
+
...o.current()
|
|
708
|
+
})), l += o.move("]("), c(), !e.url && e.title || /[\0- \u007F]/.test(e.url) ? (c = n.enter("destinationLiteral"), l += o.move("<"), l += o.move(n.safe(e.url, {
|
|
709
|
+
before: l,
|
|
710
|
+
after: ">",
|
|
711
|
+
...o.current()
|
|
712
|
+
})), l += o.move(">")) : (c = n.enter("destinationRaw"), l += o.move(n.safe(e.url, {
|
|
713
|
+
before: l,
|
|
714
|
+
after: e.title ? " " : ")",
|
|
715
|
+
...o.current()
|
|
716
|
+
}))), c(), e.title && (c = n.enter(`title${a}`), l += o.move(" " + i), l += o.move(n.safe(e.title, {
|
|
717
|
+
before: l,
|
|
718
|
+
after: i,
|
|
719
|
+
...o.current()
|
|
720
|
+
})), l += o.move(i), c()), l += o.move(")"), s(), l;
|
|
721
|
+
}
|
|
722
|
+
function nt(e, t, n) {
|
|
723
|
+
return L(e, n) ? "<" : "[";
|
|
724
|
+
}
|
|
725
|
+
//#endregion
|
|
726
|
+
//#region node_modules/mdast-util-to-markdown/lib/handle/link-reference.js
|
|
727
|
+
z.peek = rt;
|
|
728
|
+
function z(e, t, n, r) {
|
|
729
|
+
let i = e.referenceType, a = n.enter("linkReference"), o = n.enter("label"), s = n.createTracker(r), c = s.move("["), l = n.containerPhrasing(e, {
|
|
730
|
+
before: c,
|
|
731
|
+
after: "]",
|
|
732
|
+
...s.current()
|
|
733
|
+
});
|
|
734
|
+
c += s.move(l + "]["), o();
|
|
735
|
+
let u = n.stack;
|
|
736
|
+
n.stack = [], o = n.enter("reference");
|
|
737
|
+
let d = n.safe(n.associationId(e), {
|
|
738
|
+
before: c,
|
|
739
|
+
after: "]",
|
|
740
|
+
...s.current()
|
|
741
|
+
});
|
|
742
|
+
return o(), n.stack = u, a(), i === "full" || !l || l !== d ? c += s.move(d + "]") : i === "shortcut" ? c = c.slice(0, -1) : c += s.move("]"), c;
|
|
743
|
+
}
|
|
744
|
+
function rt() {
|
|
745
|
+
return "[";
|
|
746
|
+
}
|
|
747
|
+
//#endregion
|
|
748
|
+
//#region node_modules/mdast-util-to-markdown/lib/util/check-bullet.js
|
|
749
|
+
function B(e) {
|
|
750
|
+
let t = e.options.bullet || "*";
|
|
751
|
+
if (t !== "*" && t !== "+" && t !== "-") throw Error("Cannot serialize items with `" + t + "` for `options.bullet`, expected `*`, `+`, or `-`");
|
|
752
|
+
return t;
|
|
753
|
+
}
|
|
754
|
+
//#endregion
|
|
755
|
+
//#region node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.js
|
|
756
|
+
function it(e) {
|
|
757
|
+
let t = B(e), n = e.options.bulletOther;
|
|
758
|
+
if (!n) return t === "*" ? "-" : "*";
|
|
759
|
+
if (n !== "*" && n !== "+" && n !== "-") throw Error("Cannot serialize items with `" + n + "` for `options.bulletOther`, expected `*`, `+`, or `-`");
|
|
760
|
+
if (n === t) throw Error("Expected `bullet` (`" + t + "`) and `bulletOther` (`" + n + "`) to be different");
|
|
761
|
+
return n;
|
|
762
|
+
}
|
|
763
|
+
//#endregion
|
|
764
|
+
//#region node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.js
|
|
765
|
+
function at(e) {
|
|
766
|
+
let t = e.options.bulletOrdered || ".";
|
|
767
|
+
if (t !== "." && t !== ")") throw Error("Cannot serialize items with `" + t + "` for `options.bulletOrdered`, expected `.` or `)`");
|
|
768
|
+
return t;
|
|
769
|
+
}
|
|
770
|
+
//#endregion
|
|
771
|
+
//#region node_modules/mdast-util-to-markdown/lib/util/check-rule.js
|
|
772
|
+
function V(e) {
|
|
773
|
+
let t = e.options.rule || "*";
|
|
774
|
+
if (t !== "*" && t !== "-" && t !== "_") throw Error("Cannot serialize rules with `" + t + "` for `options.rule`, expected `*`, `-`, or `_`");
|
|
775
|
+
return t;
|
|
776
|
+
}
|
|
777
|
+
//#endregion
|
|
778
|
+
//#region node_modules/mdast-util-to-markdown/lib/handle/list.js
|
|
779
|
+
function ot(e, t, n, r) {
|
|
780
|
+
let i = n.enter("list"), a = n.bulletCurrent, o = e.ordered ? at(n) : B(n), s = e.ordered ? o === "." ? ")" : "." : it(n), c = t && n.bulletLastUsed ? o === n.bulletLastUsed : !1;
|
|
781
|
+
if (!e.ordered) {
|
|
782
|
+
let t = e.children ? e.children[0] : void 0;
|
|
783
|
+
if ((o === "*" || o === "-") && t && (!t.children || !t.children[0]) && n.stack[n.stack.length - 1] === "list" && n.stack[n.stack.length - 2] === "listItem" && n.stack[n.stack.length - 3] === "list" && n.stack[n.stack.length - 4] === "listItem" && n.indexStack[n.indexStack.length - 1] === 0 && n.indexStack[n.indexStack.length - 2] === 0 && n.indexStack[n.indexStack.length - 3] === 0 && (c = !0), V(n) === o && t) {
|
|
784
|
+
let t = -1;
|
|
785
|
+
for (; ++t < e.children.length;) {
|
|
786
|
+
let n = e.children[t];
|
|
787
|
+
if (n && n.type === "listItem" && n.children && n.children[0] && n.children[0].type === "thematicBreak") {
|
|
788
|
+
c = !0;
|
|
789
|
+
break;
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
c && (o = s), n.bulletCurrent = o;
|
|
795
|
+
let l = n.containerFlow(e, r);
|
|
796
|
+
return n.bulletLastUsed = o, n.bulletCurrent = a, i(), l;
|
|
797
|
+
}
|
|
798
|
+
//#endregion
|
|
799
|
+
//#region node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js
|
|
800
|
+
function st(e) {
|
|
801
|
+
let t = e.options.listItemIndent || "one";
|
|
802
|
+
if (t !== "tab" && t !== "one" && t !== "mixed") throw Error("Cannot serialize items with `" + t + "` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");
|
|
803
|
+
return t;
|
|
804
|
+
}
|
|
805
|
+
//#endregion
|
|
806
|
+
//#region node_modules/mdast-util-to-markdown/lib/handle/list-item.js
|
|
807
|
+
function ct(e, t, n, r) {
|
|
808
|
+
let i = st(n), a = n.bulletCurrent || B(n);
|
|
809
|
+
t && t.type === "list" && t.ordered && (a = (typeof t.start == "number" && t.start > -1 ? t.start : 1) + (n.options.incrementListMarker === !1 ? 0 : t.children.indexOf(e)) + a);
|
|
810
|
+
let o = a.length + 1;
|
|
811
|
+
(i === "tab" || i === "mixed" && (t && t.type === "list" && t.spread || e.spread)) && (o = Math.ceil(o / 4) * 4);
|
|
812
|
+
let s = n.createTracker(r);
|
|
813
|
+
s.move(a + " ".repeat(o - a.length)), s.shift(o);
|
|
814
|
+
let c = n.enter("listItem"), l = n.indentLines(n.containerFlow(e, s.current()), u);
|
|
815
|
+
return c(), l;
|
|
816
|
+
function u(e, t, n) {
|
|
817
|
+
return t ? (n ? "" : " ".repeat(o)) + e : (n ? a : a + " ".repeat(o - a.length)) + e;
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
//#endregion
|
|
821
|
+
//#region node_modules/mdast-util-to-markdown/lib/handle/paragraph.js
|
|
822
|
+
function lt(e, t, n, r) {
|
|
823
|
+
let i = n.enter("paragraph"), a = n.enter("phrasing"), o = n.containerPhrasing(e, r);
|
|
824
|
+
return a(), i(), o;
|
|
825
|
+
}
|
|
826
|
+
//#endregion
|
|
827
|
+
//#region node_modules/mdast-util-phrasing/lib/index.js
|
|
828
|
+
var ut = t([
|
|
829
|
+
"break",
|
|
830
|
+
"delete",
|
|
831
|
+
"emphasis",
|
|
832
|
+
"footnote",
|
|
833
|
+
"footnoteReference",
|
|
834
|
+
"image",
|
|
835
|
+
"imageReference",
|
|
836
|
+
"inlineCode",
|
|
837
|
+
"inlineMath",
|
|
838
|
+
"link",
|
|
839
|
+
"linkReference",
|
|
840
|
+
"mdxJsxTextElement",
|
|
841
|
+
"mdxTextExpression",
|
|
842
|
+
"strong",
|
|
843
|
+
"text",
|
|
844
|
+
"textDirective"
|
|
845
|
+
]);
|
|
846
|
+
//#endregion
|
|
847
|
+
//#region node_modules/mdast-util-to-markdown/lib/handle/root.js
|
|
848
|
+
function dt(e, t, n, r) {
|
|
849
|
+
return (e.children.some(function(e) {
|
|
850
|
+
return ut(e);
|
|
851
|
+
}) ? n.containerPhrasing : n.containerFlow).call(n, e, r);
|
|
852
|
+
}
|
|
853
|
+
//#endregion
|
|
854
|
+
//#region node_modules/mdast-util-to-markdown/lib/util/check-strong.js
|
|
855
|
+
function ft(e) {
|
|
856
|
+
let t = e.options.strong || "*";
|
|
857
|
+
if (t !== "*" && t !== "_") throw Error("Cannot serialize strong with `" + t + "` for `options.strong`, expected `*`, or `_`");
|
|
858
|
+
return t;
|
|
859
|
+
}
|
|
860
|
+
//#endregion
|
|
861
|
+
//#region node_modules/mdast-util-to-markdown/lib/handle/strong.js
|
|
862
|
+
H.peek = pt;
|
|
863
|
+
function H(e, t, n, r) {
|
|
864
|
+
let i = ft(n), a = n.enter("strong"), o = n.createTracker(r), s = o.move(i + i), c = o.move(n.containerPhrasing(e, {
|
|
865
|
+
after: i,
|
|
866
|
+
before: s,
|
|
867
|
+
...o.current()
|
|
868
|
+
})), l = c.charCodeAt(0), u = N(r.before.charCodeAt(r.before.length - 1), l, i);
|
|
869
|
+
u.inside && (c = M(l) + c.slice(1));
|
|
870
|
+
let d = c.charCodeAt(c.length - 1), f = N(r.after.charCodeAt(0), d, i);
|
|
871
|
+
f.inside && (c = c.slice(0, -1) + M(d));
|
|
872
|
+
let p = o.move(i + i);
|
|
873
|
+
return a(), n.attentionEncodeSurroundingInfo = {
|
|
874
|
+
after: f.outside,
|
|
875
|
+
before: u.outside
|
|
876
|
+
}, s + c + p;
|
|
877
|
+
}
|
|
878
|
+
function pt(e, t, n) {
|
|
879
|
+
return n.options.strong || "*";
|
|
880
|
+
}
|
|
881
|
+
//#endregion
|
|
882
|
+
//#region node_modules/mdast-util-to-markdown/lib/handle/text.js
|
|
883
|
+
function mt(e, t, n, r) {
|
|
884
|
+
return n.safe(e.value, r);
|
|
885
|
+
}
|
|
886
|
+
//#endregion
|
|
887
|
+
//#region node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.js
|
|
888
|
+
function ht(e) {
|
|
889
|
+
let t = e.options.ruleRepetition || 3;
|
|
890
|
+
if (t < 3) throw Error("Cannot serialize rules with repetition `" + t + "` for `options.ruleRepetition`, expected `3` or more");
|
|
891
|
+
return t;
|
|
892
|
+
}
|
|
893
|
+
//#endregion
|
|
894
|
+
//#region node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js
|
|
895
|
+
function gt(e, t, n) {
|
|
896
|
+
let r = (V(n) + (n.options.ruleSpaces ? " " : "")).repeat(ht(n));
|
|
897
|
+
return n.options.ruleSpaces ? r.slice(0, -1) : r;
|
|
898
|
+
}
|
|
899
|
+
//#endregion
|
|
900
|
+
//#region node_modules/mdast-util-to-markdown/lib/handle/index.js
|
|
901
|
+
var U = {
|
|
902
|
+
blockquote: Fe,
|
|
903
|
+
break: ze,
|
|
904
|
+
code: Ue,
|
|
905
|
+
definition: Ge,
|
|
906
|
+
emphasis: qe,
|
|
907
|
+
hardBreak: ze,
|
|
908
|
+
heading: Xe,
|
|
909
|
+
html: Ze,
|
|
910
|
+
image: P,
|
|
911
|
+
imageReference: F,
|
|
912
|
+
inlineCode: I,
|
|
913
|
+
link: R,
|
|
914
|
+
linkReference: z,
|
|
915
|
+
list: ot,
|
|
916
|
+
listItem: ct,
|
|
917
|
+
paragraph: lt,
|
|
918
|
+
root: dt,
|
|
919
|
+
strong: H,
|
|
920
|
+
text: mt,
|
|
921
|
+
thematicBreak: gt
|
|
922
|
+
};
|
|
923
|
+
//#endregion
|
|
924
|
+
//#region node_modules/mdast-util-gfm-table/lib/index.js
|
|
925
|
+
function _t() {
|
|
926
|
+
return {
|
|
927
|
+
enter: {
|
|
928
|
+
table: vt,
|
|
929
|
+
tableData: G,
|
|
930
|
+
tableHeader: G,
|
|
931
|
+
tableRow: bt
|
|
932
|
+
},
|
|
933
|
+
exit: {
|
|
934
|
+
codeText: xt,
|
|
935
|
+
table: yt,
|
|
936
|
+
tableData: W,
|
|
937
|
+
tableHeader: W,
|
|
938
|
+
tableRow: W
|
|
939
|
+
}
|
|
940
|
+
};
|
|
941
|
+
}
|
|
942
|
+
function vt(e) {
|
|
943
|
+
let t = e._align;
|
|
944
|
+
this.enter({
|
|
945
|
+
type: "table",
|
|
946
|
+
align: t.map(function(e) {
|
|
947
|
+
return e === "none" ? null : e;
|
|
948
|
+
}),
|
|
949
|
+
children: []
|
|
950
|
+
}, e), this.data.inTable = !0;
|
|
951
|
+
}
|
|
952
|
+
function yt(e) {
|
|
953
|
+
this.exit(e), this.data.inTable = void 0;
|
|
954
|
+
}
|
|
955
|
+
function bt(e) {
|
|
956
|
+
this.enter({
|
|
957
|
+
type: "tableRow",
|
|
958
|
+
children: []
|
|
959
|
+
}, e);
|
|
960
|
+
}
|
|
961
|
+
function W(e) {
|
|
962
|
+
this.exit(e);
|
|
963
|
+
}
|
|
964
|
+
function G(e) {
|
|
965
|
+
this.enter({
|
|
966
|
+
type: "tableCell",
|
|
967
|
+
children: []
|
|
968
|
+
}, e);
|
|
969
|
+
}
|
|
970
|
+
function xt(e) {
|
|
971
|
+
let t = this.resume();
|
|
972
|
+
this.data.inTable && (t = t.replace(/\\([\\|])/g, St));
|
|
973
|
+
let n = this.stack[this.stack.length - 1];
|
|
974
|
+
n.type, n.value = t, this.exit(e);
|
|
975
|
+
}
|
|
976
|
+
function St(e, t) {
|
|
977
|
+
return t === "|" ? t : e;
|
|
978
|
+
}
|
|
979
|
+
function Ct(e) {
|
|
980
|
+
let t = e || {}, n = t.tableCellPadding, r = t.tablePipeAlign, i = t.stringLength, a = n ? " " : "|";
|
|
981
|
+
return {
|
|
982
|
+
unsafe: [
|
|
983
|
+
{
|
|
984
|
+
character: "\r",
|
|
985
|
+
inConstruct: "tableCell"
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
character: "\n",
|
|
989
|
+
inConstruct: "tableCell"
|
|
990
|
+
},
|
|
991
|
+
{
|
|
992
|
+
atBreak: !0,
|
|
993
|
+
character: "|",
|
|
994
|
+
after: "[ :-]"
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
character: "|",
|
|
998
|
+
inConstruct: "tableCell"
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
atBreak: !0,
|
|
1002
|
+
character: ":",
|
|
1003
|
+
after: "-"
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
atBreak: !0,
|
|
1007
|
+
character: "-",
|
|
1008
|
+
after: "[:|-]"
|
|
1009
|
+
}
|
|
1010
|
+
],
|
|
1011
|
+
handlers: {
|
|
1012
|
+
inlineCode: f,
|
|
1013
|
+
table: o,
|
|
1014
|
+
tableCell: c,
|
|
1015
|
+
tableRow: s
|
|
1016
|
+
}
|
|
1017
|
+
};
|
|
1018
|
+
function o(e, t, n, r) {
|
|
1019
|
+
return l(u(e, n, r), e.align);
|
|
1020
|
+
}
|
|
1021
|
+
function s(e, t, n, r) {
|
|
1022
|
+
let i = l([d(e, n, r)]);
|
|
1023
|
+
return i.slice(0, i.indexOf("\n"));
|
|
1024
|
+
}
|
|
1025
|
+
function c(e, t, n, r) {
|
|
1026
|
+
let i = n.enter("tableCell"), o = n.enter("phrasing"), s = n.containerPhrasing(e, {
|
|
1027
|
+
...r,
|
|
1028
|
+
before: a,
|
|
1029
|
+
after: a
|
|
1030
|
+
});
|
|
1031
|
+
return o(), i(), s;
|
|
1032
|
+
}
|
|
1033
|
+
function l(e, t) {
|
|
1034
|
+
return Me(e, {
|
|
1035
|
+
align: t,
|
|
1036
|
+
alignDelimiters: r,
|
|
1037
|
+
padding: n,
|
|
1038
|
+
stringLength: i
|
|
1039
|
+
});
|
|
1040
|
+
}
|
|
1041
|
+
function u(e, t, n) {
|
|
1042
|
+
let r = e.children, i = -1, a = [], o = t.enter("table");
|
|
1043
|
+
for (; ++i < r.length;) a[i] = d(r[i], t, n);
|
|
1044
|
+
return o(), a;
|
|
1045
|
+
}
|
|
1046
|
+
function d(e, t, n) {
|
|
1047
|
+
let r = e.children, i = -1, a = [], o = t.enter("tableRow");
|
|
1048
|
+
for (; ++i < r.length;) a[i] = c(r[i], e, t, n);
|
|
1049
|
+
return o(), a;
|
|
1050
|
+
}
|
|
1051
|
+
function f(e, t, n) {
|
|
1052
|
+
let r = U.inlineCode(e, t, n);
|
|
1053
|
+
return n.stack.includes("tableCell") && (r = r.replace(/\|/g, "\\$&")), r;
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
//#endregion
|
|
1057
|
+
//#region node_modules/mdast-util-gfm-task-list-item/lib/index.js
|
|
1058
|
+
function wt() {
|
|
1059
|
+
return { exit: {
|
|
1060
|
+
taskListCheckValueChecked: Et,
|
|
1061
|
+
taskListCheckValueUnchecked: Et,
|
|
1062
|
+
paragraph: Dt
|
|
1063
|
+
} };
|
|
1064
|
+
}
|
|
1065
|
+
function Tt() {
|
|
1066
|
+
return {
|
|
1067
|
+
unsafe: [{
|
|
1068
|
+
atBreak: !0,
|
|
1069
|
+
character: "-",
|
|
1070
|
+
after: "[:|-]"
|
|
1071
|
+
}],
|
|
1072
|
+
handlers: { listItem: Ot }
|
|
1073
|
+
};
|
|
1074
|
+
}
|
|
1075
|
+
function Et(e) {
|
|
1076
|
+
let t = this.stack[this.stack.length - 2];
|
|
1077
|
+
t.type, t.checked = e.type === "taskListCheckValueChecked";
|
|
1078
|
+
}
|
|
1079
|
+
function Dt(e) {
|
|
1080
|
+
let t = this.stack[this.stack.length - 2];
|
|
1081
|
+
if (t && t.type === "listItem" && typeof t.checked == "boolean") {
|
|
1082
|
+
let e = this.stack[this.stack.length - 1];
|
|
1083
|
+
e.type;
|
|
1084
|
+
let n = e.children[0];
|
|
1085
|
+
if (n && n.type === "text") {
|
|
1086
|
+
let r = t.children, i = -1, a;
|
|
1087
|
+
for (; ++i < r.length;) {
|
|
1088
|
+
let e = r[i];
|
|
1089
|
+
if (e.type === "paragraph") {
|
|
1090
|
+
a = e;
|
|
1091
|
+
break;
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
a === e && (n.value = n.value.slice(1), n.value.length === 0 ? e.children.shift() : e.position && n.position && typeof n.position.start.offset == "number" && (n.position.start.column++, n.position.start.offset++, e.position.start = Object.assign({}, n.position.start)));
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
this.exit(e);
|
|
1098
|
+
}
|
|
1099
|
+
function Ot(e, t, n, r) {
|
|
1100
|
+
let i = e.children[0], a = typeof e.checked == "boolean" && i && i.type === "paragraph", o = "[" + (e.checked ? "x" : " ") + "] ", s = n.createTracker(r);
|
|
1101
|
+
a && s.move(o);
|
|
1102
|
+
let c = U.listItem(e, t, n, {
|
|
1103
|
+
...r,
|
|
1104
|
+
...s.current()
|
|
1105
|
+
});
|
|
1106
|
+
return a && (c = c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/, l)), c;
|
|
1107
|
+
function l(e) {
|
|
1108
|
+
return e + o;
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
//#endregion
|
|
1112
|
+
//#region node_modules/mdast-util-gfm/lib/index.js
|
|
1113
|
+
function kt() {
|
|
1114
|
+
return [
|
|
1115
|
+
E(),
|
|
1116
|
+
xe(),
|
|
1117
|
+
Te(),
|
|
1118
|
+
_t(),
|
|
1119
|
+
wt()
|
|
1120
|
+
];
|
|
1121
|
+
}
|
|
1122
|
+
function At(e) {
|
|
1123
|
+
return { extensions: [
|
|
1124
|
+
D(),
|
|
1125
|
+
Se(e),
|
|
1126
|
+
Ee(),
|
|
1127
|
+
Ct(e),
|
|
1128
|
+
Tt()
|
|
1129
|
+
] };
|
|
1130
|
+
}
|
|
1131
|
+
//#endregion
|
|
1132
|
+
//#region node_modules/micromark-extension-gfm-autolink-literal/lib/syntax.js
|
|
1133
|
+
var jt = {
|
|
1134
|
+
tokenize: Ht,
|
|
1135
|
+
partial: !0
|
|
1136
|
+
}, Mt = {
|
|
1137
|
+
tokenize: Ut,
|
|
1138
|
+
partial: !0
|
|
1139
|
+
}, Nt = {
|
|
1140
|
+
tokenize: Wt,
|
|
1141
|
+
partial: !0
|
|
1142
|
+
}, Pt = {
|
|
1143
|
+
tokenize: Gt,
|
|
1144
|
+
partial: !0
|
|
1145
|
+
}, Ft = {
|
|
1146
|
+
tokenize: Kt,
|
|
1147
|
+
partial: !0
|
|
1148
|
+
}, It = {
|
|
1149
|
+
name: "wwwAutolink",
|
|
1150
|
+
tokenize: Bt,
|
|
1151
|
+
previous: qt
|
|
1152
|
+
}, Lt = {
|
|
1153
|
+
name: "protocolAutolink",
|
|
1154
|
+
tokenize: Vt,
|
|
1155
|
+
previous: Jt
|
|
1156
|
+
}, K = {
|
|
1157
|
+
name: "emailAutolink",
|
|
1158
|
+
tokenize: zt,
|
|
1159
|
+
previous: Yt
|
|
1160
|
+
}, q = {};
|
|
1161
|
+
function Rt() {
|
|
1162
|
+
return { text: q };
|
|
1163
|
+
}
|
|
1164
|
+
for (var J = 48; J < 123;) q[J] = K, J++, J === 58 ? J = 65 : J === 91 && (J = 97);
|
|
1165
|
+
q[43] = K, q[45] = K, q[46] = K, q[95] = K, q[72] = [K, Lt], q[104] = [K, Lt], q[87] = [K, It], q[119] = [K, It];
|
|
1166
|
+
function zt(e, t, n) {
|
|
1167
|
+
let r = this, a, o;
|
|
1168
|
+
return s;
|
|
1169
|
+
function s(t) {
|
|
1170
|
+
return !Y(t) || !Yt.call(r, r.previous) || X(r.events) ? n(t) : (e.enter("literalAutolink"), e.enter("literalAutolinkEmail"), c(t));
|
|
1171
|
+
}
|
|
1172
|
+
function c(t) {
|
|
1173
|
+
return Y(t) ? (e.consume(t), c) : t === 64 ? (e.consume(t), l) : n(t);
|
|
1174
|
+
}
|
|
1175
|
+
function l(t) {
|
|
1176
|
+
return t === 46 ? e.check(Ft, d, u)(t) : t === 45 || t === 95 || p(t) ? (o = !0, e.consume(t), l) : d(t);
|
|
1177
|
+
}
|
|
1178
|
+
function u(t) {
|
|
1179
|
+
return e.consume(t), a = !0, l;
|
|
1180
|
+
}
|
|
1181
|
+
function d(s) {
|
|
1182
|
+
return o && a && i(r.previous) ? (e.exit("literalAutolinkEmail"), e.exit("literalAutolink"), t(s)) : n(s);
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
function Bt(e, t, n) {
|
|
1186
|
+
let r = this;
|
|
1187
|
+
return i;
|
|
1188
|
+
function i(t) {
|
|
1189
|
+
return t !== 87 && t !== 119 || !qt.call(r, r.previous) || X(r.events) ? n(t) : (e.enter("literalAutolink"), e.enter("literalAutolinkWww"), e.check(jt, e.attempt(Mt, e.attempt(Nt, a), n), n)(t));
|
|
1190
|
+
}
|
|
1191
|
+
function a(n) {
|
|
1192
|
+
return e.exit("literalAutolinkWww"), e.exit("literalAutolink"), t(n);
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
function Vt(e, t, n) {
|
|
1196
|
+
let r = this, a = "", s = !1;
|
|
1197
|
+
return u;
|
|
1198
|
+
function u(t) {
|
|
1199
|
+
return (t === 72 || t === 104) && Jt.call(r, r.previous) && !X(r.events) ? (e.enter("literalAutolink"), e.enter("literalAutolinkHttp"), a += String.fromCodePoint(t), e.consume(t), d) : n(t);
|
|
1200
|
+
}
|
|
1201
|
+
function d(t) {
|
|
1202
|
+
if (i(t) && a.length < 5) return a += String.fromCodePoint(t), e.consume(t), d;
|
|
1203
|
+
if (t === 58) {
|
|
1204
|
+
let n = a.toLowerCase();
|
|
1205
|
+
if (n === "http" || n === "https") return e.consume(t), f;
|
|
1206
|
+
}
|
|
1207
|
+
return n(t);
|
|
1208
|
+
}
|
|
1209
|
+
function f(t) {
|
|
1210
|
+
return t === 47 ? (e.consume(t), s ? p : (s = !0, f)) : n(t);
|
|
1211
|
+
}
|
|
1212
|
+
function p(t) {
|
|
1213
|
+
return t === null || o(t) || m(t) || c(t) || l(t) ? n(t) : e.attempt(Mt, e.attempt(Nt, h), n)(t);
|
|
1214
|
+
}
|
|
1215
|
+
function h(n) {
|
|
1216
|
+
return e.exit("literalAutolinkHttp"), e.exit("literalAutolink"), t(n);
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
function Ht(e, t, n) {
|
|
1220
|
+
let r = 0;
|
|
1221
|
+
return i;
|
|
1222
|
+
function i(t) {
|
|
1223
|
+
return (t === 87 || t === 119) && r < 3 ? (r++, e.consume(t), i) : t === 46 && r === 3 ? (e.consume(t), a) : n(t);
|
|
1224
|
+
}
|
|
1225
|
+
function a(e) {
|
|
1226
|
+
return e === null ? n(e) : t(e);
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
function Ut(e, t, n) {
|
|
1230
|
+
let r, i, a;
|
|
1231
|
+
return o;
|
|
1232
|
+
function o(t) {
|
|
1233
|
+
return t === 46 || t === 95 ? e.check(Pt, u, s)(t) : t === null || m(t) || c(t) || t !== 45 && l(t) ? u(t) : (a = !0, e.consume(t), o);
|
|
1234
|
+
}
|
|
1235
|
+
function s(t) {
|
|
1236
|
+
return t === 95 ? r = !0 : (i = r, r = void 0), e.consume(t), o;
|
|
1237
|
+
}
|
|
1238
|
+
function u(e) {
|
|
1239
|
+
return i || r || !a ? n(e) : t(e);
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
function Wt(e, t) {
|
|
1243
|
+
let n = 0, r = 0;
|
|
1244
|
+
return i;
|
|
1245
|
+
function i(o) {
|
|
1246
|
+
return o === 40 ? (n++, e.consume(o), i) : o === 41 && r < n ? a(o) : o === 33 || o === 34 || o === 38 || o === 39 || o === 41 || o === 42 || o === 44 || o === 46 || o === 58 || o === 59 || o === 60 || o === 63 || o === 93 || o === 95 || o === 126 ? e.check(Pt, t, a)(o) : o === null || m(o) || c(o) ? t(o) : (e.consume(o), i);
|
|
1247
|
+
}
|
|
1248
|
+
function a(t) {
|
|
1249
|
+
return t === 41 && r++, e.consume(t), i;
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
function Gt(e, t, n) {
|
|
1253
|
+
return r;
|
|
1254
|
+
function r(i) {
|
|
1255
|
+
return i === 33 || i === 34 || i === 39 || i === 41 || i === 42 || i === 44 || i === 46 || i === 58 || i === 59 || i === 63 || i === 95 || i === 126 ? (e.consume(i), r) : i === 38 ? (e.consume(i), o) : i === 93 ? (e.consume(i), a) : i === 60 || i === null || m(i) || c(i) ? t(i) : n(i);
|
|
1256
|
+
}
|
|
1257
|
+
function a(e) {
|
|
1258
|
+
return e === null || e === 40 || e === 91 || m(e) || c(e) ? t(e) : r(e);
|
|
1259
|
+
}
|
|
1260
|
+
function o(e) {
|
|
1261
|
+
return i(e) ? s(e) : n(e);
|
|
1262
|
+
}
|
|
1263
|
+
function s(t) {
|
|
1264
|
+
return t === 59 ? (e.consume(t), r) : i(t) ? (e.consume(t), s) : n(t);
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
function Kt(e, t, n) {
|
|
1268
|
+
return r;
|
|
1269
|
+
function r(t) {
|
|
1270
|
+
return e.consume(t), i;
|
|
1271
|
+
}
|
|
1272
|
+
function i(e) {
|
|
1273
|
+
return p(e) ? n(e) : t(e);
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
function qt(e) {
|
|
1277
|
+
return e === null || e === 40 || e === 42 || e === 95 || e === 91 || e === 93 || e === 126 || m(e);
|
|
1278
|
+
}
|
|
1279
|
+
function Jt(e) {
|
|
1280
|
+
return !i(e);
|
|
1281
|
+
}
|
|
1282
|
+
function Yt(e) {
|
|
1283
|
+
return !(e === 47 || Y(e));
|
|
1284
|
+
}
|
|
1285
|
+
function Y(e) {
|
|
1286
|
+
return e === 43 || e === 45 || e === 46 || e === 95 || p(e);
|
|
1287
|
+
}
|
|
1288
|
+
function X(e) {
|
|
1289
|
+
let t = e.length, n = !1;
|
|
1290
|
+
for (; t--;) {
|
|
1291
|
+
let r = e[t][1];
|
|
1292
|
+
if ((r.type === "labelLink" || r.type === "labelImage") && !r._balanced) {
|
|
1293
|
+
n = !0;
|
|
1294
|
+
break;
|
|
1295
|
+
}
|
|
1296
|
+
if (r._gfmAutolinkLiteralWalkedInto) {
|
|
1297
|
+
n = !1;
|
|
1298
|
+
break;
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
return e.length > 0 && !n && (e[e.length - 1][1]._gfmAutolinkLiteralWalkedInto = !0), n;
|
|
1302
|
+
}
|
|
1303
|
+
//#endregion
|
|
1304
|
+
//#region node_modules/micromark-extension-gfm-footnote/lib/syntax.js
|
|
1305
|
+
var Xt = {
|
|
1306
|
+
tokenize: an,
|
|
1307
|
+
partial: !0
|
|
1308
|
+
};
|
|
1309
|
+
function Zt() {
|
|
1310
|
+
return {
|
|
1311
|
+
document: { 91: {
|
|
1312
|
+
name: "gfmFootnoteDefinition",
|
|
1313
|
+
tokenize: tn,
|
|
1314
|
+
continuation: { tokenize: nn },
|
|
1315
|
+
exit: rn
|
|
1316
|
+
} },
|
|
1317
|
+
text: {
|
|
1318
|
+
91: {
|
|
1319
|
+
name: "gfmFootnoteCall",
|
|
1320
|
+
tokenize: en
|
|
1321
|
+
},
|
|
1322
|
+
93: {
|
|
1323
|
+
name: "gfmPotentialFootnoteCall",
|
|
1324
|
+
add: "after",
|
|
1325
|
+
tokenize: Qt,
|
|
1326
|
+
resolveTo: $t
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
};
|
|
1330
|
+
}
|
|
1331
|
+
function Qt(e, t, n) {
|
|
1332
|
+
let i = this, a = i.events.length, o = i.parser.gfmFootnotes || (i.parser.gfmFootnotes = []), s;
|
|
1333
|
+
for (; a--;) {
|
|
1334
|
+
let e = i.events[a][1];
|
|
1335
|
+
if (e.type === "labelImage") {
|
|
1336
|
+
s = e;
|
|
1337
|
+
break;
|
|
1338
|
+
}
|
|
1339
|
+
if (e.type === "gfmFootnoteCall" || e.type === "labelLink" || e.type === "label" || e.type === "image" || e.type === "link") break;
|
|
1340
|
+
}
|
|
1341
|
+
return c;
|
|
1342
|
+
function c(a) {
|
|
1343
|
+
if (!s || !s._balanced) return n(a);
|
|
1344
|
+
let c = r(i.sliceSerialize({
|
|
1345
|
+
start: s.end,
|
|
1346
|
+
end: i.now()
|
|
1347
|
+
}));
|
|
1348
|
+
return c.codePointAt(0) !== 94 || !o.includes(c.slice(1)) ? n(a) : (e.enter("gfmFootnoteCallLabelMarker"), e.consume(a), e.exit("gfmFootnoteCallLabelMarker"), t(a));
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
function $t(e, t) {
|
|
1352
|
+
let n = e.length;
|
|
1353
|
+
for (; n--;) if (e[n][1].type === "labelImage" && e[n][0] === "enter") {
|
|
1354
|
+
e[n][1];
|
|
1355
|
+
break;
|
|
1356
|
+
}
|
|
1357
|
+
e[n + 1][1].type = "data", e[n + 3][1].type = "gfmFootnoteCallLabelMarker";
|
|
1358
|
+
let r = {
|
|
1359
|
+
type: "gfmFootnoteCall",
|
|
1360
|
+
start: Object.assign({}, e[n + 3][1].start),
|
|
1361
|
+
end: Object.assign({}, e[e.length - 1][1].end)
|
|
1362
|
+
}, i = {
|
|
1363
|
+
type: "gfmFootnoteCallMarker",
|
|
1364
|
+
start: Object.assign({}, e[n + 3][1].end),
|
|
1365
|
+
end: Object.assign({}, e[n + 3][1].end)
|
|
1366
|
+
};
|
|
1367
|
+
i.end.column++, i.end.offset++, i.end._bufferIndex++;
|
|
1368
|
+
let a = {
|
|
1369
|
+
type: "gfmFootnoteCallString",
|
|
1370
|
+
start: Object.assign({}, i.end),
|
|
1371
|
+
end: Object.assign({}, e[e.length - 1][1].start)
|
|
1372
|
+
}, o = {
|
|
1373
|
+
type: "chunkString",
|
|
1374
|
+
contentType: "string",
|
|
1375
|
+
start: Object.assign({}, a.start),
|
|
1376
|
+
end: Object.assign({}, a.end)
|
|
1377
|
+
}, s = [
|
|
1378
|
+
e[n + 1],
|
|
1379
|
+
e[n + 2],
|
|
1380
|
+
[
|
|
1381
|
+
"enter",
|
|
1382
|
+
r,
|
|
1383
|
+
t
|
|
1384
|
+
],
|
|
1385
|
+
e[n + 3],
|
|
1386
|
+
e[n + 4],
|
|
1387
|
+
[
|
|
1388
|
+
"enter",
|
|
1389
|
+
i,
|
|
1390
|
+
t
|
|
1391
|
+
],
|
|
1392
|
+
[
|
|
1393
|
+
"exit",
|
|
1394
|
+
i,
|
|
1395
|
+
t
|
|
1396
|
+
],
|
|
1397
|
+
[
|
|
1398
|
+
"enter",
|
|
1399
|
+
a,
|
|
1400
|
+
t
|
|
1401
|
+
],
|
|
1402
|
+
[
|
|
1403
|
+
"enter",
|
|
1404
|
+
o,
|
|
1405
|
+
t
|
|
1406
|
+
],
|
|
1407
|
+
[
|
|
1408
|
+
"exit",
|
|
1409
|
+
o,
|
|
1410
|
+
t
|
|
1411
|
+
],
|
|
1412
|
+
[
|
|
1413
|
+
"exit",
|
|
1414
|
+
a,
|
|
1415
|
+
t
|
|
1416
|
+
],
|
|
1417
|
+
e[e.length - 2],
|
|
1418
|
+
e[e.length - 1],
|
|
1419
|
+
[
|
|
1420
|
+
"exit",
|
|
1421
|
+
r,
|
|
1422
|
+
t
|
|
1423
|
+
]
|
|
1424
|
+
];
|
|
1425
|
+
return e.splice(n, e.length - n + 1, ...s), e;
|
|
1426
|
+
}
|
|
1427
|
+
function en(e, t, n) {
|
|
1428
|
+
let i = this, a = i.parser.gfmFootnotes || (i.parser.gfmFootnotes = []), o = 0, s;
|
|
1429
|
+
return c;
|
|
1430
|
+
function c(t) {
|
|
1431
|
+
return e.enter("gfmFootnoteCall"), e.enter("gfmFootnoteCallLabelMarker"), e.consume(t), e.exit("gfmFootnoteCallLabelMarker"), l;
|
|
1432
|
+
}
|
|
1433
|
+
function l(t) {
|
|
1434
|
+
return t === 94 ? (e.enter("gfmFootnoteCallMarker"), e.consume(t), e.exit("gfmFootnoteCallMarker"), e.enter("gfmFootnoteCallString"), e.enter("chunkString").contentType = "string", u) : n(t);
|
|
1435
|
+
}
|
|
1436
|
+
function u(c) {
|
|
1437
|
+
if (o > 999 || c === 93 && !s || c === null || c === 91 || m(c)) return n(c);
|
|
1438
|
+
if (c === 93) {
|
|
1439
|
+
e.exit("chunkString");
|
|
1440
|
+
let o = e.exit("gfmFootnoteCallString");
|
|
1441
|
+
return a.includes(r(i.sliceSerialize(o))) ? (e.enter("gfmFootnoteCallLabelMarker"), e.consume(c), e.exit("gfmFootnoteCallLabelMarker"), e.exit("gfmFootnoteCall"), t) : n(c);
|
|
1442
|
+
}
|
|
1443
|
+
return m(c) || (s = !0), o++, e.consume(c), c === 92 ? d : u;
|
|
1444
|
+
}
|
|
1445
|
+
function d(t) {
|
|
1446
|
+
return t === 91 || t === 92 || t === 93 ? (e.consume(t), o++, u) : u(t);
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
function tn(e, t, n) {
|
|
1450
|
+
let i = this, a = i.parser.gfmFootnotes || (i.parser.gfmFootnotes = []), o, s = 0, c;
|
|
1451
|
+
return l;
|
|
1452
|
+
function l(t) {
|
|
1453
|
+
return e.enter("gfmFootnoteDefinition")._container = !0, e.enter("gfmFootnoteDefinitionLabel"), e.enter("gfmFootnoteDefinitionLabelMarker"), e.consume(t), e.exit("gfmFootnoteDefinitionLabelMarker"), d;
|
|
1454
|
+
}
|
|
1455
|
+
function d(t) {
|
|
1456
|
+
return t === 94 ? (e.enter("gfmFootnoteDefinitionMarker"), e.consume(t), e.exit("gfmFootnoteDefinitionMarker"), e.enter("gfmFootnoteDefinitionLabelString"), e.enter("chunkString").contentType = "string", f) : n(t);
|
|
1457
|
+
}
|
|
1458
|
+
function f(t) {
|
|
1459
|
+
if (s > 999 || t === 93 && !c || t === null || t === 91 || m(t)) return n(t);
|
|
1460
|
+
if (t === 93) {
|
|
1461
|
+
e.exit("chunkString");
|
|
1462
|
+
let n = e.exit("gfmFootnoteDefinitionLabelString");
|
|
1463
|
+
return o = r(i.sliceSerialize(n)), e.enter("gfmFootnoteDefinitionLabelMarker"), e.consume(t), e.exit("gfmFootnoteDefinitionLabelMarker"), e.exit("gfmFootnoteDefinitionLabel"), h;
|
|
1464
|
+
}
|
|
1465
|
+
return m(t) || (c = !0), s++, e.consume(t), t === 92 ? p : f;
|
|
1466
|
+
}
|
|
1467
|
+
function p(t) {
|
|
1468
|
+
return t === 91 || t === 92 || t === 93 ? (e.consume(t), s++, f) : f(t);
|
|
1469
|
+
}
|
|
1470
|
+
function h(t) {
|
|
1471
|
+
return t === 58 ? (e.enter("definitionMarker"), e.consume(t), e.exit("definitionMarker"), a.includes(o) || a.push(o), u(e, g, "gfmFootnoteDefinitionWhitespace")) : n(t);
|
|
1472
|
+
}
|
|
1473
|
+
function g(e) {
|
|
1474
|
+
return t(e);
|
|
1475
|
+
}
|
|
1476
|
+
}
|
|
1477
|
+
function nn(e, t, n) {
|
|
1478
|
+
return e.check(g, t, e.attempt(Xt, t, n));
|
|
1479
|
+
}
|
|
1480
|
+
function rn(e) {
|
|
1481
|
+
e.exit("gfmFootnoteDefinition");
|
|
1482
|
+
}
|
|
1483
|
+
function an(e, t, n) {
|
|
1484
|
+
let r = this;
|
|
1485
|
+
return u(e, i, "gfmFootnoteDefinitionIndent", 5);
|
|
1486
|
+
function i(e) {
|
|
1487
|
+
let i = r.events[r.events.length - 1];
|
|
1488
|
+
return i && i[1].type === "gfmFootnoteDefinitionIndent" && i[2].sliceSerialize(i[1], !0).length === 4 ? t(e) : n(e);
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
//#endregion
|
|
1492
|
+
//#region node_modules/micromark-extension-gfm-strikethrough/lib/syntax.js
|
|
1493
|
+
function on(e) {
|
|
1494
|
+
let t = (e || {}).singleTilde, n = {
|
|
1495
|
+
name: "strikethrough",
|
|
1496
|
+
tokenize: i,
|
|
1497
|
+
resolveAll: r
|
|
1498
|
+
};
|
|
1499
|
+
return t ??= !0, {
|
|
1500
|
+
text: { 126: n },
|
|
1501
|
+
insideSpan: { null: [n] },
|
|
1502
|
+
attentionMarkers: { null: [126] }
|
|
1503
|
+
};
|
|
1504
|
+
function r(e, t) {
|
|
1505
|
+
let n = -1;
|
|
1506
|
+
for (; ++n < e.length;) if (e[n][0] === "enter" && e[n][1].type === "strikethroughSequenceTemporary" && e[n][1]._close) {
|
|
1507
|
+
let r = n;
|
|
1508
|
+
for (; r--;) if (e[r][0] === "exit" && e[r][1].type === "strikethroughSequenceTemporary" && e[r][1]._open && e[n][1].end.offset - e[n][1].start.offset === e[r][1].end.offset - e[r][1].start.offset) {
|
|
1509
|
+
e[n][1].type = "strikethroughSequence", e[r][1].type = "strikethroughSequence";
|
|
1510
|
+
let i = {
|
|
1511
|
+
type: "strikethrough",
|
|
1512
|
+
start: Object.assign({}, e[r][1].start),
|
|
1513
|
+
end: Object.assign({}, e[n][1].end)
|
|
1514
|
+
}, o = {
|
|
1515
|
+
type: "strikethroughText",
|
|
1516
|
+
start: Object.assign({}, e[r][1].end),
|
|
1517
|
+
end: Object.assign({}, e[n][1].start)
|
|
1518
|
+
}, s = [
|
|
1519
|
+
[
|
|
1520
|
+
"enter",
|
|
1521
|
+
i,
|
|
1522
|
+
t
|
|
1523
|
+
],
|
|
1524
|
+
[
|
|
1525
|
+
"enter",
|
|
1526
|
+
e[r][1],
|
|
1527
|
+
t
|
|
1528
|
+
],
|
|
1529
|
+
[
|
|
1530
|
+
"exit",
|
|
1531
|
+
e[r][1],
|
|
1532
|
+
t
|
|
1533
|
+
],
|
|
1534
|
+
[
|
|
1535
|
+
"enter",
|
|
1536
|
+
o,
|
|
1537
|
+
t
|
|
1538
|
+
]
|
|
1539
|
+
], c = t.parser.constructs.insideSpan.null;
|
|
1540
|
+
c && a(s, s.length, 0, f(c, e.slice(r + 1, n), t)), a(s, s.length, 0, [
|
|
1541
|
+
[
|
|
1542
|
+
"exit",
|
|
1543
|
+
o,
|
|
1544
|
+
t
|
|
1545
|
+
],
|
|
1546
|
+
[
|
|
1547
|
+
"enter",
|
|
1548
|
+
e[n][1],
|
|
1549
|
+
t
|
|
1550
|
+
],
|
|
1551
|
+
[
|
|
1552
|
+
"exit",
|
|
1553
|
+
e[n][1],
|
|
1554
|
+
t
|
|
1555
|
+
],
|
|
1556
|
+
[
|
|
1557
|
+
"exit",
|
|
1558
|
+
i,
|
|
1559
|
+
t
|
|
1560
|
+
]
|
|
1561
|
+
]), a(e, r - 1, n - r + 3, s), n = r + s.length - 2;
|
|
1562
|
+
break;
|
|
1563
|
+
}
|
|
1564
|
+
}
|
|
1565
|
+
for (n = -1; ++n < e.length;) e[n][1].type === "strikethroughSequenceTemporary" && (e[n][1].type = "data");
|
|
1566
|
+
return e;
|
|
1567
|
+
}
|
|
1568
|
+
function i(e, n, r) {
|
|
1569
|
+
let i = this.previous, a = this.events, o = 0;
|
|
1570
|
+
return s;
|
|
1571
|
+
function s(t) {
|
|
1572
|
+
return i === 126 && a[a.length - 1][1].type !== "characterEscape" ? r(t) : (e.enter("strikethroughSequenceTemporary"), c(t));
|
|
1573
|
+
}
|
|
1574
|
+
function c(a) {
|
|
1575
|
+
let s = h(i);
|
|
1576
|
+
if (a === 126) return o > 1 ? r(a) : (e.consume(a), o++, c);
|
|
1577
|
+
if (o < 2 && !t) return r(a);
|
|
1578
|
+
let l = e.exit("strikethroughSequenceTemporary"), u = h(a);
|
|
1579
|
+
return l._open = !u || u === 2 && !!s, l._close = !s || s === 2 && !!u, n(a);
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
}
|
|
1583
|
+
//#endregion
|
|
1584
|
+
//#region node_modules/micromark-extension-gfm-table/lib/edit-map.js
|
|
1585
|
+
var sn = class {
|
|
1586
|
+
constructor() {
|
|
1587
|
+
this.map = [];
|
|
1588
|
+
}
|
|
1589
|
+
add(e, t, n) {
|
|
1590
|
+
cn(this, e, t, n);
|
|
1591
|
+
}
|
|
1592
|
+
consume(e) {
|
|
1593
|
+
/* c8 ignore next 3 -- `resolve` is never called without tables, so without edits. */
|
|
1594
|
+
if (this.map.sort(function(e, t) {
|
|
1595
|
+
return e[0] - t[0];
|
|
1596
|
+
}), this.map.length === 0) return;
|
|
1597
|
+
let t = this.map.length, n = [];
|
|
1598
|
+
for (; t > 0;) --t, n.push(e.slice(this.map[t][0] + this.map[t][1]), this.map[t][2]), e.length = this.map[t][0];
|
|
1599
|
+
n.push(e.slice()), e.length = 0;
|
|
1600
|
+
let r = n.pop();
|
|
1601
|
+
for (; r;) {
|
|
1602
|
+
for (let t of r) e.push(t);
|
|
1603
|
+
r = n.pop();
|
|
1604
|
+
}
|
|
1605
|
+
this.map.length = 0;
|
|
1606
|
+
}
|
|
1607
|
+
};
|
|
1608
|
+
function cn(e, t, n, r) {
|
|
1609
|
+
let i = 0;
|
|
1610
|
+
if (!(n === 0 && r.length === 0)) {
|
|
1611
|
+
for (; i < e.map.length;) {
|
|
1612
|
+
if (e.map[i][0] === t) {
|
|
1613
|
+
e.map[i][1] += n, e.map[i][2].push(...r);
|
|
1614
|
+
return;
|
|
1615
|
+
}
|
|
1616
|
+
i += 1;
|
|
1617
|
+
}
|
|
1618
|
+
e.map.push([
|
|
1619
|
+
t,
|
|
1620
|
+
n,
|
|
1621
|
+
r
|
|
1622
|
+
]);
|
|
1623
|
+
}
|
|
1624
|
+
}
|
|
1625
|
+
//#endregion
|
|
1626
|
+
//#region node_modules/micromark-extension-gfm-table/lib/infer.js
|
|
1627
|
+
function ln(e, t) {
|
|
1628
|
+
let n = !1, r = [];
|
|
1629
|
+
for (; t < e.length;) {
|
|
1630
|
+
let i = e[t];
|
|
1631
|
+
if (n) {
|
|
1632
|
+
if (i[0] === "enter") i[1].type === "tableContent" && r.push(e[t + 1][1].type === "tableDelimiterMarker" ? "left" : "none");
|
|
1633
|
+
else if (i[1].type === "tableContent") {
|
|
1634
|
+
if (e[t - 1][1].type === "tableDelimiterMarker") {
|
|
1635
|
+
let e = r.length - 1;
|
|
1636
|
+
r[e] = r[e] === "left" ? "center" : "right";
|
|
1637
|
+
}
|
|
1638
|
+
} else if (i[1].type === "tableDelimiterRow") break;
|
|
1639
|
+
} else i[0] === "enter" && i[1].type === "tableDelimiterRow" && (n = !0);
|
|
1640
|
+
t += 1;
|
|
1641
|
+
}
|
|
1642
|
+
return r;
|
|
1643
|
+
}
|
|
1644
|
+
//#endregion
|
|
1645
|
+
//#region node_modules/micromark-extension-gfm-table/lib/syntax.js
|
|
1646
|
+
function un() {
|
|
1647
|
+
return { flow: { null: {
|
|
1648
|
+
name: "table",
|
|
1649
|
+
tokenize: dn,
|
|
1650
|
+
resolveAll: fn
|
|
1651
|
+
} } };
|
|
1652
|
+
}
|
|
1653
|
+
function dn(e, t, n) {
|
|
1654
|
+
let r = this, i = 0, a = 0, o;
|
|
1655
|
+
return c;
|
|
1656
|
+
function c(e) {
|
|
1657
|
+
let t = r.events.length - 1;
|
|
1658
|
+
for (; t > -1;) {
|
|
1659
|
+
let e = r.events[t][1].type;
|
|
1660
|
+
if (e === "lineEnding" || e === "linePrefix") t--;
|
|
1661
|
+
else break;
|
|
1662
|
+
}
|
|
1663
|
+
let i = t > -1 ? r.events[t][1].type : null, a = i === "tableHead" || i === "tableRow" ? T : l;
|
|
1664
|
+
return a === T && r.parser.lazy[r.now().line] ? n(e) : a(e);
|
|
1665
|
+
}
|
|
1666
|
+
function l(t) {
|
|
1667
|
+
return e.enter("tableHead"), e.enter("tableRow"), f(t);
|
|
1668
|
+
}
|
|
1669
|
+
function f(e) {
|
|
1670
|
+
return e === 124 ? p(e) : (o = !0, a += 1, p(e));
|
|
1671
|
+
}
|
|
1672
|
+
function p(t) {
|
|
1673
|
+
return t === null ? n(t) : s(t) ? a > 1 ? (a = 0, r.interrupt = !0, e.exit("tableRow"), e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), ee) : n(t) : d(t) ? u(e, p, "whitespace")(t) : (a += 1, o && (o = !1, i += 1), t === 124 ? (e.enter("tableCellDivider"), e.consume(t), e.exit("tableCellDivider"), o = !0, p) : (e.enter("data"), h(t)));
|
|
1674
|
+
}
|
|
1675
|
+
function h(t) {
|
|
1676
|
+
return t === null || t === 124 || m(t) ? (e.exit("data"), p(t)) : (e.consume(t), t === 92 ? g : h);
|
|
1677
|
+
}
|
|
1678
|
+
function g(t) {
|
|
1679
|
+
return t === 92 || t === 124 ? (e.consume(t), h) : h(t);
|
|
1680
|
+
}
|
|
1681
|
+
function ee(t) {
|
|
1682
|
+
return r.interrupt = !1, r.parser.lazy[r.now().line] ? n(t) : (e.enter("tableDelimiterRow"), o = !1, d(t) ? u(e, _, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(t) : _(t));
|
|
1683
|
+
}
|
|
1684
|
+
function _(t) {
|
|
1685
|
+
return t === 45 || t === 58 ? y(t) : t === 124 ? (o = !0, e.enter("tableCellDivider"), e.consume(t), e.exit("tableCellDivider"), v) : w(t);
|
|
1686
|
+
}
|
|
1687
|
+
function v(t) {
|
|
1688
|
+
return d(t) ? u(e, y, "whitespace")(t) : y(t);
|
|
1689
|
+
}
|
|
1690
|
+
function y(t) {
|
|
1691
|
+
return t === 58 ? (a += 1, o = !0, e.enter("tableDelimiterMarker"), e.consume(t), e.exit("tableDelimiterMarker"), b) : t === 45 ? (a += 1, b(t)) : t === null || s(t) ? C(t) : w(t);
|
|
1692
|
+
}
|
|
1693
|
+
function b(t) {
|
|
1694
|
+
return t === 45 ? (e.enter("tableDelimiterFiller"), x(t)) : w(t);
|
|
1695
|
+
}
|
|
1696
|
+
function x(t) {
|
|
1697
|
+
return t === 45 ? (e.consume(t), x) : t === 58 ? (o = !0, e.exit("tableDelimiterFiller"), e.enter("tableDelimiterMarker"), e.consume(t), e.exit("tableDelimiterMarker"), S) : (e.exit("tableDelimiterFiller"), S(t));
|
|
1698
|
+
}
|
|
1699
|
+
function S(t) {
|
|
1700
|
+
return d(t) ? u(e, C, "whitespace")(t) : C(t);
|
|
1701
|
+
}
|
|
1702
|
+
function C(n) {
|
|
1703
|
+
return n === 124 ? _(n) : n === null || s(n) ? !o || i !== a ? w(n) : (e.exit("tableDelimiterRow"), e.exit("tableHead"), t(n)) : w(n);
|
|
1704
|
+
}
|
|
1705
|
+
function w(e) {
|
|
1706
|
+
return n(e);
|
|
1707
|
+
}
|
|
1708
|
+
function T(t) {
|
|
1709
|
+
return e.enter("tableRow"), E(t);
|
|
1710
|
+
}
|
|
1711
|
+
function E(n) {
|
|
1712
|
+
return n === 124 ? (e.enter("tableCellDivider"), e.consume(n), e.exit("tableCellDivider"), E) : n === null || s(n) ? (e.exit("tableRow"), t(n)) : d(n) ? u(e, E, "whitespace")(n) : (e.enter("data"), D(n));
|
|
1713
|
+
}
|
|
1714
|
+
function D(t) {
|
|
1715
|
+
return t === null || t === 124 || m(t) ? (e.exit("data"), E(t)) : (e.consume(t), t === 92 ? te : D);
|
|
1716
|
+
}
|
|
1717
|
+
function te(t) {
|
|
1718
|
+
return t === 92 || t === 124 ? (e.consume(t), D) : D(t);
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1721
|
+
function fn(e, t) {
|
|
1722
|
+
let n = -1, r = !0, i = 0, a = [
|
|
1723
|
+
0,
|
|
1724
|
+
0,
|
|
1725
|
+
0,
|
|
1726
|
+
0
|
|
1727
|
+
], o = [
|
|
1728
|
+
0,
|
|
1729
|
+
0,
|
|
1730
|
+
0,
|
|
1731
|
+
0
|
|
1732
|
+
], s = !1, c = 0, l, u, d, f = new sn();
|
|
1733
|
+
for (; ++n < e.length;) {
|
|
1734
|
+
let p = e[n], m = p[1];
|
|
1735
|
+
p[0] === "enter" ? m.type === "tableHead" ? (s = !1, c !== 0 && (Q(f, t, c, l, u), u = void 0, c = 0), l = {
|
|
1736
|
+
type: "table",
|
|
1737
|
+
start: Object.assign({}, m.start),
|
|
1738
|
+
end: Object.assign({}, m.end)
|
|
1739
|
+
}, f.add(n, 0, [[
|
|
1740
|
+
"enter",
|
|
1741
|
+
l,
|
|
1742
|
+
t
|
|
1743
|
+
]])) : m.type === "tableRow" || m.type === "tableDelimiterRow" ? (r = !0, d = void 0, a = [
|
|
1744
|
+
0,
|
|
1745
|
+
0,
|
|
1746
|
+
0,
|
|
1747
|
+
0
|
|
1748
|
+
], o = [
|
|
1749
|
+
0,
|
|
1750
|
+
n + 1,
|
|
1751
|
+
0,
|
|
1752
|
+
0
|
|
1753
|
+
], s && (s = !1, u = {
|
|
1754
|
+
type: "tableBody",
|
|
1755
|
+
start: Object.assign({}, m.start),
|
|
1756
|
+
end: Object.assign({}, m.end)
|
|
1757
|
+
}, f.add(n, 0, [[
|
|
1758
|
+
"enter",
|
|
1759
|
+
u,
|
|
1760
|
+
t
|
|
1761
|
+
]])), i = m.type === "tableDelimiterRow" ? 2 : u ? 3 : 1) : i && (m.type === "data" || m.type === "tableDelimiterMarker" || m.type === "tableDelimiterFiller") ? (r = !1, o[2] === 0 && (a[1] !== 0 && (o[0] = o[1], d = Z(f, t, a, i, void 0, d), a = [
|
|
1762
|
+
0,
|
|
1763
|
+
0,
|
|
1764
|
+
0,
|
|
1765
|
+
0
|
|
1766
|
+
]), o[2] = n)) : m.type === "tableCellDivider" && (r ? r = !1 : (a[1] !== 0 && (o[0] = o[1], d = Z(f, t, a, i, void 0, d)), a = o, o = [
|
|
1767
|
+
a[1],
|
|
1768
|
+
n,
|
|
1769
|
+
0,
|
|
1770
|
+
0
|
|
1771
|
+
])) : m.type === "tableHead" ? (s = !0, c = n) : m.type === "tableRow" || m.type === "tableDelimiterRow" ? (c = n, a[1] === 0 ? o[1] !== 0 && (d = Z(f, t, o, i, n, d)) : (o[0] = o[1], d = Z(f, t, a, i, n, d)), i = 0) : i && (m.type === "data" || m.type === "tableDelimiterMarker" || m.type === "tableDelimiterFiller") && (o[3] = n);
|
|
1772
|
+
}
|
|
1773
|
+
for (c !== 0 && Q(f, t, c, l, u), f.consume(t.events), n = -1; ++n < t.events.length;) {
|
|
1774
|
+
let e = t.events[n];
|
|
1775
|
+
e[0] === "enter" && e[1].type === "table" && (e[1]._align = ln(t.events, n));
|
|
1776
|
+
}
|
|
1777
|
+
return e;
|
|
1778
|
+
}
|
|
1779
|
+
function Z(e, t, n, r, i, a) {
|
|
1780
|
+
let o = r === 1 ? "tableHeader" : r === 2 ? "tableDelimiter" : "tableData";
|
|
1781
|
+
n[0] !== 0 && (a.end = Object.assign({}, $(t.events, n[0])), e.add(n[0], 0, [[
|
|
1782
|
+
"exit",
|
|
1783
|
+
a,
|
|
1784
|
+
t
|
|
1785
|
+
]]));
|
|
1786
|
+
let s = $(t.events, n[1]);
|
|
1787
|
+
if (a = {
|
|
1788
|
+
type: o,
|
|
1789
|
+
start: Object.assign({}, s),
|
|
1790
|
+
end: Object.assign({}, s)
|
|
1791
|
+
}, e.add(n[1], 0, [[
|
|
1792
|
+
"enter",
|
|
1793
|
+
a,
|
|
1794
|
+
t
|
|
1795
|
+
]]), n[2] !== 0) {
|
|
1796
|
+
let i = $(t.events, n[2]), a = $(t.events, n[3]), o = {
|
|
1797
|
+
type: "tableContent",
|
|
1798
|
+
start: Object.assign({}, i),
|
|
1799
|
+
end: Object.assign({}, a)
|
|
1800
|
+
};
|
|
1801
|
+
if (e.add(n[2], 0, [[
|
|
1802
|
+
"enter",
|
|
1803
|
+
o,
|
|
1804
|
+
t
|
|
1805
|
+
]]), r !== 2) {
|
|
1806
|
+
let r = t.events[n[2]], i = t.events[n[3]];
|
|
1807
|
+
if (r[1].end = Object.assign({}, i[1].end), r[1].type = "chunkText", r[1].contentType = "text", n[3] > n[2] + 1) {
|
|
1808
|
+
let t = n[2] + 1, r = n[3] - n[2] - 1;
|
|
1809
|
+
e.add(t, r, []);
|
|
1810
|
+
}
|
|
1811
|
+
}
|
|
1812
|
+
e.add(n[3] + 1, 0, [[
|
|
1813
|
+
"exit",
|
|
1814
|
+
o,
|
|
1815
|
+
t
|
|
1816
|
+
]]);
|
|
1817
|
+
}
|
|
1818
|
+
return i !== void 0 && (a.end = Object.assign({}, $(t.events, i)), e.add(i, 0, [[
|
|
1819
|
+
"exit",
|
|
1820
|
+
a,
|
|
1821
|
+
t
|
|
1822
|
+
]]), a = void 0), a;
|
|
1823
|
+
}
|
|
1824
|
+
function Q(e, t, n, r, i) {
|
|
1825
|
+
let a = [], o = $(t.events, n);
|
|
1826
|
+
i && (i.end = Object.assign({}, o), a.push([
|
|
1827
|
+
"exit",
|
|
1828
|
+
i,
|
|
1829
|
+
t
|
|
1830
|
+
])), r.end = Object.assign({}, o), a.push([
|
|
1831
|
+
"exit",
|
|
1832
|
+
r,
|
|
1833
|
+
t
|
|
1834
|
+
]), e.add(n + 1, 0, a);
|
|
1835
|
+
}
|
|
1836
|
+
function $(e, t) {
|
|
1837
|
+
let n = e[t], r = n[0] === "enter" ? "start" : "end";
|
|
1838
|
+
return n[1][r];
|
|
1839
|
+
}
|
|
1840
|
+
//#endregion
|
|
1841
|
+
//#region node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js
|
|
1842
|
+
var pn = {
|
|
1843
|
+
name: "tasklistCheck",
|
|
1844
|
+
tokenize: hn
|
|
1845
|
+
};
|
|
1846
|
+
function mn() {
|
|
1847
|
+
return { text: { 91: pn } };
|
|
1848
|
+
}
|
|
1849
|
+
function hn(e, t, n) {
|
|
1850
|
+
let r = this;
|
|
1851
|
+
return i;
|
|
1852
|
+
function i(t) {
|
|
1853
|
+
return r.previous !== null || !r._gfmTasklistFirstContentOfListItem ? n(t) : (e.enter("taskListCheck"), e.enter("taskListCheckMarker"), e.consume(t), e.exit("taskListCheckMarker"), a);
|
|
1854
|
+
}
|
|
1855
|
+
function a(t) {
|
|
1856
|
+
return m(t) ? (e.enter("taskListCheckValueUnchecked"), e.consume(t), e.exit("taskListCheckValueUnchecked"), o) : t === 88 || t === 120 ? (e.enter("taskListCheckValueChecked"), e.consume(t), e.exit("taskListCheckValueChecked"), o) : n(t);
|
|
1857
|
+
}
|
|
1858
|
+
function o(t) {
|
|
1859
|
+
return t === 93 ? (e.enter("taskListCheckMarker"), e.consume(t), e.exit("taskListCheckMarker"), e.exit("taskListCheck"), c) : n(t);
|
|
1860
|
+
}
|
|
1861
|
+
function c(r) {
|
|
1862
|
+
return s(r) ? t(r) : d(r) ? e.check({ tokenize: gn }, t, n)(r) : n(r);
|
|
1863
|
+
}
|
|
1864
|
+
}
|
|
1865
|
+
function gn(e, t, n) {
|
|
1866
|
+
return u(e, r, "whitespace");
|
|
1867
|
+
function r(e) {
|
|
1868
|
+
return e === null ? n(e) : t(e);
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
//#endregion
|
|
1872
|
+
//#region node_modules/micromark-extension-gfm/index.js
|
|
1873
|
+
function _n(e) {
|
|
1874
|
+
return ee([
|
|
1875
|
+
Rt(),
|
|
1876
|
+
Zt(),
|
|
1877
|
+
on(e),
|
|
1878
|
+
un(),
|
|
1879
|
+
mn()
|
|
1880
|
+
]);
|
|
1881
|
+
}
|
|
1882
|
+
//#endregion
|
|
1883
|
+
//#region node_modules/remark-gfm/lib/index.js
|
|
1884
|
+
var vn = {};
|
|
1885
|
+
function yn(e) {
|
|
1886
|
+
let t = this, n = e || vn, r = t.data(), i = r.micromarkExtensions ||= [], a = r.fromMarkdownExtensions ||= [], o = r.toMarkdownExtensions ||= [];
|
|
1887
|
+
i.push(_n(n)), a.push(kt()), o.push(At(n));
|
|
1888
|
+
}
|
|
1889
|
+
//#endregion
|
|
1890
|
+
export { yn as default };
|