eddyter 1.3.64 → 1.3.65
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/LICENSE +24 -24
- package/README.md +493 -493
- package/dist/Provider/EditorProvider.d.ts +1 -0
- package/dist/api/auth.d.ts +9 -0
- package/dist/assets/style.css +1 -1
- package/dist/{babel-CCPWkrf4.js → babel-B9hn44Wo.js} +726 -1302
- package/dist/components/LockedFeature/LockedFeature.d.ts +8 -2
- package/dist/{estree-CxUPh9wa.js → estree-CocPn_Md.js} +529 -917
- package/dist/{html-CmniStvG.js → html-CxCicOef.js} +350 -589
- package/dist/{html2pdf.bundle-C1B1lr_T.js → html2pdf.bundle-9PCiy6C2.js} +2778 -3797
- package/dist/{html2pdf.bundle.min-kPviTsNx.js → html2pdf.bundle.min-D_g_u6ug.js} +3405 -5221
- package/dist/{index-BpsoOKOs.js → index-B9Gjsq91.js} +1 -1
- package/dist/{index-BL8HWCRw.js → index-CI28isEa.js} +9 -12
- package/dist/{index-FZVNbwSO.js → index-DWw_26Wr.js} +8155 -8463
- package/dist/{index-DHKx5grA.js → index-dZIrqvsF.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{markdown-B0mEGGfQ.js → markdown-BUjgWFLu.js} +578 -1015
- package/dist/{postcss-B0bxXf7u.js → postcss-CGIcwj_g.js} +615 -1065
- package/dist/{standalone-DmuJV5rn.js → standalone-C0qguT38.js} +350 -596
- package/dist/{typescript-DZlC_9M8.js → typescript-BM7wk6k-.js} +1114 -1806
- package/package.json +151 -151
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
var Qt = Object.create, Ie = Object.defineProperty, ur = Object.getOwnPropertyDescriptor, er = Object.getOwnPropertyNames, tr = Object.getPrototypeOf, rr = Object.prototype.hasOwnProperty, mt = (u) => {
|
|
2
2
|
throw TypeError(u);
|
|
3
3
|
}, N = (u, e) => () => (e || u((e = { exports: {} }).exports, e), e.exports), Et = (u, e) => {
|
|
4
|
-
for (var t in e)
|
|
5
|
-
Ie(u, t, { get: e[t], enumerable: !0 });
|
|
4
|
+
for (var t in e) Ie(u, t, { get: e[t], enumerable: !0 });
|
|
6
5
|
}, nr = (u, e, t, n) => {
|
|
7
|
-
if (e && typeof e == "object" || typeof e == "function")
|
|
8
|
-
for (let r of er(e))
|
|
9
|
-
!rr.call(u, r) && r !== t && Ie(u, r, { get: () => e[r], enumerable: !(n = ur(e, r)) || n.enumerable });
|
|
6
|
+
if (e && typeof e == "object" || typeof e == "function") for (let r of er(e)) !rr.call(u, r) && r !== t && Ie(u, r, { get: () => e[r], enumerable: !(n = ur(e, r)) || n.enumerable });
|
|
10
7
|
return u;
|
|
11
8
|
}, Mu = (u, e, t) => (t = u != null ? Qt(tr(u)) : {}, nr(Ie(t, "default", { value: u, enumerable: !0 }), u)), vt = (u, e, t) => e.has(u) || mt("Cannot " + t), ku = (u, e, t) => (vt(u, e, "read from private field"), e.get(u)), ir = (u, e, t) => e.has(u) ? mt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(u) : e.set(u, t), ar = (u, e, t, n) => (vt(u, e, "write to private field"), e.set(u, t), t), Pe = N((u, e) => {
|
|
12
9
|
e.exports = t;
|
|
@@ -27,16 +24,13 @@ var Qt = Object.create, Ie = Object.defineProperty, ur = Object.getOwnPropertyDe
|
|
|
27
24
|
return !!(d && d.prototype && d.prototype.visitors);
|
|
28
25
|
}
|
|
29
26
|
function v(d, C) {
|
|
30
|
-
for (var g = C || {}, y = d.prototype, w = y.blockTokenizers, T = y.inlineTokenizers, b = y.blockMethods, k = y.inlineMethods, L = w.definition, I = T.reference, x = [], S = -1, M = b.length, z; ++S < M; )
|
|
31
|
-
z = b[S], !(z === "newline" || z === "indentedCode" || z === "paragraph" || z === "footnoteDefinition") && x.push([z]);
|
|
27
|
+
for (var g = C || {}, y = d.prototype, w = y.blockTokenizers, T = y.inlineTokenizers, b = y.blockMethods, k = y.inlineMethods, L = w.definition, I = T.reference, x = [], S = -1, M = b.length, z; ++S < M; ) z = b[S], !(z === "newline" || z === "indentedCode" || z === "paragraph" || z === "footnoteDefinition") && x.push([z]);
|
|
32
28
|
x.push(["footnoteDefinition"]), g.inlineNotes && (B(k, "reference", "inlineNote"), T.inlineNote = J), B(b, "definition", "footnoteDefinition"), B(k, "reference", "footnoteCall"), w.definition = O, w.footnoteDefinition = V, T.footnoteCall = q, T.reference = j, y.interruptFootnoteDefinition = x, j.locator = I.locator, q.locator = $, J.locator = U;
|
|
33
29
|
function V(R, P, G) {
|
|
34
|
-
for (var W = this, Y = W.interruptFootnoteDefinition, K = W.offset, eu = P.length + 1, H = 0, Q = [], Du, su, uu, _, X, pu, yu, hu, Fu, nu, du, tu, Z; H < eu && (_ = P.charCodeAt(H), !(_ !== t && _ !== r)); )
|
|
35
|
-
H++;
|
|
30
|
+
for (var W = this, Y = W.interruptFootnoteDefinition, K = W.offset, eu = P.length + 1, H = 0, Q = [], Du, su, uu, _, X, pu, yu, hu, Fu, nu, du, tu, Z; H < eu && (_ = P.charCodeAt(H), !(_ !== t && _ !== r)); ) H++;
|
|
36
31
|
if (P.charCodeAt(H++) === a && P.charCodeAt(H++) === s) {
|
|
37
32
|
for (su = H; H < eu; ) {
|
|
38
|
-
if (_ = P.charCodeAt(H), _ !== _ || _ === n || _ === t || _ === r)
|
|
39
|
-
return;
|
|
33
|
+
if (_ = P.charCodeAt(H), _ !== _ || _ === n || _ === t || _ === r) return;
|
|
40
34
|
if (_ === D) {
|
|
41
35
|
uu = H, H++;
|
|
42
36
|
break;
|
|
@@ -44,25 +38,18 @@ var Qt = Object.create, Ie = Object.defineProperty, ur = Object.getOwnPropertyDe
|
|
|
44
38
|
H++;
|
|
45
39
|
}
|
|
46
40
|
if (!(uu === void 0 || su === uu || P.charCodeAt(H++) !== o)) {
|
|
47
|
-
if (G)
|
|
48
|
-
return !0;
|
|
41
|
+
if (G) return !0;
|
|
49
42
|
for (Du = P.slice(su, uu), X = R.now(), Fu = 0, nu = 0, du = H, tu = []; H < eu; ) {
|
|
50
|
-
if (_ = P.charCodeAt(H), _ !== _ || _ === n)
|
|
51
|
-
|
|
52
|
-
else
|
|
53
|
-
if (
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
if (nu < f && Z && (Z.contentStart === Z.contentEnd || m(Y, w, W, [R, P.slice(H, h), !0])))
|
|
57
|
-
break;
|
|
58
|
-
nu = void 0, du = H;
|
|
59
|
-
}
|
|
43
|
+
if (_ = P.charCodeAt(H), _ !== _ || _ === n) Z = { start: Fu, contentStart: du || H, contentEnd: H, end: H }, tu.push(Z), _ === n && (Fu = H + 1, nu = 0, du = void 0, Z.end = Fu);
|
|
44
|
+
else if (nu !== void 0) if (_ === r || _ === t) nu += _ === r ? 1 : f - nu % f, nu > f && (nu = void 0, du = H);
|
|
45
|
+
else {
|
|
46
|
+
if (nu < f && Z && (Z.contentStart === Z.contentEnd || m(Y, w, W, [R, P.slice(H, h), !0]))) break;
|
|
47
|
+
nu = void 0, du = H;
|
|
48
|
+
}
|
|
60
49
|
H++;
|
|
61
50
|
}
|
|
62
|
-
for (H = -1, eu = tu.length; eu > 0 && (Z = tu[eu - 1], Z.contentStart === Z.contentEnd); )
|
|
63
|
-
|
|
64
|
-
for (pu = R(P.slice(0, Z.contentEnd)); ++H < eu; )
|
|
65
|
-
Z = tu[H], K[X.line + H] = (K[X.line + H] || 0) + (Z.contentStart - Z.start), Q.push(P.slice(Z.contentStart, Z.end));
|
|
51
|
+
for (H = -1, eu = tu.length; eu > 0 && (Z = tu[eu - 1], Z.contentStart === Z.contentEnd); ) eu--;
|
|
52
|
+
for (pu = R(P.slice(0, Z.contentEnd)); ++H < eu; ) Z = tu[H], K[X.line + H] = (K[X.line + H] || 0) + (Z.contentStart - Z.start), Q.push(P.slice(Z.contentStart, Z.end));
|
|
66
53
|
return yu = W.enterBlock(), hu = W.tokenizeBlock(Q.join(""), X), yu(), pu({ type: "footnoteDefinition", identifier: Du.toLowerCase(), label: Du, children: hu });
|
|
67
54
|
}
|
|
68
55
|
}
|
|
@@ -71,62 +58,46 @@ var Qt = Object.create, Ie = Object.defineProperty, ur = Object.getOwnPropertyDe
|
|
|
71
58
|
var W = P.length + 1, Y = 0, K, eu, H, Q;
|
|
72
59
|
if (P.charCodeAt(Y++) === a && P.charCodeAt(Y++) === s) {
|
|
73
60
|
for (eu = Y; Y < W; ) {
|
|
74
|
-
if (Q = P.charCodeAt(Y), Q !== Q || Q === n || Q === t || Q === r)
|
|
75
|
-
return;
|
|
61
|
+
if (Q = P.charCodeAt(Y), Q !== Q || Q === n || Q === t || Q === r) return;
|
|
76
62
|
if (Q === D) {
|
|
77
63
|
H = Y, Y++;
|
|
78
64
|
break;
|
|
79
65
|
}
|
|
80
66
|
Y++;
|
|
81
67
|
}
|
|
82
|
-
if (!(H === void 0 || eu === H))
|
|
83
|
-
return G ? !0 : (K = P.slice(eu, H), R(P.slice(0, Y))({ type: "footnoteReference", identifier: K.toLowerCase(), label: K }));
|
|
68
|
+
if (!(H === void 0 || eu === H)) return G ? !0 : (K = P.slice(eu, H), R(P.slice(0, Y))({ type: "footnoteReference", identifier: K.toLowerCase(), label: K }));
|
|
84
69
|
}
|
|
85
70
|
}
|
|
86
71
|
function J(R, P, G) {
|
|
87
72
|
var W = this, Y = P.length + 1, K = 0, eu = 0, H, Q, Du, su, uu, _, X;
|
|
88
73
|
if (P.charCodeAt(K++) === s && P.charCodeAt(K++) === a) {
|
|
89
74
|
for (Du = K; K < Y; ) {
|
|
90
|
-
if (Q = P.charCodeAt(K), Q !== Q)
|
|
91
|
-
|
|
92
|
-
if (
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
else if (Q === D)
|
|
98
|
-
if (eu === 0) {
|
|
99
|
-
su = K, K++;
|
|
100
|
-
break;
|
|
101
|
-
} else
|
|
102
|
-
eu--, K++;
|
|
103
|
-
else if (Q === c) {
|
|
104
|
-
for (uu = K, _ = 1; P.charCodeAt(uu + _) === c; )
|
|
105
|
-
_++;
|
|
106
|
-
K += _;
|
|
107
|
-
} else
|
|
108
|
-
K++;
|
|
75
|
+
if (Q = P.charCodeAt(K), Q !== Q) return;
|
|
76
|
+
if (_ === void 0) if (Q === l) K += 2;
|
|
77
|
+
else if (Q === a) eu++, K++;
|
|
78
|
+
else if (Q === D) if (eu === 0) {
|
|
79
|
+
su = K, K++;
|
|
80
|
+
break;
|
|
81
|
+
} else eu--, K++;
|
|
109
82
|
else if (Q === c) {
|
|
110
|
-
for (uu = K,
|
|
111
|
-
|
|
83
|
+
for (uu = K, _ = 1; P.charCodeAt(uu + _) === c; ) _++;
|
|
84
|
+
K += _;
|
|
85
|
+
} else K++;
|
|
86
|
+
else if (Q === c) {
|
|
87
|
+
for (uu = K, X = 1; P.charCodeAt(uu + X) === c; ) X++;
|
|
112
88
|
K += X, _ === X && (_ = void 0), X = void 0;
|
|
113
|
-
} else
|
|
114
|
-
K++;
|
|
89
|
+
} else K++;
|
|
115
90
|
}
|
|
116
|
-
if (su !== void 0)
|
|
117
|
-
return G ? !0 : (H = R.now(), H.column += 2, H.offset += 2, R(P.slice(0, K))({ type: "footnote", children: W.tokenizeInline(P.slice(Du, su), H) }));
|
|
91
|
+
if (su !== void 0) return G ? !0 : (H = R.now(), H.column += 2, H.offset += 2, R(P.slice(0, K))({ type: "footnote", children: W.tokenizeInline(P.slice(Du, su), H) }));
|
|
118
92
|
}
|
|
119
93
|
}
|
|
120
94
|
function j(R, P, G) {
|
|
121
95
|
var W = 0;
|
|
122
|
-
if (P.charCodeAt(W) === i && W++, P.charCodeAt(W) === a && P.charCodeAt(W + 1) !== s)
|
|
123
|
-
return I.call(this, R, P, G);
|
|
96
|
+
if (P.charCodeAt(W) === i && W++, P.charCodeAt(W) === a && P.charCodeAt(W + 1) !== s) return I.call(this, R, P, G);
|
|
124
97
|
}
|
|
125
98
|
function O(R, P, G) {
|
|
126
|
-
for (var W = 0, Y = P.charCodeAt(W); Y === r || Y === t; )
|
|
127
|
-
|
|
128
|
-
if (Y === a && P.charCodeAt(W + 1) !== s)
|
|
129
|
-
return L.call(this, R, P, G);
|
|
99
|
+
for (var W = 0, Y = P.charCodeAt(W); Y === r || Y === t; ) Y = P.charCodeAt(++W);
|
|
100
|
+
if (Y === a && P.charCodeAt(W + 1) !== s) return L.call(this, R, P, G);
|
|
130
101
|
}
|
|
131
102
|
function $(R, P) {
|
|
132
103
|
return R.indexOf("[", P);
|
|
@@ -148,8 +119,7 @@ var Qt = Object.create, Ie = Object.defineProperty, ur = Object.getOwnPropertyDe
|
|
|
148
119
|
for (var k = this.all(b).join(`
|
|
149
120
|
|
|
150
121
|
`).split(`
|
|
151
|
-
`), L = 0, I = k.length, x; ++L < I; )
|
|
152
|
-
x = k[L], x !== "" && (k[L] = g + x);
|
|
122
|
+
`), L = 0, I = k.length, x; ++L < I; ) x = k[L], x !== "" && (k[L] = g + x);
|
|
153
123
|
return "[^" + (b.label || b.identifier) + "]: " + k.join(`
|
|
154
124
|
`);
|
|
155
125
|
}
|
|
@@ -158,9 +128,7 @@ var Qt = Object.create, Ie = Object.defineProperty, ur = Object.getOwnPropertyDe
|
|
|
158
128
|
d.splice(d.indexOf(C), 0, g);
|
|
159
129
|
}
|
|
160
130
|
function m(d, C, g, y) {
|
|
161
|
-
for (var w = d.length, T = -1; ++T < w; )
|
|
162
|
-
if (C[d[T][0]].apply(g, y))
|
|
163
|
-
return !0;
|
|
131
|
+
for (var w = d.length, T = -1; ++T < w; ) if (C[d[T][0]].apply(g, y)) return !0;
|
|
164
132
|
return !1;
|
|
165
133
|
}
|
|
166
134
|
}), xt = N((u) => {
|
|
@@ -188,8 +156,7 @@ var Qt = Object.create, Ie = Object.defineProperty, ur = Object.getOwnPropertyDe
|
|
|
188
156
|
function B(m, d, C) {
|
|
189
157
|
let g = d.length, y = !1, w = !1, T = 0, b, k, L, I, x, S, M;
|
|
190
158
|
if (d.charCodeAt(T) === l && (w = !0, T++), d.charCodeAt(T) === i) {
|
|
191
|
-
if (T++, w)
|
|
192
|
-
return C ? !0 : m(d.slice(0, T))({ type: "text", value: "$" });
|
|
159
|
+
if (T++, w) return C ? !0 : m(d.slice(0, T))({ type: "text", value: "$" });
|
|
193
160
|
if (d.charCodeAt(T) === i && (y = !0, T++), L = d.charCodeAt(T), !(L === r || L === n)) {
|
|
194
161
|
for (I = T; T < g; ) {
|
|
195
162
|
if (k = L, L = d.charCodeAt(T + 1), k === i) {
|
|
@@ -197,12 +164,10 @@ var Qt = Object.create, Ie = Object.defineProperty, ur = Object.getOwnPropertyDe
|
|
|
197
164
|
x = T - 1, T++, y && T++, S = T;
|
|
198
165
|
break;
|
|
199
166
|
}
|
|
200
|
-
} else
|
|
201
|
-
k === l && (T++, L = d.charCodeAt(T + 1));
|
|
167
|
+
} else k === l && (T++, L = d.charCodeAt(T + 1));
|
|
202
168
|
T++;
|
|
203
169
|
}
|
|
204
|
-
if (S !== void 0)
|
|
205
|
-
return C ? !0 : (M = d.slice(I, x + 1), m(d.slice(0, S))({ type: "inlineMath", value: M, data: { hName: "span", hProperties: { className: D.concat(y && E.inlineMathDouble ? [s] : []) }, hChildren: [{ type: "text", value: M }] } }));
|
|
170
|
+
if (S !== void 0) return C ? !0 : (M = d.slice(I, x + 1), m(d.slice(0, S))({ type: "inlineMath", value: M, data: { hName: "span", hProperties: { className: D.concat(y && E.inlineMathDouble ? [s] : []) }, hChildren: [{ type: "text", value: M }] } }));
|
|
206
171
|
}
|
|
207
172
|
}
|
|
208
173
|
}
|
|
@@ -230,35 +195,23 @@ var Qt = Object.create, Ie = Object.defineProperty, ur = Object.getOwnPropertyDe
|
|
|
230
195
|
function B(m, d, C) {
|
|
231
196
|
var g = d.length, y = 0;
|
|
232
197
|
let w, T, b, k, L, I, x, S, M, z, V;
|
|
233
|
-
for (; y < g && d.charCodeAt(y) === r; )
|
|
234
|
-
|
|
235
|
-
for (L = y; y < g && d.charCodeAt(y) === i; )
|
|
236
|
-
y++;
|
|
198
|
+
for (; y < g && d.charCodeAt(y) === r; ) y++;
|
|
199
|
+
for (L = y; y < g && d.charCodeAt(y) === i; ) y++;
|
|
237
200
|
if (I = y - L, !(I < l)) {
|
|
238
|
-
for (; y < g && d.charCodeAt(y) === r; )
|
|
239
|
-
y++;
|
|
201
|
+
for (; y < g && d.charCodeAt(y) === r; ) y++;
|
|
240
202
|
for (x = y; y < g; ) {
|
|
241
|
-
if (w = d.charCodeAt(y), w === i)
|
|
242
|
-
|
|
243
|
-
if (w === n)
|
|
244
|
-
break;
|
|
203
|
+
if (w = d.charCodeAt(y), w === i) return;
|
|
204
|
+
if (w === n) break;
|
|
245
205
|
y++;
|
|
246
206
|
}
|
|
247
207
|
if (d.charCodeAt(y) === n) {
|
|
248
|
-
if (C)
|
|
249
|
-
return !0;
|
|
208
|
+
if (C) return !0;
|
|
250
209
|
for (T = [], x !== y && T.push(d.slice(x, y)), y++, b = d.indexOf(o, y + 1), b = b === -1 ? g : b; y < g; ) {
|
|
251
|
-
for (S = !1, z = y, V = b, k = b, M = 0; k > z && d.charCodeAt(k - 1) === r; )
|
|
252
|
-
|
|
253
|
-
for (
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
z++;
|
|
257
|
-
if (S)
|
|
258
|
-
for (; V > z && d.charCodeAt(V - 1) === r; )
|
|
259
|
-
V--;
|
|
260
|
-
if ((!S || z !== V) && T.push(d.slice(z, V)), S)
|
|
261
|
-
break;
|
|
210
|
+
for (S = !1, z = y, V = b, k = b, M = 0; k > z && d.charCodeAt(k - 1) === r; ) k--;
|
|
211
|
+
for (; k > z && d.charCodeAt(k - 1) === i; ) M++, k--;
|
|
212
|
+
for (I <= M && d.indexOf(a, z) === k && (S = !0, V = k); z <= V && z - y < L && d.charCodeAt(z) === r; ) z++;
|
|
213
|
+
if (S) for (; V > z && d.charCodeAt(V - 1) === r; ) V--;
|
|
214
|
+
if ((!S || z !== V) && T.push(d.slice(z, V)), S) break;
|
|
262
215
|
y = b + 1, b = d.indexOf(o, y + 1), b = b === -1 ? g : b;
|
|
263
216
|
}
|
|
264
217
|
return T = T.join(`
|
|
@@ -289,8 +242,7 @@ $$`;
|
|
|
289
242
|
function n() {
|
|
290
243
|
for (var r = {}, i = 0; i < arguments.length; i++) {
|
|
291
244
|
var o = arguments[i];
|
|
292
|
-
for (var a in o)
|
|
293
|
-
t.call(o, a) && (r[a] = o[a]);
|
|
245
|
+
for (var a in o) t.call(o, a) && (r[a] = o[a]);
|
|
294
246
|
}
|
|
295
247
|
return r;
|
|
296
248
|
}
|
|
@@ -311,8 +263,7 @@ $$`;
|
|
|
311
263
|
function r(i) {
|
|
312
264
|
var o, a, l;
|
|
313
265
|
n(s, i), n(D, s), o = s.prototype;
|
|
314
|
-
for (a in o)
|
|
315
|
-
l = o[a], l && typeof l == "object" && (o[a] = "concat" in l ? l.concat() : t(l));
|
|
266
|
+
for (a in o) l = o[a], l && typeof l == "object" && (o[a] = "concat" in l ? l.concat() : t(l));
|
|
316
267
|
return s;
|
|
317
268
|
function D(c) {
|
|
318
269
|
return i.apply(this, c);
|
|
@@ -336,15 +287,12 @@ $$`;
|
|
|
336
287
|
}), hr = N((u, e) => {
|
|
337
288
|
e.exports = t;
|
|
338
289
|
function t(n) {
|
|
339
|
-
for (var r = String(n), i = [], o = /\r?\n|\r/g; o.exec(r); )
|
|
340
|
-
i.push(o.lastIndex);
|
|
290
|
+
for (var r = String(n), i = [], o = /\r?\n|\r/g; o.exec(r); ) i.push(o.lastIndex);
|
|
341
291
|
return i.push(r.length + 1), { toPoint: a, toPosition: a, toOffset: l };
|
|
342
292
|
function a(D) {
|
|
343
293
|
var s = -1;
|
|
344
294
|
if (D > -1 && D < i[i.length - 1]) {
|
|
345
|
-
for (; ++s < i.length; )
|
|
346
|
-
if (i[s] > D)
|
|
347
|
-
return { line: s + 1, column: D - (i[s - 1] || 0) + 1, offset: D };
|
|
295
|
+
for (; ++s < i.length; ) if (i[s] > D) return { line: s + 1, column: D - (i[s - 1] || 0) + 1, offset: D };
|
|
348
296
|
}
|
|
349
297
|
return {};
|
|
350
298
|
}
|
|
@@ -359,8 +307,7 @@ $$`;
|
|
|
359
307
|
function n(r, i) {
|
|
360
308
|
return o;
|
|
361
309
|
function o(a) {
|
|
362
|
-
for (var l = 0, D = a.indexOf(t), s = r[i], c = [], f; D !== -1; )
|
|
363
|
-
c.push(a.slice(l, D)), l = D + 1, f = a.charAt(l), (!f || s.indexOf(f) === -1) && c.push(t), D = a.indexOf(t, l + 1);
|
|
310
|
+
for (var l = 0, D = a.indexOf(t), s = r[i], c = [], f; D !== -1; ) c.push(a.slice(l, D)), l = D + 1, f = a.charAt(l), (!f || s.indexOf(f) === -1) && c.push(t), D = a.indexOf(t, l + 1);
|
|
364
311
|
return c.push(a.slice(l)), c.join("");
|
|
365
312
|
}
|
|
366
313
|
}
|
|
@@ -414,23 +361,19 @@ $$`;
|
|
|
414
361
|
function J(U, R) {
|
|
415
362
|
var P = {}, G, W;
|
|
416
363
|
R || (R = {});
|
|
417
|
-
for (W in c)
|
|
418
|
-
G = R[W], P[W] = G ?? c[W];
|
|
364
|
+
for (W in c) G = R[W], P[W] = G ?? c[W];
|
|
419
365
|
return (P.position.indent || P.position.start) && (P.indent = P.position.indent || [], P.position = P.position.start), j(U, P);
|
|
420
366
|
}
|
|
421
367
|
function j(U, R) {
|
|
422
368
|
var P = R.additional, G = R.nonTerminated, W = R.text, Y = R.reference, K = R.warning, eu = R.textContext, H = R.referenceContext, Q = R.warningContext, Du = R.position, su = R.indent || [], uu = U.length, _ = 0, X = -1, pu = Du.column || 1, yu = Du.line || 1, hu = "", Fu = [], nu, du, tu, Z, wu, au, ru, gu, De, ye, Ou, Yu, Ru, vu, We, Ku, ce, mu, ou;
|
|
423
|
-
for (typeof P == "string" && (P = P.charCodeAt(0)), Ku = Xu(), gu = K ? Zt : s, _--, uu++; ++_ < uu; )
|
|
424
|
-
if (
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
tu = U.charCodeAt(ou) === v, tu && (ou++, du = vu === y ? a(Z) : !1, du && (nu = Z, Ou = du)), mu = 1 + ou - Ru, !tu && !G || (Z ? vu === y ? (tu && !Ou ? gu(M, 1) : (nu !== Z && (ou = Yu + nu.length, mu = 1 + ou - Yu, tu = !1), tu || (De = nu ? L : x, R.attribute ? (ru = U.charCodeAt(ou), ru === B ? (gu(De, mu), Ou = null) : o(ru) ? Ou = null : gu(De, mu)) : gu(De, mu))), au = Ou) : (tu || gu(I, mu), au = parseInt(Z, b[vu]), O(au) ? (gu(V, mu), au = D(g)) : au in n ? (gu(z, mu), au = n[au]) : (ye = "", $(au) && gu(z, mu), au > 65535 && (au -= 65536, ye += D(au >>> 10 | 55296), au = 56320 | au & 1023), au = ye + D(au))) : vu !== y && gu(S, mu)), au ? (He(), Ku = Xu(), _ = ou - 1, pu += ou - Ru + 1, Fu.push(au), ce = Xu(), ce.offset++, Y && Y.call(H, au, { start: Ku, end: ce }, U.slice(Ru - 1, ou)), Ku = ce) : (Z = U.slice(Ru - 1, ou), hu += Z, pu += Z.length, _ = ou - 1);
|
|
432
|
-
} else
|
|
433
|
-
wu === 10 && (yu++, X++, pu = 0), wu === wu ? (hu += D(wu), pu++) : He();
|
|
369
|
+
for (typeof P == "string" && (P = P.charCodeAt(0)), Ku = Xu(), gu = K ? Zt : s, _--, uu++; ++_ < uu; ) if (wu === h && (pu = su[X] || 1), wu = U.charCodeAt(_), wu === A) {
|
|
370
|
+
if (ru = U.charCodeAt(_ + 1), ru === f || ru === h || ru === p || ru === E || ru === A || ru === F || ru !== ru || P && ru === P) {
|
|
371
|
+
hu += D(wu), pu++;
|
|
372
|
+
continue;
|
|
373
|
+
}
|
|
374
|
+
for (Ru = _ + 1, Yu = Ru, ou = Ru, ru === m ? (ou = ++Yu, ru = U.charCodeAt(ou), ru === d || ru === C ? (vu = w, ou = ++Yu) : vu = T) : vu = y, nu = "", Ou = "", Z = "", We = k[vu], ou--; ++ou < uu && (ru = U.charCodeAt(ou), !!We(ru)); ) Z += D(ru), vu === y && l.call(t, Z) && (nu = Z, Ou = t[Z]);
|
|
375
|
+
tu = U.charCodeAt(ou) === v, tu && (ou++, du = vu === y ? a(Z) : !1, du && (nu = Z, Ou = du)), mu = 1 + ou - Ru, !tu && !G || (Z ? vu === y ? (tu && !Ou ? gu(M, 1) : (nu !== Z && (ou = Yu + nu.length, mu = 1 + ou - Yu, tu = !1), tu || (De = nu ? L : x, R.attribute ? (ru = U.charCodeAt(ou), ru === B ? (gu(De, mu), Ou = null) : o(ru) ? Ou = null : gu(De, mu)) : gu(De, mu))), au = Ou) : (tu || gu(I, mu), au = parseInt(Z, b[vu]), O(au) ? (gu(V, mu), au = D(g)) : au in n ? (gu(z, mu), au = n[au]) : (ye = "", $(au) && gu(z, mu), au > 65535 && (au -= 65536, ye += D(au >>> 10 | 55296), au = 56320 | au & 1023), au = ye + D(au))) : vu !== y && gu(S, mu)), au ? (He(), Ku = Xu(), _ = ou - 1, pu += ou - Ru + 1, Fu.push(au), ce = Xu(), ce.offset++, Y && Y.call(H, au, { start: Ku, end: ce }, U.slice(Ru - 1, ou)), Ku = ce) : (Z = U.slice(Ru - 1, ou), hu += Z, pu += Z.length, _ = ou - 1);
|
|
376
|
+
} else wu === 10 && (yu++, X++, pu = 0), wu === wu ? (hu += D(wu), pu++) : He();
|
|
434
377
|
return Fu.join("");
|
|
435
378
|
function Xu() {
|
|
436
379
|
return { line: yu, column: pu, offset: _ + (Du.offset || 0) };
|
|
@@ -455,8 +398,7 @@ $$`;
|
|
|
455
398
|
function r(i) {
|
|
456
399
|
return a.raw = l, a;
|
|
457
400
|
function o(s) {
|
|
458
|
-
for (var c = i.offset, f = s.line, h = []; ++f && f in c; )
|
|
459
|
-
h.push((c[f] || 0) + 1);
|
|
401
|
+
for (var c = i.offset, f = s.line, h = []; ++f && f in c; ) h.push((c[f] || 0) + 1);
|
|
460
402
|
return { start: s, indent: h };
|
|
461
403
|
}
|
|
462
404
|
function a(s, c, f) {
|
|
@@ -475,26 +417,22 @@ $$`;
|
|
|
475
417
|
return a;
|
|
476
418
|
function a(l, D) {
|
|
477
419
|
var s = this, c = s.offset, f = [], h = s[o + "Methods"], p = s[o + "Tokenizers"], E = D.line, A = D.column, v, F, B, m, d, C;
|
|
478
|
-
if (!l)
|
|
479
|
-
return f;
|
|
420
|
+
if (!l) return f;
|
|
480
421
|
for (I.now = w, I.file = s.file, g(""); l; ) {
|
|
481
|
-
for (v = -1, F = h.length, d = !1; ++v < F && (m = h[v], B = p[m], !(B && (!B.onlyAtStart || s.atStart) && (!B.notInList || !s.inList) && (!B.notInBlock || !s.inBlock) && (!B.notInLink || !s.inLink) && (C = l.length, B.apply(s, [I, l]), d = C !== l.length, d))); )
|
|
482
|
-
;
|
|
422
|
+
for (v = -1, F = h.length, d = !1; ++v < F && (m = h[v], B = p[m], !(B && (!B.onlyAtStart || s.atStart) && (!B.notInList || !s.inList) && (!B.notInBlock || !s.inBlock) && (!B.notInLink || !s.inLink) && (C = l.length, B.apply(s, [I, l]), d = C !== l.length, d))); ) ;
|
|
483
423
|
d || s.file.fail(new Error("Infinite loop"), I.now());
|
|
484
424
|
}
|
|
485
425
|
return s.eof = w(), f;
|
|
486
426
|
function g(x) {
|
|
487
427
|
for (var S = -1, M = x.indexOf(`
|
|
488
|
-
`); M !== -1; )
|
|
489
|
-
E++, S = M, M = x.indexOf(`
|
|
428
|
+
`); M !== -1; ) E++, S = M, M = x.indexOf(`
|
|
490
429
|
`, M + 1);
|
|
491
430
|
S === -1 ? A += x.length : A = x.length - S, E in c && (S !== -1 ? A += c[E] : A <= c[E] && (A = c[E] + 1));
|
|
492
431
|
}
|
|
493
432
|
function y() {
|
|
494
433
|
var x = [], S = E + 1;
|
|
495
434
|
return function() {
|
|
496
|
-
for (var M = E + 1; S < M; )
|
|
497
|
-
x.push((c[S] || 0) + 1), S++;
|
|
435
|
+
for (var M = E + 1; S < M; ) x.push((c[S] || 0) + 1), S++;
|
|
498
436
|
return x;
|
|
499
437
|
};
|
|
500
438
|
}
|
|
@@ -515,8 +453,7 @@ $$`;
|
|
|
515
453
|
var V = M.position, q = V ? V.start : x, J = [], j = V && V.end.line, O = x.line;
|
|
516
454
|
if (M.position = new T(q), V && z && V.indent) {
|
|
517
455
|
if (J = V.indent, j < O) {
|
|
518
|
-
for (; ++j < O; )
|
|
519
|
-
J.push((c[j] || 0) + 1);
|
|
456
|
+
for (; ++j < O; ) J.push((c[j] || 0) + 1);
|
|
520
457
|
J.push(x.column);
|
|
521
458
|
}
|
|
522
459
|
z = J.concat(z);
|
|
@@ -573,15 +510,11 @@ $$`;
|
|
|
573
510
|
e.exports = i;
|
|
574
511
|
function i(o) {
|
|
575
512
|
var a = this, l = a.options, D, s;
|
|
576
|
-
if (o == null)
|
|
577
|
-
|
|
578
|
-
else
|
|
579
|
-
o = t(o);
|
|
580
|
-
else
|
|
581
|
-
throw new Error("Invalid value `" + o + "` for setting `options`");
|
|
513
|
+
if (o == null) o = {};
|
|
514
|
+
else if (typeof o == "object") o = t(o);
|
|
515
|
+
else throw new Error("Invalid value `" + o + "` for setting `options`");
|
|
582
516
|
for (D in r) {
|
|
583
|
-
if (s = o[D], s == null && (s = l[D]), D !== "blocks" && typeof s != "boolean" || D === "blocks" && typeof s != "object")
|
|
584
|
-
throw new Error("Invalid value `" + s + "` for setting `options." + D + "`");
|
|
517
|
+
if (s = o[D], s == null && (s = l[D]), D !== "blocks" && typeof s != "boolean" || D === "blocks" && typeof s != "object") throw new Error("Invalid value `" + s + "` for setting `options." + D + "`");
|
|
585
518
|
o[D] = s;
|
|
586
519
|
}
|
|
587
520
|
return a.options = o, a.escape = n(o), a;
|
|
@@ -589,34 +522,25 @@ $$`;
|
|
|
589
522
|
}), wr = N((u, e) => {
|
|
590
523
|
e.exports = t;
|
|
591
524
|
function t(a) {
|
|
592
|
-
if (a == null)
|
|
593
|
-
|
|
594
|
-
if (typeof a == "
|
|
595
|
-
|
|
596
|
-
if (typeof a == "object")
|
|
597
|
-
return "length" in a ? r(a) : n(a);
|
|
598
|
-
if (typeof a == "function")
|
|
599
|
-
return a;
|
|
525
|
+
if (a == null) return o;
|
|
526
|
+
if (typeof a == "string") return i(a);
|
|
527
|
+
if (typeof a == "object") return "length" in a ? r(a) : n(a);
|
|
528
|
+
if (typeof a == "function") return a;
|
|
600
529
|
throw new Error("Expected function, string, or object as test");
|
|
601
530
|
}
|
|
602
531
|
function n(a) {
|
|
603
532
|
return l;
|
|
604
533
|
function l(D) {
|
|
605
534
|
var s;
|
|
606
|
-
for (s in a)
|
|
607
|
-
if (D[s] !== a[s])
|
|
608
|
-
return !1;
|
|
535
|
+
for (s in a) if (D[s] !== a[s]) return !1;
|
|
609
536
|
return !0;
|
|
610
537
|
}
|
|
611
538
|
}
|
|
612
539
|
function r(a) {
|
|
613
|
-
for (var l = [], D = -1; ++D < a.length; )
|
|
614
|
-
l[D] = t(a[D]);
|
|
540
|
+
for (var l = [], D = -1; ++D < a.length; ) l[D] = t(a[D]);
|
|
615
541
|
return s;
|
|
616
542
|
function s() {
|
|
617
|
-
for (var c = -1; ++c < l.length; )
|
|
618
|
-
if (l[c].apply(this, arguments))
|
|
619
|
-
return !0;
|
|
543
|
+
for (var c = -1; ++c < l.length; ) if (l[c].apply(this, arguments)) return !0;
|
|
620
544
|
return !1;
|
|
621
545
|
}
|
|
622
546
|
}
|
|
@@ -646,14 +570,11 @@ $$`;
|
|
|
646
570
|
return typeof B.type == "string" && (m = typeof B.tagName == "string" ? B.tagName : typeof B.name == "string" ? B.name : void 0, d.displayName = "node (" + n(B.type + (m ? "<" + m + ">" : "")) + ")"), d;
|
|
647
571
|
function d() {
|
|
648
572
|
var C = F.concat(A), g = [], y, w;
|
|
649
|
-
if ((!s || p(A, v, F[F.length - 1] || null)) && (g = l(c(A, F)), g[0] === o))
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
return y;
|
|
655
|
-
w = typeof y[1] == "number" ? y[1] : w + h;
|
|
656
|
-
}
|
|
573
|
+
if ((!s || p(A, v, F[F.length - 1] || null)) && (g = l(c(A, F)), g[0] === o)) return g;
|
|
574
|
+
if (A.children && g[0] !== i) for (w = (f ? A.children.length : -1) + h; w > -1 && w < A.children.length; ) {
|
|
575
|
+
if (y = E(A.children[w], w, C)(), y[0] === o) return y;
|
|
576
|
+
w = typeof y[1] == "number" ? y[1] : w + h;
|
|
577
|
+
}
|
|
657
578
|
return g;
|
|
658
579
|
}
|
|
659
580
|
}
|
|
@@ -697,11 +618,9 @@ $$`;
|
|
|
697
618
|
var t = /^[ \t]*(\n|$)/;
|
|
698
619
|
e.exports = n;
|
|
699
620
|
function n(r, i, o) {
|
|
700
|
-
for (var a, l = "", D = 0, s = i.length; D < s && (a = t.exec(i.slice(D)), a != null); )
|
|
701
|
-
D += a[0].length, l += a[0];
|
|
621
|
+
for (var a, l = "", D = 0, s = i.length; D < s && (a = t.exec(i.slice(D)), a != null); ) D += a[0].length, l += a[0];
|
|
702
622
|
if (l !== "") {
|
|
703
|
-
if (o)
|
|
704
|
-
return !0;
|
|
623
|
+
if (o) return !0;
|
|
705
624
|
r(l);
|
|
706
625
|
}
|
|
707
626
|
}
|
|
@@ -709,19 +628,13 @@ $$`;
|
|
|
709
628
|
var t = "", n;
|
|
710
629
|
e.exports = r;
|
|
711
630
|
function r(i, o) {
|
|
712
|
-
if (typeof i != "string")
|
|
713
|
-
|
|
714
|
-
if (o ===
|
|
715
|
-
return i;
|
|
716
|
-
if (o === 2)
|
|
717
|
-
return i + i;
|
|
631
|
+
if (typeof i != "string") throw new TypeError("expected a string");
|
|
632
|
+
if (o === 1) return i;
|
|
633
|
+
if (o === 2) return i + i;
|
|
718
634
|
var a = i.length * o;
|
|
719
|
-
if (n !== i || typeof n > "u")
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
return t.substr(0, a);
|
|
723
|
-
for (; a > t.length && o > 1; )
|
|
724
|
-
o & 1 && (t += i), o >>= 1, i += i;
|
|
635
|
+
if (n !== i || typeof n > "u") n = i, t = "";
|
|
636
|
+
else if (t.length >= a) return t.substr(0, a);
|
|
637
|
+
for (; a > t.length && o > 1; ) o & 1 && (t += i), o >>= 1, i += i;
|
|
725
638
|
return t += i, t = t.substr(0, a), t;
|
|
726
639
|
}
|
|
727
640
|
}), bt = N((u, e) => {
|
|
@@ -735,31 +648,22 @@ $$`;
|
|
|
735
648
|
var r = `
|
|
736
649
|
`, i = " ", o = " ", a = 4, l = t(o, a);
|
|
737
650
|
function D(s, c, f) {
|
|
738
|
-
for (var h = -1, p = c.length, E = "", A = "", v = "", F = "", B, m, d; ++h < p; )
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
for (E += B, A += B; ++h < p; ) {
|
|
744
|
-
if (B = c.charAt(h), !B || B === r) {
|
|
745
|
-
F = B, v = B;
|
|
746
|
-
break;
|
|
747
|
-
}
|
|
748
|
-
E += B, A += B;
|
|
749
|
-
}
|
|
750
|
-
else if (B === o && c.charAt(h + 1) === B && c.charAt(h + 2) === B && c.charAt(h + 3) === B)
|
|
751
|
-
v += l, h += 3, d = !0;
|
|
752
|
-
else if (B === i)
|
|
753
|
-
v += B, d = !0;
|
|
754
|
-
else {
|
|
755
|
-
for (m = ""; B === i || B === o; )
|
|
756
|
-
m += B, B = c.charAt(++h);
|
|
757
|
-
if (B !== r)
|
|
758
|
-
break;
|
|
759
|
-
v += m + B, F += B;
|
|
651
|
+
for (var h = -1, p = c.length, E = "", A = "", v = "", F = "", B, m, d; ++h < p; ) if (B = c.charAt(h), d) if (d = !1, E += v, A += F, v = "", F = "", B === r) v = B, F = B;
|
|
652
|
+
else for (E += B, A += B; ++h < p; ) {
|
|
653
|
+
if (B = c.charAt(h), !B || B === r) {
|
|
654
|
+
F = B, v = B;
|
|
655
|
+
break;
|
|
760
656
|
}
|
|
761
|
-
|
|
762
|
-
|
|
657
|
+
E += B, A += B;
|
|
658
|
+
}
|
|
659
|
+
else if (B === o && c.charAt(h + 1) === B && c.charAt(h + 2) === B && c.charAt(h + 3) === B) v += l, h += 3, d = !0;
|
|
660
|
+
else if (B === i) v += B, d = !0;
|
|
661
|
+
else {
|
|
662
|
+
for (m = ""; B === i || B === o; ) m += B, B = c.charAt(++h);
|
|
663
|
+
if (B !== r) break;
|
|
664
|
+
v += m + B, F += B;
|
|
665
|
+
}
|
|
666
|
+
if (A) return f ? !0 : s(E)({ type: "code", lang: null, meta: null, value: n(A) });
|
|
763
667
|
}
|
|
764
668
|
}), Nr = N((u, e) => {
|
|
765
669
|
e.exports = D;
|
|
@@ -768,45 +672,34 @@ $$`;
|
|
|
768
672
|
function D(s, c, f) {
|
|
769
673
|
var h = this, p = h.options.gfm, E = c.length + 1, A = 0, v = "", F, B, m, d, C, g, y, w, T, b, k, L, I;
|
|
770
674
|
if (p) {
|
|
771
|
-
for (; A < E && (m = c.charAt(A), !(m !== r && m !== n)); )
|
|
772
|
-
v += m, A++;
|
|
675
|
+
for (; A < E && (m = c.charAt(A), !(m !== r && m !== n)); ) v += m, A++;
|
|
773
676
|
if (L = A, m = c.charAt(A), !(m !== i && m !== o)) {
|
|
774
|
-
for (A++, B = m, F = 1, v += m; A < E && (m = c.charAt(A), m === B); )
|
|
775
|
-
v += m, F++, A++;
|
|
677
|
+
for (A++, B = m, F = 1, v += m; A < E && (m = c.charAt(A), m === B); ) v += m, F++, A++;
|
|
776
678
|
if (!(F < a)) {
|
|
777
|
-
for (; A < E && (m = c.charAt(A), !(m !== r && m !== n)); )
|
|
778
|
-
|
|
779
|
-
for (d = "", y = ""; A < E && (m = c.charAt(A), !(m === t || B === o && m === B)); )
|
|
780
|
-
m === r || m === n ? y += m : (d += y + m, y = ""), A++;
|
|
679
|
+
for (; A < E && (m = c.charAt(A), !(m !== r && m !== n)); ) v += m, A++;
|
|
680
|
+
for (d = "", y = ""; A < E && (m = c.charAt(A), !(m === t || B === o && m === B)); ) m === r || m === n ? y += m : (d += y + m, y = ""), A++;
|
|
781
681
|
if (m = c.charAt(A), !(m && m !== t)) {
|
|
782
|
-
if (f)
|
|
783
|
-
return !0;
|
|
682
|
+
if (f) return !0;
|
|
784
683
|
I = s.now(), I.column += v.length, I.offset += v.length, v += d, d = h.decode.raw(h.unescape(d), I), y && (v += y), y = "", b = "", k = "", w = "", T = "";
|
|
785
684
|
for (var x = !0; A < E; ) {
|
|
786
685
|
if (m = c.charAt(A), w += b, T += k, b = "", k = "", m !== t) {
|
|
787
686
|
w += m, k += m, A++;
|
|
788
687
|
continue;
|
|
789
688
|
}
|
|
790
|
-
for (x ? (v += m, x = !1) : (b += m, k += m), y = "", A++; A < E && (m = c.charAt(A), m === r); )
|
|
791
|
-
y += m, A++;
|
|
689
|
+
for (x ? (v += m, x = !1) : (b += m, k += m), y = "", A++; A < E && (m = c.charAt(A), m === r); ) y += m, A++;
|
|
792
690
|
if (b += y, k += y.slice(L), !(y.length >= l)) {
|
|
793
|
-
for (y = ""; A < E && (m = c.charAt(A), m === B); )
|
|
794
|
-
y += m, A++;
|
|
691
|
+
for (y = ""; A < E && (m = c.charAt(A), m === B); ) y += m, A++;
|
|
795
692
|
if (b += y, k += y, !(y.length < F)) {
|
|
796
|
-
for (y = ""; A < E && (m = c.charAt(A), !(m !== r && m !== n)); )
|
|
797
|
-
|
|
798
|
-
if (!m || m === t)
|
|
799
|
-
break;
|
|
693
|
+
for (y = ""; A < E && (m = c.charAt(A), !(m !== r && m !== n)); ) b += m, k += m, A++;
|
|
694
|
+
if (!m || m === t) break;
|
|
800
695
|
}
|
|
801
696
|
}
|
|
802
697
|
}
|
|
803
|
-
for (v += w + b, A = -1, E = d.length; ++A < E; )
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
break;
|
|
809
|
-
}
|
|
698
|
+
for (v += w + b, A = -1, E = d.length; ++A < E; ) if (m = d.charAt(A), m === r || m === n) C || (C = d.slice(0, A));
|
|
699
|
+
else if (C) {
|
|
700
|
+
g = d.slice(A);
|
|
701
|
+
break;
|
|
702
|
+
}
|
|
810
703
|
return s(v)({ type: "code", lang: C || d || null, meta: g || null, value: T });
|
|
811
704
|
}
|
|
812
705
|
}
|
|
@@ -821,18 +714,14 @@ $$`;
|
|
|
821
714
|
u.left = function(n) {
|
|
822
715
|
return n.trimLeft ? n.trimLeft() : n.replace(/^\s\s*/, "");
|
|
823
716
|
}, u.right = function(n) {
|
|
824
|
-
if (n.trimRight)
|
|
825
|
-
|
|
826
|
-
for (var r = /\s/, i = n.length; r.test(n.charAt(--i)); )
|
|
827
|
-
;
|
|
717
|
+
if (n.trimRight) return n.trimRight();
|
|
718
|
+
for (var r = /\s/, i = n.length; r.test(n.charAt(--i)); ) ;
|
|
828
719
|
return n.slice(0, i + 1);
|
|
829
720
|
};
|
|
830
721
|
}), $e = N((u, e) => {
|
|
831
722
|
e.exports = t;
|
|
832
723
|
function t(n, r, i, o) {
|
|
833
|
-
for (var a = n.length, l = -1, D, s; ++l < a; )
|
|
834
|
-
if (D = n[l], s = D[1] || {}, !(s.pedantic !== void 0 && s.pedantic !== i.options.pedantic) && !(s.commonmark !== void 0 && s.commonmark !== i.options.commonmark) && r[D[0]].apply(i, o))
|
|
835
|
-
return !0;
|
|
724
|
+
for (var a = n.length, l = -1, D, s; ++l < a; ) if (D = n[l], s = D[1] || {}, !(s.pedantic !== void 0 && s.pedantic !== i.options.pedantic) && !(s.commonmark !== void 0 && s.commonmark !== i.options.commonmark) && r[D[0]].apply(i, o)) return !0;
|
|
836
725
|
return !1;
|
|
837
726
|
}
|
|
838
727
|
}), Ir = N((u, e) => {
|
|
@@ -841,24 +730,19 @@ $$`;
|
|
|
841
730
|
var r = `
|
|
842
731
|
`, i = " ", o = " ", a = ">";
|
|
843
732
|
function l(D, s, c) {
|
|
844
|
-
for (var f = this, h = f.offset, p = f.blockTokenizers, E = f.interruptBlockquote, A = D.now(), v = A.line, F = s.length, B = [], m = [], d = [], C, g = 0, y, w, T, b, k, L, I, x; g < F && (y = s.charAt(g), !(y !== o && y !== i)); )
|
|
845
|
-
g++;
|
|
733
|
+
for (var f = this, h = f.offset, p = f.blockTokenizers, E = f.interruptBlockquote, A = D.now(), v = A.line, F = s.length, B = [], m = [], d = [], C, g = 0, y, w, T, b, k, L, I, x; g < F && (y = s.charAt(g), !(y !== o && y !== i)); ) g++;
|
|
846
734
|
if (s.charAt(g) === a) {
|
|
847
|
-
if (c)
|
|
848
|
-
return !0;
|
|
735
|
+
if (c) return !0;
|
|
849
736
|
for (g = 0; g < F; ) {
|
|
850
|
-
for (T = s.indexOf(r, g), L = g, I = !1, T === -1 && (T = F); g < F && (y = s.charAt(g), !(y !== o && y !== i)); )
|
|
851
|
-
g++;
|
|
737
|
+
for (T = s.indexOf(r, g), L = g, I = !1, T === -1 && (T = F); g < F && (y = s.charAt(g), !(y !== o && y !== i)); ) g++;
|
|
852
738
|
if (s.charAt(g) === a ? (g++, I = !0, s.charAt(g) === o && g++) : g = L, b = s.slice(g, T), !I && !t(b)) {
|
|
853
739
|
g = L;
|
|
854
740
|
break;
|
|
855
741
|
}
|
|
856
|
-
if (!I && (w = s.slice(g), n(E, p, f, [D, w, !0])))
|
|
857
|
-
break;
|
|
742
|
+
if (!I && (w = s.slice(g), n(E, p, f, [D, w, !0]))) break;
|
|
858
743
|
k = L === g ? b : s.slice(L, T), d.push(g - L), B.push(k), m.push(b), g = T + 1;
|
|
859
744
|
}
|
|
860
|
-
for (g = -1, F = d.length, C = D(B.join(r)); ++g < F; )
|
|
861
|
-
h[v] = (h[v] || 0) + d[g], v++;
|
|
745
|
+
for (g = -1, F = d.length, C = D(B.join(r)); ++g < F; ) h[v] = (h[v] || 0) + d[g], v++;
|
|
862
746
|
return x = f.enterBlock(), m = f.tokenizeBlock(m.join(r), A), x(), C({ type: "blockquote", children: m });
|
|
863
747
|
}
|
|
864
748
|
}
|
|
@@ -890,23 +774,19 @@ $$`;
|
|
|
890
774
|
B += F;
|
|
891
775
|
}
|
|
892
776
|
if (!(!f && B.length === 0 && F && F !== t)) {
|
|
893
|
-
if (s)
|
|
894
|
-
return !0;
|
|
777
|
+
if (s) return !0;
|
|
895
778
|
for (A += B, B = "", v = ""; ++p < h && (F = D.charAt(p), !(!F || F === t)); ) {
|
|
896
779
|
if (F !== r && F !== n && F !== i) {
|
|
897
780
|
v += B + F, B = "";
|
|
898
781
|
continue;
|
|
899
782
|
}
|
|
900
|
-
for (; F === r || F === n; )
|
|
901
|
-
B += F, F = D.charAt(++p);
|
|
783
|
+
for (; F === r || F === n; ) B += F, F = D.charAt(++p);
|
|
902
784
|
if (!f && v && !B && F === i) {
|
|
903
785
|
v += F;
|
|
904
786
|
continue;
|
|
905
787
|
}
|
|
906
|
-
for (; F === i; )
|
|
907
|
-
|
|
908
|
-
for (; F === r || F === n; )
|
|
909
|
-
B += F, F = D.charAt(++p);
|
|
788
|
+
for (; F === i; ) B += F, F = D.charAt(++p);
|
|
789
|
+
for (; F === r || F === n; ) B += F, F = D.charAt(++p);
|
|
910
790
|
p--;
|
|
911
791
|
}
|
|
912
792
|
return E.column += A.length, E.offset += A.length, A += v + B, l(A)({ type: "heading", depth: m, children: c.tokenizeInline(v, E) });
|
|
@@ -918,24 +798,17 @@ $$`;
|
|
|
918
798
|
var t = " ", n = `
|
|
919
799
|
`, r = " ", i = "*", o = "-", a = "_", l = 3;
|
|
920
800
|
function D(s, c, f) {
|
|
921
|
-
for (var h = -1, p = c.length + 1, E = "", A, v, F, B; ++h < p && (A = c.charAt(h), !(A !== t && A !== r)); )
|
|
922
|
-
|
|
923
|
-
if (
|
|
924
|
-
|
|
925
|
-
if (A = c.charAt(h), A === v)
|
|
926
|
-
F++, E += B + v, B = "";
|
|
927
|
-
else if (A === r)
|
|
928
|
-
B += A;
|
|
929
|
-
else
|
|
930
|
-
return F >= l && (!A || A === n) ? (E += B, f ? !0 : s(E)({ type: "thematicBreak" })) : void 0;
|
|
801
|
+
for (var h = -1, p = c.length + 1, E = "", A, v, F, B; ++h < p && (A = c.charAt(h), !(A !== t && A !== r)); ) E += A;
|
|
802
|
+
if (!(A !== i && A !== o && A !== a)) for (v = A, E += A, F = 1, B = ""; ++h < p; ) if (A = c.charAt(h), A === v) F++, E += B + v, B = "";
|
|
803
|
+
else if (A === r) B += A;
|
|
804
|
+
else return F >= l && (!A || A === n) ? (E += B, f ? !0 : s(E)({ type: "thematicBreak" })) : void 0;
|
|
931
805
|
}
|
|
932
806
|
}), yt = N((u, e) => {
|
|
933
807
|
e.exports = o;
|
|
934
808
|
var t = " ", n = " ", r = 1, i = 4;
|
|
935
809
|
function o(a) {
|
|
936
810
|
for (var l = 0, D = 0, s = a.charAt(l), c = {}, f, h = 0; s === t || s === n; ) {
|
|
937
|
-
for (f = s === t ? i : r, D += f, f > 1 && (D = Math.floor(D / f) * f); h < D; )
|
|
938
|
-
c[++h] = l;
|
|
811
|
+
for (f = s === t ? i : r, D += f, f > 1 && (D = Math.floor(D / f) * f); h < D; ) c[++h] = l;
|
|
939
812
|
s = a.charAt(++l);
|
|
940
813
|
}
|
|
941
814
|
return { indent: D, stops: c };
|
|
@@ -947,20 +820,15 @@ $$`;
|
|
|
947
820
|
`, o = " ", a = "!";
|
|
948
821
|
function l(D, s) {
|
|
949
822
|
var c = D.split(i), f = c.length + 1, h = 1 / 0, p = [], E, A, v;
|
|
950
|
-
for (c.unshift(n(o, s) + a); f--; )
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
for (f = c.length; f--; ) {
|
|
960
|
-
for (v = p[f], E = h; E && !(E in v); )
|
|
961
|
-
E--;
|
|
962
|
-
c[f] = c[f].slice(v[E] + 1);
|
|
963
|
-
}
|
|
823
|
+
for (c.unshift(n(o, s) + a); f--; ) if (A = r(c[f]), p[f] = A.stops, t(c[f]).length !== 0) if (A.indent) A.indent > 0 && A.indent < h && (h = A.indent);
|
|
824
|
+
else {
|
|
825
|
+
h = 1 / 0;
|
|
826
|
+
break;
|
|
827
|
+
}
|
|
828
|
+
if (h !== 1 / 0) for (f = c.length; f--; ) {
|
|
829
|
+
for (v = p[f], E = h; E && !(E in v); ) E--;
|
|
830
|
+
c[f] = c[f].slice(v[E] + 1);
|
|
831
|
+
}
|
|
964
832
|
return c.shift(), c.join(i);
|
|
965
833
|
}
|
|
966
834
|
}), zr = N((u, e) => {
|
|
@@ -969,73 +837,51 @@ $$`;
|
|
|
969
837
|
var l = "*", D = "_", s = "+", c = "-", f = ".", h = " ", p = `
|
|
970
838
|
`, E = " ", A = ")", v = "x", F = 4, B = /\n\n(?!\s*$)/, m = /^\[([ X\tx])][ \t]/, d = /^([ \t]*)([*+-]|\d+[.)])( {1,4}(?! )| |\t|$|(?=\n))([^\n]*)/, C = /^([ \t]*)([*+-]|\d+[.)])([ \t]+)/, g = /^( {1,4}|\t)?/gm;
|
|
971
839
|
function y(k, L, I) {
|
|
972
|
-
for (var x = this, S = x.options.commonmark, M = x.options.pedantic, z = x.blockTokenizers, V = x.interruptList, q = 0, J = L.length, j = null, O, $, U, R, P, G, W, Y, K, eu, H, Q, Du, su, uu, _, X, pu, yu, hu = !1, Fu, nu, du, tu; q < J && (R = L.charAt(q), !(R !== E && R !== h)); )
|
|
973
|
-
|
|
974
|
-
if (R = L.charAt(q), R === l || R === s || R === c)
|
|
975
|
-
P = R, U = !1;
|
|
840
|
+
for (var x = this, S = x.options.commonmark, M = x.options.pedantic, z = x.blockTokenizers, V = x.interruptList, q = 0, J = L.length, j = null, O, $, U, R, P, G, W, Y, K, eu, H, Q, Du, su, uu, _, X, pu, yu, hu = !1, Fu, nu, du, tu; q < J && (R = L.charAt(q), !(R !== E && R !== h)); ) q++;
|
|
841
|
+
if (R = L.charAt(q), R === l || R === s || R === c) P = R, U = !1;
|
|
976
842
|
else {
|
|
977
|
-
for (U = !0, $ = ""; q < J && (R = L.charAt(q), !!r(R)); )
|
|
978
|
-
|
|
979
|
-
if (R = L.charAt(q), !$ || !(R === f || S && R === A) || I && $ !== "1")
|
|
980
|
-
return;
|
|
843
|
+
for (U = !0, $ = ""; q < J && (R = L.charAt(q), !!r(R)); ) $ += R, q++;
|
|
844
|
+
if (R = L.charAt(q), !$ || !(R === f || S && R === A) || I && $ !== "1") return;
|
|
981
845
|
j = parseInt($, 10), P = R;
|
|
982
846
|
}
|
|
983
847
|
if (R = L.charAt(++q), !(R !== h && R !== E && (M || R !== p && R !== ""))) {
|
|
984
|
-
if (I)
|
|
985
|
-
return !0;
|
|
848
|
+
if (I) return !0;
|
|
986
849
|
for (q = 0, su = [], uu = [], _ = []; q < J; ) {
|
|
987
850
|
for (G = L.indexOf(p, q), W = q, Y = !1, tu = !1, G === -1 && (G = J), O = 0; q < J; ) {
|
|
988
|
-
if (R = L.charAt(q), R === E)
|
|
989
|
-
|
|
990
|
-
else
|
|
991
|
-
O++;
|
|
992
|
-
else
|
|
993
|
-
break;
|
|
851
|
+
if (R = L.charAt(q), R === E) O += F - O % F;
|
|
852
|
+
else if (R === h) O++;
|
|
853
|
+
else break;
|
|
994
854
|
q++;
|
|
995
855
|
}
|
|
996
856
|
if (X && O >= X.indent && (tu = !0), R = L.charAt(q), K = null, !tu) {
|
|
997
|
-
if (R === l || R === s || R === c)
|
|
998
|
-
K = R, q++, O++;
|
|
857
|
+
if (R === l || R === s || R === c) K = R, q++, O++;
|
|
999
858
|
else {
|
|
1000
|
-
for ($ = ""; q < J && (R = L.charAt(q), !!r(R)); )
|
|
1001
|
-
$ += R, q++;
|
|
859
|
+
for ($ = ""; q < J && (R = L.charAt(q), !!r(R)); ) $ += R, q++;
|
|
1002
860
|
R = L.charAt(q), q++, $ && (R === f || S && R === A) && (K = R, O += $.length + 1);
|
|
1003
861
|
}
|
|
1004
|
-
if (K)
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
q++, O++;
|
|
1010
|
-
q === du && L.charAt(q) === h && (q -= F - 1, O -= F - 1);
|
|
1011
|
-
} else
|
|
1012
|
-
R !== p && R !== "" && (K = null);
|
|
862
|
+
if (K) if (R = L.charAt(q), R === E) O += F - O % F, q++;
|
|
863
|
+
else if (R === h) {
|
|
864
|
+
for (du = q + F; q < du && L.charAt(q) === h; ) q++, O++;
|
|
865
|
+
q === du && L.charAt(q) === h && (q -= F - 1, O -= F - 1);
|
|
866
|
+
} else R !== p && R !== "" && (K = null);
|
|
1013
867
|
}
|
|
1014
868
|
if (K) {
|
|
1015
|
-
if (!M && P !== K)
|
|
1016
|
-
break;
|
|
869
|
+
if (!M && P !== K) break;
|
|
1017
870
|
Y = !0;
|
|
1018
|
-
} else
|
|
1019
|
-
|
|
1020
|
-
if (
|
|
1021
|
-
|
|
1022
|
-
if (Q = Du, Du = !Y && !t(eu).length, tu && X)
|
|
1023
|
-
X.value = X.value.concat(_, H), uu = uu.concat(_, H), _ = [];
|
|
1024
|
-
else if (Y)
|
|
1025
|
-
_.length !== 0 && (hu = !0, X.value.push(""), X.trail = _.concat()), X = { value: [H], indent: O, trail: [] }, su.push(X), uu = uu.concat(_, H), _ = [];
|
|
871
|
+
} else !S && !tu && L.charAt(W) === h ? tu = !0 : S && X && (tu = O >= X.indent || O > F), Y = !1, q = W;
|
|
872
|
+
if (H = L.slice(W, G), eu = W === q ? H : L.slice(q, G), (K === l || K === D || K === c) && z.thematicBreak.call(x, k, H, !0)) break;
|
|
873
|
+
if (Q = Du, Du = !Y && !t(eu).length, tu && X) X.value = X.value.concat(_, H), uu = uu.concat(_, H), _ = [];
|
|
874
|
+
else if (Y) _.length !== 0 && (hu = !0, X.value.push(""), X.trail = _.concat()), X = { value: [H], indent: O, trail: [] }, su.push(X), uu = uu.concat(_, H), _ = [];
|
|
1026
875
|
else if (Du) {
|
|
1027
|
-
if (Q && !S)
|
|
1028
|
-
break;
|
|
876
|
+
if (Q && !S) break;
|
|
1029
877
|
_.push(H);
|
|
1030
878
|
} else {
|
|
1031
|
-
if (Q || a(V, z, x, [k, H, !0]))
|
|
1032
|
-
break;
|
|
879
|
+
if (Q || a(V, z, x, [k, H, !0])) break;
|
|
1033
880
|
X.value = X.value.concat(_, H), uu = uu.concat(_, H), _ = [];
|
|
1034
881
|
}
|
|
1035
882
|
q = G + 1;
|
|
1036
883
|
}
|
|
1037
|
-
for (Fu = k(uu.join(p)).reset({ type: "list", ordered: U, start: j, spread: hu, children: [] }), pu = x.enterList(), yu = x.enterBlock(), q = -1, J = su.length; ++q < J; )
|
|
1038
|
-
X = su[q].value.join(p), nu = k.now(), k(X)(w(x, X, nu), Fu), X = su[q].trail.join(p), q !== J - 1 && (X += p), k(X);
|
|
884
|
+
for (Fu = k(uu.join(p)).reset({ type: "list", ordered: U, start: j, spread: hu, children: [] }), pu = x.enterList(), yu = x.enterBlock(), q = -1, J = su.length; ++q < J; ) X = su[q].value.join(p), nu = k.now(), k(X)(w(x, X, nu), Fu), X = su[q].trail.join(p), q !== J - 1 && (X += p), k(X);
|
|
1039
885
|
return pu(), yu(), Fu;
|
|
1040
886
|
}
|
|
1041
887
|
}
|
|
@@ -1052,8 +898,7 @@ $$`;
|
|
|
1052
898
|
}
|
|
1053
899
|
function b(k, L, I) {
|
|
1054
900
|
var x = k.offset, S = I.line, M, z, V, q, J, j, O;
|
|
1055
|
-
for (L = L.replace(d, $), q = L.split(p), J = o(L, i(M).indent).split(p), J[0] = V, x[S] = (x[S] || 0) + z.length, S++, j = 0, O = q.length; ++j < O; )
|
|
1056
|
-
x[S] = (x[S] || 0) + q[j].length - J[j].length, S++;
|
|
901
|
+
for (L = L.replace(d, $), q = L.split(p), J = o(L, i(M).indent).split(p), J[0] = V, x[S] = (x[S] || 0) + z.length, S++, j = 0, O = q.length; ++j < O; ) x[S] = (x[S] || 0) + q[j].length - J[j].length, S++;
|
|
1057
902
|
return J.join(p);
|
|
1058
903
|
function $(U, R, P, G, W) {
|
|
1059
904
|
return z = R + P + G, V = W, Number(P) < 10 && z.length % 2 === 1 && (P = h + P), M = R + n(h, P.length) + G, M + V;
|
|
@@ -1081,8 +926,7 @@ $$`;
|
|
|
1081
926
|
if (E.column += F.length, E.offset += F.length, F += B + m, d = f.charAt(++v), C = f.charAt(++v), !(d !== t || C !== i && C !== o)) {
|
|
1082
927
|
for (F += d, m = C, g = C === i ? l : D; ++v < A; ) {
|
|
1083
928
|
if (d = f.charAt(v), d !== C) {
|
|
1084
|
-
if (d !== t)
|
|
1085
|
-
return;
|
|
929
|
+
if (d !== t) return;
|
|
1086
930
|
v--;
|
|
1087
931
|
break;
|
|
1088
932
|
}
|
|
@@ -1100,25 +944,21 @@ $$`;
|
|
|
1100
944
|
var n = " ", r = " ", i = `
|
|
1101
945
|
`, o = "<", a = /^<(script|pre|style)(?=(\s|>|$))/i, l = /<\/(script|pre|style)>/i, D = /^<!--/, s = /-->/, c = /^<\?/, f = /\?>/, h = /^<![A-Za-z]/, p = />/, E = /^<!\[CDATA\[/, A = /]]>/, v = /^$/, F = new RegExp(t.source + "\\s*$");
|
|
1102
946
|
function B(m, d, C) {
|
|
1103
|
-
for (var g = this, y = g.options.blocks.join("|"), w = new RegExp("^</?(" + y + ")(?=(\\s|/?>|$))", "i"), T = d.length, b = 0, k, L, I, x, S, M, z, V = [[a, l, !0], [D, s, !0], [c, f, !0], [h, p, !0], [E, A, !0], [w, v, !0], [F, v, !1]]; b < T && (x = d.charAt(b), !(x !== n && x !== r)); )
|
|
1104
|
-
b++;
|
|
947
|
+
for (var g = this, y = g.options.blocks.join("|"), w = new RegExp("^</?(" + y + ")(?=(\\s|/?>|$))", "i"), T = d.length, b = 0, k, L, I, x, S, M, z, V = [[a, l, !0], [D, s, !0], [c, f, !0], [h, p, !0], [E, A, !0], [w, v, !0], [F, v, !1]]; b < T && (x = d.charAt(b), !(x !== n && x !== r)); ) b++;
|
|
1105
948
|
if (d.charAt(b) === o) {
|
|
1106
|
-
for (k = d.indexOf(i, b + 1), k = k === -1 ? T : k, L = d.slice(b, k), I = -1, S = V.length; ++I < S; )
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
}
|
|
949
|
+
for (k = d.indexOf(i, b + 1), k = k === -1 ? T : k, L = d.slice(b, k), I = -1, S = V.length; ++I < S; ) if (V[I][0].test(L)) {
|
|
950
|
+
M = V[I];
|
|
951
|
+
break;
|
|
952
|
+
}
|
|
1111
953
|
if (M) {
|
|
1112
|
-
if (C)
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
L && (b = k);
|
|
1118
|
-
break;
|
|
1119
|
-
}
|
|
1120
|
-
b = k;
|
|
954
|
+
if (C) return M[2];
|
|
955
|
+
if (b = k, !M[1].test(L)) for (; b < T; ) {
|
|
956
|
+
if (k = d.indexOf(i, b + 1), k = k === -1 ? T : k, L = d.slice(b + 1, k), M[1].test(L)) {
|
|
957
|
+
L && (b = k);
|
|
958
|
+
break;
|
|
1121
959
|
}
|
|
960
|
+
b = k;
|
|
961
|
+
}
|
|
1122
962
|
return z = d.slice(0, b), m(z)({ type: "html", value: z });
|
|
1123
963
|
}
|
|
1124
964
|
}
|
|
@@ -1141,53 +981,39 @@ $$`;
|
|
|
1141
981
|
var r = '"', i = "'", o = "\\", a = `
|
|
1142
982
|
`, l = " ", D = " ", s = "[", c = "]", f = "(", h = ")", p = ":", E = "<", A = ">";
|
|
1143
983
|
function v(m, d, C) {
|
|
1144
|
-
for (var g = this, y = g.options.commonmark, w = 0, T = d.length, b = "", k, L, I, x, S, M, z, V; w < T && (x = d.charAt(w), !(x !== D && x !== l)); )
|
|
1145
|
-
b += x, w++;
|
|
984
|
+
for (var g = this, y = g.options.commonmark, w = 0, T = d.length, b = "", k, L, I, x, S, M, z, V; w < T && (x = d.charAt(w), !(x !== D && x !== l)); ) b += x, w++;
|
|
1146
985
|
if (x = d.charAt(w), x === s) {
|
|
1147
|
-
for (w++, b += x, I = ""; w < T && (x = d.charAt(w), x !== c); )
|
|
1148
|
-
x === o && (I += x, w++, x = d.charAt(w)), I += x, w++;
|
|
986
|
+
for (w++, b += x, I = ""; w < T && (x = d.charAt(w), x !== c); ) x === o && (I += x, w++, x = d.charAt(w)), I += x, w++;
|
|
1149
987
|
if (!(!I || d.charAt(w) !== c || d.charAt(w + 1) !== p)) {
|
|
1150
|
-
for (M = I, b += I + c + p, w = b.length, I = ""; w < T && (x = d.charAt(w), !(x !== l && x !== D && x !== a)); )
|
|
1151
|
-
b += x, w++;
|
|
988
|
+
for (M = I, b += I + c + p, w = b.length, I = ""; w < T && (x = d.charAt(w), !(x !== l && x !== D && x !== a)); ) b += x, w++;
|
|
1152
989
|
if (x = d.charAt(w), I = "", k = b, x === E) {
|
|
1153
|
-
for (w++; w < T && (x = d.charAt(w), !!F(x)); )
|
|
1154
|
-
|
|
1155
|
-
if (x = d.charAt(w), x === F.delimiter)
|
|
1156
|
-
b += E + I + x, w++;
|
|
990
|
+
for (w++; w < T && (x = d.charAt(w), !!F(x)); ) I += x, w++;
|
|
991
|
+
if (x = d.charAt(w), x === F.delimiter) b += E + I + x, w++;
|
|
1157
992
|
else {
|
|
1158
|
-
if (y)
|
|
1159
|
-
return;
|
|
993
|
+
if (y) return;
|
|
1160
994
|
w -= I.length + 1, I = "";
|
|
1161
995
|
}
|
|
1162
996
|
}
|
|
1163
997
|
if (!I) {
|
|
1164
|
-
for (; w < T && (x = d.charAt(w), !!B(x)); )
|
|
1165
|
-
I += x, w++;
|
|
998
|
+
for (; w < T && (x = d.charAt(w), !!B(x)); ) I += x, w++;
|
|
1166
999
|
b += I;
|
|
1167
1000
|
}
|
|
1168
1001
|
if (I) {
|
|
1169
|
-
for (z = I, I = ""; w < T && (x = d.charAt(w), !(x !== l && x !== D && x !== a)); )
|
|
1170
|
-
|
|
1171
|
-
if (x = d.charAt(w), S = null, x === r ? S = r : x === i ? S = i : x === f && (S = h), !S)
|
|
1172
|
-
I = "", w = b.length;
|
|
1002
|
+
for (z = I, I = ""; w < T && (x = d.charAt(w), !(x !== l && x !== D && x !== a)); ) I += x, w++;
|
|
1003
|
+
if (x = d.charAt(w), S = null, x === r ? S = r : x === i ? S = i : x === f && (S = h), !S) I = "", w = b.length;
|
|
1173
1004
|
else if (I) {
|
|
1174
1005
|
for (b += I + x, w = b.length, I = ""; w < T && (x = d.charAt(w), x !== S); ) {
|
|
1175
1006
|
if (x === a) {
|
|
1176
|
-
if (w++, x = d.charAt(w), x === a || x === S)
|
|
1177
|
-
return;
|
|
1007
|
+
if (w++, x = d.charAt(w), x === a || x === S) return;
|
|
1178
1008
|
I += a;
|
|
1179
1009
|
}
|
|
1180
1010
|
I += x, w++;
|
|
1181
1011
|
}
|
|
1182
|
-
if (x = d.charAt(w), x !== S)
|
|
1183
|
-
return;
|
|
1012
|
+
if (x = d.charAt(w), x !== S) return;
|
|
1184
1013
|
L = b, b += I + x, w++, V = I, I = "";
|
|
1185
|
-
} else
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
b += x, w++;
|
|
1189
|
-
if (x = d.charAt(w), !x || x === a)
|
|
1190
|
-
return C ? !0 : (k = m(k).test().end, z = g.decode.raw(g.unescape(z), k, { nonTerminated: !1 }), V && (L = m(L).test().end, V = g.decode.raw(g.unescape(V), L)), m(b)({ type: "definition", identifier: n(M), label: M, title: V || null, url: z }));
|
|
1014
|
+
} else return;
|
|
1015
|
+
for (; w < T && (x = d.charAt(w), !(x !== l && x !== D)); ) b += x, w++;
|
|
1016
|
+
if (x = d.charAt(w), !x || x === a) return C ? !0 : (k = m(k).test().end, z = g.decode.raw(g.unescape(z), k, { nonTerminated: !1 }), V && (L = m(L).test().end, V = g.decode.raw(g.unescape(V), L)), m(b)({ type: "definition", identifier: n(M), label: M, title: V || null, url: z }));
|
|
1191
1017
|
}
|
|
1192
1018
|
}
|
|
1193
1019
|
}
|
|
@@ -1209,8 +1035,7 @@ $$`;
|
|
|
1209
1035
|
if (B.options.gfm) {
|
|
1210
1036
|
for (m = 0, V = 0, w = v.length + 1, T = []; m < w; ) {
|
|
1211
1037
|
if (O = v.indexOf(r, m), $ = v.indexOf(D, m + 1), O === -1 && (O = v.length), $ === -1 || $ > O) {
|
|
1212
|
-
if (V < c)
|
|
1213
|
-
return;
|
|
1038
|
+
if (V < c) return;
|
|
1214
1039
|
break;
|
|
1215
1040
|
}
|
|
1216
1041
|
T.push(v.slice(m, O)), V++, m = O + 1;
|
|
@@ -1218,22 +1043,16 @@ $$`;
|
|
|
1218
1043
|
for (g = T.join(r), d = T.splice(1, 1)[0] || [], m = 0, w = d.length, V--, C = !1, I = []; m < w; ) {
|
|
1219
1044
|
if (k = d.charAt(m), k === D) {
|
|
1220
1045
|
if (L = null, C === !1) {
|
|
1221
|
-
if (U === !1)
|
|
1222
|
-
|
|
1223
|
-
} else
|
|
1224
|
-
I.push(C), C = !1;
|
|
1046
|
+
if (U === !1) return;
|
|
1047
|
+
} else I.push(C), C = !1;
|
|
1225
1048
|
U = !1;
|
|
1226
|
-
} else if (k === o)
|
|
1227
|
-
|
|
1228
|
-
else if (k
|
|
1229
|
-
C === f ? C = h : L && C === null ? C = p : C = f;
|
|
1230
|
-
else if (!t(k))
|
|
1231
|
-
return;
|
|
1049
|
+
} else if (k === o) L = !0, C = C || null;
|
|
1050
|
+
else if (k === a) C === f ? C = h : L && C === null ? C = p : C = f;
|
|
1051
|
+
else if (!t(k)) return;
|
|
1232
1052
|
m++;
|
|
1233
1053
|
}
|
|
1234
1054
|
if (C !== !1 && I.push(C), !(I.length < s)) {
|
|
1235
|
-
if (F)
|
|
1236
|
-
return !0;
|
|
1055
|
+
if (F) return !0;
|
|
1237
1056
|
for (z = -1, J = [], j = A(g).reset({ type: "table", align: I, children: J }); ++z < V; ) {
|
|
1238
1057
|
for (q = T[z], y = { type: "tableRow", children: [] }, z && A(r), A(q).reset(y, j), w = q.length + 1, m = 0, b = "", x = "", S = !0; m < w; ) {
|
|
1239
1058
|
if (k = q.charAt(m), k === n || k === i) {
|
|
@@ -1259,17 +1078,14 @@ $$`;
|
|
|
1259
1078
|
F = B;
|
|
1260
1079
|
break;
|
|
1261
1080
|
}
|
|
1262
|
-
if (c.charAt(F + 1) === o)
|
|
1263
|
-
break;
|
|
1081
|
+
if (c.charAt(F + 1) === o) break;
|
|
1264
1082
|
if (E) {
|
|
1265
1083
|
for (g = 0, m = F + 1; m < B; ) {
|
|
1266
1084
|
if (C = c.charAt(m), C === i) {
|
|
1267
1085
|
g = l;
|
|
1268
1086
|
break;
|
|
1269
|
-
} else if (C === a)
|
|
1270
|
-
|
|
1271
|
-
else
|
|
1272
|
-
break;
|
|
1087
|
+
} else if (C === a) g++;
|
|
1088
|
+
else break;
|
|
1273
1089
|
m++;
|
|
1274
1090
|
}
|
|
1275
1091
|
if (g >= l && C !== o) {
|
|
@@ -1277,8 +1093,7 @@ $$`;
|
|
|
1277
1093
|
continue;
|
|
1278
1094
|
}
|
|
1279
1095
|
}
|
|
1280
|
-
if (d = c.slice(F + 1), r(v, A, h, [s, d, !0]))
|
|
1281
|
-
break;
|
|
1096
|
+
if (d = c.slice(F + 1), r(v, A, h, [s, d, !0])) break;
|
|
1282
1097
|
if (m = F, F = c.indexOf(o, F + 1), F !== -1 && t(c.slice(m, F)) === "") {
|
|
1283
1098
|
F = m;
|
|
1284
1099
|
break;
|
|
@@ -1298,8 +1113,7 @@ $$`;
|
|
|
1298
1113
|
`, r = "\\";
|
|
1299
1114
|
function i(o, a, l) {
|
|
1300
1115
|
var D = this, s, c;
|
|
1301
|
-
if (a.charAt(0) === r && (s = a.charAt(1), D.escape.indexOf(s) !== -1))
|
|
1302
|
-
return l ? !0 : (s === n ? c = { type: "break" } : c = { type: "text", value: s }, o(r + s)(c));
|
|
1116
|
+
if (a.charAt(0) === r && (s = a.charAt(1), D.escape.indexOf(s) !== -1)) return l ? !0 : (s === n ? c = { type: "break" } : c = { type: "text", value: s }, o(r + s)(c));
|
|
1303
1117
|
}
|
|
1304
1118
|
}), qt = N((u, e) => {
|
|
1305
1119
|
e.exports = t;
|
|
@@ -1313,20 +1127,15 @@ $$`;
|
|
|
1313
1127
|
function c(f, h, p) {
|
|
1314
1128
|
var E = this, A = "", v = h.length, F = 0, B = "", m = !1, d = "", C, g, y, w, T;
|
|
1315
1129
|
if (h.charAt(0) === i) {
|
|
1316
|
-
for (F++, A = i; F < v && (C = h.charAt(F), !(t(C) || C === o || C === a || C === ":" && h.charAt(F + 1) === l)); )
|
|
1317
|
-
B += C, F++;
|
|
1130
|
+
for (F++, A = i; F < v && (C = h.charAt(F), !(t(C) || C === o || C === a || C === ":" && h.charAt(F + 1) === l)); ) B += C, F++;
|
|
1318
1131
|
if (B) {
|
|
1319
|
-
if (d += B, B = "", C = h.charAt(F), d += C, F++, C === a)
|
|
1320
|
-
m = !0;
|
|
1132
|
+
if (d += B, B = "", C = h.charAt(F), d += C, F++, C === a) m = !0;
|
|
1321
1133
|
else {
|
|
1322
|
-
if (C !== ":" || h.charAt(F + 1) !== l)
|
|
1323
|
-
return;
|
|
1134
|
+
if (C !== ":" || h.charAt(F + 1) !== l) return;
|
|
1324
1135
|
d += l, F++;
|
|
1325
1136
|
}
|
|
1326
|
-
for (; F < v && (C = h.charAt(F), !(t(C) || C === o)); )
|
|
1327
|
-
|
|
1328
|
-
if (C = h.charAt(F), !(!B || C !== o))
|
|
1329
|
-
return p ? !0 : (d += B, y = d, A += d + C, g = f.now(), g.column++, g.offset++, m && (d.slice(0, s).toLowerCase() === D ? (y = y.slice(s), g.column += s, g.offset += s) : d = D + d), w = E.inlineTokenizers, E.inlineTokenizers = { text: w.text }, T = E.enterLink(), y = E.tokenizeInline(y, g), E.inlineTokenizers = w, T(), f(A)({ type: "link", title: null, url: n(d, { nonTerminated: !1 }), children: y }));
|
|
1137
|
+
for (; F < v && (C = h.charAt(F), !(t(C) || C === o)); ) B += C, F++;
|
|
1138
|
+
if (C = h.charAt(F), !(!B || C !== o)) return p ? !0 : (d += B, y = d, A += d + C, g = f.now(), g.column++, g.offset++, m && (d.slice(0, s).toLowerCase() === D ? (y = y.slice(s), g.column += s, g.offset += s) : d = D + d), w = E.inlineTokenizers, E.inlineTokenizers = { text: w.text }, T = E.enterLink(), y = E.tokenizeInline(y, g), E.inlineTokenizers = w, T(), f(A)({ type: "link", title: null, url: n(d, { nonTerminated: !1 }), children: y }));
|
|
1330
1139
|
}
|
|
1331
1140
|
}
|
|
1332
1141
|
}
|
|
@@ -1334,10 +1143,8 @@ $$`;
|
|
|
1334
1143
|
e.exports = t;
|
|
1335
1144
|
function t(n, r) {
|
|
1336
1145
|
var i = String(n), o = 0, a;
|
|
1337
|
-
if (typeof r != "string")
|
|
1338
|
-
|
|
1339
|
-
for (a = i.indexOf(r); a !== -1; )
|
|
1340
|
-
o++, a = i.indexOf(r, a + r.length);
|
|
1146
|
+
if (typeof r != "string") throw new Error("Expected character");
|
|
1147
|
+
for (a = i.indexOf(r); a !== -1; ) o++, a = i.indexOf(r, a + r.length);
|
|
1341
1148
|
return o;
|
|
1342
1149
|
}
|
|
1343
1150
|
}), Kr = N((u, e) => {
|
|
@@ -1345,10 +1152,8 @@ $$`;
|
|
|
1345
1152
|
var t = ["www.", "http://", "https://"];
|
|
1346
1153
|
function n(r, i) {
|
|
1347
1154
|
var o = -1, a, l, D;
|
|
1348
|
-
if (!this.options.gfm)
|
|
1349
|
-
|
|
1350
|
-
for (l = t.length, a = -1; ++a < l; )
|
|
1351
|
-
D = r.indexOf(t[a], i), D !== -1 && (o === -1 || D < o) && (o = D);
|
|
1155
|
+
if (!this.options.gfm) return o;
|
|
1156
|
+
for (l = t.length, a = -1; ++a < l; ) D = r.indexOf(t[a], i), D !== -1 && (o === -1 || D < o) && (o = D);
|
|
1352
1157
|
return o;
|
|
1353
1158
|
}
|
|
1354
1159
|
}), Xr = N((u, e) => {
|
|
@@ -1358,18 +1163,13 @@ $$`;
|
|
|
1358
1163
|
function g(y, w, T) {
|
|
1359
1164
|
var b = this, k = b.options.gfm, L = b.inlineTokenizers, I = w.length, x = -1, S = !1, M, z, V, q, J, j, O, $, U, R, P, G, W, Y;
|
|
1360
1165
|
if (k) {
|
|
1361
|
-
if (w.slice(0, 4) === "www.")
|
|
1362
|
-
|
|
1363
|
-
else if (w.slice(0,
|
|
1364
|
-
|
|
1365
|
-
else if (w.slice(0, 8).toLowerCase() === "https://")
|
|
1366
|
-
q = 8;
|
|
1367
|
-
else
|
|
1368
|
-
return;
|
|
1166
|
+
if (w.slice(0, 4) === "www.") S = !0, q = 4;
|
|
1167
|
+
else if (w.slice(0, 7).toLowerCase() === "http://") q = 7;
|
|
1168
|
+
else if (w.slice(0, 8).toLowerCase() === "https://") q = 8;
|
|
1169
|
+
else return;
|
|
1369
1170
|
for (x = q - 1, V = q, M = []; q < I; ) {
|
|
1370
1171
|
if (O = w.charCodeAt(q), O === p) {
|
|
1371
|
-
if (x === q - 1)
|
|
1372
|
-
break;
|
|
1172
|
+
if (x === q - 1) break;
|
|
1373
1173
|
M.push(q), x = q, q++;
|
|
1374
1174
|
continue;
|
|
1375
1175
|
}
|
|
@@ -1380,16 +1180,11 @@ $$`;
|
|
|
1380
1180
|
break;
|
|
1381
1181
|
}
|
|
1382
1182
|
if (O === p && (M.pop(), q--), M[0] !== void 0 && (z = M.length < 2 ? V : M[M.length - 2] + 1, w.slice(z, q).indexOf("_") === -1)) {
|
|
1383
|
-
if (T)
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
q++, O === l || O === c || O === f || O === p || O === E || O === v || O === B || O === m || ($ = q);
|
|
1387
|
-
if (q = $, w.charCodeAt(q - 1) === s)
|
|
1388
|
-
for (j = w.slice(J, q), U = t(j, d), R = t(j, C); R > U; )
|
|
1389
|
-
q = J + j.lastIndexOf(C), j = w.slice(J, q), R--;
|
|
1183
|
+
if (T) return !0;
|
|
1184
|
+
for ($ = q, J = q; q < I && (O = w.charCodeAt(q), !(o(O) || O === F)); ) q++, O === l || O === c || O === f || O === p || O === E || O === v || O === B || O === m || ($ = q);
|
|
1185
|
+
if (q = $, w.charCodeAt(q - 1) === s) for (j = w.slice(J, q), U = t(j, d), R = t(j, C); R > U; ) q = J + j.lastIndexOf(C), j = w.slice(J, q), R--;
|
|
1390
1186
|
if (w.charCodeAt(q - 1) === A && (q--, i(w.charCodeAt(q - 1)))) {
|
|
1391
|
-
for ($ = q - 2; i(w.charCodeAt($)); )
|
|
1392
|
-
$--;
|
|
1187
|
+
for ($ = q - 2; i(w.charCodeAt($)); ) $--;
|
|
1393
1188
|
w.charCodeAt($) === D && (q = $);
|
|
1394
1189
|
}
|
|
1395
1190
|
return P = w.slice(0, q), W = n(P, { nonTerminated: !1 }), S && (W = "http://" + W), Y = b.enterLink(), b.inlineTokenizers = { text: L.text }, G = b.tokenizeInline(P, y.now()), b.inlineTokenizers = L, Y(), y(P)({ type: "link", title: null, url: W, children: G });
|
|
@@ -1401,12 +1196,9 @@ $$`;
|
|
|
1401
1196
|
e.exports = l;
|
|
1402
1197
|
function l(s, c) {
|
|
1403
1198
|
var f = this, h, p;
|
|
1404
|
-
if (!this.options.gfm || (h = s.indexOf("@", c), h === -1))
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
return l.call(f, s, h + 1);
|
|
1408
|
-
for (; p > c && D(s.charCodeAt(p - 1)); )
|
|
1409
|
-
p--;
|
|
1199
|
+
if (!this.options.gfm || (h = s.indexOf("@", c), h === -1)) return -1;
|
|
1200
|
+
if (p = h, p === c || !D(s.charCodeAt(p - 1))) return l.call(f, s, h + 1);
|
|
1201
|
+
for (; p > c && D(s.charCodeAt(p - 1)); ) p--;
|
|
1410
1202
|
return p;
|
|
1411
1203
|
}
|
|
1412
1204
|
function D(s) {
|
|
@@ -1419,8 +1211,7 @@ $$`;
|
|
|
1419
1211
|
function c(f, h, p) {
|
|
1420
1212
|
var E = this, A = E.options.gfm, v = E.inlineTokenizers, F = 0, B = h.length, m = -1, d, C, g, y;
|
|
1421
1213
|
if (A) {
|
|
1422
|
-
for (d = h.charCodeAt(F); n(d) || r(d) || d === o || d === a || d === l || d === s; )
|
|
1423
|
-
d = h.charCodeAt(++F);
|
|
1214
|
+
for (d = h.charCodeAt(F); n(d) || r(d) || d === o || d === a || d === l || d === s; ) d = h.charCodeAt(++F);
|
|
1424
1215
|
if (F !== 0 && d === D) {
|
|
1425
1216
|
for (F++; F < B; ) {
|
|
1426
1217
|
if (d = h.charCodeAt(F), n(d) || r(d) || d === a || d === l || d === s) {
|
|
@@ -1429,8 +1220,7 @@ $$`;
|
|
|
1429
1220
|
}
|
|
1430
1221
|
break;
|
|
1431
1222
|
}
|
|
1432
|
-
if (!(m === -1 || m === F || d === a || d === s))
|
|
1433
|
-
return d === l && F--, C = h.slice(0, F), p ? !0 : (y = E.enterLink(), E.inlineTokenizers = { text: v.text }, g = E.tokenizeInline(C, f.now()), E.inlineTokenizers = v, y(), f(C)({ type: "link", title: null, url: "mailto:" + t(C, { nonTerminated: !1 }), children: g }));
|
|
1223
|
+
if (!(m === -1 || m === F || d === a || d === s)) return d === l && F--, C = h.slice(0, F), p ? !0 : (y = E.enterLink(), E.inlineTokenizers = { text: v.text }, g = E.tokenizeInline(C, f.now()), E.inlineTokenizers = v, y(), f(C)({ type: "link", title: null, url: "mailto:" + t(C, { nonTerminated: !1 }), children: g }));
|
|
1434
1224
|
}
|
|
1435
1225
|
}
|
|
1436
1226
|
}
|
|
@@ -1440,8 +1230,7 @@ $$`;
|
|
|
1440
1230
|
var i = "<", o = "?", a = "!", l = "/", D = /^<a /i, s = /^<\/a>/i;
|
|
1441
1231
|
function c(f, h, p) {
|
|
1442
1232
|
var E = this, A = h.length, v, F;
|
|
1443
|
-
if (!(h.charAt(0) !== i || A < 3) && (v = h.charAt(1), !(!t(v) && v !== o && v !== a && v !== l) && (F = h.match(r), !!F)))
|
|
1444
|
-
return p ? !0 : (F = F[0], !E.inLink && D.test(F) ? E.inLink = !0 : E.inLink && s.test(F) && (E.inLink = !1), f(F)({ type: "html", value: F }));
|
|
1233
|
+
if (!(h.charAt(0) !== i || A < 3) && (v = h.charAt(1), !(!t(v) && v !== o && v !== a && v !== l) && (F = h.match(r), !!F))) return p ? !0 : (F = F[0], !E.inLink && D.test(F) ? E.inLink = !0 : E.inLink && s.test(F) && (E.inLink = !1), f(F)({ type: "html", value: F }));
|
|
1445
1234
|
}
|
|
1446
1235
|
}), St = N((u, e) => {
|
|
1447
1236
|
e.exports = t;
|
|
@@ -1459,48 +1248,36 @@ $$`;
|
|
|
1459
1248
|
if (g === i && (z = !0, d = g, g = F.charAt(++C)), g === f && !(!z && m.inLink)) {
|
|
1460
1249
|
for (d += g, $ = "", C++, J = F.length, R = v.now(), O = 0, R.column += C, R.offset += C; C < J; ) {
|
|
1461
1250
|
if (g = F.charAt(C), S = g, g === E) {
|
|
1462
|
-
for (k = 1; F.charAt(C + 1) === E; )
|
|
1463
|
-
S += g, C++, k++;
|
|
1251
|
+
for (k = 1; F.charAt(C + 1) === E; ) S += g, C++, k++;
|
|
1464
1252
|
L ? k >= L && (L = 0) : L = k;
|
|
1465
|
-
} else if (g === h)
|
|
1466
|
-
|
|
1467
|
-
else if ((!L || T) && g ===
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
if (F.charAt(C + 1) !== l)
|
|
1474
|
-
return;
|
|
1475
|
-
S += l, b = !0, C++;
|
|
1476
|
-
break;
|
|
1477
|
-
}
|
|
1253
|
+
} else if (g === h) C++, S += F.charAt(C);
|
|
1254
|
+
else if ((!L || T) && g === f) O++;
|
|
1255
|
+
else if ((!L || T) && g === p) if (O) O--;
|
|
1256
|
+
else {
|
|
1257
|
+
if (F.charAt(C + 1) !== l) return;
|
|
1258
|
+
S += l, b = !0, C++;
|
|
1259
|
+
break;
|
|
1260
|
+
}
|
|
1478
1261
|
$ += S, S = "", C++;
|
|
1479
1262
|
}
|
|
1480
1263
|
if (b) {
|
|
1481
|
-
for (V = $, d += $ + S, C++; C < J && (g = F.charAt(C), !!t(g)); )
|
|
1482
|
-
d += g, C++;
|
|
1264
|
+
for (V = $, d += $ + S, C++; C < J && (g = F.charAt(C), !!t(g)); ) d += g, C++;
|
|
1483
1265
|
if (g = F.charAt(C), $ = "", I = d, g === s) {
|
|
1484
1266
|
for (C++, I += s; C < J && (g = F.charAt(C), g !== c); ) {
|
|
1485
|
-
if (w && g === r)
|
|
1486
|
-
return;
|
|
1267
|
+
if (w && g === r) return;
|
|
1487
1268
|
$ += g, C++;
|
|
1488
1269
|
}
|
|
1489
|
-
if (F.charAt(C) !== c)
|
|
1490
|
-
return;
|
|
1270
|
+
if (F.charAt(C) !== c) return;
|
|
1491
1271
|
d += s + $ + c, U = $, C++;
|
|
1492
1272
|
} else {
|
|
1493
1273
|
for (g = null, S = ""; C < J && (g = F.charAt(C), !(S && (g === o || g === a || w && g === l))); ) {
|
|
1494
1274
|
if (t(g)) {
|
|
1495
|
-
if (!y)
|
|
1496
|
-
break;
|
|
1275
|
+
if (!y) break;
|
|
1497
1276
|
S += g;
|
|
1498
1277
|
} else {
|
|
1499
|
-
if (g === l)
|
|
1500
|
-
O++;
|
|
1278
|
+
if (g === l) O++;
|
|
1501
1279
|
else if (g === D) {
|
|
1502
|
-
if (O === 0)
|
|
1503
|
-
break;
|
|
1280
|
+
if (O === 0) break;
|
|
1504
1281
|
O--;
|
|
1505
1282
|
}
|
|
1506
1283
|
$ += S, S = "", g === h && ($ += h, g = F.charAt(++C)), $ += g;
|
|
@@ -1509,31 +1286,21 @@ $$`;
|
|
|
1509
1286
|
}
|
|
1510
1287
|
d += $, U = $, C = d.length;
|
|
1511
1288
|
}
|
|
1512
|
-
for ($ = ""; C < J && (g = F.charAt(C), !!t(g)); )
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
if (
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
$ += g;
|
|
1528
|
-
else if (g === D) {
|
|
1529
|
-
d += $ + q + S, j = $;
|
|
1530
|
-
break;
|
|
1531
|
-
} else
|
|
1532
|
-
t(g) ? S += g : ($ += q + S + g, S = "", M = !1);
|
|
1533
|
-
C++;
|
|
1534
|
-
}
|
|
1535
|
-
if (F.charAt(C) === D)
|
|
1536
|
-
return B ? !0 : (d += D, U = m.decode.raw(m.unescape(U), v(I).test().end, { nonTerminated: !1 }), j && (x = v(x).test().end, j = m.decode.raw(m.unescape(j), x)), G = { type: z ? "image" : "link", title: j || null, url: U }, z ? G.alt = m.decode.raw(m.unescape(V), R) || null : (P = m.enterLink(), G.children = m.tokenizeInline(V, R), P()), v(d)(G));
|
|
1289
|
+
for ($ = ""; C < J && (g = F.charAt(C), !!t(g)); ) $ += g, C++;
|
|
1290
|
+
if (g = F.charAt(C), d += $, $ && (g === o || g === a || w && g === l)) if (C++, d += g, $ = "", q = g === l ? D : g, x = d, w) {
|
|
1291
|
+
for (; C < J && (g = F.charAt(C), g !== q); ) g === h && ($ += h, g = F.charAt(++C)), C++, $ += g;
|
|
1292
|
+
if (g = F.charAt(C), g !== q) return;
|
|
1293
|
+
for (j = $, d += $ + g, C++; C < J && (g = F.charAt(C), !!t(g)); ) d += g, C++;
|
|
1294
|
+
} else for (S = ""; C < J; ) {
|
|
1295
|
+
if (g = F.charAt(C), g === q) M && ($ += q + S, S = ""), M = !0;
|
|
1296
|
+
else if (!M) $ += g;
|
|
1297
|
+
else if (g === D) {
|
|
1298
|
+
d += $ + q + S, j = $;
|
|
1299
|
+
break;
|
|
1300
|
+
} else t(g) ? S += g : ($ += q + S + g, S = "", M = !1);
|
|
1301
|
+
C++;
|
|
1302
|
+
}
|
|
1303
|
+
if (F.charAt(C) === D) return B ? !0 : (d += D, U = m.decode.raw(m.unescape(U), v(I).test().end, { nonTerminated: !1 }), j && (x = v(x).test().end, j = m.decode.raw(m.unescape(j), x)), G = { type: z ? "image" : "link", title: j || null, url: U }, z ? G.alt = m.decode.raw(m.unescape(V), R) || null : (P = m.enterLink(), G.children = m.tokenizeInline(V, R), P()), v(d)(G));
|
|
1537
1304
|
}
|
|
1538
1305
|
}
|
|
1539
1306
|
}
|
|
@@ -1545,30 +1312,23 @@ $$`;
|
|
|
1545
1312
|
var F = this, B = F.options.commonmark, m = A.charAt(0), d = 0, C = A.length, g = "", y = "", w = i, T = a, b, k, L, I, x, S, M, z;
|
|
1546
1313
|
if (m === s && (w = o, y = m, m = A.charAt(++d)), m === c) {
|
|
1547
1314
|
for (d++, y += m, S = "", z = 0; d < C; ) {
|
|
1548
|
-
if (m = A.charAt(d), m === c)
|
|
1549
|
-
M = !0, z++;
|
|
1315
|
+
if (m = A.charAt(d), m === c) M = !0, z++;
|
|
1550
1316
|
else if (m === h) {
|
|
1551
|
-
if (!z)
|
|
1552
|
-
break;
|
|
1317
|
+
if (!z) break;
|
|
1553
1318
|
z--;
|
|
1554
1319
|
}
|
|
1555
1320
|
m === f && (S += f, m = A.charAt(++d)), S += m, d++;
|
|
1556
1321
|
}
|
|
1557
1322
|
if (g = S, b = S, m = A.charAt(d), m === h) {
|
|
1558
|
-
if (d++, g += m, S = "", !B)
|
|
1559
|
-
for (; d < C && (m = A.charAt(d), !!t(m)); )
|
|
1560
|
-
S += m, d++;
|
|
1323
|
+
if (d++, g += m, S = "", !B) for (; d < C && (m = A.charAt(d), !!t(m)); ) S += m, d++;
|
|
1561
1324
|
if (m = A.charAt(d), m === c) {
|
|
1562
|
-
for (k = "", S += m, d++; d < C && (m = A.charAt(d), !(m === c || m === h)); )
|
|
1563
|
-
m === f && (k += f, m = A.charAt(++d)), k += m, d++;
|
|
1325
|
+
for (k = "", S += m, d++; d < C && (m = A.charAt(d), !(m === c || m === h)); ) m === f && (k += f, m = A.charAt(++d)), k += m, d++;
|
|
1564
1326
|
m = A.charAt(d), m === h ? (T = k ? D : l, S += k + m, d++) : k = "", g += S, S = "";
|
|
1565
1327
|
} else {
|
|
1566
|
-
if (!b)
|
|
1567
|
-
return;
|
|
1328
|
+
if (!b) return;
|
|
1568
1329
|
k = b;
|
|
1569
1330
|
}
|
|
1570
|
-
if (!(T !== D && M))
|
|
1571
|
-
return g = y + g, w === i && F.inLink ? null : v ? !0 : (L = E.now(), L.column += y.length, L.offset += y.length, k = T === D ? k : b, I = { type: w + "Reference", identifier: r(k), label: k, referenceType: T }, w === i ? (x = F.enterLink(), I.children = F.tokenizeInline(b, L), x()) : I.alt = F.decode.raw(F.unescape(b), L) || null, E(g)(I));
|
|
1331
|
+
if (!(T !== D && M)) return g = y + g, w === i && F.inLink ? null : v ? !0 : (L = E.now(), L.column += y.length, L.offset += y.length, k = T === D ? k : b, I = { type: w + "Reference", identifier: r(k), label: k, referenceType: T }, w === i ? (x = F.enterLink(), I.children = F.tokenizeInline(b, L), x()) : I.alt = F.decode.raw(F.unescape(b), L) || null, E(g)(I));
|
|
1572
1332
|
}
|
|
1573
1333
|
}
|
|
1574
1334
|
}
|
|
@@ -1584,12 +1344,10 @@ $$`;
|
|
|
1584
1344
|
var i = "\\", o = "*", a = "_";
|
|
1585
1345
|
function l(D, s, c) {
|
|
1586
1346
|
var f = this, h = 0, p = s.charAt(h), E, A, v, F, B, m, d;
|
|
1587
|
-
if (!(p !== o && p !== a || s.charAt(++h) !== p) && (A = f.options.pedantic, v = p, B = v + v, m = s.length, h++, F = "", p = "", !(A && n(s.charAt(h)))))
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
!A && p === i && (F += p, p = s.charAt(++h)), F += p, h++;
|
|
1592
|
-
}
|
|
1347
|
+
if (!(p !== o && p !== a || s.charAt(++h) !== p) && (A = f.options.pedantic, v = p, B = v + v, m = s.length, h++, F = "", p = "", !(A && n(s.charAt(h))))) for (; h < m; ) {
|
|
1348
|
+
if (d = p, p = s.charAt(h), p === v && s.charAt(h + 1) === v && (!A || !n(d)) && (p = s.charAt(h + 2), p !== v)) return t(F) ? c ? !0 : (E = D.now(), E.column += 2, E.offset += 2, D(B + F + B)({ type: "strong", children: f.tokenizeInline(F, E) })) : void 0;
|
|
1349
|
+
!A && p === i && (F += p, p = s.charAt(++h)), F += p, h++;
|
|
1350
|
+
}
|
|
1593
1351
|
}
|
|
1594
1352
|
}), an = N((u, e) => {
|
|
1595
1353
|
e.exports = r;
|
|
@@ -1609,22 +1367,20 @@ $$`;
|
|
|
1609
1367
|
var o = "*", a = "_", l = "\\";
|
|
1610
1368
|
function D(s, c, f) {
|
|
1611
1369
|
var h = this, p = 0, E = c.charAt(p), A, v, F, B, m, d, C;
|
|
1612
|
-
if (!(E !== o && E !== a) && (v = h.options.pedantic, m = E, F = E, d = c.length, p++, B = "", E = "", !(v && r(c.charAt(p)))))
|
|
1613
|
-
|
|
1614
|
-
if (
|
|
1615
|
-
if (
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
B += F;
|
|
1620
|
-
continue;
|
|
1621
|
-
}
|
|
1622
|
-
return f ? !0 : (A = s.now(), A.column++, A.offset++, s(m + B + F)({ type: "emphasis", children: h.tokenizeInline(B, A) }));
|
|
1370
|
+
if (!(E !== o && E !== a) && (v = h.options.pedantic, m = E, F = E, d = c.length, p++, B = "", E = "", !(v && r(c.charAt(p))))) for (; p < d; ) {
|
|
1371
|
+
if (C = E, E = c.charAt(p), E === F && (!v || !r(C))) {
|
|
1372
|
+
if (E = c.charAt(++p), E !== F) {
|
|
1373
|
+
if (!t(B) || C === F) return;
|
|
1374
|
+
if (!v && F === a && n(E)) {
|
|
1375
|
+
B += F;
|
|
1376
|
+
continue;
|
|
1623
1377
|
}
|
|
1624
|
-
B
|
|
1378
|
+
return f ? !0 : (A = s.now(), A.column++, A.offset++, s(m + B + F)({ type: "emphasis", children: h.tokenizeInline(B, A) }));
|
|
1625
1379
|
}
|
|
1626
|
-
|
|
1380
|
+
B += F;
|
|
1627
1381
|
}
|
|
1382
|
+
!v && E === l && (B += E, E = c.charAt(++p)), B += E, p++;
|
|
1383
|
+
}
|
|
1628
1384
|
}
|
|
1629
1385
|
}), sn = N((u, e) => {
|
|
1630
1386
|
e.exports = t;
|
|
@@ -1637,12 +1393,10 @@ $$`;
|
|
|
1637
1393
|
var r = "~", i = "~~";
|
|
1638
1394
|
function o(a, l, D) {
|
|
1639
1395
|
var s = this, c = "", f = "", h = "", p = "", E, A, v;
|
|
1640
|
-
if (!(!s.options.gfm || l.charAt(0) !== r || l.charAt(1) !== r || t(l.charAt(2))))
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
p += f, h = f, f = c;
|
|
1645
|
-
}
|
|
1396
|
+
if (!(!s.options.gfm || l.charAt(0) !== r || l.charAt(1) !== r || t(l.charAt(2)))) for (E = 1, A = l.length, v = a.now(), v.column += 2, v.offset += 2; ++E < A; ) {
|
|
1397
|
+
if (c = l.charAt(E), c === r && f === r && (!h || !t(h))) return D ? !0 : a(i + p + i)({ type: "delete", children: s.tokenizeInline(p, v) });
|
|
1398
|
+
p += f, h = f, f = c;
|
|
1399
|
+
}
|
|
1646
1400
|
}
|
|
1647
1401
|
}), cn = N((u, e) => {
|
|
1648
1402
|
e.exports = t;
|
|
@@ -1654,8 +1408,7 @@ $$`;
|
|
|
1654
1408
|
e.exports = o, o.locator = t;
|
|
1655
1409
|
var n = 10, r = 32, i = 96;
|
|
1656
1410
|
function o(a, l, D) {
|
|
1657
|
-
for (var s = l.length, c = 0, f, h, p, E, A, v; c < s && l.charCodeAt(c) === i; )
|
|
1658
|
-
c++;
|
|
1411
|
+
for (var s = l.length, c = 0, f, h, p, E, A, v; c < s && l.charCodeAt(c) === i; ) c++;
|
|
1659
1412
|
if (!(c === 0 || c === s)) {
|
|
1660
1413
|
for (f = c, A = l.charCodeAt(c); c < s; ) {
|
|
1661
1414
|
if (E = A, A = l.charCodeAt(c + 1), E === i) {
|
|
@@ -1663,13 +1416,11 @@ $$`;
|
|
|
1663
1416
|
v = !0;
|
|
1664
1417
|
break;
|
|
1665
1418
|
}
|
|
1666
|
-
} else
|
|
1667
|
-
h !== void 0 && (h = void 0, p = void 0);
|
|
1419
|
+
} else h !== void 0 && (h = void 0, p = void 0);
|
|
1668
1420
|
c++;
|
|
1669
1421
|
}
|
|
1670
1422
|
if (v) {
|
|
1671
|
-
if (D)
|
|
1672
|
-
return !0;
|
|
1423
|
+
if (D) return !0;
|
|
1673
1424
|
if (c = f, s = h, E = l.charCodeAt(c), A = l.charCodeAt(s - 1), v = !1, s - c > 2 && (E === r || E === n) && (A === r || A === n)) {
|
|
1674
1425
|
for (c++, s--; c < s; ) {
|
|
1675
1426
|
if (E = l.charCodeAt(c), E !== r && E !== n) {
|
|
@@ -1688,8 +1439,7 @@ $$`;
|
|
|
1688
1439
|
e.exports = t;
|
|
1689
1440
|
function t(n, r) {
|
|
1690
1441
|
for (var i = n.indexOf(`
|
|
1691
|
-
`, r); i > r && n.charAt(i - 1) === " "; )
|
|
1692
|
-
i--;
|
|
1442
|
+
`, r); i > r && n.charAt(i - 1) === " "; ) i--;
|
|
1693
1443
|
return i;
|
|
1694
1444
|
}
|
|
1695
1445
|
}), hn = N((u, e) => {
|
|
@@ -1699,10 +1449,8 @@ $$`;
|
|
|
1699
1449
|
`, i = 2;
|
|
1700
1450
|
function o(a, l, D) {
|
|
1701
1451
|
for (var s = l.length, c = -1, f = "", h; ++c < s; ) {
|
|
1702
|
-
if (h = l.charAt(c), h === r)
|
|
1703
|
-
|
|
1704
|
-
if (h !== n)
|
|
1705
|
-
return;
|
|
1452
|
+
if (h = l.charAt(c), h === r) return c < i ? void 0 : D ? !0 : (f += h, a(f)({ type: "break" }));
|
|
1453
|
+
if (h !== n) return;
|
|
1706
1454
|
f += h;
|
|
1707
1455
|
}
|
|
1708
1456
|
}
|
|
@@ -1710,10 +1458,8 @@ $$`;
|
|
|
1710
1458
|
e.exports = t;
|
|
1711
1459
|
function t(n, r, i) {
|
|
1712
1460
|
var o = this, a, l, D, s, c, f, h, p, E, A;
|
|
1713
|
-
if (i)
|
|
1714
|
-
|
|
1715
|
-
for (a = o.inlineMethods, s = a.length, l = o.inlineTokenizers, D = -1, E = r.length; ++D < s; )
|
|
1716
|
-
p = a[D], !(p === "text" || !l[p]) && (h = l[p].locator, h || n.file.fail("Missing locator: `" + p + "`"), f = h.call(o, r, 1), f !== -1 && f < E && (E = f));
|
|
1461
|
+
if (i) return !0;
|
|
1462
|
+
for (a = o.inlineMethods, s = a.length, l = o.inlineTokenizers, D = -1, E = r.length; ++D < s; ) p = a[D], !(p === "text" || !l[p]) && (h = l[p].locator, h || n.file.fail("Missing locator: `" + p + "`"), f = h.call(o, r, 1), f !== -1 && f < E && (E = f));
|
|
1717
1463
|
c = r.slice(0, E), A = n.now(), o.decode(c, A, v);
|
|
1718
1464
|
function v(F, B, m) {
|
|
1719
1465
|
n(m || F)({ type: "text", value: F });
|
|
@@ -1729,8 +1475,7 @@ $$`;
|
|
|
1729
1475
|
D.setOptions = yr(), D.parse = Tr(), D.options = Bt(), D.exitStart = n("atStart", !0), D.enterList = n("inList", !1), D.enterLink = n("inLink", !1), D.enterBlock = n("inBlock", !1), D.interruptParagraph = [["thematicBreak"], ["list"], ["atxHeading"], ["fencedCode"], ["blockquote"], ["html"], ["setextHeading", { commonmark: !1 }], ["definition", { commonmark: !1 }]], D.interruptList = [["atxHeading", { pedantic: !1 }], ["fencedCode", { pedantic: !1 }], ["thematicBreak", { pedantic: !1 }], ["definition", { commonmark: !1 }]], D.interruptBlockquote = [["indentedCode", { commonmark: !0 }], ["fencedCode", { commonmark: !0 }], ["atxHeading", { commonmark: !0 }], ["setextHeading", { commonmark: !0 }], ["thematicBreak", { commonmark: !0 }], ["html", { commonmark: !0 }], ["list", { commonmark: !0 }], ["definition", { commonmark: !1 }]], D.blockTokenizers = { blankLine: Or(), indentedCode: Rr(), fencedCode: Nr(), blockquote: Ir(), atxHeading: Pr(), thematicBreak: jr(), list: zr(), setextHeading: Mr(), html: Ur(), definition: Vr(), table: Gr(), paragraph: Wr() }, D.inlineTokenizers = { escape: _r(), autoLink: Jr(), url: Xr(), email: Qr(), html: un(), link: en(), reference: tn(), strong: nn(), emphasis: ln(), deletion: Dn(), code: fn(), break: hn(), text: dn() }, D.blockMethods = s(D.blockTokenizers), D.inlineMethods = s(D.inlineTokenizers), D.tokenizeBlock = a("block"), D.tokenizeInline = a("inline"), D.tokenizeFactory = a;
|
|
1730
1476
|
function s(c) {
|
|
1731
1477
|
var f = [], h;
|
|
1732
|
-
for (h in c)
|
|
1733
|
-
f.push(h);
|
|
1478
|
+
for (h in c) f.push(h);
|
|
1734
1479
|
return f;
|
|
1735
1480
|
}
|
|
1736
1481
|
}), Cn = N((u, e) => {
|
|
@@ -1743,8 +1488,7 @@ $$`;
|
|
|
1743
1488
|
}), An = N((u, e) => {
|
|
1744
1489
|
e.exports = t;
|
|
1745
1490
|
function t(n) {
|
|
1746
|
-
if (n)
|
|
1747
|
-
throw n;
|
|
1491
|
+
if (n) throw n;
|
|
1748
1492
|
}
|
|
1749
1493
|
}), Lt = N((u, e) => {
|
|
1750
1494
|
e.exports = function(t) {
|
|
@@ -1754,38 +1498,28 @@ $$`;
|
|
|
1754
1498
|
var t = Object.prototype.hasOwnProperty, n = Object.prototype.toString, r = Object.defineProperty, i = Object.getOwnPropertyDescriptor, o = function(s) {
|
|
1755
1499
|
return typeof Array.isArray == "function" ? Array.isArray(s) : n.call(s) === "[object Array]";
|
|
1756
1500
|
}, a = function(s) {
|
|
1757
|
-
if (!s || n.call(s) !== "[object Object]")
|
|
1758
|
-
return !1;
|
|
1501
|
+
if (!s || n.call(s) !== "[object Object]") return !1;
|
|
1759
1502
|
var c = t.call(s, "constructor"), f = s.constructor && s.constructor.prototype && t.call(s.constructor.prototype, "isPrototypeOf");
|
|
1760
|
-
if (s.constructor && !c && !f)
|
|
1761
|
-
return !1;
|
|
1503
|
+
if (s.constructor && !c && !f) return !1;
|
|
1762
1504
|
var h;
|
|
1763
|
-
for (h in s)
|
|
1764
|
-
;
|
|
1505
|
+
for (h in s) ;
|
|
1765
1506
|
return typeof h > "u" || t.call(s, h);
|
|
1766
1507
|
}, l = function(s, c) {
|
|
1767
1508
|
r && c.name === "__proto__" ? r(s, c.name, { enumerable: !0, configurable: !0, value: c.newValue, writable: !0 }) : s[c.name] = c.newValue;
|
|
1768
1509
|
}, D = function(s, c) {
|
|
1769
|
-
if (c === "__proto__")
|
|
1770
|
-
if (
|
|
1771
|
-
|
|
1772
|
-
return i(s, c).value;
|
|
1773
|
-
} else
|
|
1774
|
-
return;
|
|
1510
|
+
if (c === "__proto__") if (t.call(s, c)) {
|
|
1511
|
+
if (i) return i(s, c).value;
|
|
1512
|
+
} else return;
|
|
1775
1513
|
return s[c];
|
|
1776
1514
|
};
|
|
1777
1515
|
e.exports = function s() {
|
|
1778
1516
|
var c, f, h, p, E, A, v = arguments[0], F = 1, B = arguments.length, m = !1;
|
|
1779
|
-
for (typeof v == "boolean" && (m = v, v = arguments[1] || {}, F = 2), (v == null || typeof v != "object" && typeof v != "function") && (v = {}); F < B; ++F)
|
|
1780
|
-
if (c = arguments[F], c != null)
|
|
1781
|
-
for (f in c)
|
|
1782
|
-
h = D(v, f), p = D(c, f), v !== p && (m && p && (a(p) || (E = o(p))) ? (E ? (E = !1, A = h && o(h) ? h : []) : A = h && a(h) ? h : {}, l(v, { name: f, newValue: s(m, A, p) })) : typeof p < "u" && l(v, { name: f, newValue: p }));
|
|
1517
|
+
for (typeof v == "boolean" && (m = v, v = arguments[1] || {}, F = 2), (v == null || typeof v != "object" && typeof v != "function") && (v = {}); F < B; ++F) if (c = arguments[F], c != null) for (f in c) h = D(v, f), p = D(c, f), v !== p && (m && p && (a(p) || (E = o(p))) ? (E ? (E = !1, A = h && o(h) ? h : []) : A = h && a(h) ? h : {}, l(v, { name: f, newValue: s(m, A, p) })) : typeof p < "u" && l(v, { name: f, newValue: p }));
|
|
1783
1518
|
return v;
|
|
1784
1519
|
};
|
|
1785
1520
|
}), mn = N((u, e) => {
|
|
1786
1521
|
e.exports = (t) => {
|
|
1787
|
-
if (Object.prototype.toString.call(t) !== "[object Object]")
|
|
1788
|
-
return !1;
|
|
1522
|
+
if (Object.prototype.toString.call(t) !== "[object Object]") return !1;
|
|
1789
1523
|
let n = Object.getPrototypeOf(t);
|
|
1790
1524
|
return n === null || n === Object.prototype;
|
|
1791
1525
|
};
|
|
@@ -1801,8 +1535,7 @@ $$`;
|
|
|
1801
1535
|
try {
|
|
1802
1536
|
f = r.apply(null, s);
|
|
1803
1537
|
} catch (h) {
|
|
1804
|
-
if (c && o)
|
|
1805
|
-
throw h;
|
|
1538
|
+
if (c && o) throw h;
|
|
1806
1539
|
return l(h);
|
|
1807
1540
|
}
|
|
1808
1541
|
c || (f && typeof f.then == "function" ? f.then(D, l) : f instanceof Error ? l(f) : D(f));
|
|
@@ -1823,8 +1556,7 @@ $$`;
|
|
|
1823
1556
|
return o.run = a, o.use = l, o;
|
|
1824
1557
|
function a() {
|
|
1825
1558
|
var D = -1, s = n.call(arguments, 0, -1), c = arguments[arguments.length - 1];
|
|
1826
|
-
if (typeof c != "function")
|
|
1827
|
-
throw new Error("Expected function as last argument, not " + c);
|
|
1559
|
+
if (typeof c != "function") throw new Error("Expected function as last argument, not " + c);
|
|
1828
1560
|
f.apply(null, [null].concat(s));
|
|
1829
1561
|
function f(h) {
|
|
1830
1562
|
var p = i[++D], E = n.call(arguments, 0), A = E.slice(1), v = s.length, F = -1;
|
|
@@ -1832,14 +1564,12 @@ $$`;
|
|
|
1832
1564
|
c(h);
|
|
1833
1565
|
return;
|
|
1834
1566
|
}
|
|
1835
|
-
for (; ++F < v; )
|
|
1836
|
-
(A[F] === null || A[F] === void 0) && (A[F] = s[F]);
|
|
1567
|
+
for (; ++F < v; ) (A[F] === null || A[F] === void 0) && (A[F] = s[F]);
|
|
1837
1568
|
s = A, p ? t(p, f).apply(null, s) : c.apply(null, [null].concat(s));
|
|
1838
1569
|
}
|
|
1839
1570
|
}
|
|
1840
1571
|
function l(D) {
|
|
1841
|
-
if (typeof D != "function")
|
|
1842
|
-
throw new Error("Expected `fn` to be a function, not " + D);
|
|
1572
|
+
if (typeof D != "function") throw new Error("Expected `fn` to be a function, not " + D);
|
|
1843
1573
|
return i.push(D), o;
|
|
1844
1574
|
}
|
|
1845
1575
|
}
|
|
@@ -1878,43 +1608,34 @@ $$`;
|
|
|
1878
1608
|
u.basename = e, u.dirname = t, u.extname = n, u.join = r, u.sep = "/";
|
|
1879
1609
|
function e(l, D) {
|
|
1880
1610
|
var s = 0, c = -1, f, h, p, E;
|
|
1881
|
-
if (D !== void 0 && typeof D != "string")
|
|
1882
|
-
throw new TypeError('"ext" argument must be a string');
|
|
1611
|
+
if (D !== void 0 && typeof D != "string") throw new TypeError('"ext" argument must be a string');
|
|
1883
1612
|
if (a(l), f = l.length, D === void 0 || !D.length || D.length > l.length) {
|
|
1884
|
-
for (; f--; )
|
|
1885
|
-
if (l.charCodeAt(f) === 47) {
|
|
1886
|
-
if (p) {
|
|
1887
|
-
s = f + 1;
|
|
1888
|
-
break;
|
|
1889
|
-
}
|
|
1890
|
-
} else
|
|
1891
|
-
c < 0 && (p = !0, c = f + 1);
|
|
1892
|
-
return c < 0 ? "" : l.slice(s, c);
|
|
1893
|
-
}
|
|
1894
|
-
if (D === l)
|
|
1895
|
-
return "";
|
|
1896
|
-
for (h = -1, E = D.length - 1; f--; )
|
|
1897
|
-
if (l.charCodeAt(f) === 47) {
|
|
1613
|
+
for (; f--; ) if (l.charCodeAt(f) === 47) {
|
|
1898
1614
|
if (p) {
|
|
1899
1615
|
s = f + 1;
|
|
1900
1616
|
break;
|
|
1901
1617
|
}
|
|
1902
|
-
} else
|
|
1903
|
-
|
|
1618
|
+
} else c < 0 && (p = !0, c = f + 1);
|
|
1619
|
+
return c < 0 ? "" : l.slice(s, c);
|
|
1620
|
+
}
|
|
1621
|
+
if (D === l) return "";
|
|
1622
|
+
for (h = -1, E = D.length - 1; f--; ) if (l.charCodeAt(f) === 47) {
|
|
1623
|
+
if (p) {
|
|
1624
|
+
s = f + 1;
|
|
1625
|
+
break;
|
|
1626
|
+
}
|
|
1627
|
+
} else h < 0 && (p = !0, h = f + 1), E > -1 && (l.charCodeAt(f) === D.charCodeAt(E--) ? E < 0 && (c = f) : (E = -1, c = h));
|
|
1904
1628
|
return s === c ? c = h : c < 0 && (c = l.length), l.slice(s, c);
|
|
1905
1629
|
}
|
|
1906
1630
|
function t(l) {
|
|
1907
1631
|
var D, s, c;
|
|
1908
|
-
if (a(l), !l.length)
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
}
|
|
1916
|
-
} else
|
|
1917
|
-
s || (s = !0);
|
|
1632
|
+
if (a(l), !l.length) return ".";
|
|
1633
|
+
for (D = -1, c = l.length; --c; ) if (l.charCodeAt(c) === 47) {
|
|
1634
|
+
if (s) {
|
|
1635
|
+
D = c;
|
|
1636
|
+
break;
|
|
1637
|
+
}
|
|
1638
|
+
} else s || (s = !0);
|
|
1918
1639
|
return D < 0 ? l.charCodeAt(0) === 47 ? "/" : "." : D === 1 && l.charCodeAt(0) === 47 ? "//" : l.slice(0, D);
|
|
1919
1640
|
}
|
|
1920
1641
|
function n(l) {
|
|
@@ -1932,8 +1653,7 @@ $$`;
|
|
|
1932
1653
|
return D < 0 || c < 0 || f === 0 || f === 1 && D === c - 1 && D === s + 1 ? "" : l.slice(D, c);
|
|
1933
1654
|
}
|
|
1934
1655
|
function r() {
|
|
1935
|
-
for (var l = -1, D; ++l < arguments.length; )
|
|
1936
|
-
a(arguments[l]), arguments[l] && (D = D === void 0 ? arguments[l] : D + "/" + arguments[l]);
|
|
1656
|
+
for (var l = -1, D; ++l < arguments.length; ) a(arguments[l]), arguments[l] && (D = D === void 0 ? arguments[l] : D + "/" + arguments[l]);
|
|
1937
1657
|
return D === void 0 ? "." : i(D);
|
|
1938
1658
|
}
|
|
1939
1659
|
function i(l) {
|
|
@@ -1942,39 +1662,33 @@ $$`;
|
|
|
1942
1662
|
}
|
|
1943
1663
|
function o(l, D) {
|
|
1944
1664
|
for (var s = "", c = 0, f = -1, h = 0, p = -1, E, A; ++p <= l.length; ) {
|
|
1945
|
-
if (p < l.length)
|
|
1946
|
-
E = l.charCodeAt(p);
|
|
1665
|
+
if (p < l.length) E = l.charCodeAt(p);
|
|
1947
1666
|
else {
|
|
1948
|
-
if (E === 47)
|
|
1949
|
-
break;
|
|
1667
|
+
if (E === 47) break;
|
|
1950
1668
|
E = 47;
|
|
1951
1669
|
}
|
|
1952
1670
|
if (E === 47) {
|
|
1953
|
-
if (!(f === p - 1 || h === 1))
|
|
1954
|
-
if (
|
|
1955
|
-
if (s.length
|
|
1956
|
-
if (s.length
|
|
1957
|
-
|
|
1958
|
-
A < 0 ? (s = "", c = 0) : (s = s.slice(0, A), c = s.length - 1 - s.lastIndexOf("/")), f = p, h = 0;
|
|
1959
|
-
continue;
|
|
1960
|
-
}
|
|
1961
|
-
} else if (s.length) {
|
|
1962
|
-
s = "", c = 0, f = p, h = 0;
|
|
1671
|
+
if (!(f === p - 1 || h === 1)) if (f !== p - 1 && h === 2) {
|
|
1672
|
+
if (s.length < 2 || c !== 2 || s.charCodeAt(s.length - 1) !== 46 || s.charCodeAt(s.length - 2) !== 46) {
|
|
1673
|
+
if (s.length > 2) {
|
|
1674
|
+
if (A = s.lastIndexOf("/"), A !== s.length - 1) {
|
|
1675
|
+
A < 0 ? (s = "", c = 0) : (s = s.slice(0, A), c = s.length - 1 - s.lastIndexOf("/")), f = p, h = 0;
|
|
1963
1676
|
continue;
|
|
1964
1677
|
}
|
|
1678
|
+
} else if (s.length) {
|
|
1679
|
+
s = "", c = 0, f = p, h = 0;
|
|
1680
|
+
continue;
|
|
1965
1681
|
}
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1682
|
+
}
|
|
1683
|
+
D && (s = s.length ? s + "/.." : "..", c = 2);
|
|
1684
|
+
} else s.length ? s += "/" + l.slice(f + 1, p) : s = l.slice(f + 1, p), c = p - f - 1;
|
|
1969
1685
|
f = p, h = 0;
|
|
1970
|
-
} else
|
|
1971
|
-
E === 46 && h > -1 ? h++ : h = -1;
|
|
1686
|
+
} else E === 46 && h > -1 ? h++ : h = -1;
|
|
1972
1687
|
}
|
|
1973
1688
|
return s;
|
|
1974
1689
|
}
|
|
1975
1690
|
function a(l) {
|
|
1976
|
-
if (typeof l != "string")
|
|
1977
|
-
throw new TypeError("Path must be a string. Received " + JSON.stringify(l));
|
|
1691
|
+
if (typeof l != "string") throw new TypeError("Path must be a string. Received " + JSON.stringify(l));
|
|
1978
1692
|
}
|
|
1979
1693
|
}), yn = N((u) => {
|
|
1980
1694
|
u.cwd = e;
|
|
@@ -1988,18 +1702,12 @@ $$`;
|
|
|
1988
1702
|
a.prototype.toString = F, Object.defineProperty(a.prototype, "path", { get: l, set: D }), Object.defineProperty(a.prototype, "dirname", { get: s, set: c }), Object.defineProperty(a.prototype, "basename", { get: f, set: h }), Object.defineProperty(a.prototype, "extname", { get: p, set: E }), Object.defineProperty(a.prototype, "stem", { get: A, set: v });
|
|
1989
1703
|
function a(C) {
|
|
1990
1704
|
var g, y;
|
|
1991
|
-
if (!C)
|
|
1992
|
-
|
|
1993
|
-
else if (
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
if (!(this instanceof a))
|
|
1998
|
-
return new a(C);
|
|
1999
|
-
for (this.data = {}, this.messages = [], this.history = [], this.cwd = n.cwd(), y = -1; ++y < o.length; )
|
|
2000
|
-
g = o[y], i.call(C, g) && (this[g] = C[g]);
|
|
2001
|
-
for (g in C)
|
|
2002
|
-
o.indexOf(g) < 0 && (this[g] = C[g]);
|
|
1705
|
+
if (!C) C = {};
|
|
1706
|
+
else if (typeof C == "string" || r(C)) C = { contents: C };
|
|
1707
|
+
else if ("message" in C && "messages" in C) return C;
|
|
1708
|
+
if (!(this instanceof a)) return new a(C);
|
|
1709
|
+
for (this.data = {}, this.messages = [], this.history = [], this.cwd = n.cwd(), y = -1; ++y < o.length; ) g = o[y], i.call(C, g) && (this[g] = C[g]);
|
|
1710
|
+
for (g in C) o.indexOf(g) < 0 && (this[g] = C[g]);
|
|
2003
1711
|
}
|
|
2004
1712
|
function l() {
|
|
2005
1713
|
return this.history[this.history.length - 1];
|
|
@@ -2024,10 +1732,8 @@ $$`;
|
|
|
2024
1732
|
}
|
|
2025
1733
|
function E(C) {
|
|
2026
1734
|
if (B(C, "extname"), d(this.path, "extname"), C) {
|
|
2027
|
-
if (C.charCodeAt(0) !== 46)
|
|
2028
|
-
|
|
2029
|
-
if (C.indexOf(".", 1) > -1)
|
|
2030
|
-
throw new Error("`extname` cannot contain multiple dots");
|
|
1735
|
+
if (C.charCodeAt(0) !== 46) throw new Error("`extname` must start with `.`");
|
|
1736
|
+
if (C.indexOf(".", 1) > -1) throw new Error("`extname` cannot contain multiple dots");
|
|
2031
1737
|
}
|
|
2032
1738
|
this.path = t.join(this.dirname, this.stem + (C || ""));
|
|
2033
1739
|
}
|
|
@@ -2041,16 +1747,13 @@ $$`;
|
|
|
2041
1747
|
return (this.contents || "").toString(C);
|
|
2042
1748
|
}
|
|
2043
1749
|
function B(C, g) {
|
|
2044
|
-
if (C && C.indexOf(t.sep) > -1)
|
|
2045
|
-
throw new Error("`" + g + "` cannot be a path: did not expect `" + t.sep + "`");
|
|
1750
|
+
if (C && C.indexOf(t.sep) > -1) throw new Error("`" + g + "` cannot be a path: did not expect `" + t.sep + "`");
|
|
2046
1751
|
}
|
|
2047
1752
|
function m(C, g) {
|
|
2048
|
-
if (!C)
|
|
2049
|
-
throw new Error("`" + g + "` cannot be empty");
|
|
1753
|
+
if (!C) throw new Error("`" + g + "` cannot be empty");
|
|
2050
1754
|
}
|
|
2051
1755
|
function d(C, g) {
|
|
2052
|
-
if (!C)
|
|
2053
|
-
throw new Error("Setting `" + g + "` requires `path` to be set too");
|
|
1756
|
+
if (!C) throw new Error("Setting `" + g + "` requires `path` to be set too");
|
|
2054
1757
|
}
|
|
2055
1758
|
}), kn = N((u, e) => {
|
|
2056
1759
|
var t = Bn(), n = wn();
|
|
@@ -2090,16 +1793,13 @@ $$`;
|
|
|
2090
1793
|
var C = [], g = o(), y = {}, w = -1, T;
|
|
2091
1794
|
return b.data = L, b.freeze = k, b.attachers = C, b.use = I, b.parse = S, b.stringify = V, b.run = M, b.runSync = z, b.process = q, b.processSync = J, b;
|
|
2092
1795
|
function b() {
|
|
2093
|
-
for (var j = p(), O = -1; ++O < C.length; )
|
|
2094
|
-
j.use.apply(null, C[O]);
|
|
1796
|
+
for (var j = p(), O = -1; ++O < C.length; ) j.use.apply(null, C[O]);
|
|
2095
1797
|
return j.data(r(!0, {}, y)), j;
|
|
2096
1798
|
}
|
|
2097
1799
|
function k() {
|
|
2098
1800
|
var j, O;
|
|
2099
|
-
if (T)
|
|
2100
|
-
|
|
2101
|
-
for (; ++w < C.length; )
|
|
2102
|
-
j = C[w], j[1] !== !1 && (j[1] === !0 && (j[1] = void 0), O = j[0].apply(b, j.slice(1)), typeof O == "function" && g.use(O));
|
|
1801
|
+
if (T) return b;
|
|
1802
|
+
for (; ++w < C.length; ) j = C[w], j[1] !== !1 && (j[1] === !0 && (j[1] = void 0), O = j[0].apply(b, j.slice(1)), typeof O == "function" && g.use(O));
|
|
2103
1803
|
return T = !0, w = 1 / 0, b;
|
|
2104
1804
|
}
|
|
2105
1805
|
function L(j, O) {
|
|
@@ -2107,33 +1807,22 @@ $$`;
|
|
|
2107
1807
|
}
|
|
2108
1808
|
function I(j) {
|
|
2109
1809
|
var O;
|
|
2110
|
-
if (B("use", T), j != null)
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
else if (typeof j == "object")
|
|
2114
|
-
"length" in j ? R(j) : $(j);
|
|
2115
|
-
else
|
|
2116
|
-
throw new Error("Expected usable value, not `" + j + "`");
|
|
1810
|
+
if (B("use", T), j != null) if (typeof j == "function") P.apply(null, arguments);
|
|
1811
|
+
else if (typeof j == "object") "length" in j ? R(j) : $(j);
|
|
1812
|
+
else throw new Error("Expected usable value, not `" + j + "`");
|
|
2117
1813
|
return O && (y.settings = r(y.settings || {}, O)), b;
|
|
2118
1814
|
function $(G) {
|
|
2119
1815
|
R(G.plugins), G.settings && (O = r(O || {}, G.settings));
|
|
2120
1816
|
}
|
|
2121
1817
|
function U(G) {
|
|
2122
|
-
if (typeof G == "function")
|
|
2123
|
-
|
|
2124
|
-
else
|
|
2125
|
-
"length" in G ? P.apply(null, G) : $(G);
|
|
2126
|
-
else
|
|
2127
|
-
throw new Error("Expected usable value, not `" + G + "`");
|
|
1818
|
+
if (typeof G == "function") P(G);
|
|
1819
|
+
else if (typeof G == "object") "length" in G ? P.apply(null, G) : $(G);
|
|
1820
|
+
else throw new Error("Expected usable value, not `" + G + "`");
|
|
2128
1821
|
}
|
|
2129
1822
|
function R(G) {
|
|
2130
1823
|
var W = -1;
|
|
2131
|
-
if (G != null)
|
|
2132
|
-
|
|
2133
|
-
for (; ++W < G.length; )
|
|
2134
|
-
U(G[W]);
|
|
2135
|
-
else
|
|
2136
|
-
throw new Error("Expected a list of plugins, not `" + G + "`");
|
|
1824
|
+
if (G != null) if (typeof G == "object" && "length" in G) for (; ++W < G.length; ) U(G[W]);
|
|
1825
|
+
else throw new Error("Expected a list of plugins, not `" + G + "`");
|
|
2137
1826
|
}
|
|
2138
1827
|
function P(G, W) {
|
|
2139
1828
|
var Y = x(G);
|
|
@@ -2141,17 +1830,14 @@ $$`;
|
|
|
2141
1830
|
}
|
|
2142
1831
|
}
|
|
2143
1832
|
function x(j) {
|
|
2144
|
-
for (var O = -1; ++O < C.length; )
|
|
2145
|
-
if (C[O][0] === j)
|
|
2146
|
-
return C[O];
|
|
1833
|
+
for (var O = -1; ++O < C.length; ) if (C[O][0] === j) return C[O];
|
|
2147
1834
|
}
|
|
2148
1835
|
function S(j) {
|
|
2149
1836
|
var O = a(j), $;
|
|
2150
1837
|
return k(), $ = b.Parser, v("parse", $), E($, "parse") ? new $(String(O), O).parse() : $(String(O), O);
|
|
2151
1838
|
}
|
|
2152
1839
|
function M(j, O, $) {
|
|
2153
|
-
if (m(j), k(), !$ && typeof O == "function" && ($ = O, O = null), !$)
|
|
2154
|
-
return new Promise(U);
|
|
1840
|
+
if (m(j), k(), !$ && typeof O == "function" && ($ = O, O = null), !$) return new Promise(U);
|
|
2155
1841
|
U(null, $);
|
|
2156
1842
|
function U(R, P) {
|
|
2157
1843
|
g.run(j, a(O), G);
|
|
@@ -2172,8 +1858,7 @@ $$`;
|
|
|
2172
1858
|
return k(), U = b.Compiler, F("stringify", U), m(j), E(U, "compile") ? new U(j, $).compile() : U(j, $);
|
|
2173
1859
|
}
|
|
2174
1860
|
function q(j, O) {
|
|
2175
|
-
if (k(), v("process", b.Parser), F("process", b.Compiler), !O)
|
|
2176
|
-
return new Promise($);
|
|
1861
|
+
if (k(), v("process", b.Parser), F("process", b.Compiler), !O) return new Promise($);
|
|
2177
1862
|
$(null, O);
|
|
2178
1863
|
function $(U, R) {
|
|
2179
1864
|
var P = a(j);
|
|
@@ -2196,67 +1881,51 @@ $$`;
|
|
|
2196
1881
|
}
|
|
2197
1882
|
function A(C) {
|
|
2198
1883
|
var g;
|
|
2199
|
-
for (g in C)
|
|
2200
|
-
return !0;
|
|
1884
|
+
for (g in C) return !0;
|
|
2201
1885
|
return !1;
|
|
2202
1886
|
}
|
|
2203
1887
|
function v(C, g) {
|
|
2204
|
-
if (typeof g != "function")
|
|
2205
|
-
throw new Error("Cannot `" + C + "` without `Parser`");
|
|
1888
|
+
if (typeof g != "function") throw new Error("Cannot `" + C + "` without `Parser`");
|
|
2206
1889
|
}
|
|
2207
1890
|
function F(C, g) {
|
|
2208
|
-
if (typeof g != "function")
|
|
2209
|
-
throw new Error("Cannot `" + C + "` without `Compiler`");
|
|
1891
|
+
if (typeof g != "function") throw new Error("Cannot `" + C + "` without `Compiler`");
|
|
2210
1892
|
}
|
|
2211
1893
|
function B(C, g) {
|
|
2212
|
-
if (g)
|
|
2213
|
-
throw new Error("Cannot invoke `" + C + "` on a frozen processor.\nCreate a new processor first, by invoking it: use `processor()` instead of `processor`.");
|
|
1894
|
+
if (g) throw new Error("Cannot invoke `" + C + "` on a frozen processor.\nCreate a new processor first, by invoking it: use `processor()` instead of `processor`.");
|
|
2214
1895
|
}
|
|
2215
1896
|
function m(C) {
|
|
2216
|
-
if (!C || typeof C.type != "string")
|
|
2217
|
-
throw new Error("Expected node, got `" + C + "`");
|
|
1897
|
+
if (!C || typeof C.type != "string") throw new Error("Expected node, got `" + C + "`");
|
|
2218
1898
|
}
|
|
2219
1899
|
function d(C, g, y) {
|
|
2220
|
-
if (!y)
|
|
2221
|
-
throw new Error("`" + C + "` finished async. Use `" + g + "` instead");
|
|
1900
|
+
if (!y) throw new Error("`" + C + "` finished async. Use `" + g + "` instead");
|
|
2222
1901
|
}
|
|
2223
1902
|
}), Tt = {};
|
|
2224
1903
|
Et(Tt, { languages: () => qa, options: () => La, parsers: () => Ht, printers: () => Za });
|
|
2225
1904
|
var Ln = (u, e, t) => {
|
|
2226
|
-
if (!(u && e == null))
|
|
2227
|
-
return Array.isArray(e) || typeof e == "string" ? e[t < 0 ? e.length + t : t] : e.at(t);
|
|
1905
|
+
if (!(u && e == null)) return Array.isArray(e) || typeof e == "string" ? e[t < 0 ? e.length + t : t] : e.at(t);
|
|
2228
1906
|
}, Au = Ln, Tn = (u, e, t, n) => {
|
|
2229
|
-
if (!(u && e == null))
|
|
2230
|
-
return e.replaceAll ? e.replaceAll(t, n) : t.global ? e.replace(t, n) : e.split(t).join(n);
|
|
1907
|
+
if (!(u && e == null)) return e.replaceAll ? e.replaceAll(t, n) : t.global ? e.replace(t, n) : e.split(t).join(n);
|
|
2231
1908
|
}, lu = Tn, On = Mu(Pe());
|
|
2232
1909
|
function xe(u) {
|
|
2233
|
-
if (typeof u != "string")
|
|
2234
|
-
throw new TypeError("Expected a string");
|
|
1910
|
+
if (typeof u != "string") throw new TypeError("Expected a string");
|
|
2235
1911
|
return u.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
2236
1912
|
}
|
|
2237
1913
|
var Iu = "string", Su = "array", Be = "cursor", Wu = "indent", Hu = "align", ie = "trim", Lu = "group", Pu = "fill", qu = "if-break", ae = "indent-if-break", oe = "line-suffix", le = "line-suffix-boundary", bu = "line", se = "label", _u = "break-parent", Ot = /* @__PURE__ */ new Set([Be, Wu, Hu, ie, Lu, Pu, qu, ae, oe, le, bu, se, _u]);
|
|
2238
1914
|
function Rn(u) {
|
|
2239
|
-
if (typeof u == "string")
|
|
2240
|
-
|
|
2241
|
-
if (
|
|
2242
|
-
return Su;
|
|
2243
|
-
if (!u)
|
|
2244
|
-
return;
|
|
1915
|
+
if (typeof u == "string") return Iu;
|
|
1916
|
+
if (Array.isArray(u)) return Su;
|
|
1917
|
+
if (!u) return;
|
|
2245
1918
|
let { type: e } = u;
|
|
2246
|
-
if (Ot.has(e))
|
|
2247
|
-
return e;
|
|
1919
|
+
if (Ot.has(e)) return e;
|
|
2248
1920
|
}
|
|
2249
1921
|
var Tu = Rn, Nn = (u) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(u);
|
|
2250
1922
|
function In(u) {
|
|
2251
1923
|
let e = u === null ? "null" : typeof u;
|
|
2252
|
-
if (e !== "string" && e !== "object")
|
|
2253
|
-
return `Unexpected doc '${e}',
|
|
1924
|
+
if (e !== "string" && e !== "object") return `Unexpected doc '${e}',
|
|
2254
1925
|
Expected it to be 'string' or 'object'.`;
|
|
2255
|
-
if (Tu(u))
|
|
2256
|
-
throw new Error("doc is valid.");
|
|
1926
|
+
if (Tu(u)) throw new Error("doc is valid.");
|
|
2257
1927
|
let t = Object.prototype.toString.call(u);
|
|
2258
|
-
if (t !== "[object Object]")
|
|
2259
|
-
return `Unexpected doc '${t}'.`;
|
|
1928
|
+
if (t !== "[object Object]") return `Unexpected doc '${t}'.`;
|
|
2260
1929
|
let n = Nn([...Ot].map((r) => `'${r}'`));
|
|
2261
1930
|
return `Unexpected doc.type '${u.type}'.
|
|
2262
1931
|
Expected it to be ${n}.`;
|
|
@@ -2277,55 +1946,47 @@ function jn(u, e, t, n) {
|
|
|
2277
1946
|
}
|
|
2278
1947
|
t && r.push(i, Ye);
|
|
2279
1948
|
let o = Tu(i);
|
|
2280
|
-
if (!o)
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
for (let l = a.length, D = l - 1; D >= 0; --D)
|
|
2288
|
-
r.push(a[D]);
|
|
2289
|
-
break;
|
|
2290
|
-
}
|
|
2291
|
-
case qu:
|
|
2292
|
-
r.push(i.flatContents, i.breakContents);
|
|
2293
|
-
break;
|
|
2294
|
-
case Lu:
|
|
2295
|
-
if (n && i.expandedStates)
|
|
2296
|
-
for (let a = i.expandedStates.length, l = a - 1; l >= 0; --l)
|
|
2297
|
-
r.push(i.expandedStates[l]);
|
|
2298
|
-
else
|
|
2299
|
-
r.push(i.contents);
|
|
2300
|
-
break;
|
|
2301
|
-
case Hu:
|
|
2302
|
-
case Wu:
|
|
2303
|
-
case ae:
|
|
2304
|
-
case se:
|
|
2305
|
-
case oe:
|
|
2306
|
-
r.push(i.contents);
|
|
2307
|
-
break;
|
|
2308
|
-
case Iu:
|
|
2309
|
-
case Be:
|
|
2310
|
-
case ie:
|
|
2311
|
-
case le:
|
|
2312
|
-
case bu:
|
|
2313
|
-
case _u:
|
|
2314
|
-
break;
|
|
2315
|
-
default:
|
|
2316
|
-
throw new Fe(i);
|
|
1949
|
+
if (!o) throw new Fe(i);
|
|
1950
|
+
if (e?.(i) !== !1) switch (o) {
|
|
1951
|
+
case Su:
|
|
1952
|
+
case Pu: {
|
|
1953
|
+
let a = o === Su ? i : i.parts;
|
|
1954
|
+
for (let l = a.length, D = l - 1; D >= 0; --D) r.push(a[D]);
|
|
1955
|
+
break;
|
|
2317
1956
|
}
|
|
1957
|
+
case qu:
|
|
1958
|
+
r.push(i.flatContents, i.breakContents);
|
|
1959
|
+
break;
|
|
1960
|
+
case Lu:
|
|
1961
|
+
if (n && i.expandedStates) for (let a = i.expandedStates.length, l = a - 1; l >= 0; --l) r.push(i.expandedStates[l]);
|
|
1962
|
+
else r.push(i.contents);
|
|
1963
|
+
break;
|
|
1964
|
+
case Hu:
|
|
1965
|
+
case Wu:
|
|
1966
|
+
case ae:
|
|
1967
|
+
case se:
|
|
1968
|
+
case oe:
|
|
1969
|
+
r.push(i.contents);
|
|
1970
|
+
break;
|
|
1971
|
+
case Iu:
|
|
1972
|
+
case Be:
|
|
1973
|
+
case ie:
|
|
1974
|
+
case le:
|
|
1975
|
+
case bu:
|
|
1976
|
+
case _u:
|
|
1977
|
+
break;
|
|
1978
|
+
default:
|
|
1979
|
+
throw new Fe(i);
|
|
1980
|
+
}
|
|
2318
1981
|
}
|
|
2319
1982
|
}
|
|
2320
1983
|
var $n = jn;
|
|
2321
1984
|
function zn(u, e) {
|
|
2322
|
-
if (typeof u == "string")
|
|
2323
|
-
return e(u);
|
|
1985
|
+
if (typeof u == "string") return e(u);
|
|
2324
1986
|
let t = /* @__PURE__ */ new Map();
|
|
2325
1987
|
return n(u);
|
|
2326
1988
|
function n(i) {
|
|
2327
|
-
if (t.has(i))
|
|
2328
|
-
return t.get(i);
|
|
1989
|
+
if (t.has(i)) return t.get(i);
|
|
2329
1990
|
let o = r(i);
|
|
2330
1991
|
return t.set(i, o), o;
|
|
2331
1992
|
}
|
|
@@ -2370,8 +2031,7 @@ function Mn(u) {
|
|
|
2370
2031
|
let e = /* @__PURE__ */ new Set(), t = [];
|
|
2371
2032
|
function n(i) {
|
|
2372
2033
|
if (i.type === _u && Ke(t), i.type === Lu) {
|
|
2373
|
-
if (t.push(i), e.has(i))
|
|
2374
|
-
return !1;
|
|
2034
|
+
if (t.push(i), e.has(i)) return !1;
|
|
2375
2035
|
e.add(i);
|
|
2376
2036
|
}
|
|
2377
2037
|
}
|
|
@@ -2407,8 +2067,7 @@ function Gn(u, e = "", t = {}) {
|
|
|
2407
2067
|
var Ae = { type: _u }, Me = { type: bu, hard: !0 }, Wn = { type: bu, hard: !0, literal: !0 }, Rt = { type: bu }, Nt = { type: bu, soft: !0 }, iu = [Me, Ae], Le = [Wn, Ae];
|
|
2408
2068
|
function It(u, e) {
|
|
2409
2069
|
let t = [];
|
|
2410
|
-
for (let n = 0; n < e.length; n++)
|
|
2411
|
-
n !== 0 && t.push(u), t.push(e[n]);
|
|
2070
|
+
for (let n = 0; n < e.length; n++) n !== 0 && t.push(u), t.push(e[n]);
|
|
2412
2071
|
return t;
|
|
2413
2072
|
}
|
|
2414
2073
|
function Hn(u, e) {
|
|
@@ -2418,23 +2077,19 @@ function Hn(u, e) {
|
|
|
2418
2077
|
var Pt = Hn;
|
|
2419
2078
|
function _n(u, e) {
|
|
2420
2079
|
let t = u.match(new RegExp(`(${xe(e)})+`, "gu"));
|
|
2421
|
-
if (t === null)
|
|
2422
|
-
return 0;
|
|
2080
|
+
if (t === null) return 0;
|
|
2423
2081
|
let n = /* @__PURE__ */ new Map(), r = 0;
|
|
2424
2082
|
for (let i of t) {
|
|
2425
2083
|
let o = i.length / e.length;
|
|
2426
2084
|
n.set(o, !0), o > r && (r = o);
|
|
2427
2085
|
}
|
|
2428
|
-
for (let i = 1; i < r; i++)
|
|
2429
|
-
if (!n.get(i))
|
|
2430
|
-
return i;
|
|
2086
|
+
for (let i = 1; i < r; i++) if (!n.get(i)) return i;
|
|
2431
2087
|
return r + 1;
|
|
2432
2088
|
}
|
|
2433
2089
|
var Jn = _n, fe = "'", Xe = '"';
|
|
2434
2090
|
function Yn(u, e) {
|
|
2435
2091
|
let t = e === !0 || e === fe ? fe : Xe, n = t === fe ? Xe : fe, r = 0, i = 0;
|
|
2436
|
-
for (let o of u)
|
|
2437
|
-
o === t ? r++ : o === n && i++;
|
|
2092
|
+
for (let o of u) o === t ? r++ : o === n && i++;
|
|
2438
2093
|
return r > i ? n : t;
|
|
2439
2094
|
}
|
|
2440
2095
|
var Kn = Yn, Xn = class extends Error {
|
|
@@ -2449,27 +2104,22 @@ function ui(u) {
|
|
|
2449
2104
|
var ei = ui, ti = ["noformat", "noprettier"], jt = ["format", "prettier"], ri = "format", Zu = 3;
|
|
2450
2105
|
function ni(u) {
|
|
2451
2106
|
let e = u.slice(0, Zu);
|
|
2452
|
-
if (e !== "---" && e !== "+++")
|
|
2453
|
-
return;
|
|
2107
|
+
if (e !== "---" && e !== "+++") return;
|
|
2454
2108
|
let t = u.indexOf(`
|
|
2455
2109
|
`, Zu);
|
|
2456
|
-
if (t === -1)
|
|
2457
|
-
return;
|
|
2110
|
+
if (t === -1) return;
|
|
2458
2111
|
let n = u.slice(Zu, t).trim(), r = u.indexOf(`
|
|
2459
2112
|
${e}`, t), i = n;
|
|
2460
2113
|
if (i || (i = e === "+++" ? "toml" : "yaml"), r === -1 && e === "---" && i === "yaml" && (r = u.indexOf(`
|
|
2461
|
-
...`, t)), r === -1)
|
|
2462
|
-
return;
|
|
2114
|
+
...`, t)), r === -1) return;
|
|
2463
2115
|
let o = r + 1 + Zu, a = u.charAt(o + 1);
|
|
2464
|
-
if (!/\s?/u.test(a))
|
|
2465
|
-
return;
|
|
2116
|
+
if (!/\s?/u.test(a)) return;
|
|
2466
2117
|
let l = u.slice(0, o);
|
|
2467
2118
|
return { type: "front-matter", language: i, explicitLanguage: n, value: u.slice(t + 1, r), startDelimiter: e, endDelimiter: l.slice(-Zu), raw: l };
|
|
2468
2119
|
}
|
|
2469
2120
|
function ii(u) {
|
|
2470
2121
|
let e = ni(u);
|
|
2471
|
-
if (!e)
|
|
2472
|
-
return { content: u };
|
|
2122
|
+
if (!e) return { content: u };
|
|
2473
2123
|
let { raw: t } = e;
|
|
2474
2124
|
return { frontMatter: e, content: lu(!1, t, /[^\n]/gu, " ") + u.slice(t.length) };
|
|
2475
2125
|
}
|
|
@@ -2495,17 +2145,13 @@ ${e.content}` : `${t}
|
|
|
2495
2145
|
${e.content}`;
|
|
2496
2146
|
}, si = /* @__PURE__ */ new Set(["position", "raw"]);
|
|
2497
2147
|
function $t(u, e, t) {
|
|
2498
|
-
if ((u.type === "front-matter" || u.type === "code" || u.type === "yaml" || u.type === "import" || u.type === "export" || u.type === "jsx") && delete e.value, u.type === "list" && delete e.isAligned, (u.type === "list" || u.type === "listItem") && delete e.spread, u.type === "text")
|
|
2499
|
-
return null;
|
|
2148
|
+
if ((u.type === "front-matter" || u.type === "code" || u.type === "yaml" || u.type === "import" || u.type === "export" || u.type === "jsx") && delete e.value, u.type === "list" && delete e.isAligned, (u.type === "list" || u.type === "listItem") && delete e.spread, u.type === "text") return null;
|
|
2500
2149
|
if (u.type === "inlineCode" && (e.value = lu(!1, u.value, `
|
|
2501
|
-
`, " ")), u.type === "wikiLink" && (e.value = lu(!1, u.value.trim(), /[\t\n]+/gu, " ")), (u.type === "definition" || u.type === "linkReference" || u.type === "imageReference") && (e.label = (0, Qn.default)(u.label)), (u.type === "link" || u.type === "image") && u.url && u.url.includes("("))
|
|
2502
|
-
|
|
2503
|
-
e.url = lu(!1, u.url, n, encodeURIComponent(n));
|
|
2504
|
-
if ((u.type === "definition" || u.type === "link" || u.type === "image") && u.title && (e.title = lu(!1, u.title, /\\(?=["')])/gu, "")), t?.type === "root" && t.children.length > 0 && (t.children[0] === u || ei(t.children[0]) && t.children[1] === u) && u.type === "html" && Ue(u.value, jt))
|
|
2505
|
-
return null;
|
|
2150
|
+
`, " ")), u.type === "wikiLink" && (e.value = lu(!1, u.value.trim(), /[\t\n]+/gu, " ")), (u.type === "definition" || u.type === "linkReference" || u.type === "imageReference") && (e.label = (0, Qn.default)(u.label)), (u.type === "link" || u.type === "image") && u.url && u.url.includes("(")) for (let n of "<>") e.url = lu(!1, u.url, n, encodeURIComponent(n));
|
|
2151
|
+
if ((u.type === "definition" || u.type === "link" || u.type === "image") && u.title && (e.title = lu(!1, u.title, /\\(?=["')])/gu, "")), t?.type === "root" && t.children.length > 0 && (t.children[0] === u || ei(t.children[0]) && t.children[1] === u) && u.type === "html" && Ue(u.value, jt)) return null;
|
|
2506
2152
|
}
|
|
2507
2153
|
$t.ignoredProperties = si;
|
|
2508
|
-
var Di = $t, ci = /(?:[\u{2c7}\u{2c9}-\u{2cb}\u{2d9}\u{2ea}-\u{2eb}\u{305}\u{323}\u{1100}-\u{11ff}\u{2e80}-\u{2e99}\u{2e9b}-\u{2ef3}\u{2f00}-\u{2fd5}\u{2ff0}-\u{303f}\u{3041}-\u{3096}\u{3099}-\u{30ff}\u{3105}-\u{312f}\u{3131}-\u{318e}\u{3190}-\u{4dbf}\u{4e00}-\u{9fff}\u{a700}-\u{a707}\u{a960}-\u{a97c}\u{ac00}-\u{d7a3}\u{d7b0}-\u{d7c6}\u{d7cb}-\u{d7fb}\u{f900}-\u{fa6d}\u{fa70}-\u{fad9}\u{fe10}-\u{fe1f}\u{fe30}-\u{fe6f}\u{ff00}-\u{ffef}\u{16fe3}\u{1aff0}-\u{1aff3}\u{1aff5}-\u{1affb}\u{1affd}-\u{1affe}\u{1b000}-\u{1b122}\u{1b132}\u{1b150}-\u{1b152}\u{1b155}\u{1b164}-\u{1b167}\u{1f200}\u{1f250}-\u{1f251}\u{20000}-\u{2a6df}\u{2a700}-\u{2b739}\u{2b740}-\u{2b81d}\u{2b820}-\u{2cea1}\u{2ceb0}-\u{2ebe0}\u{2ebf0}-\u{2ee5d}\u{2f800}-\u{2fa1d}\u{30000}-\u{3134a}\u{31350}-\u{323af}])(?:[\u{fe00}-\u{fe0f}\u{e0100}-\u{e01ef}])?/u, ue =
|
|
2154
|
+
var Di = $t, ci = /(?:[\u{2c7}\u{2c9}-\u{2cb}\u{2d9}\u{2ea}-\u{2eb}\u{305}\u{323}\u{1100}-\u{11ff}\u{2e80}-\u{2e99}\u{2e9b}-\u{2ef3}\u{2f00}-\u{2fd5}\u{2ff0}-\u{303f}\u{3041}-\u{3096}\u{3099}-\u{30ff}\u{3105}-\u{312f}\u{3131}-\u{318e}\u{3190}-\u{4dbf}\u{4e00}-\u{9fff}\u{a700}-\u{a707}\u{a960}-\u{a97c}\u{ac00}-\u{d7a3}\u{d7b0}-\u{d7c6}\u{d7cb}-\u{d7fb}\u{f900}-\u{fa6d}\u{fa70}-\u{fad9}\u{fe10}-\u{fe1f}\u{fe30}-\u{fe6f}\u{ff00}-\u{ffef}\u{16fe3}\u{1aff0}-\u{1aff3}\u{1aff5}-\u{1affb}\u{1affd}-\u{1affe}\u{1b000}-\u{1b122}\u{1b132}\u{1b150}-\u{1b152}\u{1b155}\u{1b164}-\u{1b167}\u{1f200}\u{1f250}-\u{1f251}\u{20000}-\u{2a6df}\u{2a700}-\u{2b739}\u{2b740}-\u{2b81d}\u{2b820}-\u{2cea1}\u{2ceb0}-\u{2ebe0}\u{2ebf0}-\u{2ee5d}\u{2f800}-\u{2fa1d}\u{30000}-\u{3134a}\u{31350}-\u{323af}])(?:[\u{fe00}-\u{fe0f}\u{e0100}-\u{e01ef}])?/u, ue = new RegExp("(?:[\\u{21}-\\u{2f}\\u{3a}-\\u{40}\\u{5b}-\\u{60}\\u{7b}-\\u{7e}]|\\p{General_Category=Connector_Punctuation}|\\p{General_Category=Dash_Punctuation}|\\p{General_Category=Close_Punctuation}|\\p{General_Category=Final_Punctuation}|\\p{General_Category=Initial_Punctuation}|\\p{General_Category=Other_Punctuation}|\\p{General_Category=Open_Punctuation})", "u");
|
|
2509
2155
|
async function fi(u, e) {
|
|
2510
2156
|
if (u.language === "yaml") {
|
|
2511
2157
|
let t = u.value.trim(), n = t ? await e(t, { parser: "yaml" }) : "";
|
|
@@ -2513,12 +2159,10 @@ async function fi(u, e) {
|
|
|
2513
2159
|
}
|
|
2514
2160
|
}
|
|
2515
2161
|
var pi = fi, hi = (u, e) => {
|
|
2516
|
-
if (!(u && e == null))
|
|
2517
|
-
return e.toReversed || !Array.isArray(e) ? e.toReversed() : [...e].reverse();
|
|
2162
|
+
if (!(u && e == null)) return e.toReversed || !Array.isArray(e) ? e.toReversed() : [...e].reverse();
|
|
2518
2163
|
}, di = hi, Ze, Qe, ut, et, tt, Fi = ((Ze = globalThis.Deno) == null ? void 0 : Ze.build.os) === "windows" || ((ut = (Qe = globalThis.navigator) == null ? void 0 : Qe.platform) == null ? void 0 : ut.startsWith("Win")) || ((tt = (et = globalThis.process) == null ? void 0 : et.platform) == null ? void 0 : tt.startsWith("win")) || !1;
|
|
2519
2164
|
function zt(u) {
|
|
2520
|
-
if (u = u instanceof URL ? u : new URL(u), u.protocol !== "file:")
|
|
2521
|
-
throw new TypeError(`URL must be a file URL: received "${u.protocol}"`);
|
|
2165
|
+
if (u = u instanceof URL ? u : new URL(u), u.protocol !== "file:") throw new TypeError(`URL must be a file URL: received "${u.protocol}"`);
|
|
2522
2166
|
return u;
|
|
2523
2167
|
}
|
|
2524
2168
|
function Ci(u) {
|
|
@@ -2534,25 +2178,21 @@ function gi(u) {
|
|
|
2534
2178
|
}
|
|
2535
2179
|
var mi = gi, Ei = (u) => String(u).split(/[/\\]/u).pop();
|
|
2536
2180
|
function rt(u, e) {
|
|
2537
|
-
if (!e)
|
|
2538
|
-
return;
|
|
2181
|
+
if (!e) return;
|
|
2539
2182
|
let t = Ei(e).toLowerCase();
|
|
2540
2183
|
return u.find(({ filenames: n }) => n?.some((r) => r.toLowerCase() === t)) ?? u.find(({ extensions: n }) => n?.some((r) => t.endsWith(r)));
|
|
2541
2184
|
}
|
|
2542
2185
|
function vi(u, e) {
|
|
2543
|
-
if (e)
|
|
2544
|
-
return u.find(({ name: t }) => t.toLowerCase() === e) ?? u.find(({ aliases: t }) => t?.includes(e)) ?? u.find(({ extensions: t }) => t?.includes(`.${e}`));
|
|
2186
|
+
if (e) return u.find(({ name: t }) => t.toLowerCase() === e) ?? u.find(({ aliases: t }) => t?.includes(e)) ?? u.find(({ extensions: t }) => t?.includes(`.${e}`));
|
|
2545
2187
|
}
|
|
2546
2188
|
function nt(u, e) {
|
|
2547
2189
|
if (e) {
|
|
2548
|
-
if (String(e).startsWith("file:"))
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
if (typeof e == "string")
|
|
2555
|
-
return u.find(({ isSupported: t }) => t?.({ filepath: e }));
|
|
2190
|
+
if (String(e).startsWith("file:")) try {
|
|
2191
|
+
e = mi(e);
|
|
2192
|
+
} catch {
|
|
2193
|
+
return;
|
|
2194
|
+
}
|
|
2195
|
+
if (typeof e == "string") return u.find(({ isSupported: t }) => t?.({ filepath: e }));
|
|
2556
2196
|
}
|
|
2557
2197
|
}
|
|
2558
2198
|
function xi(u, e) {
|
|
@@ -2567,7 +2207,7 @@ function ge(u) {
|
|
|
2567
2207
|
function me(u) {
|
|
2568
2208
|
return u.position.end.offset;
|
|
2569
2209
|
}
|
|
2570
|
-
var Mt = /* @__PURE__ */ new Set(["liquidNode", "inlineCode", "emphasis", "esComment", "strong", "delete", "wikiLink", "link", "linkReference", "image", "imageReference", "footnote", "footnoteReference", "sentence", "whitespace", "word", "break", "inlineMath"]), Ut = /* @__PURE__ */ new Set([...Mt, "tableCell", "paragraph", "heading"]), re = "non-cjk", xu = "cj-letter", zu = "k-letter", Ee = "cjk-punctuation", yi =
|
|
2210
|
+
var Mt = /* @__PURE__ */ new Set(["liquidNode", "inlineCode", "emphasis", "esComment", "strong", "delete", "wikiLink", "link", "linkReference", "image", "imageReference", "footnote", "footnoteReference", "sentence", "whitespace", "word", "break", "inlineMath"]), Ut = /* @__PURE__ */ new Set([...Mt, "tableCell", "paragraph", "heading"]), re = "non-cjk", xu = "cj-letter", zu = "k-letter", Ee = "cjk-punctuation", yi = new RegExp("\\p{Script_Extensions=Hangul}", "u");
|
|
2571
2211
|
function Vt(u) {
|
|
2572
2212
|
let e = [], t = u.split(/([\t\n ]+)/u);
|
|
2573
2213
|
for (let [r, i] of t.entries()) {
|
|
@@ -2576,25 +2216,23 @@ function Vt(u) {
|
|
|
2576
2216
|
` : " " });
|
|
2577
2217
|
continue;
|
|
2578
2218
|
}
|
|
2579
|
-
if ((r === 0 || r === t.length - 1) && i === "")
|
|
2580
|
-
continue;
|
|
2219
|
+
if ((r === 0 || r === t.length - 1) && i === "") continue;
|
|
2581
2220
|
let o = i.split(new RegExp(`(${ci.source})`, "u"));
|
|
2582
|
-
for (let [a, l] of o.entries())
|
|
2583
|
-
if (
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
continue;
|
|
2595
|
-
}
|
|
2596
|
-
n({ type: "word", value: l, kind: xu, isCJ: !0, hasLeadingPunctuation: !1, hasTrailingPunctuation: !1 });
|
|
2221
|
+
for (let [a, l] of o.entries()) if (!((a === 0 || a === o.length - 1) && l === "")) {
|
|
2222
|
+
if (a % 2 === 0) {
|
|
2223
|
+
l !== "" && n({ type: "word", value: l, kind: re, isCJ: !1, hasLeadingPunctuation: ue.test(l[0]), hasTrailingPunctuation: ue.test(Au(!1, l, -1)) });
|
|
2224
|
+
continue;
|
|
2225
|
+
}
|
|
2226
|
+
if (ue.test(l)) {
|
|
2227
|
+
n({ type: "word", value: l, kind: Ee, isCJ: !0, hasLeadingPunctuation: !0, hasTrailingPunctuation: !0 });
|
|
2228
|
+
continue;
|
|
2229
|
+
}
|
|
2230
|
+
if (yi.test(l)) {
|
|
2231
|
+
n({ type: "word", value: l, kind: zu, isCJ: !1, hasLeadingPunctuation: !1, hasTrailingPunctuation: !1 });
|
|
2232
|
+
continue;
|
|
2597
2233
|
}
|
|
2234
|
+
n({ type: "word", value: l, kind: xu, isCJ: !0, hasLeadingPunctuation: !1, hasTrailingPunctuation: !1 });
|
|
2235
|
+
}
|
|
2598
2236
|
}
|
|
2599
2237
|
return e;
|
|
2600
2238
|
function n(r) {
|
|
@@ -2619,14 +2257,13 @@ function Gt(u, e) {
|
|
|
2619
2257
|
`) ? t.slice(0, -1) : t;
|
|
2620
2258
|
}
|
|
2621
2259
|
function Ju(u, e) {
|
|
2622
|
-
return function t(n, r, i) {
|
|
2260
|
+
return (function t(n, r, i) {
|
|
2623
2261
|
let o = { ...e(n, r, i) };
|
|
2624
2262
|
return o.children && (o.children = o.children.map((a, l) => t(a, l, [o, ...i]))), o;
|
|
2625
|
-
}(u, null, []);
|
|
2263
|
+
})(u, null, []);
|
|
2626
2264
|
}
|
|
2627
2265
|
function it(u) {
|
|
2628
|
-
if (u?.type !== "link" || u.children.length !== 1)
|
|
2629
|
-
return !1;
|
|
2266
|
+
if (u?.type !== "link" || u.children.length !== 1) return !1;
|
|
2630
2267
|
let [e] = u.children;
|
|
2631
2268
|
return ge(u) === ge(e) && me(u) === me(e);
|
|
2632
2269
|
}
|
|
@@ -2634,13 +2271,12 @@ function ki(u, e) {
|
|
|
2634
2271
|
let { node: t } = u;
|
|
2635
2272
|
if (t.type === "code" && t.lang !== null) {
|
|
2636
2273
|
let n = Bi(e, { language: t.lang });
|
|
2637
|
-
if (n)
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
};
|
|
2274
|
+
if (n) return async (r) => {
|
|
2275
|
+
let i = e.__inJsTemplate ? "~" : "`", o = i.repeat(Math.max(3, Pt(t.value, i) + 1)), a = { parser: n };
|
|
2276
|
+
t.lang === "ts" || t.lang === "typescript" ? a.filepath = "dummy.ts" : t.lang === "tsx" && (a.filepath = "dummy.tsx");
|
|
2277
|
+
let l = await r(Gt(t, e.originalText), a);
|
|
2278
|
+
return Ce([o, t.lang, t.meta ? " " + t.meta : "", iu, ju(l), iu, o]);
|
|
2279
|
+
};
|
|
2644
2280
|
}
|
|
2645
2281
|
switch (t.type) {
|
|
2646
2282
|
case "front-matter":
|
|
@@ -2662,8 +2298,7 @@ function te(u) {
|
|
|
2662
2298
|
return Qu = te.prototype = u ?? /* @__PURE__ */ Object.create(null), new te();
|
|
2663
2299
|
}
|
|
2664
2300
|
var Si = 10;
|
|
2665
|
-
for (let u = 0; u <= Si; u++)
|
|
2666
|
-
te();
|
|
2301
|
+
for (let u = 0; u <= Si; u++) te();
|
|
2667
2302
|
function Li(u) {
|
|
2668
2303
|
return te(u);
|
|
2669
2304
|
}
|
|
@@ -2671,8 +2306,7 @@ function Ti(u, e = "type") {
|
|
|
2671
2306
|
Li(u);
|
|
2672
2307
|
function t(n) {
|
|
2673
2308
|
let r = n[e], i = u[r];
|
|
2674
|
-
if (!Array.isArray(i))
|
|
2675
|
-
throw Object.assign(new Error(`Missing visitor keys for '${r}'.`), { node: n });
|
|
2309
|
+
if (!Array.isArray(i)) throw Object.assign(new Error(`Missing visitor keys for '${r}'.`), { node: n });
|
|
2676
2310
|
return i;
|
|
2677
2311
|
}
|
|
2678
2312
|
return t;
|
|
@@ -2699,10 +2333,8 @@ function Mi(u) {
|
|
|
2699
2333
|
}
|
|
2700
2334
|
var Ui = (u) => !(zi(u) || Mi(u)), Vi = /[^\x20-\x7F]/u;
|
|
2701
2335
|
function Gi(u) {
|
|
2702
|
-
if (!u)
|
|
2703
|
-
|
|
2704
|
-
if (!Vi.test(u))
|
|
2705
|
-
return u.length;
|
|
2336
|
+
if (!u) return 0;
|
|
2337
|
+
if (!Vi.test(u)) return u.length;
|
|
2706
2338
|
u = u.replace($i(), " ");
|
|
2707
2339
|
let e = 0;
|
|
2708
2340
|
for (let t of u) {
|
|
@@ -2711,7 +2343,7 @@ function Gi(u) {
|
|
|
2711
2343
|
}
|
|
2712
2344
|
return e;
|
|
2713
2345
|
}
|
|
2714
|
-
var Ve = Gi, fu = Symbol("MODE_BREAK"), Eu = Symbol("MODE_FLAT"), $u = Symbol("cursor"), Te = Symbol("DOC_FILL_PRINTED_LENGTH");
|
|
2346
|
+
var Ve = Gi, fu = /* @__PURE__ */ Symbol("MODE_BREAK"), Eu = /* @__PURE__ */ Symbol("MODE_FLAT"), $u = /* @__PURE__ */ Symbol("cursor"), Te = /* @__PURE__ */ Symbol("DOC_FILL_PRINTED_LENGTH");
|
|
2715
2347
|
function Wt() {
|
|
2716
2348
|
return { value: "", length: 0, queue: [] };
|
|
2717
2349
|
}
|
|
@@ -2723,20 +2355,19 @@ function Hi(u, e, t) {
|
|
|
2723
2355
|
}
|
|
2724
2356
|
function Oe(u, e, t) {
|
|
2725
2357
|
let n = e.type === "dedent" ? u.queue.slice(0, -1) : [...u.queue, e], r = "", i = 0, o = 0, a = 0;
|
|
2726
|
-
for (let p of n)
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
}
|
|
2358
|
+
for (let p of n) switch (p.type) {
|
|
2359
|
+
case "indent":
|
|
2360
|
+
s(), t.useTabs ? l(1) : D(t.tabWidth);
|
|
2361
|
+
break;
|
|
2362
|
+
case "stringAlign":
|
|
2363
|
+
s(), r += p.n, i += p.n.length;
|
|
2364
|
+
break;
|
|
2365
|
+
case "numberAlign":
|
|
2366
|
+
o += 1, a += p.n;
|
|
2367
|
+
break;
|
|
2368
|
+
default:
|
|
2369
|
+
throw new Error(`Unexpected type '${p.type}'`);
|
|
2370
|
+
}
|
|
2740
2371
|
return f(), { ...u, value: r, length: i, queue: n };
|
|
2741
2372
|
function l(p) {
|
|
2742
2373
|
r += " ".repeat(p), i += t.tabWidth * p;
|
|
@@ -2759,36 +2390,30 @@ function Oe(u, e, t) {
|
|
|
2759
2390
|
}
|
|
2760
2391
|
function Re(u) {
|
|
2761
2392
|
let e = 0, t = 0, n = u.length;
|
|
2762
|
-
u:
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
u[n] = r.slice(0, i + 1);
|
|
2775
|
-
break u;
|
|
2776
|
-
}
|
|
2393
|
+
u: for (; n--; ) {
|
|
2394
|
+
let r = u[n];
|
|
2395
|
+
if (r === $u) {
|
|
2396
|
+
t++;
|
|
2397
|
+
continue;
|
|
2398
|
+
}
|
|
2399
|
+
for (let i = r.length - 1; i >= 0; i--) {
|
|
2400
|
+
let o = r[i];
|
|
2401
|
+
if (o === " " || o === " ") e++;
|
|
2402
|
+
else {
|
|
2403
|
+
u[n] = r.slice(0, i + 1);
|
|
2404
|
+
break u;
|
|
2777
2405
|
}
|
|
2778
2406
|
}
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
u.push($u);
|
|
2407
|
+
}
|
|
2408
|
+
if (e > 0 || t > 0) for (u.length = n + 1; t-- > 0; ) u.push($u);
|
|
2782
2409
|
return e;
|
|
2783
2410
|
}
|
|
2784
2411
|
function pe(u, e, t, n, r, i) {
|
|
2785
|
-
if (t === Number.POSITIVE_INFINITY)
|
|
2786
|
-
return !0;
|
|
2412
|
+
if (t === Number.POSITIVE_INFINITY) return !0;
|
|
2787
2413
|
let o = e.length, a = [u], l = [];
|
|
2788
2414
|
for (; t >= 0; ) {
|
|
2789
2415
|
if (a.length === 0) {
|
|
2790
|
-
if (o === 0)
|
|
2791
|
-
return !0;
|
|
2416
|
+
if (o === 0) return !0;
|
|
2792
2417
|
a.push(e[--o]);
|
|
2793
2418
|
continue;
|
|
2794
2419
|
}
|
|
@@ -2800,8 +2425,7 @@ function pe(u, e, t, n, r, i) {
|
|
|
2800
2425
|
case Su:
|
|
2801
2426
|
case Pu: {
|
|
2802
2427
|
let f = c === Su ? s : s.parts, h = s[Te] ?? 0;
|
|
2803
|
-
for (let p = f.length - 1; p >= h; p--)
|
|
2804
|
-
a.push({ mode: D, doc: f[p] });
|
|
2428
|
+
for (let p = f.length - 1; p >= h; p--) a.push({ mode: D, doc: f[p] });
|
|
2805
2429
|
break;
|
|
2806
2430
|
}
|
|
2807
2431
|
case Wu:
|
|
@@ -2814,8 +2438,7 @@ function pe(u, e, t, n, r, i) {
|
|
|
2814
2438
|
t += Re(l);
|
|
2815
2439
|
break;
|
|
2816
2440
|
case Lu: {
|
|
2817
|
-
if (i && s.break)
|
|
2818
|
-
return !1;
|
|
2441
|
+
if (i && s.break) return !1;
|
|
2819
2442
|
let f = s.break ? fu : D, h = s.expandedStates && f === fu ? Au(!1, s.expandedStates, -1) : s.contents;
|
|
2820
2443
|
a.push({ mode: f, doc: h });
|
|
2821
2444
|
break;
|
|
@@ -2826,16 +2449,14 @@ function pe(u, e, t, n, r, i) {
|
|
|
2826
2449
|
break;
|
|
2827
2450
|
}
|
|
2828
2451
|
case bu:
|
|
2829
|
-
if (D === fu || s.hard)
|
|
2830
|
-
return !0;
|
|
2452
|
+
if (D === fu || s.hard) return !0;
|
|
2831
2453
|
s.soft || (l.push(" "), t--);
|
|
2832
2454
|
break;
|
|
2833
2455
|
case oe:
|
|
2834
2456
|
n = !0;
|
|
2835
2457
|
break;
|
|
2836
2458
|
case le:
|
|
2837
|
-
if (n)
|
|
2838
|
-
return !1;
|
|
2459
|
+
if (n) return !1;
|
|
2839
2460
|
break;
|
|
2840
2461
|
}
|
|
2841
2462
|
}
|
|
@@ -2854,12 +2475,10 @@ function _i(u, e) {
|
|
|
2854
2475
|
break;
|
|
2855
2476
|
}
|
|
2856
2477
|
case Su:
|
|
2857
|
-
for (let E = p.length - 1; E >= 0; E--)
|
|
2858
|
-
o.push({ ind: f, mode: h, doc: p[E] });
|
|
2478
|
+
for (let E = p.length - 1; E >= 0; E--) o.push({ ind: f, mode: h, doc: p[E] });
|
|
2859
2479
|
break;
|
|
2860
2480
|
case Be:
|
|
2861
|
-
if (s >= 2)
|
|
2862
|
-
throw new Error("There are too many 'cursor' in doc.");
|
|
2481
|
+
if (s >= 2) throw new Error("There are too many 'cursor' in doc.");
|
|
2863
2482
|
a.push($u), s++;
|
|
2864
2483
|
break;
|
|
2865
2484
|
case Wu:
|
|
@@ -2881,27 +2500,23 @@ function _i(u, e) {
|
|
|
2881
2500
|
case fu: {
|
|
2882
2501
|
l = !1;
|
|
2883
2502
|
let E = { ind: f, mode: Eu, doc: p.contents }, A = n - i, v = D.length > 0;
|
|
2884
|
-
if (!p.break && pe(E, o, A, v, t))
|
|
2885
|
-
o.push(E);
|
|
2503
|
+
if (!p.break && pe(E, o, A, v, t)) o.push(E);
|
|
2886
2504
|
else if (p.expandedStates) {
|
|
2887
2505
|
let F = Au(!1, p.expandedStates, -1);
|
|
2888
2506
|
if (p.break) {
|
|
2889
2507
|
o.push({ ind: f, mode: fu, doc: F });
|
|
2890
2508
|
break;
|
|
2891
|
-
} else
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
}
|
|
2903
|
-
} else
|
|
2904
|
-
o.push({ ind: f, mode: fu, doc: p.contents });
|
|
2509
|
+
} else for (let B = 1; B < p.expandedStates.length + 1; B++) if (B >= p.expandedStates.length) {
|
|
2510
|
+
o.push({ ind: f, mode: fu, doc: F });
|
|
2511
|
+
break;
|
|
2512
|
+
} else {
|
|
2513
|
+
let m = p.expandedStates[B], d = { ind: f, mode: Eu, doc: m };
|
|
2514
|
+
if (pe(d, o, A, v, t)) {
|
|
2515
|
+
o.push(d);
|
|
2516
|
+
break;
|
|
2517
|
+
}
|
|
2518
|
+
}
|
|
2519
|
+
} else o.push({ ind: f, mode: fu, doc: p.contents });
|
|
2905
2520
|
break;
|
|
2906
2521
|
}
|
|
2907
2522
|
}
|
|
@@ -2909,8 +2524,7 @@ function _i(u, e) {
|
|
|
2909
2524
|
break;
|
|
2910
2525
|
case Pu: {
|
|
2911
2526
|
let E = n - i, A = p[Te] ?? 0, { parts: v } = p, F = v.length - A;
|
|
2912
|
-
if (F === 0)
|
|
2913
|
-
break;
|
|
2527
|
+
if (F === 0) break;
|
|
2914
2528
|
let B = v[A + 0], m = v[A + 1], d = { ind: f, mode: Eu, doc: B }, C = { ind: f, mode: fu, doc: B }, g = pe(d, [], E, D.length > 0, t, !0);
|
|
2915
2529
|
if (F === 1) {
|
|
2916
2530
|
g ? o.push(d) : o.push(C);
|
|
@@ -2947,8 +2561,7 @@ function _i(u, e) {
|
|
|
2947
2561
|
case bu:
|
|
2948
2562
|
switch (h) {
|
|
2949
2563
|
case Eu:
|
|
2950
|
-
if (p.hard)
|
|
2951
|
-
l = !0;
|
|
2564
|
+
if (p.hard) l = !0;
|
|
2952
2565
|
else {
|
|
2953
2566
|
p.soft || (a.push(" "), i += 1);
|
|
2954
2567
|
break;
|
|
@@ -2975,8 +2588,7 @@ function _i(u, e) {
|
|
|
2975
2588
|
let c = a.indexOf($u);
|
|
2976
2589
|
if (c !== -1) {
|
|
2977
2590
|
let f = a.indexOf($u, c + 1);
|
|
2978
|
-
if (f === -1)
|
|
2979
|
-
return { formatted: a.filter((A) => A !== $u).join("") };
|
|
2591
|
+
if (f === -1) return { formatted: a.filter((A) => A !== $u).join("") };
|
|
2980
2592
|
let h = a.slice(0, c).join(""), p = a.slice(c + 1, f).join(""), E = a.slice(f + 1).join("");
|
|
2981
2593
|
return { formatted: h + p + E, cursorNodeStart: h.length, cursorNodeText: p };
|
|
2982
2594
|
}
|
|
@@ -2987,8 +2599,7 @@ function Ji(u, e, t) {
|
|
|
2987
2599
|
let f = _i(t(), e).formatted, h = Ve(f);
|
|
2988
2600
|
return r[c] = Math.max(r[c] ?? 3, h), { text: f, width: h };
|
|
2989
2601
|
}, "children"), "children"), o = l(!1);
|
|
2990
|
-
if (e.proseWrap !== "never")
|
|
2991
|
-
return [Ae, o];
|
|
2602
|
+
if (e.proseWrap !== "never") return [Ae, o];
|
|
2992
2603
|
let a = l(!0);
|
|
2993
2604
|
return [Ae, he(Gn(a, o))];
|
|
2994
2605
|
function l(c) {
|
|
@@ -3002,8 +2613,7 @@ function Ji(u, e, t) {
|
|
|
3002
2613
|
}
|
|
3003
2614
|
function s(c, f) {
|
|
3004
2615
|
return c.map(({ text: h, width: p }, E) => {
|
|
3005
|
-
if (f)
|
|
3006
|
-
return h;
|
|
2616
|
+
if (f) return h;
|
|
3007
2617
|
let A = r[E] - p, v = n.align[E], F = 0;
|
|
3008
2618
|
v === "right" ? F = A : v === "center" && (F = Math.floor(A / 2));
|
|
3009
2619
|
let B = A - F;
|
|
@@ -3017,7 +2627,7 @@ function Yi(u, e, t) {
|
|
|
3017
2627
|
}
|
|
3018
2628
|
function Ki(u) {
|
|
3019
2629
|
let e = [""];
|
|
3020
|
-
return function t(n) {
|
|
2630
|
+
return (function t(n) {
|
|
3021
2631
|
for (let r of n) {
|
|
3022
2632
|
let i = Tu(r);
|
|
3023
2633
|
if (i === Su) {
|
|
@@ -3027,7 +2637,7 @@ function Ki(u) {
|
|
|
3027
2637
|
let o = r, a = [];
|
|
3028
2638
|
i === Pu && ([o, ...a] = r.parts), e.push([e.pop(), o], ...a);
|
|
3029
2639
|
}
|
|
3030
|
-
}(u), ze(e);
|
|
2640
|
+
})(u), ze(e);
|
|
3031
2641
|
}
|
|
3032
2642
|
var Cu, Xi = class {
|
|
3033
2643
|
constructor(u) {
|
|
@@ -3035,14 +2645,12 @@ var Cu, Xi = class {
|
|
|
3035
2645
|
}
|
|
3036
2646
|
getLeadingWhitespaceCount(u) {
|
|
3037
2647
|
let e = ku(this, Cu), t = 0;
|
|
3038
|
-
for (let n = 0; n < u.length && e.has(u.charAt(n)); n++)
|
|
3039
|
-
t++;
|
|
2648
|
+
for (let n = 0; n < u.length && e.has(u.charAt(n)); n++) t++;
|
|
3040
2649
|
return t;
|
|
3041
2650
|
}
|
|
3042
2651
|
getTrailingWhitespaceCount(u) {
|
|
3043
2652
|
let e = ku(this, Cu), t = 0;
|
|
3044
|
-
for (let n = u.length - 1; n >= 0 && e.has(u.charAt(n)); n--)
|
|
3045
|
-
t++;
|
|
2653
|
+
for (let n = u.length - 1; n >= 0 && e.has(u.charAt(n)); n--) t++;
|
|
3046
2654
|
return t;
|
|
3047
2655
|
}
|
|
3048
2656
|
getLeadingWhitespace(u) {
|
|
@@ -3095,19 +2703,16 @@ function ra(u, e) {
|
|
|
3095
2703
|
}
|
|
3096
2704
|
function na(u, e) {
|
|
3097
2705
|
return Ju(u, (t) => {
|
|
3098
|
-
if (t.type !== "text")
|
|
3099
|
-
return t;
|
|
2706
|
+
if (t.type !== "text") return t;
|
|
3100
2707
|
let { value: n } = t;
|
|
3101
|
-
if (n === "*" || n === "_" || !ea.test(n) || t.position.end.offset - t.position.start.offset === n.length)
|
|
3102
|
-
return t;
|
|
2708
|
+
if (n === "*" || n === "_" || !ea.test(n) || t.position.end.offset - t.position.start.offset === n.length) return t;
|
|
3103
2709
|
let r = e.originalText.slice(t.position.start.offset, t.position.end.offset);
|
|
3104
2710
|
return ta.test(r) ? t : { ...t, value: r };
|
|
3105
2711
|
});
|
|
3106
2712
|
}
|
|
3107
2713
|
function ia(u, e, t) {
|
|
3108
2714
|
return Ju(u, (n) => {
|
|
3109
|
-
if (!n.children)
|
|
3110
|
-
return n;
|
|
2715
|
+
if (!n.children) return n;
|
|
3111
2716
|
let r = n.children.reduce((i, o) => {
|
|
3112
2717
|
let a = Au(!1, i, -1);
|
|
3113
2718
|
return a && e(a, o) ? i.splice(-1, 1, t(a, o)) : i.push(o), i;
|
|
@@ -3120,8 +2725,7 @@ function aa(u) {
|
|
|
3120
2725
|
}
|
|
3121
2726
|
function oa(u) {
|
|
3122
2727
|
return Ju(u, (e, t, [n]) => {
|
|
3123
|
-
if (e.type !== "text")
|
|
3124
|
-
return e;
|
|
2728
|
+
if (e.type !== "text") return e;
|
|
3125
2729
|
let { value: r } = e;
|
|
3126
2730
|
return n.type === "paragraph" && (t === 0 && (r = at.trimStart(r)), t === n.children.length - 1 && (r = at.trimEnd(r))), { type: "sentence", position: e.position, children: Vt(r) };
|
|
3127
2731
|
});
|
|
@@ -3130,13 +2734,11 @@ function la(u, e) {
|
|
|
3130
2734
|
return Ju(u, (t, n, r) => {
|
|
3131
2735
|
if (t.type === "code") {
|
|
3132
2736
|
let i = /^\n?(?: {4,}|\t)/u.test(e.originalText.slice(t.position.start.offset, t.position.end.offset));
|
|
3133
|
-
if (t.isIndented = i, i)
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
a.type === "list" && (a.hasIndentedCodeblock = !0);
|
|
3139
|
-
}
|
|
2737
|
+
if (t.isIndented = i, i) for (let o = 0; o < r.length; o++) {
|
|
2738
|
+
let a = r[o];
|
|
2739
|
+
if (a.hasIndentedCodeblock) break;
|
|
2740
|
+
a.type === "list" && (a.hasIndentedCodeblock = !0);
|
|
2741
|
+
}
|
|
3140
2742
|
}
|
|
3141
2743
|
return t;
|
|
3142
2744
|
});
|
|
@@ -3146,8 +2748,7 @@ function sa(u, e) {
|
|
|
3146
2748
|
if (r.type === "list" && r.children.length > 0) {
|
|
3147
2749
|
for (let a = 0; a < o.length; a++) {
|
|
3148
2750
|
let l = o[a];
|
|
3149
|
-
if (l.type === "list" && !l.isAligned)
|
|
3150
|
-
return r.isAligned = !1, r;
|
|
2751
|
+
if (l.type === "list" && !l.isAligned) return r.isAligned = !1, r;
|
|
3151
2752
|
}
|
|
3152
2753
|
r.isAligned = n(r);
|
|
3153
2754
|
}
|
|
@@ -3157,16 +2758,12 @@ function sa(u, e) {
|
|
|
3157
2758
|
return r.children.length === 0 ? -1 : r.children[0].position.start.column - 1;
|
|
3158
2759
|
}
|
|
3159
2760
|
function n(r) {
|
|
3160
|
-
if (!r.ordered)
|
|
3161
|
-
return !0;
|
|
2761
|
+
if (!r.ordered) return !0;
|
|
3162
2762
|
let [i, o] = r.children;
|
|
3163
|
-
if (ee(i, e).leadingSpaces.length > 1)
|
|
3164
|
-
return !0;
|
|
2763
|
+
if (ee(i, e).leadingSpaces.length > 1) return !0;
|
|
3165
2764
|
let a = t(i);
|
|
3166
|
-
if (a === -1)
|
|
3167
|
-
|
|
3168
|
-
if (r.children.length === 1)
|
|
3169
|
-
return a % e.tabWidth === 0;
|
|
2765
|
+
if (a === -1) return !1;
|
|
2766
|
+
if (r.children.length === 1) return a % e.tabWidth === 0;
|
|
3170
2767
|
let l = t(o);
|
|
3171
2768
|
return a !== l ? !1 : a % e.tabWidth === 0 ? !0 : ee(o, e).leadingSpaces.length > 1;
|
|
3172
2769
|
}
|
|
@@ -3203,11 +2800,9 @@ function pa({ parent: u }) {
|
|
|
3203
2800
|
return u.usesCJSpaces;
|
|
3204
2801
|
}
|
|
3205
2802
|
function ha(u, e) {
|
|
3206
|
-
if (e)
|
|
3207
|
-
return !0;
|
|
2803
|
+
if (e) return !0;
|
|
3208
2804
|
let { previous: t, next: n } = u;
|
|
3209
|
-
if (!t || !n)
|
|
3210
|
-
return !0;
|
|
2805
|
+
if (!t || !n) return !0;
|
|
3211
2806
|
let r = t.kind, i = n.kind;
|
|
3212
2807
|
return lt(r) && lt(i) || r === zu && i === xu || i === zu && r === xu ? !0 : r === Ee || i === Ee || r === xu && i === xu ? !1 : ot.has(n.value[0]) || ot.has(Au(!1, t.value, -1)) ? !0 : t.hasTrailingPunctuation || n.hasLeadingPunctuation ? !1 : pa(u);
|
|
3213
2808
|
}
|
|
@@ -3215,17 +2810,14 @@ function lt(u) {
|
|
|
3215
2810
|
return u === re || u === zu;
|
|
3216
2811
|
}
|
|
3217
2812
|
function da(u, e, t, n) {
|
|
3218
|
-
if (t !== "always" || u.hasAncestor((o) => fa.has(o.type)))
|
|
3219
|
-
|
|
3220
|
-
if (n)
|
|
3221
|
-
return e !== "";
|
|
2813
|
+
if (t !== "always" || u.hasAncestor((o) => fa.has(o.type))) return !1;
|
|
2814
|
+
if (n) return e !== "";
|
|
3222
2815
|
let { previous: r, next: i } = u;
|
|
3223
2816
|
return !r || !i ? !0 : e === "" ? !1 : r.kind === zu && i.kind === xu || i.kind === zu && r.kind === xu ? !0 : !(r.isCJ || i.isCJ);
|
|
3224
2817
|
}
|
|
3225
2818
|
function st(u, e, t, n) {
|
|
3226
2819
|
if (t === "preserve" && e === `
|
|
3227
|
-
`)
|
|
3228
|
-
return iu;
|
|
2820
|
+
`) return iu;
|
|
3229
2821
|
let r = e === " " || e === `
|
|
3230
2822
|
` && ha(u, n);
|
|
3231
2823
|
return da(u, e, t, n) ? r ? Rt : Nt : r ? " " : "";
|
|
@@ -3274,8 +2866,7 @@ function Ca(u, e, t) {
|
|
|
3274
2866
|
}
|
|
3275
2867
|
case "emphasis": {
|
|
3276
2868
|
let i;
|
|
3277
|
-
if (it(r.children[0]))
|
|
3278
|
-
i = e.originalText[r.position.start.offset];
|
|
2869
|
+
if (it(r.children[0])) i = e.originalText[r.position.start.offset];
|
|
3279
2870
|
else {
|
|
3280
2871
|
let o = Dt(u), a = ((n = u.parent) == null ? void 0 : n.type) === "strong" && Dt(u.ancestors);
|
|
3281
2872
|
i = o || a || u.hasAncestor((l) => l.type === "emphasis") ? "*" : "_";
|
|
@@ -3328,8 +2919,7 @@ function Ca(u, e, t) {
|
|
|
3328
2919
|
let i = ft(r, u.parent), o = wi(r, e);
|
|
3329
2920
|
return cu(u, e, t, { processor(a) {
|
|
3330
2921
|
let l = s(), D = a.node;
|
|
3331
|
-
if (D.children.length === 2 && D.children[1].type === "html" && D.children[0].position.start.column !== D.children[1].position.start.column)
|
|
3332
|
-
return [l, ct(a, e, t, l)];
|
|
2922
|
+
if (D.children.length === 2 && D.children[1].type === "html" && D.children[0].position.start.column !== D.children[1].position.start.column) return [l, ct(a, e, t, l)];
|
|
3333
2923
|
return [l, Nu(" ".repeat(l.length), ct(a, e, t, l))];
|
|
3334
2924
|
function s() {
|
|
3335
2925
|
let c = r.ordered ? (a.isFirst ? r.start : o ? 1 : r.start + a.index) + (i % 2 === 0 ? ". " : ") ") : i % 2 === 0 ? "- " : "* ";
|
|
@@ -3344,12 +2934,7 @@ function Ca(u, e, t) {
|
|
|
3344
2934
|
case "linkReference":
|
|
3345
2935
|
return ["[", cu(u, e, t), "]", r.referenceType === "full" ? qe(r) : r.referenceType === "collapsed" ? "[]" : ""];
|
|
3346
2936
|
case "imageReference":
|
|
3347
|
-
|
|
3348
|
-
case "full":
|
|
3349
|
-
return ["![", r.alt || "", "]", qe(r)];
|
|
3350
|
-
default:
|
|
3351
|
-
return ["![", r.alt, "]", r.referenceType === "collapsed" ? "[]" : ""];
|
|
3352
|
-
}
|
|
2937
|
+
return r.referenceType === "full" ? ["![", r.alt || "", "]", qe(r)] : ["![", r.alt, "]", r.referenceType === "collapsed" ? "[]" : ""];
|
|
3353
2938
|
case "definition": {
|
|
3354
2939
|
let i = e.proseWrap === "always" ? Rt : " ";
|
|
3355
2940
|
return he([qe(r), ":", Se([i, ke(r.url), r.title === null ? "" : [i, de(r.title, e, !1)]])]);
|
|
@@ -3380,9 +2965,6 @@ function Ca(u, e, t) {
|
|
|
3380
2965
|
return ["$$", iu, r.value ? [ju(r.value, iu), iu] : "", "$$"];
|
|
3381
2966
|
case "inlineMath":
|
|
3382
2967
|
return e.originalText.slice(ge(r), me(r));
|
|
3383
|
-
case "tableRow":
|
|
3384
|
-
case "listItem":
|
|
3385
|
-
case "text":
|
|
3386
2968
|
default:
|
|
3387
2969
|
throw new Zn(r, "Markdown");
|
|
3388
2970
|
}
|
|
@@ -3390,8 +2972,7 @@ function Ca(u, e, t) {
|
|
|
3390
2972
|
function ct(u, e, t, n) {
|
|
3391
2973
|
let { node: r } = u, i = r.checked === null ? "" : r.checked ? "[x] " : "[ ] ";
|
|
3392
2974
|
return [i, cu(u, e, t, { processor({ node: o, isFirst: a }) {
|
|
3393
|
-
if (a && o.type !== "list")
|
|
3394
|
-
return Nu(" ".repeat(i.length), t());
|
|
2975
|
+
if (a && o.type !== "list") return Nu(" ".repeat(i.length), t());
|
|
3395
2976
|
let l = " ".repeat(ba(e.tabWidth - n.length, 0, 3));
|
|
3396
2977
|
return [l, Nu(l, t())];
|
|
3397
2978
|
} })];
|
|
@@ -3409,30 +2990,24 @@ function ft(u, e) {
|
|
|
3409
2990
|
}
|
|
3410
2991
|
function ga(u, e, t) {
|
|
3411
2992
|
let n = -1;
|
|
3412
|
-
for (let r of e.children)
|
|
3413
|
-
if (r.type === u.type && t(r) ? n++ : n = -1, r === u)
|
|
3414
|
-
return n;
|
|
2993
|
+
for (let r of e.children) if (r.type === u.type && t(r) ? n++ : n = -1, r === u) return n;
|
|
3415
2994
|
}
|
|
3416
2995
|
function ma(u, e, t) {
|
|
3417
2996
|
let n = [], r = null, { children: i } = u.node;
|
|
3418
|
-
for (let [o, a] of i.entries())
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
}
|
|
2997
|
+
for (let [o, a] of i.entries()) switch (Ge(a)) {
|
|
2998
|
+
case "start":
|
|
2999
|
+
r === null && (r = { index: o, offset: a.position.end.offset });
|
|
3000
|
+
break;
|
|
3001
|
+
case "end":
|
|
3002
|
+
r !== null && (n.push({ start: r, end: { index: o, offset: a.position.start.offset } }), r = null);
|
|
3003
|
+
break;
|
|
3004
|
+
}
|
|
3427
3005
|
return cu(u, e, t, { processor({ index: o }) {
|
|
3428
3006
|
if (n.length > 0) {
|
|
3429
3007
|
let a = n[0];
|
|
3430
|
-
if (o === a.start.index)
|
|
3431
|
-
|
|
3432
|
-
if (
|
|
3433
|
-
return !1;
|
|
3434
|
-
if (o === a.end.index)
|
|
3435
|
-
return n.shift(), !1;
|
|
3008
|
+
if (o === a.start.index) return [pt(i[a.start.index]), e.originalText.slice(a.start.offset, a.end.offset), pt(i[a.end.index])];
|
|
3009
|
+
if (a.start.index < o && o < a.end.index) return !1;
|
|
3010
|
+
if (o === a.end.index) return n.shift(), !1;
|
|
3436
3011
|
}
|
|
3437
3012
|
return t();
|
|
3438
3013
|
} });
|
|
@@ -3445,15 +3020,12 @@ function cu(u, e, t, n = {}) {
|
|
|
3445
3020
|
}, "children"), i;
|
|
3446
3021
|
}
|
|
3447
3022
|
function pt(u) {
|
|
3448
|
-
if (u.type === "html")
|
|
3449
|
-
|
|
3450
|
-
if (u.type === "paragraph" && Array.isArray(u.children) && u.children.length === 1 && u.children[0].type === "esComment")
|
|
3451
|
-
return ["{/* ", u.children[0].value, " */}"];
|
|
3023
|
+
if (u.type === "html") return u.value;
|
|
3024
|
+
if (u.type === "paragraph" && Array.isArray(u.children) && u.children.length === 1 && u.children[0].type === "esComment") return ["{/* ", u.children[0].value, " */}"];
|
|
3452
3025
|
}
|
|
3453
3026
|
function Ge(u) {
|
|
3454
3027
|
let e;
|
|
3455
|
-
if (u.type === "html")
|
|
3456
|
-
e = u.value.match(/^<!--\s*prettier-ignore(?:-(start|end))?\s*-->$/u);
|
|
3028
|
+
if (u.type === "html") e = u.value.match(/^<!--\s*prettier-ignore(?:-(start|end))?\s*-->$/u);
|
|
3457
3029
|
else {
|
|
3458
3030
|
let t;
|
|
3459
3031
|
u.type === "esComment" ? t = u : u.type === "paragraph" && u.children.length === 1 && u.children[0].type === "esComment" && (t = u.children[0]), t && (e = t.value.match(/^prettier-ignore(?:-(start|end))?$/u));
|
|
@@ -3469,8 +3041,7 @@ function ht(u, e) {
|
|
|
3469
3041
|
`);
|
|
3470
3042
|
}
|
|
3471
3043
|
function va({ node: u, previous: e, parent: t }, n) {
|
|
3472
|
-
if (ht(e, n) || u.type === "list" && t.type === "listItem" && e.type === "code")
|
|
3473
|
-
return !0;
|
|
3044
|
+
if (ht(e, n) || u.type === "list" && t.type === "listItem" && e.type === "code") return !0;
|
|
3474
3045
|
let r = e.type === u.type && Fa.has(u.type), i = t.type === "listItem" && (u.type === "list" || !ht(t, n)), o = Ge(e) === "next", a = u.type === "html" && e.type === "html" && e.position.end.line + 1 === u.position.start.line, l = u.type === "html" && t.type === "listItem" && e.type === "paragraph" && e.position.end.line + 1 === u.position.start.line;
|
|
3475
3046
|
return !(r || i || o || a || l);
|
|
3476
3047
|
}
|
|
@@ -3483,8 +3054,7 @@ function xa(u) {
|
|
|
3483
3054
|
return e && (e.type !== "linkReference" || e.referenceType !== "full");
|
|
3484
3055
|
}
|
|
3485
3056
|
var Ba = (u, e) => {
|
|
3486
|
-
for (let t of e)
|
|
3487
|
-
u = lu(!1, u, t, encodeURIComponent(t));
|
|
3057
|
+
for (let t of e) u = lu(!1, u, t, encodeURIComponent(t));
|
|
3488
3058
|
return u;
|
|
3489
3059
|
};
|
|
3490
3060
|
function ke(u, e = []) {
|
|
@@ -3492,12 +3062,9 @@ function ke(u, e = []) {
|
|
|
3492
3062
|
return new RegExp(t.map((n) => xe(n)).join("|"), "u").test(u) ? `<${Ba(u, "<>")}>` : u;
|
|
3493
3063
|
}
|
|
3494
3064
|
function de(u, e, t = !0) {
|
|
3495
|
-
if (!u)
|
|
3496
|
-
|
|
3497
|
-
if (
|
|
3498
|
-
return " " + de(u, e, !1);
|
|
3499
|
-
if (u = lu(!1, u, /\\(?=["')])/gu, ""), u.includes('"') && u.includes("'") && !u.includes(")"))
|
|
3500
|
-
return `(${u})`;
|
|
3065
|
+
if (!u) return "";
|
|
3066
|
+
if (t) return " " + de(u, e, !1);
|
|
3067
|
+
if (u = lu(!1, u, /\\(?=["')])/gu, ""), u.includes('"') && u.includes("'") && !u.includes(")")) return `(${u})`;
|
|
3501
3068
|
let n = Kn(u, e.singleQuote);
|
|
3502
3069
|
return u = lu(!1, u, "\\", "\\\\"), u = lu(!1, u, n, `\\${n}`), `${n}${u}${n}`;
|
|
3503
3070
|
}
|
|
@@ -3519,12 +3086,10 @@ var Ta = Mu(or()), Oa = Mu(Dr()), Ra = Mu(Cn()), Na = Mu(Sn()), Ia = /^import\s/
|
|
|
3519
3086
|
|
|
3520
3087
|
`, _t = (u) => Ia.test(u), Ne = (u) => Pa.test(u), Jt = (u, e) => {
|
|
3521
3088
|
let t = e.indexOf(Ma), n = e.slice(0, t);
|
|
3522
|
-
if (Ne(n) || _t(n))
|
|
3523
|
-
return u(n)({ type: Ne(n) ? "export" : "import", value: n });
|
|
3089
|
+
if (Ne(n) || _t(n)) return u(n)({ type: Ne(n) ? "export" : "import", value: n });
|
|
3524
3090
|
}, Yt = (u, e) => {
|
|
3525
3091
|
let t = za.exec(e);
|
|
3526
|
-
if (t)
|
|
3527
|
-
return u(t[0])({ type: "esComment", value: t[1].trim() });
|
|
3092
|
+
if (t) return u(t[0])({ type: "esComment", value: t[1].trim() });
|
|
3528
3093
|
};
|
|
3529
3094
|
Jt.locator = (u) => Ne(u) || _t(u) ? -1 : 1;
|
|
3530
3095
|
Yt.locator = (u, e) => u.indexOf("{", e);
|
|
@@ -3536,8 +3101,7 @@ var Ua = function() {
|
|
|
3536
3101
|
u.blockMethods = ["frontMatter", ...u.blockMethods], u.blockTokenizers.frontMatter = e;
|
|
3537
3102
|
function e(t, n) {
|
|
3538
3103
|
let r = be(n);
|
|
3539
|
-
if (r.frontMatter)
|
|
3540
|
-
return t(r.frontMatter.raw)(r.frontMatter);
|
|
3104
|
+
if (r.frontMatter) return t(r.frontMatter.raw)(r.frontMatter);
|
|
3541
3105
|
}
|
|
3542
3106
|
e.onlyAtStart = !0;
|
|
3543
3107
|
}, Ga = Va;
|
|
@@ -3549,8 +3113,7 @@ var Ha = Wa, _a = function() {
|
|
|
3549
3113
|
e.splice(e.indexOf("text"), 0, "liquid"), u.inlineTokenizers.liquid = t;
|
|
3550
3114
|
function t(n, r) {
|
|
3551
3115
|
let i = r.match(/^(\{%.*?%\}|\{\{.*?\}\})/su);
|
|
3552
|
-
if (i)
|
|
3553
|
-
return n(i[0])({ type: "liquidNode", value: i[0] });
|
|
3116
|
+
if (i) return n(i[0])({ type: "liquidNode", value: i[0] });
|
|
3554
3117
|
}
|
|
3555
3118
|
t.locator = function(n, r) {
|
|
3556
3119
|
return n.indexOf("{", r);
|