@sakura-ui/sakura-ui 0.5.5 → 0.5.7
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/package.json +4 -4
- package/packages/forms/.turbo/turbo-build.log +2 -2
- package/packages/forms/dist/index.cjs.js +4 -4
- package/packages/forms/dist/index.es.js +4 -4
- package/packages/forms/package.json +1 -1
- package/packages/forms/src/components/FileInput.tsx +4 -4
- package/packages/helper/.turbo/turbo-build.log +2 -2
- package/packages/markdown/.turbo/turbo-build.log +4 -4
- package/packages/markdown/dist/index.cjs.js +104 -37
- package/packages/markdown/dist/index.es.js +711 -621
- package/packages/markdown/dist/types/decorate.d.ts.map +1 -1
- package/packages/markdown/package.json +1 -1
- package/packages/markdown/src/decorate.ts +5 -1
- package/packages/markdown/tests/Markdown.test.tsx +17 -0
- package/packages/markdown/tests/__snapshots__/Markdown.test.tsx.snap +7 -2
- package/packages/tailwind-theme-plugin/.turbo/turbo-build.log +1 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { styles as E, Ul as
|
|
1
|
+
import { styles as E, Ul as br, Link as is } from "@sakura-ui/core";
|
|
2
2
|
import Rt from "react";
|
|
3
|
-
var
|
|
3
|
+
var _t = { exports: {} }, et = {};
|
|
4
4
|
var Zn;
|
|
5
|
-
function
|
|
5
|
+
function os() {
|
|
6
6
|
if (Zn) return et;
|
|
7
7
|
Zn = 1;
|
|
8
8
|
var t = /* @__PURE__ */ Symbol.for("react.transitional.element"), e = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
9
|
-
function n(r, s,
|
|
9
|
+
function n(r, s, o) {
|
|
10
10
|
var l = null;
|
|
11
|
-
if (
|
|
12
|
-
|
|
13
|
-
for (var
|
|
14
|
-
|
|
15
|
-
} else
|
|
16
|
-
return s =
|
|
11
|
+
if (o !== void 0 && (l = "" + o), s.key !== void 0 && (l = "" + s.key), "key" in s) {
|
|
12
|
+
o = {};
|
|
13
|
+
for (var u in s)
|
|
14
|
+
u !== "key" && (o[u] = s[u]);
|
|
15
|
+
} else o = s;
|
|
16
|
+
return s = o.ref, {
|
|
17
17
|
$$typeof: t,
|
|
18
18
|
type: r,
|
|
19
19
|
key: l,
|
|
20
20
|
ref: s !== void 0 ? s : null,
|
|
21
|
-
props:
|
|
21
|
+
props: o
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
return et.Fragment = e, et.jsx = n, et.jsxs = n, et;
|
|
@@ -50,7 +50,7 @@ function us() {
|
|
|
50
50
|
switch (typeof f.tag == "number" && console.error(
|
|
51
51
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
52
52
|
), f.$$typeof) {
|
|
53
|
-
case
|
|
53
|
+
case q:
|
|
54
54
|
return "Portal";
|
|
55
55
|
case ne:
|
|
56
56
|
return f.displayName || "Context";
|
|
@@ -59,7 +59,7 @@ function us() {
|
|
|
59
59
|
case Q:
|
|
60
60
|
var C = f.render;
|
|
61
61
|
return f = f.displayName, f || (f = C.displayName || C.name || "", f = f !== "" ? "ForwardRef(" + f + ")" : "ForwardRef"), f;
|
|
62
|
-
case
|
|
62
|
+
case Ge:
|
|
63
63
|
return C = f.displayName || null, C !== null ? C : t(f.type) || "Memo";
|
|
64
64
|
case M:
|
|
65
65
|
C = f._payload, f = f._init;
|
|
@@ -105,7 +105,7 @@ function us() {
|
|
|
105
105
|
var f = Oe.A;
|
|
106
106
|
return f === null ? null : f.getOwner();
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function o() {
|
|
109
109
|
return Error("react-stack-top-frame");
|
|
110
110
|
}
|
|
111
111
|
function l(f) {
|
|
@@ -115,7 +115,7 @@ function us() {
|
|
|
115
115
|
}
|
|
116
116
|
return f.key !== void 0;
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function u(f, C) {
|
|
119
119
|
function S() {
|
|
120
120
|
ht || (ht = !0, console.error(
|
|
121
121
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
@@ -202,7 +202,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
202
202
|
for (var Ve in C)
|
|
203
203
|
Ve !== "key" && (S[Ve] = C[Ve]);
|
|
204
204
|
} else S = C;
|
|
205
|
-
return $ &&
|
|
205
|
+
return $ && u(
|
|
206
206
|
S,
|
|
207
207
|
typeof f == "function" ? f.displayName || f.name || "Unknown" : f
|
|
208
208
|
), h(
|
|
@@ -220,7 +220,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
220
220
|
function k(f) {
|
|
221
221
|
return typeof f == "object" && f !== null && f.$$typeof === T;
|
|
222
222
|
}
|
|
223
|
-
var L = Rt, T = /* @__PURE__ */ Symbol.for("react.transitional.element"),
|
|
223
|
+
var L = Rt, T = /* @__PURE__ */ Symbol.for("react.transitional.element"), q = /* @__PURE__ */ Symbol.for("react.portal"), U = /* @__PURE__ */ Symbol.for("react.fragment"), te = /* @__PURE__ */ Symbol.for("react.strict_mode"), be = /* @__PURE__ */ Symbol.for("react.profiler"), ke = /* @__PURE__ */ Symbol.for("react.consumer"), ne = /* @__PURE__ */ Symbol.for("react.context"), Q = /* @__PURE__ */ Symbol.for("react.forward_ref"), K = /* @__PURE__ */ Symbol.for("react.suspense"), Ce = /* @__PURE__ */ Symbol.for("react.suspense_list"), Ge = /* @__PURE__ */ Symbol.for("react.memo"), M = /* @__PURE__ */ Symbol.for("react.lazy"), fe = /* @__PURE__ */ Symbol.for("react.activity"), Ye = /* @__PURE__ */ Symbol.for("react.client.reference"), Oe = L.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, de = Object.prototype.hasOwnProperty, ft = Array.isArray, ue = console.createTask ? console.createTask : function() {
|
|
224
224
|
return null;
|
|
225
225
|
};
|
|
226
226
|
L = {
|
|
@@ -230,8 +230,8 @@ React keys must be passed directly to JSX without using spread:
|
|
|
230
230
|
};
|
|
231
231
|
var ht, dt = {}, xe = L.react_stack_bottom_frame.bind(
|
|
232
232
|
L,
|
|
233
|
-
|
|
234
|
-
)(), Le =
|
|
233
|
+
o
|
|
234
|
+
)(), Le = ue(r(o)), Ze = {};
|
|
235
235
|
tt.Fragment = U, tt.jsx = function(f, C, S) {
|
|
236
236
|
var b = 1e4 > Oe.recentlyCreatedOwnerStacks++;
|
|
237
237
|
return g(
|
|
@@ -240,7 +240,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
240
240
|
S,
|
|
241
241
|
!1,
|
|
242
242
|
b ? Error("react-stack-top-frame") : xe,
|
|
243
|
-
b ?
|
|
243
|
+
b ? ue(r(f)) : Le
|
|
244
244
|
);
|
|
245
245
|
}, tt.jsxs = function(f, C, S) {
|
|
246
246
|
var b = 1e4 > Oe.recentlyCreatedOwnerStacks++;
|
|
@@ -250,21 +250,21 @@ React keys must be passed directly to JSX without using spread:
|
|
|
250
250
|
S,
|
|
251
251
|
!0,
|
|
252
252
|
b ? Error("react-stack-top-frame") : xe,
|
|
253
|
-
b ?
|
|
253
|
+
b ? ue(r(f)) : Le
|
|
254
254
|
);
|
|
255
255
|
};
|
|
256
256
|
})()), tt;
|
|
257
257
|
}
|
|
258
258
|
var Vn;
|
|
259
|
-
function
|
|
260
|
-
return Vn || (Vn = 1, process.env.NODE_ENV === "production" ?
|
|
259
|
+
function ls() {
|
|
260
|
+
return Vn || (Vn = 1, process.env.NODE_ENV === "production" ? _t.exports = os() : _t.exports = us()), _t.exports;
|
|
261
261
|
}
|
|
262
|
-
var ee =
|
|
262
|
+
var ee = ls();
|
|
263
263
|
function pn() {
|
|
264
264
|
return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
|
|
265
265
|
}
|
|
266
266
|
var ve = pn();
|
|
267
|
-
function
|
|
267
|
+
function kr(t) {
|
|
268
268
|
ve = t;
|
|
269
269
|
}
|
|
270
270
|
var Re = { exec: () => null };
|
|
@@ -276,20 +276,20 @@ function je(t) {
|
|
|
276
276
|
};
|
|
277
277
|
}
|
|
278
278
|
function x(t, e = "") {
|
|
279
|
-
let n = typeof t == "string" ? t : t.source, r = { replace: (s,
|
|
280
|
-
let l = typeof
|
|
279
|
+
let n = typeof t == "string" ? t : t.source, r = { replace: (s, o) => {
|
|
280
|
+
let l = typeof o == "string" ? o : o.source;
|
|
281
281
|
return l = l.replace(H.caret, "$1"), n = n.replace(s, l), r;
|
|
282
282
|
}, getRegex: () => new RegExp(n, e) };
|
|
283
283
|
return r;
|
|
284
284
|
}
|
|
285
|
-
var
|
|
285
|
+
var as = ((t = "") => {
|
|
286
286
|
try {
|
|
287
287
|
return !!new RegExp("(?<=1)(?<!1)" + t);
|
|
288
288
|
} catch {
|
|
289
289
|
return !1;
|
|
290
290
|
}
|
|
291
|
-
})(), H = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (t) => new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: je((t) => new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: je((t) => new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: je((t) => new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)), headingBeginRegex: je((t) => new RegExp(`^ {0,${t}}#`)), htmlBeginRegex: je((t) => new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: je((t) => new RegExp(`^ {0,${t}}>`)) },
|
|
292
|
-
]`).replace("lheading",
|
|
291
|
+
})(), H = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (t) => new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: je((t) => new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: je((t) => new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: je((t) => new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)), headingBeginRegex: je((t) => new RegExp(`^ {0,${t}}#`)), htmlBeginRegex: je((t) => new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: je((t) => new RegExp(`^ {0,${t}}>`)) }, cs = /^(?:[ \t]*(?:\n|$))+/, ps = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, fs = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, ct = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, hs = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, fn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, Cr = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, xr = x(Cr).replace(/bull/g, fn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), ds = x(Cr).replace(/bull/g, fn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), hn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, Ds = /^[^\n]+/, dn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, gs = x(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", dn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), ms = x(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, fn).getRegex(), $t = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Dn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Fs = x("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", Dn).replace("tag", $t).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Tr = (t) => x(hn).replace("hr", ct).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", t).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", $t).getRegex(), As = Tr(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), Es = Tr(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), bs = x(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Es).getRegex(), gn = { blockquote: bs, code: ps, def: gs, fences: fs, heading: hs, hr: ct, html: Fs, lheading: xr, list: ms, newline: cs, paragraph: As, table: Re, text: Ds }, Qn = x("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", ct).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", $t).getRegex(), ks = { ...gn, lheading: ds, table: Qn, paragraph: x(hn).replace("hr", ct).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Qn).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", $t).getRegex() }, Cs = { ...gn, html: x(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Dn).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: Re, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: x(hn).replace("hr", ct).replace("heading", ` *#{1,6} *[^
|
|
292
|
+
]`).replace("lheading", xr).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, xs = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ts = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, yr = /^( {2,}|\\)\n(?!\s*$)/, ys = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, he = /[\p{P}\p{S}]/u, qe = /[\s\p{P}\p{S}]/u, pt = /[^\s\p{P}\p{S}]/u, _s = x(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, qe).getRegex(), ws = /[\p{Pi}\p{Ps}"']/u, _r = /(?!~)[\p{P}\p{S}]/u, Ss = /(?!~)[\s\p{P}\p{S}]/u, Rs = /(?:[^\s\p{P}\p{S}]|~)/u, Bs = x(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", as ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), wr = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, vs = x(wr, "u").replace(/punct/g, he).getRegex(), Os = x(wr, "u").replace(/punct/g, _r).getRegex(), Ls = /^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, $s = x(Ls, "u").replace(/openQuote/g, ws).replace(/punct/g, he).getRegex(), Sr = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ps = x(Sr, "gu").replace(/notPunctSpace/g, pt).replace(/punctSpace/g, qe).replace(/punct/g, he).getRegex(), Is = x(Sr, "gu").replace(/notPunctSpace/g, Rs).replace(/punctSpace/g, Ss).replace(/punct/g, _r).getRegex(), Ns = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", Ms = x(Ns, "gu").replace(/notPunctSpace/g, pt).replace(/punctSpace/g, qe).replace(/punct/g, he).getRegex(), zs = x("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, pt).replace(/punctSpace/g, qe).replace(/punct/g, he).getRegex(), Us = "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", js = x(Us, "gu").replace(/notPunctSpace/g, pt).replace(/punctSpace/g, qe).replace(/punct/g, he).getRegex(), Hs = x(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, he).getRegex(), Ws = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", qs = x(Ws, "gu").replace(/notPunctSpace/g, pt).replace(/punctSpace/g, qe).replace(/punct/g, he).getRegex(), Gs = x(/\\(punct)/, "gu").replace(/punct/g, he).getRegex(), Ys = x(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Zs = x(Dn).replace("(?:-->|$)", "-->").getRegex(), Xs = x("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Zs).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Bt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Vs = x(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Bt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Rr = x(/^!?\[(label)\]\[(ref)\]/).replace("label", Bt).replace("ref", dn).getRegex(), Br = x(/^!?\[(ref)\](?:\[\])?/).replace("ref", dn).getRegex(), Qs = x("reflink|nolink(?!\\()", "g").replace("reflink", Rr).replace("nolink", Br).getRegex(), Kn = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, mn = { _backpedal: Re, anyPunctuation: Gs, autolink: Ys, blockSkip: Bs, br: yr, code: Ts, del: Re, delLDelim: Re, delRDelim: Re, emStrongLDelim: vs, emStrongRDelimAst: Ps, emStrongRDelimUnd: zs, escape: xs, link: Vs, nolink: Br, punctuation: _s, reflink: Rr, reflinkSearch: Qs, tag: Xs, text: ys, url: Re }, Ks = { ...mn, emStrongLDelim: $s, emStrongRDelimAst: Ms, emStrongRDelimUnd: js, link: x(/^!?\[(label)\]\((.*?)\)/).replace("label", Bt).getRegex(), reflink: x(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Bt).getRegex() }, on = { ...mn, emStrongRDelimAst: Is, emStrongLDelim: Os, delLDelim: Hs, delRDelim: qs, url: x(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Kn).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: x(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Kn).getRegex() }, Js = { ...on, br: x(yr).replace("{2,}", "*").getRegex(), text: x(on.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, wt = { normal: gn, gfm: ks, pedantic: Cs }, nt = { normal: mn, gfm: on, breaks: Js, pedantic: Ks }, ei = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, Jn = (t) => ei[t];
|
|
293
293
|
function pe(t, e) {
|
|
294
294
|
if (e) {
|
|
295
295
|
if (H.escapeTest.test(t)) return t.replace(H.escapeReplace, Jn);
|
|
@@ -305,9 +305,9 @@ function er(t) {
|
|
|
305
305
|
return t;
|
|
306
306
|
}
|
|
307
307
|
function tr(t, e) {
|
|
308
|
-
let n = t.replace(H.findPipe, (
|
|
308
|
+
let n = t.replace(H.findPipe, (o, l, u) => {
|
|
309
309
|
let c = !1, h = l;
|
|
310
|
-
for (; --h >= 0 &&
|
|
310
|
+
for (; --h >= 0 && u[h] === "\\"; ) c = !c;
|
|
311
311
|
return c ? "|" : " |";
|
|
312
312
|
}), r = n.split(H.splitPipe), s = 0;
|
|
313
313
|
if (r[0].trim() || r.shift(), r.length > 0 && !r.at(-1)?.trim() && r.pop(), e) if (r.length > e) r.splice(e);
|
|
@@ -330,7 +330,7 @@ function nr(t) {
|
|
|
330
330
|
return e.length - n <= 2 ? t : e.slice(0, n + 1).join(`
|
|
331
331
|
`);
|
|
332
332
|
}
|
|
333
|
-
function
|
|
333
|
+
function ti(t, e) {
|
|
334
334
|
if (t.indexOf(e[1]) === -1) return -1;
|
|
335
335
|
let n = 0;
|
|
336
336
|
for (let r = 0; r < t.length; r++) if (t[r] === "\\") r++;
|
|
@@ -338,30 +338,30 @@ function ei(t, e) {
|
|
|
338
338
|
else if (t[r] === e[1] && (n--, n < 0)) return r;
|
|
339
339
|
return n > 0 ? -2 : -1;
|
|
340
340
|
}
|
|
341
|
-
function
|
|
341
|
+
function ni(t, e = 0) {
|
|
342
342
|
let n = e, r = "";
|
|
343
343
|
for (let s of t) if (s === " ") {
|
|
344
|
-
let
|
|
345
|
-
r += " ".repeat(
|
|
344
|
+
let o = 4 - n % 4;
|
|
345
|
+
r += " ".repeat(o), n += o;
|
|
346
346
|
} else r += s, n++;
|
|
347
347
|
return r;
|
|
348
348
|
}
|
|
349
349
|
function rr(t, e, n, r, s) {
|
|
350
|
-
let
|
|
350
|
+
let o = e.href, l = e.title || null, u = t[1].replace(s.other.outputLinkReplace, "$1");
|
|
351
351
|
r.state.inLink = !0;
|
|
352
|
-
let c = { type: t[0].charAt(0) === "!" ? "image" : "link", raw: n, href:
|
|
352
|
+
let c = { type: t[0].charAt(0) === "!" ? "image" : "link", raw: n, href: o, title: l, text: u, tokens: r.inlineTokens(u) };
|
|
353
353
|
return r.state.inLink = !1, c;
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function ri(t, e, n) {
|
|
356
356
|
let r = t.match(n.other.indentCodeCompensation);
|
|
357
357
|
if (r === null) return e;
|
|
358
358
|
let s = r[1];
|
|
359
359
|
return e.split(`
|
|
360
|
-
`).map((
|
|
361
|
-
let l =
|
|
362
|
-
if (l === null) return
|
|
363
|
-
let [
|
|
364
|
-
return
|
|
360
|
+
`).map((o) => {
|
|
361
|
+
let l = o.match(n.other.beginningSpace);
|
|
362
|
+
if (l === null) return o;
|
|
363
|
+
let [u] = l;
|
|
364
|
+
return u.length >= s.length ? o.slice(s.length) : o;
|
|
365
365
|
}).join(`
|
|
366
366
|
`);
|
|
367
367
|
}
|
|
@@ -386,7 +386,7 @@ var vt = class {
|
|
|
386
386
|
fences(t) {
|
|
387
387
|
let e = this.rules.block.fences.exec(t);
|
|
388
388
|
if (e) {
|
|
389
|
-
let n = e[0], r =
|
|
389
|
+
let n = e[0], r = ri(n, e[3] || "", this.rules);
|
|
390
390
|
return { type: "code", raw: n, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: r };
|
|
391
391
|
}
|
|
392
392
|
}
|
|
@@ -412,40 +412,40 @@ var vt = class {
|
|
|
412
412
|
if (e) {
|
|
413
413
|
let n = Ae(e[0], `
|
|
414
414
|
`).split(`
|
|
415
|
-
`), r = "", s = "",
|
|
415
|
+
`), r = "", s = "", o = [];
|
|
416
416
|
for (; n.length > 0; ) {
|
|
417
|
-
let l = !1,
|
|
418
|
-
for (c = 0; c < n.length; c++) if (this.rules.other.blockquoteStart.test(n[c]))
|
|
419
|
-
else if (!l)
|
|
417
|
+
let l = !1, u = [], c;
|
|
418
|
+
for (c = 0; c < n.length; c++) if (this.rules.other.blockquoteStart.test(n[c])) u.push(n[c]), l = !0;
|
|
419
|
+
else if (!l) u.push(n[c]);
|
|
420
420
|
else break;
|
|
421
421
|
n = n.slice(c);
|
|
422
|
-
let h =
|
|
422
|
+
let h = u.join(`
|
|
423
423
|
`), g = h.replace(this.rules.other.blockquoteSetextReplace, `
|
|
424
424
|
$1`).replace(this.rules.other.blockquoteSetextReplace2, "");
|
|
425
425
|
r = r ? `${r}
|
|
426
426
|
${h}` : h, s = s ? `${s}
|
|
427
427
|
${g}` : g;
|
|
428
428
|
let m = this.lexer.state.top;
|
|
429
|
-
if (this.lexer.state.top = !0, this.lexer.blockTokens(g,
|
|
430
|
-
let k =
|
|
429
|
+
if (this.lexer.state.top = !0, this.lexer.blockTokens(g, o, !0), this.lexer.state.top = m, n.length === 0) break;
|
|
430
|
+
let k = o.at(-1);
|
|
431
431
|
if (k?.type === "code") break;
|
|
432
432
|
if (k?.type === "blockquote") {
|
|
433
433
|
let L = k, T = n.join(`
|
|
434
|
-
`),
|
|
435
|
-
` + T.replace(this.rules.other.blockquoteSetextReplace2, ""), U = this.blockquote(
|
|
436
|
-
|
|
434
|
+
`), q = L.raw + `
|
|
435
|
+
` + T.replace(this.rules.other.blockquoteSetextReplace2, ""), U = this.blockquote(q);
|
|
436
|
+
o[o.length - 1] = U, r = `${r}
|
|
437
437
|
${T}`, s = s.substring(0, s.length - L.text.length) + U.text;
|
|
438
438
|
break;
|
|
439
439
|
} else if (k?.type === "list") {
|
|
440
440
|
let L = k, T = L.raw + `
|
|
441
441
|
` + n.join(`
|
|
442
|
-
`),
|
|
443
|
-
|
|
442
|
+
`), q = this.list(T);
|
|
443
|
+
o[o.length - 1] = q, r = r.substring(0, r.length - k.raw.length) + q.raw, s = s.substring(0, s.length - L.raw.length) + q.raw, n = T.substring(o.at(-1).raw.length).split(`
|
|
444
444
|
`);
|
|
445
445
|
continue;
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
|
-
return { type: "blockquote", raw: r, tokens:
|
|
448
|
+
return { type: "blockquote", raw: r, tokens: o, text: s };
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
451
|
list(t) {
|
|
@@ -453,21 +453,21 @@ ${T}`, s = s.substring(0, s.length - L.text.length) + U.text;
|
|
|
453
453
|
if (e) {
|
|
454
454
|
let n = e[1].trim(), r = n.length > 1, s = { type: "list", raw: "", ordered: r, start: r ? +n.slice(0, -1) : "", loose: !1, items: [] };
|
|
455
455
|
n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
|
|
456
|
-
let
|
|
456
|
+
let o = this.rules.other.listItemRegex(n), l = !1;
|
|
457
457
|
for (; t; ) {
|
|
458
458
|
let c = !1, h = "", g = "";
|
|
459
|
-
if (!(e =
|
|
459
|
+
if (!(e = o.exec(t)) || this.rules.block.hr.test(t)) break;
|
|
460
460
|
h = e[0], t = t.substring(h.length);
|
|
461
|
-
let m =
|
|
461
|
+
let m = ni(e[2].split(`
|
|
462
462
|
`, 1)[0], e[1].length), k = t.split(`
|
|
463
463
|
`, 1)[0], L = !m.trim(), T = 0;
|
|
464
464
|
if (this.options.pedantic ? (T = 2, g = m.trimStart()) : L ? T = e[1].length + 1 : (T = m.search(this.rules.other.nonSpaceChar), T = T > 4 ? 1 : T, g = m.slice(T), T += e[1].length), L && this.rules.other.blankLine.test(k) && (h += k + `
|
|
465
465
|
`, t = t.substring(k.length + 1), c = !0), !c) {
|
|
466
|
-
let
|
|
466
|
+
let q = this.rules.other.nextBulletRegex(T), U = this.rules.other.hrRegex(T), te = this.rules.other.fencesBeginRegex(T), be = this.rules.other.headingBeginRegex(T), ke = this.rules.other.htmlBeginRegex(T), ne = this.rules.other.blockquoteBeginRegex(T);
|
|
467
467
|
for (; t; ) {
|
|
468
468
|
let Q = t.split(`
|
|
469
469
|
`, 1)[0], K;
|
|
470
|
-
if (k = Q, this.options.pedantic ? (k = k.replace(this.rules.other.listReplaceNesting, " "), K = k) : K = k.replace(this.rules.other.tabCharGlobal, " "), te.test(k) || be.test(k) || ke.test(k) || ne.test(k) ||
|
|
470
|
+
if (k = Q, this.options.pedantic ? (k = k.replace(this.rules.other.listReplaceNesting, " "), K = k) : K = k.replace(this.rules.other.tabCharGlobal, " "), te.test(k) || be.test(k) || ke.test(k) || ne.test(k) || q.test(k) || U.test(k)) break;
|
|
471
471
|
if (K.search(this.rules.other.nonSpaceChar) >= T || !k.trim()) g += `
|
|
472
472
|
` + K.slice(T);
|
|
473
473
|
else {
|
|
@@ -481,8 +481,8 @@ ${T}`, s = s.substring(0, s.length - L.text.length) + U.text;
|
|
|
481
481
|
}
|
|
482
482
|
s.loose || (l ? s.loose = !0 : this.rules.other.doubleBlankLine.test(h) && (l = !0)), s.items.push({ type: "list_item", raw: h, task: !!this.options.gfm && this.rules.other.listIsTask.test(g), loose: !1, text: g, tokens: [] }), s.raw += h;
|
|
483
483
|
}
|
|
484
|
-
let
|
|
485
|
-
if (
|
|
484
|
+
let u = s.items.at(-1);
|
|
485
|
+
if (u) u.raw = u.raw.trimEnd(), u.text = u.text.trimEnd();
|
|
486
486
|
else return;
|
|
487
487
|
s.raw = s.raw.trimEnd();
|
|
488
488
|
for (let c of s.items) if (this.lexer.state.top = !1, c.tokens = this.lexer.blockTokens(c.text, []), !s.loose) {
|
|
@@ -530,13 +530,13 @@ ${T}`, s = s.substring(0, s.length - L.text.length) + U.text;
|
|
|
530
530
|
let e = this.rules.block.table.exec(t);
|
|
531
531
|
if (!e || !this.rules.other.tableDelimiter.test(e[2])) return;
|
|
532
532
|
let n = tr(e[1]), r = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), s = e[3]?.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
|
|
533
|
-
`) : [],
|
|
533
|
+
`) : [], o = { type: "table", raw: Ae(e[0], `
|
|
534
534
|
`), header: [], align: [], rows: [] };
|
|
535
535
|
if (n.length === r.length) {
|
|
536
|
-
for (let l of r) this.rules.other.tableAlignRight.test(l) ?
|
|
537
|
-
for (let l = 0; l < n.length; l++)
|
|
538
|
-
for (let l of s)
|
|
539
|
-
return
|
|
536
|
+
for (let l of r) this.rules.other.tableAlignRight.test(l) ? o.align.push("right") : this.rules.other.tableAlignCenter.test(l) ? o.align.push("center") : this.rules.other.tableAlignLeft.test(l) ? o.align.push("left") : o.align.push(null);
|
|
537
|
+
for (let l = 0; l < n.length; l++) o.header.push({ text: n[l], tokens: this.lexer.inline(n[l]), header: !0, align: o.align[l] });
|
|
538
|
+
for (let l of s) o.rows.push(tr(l, o.header.length).map((u, c) => ({ text: u, tokens: this.lexer.inline(u), header: !1, align: o.align[c] })));
|
|
539
|
+
return o;
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
542
|
lheading(t) {
|
|
@@ -573,20 +573,20 @@ ${T}`, s = s.substring(0, s.length - L.text.length) + U.text;
|
|
|
573
573
|
let n = e[2].trim();
|
|
574
574
|
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(n)) {
|
|
575
575
|
if (!this.rules.other.endAngleBracket.test(n)) return;
|
|
576
|
-
let
|
|
577
|
-
if ((n.length -
|
|
576
|
+
let o = Ae(n.slice(0, -1), "\\");
|
|
577
|
+
if ((n.length - o.length) % 2 === 0) return;
|
|
578
578
|
} else {
|
|
579
|
-
let
|
|
580
|
-
if (
|
|
581
|
-
if (
|
|
582
|
-
let l = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length +
|
|
583
|
-
e[2] = e[2].substring(0,
|
|
579
|
+
let o = ti(e[2], "()");
|
|
580
|
+
if (o === -2) return;
|
|
581
|
+
if (o > -1) {
|
|
582
|
+
let l = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + o;
|
|
583
|
+
e[2] = e[2].substring(0, o), e[0] = e[0].substring(0, l).trim(), e[3] = "";
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
586
|
let r = e[2], s = "";
|
|
587
587
|
if (this.options.pedantic) {
|
|
588
|
-
let
|
|
589
|
-
|
|
588
|
+
let o = this.rules.other.pedanticHrefTitle.exec(r);
|
|
589
|
+
o && (r = o[1], s = o[3]);
|
|
590
590
|
} else s = e[3] ? e[3].slice(1, -1) : "";
|
|
591
591
|
return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)), rr(e, { href: r && r.replace(this.rules.inline.anyPunctuation, "$1"), title: s && s.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
|
|
592
592
|
}
|
|
@@ -596,8 +596,8 @@ ${T}`, s = s.substring(0, s.length - L.text.length) + U.text;
|
|
|
596
596
|
if ((n = this.rules.inline.reflink.exec(t)) || (n = this.rules.inline.nolink.exec(t))) {
|
|
597
597
|
let r = (n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " "), s = e[r.toLowerCase()];
|
|
598
598
|
if (!s) {
|
|
599
|
-
let
|
|
600
|
-
return { type: "text", raw:
|
|
599
|
+
let o = n[0].charAt(0);
|
|
600
|
+
return { type: "text", raw: o, text: o };
|
|
601
601
|
}
|
|
602
602
|
return rr(n, s, n[0], this.lexer, this.rules);
|
|
603
603
|
}
|
|
@@ -605,11 +605,11 @@ ${T}`, s = s.substring(0, s.length - L.text.length) + U.text;
|
|
|
605
605
|
emStrong(t, e, n = "") {
|
|
606
606
|
let r = this.rules.inline.emStrongLDelim.exec(t);
|
|
607
607
|
if (!(!r || !r[1] && !r[2] && !r[3] && !r[4] || r[4] && n.match(this.rules.other.unicodeAlphaNumeric)) && (!(r[1] || r[3]) || !n || this.rules.inline.punctuation.exec(n))) {
|
|
608
|
-
let s = [...r[0]].length - 1,
|
|
608
|
+
let s = [...r[0]].length - 1, o, l, u = s, c = 0, h = r[0][0], g = n === h, m = h === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
609
609
|
for (m.lastIndex = 0, e = e.slice(-1 * t.length + s); (r = m.exec(e)) !== null; ) {
|
|
610
|
-
if (
|
|
611
|
-
if (l = [...
|
|
612
|
-
|
|
610
|
+
if (o = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !o) continue;
|
|
611
|
+
if (l = [...o].length, r[3] || r[4]) {
|
|
612
|
+
u += l;
|
|
613
613
|
continue;
|
|
614
614
|
} else if (r[5] || r[6]) {
|
|
615
615
|
if (s % 3 && !((s + l) % 3)) {
|
|
@@ -618,12 +618,12 @@ ${T}`, s = s.substring(0, s.length - L.text.length) + U.text;
|
|
|
618
618
|
}
|
|
619
619
|
if (g) break;
|
|
620
620
|
}
|
|
621
|
-
if (
|
|
622
|
-
l = Math.min(l, l +
|
|
621
|
+
if (u -= l, u > 0) continue;
|
|
622
|
+
l = Math.min(l, l + u + c);
|
|
623
623
|
let k = [...r[0]][0].length, L = t.slice(0, s + r.index + k + l);
|
|
624
624
|
if (Math.min(s, l) % 2) {
|
|
625
|
-
let
|
|
626
|
-
return { type: "em", raw: L, text:
|
|
625
|
+
let q = L.slice(1, -1);
|
|
626
|
+
return { type: "em", raw: L, text: q, tokens: this.lexer.inlineTokens(q) };
|
|
627
627
|
}
|
|
628
628
|
let T = L.slice(2, -2);
|
|
629
629
|
return { type: "strong", raw: L, text: T, tokens: this.lexer.inlineTokens(T) };
|
|
@@ -644,15 +644,15 @@ ${T}`, s = s.substring(0, s.length - L.text.length) + U.text;
|
|
|
644
644
|
del(t, e, n = "") {
|
|
645
645
|
let r = this.rules.inline.delLDelim.exec(t);
|
|
646
646
|
if (r && (!r[1] || !n || this.rules.inline.punctuation.exec(n))) {
|
|
647
|
-
let s = [...r[0]].length - 1,
|
|
647
|
+
let s = [...r[0]].length - 1, o, l, u = s, c = this.rules.inline.delRDelim;
|
|
648
648
|
for (c.lastIndex = 0, e = e.slice(-1 * t.length + s); (r = c.exec(e)) !== null; ) {
|
|
649
|
-
if (
|
|
649
|
+
if (o = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !o || (l = [...o].length, l !== s)) continue;
|
|
650
650
|
if (r[3] || r[4]) {
|
|
651
|
-
|
|
651
|
+
u += l;
|
|
652
652
|
continue;
|
|
653
653
|
}
|
|
654
|
-
if (
|
|
655
|
-
l = Math.min(l, l +
|
|
654
|
+
if (u -= l, u > 0) continue;
|
|
655
|
+
l = Math.min(l, l + u);
|
|
656
656
|
let h = [...r[0]][0].length, g = t.slice(0, s + r.index + h + l), m = g.slice(s, -s);
|
|
657
657
|
return { type: "del", raw: g, text: m, tokens: this.lexer.inlineTokens(m) };
|
|
658
658
|
}
|
|
@@ -687,7 +687,7 @@ ${T}`, s = s.substring(0, s.length - L.text.length) + U.text;
|
|
|
687
687
|
return { type: "text", raw: e[0], text: e[0], escaped: n };
|
|
688
688
|
}
|
|
689
689
|
}
|
|
690
|
-
}, ie = class
|
|
690
|
+
}, ie = class un {
|
|
691
691
|
tokens;
|
|
692
692
|
options;
|
|
693
693
|
state;
|
|
@@ -702,10 +702,10 @@ ${T}`, s = s.substring(0, s.length - L.text.length) + U.text;
|
|
|
702
702
|
return { block: wt, inline: nt };
|
|
703
703
|
}
|
|
704
704
|
static lex(e, n) {
|
|
705
|
-
return new
|
|
705
|
+
return new un(n).lex(e);
|
|
706
706
|
}
|
|
707
707
|
static lexInline(e, n) {
|
|
708
|
-
return new
|
|
708
|
+
return new un(n).inlineTokens(e);
|
|
709
709
|
}
|
|
710
710
|
lex(e) {
|
|
711
711
|
e = e.replace(H.carriageReturn, `
|
|
@@ -725,87 +725,87 @@ ${T}`, s = s.substring(0, s.length - L.text.length) + U.text;
|
|
|
725
725
|
this.infiniteLoopError(e.charCodeAt(0));
|
|
726
726
|
break;
|
|
727
727
|
}
|
|
728
|
-
let
|
|
729
|
-
if (this.options.extensions?.block?.some((
|
|
730
|
-
if (
|
|
731
|
-
e = e.substring(
|
|
732
|
-
let
|
|
733
|
-
|
|
734
|
-
` : n.push(
|
|
728
|
+
let o;
|
|
729
|
+
if (this.options.extensions?.block?.some((u) => (o = u.call({ lexer: this }, e, n)) ? (e = e.substring(o.raw.length), n.push(o), !0) : !1)) continue;
|
|
730
|
+
if (o = this.tokenizer.space(e)) {
|
|
731
|
+
e = e.substring(o.raw.length);
|
|
732
|
+
let u = n.at(-1);
|
|
733
|
+
o.raw.length === 1 && u !== void 0 ? u.raw += `
|
|
734
|
+
` : n.push(o);
|
|
735
735
|
continue;
|
|
736
736
|
}
|
|
737
|
-
if (
|
|
738
|
-
e = e.substring(
|
|
739
|
-
let
|
|
740
|
-
|
|
737
|
+
if (o = this.tokenizer.code(e)) {
|
|
738
|
+
e = e.substring(o.raw.length);
|
|
739
|
+
let u = n.at(-1);
|
|
740
|
+
u?.type === "paragraph" || u?.type === "text" ? (u.raw += (u.raw.endsWith(`
|
|
741
741
|
`) ? "" : `
|
|
742
|
-
`) +
|
|
743
|
-
` +
|
|
742
|
+
`) + o.raw, u.text += `
|
|
743
|
+
` + o.text, this.inlineQueue.at(-1).src = u.text) : n.push(o);
|
|
744
744
|
continue;
|
|
745
745
|
}
|
|
746
|
-
if (
|
|
747
|
-
e = e.substring(
|
|
746
|
+
if (o = this.tokenizer.fences(e)) {
|
|
747
|
+
e = e.substring(o.raw.length), n.push(o);
|
|
748
748
|
continue;
|
|
749
749
|
}
|
|
750
|
-
if (
|
|
751
|
-
e = e.substring(
|
|
750
|
+
if (o = this.tokenizer.heading(e)) {
|
|
751
|
+
e = e.substring(o.raw.length), n.push(o);
|
|
752
752
|
continue;
|
|
753
753
|
}
|
|
754
|
-
if (
|
|
755
|
-
e = e.substring(
|
|
754
|
+
if (o = this.tokenizer.hr(e)) {
|
|
755
|
+
e = e.substring(o.raw.length), n.push(o);
|
|
756
756
|
continue;
|
|
757
757
|
}
|
|
758
|
-
if (
|
|
759
|
-
e = e.substring(
|
|
758
|
+
if (o = this.tokenizer.blockquote(e)) {
|
|
759
|
+
e = e.substring(o.raw.length), n.push(o);
|
|
760
760
|
continue;
|
|
761
761
|
}
|
|
762
|
-
if (
|
|
763
|
-
e = e.substring(
|
|
762
|
+
if (o = this.tokenizer.list(e)) {
|
|
763
|
+
e = e.substring(o.raw.length), n.push(o);
|
|
764
764
|
continue;
|
|
765
765
|
}
|
|
766
|
-
if (
|
|
767
|
-
e = e.substring(
|
|
766
|
+
if (o = this.tokenizer.html(e)) {
|
|
767
|
+
e = e.substring(o.raw.length), n.push(o);
|
|
768
768
|
continue;
|
|
769
769
|
}
|
|
770
|
-
if (
|
|
771
|
-
e = e.substring(
|
|
772
|
-
let
|
|
773
|
-
|
|
770
|
+
if (o = this.tokenizer.def(e)) {
|
|
771
|
+
e = e.substring(o.raw.length);
|
|
772
|
+
let u = n.at(-1);
|
|
773
|
+
u?.type === "paragraph" || u?.type === "text" ? (u.raw += (u.raw.endsWith(`
|
|
774
774
|
`) ? "" : `
|
|
775
|
-
`) +
|
|
776
|
-
` +
|
|
775
|
+
`) + o.raw, u.text += `
|
|
776
|
+
` + o.raw, this.inlineQueue.at(-1).src = u.text) : this.tokens.links[o.tag] || (this.tokens.links[o.tag] = { href: o.href, title: o.title }, n.push(o));
|
|
777
777
|
continue;
|
|
778
778
|
}
|
|
779
|
-
if (
|
|
780
|
-
e = e.substring(
|
|
779
|
+
if (o = this.tokenizer.table(e)) {
|
|
780
|
+
e = e.substring(o.raw.length), n.push(o);
|
|
781
781
|
continue;
|
|
782
782
|
}
|
|
783
|
-
if (
|
|
784
|
-
e = e.substring(
|
|
783
|
+
if (o = this.tokenizer.lheading(e)) {
|
|
784
|
+
e = e.substring(o.raw.length), n.push(o);
|
|
785
785
|
continue;
|
|
786
786
|
}
|
|
787
787
|
let l = e;
|
|
788
788
|
if (this.options.extensions?.startBlock) {
|
|
789
|
-
let
|
|
789
|
+
let u = 1 / 0, c = e.slice(1), h;
|
|
790
790
|
this.options.extensions.startBlock.forEach((g) => {
|
|
791
|
-
h = g.call({ lexer: this }, c), typeof h == "number" && h >= 0 && (
|
|
792
|
-
}),
|
|
791
|
+
h = g.call({ lexer: this }, c), typeof h == "number" && h >= 0 && (u = Math.min(u, h));
|
|
792
|
+
}), u < 1 / 0 && u >= 0 && (l = e.substring(0, u + 1));
|
|
793
793
|
}
|
|
794
|
-
if (this.state.top && (
|
|
795
|
-
let
|
|
796
|
-
r &&
|
|
794
|
+
if (this.state.top && (o = this.tokenizer.paragraph(l))) {
|
|
795
|
+
let u = n.at(-1);
|
|
796
|
+
r && u?.type === "paragraph" ? (u.raw += (u.raw.endsWith(`
|
|
797
797
|
`) ? "" : `
|
|
798
|
-
`) +
|
|
799
|
-
` +
|
|
798
|
+
`) + o.raw, u.text += `
|
|
799
|
+
` + o.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = u.text) : n.push(o), r = l.length !== e.length, e = e.substring(o.raw.length);
|
|
800
800
|
continue;
|
|
801
801
|
}
|
|
802
|
-
if (
|
|
803
|
-
e = e.substring(
|
|
804
|
-
let
|
|
805
|
-
|
|
802
|
+
if (o = this.tokenizer.text(e)) {
|
|
803
|
+
e = e.substring(o.raw.length);
|
|
804
|
+
let u = n.at(-1);
|
|
805
|
+
u?.type === "text" ? (u.raw += (u.raw.endsWith(`
|
|
806
806
|
`) ? "" : `
|
|
807
|
-
`) +
|
|
808
|
-
` +
|
|
807
|
+
`) + o.raw, u.text += `
|
|
808
|
+
` + o.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = u.text) : n.push(o);
|
|
809
809
|
continue;
|
|
810
810
|
}
|
|
811
811
|
if (e) {
|
|
@@ -822,63 +822,63 @@ ${T}`, s = s.substring(0, s.length - L.text.length) + U.text;
|
|
|
822
822
|
this.tokenizer.lexer = this;
|
|
823
823
|
let r = e;
|
|
824
824
|
if (this.tokens.links) {
|
|
825
|
-
let
|
|
826
|
-
|
|
825
|
+
let u = Object.keys(this.tokens.links);
|
|
826
|
+
u.length > 0 && (r = r.replace(this.tokenizer.rules.inline.reflinkSearch, (c) => u.includes(c.slice(c.lastIndexOf("[") + 1, -1)) ? "[" + "a".repeat(c.length - 2) + "]" : c));
|
|
827
827
|
}
|
|
828
|
-
r = r.replace(this.tokenizer.rules.inline.anyPunctuation, (
|
|
828
|
+
r = r.replace(this.tokenizer.rules.inline.anyPunctuation, (u) => "+".repeat(u.length)), r = r.replace(this.tokenizer.rules.inline.blockSkip, (u, c, h) => {
|
|
829
829
|
let g = h ? h.length : 0;
|
|
830
|
-
return
|
|
830
|
+
return u.slice(0, g) + "[" + "a".repeat(u.length - g - 2) + "]";
|
|
831
831
|
}), r = this.options.hooks?.emStrongMask?.call({ lexer: this }, r) ?? r;
|
|
832
|
-
let s = !1,
|
|
832
|
+
let s = !1, o = "", l = 1 / 0;
|
|
833
833
|
for (; e; ) {
|
|
834
834
|
if (e.length < l) l = e.length;
|
|
835
835
|
else {
|
|
836
836
|
this.infiniteLoopError(e.charCodeAt(0));
|
|
837
837
|
break;
|
|
838
838
|
}
|
|
839
|
-
s || (
|
|
840
|
-
let
|
|
841
|
-
if (this.options.extensions?.inline?.some((h) => (
|
|
842
|
-
if (
|
|
843
|
-
e = e.substring(
|
|
839
|
+
s || (o = ""), s = !1;
|
|
840
|
+
let u;
|
|
841
|
+
if (this.options.extensions?.inline?.some((h) => (u = h.call({ lexer: this }, e, n)) ? (e = e.substring(u.raw.length), n.push(u), !0) : !1)) continue;
|
|
842
|
+
if (u = this.tokenizer.escape(e)) {
|
|
843
|
+
e = e.substring(u.raw.length), n.push(u);
|
|
844
844
|
continue;
|
|
845
845
|
}
|
|
846
|
-
if (
|
|
847
|
-
e = e.substring(
|
|
846
|
+
if (u = this.tokenizer.tag(e)) {
|
|
847
|
+
e = e.substring(u.raw.length), n.push(u);
|
|
848
848
|
continue;
|
|
849
849
|
}
|
|
850
|
-
if (
|
|
851
|
-
e = e.substring(
|
|
850
|
+
if (u = this.tokenizer.link(e)) {
|
|
851
|
+
e = e.substring(u.raw.length), n.push(u);
|
|
852
852
|
continue;
|
|
853
853
|
}
|
|
854
|
-
if (
|
|
855
|
-
e = e.substring(
|
|
854
|
+
if (u = this.tokenizer.reflink(e, this.tokens.links)) {
|
|
855
|
+
e = e.substring(u.raw.length);
|
|
856
856
|
let h = n.at(-1);
|
|
857
|
-
|
|
857
|
+
u.type === "text" && h?.type === "text" ? (h.raw += u.raw, h.text += u.text) : n.push(u);
|
|
858
858
|
continue;
|
|
859
859
|
}
|
|
860
|
-
if (
|
|
861
|
-
e = e.substring(
|
|
860
|
+
if (u = this.tokenizer.emStrong(e, r, o)) {
|
|
861
|
+
e = e.substring(u.raw.length), n.push(u);
|
|
862
862
|
continue;
|
|
863
863
|
}
|
|
864
|
-
if (
|
|
865
|
-
e = e.substring(
|
|
864
|
+
if (u = this.tokenizer.codespan(e)) {
|
|
865
|
+
e = e.substring(u.raw.length), n.push(u);
|
|
866
866
|
continue;
|
|
867
867
|
}
|
|
868
|
-
if (
|
|
869
|
-
e = e.substring(
|
|
868
|
+
if (u = this.tokenizer.br(e)) {
|
|
869
|
+
e = e.substring(u.raw.length), n.push(u);
|
|
870
870
|
continue;
|
|
871
871
|
}
|
|
872
|
-
if (
|
|
873
|
-
e = e.substring(
|
|
872
|
+
if (u = this.tokenizer.del(e, r, o)) {
|
|
873
|
+
e = e.substring(u.raw.length), n.push(u);
|
|
874
874
|
continue;
|
|
875
875
|
}
|
|
876
|
-
if (
|
|
877
|
-
e = e.substring(
|
|
876
|
+
if (u = this.tokenizer.autolink(e)) {
|
|
877
|
+
e = e.substring(u.raw.length), n.push(u);
|
|
878
878
|
continue;
|
|
879
879
|
}
|
|
880
|
-
if (!this.state.inLink && (
|
|
881
|
-
e = e.substring(
|
|
880
|
+
if (!this.state.inLink && (u = this.tokenizer.url(e))) {
|
|
881
|
+
e = e.substring(u.raw.length), n.push(u);
|
|
882
882
|
continue;
|
|
883
883
|
}
|
|
884
884
|
let c = e;
|
|
@@ -888,10 +888,10 @@ ${T}`, s = s.substring(0, s.length - L.text.length) + U.text;
|
|
|
888
888
|
m = k.call({ lexer: this }, g), typeof m == "number" && m >= 0 && (h = Math.min(h, m));
|
|
889
889
|
}), h < 1 / 0 && h >= 0 && (c = e.substring(0, h + 1));
|
|
890
890
|
}
|
|
891
|
-
if (
|
|
892
|
-
e = e.substring(
|
|
891
|
+
if (u = this.tokenizer.inlineText(c)) {
|
|
892
|
+
e = e.substring(u.raw.length), u.raw.slice(-1) !== "_" && (o = u.raw.slice(-1)), s = !0;
|
|
893
893
|
let h = n.at(-1);
|
|
894
|
-
h?.type === "text" ? (h.raw +=
|
|
894
|
+
h?.type === "text" ? (h.raw += u.raw, h.text += u.text) : n.push(u);
|
|
895
895
|
continue;
|
|
896
896
|
}
|
|
897
897
|
if (e) {
|
|
@@ -944,11 +944,11 @@ ${this.parser.parse(t)}</blockquote>
|
|
|
944
944
|
list(t) {
|
|
945
945
|
let e = t.ordered, n = t.start, r = "";
|
|
946
946
|
for (let l = 0; l < t.items.length; l++) {
|
|
947
|
-
let
|
|
948
|
-
r += this.listitem(
|
|
947
|
+
let u = t.items[l];
|
|
948
|
+
r += this.listitem(u);
|
|
949
949
|
}
|
|
950
|
-
let s = e ? "ol" : "ul",
|
|
951
|
-
return "<" + s +
|
|
950
|
+
let s = e ? "ol" : "ul", o = e && n !== 1 ? ' start="' + n + '"' : "";
|
|
951
|
+
return "<" + s + o + `>
|
|
952
952
|
` + r + "</" + s + `>
|
|
953
953
|
`;
|
|
954
954
|
}
|
|
@@ -969,9 +969,9 @@ ${this.parser.parse(t)}</blockquote>
|
|
|
969
969
|
e += this.tablerow({ text: n });
|
|
970
970
|
let r = "";
|
|
971
971
|
for (let s = 0; s < t.rows.length; s++) {
|
|
972
|
-
let
|
|
972
|
+
let o = t.rows[s];
|
|
973
973
|
n = "";
|
|
974
|
-
for (let l = 0; l <
|
|
974
|
+
for (let l = 0; l < o.length; l++) n += this.tablecell(o[l]);
|
|
975
975
|
r += this.tablerow({ text: n });
|
|
976
976
|
}
|
|
977
977
|
return r && (r = `<tbody>${r}</tbody>`), `<table>
|
|
@@ -1009,16 +1009,16 @@ ${t}</tr>
|
|
|
1009
1009
|
let r = this.parser.parseInline(n), s = er(t);
|
|
1010
1010
|
if (s === null) return r;
|
|
1011
1011
|
t = s;
|
|
1012
|
-
let
|
|
1013
|
-
return e && (
|
|
1012
|
+
let o = '<a href="' + t + '"';
|
|
1013
|
+
return e && (o += ' title="' + pe(e) + '"'), o += ">" + r + "</a>", o;
|
|
1014
1014
|
}
|
|
1015
1015
|
image({ href: t, title: e, text: n, tokens: r }) {
|
|
1016
1016
|
r && (n = this.parser.parseInline(r, this.parser.textRenderer));
|
|
1017
1017
|
let s = er(t);
|
|
1018
1018
|
if (s === null) return pe(n);
|
|
1019
1019
|
t = s;
|
|
1020
|
-
let
|
|
1021
|
-
return e && (
|
|
1020
|
+
let o = `<img src="${t}" alt="${pe(n)}"`;
|
|
1021
|
+
return e && (o += ` title="${pe(e)}"`), o += ">", o;
|
|
1022
1022
|
}
|
|
1023
1023
|
text(t) {
|
|
1024
1024
|
return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text : pe(t.text);
|
|
@@ -1054,7 +1054,7 @@ ${t}</tr>
|
|
|
1054
1054
|
checkbox({ raw: t }) {
|
|
1055
1055
|
return t;
|
|
1056
1056
|
}
|
|
1057
|
-
},
|
|
1057
|
+
}, oe = class ln {
|
|
1058
1058
|
options;
|
|
1059
1059
|
renderer;
|
|
1060
1060
|
textRenderer;
|
|
@@ -1073,64 +1073,64 @@ ${t}</tr>
|
|
|
1073
1073
|
for (let r = 0; r < e.length; r++) {
|
|
1074
1074
|
let s = e[r];
|
|
1075
1075
|
if (this.options.extensions?.renderers?.[s.type]) {
|
|
1076
|
-
let l = s,
|
|
1077
|
-
if (
|
|
1078
|
-
n +=
|
|
1076
|
+
let l = s, u = this.options.extensions.renderers[l.type].call({ parser: this }, l);
|
|
1077
|
+
if (u !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "checkbox", "html", "def", "paragraph", "text"].includes(l.type)) {
|
|
1078
|
+
n += u || "";
|
|
1079
1079
|
continue;
|
|
1080
1080
|
}
|
|
1081
1081
|
}
|
|
1082
|
-
let
|
|
1083
|
-
switch (
|
|
1082
|
+
let o = s;
|
|
1083
|
+
switch (o.type) {
|
|
1084
1084
|
case "space": {
|
|
1085
|
-
n += this.renderer.space(
|
|
1085
|
+
n += this.renderer.space(o);
|
|
1086
1086
|
break;
|
|
1087
1087
|
}
|
|
1088
1088
|
case "hr": {
|
|
1089
|
-
n += this.renderer.hr(
|
|
1089
|
+
n += this.renderer.hr(o);
|
|
1090
1090
|
break;
|
|
1091
1091
|
}
|
|
1092
1092
|
case "heading": {
|
|
1093
|
-
n += this.renderer.heading(
|
|
1093
|
+
n += this.renderer.heading(o);
|
|
1094
1094
|
break;
|
|
1095
1095
|
}
|
|
1096
1096
|
case "code": {
|
|
1097
|
-
n += this.renderer.code(
|
|
1097
|
+
n += this.renderer.code(o);
|
|
1098
1098
|
break;
|
|
1099
1099
|
}
|
|
1100
1100
|
case "table": {
|
|
1101
|
-
n += this.renderer.table(
|
|
1101
|
+
n += this.renderer.table(o);
|
|
1102
1102
|
break;
|
|
1103
1103
|
}
|
|
1104
1104
|
case "blockquote": {
|
|
1105
|
-
n += this.renderer.blockquote(
|
|
1105
|
+
n += this.renderer.blockquote(o);
|
|
1106
1106
|
break;
|
|
1107
1107
|
}
|
|
1108
1108
|
case "list": {
|
|
1109
|
-
n += this.renderer.list(
|
|
1109
|
+
n += this.renderer.list(o);
|
|
1110
1110
|
break;
|
|
1111
1111
|
}
|
|
1112
1112
|
case "checkbox": {
|
|
1113
|
-
n += this.renderer.checkbox(
|
|
1113
|
+
n += this.renderer.checkbox(o);
|
|
1114
1114
|
break;
|
|
1115
1115
|
}
|
|
1116
1116
|
case "html": {
|
|
1117
|
-
n += this.renderer.html(
|
|
1117
|
+
n += this.renderer.html(o);
|
|
1118
1118
|
break;
|
|
1119
1119
|
}
|
|
1120
1120
|
case "def": {
|
|
1121
|
-
n += this.renderer.def(
|
|
1121
|
+
n += this.renderer.def(o);
|
|
1122
1122
|
break;
|
|
1123
1123
|
}
|
|
1124
1124
|
case "paragraph": {
|
|
1125
|
-
n += this.renderer.paragraph(
|
|
1125
|
+
n += this.renderer.paragraph(o);
|
|
1126
1126
|
break;
|
|
1127
1127
|
}
|
|
1128
1128
|
case "text": {
|
|
1129
|
-
n += this.renderer.text(
|
|
1129
|
+
n += this.renderer.text(o);
|
|
1130
1130
|
break;
|
|
1131
1131
|
}
|
|
1132
1132
|
default: {
|
|
1133
|
-
let l = 'Token with "' +
|
|
1133
|
+
let l = 'Token with "' + o.type + '" type was not found.';
|
|
1134
1134
|
if (this.options.silent) return console.error(l), "";
|
|
1135
1135
|
throw new Error(l);
|
|
1136
1136
|
}
|
|
@@ -1142,15 +1142,15 @@ ${t}</tr>
|
|
|
1142
1142
|
this.renderer.parser = this;
|
|
1143
1143
|
let r = "";
|
|
1144
1144
|
for (let s = 0; s < e.length; s++) {
|
|
1145
|
-
let
|
|
1146
|
-
if (this.options.extensions?.renderers?.[
|
|
1147
|
-
let
|
|
1148
|
-
if (
|
|
1149
|
-
r +=
|
|
1145
|
+
let o = e[s];
|
|
1146
|
+
if (this.options.extensions?.renderers?.[o.type]) {
|
|
1147
|
+
let u = this.options.extensions.renderers[o.type].call({ parser: this }, o);
|
|
1148
|
+
if (u !== !1 || !["escape", "html", "link", "image", "checkbox", "strong", "em", "codespan", "br", "del", "text"].includes(o.type)) {
|
|
1149
|
+
r += u || "";
|
|
1150
1150
|
continue;
|
|
1151
1151
|
}
|
|
1152
1152
|
}
|
|
1153
|
-
let l =
|
|
1153
|
+
let l = o;
|
|
1154
1154
|
switch (l.type) {
|
|
1155
1155
|
case "escape": {
|
|
1156
1156
|
r += n.text(l);
|
|
@@ -1197,15 +1197,15 @@ ${t}</tr>
|
|
|
1197
1197
|
break;
|
|
1198
1198
|
}
|
|
1199
1199
|
default: {
|
|
1200
|
-
let
|
|
1201
|
-
if (this.options.silent) return console.error(
|
|
1202
|
-
throw new Error(
|
|
1200
|
+
let u = 'Token with "' + l.type + '" type was not found.';
|
|
1201
|
+
if (this.options.silent) return console.error(u), "";
|
|
1202
|
+
throw new Error(u);
|
|
1203
1203
|
}
|
|
1204
1204
|
}
|
|
1205
1205
|
}
|
|
1206
1206
|
return r;
|
|
1207
1207
|
}
|
|
1208
|
-
},
|
|
1208
|
+
}, ut = class {
|
|
1209
1209
|
options;
|
|
1210
1210
|
block;
|
|
1211
1211
|
constructor(t) {
|
|
@@ -1229,19 +1229,19 @@ ${t}</tr>
|
|
|
1229
1229
|
return t ? ie.lex : ie.lexInline;
|
|
1230
1230
|
}
|
|
1231
1231
|
provideParser(t = this.block) {
|
|
1232
|
-
return t ?
|
|
1232
|
+
return t ? oe.parse : oe.parseInline;
|
|
1233
1233
|
}
|
|
1234
|
-
},
|
|
1234
|
+
}, vr = class {
|
|
1235
1235
|
defaults = pn();
|
|
1236
1236
|
options = this.setOptions;
|
|
1237
1237
|
parse = this.parseMarkdown(!0);
|
|
1238
1238
|
parseInline = this.parseMarkdown(!1);
|
|
1239
|
-
Parser =
|
|
1239
|
+
Parser = oe;
|
|
1240
1240
|
Renderer = Ot;
|
|
1241
1241
|
TextRenderer = Fn;
|
|
1242
1242
|
Lexer = ie;
|
|
1243
1243
|
Tokenizer = vt;
|
|
1244
|
-
Hooks =
|
|
1244
|
+
Hooks = ut;
|
|
1245
1245
|
constructor(...t) {
|
|
1246
1246
|
this.use(...t);
|
|
1247
1247
|
}
|
|
@@ -1250,8 +1250,8 @@ ${t}</tr>
|
|
|
1250
1250
|
for (let r of t) switch (n = n.concat(e.call(this, r)), r.type) {
|
|
1251
1251
|
case "table": {
|
|
1252
1252
|
let s = r;
|
|
1253
|
-
for (let
|
|
1254
|
-
for (let
|
|
1253
|
+
for (let o of s.header) n = n.concat(this.walkTokens(o.tokens, e));
|
|
1254
|
+
for (let o of s.rows) for (let l of o) n = n.concat(this.walkTokens(l.tokens, e));
|
|
1255
1255
|
break;
|
|
1256
1256
|
}
|
|
1257
1257
|
case "list": {
|
|
@@ -1261,8 +1261,8 @@ ${t}</tr>
|
|
|
1261
1261
|
}
|
|
1262
1262
|
default: {
|
|
1263
1263
|
let s = r;
|
|
1264
|
-
this.defaults.extensions?.childTokens?.[s.type] ? this.defaults.extensions.childTokens[s.type].forEach((
|
|
1265
|
-
let l = s[
|
|
1264
|
+
this.defaults.extensions?.childTokens?.[s.type] ? this.defaults.extensions.childTokens[s.type].forEach((o) => {
|
|
1265
|
+
let l = s[o].flat(1 / 0);
|
|
1266
1266
|
n = n.concat(this.walkTokens(l, e));
|
|
1267
1267
|
}) : s.tokens && (n = n.concat(this.walkTokens(s.tokens, e)));
|
|
1268
1268
|
}
|
|
@@ -1276,26 +1276,26 @@ ${t}</tr>
|
|
|
1276
1276
|
if (r.async = this.defaults.async || r.async || !1, n.extensions && (n.extensions.forEach((s) => {
|
|
1277
1277
|
if (!s.name) throw new Error("extension name required");
|
|
1278
1278
|
if ("renderer" in s) {
|
|
1279
|
-
let
|
|
1280
|
-
|
|
1281
|
-
let
|
|
1282
|
-
return
|
|
1279
|
+
let o = e.renderers[s.name];
|
|
1280
|
+
o ? e.renderers[s.name] = function(...l) {
|
|
1281
|
+
let u = s.renderer.apply(this, l);
|
|
1282
|
+
return u === !1 && (u = o.apply(this, l)), u;
|
|
1283
1283
|
} : e.renderers[s.name] = s.renderer;
|
|
1284
1284
|
}
|
|
1285
1285
|
if ("tokenizer" in s) {
|
|
1286
1286
|
if (!s.level || s.level !== "block" && s.level !== "inline") throw new Error("extension level must be 'block' or 'inline'");
|
|
1287
|
-
let
|
|
1288
|
-
|
|
1287
|
+
let o = e[s.level];
|
|
1288
|
+
o ? o.unshift(s.tokenizer) : e[s.level] = [s.tokenizer], s.start && (s.level === "block" ? e.startBlock ? e.startBlock.push(s.start) : e.startBlock = [s.start] : s.level === "inline" && (e.startInline ? e.startInline.push(s.start) : e.startInline = [s.start]));
|
|
1289
1289
|
}
|
|
1290
1290
|
"childTokens" in s && s.childTokens && (e.childTokens[s.name] = s.childTokens);
|
|
1291
1291
|
}), r.extensions = e), n.renderer) {
|
|
1292
1292
|
let s = this.defaults.renderer || new Ot(this.defaults);
|
|
1293
|
-
for (let
|
|
1294
|
-
if (!(
|
|
1295
|
-
if (["options", "parser"].includes(
|
|
1296
|
-
let l =
|
|
1293
|
+
for (let o in n.renderer) {
|
|
1294
|
+
if (!(o in s)) throw new Error(`renderer '${o}' does not exist`);
|
|
1295
|
+
if (["options", "parser"].includes(o)) continue;
|
|
1296
|
+
let l = o, u = n.renderer[l], c = s[l];
|
|
1297
1297
|
s[l] = (...h) => {
|
|
1298
|
-
let g =
|
|
1298
|
+
let g = u.apply(s, h);
|
|
1299
1299
|
return g === !1 && (g = c.apply(s, h)), g || "";
|
|
1300
1300
|
};
|
|
1301
1301
|
}
|
|
@@ -1303,46 +1303,46 @@ ${t}</tr>
|
|
|
1303
1303
|
}
|
|
1304
1304
|
if (n.tokenizer) {
|
|
1305
1305
|
let s = this.defaults.tokenizer || new vt(this.defaults);
|
|
1306
|
-
for (let
|
|
1307
|
-
if (!(
|
|
1308
|
-
if (["options", "rules", "lexer"].includes(
|
|
1309
|
-
let l =
|
|
1306
|
+
for (let o in n.tokenizer) {
|
|
1307
|
+
if (!(o in s)) throw new Error(`tokenizer '${o}' does not exist`);
|
|
1308
|
+
if (["options", "rules", "lexer"].includes(o)) continue;
|
|
1309
|
+
let l = o, u = n.tokenizer[l], c = s[l];
|
|
1310
1310
|
s[l] = (...h) => {
|
|
1311
|
-
let g =
|
|
1311
|
+
let g = u.apply(s, h);
|
|
1312
1312
|
return g === !1 && (g = c.apply(s, h)), g;
|
|
1313
1313
|
};
|
|
1314
1314
|
}
|
|
1315
1315
|
r.tokenizer = s;
|
|
1316
1316
|
}
|
|
1317
1317
|
if (n.hooks) {
|
|
1318
|
-
let s = this.defaults.hooks || new
|
|
1319
|
-
for (let
|
|
1320
|
-
if (!(
|
|
1321
|
-
if (["options", "block"].includes(
|
|
1322
|
-
let l =
|
|
1323
|
-
|
|
1324
|
-
if (this.defaults.async &&
|
|
1325
|
-
let m = await
|
|
1318
|
+
let s = this.defaults.hooks || new ut();
|
|
1319
|
+
for (let o in n.hooks) {
|
|
1320
|
+
if (!(o in s)) throw new Error(`hook '${o}' does not exist`);
|
|
1321
|
+
if (["options", "block"].includes(o)) continue;
|
|
1322
|
+
let l = o, u = n.hooks[l], c = s[l];
|
|
1323
|
+
ut.passThroughHooks.has(o) ? s[l] = (h) => {
|
|
1324
|
+
if (this.defaults.async && ut.passThroughHooksRespectAsync.has(o)) return (async () => {
|
|
1325
|
+
let m = await u.call(s, h);
|
|
1326
1326
|
return c.call(s, m);
|
|
1327
1327
|
})();
|
|
1328
|
-
let g =
|
|
1328
|
+
let g = u.call(s, h);
|
|
1329
1329
|
return c.call(s, g);
|
|
1330
1330
|
} : s[l] = (...h) => {
|
|
1331
1331
|
if (this.defaults.async) return (async () => {
|
|
1332
|
-
let m = await
|
|
1332
|
+
let m = await u.apply(s, h);
|
|
1333
1333
|
return m === !1 && (m = await c.apply(s, h)), m;
|
|
1334
1334
|
})();
|
|
1335
|
-
let g =
|
|
1335
|
+
let g = u.apply(s, h);
|
|
1336
1336
|
return g === !1 && (g = c.apply(s, h)), g;
|
|
1337
1337
|
};
|
|
1338
1338
|
}
|
|
1339
1339
|
r.hooks = s;
|
|
1340
1340
|
}
|
|
1341
1341
|
if (n.walkTokens) {
|
|
1342
|
-
let s = this.defaults.walkTokens,
|
|
1342
|
+
let s = this.defaults.walkTokens, o = n.walkTokens;
|
|
1343
1343
|
r.walkTokens = function(l) {
|
|
1344
|
-
let
|
|
1345
|
-
return
|
|
1344
|
+
let u = [];
|
|
1345
|
+
return u.push(o.call(this, l)), s && (u = u.concat(s.call(this, l))), u;
|
|
1346
1346
|
};
|
|
1347
1347
|
}
|
|
1348
1348
|
this.defaults = { ...this.defaults, ...r };
|
|
@@ -1355,28 +1355,28 @@ ${t}</tr>
|
|
|
1355
1355
|
return ie.lex(t, e ?? this.defaults);
|
|
1356
1356
|
}
|
|
1357
1357
|
parser(t, e) {
|
|
1358
|
-
return
|
|
1358
|
+
return oe.parse(t, e ?? this.defaults);
|
|
1359
1359
|
}
|
|
1360
1360
|
parseMarkdown(t) {
|
|
1361
1361
|
return (e, n) => {
|
|
1362
|
-
let r = { ...n }, s = { ...this.defaults, ...r },
|
|
1363
|
-
if (this.defaults.async === !0 && r.async === !1) return
|
|
1364
|
-
if (typeof e > "u" || e === null) return
|
|
1365
|
-
if (typeof e != "string") return
|
|
1362
|
+
let r = { ...n }, s = { ...this.defaults, ...r }, o = this.onError(!!s.silent, !!s.async);
|
|
1363
|
+
if (this.defaults.async === !0 && r.async === !1) return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
|
|
1364
|
+
if (typeof e > "u" || e === null) return o(new Error("marked(): input parameter is undefined or null"));
|
|
1365
|
+
if (typeof e != "string") return o(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
|
|
1366
1366
|
if (s.hooks && (s.hooks.options = s, s.hooks.block = t), s.async) return (async () => {
|
|
1367
|
-
let l = s.hooks ? await s.hooks.preprocess(e) : e,
|
|
1367
|
+
let l = s.hooks ? await s.hooks.preprocess(e) : e, u = await (s.hooks ? await s.hooks.provideLexer(t) : t ? ie.lex : ie.lexInline)(l, s), c = s.hooks ? await s.hooks.processAllTokens(u) : u;
|
|
1368
1368
|
s.walkTokens && await Promise.all(this.walkTokens(c, s.walkTokens));
|
|
1369
|
-
let h = await (s.hooks ? await s.hooks.provideParser(t) : t ?
|
|
1369
|
+
let h = await (s.hooks ? await s.hooks.provideParser(t) : t ? oe.parse : oe.parseInline)(c, s);
|
|
1370
1370
|
return s.hooks ? await s.hooks.postprocess(h) : h;
|
|
1371
|
-
})().catch(
|
|
1371
|
+
})().catch(o);
|
|
1372
1372
|
try {
|
|
1373
1373
|
s.hooks && (e = s.hooks.preprocess(e));
|
|
1374
1374
|
let l = (s.hooks ? s.hooks.provideLexer(t) : t ? ie.lex : ie.lexInline)(e, s);
|
|
1375
1375
|
s.hooks && (l = s.hooks.processAllTokens(l)), s.walkTokens && this.walkTokens(l, s.walkTokens);
|
|
1376
|
-
let
|
|
1377
|
-
return s.hooks && (
|
|
1376
|
+
let u = (s.hooks ? s.hooks.provideParser(t) : t ? oe.parse : oe.parseInline)(l, s);
|
|
1377
|
+
return s.hooks && (u = s.hooks.postprocess(u)), u;
|
|
1378
1378
|
} catch (l) {
|
|
1379
|
-
return
|
|
1379
|
+
return o(l);
|
|
1380
1380
|
}
|
|
1381
1381
|
};
|
|
1382
1382
|
}
|
|
@@ -1391,40 +1391,130 @@ Please report this to https://github.com/markedjs/marked.`, t) {
|
|
|
1391
1391
|
throw n;
|
|
1392
1392
|
};
|
|
1393
1393
|
}
|
|
1394
|
-
}, Be = new
|
|
1395
|
-
function
|
|
1394
|
+
}, Be = new vr();
|
|
1395
|
+
function _(t, e) {
|
|
1396
1396
|
return Be.parse(t, e);
|
|
1397
1397
|
}
|
|
1398
|
-
|
|
1399
|
-
return Be.setOptions(t),
|
|
1398
|
+
_.options = _.setOptions = function(t) {
|
|
1399
|
+
return Be.setOptions(t), _.defaults = Be.defaults, kr(_.defaults), _;
|
|
1400
1400
|
};
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
function
|
|
1404
|
-
return Be.use(...t),
|
|
1401
|
+
_.getDefaults = pn;
|
|
1402
|
+
_.defaults = ve;
|
|
1403
|
+
function si(...t) {
|
|
1404
|
+
return Be.use(...t), _.defaults = Be.defaults, kr(_.defaults), _;
|
|
1405
1405
|
}
|
|
1406
|
-
|
|
1407
|
-
|
|
1406
|
+
_.use = si;
|
|
1407
|
+
_.walkTokens = function(t, e) {
|
|
1408
1408
|
return Be.walkTokens(t, e);
|
|
1409
1409
|
};
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1410
|
+
_.parseInline = Be.parseInline;
|
|
1411
|
+
_.Parser = oe;
|
|
1412
|
+
_.parser = oe.parse;
|
|
1413
|
+
_.Renderer = Ot;
|
|
1414
|
+
_.TextRenderer = Fn;
|
|
1415
|
+
_.Lexer = ie;
|
|
1416
|
+
_.lexer = ie.lex;
|
|
1417
|
+
_.Tokenizer = vt;
|
|
1418
|
+
_.Hooks = ut;
|
|
1419
|
+
_.parse = _;
|
|
1420
|
+
_.options;
|
|
1421
|
+
_.setOptions;
|
|
1422
|
+
_.walkTokens;
|
|
1423
|
+
_.parseInline;
|
|
1424
|
+
oe.parse;
|
|
1425
1425
|
ie.lex;
|
|
1426
|
-
const
|
|
1427
|
-
|
|
1426
|
+
const ii = (t) => {
|
|
1427
|
+
const e = [], n = [];
|
|
1428
|
+
let r = -1, s = -1;
|
|
1429
|
+
for (const { children: o, ...l } of t) {
|
|
1430
|
+
if (r < l.depth && l.depth <= s + 1) {
|
|
1431
|
+
const u = l.depth - r;
|
|
1432
|
+
s = l.depth;
|
|
1433
|
+
const c = n[u - 1];
|
|
1434
|
+
c.children ??= [], c.children.push(l), n[u] = l;
|
|
1435
|
+
continue;
|
|
1436
|
+
}
|
|
1437
|
+
e.push(l), n[0] = l, r = s = l.depth;
|
|
1438
|
+
}
|
|
1439
|
+
return e;
|
|
1440
|
+
};
|
|
1441
|
+
var sr;
|
|
1442
|
+
((t) => {
|
|
1443
|
+
t.clickable = `
|
|
1444
|
+
px-2
|
|
1445
|
+
min-h-[calc(44/16*1rem)]
|
|
1446
|
+
border
|
|
1447
|
+
border-transparent
|
|
1448
|
+
rounded-lg
|
|
1449
|
+
hover:bg-solid-gray-50
|
|
1450
|
+
`, t.selected = `
|
|
1451
|
+
rounded-full
|
|
1452
|
+
bg-yellow-50
|
|
1453
|
+
`;
|
|
1454
|
+
const e = `
|
|
1455
|
+
focus-visible:outline-4
|
|
1456
|
+
focus-visible:outline-black
|
|
1457
|
+
focus-visible:ring-yellow-300
|
|
1458
|
+
`;
|
|
1459
|
+
t.focusRectCondensed = `
|
|
1460
|
+
${e}
|
|
1461
|
+
focus-visible:-outline-offset-4
|
|
1462
|
+
focus-visible:ring-[calc(6/16*1rem)]
|
|
1463
|
+
focus-visible:ring-inset
|
|
1464
|
+
`, t.focusRectCondensedWithBg = `
|
|
1465
|
+
${t.focusRectCondensed}
|
|
1466
|
+
focus-visible:bg-yellow-300
|
|
1467
|
+
`, t.focusRect = `
|
|
1468
|
+
${e}
|
|
1469
|
+
focus-visible:outline-offset-[calc(2/16*1rem)]
|
|
1470
|
+
focus-visible:ring-[calc(2/16*1rem)]
|
|
1471
|
+
`, t.focusRounded = `
|
|
1472
|
+
${t.focusRect}
|
|
1473
|
+
focus-visible:rounded-sm
|
|
1474
|
+
`, t.focusCard = `
|
|
1475
|
+
${t.focusRect}
|
|
1476
|
+
focus-visible:rounded-2xl
|
|
1477
|
+
sm:focus-visible:rounded-3xl
|
|
1478
|
+
`, t.focusRectWithBg = `
|
|
1479
|
+
${t.focusRect}
|
|
1480
|
+
focus-visible:bg-yellow-300
|
|
1481
|
+
`, t.focusRoundedWithBg = `
|
|
1482
|
+
${t.focusRectWithBg}
|
|
1483
|
+
focus-visible:rounded-sm
|
|
1484
|
+
`, t.hoverUnderline = `
|
|
1485
|
+
hover:underline
|
|
1486
|
+
hover:underline-offset-[calc(3/16*1rem)]
|
|
1487
|
+
`, t.underline = `
|
|
1488
|
+
underline
|
|
1489
|
+
underline-offset-[calc(3/16*1rem)]
|
|
1490
|
+
hover:decoration-[calc(3/16*1rem)]
|
|
1491
|
+
`, t.underlineNoDeco = `
|
|
1492
|
+
underline
|
|
1493
|
+
underline-offset-[calc(3/16*1rem)]
|
|
1494
|
+
`, t.popover = `
|
|
1495
|
+
min-w-fit
|
|
1496
|
+
w-auto
|
|
1497
|
+
py-2
|
|
1498
|
+
bg-white
|
|
1499
|
+
shadow-1
|
|
1500
|
+
rounded-lg
|
|
1501
|
+
border
|
|
1502
|
+
border-solid-gray-420
|
|
1503
|
+
has-[>:nth-child(7)]:rounded-r-none
|
|
1504
|
+
`, ((n) => {
|
|
1505
|
+
n.focus = `
|
|
1506
|
+
peer-focus-visible:outline-4
|
|
1507
|
+
peer-focus-visible:outline-black
|
|
1508
|
+
peer-focus-visible:ring-yellow-300
|
|
1509
|
+
`, n.focusRect = `
|
|
1510
|
+
${n.focus}
|
|
1511
|
+
peer-focus-visible:outline-offset-[calc(2/16*1rem)]
|
|
1512
|
+
peer-focus-visible:ring-[calc(2/16*1rem)]
|
|
1513
|
+
`;
|
|
1514
|
+
})(t.Peer || (t.Peer = {}));
|
|
1515
|
+
})(sr || (sr = {}));
|
|
1516
|
+
const oi = /[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g, ui = Object.hasOwnProperty;
|
|
1517
|
+
class li {
|
|
1428
1518
|
/**
|
|
1429
1519
|
* Create a new slug class.
|
|
1430
1520
|
*/
|
|
@@ -1447,10 +1537,10 @@ class ui {
|
|
|
1447
1537
|
*/
|
|
1448
1538
|
slug(e, n) {
|
|
1449
1539
|
const r = this;
|
|
1450
|
-
let s =
|
|
1451
|
-
const
|
|
1452
|
-
for (;
|
|
1453
|
-
r.occurrences[
|
|
1540
|
+
let s = ai(e, n === !0);
|
|
1541
|
+
const o = s;
|
|
1542
|
+
for (; ui.call(r.occurrences, s); )
|
|
1543
|
+
r.occurrences[o]++, s = o + "-" + r.occurrences[o];
|
|
1454
1544
|
return r.occurrences[s] = 0, s;
|
|
1455
1545
|
}
|
|
1456
1546
|
/**
|
|
@@ -1462,26 +1552,26 @@ class ui {
|
|
|
1462
1552
|
this.occurrences = /* @__PURE__ */ Object.create(null);
|
|
1463
1553
|
}
|
|
1464
1554
|
}
|
|
1465
|
-
function
|
|
1466
|
-
return typeof t != "string" ? "" : (e || (t = t.toLowerCase()), t.replace(
|
|
1555
|
+
function ai(t, e) {
|
|
1556
|
+
return typeof t != "string" ? "" : (e || (t = t.toLowerCase()), t.replace(oi, "").replace(/ /g, "-"));
|
|
1467
1557
|
}
|
|
1468
|
-
const
|
|
1558
|
+
const ci = {
|
|
1469
1559
|
"&": "&",
|
|
1470
1560
|
"<": "<",
|
|
1471
1561
|
">": ">",
|
|
1472
1562
|
'"': """,
|
|
1473
1563
|
"'": "'"
|
|
1474
|
-
},
|
|
1564
|
+
}, pi = (t) => String(t).replace(/[&<>"']/g, (e) => ci[e] ?? e), fi = (t) => Array.from(t).filter((e) => {
|
|
1475
1565
|
const n = e.codePointAt(0) ?? 0;
|
|
1476
1566
|
return n > 31 && n !== 127;
|
|
1477
1567
|
}).join(""), at = (t) => {
|
|
1478
1568
|
if (t == null || t === "") return;
|
|
1479
|
-
const e =
|
|
1569
|
+
const e = fi(String(t)).trim();
|
|
1480
1570
|
if (!/^(?:javascript|vbscript|file):/i.test(e) && !/^data:/i.test(e))
|
|
1481
1571
|
return e;
|
|
1482
|
-
},
|
|
1483
|
-
([e, n]) => n != null && n !== !1 && (n !== "" ||
|
|
1484
|
-
).map(([e, n]) => n === !0 ? ` ${e}` : ` ${e}="${
|
|
1572
|
+
}, hi = /* @__PURE__ */ new Set(["alt"]), di = (t) => Object.entries(t).filter(
|
|
1573
|
+
([e, n]) => n != null && n !== !1 && (n !== "" || hi.has(e))
|
|
1574
|
+
).map(([e, n]) => n === !0 ? ` ${e}` : ` ${e}="${pi(n)}"`).join(""), O = (...t) => t.filter(Boolean).join(" ").split(/\s+/).filter(Boolean).join(" "), Di = {
|
|
1485
1575
|
h1: E.headingStyle.h1,
|
|
1486
1576
|
h2: E.headingStyle.h2,
|
|
1487
1577
|
h3: E.headingStyle.h3,
|
|
@@ -1498,16 +1588,16 @@ const li = {
|
|
|
1498
1588
|
tr: E.tableBorderStyle,
|
|
1499
1589
|
td: O(E.tdStyle, E.tableBorderStyle),
|
|
1500
1590
|
a: E.linkStyle
|
|
1501
|
-
},
|
|
1591
|
+
}, gi = (t) => t.hasAttribute("data-styled"), mi = (t) => Array.from(
|
|
1502
1592
|
/* @__PURE__ */ new Set([
|
|
1503
1593
|
"noopener",
|
|
1504
1594
|
"noreferrer",
|
|
1505
1595
|
...(t ?? "").split(/\s+/).filter(Boolean)
|
|
1506
1596
|
])
|
|
1507
|
-
).join(" "),
|
|
1597
|
+
).join(" "), Fi = (t, e) => {
|
|
1508
1598
|
const n = O(t.getAttribute("class") ?? "", e);
|
|
1509
1599
|
n && t.setAttribute("class", n);
|
|
1510
|
-
},
|
|
1600
|
+
}, Ai = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "h6"]), Ei = (t, e) => {
|
|
1511
1601
|
if (t.querySelector("[data-new-tab]")) return;
|
|
1512
1602
|
const n = e.createElement("span");
|
|
1513
1603
|
n.setAttribute("aria-hidden", "true"), n.setAttribute("data-new-tab", "true"), n.setAttribute(
|
|
@@ -1516,57 +1606,57 @@ const li = {
|
|
|
1516
1606
|
), n.textContent = "open_in_new";
|
|
1517
1607
|
const r = e.createElement("span");
|
|
1518
1608
|
r.setAttribute("class", "sr-only"), r.textContent = "Opens in new tab", t.append(n, r);
|
|
1519
|
-
},
|
|
1520
|
-
const { shiftHeading: r, tocMaxDepth: s } = n,
|
|
1609
|
+
}, bi = (t) => Math.min(6, Math.max(1, t)), ki = (t, e, n) => {
|
|
1610
|
+
const { shiftHeading: r, tocMaxDepth: s } = n, o = new li(), l = [];
|
|
1521
1611
|
if (r !== 0)
|
|
1522
|
-
for (const
|
|
1612
|
+
for (const u of Array.from(
|
|
1523
1613
|
t.querySelectorAll("h1,h2,h3,h4,h5,h6")
|
|
1524
1614
|
)) {
|
|
1525
|
-
const c = Number(
|
|
1526
|
-
`h${
|
|
1615
|
+
const c = Number(u.tagName[1]), h = e.createElement(
|
|
1616
|
+
`h${bi(c + r)}`
|
|
1527
1617
|
);
|
|
1528
|
-
for (const g of Array.from(
|
|
1618
|
+
for (const g of Array.from(u.attributes))
|
|
1529
1619
|
h.setAttribute(g.name, g.value);
|
|
1530
|
-
h.innerHTML =
|
|
1531
|
-
}
|
|
1532
|
-
for (const
|
|
1533
|
-
const c =
|
|
1534
|
-
if (
|
|
1535
|
-
const g =
|
|
1536
|
-
m &&
|
|
1537
|
-
const k = m ||
|
|
1538
|
-
|
|
1539
|
-
}
|
|
1540
|
-
if (
|
|
1541
|
-
c === "a" && ((
|
|
1542
|
-
const h =
|
|
1543
|
-
h &&
|
|
1544
|
-
}
|
|
1545
|
-
for (const
|
|
1546
|
-
if (
|
|
1620
|
+
h.innerHTML = u.innerHTML, u.replaceWith(h);
|
|
1621
|
+
}
|
|
1622
|
+
for (const u of Array.from(t.querySelectorAll("*"))) {
|
|
1623
|
+
const c = u.tagName.toLowerCase();
|
|
1624
|
+
if (Ai.has(c)) {
|
|
1625
|
+
const g = u.textContent ?? "", m = u.getAttribute("id");
|
|
1626
|
+
m && o.slug(m);
|
|
1627
|
+
const k = m || o.slug(g);
|
|
1628
|
+
u.setAttribute("id", k), l.push({ id: k, depth: Number(c[1]) - r, value: g });
|
|
1629
|
+
}
|
|
1630
|
+
if (gi(u)) continue;
|
|
1631
|
+
c === "a" && ((u.getAttribute("href") ?? "").startsWith("http") || u.getAttribute("target") === "_blank") && (u.setAttribute("target", "_blank"), u.setAttribute("rel", mi(u.getAttribute("rel"))), Ei(u, e));
|
|
1632
|
+
const h = Di[c];
|
|
1633
|
+
h && Fi(u, h);
|
|
1634
|
+
}
|
|
1635
|
+
for (const u of Array.from(t.querySelectorAll("table"))) {
|
|
1636
|
+
if (u.parentElement?.dataset?.tableContainer === "true") continue;
|
|
1547
1637
|
const h = e.createElement("div");
|
|
1548
|
-
h.setAttribute("class", O(E.overflowContainerStyle)), h.dataset.tableContainer = "true",
|
|
1638
|
+
h.setAttribute("class", O(E.overflowContainerStyle)), h.dataset.tableContainer = "true", u.replaceWith(h), h.appendChild(u);
|
|
1549
1639
|
}
|
|
1550
1640
|
return {
|
|
1551
|
-
headings: l.filter((
|
|
1641
|
+
headings: ii(l.filter((u) => u.depth <= s))
|
|
1552
1642
|
};
|
|
1553
|
-
}, Kt = /([#.])?([A-Za-z_:][-A-Za-z0-9_.:]*)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'{}]+)))?/g,
|
|
1643
|
+
}, Kt = /([#.])?([A-Za-z_:][-A-Za-z0-9_.:]*)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'{}]+)))?/g, Or = "#id", Ci = (t) => {
|
|
1554
1644
|
const e = {};
|
|
1555
1645
|
if (!t) return e;
|
|
1556
1646
|
Kt.lastIndex = 0;
|
|
1557
1647
|
let n = Kt.exec(t);
|
|
1558
1648
|
for (; n !== null; ) {
|
|
1559
|
-
const [, r, s,
|
|
1560
|
-
r === "#" ? e[
|
|
1649
|
+
const [, r, s, o, l, u] = n, c = o ?? l ?? u;
|
|
1650
|
+
r === "#" ? e[Or] = s : r === "." ? e.class = e.class ? `${e.class} ${s}` : s : e[s] = c ?? "", n = Kt.exec(t);
|
|
1561
1651
|
}
|
|
1562
1652
|
return e;
|
|
1563
|
-
},
|
|
1653
|
+
}, ir = (t, e, n, r) => {
|
|
1564
1654
|
if (t[e] !== n) return null;
|
|
1565
1655
|
let s = 0;
|
|
1566
|
-
for (let
|
|
1567
|
-
const l = t[
|
|
1656
|
+
for (let o = e; o < t.length; o++) {
|
|
1657
|
+
const l = t[o];
|
|
1568
1658
|
if (l === "\\") {
|
|
1569
|
-
|
|
1659
|
+
o++;
|
|
1570
1660
|
continue;
|
|
1571
1661
|
}
|
|
1572
1662
|
if (l === `
|
|
@@ -1574,17 +1664,17 @@ const li = {
|
|
|
1574
1664
|
if (l === n)
|
|
1575
1665
|
s++;
|
|
1576
1666
|
else if (l === r && (s--, s === 0))
|
|
1577
|
-
return { value: t.slice(e + 1,
|
|
1667
|
+
return { value: t.slice(e + 1, o), end: o + 1 };
|
|
1578
1668
|
}
|
|
1579
1669
|
return null;
|
|
1580
|
-
},
|
|
1670
|
+
}, Lr = (t, e) => {
|
|
1581
1671
|
let n = null;
|
|
1582
|
-
const r =
|
|
1672
|
+
const r = ir(t, e, "[", "]");
|
|
1583
1673
|
r && (n = r.value, e = r.end);
|
|
1584
1674
|
let s = {};
|
|
1585
|
-
const
|
|
1586
|
-
return
|
|
1587
|
-
}, J = "container", se = "leaf", Lt = "text",
|
|
1675
|
+
const o = ir(t, e, "{", "}");
|
|
1676
|
+
return o && (s = Ci(o.value), e = o.end), { label: n, attrs: s, end: e };
|
|
1677
|
+
}, J = "container", se = "leaf", Lt = "text", xi = {
|
|
1588
1678
|
card: [J],
|
|
1589
1679
|
"card-img": [se],
|
|
1590
1680
|
"card-title": [se, J],
|
|
@@ -1598,56 +1688,56 @@ const li = {
|
|
|
1598
1688
|
img: [se],
|
|
1599
1689
|
youtube: [se, J],
|
|
1600
1690
|
"link-button": [Lt]
|
|
1601
|
-
},
|
|
1691
|
+
}, $r = /^grid-cols-(?:1[0-2]|[1-9])$/, Pr = (t, e) => $r.test(t) ? e === J : (xi[t] ?? []).includes(e), Ti = O(E.cardImgStyle, "w-full aspect-[352/226]"), yi = (t, e) => `<span aria-hidden="true" class="${O(
|
|
1602
1692
|
E.iconSizeStyle[16],
|
|
1603
1693
|
E.iconStyle
|
|
1604
|
-
)}">${t}</span><span class="sr-only">${e}</span>`,
|
|
1694
|
+
)}">${t}</span><span class="sr-only">${e}</span>`, _i = {
|
|
1605
1695
|
card: ({ token: t, attrs: e, root: n, body: r, nl: s }) => {
|
|
1606
|
-
const
|
|
1696
|
+
const o = !!t.linked, l = O(
|
|
1607
1697
|
E.cardStyle,
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1698
|
+
o && E.linkCardPositionStyle,
|
|
1699
|
+
o && E.linkCardHoverStyle,
|
|
1700
|
+
o && E.linkCardFocusStyle,
|
|
1611
1701
|
e.class
|
|
1612
|
-
),
|
|
1613
|
-
return t.listed ? `<li class="sm:grid">${
|
|
1702
|
+
), u = `<div${n({ class: l })}>${r()}</div>`;
|
|
1703
|
+
return t.listed ? `<li class="sm:grid">${u}</li>${s}` : `${u}${s}`;
|
|
1614
1704
|
},
|
|
1615
1705
|
"card-img": ({ attrs: t, root: e, nl: n }) => `<img${e({
|
|
1616
|
-
class: O(
|
|
1706
|
+
class: O(Ti, t.class),
|
|
1617
1707
|
src: at(t.src),
|
|
1618
1708
|
alt: t.alt ?? ""
|
|
1619
1709
|
})}>${n}`,
|
|
1620
|
-
"card-title": ({ token: t, attrs: e, root: n, own: r, body: s, nl:
|
|
1621
|
-
const
|
|
1622
|
-
return c ? `<${
|
|
1710
|
+
"card-title": ({ token: t, attrs: e, root: n, own: r, body: s, nl: o, options: l }) => {
|
|
1711
|
+
const u = l.cardHeadingLevel, c = t.inherited ? at(t.inherited.href) : void 0;
|
|
1712
|
+
return c ? `<${u}${n({
|
|
1623
1713
|
class: O(E.cardHeaderStyle, E.linkCardHeadingStyle)
|
|
1624
1714
|
})}><a${r({
|
|
1625
1715
|
class: O(E.linkCardOverlayStyle),
|
|
1626
1716
|
href: c
|
|
1627
|
-
})}>${s()}</a></${
|
|
1717
|
+
})}>${s()}</a></${u}>${o}` : `<${u}${n({
|
|
1628
1718
|
class: O(E.cardHeaderStyle, e.class)
|
|
1629
|
-
})}>${s()}</${
|
|
1719
|
+
})}>${s()}</${u}>${o}`;
|
|
1630
1720
|
},
|
|
1631
1721
|
"card-description": ({ attrs: t, root: e, body: n, nl: r }) => `<div${e({
|
|
1632
1722
|
class: O(E.cardBodyStyle, t.class)
|
|
1633
1723
|
})}>${n()}</div>${r}`,
|
|
1634
1724
|
"card-footer": ({ token: t, attrs: e, root: n, body: r, nl: s }) => {
|
|
1635
|
-
const
|
|
1725
|
+
const o = !!t.inherited, l = O(
|
|
1636
1726
|
E.cardFooterPositionStyle,
|
|
1637
1727
|
E.cardBodyStyle,
|
|
1638
|
-
|
|
1728
|
+
o && E.linkCardFooterStyle,
|
|
1639
1729
|
e.class
|
|
1640
1730
|
);
|
|
1641
|
-
if (
|
|
1642
|
-
const
|
|
1731
|
+
if (o) {
|
|
1732
|
+
const u = `<span class="${O(
|
|
1643
1733
|
E.linkCardArrowStyle,
|
|
1644
1734
|
E.linkCardArrowHoverStyle
|
|
1645
|
-
)}">${
|
|
1646
|
-
return `<div${n({ class: l })}><span>${r()}</span>${
|
|
1735
|
+
)}">${yi("arrow_forward", "")}</span>`;
|
|
1736
|
+
return `<div${n({ class: l })}><span>${r()}</span>${u}</div>${s}`;
|
|
1647
1737
|
}
|
|
1648
1738
|
return `<div${n({ class: l })}>${r()}</div>${s}`;
|
|
1649
1739
|
}
|
|
1650
|
-
},
|
|
1740
|
+
}, wi = {
|
|
1651
1741
|
faq: ({ root: t, body: e, nl: n }) => `<dl${t({ class: O(E.faqStyle) })}>${e()}</dl>${n}`,
|
|
1652
1742
|
"faq-q": ({ root: t, body: e, nl: n }) => `<dt${t({
|
|
1653
1743
|
class: O(E.questionStyle, E.faqMarkerStyle)
|
|
@@ -1658,17 +1748,17 @@ const li = {
|
|
|
1658
1748
|
E.faqMarkerStyle,
|
|
1659
1749
|
"!leading-none"
|
|
1660
1750
|
)}" aria-hidden="true">A</span><span>${e()}</span></dd>${n}`
|
|
1661
|
-
},
|
|
1751
|
+
}, Si = (t, e) => {
|
|
1662
1752
|
const n = [];
|
|
1663
1753
|
return t && n.push(`width:${t}px`), e && n.push(`height:${e}px`), t && n.push("max-width:100%"), n.length > 0 ? n.join(";") : void 0;
|
|
1664
|
-
},
|
|
1754
|
+
}, Ri = {
|
|
1665
1755
|
img: ({ attrs: t, root: e, nl: n }) => `<img${e({
|
|
1666
1756
|
class: O(t.class),
|
|
1667
1757
|
src: at(t.src),
|
|
1668
1758
|
alt: t.alt ?? "",
|
|
1669
|
-
style:
|
|
1759
|
+
style: Si(t.width, t.height)
|
|
1670
1760
|
})}>${n}`
|
|
1671
|
-
},
|
|
1761
|
+
}, Bi = {
|
|
1672
1762
|
1: "md:grid-cols-1",
|
|
1673
1763
|
2: "md:grid-cols-2",
|
|
1674
1764
|
3: "md:grid-cols-3",
|
|
@@ -1681,67 +1771,67 @@ const li = {
|
|
|
1681
1771
|
10: "md:grid-cols-6",
|
|
1682
1772
|
11: "md:grid-cols-6",
|
|
1683
1773
|
12: "md:grid-cols-12"
|
|
1684
|
-
},
|
|
1685
|
-
const s = Number(t.name.slice(10)),
|
|
1774
|
+
}, vi = ({ token: t, root: e, body: n, nl: r }) => {
|
|
1775
|
+
const s = Number(t.name.slice(10)), o = O(
|
|
1686
1776
|
"flex flex-col md:grid",
|
|
1687
|
-
|
|
1777
|
+
Bi[s],
|
|
1688
1778
|
"gap-8"
|
|
1689
1779
|
), l = t.listed ? "ul" : "div";
|
|
1690
|
-
return `<${l}${e({ class:
|
|
1691
|
-
},
|
|
1780
|
+
return `<${l}${e({ class: o })}>${n()}</${l}>${r}`;
|
|
1781
|
+
}, Oi = {
|
|
1692
1782
|
cell: ({ attrs: t, root: e, body: n, nl: r }) => `<div${e({ class: t.class })}>${n()}</div>${r}`,
|
|
1693
1783
|
"cell-img": ({ attrs: t, root: e, nl: n }) => `<img${e({
|
|
1694
1784
|
class: O("mb-4", t.class),
|
|
1695
1785
|
src: at(t.src),
|
|
1696
1786
|
alt: t.alt ?? ""
|
|
1697
1787
|
})}>${n}`
|
|
1698
|
-
},
|
|
1788
|
+
}, Li = O(
|
|
1699
1789
|
E.buttonBaseStyle,
|
|
1700
1790
|
E.getButtonVariantStyle("secondary"),
|
|
1701
1791
|
E.getButtonSizeStyle("lg")
|
|
1702
|
-
),
|
|
1792
|
+
), $i = {
|
|
1703
1793
|
"link-button": ({ attrs: t, root: e, body: n }) => `<a${e({
|
|
1704
|
-
class:
|
|
1794
|
+
class: Li,
|
|
1705
1795
|
href: at(t.href)
|
|
1706
1796
|
})}>${n()}</a>`
|
|
1707
|
-
},
|
|
1797
|
+
}, Pi = "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture", Ii = "strict-origin-when-cross-origin", Ni = /^[\w-]{11}$/, Mi = /(?:youtu\.be\/|[?&]v=|\/embed\/|\/shorts\/)([\w-]{11})/, zi = (t) => t ? Ni.test(t) ? t : Mi.exec(t)?.[1] ?? t : "", Ui = {
|
|
1708
1798
|
youtube: ({ token: t, attrs: e, root: n, nl: r, parser: s }) => {
|
|
1709
|
-
const
|
|
1799
|
+
const o = s.parseInline(t.tokens, s.textRenderer);
|
|
1710
1800
|
return `<iframe${n({
|
|
1711
|
-
title:
|
|
1712
|
-
src: `https://www.youtube-nocookie.com/embed/${encodeURIComponent(
|
|
1801
|
+
title: o,
|
|
1802
|
+
src: `https://www.youtube-nocookie.com/embed/${encodeURIComponent(zi(e.video))}`,
|
|
1713
1803
|
class: "aspect-video w-full max-w-[470px]",
|
|
1714
1804
|
style: e.width ? `width:${e.width}px` : void 0,
|
|
1715
1805
|
frameborder: "0",
|
|
1716
|
-
allow:
|
|
1717
|
-
referrerpolicy:
|
|
1806
|
+
allow: Pi,
|
|
1807
|
+
referrerpolicy: Ii,
|
|
1718
1808
|
allowfullscreen: !0,
|
|
1719
1809
|
loading: "lazy"
|
|
1720
1810
|
})}></iframe>${r}`;
|
|
1721
1811
|
}
|
|
1722
|
-
},
|
|
1723
|
-
...Ti,
|
|
1724
|
-
...Bi,
|
|
1812
|
+
}, ji = {
|
|
1725
1813
|
..._i,
|
|
1814
|
+
...Oi,
|
|
1726
1815
|
...wi,
|
|
1727
|
-
...
|
|
1728
|
-
...
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1816
|
+
...Ri,
|
|
1817
|
+
...Ui,
|
|
1818
|
+
...$i
|
|
1819
|
+
}, Hi = (t) => ji[t] ?? ($r.test(t) ? vi : void 0);
|
|
1820
|
+
function Wi(t, e) {
|
|
1821
|
+
const { name: n, kind: r, attrs: s, tokens: o } = t, l = r === Lt ? "" : `
|
|
1822
|
+
`, u = (g) => di({ ...g, "data-styled": n }), c = {
|
|
1733
1823
|
token: t,
|
|
1734
1824
|
attrs: s,
|
|
1735
1825
|
nl: l,
|
|
1736
|
-
own:
|
|
1737
|
-
root: (g) =>
|
|
1738
|
-
body: () => r === J ? this.parser.parse(
|
|
1826
|
+
own: u,
|
|
1827
|
+
root: (g) => u({ ...g, id: s[Or] }),
|
|
1828
|
+
body: () => r === J ? this.parser.parse(o) : this.parser.parseInline(o),
|
|
1739
1829
|
parser: this.parser,
|
|
1740
1830
|
options: e
|
|
1741
|
-
}, h =
|
|
1831
|
+
}, h = Hi(n);
|
|
1742
1832
|
return h ? h(c) : c.body() + l;
|
|
1743
1833
|
}
|
|
1744
|
-
const
|
|
1834
|
+
const qi = /^(:{2,})([A-Za-z][A-Za-z0-9_-]*)/, Gi = /^:([A-Za-z][A-Za-z0-9_-]*)/, Yi = (t, e) => {
|
|
1745
1835
|
const n = new RegExp(`^:{${e},}[ \\t]*$`);
|
|
1746
1836
|
let r = 0;
|
|
1747
1837
|
for (const s of t.split(`
|
|
@@ -1754,13 +1844,13 @@ const Hi = /^(:{2,})([A-Za-z][A-Za-z0-9_-]*)/, qi = /^:([A-Za-z][A-Za-z0-9_-]*)/
|
|
|
1754
1844
|
r += s.length + 1;
|
|
1755
1845
|
}
|
|
1756
1846
|
return null;
|
|
1757
|
-
},
|
|
1847
|
+
}, Zi = (t) => {
|
|
1758
1848
|
const e = /\n:{2,}[A-Za-z]/.exec(t);
|
|
1759
1849
|
return e ? e.index : void 0;
|
|
1760
|
-
},
|
|
1850
|
+
}, Xi = (t) => {
|
|
1761
1851
|
const e = /:[A-Za-z][A-Za-z0-9_-]*\[/.exec(t);
|
|
1762
1852
|
return e ? e.index : void 0;
|
|
1763
|
-
},
|
|
1853
|
+
}, Vi = (t) => {
|
|
1764
1854
|
if (!/^grid-cols-\d+$/.test(t.name)) return;
|
|
1765
1855
|
const e = t.tokens.filter((r) => r.type !== "space"), n = e.filter(
|
|
1766
1856
|
(r) => r.type === "directive" && r.name === "card"
|
|
@@ -1769,7 +1859,7 @@ const Hi = /^(:{2,})([A-Za-z][A-Za-z0-9_-]*)/, qi = /^:([A-Za-z][A-Za-z0-9_-]*)/
|
|
|
1769
1859
|
t.listed = !0;
|
|
1770
1860
|
for (const r of n) r.listed = !0;
|
|
1771
1861
|
}
|
|
1772
|
-
},
|
|
1862
|
+
}, Qi = (t) => {
|
|
1773
1863
|
if (t.name !== "card" || !t.attrs.href) return;
|
|
1774
1864
|
const e = t.tokens;
|
|
1775
1865
|
if (e.some(
|
|
@@ -1780,34 +1870,34 @@ const Hi = /^(:{2,})([A-Za-z][A-Za-z0-9_-]*)/, qi = /^:([A-Za-z][A-Za-z0-9_-]*)/
|
|
|
1780
1870
|
r.type === "directive" && (r.name === "card-title" || r.name === "card-footer") && (r.inherited = { behavior: "link", href: t.attrs.href ?? "" });
|
|
1781
1871
|
}
|
|
1782
1872
|
};
|
|
1783
|
-
function
|
|
1784
|
-
const e =
|
|
1873
|
+
function Ki(t) {
|
|
1874
|
+
const e = qi.exec(t);
|
|
1785
1875
|
if (!e) return;
|
|
1786
1876
|
const [, n, r] = e, s = n.length >= 3 ? J : se;
|
|
1787
|
-
if (
|
|
1788
|
-
const
|
|
1877
|
+
if (!Pr(r, s)) return;
|
|
1878
|
+
const o = Lr(t, e[0].length), l = /^[ \t]*(?:\n|$)/.exec(t.slice(o.end));
|
|
1789
1879
|
if (!l) return;
|
|
1790
|
-
const
|
|
1880
|
+
const u = o.end + l[0].length, c = {
|
|
1791
1881
|
type: "directive",
|
|
1792
1882
|
kind: s,
|
|
1793
1883
|
name: r,
|
|
1794
|
-
attrs:
|
|
1884
|
+
attrs: o.attrs,
|
|
1795
1885
|
tokens: [],
|
|
1796
|
-
raw: t.slice(0,
|
|
1886
|
+
raw: t.slice(0, u)
|
|
1797
1887
|
};
|
|
1798
1888
|
if (s === se)
|
|
1799
|
-
return
|
|
1800
|
-
const h = t.slice(
|
|
1801
|
-
return c.raw = t.slice(0,
|
|
1889
|
+
return o.label && this.lexer.inline(o.label, c.tokens), c;
|
|
1890
|
+
const h = t.slice(u), g = Yi(h, n.length);
|
|
1891
|
+
return c.raw = t.slice(0, u + (g ? g.rawEnd : h.length)), c.tokens = this.lexer.blockTokens(
|
|
1802
1892
|
g ? h.slice(0, g.contentEnd) : h
|
|
1803
|
-
),
|
|
1893
|
+
), Qi(c), Vi(c), c;
|
|
1804
1894
|
}
|
|
1805
|
-
function
|
|
1806
|
-
const e =
|
|
1895
|
+
function Ji(t) {
|
|
1896
|
+
const e = Gi.exec(t);
|
|
1807
1897
|
if (!e) return;
|
|
1808
1898
|
const [, n] = e;
|
|
1809
|
-
if (
|
|
1810
|
-
const r =
|
|
1899
|
+
if (!Pr(n, Lt)) return;
|
|
1900
|
+
const r = Lr(t, e[0].length);
|
|
1811
1901
|
if (r.label !== null)
|
|
1812
1902
|
return {
|
|
1813
1903
|
type: "directive",
|
|
@@ -1818,21 +1908,21 @@ function Qi(t) {
|
|
|
1818
1908
|
raw: t.slice(0, r.end)
|
|
1819
1909
|
};
|
|
1820
1910
|
}
|
|
1821
|
-
const
|
|
1911
|
+
const eo = (t) => ({
|
|
1822
1912
|
extensions: [
|
|
1823
1913
|
{
|
|
1824
1914
|
name: "directive",
|
|
1825
1915
|
level: "inline",
|
|
1826
|
-
start:
|
|
1827
|
-
tokenizer:
|
|
1916
|
+
start: Xi,
|
|
1917
|
+
tokenizer: Ji
|
|
1828
1918
|
},
|
|
1829
1919
|
{
|
|
1830
1920
|
name: "directive",
|
|
1831
1921
|
level: "block",
|
|
1832
|
-
start:
|
|
1833
|
-
tokenizer:
|
|
1922
|
+
start: Zi,
|
|
1923
|
+
tokenizer: Ki,
|
|
1834
1924
|
renderer(e) {
|
|
1835
|
-
return
|
|
1925
|
+
return Wi.call(
|
|
1836
1926
|
this,
|
|
1837
1927
|
e,
|
|
1838
1928
|
t
|
|
@@ -1841,20 +1931,20 @@ const Ki = (t) => ({
|
|
|
1841
1931
|
}
|
|
1842
1932
|
]
|
|
1843
1933
|
});
|
|
1844
|
-
function
|
|
1934
|
+
function or(t, e) {
|
|
1845
1935
|
(e == null || e > t.length) && (e = t.length);
|
|
1846
1936
|
for (var n = 0, r = Array(e); n < e; n++) r[n] = t[n];
|
|
1847
1937
|
return r;
|
|
1848
1938
|
}
|
|
1849
|
-
function
|
|
1939
|
+
function to(t) {
|
|
1850
1940
|
if (Array.isArray(t)) return t;
|
|
1851
1941
|
}
|
|
1852
|
-
function
|
|
1942
|
+
function no(t, e) {
|
|
1853
1943
|
var n = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
|
|
1854
1944
|
if (n != null) {
|
|
1855
|
-
var r, s,
|
|
1945
|
+
var r, s, o, l, u = [], c = !0, h = !1;
|
|
1856
1946
|
try {
|
|
1857
|
-
if (
|
|
1947
|
+
if (o = (n = n.call(t)).next, e !== 0) for (; !(c = (r = o.call(n)).done) && (u.push(r.value), u.length !== e); c = !0) ;
|
|
1858
1948
|
} catch (g) {
|
|
1859
1949
|
h = !0, s = g;
|
|
1860
1950
|
} finally {
|
|
@@ -1864,25 +1954,25 @@ function eu(t, e) {
|
|
|
1864
1954
|
if (h) throw s;
|
|
1865
1955
|
}
|
|
1866
1956
|
}
|
|
1867
|
-
return
|
|
1957
|
+
return u;
|
|
1868
1958
|
}
|
|
1869
1959
|
}
|
|
1870
|
-
function
|
|
1960
|
+
function ro() {
|
|
1871
1961
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1872
1962
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1873
1963
|
}
|
|
1874
|
-
function
|
|
1875
|
-
return
|
|
1964
|
+
function so(t, e) {
|
|
1965
|
+
return to(t) || no(t, e) || io(t, e) || ro();
|
|
1876
1966
|
}
|
|
1877
|
-
function
|
|
1967
|
+
function io(t, e) {
|
|
1878
1968
|
if (t) {
|
|
1879
|
-
if (typeof t == "string") return
|
|
1969
|
+
if (typeof t == "string") return or(t, e);
|
|
1880
1970
|
var n = {}.toString.call(t).slice(8, -1);
|
|
1881
|
-
return n === "Object" && t.constructor && (n = t.constructor.name), n === "Map" || n === "Set" ? Array.from(t) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ?
|
|
1971
|
+
return n === "Object" && t.constructor && (n = t.constructor.name), n === "Map" || n === "Set" ? Array.from(t) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? or(t, e) : void 0;
|
|
1882
1972
|
}
|
|
1883
1973
|
}
|
|
1884
|
-
const
|
|
1885
|
-
let N = Object.freeze, z = Object.seal, He = Object.create,
|
|
1974
|
+
const Ir = Object.entries, ur = Object.setPrototypeOf, oo = Object.isFrozen, uo = Object.getPrototypeOf, lo = Object.getOwnPropertyDescriptor;
|
|
1975
|
+
let N = Object.freeze, z = Object.seal, He = Object.create, Nr = typeof Reflect < "u" && Reflect, an = Nr.apply, cn = Nr.construct;
|
|
1886
1976
|
N || (N = function(e) {
|
|
1887
1977
|
return e;
|
|
1888
1978
|
});
|
|
@@ -1890,8 +1980,8 @@ z || (z = function(e) {
|
|
|
1890
1980
|
return e;
|
|
1891
1981
|
});
|
|
1892
1982
|
an || (an = function(e, n) {
|
|
1893
|
-
for (var r = arguments.length, s = new Array(r > 2 ? r - 2 : 0),
|
|
1894
|
-
s[
|
|
1983
|
+
for (var r = arguments.length, s = new Array(r > 2 ? r - 2 : 0), o = 2; o < r; o++)
|
|
1984
|
+
s[o - 2] = arguments[o];
|
|
1895
1985
|
return e.apply(n, s);
|
|
1896
1986
|
});
|
|
1897
1987
|
cn || (cn = function(e) {
|
|
@@ -1899,7 +1989,7 @@ cn || (cn = function(e) {
|
|
|
1899
1989
|
r[s - 1] = arguments[s];
|
|
1900
1990
|
return new e(...r);
|
|
1901
1991
|
});
|
|
1902
|
-
const Se = I(Array.prototype.forEach),
|
|
1992
|
+
const Se = I(Array.prototype.forEach), ao = I(Array.prototype.lastIndexOf), lr = I(Array.prototype.pop), rt = I(Array.prototype.push), co = I(Array.prototype.splice), We = Array.isArray, lt = I(String.prototype.toLowerCase), Jt = I(String.prototype.toString), ar = I(String.prototype.match), st = I(String.prototype.replace), cr = I(String.prototype.indexOf), po = I(String.prototype.trim), fo = I(Number.prototype.toString), ho = I(Boolean.prototype.toString), pr = typeof BigInt > "u" ? null : I(BigInt.prototype.toString), fr = typeof Symbol > "u" ? null : I(Symbol.prototype.toString), Z = I(Object.prototype.hasOwnProperty), it = I(Object.prototype.toString), j = I(RegExp.prototype.test), we = Do(TypeError);
|
|
1903
1993
|
function I(t) {
|
|
1904
1994
|
return function(e) {
|
|
1905
1995
|
e instanceof RegExp && (e.lastIndex = 0);
|
|
@@ -1908,54 +1998,54 @@ function I(t) {
|
|
|
1908
1998
|
return an(t, e, r);
|
|
1909
1999
|
};
|
|
1910
2000
|
}
|
|
1911
|
-
function
|
|
2001
|
+
function Do(t) {
|
|
1912
2002
|
return function() {
|
|
1913
2003
|
for (var e = arguments.length, n = new Array(e), r = 0; r < e; r++)
|
|
1914
2004
|
n[r] = arguments[r];
|
|
1915
2005
|
return cn(t, n);
|
|
1916
2006
|
};
|
|
1917
2007
|
}
|
|
1918
|
-
function
|
|
2008
|
+
function y(t, e) {
|
|
1919
2009
|
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : lt;
|
|
1920
|
-
if (ur && ur(t, null), !
|
|
2010
|
+
if (ur && ur(t, null), !We(e))
|
|
1921
2011
|
return t;
|
|
1922
2012
|
let r = e.length;
|
|
1923
2013
|
for (; r--; ) {
|
|
1924
2014
|
let s = e[r];
|
|
1925
2015
|
if (typeof s == "string") {
|
|
1926
|
-
const
|
|
1927
|
-
|
|
2016
|
+
const o = n(s);
|
|
2017
|
+
o !== s && (oo(e) || (e[r] = o), s = o);
|
|
1928
2018
|
}
|
|
1929
2019
|
t[s] = !0;
|
|
1930
2020
|
}
|
|
1931
2021
|
return t;
|
|
1932
2022
|
}
|
|
1933
|
-
function
|
|
2023
|
+
function go(t) {
|
|
1934
2024
|
for (let e = 0; e < t.length; e++)
|
|
1935
2025
|
Z(t, e) || (t[e] = null);
|
|
1936
2026
|
return t;
|
|
1937
2027
|
}
|
|
1938
2028
|
function V(t) {
|
|
1939
2029
|
const e = He(null);
|
|
1940
|
-
for (const r of
|
|
1941
|
-
var n =
|
|
1942
|
-
const s = n[0],
|
|
1943
|
-
Z(t, s) && (
|
|
2030
|
+
for (const r of Ir(t)) {
|
|
2031
|
+
var n = so(r, 2);
|
|
2032
|
+
const s = n[0], o = n[1];
|
|
2033
|
+
Z(t, s) && (We(o) ? e[s] = go(o) : o && typeof o == "object" && o.constructor === Object ? e[s] = V(o) : e[s] = o);
|
|
1944
2034
|
}
|
|
1945
2035
|
return e;
|
|
1946
2036
|
}
|
|
1947
|
-
function
|
|
2037
|
+
function mo(t) {
|
|
1948
2038
|
switch (typeof t) {
|
|
1949
2039
|
case "string":
|
|
1950
2040
|
return t;
|
|
1951
2041
|
case "number":
|
|
1952
|
-
return
|
|
2042
|
+
return fo(t);
|
|
1953
2043
|
case "boolean":
|
|
1954
|
-
return
|
|
2044
|
+
return ho(t);
|
|
1955
2045
|
case "bigint":
|
|
1956
|
-
return
|
|
2046
|
+
return pr ? pr(t) : "0";
|
|
1957
2047
|
case "symbol":
|
|
1958
|
-
return
|
|
2048
|
+
return fr ? fr(t) : "Symbol()";
|
|
1959
2049
|
case "undefined":
|
|
1960
2050
|
return it(t);
|
|
1961
2051
|
case "function":
|
|
@@ -1975,34 +2065,34 @@ function du(t) {
|
|
|
1975
2065
|
}
|
|
1976
2066
|
function re(t, e) {
|
|
1977
2067
|
for (; t !== null; ) {
|
|
1978
|
-
const r =
|
|
2068
|
+
const r = lo(t, e);
|
|
1979
2069
|
if (r) {
|
|
1980
2070
|
if (r.get)
|
|
1981
2071
|
return I(r.get);
|
|
1982
2072
|
if (typeof r.value == "function")
|
|
1983
2073
|
return I(r.value);
|
|
1984
2074
|
}
|
|
1985
|
-
t =
|
|
2075
|
+
t = uo(t);
|
|
1986
2076
|
}
|
|
1987
2077
|
function n() {
|
|
1988
2078
|
return null;
|
|
1989
2079
|
}
|
|
1990
2080
|
return n;
|
|
1991
2081
|
}
|
|
1992
|
-
function
|
|
2082
|
+
function Fo(t) {
|
|
1993
2083
|
try {
|
|
1994
2084
|
return j(t, ""), !0;
|
|
1995
2085
|
} catch {
|
|
1996
2086
|
return !1;
|
|
1997
2087
|
}
|
|
1998
2088
|
}
|
|
1999
|
-
const
|
|
2089
|
+
const hr = N(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), en = N(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), tn = N(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Ao = N(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), nn = N(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Eo = N(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), dr = N(["#text"]), Dr = N(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), rn = N(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dominant-baseline", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "pointer-events", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-orientation", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "vector-effect", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), gr = N(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), St = N(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), bo = z(/{{[\w\W]*|^[\w\W]*}}/g), ko = z(/<%[\w\W]*|^[\w\W]*%>/g), Co = z(/\${[\w\W]*/g), xo = z(/^data-[\-\w.\u00B7-\uFFFF]+$/), To = z(/^aria-[\-\w]+$/), mr = z(
|
|
2000
2090
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
2001
2091
|
// eslint-disable-line no-useless-escape
|
|
2002
|
-
),
|
|
2092
|
+
), yo = z(/^(?:\w+script|data):/i), _o = z(
|
|
2003
2093
|
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
2004
2094
|
// eslint-disable-line no-control-regex
|
|
2005
|
-
),
|
|
2095
|
+
), wo = z(/^html$/i), So = z(/^[a-z][.\w]*(-[.\w]+)+$/i), Fr = z(/<[/\w!]/g), Ar = z(/<[/\w]/g), Ro = z(/<\/no(script|embed|frames)/i), Bo = z(/\/>/i), X = {
|
|
2006
2096
|
element: 1,
|
|
2007
2097
|
attribute: 2,
|
|
2008
2098
|
text: 3,
|
|
@@ -2018,22 +2108,22 @@ const fr = N(["a", "abbr", "acronym", "address", "area", "article", "aside", "au
|
|
|
2018
2108
|
documentFragment: 11,
|
|
2019
2109
|
notation: 12
|
|
2020
2110
|
// Deprecated
|
|
2021
|
-
},
|
|
2111
|
+
}, Mr = ["style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript"], vo = N(y({}, Mr)), Oo = (function() {
|
|
2022
2112
|
const t = {};
|
|
2023
|
-
return Se(
|
|
2113
|
+
return Se(Mr, (e) => {
|
|
2024
2114
|
t[e] = z(new RegExp("</" + e + "(?=[\\t\\n\\f\\r />])", "i"));
|
|
2025
2115
|
}), N(t);
|
|
2026
|
-
})(),
|
|
2116
|
+
})(), Lo = function() {
|
|
2027
2117
|
return typeof window > "u" ? null : window;
|
|
2028
|
-
},
|
|
2118
|
+
}, $o = function(e, n) {
|
|
2029
2119
|
if (typeof e != "object" || typeof e.createPolicy != "function")
|
|
2030
2120
|
return null;
|
|
2031
2121
|
let r = null;
|
|
2032
2122
|
const s = "data-tt-policy-suffix";
|
|
2033
2123
|
n && n.hasAttribute(s) && (r = n.getAttribute(s));
|
|
2034
|
-
const
|
|
2124
|
+
const o = "dompurify" + (r ? "#" + r : "");
|
|
2035
2125
|
try {
|
|
2036
|
-
return e.createPolicy(
|
|
2126
|
+
return e.createPolicy(o, {
|
|
2037
2127
|
createHTML(l) {
|
|
2038
2128
|
return l;
|
|
2039
2129
|
},
|
|
@@ -2042,9 +2132,9 @@ const fr = N(["a", "abbr", "acronym", "address", "area", "article", "aside", "au
|
|
|
2042
2132
|
}
|
|
2043
2133
|
});
|
|
2044
2134
|
} catch {
|
|
2045
|
-
return console.warn("TrustedTypes policy " +
|
|
2135
|
+
return console.warn("TrustedTypes policy " + o + " could not be created."), null;
|
|
2046
2136
|
}
|
|
2047
|
-
},
|
|
2137
|
+
}, Er = function() {
|
|
2048
2138
|
return {
|
|
2049
2139
|
afterSanitizeAttributes: [],
|
|
2050
2140
|
afterSanitizeElements: [],
|
|
@@ -2057,27 +2147,27 @@ const fr = N(["a", "abbr", "acronym", "address", "area", "article", "aside", "au
|
|
|
2057
2147
|
uponSanitizeShadowNode: []
|
|
2058
2148
|
};
|
|
2059
2149
|
}, Ee = function(e, n, r, s) {
|
|
2060
|
-
return Z(e, n) &&
|
|
2150
|
+
return Z(e, n) && We(e[n]) ? y(s.base ? V(s.base) : {}, e[n], s.transform) : r;
|
|
2061
2151
|
}, sn = function(e, n, r) {
|
|
2062
2152
|
const s = Z(e, n) ? e[n] : void 0;
|
|
2063
2153
|
return s && typeof s == "object" ? V(s) : r();
|
|
2064
2154
|
};
|
|
2065
|
-
function
|
|
2066
|
-
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
2067
|
-
const e = (d) =>
|
|
2155
|
+
function zr() {
|
|
2156
|
+
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Lo();
|
|
2157
|
+
const e = (d) => zr(d);
|
|
2068
2158
|
if (e.version = "3.4.14", e.removed = [], !t || !t.document || t.document.nodeType !== X.document || !t.Element)
|
|
2069
2159
|
return e.isSupported = !1, e;
|
|
2070
2160
|
let n = t.document;
|
|
2071
2161
|
const r = n, s = r.currentScript;
|
|
2072
2162
|
t.DocumentFragment;
|
|
2073
|
-
const
|
|
2163
|
+
const o = t.HTMLTemplateElement, l = t.Node, u = t.Element, c = t.NodeFilter, h = t.NamedNodeMap;
|
|
2074
2164
|
h === void 0 && (t.NamedNodeMap || t.MozNamedAttrMap), t.HTMLFormElement;
|
|
2075
|
-
const g = t.DOMParser, m = t.trustedTypes, k =
|
|
2165
|
+
const g = t.DOMParser, m = t.trustedTypes, k = u.prototype, L = re(k, "cloneNode"), T = re(k, "remove"), q = re(k, "nextSibling"), U = re(k, "childNodes"), te = re(k, "parentNode"), be = re(k, "shadowRoot"), ke = re(k, "attributes"), ne = l && l.prototype ? re(l.prototype, "nodeType") : null, Q = l && l.prototype ? re(l.prototype, "nodeName") : null, K = l && l.prototype ? re(l.prototype, "ownerDocument") : null, Ce = function(i) {
|
|
2076
2166
|
return ne ? ne(i) : i.nodeType;
|
|
2077
|
-
},
|
|
2167
|
+
}, Ge = function(i) {
|
|
2078
2168
|
return Q ? Q(i) : i.nodeName;
|
|
2079
2169
|
};
|
|
2080
|
-
if (typeof
|
|
2170
|
+
if (typeof o == "function") {
|
|
2081
2171
|
const d = n.createElement("template");
|
|
2082
2172
|
d.content && d.content.ownerDocument && (n = d.content.ownerDocument);
|
|
2083
2173
|
}
|
|
@@ -2085,7 +2175,7 @@ function Mr() {
|
|
|
2085
2175
|
const ft = function() {
|
|
2086
2176
|
if (de > 0)
|
|
2087
2177
|
throw we('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');
|
|
2088
|
-
},
|
|
2178
|
+
}, ue = function(i) {
|
|
2089
2179
|
ft(), de++;
|
|
2090
2180
|
try {
|
|
2091
2181
|
return M.createHTML(i);
|
|
@@ -2100,15 +2190,15 @@ function Mr() {
|
|
|
2100
2190
|
de--;
|
|
2101
2191
|
}
|
|
2102
2192
|
}, dt = function() {
|
|
2103
|
-
return Oe || (Ye =
|
|
2193
|
+
return Oe || (Ye = $o(m, s), Oe = !0), Ye;
|
|
2104
2194
|
}, xe = n, Le = xe.implementation, Ze = xe.createNodeIterator, f = xe.createDocumentFragment, C = xe.getElementsByTagName, S = r.importNode;
|
|
2105
|
-
let b =
|
|
2106
|
-
e.isSupported = typeof
|
|
2107
|
-
const $e =
|
|
2108
|
-
let En =
|
|
2109
|
-
const It =
|
|
2195
|
+
let b = Er();
|
|
2196
|
+
e.isSupported = typeof Ir == "function" && typeof te == "function" && Le && Le.createHTMLDocument !== void 0;
|
|
2197
|
+
const $e = bo, Xe = ko, $ = Co, De = xo, Ve = To, Pt = yo, An = _o, jr = So;
|
|
2198
|
+
let En = mr, R = null;
|
|
2199
|
+
const It = y({}, [...hr, ...en, ...tn, ...nn, ...dr]);
|
|
2110
2200
|
let B = null;
|
|
2111
|
-
const Nt =
|
|
2201
|
+
const Nt = y({}, [...Dr, ...rn, ...gr, ...St]);
|
|
2112
2202
|
let le = Object.seal(He(null, {
|
|
2113
2203
|
tagNameCheck: {
|
|
2114
2204
|
writable: !0,
|
|
@@ -2143,10 +2233,10 @@ function Mr() {
|
|
|
2143
2233
|
value: null
|
|
2144
2234
|
}
|
|
2145
2235
|
}));
|
|
2146
|
-
let kn = !0, Mt = !0, Cn = !1, xn = !0, me = !1, Te = !0,
|
|
2147
|
-
const
|
|
2236
|
+
let kn = !0, Mt = !0, Cn = !1, xn = !0, me = !1, Te = !0, ye = !1, zt = !1, Dt = null, gt = null, Ut = !1, Pe = !1, mt = !1, Ft = !1, Tn = !0, yn = !1;
|
|
2237
|
+
const _n = "user-content-";
|
|
2148
2238
|
let jt = !0, Ht = !1, Ie = {}, Ne = null;
|
|
2149
|
-
const wn =
|
|
2239
|
+
const wn = y({}, [
|
|
2150
2240
|
"annotation-xml",
|
|
2151
2241
|
"audio",
|
|
2152
2242
|
"colgroup",
|
|
@@ -2184,19 +2274,19 @@ function Mr() {
|
|
|
2184
2274
|
"xmp"
|
|
2185
2275
|
]);
|
|
2186
2276
|
let Sn = null;
|
|
2187
|
-
const Rn =
|
|
2277
|
+
const Rn = y({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
2188
2278
|
let Bn = null;
|
|
2189
|
-
const vn =
|
|
2190
|
-
let Me = ae,
|
|
2191
|
-
const
|
|
2192
|
-
let
|
|
2279
|
+
const vn = y({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), At = "http://www.w3.org/1998/Math/MathML", Et = "http://www.w3.org/2000/svg", ae = "http://www.w3.org/1999/xhtml";
|
|
2280
|
+
let Me = ae, Wt = !1, qt = null;
|
|
2281
|
+
const Hr = y({}, [At, Et, ae], Jt), On = N(["mi", "mo", "mn", "ms", "mtext"]);
|
|
2282
|
+
let Gt = y({}, On);
|
|
2193
2283
|
const Ln = N(["annotation-xml"]);
|
|
2194
|
-
let Yt =
|
|
2195
|
-
const
|
|
2284
|
+
let Yt = y({}, Ln);
|
|
2285
|
+
const Wr = y({}, ["title", "style", "font", "a", "script"]);
|
|
2196
2286
|
let Ke = null;
|
|
2197
2287
|
const qr = ["application/xhtml+xml", "text/html"], Gr = "text/html";
|
|
2198
2288
|
let P = null, ze = null;
|
|
2199
|
-
const
|
|
2289
|
+
const Yr = n.createElement("form"), $n = function(i) {
|
|
2200
2290
|
return i instanceof RegExp || i instanceof Function;
|
|
2201
2291
|
}, Zt = function() {
|
|
2202
2292
|
let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
@@ -2207,7 +2297,7 @@ function Mr() {
|
|
|
2207
2297
|
transform: P
|
|
2208
2298
|
}), B = Ee(i, "ALLOWED_ATTR", Nt, {
|
|
2209
2299
|
transform: P
|
|
2210
|
-
}),
|
|
2300
|
+
}), qt = Ee(i, "ALLOWED_NAMESPACES", Hr, {
|
|
2211
2301
|
transform: Jt
|
|
2212
2302
|
}), Bn = Ee(i, "ADD_URI_SAFE_ATTR", vn, {
|
|
2213
2303
|
transform: P,
|
|
@@ -2221,19 +2311,19 @@ function Mr() {
|
|
|
2221
2311
|
transform: P
|
|
2222
2312
|
}), bn = Ee(i, "FORBID_ATTR", V({}), {
|
|
2223
2313
|
transform: P
|
|
2224
|
-
}), Ie = Z(i, "USE_PROFILES") ? i.USE_PROFILES && typeof i.USE_PROFILES == "object" ? V(i.USE_PROFILES) : i.USE_PROFILES : !1, kn = i.ALLOW_ARIA_ATTR !== !1, Mt = i.ALLOW_DATA_ATTR !== !1, Cn = i.ALLOW_UNKNOWN_PROTOCOLS || !1, xn = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, me = i.SAFE_FOR_TEMPLATES || !1, Te = i.SAFE_FOR_XML !== !1,
|
|
2314
|
+
}), Ie = Z(i, "USE_PROFILES") ? i.USE_PROFILES && typeof i.USE_PROFILES == "object" ? V(i.USE_PROFILES) : i.USE_PROFILES : !1, kn = i.ALLOW_ARIA_ATTR !== !1, Mt = i.ALLOW_DATA_ATTR !== !1, Cn = i.ALLOW_UNKNOWN_PROTOCOLS || !1, xn = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, me = i.SAFE_FOR_TEMPLATES || !1, Te = i.SAFE_FOR_XML !== !1, ye = i.WHOLE_DOCUMENT || !1, Pe = i.RETURN_DOM || !1, mt = i.RETURN_DOM_FRAGMENT || !1, Ft = i.RETURN_TRUSTED_TYPE || !1, Ut = i.FORCE_BODY || !1, Tn = i.SANITIZE_DOM !== !1, yn = i.SANITIZE_NAMED_PROPS || !1, jt = i.KEEP_CONTENT !== !1, Ht = i.IN_PLACE || !1, En = Fo(i.ALLOWED_URI_REGEXP) ? i.ALLOWED_URI_REGEXP : mr, Me = typeof i.NAMESPACE == "string" ? i.NAMESPACE : ae, Gt = sn(
|
|
2225
2315
|
i,
|
|
2226
2316
|
"MATHML_TEXT_INTEGRATION_POINTS",
|
|
2227
|
-
() =>
|
|
2317
|
+
() => y({}, On)
|
|
2228
2318
|
// Default built-in map
|
|
2229
2319
|
), Yt = sn(
|
|
2230
2320
|
i,
|
|
2231
2321
|
"HTML_INTEGRATION_POINTS",
|
|
2232
|
-
() =>
|
|
2322
|
+
() => y({}, Ln)
|
|
2233
2323
|
// Default built-in map
|
|
2234
2324
|
);
|
|
2235
2325
|
const a = sn(i, "CUSTOM_ELEMENT_HANDLING", () => He(null));
|
|
2236
|
-
if (le = He(null), Z(a, "tagNameCheck") && $n(a.tagNameCheck) && (le.tagNameCheck = a.tagNameCheck), Z(a, "attributeNameCheck") && $n(a.attributeNameCheck) && (le.attributeNameCheck = a.attributeNameCheck), Z(a, "allowCustomizedBuiltInElements") && typeof a.allowCustomizedBuiltInElements == "boolean" && (le.allowCustomizedBuiltInElements = a.allowCustomizedBuiltInElements), z(le), me && (Mt = !1), mt && (Pe = !0), Ie && (R =
|
|
2326
|
+
if (le = He(null), Z(a, "tagNameCheck") && $n(a.tagNameCheck) && (le.tagNameCheck = a.tagNameCheck), Z(a, "attributeNameCheck") && $n(a.attributeNameCheck) && (le.attributeNameCheck = a.attributeNameCheck), Z(a, "allowCustomizedBuiltInElements") && typeof a.allowCustomizedBuiltInElements == "boolean" && (le.allowCustomizedBuiltInElements = a.allowCustomizedBuiltInElements), z(le), me && (Mt = !1), mt && (Pe = !0), Ie && (R = y({}, dr), B = He(null), Ie.html === !0 && (y(R, hr), y(B, Dr)), Ie.svg === !0 && (y(R, en), y(B, rn), y(B, St)), Ie.svgFilters === !0 && (y(R, tn), y(B, rn), y(B, St)), Ie.mathMl === !0 && (y(R, nn), y(B, gr), y(B, St))), ge.tagCheck = null, ge.attributeCheck = null, Z(i, "ADD_TAGS") && (typeof i.ADD_TAGS == "function" ? ge.tagCheck = i.ADD_TAGS : We(i.ADD_TAGS) && (R === It && (R = V(R)), y(R, i.ADD_TAGS, P))), Z(i, "ADD_ATTR") && (typeof i.ADD_ATTR == "function" ? ge.attributeCheck = i.ADD_ATTR : We(i.ADD_ATTR) && (B === Nt && (B = V(B)), y(B, i.ADD_ATTR, P))), Z(i, "ADD_FORBID_CONTENTS") && We(i.ADD_FORBID_CONTENTS) && (Ne === wn && (Ne = V(Ne)), y(Ne, i.ADD_FORBID_CONTENTS, P)), jt && (R["#text"] = !0), ye && y(R, ["html", "head", "body"]), R.table && (y(R, ["tbody"]), delete Qe.tbody), i.TRUSTED_TYPES_POLICY) {
|
|
2237
2327
|
if (typeof i.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
2238
2328
|
throw we('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
2239
2329
|
if (typeof i.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -2241,26 +2331,26 @@ function Mr() {
|
|
|
2241
2331
|
const p = M;
|
|
2242
2332
|
M = i.TRUSTED_TYPES_POLICY;
|
|
2243
2333
|
try {
|
|
2244
|
-
fe =
|
|
2334
|
+
fe = ue("");
|
|
2245
2335
|
} catch (D) {
|
|
2246
2336
|
throw M = p, D;
|
|
2247
2337
|
}
|
|
2248
|
-
} else i.TRUSTED_TYPES_POLICY === null ? (M = void 0, fe = "") : (M === void 0 && (M = dt()), M && typeof fe == "string" && (fe =
|
|
2338
|
+
} else i.TRUSTED_TYPES_POLICY === null ? (M = void 0, fe = "") : (M === void 0 && (M = dt()), M && typeof fe == "string" && (fe = ue("")));
|
|
2249
2339
|
N && N(i), ze = i;
|
|
2250
|
-
}, Pn =
|
|
2251
|
-
return a.namespaceURI === ae ? i === "svg" : a.namespaceURI === At ? i === "svg" && (p === "annotation-xml" ||
|
|
2252
|
-
}, Zr = function(i, a, p) {
|
|
2253
|
-
return a.namespaceURI === ae ? i === "math" : a.namespaceURI === Et ? i === "math" && Yt[p] : !!In[i];
|
|
2340
|
+
}, Pn = y({}, [...en, ...tn, ...Ao]), In = y({}, [...nn, ...Eo]), Zr = function(i, a, p) {
|
|
2341
|
+
return a.namespaceURI === ae ? i === "svg" : a.namespaceURI === At ? i === "svg" && (p === "annotation-xml" || Gt[p]) : !!Pn[i];
|
|
2254
2342
|
}, Xr = function(i, a, p) {
|
|
2255
|
-
return a.namespaceURI ===
|
|
2256
|
-
}, Vr = function(i) {
|
|
2343
|
+
return a.namespaceURI === ae ? i === "math" : a.namespaceURI === Et ? i === "math" && Yt[p] : !!In[i];
|
|
2344
|
+
}, Vr = function(i, a, p) {
|
|
2345
|
+
return a.namespaceURI === Et && !Yt[p] || a.namespaceURI === At && !Gt[p] ? !1 : !In[i] && (Wr[i] || !Pn[i]);
|
|
2346
|
+
}, Qr = function(i) {
|
|
2257
2347
|
let a = te(i);
|
|
2258
2348
|
(!a || !a.tagName) && (a = {
|
|
2259
2349
|
namespaceURI: Me,
|
|
2260
2350
|
tagName: "template"
|
|
2261
2351
|
});
|
|
2262
2352
|
const p = lt(i.tagName), D = lt(a.tagName);
|
|
2263
|
-
return
|
|
2353
|
+
return qt[i.namespaceURI] ? i.namespaceURI === Et ? Zr(p, a, D) : i.namespaceURI === At ? Xr(p, a, D) : i.namespaceURI === ae ? Vr(p, a, D) : !!(Ke === "application/xhtml+xml" && qt[i.namespaceURI]) : !1;
|
|
2264
2354
|
}, Fe = function(i) {
|
|
2265
2355
|
rt(e.removed, {
|
|
2266
2356
|
element: i
|
|
@@ -2300,7 +2390,7 @@ function Mr() {
|
|
|
2300
2390
|
const F = p[D], A = F && F.name;
|
|
2301
2391
|
typeof A == "string" && Nn(i, F, A);
|
|
2302
2392
|
}
|
|
2303
|
-
},
|
|
2393
|
+
}, _e = function(i, a, p) {
|
|
2304
2394
|
if (!p)
|
|
2305
2395
|
try {
|
|
2306
2396
|
p = a.getAttributeNode(i);
|
|
@@ -2330,7 +2420,7 @@ function Mr() {
|
|
|
2330
2420
|
a.setAttribute(i, "");
|
|
2331
2421
|
} catch {
|
|
2332
2422
|
}
|
|
2333
|
-
},
|
|
2423
|
+
}, Kr = function(i) {
|
|
2334
2424
|
const a = ke(i);
|
|
2335
2425
|
if (a)
|
|
2336
2426
|
for (let p = a.length - 1; p >= 0; --p) {
|
|
@@ -2341,7 +2431,7 @@ function Mr() {
|
|
|
2341
2431
|
const a = [i];
|
|
2342
2432
|
for (; a.length > 0; ) {
|
|
2343
2433
|
const p = a.pop();
|
|
2344
|
-
Ce(p) === X.element &&
|
|
2434
|
+
Ce(p) === X.element && Kr(p);
|
|
2345
2435
|
const F = U(p);
|
|
2346
2436
|
if (F)
|
|
2347
2437
|
for (let A = F.length - 1; A >= 0; --A)
|
|
@@ -2349,13 +2439,13 @@ function Mr() {
|
|
|
2349
2439
|
}
|
|
2350
2440
|
}, Mn = function(i, a) {
|
|
2351
2441
|
return Te ? i === "patchsrc" ? !0 : i === "for" && a !== "label" && a !== "output" : !1;
|
|
2352
|
-
},
|
|
2442
|
+
}, Jr = function(i) {
|
|
2353
2443
|
if (!Te)
|
|
2354
2444
|
return;
|
|
2355
2445
|
const a = [i];
|
|
2356
2446
|
for (; a.length > 0; ) {
|
|
2357
2447
|
const p = a.pop(), D = Ce(p);
|
|
2358
|
-
if (D === X.processingInstruction || D === X.comment && j(
|
|
2448
|
+
if (D === X.processingInstruction || D === X.comment && j(Ar, p.data)) {
|
|
2359
2449
|
try {
|
|
2360
2450
|
T(p);
|
|
2361
2451
|
} catch {
|
|
@@ -2363,7 +2453,7 @@ function Mr() {
|
|
|
2363
2453
|
continue;
|
|
2364
2454
|
}
|
|
2365
2455
|
if (D === X.element) {
|
|
2366
|
-
const A = p, w = P(
|
|
2456
|
+
const A = p, w = P(Ge(p));
|
|
2367
2457
|
try {
|
|
2368
2458
|
A.hasAttribute && A.hasAttribute("patchsrc") && A.removeAttribute("patchsrc"), A.hasAttribute && A.hasAttribute("for") && Mn("for", w) && A.removeAttribute("for");
|
|
2369
2459
|
} catch {
|
|
@@ -2379,11 +2469,11 @@ function Mr() {
|
|
|
2379
2469
|
if (Ut)
|
|
2380
2470
|
i = "<remove></remove>" + i;
|
|
2381
2471
|
else {
|
|
2382
|
-
const A =
|
|
2472
|
+
const A = ar(i, /^[\r\n\t ]+/);
|
|
2383
2473
|
p = A && A[0];
|
|
2384
2474
|
}
|
|
2385
2475
|
Ke === "application/xhtml+xml" && Me === ae && (i = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + i + "</body></html>");
|
|
2386
|
-
const D = M ?
|
|
2476
|
+
const D = M ? ue(i) : i;
|
|
2387
2477
|
if (Me === ae)
|
|
2388
2478
|
try {
|
|
2389
2479
|
a = new g().parseFromString(D, Ke);
|
|
@@ -2392,12 +2482,12 @@ function Mr() {
|
|
|
2392
2482
|
if (!a || !a.documentElement) {
|
|
2393
2483
|
a = Le.createDocument(Me, "template", null);
|
|
2394
2484
|
try {
|
|
2395
|
-
a.documentElement.innerHTML =
|
|
2485
|
+
a.documentElement.innerHTML = Wt ? fe : D;
|
|
2396
2486
|
} catch {
|
|
2397
2487
|
}
|
|
2398
2488
|
}
|
|
2399
2489
|
const F = a.body || a.documentElement;
|
|
2400
|
-
return i && p && F.insertBefore(n.createTextNode(p), F.childNodes[0] || null), Me === ae ? C.call(a,
|
|
2490
|
+
return i && p && F.insertBefore(n.createTextNode(p), F.childNodes[0] || null), Me === ae ? C.call(a, ye ? "html" : "body")[0] : ye ? a.documentElement : F;
|
|
2401
2491
|
}, Un = function(i) {
|
|
2402
2492
|
const a = K ? K(i) : i.ownerDocument;
|
|
2403
2493
|
return Ze.call(
|
|
@@ -2474,8 +2564,8 @@ function Mr() {
|
|
|
2474
2564
|
p.call(e, i, a, ze);
|
|
2475
2565
|
});
|
|
2476
2566
|
}
|
|
2477
|
-
const
|
|
2478
|
-
return !!(Te && i.hasChildNodes() && !Je(i.firstElementChild) && j(
|
|
2567
|
+
const es = function(i, a) {
|
|
2568
|
+
return !!(Te && i.hasChildNodes() && !Je(i.firstElementChild) && j(Fr, i.textContent) && j(Fr, i.innerHTML) || Te && i.namespaceURI === ae && vo[a] && (Je(i.firstElementChild) || typeof i.textContent == "string" && j(Oo[a], i.textContent)) || i.nodeType === X.processingInstruction || Te && i.nodeType === X.comment && j(Ar, i.data));
|
|
2479
2569
|
}, Tt = function(i, a) {
|
|
2480
2570
|
if (i instanceof RegExp)
|
|
2481
2571
|
return j(i, a);
|
|
@@ -2485,8 +2575,8 @@ function Mr() {
|
|
|
2485
2575
|
return !!i(a, ...D);
|
|
2486
2576
|
}
|
|
2487
2577
|
return !1;
|
|
2488
|
-
},
|
|
2489
|
-
if (!Qe[a] &&
|
|
2578
|
+
}, ts = function(i, a, p) {
|
|
2579
|
+
if (!Qe[a] && Gn(a) && Tt(le.tagNameCheck, a))
|
|
2490
2580
|
return !1;
|
|
2491
2581
|
if (jt && !Ne[a]) {
|
|
2492
2582
|
const D = te(i), F = U(i);
|
|
@@ -2494,7 +2584,7 @@ function Mr() {
|
|
|
2494
2584
|
const A = F.length;
|
|
2495
2585
|
for (let w = A - 1; w >= 0; --w) {
|
|
2496
2586
|
const v = i === p ? L(F[w], !0) : F[w];
|
|
2497
|
-
D.insertBefore(v,
|
|
2587
|
+
D.insertBefore(v, q(i));
|
|
2498
2588
|
}
|
|
2499
2589
|
}
|
|
2500
2590
|
}
|
|
@@ -2503,24 +2593,24 @@ function Mr() {
|
|
|
2503
2593
|
return i.length === 0 ? a : a === p || a === D ? V(a) : a;
|
|
2504
2594
|
}, Hn = function(i, a) {
|
|
2505
2595
|
return i === a || te(i) !== null ? !1 : (Ht && kt(i), !0);
|
|
2506
|
-
},
|
|
2596
|
+
}, Wn = function(i, a) {
|
|
2507
2597
|
if (ce(b.beforeSanitizeElements, i, null), Hn(i, a))
|
|
2508
2598
|
return !0;
|
|
2509
2599
|
if (xt(i))
|
|
2510
2600
|
return Fe(i), !0;
|
|
2511
|
-
const p = P(
|
|
2601
|
+
const p = P(Ge(i));
|
|
2512
2602
|
if (R = jn(b.uponSanitizeElement, R, It, Dt), ce(b.uponSanitizeElement, i, {
|
|
2513
2603
|
tagName: p,
|
|
2514
2604
|
allowedTags: R
|
|
2515
2605
|
}), Hn(i, a))
|
|
2516
2606
|
return !0;
|
|
2517
|
-
if (
|
|
2607
|
+
if (es(i, p))
|
|
2518
2608
|
return Fe(i), !0;
|
|
2519
2609
|
if (Qe[p] || !(ge.tagCheck instanceof Function && ge.tagCheck(p)) && !R[p]) {
|
|
2520
|
-
const F =
|
|
2610
|
+
const F = ts(i, p, a);
|
|
2521
2611
|
return F === !1 && ce(b.afterSanitizeElements, i, null), F;
|
|
2522
2612
|
}
|
|
2523
|
-
if (Ce(i) === X.element && !
|
|
2613
|
+
if (Ce(i) === X.element && !Qr(i) || (p === "noscript" || p === "noembed" || p === "noframes") && j(Ro, i.innerHTML))
|
|
2524
2614
|
return Fe(i), !0;
|
|
2525
2615
|
if (me && i.nodeType === X.text) {
|
|
2526
2616
|
const F = Ct(i.textContent);
|
|
@@ -2529,35 +2619,35 @@ function Mr() {
|
|
|
2529
2619
|
}), i.textContent = F);
|
|
2530
2620
|
}
|
|
2531
2621
|
return ce(b.afterSanitizeElements, i, null), !1;
|
|
2532
|
-
},
|
|
2533
|
-
if (bn[a] || Mn(a, i) || Tn && (a === "id" || a === "name") && (p in n || p in
|
|
2622
|
+
}, qn = function(i, a, p) {
|
|
2623
|
+
if (bn[a] || Mn(a, i) || Tn && (a === "id" || a === "name") && (p in n || p in Yr))
|
|
2534
2624
|
return !1;
|
|
2535
2625
|
const D = B[a] || ge.attributeCheck instanceof Function && ge.attributeCheck(a, i);
|
|
2536
|
-
return Mt && j(De, a) || kn && j(Ve, a) ? !0 : D ? Bn[a] || j(En, st(p, An, "")) || (a === "src" || a === "xlink:href" || a === "href") && i !== "script" &&
|
|
2626
|
+
return Mt && j(De, a) || kn && j(Ve, a) ? !0 : D ? Bn[a] || j(En, st(p, An, "")) || (a === "src" || a === "xlink:href" || a === "href") && i !== "script" && cr(p, "data:") === 0 && Sn[i] || Cn && !j(Pt, st(p, An, "")) ? !0 : !p : (
|
|
2537
2627
|
// Condition a) covers a basically valid custom element tag name whose
|
|
2538
2628
|
// tag passes the configured tagNameCheck and whose attribute name
|
|
2539
2629
|
// passes the configured attributeNameCheck ...
|
|
2540
|
-
|
|
2630
|
+
Gn(i) && Tt(le.tagNameCheck, i) && Tt(le.attributeNameCheck, a, i) || // Condition b) covers an `is` attribute whose value passes the
|
|
2541
2631
|
// configured tagNameCheck while customized built-in elements are
|
|
2542
2632
|
// allowed.
|
|
2543
2633
|
a === "is" && le.allowCustomizedBuiltInElements && Tt(le.tagNameCheck, p)
|
|
2544
2634
|
);
|
|
2545
|
-
},
|
|
2546
|
-
return !
|
|
2547
|
-
},
|
|
2635
|
+
}, ns = y({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), Gn = function(i) {
|
|
2636
|
+
return !ns[lt(i)] && j(jr, i);
|
|
2637
|
+
}, rs = function(i, a, p, D) {
|
|
2548
2638
|
if (M && typeof m == "object" && typeof m.getAttributeType == "function" && !p)
|
|
2549
2639
|
switch (m.getAttributeType(i, a)) {
|
|
2550
2640
|
case "TrustedHTML":
|
|
2551
|
-
return
|
|
2641
|
+
return ue(D);
|
|
2552
2642
|
case "TrustedScriptURL":
|
|
2553
2643
|
return ht(D);
|
|
2554
2644
|
}
|
|
2555
2645
|
return D;
|
|
2556
|
-
},
|
|
2646
|
+
}, ss = function(i, a, p, D) {
|
|
2557
2647
|
try {
|
|
2558
|
-
p ? i.setAttributeNS(p, a, D) : i.setAttribute(a, D), xt(i) ? Fe(i) :
|
|
2648
|
+
p ? i.setAttributeNS(p, a, D) : i.setAttribute(a, D), xt(i) ? Fe(i) : lr(e.removed);
|
|
2559
2649
|
} catch {
|
|
2560
|
-
|
|
2650
|
+
_e(a, i);
|
|
2561
2651
|
}
|
|
2562
2652
|
}, Yn = function(i) {
|
|
2563
2653
|
ce(b.beforeSanitizeAttributes, i, null);
|
|
@@ -2575,40 +2665,40 @@ function Mr() {
|
|
|
2575
2665
|
let D = a.length;
|
|
2576
2666
|
const F = P(i.nodeName);
|
|
2577
2667
|
for (; D--; ) {
|
|
2578
|
-
const A = a[D], w = A.name, v = A.namespaceURI,
|
|
2579
|
-
let
|
|
2580
|
-
if (p.attrName = Y, p.attrValue =
|
|
2581
|
-
|
|
2668
|
+
const A = a[D], w = A.name, v = A.namespaceURI, G = A.value, Y = P(w), Qt = G;
|
|
2669
|
+
let W = w === "value" ? Qt : po(Qt);
|
|
2670
|
+
if (p.attrName = Y, p.attrValue = W, p.keepAttr = !0, p.forceKeepAttr = void 0, ce(b.uponSanitizeAttribute, i, p), W = p.attrValue, yn && (Y === "id" || Y === "name") && cr(W, _n) !== 0 && (_e(w, i, A), W = _n + W), Te && j(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, W)) {
|
|
2671
|
+
_e(w, i, A);
|
|
2582
2672
|
continue;
|
|
2583
2673
|
}
|
|
2584
|
-
if (Y === "attributename" &&
|
|
2585
|
-
|
|
2674
|
+
if (Y === "attributename" && ar(W, "href")) {
|
|
2675
|
+
_e(w, i, A);
|
|
2586
2676
|
continue;
|
|
2587
2677
|
}
|
|
2588
2678
|
if (!p.forceKeepAttr) {
|
|
2589
2679
|
if (!p.keepAttr) {
|
|
2590
|
-
|
|
2680
|
+
_e(w, i, A);
|
|
2591
2681
|
continue;
|
|
2592
2682
|
}
|
|
2593
|
-
if (!xn && j(
|
|
2594
|
-
|
|
2683
|
+
if (!xn && j(Bo, W)) {
|
|
2684
|
+
_e(w, i, A);
|
|
2595
2685
|
continue;
|
|
2596
2686
|
}
|
|
2597
|
-
if (me && (
|
|
2598
|
-
|
|
2687
|
+
if (me && (W = Ct(W)), !qn(F, Y, W)) {
|
|
2688
|
+
_e(w, i, A);
|
|
2599
2689
|
continue;
|
|
2600
2690
|
}
|
|
2601
|
-
|
|
2691
|
+
W = rs(F, Y, v, W), W !== Qt && ss(i, w, v, W);
|
|
2602
2692
|
}
|
|
2603
2693
|
}
|
|
2604
2694
|
ce(b.afterSanitizeAttributes, i, null);
|
|
2605
|
-
},
|
|
2695
|
+
}, yt = function(i) {
|
|
2606
2696
|
let a = null;
|
|
2607
2697
|
const p = Un(i);
|
|
2608
2698
|
for (ce(b.beforeSanitizeShadowDOM, i, null); a = p.nextNode(); )
|
|
2609
|
-
if (ce(b.uponSanitizeShadowNode, a, null),
|
|
2699
|
+
if (ce(b.uponSanitizeShadowNode, a, null), Wn(a, i), Yn(a), Ue(a.content) && yt(a.content), Ce(a) === X.element) {
|
|
2610
2700
|
const D = be(a);
|
|
2611
|
-
Ue(D) && (Vt(D),
|
|
2701
|
+
Ue(D) && (Vt(D), yt(D));
|
|
2612
2702
|
}
|
|
2613
2703
|
ce(b.afterSanitizeShadowDOM, i, null);
|
|
2614
2704
|
}, Vt = function(i) {
|
|
@@ -2619,7 +2709,7 @@ function Mr() {
|
|
|
2619
2709
|
for (; a.length > 0; ) {
|
|
2620
2710
|
const p = a.pop();
|
|
2621
2711
|
if (p.shadow) {
|
|
2622
|
-
|
|
2712
|
+
yt(p.shadow);
|
|
2623
2713
|
continue;
|
|
2624
2714
|
}
|
|
2625
2715
|
const D = p.node, A = Ce(D) === X.element, w = U(D);
|
|
@@ -2632,9 +2722,9 @@ function Mr() {
|
|
|
2632
2722
|
if (A) {
|
|
2633
2723
|
const v = Q ? Q(D) : null;
|
|
2634
2724
|
if (typeof v == "string" && P(v) === "template") {
|
|
2635
|
-
const
|
|
2636
|
-
Ue(
|
|
2637
|
-
node:
|
|
2725
|
+
const G = D.content;
|
|
2726
|
+
Ue(G) && a.push({
|
|
2727
|
+
node: G,
|
|
2638
2728
|
shadow: null
|
|
2639
2729
|
});
|
|
2640
2730
|
}
|
|
@@ -2653,17 +2743,17 @@ function Mr() {
|
|
|
2653
2743
|
};
|
|
2654
2744
|
return e.sanitize = function(d) {
|
|
2655
2745
|
let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = null, p = null, D = null, F = null;
|
|
2656
|
-
if (
|
|
2746
|
+
if (Wt = !d, Wt && (d = "<!-->"), typeof d != "string" && !Je(d) && (d = mo(d), typeof d != "string"))
|
|
2657
2747
|
throw we("dirty is not a string, aborting");
|
|
2658
2748
|
if (!e.isSupported)
|
|
2659
2749
|
return d;
|
|
2660
2750
|
zt ? (R = Dt, B = gt) : Zt(i), (b.uponSanitizeElement.length > 0 || b.uponSanitizeAttribute.length > 0) && (R = V(R)), b.uponSanitizeAttribute.length > 0 && (B = V(B)), e.removed = [];
|
|
2661
2751
|
const A = Ht && typeof d != "string" && Je(d);
|
|
2662
2752
|
if (A) {
|
|
2663
|
-
|
|
2664
|
-
const
|
|
2665
|
-
if (typeof
|
|
2666
|
-
const Y = P(
|
|
2753
|
+
Jr(d);
|
|
2754
|
+
const G = Ge(d);
|
|
2755
|
+
if (typeof G == "string") {
|
|
2756
|
+
const Y = P(G);
|
|
2667
2757
|
if (!R[Y] || Qe[Y])
|
|
2668
2758
|
throw bt(d), we("root node is forbidden and cannot be sanitized in-place");
|
|
2669
2759
|
}
|
|
@@ -2677,26 +2767,26 @@ function Mr() {
|
|
|
2677
2767
|
} else if (Je(d))
|
|
2678
2768
|
a = zn("<!---->"), p = a.ownerDocument.importNode(d, !0), p.nodeType === X.element && p.nodeName === "BODY" || p.nodeName === "HTML" ? a = p : a.appendChild(p), Vt(p);
|
|
2679
2769
|
else {
|
|
2680
|
-
if (!Pe && !me && !
|
|
2770
|
+
if (!Pe && !me && !ye && // eslint-disable-next-line unicorn/prefer-includes
|
|
2681
2771
|
d.indexOf("<") === -1)
|
|
2682
|
-
return M && Ft ?
|
|
2772
|
+
return M && Ft ? ue(d) : d;
|
|
2683
2773
|
if (a = zn(d), !a)
|
|
2684
2774
|
return Pe ? null : Ft ? fe : "";
|
|
2685
2775
|
}
|
|
2686
2776
|
a && Ut && Fe(a.firstChild);
|
|
2687
2777
|
const w = A ? d : a;
|
|
2688
2778
|
try {
|
|
2689
|
-
const
|
|
2690
|
-
for (; D =
|
|
2691
|
-
|
|
2692
|
-
} catch (
|
|
2779
|
+
const G = Un(w);
|
|
2780
|
+
for (; D = G.nextNode(); )
|
|
2781
|
+
Wn(D, w), Yn(D), Ue(D.content) && yt(D.content);
|
|
2782
|
+
} catch (G) {
|
|
2693
2783
|
throw A && (bt(d), Se(e.removed, (Y) => {
|
|
2694
2784
|
Y.element && kt(Y.element);
|
|
2695
|
-
})),
|
|
2785
|
+
})), G;
|
|
2696
2786
|
}
|
|
2697
2787
|
if (A)
|
|
2698
|
-
return Se(e.removed, (
|
|
2699
|
-
|
|
2788
|
+
return Se(e.removed, (G) => {
|
|
2789
|
+
G.element && kt(G.element);
|
|
2700
2790
|
}), me && Xt(d), d;
|
|
2701
2791
|
if (Pe) {
|
|
2702
2792
|
if (me && Xt(a), mt)
|
|
@@ -2706,9 +2796,9 @@ function Mr() {
|
|
|
2706
2796
|
F = a;
|
|
2707
2797
|
return (B.shadowroot || B.shadowrootmode) && (F = S.call(r, F, !0)), F;
|
|
2708
2798
|
}
|
|
2709
|
-
let v =
|
|
2710
|
-
return
|
|
2711
|
-
` + v), me && (v = Ct(v)), M && Ft ?
|
|
2799
|
+
let v = ye ? a.outerHTML : a.innerHTML;
|
|
2800
|
+
return ye && R["!doctype"] && a.ownerDocument && a.ownerDocument.doctype && a.ownerDocument.doctype.name && j(wo, a.ownerDocument.doctype.name) && (v = "<!DOCTYPE " + a.ownerDocument.doctype.name + `>
|
|
2801
|
+
` + v), me && (v = Ct(v)), M && Ft ? ue(v) : v;
|
|
2712
2802
|
}, e.setConfig = function() {
|
|
2713
2803
|
let d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2714
2804
|
Zt(d), zt = !0, Dt = R, gt = B;
|
|
@@ -2717,25 +2807,25 @@ function Mr() {
|
|
|
2717
2807
|
}, e.isValidAttribute = function(d, i, a) {
|
|
2718
2808
|
ze || Zt({});
|
|
2719
2809
|
const p = P(d), D = P(i);
|
|
2720
|
-
return
|
|
2810
|
+
return qn(p, D, a);
|
|
2721
2811
|
}, e.addHook = function(d, i) {
|
|
2722
2812
|
typeof i == "function" && Z(b, d) && rt(b[d], i);
|
|
2723
2813
|
}, e.removeHook = function(d, i) {
|
|
2724
2814
|
if (Z(b, d)) {
|
|
2725
2815
|
if (i !== void 0) {
|
|
2726
|
-
const a =
|
|
2727
|
-
return a === -1 ? void 0 :
|
|
2816
|
+
const a = ao(b[d], i);
|
|
2817
|
+
return a === -1 ? void 0 : co(b[d], a, 1)[0];
|
|
2728
2818
|
}
|
|
2729
|
-
return
|
|
2819
|
+
return lr(b[d]);
|
|
2730
2820
|
}
|
|
2731
2821
|
}, e.removeHooks = function(d) {
|
|
2732
2822
|
Z(b, d) && (b[d] = []);
|
|
2733
2823
|
}, e.removeAllHooks = function() {
|
|
2734
|
-
b =
|
|
2824
|
+
b = Er();
|
|
2735
2825
|
}, e;
|
|
2736
2826
|
}
|
|
2737
|
-
var
|
|
2738
|
-
const
|
|
2827
|
+
var Po = zr();
|
|
2828
|
+
const Io = ["caption", "col", "colgroup", "small", "u", "iframe"], No = [
|
|
2739
2829
|
"target",
|
|
2740
2830
|
"role",
|
|
2741
2831
|
"colspan",
|
|
@@ -2746,14 +2836,14 @@ const Lu = ["caption", "col", "colgroup", "small", "u", "iframe"], $u = [
|
|
|
2746
2836
|
"frameborder",
|
|
2747
2837
|
"referrerpolicy",
|
|
2748
2838
|
"loading"
|
|
2749
|
-
],
|
|
2839
|
+
], Mo = /* @__PURE__ */ new Set(["www.youtube-nocookie.com"]), zo = (t) => {
|
|
2750
2840
|
if (!t) return !1;
|
|
2751
2841
|
try {
|
|
2752
|
-
return
|
|
2842
|
+
return Mo.has(new URL(t).host);
|
|
2753
2843
|
} catch {
|
|
2754
2844
|
return !1;
|
|
2755
2845
|
}
|
|
2756
|
-
},
|
|
2846
|
+
}, Uo = /* @__PURE__ */ new Set([
|
|
2757
2847
|
"background-color",
|
|
2758
2848
|
"border",
|
|
2759
2849
|
"border-bottom",
|
|
@@ -2789,27 +2879,27 @@ const Lu = ["caption", "col", "colgroup", "small", "u", "iframe"], $u = [
|
|
|
2789
2879
|
"white-space",
|
|
2790
2880
|
"width",
|
|
2791
2881
|
"writing-mode"
|
|
2792
|
-
]),
|
|
2882
|
+
]), jo = {
|
|
2793
2883
|
position: /* @__PURE__ */ new Set(["relative", "static"])
|
|
2794
|
-
},
|
|
2795
|
-
const [n, ...r] = e.split(":"), s = n.trim().toLowerCase(),
|
|
2796
|
-
return /url\(|expression\(|@import|behavior:/i.test(
|
|
2797
|
-
}).map((e) => `${e};`).join(" "),
|
|
2798
|
-
let
|
|
2799
|
-
const
|
|
2884
|
+
}, Ho = (t) => t.split(";").map((e) => e.trim()).filter(Boolean).filter((e) => {
|
|
2885
|
+
const [n, ...r] = e.split(":"), s = n.trim().toLowerCase(), o = r.join(":").trim().toLowerCase();
|
|
2886
|
+
return /url\(|expression\(|@import|behavior:/i.test(o) ? !1 : Uo.has(s) ? !0 : !!jo[s]?.has(o);
|
|
2887
|
+
}).map((e) => `${e};`).join(" "), Wo = (t) => Array.from(t).filter((e) => (e.codePointAt(0) ?? 0) > 32).join("").toLowerCase();
|
|
2888
|
+
let ot = null;
|
|
2889
|
+
const qo = () => ot || (ot = Po(window), ot.addHook("afterSanitizeAttributes", (t) => {
|
|
2800
2890
|
const e = t;
|
|
2801
2891
|
if (!e.getAttribute) return;
|
|
2802
|
-
if (e.tagName === "IFRAME" && !
|
|
2892
|
+
if (e.tagName === "IFRAME" && !zo(e.getAttribute("src"))) {
|
|
2803
2893
|
e.remove();
|
|
2804
2894
|
return;
|
|
2805
2895
|
}
|
|
2806
2896
|
for (const r of ["src", "href"]) {
|
|
2807
2897
|
const s = e.getAttribute(r);
|
|
2808
|
-
s &&
|
|
2898
|
+
s && Wo(s).startsWith("data:") && e.removeAttribute(r);
|
|
2809
2899
|
}
|
|
2810
2900
|
const n = e.getAttribute("style");
|
|
2811
2901
|
if (n) {
|
|
2812
|
-
const r =
|
|
2902
|
+
const r = Ho(n);
|
|
2813
2903
|
r ? e.setAttribute("style", r) : e.removeAttribute("style");
|
|
2814
2904
|
}
|
|
2815
2905
|
if (e.getAttribute("target") === "_blank") {
|
|
@@ -2821,56 +2911,56 @@ const ju = () => ut || (ut = Ou(window), ut.addHook("afterSanitizeAttributes", (
|
|
|
2821
2911
|
).join(" ")
|
|
2822
2912
|
);
|
|
2823
2913
|
}
|
|
2824
|
-
}),
|
|
2825
|
-
ADD_TAGS:
|
|
2826
|
-
ADD_ATTR:
|
|
2914
|
+
}), ot), Go = (t) => qo().sanitize(t, {
|
|
2915
|
+
ADD_TAGS: Io,
|
|
2916
|
+
ADD_ATTR: No,
|
|
2827
2917
|
RETURN_DOM_FRAGMENT: !0,
|
|
2828
2918
|
ALLOWED_URI_REGEXP: /^(?:(?:https?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.\-:]|$))/i
|
|
2829
|
-
}),
|
|
2830
|
-
const { shiftHeading: n = 0, tocMaxDepth: r = 2 } = e, s = new
|
|
2919
|
+
}), Yo = (t) => Math.min(6, Math.max(1, t)), Zo = (t, e = {}) => {
|
|
2920
|
+
const { shiftHeading: n = 0, tocMaxDepth: r = 2 } = e, s = new vr(
|
|
2831
2921
|
{ gfm: !0, breaks: !0 },
|
|
2832
|
-
|
|
2922
|
+
eo({
|
|
2833
2923
|
// The card title is a heading too, and the shift has to reach it.
|
|
2834
|
-
cardHeadingLevel: `h${
|
|
2924
|
+
cardHeadingLevel: `h${Yo(3 + n)}`
|
|
2835
2925
|
})
|
|
2836
|
-
),
|
|
2926
|
+
), o = Go(s.parse(t, { async: !1 })), { headings: l } = ki(o, document, {
|
|
2837
2927
|
shiftHeading: n,
|
|
2838
2928
|
tocMaxDepth: r
|
|
2839
|
-
}),
|
|
2840
|
-
return
|
|
2841
|
-
},
|
|
2842
|
-
/* @__PURE__ */ ee.jsx(
|
|
2843
|
-
e.children ? /* @__PURE__ */ ee.jsx(
|
|
2844
|
-
] }, e.id)) }),
|
|
2929
|
+
}), u = document.createElement("div");
|
|
2930
|
+
return u.appendChild(o), { html: u.innerHTML, headings: l };
|
|
2931
|
+
}, Xo = { html: "", headings: [] }, Ur = ({ items: t }) => /* @__PURE__ */ ee.jsx(ee.Fragment, { children: t.map((e) => /* @__PURE__ */ ee.jsxs("li", { children: [
|
|
2932
|
+
/* @__PURE__ */ ee.jsx(is, { href: `#${e.id}`, children: e.value }),
|
|
2933
|
+
e.children ? /* @__PURE__ */ ee.jsx(br, { children: /* @__PURE__ */ ee.jsx(Ur, { items: e.children }) }) : null
|
|
2934
|
+
] }, e.id)) }), Ko = ({
|
|
2845
2935
|
children: t,
|
|
2846
2936
|
showToc: e,
|
|
2847
2937
|
tocTitle: n = "目次",
|
|
2848
2938
|
shiftHeading: r = 0,
|
|
2849
2939
|
tocMaxDepth: s = 2
|
|
2850
2940
|
}) => {
|
|
2851
|
-
const [{ html:
|
|
2941
|
+
const [{ html: o, headings: l }, u] = Rt.useState(Xo);
|
|
2852
2942
|
return Rt.useEffect(() => {
|
|
2853
|
-
|
|
2943
|
+
u(Zo(t, { shiftHeading: r, tocMaxDepth: s }));
|
|
2854
2944
|
}, [t, r, s]), Rt.useEffect(() => {
|
|
2855
|
-
if (!
|
|
2945
|
+
if (!o) return;
|
|
2856
2946
|
const c = decodeURI(window.location.hash.slice(1));
|
|
2857
2947
|
c && document.getElementById(c)?.scrollIntoView();
|
|
2858
|
-
}, [
|
|
2948
|
+
}, [o]), /* @__PURE__ */ ee.jsxs("div", { className: "py-8 flex flex-col gap-8", children: [
|
|
2859
2949
|
e && l.length > 0 && /* @__PURE__ */ ee.jsxs("nav", { className: "rounded-3xl p-10 bg-yellow-50", children: [
|
|
2860
2950
|
/* @__PURE__ */ ee.jsx("h2", { className: "mb-4 font-bold text-h-xs-m sm:text-h-xs", children: n }),
|
|
2861
|
-
/* @__PURE__ */ ee.jsx(
|
|
2951
|
+
/* @__PURE__ */ ee.jsx(br, { children: /* @__PURE__ */ ee.jsx(Ur, { items: l }) })
|
|
2862
2952
|
] }),
|
|
2863
2953
|
/* @__PURE__ */ ee.jsx(
|
|
2864
2954
|
"div",
|
|
2865
2955
|
{
|
|
2866
2956
|
className: "flex flex-col gap-8",
|
|
2867
|
-
dangerouslySetInnerHTML: { __html:
|
|
2957
|
+
dangerouslySetInnerHTML: { __html: o }
|
|
2868
2958
|
}
|
|
2869
2959
|
)
|
|
2870
2960
|
] });
|
|
2871
2961
|
};
|
|
2872
2962
|
export {
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2963
|
+
Ko as Markdown,
|
|
2964
|
+
Ur as TableOfContents,
|
|
2965
|
+
Zo as render
|
|
2876
2966
|
};
|