@linkdesk/ui 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.js +954 -954
- package/dist/theme-picker/ThemePicker.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5,8 +5,8 @@ var Fe = (e, t, n) => Js(e, typeof t != "symbol" ? t + "" : t, n);
|
|
|
5
5
|
import { jsx as U, jsxs as se, Fragment as Au } from "react/jsx-runtime";
|
|
6
6
|
import { memo as Zs, useMemo as ve, useRef as ce, useEffect as re, useState as oe, useCallback as pe, useLayoutEffect as Ir, forwardRef as yr, useImperativeHandle as eo, useContext as to, createContext as no, createElement as sr } from "react";
|
|
7
7
|
import ro, { createPortal as Nr } from "react-dom";
|
|
8
|
-
import { useTranslation as
|
|
9
|
-
function
|
|
8
|
+
import { useTranslation as dt } from "react-i18next";
|
|
9
|
+
function dT({ children: e, title: t }) {
|
|
10
10
|
return /* @__PURE__ */ U("span", { className: "ldk-badge", title: t, children: e });
|
|
11
11
|
}
|
|
12
12
|
function ti(e) {
|
|
@@ -89,8 +89,8 @@ Ne.prototype.property = "";
|
|
|
89
89
|
Ne.prototype.spaceSeparated = !1;
|
|
90
90
|
Ne.prototype.space = void 0;
|
|
91
91
|
let lo = 0;
|
|
92
|
-
const $ =
|
|
93
|
-
function
|
|
92
|
+
const $ = ft(), me = ft(), or = ft(), v = ft(), ue = ft(), st = ft(), Se = ft();
|
|
93
|
+
function ft() {
|
|
94
94
|
return 2 ** ++lo;
|
|
95
95
|
}
|
|
96
96
|
const lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -1226,7 +1226,7 @@ function bo() {
|
|
|
1226
1226
|
if (si) return Hn;
|
|
1227
1227
|
si = 1;
|
|
1228
1228
|
var e = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, t = /\n/g, n = /^\s*/, r = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, i = /^:\s*/, u = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, a = /^[;\s]*/, o = /^\s+|\s+$/g, l = `
|
|
1229
|
-
`, c = "/",
|
|
1229
|
+
`, c = "/", f = "*", d = "", m = "comment", h = "declaration";
|
|
1230
1230
|
function T(N, k) {
|
|
1231
1231
|
if (typeof N != "string")
|
|
1232
1232
|
throw new TypeError("First argument must be a string");
|
|
@@ -1273,10 +1273,10 @@ function bo() {
|
|
|
1273
1273
|
}
|
|
1274
1274
|
function M() {
|
|
1275
1275
|
var R = q();
|
|
1276
|
-
if (!(c != N.charAt(0) ||
|
|
1277
|
-
for (var O = 2;
|
|
1276
|
+
if (!(c != N.charAt(0) || f != N.charAt(1))) {
|
|
1277
|
+
for (var O = 2; d != N.charAt(O) && (f != N.charAt(O) || c != N.charAt(O + 1)); )
|
|
1278
1278
|
++O;
|
|
1279
|
-
if (O += 2,
|
|
1279
|
+
if (O += 2, d === N.charAt(O - 1))
|
|
1280
1280
|
return H("End of comment missing");
|
|
1281
1281
|
var W = N.slice(2, O - 2);
|
|
1282
1282
|
return S += 2, w(W), N = N.slice(O), S += 2, R({
|
|
@@ -1291,8 +1291,8 @@ function bo() {
|
|
|
1291
1291
|
if (M(), !z(i)) return H("property missing ':'");
|
|
1292
1292
|
var W = z(u), j = R({
|
|
1293
1293
|
type: h,
|
|
1294
|
-
property: I(O[0].replace(e,
|
|
1295
|
-
value: W ? I(W[0].replace(e,
|
|
1294
|
+
property: I(O[0].replace(e, d)),
|
|
1295
|
+
value: W ? I(W[0].replace(e, d)) : d
|
|
1296
1296
|
});
|
|
1297
1297
|
return z(a), j;
|
|
1298
1298
|
}
|
|
@@ -1307,7 +1307,7 @@ function bo() {
|
|
|
1307
1307
|
return F(), X();
|
|
1308
1308
|
}
|
|
1309
1309
|
function I(N) {
|
|
1310
|
-
return N ? N.replace(o,
|
|
1310
|
+
return N ? N.replace(o, d) : d;
|
|
1311
1311
|
}
|
|
1312
1312
|
return Hn = T, Hn;
|
|
1313
1313
|
}
|
|
@@ -1328,8 +1328,8 @@ function go() {
|
|
|
1328
1328
|
return a.forEach((l) => {
|
|
1329
1329
|
if (l.type !== "declaration")
|
|
1330
1330
|
return;
|
|
1331
|
-
const { property: c, value:
|
|
1332
|
-
o ? i(c,
|
|
1331
|
+
const { property: c, value: f } = l;
|
|
1332
|
+
o ? i(c, f, l) : f && (u = u || {}, u[c] = f);
|
|
1333
1333
|
}), u;
|
|
1334
1334
|
}
|
|
1335
1335
|
return Tt;
|
|
@@ -1340,12 +1340,12 @@ function _o() {
|
|
|
1340
1340
|
li = 1, Object.defineProperty(Rt, "__esModule", { value: !0 }), Rt.camelCase = void 0;
|
|
1341
1341
|
var e = /^--[a-zA-Z0-9_-]+$/, t = /-([a-z])/g, n = /^[^-]+$/, r = /^-(webkit|moz|ms|o|khtml)-/, i = /^-(ms)-/, u = function(c) {
|
|
1342
1342
|
return !c || n.test(c) || e.test(c);
|
|
1343
|
-
}, a = function(c,
|
|
1344
|
-
return
|
|
1345
|
-
}, o = function(c,
|
|
1346
|
-
return "".concat(
|
|
1347
|
-
}, l = function(c,
|
|
1348
|
-
return
|
|
1343
|
+
}, a = function(c, f) {
|
|
1344
|
+
return f.toUpperCase();
|
|
1345
|
+
}, o = function(c, f) {
|
|
1346
|
+
return "".concat(f, "-");
|
|
1347
|
+
}, l = function(c, f) {
|
|
1348
|
+
return f === void 0 && (f = {}), u(c) ? c : (c = c.toLowerCase(), f.reactCompat ? c = c.replace(i, o) : c = c.replace(r, o), c.replace(t, a));
|
|
1349
1349
|
};
|
|
1350
1350
|
return Rt.camelCase = l, Rt;
|
|
1351
1351
|
}
|
|
@@ -1384,15 +1384,15 @@ function wu(e) {
|
|
|
1384
1384
|
return { start: t, end: n };
|
|
1385
1385
|
}
|
|
1386
1386
|
function vt(e) {
|
|
1387
|
-
return !e || typeof e != "object" ? "" : "position" in e || "type" in e ?
|
|
1387
|
+
return !e || typeof e != "object" ? "" : "position" in e || "type" in e ? di(e.position) : "start" in e || "end" in e ? di(e) : "line" in e || "column" in e ? cr(e) : "";
|
|
1388
1388
|
}
|
|
1389
1389
|
function cr(e) {
|
|
1390
|
-
return
|
|
1390
|
+
return fi(e && e.line) + ":" + fi(e && e.column);
|
|
1391
1391
|
}
|
|
1392
|
-
function
|
|
1392
|
+
function di(e) {
|
|
1393
1393
|
return cr(e && e.start) + "-" + cr(e && e.end);
|
|
1394
1394
|
}
|
|
1395
|
-
function
|
|
1395
|
+
function fi(e) {
|
|
1396
1396
|
return e && typeof e == "number" ? e : 1;
|
|
1397
1397
|
}
|
|
1398
1398
|
class _e extends Error {
|
|
@@ -1893,7 +1893,7 @@ function gn(e) {
|
|
|
1893
1893
|
e !== null && (e < 32 || e === 127)
|
|
1894
1894
|
);
|
|
1895
1895
|
}
|
|
1896
|
-
const
|
|
1896
|
+
const dr = Ze(/\d/), $o = Ze(/[\dA-Fa-f]/), Ko = Ze(/[!-/:-@[-`{-~]/);
|
|
1897
1897
|
function G(e) {
|
|
1898
1898
|
return e !== null && e < -2;
|
|
1899
1899
|
}
|
|
@@ -2016,12 +2016,12 @@ function el(e) {
|
|
|
2016
2016
|
return T(S);
|
|
2017
2017
|
t.interrupt = !!(i.currentConstruct && !i._gfmTableDynamicInterruptHack);
|
|
2018
2018
|
}
|
|
2019
|
-
return t.containerState = {}, e.check(Ei,
|
|
2019
|
+
return t.containerState = {}, e.check(Ei, f, d)(S);
|
|
2020
2020
|
}
|
|
2021
|
-
function
|
|
2021
|
+
function f(S) {
|
|
2022
2022
|
return i && L(), k(r), m(S);
|
|
2023
2023
|
}
|
|
2024
|
-
function
|
|
2024
|
+
function d(S) {
|
|
2025
2025
|
return t.parser.lazy[t.now().line] = r !== n.length, a = t.now().offset, T(S);
|
|
2026
2026
|
}
|
|
2027
2027
|
function m(S) {
|
|
@@ -2107,13 +2107,13 @@ function Sn(e, t, n) {
|
|
|
2107
2107
|
}
|
|
2108
2108
|
return t;
|
|
2109
2109
|
}
|
|
2110
|
-
const
|
|
2110
|
+
const fr = {
|
|
2111
2111
|
name: "attention",
|
|
2112
2112
|
resolveAll: nl,
|
|
2113
2113
|
tokenize: rl
|
|
2114
2114
|
};
|
|
2115
2115
|
function nl(e, t) {
|
|
2116
|
-
let n = -1, r, i, u, a, o, l, c,
|
|
2116
|
+
let n = -1, r, i, u, a, o, l, c, f;
|
|
2117
2117
|
for (; ++n < e.length; )
|
|
2118
2118
|
if (e[n][0] === "enter" && e[n][1].type === "attentionSequence" && e[n][1]._close) {
|
|
2119
2119
|
for (r = n; r--; )
|
|
@@ -2122,14 +2122,14 @@ function nl(e, t) {
|
|
|
2122
2122
|
if ((e[r][1]._close || e[n][1]._open) && (e[n][1].end.offset - e[n][1].start.offset) % 3 && !((e[r][1].end.offset - e[r][1].start.offset + e[n][1].end.offset - e[n][1].start.offset) % 3))
|
|
2123
2123
|
continue;
|
|
2124
2124
|
l = e[r][1].end.offset - e[r][1].start.offset > 1 && e[n][1].end.offset - e[n][1].start.offset > 1 ? 2 : 1;
|
|
2125
|
-
const
|
|
2125
|
+
const d = {
|
|
2126
2126
|
...e[r][1].end
|
|
2127
2127
|
}, m = {
|
|
2128
2128
|
...e[n][1].start
|
|
2129
2129
|
};
|
|
2130
|
-
Ti(
|
|
2130
|
+
Ti(d, -l), Ti(m, l), a = {
|
|
2131
2131
|
type: l > 1 ? "strongSequence" : "emphasisSequence",
|
|
2132
|
-
start:
|
|
2132
|
+
start: d,
|
|
2133
2133
|
end: {
|
|
2134
2134
|
...e[r][1].end
|
|
2135
2135
|
}
|
|
@@ -2159,7 +2159,7 @@ function nl(e, t) {
|
|
|
2159
2159
|
...a.start
|
|
2160
2160
|
}, e[n][1].start = {
|
|
2161
2161
|
...o.end
|
|
2162
|
-
}, c = [], e[r][1].end.offset - e[r][1].start.offset && (c = Oe(c, [["enter", e[r][1], t], ["exit", e[r][1], t]])), c = Oe(c, [["enter", i, t], ["enter", a, t], ["exit", a, t], ["enter", u, t]]), c = Oe(c, Sn(t.parser.constructs.insideSpan.null, e.slice(r + 1, n), t)), c = Oe(c, [["exit", u, t], ["enter", o, t], ["exit", o, t], ["exit", i, t]]), e[n][1].end.offset - e[n][1].start.offset ? (
|
|
2162
|
+
}, c = [], e[r][1].end.offset - e[r][1].start.offset && (c = Oe(c, [["enter", e[r][1], t], ["exit", e[r][1], t]])), c = Oe(c, [["enter", i, t], ["enter", a, t], ["exit", a, t], ["enter", u, t]]), c = Oe(c, Sn(t.parser.constructs.insideSpan.null, e.slice(r + 1, n), t)), c = Oe(c, [["exit", u, t], ["enter", o, t], ["exit", o, t], ["exit", i, t]]), e[n][1].end.offset - e[n][1].start.offset ? (f = 2, c = Oe(c, [["enter", e[n][1], t], ["exit", e[n][1], t]])) : f = 0, Le(e, r - 1, n - r + 3, c), n = r + c.length - f - 2;
|
|
2163
2163
|
break;
|
|
2164
2164
|
}
|
|
2165
2165
|
}
|
|
@@ -2177,8 +2177,8 @@ function rl(e, t) {
|
|
|
2177
2177
|
function o(l) {
|
|
2178
2178
|
if (l === u)
|
|
2179
2179
|
return e.consume(l), o;
|
|
2180
|
-
const c = e.exit("attentionSequence"),
|
|
2181
|
-
return c._open = !!(u === 42 ?
|
|
2180
|
+
const c = e.exit("attentionSequence"), f = kt(l), d = !f || f === 2 && i || n.includes(l), m = !i || i === 2 && f || n.includes(r);
|
|
2181
|
+
return c._open = !!(u === 42 ? d : d && (i || !m)), c._close = !!(u === 42 ? m : m && (f || !d)), t(l);
|
|
2182
2182
|
}
|
|
2183
2183
|
}
|
|
2184
2184
|
function Ti(e, t) {
|
|
@@ -2207,17 +2207,17 @@ function ul(e, t, n) {
|
|
|
2207
2207
|
return h === 62 ? (e.exit("autolinkProtocol"), e.enter("autolinkMarker"), e.consume(h), e.exit("autolinkMarker"), e.exit("autolink"), t) : h === null || h === 32 || h === 60 || gn(h) ? n(h) : (e.consume(h), l);
|
|
2208
2208
|
}
|
|
2209
2209
|
function c(h) {
|
|
2210
|
-
return h === 64 ? (e.consume(h),
|
|
2211
|
-
}
|
|
2212
|
-
function d(h) {
|
|
2213
|
-
return ge(h) ? f(h) : n(h);
|
|
2210
|
+
return h === 64 ? (e.consume(h), f) : Qo(h) ? (e.consume(h), c) : n(h);
|
|
2214
2211
|
}
|
|
2215
2212
|
function f(h) {
|
|
2216
|
-
return
|
|
2213
|
+
return ge(h) ? d(h) : n(h);
|
|
2214
|
+
}
|
|
2215
|
+
function d(h) {
|
|
2216
|
+
return h === 46 ? (e.consume(h), r = 0, f) : h === 62 ? (e.exit("autolinkProtocol").type = "autolinkEmail", e.enter("autolinkMarker"), e.consume(h), e.exit("autolinkMarker"), e.exit("autolink"), t) : m(h);
|
|
2217
2217
|
}
|
|
2218
2218
|
function m(h) {
|
|
2219
2219
|
if ((h === 45 || ge(h)) && r++ < 63) {
|
|
2220
|
-
const T = h === 45 ? m :
|
|
2220
|
+
const T = h === 45 ? m : d;
|
|
2221
2221
|
return e.consume(h), T;
|
|
2222
2222
|
}
|
|
2223
2223
|
return n(h);
|
|
@@ -2288,27 +2288,27 @@ function cl(e, t, n) {
|
|
|
2288
2288
|
}
|
|
2289
2289
|
const qu = {
|
|
2290
2290
|
name: "characterReference",
|
|
2291
|
-
tokenize:
|
|
2291
|
+
tokenize: dl
|
|
2292
2292
|
};
|
|
2293
|
-
function
|
|
2293
|
+
function dl(e, t, n) {
|
|
2294
2294
|
const r = this;
|
|
2295
2295
|
let i = 0, u, a;
|
|
2296
2296
|
return o;
|
|
2297
|
-
function o(
|
|
2298
|
-
return e.enter("characterReference"), e.enter("characterReferenceMarker"), e.consume(
|
|
2297
|
+
function o(d) {
|
|
2298
|
+
return e.enter("characterReference"), e.enter("characterReferenceMarker"), e.consume(d), e.exit("characterReferenceMarker"), l;
|
|
2299
2299
|
}
|
|
2300
|
-
function l(
|
|
2301
|
-
return
|
|
2300
|
+
function l(d) {
|
|
2301
|
+
return d === 35 ? (e.enter("characterReferenceMarkerNumeric"), e.consume(d), e.exit("characterReferenceMarkerNumeric"), c) : (e.enter("characterReferenceValue"), u = 31, a = ge, f(d));
|
|
2302
2302
|
}
|
|
2303
|
-
function c(
|
|
2304
|
-
return
|
|
2303
|
+
function c(d) {
|
|
2304
|
+
return d === 88 || d === 120 ? (e.enter("characterReferenceMarkerHexadecimal"), e.consume(d), e.exit("characterReferenceMarkerHexadecimal"), e.enter("characterReferenceValue"), u = 6, a = $o, f) : (e.enter("characterReferenceValue"), u = 7, a = dr, f(d));
|
|
2305
2305
|
}
|
|
2306
|
-
function d
|
|
2307
|
-
if (
|
|
2306
|
+
function f(d) {
|
|
2307
|
+
if (d === 59 && i) {
|
|
2308
2308
|
const m = e.exit("characterReferenceValue");
|
|
2309
|
-
return a === ge && !Rr(r.sliceSerialize(m)) ? n(
|
|
2309
|
+
return a === ge && !Rr(r.sliceSerialize(m)) ? n(d) : (e.enter("characterReferenceMarker"), e.consume(d), e.exit("characterReferenceMarker"), e.exit("characterReference"), t);
|
|
2310
2310
|
}
|
|
2311
|
-
return a(
|
|
2311
|
+
return a(d) && i++ < u ? (e.consume(d), f) : n(d);
|
|
2312
2312
|
}
|
|
2313
2313
|
}
|
|
2314
2314
|
const bi = {
|
|
@@ -2317,9 +2317,9 @@ const bi = {
|
|
|
2317
2317
|
}, gi = {
|
|
2318
2318
|
concrete: !0,
|
|
2319
2319
|
name: "codeFenced",
|
|
2320
|
-
tokenize:
|
|
2320
|
+
tokenize: fl
|
|
2321
2321
|
};
|
|
2322
|
-
function
|
|
2322
|
+
function fl(e, t, n) {
|
|
2323
2323
|
const r = this, i = {
|
|
2324
2324
|
partial: !0,
|
|
2325
2325
|
tokenize: q
|
|
@@ -2331,26 +2331,26 @@ function dl(e, t, n) {
|
|
|
2331
2331
|
}
|
|
2332
2332
|
function c(C) {
|
|
2333
2333
|
const H = r.events[r.events.length - 1];
|
|
2334
|
-
return u = H && H[1].type === "linePrefix" ? H[2].sliceSerialize(H[1], !0).length : 0, o = C, e.enter("codeFenced"), e.enter("codeFencedFence"), e.enter("codeFencedFenceSequence"),
|
|
2335
|
-
}
|
|
2336
|
-
function d(C) {
|
|
2337
|
-
return C === o ? (a++, e.consume(C), d) : a < 3 ? n(C) : (e.exit("codeFencedFenceSequence"), ee(C) ? ne(e, f, "whitespace")(C) : f(C));
|
|
2334
|
+
return u = H && H[1].type === "linePrefix" ? H[2].sliceSerialize(H[1], !0).length : 0, o = C, e.enter("codeFenced"), e.enter("codeFencedFence"), e.enter("codeFencedFenceSequence"), f(C);
|
|
2338
2335
|
}
|
|
2339
2336
|
function f(C) {
|
|
2337
|
+
return C === o ? (a++, e.consume(C), f) : a < 3 ? n(C) : (e.exit("codeFencedFenceSequence"), ee(C) ? ne(e, d, "whitespace")(C) : d(C));
|
|
2338
|
+
}
|
|
2339
|
+
function d(C) {
|
|
2340
2340
|
return C === null || G(C) ? (e.exit("codeFencedFence"), r.interrupt ? t(C) : e.check(bi, I, w)(C)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", {
|
|
2341
2341
|
contentType: "string"
|
|
2342
2342
|
}), m(C));
|
|
2343
2343
|
}
|
|
2344
2344
|
function m(C) {
|
|
2345
|
-
return C === null || G(C) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"),
|
|
2345
|
+
return C === null || G(C) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), d(C)) : ee(C) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), ne(e, h, "whitespace")(C)) : C === 96 && C === o ? n(C) : (e.consume(C), m);
|
|
2346
2346
|
}
|
|
2347
2347
|
function h(C) {
|
|
2348
|
-
return C === null || G(C) ?
|
|
2348
|
+
return C === null || G(C) ? d(C) : (e.enter("codeFencedFenceMeta"), e.enter("chunkString", {
|
|
2349
2349
|
contentType: "string"
|
|
2350
2350
|
}), T(C));
|
|
2351
2351
|
}
|
|
2352
2352
|
function T(C) {
|
|
2353
|
-
return C === null || G(C) ? (e.exit("chunkString"), e.exit("codeFencedFenceMeta"),
|
|
2353
|
+
return C === null || G(C) ? (e.exit("chunkString"), e.exit("codeFencedFenceMeta"), d(C)) : C === 96 && C === o ? n(C) : (e.consume(C), T);
|
|
2354
2354
|
}
|
|
2355
2355
|
function I(C) {
|
|
2356
2356
|
return e.attempt(i, w, N)(C);
|
|
@@ -2414,8 +2414,8 @@ function pl(e, t, n) {
|
|
|
2414
2414
|
return e.enter("codeIndented"), ne(e, u, "linePrefix", 5)(c);
|
|
2415
2415
|
}
|
|
2416
2416
|
function u(c) {
|
|
2417
|
-
const
|
|
2418
|
-
return
|
|
2417
|
+
const f = r.events[r.events.length - 1];
|
|
2418
|
+
return f && f[1].type === "linePrefix" && f[2].sliceSerialize(f[1], !0).length >= 4 ? a(c) : n(c);
|
|
2419
2419
|
}
|
|
2420
2420
|
function a(c) {
|
|
2421
2421
|
return c === null ? l(c) : G(c) ? e.attempt(ml, a, l)(c) : (e.enter("codeFlowValue"), o(c));
|
|
@@ -2463,20 +2463,20 @@ function gl(e) {
|
|
|
2463
2463
|
function _l(e, t, n) {
|
|
2464
2464
|
let r = 0, i, u;
|
|
2465
2465
|
return a;
|
|
2466
|
-
function a(
|
|
2467
|
-
return e.enter("codeText"), e.enter("codeTextSequence"), o(
|
|
2466
|
+
function a(d) {
|
|
2467
|
+
return e.enter("codeText"), e.enter("codeTextSequence"), o(d);
|
|
2468
2468
|
}
|
|
2469
|
-
function o(
|
|
2470
|
-
return
|
|
2469
|
+
function o(d) {
|
|
2470
|
+
return d === 96 ? (e.consume(d), r++, o) : (e.exit("codeTextSequence"), l(d));
|
|
2471
2471
|
}
|
|
2472
|
-
function l(
|
|
2473
|
-
return
|
|
2472
|
+
function l(d) {
|
|
2473
|
+
return d === null ? n(d) : d === 32 ? (e.enter("space"), e.consume(d), e.exit("space"), l) : d === 96 ? (u = e.enter("codeTextSequence"), i = 0, f(d)) : G(d) ? (e.enter("lineEnding"), e.consume(d), e.exit("lineEnding"), l) : (e.enter("codeTextData"), c(d));
|
|
2474
2474
|
}
|
|
2475
|
-
function c(
|
|
2476
|
-
return
|
|
2475
|
+
function c(d) {
|
|
2476
|
+
return d === null || d === 32 || d === 96 || G(d) ? (e.exit("codeTextData"), l(d)) : (e.consume(d), c);
|
|
2477
2477
|
}
|
|
2478
|
-
function d
|
|
2479
|
-
return
|
|
2478
|
+
function f(d) {
|
|
2479
|
+
return d === 96 ? (e.consume(d), i++, f) : i === r ? (e.exit("codeTextSequence"), e.exit("codeText"), t(d)) : (u.type = "codeTextData", c(d));
|
|
2480
2480
|
}
|
|
2481
2481
|
}
|
|
2482
2482
|
class Al {
|
|
@@ -2654,26 +2654,26 @@ function Pt(e, t) {
|
|
|
2654
2654
|
function Vu(e) {
|
|
2655
2655
|
const t = {};
|
|
2656
2656
|
let n = -1, r, i, u, a, o, l, c;
|
|
2657
|
-
const
|
|
2658
|
-
for (; ++n <
|
|
2657
|
+
const f = new Al(e);
|
|
2658
|
+
for (; ++n < f.length; ) {
|
|
2659
2659
|
for (; n in t; )
|
|
2660
2660
|
n = t[n];
|
|
2661
|
-
if (r =
|
|
2661
|
+
if (r = f.get(n), n && r[1].type === "chunkFlow" && f.get(n - 1)[1].type === "listItemPrefix" && (l = r[1]._tokenizer.events, u = 0, u < l.length && l[u][1].type === "lineEndingBlank" && (u += 2), u < l.length && l[u][1].type === "content"))
|
|
2662
2662
|
for (; ++u < l.length && l[u][1].type !== "content"; )
|
|
2663
2663
|
l[u][1].type === "chunkText" && (l[u][1]._isInFirstContentOfListItem = !0, u++);
|
|
2664
2664
|
if (r[0] === "enter")
|
|
2665
|
-
r[1].contentType && (Object.assign(t, kl(
|
|
2665
|
+
r[1].contentType && (Object.assign(t, kl(f, n)), n = t[n], c = !0);
|
|
2666
2666
|
else if (r[1]._container) {
|
|
2667
2667
|
for (u = n, i = void 0; u--; )
|
|
2668
|
-
if (a =
|
|
2669
|
-
a[0] === "enter" && (i && (
|
|
2668
|
+
if (a = f.get(u), a[1].type === "lineEnding" || a[1].type === "lineEndingBlank")
|
|
2669
|
+
a[0] === "enter" && (i && (f.get(i)[1].type = "lineEndingBlank"), a[1].type = "lineEnding", i = u);
|
|
2670
2670
|
else if (!(a[1].type === "linePrefix" || a[1].type === "listItemIndent")) break;
|
|
2671
2671
|
i && (r[1].end = {
|
|
2672
|
-
...
|
|
2673
|
-
}, o =
|
|
2672
|
+
...f.get(i)[1].start
|
|
2673
|
+
}, o = f.slice(i, n), o.unshift(r), f.splice(i, n - i + 1, o));
|
|
2674
2674
|
}
|
|
2675
2675
|
}
|
|
2676
|
-
return Le(e, 0, Number.POSITIVE_INFINITY,
|
|
2676
|
+
return Le(e, 0, Number.POSITIVE_INFINITY, f.slice(0)), !c;
|
|
2677
2677
|
}
|
|
2678
2678
|
function kl(e, t) {
|
|
2679
2679
|
const n = e.get(t)[1], r = e.get(t)[2];
|
|
@@ -2682,12 +2682,12 @@ function kl(e, t) {
|
|
|
2682
2682
|
let a = n._tokenizer;
|
|
2683
2683
|
a || (a = r.parser[n.contentType](n.start), n._contentTypeTextTrailing && (a._contentTypeTextTrailing = !0));
|
|
2684
2684
|
const o = a.events, l = [], c = {};
|
|
2685
|
-
let
|
|
2685
|
+
let f, d, m = -1, h = n, T = 0, I = 0;
|
|
2686
2686
|
const N = [I];
|
|
2687
2687
|
for (; h; ) {
|
|
2688
2688
|
for (; e.get(++i)[1] !== h; )
|
|
2689
2689
|
;
|
|
2690
|
-
u.push(i), h._tokenizer || (
|
|
2690
|
+
u.push(i), h._tokenizer || (f = r.sliceStream(h), h.next || f.push(null), d && a.defineSkip(h.start), h._isInFirstContentOfListItem && (a._gfmTasklistFirstContentOfListItem = !0), a.write(f), h._isInFirstContentOfListItem && (a._gfmTasklistFirstContentOfListItem = void 0)), d = h, h = h.next;
|
|
2691
2691
|
}
|
|
2692
2692
|
for (h = n; ++m < o.length; )
|
|
2693
2693
|
// Find a void token that includes a break.
|
|
@@ -2746,9 +2746,9 @@ function xl(e, t, n) {
|
|
|
2746
2746
|
}
|
|
2747
2747
|
function Wu(e, t, n, r, i, u, a, o, l) {
|
|
2748
2748
|
const c = l || Number.POSITIVE_INFINITY;
|
|
2749
|
-
let
|
|
2750
|
-
return
|
|
2751
|
-
function
|
|
2749
|
+
let f = 0;
|
|
2750
|
+
return d;
|
|
2751
|
+
function d(k) {
|
|
2752
2752
|
return k === 60 ? (e.enter(r), e.enter(i), e.enter(u), e.consume(k), e.exit(u), m) : k === null || k === 32 || k === 41 || gn(k) ? n(k) : (e.enter(r), e.enter(a), e.enter(o), e.enter("chunkString", {
|
|
2753
2753
|
contentType: "string"
|
|
2754
2754
|
}), I(k));
|
|
@@ -2765,7 +2765,7 @@ function Wu(e, t, n, r, i, u, a, o, l) {
|
|
|
2765
2765
|
return k === 60 || k === 62 || k === 92 ? (e.consume(k), h) : h(k);
|
|
2766
2766
|
}
|
|
2767
2767
|
function I(k) {
|
|
2768
|
-
return !
|
|
2768
|
+
return !f && (k === null || k === 41 || ae(k)) ? (e.exit("chunkString"), e.exit(o), e.exit(a), e.exit(r), t(k)) : f < c && k === 40 ? (e.consume(k), f++, I) : k === 41 ? (e.consume(k), f--, I) : k === null || k === 32 || k === 40 || gn(k) ? n(k) : (e.consume(k), k === 92 ? N : I);
|
|
2769
2769
|
}
|
|
2770
2770
|
function N(k) {
|
|
2771
2771
|
return k === 40 || k === 41 || k === 92 ? (e.consume(k), I) : I(k);
|
|
@@ -2776,23 +2776,23 @@ function ju(e, t, n, r, i, u) {
|
|
|
2776
2776
|
let o = 0, l;
|
|
2777
2777
|
return c;
|
|
2778
2778
|
function c(h) {
|
|
2779
|
-
return e.enter(r), e.enter(i), e.consume(h), e.exit(i), e.enter(u),
|
|
2779
|
+
return e.enter(r), e.enter(i), e.consume(h), e.exit(i), e.enter(u), f;
|
|
2780
2780
|
}
|
|
2781
|
-
function
|
|
2781
|
+
function f(h) {
|
|
2782
2782
|
return o > 999 || h === null || h === 91 || h === 93 && !l || // To do: remove in the future once we’ve switched from
|
|
2783
2783
|
// `micromark-extension-footnote` to `micromark-extension-gfm-footnote`,
|
|
2784
2784
|
// which doesn’t need this.
|
|
2785
2785
|
// Hidden footnotes hook.
|
|
2786
2786
|
/* c8 ignore next 3 */
|
|
2787
|
-
h === 94 && !o && "_hiddenFootnoteSupport" in a.parser.constructs ? n(h) : h === 93 ? (e.exit(u), e.enter(i), e.consume(h), e.exit(i), e.exit(r), t) : G(h) ? (e.enter("lineEnding"), e.consume(h), e.exit("lineEnding"),
|
|
2787
|
+
h === 94 && !o && "_hiddenFootnoteSupport" in a.parser.constructs ? n(h) : h === 93 ? (e.exit(u), e.enter(i), e.consume(h), e.exit(i), e.exit(r), t) : G(h) ? (e.enter("lineEnding"), e.consume(h), e.exit("lineEnding"), f) : (e.enter("chunkString", {
|
|
2788
2788
|
contentType: "string"
|
|
2789
|
-
}),
|
|
2789
|
+
}), d(h));
|
|
2790
2790
|
}
|
|
2791
|
-
function
|
|
2792
|
-
return h === null || h === 91 || h === 93 || G(h) || o++ > 999 ? (e.exit("chunkString"),
|
|
2791
|
+
function d(h) {
|
|
2792
|
+
return h === null || h === 91 || h === 93 || G(h) || o++ > 999 ? (e.exit("chunkString"), f(h)) : (e.consume(h), l || (l = !ee(h)), h === 92 ? m : d);
|
|
2793
2793
|
}
|
|
2794
2794
|
function m(h) {
|
|
2795
|
-
return h === 91 || h === 92 || h === 93 ? (e.consume(h), o++,
|
|
2795
|
+
return h === 91 || h === 92 || h === 93 ? (e.consume(h), o++, d) : d(h);
|
|
2796
2796
|
}
|
|
2797
2797
|
}
|
|
2798
2798
|
function Gu(e, t, n, r, i, u) {
|
|
@@ -2807,13 +2807,13 @@ function Gu(e, t, n, r, i, u) {
|
|
|
2807
2807
|
function c(m) {
|
|
2808
2808
|
return m === a ? (e.exit(u), l(a)) : m === null ? n(m) : G(m) ? (e.enter("lineEnding"), e.consume(m), e.exit("lineEnding"), ne(e, c, "linePrefix")) : (e.enter("chunkString", {
|
|
2809
2809
|
contentType: "string"
|
|
2810
|
-
}),
|
|
2811
|
-
}
|
|
2812
|
-
function d(m) {
|
|
2813
|
-
return m === a || m === null || G(m) ? (e.exit("chunkString"), c(m)) : (e.consume(m), m === 92 ? f : d);
|
|
2810
|
+
}), f(m));
|
|
2814
2811
|
}
|
|
2815
2812
|
function f(m) {
|
|
2816
|
-
return m === a || m ===
|
|
2813
|
+
return m === a || m === null || G(m) ? (e.exit("chunkString"), c(m)) : (e.consume(m), m === 92 ? d : f);
|
|
2814
|
+
}
|
|
2815
|
+
function d(m) {
|
|
2816
|
+
return m === a || m === 92 ? (e.consume(m), f) : f(m);
|
|
2817
2817
|
}
|
|
2818
2818
|
}
|
|
2819
2819
|
function Ut(e, t) {
|
|
@@ -2858,7 +2858,7 @@ function Ol(e, t, n) {
|
|
|
2858
2858
|
function c(h) {
|
|
2859
2859
|
return Wu(
|
|
2860
2860
|
e,
|
|
2861
|
-
|
|
2861
|
+
f,
|
|
2862
2862
|
// Note: we don’t need to reset the way `markdown-rs` does.
|
|
2863
2863
|
n,
|
|
2864
2864
|
"definitionDestination",
|
|
@@ -2868,10 +2868,10 @@ function Ol(e, t, n) {
|
|
|
2868
2868
|
"definitionDestinationString"
|
|
2869
2869
|
)(h);
|
|
2870
2870
|
}
|
|
2871
|
-
function d(h) {
|
|
2872
|
-
return e.attempt(Ll, f, f)(h);
|
|
2873
|
-
}
|
|
2874
2871
|
function f(h) {
|
|
2872
|
+
return e.attempt(Ll, d, d)(h);
|
|
2873
|
+
}
|
|
2874
|
+
function d(h) {
|
|
2875
2875
|
return ee(h) ? ne(e, m, "whitespace")(h) : m(h);
|
|
2876
2876
|
}
|
|
2877
2877
|
function m(h) {
|
|
@@ -2927,23 +2927,23 @@ function Ml(e, t) {
|
|
|
2927
2927
|
function Fl(e, t, n) {
|
|
2928
2928
|
let r = 0;
|
|
2929
2929
|
return i;
|
|
2930
|
-
function i(
|
|
2931
|
-
return e.enter("atxHeading"), u(
|
|
2930
|
+
function i(f) {
|
|
2931
|
+
return e.enter("atxHeading"), u(f);
|
|
2932
2932
|
}
|
|
2933
|
-
function u(
|
|
2934
|
-
return e.enter("atxHeadingSequence"), a(
|
|
2933
|
+
function u(f) {
|
|
2934
|
+
return e.enter("atxHeadingSequence"), a(f);
|
|
2935
2935
|
}
|
|
2936
|
-
function a(
|
|
2937
|
-
return
|
|
2936
|
+
function a(f) {
|
|
2937
|
+
return f === 35 && r++ < 6 ? (e.consume(f), a) : f === null || ae(f) ? (e.exit("atxHeadingSequence"), o(f)) : n(f);
|
|
2938
2938
|
}
|
|
2939
|
-
function o(
|
|
2940
|
-
return
|
|
2939
|
+
function o(f) {
|
|
2940
|
+
return f === 35 ? (e.enter("atxHeadingSequence"), l(f)) : f === null || G(f) ? (e.exit("atxHeading"), t(f)) : ee(f) ? ne(e, o, "whitespace")(f) : (e.enter("atxHeadingText"), c(f));
|
|
2941
2941
|
}
|
|
2942
|
-
function l(
|
|
2943
|
-
return
|
|
2942
|
+
function l(f) {
|
|
2943
|
+
return f === 35 ? (e.consume(f), l) : (e.exit("atxHeadingSequence"), o(f));
|
|
2944
2944
|
}
|
|
2945
|
-
function c(
|
|
2946
|
-
return
|
|
2945
|
+
function c(f) {
|
|
2946
|
+
return f === null || f === 35 || ae(f) ? (e.exit("atxHeadingText"), o(f)) : (e.consume(f), c);
|
|
2947
2947
|
}
|
|
2948
2948
|
}
|
|
2949
2949
|
const Bl = [
|
|
@@ -3032,12 +3032,12 @@ function Yl(e, t, n) {
|
|
|
3032
3032
|
let i, u, a, o, l;
|
|
3033
3033
|
return c;
|
|
3034
3034
|
function c(_) {
|
|
3035
|
-
return
|
|
3036
|
-
}
|
|
3037
|
-
function d(_) {
|
|
3038
|
-
return e.enter("htmlFlow"), e.enter("htmlFlowData"), e.consume(_), f;
|
|
3035
|
+
return f(_);
|
|
3039
3036
|
}
|
|
3040
3037
|
function f(_) {
|
|
3038
|
+
return e.enter("htmlFlow"), e.enter("htmlFlowData"), e.consume(_), d;
|
|
3039
|
+
}
|
|
3040
|
+
function d(_) {
|
|
3041
3041
|
return _ === 33 ? (e.consume(_), m) : _ === 47 ? (e.consume(_), u = !0, I) : _ === 63 ? (e.consume(_), i = 3, r.interrupt ? t : g) : ke(_) ? (e.consume(_), a = String.fromCharCode(_), N) : n(_);
|
|
3042
3042
|
}
|
|
3043
3043
|
function m(_) {
|
|
@@ -3162,19 +3162,19 @@ function jl(e, t, n) {
|
|
|
3162
3162
|
return g === 33 ? (e.consume(g), c) : g === 47 ? (e.consume(g), q) : g === 63 ? (e.consume(g), S) : ke(g) ? (e.consume(g), z) : n(g);
|
|
3163
3163
|
}
|
|
3164
3164
|
function c(g) {
|
|
3165
|
-
return g === 45 ? (e.consume(g),
|
|
3165
|
+
return g === 45 ? (e.consume(g), f) : g === 91 ? (e.consume(g), u = 0, T) : ke(g) ? (e.consume(g), L) : n(g);
|
|
3166
3166
|
}
|
|
3167
|
-
function
|
|
3167
|
+
function f(g) {
|
|
3168
3168
|
return g === 45 ? (e.consume(g), h) : n(g);
|
|
3169
3169
|
}
|
|
3170
|
-
function
|
|
3171
|
-
return g === null ? n(g) : g === 45 ? (e.consume(g), m) : G(g) ? (a =
|
|
3170
|
+
function d(g) {
|
|
3171
|
+
return g === null ? n(g) : g === 45 ? (e.consume(g), m) : G(g) ? (a = d, j(g)) : (e.consume(g), d);
|
|
3172
3172
|
}
|
|
3173
3173
|
function m(g) {
|
|
3174
|
-
return g === 45 ? (e.consume(g), h) :
|
|
3174
|
+
return g === 45 ? (e.consume(g), h) : d(g);
|
|
3175
3175
|
}
|
|
3176
3176
|
function h(g) {
|
|
3177
|
-
return g === 62 ? W(g) : g === 45 ? m(g) :
|
|
3177
|
+
return g === 62 ? W(g) : g === 45 ? m(g) : d(g);
|
|
3178
3178
|
}
|
|
3179
3179
|
function T(g) {
|
|
3180
3180
|
const he = "CDATA[";
|
|
@@ -3297,7 +3297,7 @@ function Xl(e, t) {
|
|
|
3297
3297
|
end: {
|
|
3298
3298
|
...e[a][1].end
|
|
3299
3299
|
}
|
|
3300
|
-
},
|
|
3300
|
+
}, f = {
|
|
3301
3301
|
type: "labelText",
|
|
3302
3302
|
start: {
|
|
3303
3303
|
...e[u + r + 2][1].end
|
|
@@ -3306,7 +3306,7 @@ function Xl(e, t) {
|
|
|
3306
3306
|
...e[a - 2][1].start
|
|
3307
3307
|
}
|
|
3308
3308
|
};
|
|
3309
|
-
return o = [["enter", l, t], ["enter", c, t]], o = Oe(o, e.slice(u + 1, u + r + 3)), o = Oe(o, [["enter",
|
|
3309
|
+
return o = [["enter", l, t], ["enter", c, t]], o = Oe(o, e.slice(u + 1, u + r + 3)), o = Oe(o, [["enter", f, t]]), o = Oe(o, Sn(t.parser.constructs.insideSpan.null, e.slice(u + r + 4, a - 3), t)), o = Oe(o, [["exit", f, t], e[a - 2], e[a - 1], ["exit", c, t]]), o = Oe(o, e.slice(a + 1)), o = Oe(o, [["exit", l, t]]), Le(e, u, e.length, o), e;
|
|
3310
3310
|
}
|
|
3311
3311
|
function Jl(e, t, n) {
|
|
3312
3312
|
const r = this;
|
|
@@ -3318,49 +3318,49 @@ function Jl(e, t, n) {
|
|
|
3318
3318
|
}
|
|
3319
3319
|
return o;
|
|
3320
3320
|
function o(m) {
|
|
3321
|
-
return u ? u._inactive ?
|
|
3321
|
+
return u ? u._inactive ? d(m) : (a = r.parser.defined.includes(Pe(r.sliceSerialize({
|
|
3322
3322
|
start: u.end,
|
|
3323
3323
|
end: r.now()
|
|
3324
3324
|
}))), e.enter("labelEnd"), e.enter("labelMarker"), e.consume(m), e.exit("labelMarker"), e.exit("labelEnd"), l) : n(m);
|
|
3325
3325
|
}
|
|
3326
3326
|
function l(m) {
|
|
3327
|
-
return m === 40 ? e.attempt(Gl,
|
|
3327
|
+
return m === 40 ? e.attempt(Gl, f, a ? f : d)(m) : m === 91 ? e.attempt(Ql, f, a ? c : d)(m) : a ? f(m) : d(m);
|
|
3328
3328
|
}
|
|
3329
3329
|
function c(m) {
|
|
3330
|
-
return e.attempt($l,
|
|
3330
|
+
return e.attempt($l, f, d)(m);
|
|
3331
3331
|
}
|
|
3332
|
-
function
|
|
3332
|
+
function f(m) {
|
|
3333
3333
|
return t(m);
|
|
3334
3334
|
}
|
|
3335
|
-
function
|
|
3335
|
+
function d(m) {
|
|
3336
3336
|
return u._balanced = !0, n(m);
|
|
3337
3337
|
}
|
|
3338
3338
|
}
|
|
3339
3339
|
function Zl(e, t, n) {
|
|
3340
3340
|
return r;
|
|
3341
|
-
function r(
|
|
3342
|
-
return e.enter("resource"), e.enter("resourceMarker"), e.consume(
|
|
3341
|
+
function r(d) {
|
|
3342
|
+
return e.enter("resource"), e.enter("resourceMarker"), e.consume(d), e.exit("resourceMarker"), i;
|
|
3343
3343
|
}
|
|
3344
|
-
function i(
|
|
3345
|
-
return ae(
|
|
3344
|
+
function i(d) {
|
|
3345
|
+
return ae(d) ? Ut(e, u)(d) : u(d);
|
|
3346
3346
|
}
|
|
3347
|
-
function u(
|
|
3348
|
-
return
|
|
3347
|
+
function u(d) {
|
|
3348
|
+
return d === 41 ? f(d) : Wu(e, a, o, "resourceDestination", "resourceDestinationLiteral", "resourceDestinationLiteralMarker", "resourceDestinationRaw", "resourceDestinationString", 32)(d);
|
|
3349
3349
|
}
|
|
3350
|
-
function a(
|
|
3351
|
-
return ae(
|
|
3350
|
+
function a(d) {
|
|
3351
|
+
return ae(d) ? Ut(e, l)(d) : f(d);
|
|
3352
3352
|
}
|
|
3353
|
-
function o(
|
|
3354
|
-
return n(
|
|
3353
|
+
function o(d) {
|
|
3354
|
+
return n(d);
|
|
3355
3355
|
}
|
|
3356
|
-
function l(
|
|
3357
|
-
return
|
|
3356
|
+
function l(d) {
|
|
3357
|
+
return d === 34 || d === 39 || d === 40 ? Gu(e, c, n, "resourceTitle", "resourceTitleMarker", "resourceTitleString")(d) : f(d);
|
|
3358
3358
|
}
|
|
3359
|
-
function c(
|
|
3360
|
-
return ae(
|
|
3359
|
+
function c(d) {
|
|
3360
|
+
return ae(d) ? Ut(e, f)(d) : f(d);
|
|
3361
3361
|
}
|
|
3362
|
-
function d
|
|
3363
|
-
return
|
|
3362
|
+
function f(d) {
|
|
3363
|
+
return d === 41 ? (e.enter("resourceMarker"), e.consume(d), e.exit("resourceMarker"), e.exit("resource"), t) : n(d);
|
|
3364
3364
|
}
|
|
3365
3365
|
}
|
|
3366
3366
|
function ec(e, t, n) {
|
|
@@ -3450,7 +3450,7 @@ function sc(e, t, n) {
|
|
|
3450
3450
|
}
|
|
3451
3451
|
const ye = {
|
|
3452
3452
|
continuation: {
|
|
3453
|
-
tokenize:
|
|
3453
|
+
tokenize: dc
|
|
3454
3454
|
},
|
|
3455
3455
|
exit: hc,
|
|
3456
3456
|
name: "list",
|
|
@@ -3460,7 +3460,7 @@ const ye = {
|
|
|
3460
3460
|
tokenize: mc
|
|
3461
3461
|
}, lc = {
|
|
3462
3462
|
partial: !0,
|
|
3463
|
-
tokenize:
|
|
3463
|
+
tokenize: fc
|
|
3464
3464
|
};
|
|
3465
3465
|
function cc(e, t, n) {
|
|
3466
3466
|
const r = this, i = r.events[r.events.length - 1];
|
|
@@ -3468,7 +3468,7 @@ function cc(e, t, n) {
|
|
|
3468
3468
|
return o;
|
|
3469
3469
|
function o(h) {
|
|
3470
3470
|
const T = r.containerState.type || (h === 42 || h === 43 || h === 45 ? "listUnordered" : "listOrdered");
|
|
3471
|
-
if (T === "listUnordered" ? !r.containerState.marker || h === r.containerState.marker :
|
|
3471
|
+
if (T === "listUnordered" ? !r.containerState.marker || h === r.containerState.marker : dr(h)) {
|
|
3472
3472
|
if (r.containerState.type || (r.containerState.type = T, e.enter(T, {
|
|
3473
3473
|
_container: !0
|
|
3474
3474
|
})), T === "listUnordered")
|
|
@@ -3479,27 +3479,27 @@ function cc(e, t, n) {
|
|
|
3479
3479
|
return n(h);
|
|
3480
3480
|
}
|
|
3481
3481
|
function l(h) {
|
|
3482
|
-
return
|
|
3482
|
+
return dr(h) && ++a < 10 ? (e.consume(h), l) : (!r.interrupt || a < 2) && (r.containerState.marker ? h === r.containerState.marker : h === 41 || h === 46) ? (e.exit("listItemValue"), c(h)) : n(h);
|
|
3483
3483
|
}
|
|
3484
3484
|
function c(h) {
|
|
3485
3485
|
return e.enter("listItemMarker"), e.consume(h), e.exit("listItemMarker"), r.containerState.marker = r.containerState.marker || h, e.check(
|
|
3486
3486
|
en,
|
|
3487
3487
|
// Can’t be empty when interrupting.
|
|
3488
|
-
r.interrupt ? n :
|
|
3489
|
-
e.attempt(oc, m,
|
|
3488
|
+
r.interrupt ? n : f,
|
|
3489
|
+
e.attempt(oc, m, d)
|
|
3490
3490
|
);
|
|
3491
3491
|
}
|
|
3492
|
-
function
|
|
3492
|
+
function f(h) {
|
|
3493
3493
|
return r.containerState.initialBlankLine = !0, u++, m(h);
|
|
3494
3494
|
}
|
|
3495
|
-
function
|
|
3495
|
+
function d(h) {
|
|
3496
3496
|
return ee(h) ? (e.enter("listItemPrefixWhitespace"), e.consume(h), e.exit("listItemPrefixWhitespace"), m) : n(h);
|
|
3497
3497
|
}
|
|
3498
3498
|
function m(h) {
|
|
3499
3499
|
return r.containerState.size = u + r.sliceSerialize(e.exit("listItemPrefix"), !0).length, t(h);
|
|
3500
3500
|
}
|
|
3501
3501
|
}
|
|
3502
|
-
function
|
|
3502
|
+
function dc(e, t, n) {
|
|
3503
3503
|
const r = this;
|
|
3504
3504
|
return r.containerState._closeFlow = void 0, e.check(en, i, u);
|
|
3505
3505
|
function i(o) {
|
|
@@ -3512,7 +3512,7 @@ function fc(e, t, n) {
|
|
|
3512
3512
|
return r.containerState._closeFlow = !0, r.interrupt = void 0, ne(e, e.attempt(ye, t, n), "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(o);
|
|
3513
3513
|
}
|
|
3514
3514
|
}
|
|
3515
|
-
function
|
|
3515
|
+
function fc(e, t, n) {
|
|
3516
3516
|
const r = this;
|
|
3517
3517
|
return ne(e, i, "listItemIndent", r.containerState.size + 1);
|
|
3518
3518
|
function i(u) {
|
|
@@ -3565,13 +3565,13 @@ function Ec(e, t, n) {
|
|
|
3565
3565
|
let i;
|
|
3566
3566
|
return u;
|
|
3567
3567
|
function u(c) {
|
|
3568
|
-
let
|
|
3569
|
-
for (;
|
|
3570
|
-
if (r.events[
|
|
3571
|
-
|
|
3568
|
+
let f = r.events.length, d;
|
|
3569
|
+
for (; f--; )
|
|
3570
|
+
if (r.events[f][1].type !== "lineEnding" && r.events[f][1].type !== "linePrefix" && r.events[f][1].type !== "content") {
|
|
3571
|
+
d = r.events[f][1].type === "paragraph";
|
|
3572
3572
|
break;
|
|
3573
3573
|
}
|
|
3574
|
-
return !r.parser.lazy[r.now().line] && (r.interrupt ||
|
|
3574
|
+
return !r.parser.lazy[r.now().line] && (r.interrupt || d) ? (e.enter("setextHeadingLine"), i = c, a(c)) : n(c);
|
|
3575
3575
|
}
|
|
3576
3576
|
function a(c) {
|
|
3577
3577
|
return e.enter("setextHeadingLineSequence"), o(c);
|
|
@@ -3621,27 +3621,27 @@ function Qu(e) {
|
|
|
3621
3621
|
function t(n) {
|
|
3622
3622
|
const r = this, i = this.parser.constructs[e], u = n.attempt(i, a, o);
|
|
3623
3623
|
return a;
|
|
3624
|
-
function a(
|
|
3625
|
-
return c(
|
|
3624
|
+
function a(f) {
|
|
3625
|
+
return c(f) ? u(f) : o(f);
|
|
3626
3626
|
}
|
|
3627
|
-
function o(
|
|
3628
|
-
if (
|
|
3629
|
-
n.consume(
|
|
3627
|
+
function o(f) {
|
|
3628
|
+
if (f === null) {
|
|
3629
|
+
n.consume(f);
|
|
3630
3630
|
return;
|
|
3631
3631
|
}
|
|
3632
|
-
return n.enter("data"), n.consume(
|
|
3632
|
+
return n.enter("data"), n.consume(f), l;
|
|
3633
3633
|
}
|
|
3634
|
-
function l(
|
|
3635
|
-
return c(
|
|
3634
|
+
function l(f) {
|
|
3635
|
+
return c(f) ? (n.exit("data"), u(f)) : (n.consume(f), l);
|
|
3636
3636
|
}
|
|
3637
|
-
function c(
|
|
3638
|
-
if (
|
|
3637
|
+
function c(f) {
|
|
3638
|
+
if (f === null)
|
|
3639
3639
|
return !0;
|
|
3640
|
-
const
|
|
3640
|
+
const d = i[f];
|
|
3641
3641
|
let m = -1;
|
|
3642
|
-
if (
|
|
3643
|
-
for (; ++m <
|
|
3644
|
-
const h =
|
|
3642
|
+
if (d)
|
|
3643
|
+
for (; ++m < d.length; ) {
|
|
3644
|
+
const h = d[m];
|
|
3645
3645
|
if (!h.previous || h.previous.call(r, r.previous))
|
|
3646
3646
|
return !0;
|
|
3647
3647
|
}
|
|
@@ -3739,15 +3739,15 @@ const Cc = {
|
|
|
3739
3739
|
[-3]: zn,
|
|
3740
3740
|
33: nc,
|
|
3741
3741
|
38: qu,
|
|
3742
|
-
42:
|
|
3742
|
+
42: fr,
|
|
3743
3743
|
60: [il, Wl],
|
|
3744
3744
|
91: ic,
|
|
3745
3745
|
92: [Rl, Yu],
|
|
3746
3746
|
93: wr,
|
|
3747
|
-
95:
|
|
3747
|
+
95: fr,
|
|
3748
3748
|
96: Tl
|
|
3749
3749
|
}, Lc = {
|
|
3750
|
-
null: [
|
|
3750
|
+
null: [fr, gc]
|
|
3751
3751
|
}, Oc = {
|
|
3752
3752
|
null: [42, 95]
|
|
3753
3753
|
}, Dc = {
|
|
@@ -3793,11 +3793,11 @@ function wc(e, t, n) {
|
|
|
3793
3793
|
previous: null,
|
|
3794
3794
|
sliceSerialize: m,
|
|
3795
3795
|
sliceStream: h,
|
|
3796
|
-
write:
|
|
3796
|
+
write: d
|
|
3797
3797
|
};
|
|
3798
|
-
let
|
|
3798
|
+
let f = t.tokenize.call(c, l);
|
|
3799
3799
|
return t.resolveAll && u.push(t), c;
|
|
3800
|
-
function
|
|
3800
|
+
function d(M) {
|
|
3801
3801
|
return a = Oe(a, M), N(), a[a.length - 1] !== null ? [] : (z(t, 0), c.events = Sn(u, c.events, c), c.events);
|
|
3802
3802
|
}
|
|
3803
3803
|
function m(M, V) {
|
|
@@ -3837,7 +3837,7 @@ function wc(e, t, n) {
|
|
|
3837
3837
|
}
|
|
3838
3838
|
}
|
|
3839
3839
|
function k(M) {
|
|
3840
|
-
|
|
3840
|
+
f = f(M);
|
|
3841
3841
|
}
|
|
3842
3842
|
function L(M) {
|
|
3843
3843
|
G(M) ? (r.line++, r.column = 1, r.offset += M === -3 ? 2 : 1, A()) : M !== -1 && (r.column++, r.offset++), r._bufferIndex < 0 ? r._index++ : (r._bufferIndex++, r._bufferIndex === // Points w/ non-negative `_bufferIndex` reference
|
|
@@ -4014,22 +4014,22 @@ function Hc() {
|
|
|
4014
4014
|
return i;
|
|
4015
4015
|
function i(u, a, o) {
|
|
4016
4016
|
const l = [];
|
|
4017
|
-
let c,
|
|
4018
|
-
for (u = t + (typeof u == "string" ? u.toString() : new TextDecoder(a || void 0).decode(u)),
|
|
4019
|
-
if (ki.lastIndex =
|
|
4020
|
-
t = u.slice(
|
|
4017
|
+
let c, f, d, m, h;
|
|
4018
|
+
for (u = t + (typeof u == "string" ? u.toString() : new TextDecoder(a || void 0).decode(u)), d = 0, t = "", n && (u.charCodeAt(0) === 65279 && d++, n = void 0); d < u.length; ) {
|
|
4019
|
+
if (ki.lastIndex = d, c = ki.exec(u), m = c && c.index !== void 0 ? c.index : u.length, h = u.charCodeAt(m), !c) {
|
|
4020
|
+
t = u.slice(d);
|
|
4021
4021
|
break;
|
|
4022
4022
|
}
|
|
4023
|
-
if (h === 10 &&
|
|
4023
|
+
if (h === 10 && d === m && r)
|
|
4024
4024
|
l.push(-3), r = void 0;
|
|
4025
4025
|
else
|
|
4026
|
-
switch (r && (l.push(-5), r = void 0),
|
|
4026
|
+
switch (r && (l.push(-5), r = void 0), d < m && (l.push(u.slice(d, m)), e += m - d), h) {
|
|
4027
4027
|
case 0: {
|
|
4028
4028
|
l.push(65533), e++;
|
|
4029
4029
|
break;
|
|
4030
4030
|
}
|
|
4031
4031
|
case 9: {
|
|
4032
|
-
for (
|
|
4032
|
+
for (f = Math.ceil(e / 4) * 4, l.push(-2); e++ < f; ) l.push(-1);
|
|
4033
4033
|
break;
|
|
4034
4034
|
}
|
|
4035
4035
|
case 10: {
|
|
@@ -4039,7 +4039,7 @@ function Hc() {
|
|
|
4039
4039
|
default:
|
|
4040
4040
|
r = !0, e = 1;
|
|
4041
4041
|
}
|
|
4042
|
-
|
|
4042
|
+
d = m + 1;
|
|
4043
4043
|
}
|
|
4044
4044
|
return o && (r && l.push(-5), t && l.push(t), l.push(null)), l;
|
|
4045
4045
|
}
|
|
@@ -4097,7 +4097,7 @@ function qc(e) {
|
|
|
4097
4097
|
link: u(Zr),
|
|
4098
4098
|
listItem: u(js),
|
|
4099
4099
|
listItemValue: m,
|
|
4100
|
-
listOrdered: u(ei,
|
|
4100
|
+
listOrdered: u(ei, d),
|
|
4101
4101
|
listUnordered: u(ei),
|
|
4102
4102
|
paragraph: u(Gs),
|
|
4103
4103
|
reference: _,
|
|
@@ -4175,7 +4175,7 @@ function qc(e) {
|
|
|
4175
4175
|
enter: o,
|
|
4176
4176
|
exit: c,
|
|
4177
4177
|
buffer: a,
|
|
4178
|
-
resume:
|
|
4178
|
+
resume: f,
|
|
4179
4179
|
data: n
|
|
4180
4180
|
}, te = [];
|
|
4181
4181
|
let ie = -1;
|
|
@@ -4297,10 +4297,10 @@ function qc(e) {
|
|
|
4297
4297
|
}) + "): it’s not open");
|
|
4298
4298
|
K.position.end = Ge(D.end);
|
|
4299
4299
|
}
|
|
4300
|
-
function
|
|
4300
|
+
function f() {
|
|
4301
4301
|
return Dr(this.stack.pop());
|
|
4302
4302
|
}
|
|
4303
|
-
function
|
|
4303
|
+
function d() {
|
|
4304
4304
|
this.data.expectingFirstListItemValue = !0;
|
|
4305
4305
|
}
|
|
4306
4306
|
function m(D) {
|
|
@@ -4788,9 +4788,9 @@ function i0(e, t) {
|
|
|
4788
4788
|
function u0(e, t, n) {
|
|
4789
4789
|
const r = e.all(t), i = n ? a0(n) : Zu(t), u = {}, a = [];
|
|
4790
4790
|
if (typeof t.checked == "boolean") {
|
|
4791
|
-
const
|
|
4792
|
-
let
|
|
4793
|
-
|
|
4791
|
+
const f = r[0];
|
|
4792
|
+
let d;
|
|
4793
|
+
f && f.type === "element" && f.tagName === "p" ? d = f : (d = { type: "element", tagName: "p", properties: {}, children: [] }, r.unshift(d)), d.children.length > 0 && d.children.unshift({ type: "text", value: " " }), d.children.unshift({
|
|
4794
4794
|
type: "element",
|
|
4795
4795
|
tagName: "input",
|
|
4796
4796
|
properties: { type: "checkbox", checked: t.checked, disabled: !0 },
|
|
@@ -4799,9 +4799,9 @@ function u0(e, t, n) {
|
|
|
4799
4799
|
}
|
|
4800
4800
|
let o = -1;
|
|
4801
4801
|
for (; ++o < r.length; ) {
|
|
4802
|
-
const
|
|
4803
|
-
(i || o !== 0 ||
|
|
4804
|
-
` }),
|
|
4802
|
+
const f = r[o];
|
|
4803
|
+
(i || o !== 0 || f.type !== "element" || f.tagName !== "p") && a.push({ type: "text", value: `
|
|
4804
|
+
` }), f.type === "element" && f.tagName === "p" && !i ? a.push(...f.children) : a.push(f);
|
|
4805
4805
|
}
|
|
4806
4806
|
const l = r[r.length - 1];
|
|
4807
4807
|
l && (i || l.type !== "element" || l.tagName !== "p") && a.push({ type: "text", value: `
|
|
@@ -4864,7 +4864,7 @@ function c0(e, t) {
|
|
|
4864
4864
|
};
|
|
4865
4865
|
return e.patch(t, n), e.applyData(t, n);
|
|
4866
4866
|
}
|
|
4867
|
-
function
|
|
4867
|
+
function d0(e, t) {
|
|
4868
4868
|
const n = e.all(t), r = n.shift(), i = [];
|
|
4869
4869
|
if (r) {
|
|
4870
4870
|
const a = {
|
|
@@ -4892,23 +4892,23 @@ function f0(e, t) {
|
|
|
4892
4892
|
};
|
|
4893
4893
|
return e.patch(t, u), e.applyData(t, u);
|
|
4894
4894
|
}
|
|
4895
|
-
function
|
|
4895
|
+
function f0(e, t, n) {
|
|
4896
4896
|
const r = n ? n.children : void 0, u = (r ? r.indexOf(t) : 1) === 0 ? "th" : "td", a = n && n.type === "table" ? n.align : void 0, o = a ? a.length : t.children.length;
|
|
4897
4897
|
let l = -1;
|
|
4898
4898
|
const c = [];
|
|
4899
4899
|
for (; ++l < o; ) {
|
|
4900
|
-
const
|
|
4900
|
+
const d = t.children[l], m = {}, h = a ? a[l] : void 0;
|
|
4901
4901
|
h && (m.align = h);
|
|
4902
4902
|
let T = { type: "element", tagName: u, properties: m, children: [] };
|
|
4903
|
-
|
|
4903
|
+
d && (T.children = e.all(d), e.patch(d, T), T = e.applyData(d, T)), c.push(T);
|
|
4904
4904
|
}
|
|
4905
|
-
const
|
|
4905
|
+
const f = {
|
|
4906
4906
|
type: "element",
|
|
4907
4907
|
tagName: "tr",
|
|
4908
4908
|
properties: {},
|
|
4909
4909
|
children: e.wrap(c, !0)
|
|
4910
4910
|
};
|
|
4911
|
-
return e.patch(t,
|
|
4911
|
+
return e.patch(t, f), e.applyData(t, f);
|
|
4912
4912
|
}
|
|
4913
4913
|
function h0(e, t) {
|
|
4914
4914
|
const n = {
|
|
@@ -4979,9 +4979,9 @@ const T0 = {
|
|
|
4979
4979
|
// @ts-expect-error: root is different, but hard to type.
|
|
4980
4980
|
root: l0,
|
|
4981
4981
|
strong: c0,
|
|
4982
|
-
table:
|
|
4982
|
+
table: d0,
|
|
4983
4983
|
tableCell: h0,
|
|
4984
|
-
tableRow:
|
|
4984
|
+
tableRow: f0,
|
|
4985
4985
|
text: p0,
|
|
4986
4986
|
thematicBreak: E0,
|
|
4987
4987
|
toml: sn,
|
|
@@ -5020,13 +5020,13 @@ const ea = -1, Ln = 0, zt = 1, _n = 2, Pr = 3, Mr = 4, Fr = 5, Br = 6, ta = 7, n
|
|
|
5020
5020
|
case _n: {
|
|
5021
5021
|
const o = n({}, i);
|
|
5022
5022
|
for (const [l, c] of a) {
|
|
5023
|
-
const
|
|
5024
|
-
|
|
5025
|
-
value:
|
|
5023
|
+
const f = r(l), d = r(c);
|
|
5024
|
+
f === "__proto__" ? b0(o, f, {
|
|
5025
|
+
value: d,
|
|
5026
5026
|
configurable: !0,
|
|
5027
5027
|
enumerable: !0,
|
|
5028
5028
|
writable: !0
|
|
5029
|
-
}) : o[
|
|
5029
|
+
}) : o[f] = d;
|
|
5030
5030
|
}
|
|
5031
5031
|
return o;
|
|
5032
5032
|
}
|
|
@@ -5103,10 +5103,10 @@ const ea = -1, Ln = 0, zt = 1, _n = 2, Pr = 3, Mr = 4, Fr = 5, Br = 6, ta = 7, n
|
|
|
5103
5103
|
let [o, l] = Mt(a);
|
|
5104
5104
|
switch (o) {
|
|
5105
5105
|
case Ln: {
|
|
5106
|
-
let
|
|
5106
|
+
let f = a;
|
|
5107
5107
|
switch (l) {
|
|
5108
5108
|
case "bigint":
|
|
5109
|
-
o = na,
|
|
5109
|
+
o = na, f = a.toString();
|
|
5110
5110
|
break;
|
|
5111
5111
|
case "number":
|
|
5112
5112
|
if (!a && k0(a, -0))
|
|
@@ -5116,22 +5116,22 @@ const ea = -1, Ln = 0, zt = 1, _n = 2, Pr = 3, Mr = 4, Fr = 5, Br = 6, ta = 7, n
|
|
|
5116
5116
|
case "symbol":
|
|
5117
5117
|
if (e)
|
|
5118
5118
|
throw new TypeError("unable to serialize " + l);
|
|
5119
|
-
|
|
5119
|
+
f = null;
|
|
5120
5120
|
break;
|
|
5121
5121
|
case "undefined":
|
|
5122
5122
|
return i([ea], a);
|
|
5123
5123
|
}
|
|
5124
|
-
return i([o,
|
|
5124
|
+
return i([o, f], a);
|
|
5125
5125
|
}
|
|
5126
5126
|
case zt: {
|
|
5127
5127
|
if (l) {
|
|
5128
5128
|
let m = a;
|
|
5129
5129
|
return l === "DataView" ? m = new Uint8Array(a.buffer) : l === "ArrayBuffer" && (m = new Uint8Array(a)), i([l, [...m]], a);
|
|
5130
5130
|
}
|
|
5131
|
-
const
|
|
5131
|
+
const f = [], d = i([o, f], a);
|
|
5132
5132
|
for (const m of a)
|
|
5133
|
-
|
|
5134
|
-
return
|
|
5133
|
+
f.push(u(m));
|
|
5134
|
+
return d;
|
|
5135
5135
|
}
|
|
5136
5136
|
case _n: {
|
|
5137
5137
|
if (l)
|
|
@@ -5145,28 +5145,28 @@ const ea = -1, Ln = 0, zt = 1, _n = 2, Pr = 3, Mr = 4, Fr = 5, Br = 6, ta = 7, n
|
|
|
5145
5145
|
}
|
|
5146
5146
|
if (t && "toJSON" in a)
|
|
5147
5147
|
return u(a.toJSON());
|
|
5148
|
-
const
|
|
5148
|
+
const f = [], d = i([o, f], a);
|
|
5149
5149
|
for (const m of A0(a))
|
|
5150
|
-
(e || !on(Mt(a[m]))) &&
|
|
5151
|
-
return
|
|
5150
|
+
(e || !on(Mt(a[m]))) && f.push([u(m), u(a[m])]);
|
|
5151
|
+
return d;
|
|
5152
5152
|
}
|
|
5153
5153
|
case Pr:
|
|
5154
5154
|
return i([o, isNaN(a.getTime()) ? ut : a.toISOString()], a);
|
|
5155
5155
|
case Mr: {
|
|
5156
|
-
const { source:
|
|
5157
|
-
return i([o, { source:
|
|
5156
|
+
const { source: f, flags: d } = a;
|
|
5157
|
+
return i([o, { source: f, flags: d }], a);
|
|
5158
5158
|
}
|
|
5159
5159
|
case Fr: {
|
|
5160
|
-
const
|
|
5160
|
+
const f = [], d = i([o, f], a);
|
|
5161
5161
|
for (const [m, h] of a)
|
|
5162
|
-
(e || !(on(Mt(m)) || on(Mt(h)))) &&
|
|
5163
|
-
return
|
|
5162
|
+
(e || !(on(Mt(m)) || on(Mt(h)))) && f.push([u(m), u(h)]);
|
|
5163
|
+
return d;
|
|
5164
5164
|
}
|
|
5165
5165
|
case Br: {
|
|
5166
|
-
const
|
|
5166
|
+
const f = [], d = i([o, f], a);
|
|
5167
5167
|
for (const m of a)
|
|
5168
|
-
(e || !on(Mt(m))) &&
|
|
5169
|
-
return
|
|
5168
|
+
(e || !on(Mt(m))) && f.push(u(m));
|
|
5169
|
+
return d;
|
|
5170
5170
|
}
|
|
5171
5171
|
}
|
|
5172
5172
|
const { message: c } = a;
|
|
@@ -5203,9 +5203,9 @@ function N0(e) {
|
|
|
5203
5203
|
);
|
|
5204
5204
|
if (!c)
|
|
5205
5205
|
continue;
|
|
5206
|
-
const
|
|
5206
|
+
const f = e.all(c), d = String(c.identifier).toUpperCase(), m = yt(d.toLowerCase());
|
|
5207
5207
|
let h = 0;
|
|
5208
|
-
const T = [], I = e.footnoteCounts.get(
|
|
5208
|
+
const T = [], I = e.footnoteCounts.get(d);
|
|
5209
5209
|
for (; I !== void 0 && ++h <= I; ) {
|
|
5210
5210
|
T.length > 0 && T.push({ type: "text", value: " " });
|
|
5211
5211
|
let L = typeof n == "string" ? n : n(l, h);
|
|
@@ -5221,17 +5221,17 @@ function N0(e) {
|
|
|
5221
5221
|
children: Array.isArray(L) ? L : [L]
|
|
5222
5222
|
});
|
|
5223
5223
|
}
|
|
5224
|
-
const N =
|
|
5224
|
+
const N = f[f.length - 1];
|
|
5225
5225
|
if (N && N.type === "element" && N.tagName === "p") {
|
|
5226
5226
|
const L = N.children[N.children.length - 1];
|
|
5227
5227
|
L && L.type === "text" ? L.value += " " : N.children.push({ type: "text", value: " " }), N.children.push(...T);
|
|
5228
5228
|
} else
|
|
5229
|
-
|
|
5229
|
+
f.push(...T);
|
|
5230
5230
|
const k = {
|
|
5231
5231
|
type: "element",
|
|
5232
5232
|
tagName: "li",
|
|
5233
5233
|
properties: { id: t + "fn-" + m },
|
|
5234
|
-
children: e.wrap(
|
|
5234
|
+
children: e.wrap(f, !0)
|
|
5235
5235
|
};
|
|
5236
5236
|
e.patch(c, k), o.push(k);
|
|
5237
5237
|
}
|
|
@@ -5357,17 +5357,17 @@ function ua(e, t, n, r) {
|
|
|
5357
5357
|
typeof t == "function" && typeof n != "function" ? (r = n, n = t) : i = t;
|
|
5358
5358
|
const u = On(i), a = r ? -1 : 1;
|
|
5359
5359
|
o(e, void 0, [])();
|
|
5360
|
-
function o(l, c,
|
|
5361
|
-
const
|
|
5360
|
+
function o(l, c, f) {
|
|
5361
|
+
const d = (
|
|
5362
5362
|
/** @type {Record<string, unknown>} */
|
|
5363
5363
|
l && typeof l == "object" ? l : {}
|
|
5364
5364
|
);
|
|
5365
|
-
if (typeof
|
|
5365
|
+
if (typeof d.type == "string") {
|
|
5366
5366
|
const h = (
|
|
5367
5367
|
// `hast`
|
|
5368
|
-
typeof
|
|
5368
|
+
typeof d.tagName == "string" ? d.tagName : (
|
|
5369
5369
|
// `xast`
|
|
5370
|
-
typeof
|
|
5370
|
+
typeof d.name == "string" ? d.name : void 0
|
|
5371
5371
|
)
|
|
5372
5372
|
);
|
|
5373
5373
|
Object.defineProperty(m, "name", {
|
|
@@ -5377,7 +5377,7 @@ function ua(e, t, n, r) {
|
|
|
5377
5377
|
return m;
|
|
5378
5378
|
function m() {
|
|
5379
5379
|
let h = ia, T, I, N;
|
|
5380
|
-
if ((!t || u(l, c,
|
|
5380
|
+
if ((!t || u(l, c, f[f.length - 1] || void 0)) && (h = P0(n(l, f)), h[0] === hr))
|
|
5381
5381
|
return h;
|
|
5382
5382
|
if ("children" in l && l.children) {
|
|
5383
5383
|
const k = (
|
|
@@ -5385,7 +5385,7 @@ function ua(e, t, n, r) {
|
|
|
5385
5385
|
l
|
|
5386
5386
|
);
|
|
5387
5387
|
if (k.children && h[0] !== w0)
|
|
5388
|
-
for (I = (r ? k.children.length : -1) + a, N =
|
|
5388
|
+
for (I = (r ? k.children.length : -1) + a, N = f.concat(k); I > -1 && I < k.children.length; ) {
|
|
5389
5389
|
const L = k.children[I];
|
|
5390
5390
|
if (T = o(L, I, N)(), T[0] === hr)
|
|
5391
5391
|
return T;
|
|
@@ -5403,8 +5403,8 @@ function Rn(e, t, n, r) {
|
|
|
5403
5403
|
let i, u, a;
|
|
5404
5404
|
typeof t == "function" && typeof n != "function" ? (u = void 0, a = t, i = n) : (u = t, a = n, i = r), ua(e, u, o, i);
|
|
5405
5405
|
function o(l, c) {
|
|
5406
|
-
const
|
|
5407
|
-
return a(l,
|
|
5406
|
+
const f = c[c.length - 1], d = f ? f.children.indexOf(l) : void 0;
|
|
5407
|
+
return a(l, d, f);
|
|
5408
5408
|
}
|
|
5409
5409
|
}
|
|
5410
5410
|
const mr = {}.hasOwnProperty, M0 = {};
|
|
@@ -5422,42 +5422,42 @@ function F0(e, t) {
|
|
|
5422
5422
|
patch: B0,
|
|
5423
5423
|
wrap: U0
|
|
5424
5424
|
};
|
|
5425
|
-
return Rn(e, function(
|
|
5426
|
-
if (
|
|
5427
|
-
const
|
|
5428
|
-
|
|
5425
|
+
return Rn(e, function(f) {
|
|
5426
|
+
if (f.type === "definition" || f.type === "footnoteDefinition") {
|
|
5427
|
+
const d = f.type === "definition" ? r : i, m = String(f.identifier).toUpperCase();
|
|
5428
|
+
d.has(m) || d.set(m, f);
|
|
5429
5429
|
}
|
|
5430
5430
|
}), o;
|
|
5431
|
-
function l(
|
|
5432
|
-
const m =
|
|
5431
|
+
function l(f, d) {
|
|
5432
|
+
const m = f.type, h = o.handlers[m];
|
|
5433
5433
|
if (mr.call(o.handlers, m) && h)
|
|
5434
|
-
return h(o,
|
|
5434
|
+
return h(o, f, d);
|
|
5435
5435
|
if (o.options.passThrough && o.options.passThrough.includes(m)) {
|
|
5436
|
-
if ("children" in
|
|
5437
|
-
const { children: I, ...N } =
|
|
5438
|
-
return k.children = o.all(
|
|
5436
|
+
if ("children" in f) {
|
|
5437
|
+
const { children: I, ...N } = f, k = ct(N);
|
|
5438
|
+
return k.children = o.all(f), k;
|
|
5439
5439
|
}
|
|
5440
|
-
return ct(
|
|
5440
|
+
return ct(f);
|
|
5441
5441
|
}
|
|
5442
|
-
return (o.options.unknownHandler || v0)(o,
|
|
5442
|
+
return (o.options.unknownHandler || v0)(o, f, d);
|
|
5443
5443
|
}
|
|
5444
|
-
function c(
|
|
5445
|
-
const
|
|
5446
|
-
if ("children" in
|
|
5447
|
-
const m =
|
|
5444
|
+
function c(f) {
|
|
5445
|
+
const d = [];
|
|
5446
|
+
if ("children" in f) {
|
|
5447
|
+
const m = f.children;
|
|
5448
5448
|
let h = -1;
|
|
5449
5449
|
for (; ++h < m.length; ) {
|
|
5450
|
-
const T = o.one(m[h],
|
|
5450
|
+
const T = o.one(m[h], f);
|
|
5451
5451
|
if (T) {
|
|
5452
5452
|
if (h && m[h - 1].type === "break" && (!Array.isArray(T) && T.type === "text" && (T.value = Oi(T.value)), !Array.isArray(T) && T.type === "element")) {
|
|
5453
5453
|
const I = T.children[0];
|
|
5454
5454
|
I && I.type === "text" && (I.value = Oi(I.value));
|
|
5455
5455
|
}
|
|
5456
|
-
Array.isArray(T) ?
|
|
5456
|
+
Array.isArray(T) ? d.push(...T) : d.push(T);
|
|
5457
5457
|
}
|
|
5458
5458
|
}
|
|
5459
5459
|
}
|
|
5460
|
-
return
|
|
5460
|
+
return d;
|
|
5461
5461
|
}
|
|
5462
5462
|
}
|
|
5463
5463
|
function B0(e, t) {
|
|
@@ -5535,34 +5535,34 @@ function Y0() {
|
|
|
5535
5535
|
}, u = function(c) {
|
|
5536
5536
|
if (!c || t.call(c) !== "[object Object]")
|
|
5537
5537
|
return !1;
|
|
5538
|
-
var
|
|
5539
|
-
if (c.constructor && !
|
|
5538
|
+
var f = e.call(c, "constructor"), d = c.constructor && c.constructor.prototype && e.call(c.constructor.prototype, "isPrototypeOf");
|
|
5539
|
+
if (c.constructor && !f && !d)
|
|
5540
5540
|
return !1;
|
|
5541
5541
|
var m;
|
|
5542
5542
|
for (m in c)
|
|
5543
5543
|
;
|
|
5544
5544
|
return typeof m > "u" || e.call(c, m);
|
|
5545
|
-
}, a = function(c,
|
|
5546
|
-
n &&
|
|
5545
|
+
}, a = function(c, f) {
|
|
5546
|
+
n && f.name === "__proto__" ? n(c, f.name, {
|
|
5547
5547
|
enumerable: !0,
|
|
5548
5548
|
configurable: !0,
|
|
5549
|
-
value:
|
|
5549
|
+
value: f.newValue,
|
|
5550
5550
|
writable: !0
|
|
5551
|
-
}) : c[
|
|
5552
|
-
}, o = function(c,
|
|
5553
|
-
if (
|
|
5554
|
-
if (e.call(c,
|
|
5551
|
+
}) : c[f.name] = f.newValue;
|
|
5552
|
+
}, o = function(c, f) {
|
|
5553
|
+
if (f === "__proto__")
|
|
5554
|
+
if (e.call(c, f)) {
|
|
5555
5555
|
if (r)
|
|
5556
|
-
return r(c,
|
|
5556
|
+
return r(c, f).value;
|
|
5557
5557
|
} else return;
|
|
5558
|
-
return c[
|
|
5558
|
+
return c[f];
|
|
5559
5559
|
};
|
|
5560
5560
|
return Yn = function l() {
|
|
5561
|
-
var c,
|
|
5561
|
+
var c, f, d, m, h, T, I = arguments[0], N = 1, k = arguments.length, L = !1;
|
|
5562
5562
|
for (typeof I == "boolean" && (L = I, I = arguments[1] || {}, N = 2), (I == null || typeof I != "object" && typeof I != "function") && (I = {}); N < k; ++N)
|
|
5563
5563
|
if (c = arguments[N], c != null)
|
|
5564
|
-
for (
|
|
5565
|
-
|
|
5564
|
+
for (f in c)
|
|
5565
|
+
d = o(I, f), m = o(c, f), I !== m && (L && m && (u(m) || (h = i(m))) ? (h ? (h = !1, T = d && i(d) ? d : []) : T = d && u(d) ? d : {}, a(I, { name: f, newValue: l(L, T, m) })) : typeof m < "u" && a(I, { name: f, newValue: m }));
|
|
5566
5566
|
return I;
|
|
5567
5567
|
}, Yn;
|
|
5568
5568
|
}
|
|
@@ -5584,15 +5584,15 @@ function V0() {
|
|
|
5584
5584
|
throw new TypeError("Expected function as last argument, not " + a);
|
|
5585
5585
|
o(null, ...i);
|
|
5586
5586
|
function o(l, ...c) {
|
|
5587
|
-
const
|
|
5588
|
-
let
|
|
5587
|
+
const f = e[++u];
|
|
5588
|
+
let d = -1;
|
|
5589
5589
|
if (l) {
|
|
5590
5590
|
a(l);
|
|
5591
5591
|
return;
|
|
5592
5592
|
}
|
|
5593
|
-
for (; ++
|
|
5594
|
-
(c[
|
|
5595
|
-
i = c,
|
|
5593
|
+
for (; ++d < i.length; )
|
|
5594
|
+
(c[d] === null || c[d] === void 0) && (c[d] = i[d]);
|
|
5595
|
+
i = c, f ? W0(f, o)(...c) : a(null, ...c);
|
|
5596
5596
|
}
|
|
5597
5597
|
}
|
|
5598
5598
|
function r(i) {
|
|
@@ -5613,13 +5613,13 @@ function W0(e, t) {
|
|
|
5613
5613
|
try {
|
|
5614
5614
|
l = e.apply(this, a);
|
|
5615
5615
|
} catch (c) {
|
|
5616
|
-
const
|
|
5616
|
+
const f = (
|
|
5617
5617
|
/** @type {Error} */
|
|
5618
5618
|
c
|
|
5619
5619
|
);
|
|
5620
5620
|
if (o && n)
|
|
5621
|
-
throw
|
|
5622
|
-
return i(
|
|
5621
|
+
throw f;
|
|
5622
|
+
return i(f);
|
|
5623
5623
|
}
|
|
5624
5624
|
o || (l && l.then && typeof l.then == "function" ? l.then(u, i) : l instanceof Error ? i(l) : u(l));
|
|
5625
5625
|
}
|
|
@@ -5747,7 +5747,7 @@ function Er(e) {
|
|
|
5747
5747
|
return !!(e !== null && typeof e == "object" && "href" in e && e.href && "protocol" in e && e.protocol && // @ts-expect-error: indexing is fine.
|
|
5748
5748
|
e.auth === void 0);
|
|
5749
5749
|
}
|
|
5750
|
-
function
|
|
5750
|
+
function ed(e) {
|
|
5751
5751
|
if (typeof e == "string")
|
|
5752
5752
|
e = new URL(e);
|
|
5753
5753
|
else if (!Er(e)) {
|
|
@@ -5760,9 +5760,9 @@ function ef(e) {
|
|
|
5760
5760
|
const t = new TypeError("The URL must be of scheme file");
|
|
5761
5761
|
throw t.code = "ERR_INVALID_URL_SCHEME", t;
|
|
5762
5762
|
}
|
|
5763
|
-
return
|
|
5763
|
+
return td(e);
|
|
5764
5764
|
}
|
|
5765
|
-
function
|
|
5765
|
+
function td(e) {
|
|
5766
5766
|
if (e.hostname !== "") {
|
|
5767
5767
|
const r = new TypeError(
|
|
5768
5768
|
'File URL host must be "localhost" or empty on darwin'
|
|
@@ -5819,7 +5819,7 @@ class aa {
|
|
|
5819
5819
|
*/
|
|
5820
5820
|
constructor(t) {
|
|
5821
5821
|
let n;
|
|
5822
|
-
t ? Er(t) ? n = { path: t } : typeof t == "string" ||
|
|
5822
|
+
t ? Er(t) ? n = { path: t } : typeof t == "string" || nd(t) ? n = { value: t } : n = t : n = {}, this.cwd = "cwd" in n ? "" : J0.cwd(), this.data = {}, this.history = [], this.messages = [], this.value, this.map, this.result, this.stored;
|
|
5823
5823
|
let r = -1;
|
|
5824
5824
|
for (; ++r < Vn.length; ) {
|
|
5825
5825
|
const u = Vn[r];
|
|
@@ -5927,7 +5927,7 @@ class aa {
|
|
|
5927
5927
|
* Nothing.
|
|
5928
5928
|
*/
|
|
5929
5929
|
set path(t) {
|
|
5930
|
-
Er(t) && (t =
|
|
5930
|
+
Er(t) && (t = ed(t)), jn(t, "path"), this.path !== t && this.history.push(t);
|
|
5931
5931
|
}
|
|
5932
5932
|
/**
|
|
5933
5933
|
* Get the stem (basename w/o extname) (example: `'index.min'`).
|
|
@@ -6178,10 +6178,10 @@ function Pi(e, t) {
|
|
|
6178
6178
|
if (!e)
|
|
6179
6179
|
throw new Error("Setting `" + t + "` requires `path` to be set too");
|
|
6180
6180
|
}
|
|
6181
|
-
function
|
|
6181
|
+
function nd(e) {
|
|
6182
6182
|
return !!(e && typeof e == "object" && "byteLength" in e && "byteOffset" in e);
|
|
6183
6183
|
}
|
|
6184
|
-
const
|
|
6184
|
+
const rd = (
|
|
6185
6185
|
/**
|
|
6186
6186
|
* @type {new <Parameters extends Array<unknown>, Result>(property: string | symbol) => (...parameters: Parameters) => Result}
|
|
6187
6187
|
*/
|
|
@@ -6202,8 +6202,8 @@ const rf = (
|
|
|
6202
6202
|
};
|
|
6203
6203
|
return Object.setPrototypeOf(u, r), u;
|
|
6204
6204
|
})
|
|
6205
|
-
),
|
|
6206
|
-
class Hr extends
|
|
6205
|
+
), id = {}.hasOwnProperty;
|
|
6206
|
+
class Hr extends rd {
|
|
6207
6207
|
/**
|
|
6208
6208
|
* Create a processor.
|
|
6209
6209
|
*/
|
|
@@ -6293,7 +6293,7 @@ class Hr extends rf {
|
|
|
6293
6293
|
* the entire dataset when getting without key.
|
|
6294
6294
|
*/
|
|
6295
6295
|
data(t, n) {
|
|
6296
|
-
return typeof t == "string" ? arguments.length === 2 ? ($n("data", this.frozen), this.namespace[t] = n, this) :
|
|
6296
|
+
return typeof t == "string" ? arguments.length === 2 ? ($n("data", this.frozen), this.namespace[t] = n, this) : id.call(this.namespace, t) && this.namespace[t] || void 0 : t ? ($n("data", this.frozen), this.namespace = t, this) : this.namespace;
|
|
6297
6297
|
}
|
|
6298
6298
|
/**
|
|
6299
6299
|
* Freeze a processor.
|
|
@@ -6400,22 +6400,22 @@ class Hr extends rf {
|
|
|
6400
6400
|
/** @type {unknown} */
|
|
6401
6401
|
r.parse(o)
|
|
6402
6402
|
);
|
|
6403
|
-
r.run(l, o, function(
|
|
6404
|
-
if (
|
|
6405
|
-
return c(
|
|
6403
|
+
r.run(l, o, function(f, d, m) {
|
|
6404
|
+
if (f || !d || !m)
|
|
6405
|
+
return c(f);
|
|
6406
6406
|
const h = (
|
|
6407
6407
|
/** @type {CompileTree extends undefined ? Node : CompileTree} */
|
|
6408
6408
|
/** @type {unknown} */
|
|
6409
|
-
|
|
6409
|
+
d
|
|
6410
6410
|
), T = r.stringify(h, m);
|
|
6411
|
-
|
|
6412
|
-
|
|
6411
|
+
sd(T) ? m.value = T : m.result = T, c(
|
|
6412
|
+
f,
|
|
6413
6413
|
/** @type {VFileWithOutput<CompileResult>} */
|
|
6414
6414
|
m
|
|
6415
6415
|
);
|
|
6416
6416
|
});
|
|
6417
|
-
function c(
|
|
6418
|
-
|
|
6417
|
+
function c(f, d) {
|
|
6418
|
+
f || !d ? a(f) : u ? u(d) : n(void 0, d);
|
|
6419
6419
|
}
|
|
6420
6420
|
}
|
|
6421
6421
|
}
|
|
@@ -6502,12 +6502,12 @@ class Hr extends rf {
|
|
|
6502
6502
|
function u(a, o) {
|
|
6503
6503
|
const l = ln(n);
|
|
6504
6504
|
i.run(t, l, c);
|
|
6505
|
-
function c(
|
|
6505
|
+
function c(f, d, m) {
|
|
6506
6506
|
const h = (
|
|
6507
6507
|
/** @type {TailTree extends undefined ? Node : TailTree} */
|
|
6508
|
-
|
|
6508
|
+
d || t
|
|
6509
6509
|
);
|
|
6510
|
-
|
|
6510
|
+
f ? o(f) : a ? a(h) : r(void 0, h, m);
|
|
6511
6511
|
}
|
|
6512
6512
|
}
|
|
6513
6513
|
}
|
|
@@ -6640,11 +6640,11 @@ class Hr extends rf {
|
|
|
6640
6640
|
l(c, []);
|
|
6641
6641
|
else if (typeof c == "object")
|
|
6642
6642
|
if (Array.isArray(c)) {
|
|
6643
|
-
const [
|
|
6643
|
+
const [f, ...d] = (
|
|
6644
6644
|
/** @type {PluginTuple<Array<unknown>>} */
|
|
6645
6645
|
c
|
|
6646
6646
|
);
|
|
6647
|
-
l(
|
|
6647
|
+
l(f, d);
|
|
6648
6648
|
} else
|
|
6649
6649
|
a(c);
|
|
6650
6650
|
else
|
|
@@ -6658,33 +6658,33 @@ class Hr extends rf {
|
|
|
6658
6658
|
o(c.plugins), c.settings && (i.settings = qn(!0, i.settings, c.settings));
|
|
6659
6659
|
}
|
|
6660
6660
|
function o(c) {
|
|
6661
|
-
let
|
|
6661
|
+
let f = -1;
|
|
6662
6662
|
if (c != null) if (Array.isArray(c))
|
|
6663
|
-
for (; ++
|
|
6664
|
-
const
|
|
6665
|
-
u(
|
|
6663
|
+
for (; ++f < c.length; ) {
|
|
6664
|
+
const d = c[f];
|
|
6665
|
+
u(d);
|
|
6666
6666
|
}
|
|
6667
6667
|
else
|
|
6668
6668
|
throw new TypeError("Expected a list of plugins, not `" + c + "`");
|
|
6669
6669
|
}
|
|
6670
|
-
function l(c,
|
|
6671
|
-
let
|
|
6672
|
-
for (; ++
|
|
6673
|
-
if (r[
|
|
6674
|
-
m =
|
|
6670
|
+
function l(c, f) {
|
|
6671
|
+
let d = -1, m = -1;
|
|
6672
|
+
for (; ++d < r.length; )
|
|
6673
|
+
if (r[d][0] === c) {
|
|
6674
|
+
m = d;
|
|
6675
6675
|
break;
|
|
6676
6676
|
}
|
|
6677
6677
|
if (m === -1)
|
|
6678
|
-
r.push([c, ...
|
|
6679
|
-
else if (
|
|
6680
|
-
let [h, ...T] =
|
|
6678
|
+
r.push([c, ...f]);
|
|
6679
|
+
else if (f.length > 0) {
|
|
6680
|
+
let [h, ...T] = f;
|
|
6681
6681
|
const I = r[m][1];
|
|
6682
6682
|
pr(I) && pr(h) && (h = qn(!0, I, h)), r[m] = [c, h, ...T];
|
|
6683
6683
|
}
|
|
6684
6684
|
}
|
|
6685
6685
|
}
|
|
6686
6686
|
}
|
|
6687
|
-
const
|
|
6687
|
+
const ud = new Hr().freeze();
|
|
6688
6688
|
function Gn(e, t) {
|
|
6689
6689
|
if (typeof t != "function")
|
|
6690
6690
|
throw new TypeError("Cannot `" + e + "` without `parser`");
|
|
@@ -6710,18 +6710,18 @@ function Fi(e, t, n) {
|
|
|
6710
6710
|
);
|
|
6711
6711
|
}
|
|
6712
6712
|
function ln(e) {
|
|
6713
|
-
return
|
|
6713
|
+
return ad(e) ? e : new aa(e);
|
|
6714
6714
|
}
|
|
6715
|
-
function
|
|
6715
|
+
function ad(e) {
|
|
6716
6716
|
return !!(e && typeof e == "object" && "message" in e && "messages" in e);
|
|
6717
6717
|
}
|
|
6718
|
-
function
|
|
6719
|
-
return typeof e == "string" ||
|
|
6718
|
+
function sd(e) {
|
|
6719
|
+
return typeof e == "string" || od(e);
|
|
6720
6720
|
}
|
|
6721
|
-
function
|
|
6721
|
+
function od(e) {
|
|
6722
6722
|
return !!(e && typeof e == "object" && "byteLength" in e && "byteOffset" in e);
|
|
6723
6723
|
}
|
|
6724
|
-
const
|
|
6724
|
+
const ld = "https://github.com/remarkjs/react-markdown/blob/main/changelog.md", Bi = [], Hi = { allowDangerousHtml: !0 }, cd = /^(https?|ircs?|mailto|xmpp)$/i, dd = [
|
|
6725
6725
|
{ from: "astPlugins", id: "remove-buggy-html-in-markdown-parser" },
|
|
6726
6726
|
{ from: "allowDangerousHtml", id: "remove-buggy-html-in-markdown-parser" },
|
|
6727
6727
|
{
|
|
@@ -6755,22 +6755,22 @@ const cf = "https://github.com/remarkjs/react-markdown/blob/main/changelog.md",
|
|
|
6755
6755
|
{ from: "transformImageUri", id: "#add-urltransform", to: "urlTransform" },
|
|
6756
6756
|
{ from: "transformLinkUri", id: "#add-urltransform", to: "urlTransform" }
|
|
6757
6757
|
];
|
|
6758
|
-
function
|
|
6759
|
-
const t =
|
|
6760
|
-
return
|
|
6758
|
+
function fd(e) {
|
|
6759
|
+
const t = hd(e), n = md(e);
|
|
6760
|
+
return pd(t.runSync(t.parse(n), n), e);
|
|
6761
6761
|
}
|
|
6762
|
-
function
|
|
6762
|
+
function hd(e) {
|
|
6763
6763
|
const t = e.rehypePlugins || Bi, n = e.remarkPlugins || Bi, r = e.remarkRehypeOptions ? { ...e.remarkRehypeOptions, ...Hi } : Hi;
|
|
6764
|
-
return
|
|
6764
|
+
return ud().use(Wc).use(n).use(z0, r).use(t);
|
|
6765
6765
|
}
|
|
6766
|
-
function
|
|
6766
|
+
function md(e) {
|
|
6767
6767
|
const t = e.children || "", n = new aa();
|
|
6768
6768
|
return typeof t == "string" && (n.value = t), n;
|
|
6769
6769
|
}
|
|
6770
|
-
function
|
|
6771
|
-
const n = t.allowedElements, r = t.allowElement, i = t.components, u = t.disallowedElements, a = t.skipHtml, o = t.unwrapDisallowed, l = t.urlTransform ||
|
|
6772
|
-
for (const
|
|
6773
|
-
Object.hasOwn(t,
|
|
6770
|
+
function pd(e, t) {
|
|
6771
|
+
const n = t.allowedElements, r = t.allowElement, i = t.components, u = t.disallowedElements, a = t.skipHtml, o = t.unwrapDisallowed, l = t.urlTransform || Ed;
|
|
6772
|
+
for (const f of dd)
|
|
6773
|
+
Object.hasOwn(t, f.from) && ("" + f.from + (f.to ? "use `" + f.to + "` instead" : "remove it") + ld + f.id, void 0);
|
|
6774
6774
|
return Rn(e, c), So(e, {
|
|
6775
6775
|
Fragment: Au,
|
|
6776
6776
|
components: i,
|
|
@@ -6780,31 +6780,31 @@ function Ef(e, t) {
|
|
|
6780
6780
|
passKeys: !0,
|
|
6781
6781
|
passNode: !0
|
|
6782
6782
|
});
|
|
6783
|
-
function c(
|
|
6784
|
-
if (
|
|
6785
|
-
return a ? m.children.splice(
|
|
6786
|
-
if (
|
|
6783
|
+
function c(f, d, m) {
|
|
6784
|
+
if (f.type === "raw" && m && typeof d == "number")
|
|
6785
|
+
return a ? m.children.splice(d, 1) : m.children[d] = { type: "text", value: f.value }, d;
|
|
6786
|
+
if (f.type === "element") {
|
|
6787
6787
|
let h;
|
|
6788
6788
|
for (h in vn)
|
|
6789
|
-
if (Object.hasOwn(vn, h) && Object.hasOwn(
|
|
6790
|
-
const T =
|
|
6791
|
-
(I === null || I.includes(
|
|
6789
|
+
if (Object.hasOwn(vn, h) && Object.hasOwn(f.properties, h)) {
|
|
6790
|
+
const T = f.properties[h], I = vn[h];
|
|
6791
|
+
(I === null || I.includes(f.tagName)) && (f.properties[h] = l(String(T || ""), h, f));
|
|
6792
6792
|
}
|
|
6793
6793
|
}
|
|
6794
|
-
if (
|
|
6795
|
-
let h = n ? !n.includes(
|
|
6796
|
-
if (!h && r && typeof
|
|
6797
|
-
return o &&
|
|
6794
|
+
if (f.type === "element") {
|
|
6795
|
+
let h = n ? !n.includes(f.tagName) : u ? u.includes(f.tagName) : !1;
|
|
6796
|
+
if (!h && r && typeof d == "number" && (h = !r(f, d, m)), h && m && typeof d == "number")
|
|
6797
|
+
return o && f.children ? m.children.splice(d, 1, ...f.children) : m.children.splice(d, 1), d;
|
|
6798
6798
|
}
|
|
6799
6799
|
}
|
|
6800
6800
|
}
|
|
6801
|
-
function
|
|
6801
|
+
function Ed(e) {
|
|
6802
6802
|
const t = e.indexOf(":"), n = e.indexOf("?"), r = e.indexOf("#"), i = e.indexOf("/");
|
|
6803
6803
|
return (
|
|
6804
6804
|
// If there is no protocol, it’s relative.
|
|
6805
6805
|
t === -1 || // If the first colon is after a `?`, `#`, or `/`, it’s not a protocol.
|
|
6806
6806
|
i !== -1 && t > i || n !== -1 && t > n || r !== -1 && t > r || // It is a protocol, it should be allowed.
|
|
6807
|
-
|
|
6807
|
+
cd.test(e.slice(0, t)) ? e : ""
|
|
6808
6808
|
);
|
|
6809
6809
|
}
|
|
6810
6810
|
function vi(e, t) {
|
|
@@ -6816,20 +6816,20 @@ function vi(e, t) {
|
|
|
6816
6816
|
r++, i = n.indexOf(t, i + t.length);
|
|
6817
6817
|
return r;
|
|
6818
6818
|
}
|
|
6819
|
-
function
|
|
6819
|
+
function Td(e) {
|
|
6820
6820
|
if (typeof e != "string")
|
|
6821
6821
|
throw new TypeError("Expected a string");
|
|
6822
6822
|
return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
6823
6823
|
}
|
|
6824
|
-
function
|
|
6825
|
-
const i = On((n || {}).ignore || []), u =
|
|
6824
|
+
function bd(e, t, n) {
|
|
6825
|
+
const i = On((n || {}).ignore || []), u = gd(t);
|
|
6826
6826
|
let a = -1;
|
|
6827
6827
|
for (; ++a < u.length; )
|
|
6828
6828
|
ua(e, "text", o);
|
|
6829
|
-
function o(c,
|
|
6830
|
-
let
|
|
6831
|
-
for (; ++
|
|
6832
|
-
const h = d
|
|
6829
|
+
function o(c, f) {
|
|
6830
|
+
let d = -1, m;
|
|
6831
|
+
for (; ++d < f.length; ) {
|
|
6832
|
+
const h = f[d], T = m ? m.children : void 0;
|
|
6833
6833
|
if (i(
|
|
6834
6834
|
h,
|
|
6835
6835
|
T ? T.indexOf(h) : void 0,
|
|
@@ -6839,12 +6839,12 @@ function gf(e, t, n) {
|
|
|
6839
6839
|
m = h;
|
|
6840
6840
|
}
|
|
6841
6841
|
if (m)
|
|
6842
|
-
return l(c,
|
|
6842
|
+
return l(c, f);
|
|
6843
6843
|
}
|
|
6844
|
-
function l(c,
|
|
6845
|
-
const
|
|
6844
|
+
function l(c, f) {
|
|
6845
|
+
const d = f[f.length - 1], m = u[a][0], h = u[a][1];
|
|
6846
6846
|
let T = 0;
|
|
6847
|
-
const N =
|
|
6847
|
+
const N = d.children.indexOf(c);
|
|
6848
6848
|
let k = !1, L = [];
|
|
6849
6849
|
m.lastIndex = 0;
|
|
6850
6850
|
let S = m.exec(c.value);
|
|
@@ -6852,7 +6852,7 @@ function gf(e, t, n) {
|
|
|
6852
6852
|
const w = S.index, q = {
|
|
6853
6853
|
index: S.index,
|
|
6854
6854
|
input: S.input,
|
|
6855
|
-
stack: [...
|
|
6855
|
+
stack: [...f, c]
|
|
6856
6856
|
};
|
|
6857
6857
|
let C = h(...S, q);
|
|
6858
6858
|
if (typeof C == "string" && (C = C.length > 0 ? { type: "text", value: C } : void 0), C === !1 ? m.lastIndex = w + 1 : (T !== w && L.push({
|
|
@@ -6862,10 +6862,10 @@ function gf(e, t, n) {
|
|
|
6862
6862
|
break;
|
|
6863
6863
|
S = m.exec(c.value);
|
|
6864
6864
|
}
|
|
6865
|
-
return k ? (T < c.value.length && L.push({ type: "text", value: c.value.slice(T) }),
|
|
6865
|
+
return k ? (T < c.value.length && L.push({ type: "text", value: c.value.slice(T) }), d.children.splice(N, 1, ...L)) : L = [c], N + L.length;
|
|
6866
6866
|
}
|
|
6867
6867
|
}
|
|
6868
|
-
function
|
|
6868
|
+
function gd(e) {
|
|
6869
6869
|
const t = [];
|
|
6870
6870
|
if (!Array.isArray(e))
|
|
6871
6871
|
throw new TypeError("Expected find and replace tuple or list of tuples");
|
|
@@ -6873,37 +6873,37 @@ function _f(e) {
|
|
|
6873
6873
|
let r = -1;
|
|
6874
6874
|
for (; ++r < n.length; ) {
|
|
6875
6875
|
const i = n[r];
|
|
6876
|
-
t.push([
|
|
6876
|
+
t.push([_d(i[0]), Ad(i[1])]);
|
|
6877
6877
|
}
|
|
6878
6878
|
return t;
|
|
6879
6879
|
}
|
|
6880
|
-
function
|
|
6881
|
-
return typeof e == "string" ? new RegExp(
|
|
6880
|
+
function _d(e) {
|
|
6881
|
+
return typeof e == "string" ? new RegExp(Td(e), "g") : e;
|
|
6882
6882
|
}
|
|
6883
|
-
function
|
|
6883
|
+
function Ad(e) {
|
|
6884
6884
|
return typeof e == "function" ? e : function() {
|
|
6885
6885
|
return e;
|
|
6886
6886
|
};
|
|
6887
6887
|
}
|
|
6888
6888
|
const Kn = "phrasing", Xn = ["autolink", "link", "image", "label"];
|
|
6889
|
-
function
|
|
6889
|
+
function kd() {
|
|
6890
6890
|
return {
|
|
6891
|
-
transforms: [
|
|
6891
|
+
transforms: [Ld],
|
|
6892
6892
|
enter: {
|
|
6893
|
-
literalAutolink:
|
|
6893
|
+
literalAutolink: Id,
|
|
6894
6894
|
literalAutolinkEmail: Jn,
|
|
6895
6895
|
literalAutolinkHttp: Jn,
|
|
6896
6896
|
literalAutolinkWww: Jn
|
|
6897
6897
|
},
|
|
6898
6898
|
exit: {
|
|
6899
|
-
literalAutolink:
|
|
6900
|
-
literalAutolinkEmail:
|
|
6901
|
-
literalAutolinkHttp:
|
|
6902
|
-
literalAutolinkWww:
|
|
6899
|
+
literalAutolink: Sd,
|
|
6900
|
+
literalAutolinkEmail: xd,
|
|
6901
|
+
literalAutolinkHttp: yd,
|
|
6902
|
+
literalAutolinkWww: Nd
|
|
6903
6903
|
}
|
|
6904
6904
|
};
|
|
6905
6905
|
}
|
|
6906
|
-
function
|
|
6906
|
+
function Cd() {
|
|
6907
6907
|
return {
|
|
6908
6908
|
unsafe: [
|
|
6909
6909
|
{
|
|
@@ -6930,41 +6930,41 @@ function If() {
|
|
|
6930
6930
|
]
|
|
6931
6931
|
};
|
|
6932
6932
|
}
|
|
6933
|
-
function
|
|
6933
|
+
function Id(e) {
|
|
6934
6934
|
this.enter({ type: "link", title: null, url: "", children: [] }, e);
|
|
6935
6935
|
}
|
|
6936
6936
|
function Jn(e) {
|
|
6937
6937
|
this.config.enter.autolinkProtocol.call(this, e);
|
|
6938
6938
|
}
|
|
6939
|
-
function
|
|
6939
|
+
function yd(e) {
|
|
6940
6940
|
this.config.exit.autolinkProtocol.call(this, e);
|
|
6941
6941
|
}
|
|
6942
|
-
function
|
|
6942
|
+
function Nd(e) {
|
|
6943
6943
|
this.config.exit.data.call(this, e);
|
|
6944
6944
|
const t = this.stack[this.stack.length - 1];
|
|
6945
6945
|
t.type, t.url = "http://" + this.sliceSerialize(e);
|
|
6946
6946
|
}
|
|
6947
|
-
function
|
|
6947
|
+
function xd(e) {
|
|
6948
6948
|
this.config.exit.autolinkEmail.call(this, e);
|
|
6949
6949
|
}
|
|
6950
|
-
function
|
|
6950
|
+
function Sd(e) {
|
|
6951
6951
|
this.exit(e);
|
|
6952
6952
|
}
|
|
6953
|
-
function
|
|
6954
|
-
|
|
6953
|
+
function Ld(e) {
|
|
6954
|
+
bd(
|
|
6955
6955
|
e,
|
|
6956
6956
|
[
|
|
6957
|
-
[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,
|
|
6958
|
-
[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)", "gu"),
|
|
6957
|
+
[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi, Od],
|
|
6958
|
+
[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)", "gu"), Dd]
|
|
6959
6959
|
],
|
|
6960
6960
|
{ ignore: ["link", "linkReference"] }
|
|
6961
6961
|
);
|
|
6962
6962
|
}
|
|
6963
|
-
function
|
|
6963
|
+
function Od(e, t, n, r, i) {
|
|
6964
6964
|
let u = "";
|
|
6965
|
-
if (!sa(i) || (/^w/i.test(t) && (n = t + n, t = "", u = "http://"), !
|
|
6965
|
+
if (!sa(i) || (/^w/i.test(t) && (n = t + n, t = "", u = "http://"), !Rd(n)))
|
|
6966
6966
|
return !1;
|
|
6967
|
-
const a =
|
|
6967
|
+
const a = wd(n + r);
|
|
6968
6968
|
if (!a[0]) return !1;
|
|
6969
6969
|
const o = {
|
|
6970
6970
|
type: "link",
|
|
@@ -6974,7 +6974,7 @@ function Df(e, t, n, r, i) {
|
|
|
6974
6974
|
};
|
|
6975
6975
|
return a[1] ? [o, { type: "text", value: a[1] }] : o;
|
|
6976
6976
|
}
|
|
6977
|
-
function
|
|
6977
|
+
function Dd(e, t, n, r) {
|
|
6978
6978
|
return (
|
|
6979
6979
|
// Not an expected previous character.
|
|
6980
6980
|
!sa(r, !0) || // Label ends in not allowed character.
|
|
@@ -6986,11 +6986,11 @@ function Rf(e, t, n, r) {
|
|
|
6986
6986
|
}
|
|
6987
6987
|
);
|
|
6988
6988
|
}
|
|
6989
|
-
function
|
|
6989
|
+
function Rd(e) {
|
|
6990
6990
|
const t = e.split(".");
|
|
6991
6991
|
return !(t.length < 2 || t[t.length - 1] && (/_/.test(t[t.length - 1]) || !/[a-zA-Z\d]/.test(t[t.length - 1])) || t[t.length - 2] && (/_/.test(t[t.length - 2]) || !/[a-zA-Z\d]/.test(t[t.length - 2])));
|
|
6992
6992
|
}
|
|
6993
|
-
function
|
|
6993
|
+
function wd(e) {
|
|
6994
6994
|
const t = /[!"&'),.:;<>?\]}]+$/.exec(e);
|
|
6995
6995
|
if (!t)
|
|
6996
6996
|
return [e, void 0];
|
|
@@ -7007,41 +7007,41 @@ function sa(e, t) {
|
|
|
7007
7007
|
return (e.index === 0 || lt(n) || xn(n)) && // If it’s an email, the previous character should not be a slash.
|
|
7008
7008
|
(!t || n !== 47);
|
|
7009
7009
|
}
|
|
7010
|
-
oa.peek =
|
|
7011
|
-
function
|
|
7010
|
+
oa.peek = Yd;
|
|
7011
|
+
function Pd() {
|
|
7012
7012
|
this.buffer();
|
|
7013
7013
|
}
|
|
7014
|
-
function
|
|
7014
|
+
function Md(e) {
|
|
7015
7015
|
this.enter({ type: "footnoteReference", identifier: "", label: "" }, e);
|
|
7016
7016
|
}
|
|
7017
|
-
function
|
|
7017
|
+
function Fd() {
|
|
7018
7018
|
this.buffer();
|
|
7019
7019
|
}
|
|
7020
|
-
function
|
|
7020
|
+
function Bd(e) {
|
|
7021
7021
|
this.enter(
|
|
7022
7022
|
{ type: "footnoteDefinition", identifier: "", label: "", children: [] },
|
|
7023
7023
|
e
|
|
7024
7024
|
);
|
|
7025
7025
|
}
|
|
7026
|
-
function
|
|
7026
|
+
function Hd(e) {
|
|
7027
7027
|
const t = this.resume(), n = this.stack[this.stack.length - 1];
|
|
7028
7028
|
n.type, n.identifier = Pe(
|
|
7029
7029
|
this.sliceSerialize(e)
|
|
7030
7030
|
).toLowerCase(), n.label = t;
|
|
7031
7031
|
}
|
|
7032
|
-
function
|
|
7032
|
+
function vd(e) {
|
|
7033
7033
|
this.exit(e);
|
|
7034
7034
|
}
|
|
7035
|
-
function
|
|
7035
|
+
function Ud(e) {
|
|
7036
7036
|
const t = this.resume(), n = this.stack[this.stack.length - 1];
|
|
7037
7037
|
n.type, n.identifier = Pe(
|
|
7038
7038
|
this.sliceSerialize(e)
|
|
7039
7039
|
).toLowerCase(), n.label = t;
|
|
7040
7040
|
}
|
|
7041
|
-
function
|
|
7041
|
+
function zd(e) {
|
|
7042
7042
|
this.exit(e);
|
|
7043
7043
|
}
|
|
7044
|
-
function
|
|
7044
|
+
function Yd() {
|
|
7045
7045
|
return "[";
|
|
7046
7046
|
}
|
|
7047
7047
|
function oa(e, t, n, r) {
|
|
@@ -7052,23 +7052,23 @@ function oa(e, t, n, r) {
|
|
|
7052
7052
|
n.safe(n.associationId(e), { after: "]", before: u })
|
|
7053
7053
|
), o(), a(), u += i.move("]"), u;
|
|
7054
7054
|
}
|
|
7055
|
-
function
|
|
7055
|
+
function qd() {
|
|
7056
7056
|
return {
|
|
7057
7057
|
enter: {
|
|
7058
|
-
gfmFootnoteCallString:
|
|
7059
|
-
gfmFootnoteCall:
|
|
7060
|
-
gfmFootnoteDefinitionLabelString:
|
|
7061
|
-
gfmFootnoteDefinition:
|
|
7058
|
+
gfmFootnoteCallString: Pd,
|
|
7059
|
+
gfmFootnoteCall: Md,
|
|
7060
|
+
gfmFootnoteDefinitionLabelString: Fd,
|
|
7061
|
+
gfmFootnoteDefinition: Bd
|
|
7062
7062
|
},
|
|
7063
7063
|
exit: {
|
|
7064
|
-
gfmFootnoteCallString:
|
|
7065
|
-
gfmFootnoteCall:
|
|
7066
|
-
gfmFootnoteDefinitionLabelString:
|
|
7067
|
-
gfmFootnoteDefinition:
|
|
7064
|
+
gfmFootnoteCallString: Hd,
|
|
7065
|
+
gfmFootnoteCall: vd,
|
|
7066
|
+
gfmFootnoteDefinitionLabelString: Ud,
|
|
7067
|
+
gfmFootnoteDefinition: zd
|
|
7068
7068
|
}
|
|
7069
7069
|
};
|
|
7070
7070
|
}
|
|
7071
|
-
function
|
|
7071
|
+
function Vd(e) {
|
|
7072
7072
|
let t = !1;
|
|
7073
7073
|
return e && e.firstLineBlank && (t = !0), {
|
|
7074
7074
|
handlers: { footnoteDefinition: n, footnoteReference: oa },
|
|
@@ -7078,25 +7078,25 @@ function Wf(e) {
|
|
|
7078
7078
|
function n(r, i, u, a) {
|
|
7079
7079
|
const o = u.createTracker(a);
|
|
7080
7080
|
let l = o.move("[^");
|
|
7081
|
-
const c = u.enter("footnoteDefinition"),
|
|
7081
|
+
const c = u.enter("footnoteDefinition"), f = u.enter("label");
|
|
7082
7082
|
return l += o.move(
|
|
7083
7083
|
u.safe(u.associationId(r), { before: l, after: "]" })
|
|
7084
|
-
),
|
|
7084
|
+
), f(), l += o.move("]:"), r.children && r.children.length > 0 && (o.shift(4), l += o.move(
|
|
7085
7085
|
(t ? `
|
|
7086
7086
|
` : " ") + u.indentLines(
|
|
7087
7087
|
u.containerFlow(r, o.current()),
|
|
7088
|
-
t ? la :
|
|
7088
|
+
t ? la : Wd
|
|
7089
7089
|
)
|
|
7090
7090
|
)), c(), l;
|
|
7091
7091
|
}
|
|
7092
7092
|
}
|
|
7093
|
-
function
|
|
7093
|
+
function Wd(e, t, n) {
|
|
7094
7094
|
return t === 0 ? e : la(e, t, n);
|
|
7095
7095
|
}
|
|
7096
7096
|
function la(e, t, n) {
|
|
7097
7097
|
return (n ? "" : " ") + e;
|
|
7098
7098
|
}
|
|
7099
|
-
const
|
|
7099
|
+
const jd = [
|
|
7100
7100
|
"autolink",
|
|
7101
7101
|
"destinationLiteral",
|
|
7102
7102
|
"destinationRaw",
|
|
@@ -7104,30 +7104,30 @@ const Gf = [
|
|
|
7104
7104
|
"titleQuote",
|
|
7105
7105
|
"titleApostrophe"
|
|
7106
7106
|
];
|
|
7107
|
-
ca.peek =
|
|
7108
|
-
function
|
|
7107
|
+
ca.peek = Xd;
|
|
7108
|
+
function Gd() {
|
|
7109
7109
|
return {
|
|
7110
7110
|
canContainEols: ["delete"],
|
|
7111
|
-
enter: { strikethrough:
|
|
7112
|
-
exit: { strikethrough:
|
|
7111
|
+
enter: { strikethrough: $d },
|
|
7112
|
+
exit: { strikethrough: Kd }
|
|
7113
7113
|
};
|
|
7114
7114
|
}
|
|
7115
|
-
function
|
|
7115
|
+
function Qd() {
|
|
7116
7116
|
return {
|
|
7117
7117
|
unsafe: [
|
|
7118
7118
|
{
|
|
7119
7119
|
character: "~",
|
|
7120
7120
|
inConstruct: "phrasing",
|
|
7121
|
-
notInConstruct:
|
|
7121
|
+
notInConstruct: jd
|
|
7122
7122
|
}
|
|
7123
7123
|
],
|
|
7124
7124
|
handlers: { delete: ca }
|
|
7125
7125
|
};
|
|
7126
7126
|
}
|
|
7127
|
-
function
|
|
7127
|
+
function $d(e) {
|
|
7128
7128
|
this.enter({ type: "delete", children: [] }, e);
|
|
7129
7129
|
}
|
|
7130
|
-
function
|
|
7130
|
+
function Kd(e) {
|
|
7131
7131
|
this.exit(e);
|
|
7132
7132
|
}
|
|
7133
7133
|
function ca(e, t, n, r) {
|
|
@@ -7139,66 +7139,66 @@ function ca(e, t, n, r) {
|
|
|
7139
7139
|
after: "~"
|
|
7140
7140
|
}), a += i.move("~~"), u(), a;
|
|
7141
7141
|
}
|
|
7142
|
-
function
|
|
7142
|
+
function Xd() {
|
|
7143
7143
|
return "~";
|
|
7144
7144
|
}
|
|
7145
|
-
function
|
|
7145
|
+
function Jd(e) {
|
|
7146
7146
|
return e.length;
|
|
7147
7147
|
}
|
|
7148
|
-
function
|
|
7149
|
-
const n = t || {}, r = (n.align || []).concat(), i = n.stringLength ||
|
|
7150
|
-
let c = 0,
|
|
7151
|
-
for (; ++
|
|
7148
|
+
function Zd(e, t) {
|
|
7149
|
+
const n = t || {}, r = (n.align || []).concat(), i = n.stringLength || Jd, u = [], a = [], o = [], l = [];
|
|
7150
|
+
let c = 0, f = -1;
|
|
7151
|
+
for (; ++f < e.length; ) {
|
|
7152
7152
|
const I = [], N = [];
|
|
7153
7153
|
let k = -1;
|
|
7154
|
-
for (e[
|
|
7155
|
-
const L =
|
|
7154
|
+
for (e[f].length > c && (c = e[f].length); ++k < e[f].length; ) {
|
|
7155
|
+
const L = ef(e[f][k]);
|
|
7156
7156
|
if (n.alignDelimiters !== !1) {
|
|
7157
7157
|
const S = i(L);
|
|
7158
7158
|
N[k] = S, (l[k] === void 0 || S > l[k]) && (l[k] = S);
|
|
7159
7159
|
}
|
|
7160
7160
|
I.push(L);
|
|
7161
7161
|
}
|
|
7162
|
-
a[
|
|
7162
|
+
a[f] = I, o[f] = N;
|
|
7163
7163
|
}
|
|
7164
|
-
let
|
|
7164
|
+
let d = -1;
|
|
7165
7165
|
if (typeof r == "object" && "length" in r)
|
|
7166
|
-
for (; ++
|
|
7167
|
-
u[
|
|
7166
|
+
for (; ++d < c; )
|
|
7167
|
+
u[d] = Ui(r[d]);
|
|
7168
7168
|
else {
|
|
7169
7169
|
const I = Ui(r);
|
|
7170
|
-
for (; ++
|
|
7171
|
-
u[
|
|
7170
|
+
for (; ++d < c; )
|
|
7171
|
+
u[d] = I;
|
|
7172
7172
|
}
|
|
7173
|
-
|
|
7173
|
+
d = -1;
|
|
7174
7174
|
const m = [], h = [];
|
|
7175
|
-
for (; ++
|
|
7176
|
-
const I = u[
|
|
7175
|
+
for (; ++d < c; ) {
|
|
7176
|
+
const I = u[d];
|
|
7177
7177
|
let N = "", k = "";
|
|
7178
7178
|
I === 99 ? (N = ":", k = ":") : I === 108 ? N = ":" : I === 114 && (k = ":");
|
|
7179
7179
|
let L = n.alignDelimiters === !1 ? 1 : Math.max(
|
|
7180
7180
|
1,
|
|
7181
|
-
l[
|
|
7181
|
+
l[d] - N.length - k.length
|
|
7182
7182
|
);
|
|
7183
7183
|
const S = N + "-".repeat(L) + k;
|
|
7184
|
-
n.alignDelimiters !== !1 && (L = N.length + L + k.length, L > l[
|
|
7184
|
+
n.alignDelimiters !== !1 && (L = N.length + L + k.length, L > l[d] && (l[d] = L), h[d] = L), m[d] = S;
|
|
7185
7185
|
}
|
|
7186
|
-
a.splice(1, 0, m), o.splice(1, 0, h),
|
|
7186
|
+
a.splice(1, 0, m), o.splice(1, 0, h), f = -1;
|
|
7187
7187
|
const T = [];
|
|
7188
|
-
for (; ++
|
|
7189
|
-
const I = a[
|
|
7190
|
-
|
|
7188
|
+
for (; ++f < a.length; ) {
|
|
7189
|
+
const I = a[f], N = o[f];
|
|
7190
|
+
d = -1;
|
|
7191
7191
|
const k = [];
|
|
7192
|
-
for (; ++
|
|
7193
|
-
const L = I[
|
|
7192
|
+
for (; ++d < c; ) {
|
|
7193
|
+
const L = I[d] || "";
|
|
7194
7194
|
let S = "", w = "";
|
|
7195
7195
|
if (n.alignDelimiters !== !1) {
|
|
7196
|
-
const q = l[
|
|
7196
|
+
const q = l[d] - (N[d] || 0), C = u[d];
|
|
7197
7197
|
C === 114 ? S = " ".repeat(q) : C === 99 ? q % 2 ? (S = " ".repeat(q / 2 + 0.5), w = " ".repeat(q / 2 - 0.5)) : (S = " ".repeat(q / 2), w = S) : w = " ".repeat(q);
|
|
7198
7198
|
}
|
|
7199
|
-
n.delimiterStart !== !1 && !
|
|
7199
|
+
n.delimiterStart !== !1 && !d && k.push("|"), n.padding !== !1 && // Don’t add the opening space if we’re not aligning and the cell is
|
|
7200
7200
|
// empty: there will be a closing space.
|
|
7201
|
-
!(n.alignDelimiters === !1 && L === "") && (n.delimiterStart !== !1 ||
|
|
7201
|
+
!(n.alignDelimiters === !1 && L === "") && (n.delimiterStart !== !1 || d) && k.push(" "), n.alignDelimiters !== !1 && k.push(S), k.push(L), n.alignDelimiters !== !1 && k.push(w), n.padding !== !1 && k.push(" "), (n.delimiterEnd !== !1 || d !== c - 1) && k.push("|");
|
|
7202
7202
|
}
|
|
7203
7203
|
T.push(
|
|
7204
7204
|
n.delimiterEnd === !1 ? k.join("").replace(/ +$/, "") : k.join("")
|
|
@@ -7207,7 +7207,7 @@ function ed(e, t) {
|
|
|
7207
7207
|
return T.join(`
|
|
7208
7208
|
`);
|
|
7209
7209
|
}
|
|
7210
|
-
function
|
|
7210
|
+
function ef(e) {
|
|
7211
7211
|
return e == null ? "" : String(e);
|
|
7212
7212
|
}
|
|
7213
7213
|
function Ui(e) {
|
|
@@ -7215,7 +7215,7 @@ function Ui(e) {
|
|
|
7215
7215
|
return t === 67 || t === 99 ? 99 : t === 76 || t === 108 ? 108 : t === 82 || t === 114 ? 114 : 0;
|
|
7216
7216
|
}
|
|
7217
7217
|
const zi = {}.hasOwnProperty;
|
|
7218
|
-
function
|
|
7218
|
+
function da(e, t) {
|
|
7219
7219
|
const n = t || {};
|
|
7220
7220
|
function r(i, ...u) {
|
|
7221
7221
|
let a = r.invalid;
|
|
@@ -7229,19 +7229,19 @@ function fa(e, t) {
|
|
|
7229
7229
|
}
|
|
7230
7230
|
return r.handlers = n.handlers || {}, r.invalid = n.invalid, r.unknown = n.unknown, r;
|
|
7231
7231
|
}
|
|
7232
|
-
function
|
|
7232
|
+
function tf(e, t, n, r) {
|
|
7233
7233
|
const i = n.enter("blockquote"), u = n.createTracker(r);
|
|
7234
7234
|
u.move("> "), u.shift(2);
|
|
7235
7235
|
const a = n.indentLines(
|
|
7236
7236
|
n.containerFlow(e, u.current()),
|
|
7237
|
-
|
|
7237
|
+
nf
|
|
7238
7238
|
);
|
|
7239
7239
|
return i(), a;
|
|
7240
7240
|
}
|
|
7241
|
-
function
|
|
7241
|
+
function nf(e, t, n) {
|
|
7242
7242
|
return ">" + (n ? "" : " ") + e;
|
|
7243
7243
|
}
|
|
7244
|
-
function
|
|
7244
|
+
function rf(e, t) {
|
|
7245
7245
|
return Yi(e, t.inConstruct, !0) && !Yi(e, t.notInConstruct, !1);
|
|
7246
7246
|
}
|
|
7247
7247
|
function Yi(e, t, n) {
|
|
@@ -7257,12 +7257,12 @@ function qi(e, t, n, r) {
|
|
|
7257
7257
|
let i = -1;
|
|
7258
7258
|
for (; ++i < n.unsafe.length; )
|
|
7259
7259
|
if (n.unsafe[i].character === `
|
|
7260
|
-
` &&
|
|
7260
|
+
` && rf(n.stack, n.unsafe[i]))
|
|
7261
7261
|
return /[ \t]/.test(r.before) ? "" : " ";
|
|
7262
7262
|
return `\\
|
|
7263
7263
|
`;
|
|
7264
7264
|
}
|
|
7265
|
-
function
|
|
7265
|
+
function uf(e, t) {
|
|
7266
7266
|
const n = String(e);
|
|
7267
7267
|
let r = n.indexOf(t), i = r, u = 0, a = 0;
|
|
7268
7268
|
if (typeof t != "string")
|
|
@@ -7271,13 +7271,13 @@ function ud(e, t) {
|
|
|
7271
7271
|
r === i ? ++u > a && (a = u) : u = 1, i = r + t.length, r = n.indexOf(t, i);
|
|
7272
7272
|
return a;
|
|
7273
7273
|
}
|
|
7274
|
-
function
|
|
7274
|
+
function af(e, t) {
|
|
7275
7275
|
return !!(t.options.fences === !1 && e.value && // If there’s no info…
|
|
7276
7276
|
!e.lang && // And there’s a non-whitespace character…
|
|
7277
7277
|
/[^ \r\n]/.test(e.value) && // And the value doesn’t start or end in a blank…
|
|
7278
7278
|
!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value));
|
|
7279
7279
|
}
|
|
7280
|
-
function
|
|
7280
|
+
function sf(e) {
|
|
7281
7281
|
const t = e.options.fence || "`";
|
|
7282
7282
|
if (t !== "`" && t !== "~")
|
|
7283
7283
|
throw new Error(
|
|
@@ -7285,42 +7285,42 @@ function sd(e) {
|
|
|
7285
7285
|
);
|
|
7286
7286
|
return t;
|
|
7287
7287
|
}
|
|
7288
|
-
function
|
|
7289
|
-
const i =
|
|
7290
|
-
if (
|
|
7291
|
-
const
|
|
7292
|
-
return
|
|
7288
|
+
function of(e, t, n, r) {
|
|
7289
|
+
const i = sf(n), u = e.value || "", a = i === "`" ? "GraveAccent" : "Tilde";
|
|
7290
|
+
if (af(e, n)) {
|
|
7291
|
+
const d = n.enter("codeIndented"), m = n.indentLines(u, lf);
|
|
7292
|
+
return d(), m;
|
|
7293
7293
|
}
|
|
7294
|
-
const o = n.createTracker(r), l = i.repeat(Math.max(
|
|
7295
|
-
let
|
|
7294
|
+
const o = n.createTracker(r), l = i.repeat(Math.max(uf(u, i) + 1, 3)), c = n.enter("codeFenced");
|
|
7295
|
+
let f = o.move(l);
|
|
7296
7296
|
if (e.lang) {
|
|
7297
|
-
const
|
|
7298
|
-
|
|
7297
|
+
const d = n.enter(`codeFencedLang${a}`);
|
|
7298
|
+
f += o.move(
|
|
7299
7299
|
n.safe(e.lang, {
|
|
7300
|
-
before:
|
|
7300
|
+
before: f,
|
|
7301
7301
|
after: " ",
|
|
7302
7302
|
encode: ["`"],
|
|
7303
7303
|
...o.current()
|
|
7304
7304
|
})
|
|
7305
|
-
),
|
|
7305
|
+
), d();
|
|
7306
7306
|
}
|
|
7307
7307
|
if (e.lang && e.meta) {
|
|
7308
|
-
const
|
|
7309
|
-
|
|
7308
|
+
const d = n.enter(`codeFencedMeta${a}`);
|
|
7309
|
+
f += o.move(" "), f += o.move(
|
|
7310
7310
|
n.safe(e.meta, {
|
|
7311
|
-
before:
|
|
7311
|
+
before: f,
|
|
7312
7312
|
after: `
|
|
7313
7313
|
`,
|
|
7314
7314
|
encode: ["`"],
|
|
7315
7315
|
...o.current()
|
|
7316
7316
|
})
|
|
7317
|
-
),
|
|
7317
|
+
), d();
|
|
7318
7318
|
}
|
|
7319
|
-
return
|
|
7320
|
-
`), u && (
|
|
7321
|
-
`)),
|
|
7319
|
+
return f += o.move(`
|
|
7320
|
+
`), u && (f += o.move(u + `
|
|
7321
|
+
`)), f += o.move(l), c(), f;
|
|
7322
7322
|
}
|
|
7323
|
-
function
|
|
7323
|
+
function lf(e, t, n) {
|
|
7324
7324
|
return (n ? "" : " ") + e;
|
|
7325
7325
|
}
|
|
7326
7326
|
function vr(e) {
|
|
@@ -7331,7 +7331,7 @@ function vr(e) {
|
|
|
7331
7331
|
);
|
|
7332
7332
|
return t;
|
|
7333
7333
|
}
|
|
7334
|
-
function
|
|
7334
|
+
function cf(e, t, n, r) {
|
|
7335
7335
|
const i = vr(n), u = i === '"' ? "Quote" : "Apostrophe", a = n.enter("definition");
|
|
7336
7336
|
let o = n.enter("label");
|
|
7337
7337
|
const l = n.createTracker(r);
|
|
@@ -7361,7 +7361,7 @@ function cd(e, t, n, r) {
|
|
|
7361
7361
|
})
|
|
7362
7362
|
), c += l.move(i), o()), a(), c;
|
|
7363
7363
|
}
|
|
7364
|
-
function
|
|
7364
|
+
function df(e) {
|
|
7365
7365
|
const t = e.options.emphasis || "*";
|
|
7366
7366
|
if (t !== "*" && t !== "_")
|
|
7367
7367
|
throw new Error(
|
|
@@ -7405,9 +7405,9 @@ function An(e, t, n) {
|
|
|
7405
7405
|
{ inside: !1, outside: !1 }
|
|
7406
7406
|
);
|
|
7407
7407
|
}
|
|
7408
|
-
|
|
7409
|
-
function
|
|
7410
|
-
const i =
|
|
7408
|
+
fa.peek = ff;
|
|
7409
|
+
function fa(e, t, n, r) {
|
|
7410
|
+
const i = df(n), u = n.enter("emphasis"), a = n.createTracker(r), o = a.move(i);
|
|
7411
7411
|
let l = a.move(
|
|
7412
7412
|
n.containerPhrasing(e, {
|
|
7413
7413
|
after: i,
|
|
@@ -7415,41 +7415,41 @@ function da(e, t, n, r) {
|
|
|
7415
7415
|
...a.current()
|
|
7416
7416
|
})
|
|
7417
7417
|
);
|
|
7418
|
-
const c = l.charCodeAt(0),
|
|
7418
|
+
const c = l.charCodeAt(0), f = An(
|
|
7419
7419
|
r.before.charCodeAt(r.before.length - 1),
|
|
7420
7420
|
c,
|
|
7421
7421
|
i
|
|
7422
7422
|
);
|
|
7423
|
-
|
|
7424
|
-
const
|
|
7425
|
-
m.inside && (l = l.slice(0, -1) + Kt(
|
|
7423
|
+
f.inside && (l = Kt(c) + l.slice(1));
|
|
7424
|
+
const d = l.charCodeAt(l.length - 1), m = An(r.after.charCodeAt(0), d, i);
|
|
7425
|
+
m.inside && (l = l.slice(0, -1) + Kt(d));
|
|
7426
7426
|
const h = a.move(i);
|
|
7427
7427
|
return u(), n.attentionEncodeSurroundingInfo = {
|
|
7428
7428
|
after: m.outside,
|
|
7429
|
-
before:
|
|
7429
|
+
before: f.outside
|
|
7430
7430
|
}, o + l + h;
|
|
7431
7431
|
}
|
|
7432
|
-
function
|
|
7432
|
+
function ff(e, t, n) {
|
|
7433
7433
|
return n.options.emphasis || "*";
|
|
7434
7434
|
}
|
|
7435
|
-
function
|
|
7435
|
+
function hf(e, t) {
|
|
7436
7436
|
let n = !1;
|
|
7437
7437
|
return Rn(e, function(r) {
|
|
7438
7438
|
if ("value" in r && /\r?\n|\r/.test(r.value) || r.type === "break")
|
|
7439
7439
|
return n = !0, hr;
|
|
7440
7440
|
}), !!((!e.depth || e.depth < 3) && Dr(e) && (t.options.setext || n));
|
|
7441
7441
|
}
|
|
7442
|
-
function
|
|
7442
|
+
function mf(e, t, n, r) {
|
|
7443
7443
|
const i = Math.max(Math.min(6, e.depth || 1), 1), u = n.createTracker(r);
|
|
7444
|
-
if (
|
|
7445
|
-
const
|
|
7444
|
+
if (hf(e, n)) {
|
|
7445
|
+
const f = n.enter("headingSetext"), d = n.enter("phrasing"), m = n.containerPhrasing(e, {
|
|
7446
7446
|
...u.current(),
|
|
7447
7447
|
before: `
|
|
7448
7448
|
`,
|
|
7449
7449
|
after: `
|
|
7450
7450
|
`
|
|
7451
7451
|
});
|
|
7452
|
-
return
|
|
7452
|
+
return d(), f(), m + `
|
|
7453
7453
|
` + (i === 1 ? "=" : "-").repeat(
|
|
7454
7454
|
// The whole size…
|
|
7455
7455
|
m.length - // Minus the position of the character after the last EOL (or
|
|
@@ -7468,14 +7468,14 @@ function md(e, t, n, r) {
|
|
|
7468
7468
|
});
|
|
7469
7469
|
return /^[\t ]/.test(c) && (c = Kt(c.charCodeAt(0)) + c.slice(1)), c = c ? a + " " + c : a, n.options.closeAtx && (c += " " + a), l(), o(), c;
|
|
7470
7470
|
}
|
|
7471
|
-
ha.peek =
|
|
7471
|
+
ha.peek = pf;
|
|
7472
7472
|
function ha(e) {
|
|
7473
7473
|
return e.value || "";
|
|
7474
7474
|
}
|
|
7475
|
-
function
|
|
7475
|
+
function pf() {
|
|
7476
7476
|
return "<";
|
|
7477
7477
|
}
|
|
7478
|
-
ma.peek =
|
|
7478
|
+
ma.peek = Ef;
|
|
7479
7479
|
function ma(e, t, n, r) {
|
|
7480
7480
|
const i = vr(n), u = i === '"' ? "Quote" : "Apostrophe", a = n.enter("image");
|
|
7481
7481
|
let o = n.enter("label");
|
|
@@ -7501,10 +7501,10 @@ function ma(e, t, n, r) {
|
|
|
7501
7501
|
})
|
|
7502
7502
|
), c += l.move(i), o()), c += l.move(")"), a(), c;
|
|
7503
7503
|
}
|
|
7504
|
-
function
|
|
7504
|
+
function Ef() {
|
|
7505
7505
|
return "!";
|
|
7506
7506
|
}
|
|
7507
|
-
pa.peek =
|
|
7507
|
+
pa.peek = Tf;
|
|
7508
7508
|
function pa(e, t, n, r) {
|
|
7509
7509
|
const i = e.referenceType, u = n.enter("imageReference");
|
|
7510
7510
|
let a = n.enter("label");
|
|
@@ -7516,19 +7516,19 @@ function pa(e, t, n, r) {
|
|
|
7516
7516
|
...o.current()
|
|
7517
7517
|
});
|
|
7518
7518
|
l += o.move(c + "]["), a();
|
|
7519
|
-
const
|
|
7519
|
+
const f = n.stack;
|
|
7520
7520
|
n.stack = [], a = n.enter("reference");
|
|
7521
|
-
const
|
|
7521
|
+
const d = n.safe(n.associationId(e), {
|
|
7522
7522
|
before: l,
|
|
7523
7523
|
after: "]",
|
|
7524
7524
|
...o.current()
|
|
7525
7525
|
});
|
|
7526
|
-
return a(), n.stack =
|
|
7526
|
+
return a(), n.stack = f, u(), i === "full" || !c || c !== d ? l += o.move(d + "]") : i === "shortcut" ? l = l.slice(0, -1) : l += o.move("]"), l;
|
|
7527
7527
|
}
|
|
7528
|
-
function
|
|
7528
|
+
function Tf() {
|
|
7529
7529
|
return "!";
|
|
7530
7530
|
}
|
|
7531
|
-
Ea.peek =
|
|
7531
|
+
Ea.peek = bf;
|
|
7532
7532
|
function Ea(e, t, n) {
|
|
7533
7533
|
let r = e.value || "", i = "`", u = -1;
|
|
7534
7534
|
for (; new RegExp("(^|[^`])" + i + "([^`]|$)").test(r); )
|
|
@@ -7544,7 +7544,7 @@ function Ea(e, t, n) {
|
|
|
7544
7544
|
}
|
|
7545
7545
|
return i + r + i;
|
|
7546
7546
|
}
|
|
7547
|
-
function
|
|
7547
|
+
function bf() {
|
|
7548
7548
|
return "`";
|
|
7549
7549
|
}
|
|
7550
7550
|
function Ta(e, t) {
|
|
@@ -7558,21 +7558,21 @@ function Ta(e, t) {
|
|
|
7558
7558
|
// references don’t work), space, or angle brackets…
|
|
7559
7559
|
!/[\0- <>\u007F]/.test(e.url));
|
|
7560
7560
|
}
|
|
7561
|
-
ba.peek =
|
|
7561
|
+
ba.peek = gf;
|
|
7562
7562
|
function ba(e, t, n, r) {
|
|
7563
7563
|
const i = vr(n), u = i === '"' ? "Quote" : "Apostrophe", a = n.createTracker(r);
|
|
7564
7564
|
let o, l;
|
|
7565
7565
|
if (Ta(e, n)) {
|
|
7566
|
-
const
|
|
7566
|
+
const f = n.stack;
|
|
7567
7567
|
n.stack = [], o = n.enter("autolink");
|
|
7568
|
-
let
|
|
7569
|
-
return
|
|
7568
|
+
let d = a.move("<");
|
|
7569
|
+
return d += a.move(
|
|
7570
7570
|
n.containerPhrasing(e, {
|
|
7571
|
-
before:
|
|
7571
|
+
before: d,
|
|
7572
7572
|
after: ">",
|
|
7573
7573
|
...a.current()
|
|
7574
7574
|
})
|
|
7575
|
-
),
|
|
7575
|
+
), d += a.move(">"), o(), n.stack = f, d;
|
|
7576
7576
|
}
|
|
7577
7577
|
o = n.enter("link"), l = n.enter("label");
|
|
7578
7578
|
let c = a.move("[");
|
|
@@ -7600,10 +7600,10 @@ function ba(e, t, n, r) {
|
|
|
7600
7600
|
})
|
|
7601
7601
|
), c += a.move(i), l()), c += a.move(")"), o(), c;
|
|
7602
7602
|
}
|
|
7603
|
-
function
|
|
7603
|
+
function gf(e, t, n) {
|
|
7604
7604
|
return Ta(e, n) ? "<" : "[";
|
|
7605
7605
|
}
|
|
7606
|
-
ga.peek =
|
|
7606
|
+
ga.peek = _f;
|
|
7607
7607
|
function ga(e, t, n, r) {
|
|
7608
7608
|
const i = e.referenceType, u = n.enter("linkReference");
|
|
7609
7609
|
let a = n.enter("label");
|
|
@@ -7615,16 +7615,16 @@ function ga(e, t, n, r) {
|
|
|
7615
7615
|
...o.current()
|
|
7616
7616
|
});
|
|
7617
7617
|
l += o.move(c + "]["), a();
|
|
7618
|
-
const
|
|
7618
|
+
const f = n.stack;
|
|
7619
7619
|
n.stack = [], a = n.enter("reference");
|
|
7620
|
-
const
|
|
7620
|
+
const d = n.safe(n.associationId(e), {
|
|
7621
7621
|
before: l,
|
|
7622
7622
|
after: "]",
|
|
7623
7623
|
...o.current()
|
|
7624
7624
|
});
|
|
7625
|
-
return a(), n.stack =
|
|
7625
|
+
return a(), n.stack = f, u(), i === "full" || !c || c !== d ? l += o.move(d + "]") : i === "shortcut" ? l = l.slice(0, -1) : l += o.move("]"), l;
|
|
7626
7626
|
}
|
|
7627
|
-
function
|
|
7627
|
+
function _f() {
|
|
7628
7628
|
return "[";
|
|
7629
7629
|
}
|
|
7630
7630
|
function Ur(e) {
|
|
@@ -7635,7 +7635,7 @@ function Ur(e) {
|
|
|
7635
7635
|
);
|
|
7636
7636
|
return t;
|
|
7637
7637
|
}
|
|
7638
|
-
function
|
|
7638
|
+
function Af(e) {
|
|
7639
7639
|
const t = Ur(e), n = e.options.bulletOther;
|
|
7640
7640
|
if (!n)
|
|
7641
7641
|
return t === "*" ? "-" : "*";
|
|
@@ -7649,7 +7649,7 @@ function Ad(e) {
|
|
|
7649
7649
|
);
|
|
7650
7650
|
return n;
|
|
7651
7651
|
}
|
|
7652
|
-
function
|
|
7652
|
+
function kf(e) {
|
|
7653
7653
|
const t = e.options.bulletOrdered || ".";
|
|
7654
7654
|
if (t !== "." && t !== ")")
|
|
7655
7655
|
throw new Error(
|
|
@@ -7665,23 +7665,23 @@ function _a(e) {
|
|
|
7665
7665
|
);
|
|
7666
7666
|
return t;
|
|
7667
7667
|
}
|
|
7668
|
-
function
|
|
7668
|
+
function Cf(e, t, n, r) {
|
|
7669
7669
|
const i = n.enter("list"), u = n.bulletCurrent;
|
|
7670
|
-
let a = e.ordered ?
|
|
7671
|
-
const o = e.ordered ? a === "." ? ")" : "." :
|
|
7670
|
+
let a = e.ordered ? kf(n) : Ur(n);
|
|
7671
|
+
const o = e.ordered ? a === "." ? ")" : "." : Af(n);
|
|
7672
7672
|
let l = t && n.bulletLastUsed ? a === n.bulletLastUsed : !1;
|
|
7673
7673
|
if (!e.ordered) {
|
|
7674
|
-
const
|
|
7674
|
+
const f = e.children ? e.children[0] : void 0;
|
|
7675
7675
|
if (
|
|
7676
7676
|
// Bullet could be used as a thematic break marker:
|
|
7677
7677
|
(a === "*" || a === "-") && // Empty first list item:
|
|
7678
|
-
|
|
7678
|
+
f && (!f.children || !f.children[0]) && // Directly in two other list items:
|
|
7679
7679
|
n.stack[n.stack.length - 1] === "list" && n.stack[n.stack.length - 2] === "listItem" && n.stack[n.stack.length - 3] === "list" && n.stack[n.stack.length - 4] === "listItem" && // That are each the first child.
|
|
7680
|
-
n.indexStack[n.indexStack.length - 1] === 0 && n.indexStack[n.indexStack.length - 2] === 0 && n.indexStack[n.indexStack.length - 3] === 0 && (l = !0), _a(n) === a &&
|
|
7680
|
+
n.indexStack[n.indexStack.length - 1] === 0 && n.indexStack[n.indexStack.length - 2] === 0 && n.indexStack[n.indexStack.length - 3] === 0 && (l = !0), _a(n) === a && f
|
|
7681
7681
|
) {
|
|
7682
|
-
let
|
|
7683
|
-
for (; ++
|
|
7684
|
-
const m = e.children[
|
|
7682
|
+
let d = -1;
|
|
7683
|
+
for (; ++d < e.children.length; ) {
|
|
7684
|
+
const m = e.children[d];
|
|
7685
7685
|
if (m && m.type === "listItem" && m.children && m.children[0] && m.children[0].type === "thematicBreak") {
|
|
7686
7686
|
l = !0;
|
|
7687
7687
|
break;
|
|
@@ -7693,7 +7693,7 @@ function Cd(e, t, n, r) {
|
|
|
7693
7693
|
const c = n.containerFlow(e, r);
|
|
7694
7694
|
return n.bulletLastUsed = a, n.bulletCurrent = u, i(), c;
|
|
7695
7695
|
}
|
|
7696
|
-
function
|
|
7696
|
+
function If(e) {
|
|
7697
7697
|
const t = e.options.listItemIndent || "one";
|
|
7698
7698
|
if (t !== "tab" && t !== "one" && t !== "mixed")
|
|
7699
7699
|
throw new Error(
|
|
@@ -7701,8 +7701,8 @@ function Id(e) {
|
|
|
7701
7701
|
);
|
|
7702
7702
|
return t;
|
|
7703
7703
|
}
|
|
7704
|
-
function
|
|
7705
|
-
const i =
|
|
7704
|
+
function yf(e, t, n, r) {
|
|
7705
|
+
const i = If(n);
|
|
7706
7706
|
let u = n.bulletCurrent || Ur(n);
|
|
7707
7707
|
t && t.type === "list" && t.ordered && (u = (typeof t.start == "number" && t.start > -1 ? t.start : 1) + (n.options.incrementListMarker === !1 ? 0 : t.children.indexOf(e)) + u);
|
|
7708
7708
|
let a = u.length + 1;
|
|
@@ -7711,18 +7711,18 @@ function yd(e, t, n, r) {
|
|
|
7711
7711
|
o.move(u + " ".repeat(a - u.length)), o.shift(a);
|
|
7712
7712
|
const l = n.enter("listItem"), c = n.indentLines(
|
|
7713
7713
|
n.containerFlow(e, o.current()),
|
|
7714
|
-
|
|
7714
|
+
f
|
|
7715
7715
|
);
|
|
7716
7716
|
return l(), c;
|
|
7717
|
-
function d
|
|
7718
|
-
return m ? (h ? "" : " ".repeat(a)) +
|
|
7717
|
+
function f(d, m, h) {
|
|
7718
|
+
return m ? (h ? "" : " ".repeat(a)) + d : (h ? u : u + " ".repeat(a - u.length)) + d;
|
|
7719
7719
|
}
|
|
7720
7720
|
}
|
|
7721
|
-
function
|
|
7721
|
+
function Nf(e, t, n, r) {
|
|
7722
7722
|
const i = n.enter("paragraph"), u = n.enter("phrasing"), a = n.containerPhrasing(e, r);
|
|
7723
7723
|
return u(), i(), a;
|
|
7724
7724
|
}
|
|
7725
|
-
const
|
|
7725
|
+
const xf = (
|
|
7726
7726
|
/** @type {(node?: unknown) => node is Exclude<PhrasingContent, Html>} */
|
|
7727
7727
|
On([
|
|
7728
7728
|
"break",
|
|
@@ -7748,12 +7748,12 @@ const xd = (
|
|
|
7748
7748
|
"textDirective"
|
|
7749
7749
|
])
|
|
7750
7750
|
);
|
|
7751
|
-
function
|
|
7751
|
+
function Sf(e, t, n, r) {
|
|
7752
7752
|
return (e.children.some(function(a) {
|
|
7753
|
-
return
|
|
7753
|
+
return xf(a);
|
|
7754
7754
|
}) ? n.containerPhrasing : n.containerFlow).call(n, e, r);
|
|
7755
7755
|
}
|
|
7756
|
-
function
|
|
7756
|
+
function Lf(e) {
|
|
7757
7757
|
const t = e.options.strong || "*";
|
|
7758
7758
|
if (t !== "*" && t !== "_")
|
|
7759
7759
|
throw new Error(
|
|
@@ -7761,9 +7761,9 @@ function Ld(e) {
|
|
|
7761
7761
|
);
|
|
7762
7762
|
return t;
|
|
7763
7763
|
}
|
|
7764
|
-
Aa.peek =
|
|
7764
|
+
Aa.peek = Of;
|
|
7765
7765
|
function Aa(e, t, n, r) {
|
|
7766
|
-
const i =
|
|
7766
|
+
const i = Lf(n), u = n.enter("strong"), a = n.createTracker(r), o = a.move(i + i);
|
|
7767
7767
|
let l = a.move(
|
|
7768
7768
|
n.containerPhrasing(e, {
|
|
7769
7769
|
after: i,
|
|
@@ -7771,27 +7771,27 @@ function Aa(e, t, n, r) {
|
|
|
7771
7771
|
...a.current()
|
|
7772
7772
|
})
|
|
7773
7773
|
);
|
|
7774
|
-
const c = l.charCodeAt(0),
|
|
7774
|
+
const c = l.charCodeAt(0), f = An(
|
|
7775
7775
|
r.before.charCodeAt(r.before.length - 1),
|
|
7776
7776
|
c,
|
|
7777
7777
|
i
|
|
7778
7778
|
);
|
|
7779
|
-
|
|
7780
|
-
const
|
|
7781
|
-
m.inside && (l = l.slice(0, -1) + Kt(
|
|
7779
|
+
f.inside && (l = Kt(c) + l.slice(1));
|
|
7780
|
+
const d = l.charCodeAt(l.length - 1), m = An(r.after.charCodeAt(0), d, i);
|
|
7781
|
+
m.inside && (l = l.slice(0, -1) + Kt(d));
|
|
7782
7782
|
const h = a.move(i + i);
|
|
7783
7783
|
return u(), n.attentionEncodeSurroundingInfo = {
|
|
7784
7784
|
after: m.outside,
|
|
7785
|
-
before:
|
|
7785
|
+
before: f.outside
|
|
7786
7786
|
}, o + l + h;
|
|
7787
7787
|
}
|
|
7788
|
-
function
|
|
7788
|
+
function Of(e, t, n) {
|
|
7789
7789
|
return n.options.strong || "*";
|
|
7790
7790
|
}
|
|
7791
|
-
function
|
|
7791
|
+
function Df(e, t, n, r) {
|
|
7792
7792
|
return n.safe(e.value, r);
|
|
7793
7793
|
}
|
|
7794
|
-
function
|
|
7794
|
+
function Rf(e) {
|
|
7795
7795
|
const t = e.options.ruleRepetition || 3;
|
|
7796
7796
|
if (t < 3)
|
|
7797
7797
|
throw new Error(
|
|
@@ -7799,50 +7799,50 @@ function Rd(e) {
|
|
|
7799
7799
|
);
|
|
7800
7800
|
return t;
|
|
7801
7801
|
}
|
|
7802
|
-
function
|
|
7803
|
-
const r = (_a(n) + (n.options.ruleSpaces ? " " : "")).repeat(
|
|
7802
|
+
function wf(e, t, n) {
|
|
7803
|
+
const r = (_a(n) + (n.options.ruleSpaces ? " " : "")).repeat(Rf(n));
|
|
7804
7804
|
return n.options.ruleSpaces ? r.slice(0, -1) : r;
|
|
7805
7805
|
}
|
|
7806
7806
|
const ka = {
|
|
7807
|
-
blockquote:
|
|
7807
|
+
blockquote: tf,
|
|
7808
7808
|
break: qi,
|
|
7809
|
-
code:
|
|
7810
|
-
definition:
|
|
7811
|
-
emphasis:
|
|
7809
|
+
code: of,
|
|
7810
|
+
definition: cf,
|
|
7811
|
+
emphasis: fa,
|
|
7812
7812
|
hardBreak: qi,
|
|
7813
|
-
heading:
|
|
7813
|
+
heading: mf,
|
|
7814
7814
|
html: ha,
|
|
7815
7815
|
image: ma,
|
|
7816
7816
|
imageReference: pa,
|
|
7817
7817
|
inlineCode: Ea,
|
|
7818
7818
|
link: ba,
|
|
7819
7819
|
linkReference: ga,
|
|
7820
|
-
list:
|
|
7821
|
-
listItem:
|
|
7822
|
-
paragraph:
|
|
7823
|
-
root:
|
|
7820
|
+
list: Cf,
|
|
7821
|
+
listItem: yf,
|
|
7822
|
+
paragraph: Nf,
|
|
7823
|
+
root: Sf,
|
|
7824
7824
|
strong: Aa,
|
|
7825
|
-
text:
|
|
7826
|
-
thematicBreak:
|
|
7825
|
+
text: Df,
|
|
7826
|
+
thematicBreak: wf
|
|
7827
7827
|
};
|
|
7828
|
-
function
|
|
7828
|
+
function Pf() {
|
|
7829
7829
|
return {
|
|
7830
7830
|
enter: {
|
|
7831
|
-
table:
|
|
7831
|
+
table: Mf,
|
|
7832
7832
|
tableData: Vi,
|
|
7833
7833
|
tableHeader: Vi,
|
|
7834
|
-
tableRow:
|
|
7834
|
+
tableRow: Bf
|
|
7835
7835
|
},
|
|
7836
7836
|
exit: {
|
|
7837
|
-
codeText:
|
|
7838
|
-
table:
|
|
7837
|
+
codeText: Hf,
|
|
7838
|
+
table: Ff,
|
|
7839
7839
|
tableData: Zn,
|
|
7840
7840
|
tableHeader: Zn,
|
|
7841
7841
|
tableRow: Zn
|
|
7842
7842
|
}
|
|
7843
7843
|
};
|
|
7844
7844
|
}
|
|
7845
|
-
function
|
|
7845
|
+
function Mf(e) {
|
|
7846
7846
|
const t = e._align;
|
|
7847
7847
|
this.enter(
|
|
7848
7848
|
{
|
|
@@ -7855,10 +7855,10 @@ function Md(e) {
|
|
|
7855
7855
|
e
|
|
7856
7856
|
), this.data.inTable = !0;
|
|
7857
7857
|
}
|
|
7858
|
-
function
|
|
7858
|
+
function Ff(e) {
|
|
7859
7859
|
this.exit(e), this.data.inTable = void 0;
|
|
7860
7860
|
}
|
|
7861
|
-
function
|
|
7861
|
+
function Bf(e) {
|
|
7862
7862
|
this.enter({ type: "tableRow", children: [] }, e);
|
|
7863
7863
|
}
|
|
7864
7864
|
function Zn(e) {
|
|
@@ -7867,16 +7867,16 @@ function Zn(e) {
|
|
|
7867
7867
|
function Vi(e) {
|
|
7868
7868
|
this.enter({ type: "tableCell", children: [] }, e);
|
|
7869
7869
|
}
|
|
7870
|
-
function
|
|
7870
|
+
function Hf(e) {
|
|
7871
7871
|
let t = this.resume();
|
|
7872
|
-
this.data.inTable && (t = t.replace(/\\([\\|])/g,
|
|
7872
|
+
this.data.inTable && (t = t.replace(/\\([\\|])/g, vf));
|
|
7873
7873
|
const n = this.stack[this.stack.length - 1];
|
|
7874
7874
|
n.type, n.value = t, this.exit(e);
|
|
7875
7875
|
}
|
|
7876
|
-
function
|
|
7876
|
+
function vf(e, t) {
|
|
7877
7877
|
return t === "|" ? t : e;
|
|
7878
7878
|
}
|
|
7879
|
-
function
|
|
7879
|
+
function Uf(e) {
|
|
7880
7880
|
const t = e || {}, n = t.tableCellPadding, r = t.tablePipeAlign, i = t.stringLength, u = n ? " " : "|";
|
|
7881
7881
|
return {
|
|
7882
7882
|
unsafe: [
|
|
@@ -7906,10 +7906,10 @@ function Ud(e) {
|
|
|
7906
7906
|
}
|
|
7907
7907
|
};
|
|
7908
7908
|
function a(h, T, I, N) {
|
|
7909
|
-
return c(
|
|
7909
|
+
return c(f(h, I, N), h.align);
|
|
7910
7910
|
}
|
|
7911
7911
|
function o(h, T, I, N) {
|
|
7912
|
-
const k =
|
|
7912
|
+
const k = d(h, I, N), L = c([k]);
|
|
7913
7913
|
return L.slice(0, L.indexOf(`
|
|
7914
7914
|
`));
|
|
7915
7915
|
}
|
|
@@ -7922,7 +7922,7 @@ function Ud(e) {
|
|
|
7922
7922
|
return L(), k(), S;
|
|
7923
7923
|
}
|
|
7924
7924
|
function c(h, T) {
|
|
7925
|
-
return
|
|
7925
|
+
return Zd(h, {
|
|
7926
7926
|
align: T,
|
|
7927
7927
|
// @ts-expect-error: `markdown-table` types should support `null`.
|
|
7928
7928
|
alignDelimiters: r,
|
|
@@ -7932,15 +7932,15 @@ function Ud(e) {
|
|
|
7932
7932
|
stringLength: i
|
|
7933
7933
|
});
|
|
7934
7934
|
}
|
|
7935
|
-
function
|
|
7935
|
+
function f(h, T, I) {
|
|
7936
7936
|
const N = h.children;
|
|
7937
7937
|
let k = -1;
|
|
7938
7938
|
const L = [], S = T.enter("table");
|
|
7939
7939
|
for (; ++k < N.length; )
|
|
7940
|
-
L[k] =
|
|
7940
|
+
L[k] = d(N[k], T, I);
|
|
7941
7941
|
return S(), L;
|
|
7942
7942
|
}
|
|
7943
|
-
function
|
|
7943
|
+
function d(h, T, I) {
|
|
7944
7944
|
const N = h.children;
|
|
7945
7945
|
let k = -1;
|
|
7946
7946
|
const L = [], S = T.enter("tableRow");
|
|
@@ -7953,26 +7953,26 @@ function Ud(e) {
|
|
|
7953
7953
|
return I.stack.includes("tableCell") && (N = N.replace(/\|/g, "\\$&")), N;
|
|
7954
7954
|
}
|
|
7955
7955
|
}
|
|
7956
|
-
function
|
|
7956
|
+
function zf() {
|
|
7957
7957
|
return {
|
|
7958
7958
|
exit: {
|
|
7959
7959
|
taskListCheckValueChecked: Wi,
|
|
7960
7960
|
taskListCheckValueUnchecked: Wi,
|
|
7961
|
-
paragraph:
|
|
7961
|
+
paragraph: qf
|
|
7962
7962
|
}
|
|
7963
7963
|
};
|
|
7964
7964
|
}
|
|
7965
|
-
function
|
|
7965
|
+
function Yf() {
|
|
7966
7966
|
return {
|
|
7967
7967
|
unsafe: [{ atBreak: !0, character: "-", after: "[:|-]" }],
|
|
7968
|
-
handlers: { listItem:
|
|
7968
|
+
handlers: { listItem: Vf }
|
|
7969
7969
|
};
|
|
7970
7970
|
}
|
|
7971
7971
|
function Wi(e) {
|
|
7972
7972
|
const t = this.stack[this.stack.length - 2];
|
|
7973
7973
|
t.type, t.checked = e.type === "taskListCheckValueChecked";
|
|
7974
7974
|
}
|
|
7975
|
-
function
|
|
7975
|
+
function qf(e) {
|
|
7976
7976
|
const t = this.stack[this.stack.length - 2];
|
|
7977
7977
|
if (t && t.type === "listItem" && typeof t.checked == "boolean") {
|
|
7978
7978
|
const n = this.stack[this.stack.length - 1];
|
|
@@ -7993,7 +7993,7 @@ function qd(e) {
|
|
|
7993
7993
|
}
|
|
7994
7994
|
this.exit(e);
|
|
7995
7995
|
}
|
|
7996
|
-
function
|
|
7996
|
+
function Vf(e, t, n, r) {
|
|
7997
7997
|
const i = e.children[0], u = typeof e.checked == "boolean" && i && i.type === "paragraph", a = "[" + (e.checked ? "x" : " ") + "] ", o = n.createTracker(r);
|
|
7998
7998
|
u && o.move(a);
|
|
7999
7999
|
let l = ka.listItem(e, t, n, {
|
|
@@ -8001,32 +8001,32 @@ function Vd(e, t, n, r) {
|
|
|
8001
8001
|
...o.current()
|
|
8002
8002
|
});
|
|
8003
8003
|
return u && (l = l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/, c)), l;
|
|
8004
|
-
function c(
|
|
8005
|
-
return
|
|
8004
|
+
function c(f) {
|
|
8005
|
+
return f + a;
|
|
8006
8006
|
}
|
|
8007
8007
|
}
|
|
8008
|
-
function
|
|
8008
|
+
function Wf() {
|
|
8009
8009
|
return [
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
|
|
8013
|
-
|
|
8014
|
-
|
|
8010
|
+
kd(),
|
|
8011
|
+
qd(),
|
|
8012
|
+
Gd(),
|
|
8013
|
+
Pf(),
|
|
8014
|
+
zf()
|
|
8015
8015
|
];
|
|
8016
8016
|
}
|
|
8017
|
-
function
|
|
8017
|
+
function jf(e) {
|
|
8018
8018
|
return {
|
|
8019
8019
|
extensions: [
|
|
8020
|
-
|
|
8021
|
-
|
|
8022
|
-
|
|
8023
|
-
|
|
8024
|
-
|
|
8020
|
+
Cd(),
|
|
8021
|
+
Vd(e),
|
|
8022
|
+
Qd(),
|
|
8023
|
+
Uf(e),
|
|
8024
|
+
Yf()
|
|
8025
8025
|
]
|
|
8026
8026
|
};
|
|
8027
8027
|
}
|
|
8028
|
-
const
|
|
8029
|
-
tokenize:
|
|
8028
|
+
const Gf = {
|
|
8029
|
+
tokenize: Zf,
|
|
8030
8030
|
partial: !0
|
|
8031
8031
|
}, Ca = {
|
|
8032
8032
|
tokenize: eh,
|
|
@@ -8037,23 +8037,23 @@ const Gd = {
|
|
|
8037
8037
|
}, ya = {
|
|
8038
8038
|
tokenize: nh,
|
|
8039
8039
|
partial: !0
|
|
8040
|
-
},
|
|
8040
|
+
}, Qf = {
|
|
8041
8041
|
tokenize: rh,
|
|
8042
8042
|
partial: !0
|
|
8043
8043
|
}, Na = {
|
|
8044
8044
|
name: "wwwAutolink",
|
|
8045
|
-
tokenize:
|
|
8045
|
+
tokenize: Xf,
|
|
8046
8046
|
previous: Sa
|
|
8047
8047
|
}, xa = {
|
|
8048
8048
|
name: "protocolAutolink",
|
|
8049
|
-
tokenize:
|
|
8049
|
+
tokenize: Jf,
|
|
8050
8050
|
previous: La
|
|
8051
8051
|
}, We = {
|
|
8052
8052
|
name: "emailAutolink",
|
|
8053
|
-
tokenize:
|
|
8053
|
+
tokenize: Kf,
|
|
8054
8054
|
previous: Oa
|
|
8055
8055
|
}, ze = {};
|
|
8056
|
-
function $
|
|
8056
|
+
function $f() {
|
|
8057
8057
|
return {
|
|
8058
8058
|
text: ze
|
|
8059
8059
|
};
|
|
@@ -8069,64 +8069,64 @@ ze[72] = [We, xa];
|
|
|
8069
8069
|
ze[104] = [We, xa];
|
|
8070
8070
|
ze[87] = [We, Na];
|
|
8071
8071
|
ze[119] = [We, Na];
|
|
8072
|
-
function
|
|
8072
|
+
function Kf(e, t, n) {
|
|
8073
8073
|
const r = this;
|
|
8074
8074
|
let i, u;
|
|
8075
8075
|
return a;
|
|
8076
|
-
function a(
|
|
8077
|
-
return !Tr(
|
|
8076
|
+
function a(d) {
|
|
8077
|
+
return !Tr(d) || !Oa.call(r, r.previous) || zr(r.events) ? n(d) : (e.enter("literalAutolink"), e.enter("literalAutolinkEmail"), o(d));
|
|
8078
8078
|
}
|
|
8079
|
-
function o(
|
|
8080
|
-
return Tr(
|
|
8079
|
+
function o(d) {
|
|
8080
|
+
return Tr(d) ? (e.consume(d), o) : d === 64 ? (e.consume(d), l) : n(d);
|
|
8081
8081
|
}
|
|
8082
|
-
function l(
|
|
8083
|
-
return
|
|
8082
|
+
function l(d) {
|
|
8083
|
+
return d === 46 ? e.check(Qf, f, c)(d) : d === 45 || d === 95 || ge(d) ? (u = !0, e.consume(d), l) : f(d);
|
|
8084
8084
|
}
|
|
8085
|
-
function c(
|
|
8086
|
-
return e.consume(
|
|
8085
|
+
function c(d) {
|
|
8086
|
+
return e.consume(d), i = !0, l;
|
|
8087
8087
|
}
|
|
8088
|
-
function d
|
|
8089
|
-
return u && i && ke(r.previous) ? (e.exit("literalAutolinkEmail"), e.exit("literalAutolink"), t(
|
|
8088
|
+
function f(d) {
|
|
8089
|
+
return u && i && ke(r.previous) ? (e.exit("literalAutolinkEmail"), e.exit("literalAutolink"), t(d)) : n(d);
|
|
8090
8090
|
}
|
|
8091
8091
|
}
|
|
8092
|
-
function
|
|
8092
|
+
function Xf(e, t, n) {
|
|
8093
8093
|
const r = this;
|
|
8094
8094
|
return i;
|
|
8095
8095
|
function i(a) {
|
|
8096
|
-
return a !== 87 && a !== 119 || !Sa.call(r, r.previous) || zr(r.events) ? n(a) : (e.enter("literalAutolink"), e.enter("literalAutolinkWww"), e.check(
|
|
8096
|
+
return a !== 87 && a !== 119 || !Sa.call(r, r.previous) || zr(r.events) ? n(a) : (e.enter("literalAutolink"), e.enter("literalAutolinkWww"), e.check(Gf, e.attempt(Ca, e.attempt(Ia, u), n), n)(a));
|
|
8097
8097
|
}
|
|
8098
8098
|
function u(a) {
|
|
8099
8099
|
return e.exit("literalAutolinkWww"), e.exit("literalAutolink"), t(a);
|
|
8100
8100
|
}
|
|
8101
8101
|
}
|
|
8102
|
-
function
|
|
8102
|
+
function Jf(e, t, n) {
|
|
8103
8103
|
const r = this;
|
|
8104
8104
|
let i = "", u = !1;
|
|
8105
8105
|
return a;
|
|
8106
|
-
function a(
|
|
8107
|
-
return (
|
|
8106
|
+
function a(d) {
|
|
8107
|
+
return (d === 72 || d === 104) && La.call(r, r.previous) && !zr(r.events) ? (e.enter("literalAutolink"), e.enter("literalAutolinkHttp"), i += String.fromCodePoint(d), e.consume(d), o) : n(d);
|
|
8108
8108
|
}
|
|
8109
|
-
function o(
|
|
8110
|
-
if (ke(
|
|
8111
|
-
return i += String.fromCodePoint(
|
|
8112
|
-
if (
|
|
8109
|
+
function o(d) {
|
|
8110
|
+
if (ke(d) && i.length < 5)
|
|
8111
|
+
return i += String.fromCodePoint(d), e.consume(d), o;
|
|
8112
|
+
if (d === 58) {
|
|
8113
8113
|
const m = i.toLowerCase();
|
|
8114
8114
|
if (m === "http" || m === "https")
|
|
8115
|
-
return e.consume(
|
|
8115
|
+
return e.consume(d), l;
|
|
8116
8116
|
}
|
|
8117
|
-
return n(
|
|
8117
|
+
return n(d);
|
|
8118
8118
|
}
|
|
8119
|
-
function l(
|
|
8120
|
-
return
|
|
8119
|
+
function l(d) {
|
|
8120
|
+
return d === 47 ? (e.consume(d), u ? c : (u = !0, l)) : n(d);
|
|
8121
8121
|
}
|
|
8122
|
-
function c(
|
|
8123
|
-
return
|
|
8122
|
+
function c(d) {
|
|
8123
|
+
return d === null || gn(d) || ae(d) || lt(d) || xn(d) ? n(d) : e.attempt(Ca, e.attempt(Ia, f), n)(d);
|
|
8124
8124
|
}
|
|
8125
|
-
function d
|
|
8126
|
-
return e.exit("literalAutolinkHttp"), e.exit("literalAutolink"), t(
|
|
8125
|
+
function f(d) {
|
|
8126
|
+
return e.exit("literalAutolinkHttp"), e.exit("literalAutolink"), t(d);
|
|
8127
8127
|
}
|
|
8128
8128
|
}
|
|
8129
|
-
function
|
|
8129
|
+
function Zf(e, t, n) {
|
|
8130
8130
|
let r = 0;
|
|
8131
8131
|
return i;
|
|
8132
8132
|
function i(a) {
|
|
@@ -8215,7 +8215,7 @@ function zr(e) {
|
|
|
8215
8215
|
return e.length > 0 && !n && (e[e.length - 1][1]._gfmAutolinkLiteralWalkedInto = !0), n;
|
|
8216
8216
|
}
|
|
8217
8217
|
const ih = {
|
|
8218
|
-
tokenize:
|
|
8218
|
+
tokenize: fh,
|
|
8219
8219
|
partial: !0
|
|
8220
8220
|
};
|
|
8221
8221
|
function uh() {
|
|
@@ -8227,7 +8227,7 @@ function uh() {
|
|
|
8227
8227
|
continuation: {
|
|
8228
8228
|
tokenize: ch
|
|
8229
8229
|
},
|
|
8230
|
-
exit:
|
|
8230
|
+
exit: dh
|
|
8231
8231
|
}
|
|
8232
8232
|
},
|
|
8233
8233
|
text: {
|
|
@@ -8323,30 +8323,30 @@ function oh(e, t, n) {
|
|
|
8323
8323
|
const r = this, i = r.parser.gfmFootnotes || (r.parser.gfmFootnotes = []);
|
|
8324
8324
|
let u = 0, a;
|
|
8325
8325
|
return o;
|
|
8326
|
-
function o(
|
|
8327
|
-
return e.enter("gfmFootnoteCall"), e.enter("gfmFootnoteCallLabelMarker"), e.consume(
|
|
8326
|
+
function o(d) {
|
|
8327
|
+
return e.enter("gfmFootnoteCall"), e.enter("gfmFootnoteCallLabelMarker"), e.consume(d), e.exit("gfmFootnoteCallLabelMarker"), l;
|
|
8328
8328
|
}
|
|
8329
|
-
function l(
|
|
8330
|
-
return
|
|
8329
|
+
function l(d) {
|
|
8330
|
+
return d !== 94 ? n(d) : (e.enter("gfmFootnoteCallMarker"), e.consume(d), e.exit("gfmFootnoteCallMarker"), e.enter("gfmFootnoteCallString"), e.enter("chunkString").contentType = "string", c);
|
|
8331
8331
|
}
|
|
8332
|
-
function c(
|
|
8332
|
+
function c(d) {
|
|
8333
8333
|
if (
|
|
8334
8334
|
// Too long.
|
|
8335
8335
|
u > 999 || // Closing brace with nothing.
|
|
8336
|
-
|
|
8336
|
+
d === 93 && !a || // Space or tab is not supported by GFM for some reason.
|
|
8337
8337
|
// `\n` and `[` not being supported makes sense.
|
|
8338
|
-
|
|
8338
|
+
d === null || d === 91 || ae(d)
|
|
8339
8339
|
)
|
|
8340
|
-
return n(
|
|
8341
|
-
if (
|
|
8340
|
+
return n(d);
|
|
8341
|
+
if (d === 93) {
|
|
8342
8342
|
e.exit("chunkString");
|
|
8343
8343
|
const m = e.exit("gfmFootnoteCallString");
|
|
8344
|
-
return i.includes(Pe(r.sliceSerialize(m))) ? (e.enter("gfmFootnoteCallLabelMarker"), e.consume(
|
|
8344
|
+
return i.includes(Pe(r.sliceSerialize(m))) ? (e.enter("gfmFootnoteCallLabelMarker"), e.consume(d), e.exit("gfmFootnoteCallLabelMarker"), e.exit("gfmFootnoteCall"), t) : n(d);
|
|
8345
8345
|
}
|
|
8346
|
-
return ae(
|
|
8346
|
+
return ae(d) || (a = !0), u++, e.consume(d), d === 92 ? f : c;
|
|
8347
8347
|
}
|
|
8348
|
-
function d
|
|
8349
|
-
return
|
|
8348
|
+
function f(d) {
|
|
8349
|
+
return d === 91 || d === 92 || d === 93 ? (e.consume(d), u++, c) : c(d);
|
|
8350
8350
|
}
|
|
8351
8351
|
}
|
|
8352
8352
|
function lh(e, t, n) {
|
|
@@ -8357,9 +8357,9 @@ function lh(e, t, n) {
|
|
|
8357
8357
|
return e.enter("gfmFootnoteDefinition")._container = !0, e.enter("gfmFootnoteDefinitionLabel"), e.enter("gfmFootnoteDefinitionLabelMarker"), e.consume(T), e.exit("gfmFootnoteDefinitionLabelMarker"), c;
|
|
8358
8358
|
}
|
|
8359
8359
|
function c(T) {
|
|
8360
|
-
return T === 94 ? (e.enter("gfmFootnoteDefinitionMarker"), e.consume(T), e.exit("gfmFootnoteDefinitionMarker"), e.enter("gfmFootnoteDefinitionLabelString"), e.enter("chunkString").contentType = "string",
|
|
8360
|
+
return T === 94 ? (e.enter("gfmFootnoteDefinitionMarker"), e.consume(T), e.exit("gfmFootnoteDefinitionMarker"), e.enter("gfmFootnoteDefinitionLabelString"), e.enter("chunkString").contentType = "string", f) : n(T);
|
|
8361
8361
|
}
|
|
8362
|
-
function
|
|
8362
|
+
function f(T) {
|
|
8363
8363
|
if (
|
|
8364
8364
|
// Too long.
|
|
8365
8365
|
a > 999 || // Closing brace with nothing.
|
|
@@ -8373,10 +8373,10 @@ function lh(e, t, n) {
|
|
|
8373
8373
|
const I = e.exit("gfmFootnoteDefinitionLabelString");
|
|
8374
8374
|
return u = Pe(r.sliceSerialize(I)), e.enter("gfmFootnoteDefinitionLabelMarker"), e.consume(T), e.exit("gfmFootnoteDefinitionLabelMarker"), e.exit("gfmFootnoteDefinitionLabel"), m;
|
|
8375
8375
|
}
|
|
8376
|
-
return ae(T) || (o = !0), a++, e.consume(T), T === 92 ?
|
|
8376
|
+
return ae(T) || (o = !0), a++, e.consume(T), T === 92 ? d : f;
|
|
8377
8377
|
}
|
|
8378
|
-
function
|
|
8379
|
-
return T === 91 || T === 92 || T === 93 ? (e.consume(T), a++,
|
|
8378
|
+
function d(T) {
|
|
8379
|
+
return T === 91 || T === 92 || T === 93 ? (e.consume(T), a++, f) : f(T);
|
|
8380
8380
|
}
|
|
8381
8381
|
function m(T) {
|
|
8382
8382
|
return T === 58 ? (e.enter("definitionMarker"), e.consume(T), e.exit("definitionMarker"), i.includes(u) || i.push(u), ne(e, h, "gfmFootnoteDefinitionWhitespace")) : n(T);
|
|
@@ -8388,10 +8388,10 @@ function lh(e, t, n) {
|
|
|
8388
8388
|
function ch(e, t, n) {
|
|
8389
8389
|
return e.check(en, t, e.attempt(ih, t, n));
|
|
8390
8390
|
}
|
|
8391
|
-
function
|
|
8391
|
+
function dh(e) {
|
|
8392
8392
|
e.exit("gfmFootnoteDefinition");
|
|
8393
8393
|
}
|
|
8394
|
-
function
|
|
8394
|
+
function fh(e, t, n) {
|
|
8395
8395
|
const r = this;
|
|
8396
8396
|
return ne(e, i, "gfmFootnoteDefinitionIndent", 5);
|
|
8397
8397
|
function i(u) {
|
|
@@ -8426,16 +8426,16 @@ function hh(e) {
|
|
|
8426
8426
|
if (a[c][0] === "exit" && a[c][1].type === "strikethroughSequenceTemporary" && a[c][1]._open && // If the sizes are the same:
|
|
8427
8427
|
a[l][1].end.offset - a[l][1].start.offset === a[c][1].end.offset - a[c][1].start.offset) {
|
|
8428
8428
|
a[l][1].type = "strikethroughSequence", a[c][1].type = "strikethroughSequence";
|
|
8429
|
-
const
|
|
8429
|
+
const f = {
|
|
8430
8430
|
type: "strikethrough",
|
|
8431
8431
|
start: Object.assign({}, a[c][1].start),
|
|
8432
8432
|
end: Object.assign({}, a[l][1].end)
|
|
8433
|
-
},
|
|
8433
|
+
}, d = {
|
|
8434
8434
|
type: "strikethroughText",
|
|
8435
8435
|
start: Object.assign({}, a[c][1].end),
|
|
8436
8436
|
end: Object.assign({}, a[l][1].start)
|
|
8437
|
-
}, m = [["enter",
|
|
8438
|
-
h && Le(m, m.length, 0, Sn(h, a.slice(c + 1, l), o)), Le(m, m.length, 0, [["exit",
|
|
8437
|
+
}, m = [["enter", f, o], ["enter", a[c][1], o], ["exit", a[c][1], o], ["enter", d, o]], h = o.parser.constructs.insideSpan.null;
|
|
8438
|
+
h && Le(m, m.length, 0, Sn(h, a.slice(c + 1, l), o)), Le(m, m.length, 0, [["exit", d, o], ["enter", a[l][1], o], ["exit", a[l][1], o], ["exit", f, o]]), Le(a, c - 1, l - c + 3, m), l = c + m.length - 2;
|
|
8439
8439
|
break;
|
|
8440
8440
|
}
|
|
8441
8441
|
}
|
|
@@ -8444,17 +8444,17 @@ function hh(e) {
|
|
|
8444
8444
|
return a;
|
|
8445
8445
|
}
|
|
8446
8446
|
function u(a, o, l) {
|
|
8447
|
-
const c = this.previous,
|
|
8448
|
-
let
|
|
8447
|
+
const c = this.previous, f = this.events;
|
|
8448
|
+
let d = 0;
|
|
8449
8449
|
return m;
|
|
8450
8450
|
function m(T) {
|
|
8451
|
-
return c === 126 &&
|
|
8451
|
+
return c === 126 && f[f.length - 1][1].type !== "characterEscape" ? l(T) : (a.enter("strikethroughSequenceTemporary"), h(T));
|
|
8452
8452
|
}
|
|
8453
8453
|
function h(T) {
|
|
8454
8454
|
const I = kt(c);
|
|
8455
8455
|
if (T === 126)
|
|
8456
|
-
return
|
|
8457
|
-
if (
|
|
8456
|
+
return d > 1 ? l(T) : (a.consume(T), d++, h);
|
|
8457
|
+
if (d < 2 && !n) return l(T);
|
|
8458
8458
|
const N = a.exit("strikethroughSequenceTemporary"), k = kt(T);
|
|
8459
8459
|
return N._open = !k || k === 2 && !!I, N._close = !I || I === 2 && !!k, o(T);
|
|
8460
8460
|
}
|
|
@@ -8578,16 +8578,16 @@ function bh(e, t, n) {
|
|
|
8578
8578
|
return e.enter("tableHead"), e.enter("tableRow"), c(A);
|
|
8579
8579
|
}
|
|
8580
8580
|
function c(A) {
|
|
8581
|
-
return A === 124 || (a = !0, u += 1),
|
|
8582
|
-
}
|
|
8583
|
-
function d(A) {
|
|
8584
|
-
return A === null ? n(A) : G(A) ? u > 1 ? (u = 0, r.interrupt = !0, e.exit("tableRow"), e.enter("lineEnding"), e.consume(A), e.exit("lineEnding"), h) : n(A) : ee(A) ? ne(e, d, "whitespace")(A) : (u += 1, a && (a = !1, i += 1), A === 124 ? (e.enter("tableCellDivider"), e.consume(A), e.exit("tableCellDivider"), a = !0, d) : (e.enter("data"), f(A)));
|
|
8581
|
+
return A === 124 || (a = !0, u += 1), f(A);
|
|
8585
8582
|
}
|
|
8586
8583
|
function f(A) {
|
|
8587
|
-
return A === null
|
|
8584
|
+
return A === null ? n(A) : G(A) ? u > 1 ? (u = 0, r.interrupt = !0, e.exit("tableRow"), e.enter("lineEnding"), e.consume(A), e.exit("lineEnding"), h) : n(A) : ee(A) ? ne(e, f, "whitespace")(A) : (u += 1, a && (a = !1, i += 1), A === 124 ? (e.enter("tableCellDivider"), e.consume(A), e.exit("tableCellDivider"), a = !0, f) : (e.enter("data"), d(A)));
|
|
8585
|
+
}
|
|
8586
|
+
function d(A) {
|
|
8587
|
+
return A === null || A === 124 || ae(A) ? (e.exit("data"), f(A)) : (e.consume(A), A === 92 ? m : d);
|
|
8588
8588
|
}
|
|
8589
8589
|
function m(A) {
|
|
8590
|
-
return A === 92 || A === 124 ? (e.consume(A),
|
|
8590
|
+
return A === 92 || A === 124 ? (e.consume(A), d) : d(A);
|
|
8591
8591
|
}
|
|
8592
8592
|
function h(A) {
|
|
8593
8593
|
return r.interrupt = !1, r.parser.lazy[r.now().line] ? n(A) : (e.enter("tableDelimiterRow"), a = !1, ee(A) ? ne(e, T, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(A) : T(A));
|
|
@@ -8630,23 +8630,23 @@ function bh(e, t, n) {
|
|
|
8630
8630
|
}
|
|
8631
8631
|
}
|
|
8632
8632
|
function gh(e, t) {
|
|
8633
|
-
let n = -1, r = !0, i = 0, u = [0, 0, 0, 0], a = [0, 0, 0, 0], o = !1, l = 0, c,
|
|
8633
|
+
let n = -1, r = !0, i = 0, u = [0, 0, 0, 0], a = [0, 0, 0, 0], o = !1, l = 0, c, f, d;
|
|
8634
8634
|
const m = new mh();
|
|
8635
8635
|
for (; ++n < e.length; ) {
|
|
8636
8636
|
const h = e[n], T = h[1];
|
|
8637
|
-
h[0] === "enter" ? T.type === "tableHead" ? (o = !1, l !== 0 && (ji(m, t, l, c,
|
|
8637
|
+
h[0] === "enter" ? T.type === "tableHead" ? (o = !1, l !== 0 && (ji(m, t, l, c, f), f = void 0, l = 0), c = {
|
|
8638
8638
|
type: "table",
|
|
8639
8639
|
start: Object.assign({}, T.start),
|
|
8640
8640
|
// Note: correct end is set later.
|
|
8641
8641
|
end: Object.assign({}, T.end)
|
|
8642
|
-
}, m.add(n, 0, [["enter", c, t]])) : T.type === "tableRow" || T.type === "tableDelimiterRow" ? (r = !0,
|
|
8642
|
+
}, m.add(n, 0, [["enter", c, t]])) : T.type === "tableRow" || T.type === "tableDelimiterRow" ? (r = !0, d = void 0, u = [0, 0, 0, 0], a = [0, n + 1, 0, 0], o && (o = !1, f = {
|
|
8643
8643
|
type: "tableBody",
|
|
8644
8644
|
start: Object.assign({}, T.start),
|
|
8645
8645
|
// Note: correct end is set later.
|
|
8646
8646
|
end: Object.assign({}, T.end)
|
|
8647
|
-
}, m.add(n, 0, [["enter",
|
|
8647
|
+
}, m.add(n, 0, [["enter", f, t]])), i = T.type === "tableDelimiterRow" ? 2 : f ? 3 : 1) : i && (T.type === "data" || T.type === "tableDelimiterMarker" || T.type === "tableDelimiterFiller") ? (r = !1, a[2] === 0 && (u[1] !== 0 && (a[0] = a[1], d = cn(m, t, u, i, void 0, d), u = [0, 0, 0, 0]), a[2] = n)) : T.type === "tableCellDivider" && (r ? r = !1 : (u[1] !== 0 && (a[0] = a[1], d = cn(m, t, u, i, void 0, d)), u = a, a = [u[1], n, 0, 0])) : T.type === "tableHead" ? (o = !0, l = n) : T.type === "tableRow" || T.type === "tableDelimiterRow" ? (l = n, u[1] !== 0 ? (a[0] = a[1], d = cn(m, t, u, i, n, d)) : a[1] !== 0 && (d = cn(m, t, a, i, n, d)), i = 0) : i && (T.type === "data" || T.type === "tableDelimiterMarker" || T.type === "tableDelimiterFiller") && (a[3] = n);
|
|
8648
8648
|
}
|
|
8649
|
-
for (l !== 0 && ji(m, t, l, c,
|
|
8649
|
+
for (l !== 0 && ji(m, t, l, c, f), m.consume(t.events), n = -1; ++n < t.events.length; ) {
|
|
8650
8650
|
const h = t.events[n];
|
|
8651
8651
|
h[0] === "enter" && h[1].type === "table" && (h[1]._align = Eh(t.events, n));
|
|
8652
8652
|
}
|
|
@@ -8662,19 +8662,19 @@ function cn(e, t, n, r, i, u) {
|
|
|
8662
8662
|
// Note: correct end is set later.
|
|
8663
8663
|
end: Object.assign({}, l)
|
|
8664
8664
|
}, e.add(n[1], 0, [["enter", u, t]]), n[2] !== 0) {
|
|
8665
|
-
const c = _t(t.events, n[2]),
|
|
8665
|
+
const c = _t(t.events, n[2]), f = _t(t.events, n[3]), d = {
|
|
8666
8666
|
type: o,
|
|
8667
8667
|
start: Object.assign({}, c),
|
|
8668
|
-
end: Object.assign({},
|
|
8668
|
+
end: Object.assign({}, f)
|
|
8669
8669
|
};
|
|
8670
|
-
if (e.add(n[2], 0, [["enter",
|
|
8670
|
+
if (e.add(n[2], 0, [["enter", d, t]]), r !== 2) {
|
|
8671
8671
|
const m = t.events[n[2]], h = t.events[n[3]];
|
|
8672
8672
|
if (m[1].end = Object.assign({}, h[1].end), m[1].type = "chunkText", m[1].contentType = "text", n[3] > n[2] + 1) {
|
|
8673
8673
|
const T = n[2] + 1, I = n[3] - n[2] - 1;
|
|
8674
8674
|
e.add(T, I, []);
|
|
8675
8675
|
}
|
|
8676
8676
|
}
|
|
8677
|
-
e.add(n[3] + 1, 0, [["exit",
|
|
8677
|
+
e.add(n[3] + 1, 0, [["exit", d, t]]);
|
|
8678
8678
|
}
|
|
8679
8679
|
return i !== void 0 && (u.end = Object.assign({}, _t(t.events, i)), e.add(i, 0, [["exit", u, t]]), u = void 0), u;
|
|
8680
8680
|
}
|
|
@@ -8728,7 +8728,7 @@ function Ch(e, t, n) {
|
|
|
8728
8728
|
}
|
|
8729
8729
|
function Ih(e) {
|
|
8730
8730
|
return vu([
|
|
8731
|
-
$
|
|
8731
|
+
$f(),
|
|
8732
8732
|
uh(),
|
|
8733
8733
|
hh(e),
|
|
8734
8734
|
Th(),
|
|
@@ -8741,7 +8741,7 @@ function Nh(e) {
|
|
|
8741
8741
|
/** @type {Processor<Root>} */
|
|
8742
8742
|
this
|
|
8743
8743
|
), n = e || yh, r = t.data(), i = r.micromarkExtensions || (r.micromarkExtensions = []), u = r.fromMarkdownExtensions || (r.fromMarkdownExtensions = []), a = r.toMarkdownExtensions || (r.toMarkdownExtensions = []);
|
|
8744
|
-
i.push(Ih(n)), u.push(
|
|
8744
|
+
i.push(Ih(n)), u.push(Wf()), a.push(jf(n));
|
|
8745
8745
|
}
|
|
8746
8746
|
const Gi = /[#.]/g;
|
|
8747
8747
|
function xh(e, t) {
|
|
@@ -8773,12 +8773,12 @@ function Da(e, t, n) {
|
|
|
8773
8773
|
o.unshift(c);
|
|
8774
8774
|
} else {
|
|
8775
8775
|
l = xh(u, t);
|
|
8776
|
-
const c = l.tagName.toLowerCase(),
|
|
8777
|
-
if (l.tagName =
|
|
8776
|
+
const c = l.tagName.toLowerCase(), f = r ? r.get(c) : void 0;
|
|
8777
|
+
if (l.tagName = f || c, Sh(a))
|
|
8778
8778
|
o.unshift(a);
|
|
8779
8779
|
else
|
|
8780
|
-
for (const [
|
|
8781
|
-
Lh(e, l.properties,
|
|
8780
|
+
for (const [d, m] of Object.entries(a))
|
|
8781
|
+
Lh(e, l.properties, d, m);
|
|
8782
8782
|
}
|
|
8783
8783
|
for (const c of o)
|
|
8784
8784
|
br(l.children, c);
|
|
@@ -9039,11 +9039,11 @@ function Hh(e, t) {
|
|
|
9039
9039
|
const o = (
|
|
9040
9040
|
/** @type {DefaultTreeAdapterMap['template']} */
|
|
9041
9041
|
t
|
|
9042
|
-
), l = o.sourceCodeLocation, c = l && l.startTag && At(l.startTag),
|
|
9042
|
+
), l = o.sourceCodeLocation, c = l && l.startTag && At(l.startTag), f = l && l.endTag && At(l.endTag), d = (
|
|
9043
9043
|
/** @type {Root} */
|
|
9044
9044
|
Yr(e, o.content)
|
|
9045
9045
|
);
|
|
9046
|
-
c &&
|
|
9046
|
+
c && f && e.file && (d.position = { start: c.end, end: f.start }), a.content = d;
|
|
9047
9047
|
}
|
|
9048
9048
|
return e.schema = n, a;
|
|
9049
9049
|
}
|
|
@@ -9087,7 +9087,7 @@ function At(e) {
|
|
|
9087
9087
|
function Ki(e) {
|
|
9088
9088
|
return e.line && e.column ? e : void 0;
|
|
9089
9089
|
}
|
|
9090
|
-
const Uh = {}, zh = {}.hasOwnProperty, Pa =
|
|
9090
|
+
const Uh = {}, zh = {}.hasOwnProperty, Pa = da("type", { handlers: { root: qh, element: Qh, text: jh, comment: Gh, doctype: Wh } });
|
|
9091
9091
|
function Yh(e, t) {
|
|
9092
9092
|
const r = (t || Uh).space;
|
|
9093
9093
|
return Pa(e, r === "svg" ? Je : Zt);
|
|
@@ -9671,7 +9671,7 @@ var s;
|
|
|
9671
9671
|
(function(e) {
|
|
9672
9672
|
e[e.UNKNOWN = 0] = "UNKNOWN", e[e.A = 1] = "A", e[e.ADDRESS = 2] = "ADDRESS", e[e.ANNOTATION_XML = 3] = "ANNOTATION_XML", e[e.APPLET = 4] = "APPLET", e[e.AREA = 5] = "AREA", e[e.ARTICLE = 6] = "ARTICLE", e[e.ASIDE = 7] = "ASIDE", e[e.B = 8] = "B", e[e.BASE = 9] = "BASE", e[e.BASEFONT = 10] = "BASEFONT", e[e.BGSOUND = 11] = "BGSOUND", e[e.BIG = 12] = "BIG", e[e.BLOCKQUOTE = 13] = "BLOCKQUOTE", e[e.BODY = 14] = "BODY", e[e.BR = 15] = "BR", e[e.BUTTON = 16] = "BUTTON", e[e.CAPTION = 17] = "CAPTION", e[e.CENTER = 18] = "CENTER", e[e.CODE = 19] = "CODE", e[e.COL = 20] = "COL", e[e.COLGROUP = 21] = "COLGROUP", e[e.DD = 22] = "DD", e[e.DESC = 23] = "DESC", e[e.DETAILS = 24] = "DETAILS", e[e.DIALOG = 25] = "DIALOG", e[e.DIR = 26] = "DIR", e[e.DIV = 27] = "DIV", e[e.DL = 28] = "DL", e[e.DT = 29] = "DT", e[e.EM = 30] = "EM", e[e.EMBED = 31] = "EMBED", e[e.FIELDSET = 32] = "FIELDSET", e[e.FIGCAPTION = 33] = "FIGCAPTION", e[e.FIGURE = 34] = "FIGURE", e[e.FONT = 35] = "FONT", e[e.FOOTER = 36] = "FOOTER", e[e.FOREIGN_OBJECT = 37] = "FOREIGN_OBJECT", e[e.FORM = 38] = "FORM", e[e.FRAME = 39] = "FRAME", e[e.FRAMESET = 40] = "FRAMESET", e[e.H1 = 41] = "H1", e[e.H2 = 42] = "H2", e[e.H3 = 43] = "H3", e[e.H4 = 44] = "H4", e[e.H5 = 45] = "H5", e[e.H6 = 46] = "H6", e[e.HEAD = 47] = "HEAD", e[e.HEADER = 48] = "HEADER", e[e.HGROUP = 49] = "HGROUP", e[e.HR = 50] = "HR", e[e.HTML = 51] = "HTML", e[e.I = 52] = "I", e[e.IMG = 53] = "IMG", e[e.IMAGE = 54] = "IMAGE", e[e.INPUT = 55] = "INPUT", e[e.IFRAME = 56] = "IFRAME", e[e.KEYGEN = 57] = "KEYGEN", e[e.LABEL = 58] = "LABEL", e[e.LI = 59] = "LI", e[e.LINK = 60] = "LINK", e[e.LISTING = 61] = "LISTING", e[e.MAIN = 62] = "MAIN", e[e.MALIGNMARK = 63] = "MALIGNMARK", e[e.MARQUEE = 64] = "MARQUEE", e[e.MATH = 65] = "MATH", e[e.MENU = 66] = "MENU", e[e.META = 67] = "META", e[e.MGLYPH = 68] = "MGLYPH", e[e.MI = 69] = "MI", e[e.MO = 70] = "MO", e[e.MN = 71] = "MN", e[e.MS = 72] = "MS", e[e.MTEXT = 73] = "MTEXT", e[e.NAV = 74] = "NAV", e[e.NOBR = 75] = "NOBR", e[e.NOFRAMES = 76] = "NOFRAMES", e[e.NOEMBED = 77] = "NOEMBED", e[e.NOSCRIPT = 78] = "NOSCRIPT", e[e.OBJECT = 79] = "OBJECT", e[e.OL = 80] = "OL", e[e.OPTGROUP = 81] = "OPTGROUP", e[e.OPTION = 82] = "OPTION", e[e.P = 83] = "P", e[e.PARAM = 84] = "PARAM", e[e.PLAINTEXT = 85] = "PLAINTEXT", e[e.PRE = 86] = "PRE", e[e.RB = 87] = "RB", e[e.RP = 88] = "RP", e[e.RT = 89] = "RT", e[e.RTC = 90] = "RTC", e[e.RUBY = 91] = "RUBY", e[e.S = 92] = "S", e[e.SCRIPT = 93] = "SCRIPT", e[e.SEARCH = 94] = "SEARCH", e[e.SECTION = 95] = "SECTION", e[e.SELECT = 96] = "SELECT", e[e.SOURCE = 97] = "SOURCE", e[e.SMALL = 98] = "SMALL", e[e.SPAN = 99] = "SPAN", e[e.STRIKE = 100] = "STRIKE", e[e.STRONG = 101] = "STRONG", e[e.STYLE = 102] = "STYLE", e[e.SUB = 103] = "SUB", e[e.SUMMARY = 104] = "SUMMARY", e[e.SUP = 105] = "SUP", e[e.TABLE = 106] = "TABLE", e[e.TBODY = 107] = "TBODY", e[e.TEMPLATE = 108] = "TEMPLATE", e[e.TEXTAREA = 109] = "TEXTAREA", e[e.TFOOT = 110] = "TFOOT", e[e.TD = 111] = "TD", e[e.TH = 112] = "TH", e[e.THEAD = 113] = "THEAD", e[e.TITLE = 114] = "TITLE", e[e.TR = 115] = "TR", e[e.TRACK = 116] = "TRACK", e[e.TT = 117] = "TT", e[e.U = 118] = "U", e[e.UL = 119] = "UL", e[e.SVG = 120] = "SVG", e[e.VAR = 121] = "VAR", e[e.WBR = 122] = "WBR", e[e.XMP = 123] = "XMP";
|
|
9673
9673
|
})(s || (s = {}));
|
|
9674
|
-
const
|
|
9674
|
+
const d1 = /* @__PURE__ */ new Map([
|
|
9675
9675
|
[y.A, s.A],
|
|
9676
9676
|
[y.ADDRESS, s.ADDRESS],
|
|
9677
9677
|
[y.ANNOTATION_XML, s.ANNOTATION_XML],
|
|
@@ -9798,9 +9798,9 @@ const f1 = /* @__PURE__ */ new Map([
|
|
|
9798
9798
|
]);
|
|
9799
9799
|
function xt(e) {
|
|
9800
9800
|
var t;
|
|
9801
|
-
return (t =
|
|
9801
|
+
return (t = d1.get(e)) !== null && t !== void 0 ? t : s.UNKNOWN;
|
|
9802
9802
|
}
|
|
9803
|
-
const B = s,
|
|
9803
|
+
const B = s, f1 = {
|
|
9804
9804
|
[P.HTML]: /* @__PURE__ */ new Set([
|
|
9805
9805
|
B.ADDRESS,
|
|
9806
9806
|
B.APPLET,
|
|
@@ -9895,7 +9895,7 @@ var E;
|
|
|
9895
9895
|
(function(e) {
|
|
9896
9896
|
e[e.DATA = 0] = "DATA", e[e.RCDATA = 1] = "RCDATA", e[e.RAWTEXT = 2] = "RAWTEXT", e[e.SCRIPT_DATA = 3] = "SCRIPT_DATA", e[e.PLAINTEXT = 4] = "PLAINTEXT", e[e.TAG_OPEN = 5] = "TAG_OPEN", e[e.END_TAG_OPEN = 6] = "END_TAG_OPEN", e[e.TAG_NAME = 7] = "TAG_NAME", e[e.RCDATA_LESS_THAN_SIGN = 8] = "RCDATA_LESS_THAN_SIGN", e[e.RCDATA_END_TAG_OPEN = 9] = "RCDATA_END_TAG_OPEN", e[e.RCDATA_END_TAG_NAME = 10] = "RCDATA_END_TAG_NAME", e[e.RAWTEXT_LESS_THAN_SIGN = 11] = "RAWTEXT_LESS_THAN_SIGN", e[e.RAWTEXT_END_TAG_OPEN = 12] = "RAWTEXT_END_TAG_OPEN", e[e.RAWTEXT_END_TAG_NAME = 13] = "RAWTEXT_END_TAG_NAME", e[e.SCRIPT_DATA_LESS_THAN_SIGN = 14] = "SCRIPT_DATA_LESS_THAN_SIGN", e[e.SCRIPT_DATA_END_TAG_OPEN = 15] = "SCRIPT_DATA_END_TAG_OPEN", e[e.SCRIPT_DATA_END_TAG_NAME = 16] = "SCRIPT_DATA_END_TAG_NAME", e[e.SCRIPT_DATA_ESCAPE_START = 17] = "SCRIPT_DATA_ESCAPE_START", e[e.SCRIPT_DATA_ESCAPE_START_DASH = 18] = "SCRIPT_DATA_ESCAPE_START_DASH", e[e.SCRIPT_DATA_ESCAPED = 19] = "SCRIPT_DATA_ESCAPED", e[e.SCRIPT_DATA_ESCAPED_DASH = 20] = "SCRIPT_DATA_ESCAPED_DASH", e[e.SCRIPT_DATA_ESCAPED_DASH_DASH = 21] = "SCRIPT_DATA_ESCAPED_DASH_DASH", e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN = 22] = "SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN", e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN = 23] = "SCRIPT_DATA_ESCAPED_END_TAG_OPEN", e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME = 24] = "SCRIPT_DATA_ESCAPED_END_TAG_NAME", e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START = 25] = "SCRIPT_DATA_DOUBLE_ESCAPE_START", e[e.SCRIPT_DATA_DOUBLE_ESCAPED = 26] = "SCRIPT_DATA_DOUBLE_ESCAPED", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH = 27] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH = 28] = "SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH", e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN = 29] = "SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN", e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END = 30] = "SCRIPT_DATA_DOUBLE_ESCAPE_END", e[e.BEFORE_ATTRIBUTE_NAME = 31] = "BEFORE_ATTRIBUTE_NAME", e[e.ATTRIBUTE_NAME = 32] = "ATTRIBUTE_NAME", e[e.AFTER_ATTRIBUTE_NAME = 33] = "AFTER_ATTRIBUTE_NAME", e[e.BEFORE_ATTRIBUTE_VALUE = 34] = "BEFORE_ATTRIBUTE_VALUE", e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED = 35] = "ATTRIBUTE_VALUE_DOUBLE_QUOTED", e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED = 36] = "ATTRIBUTE_VALUE_SINGLE_QUOTED", e[e.ATTRIBUTE_VALUE_UNQUOTED = 37] = "ATTRIBUTE_VALUE_UNQUOTED", e[e.AFTER_ATTRIBUTE_VALUE_QUOTED = 38] = "AFTER_ATTRIBUTE_VALUE_QUOTED", e[e.SELF_CLOSING_START_TAG = 39] = "SELF_CLOSING_START_TAG", e[e.BOGUS_COMMENT = 40] = "BOGUS_COMMENT", e[e.MARKUP_DECLARATION_OPEN = 41] = "MARKUP_DECLARATION_OPEN", e[e.COMMENT_START = 42] = "COMMENT_START", e[e.COMMENT_START_DASH = 43] = "COMMENT_START_DASH", e[e.COMMENT = 44] = "COMMENT", e[e.COMMENT_LESS_THAN_SIGN = 45] = "COMMENT_LESS_THAN_SIGN", e[e.COMMENT_LESS_THAN_SIGN_BANG = 46] = "COMMENT_LESS_THAN_SIGN_BANG", e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH = 47] = "COMMENT_LESS_THAN_SIGN_BANG_DASH", e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH = 48] = "COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH", e[e.COMMENT_END_DASH = 49] = "COMMENT_END_DASH", e[e.COMMENT_END = 50] = "COMMENT_END", e[e.COMMENT_END_BANG = 51] = "COMMENT_END_BANG", e[e.DOCTYPE = 52] = "DOCTYPE", e[e.BEFORE_DOCTYPE_NAME = 53] = "BEFORE_DOCTYPE_NAME", e[e.DOCTYPE_NAME = 54] = "DOCTYPE_NAME", e[e.AFTER_DOCTYPE_NAME = 55] = "AFTER_DOCTYPE_NAME", e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD = 56] = "AFTER_DOCTYPE_PUBLIC_KEYWORD", e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER = 57] = "BEFORE_DOCTYPE_PUBLIC_IDENTIFIER", e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED = 58] = "DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED", e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED = 59] = "DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED", e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER = 60] = "AFTER_DOCTYPE_PUBLIC_IDENTIFIER", e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS = 61] = "BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS", e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD = 62] = "AFTER_DOCTYPE_SYSTEM_KEYWORD", e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER = 63] = "BEFORE_DOCTYPE_SYSTEM_IDENTIFIER", e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED = 64] = "DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED", e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED = 65] = "DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED", e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER = 66] = "AFTER_DOCTYPE_SYSTEM_IDENTIFIER", e[e.BOGUS_DOCTYPE = 67] = "BOGUS_DOCTYPE", e[e.CDATA_SECTION = 68] = "CDATA_SECTION", e[e.CDATA_SECTION_BRACKET = 69] = "CDATA_SECTION_BRACKET", e[e.CDATA_SECTION_END = 70] = "CDATA_SECTION_END", e[e.CHARACTER_REFERENCE = 71] = "CHARACTER_REFERENCE", e[e.AMBIGUOUS_AMPERSAND = 72] = "AMBIGUOUS_AMPERSAND";
|
|
9897
9897
|
})(E || (E = {}));
|
|
9898
|
-
const
|
|
9898
|
+
const de = {
|
|
9899
9899
|
DATA: E.DATA,
|
|
9900
9900
|
RCDATA: E.RCDATA,
|
|
9901
9901
|
RAWTEXT: E.RAWTEXT,
|
|
@@ -9918,7 +9918,7 @@ function Qe(e) {
|
|
|
9918
9918
|
function Xi(e) {
|
|
9919
9919
|
return Qe(e) || h1(e);
|
|
9920
9920
|
}
|
|
9921
|
-
function
|
|
9921
|
+
function dn(e) {
|
|
9922
9922
|
return e + 32;
|
|
9923
9923
|
}
|
|
9924
9924
|
function va(e) {
|
|
@@ -10625,7 +10625,7 @@ class E1 {
|
|
|
10625
10625
|
break;
|
|
10626
10626
|
}
|
|
10627
10627
|
default:
|
|
10628
|
-
n.tagName += String.fromCodePoint(Ht(t) ?
|
|
10628
|
+
n.tagName += String.fromCodePoint(Ht(t) ? dn(t) : t);
|
|
10629
10629
|
}
|
|
10630
10630
|
}
|
|
10631
10631
|
// RCDATA less-than sign state
|
|
@@ -10957,7 +10957,7 @@ class E1 {
|
|
|
10957
10957
|
break;
|
|
10958
10958
|
}
|
|
10959
10959
|
default:
|
|
10960
|
-
this.currentAttr.name += String.fromCodePoint(Ht(t) ?
|
|
10960
|
+
this.currentAttr.name += String.fromCodePoint(Ht(t) ? dn(t) : t);
|
|
10961
10961
|
}
|
|
10962
10962
|
}
|
|
10963
10963
|
// After attribute name state
|
|
@@ -11359,7 +11359,7 @@ class E1 {
|
|
|
11359
11359
|
//------------------------------------------------------------------
|
|
11360
11360
|
_stateBeforeDoctypeName(t) {
|
|
11361
11361
|
if (Ht(t))
|
|
11362
|
-
this._createDoctypeToken(String.fromCharCode(
|
|
11362
|
+
this._createDoctypeToken(String.fromCharCode(dn(t))), this.state = E.DOCTYPE_NAME;
|
|
11363
11363
|
else
|
|
11364
11364
|
switch (t) {
|
|
11365
11365
|
case p.SPACE:
|
|
@@ -11412,7 +11412,7 @@ class E1 {
|
|
|
11412
11412
|
break;
|
|
11413
11413
|
}
|
|
11414
11414
|
default:
|
|
11415
|
-
n.name += String.fromCodePoint(Ht(t) ?
|
|
11415
|
+
n.name += String.fromCodePoint(Ht(t) ? dn(t) : t);
|
|
11416
11416
|
}
|
|
11417
11417
|
}
|
|
11418
11418
|
// After DOCTYPE name state
|
|
@@ -12077,8 +12077,8 @@ class I1 {
|
|
|
12077
12077
|
break;
|
|
12078
12078
|
const { element: c } = l;
|
|
12079
12079
|
if (this.treeAdapter.getTagName(c) === u && this.treeAdapter.getNamespaceURI(c) === a) {
|
|
12080
|
-
const
|
|
12081
|
-
|
|
12080
|
+
const f = this.treeAdapter.getAttrList(c);
|
|
12081
|
+
f.length === i && r.push({ idx: o, attrs: f });
|
|
12082
12082
|
}
|
|
12083
12083
|
}
|
|
12084
12084
|
return r;
|
|
@@ -12670,7 +12670,7 @@ class au {
|
|
|
12670
12670
|
this._insertElement(t, P.HTML), this.tokenizer.state = n, this.originalInsertionMode = this.insertionMode, this.insertionMode = b.TEXT;
|
|
12671
12671
|
}
|
|
12672
12672
|
switchToPlaintextParsing() {
|
|
12673
|
-
this.insertionMode = b.TEXT, this.originalInsertionMode = b.IN_BODY, this.tokenizer.state =
|
|
12673
|
+
this.insertionMode = b.TEXT, this.originalInsertionMode = b.IN_BODY, this.tokenizer.state = de.PLAINTEXT;
|
|
12674
12674
|
}
|
|
12675
12675
|
//Fragment parsing
|
|
12676
12676
|
/** @protected */
|
|
@@ -12693,7 +12693,7 @@ class au {
|
|
|
12693
12693
|
switch (this.fragmentContextID) {
|
|
12694
12694
|
case s.TITLE:
|
|
12695
12695
|
case s.TEXTAREA: {
|
|
12696
|
-
this.tokenizer.state =
|
|
12696
|
+
this.tokenizer.state = de.RCDATA;
|
|
12697
12697
|
break;
|
|
12698
12698
|
}
|
|
12699
12699
|
case s.STYLE:
|
|
@@ -12702,15 +12702,15 @@ class au {
|
|
|
12702
12702
|
case s.NOEMBED:
|
|
12703
12703
|
case s.NOFRAMES:
|
|
12704
12704
|
case s.NOSCRIPT: {
|
|
12705
|
-
this.tokenizer.state =
|
|
12705
|
+
this.tokenizer.state = de.RAWTEXT;
|
|
12706
12706
|
break;
|
|
12707
12707
|
}
|
|
12708
12708
|
case s.SCRIPT: {
|
|
12709
|
-
this.tokenizer.state =
|
|
12709
|
+
this.tokenizer.state = de.SCRIPT_DATA;
|
|
12710
12710
|
break;
|
|
12711
12711
|
}
|
|
12712
12712
|
case s.PLAINTEXT: {
|
|
12713
|
-
this.tokenizer.state =
|
|
12713
|
+
this.tokenizer.state = de.PLAINTEXT;
|
|
12714
12714
|
break;
|
|
12715
12715
|
}
|
|
12716
12716
|
}
|
|
@@ -12781,8 +12781,8 @@ class au {
|
|
|
12781
12781
|
return;
|
|
12782
12782
|
const i = this.treeAdapter.getChildNodes(n), u = r ? i.lastIndexOf(r) : i.length, a = i[u - 1];
|
|
12783
12783
|
if (this.treeAdapter.getNodeSourceCodeLocation(a)) {
|
|
12784
|
-
const { endLine: l, endCol: c, endOffset:
|
|
12785
|
-
this.treeAdapter.updateNodeSourceCodeLocation(a, { endLine: l, endCol: c, endOffset:
|
|
12784
|
+
const { endLine: l, endCol: c, endOffset: f } = t.location;
|
|
12785
|
+
this.treeAdapter.updateNodeSourceCodeLocation(a, { endLine: l, endCol: c, endOffset: f });
|
|
12786
12786
|
} else this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(a, t.location);
|
|
12787
12787
|
}
|
|
12788
12788
|
/** @protected */
|
|
@@ -13001,7 +13001,7 @@ class au {
|
|
|
13001
13001
|
/** @protected */
|
|
13002
13002
|
_isSpecialElement(t, n) {
|
|
13003
13003
|
const r = this.treeAdapter.getNamespaceURI(t);
|
|
13004
|
-
return
|
|
13004
|
+
return f1[r].has(n);
|
|
13005
13005
|
}
|
|
13006
13006
|
/** @internal */
|
|
13007
13007
|
onCharacter(t) {
|
|
@@ -13275,7 +13275,7 @@ class au {
|
|
|
13275
13275
|
break;
|
|
13276
13276
|
}
|
|
13277
13277
|
case b.IN_TEMPLATE: {
|
|
13278
|
-
|
|
13278
|
+
fp(this, t);
|
|
13279
13279
|
break;
|
|
13280
13280
|
}
|
|
13281
13281
|
case b.AFTER_BODY: {
|
|
@@ -13372,7 +13372,7 @@ class au {
|
|
|
13372
13372
|
break;
|
|
13373
13373
|
}
|
|
13374
13374
|
case b.IN_SELECT_IN_TABLE: {
|
|
13375
|
-
|
|
13375
|
+
dp(this, t);
|
|
13376
13376
|
break;
|
|
13377
13377
|
}
|
|
13378
13378
|
case b.IN_TEMPLATE: {
|
|
@@ -13635,20 +13635,20 @@ function Me(e, t) {
|
|
|
13635
13635
|
break;
|
|
13636
13636
|
}
|
|
13637
13637
|
case s.TITLE: {
|
|
13638
|
-
e._switchToTextParsing(t,
|
|
13638
|
+
e._switchToTextParsing(t, de.RCDATA);
|
|
13639
13639
|
break;
|
|
13640
13640
|
}
|
|
13641
13641
|
case s.NOSCRIPT: {
|
|
13642
|
-
e.options.scriptingEnabled ? e._switchToTextParsing(t,
|
|
13642
|
+
e.options.scriptingEnabled ? e._switchToTextParsing(t, de.RAWTEXT) : (e._insertElement(t, P.HTML), e.insertionMode = b.IN_HEAD_NO_SCRIPT);
|
|
13643
13643
|
break;
|
|
13644
13644
|
}
|
|
13645
13645
|
case s.NOFRAMES:
|
|
13646
13646
|
case s.STYLE: {
|
|
13647
|
-
e._switchToTextParsing(t,
|
|
13647
|
+
e._switchToTextParsing(t, de.RAWTEXT);
|
|
13648
13648
|
break;
|
|
13649
13649
|
}
|
|
13650
13650
|
case s.SCRIPT: {
|
|
13651
|
-
e._switchToTextParsing(t,
|
|
13651
|
+
e._switchToTextParsing(t, de.SCRIPT_DATA);
|
|
13652
13652
|
break;
|
|
13653
13653
|
}
|
|
13654
13654
|
case s.TEMPLATE: {
|
|
@@ -13819,10 +13819,10 @@ function Ga(e, t) {
|
|
|
13819
13819
|
function Qa(e, t) {
|
|
13820
13820
|
e._reconstructActiveFormattingElements(), e._insertCharacters(t), e.framesetOk = !1;
|
|
13821
13821
|
}
|
|
13822
|
-
function
|
|
13822
|
+
function dm(e, t) {
|
|
13823
13823
|
e.openElements.tmplCount === 0 && e.treeAdapter.adoptAttributes(e.openElements.items[0], t.attrs);
|
|
13824
13824
|
}
|
|
13825
|
-
function
|
|
13825
|
+
function fm(e, t) {
|
|
13826
13826
|
const n = e.openElements.tryPeekProperlyNestedBodyElement();
|
|
13827
13827
|
n && e.openElements.tmplCount === 0 && (e.framesetOk = !1, e.treeAdapter.adoptAttributes(n, t.attrs));
|
|
13828
13828
|
}
|
|
@@ -13858,7 +13858,7 @@ function bm(e, t) {
|
|
|
13858
13858
|
e.openElements.hasInButtonScope(s.P) && e._closePElement(), e._insertElement(t, P.HTML);
|
|
13859
13859
|
}
|
|
13860
13860
|
function gm(e, t) {
|
|
13861
|
-
e.openElements.hasInButtonScope(s.P) && e._closePElement(), e._insertElement(t, P.HTML), e.tokenizer.state =
|
|
13861
|
+
e.openElements.hasInButtonScope(s.P) && e._closePElement(), e._insertElement(t, P.HTML), e.tokenizer.state = de.PLAINTEXT;
|
|
13862
13862
|
}
|
|
13863
13863
|
function _m(e, t) {
|
|
13864
13864
|
e.openElements.hasInScope(s.BUTTON) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(s.BUTTON)), e._reconstructActiveFormattingElements(), e._insertElement(t, P.HTML), e.framesetOk = !1;
|
|
@@ -13899,16 +13899,16 @@ function Lm(e, t) {
|
|
|
13899
13899
|
t.tagName = y.IMG, t.tagID = s.IMG, $a(e, t);
|
|
13900
13900
|
}
|
|
13901
13901
|
function Om(e, t) {
|
|
13902
|
-
e._insertElement(t, P.HTML), e.skipNextNewLine = !0, e.tokenizer.state =
|
|
13902
|
+
e._insertElement(t, P.HTML), e.skipNextNewLine = !0, e.tokenizer.state = de.RCDATA, e.originalInsertionMode = e.insertionMode, e.framesetOk = !1, e.insertionMode = b.TEXT;
|
|
13903
13903
|
}
|
|
13904
13904
|
function Dm(e, t) {
|
|
13905
|
-
e.openElements.hasInButtonScope(s.P) && e._closePElement(), e._reconstructActiveFormattingElements(), e.framesetOk = !1, e._switchToTextParsing(t,
|
|
13905
|
+
e.openElements.hasInButtonScope(s.P) && e._closePElement(), e._reconstructActiveFormattingElements(), e.framesetOk = !1, e._switchToTextParsing(t, de.RAWTEXT);
|
|
13906
13906
|
}
|
|
13907
13907
|
function Rm(e, t) {
|
|
13908
|
-
e.framesetOk = !1, e._switchToTextParsing(t,
|
|
13908
|
+
e.framesetOk = !1, e._switchToTextParsing(t, de.RAWTEXT);
|
|
13909
13909
|
}
|
|
13910
13910
|
function su(e, t) {
|
|
13911
|
-
e._switchToTextParsing(t,
|
|
13911
|
+
e._switchToTextParsing(t, de.RAWTEXT);
|
|
13912
13912
|
}
|
|
13913
13913
|
function wm(e, t) {
|
|
13914
13914
|
e._reconstructActiveFormattingElements(), e._insertElement(t, P.HTML), e.framesetOk = !1, e.insertionMode = e.insertionMode === b.IN_TABLE || e.insertionMode === b.IN_CAPTION || e.insertionMode === b.IN_TABLE_BODY || e.insertionMode === b.IN_ROW || e.insertionMode === b.IN_CELL ? b.IN_SELECT_IN_TABLE : b.IN_SELECT;
|
|
@@ -14032,7 +14032,7 @@ function Ae(e, t) {
|
|
|
14032
14032
|
break;
|
|
14033
14033
|
}
|
|
14034
14034
|
case s.HTML: {
|
|
14035
|
-
|
|
14035
|
+
dm(e, t);
|
|
14036
14036
|
break;
|
|
14037
14037
|
}
|
|
14038
14038
|
case s.BASE:
|
|
@@ -14048,7 +14048,7 @@ function Ae(e, t) {
|
|
|
14048
14048
|
break;
|
|
14049
14049
|
}
|
|
14050
14050
|
case s.BODY: {
|
|
14051
|
-
|
|
14051
|
+
fm(e, t);
|
|
14052
14052
|
break;
|
|
14053
14053
|
}
|
|
14054
14054
|
case s.FORM: {
|
|
@@ -14684,11 +14684,11 @@ function cp(e, t) {
|
|
|
14684
14684
|
const n = t.tagID;
|
|
14685
14685
|
n === s.CAPTION || n === s.TABLE || n === s.TBODY || n === s.TFOOT || n === s.THEAD || n === s.TR || n === s.TD || n === s.TH ? (e.openElements.popUntilTagNamePopped(s.SELECT), e._resetInsertionMode(), e._processStartTag(t)) : rs(e, t);
|
|
14686
14686
|
}
|
|
14687
|
-
function
|
|
14687
|
+
function dp(e, t) {
|
|
14688
14688
|
const n = t.tagID;
|
|
14689
14689
|
n === s.CAPTION || n === s.TABLE || n === s.TBODY || n === s.TFOOT || n === s.THEAD || n === s.TR || n === s.TD || n === s.TH ? e.openElements.hasInTableScope(n) && (e.openElements.popUntilTagNamePopped(s.SELECT), e._resetInsertionMode(), e.onEndTag(t)) : is(e, t);
|
|
14690
14690
|
}
|
|
14691
|
-
function
|
|
14691
|
+
function fp(e, t) {
|
|
14692
14692
|
switch (t.tagID) {
|
|
14693
14693
|
// First, handle tags that can start without a mode change
|
|
14694
14694
|
case s.BASE:
|
|
@@ -14854,7 +14854,7 @@ const yp = /<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title
|
|
|
14854
14854
|
"mdxjsEsm"
|
|
14855
14855
|
]), lu = { sourceCodeLocationInfo: !0, scriptingEnabled: !1 };
|
|
14856
14856
|
function os(e, t) {
|
|
14857
|
-
const n = Fp(e), r =
|
|
14857
|
+
const n = Fp(e), r = da("type", {
|
|
14858
14858
|
handlers: { root: xp, element: Sp, text: Lp, comment: cs, doctype: Op, raw: Rp },
|
|
14859
14859
|
unknown: wp
|
|
14860
14860
|
}), i = {
|
|
@@ -14871,14 +14871,14 @@ function os(e, t) {
|
|
|
14871
14871
|
file: i.options.file
|
|
14872
14872
|
});
|
|
14873
14873
|
return i.stitches && Rn(a, "comment", function(o, l, c) {
|
|
14874
|
-
const
|
|
14874
|
+
const f = (
|
|
14875
14875
|
/** @type {Stitch} */
|
|
14876
14876
|
/** @type {unknown} */
|
|
14877
14877
|
o
|
|
14878
14878
|
);
|
|
14879
|
-
if (
|
|
14880
|
-
const
|
|
14881
|
-
return
|
|
14879
|
+
if (f.value.stitch && c && l !== void 0) {
|
|
14880
|
+
const d = c.children;
|
|
14881
|
+
return d[l] = f.value.stitch, l;
|
|
14882
14882
|
}
|
|
14883
14883
|
}), a.type === "root" && a.children.length === 1 && a.children[0].type === e.type ? a.children[0] : a;
|
|
14884
14884
|
}
|
|
@@ -14935,7 +14935,7 @@ function cs(e, t) {
|
|
|
14935
14935
|
St(t, Ue(e)), t.parser.currentToken = r, t.parser._processToken(t.parser.currentToken);
|
|
14936
14936
|
}
|
|
14937
14937
|
function Rp(e, t) {
|
|
14938
|
-
if (t.parser.tokenizer.preprocessor.html = "", t.parser.tokenizer.preprocessor.pos = -1, t.parser.tokenizer.preprocessor.lastGapPos = -2, t.parser.tokenizer.preprocessor.gapStack = [], t.parser.tokenizer.preprocessor.skipNextNewLine = !1, t.parser.tokenizer.preprocessor.lastChunkWritten = !1, t.parser.tokenizer.preprocessor.endOfChunkHit = !1, t.parser.tokenizer.preprocessor.isEol = !1,
|
|
14938
|
+
if (t.parser.tokenizer.preprocessor.html = "", t.parser.tokenizer.preprocessor.pos = -1, t.parser.tokenizer.preprocessor.lastGapPos = -2, t.parser.tokenizer.preprocessor.gapStack = [], t.parser.tokenizer.preprocessor.skipNextNewLine = !1, t.parser.tokenizer.preprocessor.lastChunkWritten = !1, t.parser.tokenizer.preprocessor.endOfChunkHit = !1, t.parser.tokenizer.preprocessor.isEol = !1, ds(t, Ue(e)), t.parser.tokenizer.write(
|
|
14939
14939
|
t.options.tagfilter ? e.value.replace(yp, "<$1$2") : e.value,
|
|
14940
14940
|
!1
|
|
14941
14941
|
), t.parser.tokenizer._runParsingLoop(), t.parser.tokenizer.state === 72 || // @ts-expect-error: removed.
|
|
@@ -14958,11 +14958,11 @@ function wp(e, t) {
|
|
|
14958
14958
|
}
|
|
14959
14959
|
}
|
|
14960
14960
|
function St(e, t) {
|
|
14961
|
-
|
|
14961
|
+
ds(e, t);
|
|
14962
14962
|
const n = e.parser.tokenizer.currentCharacterToken;
|
|
14963
|
-
n && n.location && (n.location.endLine = e.parser.tokenizer.preprocessor.line, n.location.endCol = e.parser.tokenizer.preprocessor.col + 1, n.location.endOffset = e.parser.tokenizer.preprocessor.offset + 1, e.parser.currentToken = n, e.parser._processToken(e.parser.currentToken)), e.parser.tokenizer.paused = !1, e.parser.tokenizer.inLoop = !1, e.parser.tokenizer.active = !1, e.parser.tokenizer.returnState =
|
|
14963
|
+
n && n.location && (n.location.endLine = e.parser.tokenizer.preprocessor.line, n.location.endCol = e.parser.tokenizer.preprocessor.col + 1, n.location.endOffset = e.parser.tokenizer.preprocessor.offset + 1, e.parser.currentToken = n, e.parser._processToken(e.parser.currentToken)), e.parser.tokenizer.paused = !1, e.parser.tokenizer.inLoop = !1, e.parser.tokenizer.active = !1, e.parser.tokenizer.returnState = de.DATA, e.parser.tokenizer.charRefCode = -1, e.parser.tokenizer.consumedAfterSnapshot = -1, e.parser.tokenizer.currentLocation = null, e.parser.tokenizer.currentCharacterToken = null, e.parser.tokenizer.currentToken = null, e.parser.tokenizer.currentAttr = { name: "", value: "" };
|
|
14964
14964
|
}
|
|
14965
|
-
function
|
|
14965
|
+
function ds(e, t) {
|
|
14966
14966
|
if (t && t.offset !== void 0) {
|
|
14967
14967
|
const n = {
|
|
14968
14968
|
startLine: t.line,
|
|
@@ -14977,7 +14977,7 @@ function fs(e, t) {
|
|
|
14977
14977
|
}
|
|
14978
14978
|
function Pp(e, t) {
|
|
14979
14979
|
const n = e.tagName.toLowerCase();
|
|
14980
|
-
if (t.parser.tokenizer.state ===
|
|
14980
|
+
if (t.parser.tokenizer.state === de.PLAINTEXT) return;
|
|
14981
14981
|
St(t, Ue(e));
|
|
14982
14982
|
const r = t.parser.openElements.current;
|
|
14983
14983
|
let i = "namespaceURI" in r ? r.namespaceURI : at.html;
|
|
@@ -15002,7 +15002,7 @@ function Pp(e, t) {
|
|
|
15002
15002
|
}
|
|
15003
15003
|
function Mp(e, t) {
|
|
15004
15004
|
const n = e.tagName.toLowerCase();
|
|
15005
|
-
if (!t.parser.tokenizer.inForeignNode && Kh.includes(n) || t.parser.tokenizer.state ===
|
|
15005
|
+
if (!t.parser.tokenizer.inForeignNode && Kh.includes(n) || t.parser.tokenizer.state === de.PLAINTEXT) return;
|
|
15006
15006
|
St(t, Nn(e));
|
|
15007
15007
|
const r = {
|
|
15008
15008
|
type: J.END_TAG,
|
|
@@ -15015,9 +15015,9 @@ function Mp(e, t) {
|
|
|
15015
15015
|
};
|
|
15016
15016
|
t.parser.currentToken = r, t.parser._processToken(t.parser.currentToken), // Current element is closed.
|
|
15017
15017
|
n === t.parser.tokenizer.lastStartTagName && // `<textarea>` and `<title>`
|
|
15018
|
-
(t.parser.tokenizer.state ===
|
|
15019
|
-
t.parser.tokenizer.state ===
|
|
15020
|
-
t.parser.tokenizer.state ===
|
|
15018
|
+
(t.parser.tokenizer.state === de.RCDATA || // `<iframe>`, `<noembed>`, `<noframes>`, `<style>`, `<xmp>`
|
|
15019
|
+
t.parser.tokenizer.state === de.RAWTEXT || // `<script>`
|
|
15020
|
+
t.parser.tokenizer.state === de.SCRIPT_DATA) && (t.parser.tokenizer.state = de.DATA);
|
|
15021
15021
|
}
|
|
15022
15022
|
function Fp(e) {
|
|
15023
15023
|
const t = e.type === "root" ? e.children[0] : e;
|
|
@@ -15253,10 +15253,10 @@ function vp(e, t) {
|
|
|
15253
15253
|
const r = {
|
|
15254
15254
|
schema: t ? { ...Gt, ...t } : Gt,
|
|
15255
15255
|
stack: []
|
|
15256
|
-
}, i =
|
|
15256
|
+
}, i = fs(r, e);
|
|
15257
15257
|
return i && (Array.isArray(i) ? i.length === 1 ? n = i[0] : n.children = i : n = i), n;
|
|
15258
15258
|
}
|
|
15259
|
-
function
|
|
15259
|
+
function fs(e, t) {
|
|
15260
15260
|
if (t && typeof t == "object") {
|
|
15261
15261
|
const n = (
|
|
15262
15262
|
/** @type {Record<string, Readonly<unknown>>} */
|
|
@@ -15333,7 +15333,7 @@ function hs(e, t) {
|
|
|
15333
15333
|
);
|
|
15334
15334
|
let i = -1;
|
|
15335
15335
|
for (; ++i < r.length; ) {
|
|
15336
|
-
const u =
|
|
15336
|
+
const u = fs(e, r[i]);
|
|
15337
15337
|
u && (Array.isArray(u) ? n.push(...u) : n.push(u));
|
|
15338
15338
|
}
|
|
15339
15339
|
}
|
|
@@ -15347,19 +15347,19 @@ function Wp(e, t) {
|
|
|
15347
15347
|
let c;
|
|
15348
15348
|
for (c in o)
|
|
15349
15349
|
if (Ke.call(o, c)) {
|
|
15350
|
-
const
|
|
15351
|
-
let
|
|
15350
|
+
const f = o[c];
|
|
15351
|
+
let d = cu(
|
|
15352
15352
|
e,
|
|
15353
|
-
|
|
15353
|
+
du(u, c),
|
|
15354
15354
|
c,
|
|
15355
|
-
|
|
15355
|
+
f
|
|
15356
15356
|
);
|
|
15357
|
-
|
|
15357
|
+
d == null && (d = cu(e, du(a, c), c, f)), d != null && (l[c] = d);
|
|
15358
15358
|
}
|
|
15359
15359
|
if (i && Ke.call(i, n)) {
|
|
15360
|
-
const
|
|
15361
|
-
for (c in
|
|
15362
|
-
Ke.call(
|
|
15360
|
+
const f = i[n];
|
|
15361
|
+
for (c in f)
|
|
15362
|
+
Ke.call(f, c) && !Ke.call(l, c) && (l[c] = f[c]);
|
|
15363
15363
|
}
|
|
15364
15364
|
return l;
|
|
15365
15365
|
}
|
|
@@ -15406,8 +15406,8 @@ function Gp(e, t, n) {
|
|
|
15406
15406
|
return !0;
|
|
15407
15407
|
let c = -1;
|
|
15408
15408
|
for (; ++c < r.length; ) {
|
|
15409
|
-
const
|
|
15410
|
-
if (u ===
|
|
15409
|
+
const f = r[c];
|
|
15410
|
+
if (u === f.length && i.slice(0, f.length) === f)
|
|
15411
15411
|
return !0;
|
|
15412
15412
|
}
|
|
15413
15413
|
return !1;
|
|
@@ -15419,7 +15419,7 @@ function un(e, t) {
|
|
|
15419
15419
|
);
|
|
15420
15420
|
t.data && (e.data = ct(t.data)), n && (e.position = n);
|
|
15421
15421
|
}
|
|
15422
|
-
function
|
|
15422
|
+
function du(e, t) {
|
|
15423
15423
|
let n, r = -1;
|
|
15424
15424
|
if (e)
|
|
15425
15425
|
for (; ++r < e.length; ) {
|
|
@@ -15452,7 +15452,7 @@ function Kp(e) {
|
|
|
15452
15452
|
const t = e.trim();
|
|
15453
15453
|
return !t || t.startsWith("#") || /^(\.{0,2}\/|(?!\w+:)\/?)/.test(t) && !/^\/\//.test(t) ? !0 : /^https?:\/\//i.test(t) || /^mailto:/i.test(t);
|
|
15454
15454
|
}
|
|
15455
|
-
function
|
|
15455
|
+
function fn(e, t) {
|
|
15456
15456
|
if (!e) return null;
|
|
15457
15457
|
const n = e.trim();
|
|
15458
15458
|
if (!n || n.startsWith("//")) return null;
|
|
@@ -15481,7 +15481,7 @@ function Jp(e) {
|
|
|
15481
15481
|
return {
|
|
15482
15482
|
a: ({ href: t, children: n, ...r }) => Kp(t) ? /* @__PURE__ */ U("a", { href: t, target: "_blank", rel: "noopener noreferrer", ...r, children: n }) : /* @__PURE__ */ U("span", { ...r, children: n }),
|
|
15483
15483
|
img: ({ src: t, alt: n, ...r }) => {
|
|
15484
|
-
const i =
|
|
15484
|
+
const i = fn(t, e);
|
|
15485
15485
|
return i ? (
|
|
15486
15486
|
// E2:外链图只走 https(相对经基址解析落 https/linkdesk);alt 缺失补空串(a11y——装饰图不读屏)
|
|
15487
15487
|
/* @__PURE__ */ U("img", { src: i, alt: n ?? "", loading: "lazy", ...r })
|
|
@@ -15494,9 +15494,9 @@ function Jp(e) {
|
|
|
15494
15494
|
video: (t) => {
|
|
15495
15495
|
const { src: n, poster: r, preload: i, autoPlay: u, children: a, ...o } = t;
|
|
15496
15496
|
delete o.autoplay;
|
|
15497
|
-
const l =
|
|
15497
|
+
const l = fn(n, e);
|
|
15498
15498
|
if (!l && !$p(a)) return null;
|
|
15499
|
-
const c = r ?
|
|
15499
|
+
const c = r ? fn(r, e) : void 0;
|
|
15500
15500
|
return /* @__PURE__ */ U(
|
|
15501
15501
|
"video",
|
|
15502
15502
|
{
|
|
@@ -15511,7 +15511,7 @@ function Jp(e) {
|
|
|
15511
15511
|
},
|
|
15512
15512
|
// `<video><source src>` 多格式写法——source 的相对 src 同走 resolveMediaSrc(否则子 source 是裸相对、裂)
|
|
15513
15513
|
source: ({ src: t, ...n }) => {
|
|
15514
|
-
const r =
|
|
15514
|
+
const r = fn(t, e);
|
|
15515
15515
|
return r ? /* @__PURE__ */ U("source", { src: r, ...n }) : null;
|
|
15516
15516
|
}
|
|
15517
15517
|
};
|
|
@@ -15519,7 +15519,7 @@ function Jp(e) {
|
|
|
15519
15519
|
function Zp({ markdown: e, className: t, assetBase: n }) {
|
|
15520
15520
|
const r = ve(() => Jp(n), [n]);
|
|
15521
15521
|
return /* @__PURE__ */ U("div", { className: t ? `ldk-mdv ${t}` : "ldk-mdv", children: /* @__PURE__ */ U(
|
|
15522
|
-
|
|
15522
|
+
fd,
|
|
15523
15523
|
{
|
|
15524
15524
|
remarkPlugins: [Nh],
|
|
15525
15525
|
rehypePlugins: [Hp, [Qp, Xp]],
|
|
@@ -15528,15 +15528,15 @@ function Zp({ markdown: e, className: t, assetBase: n }) {
|
|
|
15528
15528
|
}
|
|
15529
15529
|
) });
|
|
15530
15530
|
}
|
|
15531
|
-
const
|
|
15531
|
+
const fT = Zs(Zp);
|
|
15532
15532
|
function eE({ children: e, onClick: t, disabled: n, title: r, type: i = "button", variant: u, size: a }) {
|
|
15533
15533
|
const o = ["ldk-button", u && `ldk-button--${u}`, a && `ldk-button--${a}`].filter(Boolean).join(" ");
|
|
15534
15534
|
return /* @__PURE__ */ U("button", { type: i, className: o, onClick: t, disabled: n, title: r, children: e });
|
|
15535
15535
|
}
|
|
15536
|
-
var bt = {},
|
|
15536
|
+
var bt = {}, fu;
|
|
15537
15537
|
function tE() {
|
|
15538
|
-
if (
|
|
15539
|
-
|
|
15538
|
+
if (fu) return bt;
|
|
15539
|
+
fu = 1;
|
|
15540
15540
|
var e = ro;
|
|
15541
15541
|
if (process.env.NODE_ENV === "production")
|
|
15542
15542
|
bt.createRoot = e.createRoot, bt.hydrateRoot = e.hydrateRoot;
|
|
@@ -15593,27 +15593,27 @@ function $r({ children: e, onClose: t, closeOnOutsideClick: n = !0, triggerRef:
|
|
|
15593
15593
|
const l = ce(null);
|
|
15594
15594
|
re(() => {
|
|
15595
15595
|
if (!o || !t || !n) return;
|
|
15596
|
-
const
|
|
15596
|
+
const d = (m) => {
|
|
15597
15597
|
var N, k;
|
|
15598
15598
|
const h = m.target, T = (N = l.current) == null ? void 0 : N.contains(h), I = ((k = r == null ? void 0 : r.current) == null ? void 0 : k.contains(h)) ?? !1;
|
|
15599
15599
|
!T && !I && t();
|
|
15600
15600
|
};
|
|
15601
|
-
return window.addEventListener("mousedown",
|
|
15601
|
+
return window.addEventListener("mousedown", d, !0), () => window.removeEventListener("mousedown", d, !0);
|
|
15602
15602
|
}, [o, t, n, r]), re(() => {
|
|
15603
15603
|
if (!o || !t) return;
|
|
15604
|
-
const
|
|
15604
|
+
const d = (m) => {
|
|
15605
15605
|
m.key === "Escape" && ps(l.current) && t();
|
|
15606
15606
|
};
|
|
15607
|
-
return window.addEventListener("keydown",
|
|
15607
|
+
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
15608
15608
|
}, [o, t]), re(() => {
|
|
15609
15609
|
if (!o || !i) return;
|
|
15610
|
-
const
|
|
15611
|
-
if (!
|
|
15612
|
-
const m =
|
|
15613
|
-
m ? m.focus() : (
|
|
15610
|
+
const d = l.current;
|
|
15611
|
+
if (!d) return;
|
|
15612
|
+
const m = d.querySelector(hu);
|
|
15613
|
+
m ? m.focus() : (d.tabIndex = -1, d.focus());
|
|
15614
15614
|
const h = (T) => {
|
|
15615
15615
|
if (T.key !== "Tab") return;
|
|
15616
|
-
const I = Array.from(
|
|
15616
|
+
const I = Array.from(d.querySelectorAll(hu));
|
|
15617
15617
|
if (I.length === 0) {
|
|
15618
15618
|
T.preventDefault();
|
|
15619
15619
|
return;
|
|
@@ -15623,7 +15623,7 @@ function $r({ children: e, onClose: t, closeOnOutsideClick: n = !0, triggerRef:
|
|
|
15623
15623
|
};
|
|
15624
15624
|
return window.addEventListener("keydown", h), () => window.removeEventListener("keydown", h);
|
|
15625
15625
|
}, [o, i]);
|
|
15626
|
-
const c = o ? { [Qr]: "" } : {},
|
|
15626
|
+
const c = o ? { [Qr]: "" } : {}, f = {
|
|
15627
15627
|
position: "relative",
|
|
15628
15628
|
...u ? { zIndex: u } : {}
|
|
15629
15629
|
};
|
|
@@ -15636,7 +15636,7 @@ function $r({ children: e, onClose: t, closeOnOutsideClick: n = !0, triggerRef:
|
|
|
15636
15636
|
// 对外只算包装盒 z-auto(0),被 scrim 遮罩 z500 盖住 → 点在预期位置实中遮罩 onClose =「点一下自己退」。
|
|
15637
15637
|
// 故包装盒必须保持零 stacking-context 属性(backdrop-filter/filter/transform/z-index 均禁;
|
|
15638
15638
|
// zIndex 例外见 prop 契约——需 z-index 时必须 > scrim 遮罩 500)。
|
|
15639
|
-
/* @__PURE__ */ U("div", { ref: l, "data-overlay-wrapper": !0, ...c, style: Object.keys(
|
|
15639
|
+
/* @__PURE__ */ U("div", { ref: l, "data-overlay-wrapper": !0, ...c, style: Object.keys(f).length > 1 ? f : {}, children: e }),
|
|
15640
15640
|
// E5.8#107 单一门:默认 → #overlay-root(浮层权威 surface 根);显式 rootId 优先;根缺失回退 body
|
|
15641
15641
|
(a ? document.getElementById(a) : document.getElementById(iE)) ?? document.body
|
|
15642
15642
|
);
|
|
@@ -15683,12 +15683,12 @@ function rr(e, t, n) {
|
|
|
15683
15683
|
const [r, i, u] = lE(e, t, n);
|
|
15684
15684
|
return oE(r, i, u);
|
|
15685
15685
|
}
|
|
15686
|
-
function
|
|
15686
|
+
function dE(e) {
|
|
15687
15687
|
let t = e.replace(/[^0-9a-fA-F]/g, "").slice(0, 6);
|
|
15688
15688
|
return t.length > 0 && (t = "#" + t), t;
|
|
15689
15689
|
}
|
|
15690
15690
|
function hT({ open: e, value: t, onChange: n, onClose: r, presets: i, anchor: u }) {
|
|
15691
|
-
const [a, o] = oe(() => hn(t)), [l, c] = oe(t),
|
|
15691
|
+
const [a, o] = oe(() => hn(t)), [l, c] = oe(t), f = ce(null), d = ce(null), m = ce(null), h = ce(null), T = ce(a), [I, N] = oe(null);
|
|
15692
15692
|
re(() => {
|
|
15693
15693
|
if (e) {
|
|
15694
15694
|
const A = hn(t);
|
|
@@ -15696,7 +15696,7 @@ function hT({ open: e, value: t, onChange: n, onClose: r, presets: i, anchor: u
|
|
|
15696
15696
|
}
|
|
15697
15697
|
}, [t, e]);
|
|
15698
15698
|
const k = pe((A) => {
|
|
15699
|
-
const M =
|
|
15699
|
+
const M = dE(A);
|
|
15700
15700
|
if (c(M), /^#[0-9a-fA-F]{6}$/.test(M)) {
|
|
15701
15701
|
const V = hn(M);
|
|
15702
15702
|
return T.current = V, o(V), M;
|
|
@@ -15704,13 +15704,13 @@ function hT({ open: e, value: t, onChange: n, onClose: r, presets: i, anchor: u
|
|
|
15704
15704
|
return null;
|
|
15705
15705
|
}, []), L = pe((A) => {
|
|
15706
15706
|
var W;
|
|
15707
|
-
const M = (W =
|
|
15707
|
+
const M = (W = f.current) == null ? void 0 : W.getBoundingClientRect();
|
|
15708
15708
|
if (!M) return;
|
|
15709
15709
|
const V = Math.max(0, Math.min(1, (A.clientX - M.left) / M.width)), X = Math.max(0, Math.min(1, (A.clientY - M.top) / M.height)), O = { ...T.current, s: V, v: 1 - X };
|
|
15710
15710
|
T.current = O, o(O), c(rr(O.h, O.s, O.v));
|
|
15711
15711
|
}, []), S = pe((A) => {
|
|
15712
15712
|
var O;
|
|
15713
|
-
const M = (O =
|
|
15713
|
+
const M = (O = d.current) == null ? void 0 : O.getBoundingClientRect();
|
|
15714
15714
|
if (!M) return;
|
|
15715
15715
|
const V = Math.max(0, Math.min(1, (A.clientX - M.left) / M.width)), R = { ...T.current, h: V * 360 };
|
|
15716
15716
|
T.current = R, o(R), c(rr(R.h, R.s, R.v));
|
|
@@ -15740,48 +15740,48 @@ function hT({ open: e, value: t, onChange: n, onClose: r, presets: i, anchor: u
|
|
|
15740
15740
|
{ width: window.innerWidth, height: window.innerHeight }
|
|
15741
15741
|
) : null, F = I ?? z;
|
|
15742
15742
|
return /* @__PURE__ */ se($r, { onClose: r, children: [
|
|
15743
|
-
Nr(/* @__PURE__ */ U("div", { className: "colorpicker-overlay", onClick: () => r() }), Es()),
|
|
15743
|
+
Nr(/* @__PURE__ */ U("div", { className: "ldk-colorpicker-overlay", onClick: () => r() }), Es()),
|
|
15744
15744
|
/* @__PURE__ */ se(
|
|
15745
15745
|
"div",
|
|
15746
15746
|
{
|
|
15747
15747
|
ref: m,
|
|
15748
|
-
className: "colorpicker-panel",
|
|
15748
|
+
className: "ldk-colorpicker-panel",
|
|
15749
15749
|
style: u && F ? { left: F.left, top: F.top } : void 0,
|
|
15750
15750
|
onClick: (A) => A.stopPropagation(),
|
|
15751
15751
|
children: [
|
|
15752
15752
|
/* @__PURE__ */ se(
|
|
15753
15753
|
"div",
|
|
15754
15754
|
{
|
|
15755
|
-
ref:
|
|
15756
|
-
className: "colorpicker-sv",
|
|
15755
|
+
ref: f,
|
|
15756
|
+
className: "ldk-colorpicker-sv",
|
|
15757
15757
|
style: { background: w },
|
|
15758
15758
|
onMouseDown: (A) => {
|
|
15759
15759
|
h.current = "sv", L(A);
|
|
15760
15760
|
},
|
|
15761
15761
|
children: [
|
|
15762
|
-
/* @__PURE__ */ U("div", { className: "colorpicker-sv-white" }),
|
|
15763
|
-
/* @__PURE__ */ U("div", { className: "colorpicker-sv-black" }),
|
|
15764
|
-
/* @__PURE__ */ U("div", { className: "colorpicker-sv-cursor", style: { left: q, top: C } })
|
|
15762
|
+
/* @__PURE__ */ U("div", { className: "ldk-colorpicker-sv-white" }),
|
|
15763
|
+
/* @__PURE__ */ U("div", { className: "ldk-colorpicker-sv-black" }),
|
|
15764
|
+
/* @__PURE__ */ U("div", { className: "ldk-colorpicker-sv-cursor", style: { left: q, top: C } })
|
|
15765
15765
|
]
|
|
15766
15766
|
}
|
|
15767
15767
|
),
|
|
15768
15768
|
/* @__PURE__ */ U(
|
|
15769
15769
|
"div",
|
|
15770
15770
|
{
|
|
15771
|
-
ref:
|
|
15772
|
-
className: "colorpicker-hue",
|
|
15771
|
+
ref: d,
|
|
15772
|
+
className: "ldk-colorpicker-hue",
|
|
15773
15773
|
onMouseDown: (A) => {
|
|
15774
15774
|
h.current = "hue", S(A);
|
|
15775
15775
|
},
|
|
15776
|
-
children: /* @__PURE__ */ U("div", { className: "colorpicker-hue-cursor", style: { left: H } })
|
|
15776
|
+
children: /* @__PURE__ */ U("div", { className: "ldk-colorpicker-hue-cursor", style: { left: H } })
|
|
15777
15777
|
}
|
|
15778
15778
|
),
|
|
15779
|
-
/* @__PURE__ */ se("div", { className: "colorpicker-footer", children: [
|
|
15780
|
-
/* @__PURE__ */ U("div", { className: "colorpicker-preview", style: { background: l } }),
|
|
15779
|
+
/* @__PURE__ */ se("div", { className: "ldk-colorpicker-footer", children: [
|
|
15780
|
+
/* @__PURE__ */ U("div", { className: "ldk-colorpicker-preview", style: { background: l } }),
|
|
15781
15781
|
/* @__PURE__ */ U(
|
|
15782
15782
|
"input",
|
|
15783
15783
|
{
|
|
15784
|
-
className: "colorpicker-hex",
|
|
15784
|
+
className: "ldk-colorpicker-hex",
|
|
15785
15785
|
type: "text",
|
|
15786
15786
|
value: l,
|
|
15787
15787
|
onChange: (A) => {
|
|
@@ -15797,14 +15797,14 @@ function hT({ open: e, value: t, onChange: n, onClose: r, presets: i, anchor: u
|
|
|
15797
15797
|
spellCheck: !1
|
|
15798
15798
|
}
|
|
15799
15799
|
),
|
|
15800
|
-
/* @__PURE__ */ U("button", { className: "colorpicker-ok", onClick: () => {
|
|
15800
|
+
/* @__PURE__ */ U("button", { className: "ldk-colorpicker-ok", onClick: () => {
|
|
15801
15801
|
n(l), r();
|
|
15802
15802
|
}, children: "OK" })
|
|
15803
15803
|
] }),
|
|
15804
|
-
i && i.length > 0 && /* @__PURE__ */ U("div", { className: "colorpicker-presets", children: i.map((A) => /* @__PURE__ */ U(
|
|
15804
|
+
i && i.length > 0 && /* @__PURE__ */ U("div", { className: "ldk-colorpicker-presets", children: i.map((A) => /* @__PURE__ */ U(
|
|
15805
15805
|
"div",
|
|
15806
15806
|
{
|
|
15807
|
-
className: "colorpicker-preset",
|
|
15807
|
+
className: "ldk-colorpicker-preset",
|
|
15808
15808
|
style: { background: A },
|
|
15809
15809
|
title: A,
|
|
15810
15810
|
onClick: () => {
|
|
@@ -15819,20 +15819,20 @@ function hT({ open: e, value: t, onChange: n, onClose: r, presets: i, anchor: u
|
|
|
15819
15819
|
)
|
|
15820
15820
|
] });
|
|
15821
15821
|
}
|
|
15822
|
-
const
|
|
15822
|
+
const fE = { left: 0, top: 0, width: 100, maxWidth: 300 };
|
|
15823
15823
|
function Ts({ containerRef: e, onClose: t, onKeyDown: n, listRef: r, search: i, children: u }) {
|
|
15824
|
-
const [a, o] = oe(
|
|
15825
|
-
var
|
|
15826
|
-
const c = (
|
|
15824
|
+
const [a, o] = oe(fE), l = pe(() => {
|
|
15825
|
+
var d;
|
|
15826
|
+
const c = (d = e.current) == null ? void 0 : d.getBoundingClientRect();
|
|
15827
15827
|
if (!c) return;
|
|
15828
|
-
const
|
|
15828
|
+
const f = {
|
|
15829
15829
|
left: Math.round(c.left),
|
|
15830
15830
|
top: Math.round(c.bottom) + 2,
|
|
15831
15831
|
width: Math.round(c.width),
|
|
15832
15832
|
maxWidth: Math.round(window.innerWidth - c.left - 24)
|
|
15833
15833
|
};
|
|
15834
15834
|
o(
|
|
15835
|
-
(m) => m.left ===
|
|
15835
|
+
(m) => m.left === f.left && m.top === f.top && m.width === f.width && m.maxWidth === f.maxWidth ? m : f
|
|
15836
15836
|
);
|
|
15837
15837
|
}, [e]);
|
|
15838
15838
|
return Ir(() => (l(), window.addEventListener("resize", l), window.addEventListener("scroll", l, !0), () => {
|
|
@@ -15860,7 +15860,7 @@ function Ts({ containerRef: e, onClose: t, onKeyDown: n, listRef: r, search: i,
|
|
|
15860
15860
|
) });
|
|
15861
15861
|
}
|
|
15862
15862
|
function mT({ value: e, options: t, onChange: n, disabled: r, placeholder: i, title: u, className: a, onOpen: o, inputMode: l = "text" }) {
|
|
15863
|
-
const { t: c } =
|
|
15863
|
+
const { t: c } = dt(), [f, d] = oe(!1), [m, h] = oe(e), [T, I] = oe(-1), N = ce(null), k = ce(null), L = ce(!1);
|
|
15864
15864
|
re(() => {
|
|
15865
15865
|
L.current || h(e);
|
|
15866
15866
|
}, [e]);
|
|
@@ -15872,44 +15872,44 @@ function mT({ value: e, options: t, onChange: n, disabled: r, placeholder: i, ti
|
|
|
15872
15872
|
re(() => {
|
|
15873
15873
|
T >= w.length && I(Math.max(0, w.length - 1));
|
|
15874
15874
|
}, [w.length, T]), re(() => {
|
|
15875
|
-
if (!
|
|
15875
|
+
if (!f) return;
|
|
15876
15876
|
o == null || o();
|
|
15877
15877
|
const H = w.findIndex((z) => z === e);
|
|
15878
15878
|
I(H >= 0 ? H : 0);
|
|
15879
|
-
}, [
|
|
15880
|
-
if (!
|
|
15879
|
+
}, [f]), re(() => {
|
|
15880
|
+
if (!f || !k.current) return;
|
|
15881
15881
|
const H = k.current.children[T];
|
|
15882
15882
|
H == null || H.scrollIntoView({ block: "nearest" });
|
|
15883
|
-
}, [T,
|
|
15883
|
+
}, [T, f]);
|
|
15884
15884
|
const q = pe(
|
|
15885
15885
|
(H) => {
|
|
15886
15886
|
const z = H.trim();
|
|
15887
|
-
|
|
15887
|
+
d(!1), z && (h(z), z !== e && n(z));
|
|
15888
15888
|
},
|
|
15889
15889
|
[e, n]
|
|
15890
15890
|
), C = pe(
|
|
15891
15891
|
(H) => {
|
|
15892
15892
|
switch (H.key) {
|
|
15893
15893
|
case "ArrowDown":
|
|
15894
|
-
H.preventDefault(),
|
|
15894
|
+
H.preventDefault(), d(!0), I((z) => Math.min(z + 1, w.length - 1));
|
|
15895
15895
|
break;
|
|
15896
15896
|
case "ArrowUp":
|
|
15897
|
-
H.preventDefault(),
|
|
15897
|
+
H.preventDefault(), d(!0), I((z) => Math.max(z - 1, 0));
|
|
15898
15898
|
break;
|
|
15899
15899
|
case "Enter":
|
|
15900
|
-
H.preventDefault(),
|
|
15900
|
+
H.preventDefault(), f && w[T] ? q(w[T]) : q(m);
|
|
15901
15901
|
break;
|
|
15902
15902
|
case "Escape":
|
|
15903
|
-
H.preventDefault(), h(e),
|
|
15903
|
+
H.preventDefault(), h(e), d(!1);
|
|
15904
15904
|
break;
|
|
15905
15905
|
}
|
|
15906
15906
|
},
|
|
15907
|
-
[
|
|
15907
|
+
[f, w, T, q, m, e]
|
|
15908
15908
|
);
|
|
15909
15909
|
return /* @__PURE__ */ se(
|
|
15910
15910
|
"div",
|
|
15911
15911
|
{
|
|
15912
|
-
className: `ldk-combobox ${
|
|
15912
|
+
className: `ldk-combobox ${f ? "ldk-selectbox-open" : ""} ${r ? "ldk-selectbox-disabled" : ""} ${a ?? ""}`,
|
|
15913
15913
|
ref: N,
|
|
15914
15914
|
children: [
|
|
15915
15915
|
/* @__PURE__ */ se("div", { className: "ldk-combobox-field", children: [
|
|
@@ -15925,24 +15925,24 @@ function mT({ value: e, options: t, onChange: n, disabled: r, placeholder: i, ti
|
|
|
15925
15925
|
placeholder: i,
|
|
15926
15926
|
disabled: r,
|
|
15927
15927
|
onFocus: () => {
|
|
15928
|
-
L.current = !0,
|
|
15928
|
+
L.current = !0, d(!0);
|
|
15929
15929
|
},
|
|
15930
15930
|
onBlur: () => {
|
|
15931
15931
|
L.current = !1, q(m);
|
|
15932
15932
|
},
|
|
15933
15933
|
onChange: (H) => {
|
|
15934
|
-
h(H.target.value),
|
|
15934
|
+
h(H.target.value), d(!0), I(-1);
|
|
15935
15935
|
},
|
|
15936
15936
|
onKeyDown: C
|
|
15937
15937
|
}
|
|
15938
15938
|
),
|
|
15939
|
-
/* @__PURE__ */ U("span", { className: `codicon codicon-chevron-down ldk-selectbox-arrow ${
|
|
15939
|
+
/* @__PURE__ */ U("span", { className: `codicon codicon-chevron-down ldk-selectbox-arrow ${f ? "ldk-selectbox-arrow-up" : ""}` })
|
|
15940
15940
|
] }),
|
|
15941
|
-
|
|
15941
|
+
f && /* @__PURE__ */ U(
|
|
15942
15942
|
Ts,
|
|
15943
15943
|
{
|
|
15944
15944
|
containerRef: N,
|
|
15945
|
-
onClose: () =>
|
|
15945
|
+
onClose: () => d(!1),
|
|
15946
15946
|
listRef: k,
|
|
15947
15947
|
children: w.length === 0 ? /* @__PURE__ */ U("li", { className: "ldk-selectbox-empty", children: c("无匹配项") }) : w.map((H, z) => /* @__PURE__ */ U(
|
|
15948
15948
|
"li",
|
|
@@ -15981,14 +15981,14 @@ function bs(e, t) {
|
|
|
15981
15981
|
});
|
|
15982
15982
|
}
|
|
15983
15983
|
function pT({ menuId: e, anchor: t, context: n, onClose: r, resolveChildren: i, items: u, variant: a }) {
|
|
15984
|
-
const o = ce(null), l = ce(/* @__PURE__ */ new Map()), c = ce(null), [
|
|
15984
|
+
const o = ce(null), l = ce(/* @__PURE__ */ new Map()), c = ce(null), [f, d] = oe([]), m = ve(() => JSON.stringify(n ?? {}), [n]);
|
|
15985
15985
|
re(() => {
|
|
15986
15986
|
var O, W;
|
|
15987
15987
|
let R = !1;
|
|
15988
|
-
return u ? (
|
|
15988
|
+
return u ? (d(u), () => {
|
|
15989
15989
|
R = !0;
|
|
15990
15990
|
}) : ((W = (O = ir().menu) == null ? void 0 : O.getItems) == null || W.call(O, e, n).then((j) => {
|
|
15991
|
-
!R && j &&
|
|
15991
|
+
!R && j && d(j);
|
|
15992
15992
|
}).catch(() => {
|
|
15993
15993
|
}), () => {
|
|
15994
15994
|
R = !0;
|
|
@@ -15996,7 +15996,7 @@ function pT({ menuId: e, anchor: t, context: n, onClose: r, resolveChildren: i,
|
|
|
15996
15996
|
}, [e, m, u]);
|
|
15997
15997
|
const h = ve(() => {
|
|
15998
15998
|
const R = /* @__PURE__ */ new Map(), O = [];
|
|
15999
|
-
for (const j of
|
|
15999
|
+
for (const j of f) {
|
|
16000
16000
|
const Z = j.children;
|
|
16001
16001
|
if (!j.command && !Z) continue;
|
|
16002
16002
|
const Q = j.group ?? "__default";
|
|
@@ -16025,7 +16025,7 @@ function pT({ menuId: e, anchor: t, context: n, onClose: r, resolveChildren: i,
|
|
|
16025
16025
|
for (let j = 0; j < O.length; j++)
|
|
16026
16026
|
j > 0 && W.push({ type: "divider", group: O[j] }), W.push(...R.get(O[j]));
|
|
16027
16027
|
return W;
|
|
16028
|
-
}, [
|
|
16028
|
+
}, [f, n, i]), [T, I] = oe([]), N = pe(() => {
|
|
16029
16029
|
c.current && (clearTimeout(c.current), c.current = null);
|
|
16030
16030
|
}, []), k = pe((R) => {
|
|
16031
16031
|
c.current && (clearTimeout(c.current), c.current = null), c.current = setTimeout(() => I((O) => O.slice(0, R)), 150);
|
|
@@ -16115,7 +16115,7 @@ function pT({ menuId: e, anchor: t, context: n, onClose: r, resolveChildren: i,
|
|
|
16115
16115
|
"div",
|
|
16116
16116
|
{
|
|
16117
16117
|
ref: o,
|
|
16118
|
-
className: "ctx-menu",
|
|
16118
|
+
className: "ldk-ctx-menu",
|
|
16119
16119
|
tabIndex: -1,
|
|
16120
16120
|
style: {
|
|
16121
16121
|
left: S.left,
|
|
@@ -16124,7 +16124,7 @@ function pT({ menuId: e, anchor: t, context: n, onClose: r, resolveChildren: i,
|
|
|
16124
16124
|
visibility: q ? void 0 : "hidden"
|
|
16125
16125
|
},
|
|
16126
16126
|
children: h.map((R, O) => {
|
|
16127
|
-
if ("type" in R) return /* @__PURE__ */ U("div", { className: "ctx-divider" }, `div-${O}`);
|
|
16127
|
+
if ("type" in R) return /* @__PURE__ */ U("div", { className: "ldk-ctx-divider" }, `div-${O}`);
|
|
16128
16128
|
const W = X++, j = !!(R.children && R.children.length > 0), Z = W === z, Q = R.group === "delete";
|
|
16129
16129
|
return (
|
|
16130
16130
|
// E5.8#37.7.1:复合 key——共享命令 id 的动态项(面板视图清单全用同一 toggle 命令)会撞 key;
|
|
@@ -16135,7 +16135,7 @@ function pT({ menuId: e, anchor: t, context: n, onClose: r, resolveChildren: i,
|
|
|
16135
16135
|
ref: (g) => {
|
|
16136
16136
|
g ? A.current.set(W, g) : A.current.delete(W);
|
|
16137
16137
|
},
|
|
16138
|
-
className: `ctx-item${Z ? " focused" : ""}${Q ? " ctx-item-danger" : ""}`,
|
|
16138
|
+
className: `ldk-ctx-item${Z ? " focused" : ""}${Q ? " ldk-ctx-item-danger" : ""}`,
|
|
16139
16139
|
onClick: (g) => {
|
|
16140
16140
|
g.stopPropagation(), j || V(R);
|
|
16141
16141
|
},
|
|
@@ -16146,10 +16146,10 @@ function pT({ menuId: e, anchor: t, context: n, onClose: r, resolveChildren: i,
|
|
|
16146
16146
|
j && k(1);
|
|
16147
16147
|
},
|
|
16148
16148
|
children: [
|
|
16149
|
-
/* @__PURE__ */ U("span", { className: "ctx-item-check", "aria-hidden": "true", children: R.checked ? "✓" : "" }),
|
|
16150
|
-
/* @__PURE__ */ U("span", { className: "ctx-item-label", children: R.label }),
|
|
16149
|
+
/* @__PURE__ */ U("span", { className: "ldk-ctx-item-check", "aria-hidden": "true", children: R.checked ? "✓" : "" }),
|
|
16150
|
+
/* @__PURE__ */ U("span", { className: "ldk-ctx-item-label", children: R.label }),
|
|
16151
16151
|
j && /* @__PURE__ */ U("span", { className: "ctx-item-chevron", children: "›" }),
|
|
16152
|
-
R.shortcut && /* @__PURE__ */ U("span", { className: "ctx-item-shortcut", children: R.shortcut })
|
|
16152
|
+
R.shortcut && /* @__PURE__ */ U("span", { className: "ldk-ctx-item-shortcut", children: R.shortcut })
|
|
16153
16153
|
]
|
|
16154
16154
|
},
|
|
16155
16155
|
`${R.id}::${O}`
|
|
@@ -16164,7 +16164,7 @@ function pT({ menuId: e, anchor: t, context: n, onClose: r, resolveChildren: i,
|
|
|
16164
16164
|
ref: (W) => {
|
|
16165
16165
|
W ? l.current.set(O, W) : l.current.delete(O);
|
|
16166
16166
|
},
|
|
16167
|
-
className: "ctx-menu show",
|
|
16167
|
+
className: "ldk-ctx-menu show",
|
|
16168
16168
|
style: { left: R.x, top: R.y, zIndex: mn },
|
|
16169
16169
|
onMouseEnter: N,
|
|
16170
16170
|
onMouseLeave: () => k(O + 1),
|
|
@@ -16173,7 +16173,7 @@ function pT({ menuId: e, anchor: t, context: n, onClose: r, resolveChildren: i,
|
|
|
16173
16173
|
return /* @__PURE__ */ se(
|
|
16174
16174
|
"div",
|
|
16175
16175
|
{
|
|
16176
|
-
className: "ctx-item",
|
|
16176
|
+
className: "ldk-ctx-item",
|
|
16177
16177
|
onClick: (Q) => {
|
|
16178
16178
|
Q.stopPropagation(), Z || V(W);
|
|
16179
16179
|
},
|
|
@@ -16184,10 +16184,10 @@ function pT({ menuId: e, anchor: t, context: n, onClose: r, resolveChildren: i,
|
|
|
16184
16184
|
Z && k(O + 2);
|
|
16185
16185
|
},
|
|
16186
16186
|
children: [
|
|
16187
|
-
/* @__PURE__ */ U("span", { className: "ctx-item-check", "aria-hidden": "true", children: W.checked ? "✓" : "" }),
|
|
16188
|
-
/* @__PURE__ */ U("span", { className: "ctx-item-label", children: W.label }),
|
|
16187
|
+
/* @__PURE__ */ U("span", { className: "ldk-ctx-item-check", "aria-hidden": "true", children: W.checked ? "✓" : "" }),
|
|
16188
|
+
/* @__PURE__ */ U("span", { className: "ldk-ctx-item-label", children: W.label }),
|
|
16189
16189
|
Z && /* @__PURE__ */ U("span", { className: "ctx-item-chevron", children: "›" }),
|
|
16190
|
-
W.shortcut && /* @__PURE__ */ U("span", { className: "ctx-item-shortcut", children: W.shortcut })
|
|
16190
|
+
W.shortcut && /* @__PURE__ */ U("span", { className: "ldk-ctx-item-shortcut", children: W.shortcut })
|
|
16191
16191
|
]
|
|
16192
16192
|
},
|
|
16193
16193
|
`${W.id}::${j}`
|
|
@@ -16202,14 +16202,14 @@ function hE(e) {
|
|
|
16202
16202
|
return typeof e == "object" && "value" in e && "label" in e;
|
|
16203
16203
|
}
|
|
16204
16204
|
function gs({ value: e, options: t, onChange: n, disabled: r, placeholder: i, title: u, className: a, onOpen: o }) {
|
|
16205
|
-
const { t: l } =
|
|
16205
|
+
const { t: l } = dt(), [c, f] = oe(!1), [d, m] = oe(""), [h, T] = oe(-1), I = ce(null), N = ce(null), k = ce(null), L = ve(
|
|
16206
16206
|
() => t.map((F) => hE(F) ? F : { value: F, label: F }),
|
|
16207
16207
|
[t]
|
|
16208
16208
|
), S = ve(() => {
|
|
16209
|
-
if (!
|
|
16210
|
-
const F =
|
|
16209
|
+
if (!d) return L;
|
|
16210
|
+
const F = d.toLowerCase();
|
|
16211
16211
|
return L.filter((A) => A.label.toLowerCase().includes(F));
|
|
16212
|
-
}, [L,
|
|
16212
|
+
}, [L, d]), w = ve(() => L.find((F) => F.value === e), [L, e]), q = ve(() => w ? w.label : e !== "" ? e : i ?? e, [w, e, i]);
|
|
16213
16213
|
re(() => {
|
|
16214
16214
|
h >= S.length && T(Math.max(0, S.length - 1));
|
|
16215
16215
|
}, [S.length, h]), re(() => {
|
|
@@ -16224,7 +16224,7 @@ function gs({ value: e, options: t, onChange: n, disabled: r, placeholder: i, ti
|
|
|
16224
16224
|
}, [c]);
|
|
16225
16225
|
const C = pe(
|
|
16226
16226
|
(F) => {
|
|
16227
|
-
n(F),
|
|
16227
|
+
n(F), f(!1);
|
|
16228
16228
|
},
|
|
16229
16229
|
[n]
|
|
16230
16230
|
), H = pe(
|
|
@@ -16262,7 +16262,7 @@ function gs({ value: e, options: t, onChange: n, disabled: r, placeholder: i, ti
|
|
|
16262
16262
|
className: "ldk-selectbox-trigger",
|
|
16263
16263
|
disabled: r,
|
|
16264
16264
|
title: u,
|
|
16265
|
-
onClick: () =>
|
|
16265
|
+
onClick: () => f((F) => !F),
|
|
16266
16266
|
children: [
|
|
16267
16267
|
/* @__PURE__ */ se("span", { className: "ldk-selectbox-label", children: [
|
|
16268
16268
|
(w == null ? void 0 : w.preview) && /* @__PURE__ */ U("span", { className: "ldk-selectbox-swatch", style: { background: w.preview } }),
|
|
@@ -16276,7 +16276,7 @@ function gs({ value: e, options: t, onChange: n, disabled: r, placeholder: i, ti
|
|
|
16276
16276
|
Ts,
|
|
16277
16277
|
{
|
|
16278
16278
|
containerRef: I,
|
|
16279
|
-
onClose: () =>
|
|
16279
|
+
onClose: () => f(!1),
|
|
16280
16280
|
onKeyDown: H,
|
|
16281
16281
|
listRef: k,
|
|
16282
16282
|
search: z ? /* @__PURE__ */ U("div", { className: "ldk-selectbox-search", children: /* @__PURE__ */ U(
|
|
@@ -16286,7 +16286,7 @@ function gs({ value: e, options: t, onChange: n, disabled: r, placeholder: i, ti
|
|
|
16286
16286
|
type: "text",
|
|
16287
16287
|
className: "ldk-selectbox-search-input",
|
|
16288
16288
|
placeholder: l("筛选..."),
|
|
16289
|
-
value:
|
|
16289
|
+
value: d,
|
|
16290
16290
|
onChange: (F) => {
|
|
16291
16291
|
m(F.target.value), T(0);
|
|
16292
16292
|
}
|
|
@@ -16313,10 +16313,10 @@ function gs({ value: e, options: t, onChange: n, disabled: r, placeholder: i, ti
|
|
|
16313
16313
|
}
|
|
16314
16314
|
const Tu = "followTheme", ur = [];
|
|
16315
16315
|
function ET({ value: e, onChange: t, optionsFrom: n, domain: r, disabled: i, placeholder: u, title: a }) {
|
|
16316
|
-
const { t: o } =
|
|
16316
|
+
const { t: o } = dt(), [l, c] = oe(ur), f = n === "theme.colorways" && r === "colors", [d, m] = oe(void 0);
|
|
16317
16317
|
re(() => {
|
|
16318
16318
|
var k, L, S, w, q;
|
|
16319
|
-
if (!
|
|
16319
|
+
if (!f) return;
|
|
16320
16320
|
let I = !1;
|
|
16321
16321
|
(L = (k = window.linkdesk) == null ? void 0 : k.configuration) == null || L.get("app.appearanceMode").then((C) => {
|
|
16322
16322
|
I || m(C);
|
|
@@ -16325,8 +16325,8 @@ function ET({ value: e, onChange: t, optionsFrom: n, domain: r, disabled: i, pla
|
|
|
16325
16325
|
return () => {
|
|
16326
16326
|
I = !0, N == null || N();
|
|
16327
16327
|
};
|
|
16328
|
-
}, [
|
|
16329
|
-
const h =
|
|
16328
|
+
}, [f]);
|
|
16329
|
+
const h = f && d === "custom", T = pe(async () => {
|
|
16330
16330
|
var N, k, L, S;
|
|
16331
16331
|
const I = (k = (N = window.linkdesk) == null ? void 0 : N.theme) == null ? void 0 : k.listRecipes;
|
|
16332
16332
|
if (I)
|
|
@@ -16378,7 +16378,7 @@ function ET({ value: e, onChange: t, optionsFrom: n, domain: r, disabled: i, pla
|
|
|
16378
16378
|
return () => {
|
|
16379
16379
|
I == null || I(), N == null || N();
|
|
16380
16380
|
};
|
|
16381
|
-
}, [T, n]),
|
|
16381
|
+
}, [T, n]), f && !h && l.length === 1 ? null : /* @__PURE__ */ U(
|
|
16382
16382
|
gs,
|
|
16383
16383
|
{
|
|
16384
16384
|
value: e,
|
|
@@ -16394,7 +16394,7 @@ function ET({ value: e, onChange: t, optionsFrom: n, domain: r, disabled: i, pla
|
|
|
16394
16394
|
);
|
|
16395
16395
|
}
|
|
16396
16396
|
function TT({ value: e, onChange: t, dialogType: n }) {
|
|
16397
|
-
const { t: r } =
|
|
16397
|
+
const { t: r } = dt(), i = async () => {
|
|
16398
16398
|
var o;
|
|
16399
16399
|
const u = (o = window.linkdesk) == null ? void 0 : o.dialog;
|
|
16400
16400
|
if (!u) return;
|
|
@@ -16492,7 +16492,7 @@ function EE(e) {
|
|
|
16492
16492
|
if ("queryLocalFonts" in window)
|
|
16493
16493
|
try {
|
|
16494
16494
|
const l = await ((o = window.queryLocalFonts) == null ? void 0 : o.call(window));
|
|
16495
|
-
r || (u = (l ?? []).map((c) => c.family).filter((c,
|
|
16495
|
+
r || (u = (l ?? []).map((c) => c.family).filter((c, f, d) => d.indexOf(c) === f));
|
|
16496
16496
|
} catch {
|
|
16497
16497
|
}
|
|
16498
16498
|
u.length === 0 && (u = e ? _s : mE);
|
|
@@ -16505,7 +16505,7 @@ function EE(e) {
|
|
|
16505
16505
|
}, [e]), t;
|
|
16506
16506
|
}
|
|
16507
16507
|
function bT({ value: e, onChange: t, monoOnly: n = !0 }) {
|
|
16508
|
-
const { t: r } =
|
|
16508
|
+
const { t: r } = dt(), i = EE(n), u = ve(() => n ? i.map((a) => ({ value: a, label: a })) : [
|
|
16509
16509
|
{ value: "", label: r("跟随主题") },
|
|
16510
16510
|
{ value: "__none__", label: r("系统字体") },
|
|
16511
16511
|
...i.map((a) => ({ value: a, label: a }))
|
|
@@ -16521,26 +16521,26 @@ function bT({ value: e, onChange: t, monoOnly: n = !0 }) {
|
|
|
16521
16521
|
);
|
|
16522
16522
|
}
|
|
16523
16523
|
function gT({ label: e, children: t }) {
|
|
16524
|
-
return /* @__PURE__ */ se("div", { className: "form-row", children: [
|
|
16524
|
+
return /* @__PURE__ */ se("div", { className: "ldk-form-row", children: [
|
|
16525
16525
|
/* @__PURE__ */ U("label", { children: e }),
|
|
16526
16526
|
t
|
|
16527
16527
|
] });
|
|
16528
16528
|
}
|
|
16529
16529
|
function _T({ value: e, onChange: t, min: n, max: r, step: i = 1, unit: u, style: a }) {
|
|
16530
|
-
const { t: o } =
|
|
16530
|
+
const { t: o } = dt(), l = pe(
|
|
16531
16531
|
(h) => {
|
|
16532
16532
|
let T = h;
|
|
16533
16533
|
return n !== void 0 && (T = Math.max(n, T)), r !== void 0 && (T = Math.min(r, T)), T;
|
|
16534
16534
|
},
|
|
16535
16535
|
[n, r]
|
|
16536
|
-
), c = () => t(l(e - i)),
|
|
16537
|
-
return /* @__PURE__ */ se("div", { className: "number-input", style: a, children: [
|
|
16536
|
+
), c = () => t(l(e - i)), f = () => t(l(e + i)), d = n !== void 0 && e <= n, m = r !== void 0 && e >= r;
|
|
16537
|
+
return /* @__PURE__ */ se("div", { className: "ldk-number-input", style: a, children: [
|
|
16538
16538
|
/* @__PURE__ */ U(
|
|
16539
16539
|
"button",
|
|
16540
16540
|
{
|
|
16541
|
-
className: "number-input-btn",
|
|
16541
|
+
className: "ldk-number-input-btn",
|
|
16542
16542
|
onClick: c,
|
|
16543
|
-
disabled:
|
|
16543
|
+
disabled: d,
|
|
16544
16544
|
tabIndex: -1,
|
|
16545
16545
|
"aria-label": o("减少"),
|
|
16546
16546
|
children: "−"
|
|
@@ -16549,7 +16549,7 @@ function _T({ value: e, onChange: t, min: n, max: r, step: i = 1, unit: u, style
|
|
|
16549
16549
|
/* @__PURE__ */ U(
|
|
16550
16550
|
"input",
|
|
16551
16551
|
{
|
|
16552
|
-
className: "ldk-input number-input-field",
|
|
16552
|
+
className: "ldk-input ldk-number-input-field",
|
|
16553
16553
|
type: "text",
|
|
16554
16554
|
value: e,
|
|
16555
16555
|
onChange: (h) => {
|
|
@@ -16559,12 +16559,12 @@ function _T({ value: e, onChange: t, min: n, max: r, step: i = 1, unit: u, style
|
|
|
16559
16559
|
style: { width: 56, textAlign: "center" }
|
|
16560
16560
|
}
|
|
16561
16561
|
),
|
|
16562
|
-
u ? /* @__PURE__ */ U("span", { className: "number-input-unit", children: u }) : null,
|
|
16562
|
+
u ? /* @__PURE__ */ U("span", { className: "ldk-number-input-unit", children: u }) : null,
|
|
16563
16563
|
/* @__PURE__ */ U(
|
|
16564
16564
|
"button",
|
|
16565
16565
|
{
|
|
16566
|
-
className: "number-input-btn",
|
|
16567
|
-
onClick:
|
|
16566
|
+
className: "ldk-number-input-btn",
|
|
16567
|
+
onClick: f,
|
|
16568
16568
|
disabled: m,
|
|
16569
16569
|
tabIndex: -1,
|
|
16570
16570
|
"aria-label": o("增加"),
|
|
@@ -16575,13 +16575,13 @@ function _T({ value: e, onChange: t, min: n, max: r, step: i = 1, unit: u, style
|
|
|
16575
16575
|
}
|
|
16576
16576
|
function AT({ options: e, value: t, onChange: n, ariaLabel: r }) {
|
|
16577
16577
|
const i = ce([]), u = (a, o) => {
|
|
16578
|
-
var
|
|
16578
|
+
var f;
|
|
16579
16579
|
if (!["ArrowRight", "ArrowLeft", "ArrowUp", "ArrowDown"].includes(a.key)) return;
|
|
16580
16580
|
a.preventDefault();
|
|
16581
16581
|
const l = a.key === "ArrowRight" || a.key === "ArrowDown" ? 1 : -1, c = (o + l + e.length) % e.length;
|
|
16582
|
-
(
|
|
16582
|
+
(f = i.current[c]) == null || f.focus(), n(e[c].value);
|
|
16583
16583
|
};
|
|
16584
|
-
return /* @__PURE__ */ U("div", { className: "segmented-radio", role: "radiogroup", "aria-label": r, children: e.map((a, o) => {
|
|
16584
|
+
return /* @__PURE__ */ U("div", { className: "ldk-segmented-radio", role: "radiogroup", "aria-label": r, children: e.map((a, o) => {
|
|
16585
16585
|
const l = t === a.value;
|
|
16586
16586
|
return /* @__PURE__ */ se(
|
|
16587
16587
|
"button",
|
|
@@ -16593,13 +16593,13 @@ function AT({ options: e, value: t, onChange: n, ariaLabel: r }) {
|
|
|
16593
16593
|
role: "radio",
|
|
16594
16594
|
"aria-checked": l,
|
|
16595
16595
|
tabIndex: l ? 0 : -1,
|
|
16596
|
-
className: `segmented-radio__option${l ? " is-selected" : ""}`,
|
|
16596
|
+
className: `ldk-segmented-radio__option${l ? " is-selected" : ""}`,
|
|
16597
16597
|
title: a.title ?? a.label,
|
|
16598
16598
|
onClick: () => n(a.value),
|
|
16599
16599
|
onKeyDown: (c) => u(c, o),
|
|
16600
16600
|
children: [
|
|
16601
16601
|
a.preview,
|
|
16602
|
-
/* @__PURE__ */ U("span", { className: "segmented-radio__label", children: a.label })
|
|
16602
|
+
/* @__PURE__ */ U("span", { className: "ldk-segmented-radio__label", children: a.label })
|
|
16603
16603
|
]
|
|
16604
16604
|
},
|
|
16605
16605
|
a.value
|
|
@@ -16607,7 +16607,7 @@ function AT({ options: e, value: t, onChange: n, ariaLabel: r }) {
|
|
|
16607
16607
|
}) });
|
|
16608
16608
|
}
|
|
16609
16609
|
function kT({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, ariaLabel: u, disabled: a, style: o }) {
|
|
16610
|
-
const l = (
|
|
16610
|
+
const l = (f) => Math.min(r, Math.max(n, f)), c = r > n ? (l(e) - n) / (r - n) * 100 : 0;
|
|
16611
16611
|
return /* @__PURE__ */ U(
|
|
16612
16612
|
"input",
|
|
16613
16613
|
{
|
|
@@ -16619,7 +16619,7 @@ function kT({ value: e, onChange: t, min: n = 0, max: r = 100, step: i = 1, aria
|
|
|
16619
16619
|
step: i,
|
|
16620
16620
|
disabled: a,
|
|
16621
16621
|
"aria-label": u,
|
|
16622
|
-
onChange: (
|
|
16622
|
+
onChange: (f) => t(Number(f.target.value)),
|
|
16623
16623
|
style: { ...o, "--slider-pct": `${c}%` }
|
|
16624
16624
|
}
|
|
16625
16625
|
);
|
|
@@ -16635,15 +16635,15 @@ function CT({
|
|
|
16635
16635
|
urlOnly: o,
|
|
16636
16636
|
emptyMessage: l,
|
|
16637
16637
|
badUrlMessage: c,
|
|
16638
|
-
duplicateMessage:
|
|
16639
|
-
itemKey:
|
|
16638
|
+
duplicateMessage: f,
|
|
16639
|
+
itemKey: d,
|
|
16640
16640
|
hint: m
|
|
16641
16641
|
}) {
|
|
16642
16642
|
const [h, T] = oe(""), [I, N] = oe(null), k = () => N(null), L = (w) => {
|
|
16643
16643
|
const q = (C) => {
|
|
16644
|
-
if (!
|
|
16645
|
-
const H =
|
|
16646
|
-
return H === null ? C === w :
|
|
16644
|
+
if (!d) return C === w;
|
|
16645
|
+
const H = d(w);
|
|
16646
|
+
return H === null ? C === w : d(C) === H;
|
|
16647
16647
|
};
|
|
16648
16648
|
return n.some(q) || e.some(q);
|
|
16649
16649
|
}, S = () => {
|
|
@@ -16657,7 +16657,7 @@ function CT({
|
|
|
16657
16657
|
return;
|
|
16658
16658
|
}
|
|
16659
16659
|
if (L(w)) {
|
|
16660
|
-
|
|
16660
|
+
f && N(f);
|
|
16661
16661
|
return;
|
|
16662
16662
|
}
|
|
16663
16663
|
t([...e, w]), T(""), k();
|
|
@@ -16708,34 +16708,34 @@ function CT({
|
|
|
16708
16708
|
}
|
|
16709
16709
|
const TE = 6, bE = "color-mix(in srgb, var(--text-secondary) 45%, transparent)";
|
|
16710
16710
|
function IT({ value: e, onChange: t }) {
|
|
16711
|
-
const { t: n } =
|
|
16711
|
+
const { t: n } = dt(), [r, i] = oe([]), [u, a] = oe(0), o = ce([]), l = pe((f) => {
|
|
16712
16712
|
var m, h;
|
|
16713
|
-
const
|
|
16714
|
-
|
|
16715
|
-
|
|
16713
|
+
const d = (h = (m = window.linkdesk) == null ? void 0 : m.theme) == null ? void 0 : h.listRecipes;
|
|
16714
|
+
d && d().then((T) => {
|
|
16715
|
+
f && !f() || i(T ?? []);
|
|
16716
16716
|
}).catch(() => {
|
|
16717
16717
|
});
|
|
16718
16718
|
}, []);
|
|
16719
16719
|
re(() => {
|
|
16720
16720
|
var h, T, I;
|
|
16721
|
-
let
|
|
16722
|
-
l(() => !
|
|
16721
|
+
let f = !1;
|
|
16722
|
+
l(() => !f);
|
|
16723
16723
|
const m = (I = (T = (h = window.linkdesk) == null ? void 0 : h.configuration) == null ? void 0 : T.onPluginLifecycleChange) == null ? void 0 : I.call(T, () => {
|
|
16724
16724
|
l();
|
|
16725
16725
|
});
|
|
16726
16726
|
return () => {
|
|
16727
|
-
|
|
16727
|
+
f = !0, m == null || m();
|
|
16728
16728
|
};
|
|
16729
16729
|
}, [l]);
|
|
16730
|
-
const c = (
|
|
16730
|
+
const c = (f) => {
|
|
16731
16731
|
var h;
|
|
16732
|
-
const
|
|
16733
|
-
if (
|
|
16732
|
+
const d = r.length;
|
|
16733
|
+
if (d === 0) return;
|
|
16734
16734
|
let m = u;
|
|
16735
|
-
switch (
|
|
16735
|
+
switch (f.key) {
|
|
16736
16736
|
case "ArrowRight":
|
|
16737
16737
|
case "ArrowDown":
|
|
16738
|
-
m = Math.min(u + 1,
|
|
16738
|
+
m = Math.min(u + 1, d - 1);
|
|
16739
16739
|
break;
|
|
16740
16740
|
case "ArrowLeft":
|
|
16741
16741
|
case "ArrowUp":
|
|
@@ -16745,65 +16745,65 @@ function IT({ value: e, onChange: t }) {
|
|
|
16745
16745
|
m = 0;
|
|
16746
16746
|
break;
|
|
16747
16747
|
case "End":
|
|
16748
|
-
m =
|
|
16748
|
+
m = d - 1;
|
|
16749
16749
|
break;
|
|
16750
16750
|
default:
|
|
16751
16751
|
return;
|
|
16752
16752
|
}
|
|
16753
|
-
|
|
16753
|
+
f.preventDefault(), a(m), (h = o.current[m]) == null || h.focus();
|
|
16754
16754
|
};
|
|
16755
|
-
return r.length === 0 ? /* @__PURE__ */ U("span", { className: "theme-picker-empty", children: n("无可用主题配方") }) : /* @__PURE__ */ U(
|
|
16755
|
+
return r.length === 0 ? /* @__PURE__ */ U("span", { className: "ldk-theme-picker-empty", children: n("无可用主题配方") }) : /* @__PURE__ */ U(
|
|
16756
16756
|
"div",
|
|
16757
16757
|
{
|
|
16758
|
-
className: "theme-picker",
|
|
16758
|
+
className: "ldk-theme-picker",
|
|
16759
16759
|
role: "group",
|
|
16760
16760
|
"aria-label": n("主题配方"),
|
|
16761
16761
|
onKeyDown: c,
|
|
16762
|
-
children: r.map((
|
|
16762
|
+
children: r.map((f, d) => {
|
|
16763
16763
|
var N, k;
|
|
16764
|
-
const m =
|
|
16764
|
+
const m = f.colorways.length <= 1, h = (N = f.colorways[0]) == null ? void 0 : N.preview, T = (h == null ? void 0 : h.accent) || bE, I = f.id === e;
|
|
16765
16765
|
return /* @__PURE__ */ se(
|
|
16766
16766
|
"button",
|
|
16767
16767
|
{
|
|
16768
16768
|
ref: (L) => {
|
|
16769
|
-
o.current[
|
|
16769
|
+
o.current[d] = L;
|
|
16770
16770
|
},
|
|
16771
16771
|
type: "button",
|
|
16772
|
-
className: `theme-card${I ? " active" : ""}`,
|
|
16773
|
-
tabIndex: u ===
|
|
16774
|
-
"aria-label":
|
|
16772
|
+
className: `ldk-theme-picker-card${I ? " active" : ""}`,
|
|
16773
|
+
tabIndex: u === d ? 0 : -1,
|
|
16774
|
+
"aria-label": f.name,
|
|
16775
16775
|
"aria-pressed": I,
|
|
16776
|
-
onClick: () => t(
|
|
16777
|
-
onFocus: () => a(
|
|
16776
|
+
onClick: () => t(f.id),
|
|
16777
|
+
onFocus: () => a(d),
|
|
16778
16778
|
children: [
|
|
16779
|
-
/* @__PURE__ */ U("div", { className: "theme-preview", style: h != null && h.bgWindow ? { background: h.bgWindow } : void 0, children: m ? (
|
|
16780
|
-
// 单配色配方——3 条强调色预览条(mockup .
|
|
16779
|
+
/* @__PURE__ */ U("div", { className: "ldk-theme-picker-preview", style: h != null && h.bgWindow ? { background: h.bgWindow } : void 0, children: m ? (
|
|
16780
|
+
// 单配色配方——3 条强调色预览条(mockup .ldk-theme-picker-preview-bar)
|
|
16781
16781
|
/* @__PURE__ */ se(Au, { children: [
|
|
16782
|
-
/* @__PURE__ */ U("span", { className: "
|
|
16783
|
-
/* @__PURE__ */ U("span", { className: "
|
|
16784
|
-
/* @__PURE__ */ U("span", { className: "
|
|
16782
|
+
/* @__PURE__ */ U("span", { className: "ldk-theme-picker-preview-bar", style: { background: T } }),
|
|
16783
|
+
/* @__PURE__ */ U("span", { className: "ldk-theme-picker-preview-bar", style: { background: T } }),
|
|
16784
|
+
/* @__PURE__ */ U("span", { className: "ldk-theme-picker-preview-bar", style: { background: T } })
|
|
16785
16785
|
] })
|
|
16786
16786
|
) : (
|
|
16787
|
-
// 多配色配方——配色圆点色板(mockup .
|
|
16788
|
-
/* @__PURE__ */ U("span", { className: "
|
|
16787
|
+
// 多配色配方——配色圆点色板(mockup .ldk-theme-picker-preview-dot)
|
|
16788
|
+
/* @__PURE__ */ U("span", { className: "ldk-theme-picker-preview-dots", children: f.colorways.slice(0, TE).map((L) => {
|
|
16789
16789
|
var S;
|
|
16790
16790
|
return /* @__PURE__ */ U(
|
|
16791
16791
|
"span",
|
|
16792
16792
|
{
|
|
16793
|
-
className: "
|
|
16793
|
+
className: "ldk-theme-picker-preview-dot",
|
|
16794
16794
|
style: (S = L.preview) != null && S.accent ? { background: L.preview.accent } : void 0
|
|
16795
16795
|
},
|
|
16796
16796
|
L.id
|
|
16797
16797
|
);
|
|
16798
16798
|
}) })
|
|
16799
16799
|
) }),
|
|
16800
|
-
/* @__PURE__ */ se("div", { className: "
|
|
16801
|
-
/* @__PURE__ */ U("span", { className: "
|
|
16802
|
-
/* @__PURE__ */ U("span", { className: "
|
|
16800
|
+
/* @__PURE__ */ se("div", { className: "ldk-theme-picker-name", children: [
|
|
16801
|
+
/* @__PURE__ */ U("span", { className: "ldk-theme-picker-name-text", children: f.name }),
|
|
16802
|
+
/* @__PURE__ */ U("span", { className: "ldk-theme-picker-badge", children: m ? ((k = f.colorways[0]) == null ? void 0 : k.name) ?? "" : n("{{count}} 配色", { count: f.colorways.length }) })
|
|
16803
16803
|
] })
|
|
16804
16804
|
]
|
|
16805
16805
|
},
|
|
16806
|
-
|
|
16806
|
+
f.id
|
|
16807
16807
|
);
|
|
16808
16808
|
})
|
|
16809
16809
|
}
|
|
@@ -16835,8 +16835,8 @@ const NT = yr(function({
|
|
|
16835
16835
|
width: o,
|
|
16836
16836
|
autoFocus: l,
|
|
16837
16837
|
placeholder: c,
|
|
16838
|
-
type:
|
|
16839
|
-
min:
|
|
16838
|
+
type: f = "text",
|
|
16839
|
+
min: d,
|
|
16840
16840
|
max: m
|
|
16841
16841
|
}, h) {
|
|
16842
16842
|
const T = ce(null), [I, N] = oe(n), [k, L] = oe(!0);
|
|
@@ -16878,11 +16878,11 @@ const NT = yr(function({
|
|
|
16878
16878
|
"input",
|
|
16879
16879
|
{
|
|
16880
16880
|
ref: T,
|
|
16881
|
-
className: `inline-input inline-input--${t}`,
|
|
16882
|
-
type:
|
|
16881
|
+
className: `ldk-inline-input ldk-inline-input--${t}`,
|
|
16882
|
+
type: f,
|
|
16883
16883
|
value: I,
|
|
16884
16884
|
onChange: (C) => {
|
|
16885
|
-
const H =
|
|
16885
|
+
const H = f === "number" ? C.target.value.replace(/\D/g, "") : C.target.value;
|
|
16886
16886
|
N(H), u == null || u(H);
|
|
16887
16887
|
},
|
|
16888
16888
|
onKeyDown: S,
|
|
@@ -16890,7 +16890,7 @@ const NT = yr(function({
|
|
|
16890
16890
|
onFocus: q,
|
|
16891
16891
|
onDragStart: (C) => C.preventDefault(),
|
|
16892
16892
|
placeholder: c,
|
|
16893
|
-
min:
|
|
16893
|
+
min: d,
|
|
16894
16894
|
max: m,
|
|
16895
16895
|
style: o ? { width: o } : void 0,
|
|
16896
16896
|
autoComplete: "off",
|
|
@@ -17023,7 +17023,7 @@ function ar(e) {
|
|
|
17023
17023
|
}
|
|
17024
17024
|
function NE(e, t = {}) {
|
|
17025
17025
|
var m, h;
|
|
17026
|
-
const n = t.attributeNames ?? {}, r = (T) => n[T] ?? T, i = e.size ?? e.width ?? it.width, u = e.size ?? e.height ?? it.height, a = ((m = e.aliases) == null ? void 0 : m.filter((T) => typeof T == "string" && T.trim() !== "").map((T) => `lucide-${T}`)) ?? [], o = [...e.name ? [`lucide-${e.name}`] : [], ...a], l = ((h = t.className) == null ? void 0 : h.split(" ").filter(Boolean)) ?? [], c = t.includeDefaultClasses === !1 ? Cr(...l) : Cr("lucide", ...o, ...l),
|
|
17026
|
+
const n = t.attributeNames ?? {}, r = (T) => n[T] ?? T, i = e.size ?? e.width ?? it.width, u = e.size ?? e.height ?? it.height, a = ((m = e.aliases) == null ? void 0 : m.filter((T) => typeof T == "string" && T.trim() !== "").map((T) => `lucide-${T}`)) ?? [], o = [...e.name ? [`lucide-${e.name}`] : [], ...a], l = ((h = t.className) == null ? void 0 : h.split(" ").filter(Boolean)) ?? [], c = t.includeDefaultClasses === !1 ? Cr(...l) : Cr("lucide", ...o, ...l), f = t.absoluteStrokeWidth ? Number(t.strokeWidth ?? it["stroke-width"]) * Number(e.size ?? e.width ?? it.width) / Number(t.size ?? t.width ?? it.width) : t.strokeWidth ?? it["stroke-width"];
|
|
17027
17027
|
return [
|
|
17028
17028
|
"svg",
|
|
17029
17029
|
{
|
|
@@ -17041,7 +17041,7 @@ function NE(e, t = {}) {
|
|
|
17041
17041
|
..."height" in t && ar(t.height) && {
|
|
17042
17042
|
[r("height")]: t.height
|
|
17043
17043
|
},
|
|
17044
|
-
[r("stroke-width")]:
|
|
17044
|
+
[r("stroke-width")]: f,
|
|
17045
17045
|
...c && {
|
|
17046
17046
|
[r("class")]: c
|
|
17047
17047
|
},
|
|
@@ -17099,12 +17099,12 @@ const SE = (e) => {
|
|
|
17099
17099
|
className: o = "",
|
|
17100
17100
|
children: l,
|
|
17101
17101
|
iconNode: c = [],
|
|
17102
|
-
icon:
|
|
17102
|
+
icon: f = {
|
|
17103
17103
|
node: c,
|
|
17104
17104
|
aliases: [],
|
|
17105
17105
|
size: 24
|
|
17106
17106
|
},
|
|
17107
|
-
...
|
|
17107
|
+
...d
|
|
17108
17108
|
}, m) => {
|
|
17109
17109
|
const {
|
|
17110
17110
|
size: h = 24,
|
|
@@ -17113,7 +17113,7 @@ const SE = (e) => {
|
|
|
17113
17113
|
nonScalingStroke: N = !1,
|
|
17114
17114
|
color: k = "currentColor",
|
|
17115
17115
|
className: L = ""
|
|
17116
|
-
} = OE() ?? {}, S = !!l || SE(
|
|
17116
|
+
} = OE() ?? {}, S = !!l || SE(d), [w, q, C = []] = xE(f, {
|
|
17117
17117
|
color: e ?? k,
|
|
17118
17118
|
width: n ?? t ?? h,
|
|
17119
17119
|
height: r ?? t ?? h,
|
|
@@ -17122,7 +17122,7 @@ const SE = (e) => {
|
|
|
17122
17122
|
nonScalingStroke: a ?? N,
|
|
17123
17123
|
className: Cr(L, o),
|
|
17124
17124
|
hasA11yProp: S,
|
|
17125
|
-
attributes:
|
|
17125
|
+
attributes: d
|
|
17126
17126
|
});
|
|
17127
17127
|
return sr(
|
|
17128
17128
|
w,
|
|
@@ -17143,7 +17143,7 @@ const SE = (e) => {
|
|
|
17143
17143
|
* This source code is licensed under the ISC license.
|
|
17144
17144
|
* See the LICENSE file in the root directory of this source tree.
|
|
17145
17145
|
*/
|
|
17146
|
-
function
|
|
17146
|
+
function fe(e, t = [], n = []) {
|
|
17147
17147
|
const r = typeof e == "string" ? CE(e, t, n) : e, i = yr(
|
|
17148
17148
|
({ className: u, ...a }, o) => sr(DE, {
|
|
17149
17149
|
ref: o,
|
|
@@ -17175,7 +17175,7 @@ const As = {
|
|
|
17175
17175
|
]
|
|
17176
17176
|
};
|
|
17177
17177
|
As.node;
|
|
17178
|
-
const RE =
|
|
17178
|
+
const RE = fe(As);
|
|
17179
17179
|
/**
|
|
17180
17180
|
* @license lucide-react v1.42.0 - ISC
|
|
17181
17181
|
*
|
|
@@ -17194,7 +17194,7 @@ const ks = {
|
|
|
17194
17194
|
aliases: ["bar-chart-3"]
|
|
17195
17195
|
};
|
|
17196
17196
|
ks.node;
|
|
17197
|
-
const wE =
|
|
17197
|
+
const wE = fe(ks);
|
|
17198
17198
|
/**
|
|
17199
17199
|
* @license lucide-react v1.42.0 - ISC
|
|
17200
17200
|
*
|
|
@@ -17211,7 +17211,7 @@ const Cs = {
|
|
|
17211
17211
|
]
|
|
17212
17212
|
};
|
|
17213
17213
|
Cs.node;
|
|
17214
|
-
const PE =
|
|
17214
|
+
const PE = fe(Cs);
|
|
17215
17215
|
/**
|
|
17216
17216
|
* @license lucide-react v1.42.0 - ISC
|
|
17217
17217
|
*
|
|
@@ -17230,7 +17230,7 @@ const Is = {
|
|
|
17230
17230
|
aliases: ["smile"]
|
|
17231
17231
|
};
|
|
17232
17232
|
Is.node;
|
|
17233
|
-
const ME =
|
|
17233
|
+
const ME = fe(Is);
|
|
17234
17234
|
/**
|
|
17235
17235
|
* @license lucide-react v1.42.0 - ISC
|
|
17236
17236
|
*
|
|
@@ -17252,7 +17252,7 @@ const ys = {
|
|
|
17252
17252
|
]
|
|
17253
17253
|
};
|
|
17254
17254
|
ys.node;
|
|
17255
|
-
const FE =
|
|
17255
|
+
const FE = fe(ys);
|
|
17256
17256
|
/**
|
|
17257
17257
|
* @license lucide-react v1.42.0 - ISC
|
|
17258
17258
|
*
|
|
@@ -17273,7 +17273,7 @@ const Ns = {
|
|
|
17273
17273
|
]
|
|
17274
17274
|
};
|
|
17275
17275
|
Ns.node;
|
|
17276
|
-
const BE =
|
|
17276
|
+
const BE = fe(Ns);
|
|
17277
17277
|
/**
|
|
17278
17278
|
* @license lucide-react v1.42.0 - ISC
|
|
17279
17279
|
*
|
|
@@ -17303,7 +17303,7 @@ const xs = {
|
|
|
17303
17303
|
]
|
|
17304
17304
|
};
|
|
17305
17305
|
xs.node;
|
|
17306
|
-
const HE =
|
|
17306
|
+
const HE = fe(xs);
|
|
17307
17307
|
/**
|
|
17308
17308
|
* @license lucide-react v1.42.0 - ISC
|
|
17309
17309
|
*
|
|
@@ -17324,7 +17324,7 @@ const Ss = {
|
|
|
17324
17324
|
]
|
|
17325
17325
|
};
|
|
17326
17326
|
Ss.node;
|
|
17327
|
-
const vE =
|
|
17327
|
+
const vE = fe(Ss);
|
|
17328
17328
|
/**
|
|
17329
17329
|
* @license lucide-react v1.42.0 - ISC
|
|
17330
17330
|
*
|
|
@@ -17341,7 +17341,7 @@ const Ls = {
|
|
|
17341
17341
|
]
|
|
17342
17342
|
};
|
|
17343
17343
|
Ls.node;
|
|
17344
|
-
const UE =
|
|
17344
|
+
const UE = fe(Ls);
|
|
17345
17345
|
/**
|
|
17346
17346
|
* @license lucide-react v1.42.0 - ISC
|
|
17347
17347
|
*
|
|
@@ -17364,7 +17364,7 @@ const Os = {
|
|
|
17364
17364
|
]
|
|
17365
17365
|
};
|
|
17366
17366
|
Os.node;
|
|
17367
|
-
const zE =
|
|
17367
|
+
const zE = fe(Os);
|
|
17368
17368
|
/**
|
|
17369
17369
|
* @license lucide-react v1.42.0 - ISC
|
|
17370
17370
|
*
|
|
@@ -17380,7 +17380,7 @@ const Ds = {
|
|
|
17380
17380
|
]
|
|
17381
17381
|
};
|
|
17382
17382
|
Ds.node;
|
|
17383
|
-
const YE =
|
|
17383
|
+
const YE = fe(Ds);
|
|
17384
17384
|
/**
|
|
17385
17385
|
* @license lucide-react v1.42.0 - ISC
|
|
17386
17386
|
*
|
|
@@ -17397,7 +17397,7 @@ const Rs = {
|
|
|
17397
17397
|
]
|
|
17398
17398
|
};
|
|
17399
17399
|
Rs.node;
|
|
17400
|
-
const qE =
|
|
17400
|
+
const qE = fe(Rs);
|
|
17401
17401
|
/**
|
|
17402
17402
|
* @license lucide-react v1.42.0 - ISC
|
|
17403
17403
|
*
|
|
@@ -17421,7 +17421,7 @@ const ws = {
|
|
|
17421
17421
|
]
|
|
17422
17422
|
};
|
|
17423
17423
|
ws.node;
|
|
17424
|
-
const VE =
|
|
17424
|
+
const VE = fe(ws);
|
|
17425
17425
|
/**
|
|
17426
17426
|
* @license lucide-react v1.42.0 - ISC
|
|
17427
17427
|
*
|
|
@@ -17442,7 +17442,7 @@ const Ps = {
|
|
|
17442
17442
|
]
|
|
17443
17443
|
};
|
|
17444
17444
|
Ps.node;
|
|
17445
|
-
const WE =
|
|
17445
|
+
const WE = fe(Ps);
|
|
17446
17446
|
/**
|
|
17447
17447
|
* @license lucide-react v1.42.0 - ISC
|
|
17448
17448
|
*
|
|
@@ -17463,7 +17463,7 @@ const Ms = {
|
|
|
17463
17463
|
]
|
|
17464
17464
|
};
|
|
17465
17465
|
Ms.node;
|
|
17466
|
-
const jE =
|
|
17466
|
+
const jE = fe(Ms);
|
|
17467
17467
|
/**
|
|
17468
17468
|
* @license lucide-react v1.42.0 - ISC
|
|
17469
17469
|
*
|
|
@@ -17493,7 +17493,7 @@ const Fs = {
|
|
|
17493
17493
|
]
|
|
17494
17494
|
};
|
|
17495
17495
|
Fs.node;
|
|
17496
|
-
const GE =
|
|
17496
|
+
const GE = fe(Fs);
|
|
17497
17497
|
/**
|
|
17498
17498
|
* @license lucide-react v1.42.0 - ISC
|
|
17499
17499
|
*
|
|
@@ -17515,7 +17515,7 @@ const Bs = {
|
|
|
17515
17515
|
]
|
|
17516
17516
|
};
|
|
17517
17517
|
Bs.node;
|
|
17518
|
-
const QE =
|
|
17518
|
+
const QE = fe(Bs);
|
|
17519
17519
|
/**
|
|
17520
17520
|
* @license lucide-react v1.42.0 - ISC
|
|
17521
17521
|
*
|
|
@@ -17538,7 +17538,7 @@ const Hs = {
|
|
|
17538
17538
|
]
|
|
17539
17539
|
};
|
|
17540
17540
|
Hs.node;
|
|
17541
|
-
const $E =
|
|
17541
|
+
const $E = fe(Hs);
|
|
17542
17542
|
/**
|
|
17543
17543
|
* @license lucide-react v1.42.0 - ISC
|
|
17544
17544
|
*
|
|
@@ -17563,7 +17563,7 @@ const vs = {
|
|
|
17563
17563
|
aliases: ["stars"]
|
|
17564
17564
|
};
|
|
17565
17565
|
vs.node;
|
|
17566
|
-
const KE =
|
|
17566
|
+
const KE = fe(vs);
|
|
17567
17567
|
/**
|
|
17568
17568
|
* @license lucide-react v1.42.0 - ISC
|
|
17569
17569
|
*
|
|
@@ -17584,7 +17584,7 @@ const Us = {
|
|
|
17584
17584
|
]
|
|
17585
17585
|
};
|
|
17586
17586
|
Us.node;
|
|
17587
|
-
const XE =
|
|
17587
|
+
const XE = fe(Us);
|
|
17588
17588
|
/**
|
|
17589
17589
|
* @license lucide-react v1.42.0 - ISC
|
|
17590
17590
|
*
|
|
@@ -17605,7 +17605,7 @@ const zs = {
|
|
|
17605
17605
|
]
|
|
17606
17606
|
};
|
|
17607
17607
|
zs.node;
|
|
17608
|
-
const JE =
|
|
17608
|
+
const JE = fe(zs), ZE = {
|
|
17609
17609
|
File: FE,
|
|
17610
17610
|
Folder: vE,
|
|
17611
17611
|
FolderOpen: BE,
|
|
@@ -17768,7 +17768,7 @@ function PT(e) {
|
|
|
17768
17768
|
return t ? `${t[1].toLowerCase()}/${t[2].toLowerCase()}` : null;
|
|
17769
17769
|
}
|
|
17770
17770
|
export {
|
|
17771
|
-
|
|
17771
|
+
dT as Badge,
|
|
17772
17772
|
eE as Button,
|
|
17773
17773
|
hT as ColorPicker,
|
|
17774
17774
|
mT as Combobox,
|
|
@@ -17780,7 +17780,7 @@ export {
|
|
|
17780
17780
|
bT as FontFamilySelect,
|
|
17781
17781
|
gT as FormRow,
|
|
17782
17782
|
NT as InlineInput,
|
|
17783
|
-
|
|
17783
|
+
fT as MarkdownView,
|
|
17784
17784
|
_T as NumberInput,
|
|
17785
17785
|
$r as OverlayPortal,
|
|
17786
17786
|
ST as PluginIcon,
|