@arcgis/coding-components 5.0.0-next.69 → 5.0.0-next.70

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 (86) hide show
  1. package/dist/addons.js +1 -1
  2. package/dist/cdn/{6VMVE6UY.js → 2CUX34GX.js} +2 -2
  3. package/dist/cdn/{SGH5BVF7.js → 3ASWH7MC.js} +2 -2
  4. package/dist/cdn/{YXKNJPRJ.js → 4AWDQ6B5.js} +1 -1
  5. package/dist/cdn/{YSK3GR2U.js → 4RSUPTCZ.js} +1 -1
  6. package/dist/cdn/{HWRLCN2M.js → 5YA7EUGD.js} +1 -1
  7. package/dist/cdn/{SRB64GE3.js → 65ALXNI4.js} +2 -2
  8. package/dist/cdn/{MT7NSK5M.js → 6ABG3LRC.js} +2 -2
  9. package/dist/cdn/{ANIEGF3M.js → 6G3FQCBG.js} +2 -2
  10. package/dist/cdn/{WG4PF6TQ.js → 6VF5J2BQ.js} +1 -1
  11. package/dist/cdn/{QA6V6PEF.js → 6WGYGF7S.js} +2 -2
  12. package/dist/cdn/{GSDCAR3G.js → 7FN56ZDU.js} +2 -2
  13. package/dist/cdn/{2PWQ6IX6.js → 7ODJJUAO.js} +2 -2
  14. package/dist/cdn/{MI5L5JTP.js → 7YINVBKE.js} +2 -2
  15. package/dist/cdn/{JUFC5X3F.js → A6SRRW5L.js} +2 -2
  16. package/dist/cdn/{UA34XXRL.js → BCS66CB2.js} +2 -2
  17. package/dist/cdn/D7HOMBEO.js +4 -0
  18. package/dist/cdn/{BKZSRBOI.js → E6KR7J2X.js} +2 -2
  19. package/dist/cdn/{GIHHXU4F.js → EPK23SWO.js} +2 -2
  20. package/dist/cdn/{LGKCX7PF.js → HIPJMH6D.js} +2 -2
  21. package/dist/cdn/{SAWAI47N.js → IHOOG2V2.js} +2 -2
  22. package/dist/cdn/{4VBKGY3Y.js → IILYYQ5B.js} +2 -2
  23. package/dist/cdn/{SF55K6KD.js → J2XL5ABY.js} +1 -1
  24. package/dist/cdn/{M6JNMYW5.js → J3RQ7EZI.js} +2 -2
  25. package/dist/cdn/{UGMFX4YE.js → KES77UGV.js} +2 -2
  26. package/dist/cdn/{N7F4ZKCY.js → KR7OL3QM.js} +2 -2
  27. package/dist/cdn/{BLRFHPRW.js → KWI7ZFMB.js} +2 -2
  28. package/dist/cdn/{HLAMSGZK.js → LIE6GKNR.js} +2 -2
  29. package/dist/cdn/{M5VHMSKM.js → LQ4VOLYE.js} +2 -2
  30. package/dist/cdn/{ELSCOMZM.js → NX6BGSZ2.js} +2 -2
  31. package/dist/cdn/{T74STOLC.js → NXCDUGJZ.js} +1 -1
  32. package/dist/cdn/{QRVBNTXX.js → OFR7X7NP.js} +2 -2
  33. package/dist/cdn/{XUGXA467.js → OHPWJHII.js} +3 -3
  34. package/dist/cdn/{NZRBDLSX.js → OYQFEGTT.js} +2 -2
  35. package/dist/cdn/{BJNO4URE.js → P2PTHZDP.js} +2 -2
  36. package/dist/cdn/{MFSYPFUV.js → PKEMRA4B.js} +2 -2
  37. package/dist/cdn/{6YWQZYFT.js → QYN53WEO.js} +2 -2
  38. package/dist/cdn/{63L3I4AR.js → RXT6NTYJ.js} +2 -2
  39. package/dist/cdn/{JJZI272B.js → SDV5KUEB.js} +2 -2
  40. package/dist/cdn/{DHQRJUWX.js → SK4OW3HD.js} +2 -2
  41. package/dist/cdn/{Y2GWKRO7.js → TPJZJIKG.js} +2 -2
  42. package/dist/cdn/{ITC6545B.js → VW46QRNY.js} +2 -2
  43. package/dist/cdn/{XCSB3ZH4.js → XGJ5AC72.js} +2 -2
  44. package/dist/cdn/XKQCBEH2.js +62 -0
  45. package/dist/cdn/{XNMETXSZ.js → Y3HFGDKB.js} +2 -2
  46. package/dist/cdn/{2ANBIXMV.js → YCFU4DWF.js} +2 -2
  47. package/dist/cdn/{ZOSYVM7K.js → ZDKDX7WW.js} +2 -2
  48. package/dist/cdn/{7QXI5S54.js → ZTLLZOVS.js} +1 -1
  49. package/dist/cdn/assets/code-editor/sql-expr.worker.js +1418 -1408
  50. package/dist/cdn/index.js +2 -2
  51. package/dist/chunks/arcade-contribution.js +1 -1
  52. package/dist/chunks/arcade-defaults.js +1 -1
  53. package/dist/chunks/arcade-executor.js +1 -1
  54. package/dist/chunks/arcade-mode.js +1 -1
  55. package/dist/chunks/arcade-service-accessors.js +1 -1
  56. package/dist/chunks/colorize.js +1 -1
  57. package/dist/chunks/editor.js +1 -1
  58. package/dist/chunks/fields.js +1 -1
  59. package/dist/chunks/language-defaults-base.js +1 -1
  60. package/dist/chunks/markdown.js +335 -330
  61. package/dist/chunks/monaco-importer.js +1 -1
  62. package/dist/chunks/runtime.js +1 -1
  63. package/dist/chunks/sql-expr-defaults.js +1 -1
  64. package/dist/chunks/sql-expr-mode.js +1 -1
  65. package/dist/chunks/sql-expr-service-accessors.js +1 -1
  66. package/dist/chunks/useT9n.js +1 -1
  67. package/dist/chunks/utilities.js +1 -1
  68. package/dist/components/arcgis-arcade-coding-assistant/customElement.js +1 -1
  69. package/dist/components/arcgis-arcade-editor/customElement.js +1 -1
  70. package/dist/components/arcgis-arcade-results/customElement.js +1 -1
  71. package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
  72. package/dist/components/arcgis-code-editor/customElement.js +1 -1
  73. package/dist/components/arcgis-code-viewer/customElement.js +1 -1
  74. package/dist/components/arcgis-editor-variables/customElement.js +1 -1
  75. package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
  76. package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
  77. package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
  78. package/dist/docs/api.json +2 -2
  79. package/dist/docs/docs.json +2 -2
  80. package/dist/docs/web-types.json +1 -1
  81. package/dist/index.js +1 -1
  82. package/dist/loader.js +1 -1
  83. package/dist/monacoStyles.js +1 -1
  84. package/package.json +5 -5
  85. package/dist/cdn/O4BHVHTN.js +0 -62
  86. package/dist/cdn/YK6ZSDG7.js +0 -4
@@ -1,80 +1,80 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.69 */
4
- function H() {
3
+ v5.0.0-next.70 */
4
+ function D() {
5
5
  return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
6
6
  }
7
- var R = H();
8
- function le(n) {
9
- R = n;
7
+ var R = D();
8
+ function ne(s) {
9
+ R = s;
10
10
  }
11
11
  var _ = { exec: () => null };
12
- function p(n, e = "") {
13
- let r = typeof n == "string" ? n : n.source, s = { replace: (t, i) => {
12
+ function p(s, e = "") {
13
+ let r = typeof s == "string" ? s : s.source, n = { replace: (t, i) => {
14
14
  let l = typeof i == "string" ? i : i.source;
15
- return l = l.replace(x.caret, "$1"), r = r.replace(t, l), s;
15
+ return l = l.replace(x.caret, "$1"), r = r.replace(t, l), n;
16
16
  }, getRegex: () => new RegExp(r, e) };
17
- return s;
17
+ return n;
18
18
  }
19
- var xe = (() => {
19
+ var de = (() => {
20
20
  try {
21
21
  return !!new RegExp("(?<=1)(?<!1)");
22
22
  } catch {
23
23
  return !1;
24
24
  }
25
- })(), x = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (n) => new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}#`), htmlBeginRegex: (n) => new RegExp(`^ {0,${Math.min(3, n - 1)}}<(?:[a-z].*>|!--)`, "i") }, be = /^(?:[ \t]*(?:\n|$))+/, we = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, me = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, P = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, ye = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Q = /(?:[*+-]|\d{1,9}[.)])/, ie = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ae = p(ie).replace(/bull/g, Q).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), $e = p(ie).replace(/bull/g, Q).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), N = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Re = /^[^\n]+/, j = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Se = p(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", j).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Te = p(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Q).getRegex(), v = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", G = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, ze = p("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", G).replace("tag", v).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), oe = p(N).replace("hr", P).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), Ae = p(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", oe).getRegex(), X = { blockquote: Ae, code: we, def: Se, fences: me, heading: ye, hr: P, html: ze, lheading: ae, list: Te, newline: be, paragraph: oe, table: _, text: Re }, Y = p("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", P).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), _e = { ...X, lheading: $e, table: Y, paragraph: p(N).replace("hr", P).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Y).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex() }, Pe = { ...X, html: p(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", G).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: _, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: p(N).replace("hr", P).replace("heading", ` *#{1,6} *[^
26
- ]`).replace("lheading", ae).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Ie = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Le = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ce = /^( {2,}|\\)\n(?!\s*$)/, Ce = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, B = /[\p{P}\p{S}]/u, F = /[\s\p{P}\p{S}]/u, he = /[^\s\p{P}\p{S}]/u, qe = p(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, F).getRegex(), pe = /(?!~)[\p{P}\p{S}]/u, ve = /(?!~)[\s\p{P}\p{S}]/u, Be = /(?:[^\s\p{P}\p{S}]|~)/u, Ee = p(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", xe ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), ue = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Ze = p(ue, "u").replace(/punct/g, B).getRegex(), Me = p(ue, "u").replace(/punct/g, pe).getRegex(), ge = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", De = p(ge, "gu").replace(/notPunctSpace/g, he).replace(/punctSpace/g, F).replace(/punct/g, B).getRegex(), Oe = p(ge, "gu").replace(/notPunctSpace/g, Be).replace(/punctSpace/g, ve).replace(/punct/g, pe).getRegex(), He = p("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, he).replace(/punctSpace/g, F).replace(/punct/g, B).getRegex(), Qe = p(/\\(punct)/, "gu").replace(/punct/g, B).getRegex(), Ne = p(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), je = p(G).replace("(?:-->|$)", "-->").getRegex(), Ge = p("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", je).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), L = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Xe = p(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", L).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ke = p(/^!?\[(label)\]\[(ref)\]/).replace("label", L).replace("ref", j).getRegex(), fe = p(/^!?\[(ref)\](?:\[\])?/).replace("ref", j).getRegex(), Fe = p("reflink|nolink(?!\\()", "g").replace("reflink", ke).replace("nolink", fe).getRegex(), ee = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, W = { _backpedal: _, anyPunctuation: Qe, autolink: Ne, blockSkip: Ee, br: ce, code: Le, del: _, emStrongLDelim: Ze, emStrongRDelimAst: De, emStrongRDelimUnd: He, escape: Ie, link: Xe, nolink: fe, punctuation: qe, reflink: ke, reflinkSearch: Fe, tag: Ge, text: Ce, url: _ }, We = { ...W, link: p(/^!?\[(label)\]\((.*?)\)/).replace("label", L).getRegex(), reflink: p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", L).getRegex() }, M = { ...W, emStrongRDelimAst: Oe, emStrongLDelim: Me, url: p(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ee).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: p(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ee).getRegex() }, Ue = { ...M, br: p(ce).replace("{2,}", "*").getRegex(), text: p(M.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, I = { normal: X, gfm: _e, pedantic: Pe }, T = { normal: W, gfm: M, breaks: Ue, pedantic: We }, Je = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, te = (n) => Je[n];
27
- function y(n, e) {
25
+ })(), x = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (s) => new RegExp(`^( {0,3}${s})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}#`), htmlBeginRegex: (s) => new RegExp(`^ {0,${Math.min(3, s - 1)}}<(?:[a-z].*>|!--)`, "i") }, xe = /^(?:[ \t]*(?:\n|$))+/, be = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, we = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, P = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, me = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, O = /(?:[*+-]|\d{1,9}[.)])/, le = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ie = p(le).replace(/bull/g, O).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), ye = p(le).replace(/bull/g, O).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), H = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, $e = /^[^\n]+/, N = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Re = p(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", N).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Se = p(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, O).getRegex(), v = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", j = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Te = p("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", j).replace("tag", v).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ae = p(H).replace("hr", P).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), ze = p(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ae).getRegex(), G = { blockquote: ze, code: be, def: Re, fences: we, heading: me, hr: P, html: Te, lheading: ie, list: Se, newline: xe, paragraph: ae, table: _, text: $e }, V = p("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", P).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), Ae = { ...G, lheading: ye, table: V, paragraph: p(H).replace("hr", P).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", V).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex() }, _e = { ...G, html: p(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", j).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: _, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: p(H).replace("hr", P).replace("heading", ` *#{1,6} *[^
26
+ ]`).replace("lheading", ie).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Pe = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ie = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, oe = /^( {2,}|\\)\n(?!\s*$)/, Le = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, B = /[\p{P}\p{S}]/u, X = /[\s\p{P}\p{S}]/u, ce = /[^\s\p{P}\p{S}]/u, Ce = p(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, X).getRegex(), he = /(?!~)[\p{P}\p{S}]/u, qe = /(?!~)[\s\p{P}\p{S}]/u, ve = /(?:[^\s\p{P}\p{S}]|~)/u, Be = p(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", de ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), pe = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Ee = p(pe, "u").replace(/punct/g, B).getRegex(), Ze = p(pe, "u").replace(/punct/g, he).getRegex(), ue = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Me = p(ue, "gu").replace(/notPunctSpace/g, ce).replace(/punctSpace/g, X).replace(/punct/g, B).getRegex(), Qe = p(ue, "gu").replace(/notPunctSpace/g, ve).replace(/punctSpace/g, qe).replace(/punct/g, he).getRegex(), De = p("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ce).replace(/punctSpace/g, X).replace(/punct/g, B).getRegex(), Oe = p(/\\(punct)/, "gu").replace(/punct/g, B).getRegex(), He = p(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Ne = p(j).replace("(?:-->|$)", "-->").getRegex(), je = p("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Ne).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), L = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Ge = p(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", L).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ge = p(/^!?\[(label)\]\[(ref)\]/).replace("label", L).replace("ref", N).getRegex(), ke = p(/^!?\[(ref)\](?:\[\])?/).replace("ref", N).getRegex(), Xe = p("reflink|nolink(?!\\()", "g").replace("reflink", ge).replace("nolink", ke).getRegex(), Y = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, F = { _backpedal: _, anyPunctuation: Oe, autolink: He, blockSkip: Be, br: oe, code: Ie, del: _, emStrongLDelim: Ee, emStrongRDelimAst: Me, emStrongRDelimUnd: De, escape: Pe, link: Ge, nolink: ke, punctuation: Ce, reflink: ge, reflinkSearch: Xe, tag: je, text: Le, url: _ }, Fe = { ...F, link: p(/^!?\[(label)\]\((.*?)\)/).replace("label", L).getRegex(), reflink: p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", L).getRegex() }, Z = { ...F, emStrongRDelimAst: Qe, emStrongLDelim: Ze, url: p(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Y).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: p(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Y).getRegex() }, We = { ...Z, br: p(oe).replace("{2,}", "*").getRegex(), text: p(Z.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, I = { normal: G, gfm: Ae, pedantic: _e }, T = { normal: F, gfm: Z, breaks: We, pedantic: Fe }, Ue = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, ee = (s) => Ue[s];
27
+ function y(s, e) {
28
28
  if (e) {
29
- if (x.escapeTest.test(n)) return n.replace(x.escapeReplace, te);
30
- } else if (x.escapeTestNoEncode.test(n)) return n.replace(x.escapeReplaceNoEncode, te);
31
- return n;
29
+ if (x.escapeTest.test(s)) return s.replace(x.escapeReplace, ee);
30
+ } else if (x.escapeTestNoEncode.test(s)) return s.replace(x.escapeReplaceNoEncode, ee);
31
+ return s;
32
32
  }
33
- function re(n) {
33
+ function te(s) {
34
34
  try {
35
- n = encodeURI(n).replace(x.percentDecode, "%");
35
+ s = encodeURI(s).replace(x.percentDecode, "%");
36
36
  } catch {
37
37
  return null;
38
38
  }
39
- return n;
39
+ return s;
40
40
  }
41
- function ne(n, e) {
42
- let r = n.replace(x.findPipe, (i, l, o) => {
41
+ function re(s, e) {
42
+ let r = s.replace(x.findPipe, (i, l, o) => {
43
43
  let a = !1, h = l;
44
44
  for (; --h >= 0 && o[h] === "\\"; ) a = !a;
45
45
  return a ? "|" : " |";
46
- }), s = r.split(x.splitPipe), t = 0;
47
- if (s[0].trim() || s.shift(), s.length > 0 && !s.at(-1)?.trim() && s.pop(), e) if (s.length > e) s.splice(e);
48
- else for (; s.length < e; ) s.push("");
49
- for (; t < s.length; t++) s[t] = s[t].trim().replace(x.slashPipe, "|");
50
- return s;
46
+ }), n = r.split(x.splitPipe), t = 0;
47
+ if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), e) if (n.length > e) n.splice(e);
48
+ else for (; n.length < e; ) n.push("");
49
+ for (; t < n.length; t++) n[t] = n[t].trim().replace(x.slashPipe, "|");
50
+ return n;
51
51
  }
52
- function z(n, e, r) {
53
- let s = n.length;
54
- if (s === 0) return "";
52
+ function z(s, e, r) {
53
+ let n = s.length;
54
+ if (n === 0) return "";
55
55
  let t = 0;
56
- for (; t < s && n.charAt(s - t - 1) === e; )
56
+ for (; t < n && s.charAt(n - t - 1) === e; )
57
57
  t++;
58
- return n.slice(0, s - t);
58
+ return s.slice(0, n - t);
59
59
  }
60
- function Ke(n, e) {
61
- if (n.indexOf(e[1]) === -1) return -1;
60
+ function Je(s, e) {
61
+ if (s.indexOf(e[1]) === -1) return -1;
62
62
  let r = 0;
63
- for (let s = 0; s < n.length; s++) if (n[s] === "\\") s++;
64
- else if (n[s] === e[0]) r++;
65
- else if (n[s] === e[1] && (r--, r < 0)) return s;
63
+ for (let n = 0; n < s.length; n++) if (s[n] === "\\") n++;
64
+ else if (s[n] === e[0]) r++;
65
+ else if (s[n] === e[1] && (r--, r < 0)) return n;
66
66
  return r > 0 ? -2 : -1;
67
67
  }
68
- function se(n, e, r, s, t) {
69
- let i = e.href, l = e.title || null, o = n[1].replace(t.other.outputLinkReplace, "$1");
70
- s.state.inLink = !0;
71
- let a = { type: n[0].charAt(0) === "!" ? "image" : "link", raw: r, href: i, title: l, text: o, tokens: s.inlineTokens(o) };
72
- return s.state.inLink = !1, a;
68
+ function se(s, e, r, n, t) {
69
+ let i = e.href, l = e.title || null, o = s[1].replace(t.other.outputLinkReplace, "$1");
70
+ n.state.inLink = !0;
71
+ let a = { type: s[0].charAt(0) === "!" ? "image" : "link", raw: r, href: i, title: l, text: o, tokens: n.inlineTokens(o) };
72
+ return n.state.inLink = !1, a;
73
73
  }
74
- function Ve(n, e, r) {
75
- let s = n.match(r.other.indentCodeCompensation);
76
- if (s === null) return e;
77
- let t = s[1];
74
+ function Ke(s, e, r) {
75
+ let n = s.match(r.other.indentCodeCompensation);
76
+ if (n === null) return e;
77
+ let t = n[1];
78
78
  return e.split(`
79
79
  `).map((i) => {
80
80
  let l = i.match(r.other.beginningSpace);
@@ -88,50 +88,50 @@ var C = class {
88
88
  options;
89
89
  rules;
90
90
  lexer;
91
- constructor(n) {
92
- this.options = n || R;
91
+ constructor(s) {
92
+ this.options = s || R;
93
93
  }
94
- space(n) {
95
- let e = this.rules.block.newline.exec(n);
94
+ space(s) {
95
+ let e = this.rules.block.newline.exec(s);
96
96
  if (e && e[0].length > 0) return { type: "space", raw: e[0] };
97
97
  }
98
- code(n) {
99
- let e = this.rules.block.code.exec(n);
98
+ code(s) {
99
+ let e = this.rules.block.code.exec(s);
100
100
  if (e) {
101
101
  let r = e[0].replace(this.rules.other.codeRemoveIndent, "");
102
102
  return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ? r : z(r, `
103
103
  `) };
104
104
  }
105
105
  }
106
- fences(n) {
107
- let e = this.rules.block.fences.exec(n);
106
+ fences(s) {
107
+ let e = this.rules.block.fences.exec(s);
108
108
  if (e) {
109
- let r = e[0], s = Ve(r, e[3] || "", this.rules);
110
- return { type: "code", raw: r, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: s };
109
+ let r = e[0], n = Ke(r, e[3] || "", this.rules);
110
+ return { type: "code", raw: r, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: n };
111
111
  }
112
112
  }
113
- heading(n) {
114
- let e = this.rules.block.heading.exec(n);
113
+ heading(s) {
114
+ let e = this.rules.block.heading.exec(s);
115
115
  if (e) {
116
116
  let r = e[2].trim();
117
117
  if (this.rules.other.endingHash.test(r)) {
118
- let s = z(r, "#");
119
- (this.options.pedantic || !s || this.rules.other.endingSpaceChar.test(s)) && (r = s.trim());
118
+ let n = z(r, "#");
119
+ (this.options.pedantic || !n || this.rules.other.endingSpaceChar.test(n)) && (r = n.trim());
120
120
  }
121
121
  return { type: "heading", raw: e[0], depth: e[1].length, text: r, tokens: this.lexer.inline(r) };
122
122
  }
123
123
  }
124
- hr(n) {
125
- let e = this.rules.block.hr.exec(n);
124
+ hr(s) {
125
+ let e = this.rules.block.hr.exec(s);
126
126
  if (e) return { type: "hr", raw: z(e[0], `
127
127
  `) };
128
128
  }
129
- blockquote(n) {
130
- let e = this.rules.block.blockquote.exec(n);
129
+ blockquote(s) {
130
+ let e = this.rules.block.blockquote.exec(s);
131
131
  if (e) {
132
132
  let r = z(e[0], `
133
133
  `).split(`
134
- `), s = "", t = "", i = [];
134
+ `), n = "", t = "", i = [];
135
135
  for (; r.length > 0; ) {
136
136
  let l = !1, o = [], a;
137
137
  for (a = 0; a < r.length; a++) if (this.rules.other.blockquoteStart.test(r[a])) o.push(r[a]), l = !0;
@@ -141,7 +141,7 @@ var C = class {
141
141
  let h = o.join(`
142
142
  `), c = h.replace(this.rules.other.blockquoteSetextReplace, `
143
143
  $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
144
- s = s ? `${s}
144
+ n = n ? `${n}
145
145
  ${h}` : h, t = t ? `${t}
146
146
  ${c}` : c;
147
147
  let k = this.lexer.state.top;
@@ -152,54 +152,52 @@ ${c}` : c;
152
152
  let d = u, f = d.raw + `
153
153
  ` + r.join(`
154
154
  `), b = this.blockquote(f);
155
- i[i.length - 1] = b, s = s.substring(0, s.length - d.raw.length) + b.raw, t = t.substring(0, t.length - d.text.length) + b.text;
155
+ i[i.length - 1] = b, n = n.substring(0, n.length - d.raw.length) + b.raw, t = t.substring(0, t.length - d.text.length) + b.text;
156
156
  break;
157
157
  } else if (u?.type === "list") {
158
158
  let d = u, f = d.raw + `
159
159
  ` + r.join(`
160
160
  `), b = this.list(f);
161
- i[i.length - 1] = b, s = s.substring(0, s.length - u.raw.length) + b.raw, t = t.substring(0, t.length - d.raw.length) + b.raw, r = f.substring(i.at(-1).raw.length).split(`
161
+ i[i.length - 1] = b, n = n.substring(0, n.length - u.raw.length) + b.raw, t = t.substring(0, t.length - d.raw.length) + b.raw, r = f.substring(i.at(-1).raw.length).split(`
162
162
  `);
163
163
  continue;
164
164
  }
165
165
  }
166
- return { type: "blockquote", raw: s, tokens: i, text: t };
166
+ return { type: "blockquote", raw: n, tokens: i, text: t };
167
167
  }
168
168
  }
169
- list(n) {
170
- let e = this.rules.block.list.exec(n);
169
+ list(s) {
170
+ let e = this.rules.block.list.exec(s);
171
171
  if (e) {
172
- let r = e[1].trim(), s = r.length > 1, t = { type: "list", raw: "", ordered: s, start: s ? +r.slice(0, -1) : "", loose: !1, items: [] };
173
- r = s ? `\\d{1,9}\\${r.slice(-1)}` : `\\${r}`, this.options.pedantic && (r = s ? r : "[*+-]");
172
+ let r = e[1].trim(), n = r.length > 1, t = { type: "list", raw: "", ordered: n, start: n ? +r.slice(0, -1) : "", loose: !1, items: [] };
173
+ r = n ? `\\d{1,9}\\${r.slice(-1)}` : `\\${r}`, this.options.pedantic && (r = n ? r : "[*+-]");
174
174
  let i = this.rules.other.listItemRegex(r), l = !1;
175
- for (; n; ) {
175
+ for (; s; ) {
176
176
  let a = !1, h = "", c = "";
177
- if (!(e = i.exec(n)) || this.rules.block.hr.test(n)) break;
178
- h = e[0], n = n.substring(h.length);
177
+ if (!(e = i.exec(s)) || this.rules.block.hr.test(s)) break;
178
+ h = e[0], s = s.substring(h.length);
179
179
  let k = e[2].split(`
180
- `, 1)[0].replace(this.rules.other.listReplaceTabs, (E) => " ".repeat(3 * E.length)), u = n.split(`
180
+ `, 1)[0].replace(this.rules.other.listReplaceTabs, (b) => " ".repeat(3 * b.length)), u = s.split(`
181
181
  `, 1)[0], d = !k.trim(), f = 0;
182
182
  if (this.options.pedantic ? (f = 2, c = k.trimStart()) : d ? f = e[1].length + 1 : (f = e[2].search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, c = k.slice(f), f += e[1].length), d && this.rules.other.blankLine.test(u) && (h += u + `
183
- `, n = n.substring(u.length + 1), a = !0), !a) {
184
- let E = this.rules.other.nextBulletRegex(f), J = this.rules.other.hrRegex(f), K = this.rules.other.fencesBeginRegex(f), V = this.rules.other.headingBeginRegex(f), de = this.rules.other.htmlBeginRegex(f);
185
- for (; n; ) {
186
- let Z = n.split(`
183
+ `, s = s.substring(u.length + 1), a = !0), !a) {
184
+ let b = this.rules.other.nextBulletRegex(f), U = this.rules.other.hrRegex(f), J = this.rules.other.fencesBeginRegex(f), K = this.rules.other.headingBeginRegex(f), fe = this.rules.other.htmlBeginRegex(f);
185
+ for (; s; ) {
186
+ let E = s.split(`
187
187
  `, 1)[0], S;
188
- if (u = Z, this.options.pedantic ? (u = u.replace(this.rules.other.listReplaceNesting, " "), S = u) : S = u.replace(this.rules.other.tabCharGlobal, " "), K.test(u) || V.test(u) || de.test(u) || E.test(u) || J.test(u)) break;
188
+ if (u = E, this.options.pedantic ? (u = u.replace(this.rules.other.listReplaceNesting, " "), S = u) : S = u.replace(this.rules.other.tabCharGlobal, " "), J.test(u) || K.test(u) || fe.test(u) || b.test(u) || U.test(u)) break;
189
189
  if (S.search(this.rules.other.nonSpaceChar) >= f || !u.trim()) c += `
190
190
  ` + S.slice(f);
191
191
  else {
192
- if (d || k.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || K.test(k) || V.test(k) || J.test(k)) break;
192
+ if (d || k.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || J.test(k) || K.test(k) || U.test(k)) break;
193
193
  c += `
194
194
  ` + u;
195
195
  }
196
- !d && !u.trim() && (d = !0), h += Z + `
197
- `, n = n.substring(Z.length + 1), k = S.slice(f);
196
+ !d && !u.trim() && (d = !0), h += E + `
197
+ `, s = s.substring(E.length + 1), k = S.slice(f);
198
198
  }
199
199
  }
200
- t.loose || (l ? t.loose = !0 : this.rules.other.doubleBlankLine.test(h) && (l = !0));
201
- let b = null;
202
- this.options.gfm && (b = this.rules.other.listIsTask.exec(c), b && (c = c.replace(this.rules.other.listReplaceTask, ""))), t.items.push({ type: "list_item", raw: h, task: !!b, loose: !1, text: c, tokens: [] }), t.raw += h;
200
+ t.loose || (l ? t.loose = !0 : this.rules.other.doubleBlankLine.test(h) && (l = !0)), t.items.push({ type: "list_item", raw: h, task: !!this.options.gfm && this.rules.other.listIsTask.test(c), loose: !1, text: c, tokens: [] }), t.raw += h;
203
201
  }
204
202
  let o = t.items.at(-1);
205
203
  if (o) o.raw = o.raw.trimEnd(), o.text = o.text.trimEnd();
@@ -207,6 +205,13 @@ ${c}` : c;
207
205
  t.raw = t.raw.trimEnd();
208
206
  for (let a of t.items) {
209
207
  if (this.lexer.state.top = !1, a.tokens = this.lexer.blockTokens(a.text, []), a.task) {
208
+ if (a.text = a.text.replace(this.rules.other.listReplaceTask, ""), a.tokens[0]?.type === "text" || a.tokens[0]?.type === "paragraph") {
209
+ a.tokens[0].raw = a.tokens[0].raw.replace(this.rules.other.listReplaceTask, ""), a.tokens[0].text = a.tokens[0].text.replace(this.rules.other.listReplaceTask, "");
210
+ for (let c = this.lexer.inlineQueue.length - 1; c >= 0; c--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)) {
211
+ this.lexer.inlineQueue[c].src = this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask, "");
212
+ break;
213
+ }
214
+ }
210
215
  let h = this.rules.other.listTaskCheckbox.exec(a.raw);
211
216
  if (h) {
212
217
  let c = { type: "checkbox", raw: h[0] + " ", checked: h[0] !== "[ ]" };
@@ -225,55 +230,55 @@ ${c}` : c;
225
230
  return t;
226
231
  }
227
232
  }
228
- html(n) {
229
- let e = this.rules.block.html.exec(n);
233
+ html(s) {
234
+ let e = this.rules.block.html.exec(s);
230
235
  if (e) return { type: "html", block: !0, raw: e[0], pre: e[1] === "pre" || e[1] === "script" || e[1] === "style", text: e[0] };
231
236
  }
232
- def(n) {
233
- let e = this.rules.block.def.exec(n);
237
+ def(s) {
238
+ let e = this.rules.block.def.exec(s);
234
239
  if (e) {
235
- let r = e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), s = e[2] ? e[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", t = e[3] ? e[3].substring(1, e[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : e[3];
236
- return { type: "def", tag: r, raw: e[0], href: s, title: t };
240
+ let r = e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), n = e[2] ? e[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", t = e[3] ? e[3].substring(1, e[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : e[3];
241
+ return { type: "def", tag: r, raw: e[0], href: n, title: t };
237
242
  }
238
243
  }
239
- table(n) {
240
- let e = this.rules.block.table.exec(n);
244
+ table(s) {
245
+ let e = this.rules.block.table.exec(s);
241
246
  if (!e || !this.rules.other.tableDelimiter.test(e[2])) return;
242
- let r = ne(e[1]), s = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), t = e[3]?.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
247
+ let r = re(e[1]), n = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), t = e[3]?.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
243
248
  `) : [], i = { type: "table", raw: e[0], header: [], align: [], rows: [] };
244
- if (r.length === s.length) {
245
- for (let l of s) this.rules.other.tableAlignRight.test(l) ? i.align.push("right") : this.rules.other.tableAlignCenter.test(l) ? i.align.push("center") : this.rules.other.tableAlignLeft.test(l) ? i.align.push("left") : i.align.push(null);
249
+ if (r.length === n.length) {
250
+ for (let l of n) this.rules.other.tableAlignRight.test(l) ? i.align.push("right") : this.rules.other.tableAlignCenter.test(l) ? i.align.push("center") : this.rules.other.tableAlignLeft.test(l) ? i.align.push("left") : i.align.push(null);
246
251
  for (let l = 0; l < r.length; l++) i.header.push({ text: r[l], tokens: this.lexer.inline(r[l]), header: !0, align: i.align[l] });
247
- for (let l of t) i.rows.push(ne(l, i.header.length).map((o, a) => ({ text: o, tokens: this.lexer.inline(o), header: !1, align: i.align[a] })));
252
+ for (let l of t) i.rows.push(re(l, i.header.length).map((o, a) => ({ text: o, tokens: this.lexer.inline(o), header: !1, align: i.align[a] })));
248
253
  return i;
249
254
  }
250
255
  }
251
- lheading(n) {
252
- let e = this.rules.block.lheading.exec(n);
256
+ lheading(s) {
257
+ let e = this.rules.block.lheading.exec(s);
253
258
  if (e) return { type: "heading", raw: e[0], depth: e[2].charAt(0) === "=" ? 1 : 2, text: e[1], tokens: this.lexer.inline(e[1]) };
254
259
  }
255
- paragraph(n) {
256
- let e = this.rules.block.paragraph.exec(n);
260
+ paragraph(s) {
261
+ let e = this.rules.block.paragraph.exec(s);
257
262
  if (e) {
258
263
  let r = e[1].charAt(e[1].length - 1) === `
259
264
  ` ? e[1].slice(0, -1) : e[1];
260
265
  return { type: "paragraph", raw: e[0], text: r, tokens: this.lexer.inline(r) };
261
266
  }
262
267
  }
263
- text(n) {
264
- let e = this.rules.block.text.exec(n);
268
+ text(s) {
269
+ let e = this.rules.block.text.exec(s);
265
270
  if (e) return { type: "text", raw: e[0], text: e[0], tokens: this.lexer.inline(e[0]) };
266
271
  }
267
- escape(n) {
268
- let e = this.rules.inline.escape.exec(n);
272
+ escape(s) {
273
+ let e = this.rules.inline.escape.exec(s);
269
274
  if (e) return { type: "escape", raw: e[0], text: e[1] };
270
275
  }
271
- tag(n) {
272
- let e = this.rules.inline.tag.exec(n);
276
+ tag(s) {
277
+ let e = this.rules.inline.tag.exec(s);
273
278
  if (e) return !this.lexer.state.inLink && this.rules.other.startATag.test(e[0]) ? this.lexer.state.inLink = !0 : this.lexer.state.inLink && this.rules.other.endATag.test(e[0]) && (this.lexer.state.inLink = !1), !this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(e[0]) ? this.lexer.state.inRawBlock = !0 : this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(e[0]) && (this.lexer.state.inRawBlock = !1), { type: "html", raw: e[0], inLink: this.lexer.state.inLink, inRawBlock: this.lexer.state.inRawBlock, block: !1, text: e[0] };
274
279
  }
275
- link(n) {
276
- let e = this.rules.inline.link.exec(n);
280
+ link(s) {
281
+ let e = this.rules.inline.link.exec(s);
277
282
  if (e) {
278
283
  let r = e[2].trim();
279
284
  if (!this.options.pedantic && this.rules.other.startAngleBracket.test(r)) {
@@ -281,25 +286,25 @@ ${c}` : c;
281
286
  let i = z(r.slice(0, -1), "\\");
282
287
  if ((r.length - i.length) % 2 === 0) return;
283
288
  } else {
284
- let i = Ke(e[2], "()");
289
+ let i = Je(e[2], "()");
285
290
  if (i === -2) return;
286
291
  if (i > -1) {
287
292
  let l = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + i;
288
293
  e[2] = e[2].substring(0, i), e[0] = e[0].substring(0, l).trim(), e[3] = "";
289
294
  }
290
295
  }
291
- let s = e[2], t = "";
296
+ let n = e[2], t = "";
292
297
  if (this.options.pedantic) {
293
- let i = this.rules.other.pedanticHrefTitle.exec(s);
294
- i && (s = i[1], t = i[3]);
298
+ let i = this.rules.other.pedanticHrefTitle.exec(n);
299
+ i && (n = i[1], t = i[3]);
295
300
  } else t = e[3] ? e[3].slice(1, -1) : "";
296
- return s = s.trim(), this.rules.other.startAngleBracket.test(s) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(r) ? s = s.slice(1) : s = s.slice(1, -1)), se(e, { href: s && s.replace(this.rules.inline.anyPunctuation, "$1"), title: t && t.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
301
+ return n = n.trim(), this.rules.other.startAngleBracket.test(n) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(r) ? n = n.slice(1) : n = n.slice(1, -1)), se(e, { href: n && n.replace(this.rules.inline.anyPunctuation, "$1"), title: t && t.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
297
302
  }
298
303
  }
299
- reflink(n, e) {
304
+ reflink(s, e) {
300
305
  let r;
301
- if ((r = this.rules.inline.reflink.exec(n)) || (r = this.rules.inline.nolink.exec(n))) {
302
- let s = (r[2] || r[1]).replace(this.rules.other.multipleSpaceGlobal, " "), t = e[s.toLowerCase()];
306
+ if ((r = this.rules.inline.reflink.exec(s)) || (r = this.rules.inline.nolink.exec(s))) {
307
+ let n = (r[2] || r[1]).replace(this.rules.other.multipleSpaceGlobal, " "), t = e[n.toLowerCase()];
303
308
  if (!t) {
304
309
  let i = r[0].charAt(0);
305
310
  return { type: "text", raw: i, text: i };
@@ -307,22 +312,22 @@ ${c}` : c;
307
312
  return se(r, t, r[0], this.lexer, this.rules);
308
313
  }
309
314
  }
310
- emStrong(n, e, r = "") {
311
- let s = this.rules.inline.emStrongLDelim.exec(n);
312
- if (!(!s || s[3] && r.match(this.rules.other.unicodeAlphaNumeric)) && (!(s[1] || s[2]) || !r || this.rules.inline.punctuation.exec(r))) {
313
- let t = [...s[0]].length - 1, i, l, o = t, a = 0, h = s[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
314
- for (h.lastIndex = 0, e = e.slice(-1 * n.length + t); (s = h.exec(e)) != null; ) {
315
- if (i = s[1] || s[2] || s[3] || s[4] || s[5] || s[6], !i) continue;
316
- if (l = [...i].length, s[3] || s[4]) {
315
+ emStrong(s, e, r = "") {
316
+ let n = this.rules.inline.emStrongLDelim.exec(s);
317
+ if (!(!n || n[3] && r.match(this.rules.other.unicodeAlphaNumeric)) && (!(n[1] || n[2]) || !r || this.rules.inline.punctuation.exec(r))) {
318
+ let t = [...n[0]].length - 1, i, l, o = t, a = 0, h = n[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
319
+ for (h.lastIndex = 0, e = e.slice(-1 * s.length + t); (n = h.exec(e)) != null; ) {
320
+ if (i = n[1] || n[2] || n[3] || n[4] || n[5] || n[6], !i) continue;
321
+ if (l = [...i].length, n[3] || n[4]) {
317
322
  o += l;
318
323
  continue;
319
- } else if ((s[5] || s[6]) && t % 3 && !((t + l) % 3)) {
324
+ } else if ((n[5] || n[6]) && t % 3 && !((t + l) % 3)) {
320
325
  a += l;
321
326
  continue;
322
327
  }
323
328
  if (o -= l, o > 0) continue;
324
329
  l = Math.min(l, l + o + a);
325
- let c = [...s[0]][0].length, k = n.slice(0, t + s.index + c + l);
330
+ let c = [...n[0]][0].length, k = s.slice(0, t + n.index + c + l);
326
331
  if (Math.min(t, l) % 2) {
327
332
  let d = k.slice(1, -1);
328
333
  return { type: "em", raw: k, text: d, tokens: this.lexer.inlineTokens(d) };
@@ -332,56 +337,56 @@ ${c}` : c;
332
337
  }
333
338
  }
334
339
  }
335
- codespan(n) {
336
- let e = this.rules.inline.code.exec(n);
340
+ codespan(s) {
341
+ let e = this.rules.inline.code.exec(s);
337
342
  if (e) {
338
- let r = e[2].replace(this.rules.other.newLineCharGlobal, " "), s = this.rules.other.nonSpaceChar.test(r), t = this.rules.other.startingSpaceChar.test(r) && this.rules.other.endingSpaceChar.test(r);
339
- return s && t && (r = r.substring(1, r.length - 1)), { type: "codespan", raw: e[0], text: r };
343
+ let r = e[2].replace(this.rules.other.newLineCharGlobal, " "), n = this.rules.other.nonSpaceChar.test(r), t = this.rules.other.startingSpaceChar.test(r) && this.rules.other.endingSpaceChar.test(r);
344
+ return n && t && (r = r.substring(1, r.length - 1)), { type: "codespan", raw: e[0], text: r };
340
345
  }
341
346
  }
342
- br(n) {
343
- let e = this.rules.inline.br.exec(n);
347
+ br(s) {
348
+ let e = this.rules.inline.br.exec(s);
344
349
  if (e) return { type: "br", raw: e[0] };
345
350
  }
346
- del(n) {
347
- let e = this.rules.inline.del.exec(n);
351
+ del(s) {
352
+ let e = this.rules.inline.del.exec(s);
348
353
  if (e) return { type: "del", raw: e[0], text: e[2], tokens: this.lexer.inlineTokens(e[2]) };
349
354
  }
350
- autolink(n) {
351
- let e = this.rules.inline.autolink.exec(n);
355
+ autolink(s) {
356
+ let e = this.rules.inline.autolink.exec(s);
352
357
  if (e) {
353
- let r, s;
354
- return e[2] === "@" ? (r = e[1], s = "mailto:" + r) : (r = e[1], s = r), { type: "link", raw: e[0], text: r, href: s, tokens: [{ type: "text", raw: r, text: r }] };
358
+ let r, n;
359
+ return e[2] === "@" ? (r = e[1], n = "mailto:" + r) : (r = e[1], n = r), { type: "link", raw: e[0], text: r, href: n, tokens: [{ type: "text", raw: r, text: r }] };
355
360
  }
356
361
  }
357
- url(n) {
362
+ url(s) {
358
363
  let e;
359
- if (e = this.rules.inline.url.exec(n)) {
360
- let r, s;
361
- if (e[2] === "@") r = e[0], s = "mailto:" + r;
364
+ if (e = this.rules.inline.url.exec(s)) {
365
+ let r, n;
366
+ if (e[2] === "@") r = e[0], n = "mailto:" + r;
362
367
  else {
363
368
  let t;
364
369
  do
365
370
  t = e[0], e[0] = this.rules.inline._backpedal.exec(e[0])?.[0] ?? "";
366
371
  while (t !== e[0]);
367
- r = e[0], e[1] === "www." ? s = "http://" + e[0] : s = e[0];
372
+ r = e[0], e[1] === "www." ? n = "http://" + e[0] : n = e[0];
368
373
  }
369
- return { type: "link", raw: e[0], text: r, href: s, tokens: [{ type: "text", raw: r, text: r }] };
374
+ return { type: "link", raw: e[0], text: r, href: n, tokens: [{ type: "text", raw: r, text: r }] };
370
375
  }
371
376
  }
372
- inlineText(n) {
373
- let e = this.rules.inline.text.exec(n);
377
+ inlineText(s) {
378
+ let e = this.rules.inline.text.exec(s);
374
379
  if (e) {
375
380
  let r = this.lexer.state.inRawBlock;
376
381
  return { type: "text", raw: e[0], text: e[0], escaped: r };
377
382
  }
378
383
  }
379
- }, w = class D {
384
+ }, w = class M {
380
385
  tokens;
381
386
  options;
382
387
  state;
383
- tokenizer;
384
388
  inlineQueue;
389
+ tokenizer;
385
390
  constructor(e) {
386
391
  this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || R, this.options.tokenizer = this.options.tokenizer || new C(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
387
392
  let r = { other: x, block: I.normal, inline: T.normal };
@@ -391,21 +396,21 @@ ${c}` : c;
391
396
  return { block: I, inline: T };
392
397
  }
393
398
  static lex(e, r) {
394
- return new D(r).lex(e);
399
+ return new M(r).lex(e);
395
400
  }
396
401
  static lexInline(e, r) {
397
- return new D(r).inlineTokens(e);
402
+ return new M(r).inlineTokens(e);
398
403
  }
399
404
  lex(e) {
400
405
  e = e.replace(x.carriageReturn, `
401
406
  `), this.blockTokens(e, this.tokens);
402
407
  for (let r = 0; r < this.inlineQueue.length; r++) {
403
- let s = this.inlineQueue[r];
404
- this.inlineTokens(s.src, s.tokens);
408
+ let n = this.inlineQueue[r];
409
+ this.inlineTokens(n.src, n.tokens);
405
410
  }
406
411
  return this.inlineQueue = [], this.tokens;
407
412
  }
408
- blockTokens(e, r = [], s = !1) {
413
+ blockTokens(e, r = [], n = !1) {
409
414
  for (this.options.pedantic && (e = e.replace(x.tabCharGlobal, " ").replace(x.spaceLine, "")); e; ) {
410
415
  let t;
411
416
  if (this.options.extensions?.block?.some((l) => (t = l.call({ lexer: this }, e, r)) ? (e = e.substring(t.raw.length), r.push(t), !0) : !1)) continue;
@@ -475,10 +480,10 @@ ${c}` : c;
475
480
  }
476
481
  if (this.state.top && (t = this.tokenizer.paragraph(i))) {
477
482
  let l = r.at(-1);
478
- s && l?.type === "paragraph" ? (l.raw += (l.raw.endsWith(`
483
+ n && l?.type === "paragraph" ? (l.raw += (l.raw.endsWith(`
479
484
  `) ? "" : `
480
485
  `) + t.raw, l.text += `
481
- ` + t.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = l.text) : r.push(t), s = i.length !== e.length, e = e.substring(t.raw.length);
486
+ ` + t.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = l.text) : r.push(t), n = i.length !== e.length, e = e.substring(t.raw.length);
482
487
  continue;
483
488
  }
484
489
  if (t = this.tokenizer.text(e)) {
@@ -504,15 +509,15 @@ ${c}` : c;
504
509
  return this.inlineQueue.push({ src: e, tokens: r }), r;
505
510
  }
506
511
  inlineTokens(e, r = []) {
507
- let s = e, t = null;
512
+ let n = e, t = null;
508
513
  if (this.tokens.links) {
509
514
  let a = Object.keys(this.tokens.links);
510
- if (a.length > 0) for (; (t = this.tokenizer.rules.inline.reflinkSearch.exec(s)) != null; ) a.includes(t[0].slice(t[0].lastIndexOf("[") + 1, -1)) && (s = s.slice(0, t.index) + "[" + "a".repeat(t[0].length - 2) + "]" + s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
515
+ if (a.length > 0) for (; (t = this.tokenizer.rules.inline.reflinkSearch.exec(n)) != null; ) a.includes(t[0].slice(t[0].lastIndexOf("[") + 1, -1)) && (n = n.slice(0, t.index) + "[" + "a".repeat(t[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
511
516
  }
512
- for (; (t = this.tokenizer.rules.inline.anyPunctuation.exec(s)) != null; ) s = s.slice(0, t.index) + "++" + s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
517
+ for (; (t = this.tokenizer.rules.inline.anyPunctuation.exec(n)) != null; ) n = n.slice(0, t.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
513
518
  let i;
514
- for (; (t = this.tokenizer.rules.inline.blockSkip.exec(s)) != null; ) i = t[2] ? t[2].length : 0, s = s.slice(0, t.index + i) + "[" + "a".repeat(t[0].length - i - 2) + "]" + s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
515
- s = this.options.hooks?.emStrongMask?.call({ lexer: this }, s) ?? s;
519
+ for (; (t = this.tokenizer.rules.inline.blockSkip.exec(n)) != null; ) i = t[2] ? t[2].length : 0, n = n.slice(0, t.index + i) + "[" + "a".repeat(t[0].length - i - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
520
+ n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
516
521
  let l = !1, o = "";
517
522
  for (; e; ) {
518
523
  l || (o = ""), l = !1;
@@ -536,7 +541,7 @@ ${c}` : c;
536
541
  a.type === "text" && c?.type === "text" ? (c.raw += a.raw, c.text += a.text) : r.push(a);
537
542
  continue;
538
543
  }
539
- if (a = this.tokenizer.emStrong(e, s, o)) {
544
+ if (a = this.tokenizer.emStrong(e, n, o)) {
540
545
  e = e.substring(a.raw.length), r.push(a);
541
546
  continue;
542
547
  }
@@ -586,168 +591,168 @@ ${c}` : c;
586
591
  }, q = class {
587
592
  options;
588
593
  parser;
589
- constructor(n) {
590
- this.options = n || R;
594
+ constructor(s) {
595
+ this.options = s || R;
591
596
  }
592
- space(n) {
597
+ space(s) {
593
598
  return "";
594
599
  }
595
- code({ text: n, lang: e, escaped: r }) {
596
- let s = (e || "").match(x.notSpaceStart)?.[0], t = n.replace(x.endingNewline, "") + `
600
+ code({ text: s, lang: e, escaped: r }) {
601
+ let n = (e || "").match(x.notSpaceStart)?.[0], t = s.replace(x.endingNewline, "") + `
597
602
  `;
598
- return s ? '<pre><code class="language-' + y(s) + '">' + (r ? t : y(t, !0)) + `</code></pre>
603
+ return n ? '<pre><code class="language-' + y(n) + '">' + (r ? t : y(t, !0)) + `</code></pre>
599
604
  ` : "<pre><code>" + (r ? t : y(t, !0)) + `</code></pre>
600
605
  `;
601
606
  }
602
- blockquote({ tokens: n }) {
607
+ blockquote({ tokens: s }) {
603
608
  return `<blockquote>
604
- ${this.parser.parse(n)}</blockquote>
609
+ ${this.parser.parse(s)}</blockquote>
605
610
  `;
606
611
  }
607
- html({ text: n }) {
608
- return n;
612
+ html({ text: s }) {
613
+ return s;
609
614
  }
610
- def(n) {
615
+ def(s) {
611
616
  return "";
612
617
  }
613
- heading({ tokens: n, depth: e }) {
614
- return `<h${e}>${this.parser.parseInline(n)}</h${e}>
618
+ heading({ tokens: s, depth: e }) {
619
+ return `<h${e}>${this.parser.parseInline(s)}</h${e}>
615
620
  `;
616
621
  }
617
- hr(n) {
622
+ hr(s) {
618
623
  return `<hr>
619
624
  `;
620
625
  }
621
- list(n) {
622
- let e = n.ordered, r = n.start, s = "";
623
- for (let l = 0; l < n.items.length; l++) {
624
- let o = n.items[l];
625
- s += this.listitem(o);
626
+ list(s) {
627
+ let e = s.ordered, r = s.start, n = "";
628
+ for (let l = 0; l < s.items.length; l++) {
629
+ let o = s.items[l];
630
+ n += this.listitem(o);
626
631
  }
627
632
  let t = e ? "ol" : "ul", i = e && r !== 1 ? ' start="' + r + '"' : "";
628
633
  return "<" + t + i + `>
629
- ` + s + "</" + t + `>
634
+ ` + n + "</" + t + `>
630
635
  `;
631
636
  }
632
- listitem(n) {
633
- return `<li>${this.parser.parse(n.tokens)}</li>
637
+ listitem(s) {
638
+ return `<li>${this.parser.parse(s.tokens)}</li>
634
639
  `;
635
640
  }
636
- checkbox({ checked: n }) {
637
- return "<input " + (n ? 'checked="" ' : "") + 'disabled="" type="checkbox"> ';
641
+ checkbox({ checked: s }) {
642
+ return "<input " + (s ? 'checked="" ' : "") + 'disabled="" type="checkbox"> ';
638
643
  }
639
- paragraph({ tokens: n }) {
640
- return `<p>${this.parser.parseInline(n)}</p>
644
+ paragraph({ tokens: s }) {
645
+ return `<p>${this.parser.parseInline(s)}</p>
641
646
  `;
642
647
  }
643
- table(n) {
648
+ table(s) {
644
649
  let e = "", r = "";
645
- for (let t = 0; t < n.header.length; t++) r += this.tablecell(n.header[t]);
650
+ for (let t = 0; t < s.header.length; t++) r += this.tablecell(s.header[t]);
646
651
  e += this.tablerow({ text: r });
647
- let s = "";
648
- for (let t = 0; t < n.rows.length; t++) {
649
- let i = n.rows[t];
652
+ let n = "";
653
+ for (let t = 0; t < s.rows.length; t++) {
654
+ let i = s.rows[t];
650
655
  r = "";
651
656
  for (let l = 0; l < i.length; l++) r += this.tablecell(i[l]);
652
- s += this.tablerow({ text: r });
657
+ n += this.tablerow({ text: r });
653
658
  }
654
- return s && (s = `<tbody>${s}</tbody>`), `<table>
659
+ return n && (n = `<tbody>${n}</tbody>`), `<table>
655
660
  <thead>
656
661
  ` + e + `</thead>
657
- ` + s + `</table>
662
+ ` + n + `</table>
658
663
  `;
659
664
  }
660
- tablerow({ text: n }) {
665
+ tablerow({ text: s }) {
661
666
  return `<tr>
662
- ${n}</tr>
667
+ ${s}</tr>
663
668
  `;
664
669
  }
665
- tablecell(n) {
666
- let e = this.parser.parseInline(n.tokens), r = n.header ? "th" : "td";
667
- return (n.align ? `<${r} align="${n.align}">` : `<${r}>`) + e + `</${r}>
670
+ tablecell(s) {
671
+ let e = this.parser.parseInline(s.tokens), r = s.header ? "th" : "td";
672
+ return (s.align ? `<${r} align="${s.align}">` : `<${r}>`) + e + `</${r}>
668
673
  `;
669
674
  }
670
- strong({ tokens: n }) {
671
- return `<strong>${this.parser.parseInline(n)}</strong>`;
675
+ strong({ tokens: s }) {
676
+ return `<strong>${this.parser.parseInline(s)}</strong>`;
672
677
  }
673
- em({ tokens: n }) {
674
- return `<em>${this.parser.parseInline(n)}</em>`;
678
+ em({ tokens: s }) {
679
+ return `<em>${this.parser.parseInline(s)}</em>`;
675
680
  }
676
- codespan({ text: n }) {
677
- return `<code>${y(n, !0)}</code>`;
681
+ codespan({ text: s }) {
682
+ return `<code>${y(s, !0)}</code>`;
678
683
  }
679
- br(n) {
684
+ br(s) {
680
685
  return "<br>";
681
686
  }
682
- del({ tokens: n }) {
683
- return `<del>${this.parser.parseInline(n)}</del>`;
687
+ del({ tokens: s }) {
688
+ return `<del>${this.parser.parseInline(s)}</del>`;
684
689
  }
685
- link({ href: n, title: e, tokens: r }) {
686
- let s = this.parser.parseInline(r), t = re(n);
687
- if (t === null) return s;
688
- n = t;
689
- let i = '<a href="' + n + '"';
690
- return e && (i += ' title="' + y(e) + '"'), i += ">" + s + "</a>", i;
690
+ link({ href: s, title: e, tokens: r }) {
691
+ let n = this.parser.parseInline(r), t = te(s);
692
+ if (t === null) return n;
693
+ s = t;
694
+ let i = '<a href="' + s + '"';
695
+ return e && (i += ' title="' + y(e) + '"'), i += ">" + n + "</a>", i;
691
696
  }
692
- image({ href: n, title: e, text: r, tokens: s }) {
693
- s && (r = this.parser.parseInline(s, this.parser.textRenderer));
694
- let t = re(n);
697
+ image({ href: s, title: e, text: r, tokens: n }) {
698
+ n && (r = this.parser.parseInline(n, this.parser.textRenderer));
699
+ let t = te(s);
695
700
  if (t === null) return y(r);
696
- n = t;
697
- let i = `<img src="${n}" alt="${r}"`;
701
+ s = t;
702
+ let i = `<img src="${s}" alt="${r}"`;
698
703
  return e && (i += ` title="${y(e)}"`), i += ">", i;
699
704
  }
700
- text(n) {
701
- return "tokens" in n && n.tokens ? this.parser.parseInline(n.tokens) : "escaped" in n && n.escaped ? n.text : y(n.text);
705
+ text(s) {
706
+ return "tokens" in s && s.tokens ? this.parser.parseInline(s.tokens) : "escaped" in s && s.escaped ? s.text : y(s.text);
702
707
  }
703
- }, U = class {
704
- strong({ text: n }) {
705
- return n;
708
+ }, W = class {
709
+ strong({ text: s }) {
710
+ return s;
706
711
  }
707
- em({ text: n }) {
708
- return n;
712
+ em({ text: s }) {
713
+ return s;
709
714
  }
710
- codespan({ text: n }) {
711
- return n;
715
+ codespan({ text: s }) {
716
+ return s;
712
717
  }
713
- del({ text: n }) {
714
- return n;
718
+ del({ text: s }) {
719
+ return s;
715
720
  }
716
- html({ text: n }) {
717
- return n;
721
+ html({ text: s }) {
722
+ return s;
718
723
  }
719
- text({ text: n }) {
720
- return n;
724
+ text({ text: s }) {
725
+ return s;
721
726
  }
722
- link({ text: n }) {
723
- return "" + n;
727
+ link({ text: s }) {
728
+ return "" + s;
724
729
  }
725
- image({ text: n }) {
726
- return "" + n;
730
+ image({ text: s }) {
731
+ return "" + s;
727
732
  }
728
733
  br() {
729
734
  return "";
730
735
  }
731
- checkbox({ raw: n }) {
732
- return n;
736
+ checkbox({ raw: s }) {
737
+ return s;
733
738
  }
734
- }, m = class O {
739
+ }, m = class Q {
735
740
  options;
736
741
  renderer;
737
742
  textRenderer;
738
743
  constructor(e) {
739
- this.options = e || R, this.options.renderer = this.options.renderer || new q(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new U();
744
+ this.options = e || R, this.options.renderer = this.options.renderer || new q(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new W();
740
745
  }
741
746
  static parse(e, r) {
742
- return new O(r).parse(e);
747
+ return new Q(r).parse(e);
743
748
  }
744
749
  static parseInline(e, r) {
745
- return new O(r).parseInline(e);
750
+ return new Q(r).parseInline(e);
746
751
  }
747
752
  parse(e) {
748
753
  let r = "";
749
- for (let s = 0; s < e.length; s++) {
750
- let t = e[s];
754
+ for (let n = 0; n < e.length; n++) {
755
+ let t = e[n];
751
756
  if (this.options.extensions?.renderers?.[t.type]) {
752
757
  let l = t, o = this.options.extensions.renderers[l.type].call({ parser: this }, l);
753
758
  if (o !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(l.type)) {
@@ -815,60 +820,60 @@ ${n}</tr>
815
820
  return r;
816
821
  }
817
822
  parseInline(e, r = this.renderer) {
818
- let s = "";
823
+ let n = "";
819
824
  for (let t = 0; t < e.length; t++) {
820
825
  let i = e[t];
821
826
  if (this.options.extensions?.renderers?.[i.type]) {
822
827
  let o = this.options.extensions.renderers[i.type].call({ parser: this }, i);
823
828
  if (o !== !1 || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(i.type)) {
824
- s += o || "";
829
+ n += o || "";
825
830
  continue;
826
831
  }
827
832
  }
828
833
  let l = i;
829
834
  switch (l.type) {
830
835
  case "escape": {
831
- s += r.text(l);
836
+ n += r.text(l);
832
837
  break;
833
838
  }
834
839
  case "html": {
835
- s += r.html(l);
840
+ n += r.html(l);
836
841
  break;
837
842
  }
838
843
  case "link": {
839
- s += r.link(l);
844
+ n += r.link(l);
840
845
  break;
841
846
  }
842
847
  case "image": {
843
- s += r.image(l);
848
+ n += r.image(l);
844
849
  break;
845
850
  }
846
851
  case "checkbox": {
847
- s += r.checkbox(l);
852
+ n += r.checkbox(l);
848
853
  break;
849
854
  }
850
855
  case "strong": {
851
- s += r.strong(l);
856
+ n += r.strong(l);
852
857
  break;
853
858
  }
854
859
  case "em": {
855
- s += r.em(l);
860
+ n += r.em(l);
856
861
  break;
857
862
  }
858
863
  case "codespan": {
859
- s += r.codespan(l);
864
+ n += r.codespan(l);
860
865
  break;
861
866
  }
862
867
  case "br": {
863
- s += r.br(l);
868
+ n += r.br(l);
864
869
  break;
865
870
  }
866
871
  case "del": {
867
- s += r.del(l);
872
+ n += r.del(l);
868
873
  break;
869
874
  }
870
875
  case "text": {
871
- s += r.text(l);
876
+ n += r.text(l);
872
877
  break;
873
878
  }
874
879
  default: {
@@ -878,27 +883,27 @@ ${n}</tr>
878
883
  }
879
884
  }
880
885
  }
881
- return s;
886
+ return n;
882
887
  }
883
888
  }, A = class {
884
889
  options;
885
890
  block;
886
- constructor(n) {
887
- this.options = n || R;
891
+ constructor(s) {
892
+ this.options = s || R;
888
893
  }
889
894
  static passThroughHooks = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"]);
890
895
  static passThroughHooksRespectAsync = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"]);
891
- preprocess(n) {
892
- return n;
896
+ preprocess(s) {
897
+ return s;
893
898
  }
894
- postprocess(n) {
895
- return n;
899
+ postprocess(s) {
900
+ return s;
896
901
  }
897
- processAllTokens(n) {
898
- return n;
902
+ processAllTokens(s) {
903
+ return s;
899
904
  }
900
- emStrongMask(n) {
901
- return n;
905
+ emStrongMask(s) {
906
+ return s;
902
907
  }
903
908
  provideLexer() {
904
909
  return this.block ? w.lex : w.lexInline;
@@ -906,36 +911,36 @@ ${n}</tr>
906
911
  provideParser() {
907
912
  return this.block ? m.parse : m.parseInline;
908
913
  }
909
- }, Ye = class {
910
- defaults = H();
914
+ }, Ve = class {
915
+ defaults = D();
911
916
  options = this.setOptions;
912
917
  parse = this.parseMarkdown(!0);
913
918
  parseInline = this.parseMarkdown(!1);
914
919
  Parser = m;
915
920
  Renderer = q;
916
- TextRenderer = U;
921
+ TextRenderer = W;
917
922
  Lexer = w;
918
923
  Tokenizer = C;
919
924
  Hooks = A;
920
- constructor(...n) {
921
- this.use(...n);
925
+ constructor(...s) {
926
+ this.use(...s);
922
927
  }
923
- walkTokens(n, e) {
928
+ walkTokens(s, e) {
924
929
  let r = [];
925
- for (let s of n) switch (r = r.concat(e.call(this, s)), s.type) {
930
+ for (let n of s) switch (r = r.concat(e.call(this, n)), n.type) {
926
931
  case "table": {
927
- let t = s;
932
+ let t = n;
928
933
  for (let i of t.header) r = r.concat(this.walkTokens(i.tokens, e));
929
934
  for (let i of t.rows) for (let l of i) r = r.concat(this.walkTokens(l.tokens, e));
930
935
  break;
931
936
  }
932
937
  case "list": {
933
- let t = s;
938
+ let t = n;
934
939
  r = r.concat(this.walkTokens(t.items, e));
935
940
  break;
936
941
  }
937
942
  default: {
938
- let t = s;
943
+ let t = n;
939
944
  this.defaults.extensions?.childTokens?.[t.type] ? this.defaults.extensions.childTokens[t.type].forEach((i) => {
940
945
  let l = t[i].flat(1 / 0);
941
946
  r = r.concat(this.walkTokens(l, e));
@@ -944,11 +949,11 @@ ${n}</tr>
944
949
  }
945
950
  return r;
946
951
  }
947
- use(...n) {
952
+ use(...s) {
948
953
  let e = this.defaults.extensions || { renderers: {}, childTokens: {} };
949
- return n.forEach((r) => {
950
- let s = { ...r };
951
- if (s.async = this.defaults.async || s.async || !1, r.extensions && (r.extensions.forEach((t) => {
954
+ return s.forEach((r) => {
955
+ let n = { ...r };
956
+ if (n.async = this.defaults.async || n.async || !1, r.extensions && (r.extensions.forEach((t) => {
952
957
  if (!t.name) throw new Error("extension name required");
953
958
  if ("renderer" in t) {
954
959
  let i = e.renderers[t.name];
@@ -963,7 +968,7 @@ ${n}</tr>
963
968
  i ? i.unshift(t.tokenizer) : e[t.level] = [t.tokenizer], t.start && (t.level === "block" ? e.startBlock ? e.startBlock.push(t.start) : e.startBlock = [t.start] : t.level === "inline" && (e.startInline ? e.startInline.push(t.start) : e.startInline = [t.start]));
964
969
  }
965
970
  "childTokens" in t && t.childTokens && (e.childTokens[t.name] = t.childTokens);
966
- }), s.extensions = e), r.renderer) {
971
+ }), n.extensions = e), r.renderer) {
967
972
  let t = this.defaults.renderer || new q(this.defaults);
968
973
  for (let i in r.renderer) {
969
974
  if (!(i in t)) throw new Error(`renderer '${i}' does not exist`);
@@ -974,7 +979,7 @@ ${n}</tr>
974
979
  return c === !1 && (c = a.apply(t, h)), c || "";
975
980
  };
976
981
  }
977
- s.renderer = t;
982
+ n.renderer = t;
978
983
  }
979
984
  if (r.tokenizer) {
980
985
  let t = this.defaults.tokenizer || new C(this.defaults);
@@ -987,7 +992,7 @@ ${n}</tr>
987
992
  return c === !1 && (c = a.apply(t, h)), c;
988
993
  };
989
994
  }
990
- s.tokenizer = t;
995
+ n.tokenizer = t;
991
996
  }
992
997
  if (r.hooks) {
993
998
  let t = this.defaults.hooks || new A();
@@ -1011,81 +1016,81 @@ ${n}</tr>
1011
1016
  return c === !1 && (c = a.apply(t, h)), c;
1012
1017
  };
1013
1018
  }
1014
- s.hooks = t;
1019
+ n.hooks = t;
1015
1020
  }
1016
1021
  if (r.walkTokens) {
1017
1022
  let t = this.defaults.walkTokens, i = r.walkTokens;
1018
- s.walkTokens = function(l) {
1023
+ n.walkTokens = function(l) {
1019
1024
  let o = [];
1020
1025
  return o.push(i.call(this, l)), t && (o = o.concat(t.call(this, l))), o;
1021
1026
  };
1022
1027
  }
1023
- this.defaults = { ...this.defaults, ...s };
1028
+ this.defaults = { ...this.defaults, ...n };
1024
1029
  }), this;
1025
1030
  }
1026
- setOptions(n) {
1027
- return this.defaults = { ...this.defaults, ...n }, this;
1031
+ setOptions(s) {
1032
+ return this.defaults = { ...this.defaults, ...s }, this;
1028
1033
  }
1029
- lexer(n, e) {
1030
- return w.lex(n, e ?? this.defaults);
1034
+ lexer(s, e) {
1035
+ return w.lex(s, e ?? this.defaults);
1031
1036
  }
1032
- parser(n, e) {
1033
- return m.parse(n, e ?? this.defaults);
1037
+ parser(s, e) {
1038
+ return m.parse(s, e ?? this.defaults);
1034
1039
  }
1035
- parseMarkdown(n) {
1040
+ parseMarkdown(s) {
1036
1041
  return (e, r) => {
1037
- let s = { ...r }, t = { ...this.defaults, ...s }, i = this.onError(!!t.silent, !!t.async);
1038
- if (this.defaults.async === !0 && s.async === !1) return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
1042
+ let n = { ...r }, t = { ...this.defaults, ...n }, i = this.onError(!!t.silent, !!t.async);
1043
+ if (this.defaults.async === !0 && n.async === !1) return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
1039
1044
  if (typeof e > "u" || e === null) return i(new Error("marked(): input parameter is undefined or null"));
1040
1045
  if (typeof e != "string") return i(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
1041
- if (t.hooks && (t.hooks.options = t, t.hooks.block = n), t.async) return (async () => {
1042
- let l = t.hooks ? await t.hooks.preprocess(e) : e, o = await (t.hooks ? await t.hooks.provideLexer() : n ? w.lex : w.lexInline)(l, t), a = t.hooks ? await t.hooks.processAllTokens(o) : o;
1046
+ if (t.hooks && (t.hooks.options = t, t.hooks.block = s), t.async) return (async () => {
1047
+ let l = t.hooks ? await t.hooks.preprocess(e) : e, o = await (t.hooks ? await t.hooks.provideLexer() : s ? w.lex : w.lexInline)(l, t), a = t.hooks ? await t.hooks.processAllTokens(o) : o;
1043
1048
  t.walkTokens && await Promise.all(this.walkTokens(a, t.walkTokens));
1044
- let h = await (t.hooks ? await t.hooks.provideParser() : n ? m.parse : m.parseInline)(a, t);
1049
+ let h = await (t.hooks ? await t.hooks.provideParser() : s ? m.parse : m.parseInline)(a, t);
1045
1050
  return t.hooks ? await t.hooks.postprocess(h) : h;
1046
1051
  })().catch(i);
1047
1052
  try {
1048
1053
  t.hooks && (e = t.hooks.preprocess(e));
1049
- let l = (t.hooks ? t.hooks.provideLexer() : n ? w.lex : w.lexInline)(e, t);
1054
+ let l = (t.hooks ? t.hooks.provideLexer() : s ? w.lex : w.lexInline)(e, t);
1050
1055
  t.hooks && (l = t.hooks.processAllTokens(l)), t.walkTokens && this.walkTokens(l, t.walkTokens);
1051
- let o = (t.hooks ? t.hooks.provideParser() : n ? m.parse : m.parseInline)(l, t);
1056
+ let o = (t.hooks ? t.hooks.provideParser() : s ? m.parse : m.parseInline)(l, t);
1052
1057
  return t.hooks && (o = t.hooks.postprocess(o)), o;
1053
1058
  } catch (l) {
1054
1059
  return i(l);
1055
1060
  }
1056
1061
  };
1057
1062
  }
1058
- onError(n, e) {
1063
+ onError(s, e) {
1059
1064
  return (r) => {
1060
1065
  if (r.message += `
1061
- Please report this to https://github.com/markedjs/marked.`, n) {
1062
- let s = "<p>An error occurred:</p><pre>" + y(r.message + "", !0) + "</pre>";
1063
- return e ? Promise.resolve(s) : s;
1066
+ Please report this to https://github.com/markedjs/marked.`, s) {
1067
+ let n = "<p>An error occurred:</p><pre>" + y(r.message + "", !0) + "</pre>";
1068
+ return e ? Promise.resolve(n) : n;
1064
1069
  }
1065
1070
  if (e) return Promise.reject(r);
1066
1071
  throw r;
1067
1072
  };
1068
1073
  }
1069
- }, $ = new Ye();
1070
- function g(n, e) {
1071
- return $.parse(n, e);
1074
+ }, $ = new Ve();
1075
+ function g(s, e) {
1076
+ return $.parse(s, e);
1072
1077
  }
1073
- g.options = g.setOptions = function(n) {
1074
- return $.setOptions(n), g.defaults = $.defaults, le(g.defaults), g;
1078
+ g.options = g.setOptions = function(s) {
1079
+ return $.setOptions(s), g.defaults = $.defaults, ne(g.defaults), g;
1075
1080
  };
1076
- g.getDefaults = H;
1081
+ g.getDefaults = D;
1077
1082
  g.defaults = R;
1078
- g.use = function(...n) {
1079
- return $.use(...n), g.defaults = $.defaults, le(g.defaults), g;
1083
+ g.use = function(...s) {
1084
+ return $.use(...s), g.defaults = $.defaults, ne(g.defaults), g;
1080
1085
  };
1081
- g.walkTokens = function(n, e) {
1082
- return $.walkTokens(n, e);
1086
+ g.walkTokens = function(s, e) {
1087
+ return $.walkTokens(s, e);
1083
1088
  };
1084
1089
  g.parseInline = $.parseInline;
1085
1090
  g.Parser = m;
1086
1091
  g.parser = m.parse;
1087
1092
  g.Renderer = q;
1088
- g.TextRenderer = U;
1093
+ g.TextRenderer = W;
1089
1094
  g.Lexer = w;
1090
1095
  g.lexer = w.lex;
1091
1096
  g.Tokenizer = C;
@@ -1103,18 +1108,18 @@ g.use({
1103
1108
  breaks: !0,
1104
1109
  async: !1,
1105
1110
  renderer: {
1106
- link({ href: n, title: e, tokens: r }) {
1107
- const s = this.parser.parseInline(r);
1108
- return `<calcite-link href="${n}" title="${e ?? s}" target="Arcade Help">${s}</calcite-link>`;
1111
+ link({ href: s, title: e, tokens: r }) {
1112
+ const n = this.parser.parseInline(r);
1113
+ return `<calcite-link href="${s}" title="${e ?? n}" target="Arcade Help">${n}</calcite-link>`;
1109
1114
  },
1110
- code({ lang: n, text: e }) {
1111
- return `<arcgis-code-viewer language="${n === "sql" ? "arcgis-sql-expression" : n}">${e}</arcgis-code-viewer>`;
1115
+ code({ lang: s, text: e }) {
1116
+ return `<arcgis-code-viewer language="${s === "sql" ? "arcgis-sql-expression" : s}">${e}</arcgis-code-viewer>`;
1112
1117
  }
1113
1118
  }
1114
1119
  });
1115
- function et(n) {
1116
- return n == null ? "" : g.parse(typeof n == "string" ? n : n.value, { async: !1 });
1120
+ function Ye(s) {
1121
+ return s == null ? "" : g.parse(typeof s == "string" ? s : s.value, { async: !1 });
1117
1122
  }
1118
1123
  export {
1119
- et as c
1124
+ Ye as c
1120
1125
  };