@meridianlabs/log-viewer 0.3.273 → 0.3.275

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/lib/AnsiDisplayRich-302CIkEj.js +1431 -0
  2. package/lib/AnsiDisplayRich-302CIkEj.js.map +1 -0
  3. package/lib/ToolButton-BmBvTvKO.js +124 -0
  4. package/lib/ToolButton-BmBvTvKO.js.map +1 -0
  5. package/lib/e2e/content-trust.spec.d.ts +2 -0
  6. package/lib/e2e/content-trust.spec.d.ts.map +1 -0
  7. package/lib/e2e/fixtures/log-list-scenario.d.ts +1 -0
  8. package/lib/e2e/fixtures/log-list-scenario.d.ts.map +1 -1
  9. package/lib/e2e/fixtures/serve-eval-file.d.ts +20 -0
  10. package/lib/e2e/fixtures/serve-eval-file.d.ts.map +1 -0
  11. package/lib/e2e/sample-activity.spec.d.ts +10 -0
  12. package/lib/e2e/sample-activity.spec.d.ts.map +1 -0
  13. package/lib/index.js +16620 -31058
  14. package/lib/index.js.map +1 -1
  15. package/lib/markdownPipeline-BeMkkZRz.js +8575 -0
  16. package/lib/markdownPipeline-BeMkkZRz.js.map +1 -0
  17. package/lib/markdownText-z5R6PHwt.js +105 -0
  18. package/lib/markdownText-z5R6PHwt.js.map +1 -0
  19. package/lib/prismHighlighter-D-PZtkPX.js +1927 -0
  20. package/lib/prismHighlighter-D-PZtkPX.js.map +1 -0
  21. package/lib/rolldown-runtime-B-lAHAz2.js +37 -0
  22. package/lib/src/app/App.d.ts.map +1 -1
  23. package/lib/src/app/flow/FlowPanel.d.ts.map +1 -1
  24. package/lib/src/app/log-view/tabs/InfoTab.d.ts +1 -0
  25. package/lib/src/app/log-view/tabs/InfoTab.d.ts.map +1 -1
  26. package/lib/src/app/log-view/tabs/JsonTab.d.ts +1 -1
  27. package/lib/src/app/log-view/tabs/ModelsTab.d.ts +1 -0
  28. package/lib/src/app/log-view/tabs/ModelsTab.d.ts.map +1 -1
  29. package/lib/src/app/log-view/tabs/SamplesTab.d.ts +1 -1
  30. package/lib/src/app/log-view/tabs/TaskTab.d.ts +1 -0
  31. package/lib/src/app/log-view/tabs/TaskTab.d.ts.map +1 -1
  32. package/lib/src/app/log-view/tabs/timeline/TimelineTab.d.ts +1 -0
  33. package/lib/src/app/log-view/tabs/timeline/TimelineTab.d.ts.map +1 -1
  34. package/lib/src/app/log-view/title-view/ScoreGrid.d.ts.map +1 -1
  35. package/lib/src/app/routing/AppRouter.d.ts.map +1 -1
  36. package/lib/src/app/samples/SampleDisplay.d.ts.map +1 -1
  37. package/lib/src/app/samples/SampleSummaryView.d.ts.map +1 -1
  38. package/lib/src/app/samples/event/SampleEventView.d.ts.map +1 -1
  39. package/lib/src/app/samples/print/SamplePrintView.d.ts.map +1 -1
  40. package/lib/src/app/samples/status/status.d.ts +1 -1
  41. package/lib/src/app/shared/contentTrust.d.ts +14 -0
  42. package/lib/src/app/shared/contentTrust.d.ts.map +1 -0
  43. package/lib/src/app/shared/samples-grid/cells.d.ts.map +1 -1
  44. package/lib/src/app_config/appConfig.d.ts +3 -0
  45. package/lib/src/app_config/appConfig.d.ts.map +1 -1
  46. package/lib/src/app_config/resolveBackend.d.ts.map +1 -1
  47. package/lib/src/components/CodePanel.d.ts.map +1 -1
  48. package/lib/src/constants.d.ts +1 -0
  49. package/lib/src/constants.d.ts.map +1 -1
  50. package/lib/src/log_data/sampleSummaries.d.ts.map +1 -1
  51. package/lib/src/state/hooks.d.ts +1 -0
  52. package/lib/src/state/hooks.d.ts.map +1 -1
  53. package/lib/src-s8Cexy_j.js +9977 -0
  54. package/lib/src-s8Cexy_j.js.map +1 -0
  55. package/lib/styles/index.css +2220 -965
  56. package/lib/type-CI-Mc4Kw.js +29 -0
  57. package/lib/type-CI-Mc4Kw.js.map +1 -0
  58. package/package.json +11 -11
  59. package/lib/src/utils/markdown.d.ts +0 -16
  60. package/lib/src/utils/markdown.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdownPipeline-BeMkkZRz.js","names":["decode","encode","text","mdurl.parse","mdurl.encode","mdurl.format","mdurl.decode","markdownit","canonicalImageSource","parseAbsoluteHttpUrl","parseDataUri","defaultMarkdownRenderer","escapeHtmlCharacters","mathjaxPluginPromise","getMathjaxPlugin","loading","then","m","default","catch","hasMathContent","text","includes","mdInstanceCache","unescapeHtmlForMath","content","replace","getMarkdownInstance","renderer","contentHasMath","useMath","cacheKey","cached","md","breaks","html","enable","rules","image","tokens","idx","token","source","String","attrGet","alt","trim","canonicalSource","undefined","title","titleAttr","utils","escapeHtml","href","dataUri","visibleSource","mimeType","base64","label","escapedLabel","mathjaxPlugin","use","origInline","math_inline","origBlock","math_block","options","env","self","protectBackslashesInLatex","inlineRegex","blockRegex","result","_match","latex","protectedTex","error","console","restoreBackslashesForLatex","fixDotsNotation","replaceDotsBetween","delim","out","emitted","search","nextDots","indexOf","open","bodyStart","length","close","startsWith","slice","kLetterListPattern","preRenderText","txt","replaceAll","isLineTerminator","code","protectMarkdown","lineEnd","charCodeAt","unprotectMarkdown","unescapeSupHtmlEntities","str","unescapeCodeHtmlEntities","htmlEntities","starttag","endtag","entity","renderFullPipelineMarkdown","markdown","protectedContent","escaped","preRendered","protectedText","preparedForMarkdown","render","ex","log","unescaped","withCode","withSup","renderTextOnlyMarkdown","markdownRenderers","full","fragment","textOnly","renderMarkdown","MarkdownIt","kTruncationWindowFactor","simpleMarkdownTruncate","truncateMarkdown","markdown","maxLength","ellipsis","length","trim","slice","prefix","hasMarkdownSyntax","md","html","breaks","tokens","parse","accumulated","lastSafePoint","isTruncated","token","tokenContent","getTokenContent","potentialLength","remainingSpace","truncatedToken","truncateAtWordBoundary","isCompleteSyntax","finalText","trimEnd","text","hasLinkSyntax","markdownPatterns","some","pattern","test","kLineTerminator","split","line","open","indexOf","close","type","children","map","child","content","join","completeTypes","includes","lastSpace","i","char","undefined","substr","match","index","purify","MATHJAX_STYLES","mathJaxStyles","scopeId","replaceAll","trim","createDOMPurify","canonicalImageSource","escapeHtmlCharacters","mathJaxStyles","FORBIDDEN_TAGS","MATHJAX_TAGS","MATHJAX_ATTRS","URL_ATTRIBUTES","Set","BOX_EDGES","BOX_LONGHANDS","flatMap","edge","INLINE_STYLE_PROPERTIES","SAFE_CSS_FUNCTIONS","UNSAFE_CSS_PATTERN","RAW_CSS_REJECT_PATTERN","MATHJAX_WRAPPER_ID","PURIFY_CONFIG","ADD_ATTR","ADD_DATA_URI_TAGS","ADD_TAGS","ALLOW_DATA_ATTR","ALLOW_UNKNOWN_PROTOCOLS","FORBID_ATTR","FORBID_TAGS","USE_PROFILES","html","mathMl","svg","purify","hooksInstalled","sanitizeRenderedHtml","purifier","getPurify","sanitize","window","undefined","installHooks","addHook","node","hookEvent","tagName","Element","css","sanitizeMathJaxStyleElement","textContent","remove","attrName","toLowerCase","keepAttr","removeAttribute","sanitizeStyleAttributeHook","isImgElement","canonical","safeImgSrc","attrValue","has","isSafeUrlAttribute","getAttribute","setAttribute","safeStyle","sanitizeStyleAttribute","value","test","trim","trimmed","normalized","Array","from","filter","char","charCode","charCodeAt","join","style","scratch","document","createElement","safeDeclarations","declarations","property","normalizedProperty","getPropertyValue","isSafeStyleValue","priority","getPropertyPriority","push","call","matchAll","startsWith","element","parent","parentElement","scopeId"],"sources":["../../../node_modules/.pnpm/mdurl@2.1.0/node_modules/mdurl/lib/decode.mjs","../../../node_modules/.pnpm/mdurl@2.1.0/node_modules/mdurl/lib/encode.mjs","../../../node_modules/.pnpm/mdurl@2.1.0/node_modules/mdurl/lib/format.mjs","../../../node_modules/.pnpm/mdurl@2.1.0/node_modules/mdurl/lib/parse.mjs","../../../node_modules/.pnpm/mdurl@2.1.0/node_modules/mdurl/index.mjs","../../../node_modules/.pnpm/uc.micro@3.0.0/node_modules/uc.micro/build/index.mjs","../../../node_modules/.pnpm/entities@8.1.0/node_modules/entities/dist/decode-codepoint.js","../../../node_modules/.pnpm/entities@8.1.0/node_modules/entities/dist/internal/decode-shared.js","../../../node_modules/.pnpm/entities@8.1.0/node_modules/entities/dist/generated/decode-data-html.js","../../../node_modules/.pnpm/entities@8.1.0/node_modules/entities/dist/internal/bin-trie-flags.js","../../../node_modules/.pnpm/entities@8.1.0/node_modules/entities/dist/decode.js","../../../node_modules/.pnpm/linkify-it@6.1.0/node_modules/linkify-it/build/index.mjs","../../../node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.es6.js","../../../node_modules/.pnpm/markdown-it@15.0.2/node_modules/markdown-it/dist/markdown-it.mjs","../../../packages/react/src/components/markdownRendering.ts","../../../packages/react/src/components/markdownTruncate.ts","../../../node_modules/.pnpm/dompurify@3.4.15/node_modules/dompurify/dist/purify.es.mjs","../../../packages/react/src/components/mathjaxStyles.ts","../../../packages/react/src/components/renderedHtmlSanitizer.ts"],"sourcesContent":["/* eslint-disable no-bitwise */\n\nconst decodeCache = {}\n\nfunction getDecodeCache (exclude) {\n let cache = decodeCache[exclude]\n if (cache) { return cache }\n\n cache = decodeCache[exclude] = []\n\n for (let i = 0; i < 128; i++) {\n const ch = String.fromCharCode(i)\n cache.push(ch)\n }\n\n for (let i = 0; i < exclude.length; i++) {\n const ch = exclude.charCodeAt(i)\n cache[ch] = '%' + ('0' + ch.toString(16).toUpperCase()).slice(-2)\n }\n\n return cache\n}\n\n// Decode percent-encoded string.\n//\nfunction decode (string, exclude) {\n if (typeof exclude !== 'string') {\n exclude = decode.defaultChars\n }\n\n const cache = getDecodeCache(exclude)\n\n return string.replace(/(%[a-f0-9]{2})+/gi, function (seq) {\n let result = ''\n\n for (let i = 0, l = seq.length; i < l; i += 3) {\n const b1 = parseInt(seq.slice(i + 1, i + 3), 16)\n\n if (b1 < 0x80) {\n result += cache[b1]\n continue\n }\n\n if ((b1 & 0xE0) === 0xC0 && (i + 3 < l)) {\n // 110xxxxx 10xxxxxx\n const b2 = parseInt(seq.slice(i + 4, i + 6), 16)\n\n if ((b2 & 0xC0) === 0x80) {\n const chr = ((b1 << 6) & 0x7C0) | (b2 & 0x3F)\n\n if (chr < 0x80) {\n result += '\\ufffd\\ufffd'\n } else {\n result += String.fromCharCode(chr)\n }\n\n i += 3\n continue\n }\n }\n\n if ((b1 & 0xF0) === 0xE0 && (i + 6 < l)) {\n // 1110xxxx 10xxxxxx 10xxxxxx\n const b2 = parseInt(seq.slice(i + 4, i + 6), 16)\n const b3 = parseInt(seq.slice(i + 7, i + 9), 16)\n\n if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {\n const chr = ((b1 << 12) & 0xF000) | ((b2 << 6) & 0xFC0) | (b3 & 0x3F)\n\n if (chr < 0x800 || (chr >= 0xD800 && chr <= 0xDFFF)) {\n result += '\\ufffd\\ufffd\\ufffd'\n } else {\n result += String.fromCharCode(chr)\n }\n\n i += 6\n continue\n }\n }\n\n if ((b1 & 0xF8) === 0xF0 && (i + 9 < l)) {\n // 111110xx 10xxxxxx 10xxxxxx 10xxxxxx\n const b2 = parseInt(seq.slice(i + 4, i + 6), 16)\n const b3 = parseInt(seq.slice(i + 7, i + 9), 16)\n const b4 = parseInt(seq.slice(i + 10, i + 12), 16)\n\n if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80 && (b4 & 0xC0) === 0x80) {\n let chr = ((b1 << 18) & 0x1C0000) | ((b2 << 12) & 0x3F000) | ((b3 << 6) & 0xFC0) | (b4 & 0x3F)\n\n if (chr < 0x10000 || chr > 0x10FFFF) {\n result += '\\ufffd\\ufffd\\ufffd\\ufffd'\n } else {\n chr -= 0x10000\n result += String.fromCharCode(0xD800 + (chr >> 10), 0xDC00 + (chr & 0x3FF))\n }\n\n i += 9\n continue\n }\n }\n\n result += '\\ufffd'\n }\n\n return result\n })\n}\n\ndecode.defaultChars = ';/?:@&=+$,#'\ndecode.componentChars = ''\n\nexport default decode\n","const encodeCache = {}\n\n// Create a lookup array where anything but characters in `chars` string\n// and alphanumeric chars is percent-encoded.\n//\nfunction getEncodeCache (exclude) {\n let cache = encodeCache[exclude]\n if (cache) { return cache }\n\n cache = encodeCache[exclude] = []\n\n for (let i = 0; i < 128; i++) {\n const ch = String.fromCharCode(i)\n\n if (/^[0-9a-z]$/i.test(ch)) {\n // always allow unencoded alphanumeric characters\n cache.push(ch)\n } else {\n cache.push('%' + ('0' + i.toString(16).toUpperCase()).slice(-2))\n }\n }\n\n for (let i = 0; i < exclude.length; i++) {\n cache[exclude.charCodeAt(i)] = exclude[i]\n }\n\n return cache\n}\n\n// Encode unsafe characters with percent-encoding, skipping already\n// encoded sequences.\n//\n// - string - string to encode\n// - exclude - list of characters to ignore (in addition to a-zA-Z0-9)\n// - keepEscaped - don't encode '%' in a correct escape sequence (default: true)\n//\nfunction encode (string, exclude, keepEscaped) {\n if (typeof exclude !== 'string') {\n // encode(string, keepEscaped)\n keepEscaped = exclude\n exclude = encode.defaultChars\n }\n\n if (typeof keepEscaped === 'undefined') {\n keepEscaped = true\n }\n\n const cache = getEncodeCache(exclude)\n let result = ''\n\n for (let i = 0, l = string.length; i < l; i++) {\n const code = string.charCodeAt(i)\n\n if (keepEscaped && code === 0x25 /* % */ && i + 2 < l) {\n if (/^[0-9a-f]{2}$/i.test(string.slice(i + 1, i + 3))) {\n result += string.slice(i, i + 3)\n i += 2\n continue\n }\n }\n\n if (code < 128) {\n result += cache[code]\n continue\n }\n\n if (code >= 0xD800 && code <= 0xDFFF) {\n if (code >= 0xD800 && code <= 0xDBFF && i + 1 < l) {\n const nextCode = string.charCodeAt(i + 1)\n if (nextCode >= 0xDC00 && nextCode <= 0xDFFF) {\n result += encodeURIComponent(string[i] + string[i + 1])\n i++\n continue\n }\n }\n result += '%EF%BF%BD'\n continue\n }\n\n result += encodeURIComponent(string[i])\n }\n\n return result\n}\n\nencode.defaultChars = \";/?:@&=+$,-_.!~*'()#\"\nencode.componentChars = \"-_.!~*'()\"\n\nexport default encode\n","export default function format (url) {\n let result = ''\n\n result += url.protocol || ''\n result += url.slashes ? '//' : ''\n result += url.auth ? url.auth + '@' : ''\n\n if (url.hostname && url.hostname.indexOf(':') !== -1) {\n // ipv6 address\n result += '[' + url.hostname + ']'\n } else {\n result += url.hostname || ''\n }\n\n result += url.port ? ':' + url.port : ''\n result += url.pathname || ''\n result += url.search || ''\n result += url.hash || ''\n\n return result\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n//\n// Changes from joyent/node:\n//\n// 1. No leading slash in paths,\n// e.g. in `url.parse('http://foo?bar')` pathname is ``, not `/`\n//\n// 2. Backslashes are not replaced with slashes,\n// so `http:\\\\example.org\\` is treated like a relative path\n//\n// 3. Trailing colon is treated like a part of the path,\n// i.e. in `http://example.org:foo` pathname is `:foo`\n//\n// 4. Nothing is URL-encoded in the resulting object,\n// (in joyent/node some chars in auth and paths are encoded)\n//\n// 5. `url.parse()` does not have `parseQueryString` argument\n//\n// 6. Removed extraneous result properties: `host`, `path`, `query`, etc.,\n// which can be constructed using other parts of the url.\n//\n\nfunction Url () {\n this.protocol = null\n this.slashes = null\n this.auth = null\n this.port = null\n this.hostname = null\n this.hash = null\n this.search = null\n this.pathname = null\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nconst protocolPattern = /^([a-z0-9.+-]+:)/i\nconst portPattern = /:[0-9]*$/\n\n// Special case for a simple path URL\n/* eslint-disable-next-line no-useless-escape */\nconst simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/\n\n// RFC 2396: characters reserved for delimiting URLs.\n// We actually just auto-escape these.\nconst delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t']\n\n// RFC 2396: characters not allowed for various reasons.\nconst unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims)\n\n// Allowed by RFCs, but cause of XSS attacks. Always escape these.\nconst autoEscape = ['\\''].concat(unwise)\n// Characters that are never ever allowed in a hostname.\n// Note that any invalid chars are also handled, but these\n// are the ones that are *expected* to be seen, so we fast-path\n// them.\nconst nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape)\nconst hostEndingChars = ['/', '?', '#']\nconst hostnameMaxLen = 255\nconst hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/\nconst hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/\n// protocols that can allow \"unsafe\" and \"unwise\" chars.\n// protocols that never have a hostname.\nconst hostlessProtocol = {\n javascript: true,\n 'javascript:': true\n}\n// protocols that always contain a // bit.\nconst slashedProtocol = {\n http: true,\n https: true,\n ftp: true,\n gopher: true,\n file: true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n}\n\nfunction urlParse (url, slashesDenoteHost) {\n if (url && url instanceof Url) return url\n\n const u = new Url()\n u.parse(url, slashesDenoteHost)\n return u\n}\n\nUrl.prototype.parse = function (url, slashesDenoteHost) {\n let lowerProto, hec, slashes\n let rest = url\n\n // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n rest = rest.trim()\n\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n const simplePath = simplePathPattern.exec(rest)\n if (simplePath) {\n this.pathname = simplePath[1]\n if (simplePath[2]) {\n this.search = simplePath[2]\n }\n return this\n }\n }\n\n let proto = protocolPattern.exec(rest)\n if (proto) {\n proto = proto[0]\n lowerProto = proto.toLowerCase()\n this.protocol = proto\n rest = rest.substr(proto.length)\n }\n\n // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n /* eslint-disable-next-line no-useless-escape */\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n slashes = rest.substr(0, 2) === '//'\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2)\n this.slashes = true\n }\n }\n\n if (!hostlessProtocol[proto] &&\n (slashes || (proto && !slashedProtocol[proto]))) {\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n\n // find the first instance of any hostEndingChars\n let hostEnd = -1\n for (let i = 0; i < hostEndingChars.length; i++) {\n hec = rest.indexOf(hostEndingChars[i])\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {\n hostEnd = hec\n }\n }\n\n // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n let auth, atSign\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@')\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd)\n }\n\n // Now we have a portion which is definitely the auth.\n // Pull that off.\n if (atSign !== -1) {\n auth = rest.slice(0, atSign)\n rest = rest.slice(atSign + 1)\n this.auth = auth\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1\n for (let i = 0; i < nonHostChars.length; i++) {\n hec = rest.indexOf(nonHostChars[i])\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {\n hostEnd = hec\n }\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1) {\n hostEnd = rest.length\n }\n\n if (rest[hostEnd - 1] === ':') { hostEnd-- }\n const host = rest.slice(0, hostEnd)\n rest = rest.slice(hostEnd)\n\n // pull out port.\n this.parseHost(host)\n\n // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n this.hostname = this.hostname || ''\n\n // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n const ipv6Hostname = this.hostname[0] === '[' &&\n this.hostname[this.hostname.length - 1] === ']'\n\n // validate a little.\n if (!ipv6Hostname) {\n const hostparts = this.hostname.split(/\\./)\n for (let i = 0, l = hostparts.length; i < l; i++) {\n const part = hostparts[i]\n if (!part) { continue }\n if (!part.match(hostnamePartPattern)) {\n let newpart = ''\n for (let j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x'\n } else {\n newpart += part[j]\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n const validParts = hostparts.slice(0, i)\n const notHost = hostparts.slice(i + 1)\n const bit = part.match(hostnamePartStart)\n if (bit) {\n validParts.push(bit[1])\n notHost.unshift(bit[2])\n }\n if (notHost.length) {\n rest = notHost.join('.') + rest\n }\n this.hostname = validParts.join('.')\n break\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = ''\n }\n\n // strip [ and ] from the hostname\n // the host field still retains them, though\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2)\n }\n }\n\n // chop off from the tail first.\n const hash = rest.indexOf('#')\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash)\n rest = rest.slice(0, hash)\n }\n const qm = rest.indexOf('?')\n if (qm !== -1) {\n this.search = rest.substr(qm)\n rest = rest.slice(0, qm)\n }\n if (rest) { this.pathname = rest }\n if (slashedProtocol[lowerProto] &&\n this.hostname && !this.pathname) {\n this.pathname = ''\n }\n\n return this\n}\n\nUrl.prototype.parseHost = function (host) {\n let port = portPattern.exec(host)\n if (port) {\n port = port[0]\n if (port !== ':') {\n this.port = port.substr(1)\n }\n host = host.substr(0, host.length - port.length)\n }\n if (host) { this.hostname = host }\n}\n\nexport default urlParse\n","import decode from './lib/decode.mjs'\nimport encode from './lib/encode.mjs'\nimport format from './lib/format.mjs'\nimport parse from './lib/parse.mjs'\n\nexport {\n decode,\n encode,\n format,\n parse\n}\n","const Any = /[\\0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\nconst Cc = /[\\0-\\x1F\\x7F-\\x9F]/;\nconst Cf = /[\\xAD\\u0600-\\u0605\\u061C\\u06DD\\u070F\\u0890\\u0891\\u08E2\\u180E\\u200B-\\u200F\\u202A-\\u202E\\u2060-\\u2064\\u2066-\\u206F\\uFEFF\\uFFF9-\\uFFFB]|\\uD804[\\uDCBD\\uDCCD]|\\uD80D[\\uDC30-\\uDC3F]|\\uD82F[\\uDCA0-\\uDCA3]|\\uD834[\\uDD73-\\uDD7A]|\\uDB40[\\uDC01\\uDC20-\\uDC7F]/;\nconst P = /[!-#%-\\*,-\\/:;\\?@\\[-\\]_\\{\\}\\xA1\\xA7\\xAB\\xB6\\xB7\\xBB\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061D-\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u09FD\\u0A76\\u0AF0\\u0C77\\u0C84\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166E\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B4E\\u1B4F\\u1B5A-\\u1B60\\u1B7D-\\u1B7F\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205E\\u207D\\u207E\\u208D\\u208E\\u2308-\\u230B\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC\\u29FD\\u2CF9-\\u2CFC\\u2CFE\\u2CFF\\u2D70\\u2E00-\\u2E2E\\u2E30-\\u2E4F\\u2E52-\\u2E5D\\u3001-\\u3003\\u3008-\\u3011\\u3014-\\u301F\\u3030\\u303D\\u30A0\\u30FB\\uA4FE\\uA4FF\\uA60D-\\uA60F\\uA673\\uA67E\\uA6F2-\\uA6F7\\uA874-\\uA877\\uA8CE\\uA8CF\\uA8F8-\\uA8FA\\uA8FC\\uA92E\\uA92F\\uA95F\\uA9C1-\\uA9CD\\uA9DE\\uA9DF\\uAA5C-\\uAA5F\\uAADE\\uAADF\\uAAF0\\uAAF1\\uABEB\\uFD3E\\uF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D83A[\\uDD5E\\uDD5F]/;\nconst S = /[\\$\\+<->\\^`\\|~\\xA2-\\xA6\\xA8\\xA9\\xAC\\xAE-\\xB1\\xB4\\xB8\\xD7\\xF7\\u02C2-\\u02C5\\u02D2-\\u02DF\\u02E5-\\u02EB\\u02ED\\u02EF-\\u02FF\\u0375\\u0384\\u0385\\u03F6\\u0482\\u058D-\\u058F\\u0606-\\u0608\\u060B\\u060E\\u060F\\u06DE\\u06E9\\u06FD\\u06FE\\u07F6\\u07FE\\u07FF\\u0888\\u09F2\\u09F3\\u09FA\\u09FB\\u0AF1\\u0B70\\u0BF3-\\u0BFA\\u0C7F\\u0D4F\\u0D79\\u0E3F\\u0F01-\\u0F03\\u0F13\\u0F15-\\u0F17\\u0F1A-\\u0F1F\\u0F34\\u0F36\\u0F38\\u0FBE-\\u0FC5\\u0FC7-\\u0FCC\\u0FCE\\u0FCF\\u0FD5-\\u0FD8\\u109E\\u109F\\u1390-\\u1399\\u166D\\u17DB\\u1940\\u19DE-\\u19FF\\u1B61-\\u1B6A\\u1B74-\\u1B7C\\u1FBD\\u1FBF-\\u1FC1\\u1FCD-\\u1FCF\\u1FDD-\\u1FDF\\u1FED-\\u1FEF\\u1FFD\\u1FFE\\u2044\\u2052\\u207A-\\u207C\\u208A-\\u208C\\u20A0-\\u20C1\\u2100\\u2101\\u2103-\\u2106\\u2108\\u2109\\u2114\\u2116-\\u2118\\u211E-\\u2123\\u2125\\u2127\\u2129\\u212E\\u213A\\u213B\\u2140-\\u2144\\u214A-\\u214D\\u214F\\u218A\\u218B\\u2190-\\u2307\\u230C-\\u2328\\u232B-\\u2429\\u2440-\\u244A\\u249C-\\u24E9\\u2500-\\u2767\\u2794-\\u27C4\\u27C7-\\u27E5\\u27F0-\\u2982\\u2999-\\u29D7\\u29DC-\\u29FB\\u29FE-\\u2B73\\u2B76-\\u2BFF\\u2CE5-\\u2CEA\\u2E50\\u2E51\\u2E80-\\u2E99\\u2E9B-\\u2EF3\\u2F00-\\u2FD5\\u2FF0-\\u2FFF\\u3004\\u3012\\u3013\\u3020\\u3036\\u3037\\u303E\\u303F\\u309B\\u309C\\u3190\\u3191\\u3196-\\u319F\\u31C0-\\u31E5\\u31EF\\u3200-\\u321E\\u322A-\\u3247\\u3250\\u3260-\\u327F\\u328A-\\u32B0\\u32C0-\\u33FF\\u4DC0-\\u4DFF\\uA490-\\uA4C6\\uA700-\\uA716\\uA720\\uA721\\uA789\\uA78A\\uA828-\\uA82B\\uA836-\\uA839\\uAA77-\\uAA79\\uAB5B\\uAB6A\\uAB6B\\uFB29\\uFBB2-\\uFBD2\\uFD40-\\uFD4F\\uFD90\\uFD91\\uFDC8-\\uFDCF\\uFDFC-\\uFDFF\\uFE62\\uFE64-\\uFE66\\uFE69\\uFF04\\uFF0B\\uFF1C-\\uFF1E\\uFF3E\\uFF40\\uFF5C\\uFF5E\\uFFE0-\\uFFE6\\uFFE8-\\uFFEE\\uFFFC\\uFFFD]|\\uD800[\\uDD37-\\uDD3F\\uDD79-\\uDD89\\uDD8C-\\uDD8E\\uDD90-\\uDD9C\\uDDA0\\uDDD0-\\uDDFC]|\\uD802[\\uDC77\\uDC78\\uDEC8]|\\uD803[\\uDD8E\\uDD8F\\uDED1-\\uDED8]|\\uD805\\uDF3F|\\uD807[\\uDFD5-\\uDFF1]|\\uD81A[\\uDF3C-\\uDF3F\\uDF45]|\\uD82F\\uDC9C|\\uD833[\\uDC00-\\uDCEF\\uDCFA-\\uDCFC\\uDD00-\\uDEB3\\uDEBA-\\uDED0\\uDEE0-\\uDEF0\\uDF50-\\uDFC3]|\\uD834[\\uDC00-\\uDCF5\\uDD00-\\uDD26\\uDD29-\\uDD64\\uDD6A-\\uDD6C\\uDD83\\uDD84\\uDD8C-\\uDDA9\\uDDAE-\\uDDEA\\uDE00-\\uDE41\\uDE45\\uDF00-\\uDF56]|\\uD835[\\uDEC1\\uDEDB\\uDEFB\\uDF15\\uDF35\\uDF4F\\uDF6F\\uDF89\\uDFA9\\uDFC3]|\\uD836[\\uDC00-\\uDDFF\\uDE37-\\uDE3A\\uDE6D-\\uDE74\\uDE76-\\uDE83\\uDE85\\uDE86]|\\uD838[\\uDD4F\\uDEFF]|\\uD83B[\\uDCAC\\uDCB0\\uDD2E\\uDEF0\\uDEF1]|\\uD83C[\\uDC00-\\uDC2B\\uDC30-\\uDC93\\uDCA0-\\uDCAE\\uDCB1-\\uDCBF\\uDCC1-\\uDCCF\\uDCD1-\\uDCF5\\uDD0D-\\uDDAD\\uDDE6-\\uDE02\\uDE10-\\uDE3B\\uDE40-\\uDE48\\uDE50\\uDE51\\uDE60-\\uDE65\\uDF00-\\uDFFF]|\\uD83D[\\uDC00-\\uDED8\\uDEDC-\\uDEEC\\uDEF0-\\uDEFC\\uDF00-\\uDFD9\\uDFE0-\\uDFEB\\uDFF0]|\\uD83E[\\uDC00-\\uDC0B\\uDC10-\\uDC47\\uDC50-\\uDC59\\uDC60-\\uDC87\\uDC90-\\uDCAD\\uDCB0-\\uDCBB\\uDCC0\\uDCC1\\uDCD0-\\uDCD8\\uDD00-\\uDE57\\uDE60-\\uDE6D\\uDE70-\\uDE7C\\uDE80-\\uDE8A\\uDE8E-\\uDEC6\\uDEC8\\uDECD-\\uDEDC\\uDEDF-\\uDEEA\\uDEEF-\\uDEF8\\uDF00-\\uDF92\\uDF94-\\uDFEF\\uDFFA]/;\nconst Z = /[ \\xA0\\u1680\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000]/;\n\nexport { Any, Cc, Cf, P, S, Z };\n","// Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134\n/**\n * C1 Unicode control character reference replacements (code points 128–159).\n * Index i gives the replacement for code point 128+i; 0 means \"no replacement\".\n */\nconst c1 = [\n 8364, 0, 8218, 402, 8222, 8230, 8224, 8225, 710, 8240, 352, 8249, 338, 0,\n 381, 0, 0, 8216, 8217, 8220, 8221, 8226, 8211, 8212, 732, 8482, 353, 8250,\n 339, 0, 382, 376,\n];\n/**\n * True for NUL, UTF-16 surrogates, and values past U+10FFFF.\n * @param codePoint Unicode code point to check.\n */\nfunction isInvalidCodePoint(codePoint) {\n return (codePoint === 0 ||\n (codePoint >= 0xd8_00 && codePoint <= 0xdf_ff) ||\n codePoint > 0x10_ff_ff);\n}\n/**\n * Replace the given code point with U+FFFD if it is NUL (0), a surrogate, or\n * outside the valid Unicode range. Code points in the C1 controls range\n * (128–159) are remapped to their Windows-1252 equivalents, following the\n * HTML spec. All other code points are returned unchanged.\n * @param codePoint Unicode code point to convert.\n */\nexport function replaceCodePoint(codePoint) {\n if (isInvalidCodePoint(codePoint)) {\n return 0xff_fd;\n }\n if (codePoint >= 128 && codePoint <= 159) {\n return c1[codePoint - 128] || codePoint;\n }\n return codePoint;\n}\n/**\n * XML numeric character references are the referenced Unicode code point.\n * Invalid values still become U+FFFD; the HTML Windows-1252 C1 remap is not\n * applied.\n * @see https://www.w3.org/TR/xml/#NT-CharRef\n * @param codePoint Unicode code point to convert.\n */\nexport function replaceCodePointXML(codePoint) {\n return isInvalidCodePoint(codePoint) ? 0xff_fd : codePoint;\n}\n/**\n * Convert the code point of a decoded numeric entity to a string, replacing\n * invalid values.\n *\n * Fast path for plain BMP code points: [1..0x7F] and [0xA0..0xD7FF] pass\n * `replaceCodePoint` unchanged (no NUL, C1 remap, surrogate, or out-of-range\n * handling) and fit a single charCode. 0xd760 = 0xD800 (the first surrogate)\n * - 0xA0.\n * @param codePoint Unicode code point to convert.\n */\nexport function codePointToString(codePoint) {\n return (codePoint - 1) >>> 0 < 0x7f || (codePoint - 0xa0) >>> 0 < 0xd7_60\n ? String.fromCharCode(codePoint)\n : String.fromCodePoint(replaceCodePoint(codePoint));\n}\n//# sourceMappingURL=decode-codepoint.js.map","/*\n * Inverse of the encoder's SAFE alphabet (0x21..0x7E minus 0x22, 0x24, 0x5C),\n * precomputed once at module load. Entries for excluded chars stay 0 but\n * are never read.\n */\nconst BASE91_INVERSE = /* #__PURE__ */ (() => {\n const table = new Uint8Array(127);\n let code = 0;\n for (let char = 0x21; char <= 0x7e; char++) {\n if (char !== 0x22 && char !== 0x24 && char !== 0x5c) {\n table[char] = code++;\n }\n }\n return table;\n})();\n/**\n * Decode a dictionary-encoded trie string back into its Uint16Array.\n *\n * Stream layout (consumed in this order):\n * 1. dict1 atoms — `dict1AtomCount` uint16 values, delta+RLE encoded.\n * 2. dict2 atoms — `atomCount - dict1AtomCount` values, delta+RLE.\n * 3. dict2 ngrams — `ngramCount - (dictSize - dict1AtomCount)` entries,\n * each a pair of slot codes that resolve to earlier slots.\n * 4. dict1 ngrams — `dictSize - dict1AtomCount` entries, same shape.\n * 5. data — slot codes, each expanding to one or more uint16 values.\n *\n * Codes use a 91-char base (printable ASCII minus `\"`, `$`, `\\`):\n * - char1 < dictSize → 1-char code, slot = char1\n * - char1 ≥ dictSize → 2-char code, slot = dictSize + (char1 - dictSize)*91 + char2\n *\n * Slot index → token kind:\n * [0, A) dict1 atoms (1-char codes)\n * [A, dictSize) dict1 ngrams (1-char codes)\n * [dictSize, dictSize+D) dict2 atoms (2-char codes)\n * [dictSize+D, end) dict2 ngrams (2-char codes)\n *\n * Both atom dicts decode before any ngram, and dict2 ngrams decode before\n * dict1 ngrams. So every ngram entry references slots whose contents are\n * already filled — no forward references to handle.\n *\n * This runs on library import. Flat typed arrays store each slot as either\n * a plain value (`single`, covering every atom) or a range in a shared\n * `pool` (ngrams).\n * @param input Packed trie string.\n * @param resultLength Expected number of uint16 values in the output.\n * @param atomCount Total number of distinct uint16 values in the trie.\n * @param dict1AtomCount Atoms in the 1-char range (`A` above).\n * @param ngramCount Total number of ngram entries (dict1 + dict2).\n * @param dictSize Number of 1-char code slots; the rest of `BASE - dictSize`\n * first-byte values are 2-char codes.\n */\nexport function decodeTrieDict(input, resultLength, atomCount, dict1AtomCount, ngramCount, dictSize) {\n const base = 91;\n const inputLength = input.length;\n // For 2-char codes, slot = char1 * base - twoCharBias + char2.\n const twoCharBias = dictSize * (base - 1);\n let pos = 0;\n /** Read one slot code at `pos` and return its slot index, advancing pos. */\n const readSlotCode = () => {\n const c1 = BASE91_INVERSE[input.charCodeAt(pos++)];\n return c1 < dictSize\n ? c1\n : c1 * base - twoCharBias + BASE91_INVERSE[input.charCodeAt(pos++)];\n };\n const dict2AtomCount = atomCount - dict1AtomCount;\n const slotCount = atomCount + ngramCount;\n /*\n * Per-slot contents: atoms (always a single value) live directly in\n * `single`; ngram slots hold -1 there and expand to\n * `pool[start[slot] .. start[slot] + length[slot])`.\n */\n const single = new Int32Array(slotCount);\n single.fill(-1, dict1AtomCount, dictSize);\n single.fill(-1, dictSize + dict2AtomCount, slotCount);\n const start = new Int32Array(slotCount);\n const length = new Int32Array(slotCount);\n /**\n * Decode `count` ascending uint16 values from a delta+RLE stream into\n * `single[off..off+count)`.\n *\n * code < 89 → delta = code\n * code == 89 → run-length: next char encodes runLength-2; emit `runLength` consecutive +1 values\n * code == 90, next < 90 → escape: delta = 89 + next * BASE + after-next\n * code == 90, next == 90 → double-escape: extra char for very large deltas\n * @param count\n * @param off\n */\n function decodeDelta(count, off) {\n let previous = 0;\n let slot = off;\n const end = off + count;\n while (slot < end) {\n const code = BASE91_INVERSE[input.charCodeAt(pos++)];\n if (code < 89) {\n previous += code;\n single[slot++] = previous;\n }\n else if (code === 89) {\n let runLength = BASE91_INVERSE[input.charCodeAt(pos++)] + 2;\n while (runLength--)\n single[slot++] = ++previous;\n }\n else {\n const next = BASE91_INVERSE[input.charCodeAt(pos++)];\n previous +=\n 89 +\n // eslint-disable-next-line unicorn/prefer-minimal-ternary -- branches read a different number of side-effecting input bytes\n (next < 90\n ? next * base + BASE91_INVERSE[input.charCodeAt(pos++)]\n : BASE91_INVERSE[input.charCodeAt(pos++)] * 8281 +\n BASE91_INVERSE[input.charCodeAt(pos++)] * base +\n BASE91_INVERSE[input.charCodeAt(pos++)]);\n single[slot++] = previous;\n }\n }\n }\n // Streams 1 & 2: atoms decoded into their slot ranges.\n decodeDelta(dict1AtomCount, 0);\n decodeDelta(dict2AtomCount, dictSize);\n /*\n * Streams 3 & 4 are read in two passes: first collect every ngram's two\n * references and derive its expanded length (each ref resolves to an earlier\n * slot, so lengths are already known), which sizes the shared pool.\n * Pool ranges are handed out in decode order, so the second pass fills\n * the pool contiguously with a single write cursor.\n */\n const references = new Int32Array(ngramCount * 2);\n let poolSize = 0;\n let ngramIndex = 0;\n /**\n * Read `count` ngram entries (each = 2 slot-code references) for the slots\n * starting at `startSlot`, recording references and assigning pool ranges.\n * @param count\n * @param startSlot\n */\n function readNgramReferences(count, startSlot) {\n for (let index = 0; index < count; index++) {\n const slot = startSlot + index;\n const a = readSlotCode();\n const b = readSlotCode();\n references[ngramIndex * 2] = a;\n references[ngramIndex * 2 + 1] = b;\n ngramIndex += 1;\n start[slot] = poolSize;\n const entryLength = (single[a] < 0 ? length[a] : 1) +\n (single[b] < 0 ? length[b] : 1);\n length[slot] = entryLength;\n poolSize += entryLength;\n }\n }\n readNgramReferences(ngramCount - dictSize + dict1AtomCount, dictSize + dict2AtomCount);\n readNgramReferences(dictSize - dict1AtomCount, dict1AtomCount);\n // Second pass: concatenate each ngram's two halves into the pool.\n const pool = new Uint16Array(poolSize);\n let write = 0;\n for (let index = 0; index < ngramIndex; index++) {\n for (let half = 0; half < 2; half++) {\n const source = references[index * 2 + half];\n const value = single[source];\n if (value < 0) {\n let read = start[source];\n const readEnd = read + length[source];\n while (read < readEnd)\n pool[write++] = pool[read++];\n }\n else {\n pool[write++] = value;\n }\n }\n }\n // Stream 5: data. Each code expands to its slot's stored values.\n const out = new Uint16Array(resultLength);\n let outIndex = 0;\n while (pos < inputLength) {\n let slot = BASE91_INVERSE[input.charCodeAt(pos++)];\n if (slot >= dictSize) {\n slot =\n slot * base -\n twoCharBias +\n BASE91_INVERSE[input.charCodeAt(pos++)];\n }\n const value = single[slot];\n if (value < 0) {\n let read = start[slot];\n const readEnd = read + length[slot];\n while (read < readEnd)\n out[outIndex++] = pool[read++];\n }\n else {\n out[outIndex++] = value;\n }\n }\n return out;\n}\n//# sourceMappingURL=decode-shared.js.map","// Generated using scripts/write-decode-map.ts\nimport { decodeTrieDict } from \"../internal/decode-shared.js\";\n/** Packed HTML decode trie data. */\nexport const htmlDecodeTree = /* #__PURE__ */ decodeTrieDict(\"!}.&u%}'&}*'~!6*)%&,~!J~!J~%L~y<~!R,~~%Lu~~#GD~~#|)1#%}^%}2%+#.##%##%}&%##%'#%##&%#%#'%#&#%#&#'#%%#&#%##%#)%''%&%#%#'%#%%#%%}%%%#%#&(23#%%#&-%0%('1#(##%#'##+%'*.:1}#%#6-+(%'%%#%%%}#L'2351&('%}&/N'(0(/*-%(%%}#'+&T%7.2}#&%&#%#36/5##%&%%#&#%%#))2%%##%&&'0~!#*+&'%1~!%).'3q?&%'1~!.##%6(~!+%%%(Gw'rT~!E#<nA%#jZ~!H%(~!42##~!*31&~!G%U~#)5~#`3~!J~!Z~%]~%Y~%C~!q~!u~#kz~%#~!6'~!D~!U~!?~#T~!c%~!G#'~%7|~!G~!J~!G&~#pb~(Df}#%}*&}#%##%##%##&#-}&'#'&%#.++}%mI,#,@&(}*%}*'%&##&#%##%}&0}#.},U},%}+%}&%}#%##&}B%(}(%}+%)})%##%#&}&%##%&}<%}>%#%&}*%}(%}9%}/%})%}*%}*%}?&}&%}3%}&*#%})%#%#)}#&#-#+*%E%%'%'#%}#*V##&##I}#&&##%&%#&&Qf%%))w/0+&%#(#.%-''''++++7}>%4'',##1,#%#&%##&#'##&#*#9)%&%}#*}%,#+P(%A&%#'&##wSD',9E00#y#@}(+}&%&>~!#~!X}#*}(&&}(&}(,%}%&#+&}#&}I%#%}%)#(},'%#*}4%%#%}(''}#/##(##),%-##%%)#&}(.}&%#&}%%}*&#%},&&}&%}#%*'#%})%}D&}&%}-&}6&#&}-,%}#%})-(~+`~,=?~I9'9%~!,#%})%})%}@%}?%}(~!?~#<~#pP~#BG~#=1#%K+~#?#~%;)~#A~#mF1~#A'~'X%'~#lR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@xPhI(a*a#U#`a3-5Abb|L~@:RhK9:4E|0@52B5G|#C::aY?C2F|-:2<BaY?C2F|.5Jvk!a)javYrquJu3x4ia#T)2@SmYM?C2F|HAxPhH(!a#U#`a*-5Abb|4~@:RhJ9:4E|R@52B5G|F:2<BaY?C2F|Sc^#Xa2j=Qq5CJvB!-g<v{z;hhM?C2F|Zi[vrv{z;hiM?C2F|XKsA>!a)-g<v{z;h[eb?C2F|]i[vrv{z;h]eb?C2F|^iZu.vix,hZq3ah!.(?C2F|QOu!5ShXM:2<BaY?C2F|P\", 13_494, 2713, 49, 25, 61);\n//# sourceMappingURL=decode-data-html.js.map","/**\n * Bit flags & masks for the binary trie encoding used for entity decoding.\n *\n * The trie is a flat `Uint16Array`. Every node starts with one header word:\n *\n * 15..14 VALUE_LENGTH Number of words the value occupies, +1.\n * 0 = no value; 1 = value inline in bits 12..0;\n * 2/3 = value in the 1/2 words after the header.\n * 13 FLAG13 If VALUE_LENGTH > 0: semicolon required (\"strict\"\n * entity; `;` is never stored as a branch).\n * If VALUE_LENGTH == 0: this node is a compact run.\n * 12..7 BRANCH_LENGTH Number of branches (or run length for runs).\n * 6..0 JUMP_TABLE Jump-table offset / single-branch char / first\n * run char (see below).\n *\n * Branch data follows the header and any value words. Its shape is selected\n * by (JUMP_TABLE, BRANCH_LENGTH) in the header:\n *\n * Single branch JUMP_TABLE = the only child's char, BRANCH_LENGTH = 0.\n * No branch words; the child node follows immediately.\n * Jump table JUMP_TABLE = first covered char (> 0), BRANCH_LENGTH =\n * table length. One word per covered char: 0 = no branch,\n * otherwise the child's offset from the END of the table,\n * +1 (so 0 stays the no-branch sentinel).\n * Dictionary JUMP_TABLE = 0, BRANCH_LENGTH = number of branches.\n * ceil(n/2) words of sorted keys packed two per word\n * (low byte first), then n pointer words storing the\n * child's offset from the END of the branch data.\n * Compact run VALUE_LENGTH = 0, FLAG13 set. BRANCH_LENGTH = run\n * length (3..63), JUMP_TABLE = first char; remaining run\n * chars packed two per word after the header. The target\n * node follows the packed words immediately.\n *\n * Pointers are end-relative (rather than relative to the pointer's own\n * position) because that makes the common \"child encoded right after the\n * branch data\" case a small constant, which compresses far better. Offsets\n * to already-encoded (shared) nodes wrap via uint16 modulo arithmetic; the\n * decoder masks navigation results with `& 0xff_ff` to match.\n */\nexport var BinTrieFlags;\n(function (BinTrieFlags) {\n BinTrieFlags[BinTrieFlags[\"VALUE_LENGTH\"] = 49152] = \"VALUE_LENGTH\";\n BinTrieFlags[BinTrieFlags[\"FLAG13\"] = 8192] = \"FLAG13\";\n BinTrieFlags[BinTrieFlags[\"BRANCH_LENGTH\"] = 8064] = \"BRANCH_LENGTH\";\n BinTrieFlags[BinTrieFlags[\"JUMP_TABLE\"] = 127] = \"JUMP_TABLE\";\n /** Bits 12..0: the inline value of a VALUE_LENGTH = 1 header word. */\n BinTrieFlags[BinTrieFlags[\"VALUE_MASK\"] = 8191] = \"VALUE_MASK\";\n})(BinTrieFlags || (BinTrieFlags = {}));\n//# sourceMappingURL=bin-trie-flags.js.map","import { codePointToString, replaceCodePoint, replaceCodePointXML, } from \"./decode-codepoint.js\";\nimport { htmlDecodeTree } from \"./generated/decode-data-html.js\";\nimport { xmlDecodeTree } from \"./generated/decode-data-xml.js\";\nimport { BinTrieFlags } from \"./internal/bin-trie-flags.js\";\nvar CharCodes;\n(function (CharCodes) {\n CharCodes[CharCodes[\"AMP\"] = 38] = \"AMP\";\n CharCodes[CharCodes[\"NUM\"] = 35] = \"NUM\";\n CharCodes[CharCodes[\"SEMI\"] = 59] = \"SEMI\";\n CharCodes[CharCodes[\"EQUALS\"] = 61] = \"EQUALS\";\n CharCodes[CharCodes[\"ZERO\"] = 48] = \"ZERO\";\n CharCodes[CharCodes[\"NINE\"] = 57] = \"NINE\";\n CharCodes[CharCodes[\"LOWER_A\"] = 97] = \"LOWER_A\";\n CharCodes[CharCodes[\"LOWER_X\"] = 120] = \"LOWER_X\";\n})(CharCodes || (CharCodes = {}));\n/** Bit that needs to be set to convert an upper case ASCII character to lower case */\nconst TO_LOWER_BIT = 0b10_0000;\n/*\n * `parseNumericEntity` packs its two results into one 32-bit integer:\n * `(consumed << CONSUMED_SHIFT) | codePoint`. The 21-bit code point field\n * fits any valid Unicode value (max 0x10FFFF, clamped before packing); the\n * consumed count excludes `&` and gets the remaining 11 bits. Extract it\n * with `>>>` so the topmost bit isn't treated as a sign.\n *\n * Plain consts rather than a `const enum`: with `isolatedModules`, enum\n * member reads compile to runtime property loads.\n */\nconst CONSUMED_SHIFT = 21;\nconst CODE_POINT_MASK = 0x1f_ff_ff;\n/**\n * Reserved consumed field for counts of at least 2047 characters after `&`.\n * The true count is in `longNumericConsumed`.\n */\nconst CONSUMED_OVERFLOW = 0x7_ff;\n/**\n * Side channel for numeric entities of at least 2048 characters including\n * `&`. Set by `parseNumericEntity` when its consumed count reaches the\n * reserved value `CONSUMED_OVERFLOW`; callers read the true count from here.\n * A module-level slot avoids a tuple allocation on the hot path.\n */\nlet longNumericConsumed = 0;\n/**\n * Extract the consumed count from a `parseNumericEntity` packed result,\n * recovering the true length from `longNumericConsumed` when the packed\n * field contains the sentinel. Read it before the next `parseNumericEntity`\n * call, which may overwrite the side channel. This helper owns that protocol.\n * @param packed Packed result of `parseNumericEntity`.\n */\nfunction unpackConsumed(packed) {\n const consumed = packed >>> CONSUMED_SHIFT;\n return consumed === CONSUMED_OVERFLOW ? longNumericConsumed : consumed;\n}\n/**\n * Unsigned subtraction trick: (code - lo) >>> 0 wraps negatives to large\n * values, so a single `<=` covers the entire [lo..hi] range check.\n * @param code Code point to check.\n */\nfunction isNumber(code) {\n return (code - CharCodes.ZERO) >>> 0 <= 9;\n}\nfunction isHexadecimalCharacter(code) {\n return ((code | TO_LOWER_BIT) - CharCodes.LOWER_A) >>> 0 <= 5; // F - a\n}\nfunction isAlpha(code) {\n return ((code | TO_LOWER_BIT) - CharCodes.LOWER_A) >>> 0 <= 25; // Z - a\n}\n/**\n * Checks if the given character is a valid end character for an entity in an attribute.\n *\n * Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error.\n * See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state\n * @param code Code point to check.\n */\nfunction isEntityInAttributeInvalidEnd(code) {\n return code === CharCodes.EQUALS || isAlpha(code) || isNumber(code);\n}\nvar EntityDecoderState;\n(function (EntityDecoderState) {\n EntityDecoderState[EntityDecoderState[\"EntityStart\"] = 0] = \"EntityStart\";\n EntityDecoderState[EntityDecoderState[\"NumericStart\"] = 1] = \"NumericStart\";\n EntityDecoderState[EntityDecoderState[\"NumericDecimal\"] = 2] = \"NumericDecimal\";\n EntityDecoderState[EntityDecoderState[\"NumericHex\"] = 3] = \"NumericHex\";\n EntityDecoderState[EntityDecoderState[\"NamedEntity\"] = 4] = \"NamedEntity\";\n})(EntityDecoderState || (EntityDecoderState = {}));\n/**\n * Decoding mode for named entities.\n */\nexport var DecodingMode;\n(function (DecodingMode) {\n /** Entities in text nodes that can end with any character. */\n DecodingMode[DecodingMode[\"Legacy\"] = 0] = \"Legacy\";\n /** Only allow entities terminated with a semicolon. */\n DecodingMode[DecodingMode[\"Strict\"] = 1] = \"Strict\";\n /** Entities in attributes have limitations on ending characters. */\n DecodingMode[DecodingMode[\"Attribute\"] = 2] = \"Attribute\";\n})(DecodingMode || (DecodingMode = {}));\n/**\n * Token decoder with support of writing partial entities.\n */\nexport class EntityDecoder {\n decodeTree;\n emitCodePoint;\n errors;\n /** The current state of the decoder. */\n state = EntityDecoderState.EntityStart;\n /** Characters that were consumed while parsing an entity. */\n consumed = 1;\n /**\n * The result of the entity.\n *\n * For named entities: the trie index of the best legacy match so far\n * (0 = none). For numeric entities: the accumulated code point.\n */\n result = 0;\n /** The current index in the decode tree. */\n treeIndex = 0;\n /**\n * Characters consumed since the last recorded legacy match, plus one.\n * Invariant at the top of the `stateNamedEntity` loop: `excess` equals\n * the number of unrecorded consumed characters + 1.\n */\n // biome-ignore lint/correctness/noUnusedPrivateClassMembers: False positive (read via destructuring)\n excess = 1;\n /** The mode in which the decoder is operating. */\n decodeMode = DecodingMode.Strict;\n /** The number of characters that have been consumed in the current run. */\n // biome-ignore lint/correctness/noUnusedPrivateClassMembers: False positive\n runConsumed = 0;\n constructor(\n /** The predefined HTML or XML decode tree. */\n decodeTree, \n /**\n * The function that is called when a codepoint is decoded.\n *\n * For named entities that decode to multiple code points, this will\n * be called multiple times, with the second codepoint, and the same\n * `consumed` value.\n * @param codepoint The decoded codepoint.\n * @param consumed The number of characters consumed by the decoder.\n */\n emitCodePoint, \n /** An object that is used to produce errors. */\n errors) {\n this.decodeTree = decodeTree;\n this.emitCodePoint = emitCodePoint;\n this.errors = errors;\n }\n /**\n * Resets the instance to make it reusable.\n * @param decodeMode Entity decoding mode to use.\n */\n startEntity(decodeMode) {\n this.decodeMode = decodeMode;\n this.state = EntityDecoderState.EntityStart;\n this.result = 0;\n this.treeIndex = 0;\n this.excess = 1;\n this.consumed = 1;\n this.runConsumed = 0;\n }\n /**\n * Write an entity to the decoder. This can be called multiple times with partial entities.\n * If the entity is incomplete, the decoder will return -1.\n *\n * Mirrors the non-streaming `decodeWithTrie`, but with the ability to stop decoding if the\n * entity is incomplete, and resume when the next string is written.\n * @param input The string containing the entity (or a continuation of the entity).\n * @param offset The offset at which the entity begins. Should be 0 if this is not the first call.\n * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n */\n write(input, offset) {\n switch (this.state) {\n case EntityDecoderState.EntityStart: {\n if (input.charCodeAt(offset) === CharCodes.NUM) {\n this.state = EntityDecoderState.NumericStart;\n this.consumed += 1;\n return this.stateNumericStart(input, offset + 1);\n }\n this.state = EntityDecoderState.NamedEntity;\n return this.stateNamedEntity(input, offset);\n }\n case EntityDecoderState.NumericStart: {\n return this.stateNumericStart(input, offset);\n }\n case EntityDecoderState.NumericDecimal: {\n return this.stateNumericDecimal(input, offset);\n }\n case EntityDecoderState.NumericHex: {\n return this.stateNumericHex(input, offset);\n }\n default: {\n // NamedEntity — the only remaining state.\n return this.stateNamedEntity(input, offset);\n }\n }\n }\n /**\n * Switches between the numeric decimal and hexadecimal states.\n *\n * Equivalent to the `Numeric character reference state` in the HTML spec.\n * @param input The string containing the entity (or a continuation of the entity).\n * @param offset The current offset.\n * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n */\n // eslint-disable-next-line unicorn/consistent-class-member-order\n stateNumericStart(input, offset) {\n if (offset >= input.length) {\n return -1;\n }\n if ((input.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) {\n this.state = EntityDecoderState.NumericHex;\n this.consumed += 1;\n return this.stateNumericHex(input, offset + 1);\n }\n this.state = EntityDecoderState.NumericDecimal;\n return this.stateNumericDecimal(input, offset);\n }\n /**\n * Parses a hexadecimal numeric entity.\n *\n * Equivalent to the `Hexademical character reference state` in the HTML\n * spec. Digit parsing matches the hex loop in `parseNumericEntity`.\n * The accumulated value is preserved for numeric validation callbacks.\n * @param input The string containing the entity (or a continuation of the entity).\n * @param offset The current offset.\n * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n */\n stateNumericHex(input, offset) {\n const inputLength = input.length;\n // Local accumulators; flushed before any exit (see stateNamedEntity).\n let { result } = this;\n let { consumed } = this;\n while (offset < inputLength) {\n const char = input.charCodeAt(offset);\n if (isNumber(char) || isHexadecimalCharacter(char)) {\n // Convert hex digit to value (0-15); 'a'/'A' -> 10.\n const digit = char <= CharCodes.NINE\n ? char - CharCodes.ZERO\n : (char | TO_LOWER_BIT) - CharCodes.LOWER_A + 10;\n result = result * 16 + digit;\n consumed += 1;\n offset += 1;\n }\n else {\n this.result = result;\n this.consumed = consumed;\n return this.emitNumericEntity(char, 3);\n }\n }\n this.result = result;\n this.consumed = consumed;\n return -1; // Incomplete entity\n }\n /**\n * Parses a decimal numeric entity.\n *\n * Equivalent to the `Decimal character reference state` in the HTML\n * spec. Digit parsing matches the decimal loop in `parseNumericEntity`.\n * The accumulated value is preserved for numeric validation callbacks.\n * @param input The string containing the entity (or a continuation of the entity).\n * @param offset The current offset.\n * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n */\n stateNumericDecimal(input, offset) {\n const inputLength = input.length;\n // Local accumulators; flushed before any exit (see stateNamedEntity).\n let { result } = this;\n let { consumed } = this;\n while (offset < inputLength) {\n const digit = input.charCodeAt(offset) - CharCodes.ZERO;\n if (digit >>> 0 > 9) {\n this.result = result;\n this.consumed = consumed;\n return this.emitNumericEntity(digit + CharCodes.ZERO, 2);\n }\n result = result * 10 + digit;\n consumed += 1;\n offset += 1;\n }\n this.result = result;\n this.consumed = consumed;\n return -1; // Incomplete entity\n }\n /**\n * Validate and emit a numeric entity.\n *\n * Implements the logic from the `Hexademical character reference start\n * state` and `Numeric character reference end state` in the HTML spec.\n * @param lastCp The last code point of the entity. Used to see if the\n * entity was terminated with a semicolon.\n * @param expectedLength The minimum number of characters that should be\n * consumed. Used to validate that at least one digit\n * was consumed.\n * @returns The number of characters that were consumed.\n */\n emitNumericEntity(lastCp, expectedLength) {\n // Ensure we consumed at least one digit.\n if (this.consumed <= expectedLength) {\n this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed);\n return 0;\n }\n // Figure out if this is a legit end of the entity\n if (lastCp === CharCodes.SEMI) {\n this.consumed += 1;\n }\n else if (this.decodeMode === DecodingMode.Strict) {\n return 0;\n }\n this.emitCodePoint((this.decodeTree === xmlDecodeTree\n ? replaceCodePointXML\n : replaceCodePoint)(this.result), this.consumed);\n if (this.errors) {\n if (lastCp !== CharCodes.SEMI) {\n this.errors.missingSemicolonAfterCharacterReference();\n }\n this.errors.validateNumericCharacterReference(this.result);\n }\n return this.consumed;\n }\n /**\n * Flush locally-tracked walk state back to the fields, then emit the\n * recorded legacy match or reject (cold path — at most once per\n * entity). Called after failed navigation (leaf node, branch miss, or\n * compact-run mismatch). In attribute mode, reject if no legacy was\n * recorded at the current node, if we descended past it, or if the\n * pending input character is an invalid attribute terminator.\n * @param consumed Locally-tracked consumed count.\n * @param excess Locally-tracked excess count.\n * @param char Pending input character (may be the mismatching char).\n * @param valueLength Value length at the current trie node.\n */\n flushAndEmitLegacyOrReject(consumed, excess, char, valueLength) {\n this.consumed = consumed;\n this.excess = excess;\n return this.result === 0 ||\n (this.decodeMode === DecodingMode.Attribute &&\n (valueLength === 0 ||\n excess > 1 ||\n isEntityInAttributeInvalidEnd(char)))\n ? 0\n : this.emitNotTerminatedNamedEntity();\n }\n /**\n * Parses a named entity.\n *\n * Equivalent to the `Named character reference state` in the HTML spec.\n * @param input The string containing the entity (or a continuation of the entity).\n * @param offset The current offset.\n * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n */\n stateNamedEntity(input, offset) {\n const { decodeTree } = this;\n const inputLength = input.length;\n const isStrict = this.decodeMode === DecodingMode.Strict;\n /*\n * Local copies of the resumable walk state avoid per-character\n * field writes. They are flushed back to the fields\n * on every exit (chunk end, and before any emit helper that reads\n * them). `this.result` is only written at the (rare) record points,\n * so it stays a direct field write.\n *\n * Legacy-match recording happens in two idempotent places: at the\n * loop top when sitting on a value node, and in the chunk-end\n * epilogue (so `end()` sees matches that land exactly on a chunk\n * boundary). Recording applies `consumed += excess - 1; excess = 1`,\n * which is a no-op when repeated — the loop-top invariant is\n * `excess` = unrecorded consumed characters + 1.\n */\n let { treeIndex } = this;\n let { excess } = this;\n let { consumed } = this;\n let current = decodeTree[treeIndex];\n while (offset < inputLength) {\n /*\n * Descend through value-less jump-table nodes (including the\n * single-branch encoding) inline, mirroring `decodeWithTrie`:\n * this avoids a `determineBranch` call per level for the\n * dominant node shape — including the root on the first write.\n */\n while ((current &\n (BinTrieFlags.VALUE_LENGTH | BinTrieFlags.FLAG13)) ===\n 0 &&\n (current & BinTrieFlags.JUMP_TABLE) !== 0) {\n const char = input.charCodeAt(offset);\n const jumpOffset = current & BinTrieFlags.JUMP_TABLE;\n const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;\n if (branchCount === 0) {\n // Single branch encoded inline in the jump offset bits.\n if (char !== jumpOffset) {\n return this.flushAndEmitLegacyOrReject(consumed, excess, char, 0);\n }\n treeIndex += 1;\n }\n else {\n const slot = char - jumpOffset;\n if (slot >>> 0 >= branchCount) {\n return this.flushAndEmitLegacyOrReject(consumed, excess, char, 0);\n }\n const stored = decodeTree[treeIndex + 1 + slot];\n if (stored === 0) {\n return this.flushAndEmitLegacyOrReject(consumed, excess, char, 0);\n }\n // End-relative: branch data ends at treeIndex+1+branchCount.\n treeIndex = (treeIndex + branchCount + stored) & 0xff_ff;\n }\n current = decodeTree[treeIndex];\n offset += 1;\n excess += 1;\n /*\n * `charCodeAt` past the end returns NaN, which would alias\n * to slot 0 after `>>> 0` — bail out explicitly.\n */\n // eslint-disable-next-line unicorn/no-break-in-nested-loop\n if (offset >= inputLength)\n break;\n }\n if (offset >= inputLength)\n break;\n // Handle compact runs (resumable across chunks).\n if ((current &\n (BinTrieFlags.VALUE_LENGTH | BinTrieFlags.FLAG13)) ===\n BinTrieFlags.FLAG13) {\n const runLength = (current & BinTrieFlags.BRANCH_LENGTH) >> 7; /* 3..63 */\n let { runConsumed } = this;\n // If we are starting a run, check the first char.\n if (runConsumed === 0) {\n const char = input.charCodeAt(offset);\n if (char !== (current & BinTrieFlags.JUMP_TABLE)) {\n return this.flushAndEmitLegacyOrReject(consumed, excess, char, 0);\n }\n offset += 1;\n excess += 1;\n runConsumed = 1;\n }\n // Check remaining characters in the run (packed two per uint16 word).\n while (runConsumed < runLength) {\n if (offset >= inputLength) {\n this.treeIndex = treeIndex;\n this.excess = excess;\n this.consumed = consumed;\n this.runConsumed = runConsumed;\n return -1;\n }\n const charIndexInPacked = runConsumed - 1;\n const packedWord = decodeTree[treeIndex + 1 + (charIndexInPacked >> 1)];\n const expectedChar = (packedWord >> ((charIndexInPacked & 1) << 3)) & 0xff;\n const char = input.charCodeAt(offset);\n if (char !== expectedChar) {\n this.runConsumed = 0;\n return this.flushAndEmitLegacyOrReject(consumed, excess, char, 0);\n }\n offset += 1;\n excess += 1;\n runConsumed += 1;\n }\n this.runConsumed = 0;\n treeIndex += 1 + (runLength >> 1);\n current = decodeTree[treeIndex];\n // Loop top handles the landed-on node (record/emit/branch).\n continue;\n }\n // Header plus out-of-line value words; 0 means no value.\n const valueLength = current >>> 14;\n const char = input.charCodeAt(offset);\n if (valueLength !== 0) {\n // Record a legacy match (FLAG13 clear = semicolon optional).\n if (!isStrict && (current & BinTrieFlags.FLAG13) === 0) {\n this.result = treeIndex;\n consumed += excess - 1;\n excess = 1;\n }\n /*\n * Implicit semicolon handling: emit immediately. Covers both\n * strict (FLAG13 set) and legacy entities — neither stores\n * an explicit `;` branch in the trie.\n */\n if (char === CharCodes.SEMI) {\n return this.emitNamedEntityData(treeIndex, valueLength, consumed + excess);\n }\n /*\n * `valueLength === 1` packs the codepoint into the header\n * word's low 13 bits, where branch metadata also lives. Skip\n * the branch lookup on leaves so those value bits aren't\n * reinterpreted as branch offsets.\n */\n if (valueLength === 1) {\n return this.flushAndEmitLegacyOrReject(consumed, excess, char, valueLength);\n }\n }\n // Value-bearing or dictionary node: dispatch through determineBranch.\n const next = determineBranch(decodeTree, current, treeIndex + (valueLength || 1), char);\n if (next < 0) {\n return this.flushAndEmitLegacyOrReject(consumed, excess, char, valueLength);\n }\n treeIndex = next;\n current = decodeTree[treeIndex];\n offset += 1;\n excess += 1;\n }\n /*\n * Chunk exhausted. Record a legacy match we may be sitting on, so a\n * subsequent `end()` emits it, then persist the walk state.\n */\n if (!isStrict &&\n current >>> 14 !== 0 &&\n (current & BinTrieFlags.FLAG13) === 0) {\n this.result = treeIndex;\n consumed += excess - 1;\n excess = 1;\n }\n this.treeIndex = treeIndex;\n this.excess = excess;\n this.consumed = consumed;\n return -1;\n }\n /**\n * Emit a named entity that was not terminated with a semicolon.\n * @returns The number of characters consumed.\n */\n emitNotTerminatedNamedEntity() {\n const { result, decodeTree } = this;\n const valueLength = decodeTree[result] >>> 14;\n this.emitNamedEntityData(result, valueLength, this.consumed);\n this.errors?.missingSemicolonAfterCharacterReference();\n return this.consumed;\n }\n /**\n * Emit a named entity.\n * @param result The index of the entity in the decode tree.\n * @param valueLength Encoded value length (header plus any value words).\n * @param consumed The number of characters consumed.\n * @returns The number of characters consumed.\n */\n emitNamedEntityData(result, valueLength, consumed) {\n const { decodeTree } = this;\n this.emitCodePoint(valueLength === 1\n ? decodeTree[result] & BinTrieFlags.VALUE_MASK\n : decodeTree[result + 1], consumed);\n if (valueLength === 3) {\n // Emit the second UTF-16 code unit.\n this.emitCodePoint(decodeTree[result + 2], consumed);\n }\n return consumed;\n }\n /**\n * Signal to the parser that the end of the input was reached.\n *\n * Remaining data will be emitted and relevant errors will be produced.\n * @returns The number of characters consumed.\n */\n end() {\n switch (this.state) {\n case EntityDecoderState.NamedEntity: {\n // Emit a named entity if we have one.\n return this.result !== 0 &&\n (this.decodeMode !== DecodingMode.Attribute ||\n this.result === this.treeIndex)\n ? this.emitNotTerminatedNamedEntity()\n : 0;\n }\n // Otherwise, emit a numeric entity if we have one.\n case EntityDecoderState.NumericDecimal: {\n return this.emitNumericEntity(0, 2);\n }\n case EntityDecoderState.NumericHex: {\n return this.emitNumericEntity(0, 3);\n }\n case EntityDecoderState.NumericStart: {\n this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed);\n return 0;\n }\n default: {\n // EntityStart or unknown — return 0.\n return 0;\n }\n }\n }\n}\n/**\n * Determines the branch of the current node that is taken given the current\n * character. This function is used to traverse the trie.\n *\n * See `BinTrieFlags` for the branch-data layouts handled here.\n * @param decodeTree The trie.\n * @param current The current node's header word.\n * @param nodeIndex Index of the node's first branch-data word (the header\n * plus any value words have been skipped by the caller).\n * @param char The current character.\n * @returns The index of the next node, or -1 if no branch is taken.\n */\nexport function determineBranch(decodeTree, current, nodeIndex, char) {\n const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;\n const jumpOffset = current & BinTrieFlags.JUMP_TABLE;\n // Case 1: Single branch or jump table (jumpOffset encodes the first/only char code).\n if (jumpOffset) {\n if (branchCount === 0) {\n // Single branch encoded inline in the jump offset bits.\n return char === jumpOffset ? nodeIndex : -1;\n }\n /*\n * Jump table: branchCount consecutive slots starting at jumpOffset.\n * Unsigned comparison handles both < 0 and >= branchCount in one check.\n */\n const slot = char - jumpOffset;\n if (slot >>> 0 >= branchCount)\n return -1;\n const stored = decodeTree[nodeIndex + slot];\n /*\n * 0 = empty slot (no branch); otherwise the child's offset from the\n * end of the branch array, +1 (end-relative pointers compress\n * better). `& 0xff_ff` mirrors the encoder's uint16 wrap for\n * backreferences to already-encoded nodes.\n */\n return stored === 0\n ? -1\n : (nodeIndex + branchCount + stored - 1) & 0xff_ff;\n }\n /*\n * Case 2: Packed dictionary. Linear scan — over 90% of dict nodes have\n * <= 4 branches in the HTML trie, where the constant-factor savings\n * dominate over binary search's asymptotic edge.\n */\n if (branchCount === 0)\n return -1;\n const packedKeySlots = (branchCount + 1) >> 1;\n const branchEnd = nodeIndex + packedKeySlots + branchCount;\n for (let index = 0; index < branchCount; index++) {\n const packed = decodeTree[nodeIndex + (index >> 1)];\n const key = (packed >> ((index & 1) << 3)) & 0xff;\n if (key === char) {\n const pointerIndex = nodeIndex + packedKeySlots + index;\n // Pointers are relative to the end of the branch data.\n return (branchEnd + decodeTree[pointerIndex]) & 0xff_ff;\n }\n // Keys are sorted; if we've passed `char`, no match is possible.\n if (key > char)\n return -1;\n }\n return -1;\n}\n/**\n * Read the decoded value from a trie node.\n * @param decodeTree The trie.\n * @param nodeIndex The index of the node.\n * @param valueLength The length of the value (1, 2, or 3).\n * @returns The decoded string.\n */\nfunction readTrieValue(decodeTree, nodeIndex, valueLength) {\n if (valueLength === 1) {\n return String.fromCharCode(decodeTree[nodeIndex] & BinTrieFlags.VALUE_MASK);\n }\n if (valueLength === 2) {\n return String.fromCharCode(decodeTree[nodeIndex + 1]);\n }\n return String.fromCharCode(decodeTree[nodeIndex + 1], decodeTree[nodeIndex + 2]);\n}\n/**\n * Parse a numeric entity (`&#DDD;` or `&#xHHH;`).\n *\n * Encodes the result as `(consumed << CONSUMED_SHIFT) | codepoint` (see\n * the packing comment at the top of the file; overlong entities spill\n * their length into `longNumericConsumed`). Returns 0 when no digits were\n * found.\n *\n * This is the sync counterpart of the streaming\n * `EntityDecoder#stateNumericDecimal` / `#stateNumericHex`. Digit parsing\n * matches those methods; only this packed result needs a value clamp.\n * @param input The input string.\n * @param numberStart Index of the `#` character.\n * @param inputLength Cached `input.length`.\n */\nfunction parseNumericEntity(input, numberStart, inputLength) {\n let offset = numberStart + 1; // Skip \"#\"\n let cp = 0;\n let digitStart = offset;\n /*\n * Separate decimal and hexadecimal loops: each multiplies by a constant\n * and runs a single digit test, instead of a per-character base check.\n */\n if (offset < inputLength &&\n (input.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) {\n offset += 1;\n digitStart = offset;\n while (offset < inputLength) {\n const char = input.charCodeAt(offset);\n if (isNumber(char)) {\n cp = cp * 16 + (char - CharCodes.ZERO);\n }\n else if (isHexadecimalCharacter(char)) {\n cp = cp * 16 + ((char | TO_LOWER_BIT) - CharCodes.LOWER_A + 10);\n }\n else {\n break;\n }\n offset += 1;\n }\n }\n else {\n while (offset < inputLength) {\n const digit = input.charCodeAt(offset) - CharCodes.ZERO;\n if (digit >>> 0 > 9)\n break;\n cp = cp * 10 + digit;\n offset += 1;\n }\n }\n if (offset === digitStart)\n return 0;\n // Include the semicolon in consumed when present.\n if (offset < inputLength && input.charCodeAt(offset) === CharCodes.SEMI) {\n offset += 1;\n }\n /*\n * Clamp out-of-range values to 0x110000 so they fit the 21-bit field\n * and decode to U+FFFD. Lengths at or above CONSUMED_OVERFLOW use the\n * side channel described with the packing constants.\n */\n if (cp > 0x10_ff_ff)\n cp = 0x11_00_00;\n let consumed = offset - numberStart;\n if (consumed >= CONSUMED_OVERFLOW) {\n // eslint-disable-next-line unicorn/no-top-level-assignment-in-function -- deliberate side channel, see `longNumericConsumed`\n longNumericConsumed = consumed;\n consumed = CONSUMED_OVERFLOW;\n }\n return (consumed << CONSUMED_SHIFT) | cp;\n}\n/**\n * Decode all entities in `input` using the HTML trie.\n *\n * Hard-wired to `htmlDecodeTree`: the inline root navigation below assumes\n * the HTML root's jump-table shape, so this must not be generalized to\n * other tries (the XML trie's dictionary root would silently match no\n * entities — `decodeXML` has its own hand-coded fast path instead).\n * @param input The string to decode.\n * @param isStrict Only match semicolon-terminated entities.\n * @param isAttribute Whether to apply attribute-specific parsing rules (disallowing certain non-semicolon terminators).\n * @returns The decoded string.\n */\nfunction decodeWithTrie(input, isStrict, isAttribute) {\n const decodeTree = htmlDecodeTree;\n // Fast path: no entities at all — return input without any allocation.\n let offset = input.indexOf(\"&\");\n if (offset < 0)\n return input;\n const inputLength = input.length;\n /*\n * `chunkStart` marks the start of the next pending slice. Rejected\n * entities don't advance it, so consecutive rejections are stitched\n * into a single `slice` once a real match (or end of input) is hit.\n */\n let chunkStart = 0;\n let result = \"\";\n /*\n * Root navigation fields, hoisted out of the per-entity loop. The HTML\n * root is a multi-branch jump-table covering [A-Za-z]; see the inline\n * first-iteration comment below.\n */\n const root = decodeTree[0];\n const rootJumpOffset = root & BinTrieFlags.JUMP_TABLE;\n const rootBranchCount = (root & BinTrieFlags.BRANCH_LENGTH) >> 7;\n do {\n const entityStart = offset + 1;\n // Quick check: entity names must start with [A-Za-z], numeric with #.\n const firstChar = input.charCodeAt(entityStart);\n let consumed;\n let value;\n if (firstChar === CharCodes.NUM) {\n const packed = parseNumericEntity(input, entityStart, inputLength);\n consumed = unpackConsumed(packed);\n // In strict mode, require semicolon termination.\n if (isStrict &&\n consumed > 0 &&\n input.charCodeAt(entityStart + consumed - 1) !== CharCodes.SEMI) {\n consumed = 0;\n }\n value =\n consumed === 0\n ? \"\"\n : codePointToString(packed & CODE_POINT_MASK);\n }\n else if (isAlpha(firstChar)) {\n consumed = 0;\n value = \"\";\n /*\n * The generator guarantees a jump-table root. Consume the first\n * character directly, then walk from its child.\n */\n const rootSlotIndex = firstChar - rootJumpOffset;\n let nodeIndex;\n if (rootSlotIndex >>> 0 < rootBranchCount) {\n const stored = decodeTree[1 + rootSlotIndex];\n nodeIndex =\n stored === 0 ? -1 : (rootBranchCount + stored) & 0xff_ff;\n }\n else {\n nodeIndex = -1;\n }\n /*\n * Best legacy (no-semicolon) match so far, as trie coordinates.\n * Deferring `readTrieValue` to the end avoids allocating a\n * string for matches that longer matches supersede.\n */\n let bestNodeIndex = 0;\n let bestValueLength = 0;\n let current = nodeIndex < 0 ? 0 : decodeTree[nodeIndex];\n let index = entityStart + 1;\n /*\n * Walk the trie from the root child. The `trie` label lets the\n * inner descent and compact-run loops abandon the entity (and\n * fall through to the legacy/reject handling) directly.\n */\n trie: while (index < inputLength) {\n /*\n * Inline value-less jump tables and single branches. A miss\n * falls through to the recorded legacy match or rejection.\n */\n while (\n // Value-less, non-run node with a nonzero jump offset.\n (current &\n (BinTrieFlags.VALUE_LENGTH | BinTrieFlags.FLAG13)) ===\n 0 &&\n (current & BinTrieFlags.JUMP_TABLE) !== 0) {\n const jumpOffset = current & BinTrieFlags.JUMP_TABLE;\n const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;\n if (branchCount === 0) {\n // Single branch encoded inline in the jump offset bits.\n if (input.charCodeAt(index) !== jumpOffset)\n break trie;\n nodeIndex += 1;\n }\n else {\n const slot = input.charCodeAt(index) - jumpOffset;\n if (slot >>> 0 >= branchCount)\n break trie;\n const stored = decodeTree[nodeIndex + 1 + slot];\n if (stored === 0)\n break trie;\n // End-relative: branch data ends at nodeIndex+1+branchCount.\n nodeIndex =\n (nodeIndex + branchCount + stored) & 0xff_ff;\n }\n current = decodeTree[nodeIndex];\n index += 1;\n /*\n * `charCodeAt` past the end returns NaN, which would\n * alias to slot 0 after `>>> 0` — bail out explicitly.\n */\n if (index >= inputLength)\n break trie;\n }\n // FLAG13 without a value marks a compact run.\n if ((current &\n (BinTrieFlags.VALUE_LENGTH | BinTrieFlags.FLAG13)) ===\n BinTrieFlags.FLAG13) {\n const runLength = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;\n // Check first char (stored in JUMP_TABLE bits).\n if (input.charCodeAt(index) !==\n (current & BinTrieFlags.JUMP_TABLE)) {\n // eslint-disable-next-line unicorn/no-break-in-nested-loop\n break;\n }\n index += 1;\n // Check remaining characters (packed two per uint16 word).\n const remaining = runLength - 1;\n let wordIndex = nodeIndex + 1;\n let charIndexInPacked = 0;\n /*\n * Process pairs: read one packed word, compare low byte then high byte.\n * No explicit bounds check needed — charCodeAt returns NaN for OOB,\n * which never equals an integer, so the mismatch break fires naturally.\n */\n for (; charIndexInPacked + 1 < remaining; charIndexInPacked += 2) {\n const packed = decodeTree[wordIndex];\n if (input.charCodeAt(index) !== (packed & 0xff))\n break trie;\n index += 1;\n if (input.charCodeAt(index) !== ((packed >> 8) & 0xff))\n break trie;\n index += 1;\n wordIndex += 1;\n }\n // Handle odd trailing char.\n if (charIndexInPacked < remaining) {\n if (input.charCodeAt(index) !==\n (decodeTree[wordIndex] & 0xff))\n // eslint-disable-next-line unicorn/no-break-in-nested-loop\n break;\n index += 1;\n }\n nodeIndex += 1 + (runLength >> 1);\n current = decodeTree[nodeIndex];\n // eslint-disable-next-line unicorn/no-break-in-nested-loop\n continue;\n }\n // Header plus out-of-line value words; 0 means no value.\n const valueLength = current >>> 14;\n const char = input.charCodeAt(index);\n /*\n * Check current node for a value before navigating.\n * This handles both: (a) values reached via compact runs on the\n * previous iteration, and (b) values at regular branch targets.\n */\n if (valueLength !== 0) {\n // If char is `;`, emit immediately.\n if (char === CharCodes.SEMI) {\n consumed = index - entityStart + 1;\n // Inline leaves carry the value in the low 13 bits.\n value =\n valueLength === 1\n ? String.fromCharCode(current & BinTrieFlags.VALUE_MASK)\n : readTrieValue(decodeTree, nodeIndex, valueLength);\n // eslint-disable-next-line unicorn/no-break-in-nested-loop\n break;\n }\n // Record non-terminated (legacy) match (FLAG13 clear = semicolon optional).\n if (!isStrict && (current & BinTrieFlags.FLAG13) === 0) {\n consumed = index - entityStart;\n bestNodeIndex = nodeIndex;\n bestValueLength = valueLength;\n }\n /*\n * A valueLength of 1 means the value is packed inline in the header\n * word — these are always leaf nodes with no branches, so we can\n * stop walking the trie.\n */\n // eslint-disable-next-line unicorn/no-break-in-nested-loop\n if (valueLength === 1)\n break;\n }\n // Navigate to the next node (valueLength || 1: skip past value words, minimum 1 for header).\n const next = determineBranch(decodeTree, current, nodeIndex + (valueLength || 1), char);\n // eslint-disable-next-line unicorn/no-break-in-nested-loop\n if (next < 0)\n break;\n nodeIndex = next;\n current = decodeTree[nodeIndex];\n index += 1;\n }\n /*\n * Post-loop: if the semicolon path didn't set value,\n * check for a final legacy match. The last navigation may\n * have landed on a legacy node whose value hasn't been\n * recorded yet (loop exited before the top-of-loop check\n * could run).\n */\n if (value === \"\") {\n const finalVL = current >>> 14;\n if (finalVL !== 0 &&\n !isStrict &&\n (current & BinTrieFlags.FLAG13) === 0) {\n consumed = index - entityStart;\n bestNodeIndex = nodeIndex;\n bestValueLength = finalVL;\n }\n if (consumed > 0) {\n value = readTrieValue(decodeTree, bestNodeIndex, bestValueLength);\n }\n }\n }\n else {\n consumed = 0;\n value = \"\";\n }\n /*\n * The attribute end-char rule (HTML spec §13.2.5.73) only applies to\n * unterminated *named* references. Semicolon-terminated entities and\n * numeric entities are always accepted, matching EntityDecoder behavior.\n *\n * When `attribute` is false (the common case), short-circuit skips all\n * the unterminated-named checks entirely.\n */\n if (consumed === 0 ||\n (isAttribute &&\n firstChar !== CharCodes.NUM &&\n input.charCodeAt(entityStart + consumed - 1) !==\n CharCodes.SEMI &&\n entityStart + consumed < inputLength &&\n isEntityInAttributeInvalidEnd(input.charCodeAt(entityStart + consumed)))) {\n // Rejected: leave `&` in the pending chunk, scan past it.\n offset = entityStart;\n }\n else {\n if (chunkStart < offset) {\n result += input.slice(chunkStart, offset);\n }\n result += value;\n offset = chunkStart = entityStart + consumed;\n }\n /*\n * Adjacent entities (`&x;&y;`) are common in entity-dense input;\n * checking the single character at `offset` first skips the\n * `indexOf` call (and its per-call overhead) for that case.\n */\n if (input.charCodeAt(offset) !== CharCodes.AMP) {\n offset = input.indexOf(\"&\", offset);\n }\n } while (offset >= 0);\n return result + input.slice(chunkStart);\n}\n/**\n * Decodes an HTML string.\n * @param htmlString The string to decode.\n * @param mode The decoding mode.\n * @returns The decoded string.\n */\nexport function decodeHTML(htmlString, mode = DecodingMode.Legacy) {\n return decodeWithTrie(htmlString, mode === DecodingMode.Strict, mode === DecodingMode.Attribute);\n}\n/**\n * Decodes an HTML string in an attribute.\n * @param htmlAttribute The string to decode.\n * @returns The decoded string.\n */\nexport function decodeHTMLAttribute(htmlAttribute) {\n return decodeWithTrie(htmlAttribute, false, true);\n}\n/**\n * Decodes an HTML string, requiring all entities to be terminated by a semicolon.\n * @param htmlString The string to decode.\n * @returns The decoded string.\n */\nexport function decodeHTMLStrict(htmlString) {\n return decodeWithTrie(htmlString, true, false);\n}\n/**\n * Decodes an XML string, requiring all entities to be terminated by a semicolon.\n *\n * Uses a hand-coded fast path for the 5 XML named entities (amp, lt, gt,\n * quot, apos) plus numeric entities, bypassing the trie entirely.\n * @param xmlString The string to decode.\n * @returns The decoded string.\n */\nexport function decodeXML(xmlString) {\n let offset = xmlString.indexOf(\"&\");\n if (offset < 0)\n return xmlString;\n let lastIndex = 0;\n let result = \"\";\n do {\n const start = offset + 1;\n let consumed = 0;\n let value = \"\";\n const c1 = xmlString.charCodeAt(start);\n if (c1 === CharCodes.NUM) {\n const packed = parseNumericEntity(xmlString, start, xmlString.length);\n consumed = unpackConsumed(packed);\n // XML is always strict — require semicolon.\n if (consumed === 0 ||\n xmlString.charCodeAt(start + consumed - 1) !== CharCodes.SEMI) {\n consumed = 0;\n }\n else {\n const codePoint = packed & CODE_POINT_MASK;\n // Nonzero BMP values below the surrogate range need no replacement.\n value =\n (codePoint - 1) >>> 0 < 0xd7_ff\n ? String.fromCharCode(codePoint)\n : String.fromCodePoint(replaceCodePointXML(codePoint));\n }\n }\n else {\n /* eslint-disable unicorn/no-break-in-nested-loop -- Keep XML name dispatch inline with the decode loop. */\n switch (c1) {\n // &lt; / &gt;\n case 0x6c:\n case 0x67: {\n if (xmlString.charCodeAt(start + 1) === 0x74 &&\n xmlString.charCodeAt(start + 2) === CharCodes.SEMI) {\n consumed = 3;\n value = c1 === 0x6c ? \"<\" : \">\";\n }\n break;\n }\n // &amp; / &apos;\n case 0x61: {\n const c2 = xmlString.charCodeAt(start + 1);\n if (c2 === 0x6d &&\n xmlString.charCodeAt(start + 2) === 0x70 &&\n xmlString.charCodeAt(start + 3) === CharCodes.SEMI) {\n consumed = 4;\n value = \"&\";\n }\n else if (c2 === 0x70 &&\n xmlString.charCodeAt(start + 2) === 0x6f &&\n xmlString.charCodeAt(start + 3) === 0x73 &&\n xmlString.charCodeAt(start + 4) === CharCodes.SEMI) {\n consumed = 5;\n value = \"'\";\n }\n break;\n }\n // &quot;\n case 0x71: {\n if (xmlString.charCodeAt(start + 1) === 0x75 &&\n xmlString.charCodeAt(start + 2) === 0x6f &&\n xmlString.charCodeAt(start + 3) === 0x74 &&\n xmlString.charCodeAt(start + 4) === CharCodes.SEMI) {\n consumed = 5;\n value = '\"';\n }\n break;\n }\n }\n /* eslint-enable unicorn/no-break-in-nested-loop */\n }\n if (consumed > 0) {\n if (lastIndex < offset)\n result += xmlString.slice(lastIndex, offset);\n result += value;\n offset = lastIndex = start + consumed;\n }\n else {\n offset = start;\n }\n /*\n * Adjacent entities (`&x;&y;`) are common in entity-dense input;\n * checking the single character at `lastIndex` first skips the\n * `indexOf` call (and its per-call overhead) for that case.\n */\n offset =\n xmlString.charCodeAt(offset) === CharCodes.AMP\n ? offset\n : xmlString.indexOf(\"&\", offset);\n } while (offset >= 0);\n return result + xmlString.slice(lastIndex);\n}\nexport { replaceCodePoint, replaceCodePointXML, } from \"./decode-codepoint.js\";\n// Re-export for use by eg. htmlparser2\nexport { htmlDecodeTree } from \"./generated/decode-data-html.js\";\nexport { xmlDecodeTree } from \"./generated/decode-data-xml.js\";\n//# sourceMappingURL=decode.js.map","import { Any, Cc, P, Z } from \"uc.micro\";\n//#region src/rebuilder.ts\nvar REBuilder = class {\n\tsrc_Any = Any.source;\n\tsrc_Cc = Cc.source;\n\tsrc_Z = Z.source;\n\tsrc_P = P.source;\n\tsrc_ZPCc = [\n\t\tthis.src_Z,\n\t\tthis.src_P,\n\t\tthis.src_Cc\n\t].join(\"|\");\n\tsrc_ZCc = [this.src_Z, this.src_Cc].join(\"|\");\n\tcache = {};\n\topts = {\n\t\tmaxLength: 1e4,\n\t\turlAuth: false,\n\t\tschema_names: []\n\t};\n\tconstructor(opts = {}) {\n\t\tthis.opts = {\n\t\t\t...this.opts,\n\t\t\t...opts\n\t\t};\n\t}\n\tset(opts = {}) {\n\t\tthis.opts = {\n\t\t\t...this.opts,\n\t\t\t...opts\n\t\t};\n\t\tthis.cache = {};\n\t\treturn this;\n\t}\n\tescapeRE(str) {\n\t\treturn str.replace(/[.?*+^$[\\]\\\\(){}|-]/g, \"\\\\$&\");\n\t}\n\tnestedPairRE(open, close, depth = 4) {\n\t\tconst openRE = this.escapeRE(open);\n\t\tconst closeRE = this.escapeRE(close);\n\t\tconst atom = `(?:(?!${this.src_ZCc}|${openRE}|${closeRE}).)`;\n\t\tlet pair = `${openRE}${atom}{0,1000}${closeRE}`;\n\t\tfor (let level = 2; level <= depth; level++) pair = `${openRE}(?:${atom}|${pair}){0,1000}${closeRE}`;\n\t\treturn pair;\n\t}\n\tget_text_separators() {\n\t\treturn this.cache.text_separators ??= /[><\\uff5c]/;\n\t}\n\tget_pseudo_letter() {\n\t\treturn this.cache.src_pseudo_letter ??= new RegExp(`(?:(?!${this.get_text_separators().source}|${this.src_ZPCc})${this.src_Any})`);\n\t}\n\tget_ipv4_addr() {\n\t\treturn this.cache.src_ip4 ??= /* @__PURE__ */ new RegExp(\"(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])[.]){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\");\n\t}\n\tget_ipv6_addr() {\n\t\tconst h16 = \"[0-9A-Fa-f]{1,4}\";\n\t\tconst ls32 = `(?:(?:${h16}:${h16})|${this.get_ipv4_addr().source})`;\n\t\treturn this.cache.src_ip6_addr ??= new RegExp(`(?:(?:${h16}:){6}${ls32}|::(?:${h16}:){5}${ls32}|(?:${h16})?::(?:${h16}:){4}${ls32}|(?:(?:${h16}:){0,1}${h16})?::(?:${h16}:){3}${ls32}|(?:(?:${h16}:){0,2}${h16})?::(?:${h16}:){2}${ls32}|(?:(?:${h16}:){0,3}${h16})?::${h16}:${ls32}|(?:(?:${h16}:){0,4}${h16})?::${ls32}|(?:(?:${h16}:){0,5}${h16})?::${h16}|(?:(?:${h16}:){0,6}${h16})?::)`);\n\t}\n\tget_ipv6_url_host() {\n\t\treturn this.cache.src_ip6_host ??= new RegExp(`\\\\[${this.get_ipv6_addr().source}\\\\]`);\n\t}\n\tget_ipv6_mail_host() {\n\t\treturn this.cache.src_ipv6_mail_host ??= new RegExp(`\\\\[IPv6:${this.get_ipv6_addr().source}\\\\]`);\n\t}\n\tget_auth() {\n\t\treturn this.cache.src_auth ??= new RegExp(`(?:(?:(?!${this.src_ZCc}|[@/\\\\[\\\\]()]).){1,50}@)?`);\n\t}\n\tget_port() {\n\t\treturn this.cache.src_port ??= /* @__PURE__ */ new RegExp(\"(?::(?:6(?:[0-4]\\\\d{3}|5(?:[0-4]\\\\d{2}|5(?:[0-2]\\\\d|3[0-5])))|[1-5]?\\\\d{1,4}))?\");\n\t}\n\tget_host_terminator() {\n\t\treturn this.cache.src_host_terminator ??= new RegExp(`(?=$|${this.get_text_separators().source}|${this.src_ZPCc})(?!${this.opts[\"---\"] ? \"-(?!--)|\" : \"-|\"}_|:\\\\d|\\\\.-|\\\\.(?!$|${this.src_ZPCc}))`);\n\t}\n\tget_path_terminator() {\n\t\treturn this.cache.src_path_terminator ??= new RegExp(`${this.src_ZPCc}|${this.get_text_separators().source}`);\n\t}\n\tget_path() {\n\t\treturn this.cache.src_path ??= new RegExp(`(?:[/?#](?:${this.nestedPairRE(\"[\", \"]\")}|${this.nestedPairRE(\"(\", \")\")}|${this.nestedPairRE(\"{\", \"}\")}|\\\\\"(?:(?!${this.src_ZCc}|[\"]).){1,100}\\\\\"|\\\\'(?:(?!${this.src_ZCc}|[']).){1,100}\\\\'|\\\\'(?=${this.get_pseudo_letter().source}|[-])|\\\\.{2,20}[:]?[a-zA-Z0-9%/&]|\\\\.(?!${this.src_ZCc}|[.]|$)|` + (this.opts[\"---\"] ? \"\\\\-(?!--(?:[^-]|$))(?:-{0,19})|\" : \"\\\\-{1,20}|\") + `,(?!${this.src_ZCc}|$)|;(?!${this.src_ZCc}|$)|\\\\!{1,20}(?!${this.src_ZCc}|[!]|$)|\\\\?(?!${this.src_ZCc}|[?]|$)|` + this.get_path_extra().source + `[\\\\\\\\/:%@#&=_~*]|(?!${this.get_path_terminator().source}).){1,${this.opts.maxLength}}|\\\\/)?`);\n\t}\n\tget_mail_name() {\n\t\treturn this.cache.src_mail_name ??= /* @__PURE__ */ new RegExp(\"[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9](?:[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9]|[.](?=[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9])){0,63}\");\n\t}\n\tget_xn() {\n\t\treturn this.cache.src_xn ??= /* @__PURE__ */ new RegExp(\"xn--[a-z0-9\\\\-]{1,59}\");\n\t}\n\tget_tld() {\n\t\tif (this.cache.tld) return this.cache.tld;\n\t\tconst tlds_src = [...new Set(this.opts.tlds || [])].sort().reverse().join(\"|\");\n\t\tthis.cache.tld = new RegExp(`${tlds_src || \"$#none#$\"}|${this.get_xn().source}`);\n\t\treturn this.cache.tld;\n\t}\n\tget_domain_root() {\n\t\treturn this.cache.src_domain_root ??= new RegExp(\"(?:\" + this.get_xn().source + `|${this.get_pseudo_letter().source}{1,63})`);\n\t}\n\tget_domain() {\n\t\treturn this.cache.src_domain ??= new RegExp(\"(?:\" + this.get_xn().source + `|(?:${this.get_pseudo_letter().source})|(?:${this.get_pseudo_letter().source}(?:-|${this.get_pseudo_letter().source}){0,61}${this.get_pseudo_letter().source}))`);\n\t}\n\tget_url_host_port() {\n\t\treturn this.cache.url_host_port ??= new RegExp(\"(?:\" + this.get_ipv6_url_host().source + `|(?:(?:(?:${this.get_domain().source})\\\\.){0,10}${this.get_domain().source}))` + this.get_port().source + this.get_host_terminator().source);\n\t}\n\tget_fuzzy_url_host_port() {\n\t\treturn this.cache.fuzzy_url_host_port ??= new RegExp(\"(?:\" + (this.opts.fuzzyIP ? this.get_ipv4_addr().source + \"|\" : \"\") + `(?:(?:(?:${this.get_domain().source})\\\\.){1,10}(?:${this.get_tld().source})))` + this.get_host_terminator().source);\n\t}\n\tget_mail_host() {\n\t\treturn this.cache.src_mail_host ??= new RegExp(\"(?:\" + this.get_ipv6_mail_host().source + `|(?:(?:(?:${this.get_domain().source})\\\\.){0,4}${this.get_domain().source}))` + this.get_host_terminator().source);\n\t}\n\tget_fuzzy_mail_host() {\n\t\treturn this.cache.src_fuzzy_mail_host ??= new RegExp(\"(?:\" + this.get_ipv6_mail_host().source + `|(?:(?:(?:${this.get_domain().source})[.]){1,4}${this.get_domain_root().source}))` + this.get_host_terminator().source);\n\t}\n\tget_path_extra() {\n\t\treturn this.cache.src_path_extra ??= /* @__PURE__ */ new RegExp(\"\");\n\t}\n\tget_fuzzy_mail_host_search() {\n\t\treturn this.cache.mail_fuzzy_host_search ??= new RegExp(`@${this.get_fuzzy_mail_host().source}`, \"ig\");\n\t}\n\tget_fuzzy_link_search() {\n\t\treturn this.cache.link_fuzzy_search ??= new RegExp(`(^|(?![.:/\\\\-_@])(?:[$+<=>^\\`|\\uff5c]|${this.src_ZPCc}))(?:(?![$+<=>^\\`|\\uff5c])${this.get_fuzzy_url_host_port().source}${this.get_path().source})`, \"ig\");\n\t}\n\tget_http_validator() {\n\t\treturn this.cache.http_validator ??= new RegExp(\"\\\\/\\\\/\" + (this.opts.urlAuth ? this.get_auth().source : \"\") + this.get_url_host_port().source + this.get_path().source, \"iy\");\n\t}\n\tget_relative_proto_validator() {\n\t\treturn this.cache.relative_proto_validator ??= new RegExp((this.opts.urlAuth ? this.get_auth().source : \"\") + `(?:localhost|${this.get_ipv6_url_host().source}|(?:(?:${this.get_domain().source})[.]){1,10}${this.get_domain_root().source})` + this.get_port().source + this.get_host_terminator().source + this.get_path().source, \"iy\");\n\t}\n\tget_mail_name_validator() {\n\t\treturn this.cache.mail_name_validator ??= new RegExp(`(?:^|${this.get_text_separators().source}|\"|\\\\(|${this.src_ZCc})(${this.get_mail_name().source})$`);\n\t}\n\tget_mailto_validator() {\n\t\treturn this.cache.mailto_validator ??= new RegExp(`${this.get_mail_name().source}@${this.get_mail_host().source}`, \"iy\");\n\t}\n\tget_schema_names() {\n\t\treturn this.cache.schema_names ??= new RegExp((this.opts.schema_names || []).map((name) => this.escapeRE(name)).join(\"|\"));\n\t}\n\tget_schema_search() {\n\t\treturn this.cache.schema_search ??= new RegExp(`(^|(?!_)(?:[><\\uff5c]|${this.src_ZPCc}))(${this.get_schema_names().source})`, \"ig\");\n\t}\n\tget_schema_at_start() {\n\t\treturn this.cache.schema_at_start ??= new RegExp(`^${this.get_schema_search().source}`, \"i\");\n\t}\n};\n//#endregion\n//#region src/linkifyit.ts\nvar web_schema = {\n\tvalidate: (text, pos, self) => {\n\t\tconst re = self.re.get_http_validator();\n\t\tre.lastIndex = pos;\n\t\tconst m = re.exec(text);\n\t\treturn m ? m[0].length : 0;\n\t},\n\tnormalize: (match, self) => self.normalize(match)\n};\nvar defaultSchemas = {\n\t\"http:\": web_schema,\n\t\"https:\": web_schema,\n\t\"ftp:\": web_schema,\n\t\"//\": {\n\t\tvalidate: function(text, pos, self) {\n\t\t\tconst re = self.re.get_relative_proto_validator();\n\t\t\tre.lastIndex = pos;\n\t\t\tconst m = re.exec(text);\n\t\t\tif (m) {\n\t\t\t\tif (pos >= 3 && text[pos - 3] === \":\") return 0;\n\t\t\t\tif (pos >= 3 && text[pos - 3] === \"/\") return 0;\n\t\t\t\treturn m[0].length;\n\t\t\t}\n\t\t\treturn 0;\n\t\t},\n\t\tnormalize: (match, self) => self.normalize(match)\n\t},\n\t\"mailto:\": {\n\t\tvalidate: function(text, pos, self) {\n\t\t\tconst re = self.re.get_mailto_validator();\n\t\t\tre.lastIndex = pos;\n\t\t\tconst m = re.exec(text);\n\t\t\treturn m ? m[0].length : 0;\n\t\t},\n\t\tnormalize: (match, self) => self.normalize(match)\n\t}\n};\nvar tlds_2ch = \"a:cdefgilmnoqrstuwxz|b:abdefghijmnorstvwyz|c:acdfghiklmnoruvwxyz|d:ejkmoz|e:cegrstu|f:ijkmor|g:abdefghilmnpqrstuwy|h:kmnrtu|i:delmnoqrst|j:emop|k:eghimnprwyz|l:abcikrstuvy|m:acdeghklmnopqrstuvwxyz|n:acefgilopruz|o:m|p:aefghklmnrstwy|q:a|r:eosuw|s:abcdeghijklmnortuvxyz|t:cdfghjklmnortvwz|u:agksyz|v:aceginu|w:fs|y:et|z:amw\";\nvar tlds_default = \"biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф\";\nfunction unpackTlds() {\n\tconst result = tlds_default.split(\"|\");\n\ttlds_2ch.split(\"|\").forEach((item) => {\n\t\tconst sep = item.indexOf(\":\");\n\t\tconst prefix = item.slice(0, sep);\n\t\tfor (const suffix of item.slice(sep + 1)) result.push(prefix + suffix);\n\t});\n\treturn result;\n}\nvar defaultOptions = {\n\tfuzzyLink: false,\n\tfuzzyEmail: true,\n\tfuzzyIP: false,\n\t\"---\": false,\n\ttlds: unpackTlds(),\n\turlAuth: false,\n\tmaxLength: 1e4\n};\n/**\n* Match result returned by {@link LinkifyIt.match} and\n* {@link LinkifyIt.matchAtStart}.\n*\n* @category types\n*/\nvar Match = class {\n\t/** Prefix (protocol) for matched string. Empty for fuzzy links. */\n\tschema;\n\t/** First position of matched string. */\n\tindex;\n\t/** Next position after matched string. */\n\tlastIndex;\n\t/** Matched string. */\n\traw;\n\t/** Normalized text of matched string. */\n\ttext;\n\t/** Normalized URL of matched string. */\n\turl;\n\tconstructor(text, schema, index, lastIndex) {\n\t\tconst raw = text.slice(index, lastIndex);\n\t\tthis.schema = schema.toLowerCase();\n\t\tthis.index = index;\n\t\tthis.lastIndex = lastIndex;\n\t\tthis.raw = raw;\n\t\tthis.text = raw;\n\t\tthis.url = raw;\n\t}\n};\n/** Linkifier instance. */\nvar LinkifyIt = class {\n\t__opts__;\n\t__schemas__;\n\tre;\n\t/**\n\t* Creates new linkifier instance.\n\t*\n\t* By default understands:\n\t*\n\t* - `http(s)://...` , `ftp://...`, `mailto:...` & `//...` links\n\t* - \"fuzzy\" emails (foo@bar.com).\n\t*\n\t* See {@link LinkifyConstructorOptions} for available options.\n\t*\n\t* @param options Recognition options.\n\t*\n\t* @example\n\t* ```javascript\n\t* import { LinkifyIt } from 'linkify-it'\n\t*\n\t* const linkify = new LinkifyIt({ fuzzyLink: true })\n\t*\n\t* linkify\n\t* .tlds(require('tlds')) // Reload with full TLD list\n\t* .tlds('onion', true) // Add unofficial `.onion` domain\n\t* .add('ftp:', null) // Disable `ftp:` protocol\n\t* .set({ fuzzyIP: true }) // Enable IPs in fuzzy links\n\t*\n\t* console.log(linkify.test('Site github.com!')) // true\n\t* console.log(linkify.match('Site github.com!'))\n\t* ```\n\t*/\n\tconstructor(options = {}) {\n\t\tconst { rebuilder, ...linkifyOptions } = options;\n\t\tthis.__opts__ = {\n\t\t\t...defaultOptions,\n\t\t\t...linkifyOptions\n\t\t};\n\t\tthis.__schemas__ = { ...defaultSchemas };\n\t\tthis.re = rebuilder || new REBuilder();\n\t\tthis.re.set({\n\t\t\t...this.__opts__,\n\t\t\tschema_names: Object.keys(this.__schemas__)\n\t\t});\n\t}\n\t/**\n\t* Add new rule definition.\n\t*\n\t* `schema` is a link prefix (usually, protocol name with `:` at the end,\n\t* `skype:` for example). `linkify-it` makes sure that prefix is not\n\t* preceded with alphanumeric char and symbols. Only whitespaces and\n\t* punctuation allowed.\n\t*\n\t* `definition` is a rule to check tail after link prefix. To disable an\n\t* existing rule, pass `null`.\n\t*\n\t* @param schema Rule name (fixed pattern prefix).\n\t* @param definition Schema definition, or `null` to disable the rule.\n\t*\n\t* See [twitter mentions example](https://github.com/markdown-it/linkify-it/blob/master/examples/twitter.mjs).\n\t*/\n\tadd(schema, definition = null) {\n\t\tif (!definition) delete this.__schemas__[schema];\n\t\telse {\n\t\t\tconst def = {\n\t\t\t\tnormalize: (match, self) => self.normalize(match),\n\t\t\t\t...definition\n\t\t\t};\n\t\t\tthis.__schemas__[schema] = def;\n\t\t}\n\t\tthis.re.set({\n\t\t\t...this.__opts__,\n\t\t\tschema_names: Object.keys(this.__schemas__)\n\t\t});\n\t\treturn this;\n\t}\n\t/**\n\t* Set recognition options for links without schema.\n\t*\n\t* @param options Recognition options.\n\t*/\n\tset(options = {}) {\n\t\tthis.__opts__ = {\n\t\t\t...this.__opts__,\n\t\t\t...options\n\t\t};\n\t\tthis.re.set({\n\t\t\t...this.__opts__,\n\t\t\tschema_names: Object.keys(this.__schemas__)\n\t\t});\n\t\treturn this;\n\t}\n\t/**\n\t* Searches linkifiable pattern and returns `true` on success or `false` on fail.\n\t*\n\t* @param text Text to scan.\n\t*/\n\ttest(text) {\n\t\tif (!text.length) return false;\n\t\tlet m, re;\n\t\tre = this.re.get_schema_search();\n\t\tre.lastIndex = 0;\n\t\twhile ((m = re.exec(text)) !== null) if (this.testSchemaAt(text, m[2], re.lastIndex)) return true;\n\t\tif (this.__opts__.fuzzyLink && this.__schemas__[\"http:\"]) {\n\t\t\tre = this.re.get_fuzzy_link_search();\n\t\t\tre.lastIndex = 0;\n\t\t\tif (re.exec(text) !== null) return true;\n\t\t}\n\t\tif (this.__opts__.fuzzyEmail && this.__schemas__[\"mailto:\"]) {\n\t\t\tif (text.indexOf(\"@\") >= 0) {\n\t\t\t\tconst mailHostRe = this.re.get_fuzzy_mail_host_search();\n\t\t\t\tconst mailNameRe = this.re.get_mail_name_validator();\n\t\t\t\tmailHostRe.lastIndex = 0;\n\t\t\t\twhile ((m = mailHostRe.exec(text)) !== null) {\n\t\t\t\t\tconst name = text.slice(Math.max(0, m.index - 65), m.index);\n\t\t\t\t\tif (mailNameRe.test(name)) return true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* Similar to {@link LinkifyIt.test} but checks only specific protocol tail exactly\n\t* at given position. Returns length of found pattern (0 on fail).\n\t*\n\t* @param text Text to scan.\n\t* @param schema Rule (schema) name.\n\t* @param pos Text offset to check from.\n\t*/\n\ttestSchemaAt(text, schema, pos) {\n\t\tif (!this.__schemas__[schema.toLowerCase()]) return 0;\n\t\treturn this.__schemas__[schema.toLowerCase()].validate(text.slice(0, pos + this.__opts__.maxLength), pos, this);\n\t}\n\t/**\n\t* Returns array of found link descriptions or `null` on fail. We strongly\n\t* recommend to use {@link LinkifyIt.test} first, for best speed.\n\t*\n\t* @param text Text to scan.\n\t*/\n\tmatch(text) {\n\t\tconst result = [];\n\t\tconst schemaRe = this.re.get_schema_search();\n\t\tlet fuzzyLinkRe;\n\t\tlet mailHostRe;\n\t\tlet mailNameRe;\n\t\tlet fuzzyLinkCandidate;\n\t\tlet fuzzyEmailCandidate;\n\t\tlet schemaPrefix;\n\t\tlet schemaDone = false;\n\t\tlet fuzzyLinkDone = false;\n\t\tlet fuzzyEmailDone = false;\n\t\tlet pos = 0;\n\t\tif (!text.length) return null;\n\t\tschemaRe.lastIndex = 0;\n\t\tif (this.__opts__.fuzzyLink && this.__schemas__[\"http:\"]) {\n\t\t\tfuzzyLinkRe = this.re.get_fuzzy_link_search();\n\t\t\tfuzzyLinkRe.lastIndex = 0;\n\t\t}\n\t\tif (this.__opts__.fuzzyEmail && this.__schemas__[\"mailto:\"]) {\n\t\t\tmailHostRe = this.re.get_fuzzy_mail_host_search();\n\t\t\tmailHostRe.lastIndex = 0;\n\t\t\tmailNameRe = this.re.get_mail_name_validator();\n\t\t}\n\t\tfor (;;) {\n\t\t\tconst scanFrom = Math.max(pos - 1, 0);\n\t\t\tif (mailHostRe && mailNameRe && !fuzzyEmailDone && (!fuzzyEmailCandidate || fuzzyEmailCandidate.index < pos)) {\n\t\t\t\tif (mailHostRe.lastIndex < scanFrom) mailHostRe.lastIndex = scanFrom;\n\t\t\t\tfor (;;) {\n\t\t\t\t\tconst m = mailHostRe.exec(text);\n\t\t\t\t\tif (!m) {\n\t\t\t\t\t\tfuzzyEmailDone = true;\n\t\t\t\t\t\tfuzzyEmailCandidate = void 0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst name = mailNameRe.exec(text.slice(Math.max(0, m.index - 65), m.index));\n\t\t\t\t\tif (!name) continue;\n\t\t\t\t\tfuzzyEmailCandidate = {\n\t\t\t\t\t\tschema: \"mailto:\",\n\t\t\t\t\t\tindex: m.index - name[1].length,\n\t\t\t\t\t\tlastIndex: m.index + m[0].length\n\t\t\t\t\t};\n\t\t\t\t\tif (fuzzyEmailCandidate.index >= pos) break;\n\t\t\t\t\tif (mailHostRe.lastIndex < scanFrom) mailHostRe.lastIndex = scanFrom;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (fuzzyLinkRe && !fuzzyLinkDone && (!fuzzyLinkCandidate || fuzzyLinkCandidate.index < pos)) {\n\t\t\t\tif (fuzzyLinkRe.lastIndex < scanFrom) fuzzyLinkRe.lastIndex = scanFrom;\n\t\t\t\tfor (;;) {\n\t\t\t\t\tconst m = fuzzyLinkRe.exec(text);\n\t\t\t\t\tif (!m) {\n\t\t\t\t\t\tfuzzyLinkDone = true;\n\t\t\t\t\t\tfuzzyLinkCandidate = void 0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tfuzzyLinkCandidate = {\n\t\t\t\t\t\tschema: \"\",\n\t\t\t\t\t\tindex: m.index + m[1].length,\n\t\t\t\t\t\tlastIndex: m.index + m[0].length\n\t\t\t\t\t};\n\t\t\t\t\tif (fuzzyLinkCandidate.index >= pos) break;\n\t\t\t\t\tif (fuzzyLinkRe.lastIndex < scanFrom) fuzzyLinkRe.lastIndex = scanFrom;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlet fuzzyCandidate = fuzzyEmailCandidate;\n\t\t\tif (!fuzzyCandidate || fuzzyLinkCandidate && (fuzzyLinkCandidate.index < fuzzyCandidate.index || fuzzyLinkCandidate.index === fuzzyCandidate.index && fuzzyLinkCandidate.lastIndex > fuzzyCandidate.lastIndex)) fuzzyCandidate = fuzzyLinkCandidate;\n\t\t\tlet schemaCandidate;\n\t\t\tif (!schemaDone) for (;;) {\n\t\t\t\tif (!schemaPrefix) {\n\t\t\t\t\tif (schemaRe.lastIndex < scanFrom) schemaRe.lastIndex = scanFrom;\n\t\t\t\t\tconst m = schemaRe.exec(text);\n\t\t\t\t\tif (!m) {\n\t\t\t\t\t\tschemaDone = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tschemaPrefix = {\n\t\t\t\t\t\tschema: m[2],\n\t\t\t\t\t\tindex: m.index + m[1].length,\n\t\t\t\t\t\tlastIndex: m.index + m[0].length\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tif (schemaPrefix.index < pos) {\n\t\t\t\t\tschemaPrefix = void 0;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (fuzzyCandidate && schemaPrefix.index > fuzzyCandidate.index) break;\n\t\t\t\tconst prefix = schemaPrefix;\n\t\t\t\tschemaPrefix = void 0;\n\t\t\t\tconst len = this.testSchemaAt(text, prefix.schema, prefix.lastIndex);\n\t\t\t\tif (len) {\n\t\t\t\t\tschemaCandidate = {\n\t\t\t\t\t\tschema: prefix.schema,\n\t\t\t\t\t\tindex: prefix.index,\n\t\t\t\t\t\tlastIndex: prefix.lastIndex + len\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlet candidate = schemaCandidate;\n\t\t\tif (!candidate || fuzzyEmailCandidate && (fuzzyEmailCandidate.index < candidate.index || fuzzyEmailCandidate.index === candidate.index && fuzzyEmailCandidate.lastIndex > candidate.lastIndex)) candidate = fuzzyEmailCandidate;\n\t\t\tif (!candidate || fuzzyLinkCandidate && (fuzzyLinkCandidate.index < candidate.index || fuzzyLinkCandidate.index === candidate.index && fuzzyLinkCandidate.lastIndex > candidate.lastIndex)) candidate = fuzzyLinkCandidate;\n\t\t\tif (!candidate) break;\n\t\t\tif (candidate === fuzzyEmailCandidate) fuzzyEmailCandidate = void 0;\n\t\t\telse if (candidate === fuzzyLinkCandidate) fuzzyLinkCandidate = void 0;\n\t\t\tconst match = new Match(text, candidate.schema, candidate.index, candidate.lastIndex);\n\t\t\tif (match.schema) this.__schemas__[match.schema].normalize(match, this);\n\t\t\telse this.normalize(match);\n\t\t\tresult.push(match);\n\t\t\tpos = candidate.lastIndex;\n\t\t}\n\t\tif (result.length) return result;\n\t\treturn null;\n\t}\n\t/**\n\t* Returns fully-formed (not fuzzy) link if it starts at the beginning\n\t* of the string, and null otherwise.\n\t*\n\t* @param text Text to scan.\n\t*/\n\tmatchAtStart(text) {\n\t\tif (!text.length) return null;\n\t\tconst m = this.re.get_schema_at_start().exec(text);\n\t\tif (!m) return null;\n\t\tconst len = this.testSchemaAt(text, m[2], m[0].length);\n\t\tif (!len) return null;\n\t\tconst match = new Match(text, m[2], m.index + m[1].length, m.index + m[0].length + len);\n\t\tthis.__schemas__[match.schema].normalize(match, this);\n\t\treturn match;\n\t}\n\t/**\n\t* Load (or merge) new TLDs list. Those are used for fuzzy links (without\n\t* prefix) to avoid false positives. By default this algorithm is used:\n\t*\n\t* - hostname with any 2-letter root zones are ok.\n\t* - biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф\n\t* are ok.\n\t* - encoded (`xn--...`) root zones are ok.\n\t*\n\t* If list is replaced, then exact match for 2-chars root zones will be checked.\n\t*\n\t* @param list List of TLDs.\n\t* @param keepOld Merge with current list if `true` (`false` by default).\n\t*/\n\ttlds(list, keepOld = false) {\n\t\tlist = Array.isArray(list) ? list : [list];\n\t\tif (!keepOld) this.__opts__.tlds = list;\n\t\telse this.__opts__.tlds = this.__opts__.tlds.concat(list);\n\t\tthis.re.set({\n\t\t\t...this.__opts__,\n\t\t\tschema_names: Object.keys(this.__schemas__)\n\t\t});\n\t\treturn this;\n\t}\n\t/**\n\t* Default normalizer (if schema does not define its own).\n\t*\n\t* @param match Match to normalize.\n\t*/\n\tnormalize(match) {\n\t\tif (!match.schema) match.url = `http://${match.url}`;\n\t\tif (match.schema === \"mailto:\" && !/^mailto:/i.test(match.url)) match.url = `mailto:${match.url}`;\n\t}\n};\nfunction linkifyit(options = {}) {\n\treturn new LinkifyIt(options);\n}\n//#endregion\nexport { LinkifyIt, REBuilder, linkifyit };\n\n//# sourceMappingURL=index.mjs.map","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7F]/; // Note: U+007F DEL is excluded too.\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, callback) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = callback(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {String} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(domain, callback) {\n\tconst parts = domain.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tdomain = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tdomain = domain.replace(regexSeparators, '\\x2E');\n\tconst labels = domain.split('.');\n\tconst encoded = map(labels, callback).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see <https://mathiasbynens.be/notes/javascript-encoding>\n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = codePoints => String.fromCodePoint(...codePoints);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint >= 0x30 && codePoint < 0x3A) {\n\t\treturn 26 + (codePoint - 0x30);\n\t}\n\tif (codePoint >= 0x41 && codePoint < 0x5B) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint >= 0x61 && codePoint < 0x7B) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tconst oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\t\t\tif (digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tconst inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tconst basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue === n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.3.1',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport { ucs2decode, ucs2encode, decode, encode, toASCII, toUnicode };\nexport default punycode;\n","/*! markdown-it 15.0.2 https://github.com/markdown-it/markdown-it @license MIT */\nimport * as mdurl from \"mdurl\";\nimport * as ucmicro from \"uc.micro\";\nimport { decodeHTMLStrict } from \"entities\";\nimport { LinkifyIt } from \"linkify-it\";\nimport punycode from \"punycode.js\";\n//#region \\0rolldown/runtime.js\nvar __defProp = Object.defineProperty;\nvar __exportAll = (all, no_symbols) => {\n\tlet target = {};\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n\tif (!no_symbols) __defProp(target, Symbol.toStringTag, { value: \"Module\" });\n\treturn target;\n};\n//#endregion\n//#region src/common/utils.ts\n/**\n* Common utility functions exposed through `md.utils` for use by plugins.\n*\n* @module md.utils\n*/\nvar utils_exports = /* @__PURE__ */ __exportAll({\n\tarrayReplaceAt: () => arrayReplaceAt,\n\tasciiTrim: () => asciiTrim,\n\tcallable: () => callable,\n\tescapeHtml: () => escapeHtml,\n\tescapeRE: () => escapeRE,\n\tfromCodePoint: () => fromCodePoint,\n\tisMdAsciiPunct: () => isMdAsciiPunct,\n\tisPunctChar: () => isPunctChar,\n\tisPunctCharCode: () => isPunctCharCode,\n\tisSpace: () => isSpace,\n\tisValidEntityCode: () => isValidEntityCode,\n\tisWhiteSpace: () => isWhiteSpace,\n\tlib: () => lib,\n\tnormalizeReference: () => normalizeReference,\n\tunescapeAll: () => unescapeAll,\n\tunescapeMd: () => unescapeMd\n});\nfunction callable(cls) {\n\tconst wrapper = function(...args) {\n\t\treturn Reflect.construct(cls, args, new.target && new.target !== wrapper ? new.target : cls);\n\t};\n\tObject.defineProperty(wrapper, \"name\", { value: cls.name });\n\tObject.setPrototypeOf(wrapper, cls);\n\twrapper.prototype = cls.prototype;\n\treturn wrapper;\n}\n/**\n* Returns a copy of a token array with the token at `pos` replaced by\n* `newElements`. Used to transform token streams without modifying the\n* original array.\n*/\nfunction arrayReplaceAt(src, pos, newElements) {\n\treturn [].concat(src.slice(0, pos), newElements, src.slice(pos + 1));\n}\n/** Checks whether a code point can be decoded from a numeric HTML entity. */\nfunction isValidEntityCode(c) {\n\tif (c >= 55296 && c <= 57343) return false;\n\tif (c >= 64976 && c <= 65007) return false;\n\tif ((c & 65535) === 65535 || (c & 65535) === 65534) return false;\n\tif (c >= 0 && c <= 8) return false;\n\tif (c === 11) return false;\n\tif (c >= 14 && c <= 31) return false;\n\tif (c >= 127 && c <= 159) return false;\n\tif (c > 1114111) return false;\n\treturn true;\n}\n/**\n* Converts a Unicode code point to a string, like `String.fromCodePoint()`,\n* but does not throw for invalid input.\n*/\nfunction fromCodePoint(c) {\n\tif (c > 65535) {\n\t\tc -= 65536;\n\t\tconst surrogate1 = 55296 + (c >> 10);\n\t\tconst surrogate2 = 56320 + (c & 1023);\n\t\treturn String.fromCharCode(surrogate1, surrogate2);\n\t}\n\treturn String.fromCharCode(c);\n}\nvar UNESCAPE_MD_RE = /\\\\([!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_`{|}~])/g;\nvar UNESCAPE_ALL_RE = new RegExp(`${UNESCAPE_MD_RE.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`, \"gi\");\nvar DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;\nfunction replaceEntityPattern(match, name) {\n\tif (name.charCodeAt(0) === 35 && DIGITAL_ENTITY_TEST_RE.test(name)) {\n\t\tconst code = name[1].toLowerCase() === \"x\" ? parseInt(name.slice(2), 16) : parseInt(name.slice(1), 10);\n\t\tif (isValidEntityCode(code)) return fromCodePoint(code);\n\t\treturn match;\n\t}\n\tconst decoded = decodeHTMLStrict(match);\n\tif (decoded !== match) return decoded;\n\treturn match;\n}\n/** Decodes Markdown backslash escapes. */\nfunction unescapeMd(str) {\n\tif (str.indexOf(\"\\\\\") < 0) return str;\n\treturn str.replace(UNESCAPE_MD_RE, \"$1\");\n}\n/**\n* Decodes Markdown backslash escapes and HTML character references in link\n* destinations, link titles, and fenced code info strings.\n*/\nfunction unescapeAll(str) {\n\tif (str.indexOf(\"\\\\\") < 0 && str.indexOf(\"&\") < 0) return str;\n\treturn str.replace(UNESCAPE_ALL_RE, function(match, escaped, entity) {\n\t\tif (escaped) return escaped;\n\t\treturn replaceEntityPattern(match, entity);\n\t});\n}\nvar HTML_ESCAPE_TEST_RE = /[&<>\"]/;\nvar HTML_ESCAPE_REPLACE_RE = /[&<>\"]/g;\nvar HTML_REPLACEMENTS = {\n\t\"&\": \"&amp;\",\n\t\"<\": \"&lt;\",\n\t\">\": \"&gt;\",\n\t\"\\\"\": \"&quot;\"\n};\nfunction replaceUnsafeChar(ch) {\n\treturn HTML_REPLACEMENTS[ch];\n}\n/** Escapes HTML special characters in a string. */\nfunction escapeHtml(str) {\n\tif (HTML_ESCAPE_TEST_RE.test(str)) return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar);\n\treturn str;\n}\nvar REGEXP_ESCAPE_RE = /[.?*+^$[\\]\\\\(){}|-]/g;\n/** Escapes regular expression metacharacters in a string. */\nfunction escapeRE(str) {\n\treturn str.replace(REGEXP_ESCAPE_RE, \"\\\\$&\");\n}\n/** Checks whether a character code is an ASCII space or tab. */\nfunction isSpace(code) {\n\tswitch (code) {\n\t\tcase 9:\n\t\tcase 32: return true;\n\t}\n\treturn false;\n}\n/**\n* Checks whether a character code is whitespace recognized by Markdown.\n*\n* Matches the Unicode `Zs` category or `\\t`, `\\f`, `\\v`, `\\r`, `\\n`.\n*/\nfunction isWhiteSpace(code) {\n\tif (code >= 8192 && code <= 8202) return true;\n\tswitch (code) {\n\t\tcase 9:\n\t\tcase 10:\n\t\tcase 11:\n\t\tcase 12:\n\t\tcase 13:\n\t\tcase 32:\n\t\tcase 160:\n\t\tcase 5760:\n\t\tcase 8239:\n\t\tcase 8287:\n\t\tcase 12288: return true;\n\t}\n\treturn false;\n}\n/**\n* Checks whether a character is Unicode punctuation or a symbol.\n*\n* Does not support astral characters.\n*/\nfunction isPunctChar(ch) {\n\treturn ucmicro.P.test(ch) || ucmicro.S.test(ch);\n}\n/** Checks whether a Unicode code point is punctuation or a symbol. */\nfunction isPunctCharCode(code) {\n\treturn isPunctChar(fromCodePoint(code));\n}\n/**\n* Markdown ASCII punctuation characters.\n*\n* !, \", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @,\n* [, \\, ], ^, _, `, {, |, }, or ~\n*\n* http://spec.commonmark.org/0.15/#ascii-punctuation-character\n*\n* Don't confuse with Unicode punctuation. It lacks some characters in the\n* ASCII range.\n*/\nfunction isMdAsciiPunct(ch) {\n\tswitch (ch) {\n\t\tcase 33:\n\t\tcase 34:\n\t\tcase 35:\n\t\tcase 36:\n\t\tcase 37:\n\t\tcase 38:\n\t\tcase 39:\n\t\tcase 40:\n\t\tcase 41:\n\t\tcase 42:\n\t\tcase 43:\n\t\tcase 44:\n\t\tcase 45:\n\t\tcase 46:\n\t\tcase 47:\n\t\tcase 58:\n\t\tcase 59:\n\t\tcase 60:\n\t\tcase 61:\n\t\tcase 62:\n\t\tcase 63:\n\t\tcase 64:\n\t\tcase 91:\n\t\tcase 92:\n\t\tcase 93:\n\t\tcase 94:\n\t\tcase 95:\n\t\tcase 96:\n\t\tcase 123:\n\t\tcase 124:\n\t\tcase 125:\n\t\tcase 126: return true;\n\t\tdefault: return false;\n\t}\n}\n/** Normalizes `[reference labels]` for case-insensitive lookup. */\nfunction normalizeReference(str) {\n\tstr = str.trim().replace(/\\s+/g, \" \");\n\treturn str.toLowerCase().toUpperCase();\n}\nfunction isAsciiTrimmable(c) {\n\treturn c === 32 || c === 9 || c === 10 || c === 13;\n}\n/**\n* \"Light\" `.trim()` for blocks (headings, paragraphs), where Unicode spaces\n* should be preserved.\n*/\nfunction asciiTrim(str) {\n\tlet start = 0;\n\tfor (; start < str.length; start++) if (!isAsciiTrimmable(str.charCodeAt(start))) break;\n\tlet end = str.length - 1;\n\tfor (; end >= start; end--) if (!isAsciiTrimmable(str.charCodeAt(end))) break;\n\treturn str.slice(start, end + 1);\n}\n/**\n* Libraries commonly used by markdown-it and its plugins, re-exported to\n* reduce duplicate dependencies in browser bundles.\n*/\nvar lib = {\n\tmdurl,\n\tucmicro\n};\n//#endregion\n//#region src/helpers/parse_link_label.ts\n/** Finds the end of a link or image label (`[label]`). */\nfunction parseLinkLabel(state, start, disableNested) {\n\tlet level, found, marker, prevPos;\n\tconst max = state.posMax;\n\tconst oldPos = state.pos;\n\tstate.pos = start + 1;\n\tlevel = 1;\n\twhile (state.pos < max) {\n\t\tmarker = state.src.charCodeAt(state.pos);\n\t\tif (marker === 93) {\n\t\t\tlevel--;\n\t\t\tif (level === 0) {\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tprevPos = state.pos;\n\t\tstate.md.inline.skipToken(state);\n\t\tif (marker === 91) {\n\t\t\tif (prevPos === state.pos - 1) level++;\n\t\t\telse if (disableNested) {\n\t\t\t\tstate.pos = oldPos;\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\tlet labelEnd = -1;\n\tif (found) labelEnd = state.pos;\n\tstate.pos = oldPos;\n\treturn labelEnd;\n}\n//#endregion\n//#region src/helpers/parse_link_destination.ts\n/** Parses the destination in `[label](destination \"title\")`. */\nfunction parseLinkDestination(str, start, max) {\n\tlet code;\n\tlet pos = start;\n\tconst result = {\n\t\tok: false,\n\t\tpos: 0,\n\t\tstr: \"\"\n\t};\n\tif (str.charCodeAt(pos) === 60) {\n\t\tpos++;\n\t\twhile (pos < max) {\n\t\t\tcode = str.charCodeAt(pos);\n\t\t\tif (code === 10) return result;\n\t\t\tif (code === 60) return result;\n\t\t\tif (code === 62) {\n\t\t\t\tresult.pos = pos + 1;\n\t\t\t\tresult.str = unescapeAll(str.slice(start + 1, pos));\n\t\t\t\tresult.ok = true;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tif (code === 92 && pos + 1 < max) {\n\t\t\t\tpos += 2;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tpos++;\n\t\t}\n\t\treturn result;\n\t}\n\tlet level = 0;\n\twhile (pos < max) {\n\t\tcode = str.charCodeAt(pos);\n\t\tif (code === 32) break;\n\t\tif (code < 32 || code === 127) break;\n\t\tif (code === 92 && pos + 1 < max) {\n\t\t\tif (str.charCodeAt(pos + 1) === 32) {\n\t\t\t\tpos++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tpos += 2;\n\t\t\tcontinue;\n\t\t}\n\t\tif (code === 40) {\n\t\t\tlevel++;\n\t\t\tif (level > 32) return result;\n\t\t}\n\t\tif (code === 41) {\n\t\t\tif (level === 0) break;\n\t\t\tlevel--;\n\t\t}\n\t\tpos++;\n\t}\n\tif (start === pos) return result;\n\tif (level !== 0) return result;\n\tresult.str = unescapeAll(str.slice(start, pos));\n\tresult.pos = pos;\n\tresult.ok = true;\n\treturn result;\n}\n//#endregion\n//#region src/helpers/parse_link_title.ts\n/**\n* Parses the optional title in `[label](destination \"title\")` or\n* `[label]: destination \"title\"`.\n*\n* `prev_state` continues a reference title on the next source line.\n*/\nfunction parseLinkTitle(str, start, max, prev_state) {\n\tlet code;\n\tlet pos = start;\n\tconst state = {\n\t\tok: false,\n\t\tcan_continue: false,\n\t\tpos: 0,\n\t\tstr: \"\",\n\t\tmarker: 0\n\t};\n\tif (prev_state) {\n\t\tstate.str = prev_state.str;\n\t\tstate.marker = prev_state.marker;\n\t} else {\n\t\tif (pos >= max) return state;\n\t\tlet marker = str.charCodeAt(pos);\n\t\tif (marker !== 34 && marker !== 39 && marker !== 40) return state;\n\t\tstart++;\n\t\tpos++;\n\t\tif (marker === 40) marker = 41;\n\t\tstate.marker = marker;\n\t}\n\twhile (pos < max) {\n\t\tcode = str.charCodeAt(pos);\n\t\tif (code === state.marker) {\n\t\t\tstate.pos = pos + 1;\n\t\t\tstate.str += unescapeAll(str.slice(start, pos));\n\t\t\tstate.ok = true;\n\t\t\treturn state;\n\t\t} else if (code === 40 && state.marker === 41) return state;\n\t\telse if (code === 92 && pos + 1 < max) pos++;\n\t\tpos++;\n\t}\n\tstate.can_continue = true;\n\tstate.str += unescapeAll(str.slice(start, pos));\n\treturn state;\n}\n//#endregion\n//#region src/helpers/index.ts\n/**\n* Functions used to parse links and images, split out of parser rules because\n* of their size.\n*\n* @module md.helpers\n*/\nvar helpers_exports = /* @__PURE__ */ __exportAll({\n\tparseLinkDestination: () => parseLinkDestination,\n\tparseLinkLabel: () => parseLinkLabel,\n\tparseLinkTitle: () => parseLinkTitle\n});\n//#endregion\n//#region \\0@oxc-project+runtime@0.142.0/helpers/esm/typeof.js\nfunction _typeof(o) {\n\t\"@babel/helpers - typeof\";\n\treturn _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function(o) {\n\t\treturn typeof o;\n\t} : function(o) {\n\t\treturn o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n\t}, _typeof(o);\n}\n//#endregion\n//#region \\0@oxc-project+runtime@0.142.0/helpers/esm/toPrimitive.js\nfunction toPrimitive(t, r) {\n\tif (\"object\" != _typeof(t) || !t) return t;\n\tvar e = t[Symbol.toPrimitive];\n\tif (void 0 !== e) {\n\t\tvar i = e.call(t, r || \"default\");\n\t\tif (\"object\" != _typeof(i)) return i;\n\t\tthrow new TypeError(\"@@toPrimitive must return a primitive value.\");\n\t}\n\treturn (\"string\" === r ? String : Number)(t);\n}\n//#endregion\n//#region \\0@oxc-project+runtime@0.142.0/helpers/esm/toPropertyKey.js\nfunction toPropertyKey(t) {\n\tvar i = toPrimitive(t, \"string\");\n\treturn \"symbol\" == _typeof(i) ? i : i + \"\";\n}\n//#endregion\n//#region \\0@oxc-project+runtime@0.142.0/helpers/esm/defineProperty.js\nfunction _defineProperty(e, r, t) {\n\treturn (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n\t\tvalue: t,\n\t\tenumerable: !0,\n\t\tconfigurable: !0,\n\t\twritable: !0\n\t}) : e[r] = t, e;\n}\n//#endregion\n//#region src/token.ts\n/**\n* Represents one item in the parsed token stream, storing parsed data and\n* providing helpers for managing HTML attributes.\n*/\nvar Token = class {\n\tconstructor(type, tag, nesting) {\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* Source map info. Format: `[ line_begin, line_end ]`\n\t\t\t*/\n\t\t\t\"map\",\n\t\t\tnull\n\t\t);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* nesting level, the same as `state.level`\n\t\t\t*/\n\t\t\t\"level\",\n\t\t\t0\n\t\t);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* An array of child nodes (inline and img tokens)\n\t\t\t*/\n\t\t\t\"children\",\n\t\t\tnull\n\t\t);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* In a case of self-closing tag (code, html, fence, etc.),\n\t\t\t* it has contents of this tag.\n\t\t\t*/\n\t\t\t\"content\",\n\t\t\t\"\"\n\t\t);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* '*' or '_' for emphasis, fence string for fence, etc.\n\t\t\t*/\n\t\t\t\"markup\",\n\t\t\t\"\"\n\t\t);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* Additional information:\n\t\t\t*\n\t\t\t* - Info string for \"fence\" tokens\n\t\t\t* - The value \"auto\" for autolink \"link_open\" and \"link_close\" tokens\n\t\t\t* - The string value of the item marker for ordered-list \"list_item_open\" tokens\n\t\t\t*/\n\t\t\t\"info\",\n\t\t\t\"\"\n\t\t);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* True for block-level tokens, false for inline tokens.\n\t\t\t* Used in renderer to calculate line breaks\n\t\t\t*/\n\t\t\t\"block\",\n\t\t\tfalse\n\t\t);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* If it's true, ignore this element when rendering. Used for tight lists\n\t\t\t* to hide paragraphs.\n\t\t\t*/\n\t\t\t\"hidden\",\n\t\t\tfalse\n\t\t);\n\t\tthis.type = type;\n\t\tthis.tag = tag;\n\t\tthis.attrs = null;\n\t\tthis.nesting = nesting;\n\t\tthis.meta = null;\n\t}\n\t/**\n\t* Search attribute index by name.\n\t*/\n\tattrIndex(name) {\n\t\tif (!this.attrs) return -1;\n\t\tconst attrs = this.attrs;\n\t\tfor (let i = 0, len = attrs.length; i < len; i++) if (attrs[i][0] === name) return i;\n\t\treturn -1;\n\t}\n\t/**\n\t* Add `[ name, value ]` attribute to list. Init attrs if necessary\n\t*/\n\tattrPush(attrData) {\n\t\tif (this.attrs) this.attrs.push(attrData);\n\t\telse this.attrs = [attrData];\n\t}\n\t/**\n\t* Set `name` attribute to `value`. Override old value if exists.\n\t*/\n\tattrSet(name, value) {\n\t\tconst idx = this.attrIndex(name);\n\t\tconst attrData = [name, value];\n\t\tif (idx < 0) this.attrPush(attrData);\n\t\telse this.attrs[idx] = attrData;\n\t}\n\t/**\n\t* Get the value of attribute `name`, or null if it does not exist.\n\t*/\n\tattrGet(name) {\n\t\tconst idx = this.attrIndex(name);\n\t\tlet value = null;\n\t\tif (idx >= 0) value = this.attrs[idx][1];\n\t\treturn value;\n\t}\n\t/**\n\t* Join value to existing attribute via space. Or create new attribute if not\n\t* exists. Useful to operate with token classes.\n\t*/\n\tattrJoin(name, value) {\n\t\tconst idx = this.attrIndex(name);\n\t\tif (idx < 0) this.attrPush([name, value]);\n\t\telse this.attrs[idx][1] = `${this.attrs[idx][1]} ${value}`;\n\t}\n};\n//#endregion\n//#region src/ruler.ts\n/**\n* Helper class, used by {@link MarkdownIt.core}, {@link MarkdownIt.block} and\n* {@link MarkdownIt.inline} to manage sequences of functions (rules):\n*\n* - keep rules in defined order\n* - assign the name to each rule\n* - enable/disable rules\n* - add/replace rules\n* - allow assign rules to additional named chains (in the same)\n* - cacheing lists of active rules\n*\n* You will not need use this class directly until write plugins. For simple\n* rules control use {@link MarkdownIt.disable}, {@link MarkdownIt.enable} and\n* {@link MarkdownIt.use}.\n*/\nvar Ruler = class {\n\tconstructor() {\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/** @internal */\n\t\t\t\"__rules__\",\n\t\t\t[]\n\t\t);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/** @internal */\n\t\t\t\"__cache__\",\n\t\t\tnull\n\t\t);\n\t}\n\t/** @internal */\n\t__find__(name) {\n\t\tfor (let i = 0; i < this.__rules__.length; i++) if (this.__rules__[i].name === name) return i;\n\t\treturn -1;\n\t}\n\t/** @internal */\n\t__compile__() {\n\t\tconst chains = /* @__PURE__ */ new Set();\n\t\tthis.__rules__.forEach((rule) => {\n\t\t\tif (!rule.enabled) return;\n\t\t\trule.alt.forEach((altName) => {\n\t\t\t\tif (altName) chains.add(altName);\n\t\t\t});\n\t\t});\n\t\tthis.__cache__ = Object.create(null);\n\t\tthis.__cache__[\"\"] = [];\n\t\tthis.__rules__.forEach((rule) => {\n\t\t\tif (rule.enabled) this.__cache__[\"\"].push(rule.fn);\n\t\t});\n\t\tchains.forEach((chain) => {\n\t\t\tthis.__cache__[chain] = [];\n\t\t\tthis.__rules__.forEach((rule) => {\n\t\t\t\tif (rule.enabled && rule.alt.indexOf(chain) >= 0) this.__cache__[chain].push(rule.fn);\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* Replace rule by name with new function & options. Throws error if name not\n\t* found.\n\t*\n\t* @example Replace existing typographer replacement rule with new one\n\t* ```javascript\n\t* import MarkdownIt from 'markdown-it'\n\t* const md = new MarkdownIt()\n\t*\n\t* md.core.ruler.at('replacements', function replace(state) {\n\t* //...\n\t* });\n\t* ```\n\t*/\n\tat(name, fn, options = {}) {\n\t\tconst index = this.__find__(name);\n\t\tif (index === -1) throw new Error(`Parser rule not found: ${name}`);\n\t\tthis.__rules__[index].fn = fn;\n\t\tthis.__rules__[index].alt = options.alt || [];\n\t\tthis.__cache__ = null;\n\t}\n\t/**\n\t* Add new rule to chain before one with given name. See also\n\t* {@link Ruler.after}, {@link Ruler.push}.\n\t*\n\t* @example\n\t* ```javascript\n\t* import MarkdownIt from 'markdown-it'\n\t* const md = new MarkdownIt()\n\t*\n\t* md.block.ruler.before('paragraph', 'my_rule', function replace(state) {\n\t* //...\n\t* });\n\t* ```\n\t*/\n\tbefore(beforeName, ruleName, fn, options = {}) {\n\t\tconst index = this.__find__(beforeName);\n\t\tif (index === -1) throw new Error(`Parser rule not found: ${beforeName}`);\n\t\tthis.__rules__.splice(index, 0, {\n\t\t\tname: ruleName,\n\t\t\tenabled: true,\n\t\t\tfn,\n\t\t\talt: options.alt || []\n\t\t});\n\t\tthis.__cache__ = null;\n\t}\n\t/**\n\t* Add new rule to chain after one with given name. See also\n\t* {@link Ruler.before}, {@link Ruler.push}.\n\t*\n\t* @example\n\t* ```javascript\n\t* import MarkdownIt from 'markdown-it'\n\t* const md = new MarkdownIt()\n\t*\n\t* md.inline.ruler.after('text', 'my_rule', function replace(state) {\n\t* //...\n\t* });\n\t* ```\n\t*/\n\tafter(afterName, ruleName, fn, options = {}) {\n\t\tconst index = this.__find__(afterName);\n\t\tif (index === -1) throw new Error(`Parser rule not found: ${afterName}`);\n\t\tthis.__rules__.splice(index + 1, 0, {\n\t\t\tname: ruleName,\n\t\t\tenabled: true,\n\t\t\tfn,\n\t\t\talt: options.alt || []\n\t\t});\n\t\tthis.__cache__ = null;\n\t}\n\t/**\n\t* Push new rule to the end of chain. See also\n\t* {@link Ruler.before}, {@link Ruler.after}.\n\t*\n\t* @example\n\t* ```javascript\n\t* import MarkdownIt from 'markdown-it'\n\t* const md = new MarkdownIt()\n\t*\n\t* md.core.ruler.push('my_rule', function replace(state) {\n\t* //...\n\t* });\n\t* ```\n\t*/\n\tpush(ruleName, fn, options = {}) {\n\t\tthis.__rules__.push({\n\t\t\tname: ruleName,\n\t\t\tenabled: true,\n\t\t\tfn,\n\t\t\talt: options.alt || []\n\t\t});\n\t\tthis.__cache__ = null;\n\t}\n\t/**\n\t* Enable rules with given names. If any rule name not found - throw Error.\n\t* Errors can be disabled by second param.\n\t*\n\t* See also {@link Ruler.disable}, {@link Ruler.enableOnly}.\n\t*\n\t* Returns list of found rule names (if no exception happened).\n\t*/\n\tenable(list, ignoreInvalid = false) {\n\t\tif (!Array.isArray(list)) list = [list];\n\t\tconst result = [];\n\t\tlist.forEach((name) => {\n\t\t\tconst idx = this.__find__(name);\n\t\t\tif (idx < 0) {\n\t\t\t\tif (ignoreInvalid) return;\n\t\t\t\tthrow new Error(`Rules manager: invalid rule name ${name}`);\n\t\t\t}\n\t\t\tthis.__rules__[idx].enabled = true;\n\t\t\tresult.push(name);\n\t\t});\n\t\tthis.__cache__ = null;\n\t\treturn result;\n\t}\n\t/**\n\t* Enable rules with given names, and disable everything else. If any rule name\n\t* not found - throw Error. Errors can be disabled by second param.\n\t*\n\t* See also {@link Ruler.disable}, {@link Ruler.enable}.\n\t*/\n\tenableOnly(list, ignoreInvalid = false) {\n\t\tif (!Array.isArray(list)) list = [list];\n\t\tthis.__rules__.forEach((rule) => {\n\t\t\trule.enabled = false;\n\t\t});\n\t\tthis.enable(list, ignoreInvalid);\n\t}\n\t/**\n\t* Disable rules with given names. If any rule name not found - throw Error.\n\t* Errors can be disabled by second param.\n\t*\n\t* See also {@link Ruler.enable}, {@link Ruler.enableOnly}.\n\t*\n\t* Returns list of found rule names (if no exception happened).\n\t*/\n\tdisable(list, ignoreInvalid = false) {\n\t\tif (!Array.isArray(list)) list = [list];\n\t\tconst result = [];\n\t\tlist.forEach((name) => {\n\t\t\tconst idx = this.__find__(name);\n\t\t\tif (idx < 0) {\n\t\t\t\tif (ignoreInvalid) return;\n\t\t\t\tthrow new Error(`Rules manager: invalid rule name ${name}`);\n\t\t\t}\n\t\t\tthis.__rules__[idx].enabled = false;\n\t\t\tresult.push(name);\n\t\t});\n\t\tthis.__cache__ = null;\n\t\treturn result;\n\t}\n\t/**\n\t* Return array of active functions (rules) for given chain name. It analyzes\n\t* rules configuration, compiles caches if not exists and returns result.\n\t*\n\t* Default chain name is `''` (empty string). It can't be skipped. That's\n\t* done intentionally, to keep signature monomorphic for high speed.\n\t*/\n\tgetRules(chainName) {\n\t\tif (!this.__cache__) this.__compile__();\n\t\treturn this.__cache__[chainName] || [];\n\t}\n};\n//#endregion\n//#region src/renderer.ts\nvar default_rules = {};\ndefault_rules.code_inline = function(tokens, idx, options, env, slf) {\n\tconst token = tokens[idx];\n\treturn `<code${slf.renderAttrs(token)}>${escapeHtml(token.content)}</code>`;\n};\ndefault_rules.code_block = function(tokens, idx, options, env, slf) {\n\tconst token = tokens[idx];\n\treturn `<pre${slf.renderAttrs(token)}><code>${escapeHtml(tokens[idx].content)}</code></pre>\\n`;\n};\ndefault_rules.fence = function(tokens, idx, options, env, slf) {\n\tconst token = tokens[idx];\n\tconst info = token.info ? unescapeAll(token.info).trim() : \"\";\n\tlet langName = \"\";\n\tlet langAttrs = \"\";\n\tif (info) {\n\t\tconst arr = info.split(/(\\s+)/g);\n\t\tlangName = arr[0];\n\t\tlangAttrs = arr.slice(2).join(\"\");\n\t}\n\tlet highlighted;\n\tif (options.highlight) highlighted = options.highlight(token.content, langName, langAttrs) || escapeHtml(token.content);\n\telse highlighted = escapeHtml(token.content);\n\tif (highlighted.indexOf(\"<pre\") === 0) return highlighted + \"\\n\";\n\tif (info) {\n\t\tconst i = token.attrIndex(\"class\");\n\t\tconst tmpAttrs = token.attrs ? token.attrs.slice() : [];\n\t\tif (i < 0) tmpAttrs.push([\"class\", `${options.langPrefix}${langName}`]);\n\t\telse {\n\t\t\ttmpAttrs[i] = [tmpAttrs[i][0], tmpAttrs[i][1]];\n\t\t\ttmpAttrs[i][1] += ` ${options.langPrefix}${langName}`;\n\t\t}\n\t\tconst tmpToken = { attrs: tmpAttrs };\n\t\treturn `<pre><code${slf.renderAttrs(tmpToken)}>${highlighted}</code></pre>\\n`;\n\t}\n\treturn `<pre><code${slf.renderAttrs(token)}>${highlighted}</code></pre>\\n`;\n};\ndefault_rules.image = function(tokens, idx, options, env, slf) {\n\tconst token = tokens[idx];\n\ttoken.attrs[token.attrIndex(\"alt\")][1] = slf.renderInlineAsText(token.children, options, env);\n\treturn slf.renderToken(tokens, idx, options);\n};\ndefault_rules.hardbreak = function(tokens, idx, options) {\n\treturn options.xhtmlOut ? \"<br />\\n\" : \"<br>\\n\";\n};\ndefault_rules.softbreak = function(tokens, idx, options) {\n\treturn options.breaks ? options.xhtmlOut ? \"<br />\\n\" : \"<br>\\n\" : \"\\n\";\n};\ndefault_rules.text = function(tokens, idx) {\n\treturn escapeHtml(tokens[idx].content);\n};\ndefault_rules.html_block = function(tokens, idx) {\n\treturn tokens[idx].content;\n};\ndefault_rules.html_inline = function(tokens, idx) {\n\treturn tokens[idx].content;\n};\n/**\n* Generates HTML from parsed token stream. Each instance has independent\n* copy of rules. Those can be rewritten with ease. Also, you can add new\n* rules if you create plugin and adds new token types.\n*\n* Creates new renderer instance and fills {@link Renderer.rules} with defaults.\n*/\nvar Renderer = class {\n\tconstructor() {\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* Contains render rules for tokens. Can be updated and extended.\n\t\t\t*\n\t\t\t* See [source code](https://github.com/markdown-it/markdown-it/blob/master/src/renderer.ts)\n\t\t\t* for more details and examples.\n\t\t\t*\n\t\t\t* @example Custom render rules\n\t\t\t* ```javascript\n\t\t\t* import MarkdownIt from 'markdown-it'\n\t\t\t* const md = new MarkdownIt()\n\t\t\t*\n\t\t\t* md.renderer.rules.strong_open = function () { return '<b>'; };\n\t\t\t* md.renderer.rules.strong_close = function () { return '</b>'; };\n\t\t\t*\n\t\t\t* const result = md.renderInline(...);\n\t\t\t* ```\n\t\t\t*\n\t\t\t* @example Each rule is called as independent static function with fixed signature\n\t\t\t* ```javascript\n\t\t\t* function my_token_render(tokens, idx, options, env, renderer) {\n\t\t\t* // ...\n\t\t\t* return renderedHTML;\n\t\t\t* }\n\t\t\t* ```\n\t\t\t*/\n\t\t\t\"rules\",\n\t\t\tObject.assign({}, default_rules)\n\t\t);\n\t}\n\t/**\n\t* Render token attributes to string.\n\t*/\n\trenderAttrs(token) {\n\t\tlet i, l, result;\n\t\tif (!token.attrs) return \"\";\n\t\tresult = \"\";\n\t\tfor (i = 0, l = token.attrs.length; i < l; i++) result += ` ${escapeHtml(token.attrs[i][0])}=\"${escapeHtml(String(token.attrs[i][1]))}\"`;\n\t\treturn result;\n\t}\n\t/**\n\t* Default token renderer. Can be overriden by custom function\n\t* in {@link Renderer.rules}.\n\t*/\n\trenderToken(tokens, idx, options) {\n\t\tconst token = tokens[idx];\n\t\tlet result = \"\";\n\t\tif (token.hidden) return \"\";\n\t\tlet prev = idx - 1;\n\t\twhile (prev >= 0 && tokens[prev].hidden && tokens[prev].nesting === 0) prev--;\n\t\tif (token.block && token.nesting !== -1 && prev >= 0 && tokens[prev].hidden && tokens[prev].nesting === -1) result += \"\\n\";\n\t\tresult += (token.nesting === -1 ? \"</\" : \"<\") + token.tag;\n\t\tresult += this.renderAttrs(token);\n\t\tif (token.nesting === 0 && options.xhtmlOut) result += \" /\";\n\t\tlet needLf = false;\n\t\tif (token.block) {\n\t\t\tneedLf = true;\n\t\t\tif (token.nesting === 1) {\n\t\t\t\tlet next = idx + 1;\n\t\t\t\twhile (next < tokens.length && tokens[next].hidden && tokens[next].nesting === 0) next++;\n\t\t\t\tif (next < tokens.length) {\n\t\t\t\t\tconst nextToken = tokens[next];\n\t\t\t\t\tif (nextToken.type === \"inline\" || nextToken.hidden) needLf = false;\n\t\t\t\t\telse if (nextToken.nesting === -1 && nextToken.tag === token.tag) needLf = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tresult += needLf ? \">\\n\" : \">\";\n\t\treturn result;\n\t}\n\t/**\n\t* The same as {@link Renderer.render}, but for single token of `inline` type.\n\t*/\n\trenderInline(tokens, options, env) {\n\t\tlet result = \"\";\n\t\tconst rules = this.rules;\n\t\tfor (let i = 0, len = tokens.length; i < len; i++) {\n\t\t\tconst type = tokens[i].type;\n\t\t\tif (typeof rules[type] !== \"undefined\") result += rules[type](tokens, i, options, env, this);\n\t\t\telse result += this.renderToken(tokens, i, options);\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t* Special kludge for image `alt` attributes to conform CommonMark spec.\n\t* Don't try to use it! Spec requires to show `alt` content with stripped markup,\n\t* instead of simple escaping.\n\t*/\n\trenderInlineAsText(tokens, options, env) {\n\t\tlet result = \"\";\n\t\tfor (let i = 0, len = tokens.length; i < len; i++) switch (tokens[i].type) {\n\t\t\tcase \"text\":\n\t\t\tcase \"code_inline\":\n\t\t\t\tresult += tokens[i].content;\n\t\t\t\tbreak;\n\t\t\tcase \"image\":\n\t\t\t\tresult += this.renderInlineAsText(tokens[i].children, options, env);\n\t\t\t\tbreak;\n\t\t\tcase \"html_inline\":\n\t\t\tcase \"html_block\":\n\t\t\t\tresult += tokens[i].content;\n\t\t\t\tbreak;\n\t\t\tcase \"softbreak\":\n\t\t\tcase \"hardbreak\": result += \"\\n\";\n\t\t}\n\t\treturn result;\n\t}\n\t/**\n\t* Takes token stream and generates HTML. Probably, you will never need to call\n\t* this method directly.\n\t*/\n\trender(tokens, options, env) {\n\t\tlet result = \"\";\n\t\tconst rules = this.rules;\n\t\tfor (let i = 0, len = tokens.length; i < len; i++) {\n\t\t\tconst type = tokens[i].type;\n\t\t\tif (type === \"inline\") result += this.renderInline(tokens[i].children, options, env);\n\t\t\telse if (typeof rules[type] !== \"undefined\") result += rules[type](tokens, i, options, env, this);\n\t\t\telse result += this.renderToken(tokens, i, options);\n\t\t}\n\t\treturn result;\n\t}\n};\n//#endregion\n//#region src/rules_core/state_core.ts\n/** Mutable state passed through the core rules chain. */\nvar StateCore = class {\n\tconstructor(src, md, env) {\n\t\t_defineProperty(this, \"tokens\", []);\n\t\t_defineProperty(this, \"inlineMode\", false);\n\t\t_defineProperty(this, \"Token\", Token);\n\t\tthis.src = src;\n\t\tthis.env = env;\n\t\tthis.md = md;\n\t}\n};\n//#endregion\n//#region src/rules_core/normalize.ts\nvar UNNORMALIZED_NEWLINE_RE = /\\r\\n?/g;\nvar NULL_RE = /\\0/g;\nfunction normalize(state) {\n\tlet str;\n\tstr = state.src.replace(UNNORMALIZED_NEWLINE_RE, \"\\n\");\n\tstr = str.replace(NULL_RE, \"�\");\n\tstate.src = str;\n}\n//#endregion\n//#region src/rules_core/block.ts\nfunction block(state) {\n\tlet token;\n\tif (state.inlineMode) {\n\t\ttoken = new state.Token(\"inline\", \"\", 0);\n\t\ttoken.content = state.src;\n\t\ttoken.map = [0, 1];\n\t\ttoken.children = [];\n\t\tstate.tokens.push(token);\n\t} else state.md.block.parse(state.src, state.md, state.env, state.tokens);\n}\n//#endregion\n//#region src/rules_core/strip_references.ts\nfunction strip_references(state) {\n\tconst tokens = state.tokens;\n\tlet last = 0;\n\tfor (let curr = 0; curr < tokens.length; curr++) {\n\t\tif (tokens[curr].type === \"reference_definition\") continue;\n\t\tif (curr !== last) tokens[last] = tokens[curr];\n\t\tlast++;\n\t}\n\tif (tokens.length !== last) tokens.length = last;\n}\n//#endregion\n//#region src/rules_core/inline.ts\nfunction inline(state) {\n\tconst tokens = state.tokens;\n\tfor (let i = 0, l = tokens.length; i < l; i++) {\n\t\tconst tok = tokens[i];\n\t\tif (tok.type === \"inline\") state.md.inline.parse(tok.content, state.md, state.env, tok.children);\n\t}\n}\n//#endregion\n//#region src/rules_core/linkify.ts\nfunction isLinkOpen$1(str) {\n\treturn /^<a[>\\s]/i.test(str);\n}\nfunction isLinkClose$1(str) {\n\treturn /^<\\/a\\s*>/i.test(str);\n}\nfunction linkify$1(state) {\n\tconst blockTokens = state.tokens;\n\tif (!state.md.options.linkify) return;\n\tfor (let j = 0, l = blockTokens.length; j < l; j++) {\n\t\tif (blockTokens[j].type !== \"inline\" || !state.md.linkify.test(blockTokens[j].content)) continue;\n\t\tconst tokens = blockTokens[j].children;\n\t\tconst replacements = [];\n\t\tlet htmlLinkLevel = 0;\n\t\tfor (let i = tokens.length - 1; i >= 0; i--) {\n\t\t\tconst currentToken = tokens[i];\n\t\t\tif (currentToken.type === \"link_close\") {\n\t\t\t\ti--;\n\t\t\t\twhile (tokens[i].level !== currentToken.level && tokens[i].type !== \"link_open\") i--;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (currentToken.type === \"html_inline\") {\n\t\t\t\tif (isLinkOpen$1(currentToken.content) && htmlLinkLevel > 0) htmlLinkLevel--;\n\t\t\t\tif (isLinkClose$1(currentToken.content)) htmlLinkLevel++;\n\t\t\t}\n\t\t\tif (htmlLinkLevel > 0) continue;\n\t\t\tif (currentToken.type === \"text\" && state.md.linkify.test(currentToken.content)) {\n\t\t\t\tconst text = currentToken.content;\n\t\t\t\tlet links = state.md.linkify.match(text);\n\t\t\t\tconst nodes = [];\n\t\t\t\tlet level = currentToken.level;\n\t\t\t\tlet lastPos = 0;\n\t\t\t\tif (links.length > 0 && links[0].index === 0 && i > 0 && tokens[i - 1].type === \"text_special\") links = links.slice(1);\n\t\t\t\tfor (let ln = 0; ln < links.length; ln++) {\n\t\t\t\t\tconst url = links[ln].url;\n\t\t\t\t\tconst fullUrl = state.md.normalizeLink(url);\n\t\t\t\t\tif (!state.md.validateLink(fullUrl)) continue;\n\t\t\t\t\tlet urlText = links[ln].text;\n\t\t\t\t\tif (!links[ln].schema) urlText = state.md.normalizeLinkText(`http://${urlText}`).replace(/^http:\\/\\//, \"\");\n\t\t\t\t\telse if (links[ln].schema === \"mailto:\" && !/^mailto:/i.test(urlText)) urlText = state.md.normalizeLinkText(`mailto:${urlText}`).replace(/^mailto:/, \"\");\n\t\t\t\t\telse urlText = state.md.normalizeLinkText(urlText);\n\t\t\t\t\tconst pos = links[ln].index;\n\t\t\t\t\tif (pos > lastPos) {\n\t\t\t\t\t\tconst token = new state.Token(\"text\", \"\", 0);\n\t\t\t\t\t\ttoken.content = text.slice(lastPos, pos);\n\t\t\t\t\t\ttoken.level = level;\n\t\t\t\t\t\tnodes.push(token);\n\t\t\t\t\t}\n\t\t\t\t\tconst token_o = new state.Token(\"link_open\", \"a\", 1);\n\t\t\t\t\ttoken_o.attrs = [[\"href\", fullUrl]];\n\t\t\t\t\ttoken_o.level = level++;\n\t\t\t\t\ttoken_o.markup = \"linkify\";\n\t\t\t\t\ttoken_o.info = \"auto\";\n\t\t\t\t\tnodes.push(token_o);\n\t\t\t\t\tconst token_t = new state.Token(\"text\", \"\", 0);\n\t\t\t\t\ttoken_t.content = urlText;\n\t\t\t\t\ttoken_t.level = level;\n\t\t\t\t\tnodes.push(token_t);\n\t\t\t\t\tconst token_c = new state.Token(\"link_close\", \"a\", -1);\n\t\t\t\t\ttoken_c.level = --level;\n\t\t\t\t\ttoken_c.markup = \"linkify\";\n\t\t\t\t\ttoken_c.info = \"auto\";\n\t\t\t\t\tnodes.push(token_c);\n\t\t\t\t\tlastPos = links[ln].lastIndex;\n\t\t\t\t}\n\t\t\t\tif (lastPos < text.length) {\n\t\t\t\t\tconst token = new state.Token(\"text\", \"\", 0);\n\t\t\t\t\ttoken.content = text.slice(lastPos);\n\t\t\t\t\ttoken.level = level;\n\t\t\t\t\tnodes.push(token);\n\t\t\t\t}\n\t\t\t\treplacements.push({\n\t\t\t\t\tindex: i,\n\t\t\t\t\tnodes\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tif (replacements.length > 0) {\n\t\t\tlet newTokensLength = tokens.length;\n\t\t\tfor (const replacement of replacements) newTokensLength += replacement.nodes.length - 1;\n\t\t\tconst newTokens = new Array(newTokensLength);\n\t\t\tlet replacementIndex = 0;\n\t\t\tlet newTokenIndex = 0;\n\t\t\treplacements.reverse();\n\t\t\tfor (let i = 0; i < tokens.length; i++) {\n\t\t\t\tconst replacement = replacements[replacementIndex];\n\t\t\t\tif ((replacement === null || replacement === void 0 ? void 0 : replacement.index) === i) {\n\t\t\t\t\tfor (const node of replacement.nodes) newTokens[newTokenIndex++] = node;\n\t\t\t\t\treplacementIndex++;\n\t\t\t\t} else newTokens[newTokenIndex++] = tokens[i];\n\t\t\t}\n\t\t\tblockTokens[j].children = newTokens;\n\t\t}\n\t}\n}\n//#endregion\n//#region src/rules_core/replacements.ts\nvar RARE_RE = /\\+-|\\.\\.|\\?\\?\\?\\?|!!!!|,,|--/;\nvar SCOPED_ABBR_TEST_RE = /\\((c|tm|r)\\)/i;\nvar SCOPED_ABBR_RE = /\\((c|tm|r)\\)/gi;\nvar SCOPED_ABBR = {\n\tc: \"©\",\n\tr: \"®\",\n\ttm: \"™\"\n};\nfunction replaceFn(match, name) {\n\treturn SCOPED_ABBR[name.toLowerCase()];\n}\nfunction replace_scoped(inlineTokens) {\n\tlet inside_autolink = 0;\n\tfor (let i = inlineTokens.length - 1; i >= 0; i--) {\n\t\tconst token = inlineTokens[i];\n\t\tif (token.type === \"text\" && !inside_autolink) token.content = token.content.replace(SCOPED_ABBR_RE, replaceFn);\n\t\tif (token.type === \"link_open\" && token.info === \"auto\") inside_autolink--;\n\t\tif (token.type === \"link_close\" && token.info === \"auto\") inside_autolink++;\n\t}\n}\nfunction replace_rare(inlineTokens) {\n\tlet inside_autolink = 0;\n\tfor (let i = inlineTokens.length - 1; i >= 0; i--) {\n\t\tconst token = inlineTokens[i];\n\t\tif (token.type === \"text\" && !inside_autolink) {\n\t\t\tif (RARE_RE.test(token.content)) token.content = token.content.replace(/\\+-/g, \"±\").replace(/\\.{2,}/g, \"…\").replace(/([?!])…/g, \"$1..\").replace(/([?!]){4,}/g, \"$1$1$1\").replace(/,{2,}/g, \",\").replace(/(^|[^-])---(?=[^-]|$)/gm, \"$1—\").replace(/(^|\\s)--(?=\\s|$)/gm, \"$1–\").replace(/(^|[^-\\s])--(?=[^-\\s]|$)/gm, \"$1–\");\n\t\t}\n\t\tif (token.type === \"link_open\" && token.info === \"auto\") inside_autolink--;\n\t\tif (token.type === \"link_close\" && token.info === \"auto\") inside_autolink++;\n\t}\n}\nfunction replace(state) {\n\tlet blkIdx;\n\tif (!state.md.options.typographer) return;\n\tfor (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {\n\t\tif (state.tokens[blkIdx].type !== \"inline\") continue;\n\t\tif (SCOPED_ABBR_TEST_RE.test(state.tokens[blkIdx].content)) replace_scoped(state.tokens[blkIdx].children);\n\t\tif (RARE_RE.test(state.tokens[blkIdx].content)) replace_rare(state.tokens[blkIdx].children);\n\t}\n}\n//#endregion\n//#region src/rules_core/smartquotes.ts\nvar QUOTE_TEST_RE = /['\"]/;\nvar QUOTE_RE = /['\"]/g;\nvar APOSTROPHE = \"’\";\nvar MAX_OPENERS = 1e3;\nfunction truncateStack(stack, heads, length) {\n\twhile (stack.length > length) {\n\t\tconst item = stack.pop();\n\t\tif (item.isSingleQuote) heads.single = item.prevSameQuoteIdx;\n\t\telse heads.double = item.prevSameQuoteIdx;\n\t}\n}\nfunction addReplacement(replacements, tokenIdx, pos, ch) {\n\tif (!replacements[tokenIdx]) replacements[tokenIdx] = [];\n\treplacements[tokenIdx].push({\n\t\tpos,\n\t\tch\n\t});\n}\nfunction applyReplacements(str, replacements) {\n\tlet result = \"\";\n\tlet lastPos = 0;\n\treplacements.sort((a, b) => a.pos - b.pos);\n\tfor (let i = 0; i < replacements.length; i++) {\n\t\tconst replacement = replacements[i];\n\t\tresult += str.slice(lastPos, replacement.pos) + replacement.ch;\n\t\tlastPos = replacement.pos + 1;\n\t}\n\treturn result + str.slice(lastPos);\n}\nfunction process_inlines(tokens, state) {\n\tlet j;\n\tconst stack = [];\n\tconst heads = {\n\t\tsingle: -1,\n\t\tdouble: -1\n\t};\n\tconst replacements = {};\n\tfor (let i = 0; i < tokens.length; i++) {\n\t\tconst token = tokens[i];\n\t\tconst thisLevel = tokens[i].level;\n\t\tfor (j = stack.length - 1; j >= 0; j--) if (stack[j].level <= thisLevel) break;\n\t\ttruncateStack(stack, heads, j + 1);\n\t\tif (token.type !== \"text\") continue;\n\t\tconst text = token.content;\n\t\tlet pos = 0;\n\t\tconst max = text.length;\n\t\tOUTER: while (pos < max) {\n\t\t\tQUOTE_RE.lastIndex = pos;\n\t\t\tconst t = QUOTE_RE.exec(text);\n\t\t\tif (!t) break;\n\t\t\tlet canOpen = true;\n\t\t\tlet canClose = true;\n\t\t\tpos = t.index + 1;\n\t\t\tconst isSingle = t[0] === \"'\";\n\t\t\tlet lastChar = 32;\n\t\t\tif (t.index - 1 >= 0) lastChar = text.charCodeAt(t.index - 1);\n\t\t\telse for (j = i - 1; j >= 0; j--) {\n\t\t\t\tif (tokens[j].type === \"softbreak\" || tokens[j].type === \"hardbreak\") break;\n\t\t\t\tif (!tokens[j].content) continue;\n\t\t\t\tlastChar = tokens[j].content.charCodeAt(tokens[j].content.length - 1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlet nextChar = 32;\n\t\t\tif (pos < max) nextChar = text.charCodeAt(pos);\n\t\t\telse for (j = i + 1; j < tokens.length; j++) {\n\t\t\t\tif (tokens[j].type === \"softbreak\" || tokens[j].type === \"hardbreak\") break;\n\t\t\t\tif (!tokens[j].content) continue;\n\t\t\t\tnextChar = tokens[j].content.charCodeAt(0);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tconst isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctCharCode(lastChar);\n\t\t\tconst isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctCharCode(nextChar);\n\t\t\tconst isLastWhiteSpace = isWhiteSpace(lastChar);\n\t\t\tconst isNextWhiteSpace = isWhiteSpace(nextChar);\n\t\t\tif (isNextWhiteSpace) canOpen = false;\n\t\t\telse if (isNextPunctChar) {\n\t\t\t\tif (!(isLastWhiteSpace || isLastPunctChar)) canOpen = false;\n\t\t\t}\n\t\t\tif (isLastWhiteSpace) canClose = false;\n\t\t\telse if (isLastPunctChar) {\n\t\t\t\tif (!(isNextWhiteSpace || isNextPunctChar)) canClose = false;\n\t\t\t}\n\t\t\tif (nextChar === 34 && t[0] === \"\\\"\") {\n\t\t\t\tif (lastChar >= 48 && lastChar <= 57) canClose = canOpen = false;\n\t\t\t}\n\t\t\tif (canOpen && canClose) {\n\t\t\t\tcanOpen = isLastPunctChar;\n\t\t\t\tcanClose = isNextPunctChar;\n\t\t\t}\n\t\t\tif (!canOpen && !canClose) {\n\t\t\t\tif (isSingle) addReplacement(replacements, i, t.index, APOSTROPHE);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (canClose) {\n\t\t\t\tj = isSingle ? heads.single : heads.double;\n\t\t\t\tif (j >= 0 && stack[j].level === thisLevel) {\n\t\t\t\t\tconst item = stack[j];\n\t\t\t\t\tlet openQuote;\n\t\t\t\t\tlet closeQuote;\n\t\t\t\t\tif (isSingle) {\n\t\t\t\t\t\topenQuote = state.md.options.quotes[2];\n\t\t\t\t\t\tcloseQuote = state.md.options.quotes[3];\n\t\t\t\t\t} else {\n\t\t\t\t\t\topenQuote = state.md.options.quotes[0];\n\t\t\t\t\t\tcloseQuote = state.md.options.quotes[1];\n\t\t\t\t\t}\n\t\t\t\t\taddReplacement(replacements, i, t.index, closeQuote);\n\t\t\t\t\taddReplacement(replacements, item.tokenIdx, item.contentPos, openQuote);\n\t\t\t\t\ttruncateStack(stack, heads, j);\n\t\t\t\t\tcontinue OUTER;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (canOpen) {\n\t\t\t\tif (stack.length >= MAX_OPENERS) return;\n\t\t\t\tstack.push({\n\t\t\t\t\ttokenIdx: i,\n\t\t\t\t\tcontentPos: t.index,\n\t\t\t\t\tisSingleQuote: isSingle,\n\t\t\t\t\tlevel: thisLevel,\n\t\t\t\t\tprevSameQuoteIdx: isSingle ? heads.single : heads.double\n\t\t\t\t});\n\t\t\t\tif (isSingle) heads.single = stack.length - 1;\n\t\t\t\telse heads.double = stack.length - 1;\n\t\t\t} else if (canClose && isSingle) addReplacement(replacements, i, t.index, APOSTROPHE);\n\t\t}\n\t}\n\tObject.keys(replacements).forEach(function(tokenIdx) {\n\t\tconst idx = Number(tokenIdx);\n\t\ttokens[idx].content = applyReplacements(tokens[idx].content, replacements[tokenIdx]);\n\t});\n}\nfunction smartquotes(state) {\n\tif (!state.md.options.typographer) return;\n\tfor (let blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {\n\t\tif (state.tokens[blkIdx].type !== \"inline\" || !QUOTE_TEST_RE.test(state.tokens[blkIdx].content)) continue;\n\t\tprocess_inlines(state.tokens[blkIdx].children, state);\n\t}\n}\n//#endregion\n//#region src/rules_core/text_join.ts\nfunction join_alt(tokens) {\n\tlet curr, last;\n\tconst max = tokens.length;\n\tfor (curr = 0; curr < max; curr++) if (tokens[curr].type === \"text_special\") tokens[curr].type = \"text\";\n\tfor (curr = last = 0; curr < max; curr++) if (tokens[curr].type === \"text\" && curr + 1 < max && tokens[curr + 1].type === \"text\") tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content;\n\telse {\n\t\tif (curr !== last) tokens[last] = tokens[curr];\n\t\tlast++;\n\t}\n\tif (curr !== last) tokens.length = last;\n}\nfunction text_join(state) {\n\tlet curr, last;\n\tconst blockTokens = state.tokens;\n\tconst l = blockTokens.length;\n\tfor (let j = 0; j < l; j++) {\n\t\tif (blockTokens[j].type !== \"inline\") continue;\n\t\tconst tokens = blockTokens[j].children;\n\t\tconst max = tokens.length;\n\t\tfor (curr = 0; curr < max; curr++) {\n\t\t\tif (tokens[curr].type === \"text_special\") tokens[curr].type = \"text\";\n\t\t\tif (tokens[curr].children) join_alt(tokens[curr].children);\n\t\t}\n\t\tfor (curr = last = 0; curr < max; curr++) if (tokens[curr].type === \"text\" && curr + 1 < max && tokens[curr + 1].type === \"text\") tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content;\n\t\telse {\n\t\t\tif (curr !== last) tokens[last] = tokens[curr];\n\t\t\tlast++;\n\t\t}\n\t\tif (curr !== last) tokens.length = last;\n\t}\n}\n//#endregion\n//#region src/parser_core.ts\nvar _rules$2 = [\n\t[\"normalize\", normalize],\n\t[\"block\", block],\n\t[\"strip_references\", strip_references],\n\t[\"inline\", inline],\n\t[\"linkify\", linkify$1],\n\t[\"replacements\", replace],\n\t[\"smartquotes\", smartquotes],\n\t[\"text_join\", text_join]\n];\n/**\n* Top-level rules executor. Glues block/inline parsers and does intermediate\n* transformations.\n*/\nvar ParserCore = class {\n\tconstructor() {\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* {@link Ruler} instance. Keep configuration of core rules.\n\t\t\t*/\n\t\t\t\"ruler\",\n\t\t\tnew Ruler()\n\t\t);\n\t\t_defineProperty(this, \"State\", StateCore);\n\t\tfor (let i = 0; i < _rules$2.length; i++) this.ruler.push(_rules$2[i][0], _rules$2[i][1]);\n\t}\n\t/**\n\t* Executes core chain rules.\n\t*/\n\tprocess(state) {\n\t\tconst rules = this.ruler.getRules(\"\");\n\t\tfor (let i = 0, l = rules.length; i < l; i++) rules[i](state);\n\t}\n};\n//#endregion\n//#region src/rules_block/state_block.ts\n/** Mutable state passed to block rules while tokenizing a source document. */\nvar StateBlock = class {\n\tconstructor(src, md, env, tokens) {\n\t\t_defineProperty(this, \"bMarks\", []);\n\t\t_defineProperty(this, \"eMarks\", []);\n\t\t_defineProperty(this, \"tShift\", []);\n\t\t_defineProperty(this, \"sCount\", []);\n\t\t_defineProperty(this, \"bsCount\", []);\n\t\t_defineProperty(this, \"blkIndent\", 0);\n\t\t_defineProperty(this, \"line\", 0);\n\t\t_defineProperty(this, \"lineMax\", 0);\n\t\t_defineProperty(this, \"tight\", false);\n\t\t_defineProperty(this, \"listIndent\", -1);\n\t\t_defineProperty(this, \"parentType\", \"root\");\n\t\t_defineProperty(this, \"level\", 0);\n\t\t_defineProperty(this, \"Token\", Token);\n\t\tthis.src = src;\n\t\tthis.md = md;\n\t\tthis.env = env;\n\t\tthis.tokens = tokens;\n\t\tconst s = this.src;\n\t\tfor (let start = 0, pos = 0, indent = 0, offset = 0, len = s.length, indent_found = false; pos < len; pos++) {\n\t\t\tconst ch = s.charCodeAt(pos);\n\t\t\tif (!indent_found) if (isSpace(ch)) {\n\t\t\t\tindent++;\n\t\t\t\tif (ch === 9) offset += 4 - offset % 4;\n\t\t\t\telse offset++;\n\t\t\t\tcontinue;\n\t\t\t} else indent_found = true;\n\t\t\tif (ch === 10 || pos === len - 1) {\n\t\t\t\tif (ch !== 10) pos++;\n\t\t\t\tthis.bMarks.push(start);\n\t\t\t\tthis.eMarks.push(pos);\n\t\t\t\tthis.tShift.push(indent);\n\t\t\t\tthis.sCount.push(offset);\n\t\t\t\tthis.bsCount.push(0);\n\t\t\t\tindent_found = false;\n\t\t\t\tindent = 0;\n\t\t\t\toffset = 0;\n\t\t\t\tstart = pos + 1;\n\t\t\t}\n\t\t}\n\t\tthis.bMarks.push(s.length);\n\t\tthis.eMarks.push(s.length);\n\t\tthis.tShift.push(0);\n\t\tthis.sCount.push(0);\n\t\tthis.bsCount.push(0);\n\t\tthis.lineMax = this.bMarks.length - 1;\n\t}\n\tpush(type, tag, nesting) {\n\t\tconst token = new Token(type, tag, nesting);\n\t\ttoken.block = true;\n\t\tif (nesting < 0) this.level--;\n\t\ttoken.level = this.level;\n\t\tif (nesting > 0) this.level++;\n\t\tthis.tokens.push(token);\n\t\treturn token;\n\t}\n\tisEmpty(line) {\n\t\treturn this.bMarks[line] + this.tShift[line] >= this.eMarks[line];\n\t}\n\tskipEmptyLines(from) {\n\t\tfor (let max = this.lineMax; from < max; from++) if (this.bMarks[from] + this.tShift[from] < this.eMarks[from]) break;\n\t\treturn from;\n\t}\n\tskipSpaces(pos) {\n\t\tfor (let max = this.src.length; pos < max; pos++) if (!isSpace(this.src.charCodeAt(pos))) break;\n\t\treturn pos;\n\t}\n\tskipSpacesBack(pos, min) {\n\t\tif (pos <= min) return pos;\n\t\twhile (pos > min) if (!isSpace(this.src.charCodeAt(--pos))) return pos + 1;\n\t\treturn pos;\n\t}\n\tskipChars(pos, code) {\n\t\tfor (let max = this.src.length; pos < max; pos++) if (this.src.charCodeAt(pos) !== code) break;\n\t\treturn pos;\n\t}\n\tskipCharsBack(pos, code, min) {\n\t\tif (pos <= min) return pos;\n\t\twhile (pos > min) if (code !== this.src.charCodeAt(--pos)) return pos + 1;\n\t\treturn pos;\n\t}\n\tgetLines(begin, end, indent, keepLastLF) {\n\t\tif (begin >= end) return \"\";\n\t\tconst queue = new Array(end - begin);\n\t\tfor (let i = 0, line = begin; line < end; line++, i++) {\n\t\t\tlet lineIndent = 0;\n\t\t\tconst lineStart = this.bMarks[line];\n\t\t\tlet first = lineStart;\n\t\t\tlet last;\n\t\t\tif (line + 1 < end || keepLastLF) last = this.eMarks[line] + 1;\n\t\t\telse last = this.eMarks[line];\n\t\t\twhile (first < last && lineIndent < indent) {\n\t\t\t\tconst ch = this.src.charCodeAt(first);\n\t\t\t\tif (isSpace(ch)) if (ch === 9) lineIndent += 4 - (lineIndent + this.bsCount[line]) % 4;\n\t\t\t\telse lineIndent++;\n\t\t\t\telse if (first - lineStart < this.tShift[line]) lineIndent++;\n\t\t\t\telse break;\n\t\t\t\tfirst++;\n\t\t\t}\n\t\t\tif (lineIndent > indent) queue[i] = new Array(lineIndent - indent + 1).join(\" \") + this.src.slice(first, last);\n\t\t\telse queue[i] = this.src.slice(first, last);\n\t\t}\n\t\treturn queue.join(\"\");\n\t}\n};\n//#endregion\n//#region src/rules_block/table.ts\nvar MAX_AUTOCOMPLETED_CELLS = 65536;\nfunction getLine(state, line) {\n\tconst pos = state.bMarks[line] + state.tShift[line];\n\tconst max = state.eMarks[line];\n\treturn state.src.slice(pos, max);\n}\nfunction escapedSplit(str) {\n\tconst result = [];\n\tconst max = str.length;\n\tlet pos = 0;\n\tlet ch = str.charCodeAt(pos);\n\tlet isEscaped = false;\n\tlet lastPos = 0;\n\tlet current = \"\";\n\twhile (pos < max) {\n\t\tif (ch === 124) if (!isEscaped) {\n\t\t\tresult.push(current + str.substring(lastPos, pos));\n\t\t\tcurrent = \"\";\n\t\t\tlastPos = pos + 1;\n\t\t} else {\n\t\t\tcurrent += str.substring(lastPos, pos - 1);\n\t\t\tlastPos = pos;\n\t\t}\n\t\tisEscaped = ch === 92;\n\t\tpos++;\n\t\tch = str.charCodeAt(pos);\n\t}\n\tresult.push(current + str.substring(lastPos));\n\treturn result;\n}\nfunction table(state, startLine, endLine, silent) {\n\tif (startLine + 2 > endLine) return false;\n\tlet nextLine = startLine + 1;\n\tif (state.sCount[nextLine] < state.blkIndent) return false;\n\tif (state.sCount[nextLine] - state.blkIndent >= 4) return false;\n\tlet pos = state.bMarks[nextLine] + state.tShift[nextLine];\n\tif (pos >= state.eMarks[nextLine]) return false;\n\tconst firstCh = state.src.charCodeAt(pos++);\n\tif (firstCh !== 124 && firstCh !== 45 && firstCh !== 58) return false;\n\tif (pos >= state.eMarks[nextLine]) return false;\n\tconst secondCh = state.src.charCodeAt(pos++);\n\tif (secondCh !== 124 && secondCh !== 45 && secondCh !== 58 && !isSpace(secondCh)) return false;\n\tif (firstCh === 45 && isSpace(secondCh)) return false;\n\twhile (pos < state.eMarks[nextLine]) {\n\t\tconst ch = state.src.charCodeAt(pos);\n\t\tif (ch !== 124 && ch !== 45 && ch !== 58 && !isSpace(ch)) return false;\n\t\tpos++;\n\t}\n\tlet lineText = getLine(state, startLine + 1);\n\tlet columns = lineText.split(\"|\");\n\tconst aligns = [];\n\tfor (let i = 0; i < columns.length; i++) {\n\t\tconst t = columns[i].trim();\n\t\tif (!t) if (i === 0 || i === columns.length - 1) continue;\n\t\telse return false;\n\t\tif (!/^:?-+:?$/.test(t)) return false;\n\t\tif (t.charCodeAt(t.length - 1) === 58) aligns.push(t.charCodeAt(0) === 58 ? \"center\" : \"right\");\n\t\telse if (t.charCodeAt(0) === 58) aligns.push(\"left\");\n\t\telse aligns.push(\"\");\n\t}\n\tlineText = getLine(state, startLine).trim();\n\tif (lineText.indexOf(\"|\") === -1) return false;\n\tif (state.sCount[startLine] - state.blkIndent >= 4) return false;\n\tcolumns = escapedSplit(lineText);\n\tif (columns.length && columns[0] === \"\") columns.shift();\n\tif (columns.length && columns[columns.length - 1] === \"\") columns.pop();\n\tconst columnCount = columns.length;\n\tif (columnCount === 0 || columnCount !== aligns.length) return false;\n\tif (silent) return true;\n\tconst oldParentType = state.parentType;\n\tstate.parentType = \"table\";\n\tconst terminatorRules = state.md.block.ruler.getRules(\"blockquote\");\n\tconst token_to = state.push(\"table_open\", \"table\", 1);\n\tconst tableLines = [startLine, 0];\n\ttoken_to.map = tableLines;\n\tconst token_tho = state.push(\"thead_open\", \"thead\", 1);\n\ttoken_tho.map = [startLine, startLine + 1];\n\tconst token_htro = state.push(\"tr_open\", \"tr\", 1);\n\ttoken_htro.map = [startLine, startLine + 1];\n\tfor (let i = 0; i < columns.length; i++) {\n\t\tconst token_ho = state.push(\"th_open\", \"th\", 1);\n\t\tif (aligns[i]) token_ho.attrs = [[\"style\", `text-align:${aligns[i]}`]];\n\t\tconst token_il = state.push(\"inline\", \"\", 0);\n\t\ttoken_il.content = columns[i].trim();\n\t\ttoken_il.children = [];\n\t\tstate.push(\"th_close\", \"th\", -1);\n\t}\n\tstate.push(\"tr_close\", \"tr\", -1);\n\tstate.push(\"thead_close\", \"thead\", -1);\n\tlet tbodyLines;\n\tlet autocompletedCells = 0;\n\tfor (nextLine = startLine + 2; nextLine < endLine; nextLine++) {\n\t\tif (state.sCount[nextLine] < state.blkIndent) break;\n\t\tlet terminate = false;\n\t\tfor (let i = 0, l = terminatorRules.length; i < l; i++) if (terminatorRules[i](state, nextLine, endLine, true)) {\n\t\t\tterminate = true;\n\t\t\tbreak;\n\t\t}\n\t\tif (terminate) break;\n\t\tlineText = getLine(state, nextLine).trim();\n\t\tif (!lineText) break;\n\t\tif (state.sCount[nextLine] - state.blkIndent >= 4) break;\n\t\tcolumns = escapedSplit(lineText);\n\t\tif (columns.length && columns[0] === \"\") columns.shift();\n\t\tif (columns.length && columns[columns.length - 1] === \"\") columns.pop();\n\t\tautocompletedCells += columnCount - columns.length;\n\t\tif (autocompletedCells > MAX_AUTOCOMPLETED_CELLS) break;\n\t\tif (nextLine === startLine + 2) {\n\t\t\tconst token_tbo = state.push(\"tbody_open\", \"tbody\", 1);\n\t\t\ttoken_tbo.map = tbodyLines = [startLine + 2, 0];\n\t\t}\n\t\tconst token_tro = state.push(\"tr_open\", \"tr\", 1);\n\t\ttoken_tro.map = [nextLine, nextLine + 1];\n\t\tfor (let i = 0; i < columnCount; i++) {\n\t\t\tconst token_tdo = state.push(\"td_open\", \"td\", 1);\n\t\t\tif (aligns[i]) token_tdo.attrs = [[\"style\", `text-align:${aligns[i]}`]];\n\t\t\tconst token_il = state.push(\"inline\", \"\", 0);\n\t\t\ttoken_il.content = columns[i] ? columns[i].trim() : \"\";\n\t\t\ttoken_il.children = [];\n\t\t\tstate.push(\"td_close\", \"td\", -1);\n\t\t}\n\t\tstate.push(\"tr_close\", \"tr\", -1);\n\t}\n\tif (tbodyLines) {\n\t\tstate.push(\"tbody_close\", \"tbody\", -1);\n\t\ttbodyLines[1] = nextLine;\n\t}\n\tstate.push(\"table_close\", \"table\", -1);\n\ttableLines[1] = nextLine;\n\tstate.parentType = oldParentType;\n\tstate.line = nextLine;\n\treturn true;\n}\n//#endregion\n//#region src/rules_block/code.ts\nfunction code(state, startLine, endLine) {\n\tif (state.sCount[startLine] - state.blkIndent < 4) return false;\n\tlet nextLine = startLine + 1;\n\tlet last = nextLine;\n\twhile (nextLine < endLine) {\n\t\tif (state.isEmpty(nextLine)) {\n\t\t\tnextLine++;\n\t\t\tcontinue;\n\t\t}\n\t\tif (state.sCount[nextLine] - state.blkIndent >= 4) {\n\t\t\tnextLine++;\n\t\t\tlast = nextLine;\n\t\t\tcontinue;\n\t\t}\n\t\tbreak;\n\t}\n\tstate.line = last;\n\tconst token = state.push(\"code_block\", \"code\", 0);\n\ttoken.content = state.getLines(startLine, last, 4 + state.blkIndent, false) + \"\\n\";\n\ttoken.map = [startLine, state.line];\n\treturn true;\n}\n//#endregion\n//#region src/rules_block/fence.ts\nfunction fence(state, startLine, endLine, silent) {\n\tlet pos = state.bMarks[startLine] + state.tShift[startLine];\n\tlet max = state.eMarks[startLine];\n\tif (state.sCount[startLine] - state.blkIndent >= 4) return false;\n\tif (pos + 3 > max) return false;\n\tconst marker = state.src.charCodeAt(pos);\n\tif (marker !== 126 && marker !== 96) return false;\n\tlet mem = pos;\n\tpos = state.skipChars(pos, marker);\n\tlet len = pos - mem;\n\tif (len < 3) return false;\n\tconst markup = state.src.slice(mem, pos);\n\tconst params = state.src.slice(pos, max);\n\tif (marker === 96) {\n\t\tif (params.indexOf(String.fromCharCode(marker)) >= 0) return false;\n\t}\n\tif (silent) return true;\n\tlet nextLine = startLine;\n\tlet haveEndMarker = false;\n\tfor (;;) {\n\t\tnextLine++;\n\t\tif (nextLine >= endLine) break;\n\t\tpos = mem = state.bMarks[nextLine] + state.tShift[nextLine];\n\t\tmax = state.eMarks[nextLine];\n\t\tif (pos < max && state.sCount[nextLine] < state.blkIndent) break;\n\t\tif (state.src.charCodeAt(pos) !== marker) continue;\n\t\tif (state.sCount[nextLine] - state.blkIndent >= 4) continue;\n\t\tpos = state.skipChars(pos, marker);\n\t\tif (pos - mem < len) continue;\n\t\tpos = state.skipSpaces(pos);\n\t\tif (pos < max) continue;\n\t\thaveEndMarker = true;\n\t\tbreak;\n\t}\n\tlen = state.sCount[startLine];\n\tstate.line = nextLine + (haveEndMarker ? 1 : 0);\n\tconst token = state.push(\"fence\", \"code\", 0);\n\ttoken.info = params;\n\ttoken.content = state.getLines(startLine + 1, nextLine, len, true);\n\ttoken.markup = markup;\n\ttoken.map = [startLine, state.line];\n\treturn true;\n}\n//#endregion\n//#region src/rules_block/blockquote.ts\nfunction blockquote(state, startLine, endLine, silent) {\n\tlet pos = state.bMarks[startLine] + state.tShift[startLine];\n\tlet max = state.eMarks[startLine];\n\tconst oldLineMax = state.lineMax;\n\tif (state.sCount[startLine] - state.blkIndent >= 4) return false;\n\tif (state.src.charCodeAt(pos) !== 62) return false;\n\tif (silent) return true;\n\tconst oldBMarks = [];\n\tconst oldBSCount = [];\n\tconst oldSCount = [];\n\tconst oldTShift = [];\n\tconst terminatorRules = state.md.block.ruler.getRules(\"blockquote\");\n\tconst oldParentType = state.parentType;\n\tstate.parentType = \"blockquote\";\n\tlet lastLineEmpty = false;\n\tlet nextLine;\n\tfor (nextLine = startLine; nextLine < endLine; nextLine++) {\n\t\tconst isOutdented = state.sCount[nextLine] < state.blkIndent;\n\t\tpos = state.bMarks[nextLine] + state.tShift[nextLine];\n\t\tmax = state.eMarks[nextLine];\n\t\tif (pos >= max) break;\n\t\tif (state.src.charCodeAt(pos++) === 62 && !isOutdented) {\n\t\t\tlet initial = state.sCount[nextLine] + 1;\n\t\t\tlet spaceAfterMarker;\n\t\t\tlet adjustTab;\n\t\t\tif (state.src.charCodeAt(pos) === 32) {\n\t\t\t\tpos++;\n\t\t\t\tinitial++;\n\t\t\t\tadjustTab = false;\n\t\t\t\tspaceAfterMarker = true;\n\t\t\t} else if (state.src.charCodeAt(pos) === 9) {\n\t\t\t\tspaceAfterMarker = true;\n\t\t\t\tif ((state.bsCount[nextLine] + initial) % 4 === 3) {\n\t\t\t\t\tpos++;\n\t\t\t\t\tinitial++;\n\t\t\t\t\tadjustTab = false;\n\t\t\t\t} else adjustTab = true;\n\t\t\t} else spaceAfterMarker = false;\n\t\t\tlet offset = initial;\n\t\t\toldBMarks.push(state.bMarks[nextLine]);\n\t\t\tstate.bMarks[nextLine] = pos;\n\t\t\twhile (pos < max) {\n\t\t\t\tconst ch = state.src.charCodeAt(pos);\n\t\t\t\tif (isSpace(ch)) if (ch === 9) offset += 4 - (offset + state.bsCount[nextLine] + (adjustTab ? 1 : 0)) % 4;\n\t\t\t\telse offset++;\n\t\t\t\telse break;\n\t\t\t\tpos++;\n\t\t\t}\n\t\t\tlastLineEmpty = pos >= max;\n\t\t\toldBSCount.push(state.bsCount[nextLine]);\n\t\t\tstate.bsCount[nextLine] = state.sCount[nextLine] + 1 + (spaceAfterMarker ? 1 : 0);\n\t\t\toldSCount.push(state.sCount[nextLine]);\n\t\t\tstate.sCount[nextLine] = offset - initial;\n\t\t\toldTShift.push(state.tShift[nextLine]);\n\t\t\tstate.tShift[nextLine] = pos - state.bMarks[nextLine];\n\t\t\tcontinue;\n\t\t}\n\t\tif (lastLineEmpty) break;\n\t\tlet terminate = false;\n\t\tfor (let i = 0, l = terminatorRules.length; i < l; i++) if (terminatorRules[i](state, nextLine, endLine, true)) {\n\t\t\tterminate = true;\n\t\t\tbreak;\n\t\t}\n\t\tif (terminate) {\n\t\t\tstate.lineMax = nextLine;\n\t\t\tif (state.blkIndent !== 0) {\n\t\t\t\toldBMarks.push(state.bMarks[nextLine]);\n\t\t\t\toldBSCount.push(state.bsCount[nextLine]);\n\t\t\t\toldTShift.push(state.tShift[nextLine]);\n\t\t\t\toldSCount.push(state.sCount[nextLine]);\n\t\t\t\tstate.sCount[nextLine] -= state.blkIndent;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\toldBMarks.push(state.bMarks[nextLine]);\n\t\toldBSCount.push(state.bsCount[nextLine]);\n\t\toldTShift.push(state.tShift[nextLine]);\n\t\toldSCount.push(state.sCount[nextLine]);\n\t\tstate.sCount[nextLine] = -1;\n\t}\n\tconst oldIndent = state.blkIndent;\n\tstate.blkIndent = 0;\n\tconst token_o = state.push(\"blockquote_open\", \"blockquote\", 1);\n\ttoken_o.markup = \">\";\n\tconst lines = [startLine, 0];\n\ttoken_o.map = lines;\n\tstate.md.block.tokenize(state, startLine, nextLine);\n\tconst token_c = state.push(\"blockquote_close\", \"blockquote\", -1);\n\ttoken_c.markup = \">\";\n\tstate.lineMax = oldLineMax;\n\tstate.parentType = oldParentType;\n\tlines[1] = state.line;\n\tfor (let i = 0; i < oldTShift.length; i++) {\n\t\tstate.bMarks[i + startLine] = oldBMarks[i];\n\t\tstate.tShift[i + startLine] = oldTShift[i];\n\t\tstate.sCount[i + startLine] = oldSCount[i];\n\t\tstate.bsCount[i + startLine] = oldBSCount[i];\n\t}\n\tstate.blkIndent = oldIndent;\n\treturn true;\n}\n//#endregion\n//#region src/rules_block/hr.ts\nfunction hr(state, startLine, endLine, silent) {\n\tconst max = state.eMarks[startLine];\n\tif (state.sCount[startLine] - state.blkIndent >= 4) return false;\n\tlet pos = state.bMarks[startLine] + state.tShift[startLine];\n\tconst marker = state.src.charCodeAt(pos++);\n\tif (marker !== 42 && marker !== 45 && marker !== 95) return false;\n\tlet cnt = 1;\n\twhile (pos < max) {\n\t\tconst ch = state.src.charCodeAt(pos++);\n\t\tif (ch !== marker && !isSpace(ch)) return false;\n\t\tif (ch === marker) cnt++;\n\t}\n\tif (cnt < 3) return false;\n\tif (silent) return true;\n\tstate.line = startLine + 1;\n\tconst token = state.push(\"hr\", \"hr\", 0);\n\ttoken.map = [startLine, state.line];\n\ttoken.markup = Array(cnt + 1).join(String.fromCharCode(marker));\n\treturn true;\n}\n//#endregion\n//#region src/rules_block/list.ts\nfunction skipBulletListMarker(state, startLine) {\n\tconst max = state.eMarks[startLine];\n\tlet pos = state.bMarks[startLine] + state.tShift[startLine];\n\tconst marker = state.src.charCodeAt(pos++);\n\tif (marker !== 42 && marker !== 45 && marker !== 43) return -1;\n\tif (pos < max) {\n\t\tif (!isSpace(state.src.charCodeAt(pos))) return -1;\n\t}\n\treturn pos;\n}\nfunction skipOrderedListMarker(state, startLine) {\n\tconst start = state.bMarks[startLine] + state.tShift[startLine];\n\tconst max = state.eMarks[startLine];\n\tlet pos = start;\n\tif (pos + 1 >= max) return -1;\n\tlet ch = state.src.charCodeAt(pos++);\n\tif (ch < 48 || ch > 57) return -1;\n\tfor (;;) {\n\t\tif (pos >= max) return -1;\n\t\tch = state.src.charCodeAt(pos++);\n\t\tif (ch >= 48 && ch <= 57) {\n\t\t\tif (pos - start >= 10) return -1;\n\t\t\tcontinue;\n\t\t}\n\t\tif (ch === 41 || ch === 46) break;\n\t\treturn -1;\n\t}\n\tif (pos < max) {\n\t\tch = state.src.charCodeAt(pos);\n\t\tif (!isSpace(ch)) return -1;\n\t}\n\treturn pos;\n}\nfunction markTightParagraphs(state, idx) {\n\tconst level = state.level + 2;\n\tfor (let i = idx + 2, l = state.tokens.length - 2; i < l; i++) if (state.tokens[i].level === level && state.tokens[i].type === \"paragraph_open\") {\n\t\tstate.tokens[i + 2].hidden = true;\n\t\tstate.tokens[i].hidden = true;\n\t\ti += 2;\n\t}\n}\nfunction list(state, startLine, endLine, silent) {\n\tlet max, pos, start, token;\n\tlet nextLine = startLine;\n\tlet tight = true;\n\tif (state.sCount[nextLine] - state.blkIndent >= 4) return false;\n\tif (state.listIndent >= 0 && state.sCount[nextLine] - state.listIndent >= 4 && state.sCount[nextLine] < state.blkIndent) return false;\n\tlet isTerminatingParagraph = false;\n\tif (silent && state.parentType === \"paragraph\") {\n\t\tif (state.sCount[nextLine] >= state.blkIndent) isTerminatingParagraph = true;\n\t}\n\tlet isOrdered;\n\tlet markerValue;\n\tlet posAfterMarker;\n\tif ((posAfterMarker = skipOrderedListMarker(state, nextLine)) >= 0) {\n\t\tisOrdered = true;\n\t\tstart = state.bMarks[nextLine] + state.tShift[nextLine];\n\t\tmarkerValue = Number(state.src.slice(start, posAfterMarker - 1));\n\t\tif (isTerminatingParagraph && markerValue !== 1) return false;\n\t} else if ((posAfterMarker = skipBulletListMarker(state, nextLine)) >= 0) isOrdered = false;\n\telse return false;\n\tif (isTerminatingParagraph) {\n\t\tif (state.skipSpaces(posAfterMarker) >= state.eMarks[nextLine]) return false;\n\t}\n\tif (silent) return true;\n\tconst markerCharCode = state.src.charCodeAt(posAfterMarker - 1);\n\tconst listTokIdx = state.tokens.length;\n\tif (isOrdered) {\n\t\ttoken = state.push(\"ordered_list_open\", \"ol\", 1);\n\t\tif (markerValue !== 1) token.attrs = [[\"start\", markerValue]];\n\t} else token = state.push(\"bullet_list_open\", \"ul\", 1);\n\tconst listLines = [nextLine, 0];\n\ttoken.map = listLines;\n\ttoken.markup = String.fromCharCode(markerCharCode);\n\tlet prevEmptyEnd = false;\n\tconst terminatorRules = state.md.block.ruler.getRules(\"list\");\n\tconst oldParentType = state.parentType;\n\tstate.parentType = \"list\";\n\twhile (nextLine < endLine) {\n\t\tpos = posAfterMarker;\n\t\tmax = state.eMarks[nextLine];\n\t\tconst initial = state.sCount[nextLine] + posAfterMarker - (state.bMarks[nextLine] + state.tShift[nextLine]);\n\t\tlet offset = initial;\n\t\twhile (pos < max) {\n\t\t\tconst ch = state.src.charCodeAt(pos);\n\t\t\tif (ch === 9) offset += 4 - (offset + state.bsCount[nextLine]) % 4;\n\t\t\telse if (ch === 32) offset++;\n\t\t\telse break;\n\t\t\tpos++;\n\t\t}\n\t\tconst contentStart = pos;\n\t\tlet indentAfterMarker;\n\t\tif (contentStart >= max) indentAfterMarker = 1;\n\t\telse indentAfterMarker = offset - initial;\n\t\tif (indentAfterMarker > 4) indentAfterMarker = 1;\n\t\tconst indent = initial + indentAfterMarker;\n\t\ttoken = state.push(\"list_item_open\", \"li\", 1);\n\t\ttoken.markup = String.fromCharCode(markerCharCode);\n\t\tconst itemLines = [nextLine, 0];\n\t\ttoken.map = itemLines;\n\t\tif (isOrdered) token.info = state.src.slice(start, posAfterMarker - 1);\n\t\tconst oldTight = state.tight;\n\t\tconst oldTShift = state.tShift[nextLine];\n\t\tconst oldSCount = state.sCount[nextLine];\n\t\tconst oldListIndent = state.listIndent;\n\t\tstate.listIndent = state.blkIndent;\n\t\tstate.blkIndent = indent;\n\t\tstate.tight = true;\n\t\tstate.tShift[nextLine] = contentStart - state.bMarks[nextLine];\n\t\tstate.sCount[nextLine] = offset;\n\t\tif (contentStart >= max && state.isEmpty(nextLine + 1)) state.line = Math.min(state.line + 2, endLine);\n\t\telse state.md.block.tokenize(state, nextLine, endLine);\n\t\tif (!state.tight || prevEmptyEnd) tight = false;\n\t\tprevEmptyEnd = state.line - nextLine > 1 && state.isEmpty(state.line - 1);\n\t\tstate.blkIndent = state.listIndent;\n\t\tstate.listIndent = oldListIndent;\n\t\tstate.tShift[nextLine] = oldTShift;\n\t\tstate.sCount[nextLine] = oldSCount;\n\t\tstate.tight = oldTight;\n\t\ttoken = state.push(\"list_item_close\", \"li\", -1);\n\t\ttoken.markup = String.fromCharCode(markerCharCode);\n\t\tnextLine = state.line;\n\t\titemLines[1] = nextLine;\n\t\tif (nextLine >= endLine) break;\n\t\tif (state.sCount[nextLine] < state.blkIndent) break;\n\t\tif (state.sCount[nextLine] - state.blkIndent >= 4) break;\n\t\tlet terminate = false;\n\t\tfor (let i = 0, l = terminatorRules.length; i < l; i++) if (terminatorRules[i](state, nextLine, endLine, true)) {\n\t\t\tterminate = true;\n\t\t\tbreak;\n\t\t}\n\t\tif (terminate) break;\n\t\tif (isOrdered) {\n\t\t\tposAfterMarker = skipOrderedListMarker(state, nextLine);\n\t\t\tif (posAfterMarker < 0) break;\n\t\t\tstart = state.bMarks[nextLine] + state.tShift[nextLine];\n\t\t} else {\n\t\t\tposAfterMarker = skipBulletListMarker(state, nextLine);\n\t\t\tif (posAfterMarker < 0) break;\n\t\t}\n\t\tif (markerCharCode !== state.src.charCodeAt(posAfterMarker - 1)) break;\n\t}\n\tif (isOrdered) token = state.push(\"ordered_list_close\", \"ol\", -1);\n\telse token = state.push(\"bullet_list_close\", \"ul\", -1);\n\ttoken.markup = String.fromCharCode(markerCharCode);\n\tlistLines[1] = nextLine;\n\tstate.line = nextLine;\n\tstate.parentType = oldParentType;\n\tif (tight) markTightParagraphs(state, listTokIdx);\n\treturn true;\n}\n//#endregion\n//#region src/rules_block/reference.ts\nfunction reference(state, startLine, _endLine, silent) {\n\tlet pos = state.bMarks[startLine] + state.tShift[startLine];\n\tlet max = state.eMarks[startLine];\n\tlet nextLine = startLine + 1;\n\tif (state.sCount[startLine] - state.blkIndent >= 4) return false;\n\tif (state.src.charCodeAt(pos) !== 91) return false;\n\tfunction getNextLine(nextLine) {\n\t\tconst endLine = state.lineMax;\n\t\tif (nextLine >= endLine || state.isEmpty(nextLine)) return null;\n\t\tlet isContinuation = false;\n\t\tif (state.sCount[nextLine] - state.blkIndent > 3) isContinuation = true;\n\t\tif (state.sCount[nextLine] < 0) isContinuation = true;\n\t\tif (!isContinuation) {\n\t\t\tconst terminatorRules = state.md.block.ruler.getRules(\"reference\");\n\t\t\tconst oldParentType = state.parentType;\n\t\t\tstate.parentType = \"reference\";\n\t\t\tlet terminate = false;\n\t\t\tfor (let i = 0, l = terminatorRules.length; i < l; i++) if (terminatorRules[i](state, nextLine, endLine, true)) {\n\t\t\t\tterminate = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tstate.parentType = oldParentType;\n\t\t\tif (terminate) return null;\n\t\t}\n\t\tconst pos = state.bMarks[nextLine] + state.tShift[nextLine];\n\t\tconst max = state.eMarks[nextLine];\n\t\treturn state.src.slice(pos, max + 1);\n\t}\n\tlet str = state.src.slice(pos, max + 1);\n\tmax = str.length;\n\tlet labelEnd = -1;\n\tfor (pos = 1; pos < max; pos++) {\n\t\tconst ch = str.charCodeAt(pos);\n\t\tif (ch === 91) return false;\n\t\telse if (ch === 93) {\n\t\t\tlabelEnd = pos;\n\t\t\tbreak;\n\t\t} else if (ch === 10) {\n\t\t\tconst lineContent = getNextLine(nextLine);\n\t\t\tif (lineContent !== null) {\n\t\t\t\tstr += lineContent;\n\t\t\t\tmax = str.length;\n\t\t\t\tnextLine++;\n\t\t\t}\n\t\t} else if (ch === 92) {\n\t\t\tpos++;\n\t\t\tif (pos < max && str.charCodeAt(pos) === 10) {\n\t\t\t\tconst lineContent = getNextLine(nextLine);\n\t\t\t\tif (lineContent !== null) {\n\t\t\t\t\tstr += lineContent;\n\t\t\t\t\tmax = str.length;\n\t\t\t\t\tnextLine++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 58) return false;\n\tfor (pos = labelEnd + 2; pos < max; pos++) {\n\t\tconst ch = str.charCodeAt(pos);\n\t\tif (ch === 10) {\n\t\t\tconst lineContent = getNextLine(nextLine);\n\t\t\tif (lineContent !== null) {\n\t\t\t\tstr += lineContent;\n\t\t\t\tmax = str.length;\n\t\t\t\tnextLine++;\n\t\t\t}\n\t\t} else if (isSpace(ch)) {} else break;\n\t}\n\tconst destRes = state.md.helpers.parseLinkDestination(str, pos, max);\n\tif (!destRes.ok) return false;\n\tconst href = state.md.normalizeLink(destRes.str);\n\tif (!state.md.validateLink(href)) return false;\n\tpos = destRes.pos;\n\tconst destEndPos = pos;\n\tconst destEndLineNo = nextLine;\n\tconst start = pos;\n\tfor (; pos < max; pos++) {\n\t\tconst ch = str.charCodeAt(pos);\n\t\tif (ch === 10) {\n\t\t\tconst lineContent = getNextLine(nextLine);\n\t\t\tif (lineContent !== null) {\n\t\t\t\tstr += lineContent;\n\t\t\t\tmax = str.length;\n\t\t\t\tnextLine++;\n\t\t\t}\n\t\t} else if (isSpace(ch)) {} else break;\n\t}\n\tlet titleRes = state.md.helpers.parseLinkTitle(str, pos, max);\n\twhile (titleRes.can_continue) {\n\t\tconst lineContent = getNextLine(nextLine);\n\t\tif (lineContent === null) break;\n\t\tstr += lineContent;\n\t\tpos = max;\n\t\tmax = str.length;\n\t\tnextLine++;\n\t\ttitleRes = state.md.helpers.parseLinkTitle(str, pos, max, titleRes);\n\t}\n\tlet title;\n\tif (pos < max && start !== pos && titleRes.ok) {\n\t\ttitle = titleRes.str;\n\t\tpos = titleRes.pos;\n\t} else {\n\t\ttitle = \"\";\n\t\tpos = destEndPos;\n\t\tnextLine = destEndLineNo;\n\t}\n\twhile (pos < max) {\n\t\tif (!isSpace(str.charCodeAt(pos))) break;\n\t\tpos++;\n\t}\n\tif (pos < max && str.charCodeAt(pos) !== 10) {\n\t\tif (title) {\n\t\t\ttitle = \"\";\n\t\t\tpos = destEndPos;\n\t\t\tnextLine = destEndLineNo;\n\t\t\twhile (pos < max) {\n\t\t\t\tif (!isSpace(str.charCodeAt(pos))) break;\n\t\t\t\tpos++;\n\t\t\t}\n\t\t}\n\t}\n\tif (pos < max && str.charCodeAt(pos) !== 10) return false;\n\tconst label = normalizeReference(str.slice(1, labelEnd));\n\tif (!label) return false;\n\t/* istanbul ignore if */\n\tif (silent) return true;\n\tif (typeof state.env.references === \"undefined\") state.env.references = {};\n\tif (typeof state.env.references[label] === \"undefined\") state.env.references[label] = {\n\t\ttitle,\n\t\thref\n\t};\n\tconst token = state.push(\"reference_definition\", \"\", 0);\n\ttoken.map = [startLine, nextLine];\n\ttoken.hidden = true;\n\tconst meta = Object.create(null);\n\tmeta.label = label;\n\ttoken.meta = meta;\n\tstate.line = nextLine;\n\treturn true;\n}\n//#endregion\n//#region src/common/html_blocks.ts\nvar html_blocks_default = [\n\t\"address\",\n\t\"article\",\n\t\"aside\",\n\t\"base\",\n\t\"basefont\",\n\t\"blockquote\",\n\t\"body\",\n\t\"caption\",\n\t\"center\",\n\t\"col\",\n\t\"colgroup\",\n\t\"dd\",\n\t\"details\",\n\t\"dialog\",\n\t\"dir\",\n\t\"div\",\n\t\"dl\",\n\t\"dt\",\n\t\"fieldset\",\n\t\"figcaption\",\n\t\"figure\",\n\t\"footer\",\n\t\"form\",\n\t\"frame\",\n\t\"frameset\",\n\t\"h1\",\n\t\"h2\",\n\t\"h3\",\n\t\"h4\",\n\t\"h5\",\n\t\"h6\",\n\t\"head\",\n\t\"header\",\n\t\"hr\",\n\t\"html\",\n\t\"iframe\",\n\t\"legend\",\n\t\"li\",\n\t\"link\",\n\t\"main\",\n\t\"menu\",\n\t\"menuitem\",\n\t\"nav\",\n\t\"noframes\",\n\t\"ol\",\n\t\"optgroup\",\n\t\"option\",\n\t\"p\",\n\t\"param\",\n\t\"search\",\n\t\"section\",\n\t\"summary\",\n\t\"table\",\n\t\"tbody\",\n\t\"td\",\n\t\"tfoot\",\n\t\"th\",\n\t\"thead\",\n\t\"title\",\n\t\"tr\",\n\t\"track\",\n\t\"ul\"\n];\n//#endregion\n//#region src/common/html_re.ts\nvar open_tag = `<[A-Za-z][A-Za-z0-9\\\\-]*(?:\\\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\\\s*=\\\\s*(?:[^\"'=<>\\`\\\\x00-\\\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\\\s*\\\\/?>`;\nvar close_tag = \"<\\\\/[A-Za-z][A-Za-z0-9\\\\-]*\\\\s*>\";\nvar HTML_TAG_RE = new RegExp(`^(?:${open_tag}|${close_tag}|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<[?][\\\\s\\\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>)`);\nvar HTML_OPEN_CLOSE_TAG_RE = new RegExp(`^(?:${open_tag}|${close_tag})`);\n//#endregion\n//#region src/rules_block/html_block.ts\nvar HTML_SEQUENCES = [\n\t[\n\t\t/^<(script|pre|style|textarea)(?=(\\s|>|$))/i,\n\t\t/<\\/(script|pre|style|textarea)>/i,\n\t\ttrue\n\t],\n\t[\n\t\t/^<!--/,\n\t\t/-->/,\n\t\ttrue\n\t],\n\t[\n\t\t/^<\\?/,\n\t\t/\\?>/,\n\t\ttrue\n\t],\n\t[\n\t\t/^<![A-Za-z]/,\n\t\t/>/,\n\t\ttrue\n\t],\n\t[\n\t\t/^<!\\[CDATA\\[/,\n\t\t/\\]\\]>/,\n\t\ttrue\n\t],\n\t[\n\t\tnew RegExp(`^</?(${html_blocks_default.join(\"|\")})(?=(\\\\s|/?>|$))`, \"i\"),\n\t\t/^$/,\n\t\ttrue\n\t],\n\t[\n\t\tnew RegExp(`${HTML_OPEN_CLOSE_TAG_RE.source}\\\\s*$`),\n\t\t/^$/,\n\t\tfalse\n\t]\n];\nfunction html_block(state, startLine, endLine, silent) {\n\tlet pos = state.bMarks[startLine] + state.tShift[startLine];\n\tlet max = state.eMarks[startLine];\n\tif (state.sCount[startLine] - state.blkIndent >= 4) return false;\n\tif (!state.md.options.html) return false;\n\tif (state.src.charCodeAt(pos) !== 60) return false;\n\tlet lineText = state.src.slice(pos, max);\n\tlet i = 0;\n\tfor (; i < HTML_SEQUENCES.length; i++) if (HTML_SEQUENCES[i][0].test(lineText)) break;\n\tif (i === HTML_SEQUENCES.length) return false;\n\tif (silent) return HTML_SEQUENCES[i][2];\n\tlet nextLine = startLine + 1;\n\tconst endsOnBlankLine = HTML_SEQUENCES[i][1].test(\"\");\n\tif (!HTML_SEQUENCES[i][1].test(lineText)) for (; nextLine < endLine; nextLine++) {\n\t\tif (state.sCount[nextLine] < state.blkIndent) {\n\t\t\tif (endsOnBlankLine || !state.isEmpty(nextLine)) break;\n\t\t}\n\t\tpos = state.bMarks[nextLine] + state.tShift[nextLine];\n\t\tmax = state.eMarks[nextLine];\n\t\tlineText = state.src.slice(pos, max);\n\t\tif (HTML_SEQUENCES[i][1].test(lineText)) {\n\t\t\tif (lineText.length !== 0) nextLine++;\n\t\t\tbreak;\n\t\t}\n\t}\n\tstate.line = nextLine;\n\tconst token = state.push(\"html_block\", \"\", 0);\n\ttoken.map = [startLine, nextLine];\n\ttoken.content = state.getLines(startLine, nextLine, state.blkIndent, true);\n\treturn true;\n}\n//#endregion\n//#region src/rules_block/heading.ts\nfunction heading(state, startLine, endLine, silent) {\n\tlet pos = state.bMarks[startLine] + state.tShift[startLine];\n\tlet max = state.eMarks[startLine];\n\tif (state.sCount[startLine] - state.blkIndent >= 4) return false;\n\tlet ch = state.src.charCodeAt(pos);\n\tif (ch !== 35 || pos >= max) return false;\n\tlet level = 1;\n\tch = state.src.charCodeAt(++pos);\n\twhile (ch === 35 && pos < max && level <= 6) {\n\t\tlevel++;\n\t\tch = state.src.charCodeAt(++pos);\n\t}\n\tif (level > 6 || pos < max && !isSpace(ch)) return false;\n\tif (silent) return true;\n\tmax = state.skipSpacesBack(max, pos);\n\tconst tmp = state.skipCharsBack(max, 35, pos);\n\tif (tmp > pos && isSpace(state.src.charCodeAt(tmp - 1))) max = tmp;\n\tstate.line = startLine + 1;\n\tconst token_o = state.push(\"heading_open\", `h${level}`, 1);\n\ttoken_o.markup = \"########\".slice(0, level);\n\ttoken_o.map = [startLine, state.line];\n\tconst token_i = state.push(\"inline\", \"\", 0);\n\ttoken_i.content = asciiTrim(state.src.slice(pos, max));\n\ttoken_i.map = [startLine, state.line];\n\ttoken_i.children = [];\n\tconst token_c = state.push(\"heading_close\", `h${level}`, -1);\n\ttoken_c.markup = \"########\".slice(0, level);\n\treturn true;\n}\n//#endregion\n//#region src/rules_block/lheading.ts\nfunction lheading(state, startLine, endLine) {\n\tconst terminatorRules = state.md.block.ruler.getRules(\"paragraph\");\n\tif (state.sCount[startLine] - state.blkIndent >= 4) return false;\n\tconst oldParentType = state.parentType;\n\tstate.parentType = \"paragraph\";\n\tlet level = 0;\n\tlet marker;\n\tlet nextLine = startLine + 1;\n\tfor (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n\t\tif (state.sCount[nextLine] - state.blkIndent > 3) continue;\n\t\tif (state.sCount[nextLine] >= state.blkIndent) {\n\t\t\tlet pos = state.bMarks[nextLine] + state.tShift[nextLine];\n\t\t\tconst max = state.eMarks[nextLine];\n\t\t\tif (pos < max) {\n\t\t\t\tmarker = state.src.charCodeAt(pos);\n\t\t\t\tif (marker === 45 || marker === 61) {\n\t\t\t\t\tpos = state.skipChars(pos, marker);\n\t\t\t\t\tpos = state.skipSpaces(pos);\n\t\t\t\t\tif (pos >= max) {\n\t\t\t\t\t\tlevel = marker === 61 ? 1 : 2;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (state.sCount[nextLine] < 0) continue;\n\t\tlet terminate = false;\n\t\tfor (let i = 0, l = terminatorRules.length; i < l; i++) if (terminatorRules[i](state, nextLine, endLine, true)) {\n\t\t\tterminate = true;\n\t\t\tbreak;\n\t\t}\n\t\tif (terminate) break;\n\t}\n\tif (!level) {\n\t\tstate.parentType = oldParentType;\n\t\treturn false;\n\t}\n\tconst content = asciiTrim(state.getLines(startLine, nextLine, state.blkIndent, false));\n\tstate.line = nextLine + 1;\n\tconst token_o = state.push(\"heading_open\", `h${level}`, 1);\n\ttoken_o.markup = String.fromCharCode(marker);\n\ttoken_o.map = [startLine, state.line];\n\tconst token_i = state.push(\"inline\", \"\", 0);\n\ttoken_i.content = content;\n\ttoken_i.map = [startLine, state.line - 1];\n\ttoken_i.children = [];\n\tconst token_c = state.push(\"heading_close\", `h${level}`, -1);\n\ttoken_c.markup = String.fromCharCode(marker);\n\tstate.parentType = oldParentType;\n\treturn true;\n}\n//#endregion\n//#region src/rules_block/paragraph.ts\nfunction paragraph(state, startLine, endLine) {\n\tconst terminatorRules = state.md.block.ruler.getRules(\"paragraph\");\n\tconst oldParentType = state.parentType;\n\tlet nextLine = startLine + 1;\n\tstate.parentType = \"paragraph\";\n\tfor (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n\t\tif (state.sCount[nextLine] - state.blkIndent > 3) continue;\n\t\tif (state.sCount[nextLine] < 0) continue;\n\t\tlet terminate = false;\n\t\tfor (let i = 0, l = terminatorRules.length; i < l; i++) if (terminatorRules[i](state, nextLine, endLine, true)) {\n\t\t\tterminate = true;\n\t\t\tbreak;\n\t\t}\n\t\tif (terminate) break;\n\t}\n\tconst content = asciiTrim(state.getLines(startLine, nextLine, state.blkIndent, false));\n\tstate.line = nextLine;\n\tconst token_o = state.push(\"paragraph_open\", \"p\", 1);\n\ttoken_o.map = [startLine, state.line];\n\tconst token_i = state.push(\"inline\", \"\", 0);\n\ttoken_i.content = content;\n\ttoken_i.map = [startLine, state.line];\n\ttoken_i.children = [];\n\tstate.push(\"paragraph_close\", \"p\", -1);\n\tstate.parentType = oldParentType;\n\treturn true;\n}\n//#endregion\n//#region src/parser_block.ts\nvar _rules$1 = [\n\t[\n\t\t\"table\",\n\t\ttable,\n\t\t[\"paragraph\", \"reference\"]\n\t],\n\t[\"code\", code],\n\t[\n\t\t\"fence\",\n\t\tfence,\n\t\t[\n\t\t\t\"paragraph\",\n\t\t\t\"reference\",\n\t\t\t\"blockquote\",\n\t\t\t\"list\"\n\t\t]\n\t],\n\t[\n\t\t\"blockquote\",\n\t\tblockquote,\n\t\t[\n\t\t\t\"paragraph\",\n\t\t\t\"reference\",\n\t\t\t\"blockquote\",\n\t\t\t\"list\"\n\t\t]\n\t],\n\t[\n\t\t\"hr\",\n\t\thr,\n\t\t[\n\t\t\t\"paragraph\",\n\t\t\t\"reference\",\n\t\t\t\"blockquote\",\n\t\t\t\"list\"\n\t\t]\n\t],\n\t[\n\t\t\"list\",\n\t\tlist,\n\t\t[\n\t\t\t\"paragraph\",\n\t\t\t\"reference\",\n\t\t\t\"blockquote\"\n\t\t]\n\t],\n\t[\"reference\", reference],\n\t[\n\t\t\"html_block\",\n\t\thtml_block,\n\t\t[\n\t\t\t\"paragraph\",\n\t\t\t\"reference\",\n\t\t\t\"blockquote\"\n\t\t]\n\t],\n\t[\n\t\t\"heading\",\n\t\theading,\n\t\t[\n\t\t\t\"paragraph\",\n\t\t\t\"reference\",\n\t\t\t\"blockquote\"\n\t\t]\n\t],\n\t[\"lheading\", lheading],\n\t[\"paragraph\", paragraph]\n];\n/**\n* Block-level tokenizer.\n*/\nvar ParserBlock = class {\n\tconstructor() {\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* {@link Ruler} instance. Keep configuration of block rules.\n\t\t\t*/\n\t\t\t\"ruler\",\n\t\t\tnew Ruler()\n\t\t);\n\t\t_defineProperty(this, \"State\", StateBlock);\n\t\tfor (let i = 0; i < _rules$1.length; i++) this.ruler.push(_rules$1[i][0], _rules$1[i][1], { alt: (_rules$1[i][2] || []).slice() });\n\t}\n\ttokenize(state, startLine, endLine) {\n\t\tconst rules = this.ruler.getRules(\"\");\n\t\tconst len = rules.length;\n\t\tconst maxNesting = state.md.options.maxNesting;\n\t\tlet line = startLine;\n\t\tlet hasEmptyLines = false;\n\t\twhile (line < endLine) {\n\t\t\tstate.line = line = state.skipEmptyLines(line);\n\t\t\tif (line >= endLine) break;\n\t\t\tif (state.sCount[line] < state.blkIndent) break;\n\t\t\tif (state.level >= maxNesting) {\n\t\t\t\tstate.line = endLine;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tconst prevLine = state.line;\n\t\t\tlet ok = false;\n\t\t\tfor (let i = 0; i < len; i++) {\n\t\t\t\tok = rules[i](state, line, endLine, false);\n\t\t\t\tif (ok) {\n\t\t\t\t\tif (prevLine >= state.line) throw new Error(\"block rule didn't increment state.line\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!ok) throw new Error(\"none of the block rules matched\");\n\t\t\tstate.tight = !hasEmptyLines;\n\t\t\tif (state.isEmpty(state.line - 1)) hasEmptyLines = true;\n\t\t\tline = state.line;\n\t\t\tif (line < endLine && state.isEmpty(line)) {\n\t\t\t\thasEmptyLines = true;\n\t\t\t\tline++;\n\t\t\t\tstate.line = line;\n\t\t\t}\n\t\t}\n\t}\n\t/**\n\t* Process input string and push block tokens into `outTokens`\n\t*/\n\tparse(src, md, env, outTokens) {\n\t\tif (!src) return;\n\t\tconst state = new this.State(src, md, env, outTokens);\n\t\tthis.tokenize(state, state.line, state.lineMax);\n\t}\n};\n//#endregion\n//#region src/rules_inline/state_inline.ts\n/** Mutable state passed to inline rules while tokenizing inline content. */\nvar StateInline = class {\n\tconstructor(src, md, env, outTokens) {\n\t\t_defineProperty(this, \"pos\", 0);\n\t\t_defineProperty(this, \"level\", 0);\n\t\t_defineProperty(this, \"pending\", \"\");\n\t\t_defineProperty(this, \"pendingLevel\", 0);\n\t\t_defineProperty(this, \"cache\", {});\n\t\t_defineProperty(this, \"backticks\", {});\n\t\t_defineProperty(this, \"backticksScanned\", false);\n\t\t_defineProperty(this, \"linkLevel\", 0);\n\t\t_defineProperty(this, \"delimiters\", []);\n\t\t_defineProperty(this, \"_prev_delimiters\", []);\n\t\t_defineProperty(this, \"Token\", Token);\n\t\tthis.src = src;\n\t\tthis.env = env;\n\t\tthis.md = md;\n\t\tthis.tokens = outTokens;\n\t\tthis.tokens_meta = Array(outTokens.length);\n\t\tthis.posMax = this.src.length;\n\t}\n\tpushPending() {\n\t\tconst token = new Token(\"text\", \"\", 0);\n\t\ttoken.content = this.pending;\n\t\ttoken.level = this.pendingLevel;\n\t\tthis.tokens.push(token);\n\t\tthis.pending = \"\";\n\t\treturn token;\n\t}\n\tpush(type, tag, nesting) {\n\t\tif (this.pending) this.pushPending();\n\t\tconst token = new Token(type, tag, nesting);\n\t\tlet token_meta = void 0;\n\t\tif (nesting < 0) {\n\t\t\tthis.level--;\n\t\t\tthis.delimiters = this._prev_delimiters.pop();\n\t\t}\n\t\ttoken.level = this.level;\n\t\tif (nesting > 0) {\n\t\t\tthis.level++;\n\t\t\tthis._prev_delimiters.push(this.delimiters);\n\t\t\tthis.delimiters = [];\n\t\t\ttoken_meta = { delimiters: this.delimiters };\n\t\t}\n\t\tthis.pendingLevel = this.level;\n\t\tthis.tokens.push(token);\n\t\tthis.tokens_meta.push(token_meta);\n\t\treturn token;\n\t}\n\tscanDelims(start, canSplitWord) {\n\t\tconst max = this.posMax;\n\t\tconst marker = this.src.charCodeAt(start);\n\t\tlet lastChar;\n\t\tif (start === 0) lastChar = 32;\n\t\telse if (start === 1) {\n\t\t\tlastChar = this.src.charCodeAt(0);\n\t\t\tif ((lastChar & 63488) === 55296) lastChar = 65533;\n\t\t} else {\n\t\t\tlastChar = this.src.charCodeAt(start - 1);\n\t\t\tif ((lastChar & 64512) === 56320) {\n\t\t\t\tconst highSurr = this.src.charCodeAt(start - 2);\n\t\t\t\tlastChar = (highSurr & 64512) === 55296 ? 65536 + (highSurr - 55296 << 10) + (lastChar - 56320) : 65533;\n\t\t\t} else if ((lastChar & 64512) === 55296) lastChar = 65533;\n\t\t}\n\t\tlet pos = start;\n\t\twhile (pos < max && this.src.charCodeAt(pos) === marker) pos++;\n\t\tconst count = pos - start;\n\t\tlet nextChar = pos < max ? this.src.charCodeAt(pos) : 32;\n\t\tif ((nextChar & 64512) === 55296) {\n\t\t\tconst lowSurr = this.src.charCodeAt(pos + 1);\n\t\t\tnextChar = (lowSurr & 64512) === 56320 ? 65536 + (nextChar - 55296 << 10) + (lowSurr - 56320) : 65533;\n\t\t} else if ((nextChar & 64512) === 56320) nextChar = 65533;\n\t\tconst isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctCharCode(lastChar);\n\t\tconst isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctCharCode(nextChar);\n\t\tconst isLastWhiteSpace = isWhiteSpace(lastChar);\n\t\tconst isNextWhiteSpace = isWhiteSpace(nextChar);\n\t\tconst left_flanking = !isNextWhiteSpace && (!isNextPunctChar || isLastWhiteSpace || isLastPunctChar);\n\t\tconst right_flanking = !isLastWhiteSpace && (!isLastPunctChar || isNextWhiteSpace || isNextPunctChar);\n\t\treturn {\n\t\t\tcan_open: left_flanking && (canSplitWord || !right_flanking || isLastPunctChar),\n\t\t\tcan_close: right_flanking && (canSplitWord || !left_flanking || isNextPunctChar),\n\t\t\tlength: count\n\t\t};\n\t}\n};\n//#endregion\n//#region src/rules_inline/text.ts\nfunction isTerminatorChar(ch) {\n\tswitch (ch) {\n\t\tcase 10:\n\t\tcase 33:\n\t\tcase 35:\n\t\tcase 36:\n\t\tcase 37:\n\t\tcase 38:\n\t\tcase 42:\n\t\tcase 43:\n\t\tcase 45:\n\t\tcase 58:\n\t\tcase 60:\n\t\tcase 61:\n\t\tcase 62:\n\t\tcase 64:\n\t\tcase 91:\n\t\tcase 92:\n\t\tcase 93:\n\t\tcase 94:\n\t\tcase 95:\n\t\tcase 96:\n\t\tcase 123:\n\t\tcase 125:\n\t\tcase 126: return true;\n\t\tdefault: return false;\n\t}\n}\nfunction text(state, silent) {\n\tlet pos = state.pos;\n\twhile (pos < state.posMax && !isTerminatorChar(state.src.charCodeAt(pos))) pos++;\n\tif (pos === state.pos) return false;\n\tif (!silent) state.pending += state.src.slice(state.pos, pos);\n\tstate.pos = pos;\n\treturn true;\n}\n//#endregion\n//#region src/rules_inline/linkify.ts\nfunction isAsciiAlpha(code) {\n\treturn code >= 65 && code <= 90 || code >= 97 && code <= 122;\n}\nfunction isSchemeChar(code) {\n\treturn code >= 65 && code <= 90 || code >= 97 && code <= 122 || code >= 48 && code <= 57 || code === 43 || code === 45 || code === 46;\n}\nfunction linkify(state, silent) {\n\tif (!state.md.options.linkify) return false;\n\tif (state.linkLevel > 0) return false;\n\tconst pos = state.pos;\n\tconst max = state.posMax;\n\tif (pos + 3 > max) return false;\n\tif (state.src.charCodeAt(pos) !== 58) return false;\n\tif (state.src.charCodeAt(pos + 1) !== 47) return false;\n\tif (state.src.charCodeAt(pos + 2) !== 47) return false;\n\tconst protoMin = pos - Math.min(10, state.pending.length, pos);\n\tlet protoStart = pos;\n\twhile (protoStart > protoMin && isSchemeChar(state.src.charCodeAt(protoStart - 1))) protoStart--;\n\tif (protoStart === pos || !isAsciiAlpha(state.src.charCodeAt(protoStart))) return false;\n\tconst protoLength = pos - protoStart;\n\tconst link = state.md.linkify.matchAtStart(state.src.slice(protoStart));\n\tif (!link) return false;\n\tlet url = link.url;\n\tif (url.length <= protoLength) return false;\n\tlet urlEnd = url.length;\n\twhile (urlEnd > 0 && url.charCodeAt(urlEnd - 1) === 42) urlEnd--;\n\tif (urlEnd !== url.length) url = url.slice(0, urlEnd);\n\tconst fullUrl = state.md.normalizeLink(url);\n\tif (!state.md.validateLink(fullUrl)) return false;\n\tif (!silent) {\n\t\tstate.pending = state.pending.slice(0, -protoLength);\n\t\tconst token_o = state.push(\"link_open\", \"a\", 1);\n\t\ttoken_o.attrs = [[\"href\", fullUrl]];\n\t\ttoken_o.markup = \"linkify\";\n\t\ttoken_o.info = \"auto\";\n\t\tconst token_t = state.push(\"text\", \"\", 0);\n\t\ttoken_t.content = state.md.normalizeLinkText(url);\n\t\tconst token_c = state.push(\"link_close\", \"a\", -1);\n\t\ttoken_c.markup = \"linkify\";\n\t\ttoken_c.info = \"auto\";\n\t}\n\tstate.pos += url.length - protoLength;\n\treturn true;\n}\n//#endregion\n//#region src/rules_inline/newline.ts\nfunction newline(state, silent) {\n\tlet pos = state.pos;\n\tif (state.src.charCodeAt(pos) !== 10) return false;\n\tconst pmax = state.pending.length - 1;\n\tconst max = state.posMax;\n\tif (!silent) if (pmax >= 0 && state.pending.charCodeAt(pmax) === 32) if (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 32) {\n\t\tlet ws = pmax - 1;\n\t\twhile (ws >= 1 && state.pending.charCodeAt(ws - 1) === 32) ws--;\n\t\tstate.pending = state.pending.slice(0, ws);\n\t\tstate.push(\"hardbreak\", \"br\", 0);\n\t} else {\n\t\tstate.pending = state.pending.slice(0, -1);\n\t\tstate.push(\"softbreak\", \"br\", 0);\n\t}\n\telse state.push(\"softbreak\", \"br\", 0);\n\tpos++;\n\twhile (pos < max && isSpace(state.src.charCodeAt(pos))) pos++;\n\tstate.pos = pos;\n\treturn true;\n}\n//#endregion\n//#region src/rules_inline/escape.ts\nvar ESCAPED = [];\nfor (let i = 0; i < 256; i++) ESCAPED.push(0);\n\"\\\\!\\\"#$%&'()*+,./:;<=>?@[]^_`{|}~-\".split(\"\").forEach(function(ch) {\n\tESCAPED[ch.charCodeAt(0)] = 1;\n});\nfunction escape(state, silent) {\n\tlet pos = state.pos;\n\tconst max = state.posMax;\n\tif (state.src.charCodeAt(pos) !== 92) return false;\n\tpos++;\n\tif (pos >= max) return false;\n\tlet ch1 = state.src.charCodeAt(pos);\n\tif (ch1 === 10) {\n\t\tif (!silent) state.push(\"hardbreak\", \"br\", 0);\n\t\tpos++;\n\t\twhile (pos < max) {\n\t\t\tch1 = state.src.charCodeAt(pos);\n\t\t\tif (!isSpace(ch1)) break;\n\t\t\tpos++;\n\t\t}\n\t\tstate.pos = pos;\n\t\treturn true;\n\t}\n\tif (ch1 === 32) {\n\t\tif (!silent) {\n\t\t\tconst token = state.push(\"text_special\", \"\", 0);\n\t\t\ttoken.content = \"\\\\\";\n\t\t\ttoken.markup = \"\\\\\";\n\t\t\ttoken.info = \"escape\";\n\t\t}\n\t\tstate.pos = pos;\n\t\treturn true;\n\t}\n\tlet escapedStr = state.src[pos];\n\tif (ch1 >= 55296 && ch1 <= 56319 && pos + 1 < max) {\n\t\tconst ch2 = state.src.charCodeAt(pos + 1);\n\t\tif (ch2 >= 56320 && ch2 <= 57343) {\n\t\t\tescapedStr += state.src[pos + 1];\n\t\t\tpos++;\n\t\t}\n\t}\n\tconst origStr = \"\\\\\" + escapedStr;\n\tif (!silent) {\n\t\tconst token = state.push(\"text_special\", \"\", 0);\n\t\tif (ch1 < 256 && ESCAPED[ch1] !== 0) token.content = escapedStr;\n\t\telse token.content = origStr;\n\t\ttoken.markup = origStr;\n\t\ttoken.info = \"escape\";\n\t}\n\tstate.pos = pos + 1;\n\treturn true;\n}\n//#endregion\n//#region src/rules_inline/backticks.ts\nfunction buildLastRuns(src) {\n\tconst lastRuns = {};\n\tlet pos = 0;\n\twhile ((pos = src.indexOf(\"`\", pos)) !== -1) {\n\t\tconst start = pos;\n\t\twhile (src.charCodeAt(++pos) === 96);\n\t\tlastRuns[pos - start] = start;\n\t}\n\treturn lastRuns;\n}\nfunction backtick(state, silent) {\n\tvar _state$backticks$open;\n\tconst start = state.pos;\n\tif (state.src.charCodeAt(start) !== 96) return false;\n\tconst max = state.posMax;\n\tlet pos = start + 1;\n\twhile (pos < max && state.src.charCodeAt(pos) === 96) pos++;\n\tconst marker = state.src.slice(start, pos);\n\tconst openerLength = marker.length;\n\tif (!state.backticksScanned) {\n\t\tstate.backticks = buildLastRuns(state.src);\n\t\tstate.backticksScanned = true;\n\t}\n\tif (((_state$backticks$open = state.backticks[openerLength]) !== null && _state$backticks$open !== void 0 ? _state$backticks$open : -1) >= pos) {\n\t\tlet matchEnd = pos;\n\t\tlet matchStart;\n\t\twhile ((matchStart = state.src.indexOf(\"`\", matchEnd)) !== -1 && matchStart < max) {\n\t\t\tmatchEnd = matchStart + 1;\n\t\t\twhile (state.src.charCodeAt(matchEnd) === 96) matchEnd++;\n\t\t\tif (matchEnd > max) break;\n\t\t\tif (matchEnd - matchStart === openerLength) {\n\t\t\t\tif (!silent) {\n\t\t\t\t\tconst token = state.push(\"code_inline\", \"code\", 0);\n\t\t\t\t\ttoken.markup = marker;\n\t\t\t\t\tlet content = state.src.slice(pos, matchStart).replace(/\\n/g, \" \");\n\t\t\t\t\tif (content.startsWith(\" \") && content.endsWith(\" \") && /[^ ]/.test(content)) content = content.slice(1, -1);\n\t\t\t\t\ttoken.content = content;\n\t\t\t\t}\n\t\t\t\tstate.pos = matchEnd;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\tif (!silent) state.pending += marker;\n\tstate.pos = pos;\n\treturn true;\n}\n//#endregion\n//#region src/rules_inline/strikethrough.ts\nfunction strikethrough_tokenize(state, silent) {\n\tconst start = state.pos;\n\tconst marker = state.src.charCodeAt(start);\n\tif (silent) return false;\n\tif (marker !== 126) return false;\n\tconst scanned = state.scanDelims(state.pos, true);\n\tlet len = scanned.length;\n\tconst ch = String.fromCharCode(marker);\n\tif (len < 2) return false;\n\tlet token;\n\tif (len % 2) {\n\t\ttoken = state.push(\"text\", \"\", 0);\n\t\ttoken.content = ch;\n\t\tlen--;\n\t}\n\tfor (let i = 0; i < len; i += 2) {\n\t\ttoken = state.push(\"text\", \"\", 0);\n\t\ttoken.content = ch + ch;\n\t\tstate.delimiters.push({\n\t\t\tmarker,\n\t\t\tlength: 0,\n\t\t\ttoken: state.tokens.length - 1,\n\t\t\tend: -1,\n\t\t\topen: scanned.can_open,\n\t\t\tclose: scanned.can_close\n\t\t});\n\t}\n\tstate.pos += scanned.length;\n\treturn true;\n}\nfunction postProcess$1(state, delimiters) {\n\tlet token;\n\tconst loneMarkers = [];\n\tconst max = delimiters.length;\n\tfor (let i = 0; i < max; i++) {\n\t\tconst startDelim = delimiters[i];\n\t\tif (startDelim.marker !== 126) continue;\n\t\tif (startDelim.end === -1) continue;\n\t\tconst endDelim = delimiters[startDelim.end];\n\t\ttoken = state.tokens[startDelim.token];\n\t\ttoken.type = \"s_open\";\n\t\ttoken.tag = \"s\";\n\t\ttoken.nesting = 1;\n\t\ttoken.markup = \"~~\";\n\t\ttoken.content = \"\";\n\t\ttoken = state.tokens[endDelim.token];\n\t\ttoken.type = \"s_close\";\n\t\ttoken.tag = \"s\";\n\t\ttoken.nesting = -1;\n\t\ttoken.markup = \"~~\";\n\t\ttoken.content = \"\";\n\t\tif (state.tokens[endDelim.token - 1].type === \"text\" && state.tokens[endDelim.token - 1].content === \"~\") loneMarkers.push(endDelim.token - 1);\n\t}\n\twhile (loneMarkers.length) {\n\t\tconst i = loneMarkers.pop();\n\t\tlet j = i + 1;\n\t\twhile (j < state.tokens.length && state.tokens[j].type === \"s_close\") j++;\n\t\tj--;\n\t\tif (i !== j) {\n\t\t\ttoken = state.tokens[j];\n\t\t\tstate.tokens[j] = state.tokens[i];\n\t\t\tstate.tokens[i] = token;\n\t\t}\n\t}\n}\nfunction strikethrough_postProcess(state) {\n\tconst tokens_meta = state.tokens_meta;\n\tconst max = state.tokens_meta.length;\n\tpostProcess$1(state, state.delimiters);\n\tfor (let curr = 0; curr < max; curr++) {\n\t\tvar _tokens_meta$curr;\n\t\tconst delimiters = (_tokens_meta$curr = tokens_meta[curr]) === null || _tokens_meta$curr === void 0 ? void 0 : _tokens_meta$curr.delimiters;\n\t\tif (delimiters) postProcess$1(state, delimiters);\n\t}\n}\nvar strikethrough_default = {\n\ttokenize: strikethrough_tokenize,\n\tpostProcess: strikethrough_postProcess\n};\n//#endregion\n//#region src/rules_inline/emphasis.ts\nfunction emphasis_tokenize(state, silent) {\n\tconst start = state.pos;\n\tconst marker = state.src.charCodeAt(start);\n\tif (silent) return false;\n\tif (marker !== 95 && marker !== 42) return false;\n\tconst scanned = state.scanDelims(state.pos, marker === 42);\n\tfor (let i = 0; i < scanned.length; i++) {\n\t\tconst token = state.push(\"text\", \"\", 0);\n\t\ttoken.content = String.fromCharCode(marker);\n\t\tstate.delimiters.push({\n\t\t\tmarker,\n\t\t\tlength: scanned.length,\n\t\t\ttoken: state.tokens.length - 1,\n\t\t\tend: -1,\n\t\t\topen: scanned.can_open,\n\t\t\tclose: scanned.can_close\n\t\t});\n\t}\n\tstate.pos += scanned.length;\n\treturn true;\n}\nfunction postProcess(state, delimiters) {\n\tconst max = delimiters.length;\n\tfor (let i = max - 1; i >= 0; i--) {\n\t\tconst startDelim = delimiters[i];\n\t\tif (startDelim.marker !== 95 && startDelim.marker !== 42) continue;\n\t\tif (startDelim.end === -1) continue;\n\t\tconst endDelim = delimiters[startDelim.end];\n\t\tconst isStrong = i > 0 && delimiters[i - 1].end === startDelim.end + 1 && delimiters[i - 1].marker === startDelim.marker && delimiters[i - 1].token === startDelim.token - 1 && delimiters[startDelim.end + 1].token === endDelim.token + 1;\n\t\tconst ch = String.fromCharCode(startDelim.marker);\n\t\tconst token_o = state.tokens[startDelim.token];\n\t\ttoken_o.type = isStrong ? \"strong_open\" : \"em_open\";\n\t\ttoken_o.tag = isStrong ? \"strong\" : \"em\";\n\t\ttoken_o.nesting = 1;\n\t\ttoken_o.markup = isStrong ? ch + ch : ch;\n\t\ttoken_o.content = \"\";\n\t\tconst token_c = state.tokens[endDelim.token];\n\t\ttoken_c.type = isStrong ? \"strong_close\" : \"em_close\";\n\t\ttoken_c.tag = isStrong ? \"strong\" : \"em\";\n\t\ttoken_c.nesting = -1;\n\t\ttoken_c.markup = isStrong ? ch + ch : ch;\n\t\ttoken_c.content = \"\";\n\t\tif (isStrong) {\n\t\t\tstate.tokens[delimiters[i - 1].token].content = \"\";\n\t\t\tstate.tokens[delimiters[startDelim.end + 1].token].content = \"\";\n\t\t\ti--;\n\t\t}\n\t}\n}\nfunction emphasis_post_process(state) {\n\tconst tokens_meta = state.tokens_meta;\n\tconst max = state.tokens_meta.length;\n\tpostProcess(state, state.delimiters);\n\tfor (let curr = 0; curr < max; curr++) {\n\t\tvar _tokens_meta$curr;\n\t\tconst delimiters = (_tokens_meta$curr = tokens_meta[curr]) === null || _tokens_meta$curr === void 0 ? void 0 : _tokens_meta$curr.delimiters;\n\t\tif (delimiters) postProcess(state, delimiters);\n\t}\n}\nvar emphasis_default = {\n\ttokenize: emphasis_tokenize,\n\tpostProcess: emphasis_post_process\n};\n//#endregion\n//#region src/rules_inline/link.ts\nfunction link(state, silent) {\n\tlet code, label, res, ref;\n\tlet href = \"\";\n\tlet title = \"\";\n\tlet start = state.pos;\n\tlet parseReference = true;\n\tif (state.src.charCodeAt(state.pos) !== 91) return false;\n\tconst oldPos = state.pos;\n\tconst max = state.posMax;\n\tconst labelStart = state.pos + 1;\n\tconst labelEnd = state.md.helpers.parseLinkLabel(state, state.pos, true);\n\tif (labelEnd < 0) return false;\n\tlet pos = labelEnd + 1;\n\tif (pos < max && state.src.charCodeAt(pos) === 40) {\n\t\tparseReference = false;\n\t\tpos++;\n\t\tfor (; pos < max; pos++) {\n\t\t\tcode = state.src.charCodeAt(pos);\n\t\t\tif (!isSpace(code) && code !== 10) break;\n\t\t}\n\t\tif (pos >= max) return false;\n\t\tstart = pos;\n\t\tres = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);\n\t\tif (res.ok) {\n\t\t\thref = state.md.normalizeLink(res.str);\n\t\t\tif (state.md.validateLink(href)) pos = res.pos;\n\t\t\telse href = \"\";\n\t\t\tstart = pos;\n\t\t\tfor (; pos < max; pos++) {\n\t\t\t\tcode = state.src.charCodeAt(pos);\n\t\t\t\tif (!isSpace(code) && code !== 10) break;\n\t\t\t}\n\t\t\tres = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax);\n\t\t\tif (pos < max && start !== pos && res.ok) {\n\t\t\t\ttitle = res.str;\n\t\t\t\tpos = res.pos;\n\t\t\t\tfor (; pos < max; pos++) {\n\t\t\t\t\tcode = state.src.charCodeAt(pos);\n\t\t\t\t\tif (!isSpace(code) && code !== 10) break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (pos >= max || state.src.charCodeAt(pos) !== 41) parseReference = true;\n\t\tpos++;\n\t}\n\tif (parseReference) {\n\t\tif (typeof state.env.references === \"undefined\") return false;\n\t\tif (pos < max && state.src.charCodeAt(pos) === 91) {\n\t\t\tstart = pos + 1;\n\t\t\tpos = state.md.helpers.parseLinkLabel(state, pos);\n\t\t\tif (pos >= 0) label = state.src.slice(start, pos++);\n\t\t\telse pos = labelEnd + 1;\n\t\t} else pos = labelEnd + 1;\n\t\tif (!label) label = state.src.slice(labelStart, labelEnd);\n\t\tlabel = normalizeReference(label);\n\t\tref = state.env.references[label];\n\t\tif (!ref) {\n\t\t\tstate.pos = oldPos;\n\t\t\treturn false;\n\t\t}\n\t\thref = ref.href;\n\t\ttitle = ref.title;\n\t}\n\tif (!silent) {\n\t\tstate.pos = labelStart;\n\t\tstate.posMax = labelEnd;\n\t\tconst token_o = state.push(\"link_open\", \"a\", 1);\n\t\tconst attrs = [[\"href\", href]];\n\t\ttoken_o.attrs = attrs;\n\t\tif (title) attrs.push([\"title\", title]);\n\t\tif (label) {\n\t\t\tconst meta = Object.create(null);\n\t\t\tmeta.label = label;\n\t\t\ttoken_o.meta = meta;\n\t\t}\n\t\tstate.linkLevel++;\n\t\tstate.md.inline.tokenize(state);\n\t\tstate.linkLevel--;\n\t\tstate.push(\"link_close\", \"a\", -1);\n\t}\n\tstate.pos = pos;\n\tstate.posMax = max;\n\treturn true;\n}\n//#endregion\n//#region src/rules_inline/image.ts\nfunction image(state, silent) {\n\tlet code, content, label, pos, ref, res, title, start;\n\tlet href = \"\";\n\tconst oldPos = state.pos;\n\tconst max = state.posMax;\n\tif (state.src.charCodeAt(state.pos) !== 33) return false;\n\tif (state.src.charCodeAt(state.pos + 1) !== 91) return false;\n\tconst labelStart = state.pos + 2;\n\tconst labelEnd = state.md.helpers.parseLinkLabel(state, state.pos + 1, false);\n\tif (labelEnd < 0) return false;\n\tpos = labelEnd + 1;\n\tif (pos < max && state.src.charCodeAt(pos) === 40) {\n\t\tpos++;\n\t\tfor (; pos < max; pos++) {\n\t\t\tcode = state.src.charCodeAt(pos);\n\t\t\tif (!isSpace(code) && code !== 10) break;\n\t\t}\n\t\tif (pos >= max) return false;\n\t\tstart = pos;\n\t\tres = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax);\n\t\tif (res.ok) {\n\t\t\thref = state.md.normalizeLink(res.str);\n\t\t\tif (state.md.validateLink(href)) pos = res.pos;\n\t\t\telse href = \"\";\n\t\t}\n\t\tstart = pos;\n\t\tfor (; pos < max; pos++) {\n\t\t\tcode = state.src.charCodeAt(pos);\n\t\t\tif (!isSpace(code) && code !== 10) break;\n\t\t}\n\t\tres = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax);\n\t\tif (pos < max && start !== pos && res.ok) {\n\t\t\ttitle = res.str;\n\t\t\tpos = res.pos;\n\t\t\tfor (; pos < max; pos++) {\n\t\t\t\tcode = state.src.charCodeAt(pos);\n\t\t\t\tif (!isSpace(code) && code !== 10) break;\n\t\t\t}\n\t\t} else title = \"\";\n\t\tif (pos >= max || state.src.charCodeAt(pos) !== 41) {\n\t\t\tstate.pos = oldPos;\n\t\t\treturn false;\n\t\t}\n\t\tpos++;\n\t} else {\n\t\tif (typeof state.env.references === \"undefined\") return false;\n\t\tif (pos < max && state.src.charCodeAt(pos) === 91) {\n\t\t\tstart = pos + 1;\n\t\t\tpos = state.md.helpers.parseLinkLabel(state, pos);\n\t\t\tif (pos >= 0) label = state.src.slice(start, pos++);\n\t\t\telse pos = labelEnd + 1;\n\t\t} else pos = labelEnd + 1;\n\t\tif (!label) label = state.src.slice(labelStart, labelEnd);\n\t\tlabel = normalizeReference(label);\n\t\tref = state.env.references[label];\n\t\tif (!ref) {\n\t\t\tstate.pos = oldPos;\n\t\t\treturn false;\n\t\t}\n\t\thref = ref.href;\n\t\ttitle = ref.title;\n\t}\n\tif (!silent) {\n\t\tcontent = state.src.slice(labelStart, labelEnd);\n\t\tconst tokens = [];\n\t\tstate.md.inline.parse(content, state.md, state.env, tokens);\n\t\tconst token = state.push(\"image\", \"img\", 0);\n\t\tconst attrs = [[\"src\", href], [\"alt\", \"\"]];\n\t\ttoken.attrs = attrs;\n\t\ttoken.children = tokens;\n\t\ttoken.content = content;\n\t\tif (title) attrs.push([\"title\", title]);\n\t\tif (label) {\n\t\t\tconst meta = Object.create(null);\n\t\t\tmeta.label = label;\n\t\t\ttoken.meta = meta;\n\t\t}\n\t}\n\tstate.pos = pos;\n\tstate.posMax = max;\n\treturn true;\n}\n//#endregion\n//#region src/rules_inline/autolink.ts\nvar EMAIL_RE = /^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/;\nvar AUTOLINK_RE = /^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\\x00-\\x20]*)$/;\nfunction autolink(state, silent) {\n\tlet pos = state.pos;\n\tif (state.src.charCodeAt(pos) !== 60) return false;\n\tconst start = state.pos;\n\tconst max = state.posMax;\n\tfor (;;) {\n\t\tif (++pos >= max) return false;\n\t\tconst ch = state.src.charCodeAt(pos);\n\t\tif (ch === 60) return false;\n\t\tif (ch === 62) break;\n\t}\n\tconst url = state.src.slice(start + 1, pos);\n\tif (AUTOLINK_RE.test(url)) {\n\t\tconst fullUrl = state.md.normalizeLink(url);\n\t\tif (!state.md.validateLink(fullUrl)) return false;\n\t\tif (!silent) {\n\t\t\tconst token_o = state.push(\"link_open\", \"a\", 1);\n\t\t\ttoken_o.attrs = [[\"href\", fullUrl]];\n\t\t\ttoken_o.markup = \"autolink\";\n\t\t\ttoken_o.info = \"auto\";\n\t\t\tconst token_t = state.push(\"text\", \"\", 0);\n\t\t\ttoken_t.content = state.md.normalizeLinkText(url);\n\t\t\tconst token_c = state.push(\"link_close\", \"a\", -1);\n\t\t\ttoken_c.markup = \"autolink\";\n\t\t\ttoken_c.info = \"auto\";\n\t\t}\n\t\tstate.pos += url.length + 2;\n\t\treturn true;\n\t}\n\tif (EMAIL_RE.test(url)) {\n\t\tconst fullUrl = state.md.normalizeLink(`mailto:${url}`);\n\t\tif (!state.md.validateLink(fullUrl)) return false;\n\t\tif (!silent) {\n\t\t\tconst token_o = state.push(\"link_open\", \"a\", 1);\n\t\t\ttoken_o.attrs = [[\"href\", fullUrl]];\n\t\t\ttoken_o.markup = \"autolink\";\n\t\t\ttoken_o.info = \"auto\";\n\t\t\tconst token_t = state.push(\"text\", \"\", 0);\n\t\t\ttoken_t.content = state.md.normalizeLinkText(url);\n\t\t\tconst token_c = state.push(\"link_close\", \"a\", -1);\n\t\t\ttoken_c.markup = \"autolink\";\n\t\t\ttoken_c.info = \"auto\";\n\t\t}\n\t\tstate.pos += url.length + 2;\n\t\treturn true;\n\t}\n\treturn false;\n}\n//#endregion\n//#region src/rules_inline/html_inline.ts\nfunction isLinkOpen(str) {\n\treturn /^<a[>\\s]/i.test(str);\n}\nfunction isLinkClose(str) {\n\treturn /^<\\/a\\s*>/i.test(str);\n}\nfunction isLetter(ch) {\n\tconst lc = ch | 32;\n\treturn lc >= 97 && lc <= 122;\n}\nfunction html_inline(state, silent) {\n\tif (!state.md.options.html) return false;\n\tconst max = state.posMax;\n\tconst pos = state.pos;\n\tif (state.src.charCodeAt(pos) !== 60 || pos + 2 >= max) return false;\n\tconst ch = state.src.charCodeAt(pos + 1);\n\tif (ch !== 33 && ch !== 63 && ch !== 47 && !isLetter(ch)) return false;\n\tconst match = state.src.slice(pos).match(HTML_TAG_RE);\n\tif (!match) return false;\n\tif (!silent) {\n\t\tconst token = state.push(\"html_inline\", \"\", 0);\n\t\ttoken.content = match[0];\n\t\tif (isLinkOpen(token.content)) state.linkLevel++;\n\t\tif (isLinkClose(token.content)) state.linkLevel--;\n\t}\n\tstate.pos += match[0].length;\n\treturn true;\n}\n//#endregion\n//#region src/rules_inline/entity.ts\nvar DIGITAL_RE = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i;\nvar NAMED_RE = /^&([a-z][a-z0-9]{1,31});/i;\nfunction entity(state, silent) {\n\tconst pos = state.pos;\n\tconst max = state.posMax;\n\tif (state.src.charCodeAt(pos) !== 38) return false;\n\tif (pos + 1 >= max) return false;\n\tif (state.src.charCodeAt(pos + 1) === 35) {\n\t\tconst match = state.src.slice(pos).match(DIGITAL_RE);\n\t\tif (match) {\n\t\t\tif (!silent) {\n\t\t\t\tconst code = match[1][0].toLowerCase() === \"x\" ? parseInt(match[1].slice(1), 16) : parseInt(match[1], 10);\n\t\t\t\tconst token = state.push(\"text_special\", \"\", 0);\n\t\t\t\ttoken.content = isValidEntityCode(code) ? fromCodePoint(code) : fromCodePoint(65533);\n\t\t\t\ttoken.markup = match[0];\n\t\t\t\ttoken.info = \"entity\";\n\t\t\t}\n\t\t\tstate.pos += match[0].length;\n\t\t\treturn true;\n\t\t}\n\t} else {\n\t\tconst match = state.src.slice(pos).match(NAMED_RE);\n\t\tif (match) {\n\t\t\tconst decoded = decodeHTMLStrict(match[0]);\n\t\t\tif (decoded !== match[0]) {\n\t\t\t\tif (!silent) {\n\t\t\t\t\tconst token = state.push(\"text_special\", \"\", 0);\n\t\t\t\t\ttoken.content = decoded;\n\t\t\t\t\ttoken.markup = match[0];\n\t\t\t\t\ttoken.info = \"entity\";\n\t\t\t\t}\n\t\t\t\tstate.pos += match[0].length;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n}\n//#endregion\n//#region src/rules_inline/balance_pairs.ts\nfunction processDelimiters(delimiters) {\n\tconst openersBottom = {};\n\tconst max = delimiters.length;\n\tif (!max) return;\n\tlet headerIdx = 0;\n\tlet lastTokenIdx = -2;\n\tconst jumps = [];\n\tfor (let closerIdx = 0; closerIdx < max; closerIdx++) {\n\t\tconst closer = delimiters[closerIdx];\n\t\tjumps.push(0);\n\t\tif (delimiters[headerIdx].marker !== closer.marker || lastTokenIdx !== closer.token - 1) headerIdx = closerIdx;\n\t\tlastTokenIdx = closer.token;\n\t\tcloser.length = closer.length || 0;\n\t\tif (!closer.close) continue;\n\t\tif (!openersBottom.hasOwnProperty(closer.marker)) openersBottom[closer.marker] = [\n\t\t\t-1,\n\t\t\t-1,\n\t\t\t-1,\n\t\t\t-1,\n\t\t\t-1,\n\t\t\t-1\n\t\t];\n\t\tconst minOpenerIdx = openersBottom[closer.marker][(closer.open ? 3 : 0) + closer.length % 3];\n\t\tlet openerIdx = headerIdx - jumps[headerIdx] - 1;\n\t\tlet newMinOpenerIdx = openerIdx;\n\t\tfor (; openerIdx > minOpenerIdx; openerIdx -= jumps[openerIdx] + 1) {\n\t\t\tconst opener = delimiters[openerIdx];\n\t\t\tif (opener.marker !== closer.marker) continue;\n\t\t\tif (opener.open && opener.end < 0) {\n\t\t\t\tlet isOddMatch = false;\n\t\t\t\tif (opener.close || closer.open) {\n\t\t\t\t\tif ((opener.length + closer.length) % 3 === 0) {\n\t\t\t\t\t\tif (opener.length % 3 !== 0 || closer.length % 3 !== 0) isOddMatch = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!isOddMatch) {\n\t\t\t\t\tconst lastJump = openerIdx > 0 && !delimiters[openerIdx - 1].open ? jumps[openerIdx - 1] + 1 : 0;\n\t\t\t\t\tjumps[closerIdx] = closerIdx - openerIdx + lastJump;\n\t\t\t\t\tjumps[openerIdx] = lastJump;\n\t\t\t\t\tcloser.open = false;\n\t\t\t\t\topener.end = closerIdx;\n\t\t\t\t\topener.close = false;\n\t\t\t\t\tnewMinOpenerIdx = -1;\n\t\t\t\t\tlastTokenIdx = -2;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (newMinOpenerIdx !== -1) openersBottom[closer.marker][(closer.open ? 3 : 0) + (closer.length || 0) % 3] = newMinOpenerIdx;\n\t}\n}\nfunction link_pairs(state) {\n\tconst tokens_meta = state.tokens_meta;\n\tconst max = state.tokens_meta.length;\n\tprocessDelimiters(state.delimiters);\n\tfor (let curr = 0; curr < max; curr++) {\n\t\tvar _tokens_meta$curr;\n\t\tconst delimiters = (_tokens_meta$curr = tokens_meta[curr]) === null || _tokens_meta$curr === void 0 ? void 0 : _tokens_meta$curr.delimiters;\n\t\tif (delimiters) processDelimiters(delimiters);\n\t}\n}\n//#endregion\n//#region src/rules_inline/fragments_join.ts\nfunction fragments_join(state) {\n\tlet curr, last;\n\tlet level = 0;\n\tconst tokens = state.tokens;\n\tconst max = state.tokens.length;\n\tfor (curr = last = 0; curr < max; curr++) {\n\t\tif (tokens[curr].nesting < 0) level--;\n\t\ttokens[curr].level = level;\n\t\tif (tokens[curr].nesting > 0) level++;\n\t\tif (tokens[curr].type === \"text\" && curr + 1 < max && tokens[curr + 1].type === \"text\") tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content;\n\t\telse {\n\t\t\tif (curr !== last) tokens[last] = tokens[curr];\n\t\t\tlast++;\n\t\t}\n\t}\n\tif (curr !== last) tokens.length = last;\n}\n//#endregion\n//#region src/parser_inline.ts\nvar _rules = [\n\t[\"text\", text],\n\t[\"linkify\", linkify],\n\t[\"newline\", newline],\n\t[\"escape\", escape],\n\t[\"backticks\", backtick],\n\t[\"strikethrough\", strikethrough_default.tokenize],\n\t[\"emphasis\", emphasis_default.tokenize],\n\t[\"link\", link],\n\t[\"image\", image],\n\t[\"autolink\", autolink],\n\t[\"html_inline\", html_inline],\n\t[\"entity\", entity]\n];\nvar _rules2 = [\n\t[\"balance_pairs\", link_pairs],\n\t[\"strikethrough\", strikethrough_default.postProcess],\n\t[\"emphasis\", emphasis_default.postProcess],\n\t[\"fragments_join\", fragments_join]\n];\n/**\n* Tokenizes paragraph content.\n*/\nvar ParserInline = class {\n\tconstructor() {\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* {@link Ruler} instance. Keep configuration of inline rules.\n\t\t\t*/\n\t\t\t\"ruler\",\n\t\t\tnew Ruler()\n\t\t);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* {@link Ruler} instance. Second ruler used for post-processing\n\t\t\t* (e.g. in emphasis-like rules).\n\t\t\t*/\n\t\t\t\"ruler2\",\n\t\t\tnew Ruler()\n\t\t);\n\t\t_defineProperty(this, \"State\", StateInline);\n\t\tfor (let i = 0; i < _rules.length; i++) this.ruler.push(_rules[i][0], _rules[i][1]);\n\t\tfor (let i = 0; i < _rules2.length; i++) this.ruler2.push(_rules2[i][0], _rules2[i][1]);\n\t}\n\tskipToken(state) {\n\t\tconst pos = state.pos;\n\t\tconst rules = this.ruler.getRules(\"\");\n\t\tconst len = rules.length;\n\t\tconst maxNesting = state.md.options.maxNesting;\n\t\tconst cache = state.cache;\n\t\tif (typeof cache[pos] !== \"undefined\") {\n\t\t\tstate.pos = cache[pos];\n\t\t\treturn;\n\t\t}\n\t\tlet ok = false;\n\t\tif (state.level < maxNesting) for (let i = 0; i < len; i++) {\n\t\t\tstate.level++;\n\t\t\tok = rules[i](state, true);\n\t\t\tstate.level--;\n\t\t\tif (ok) {\n\t\t\t\tif (pos >= state.pos) throw new Error(\"inline rule didn't increment state.pos\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse state.pos = state.posMax;\n\t\tif (!ok) state.pos++;\n\t\tcache[pos] = state.pos;\n\t}\n\ttokenize(state) {\n\t\tconst rules = this.ruler.getRules(\"\");\n\t\tconst len = rules.length;\n\t\tconst end = state.posMax;\n\t\tconst maxNesting = state.md.options.maxNesting;\n\t\twhile (state.pos < end) {\n\t\t\tconst prevPos = state.pos;\n\t\t\tlet ok = false;\n\t\t\tif (state.level < maxNesting) for (let i = 0; i < len; i++) {\n\t\t\t\tok = rules[i](state, false);\n\t\t\t\tif (ok) {\n\t\t\t\t\tif (prevPos >= state.pos) throw new Error(\"inline rule didn't increment state.pos\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (ok) {\n\t\t\t\tif (state.pos >= end) break;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tstate.pending += state.src[state.pos++];\n\t\t}\n\t\tif (state.pending) state.pushPending();\n\t}\n\t/**\n\t* Process input string and push inline tokens into `outTokens`\n\t*/\n\tparse(str, md, env, outTokens) {\n\t\tconst state = new this.State(str, md, env, outTokens);\n\t\tthis.tokenize(state);\n\t\tconst rules = this.ruler2.getRules(\"\");\n\t\tconst len = rules.length;\n\t\tfor (let i = 0; i < len; i++) rules[i](state);\n\t}\n};\n//#endregion\n//#region src/markdownit.ts\nvar config = {\n\tdefault: {\n\t\toptions: {\n\t\t\thtml: false,\n\t\t\txhtmlOut: false,\n\t\t\tbreaks: false,\n\t\t\tlangPrefix: \"language-\",\n\t\t\tlinkify: false,\n\t\t\ttypographer: false,\n\t\t\tquotes: \"“”‘’\",\n\t\t\thighlight: null,\n\t\t\tmaxNesting: 100\n\t\t},\n\t\tcomponents: {\n\t\t\tcore: {},\n\t\t\tblock: {},\n\t\t\tinline: {}\n\t\t}\n\t},\n\tzero: {\n\t\toptions: {\n\t\t\thtml: false,\n\t\t\txhtmlOut: false,\n\t\t\tbreaks: false,\n\t\t\tlangPrefix: \"language-\",\n\t\t\tlinkify: false,\n\t\t\ttypographer: false,\n\t\t\tquotes: \"“”‘’\",\n\t\t\thighlight: null,\n\t\t\tmaxNesting: 20\n\t\t},\n\t\tcomponents: {\n\t\t\tcore: { rules: [\n\t\t\t\t\"normalize\",\n\t\t\t\t\"block\",\n\t\t\t\t\"strip_references\",\n\t\t\t\t\"inline\",\n\t\t\t\t\"text_join\"\n\t\t\t] },\n\t\t\tblock: { rules: [\"paragraph\"] },\n\t\t\tinline: {\n\t\t\t\trules: [\"text\"],\n\t\t\t\trules2: [\"balance_pairs\", \"fragments_join\"]\n\t\t\t}\n\t\t}\n\t},\n\tcommonmark: {\n\t\toptions: {\n\t\t\thtml: true,\n\t\t\txhtmlOut: true,\n\t\t\tbreaks: false,\n\t\t\tlangPrefix: \"language-\",\n\t\t\tlinkify: false,\n\t\t\ttypographer: false,\n\t\t\tquotes: \"“”‘’\",\n\t\t\thighlight: null,\n\t\t\tmaxNesting: 20\n\t\t},\n\t\tcomponents: {\n\t\t\tcore: { rules: [\n\t\t\t\t\"normalize\",\n\t\t\t\t\"block\",\n\t\t\t\t\"strip_references\",\n\t\t\t\t\"inline\",\n\t\t\t\t\"text_join\"\n\t\t\t] },\n\t\t\tblock: { rules: [\n\t\t\t\t\"blockquote\",\n\t\t\t\t\"code\",\n\t\t\t\t\"fence\",\n\t\t\t\t\"heading\",\n\t\t\t\t\"hr\",\n\t\t\t\t\"html_block\",\n\t\t\t\t\"lheading\",\n\t\t\t\t\"list\",\n\t\t\t\t\"reference\",\n\t\t\t\t\"paragraph\"\n\t\t\t] },\n\t\t\tinline: {\n\t\t\t\trules: [\n\t\t\t\t\t\"autolink\",\n\t\t\t\t\t\"backticks\",\n\t\t\t\t\t\"emphasis\",\n\t\t\t\t\t\"entity\",\n\t\t\t\t\t\"escape\",\n\t\t\t\t\t\"html_inline\",\n\t\t\t\t\t\"image\",\n\t\t\t\t\t\"link\",\n\t\t\t\t\t\"newline\",\n\t\t\t\t\t\"text\"\n\t\t\t\t],\n\t\t\t\trules2: [\n\t\t\t\t\t\"balance_pairs\",\n\t\t\t\t\t\"emphasis\",\n\t\t\t\t\t\"fragments_join\"\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t}\n};\nvar BAD_PROTO_RE = /^(vbscript|javascript|file|data):/;\nvar GOOD_DATA_RE = /^data:image\\/(gif|png|jpeg|webp);/;\nvar RECODE_HOSTNAME_FOR = [\n\t\"http:\",\n\t\"https:\",\n\t\"mailto:\"\n];\n/**\n* Parses Markdown into tokens and renders them to HTML.\n*\n* @category Main\n*/\nvar MarkdownIt = class {\n\t/**\n\t* Link validation function. CommonMark allows too much in links. By default\n\t* we disable `javascript:`, `vbscript:`, `file:` schemas, and almost all `data:...` schemas\n\t* except some embedded image types.\n\t*\n\t* You can change this behaviour:\n\t*\n\t* @example\n\t* ```javascript\n\t* import MarkdownIt from 'markdown-it'\n\t* const md = new MarkdownIt()\n\t*\n\t* // enable everything\n\t* md.validateLink = function () { return true; }\n\t* ```\n\t*/\n\tvalidateLink(url) {\n\t\tconst str = url.trim().toLowerCase();\n\t\treturn BAD_PROTO_RE.test(str) ? GOOD_DATA_RE.test(str) : true;\n\t}\n\t/**\n\t* Function used to encode link url to a machine-readable format,\n\t* which includes url-encoding, punycode, etc.\n\t*/\n\tnormalizeLink(url) {\n\t\tconst parsed = mdurl.parse(url, true);\n\t\tif (parsed.hostname) {\n\t\t\tif (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) try {\n\t\t\t\tparsed.hostname = punycode.toASCII(parsed.hostname);\n\t\t\t} catch (er) {}\n\t\t}\n\t\tif (parsed.auth) parsed.auth = mdurl.encode(parsed.auth);\n\t\tif (parsed.hostname) parsed.hostname = mdurl.encode(parsed.hostname);\n\t\tif (parsed.pathname) parsed.pathname = mdurl.encode(parsed.pathname);\n\t\tif (parsed.search) parsed.search = mdurl.encode(parsed.search);\n\t\tif (parsed.hash) parsed.hash = mdurl.encode(parsed.hash);\n\t\treturn mdurl.format(parsed);\n\t}\n\t/**\n\t* Function used to decode link url to a human-readable format`\n\t*/\n\tnormalizeLinkText(url) {\n\t\tconst parsed = mdurl.parse(url, true);\n\t\tif (parsed.hostname) {\n\t\t\tif (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) try {\n\t\t\t\tparsed.hostname = punycode.toUnicode(parsed.hostname);\n\t\t\t} catch (er) {}\n\t\t}\n\t\treturn mdurl.decode(mdurl.format(parsed), mdurl.decode.defaultChars + \"%\");\n\t}\n\tconstructor(...args) {\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* Instance of {@link ParserInline}. You may need it to add new rules when\n\t\t\t* writing plugins. For simple rules control use {@link MarkdownIt.disable}\n\t\t\t* and {@link MarkdownIt.enable}.\n\t\t\t*/\n\t\t\t\"inline\",\n\t\t\tnew ParserInline()\n\t\t);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* Instance of {@link ParserBlock}. You may need it to add new rules when\n\t\t\t* writing plugins. For simple rules control use {@link MarkdownIt.disable}\n\t\t\t* and {@link MarkdownIt.enable}.\n\t\t\t*/\n\t\t\t\"block\",\n\t\t\tnew ParserBlock()\n\t\t);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* Instance of {@link ParserCore} chain executor. You may need it to add new\n\t\t\t* rules when writing plugins. For simple rules control use\n\t\t\t* {@link MarkdownIt.disable} and {@link MarkdownIt.enable}.\n\t\t\t*/\n\t\t\t\"core\",\n\t\t\tnew ParserCore()\n\t\t);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* Instance of {@link Renderer}. Use it to modify output look. Or to add rendering\n\t\t\t* rules for new token types, generated by plugins.\n\t\t\t*\n\t\t\t* See {@link Renderer} docs and\n\t\t\t* [source code](https://github.com/markdown-it/markdown-it/blob/master/src/renderer.ts).\n\t\t\t*\n\t\t\t* @example\n\t\t\t* ```javascript\n\t\t\t* import MarkdownIt from 'markdown-it'\n\t\t\t* const md = new MarkdownIt()\n\t\t\t*\n\t\t\t* function myToken(tokens, idx, options, env, self) {\n\t\t\t* //...\n\t\t\t* return result;\n\t\t\t* };\n\t\t\t*\n\t\t\t* md.renderer.rules['my_token'] = myToken\n\t\t\t* ```\n\t\t\t*/\n\t\t\t\"renderer\",\n\t\t\tnew Renderer()\n\t\t);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* [linkify-it](https://github.com/markdown-it/linkify-it) instance.\n\t\t\t* Used by [linkify](https://github.com/markdown-it/markdown-it/blob/master/src/rules_core/linkify.ts)\n\t\t\t* rule.\n\t\t\t*/\n\t\t\t\"linkify\",\n\t\t\tnew LinkifyIt()\n\t\t);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* Assorted utility functions, useful to write plugins. See details\n\t\t\t* [here](https://github.com/markdown-it/markdown-it/blob/master/src/common/utils.ts).\n\t\t\t*/\n\t\t\t\"utils\",\n\t\t\tutils_exports\n\t\t);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* Link components parser functions, useful to write plugins. See details\n\t\t\t* [here](https://github.com/markdown-it/markdown-it/blob/master/src/helpers).\n\t\t\t*/\n\t\t\t\"helpers\",\n\t\t\tObject.assign({}, helpers_exports)\n\t\t);\n\t\tconst [presetNameOrOptions, options] = args;\n\t\tif (typeof presetNameOrOptions === \"string\") {\n\t\t\tthis.configure(presetNameOrOptions);\n\t\t\tif (options) this.set(options);\n\t\t} else {\n\t\t\tthis.configure(\"default\");\n\t\t\tthis.set(presetNameOrOptions || {});\n\t\t}\n\t}\n\t/**\n\t* Set parser options (in the same format as in constructor). Probably, you\n\t* will never need it, but you can change options after constructor call.\n\t*\n\t* __Note:__ To achieve the best possible performance, don't modify a\n\t* `markdown-it` instance options on the fly. If you need multiple configurations\n\t* it's best to create multiple instances and initialize each with separate\n\t* config.\n\t*\n\t* @example\n\t* ```javascript\n\t* import MarkdownIt from 'markdown-it'\n\t*\n\t* const md = new MarkdownIt()\n\t* .set({ html: true, breaks: true })\n\t* .set({ typographer: true })\n\t* ```\n\t*/\n\tset(options) {\n\t\tObject.assign(this.options, options);\n\t\treturn this;\n\t}\n\t/**\n\t* Batch load of all options and compenent settings. This is internal method,\n\t* and you probably will not need it. But if you will - see available presets\n\t* and data structure [here](https://github.com/markdown-it/markdown-it/tree/master/src/presets)\n\t*\n\t* We strongly recommend to use presets instead of direct config loads. That\n\t* will give better compatibility with next versions.\n\t*/\n\tconfigure(presets) {\n\t\tlet p;\n\t\tif (typeof presets === \"string\") {\n\t\t\tconst presetName = presets;\n\t\t\tp = config[presetName];\n\t\t\tif (!p) throw new Error(`Wrong 'markdown-it' preset \"${presetName}\", check name`);\n\t\t} else p = presets;\n\t\tif (!p) throw new Error(\"Wrong `markdown-it` preset, can't be empty\");\n\t\tif (p.options) this.options = { ...p.options };\n\t\tconst components = p.components;\n\t\tif (components) {\n\t\t\tvar _components$inline;\n\t\t\t[\n\t\t\t\t\"core\",\n\t\t\t\t\"block\",\n\t\t\t\t\"inline\"\n\t\t\t].forEach((name) => {\n\t\t\t\tvar _components$name;\n\t\t\t\tconst rules = (_components$name = components[name]) === null || _components$name === void 0 ? void 0 : _components$name.rules;\n\t\t\t\tif (rules) this[name].ruler.enableOnly(rules);\n\t\t\t});\n\t\t\tconst rules2 = (_components$inline = components.inline) === null || _components$inline === void 0 ? void 0 : _components$inline.rules2;\n\t\t\tif (rules2) this.inline.ruler2.enableOnly(rules2);\n\t\t}\n\t\treturn this;\n\t}\n\t/**\n\t* Enable list or rules. It will automatically find appropriate components,\n\t* containing rules with given names. If rule not found, and `ignoreInvalid`\n\t* not set - throws exception.\n\t*\n\t* @example\n\t* ```javascript\n\t* import MarkdownIt from 'markdown-it'\n\t*\n\t* const md = new MarkdownIt()\n\t* .enable(['sub', 'sup'])\n\t* .disable('smartquotes')\n\t* ```\n\t*/\n\tenable(list, ignoreInvalid = false) {\n\t\tlet result = [];\n\t\tif (!Array.isArray(list)) list = [list];\n\t\t[\n\t\t\t\"core\",\n\t\t\t\"block\",\n\t\t\t\"inline\"\n\t\t].forEach((chain) => {\n\t\t\tresult = result.concat(this[chain].ruler.enable(list, true));\n\t\t});\n\t\tresult = result.concat(this.inline.ruler2.enable(list, true));\n\t\tconst missed = list.filter((name) => result.indexOf(name) < 0);\n\t\tif (missed.length && !ignoreInvalid) throw new Error(`MarkdownIt. Failed to enable unknown rule(s): ${missed}`);\n\t\treturn this;\n\t}\n\t/**\n\t* The same as {@link MarkdownIt.enable}, but turn specified rules off.\n\t*/\n\tdisable(list, ignoreInvalid = false) {\n\t\tlet result = [];\n\t\tif (!Array.isArray(list)) list = [list];\n\t\t[\n\t\t\t\"core\",\n\t\t\t\"block\",\n\t\t\t\"inline\"\n\t\t].forEach((chain) => {\n\t\t\tresult = result.concat(this[chain].ruler.disable(list, true));\n\t\t});\n\t\tresult = result.concat(this.inline.ruler2.disable(list, true));\n\t\tconst missed = list.filter((name) => result.indexOf(name) < 0);\n\t\tif (missed.length && !ignoreInvalid) throw new Error(`MarkdownIt. Failed to disable unknown rule(s): ${missed}`);\n\t\treturn this;\n\t}\n\t/**\n\t* Load specified plugin with given params into current parser instance.\n\t* It's just a sugar to call `plugin(md, params)` with curring.\n\t*\n\t* @example\n\t* ```javascript\n\t* import MarkdownIt from 'markdown-it'\n\t* import iterator from 'markdown-it-for-inline'\n\t*\n\t* const md = new MarkdownIt()\n\t* .use(iterator, 'foo_replace', 'text', function (tokens, idx) {\n\t* tokens[idx].content = tokens[idx].content.replace(/foo/g, 'bar')\n\t* })\n\t* ```\n\t*/\n\tuse(plugin, ...params) {\n\t\tplugin.apply(plugin, [this, ...params]);\n\t\treturn this;\n\t}\n\t/**\n\t* Parse input string and return list of block tokens (special token type\n\t* \"inline\" will contain list of inline tokens). You should not call this\n\t* method directly, until you write custom renderer (for example, to produce\n\t* AST).\n\t*\n\t* `env` is used to pass data between \"distributed\" rules and return additional\n\t* metadata like reference info, needed for the renderer. It also can be used to\n\t* inject data in specific cases. Usually, you will be ok to pass `{}`,\n\t* and then pass updated object to renderer.\n\t*/\n\tparse(src, env) {\n\t\tif (typeof src !== \"string\") throw new Error(\"Input data should be a String\");\n\t\tconst state = new this.core.State(src, this, env);\n\t\tthis.core.process(state);\n\t\treturn state.tokens;\n\t}\n\t/**\n\t* Render markdown string into html. It does all magic for you :).\n\t*\n\t* `env` can be used to inject additional metadata (`{}` by default).\n\t* But you will not need it with high probability. See also comment\n\t* in {@link MarkdownIt.parse}.\n\t*/\n\trender(src, env = {}) {\n\t\treturn this.renderer.render(this.parse(src, env), this.options, env);\n\t}\n\t/**\n\t* The same as {@link MarkdownIt.parse} but skip all block rules. It returns\n\t* the block tokens list with the single `inline` element, containing parsed\n\t* inline tokens in `children` property. Also updates `env` object.\n\t*/\n\tparseInline(src, env) {\n\t\tconst state = new this.core.State(src, this, env);\n\t\tstate.inlineMode = true;\n\t\tthis.core.process(state);\n\t\treturn state.tokens;\n\t}\n\t/**\n\t* Similar to {@link MarkdownIt.render} but for single paragraph content.\n\t* Result will NOT be wrapped into `<p>` tags.\n\t*/\n\trenderInline(src, env = {}) {\n\t\treturn this.renderer.render(this.parseInline(src, env), this.options, env);\n\t}\n};\n_defineProperty(MarkdownIt, \"Token\", Token);\n_defineProperty(MarkdownIt, \"Ruler\", Ruler);\n_defineProperty(MarkdownIt, \"Renderer\", Renderer);\n_defineProperty(MarkdownIt, \"ParserCore\", ParserCore);\n_defineProperty(MarkdownIt, \"StateCore\", StateCore);\n_defineProperty(MarkdownIt, \"ParserBlock\", ParserBlock);\n_defineProperty(MarkdownIt, \"StateBlock\", StateBlock);\n_defineProperty(MarkdownIt, \"ParserInline\", ParserInline);\n_defineProperty(MarkdownIt, \"StateInline\", StateInline);\n//#endregion\n//#region src/index.ts\n/**\n* Default package export.\n*\n* For backward compatibility, the {@link MarkdownIt} class is wrapped so\n* legacy code can call it without `new`. New code should instantiate it as a\n* regular class with `new`. The compatibility wrapper may be removed in a\n* future release.\n*\n* @category Main\n*/\nvar MarkdownItCallable = callable(MarkdownIt);\n//#endregion\nexport { MarkdownItCallable as default };\n\n//# sourceMappingURL=markdown-it.mjs.map","/**\n * Pure functions for the markdown rendering pipeline.\n * Extracted for testability (no CSS/React imports).\n */\n\nimport markdownit, { type MarkdownIt } from \"markdown-it\";\n\nimport {\n canonicalImageSource,\n parseAbsoluteHttpUrl,\n parseDataUri,\n} from \"@tsmono/util\";\n\nimport {\n defaultMarkdownRenderer,\n escapeHtmlCharacters,\n type MarkdownRenderer,\n} from \"./markdownText\";\n\ntype MarkdownItPlugin = (md: MarkdownIt) => void;\n\nlet mathjaxPluginPromise: Promise<MarkdownItPlugin> | null = null;\nconst getMathjaxPlugin = (): Promise<MarkdownItPlugin> => {\n if (!mathjaxPluginPromise) {\n const loading = import(\"markdown-it-mathjax3\").then(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- untyped dependency: markdown-it-mathjax3 ships no types, so its default export arrives as any\n (m) => m.default as MarkdownItPlugin\n );\n // Reset on rejection so a transient chunk-load failure (network blip,\n // redeploy invalidating the hashed chunk) retries on the next math render\n // instead of disabling math for the rest of the session.\n loading.catch(() => {\n if (mathjaxPluginPromise === loading) {\n mathjaxPluginPromise = null;\n }\n });\n mathjaxPluginPromise = loading;\n }\n return mathjaxPluginPromise;\n};\n\nexport const hasMathContent = (text: string): boolean =>\n text.includes(\"$\") || text.includes(\"\\\\(\") || text.includes(\"\\\\[\");\n\n// Module-level cache for lazy-initialized markdown-it instances\nconst mdInstanceCache: Record<string, MarkdownIt> = {};\n\n/** Unescape HTML entities within math token content before MathJax processing.\n * This is safe because MathJax renders TeX to SVG/MathML, not raw HTML. */\nexport const unescapeHtmlForMath = (content: string): string => {\n return content\n .replace(/&lt;/g, \"<\")\n .replace(/&gt;/g, \">\")\n .replace(/&amp;/g, \"&\")\n .replace(/&apos;/g, \"'\")\n .replace(/&quot;/g, '\"');\n};\n\nexport const getMarkdownInstance = async (\n renderer: MarkdownRenderer,\n contentHasMath?: boolean\n): Promise<MarkdownIt> => {\n const useMath =\n (renderer === \"full\" || renderer === \"fragment\") && !!contentHasMath;\n const cacheKey = `${renderer}:${useMath ? \"1\" : \"0\"}`;\n\n const cached = mdInstanceCache[cacheKey];\n if (cached) {\n return cached;\n }\n\n if (renderer === \"textOnly\") {\n const md = new markdownit(\"zero\", { breaks: true, html: false }).enable([\n \"emphasis\",\n \"newline\",\n ]);\n mdInstanceCache[cacheKey] = md;\n return md;\n }\n\n const md = new markdownit({ breaks: true, html: true });\n md.renderer.rules.image = (tokens, idx) => {\n const token = tokens[idx];\n if (!token) {\n return \"\";\n }\n\n // attrGet returns string | number as of markdown-it 15\n const source = String(token.attrGet(\"src\") ?? \"\");\n const alt = token.content.trim();\n\n // Base64 raster data URIs issue no network request, so rendering them\n // inline cannot leak a fetch to an attacker-controlled host. Emit the\n // canonical form, not the raw source — see canonicalImageSource.\n const canonicalSource = canonicalImageSource(source);\n if (canonicalSource !== undefined) {\n const title = token.attrGet(\"title\");\n const titleAttr = title\n ? ` title=\"${md.utils.escapeHtml(String(title))}\"`\n : \"\";\n return `<img src=\"${md.utils.escapeHtml(canonicalSource)}\" alt=\"${md.utils.escapeHtml(alt)}\"${titleAttr}>`;\n }\n\n const href = parseAbsoluteHttpUrl(source);\n const dataUri = parseDataUri(source);\n const visibleSource =\n href ??\n (dataUri\n ? `data:${dataUri.mimeType}${dataUri.base64 ? \";base64\" : \"\"},...`\n : source);\n const label = alt ? `${alt} (${visibleSource})` : visibleSource;\n const escapedLabel = md.utils.escapeHtml(label);\n\n if (!href) {\n return escapedLabel;\n }\n\n return `<a href=\"${md.utils.escapeHtml(href)}\" target=\"_blank\" rel=\"noopener noreferrer\">${escapedLabel}</a>`;\n };\n\n if (useMath) {\n const mathjaxPlugin = await getMathjaxPlugin();\n md.use(mathjaxPlugin);\n\n // Wrap math renderers to unescape HTML entities in TeX content\n // before MathJax processes them. HTML chars in LaTeX blocks are\n // entity-encoded by the pipeline for XSS safety, but MathJax needs\n // the raw characters (e.g. < for \\lt comparisons). This is safe\n // because MathJax renders to SVG, not to injectable HTML.\n const origInline = md.renderer.rules.math_inline;\n const origBlock = md.renderer.rules.math_block;\n\n if (origInline) {\n md.renderer.rules.math_inline = (tokens, idx, options, env, self) => {\n const token = tokens[idx];\n if (token) {\n token.content = unescapeHtmlForMath(token.content);\n }\n return origInline(tokens, idx, options, env, self);\n };\n }\n if (origBlock) {\n md.renderer.rules.math_block = (tokens, idx, options, env, self) => {\n const token = tokens[idx];\n if (token) {\n token.content = unescapeHtmlForMath(token.content);\n }\n return origBlock(tokens, idx, options, env, self);\n };\n }\n }\n mdInstanceCache[cacheKey] = md;\n\n return md;\n};\n\nexport const protectBackslashesInLatex = (content: string): string => {\n if (!content) return content;\n\n try {\n // Match inline math: $...$\n const inlineRegex = /\\$(.*?)\\$/g;\n\n // Match block math: $$...$$\n const blockRegex = /\\$\\$([\\s\\S]*?)\\$\\$/g;\n\n // Replace backslashes in LaTeX blocks with placeholders to protect them\n // from HTML escaping. Only backslashes need protection — other characters\n // (<, >, &, ', \") are left for escapeHtmlCharacters to handle, and then\n // unescaped specifically within MathJax token rendering (see getMarkdownInstance).\n let result = content.replace(\n inlineRegex,\n (_match: string, latex: string) => {\n const protectedTex = latex.replace(/\\\\/g, \"___LATEX_BACKSLASH___\");\n return `$${protectedTex}$`;\n }\n );\n\n result = result.replace(blockRegex, (_match: string, latex: string) => {\n const protectedTex = latex.replace(/\\\\/g, \"___LATEX_BACKSLASH___\");\n return `$$${protectedTex}$$`;\n });\n\n return result;\n } catch (error) {\n console.error(\"Error protecting LaTeX content:\", error);\n return content;\n }\n};\n\nexport const restoreBackslashesForLatex = (content: string): string => {\n if (!content) {\n return content;\n }\n\n try {\n // Restore only backslash placeholders — other characters (<, >, &, ', \")\n // are kept as HTML entities and unescaped within MathJax token rendering.\n let result = content.replace(/___LATEX_BACKSLASH___/g, \"\\\\\");\n\n // Then fix dots notation for better MathJax compatibility\n // This replaces \\dots with \\ldots which has better support\n result = fixDotsNotation(result);\n\n return result;\n } catch (error) {\n console.error(\"Error restoring LaTeX content:\", error);\n return content; // Return input content if something goes wrong\n }\n};\n\n// Replaces the first `\\dots` inside each delimited math run with `\\ldots`\n// (MathJax supports the latter more reliably). Equivalent to the regex\n// /(<delim>[^$]*?)\\\\dots([^$]*?<delim>)/g, but driven by indexOf: with the\n// regex, an unclosed delimiter rescanned to end-of-input from every `\\dots`.\nconst replaceDotsBetween = (content: string, delim: \"$\" | \"$$\"): string => {\n let out = \"\";\n let emitted = 0;\n let search = 0;\n let nextDots = content.indexOf(\"\\\\dots\");\n while (nextDots !== -1) {\n const open = content.indexOf(delim, search);\n if (open === -1) break;\n const bodyStart = open + delim.length;\n const close = content.indexOf(\"$\", bodyStart);\n if (close === -1) break;\n if (nextDots < bodyStart) {\n nextDots = content.indexOf(\"\\\\dots\", bodyStart);\n if (nextDots === -1) break;\n }\n if (nextDots < close && content.startsWith(delim, close)) {\n out += `${content.slice(emitted, nextDots)}\\\\ldots`;\n emitted = nextDots + \"\\\\dots\".length;\n search = close + delim.length;\n } else {\n search = open + 1;\n }\n }\n return emitted === 0 ? content : out + content.slice(emitted);\n};\n\nconst fixDotsNotation = (content: string): string => {\n if (!content) return content;\n return replaceDotsBetween(replaceDotsBetween(content, \"$\"), \"$$\");\n};\n\nconst kLetterListPattern = /^([a-zA-Z][).]\\s.*?)$/gm;\n\nexport const preRenderText = (txt: string): string => {\n if (!txt) return txt;\n\n // eslint-disable-next-line no-misleading-character-class\n txt = txt.replace(/^[\\u200B\\u200C\\u200D\\u200E\\u200F\\uFEFF]/, \"\");\n\n // Special handling for ordered lists that look like\n // multiple choice (e.g. a), b), c), d) etc..)\n return txt.replaceAll(\n kLetterListPattern,\n \"<p class='markdown-ordered-list-item'>$1</p>\"\n );\n};\n\n// Line terminators are the characters an unflagged regex `.` refuses to match.\nconst isLineTerminator = (code: number): boolean =>\n code === 0x0a || code === 0x0d || code === 0x2028 || code === 0x2029;\n\n// Hides `[label]: text` spans from markdown-it's reference-definition rule.\n// Equivalent to replacing /\\[([^\\]]*)\\]: (?!http)(.*)/g with\n// \"(open:767A125E)$1(close:767A125E) $2 \", but driven by indexOf: every `[`\n// ahead of a given `]` pairs with that same `]`, so a failed pair skips past\n// it instead of rescanning from each `[` (quadratic on a run of `[`).\nexport const protectMarkdown = (txt: string): string => {\n if (!txt) return txt;\n\n let out = \"\";\n let emitted = 0;\n let search = 0;\n for (;;) {\n const open = txt.indexOf(\"[\", search);\n if (open === -1) break;\n const close = txt.indexOf(\"]\", open + 1);\n if (close === -1) break;\n if (!txt.startsWith(\"]: \", close) || txt.startsWith(\"http\", close + 3)) {\n search = close + 1;\n continue;\n }\n const bodyStart = close + 3;\n let lineEnd = bodyStart;\n while (lineEnd < txt.length && !isLineTerminator(txt.charCodeAt(lineEnd))) {\n lineEnd++;\n }\n out += `${txt.slice(emitted, open)}(open:767A125E)${txt.slice(open + 1, close)}(close:767A125E) ${txt.slice(bodyStart, lineEnd)} `;\n emitted = lineEnd;\n search = lineEnd;\n }\n return emitted === 0 ? txt : out + txt.slice(emitted);\n};\n\nexport const unprotectMarkdown = (txt: string): string => {\n if (!txt) return txt;\n\n txt = txt.replaceAll(\"(open:767A125E)\", \"[\");\n txt = txt.replaceAll(\"(close:767A125E)\", \"]\");\n return txt;\n};\n\nexport function unescapeSupHtmlEntities(str: string): string {\n if (!str) {\n return str;\n }\n return str\n .replace(/&lt;sup&gt;/g, \"<sup>\")\n .replace(/&lt;\\/sup&gt;/g, \"</sup>\");\n}\n\nexport function unescapeCodeHtmlEntities(str: string): string {\n if (!str) return str;\n\n const htmlEntities: Record<string, string> = {\n \"&lt;\": \"<\",\n \"&gt;\": \">\",\n \"&amp;\": \"&\",\n \"&#x5C;\": \"\\\\\",\n \"&quot;\": '\"',\n };\n\n return str.replace(\n /(<code[^>]*>)([\\s\\S]*?)(<\\/code>)/gi,\n (\n _match: string,\n starttag: string,\n content: string,\n endtag: string\n ): string => {\n return (\n starttag +\n content.replace(\n /&(?:amp|lt|gt|quot|#39|#x2F|#x5C|#96);/g,\n (entity: string): string => htmlEntities[entity] || entity\n ) +\n endtag\n );\n }\n );\n}\n\ntype MarkdownRenderFunction = (markdown: string) => Promise<string>;\n\nconst renderFullPipelineMarkdown = async (\n markdown: string,\n renderer: \"full\" | \"fragment\"\n): Promise<string> => {\n // Protect backslashes in LaTeX expressions\n const protectedContent = protectBackslashesInLatex(markdown);\n\n // Escape all tags\n const escaped = escapeHtmlCharacters(protectedContent);\n\n // Pre-render any text that isn't handled by markdown\n const preRendered = preRenderText(escaped);\n\n const protectedText = protectMarkdown(preRendered);\n\n // Restore backslashes for LaTeX processing\n const preparedForMarkdown = restoreBackslashesForLatex(protectedText);\n\n let html = preparedForMarkdown;\n try {\n const md = await getMarkdownInstance(renderer, hasMathContent(markdown));\n html = md.render(preparedForMarkdown);\n } catch (ex) {\n console.log(\"Unable to markdown render content\");\n console.error(ex);\n }\n\n const unescaped = unprotectMarkdown(html);\n\n // For `code` tags, reverse the escaping if we can\n const withCode = unescapeCodeHtmlEntities(unescaped);\n\n // For `sup` tags, reverse the escaping if we can\n const withSup = unescapeSupHtmlEntities(withCode);\n\n return withSup;\n};\n\nconst renderTextOnlyMarkdown = async (markdown: string): Promise<string> => {\n try {\n return (await getMarkdownInstance(\"textOnly\")).render(markdown);\n } catch (ex) {\n console.log(\"Unable to markdown render content\");\n console.error(ex);\n return escapeHtmlCharacters(markdown).replace(/\\n/g, \"<br/>\");\n }\n};\n\nconst markdownRenderers: Record<MarkdownRenderer, MarkdownRenderFunction> = {\n full: (markdown) => renderFullPipelineMarkdown(markdown, \"full\"),\n fragment: (markdown) => renderFullPipelineMarkdown(markdown, \"fragment\"),\n textOnly: renderTextOnlyMarkdown,\n};\n\nexport const renderMarkdown = (\n markdown: string,\n renderer: MarkdownRenderer = defaultMarkdownRenderer\n): Promise<string> => markdownRenderers[renderer](markdown);\n","import MarkdownIt, { type Token } from \"markdown-it\";\n\nimport {\n kTruncationWindowFactor,\n simpleMarkdownTruncate,\n} from \"./markdownText\";\n\n/**\n * Truncates markdown text to a target length while preserving markdown syntax\n * and avoiding word breaks.\n *\n * @param markdown - The markdown string to truncate\n * @param maxLength - Maximum character length for the output (default 250)\n * @param ellipsis - String to append when text is truncated (default \"...\")\n * @returns Truncated markdown string with ellipsis if needed\n */\nexport function truncateMarkdown(\n markdown: string,\n maxLength: number = 250,\n ellipsis: string = \"...\"\n): string {\n // Handle edge cases\n if (!markdown || markdown.length <= maxLength) {\n return markdown;\n }\n\n // Handle whitespace-only strings\n if (markdown.trim().length === 0) {\n return markdown.slice(0, maxLength);\n }\n\n // If the ellipsis itself is too long, just return truncated text\n if (ellipsis.length >= maxLength) {\n return markdown.slice(0, maxLength);\n }\n\n // Sample text arrives unbounded from the log, and only ~maxLength\n // characters can ever be shown, so detection and parsing run over a\n // bounded prefix: the cost of a cell then does not grow with the sample.\n const prefix = markdown.slice(0, maxLength * kTruncationWindowFactor);\n\n // For simple cases without markdown, use simple truncation\n if (!hasMarkdownSyntax(prefix)) {\n return simpleMarkdownTruncate(prefix, maxLength, ellipsis);\n }\n\n // Create a markdown parser instance\n const md = new MarkdownIt({\n html: true,\n breaks: true,\n });\n\n // Parse the markdown into tokens\n const tokens = md.parse(prefix, {});\n\n // Track accumulated text and find truncation point\n let accumulated = \"\";\n let lastSafePoint = \"\";\n let isTruncated = prefix.length < markdown.length;\n\n // Process tokens to find safe truncation point\n for (const token of tokens) {\n const tokenContent = getTokenContent(token);\n const potentialLength = accumulated.length + tokenContent.length;\n\n // If adding this token would exceed the limit\n if (potentialLength > maxLength - ellipsis.length) {\n // Try to truncate within this token at a word boundary\n const remainingSpace = maxLength - ellipsis.length - accumulated.length;\n\n if (remainingSpace > 0 && tokenContent.length > 0) {\n // Look for word boundary within the token\n const truncatedToken = truncateAtWordBoundary(\n tokenContent,\n remainingSpace\n );\n if (truncatedToken.length > 0) {\n accumulated += truncatedToken;\n }\n }\n\n isTruncated = true;\n break;\n }\n\n accumulated += tokenContent;\n\n // Save safe truncation points (after complete tokens)\n if (isCompleteSyntax(token)) {\n lastSafePoint = accumulated;\n }\n }\n\n // Use the last safe point if we have one and it's not too short\n const finalText =\n lastSafePoint.length > maxLength * 0.5 ? lastSafePoint : accumulated;\n\n // Add ellipsis if truncated\n if (isTruncated && finalText.length > 0) {\n // Clean up any trailing whitespace before adding ellipsis\n return finalText.trimEnd() + ellipsis;\n }\n\n return finalText;\n}\n\n/**\n * Check if text contains markdown syntax\n */\nfunction hasMarkdownSyntax(text: string): boolean {\n if (hasLinkSyntax(text)) {\n return true;\n }\n\n const markdownPatterns = [\n /`[^`]+`/, // Inline code\n /```[\\s\\S]*?```/, // Code blocks\n /\\*{1,2}[^*]+\\*{1,2}/, // Bold/italic\n /_{1,2}[^_]+_{1,2}/, // Bold/italic\n /\\$[^$]+\\$/, // LaTeX\n /^#{1,6}\\s/m, // Headers\n /^\\s*[-*+]\\s/m, // Lists\n ];\n\n return markdownPatterns.some((pattern) => pattern.test(text));\n}\n\n// What \".\" refuses to cross in a regex without the s flag.\nconst kLineTerminator = /[\\n\\r\\u2028\\u2029]/;\n\n// Same predicate as /\\[.*?\\]\\(.*?\\)/ (\"[\" then \"](\" then \")\" on one line,\n// which also covers images) without its cubic backtracking on a line of many\n// \"[\" and \"](\" and no \")\". Backtracking-safe regex forms are still quadratic\n// on \"[\" repeated, so this is a plain scan.\nfunction hasLinkSyntax(text: string): boolean {\n return text.split(kLineTerminator).some((line) => {\n const open = line.indexOf(\"[\");\n if (open < 0) {\n return false;\n }\n const close = line.indexOf(\"](\", open + 1);\n return close >= 0 && line.indexOf(\")\", close + 2) >= 0;\n });\n}\n\n/**\n * Extracts the text content from a markdown token\n */\nfunction getTokenContent(token: Token): string {\n // Handle different token types\n if (token.type === \"inline\" && token.children) {\n return token.children\n .map((child: Token) => {\n if (child.content) return child.content;\n if (child.type === \"softbreak\") return \"\\n\";\n if (child.type === \"hardbreak\") return \"\\n\";\n return \"\";\n })\n .join(\"\");\n }\n\n if (token.content) {\n return token.content;\n }\n\n // Handle special tokens\n if (token.type === \"code_block\" || token.type === \"fence\") {\n return token.content || \"\";\n }\n\n if (token.type === \"html_block\") {\n return token.content || \"\";\n }\n\n // Handle line breaks\n if (token.type === \"softbreak\" || token.type === \"hardbreak\") {\n return \"\\n\";\n }\n\n return \"\";\n}\n\n/**\n * Checks if a token represents a complete markdown syntax element\n */\nfunction isCompleteSyntax(token: Token): boolean {\n // Consider a token \"complete\" if it's a closing tag or a complete block\n const completeTypes = [\n \"paragraph_close\",\n \"heading_close\",\n \"blockquote_close\",\n \"list_item_close\",\n \"ordered_list_close\",\n \"bullet_list_close\",\n \"code_block\",\n \"fence\",\n \"hr\",\n \"html_block\",\n ];\n\n return completeTypes.includes(token.type);\n}\n\n/**\n * Truncates text at the last word boundary before the limit\n */\nfunction truncateAtWordBoundary(text: string, maxLength: number): string {\n if (text.length <= maxLength) {\n return text;\n }\n\n // Look for the last space before the limit\n let lastSpace = -1;\n\n // Search backwards from maxLength to find a word boundary\n for (let i = maxLength - 1; i >= 0; i--) {\n const char = text[i];\n if (char !== undefined && /\\s/.test(char)) {\n lastSpace = i;\n break;\n }\n }\n\n // If we found a space, use it\n if (lastSpace > 0) {\n return text.slice(0, lastSpace);\n }\n\n // Otherwise, look for other breaking characters\n for (let i = maxLength - 1; i >= 0; i--) {\n const char = text[i];\n if (char !== undefined && /[.!?,;:\\-—]/.test(char)) {\n return text.slice(0, i + 1);\n }\n }\n\n // If no good break point, check for incomplete markdown syntax\n const substr = text.slice(0, maxLength);\n\n // Check for incomplete markdown syntax at the end\n const markdownPatterns = [\n /\\[([^\\]]*)?$/, // Incomplete link\n /!\\[([^\\]]*)?$/, // Incomplete image\n /`[^`]*$/, // Incomplete inline code\n /\\*{1,2}[^*]*$/, // Incomplete bold/italic\n /_{1,2}[^_]*$/, // Incomplete bold/italic\n /\\$[^$]*$/, // Incomplete LaTeX\n ];\n\n for (const pattern of markdownPatterns) {\n const match = substr.match(pattern);\n if (match && match.index) {\n // Truncate before the incomplete syntax\n return substr.slice(0, match.index);\n }\n }\n\n // Last resort: return the substring\n return substr;\n}\n","/*! @license DOMPurify 3.4.15 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.15/LICENSE */\n\nfunction _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nfunction _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n}\nfunction _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = true,\n o = false;\n try {\n if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = true, n = r;\n } finally {\n try {\n if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _slicedToArray(r, e) {\n return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();\n}\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return _arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;\n }\n}\n\nconst entries = Object.entries,\n setPrototypeOf = Object.setPrototypeOf,\n isFrozen = Object.isFrozen,\n getPrototypeOf = Object.getPrototypeOf,\n getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nlet freeze = Object.freeze,\n seal = Object.seal,\n create = Object.create; // eslint-disable-line import/no-mutable-exports\nlet _ref = typeof Reflect !== 'undefined' && Reflect,\n apply = _ref.apply,\n construct = _ref.construct;\nif (!freeze) {\n freeze = function freeze(x) {\n return x;\n };\n}\nif (!seal) {\n seal = function seal(x) {\n return x;\n };\n}\nif (!apply) {\n apply = function apply(func, thisArg) {\n for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n return func.apply(thisArg, args);\n };\n}\nif (!construct) {\n construct = function construct(Func) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n return new Func(...args);\n };\n}\nconst arrayForEach = unapply(Array.prototype.forEach);\nconst arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);\nconst arrayPop = unapply(Array.prototype.pop);\nconst arrayPush = unapply(Array.prototype.push);\nconst arraySplice = unapply(Array.prototype.splice);\nconst arrayIsArray = Array.isArray;\nconst stringToLowerCase = unapply(String.prototype.toLowerCase);\nconst stringToString = unapply(String.prototype.toString);\nconst stringMatch = unapply(String.prototype.match);\nconst stringReplace = unapply(String.prototype.replace);\nconst stringIndexOf = unapply(String.prototype.indexOf);\nconst stringTrim = unapply(String.prototype.trim);\nconst numberToString = unapply(Number.prototype.toString);\nconst booleanToString = unapply(Boolean.prototype.toString);\nconst bigintToString = typeof BigInt === 'undefined' ? null : unapply(BigInt.prototype.toString);\nconst symbolToString = typeof Symbol === 'undefined' ? null : unapply(Symbol.prototype.toString);\nconst objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);\nconst objectToString = unapply(Object.prototype.toString);\nconst regExpTest = unapply(RegExp.prototype.test);\nconst typeErrorCreate = unconstruct(TypeError);\n/**\n * Creates a new function that calls the given function with a specified thisArg and arguments.\n *\n * @param func - The function to be wrapped and called.\n * @returns A new function that calls the given function with a specified thisArg and arguments.\n */\nfunction unapply(func) {\n return function (thisArg) {\n if (thisArg instanceof RegExp) {\n thisArg.lastIndex = 0;\n }\n for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n args[_key3 - 1] = arguments[_key3];\n }\n return apply(func, thisArg, args);\n };\n}\n/**\n * Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n *\n * @param func - The constructor function to be wrapped and called.\n * @returns A new function that constructs an instance of the given constructor function with the provided arguments.\n */\nfunction unconstruct(Func) {\n return function () {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n return construct(Func, args);\n };\n}\n/**\n * Add properties to a lookup table\n *\n * @param set - The set to which elements will be added.\n * @param array - The array containing elements to be added to the set.\n * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n * @returns The modified set with added elements.\n */\nfunction addToSet(set, array) {\n let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n if (!arrayIsArray(array)) {\n return set;\n }\n let l = array.length;\n while (l--) {\n let element = array[l];\n if (typeof element === 'string') {\n const lcElement = transformCaseFunc(element);\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n element = lcElement;\n }\n }\n set[element] = true;\n }\n return set;\n}\n/**\n * Clean up an array to harden against CSPP\n *\n * @param array - The array to be cleaned.\n * @returns The cleaned version of the array\n */\nfunction cleanArray(array) {\n for (let index = 0; index < array.length; index++) {\n const isPropertyExist = objectHasOwnProperty(array, index);\n if (!isPropertyExist) {\n array[index] = null;\n }\n }\n return array;\n}\n/**\n * Shallow clone an object\n *\n * @param object - The object to be cloned.\n * @returns A new object that copies the original.\n */\nfunction clone(object) {\n const newObject = create(null);\n for (const _ref2 of entries(object)) {\n var _ref3 = _slicedToArray(_ref2, 2);\n const property = _ref3[0];\n const value = _ref3[1];\n const isPropertyExist = objectHasOwnProperty(object, property);\n if (isPropertyExist) {\n if (arrayIsArray(value)) {\n newObject[property] = cleanArray(value);\n } else if (value && typeof value === 'object' && value.constructor === Object) {\n newObject[property] = clone(value);\n } else {\n newObject[property] = value;\n }\n }\n }\n return newObject;\n}\n/**\n * Convert non-node values into strings without depending on direct property access.\n *\n * @param value - The value to stringify.\n * @returns A string representation of the provided value.\n */\nfunction stringifyValue(value) {\n switch (typeof value) {\n case 'string':\n {\n return value;\n }\n case 'number':\n {\n return numberToString(value);\n }\n case 'boolean':\n {\n return booleanToString(value);\n }\n case 'bigint':\n {\n return bigintToString ? bigintToString(value) : '0';\n }\n case 'symbol':\n {\n return symbolToString ? symbolToString(value) : 'Symbol()';\n }\n case 'undefined':\n {\n return objectToString(value);\n }\n case 'function':\n case 'object':\n {\n if (value === null) {\n return objectToString(value);\n }\n const valueAsRecord = value;\n const valueToString = lookupGetter(valueAsRecord, 'toString');\n if (typeof valueToString === 'function') {\n const stringified = valueToString(valueAsRecord);\n return typeof stringified === 'string' ? stringified : objectToString(stringified);\n }\n return objectToString(value);\n }\n default:\n {\n return objectToString(value);\n }\n }\n}\n/**\n * This method automatically checks if the prop is function or getter and behaves accordingly.\n *\n * @param object - The object to look up the getter function in its prototype chain.\n * @param prop - The property name for which to find the getter function.\n * @returns The getter function found in the prototype chain or a fallback function.\n */\nfunction lookupGetter(object, prop) {\n while (object !== null) {\n const desc = getOwnPropertyDescriptor(object, prop);\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n object = getPrototypeOf(object);\n }\n function fallbackValue() {\n return null;\n }\n return fallbackValue;\n}\nfunction isRegex(value) {\n try {\n regExpTest(value, '');\n return true;\n } catch (_unused) {\n return false;\n }\n}\n\nconst html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'search', 'section', 'select', 'shadow', 'slot', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);\nconst svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'enterkeyhint', 'exportparts', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'inputmode', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'part', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\nconst svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);\n// List of SVG elements that are disallowed by default.\n// We still need to know them so that we can do namespace\n// checks properly in case one wants to add them to\n// allow-list.\nconst svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\nconst mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']);\n// Similarly to SVG, we want to know all MathML elements,\n// even those that we disallow by default.\nconst mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\nconst text = freeze(['#text']);\n\nconst html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'command', 'commandfor', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'exportparts', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inert', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'part', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'slot', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns']);\nconst svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dominant-baseline', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'mask-type', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'pointer-events', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-orientation', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'vector-effect', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\nconst mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnalign', 'columnlines', 'columnspacing', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lquote', 'lspace', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\nconst xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\nconst MUSTACHE_EXPR = seal(/{{[\\w\\W]*|^[\\w\\W]*}}/g);\nconst ERB_EXPR = seal(/<%[\\w\\W]*|^[\\w\\W]*%>/g);\nconst TMPLIT_EXPR = seal(/\\${[\\w\\W]*/g);\nconst DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]+$/); // eslint-disable-line no-useless-escape\nconst ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\nconst IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n);\nconst IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\nconst ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n);\nconst DOCTYPE_NAME = seal(/^html$/i);\nconst CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\n// Markup-significant character probes used by _sanitizeElements.\n// Shared module-level instances are safe despite the sticky /g flags:\n// unapply() resets lastIndex for RegExp receivers before every call.\nconst ELEMENT_MARKUP_PROBE = seal(/<[/\\w!]/g);\nconst COMMENT_MARKUP_PROBE = seal(/<[/\\w]/g);\nconst FALLBACK_TAG_CLOSE = seal(/<\\/no(script|embed|frames)/i);\nconst SELF_CLOSING_TAG = seal(/\\/>/i);\n\n// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\nconst NODE_TYPE = {\n element: 1,\n attribute: 2,\n text: 3,\n cdataSection: 4,\n entityReference: 5,\n // Deprecated\n entityNode: 6,\n // Deprecated\n processingInstruction: 7,\n comment: 8,\n document: 9,\n documentType: 10,\n documentFragment: 11,\n notation: 12 // Deprecated\n};\n/* HTML-namespace elements whose child text nodes are serialized *literally*\n (unescaped) by the HTML fragment-serialization algorithm. Two reparse-mXSS\n shapes ride on that literal serialization:\n (a) an element child - a tree the HTML parser can never build, but the DOM\n API and an XML/XHTML parse can - after which a `</tag>`-bearing text\n sibling breaks the element open on reparse; and\n (b) text-only content that already carries the element's OWN end tag, e.g.\n `<style>...</style><img onerror=x>` built as a node, which the literal\n serializer emits verbatim for the HTML parser to re-open.\n Shape (a) is handled by the firstElementChild branch in _isUnsafeNode; shape\n (b) by the LITERAL_TEXT_CLOSE probe. Both read textContent (the raw-serialized\n form for these elements) rather than innerHTML, because an XML/XHTML working\n document serializes innerHTML with `<` escaped, which silently blinds the\n innerHTML-based probes (rule 1's second probe and FALLBACK_TAG_CLOSE) there.\n `script` is never allow-listed, but is kept here so the guard matches the\n serializer's own literal-text list exactly. */\nconst LITERAL_TEXT_ELEMENT_NAMES = ['style', 'script', 'xmp', 'iframe', 'noembed', 'noframes', 'plaintext', 'noscript'];\nconst LITERAL_TEXT_ELEMENTS = freeze(addToSet({}, LITERAL_TEXT_ELEMENT_NAMES));\n/* Per-element end-tag matcher. On an HTML reparse the ONLY token that\n terminates a literal-text element's raw content is its own end tag; a foreign\n literal-text close (e.g. `</xmp>` sitting inside `<style>`) does not break\n out, so matching is per-element, not a shared alternation. The lookahead\n requires an HTML tag-name terminator (whitespace, `/` or `>`) so a longer\n name such as `</styles` is not mistaken for `</style`. */\nconst LITERAL_TEXT_CLOSE = function () {\n const map = {};\n arrayForEach(LITERAL_TEXT_ELEMENT_NAMES, name => {\n map[name] = seal(new RegExp('</' + name + '(?=[\\\\t\\\\n\\\\f\\\\r />])', 'i'));\n });\n return freeze(map);\n}();\nconst getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n};\n/**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param trustedTypes The policy factory.\n * @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n * @return The policy created (or null, if Trusted Types\n * are not supported or creating the policy failed).\n */\nconst _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\n if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n }\n // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n let suffix = null;\n const ATTR_NAME = 'data-tt-policy-suffix';\n if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\n suffix = purifyHostElement.getAttribute(ATTR_NAME);\n }\n const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML(html) {\n return html;\n },\n createScriptURL(scriptUrl) {\n return scriptUrl;\n }\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n return null;\n }\n};\nconst _createHooksMap = function _createHooksMap() {\n return {\n afterSanitizeAttributes: [],\n afterSanitizeElements: [],\n afterSanitizeShadowDOM: [],\n beforeSanitizeAttributes: [],\n beforeSanitizeElements: [],\n beforeSanitizeShadowDOM: [],\n uponSanitizeAttribute: [],\n uponSanitizeElement: [],\n uponSanitizeShadowNode: []\n };\n};\n/**\n * Resolve a set-valued configuration option: a fresh set built from\n * cfg[key] when it is an own array property (seeded with a clone of\n * options.base when given, case-normalized via options.transform),\n * the fallback set otherwise.\n *\n * @param cfg the cloned, prototype-free configuration object\n * @param key the configuration property to read\n * @param fallback the set to use when the option is absent or not an array\n * @param options transform and optional base set to merge into\n * @returns the resolved set\n */\nconst _resolveSetOption = function _resolveSetOption(cfg, key, fallback, options) {\n return objectHasOwnProperty(cfg, key) && arrayIsArray(cfg[key]) ? addToSet(options.base ? clone(options.base) : {}, cfg[key], options.transform) : fallback;\n};\n/**\n * Resolve an object-valued configuration option: a prototype-free clone\n * of cfg[key] when it is an own, truthy object property, else a fresh\n * fallback built by makeFallback (fresh on every parse, so a previous\n * parse can never leak state into the next one).\n *\n * @param cfg the cloned, prototype-free configuration object\n * @param key the configuration property to read\n * @param makeFallback builds the fallback value when the option is absent\n * @returns the resolved object\n */\nconst _resolveObjectOption = function _resolveObjectOption(cfg, key, makeFallback) {\n const value = objectHasOwnProperty(cfg, key) ? cfg[key] : undefined;\n return value && typeof value === 'object' ? clone(value) : makeFallback();\n};\nfunction createDOMPurify() {\n let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n const DOMPurify = root => createDOMPurify(root);\n DOMPurify.version = '3.4.15';\n DOMPurify.removed = [];\n if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n return DOMPurify;\n }\n let document = window.document;\n const originalDocument = document;\n const currentScript = originalDocument.currentScript;\n window.DocumentFragment;\n const HTMLTemplateElement = window.HTMLTemplateElement,\n Node = window.Node,\n Element = window.Element,\n NodeFilter = window.NodeFilter,\n _window$NamedNodeMap = window.NamedNodeMap;\n _window$NamedNodeMap === void 0 ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap;\n window.HTMLFormElement;\n const DOMParser = window.DOMParser,\n trustedTypes = window.trustedTypes;\n const ElementPrototype = Element.prototype;\n const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n const remove = lookupGetter(ElementPrototype, 'remove');\n // Clobber-safe Attr-node removal. On an HTMLFormElement a descendant named\n // \"removeAttributeNode\" shadows the prototype method via\n // [LegacyOverrideBuiltIns], so element.removeAttributeNode(attr) throws.\n // Calling the cached Element.prototype method with the element as the\n // receiver removes the exact live Attr node regardless of the shadowing.\n const removeAttributeNode = lookupGetter(ElementPrototype, 'removeAttributeNode');\n const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n const getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n const getShadowRoot = lookupGetter(ElementPrototype, 'shadowRoot');\n const getAttributes = lookupGetter(ElementPrototype, 'attributes');\n const getNodeType = Node && Node.prototype ? lookupGetter(Node.prototype, 'nodeType') : null;\n const getNodeName = Node && Node.prototype ? lookupGetter(Node.prototype, 'nodeName') : null;\n const getOwnerDocument = Node && Node.prototype ? lookupGetter(Node.prototype, 'ownerDocument') : null;\n /* Clobber-safe nodeType / nodeName reads through the cached Node.prototype\n getters, with a direct-property fallback for environments that lack\n Node.prototype. Sites that need a different fallback (e.g. _isClobbered\n returns early on a null name) intentionally keep their own reads. */\n const _readNodeType = function _readNodeType(node) {\n return getNodeType ? getNodeType(node) : node.nodeType;\n };\n const _readNodeName = function _readNodeName(node) {\n return getNodeName ? getNodeName(node) : node.nodeName;\n };\n // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n if (typeof HTMLTemplateElement === 'function') {\n const template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n let trustedTypesPolicy;\n let emptyHTML = '';\n // The instance's own internal Trusted Types policy. Unlike a caller-supplied\n // `TRUSTED_TYPES_POLICY`, this is created at most once — Trusted Types throws\n // on duplicate policy names — and is the only policy allowed to persist\n // across configurations and survive `clearConfig()`.\n let defaultTrustedTypesPolicy;\n let defaultTrustedTypesPolicyResolved = false;\n // Tracks whether we are already inside a call to the configured Trusted Types\n // policy (`createHTML` or `createScriptURL`). If a supplied policy callback\n // itself calls `DOMPurify.sanitize` (the cause of #1422), `sanitize` would\n // re-enter the policy and recurse until the stack overflows. We detect that\n // re-entry and throw a clear, actionable error instead. The guard is shared\n // across both callbacks, because either one re-entering `sanitize` triggers\n // the same unbounded recursion.\n let IN_TRUSTED_TYPES_POLICY = 0;\n const _assertNotInTrustedTypesPolicy = function _assertNotInTrustedTypesPolicy() {\n if (IN_TRUSTED_TYPES_POLICY > 0) {\n throw typeErrorCreate('A configured TRUSTED_TYPES_POLICY callback (createHTML or ' + 'createScriptURL) must not call DOMPurify.sanitize, as that causes ' + 'infinite recursion. Do not pass a policy whose callbacks wrap ' + 'DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted ' + 'Types\" section of the README.');\n }\n };\n const _createTrustedHTML = function _createTrustedHTML(html) {\n _assertNotInTrustedTypesPolicy();\n IN_TRUSTED_TYPES_POLICY++;\n try {\n return trustedTypesPolicy.createHTML(html);\n } finally {\n IN_TRUSTED_TYPES_POLICY--;\n }\n };\n const _createTrustedScriptURL = function _createTrustedScriptURL(scriptUrl) {\n _assertNotInTrustedTypesPolicy();\n IN_TRUSTED_TYPES_POLICY++;\n try {\n return trustedTypesPolicy.createScriptURL(scriptUrl);\n } finally {\n IN_TRUSTED_TYPES_POLICY--;\n }\n };\n // Lazily resolve (and cache) the instance's internal default policy.\n // Resolution is attempted at most once: a successful `createPolicy` cannot be\n // repeated (Trusted Types throws on duplicate names), and a failed or\n // unsupported attempt must not be retried on every parse.\n const _getDefaultTrustedTypesPolicy = function _getDefaultTrustedTypesPolicy() {\n if (!defaultTrustedTypesPolicyResolved) {\n defaultTrustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);\n defaultTrustedTypesPolicyResolved = true;\n }\n return defaultTrustedTypesPolicy;\n };\n const _document = document,\n implementation = _document.implementation,\n createNodeIterator = _document.createNodeIterator,\n createDocumentFragment = _document.createDocumentFragment,\n getElementsByTagName = _document.getElementsByTagName;\n const importNode = originalDocument.importNode;\n let hooks = _createHooksMap();\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;\n const MUSTACHE_EXPR$1 = MUSTACHE_EXPR,\n ERB_EXPR$1 = ERB_EXPR,\n TMPLIT_EXPR$1 = TMPLIT_EXPR,\n DATA_ATTR$1 = DATA_ATTR,\n ARIA_ATTR$1 = ARIA_ATTR,\n IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE$1 = ATTR_WHITESPACE,\n CUSTOM_ELEMENT$1 = CUSTOM_ELEMENT;\n let IS_ALLOWED_URI$1 = IS_ALLOWED_URI;\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n /* allowed element names */\n let ALLOWED_TAGS = null;\n const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);\n /* Allowed attribute names */\n let ALLOWED_ATTR = null;\n const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);\n /*\n * Configure how DOMPurify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {\n tagNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n attributeNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n allowCustomizedBuiltInElements: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: false\n }\n }));\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n let FORBID_TAGS = null;\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n let FORBID_ATTR = null;\n /* Config object to store ADD_TAGS/ADD_ATTR functions (when used as functions) */\n const EXTRA_ELEMENT_HANDLING = Object.seal(create(null, {\n tagCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n attributeCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n }\n }));\n /* Decide if ARIA attributes are okay */\n let ALLOW_ARIA_ATTR = true;\n /* Decide if custom data attributes are okay */\n let ALLOW_DATA_ATTR = true;\n /* Decide if unknown protocols are okay */\n let ALLOW_UNKNOWN_PROTOCOLS = false;\n /* Decide if self-closing tags in attributes are allowed.\n * Usually removed due to a mXSS issue in jQuery 3.0 */\n let ALLOW_SELF_CLOSE_IN_ATTR = true;\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n let SAFE_FOR_TEMPLATES = false;\n /* Output should be safe even for XML used within HTML and alike.\n * This means, DOMPurify removes comments when containing risky content.\n */\n let SAFE_FOR_XML = true;\n /* Decide if document with <html>... should be returned */\n let WHOLE_DOCUMENT = false;\n /* Track whether config is already set on this instance of DOMPurify. */\n let SET_CONFIG = false;\n /* Pristine allowlist bindings captured at setConfig() time. On the\n * persistent-config path sanitize() restores the sets from these before\n * the per-walk hook clone-guard, so a hook's in-call widening cannot\n * carry across calls. Null until setConfig() is called; reset by\n * clearConfig(). */\n let SET_CONFIG_ALLOWED_TAGS = null;\n let SET_CONFIG_ALLOWED_ATTR = null;\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n let FORCE_BODY = false;\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n let RETURN_DOM = false;\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n let RETURN_DOM_FRAGMENT = false;\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n let RETURN_TRUSTED_TYPE = false;\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n let SANITIZE_DOM = true;\n /* Achieve full DOM Clobbering protection by isolating the namespace of named\n * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n *\n * HTML/DOM spec rules that enable DOM Clobbering:\n * - Named Access on Window (§7.3.3)\n * - DOM Tree Accessors (§3.1.5)\n * - Form Element Parent-Child Relations (§4.10.3)\n * - Iframe srcdoc / Nested WindowProxies (§4.8.5)\n * - HTMLCollection (§4.2.10.2)\n *\n * Namespace isolation is implemented by prefixing `id` and `name` attributes\n * with a constant string, i.e., `user-content-`\n */\n let SANITIZE_NAMED_PROPS = false;\n const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n /* Keep element content when removing element? */\n let KEEP_CONTENT = true;\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n let IN_PLACE = false;\n /* Allow usage of profiles like html, svg and mathMl */\n let USE_PROFILES = {};\n /* Tags to ignore content of when KEEP_CONTENT is true */\n let FORBID_CONTENTS = null;\n const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script',\n // <selectedcontent> mirrors the selected <option>'s subtree, cloned by\n // the UA (customizable <select>) — including any on* handlers — and the\n // engine re-mirrors synchronously whenever a removal changes which\n // option/selectedcontent is current, even inside DOMPurify's inert\n // DOMParser document. Hoisting its children on removal re-inserts a fresh\n // mirror target ahead of the walk, which the engine refills, looping\n // forever (DoS) and amplifying output. Dropping its content on removal\n // (rather than hoisting) breaks that cascade; the content is a duplicate\n // of the option, which is sanitized on its own. See campaign-3 F1/F6.\n 'selectedcontent', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n /* Tags that are safe for data: URIs */\n let DATA_URI_TAGS = null;\n const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n /* Attributes safe for values like \"javascript:\" */\n let URI_SAFE_ATTRIBUTES = null;\n const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n let NAMESPACE = HTML_NAMESPACE;\n let IS_EMPTY_INPUT = false;\n /* Allowed XHTML+XML namespaces */\n let ALLOWED_NAMESPACES = null;\n const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);\n const DEFAULT_MATHML_TEXT_INTEGRATION_POINTS = freeze(['mi', 'mo', 'mn', 'ms', 'mtext']);\n let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS);\n const DEFAULT_HTML_INTEGRATION_POINTS = freeze(['annotation-xml']);\n let HTML_INTEGRATION_POINTS = addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS);\n // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erroneously deleted from\n // HTML namespace.\n const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n /* Parsing of strict XHTML documents */\n let PARSER_MEDIA_TYPE = null;\n const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n let transformCaseFunc = null;\n /* Keep a reference to config to pass to hooks */\n let CONFIG = null;\n /* Ideally, do not touch anything below this line */\n /* ______________________________________________ */\n const formElement = document.createElement('form');\n const isRegexOrFunction = function isRegexOrFunction(testValue) {\n return testValue instanceof RegExp || testValue instanceof Function;\n };\n /**\n * _parseConfig\n *\n * @param cfg optional config literal\n */\n // eslint-disable-next-line complexity\n const _parseConfig = function _parseConfig() {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n /* Shield configuration object from tampering */\n if (!cfg || typeof cfg !== 'object') {\n cfg = {};\n }\n /* Shield configuration object from prototype pollution */\n cfg = clone(cfg);\n PARSER_MEDIA_TYPE =\n // eslint-disable-next-line unicorn/prefer-includes\n SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;\n // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;\n /* Set configuration parameters */\n ALLOWED_TAGS = _resolveSetOption(cfg, 'ALLOWED_TAGS', DEFAULT_ALLOWED_TAGS, {\n transform: transformCaseFunc\n });\n ALLOWED_ATTR = _resolveSetOption(cfg, 'ALLOWED_ATTR', DEFAULT_ALLOWED_ATTR, {\n transform: transformCaseFunc\n });\n ALLOWED_NAMESPACES = _resolveSetOption(cfg, 'ALLOWED_NAMESPACES', DEFAULT_ALLOWED_NAMESPACES, {\n transform: stringToString\n });\n URI_SAFE_ATTRIBUTES = _resolveSetOption(cfg, 'ADD_URI_SAFE_ATTR', DEFAULT_URI_SAFE_ATTRIBUTES, {\n transform: transformCaseFunc,\n base: DEFAULT_URI_SAFE_ATTRIBUTES\n });\n DATA_URI_TAGS = _resolveSetOption(cfg, 'ADD_DATA_URI_TAGS', DEFAULT_DATA_URI_TAGS, {\n transform: transformCaseFunc,\n base: DEFAULT_DATA_URI_TAGS\n });\n FORBID_CONTENTS = _resolveSetOption(cfg, 'FORBID_CONTENTS', DEFAULT_FORBID_CONTENTS, {\n transform: transformCaseFunc\n });\n FORBID_TAGS = _resolveSetOption(cfg, 'FORBID_TAGS', clone({}), {\n transform: transformCaseFunc\n });\n FORBID_ATTR = _resolveSetOption(cfg, 'FORBID_ATTR', clone({}), {\n transform: transformCaseFunc\n });\n USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES') ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === 'object' ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n IS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI; // Default regexp\n NAMESPACE = typeof cfg.NAMESPACE === 'string' ? cfg.NAMESPACE : HTML_NAMESPACE; // Default HTML namespace\n MATHML_TEXT_INTEGRATION_POINTS = _resolveObjectOption(cfg, 'MATHML_TEXT_INTEGRATION_POINTS', () => addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS) // Default built-in map\n );\n HTML_INTEGRATION_POINTS = _resolveObjectOption(cfg, 'HTML_INTEGRATION_POINTS', () => addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS) // Default built-in map\n );\n const customElementHandling = _resolveObjectOption(cfg, 'CUSTOM_ELEMENT_HANDLING', () => create(null));\n CUSTOM_ELEMENT_HANDLING = create(null);\n if (objectHasOwnProperty(customElementHandling, 'tagNameCheck') && isRegexOrFunction(customElementHandling.tagNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck; // Default undefined\n }\n if (objectHasOwnProperty(customElementHandling, 'attributeNameCheck') && isRegexOrFunction(customElementHandling.attributeNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck; // Default undefined\n }\n if (objectHasOwnProperty(customElementHandling, 'allowCustomizedBuiltInElements') && typeof customElementHandling.allowCustomizedBuiltInElements === 'boolean') {\n CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements; // Default undefined\n }\n seal(CUSTOM_ELEMENT_HANDLING);\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n /* Parse profile info */\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, text);\n ALLOWED_ATTR = create(null);\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html$1);\n addToSet(ALLOWED_ATTR, html);\n }\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, svg$1);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, mathMl$1);\n addToSet(ALLOWED_ATTR, mathMl);\n addToSet(ALLOWED_ATTR, xml);\n }\n }\n /* Always reset function-based ADD_TAGS / ADD_ATTR checks to prevent\n * leaking across calls when switching from function to array config */\n EXTRA_ELEMENT_HANDLING.tagCheck = null;\n EXTRA_ELEMENT_HANDLING.attributeCheck = null;\n /* Merge configuration parameters */\n if (objectHasOwnProperty(cfg, 'ADD_TAGS')) {\n if (typeof cfg.ADD_TAGS === 'function') {\n EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;\n } else if (arrayIsArray(cfg.ADD_TAGS)) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n }\n }\n if (objectHasOwnProperty(cfg, 'ADD_ATTR')) {\n if (typeof cfg.ADD_ATTR === 'function') {\n EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;\n } else if (arrayIsArray(cfg.ADD_ATTR)) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n }\n }\n if (objectHasOwnProperty(cfg, 'ADD_FORBID_CONTENTS') && arrayIsArray(cfg.ADD_FORBID_CONTENTS)) {\n if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n FORBID_CONTENTS = clone(FORBID_CONTENTS);\n }\n addToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc);\n }\n /* Add #text in case KEEP_CONTENT is set to true */\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n }\n // Re-derive the active Trusted Types policy from this configuration on\n // every parse. The active policy must never be sticky closure state that\n // outlives the config that set it: a caller-supplied policy left in place\n // after `clearConfig()` — or after a later call that supplied none, or\n // `TRUSTED_TYPES_POLICY: null` — could sign a subsequent \"default\"\n // `RETURN_TRUSTED_TYPE` result with a foreign, possibly unsafe policy.\n // See GHSA-vxr8-fq34-vvx9.\n if (cfg.TRUSTED_TYPES_POLICY) {\n if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.');\n }\n if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.');\n }\n // A caller-supplied policy applies to this configuration only.\n const previousTrustedTypesPolicy = trustedTypesPolicy;\n trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;\n // Sign local variables required by `sanitize`. If the supplied policy's\n // `createHTML` is circular (i.e. it calls `DOMPurify.sanitize`), this\n // throws via the re-entrancy guard. Restore the previous policy first so\n // the instance is not left in a poisoned state. See #1422.\n try {\n emptyHTML = _createTrustedHTML('');\n } catch (error) {\n trustedTypesPolicy = previousTrustedTypesPolicy;\n throw error;\n }\n } else if (cfg.TRUSTED_TYPES_POLICY === null) {\n // Explicit opt-out for this call: perform no Trusted Types signing and\n // create nothing (so a strict `trusted-types` CSP that disallows a\n // `dompurify` policy can still call `sanitize` from inside its own\n // policy — see #1422). Resetting to `undefined` rather than a sticky\n // `null` also drops any previously retained caller policy, so it cannot\n // resurface on a later call, while still allowing the next config-less\n // call to restore the internal default policy. See GHSA-vxr8-fq34-vvx9.\n trustedTypesPolicy = undefined;\n emptyHTML = '';\n } else {\n // No policy supplied: keep the currently active policy if one is set — a\n // previously supplied policy is intentionally sticky across config-less\n // calls — otherwise fall back to the instance's own internal policy,\n // created at most once. (A policy supplied for a *single* call still\n // lingers by design; what must not linger is a policy whose configuration\n // has been torn down via `clearConfig()`, which restores the default.)\n if (trustedTypesPolicy === undefined) {\n trustedTypesPolicy = _getDefaultTrustedTypesPolicy();\n }\n // Sign internal variables only when a policy is active. A falsy policy\n // (Trusted Types unsupported, creation failed, or an explicit opt-out)\n // leaves `emptyHTML` as a plain string, so we never call `.createHTML` on\n // a non-policy and throw. See #1422.\n if (trustedTypesPolicy && typeof emptyHTML === 'string') {\n emptyHTML = _createTrustedHTML('');\n }\n }\n // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n if (freeze) {\n freeze(cfg);\n }\n CONFIG = cfg;\n };\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);\n const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);\n /**\n * Namespace rules for an element in the SVG namespace.\n *\n * @param tagName the element's lowercase tag name\n * @param parent the (possibly simulated) parent node\n * @param parentTagName the parent's lowercase tag name\n * @returns true if a spec-compliant parser could produce this element\n */\n const _checkSvgNamespace = function _checkSvgNamespace(tagName, parent, parentTagName) {\n // The only way to switch from HTML namespace to SVG\n // is via <svg>. If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'svg';\n }\n // The only way to switch from MathML to SVG is via <svg>\n // if the parent is either <annotation-xml> or a MathML\n // text integration point.\n if (parent.namespaceURI === MATHML_NAMESPACE) {\n return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n }\n // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\n return Boolean(ALL_SVG_TAGS[tagName]);\n };\n /**\n * Namespace rules for an element in the MathML namespace.\n *\n * @param tagName the element's lowercase tag name\n * @param parent the (possibly simulated) parent node\n * @param parentTagName the parent's lowercase tag name\n * @returns true if a spec-compliant parser could produce this element\n */\n const _checkMathMlNamespace = function _checkMathMlNamespace(tagName, parent, parentTagName) {\n // The only way to switch from HTML namespace to MathML\n // is via <math>. If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'math';\n }\n // The only way to switch from SVG to MathML is via\n // <math> and HTML integration points\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n }\n // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\n return Boolean(ALL_MATHML_TAGS[tagName]);\n };\n /**\n * Namespace rules for an element in the HTML namespace.\n *\n * @param tagName the element's lowercase tag name\n * @param parent the (possibly simulated) parent node\n * @param parentTagName the parent's lowercase tag name\n * @returns true if a spec-compliant parser could produce this element\n */\n const _checkHtmlNamespace = function _checkHtmlNamespace(tagName, parent, parentTagName) {\n // The only way to switch from SVG to HTML is via\n // HTML integration points, and from MathML to HTML\n // is via MathML text integration points\n if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n };\n /**\n * @param element a DOM element whose namespace is being checked\n * @returns Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n const _checkValidNamespace = function _checkValidNamespace(element) {\n let parent = getParentNode(element);\n // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: NAMESPACE,\n tagName: 'template'\n };\n }\n const tagName = stringToLowerCase(element.tagName);\n const parentTagName = stringToLowerCase(parent.tagName);\n if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n return false;\n }\n if (element.namespaceURI === SVG_NAMESPACE) {\n return _checkSvgNamespace(tagName, parent, parentTagName);\n }\n if (element.namespaceURI === MATHML_NAMESPACE) {\n return _checkMathMlNamespace(tagName, parent, parentTagName);\n }\n if (element.namespaceURI === HTML_NAMESPACE) {\n return _checkHtmlNamespace(tagName, parent, parentTagName);\n }\n // For XHTML and XML documents that support custom namespaces\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {\n return true;\n }\n // The code should never reach this place (this means\n // that the element somehow got namespace that is not\n // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\n // Return false just in case.\n return false;\n };\n /**\n * _forceRemove\n *\n * @param node a DOM node\n */\n const _forceRemove = function _forceRemove(node) {\n arrayPush(DOMPurify.removed, {\n element: node\n });\n try {\n // eslint-disable-next-line unicorn/prefer-dom-node-remove\n getParentNode(node).removeChild(node);\n } catch (_) {\n /* The normal detach failed — this is reached for a parentless node\n (getParentNode() is null, so .removeChild throws). Element.prototype\n .remove() is itself a spec no-op on a parentless node, so a recorded\n \"removal\" would otherwise hand the caller back an intact,\n payload-bearing node (e.g. a detached IN_PLACE root the mXSS canary or\n the style-with-element-child rule decided to kill). Fail closed by\n throwing — exactly as a clobbered root does at the IN_PLACE entry —\n rather than trying to \"neutralize\" the node via its own methods.\n Neutralizing would mean calling getAttributeNames()/removeAttribute()\n on the node, both of which a <form> root can clobber via a named child\n (and _isClobbered does not even probe getAttributeNames), so the\n neutralize step could itself be silently defeated, leaving the payload\n intact. A throw touches only the cached, clobber-safe remove() and\n getParentNode(). Generalizes GHSA-r47g-fvhr-h676 (clobbered-form root)\n to every root-kill reason. REPORT-3.\n This lives inside the catch, so it never fires for a normally-removed\n in-tree node: those have a parent, removeChild() succeeds, and the\n catch is not entered. Only a kept (parentless) root reaches here. */\n remove(node);\n if (!getParentNode(node)) {\n throw typeErrorCreate('a node selected for removal could not be detached from its tree ' + 'and cannot be safely returned; refusing to sanitize in place');\n }\n }\n };\n /**\n * _stripAttributeNode\n *\n * Remove a single Attr node case/namespace-exactly on an attribute-teardown\n * path. Name-based removeAttribute() ASCII-lowercases its lookup key for an\n * HTML element in an HTML document and so silently misses a case-preserved\n * handler (e.g. `ONERROR` off an XML/XHTML import) - the same defect\n * _removeAttribute() was fixed for, which a name-based call would reintroduce\n * on these IN_PLACE teardown paths. Unlike _removeAttribute this does not\n * record into DOMPurify.removed: the neutralize passes intentionally do not\n * book-keep. A clobbered/detached node falls back to best-effort name-based\n * removal.\n *\n * @param element the element to strip the attribute from\n * @param attribute the Attr node to remove\n * @param name the attribute's name, for the fallback path\n */\n const _stripAttributeNode = function _stripAttributeNode(element, attribute, name) {\n try {\n removeAttributeNode(element, attribute);\n } catch (_) {\n try {\n element.removeAttribute(name);\n } catch (_) {}\n }\n };\n /**\n * _neutralizeRoot\n *\n * Fail-closed teardown of an in-place root after the sanitize walk aborts\n * (campaign-3 F2). An internal throw mid-walk — e.g. a page-registered\n * custom element's reaction detaches a node so `_forceRemove`'s deliberate\n * parentless guard throws, or any other re-entrant engine mutation — would\n * otherwise leave the caller's *live* tree half-sanitized, with everything\n * after the abort point still carrying its handlers. There is no safe way\n * to resume the walk (the tree mutated under us), so we strip the root bare:\n * remove every child and every attribute, then let the caller's catch see\n * the original error. Clobber-safe (cached `remove`/`childNodes`/`attributes`\n * getters; the root was already clobber-pre-flighted at the IN_PLACE entry).\n *\n * @param root the in-place root to empty\n */\n const _neutralizeRoot = function _neutralizeRoot(root) {\n /* Strip every disallowed attribute (on* handlers included) off the whole\n subtree BEFORE detaching anything. Detaching first would hand back\n handler-bearing originals (e.g. an already-loading `<img onerror>`)\n whose queued resource event still fires in page scope after we throw.\n Clobber-safe reads; a doomed clobbered node's own attributes are\n irrelevant while its non-clobbered descendants are reached and scrubbed. */\n _neutralizeSubtree(root);\n const childNodes = getChildNodes(root);\n if (childNodes) {\n const snapshot = [];\n arrayForEach(childNodes, child => {\n arrayPush(snapshot, child);\n });\n arrayForEach(snapshot, child => {\n try {\n remove(child);\n } catch (_) {\n /* Best-effort teardown; a still-attached child is handled below */\n }\n });\n }\n const attributes = getAttributes(root);\n if (attributes) {\n for (let i = attributes.length - 1; i >= 0; --i) {\n const attribute = attributes[i];\n const name = attribute && attribute.name;\n if (typeof name === 'string') {\n _stripAttributeNode(root, attribute, name);\n }\n }\n }\n };\n /**\n * _removeAttribute\n *\n * Name-based getAttributeNode()/removeAttribute() ASCII-lowercase their\n * lookup key for HTML elements in an HTML document, so they silently miss an\n * attribute whose stored qualified name still contains uppercase ASCII\n * letters. That happens when the node came from a case-preserving source\n * (an XML/XHTML document imported via importNode(), or createAttributeNS()),\n * where e.g. `ONERROR` survives the walk: the policy check lowercases to\n * `onerror` and rejects it, but `removeAttribute('ONERROR')` looks up\n * `onerror` and finds nothing. Remove the exact Attr node instead, which is\n * case- and namespace-exact, and fall back to name-based removal only when\n * the caller could not supply the node.\n *\n * @param name an Attribute name\n * @param element a DOM node\n * @param attr the exact Attr node to remove, when the caller has it\n */\n const _removeAttribute = function _removeAttribute(name, element, attr) {\n if (!attr) {\n try {\n attr = element.getAttributeNode(name);\n } catch (_) {\n attr = null;\n }\n }\n arrayPush(DOMPurify.removed, {\n attribute: attr || null,\n from: element\n });\n try {\n if (attr) {\n removeAttributeNode(element, attr);\n } else {\n element.removeAttribute(name);\n }\n } catch (_) {\n /* Clobbered or already-detached node - best-effort fall back to a\n name-based removal so the \"is\" handling below still runs. Note this\n fallback ASCII-lowercases its lookup key in an HTML document and so\n cannot reach a case-preserved attribute name; the cached\n removeAttributeNode() above is what removes those, and a clobbered\n form is already removed wholesale by _isClobbered() before reaching\n here. */\n try {\n element.removeAttribute(name);\n } catch (_) {}\n }\n // We void attribute values for unremovable \"is\" attributes\n if (name === 'is') {\n if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n try {\n _forceRemove(element);\n } catch (_) {}\n } else {\n try {\n element.setAttribute(name, '');\n } catch (_) {}\n }\n }\n };\n /**\n * _stripDisallowedAttributes\n *\n * Removes every attribute the active configuration does not allow from a\n * single element, using the same allowlist as the main attribute pass (so\n * `on*` handlers go, but no `/^on/` blocklist is introduced). Used only to\n * neutralise nodes that are being discarded from an in-place tree.\n *\n * @param element the element to strip\n */\n const _stripDisallowedAttributes = function _stripDisallowedAttributes(element) {\n const attributes = getAttributes(element);\n if (!attributes) {\n return;\n }\n for (let i = attributes.length - 1; i >= 0; --i) {\n const attribute = attributes[i];\n const name = attribute && attribute.name;\n if (typeof name !== 'string' || ALLOWED_ATTR[transformCaseFunc(name)]) {\n continue;\n }\n _stripAttributeNode(element, attribute, name);\n }\n };\n /**\n * _neutralizeSubtree\n *\n * Completes the audit-5 F1 fix across every removal path. The KEEP_CONTENT\n * move-hoist neutralises only disallowed-tag removals; clobber, mXSS-canary,\n * namespace, comment, processing-instruction and KEEP_CONTENT:false removals\n * all drop their subtree wholesale via `_forceRemove`. On the IN_PLACE path\n * those dropped nodes are detached from the caller's LIVE tree but a\n * handler-bearing original among them (an `<img onerror>`/`<video>` that was\n * loading) keeps its queued resource event, which fires in page scope after\n * sanitize returns. This walks a removed subtree and strips every attribute\n * the active configuration does not allow — so `on*` handlers are cancelled\n * through the SAME allowlist that governs kept nodes, not a separate `/^on/`\n * blocklist. Run synchronously before sanitize returns, i.e. before any\n * queued event can fire. Hook-free by design: these nodes leave the output,\n * so firing attribute hooks for them would be surprising. Clobber-safe reads;\n * a doomed clobbered node may shadow `removeAttribute` (its own attributes are\n * irrelevant — it is discarded — while its non-clobbered descendants, e.g.\n * the `<img>`, are reached and scrubbed).\n *\n * @param root the root of a removed subtree to neutralise\n */\n const _neutralizeSubtree = function _neutralizeSubtree(root) {\n const stack = [root];\n while (stack.length > 0) {\n const node = stack.pop();\n const nodeType = _readNodeType(node);\n if (nodeType === NODE_TYPE.element) {\n _stripDisallowedAttributes(node);\n }\n const childNodes = getChildNodes(node);\n if (childNodes) {\n for (let i = childNodes.length - 1; i >= 0; --i) {\n stack.push(childNodes[i]);\n }\n }\n }\n };\n /**\n * _neutralizePatchLinkage\n *\n * IN_PLACE entry pre-pass (declarative-partial-updates / streaming\n * hardening, https://github.com/WICG/declarative-partial-updates).\n *\n * The main walk strips patch linkage (`for`/`patchsrc`) and removes range\n * markers (PIs / markup comments) node-by-node, in document order, AS it\n * reaches each node. On a live in-place root that leaves a window: from the\n * moment the root is connected until the walk arrives at a given node, that\n * node's linkage is live. A patch applied on connection/stream can fire as\n * a microtask during the walk and inject or teleport an unsanitized DOM\n * range into a region the iterator has already passed and will not revisit,\n * so the post-return \"tree is sanitized\" contract is violated. Sweep the\n * whole tree once up front and sever every linkage before the walk begins,\n * closing that window.\n *\n * This CANNOT undo a patch that already fired before sanitize ran — that is\n * the irreducible \"do not IN_PLACE a live-connected attacker tree\" caveat —\n * but it closes everything from sanitize-start onward. Gated on SAFE_FOR_XML\n * to group with the rest of the declarative-partial-updates handling and\n * stay overridable, consistent with the codebase.\n *\n * Clobber-safe traversal (cached childNodes getter); per-node try/catch so a\n * clobbered root cannot defeat the sweep of its non-clobbered descendants.\n *\n * NOTE (pending real-Chrome confirmation, see test/declarative-patch-probe\n * .html Q1): this mirrors the existing policy of keeping `for` on\n * <label>/<output>. If the shipping feature can drive a patch through a\n * surviving `for`-on-label/output + `id` pair, this pre-pass and the\n * attribute check at _isBasicCustomElement's caller must additionally drop\n * that pair on the IN_PLACE path. Left as-is until the taxonomy is verified.\n *\n * @param root the in-place root to sweep\n */\n /**\n * Central policy for declarative-partial-updates patch-linkage attributes,\n * shared by the _neutralizePatchLinkage pre-pass and _isValidAttribute so\n * the two sites cannot drift: `patchsrc` always links, `for` links\n * everywhere except on <label>/<output>, and the whole policy is gated on\n * SAFE_FOR_XML (see the rationale block in _isValidAttribute).\n *\n * @param lcName the transformCaseFunc'd attribute name\n * @param lcTag the transformCaseFunc'd tag name of the carrying element\n * @return true if the attribute is patch linkage and must be dropped\n */\n const _isPatchLinkageAttribute = function _isPatchLinkageAttribute(lcName, lcTag) {\n if (!SAFE_FOR_XML) {\n return false;\n }\n if (lcName === 'patchsrc') {\n return true;\n }\n return lcName === 'for' && lcTag !== 'label' && lcTag !== 'output';\n };\n const _neutralizePatchLinkage = function _neutralizePatchLinkage(root) {\n if (!SAFE_FOR_XML) {\n return;\n }\n const stack = [root];\n while (stack.length > 0) {\n const node = stack.pop();\n const nodeType = _readNodeType(node);\n /* Remove range markers (the target side of a patch linkage): every\n processing instruction, and any markup-bearing comment. */\n if (nodeType === NODE_TYPE.processingInstruction || nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, node.data)) {\n try {\n remove(node);\n } catch (_) {\n /* Best-effort */\n }\n continue;\n }\n /* Strip patch-source attributes (the source side) off elements. */\n if (nodeType === NODE_TYPE.element) {\n const element = node;\n const lcTag = transformCaseFunc(_readNodeName(node));\n try {\n if (element.hasAttribute && element.hasAttribute('patchsrc')) {\n element.removeAttribute('patchsrc');\n }\n if (element.hasAttribute && element.hasAttribute('for') && _isPatchLinkageAttribute('for', lcTag)) {\n element.removeAttribute('for');\n }\n } catch (_) {\n /* Clobbered removeAttribute/hasAttribute on a doomed node — ignore */\n }\n }\n const childNodes = getChildNodes(node);\n if (childNodes) {\n for (let i = childNodes.length - 1; i >= 0; --i) {\n stack.push(childNodes[i]);\n }\n }\n }\n };\n /**\n * _initDocument\n *\n * @param dirty - a string of dirty markup\n * @return a DOM, filled with the dirty markup\n */\n const _initDocument = function _initDocument(dirty) {\n /* Create a HTML document */\n let doc = null;\n let leadingWhitespace = null;\n if (FORCE_BODY) {\n dirty = '<remove></remove>' + dirty;\n } else {\n /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n const matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n leadingWhitespace = matches && matches[0];\n }\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {\n // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n dirty = '<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>' + dirty + '</body></html>';\n }\n const dirtyPayload = trustedTypesPolicy ? _createTrustedHTML(dirty) : dirty;\n /*\n * Use the DOMParser API by default, fallback later if needs be\n * DOMParser not work for svg when has multiple root element.\n */\n if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n } catch (_) {}\n }\n /* Use createHTMLDocument in case DOMParser is not available */\n if (!doc || !doc.documentElement) {\n doc = implementation.createDocument(NAMESPACE, 'template', null);\n try {\n doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n } catch (_) {\n // Syntax error if dirtyPayload is invalid xml\n }\n }\n const body = doc.body || doc.documentElement;\n if (dirty && leadingWhitespace) {\n body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n }\n /* Work on whole document or just its body */\n if (NAMESPACE === HTML_NAMESPACE) {\n return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n }\n return WHOLE_DOCUMENT ? doc.documentElement : body;\n };\n /**\n * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\n *\n * @param root The root element or node to start traversing on.\n * @return The created NodeIterator\n */\n const _createNodeIterator = function _createNodeIterator(root) {\n /* Read ownerDocument through the cached Node.prototype getter, never the\n direct property. HTMLFormElement has [LegacyOverrideBuiltIns], so a\n clobbering child (<input name=\"ownerDocument\"> or a form-associated\n external input) shadows the prototype getter and makes a direct read\n return that <input>. createNodeIterator.call(<input>, ...) then throws\n \"Illegal invocation\", and on the IN_PLACE path that throw lands before\n the walk's fail-closed barrier - leaving the caller's live tree, with\n any already-armed handler in it, un-neutralized. The cached getter\n returns the real Document regardless of the clobber. */\n const doc = getOwnerDocument ? getOwnerDocument(root) : root.ownerDocument;\n return createNodeIterator.call(doc || root, root,\n // eslint-disable-next-line no-bitwise\n NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);\n };\n /**\n * Replace template expression syntax (mustache, ERB, template\n * literal) with a space; shared by all SAFE_FOR_TEMPLATES scrub\n * sites. Order matters: mustache, then ERB, then template literal.\n *\n * @param value the string to scrub\n * @returns the scrubbed string\n */\n const _stripTemplateExpressions = function _stripTemplateExpressions(value) {\n value = stringReplace(value, MUSTACHE_EXPR$1, ' ');\n value = stringReplace(value, ERB_EXPR$1, ' ');\n value = stringReplace(value, TMPLIT_EXPR$1, ' ');\n return value;\n };\n /**\n * Strip template-engine expressions ({{...}}, ${...}, <%...%>) from the\n * character data of an element subtree. Used as the final safety net for\n * SAFE_FOR_TEMPLATES on every DOM-returning code path so that expressions\n * which only form after text-node normalization (e.g. fragments split across\n * stripped elements) cannot survive into a template-evaluating framework.\n *\n * Walks text/comment/CDATA/processing-instruction nodes and mutates `.data`\n * in place rather than round-tripping through innerHTML. This preserves\n * descendant node references (important for IN_PLACE callers), avoids a\n * serialize/reparse cycle, and reads literal character data — which means\n * `<%...%>` in text content matches the ERB regex against its real bytes\n * instead of the HTML-entity-escaped form innerHTML would produce.\n *\n * Attribute values are not visited here; SAFE_FOR_TEMPLATES handling for\n * attributes is performed during the per-node `_sanitizeAttributes` pass.\n *\n * @param node The root element whose character data should be scrubbed.\n */\n const _scrubTemplateExpressions2 = function _scrubTemplateExpressions(node) {\n var _node$querySelectorAl;\n node.normalize();\n /* Clobber-safe ownerDocument read, same reasoning as _createNodeIterator:\n under SAFE_FOR_TEMPLATES this runs on the live IN_PLACE root, which may\n carry a form-named-getter override of ownerDocument. */\n const doc = getOwnerDocument ? getOwnerDocument(node) : node.ownerDocument;\n const walker = createNodeIterator.call(doc || node, node,\n // eslint-disable-next-line no-bitwise\n NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_PROCESSING_INSTRUCTION, null);\n let currentNode = walker.nextNode();\n while (currentNode) {\n currentNode.data = _stripTemplateExpressions(currentNode.data);\n currentNode = walker.nextNode();\n }\n // NodeIterator does not descend into <template>.content per the DOM spec,\n // so we must explicitly recurse into each template's content fragment,\n // mirroring the approach used by _sanitizeShadowDOM.\n const templates = (_node$querySelectorAl = node.querySelectorAll) === null || _node$querySelectorAl === void 0 ? void 0 : _node$querySelectorAl.call(node, 'template');\n if (templates) {\n arrayForEach(templates, tmpl => {\n if (_isDocumentFragment(tmpl.content)) {\n _scrubTemplateExpressions2(tmpl.content);\n }\n });\n }\n };\n /**\n * _isClobbered\n *\n * Detect DOM-clobbering on HTMLFormElement nodes. Form is the only HTML\n * interface with [LegacyOverrideBuiltIns]; a descendant element with a\n * `name` attribute matching a prototype property shadows that property\n * on direct reads. We use this check at the IN_PLACE entry-point and\n * during attribute sanitization to refuse clobbered forms.\n *\n * @param element element to check for clobbering attacks\n * @return true if clobbered, false if safe\n */\n const _isClobbered = function _isClobbered(element) {\n // Realm-independent tag-name probe. If we can't determine the tag\n // name at all, we can't reason about clobbering — return false\n // (the caller's other defences still apply).\n const realTagName = getNodeName ? getNodeName(element) : null;\n if (typeof realTagName !== 'string') {\n return false;\n }\n if (transformCaseFunc(realTagName) !== 'form') {\n return false;\n }\n return typeof element.nodeName !== 'string' || typeof element.textContent !== 'string' || typeof element.removeChild !== 'function' ||\n // Realm-safe NamedNodeMap detection: equality against the cached\n // prototype getter. Clobbered .attributes (e.g. <input name=\"attributes\">)\n // makes the direct read diverge from the cached read; a clean form\n // (same-realm OR foreign-realm) has both reads pointing at the same\n // canonical NamedNodeMap.\n element.attributes !== getAttributes(element) || typeof element.removeAttribute !== 'function' ||\n // A form descendant named \"removeAttributeNode\" or \"getAttributeNode\"\n // shadows these Attr-node methods via [LegacyOverrideBuiltIns].\n // _removeAttribute() / _stripAttributeNode() reach for\n // element.removeAttributeNode(attr) first; when it is shadowed the call\n // throws and the name-based fallback element.removeAttribute(name)\n // ASCII-lowercases its lookup key in an HTML document, silently missing\n // a case-preserved event-handler attribute (e.g. an ONANIMATIONSTART\n // that reached the sanitizer through an XML/XHTML parse). Flag the form\n // so it is removed wholesale, exactly as for the other shadowed methods.\n typeof element.removeAttributeNode !== 'function' || typeof element.getAttributeNode !== 'function' || typeof element.setAttribute !== 'function' || typeof element.namespaceURI !== 'string' || typeof element.insertBefore !== 'function' || typeof element.hasChildNodes !== 'function' ||\n // NodeType clobbering probe. Cached Node.prototype.nodeType getter\n // returns the integer 1 for any Element regardless of realm; direct\n // read on a clobbered form (e.g. <input name=\"nodeType\">) returns\n // the named child element. Cheap addition — nodeType is read from\n // an internal slot, no serialization cost — and removes a residual\n // clobbering surface used by several mXSS / PI / comment branches\n // in _sanitizeElements that compare currentNode.nodeType directly.\n element.nodeType !== getNodeType(element) ||\n // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named\n // \"childNodes\" shadows the prototype getter. Direct reads of\n // form.childNodes from a clobbered form return the named child\n // instead of the real NodeList, so any walk that reads it directly\n // skips the form's real children. Compare the direct read to the\n // cached Node.prototype getter — when the form's named-property\n // getter intercepts the read, the two values differ and we flag\n // the form. This catches every clobbering child type (input,\n // select, etc.) regardless of whether the named child happens to\n // carry a numeric .length, which a typeof-based probe would miss\n // (e.g. HTMLSelectElement.length is a defined unsigned-long).\n element.childNodes !== getChildNodes(element);\n };\n /**\n * Checks whether the given value is a DocumentFragment from any realm.\n *\n * The realm-independent replacement reads `nodeType` through the cached\n * Node.prototype getter and compares to the DOCUMENT_FRAGMENT_NODE\n * constant (11). nodeType is a numeric value resolved from the node's\n * internal slot, identical across realms for the same kind of node.\n *\n * @param value object to check\n * @return true if value is a DocumentFragment-shaped node from any realm\n */\n const _isDocumentFragment = function _isDocumentFragment(value) {\n if (!getNodeType || typeof value !== 'object' || value === null) {\n return false;\n }\n try {\n return getNodeType(value) === NODE_TYPE.documentFragment;\n } catch (_) {\n return false;\n }\n };\n /**\n * Checks whether the given object is a DOM node, including nodes that\n * originate from a different window/realm (e.g. an iframe's\n * contentDocument). The previous `value instanceof Node` check was\n * realm-bound: nodes from a different window failed it, causing\n * sanitize() to silently stringify them and reset IN_PLACE to false,\n * returning the original node unsanitized. See GHSA-4w3q-35jp-p934.\n *\n * @param value object to check whether it's a DOM node\n * @return true if value is a DOM node from any realm\n */\n const _isNode = function _isNode(value) {\n if (!getNodeType || typeof value !== 'object' || value === null) {\n return false;\n }\n try {\n return typeof getNodeType(value) === 'number';\n } catch (_) {\n return false;\n }\n };\n function _executeHooks(hooks, currentNode, data) {\n if (hooks.length === 0) {\n return;\n }\n arrayForEach(hooks, hook => {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n }\n /**\n * Structural-threat checks that condemn a node regardless of the\n * allowlists: mXSS via namespace confusion, risky CSS construction,\n * processing instructions, markup-bearing comments. Pure predicate;\n * the caller removes. Check order is load-bearing.\n *\n * @param currentNode the node to inspect\n * @param tagName the node's transformCaseFunc'd tag name\n * @return true if the node must be removed\n */\n const _isUnsafeNode = function _isUnsafeNode(currentNode, tagName) {\n /* Detect mXSS attempts abusing namespace confusion */\n if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.innerHTML)) {\n return true;\n }\n /* Remove rawtext/literal-text elements whose literal serialization\n re-opens markup on an HTML reparse - shapes (a) and (b) documented at\n LITERAL_TEXT_ELEMENTS. Both are invisible to rule 1 above (which\n self-disables once there is an element child, and whose second probe\n reads the innerHTML an XML/XHTML document serializes escaped), which\n is why both probes here read textContent instead. Previously only\n `style`-with-element-child was covered; every element in\n LITERAL_TEXT_ELEMENTS shares this literal serialization and is\n equally affected. */\n if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && LITERAL_TEXT_ELEMENTS[tagName] && (_isNode(currentNode.firstElementChild) || typeof currentNode.textContent === 'string' && regExpTest(LITERAL_TEXT_CLOSE[tagName], currentNode.textContent))) {\n return true;\n }\n /* Remove any occurrence of processing instructions */\n if (currentNode.nodeType === NODE_TYPE.processingInstruction) {\n return true;\n }\n /* Remove any kind of possibly harmful comments */\n if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, currentNode.data)) {\n return true;\n }\n return false;\n };\n /**\n * Evaluate a CUSTOM_ELEMENT_HANDLING check (a RegExp or a predicate\n * function, per the validation in _parseConfig) against a name.\n * Additional arguments are forwarded to predicate functions - the\n * attributeNameCheck predicate receives the tag name as its second\n * argument. A null/absent check never matches.\n *\n * @param check the configured tagNameCheck / attributeNameCheck value\n * @param name the name to test\n * @param args extra arguments forwarded to a predicate function\n * @return true if the check matches the name\n */\n const _matchesNameCheck = function _matchesNameCheck(check, name) {\n if (check instanceof RegExp) {\n return regExpTest(check, name);\n }\n if (check instanceof Function) {\n for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n return Boolean(check(name, ...args));\n }\n return false;\n };\n /**\n * Handle a node whose tag is forbidden or not allowlisted: keep\n * allowed custom elements (false return exits _sanitizeElements\n * early - the namespace and fallback-tag removal checks are\n * intentionally skipped for kept custom elements), else hoist\n * content per KEEP_CONTENT and remove.\n *\n * A kept custom element is the ONLY case in which this function\n * returns false, so the caller uses that return value to run the\n * afterSanitizeElements hook on the kept element and keep the\n * element-hook lifecycle consistent with normal allowlisted\n * elements (GHSA-c2j3-45gr-mqc4).\n *\n * @param currentNode the disallowed node\n * @param tagName the node's transformCaseFunc'd tag name\n * @return true if the node was removed, false if kept\n */\n const _sanitizeDisallowedNode = function _sanitizeDisallowedNode(currentNode, tagName, root) {\n /* Check if we have a custom element to handle */\n if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {\n return false;\n }\n /* Keep content except for bad-listed elements.\n Use the cached prototype getters exclusively — the previous code\n had `|| currentNode.parentNode` / `|| currentNode.childNodes`\n fallbacks, but the cached getters always return the canonical\n value (or null for a real parent-less node), so the fallback\n path was dead in safe cases and a clobbering surface in unsafe\n ones. Falsy cached results stay falsy; the `if (childNodes &&\n parentNode)` check already gates correctly. */\n if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n const parentNode = getParentNode(currentNode);\n const childNodes = getChildNodes(currentNode);\n if (childNodes && parentNode) {\n const childCount = childNodes.length;\n /* Hoist by moving each child up one level rather than deep-cloning\n it. Moving transfers every descendant exactly once, so a chain of\n nested disallowed elements costs O(n) instead of the O(n^2) that\n re-cloning the shrinking subtree at each level produced; it also\n empties the removed original, so `DOMPurify.removed` no longer\n pins whole subtrees. Moving preserves the in-place guarantee too:\n an original carrying already-queued resource events (`<img\n onerror>`, `<video>`/`<audio>` error, lazy/`onload`, …) is\n relocated and sanitised rather than left detached but still armed.\n The sole case that must clone is removing the walk root itself.\n The result is serialised from the root's subtree, so a restrictive\n ALLOWED_TAGS that strips the root (`body` on the string path) must\n leave the content inside it, which only cloning does. In IN_PLACE\n the root is pre-validated as an allowed tag and so is never removed\n here, so that path always takes the move branch.\n `childNodes` is live; a tail-to-head walk keeps `childNodes[i]`\n valid whether we move (drops the trailing entry) or clone (leaves\n the list intact). */\n for (let i = childCount - 1; i >= 0; --i) {\n const hoisted = currentNode === root ? cloneNode(childNodes[i], true) : childNodes[i];\n parentNode.insertBefore(hoisted, getNextSibling(currentNode));\n }\n }\n }\n _forceRemove(currentNode);\n return true;\n };\n /**\n * Fork a hook-mutable allowlist off its shared binding the first time a\n * (possibly lazily-installed) uponSanitize* hook is about to see it, so the\n * hook cannot widen the per-instance default or the setConfig binding by\n * reference and leak past the call. Returns the set unchanged once it is\n * already call-local, so repeated calls across elements are idempotent.\n *\n * @param hookList the uponSanitize* hook array for this event\n * @param set the current ALLOWED_TAGS / ALLOWED_ATTR binding\n * @param defaultSet the per-instance DEFAULT_ALLOWED_* constant\n * @param setConfigSet the captured setConfig() binding, or null\n * @return a call-local clone if a hook is present and set is still shared,\n * else set unchanged\n */\n const _forkSharedAllowlist = function _forkSharedAllowlist(hookList, set, defaultSet, setConfigSet) {\n if (hookList.length === 0) {\n return set;\n }\n return set === defaultSet || set === setConfigSet ? clone(set) : set;\n };\n /**\n * Shared guard for a node that a hook has detached from the walk tree,\n * used after each element-hook site in _sanitizeElements. Detaching is a\n * long-standing user pattern (issue #469; draw.io-style foreignObject\n * filtering). Per the cached, unclobberable parentNode getter the node is\n * genuinely out of the tree, so it can reach neither the serialized\n * output nor an IN_PLACE live tree; treat it as removed and stop\n * processing it. Without this guard, the unsafe-node / namespace checks\n * would call _forceRemove on a parentless node and hit the REPORT-3\n * fail-closed throw — which exists for nodes DOMPurify wants gone but\n * *cannot* detach (clobbered / parentless roots), the opposite of a node\n * that is already safely gone. The walk root is exempt: a detached\n * IN_PLACE root is legitimate input and must still be fully sanitized,\n * and a kill-decision on it must keep hitting the REPORT-3 throw.\n *\n * Nodes detached by hooks stay the hook's responsibility for placement:\n * they are not recorded in DOMPurify.removed, so the post-walk IN_PLACE\n * pass (which iterates DOMPurify.removed) does not reach them. But a\n * hook-detached subtree can still hold a queued resource-event handler -\n * e.g. an <img onload> that began loading when the caller built the live\n * tree - which fires in page scope after sanitize returns even though the\n * handler never reached the returned tree. That is the audit-5 F1 hazard,\n * and the documented node.remove() hook pattern walks straight into it.\n * So on the IN_PLACE path we neutralize the detached subtree inline,\n * stripping its non-allow-listed attributes before returning, exactly as\n * the post-walk pass does for _forceRemove'd subtrees.\n *\n * @param currentNode the node a hook may have detached\n * @param root the current walk root\n * @return true if the node is detached and now handled, false otherwise\n */\n const _handleHookDetachedNode = function _handleHookDetachedNode(currentNode, root) {\n if (currentNode === root || getParentNode(currentNode) !== null) {\n return false;\n }\n if (IN_PLACE) {\n _neutralizeSubtree(currentNode);\n }\n return true;\n };\n /**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n * @param currentNode to check for permission to exist\n * @return true if node was killed, false if left alive\n */\n const _sanitizeElements = function _sanitizeElements(currentNode, root) {\n /* Execute a hook if present */\n _executeHooks(hooks.beforeSanitizeElements, currentNode, null);\n /* A hook may have detached the node - treat it as removed (see\n _handleHookDetachedNode for the full rationale). */\n if (_handleHookDetachedNode(currentNode, root)) {\n return true;\n }\n /* Check if element is clobbered or can clobber */\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n /* Now let's check the element's type and name */\n const tagName = transformCaseFunc(_readNodeName(currentNode));\n /* Close the pre-walk clone-guard's timing gap: an uponSanitizeElement\n hook may have been installed after that guard sampled the hook arrays\n (e.g. lazily from beforeSanitizeElements), leaving ALLOWED_TAGS still\n aliasing a shared binding that a widening hook would mutate by\n reference. Fork it before exposing it to the hook. */\n ALLOWED_TAGS = _forkSharedAllowlist(hooks.uponSanitizeElement, ALLOWED_TAGS, DEFAULT_ALLOWED_TAGS, SET_CONFIG_ALLOWED_TAGS);\n /* Execute a hook if present */\n _executeHooks(hooks.uponSanitizeElement, currentNode, {\n tagName,\n allowedTags: ALLOWED_TAGS\n });\n /* The uponSanitizeElement hook may have detached the node, exactly as\n above (see _handleHookDetachedNode for the full rationale). */\n if (_handleHookDetachedNode(currentNode, root)) {\n return true;\n }\n /* Remove mXSS vectors, processing instructions and risky comments */\n if (_isUnsafeNode(currentNode, tagName)) {\n _forceRemove(currentNode);\n return true;\n }\n /* Remove element if anything forbids its presence */\n if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {\n const removed = _sanitizeDisallowedNode(currentNode, tagName, root);\n /* A false return means the node is a custom element kept via\n CUSTOM_ELEMENT_HANDLING - the only keep path through\n _sanitizeDisallowedNode. Run afterSanitizeElements on it so the\n element-hook lifecycle matches normal allowlisted elements: a\n security policy applied in this hook (e.g. stripping an attribute\n from every surviving element) must not silently skip kept custom\n elements (GHSA-c2j3-45gr-mqc4). This mirrors the normal-element\n tail below - the hook runs, then the walker's subsequent\n _sanitizeAttributes pass sanitizes the element's attributes. The\n deliberately skipped namespace and fallback-tag removal checks stay\n skipped; they are removal decisions, not the hook contract. */\n if (removed === false) {\n _executeHooks(hooks.afterSanitizeElements, currentNode, null);\n }\n return removed;\n }\n /* Check whether element has a valid namespace.\n Realm-safe check (GHSA-hpcv-96wg-7vj8): use the cached Node.prototype\n nodeType getter rather than `instanceof Element`, which is realm-\n bound and short-circuits to false for any node minted in a different\n realm — letting a foreign-realm element with a forbidden namespace\n slip past the namespace check entirely. */\n const nt = _readNodeType(currentNode);\n if (nt === NODE_TYPE.element && !_checkValidNamespace(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n /* Make sure that older browsers don't get fallback-tag mXSS */\n if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(FALLBACK_TAG_CLOSE, currentNode.innerHTML)) {\n _forceRemove(currentNode);\n return true;\n }\n /* Sanitize element content to be template-safe */\n if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {\n /* Get the element's text content */\n const content = _stripTemplateExpressions(currentNode.textContent);\n if (currentNode.textContent !== content) {\n arrayPush(DOMPurify.removed, {\n element: currentNode.cloneNode()\n });\n currentNode.textContent = content;\n }\n }\n /* Execute a hook if present */\n _executeHooks(hooks.afterSanitizeElements, currentNode, null);\n return false;\n };\n /**\n * _isValidAttribute\n *\n * @param lcTag Lowercase tag name of containing element.\n * @param lcName Lowercase attribute name.\n * @param value Attribute value.\n * @return Returns true if `value` is valid, otherwise false.\n */\n // eslint-disable-next-line complexity\n const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n /* FORBID_ATTR must always win, even if ADD_ATTR predicate would allow it */\n if (FORBID_ATTR[lcName]) {\n return false;\n }\n /* Reject declarative-partial-updates patch-linkage attributes\n (https://github.com/WICG/declarative-partial-updates).\n Empirical note (Chrome 150, verified — see\n test/declarative-patch-probe-v3.html): expansion is NOT applied after\n sanitization. For the string path it fires during sanitize()'s own\n parse, so the walk sees and sanitizes the fully materialized expanded\n tree — teleports into MathML/SVG integration points included; a\n weaponized `<template for>`->`<img onerror>` comes back with the handler\n stripped. For the IN_PLACE path it fires on connection, before the walk.\n Either way DOMPurify is NOT blind to the patch.\n This removal is therefore defense-in-depth rather than the sole barrier:\n it prevents live linkage from surviving into the OUTPUT and re-expanding\n in the caller's context, and keeps behaviour deterministic if a future\n engine defers expansion. `for` is legitimate only on <label>/<output>;\n anywhere else (notably <template for>) it links the element to a patch\n target and teleports or removes an arbitrary DOM range by id/marker name.\n `patchsrc` fetches remote markup and is treated as a script-loading\n mechanism (CSP). Gated on SAFE_FOR_XML so the removal groups with the\n other structural-threat checks and stays overridable, consistent with\n the rest of the codebase. PI range markers are already removed by\n _isUnsafeNode. */\n if (_isPatchLinkageAttribute(lcName, lcTag)) {\n return false;\n }\n /* Make sure attribute cannot clobber */\n if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {\n return false;\n }\n const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);\n /* Allow valid data-* attributes: At least one character after \"-\"\n (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n We don't need to check the value; it's always URI safe. */\n if (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$1, lcName)) {\n return true;\n }\n /* Allow valid aria-* attributes, the value is always URI safe */\n if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) {\n return true;\n }\n /* A name outside the allowlist is acceptable on custom-element terms\n only. The value checks below are intentionally skipped in that case:\n if the user supplied a tagNameCheck we also allow derived custom\n elements using the same test, and attributes passing the configured\n attributeNameCheck are allowed as custom elements define these at\n their own discretion. */\n if (!nameIsPermitted) {\n return (\n // Condition a) covers a basically valid custom element tag name whose\n // tag passes the configured tagNameCheck and whose attribute name\n // passes the configured attributeNameCheck ...\n _isBasicCustomElement(lcTag) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName, lcTag) ||\n // Condition b) covers an `is` attribute whose value passes the\n // configured tagNameCheck while customized built-in elements are\n // allowed.\n lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value)\n );\n }\n /* Check value is safe. First, is attr inert? If so, is safe */\n if (URI_SAFE_ATTRIBUTES[lcName]) {\n return true;\n }\n /* Check no script, data or unknown possibly unsafe URI\n unless we know URI values are safe for that attribute */\n if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, ''))) {\n return true;\n }\n /* Keep image data URIs alive if src/xlink:href is allowed */\n /* Further prevent gadget XSS for dynamically built script tags */\n if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) {\n return true;\n }\n /* Allow unknown protocols: This provides support for links that\n are handled by protocol handlers which may be unknown ahead of\n time, e.g. fb:, spotify: */\n if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value, ATTR_WHITESPACE$1, ''))) {\n return true;\n }\n /* Only an empty (binary) value remains safe at this point;\n anything else is presumed unsafe, do not add it back */\n return !value;\n };\n /* Names the HTML spec reserves from valid-custom-element-name; these must\n * never be treated as basic custom elements even when a permissive\n * CUSTOM_ELEMENT_HANDLING.tagNameCheck is configured. */\n const RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, ['annotation-xml', 'color-profile', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'missing-glyph']);\n /**\n * _isBasicCustomElement\n * checks if at least one dash is included in tagName, and it's not the first char\n * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n *\n * @param tagName name of the tag of the node to sanitize\n * @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\n */\n const _isBasicCustomElement = function _isBasicCustomElement(tagName) {\n return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);\n };\n /**\n * Wrap an attribute value in the matching Trusted Types object when\n * the active policy requires it. Namespaced attributes pass through\n * unchanged (no TT support yet, see\n * https://bugs.chromium.org/p/chromium/issues/detail?id=1305293).\n *\n * @param lcTag lowercase tag name of the containing element\n * @param lcName lowercase attribute name\n * @param namespaceURI the attribute's namespace, if any\n * @param value the attribute value to wrap\n * @return the value, wrapped when Trusted Types demand it\n */\n const _applyTrustedTypesToAttribute = function _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value) {\n if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function' && !namespaceURI) {\n switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n case 'TrustedHTML':\n {\n return _createTrustedHTML(value);\n }\n case 'TrustedScriptURL':\n {\n return _createTrustedScriptURL(value);\n }\n }\n }\n return value;\n };\n /**\n * Write a modified attribute value back onto the element. On\n * success, re-probe for clobbering introduced by the new value and\n * remove the element when found; otherwise, when this writeback is the\n * recreate half of the SANITIZE_NAMED_PROPS remove-and-recreate, pop the\n * removal entry that path recorded so it does not show as removed. On\n * failure, remove the attribute instead.\n *\n * Returns true only on a clean write (the value was set and the new value\n * introduced no clobbering). The caller uses that, together with its own\n * knowledge of whether this attribute pushed a DOMPurify.removed record, to\n * decide whether to pop that record. The pop must happen ONLY for the\n * named-prop remove-and-recreate; popping on any other value change (trim,\n * template scrubbing, Trusted Types) would consume an unrelated _forceRemove\n * subtree-cleanup record and let that detached subtree keep a live event\n * handler through the IN_PLACE neutralization pass (SO-001).\n *\n * @param currentNode the element carrying the attribute\n * @param name the attribute name as present on the element\n * @param namespaceURI the attribute's namespace, if any\n * @param value the new attribute value\n * @return true if the value was written without introducing clobbering\n */\n const _setAttributeValue = function _setAttributeValue(currentNode, name, namespaceURI, value) {\n try {\n if (namespaceURI) {\n currentNode.setAttributeNS(namespaceURI, name, value);\n } else {\n /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n currentNode.setAttribute(name, value);\n }\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n return false;\n }\n return true;\n } catch (_) {\n _removeAttribute(name, currentNode);\n return false;\n }\n };\n /**\n * _sanitizeAttributes\n *\n * @protect attributes\n * @protect nodeName\n * @protect removeAttribute\n * @protect setAttribute\n *\n * @param currentNode to sanitize\n */\n // eslint-disable-next-line complexity\n const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n /* Execute a hook if present */\n _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);\n const attributes = currentNode.attributes;\n /* Check if we have attributes; if not we might have a text node */\n if (!attributes || _isClobbered(currentNode)) {\n return;\n }\n /* Same lazy-install guard as uponSanitizeElement (see there): fork the\n attribute allowlist off its shared binding before a hook can see it. */\n ALLOWED_ATTR = _forkSharedAllowlist(hooks.uponSanitizeAttribute, ALLOWED_ATTR, DEFAULT_ALLOWED_ATTR, SET_CONFIG_ALLOWED_ATTR);\n const hookEvent = {\n attrName: '',\n attrValue: '',\n keepAttr: true,\n allowedAttributes: ALLOWED_ATTR,\n forceKeepAttr: undefined\n };\n let l = attributes.length;\n const lcTag = transformCaseFunc(currentNode.nodeName);\n /* Go backwards over all attributes; safely remove bad ones */\n while (l--) {\n const attr = attributes[l];\n const name = attr.name,\n namespaceURI = attr.namespaceURI,\n attrValue = attr.value;\n const lcName = transformCaseFunc(name);\n const initValue = attrValue;\n let value = name === 'value' ? initValue : stringTrim(initValue);\n /* Tracks whether this specific attribute pushed a DOMPurify.removed\n record that a later _setAttributeValue() writeback is expected to pop\n back off (the SANITIZE_NAMED_PROPS remove-and-recreate below is the\n only path that does). A value that merely changed via trim, template\n scrubbing, or Trusted Types pushes no such record, so its writeback\n must NOT pop — otherwise it consumes an unrelated _forceRemove subtree\n record and that detached subtree escapes the IN_PLACE handler-\n neutralization pass (SO-001). */\n let recreatedNamedProp = false;\n /* Execute a hook if present */\n hookEvent.attrName = lcName;\n hookEvent.attrValue = value;\n hookEvent.keepAttr = true;\n hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);\n value = hookEvent.attrValue;\n /* Full DOM Clobbering protection via namespace isolation,\n * Prefix id and name attributes with `user-content-`\n */\n if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name') && stringIndexOf(value, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {\n // Remove the attribute with this value\n _removeAttribute(name, currentNode, attr);\n // Prefix the value and later re-create the attribute with the sanitized value\n value = SANITIZE_NAMED_PROPS_PREFIX + value;\n // This attribute owns the record just pushed; its recreate writeback\n // is the one allowed to pop it back off.\n recreatedNamedProp = true;\n }\n // Else: already prefixed, leave the attribute alone — the prefix is\n // itself the clobbering protection, and re-applying it is incorrect.\n /* Work around a security issue with comments inside attributes */\n if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) {\n _removeAttribute(name, currentNode, attr);\n continue;\n }\n /* Make sure we cannot easily use animated hrefs, even if animations are allowed */\n if (lcName === 'attributename' && stringMatch(value, 'href')) {\n _removeAttribute(name, currentNode, attr);\n continue;\n }\n /* Did the hooks force-keep the attribute? */\n if (hookEvent.forceKeepAttr) {\n continue;\n }\n /* Did the hooks approve of the attribute? */\n if (!hookEvent.keepAttr) {\n _removeAttribute(name, currentNode, attr);\n continue;\n }\n /* Work around a security issue in jQuery 3.0 */\n if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(SELF_CLOSING_TAG, value)) {\n _removeAttribute(name, currentNode, attr);\n continue;\n }\n /* Sanitize attribute content to be template-safe */\n if (SAFE_FOR_TEMPLATES) {\n value = _stripTemplateExpressions(value);\n }\n /* Is `value` valid for this attribute? */\n if (!_isValidAttribute(lcTag, lcName, value)) {\n _removeAttribute(name, currentNode, attr);\n continue;\n }\n /* Handle attributes that require Trusted Types */\n value = _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value);\n /* Handle invalid data-* attribute set by try-catching it */\n if (value !== initValue) {\n const cleanWrite = _setAttributeValue(currentNode, name, namespaceURI, value);\n /* Only the named-prop remove-and-recreate owns a DOMPurify.removed\n record to pop; a plain trim/template/Trusted-Types writeback owns\n none, so popping here would drop an unrelated subtree's cleanup\n record (SO-001). */\n if (cleanWrite && recreatedNamedProp) {\n arrayPop(DOMPurify.removed);\n }\n }\n }\n /* Execute a hook if present */\n _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);\n };\n /**\n * _sanitizeShadowDOM\n *\n * @param fragment to iterate over recursively\n */\n const _sanitizeShadowDOM2 = function _sanitizeShadowDOM(fragment) {\n let shadowNode = null;\n const shadowIterator = _createNodeIterator(fragment);\n /* Execute a hook if present */\n _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);\n while (shadowNode = shadowIterator.nextNode()) {\n /* Execute a hook if present */\n _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);\n /* Sanitize tags and elements */\n _sanitizeElements(shadowNode, fragment);\n /* Check attributes next */\n _sanitizeAttributes(shadowNode);\n /* Deep shadow DOM detected.\n Realm-safe check (GHSA-hpcv-96wg-7vj8): use nodeType against the\n DOCUMENT_FRAGMENT_NODE constant rather than instanceof, so we\n recurse into <template>.content from foreign realms too. */\n if (_isDocumentFragment(shadowNode.content)) {\n _sanitizeShadowDOM2(shadowNode.content);\n }\n /* An element iterated here may itself host an attached\n shadow root. The default NodeIterator does not enter shadow\n trees, so a shadow root nested inside template.content was\n previously reached by no walk at all (the pre-pass at\n _sanitizeAttachedShadowRoots descends via childNodes, which\n doesn't enter template.content; the template-content recursion\n above iterates the content but never inspected shadowRoot).\n Walk it explicitly. The nodeType guard avoids reading\n shadowRoot off text / comment / CDATA / PI nodes that the\n iterator also surfaces. */\n if (_readNodeType(shadowNode) === NODE_TYPE.element) {\n const innerSr = getShadowRoot(shadowNode);\n if (_isDocumentFragment(innerSr)) {\n _sanitizeAttachedShadowRoots(innerSr);\n _sanitizeShadowDOM2(innerSr);\n }\n }\n }\n /* Execute a hook if present */\n _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);\n };\n /**\n * _sanitizeAttachedShadowRoots\n *\n * Walks `root` and feeds every attached shadow root we encounter into\n * the existing _sanitizeShadowDOM pipeline. The default node iterator\n * does not descend into shadow trees, so nodes inside an attached\n * shadow root would otherwise be skipped entirely.\n *\n * Two real input paths put attached shadow roots in front of us:\n * 1. IN_PLACE on a DOM node that already has shadow roots attached.\n * 2. DOM-node input where importNode(dirty, true) deep-clones the\n * shadow root because it was created with `clonable: true`.\n *\n * This pass runs once, up front, so the main iteration loop (and the\n * existing _sanitizeShadowDOM template-content recursion) stay\n * untouched — string-input paths are not affected.\n *\n * @param root the subtree root to walk for attached shadow roots\n */\n const _sanitizeAttachedShadowRoots = function _sanitizeAttachedShadowRoots(root) {\n /* Iterative (explicit stack) rather than per-child recursion. DOM APIs\n impose no depth cap, so an attacker-shaped tree (JSON/CRDT/editor data\n built straight into the DOM — the IN_PLACE surface) deeper than the JS\n call-stack budget would otherwise overflow native recursion here and\n throw at the IN_PLACE entry pre-pass, before a single node is\n sanitized, leaving the caller's live tree untouched (fail-open). See\n campaign-3 F4. A heap stack keeps depth off the call stack.\n Each work item is either a node to descend into, or a deferred\n `_sanitizeShadowDOM` for an already-walked shadow root. The deferred\n form preserves the original post-order discipline: a shadow root's\n nested shadow roots are discovered before the outer shadow is\n sanitized (which may remove hosts). Pushes are in reverse of the\n desired processing order (LIFO): template content, then children, then\n the shadow-sanitize, then the shadow walk — so the order matches the\n previous recursion exactly. */\n const stack = [{\n node: root,\n shadow: null\n }];\n while (stack.length > 0) {\n const item = stack.pop();\n /* Deferred shadow-DOM sanitisation: runs after its subtree was walked. */\n if (item.shadow) {\n _sanitizeShadowDOM2(item.shadow);\n continue;\n }\n const node = item.node;\n const nodeType = _readNodeType(node);\n const isElement = nodeType === NODE_TYPE.element;\n /* (pushed last → processed first) Children, snapshotted in reverse so\n the first child is processed first. Snapshotting matters because a\n hook may detach siblings mid-walk. */\n const childNodes = getChildNodes(node);\n if (childNodes) {\n for (let i = childNodes.length - 1; i >= 0; --i) {\n stack.push({\n node: childNodes[i],\n shadow: null\n });\n }\n }\n /* (pushed before children → processed after them, matching the old\n \"template content last\" order) When the node is a <template>,\n descend into its content. */\n if (isElement) {\n const rootName = getNodeName ? getNodeName(node) : null;\n if (typeof rootName === 'string' && transformCaseFunc(rootName) === 'template') {\n const content = node.content;\n if (_isDocumentFragment(content)) {\n stack.push({\n node: content,\n shadow: null\n });\n }\n }\n }\n /* Shadow root (processed first): walk its subtree, then sanitise it.\n Realm-safe check (GHSA-hpcv-96wg-7vj8): nodeType-based detection\n rather than `instanceof DocumentFragment`, which is realm-bound and\n silently skipped foreign-realm shadow roots (e.g.\n iframe.contentDocument attachShadow). */\n if (isElement) {\n const sr = getShadowRoot(node);\n if (_isDocumentFragment(sr)) {\n /* Push the deferred sanitise first so it pops after the shadow\n walk we push next, i.e. nested shadow roots are discovered\n before this one is sanitised. */\n stack.push({\n node: null,\n shadow: sr\n }, {\n node: sr,\n shadow: null\n });\n }\n }\n }\n };\n // eslint-disable-next-line complexity\n DOMPurify.sanitize = function (dirty) {\n let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n let body = null;\n let importedNode = null;\n let currentNode = null;\n let returnNode = null;\n /* Make sure we have a string to sanitize.\n DO NOT return early, as this will return the wrong type if\n the user has requested a DOM object rather than a string */\n IS_EMPTY_INPUT = !dirty;\n if (IS_EMPTY_INPUT) {\n dirty = '<!-->';\n }\n /* Stringify, in case dirty is an object */\n if (typeof dirty !== 'string' && !_isNode(dirty)) {\n dirty = stringifyValue(dirty);\n if (typeof dirty !== 'string') {\n throw typeErrorCreate('dirty is not a string, aborting');\n }\n }\n /* Return dirty HTML if DOMPurify cannot run */\n if (!DOMPurify.isSupported) {\n return dirty;\n }\n /* Assign config vars */\n if (SET_CONFIG) {\n /* Persistent setConfig() path: _parseConfig is skipped, so the sets are\n * not re-derived per call. Restore them from the pristine bindings\n * captured at setConfig() time so a previous call's hook clone (mutated\n * below) does not carry over. */\n ALLOWED_TAGS = SET_CONFIG_ALLOWED_TAGS;\n ALLOWED_ATTR = SET_CONFIG_ALLOWED_ATTR;\n } else {\n _parseConfig(cfg);\n }\n /* Clone the hook-mutable allowlists before the walk whenever an\n * uponSanitize* hook is registered. The hook event exposes ALLOWED_TAGS\n * and ALLOWED_ATTR by reference (as allowedTags / allowedAttributes), so\n * a hook that widens them would otherwise mutate the shared set\n * permanently: across later calls and across every element. Cloning per\n * walk keeps documented in-call widening working while scoping it to the\n * call. A single guard for both config paths - the per-call path rebinds\n * the sets in _parseConfig each call, the persistent path restores them\n * from the captured bindings just above - so the two cannot diverge. */\n if (hooks.uponSanitizeElement.length > 0 || hooks.uponSanitizeAttribute.length > 0) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n if (hooks.uponSanitizeAttribute.length > 0) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n /* Clean up removed elements */\n DOMPurify.removed = [];\n /* Resolve IN_PLACE for this call without mutating persistent config.\n Writing the IN_PLACE closure variable here leaks under setConfig(),\n where _parseConfig is skipped on later calls: a single string call would\n disable in-place mode for every subsequent node call, returning a\n sanitized copy while leaving the caller's node — which in-place callers\n keep using and whose return value they ignore — unsanitized. REPORT-2. */\n const inPlace = IN_PLACE && typeof dirty !== 'string' && _isNode(dirty);\n if (inPlace) {\n /* Declarative-partial-updates / streaming pre-pass: sever every patch\n linkage across the live tree BEFORE the walk, so no patch can fire\n mid-walk and inject into an already-processed region. Runs first, so\n it also covers the forbidden/clobbered roots that throw below. */\n _neutralizePatchLinkage(dirty);\n /* Do some early pre-sanitization to avoid unsafe root nodes.\n Read nodeName through the cached prototype getter — a clobbering\n child named \"nodeName\" on the form root would otherwise shadow\n the property and let this check skip the root-allowlist\n validation entirely. */\n const nn = _readNodeName(dirty);\n if (typeof nn === 'string') {\n const tagName = transformCaseFunc(nn);\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n /* Fail closed on a live root: neutralize handlers/children before\n throwing, exactly as the mid-walk abort path does. */\n _neutralizeRoot(dirty);\n throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');\n }\n }\n /* Pre-flight the root through _isClobbered. The iterator-driven\n removal path can not detach a parent-less root: _forceRemove\n falls through to Element.prototype.remove(), which per spec\n is a no-op on a node with no parent. A clobbered root would\n then survive the main loop with its attributes uninspected,\n because _sanitizeAttributes early-returns on _isClobbered. The\n result would be an attacker-controlled form, complete with any\n event-handler attributes the caller passed in, handed back to\n the application unsanitized. Refuse to sanitize such a root\n the same way we refuse a forbidden tag. GHSA-r47g-fvhr-h676. */\n if (_isClobbered(dirty)) {\n /* Fail closed on a live clobbered root before throwing.\n _neutralizeRoot's reads are clobber-safe (cached getters); the\n form's non-clobbered descendants, e.g. an armed <img>, are scrubbed. */\n _neutralizeRoot(dirty);\n throw typeErrorCreate('root node is clobbered and cannot be sanitized in-place');\n }\n /* Sanitize attached shadow roots before the main iterator runs.\n The iterator does not descend into shadow trees. Same fail-closed\n barrier as the main walk (campaign-3 F2): a custom-element reaction\n inside a shadow root could abort this pre-pass before the walk runs,\n which would otherwise leave the entire live tree unsanitized. */\n try {\n _sanitizeAttachedShadowRoots(dirty);\n } catch (error) {\n _neutralizeRoot(dirty);\n throw error;\n }\n } else if (_isNode(dirty)) {\n /* If dirty is a DOM element, append to an empty document to avoid\n elements being stripped by the parser */\n body = _initDocument('<!---->');\n importedNode = body.ownerDocument.importNode(dirty, true);\n if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === 'BODY') {\n /* Node is already a body, use as is */\n body = importedNode;\n } else if (importedNode.nodeName === 'HTML') {\n body = importedNode;\n } else {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n body.appendChild(importedNode);\n }\n /* Clonable shadow roots are deep-cloned by importNode(); sanitize\n them before the main iterator runs, since the iterator does not\n descend into shadow trees. The walk routes every read through a\n cached prototype getter so clobbering descendants on a form root\n cannot hide a shadow host from this pass.\n Traverse from `body`, not `importedNode`: when importedNode is a\n DocumentFragment, the appendChild() above moves its children into\n `body` and leaves the fragment empty, so walking importedNode would\n scan nothing and miss every attached shadow host now under `body`\n (SO-003). In the BODY/HTML branches `body === importedNode`, so this\n is equivalent there; in the element branch `body` contains the\n appended element and its descendants. `body` covers all three. */\n _sanitizeAttachedShadowRoots(body);\n } else {\n /* Exit directly if we have nothing to do */\n if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT &&\n // eslint-disable-next-line unicorn/prefer-includes\n dirty.indexOf('<') === -1) {\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(dirty) : dirty;\n }\n /* Initialize the document to work on */\n body = _initDocument(dirty);\n /* Check we have a DOM node from the data */\n if (!body) {\n return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n }\n }\n /* Remove first element node (ours) if FORCE_BODY is set */\n if (body && FORCE_BODY) {\n _forceRemove(body.firstChild);\n }\n /* Get node iterator */\n const walkRoot = inPlace ? dirty : body;\n /* Now start iterating over the created document.\n The walk runs inside an exception barrier (campaign-3 F2): a re-entrant\n engine/custom-element mutation can detach a node mid-walk so\n `_forceRemove`'s parentless guard throws, aborting the loop. Without the\n barrier the caller's in-place tree would be left half-sanitized with the\n unvisited tail still armed. _createNodeIterator itself is inside the\n barrier too: constructing the iterator dereferences the root's document,\n and any failure there (e.g. an exotic/clobbered root) must still fail\n closed rather than skip the neutralize. On any throw we fail closed -\n strip the in-place root bare - then rethrow so the existing throw\n contract is preserved. (String/DOM-copy paths never return the partial\n body, so the propagating throw is already fail-closed there.) */\n try {\n const nodeIterator = _createNodeIterator(walkRoot);\n while (currentNode = nodeIterator.nextNode()) {\n /* Sanitize tags and elements */\n _sanitizeElements(currentNode, walkRoot);\n /* Check attributes next */\n _sanitizeAttributes(currentNode);\n /* Shadow DOM detected, sanitize it.\n Realm-safe check (GHSA-hpcv-96wg-7vj8): nodeType-based detection\n instead of instanceof, so foreign-realm <template>.content is\n walked correctly. */\n if (_isDocumentFragment(currentNode.content)) {\n _sanitizeShadowDOM2(currentNode.content);\n }\n }\n } catch (error) {\n if (inPlace) {\n _neutralizeRoot(dirty);\n /* Nodes _forceRemove'd earlier in the aborted walk are already\n detached from the root, so _neutralizeRoot's subtree pass does not\n reach them. Defuse them too, mirroring the success-path loop below. */\n arrayForEach(DOMPurify.removed, entry => {\n if (entry.element) {\n _neutralizeSubtree(entry.element);\n }\n });\n }\n throw error;\n }\n /* If we sanitized `dirty` in-place, return it. */\n if (inPlace) {\n /* Fail-closed completion of the audit-5 F1 fix: every node removed from\n the caller's live tree is detached but may still hold a queued\n resource-event handler that fires in page scope after we return. The\n move-hoist covers only disallowed-tag KEEP_CONTENT removals; strip the\n non-allow-listed attributes off every other removed subtree (clobber,\n mXSS, namespace, comments, KEEP_CONTENT:false, …) so those handlers are\n cancelled before any event can fire. Runs synchronously, pre-return. */\n arrayForEach(DOMPurify.removed, entry => {\n if (entry.element) {\n _neutralizeSubtree(entry.element);\n }\n });\n if (SAFE_FOR_TEMPLATES) {\n _scrubTemplateExpressions2(dirty);\n }\n return dirty;\n }\n /* Return sanitized string or DOM */\n if (RETURN_DOM) {\n if (SAFE_FOR_TEMPLATES) {\n _scrubTemplateExpressions2(body);\n }\n if (RETURN_DOM_FRAGMENT) {\n returnNode = createDocumentFragment.call(body.ownerDocument);\n while (body.firstChild) {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n returnNode.appendChild(body.firstChild);\n }\n } else {\n returnNode = body;\n }\n if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {\n /*\n AdoptNode() is not used because internal state is not reset\n (e.g. the past names map of a HTMLFormElement), this is safe\n in theory but we would rather not risk another attack vector.\n The state that is cloned by importNode() is explicitly defined\n by the specs.\n */\n returnNode = importNode.call(originalDocument, returnNode, true);\n }\n return returnNode;\n }\n let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n /* Serialize doctype if allowed */\n if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {\n serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\\n' + serializedHTML;\n }\n /* Sanitize final string template-safe */\n if (SAFE_FOR_TEMPLATES) {\n serializedHTML = _stripTemplateExpressions(serializedHTML);\n }\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(serializedHTML) : serializedHTML;\n };\n DOMPurify.setConfig = function () {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _parseConfig(cfg);\n SET_CONFIG = true;\n SET_CONFIG_ALLOWED_TAGS = ALLOWED_TAGS;\n SET_CONFIG_ALLOWED_ATTR = ALLOWED_ATTR;\n };\n DOMPurify.clearConfig = function () {\n CONFIG = null;\n SET_CONFIG = false;\n SET_CONFIG_ALLOWED_TAGS = null;\n SET_CONFIG_ALLOWED_ATTR = null;\n // Drop any caller-supplied Trusted Types policy so it cannot poison later\n // `RETURN_TRUSTED_TYPE` output. The internal default policy (cached, and\n // never recreated — Trusted Types throws on duplicate names) is restored by\n // the next `_parseConfig`. See GHSA-vxr8-fq34-vvx9.\n trustedTypesPolicy = defaultTrustedTypesPolicy;\n emptyHTML = '';\n };\n DOMPurify.isValidAttribute = function (tag, attr, value) {\n /* Initialize shared config vars if necessary. */\n if (!CONFIG) {\n _parseConfig({});\n }\n const lcTag = transformCaseFunc(tag);\n const lcName = transformCaseFunc(attr);\n return _isValidAttribute(lcTag, lcName, value);\n };\n DOMPurify.addHook = function (entryPoint, hookFunction) {\n if (typeof hookFunction !== 'function') {\n return;\n }\n /* Reject unknown entry points. Without this, a non-hook key (e.g.\n * '__proto__') indexes off the prototype chain rather than a real\n * hook array, and arrayPush then writes to Object.prototype. Guard\n * with an own-property check against the known hook names. */\n if (!objectHasOwnProperty(hooks, entryPoint)) {\n return;\n }\n arrayPush(hooks[entryPoint], hookFunction);\n };\n DOMPurify.removeHook = function (entryPoint, hookFunction) {\n if (!objectHasOwnProperty(hooks, entryPoint)) {\n return undefined;\n }\n if (hookFunction !== undefined) {\n const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);\n return index === -1 ? undefined : arraySplice(hooks[entryPoint], index, 1)[0];\n }\n return arrayPop(hooks[entryPoint]);\n };\n DOMPurify.removeHooks = function (entryPoint) {\n if (!objectHasOwnProperty(hooks, entryPoint)) {\n return;\n }\n hooks[entryPoint] = [];\n };\n DOMPurify.removeAllHooks = function () {\n hooks = _createHooksMap();\n };\n return DOMPurify;\n}\nvar purify = createDOMPurify();\n\nexport { purify as default };\n//# sourceMappingURL=purify.es.mjs.map\n","// Third-party notices: mathjaxStyles.LICENSE. mathjaxStyles.test.ts explains\n// why this copy exists, checks it against the sheet MathJax emits, and lists\n// every deliberate difference with its reason.\nconst MATHJAX_STYLES = `\n:scope {\n display: contents;\n}\n:scope mjx-container[jax=\"SVG\"] {\n direction: ltr;\n position: relative;\n}\n:scope mjx-container[jax=\"SVG\"] > svg {\n /* WebKit ignores overflow-clip-margin and clips at the SVG box. */\n overflow: clip;\n overflow-clip-margin: 1em;\n min-height: 1px;\n min-width: 1px;\n}\n:scope mjx-container[jax=\"SVG\"] > svg a {\n fill: blue;\n stroke: blue;\n}\n:scope mjx-assistive-mml {\n top: 0px;\n left: 0px;\n clip: rect(1px, 1px, 1px, 1px) !important;\n user-select: text !important;\n position: absolute !important;\n padding: 1px 0px 0px !important;\n border: 0px !important;\n display: block !important;\n width: auto !important;\n overflow: hidden !important;\n}\n:scope mjx-assistive-mml[display=\"block\"] {\n width: 100% !important;\n}\n:scope mjx-container[jax=\"SVG\"][display=\"true\"] {\n display: block;\n text-align: center;\n margin: 1em 0px;\n}\n:scope mjx-container[jax=\"SVG\"][display=\"true\"][width=\"full\"] {\n display: flex;\n}\n:scope mjx-container[jax=\"SVG\"][justify=\"left\"] {\n text-align: left;\n}\n:scope mjx-container[jax=\"SVG\"][justify=\"right\"] {\n text-align: right;\n}\n:scope g[data-mml-node=\"merror\"] > g {\n fill: red;\n stroke: red;\n}\n:scope g[data-mml-node=\"merror\"] > rect[data-background] {\n fill: yellow;\n stroke: none;\n}\n:scope g[data-mml-node=\"mtable\"] > line[data-line], :scope svg[data-table] > g > line[data-line] {\n stroke-width: 70px;\n fill: none;\n}\n:scope g[data-mml-node=\"mtable\"] > rect[data-frame], :scope svg[data-table] > g > rect[data-frame] {\n stroke-width: 70px;\n fill: none;\n}\n:scope g[data-mml-node=\"mtable\"] > .mjx-dashed, :scope svg[data-table] > g > .mjx-dashed {\n stroke-dasharray: 140;\n}\n:scope g[data-mml-node=\"mtable\"] > .mjx-dotted, :scope svg[data-table] > g > .mjx-dotted {\n stroke-linecap: round;\n stroke-dasharray: 0, 140;\n}\n:scope g[data-mml-node=\"mtable\"] > g > svg {\n overflow: visible;\n}\n:scope g[data-mml-node=\"maction\"][data-toggle] {\n cursor: pointer;\n}\n:scope mjx-container[jax=\"SVG\"] path[data-c], :scope mjx-container[jax=\"SVG\"] use[data-c] {\n stroke-width: 3;\n}\n:scope g[data-mml-node=\"xypic\"] path {\n stroke-width: inherit;\n}\n`;\n\nexport const mathJaxStyles = (scopeId: string): string =>\n MATHJAX_STYLES.replaceAll(\":scope\", `#${scopeId}`).trim();\n","import createDOMPurify, {\n type Config,\n type DOMPurify as DOMPurifyInstance,\n type UponSanitizeAttributeHookEvent,\n} from \"dompurify\";\n\nimport { canonicalImageSource } from \"@tsmono/util\";\n\nimport { escapeHtmlCharacters } from \"./markdownText\";\nimport { mathJaxStyles } from \"./mathjaxStyles\";\n\nconst FORBIDDEN_TAGS = [\n \"animate\",\n \"animatemotion\",\n \"animatetransform\",\n \"audio\",\n \"base\",\n \"button\",\n \"discard\",\n \"embed\",\n \"foreignobject\",\n \"form\",\n \"iframe\",\n \"image\",\n \"input\",\n \"link\",\n \"meta\",\n \"mpath\",\n \"object\",\n \"picture\",\n \"script\",\n \"select\",\n \"set\",\n \"source\",\n \"textarea\",\n \"track\",\n \"video\",\n];\n\nconst MATHJAX_TAGS = [\"mjx-assistive-mml\", \"mjx-container\", \"style\"];\n\nconst MATHJAX_ATTRS = [\n \"display\",\n \"focusable\",\n \"jax\",\n \"justify\",\n \"role\",\n \"unselectable\",\n \"width\",\n];\n\nconst URL_ATTRIBUTES = new Set([\n \"action\",\n \"background\",\n \"formaction\",\n \"href\",\n \"poster\",\n \"src\",\n \"xlink:href\",\n]);\n\n// Browsers enumerate a parsed shorthand as its longhands (jsdom lists both),\n// so each allowlist below names the longhands too.\nconst BOX_EDGES = [\"top\", \"right\", \"bottom\", \"left\"];\nconst BOX_LONGHANDS = [\n \"overflow-x\",\n \"overflow-y\",\n ...BOX_EDGES.flatMap((edge) => [\n `margin-${edge}`,\n `padding-${edge}`,\n `border-${edge}-color`,\n `border-${edge}-style`,\n `border-${edge}-width`,\n ]),\n];\n\n// Inline styles reach the sanitizer from log content (TeX \\style{}, any\n// raw-HTML producer), so they may not take an element out of normal flow or\n// paint beyond its box: no `position` (even `relative` paints above the text\n// that follows a zero-height parent), no insets, no box-shadow, and\n// isSafeStyleValue further limits `margin`. MathJax's container gets its\n// `position: relative` from the viewer-owned stylesheet instead.\nconst INLINE_STYLE_PROPERTIES = new Set([\n ...BOX_LONGHANDS,\n \"-khtml-user-select\",\n \"-moz-user-select\",\n \"-ms-user-select\",\n \"-webkit-touch-callout\",\n \"-webkit-user-select\",\n \"background-color\",\n \"border\",\n \"clip\",\n \"color\",\n \"direction\",\n \"display\",\n \"fill\",\n \"font-family\",\n \"font-size\",\n \"height\",\n \"line-height\",\n \"margin\",\n \"min-height\",\n \"min-width\",\n \"overflow\",\n \"padding\",\n \"stroke\",\n \"stroke-dasharray\",\n \"stroke-linecap\",\n \"stroke-width\",\n \"text-align\",\n \"user-select\",\n \"vertical-align\",\n \"width\",\n]);\n\n// Any other function (url, image-set, image, src, expression, ...) can load a\n// resource or run code; allowlisting is what makes escape spellings moot.\n// calc(), var() and the newer colour functions are deliberately absent: MathJax\n// emits none, and they add nothing a log author needs.\nconst SAFE_CSS_FUNCTIONS = new Set([\"hsl\", \"hsla\", \"rect\", \"rgb\", \"rgba\"]);\n\nconst UNSAFE_CSS_PATTERN =\n /@import|behavior\\s*:|binding\\s*:|expression\\s*\\(|javascript\\s*:|vbscript\\s*:|url\\s*\\(/i;\n\n// Backslashes are CSS escapes the tokenizer decodes but a text match does not\n// (`\\75rl(` is `url(`); `@` starts an at-rule; `<` is markup. MathJax emits none.\nconst RAW_CSS_REJECT_PATTERN = /[\\\\@<]/;\n\nconst MATHJAX_WRAPPER_ID = /^mjx-[a-f0-9]+$/i;\n\nconst PURIFY_CONFIG: Config = {\n ADD_ATTR: [...MATHJAX_ATTRS, \"target\"],\n // Redundant today — `img` is already in DOMPurify's DEFAULT_DATA_URI_TAGS —\n // but stated explicitly so a change to that default cannot silently break\n // inline images. It grants no safety of its own: `safeImgSrc` is the gate.\n ADD_DATA_URI_TAGS: [\"img\"],\n ADD_TAGS: MATHJAX_TAGS,\n ALLOW_DATA_ATTR: true,\n ALLOW_UNKNOWN_PROTOCOLS: false,\n // `overflow` is SVG's presentation attribute; `visible` lets a 1x1 SVG paint\n // its shapes anywhere. MathJax sets overflow through CSS only.\n FORBID_ATTR: [\"overflow\", \"srcdoc\", \"srcset\"],\n FORBID_TAGS: FORBIDDEN_TAGS,\n USE_PROFILES: { html: true, mathMl: true, svg: true },\n};\n\nlet purify: DOMPurifyInstance | undefined;\nlet hooksInstalled = false;\n\nexport const sanitizeRenderedHtml = (html: string): string => {\n if (!html) {\n return html;\n }\n\n const purifier = getPurify();\n if (!purifier) {\n return escapeHtmlCharacters(html);\n }\n\n return purifier.sanitize(html, PURIFY_CONFIG);\n};\n\nconst getPurify = (): DOMPurifyInstance | undefined => {\n if (typeof window === \"undefined\") {\n return undefined;\n }\n\n if (!purify) {\n purify = createDOMPurify(window);\n }\n\n installHooks(purify);\n return purify;\n};\n\nconst installHooks = (purify: DOMPurifyInstance): void => {\n if (hooksInstalled) {\n return;\n }\n hooksInstalled = true;\n\n purify.addHook(\"uponSanitizeElement\", (node, hookEvent) => {\n if (hookEvent.tagName !== \"style\" || !(node instanceof Element)) {\n return;\n }\n const css = sanitizeMathJaxStyleElement(node);\n if (css) {\n node.textContent = css;\n } else {\n node.remove();\n }\n });\n\n purify.addHook(\"uponSanitizeAttribute\", (node, hookEvent) => {\n if (hookEvent.attrName === \"style\") {\n // The accessible copy must stay clipped; inline !important could\n // override even the viewer-owned stylesheet's clipping rule.\n if (node.tagName.toLowerCase() === \"mjx-assistive-mml\") {\n hookEvent.keepAttr = false;\n node.removeAttribute(\"style\");\n return;\n }\n sanitizeStyleAttributeHook(node, hookEvent);\n return;\n }\n\n if (hookEvent.attrName === \"src\" && isImgElement(node)) {\n const canonical = safeImgSrc(hookEvent.attrValue);\n if (canonical === undefined) {\n hookEvent.keepAttr = false;\n node.removeAttribute(hookEvent.attrName);\n } else {\n hookEvent.attrValue = canonical;\n }\n return;\n }\n\n if (\n URL_ATTRIBUTES.has(hookEvent.attrName) &&\n !isSafeUrlAttribute(hookEvent.attrValue)\n ) {\n hookEvent.keepAttr = false;\n node.removeAttribute(hookEvent.attrName);\n }\n });\n\n purify.addHook(\"afterSanitizeAttributes\", (node) => {\n if (!(node instanceof Element)) {\n return;\n }\n\n // Catches every route to a src-less img — rejected above, stripped by\n // DOMPurify's own checks, or never present — all of which would otherwise\n // ship a broken-image placeholder.\n if (isImgElement(node)) {\n if (safeImgSrc(node.getAttribute(\"src\") ?? \"\") === undefined) {\n node.remove();\n }\n return;\n }\n\n if (\n node.tagName.toLowerCase() === \"a\" &&\n node.getAttribute(\"target\")?.toLowerCase() === \"_blank\"\n ) {\n node.setAttribute(\"rel\", \"noopener noreferrer\");\n }\n });\n};\n\nconst sanitizeStyleAttributeHook = (\n node: Element,\n hookEvent: UponSanitizeAttributeHookEvent\n): void => {\n const safeStyle = sanitizeStyleAttribute(hookEvent.attrValue);\n if (safeStyle) {\n hookEvent.attrValue = safeStyle;\n } else {\n hookEvent.keepAttr = false;\n node.removeAttribute(hookEvent.attrName);\n }\n};\n\nconst isImgElement = (node: Element): boolean =>\n node.tagName.toLowerCase() === \"img\";\n\n/**\n * A remote src is not unsafe by protocol, but fetching it leaks a request to an\n * attacker-chosen host, so an img src is limited to inline raster data.\n *\n * Returns the value to keep, so the attribute that lands in the DOM is the one\n * that was validated.\n */\nconst safeImgSrc = (value: string): string | undefined => {\n if (/[<>\"'`]/.test(value.trim())) {\n return undefined;\n }\n return canonicalImageSource(value);\n};\n\nconst isSafeUrlAttribute = (value: string): boolean => {\n const trimmed = value.trim();\n if (!trimmed) {\n return true;\n }\n\n if (/[<>\"'`]/.test(trimmed)) {\n return false;\n }\n\n const normalized = Array.from(trimmed)\n .filter((char) => {\n const charCode = char.charCodeAt(0);\n return charCode > 0x1f && charCode !== 0x7f && !/\\s/.test(char);\n })\n .join(\"\");\n\n if (/^data:/i.test(normalized)) {\n return false;\n }\n\n return !/^(?:javascript|vbscript):/i.test(normalized);\n};\n\nconst sanitizeStyleAttribute = (style: string): string => {\n if (\n !style ||\n UNSAFE_CSS_PATTERN.test(style) ||\n RAW_CSS_REJECT_PATTERN.test(style)\n ) {\n return \"\";\n }\n\n const scratch = document.createElement(\"span\");\n scratch.setAttribute(\"style\", style);\n return safeDeclarations(scratch.style).join(\" \");\n};\n\nconst safeDeclarations = (style: CSSStyleDeclaration): string[] => {\n const declarations: string[] = [];\n for (const property of Array.from(style)) {\n const normalizedProperty = property.toLowerCase();\n const value = style.getPropertyValue(property);\n if (\n !INLINE_STYLE_PROPERTIES.has(normalizedProperty) ||\n !value ||\n !isSafeStyleValue(normalizedProperty, value)\n ) {\n continue;\n }\n const priority = style.getPropertyPriority(property);\n declarations.push(\n `${normalizedProperty}: ${value}${priority ? ` !${priority}` : \"\"};`\n );\n }\n return declarations;\n};\n\nconst isSafeStyleValue = (property: string, value: string): boolean => {\n if (UNSAFE_CSS_PATTERN.test(value) || RAW_CSS_REJECT_PATTERN.test(value)) {\n return false;\n }\n for (const call of value.matchAll(/([-\\w]*)\\s*\\(/g)) {\n if (!SAFE_CSS_FUNCTIONS.has((call[1] ?? \"\").toLowerCase())) {\n return false;\n }\n }\n // A negative margin pulls the box over neighbouring content while staying\n // in normal flow.\n if (property.startsWith(\"overflow\") && /\\bvisible\\b/.test(value)) {\n return false;\n }\n if (property.startsWith(\"margin\") && /(?:^|\\s)-/.test(value)) {\n return false;\n }\n return true;\n};\n\n// A MathJax-shaped wrapper is not proof that its CSS came from MathJax.\n// Replace the sheet with viewer-owned rules; only the validated id is reused.\nconst sanitizeMathJaxStyleElement = (element: Element): string => {\n const parent = element.parentElement;\n const scopeId = parent?.getAttribute(\"id\") ?? \"\";\n if (\n parent?.tagName.toLowerCase() !== \"span\" ||\n !MATHJAX_WRAPPER_ID.test(scopeId)\n ) {\n return \"\";\n }\n return mathJaxStyles(scopeId);\n};\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,16],"mappings":";;;;AAEA,IAAM,cAAc,CAAC;AAErB,SAAS,eAAgB,SAAS;CAChC,IAAI,QAAQ,YAAY;CACxB,IAAI,OAAS,OAAO;CAEpB,QAAQ,YAAY,WAAW,CAAC;CAEhC,KAAK,IAAI,IAAI,GAAG,IAAI,KAAK,KAAK;EAC5B,MAAM,KAAK,OAAO,aAAa,CAAC;EAChC,MAAM,KAAK,EAAE;CACf;CAEA,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;EACvC,MAAM,KAAK,QAAQ,WAAW,CAAC;EAC/B,MAAM,MAAM,OAAO,MAAM,GAAG,SAAS,EAAE,CAAC,CAAC,YAAY,EAAA,CAAG,MAAM,EAAE;CAClE;CAEA,OAAO;AACT;AAIA,SAASA,SAAQ,QAAQ,SAAS;CAChC,IAAI,OAAO,YAAY,UACrB,UAAUA,SAAO;CAGnB,MAAM,QAAQ,eAAe,OAAO;CAEpC,OAAO,OAAO,QAAQ,qBAAqB,SAAU,KAAK;EACxD,IAAI,SAAS;EAEb,KAAK,IAAI,IAAI,GAAG,IAAI,IAAI,QAAQ,IAAI,GAAG,KAAK,GAAG;GAC7C,MAAM,KAAK,SAAS,IAAI,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE;GAE/C,IA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