diff --git a/docs/browser-entry.mjs b/docs/browser-entry.mjs new file mode 100644 index 0000000..6f09bfe --- /dev/null +++ b/docs/browser-entry.mjs @@ -0,0 +1,8 @@ +export { + renderStreamingMarkdown, + StreamingMarkdownRenderer, + setSanitizerBackend, + isBrowserSanitizerSupported, +} from '../dist/index.js' + +export { dompurifyBackend } from '../dist/sanitize-dompurify.js' diff --git a/docs/index.html b/docs/index.html index 61235e4..0a434c7 100644 --- a/docs/index.html +++ b/docs/index.html @@ -771,7 +771,15 @@

API

import { renderStreamingMarkdown, StreamingMarkdownRenderer, -} from './dist/index.js'; + setSanitizerBackend, + isBrowserSanitizerSupported, + dompurifyBackend, +} from './streaming-markdown.browser.mjs'; + +// Firefox and older browsers lack the native Sanitizer API (Element.setHTML). +if (!isBrowserSanitizerSupported()) { + setSanitizerBackend(dompurifyBackend); +} // ── Presets ──────────────────────────────────────────────────────────────── const PRESETS = { diff --git a/docs/streaming-markdown.browser.mjs b/docs/streaming-markdown.browser.mjs new file mode 100644 index 0000000..d63a870 --- /dev/null +++ b/docs/streaming-markdown.browser.mjs @@ -0,0 +1,12042 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __commonJS = (cb, mod) => function __require() { + try { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; + } catch (e) { + throw mod = 0, e; + } +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); + +// node_modules/highlight.js/lib/core.js +var require_core = __commonJS({ + "node_modules/highlight.js/lib/core.js"(exports, module) { + function deepFreeze(obj) { + if (obj instanceof Map) { + obj.clear = obj.delete = obj.set = function() { + throw new Error("map is read-only"); + }; + } else if (obj instanceof Set) { + obj.add = obj.clear = obj.delete = function() { + throw new Error("set is read-only"); + }; + } + Object.freeze(obj); + Object.getOwnPropertyNames(obj).forEach((name) => { + const prop = obj[name]; + const type = typeof prop; + if ((type === "object" || type === "function") && !Object.isFrozen(prop)) { + deepFreeze(prop); + } + }); + return obj; + } + var Response = class { + /** + * @param {CompiledMode} mode + */ + constructor(mode) { + if (mode.data === void 0) mode.data = {}; + this.data = mode.data; + this.isMatchIgnored = false; + } + ignoreMatch() { + this.isMatchIgnored = true; + } + }; + function escapeHTML(value) { + return value.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """).replace(/'/g, "'"); + } + function inherit$1(original, ...objects) { + const result = /* @__PURE__ */ Object.create(null); + for (const key in original) { + result[key] = original[key]; + } + objects.forEach(function(obj) { + for (const key in obj) { + result[key] = obj[key]; + } + }); + return ( + /** @type {T} */ + result + ); + } + var SPAN_CLOSE = ""; + var emitsWrappingTags = (node) => { + return !!node.scope; + }; + var scopeToCSSClass = (name, { prefix }) => { + if (name.startsWith("language:")) { + return name.replace("language:", "language-"); + } + if (name.includes(".")) { + const pieces = name.split("."); + return [ + `${prefix}${pieces.shift()}`, + ...pieces.map((x, i) => `${x}${"_".repeat(i + 1)}`) + ].join(" "); + } + return `${prefix}${name}`; + }; + var HTMLRenderer = class { + /** + * Creates a new HTMLRenderer + * + * @param {Tree} parseTree - the parse tree (must support `walk` API) + * @param {{classPrefix: string}} options + */ + constructor(parseTree, options) { + this.buffer = ""; + this.classPrefix = options.classPrefix; + parseTree.walk(this); + } + /** + * Adds texts to the output stream + * + * @param {string} text */ + addText(text2) { + this.buffer += escapeHTML(text2); + } + /** + * Adds a node open to the output stream (if needed) + * + * @param {Node} node */ + openNode(node) { + if (!emitsWrappingTags(node)) return; + const className = scopeToCSSClass( + node.scope, + { prefix: this.classPrefix } + ); + this.span(className); + } + /** + * Adds a node close to the output stream (if needed) + * + * @param {Node} node */ + closeNode(node) { + if (!emitsWrappingTags(node)) return; + this.buffer += SPAN_CLOSE; + } + /** + * returns the accumulated buffer + */ + value() { + return this.buffer; + } + // helpers + /** + * Builds a span element + * + * @param {string} className */ + span(className) { + this.buffer += ``; + } + }; + var newNode = (opts = {}) => { + const result = { children: [] }; + Object.assign(result, opts); + return result; + }; + var TokenTree = class _TokenTree { + constructor() { + this.rootNode = newNode(); + this.stack = [this.rootNode]; + } + get top() { + return this.stack[this.stack.length - 1]; + } + get root() { + return this.rootNode; + } + /** @param {Node} node */ + add(node) { + this.top.children.push(node); + } + /** @param {string} scope */ + openNode(scope) { + const node = newNode({ scope }); + this.add(node); + this.stack.push(node); + } + closeNode() { + if (this.stack.length > 1) { + return this.stack.pop(); + } + return void 0; + } + closeAllNodes() { + while (this.closeNode()) ; + } + toJSON() { + return JSON.stringify(this.rootNode, null, 4); + } + /** + * @typedef { import("./html_renderer").Renderer } Renderer + * @param {Renderer} builder + */ + walk(builder) { + return this.constructor._walk(builder, this.rootNode); + } + /** + * @param {Renderer} builder + * @param {Node} node + */ + static _walk(builder, node) { + if (typeof node === "string") { + builder.addText(node); + } else if (node.children) { + builder.openNode(node); + node.children.forEach((child) => this._walk(builder, child)); + builder.closeNode(node); + } + return builder; + } + /** + * @param {Node} node + */ + static _collapse(node) { + if (typeof node === "string") return; + if (!node.children) return; + if (node.children.every((el) => typeof el === "string")) { + node.children = [node.children.join("")]; + } else { + node.children.forEach((child) => { + _TokenTree._collapse(child); + }); + } + } + }; + var TokenTreeEmitter = class extends TokenTree { + /** + * @param {*} options + */ + constructor(options) { + super(); + this.options = options; + } + /** + * @param {string} text + */ + addText(text2) { + if (text2 === "") { + return; + } + this.add(text2); + } + /** @param {string} scope */ + startScope(scope) { + this.openNode(scope); + } + endScope() { + this.closeNode(); + } + /** + * @param {Emitter & {root: DataNode}} emitter + * @param {string} name + */ + __addSublanguage(emitter, name) { + const node = emitter.root; + if (name) node.scope = `language:${name}`; + this.add(node); + } + toHTML() { + const renderer = new HTMLRenderer(this, this.options); + return renderer.value(); + } + finalize() { + this.closeAllNodes(); + return true; + } + }; + function source(re) { + if (!re) return null; + if (typeof re === "string") return re; + return re.source; + } + function lookahead(re) { + return concat("(?=", re, ")"); + } + function anyNumberOfTimes(re) { + return concat("(?:", re, ")*"); + } + function optional(re) { + return concat("(?:", re, ")?"); + } + function concat(...args) { + const joined = args.map((x) => source(x)).join(""); + return joined; + } + function stripOptionsFromArgs(args) { + const opts = args[args.length - 1]; + if (typeof opts === "object" && opts.constructor === Object) { + args.splice(args.length - 1, 1); + return opts; + } else { + return {}; + } + } + function either(...args) { + const opts = stripOptionsFromArgs(args); + const joined = "(" + (opts.capture ? "" : "?:") + args.map((x) => source(x)).join("|") + ")"; + return joined; + } + function countMatchGroups(re) { + return new RegExp(re.toString() + "|").exec("").length - 1; + } + function startsWith(re, lexeme) { + const match = re && re.exec(lexeme); + return match && match.index === 0; + } + var BACKREF_RE = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./; + function _rewriteBackreferences(regexps, { joinWith }) { + let numCaptures = 0; + return regexps.map((regex) => { + numCaptures += 1; + const offset = numCaptures; + let re = source(regex); + let out = ""; + while (re.length > 0) { + const match = BACKREF_RE.exec(re); + if (!match) { + out += re; + break; + } + out += re.substring(0, match.index); + re = re.substring(match.index + match[0].length); + if (match[0][0] === "\\" && match[1]) { + out += "\\" + String(Number(match[1]) + offset); + } else { + out += match[0]; + if (match[0] === "(") { + numCaptures++; + } + } + } + return out; + }).map((re) => `(${re})`).join(joinWith); + } + var MATCH_NOTHING_RE = /\b\B/; + var IDENT_RE3 = "[a-zA-Z]\\w*"; + var UNDERSCORE_IDENT_RE = "[a-zA-Z_]\\w*"; + var NUMBER_RE = "\\b\\d+(\\.\\d+)?"; + var C_NUMBER_RE = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)"; + var BINARY_NUMBER_RE = "\\b(0b[01]+)"; + var RE_STARTERS_RE = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~"; + var SHEBANG = (opts = {}) => { + const beginShebang = /^#![ ]*\//; + if (opts.binary) { + opts.begin = concat( + beginShebang, + /.*\b/, + opts.binary, + /\b.*/ + ); + } + return inherit$1({ + scope: "meta", + begin: beginShebang, + end: /$/, + relevance: 0, + /** @type {ModeCallback} */ + "on:begin": (m, resp) => { + if (m.index !== 0) resp.ignoreMatch(); + } + }, opts); + }; + var BACKSLASH_ESCAPE = { + begin: "\\\\[\\s\\S]", + relevance: 0 + }; + var APOS_STRING_MODE = { + scope: "string", + begin: "'", + end: "'", + illegal: "\\n", + contains: [BACKSLASH_ESCAPE] + }; + var QUOTE_STRING_MODE = { + scope: "string", + begin: '"', + end: '"', + illegal: "\\n", + contains: [BACKSLASH_ESCAPE] + }; + var PHRASAL_WORDS_MODE = { + begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ + }; + var COMMENT = function(begin, end, modeOptions = {}) { + const mode = inherit$1( + { + scope: "comment", + begin, + end, + contains: [] + }, + modeOptions + ); + mode.contains.push({ + scope: "doctag", + // hack to avoid the space from being included. the space is necessary to + // match here to prevent the plain text rule below from gobbling up doctags + begin: "[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)", + end: /(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/, + excludeBegin: true, + relevance: 0 + }); + const ENGLISH_WORD = either( + // list of common 1 and 2 letter words in English + "I", + "a", + "is", + "so", + "us", + "to", + "at", + "if", + "in", + "it", + "on", + // note: this is not an exhaustive list of contractions, just popular ones + /[A-Za-z]+['](d|ve|re|ll|t|s|n)/, + // contractions - can't we'd they're let's, etc + /[A-Za-z]+[-][a-z]+/, + // `no-way`, etc. + /[A-Za-z][a-z]{2,}/ + // allow capitalized words at beginning of sentences + ); + mode.contains.push( + { + // TODO: how to include ", (, ) without breaking grammars that use these for + // comment delimiters? + // begin: /[ ]+([()"]?([A-Za-z'-]{3,}|is|a|I|so|us|[tT][oO]|at|if|in|it|on)[.]?[()":]?([.][ ]|[ ]|\))){3}/ + // --- + // this tries to find sequences of 3 english words in a row (without any + // "programming" type syntax) this gives us a strong signal that we've + // TRULY found a comment - vs perhaps scanning with the wrong language. + // It's possible to find something that LOOKS like the start of the + // comment - but then if there is no readable text - good chance it is a + // false match and not a comment. + // + // for a visual example please see: + // https://github.com/highlightjs/highlight.js/issues/2827 + begin: concat( + /[ ]+/, + // necessary to prevent us gobbling up doctags like /* @author Bob Mcgill */ + "(", + ENGLISH_WORD, + /[.]?[:]?([.][ ]|[ ])/, + "){3}" + ) + // look for 3 words in a row + } + ); + return mode; + }; + var C_LINE_COMMENT_MODE = COMMENT("//", "$"); + var C_BLOCK_COMMENT_MODE = COMMENT("/\\*", "\\*/"); + var HASH_COMMENT_MODE = COMMENT("#", "$"); + var NUMBER_MODE = { + scope: "number", + begin: NUMBER_RE, + relevance: 0 + }; + var C_NUMBER_MODE = { + scope: "number", + begin: C_NUMBER_RE, + relevance: 0 + }; + var BINARY_NUMBER_MODE = { + scope: "number", + begin: BINARY_NUMBER_RE, + relevance: 0 + }; + var REGEXP_MODE = { + scope: "regexp", + begin: /\/(?=[^/\n]*\/)/, + end: /\/[gimuy]*/, + contains: [ + BACKSLASH_ESCAPE, + { + begin: /\[/, + end: /\]/, + relevance: 0, + contains: [BACKSLASH_ESCAPE] + } + ] + }; + var TITLE_MODE = { + scope: "title", + begin: IDENT_RE3, + relevance: 0 + }; + var UNDERSCORE_TITLE_MODE = { + scope: "title", + begin: UNDERSCORE_IDENT_RE, + relevance: 0 + }; + var METHOD_GUARD = { + // excludes method names from keyword processing + begin: "\\.\\s*" + UNDERSCORE_IDENT_RE, + relevance: 0 + }; + var END_SAME_AS_BEGIN = function(mode) { + return Object.assign( + mode, + { + /** @type {ModeCallback} */ + "on:begin": (m, resp) => { + resp.data._beginMatch = m[1]; + }, + /** @type {ModeCallback} */ + "on:end": (m, resp) => { + if (resp.data._beginMatch !== m[1]) resp.ignoreMatch(); + } + } + ); + }; + var MODES2 = /* @__PURE__ */ Object.freeze({ + __proto__: null, + APOS_STRING_MODE, + BACKSLASH_ESCAPE, + BINARY_NUMBER_MODE, + BINARY_NUMBER_RE, + COMMENT, + C_BLOCK_COMMENT_MODE, + C_LINE_COMMENT_MODE, + C_NUMBER_MODE, + C_NUMBER_RE, + END_SAME_AS_BEGIN, + HASH_COMMENT_MODE, + IDENT_RE: IDENT_RE3, + MATCH_NOTHING_RE, + METHOD_GUARD, + NUMBER_MODE, + NUMBER_RE, + PHRASAL_WORDS_MODE, + QUOTE_STRING_MODE, + REGEXP_MODE, + RE_STARTERS_RE, + SHEBANG, + TITLE_MODE, + UNDERSCORE_IDENT_RE, + UNDERSCORE_TITLE_MODE + }); + function skipIfHasPrecedingDot(match, response) { + const before = match.input[match.index - 1]; + if (before === ".") { + response.ignoreMatch(); + } + } + function scopeClassName(mode, _parent) { + if (mode.className !== void 0) { + mode.scope = mode.className; + delete mode.className; + } + } + function beginKeywords(mode, parent) { + if (!parent) return; + if (!mode.beginKeywords) return; + mode.begin = "\\b(" + mode.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)"; + mode.__beforeBegin = skipIfHasPrecedingDot; + mode.keywords = mode.keywords || mode.beginKeywords; + delete mode.beginKeywords; + if (mode.relevance === void 0) mode.relevance = 0; + } + function compileIllegal(mode, _parent) { + if (!Array.isArray(mode.illegal)) return; + mode.illegal = either(...mode.illegal); + } + function compileMatch(mode, _parent) { + if (!mode.match) return; + if (mode.begin || mode.end) throw new Error("begin & end are not supported with match"); + mode.begin = mode.match; + delete mode.match; + } + function compileRelevance(mode, _parent) { + if (mode.relevance === void 0) mode.relevance = 1; + } + var beforeMatchExt = (mode, parent) => { + if (!mode.beforeMatch) return; + if (mode.starts) throw new Error("beforeMatch cannot be used with starts"); + const originalMode = Object.assign({}, mode); + Object.keys(mode).forEach((key) => { + delete mode[key]; + }); + mode.keywords = originalMode.keywords; + mode.begin = concat(originalMode.beforeMatch, lookahead(originalMode.begin)); + mode.starts = { + relevance: 0, + contains: [ + Object.assign(originalMode, { endsParent: true }) + ] + }; + mode.relevance = 0; + delete originalMode.beforeMatch; + }; + var COMMON_KEYWORDS = [ + "of", + "and", + "for", + "in", + "not", + "or", + "if", + "then", + "parent", + // common variable name + "list", + // common variable name + "value" + // common variable name + ]; + var DEFAULT_KEYWORD_SCOPE = "keyword"; + function compileKeywords(rawKeywords, caseInsensitive, scopeName = DEFAULT_KEYWORD_SCOPE) { + const compiledKeywords = /* @__PURE__ */ Object.create(null); + if (typeof rawKeywords === "string") { + compileList(scopeName, rawKeywords.split(" ")); + } else if (Array.isArray(rawKeywords)) { + compileList(scopeName, rawKeywords); + } else { + Object.keys(rawKeywords).forEach(function(scopeName2) { + Object.assign( + compiledKeywords, + compileKeywords(rawKeywords[scopeName2], caseInsensitive, scopeName2) + ); + }); + } + return compiledKeywords; + function compileList(scopeName2, keywordList) { + if (caseInsensitive) { + keywordList = keywordList.map((x) => x.toLowerCase()); + } + keywordList.forEach(function(keyword) { + const pair = keyword.split("|"); + compiledKeywords[pair[0]] = [scopeName2, scoreForKeyword(pair[0], pair[1])]; + }); + } + } + function scoreForKeyword(keyword, providedScore) { + if (providedScore) { + return Number(providedScore); + } + return commonKeyword(keyword) ? 0 : 1; + } + function commonKeyword(keyword) { + return COMMON_KEYWORDS.includes(keyword.toLowerCase()); + } + var seenDeprecations = {}; + var error = (message) => { + console.error(message); + }; + var warn = (message, ...args) => { + console.log(`WARN: ${message}`, ...args); + }; + var deprecated = (version2, message) => { + if (seenDeprecations[`${version2}/${message}`]) return; + console.log(`Deprecated as of ${version2}. ${message}`); + seenDeprecations[`${version2}/${message}`] = true; + }; + var MultiClassError = new Error(); + function remapScopeNames(mode, regexes, { key }) { + let offset = 0; + const scopeNames = mode[key]; + const emit = {}; + const positions = {}; + for (let i = 1; i <= regexes.length; i++) { + positions[i + offset] = scopeNames[i]; + emit[i + offset] = true; + offset += countMatchGroups(regexes[i - 1]); + } + mode[key] = positions; + mode[key]._emit = emit; + mode[key]._multi = true; + } + function beginMultiClass(mode) { + if (!Array.isArray(mode.begin)) return; + if (mode.skip || mode.excludeBegin || mode.returnBegin) { + error("skip, excludeBegin, returnBegin not compatible with beginScope: {}"); + throw MultiClassError; + } + if (typeof mode.beginScope !== "object" || mode.beginScope === null) { + error("beginScope must be object"); + throw MultiClassError; + } + remapScopeNames(mode, mode.begin, { key: "beginScope" }); + mode.begin = _rewriteBackreferences(mode.begin, { joinWith: "" }); + } + function endMultiClass(mode) { + if (!Array.isArray(mode.end)) return; + if (mode.skip || mode.excludeEnd || mode.returnEnd) { + error("skip, excludeEnd, returnEnd not compatible with endScope: {}"); + throw MultiClassError; + } + if (typeof mode.endScope !== "object" || mode.endScope === null) { + error("endScope must be object"); + throw MultiClassError; + } + remapScopeNames(mode, mode.end, { key: "endScope" }); + mode.end = _rewriteBackreferences(mode.end, { joinWith: "" }); + } + function scopeSugar(mode) { + if (mode.scope && typeof mode.scope === "object" && mode.scope !== null) { + mode.beginScope = mode.scope; + delete mode.scope; + } + } + function MultiClass(mode) { + scopeSugar(mode); + if (typeof mode.beginScope === "string") { + mode.beginScope = { _wrap: mode.beginScope }; + } + if (typeof mode.endScope === "string") { + mode.endScope = { _wrap: mode.endScope }; + } + beginMultiClass(mode); + endMultiClass(mode); + } + function compileLanguage(language) { + function langRe(value, global) { + return new RegExp( + source(value), + "m" + (language.case_insensitive ? "i" : "") + (language.unicodeRegex ? "u" : "") + (global ? "g" : "") + ); + } + class MultiRegex { + constructor() { + this.matchIndexes = {}; + this.regexes = []; + this.matchAt = 1; + this.position = 0; + } + // @ts-ignore + addRule(re, opts) { + opts.position = this.position++; + this.matchIndexes[this.matchAt] = opts; + this.regexes.push([opts, re]); + this.matchAt += countMatchGroups(re) + 1; + } + compile() { + if (this.regexes.length === 0) { + this.exec = () => null; + } + const terminators = this.regexes.map((el) => el[1]); + this.matcherRe = langRe(_rewriteBackreferences(terminators, { joinWith: "|" }), true); + this.lastIndex = 0; + } + /** @param {string} s */ + exec(s) { + this.matcherRe.lastIndex = this.lastIndex; + const match = this.matcherRe.exec(s); + if (!match) { + return null; + } + const i = match.findIndex((el, i2) => i2 > 0 && el !== void 0); + const matchData = this.matchIndexes[i]; + match.splice(0, i); + return Object.assign(match, matchData); + } + } + class ResumableMultiRegex { + constructor() { + this.rules = []; + this.multiRegexes = []; + this.count = 0; + this.lastIndex = 0; + this.regexIndex = 0; + } + // @ts-ignore + getMatcher(index) { + if (this.multiRegexes[index]) return this.multiRegexes[index]; + const matcher = new MultiRegex(); + this.rules.slice(index).forEach(([re, opts]) => matcher.addRule(re, opts)); + matcher.compile(); + this.multiRegexes[index] = matcher; + return matcher; + } + resumingScanAtSamePosition() { + return this.regexIndex !== 0; + } + considerAll() { + this.regexIndex = 0; + } + // @ts-ignore + addRule(re, opts) { + this.rules.push([re, opts]); + if (opts.type === "begin") this.count++; + } + /** @param {string} s */ + exec(s) { + const m = this.getMatcher(this.regexIndex); + m.lastIndex = this.lastIndex; + let result = m.exec(s); + if (this.resumingScanAtSamePosition()) { + if (result && result.index === this.lastIndex) ; + else { + const m2 = this.getMatcher(0); + m2.lastIndex = this.lastIndex + 1; + result = m2.exec(s); + } + } + if (result) { + this.regexIndex += result.position + 1; + if (this.regexIndex === this.count) { + this.considerAll(); + } + } + return result; + } + } + function buildModeRegex(mode) { + const mm = new ResumableMultiRegex(); + mode.contains.forEach((term) => mm.addRule(term.begin, { rule: term, type: "begin" })); + if (mode.terminatorEnd) { + mm.addRule(mode.terminatorEnd, { type: "end" }); + } + if (mode.illegal) { + mm.addRule(mode.illegal, { type: "illegal" }); + } + return mm; + } + function compileMode(mode, parent) { + const cmode = ( + /** @type CompiledMode */ + mode + ); + if (mode.isCompiled) return cmode; + [ + scopeClassName, + // do this early so compiler extensions generally don't have to worry about + // the distinction between match/begin + compileMatch, + MultiClass, + beforeMatchExt + ].forEach((ext) => ext(mode, parent)); + language.compilerExtensions.forEach((ext) => ext(mode, parent)); + mode.__beforeBegin = null; + [ + beginKeywords, + // do this later so compiler extensions that come earlier have access to the + // raw array if they wanted to perhaps manipulate it, etc. + compileIllegal, + // default to 1 relevance if not specified + compileRelevance + ].forEach((ext) => ext(mode, parent)); + mode.isCompiled = true; + let keywordPattern = null; + if (typeof mode.keywords === "object" && mode.keywords.$pattern) { + mode.keywords = Object.assign({}, mode.keywords); + keywordPattern = mode.keywords.$pattern; + delete mode.keywords.$pattern; + } + keywordPattern = keywordPattern || /\w+/; + if (mode.keywords) { + mode.keywords = compileKeywords(mode.keywords, language.case_insensitive); + } + cmode.keywordPatternRe = langRe(keywordPattern, true); + if (parent) { + if (!mode.begin) mode.begin = /\B|\b/; + cmode.beginRe = langRe(cmode.begin); + if (!mode.end && !mode.endsWithParent) mode.end = /\B|\b/; + if (mode.end) cmode.endRe = langRe(cmode.end); + cmode.terminatorEnd = source(cmode.end) || ""; + if (mode.endsWithParent && parent.terminatorEnd) { + cmode.terminatorEnd += (mode.end ? "|" : "") + parent.terminatorEnd; + } + } + if (mode.illegal) cmode.illegalRe = langRe( + /** @type {RegExp | string} */ + mode.illegal + ); + if (!mode.contains) mode.contains = []; + mode.contains = [].concat(...mode.contains.map(function(c) { + return expandOrCloneMode(c === "self" ? mode : c); + })); + mode.contains.forEach(function(c) { + compileMode( + /** @type Mode */ + c, + cmode + ); + }); + if (mode.starts) { + compileMode(mode.starts, parent); + } + cmode.matcher = buildModeRegex(cmode); + return cmode; + } + if (!language.compilerExtensions) language.compilerExtensions = []; + if (language.contains && language.contains.includes("self")) { + throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation."); + } + language.classNameAliases = inherit$1(language.classNameAliases || {}); + return compileMode( + /** @type Mode */ + language + ); + } + function dependencyOnParent(mode) { + if (!mode) return false; + return mode.endsWithParent || dependencyOnParent(mode.starts); + } + function expandOrCloneMode(mode) { + if (mode.variants && !mode.cachedVariants) { + mode.cachedVariants = mode.variants.map(function(variant) { + return inherit$1(mode, { variants: null }, variant); + }); + } + if (mode.cachedVariants) { + return mode.cachedVariants; + } + if (dependencyOnParent(mode)) { + return inherit$1(mode, { starts: mode.starts ? inherit$1(mode.starts) : null }); + } + if (Object.isFrozen(mode)) { + return inherit$1(mode); + } + return mode; + } + var version = "11.11.1"; + var HTMLInjectionError = class extends Error { + constructor(reason, html2) { + super(reason); + this.name = "HTMLInjectionError"; + this.html = html2; + } + }; + var escape = escapeHTML; + var inherit = inherit$1; + var NO_MATCH = /* @__PURE__ */ Symbol("nomatch"); + var MAX_KEYWORD_HITS = 7; + var HLJS = function(hljs) { + const languages = /* @__PURE__ */ Object.create(null); + const aliases = /* @__PURE__ */ Object.create(null); + const plugins = []; + let SAFE_MODE = true; + const LANGUAGE_NOT_FOUND = "Could not find the language '{}', did you forget to load/include a language module?"; + const PLAINTEXT_LANGUAGE = { disableAutodetect: true, name: "Plain text", contains: [] }; + let options = { + ignoreUnescapedHTML: false, + throwUnescapedHTML: false, + noHighlightRe: /^(no-?highlight)$/i, + languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i, + classPrefix: "hljs-", + cssSelector: "pre code", + languages: null, + // beta configuration options, subject to change, welcome to discuss + // https://github.com/highlightjs/highlight.js/issues/1086 + __emitter: TokenTreeEmitter + }; + function shouldNotHighlight(languageName) { + return options.noHighlightRe.test(languageName); + } + function blockLanguage(block) { + let classes = block.className + " "; + classes += block.parentNode ? block.parentNode.className : ""; + const match = options.languageDetectRe.exec(classes); + if (match) { + const language = getLanguage(match[1]); + if (!language) { + warn(LANGUAGE_NOT_FOUND.replace("{}", match[1])); + warn("Falling back to no-highlight mode for this block.", block); + } + return language ? match[1] : "no-highlight"; + } + return classes.split(/\s+/).find((_class) => shouldNotHighlight(_class) || getLanguage(_class)); + } + function highlight2(codeOrLanguageName, optionsOrCode, ignoreIllegals) { + let code = ""; + let languageName = ""; + if (typeof optionsOrCode === "object") { + code = codeOrLanguageName; + ignoreIllegals = optionsOrCode.ignoreIllegals; + languageName = optionsOrCode.language; + } else { + deprecated("10.7.0", "highlight(lang, code, ...args) has been deprecated."); + deprecated("10.7.0", "Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"); + languageName = codeOrLanguageName; + code = optionsOrCode; + } + if (ignoreIllegals === void 0) { + ignoreIllegals = true; + } + const context = { + code, + language: languageName + }; + fire("before:highlight", context); + const result = context.result ? context.result : _highlight(context.language, context.code, ignoreIllegals); + result.code = context.code; + fire("after:highlight", result); + return result; + } + function _highlight(languageName, codeToHighlight, ignoreIllegals, continuation) { + const keywordHits = /* @__PURE__ */ Object.create(null); + function keywordData(mode, matchText) { + return mode.keywords[matchText]; + } + function processKeywords() { + if (!top.keywords) { + emitter.addText(modeBuffer); + return; + } + let lastIndex = 0; + top.keywordPatternRe.lastIndex = 0; + let match = top.keywordPatternRe.exec(modeBuffer); + let buf = ""; + while (match) { + buf += modeBuffer.substring(lastIndex, match.index); + const word = language.case_insensitive ? match[0].toLowerCase() : match[0]; + const data = keywordData(top, word); + if (data) { + const [kind, keywordRelevance] = data; + emitter.addText(buf); + buf = ""; + keywordHits[word] = (keywordHits[word] || 0) + 1; + if (keywordHits[word] <= MAX_KEYWORD_HITS) relevance += keywordRelevance; + if (kind.startsWith("_")) { + buf += match[0]; + } else { + const cssClass = language.classNameAliases[kind] || kind; + emitKeyword(match[0], cssClass); + } + } else { + buf += match[0]; + } + lastIndex = top.keywordPatternRe.lastIndex; + match = top.keywordPatternRe.exec(modeBuffer); + } + buf += modeBuffer.substring(lastIndex); + emitter.addText(buf); + } + function processSubLanguage() { + if (modeBuffer === "") return; + let result2 = null; + if (typeof top.subLanguage === "string") { + if (!languages[top.subLanguage]) { + emitter.addText(modeBuffer); + return; + } + result2 = _highlight(top.subLanguage, modeBuffer, true, continuations[top.subLanguage]); + continuations[top.subLanguage] = /** @type {CompiledMode} */ + result2._top; + } else { + result2 = highlightAuto(modeBuffer, top.subLanguage.length ? top.subLanguage : null); + } + if (top.relevance > 0) { + relevance += result2.relevance; + } + emitter.__addSublanguage(result2._emitter, result2.language); + } + function processBuffer() { + if (top.subLanguage != null) { + processSubLanguage(); + } else { + processKeywords(); + } + modeBuffer = ""; + } + function emitKeyword(keyword, scope) { + if (keyword === "") return; + emitter.startScope(scope); + emitter.addText(keyword); + emitter.endScope(); + } + function emitMultiClass(scope, match) { + let i = 1; + const max = match.length - 1; + while (i <= max) { + if (!scope._emit[i]) { + i++; + continue; + } + const klass = language.classNameAliases[scope[i]] || scope[i]; + const text2 = match[i]; + if (klass) { + emitKeyword(text2, klass); + } else { + modeBuffer = text2; + processKeywords(); + modeBuffer = ""; + } + i++; + } + } + function startNewMode(mode, match) { + if (mode.scope && typeof mode.scope === "string") { + emitter.openNode(language.classNameAliases[mode.scope] || mode.scope); + } + if (mode.beginScope) { + if (mode.beginScope._wrap) { + emitKeyword(modeBuffer, language.classNameAliases[mode.beginScope._wrap] || mode.beginScope._wrap); + modeBuffer = ""; + } else if (mode.beginScope._multi) { + emitMultiClass(mode.beginScope, match); + modeBuffer = ""; + } + } + top = Object.create(mode, { parent: { value: top } }); + return top; + } + function endOfMode(mode, match, matchPlusRemainder) { + let matched = startsWith(mode.endRe, matchPlusRemainder); + if (matched) { + if (mode["on:end"]) { + const resp = new Response(mode); + mode["on:end"](match, resp); + if (resp.isMatchIgnored) matched = false; + } + if (matched) { + while (mode.endsParent && mode.parent) { + mode = mode.parent; + } + return mode; + } + } + if (mode.endsWithParent) { + return endOfMode(mode.parent, match, matchPlusRemainder); + } + } + function doIgnore(lexeme) { + if (top.matcher.regexIndex === 0) { + modeBuffer += lexeme[0]; + return 1; + } else { + resumeScanAtSamePosition = true; + return 0; + } + } + function doBeginMatch(match) { + const lexeme = match[0]; + const newMode = match.rule; + const resp = new Response(newMode); + const beforeCallbacks = [newMode.__beforeBegin, newMode["on:begin"]]; + for (const cb of beforeCallbacks) { + if (!cb) continue; + cb(match, resp); + if (resp.isMatchIgnored) return doIgnore(lexeme); + } + if (newMode.skip) { + modeBuffer += lexeme; + } else { + if (newMode.excludeBegin) { + modeBuffer += lexeme; + } + processBuffer(); + if (!newMode.returnBegin && !newMode.excludeBegin) { + modeBuffer = lexeme; + } + } + startNewMode(newMode, match); + return newMode.returnBegin ? 0 : lexeme.length; + } + function doEndMatch(match) { + const lexeme = match[0]; + const matchPlusRemainder = codeToHighlight.substring(match.index); + const endMode = endOfMode(top, match, matchPlusRemainder); + if (!endMode) { + return NO_MATCH; + } + const origin = top; + if (top.endScope && top.endScope._wrap) { + processBuffer(); + emitKeyword(lexeme, top.endScope._wrap); + } else if (top.endScope && top.endScope._multi) { + processBuffer(); + emitMultiClass(top.endScope, match); + } else if (origin.skip) { + modeBuffer += lexeme; + } else { + if (!(origin.returnEnd || origin.excludeEnd)) { + modeBuffer += lexeme; + } + processBuffer(); + if (origin.excludeEnd) { + modeBuffer = lexeme; + } + } + do { + if (top.scope) { + emitter.closeNode(); + } + if (!top.skip && !top.subLanguage) { + relevance += top.relevance; + } + top = top.parent; + } while (top !== endMode.parent); + if (endMode.starts) { + startNewMode(endMode.starts, match); + } + return origin.returnEnd ? 0 : lexeme.length; + } + function processContinuations() { + const list = []; + for (let current = top; current !== language; current = current.parent) { + if (current.scope) { + list.unshift(current.scope); + } + } + list.forEach((item) => emitter.openNode(item)); + } + let lastMatch = {}; + function processLexeme(textBeforeMatch, match) { + const lexeme = match && match[0]; + modeBuffer += textBeforeMatch; + if (lexeme == null) { + processBuffer(); + return 0; + } + if (lastMatch.type === "begin" && match.type === "end" && lastMatch.index === match.index && lexeme === "") { + modeBuffer += codeToHighlight.slice(match.index, match.index + 1); + if (!SAFE_MODE) { + const err = new Error(`0 width match regex (${languageName})`); + err.languageName = languageName; + err.badRule = lastMatch.rule; + throw err; + } + return 1; + } + lastMatch = match; + if (match.type === "begin") { + return doBeginMatch(match); + } else if (match.type === "illegal" && !ignoreIllegals) { + const err = new Error('Illegal lexeme "' + lexeme + '" for mode "' + (top.scope || "") + '"'); + err.mode = top; + throw err; + } else if (match.type === "end") { + const processed = doEndMatch(match); + if (processed !== NO_MATCH) { + return processed; + } + } + if (match.type === "illegal" && lexeme === "") { + modeBuffer += "\n"; + return 1; + } + if (iterations > 1e5 && iterations > match.index * 3) { + const err = new Error("potential infinite loop, way more iterations than matches"); + throw err; + } + modeBuffer += lexeme; + return lexeme.length; + } + const language = getLanguage(languageName); + if (!language) { + error(LANGUAGE_NOT_FOUND.replace("{}", languageName)); + throw new Error('Unknown language: "' + languageName + '"'); + } + const md = compileLanguage(language); + let result = ""; + let top = continuation || md; + const continuations = {}; + const emitter = new options.__emitter(options); + processContinuations(); + let modeBuffer = ""; + let relevance = 0; + let index = 0; + let iterations = 0; + let resumeScanAtSamePosition = false; + try { + if (!language.__emitTokens) { + top.matcher.considerAll(); + for (; ; ) { + iterations++; + if (resumeScanAtSamePosition) { + resumeScanAtSamePosition = false; + } else { + top.matcher.considerAll(); + } + top.matcher.lastIndex = index; + const match = top.matcher.exec(codeToHighlight); + if (!match) break; + const beforeMatch = codeToHighlight.substring(index, match.index); + const processedCount = processLexeme(beforeMatch, match); + index = match.index + processedCount; + } + processLexeme(codeToHighlight.substring(index)); + } else { + language.__emitTokens(codeToHighlight, emitter); + } + emitter.finalize(); + result = emitter.toHTML(); + return { + language: languageName, + value: result, + relevance, + illegal: false, + _emitter: emitter, + _top: top + }; + } catch (err) { + if (err.message && err.message.includes("Illegal")) { + return { + language: languageName, + value: escape(codeToHighlight), + illegal: true, + relevance: 0, + _illegalBy: { + message: err.message, + index, + context: codeToHighlight.slice(index - 100, index + 100), + mode: err.mode, + resultSoFar: result + }, + _emitter: emitter + }; + } else if (SAFE_MODE) { + return { + language: languageName, + value: escape(codeToHighlight), + illegal: false, + relevance: 0, + errorRaised: err, + _emitter: emitter, + _top: top + }; + } else { + throw err; + } + } + } + function justTextHighlightResult(code) { + const result = { + value: escape(code), + illegal: false, + relevance: 0, + _top: PLAINTEXT_LANGUAGE, + _emitter: new options.__emitter(options) + }; + result._emitter.addText(code); + return result; + } + function highlightAuto(code, languageSubset) { + languageSubset = languageSubset || options.languages || Object.keys(languages); + const plaintext = justTextHighlightResult(code); + const results = languageSubset.filter(getLanguage).filter(autoDetection).map( + (name) => _highlight(name, code, false) + ); + results.unshift(plaintext); + const sorted = results.sort((a, b) => { + if (a.relevance !== b.relevance) return b.relevance - a.relevance; + if (a.language && b.language) { + if (getLanguage(a.language).supersetOf === b.language) { + return 1; + } else if (getLanguage(b.language).supersetOf === a.language) { + return -1; + } + } + return 0; + }); + const [best, secondBest] = sorted; + const result = best; + result.secondBest = secondBest; + return result; + } + function updateClassName(element, currentLang, resultLang) { + const language = currentLang && aliases[currentLang] || resultLang; + element.classList.add("hljs"); + element.classList.add(`language-${language}`); + } + function highlightElement(element) { + let node = null; + const language = blockLanguage(element); + if (shouldNotHighlight(language)) return; + fire( + "before:highlightElement", + { el: element, language } + ); + if (element.dataset.highlighted) { + console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", element); + return; + } + if (element.children.length > 0) { + if (!options.ignoreUnescapedHTML) { + console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."); + console.warn("https://github.com/highlightjs/highlight.js/wiki/security"); + console.warn("The element with unescaped HTML:"); + console.warn(element); + } + if (options.throwUnescapedHTML) { + const err = new HTMLInjectionError( + "One of your code blocks includes unescaped HTML.", + element.innerHTML + ); + throw err; + } + } + node = element; + const text2 = node.textContent; + const result = language ? highlight2(text2, { language, ignoreIllegals: true }) : highlightAuto(text2); + element.innerHTML = result.value; + element.dataset.highlighted = "yes"; + updateClassName(element, language, result.language); + element.result = { + language: result.language, + // TODO: remove with version 11.0 + re: result.relevance, + relevance: result.relevance + }; + if (result.secondBest) { + element.secondBest = { + language: result.secondBest.language, + relevance: result.secondBest.relevance + }; + } + fire("after:highlightElement", { el: element, result, text: text2 }); + } + function configure(userOptions) { + options = inherit(options, userOptions); + } + const initHighlighting = () => { + highlightAll(); + deprecated("10.6.0", "initHighlighting() deprecated. Use highlightAll() now."); + }; + function initHighlightingOnLoad() { + highlightAll(); + deprecated("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now."); + } + let wantsHighlight = false; + function highlightAll() { + function boot() { + highlightAll(); + } + if (document.readyState === "loading") { + if (!wantsHighlight) { + window.addEventListener("DOMContentLoaded", boot, false); + } + wantsHighlight = true; + return; + } + const blocks = document.querySelectorAll(options.cssSelector); + blocks.forEach(highlightElement); + } + function registerLanguage(languageName, languageDefinition) { + let lang = null; + try { + lang = languageDefinition(hljs); + } catch (error$1) { + error("Language definition for '{}' could not be registered.".replace("{}", languageName)); + if (!SAFE_MODE) { + throw error$1; + } else { + error(error$1); + } + lang = PLAINTEXT_LANGUAGE; + } + if (!lang.name) lang.name = languageName; + languages[languageName] = lang; + lang.rawDefinition = languageDefinition.bind(null, hljs); + if (lang.aliases) { + registerAliases(lang.aliases, { languageName }); + } + } + function unregisterLanguage(languageName) { + delete languages[languageName]; + for (const alias of Object.keys(aliases)) { + if (aliases[alias] === languageName) { + delete aliases[alias]; + } + } + } + function listLanguages() { + return Object.keys(languages); + } + function getLanguage(name) { + name = (name || "").toLowerCase(); + return languages[name] || languages[aliases[name]]; + } + function registerAliases(aliasList, { languageName }) { + if (typeof aliasList === "string") { + aliasList = [aliasList]; + } + aliasList.forEach((alias) => { + aliases[alias.toLowerCase()] = languageName; + }); + } + function autoDetection(name) { + const lang = getLanguage(name); + return lang && !lang.disableAutodetect; + } + function upgradePluginAPI(plugin) { + if (plugin["before:highlightBlock"] && !plugin["before:highlightElement"]) { + plugin["before:highlightElement"] = (data) => { + plugin["before:highlightBlock"]( + Object.assign({ block: data.el }, data) + ); + }; + } + if (plugin["after:highlightBlock"] && !plugin["after:highlightElement"]) { + plugin["after:highlightElement"] = (data) => { + plugin["after:highlightBlock"]( + Object.assign({ block: data.el }, data) + ); + }; + } + } + function addPlugin(plugin) { + upgradePluginAPI(plugin); + plugins.push(plugin); + } + function removePlugin(plugin) { + const index = plugins.indexOf(plugin); + if (index !== -1) { + plugins.splice(index, 1); + } + } + function fire(event, args) { + const cb = event; + plugins.forEach(function(plugin) { + if (plugin[cb]) { + plugin[cb](args); + } + }); + } + function deprecateHighlightBlock(el) { + deprecated("10.7.0", "highlightBlock will be removed entirely in v12.0"); + deprecated("10.7.0", "Please use highlightElement now."); + return highlightElement(el); + } + Object.assign(hljs, { + highlight: highlight2, + highlightAuto, + highlightAll, + highlightElement, + // TODO: Remove with v12 API + highlightBlock: deprecateHighlightBlock, + configure, + initHighlighting, + initHighlightingOnLoad, + registerLanguage, + unregisterLanguage, + listLanguages, + getLanguage, + registerAliases, + autoDetection, + inherit, + addPlugin, + removePlugin + }); + hljs.debugMode = function() { + SAFE_MODE = false; + }; + hljs.safeMode = function() { + SAFE_MODE = true; + }; + hljs.versionString = version; + hljs.regex = { + concat, + lookahead, + either, + optional, + anyNumberOfTimes + }; + for (const key in MODES2) { + if (typeof MODES2[key] === "object") { + deepFreeze(MODES2[key]); + } + } + Object.assign(hljs, MODES2); + return hljs; + }; + var highlight = HLJS({}); + highlight.newInstance = () => HLJS({}); + module.exports = highlight; + highlight.HighlightJS = highlight; + highlight.default = highlight; + } +}); + +// node_modules/entities/dist/decode-codepoint.js +var decodeMap = /* @__PURE__ */ new Map([ + [0, 65533], + // C1 Unicode control character reference replacements + [128, 8364], + [130, 8218], + [131, 402], + [132, 8222], + [133, 8230], + [134, 8224], + [135, 8225], + [136, 710], + [137, 8240], + [138, 352], + [139, 8249], + [140, 338], + [142, 381], + [145, 8216], + [146, 8217], + [147, 8220], + [148, 8221], + [149, 8226], + [150, 8211], + [151, 8212], + [152, 732], + [153, 8482], + [154, 353], + [155, 8250], + [156, 339], + [158, 382], + [159, 376] +]); +function replaceCodePoint(codePoint) { + if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) { + return 65533; + } + return decodeMap.get(codePoint) ?? codePoint; +} + +// node_modules/entities/dist/internal/decode-shared.js +function decodeBase64(input) { + const binary = atob(input); + const evenLength = binary.length & ~1; + const out = new Uint16Array(evenLength / 2); + for (let index = 0, outIndex = 0; index < evenLength; index += 2) { + const lo = binary.charCodeAt(index); + const hi = binary.charCodeAt(index + 1); + out[outIndex++] = lo | hi << 8; + } + return out; +} + +// node_modules/entities/dist/generated/decode-data-html.js +var htmlDecodeTree = /* @__PURE__ */ decodeBase64("QR08ALkAAgH6AYsDNQR2BO0EPgXZBQEGLAbdBxMISQrvCmQLfQurDKQNLw4fD4YPpA+6D/IPAAAAAAAAAAAAAAAAKhBMEY8TmxUWF2EYLBkxGuAa3RsJHDscWR8YIC8jSCSIJcMl6ie3Ku8rEC0CLjoupS7kLgAIRU1hYmNmZ2xtbm9wcnN0dVQAWgBeAGUAaQBzAHcAfgCBAIQAhwCSAJoAoACsALMAbABpAGcAO4DGAMZAUAA7gCYAJkBjAHUAdABlADuAwQDBQHIiZXZlAAJhAAFpeW0AcgByAGMAO4DCAMJAEGRyAADgNdgE3XIAYQB2AGUAO4DAAMBA8CFoYZFj4SFjcgBhZAAAoFMqAAFncIsAjgBvAG4ABGFmAADgNdg43fAlbHlGdW5jdGlvbgCgYSBpAG4AZwA7gMUAxUAAAWNzpACoAHIAAOA12Jzc6SFnbgCgVCJpAGwAZABlADuAwwDDQG0A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sudABlADuA/QD9QE9kAAFpecAuwy5yAGMAd2FLZG4AO4ClAKVAcgAA4DXYNt1jAHkAV2RwAGYAAOA12GrdYwByAADgNdjO3AABY23dLt8ueQBOZGwAO4D/AP9AAAVhY2RlZmhpb3N38y73Lv8uAi8MLxAvEy8YLx0vIi9jInV0ZQB6YQABYXn7Lv4u8iFvbn5hN2RvAHQAfGEAAWV0Bi8KL3QAcgDmAB8QYQC2Y3IAAOA12DfdYwB5ADZk5yJyYXJyAKDdIXAAZgAA4DXYa91jAHIAAOA12M/cAAFqbiYvKC8AoA0gagAAoAwg"); + +// node_modules/entities/dist/internal/bin-trie-flags.js +var BinTrieFlags; +(function(BinTrieFlags2) { + BinTrieFlags2[BinTrieFlags2["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH"; + BinTrieFlags2[BinTrieFlags2["FLAG13"] = 8192] = "FLAG13"; + BinTrieFlags2[BinTrieFlags2["BRANCH_LENGTH"] = 8064] = "BRANCH_LENGTH"; + BinTrieFlags2[BinTrieFlags2["JUMP_TABLE"] = 127] = "JUMP_TABLE"; +})(BinTrieFlags || (BinTrieFlags = {})); + +// node_modules/entities/dist/decode.js +var CharCodes; +(function(CharCodes2) { + CharCodes2[CharCodes2["NUM"] = 35] = "NUM"; + CharCodes2[CharCodes2["SEMI"] = 59] = "SEMI"; + CharCodes2[CharCodes2["EQUALS"] = 61] = "EQUALS"; + CharCodes2[CharCodes2["ZERO"] = 48] = "ZERO"; + CharCodes2[CharCodes2["NINE"] = 57] = "NINE"; + CharCodes2[CharCodes2["LOWER_A"] = 97] = "LOWER_A"; + CharCodes2[CharCodes2["LOWER_F"] = 102] = "LOWER_F"; + CharCodes2[CharCodes2["LOWER_X"] = 120] = "LOWER_X"; + CharCodes2[CharCodes2["LOWER_Z"] = 122] = "LOWER_Z"; + CharCodes2[CharCodes2["UPPER_A"] = 65] = "UPPER_A"; + CharCodes2[CharCodes2["UPPER_F"] = 70] = "UPPER_F"; + CharCodes2[CharCodes2["UPPER_Z"] = 90] = "UPPER_Z"; +})(CharCodes || (CharCodes = {})); +var TO_LOWER_BIT = 32; +function isNumber(code) { + return code >= CharCodes.ZERO && code <= CharCodes.NINE; +} +function isHexadecimalCharacter(code) { + return code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F; +} +function isAsciiAlphaNumeric(code) { + return code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z || isNumber(code); +} +function isEntityInAttributeInvalidEnd(code) { + return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code); +} +var EntityDecoderState; +(function(EntityDecoderState2) { + EntityDecoderState2[EntityDecoderState2["EntityStart"] = 0] = "EntityStart"; + EntityDecoderState2[EntityDecoderState2["NumericStart"] = 1] = "NumericStart"; + EntityDecoderState2[EntityDecoderState2["NumericDecimal"] = 2] = "NumericDecimal"; + EntityDecoderState2[EntityDecoderState2["NumericHex"] = 3] = "NumericHex"; + EntityDecoderState2[EntityDecoderState2["NamedEntity"] = 4] = "NamedEntity"; +})(EntityDecoderState || (EntityDecoderState = {})); +var DecodingMode; +(function(DecodingMode2) { + DecodingMode2[DecodingMode2["Legacy"] = 0] = "Legacy"; + DecodingMode2[DecodingMode2["Strict"] = 1] = "Strict"; + DecodingMode2[DecodingMode2["Attribute"] = 2] = "Attribute"; +})(DecodingMode || (DecodingMode = {})); +var EntityDecoder = class { + decodeTree; + emitCodePoint; + errors; + constructor(decodeTree, emitCodePoint, errors) { + this.decodeTree = decodeTree; + this.emitCodePoint = emitCodePoint; + this.errors = errors; + } + /** The current state of the decoder. */ + state = EntityDecoderState.EntityStart; + /** Characters that were consumed while parsing an entity. */ + consumed = 1; + /** + * The result of the entity. + * + * Either the result index of a numeric entity, or the codepoint of a + * numeric entity. + */ + result = 0; + /** The current index in the decode tree. */ + treeIndex = 0; + /** The number of characters that were consumed in excess. */ + excess = 1; + /** The mode in which the decoder is operating. */ + decodeMode = DecodingMode.Strict; + /** The number of characters that have been consumed in the current run. */ + runConsumed = 0; + /** + * Resets the instance to make it reusable. + * @param decodeMode Entity decoding mode to use. + */ + startEntity(decodeMode) { + this.decodeMode = decodeMode; + this.state = EntityDecoderState.EntityStart; + this.result = 0; + this.treeIndex = 0; + this.excess = 1; + this.consumed = 1; + this.runConsumed = 0; + } + /** + * Write an entity to the decoder. This can be called multiple times with partial entities. + * If the entity is incomplete, the decoder will return -1. + * + * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the + * entity is incomplete, and resume when the next string is written. + * @param input The string containing the entity (or a continuation of the entity). + * @param offset The offset at which the entity begins. Should be 0 if this is not the first call. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + write(input, offset) { + switch (this.state) { + case EntityDecoderState.EntityStart: { + if (input.charCodeAt(offset) === CharCodes.NUM) { + this.state = EntityDecoderState.NumericStart; + this.consumed += 1; + return this.stateNumericStart(input, offset + 1); + } + this.state = EntityDecoderState.NamedEntity; + return this.stateNamedEntity(input, offset); + } + case EntityDecoderState.NumericStart: { + return this.stateNumericStart(input, offset); + } + case EntityDecoderState.NumericDecimal: { + return this.stateNumericDecimal(input, offset); + } + case EntityDecoderState.NumericHex: { + return this.stateNumericHex(input, offset); + } + case EntityDecoderState.NamedEntity: { + return this.stateNamedEntity(input, offset); + } + } + } + /** + * Switches between the numeric decimal and hexadecimal states. + * + * Equivalent to the `Numeric character reference state` in the HTML spec. + * @param input The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + stateNumericStart(input, offset) { + if (offset >= input.length) { + return -1; + } + if ((input.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) { + this.state = EntityDecoderState.NumericHex; + this.consumed += 1; + return this.stateNumericHex(input, offset + 1); + } + this.state = EntityDecoderState.NumericDecimal; + return this.stateNumericDecimal(input, offset); + } + /** + * Parses a hexadecimal numeric entity. + * + * Equivalent to the `Hexademical character reference state` in the HTML spec. + * @param input The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + stateNumericHex(input, offset) { + while (offset < input.length) { + const char = input.charCodeAt(offset); + if (isNumber(char) || isHexadecimalCharacter(char)) { + const digit = char <= CharCodes.NINE ? char - CharCodes.ZERO : (char | TO_LOWER_BIT) - CharCodes.LOWER_A + 10; + this.result = this.result * 16 + digit; + this.consumed++; + offset++; + } else { + return this.emitNumericEntity(char, 3); + } + } + return -1; + } + /** + * Parses a decimal numeric entity. + * + * Equivalent to the `Decimal character reference state` in the HTML spec. + * @param input The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + stateNumericDecimal(input, offset) { + while (offset < input.length) { + const char = input.charCodeAt(offset); + if (isNumber(char)) { + this.result = this.result * 10 + (char - CharCodes.ZERO); + this.consumed++; + offset++; + } else { + return this.emitNumericEntity(char, 2); + } + } + return -1; + } + /** + * Validate and emit a numeric entity. + * + * Implements the logic from the `Hexademical character reference start + * state` and `Numeric character reference end state` in the HTML spec. + * @param lastCp The last code point of the entity. Used to see if the + * entity was terminated with a semicolon. + * @param expectedLength The minimum number of characters that should be + * consumed. Used to validate that at least one digit + * was consumed. + * @returns The number of characters that were consumed. + */ + emitNumericEntity(lastCp, expectedLength) { + if (this.consumed <= expectedLength) { + this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed); + return 0; + } + if (lastCp === CharCodes.SEMI) { + this.consumed += 1; + } else if (this.decodeMode === DecodingMode.Strict) { + return 0; + } + this.emitCodePoint(replaceCodePoint(this.result), this.consumed); + if (this.errors) { + if (lastCp !== CharCodes.SEMI) { + this.errors.missingSemicolonAfterCharacterReference(); + } + this.errors.validateNumericCharacterReference(this.result); + } + return this.consumed; + } + /** + * Parses a named entity. + * + * Equivalent to the `Named character reference state` in the HTML spec. + * @param input The string containing the entity (or a continuation of the entity). + * @param offset The current offset. + * @returns The number of characters that were consumed, or -1 if the entity is incomplete. + */ + stateNamedEntity(input, offset) { + const { decodeTree } = this; + let current = decodeTree[this.treeIndex]; + let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; + while (offset < input.length) { + if (valueLength === 0 && (current & BinTrieFlags.FLAG13) !== 0) { + const runLength = (current & BinTrieFlags.BRANCH_LENGTH) >> 7; + if (this.runConsumed === 0) { + const firstChar = current & BinTrieFlags.JUMP_TABLE; + if (input.charCodeAt(offset) !== firstChar) { + return this.result === 0 ? 0 : this.emitNotTerminatedNamedEntity(); + } + offset++; + this.excess++; + this.runConsumed++; + } + while (this.runConsumed < runLength) { + if (offset >= input.length) { + return -1; + } + const charIndexInPacked = this.runConsumed - 1; + const packedWord = decodeTree[this.treeIndex + 1 + (charIndexInPacked >> 1)]; + const expectedChar = charIndexInPacked % 2 === 0 ? packedWord & 255 : packedWord >> 8 & 255; + if (input.charCodeAt(offset) !== expectedChar) { + this.runConsumed = 0; + return this.result === 0 ? 0 : this.emitNotTerminatedNamedEntity(); + } + offset++; + this.excess++; + this.runConsumed++; + } + this.runConsumed = 0; + this.treeIndex += 1 + (runLength >> 1); + current = decodeTree[this.treeIndex]; + valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; + } + if (offset >= input.length) + break; + const char = input.charCodeAt(offset); + if (char === CharCodes.SEMI && valueLength !== 0 && (current & BinTrieFlags.FLAG13) !== 0) { + return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess); + } + this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char); + if (this.treeIndex < 0) { + return this.result === 0 || // If we are parsing an attribute + this.decodeMode === DecodingMode.Attribute && // We shouldn't have consumed any characters after the entity, + (valueLength === 0 || // And there should be no invalid characters. + isEntityInAttributeInvalidEnd(char)) ? 0 : this.emitNotTerminatedNamedEntity(); + } + current = decodeTree[this.treeIndex]; + valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; + if (valueLength !== 0) { + if (char === CharCodes.SEMI) { + return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess); + } + if (this.decodeMode !== DecodingMode.Strict && (current & BinTrieFlags.FLAG13) === 0) { + this.result = this.treeIndex; + this.consumed += this.excess; + this.excess = 0; + } + } + offset++; + this.excess++; + } + return -1; + } + /** + * Emit a named entity that was not terminated with a semicolon. + * @returns The number of characters consumed. + */ + emitNotTerminatedNamedEntity() { + const { result, decodeTree } = this; + const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14; + this.emitNamedEntityData(result, valueLength, this.consumed); + this.errors?.missingSemicolonAfterCharacterReference(); + return this.consumed; + } + /** + * Emit a named entity. + * @param result The index of the entity in the decode tree. + * @param valueLength The number of bytes in the entity. + * @param consumed The number of characters consumed. + * @returns The number of characters consumed. + */ + emitNamedEntityData(result, valueLength, consumed) { + const { decodeTree } = this; + this.emitCodePoint(valueLength === 1 ? decodeTree[result] & ~(BinTrieFlags.VALUE_LENGTH | BinTrieFlags.FLAG13) : decodeTree[result + 1], consumed); + if (valueLength === 3) { + this.emitCodePoint(decodeTree[result + 2], consumed); + } + return consumed; + } + /** + * Signal to the parser that the end of the input was reached. + * + * Remaining data will be emitted and relevant errors will be produced. + * @returns The number of characters consumed. + */ + end() { + switch (this.state) { + case EntityDecoderState.NamedEntity: { + return this.result !== 0 && (this.decodeMode !== DecodingMode.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0; + } + // Otherwise, emit a numeric entity if we have one. + case EntityDecoderState.NumericDecimal: { + return this.emitNumericEntity(0, 2); + } + case EntityDecoderState.NumericHex: { + return this.emitNumericEntity(0, 3); + } + case EntityDecoderState.NumericStart: { + this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed); + return 0; + } + case EntityDecoderState.EntityStart: { + return 0; + } + } + } +}; +function getDecoder(decodeTree) { + let returnValue = ""; + const decoder = new EntityDecoder(decodeTree, (data) => returnValue += String.fromCodePoint(data)); + return function decodeWithTrie(input, decodeMode) { + let lastIndex = 0; + let offset = 0; + while ((offset = input.indexOf("&", offset)) >= 0) { + returnValue += input.slice(lastIndex, offset); + decoder.startEntity(decodeMode); + const length = decoder.write( + input, + // Skip the "&" + offset + 1 + ); + if (length < 0) { + lastIndex = offset + decoder.end(); + break; + } + lastIndex = offset + length; + offset = length === 0 ? lastIndex + 1 : lastIndex; + } + const result = returnValue + input.slice(lastIndex); + returnValue = ""; + return result; + }; +} +function determineBranch(decodeTree, current, nodeIndex, char) { + const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7; + const jumpOffset = current & BinTrieFlags.JUMP_TABLE; + if (branchCount === 0) { + return jumpOffset !== 0 && char === jumpOffset ? nodeIndex : -1; + } + if (jumpOffset) { + const value = char - jumpOffset; + return value < 0 || value >= branchCount ? -1 : decodeTree[nodeIndex + value] - 1; + } + const packedKeySlots = branchCount + 1 >> 1; + let lo = 0; + let hi = branchCount - 1; + while (lo <= hi) { + const mid = lo + hi >>> 1; + const slot = mid >> 1; + const packed = decodeTree[nodeIndex + slot]; + const midKey = packed >> (mid & 1) * 8 & 255; + if (midKey < char) { + lo = mid + 1; + } else if (midKey > char) { + hi = mid - 1; + } else { + return decodeTree[nodeIndex + packedKeySlots + mid]; + } + } + return -1; +} +var htmlDecoder = /* @__PURE__ */ getDecoder(htmlDecodeTree); +function decodeHTMLStrict(htmlString) { + return htmlDecoder(htmlString, DecodingMode.Strict); +} + +// node_modules/entities/dist/index.js +var EntityLevel; +(function(EntityLevel2) { + EntityLevel2[EntityLevel2["XML"] = 0] = "XML"; + EntityLevel2[EntityLevel2["HTML"] = 1] = "HTML"; +})(EntityLevel || (EntityLevel = {})); +var EncodingMode; +(function(EncodingMode2) { + EncodingMode2[EncodingMode2["UTF8"] = 0] = "UTF8"; + EncodingMode2[EncodingMode2["ASCII"] = 1] = "ASCII"; + EncodingMode2[EncodingMode2["Extensive"] = 2] = "Extensive"; + EncodingMode2[EncodingMode2["Attribute"] = 3] = "Attribute"; + EncodingMode2[EncodingMode2["Text"] = 4] = "Text"; +})(EncodingMode || (EncodingMode = {})); + +// dist/inline-code-spans.js +function nextCodeSpan(s, from) { + let i = from; + while (i < s.length && s[i] !== "`") + i++; + if (i >= s.length) + return null; + let j = i; + while (j < s.length && s[j] === "`") + j++; + const runLen = j - i; + let k = j; + while (k < s.length) { + if (s[k] !== "`") { + k++; + continue; + } + let m = k; + while (m < s.length && s[m] === "`") + m++; + if (m - k === runLen) { + return { type: "closed", open: i, contentStart: j, close: k, closeEnd: m, runLen }; + } + k = m; + } + return { type: "unclosed", open: i, runLen }; +} +function scanCodeSpans(s) { + const mask = new Array(s.length).fill(false); + let i = 0; + while (i < s.length) { + const span = nextCodeSpan(s, i); + if (!span) + break; + if (span.type === "unclosed") + return { mask, unresolvedAt: span.open }; + for (let p = span.open; p < span.closeEnd; p++) + mask[p] = true; + i = span.closeEnd; + } + return { mask, unresolvedAt: null }; +} +function renderInlineCode(text2) { + let out = ""; + let i = 0; + while (i < text2.length) { + if (text2[i] !== "`") { + out += text2[i] ?? ""; + i++; + continue; + } + const span = nextCodeSpan(text2, i); + if (!span) { + out += text2[i] ?? ""; + i++; + continue; + } + if (span.type === "unclosed") { + out += text2.slice(span.open, span.open + span.runLen); + i = span.open + span.runLen; + continue; + } + let content = text2.slice(span.contentStart, span.close).replace(/\n/g, " "); + if (content.length >= 2 && content.startsWith(" ") && content.endsWith(" ") && /[^ ]/.test(content)) { + content = content.slice(1, -1); + } + out += `${content}`; + i = span.closeEnd; + } + return out; +} + +// dist/backslash-escapes.js +var ESCAPED_BASE = 57344; +function isEscapablePunctuation(ch) { + return /^[!-/:-@[-`{-~]$/.test(ch); +} +var ANGLE_AUTOLINK_RE = /^<(?:[a-zA-Z][a-zA-Z0-9+.-]{1,31}:[^<>\s]*|[^<>\s@]+@[^<>\s@]+\.[^<>\s@]+)>/; +var RAW_TAG_LIKE_RE = /^<\/?[a-zA-Z][\s\S]*?>/; +var ENTITY_CANDIDATE_RE = /^&(?:#[0-9]{1,7};|#[xX][0-9a-fA-F]{1,6};|[a-zA-Z][a-zA-Z0-9]{0,31};)/; +var INCOMPLETE_ENTITY_RE = /&(?:#[0-9]{0,7}|#[xX][0-9a-fA-F]{0,6}|[a-zA-Z][a-zA-Z0-9]{0,31})?$/; +function encodeLiteralChar(ch) { + return isEscapablePunctuation(ch) ? String.fromCharCode(ESCAPED_BASE + ch.charCodeAt(0)) : ch; +} +function trailingEntityHoldStart(s) { + const window2 = Math.min(34, s.length); + const m = INCOMPLETE_ENTITY_RE.exec(s.slice(s.length - window2)); + if (!m) + return s.length; + return s.length - window2 + m.index; +} +function encodeBackslashEscapes(text2) { + let out = ""; + let i = 0; + while (i < text2.length) { + const ch = text2[i] ?? ""; + if (ch === "`") { + const span = nextCodeSpan(text2, i); + if (span && span.type === "closed" && span.open === i) { + out += text2.slice(i, span.closeEnd); + i = span.closeEnd; + continue; + } + const runEnd = span && span.type === "unclosed" && span.open === i ? i + span.runLen : i + 1; + out += text2.slice(i, runEnd); + i = runEnd; + continue; + } + if (ch === "<") { + const verbatim = ANGLE_AUTOLINK_RE.exec(text2.slice(i))?.[0] ?? RAW_TAG_LIKE_RE.exec(text2.slice(i))?.[0]; + if (verbatim) { + out += verbatim; + i += verbatim.length; + continue; + } + } + if (ch === "&") { + const candidate = ENTITY_CANDIDATE_RE.exec(text2.slice(i))?.[0]; + if (candidate) { + const decoded = decodeHTMLStrict(candidate); + if (decoded !== candidate) { + for (const c of decoded) + out += encodeLiteralChar(c); + i += candidate.length; + continue; + } + } + } + const next = text2[i + 1] ?? ""; + if (ch === "\\" && isEscapablePunctuation(next)) { + out += String.fromCharCode(ESCAPED_BASE + next.charCodeAt(0)); + i += 2; + continue; + } + out += ch; + i++; + } + return out; +} +var ENCODED_PUNCT_RE = /[\uE021-\uE07E]/g; +var DECODE_HTML_ESCAPES = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'" +}; +function decodeEscapedPunctuation(html2) { + return html2.replace(ENCODED_PUNCT_RE, (c) => { + const ch = String.fromCharCode(c.charCodeAt(0) - ESCAPED_BASE); + return DECODE_HTML_ESCAPES[ch] ?? ch; + }); +} +function decodeEscapedPunctuationRaw(text2) { + return text2.replace(ENCODED_PUNCT_RE, (c) => String.fromCharCode(c.charCodeAt(0) - ESCAPED_BASE)); +} +function canonicalizeEscapedPunctuation(text2) { + return decodeEscapedPunctuationRaw(encodeBackslashEscapes(text2)); +} + +// dist/link-references.js +function normalizeReferenceLabel(label) { + return label.replace(/\s+/g, " ").trim().toLocaleLowerCase("und"); +} +function hasUnescapedBrackets(raw) { + for (let i = 0; i < raw.length; i++) { + const ch = raw[i]; + if (ch === "\\") { + i++; + continue; + } + if (ch === "[" || ch === "]") + return true; + } + return false; +} +function isValidReferenceLabel(raw) { + return raw.trim() !== "" && !hasUnescapedBrackets(raw); +} +function decodeEscapes(text2) { + return canonicalizeEscapedPunctuation(text2); +} +function decodeDestinationEscapes(text2) { + return text2.replace(/\\([!"#$%&'()*+,-./:;<=>?@[\\\]^_`{|}~])/g, "$1"); +} +function decodeHtmlCharRefs(text2) { + return decodeHTMLStrict(text2); +} +function percentEncodeHref(decoded) { + let out = ""; + for (let i = 0; i < decoded.length; i++) { + const ch = decoded.charAt(i); + if (ch === "%" && /^%[0-9A-Fa-f]{2}/.test(decoded.slice(i, i + 3))) { + out += decoded.slice(i, i + 3); + i += 2; + continue; + } + const cp = ch.codePointAt(0); + if (cp === void 0) + continue; + if (cp < 128 && /[A-Za-z0-9\-._~:/?#@!$&'()*+,;=]/.test(ch)) { + out += ch; + } else { + out += encodeURIComponent(ch); + } + } + return out; +} +function encodeHrefForOutput(href) { + return percentEncodeHref(decodeHtmlCharRefs(href)); +} +function parseLinkTitleAt(source, start) { + let i = start; + while (i < source.length && (source[i] === " " || source[i] === " " || source[i] === "\n")) + i++; + const slice = source.slice(i); + const dquote = slice.match(/^"((?:\\.|[^"\\])*)"/); + if (dquote?.[1] !== void 0) { + return { + title: decodeHtmlCharRefs(decodeDestinationEscapes(dquote[1])), + end: i + dquote[0].length + }; + } + const squote = slice.match(/^'((?:\\.|[^'\\])*)'/); + if (squote?.[1] !== void 0) { + return { + title: decodeHtmlCharRefs(decodeDestinationEscapes(squote[1])), + end: i + squote[0].length + }; + } + const paren = slice.match(/^\(((?:\\.|[^)\\])*(?:\\[\s\S])?)\)/); + if (paren?.[1] !== void 0) { + return { + title: decodeHtmlCharRefs(decodeDestinationEscapes(paren[1])), + end: i + paren[0].length + }; + } + return null; +} +function parseDestination(source, start) { + if (source[start] === "<") { + let i2 = start + 1; + while (i2 < source.length) { + if (source[i2] === "\n") + return null; + if (source[i2] === "\\" && i2 + 1 < source.length) { + i2 += 2; + continue; + } + if (source[i2] === ">") { + const raw2 = source.slice(start + 1, i2); + const href2 = decodeDestinationEscapes(raw2); + const end2 = i2 + 1; + const titlePart2 = parseLinkTitleAt(source, end2); + if (titlePart2) { + return { href: href2, end: titlePart2.end, title: titlePart2.title }; + } + return { href: href2, end: end2 }; + } + i2++; + } + return null; + } + let i = start; + let parenDepth = 0; + while (i < source.length) { + const ch = source[i]; + if (ch === "\\" && i + 1 < source.length) { + i += 2; + continue; + } + if (ch === "(") + parenDepth++; + else if (ch === ")") { + if (parenDepth > 0) + parenDepth--; + else + break; + } else if ((ch === " " || ch === "\n" || ch === " ") && parenDepth === 0) { + break; + } + i++; + } + const raw = source.slice(start, i); + if (raw === "" || /[ \n\t]/.test(raw)) + return null; + const end = i; + const titlePart = parseLinkTitleAt(source, end); + const href = decodeDestinationEscapes(raw); + if (titlePart) { + return { href, end: titlePart.end, title: titlePart.title }; + } + return { href, end }; +} +function parseBracketedLabel(source, start) { + if (source[start] !== "[") + return null; + let i = start + 1; + let depth = 1; + while (i < source.length && depth > 0) { + const ch = source[i]; + if (ch === "\\" && i + 1 < source.length) { + i += 2; + continue; + } + if (ch === "[") + depth++; + else if (ch === "]") + depth--; + i++; + } + if (depth !== 0) + return null; + const label = source.slice(start + 1, i - 1); + return { label, end: i }; +} +function isLinkReferenceDefStart(source, index) { + if (index > 0 && source[index - 1] !== "\n") + return false; + let col = 0; + let i = index - 1; + while (i >= 0 && source[i] !== "\n") { + if (source[i] === " ") + return false; + if (source[i] !== " ") + return false; + col++; + if (col > 3) + return false; + i--; + } + return source[index] === "["; +} +function parseLinkReferenceDefinitions(source) { + const refs = /* @__PURE__ */ new Map(); + let i = 0; + while (i < source.length) { + if (source[i] === "\n") { + i++; + continue; + } + if (!isLinkReferenceDefStart(source, i)) { + i++; + continue; + } + const labelPart = parseBracketedLabel(source, i); + if (!labelPart) { + i++; + continue; + } + let j = labelPart.end; + while (j < source.length && (source[j] === " " || source[j] === " ")) + j++; + if (source[j] !== ":") { + i++; + continue; + } + j++; + let sawNewline = false; + while (j < source.length) { + const c = source[j]; + if (c === " " || c === " ") { + j++; + } else if (c === "\n" && !sawNewline) { + sawNewline = true; + j++; + } else { + break; + } + } + const dest = parseDestination(source, j); + if (!dest) { + i++; + continue; + } + let tail = dest.end; + while (tail < source.length && (source[tail] === " " || source[tail] === " ")) + tail++; + if (tail < source.length && source[tail] !== "\n") { + i++; + continue; + } + if (!isValidReferenceLabel(labelPart.label)) { + i++; + continue; + } + const key = normalizeReferenceLabel(decodeEscapes(labelPart.label)); + if (!refs.has(key)) { + const entry = { href: dest.href }; + if (dest.title !== void 0) + entry.title = dest.title; + refs.set(key, entry); + } + i = dest.end; + while (i < source.length && source[i] !== "\n") + i++; + } + return refs; +} +function lookupLinkReference(refs, label) { + if (!isValidReferenceLabel(label)) + return void 0; + return refs.get(normalizeReferenceLabel(decodeEscapes(label))); +} +function parseInlineLinkDestination(source, openParenIndex) { + if (source[openParenIndex] !== "(") + return null; + let j = openParenIndex + 1; + while (j < source.length && (source[j] === " " || source[j] === " " || source[j] === "\n")) + j++; + if (source[j] === ")") + return { href: "", end: j + 1 }; + const dest = parseDestination(source, j); + if (!dest) + return null; + let end = dest.end; + while (end < source.length && (source[end] === " " || source[end] === " " || source[end] === "\n")) { + end++; + } + if (source[end] !== ")") + return null; + return { + href: dest.href, + end: end + 1, + ...dest.title !== void 0 ? { title: dest.title } : {} + }; +} +function parseReferenceLabel(source, openBracketIndex, fallbackLabel) { + if (source[openBracketIndex] !== "[") + return null; + if (source[openBracketIndex + 1] === "]") { + return { label: fallbackLabel, end: openBracketIndex + 2 }; + } + const parsed = parseBracketedLabel(source, openBracketIndex); + if (!parsed) + return null; + return { label: parsed.label, end: parsed.end }; +} + +// dist/block-patterns.js +function leadingIndentWidth(line) { + let col = 0; + for (let i = 0; i < line.length; i++) { + const ch = line[i]; + if (ch === " ") + col++; + else if (ch === " ") + col += 4 - col % 4; + else + break; + } + return col; +} +function stripFourColumnIndent(line) { + let col = 0; + let i = 0; + while (i < line.length && col < 4) { + const ch = line[i]; + if (ch === " ") { + col++; + i++; + continue; + } + if (ch === " ") { + const advance = 4 - col % 4; + if (col + advance > 4) + return " ".repeat(col + advance - 4) + line.slice(i + 1); + col += advance; + i++; + continue; + } + break; + } + return line.slice(i); +} +var FENCE_OPEN_RE = /^ {0,3}(`{3,}|~{3,})([^\n`]*)\s*$/; +var FENCE_CLOSE_RE = /^ {0,3}(`{3,}|~{3,})\s*$/; +var ATX_HEADING_DETECT_RE = /^ {0,3}(#{1,6})(?:[ \t]|$)/; +var ATX_HEADING_CAPTURE_RE = /^ {0,3}(#{1,6})(?:[ \t]+(.*)|$)/; +var BLOCKQUOTE_DETECT_RE = /^ {0,3}> ?/; +function stripBlockquoteMarker(line) { + return line.replace(BLOCKQUOTE_DETECT_RE, ""); +} +function dropTrailingNewline(slice) { + return slice.endsWith("\n") ? slice.slice(0, -1) : slice; +} +function stripAtxClosingHashes(title) { + if (/^#+\s*$/.test(title)) + return ""; + return title.replace(/(?= len; +} +function parseFenceSlice(slice) { + const lines = dropTrailingNewline(slice).split("\n"); + const open = lines[0] ?? ""; + const openMatch = open.match(FENCE_OPEN_RE); + const marker = openMatch?.[1] ?? "```"; + const lang = fenceInfoLanguage(openMatch?.[2] ?? ""); + const indent = fenceOpenIndent(open); + let closeIndex = lines.length - 1; + while (closeIndex > 0) { + const line = lines[closeIndex] ?? ""; + if (fenceCloses(marker, marker.length, line)) { + break; + } + closeIndex--; + } + const code = lines.slice(1, closeIndex).map((line) => stripLeadingSpaces(line, indent)).join("\n"); + return { lang, code }; +} +function parseOpenFenceContent(source) { + const lines = source.split("\n"); + const open = lines[0] ?? ""; + const openMatch = open.match(FENCE_OPEN_RE); + if (!openMatch?.[1]) + return null; + const lang = fenceInfoLanguage(openMatch[2] ?? ""); + const indent = fenceOpenIndent(open); + let bodyLines = lines.slice(1); + const last = bodyLines.at(-1) ?? ""; + if (bodyLines.length > 0 && fenceCloses(openMatch[1], openMatch[1].length, last)) { + bodyLines = bodyLines.slice(0, -1); + } + return { lang, code: bodyLines.map((line) => stripLeadingSpaces(line, indent)).join("\n") }; +} + +// dist/block-tokenizer.js +var THEMATIC_BREAK_RE = /^ {0,3}([-*_])(?:[ \t]*\1){2,}[ \t]*$/; +var UNORDERED_LIST_ITEM_RE = /^ {0,3}[-*+](?:\s|$)/; +var ORDERED_LIST_MARKER_RE = /^ {0,3}(\d{1,9})([.)])(?:\s|$)/; +var LIST_ITEM_RE = /^ {0,3}(?:(?:[-*+])(?:\s|$)|(?:\d{1,9}[.)](?:\s|$)))/; +var EMPTY_LIST_ITEM_RE = /^ {0,3}(?:[-*+]|\d{1,9}[.)])(?:\s|$)/; +var BLOCKQUOTE_RE = /^ {0,3}> ?/; +var SETEXT_UNDERLINE_RE = /^ {0,3}(=+|-+)\s*$/; +var TABLE_SEP_RE = /^\s*\|?\s*:?-{1,}:?\s*(\|\s*:?-{1,}:?\s*)*\|?\s*$/; +function parseOrderedListMarker(line) { + const m = line.match(ORDERED_LIST_MARKER_RE); + if (!m?.[1]) + return null; + return parseInt(m[1], 10); +} +function orderedListMarkerDelimiter(line) { + const m = line.match(ORDERED_LIST_MARKER_RE); + const d = m?.[2]; + if (d === "." || d === ")") + return d; + return null; +} +function isUnorderedListItemLine(line) { + return UNORDERED_LIST_ITEM_RE.test(line); +} +function isListItemLine(line) { + return isUnorderedListItemLine(line) || parseOrderedListMarker(line) !== null; +} +function unorderedListMarkerChar(line) { + const m = line.match(/^ {0,3}([-*+])(?:\s|$)/); + const ch = m?.[1]; + if (ch === "-" || ch === "*" || ch === "+") + return ch; + return null; +} +function isEmptyListItemLine(line) { + const m = line.match(EMPTY_LIST_ITEM_RE); + if (!m) + return false; + return line.slice(m[0].length).trim() === ""; +} +function listItemContentColumn(line) { + const m = line.match(/^( {0,3})(\d{1,9}[.)]|[-*+])( *)(.*)$/); + if (!m) + return Infinity; + const indent = m[1]?.length ?? 0; + const markerWidth = m[2]?.length ?? 0; + const spaces = m[3]?.length ?? 0; + const hasContent = (m[4]?.length ?? 0) > 0; + const n = hasContent && spaces >= 1 && spaces <= 4 ? spaces : 1; + return indent + markerWidth + n; +} +function lazyContinuationIndent(line) { + return line.match(/^ */)?.[0].length ?? 0; +} +function orderedMarkerContinuesParagraph(prevLine, line) { + const num = parseOrderedListMarker(line); + if (num === null) + return false; + if (num === 1) + return false; + return prevLine.trimEnd().length > 0; +} +function isLazyUnorderedContinuation(itemStartLine, line) { + if (isListItemLine(line)) + return false; + return lazyContinuationIndent(line) >= listItemContentColumn(itemStartLine); +} +function isLazyListContinuation(itemStartLine, line) { + return isLazyUnorderedContinuation(itemStartLine, line); +} +function lineContainsPipeCellDelimiter(line) { + return line.includes("|") && line.trim() !== ""; +} +function isProseMetadataPipeLine(line) { + if (!lineContainsPipeCellDelimiter(line)) + return false; + const trimmed = line.trimStart(); + if (/\*\*[^*\n]+:\*\*/.test(trimmed)) + return true; + if (/ /i.test(trimmed)) + return true; + return false; +} +function isGfmTableRowLine(line) { + if (!lineContainsPipeCellDelimiter(line)) + return false; + if (isProseMetadataPipeLine(line)) + return false; + const trimmed = line.trimStart(); + if (trimmed.startsWith("|")) + return true; + return splitTableRow(trimmed).length >= 2; +} +function isTableRow(line) { + return isGfmTableRowLine(line); +} +function isPartialTableSeparatorLine(line) { + const trimmed = line.trim(); + if (!trimmed.includes("-")) + return false; + return /^\|?\s*:?-{1,}/.test(trimmed); +} +function isPotentialTableStart(lines, i) { + const line = lines[i]; + if (!line || !isTableRow(line.text)) + return false; + const next = lines[i + 1]; + if (next && TABLE_SEP_RE.test(next.text)) + return true; + if (next && isPartialTableSeparatorLine(next.text)) + return true; + if (next && isTableRow(next.text)) + return true; + return line.text.trimStart().startsWith("|"); +} +function scanLines(source) { + const lines = []; + let i = 0; + while (i <= source.length) { + const start = i; + const end = source.indexOf("\n", i); + if (end === -1) { + if (start < source.length) { + lines.push({ text: source.slice(start), start, end: source.length, terminated: false }); + } + break; + } + lines.push({ text: source.slice(start, end), start, end: end + 1, terminated: true }); + i = end + 1; + } + return lines; +} +function pushBlock(blocks, kind, status, start, end) { + if (end <= start) + return; + blocks.push({ kind, status, start, end }); +} +function tryLinkRefDefBlock(lines, i) { + const startLine = lines[i]; + if (!startLine || !/^ {0,3}\[/.test(startLine.text)) + return null; + let j = i; + let buf = ""; + while (j < lines.length) { + const line = lines[j]; + if (!line) + break; + if (j > i && line.text.trim() === "") + return null; + if (j > i && (ATX_HEADING_DETECT_RE.test(line.text) || LIST_ITEM_RE.test(line.text) || BLOCKQUOTE_RE.test(line.text) || fenceMarker(line.text) || THEMATIC_BREAK_RE.test(line.text))) { + return null; + } + buf += line.text; + if (line.terminated) + buf += "\n"; + if (/\]:[ \t]/.test(buf) || /\]:\n/.test(buf)) { + const probe = buf.endsWith("\n") ? buf : `${buf} +`; + if (parseLinkReferenceDefinitions(probe).size > 0) + return j + 1; + } + j++; + } + return null; +} +function breaksUnorderedListItem(lines, itemStart, j) { + const itemStartLine = lines[itemStart]?.text ?? ""; + const col = listItemContentColumn(itemStartLine); + const next = lines[j]; + if (!next) + return true; + if (next.text.trim() === "") { + let k = j + 1; + while (k < lines.length && lines[k]?.text.trim() === "") + k++; + const after = lines[k]; + if (!after) + return true; + if (lazyContinuationIndent(after.text) >= col) + return false; + if (isListItemLine(after.text)) + return true; + return !isLazyUnorderedContinuation(itemStartLine, after.text); + } + if (lazyContinuationIndent(next.text) >= col && next.text.trim() !== "") + return false; + if (isListItemLine(next.text)) + return true; + if (ATX_HEADING_DETECT_RE.test(next.text) || THEMATIC_BREAK_RE.test(next.text) || fenceMarker(next.text) || BLOCKQUOTE_RE.test(next.text) || tryLinkRefDefBlock(lines, j) !== null || isTableRow(next.text) && lines[j + 1] && TABLE_SEP_RE.test(lines[j + 1]?.text ?? "")) { + return true; + } + return false; +} +function tokenizeBlocks(source) { + const lines = scanLines(source); + const blocks = []; + let i = 0; + while (i < lines.length) { + const line = lines[i]; + if (!line) + break; + if (line.text.trim() === "") { + pushBlock(blocks, "blank", line.terminated ? "complete" : "open", line.start, line.end); + i++; + continue; + } + if (leadingIndentWidth(line.text) >= 4 && line.text.trim() !== "") { + let j2 = i + 1; + let lastContent = i; + while (j2 < lines.length) { + const next = lines[j2]; + if (!next) + break; + if (next.text.trim() === "") { + j2++; + continue; + } + if (leadingIndentWidth(next.text) >= 4) { + lastContent = j2; + j2++; + continue; + } + break; + } + const last2 = lines[lastContent] ?? line; + const terminatorSeen = j2 < lines.length && lines[j2] !== void 0; + const status2 = !last2.terminated ? "open" : terminatorSeen ? "complete" : "open"; + pushBlock(blocks, "indented_code", status2, line.start, last2.end); + i = lastContent + 1; + continue; + } + const fence = fenceMarker(line.text); + if (fence) { + const fenceStart = line.start; + let j2 = i + 1; + let closed = false; + while (j2 < lines.length) { + const next = lines[j2]; + if (next && fenceCloses(fence.marker, fence.len, next.text)) { + closed = true; + pushBlock(blocks, "fence", "complete", fenceStart, next.end); + i = j2 + 1; + break; + } + j2++; + } + if (!closed) { + const end = lines.at(-1)?.end ?? source.length; + pushBlock(blocks, "fence", "open", fenceStart, end); + break; + } + continue; + } + if (ATX_HEADING_DETECT_RE.test(line.text)) { + const status2 = line.terminated ? "complete" : "ambiguous"; + pushBlock(blocks, "atx_heading", status2, line.start, line.end); + i++; + continue; + } + if (THEMATIC_BREAK_RE.test(line.text)) { + const status2 = line.terminated ? "complete" : "ambiguous"; + pushBlock(blocks, "thematic_break", status2, line.start, line.end); + i++; + continue; + } + const linkRefEnd = tryLinkRefDefBlock(lines, i); + if (linkRefEnd !== null) { + const last2 = lines[linkRefEnd - 1] ?? line; + const status2 = last2.terminated ? "complete" : "open"; + pushBlock(blocks, "link_ref_def", status2, line.start, last2.end); + i = linkRefEnd; + continue; + } + if (isListItemLine(line.text)) { + const isOrdered = parseOrderedListMarker(line.text) !== null; + const itemStart = line.start; + let j2 = i + 1; + while (j2 < lines.length) { + if (isOrdered) { + const next = lines[j2]; + if (!next) + break; + if (next.text.trim() !== "" && lazyContinuationIndent(next.text) >= listItemContentColumn(line.text)) { + j2++; + continue; + } + if (isListItemLine(next.text)) + break; + if (next.text.trim() === "") { + j2++; + continue; + } + if (ATX_HEADING_DETECT_RE.test(next.text) || THEMATIC_BREAK_RE.test(next.text) || fenceMarker(next.text) || BLOCKQUOTE_RE.test(next.text) || tryLinkRefDefBlock(lines, j2) !== null || isTableRow(next.text) && lines[j2 + 1] && TABLE_SEP_RE.test(lines[j2 + 1]?.text ?? "")) { + break; + } + j2++; + continue; + } + if (breaksUnorderedListItem(lines, i, j2)) + break; + j2++; + } + const last2 = lines[j2 - 1] ?? line; + const status2 = last2.terminated ? "complete" : "open"; + pushBlock(blocks, "list_item", status2, itemStart, last2.end); + i = j2; + continue; + } + if (BLOCKQUOTE_RE.test(line.text)) { + const bqStart = line.start; + let j2 = i + 1; + while (j2 < lines.length) { + const next = lines[j2]; + if (!next) + break; + if (next.text.trim() === "") { + let k = j2 + 1; + while (k < lines.length && lines[k]?.text.trim() === "") + k++; + if (k < lines.length && lines[k] && BLOCKQUOTE_RE.test(lines[k]?.text ?? "")) { + j2++; + continue; + } + break; + } + if (!BLOCKQUOTE_RE.test(next.text) && (ATX_HEADING_DETECT_RE.test(next.text) || LIST_ITEM_RE.test(next.text) || fenceMarker(next.text) || THEMATIC_BREAK_RE.test(next.text))) { + break; + } + j2++; + } + const last2 = lines[j2 - 1] ?? line; + const status2 = last2.terminated ? "complete" : "open"; + pushBlock(blocks, "blockquote", status2, bqStart, last2.end); + i = j2; + continue; + } + if (isTableRow(line.text)) { + const nextLine2 = lines[i + 1]; + if (nextLine2 && TABLE_SEP_RE.test(nextLine2.text)) { + const tableStart = line.start; + let j2 = i + 2; + while (j2 < lines.length) { + const row = lines[j2]; + if (!row || !isTableRow(row.text)) + break; + j2++; + } + const last2 = lines[j2 - 1] ?? lines[i + 1] ?? line; + const lastRow = lines[j2 - 1]; + const status2 = lastRow && !lastRow.terminated && j2 === lines.length ? "open" : "complete"; + pushBlock(blocks, "table", status2, tableStart, last2.end); + i = j2; + continue; + } + if (isPotentialTableStart(lines, i)) { + const tableStart = line.start; + let j2 = i + 1; + while (j2 < lines.length) { + const nl = lines[j2]; + if (!nl) + break; + if (TABLE_SEP_RE.test(nl.text)) + break; + if (!isTableRow(nl.text) && !isPartialTableSeparatorLine(nl.text) && nl.text.trim() !== "") { + break; + } + j2++; + } + const last2 = lines[j2 - 1] ?? line; + const status2 = last2.terminated && j2 > i + 1 ? "open" : last2.terminated ? "ambiguous" : "open"; + pushBlock(blocks, "table", status2, tableStart, last2.end); + i = j2; + continue; + } + } + const nextLine = lines[i + 1]; + if (nextLine && SETEXT_UNDERLINE_RE.test(nextLine.text)) { + if (!nextLine.terminated) { + pushBlock(blocks, "paragraph", line.terminated ? "complete" : "open", line.start, line.end); + pushBlock(blocks, "thematic_break", "ambiguous", nextLine.start, nextLine.end); + i += 2; + continue; + } + pushBlock(blocks, "setext_heading", "complete", line.start, nextLine.end); + i += 2; + continue; + } + if (!line.terminated && i === lines.length - 1) { + if (isPotentialTableStart(lines, i)) { + pushBlock(blocks, "table", "ambiguous", line.start, line.end); + } else { + pushBlock(blocks, "paragraph", "open", line.start, line.end); + } + break; + } + const paraStart = line.start; + let j = i + 1; + while (j < lines.length) { + const next = lines[j]; + if (!next || next.text.trim() === "") + break; + if (ATX_HEADING_DETECT_RE.test(next.text) || THEMATIC_BREAK_RE.test(next.text) || LIST_ITEM_RE.test(next.text) && // An empty list item cannot interrupt a paragraph (#285). + !isEmptyListItemLine(next.text) && !orderedMarkerContinuesParagraph(lines[j - 1]?.text ?? "", next.text) || BLOCKQUOTE_RE.test(next.text) || fenceMarker(next.text) || tryLinkRefDefBlock(lines, j) !== null || isTableRow(next.text) && lines[j + 1] && TABLE_SEP_RE.test(lines[j + 1]?.text ?? "") || lines[j + 1] && SETEXT_UNDERLINE_RE.test(lines[j + 1]?.text ?? "")) { + break; + } + j++; + } + const last = lines[j - 1] ?? line; + const status = last.terminated ? "complete" : "open"; + pushBlock(blocks, "paragraph", status, paraStart, last.end); + i = j; + } + return blocks; +} +function streamingHoldStart(blocks) { + let commitEnd = 0; + for (const block of blocks) { + if (block.status !== "complete") + return block.start; + commitEnd = block.end; + } + return commitEnd; +} +function completeEndsInOpenTable(complete) { + const blocks = tokenizeBlocks(complete); + const last = blocks.at(-1); + return last?.kind === "table" && last.status === "complete"; +} +function pendingLineBelongsInTable(complete, pending) { + return pending.includes("|") && completeEndsInOpenTable(complete); +} +function getIncompleteTableSource(content) { + const blocks = tokenizeBlocks(content); + for (let i = blocks.length - 1; i >= 0; i--) { + const block = blocks[i]; + if (block?.kind === "table" && block.status !== "complete") { + return content.slice(block.start, block.end); + } + } + return null; +} +function getIncompleteFenceSource(content) { + const blocks = tokenizeBlocks(content); + for (let i = blocks.length - 1; i >= 0; i--) { + const block = blocks[i]; + if (block?.kind === "fence" && block.status !== "complete") { + return content.slice(block.start, block.end); + } + } + return null; +} +function splitTableRow(line) { + let s = line.trim(); + if (s.startsWith("|")) + s = s.slice(1); + if (s.endsWith("|")) + s = s.slice(0, -1); + return s.split("|").map((c) => c.trim()); +} +function isAmbiguousBlockLine(line) { + const trimmed = line.trimStart(); + if (trimmed === "") + return false; + if (/^ {4}/.test(line)) + return true; + if (ATX_HEADING_DETECT_RE.test(line)) + return true; + if (THEMATIC_BREAK_RE.test(line)) + return true; + if (FENCE_OPEN_RE.test(line)) + return true; + if (LIST_ITEM_RE.test(line)) + return true; + if (BLOCKQUOTE_RE.test(line)) + return true; + if (isGfmTableRowLine(line)) + return true; + return false; +} + +// dist/escape.js +var HTML_ESCAPES = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'" +}; +function escapeHtml(text2) { + return text2.replace(/[&<>"']/g, (ch) => HTML_ESCAPES[ch] ?? ch); +} +var SAFE_OUTER_TAG_RE = /^(?:|<\/(?:a|code|em|strong)>|<(?:code|em|strong)\b[^>]*>|]*\bdata-md-rendered="1"[^>]*\/?>)$/i; +var BENIGN_RAW_INLINE_TAG_RE = /^<\/?(?:b|i|u|s|del|ins|sub|sup|kbd|mark|br)\s*\/?>$/i; +function escapeHtmlOutsideSafeTags(html2) { + return html2.split(/(<[^>]+>)/g).map((part) => part.startsWith("<") && (SAFE_OUTER_TAG_RE.test(part) || BENIGN_RAW_INLINE_TAG_RE.test(part)) ? part : escapeHtml(part)).join(""); +} +function escapeHtmlTextNodes(html2) { + return html2.split(/([\s\S]*?<\/code>)/g).map((segment, index) => { + if (index % 2 === 1) { + const match = segment.match(/^()([\s\S]*?)(<\/code>)$/); + if (!match) + return segment; + return `${match[1] ?? ""}${escapeHtml(match[2] ?? "")}${match[3] ?? ""}`; + } + return escapeHtmlOutsideSafeTags(segment); + }).join(""); +} +function escapeMermaidHtml(text2) { + return text2.replace(/[&<"']/g, (ch) => HTML_ESCAPES[ch] ?? ch); +} +function decodeEscapedHref(raw) { + return raw.replace(/&/g, "&").replace(/"/g, '"').replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">"); +} +var SAFE_MARKDOWN_ENTITY_RE = /&(?:amp;)?(?:nbsp|#160|#x0*a);/gi; +var KNOWN_SAFE_ENTITIES = [ + " ", + " ", + " ", + "&nbsp;", + "&#160;", + "&#xa0;" +]; +function stripIncompleteSafeEntities(text2) { + const amp = text2.lastIndexOf("&"); + if (amp === -1) + return text2; + const suffix = text2.slice(amp); + if (/^&(?:amp;)?(?:nbsp|#160|#x0*a);$/i.test(suffix)) + return text2; + const lower = suffix.toLowerCase(); + if (KNOWN_SAFE_ENTITIES.some((entity) => entity.startsWith(lower) && lower.length < entity.length)) { + return text2.slice(0, amp); + } + return text2; +} +function decodeSafeMarkdownEntities(text2) { + const stripped = stripIncompleteSafeEntities(text2); + return stripped.replace(SAFE_MARKDOWN_ENTITY_RE, (entity) => { + const lower = entity.toLowerCase(); + if (lower === " " || lower === " " || lower === " " || lower === "&nbsp;" || lower === "&#160;" || lower === "&#xa0;") { + return "\xA0"; + } + return entity; + }); +} + +// node_modules/highlight.js/es/core.js +var import_core = __toESM(require_core(), 1); +var core_default = import_core.default; + +// node_modules/highlight.js/es/languages/bash.js +function bash(hljs) { + const regex = hljs.regex; + const VAR = {}; + const BRACED_VAR = { + begin: /\$\{/, + end: /\}/, + contains: [ + "self", + { + begin: /:-/, + contains: [VAR] + } + // default values + ] + }; + Object.assign(VAR, { + className: "variable", + variants: [ + { begin: regex.concat( + /\$[\w\d#@][\w\d_]*/, + // negative look-ahead tries to avoid matching patterns that are not + // Perl at all like $ident$, @ident@, etc. + `(?![\\w\\d])(?![$])` + ) }, + BRACED_VAR + ] + }); + const SUBST = { + className: "subst", + begin: /\$\(/, + end: /\)/, + contains: [hljs.BACKSLASH_ESCAPE] + }; + const COMMENT = hljs.inherit( + hljs.COMMENT(), + { + match: [ + /(^|\s)/, + /#.*$/ + ], + scope: { + 2: "comment" + } + } + ); + const HERE_DOC = { + begin: /<<-?\s*(?=\w+)/, + starts: { contains: [ + hljs.END_SAME_AS_BEGIN({ + begin: /(\w+)/, + end: /(\w+)/, + className: "string" + }) + ] } + }; + const QUOTE_STRING = { + className: "string", + begin: /"/, + end: /"/, + contains: [ + hljs.BACKSLASH_ESCAPE, + VAR, + SUBST + ] + }; + SUBST.contains.push(QUOTE_STRING); + const ESCAPED_QUOTE = { + match: /\\"/ + }; + const APOS_STRING = { + className: "string", + begin: /'/, + end: /'/ + }; + const ESCAPED_APOS = { + match: /\\'/ + }; + const ARITHMETIC = { + begin: /\$?\(\(/, + end: /\)\)/, + contains: [ + { + begin: /\d+#[0-9a-f]+/, + className: "number" + }, + hljs.NUMBER_MODE, + VAR + ] + }; + const SH_LIKE_SHELLS = [ + "fish", + "bash", + "zsh", + "sh", + "csh", + "ksh", + "tcsh", + "dash", + "scsh" + ]; + const KNOWN_SHEBANG = hljs.SHEBANG({ + binary: `(${SH_LIKE_SHELLS.join("|")})`, + relevance: 10 + }); + const FUNCTION = { + className: "function", + begin: /\w[\w\d_]*\s*\(\s*\)\s*\{/, + returnBegin: true, + contains: [hljs.inherit(hljs.TITLE_MODE, { begin: /\w[\w\d_]*/ })], + relevance: 0 + }; + const KEYWORDS3 = [ + "if", + "then", + "else", + "elif", + "fi", + "time", + "for", + "while", + "until", + "in", + "do", + "done", + "case", + "esac", + "coproc", + "function", + "select" + ]; + const LITERALS3 = [ + "true", + "false" + ]; + const PATH_MODE = { match: /(\/[a-z._-]+)+/ }; + const SHELL_BUILT_INS = [ + "break", + "cd", + "continue", + "eval", + "exec", + "exit", + "export", + "getopts", + "hash", + "pwd", + "readonly", + "return", + "shift", + "test", + "times", + "trap", + "umask", + "unset" + ]; + const BASH_BUILT_INS = [ + "alias", + "bind", + "builtin", + "caller", + "command", + "declare", + "echo", + "enable", + "help", + "let", + "local", + "logout", + "mapfile", + "printf", + "read", + "readarray", + "source", + "sudo", + "type", + "typeset", + "ulimit", + "unalias" + ]; + const ZSH_BUILT_INS = [ + "autoload", + "bg", + "bindkey", + "bye", + "cap", + "chdir", + "clone", + "comparguments", + "compcall", + "compctl", + "compdescribe", + "compfiles", + "compgroups", + "compquote", + "comptags", + "comptry", + "compvalues", + "dirs", + "disable", + "disown", + "echotc", + "echoti", + "emulate", + "fc", + "fg", + "float", + "functions", + "getcap", + "getln", + "history", + "integer", + "jobs", + "kill", + "limit", + "log", + "noglob", + "popd", + "print", + "pushd", + "pushln", + "rehash", + "sched", + "setcap", + "setopt", + "stat", + "suspend", + "ttyctl", + "unfunction", + "unhash", + "unlimit", + "unsetopt", + "vared", + "wait", + "whence", + "where", + "which", + "zcompile", + "zformat", + "zftp", + "zle", + "zmodload", + "zparseopts", + "zprof", + "zpty", + "zregexparse", + "zsocket", + "zstyle", + "ztcp" + ]; + const GNU_CORE_UTILS = [ + "chcon", + "chgrp", + "chown", + "chmod", + "cp", + "dd", + "df", + "dir", + "dircolors", + "ln", + "ls", + "mkdir", + "mkfifo", + "mknod", + "mktemp", + "mv", + "realpath", + "rm", + "rmdir", + "shred", + "sync", + "touch", + "truncate", + "vdir", + "b2sum", + "base32", + "base64", + "cat", + "cksum", + "comm", + "csplit", + "cut", + "expand", + "fmt", + "fold", + "head", + "join", + "md5sum", + "nl", + "numfmt", + "od", + "paste", + "ptx", + "pr", + "sha1sum", + "sha224sum", + "sha256sum", + "sha384sum", + "sha512sum", + "shuf", + "sort", + "split", + "sum", + "tac", + "tail", + "tr", + "tsort", + "unexpand", + "uniq", + "wc", + "arch", + "basename", + "chroot", + "date", + "dirname", + "du", + "echo", + "env", + "expr", + "factor", + // "false", // keyword literal already + "groups", + "hostid", + "id", + "link", + "logname", + "nice", + "nohup", + "nproc", + "pathchk", + "pinky", + "printenv", + "printf", + "pwd", + "readlink", + "runcon", + "seq", + "sleep", + "stat", + "stdbuf", + "stty", + "tee", + "test", + "timeout", + // "true", // keyword literal already + "tty", + "uname", + "unlink", + "uptime", + "users", + "who", + "whoami", + "yes" + ]; + return { + name: "Bash", + aliases: [ + "sh", + "zsh" + ], + keywords: { + $pattern: /\b[a-z][a-z0-9._-]+\b/, + keyword: KEYWORDS3, + literal: LITERALS3, + built_in: [ + ...SHELL_BUILT_INS, + ...BASH_BUILT_INS, + // Shell modifiers + "set", + "shopt", + ...ZSH_BUILT_INS, + ...GNU_CORE_UTILS + ] + }, + contains: [ + KNOWN_SHEBANG, + // to catch known shells and boost relevancy + hljs.SHEBANG(), + // to catch unknown shells but still highlight the shebang + FUNCTION, + ARITHMETIC, + COMMENT, + HERE_DOC, + PATH_MODE, + QUOTE_STRING, + ESCAPED_QUOTE, + APOS_STRING, + ESCAPED_APOS, + VAR + ] + }; +} + +// node_modules/highlight.js/es/languages/css.js +var MODES = (hljs) => { + return { + IMPORTANT: { + scope: "meta", + begin: "!important" + }, + BLOCK_COMMENT: hljs.C_BLOCK_COMMENT_MODE, + HEXCOLOR: { + scope: "number", + begin: /#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/ + }, + FUNCTION_DISPATCH: { + className: "built_in", + begin: /[\w-]+(?=\()/ + }, + ATTRIBUTE_SELECTOR_MODE: { + scope: "selector-attr", + begin: /\[/, + end: /\]/, + illegal: "$", + contains: [ + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE + ] + }, + CSS_NUMBER_MODE: { + scope: "number", + begin: hljs.NUMBER_RE + "(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?", + relevance: 0 + }, + CSS_VARIABLE: { + className: "attr", + begin: /--[A-Za-z_][A-Za-z0-9_-]*/ + } + }; +}; +var HTML_TAGS = [ + "a", + "abbr", + "address", + "article", + "aside", + "audio", + "b", + "blockquote", + "body", + "button", + "canvas", + "caption", + "cite", + "code", + "dd", + "del", + "details", + "dfn", + "div", + "dl", + "dt", + "em", + "fieldset", + "figcaption", + "figure", + "footer", + "form", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "header", + "hgroup", + "html", + "i", + "iframe", + "img", + "input", + "ins", + "kbd", + "label", + "legend", + "li", + "main", + "mark", + "menu", + "nav", + "object", + "ol", + "optgroup", + "option", + "p", + "picture", + "q", + "quote", + "samp", + "section", + "select", + "source", + "span", + "strong", + "summary", + "sup", + "table", + "tbody", + "td", + "textarea", + "tfoot", + "th", + "thead", + "time", + "tr", + "ul", + "var", + "video" +]; +var SVG_TAGS = [ + "defs", + "g", + "marker", + "mask", + "pattern", + "svg", + "switch", + "symbol", + "feBlend", + "feColorMatrix", + "feComponentTransfer", + "feComposite", + "feConvolveMatrix", + "feDiffuseLighting", + "feDisplacementMap", + "feFlood", + "feGaussianBlur", + "feImage", + "feMerge", + "feMorphology", + "feOffset", + "feSpecularLighting", + "feTile", + "feTurbulence", + "linearGradient", + "radialGradient", + "stop", + "circle", + "ellipse", + "image", + "line", + "path", + "polygon", + "polyline", + "rect", + "text", + "use", + "textPath", + "tspan", + "foreignObject", + "clipPath" +]; +var TAGS = [ + ...HTML_TAGS, + ...SVG_TAGS +]; +var MEDIA_FEATURES = [ + "any-hover", + "any-pointer", + "aspect-ratio", + "color", + "color-gamut", + "color-index", + "device-aspect-ratio", + "device-height", + "device-width", + "display-mode", + "forced-colors", + "grid", + "height", + "hover", + "inverted-colors", + "monochrome", + "orientation", + "overflow-block", + "overflow-inline", + "pointer", + "prefers-color-scheme", + "prefers-contrast", + "prefers-reduced-motion", + "prefers-reduced-transparency", + "resolution", + "scan", + "scripting", + "update", + "width", + // TODO: find a better solution? + "min-width", + "max-width", + "min-height", + "max-height" +].sort().reverse(); +var PSEUDO_CLASSES = [ + "active", + "any-link", + "blank", + "checked", + "current", + "default", + "defined", + "dir", + // dir() + "disabled", + "drop", + "empty", + "enabled", + "first", + "first-child", + "first-of-type", + "fullscreen", + "future", + "focus", + "focus-visible", + "focus-within", + "has", + // has() + "host", + // host or host() + "host-context", + // host-context() + "hover", + "indeterminate", + "in-range", + "invalid", + "is", + // is() + "lang", + // lang() + "last-child", + "last-of-type", + "left", + "link", + "local-link", + "not", + // not() + "nth-child", + // nth-child() + "nth-col", + // nth-col() + "nth-last-child", + // nth-last-child() + "nth-last-col", + // nth-last-col() + "nth-last-of-type", + //nth-last-of-type() + "nth-of-type", + //nth-of-type() + "only-child", + "only-of-type", + "optional", + "out-of-range", + "past", + "placeholder-shown", + "read-only", + "read-write", + "required", + "right", + "root", + "scope", + "target", + "target-within", + "user-invalid", + "valid", + "visited", + "where" + // where() +].sort().reverse(); +var PSEUDO_ELEMENTS = [ + "after", + "backdrop", + "before", + "cue", + "cue-region", + "first-letter", + "first-line", + "grammar-error", + "marker", + "part", + "placeholder", + "selection", + "slotted", + "spelling-error" +].sort().reverse(); +var ATTRIBUTES = [ + "accent-color", + "align-content", + "align-items", + "align-self", + "alignment-baseline", + "all", + "anchor-name", + "animation", + "animation-composition", + "animation-delay", + "animation-direction", + "animation-duration", + "animation-fill-mode", + "animation-iteration-count", + "animation-name", + "animation-play-state", + "animation-range", + "animation-range-end", + "animation-range-start", + "animation-timeline", + "animation-timing-function", + "appearance", + "aspect-ratio", + "backdrop-filter", + "backface-visibility", + "background", + "background-attachment", + "background-blend-mode", + "background-clip", + "background-color", + "background-image", + "background-origin", + "background-position", + "background-position-x", + "background-position-y", + "background-repeat", + "background-size", + "baseline-shift", + "block-size", + "border", + "border-block", + "border-block-color", + "border-block-end", + "border-block-end-color", + "border-block-end-style", + "border-block-end-width", + "border-block-start", + "border-block-start-color", + "border-block-start-style", + "border-block-start-width", + "border-block-style", + "border-block-width", + "border-bottom", + "border-bottom-color", + "border-bottom-left-radius", + "border-bottom-right-radius", + "border-bottom-style", + "border-bottom-width", + "border-collapse", + "border-color", + "border-end-end-radius", + "border-end-start-radius", + "border-image", + "border-image-outset", + "border-image-repeat", + "border-image-slice", + "border-image-source", + "border-image-width", + "border-inline", + "border-inline-color", + "border-inline-end", + "border-inline-end-color", + "border-inline-end-style", + "border-inline-end-width", + "border-inline-start", + "border-inline-start-color", + "border-inline-start-style", + "border-inline-start-width", + "border-inline-style", + "border-inline-width", + "border-left", + "border-left-color", + "border-left-style", + "border-left-width", + "border-radius", + "border-right", + "border-right-color", + "border-right-style", + "border-right-width", + "border-spacing", + "border-start-end-radius", + "border-start-start-radius", + "border-style", + "border-top", + "border-top-color", + "border-top-left-radius", + "border-top-right-radius", + "border-top-style", + "border-top-width", + "border-width", + "bottom", + "box-align", + "box-decoration-break", + "box-direction", + "box-flex", + "box-flex-group", + "box-lines", + "box-ordinal-group", + "box-orient", + "box-pack", + "box-shadow", + "box-sizing", + "break-after", + "break-before", + "break-inside", + "caption-side", + "caret-color", + "clear", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "color-scheme", + "column-count", + "column-fill", + "column-gap", + "column-rule", + "column-rule-color", + "column-rule-style", + "column-rule-width", + "column-span", + "column-width", + "columns", + "contain", + "contain-intrinsic-block-size", + "contain-intrinsic-height", + "contain-intrinsic-inline-size", + "contain-intrinsic-size", + "contain-intrinsic-width", + "container", + "container-name", + "container-type", + "content", + "content-visibility", + "counter-increment", + "counter-reset", + "counter-set", + "cue", + "cue-after", + "cue-before", + "cursor", + "cx", + "cy", + "direction", + "display", + "dominant-baseline", + "empty-cells", + "enable-background", + "field-sizing", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flex", + "flex-basis", + "flex-direction", + "flex-flow", + "flex-grow", + "flex-shrink", + "flex-wrap", + "float", + "flood-color", + "flood-opacity", + "flow", + "font", + "font-display", + "font-family", + "font-feature-settings", + "font-kerning", + "font-language-override", + "font-optical-sizing", + "font-palette", + "font-size", + "font-size-adjust", + "font-smooth", + "font-smoothing", + "font-stretch", + "font-style", + "font-synthesis", + "font-synthesis-position", + "font-synthesis-small-caps", + "font-synthesis-style", + "font-synthesis-weight", + "font-variant", + "font-variant-alternates", + "font-variant-caps", + "font-variant-east-asian", + "font-variant-emoji", + "font-variant-ligatures", + "font-variant-numeric", + "font-variant-position", + "font-variation-settings", + "font-weight", + "forced-color-adjust", + "gap", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "grid", + "grid-area", + "grid-auto-columns", + "grid-auto-flow", + "grid-auto-rows", + "grid-column", + "grid-column-end", + "grid-column-start", + "grid-gap", + "grid-row", + "grid-row-end", + "grid-row-start", + "grid-template", + "grid-template-areas", + "grid-template-columns", + "grid-template-rows", + "hanging-punctuation", + "height", + "hyphenate-character", + "hyphenate-limit-chars", + "hyphens", + "icon", + "image-orientation", + "image-rendering", + "image-resolution", + "ime-mode", + "initial-letter", + "initial-letter-align", + "inline-size", + "inset", + "inset-area", + "inset-block", + "inset-block-end", + "inset-block-start", + "inset-inline", + "inset-inline-end", + "inset-inline-start", + "isolation", + "justify-content", + "justify-items", + "justify-self", + "kerning", + "left", + "letter-spacing", + "lighting-color", + "line-break", + "line-height", + "line-height-step", + "list-style", + "list-style-image", + "list-style-position", + "list-style-type", + "margin", + "margin-block", + "margin-block-end", + "margin-block-start", + "margin-bottom", + "margin-inline", + "margin-inline-end", + "margin-inline-start", + "margin-left", + "margin-right", + "margin-top", + "margin-trim", + "marker", + "marker-end", + "marker-mid", + "marker-start", + "marks", + "mask", + "mask-border", + "mask-border-mode", + "mask-border-outset", + "mask-border-repeat", + "mask-border-slice", + "mask-border-source", + "mask-border-width", + "mask-clip", + "mask-composite", + "mask-image", + "mask-mode", + "mask-origin", + "mask-position", + "mask-repeat", + "mask-size", + "mask-type", + "masonry-auto-flow", + "math-depth", + "math-shift", + "math-style", + "max-block-size", + "max-height", + "max-inline-size", + "max-width", + "min-block-size", + "min-height", + "min-inline-size", + "min-width", + "mix-blend-mode", + "nav-down", + "nav-index", + "nav-left", + "nav-right", + "nav-up", + "none", + "normal", + "object-fit", + "object-position", + "offset", + "offset-anchor", + "offset-distance", + "offset-path", + "offset-position", + "offset-rotate", + "opacity", + "order", + "orphans", + "outline", + "outline-color", + "outline-offset", + "outline-style", + "outline-width", + "overflow", + "overflow-anchor", + "overflow-block", + "overflow-clip-margin", + "overflow-inline", + "overflow-wrap", + "overflow-x", + "overflow-y", + "overlay", + "overscroll-behavior", + "overscroll-behavior-block", + "overscroll-behavior-inline", + "overscroll-behavior-x", + "overscroll-behavior-y", + "padding", + "padding-block", + "padding-block-end", + "padding-block-start", + "padding-bottom", + "padding-inline", + "padding-inline-end", + "padding-inline-start", + "padding-left", + "padding-right", + "padding-top", + "page", + "page-break-after", + "page-break-before", + "page-break-inside", + "paint-order", + "pause", + "pause-after", + "pause-before", + "perspective", + "perspective-origin", + "place-content", + "place-items", + "place-self", + "pointer-events", + "position", + "position-anchor", + "position-visibility", + "print-color-adjust", + "quotes", + "r", + "resize", + "rest", + "rest-after", + "rest-before", + "right", + "rotate", + "row-gap", + "ruby-align", + "ruby-position", + "scale", + "scroll-behavior", + "scroll-margin", + "scroll-margin-block", + "scroll-margin-block-end", + "scroll-margin-block-start", + "scroll-margin-bottom", + "scroll-margin-inline", + "scroll-margin-inline-end", + "scroll-margin-inline-start", + "scroll-margin-left", + "scroll-margin-right", + "scroll-margin-top", + "scroll-padding", + "scroll-padding-block", + "scroll-padding-block-end", + "scroll-padding-block-start", + "scroll-padding-bottom", + "scroll-padding-inline", + "scroll-padding-inline-end", + "scroll-padding-inline-start", + "scroll-padding-left", + "scroll-padding-right", + "scroll-padding-top", + "scroll-snap-align", + "scroll-snap-stop", + "scroll-snap-type", + "scroll-timeline", + "scroll-timeline-axis", + "scroll-timeline-name", + "scrollbar-color", + "scrollbar-gutter", + "scrollbar-width", + "shape-image-threshold", + "shape-margin", + "shape-outside", + "shape-rendering", + "speak", + "speak-as", + "src", + // @font-face + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "tab-size", + "table-layout", + "text-align", + "text-align-all", + "text-align-last", + "text-anchor", + "text-combine-upright", + "text-decoration", + "text-decoration-color", + "text-decoration-line", + "text-decoration-skip", + "text-decoration-skip-ink", + "text-decoration-style", + "text-decoration-thickness", + "text-emphasis", + "text-emphasis-color", + "text-emphasis-position", + "text-emphasis-style", + "text-indent", + "text-justify", + "text-orientation", + "text-overflow", + "text-rendering", + "text-shadow", + "text-size-adjust", + "text-transform", + "text-underline-offset", + "text-underline-position", + "text-wrap", + "text-wrap-mode", + "text-wrap-style", + "timeline-scope", + "top", + "touch-action", + "transform", + "transform-box", + "transform-origin", + "transform-style", + "transition", + "transition-behavior", + "transition-delay", + "transition-duration", + "transition-property", + "transition-timing-function", + "translate", + "unicode-bidi", + "user-modify", + "user-select", + "vector-effect", + "vertical-align", + "view-timeline", + "view-timeline-axis", + "view-timeline-inset", + "view-timeline-name", + "view-transition-name", + "visibility", + "voice-balance", + "voice-duration", + "voice-family", + "voice-pitch", + "voice-range", + "voice-rate", + "voice-stress", + "voice-volume", + "white-space", + "white-space-collapse", + "widows", + "width", + "will-change", + "word-break", + "word-spacing", + "word-wrap", + "writing-mode", + "x", + "y", + "z-index", + "zoom" +].sort().reverse(); +function css(hljs) { + const regex = hljs.regex; + const modes = MODES(hljs); + const VENDOR_PREFIX = { begin: /-(webkit|moz|ms|o)-(?=[a-z])/ }; + const AT_MODIFIERS = "and or not only"; + const AT_PROPERTY_RE = /@-?\w[\w]*(-\w+)*/; + const IDENT_RE3 = "[a-zA-Z-][a-zA-Z0-9_-]*"; + const STRINGS = [ + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE + ]; + return { + name: "CSS", + case_insensitive: true, + illegal: /[=|'\$]/, + keywords: { keyframePosition: "from to" }, + classNameAliases: { + // for visual continuity with `tag {}` and because we + // don't have a great class for this? + keyframePosition: "selector-tag" + }, + contains: [ + modes.BLOCK_COMMENT, + VENDOR_PREFIX, + // to recognize keyframe 40% etc which are outside the scope of our + // attribute value mode + modes.CSS_NUMBER_MODE, + { + className: "selector-id", + begin: /#[A-Za-z0-9_-]+/, + relevance: 0 + }, + { + className: "selector-class", + begin: "\\." + IDENT_RE3, + relevance: 0 + }, + modes.ATTRIBUTE_SELECTOR_MODE, + { + className: "selector-pseudo", + variants: [ + { begin: ":(" + PSEUDO_CLASSES.join("|") + ")" }, + { begin: ":(:)?(" + PSEUDO_ELEMENTS.join("|") + ")" } + ] + }, + // we may actually need this (12/2020) + // { // pseudo-selector params + // begin: /\(/, + // end: /\)/, + // contains: [ hljs.CSS_NUMBER_MODE ] + // }, + modes.CSS_VARIABLE, + { + className: "attribute", + begin: "\\b(" + ATTRIBUTES.join("|") + ")\\b" + }, + // attribute values + { + begin: /:/, + end: /[;}{]/, + contains: [ + modes.BLOCK_COMMENT, + modes.HEXCOLOR, + modes.IMPORTANT, + modes.CSS_NUMBER_MODE, + ...STRINGS, + // needed to highlight these as strings and to avoid issues with + // illegal characters that might be inside urls that would tigger the + // languages illegal stack + { + begin: /(url|data-uri)\(/, + end: /\)/, + relevance: 0, + // from keywords + keywords: { built_in: "url data-uri" }, + contains: [ + ...STRINGS, + { + className: "string", + // any character other than `)` as in `url()` will be the start + // of a string, which ends with `)` (from the parent mode) + begin: /[^)]/, + endsWithParent: true, + excludeEnd: true + } + ] + }, + modes.FUNCTION_DISPATCH + ] + }, + { + begin: regex.lookahead(/@/), + end: "[{;]", + relevance: 0, + illegal: /:/, + // break on Less variables @var: ... + contains: [ + { + className: "keyword", + begin: AT_PROPERTY_RE + }, + { + begin: /\s/, + endsWithParent: true, + excludeEnd: true, + relevance: 0, + keywords: { + $pattern: /[a-z-]+/, + keyword: AT_MODIFIERS, + attribute: MEDIA_FEATURES.join(" ") + }, + contains: [ + { + begin: /[a-z-]+(?=:)/, + className: "attribute" + }, + ...STRINGS, + modes.CSS_NUMBER_MODE + ] + } + ] + }, + { + className: "selector-tag", + begin: "\\b(" + TAGS.join("|") + ")\\b" + } + ] + }; +} + +// node_modules/highlight.js/es/languages/go.js +function go(hljs) { + const LITERALS3 = [ + "true", + "false", + "iota", + "nil" + ]; + const BUILT_INS3 = [ + "append", + "cap", + "close", + "complex", + "copy", + "imag", + "len", + "make", + "new", + "panic", + "print", + "println", + "real", + "recover", + "delete" + ]; + const TYPES3 = [ + "bool", + "byte", + "complex64", + "complex128", + "error", + "float32", + "float64", + "int8", + "int16", + "int32", + "int64", + "string", + "uint8", + "uint16", + "uint32", + "uint64", + "int", + "uint", + "uintptr", + "rune" + ]; + const KWS = [ + "break", + "case", + "chan", + "const", + "continue", + "default", + "defer", + "else", + "fallthrough", + "for", + "func", + "go", + "goto", + "if", + "import", + "interface", + "map", + "package", + "range", + "return", + "select", + "struct", + "switch", + "type", + "var" + ]; + const KEYWORDS3 = { + keyword: KWS, + type: TYPES3, + literal: LITERALS3, + built_in: BUILT_INS3 + }; + return { + name: "Go", + aliases: ["golang"], + keywords: KEYWORDS3, + illegal: " { + const tag = "", + end: "" + }; + const XML_SELF_CLOSING = /<[A-Za-z0-9\\._:-]+\s*\/>/; + const XML_TAG = { + begin: /<[A-Za-z0-9\\._:-]+/, + end: /\/[A-Za-z0-9\\._:-]+>|\/>/, + /** + * @param {RegExpMatchArray} match + * @param {CallbackResponse} response + */ + isTrulyOpeningTag: (match, response) => { + const afterMatchIndex = match[0].length + match.index; + const nextChar = match.input[afterMatchIndex]; + if ( + // HTML should not include another raw `<` inside a tag + // nested type? + // `>`, etc. + nextChar === "<" || // the , gives away that this is not HTML + // `` + nextChar === "," + ) { + response.ignoreMatch(); + return; + } + if (nextChar === ">") { + if (!hasClosingTag(match, { after: afterMatchIndex })) { + response.ignoreMatch(); + } + } + let m; + const afterMatch = match.input.substring(afterMatchIndex); + if (m = afterMatch.match(/^\s*=/)) { + response.ignoreMatch(); + return; + } + if (m = afterMatch.match(/^\s+extends\s+/)) { + if (m.index === 0) { + response.ignoreMatch(); + return; + } + } + } + }; + const KEYWORDS$1 = { + $pattern: IDENT_RE, + keyword: KEYWORDS, + literal: LITERALS, + built_in: BUILT_INS, + "variable.language": BUILT_IN_VARIABLES + }; + const decimalDigits = "[0-9](_?[0-9])*"; + const frac = `\\.(${decimalDigits})`; + const decimalInteger = `0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`; + const NUMBER = { + className: "number", + variants: [ + // DecimalLiteral + { begin: `(\\b(${decimalInteger})((${frac})|\\.)?|(${frac}))[eE][+-]?(${decimalDigits})\\b` }, + { begin: `\\b(${decimalInteger})\\b((${frac})\\b|\\.)?|(${frac})\\b` }, + // DecimalBigIntegerLiteral + { begin: `\\b(0|[1-9](_?[0-9])*)n\\b` }, + // NonDecimalIntegerLiteral + { begin: "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b" }, + { begin: "\\b0[bB][0-1](_?[0-1])*n?\\b" }, + { begin: "\\b0[oO][0-7](_?[0-7])*n?\\b" }, + // LegacyOctalIntegerLiteral (does not include underscore separators) + // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals + { begin: "\\b0[0-7]+n?\\b" } + ], + relevance: 0 + }; + const SUBST = { + className: "subst", + begin: "\\$\\{", + end: "\\}", + keywords: KEYWORDS$1, + contains: [] + // defined later + }; + const HTML_TEMPLATE = { + begin: ".?html`", + end: "", + starts: { + end: "`", + returnEnd: false, + contains: [ + hljs.BACKSLASH_ESCAPE, + SUBST + ], + subLanguage: "xml" + } + }; + const CSS_TEMPLATE = { + begin: ".?css`", + end: "", + starts: { + end: "`", + returnEnd: false, + contains: [ + hljs.BACKSLASH_ESCAPE, + SUBST + ], + subLanguage: "css" + } + }; + const GRAPHQL_TEMPLATE = { + begin: ".?gql`", + end: "", + starts: { + end: "`", + returnEnd: false, + contains: [ + hljs.BACKSLASH_ESCAPE, + SUBST + ], + subLanguage: "graphql" + } + }; + const TEMPLATE_STRING = { + className: "string", + begin: "`", + end: "`", + contains: [ + hljs.BACKSLASH_ESCAPE, + SUBST + ] + }; + const JSDOC_COMMENT = hljs.COMMENT( + /\/\*\*(?!\/)/, + "\\*/", + { + relevance: 0, + contains: [ + { + begin: "(?=@[A-Za-z]+)", + relevance: 0, + contains: [ + { + className: "doctag", + begin: "@[A-Za-z]+" + }, + { + className: "type", + begin: "\\{", + end: "\\}", + excludeEnd: true, + excludeBegin: true, + relevance: 0 + }, + { + className: "variable", + begin: IDENT_RE$1 + "(?=\\s*(-)|$)", + endsParent: true, + relevance: 0 + }, + // eat spaces (not newlines) so we can find + // types or variables + { + begin: /(?=[^\n])\s/, + relevance: 0 + } + ] + } + ] + } + ); + const COMMENT = { + className: "comment", + variants: [ + JSDOC_COMMENT, + hljs.C_BLOCK_COMMENT_MODE, + hljs.C_LINE_COMMENT_MODE + ] + }; + const SUBST_INTERNALS = [ + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + HTML_TEMPLATE, + CSS_TEMPLATE, + GRAPHQL_TEMPLATE, + TEMPLATE_STRING, + // Skip numbers when they are part of a variable name + { match: /\$\d+/ }, + NUMBER + // This is intentional: + // See https://github.com/highlightjs/highlight.js/issues/3288 + // hljs.REGEXP_MODE + ]; + SUBST.contains = SUBST_INTERNALS.concat({ + // we need to pair up {} inside our subst to prevent + // it from ending too early by matching another } + begin: /\{/, + end: /\}/, + keywords: KEYWORDS$1, + contains: [ + "self" + ].concat(SUBST_INTERNALS) + }); + const SUBST_AND_COMMENTS = [].concat(COMMENT, SUBST.contains); + const PARAMS_CONTAINS = SUBST_AND_COMMENTS.concat([ + // eat recursive parens in sub expressions + { + begin: /(\s*)\(/, + end: /\)/, + keywords: KEYWORDS$1, + contains: ["self"].concat(SUBST_AND_COMMENTS) + } + ]); + const PARAMS = { + className: "params", + // convert this to negative lookbehind in v12 + begin: /(\s*)\(/, + // to match the parms with + end: /\)/, + excludeBegin: true, + excludeEnd: true, + keywords: KEYWORDS$1, + contains: PARAMS_CONTAINS + }; + const CLASS_OR_EXTENDS = { + variants: [ + // class Car extends vehicle + { + match: [ + /class/, + /\s+/, + IDENT_RE$1, + /\s+/, + /extends/, + /\s+/, + regex.concat(IDENT_RE$1, "(", regex.concat(/\./, IDENT_RE$1), ")*") + ], + scope: { + 1: "keyword", + 3: "title.class", + 5: "keyword", + 7: "title.class.inherited" + } + }, + // class Car + { + match: [ + /class/, + /\s+/, + IDENT_RE$1 + ], + scope: { + 1: "keyword", + 3: "title.class" + } + } + ] + }; + const CLASS_REFERENCE = { + relevance: 0, + match: regex.either( + // Hard coded exceptions + /\bJSON/, + // Float32Array, OutT + /\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/, + // CSSFactory, CSSFactoryT + /\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/, + // FPs, FPsT + /\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/ + // P + // single letters are not highlighted + // BLAH + // this will be flagged as a UPPER_CASE_CONSTANT instead + ), + className: "title.class", + keywords: { + _: [ + // se we still get relevance credit for JS library classes + ...TYPES, + ...ERROR_TYPES + ] + } + }; + const USE_STRICT = { + label: "use_strict", + className: "meta", + relevance: 10, + begin: /^\s*['"]use (strict|asm)['"]/ + }; + const FUNCTION_DEFINITION = { + variants: [ + { + match: [ + /function/, + /\s+/, + IDENT_RE$1, + /(?=\s*\()/ + ] + }, + // anonymous function + { + match: [ + /function/, + /\s*(?=\()/ + ] + } + ], + className: { + 1: "keyword", + 3: "title.function" + }, + label: "func.def", + contains: [PARAMS], + illegal: /%/ + }; + const UPPER_CASE_CONSTANT = { + relevance: 0, + match: /\b[A-Z][A-Z_0-9]+\b/, + className: "variable.constant" + }; + function noneOf(list) { + return regex.concat("(?!", list.join("|"), ")"); + } + const FUNCTION_CALL = { + match: regex.concat( + /\b/, + noneOf([ + ...BUILT_IN_GLOBALS, + "super", + "import" + ].map((x) => `${x}\\s*\\(`)), + IDENT_RE$1, + regex.lookahead(/\s*\(/) + ), + className: "title.function", + relevance: 0 + }; + const PROPERTY_ACCESS = { + begin: regex.concat(/\./, regex.lookahead( + regex.concat(IDENT_RE$1, /(?![0-9A-Za-z$_(])/) + )), + end: IDENT_RE$1, + excludeBegin: true, + keywords: "prototype", + className: "property", + relevance: 0 + }; + const GETTER_OR_SETTER = { + match: [ + /get|set/, + /\s+/, + IDENT_RE$1, + /(?=\()/ + ], + className: { + 1: "keyword", + 3: "title.function" + }, + contains: [ + { + // eat to avoid empty params + begin: /\(\)/ + }, + PARAMS + ] + }; + const FUNC_LEAD_IN_RE = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + hljs.UNDERSCORE_IDENT_RE + ")\\s*=>"; + const FUNCTION_VARIABLE = { + match: [ + /const|var|let/, + /\s+/, + IDENT_RE$1, + /\s*/, + /=\s*/, + /(async\s*)?/, + // async is optional + regex.lookahead(FUNC_LEAD_IN_RE) + ], + keywords: "async", + className: { + 1: "keyword", + 3: "title.function" + }, + contains: [ + PARAMS + ] + }; + return { + name: "JavaScript", + aliases: ["js", "jsx", "mjs", "cjs"], + keywords: KEYWORDS$1, + // this will be extended by TypeScript + exports: { PARAMS_CONTAINS, CLASS_REFERENCE }, + illegal: /#(?![$_A-z])/, + contains: [ + hljs.SHEBANG({ + label: "shebang", + binary: "node", + relevance: 5 + }), + USE_STRICT, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + HTML_TEMPLATE, + CSS_TEMPLATE, + GRAPHQL_TEMPLATE, + TEMPLATE_STRING, + COMMENT, + // Skip numbers when they are part of a variable name + { match: /\$\d+/ }, + NUMBER, + CLASS_REFERENCE, + { + scope: "attr", + match: IDENT_RE$1 + regex.lookahead(":"), + relevance: 0 + }, + FUNCTION_VARIABLE, + { + // "value" container + begin: "(" + hljs.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*", + keywords: "return throw case", + relevance: 0, + contains: [ + COMMENT, + hljs.REGEXP_MODE, + { + className: "function", + // we have to count the parens to make sure we actually have the + // correct bounding ( ) before the =>. There could be any number of + // sub-expressions inside also surrounded by parens. + begin: FUNC_LEAD_IN_RE, + returnBegin: true, + end: "\\s*=>", + contains: [ + { + className: "params", + variants: [ + { + begin: hljs.UNDERSCORE_IDENT_RE, + relevance: 0 + }, + { + className: null, + begin: /\(\s*\)/, + skip: true + }, + { + begin: /(\s*)\(/, + end: /\)/, + excludeBegin: true, + excludeEnd: true, + keywords: KEYWORDS$1, + contains: PARAMS_CONTAINS + } + ] + } + ] + }, + { + // could be a comma delimited list of params to a function call + begin: /,/, + relevance: 0 + }, + { + match: /\s+/, + relevance: 0 + }, + { + // JSX + variants: [ + { begin: FRAGMENT.begin, end: FRAGMENT.end }, + { match: XML_SELF_CLOSING }, + { + begin: XML_TAG.begin, + // we carefully check the opening tag to see if it truly + // is a tag and not a false positive + "on:begin": XML_TAG.isTrulyOpeningTag, + end: XML_TAG.end + } + ], + subLanguage: "xml", + contains: [ + { + begin: XML_TAG.begin, + end: XML_TAG.end, + skip: true, + contains: ["self"] + } + ] + } + ] + }, + FUNCTION_DEFINITION, + { + // prevent this from getting swallowed up by function + // since they appear "function like" + beginKeywords: "while if switch catch for" + }, + { + // we have to count the parens to make sure we actually have the correct + // bounding ( ). There could be any number of sub-expressions inside + // also surrounded by parens. + begin: "\\b(?!function)" + hljs.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", + // end parens + returnBegin: true, + label: "func.def", + contains: [ + PARAMS, + hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1, className: "title.function" }) + ] + }, + // catch ... so it won't trigger the property rule below + { + match: /\.\.\./, + relevance: 0 + }, + PROPERTY_ACCESS, + // hack: prevents detection of keywords in some circumstances + // .keyword() + // $keyword = x + { + match: "\\$" + IDENT_RE$1, + relevance: 0 + }, + { + match: [/\bconstructor(?=\s*\()/], + className: { 1: "title.function" }, + contains: [PARAMS] + }, + FUNCTION_CALL, + UPPER_CASE_CONSTANT, + CLASS_OR_EXTENDS, + GETTER_OR_SETTER, + { + match: /\$[(.]/ + // relevance booster for a pattern common to JS libs: `$(something)` and `$.something` + } + ] + }; +} + +// node_modules/highlight.js/es/languages/json.js +function json(hljs) { + const ATTRIBUTE = { + className: "attr", + begin: /"(\\.|[^\\"\r\n])*"(?=\s*:)/, + relevance: 1.01 + }; + const PUNCTUATION = { + match: /[{}[\],:]/, + className: "punctuation", + relevance: 0 + }; + const LITERALS3 = [ + "true", + "false", + "null" + ]; + const LITERALS_MODE = { + scope: "literal", + beginKeywords: LITERALS3.join(" ") + }; + return { + name: "JSON", + aliases: ["jsonc"], + keywords: { + literal: LITERALS3 + }, + contains: [ + ATTRIBUTE, + PUNCTUATION, + hljs.QUOTE_STRING_MODE, + LITERALS_MODE, + hljs.C_NUMBER_MODE, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE + ], + illegal: "\\S" + }; +} + +// node_modules/highlight.js/es/languages/markdown.js +function markdown(hljs) { + const regex = hljs.regex; + const INLINE_HTML = { + begin: /<\/?[A-Za-z_]/, + end: ">", + subLanguage: "xml", + relevance: 0 + }; + const HORIZONTAL_RULE = { + begin: "^[-\\*]{3,}", + end: "$" + }; + const CODE = { + className: "code", + variants: [ + // TODO: fix to allow these to work with sublanguage also + { begin: "(`{3,})[^`](.|\\n)*?\\1`*[ ]*" }, + { begin: "(~{3,})[^~](.|\\n)*?\\1~*[ ]*" }, + // needed to allow markdown as a sublanguage to work + { + begin: "```", + end: "```+[ ]*$" + }, + { + begin: "~~~", + end: "~~~+[ ]*$" + }, + { begin: "`.+?`" }, + { + begin: "(?=^( {4}|\\t))", + // use contains to gobble up multiple lines to allow the block to be whatever size + // but only have a single open/close tag vs one per line + contains: [ + { + begin: "^( {4}|\\t)", + end: "(\\n)$" + } + ], + relevance: 0 + } + ] + }; + const LIST = { + className: "bullet", + begin: "^[ ]*([*+-]|(\\d+\\.))(?=\\s+)", + end: "\\s+", + excludeEnd: true + }; + const LINK_REFERENCE = { + begin: /^\[[^\n]+\]:/, + returnBegin: true, + contains: [ + { + className: "symbol", + begin: /\[/, + end: /\]/, + excludeBegin: true, + excludeEnd: true + }, + { + className: "link", + begin: /:\s*/, + end: /$/, + excludeBegin: true + } + ] + }; + const URL_SCHEME = /[A-Za-z][A-Za-z0-9+.-]*/; + const LINK = { + variants: [ + // too much like nested array access in so many languages + // to have any real relevance + { + begin: /\[.+?\]\[.*?\]/, + relevance: 0 + }, + // popular internet URLs + { + begin: /\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/, + relevance: 2 + }, + { + begin: regex.concat(/\[.+?\]\(/, URL_SCHEME, /:\/\/.*?\)/), + relevance: 2 + }, + // relative urls + { + begin: /\[.+?\]\([./?&#].*?\)/, + relevance: 1 + }, + // whatever else, lower relevance (might not be a link at all) + { + begin: /\[.*?\]\(.*?\)/, + relevance: 0 + } + ], + returnBegin: true, + contains: [ + { + // empty strings for alt or link text + match: /\[(?=\])/ + }, + { + className: "string", + relevance: 0, + begin: "\\[", + end: "\\]", + excludeBegin: true, + returnEnd: true + }, + { + className: "link", + relevance: 0, + begin: "\\]\\(", + end: "\\)", + excludeBegin: true, + excludeEnd: true + }, + { + className: "symbol", + relevance: 0, + begin: "\\]\\[", + end: "\\]", + excludeBegin: true, + excludeEnd: true + } + ] + }; + const BOLD = { + className: "strong", + contains: [], + // defined later + variants: [ + { + begin: /_{2}(?!\s)/, + end: /_{2}/ + }, + { + begin: /\*{2}(?!\s)/, + end: /\*{2}/ + } + ] + }; + const ITALIC = { + className: "emphasis", + contains: [], + // defined later + variants: [ + { + begin: /\*(?![*\s])/, + end: /\*/ + }, + { + begin: /_(?![_\s])/, + end: /_/, + relevance: 0 + } + ] + }; + const BOLD_WITHOUT_ITALIC = hljs.inherit(BOLD, { contains: [] }); + const ITALIC_WITHOUT_BOLD = hljs.inherit(ITALIC, { contains: [] }); + BOLD.contains.push(ITALIC_WITHOUT_BOLD); + ITALIC.contains.push(BOLD_WITHOUT_ITALIC); + let CONTAINABLE = [ + INLINE_HTML, + LINK + ]; + [ + BOLD, + ITALIC, + BOLD_WITHOUT_ITALIC, + ITALIC_WITHOUT_BOLD + ].forEach((m) => { + m.contains = m.contains.concat(CONTAINABLE); + }); + CONTAINABLE = CONTAINABLE.concat(BOLD, ITALIC); + const HEADER = { + className: "section", + variants: [ + { + begin: "^#{1,6}", + end: "$", + contains: CONTAINABLE + }, + { + begin: "(?=^.+?\\n[=-]{2,}$)", + contains: [ + { begin: "^[=-]*$" }, + { + begin: "^", + end: "\\n", + contains: CONTAINABLE + } + ] + } + ] + }; + const BLOCKQUOTE = { + className: "quote", + begin: "^>\\s+", + contains: CONTAINABLE, + end: "$" + }; + const ENTITY = { + //https://spec.commonmark.org/0.31.2/#entity-references + scope: "literal", + match: /&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/ + }; + return { + name: "Markdown", + aliases: [ + "md", + "mkdown", + "mkd" + ], + contains: [ + HEADER, + INLINE_HTML, + LIST, + BOLD, + ITALIC, + BLOCKQUOTE, + CODE, + HORIZONTAL_RULE, + LINK, + LINK_REFERENCE, + ENTITY + ] + }; +} + +// node_modules/highlight.js/es/languages/python.js +function python(hljs) { + const regex = hljs.regex; + const IDENT_RE3 = /[\p{XID_Start}_]\p{XID_Continue}*/u; + const RESERVED_WORDS = [ + "and", + "as", + "assert", + "async", + "await", + "break", + "case", + "class", + "continue", + "def", + "del", + "elif", + "else", + "except", + "finally", + "for", + "from", + "global", + "if", + "import", + "in", + "is", + "lambda", + "match", + "nonlocal|10", + "not", + "or", + "pass", + "raise", + "return", + "try", + "while", + "with", + "yield" + ]; + const BUILT_INS3 = [ + "__import__", + "abs", + "all", + "any", + "ascii", + "bin", + "bool", + "breakpoint", + "bytearray", + "bytes", + "callable", + "chr", + "classmethod", + "compile", + "complex", + "delattr", + "dict", + "dir", + "divmod", + "enumerate", + "eval", + "exec", + "filter", + "float", + "format", + "frozenset", + "getattr", + "globals", + "hasattr", + "hash", + "help", + "hex", + "id", + "input", + "int", + "isinstance", + "issubclass", + "iter", + "len", + "list", + "locals", + "map", + "max", + "memoryview", + "min", + "next", + "object", + "oct", + "open", + "ord", + "pow", + "print", + "property", + "range", + "repr", + "reversed", + "round", + "set", + "setattr", + "slice", + "sorted", + "staticmethod", + "str", + "sum", + "super", + "tuple", + "type", + "vars", + "zip" + ]; + const LITERALS3 = [ + "__debug__", + "Ellipsis", + "False", + "None", + "NotImplemented", + "True" + ]; + const TYPES3 = [ + "Any", + "Callable", + "Coroutine", + "Dict", + "List", + "Literal", + "Generic", + "Optional", + "Sequence", + "Set", + "Tuple", + "Type", + "Union" + ]; + const KEYWORDS3 = { + $pattern: /[A-Za-z]\w+|__\w+__/, + keyword: RESERVED_WORDS, + built_in: BUILT_INS3, + literal: LITERALS3, + type: TYPES3 + }; + const PROMPT = { + className: "meta", + begin: /^(>>>|\.\.\.) / + }; + const SUBST = { + className: "subst", + begin: /\{/, + end: /\}/, + keywords: KEYWORDS3, + illegal: /#/ + }; + const LITERAL_BRACKET = { + begin: /\{\{/, + relevance: 0 + }; + const STRING = { + className: "string", + contains: [hljs.BACKSLASH_ESCAPE], + variants: [ + { + begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/, + end: /'''/, + contains: [ + hljs.BACKSLASH_ESCAPE, + PROMPT + ], + relevance: 10 + }, + { + begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/, + end: /"""/, + contains: [ + hljs.BACKSLASH_ESCAPE, + PROMPT + ], + relevance: 10 + }, + { + begin: /([fF][rR]|[rR][fF]|[fF])'''/, + end: /'''/, + contains: [ + hljs.BACKSLASH_ESCAPE, + PROMPT, + LITERAL_BRACKET, + SUBST + ] + }, + { + begin: /([fF][rR]|[rR][fF]|[fF])"""/, + end: /"""/, + contains: [ + hljs.BACKSLASH_ESCAPE, + PROMPT, + LITERAL_BRACKET, + SUBST + ] + }, + { + begin: /([uU]|[rR])'/, + end: /'/, + relevance: 10 + }, + { + begin: /([uU]|[rR])"/, + end: /"/, + relevance: 10 + }, + { + begin: /([bB]|[bB][rR]|[rR][bB])'/, + end: /'/ + }, + { + begin: /([bB]|[bB][rR]|[rR][bB])"/, + end: /"/ + }, + { + begin: /([fF][rR]|[rR][fF]|[fF])'/, + end: /'/, + contains: [ + hljs.BACKSLASH_ESCAPE, + LITERAL_BRACKET, + SUBST + ] + }, + { + begin: /([fF][rR]|[rR][fF]|[fF])"/, + end: /"/, + contains: [ + hljs.BACKSLASH_ESCAPE, + LITERAL_BRACKET, + SUBST + ] + }, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE + ] + }; + const digitpart = "[0-9](_?[0-9])*"; + const pointfloat = `(\\b(${digitpart}))?\\.(${digitpart})|\\b(${digitpart})\\.`; + const lookahead = `\\b|${RESERVED_WORDS.join("|")}`; + const NUMBER = { + className: "number", + relevance: 0, + variants: [ + // exponentfloat, pointfloat + // https://docs.python.org/3.9/reference/lexical_analysis.html#floating-point-literals + // optionally imaginary + // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals + // Note: no leading \b because floats can start with a decimal point + // and we don't want to mishandle e.g. `fn(.5)`, + // no trailing \b for pointfloat because it can end with a decimal point + // and we don't want to mishandle e.g. `0..hex()`; this should be safe + // because both MUST contain a decimal point and so cannot be confused with + // the interior part of an identifier + { + begin: `(\\b(${digitpart})|(${pointfloat}))[eE][+-]?(${digitpart})[jJ]?(?=${lookahead})` + }, + { + begin: `(${pointfloat})[jJ]?` + }, + // decinteger, bininteger, octinteger, hexinteger + // https://docs.python.org/3.9/reference/lexical_analysis.html#integer-literals + // optionally "long" in Python 2 + // https://docs.python.org/2.7/reference/lexical_analysis.html#integer-and-long-integer-literals + // decinteger is optionally imaginary + // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals + { + begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${lookahead})` + }, + { + begin: `\\b0[bB](_?[01])+[lL]?(?=${lookahead})` + }, + { + begin: `\\b0[oO](_?[0-7])+[lL]?(?=${lookahead})` + }, + { + begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${lookahead})` + }, + // imagnumber (digitpart-based) + // https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals + { + begin: `\\b(${digitpart})[jJ](?=${lookahead})` + } + ] + }; + const COMMENT_TYPE = { + className: "comment", + begin: regex.lookahead(/# type:/), + end: /$/, + keywords: KEYWORDS3, + contains: [ + { + // prevent keywords from coloring `type` + begin: /# type:/ + }, + // comment within a datatype comment includes no keywords + { + begin: /#/, + end: /\b\B/, + endsWithParent: true + } + ] + }; + const PARAMS = { + className: "params", + variants: [ + // Exclude params in functions without params + { + className: "", + begin: /\(\s*\)/, + skip: true + }, + { + begin: /\(/, + end: /\)/, + excludeBegin: true, + excludeEnd: true, + keywords: KEYWORDS3, + contains: [ + "self", + PROMPT, + NUMBER, + STRING, + hljs.HASH_COMMENT_MODE + ] + } + ] + }; + SUBST.contains = [ + STRING, + NUMBER, + PROMPT + ]; + return { + name: "Python", + aliases: [ + "py", + "gyp", + "ipython" + ], + unicodeRegex: true, + keywords: KEYWORDS3, + illegal: /(<\/|\?)|=>/, + contains: [ + PROMPT, + NUMBER, + { + // very common convention + scope: "variable.language", + match: /\bself\b/ + }, + { + // eat "if" prior to string so that it won't accidentally be + // labeled as an f-string + beginKeywords: "if", + relevance: 0 + }, + { match: /\bor\b/, scope: "keyword" }, + STRING, + COMMENT_TYPE, + hljs.HASH_COMMENT_MODE, + { + match: [ + /\bdef/, + /\s+/, + IDENT_RE3 + ], + scope: { + 1: "keyword", + 3: "title.function" + }, + contains: [PARAMS] + }, + { + variants: [ + { + match: [ + /\bclass/, + /\s+/, + IDENT_RE3, + /\s*/, + /\(\s*/, + IDENT_RE3, + /\s*\)/ + ] + }, + { + match: [ + /\bclass/, + /\s+/, + IDENT_RE3 + ] + } + ], + scope: { + 1: "keyword", + 3: "title.class", + 6: "title.class.inherited" + } + }, + { + className: "meta", + begin: /^[\t ]*@/, + end: /(?=#)|$/, + contains: [ + NUMBER, + PARAMS, + STRING + ] + } + ] + }; +} + +// node_modules/highlight.js/es/languages/rust.js +function rust(hljs) { + const regex = hljs.regex; + const RAW_IDENTIFIER = /(r#)?/; + const UNDERSCORE_IDENT_RE = regex.concat(RAW_IDENTIFIER, hljs.UNDERSCORE_IDENT_RE); + const IDENT_RE3 = regex.concat(RAW_IDENTIFIER, hljs.IDENT_RE); + const FUNCTION_INVOKE = { + className: "title.function.invoke", + relevance: 0, + begin: regex.concat( + /\b/, + /(?!let|for|while|if|else|match\b)/, + IDENT_RE3, + regex.lookahead(/\s*\(/) + ) + }; + const NUMBER_SUFFIX = "([ui](8|16|32|64|128|size)|f(32|64))?"; + const KEYWORDS3 = [ + "abstract", + "as", + "async", + "await", + "become", + "box", + "break", + "const", + "continue", + "crate", + "do", + "dyn", + "else", + "enum", + "extern", + "false", + "final", + "fn", + "for", + "if", + "impl", + "in", + "let", + "loop", + "macro", + "match", + "mod", + "move", + "mut", + "override", + "priv", + "pub", + "ref", + "return", + "self", + "Self", + "static", + "struct", + "super", + "trait", + "true", + "try", + "type", + "typeof", + "union", + "unsafe", + "unsized", + "use", + "virtual", + "where", + "while", + "yield" + ]; + const LITERALS3 = [ + "true", + "false", + "Some", + "None", + "Ok", + "Err" + ]; + const BUILTINS = [ + // functions + "drop ", + // traits + "Copy", + "Send", + "Sized", + "Sync", + "Drop", + "Fn", + "FnMut", + "FnOnce", + "ToOwned", + "Clone", + "Debug", + "PartialEq", + "PartialOrd", + "Eq", + "Ord", + "AsRef", + "AsMut", + "Into", + "From", + "Default", + "Iterator", + "Extend", + "IntoIterator", + "DoubleEndedIterator", + "ExactSizeIterator", + "SliceConcatExt", + "ToString", + // macros + "assert!", + "assert_eq!", + "bitflags!", + "bytes!", + "cfg!", + "col!", + "concat!", + "concat_idents!", + "debug_assert!", + "debug_assert_eq!", + "env!", + "eprintln!", + "panic!", + "file!", + "format!", + "format_args!", + "include_bytes!", + "include_str!", + "line!", + "local_data_key!", + "module_path!", + "option_env!", + "print!", + "println!", + "select!", + "stringify!", + "try!", + "unimplemented!", + "unreachable!", + "vec!", + "write!", + "writeln!", + "macro_rules!", + "assert_ne!", + "debug_assert_ne!" + ]; + const TYPES3 = [ + "i8", + "i16", + "i32", + "i64", + "i128", + "isize", + "u8", + "u16", + "u32", + "u64", + "u128", + "usize", + "f32", + "f64", + "str", + "char", + "bool", + "Box", + "Option", + "Result", + "String", + "Vec" + ]; + return { + name: "Rust", + aliases: ["rs"], + keywords: { + $pattern: hljs.IDENT_RE + "!?", + type: TYPES3, + keyword: KEYWORDS3, + literal: LITERALS3, + built_in: BUILTINS + }, + illegal: "" + }, + FUNCTION_INVOKE + ] + }; +} + +// node_modules/highlight.js/es/languages/shell.js +function shell(hljs) { + return { + name: "Shell Session", + aliases: [ + "console", + "shellsession" + ], + contains: [ + { + className: "meta.prompt", + // We cannot add \s (spaces) in the regular expression otherwise it will be too broad and produce unexpected result. + // For instance, in the following example, it would match "echo /path/to/home >" as a prompt: + // echo /path/to/home > t.exe + begin: /^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/, + starts: { + end: /[^\\](?=\s*$)/, + subLanguage: "bash" + } + } + ] + }; +} + +// node_modules/highlight.js/es/languages/sql.js +function sql(hljs) { + const regex = hljs.regex; + const COMMENT_MODE = hljs.COMMENT("--", "$"); + const STRING = { + scope: "string", + variants: [ + { + begin: /'/, + end: /'/, + contains: [{ match: /''/ }] + } + ] + }; + const QUOTED_IDENTIFIER = { + begin: /"/, + end: /"/, + contains: [{ match: /""/ }] + }; + const LITERALS3 = [ + "true", + "false", + // Not sure it's correct to call NULL literal, and clauses like IS [NOT] NULL look strange that way. + // "null", + "unknown" + ]; + const MULTI_WORD_TYPES = [ + "double precision", + "large object", + "with timezone", + "without timezone" + ]; + const TYPES3 = [ + "bigint", + "binary", + "blob", + "boolean", + "char", + "character", + "clob", + "date", + "dec", + "decfloat", + "decimal", + "float", + "int", + "integer", + "interval", + "nchar", + "nclob", + "national", + "numeric", + "real", + "row", + "smallint", + "time", + "timestamp", + "varchar", + "varying", + // modifier (character varying) + "varbinary" + ]; + const NON_RESERVED_WORDS = [ + "add", + "asc", + "collation", + "desc", + "final", + "first", + "last", + "view" + ]; + const RESERVED_WORDS = [ + "abs", + "acos", + "all", + "allocate", + "alter", + "and", + "any", + "are", + "array", + "array_agg", + "array_max_cardinality", + "as", + "asensitive", + "asin", + "asymmetric", + "at", + "atan", + "atomic", + "authorization", + "avg", + "begin", + "begin_frame", + "begin_partition", + "between", + "bigint", + "binary", + "blob", + "boolean", + "both", + "by", + "call", + "called", + "cardinality", + "cascaded", + "case", + "cast", + "ceil", + "ceiling", + "char", + "char_length", + "character", + "character_length", + "check", + "classifier", + "clob", + "close", + "coalesce", + "collate", + "collect", + "column", + "commit", + "condition", + "connect", + "constraint", + "contains", + "convert", + "copy", + "corr", + "corresponding", + "cos", + "cosh", + "count", + "covar_pop", + "covar_samp", + "create", + "cross", + "cube", + "cume_dist", + "current", + "current_catalog", + "current_date", + "current_default_transform_group", + "current_path", + "current_role", + "current_row", + "current_schema", + "current_time", + "current_timestamp", + "current_path", + "current_role", + "current_transform_group_for_type", + "current_user", + "cursor", + "cycle", + "date", + "day", + "deallocate", + "dec", + "decimal", + "decfloat", + "declare", + "default", + "define", + "delete", + "dense_rank", + "deref", + "describe", + "deterministic", + "disconnect", + "distinct", + "double", + "drop", + "dynamic", + "each", + "element", + "else", + "empty", + "end", + "end_frame", + "end_partition", + "end-exec", + "equals", + "escape", + "every", + "except", + "exec", + "execute", + "exists", + "exp", + "external", + "extract", + "false", + "fetch", + "filter", + "first_value", + "float", + "floor", + "for", + "foreign", + "frame_row", + "free", + "from", + "full", + "function", + "fusion", + "get", + "global", + "grant", + "group", + "grouping", + "groups", + "having", + "hold", + "hour", + "identity", + "in", + "indicator", + "initial", + "inner", + "inout", + "insensitive", + "insert", + "int", + "integer", + "intersect", + "intersection", + "interval", + "into", + "is", + "join", + "json_array", + "json_arrayagg", + "json_exists", + "json_object", + "json_objectagg", + "json_query", + "json_table", + "json_table_primitive", + "json_value", + "lag", + "language", + "large", + "last_value", + "lateral", + "lead", + "leading", + "left", + "like", + "like_regex", + "listagg", + "ln", + "local", + "localtime", + "localtimestamp", + "log", + "log10", + "lower", + "match", + "match_number", + "match_recognize", + "matches", + "max", + "member", + "merge", + "method", + "min", + "minute", + "mod", + "modifies", + "module", + "month", + "multiset", + "national", + "natural", + "nchar", + "nclob", + "new", + "no", + "none", + "normalize", + "not", + "nth_value", + "ntile", + "null", + "nullif", + "numeric", + "octet_length", + "occurrences_regex", + "of", + "offset", + "old", + "omit", + "on", + "one", + "only", + "open", + "or", + "order", + "out", + "outer", + "over", + "overlaps", + "overlay", + "parameter", + "partition", + "pattern", + "per", + "percent", + "percent_rank", + "percentile_cont", + "percentile_disc", + "period", + "portion", + "position", + "position_regex", + "power", + "precedes", + "precision", + "prepare", + "primary", + "procedure", + "ptf", + "range", + "rank", + "reads", + "real", + "recursive", + "ref", + "references", + "referencing", + "regr_avgx", + "regr_avgy", + "regr_count", + "regr_intercept", + "regr_r2", + "regr_slope", + "regr_sxx", + "regr_sxy", + "regr_syy", + "release", + "result", + "return", + "returns", + "revoke", + "right", + "rollback", + "rollup", + "row", + "row_number", + "rows", + "running", + "savepoint", + "scope", + "scroll", + "search", + "second", + "seek", + "select", + "sensitive", + "session_user", + "set", + "show", + "similar", + "sin", + "sinh", + "skip", + "smallint", + "some", + "specific", + "specifictype", + "sql", + "sqlexception", + "sqlstate", + "sqlwarning", + "sqrt", + "start", + "static", + "stddev_pop", + "stddev_samp", + "submultiset", + "subset", + "substring", + "substring_regex", + "succeeds", + "sum", + "symmetric", + "system", + "system_time", + "system_user", + "table", + "tablesample", + "tan", + "tanh", + "then", + "time", + "timestamp", + "timezone_hour", + "timezone_minute", + "to", + "trailing", + "translate", + "translate_regex", + "translation", + "treat", + "trigger", + "trim", + "trim_array", + "true", + "truncate", + "uescape", + "union", + "unique", + "unknown", + "unnest", + "update", + "upper", + "user", + "using", + "value", + "values", + "value_of", + "var_pop", + "var_samp", + "varbinary", + "varchar", + "varying", + "versioning", + "when", + "whenever", + "where", + "width_bucket", + "window", + "with", + "within", + "without", + "year" + ]; + const RESERVED_FUNCTIONS = [ + "abs", + "acos", + "array_agg", + "asin", + "atan", + "avg", + "cast", + "ceil", + "ceiling", + "coalesce", + "corr", + "cos", + "cosh", + "count", + "covar_pop", + "covar_samp", + "cume_dist", + "dense_rank", + "deref", + "element", + "exp", + "extract", + "first_value", + "floor", + "json_array", + "json_arrayagg", + "json_exists", + "json_object", + "json_objectagg", + "json_query", + "json_table", + "json_table_primitive", + "json_value", + "lag", + "last_value", + "lead", + "listagg", + "ln", + "log", + "log10", + "lower", + "max", + "min", + "mod", + "nth_value", + "ntile", + "nullif", + "percent_rank", + "percentile_cont", + "percentile_disc", + "position", + "position_regex", + "power", + "rank", + "regr_avgx", + "regr_avgy", + "regr_count", + "regr_intercept", + "regr_r2", + "regr_slope", + "regr_sxx", + "regr_sxy", + "regr_syy", + "row_number", + "sin", + "sinh", + "sqrt", + "stddev_pop", + "stddev_samp", + "substring", + "substring_regex", + "sum", + "tan", + "tanh", + "translate", + "translate_regex", + "treat", + "trim", + "trim_array", + "unnest", + "upper", + "value_of", + "var_pop", + "var_samp", + "width_bucket" + ]; + const POSSIBLE_WITHOUT_PARENS = [ + "current_catalog", + "current_date", + "current_default_transform_group", + "current_path", + "current_role", + "current_schema", + "current_transform_group_for_type", + "current_user", + "session_user", + "system_time", + "system_user", + "current_time", + "localtime", + "current_timestamp", + "localtimestamp" + ]; + const COMBOS = [ + "create table", + "insert into", + "primary key", + "foreign key", + "not null", + "alter table", + "add constraint", + "grouping sets", + "on overflow", + "character set", + "respect nulls", + "ignore nulls", + "nulls first", + "nulls last", + "depth first", + "breadth first" + ]; + const FUNCTIONS = RESERVED_FUNCTIONS; + const KEYWORDS3 = [ + ...RESERVED_WORDS, + ...NON_RESERVED_WORDS + ].filter((keyword) => { + return !RESERVED_FUNCTIONS.includes(keyword); + }); + const VARIABLE = { + scope: "variable", + match: /@[a-z0-9][a-z0-9_]*/ + }; + const OPERATOR = { + scope: "operator", + match: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/, + relevance: 0 + }; + const FUNCTION_CALL = { + match: regex.concat(/\b/, regex.either(...FUNCTIONS), /\s*\(/), + relevance: 0, + keywords: { built_in: FUNCTIONS } + }; + function kws_to_regex(list) { + return regex.concat( + /\b/, + regex.either(...list.map((kw) => { + return kw.replace(/\s+/, "\\s+"); + })), + /\b/ + ); + } + const MULTI_WORD_KEYWORDS = { + scope: "keyword", + match: kws_to_regex(COMBOS), + relevance: 0 + }; + function reduceRelevancy(list, { + exceptions, + when + } = {}) { + const qualifyFn = when; + exceptions = exceptions || []; + return list.map((item) => { + if (item.match(/\|\d+$/) || exceptions.includes(item)) { + return item; + } else if (qualifyFn(item)) { + return `${item}|0`; + } else { + return item; + } + }); + } + return { + name: "SQL", + case_insensitive: true, + // does not include {} or HTML tags ` x.length < 3 }), + literal: LITERALS3, + type: TYPES3, + built_in: POSSIBLE_WITHOUT_PARENS + }, + contains: [ + { + scope: "type", + match: kws_to_regex(MULTI_WORD_TYPES) + }, + MULTI_WORD_KEYWORDS, + FUNCTION_CALL, + VARIABLE, + STRING, + QUOTED_IDENTIFIER, + hljs.C_NUMBER_MODE, + hljs.C_BLOCK_COMMENT_MODE, + COMMENT_MODE, + OPERATOR + ] + }; +} + +// node_modules/highlight.js/es/languages/typescript.js +var IDENT_RE2 = "[A-Za-z$_][0-9A-Za-z$_]*"; +var KEYWORDS2 = [ + "as", + // for exports + "in", + "of", + "if", + "for", + "while", + "finally", + "var", + "new", + "function", + "do", + "return", + "void", + "else", + "break", + "catch", + "instanceof", + "with", + "throw", + "case", + "default", + "try", + "switch", + "continue", + "typeof", + "delete", + "let", + "yield", + "const", + "class", + // JS handles these with a special rule + // "get", + // "set", + "debugger", + "async", + "await", + "static", + "import", + "from", + "export", + "extends", + // It's reached stage 3, which is "recommended for implementation": + "using" +]; +var LITERALS2 = [ + "true", + "false", + "null", + "undefined", + "NaN", + "Infinity" +]; +var TYPES2 = [ + // Fundamental objects + "Object", + "Function", + "Boolean", + "Symbol", + // numbers and dates + "Math", + "Date", + "Number", + "BigInt", + // text + "String", + "RegExp", + // Indexed collections + "Array", + "Float32Array", + "Float64Array", + "Int8Array", + "Uint8Array", + "Uint8ClampedArray", + "Int16Array", + "Int32Array", + "Uint16Array", + "Uint32Array", + "BigInt64Array", + "BigUint64Array", + // Keyed collections + "Set", + "Map", + "WeakSet", + "WeakMap", + // Structured data + "ArrayBuffer", + "SharedArrayBuffer", + "Atomics", + "DataView", + "JSON", + // Control abstraction objects + "Promise", + "Generator", + "GeneratorFunction", + "AsyncFunction", + // Reflection + "Reflect", + "Proxy", + // Internationalization + "Intl", + // WebAssembly + "WebAssembly" +]; +var ERROR_TYPES2 = [ + "Error", + "EvalError", + "InternalError", + "RangeError", + "ReferenceError", + "SyntaxError", + "TypeError", + "URIError" +]; +var BUILT_IN_GLOBALS2 = [ + "setInterval", + "setTimeout", + "clearInterval", + "clearTimeout", + "require", + "exports", + "eval", + "isFinite", + "isNaN", + "parseFloat", + "parseInt", + "decodeURI", + "decodeURIComponent", + "encodeURI", + "encodeURIComponent", + "escape", + "unescape" +]; +var BUILT_IN_VARIABLES2 = [ + "arguments", + "this", + "super", + "console", + "window", + "document", + "localStorage", + "sessionStorage", + "module", + "global" + // Node.js +]; +var BUILT_INS2 = [].concat( + BUILT_IN_GLOBALS2, + TYPES2, + ERROR_TYPES2 +); +function javascript2(hljs) { + const regex = hljs.regex; + const hasClosingTag = (match, { after }) => { + const tag = "", + end: "" + }; + const XML_SELF_CLOSING = /<[A-Za-z0-9\\._:-]+\s*\/>/; + const XML_TAG = { + begin: /<[A-Za-z0-9\\._:-]+/, + end: /\/[A-Za-z0-9\\._:-]+>|\/>/, + /** + * @param {RegExpMatchArray} match + * @param {CallbackResponse} response + */ + isTrulyOpeningTag: (match, response) => { + const afterMatchIndex = match[0].length + match.index; + const nextChar = match.input[afterMatchIndex]; + if ( + // HTML should not include another raw `<` inside a tag + // nested type? + // `>`, etc. + nextChar === "<" || // the , gives away that this is not HTML + // `` + nextChar === "," + ) { + response.ignoreMatch(); + return; + } + if (nextChar === ">") { + if (!hasClosingTag(match, { after: afterMatchIndex })) { + response.ignoreMatch(); + } + } + let m; + const afterMatch = match.input.substring(afterMatchIndex); + if (m = afterMatch.match(/^\s*=/)) { + response.ignoreMatch(); + return; + } + if (m = afterMatch.match(/^\s+extends\s+/)) { + if (m.index === 0) { + response.ignoreMatch(); + return; + } + } + } + }; + const KEYWORDS$1 = { + $pattern: IDENT_RE2, + keyword: KEYWORDS2, + literal: LITERALS2, + built_in: BUILT_INS2, + "variable.language": BUILT_IN_VARIABLES2 + }; + const decimalDigits = "[0-9](_?[0-9])*"; + const frac = `\\.(${decimalDigits})`; + const decimalInteger = `0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*`; + const NUMBER = { + className: "number", + variants: [ + // DecimalLiteral + { begin: `(\\b(${decimalInteger})((${frac})|\\.)?|(${frac}))[eE][+-]?(${decimalDigits})\\b` }, + { begin: `\\b(${decimalInteger})\\b((${frac})\\b|\\.)?|(${frac})\\b` }, + // DecimalBigIntegerLiteral + { begin: `\\b(0|[1-9](_?[0-9])*)n\\b` }, + // NonDecimalIntegerLiteral + { begin: "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b" }, + { begin: "\\b0[bB][0-1](_?[0-1])*n?\\b" }, + { begin: "\\b0[oO][0-7](_?[0-7])*n?\\b" }, + // LegacyOctalIntegerLiteral (does not include underscore separators) + // https://tc39.es/ecma262/#sec-additional-syntax-numeric-literals + { begin: "\\b0[0-7]+n?\\b" } + ], + relevance: 0 + }; + const SUBST = { + className: "subst", + begin: "\\$\\{", + end: "\\}", + keywords: KEYWORDS$1, + contains: [] + // defined later + }; + const HTML_TEMPLATE = { + begin: ".?html`", + end: "", + starts: { + end: "`", + returnEnd: false, + contains: [ + hljs.BACKSLASH_ESCAPE, + SUBST + ], + subLanguage: "xml" + } + }; + const CSS_TEMPLATE = { + begin: ".?css`", + end: "", + starts: { + end: "`", + returnEnd: false, + contains: [ + hljs.BACKSLASH_ESCAPE, + SUBST + ], + subLanguage: "css" + } + }; + const GRAPHQL_TEMPLATE = { + begin: ".?gql`", + end: "", + starts: { + end: "`", + returnEnd: false, + contains: [ + hljs.BACKSLASH_ESCAPE, + SUBST + ], + subLanguage: "graphql" + } + }; + const TEMPLATE_STRING = { + className: "string", + begin: "`", + end: "`", + contains: [ + hljs.BACKSLASH_ESCAPE, + SUBST + ] + }; + const JSDOC_COMMENT = hljs.COMMENT( + /\/\*\*(?!\/)/, + "\\*/", + { + relevance: 0, + contains: [ + { + begin: "(?=@[A-Za-z]+)", + relevance: 0, + contains: [ + { + className: "doctag", + begin: "@[A-Za-z]+" + }, + { + className: "type", + begin: "\\{", + end: "\\}", + excludeEnd: true, + excludeBegin: true, + relevance: 0 + }, + { + className: "variable", + begin: IDENT_RE$1 + "(?=\\s*(-)|$)", + endsParent: true, + relevance: 0 + }, + // eat spaces (not newlines) so we can find + // types or variables + { + begin: /(?=[^\n])\s/, + relevance: 0 + } + ] + } + ] + } + ); + const COMMENT = { + className: "comment", + variants: [ + JSDOC_COMMENT, + hljs.C_BLOCK_COMMENT_MODE, + hljs.C_LINE_COMMENT_MODE + ] + }; + const SUBST_INTERNALS = [ + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + HTML_TEMPLATE, + CSS_TEMPLATE, + GRAPHQL_TEMPLATE, + TEMPLATE_STRING, + // Skip numbers when they are part of a variable name + { match: /\$\d+/ }, + NUMBER + // This is intentional: + // See https://github.com/highlightjs/highlight.js/issues/3288 + // hljs.REGEXP_MODE + ]; + SUBST.contains = SUBST_INTERNALS.concat({ + // we need to pair up {} inside our subst to prevent + // it from ending too early by matching another } + begin: /\{/, + end: /\}/, + keywords: KEYWORDS$1, + contains: [ + "self" + ].concat(SUBST_INTERNALS) + }); + const SUBST_AND_COMMENTS = [].concat(COMMENT, SUBST.contains); + const PARAMS_CONTAINS = SUBST_AND_COMMENTS.concat([ + // eat recursive parens in sub expressions + { + begin: /(\s*)\(/, + end: /\)/, + keywords: KEYWORDS$1, + contains: ["self"].concat(SUBST_AND_COMMENTS) + } + ]); + const PARAMS = { + className: "params", + // convert this to negative lookbehind in v12 + begin: /(\s*)\(/, + // to match the parms with + end: /\)/, + excludeBegin: true, + excludeEnd: true, + keywords: KEYWORDS$1, + contains: PARAMS_CONTAINS + }; + const CLASS_OR_EXTENDS = { + variants: [ + // class Car extends vehicle + { + match: [ + /class/, + /\s+/, + IDENT_RE$1, + /\s+/, + /extends/, + /\s+/, + regex.concat(IDENT_RE$1, "(", regex.concat(/\./, IDENT_RE$1), ")*") + ], + scope: { + 1: "keyword", + 3: "title.class", + 5: "keyword", + 7: "title.class.inherited" + } + }, + // class Car + { + match: [ + /class/, + /\s+/, + IDENT_RE$1 + ], + scope: { + 1: "keyword", + 3: "title.class" + } + } + ] + }; + const CLASS_REFERENCE = { + relevance: 0, + match: regex.either( + // Hard coded exceptions + /\bJSON/, + // Float32Array, OutT + /\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/, + // CSSFactory, CSSFactoryT + /\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/, + // FPs, FPsT + /\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/ + // P + // single letters are not highlighted + // BLAH + // this will be flagged as a UPPER_CASE_CONSTANT instead + ), + className: "title.class", + keywords: { + _: [ + // se we still get relevance credit for JS library classes + ...TYPES2, + ...ERROR_TYPES2 + ] + } + }; + const USE_STRICT = { + label: "use_strict", + className: "meta", + relevance: 10, + begin: /^\s*['"]use (strict|asm)['"]/ + }; + const FUNCTION_DEFINITION = { + variants: [ + { + match: [ + /function/, + /\s+/, + IDENT_RE$1, + /(?=\s*\()/ + ] + }, + // anonymous function + { + match: [ + /function/, + /\s*(?=\()/ + ] + } + ], + className: { + 1: "keyword", + 3: "title.function" + }, + label: "func.def", + contains: [PARAMS], + illegal: /%/ + }; + const UPPER_CASE_CONSTANT = { + relevance: 0, + match: /\b[A-Z][A-Z_0-9]+\b/, + className: "variable.constant" + }; + function noneOf(list) { + return regex.concat("(?!", list.join("|"), ")"); + } + const FUNCTION_CALL = { + match: regex.concat( + /\b/, + noneOf([ + ...BUILT_IN_GLOBALS2, + "super", + "import" + ].map((x) => `${x}\\s*\\(`)), + IDENT_RE$1, + regex.lookahead(/\s*\(/) + ), + className: "title.function", + relevance: 0 + }; + const PROPERTY_ACCESS = { + begin: regex.concat(/\./, regex.lookahead( + regex.concat(IDENT_RE$1, /(?![0-9A-Za-z$_(])/) + )), + end: IDENT_RE$1, + excludeBegin: true, + keywords: "prototype", + className: "property", + relevance: 0 + }; + const GETTER_OR_SETTER = { + match: [ + /get|set/, + /\s+/, + IDENT_RE$1, + /(?=\()/ + ], + className: { + 1: "keyword", + 3: "title.function" + }, + contains: [ + { + // eat to avoid empty params + begin: /\(\)/ + }, + PARAMS + ] + }; + const FUNC_LEAD_IN_RE = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + hljs.UNDERSCORE_IDENT_RE + ")\\s*=>"; + const FUNCTION_VARIABLE = { + match: [ + /const|var|let/, + /\s+/, + IDENT_RE$1, + /\s*/, + /=\s*/, + /(async\s*)?/, + // async is optional + regex.lookahead(FUNC_LEAD_IN_RE) + ], + keywords: "async", + className: { + 1: "keyword", + 3: "title.function" + }, + contains: [ + PARAMS + ] + }; + return { + name: "JavaScript", + aliases: ["js", "jsx", "mjs", "cjs"], + keywords: KEYWORDS$1, + // this will be extended by TypeScript + exports: { PARAMS_CONTAINS, CLASS_REFERENCE }, + illegal: /#(?![$_A-z])/, + contains: [ + hljs.SHEBANG({ + label: "shebang", + binary: "node", + relevance: 5 + }), + USE_STRICT, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + HTML_TEMPLATE, + CSS_TEMPLATE, + GRAPHQL_TEMPLATE, + TEMPLATE_STRING, + COMMENT, + // Skip numbers when they are part of a variable name + { match: /\$\d+/ }, + NUMBER, + CLASS_REFERENCE, + { + scope: "attr", + match: IDENT_RE$1 + regex.lookahead(":"), + relevance: 0 + }, + FUNCTION_VARIABLE, + { + // "value" container + begin: "(" + hljs.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*", + keywords: "return throw case", + relevance: 0, + contains: [ + COMMENT, + hljs.REGEXP_MODE, + { + className: "function", + // we have to count the parens to make sure we actually have the + // correct bounding ( ) before the =>. There could be any number of + // sub-expressions inside also surrounded by parens. + begin: FUNC_LEAD_IN_RE, + returnBegin: true, + end: "\\s*=>", + contains: [ + { + className: "params", + variants: [ + { + begin: hljs.UNDERSCORE_IDENT_RE, + relevance: 0 + }, + { + className: null, + begin: /\(\s*\)/, + skip: true + }, + { + begin: /(\s*)\(/, + end: /\)/, + excludeBegin: true, + excludeEnd: true, + keywords: KEYWORDS$1, + contains: PARAMS_CONTAINS + } + ] + } + ] + }, + { + // could be a comma delimited list of params to a function call + begin: /,/, + relevance: 0 + }, + { + match: /\s+/, + relevance: 0 + }, + { + // JSX + variants: [ + { begin: FRAGMENT.begin, end: FRAGMENT.end }, + { match: XML_SELF_CLOSING }, + { + begin: XML_TAG.begin, + // we carefully check the opening tag to see if it truly + // is a tag and not a false positive + "on:begin": XML_TAG.isTrulyOpeningTag, + end: XML_TAG.end + } + ], + subLanguage: "xml", + contains: [ + { + begin: XML_TAG.begin, + end: XML_TAG.end, + skip: true, + contains: ["self"] + } + ] + } + ] + }, + FUNCTION_DEFINITION, + { + // prevent this from getting swallowed up by function + // since they appear "function like" + beginKeywords: "while if switch catch for" + }, + { + // we have to count the parens to make sure we actually have the correct + // bounding ( ). There could be any number of sub-expressions inside + // also surrounded by parens. + begin: "\\b(?!function)" + hljs.UNDERSCORE_IDENT_RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", + // end parens + returnBegin: true, + label: "func.def", + contains: [ + PARAMS, + hljs.inherit(hljs.TITLE_MODE, { begin: IDENT_RE$1, className: "title.function" }) + ] + }, + // catch ... so it won't trigger the property rule below + { + match: /\.\.\./, + relevance: 0 + }, + PROPERTY_ACCESS, + // hack: prevents detection of keywords in some circumstances + // .keyword() + // $keyword = x + { + match: "\\$" + IDENT_RE$1, + relevance: 0 + }, + { + match: [/\bconstructor(?=\s*\()/], + className: { 1: "title.function" }, + contains: [PARAMS] + }, + FUNCTION_CALL, + UPPER_CASE_CONSTANT, + CLASS_OR_EXTENDS, + GETTER_OR_SETTER, + { + match: /\$[(.]/ + // relevance booster for a pattern common to JS libs: `$(something)` and `$.something` + } + ] + }; +} +function typescript(hljs) { + const regex = hljs.regex; + const tsLanguage = javascript2(hljs); + const IDENT_RE$1 = IDENT_RE2; + const TYPES3 = [ + "any", + "void", + "number", + "boolean", + "string", + "object", + "never", + "symbol", + "bigint", + "unknown" + ]; + const NAMESPACE = { + begin: [ + /namespace/, + /\s+/, + hljs.IDENT_RE + ], + beginScope: { + 1: "keyword", + 3: "title.class" + } + }; + const INTERFACE = { + beginKeywords: "interface", + end: /\{/, + excludeEnd: true, + keywords: { + keyword: "interface extends", + built_in: TYPES3 + }, + contains: [tsLanguage.exports.CLASS_REFERENCE] + }; + const USE_STRICT = { + className: "meta", + relevance: 10, + begin: /^\s*['"]use strict['"]/ + }; + const TS_SPECIFIC_KEYWORDS = [ + "type", + // "namespace", + "interface", + "public", + "private", + "protected", + "implements", + "declare", + "abstract", + "readonly", + "enum", + "override", + "satisfies" + ]; + const KEYWORDS$1 = { + $pattern: IDENT_RE2, + keyword: KEYWORDS2.concat(TS_SPECIFIC_KEYWORDS), + literal: LITERALS2, + built_in: BUILT_INS2.concat(TYPES3), + "variable.language": BUILT_IN_VARIABLES2 + }; + const DECORATOR = { + className: "meta", + begin: "@" + IDENT_RE$1 + }; + const swapMode = (mode, label, replacement) => { + const indx = mode.contains.findIndex((m) => m.label === label); + if (indx === -1) { + throw new Error("can not find mode to replace"); + } + mode.contains.splice(indx, 1, replacement); + }; + Object.assign(tsLanguage.keywords, KEYWORDS$1); + tsLanguage.exports.PARAMS_CONTAINS.push(DECORATOR); + const ATTRIBUTE_HIGHLIGHT = tsLanguage.contains.find((c) => c.scope === "attr"); + const OPTIONAL_KEY_OR_ARGUMENT = Object.assign( + {}, + ATTRIBUTE_HIGHLIGHT, + { match: regex.concat(IDENT_RE$1, regex.lookahead(/\s*\?:/)) } + ); + tsLanguage.exports.PARAMS_CONTAINS.push([ + tsLanguage.exports.CLASS_REFERENCE, + // class reference for highlighting the params types + ATTRIBUTE_HIGHLIGHT, + // highlight the params key + OPTIONAL_KEY_OR_ARGUMENT + // Added for optional property assignment highlighting + ]); + tsLanguage.contains = tsLanguage.contains.concat([ + DECORATOR, + NAMESPACE, + INTERFACE, + OPTIONAL_KEY_OR_ARGUMENT + // Added for optional property assignment highlighting + ]); + swapMode(tsLanguage, "shebang", hljs.SHEBANG()); + swapMode(tsLanguage, "use_strict", USE_STRICT); + const functionDeclaration = tsLanguage.contains.find((m) => m.label === "func.def"); + functionDeclaration.relevance = 0; + Object.assign(tsLanguage, { + name: "TypeScript", + aliases: [ + "ts", + "tsx", + "mts", + "cts" + ] + }); + return tsLanguage; +} + +// node_modules/highlight.js/es/languages/xml.js +function xml(hljs) { + const regex = hljs.regex; + const TAG_NAME_RE = regex.concat(/[\p{L}_]/u, regex.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u); + const XML_IDENT_RE = /[\p{L}0-9._:-]+/u; + const XML_ENTITIES = { + className: "symbol", + begin: /&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/ + }; + const XML_META_KEYWORDS = { + begin: /\s/, + contains: [ + { + className: "keyword", + begin: /#?[a-z_][a-z1-9_-]+/, + illegal: /\n/ + } + ] + }; + const XML_META_PAR_KEYWORDS = hljs.inherit(XML_META_KEYWORDS, { + begin: /\(/, + end: /\)/ + }); + const APOS_META_STRING_MODE = hljs.inherit(hljs.APOS_STRING_MODE, { className: "string" }); + const QUOTE_META_STRING_MODE = hljs.inherit(hljs.QUOTE_STRING_MODE, { className: "string" }); + const TAG_INTERNALS = { + endsWithParent: true, + illegal: /`]+/ } + ] + } + ] + } + ] + }; + return { + name: "HTML, XML", + aliases: [ + "html", + "xhtml", + "rss", + "atom", + "xjb", + "xsd", + "xsl", + "plist", + "wsf", + "svg" + ], + case_insensitive: true, + unicodeRegex: true, + contains: [ + { + className: "meta", + begin: //, + relevance: 10, + contains: [ + XML_META_KEYWORDS, + QUOTE_META_STRING_MODE, + APOS_META_STRING_MODE, + XML_META_PAR_KEYWORDS, + { + begin: /\[/, + end: /\]/, + contains: [ + { + className: "meta", + begin: //, + contains: [ + XML_META_KEYWORDS, + XML_META_PAR_KEYWORDS, + QUOTE_META_STRING_MODE, + APOS_META_STRING_MODE + ] + } + ] + } + ] + }, + hljs.COMMENT( + //, + { relevance: 10 } + ), + { + begin: //, + relevance: 10 + }, + XML_ENTITIES, + // xml processing instructions + { + className: "meta", + end: /\?>/, + variants: [ + { + begin: /<\?xml/, + relevance: 10, + contains: [ + QUOTE_META_STRING_MODE + ] + }, + { + begin: /<\?[a-z][a-z0-9]+/ + } + ] + }, + { + className: "tag", + /* + The lookahead pattern (?=...) ensures that 'begin' only matches + ')/, + end: />/, + keywords: { name: "style" }, + contains: [TAG_INTERNALS], + starts: { + end: /<\/style>/, + returnEnd: true, + subLanguage: [ + "css", + "xml" + ] + } + }, + { + className: "tag", + // See the comment in the