/** * marked v8.0.1 - a markdown parser * Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed) * https://github.com/markedjs/marked */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).marked={})}(this,function(t){"use strict";function e(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function n(e){t.defaults=e}t.defaults=e();const r=/[&<>"']/,s=new RegExp(r.source,"g"),i=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,l=new RegExp(i.source,"g"),a={"&":"&","<":"<",">":">",'"':""","'":"'"},o=e=>a[e];function c(e,t){if(t){if(r.test(e))return e.replace(s,o)}else if(i.test(e))return e.replace(l,o);return e}const b=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;const h=/(^|[^\[])\^/g;function p(n,e){n="string"==typeof n?n:n.source,e=e||"";const r={replace:(e,t)=>(t=(t="object"==typeof t&&"source"in t?t.source:t).replace(h,"$1"),n=n.replace(e,t),r),getRegex:()=>new RegExp(n,e)};return r}function u(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return null}return e}var g={exec:()=>null};function k(e,t){var n=e.replace(/\|/g,(e,t,n)=>{let r=!1,s=t;for(;0<=--s&&"\\"===n[s];)r=!r;return r?"|":" |"}).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),0t)n.splice(t);else for(;n.length{var t=e.match(/^\s+/);return null!==t&&([t]=t,t.length>=n.length)?e.slice(n.length):e}).join("\n")}(t=e[0],e[3]||""),{type:"code",raw:t,lang:e[2]&&e[2].trim().replace(this.rules.inline._escapes,"$1"),text:n}}heading(t){var n,t=this.rules.block.heading.exec(t);if(t){let e=t[2].trim();return/#$/.test(e)&&(n=f(e,"#"),!this.options.pedantic&&n&&!/ $/.test(n)||(e=n.trim())),{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){e=this.rules.block.hr.exec(e);if(e)return{type:"hr",raw:e[0]}}blockquote(e){var t,n,r,e=this.rules.block.blockquote.exec(e);if(e)return t=e[0].replace(/^ *>[ \t]?/gm,""),n=this.lexer.state.top,this.lexer.state.top=!0,r=this.lexer.blockTokens(t),this.lexer.state.top=n,{type:"blockquote",raw:e[0],tokens:r,text:t}}list(h){let p=this.rules.block.list.exec(h);if(p){let e=p[1].trim();var t,n=1" ".repeat(3*e.length)),n=h.split("\n",1)[0],r=0,s=(this.options.pedantic?(r=2,o=t.trimStart()):(r=4<(r=p[2].search(/[^ ]/))?1:r,o=t.slice(r),r+=p[1].length),!1);if(!t&&/^ *$/.test(n)&&(a+=n+"\n",h=h.substring(n.length+1),e=!0),!e)for(var k=new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),f=new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),d=new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),x=new RegExp(`^ {0,${Math.min(3,r-1)}}#`);h;){var b=h.split("\n",1)[0];if(n=b,this.options.pedantic&&(n=n.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),d.test(n))break;if(x.test(n))break;if(k.test(n))break;if(f.test(h))break;if(n.search(/[^ ]/)>=r||!n.trim())o+="\n"+n.slice(r);else{if(s)break;if(4<=t.search(/[^ ]/))break;if(d.test(t))break;if(x.test(t))break;if(f.test(t))break;o+="\n"+n}s||n.trim()||(s=!0),a+=b+"\n",h=h.substring(b.length+1),t=n.slice(r)}u.loose||(c?u.loose=!0:/\n *\n *$/.test(a)&&(c=!0));let i=null,l;this.options.gfm&&(i=/^\[[ xX]\] /.exec(o))&&(l="[ ] "!==i[0],o=o.replace(/^\[[ xX]\] +/,"")),u.items.push({type:"list_item",raw:a,task:!!i,checked:l,loose:!1,text:o,tokens:[]}),u.raw+=a}u.items[u.items.length-1].raw=a.trimEnd(),u.items[u.items.length-1].text=o.trimEnd(),u.raw=u.raw.trimEnd();for(let e=0;e"space"===e.type)).length&&t.some(e=>/\n.*\n/.test(e.raw)),u.loose=t);if(u.loose)for(let e=0;e$/,"$1").replace(this.rules.inline._escapes,"$1"):"",r=e[3]&&e[3].substring(1,e[3].length-1).replace(this.rules.inline._escapes,"$1"),{type:"def",tag:t,raw:e[0],href:n,title:r}}table(e){e=this.rules.block.table.exec(e);if(e){var i={type:"table",raw:e[0],header:k(e[1]).map(e=>({text:e,tokens:[]})),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(i.header.length===i.align.length){let e=i.align.length,t,n,r,s;for(t=0;t({text:e,tokens:[]}));for(e=i.header.length,n=0;n/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.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]}}link(n){n=this.rules.inline.link.exec(n);if(n){var r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;var s=f(r.slice(0,-1),"\\");if((r.length-s.length)%2==0)return}else{var i,s=function(n,r){if(-1!==n.indexOf(r[1])){let t=0;for(let e=0;e$/.test(r)?e.slice(1):e.slice(1,-1):e)&&e.replace(this.rules.inline._escapes,"$1"),title:t&&t.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if(r=(r=this.rules.inline.reflink.exec(t))||this.rules.inline.nolink.exec(t)){let e=(r[2]||r[1]).replace(/\s+/g," ");return(e=n[e.toLowerCase()])?d(r,e,r[0],this.lexer):{type:"text",raw:t=r[0].charAt(0),text:t}}}emStrong(s,i,e=""){let l=this.rules.inline.emStrong.lDelim.exec(s);if(l&&((!l[3]||!e.match(/[\p{L}\p{N}]/u))&&(!(l[1]||l[2]||"")||!e||this.rules.inline.punctuation.exec(e)))){var a=[...l[0]].length-1;let e,t,n=a,r=0;var o,c,h="*"===l[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(h.lastIndex=0,i=i.slice(-1*s.length+a);null!=(l=h.exec(i));)if(e=l[1]||l[2]||l[3]||l[4]||l[5]||l[6])if(t=[...e].length,l[3]||l[4])n+=t;else if((l[5]||l[6])&&a%3&&!((a+t)%3))r+=t;else if(!(0<(n-=t)))return t=Math.min(t,t+n+r),o=[...s].slice(0,a+l.index+t+1).join(""),Math.min(a,t)%2?(c=o.slice(1,-1),{type:"em",raw:o,text:c,tokens:this.lexer.inlineTokens(c)}):(c=o.slice(2,-2),{type:"strong",raw:o,text:c,tokens:this.lexer.inlineTokens(c)})}}codespan(t){t=this.rules.inline.code.exec(t);if(t){let e=t[2].replace(/\n/g," ");var n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return e=c(e=n&&r?e.substring(1,e.length-1):e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){e=this.rules.inline.br.exec(e);if(e)return{type:"br",raw:e[0]}}del(e){e=this.rules.inline.del.exec(e);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(n){n=this.rules.inline.autolink.exec(n);if(n){let e,t;return t="@"===n[2]?"mailto:"+(e=c(n[1])):e=c(n[1]),{type:"link",raw:n[0],text:e,href:t,tokens:[{type:"text",raw:e,text:e}]}}}url(e){var n,r;if(n=this.rules.inline.url.exec(e)){let e,t;if("@"===n[2])e=c(n[0]),t="mailto:"+e;else{for(;r=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0],r!==n[0];);e=c(n[0]),t="www."===n[1]?"http://"+n[0]:n[0]}return{type:"link",raw:n[0],text:e,href:t,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(t){t=this.rules.inline.text.exec(t);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:c(t[0]),{type:"text",raw:t[0],text:e}}}}const x={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:g,lheading:/^((?:(?!^bull ).|\n(?!\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/},m=(x.def=p(x.def).replace("label",x._label).replace("title",x._title).getRegex(),x.bullet=/(?:[*+-]|\d{1,9}[.)])/,x.listItemStart=p(/^( *)(bull) */).replace("bull",x.bullet).getRegex(),x.list=p(x.list).replace(/bull/g,x.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+x.def.source+")").getRegex(),x._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",x._comment=/|$)/,x.html=p(x.html,"i").replace("comment",x._comment).replace("tag",x._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),x.lheading=p(x.lheading).replace(/bull/g,x.bullet).getRegex(),x.paragraph=p(x._paragraph).replace("hr",x.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",x._tag).getRegex(),x.blockquote=p(x.blockquote).replace("paragraph",x.paragraph).getRegex(),x.normal={...x},x.gfm={...x.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"},x.gfm.table=p(x.gfm.table).replace("hr",x.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",x._tag).getRegex(),x.gfm.paragraph=p(x._paragraph).replace("hr",x.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",x.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",x._tag).getRegex(),x.pedantic={...x.normal,html:p("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",x._comment).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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:g,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:p(x.normal._paragraph).replace("hr",x.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",x.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()},{escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:g,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,rDelimAst:/^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:g,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`^|~"});m.punctuation=p(m.punctuation,"u").replace(/punctuation/g,m._punctuation).getRegex(),m.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,m.anyPunctuation=/\\[punct]/g,m._escapes=/\\([punct])/g,m._comment=p(x._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),m.emStrong.lDelim=p(m.emStrong.lDelim,"u").replace(/punct/g,m._punctuation).getRegex(),m.emStrong.rDelimAst=p(m.emStrong.rDelimAst,"gu").replace(/punct/g,m._punctuation).getRegex(),m.emStrong.rDelimUnd=p(m.emStrong.rDelimUnd,"gu").replace(/punct/g,m._punctuation).getRegex(),m.anyPunctuation=p(m.anyPunctuation,"gu").replace(/punct/g,m._punctuation).getRegex(),m._escapes=p(m._escapes,"gu").replace(/punct/g,m._punctuation).getRegex(),m._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,m._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])?)+(?![-_])/,m.autolink=p(m.autolink).replace("scheme",m._scheme).replace("email",m._email).getRegex(),m._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,m.tag=p(m.tag).replace("comment",m._comment).replace("attribute",m._attribute).getRegex(),m._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,m._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,m._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,m.link=p(m.link).replace("label",m._label).replace("href",m._href).replace("title",m._title).getRegex(),m.reflink=p(m.reflink).replace("label",m._label).replace("ref",x._label).getRegex(),m.nolink=p(m.nolink).replace("ref",x._label).getRegex(),m.reflinkSearch=p(m.reflinkSearch,"g").replace("reflink",m.reflink).replace("nolink",m.nolink).getRegex(),m.normal={...m},m.pedantic={...m.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:p(/^!?\[(label)\]\((.*?)\)/).replace("label",m._label).getRegex(),reflink:p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",m._label).getRegex()},m.gfm={...m.normal,escape:p(m.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\t+" ".repeat(n.length));let n,e,s,i;for(;r;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(e=>!!(n=e.call({lexer:this},r,t))&&(r=r.substring(n.raw.length),t.push(n),!0))))if(n=this.tokenizer.space(r))r=r.substring(n.raw.length),1===n.raw.length&&0{"number"==typeof(n=e.call({lexer:this},a))&&0<=n&&(t=Math.min(t,n))}),t<1/0&&0<=t&&(s=r.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(s)))e=t[t.length-1],i&&"paragraph"===e.type?(e.raw+="\n"+n.raw,e.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=e.text):t.push(n),i=s.length!==r.length,r=r.substring(n.raw.length);else if(n=this.tokenizer.text(r))r=r.substring(n.raw.length),(e=t[t.length-1])&&"text"===e.type?(e.raw+="\n"+n.raw,e.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=e.text):t.push(n);else if(r){var l="Infinite loop on byte: "+r.charCodeAt(0);if(this.options.silent){console.error(l);break}throw new Error(l)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(r,t=[]){let n,e,s,i=r,l,a,o;if(this.tokens.links){var c=Object.keys(this.tokens.links);if(0!!(n=e.call({lexer:this},r,t))&&(r=r.substring(n.raw.length),t.push(n),!0))))if(n=this.tokenizer.escape(r))r=r.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(r))r=r.substring(n.raw.length),(e=t[t.length-1])&&"text"===n.type&&"text"===e.type?(e.raw+=n.raw,e.text+=n.text):t.push(n);else if(n=this.tokenizer.link(r))r=r.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(r,this.tokens.links))r=r.substring(n.raw.length),(e=t[t.length-1])&&"text"===n.type&&"text"===e.type?(e.raw+=n.raw,e.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(r,i,o))r=r.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(r))r=r.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(r))r=r.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(r))r=r.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(r))r=r.substring(n.raw.length),t.push(n);else if(!this.state.inLink&&(n=this.tokenizer.url(r)))r=r.substring(n.raw.length),t.push(n);else{if(s=r,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const p=r.slice(1);let n;this.options.extensions.startInline.forEach(e=>{"number"==typeof(n=e.call({lexer:this},p))&&0<=n&&(t=Math.min(t,n))}),t<1/0&&0<=t&&(s=r.substring(0,t+1))}if(n=this.tokenizer.inlineText(s))r=r.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(o=n.raw.slice(-1)),a=!0,(e=t[t.length-1])&&"text"===e.type?(e.raw+=n.raw,e.text+=n.text):t.push(n);else if(r){var h="Infinite loop on byte: "+r.charCodeAt(0);if(this.options.silent){console.error(h);break}throw new Error(h)}}return t}}class y{options;constructor(e){this.options=e||t.defaults}code(e,t,n){t=(t||"").match(/^\S*/)?.[0];return e=e.replace(/\n$/,"")+"\n",t?'
'+(n?e:c(e,!0))+"
\n":"
"+(n?e:c(e,!0))+"
\n"}blockquote(e){return`
${e}
`}html(e,t){return e}heading(e,t,n){return`${e} `}hr(){return"
\n"}list(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"}listitem(e,t,n){return`
  • ${e}
  • `}checkbox(e){return"'}paragraph(e){return`

    ${e}

    `}table(e,t){return"\n\n"+e+"\n"+(t=t&&`${t}`)+"
    \n"}tablerow(e){return` ${e} `}tablecell(e,t){var n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+` `}strong(e){return`${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return"
    "}del(e){return`${e}`}link(e,t,n){var r=u(e);if(null===r)return n;let s='"}image(e,t,n){var r=u(e);if(null===r)return n;let s=`${n}"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""));continue;case"code":i+=this.renderer.code(l.text,l.lang,!!l.escaped);continue;case"table":{var o=l,a="";let t="";for(let e=0;e{n=n.concat(this.walkTokens(o[e],t))}):o.tokens&&(n=n.concat(this.walkTokens(o.tokens,t)))}}return n}use(...e){const m=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{var t={...e};if(t.async=this.defaults.async||t.async||!1,e.extensions&&(e.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){const r=m.renderers[n.name];r?m.renderers[n.name]=function(...e){let t=n.renderer.apply(this,e);return t=!1===t?r.apply(this,e):t}:m.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||"block"!==n.level&&"inline"!==n.level)throw new Error("extension level must be 'block' or 'inline'");var e=m[n.level];e?e.unshift(n.tokenizer):m[n.level]=[n.tokenizer],n.start&&("block"===n.level?m.startBlock?m.startBlock.push(n.start):m.startBlock=[n.start]:"inline"===n.level&&(m.startInline?m.startInline.push(n.start):m.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(m.childTokens[n.name]=n.childTokens)}),t.extensions=m),e.renderer){const i=this.defaults.renderer||new y(this.defaults);for(const l in e.renderer){const a=e.renderer[l];var n=l;const o=i[n];i[n]=(...e)=>{let t=a.apply(i,e);return(t=!1===t?o.apply(i,e):t)||""}}t.renderer=i}if(e.tokenizer){const c=this.defaults.tokenizer||new w(this.defaults);for(const h in e.tokenizer){const p=e.tokenizer[h];var r=h;const u=c[r];c[r]=(...e)=>{let t=p.apply(c,e);return t=!1===t?u.apply(c,e):t}}t.tokenizer=c}if(e.hooks){const g=this.defaults.hooks||new v;for(const k in e.hooks){const f=e.hooks[k];var s=k;const d=g[s];v.passThroughHooks.has(k)?g[s]=e=>{return this.defaults.async?Promise.resolve(f.call(g,e)).then(e=>d.call(g,e)):(e=f.call(g,e),d.call(g,e))}:g[s]=(...e)=>{let t=f.apply(g,e);return t=!1===t?d.apply(g,e):t}}t.hooks=g}if(e.walkTokens){const x=this.defaults.walkTokens,b=e.walkTokens;t.walkTokens=function(e){let t=[];return t.push(b.call(this,e)),t=x?t.concat(x.call(this,e)):t}}this.defaults={...this.defaults,...t}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}#parseMarkdown(i,l){return(t,n)=>{n={...n};const r={...this.defaults,...n};!0===this.defaults.async&&!1===n.async&&(r.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),r.async=!0);n=this.#onError(!!r.silent,!!r.async);if(null==t)return n(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(r.hooks&&(r.hooks.options=r),r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(t):t).then(e=>i(e,r)).then(e=>r.walkTokens?Promise.all(this.walkTokens(e,r.walkTokens)).then(()=>e):e).then(e=>l(e,r)).then(e=>r.hooks?r.hooks.postprocess(e):e).catch(n);try{r.hooks&&(t=r.hooks.preprocess(t));var s=i(t,r);r.walkTokens&&this.walkTokens(s,r.walkTokens);let e=l(s,r);return e=r.hooks?r.hooks.postprocess(e):e}catch(e){return n(e)}}}#onError(n,r){return e=>{var t;if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",n)return t="

    An error occurred:

    "+c(e.message+"",!0)+"
    ",r?Promise.resolve(t):t;if(r)return Promise.reject(e);throw e}}}const S=new R;function T(e,t){return S.parse(e,t)}T.options=T.setOptions=function(e){return S.setOptions(e),n(T.defaults=S.defaults),T},T.getDefaults=e,T.defaults=t.defaults,T.use=function(...e){return S.use(...e),n(T.defaults=S.defaults),T},T.walkTokens=function(e,t){return S.walkTokens(e,t)},T.parseInline=S.parseInline,T.Parser=z,T.parser=z.parse,T.Renderer=y,T.TextRenderer=$,T.Lexer=_,T.lexer=_.lex,T.Tokenizer=w,T.Hooks=v;var g=(T.parse=T).options,A=T.setOptions,I=T.use,E=T.walkTokens,Z=T.parseInline,q=T,L=z.parse,D=_.lex;t.Hooks=v,t.Lexer=_,t.Marked=R,t.Parser=z,t.Renderer=y,t.TextRenderer=$,t.Tokenizer=w,t.getDefaults=e,t.lexer=D,t.marked=T,t.options=g,t.parse=q,t.parseInline=Z,t.parser=L,t.setOptions=A,t.use=I,t.walkTokens=E});