drizzle-cube 0.4.34 → 0.4.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/adapters/express/index.cjs +1 -1
- package/dist/adapters/express/index.d.ts +7 -1
- package/dist/adapters/express/index.js +5 -4
- package/dist/adapters/fastify/index.cjs +1 -1
- package/dist/adapters/fastify/index.d.ts +7 -1
- package/dist/adapters/fastify/index.js +5 -4
- package/dist/adapters/{handler-ClgB__a-.cjs → handler-DzUX7CBs.cjs} +1 -1
- package/dist/adapters/{handler-rPpxuopb.js → handler-J55KQKe5.js} +1 -1
- package/dist/adapters/hono/index.cjs +1 -1
- package/dist/adapters/hono/index.d.ts +7 -1
- package/dist/adapters/hono/index.js +5 -4
- package/dist/adapters/{mcp-transport-DPpei63d.cjs → mcp-transport-CjA5_6G_.cjs} +2 -2
- package/dist/adapters/{mcp-transport-DWSNkwUY.js → mcp-transport-x_A7Q5OL.js} +35 -20
- package/dist/adapters/nextjs/index.cjs +1 -1
- package/dist/adapters/nextjs/index.d.ts +7 -1
- package/dist/adapters/nextjs/index.js +9 -8
- package/dist/adapters/{utils-BLFzzCI9.cjs → utils-CDExg9uP.cjs} +1 -1
- package/dist/adapters/{utils-B7VkyzMv.js → utils-DkKcpkx5.js} +1 -5
- package/dist/adapters/utils.cjs +1 -1
- package/dist/adapters/utils.js +1 -1
- package/dist/client/charts.js +3 -3
- package/dist/client/chunks/{DashboardEditModal-DenRJiYr.js → DashboardEditModal-kWEk4KJC.js} +8 -8
- package/dist/client/chunks/{DashboardEditModal-DenRJiYr.js.map → DashboardEditModal-kWEk4KJC.js.map} +1 -1
- package/dist/client/chunks/{FieldSearchModal-BQS1v1up.js → FieldSearchModal-rB26lhBD.js} +3 -3
- package/dist/client/chunks/{FieldSearchModal-BQS1v1up.js.map → FieldSearchModal-rB26lhBD.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-DG38V1gO.js → analysis-builder-CdDPUAEU.js} +8 -8
- package/dist/client/chunks/{analysis-builder-DG38V1gO.js.map → analysis-builder-CdDPUAEU.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-shared-DaFu78dk.js → analysis-builder-shared-3V70XUNW.js} +15 -19
- package/dist/client/chunks/{analysis-builder-shared-DaFu78dk.js.map → analysis-builder-shared-3V70XUNW.js.map} +1 -1
- package/dist/client/chunks/{chart-data-table-B2m_6EZe.js → chart-data-table-BlkFWPhF.js} +602 -581
- package/dist/client/chunks/chart-data-table-BlkFWPhF.js.map +1 -0
- package/dist/client/chunks/{chart-kpi-delta-S6qDEoJO.js → chart-kpi-delta-CUIjCDS3.js} +2 -2
- package/dist/client/chunks/{chart-kpi-delta-S6qDEoJO.js.map → chart-kpi-delta-CUIjCDS3.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-number-CEUBsVW2.js → chart-kpi-number-CxlpSKYh.js} +3 -3
- package/dist/client/chunks/{chart-kpi-number-CEUBsVW2.js.map → chart-kpi-number-CxlpSKYh.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-text-DgRig_jQ.js → chart-kpi-text-C16fwohp.js} +2 -2
- package/dist/client/chunks/{chart-kpi-text-DgRig_jQ.js.map → chart-kpi-text-C16fwohp.js.map} +1 -1
- package/dist/client/chunks/{chart-markdown-DXxc43w1.js → chart-markdown-B2X4IwLO.js} +1132 -1119
- package/dist/client/chunks/chart-markdown-B2X4IwLO.js.map +1 -0
- package/dist/client/chunks/{charts-loader-BI07yxaQ.js → charts-loader-BFhQWB_d.js} +6 -6
- package/dist/client/chunks/{charts-loader-BI07yxaQ.js.map → charts-loader-BFhQWB_d.js.map} +1 -1
- package/dist/client/chunks/{core-D1TOj17W.js → core-DJrniqct.js} +2 -6
- package/dist/client/chunks/{core-D1TOj17W.js.map → core-DJrniqct.js.map} +1 -1
- package/dist/client/chunks/{schema-visualization-DPL5_Tkh.js → schema-visualization-qmLI8MGQ.js} +13 -14
- package/dist/client/chunks/{schema-visualization-DPL5_Tkh.js.map → schema-visualization-qmLI8MGQ.js.map} +1 -1
- package/dist/client/chunks/{syntaxHighlighting-87bOwTxj.js → syntaxHighlighting-BLl0ch4A.js} +2 -2
- package/dist/client/chunks/{syntaxHighlighting-87bOwTxj.js.map → syntaxHighlighting-BLl0ch4A.js.map} +1 -1
- package/dist/client/chunks/{useDebounce-DkuM7nQk.js → useDebounce-xfPFr2fi.js} +2 -2
- package/dist/client/chunks/{useDebounce-DkuM7nQk.js.map → useDebounce-xfPFr2fi.js.map} +1 -1
- package/dist/client/chunks/{useExplainAI-RflLTDVL.js → useExplainAI-6COjssus.js} +4 -4
- package/dist/client/chunks/{useExplainAI-RflLTDVL.js.map → useExplainAI-6COjssus.js.map} +1 -1
- package/dist/client/chunks/{utils--32ZtfbZ.js → utils-nCeVL-Hm.js} +2 -2
- package/dist/client/chunks/{utils--32ZtfbZ.js.map → utils-nCeVL-Hm.js.map} +1 -1
- package/dist/client/chunks/{vendor-CZX7UVzM.js → vendor-WzXX36hd.js} +3 -3
- package/dist/client/chunks/{vendor-CZX7UVzM.js.map → vendor-WzXX36hd.js.map} +1 -1
- package/dist/client/components.js +3 -3
- package/dist/client/hooks.js +3 -3
- package/dist/client/icons.js +1 -1
- package/dist/client/index.js +12 -12
- package/dist/client/providers.js +1 -1
- package/dist/client/utils.js +4 -4
- package/dist/client-bundle-stats.html +1 -1
- package/dist/server/index.cjs +2 -2
- package/dist/server/index.d.ts +47 -5
- package/dist/server/index.js +34 -19
- package/package.json +3 -3
- package/dist/client/chunks/chart-data-table-B2m_6EZe.js.map +0 -1
- package/dist/client/chunks/chart-markdown-DXxc43w1.js.map +0 -1
|
@@ -14,7 +14,7 @@ function s(e) {
|
|
|
14
14
|
}
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region node_modules/markdown-to-jsx/dist/index.js
|
|
17
|
-
var c = 32, l = 9, u = 13, d = 10, f = 96, p = 126, m = 91, h = 94, g = 62, _ = 35, v =
|
|
17
|
+
var c = 32, l = 9, u = 13, d = 10, f = 96, p = 126, m = 91, h = 94, g = 62, _ = 35, v = 37, y = 45, b = 61, x = 92, S = 42, C = 95, w = 60, T = 64, E = 93, D = 33, O = 38, k = 58, A = 70, j = 102, M = 104, N = 119, P = 116, F = 112, I = 115, L = 160, R = 12, ee = 44, te = 59, z = 63, ne = 46, re = 47, ie = 39, ae = 34, oe = 43, B = 124, se = 123, ce = 125, le = 40, ue = 41, de = 30, fe = 31, V = 48, H = 57, U = 65, W = 90, pe = 97, me = 122, he = 128, G = 32, K = {
|
|
18
18
|
blockQuote: 0,
|
|
19
19
|
breakLine: 1,
|
|
20
20
|
breakThematic: 2,
|
|
@@ -39,8 +39,8 @@ var c = 32, l = 9, u = 13, d = 10, f = 96, p = 126, m = 91, h = 94, g = 62, _ =
|
|
|
39
39
|
textFormatted: 21,
|
|
40
40
|
unorderedList: 22
|
|
41
41
|
};
|
|
42
|
-
function
|
|
43
|
-
if (!
|
|
42
|
+
function ge(e) {
|
|
43
|
+
if (!Z(e, "---")) return null;
|
|
44
44
|
let t = 3;
|
|
45
45
|
for (; t < e.length && (e[t] === " " || e[t] === " ");) t++;
|
|
46
46
|
if (t < e.length && e[t] === "\r" && t++, t >= e.length || e[t] !== "\n") return null;
|
|
@@ -51,7 +51,7 @@ function ve(e) {
|
|
|
51
51
|
for (; t < e.length && e[t] !== "\n" && e[t] !== "\r";) t++;
|
|
52
52
|
if (t >= e.length) break;
|
|
53
53
|
let i = t;
|
|
54
|
-
if (e[t] === "\r" && t++, t < e.length && e[t] === "\n" && t++,
|
|
54
|
+
if (e[t] === "\r" && t++, t < e.length && e[t] === "\n" && t++, Z(e, "---", r)) return {
|
|
55
55
|
endPos: t,
|
|
56
56
|
hasValidYaml: n
|
|
57
57
|
};
|
|
@@ -60,7 +60,7 @@ function ve(e) {
|
|
|
60
60
|
}
|
|
61
61
|
return null;
|
|
62
62
|
}
|
|
63
|
-
var
|
|
63
|
+
var _e = /&([a-zA-Z0-9]+|#[0-9]{1,7}|#x[0-9a-fA-F]{1,6});/gi, q = {
|
|
64
64
|
class: "className",
|
|
65
65
|
for: "htmlFor",
|
|
66
66
|
allowfullscreen: "allowFullScreen",
|
|
@@ -104,10 +104,10 @@ var K = /&([a-zA-Z0-9]+|#[0-9]{1,7}|#x[0-9a-fA-F]{1,6});/gi, ye = {
|
|
|
104
104
|
usemap: "useMap",
|
|
105
105
|
viewbox: "viewBox"
|
|
106
106
|
};
|
|
107
|
-
function
|
|
107
|
+
function J(e) {
|
|
108
108
|
var t = {};
|
|
109
109
|
for (var n in e) {
|
|
110
|
-
var r =
|
|
110
|
+
var r = q[n.toLowerCase()];
|
|
111
111
|
if (r) t[r] = e[n];
|
|
112
112
|
else {
|
|
113
113
|
var i = n.indexOf(":");
|
|
@@ -116,9 +116,9 @@ function q(e) {
|
|
|
116
116
|
}
|
|
117
117
|
return t;
|
|
118
118
|
}
|
|
119
|
-
var
|
|
120
|
-
function
|
|
121
|
-
return e.indexOf("&") === -1 ? e : e.replace(
|
|
119
|
+
var Y = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s|^<(div|p|h[1-6]|ul|ol|li|blockquote|pre|table|thead|tbody|tr|td|th|dl|dt|dd|hr|address|article|aside|details|dialog|figure|figcaption|footer|form|header|main|menu|nav|section|summary|textarea|fieldset|legend|center|dir|hgroup|marquee|search|output|template)\b)/i;
|
|
120
|
+
function ve(e) {
|
|
121
|
+
return e.indexOf("&") === -1 ? e : e.replace(_e, (e, t) => {
|
|
122
122
|
var n = s(t);
|
|
123
123
|
if (n) return n;
|
|
124
124
|
if (t[0] === "#") {
|
|
@@ -128,20 +128,20 @@ function xe(e) {
|
|
|
128
128
|
return e;
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
-
var
|
|
132
|
-
function
|
|
133
|
-
if (
|
|
131
|
+
var ye = /(javascript|vbscript|data(?!:image)):/i;
|
|
132
|
+
function be(e) {
|
|
133
|
+
if (ye.test(e)) return null;
|
|
134
134
|
if (e.indexOf("%") === -1) return e;
|
|
135
135
|
try {
|
|
136
136
|
let t = decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g, "");
|
|
137
|
-
if (
|
|
137
|
+
if (ye.test(t)) return null;
|
|
138
138
|
} catch {
|
|
139
139
|
return null;
|
|
140
140
|
}
|
|
141
141
|
return e;
|
|
142
142
|
}
|
|
143
|
-
var
|
|
144
|
-
for (
|
|
143
|
+
var xe = {}, Se, X;
|
|
144
|
+
for (Se = [
|
|
145
145
|
192,
|
|
146
146
|
193,
|
|
147
147
|
194,
|
|
@@ -156,8 +156,8 @@ for (Te = [
|
|
|
156
156
|
229,
|
|
157
157
|
230,
|
|
158
158
|
198
|
|
159
|
-
],
|
|
160
|
-
for (
|
|
159
|
+
], X = 0; X < Se.length; X++) xe[Se[X]] = "a";
|
|
160
|
+
for (xe[231] = xe[199] = "c", xe[240] = xe[208] = "d", Se = [
|
|
161
161
|
200,
|
|
162
162
|
201,
|
|
163
163
|
202,
|
|
@@ -166,8 +166,8 @@ for (we[231] = we[199] = "c", we[240] = we[208] = "d", Te = [
|
|
|
166
166
|
232,
|
|
167
167
|
234,
|
|
168
168
|
235
|
|
169
|
-
],
|
|
170
|
-
for (
|
|
169
|
+
], X = 0; X < Se.length; X++) xe[Se[X]] = "e";
|
|
170
|
+
for (Se = [
|
|
171
171
|
207,
|
|
172
172
|
239,
|
|
173
173
|
206,
|
|
@@ -176,8 +176,8 @@ for (Te = [
|
|
|
176
176
|
237,
|
|
177
177
|
204,
|
|
178
178
|
236
|
|
179
|
-
],
|
|
180
|
-
for (
|
|
179
|
+
], X = 0; X < Se.length; X++) xe[Se[X]] = "i";
|
|
180
|
+
for (xe[209] = xe[241] = "n", Se = [
|
|
181
181
|
248,
|
|
182
182
|
216,
|
|
183
183
|
339,
|
|
@@ -190,8 +190,8 @@ for (we[209] = we[241] = "n", Te = [
|
|
|
190
190
|
243,
|
|
191
191
|
210,
|
|
192
192
|
242
|
|
193
|
-
],
|
|
194
|
-
for (
|
|
193
|
+
], X = 0; X < Se.length; X++) xe[Se[X]] = "o";
|
|
194
|
+
for (Se = [
|
|
195
195
|
220,
|
|
196
196
|
252,
|
|
197
197
|
219,
|
|
@@ -200,25 +200,25 @@ for (Te = [
|
|
|
200
200
|
250,
|
|
201
201
|
217,
|
|
202
202
|
249
|
|
203
|
-
],
|
|
204
|
-
|
|
205
|
-
function
|
|
203
|
+
], X = 0; X < Se.length; X++) xe[Se[X]] = "u";
|
|
204
|
+
xe[376] = xe[255] = xe[221] = xe[253] = "y";
|
|
205
|
+
function Ce(e) {
|
|
206
206
|
for (var t = e.toLowerCase(), n = "", r = -1, i = 0; i < t.length; i++) {
|
|
207
207
|
var a = t.charCodeAt(i);
|
|
208
|
-
if (a <
|
|
209
|
-
else if (a === c || a ===
|
|
208
|
+
if (a < he && (Ie[a] & (Oe | ke)) !== 0) r < 0 && (r = i);
|
|
209
|
+
else if (a === c || a === y) r >= 0 && (n += t.slice(r, i), r = -1), n += "-";
|
|
210
210
|
else {
|
|
211
211
|
r >= 0 && (n += t.slice(r, i), r = -1);
|
|
212
|
-
var o =
|
|
212
|
+
var o = xe[a];
|
|
213
213
|
o && (n += o);
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
return r >= 0 && (n += t.slice(r)), n;
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function Z(e, t, n) {
|
|
219
219
|
return e.startsWith(t, n);
|
|
220
220
|
}
|
|
221
|
-
var
|
|
221
|
+
var Q = new Set([
|
|
222
222
|
"area",
|
|
223
223
|
"base",
|
|
224
224
|
"br",
|
|
@@ -245,48 +245,48 @@ var Ee = new Set([
|
|
|
245
245
|
"animate",
|
|
246
246
|
"set"
|
|
247
247
|
]);
|
|
248
|
-
function
|
|
248
|
+
function we(e) {
|
|
249
249
|
let t = e.toLowerCase();
|
|
250
|
-
if (
|
|
250
|
+
if (Q.has(t)) return !0;
|
|
251
251
|
let n = t.indexOf(":");
|
|
252
|
-
return n === -1 ? !1 : (t = t.slice(n + 1),
|
|
253
|
-
}
|
|
254
|
-
var
|
|
255
|
-
|
|
256
|
-
for (e[l] =
|
|
257
|
-
for (t =
|
|
258
|
-
for (t = m; t <= f; t++) e[t] =
|
|
259
|
-
for (t =
|
|
260
|
-
for (t = V; t <= H; t++) e[t] =
|
|
261
|
-
for (t = U; t <= W; t++) e[t] =
|
|
262
|
-
for (t =
|
|
252
|
+
return n === -1 ? !1 : (t = t.slice(n + 1), Q.has(t));
|
|
253
|
+
}
|
|
254
|
+
var Te = 1, Ee = 2, De = 4, Oe = 8, ke = 16, Ae = 32, je = 64, Me = 1, Ne = 2, Pe = 3, Fe = 4, Ie = (function() {
|
|
255
|
+
var e = new Uint8Array(128), t;
|
|
256
|
+
for (e[l] = Te, e[d] = Te | Ee, e[R] = Te, e[u] = Te | Ee, e[c] = Te, t = D; t <= re; t++) e[t] = De;
|
|
257
|
+
for (t = k; t <= T; t++) e[t] = De;
|
|
258
|
+
for (t = m; t <= f; t++) e[t] = De;
|
|
259
|
+
for (t = se; t <= p; t++) e[t] = De;
|
|
260
|
+
for (t = V; t <= H; t++) e[t] = ke;
|
|
261
|
+
for (t = U; t <= W; t++) e[t] = Oe;
|
|
262
|
+
for (t = pe; t <= me; t++) e[t] = Oe;
|
|
263
263
|
return e;
|
|
264
264
|
})();
|
|
265
265
|
(function() {
|
|
266
266
|
let e = new Uint8Array(128);
|
|
267
|
-
return e[
|
|
267
|
+
return e[x] = Ne, e[m] = Fe, e[S] = e[C] = e[p] = e[b] = Pe, e[f] = e[w] = e[T] = e[E] = e[d] = e[c] = e[D] = Me, e[j] = e[M] = e[N] = Me, e;
|
|
268
268
|
})();
|
|
269
|
-
var
|
|
270
|
-
function
|
|
269
|
+
var Le = /[\p{P}\p{S}]/u, Re = /\p{Zs}/u, ze = [];
|
|
270
|
+
function Be(e) {
|
|
271
271
|
var t = e.indexOf("\r"), n = e.indexOf("\0");
|
|
272
272
|
if (t === -1 && n === -1) return e;
|
|
273
273
|
var r = e.length;
|
|
274
|
-
|
|
274
|
+
ze.length = 0;
|
|
275
275
|
var i = 0, a = 0;
|
|
276
276
|
for (a = t === -1 ? n : n === -1 || t < n ? t : n; a < r; a++) {
|
|
277
277
|
var o = e.charCodeAt(a);
|
|
278
|
-
o === u ? (i < a &&
|
|
278
|
+
o === u ? (i < a && ze.push(e.slice(i, a)), a + 1 < r && e.charCodeAt(a + 1) === d && a++, ze.push("\n"), i = a + 1) : o === 0 && (i < a && ze.push(e.slice(i, a)), ze.push("�"), i = a + 1);
|
|
279
279
|
}
|
|
280
|
-
return i < r &&
|
|
280
|
+
return i < r && ze.push(e.slice(i)), ze.join("");
|
|
281
281
|
}
|
|
282
|
-
function
|
|
282
|
+
function Ve(e, t, n) {
|
|
283
283
|
for (var r = e, i = t.split("."), a = 0; a < i.length && (r = r?.[i[a]], r !== void 0);) a++;
|
|
284
284
|
return r || n;
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function He(e) {
|
|
287
287
|
for (var t = !1, n = 0; n < e.length; n++) {
|
|
288
288
|
var r = e.charCodeAt(n);
|
|
289
|
-
if (r <= c || r === ae || r ===
|
|
289
|
+
if (r <= c || r === ae || r === v || r === w || r === g || r === m || r === x || r === E || r === h || r === f || r >= 123) {
|
|
290
290
|
t = !0;
|
|
291
291
|
break;
|
|
292
292
|
}
|
|
@@ -294,9 +294,9 @@ function Ue(e) {
|
|
|
294
294
|
if (!t) return e;
|
|
295
295
|
for (var i = "", n = 0; n < e.length; n++) {
|
|
296
296
|
var r = e.charCodeAt(n);
|
|
297
|
-
if (r ===
|
|
297
|
+
if (r === v && n + 2 < e.length) {
|
|
298
298
|
var a = e.charCodeAt(n + 1), o = e.charCodeAt(n + 2);
|
|
299
|
-
if ((a >= V && a <= H || a >= U && a <=
|
|
299
|
+
if ((a >= V && a <= H || a >= U && a <= A || a >= pe && a <= j) && (o >= V && o <= H || o >= U && o <= A || o >= pe && o <= j)) {
|
|
300
300
|
i += e[n] + e[n + 1] + e[n + 2], n += 2;
|
|
301
301
|
continue;
|
|
302
302
|
}
|
|
@@ -305,10 +305,10 @@ function Ue(e) {
|
|
|
305
305
|
}
|
|
306
306
|
return i;
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function Ue(...e) {
|
|
309
309
|
return e.filter(Boolean).join(" ");
|
|
310
310
|
}
|
|
311
|
-
var
|
|
311
|
+
var We = new Set([
|
|
312
312
|
"title",
|
|
313
313
|
"textarea",
|
|
314
314
|
"style",
|
|
@@ -318,24 +318,24 @@ var Ge = new Set([
|
|
|
318
318
|
"noframes",
|
|
319
319
|
"script",
|
|
320
320
|
"plaintext"
|
|
321
|
-
]),
|
|
321
|
+
]), Ge = /<(\/?)(title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)(\s|>|\/)/gi;
|
|
322
|
+
function Ke(e) {
|
|
323
|
+
return We.has(e.toLowerCase());
|
|
324
|
+
}
|
|
322
325
|
function qe(e) {
|
|
323
|
-
return Ge.
|
|
326
|
+
return Ge.lastIndex = 0, Ge.test(e);
|
|
324
327
|
}
|
|
325
328
|
function Je(e) {
|
|
326
|
-
return
|
|
327
|
-
}
|
|
328
|
-
function Ye(e) {
|
|
329
|
-
return Ke.lastIndex = 0, e.replace(Ke, function(e, t, n, r) {
|
|
329
|
+
return Ge.lastIndex = 0, e.replace(Ge, function(e, t, n, r) {
|
|
330
330
|
return "<" + t + n + r;
|
|
331
331
|
});
|
|
332
332
|
}
|
|
333
|
-
var
|
|
333
|
+
var Ye = /^<([a-zA-Z][a-zA-Z0-9-]*)\s[^>]*>/, Xe = /^<[A-Z]/, Ze = [
|
|
334
334
|
"script",
|
|
335
335
|
"pre",
|
|
336
336
|
"style",
|
|
337
337
|
"textarea"
|
|
338
|
-
],
|
|
338
|
+
], Qe = new Set(Ze), $e = /<(?:pre|script|style|textarea)\b/i, et = /^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m, tt = /^<([a-z][^ >/\n\r]*) ?([^>]*?)>/im, nt = new Set([
|
|
339
339
|
"table",
|
|
340
340
|
"thead",
|
|
341
341
|
"tbody",
|
|
@@ -343,57 +343,57 @@ var Xe = /^<([a-zA-Z][a-zA-Z0-9-]*)\s[^>]*>/, Ze = /^<[A-Z]/, Qe = [
|
|
|
343
343
|
"tr",
|
|
344
344
|
"td",
|
|
345
345
|
"th"
|
|
346
|
-
]),
|
|
346
|
+
]), rt = new Uint8Array(128);
|
|
347
347
|
(function() {
|
|
348
348
|
for (var e = [
|
|
349
349
|
f,
|
|
350
|
+
S,
|
|
350
351
|
C,
|
|
351
|
-
w,
|
|
352
352
|
p,
|
|
353
|
-
|
|
353
|
+
b,
|
|
354
354
|
m,
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
355
|
+
D,
|
|
356
|
+
w,
|
|
357
|
+
x,
|
|
358
|
+
fe,
|
|
359
|
+
M,
|
|
359
360
|
N,
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
], t = 0; t < e.length; t++) nt[e[t]] = 1;
|
|
361
|
+
j
|
|
362
|
+
], t = 0; t < e.length; t++) rt[e[t]] = 1;
|
|
363
363
|
})();
|
|
364
|
-
var
|
|
365
|
-
function it(e) {
|
|
366
|
-
return $e.has(e);
|
|
367
|
-
}
|
|
364
|
+
var it = /([a-zA-Z_][a-zA-Z0-9_-]*)=(?:"([^"]*)"|'([^']*)')/g;
|
|
368
365
|
function at(e) {
|
|
369
|
-
return
|
|
366
|
+
return Qe.has(e);
|
|
367
|
+
}
|
|
368
|
+
function ot(e) {
|
|
369
|
+
return $e.test(e);
|
|
370
370
|
}
|
|
371
|
-
function
|
|
371
|
+
function st(e, t, n) {
|
|
372
372
|
for (var r = t, i = n; r < i && (e.charCodeAt(r) === c || e.charCodeAt(r) === l);) r++;
|
|
373
373
|
if (r >= i) return !1;
|
|
374
|
-
e.charCodeAt(r) ===
|
|
374
|
+
e.charCodeAt(r) === B && r++;
|
|
375
375
|
for (var a = 0; r < i;) {
|
|
376
376
|
for (; r < i && (e.charCodeAt(r) === c || e.charCodeAt(r) === l);) r++;
|
|
377
377
|
if (r >= i) break;
|
|
378
|
-
if (e.charCodeAt(r) ===
|
|
378
|
+
if (e.charCodeAt(r) === B && a > 0) {
|
|
379
379
|
for (var o = r + 1; o < i && (e.charCodeAt(o) === c || e.charCodeAt(o) === l);) o++;
|
|
380
380
|
if (o >= i) return !0;
|
|
381
381
|
}
|
|
382
|
-
if (e.charCodeAt(r) ===
|
|
383
|
-
for (; r < i && e.charCodeAt(r) ===
|
|
384
|
-
for (r < i && e.charCodeAt(r) ===
|
|
385
|
-
if (r < i) if (e.charCodeAt(r) ===
|
|
382
|
+
if (e.charCodeAt(r) === k && r++, r >= i || e.charCodeAt(r) !== y) return !1;
|
|
383
|
+
for (; r < i && e.charCodeAt(r) === y;) r++;
|
|
384
|
+
for (r < i && e.charCodeAt(r) === k && r++, a++; r < i && (e.charCodeAt(r) === c || e.charCodeAt(r) === l);) r++;
|
|
385
|
+
if (r < i) if (e.charCodeAt(r) === B) r++;
|
|
386
386
|
else return !1;
|
|
387
387
|
}
|
|
388
388
|
return a > 0;
|
|
389
389
|
}
|
|
390
|
-
function
|
|
391
|
-
if (e.charCodeAt(t) !==
|
|
390
|
+
function ct(e, t) {
|
|
391
|
+
if (e.charCodeAt(t) !== w) return null;
|
|
392
392
|
let n = t + 1, r = e.length, i = !1;
|
|
393
|
-
e.charCodeAt(n) ===
|
|
393
|
+
e.charCodeAt(n) === re && (n++, i = !0);
|
|
394
394
|
let a = n, o = e.charCodeAt(n);
|
|
395
|
-
if (!(o >=
|
|
396
|
-
for (; n < r && (e.charCodeAt(n) >=
|
|
395
|
+
if (!(o >= pe && o <= me || o >= U && o <= W)) return null;
|
|
396
|
+
for (; n < r && (e.charCodeAt(n) >= pe && e.charCodeAt(n) <= me || e.charCodeAt(n) >= U && e.charCodeAt(n) <= W || e.charCodeAt(n) >= V && e.charCodeAt(n) <= H || e.charCodeAt(n) === y);) n++;
|
|
397
397
|
let s = e.slice(a, n);
|
|
398
398
|
if (!s) return null;
|
|
399
399
|
let u = n;
|
|
@@ -401,7 +401,7 @@ function st(e, t) {
|
|
|
401
401
|
let p = e.slice(u, n);
|
|
402
402
|
if (n === u && n < r) {
|
|
403
403
|
var m = e.charCodeAt(n);
|
|
404
|
-
if (m !== g && m !==
|
|
404
|
+
if (m !== g && m !== re) return null;
|
|
405
405
|
}
|
|
406
406
|
let h = n, _ = {}, v = !1;
|
|
407
407
|
for (; n < r;) {
|
|
@@ -423,7 +423,7 @@ function st(e, t) {
|
|
|
423
423
|
n++;
|
|
424
424
|
continue;
|
|
425
425
|
}
|
|
426
|
-
if (t ===
|
|
426
|
+
if (t === re && n + 1 < r && e.charCodeAt(n + 1) === g) {
|
|
427
427
|
let t = e.slice(h, n);
|
|
428
428
|
return v = n > h && e.charCodeAt(n - 1) === c, {
|
|
429
429
|
tag: s,
|
|
@@ -436,15 +436,15 @@ function st(e, t) {
|
|
|
436
436
|
hasSpaceBeforeSlash: v
|
|
437
437
|
};
|
|
438
438
|
}
|
|
439
|
-
var
|
|
440
|
-
if (!(S >=
|
|
439
|
+
var x = n, S = e.charCodeAt(n);
|
|
440
|
+
if (!(S >= pe && S <= me || S >= U && S <= W || S === C || S === k)) return null;
|
|
441
441
|
for (n++; n < r;) {
|
|
442
|
-
var
|
|
443
|
-
if (
|
|
442
|
+
var T = e.charCodeAt(n);
|
|
443
|
+
if (T >= pe && T <= me || T >= U && T <= W || T >= V && T <= H || T === C || T === ne || T === k || T === y) n++;
|
|
444
444
|
else break;
|
|
445
445
|
}
|
|
446
|
-
for (var E = e.slice(
|
|
447
|
-
if (e.charCodeAt(n) !==
|
|
446
|
+
for (var E = e.slice(x, n); n < r && (e.charCodeAt(n) === c || e.charCodeAt(n) === l);) n++;
|
|
447
|
+
if (e.charCodeAt(n) !== b) {
|
|
448
448
|
_[E] = "";
|
|
449
449
|
continue;
|
|
450
450
|
}
|
|
@@ -455,20 +455,20 @@ function st(e, t) {
|
|
|
455
455
|
for (var O = n; n < r && e.charCodeAt(n) !== D;) n++;
|
|
456
456
|
if (n >= r) return null;
|
|
457
457
|
if (_[E] = e.slice(O, n), n++, n < r) {
|
|
458
|
-
var
|
|
459
|
-
if (
|
|
458
|
+
var A = e.charCodeAt(n);
|
|
459
|
+
if (A !== c && A !== l && A !== d && A !== g && A !== re) return null;
|
|
460
460
|
}
|
|
461
|
-
} else if (D ===
|
|
461
|
+
} else if (D === se) {
|
|
462
462
|
var j = 1, O = n;
|
|
463
463
|
for (n++; n < r && j > 0;) {
|
|
464
|
-
var
|
|
465
|
-
|
|
464
|
+
var T = e.charCodeAt(n);
|
|
465
|
+
T === se ? j++ : T === ce && j--, n++;
|
|
466
466
|
}
|
|
467
467
|
_[E] = e.slice(O, n);
|
|
468
468
|
} else {
|
|
469
469
|
for (var O = n; n < r;) {
|
|
470
470
|
var M = e.charCodeAt(n);
|
|
471
|
-
if (M === c || M === l || M === g || M === d || M === ae || M === ie || M ===
|
|
471
|
+
if (M === c || M === l || M === g || M === d || M === ae || M === ie || M === b || M === w || M === f) break;
|
|
472
472
|
n++;
|
|
473
473
|
}
|
|
474
474
|
if (n === O) return null;
|
|
@@ -477,22 +477,22 @@ function st(e, t) {
|
|
|
477
477
|
}
|
|
478
478
|
return null;
|
|
479
479
|
}
|
|
480
|
-
function
|
|
480
|
+
function lt(e, t, n) {
|
|
481
481
|
for (var r = 0, i = e.length, a = !1, o = !1; r < i;) {
|
|
482
|
-
for (var s = e.indexOf("\n", r), u = s < 0 ? i : s, v = r,
|
|
483
|
-
else if (e.charCodeAt(v) === l)
|
|
482
|
+
for (var s = e.indexOf("\n", r), u = s < 0 ? i : s, v = r, b = 0; v < u && b < 4;) if (e.charCodeAt(v) === c) b++, v++;
|
|
483
|
+
else if (e.charCodeAt(v) === l) b += 4, v++;
|
|
484
484
|
else break;
|
|
485
485
|
if (v >= u) {
|
|
486
486
|
a = !1, r = s < 0 ? i : s + 1;
|
|
487
487
|
continue;
|
|
488
488
|
}
|
|
489
|
-
if (
|
|
489
|
+
if (b < 4) {
|
|
490
490
|
var x = e.charCodeAt(v);
|
|
491
491
|
if (x === f || x === p) {
|
|
492
|
-
for (var
|
|
492
|
+
for (var w = x, T = 0, E = v; E < u && e.charCodeAt(E) === w;) T++, E++;
|
|
493
493
|
if (T >= 3) {
|
|
494
494
|
var D = !0;
|
|
495
|
-
if (
|
|
495
|
+
if (w === f) {
|
|
496
496
|
for (var O = E; O < u; O++) if (e.charCodeAt(O) === f) {
|
|
497
497
|
D = !1;
|
|
498
498
|
break;
|
|
@@ -507,8 +507,8 @@ function ct(e, t, n) {
|
|
|
507
507
|
else if (M === l) j += 4, A++;
|
|
508
508
|
else break;
|
|
509
509
|
}
|
|
510
|
-
if (j < 4 && A < i && e.charCodeAt(A) ===
|
|
511
|
-
for (var N = 0; A < i && e.charCodeAt(A) ===
|
|
510
|
+
if (j < 4 && A < i && e.charCodeAt(A) === w) {
|
|
511
|
+
for (var N = 0; A < i && e.charCodeAt(A) === w;) N++, A++;
|
|
512
512
|
if (N >= T) {
|
|
513
513
|
for (; A < i && (e.charCodeAt(A) === c || e.charCodeAt(A) === l);) A++;
|
|
514
514
|
if (A >= i || e.charCodeAt(A) === d) {
|
|
@@ -534,16 +534,16 @@ function ct(e, t, n) {
|
|
|
534
534
|
if (F >= 4) break;
|
|
535
535
|
a = !1;
|
|
536
536
|
}
|
|
537
|
-
if (!a &&
|
|
538
|
-
var I =
|
|
537
|
+
if (!a && b < 4 && P < u && e.charCodeAt(P) === m && !(P + 1 < i && e.charCodeAt(P + 1) === h)) {
|
|
538
|
+
var I = ut(e, P, t);
|
|
539
539
|
if (I) {
|
|
540
540
|
r = I, a = !1;
|
|
541
541
|
continue;
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
544
|
var L = e.charCodeAt(v);
|
|
545
|
-
if (L === _ &&
|
|
546
|
-
else if (
|
|
545
|
+
if (L === _ && b < 4) a = !1;
|
|
546
|
+
else if (b < 4 && (L === y || L === S || L === C)) {
|
|
547
547
|
for (var R = v, ee = 0; R < u;) {
|
|
548
548
|
var te = e.charCodeAt(R);
|
|
549
549
|
if (te === L) ee++;
|
|
@@ -556,24 +556,24 @@ function ct(e, t, n) {
|
|
|
556
556
|
}
|
|
557
557
|
return o;
|
|
558
558
|
}
|
|
559
|
-
function
|
|
559
|
+
function ut(e, t, n) {
|
|
560
560
|
let r = e.length;
|
|
561
561
|
if (e.charCodeAt(t) !== m) return null;
|
|
562
562
|
let i = t + 1 < r && e.charCodeAt(t + 1) === h, a = t + 1;
|
|
563
563
|
for (; a < r;) {
|
|
564
564
|
var o = e.charCodeAt(a);
|
|
565
|
-
if (o ===
|
|
565
|
+
if (o === E) {
|
|
566
566
|
a++;
|
|
567
567
|
break;
|
|
568
568
|
}
|
|
569
569
|
if (o === m) return null;
|
|
570
|
-
o ===
|
|
570
|
+
o === x && a + 1 < r && a++, a++;
|
|
571
571
|
}
|
|
572
|
-
if (a > r || e.charCodeAt(a - 1) !==
|
|
572
|
+
if (a > r || e.charCodeAt(a - 1) !== E) return null;
|
|
573
573
|
let s = e.slice(t + 1, a - 1);
|
|
574
574
|
if (s.length > 999) return null;
|
|
575
|
-
let u =
|
|
576
|
-
if (!u || a >= r || e.charCodeAt(a) !==
|
|
575
|
+
let u = mt(s);
|
|
576
|
+
if (!u || a >= r || e.charCodeAt(a) !== k) return null;
|
|
577
577
|
a++;
|
|
578
578
|
let f = !1;
|
|
579
579
|
for (; a < r;) {
|
|
@@ -590,101 +590,98 @@ function lt(e, t, n) {
|
|
|
590
590
|
}, t < 0 ? r : t + 1;
|
|
591
591
|
}
|
|
592
592
|
var p;
|
|
593
|
-
if (a < r && e.charCodeAt(a) ===
|
|
593
|
+
if (a < r && e.charCodeAt(a) === w) {
|
|
594
594
|
a++;
|
|
595
|
-
for (var _ = a; a < r && e.charCodeAt(a) !== g && e.charCodeAt(a) !== d;) e.charCodeAt(a) ===
|
|
595
|
+
for (var _ = a; a < r && e.charCodeAt(a) !== g && e.charCodeAt(a) !== d;) e.charCodeAt(a) === x && a + 1 < r && a++, a++;
|
|
596
596
|
if (a >= r || e.charCodeAt(a) !== g) return null;
|
|
597
597
|
p = e.slice(_, a), a++;
|
|
598
598
|
for (var v = e.indexOf("\n", a), y = v < 0 ? r : v, b = a; b < y && (e.charCodeAt(b) === c || e.charCodeAt(b) === l);) b++;
|
|
599
599
|
if (b < y) {
|
|
600
600
|
if (b === a) return null;
|
|
601
|
-
var
|
|
602
|
-
if (
|
|
601
|
+
var S = e.charCodeAt(b);
|
|
602
|
+
if (S !== ae && S !== ie && S !== le) return null;
|
|
603
603
|
}
|
|
604
604
|
} else {
|
|
605
605
|
for (var _ = a, C = 0; a < r;) {
|
|
606
606
|
var o = e.charCodeAt(a);
|
|
607
|
-
if (o ===
|
|
608
|
-
else if (o ===
|
|
607
|
+
if (o === le) C++;
|
|
608
|
+
else if (o === ue) {
|
|
609
609
|
if (C === 0) break;
|
|
610
610
|
C--;
|
|
611
611
|
} else {
|
|
612
612
|
if (o === c || o === l || o === d) break;
|
|
613
|
-
o ===
|
|
613
|
+
o === x && a + 1 < r && a++;
|
|
614
614
|
}
|
|
615
615
|
a++;
|
|
616
616
|
}
|
|
617
617
|
if (p = e.slice(_, a), !p) return null;
|
|
618
618
|
}
|
|
619
619
|
for (; a < r && (e.charCodeAt(a) === c || e.charCodeAt(a) === l);) a++;
|
|
620
|
-
var
|
|
621
|
-
if (a ===
|
|
620
|
+
var T = e.indexOf("\n", a), D = T < 0 ? r : T, O, A = !1, j = a, M = a;
|
|
621
|
+
if (a === D && a < r) for (M = a + 1; M < r && (e.charCodeAt(M) === c || e.charCodeAt(M) === l);) M++;
|
|
622
622
|
if (M < r) {
|
|
623
623
|
var N = e.charCodeAt(M);
|
|
624
|
-
if (N === ae || N === ie || N ===
|
|
625
|
-
for (var P = N ===
|
|
624
|
+
if (N === ae || N === ie || N === le) {
|
|
625
|
+
for (var P = N === le ? 41 : N, F = M + 1, I = F; F < r;) {
|
|
626
626
|
var L = e.charCodeAt(F);
|
|
627
627
|
if (L === P) {
|
|
628
628
|
for (var R = F + 1; R < r && (e.charCodeAt(R) === c || e.charCodeAt(R) === l);) R++;
|
|
629
|
-
(R >= r || e.charCodeAt(R) === d) && (O = e.slice(I, F),
|
|
629
|
+
(R >= r || e.charCodeAt(R) === d) && (O = e.slice(I, F), A = !0, j = R < r ? R + 1 : r);
|
|
630
630
|
break;
|
|
631
631
|
}
|
|
632
|
-
if (L ===
|
|
632
|
+
if (L === x && F + 1 < r) {
|
|
633
633
|
F += 2;
|
|
634
634
|
continue;
|
|
635
635
|
}
|
|
636
636
|
if (L === d && F + 1 < r && e.charCodeAt(F + 1) === d) break;
|
|
637
637
|
F++;
|
|
638
638
|
}
|
|
639
|
-
if (!
|
|
639
|
+
if (!A && M === a) return null;
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
|
-
if (
|
|
643
|
-
target:
|
|
644
|
-
title: O === void 0 ? O :
|
|
642
|
+
if (A) return n[u] || (n[u] = {
|
|
643
|
+
target: gt(p),
|
|
644
|
+
title: O === void 0 ? O : ve(gt(O))
|
|
645
645
|
}), j;
|
|
646
|
-
for (; a <
|
|
647
|
-
return a <
|
|
648
|
-
target:
|
|
646
|
+
for (; a < D && (e.charCodeAt(a) === c || e.charCodeAt(a) === l);) a++;
|
|
647
|
+
return a < D ? null : (n[u] || (n[u] = {
|
|
648
|
+
target: gt(p),
|
|
649
649
|
title: O
|
|
650
|
-
}),
|
|
651
|
-
}
|
|
652
|
-
var
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
for (let e = me; e <= he; e++) Q[e] = ft;
|
|
657
|
-
Q[S] = Z, Q[D] = Z, Q[ue] = Z, Q[de] = Z, Q[A] = Z, Q[ae] = Z, Q[ie] = Z, Q[k] = Z, Q[x] = Z, Q[v] = Z, Q[y] = Z, Q[te] = Z, Q[re] = Z, Q[B] = Z, Q[z] = Z, Q[ne] = Z, Q[E] = Z, Q[h] = Z, Q[ce] = Z, Q[le] = Z;
|
|
658
|
-
function gt(e) {
|
|
650
|
+
}), T < 0 ? r : T + 1);
|
|
651
|
+
}
|
|
652
|
+
var dt = new Uint8Array(Ie);
|
|
653
|
+
for (dt[fe] = Te, dt[_] |= Ae, dt[g] |= Ae, dt[y] |= Ae | je, dt[oe] |= Ae, dt[S] |= Ae | je, dt[C] |= Ae | je, dt[f] |= Ae | je, dt[p] |= Ae | je, dt[w] |= Ae | je, dt[m] |= je, dt[D] |= je, dt[B] |= Ae, ft = V; ft <= H; ft++) dt[ft] |= Ae;
|
|
654
|
+
var ft;
|
|
655
|
+
function pt(e) {
|
|
659
656
|
if (e.indexOf("[") < 0 && e.indexOf("]") < 0) return !1;
|
|
660
657
|
for (var t = 0; t < e.length; t++) {
|
|
661
|
-
if (e.charCodeAt(t) ===
|
|
658
|
+
if (e.charCodeAt(t) === x) {
|
|
662
659
|
t++;
|
|
663
660
|
continue;
|
|
664
661
|
}
|
|
665
|
-
if (e.charCodeAt(t) === m || e.charCodeAt(t) ===
|
|
662
|
+
if (e.charCodeAt(t) === m || e.charCodeAt(t) === E) return !0;
|
|
666
663
|
}
|
|
667
664
|
return !1;
|
|
668
665
|
}
|
|
669
|
-
function
|
|
666
|
+
function mt(e) {
|
|
670
667
|
var t = e.replace(/\s+/g, " ").trim();
|
|
671
668
|
return t.indexOf("ẞ") === -1 ? t.toLowerCase() : t.replace(/\u1E9E/g, "ss").toLowerCase();
|
|
672
669
|
}
|
|
673
|
-
function
|
|
674
|
-
return e <
|
|
670
|
+
function ht(e) {
|
|
671
|
+
return e < he ? dt[e] : e === L ? Te : 0;
|
|
675
672
|
}
|
|
676
|
-
function
|
|
673
|
+
function gt(e) {
|
|
677
674
|
return e.replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g, "$1");
|
|
678
675
|
}
|
|
679
|
-
function
|
|
676
|
+
function _t(e, t) {
|
|
680
677
|
var n = e.indexOf("\n", t);
|
|
681
678
|
return n < 0 ? e.length : n;
|
|
682
679
|
}
|
|
683
680
|
function $(e, t) {
|
|
684
|
-
let n =
|
|
681
|
+
let n = _t(e, t);
|
|
685
682
|
return n < e.length ? n + 1 : n;
|
|
686
683
|
}
|
|
687
|
-
function
|
|
684
|
+
function vt(e, t, n) {
|
|
688
685
|
for (; t < n;) {
|
|
689
686
|
let n = e.charCodeAt(t);
|
|
690
687
|
if (n !== c && n !== l) break;
|
|
@@ -692,49 +689,49 @@ function xt(e, t, n) {
|
|
|
692
689
|
}
|
|
693
690
|
return t;
|
|
694
691
|
}
|
|
695
|
-
function
|
|
692
|
+
function yt(e, t) {
|
|
696
693
|
let n = $(e, t);
|
|
697
694
|
for (; n < e.length;) {
|
|
698
|
-
let t =
|
|
699
|
-
if (
|
|
695
|
+
let t = _t(e, n);
|
|
696
|
+
if (wt(e, n, t)) return n;
|
|
700
697
|
n = $(e, n);
|
|
701
698
|
}
|
|
702
699
|
return e.length;
|
|
703
700
|
}
|
|
704
|
-
function
|
|
701
|
+
function bt(e, t, n, r) {
|
|
705
702
|
let i = 0;
|
|
706
703
|
for (; t + i < n && e.charCodeAt(t + i) === r;) i++;
|
|
707
704
|
return i;
|
|
708
705
|
}
|
|
709
|
-
var
|
|
710
|
-
function
|
|
711
|
-
for (
|
|
712
|
-
let n = e.charCodeAt(t +
|
|
713
|
-
if (n === l)
|
|
714
|
-
else if (n === c)
|
|
706
|
+
var xt = 0, St = 0;
|
|
707
|
+
function Ct(e, t, n) {
|
|
708
|
+
for (xt = 0, St = 0; t + St < n;) {
|
|
709
|
+
let n = e.charCodeAt(t + St);
|
|
710
|
+
if (n === l) xt += 4 - xt % 4;
|
|
711
|
+
else if (n === c) xt++;
|
|
715
712
|
else break;
|
|
716
|
-
|
|
713
|
+
St++;
|
|
717
714
|
}
|
|
718
715
|
}
|
|
719
|
-
function
|
|
720
|
-
return
|
|
716
|
+
function wt(e, t, n) {
|
|
717
|
+
return vt(e, t, n) >= n;
|
|
721
718
|
}
|
|
722
|
-
function
|
|
723
|
-
let i =
|
|
724
|
-
if (
|
|
725
|
-
let a = t +
|
|
719
|
+
function Tt(e, t, n, r) {
|
|
720
|
+
let i = _t(e, t);
|
|
721
|
+
if (Ct(e, t, i), xt > 3) return null;
|
|
722
|
+
let a = t + St;
|
|
726
723
|
if (e.charCodeAt(a) !== _) return null;
|
|
727
|
-
let o =
|
|
724
|
+
let o = bt(e, a, i, 35);
|
|
728
725
|
if (o < 1 || o > 6 || (a += o, a < i && e.charCodeAt(a) !== c && e.charCodeAt(a) !== l)) return null;
|
|
729
|
-
a =
|
|
726
|
+
a = vt(e, a, i);
|
|
730
727
|
for (var s = i; s > a && e.charCodeAt(s - 1) === c;) s--;
|
|
731
728
|
for (var u = s; s > a && e.charCodeAt(s - 1) === _;) s--;
|
|
732
729
|
if (s < u) if (s === a || e.charCodeAt(s - 1) === c) for (; s > a && e.charCodeAt(s - 1) === c;) s--;
|
|
733
730
|
else s = u;
|
|
734
|
-
let d = e.slice(a, s), f =
|
|
731
|
+
let d = e.slice(a, s), f = _n(d, 0, d.length, n, r), p = (r?.slugify || Ce)(d);
|
|
735
732
|
return {
|
|
736
733
|
node: {
|
|
737
|
-
type:
|
|
734
|
+
type: K.heading,
|
|
738
735
|
level: o,
|
|
739
736
|
children: f,
|
|
740
737
|
id: p
|
|
@@ -742,18 +739,18 @@ function Ot(e, t, n, r) {
|
|
|
742
739
|
end: $(e, i)
|
|
743
740
|
};
|
|
744
741
|
}
|
|
745
|
-
function
|
|
742
|
+
function Et(e, t, n) {
|
|
746
743
|
var r = e.charCodeAt(t);
|
|
747
|
-
if (r !==
|
|
744
|
+
if (r !== b && r !== y) return !1;
|
|
748
745
|
for (var i = t; i < n && e.charCodeAt(i) === r;) i++;
|
|
749
746
|
for (; i < n && (e.charCodeAt(i) === c || e.charCodeAt(i) === l);) i++;
|
|
750
747
|
return i >= n;
|
|
751
748
|
}
|
|
752
|
-
function
|
|
753
|
-
let n =
|
|
754
|
-
if (
|
|
755
|
-
let r = t +
|
|
756
|
-
if (i !==
|
|
749
|
+
function Dt(e, t) {
|
|
750
|
+
let n = _t(e, t);
|
|
751
|
+
if (Ct(e, t, n), xt > 3) return null;
|
|
752
|
+
let r = t + St, i = e.charCodeAt(r);
|
|
753
|
+
if (i !== y && i !== S && i !== C) return null;
|
|
757
754
|
let a = 0;
|
|
758
755
|
for (; r < n;) {
|
|
759
756
|
let t = e.charCodeAt(r);
|
|
@@ -762,37 +759,37 @@ function At(e, t) {
|
|
|
762
759
|
r++;
|
|
763
760
|
}
|
|
764
761
|
return a < 3 ? null : {
|
|
765
|
-
node: { type:
|
|
762
|
+
node: { type: K.breakThematic },
|
|
766
763
|
end: $(e, n)
|
|
767
764
|
};
|
|
768
765
|
}
|
|
769
|
-
function
|
|
770
|
-
let r =
|
|
771
|
-
if (
|
|
772
|
-
let i =
|
|
766
|
+
function Ot(e, t, n) {
|
|
767
|
+
let r = _t(e, t);
|
|
768
|
+
if (Ct(e, t, r), xt > 3) return null;
|
|
769
|
+
let i = xt, a = t + St, o = e.charCodeAt(a);
|
|
773
770
|
if (o !== f && o !== p) return null;
|
|
774
|
-
let s =
|
|
771
|
+
let s = bt(e, a, r, o);
|
|
775
772
|
if (s < 3) return null;
|
|
776
773
|
a += s;
|
|
777
|
-
let u =
|
|
774
|
+
let u = vt(e, a, r), m = r;
|
|
778
775
|
if (o === f) {
|
|
779
776
|
for (let t = u; t < r; t++) if (e.charCodeAt(t) === f) return null;
|
|
780
777
|
}
|
|
781
778
|
for (; m > u && (e.charCodeAt(m - 1) === c || e.charCodeAt(m - 1) === l);) m--;
|
|
782
779
|
let h = e.slice(u, m), g = "", _ = "", v = h.indexOf(" ");
|
|
783
|
-
v === -1 ? g = h : (g = h.slice(0, v), _ = h.slice(v + 1).trim()), g =
|
|
780
|
+
v === -1 ? g = h : (g = h.slice(0, v), _ = h.slice(v + 1).trim()), g = gt(g);
|
|
784
781
|
var y = void 0;
|
|
785
782
|
if (_) {
|
|
786
|
-
|
|
787
|
-
for (var b; (b =
|
|
783
|
+
it.lastIndex = 0;
|
|
784
|
+
for (var b; (b = it.exec(_)) !== null;) y ||= {}, y[b[1]] = b[2] === void 0 ? b[3] : b[2];
|
|
788
785
|
}
|
|
789
786
|
let x = $(e, r), S = x, C = e.length;
|
|
790
787
|
for (; S < e.length;) {
|
|
791
|
-
let t =
|
|
792
|
-
if (
|
|
793
|
-
let n = S +
|
|
794
|
-
var w =
|
|
795
|
-
if (w >= s &&
|
|
788
|
+
let t = _t(e, S);
|
|
789
|
+
if (Ct(e, S, t), xt < 4) {
|
|
790
|
+
let n = S + St;
|
|
791
|
+
var w = bt(e, n, t, o);
|
|
792
|
+
if (w >= s && wt(e, n + w, t)) {
|
|
796
793
|
C = $(e, t);
|
|
797
794
|
break;
|
|
798
795
|
}
|
|
@@ -804,14 +801,14 @@ function jt(e, t, n) {
|
|
|
804
801
|
else {
|
|
805
802
|
T = "";
|
|
806
803
|
for (var E = x; E < S;) {
|
|
807
|
-
var D =
|
|
808
|
-
|
|
804
|
+
var D = _t(e, E);
|
|
805
|
+
Ct(e, E, D), T += e.slice(E + Math.min(St, i), D) + "\n", E = $(e, D);
|
|
809
806
|
}
|
|
810
807
|
T.length > 0 && T.charCodeAt(T.length - 1) === d && (T = T.slice(0, -1));
|
|
811
808
|
}
|
|
812
809
|
return {
|
|
813
810
|
node: {
|
|
814
|
-
type:
|
|
811
|
+
type: K.codeBlock,
|
|
815
812
|
lang: g || void 0,
|
|
816
813
|
text: T,
|
|
817
814
|
infoString: _ || void 0,
|
|
@@ -820,19 +817,19 @@ function jt(e, t, n) {
|
|
|
820
817
|
end: C
|
|
821
818
|
};
|
|
822
819
|
}
|
|
823
|
-
function
|
|
824
|
-
if (
|
|
820
|
+
function kt(e, t) {
|
|
821
|
+
if (Ct(e, t, _t(e, t)), xt < 4) return null;
|
|
825
822
|
let n = "", r = t;
|
|
826
823
|
for (; r < e.length;) {
|
|
827
|
-
let t =
|
|
828
|
-
if (
|
|
824
|
+
let t = _t(e, r);
|
|
825
|
+
if (Ct(e, r, t), wt(e, r, t)) {
|
|
829
826
|
for (var i = 0, a = $(e, t); a < e.length;) {
|
|
830
|
-
var o =
|
|
831
|
-
if (
|
|
827
|
+
var o = _t(e, a);
|
|
828
|
+
if (wt(e, a, o)) {
|
|
832
829
|
i++, a = $(e, o);
|
|
833
830
|
continue;
|
|
834
831
|
}
|
|
835
|
-
if (
|
|
832
|
+
if (Ct(e, a, o), xt >= 4) {
|
|
836
833
|
for (var s = 0; s <= i; s++) n += "\n";
|
|
837
834
|
r = a;
|
|
838
835
|
break;
|
|
@@ -842,7 +839,7 @@ function Mt(e, t) {
|
|
|
842
839
|
if (r !== a) break;
|
|
843
840
|
continue;
|
|
844
841
|
}
|
|
845
|
-
if (
|
|
842
|
+
if (xt < 4) break;
|
|
846
843
|
let d = 0, m = 0;
|
|
847
844
|
var c = 0;
|
|
848
845
|
for (let n = r; n < t && m < 4; n++) {
|
|
@@ -860,33 +857,36 @@ function Mt(e, t) {
|
|
|
860
857
|
for (; n.length > 0 && n.charCodeAt(n.length - 1) === d;) n = n.slice(0, -1);
|
|
861
858
|
return n ? {
|
|
862
859
|
node: {
|
|
863
|
-
type:
|
|
864
|
-
|
|
860
|
+
type: K.codeBlock,
|
|
861
|
+
lang: void 0,
|
|
862
|
+
text: n,
|
|
863
|
+
infoString: void 0,
|
|
864
|
+
attrs: void 0
|
|
865
865
|
},
|
|
866
866
|
end: r
|
|
867
867
|
} : null;
|
|
868
868
|
}
|
|
869
|
-
function
|
|
870
|
-
if (
|
|
871
|
-
let i = t +
|
|
869
|
+
function At(e, t, n, r) {
|
|
870
|
+
if (Ct(e, t, _t(e, t)), xt > 3) return null;
|
|
871
|
+
let i = t + St;
|
|
872
872
|
if (e.charCodeAt(i) !== g) return null;
|
|
873
873
|
let a = "", o = t, s, u = !1, d = !1, m = !1;
|
|
874
874
|
for (; o < e.length;) {
|
|
875
|
-
let t =
|
|
876
|
-
|
|
877
|
-
let n = o +
|
|
875
|
+
let t = _t(e, o);
|
|
876
|
+
Ct(e, o, t);
|
|
877
|
+
let n = o + St;
|
|
878
878
|
if (e.charCodeAt(n) === g) {
|
|
879
879
|
let r = n + 1;
|
|
880
|
-
var h =
|
|
880
|
+
var h = xt + 1, v = !1;
|
|
881
881
|
if (r < t) {
|
|
882
|
-
var
|
|
883
|
-
|
|
882
|
+
var b = e.charCodeAt(r);
|
|
883
|
+
b === c ? (r++, h++, v = !0) : b === l && (v = !0);
|
|
884
884
|
}
|
|
885
|
-
for (var x = "",
|
|
886
|
-
|
|
885
|
+
for (var x = "", T = !1, E = r; E < t; E++) if (e.charCodeAt(E) === l) {
|
|
886
|
+
T = !0;
|
|
887
887
|
break;
|
|
888
888
|
}
|
|
889
|
-
if (
|
|
889
|
+
if (T) {
|
|
890
890
|
var D = h;
|
|
891
891
|
if (v && r < t && e.charCodeAt(r) === l) {
|
|
892
892
|
for (var O = 4 - D % 4, k = 0; k < O - 1; k++) x += " ";
|
|
@@ -907,13 +907,13 @@ function Nt(e, t, n, r) {
|
|
|
907
907
|
a += x + "\n";
|
|
908
908
|
var N = x.trimStart();
|
|
909
909
|
N.startsWith("```") || N.startsWith("~~~") ? m = !m : x.startsWith(" ") || x.startsWith(" ") ? m = !0 : N.length > 0 && !m && (m = !1), d = N.length > 0, o = $(e, t);
|
|
910
|
-
} else if (a && !
|
|
911
|
-
if (
|
|
912
|
-
var P = o +
|
|
913
|
-
if (F === _ || F === g || F === f || F === p || F ===
|
|
910
|
+
} else if (a && !wt(e, o, t) && d) {
|
|
911
|
+
if (xt < 4) {
|
|
912
|
+
var P = o + St, F = P < t ? e.charCodeAt(P) : 0;
|
|
913
|
+
if (F === _ || F === g || F === f || F === p || F === w || (F === y || F === S || F === C) && Dt(e, o) || (F === y || F === S || F === oe) && P + 1 < t && (e.charCodeAt(P + 1) === c || e.charCodeAt(P + 1) === l)) break;
|
|
914
914
|
if (F >= V && F <= H) {
|
|
915
915
|
for (var I = P; I < t && e.charCodeAt(I) >= V && e.charCodeAt(I) <= H;) I++;
|
|
916
|
-
if (I < t && (e.charCodeAt(I) ===
|
|
916
|
+
if (I < t && (e.charCodeAt(I) === ne || e.charCodeAt(I) === ue)) break;
|
|
917
917
|
}
|
|
918
918
|
}
|
|
919
919
|
if (m) break;
|
|
@@ -921,29 +921,28 @@ function Nt(e, t, n, r) {
|
|
|
921
921
|
} else break;
|
|
922
922
|
}
|
|
923
923
|
if (!a && !s) return null;
|
|
924
|
-
var { inBlockQuote: L,
|
|
925
|
-
n.inBlockQuote = !0, u && (n.
|
|
926
|
-
let ee =
|
|
927
|
-
n.inBlockQuote = L, n.
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
node: te,
|
|
924
|
+
var { inBlockQuote: L, g: R } = n;
|
|
925
|
+
n.inBlockQuote = !0, u && (n.g = !0);
|
|
926
|
+
let ee = yn(a || "", n, r);
|
|
927
|
+
return n.inBlockQuote = L, n.g = R, {
|
|
928
|
+
node: {
|
|
929
|
+
type: K.blockQuote,
|
|
930
|
+
children: ee,
|
|
931
|
+
alert: s || void 0
|
|
932
|
+
},
|
|
934
933
|
end: o
|
|
935
934
|
};
|
|
936
935
|
}
|
|
937
|
-
function
|
|
936
|
+
function jt(e, t, n) {
|
|
938
937
|
for (var r = 0, i = t; i < n; i++) e.charCodeAt(i) === l ? r += 4 - r % 4 : r++;
|
|
939
938
|
return r;
|
|
940
939
|
}
|
|
941
|
-
function
|
|
942
|
-
if (
|
|
943
|
-
var r = t +
|
|
940
|
+
function Mt(e, t, n) {
|
|
941
|
+
if (Ct(e, t, n), xt > 3) return null;
|
|
942
|
+
var r = t + St;
|
|
944
943
|
if (r >= n) return null;
|
|
945
|
-
var i = e.charCodeAt(r), a =
|
|
946
|
-
if (i ===
|
|
944
|
+
var i = e.charCodeAt(r), a = xt, o = r;
|
|
945
|
+
if (i === y || i === S || i === oe) {
|
|
947
946
|
if (o = r + 1, o < n && e.charCodeAt(o) !== c && e.charCodeAt(o) !== l && e.charCodeAt(o) !== d) return null;
|
|
948
947
|
} else if (i >= V && i <= H) {
|
|
949
948
|
for (var s = r; s < n && s - r < 9;) {
|
|
@@ -953,12 +952,12 @@ function Ft(e, t, n) {
|
|
|
953
952
|
}
|
|
954
953
|
if (s > r && s < n) {
|
|
955
954
|
var f = e.charCodeAt(s);
|
|
956
|
-
if (f ===
|
|
955
|
+
if (f === ne || f === ue) {
|
|
957
956
|
if (o = s + 1, o < n && e.charCodeAt(o) !== c && e.charCodeAt(o) !== l && e.charCodeAt(o) !== d) return null;
|
|
958
957
|
} else return null;
|
|
959
958
|
} else return null;
|
|
960
959
|
} else return null;
|
|
961
|
-
var p = o, m =
|
|
960
|
+
var p = o, m = jt(e, t, o), h = 0, g = p, _ = m;
|
|
962
961
|
if (p >= n) return {
|
|
963
962
|
ordered: i >= V && i <= H,
|
|
964
963
|
marker: i >= V && i <= H ? e[s] : e[r],
|
|
@@ -975,26 +974,26 @@ function Ft(e, t, n) {
|
|
|
975
974
|
} else _++;
|
|
976
975
|
g++, h++;
|
|
977
976
|
}
|
|
978
|
-
var
|
|
979
|
-
return
|
|
977
|
+
var b = g >= n, x = _ - m;
|
|
978
|
+
return b || x > 4 ? (_ = m + 1, g = p + 1, h = 1) : h === 0 && (_ = m + 1, g = p, h = 1), {
|
|
980
979
|
ordered: i >= V && i <= H,
|
|
981
980
|
marker: i >= V && i <= H ? e[s] : e[r],
|
|
982
981
|
start: i >= V && i <= H ? parseInt(e.slice(r, s), 10) : void 0,
|
|
983
982
|
contentStart: g,
|
|
984
983
|
contentCol: _,
|
|
985
984
|
markerCol: a,
|
|
986
|
-
isEmpty:
|
|
985
|
+
isEmpty: b
|
|
987
986
|
};
|
|
988
987
|
}
|
|
989
|
-
var
|
|
990
|
-
function
|
|
988
|
+
var Nt = 0;
|
|
989
|
+
function Pt(e, t, n, r) {
|
|
991
990
|
var i = 0, a = t;
|
|
992
|
-
for (
|
|
991
|
+
for (Nt = 0; a < n && i < r;) {
|
|
993
992
|
var o = e.charCodeAt(a);
|
|
994
993
|
if (o === l) {
|
|
995
994
|
var s = 4 - i % 4;
|
|
996
995
|
if (i + s > r) {
|
|
997
|
-
|
|
996
|
+
Nt = i + s - r, a++, i = r;
|
|
998
997
|
break;
|
|
999
998
|
}
|
|
1000
999
|
i += s;
|
|
@@ -1004,17 +1003,17 @@ function Lt(e, t, n, r) {
|
|
|
1004
1003
|
}
|
|
1005
1004
|
return a;
|
|
1006
1005
|
}
|
|
1007
|
-
function
|
|
1008
|
-
var i =
|
|
1006
|
+
function Ft(e, t, n, r) {
|
|
1007
|
+
var i = _t(e, t), a = Mt(e, t, i);
|
|
1009
1008
|
if (!a) return null;
|
|
1010
|
-
var o = [], s = t, h = a.contentCol, v = "",
|
|
1009
|
+
var o = [], s = t, h = a.contentCol, v = "", b = a.isEmpty, x = !1, T = !1;
|
|
1011
1010
|
if (!a.isEmpty) {
|
|
1012
|
-
for (var
|
|
1013
|
-
|
|
1011
|
+
for (var D = !1, O = a.contentStart; O < i; O++) if (e.charCodeAt(O) === l) {
|
|
1012
|
+
D = !0;
|
|
1014
1013
|
break;
|
|
1015
1014
|
}
|
|
1016
|
-
if (
|
|
1017
|
-
var k = "", A =
|
|
1015
|
+
if (D) {
|
|
1016
|
+
var k = "", A = jt(e, t, a.contentStart), j = A - a.contentCol;
|
|
1018
1017
|
if (j > 0) for (var M = 0; M < j; M++) k += " ";
|
|
1019
1018
|
for (var N = a.contentStart; N < i; N++) if (e.charCodeAt(N) === l) {
|
|
1020
1019
|
for (var P = 4 - A % 4, F = 0; F < P; F++) k += " ";
|
|
@@ -1024,21 +1023,21 @@ function Rt(e, t, n, r) {
|
|
|
1024
1023
|
} else v = e.slice(a.contentStart, i) + "\n";
|
|
1025
1024
|
}
|
|
1026
1025
|
for (s = $(e, i); s < e.length;) {
|
|
1027
|
-
var I =
|
|
1028
|
-
|
|
1029
|
-
var L = e.charCodeAt(s +
|
|
1030
|
-
if (
|
|
1031
|
-
var R =
|
|
1026
|
+
var I = _t(e, s);
|
|
1027
|
+
Ct(e, s, I);
|
|
1028
|
+
var L = e.charCodeAt(s + St);
|
|
1029
|
+
if (xt < h && (L === y || L === S || L === C) && xt <= 3 && Dt(e, s)) break;
|
|
1030
|
+
var R = Mt(e, s, I);
|
|
1032
1031
|
if (R && R.ordered === a.ordered && R.marker === a.marker && R.markerCol < h) {
|
|
1033
1032
|
o.push({
|
|
1034
1033
|
contentCol: h,
|
|
1035
1034
|
raw: v,
|
|
1036
1035
|
hasBlankAfter: x,
|
|
1037
|
-
isEmpty:
|
|
1038
|
-
}), x && (
|
|
1036
|
+
isEmpty: b
|
|
1037
|
+
}), x && (T = !0), h = R.contentCol, b = R.isEmpty, x = !1, v = R.isEmpty ? "" : e.slice(R.contentStart, I) + "\n", s = $(e, I);
|
|
1039
1038
|
continue;
|
|
1040
1039
|
}
|
|
1041
|
-
if (
|
|
1040
|
+
if (wt(e, s, I)) {
|
|
1042
1041
|
v += "\n", s = $(e, I);
|
|
1043
1042
|
for (var ee = !1, te = 0; te < v.length; te++) {
|
|
1044
1043
|
var z = v.charCodeAt(te);
|
|
@@ -1047,31 +1046,31 @@ function Rt(e, t, n, r) {
|
|
|
1047
1046
|
break;
|
|
1048
1047
|
}
|
|
1049
1048
|
}
|
|
1050
|
-
if (
|
|
1051
|
-
var ne =
|
|
1049
|
+
if (b && !ee) if (s < e.length) {
|
|
1050
|
+
var ne = _t(e, s), re = Mt(e, s, ne);
|
|
1052
1051
|
if (!re || re.ordered !== a.ordered || re.marker !== a.marker) break;
|
|
1053
1052
|
x = !0;
|
|
1054
1053
|
} else break;
|
|
1055
1054
|
if (s < e.length) {
|
|
1056
|
-
var
|
|
1057
|
-
|
|
1058
|
-
var
|
|
1059
|
-
if ((
|
|
1060
|
-
var
|
|
1061
|
-
if (
|
|
1055
|
+
var ie = _t(e, s);
|
|
1056
|
+
Ct(e, s, ie);
|
|
1057
|
+
var ae = e.charCodeAt(s + St);
|
|
1058
|
+
if ((ae === y || ae === S || ae === C) && xt <= 3 && Dt(e, s)) break;
|
|
1059
|
+
var B = Mt(e, s, ie);
|
|
1060
|
+
if (B && B.ordered === a.ordered && B.marker === a.marker && B.markerCol < h) {
|
|
1062
1061
|
x = !0;
|
|
1063
1062
|
continue;
|
|
1064
1063
|
}
|
|
1065
|
-
if (!
|
|
1064
|
+
if (!wt(e, s, ie) && xt < h) break;
|
|
1066
1065
|
}
|
|
1067
1066
|
continue;
|
|
1068
1067
|
}
|
|
1069
|
-
if (
|
|
1070
|
-
var se =
|
|
1071
|
-
if (
|
|
1072
|
-
for (var ce = "", le = h, ue = 0; ue <
|
|
1068
|
+
if (xt >= h) {
|
|
1069
|
+
var se = Pt(e, s, I, h);
|
|
1070
|
+
if (Nt > 0) {
|
|
1071
|
+
for (var ce = "", le = h, ue = 0; ue < Nt; ue++) ce += " ", le++;
|
|
1073
1072
|
for (var de = se; de < I; de++) if (e.charCodeAt(de) === l) {
|
|
1074
|
-
for (var fe = 4 - le % 4,
|
|
1073
|
+
for (var fe = 4 - le % 4, U = 0; U < fe; U++) ce += " ";
|
|
1075
1074
|
le += fe;
|
|
1076
1075
|
} else ce += e[de], le++;
|
|
1077
1076
|
v += ce + "\n";
|
|
@@ -1079,16 +1078,16 @@ function Rt(e, t, n, r) {
|
|
|
1079
1078
|
s = $(e, I);
|
|
1080
1079
|
continue;
|
|
1081
1080
|
}
|
|
1082
|
-
for (var
|
|
1083
|
-
var me = v.charCodeAt(
|
|
1081
|
+
for (var W = !1, pe = 0; pe < v.length; pe++) {
|
|
1082
|
+
var me = v.charCodeAt(pe);
|
|
1084
1083
|
if (me !== d && me !== u && me !== c && me !== l) {
|
|
1085
|
-
|
|
1084
|
+
W = !0;
|
|
1086
1085
|
break;
|
|
1087
1086
|
}
|
|
1088
1087
|
}
|
|
1089
|
-
if (!x &&
|
|
1090
|
-
var he = s +
|
|
1091
|
-
if (!(
|
|
1088
|
+
if (!x && W && !b) {
|
|
1089
|
+
var he = s + St, G = e.charCodeAt(he);
|
|
1090
|
+
if (!(G === _ || G === g || G === w || G === f || G === p || (G === y || G === S || G === C || G === oe) && (Dt(e, s) !== null || Mt(e, s, I) !== null) || G >= V && G <= H && Mt(e, s, I) !== null)) {
|
|
1092
1091
|
v += "" + e.slice(he, I) + "\n", s = $(e, I);
|
|
1093
1092
|
continue;
|
|
1094
1093
|
}
|
|
@@ -1099,117 +1098,117 @@ function Rt(e, t, n, r) {
|
|
|
1099
1098
|
contentCol: h,
|
|
1100
1099
|
raw: v,
|
|
1101
1100
|
hasBlankAfter: x,
|
|
1102
|
-
isEmpty:
|
|
1101
|
+
isEmpty: b
|
|
1103
1102
|
}), o.length === 0) return null;
|
|
1104
|
-
var
|
|
1105
|
-
if (!
|
|
1106
|
-
if (o[
|
|
1107
|
-
|
|
1103
|
+
var ge = T;
|
|
1104
|
+
if (!ge) for (var _e = 0; _e < o.length; _e++) {
|
|
1105
|
+
if (o[_e].hasBlankAfter && _e < o.length - 1) {
|
|
1106
|
+
ge = !0;
|
|
1108
1107
|
break;
|
|
1109
1108
|
}
|
|
1110
|
-
if (!o[
|
|
1111
|
-
for (var
|
|
1112
|
-
var
|
|
1113
|
-
if (
|
|
1114
|
-
|
|
1115
|
-
for (var
|
|
1116
|
-
|
|
1109
|
+
if (!o[_e].isEmpty) {
|
|
1110
|
+
for (var q = o[_e].raw, J = q.length, Y = 0, ve = !1, ye = !1, be = !1, xe = !1, Se = 0, X = 0, Ce = -1; Y < J;) {
|
|
1111
|
+
var Z = q.indexOf("\n", Y);
|
|
1112
|
+
if (Z < 0 && (Z = J), xe) {
|
|
1113
|
+
Ct(q, Y, Z);
|
|
1114
|
+
for (var Q = q.slice(Y + St, Z), we = 0; we < Q.length && Q.charCodeAt(we) === Se;) we++;
|
|
1115
|
+
we >= X && Q.slice(we).trim() === "" && (xe = !1), Y = Z < J ? Z + 1 : J;
|
|
1117
1116
|
continue;
|
|
1118
1117
|
}
|
|
1119
|
-
if (
|
|
1120
|
-
|
|
1118
|
+
if (wt(q, Y, Z)) {
|
|
1119
|
+
Ce >= 0 ? be = !0 : ve && (ye = !0), Y = Z < J ? Z + 1 : J;
|
|
1121
1120
|
continue;
|
|
1122
1121
|
}
|
|
1123
|
-
if (
|
|
1124
|
-
if (
|
|
1125
|
-
|
|
1122
|
+
if (Ct(q, Y, Z), Ce >= 0) {
|
|
1123
|
+
if (xt >= Ce) {
|
|
1124
|
+
Y = Z < J ? Z + 1 : J;
|
|
1126
1125
|
continue;
|
|
1127
1126
|
}
|
|
1128
|
-
var
|
|
1129
|
-
if (
|
|
1130
|
-
|
|
1127
|
+
var Te = Mt(q, Y, Z);
|
|
1128
|
+
if (Te && Te.markerCol < Ce && Te.contentCol <= Ce) {
|
|
1129
|
+
Y = Z < J ? Z + 1 : J;
|
|
1131
1130
|
continue;
|
|
1132
1131
|
}
|
|
1133
|
-
if (
|
|
1134
|
-
|
|
1132
|
+
if (Te) {
|
|
1133
|
+
Y = Z < J ? Z + 1 : J;
|
|
1135
1134
|
continue;
|
|
1136
1135
|
}
|
|
1137
|
-
|
|
1136
|
+
Ce = -1, be &&= (ye = !0, !1);
|
|
1138
1137
|
}
|
|
1139
|
-
var
|
|
1140
|
-
if ((
|
|
1141
|
-
for (var
|
|
1142
|
-
if (
|
|
1143
|
-
if (
|
|
1144
|
-
|
|
1138
|
+
var Ee = q.slice(Y + St, Z), De = Ee.charCodeAt(0);
|
|
1139
|
+
if ((De === f || De === p) && xt <= 3) {
|
|
1140
|
+
for (var Oe = 0; Oe < Ee.length && Ee.charCodeAt(Oe) === De;) Oe++;
|
|
1141
|
+
if (Oe >= 3) {
|
|
1142
|
+
if (ye && ve) {
|
|
1143
|
+
ge = !0;
|
|
1145
1144
|
break;
|
|
1146
1145
|
}
|
|
1147
|
-
|
|
1146
|
+
xe = !0, Se = De, X = Oe, ve = !0, Y = Z < J ? Z + 1 : J;
|
|
1148
1147
|
continue;
|
|
1149
1148
|
}
|
|
1150
1149
|
}
|
|
1151
|
-
var
|
|
1152
|
-
if (
|
|
1153
|
-
if (
|
|
1154
|
-
|
|
1150
|
+
var ke = xt <= 3 ? Mt(q, Y, Z) : null;
|
|
1151
|
+
if (ke && ve) {
|
|
1152
|
+
if (ye) {
|
|
1153
|
+
ge = !0;
|
|
1155
1154
|
break;
|
|
1156
1155
|
}
|
|
1157
|
-
|
|
1156
|
+
Ce = ke.contentCol, be = !1, Y = Z < J ? Z + 1 : J, ve = !0;
|
|
1158
1157
|
continue;
|
|
1159
1158
|
}
|
|
1160
|
-
if (
|
|
1161
|
-
|
|
1159
|
+
if (ye) {
|
|
1160
|
+
ge = !0;
|
|
1162
1161
|
break;
|
|
1163
1162
|
}
|
|
1164
|
-
|
|
1165
|
-
}
|
|
1166
|
-
if (
|
|
1167
|
-
}
|
|
1168
|
-
}
|
|
1169
|
-
for (var
|
|
1170
|
-
for (var
|
|
1171
|
-
var
|
|
1172
|
-
if (
|
|
1173
|
-
var
|
|
1174
|
-
(
|
|
1175
|
-
type:
|
|
1176
|
-
completed:
|
|
1177
|
-
},
|
|
1178
|
-
}
|
|
1179
|
-
var
|
|
1180
|
-
if (
|
|
1181
|
-
else if (
|
|
1182
|
-
var
|
|
1183
|
-
n.inList = !0,
|
|
1163
|
+
ve = !0, Y = Z < J ? Z + 1 : J;
|
|
1164
|
+
}
|
|
1165
|
+
if (ge) break;
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
for (var Ae = [], je = 0; je < o.length; je++) {
|
|
1169
|
+
for (var Me = o[je], Ne = Me.raw, Pe = Ne.length; Pe > 0 && Ne.charCodeAt(Pe - 1) === d;) Pe--;
|
|
1170
|
+
var Fe = Pe < Ne.length ? Ne.slice(0, Pe) : Ne, Ie = null;
|
|
1171
|
+
if (Fe.length >= 3 && Fe.charCodeAt(0) === m) {
|
|
1172
|
+
var Le = Fe[1];
|
|
1173
|
+
(Le === " " || Le === "x" || Le === "X") && Fe.charCodeAt(2) === E && (Ie = {
|
|
1174
|
+
type: K.gfmTask,
|
|
1175
|
+
completed: Le === "x" || Le === "X"
|
|
1176
|
+
}, Fe = Fe.slice(3));
|
|
1177
|
+
}
|
|
1178
|
+
var Re;
|
|
1179
|
+
if (Me.isEmpty && Fe.trim() === "") Re = [];
|
|
1180
|
+
else if (ge) {
|
|
1181
|
+
var ze = n.inList;
|
|
1182
|
+
n.inList = !0, Re = yn(Fe, n, r), n.inList = ze;
|
|
1184
1183
|
} else {
|
|
1185
|
-
var
|
|
1186
|
-
if (n.inList = !0,
|
|
1184
|
+
var Be = n.inList;
|
|
1185
|
+
if (n.inList = !0, Re = yn(Fe, n, r), n.inList = Be, Re.length === 1 && Re[0].type === K.paragraph) Re = Re[0].children;
|
|
1187
1186
|
else {
|
|
1188
|
-
for (var
|
|
1189
|
-
else
|
|
1190
|
-
|
|
1187
|
+
for (var Ve = [], He = 0; He < Re.length; He++) if (Re[He].type === K.paragraph) for (var Ue = Re[He].children, We = 0; We < Ue.length; We++) Ve.push(Ue[We]);
|
|
1188
|
+
else Ve.push(Re[He]);
|
|
1189
|
+
Re = Ve;
|
|
1191
1190
|
}
|
|
1192
1191
|
}
|
|
1193
|
-
|
|
1194
|
-
|
|
1192
|
+
Ae.push(Ie ? [
|
|
1193
|
+
Ie,
|
|
1195
1194
|
{
|
|
1196
|
-
type:
|
|
1195
|
+
type: K.text,
|
|
1197
1196
|
text: " "
|
|
1198
1197
|
},
|
|
1199
|
-
...
|
|
1200
|
-
] :
|
|
1198
|
+
...Re
|
|
1199
|
+
] : Re);
|
|
1201
1200
|
}
|
|
1202
1201
|
return {
|
|
1203
1202
|
node: {
|
|
1204
|
-
type: a.ordered ?
|
|
1203
|
+
type: a.ordered ? K.orderedList : K.unorderedList,
|
|
1205
1204
|
start: a.ordered ? a.start : void 0,
|
|
1206
|
-
items:
|
|
1205
|
+
items: Ae
|
|
1207
1206
|
},
|
|
1208
1207
|
end: s
|
|
1209
1208
|
};
|
|
1210
1209
|
}
|
|
1211
|
-
var
|
|
1212
|
-
function
|
|
1210
|
+
var It = new Set(/* @__PURE__ */ "address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul".split("."));
|
|
1211
|
+
function Lt(e, t, n) {
|
|
1213
1212
|
let r = {};
|
|
1214
1213
|
for (let [o, s] of Object.entries(e)) {
|
|
1215
1214
|
let e = o, c = o.toLowerCase();
|
|
@@ -1217,7 +1216,7 @@ function Bt(e, t, n) {
|
|
|
1217
1216
|
let t = {}, n = [], i = 0, a = 0;
|
|
1218
1217
|
for (let e = 0; e < s.length; e++) {
|
|
1219
1218
|
let t = s.charCodeAt(e);
|
|
1220
|
-
t ===
|
|
1219
|
+
t === le ? i++ : t === ue ? i-- : t === te && i === 0 && (n.push(s.slice(a, e)), a = e + 1);
|
|
1221
1220
|
}
|
|
1222
1221
|
a < s.length && n.push(s.slice(a));
|
|
1223
1222
|
let o = !1;
|
|
@@ -1238,11 +1237,11 @@ function Bt(e, t, n) {
|
|
|
1238
1237
|
let i = n.sanitizer(s, t, c);
|
|
1239
1238
|
i !== null && (r[e] = i);
|
|
1240
1239
|
} else if (s === "") r[e] = !0;
|
|
1241
|
-
else if (s.length >= 2 && s.charCodeAt(0) ===
|
|
1240
|
+
else if (s.length >= 2 && s.charCodeAt(0) === se && s.charCodeAt(s.length - 1) === ce) {
|
|
1242
1241
|
var i = s.slice(1, -1);
|
|
1243
1242
|
if (i.length > 0) {
|
|
1244
1243
|
var a = i.charCodeAt(0);
|
|
1245
|
-
if (a === m || a ===
|
|
1244
|
+
if (a === m || a === se) try {
|
|
1246
1245
|
r[e] = JSON.parse(i);
|
|
1247
1246
|
continue;
|
|
1248
1247
|
} catch {}
|
|
@@ -1264,17 +1263,17 @@ function Bt(e, t, n) {
|
|
|
1264
1263
|
}
|
|
1265
1264
|
return r;
|
|
1266
1265
|
}
|
|
1267
|
-
function
|
|
1266
|
+
function Rt(e, t, n) {
|
|
1268
1267
|
let r = t.length;
|
|
1269
1268
|
var i = t.charCodeAt(0);
|
|
1270
|
-
i >= U && i <= W && (i +=
|
|
1269
|
+
i >= U && i <= W && (i += G);
|
|
1271
1270
|
for (let o = n; o <= e.length - r; o++) {
|
|
1272
1271
|
var a = e.charCodeAt(o);
|
|
1273
|
-
if (a >= U && a <= W && (a +=
|
|
1272
|
+
if (a >= U && a <= W && (a += G), a !== i) continue;
|
|
1274
1273
|
let n = !0;
|
|
1275
1274
|
for (let i = 1; i < r; i++) {
|
|
1276
1275
|
let r = e.charCodeAt(o + i), a = t.charCodeAt(i);
|
|
1277
|
-
if (r >= U && r <= W && (r +=
|
|
1276
|
+
if (r >= U && r <= W && (r += G), a >= U && a <= W && (a += G), r !== a) {
|
|
1278
1277
|
n = !1;
|
|
1279
1278
|
break;
|
|
1280
1279
|
}
|
|
@@ -1283,17 +1282,17 @@ function Vt(e, t, n) {
|
|
|
1283
1282
|
}
|
|
1284
1283
|
return -1;
|
|
1285
1284
|
}
|
|
1286
|
-
function
|
|
1285
|
+
function zt(e, t, n) {
|
|
1287
1286
|
let r = t.length;
|
|
1288
1287
|
var i = t.charCodeAt(0);
|
|
1289
|
-
i >= U && i <= W && (i +=
|
|
1288
|
+
i >= U && i <= W && (i += G);
|
|
1290
1289
|
for (let o = Math.min(n, e.length - r); o >= 0; o--) {
|
|
1291
1290
|
var a = e.charCodeAt(o);
|
|
1292
|
-
if (a >= U && a <= W && (a +=
|
|
1291
|
+
if (a >= U && a <= W && (a += G), a !== i) continue;
|
|
1293
1292
|
let n = !0;
|
|
1294
1293
|
for (let i = 1; i < r; i++) {
|
|
1295
1294
|
let r = e.charCodeAt(o + i), a = t.charCodeAt(i);
|
|
1296
|
-
if (r >= U && r <= W && (r +=
|
|
1295
|
+
if (r >= U && r <= W && (r += G), a >= U && a <= W && (a += G), r !== a) {
|
|
1297
1296
|
n = !1;
|
|
1298
1297
|
break;
|
|
1299
1298
|
}
|
|
@@ -1302,19 +1301,19 @@ function Ht(e, t, n) {
|
|
|
1302
1301
|
}
|
|
1303
1302
|
return -1;
|
|
1304
1303
|
}
|
|
1305
|
-
var
|
|
1306
|
-
function
|
|
1304
|
+
var Bt = -1;
|
|
1305
|
+
function Vt(e, t, n) {
|
|
1307
1306
|
let r = n.toLowerCase(), i = "<" + r, a = "</" + r, o = 1, s = t, u = e.length;
|
|
1308
|
-
for (
|
|
1309
|
-
let t =
|
|
1307
|
+
for (Bt = -1; s < u && o > 0;) {
|
|
1308
|
+
let t = Rt(e, i, s), n = Rt(e, a, s);
|
|
1310
1309
|
if (n === -1) return -1;
|
|
1311
1310
|
if (t !== -1 && t < n) {
|
|
1312
|
-
let n =
|
|
1313
|
-
n ? (n.tag.toLowerCase() === r && !n.isClosing && !n.selfClosing && !
|
|
1311
|
+
let n = ct(e, t);
|
|
1312
|
+
n ? (n.tag.toLowerCase() === r && !n.isClosing && !n.selfClosing && !we(n.tag) && o++, s = n.end) : s = t + 1;
|
|
1314
1313
|
} else {
|
|
1315
1314
|
var f = n + a.length, p = f < u ? e.charCodeAt(f) : 62;
|
|
1316
1315
|
if ((p === g || p === c || p === l || p === d) && (o--, o === 0)) {
|
|
1317
|
-
|
|
1316
|
+
Bt = n;
|
|
1318
1317
|
let t = n + a.length;
|
|
1319
1318
|
for (; t < u && e.charCodeAt(t) !== g;) t++;
|
|
1320
1319
|
return t + 1;
|
|
@@ -1324,23 +1323,23 @@ function Wt(e, t, n) {
|
|
|
1324
1323
|
}
|
|
1325
1324
|
return -1;
|
|
1326
1325
|
}
|
|
1327
|
-
function
|
|
1326
|
+
function Ht(e, t, n, r) {
|
|
1328
1327
|
if (r.ignoreHTMLBlocks || r.disableParsingRawHTML) return null;
|
|
1329
|
-
var i =
|
|
1330
|
-
if (
|
|
1331
|
-
var a = t +
|
|
1332
|
-
if (e.charCodeAt(a) !==
|
|
1328
|
+
var i = _t(e, t);
|
|
1329
|
+
if (Ct(e, t, i), xt > 3 && !n.inHTML) return null;
|
|
1330
|
+
var a = t + St;
|
|
1331
|
+
if (e.charCodeAt(a) !== w) return null;
|
|
1333
1332
|
var o = e.indexOf(">", a + 1);
|
|
1334
1333
|
if (o !== -1 && o < i) {
|
|
1335
1334
|
var s = e.slice(a + 1, o);
|
|
1336
1335
|
if (/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(s) || /^[^\s@]+@[^\s@]+$/.test(s)) return null;
|
|
1337
1336
|
}
|
|
1338
|
-
var u =
|
|
1337
|
+
var u = Ut(e, a);
|
|
1339
1338
|
if (u >= 1 && u <= 5) {
|
|
1340
1339
|
var f = e.length;
|
|
1341
1340
|
if (u === 1) {
|
|
1342
|
-
for (var p = e.length, m = 0; m <
|
|
1343
|
-
var h =
|
|
1341
|
+
for (var p = e.length, m = 0; m < Ze.length; m++) {
|
|
1342
|
+
var h = Rt(e, "</" + Ze[m] + ">", a);
|
|
1344
1343
|
h >= 0 && h < p && (p = h);
|
|
1345
1344
|
}
|
|
1346
1345
|
if (p < e.length) {
|
|
@@ -1354,8 +1353,9 @@ function Gt(e, t, n, r) {
|
|
|
1354
1353
|
var b = e.slice(a, f);
|
|
1355
1354
|
if (u >= 2) return {
|
|
1356
1355
|
node: {
|
|
1357
|
-
type:
|
|
1356
|
+
type: K.htmlComment,
|
|
1358
1357
|
text: b,
|
|
1358
|
+
h: !1,
|
|
1359
1359
|
raw: !0,
|
|
1360
1360
|
endPos: f
|
|
1361
1361
|
},
|
|
@@ -1363,9 +1363,9 @@ function Gt(e, t, n, r) {
|
|
|
1363
1363
|
};
|
|
1364
1364
|
var x = "div", S = b.match(/^<\/?([a-zA-Z][a-zA-Z0-9-]*)/);
|
|
1365
1365
|
S && (x = S[1]);
|
|
1366
|
-
var C =
|
|
1367
|
-
C && !C.isClosing && (
|
|
1368
|
-
var D = [], O =
|
|
1366
|
+
var C = ct(e, a), T = {}, E;
|
|
1367
|
+
C && !C.isClosing && (T = Lt(C.attrs, x, r), E = C.whitespaceBeforeAttrs + C.rawAttrs);
|
|
1368
|
+
var D = [], O = Rt(b, "</" + x.toLowerCase(), 0), k = b, A = "";
|
|
1369
1369
|
if (C && C.isClosing) for (k = b.slice(C.end - a); k.length > 0 && k.charCodeAt(k.length - 1) === d;) k = k.slice(0, -1);
|
|
1370
1370
|
else if (C && !C.isClosing) {
|
|
1371
1371
|
var j = C.end - a;
|
|
@@ -1375,30 +1375,30 @@ function Gt(e, t, n, r) {
|
|
|
1375
1375
|
}
|
|
1376
1376
|
return {
|
|
1377
1377
|
node: {
|
|
1378
|
-
type:
|
|
1378
|
+
type: K.htmlBlock,
|
|
1379
1379
|
tag: x,
|
|
1380
|
-
attrs:
|
|
1381
|
-
|
|
1380
|
+
attrs: T,
|
|
1381
|
+
f: E,
|
|
1382
1382
|
children: D,
|
|
1383
1383
|
a: k,
|
|
1384
1384
|
text: A,
|
|
1385
1385
|
c: !0,
|
|
1386
1386
|
b: C ? C.isClosing : !1,
|
|
1387
1387
|
endPos: f,
|
|
1388
|
-
|
|
1388
|
+
e: !0
|
|
1389
1389
|
},
|
|
1390
1390
|
end: f
|
|
1391
1391
|
};
|
|
1392
1392
|
}
|
|
1393
1393
|
if (u === 6 || u === 7) {
|
|
1394
|
-
var M =
|
|
1394
|
+
var M = yt(e, t), N = M < e.length ? M : e.length, P = e.slice(a, N), F = M < e.length ? $(e, M) : e.length, I = ct(e, a);
|
|
1395
1395
|
if (I) {
|
|
1396
1396
|
var L = I.tag, R = L.toLowerCase();
|
|
1397
1397
|
if (I.isClosing) {
|
|
1398
1398
|
var ee = e.slice(I.end, N);
|
|
1399
1399
|
return {
|
|
1400
1400
|
node: {
|
|
1401
|
-
type:
|
|
1401
|
+
type: K.htmlBlock,
|
|
1402
1402
|
tag: L,
|
|
1403
1403
|
attrs: {},
|
|
1404
1404
|
children: [],
|
|
@@ -1407,287 +1407,287 @@ function Gt(e, t, n, r) {
|
|
|
1407
1407
|
c: !0,
|
|
1408
1408
|
b: !0,
|
|
1409
1409
|
endPos: N,
|
|
1410
|
-
|
|
1410
|
+
e: u === 6
|
|
1411
1411
|
},
|
|
1412
1412
|
end: F
|
|
1413
1413
|
};
|
|
1414
1414
|
}
|
|
1415
|
-
if (I.selfClosing ||
|
|
1415
|
+
if (I.selfClosing || we(L)) return {
|
|
1416
1416
|
node: {
|
|
1417
|
-
type:
|
|
1417
|
+
type: K.htmlBlock,
|
|
1418
1418
|
tag: L,
|
|
1419
|
-
attrs:
|
|
1420
|
-
|
|
1419
|
+
attrs: Lt(I.attrs, L, r),
|
|
1420
|
+
f: I.whitespaceBeforeAttrs + I.rawAttrs,
|
|
1421
1421
|
children: [],
|
|
1422
1422
|
a: "",
|
|
1423
1423
|
text: "",
|
|
1424
1424
|
c: !1,
|
|
1425
1425
|
b: !1,
|
|
1426
1426
|
endPos: I.end,
|
|
1427
|
-
|
|
1427
|
+
e: u === 6
|
|
1428
1428
|
},
|
|
1429
1429
|
end: $(e, I.end)
|
|
1430
1430
|
};
|
|
1431
|
-
var te = n.d || 0, z = e.slice(a, N), ne = -1,
|
|
1431
|
+
var te = n.d || 0, z = e.slice(a, N), ne = -1, ie = -1;
|
|
1432
1432
|
if (te < 10) {
|
|
1433
|
-
for (var
|
|
1434
|
-
var ce =
|
|
1433
|
+
for (var ae = "</" + R, oe = I.end - a, B = 1, se = oe; se < z.length && B > 0;) {
|
|
1434
|
+
var ce = Rt(z, "<" + R, se), le = Rt(z, ae, se);
|
|
1435
1435
|
if (le === -1) break;
|
|
1436
1436
|
if (ce !== -1 && ce < le) {
|
|
1437
1437
|
var ue = ce + R.length + 1;
|
|
1438
1438
|
if (ue < z.length) {
|
|
1439
1439
|
var de = z.charCodeAt(ue);
|
|
1440
|
-
(de === c || de === l || de === d || de === g || de ===
|
|
1440
|
+
(de === c || de === l || de === d || de === g || de === re) && B++;
|
|
1441
1441
|
}
|
|
1442
1442
|
se = ce + 1;
|
|
1443
1443
|
} else {
|
|
1444
|
-
var fe = le +
|
|
1444
|
+
var fe = le + ae.length;
|
|
1445
1445
|
if (fe < z.length) {
|
|
1446
|
-
var
|
|
1447
|
-
if ((
|
|
1446
|
+
var V = z.charCodeAt(fe);
|
|
1447
|
+
if ((V === g || V === c || V === l || V === d) && (B--, B === 0)) {
|
|
1448
1448
|
ne = le;
|
|
1449
|
-
for (var
|
|
1450
|
-
|
|
1449
|
+
for (var H = fe; H < z.length && z.charCodeAt(H) !== g;) H++;
|
|
1450
|
+
ie = H + 1;
|
|
1451
1451
|
break;
|
|
1452
1452
|
}
|
|
1453
|
-
} else if (
|
|
1454
|
-
ne = le,
|
|
1453
|
+
} else if (B--, B === 0) {
|
|
1454
|
+
ne = le, ie = z.length;
|
|
1455
1455
|
break;
|
|
1456
1456
|
}
|
|
1457
1457
|
se = le + 1;
|
|
1458
1458
|
}
|
|
1459
1459
|
}
|
|
1460
|
-
var
|
|
1461
|
-
if (ne === -1 && u === 6 && !I.isClosing && !
|
|
1462
|
-
var me =
|
|
1460
|
+
var pe = !1;
|
|
1461
|
+
if (ne === -1 && u === 6 && !I.isClosing && !nt.has(R)) {
|
|
1462
|
+
var me = Vt(e, I.end, R);
|
|
1463
1463
|
if (me !== -1) {
|
|
1464
|
-
var he =
|
|
1464
|
+
var he = Bt;
|
|
1465
1465
|
if (e.substring(I.end, he).indexOf("\n\n") !== -1) {
|
|
1466
|
-
var
|
|
1467
|
-
N =
|
|
1466
|
+
var G = _t(e, me);
|
|
1467
|
+
N = G, F = $(e, G), z = e.slice(a, N), P = e.slice(a, N), ne = he - a, ie = me - a, pe = !0;
|
|
1468
1468
|
}
|
|
1469
1469
|
}
|
|
1470
1470
|
}
|
|
1471
1471
|
}
|
|
1472
|
-
var
|
|
1473
|
-
ne !== -1 && (
|
|
1474
|
-
var
|
|
1472
|
+
var ge = I.rawAttrs.indexOf("\n") !== -1 || I.whitespaceBeforeAttrs.indexOf("\n") !== -1, _e = !1;
|
|
1473
|
+
ne !== -1 && (_e = z.slice(ie).trim().length === 0);
|
|
1474
|
+
var q = !1, J = N, Y = F;
|
|
1475
1475
|
if (ne !== -1) {
|
|
1476
|
-
var
|
|
1477
|
-
if (
|
|
1478
|
-
for (var
|
|
1479
|
-
if (
|
|
1480
|
-
var
|
|
1481
|
-
|
|
1476
|
+
var ve = a + ie, ye = _t(e, ve - 1);
|
|
1477
|
+
if (ve < ye) {
|
|
1478
|
+
for (var be = ve; be < ye && (e.charCodeAt(be) === c || e.charCodeAt(be) === l);) be++;
|
|
1479
|
+
if (be < ye && e.charCodeAt(be) === w) {
|
|
1480
|
+
var xe = ct(e, be);
|
|
1481
|
+
xe && !xe.isClosing && (q = !0, J = ve, Y = ve, _e = !0);
|
|
1482
1482
|
}
|
|
1483
1483
|
}
|
|
1484
|
-
if (!
|
|
1485
|
-
var
|
|
1486
|
-
if (
|
|
1487
|
-
for (var
|
|
1488
|
-
|
|
1484
|
+
if (!q) {
|
|
1485
|
+
var Se = $(e, ye);
|
|
1486
|
+
if (Se < N) {
|
|
1487
|
+
for (var X = Se; X < N && (e.charCodeAt(X) === c || e.charCodeAt(X) === l);) X++;
|
|
1488
|
+
X < N && e.charCodeAt(X) === w && ct(e, X) && (q = !0, J = ye, Y = Se, _e = !0);
|
|
1489
1489
|
}
|
|
1490
1490
|
}
|
|
1491
|
-
!
|
|
1491
|
+
!q && n.inHTML && (q = !0, J = ye, Y = $(e, ye), _e = e.slice(ve, ye).trim().length === 0);
|
|
1492
1492
|
}
|
|
1493
|
-
var
|
|
1493
|
+
var Ce = [], Z = "";
|
|
1494
1494
|
if (ne !== -1) {
|
|
1495
|
-
|
|
1496
|
-
var
|
|
1497
|
-
if (
|
|
1498
|
-
var { inline:
|
|
1499
|
-
if (n.inHTML = !0, n.d = te + 1, R === "p") n.inline = !0,
|
|
1495
|
+
Z = z.slice(I.end - a, ne);
|
|
1496
|
+
var Q = Z.trim();
|
|
1497
|
+
if (Q) {
|
|
1498
|
+
var { inline: Te, inHTML: Ee, d: De } = n;
|
|
1499
|
+
if (n.inHTML = !0, n.d = te + 1, R === "p") n.inline = !0, Ce = _n(Q, 0, Q.length, n, r);
|
|
1500
1500
|
else {
|
|
1501
|
-
var
|
|
1502
|
-
|
|
1501
|
+
var Oe = Z.indexOf("\n\n") !== -1, ke = et.test(Q), Ae = tt.test(Q);
|
|
1502
|
+
Oe || ke || n.inHTML && Ae || Ae ? (n.inline = !1, Ce = yn(Z, n, r)) : (n.inline = !0, Ce = _n(Q, 0, Q.length, n, r));
|
|
1503
1503
|
}
|
|
1504
|
-
n.inline =
|
|
1504
|
+
n.inline = Te, n.inHTML = Ee, n.d = De;
|
|
1505
1505
|
}
|
|
1506
1506
|
}
|
|
1507
|
-
var
|
|
1508
|
-
if (u === 6 && ne !== -1 && !n.inHTML && !
|
|
1509
|
-
var
|
|
1510
|
-
|
|
1511
|
-
}
|
|
1512
|
-
if (n.inHTML || u === 7 ||
|
|
1513
|
-
var
|
|
1514
|
-
if (ne !== -1 &&
|
|
1515
|
-
var
|
|
1516
|
-
if (n.inHTML &&
|
|
1517
|
-
for (var
|
|
1518
|
-
var
|
|
1519
|
-
|
|
1507
|
+
var je = !1;
|
|
1508
|
+
if (u === 6 && ne !== -1 && !n.inHTML && !ge) {
|
|
1509
|
+
var Me = Z, Ne = /<[a-zA-Z][^>]*>/.test(Me), Pe = /\n\n/.test(Me) || /^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m.test(Me);
|
|
1510
|
+
Ne && !Pe && (je = !0);
|
|
1511
|
+
}
|
|
1512
|
+
if (n.inHTML || u === 7 || ge || !_e || je) {
|
|
1513
|
+
var Fe;
|
|
1514
|
+
if (ne !== -1 && q) {
|
|
1515
|
+
var Ie = !1;
|
|
1516
|
+
if (n.inHTML && ie < z.length) {
|
|
1517
|
+
for (var Le = ie; Le < z.length && z.charCodeAt(Le) !== d;) Le++;
|
|
1518
|
+
var Re = z.slice(ie, Le).trim();
|
|
1519
|
+
Ie = Re.length > 1 && Re.charCodeAt(0) === w && Re.charCodeAt(1) !== re;
|
|
1520
1520
|
}
|
|
1521
|
-
|
|
1522
|
-
} else (u === 7 || n.inHTML) && ne !== -1 ? (
|
|
1521
|
+
Fe = Ie ? z.slice(I.end - a) : Z;
|
|
1522
|
+
} else (u === 7 || n.inHTML) && ne !== -1 ? (Fe = z.slice(I.end - a), Fe.charCodeAt(0) === d && (Fe = Fe.slice(1))) : q ? Fe = e.slice(a, J) : ge ? Fe = P : (Fe = z.slice(I.end - a), Fe.charCodeAt(0) === d && (Fe = Fe.slice(1)));
|
|
1523
1523
|
return {
|
|
1524
1524
|
node: {
|
|
1525
|
-
type:
|
|
1525
|
+
type: K.htmlBlock,
|
|
1526
1526
|
tag: L,
|
|
1527
|
-
attrs:
|
|
1528
|
-
|
|
1529
|
-
children:
|
|
1530
|
-
a:
|
|
1531
|
-
text:
|
|
1527
|
+
attrs: Lt(I.attrs, L, r),
|
|
1528
|
+
f: I.whitespaceBeforeAttrs + I.rawAttrs,
|
|
1529
|
+
children: Ce,
|
|
1530
|
+
a: Fe,
|
|
1531
|
+
text: Fe,
|
|
1532
1532
|
c: !0,
|
|
1533
1533
|
b: !1,
|
|
1534
|
-
endPos:
|
|
1535
|
-
|
|
1534
|
+
endPos: J,
|
|
1535
|
+
e: u === 6
|
|
1536
1536
|
},
|
|
1537
|
-
end:
|
|
1537
|
+
end: Y
|
|
1538
1538
|
};
|
|
1539
1539
|
}
|
|
1540
1540
|
return {
|
|
1541
1541
|
node: {
|
|
1542
|
-
type:
|
|
1542
|
+
type: K.htmlBlock,
|
|
1543
1543
|
tag: L,
|
|
1544
|
-
attrs:
|
|
1545
|
-
|
|
1546
|
-
children:
|
|
1547
|
-
a:
|
|
1548
|
-
text:
|
|
1544
|
+
attrs: Lt(I.attrs, L, r),
|
|
1545
|
+
f: I.whitespaceBeforeAttrs + I.rawAttrs,
|
|
1546
|
+
children: Ce,
|
|
1547
|
+
a: pe ? "" : Z,
|
|
1548
|
+
text: Z,
|
|
1549
1549
|
c: !1,
|
|
1550
1550
|
b: !1,
|
|
1551
|
-
endPos:
|
|
1552
|
-
|
|
1551
|
+
endPos: J,
|
|
1552
|
+
e: u === 6
|
|
1553
1553
|
},
|
|
1554
|
-
end:
|
|
1554
|
+
end: Y
|
|
1555
1555
|
};
|
|
1556
1556
|
}
|
|
1557
|
-
var
|
|
1558
|
-
if (
|
|
1559
|
-
var
|
|
1560
|
-
|
|
1557
|
+
var ze = P.match(/^<(\/?)([a-zA-Z][a-zA-Z0-9-]*)/), Be = ze ? ze[2] : "div", Ve = ze ? ze[1] === "/" : !1, He = P;
|
|
1558
|
+
if (Ve) {
|
|
1559
|
+
var Ue = P.indexOf(">");
|
|
1560
|
+
Ue !== -1 && (He = P.slice(Ue + 1));
|
|
1561
1561
|
}
|
|
1562
1562
|
return {
|
|
1563
1563
|
node: {
|
|
1564
|
-
type:
|
|
1565
|
-
tag:
|
|
1564
|
+
type: K.htmlBlock,
|
|
1565
|
+
tag: Be,
|
|
1566
1566
|
attrs: {},
|
|
1567
1567
|
children: [],
|
|
1568
|
-
a:
|
|
1569
|
-
text:
|
|
1568
|
+
a: He,
|
|
1569
|
+
text: He,
|
|
1570
1570
|
c: !0,
|
|
1571
|
-
b:
|
|
1571
|
+
b: Ve,
|
|
1572
1572
|
endPos: N,
|
|
1573
|
-
|
|
1573
|
+
e: u === 6
|
|
1574
1574
|
},
|
|
1575
1575
|
end: F
|
|
1576
1576
|
};
|
|
1577
1577
|
}
|
|
1578
|
-
var
|
|
1579
|
-
if (!
|
|
1580
|
-
var
|
|
1581
|
-
if (!
|
|
1582
|
-
if (
|
|
1578
|
+
var We = ct(e, a);
|
|
1579
|
+
if (!We) return null;
|
|
1580
|
+
var Ge = We.tag, Ke = Ge.toLowerCase(), qe = Ge.charCodeAt(0), Je = qe >= U && qe <= W;
|
|
1581
|
+
if (!Je && !It.has(Ke) && !Qe.has(Ke) && !Ke.includes("-")) return null;
|
|
1582
|
+
if (We.isClosing) return {
|
|
1583
1583
|
node: {
|
|
1584
|
-
type:
|
|
1585
|
-
tag:
|
|
1584
|
+
type: K.htmlSelfClosing,
|
|
1585
|
+
tag: Ge,
|
|
1586
1586
|
attrs: {},
|
|
1587
|
-
|
|
1587
|
+
a: e.slice(a, We.end),
|
|
1588
1588
|
b: !0,
|
|
1589
|
-
|
|
1589
|
+
endPos: We.end
|
|
1590
1590
|
},
|
|
1591
|
-
end:
|
|
1591
|
+
end: We.end
|
|
1592
1592
|
};
|
|
1593
|
-
var
|
|
1594
|
-
if (
|
|
1595
|
-
var
|
|
1593
|
+
var Ye = Vt(e, We.end, Ge), Xe = [];
|
|
1594
|
+
if (Ye !== -1) {
|
|
1595
|
+
var $e = e.slice(We.end, Bt), rt = $e.trim();
|
|
1596
1596
|
if (rt) {
|
|
1597
|
-
var it =
|
|
1598
|
-
n.inHTML = !0, n.d = (n.d || 0) + 1, it || at || ot ? (n.inline = !1,
|
|
1597
|
+
var it = $e.indexOf("\n\n") !== -1, at = et.test(rt), ot = tt.test(rt), st = n.inline, lt = n.inHTML, ut = n.d;
|
|
1598
|
+
n.inHTML = !0, n.d = (n.d || 0) + 1, it || at || ot ? (n.inline = !1, Xe = yn($e, n, r)) : (n.inline = !0, Xe = _n(rt, 0, rt.length, n, r)), n.inline = st, n.inHTML = lt, n.d = ut;
|
|
1599
1599
|
}
|
|
1600
|
-
var dt =
|
|
1600
|
+
var dt = _t(e, Ye), ft = e.slice(Ye, dt).trim() ? Ye : $(e, Ye), pt = Je ? e.slice(a, Ye) : e.slice(a, ft), mt = Je ? Ye : ft;
|
|
1601
1601
|
return {
|
|
1602
1602
|
node: {
|
|
1603
|
-
type:
|
|
1604
|
-
tag:
|
|
1605
|
-
attrs:
|
|
1606
|
-
|
|
1607
|
-
children:
|
|
1608
|
-
a:
|
|
1609
|
-
text:
|
|
1603
|
+
type: K.htmlBlock,
|
|
1604
|
+
tag: Ge,
|
|
1605
|
+
attrs: Lt(We.attrs, Ge, r),
|
|
1606
|
+
f: We.whitespaceBeforeAttrs + We.rawAttrs,
|
|
1607
|
+
children: Xe,
|
|
1608
|
+
a: pt,
|
|
1609
|
+
text: Je ? $e : pt,
|
|
1610
1610
|
c: !0,
|
|
1611
1611
|
b: !1,
|
|
1612
|
-
endPos:
|
|
1613
|
-
|
|
1612
|
+
endPos: mt,
|
|
1613
|
+
e: !1
|
|
1614
1614
|
},
|
|
1615
|
-
end:
|
|
1615
|
+
end: ft
|
|
1616
1616
|
};
|
|
1617
1617
|
}
|
|
1618
|
-
var
|
|
1619
|
-
if (
|
|
1620
|
-
var { inline:
|
|
1621
|
-
n.inline = !1, n.inHTML = !0, n.d = (n.d || 0) + 1,
|
|
1618
|
+
var ht = yt(e, We.end), gt = ht < e.length ? $(e, ht) : ht, vt = e.slice(We.end, ht);
|
|
1619
|
+
if (vt.trim()) {
|
|
1620
|
+
var { inline: bt, inHTML: wt, d: Tt } = n;
|
|
1621
|
+
n.inline = !1, n.inHTML = !0, n.d = (n.d || 0) + 1, Xe = yn(vt, n, r), n.inline = bt, n.inHTML = wt, n.d = Tt;
|
|
1622
1622
|
}
|
|
1623
|
-
var
|
|
1623
|
+
var Et = e.slice(We.end, ht);
|
|
1624
1624
|
return {
|
|
1625
1625
|
node: {
|
|
1626
|
-
type:
|
|
1627
|
-
tag:
|
|
1628
|
-
attrs:
|
|
1629
|
-
|
|
1630
|
-
children:
|
|
1631
|
-
a:
|
|
1632
|
-
text:
|
|
1626
|
+
type: K.htmlBlock,
|
|
1627
|
+
tag: Ge,
|
|
1628
|
+
attrs: Lt(We.attrs, Ge, r),
|
|
1629
|
+
f: We.whitespaceBeforeAttrs + We.rawAttrs,
|
|
1630
|
+
children: Xe,
|
|
1631
|
+
a: Et,
|
|
1632
|
+
text: vt,
|
|
1633
1633
|
c: !0,
|
|
1634
1634
|
b: !1,
|
|
1635
|
-
endPos:
|
|
1636
|
-
|
|
1635
|
+
endPos: ht,
|
|
1636
|
+
e: !1
|
|
1637
1637
|
},
|
|
1638
|
-
end:
|
|
1638
|
+
end: gt
|
|
1639
1639
|
};
|
|
1640
1640
|
}
|
|
1641
|
-
function
|
|
1642
|
-
if (e.charCodeAt(t) !==
|
|
1641
|
+
function Ut(e, t) {
|
|
1642
|
+
if (e.charCodeAt(t) !== w) return 0;
|
|
1643
1643
|
var n = t + 1, r = e.length;
|
|
1644
|
-
if (e.charCodeAt(n) ===
|
|
1645
|
-
if (e.charCodeAt(n) ===
|
|
1646
|
-
if (e.charCodeAt(n) ===
|
|
1644
|
+
if (e.charCodeAt(n) === D && e.charCodeAt(n + 1) === y && e.charCodeAt(n + 2) === y) return 2;
|
|
1645
|
+
if (e.charCodeAt(n) === z) return 3;
|
|
1646
|
+
if (e.charCodeAt(n) === D) {
|
|
1647
1647
|
var i = e.charCodeAt(n + 1);
|
|
1648
1648
|
if (i >= U && i <= W) return 4;
|
|
1649
1649
|
if (e.slice(n + 1, n + 8) === "[CDATA[") return 5;
|
|
1650
1650
|
}
|
|
1651
|
-
for (var a = e.charCodeAt(n) ===
|
|
1651
|
+
for (var a = e.charCodeAt(n) === re, o = a ? n + 1 : n, s = o; s < r;) {
|
|
1652
1652
|
var u = e.charCodeAt(s);
|
|
1653
|
-
if (u >= U && u <= W || u >=
|
|
1653
|
+
if (u >= U && u <= W || u >= pe && u <= me || u >= V && u <= H || u === y) s++;
|
|
1654
1654
|
else break;
|
|
1655
1655
|
}
|
|
1656
1656
|
if (s === o) return 0;
|
|
1657
1657
|
var f = e.slice(o, s);
|
|
1658
|
-
if (
|
|
1658
|
+
if (Qe.has(f.toLowerCase())) {
|
|
1659
1659
|
if (a) return 0;
|
|
1660
1660
|
var p = e.charCodeAt(s);
|
|
1661
1661
|
return p === c || p === l || p === g || p === d || s >= r ? 1 : 0;
|
|
1662
1662
|
}
|
|
1663
|
-
if (
|
|
1663
|
+
if (It.has(f.toLowerCase())) {
|
|
1664
1664
|
if (a) {
|
|
1665
1665
|
for (var m = s; m < r && (e.charCodeAt(m) === c || e.charCodeAt(m) === l);) m++;
|
|
1666
1666
|
return m < r && e.charCodeAt(m) === g ? 6 : 0;
|
|
1667
1667
|
}
|
|
1668
1668
|
var h = s < r ? e.charCodeAt(s) : -1;
|
|
1669
|
-
return h === c || h === l || h === g || h === d || h ===
|
|
1669
|
+
return h === c || h === l || h === g || h === d || h === re || h === -1 ? 6 : 0;
|
|
1670
1670
|
}
|
|
1671
1671
|
if (a) {
|
|
1672
1672
|
for (var _ = s; _ < r && (e.charCodeAt(_) === c || e.charCodeAt(_) === l);) _++;
|
|
1673
1673
|
if (_ < r && e.charCodeAt(_) === g) {
|
|
1674
|
-
var v =
|
|
1674
|
+
var v = _t(e, t);
|
|
1675
1675
|
if (e.slice(_ + 1, v).trim() === "") return 7;
|
|
1676
1676
|
}
|
|
1677
1677
|
} else {
|
|
1678
|
-
var
|
|
1679
|
-
if (x && x.end <=
|
|
1678
|
+
var b = _t(e, t), x = ct(e, t);
|
|
1679
|
+
if (x && x.end <= b && e.slice(x.end, b).trim() === "") return 7;
|
|
1680
1680
|
}
|
|
1681
1681
|
return 0;
|
|
1682
1682
|
}
|
|
1683
|
-
function
|
|
1683
|
+
function Wt(e, t, n) {
|
|
1684
1684
|
for (var r = 0, i = e.length; r < i && (e.charCodeAt(r) === c || e.charCodeAt(r) === l);) r++;
|
|
1685
1685
|
for (; i > r && (e.charCodeAt(i - 1) === c || e.charCodeAt(i - 1) === l);) i--;
|
|
1686
|
-
r < i && e.charCodeAt(r) ===
|
|
1686
|
+
r < i && e.charCodeAt(r) === B && r++, i > r && e.charCodeAt(i - 1) === B && (i - 2 < r || e.charCodeAt(i - 2) !== x) && i--;
|
|
1687
1687
|
for (var a = [], o = r, s = !1, u = [], d = r; d < i;) {
|
|
1688
1688
|
var p = e.charCodeAt(d);
|
|
1689
|
-
if (p ===
|
|
1690
|
-
e.charCodeAt(d + 1) ===
|
|
1689
|
+
if (p === x && d + 1 < i) {
|
|
1690
|
+
e.charCodeAt(d + 1) === B ? (s || (s = !0, u = []), u.push(e.slice(o, d)), u.push("|"), d += 2, o = d) : d += 2;
|
|
1691
1691
|
continue;
|
|
1692
1692
|
}
|
|
1693
1693
|
if (p === f) {
|
|
@@ -1698,7 +1698,7 @@ function qt(e, t, n) {
|
|
|
1698
1698
|
}
|
|
1699
1699
|
continue;
|
|
1700
1700
|
}
|
|
1701
|
-
if (p ===
|
|
1701
|
+
if (p === B) {
|
|
1702
1702
|
var _ = s ? (u.push(e.slice(o, d)), u.join("")) : e.slice(o, d);
|
|
1703
1703
|
a.push(_.trim()), d++, o = d, s = !1, u = [];
|
|
1704
1704
|
continue;
|
|
@@ -1708,89 +1708,89 @@ function qt(e, t, n) {
|
|
|
1708
1708
|
var v = s ? (u.push(e.slice(o, i)), u.join("")) : e.slice(o, i);
|
|
1709
1709
|
return a.push(v.trim()), a.map(function(e) {
|
|
1710
1710
|
var r = e.indexOf("\\|") === -1 ? e : e.replace(/\\\|/g, "|");
|
|
1711
|
-
return
|
|
1711
|
+
return _n(r, 0, r.length, t, n);
|
|
1712
1712
|
});
|
|
1713
1713
|
}
|
|
1714
|
-
function
|
|
1715
|
-
let i =
|
|
1714
|
+
function Gt(e, t, n, r) {
|
|
1715
|
+
let i = _t(e, t);
|
|
1716
1716
|
var a = e.indexOf("|", t);
|
|
1717
1717
|
if (a < 0 || a >= i) return null;
|
|
1718
1718
|
let o = $(e, i);
|
|
1719
1719
|
if (o >= e.length) return null;
|
|
1720
|
-
let s =
|
|
1721
|
-
if (!
|
|
1720
|
+
let s = _t(e, o);
|
|
1721
|
+
if (!st(e, o, s)) return null;
|
|
1722
1722
|
let u = e.slice(t, i), d = e.slice(o, s);
|
|
1723
1723
|
for (var m = [], h = 0, v = d.length; h < v && (d.charCodeAt(h) === c || d.charCodeAt(h) === l);) h++;
|
|
1724
|
-
for (h < v && d.charCodeAt(h) ===
|
|
1724
|
+
for (h < v && d.charCodeAt(h) === B && h++; h < v;) {
|
|
1725
1725
|
for (; h < v && (d.charCodeAt(h) === c || d.charCodeAt(h) === l);) h++;
|
|
1726
|
-
if (h >= v || d.charCodeAt(h) ===
|
|
1727
|
-
var
|
|
1728
|
-
for (
|
|
1729
|
-
var x = h < v && d.charCodeAt(h) ===
|
|
1730
|
-
for (x && h++, m.push(
|
|
1731
|
-
h < v && d.charCodeAt(h) ===
|
|
1732
|
-
}
|
|
1733
|
-
let
|
|
1734
|
-
if (m.length !==
|
|
1726
|
+
if (h >= v || d.charCodeAt(h) === B) break;
|
|
1727
|
+
var b = d.charCodeAt(h) === k;
|
|
1728
|
+
for (b && h++; h < v && d.charCodeAt(h) === y;) h++;
|
|
1729
|
+
var x = h < v && d.charCodeAt(h) === k;
|
|
1730
|
+
for (x && h++, m.push(b && x ? "center" : x ? "right" : b ? "left" : null); h < v && (d.charCodeAt(h) === c || d.charCodeAt(h) === l);) h++;
|
|
1731
|
+
h < v && d.charCodeAt(h) === B && h++;
|
|
1732
|
+
}
|
|
1733
|
+
let w = Wt(u, n, r);
|
|
1734
|
+
if (m.length !== w.length) return null;
|
|
1735
1735
|
let T = [], E = $(e, s);
|
|
1736
1736
|
for (; E < e.length;) {
|
|
1737
|
-
let t =
|
|
1738
|
-
if (
|
|
1739
|
-
if (
|
|
1740
|
-
var D = e.charCodeAt(E +
|
|
1741
|
-
if (D === g || D === _ || (D ===
|
|
1737
|
+
let t = _t(e, E), i = e.slice(E, t);
|
|
1738
|
+
if (wt(e, E, t)) break;
|
|
1739
|
+
if (Ct(e, E, t), xt < 4) {
|
|
1740
|
+
var D = e.charCodeAt(E + St);
|
|
1741
|
+
if (D === g || D === _ || (D === y || D === S || D === C) && Dt(e, E)) break;
|
|
1742
1742
|
if (D === f || D === p) {
|
|
1743
|
-
for (var O = E +
|
|
1744
|
-
if (
|
|
1743
|
+
for (var O = E + St, A = 0; O < t && e.charCodeAt(O) === D;) A++, O++;
|
|
1744
|
+
if (A >= 3) break;
|
|
1745
1745
|
}
|
|
1746
1746
|
}
|
|
1747
|
-
T.push(
|
|
1747
|
+
T.push(Wt(i, n, r)), E = $(e, t);
|
|
1748
1748
|
}
|
|
1749
1749
|
if ((r.streaming || r.optimizeForStreaming) && T.length === 0) return null;
|
|
1750
|
-
for (var j =
|
|
1750
|
+
for (var j = w.length, M = 0; M < T.length; M++) if (T[M].length < j) for (; T[M].length < j;) T[M].push([]);
|
|
1751
1751
|
else T[M].length > j && (T[M].length = j);
|
|
1752
1752
|
return {
|
|
1753
1753
|
node: {
|
|
1754
|
-
type:
|
|
1755
|
-
header:
|
|
1754
|
+
type: K.table,
|
|
1755
|
+
header: w,
|
|
1756
1756
|
cells: T,
|
|
1757
1757
|
align: m
|
|
1758
1758
|
},
|
|
1759
1759
|
end: E
|
|
1760
1760
|
};
|
|
1761
1761
|
}
|
|
1762
|
-
function
|
|
1763
|
-
if (
|
|
1764
|
-
var r = t +
|
|
1762
|
+
function Kt(e, t, n) {
|
|
1763
|
+
if (Ct(e, t, _t(e, t)), xt > 3) return null;
|
|
1764
|
+
var r = t + St;
|
|
1765
1765
|
if (e.charCodeAt(r) !== m) return null;
|
|
1766
|
-
if (r + 1 < e.length && e.charCodeAt(r + 1) === h) return
|
|
1766
|
+
if (r + 1 < e.length && e.charCodeAt(r + 1) === h) return qt(e, r, n) || null;
|
|
1767
1767
|
n.refs ||= {};
|
|
1768
|
-
var i =
|
|
1768
|
+
var i = ut(e, r, n.refs);
|
|
1769
1769
|
return i === null ? null : {
|
|
1770
|
-
node: { type:
|
|
1770
|
+
node: { type: K.refCollection },
|
|
1771
1771
|
end: i
|
|
1772
1772
|
};
|
|
1773
1773
|
}
|
|
1774
|
-
function
|
|
1774
|
+
function qt(e, t, n) {
|
|
1775
1775
|
var r = e.length;
|
|
1776
1776
|
if (e.charCodeAt(t) !== m || t + 1 >= r || e.charCodeAt(t + 1) !== h) return null;
|
|
1777
|
-
for (var i = t + 2, a = i; i < r && e.charCodeAt(i) !==
|
|
1777
|
+
for (var i = t + 2, a = i; i < r && e.charCodeAt(i) !== E;) {
|
|
1778
1778
|
if (e.charCodeAt(i) === d) return null;
|
|
1779
1779
|
i++;
|
|
1780
1780
|
}
|
|
1781
1781
|
if (i >= r) return null;
|
|
1782
1782
|
var o = ("^" + e.slice(a, i)).toLowerCase();
|
|
1783
|
-
if (i++, i >= r || e.charCodeAt(i) !==
|
|
1783
|
+
if (i++, i >= r || e.charCodeAt(i) !== k) return null;
|
|
1784
1784
|
for (i++; i < r && (e.charCodeAt(i) === c || e.charCodeAt(i) === l);) i++;
|
|
1785
1785
|
if (i < r && e.charCodeAt(i) === d) for (i++; i < r && (e.charCodeAt(i) === c || e.charCodeAt(i) === l);) i++;
|
|
1786
1786
|
var s = e.indexOf("\n", i);
|
|
1787
1787
|
s < 0 && (s = r);
|
|
1788
1788
|
for (var u = e.slice(i, s).trim(), f = s < r ? s + 1 : r; f < r;) {
|
|
1789
|
-
var p =
|
|
1790
|
-
if (
|
|
1791
|
-
else if (
|
|
1789
|
+
var p = _t(e, f);
|
|
1790
|
+
if (Ct(e, f, p), xt >= 2 && !wt(e, f, p)) u += "\n" + e.slice(f, p), f = $(e, p);
|
|
1791
|
+
else if (wt(e, f, p)) {
|
|
1792
1792
|
var g = $(e, p);
|
|
1793
|
-
if (g < r && (
|
|
1793
|
+
if (g < r && (Ct(e, g, _t(e, g)), xt >= 2)) {
|
|
1794
1794
|
u += "\n", f = $(e, p);
|
|
1795
1795
|
continue;
|
|
1796
1796
|
}
|
|
@@ -1801,23 +1801,23 @@ function Xt(e, t, n) {
|
|
|
1801
1801
|
target: u,
|
|
1802
1802
|
title: void 0
|
|
1803
1803
|
}), {
|
|
1804
|
-
node: { type:
|
|
1804
|
+
node: { type: K.footnote },
|
|
1805
1805
|
end: f
|
|
1806
1806
|
};
|
|
1807
1807
|
}
|
|
1808
|
-
function
|
|
1808
|
+
function Jt(e, t, n, r) {
|
|
1809
1809
|
let i = t, a = 0, o = 0, s = -1;
|
|
1810
1810
|
for (; i < e.length;) {
|
|
1811
|
-
let t = s >= 0 ? s :
|
|
1812
|
-
if (s = -1,
|
|
1813
|
-
if (
|
|
1814
|
-
let n = e.charCodeAt(i +
|
|
1815
|
-
if (n ===
|
|
1816
|
-
let r = i +
|
|
1811
|
+
let t = s >= 0 ? s : _t(e, i);
|
|
1812
|
+
if (s = -1, wt(e, i, t)) break;
|
|
1813
|
+
if (Ct(e, i, t), xt < 4 && o > 0 && !n.g) {
|
|
1814
|
+
let n = e.charCodeAt(i + St);
|
|
1815
|
+
if (n === b || n === y) {
|
|
1816
|
+
let r = i + St;
|
|
1817
1817
|
for (; r < t && e.charCodeAt(r) === n;) r++;
|
|
1818
1818
|
for (; r < t && (e.charCodeAt(r) === c || e.charCodeAt(r) === l);) r++;
|
|
1819
1819
|
if (r >= t) {
|
|
1820
|
-
a = n ===
|
|
1820
|
+
a = n === b ? 1 : 2, i = $(e, t);
|
|
1821
1821
|
break;
|
|
1822
1822
|
}
|
|
1823
1823
|
}
|
|
@@ -1825,78 +1825,78 @@ function Zt(e, t, n, r) {
|
|
|
1825
1825
|
o = t;
|
|
1826
1826
|
let u = $(e, t);
|
|
1827
1827
|
if (u < e.length) {
|
|
1828
|
-
if (e.charCodeAt(u) ===
|
|
1829
|
-
var m =
|
|
1828
|
+
if (e.charCodeAt(u) === de) {
|
|
1829
|
+
var m = _t(e, u);
|
|
1830
1830
|
i = $(e, m), o = m;
|
|
1831
1831
|
continue;
|
|
1832
1832
|
}
|
|
1833
|
-
let t =
|
|
1834
|
-
if (s = t,
|
|
1835
|
-
let a = e.charCodeAt(u +
|
|
1833
|
+
let t = _t(e, u);
|
|
1834
|
+
if (s = t, Ct(e, u, t), xt < 4) {
|
|
1835
|
+
let a = e.charCodeAt(u + St);
|
|
1836
1836
|
if (a === g) {
|
|
1837
1837
|
i = u;
|
|
1838
1838
|
break;
|
|
1839
1839
|
}
|
|
1840
|
-
if (a === _ &&
|
|
1840
|
+
if (a === _ && Tt(e, u, n, r)) {
|
|
1841
1841
|
i = u;
|
|
1842
1842
|
break;
|
|
1843
1843
|
}
|
|
1844
1844
|
if (a === f || a === p) {
|
|
1845
|
-
for (var h = u +
|
|
1845
|
+
for (var h = u + St, v = 0; h < t && e.charCodeAt(h) === a;) v++, h++;
|
|
1846
1846
|
if (v >= 3) {
|
|
1847
1847
|
i = u;
|
|
1848
1848
|
break;
|
|
1849
1849
|
}
|
|
1850
1850
|
}
|
|
1851
|
-
if (a ===
|
|
1852
|
-
var
|
|
1853
|
-
if (!E &&
|
|
1854
|
-
for (var
|
|
1855
|
-
k >
|
|
1851
|
+
if (a === w) {
|
|
1852
|
+
var x = u + St + 1, T = x < t ? e.charCodeAt(x) : 0, E = T === D || T === z;
|
|
1853
|
+
if (!E && T === re) {
|
|
1854
|
+
for (var O = x + 1, k = O; k < t && (e.charCodeAt(k) >= U && e.charCodeAt(k) <= W || e.charCodeAt(k) >= pe && e.charCodeAt(k) <= me || e.charCodeAt(k) >= V && e.charCodeAt(k) <= H || e.charCodeAt(k) === y);) k++;
|
|
1855
|
+
k > O && (E = It.has(e.slice(O, k).toLowerCase()));
|
|
1856
1856
|
} else if (!E) {
|
|
1857
|
-
for (var A =
|
|
1858
|
-
if (A >
|
|
1859
|
-
var j = e.slice(
|
|
1860
|
-
E =
|
|
1857
|
+
for (var A = x; A < t && (e.charCodeAt(A) >= U && e.charCodeAt(A) <= W || e.charCodeAt(A) >= pe && e.charCodeAt(A) <= me || e.charCodeAt(A) >= V && e.charCodeAt(A) <= H || e.charCodeAt(A) === y);) A++;
|
|
1858
|
+
if (A > x) {
|
|
1859
|
+
var j = e.slice(x, A).toLowerCase();
|
|
1860
|
+
E = It.has(j) || Qe.has(j);
|
|
1861
1861
|
}
|
|
1862
1862
|
}
|
|
1863
|
-
if (E &&
|
|
1863
|
+
if (E && Ht(e, u, n, r)) {
|
|
1864
1864
|
i = u;
|
|
1865
1865
|
break;
|
|
1866
1866
|
}
|
|
1867
1867
|
}
|
|
1868
|
-
if (a ===
|
|
1869
|
-
let n = u +
|
|
1870
|
-
if (n < t && (e.charCodeAt(n) === c || e.charCodeAt(n) === l) &&
|
|
1868
|
+
if (a === y || a === S || a === oe) {
|
|
1869
|
+
let n = u + St + 1;
|
|
1870
|
+
if (n < t && (e.charCodeAt(n) === c || e.charCodeAt(n) === l) && vt(e, n, t) < t && !Dt(e, u)) {
|
|
1871
1871
|
i = u;
|
|
1872
1872
|
break;
|
|
1873
1873
|
}
|
|
1874
1874
|
}
|
|
1875
1875
|
if (a >= V && a <= H) {
|
|
1876
|
-
let n = u +
|
|
1876
|
+
let n = u + St;
|
|
1877
1877
|
for (; n < t && e.charCodeAt(n) >= V && e.charCodeAt(n) <= H;) n++;
|
|
1878
|
-
if (n < t && (e.charCodeAt(n) ===
|
|
1878
|
+
if (n < t && (e.charCodeAt(n) === ne || e.charCodeAt(n) === ue) && n - (u + St) === 1 && e.charCodeAt(u + St) === 49) {
|
|
1879
1879
|
var M = n + 1;
|
|
1880
|
-
if (M < t && (e.charCodeAt(M) === c || e.charCodeAt(M) === l) &&
|
|
1880
|
+
if (M < t && (e.charCodeAt(M) === c || e.charCodeAt(M) === l) && vt(e, M, t) < t) {
|
|
1881
1881
|
i = u;
|
|
1882
1882
|
break;
|
|
1883
1883
|
}
|
|
1884
1884
|
}
|
|
1885
1885
|
}
|
|
1886
|
-
if (a ===
|
|
1886
|
+
if (a === B) {
|
|
1887
1887
|
let n = $(e, t);
|
|
1888
|
-
if (n < e.length &&
|
|
1888
|
+
if (n < e.length && st(e, n, _t(e, n))) {
|
|
1889
1889
|
i = u;
|
|
1890
1890
|
break;
|
|
1891
1891
|
}
|
|
1892
1892
|
}
|
|
1893
|
-
if ((a ===
|
|
1894
|
-
if (a !==
|
|
1893
|
+
if ((a === y || a === S || a === C) && Dt(e, u)) {
|
|
1894
|
+
if (a !== y) {
|
|
1895
1895
|
i = u;
|
|
1896
1896
|
break;
|
|
1897
1897
|
}
|
|
1898
|
-
let n = 0, r = u +
|
|
1899
|
-
for (; r < t && e.charCodeAt(r) ===
|
|
1898
|
+
let n = 0, r = u + St;
|
|
1899
|
+
for (; r < t && e.charCodeAt(r) === y;) n++, r++;
|
|
1900
1900
|
for (; r < t && (e.charCodeAt(r) === c || e.charCodeAt(r) === l);) r++;
|
|
1901
1901
|
if (r < t) {
|
|
1902
1902
|
i = u;
|
|
@@ -1910,18 +1910,18 @@ function Zt(e, t, n, r) {
|
|
|
1910
1910
|
for (var N = a ? o : i; N > t && (e.charCodeAt(N - 1) === d || e.charCodeAt(N - 1) === u || e.charCodeAt(N - 1) === c || e.charCodeAt(N - 1) === l);) N--;
|
|
1911
1911
|
for (var P = t; P < N && (e.charCodeAt(P) === c || e.charCodeAt(P) === l);) P++;
|
|
1912
1912
|
if (P >= N) return null;
|
|
1913
|
-
for (var F = !1, I = P; I < N; I++) if (e.charCodeAt(I) ===
|
|
1913
|
+
for (var F = !1, I = P; I < N; I++) if (e.charCodeAt(I) === de) {
|
|
1914
1914
|
F = !0;
|
|
1915
1915
|
break;
|
|
1916
1916
|
}
|
|
1917
1917
|
var L = F ? e.slice(P, N).replace(/\u001E/g, "") : e.slice(P, N);
|
|
1918
1918
|
if (!L) return null;
|
|
1919
|
-
let R =
|
|
1919
|
+
let R = Yt(L, 0, L.length, n, r);
|
|
1920
1920
|
if (a) {
|
|
1921
|
-
let e = (r?.slugify ||
|
|
1921
|
+
let e = (r?.slugify || Ce)(L);
|
|
1922
1922
|
return {
|
|
1923
1923
|
node: {
|
|
1924
|
-
type:
|
|
1924
|
+
type: K.heading,
|
|
1925
1925
|
level: a,
|
|
1926
1926
|
children: R,
|
|
1927
1927
|
id: e
|
|
@@ -1931,19 +1931,19 @@ function Zt(e, t, n, r) {
|
|
|
1931
1931
|
}
|
|
1932
1932
|
return {
|
|
1933
1933
|
node: {
|
|
1934
|
-
type:
|
|
1934
|
+
type: K.paragraph,
|
|
1935
1935
|
children: R
|
|
1936
1936
|
},
|
|
1937
1937
|
end: i
|
|
1938
1938
|
};
|
|
1939
1939
|
}
|
|
1940
|
-
function
|
|
1940
|
+
function Yt(e, t, n, r, i) {
|
|
1941
1941
|
var a = e.indexOf("\n", t);
|
|
1942
|
-
if (a < 0 || a >= n) return
|
|
1942
|
+
if (a < 0 || a >= n) return _n(e, t, n, r, i);
|
|
1943
1943
|
for (var o = "", s = t, l = t; l < n;) {
|
|
1944
1944
|
var u = e.charCodeAt(l);
|
|
1945
1945
|
if (u === f) {
|
|
1946
|
-
var p =
|
|
1946
|
+
var p = Zt(e, l, n);
|
|
1947
1947
|
if (p > l) {
|
|
1948
1948
|
for (var m = !1, h = l; h < p; h++) if (e.charCodeAt(h) === d) {
|
|
1949
1949
|
m = !0;
|
|
@@ -1953,8 +1953,8 @@ function Qt(e, t, n, r, i) {
|
|
|
1953
1953
|
continue;
|
|
1954
1954
|
}
|
|
1955
1955
|
}
|
|
1956
|
-
if (u ===
|
|
1957
|
-
var g =
|
|
1956
|
+
if (u === w) {
|
|
1957
|
+
var g = Qt(e, l, n);
|
|
1958
1958
|
if (g > l) {
|
|
1959
1959
|
l = g;
|
|
1960
1960
|
continue;
|
|
@@ -1962,15 +1962,15 @@ function Qt(e, t, n, r, i) {
|
|
|
1962
1962
|
}
|
|
1963
1963
|
if (u === d) {
|
|
1964
1964
|
var _ = !1, v = 0;
|
|
1965
|
-
if (l > t && e.charCodeAt(l - 1) ===
|
|
1965
|
+
if (l > t && e.charCodeAt(l - 1) === x) _ = !0, v = 1;
|
|
1966
1966
|
else {
|
|
1967
1967
|
for (var y = 0, b = l - 1; b >= t && e.charCodeAt(b) === c;) y++, b--;
|
|
1968
1968
|
y >= 2 && (_ = !0, v = y);
|
|
1969
1969
|
}
|
|
1970
1970
|
if (_) o += e.slice(s, l - v), o += "";
|
|
1971
1971
|
else {
|
|
1972
|
-
for (var
|
|
1973
|
-
o += e.slice(s,
|
|
1972
|
+
for (var S = l; S > s && e.charCodeAt(S - 1) === c;) S--;
|
|
1973
|
+
o += e.slice(s, S) + "\n";
|
|
1974
1974
|
}
|
|
1975
1975
|
for (l++; l < n && e.charCodeAt(l) === c;) l++;
|
|
1976
1976
|
s = l;
|
|
@@ -1978,20 +1978,20 @@ function Qt(e, t, n, r, i) {
|
|
|
1978
1978
|
}
|
|
1979
1979
|
l++;
|
|
1980
1980
|
}
|
|
1981
|
-
return s < n && (o += e.slice(s, n)),
|
|
1981
|
+
return s < n && (o += e.slice(s, n)), _n(o, 0, o.length, r, i);
|
|
1982
1982
|
}
|
|
1983
|
-
function
|
|
1983
|
+
function Xt(e, t, n) {
|
|
1984
1984
|
if (e.charCodeAt(t) !== f) return null;
|
|
1985
|
-
let r =
|
|
1985
|
+
let r = bt(e, t, n, 96), i = t + r;
|
|
1986
1986
|
for (; i < n;) {
|
|
1987
1987
|
let a = e.indexOf("`", i);
|
|
1988
1988
|
if (a < 0 || a >= n) return null;
|
|
1989
|
-
let o =
|
|
1989
|
+
let o = bt(e, a, n, 96);
|
|
1990
1990
|
if (o === r) {
|
|
1991
1991
|
let n = e.slice(t + r, a);
|
|
1992
1992
|
return n = n.replace(/\n/g, " "), n.length > 0 && n[0] === " " && n[n.length - 1] === " " && n.trim().length > 0 && (n = n.slice(1, -1)), {
|
|
1993
1993
|
node: {
|
|
1994
|
-
type:
|
|
1994
|
+
type: K.codeInline,
|
|
1995
1995
|
text: n
|
|
1996
1996
|
},
|
|
1997
1997
|
end: a + o
|
|
@@ -2001,33 +2001,33 @@ function $t(e, t, n) {
|
|
|
2001
2001
|
}
|
|
2002
2002
|
return null;
|
|
2003
2003
|
}
|
|
2004
|
-
function
|
|
2004
|
+
function Zt(e, t, n) {
|
|
2005
2005
|
if (e.charCodeAt(t) !== f) return t;
|
|
2006
|
-
let r =
|
|
2006
|
+
let r = bt(e, t, n, 96), i = t + r;
|
|
2007
2007
|
for (; i < n;) {
|
|
2008
2008
|
let a = e.indexOf("`", i);
|
|
2009
2009
|
if (a < 0 || a >= n) return t;
|
|
2010
|
-
let o =
|
|
2010
|
+
let o = bt(e, a, n, 96);
|
|
2011
2011
|
if (o === r) return a + o;
|
|
2012
2012
|
i = a + o;
|
|
2013
2013
|
}
|
|
2014
2014
|
return t;
|
|
2015
2015
|
}
|
|
2016
|
-
function
|
|
2017
|
-
if (e.charCodeAt(t) !==
|
|
2018
|
-
if (t + 1 < n && e.charCodeAt(t + 1) ===
|
|
2016
|
+
function Qt(e, t, n) {
|
|
2017
|
+
if (e.charCodeAt(t) !== w) return t;
|
|
2018
|
+
if (t + 1 < n && e.charCodeAt(t + 1) === re) {
|
|
2019
2019
|
let r = t + 2;
|
|
2020
2020
|
for (; r < n && e.charCodeAt(r) !== g;) r++;
|
|
2021
2021
|
return r < n ? r + 1 : t;
|
|
2022
2022
|
}
|
|
2023
|
-
if (t + 3 < n && e.charCodeAt(t + 1) ===
|
|
2023
|
+
if (t + 3 < n && e.charCodeAt(t + 1) === D && e.charCodeAt(t + 2) === y && e.charCodeAt(t + 3) === y) {
|
|
2024
2024
|
let n = e.indexOf("-->", t + 4);
|
|
2025
2025
|
return n >= 0 ? n + 3 : t;
|
|
2026
2026
|
}
|
|
2027
2027
|
let r = t + 1, i = r;
|
|
2028
2028
|
for (; r < n;) {
|
|
2029
2029
|
let t = e.charCodeAt(r);
|
|
2030
|
-
if (t >= U && t <= W || t >=
|
|
2030
|
+
if (t >= U && t <= W || t >= pe && t <= me || t >= V && t <= H || t === y) r++;
|
|
2031
2031
|
else break;
|
|
2032
2032
|
}
|
|
2033
2033
|
if (r === i) return t;
|
|
@@ -2038,7 +2038,7 @@ function tn(e, t, n) {
|
|
|
2038
2038
|
r++;
|
|
2039
2039
|
break;
|
|
2040
2040
|
}
|
|
2041
|
-
if (i ===
|
|
2041
|
+
if (i === re && r + 1 < n && e.charCodeAt(r + 1) === g) {
|
|
2042
2042
|
r += 2, o = !0;
|
|
2043
2043
|
break;
|
|
2044
2044
|
}
|
|
@@ -2051,11 +2051,11 @@ function tn(e, t, n) {
|
|
|
2051
2051
|
if (i === d) return t;
|
|
2052
2052
|
r++;
|
|
2053
2053
|
}
|
|
2054
|
-
if (o ||
|
|
2054
|
+
if (o || we(a)) return r;
|
|
2055
2055
|
let c = 1;
|
|
2056
|
-
for (; r < n && c > 0;) if (e.charCodeAt(r) ===
|
|
2056
|
+
for (; r < n && c > 0;) if (e.charCodeAt(r) === w) if (r + 1 < n && e.charCodeAt(r + 1) === re) {
|
|
2057
2057
|
let t = r + 2, i = t;
|
|
2058
|
-
for (; i < n && (e.charCodeAt(i) >= U && e.charCodeAt(i) <= W || e.charCodeAt(i) >=
|
|
2058
|
+
for (; i < n && (e.charCodeAt(i) >= U && e.charCodeAt(i) <= W || e.charCodeAt(i) >= pe && e.charCodeAt(i) <= me);) i++;
|
|
2059
2059
|
if (e.slice(t, i).toLowerCase() === a) {
|
|
2060
2060
|
for (; i < n && e.charCodeAt(i) !== g;) i++;
|
|
2061
2061
|
if (i < n && i++, c--, c === 0) return i;
|
|
@@ -2063,86 +2063,85 @@ function tn(e, t, n) {
|
|
|
2063
2063
|
r = i;
|
|
2064
2064
|
} else {
|
|
2065
2065
|
let t = r + 1, i = t;
|
|
2066
|
-
for (; i < n && (e.charCodeAt(i) >= U && e.charCodeAt(i) <= W || e.charCodeAt(i) >=
|
|
2066
|
+
for (; i < n && (e.charCodeAt(i) >= U && e.charCodeAt(i) <= W || e.charCodeAt(i) >= pe && e.charCodeAt(i) <= me);) i++;
|
|
2067
2067
|
e.slice(t, i).toLowerCase() === a && c++, r++;
|
|
2068
2068
|
}
|
|
2069
2069
|
else r++;
|
|
2070
2070
|
return r;
|
|
2071
2071
|
}
|
|
2072
|
-
function
|
|
2072
|
+
function $t(e, t, n, r, i) {
|
|
2073
2073
|
if (e.charCodeAt(t) !== p || t + 1 >= n || e.charCodeAt(t + 1) !== p) return null;
|
|
2074
2074
|
let a = t + 2;
|
|
2075
2075
|
for (; a + 1 < n;) {
|
|
2076
2076
|
let o = e.charCodeAt(a);
|
|
2077
2077
|
if (o === f) {
|
|
2078
|
-
let t =
|
|
2078
|
+
let t = Zt(e, a, n);
|
|
2079
2079
|
if (t > a) {
|
|
2080
2080
|
a = t;
|
|
2081
2081
|
continue;
|
|
2082
2082
|
}
|
|
2083
2083
|
}
|
|
2084
2084
|
if (o === p && e.charCodeAt(a + 1) === p) {
|
|
2085
|
-
let n = e.slice(t + 2, a), o =
|
|
2085
|
+
let n = e.slice(t + 2, a), o = _n(n, 0, n.length, r, i);
|
|
2086
2086
|
return {
|
|
2087
2087
|
node: {
|
|
2088
|
-
type:
|
|
2088
|
+
type: K.textFormatted,
|
|
2089
2089
|
tag: "del",
|
|
2090
2090
|
children: o
|
|
2091
2091
|
},
|
|
2092
2092
|
end: a + 2
|
|
2093
2093
|
};
|
|
2094
2094
|
}
|
|
2095
|
-
o ===
|
|
2095
|
+
o === x && a + 1 < n && a++, a++;
|
|
2096
2096
|
}
|
|
2097
2097
|
return null;
|
|
2098
2098
|
}
|
|
2099
|
-
function
|
|
2100
|
-
if (e.charCodeAt(t) !==
|
|
2099
|
+
function en(e, t, n, r, i) {
|
|
2100
|
+
if (e.charCodeAt(t) !== b || t + 1 >= n || e.charCodeAt(t + 1) !== b) return null;
|
|
2101
2101
|
let a = t + 2;
|
|
2102
2102
|
for (; a + 1 < n;) {
|
|
2103
2103
|
let o = e.charCodeAt(a);
|
|
2104
2104
|
if (o === f) {
|
|
2105
|
-
let t =
|
|
2105
|
+
let t = Zt(e, a, n);
|
|
2106
2106
|
if (t > a) {
|
|
2107
2107
|
a = t;
|
|
2108
2108
|
continue;
|
|
2109
2109
|
}
|
|
2110
2110
|
}
|
|
2111
|
-
if (o ===
|
|
2112
|
-
let n = e.slice(t + 2, a), o =
|
|
2111
|
+
if (o === b && e.charCodeAt(a + 1) === b && a > t + 2) {
|
|
2112
|
+
let n = e.slice(t + 2, a), o = _n(n, 0, n.length, r, i);
|
|
2113
2113
|
return {
|
|
2114
2114
|
node: {
|
|
2115
|
-
type:
|
|
2115
|
+
type: K.textFormatted,
|
|
2116
2116
|
tag: "mark",
|
|
2117
2117
|
children: o
|
|
2118
2118
|
},
|
|
2119
2119
|
end: a + 2
|
|
2120
2120
|
};
|
|
2121
2121
|
}
|
|
2122
|
-
o ===
|
|
2122
|
+
o === x && a + 1 < n && a++, a++;
|
|
2123
2123
|
}
|
|
2124
2124
|
return null;
|
|
2125
2125
|
}
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
return e < ge ? !!(vt(e) & Z) : an.test(t[n]);
|
|
2126
|
+
function tn(e, t, n) {
|
|
2127
|
+
return e < he ? !!(ht(e) & De) : Le.test(t[n]);
|
|
2129
2128
|
}
|
|
2130
|
-
function
|
|
2131
|
-
return e <
|
|
2129
|
+
function nn(e, t, n) {
|
|
2130
|
+
return e < he ? !!(ht(e) & Te) : Re.test(t[n]);
|
|
2132
2131
|
}
|
|
2133
|
-
function
|
|
2132
|
+
function rn(e, t, n) {
|
|
2134
2133
|
var r = e.charCodeAt(t);
|
|
2135
|
-
if (r !==
|
|
2136
|
-
var i =
|
|
2134
|
+
if (r !== S && r !== C) return null;
|
|
2135
|
+
var i = bt(e, t, n, r);
|
|
2137
2136
|
if (i === 0) return null;
|
|
2138
|
-
var a = t > 0 ? e.charCodeAt(t - 1) : 32, o = t + i < n ? e.charCodeAt(t + i) : 32, s =
|
|
2139
|
-
return r ===
|
|
2137
|
+
var a = t > 0 ? e.charCodeAt(t - 1) : 32, o = t + i < n ? e.charCodeAt(t + i) : 32, s = nn(a, e, t - 1), c = nn(o, e, t + i), l = t > 0 ? tn(a, e, t - 1) : !1, u = t + i < n ? tn(o, e, t + i) : !1, d = !c && (!u || s || l), f = !s && (!l || c || u), p, m;
|
|
2138
|
+
return r === S ? (p = d, m = f) : (p = d && (!f || l), m = f && (!d || u)), {
|
|
2140
2139
|
len: i,
|
|
2141
2140
|
canOpen: p,
|
|
2142
2141
|
canClose: m
|
|
2143
2142
|
};
|
|
2144
2143
|
}
|
|
2145
|
-
function
|
|
2144
|
+
function an(e, t, n, r) {
|
|
2146
2145
|
if (t.length !== 0) {
|
|
2147
2146
|
for (var i = [], a = 0; a < 12; a++) i[a] = -1;
|
|
2148
2147
|
for (var o = 0; o < t.length;) {
|
|
@@ -2151,7 +2150,7 @@ function ln(e, t, n, r) {
|
|
|
2151
2150
|
o++;
|
|
2152
2151
|
continue;
|
|
2153
2152
|
}
|
|
2154
|
-
for (var c = (s.ch ===
|
|
2153
|
+
for (var c = (s.ch === S ? 0 : 1) * 6 + s.len % 3 * 2 + (s.canOpen ? 1 : 0), l = i[c] === void 0 ? -1 : i[c], u = -1, d = o - 1; d > l; d--) {
|
|
2155
2154
|
var f = t[d];
|
|
2156
2155
|
if (!(!f.active || f.ch !== s.ch || !f.canOpen) && !((s.canOpen || f.canClose) && (f.len + s.len) % 3 == 0 && f.len % 3 != 0)) {
|
|
2157
2156
|
u = d;
|
|
@@ -2167,12 +2166,12 @@ function ln(e, t, n, r) {
|
|
|
2167
2166
|
var g = e[p.idx], _ = e[s.idx];
|
|
2168
2167
|
g.text = g.text.slice(0, g.text.length - h), _.text = _.text.slice(h);
|
|
2169
2168
|
var v = p.idx + 1, y = s.idx, b = e.slice(v, y), x = {
|
|
2170
|
-
type:
|
|
2169
|
+
type: K.textFormatted,
|
|
2171
2170
|
tag: m ? "strong" : "em",
|
|
2172
2171
|
children: b
|
|
2173
2172
|
};
|
|
2174
2173
|
e.splice(v, y - v, x);
|
|
2175
|
-
for (var
|
|
2174
|
+
for (var C = y - v - 1, w = 0; w < t.length; w++) t[w].idx > p.idx && (t[w].idx -= C);
|
|
2176
2175
|
for (var T = u + 1; T < o; T++) t[T].active = !1;
|
|
2177
2176
|
if (p.len === 0 && (p.active = !1, g.text === "")) {
|
|
2178
2177
|
e.splice(p.idx, 1);
|
|
@@ -2190,10 +2189,10 @@ function ln(e, t, n, r) {
|
|
|
2190
2189
|
}
|
|
2191
2190
|
for (var k = 0, A = 0; A < e.length; A++) {
|
|
2192
2191
|
var j = e[A];
|
|
2193
|
-
if (j.type ===
|
|
2192
|
+
if (j.type === K.text) {
|
|
2194
2193
|
var M = j;
|
|
2195
2194
|
if (M.text === "") continue;
|
|
2196
|
-
if (k > 0 && e[k - 1].type ===
|
|
2195
|
+
if (k > 0 && e[k - 1].type === K.text) {
|
|
2197
2196
|
e[k - 1].text += M.text;
|
|
2198
2197
|
continue;
|
|
2199
2198
|
}
|
|
@@ -2203,98 +2202,98 @@ function ln(e, t, n, r) {
|
|
|
2203
2202
|
e.length = k;
|
|
2204
2203
|
}
|
|
2205
2204
|
}
|
|
2206
|
-
function
|
|
2207
|
-
let a = e.charCodeAt(t) ===
|
|
2205
|
+
function on(e, t, n, r, i) {
|
|
2206
|
+
let a = e.charCodeAt(t) === D, o = a ? t + 1 : t;
|
|
2208
2207
|
if (e.charCodeAt(o) !== m) return null;
|
|
2209
2208
|
var s = e.indexOf("]", o + 1);
|
|
2210
2209
|
if (s < 0 || s >= n) return null;
|
|
2211
2210
|
for (var l = o + 1, u = 1; l < n && u > 0;) {
|
|
2212
2211
|
var p = e.charCodeAt(l);
|
|
2213
|
-
if (p ===
|
|
2212
|
+
if (p === x && l + 1 < n) {
|
|
2214
2213
|
l += 2;
|
|
2215
2214
|
continue;
|
|
2216
2215
|
}
|
|
2217
2216
|
if (p === f) {
|
|
2218
|
-
var h =
|
|
2217
|
+
var h = Zt(e, l, n);
|
|
2219
2218
|
if (h > l) {
|
|
2220
2219
|
l = h;
|
|
2221
2220
|
continue;
|
|
2222
2221
|
}
|
|
2223
2222
|
}
|
|
2224
|
-
if (p ===
|
|
2225
|
-
var _ =
|
|
2223
|
+
if (p === w) {
|
|
2224
|
+
var _ = sn(e, l, n);
|
|
2226
2225
|
if (_) {
|
|
2227
2226
|
l = _.end;
|
|
2228
2227
|
continue;
|
|
2229
2228
|
}
|
|
2230
|
-
var v =
|
|
2229
|
+
var v = Qt(e, l, n);
|
|
2231
2230
|
if (v > l) {
|
|
2232
2231
|
l = v;
|
|
2233
2232
|
continue;
|
|
2234
2233
|
}
|
|
2235
2234
|
}
|
|
2236
|
-
p === m ? u++ : p ===
|
|
2235
|
+
p === m ? u++ : p === E && u--, l++;
|
|
2237
2236
|
}
|
|
2238
2237
|
if (u !== 0) return null;
|
|
2239
|
-
var y = l - 1, b = e.slice(o + 1, y),
|
|
2240
|
-
if (
|
|
2241
|
-
var
|
|
2238
|
+
var y = l - 1, b = e.slice(o + 1, y), S = l < n ? e.charCodeAt(l) : 0, C = !1;
|
|
2239
|
+
if (S === le) {
|
|
2240
|
+
var T = !0;
|
|
2242
2241
|
for (l++; l < n && (e.charCodeAt(l) === c || e.charCodeAt(l) === d);) l++;
|
|
2243
|
-
var
|
|
2244
|
-
if (l < n && e.charCodeAt(l) ===
|
|
2242
|
+
var O = "", k = l;
|
|
2243
|
+
if (l < n && e.charCodeAt(l) === w) {
|
|
2245
2244
|
for (l++, k = l; k < n && e.charCodeAt(k) !== g;) {
|
|
2246
|
-
if (e.charCodeAt(k) ===
|
|
2245
|
+
if (e.charCodeAt(k) === x && k + 1 < n) {
|
|
2247
2246
|
k += 2;
|
|
2248
2247
|
continue;
|
|
2249
2248
|
}
|
|
2250
2249
|
if (e.charCodeAt(k) === d) {
|
|
2251
|
-
|
|
2250
|
+
T = !1;
|
|
2252
2251
|
break;
|
|
2253
2252
|
}
|
|
2254
2253
|
k++;
|
|
2255
2254
|
}
|
|
2256
|
-
|
|
2257
|
-
} else if (
|
|
2255
|
+
T && (k >= n || e.charCodeAt(k) !== g) && (T = !1), T && (O = e.slice(l, k), k++);
|
|
2256
|
+
} else if (T) {
|
|
2258
2257
|
for (var A = 0; k < n;) {
|
|
2259
2258
|
var j = e.charCodeAt(k);
|
|
2260
|
-
if (j ===
|
|
2259
|
+
if (j === x && k + 1 < n) {
|
|
2261
2260
|
k += 2;
|
|
2262
2261
|
continue;
|
|
2263
2262
|
}
|
|
2264
|
-
if (j ===
|
|
2265
|
-
else if (j ===
|
|
2263
|
+
if (j === le) A++;
|
|
2264
|
+
else if (j === ue) {
|
|
2266
2265
|
if (A === 0) break;
|
|
2267
2266
|
A--;
|
|
2268
2267
|
} else if (j === c || j === d) break;
|
|
2269
2268
|
k++;
|
|
2270
2269
|
}
|
|
2271
|
-
|
|
2270
|
+
O = e.slice(l, k);
|
|
2272
2271
|
}
|
|
2273
|
-
if (
|
|
2272
|
+
if (T) {
|
|
2274
2273
|
for (l = k; l < n && (e.charCodeAt(l) === c || e.charCodeAt(l) === d);) l++;
|
|
2275
2274
|
var M;
|
|
2276
2275
|
if (l < n) {
|
|
2277
2276
|
var N = e.charCodeAt(l);
|
|
2278
|
-
if (N === ae || N === ie || N ===
|
|
2279
|
-
var P = N ===
|
|
2277
|
+
if (N === ae || N === ie || N === le) {
|
|
2278
|
+
var P = N === le ? 41 : N;
|
|
2280
2279
|
l++;
|
|
2281
|
-
for (var F = l; l < n && e.charCodeAt(l) !== P;) e.charCodeAt(l) ===
|
|
2282
|
-
l >= n ?
|
|
2280
|
+
for (var F = l; l < n && e.charCodeAt(l) !== P;) e.charCodeAt(l) === x && l + 1 < n && l++, l++;
|
|
2281
|
+
l >= n ? T = !1 : (M = e.slice(F, l), l++);
|
|
2283
2282
|
}
|
|
2284
2283
|
}
|
|
2285
|
-
if (
|
|
2284
|
+
if (T) {
|
|
2286
2285
|
for (; l < n && (e.charCodeAt(l) === c || e.charCodeAt(l) === d);) l++;
|
|
2287
|
-
(l >= n || e.charCodeAt(l) !==
|
|
2286
|
+
(l >= n || e.charCodeAt(l) !== ue) && (T = !1);
|
|
2288
2287
|
}
|
|
2289
2288
|
}
|
|
2290
|
-
if (
|
|
2291
|
-
l++,
|
|
2292
|
-
var I = (i?.sanitizer ||
|
|
2289
|
+
if (T) {
|
|
2290
|
+
l++, O = gt(O), M !== void 0 && (M = ve(gt(M)));
|
|
2291
|
+
var I = (i?.sanitizer || be)(O, a ? "img" : "a", a ? "src" : "href") === null ? null : O;
|
|
2293
2292
|
if (a) {
|
|
2294
|
-
var L =
|
|
2293
|
+
var L = fn(_n(b, 0, b.length, r, i));
|
|
2295
2294
|
return {
|
|
2296
2295
|
node: {
|
|
2297
|
-
type:
|
|
2296
|
+
type: K.image,
|
|
2298
2297
|
target: I,
|
|
2299
2298
|
alt: L,
|
|
2300
2299
|
title: M
|
|
@@ -2305,12 +2304,12 @@ function un(e, t, n, r, i) {
|
|
|
2305
2304
|
var R = r.inAnchor;
|
|
2306
2305
|
r.inAnchor = !0;
|
|
2307
2306
|
var ee = R ? [{
|
|
2308
|
-
type:
|
|
2307
|
+
type: K.text,
|
|
2309
2308
|
text: b
|
|
2310
|
-
}] :
|
|
2311
|
-
return r.inAnchor = R, !r.inAnchor &&
|
|
2309
|
+
}] : _n(b, 0, b.length, r, i);
|
|
2310
|
+
return r.inAnchor = R, !r.inAnchor && dn(ee) ? null : {
|
|
2312
2311
|
node: {
|
|
2313
|
-
type:
|
|
2312
|
+
type: K.link,
|
|
2314
2313
|
target: I,
|
|
2315
2314
|
title: M,
|
|
2316
2315
|
children: ee
|
|
@@ -2321,11 +2320,11 @@ function un(e, t, n, r, i) {
|
|
|
2321
2320
|
} else l = y + 1, C = !0;
|
|
2322
2321
|
}
|
|
2323
2322
|
var te = "", z = l;
|
|
2324
|
-
if (!C &&
|
|
2323
|
+
if (!C && S === m) {
|
|
2325
2324
|
var ne = l + 1;
|
|
2326
2325
|
z = ne;
|
|
2327
|
-
for (var re = !1; z < n && e.charCodeAt(z) !==
|
|
2328
|
-
if (e.charCodeAt(z) ===
|
|
2326
|
+
for (var re = !1; z < n && e.charCodeAt(z) !== E;) {
|
|
2327
|
+
if (e.charCodeAt(z) === x && z + 1 < n) {
|
|
2329
2328
|
z += 2;
|
|
2330
2329
|
continue;
|
|
2331
2330
|
}
|
|
@@ -2336,258 +2335,265 @@ function un(e, t, n, r, i) {
|
|
|
2336
2335
|
z++;
|
|
2337
2336
|
}
|
|
2338
2337
|
if (re || z >= n) return null;
|
|
2339
|
-
var
|
|
2340
|
-
if (
|
|
2338
|
+
var oe = e.slice(ne, z);
|
|
2339
|
+
if (oe.trim()) te = mt(oe);
|
|
2341
2340
|
else {
|
|
2342
|
-
if (
|
|
2343
|
-
te =
|
|
2341
|
+
if (pt(b)) return null;
|
|
2342
|
+
te = mt(b);
|
|
2344
2343
|
}
|
|
2345
2344
|
z += 1;
|
|
2346
2345
|
} else {
|
|
2347
|
-
if (
|
|
2348
|
-
te =
|
|
2346
|
+
if (pt(b)) return null;
|
|
2347
|
+
te = mt(b);
|
|
2349
2348
|
}
|
|
2350
|
-
var
|
|
2351
|
-
if (!
|
|
2349
|
+
var B = r.refs[te];
|
|
2350
|
+
if (!B) return null;
|
|
2352
2351
|
if (a) return {
|
|
2353
2352
|
node: {
|
|
2354
|
-
type:
|
|
2355
|
-
target:
|
|
2356
|
-
alt:
|
|
2357
|
-
title:
|
|
2353
|
+
type: K.image,
|
|
2354
|
+
target: B.target,
|
|
2355
|
+
alt: fn(_n(b, 0, b.length, r, i)),
|
|
2356
|
+
title: B.title
|
|
2358
2357
|
},
|
|
2359
2358
|
end: z
|
|
2360
2359
|
};
|
|
2361
2360
|
var se = r.inAnchor;
|
|
2362
2361
|
r.inAnchor = !0;
|
|
2363
2362
|
var ee = se ? [{
|
|
2364
|
-
type:
|
|
2363
|
+
type: K.text,
|
|
2365
2364
|
text: b
|
|
2366
|
-
}] :
|
|
2367
|
-
return r.inAnchor = se, !r.inAnchor &&
|
|
2365
|
+
}] : _n(b, 0, b.length, r, i);
|
|
2366
|
+
return r.inAnchor = se, !r.inAnchor && dn(ee) ? null : {
|
|
2368
2367
|
node: {
|
|
2369
|
-
type:
|
|
2370
|
-
target:
|
|
2371
|
-
title:
|
|
2368
|
+
type: K.link,
|
|
2369
|
+
target: B.target,
|
|
2370
|
+
title: B.title,
|
|
2372
2371
|
children: ee
|
|
2373
2372
|
},
|
|
2374
2373
|
end: z
|
|
2375
2374
|
};
|
|
2376
2375
|
}
|
|
2377
|
-
function
|
|
2378
|
-
if (e.charCodeAt(t) !==
|
|
2376
|
+
function sn(e, t, n) {
|
|
2377
|
+
if (e.charCodeAt(t) !== w) return null;
|
|
2379
2378
|
for (var r = t + 1; r < n;) {
|
|
2380
2379
|
var i = e.charCodeAt(r);
|
|
2381
2380
|
if (i === g) break;
|
|
2382
|
-
if (i === c || i === d || i === u || i ===
|
|
2381
|
+
if (i === c || i === d || i === u || i === w) return null;
|
|
2383
2382
|
r++;
|
|
2384
2383
|
}
|
|
2385
2384
|
if (r >= n || e.charCodeAt(r) !== g) return null;
|
|
2386
2385
|
var a = e.slice(t + 1, r);
|
|
2387
2386
|
return a.match(/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^\x00-\x20]*)$/) ? {
|
|
2388
2387
|
node: {
|
|
2389
|
-
type:
|
|
2388
|
+
type: K.link,
|
|
2390
2389
|
target: a,
|
|
2390
|
+
title: void 0,
|
|
2391
2391
|
children: [{
|
|
2392
|
-
type:
|
|
2392
|
+
type: K.text,
|
|
2393
2393
|
text: a
|
|
2394
2394
|
}]
|
|
2395
2395
|
},
|
|
2396
2396
|
end: r + 1
|
|
2397
2397
|
} : a.indexOf("@") !== -1 && /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a) ? {
|
|
2398
2398
|
node: {
|
|
2399
|
-
type:
|
|
2399
|
+
type: K.link,
|
|
2400
2400
|
target: "mailto:" + a,
|
|
2401
|
+
title: void 0,
|
|
2401
2402
|
children: [{
|
|
2402
|
-
type:
|
|
2403
|
+
type: K.text,
|
|
2403
2404
|
text: a
|
|
2404
2405
|
}]
|
|
2405
2406
|
},
|
|
2406
2407
|
end: r + 1
|
|
2407
2408
|
} : null;
|
|
2408
2409
|
}
|
|
2409
|
-
function
|
|
2410
|
+
function cn(e, t, n, r) {
|
|
2410
2411
|
if (e.charCodeAt(t) !== m || t + 1 >= n || e.charCodeAt(t + 1) !== h) return null;
|
|
2411
2412
|
let i = t + 2;
|
|
2412
|
-
for (; i < n && e.charCodeAt(i) !==
|
|
2413
|
-
if (i >= n || e.charCodeAt(i) !==
|
|
2413
|
+
for (; i < n && e.charCodeAt(i) !== E && e.charCodeAt(i) !== d;) i++;
|
|
2414
|
+
if (i >= n || e.charCodeAt(i) !== E) return null;
|
|
2414
2415
|
let a = e.slice(t + 2, i);
|
|
2415
2416
|
return a ? {
|
|
2416
2417
|
node: {
|
|
2417
|
-
type:
|
|
2418
|
-
target: "#" +
|
|
2418
|
+
type: K.footnoteReference,
|
|
2419
|
+
target: "#" + Ce(a),
|
|
2419
2420
|
text: a
|
|
2420
2421
|
},
|
|
2421
2422
|
end: i + 1
|
|
2422
2423
|
} : null;
|
|
2423
2424
|
}
|
|
2424
|
-
function
|
|
2425
|
+
function ln(e, t, n, r) {
|
|
2425
2426
|
if (r.disableBareUrls) return null;
|
|
2426
2427
|
var i = "", a = !1, o = e.charCodeAt(t);
|
|
2427
|
-
if (o ===
|
|
2428
|
+
if (o === M || o === 72 ? t + 8 <= n && e.charCodeAt(t + 1) === P && e.charCodeAt(t + 2) === P && e.charCodeAt(t + 3) === F && (e.charCodeAt(t + 4) === I && e.charCodeAt(t + 5) === k && e.charCodeAt(t + 6) === re && e.charCodeAt(t + 7) === re ? i = "https://" : e.charCodeAt(t + 4) === k && e.charCodeAt(t + 5) === re && e.charCodeAt(t + 6) === re && (i = "http://")) : o === j || o === 70 ? t + 6 <= n && e.charCodeAt(t + 1) === P && e.charCodeAt(t + 2) === F && e.charCodeAt(t + 3) === k && e.charCodeAt(t + 4) === re && e.charCodeAt(t + 5) === re && (i = "ftp://") : (o === N || o === 87) && t + 4 <= n && e.charCodeAt(t + 1) === N && e.charCodeAt(t + 2) === N && e.charCodeAt(t + 3) === ne && (i = "www.", a = !0), !i) return null;
|
|
2428
2429
|
let s = t + i.length;
|
|
2429
2430
|
for (; s < n;) {
|
|
2430
2431
|
let t = e.charCodeAt(s);
|
|
2431
|
-
if (t === c || t === d || t === l || t === u || t ===
|
|
2432
|
+
if (t === c || t === d || t === l || t === u || t === w || t === g) break;
|
|
2432
2433
|
s++;
|
|
2433
2434
|
}
|
|
2434
|
-
for (var f = 0,
|
|
2435
|
-
var
|
|
2436
|
-
|
|
2437
|
-
}
|
|
2438
|
-
let
|
|
2439
|
-
for (;
|
|
2440
|
-
let n = e.charCodeAt(
|
|
2441
|
-
if (n ===
|
|
2442
|
-
if (n ===
|
|
2443
|
-
if (f >=
|
|
2444
|
-
|
|
2445
|
-
}
|
|
2446
|
-
|
|
2447
|
-
} else if (n ===
|
|
2448
|
-
for (var
|
|
2449
|
-
|
|
2435
|
+
for (var f = 0, m = 0, h = t; h < s; h++) {
|
|
2436
|
+
var _ = e.charCodeAt(h);
|
|
2437
|
+
_ === le ? f++ : _ === ue && m++;
|
|
2438
|
+
}
|
|
2439
|
+
let v = s;
|
|
2440
|
+
for (; v > t + i.length;) {
|
|
2441
|
+
let n = e.charCodeAt(v - 1);
|
|
2442
|
+
if (n === ne || n === ee || n === k || n === D || n === z || n === ue || n === S || n === C || n === p) {
|
|
2443
|
+
if (n === ue) {
|
|
2444
|
+
if (f >= m) break;
|
|
2445
|
+
m--;
|
|
2446
|
+
}
|
|
2447
|
+
v--;
|
|
2448
|
+
} else if (n === te) {
|
|
2449
|
+
for (var y = v - 2; y > t && (e.charCodeAt(y) >= U && e.charCodeAt(y) <= W || e.charCodeAt(y) >= pe && e.charCodeAt(y) <= me || e.charCodeAt(y) >= V && e.charCodeAt(y) <= H);) y--;
|
|
2450
|
+
y >= t && e.charCodeAt(y) === O ? v = y : v--;
|
|
2450
2451
|
} else break;
|
|
2451
2452
|
}
|
|
2452
|
-
if (
|
|
2453
|
-
var
|
|
2454
|
-
if ((
|
|
2455
|
-
for (var
|
|
2453
|
+
if (v <= t + i.length) return null;
|
|
2454
|
+
var b = t + (a ? 4 : i.length), x = e.indexOf("/", b);
|
|
2455
|
+
if ((x < 0 || x > v) && (x = v), a && e.indexOf(".", b) === -1) return null;
|
|
2456
|
+
for (var T = -1, E = -1, A = x - 1; A >= b; A--) if (e.charCodeAt(A) === ne) if (T < 0) T = A;
|
|
2456
2457
|
else {
|
|
2457
|
-
|
|
2458
|
+
E = A;
|
|
2458
2459
|
break;
|
|
2459
2460
|
}
|
|
2460
|
-
for (var
|
|
2461
|
-
var
|
|
2461
|
+
for (var A = E >= 0 ? E + 1 : b; A < x; A++) if (e.charCodeAt(A) === C) return null;
|
|
2462
|
+
var L = e.slice(t, v), R = a ? "http://" + L : L;
|
|
2462
2463
|
return {
|
|
2463
2464
|
node: {
|
|
2464
|
-
type:
|
|
2465
|
-
target:
|
|
2465
|
+
type: K.link,
|
|
2466
|
+
target: R,
|
|
2467
|
+
title: void 0,
|
|
2466
2468
|
children: [{
|
|
2467
|
-
type:
|
|
2468
|
-
text:
|
|
2469
|
+
type: K.text,
|
|
2470
|
+
text: L
|
|
2469
2471
|
}]
|
|
2470
2472
|
},
|
|
2471
|
-
end:
|
|
2473
|
+
end: v
|
|
2472
2474
|
};
|
|
2473
2475
|
}
|
|
2474
|
-
function
|
|
2476
|
+
function un(e, t, n, r) {
|
|
2475
2477
|
if (r.disableBareUrls) return null;
|
|
2476
2478
|
for (var i = t, a = i; i < n;) {
|
|
2477
2479
|
var o = e.charCodeAt(i);
|
|
2478
|
-
if (o >= U && o <= W || o >=
|
|
2480
|
+
if (o >= U && o <= W || o >= pe && o <= me || o >= V && o <= H || o === ne || o === D || o === _ || o === 36 || o === v || o === O || o === ie || o === S || o === oe || o === re || o === b || o === z || o === h || o === C || o === f || o === se || o === B || o === ce || o === p || o === y) i++;
|
|
2479
2481
|
else break;
|
|
2480
2482
|
}
|
|
2481
|
-
if (i === a || i >= n || e.charCodeAt(i) !==
|
|
2483
|
+
if (i === a || i >= n || e.charCodeAt(i) !== T) return null;
|
|
2482
2484
|
i++;
|
|
2483
2485
|
for (var s = i, c = -1, l = i; i < n;) {
|
|
2484
2486
|
var o = e.charCodeAt(i);
|
|
2485
|
-
if (o >= U && o <= W || o >=
|
|
2486
|
-
else if ((o ===
|
|
2487
|
-
else if (o ===
|
|
2487
|
+
if (o >= U && o <= W || o >= pe && o <= me || o >= V && o <= H) i++;
|
|
2488
|
+
else if ((o === y || o === C) && i > s) i++;
|
|
2489
|
+
else if (o === ne) {
|
|
2488
2490
|
if (i === s) break;
|
|
2489
2491
|
var u = e.charCodeAt(i - 1);
|
|
2490
|
-
if (u ===
|
|
2492
|
+
if (u === y || u === C || i - l > 63) break;
|
|
2491
2493
|
if (i + 1 < n) {
|
|
2492
2494
|
var d = e.charCodeAt(i + 1);
|
|
2493
|
-
if (d >= U && d <= W || d >=
|
|
2495
|
+
if (d >= U && d <= W || d >= pe && d <= me || d >= V && d <= H) c = i, l = i + 1, i++;
|
|
2494
2496
|
else break;
|
|
2495
2497
|
} else break;
|
|
2496
2498
|
} else break;
|
|
2497
2499
|
}
|
|
2498
2500
|
if (i - l > 63 || c < 0) return null;
|
|
2499
2501
|
var m = e.charCodeAt(i - 1);
|
|
2500
|
-
if (!(m >= U && m <= W || m >=
|
|
2501
|
-
for (var g = -1,
|
|
2502
|
-
g =
|
|
2502
|
+
if (!(m >= U && m <= W || m >= pe && m <= me || m >= V && m <= H) || i <= c + 1) return null;
|
|
2503
|
+
for (var g = -1, x = c - 1; x >= s; x--) if (e.charCodeAt(x) === ne) {
|
|
2504
|
+
g = x;
|
|
2503
2505
|
break;
|
|
2504
2506
|
}
|
|
2505
|
-
for (var
|
|
2506
|
-
var
|
|
2507
|
+
for (var x = g >= 0 ? g + 1 : s; x < i; x++) if (e.charCodeAt(x) === C) return null;
|
|
2508
|
+
var w = e.slice(t, i);
|
|
2507
2509
|
return {
|
|
2508
2510
|
node: {
|
|
2509
|
-
type:
|
|
2510
|
-
target: "mailto:" +
|
|
2511
|
+
type: K.link,
|
|
2512
|
+
target: "mailto:" + w,
|
|
2513
|
+
title: void 0,
|
|
2511
2514
|
children: [{
|
|
2512
|
-
type:
|
|
2513
|
-
text:
|
|
2515
|
+
type: K.text,
|
|
2516
|
+
text: w
|
|
2514
2517
|
}]
|
|
2515
2518
|
},
|
|
2516
2519
|
end: i
|
|
2517
2520
|
};
|
|
2518
2521
|
}
|
|
2519
|
-
function
|
|
2520
|
-
for (var t = 0; t < e.length; t++) if (e[t].type ===
|
|
2522
|
+
function dn(e) {
|
|
2523
|
+
for (var t = 0; t < e.length; t++) if (e[t].type === K.link || "children" in e[t] && Array.isArray(e[t].children) && dn(e[t].children)) return !0;
|
|
2521
2524
|
return !1;
|
|
2522
2525
|
}
|
|
2523
|
-
function
|
|
2526
|
+
function fn(e) {
|
|
2524
2527
|
for (var t = "", n = 0; n < e.length; n++) {
|
|
2525
2528
|
var r = e[n];
|
|
2526
|
-
r.type ===
|
|
2529
|
+
r.type === K.text ? t += r.text : r.type === K.breakLine ? t += " " : r.type === K.codeInline ? t += r.text : "children" in r && Array.isArray(r.children) ? t += fn(r.children) : r.type === K.image ? t += r.alt || "" : r.type === K.link && (t += fn(r.children));
|
|
2527
2530
|
}
|
|
2528
2531
|
return t;
|
|
2529
2532
|
}
|
|
2530
|
-
function
|
|
2531
|
-
let t = e.includes("&") ?
|
|
2533
|
+
function pn(e) {
|
|
2534
|
+
let t = e.includes("&") ? ve(e) : e;
|
|
2532
2535
|
return {
|
|
2533
|
-
type:
|
|
2536
|
+
type: K.text,
|
|
2534
2537
|
text: t
|
|
2535
2538
|
};
|
|
2536
2539
|
}
|
|
2537
|
-
function
|
|
2538
|
-
if (e.charCodeAt(t) !==
|
|
2540
|
+
function mn(e, t, n, r, i) {
|
|
2541
|
+
if (e.charCodeAt(t) !== w) return null;
|
|
2539
2542
|
var a = t + 1;
|
|
2540
2543
|
if (a >= n) return null;
|
|
2541
2544
|
var o = e.charCodeAt(a);
|
|
2542
|
-
if (o ===
|
|
2545
|
+
if (o === D && a + 1 < n && e.charCodeAt(a + 1) === y && a + 2 < n && e.charCodeAt(a + 2) === y) {
|
|
2543
2546
|
var s = a + 3;
|
|
2544
2547
|
if (s < n && e.charCodeAt(s) === g) return {
|
|
2545
2548
|
node: {
|
|
2546
|
-
type:
|
|
2549
|
+
type: K.htmlComment,
|
|
2547
2550
|
text: "",
|
|
2548
|
-
|
|
2551
|
+
h: !0
|
|
2549
2552
|
},
|
|
2550
2553
|
end: s + 1
|
|
2551
2554
|
};
|
|
2552
|
-
if (s + 1 < n && e.charCodeAt(s) ===
|
|
2555
|
+
if (s + 1 < n && e.charCodeAt(s) === y && e.charCodeAt(s + 1) === g) return {
|
|
2553
2556
|
node: {
|
|
2554
|
-
type:
|
|
2557
|
+
type: K.htmlComment,
|
|
2555
2558
|
text: "-",
|
|
2556
|
-
|
|
2559
|
+
h: !0
|
|
2557
2560
|
},
|
|
2558
2561
|
end: s + 2
|
|
2559
2562
|
};
|
|
2560
2563
|
var u = e.indexOf("-->", s);
|
|
2561
2564
|
return u !== -1 && u <= n - 3 ? {
|
|
2562
2565
|
node: {
|
|
2563
|
-
type:
|
|
2564
|
-
text: e.slice(t + 4, u)
|
|
2566
|
+
type: K.htmlComment,
|
|
2567
|
+
text: e.slice(t + 4, u),
|
|
2568
|
+
h: !1
|
|
2565
2569
|
},
|
|
2566
2570
|
end: u + 3
|
|
2567
2571
|
} : null;
|
|
2568
2572
|
}
|
|
2569
|
-
if (o ===
|
|
2573
|
+
if (o === z) {
|
|
2570
2574
|
var f = e.indexOf("?>", a + 1);
|
|
2571
2575
|
return f !== -1 && f < n ? {
|
|
2572
2576
|
node: {
|
|
2573
|
-
type:
|
|
2577
|
+
type: K.htmlSelfClosing,
|
|
2574
2578
|
tag: "?",
|
|
2575
2579
|
attrs: {},
|
|
2576
|
-
a: e.slice(t, f + 2)
|
|
2580
|
+
a: e.slice(t, f + 2),
|
|
2581
|
+
b: !1
|
|
2577
2582
|
},
|
|
2578
2583
|
end: f + 2
|
|
2579
2584
|
} : null;
|
|
2580
2585
|
}
|
|
2581
|
-
if (o ===
|
|
2586
|
+
if (o === D && a + 1 < n) {
|
|
2582
2587
|
var p = e.charCodeAt(a + 1);
|
|
2583
2588
|
if (p === m && e.slice(a + 1, a + 8) === "[CDATA[") {
|
|
2584
2589
|
var h = e.indexOf("]]>", a + 8);
|
|
2585
2590
|
return h !== -1 && h < n ? {
|
|
2586
2591
|
node: {
|
|
2587
|
-
type:
|
|
2592
|
+
type: K.htmlSelfClosing,
|
|
2588
2593
|
tag: "![CDATA[",
|
|
2589
2594
|
attrs: {},
|
|
2590
|
-
a: e.slice(t, h + 3)
|
|
2595
|
+
a: e.slice(t, h + 3),
|
|
2596
|
+
b: !1
|
|
2591
2597
|
},
|
|
2592
2598
|
end: h + 3
|
|
2593
2599
|
} : null;
|
|
@@ -2596,23 +2602,24 @@ function vn(e, t, n, r, i) {
|
|
|
2596
2602
|
var _ = e.indexOf(">", a + 2);
|
|
2597
2603
|
return _ !== -1 && _ < n ? {
|
|
2598
2604
|
node: {
|
|
2599
|
-
type:
|
|
2605
|
+
type: K.htmlSelfClosing,
|
|
2600
2606
|
tag: "!" + e.slice(a + 1, _),
|
|
2601
2607
|
attrs: {},
|
|
2602
|
-
a: e.slice(t, _ + 1)
|
|
2608
|
+
a: e.slice(t, _ + 1),
|
|
2609
|
+
b: !1
|
|
2603
2610
|
},
|
|
2604
2611
|
end: _ + 1
|
|
2605
2612
|
} : null;
|
|
2606
2613
|
}
|
|
2607
2614
|
}
|
|
2608
|
-
if (o ===
|
|
2615
|
+
if (o === re) {
|
|
2609
2616
|
var v = a + 1;
|
|
2610
2617
|
if (v >= n) return null;
|
|
2611
|
-
var
|
|
2612
|
-
if (!(
|
|
2618
|
+
var b = e.charCodeAt(v);
|
|
2619
|
+
if (!(b >= U && b <= W || b >= pe && b <= me)) return null;
|
|
2613
2620
|
for (v++; v < n;) {
|
|
2614
2621
|
var x = e.charCodeAt(v);
|
|
2615
|
-
if (x >= U && x <= W || x >=
|
|
2622
|
+
if (x >= U && x <= W || x >= pe && x <= me || x >= V && x <= H || x === y) v++;
|
|
2616
2623
|
else break;
|
|
2617
2624
|
}
|
|
2618
2625
|
for (; v < n && (e.charCodeAt(v) === c || e.charCodeAt(v) === l || e.charCodeAt(v) === d);) v++;
|
|
@@ -2620,7 +2627,7 @@ function vn(e, t, n, r, i) {
|
|
|
2620
2627
|
var S = e.slice(a + 1, v).trim();
|
|
2621
2628
|
return {
|
|
2622
2629
|
node: {
|
|
2623
|
-
type:
|
|
2630
|
+
type: K.htmlSelfClosing,
|
|
2624
2631
|
tag: S,
|
|
2625
2632
|
attrs: {},
|
|
2626
2633
|
a: e.slice(t, v + 1),
|
|
@@ -2631,58 +2638,64 @@ function vn(e, t, n, r, i) {
|
|
|
2631
2638
|
}
|
|
2632
2639
|
return null;
|
|
2633
2640
|
}
|
|
2634
|
-
if (!(o >= U && o <= W || o >=
|
|
2635
|
-
var C =
|
|
2641
|
+
if (!(o >= U && o <= W || o >= pe && o <= me)) return null;
|
|
2642
|
+
var C = ct(e, t);
|
|
2636
2643
|
if (!C) return null;
|
|
2637
|
-
var
|
|
2638
|
-
if (C.selfClosing ||
|
|
2644
|
+
var T = C.tag, E = T.toLowerCase();
|
|
2645
|
+
if (C.selfClosing || we(T)) return {
|
|
2639
2646
|
node: {
|
|
2640
|
-
type:
|
|
2641
|
-
tag:
|
|
2642
|
-
attrs:
|
|
2643
|
-
a: e.slice(t, C.end)
|
|
2647
|
+
type: K.htmlSelfClosing,
|
|
2648
|
+
tag: T,
|
|
2649
|
+
attrs: Lt(C.attrs, T, i),
|
|
2650
|
+
a: e.slice(t, C.end),
|
|
2651
|
+
b: !1
|
|
2644
2652
|
},
|
|
2645
2653
|
end: C.end
|
|
2646
2654
|
};
|
|
2647
|
-
var
|
|
2655
|
+
var O = Qe.has(E), k = Vt(e.slice(0, n), C.end, T);
|
|
2648
2656
|
if (k === -1) return {
|
|
2649
2657
|
node: {
|
|
2650
|
-
type:
|
|
2651
|
-
tag:
|
|
2652
|
-
attrs:
|
|
2653
|
-
a: e.slice(t, C.end)
|
|
2658
|
+
type: K.htmlSelfClosing,
|
|
2659
|
+
tag: T,
|
|
2660
|
+
attrs: Lt(C.attrs, T, i),
|
|
2661
|
+
a: e.slice(t, C.end),
|
|
2662
|
+
b: !1
|
|
2654
2663
|
},
|
|
2655
2664
|
end: C.end
|
|
2656
2665
|
};
|
|
2657
|
-
var A =
|
|
2658
|
-
if (
|
|
2659
|
-
type:
|
|
2666
|
+
var A = zt(e, "</" + E, k), j = e.slice(C.end, A), M = [];
|
|
2667
|
+
if (O) j.trim() && (M = [{
|
|
2668
|
+
type: K.text,
|
|
2660
2669
|
text: j
|
|
2661
2670
|
}]);
|
|
2662
2671
|
else {
|
|
2663
2672
|
var N = j.trim();
|
|
2664
2673
|
if (N) {
|
|
2665
2674
|
var { inAnchor: P, inline: F } = r;
|
|
2666
|
-
E === "a" && (r.inAnchor = !0), N.indexOf("\n\n") !== -1 || /^#{1,6}\s/.test(N) ? (r.inline = !1, M =
|
|
2675
|
+
E === "a" && (r.inAnchor = !0), N.indexOf("\n\n") !== -1 || /^#{1,6}\s/.test(N) ? (r.inline = !1, M = yn(N, r, i)) : M = _n(N, 0, N.length, r, i), r.inAnchor = P, r.inline = F;
|
|
2667
2676
|
}
|
|
2668
2677
|
}
|
|
2669
2678
|
return {
|
|
2670
2679
|
node: {
|
|
2671
|
-
type:
|
|
2672
|
-
tag:
|
|
2673
|
-
attrs:
|
|
2674
|
-
|
|
2680
|
+
type: K.htmlBlock,
|
|
2681
|
+
tag: T,
|
|
2682
|
+
attrs: Lt(C.attrs, T, i),
|
|
2683
|
+
f: C.rawAttrs,
|
|
2675
2684
|
children: M,
|
|
2685
|
+
a: void 0,
|
|
2676
2686
|
text: j,
|
|
2677
|
-
c: !1
|
|
2687
|
+
c: !1,
|
|
2688
|
+
b: !1,
|
|
2689
|
+
endPos: k,
|
|
2690
|
+
e: !1
|
|
2678
2691
|
},
|
|
2679
2692
|
end: k
|
|
2680
2693
|
};
|
|
2681
2694
|
}
|
|
2682
|
-
var
|
|
2683
|
-
function
|
|
2684
|
-
if (
|
|
2685
|
-
type:
|
|
2695
|
+
var hn = 200, gn = 0;
|
|
2696
|
+
function _n(e, t, n, r, i) {
|
|
2697
|
+
if (gn++, gn > hn) return gn--, [{
|
|
2698
|
+
type: K.text,
|
|
2686
2699
|
text: e.slice(t, n)
|
|
2687
2700
|
}];
|
|
2688
2701
|
let a = r;
|
|
@@ -2691,44 +2704,44 @@ function xn(e, t, n, r, i) {
|
|
|
2691
2704
|
for (var n = 1, r = t + 1; r < e.length; r++) {
|
|
2692
2705
|
var i = e.charCodeAt(r);
|
|
2693
2706
|
if (i === m) n++;
|
|
2694
|
-
else if (i ===
|
|
2707
|
+
else if (i === E && (n--, n === 0)) return r;
|
|
2695
2708
|
}
|
|
2696
2709
|
return -1;
|
|
2697
2710
|
}, i = e.slice(t, n), a = i;
|
|
2698
|
-
for (var o = 0, s = 0, c = 0, l = 0, u = 0, d = -1, g = -1, _ = -1, v = -1, y = -1,
|
|
2699
|
-
var
|
|
2700
|
-
|
|
2711
|
+
for (var o = 0, s = 0, c = 0, l = 0, u = 0, d = -1, g = -1, _ = -1, v = -1, y = -1, T = 0; T < i.length; T++) {
|
|
2712
|
+
var O = i.charCodeAt(T);
|
|
2713
|
+
O === S ? T + 1 < i.length && i.charCodeAt(T + 1) === S ? (o++, d = T, T++) : (s++, g = T) : O === C ? T + 1 < i.length && i.charCodeAt(T + 1) === C ? (c++, _ = T, T++) : (l++, v = T) : O === p && T + 1 < i.length && i.charCodeAt(T + 1) === p && (u++, y = T, T++);
|
|
2701
2714
|
}
|
|
2702
2715
|
var k = [];
|
|
2703
2716
|
u % 2 == 1 && y >= 0 && k.push([y, 2]), c % 2 == 1 && _ >= 0 && k.push([_, 2]), l % 2 == 1 && v >= 0 && k.push([v, 1]), o % 2 == 1 && d >= 0 && k.push([d, 2]), s % 2 == 1 && g >= 0 && k.push([g, 1]), k.sort(function(e, t) {
|
|
2704
2717
|
return t[0] - e[0];
|
|
2705
2718
|
});
|
|
2706
2719
|
for (var A = 0; A < k.length; A++) {
|
|
2707
|
-
var
|
|
2708
|
-
i = i.slice(0,
|
|
2720
|
+
var P = k[A][0], F = k[A][1];
|
|
2721
|
+
i = i.slice(0, P) + i.slice(P + F);
|
|
2709
2722
|
}
|
|
2710
|
-
let h = 0,
|
|
2711
|
-
for (let e = 0; e < i.length; e++) i.charCodeAt(e) === f && (h++,
|
|
2712
|
-
if (h % 2 == 1 &&
|
|
2723
|
+
let h = 0, b = -1;
|
|
2724
|
+
for (let e = 0; e < i.length; e++) i.charCodeAt(e) === f && (h++, b = e);
|
|
2725
|
+
if (h % 2 == 1 && b !== -1) {
|
|
2713
2726
|
let e = !1, t = -1, n = 0;
|
|
2714
2727
|
for (; n < i.length;) i.charCodeAt(n) === f && (e ? (e = !1, t = -1) : (t = n, e = !0)), n++;
|
|
2715
2728
|
e && t !== -1 && (i = i.slice(0, t));
|
|
2716
2729
|
}
|
|
2717
2730
|
for (var I = !0; I;) {
|
|
2718
2731
|
I = !1;
|
|
2719
|
-
for (var L = -1, R = -1, ee = -1, te = !1, z = 0; z < i.length; z++) if (i.charCodeAt(z) === m && (z === 0 || i.charCodeAt(z - 1) !==
|
|
2720
|
-
var ne = z > 0 && i.charCodeAt(z - 1) ===
|
|
2721
|
-
if (
|
|
2732
|
+
for (var L = -1, R = -1, ee = -1, te = !1, z = 0; z < i.length; z++) if (i.charCodeAt(z) === m && (z === 0 || i.charCodeAt(z - 1) !== x)) {
|
|
2733
|
+
var ne = z > 0 && i.charCodeAt(z - 1) === D, re = ne ? z - 1 : z, ie = r(i, z);
|
|
2734
|
+
if (ie === -1) L = re, te = ne, R = z + 1, ee = i.length;
|
|
2722
2735
|
else {
|
|
2723
|
-
var
|
|
2724
|
-
if (
|
|
2725
|
-
else if (i.charCodeAt(
|
|
2726
|
-
var
|
|
2727
|
-
|
|
2728
|
-
} else if (i.charCodeAt(
|
|
2729
|
-
var
|
|
2730
|
-
|
|
2731
|
-
} else z =
|
|
2736
|
+
var ae = ie + 1;
|
|
2737
|
+
if (ae >= i.length) L = re, te = ne, R = z + 1, ee = ie;
|
|
2738
|
+
else if (i.charCodeAt(ae) === le) {
|
|
2739
|
+
var oe = i.indexOf(")", ae + 1);
|
|
2740
|
+
oe === -1 ? (L = re, te = ne, R = z + 1, ee = ie, z = i.length) : z = oe;
|
|
2741
|
+
} else if (i.charCodeAt(ae) === m) {
|
|
2742
|
+
var B = i.indexOf("]", ae + 1);
|
|
2743
|
+
B === -1 ? (L = re, te = ne, R = z + 1, ee = ie, z = i.length) : z = B;
|
|
2744
|
+
} else z = ie;
|
|
2732
2745
|
}
|
|
2733
2746
|
}
|
|
2734
2747
|
if (L >= 0) {
|
|
@@ -2736,203 +2749,203 @@ function xn(e, t, n, r, i) {
|
|
|
2736
2749
|
i = i.slice(0, L) + se, I = !0;
|
|
2737
2750
|
}
|
|
2738
2751
|
}
|
|
2739
|
-
let
|
|
2740
|
-
if (
|
|
2741
|
-
for (var ce = !1,
|
|
2742
|
-
if (ce =
|
|
2743
|
-
let e =
|
|
2744
|
-
|
|
2752
|
+
let w = i.match(/<([A-Z][A-Za-z0-9]*)(?:\s[^>]*)?>([^<]*)$/);
|
|
2753
|
+
if (w && w.index !== void 0) {
|
|
2754
|
+
for (var ce = !1, ue = 0, de = 0; de < w.index; de++) i.charCodeAt(de) === f && ue++;
|
|
2755
|
+
if (ce = ue % 2 == 1, !ce) {
|
|
2756
|
+
let e = w[1];
|
|
2757
|
+
Rt(i, "</" + e, 0) === -1 && (i = i.replace(/<[A-Z][A-Za-z0-9]*(?:\s[^>]*)?>([^<]*)$/, "$1"));
|
|
2745
2758
|
}
|
|
2746
2759
|
}
|
|
2747
2760
|
i !== a && (e = e.slice(0, t) + i, n = t + i.length);
|
|
2748
2761
|
}
|
|
2749
|
-
let
|
|
2750
|
-
var
|
|
2751
|
-
let
|
|
2752
|
-
var
|
|
2753
|
-
for (
|
|
2762
|
+
let G = [];
|
|
2763
|
+
var ge = [];
|
|
2764
|
+
let _e = t;
|
|
2765
|
+
var q = i.disableAutoLink || i.disableBareUrls || a.inAnchor ? -1 : e.indexOf("@", t);
|
|
2766
|
+
for (q >= n && (q = -1); t < n;) {
|
|
2754
2767
|
let r = e.charCodeAt(t), o = null;
|
|
2755
2768
|
if (r === f) {
|
|
2756
|
-
if (o =
|
|
2757
|
-
var
|
|
2758
|
-
t +=
|
|
2759
|
-
}
|
|
2760
|
-
} else if (r ===
|
|
2761
|
-
var
|
|
2762
|
-
if (
|
|
2763
|
-
if (
|
|
2764
|
-
t >
|
|
2765
|
-
var
|
|
2766
|
-
|
|
2767
|
-
idx:
|
|
2769
|
+
if (o = Xt(e, t, n), !o) {
|
|
2770
|
+
var J = bt(e, t, n, f);
|
|
2771
|
+
t += J - 1;
|
|
2772
|
+
}
|
|
2773
|
+
} else if (r === S || r === C) {
|
|
2774
|
+
var Y = rn(e, t, n);
|
|
2775
|
+
if (Y) {
|
|
2776
|
+
if (Y.canOpen || Y.canClose) {
|
|
2777
|
+
t > _e && G.push(pn(e.slice(_e, t)));
|
|
2778
|
+
var ve = pn(e.slice(t, t + Y.len));
|
|
2779
|
+
ge.push({
|
|
2780
|
+
idx: G.length,
|
|
2768
2781
|
ch: r,
|
|
2769
|
-
len:
|
|
2770
|
-
canOpen:
|
|
2771
|
-
canClose:
|
|
2782
|
+
len: Y.len,
|
|
2783
|
+
canOpen: Y.canOpen,
|
|
2784
|
+
canClose: Y.canClose,
|
|
2772
2785
|
active: !0
|
|
2773
|
-
}),
|
|
2786
|
+
}), G.push(ve), t += Y.len, _e = t;
|
|
2774
2787
|
continue;
|
|
2775
2788
|
}
|
|
2776
|
-
t +=
|
|
2789
|
+
t += Y.len - 1;
|
|
2777
2790
|
}
|
|
2778
|
-
} else r === p ? o =
|
|
2779
|
-
if (!o &&
|
|
2780
|
-
t >
|
|
2791
|
+
} else r === p ? o = $t(e, t, n, a, i) : r === b ? o = en(e, t, n, a, i) : r === m ? (t + 1 < n && e.charCodeAt(t + 1) === h && (o = cn(e, t, n, a)), o ||= on(e, t, n, a, i)) : r === D && t + 1 < n && e.charCodeAt(t + 1) === m ? o = on(e, t, n, a, i) : r === w ? (o = sn(e, t, n), !o && !i.disableParsingRawHTML && !i.ignoreHTMLBlocks && (o = mn(e, t, n, a, i))) : (r === M || r === N || r === j) && !a.inAnchor && !i.disableAutoLink && (t === 0 || e.charCodeAt(t - 1) !== w) && (o = ln(e, t, n, i));
|
|
2792
|
+
if (!o && q >= 0 && q - t <= 64 && !a.inAnchor && !i.disableAutoLink && !i.disableBareUrls && (r >= U && r <= W || r >= pe && r <= me || r >= V && r <= H) && (o = un(e, t, n, i), !o && t >= q && (q = e.indexOf("@", t + 1), q >= n && (q = -1))), r === fe) {
|
|
2793
|
+
t > _e && G.push(pn(e.slice(_e, t))), G.push({ type: K.breakLine }), t++, _e = t;
|
|
2781
2794
|
continue;
|
|
2782
2795
|
}
|
|
2783
|
-
if (o) t >
|
|
2796
|
+
if (o) t > _e && G.push(pn(e.slice(_e, t))), G.push(o.node), t = o.end, _e = t;
|
|
2784
2797
|
else {
|
|
2785
|
-
if (r ===
|
|
2786
|
-
t >
|
|
2798
|
+
if (r === x && t + 1 < n && ht(e.charCodeAt(t + 1)) & De) {
|
|
2799
|
+
t > _e && G.push(pn(e.slice(_e, t))), G.push(pn(e[t + 1])), t += 2, _e = t;
|
|
2787
2800
|
continue;
|
|
2788
2801
|
}
|
|
2789
|
-
if (t++,
|
|
2790
|
-
var
|
|
2791
|
-
if (
|
|
2802
|
+
if (t++, q < 0 || q - t > 64) for (; t < n;) {
|
|
2803
|
+
var ye = e.charCodeAt(t);
|
|
2804
|
+
if (ye < he && !rt[ye]) t++;
|
|
2792
2805
|
else break;
|
|
2793
2806
|
}
|
|
2794
2807
|
}
|
|
2795
2808
|
}
|
|
2796
|
-
if (n >
|
|
2797
|
-
let t = e.slice(
|
|
2798
|
-
|
|
2809
|
+
if (n > _e) {
|
|
2810
|
+
let t = e.slice(_e, n);
|
|
2811
|
+
t && G.push(pn(t));
|
|
2799
2812
|
}
|
|
2800
|
-
return
|
|
2813
|
+
return ge.length > 0 && an(G, ge, r, i), gn--, G;
|
|
2801
2814
|
}
|
|
2802
|
-
var
|
|
2803
|
-
function
|
|
2804
|
-
var r = t.
|
|
2805
|
-
if (r >
|
|
2806
|
-
type:
|
|
2815
|
+
var vn = 500;
|
|
2816
|
+
function yn(e, t, n) {
|
|
2817
|
+
var r = t.i || 0;
|
|
2818
|
+
if (r > vn) return [{
|
|
2819
|
+
type: K.text,
|
|
2807
2820
|
text: e
|
|
2808
2821
|
}];
|
|
2809
|
-
if (t.
|
|
2822
|
+
if (t.i = r + 1, (n.streaming || n.optimizeForStreaming) && !t.j) {
|
|
2810
2823
|
var i = e.length;
|
|
2811
2824
|
i > 0 && e.charCodeAt(i - 1) === d && i--;
|
|
2812
2825
|
for (var a = i; a > 0 && e.charCodeAt(a - 1) !== d;) a--;
|
|
2813
|
-
if (a > 0 && e.charCodeAt(a) ===
|
|
2826
|
+
if (a > 0 && e.charCodeAt(a) === B) {
|
|
2814
2827
|
for (var o = !0, s = a; s < i; s++) {
|
|
2815
2828
|
var u = e.charCodeAt(s);
|
|
2816
|
-
if (u !== c && u !== l && u !==
|
|
2829
|
+
if (u !== c && u !== l && u !== y && u !== k && u !== B) {
|
|
2817
2830
|
o = !1;
|
|
2818
2831
|
break;
|
|
2819
2832
|
}
|
|
2820
2833
|
}
|
|
2821
2834
|
if (o) {
|
|
2822
2835
|
for (var h = a - 1; h > 0 && e.charCodeAt(h - 1) !== d;) h--;
|
|
2823
|
-
e.charCodeAt(h) ===
|
|
2836
|
+
e.charCodeAt(h) === B && (e = e.slice(0, h).trimEnd());
|
|
2824
2837
|
}
|
|
2825
2838
|
}
|
|
2826
|
-
var v = e.trim(),
|
|
2827
|
-
if (x.length > 0 && x.charCodeAt(0) ===
|
|
2828
|
-
for (var
|
|
2839
|
+
var v = e.trim(), b = v.lastIndexOf("\n"), x = b === -1 ? v : v.slice(b + 1);
|
|
2840
|
+
if (x.length > 0 && x.charCodeAt(0) === B) {
|
|
2841
|
+
for (var T = !1, E = !1, D = 1; D < x.length; D++) {
|
|
2829
2842
|
var O = x.charCodeAt(D);
|
|
2830
|
-
O ===
|
|
2843
|
+
O === B && (T = !0), O === y && (E = !0);
|
|
2831
2844
|
}
|
|
2832
|
-
|
|
2845
|
+
T && E && (e = b === -1 ? "" : e.slice(0, e.lastIndexOf(x)).trimEnd());
|
|
2833
2846
|
}
|
|
2834
|
-
for (var
|
|
2847
|
+
for (var A = -1, j = -1, M = -1, N = e.length - 1; N >= 0; N--) if (e.charCodeAt(N) === w) {
|
|
2835
2848
|
var P = N + 1 < e.length ? e.charCodeAt(N + 1) : 0;
|
|
2836
|
-
if (P >= U && P <= W || P >=
|
|
2849
|
+
if (P >= U && P <= W || P >= pe && P <= me) {
|
|
2837
2850
|
for (var F = N + 2; F < e.length;) {
|
|
2838
2851
|
var I = e.charCodeAt(F);
|
|
2839
|
-
if (I >= U && I <= W || I >=
|
|
2852
|
+
if (I >= U && I <= W || I >= pe && I <= me || I >= V && I <= H) F++;
|
|
2840
2853
|
else break;
|
|
2841
2854
|
}
|
|
2842
2855
|
for (var L = F; L < e.length && e.charCodeAt(L) !== g;) L++;
|
|
2843
2856
|
if (L < e.length) {
|
|
2844
|
-
for (var R = !1, ee = L + 1; ee < e.length; ee++) if (e.charCodeAt(ee) ===
|
|
2857
|
+
for (var R = !1, ee = L + 1; ee < e.length; ee++) if (e.charCodeAt(ee) === w) {
|
|
2845
2858
|
R = !0;
|
|
2846
2859
|
break;
|
|
2847
2860
|
}
|
|
2848
|
-
R || (
|
|
2861
|
+
R || (A = N, j = F, M = L + 1);
|
|
2849
2862
|
}
|
|
2850
2863
|
}
|
|
2851
2864
|
break;
|
|
2852
2865
|
}
|
|
2853
|
-
if (
|
|
2854
|
-
for (var te = 0, z = 0; z <
|
|
2866
|
+
if (A >= 0) {
|
|
2867
|
+
for (var te = 0, z = 0; z < A; z++) e.charCodeAt(z) === f && te++;
|
|
2855
2868
|
if (te % 2 == 0) {
|
|
2856
|
-
var
|
|
2857
|
-
|
|
2858
|
-
}
|
|
2859
|
-
}
|
|
2860
|
-
for (var
|
|
2861
|
-
if (
|
|
2862
|
-
for (var
|
|
2863
|
-
for (var
|
|
2864
|
-
if (
|
|
2865
|
-
for (var le =
|
|
2866
|
-
|
|
2867
|
-
}
|
|
2868
|
-
}
|
|
2869
|
-
var
|
|
2870
|
-
if (
|
|
2871
|
-
for (var
|
|
2872
|
-
if (
|
|
2873
|
-
var
|
|
2874
|
-
if (
|
|
2875
|
-
var
|
|
2876
|
-
if (
|
|
2877
|
-
for (var
|
|
2878
|
-
|
|
2869
|
+
var re = e.slice(A + 1, j);
|
|
2870
|
+
Rt(e, "</" + re, 0) === -1 && (e = e.slice(0, A) + e.slice(M));
|
|
2871
|
+
}
|
|
2872
|
+
}
|
|
2873
|
+
for (var ie = e.length; ie > 0 && e.charCodeAt(ie - 1) === d;) ie--;
|
|
2874
|
+
if (ie > 0) {
|
|
2875
|
+
for (var ae = ie; ae > 0 && e.charCodeAt(ae - 1) !== d;) ae--;
|
|
2876
|
+
for (var se = ae, ce = 0; se < ie && e.charCodeAt(se) === c && ce < 3;) se++, ce++;
|
|
2877
|
+
if (ae > 0 && se < ie && Et(e, se, ie)) {
|
|
2878
|
+
for (var le = ae - 1, fe = le; fe > 0 && e.charCodeAt(fe - 1) !== d;) fe--;
|
|
2879
|
+
wt(e, fe, le) || (e = e.slice(0, ae).trimEnd());
|
|
2880
|
+
}
|
|
2881
|
+
}
|
|
2882
|
+
var he = e.length;
|
|
2883
|
+
if (he > 0) {
|
|
2884
|
+
for (var G = e.lastIndexOf("\n"), _e = G === -1 ? 0 : G + 1, q = he, J = _e, Y = 0; J < q && e.charCodeAt(J) === c && Y < 3;) J++, Y++;
|
|
2885
|
+
if (J < q) {
|
|
2886
|
+
var ve = e.charCodeAt(J), ye = !1;
|
|
2887
|
+
if (ve === S || ve === y || ve === oe) {
|
|
2888
|
+
var be = J + 1;
|
|
2889
|
+
if (be >= q || e.charCodeAt(be) === c || e.charCodeAt(be) === l) {
|
|
2890
|
+
for (var xe = be; xe < q && (e.charCodeAt(xe) === c || e.charCodeAt(xe) === l);) xe++;
|
|
2891
|
+
xe >= q && (ye = !0);
|
|
2879
2892
|
}
|
|
2880
|
-
} else if (
|
|
2881
|
-
for (var
|
|
2882
|
-
if (
|
|
2883
|
-
var
|
|
2884
|
-
if (
|
|
2885
|
-
for (var
|
|
2886
|
-
|
|
2893
|
+
} else if (ve >= V && ve <= H) {
|
|
2894
|
+
for (var Se = J; Se < q && e.charCodeAt(Se) >= V && e.charCodeAt(Se) <= H;) Se++;
|
|
2895
|
+
if (Se < q && (e.charCodeAt(Se) === ne || e.charCodeAt(Se) === ue)) {
|
|
2896
|
+
var X = Se + 1;
|
|
2897
|
+
if (X >= q || e.charCodeAt(X) === c || e.charCodeAt(X) === l) {
|
|
2898
|
+
for (var Ce = X; Ce < q && (e.charCodeAt(Ce) === c || e.charCodeAt(Ce) === l);) Ce++;
|
|
2899
|
+
Ce >= q && (ye = !0);
|
|
2887
2900
|
}
|
|
2888
2901
|
}
|
|
2889
2902
|
}
|
|
2890
|
-
|
|
2903
|
+
ye && (e = e.slice(0, _e).trimEnd());
|
|
2891
2904
|
}
|
|
2892
2905
|
}
|
|
2893
2906
|
}
|
|
2894
|
-
if (t.inline) return
|
|
2895
|
-
let
|
|
2896
|
-
if (
|
|
2897
|
-
let t =
|
|
2907
|
+
if (t.inline) return _n(e, 0, e.length, t, n);
|
|
2908
|
+
let Z = [], Q = 0, we = e.length;
|
|
2909
|
+
if (Q === 0 && e.startsWith("---")) {
|
|
2910
|
+
let t = ge(e);
|
|
2898
2911
|
if (t && t.hasValidYaml) {
|
|
2899
2912
|
if (n.preserveFrontmatter !== !1) {
|
|
2900
2913
|
let n = e.slice(0, t.endPos).trimEnd();
|
|
2901
|
-
|
|
2902
|
-
type:
|
|
2914
|
+
Z.push({
|
|
2915
|
+
type: K.frontmatter,
|
|
2903
2916
|
text: n
|
|
2904
2917
|
});
|
|
2905
2918
|
}
|
|
2906
|
-
|
|
2919
|
+
Q = t.endPos;
|
|
2907
2920
|
}
|
|
2908
2921
|
}
|
|
2909
|
-
for (;
|
|
2910
|
-
for (var
|
|
2911
|
-
if (
|
|
2912
|
-
e.charCodeAt(
|
|
2922
|
+
for (; Q < we;) {
|
|
2923
|
+
for (var Te = e.indexOf("\n", Q), Ee = Te < 0 ? we : Te; Q < we && wt(e, Q, Ee);) Q = Ee < we ? Ee + 1 : Ee, Q < we && (Te = e.indexOf("\n", Q), Ee = Te < 0 ? we : Te);
|
|
2924
|
+
if (Q >= we) break;
|
|
2925
|
+
e.charCodeAt(Q), Ct(e, Q, Ee);
|
|
2913
2926
|
let r = null;
|
|
2914
|
-
if (e.charCodeAt(
|
|
2915
|
-
else if (e.charCodeAt(
|
|
2916
|
-
let i =
|
|
2917
|
-
a === _ ? r =
|
|
2927
|
+
if (e.charCodeAt(Q) !== de && xt >= 4 && !t.inHTML) r = kt(e, Q);
|
|
2928
|
+
else if (e.charCodeAt(Q) !== de) {
|
|
2929
|
+
let i = Q + St, a = e.charCodeAt(i);
|
|
2930
|
+
a === _ ? r = Tt(e, Q, t, n) : a === g ? r = At(e, Q, t, n) : a === f || a === p ? r = Ot(e, Q, t) : a === y || a === S || a === C ? (r = Dt(e, Q), !r && (r = Ft(e, Q, t, n))) : a === oe || a >= V && a <= H ? r = Ft(e, Q, t, n) : a === w ? r = Ht(e, Q, t, n) : a === B ? r = Gt(e, Q, t, n) : a === m && (r = Kt(e, Q, t));
|
|
2918
2931
|
}
|
|
2919
2932
|
if (!r) {
|
|
2920
|
-
for (var
|
|
2921
|
-
|
|
2933
|
+
for (var De = !1, Oe = Q; Oe < Ee; Oe++) if (e.charCodeAt(Oe) === B) {
|
|
2934
|
+
De = !0;
|
|
2922
2935
|
break;
|
|
2923
2936
|
}
|
|
2924
|
-
|
|
2937
|
+
De && (r = Gt(e, Q, t, n));
|
|
2925
2938
|
}
|
|
2926
|
-
if (r ||=
|
|
2939
|
+
if (r ||= Jt(e, Q, t, n), r) r.node.type !== K.refCollection && Z.push(r.node), Q = r.end;
|
|
2927
2940
|
else {
|
|
2928
|
-
var
|
|
2929
|
-
|
|
2941
|
+
var ke = e.indexOf("\n", Q);
|
|
2942
|
+
Q = ke < 0 ? we : ke + 1;
|
|
2930
2943
|
}
|
|
2931
2944
|
}
|
|
2932
|
-
return t.
|
|
2945
|
+
return t.i = r, Z;
|
|
2933
2946
|
}
|
|
2934
|
-
function
|
|
2935
|
-
var i =
|
|
2947
|
+
function bn(e, t, n, r) {
|
|
2948
|
+
var i = ct(e, t);
|
|
2936
2949
|
return i ? {
|
|
2937
2950
|
tagName: i.tag,
|
|
2938
2951
|
tagLower: i.tag.toLowerCase(),
|
|
@@ -2945,73 +2958,76 @@ function wn(e, t, n, r) {
|
|
|
2945
2958
|
endPos: i.end
|
|
2946
2959
|
} : null;
|
|
2947
2960
|
}
|
|
2948
|
-
function
|
|
2949
|
-
|
|
2950
|
-
let r =
|
|
2961
|
+
function xn(e, t, n) {
|
|
2962
|
+
gn = 0, e = Be(e), !t.refs && (t.refs = {}), t.j = lt(e, t.refs, n);
|
|
2963
|
+
let r = yn(e, t, n);
|
|
2951
2964
|
return t.refs && Object.keys(t.refs).length > 0 ? [{
|
|
2952
|
-
type:
|
|
2965
|
+
type: K.refCollection,
|
|
2953
2966
|
refs: t.refs
|
|
2954
2967
|
}, ...r] : r;
|
|
2955
2968
|
}
|
|
2956
|
-
var
|
|
2969
|
+
var Sn = /^\n+/, Cn;
|
|
2957
2970
|
try {
|
|
2958
|
-
|
|
2971
|
+
Cn = t.createElement("div").$$typeof;
|
|
2959
2972
|
} catch {
|
|
2960
|
-
|
|
2973
|
+
Cn = Symbol.for("react.transitional.element");
|
|
2961
2974
|
}
|
|
2962
|
-
function
|
|
2975
|
+
function wn(e, t, n) {
|
|
2963
2976
|
return {
|
|
2964
|
-
$$typeof:
|
|
2977
|
+
$$typeof: Cn,
|
|
2965
2978
|
type: e,
|
|
2966
2979
|
key: n == null ? null : "" + n,
|
|
2967
2980
|
ref: null,
|
|
2968
2981
|
props: t,
|
|
2969
|
-
|
|
2982
|
+
_owner: null,
|
|
2983
|
+
_store: {},
|
|
2984
|
+
k: null,
|
|
2985
|
+
l: null
|
|
2970
2986
|
};
|
|
2971
2987
|
}
|
|
2972
|
-
var
|
|
2973
|
-
function
|
|
2988
|
+
var Tn = typeof t.createContext < "u" ? t.createContext(void 0) : void 0;
|
|
2989
|
+
function En(e, n, r, i, a, o, s, c) {
|
|
2974
2990
|
switch (e.type) {
|
|
2975
|
-
case
|
|
2991
|
+
case K.blockQuote: {
|
|
2976
2992
|
let t = { key: r.key };
|
|
2977
|
-
return e.alert && (t.className = "markdown-alert-" + o(e.alert.toLowerCase(),
|
|
2993
|
+
return e.alert && (t.className = "markdown-alert-" + o(e.alert.toLowerCase(), Ce), e.children.unshift({
|
|
2978
2994
|
attrs: {},
|
|
2979
2995
|
children: [{
|
|
2980
|
-
type:
|
|
2996
|
+
type: K.text,
|
|
2981
2997
|
text: e.alert
|
|
2982
2998
|
}],
|
|
2983
2999
|
c: !0,
|
|
2984
|
-
type:
|
|
3000
|
+
type: K.htmlBlock,
|
|
2985
3001
|
tag: "header"
|
|
2986
3002
|
})), i("blockquote", t, n(e.children, r));
|
|
2987
3003
|
}
|
|
2988
|
-
case
|
|
2989
|
-
case
|
|
2990
|
-
case
|
|
2991
|
-
case
|
|
2992
|
-
let h = e.lang ?
|
|
3004
|
+
case K.breakLine: return i("br", { key: r.key });
|
|
3005
|
+
case K.breakThematic: return i("hr", { key: r.key });
|
|
3006
|
+
case K.frontmatter: return c.preserveFrontmatter ? i("pre", { key: r.key }, e.text) : null;
|
|
3007
|
+
case K.codeBlock:
|
|
3008
|
+
let h = e.lang ? ve(e.lang) : "";
|
|
2993
3009
|
return i("pre", { key: r.key }, i("code", {
|
|
2994
|
-
...
|
|
3010
|
+
...J(e.attrs || {}),
|
|
2995
3011
|
className: h ? `language-${h} lang-${h}` : ""
|
|
2996
3012
|
}, e.text));
|
|
2997
|
-
case
|
|
2998
|
-
case
|
|
3013
|
+
case K.codeInline: return i("code", { key: r.key }, e.text);
|
|
3014
|
+
case K.footnoteReference: return i("a", {
|
|
2999
3015
|
key: r.key,
|
|
3000
3016
|
href: a(e.target, "a", "href") || void 0
|
|
3001
3017
|
}, i("sup", { key: r.key }, e.text));
|
|
3002
|
-
case
|
|
3018
|
+
case K.gfmTask: return i("input", {
|
|
3003
3019
|
checked: e.completed,
|
|
3004
3020
|
key: r.key,
|
|
3005
3021
|
readOnly: !0,
|
|
3006
3022
|
type: "checkbox"
|
|
3007
3023
|
});
|
|
3008
|
-
case
|
|
3024
|
+
case K.heading: return i(`h${e.level}`, {
|
|
3009
3025
|
id: e.id,
|
|
3010
3026
|
key: r.key
|
|
3011
3027
|
}, n(e.children, r));
|
|
3012
|
-
case
|
|
3028
|
+
case K.htmlBlock: {
|
|
3013
3029
|
let h = e;
|
|
3014
|
-
if (c.tagfilter &&
|
|
3030
|
+
if (c.tagfilter && Ke(h.tag)) {
|
|
3015
3031
|
var l = "";
|
|
3016
3032
|
if (h.attrs) for (var u in h.attrs) {
|
|
3017
3033
|
var d = h.attrs[u];
|
|
@@ -3021,33 +3037,33 @@ function An(e, n, r, i, a, o, s, c) {
|
|
|
3021
3037
|
}
|
|
3022
3038
|
if (h.a && h.c) {
|
|
3023
3039
|
let l = function(e) {
|
|
3024
|
-
if ((e.type ===
|
|
3025
|
-
if (e.type ===
|
|
3040
|
+
if ((e.type === K.htmlSelfClosing || e.type === K.htmlBlock) && e.b) return [];
|
|
3041
|
+
if (e.type === K.paragraph) {
|
|
3026
3042
|
let t = e.children;
|
|
3027
3043
|
return t ? t.flatMap(l) : [];
|
|
3028
3044
|
}
|
|
3029
|
-
return e.type ===
|
|
3045
|
+
return e.type === K.text ? e.text?.trim() ? [e] : [] : e.type === K.htmlBlock && e.children ? [{
|
|
3030
3046
|
...e,
|
|
3031
3047
|
children: e.children?.flatMap(l)
|
|
3032
3048
|
}] : [e];
|
|
3033
3049
|
}, u = function(e) {
|
|
3034
|
-
for (var t = 0; t < e.length; t++) e[t].type ===
|
|
3050
|
+
for (var t = 0; t < e.length; t++) e[t].type === K.htmlBlock && (e[t].c = !1), "children" in e[t] && e[t].children && u(e[t].children);
|
|
3035
3051
|
}, d = function(e, t) {
|
|
3036
3052
|
for (var n = 0; n < e.length; n++) {
|
|
3037
3053
|
var r = e[n];
|
|
3038
|
-
if (r.type ===
|
|
3054
|
+
if (r.type === K.paragraph && r.children) for (var i = r.children, a = 0; a < i.length; a++) {
|
|
3039
3055
|
var o = i[a];
|
|
3040
|
-
if (o.type ===
|
|
3056
|
+
if (o.type === K.htmlSelfClosing && o.b && o.tag.toLowerCase() === t) {
|
|
3041
3057
|
var s = e.slice(0, n);
|
|
3042
3058
|
a > 0 && s.push({
|
|
3043
|
-
type:
|
|
3059
|
+
type: K.paragraph,
|
|
3044
3060
|
children: i.slice(0, a)
|
|
3045
3061
|
});
|
|
3046
3062
|
var c = [];
|
|
3047
3063
|
if (a + 1 < i.length) {
|
|
3048
3064
|
var l = i.slice(a + 1);
|
|
3049
3065
|
l = l.filter(function(e) {
|
|
3050
|
-
return !(e.type ===
|
|
3066
|
+
return !(e.type === K.htmlSelfClosing && e.b);
|
|
3051
3067
|
}), l.length > 0 && (c = l);
|
|
3052
3068
|
}
|
|
3053
3069
|
return c = c.concat(e.slice(n + 1)), {
|
|
@@ -3057,7 +3073,7 @@ function An(e, n, r, i, a, o, s, c) {
|
|
|
3057
3073
|
};
|
|
3058
3074
|
}
|
|
3059
3075
|
}
|
|
3060
|
-
if ((r.type ===
|
|
3076
|
+
if ((r.type === K.htmlSelfClosing || r.type === K.htmlBlock) && r.b && r.tag.toLowerCase() === t) return {
|
|
3061
3077
|
found: !0,
|
|
3062
3078
|
beforeClose: e.slice(0, n),
|
|
3063
3079
|
afterClose: e.slice(n + 1)
|
|
@@ -3068,44 +3084,44 @@ function An(e, n, r, i, a, o, s, c) {
|
|
|
3068
3084
|
beforeClose: e,
|
|
3069
3085
|
afterClose: []
|
|
3070
3086
|
};
|
|
3071
|
-
}, g = h.tag.toLowerCase(), _ =
|
|
3087
|
+
}, g = h.tag.toLowerCase(), _ = at(g), v = h.children && h.children.length > 0, y = /<[a-z][^>]{0,100}>/i.test(h.a);
|
|
3072
3088
|
if (_) {
|
|
3073
3089
|
let t = h.a.replace(RegExp("\\s*</" + g + ">\\s*$", "i"), "");
|
|
3074
|
-
return c.tagfilter && (t =
|
|
3090
|
+
return c.tagfilter && (t = Je(t)), y ? i(e.tag, {
|
|
3075
3091
|
key: r.key,
|
|
3076
|
-
...
|
|
3092
|
+
...J(e.attrs || {}),
|
|
3077
3093
|
dangerouslySetInnerHTML: { __html: t }
|
|
3078
3094
|
}) : i(e.tag, {
|
|
3079
3095
|
key: r.key,
|
|
3080
|
-
...
|
|
3096
|
+
...J(e.attrs || {})
|
|
3081
3097
|
}, t);
|
|
3082
3098
|
}
|
|
3083
3099
|
let b = RegExp(`^<${h.tag}(\\s|>)`, "i").test(h.a);
|
|
3084
|
-
if (v && !b && c.tagfilter &&
|
|
3100
|
+
if (v && !b && c.tagfilter && qe(h.a)) return i(e.tag, {
|
|
3085
3101
|
key: r.key,
|
|
3086
|
-
...
|
|
3102
|
+
...J(e.attrs || {})
|
|
3087
3103
|
}, n(h.children, r));
|
|
3088
|
-
if (
|
|
3089
|
-
let t = c.tagfilter ?
|
|
3104
|
+
if (ot(h.a)) {
|
|
3105
|
+
let t = c.tagfilter ? Je(h.a) : h.a;
|
|
3090
3106
|
return i(e.tag, {
|
|
3091
3107
|
key: r.key,
|
|
3092
|
-
...
|
|
3108
|
+
...J(e.attrs || {}),
|
|
3093
3109
|
dangerouslySetInnerHTML: { __html: t }
|
|
3094
3110
|
});
|
|
3095
3111
|
}
|
|
3096
3112
|
let x = {
|
|
3097
|
-
slugify: (e) => o(e,
|
|
3113
|
+
slugify: (e) => o(e, Ce),
|
|
3098
3114
|
sanitizer: a,
|
|
3099
3115
|
tagfilter: !0
|
|
3100
3116
|
}, S = h.a.replace(/>\s+</g, "><").replace(/\n+/g, " ").trim();
|
|
3101
3117
|
if (RegExp(`^<${h.tag}(\\s[^>]*)?>(\\s*</${h.tag}>)?$`, "i").test(S)) return h.children && h.children.length > 0 ? i(e.tag, {
|
|
3102
3118
|
key: r.key,
|
|
3103
|
-
...
|
|
3119
|
+
...J(e.attrs || {})
|
|
3104
3120
|
}, n(h.children, r)) : i(e.tag, {
|
|
3105
3121
|
key: r.key,
|
|
3106
|
-
...
|
|
3122
|
+
...J(e.attrs || {})
|
|
3107
3123
|
});
|
|
3108
|
-
let C =
|
|
3124
|
+
let C = xn(S, {
|
|
3109
3125
|
inline: !1,
|
|
3110
3126
|
refs: s,
|
|
3111
3127
|
inHTML: !1
|
|
@@ -3114,33 +3130,33 @@ function An(e, n, r, i, a, o, s, c) {
|
|
|
3114
3130
|
let w = h.tag.toLowerCase(), T = "</" + w + ">", E = RegExp(`^<${h.tag}(\\s|>)`, "i").test(S), D = S.toLowerCase().trimEnd().endsWith(T), O = E && D;
|
|
3115
3131
|
if (O && v) return i(e.tag, {
|
|
3116
3132
|
key: r.key,
|
|
3117
|
-
...
|
|
3133
|
+
...J(e.attrs || {})
|
|
3118
3134
|
}, n(h.children, r));
|
|
3119
3135
|
if (O) return n(C.flatMap(l), r);
|
|
3120
3136
|
var f = d(C, w);
|
|
3121
3137
|
if (f.found && f.afterClose.length > 0) {
|
|
3122
3138
|
var p = f.beforeClose.flatMap(l), m = f.afterClose.flatMap(l);
|
|
3123
|
-
return
|
|
3139
|
+
return wn(t.Fragment, { children: [i(e.tag, {
|
|
3124
3140
|
key: r.key,
|
|
3125
|
-
...
|
|
3141
|
+
...J(e.attrs || {})
|
|
3126
3142
|
}, n(p, r)), n(m, r)] }, null);
|
|
3127
3143
|
}
|
|
3128
3144
|
return i(e.tag, {
|
|
3129
3145
|
key: r.key,
|
|
3130
|
-
...
|
|
3146
|
+
...J(e.attrs || {})
|
|
3131
3147
|
}, n(C.flatMap(l), r));
|
|
3132
3148
|
}
|
|
3133
|
-
return
|
|
3149
|
+
return we(e.tag) ? i(e.tag, {
|
|
3134
3150
|
key: r.key,
|
|
3135
|
-
...
|
|
3151
|
+
...J(e.attrs || {})
|
|
3136
3152
|
}) : i(e.tag, {
|
|
3137
3153
|
key: r.key,
|
|
3138
|
-
...
|
|
3154
|
+
...J(e.attrs || {})
|
|
3139
3155
|
}, e.children ? n(e.children, r) : "");
|
|
3140
3156
|
}
|
|
3141
|
-
case
|
|
3157
|
+
case K.htmlSelfClosing: {
|
|
3142
3158
|
let t = e;
|
|
3143
|
-
if (c.tagfilter &&
|
|
3159
|
+
if (c.tagfilter && Ke(t.tag)) {
|
|
3144
3160
|
var l = "";
|
|
3145
3161
|
if (t.attrs) for (var u in t.attrs) {
|
|
3146
3162
|
var d = t.attrs[u];
|
|
@@ -3150,10 +3166,10 @@ function An(e, n, r, i, a, o, s, c) {
|
|
|
3150
3166
|
}
|
|
3151
3167
|
return i(e.tag, {
|
|
3152
3168
|
key: r.key,
|
|
3153
|
-
...
|
|
3169
|
+
...J(e.attrs || {})
|
|
3154
3170
|
});
|
|
3155
3171
|
}
|
|
3156
|
-
case
|
|
3172
|
+
case K.image: {
|
|
3157
3173
|
let t = e.target == null ? null : a(e.target, "img", "src");
|
|
3158
3174
|
return i("img", {
|
|
3159
3175
|
key: r.key,
|
|
@@ -3162,18 +3178,18 @@ function An(e, n, r, i, a, o, s, c) {
|
|
|
3162
3178
|
src: t || void 0
|
|
3163
3179
|
});
|
|
3164
3180
|
}
|
|
3165
|
-
case
|
|
3181
|
+
case K.link: {
|
|
3166
3182
|
let t = { key: r.key };
|
|
3167
|
-
return e.target != null && (t.href =
|
|
3183
|
+
return e.target != null && (t.href = He(e.target)), e.title && (t.title = e.title), i("a", t, n(e.children, r));
|
|
3168
3184
|
}
|
|
3169
|
-
case
|
|
3185
|
+
case K.table: {
|
|
3170
3186
|
let t = e;
|
|
3171
3187
|
return i("table", { key: r.key }, i("thead", null, i("tr", null, t.header.map(function(e, a) {
|
|
3172
3188
|
return i("th", {
|
|
3173
3189
|
key: a,
|
|
3174
3190
|
style: t.align[a] == null ? {} : { textAlign: t.align[a] }
|
|
3175
3191
|
}, n(e, r));
|
|
3176
|
-
}))), i("tbody", null, t.cells.map(function(e, a) {
|
|
3192
|
+
}))), t.cells.length > 0 && i("tbody", null, t.cells.map(function(e, a) {
|
|
3177
3193
|
return i("tr", { key: a }, e.map(function(e, a) {
|
|
3178
3194
|
return i("td", {
|
|
3179
3195
|
key: a,
|
|
@@ -3182,21 +3198,21 @@ function An(e, n, r, i, a, o, s, c) {
|
|
|
3182
3198
|
}));
|
|
3183
3199
|
})));
|
|
3184
3200
|
}
|
|
3185
|
-
case
|
|
3186
|
-
case
|
|
3187
|
-
case
|
|
3188
|
-
case
|
|
3201
|
+
case K.text: return e.text;
|
|
3202
|
+
case K.textFormatted: return i(e.tag, { key: r.key }, n(e.children, r));
|
|
3203
|
+
case K.orderedList:
|
|
3204
|
+
case K.unorderedList: return i(e.type === K.orderedList ? "ol" : "ul", {
|
|
3189
3205
|
key: r.key,
|
|
3190
|
-
start: e.type ===
|
|
3206
|
+
start: e.type === K.orderedList ? e.start : void 0
|
|
3191
3207
|
}, e.items.map(function(e, t) {
|
|
3192
3208
|
return i("li", { key: t }, n(e, r));
|
|
3193
3209
|
}));
|
|
3194
|
-
case
|
|
3195
|
-
case
|
|
3210
|
+
case K.paragraph: return i("p", { key: r.key }, n(e.children, r));
|
|
3211
|
+
case K.ref: return null;
|
|
3196
3212
|
default: return null;
|
|
3197
3213
|
}
|
|
3198
3214
|
}
|
|
3199
|
-
var
|
|
3215
|
+
var Dn = (e, t, n, r, i, a) => {
|
|
3200
3216
|
var o = (e) => e.map(function(e) {
|
|
3201
3217
|
return "text" in e ? e.text : "";
|
|
3202
3218
|
}), s = (c, l = {}) => {
|
|
@@ -3205,7 +3221,7 @@ var jn = (e, t, n, r, i, a) => {
|
|
|
3205
3221
|
l.renderDepth = u;
|
|
3206
3222
|
for (var d = l.key, f = [], p = !1, m = 0; m < c.length; m++) {
|
|
3207
3223
|
l.key = m;
|
|
3208
|
-
var h = e ? e(
|
|
3224
|
+
var h = e ? e(En.bind(null, c[m], s, l, t, n, r, i, a), c[m], s, l) : En(c[m], s, l, t, n, r, i, a), g = typeof h == "string";
|
|
3209
3225
|
if (g && p) f[f.length - 1] += h;
|
|
3210
3226
|
else if (h !== null) if (Array.isArray(h)) for (var _ = 0; _ < h.length; _++) f.push(h[_]);
|
|
3211
3227
|
else f.push(h);
|
|
@@ -3214,14 +3230,14 @@ var jn = (e, t, n, r, i, a) => {
|
|
|
3214
3230
|
return l.key = d, l.renderDepth = u - 1, f;
|
|
3215
3231
|
};
|
|
3216
3232
|
return s;
|
|
3217
|
-
},
|
|
3218
|
-
let n =
|
|
3219
|
-
return n ? typeof n == "function" || typeof n == "object" && "render" in n ? n :
|
|
3233
|
+
}, On = (e, t) => {
|
|
3234
|
+
let n = Ve(t, e, void 0);
|
|
3235
|
+
return n ? typeof n == "function" || typeof n == "object" && "render" in n ? n : Ve(t, `${e}.component`, e) : e;
|
|
3220
3236
|
};
|
|
3221
|
-
function
|
|
3237
|
+
function kn(e, t) {
|
|
3222
3238
|
let n = { ...t || {} };
|
|
3223
3239
|
n.overrides = n.overrides || {};
|
|
3224
|
-
let r = n.slugify ||
|
|
3240
|
+
let r = n.slugify || Ce, i = n.sanitizer || be, a = n.createElement, o = n.overrides && Object.keys(n.overrides).length > 0, s = (e) => An(e, {
|
|
3225
3241
|
...n,
|
|
3226
3242
|
wrapper: null
|
|
3227
3243
|
});
|
|
@@ -3229,32 +3245,32 @@ function Nn(e, t) {
|
|
|
3229
3245
|
var i = t || {};
|
|
3230
3246
|
for (var c in i) {
|
|
3231
3247
|
var l = i[c];
|
|
3232
|
-
if (typeof l == "string" && l.length > 0 && l.charCodeAt(0) ===
|
|
3248
|
+
if (typeof l == "string" && l.length > 0 && l.charCodeAt(0) === w && (Ye.test(l) || Xe.test(l) || bn(l, 0))) {
|
|
3233
3249
|
var u = s(l.trim());
|
|
3234
3250
|
i[c] = c === "innerHTML" && Array.isArray(u) ? u[0] : u;
|
|
3235
3251
|
}
|
|
3236
3252
|
}
|
|
3237
3253
|
var d = e;
|
|
3238
3254
|
if (o) {
|
|
3239
|
-
var f =
|
|
3240
|
-
d =
|
|
3255
|
+
var f = Ve(n.overrides, e + ".props", {});
|
|
3256
|
+
d = On(e, n.overrides), i = {
|
|
3241
3257
|
...i,
|
|
3242
3258
|
...f,
|
|
3243
|
-
className:
|
|
3259
|
+
className: Ue(i.className, f.className) || void 0
|
|
3244
3260
|
};
|
|
3245
3261
|
}
|
|
3246
3262
|
if (!a) {
|
|
3247
3263
|
var p = i.key;
|
|
3248
|
-
return p != null && delete i.key, r.length === 1 ? i.children = r[0] : r.length > 1 && (i.children = r),
|
|
3264
|
+
return p != null && delete i.key, r.length === 1 ? i.children = r[0] : r.length > 1 && (i.children = r), wn(d, i, p);
|
|
3249
3265
|
}
|
|
3250
3266
|
return a(d, i, ...r);
|
|
3251
3267
|
}
|
|
3252
3268
|
let l = {
|
|
3253
3269
|
...n,
|
|
3254
|
-
slugify: (e) => r(e,
|
|
3270
|
+
slugify: (e) => r(e, Ce),
|
|
3255
3271
|
sanitizer: i,
|
|
3256
3272
|
tagfilter: n.tagfilter !== !1
|
|
3257
|
-
}, u = e[0] && e[0].type ===
|
|
3273
|
+
}, u = e[0] && e[0].type === K.refCollection ? e[0].refs : {}, d = Dn(n.renderRule, c, i, r, u, n), f = d(e, {
|
|
3258
3274
|
inline: n.forceInline,
|
|
3259
3275
|
refs: u
|
|
3260
3276
|
}), p = [];
|
|
@@ -3263,12 +3279,12 @@ function Nn(e, t) {
|
|
|
3263
3279
|
footnote: u[e].target
|
|
3264
3280
|
});
|
|
3265
3281
|
if (p.length && f.push(c("footer", { key: "footer" }, p.map(function(e) {
|
|
3266
|
-
let t = e.identifier.charCodeAt(0) === h ? e.identifier.slice(1) : e.identifier, n =
|
|
3282
|
+
let t = e.identifier.charCodeAt(0) === h ? e.identifier.slice(1) : e.identifier, n = xn(e.footnote, {
|
|
3267
3283
|
inline: !0,
|
|
3268
3284
|
refs: u
|
|
3269
3285
|
}, l);
|
|
3270
3286
|
return c("div", {
|
|
3271
|
-
id: r(t,
|
|
3287
|
+
id: r(t, Ce),
|
|
3272
3288
|
key: e.identifier
|
|
3273
3289
|
}, t + ": ", d(n, {
|
|
3274
3290
|
inline: !0,
|
|
@@ -3279,25 +3295,25 @@ function Nn(e, t) {
|
|
|
3279
3295
|
if (f.length > 1 || n.forceWrapper) g = f;
|
|
3280
3296
|
else return f.length === 1 ? f[0] : null;
|
|
3281
3297
|
var _ = n.wrapperProps ? { ...n.wrapperProps } : {};
|
|
3282
|
-
return _.children = g,
|
|
3298
|
+
return _.children = g, wn(m, _, "outer");
|
|
3283
3299
|
}
|
|
3284
|
-
function
|
|
3300
|
+
function An(e = "", t = {}) {
|
|
3285
3301
|
let n = { ...t || {} };
|
|
3286
3302
|
n.overrides = n.overrides || {};
|
|
3287
|
-
let r = n.slugify ||
|
|
3303
|
+
let r = n.slugify || Ce, i = n.sanitizer || be;
|
|
3288
3304
|
function a(e) {
|
|
3289
|
-
let t = n.forceInline || !n.forceBlock && !
|
|
3305
|
+
let t = n.forceInline || !n.forceBlock && !Y.test(e), a = {
|
|
3290
3306
|
...n,
|
|
3291
|
-
slugify: (e) => r(e,
|
|
3307
|
+
slugify: (e) => r(e, Ce),
|
|
3292
3308
|
sanitizer: i,
|
|
3293
3309
|
tagfilter: n.tagfilter !== !1
|
|
3294
3310
|
};
|
|
3295
|
-
t ||
|
|
3311
|
+
t || lt(e, o, a);
|
|
3296
3312
|
let s = e;
|
|
3297
3313
|
if (!t) {
|
|
3298
3314
|
let e = s.length;
|
|
3299
3315
|
for (; e > 0 && (s[e - 1] === "\n" || s[e - 1] === "\r");) e--;
|
|
3300
|
-
s = s.slice(0, e), s = `${s.replace(
|
|
3316
|
+
s = s.slice(0, e), s = `${s.replace(Sn, "")}
|
|
3301
3317
|
|
|
3302
3318
|
`;
|
|
3303
3319
|
}
|
|
@@ -3305,7 +3321,7 @@ function Pn(e = "", t = {}) {
|
|
|
3305
3321
|
let e = s.lastIndexOf("<");
|
|
3306
3322
|
e !== -1 && s.slice(e).indexOf(">") === -1 && (s = s.slice(0, e));
|
|
3307
3323
|
}
|
|
3308
|
-
return
|
|
3324
|
+
return kn(xn(t ? e : s, {
|
|
3309
3325
|
inline: t,
|
|
3310
3326
|
refs: o
|
|
3311
3327
|
}, a), {
|
|
@@ -3316,19 +3332,16 @@ function Pn(e = "", t = {}) {
|
|
|
3316
3332
|
let o = {};
|
|
3317
3333
|
return a(e);
|
|
3318
3334
|
}
|
|
3319
|
-
var
|
|
3320
|
-
if (!(typeof t.useContext < "u")) {
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
wrapperProps
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
return Pn(e ?? "", t);
|
|
3330
|
-
}
|
|
3331
|
-
let i = t.useContext(kn), a = t.useMemo(() => ({
|
|
3335
|
+
var jn = ({ children: e, options: n, ...r }) => {
|
|
3336
|
+
if (!(typeof t.useContext < "u")) return An(e ?? "", {
|
|
3337
|
+
...n,
|
|
3338
|
+
overrides: { ...n?.overrides },
|
|
3339
|
+
wrapperProps: {
|
|
3340
|
+
...n?.wrapperProps,
|
|
3341
|
+
...r
|
|
3342
|
+
}
|
|
3343
|
+
});
|
|
3344
|
+
let i = t.useContext(Tn), a = t.useMemo(() => ({
|
|
3332
3345
|
...i,
|
|
3333
3346
|
...n,
|
|
3334
3347
|
overrides: {
|
|
@@ -3345,8 +3358,8 @@ var Fn = ({ children: e, options: n, ...r }) => {
|
|
|
3345
3358
|
n,
|
|
3346
3359
|
r
|
|
3347
3360
|
]), o = e ?? "";
|
|
3348
|
-
return t.useMemo(() =>
|
|
3349
|
-
},
|
|
3361
|
+
return t.useMemo(() => An(o, a), [o, a]);
|
|
3362
|
+
}, Mn = /* @__PURE__ */ e({ default: () => Fn }), Nn = {
|
|
3350
3363
|
small: {
|
|
3351
3364
|
1: "dc:text-lg",
|
|
3352
3365
|
2: "dc:text-base",
|
|
@@ -3362,11 +3375,11 @@ var Fn = ({ children: e, options: n, ...r }) => {
|
|
|
3362
3375
|
2: "dc:text-4xl",
|
|
3363
3376
|
3: "dc:text-3xl"
|
|
3364
3377
|
}
|
|
3365
|
-
},
|
|
3378
|
+
}, Pn = {
|
|
3366
3379
|
1: "dc:mb-4",
|
|
3367
3380
|
2: "dc:mb-3",
|
|
3368
3381
|
3: "dc:mb-2"
|
|
3369
|
-
},
|
|
3382
|
+
}, Fn = n.memo(function({ displayConfig: e = {}, height: t = "100%", colorPalette: n }) {
|
|
3370
3383
|
let o = e.content || "", s = e.accentColorIndex ?? 0, c = e.fontSize || "medium", l = e.alignment || "left", u = !!e.transparentBackground, d = e.accentBorder || "none", f = r(() => n?.colors && s < n.colors.length ? n.colors[s] : "#8884d8", [n, s]), p = {
|
|
3371
3384
|
small: "dc:text-sm",
|
|
3372
3385
|
medium: "dc:text-lg",
|
|
@@ -3377,15 +3390,15 @@ var Fn = ({ children: e, options: n, ...r }) => {
|
|
|
3377
3390
|
right: "dc:text-right"
|
|
3378
3391
|
}, h = r(() => ({ overrides: {
|
|
3379
3392
|
h1: { props: {
|
|
3380
|
-
className: `dc:font-bold ${
|
|
3393
|
+
className: `dc:font-bold ${Nn[c]?.[1] || "dc:text-3xl"} ${Pn[1]}`,
|
|
3381
3394
|
style: { color: f }
|
|
3382
3395
|
} },
|
|
3383
3396
|
h2: { props: {
|
|
3384
|
-
className: `dc:font-bold ${
|
|
3397
|
+
className: `dc:font-bold ${Nn[c]?.[2] || "dc:text-2xl"} ${Pn[2]}`,
|
|
3385
3398
|
style: { color: f }
|
|
3386
3399
|
} },
|
|
3387
3400
|
h3: { props: {
|
|
3388
|
-
className: `dc:font-bold ${
|
|
3401
|
+
className: `dc:font-bold ${Nn[c]?.[3] || "dc:text-xl"} ${Pn[3]}`,
|
|
3389
3402
|
style: { color: f }
|
|
3390
3403
|
} },
|
|
3391
3404
|
p: { props: { className: "dc:mb-3 dc:leading-relaxed text-dc-text" } },
|
|
@@ -3445,13 +3458,13 @@ var Fn = ({ children: e, options: n, ...r }) => {
|
|
|
3445
3458
|
height: t === "100%" ? "100%" : t,
|
|
3446
3459
|
...g
|
|
3447
3460
|
},
|
|
3448
|
-
children: /* @__PURE__ */ i(
|
|
3461
|
+
children: /* @__PURE__ */ i(jn, {
|
|
3449
3462
|
options: h,
|
|
3450
3463
|
children: o
|
|
3451
3464
|
})
|
|
3452
3465
|
});
|
|
3453
3466
|
});
|
|
3454
3467
|
//#endregion
|
|
3455
|
-
export {
|
|
3468
|
+
export { Mn as n, jn as r, Fn as t };
|
|
3456
3469
|
|
|
3457
|
-
//# sourceMappingURL=chart-markdown-
|
|
3470
|
+
//# sourceMappingURL=chart-markdown-B2X4IwLO.js.map
|