-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchunk-FRKXO4WG.js
48 lines (48 loc) · 48.4 KB
/
chunk-FRKXO4WG.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import{$ as Pe,A as N,B as z,C as Te,D as Se,E as ee,F as Ee,G as Z,H as W,I as $e,J as Re,K as Ce,L as Ie,M as Oe,N as ze,O as Ae,P as De,Q as te,R as L,S as j,U as ve,V as K,W as Q,X as R,Y as X,Z as Me,a as x,aa as Ne,b as O,c as ae,d as F,da as Le,e as ce,ea as je,f as v,g as pe,h as he,i as ue,j as de,k as fe,l as me,m as ge,n as ke,o as xe,p as U,q as M,r as E,s as P,t as q,u as be,v as we,w as H,x as ye,y as _e}from"./chunk-Q6GGI7PY.js";function ie(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var I=ie();function He(o){I=o}var Ze=/[&<>"']/,tt=new RegExp(Ze.source,"g"),We=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,nt=new RegExp(We.source,"g"),it={"&":"&","<":"<",">":">",'"':""","'":"'"},Be=o=>it[o];function w(o,n){if(n){if(Ze.test(o))return o.replace(tt,Be)}else if(We.test(o))return o.replace(nt,Be);return o}var rt=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function st(o){return o.replace(rt,(n,e)=>(e=e.toLowerCase(),e==="colon"?":":e.charAt(0)==="#"?e.charAt(1)==="x"?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""))}var ot=/(^|[^\[])\^/g;function k(o,n){o=typeof o=="string"?o:o.source,n=n||"";let e={replace:(t,i)=>(i=typeof i=="object"&&"source"in i?i.source:i,i=i.replace(ot,"$1"),o=o.replace(t,i),e),getRegex:()=>new RegExp(o,n)};return e}function Fe(o){try{o=encodeURI(o).replace(/%25/g,"%")}catch{return null}return o}var J={exec:()=>null};function Ue(o,n){let e=o.replace(/\|/g,(r,s,l)=>{let a=!1,h=s;for(;--h>=0&&l[h]==="\\";)a=!a;return a?"|":" |"}),t=e.split(/ \|/),i=0;if(t[0].trim()||t.shift(),t.length>0&&!t[t.length-1].trim()&&t.pop(),n)if(t.length>n)t.splice(n);else for(;t.length<n;)t.push("");for(;i<t.length;i++)t[i]=t[i].trim().replace(/\\\|/g,"|");return t}function V(o,n,e){let t=o.length;if(t===0)return"";let i=0;for(;i<t;){let r=o.charAt(t-i-1);if(r===n&&!e)i++;else if(r!==n&&e)i++;else break}return o.slice(0,t-i)}function lt(o,n){if(o.indexOf(n[1])===-1)return-1;let e=0;for(let t=0;t<o.length;t++)if(o[t]==="\\")t++;else if(o[t]===n[0])e++;else if(o[t]===n[1]&&(e--,e<0))return t;return-1}function qe(o,n,e,t){let i=n.href,r=n.title?w(n.title):null,s=o[1].replace(/\\([\[\]])/g,"$1");if(o[0].charAt(0)!=="!"){t.state.inLink=!0;let l={type:"link",raw:e,href:i,title:r,text:s,tokens:t.inlineTokens(s)};return t.state.inLink=!1,l}return{type:"image",raw:e,href:i,title:r,text:w(s)}}function at(o,n){let e=o.match(/^(\s+)(?:```)/);if(e===null)return n;let t=e[1];return n.split(`
`).map(i=>{let r=i.match(/^\s+/);if(r===null)return i;let[s]=r;return s.length>=t.length?i.slice(t.length):i}).join(`
`)}var D=class{options;rules;lexer;constructor(n){this.options=n||I}space(n){let e=this.rules.block.newline.exec(n);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(n){let e=this.rules.block.code.exec(n);if(e){let t=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:V(t,`
`)}}}fences(n){let e=this.rules.block.fences.exec(n);if(e){let t=e[0],i=at(t,e[3]||"");return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline._escapes,"$1"):e[2],text:i}}}heading(n){let e=this.rules.block.heading.exec(n);if(e){let t=e[2].trim();if(/#$/.test(t)){let i=V(t,"#");(this.options.pedantic||!i||/ $/.test(i))&&(t=i.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(n){let e=this.rules.block.hr.exec(n);if(e)return{type:"hr",raw:e[0]}}blockquote(n){let e=this.rules.block.blockquote.exec(n);if(e){let t=V(e[0].replace(/^ *>[ \t]?/gm,""),`
`),i=this.lexer.state.top;this.lexer.state.top=!0;let r=this.lexer.blockTokens(t);return this.lexer.state.top=i,{type:"blockquote",raw:e[0],tokens:r,text:t}}}list(n){let e=this.rules.block.list.exec(n);if(e){let t=e[1].trim(),i=t.length>1,r={type:"list",raw:"",ordered:i,start:i?+t.slice(0,-1):"",loose:!1,items:[]};t=i?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=i?t:"[*+-]");let s=new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),l="",a="",h=!1;for(;n;){let p=!1;if(!(e=s.exec(n))||this.rules.block.hr.test(n))break;l=e[0],n=n.substring(l.length);let f=e[2].split(`
`,1)[0].replace(/^\t+/,Y=>" ".repeat(3*Y.length)),u=n.split(`
`,1)[0],m=0;this.options.pedantic?(m=2,a=f.trimStart()):(m=e[2].search(/[^ ]/),m=m>4?1:m,a=f.slice(m),m+=e[1].length);let b=!1;if(!f&&/^ *$/.test(u)&&(l+=u+`
`,n=n.substring(u.length+1),p=!0),!p){let Y=new RegExp(`^ {0,${Math.min(3,m-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),se=new RegExp(`^ {0,${Math.min(3,m-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),oe=new RegExp(`^ {0,${Math.min(3,m-1)}}(?:\`\`\`|~~~)`),le=new RegExp(`^ {0,${Math.min(3,m-1)}}#`);for(;n;){let G=n.split(`
`,1)[0];if(u=G,this.options.pedantic&&(u=u.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),oe.test(u)||le.test(u)||Y.test(u)||se.test(n))break;if(u.search(/[^ ]/)>=m||!u.trim())a+=`
`+u.slice(m);else{if(b||f.search(/[^ ]/)>=4||oe.test(f)||le.test(f)||se.test(f))break;a+=`
`+u}!b&&!u.trim()&&(b=!0),l+=G+`
`,n=n.substring(G.length+1),f=u.slice(m)}}r.loose||(h?r.loose=!0:/\n *\n *$/.test(l)&&(h=!0));let y=null,$;this.options.gfm&&(y=/^\[[ xX]\] /.exec(a),y&&($=y[0]!=="[ ] ",a=a.replace(/^\[[ xX]\] +/,""))),r.items.push({type:"list_item",raw:l,task:!!y,checked:$,loose:!1,text:a,tokens:[]}),r.raw+=l}r.items[r.items.length-1].raw=l.trimEnd(),r.items[r.items.length-1].text=a.trimEnd(),r.raw=r.raw.trimEnd();for(let p=0;p<r.items.length;p++)if(this.lexer.state.top=!1,r.items[p].tokens=this.lexer.blockTokens(r.items[p].text,[]),!r.loose){let f=r.items[p].tokens.filter(m=>m.type==="space"),u=f.length>0&&f.some(m=>/\n.*\n/.test(m.raw));r.loose=u}if(r.loose)for(let p=0;p<r.items.length;p++)r.items[p].loose=!0;return r}}html(n){let e=this.rules.block.html.exec(n);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(n){let e=this.rules.block.def.exec(n);if(e){let t=e[1].toLowerCase().replace(/\s+/g," "),i=e[2]?e[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline._escapes,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:i,title:r}}}table(n){let e=this.rules.block.table.exec(n);if(e){if(!/[:|]/.test(e[2]))return;let t={type:"table",raw:e[0],header:Ue(e[1]).map(i=>({text:i,tokens:[]})),align:e[2].replace(/^\||\| *$/g,"").split("|"),rows:e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split(`
`):[]};if(t.header.length===t.align.length){let i=t.align.length,r,s,l,a;for(r=0;r<i;r++){let h=t.align[r];h&&(/^ *-+: *$/.test(h)?t.align[r]="right":/^ *:-+: *$/.test(h)?t.align[r]="center":/^ *:-+ *$/.test(h)?t.align[r]="left":t.align[r]=null)}for(i=t.rows.length,r=0;r<i;r++)t.rows[r]=Ue(t.rows[r],t.header.length).map(h=>({text:h,tokens:[]}));for(i=t.header.length,s=0;s<i;s++)t.header[s].tokens=this.lexer.inline(t.header[s].text);for(i=t.rows.length,s=0;s<i;s++)for(a=t.rows[s],l=0;l<a.length;l++)a[l].tokens=this.lexer.inline(a[l].text);return t}}}lheading(n){let e=this.rules.block.lheading.exec(n);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(n){let e=this.rules.block.paragraph.exec(n);if(e){let t=e[1].charAt(e[1].length-1)===`
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(n){let e=this.rules.block.text.exec(n);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(n){let e=this.rules.inline.escape.exec(n);if(e)return{type:"escape",raw:e[0],text:w(e[1])}}tag(n){let e=this.rules.inline.tag.exec(n);if(e)return!this.lexer.state.inLink&&/^<a /i.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/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){let e=this.rules.inline.link.exec(n);if(e){let t=e[2].trim();if(!this.options.pedantic&&/^</.test(t)){if(!/>$/.test(t))return;let s=V(t.slice(0,-1),"\\");if((t.length-s.length)%2===0)return}else{let s=lt(e[2],"()");if(s>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+s;e[2]=e[2].substring(0,s),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let i=e[2],r="";if(this.options.pedantic){let s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);s&&(i=s[1],r=s[3])}else r=e[3]?e[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(this.options.pedantic&&!/>$/.test(t)?i=i.slice(1):i=i.slice(1,-1)),qe(e,{href:i&&i.replace(this.rules.inline._escapes,"$1"),title:r&&r.replace(this.rules.inline._escapes,"$1")},e[0],this.lexer)}}reflink(n,e){let t;if((t=this.rules.inline.reflink.exec(n))||(t=this.rules.inline.nolink.exec(n))){let i=(t[2]||t[1]).replace(/\s+/g," ");if(i=e[i.toLowerCase()],!i){let r=t[0].charAt(0);return{type:"text",raw:r,text:r}}return qe(t,i,t[0],this.lexer)}}emStrong(n,e,t=""){let i=this.rules.inline.emStrong.lDelim.exec(n);if(!i||i[3]&&t.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!t||this.rules.inline.punctuation.exec(t)){let s=[...i[0]].length-1,l,a,h=s,p=0,f=i[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(f.lastIndex=0,e=e.slice(-1*n.length+s);(i=f.exec(e))!=null;){if(l=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!l)continue;if(a=[...l].length,i[3]||i[4]){h+=a;continue}else if((i[5]||i[6])&&s%3&&!((s+a)%3)){p+=a;continue}if(h-=a,h>0)continue;a=Math.min(a,a+h+p);let u=[...i[0]][0].length,m=n.slice(0,s+i.index+u+a);if(Math.min(s,a)%2){let y=m.slice(1,-1);return{type:"em",raw:m,text:y,tokens:this.lexer.inlineTokens(y)}}let b=m.slice(2,-2);return{type:"strong",raw:m,text:b,tokens:this.lexer.inlineTokens(b)}}}}codespan(n){let e=this.rules.inline.code.exec(n);if(e){let t=e[2].replace(/\n/g," "),i=/[^ ]/.test(t),r=/^ /.test(t)&&/ $/.test(t);return i&&r&&(t=t.substring(1,t.length-1)),t=w(t,!0),{type:"codespan",raw:e[0],text:t}}}br(n){let e=this.rules.inline.br.exec(n);if(e)return{type:"br",raw:e[0]}}del(n){let e=this.rules.inline.del.exec(n);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(n){let e=this.rules.inline.autolink.exec(n);if(e){let t,i;return e[2]==="@"?(t=w(e[1]),i="mailto:"+t):(t=w(e[1]),i=t),{type:"link",raw:e[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}url(n){let e;if(e=this.rules.inline.url.exec(n)){let t,i;if(e[2]==="@")t=w(e[0]),i="mailto:"+t;else{let r;do r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])[0];while(r!==e[0]);t=w(e[0]),e[1]==="www."?i="http://"+e[0]:i=e[0]}return{type:"link",raw:e[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(n){let e=this.rules.inline.text.exec(n);if(e){let t;return this.lexer.state.inRawBlock?t=e[0]:t=w(e[0]),{type:"text",raw:e[0],text:t}}}},d={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:J,lheading:/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};d._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;d._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;d.def=k(d.def).replace("label",d._label).replace("title",d._title).getRegex();d.bullet=/(?:[*+-]|\d{1,9}[.)])/;d.listItemStart=k(/^( *)(bull) */).replace("bull",d.bullet).getRegex();d.list=k(d.list).replace(/bull/g,d.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+d.def.source+")").getRegex();d._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";d._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/;d.html=k(d.html,"i").replace("comment",d._comment).replace("tag",d._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();d.lheading=k(d.lheading).replace(/bull/g,d.bullet).getRegex();d.paragraph=k(d._paragraph).replace("hr",d.hr).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",d._tag).getRegex();d.blockquote=k(d.blockquote).replace("paragraph",d.paragraph).getRegex();d.normal=x({},d);d.gfm=O(x({},d.normal),{table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"});d.gfm.table=k(d.gfm.table).replace("hr",d.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").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",d._tag).getRegex();d.gfm.paragraph=k(d._paragraph).replace("hr",d.hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",d.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",d._tag).getRegex();d.pedantic=O(x({},d.normal),{html:k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",d._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:J,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:k(d.normal._paragraph).replace("hr",d.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",d.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var c={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:J,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:J,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^((?![*_])[\spunctuation])/};c._punctuation="\\p{P}$+<=>`^|~";c.punctuation=k(c.punctuation,"u").replace(/punctuation/g,c._punctuation).getRegex();c.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;c.anyPunctuation=/\\[punct]/g;c._escapes=/\\([punct])/g;c._comment=k(d._comment).replace("(?:-->|$)","-->").getRegex();c.emStrong.lDelim=k(c.emStrong.lDelim,"u").replace(/punct/g,c._punctuation).getRegex();c.emStrong.rDelimAst=k(c.emStrong.rDelimAst,"gu").replace(/punct/g,c._punctuation).getRegex();c.emStrong.rDelimUnd=k(c.emStrong.rDelimUnd,"gu").replace(/punct/g,c._punctuation).getRegex();c.anyPunctuation=k(c.anyPunctuation,"gu").replace(/punct/g,c._punctuation).getRegex();c._escapes=k(c._escapes,"gu").replace(/punct/g,c._punctuation).getRegex();c._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;c._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])?)+(?![-_])/;c.autolink=k(c.autolink).replace("scheme",c._scheme).replace("email",c._email).getRegex();c._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;c.tag=k(c.tag).replace("comment",c._comment).replace("attribute",c._attribute).getRegex();c._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;c._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;c._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;c.link=k(c.link).replace("label",c._label).replace("href",c._href).replace("title",c._title).getRegex();c.reflink=k(c.reflink).replace("label",c._label).replace("ref",d._label).getRegex();c.nolink=k(c.nolink).replace("ref",d._label).getRegex();c.reflinkSearch=k(c.reflinkSearch,"g").replace("reflink",c.reflink).replace("nolink",c.nolink).getRegex();c.normal=x({},c);c.pedantic=O(x({},c.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:k(/^!?\[(label)\]\((.*?)\)/).replace("label",c._label).getRegex(),reflink:k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",c._label).getRegex()});c.gfm=O(x({},c.normal),{escape:k(c.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.!#$%&'*+\/=?_`{\|}~-]+@)))/});c.gfm.url=k(c.gfm.url,"i").replace("email",c.gfm._extended_email).getRegex();c.breaks=O(x({},c.gfm),{br:k(c.br).replace("{2,}","*").getRegex(),text:k(c.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var T=class o{tokens;options;state;tokenizer;inlineQueue;constructor(n){this.tokens=[],this.tokens.links=Object.create(null),this.options=n||I,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};let e={block:d.normal,inline:c.normal};this.options.pedantic?(e.block=d.pedantic,e.inline=c.pedantic):this.options.gfm&&(e.block=d.gfm,this.options.breaks?e.inline=c.breaks:e.inline=c.gfm),this.tokenizer.rules=e}static get rules(){return{block:d,inline:c}}static lex(n,e){return new o(e).lex(n)}static lexInline(n,e){return new o(e).inlineTokens(n)}lex(n){n=n.replace(/\r\n|\r/g,`
`),this.blockTokens(n,this.tokens);let e;for(;e=this.inlineQueue.shift();)this.inlineTokens(e.src,e.tokens);return this.tokens}blockTokens(n,e=[]){this.options.pedantic?n=n.replace(/\t/g," ").replace(/^ +$/gm,""):n=n.replace(/^( *)(\t+)/gm,(l,a,h)=>a+" ".repeat(h.length));let t,i,r,s;for(;n;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(l=>(t=l.call({lexer:this},n,e))?(n=n.substring(t.raw.length),e.push(t),!0):!1))){if(t=this.tokenizer.space(n)){n=n.substring(t.raw.length),t.raw.length===1&&e.length>0?e[e.length-1].raw+=`
`:e.push(t);continue}if(t=this.tokenizer.code(n)){n=n.substring(t.raw.length),i=e[e.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
`+t.raw,i.text+=`
`+t.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(t);continue}if(t=this.tokenizer.fences(n)){n=n.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.heading(n)){n=n.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.hr(n)){n=n.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.blockquote(n)){n=n.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.list(n)){n=n.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.html(n)){n=n.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.def(n)){n=n.substring(t.raw.length),i=e[e.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
`+t.raw,i.text+=`
`+t.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title});continue}if(t=this.tokenizer.table(n)){n=n.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.lheading(n)){n=n.substring(t.raw.length),e.push(t);continue}if(r=n,this.options.extensions&&this.options.extensions.startBlock){let l=1/0,a=n.slice(1),h;this.options.extensions.startBlock.forEach(p=>{h=p.call({lexer:this},a),typeof h=="number"&&h>=0&&(l=Math.min(l,h))}),l<1/0&&l>=0&&(r=n.substring(0,l+1))}if(this.state.top&&(t=this.tokenizer.paragraph(r))){i=e[e.length-1],s&&i.type==="paragraph"?(i.raw+=`
`+t.raw,i.text+=`
`+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(t),s=r.length!==n.length,n=n.substring(t.raw.length);continue}if(t=this.tokenizer.text(n)){n=n.substring(t.raw.length),i=e[e.length-1],i&&i.type==="text"?(i.raw+=`
`+t.raw,i.text+=`
`+t.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(t);continue}if(n){let l="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,e}inline(n,e=[]){return this.inlineQueue.push({src:n,tokens:e}),e}inlineTokens(n,e=[]){let t,i,r,s=n,l,a,h;if(this.tokens.links){let p=Object.keys(this.tokens.links);if(p.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)p.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(l=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,l.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;n;)if(a||(h=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(p=>(t=p.call({lexer:this},n,e))?(n=n.substring(t.raw.length),e.push(t),!0):!1))){if(t=this.tokenizer.escape(n)){n=n.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.tag(n)){n=n.substring(t.raw.length),i=e[e.length-1],i&&t.type==="text"&&i.type==="text"?(i.raw+=t.raw,i.text+=t.text):e.push(t);continue}if(t=this.tokenizer.link(n)){n=n.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.reflink(n,this.tokens.links)){n=n.substring(t.raw.length),i=e[e.length-1],i&&t.type==="text"&&i.type==="text"?(i.raw+=t.raw,i.text+=t.text):e.push(t);continue}if(t=this.tokenizer.emStrong(n,s,h)){n=n.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.codespan(n)){n=n.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.br(n)){n=n.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.del(n)){n=n.substring(t.raw.length),e.push(t);continue}if(t=this.tokenizer.autolink(n)){n=n.substring(t.raw.length),e.push(t);continue}if(!this.state.inLink&&(t=this.tokenizer.url(n))){n=n.substring(t.raw.length),e.push(t);continue}if(r=n,this.options.extensions&&this.options.extensions.startInline){let p=1/0,f=n.slice(1),u;this.options.extensions.startInline.forEach(m=>{u=m.call({lexer:this},f),typeof u=="number"&&u>=0&&(p=Math.min(p,u))}),p<1/0&&p>=0&&(r=n.substring(0,p+1))}if(t=this.tokenizer.inlineText(r)){n=n.substring(t.raw.length),t.raw.slice(-1)!=="_"&&(h=t.raw.slice(-1)),a=!0,i=e[e.length-1],i&&i.type==="text"?(i.raw+=t.raw,i.text+=t.text):e.push(t);continue}if(n){let p="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return e}},_=class{options;constructor(n){this.options=n||I}code(n,e,t){let i=(e||"").match(/^\S*/)?.[0];return n=n.replace(/\n$/,"")+`
`,i?'<pre><code class="language-'+w(i)+'">'+(t?n:w(n,!0))+`</code></pre>
`:"<pre><code>"+(t?n:w(n,!0))+`</code></pre>
`}blockquote(n){return`<blockquote>
${n}</blockquote>
`}html(n,e){return n}heading(n,e,t){return`<h${e}>${n}</h${e}>
`}hr(){return`<hr>
`}list(n,e,t){let i=e?"ol":"ul",r=e&&t!==1?' start="'+t+'"':"";return"<"+i+r+`>
`+n+"</"+i+`>
`}listitem(n,e,t){return`<li>${n}</li>
`}checkbox(n){return"<input "+(n?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(n){return`<p>${n}</p>
`}table(n,e){return e&&(e=`<tbody>${e}</tbody>`),`<table>
<thead>
`+n+`</thead>
`+e+`</table>
`}tablerow(n){return`<tr>
${n}</tr>
`}tablecell(n,e){let t=e.header?"th":"td";return(e.align?`<${t} align="${e.align}">`:`<${t}>`)+n+`</${t}>
`}strong(n){return`<strong>${n}</strong>`}em(n){return`<em>${n}</em>`}codespan(n){return`<code>${n}</code>`}br(){return"<br>"}del(n){return`<del>${n}</del>`}link(n,e,t){let i=Fe(n);if(i===null)return t;n=i;let r='<a href="'+n+'"';return e&&(r+=' title="'+e+'"'),r+=">"+t+"</a>",r}image(n,e,t){let i=Fe(n);if(i===null)return t;n=i;let r=`<img src="${n}" alt="${t}"`;return e&&(r+=` title="${e}"`),r+=">",r}text(n){return n}},B=class{strong(n){return n}em(n){return n}codespan(n){return n}del(n){return n}html(n){return n}text(n){return n}link(n,e,t){return""+t}image(n,e,t){return""+t}br(){return""}},S=class o{options;renderer;textRenderer;constructor(n){this.options=n||I,this.options.renderer=this.options.renderer||new _,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new B}static parse(n,e){return new o(e).parse(n)}static parseInline(n,e){return new o(e).parseInline(n)}parse(n,e=!0){let t="";for(let i=0;i<n.length;i++){let r=n[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){let s=r,l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(s.type)){t+=l||"";continue}}switch(r.type){case"space":continue;case"hr":{t+=this.renderer.hr();continue}case"heading":{let s=r;t+=this.renderer.heading(this.parseInline(s.tokens),s.depth,st(this.parseInline(s.tokens,this.textRenderer)));continue}case"code":{let s=r;t+=this.renderer.code(s.text,s.lang,!!s.escaped);continue}case"table":{let s=r,l="",a="";for(let p=0;p<s.header.length;p++)a+=this.renderer.tablecell(this.parseInline(s.header[p].tokens),{header:!0,align:s.align[p]});l+=this.renderer.tablerow(a);let h="";for(let p=0;p<s.rows.length;p++){let f=s.rows[p];a="";for(let u=0;u<f.length;u++)a+=this.renderer.tablecell(this.parseInline(f[u].tokens),{header:!1,align:s.align[u]});h+=this.renderer.tablerow(a)}t+=this.renderer.table(l,h);continue}case"blockquote":{let s=r,l=this.parse(s.tokens);t+=this.renderer.blockquote(l);continue}case"list":{let s=r,l=s.ordered,a=s.start,h=s.loose,p="";for(let f=0;f<s.items.length;f++){let u=s.items[f],m=u.checked,b=u.task,y="";if(u.task){let $=this.renderer.checkbox(!!m);h?u.tokens.length>0&&u.tokens[0].type==="paragraph"?(u.tokens[0].text=$+" "+u.tokens[0].text,u.tokens[0].tokens&&u.tokens[0].tokens.length>0&&u.tokens[0].tokens[0].type==="text"&&(u.tokens[0].tokens[0].text=$+" "+u.tokens[0].tokens[0].text)):u.tokens.unshift({type:"text",text:$+" "}):y+=$+" "}y+=this.parse(u.tokens,h),p+=this.renderer.listitem(y,b,!!m)}t+=this.renderer.list(p,l,a);continue}case"html":{let s=r;t+=this.renderer.html(s.text,s.block);continue}case"paragraph":{let s=r;t+=this.renderer.paragraph(this.parseInline(s.tokens));continue}case"text":{let s=r,l=s.tokens?this.parseInline(s.tokens):s.text;for(;i+1<n.length&&n[i+1].type==="text";)s=n[++i],l+=`
`+(s.tokens?this.parseInline(s.tokens):s.text);t+=e?this.renderer.paragraph(l):l;continue}default:{let s='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return t}parseInline(n,e){e=e||this.renderer;let t="";for(let i=0;i<n.length;i++){let r=n[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){let s=this.options.extensions.renderers[r.type].call({parser:this},r);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)){t+=s||"";continue}}switch(r.type){case"escape":{let s=r;t+=e.text(s.text);break}case"html":{let s=r;t+=e.html(s.text);break}case"link":{let s=r;t+=e.link(s.href,s.title,this.parseInline(s.tokens,e));break}case"image":{let s=r;t+=e.image(s.href,s.title,s.text);break}case"strong":{let s=r;t+=e.strong(this.parseInline(s.tokens,e));break}case"em":{let s=r;t+=e.em(this.parseInline(s.tokens,e));break}case"codespan":{let s=r;t+=e.codespan(s.text);break}case"br":{t+=e.br();break}case"del":{let s=r;t+=e.del(this.parseInline(s.tokens,e));break}case"text":{let s=r;t+=e.text(s.text);break}default:{let s='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return t}},A=class{options;constructor(n){this.options=n||I}static passThroughHooks=new Set(["preprocess","postprocess"]);preprocess(n){return n}postprocess(n){return n}},ne=class{defaults=ie();options=this.setOptions;parse=this.#e(T.lex,S.parse);parseInline=this.#e(T.lexInline,S.parseInline);Parser=S;Renderer=_;TextRenderer=B;Lexer=T;Tokenizer=D;Hooks=A;constructor(...n){this.use(...n)}walkTokens(n,e){let t=[];for(let i of n)switch(t=t.concat(e.call(this,i)),i.type){case"table":{let r=i;for(let s of r.header)t=t.concat(this.walkTokens(s.tokens,e));for(let s of r.rows)for(let l of s)t=t.concat(this.walkTokens(l.tokens,e));break}case"list":{let r=i;t=t.concat(this.walkTokens(r.items,e));break}default:{let r=i;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(s=>{t=t.concat(this.walkTokens(r[s],e))}):r.tokens&&(t=t.concat(this.walkTokens(r.tokens,e)))}}return t}use(...n){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return n.forEach(t=>{let i=x({},t);if(i.async=this.defaults.async||i.async||!1,t.extensions&&(t.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let s=e.renderers[r.name];s?e.renderers[r.name]=function(...l){let a=r.renderer.apply(this,l);return a===!1&&(a=s.apply(this,l)),a}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=e[r.level];s?s.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),i.extensions=e),t.renderer){let r=this.defaults.renderer||new _(this.defaults);for(let s in t.renderer){let l=t.renderer[s],a=s,h=r[a];r[a]=(...p)=>{let f=l.apply(r,p);return f===!1&&(f=h.apply(r,p)),f||""}}i.renderer=r}if(t.tokenizer){let r=this.defaults.tokenizer||new D(this.defaults);for(let s in t.tokenizer){let l=t.tokenizer[s],a=s,h=r[a];r[a]=(...p)=>{let f=l.apply(r,p);return f===!1&&(f=h.apply(r,p)),f}}i.tokenizer=r}if(t.hooks){let r=this.defaults.hooks||new A;for(let s in t.hooks){let l=t.hooks[s],a=s,h=r[a];A.passThroughHooks.has(s)?r[a]=p=>{if(this.defaults.async)return Promise.resolve(l.call(r,p)).then(u=>h.call(r,u));let f=l.call(r,p);return h.call(r,f)}:r[a]=(...p)=>{let f=l.apply(r,p);return f===!1&&(f=h.apply(r,p)),f}}i.hooks=r}if(t.walkTokens){let r=this.defaults.walkTokens,s=t.walkTokens;i.walkTokens=function(l){let a=[];return a.push(s.call(this,l)),r&&(a=a.concat(r.call(this,l))),a}}this.defaults=x(x({},this.defaults),i)}),this}setOptions(n){return this.defaults=x(x({},this.defaults),n),this}lexer(n,e){return T.lex(n,e??this.defaults)}parser(n,e){return S.parse(n,e??this.defaults)}#e(n,e){return(t,i)=>{let r=x({},i),s=x(x({},this.defaults),r);this.defaults.async===!0&&r.async===!1&&(s.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),s.async=!0);let l=this.#t(!!s.silent,!!s.async);if(typeof t>"u"||t===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(t):t).then(a=>n(a,s)).then(a=>s.walkTokens?Promise.all(this.walkTokens(a,s.walkTokens)).then(()=>a):a).then(a=>e(a,s)).then(a=>s.hooks?s.hooks.postprocess(a):a).catch(l);try{s.hooks&&(t=s.hooks.preprocess(t));let a=n(t,s);s.walkTokens&&this.walkTokens(a,s.walkTokens);let h=e(a,s);return s.hooks&&(h=s.hooks.postprocess(h)),h}catch(a){return l(a)}}}#t(n,e){return t=>{if(t.message+=`
Please report this to https://github.com/markedjs/marked.`,n){let i="<p>An error occurred:</p><pre>"+w(t.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(t);throw t}}},C=new ne;function g(o,n){return C.parse(o,n)}g.options=g.setOptions=function(o){return C.setOptions(o),g.defaults=C.defaults,He(g.defaults),g};g.getDefaults=ie;g.defaults=I;g.use=function(...o){return C.use(...o),g.defaults=C.defaults,He(g.defaults),g};g.walkTokens=function(o,n){return C.walkTokens(o,n)};g.parseInline=C.parseInline;g.Parser=S;g.parser=S.parse;g.Renderer=_;g.TextRenderer=B;g.Lexer=T;g.lexer=T.lex;g.Tokenizer=D;g.Hooks=A;g.parse=g;var St=g.options,Et=g.setOptions,$t=g.use,Rt=g.walkTokens,Ct=g.parseInline;var It=S.parse,Ot=T.lex;var ct=["*"],pt="Copy",ht="Copied",ut=(()=>{class o{constructor(){this._buttonClick$=new F,this.copied$=this._buttonClick$.pipe(ge(()=>he(ce(!0),pe(3e3).pipe(ue(!1)))),de(),fe(1)),this.copiedText$=this.copied$.pipe(me(!1),v(e=>e?ht:pt))}onCopyToClipboardClick(){this._buttonClick$.next()}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=P({type:o,selectors:[["markdown-clipboard"]],standalone:!0,features:[te],decls:4,vars:7,consts:[[1,"markdown-clipboard-button",3,"click"]],template:function(t,i){t&1&&(Z(0,"button",0),L(1,"async"),Ie("click",function(){return i.onCopyToClipboardClick()}),Ae(2),L(3,"async"),W()),t&2&&(Ee("copied",j(1,3,i.copied$)),N(2),De(j(3,5,i.copiedText$)))},dependencies:[K],encapsulation:2,changeDetection:0})}}return o})(),dt=new M("CLIPBOARD_OPTIONS");var re=function(o){return o.CommandLine="command-line",o.LineHighlight="line-highlight",o.LineNumbers="line-numbers",o}(re||{}),Xe=new M("MARKED_EXTENSIONS"),ft=new M("MARKED_OPTIONS"),mt="[ngx-markdown] When using the `emoji` attribute you *have to* include Emoji-Toolkit files to `angular.json` or use imports. See README for more information",gt="[ngx-markdown] When using the `katex` attribute you *have to* include KaTeX files to `angular.json` or use imports. See README for more information",kt="[ngx-markdown] When using the `mermaid` attribute you *have to* include Mermaid files to `angular.json` or use imports. See README for more information",xt="[ngx-markdown] When using the `clipboard` attribute you *have to* include Clipboard files to `angular.json` or use imports. See README for more information",bt="[ngx-markdown] When using the `clipboard` attribute you *have to* provide the `viewContainerRef` parameter to `MarkdownService.render()` function",wt="[ngx-markdown] When using the `src` attribute you *have to* pass the `HttpClient` as a parameter of the `forRoot` method. See README for more information",Ve=new M("SECURITY_CONTEXT");var Je=(()=>{class o{get options(){return this._options}set options(e){this._options=x(x({},this.DEFAULT_MARKED_OPTIONS),e)}get renderer(){return this.options.renderer}set renderer(e){this.options.renderer=e}constructor(e,t,i,r,s,l,a){this.clipboardOptions=e,this.extensions=t,this.platform=r,this.securityContext=s,this.http=l,this.sanitizer=a,this.DEFAULT_MARKED_OPTIONS={renderer:new _},this.DEFAULT_KATEX_OPTIONS={delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}]},this.DEFAULT_MERMAID_OPTIONS={startOnLoad:!1},this.DEFAULT_CLIPBOARD_OPTIONS={buttonComponent:void 0},this.DEFAULT_PARSE_OPTIONS={decodeHtml:!1,inline:!1,emoji:!1,mermaid:!1,markedOptions:void 0,disableSanitizer:!1},this.DEFAULT_RENDER_OPTIONS={clipboard:!1,clipboardOptions:void 0,katex:!1,katexOptions:void 0,mermaid:!1,mermaidOptions:void 0},this._reload$=new F,this.reload$=this._reload$.asObservable(),this.options=i}parse(e,t=this.DEFAULT_PARSE_OPTIONS){let{decodeHtml:i,inline:r,emoji:s,mermaid:l,disableSanitizer:a}=t,h=x(x({},this.options),t.markedOptions),p=h.renderer||this.renderer||new _;this.extensions&&(this.renderer=this.extendsRendererForExtensions(p)),l&&(this.renderer=this.extendsRendererForMermaid(p));let f=this.trimIndentation(e),u=i?this.decodeHtml(f):f,m=s?this.parseEmoji(u):u,b=this.parseMarked(m,h,r);return(a?b:this.sanitizer.sanitize(this.securityContext,b))||""}render(e,t=this.DEFAULT_RENDER_OPTIONS,i){let{clipboard:r,clipboardOptions:s,katex:l,katexOptions:a,mermaid:h,mermaidOptions:p}=t;l&&this.renderKatex(e,x(x({},this.DEFAULT_KATEX_OPTIONS),a)),h&&this.renderMermaid(e,x(x({},this.DEFAULT_MERMAID_OPTIONS),p)),r&&this.renderClipboard(e,i,x(x(x({},this.DEFAULT_CLIPBOARD_OPTIONS),this.clipboardOptions),s)),this.highlight(e)}reload(){this._reload$.next()}getSource(e){if(!this.http)throw new Error(wt);return this.http.get(e,{responseType:"text"}).pipe(v(t=>this.handleExtension(e,t)))}highlight(e){if(!R(this.platform)||typeof Prism>"u"||typeof Prism.highlightAllUnder>"u")return;e||(e=document);let t=e.querySelectorAll('pre code:not([class*="language-"])');Array.prototype.forEach.call(t,i=>i.classList.add("language-none")),Prism.highlightAllUnder(e)}decodeHtml(e){if(!R(this.platform))return e;let t=document.createElement("textarea");return t.innerHTML=e,t.value}extendsRendererForExtensions(e){let t=e;return t.\u0275NgxMarkdownRendererExtendedForExtensions===!0||(this.extensions?.length>0&&g.use(...this.extensions),t.\u0275NgxMarkdownRendererExtendedForExtensions=!0),e}extendsRendererForMermaid(e){let t=e;if(t.\u0275NgxMarkdownRendererExtendedForMermaid===!0)return e;let i=e.code;return e.code=function(r,s,l){return s==="mermaid"?`<div class="mermaid">${r}</div>`:i.call(this,r,s,l)},t.\u0275NgxMarkdownRendererExtendedForMermaid=!0,e}handleExtension(e,t){let i=e.lastIndexOf("://"),r=i>-1?e.substring(i+4):e,s=r.lastIndexOf("/"),l=s>-1?r.substring(s+1).split("?")[0]:"",a=l.lastIndexOf("."),h=a>-1?l.substring(a+1):"";return h&&h!=="md"?"```"+h+`
`+t+"\n```":t}parseMarked(e,t,i=!1){if(t.renderer){let r=x({},t.renderer);delete r.\u0275NgxMarkdownRendererExtendedForExtensions,delete r.\u0275NgxMarkdownRendererExtendedForMermaid,delete t.renderer,g.use({renderer:r})}return i?g.parseInline(e,t):g.parse(e,t)}parseEmoji(e){if(!R(this.platform))return e;if(typeof joypixels>"u"||typeof joypixels.shortnameToUnicode>"u")throw new Error(mt);return joypixels.shortnameToUnicode(e)}renderKatex(e,t){if(R(this.platform)){if(typeof katex>"u"||typeof renderMathInElement>"u")throw new Error(gt);renderMathInElement(e,t)}}renderClipboard(e,t,i){if(!R(this.platform))return;if(typeof ClipboardJS>"u")throw new Error(xt);if(!t)throw new Error(bt);let{buttonComponent:r,buttonTemplate:s}=i,l=e.querySelectorAll("pre");for(let a=0;a<l.length;a++){let h=l.item(a),p=document.createElement("div");p.style.position="relative",h.parentNode.insertBefore(p,h),p.appendChild(h);let f=document.createElement("div");f.style.position="absolute",f.style.top=".5em",f.style.right=".5em",f.style.opacity="0",f.style.transition="opacity 250ms ease-out",f.style.zIndex="1",p.insertAdjacentElement("beforeend",f),h.onmouseover=()=>f.style.opacity="1",h.onmouseout=()=>f.style.opacity="0";let u;if(r){let b=t.createComponent(r);u=b.hostView,b.changeDetectorRef.markForCheck()}else if(s)u=t.createEmbeddedView(s);else{let b=t.createComponent(ut);u=b.hostView,b.changeDetectorRef.markForCheck()}let m;u.rootNodes.forEach(b=>{b.onmouseover=()=>f.style.opacity="1",f.appendChild(b),m=new ClipboardJS(b,{text:()=>h.innerText})}),u.onDestroy(()=>m.destroy())}}renderMermaid(e,t=this.DEFAULT_MERMAID_OPTIONS){if(!R(this.platform))return;if(typeof mermaid>"u"||typeof mermaid.initialize>"u")throw new Error(kt);let i=e.querySelectorAll(".mermaid");i.length!==0&&(mermaid.initialize(t),mermaid.run({nodes:i}))}trimIndentation(e){if(!e)return"";let t;return e.split(`
`).map(i=>{let r=t;return i.length>0&&(r=isNaN(r)?i.search(/\S|$/):Math.min(i.search(/\S|$/),r)),isNaN(t)&&(t=r),r?i.substring(r):i}).join(`
`)}static{this.\u0275fac=function(t){return new(t||o)(E(dt,8),E(Xe,8),E(ft,8),E(ye),E(Ve),E(X,8),E(Pe))}}static{this.\u0275prov=xe({token:o,factory:o.\u0275fac})}}return o})(),Ye=(()=>{class o{get disableSanitizer(){return this._disableSanitizer}set disableSanitizer(e){this._disableSanitizer=this.coerceBooleanProperty(e)}get inline(){return this._inline}set inline(e){this._inline=this.coerceBooleanProperty(e)}get clipboard(){return this._clipboard}set clipboard(e){this._clipboard=this.coerceBooleanProperty(e)}get emoji(){return this._emoji}set emoji(e){this._emoji=this.coerceBooleanProperty(e)}get katex(){return this._katex}set katex(e){this._katex=this.coerceBooleanProperty(e)}get mermaid(){return this._mermaid}set mermaid(e){this._mermaid=this.coerceBooleanProperty(e)}get lineHighlight(){return this._lineHighlight}set lineHighlight(e){this._lineHighlight=this.coerceBooleanProperty(e)}get lineNumbers(){return this._lineNumbers}set lineNumbers(e){this._lineNumbers=this.coerceBooleanProperty(e)}get commandLine(){return this._commandLine}set commandLine(e){this._commandLine=this.coerceBooleanProperty(e)}constructor(e,t,i){this.element=e,this.markdownService=t,this.viewContainerRef=i,this.error=new H,this.load=new H,this.ready=new H,this._clipboard=!1,this._commandLine=!1,this._disableSanitizer=!1,this._emoji=!1,this._inline=!1,this._katex=!1,this._lineHighlight=!1,this._lineNumbers=!1,this._mermaid=!1,this.destroyed$=new F}ngOnChanges(){this.loadContent()}loadContent(){if(this.data!=null){this.handleData();return}if(this.src!=null){this.handleSrc();return}}ngAfterViewInit(){!this.data&&!this.src&&this.handleTransclusion(),this.markdownService.reload$.pipe(ke(this.destroyed$)).subscribe(()=>this.loadContent())}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}render(e,t=!1){return ae(this,null,function*(){let i={decodeHtml:t,inline:this.inline,emoji:this.emoji,mermaid:this.mermaid,disableSanitizer:this.disableSanitizer},r={clipboard:this.clipboard,clipboardOptions:{buttonComponent:this.clipboardButtonComponent,buttonTemplate:this.clipboardButtonTemplate},katex:this.katex,katexOptions:this.katexOptions,mermaid:this.mermaid,mermaidOptions:this.mermaidOptions},s=yield this.markdownService.parse(e,i);this.element.nativeElement.innerHTML=s,this.handlePlugins(),this.markdownService.render(this.element.nativeElement,r,this.viewContainerRef),this.ready.emit()})}coerceBooleanProperty(e){return e!=null&&`${String(e)}`!="false"}handleData(){this.render(this.data)}handleSrc(){this.markdownService.getSource(this.src).subscribe({next:e=>{this.render(e).then(()=>{this.load.emit(e)})},error:e=>this.error.emit(e)})}handleTransclusion(){this.render(this.element.nativeElement.innerHTML,!0)}handlePlugins(){this.commandLine&&(this.setPluginClass(this.element.nativeElement,re.CommandLine),this.setPluginOptions(this.element.nativeElement,{dataFilterOutput:this.filterOutput,dataHost:this.host,dataPrompt:this.prompt,dataOutput:this.output,dataUser:this.user})),this.lineHighlight&&this.setPluginOptions(this.element.nativeElement,{dataLine:this.line,dataLineOffset:this.lineOffset}),this.lineNumbers&&(this.setPluginClass(this.element.nativeElement,re.LineNumbers),this.setPluginOptions(this.element.nativeElement,{dataStart:this.start}))}setPluginClass(e,t){let i=e.querySelectorAll("pre");for(let r=0;r<i.length;r++){let s=t instanceof Array?t:[t];i.item(r).classList.add(...s)}}setPluginOptions(e,t){let i=e.querySelectorAll("pre");for(let r=0;r<i.length;r++)Object.keys(t).forEach(s=>{let l=t[s];if(l){let a=this.toLispCase(s);i.item(r).setAttribute(a,l.toString())}})}toLispCase(e){let t=e.match(/([A-Z])/g);if(!t)return e;let i=e.toString();for(let r=0,s=t.length;r<s;r++)i=i.replace(new RegExp(t[r]),"-"+t[r].toLowerCase());return i.slice(0,1)==="-"&&(i=i.slice(1)),i}static{this.\u0275fac=function(t){return new(t||o)(z(we),z(Je),z(Te))}}static{this.\u0275cmp=P({type:o,selectors:[["markdown"],["","markdown",""]],inputs:{data:"data",src:"src",disableSanitizer:"disableSanitizer",inline:"inline",clipboard:"clipboard",clipboardButtonComponent:"clipboardButtonComponent",clipboardButtonTemplate:"clipboardButtonTemplate",emoji:"emoji",katex:"katex",katexOptions:"katexOptions",mermaid:"mermaid",mermaidOptions:"mermaidOptions",lineHighlight:"lineHighlight",line:"line",lineOffset:"lineOffset",lineNumbers:"lineNumbers",start:"start",commandLine:"commandLine",filterOutput:"filterOutput",host:"host",prompt:"prompt",output:"output",user:"user"},outputs:{error:"error",load:"load",ready:"ready"},standalone:!0,features:[be,te],ngContentSelectors:ct,decls:1,vars:0,template:function(t,i){t&1&&(Oe(),ze(0))},encapsulation:2})}}return o})();function yt(o){return[Je,o?.loader??[],o?.clipboardOptions??[],o?.markedOptions??[],{provide:Xe,useValue:o?.markedExtensions??[]},{provide:Ve,useValue:o?.sanitize??_e.HTML}]}var Ge=(()=>{class o{static forRoot(e){return{ngModule:o,providers:[yt(e)]}}static forChild(){return{ngModule:o}}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275mod=q({type:o})}static{this.\u0275inj=U({imports:[Q]})}}return o})(),Ke;(function(o){let n;(function(i){i.Strict="strict",i.Loose="loose",i.Antiscript="antiscript",i.Sandbox="sandbox"})(n=o.SecurityLevel||(o.SecurityLevel={}));let e;(function(i){i.Base="base",i.Forest="forest",i.Dark="dark",i.Default="default",i.Neutral="neutral"})(e=o.Theme||(o.Theme={}));let t;(function(i){i[i.Debug=1]="Debug",i[i.Info=2]="Info",i[i.Warn=3]="Warn",i[i.Error=4]="Error",i[i.Fatal=5]="Fatal"})(t=o.LogLevel||(o.LogLevel={}))})(Ke||(Ke={}));function Tt(o,n){if(o&1&&(Re(0),$e(1,"div",2),Ce()),o&2){let e=n.ngIf;N(),ee("src",e)}}var et=(()=>{class o{constructor(e){this.route=e}ngOnInit(){this.post$=this.route.params.pipe(v(e=>`/assets/${e.id}/${e.id}.md`))}static{this.\u0275fac=function(t){return new(t||o)(z(Ne))}}static{this.\u0275cmp=P({type:o,selectors:[["app-post"]],decls:3,vars:3,consts:[[1,"markdown-post"],[4,"ngIf"],["markdown","",1,"post",3,"src"]],template:function(t,i){t&1&&(Z(0,"div",0),Se(1,Tt,2,1,"ng-container",1),L(2,"async"),W()),t&2&&(N(),ee("ngIf",j(2,1,i.post$)))},dependencies:[ve,Ye,K],styles:[".markdown-post[_ngcontent-%COMP%]{margin-top:5px;margin-bottom:50px;min-height:90%;min-width:80%;text-align:left;background-color:var(--black)} .post p img{display:block;margin-left:auto;margin-right:auto;max-width:80%;height:auto;align-content:center;border-radius:50px}@media (max-width: 600px){code[_ngcontent-%COMP%]{white-space:pre}}"]})}}return o})();var hn=(()=>{class o{static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275mod=q({type:o})}static{this.\u0275inj=U({imports:[Q,Le.forChild([{path:"",component:je},{path:":id",component:et,pathMatch:"full"}]),Me,Ge.forRoot({loader:X})]})}}return o})();export{hn as BlogModule};