var ne = Object.defineProperty;
var ie = (a, t, n) => t in a ? ne(a, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : a[t] = n;
var B = (a, t, n) => ie(a, typeof t != "symbol" ? t + "" : t, n);
function X() {
return {
async: !1,
baseUrl: null,
breaks: !1,
extensions: null,
gfm: !0,
headerIds: !0,
headerPrefix: "",
highlight: null,
hooks: null,
langPrefix: "language-",
mangle: !0,
pedantic: !1,
renderer: null,
sanitize: !1,
sanitizer: null,
silent: !1,
smartypants: !1,
tokenizer: null,
walkTokens: null,
xhtml: !1
};
}
let L = X();
function se(a) {
L = a;
}
const G = /[&<>"']/, re = new RegExp(G.source, "g"), W = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, le = new RegExp(W.source, "g"), ae = {
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'"
}, U = (a) => ae[a];
function z(a, t) {
if (t) {
if (G.test(a))
return a.replace(re, U);
} else if (W.test(a))
return a.replace(le, U);
return a;
}
const oe = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
function J(a) {
return a.replace(oe, (t, n) => (n = n.toLowerCase(), n === "colon" ? ":" : n.charAt(0) === "#" ? n.charAt(1) === "x" ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1)) : ""));
}
const ce = /(^|[^\[])\^/g;
function S(a, t) {
a = typeof a == "string" ? a : a.source, t = t || "";
const n = {
replace: (e, i) => (i = i.source || i, i = i.replace(ce, "$1"), a = a.replace(e, i), n),
getRegex: () => new RegExp(a, t)
};
return n;
}
const he = /[^\w:]/g, ue = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;
function Z(a, t, n) {
if (a) {
let e;
try {
e = decodeURIComponent(J(n)).replace(he, "").toLowerCase();
} catch {
return null;
}
if (e.indexOf("javascript:") === 0 || e.indexOf("vbscript:") === 0 || e.indexOf("data:") === 0)
return null;
}
t && !ue.test(n) && (n = de(t, n));
try {
n = encodeURI(n).replace(/%25/g, "%");
} catch {
return null;
}
return n;
}
const C = {}, pe = /^[^:]+:\/*[^/]*$/, fe = /^([^:]+:)[\s\S]*$/, ge = /^([^:]+:\/*[^/]*)[\s\S]*$/;
function de(a, t) {
C[" " + a] || (pe.test(a) ? C[" " + a] = a + "/" : C[" " + a] = D(a, "/", !0)), a = C[" " + a];
const n = a.indexOf(":") === -1;
return t.substring(0, 2) === "//" ? n ? t : a.replace(fe, "$1") + t : t.charAt(0) === "/" ? n ? t : a.replace(ge, "$1") + t : a + t;
}
const P = { exec: function() {
} };
function H(a, t) {
const n = a.replace(/\|/g, (s, l, o) => {
let h = !1, w = l;
for (; --w >= 0 && o[w] === "\\"; ) h = !h;
return h ? "|" : " |";
}), e = n.split(/ \|/);
let i = 0;
if (e[0].trim() || e.shift(), e.length > 0 && !e[e.length - 1].trim() && e.pop(), e.length > t)
e.splice(t);
else
for (; e.length < t; ) e.push("");
for (; i < e.length; i++)
e[i] = e[i].trim().replace(/\\\|/g, "|");
return e;
}
function D(a, t, n) {
const e = a.length;
if (e === 0)
return "";
let i = 0;
for (; i < e; ) {
const s = a.charAt(e - i - 1);
if (s === t && !n)
i++;
else if (s !== t && n)
i++;
else
break;
}
return a.slice(0, e - i);
}
function ke(a, t) {
if (a.indexOf(t[1]) === -1)
return -1;
const n = a.length;
let e = 0, i = 0;
for (; i < n; i++)
if (a[i] === "\\")
i++;
else if (a[i] === t[0])
e++;
else if (a[i] === t[1] && (e--, e < 0))
return i;
return -1;
}
function me(a) {
a && a.sanitize && !a.silent && console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options");
}
function j(a, t) {
if (t < 1)
return "";
let n = "";
for (; t > 1; )
t & 1 && (n += a), t >>= 1, a += a;
return n + a;
}
function F(a, t, n, e) {
const i = t.href, s = t.title ? z(t.title) : null, l = a[1].replace(/\\([\[\]])/g, "$1");
if (a[0].charAt(0) !== "!") {
e.state.inLink = !0;
const o = {
type: "link",
raw: n,
href: i,
title: s,
text: l,
tokens: e.inlineTokens(l)
};
return e.state.inLink = !1, o;
}
return {
type: "image",
raw: n,
href: i,
title: s,
text: z(l)
};
}
function xe(a, t) {
const n = a.match(/^(\s+)(?:```)/);
if (n === null)
return t;
const e = n[1];
return t.split(`
`).map((i) => {
const s = i.match(/^\s+/);
if (s === null)
return i;
const [l] = s;
return l.length >= e.length ? i.slice(e.length) : i;
}).join(`
`);
}
class N {
constructor(t) {
this.options = t || L;
}
space(t) {
const n = this.rules.block.newline.exec(t);
if (n && n[0].length > 0)
return {
type: "space",
raw: n[0]
};
}
code(t) {
const n = this.rules.block.code.exec(t);
if (n) {
const e = n[0].replace(/^ {1,4}/gm, "");
return {
type: "code",
raw: n[0],
codeBlockStyle: "indented",
text: this.options.pedantic ? e : D(e, `
`)
};
}
}
fences(t) {
const n = this.rules.block.fences.exec(t);
if (n) {
const e = n[0], i = xe(e, n[3] || "");
return {
type: "code",
raw: e,
lang: n[2] ? n[2].trim().replace(this.rules.inline._escapes, "$1") : n[2],
text: i
};
}
}
heading(t) {
const n = this.rules.block.heading.exec(t);
if (n) {
let e = n[2].trim();
if (/#$/.test(e)) {
const i = D(e, "#");
(this.options.pedantic || !i || / $/.test(i)) && (e = i.trim());
}
return {
type: "heading",
raw: n[0],
depth: n[1].length,
text: e,
tokens: this.lexer.inline(e)
};
}
}
hr(t) {
const n = this.rules.block.hr.exec(t);
if (n)
return {
type: "hr",
raw: n[0]
};
}
blockquote(t) {
const n = this.rules.block.blockquote.exec(t);
if (n) {
const e = n[0].replace(/^ *>[ \t]?/gm, ""), i = this.lexer.state.top;
this.lexer.state.top = !0;
const s = this.lexer.blockTokens(e);
return this.lexer.state.top = i, {
type: "blockquote",
raw: n[0],
tokens: s,
text: e
};
}
}
list(t) {
let n = this.rules.block.list.exec(t);
if (n) {
let e, i, s, l, o, h, w, x, b, c, r, m, g = n[1].trim();
const y = g.length > 1, p = {
type: "list",
raw: "",
ordered: y,
start: y ? +g.slice(0, -1) : "",
loose: !1,
items: []
};
g = y ? `\\d{1,9}\\${g.slice(-1)}` : `\\${g}`, this.options.pedantic && (g = y ? g : "[*+-]");
const k = new RegExp(`^( {0,3}${g})((?:[ ][^\\n]*)?(?:\\n|$))`);
for (; t && (m = !1, !(!(n = k.exec(t)) || this.rules.block.hr.test(t))); ) {
if (e = n[0], t = t.substring(e.length), x = n[2].split(`
`, 1)[0].replace(/^\t+/, (T) => " ".repeat(3 * T.length)), b = t.split(`
`, 1)[0], this.options.pedantic ? (l = 2, r = x.trimLeft()) : (l = n[2].search(/[^ ]/), l = l > 4 ? 1 : l, r = x.slice(l), l += n[1].length), h = !1, !x && /^ *$/.test(b) && (e += b + `
`, t = t.substring(b.length + 1), m = !0), !m) {
const T = new RegExp(`^ {0,${Math.min(3, l - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), $ = new RegExp(`^ {0,${Math.min(3, l - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), R = new RegExp(`^ {0,${Math.min(3, l - 1)}}(?:\`\`\`|~~~)`), A = new RegExp(`^ {0,${Math.min(3, l - 1)}}#`);
for (; t && (c = t.split(`
`, 1)[0], b = c, this.options.pedantic && (b = b.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), !(R.test(b) || A.test(b) || T.test(b) || $.test(t))); ) {
if (b.search(/[^ ]/) >= l || !b.trim())
r += `
` + b.slice(l);
else {
if (h || x.search(/[^ ]/) >= 4 || R.test(x) || A.test(x) || $.test(x))
break;
r += `
` + b;
}
!h && !b.trim() && (h = !0), e += c + `
`, t = t.substring(c.length + 1), x = b.slice(l);
}
}
p.loose || (w ? p.loose = !0 : /\n *\n *$/.test(e) && (w = !0)), this.options.gfm && (i = /^\[[ xX]\] /.exec(r), i && (s = i[0] !== "[ ] ", r = r.replace(/^\[[ xX]\] +/, ""))), p.items.push({
type: "list_item",
raw: e,
task: !!i,
checked: s,
loose: !1,
text: r
}), p.raw += e;
}
p.items[p.items.length - 1].raw = e.trimRight(), p.items[p.items.length - 1].text = r.trimRight(), p.raw = p.raw.trimRight();
const _ = p.items.length;
for (o = 0; o < _; o++)
if (this.lexer.state.top = !1, p.items[o].tokens = this.lexer.blockTokens(p.items[o].text, []), !p.loose) {
const T = p.items[o].tokens.filter((R) => R.type === "space"), $ = T.length > 0 && T.some((R) => /\n.*\n/.test(R.raw));
p.loose = $;
}
if (p.loose)
for (o = 0; o < _; o++)
p.items[o].loose = !0;
return p;
}
}
html(t) {
const n = this.rules.block.html.exec(t);
if (n) {
const e = {
type: "html",
raw: n[0],
pre: !this.options.sanitizer && (n[1] === "pre" || n[1] === "script" || n[1] === "style"),
text: n[0]
};
if (this.options.sanitize) {
const i = this.options.sanitizer ? this.options.sanitizer(n[0]) : z(n[0]);
e.type = "paragraph", e.text = i, e.tokens = this.lexer.inline(i);
}
return e;
}
}
def(t) {
const n = this.rules.block.def.exec(t);
if (n) {
const e = n[1].toLowerCase().replace(/\s+/g, " "), i = n[2] ? n[2].replace(/^<(.*)>$/, "$1").replace(this.rules.inline._escapes, "$1") : "", s = n[3] ? n[3].substring(1, n[3].length - 1).replace(this.rules.inline._escapes, "$1") : n[3];
return {
type: "def",
tag: e,
raw: n[0],
href: i,
title: s
};
}
}
table(t) {
const n = this.rules.block.table.exec(t);
if (n) {
const e = {
type: "table",
header: H(n[1]).map((i) => ({ text: i })),
align: n[2].replace(/^ *|\| *$/g, "").split(/ *\| */),
rows: n[3] && n[3].trim() ? n[3].replace(/\n[ \t]*$/, "").split(`
`) : []
};
if (e.header.length === e.align.length) {
e.raw = n[0];
let i = e.align.length, s, l, o, h;
for (s = 0; s < i; s++)
/^ *-+: *$/.test(e.align[s]) ? e.align[s] = "right" : /^ *:-+: *$/.test(e.align[s]) ? e.align[s] = "center" : /^ *:-+ *$/.test(e.align[s]) ? e.align[s] = "left" : e.align[s] = null;
for (i = e.rows.length, s = 0; s < i; s++)
e.rows[s] = H(e.rows[s], e.header.length).map((w) => ({ text: w }));
for (i = e.header.length, l = 0; l < i; l++)
e.header[l].tokens = this.lexer.inline(e.header[l].text);
for (i = e.rows.length, l = 0; l < i; l++)
for (h = e.rows[l], o = 0; o < h.length; o++)
h[o].tokens = this.lexer.inline(h[o].text);
return e;
}
}
}
lheading(t) {
const n = this.rules.block.lheading.exec(t);
if (n)
return {
type: "heading",
raw: n[0],
depth: n[2].charAt(0) === "=" ? 1 : 2,
text: n[1],
tokens: this.lexer.inline(n[1])
};
}
paragraph(t) {
const n = this.rules.block.paragraph.exec(t);
if (n) {
const e = n[1].charAt(n[1].length - 1) === `
` ? n[1].slice(0, -1) : n[1];
return {
type: "paragraph",
raw: n[0],
text: e,
tokens: this.lexer.inline(e)
};
}
}
text(t) {
const n = this.rules.block.text.exec(t);
if (n)
return {
type: "text",
raw: n[0],
text: n[0],
tokens: this.lexer.inline(n[0])
};
}
escape(t) {
const n = this.rules.inline.escape.exec(t);
if (n)
return {
type: "escape",
raw: n[0],
text: z(n[1])
};
}
tag(t) {
const n = this.rules.inline.tag.exec(t);
if (n)
return !this.lexer.state.inLink && /^/i.test(n[0]) && (this.lexer.state.inLink = !1), !this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(n[0]) ? this.lexer.state.inRawBlock = !0 : this.lexer.state.inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0]) && (this.lexer.state.inRawBlock = !1), {
type: this.options.sanitize ? "text" : "html",
raw: n[0],
inLink: this.lexer.state.inLink,
inRawBlock: this.lexer.state.inRawBlock,
text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(n[0]) : z(n[0]) : n[0]
};
}
link(t) {
const n = this.rules.inline.link.exec(t);
if (n) {
const e = n[2].trim();
if (!this.options.pedantic && /^$/.test(e))
return;
const l = D(e.slice(0, -1), "\\");
if ((e.length - l.length) % 2 === 0)
return;
} else {
const l = ke(n[2], "()");
if (l > -1) {
const h = (n[0].indexOf("!") === 0 ? 5 : 4) + n[1].length + l;
n[2] = n[2].substring(0, l), n[0] = n[0].substring(0, h).trim(), n[3] = "";
}
}
let i = n[2], s = "";
if (this.options.pedantic) {
const l = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);
l && (i = l[1], s = l[3]);
} else
s = n[3] ? n[3].slice(1, -1) : "";
return i = i.trim(), /^$/.test(e) ? i = i.slice(1) : i = i.slice(1, -1)), F(n, {
href: i && i.replace(this.rules.inline._escapes, "$1"),
title: s && s.replace(this.rules.inline._escapes, "$1")
}, n[0], this.lexer);
}
}
reflink(t, n) {
let e;
if ((e = this.rules.inline.reflink.exec(t)) || (e = this.rules.inline.nolink.exec(t))) {
let i = (e[2] || e[1]).replace(/\s+/g, " ");
if (i = n[i.toLowerCase()], !i) {
const s = e[0].charAt(0);
return {
type: "text",
raw: s,
text: s
};
}
return F(e, i, e[0], this.lexer);
}
}
emStrong(t, n, e = "") {
let i = this.rules.inline.emStrong.lDelim.exec(t);
if (!i || i[3] && e.match(/[\p{L}\p{N}]/u)) return;
const s = i[1] || i[2] || "";
if (!s || s && (e === "" || this.rules.inline.punctuation.exec(e))) {
const l = i[0].length - 1;
let o, h, w = l, x = 0;
const b = i[0][0] === "*" ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd;
for (b.lastIndex = 0, n = n.slice(-1 * t.length + l); (i = b.exec(n)) != null; ) {
if (o = i[1] || i[2] || i[3] || i[4] || i[5] || i[6], !o) continue;
if (h = o.length, i[3] || i[4]) {
w += h;
continue;
} else if ((i[5] || i[6]) && l % 3 && !((l + h) % 3)) {
x += h;
continue;
}
if (w -= h, w > 0) continue;
h = Math.min(h, h + w + x);
const c = t.slice(0, l + i.index + (i[0].length - o.length) + h);
if (Math.min(l, h) % 2) {
const m = c.slice(1, -1);
return {
type: "em",
raw: c,
text: m,
tokens: this.lexer.inlineTokens(m)
};
}
const r = c.slice(2, -2);
return {
type: "strong",
raw: c,
text: r,
tokens: this.lexer.inlineTokens(r)
};
}
}
}
codespan(t) {
const n = this.rules.inline.code.exec(t);
if (n) {
let e = n[2].replace(/\n/g, " ");
const i = /[^ ]/.test(e), s = /^ /.test(e) && / $/.test(e);
return i && s && (e = e.substring(1, e.length - 1)), e = z(e, !0), {
type: "codespan",
raw: n[0],
text: e
};
}
}
br(t) {
const n = this.rules.inline.br.exec(t);
if (n)
return {
type: "br",
raw: n[0]
};
}
del(t) {
const n = this.rules.inline.del.exec(t);
if (n)
return {
type: "del",
raw: n[0],
text: n[2],
tokens: this.lexer.inlineTokens(n[2])
};
}
autolink(t, n) {
const e = this.rules.inline.autolink.exec(t);
if (e) {
let i, s;
return e[2] === "@" ? (i = z(this.options.mangle ? n(e[1]) : e[1]), s = "mailto:" + i) : (i = z(e[1]), s = i), {
type: "link",
raw: e[0],
text: i,
href: s,
tokens: [
{
type: "text",
raw: i,
text: i
}
]
};
}
}
url(t, n) {
let e;
if (e = this.rules.inline.url.exec(t)) {
let i, s;
if (e[2] === "@")
i = z(this.options.mangle ? n(e[0]) : e[0]), s = "mailto:" + i;
else {
let l;
do
l = e[0], e[0] = this.rules.inline._backpedal.exec(e[0])[0];
while (l !== e[0]);
i = z(e[0]), e[1] === "www." ? s = "http://" + e[0] : s = e[0];
}
return {
type: "link",
raw: e[0],
text: i,
href: s,
tokens: [
{
type: "text",
raw: i,
text: i
}
]
};
}
}
inlineText(t, n) {
const e = this.rules.inline.text.exec(t);
if (e) {
let i;
return this.lexer.state.inRawBlock ? i = this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(e[0]) : z(e[0]) : e[0] : i = z(this.options.smartypants ? n(e[0]) : e[0]), {
type: "text",
raw: e[0],
text: i
};
}
}
}
const d = {
newline: /^(?: *(?:\n|$))+/,
code: /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,
fences: /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,
hr: /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,
heading: /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,
blockquote: /^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,
list: /^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,
html: "^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\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|$))",
def: /^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,
table: P,
lheading: /^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
// regex template, placeholders will be replaced according to different paragraph
// interruption rules of commonmark and the original markdown spec:
_paragraph: /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,
text: /^[^\n]+/
};
d._label = /(?!\s*\])(?:\\.|[^\[\]\\])+/;
d._title = /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;
d.def = S(d.def).replace("label", d._label).replace("title", d._title).getRegex();
d.bullet = /(?:[*+-]|\d{1,9}[.)])/;
d.listItemStart = S(/^( *)(bull) */).replace("bull", d.bullet).getRegex();
d.list = S(d.list).replace(/bull/g, d.bullet).replace("hr", "\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def", "\\n+(?=" + d.def.source + ")").getRegex();
d._tag = "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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";
d._comment = /|$)/;
d.html = S(d.html, "i").replace("comment", d._comment).replace("tag", d._tag).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
d.paragraph = S(d._paragraph).replace("hr", d.hr).replace("heading", " {0,3}#{1,6} ").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", d._tag).getRegex();
d.blockquote = S(d.blockquote).replace("paragraph", d.paragraph).getRegex();
d.normal = { ...d };
d.gfm = {
...d.normal,
table: "^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"
// Cells
};
d.gfm.table = S(d.gfm.table).replace("hr", d.hr).replace("heading", " {0,3}#{1,6} ").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", d._tag).getRegex();
d.gfm.paragraph = S(d._paragraph).replace("hr", d.hr).replace("heading", " {0,3}#{1,6} ").replace("|lheading", "").replace("table", d.gfm.table).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", d._tag).getRegex();
d.pedantic = {
...d.normal,
html: S(
`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)| ${t}
` : "' + (e ? t : z(t, !0)) + `
`;
}
/**
* @param {string} quote
*/
blockquote(t) {
return `" + (e ? t : z(t, !0)) + `
${t}
`;
}
html(t) {
return t;
}
/**
* @param {string} text
* @param {string} level
* @param {string} raw
* @param {any} slugger
*/
heading(t, n, e, i) {
if (this.options.headerIds) {
const s = this.options.headerPrefix + i.slug(e);
return `
` : `
`;
}
list(t, n, e) {
const i = n ? "ol" : "ul", s = n && e !== 1 ? ' start="' + e + '"' : "";
return "<" + i + s + `>
` + t + "" + i + `>
`;
}
/**
* @param {string} text
*/
listitem(t) {
return `
${t}
`;
}
br() {
return this.options.xhtml ? "An error occurred:
" + z(e.message + "", !0) + ""; if (t) return Promise.resolve(i); if (n) { n(null, i); return; } return i; } if (t) return Promise.reject(e); if (n) { n(e); return; } throw e; }; } function ee(a, t) { return (n, e, i) => { typeof e == "function" && (i = e, e = null); const s = { ...e }; e = { ...f.defaults, ...s }; const l = we(e.silent, e.async, i); if (typeof n > "u" || n === null) return l(new Error("marked(): input parameter is undefined or null")); if (typeof n != "string") return l(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected")); if (me(e), e.hooks && (e.hooks.options = e), i) { const o = e.highlight; let h; try { e.hooks && (n = e.hooks.preprocess(n)), h = a(n, e); } catch (b) { return l(b); } const w = function(b) { let c; if (!b) try { e.walkTokens && f.walkTokens(h, e.walkTokens), c = t(h, e), e.hooks && (c = e.hooks.postprocess(c)); } catch (r) { b = r; } return e.highlight = o, b ? l(b) : i(null, c); }; if (!o || o.length < 3 || (delete e.highlight, !h.length)) return w(); let x = 0; f.walkTokens(h, function(b) { b.type === "code" && (x++, setTimeout(() => { o(b.text, b.lang, function(c, r) { if (c) return w(c); r != null && r !== b.text && (b.text = r, b.escaped = !0), x--, x === 0 && w(); }); }, 0)); }), x === 0 && w(); return; } if (e.async) return Promise.resolve(e.hooks ? e.hooks.preprocess(n) : n).then((o) => a(o, e)).then((o) => e.walkTokens ? Promise.all(f.walkTokens(o, e.walkTokens)).then(() => o) : o).then((o) => t(o, e)).then((o) => e.hooks ? e.hooks.postprocess(o) : o).catch(l); try { e.hooks && (n = e.hooks.preprocess(n)); const o = a(n, e); e.walkTokens && f.walkTokens(o, e.walkTokens); let h = t(o, e); return e.hooks && (h = e.hooks.postprocess(h)), h; } catch (o) { return l(o); } }; } function f(a, t, n) { return ee(E.lex, I.parse)(a, t, n); } f.options = f.setOptions = function(a) { return f.defaults = { ...f.defaults, ...a }, se(f.defaults), f; }; f.getDefaults = X; f.defaults = L; f.use = function(...a) { const t = f.defaults.extensions || { renderers: {}, childTokens: {} }; a.forEach((n) => { const e = { ...n }; if (e.async = f.defaults.async || e.async || !1, n.extensions && (n.extensions.forEach((i) => { if (!i.name) throw new Error("extension name required"); if (i.renderer) { const s = t.renderers[i.name]; s ? t.renderers[i.name] = function(...l) { let o = i.renderer.apply(this, l); return o === !1 && (o = s.apply(this, l)), o; } : t.renderers[i.name] = i.renderer; } if (i.tokenizer) { if (!i.level || i.level !== "block" && i.level !== "inline") throw new Error("extension level must be 'block' or 'inline'"); t[i.level] ? t[i.level].unshift(i.tokenizer) : t[i.level] = [i.tokenizer], i.start && (i.level === "block" ? t.startBlock ? t.startBlock.push(i.start) : t.startBlock = [i.start] : i.level === "inline" && (t.startInline ? t.startInline.push(i.start) : t.startInline = [i.start])); } i.childTokens && (t.childTokens[i.name] = i.childTokens); }), e.extensions = t), n.renderer) { const i = f.defaults.renderer || new q(); for (const s in n.renderer) { const l = i[s]; i[s] = (...o) => { let h = n.renderer[s].apply(i, o); return h === !1 && (h = l.apply(i, o)), h; }; } e.renderer = i; } if (n.tokenizer) { const i = f.defaults.tokenizer || new N(); for (const s in n.tokenizer) { const l = i[s]; i[s] = (...o) => { let h = n.tokenizer[s].apply(i, o); return h === !1 && (h = l.apply(i, o)), h; }; } e.tokenizer = i; } if (n.hooks) { const i = f.defaults.hooks || new O(); for (const s in n.hooks) { const l = i[s]; O.passThroughHooks.has(s) ? i[s] = (o) => { if (f.defaults.async) return Promise.resolve(n.hooks[s].call(i, o)).then((w) => l.call(i, w)); const h = n.hooks[s].call(i, o); return l.call(i, h); } : i[s] = (...o) => { let h = n.hooks[s].apply(i, o); return h === !1 && (h = l.apply(i, o)), h; }; } e.hooks = i; } if (n.walkTokens) { const i = f.defaults.walkTokens; e.walkTokens = function(s) { let l = []; return l.push(n.walkTokens.call(this, s)), i && (l = l.concat(i.call(this, s))), l; }; } f.setOptions(e); }); }; f.walkTokens = function(a, t) { let n = []; for (const e of a) switch (n = n.concat(t.call(f, e)), e.type) { case "table": { for (const i of e.header) n = n.concat(f.walkTokens(i.tokens, t)); for (const i of e.rows) for (const s of i) n = n.concat(f.walkTokens(s.tokens, t)); break; } case "list": { n = n.concat(f.walkTokens(e.items, t)); break; } default: f.defaults.extensions && f.defaults.extensions.childTokens && f.defaults.extensions.childTokens[e.type] ? f.defaults.extensions.childTokens[e.type].forEach(function(i) { n = n.concat(f.walkTokens(e[i], t)); }) : e.tokens && (n = n.concat(f.walkTokens(e.tokens, t))); } return n; }; f.parseInline = ee(E.lexInline, I.parseInline); f.Parser = I; f.parser = I.parse; f.Renderer = q; f.TextRenderer = K; f.Lexer = E; f.lexer = E.lex; f.Tokenizer = N; f.Slugger = Y; f.Hooks = O; f.parse = f; f.options; f.setOptions; f.use; f.walkTokens; f.parseInline; I.parse; E.lex; /*! * The reveal.js markdown plugin. Handles parsing of * markdown inside of presentations as well as loading * of external markdown documents. */ const _e = `\r? ---\r? `, ye = null, $e = "^s*notes?:", Se = "\\.element\\s*?(.+?)$", Te = "\\.slide:\\s*?(\\S.+?)$", V = "__SCRIPT_END__", M = /\[\s*((\d*):)?\s*([\s\d,|-]*)\]/, Re = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, Ae = () => { let a; function t(c) { let m = (c.querySelector("[data-template]") || c.querySelector("script") || c).textContent; m = m.replace(new RegExp(V, "g"), "<\/script>"); const g = m.match(/^\n?(\s*)/)[1].length, y = m.match(/^\n?(\t*)/)[1].length; return y > 0 ? m = m.replace(new RegExp("\\n?\\t{" + y + "}(.*)", "g"), function(p, k) { return ` ` + k; }) : g > 1 && (m = m.replace(new RegExp("\\n? {" + g + "}(.*)", "g"), function(p, k) { return ` ` + k; })), m; } function n(c) { const r = c.attributes, m = []; for (let g = 0, y = r.length; g < y; g++) { const p = r[g].name, k = r[g].value; /data\-(markdown|separator|vertical|notes)/gi.test(p) || (k ? m.push(p + '="' + k + '"') : m.push(p)); } return m.join(" "); } function e(c) { var m; const r = (m = a == null ? void 0 : a.getConfig) == null ? void 0 : m.call(a).markdown; return c = c || {}, c.separator = c.separator || (r == null ? void 0 : r.separator) || _e, c.verticalSeparator = c.verticalSeparator || (r == null ? void 0 : r.verticalSeparator) || ye, c.notesSeparator = c.notesSeparator || (r == null ? void 0 : r.notesSeparator) || $e, c.attributes = c.attributes || "", c; } function i(c, r) { r = e(r); const m = c.split(new RegExp(r.notesSeparator, "mgi")); return m.length === 2 && (c = m[0] + '"), c = c.replace(/<\/script>/g, V), '