47 lines
37 KiB
JavaScript
47 lines
37 KiB
JavaScript
var te=Object.defineProperty;var ne=(r,t,n)=>t in r?te(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n;var U=(r,t,n)=>ne(r,typeof t!="symbol"?t+"":t,n);import{_ as ie,o as se,c as re,p as le,g as oe,a as H}from"./index-CgtT38Ip.js";function X(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let A=X();function ae(r){A=r}const G=/[&<>"']/,ce=new RegExp(G.source,"g"),V=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,he=new RegExp(V.source,"g"),pe={"&":"&","<":"<",">":">",'"':""","'":"'"},M=r=>pe[r];function w(r,t){if(t){if(G.test(r))return r.replace(ce,M)}else if(V.test(r))return r.replace(he,M);return r}const ue=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function W(r){return r.replace(ue,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const fe=/(^|[^\[])\^/g;function m(r,t){r=typeof r=="string"?r:r.source,t=t||"";const n={replace:(e,i)=>(i=i.source||i,i=i.replace(fe,"$1"),r=r.replace(e,i),n),getRegex:()=>new RegExp(r,t)};return n}const ge=/[^\w:]/g,de=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function P(r,t,n){if(r){let e;try{e=decodeURIComponent(W(n)).replace(ge,"").toLowerCase()}catch{return null}if(e.indexOf("javascript:")===0||e.indexOf("vbscript:")===0||e.indexOf("data:")===0)return null}t&&!de.test(n)&&(n=be(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch{return null}return n}const L={},ke=/^[^:]+:\/*[^/]*$/,me=/^([^:]+:)[\s\S]*$/,xe=/^([^:]+:\/*[^/]*)[\s\S]*$/;function be(r,t){L[" "+r]||(ke.test(r)?L[" "+r]=r+"/":L[" "+r]=v(r,"/",!0)),r=L[" "+r];const n=r.indexOf(":")===-1;return t.substring(0,2)==="//"?n?t:r.replace(me,"$1")+t:t.charAt(0)==="/"?n?t:r.replace(xe,"$1")+t:r+t}const B={exec:function(){}};function j(r,t){const n=r.replace(/\|/g,(s,l,o)=>{let c=!1,d=l;for(;--d>=0&&o[d]==="\\";)c=!c;return c?"|":" |"}),e=n.split(/ \|/);let i=0;if(e[0].trim()||e.shift(),e.length>0&&!e[e.length-1].trim()&&e.pop(),e.length>t)e.splice(t);else for(;e.length<t;)e.push("");for(;i<e.length;i++)e[i]=e[i].trim().replace(/\\\|/g,"|");return e}function v(r,t,n){const e=r.length;if(e===0)return"";let i=0;for(;i<e;){const s=r.charAt(e-i-1);if(s===t&&!n)i++;else if(s!==t&&n)i++;else break}return r.slice(0,e-i)}function we(r,t){if(r.indexOf(t[1])===-1)return-1;const n=r.length;let e=0,i=0;for(;i<n;i++)if(r[i]==="\\")i++;else if(r[i]===t[0])e++;else if(r[i]===t[1]&&(e--,e<0))return i;return-1}function _e(r){r&&r.sanitize&&!r.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function Q(r,t){if(t<1)return"";let n="";for(;t>1;)t&1&&(n+=r),t>>=1,r+=r;return n+r}function N(r,t,n,e){const i=t.href,s=t.title?w(t.title):null,l=r[1].replace(/\\([\[\]])/g,"$1");if(r[0].charAt(0)!=="!"){e.state.inLink=!0;const o={type:"link",raw:n,href:i,title:s,text:l,tokens:e.inlineTokens(l)};return e.state.inLink=!1,o}return{type:"image",raw:n,href:i,title:s,text:w(l)}}function ye(r,t){const n=r.match(/^(\s+)(?:```)/);if(n===null)return t;const e=n[1];return t.split(`
|
||
`).map(i=>{const s=i.match(/^\s+/);if(s===null)return i;const[l]=s;return l.length>=e.length?i.slice(e.length):i}).join(`
|
||
`)}class D{constructor(t){this.options=t||A}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const e=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?e:v(e,`
|
||
`)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const e=n[0],i=ye(e,n[3]||"");return{type:"code",raw:e,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:i}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let e=n[2].trim();if(/#$/.test(e)){const i=v(e,"#");(this.options.pedantic||!i||/ $/.test(i))&&(e=i.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const e=n[0].replace(/^ *>[ \t]?/gm,""),i=this.lexer.state.top;this.lexer.state.top=!0;const s=this.lexer.blockTokens(e);return this.lexer.state.top=i,{type:"blockquote",raw:n[0],tokens:s,text:e}}}list(t){let n=this.rules.block.list.exec(t);if(n){let e,i,s,l,o,c,d,f,g,k,h,z,_=n[1].trim();const T=_.length>1,x={type:"list",raw:"",ordered:T,start:T?+_.slice(0,-1):"",loose:!1,items:[]};_=T?`\\d{1,9}\\${_.slice(-1)}`:`\\${_}`,this.options.pedantic&&(_=T?_:"[*+-]");const b=new RegExp(`^( {0,3}${_})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;t&&(z=!1,!(!(n=b.exec(t))||this.rules.block.hr.test(t)));){if(e=n[0],t=t.substring(e.length),f=n[2].split(`
|
||
`,1)[0].replace(/^\t+/,S=>" ".repeat(3*S.length)),g=t.split(`
|
||
`,1)[0],this.options.pedantic?(l=2,h=f.trimLeft()):(l=n[2].search(/[^ ]/),l=l>4?1:l,h=f.slice(l),l+=n[1].length),c=!1,!f&&/^ *$/.test(g)&&(e+=g+`
|
||
`,t=t.substring(g.length+1),z=!0),!z){const S=new RegExp(`^ {0,${Math.min(3,l-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),y=new RegExp(`^ {0,${Math.min(3,l-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),$=new RegExp(`^ {0,${Math.min(3,l-1)}}(?:\`\`\`|~~~)`),C=new RegExp(`^ {0,${Math.min(3,l-1)}}#`);for(;t&&(k=t.split(`
|
||
`,1)[0],g=k,this.options.pedantic&&(g=g.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!($.test(g)||C.test(g)||S.test(g)||y.test(t)));){if(g.search(/[^ ]/)>=l||!g.trim())h+=`
|
||
`+g.slice(l);else{if(c||f.search(/[^ ]/)>=4||$.test(f)||C.test(f)||y.test(f))break;h+=`
|
||
`+g}!c&&!g.trim()&&(c=!0),e+=k+`
|
||
`,t=t.substring(k.length+1),f=g.slice(l)}}x.loose||(d?x.loose=!0:/\n *\n *$/.test(e)&&(d=!0)),this.options.gfm&&(i=/^\[[ xX]\] /.exec(h),i&&(s=i[0]!=="[ ] ",h=h.replace(/^\[[ xX]\] +/,""))),x.items.push({type:"list_item",raw:e,task:!!i,checked:s,loose:!1,text:h}),x.raw+=e}x.items[x.items.length-1].raw=e.trimRight(),x.items[x.items.length-1].text=h.trimRight(),x.raw=x.raw.trimRight();const E=x.items.length;for(o=0;o<E;o++)if(this.lexer.state.top=!1,x.items[o].tokens=this.lexer.blockTokens(x.items[o].text,[]),!x.loose){const S=x.items[o].tokens.filter($=>$.type==="space"),y=S.length>0&&S.some($=>/\n.*\n/.test($.raw));x.loose=y}if(x.loose)for(o=0;o<E;o++)x.items[o].loose=!0;return x}}html(t){const n=this.rules.block.html.exec(t);if(n){const e={type:"html",raw:n[0],pre:!this.options.sanitizer&&(n[1]==="pre"||n[1]==="script"||n[1]==="style"),text:n[0]};if(this.options.sanitize){const i=this.options.sanitizer?this.options.sanitizer(n[0]):w(n[0]);e.type="paragraph",e.text=i,e.tokens=this.lexer.inline(i)}return e}}def(t){const n=this.rules.block.def.exec(t);if(n){const e=n[1].toLowerCase().replace(/\s+/g," "),i=n[2]?n[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",s=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:e,raw:n[0],href:i,title:s}}}table(t){const n=this.rules.block.table.exec(t);if(n){const e={type:"table",header:j(n[1]).map(i=>({text:i})),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(`
|
||
`):[]};if(e.header.length===e.align.length){e.raw=n[0];let i=e.align.length,s,l,o,c;for(s=0;s<i;s++)/^ *-+: *$/.test(e.align[s])?e.align[s]="right":/^ *:-+: *$/.test(e.align[s])?e.align[s]="center":/^ *:-+ *$/.test(e.align[s])?e.align[s]="left":e.align[s]=null;for(i=e.rows.length,s=0;s<i;s++)e.rows[s]=j(e.rows[s],e.header.length).map(d=>({text:d}));for(i=e.header.length,l=0;l<i;l++)e.header[l].tokens=this.lexer.inline(e.header[l].text);for(i=e.rows.length,l=0;l<i;l++)for(c=e.rows[l],o=0;o<c.length;o++)c[o].tokens=this.lexer.inline(c[o].text);return e}}}lheading(t){const n=this.rules.block.lheading.exec(t);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){const n=this.rules.block.paragraph.exec(t);if(n){const e=n[1].charAt(n[1].length-1)===`
|
||
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:e,tokens:this.lexer.inline(e)}}}text(t){const n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){const n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:w(n[1])}}tag(t){const n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&/^<a /i.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):w(n[0]):n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const e=n[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const l=v(e.slice(0,-1),"\\");if((e.length-l.length)%2===0)return}else{const l=we(n[2],"()");if(l>-1){const c=(n[0].indexOf("!")===0?5:4)+n[1].length+l;n[2]=n[2].substring(0,l),n[0]=n[0].substring(0,c).trim(),n[3]=""}}let i=n[2],s="";if(this.options.pedantic){const l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);l&&(i=l[1],s=l[3])}else s=n[3]?n[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(e)?i=i.slice(1):i=i.slice(1,-1)),N(n,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:s&&s.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let e;if((e=this.rules.inline.reflink.exec(t))||(e=this.rules.inline.nolink.exec(t))){let i=(e[2]||e[1]).replace(/\s+/g," ");if(i=n[i.toLowerCase()],!i){const s=e[0].charAt(0);return{type:"text",raw:s,text:s}}return N(e,i,e[0],this.lexer)}}emStrong(t,n,e=""){let i=this.rules.inline.emStrong.lDelim.exec(t);if(!i||i[3]&&e.match(/[\p{L}\p{N}]/u))return;const s=i[1]||i[2]||"";if(!s||s&&(e===""||this.rules.inline.punctuation.exec(e))){const l=i[0].length-1;let o,c,d=l,f=0;const g=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(g.lastIndex=0,n=n.slice(-1*t.length+l);(i=g.exec(n))!=null;){if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!o)continue;if(c=o.length,i[3]||i[4]){d+=c;continue}else if((i[5]||i[6])&&l%3&&!((l+c)%3)){f+=c;continue}if(d-=c,d>0)continue;c=Math.min(c,c+d+f);const k=t.slice(0,l+i.index+(i[0].length-o.length)+c);if(Math.min(l,c)%2){const z=k.slice(1,-1);return{type:"em",raw:k,text:z,tokens:this.lexer.inlineTokens(z)}}const h=k.slice(2,-2);return{type:"strong",raw:k,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let e=n[2].replace(/\n/g," ");const i=/[^ ]/.test(e),s=/^ /.test(e)&&/ $/.test(e);return i&&s&&(e=e.substring(1,e.length-1)),e=w(e,!0),{type:"codespan",raw:n[0],text:e}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t,n){const e=this.rules.inline.autolink.exec(t);if(e){let i,s;return e[2]==="@"?(i=w(this.options.mangle?n(e[1]):e[1]),s="mailto:"+i):(i=w(e[1]),s=i),{type:"link",raw:e[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t,n){let e;if(e=this.rules.inline.url.exec(t)){let i,s;if(e[2]==="@")i=w(this.options.mangle?n(e[0]):e[0]),s="mailto:"+i;else{let l;do l=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])[0];while(l!==e[0]);i=w(e[0]),e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t,n){const e=this.rules.inline.text.exec(t);if(e){let i;return this.lexer.state.inRawBlock?i=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):w(e[0]):e[0]:i=w(this.options.smartypants?n(e[0]):e[0]),{type:"text",raw:e[0],text:i}}}}const p={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![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|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:B,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};p._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;p._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;p.def=m(p.def).replace("label",p._label).replace("title",p._title).getRegex();p.bullet=/(?:[*+-]|\d{1,9}[.)])/;p.listItemStart=m(/^( *)(bull) */).replace("bull",p.bullet).getRegex();p.list=m(p.list).replace(/bull/g,p.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+p.def.source+")").getRegex();p._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";p._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/;p.html=m(p.html,"i").replace("comment",p._comment).replace("tag",p._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();p.paragraph=m(p._paragraph).replace("hr",p.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",p._tag).getRegex();p.blockquote=m(p.blockquote).replace("paragraph",p.paragraph).getRegex();p.normal={...p};p.gfm={...p.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};p.gfm.table=m(p.gfm.table).replace("hr",p.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",p._tag).getRegex();p.gfm.paragraph=m(p._paragraph).replace("hr",p.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",p.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",p._tag).getRegex();p.pedantic={...p.normal,html:m(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",p._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:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:B,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:m(p.normal._paragraph).replace("hr",p.hr).replace("heading",` *#{1,6} *[^
|
||
]`).replace("lheading",p.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const a={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:B,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\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:B,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};a._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~";a.punctuation=m(a.punctuation).replace(/punctuation/g,a._punctuation).getRegex();a.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g;a.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g;a._comment=m(p._comment).replace("(?:-->|$)","-->").getRegex();a.emStrong.lDelim=m(a.emStrong.lDelim).replace(/punct/g,a._punctuation).getRegex();a.emStrong.rDelimAst=m(a.emStrong.rDelimAst,"g").replace(/punct/g,a._punctuation).getRegex();a.emStrong.rDelimUnd=m(a.emStrong.rDelimUnd,"g").replace(/punct/g,a._punctuation).getRegex();a._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g;a._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;a._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])?)+(?![-_])/;a.autolink=m(a.autolink).replace("scheme",a._scheme).replace("email",a._email).getRegex();a._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;a.tag=m(a.tag).replace("comment",a._comment).replace("attribute",a._attribute).getRegex();a._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;a._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;a._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;a.link=m(a.link).replace("label",a._label).replace("href",a._href).replace("title",a._title).getRegex();a.reflink=m(a.reflink).replace("label",a._label).replace("ref",p._label).getRegex();a.nolink=m(a.nolink).replace("ref",p._label).getRegex();a.reflinkSearch=m(a.reflinkSearch,"g").replace("reflink",a.reflink).replace("nolink",a.nolink).getRegex();a.normal={...a};a.pedantic={...a.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:m(/^!?\[(label)\]\((.*?)\)/).replace("label",a._label).getRegex(),reflink:m(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",a._label).getRegex()};a.gfm={...a.normal,escape:m(a.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]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/};a.gfm.url=m(a.gfm.url,"i").replace("email",a.gfm._extended_email).getRegex();a.breaks={...a.gfm,br:m(a.br).replace("{2,}","*").getRegex(),text:m(a.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};function $e(r){return r.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function F(r){let t="",n,e;const i=r.length;for(n=0;n<i;n++)e=r.charCodeAt(n),Math.random()>.5&&(e="x"+e.toString(16)),t+="&#"+e+";";return t}class R{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||A,this.options.tokenizer=this.options.tokenizer||new D,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:p.normal,inline:a.normal};this.options.pedantic?(n.block=p.pedantic,n.inline=a.pedantic):this.options.gfm&&(n.block=p.gfm,this.options.breaks?n.inline=a.breaks:n.inline=a.gfm),this.tokenizer.rules=n}static get rules(){return{block:p,inline:a}}static lex(t,n){return new R(n).lex(t)}static lexInline(t,n){return new R(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
|
||
`),this.blockTokens(t,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(t,n=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(o,c,d)=>c+" ".repeat(d.length));let e,i,s,l;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(o=>(e=o.call({lexer:this},t,n))?(t=t.substring(e.raw.length),n.push(e),!0):!1))){if(e=this.tokenizer.space(t)){t=t.substring(e.raw.length),e.raw.length===1&&n.length>0?n[n.length-1].raw+=`
|
||
`:n.push(e);continue}if(e=this.tokenizer.code(t)){t=t.substring(e.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
|
||
`+e.raw,i.text+=`
|
||
`+e.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(e);continue}if(e=this.tokenizer.fences(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.heading(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.hr(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.blockquote(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.list(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.html(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.def(t)){t=t.substring(e.raw.length),i=n[n.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
|
||
`+e.raw,i.text+=`
|
||
`+e.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[e.tag]||(this.tokens.links[e.tag]={href:e.href,title:e.title});continue}if(e=this.tokenizer.table(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.lheading(t)){t=t.substring(e.raw.length),n.push(e);continue}if(s=t,this.options.extensions&&this.options.extensions.startBlock){let o=1/0;const c=t.slice(1);let d;this.options.extensions.startBlock.forEach(function(f){d=f.call({lexer:this},c),typeof d=="number"&&d>=0&&(o=Math.min(o,d))}),o<1/0&&o>=0&&(s=t.substring(0,o+1))}if(this.state.top&&(e=this.tokenizer.paragraph(s))){i=n[n.length-1],l&&i.type==="paragraph"?(i.raw+=`
|
||
`+e.raw,i.text+=`
|
||
`+e.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(e),l=s.length!==t.length,t=t.substring(e.raw.length);continue}if(e=this.tokenizer.text(t)){t=t.substring(e.raw.length),i=n[n.length-1],i&&i.type==="text"?(i.raw+=`
|
||
`+e.raw,i.text+=`
|
||
`+e.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):n.push(e);continue}if(t){const o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let e,i,s,l=t,o,c,d;if(this.tokens.links){const f=Object.keys(this.tokens.links);if(f.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(l))!=null;)f.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,o.index)+"["+Q("a",o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.blockSkip.exec(l))!=null;)l=l.slice(0,o.index)+"["+Q("a",o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(o=this.tokenizer.rules.inline.escapedEmSt.exec(l))!=null;)l=l.slice(0,o.index+o[0].length-2)+"++"+l.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;t;)if(c||(d=""),c=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(f=>(e=f.call({lexer:this},t,n))?(t=t.substring(e.raw.length),n.push(e),!0):!1))){if(e=this.tokenizer.escape(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.tag(t)){t=t.substring(e.raw.length),i=n[n.length-1],i&&e.type==="text"&&i.type==="text"?(i.raw+=e.raw,i.text+=e.text):n.push(e);continue}if(e=this.tokenizer.link(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(e.raw.length),i=n[n.length-1],i&&e.type==="text"&&i.type==="text"?(i.raw+=e.raw,i.text+=e.text):n.push(e);continue}if(e=this.tokenizer.emStrong(t,l,d)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.codespan(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.br(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.del(t)){t=t.substring(e.raw.length),n.push(e);continue}if(e=this.tokenizer.autolink(t,F)){t=t.substring(e.raw.length),n.push(e);continue}if(!this.state.inLink&&(e=this.tokenizer.url(t,F))){t=t.substring(e.raw.length),n.push(e);continue}if(s=t,this.options.extensions&&this.options.extensions.startInline){let f=1/0;const g=t.slice(1);let k;this.options.extensions.startInline.forEach(function(h){k=h.call({lexer:this},g),typeof k=="number"&&k>=0&&(f=Math.min(f,k))}),f<1/0&&f>=0&&(s=t.substring(0,f+1))}if(e=this.tokenizer.inlineText(s,$e)){t=t.substring(e.raw.length),e.raw.slice(-1)!=="_"&&(d=e.raw.slice(-1)),c=!0,i=n[n.length-1],i&&i.type==="text"?(i.raw+=e.raw,i.text+=e.text):n.push(e);continue}if(t){const f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return n}}class q{constructor(t){this.options=t||A}code(t,n,e){const i=(n||"").match(/\S*/)[0];if(this.options.highlight){const s=this.options.highlight(t,i);s!=null&&s!==t&&(e=!0,t=s)}return t=t.replace(/\n$/,"")+`
|
||
`,i?'<pre><code class="'+this.options.langPrefix+w(i)+'">'+(e?t:w(t,!0))+`</code></pre>
|
||
`:"<pre><code>"+(e?t:w(t,!0))+`</code></pre>
|
||
`}blockquote(t){return`<blockquote>
|
||
${t}</blockquote>
|
||
`}html(t){return t}heading(t,n,e,i){if(this.options.headerIds){const s=this.options.headerPrefix+i.slug(e);return`<h${n} id="${s}">${t}</h${n}>
|
||
`}return`<h${n}>${t}</h${n}>
|
||
`}hr(){return this.options.xhtml?`<hr/>
|
||
`:`<hr>
|
||
`}list(t,n,e){const i=n?"ol":"ul",s=n&&e!==1?' start="'+e+'"':"";return"<"+i+s+`>
|
||
`+t+"</"+i+`>
|
||
`}listitem(t){return`<li>${t}</li>
|
||
`}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(t){return`<p>${t}</p>
|
||
`}table(t,n){return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
||
<thead>
|
||
`+t+`</thead>
|
||
`+n+`</table>
|
||
`}tablerow(t){return`<tr>
|
||
${t}</tr>
|
||
`}tablecell(t,n){const e=n.header?"th":"td";return(n.align?`<${e} align="${n.align}">`:`<${e}>`)+t+`</${e}>
|
||
`}strong(t){return`<strong>${t}</strong>`}em(t){return`<em>${t}</em>`}codespan(t){return`<code>${t}</code>`}br(){return this.options.xhtml?"<br/>":"<br>"}del(t){return`<del>${t}</del>`}link(t,n,e){if(t=P(this.options.sanitize,this.options.baseUrl,t),t===null)return e;let i='<a href="'+t+'"';return n&&(i+=' title="'+n+'"'),i+=">"+e+"</a>",i}image(t,n,e){if(t=P(this.options.sanitize,this.options.baseUrl,t),t===null)return e;let i=`<img src="${t}" alt="${e}"`;return n&&(i+=` title="${n}"`),i+=this.options.xhtml?"/>":">",i}text(t){return t}}class J{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,n,e){return""+e}image(t,n,e){return""+e}br(){return""}}class K{constructor(){this.seen={}}serialize(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(t,n){let e=t,i=0;if(this.seen.hasOwnProperty(e)){i=this.seen[t];do i++,e=t+"-"+i;while(this.seen.hasOwnProperty(e))}return n||(this.seen[t]=i,this.seen[e]=0),e}slug(t,n={}){const e=this.serialize(t);return this.getNextSafeSlug(e,n.dryrun)}}class I{constructor(t){this.options=t||A,this.options.renderer=this.options.renderer||new q,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new J,this.slugger=new K}static parse(t,n){return new I(n).parse(t)}static parseInline(t,n){return new I(n).parseInline(t)}parse(t,n=!0){let e="",i,s,l,o,c,d,f,g,k,h,z,_,T,x,b,E,S,y,$;const C=t.length;for(i=0;i<C;i++){if(h=t[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[h.type]&&($=this.options.extensions.renderers[h.type].call({parser:this},h),$!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(h.type))){e+=$||"";continue}switch(h.type){case"space":continue;case"hr":{e+=this.renderer.hr();continue}case"heading":{e+=this.renderer.heading(this.parseInline(h.tokens),h.depth,W(this.parseInline(h.tokens,this.textRenderer)),this.slugger);continue}case"code":{e+=this.renderer.code(h.text,h.lang,h.escaped);continue}case"table":{for(g="",f="",o=h.header.length,s=0;s<o;s++)f+=this.renderer.tablecell(this.parseInline(h.header[s].tokens),{header:!0,align:h.align[s]});for(g+=this.renderer.tablerow(f),k="",o=h.rows.length,s=0;s<o;s++){for(d=h.rows[s],f="",c=d.length,l=0;l<c;l++)f+=this.renderer.tablecell(this.parseInline(d[l].tokens),{header:!1,align:h.align[l]});k+=this.renderer.tablerow(f)}e+=this.renderer.table(g,k);continue}case"blockquote":{k=this.parse(h.tokens),e+=this.renderer.blockquote(k);continue}case"list":{for(z=h.ordered,_=h.start,T=h.loose,o=h.items.length,k="",s=0;s<o;s++)b=h.items[s],E=b.checked,S=b.task,x="",b.task&&(y=this.renderer.checkbox(E),T?b.tokens.length>0&&b.tokens[0].type==="paragraph"?(b.tokens[0].text=y+" "+b.tokens[0].text,b.tokens[0].tokens&&b.tokens[0].tokens.length>0&&b.tokens[0].tokens[0].type==="text"&&(b.tokens[0].tokens[0].text=y+" "+b.tokens[0].tokens[0].text)):b.tokens.unshift({type:"text",text:y}):x+=y),x+=this.parse(b.tokens,T),k+=this.renderer.listitem(x,S,E);e+=this.renderer.list(k,z,_);continue}case"html":{e+=this.renderer.html(h.text);continue}case"paragraph":{e+=this.renderer.paragraph(this.parseInline(h.tokens));continue}case"text":{for(k=h.tokens?this.parseInline(h.tokens):h.text;i+1<C&&t[i+1].type==="text";)h=t[++i],k+=`
|
||
`+(h.tokens?this.parseInline(h.tokens):h.text);e+=n?this.renderer.paragraph(k):k;continue}default:{const O='Token with "'+h.type+'" type was not found.';if(this.options.silent){console.error(O);return}else throw new Error(O)}}}return e}parseInline(t,n){n=n||this.renderer;let e="",i,s,l;const o=t.length;for(i=0;i<o;i++){if(s=t[i],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]&&(l=this.options.extensions.renderers[s.type].call({parser:this},s),l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type))){e+=l||"";continue}switch(s.type){case"escape":{e+=n.text(s.text);break}case"html":{e+=n.html(s.text);break}case"link":{e+=n.link(s.href,s.title,this.parseInline(s.tokens,n));break}case"image":{e+=n.image(s.href,s.title,s.text);break}case"strong":{e+=n.strong(this.parseInline(s.tokens,n));break}case"em":{e+=n.em(this.parseInline(s.tokens,n));break}case"codespan":{e+=n.codespan(s.text);break}case"br":{e+=n.br();break}case"del":{e+=n.del(this.parseInline(s.tokens,n));break}case"text":{e+=n.text(s.text);break}default:{const c='Token with "'+s.type+'" type was not found.';if(this.options.silent){console.error(c);return}else throw new Error(c)}}}return e}}class Z{constructor(t){this.options=t||A}preprocess(t){return t}postprocess(t){return t}}U(Z,"passThroughHooks",new Set(["preprocess","postprocess"]));function ze(r,t,n){return e=>{if(e.message+=`
|
||
Please report this to https://github.com/markedjs/marked.`,r){const i="<p>An error occurred:</p><pre>"+w(e.message+"",!0)+"</pre>";if(t)return Promise.resolve(i);if(n){n(null,i);return}return i}if(t)return Promise.reject(e);if(n){n(e);return}throw e}}function Y(r,t){return(n,e,i)=>{typeof e=="function"&&(i=e,e=null);const s={...e};e={...u.defaults,...s};const l=ze(e.silent,e.async,i);if(typeof n>"u"||n===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(_e(e),e.hooks&&(e.hooks.options=e),i){const o=e.highlight;let c;try{e.hooks&&(n=e.hooks.preprocess(n)),c=r(n,e)}catch(g){return l(g)}const d=function(g){let k;if(!g)try{e.walkTokens&&u.walkTokens(c,e.walkTokens),k=t(c,e),e.hooks&&(k=e.hooks.postprocess(k))}catch(h){g=h}return e.highlight=o,g?l(g):i(null,k)};if(!o||o.length<3||(delete e.highlight,!c.length))return d();let f=0;u.walkTokens(c,function(g){g.type==="code"&&(f++,setTimeout(()=>{o(g.text,g.lang,function(k,h){if(k)return d(k);h!=null&&h!==g.text&&(g.text=h,g.escaped=!0),f--,f===0&&d()})},0))}),f===0&&d();return}if(e.async)return Promise.resolve(e.hooks?e.hooks.preprocess(n):n).then(o=>r(o,e)).then(o=>e.walkTokens?Promise.all(u.walkTokens(o,e.walkTokens)).then(()=>o):o).then(o=>t(o,e)).then(o=>e.hooks?e.hooks.postprocess(o):o).catch(l);try{e.hooks&&(n=e.hooks.preprocess(n));const o=r(n,e);e.walkTokens&&u.walkTokens(o,e.walkTokens);let c=t(o,e);return e.hooks&&(c=e.hooks.postprocess(c)),c}catch(o){return l(o)}}}function u(r,t,n){return Y(R.lex,I.parse)(r,t,n)}u.options=u.setOptions=function(r){return u.defaults={...u.defaults,...r},ae(u.defaults),u};u.getDefaults=X;u.defaults=A;u.use=function(...r){const t=u.defaults.extensions||{renderers:{},childTokens:{}};r.forEach(n=>{const e={...n};if(e.async=u.defaults.async||e.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if(i.renderer){const s=t.renderers[i.name];s?t.renderers[i.name]=function(...l){let o=i.renderer.apply(this,l);return o===!1&&(o=s.apply(this,l)),o}:t.renderers[i.name]=i.renderer}if(i.tokenizer){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");t[i.level]?t[i.level].unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),e.extensions=t),n.renderer){const i=u.defaults.renderer||new q;for(const s in n.renderer){const l=i[s];i[s]=(...o)=>{let c=n.renderer[s].apply(i,o);return c===!1&&(c=l.apply(i,o)),c}}e.renderer=i}if(n.tokenizer){const i=u.defaults.tokenizer||new D;for(const s in n.tokenizer){const l=i[s];i[s]=(...o)=>{let c=n.tokenizer[s].apply(i,o);return c===!1&&(c=l.apply(i,o)),c}}e.tokenizer=i}if(n.hooks){const i=u.defaults.hooks||new Z;for(const s in n.hooks){const l=i[s];Z.passThroughHooks.has(s)?i[s]=o=>{if(u.defaults.async)return Promise.resolve(n.hooks[s].call(i,o)).then(d=>l.call(i,d));const c=n.hooks[s].call(i,o);return l.call(i,c)}:i[s]=(...o)=>{let c=n.hooks[s].apply(i,o);return c===!1&&(c=l.apply(i,o)),c}}e.hooks=i}if(n.walkTokens){const i=u.defaults.walkTokens;e.walkTokens=function(s){let l=[];return l.push(n.walkTokens.call(this,s)),i&&(l=l.concat(i.call(this,s))),l}}u.setOptions(e)})};u.walkTokens=function(r,t){let n=[];for(const e of r)switch(n=n.concat(t.call(u,e)),e.type){case"table":{for(const i of e.header)n=n.concat(u.walkTokens(i.tokens,t));for(const i of e.rows)for(const s of i)n=n.concat(u.walkTokens(s.tokens,t));break}case"list":{n=n.concat(u.walkTokens(e.items,t));break}default:u.defaults.extensions&&u.defaults.extensions.childTokens&&u.defaults.extensions.childTokens[e.type]?u.defaults.extensions.childTokens[e.type].forEach(function(i){n=n.concat(u.walkTokens(e[i],t))}):e.tokens&&(n=n.concat(u.walkTokens(e.tokens,t)))}return n};u.parseInline=Y(R.lexInline,I.parseInline);u.Parser=I;u.parser=I.parse;u.Renderer=q;u.TextRenderer=J;u.Lexer=R;u.lexer=R.lex;u.Tokenizer=D;u.Slugger=K;u.Hooks=Z;u.parse=u;u.options;u.setOptions;u.use;u.walkTokens;u.parseInline;I.parse;R.lex;var Be=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ze(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}const Se="/assets/loading-91yX9SgS.svg",Te={},ee=r=>(le("data-v-e4b64a73"),r=r(),oe(),r),Re={id:"Loading"},Ie=ee(()=>H("img",{src:Se,alt:"loading"},null,-1)),Ae=ee(()=>H("div",{class:"text"},"Loading~",-1)),Ee=[Ie,Ae];function Ce(r,t){return se(),re("div",Re,Ee)}const De=ie(Te,[["render",Ce],["__scopeId","data-v-e4b64a73"]]);export{De as L,Be as c,Ze as g,u as m};
|