@neuralnomads/codenomad-dev 0.13.1-dev-20260330-37b3f85e → 0.13.1-dev-20260331-197dee2a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/opencode-config/plugin/codenomad.ts +30 -0
  2. package/dist/server/http-server.js +8 -1
  3. package/dist/server/routes/plugin.js +21 -4
  4. package/dist/ui/__tests__/remote-ui.test.js +21 -0
  5. package/dist/ui/remote-ui.js +2 -2
  6. package/package.json +1 -1
  7. package/public/assets/{ChangesTab-DReBtiCD.js → ChangesTab-C8zdDjmi.js} +2 -2
  8. package/public/assets/{DiffToolbar-zFp8QctV.js → DiffToolbar-9t70qPdk.js} +1 -1
  9. package/public/assets/{FilesTab-ondRgka_.js → FilesTab-D7BmKaIy.js} +2 -2
  10. package/public/assets/{GitChangesTab-BOcSmEC0.js → GitChangesTab-LxDWDUWh.js} +2 -2
  11. package/public/assets/{SplitFilePanel-CclMrjYs.js → SplitFilePanel-CiGeO3Fu.js} +1 -1
  12. package/public/assets/{StatusTab-BVcDbQI8.js → StatusTab-Aa5lKnqY.js} +1 -1
  13. package/public/assets/{bundle-full-DaR4-84s.js → bundle-full-Ci4Nsw1a.js} +1 -1
  14. package/public/assets/{diff-viewer-NJrs1tpM.js → diff-viewer-DUacI4bj.js} +1 -1
  15. package/public/assets/{index-9dJbqHxs.js → index-5Van9SDX.js} +1 -1
  16. package/public/assets/{index-B5yK9f1K.js → index-BMjCY26M.js} +1 -1
  17. package/public/assets/{index-C96iOm92.js → index-BbGDMdki.js} +1 -1
  18. package/public/assets/{index-DahNWccx.js → index-CAUPG2JG.js} +1 -1
  19. package/public/assets/{index-DWVFDb6o.js → index-DBKPDTTj.js} +1 -1
  20. package/public/assets/{index-Bjox8T8a.js → index-DNAppyAC.js} +2 -2
  21. package/public/assets/{index-BGfH2XEf.js → index-DzF6d6KL.js} +1 -1
  22. package/public/assets/{index-Bc4VzU8i.js → index-Xia2ufwz.js} +1 -1
  23. package/public/assets/{index-Dcri1TSs.js → index-hY6tafTK.js} +1 -1
  24. package/public/assets/{loading-DDlbjmrg.js → loading-5fXD_yBJ.js} +1 -1
  25. package/public/assets/{main-By_B3-BG.js → main-JkDQRHSo.js} +30 -30
  26. package/public/assets/{markdown-tZ1CDnLU.js → markdown-DZ9UzdXg.js} +18 -18
  27. package/public/assets/{monaco-viewer-DTwkOabu.js → monaco-viewer-DK-6pkvP.js} +3 -3
  28. package/public/assets/{todo-CW64L-p2.js → todo-BxfNuKUB.js} +1 -1
  29. package/public/assets/{tool-call-l0vsLPTC.js → tool-call-Bakver9o.js} +3 -3
  30. package/public/assets/{unified-picker-Dw7fMG5X.js → unified-picker-Qz5srwQH.js} +1 -1
  31. package/public/index.html +4 -4
  32. package/public/loading.html +4 -4
  33. package/public/sw.js +1 -1
@@ -1,20 +1,20 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/bundle-full-DaR4-84s.js","assets/index-Bjox8T8a.js","assets/git-diff-vendor-CAv-4upN.js","assets/fast-diff-vendor-DgdwVvTQ.js","assets/highlight-vendor-8FKMu9os.js","assets/git-diff-vendor-HAZkIolJ.css","assets/monaco-viewer-DTwkOabu.js","assets/index-C2RrcFJ5.css"])))=>i.map(i=>d[i]);
2
- var Me=Object.defineProperty;var pe=o=>{throw TypeError(o)};var Qe=(o,t,e)=>t in o?Me(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var k=(o,t,e)=>Qe(o,typeof t!="symbol"?t+"":t,e),Oe=(o,t,e)=>t.has(o)||pe("Cannot "+e);var ge=(o,t,e)=>t.has(o)?pe("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(o):t.set(o,e);var Z=(o,t,e)=>(Oe(o,t,"access private method"),e);import{t as He,_ as De}from"./index-Bjox8T8a.js";import{k as je}from"./monaco-viewer-DTwkOabu.js";import{ai as Y,v as y}from"./main-By_B3-BG.js";import"./git-diff-vendor-CAv-4upN.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";function ne(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let L=ne();function we(o){L=o}const ye=/[&<>"']/,Ne=new RegExp(ye.source,"g"),$e=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Fe=new RegExp($e.source,"g"),Ue={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},fe=o=>Ue[o];function x(o,t){if(t){if(ye.test(o))return o.replace(Ne,fe)}else if($e.test(o))return o.replace(Fe,fe);return o}const Ge=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function We(o){return o.replace(Ge,(t,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)):""))}const Xe=/(^|[^\[])\^/g;function d(o,t){let e=typeof o=="string"?o:o.source;t=t||"";const n={replace:(i,r)=>{let s=typeof r=="string"?r:r.source;return s=s.replace(Xe,"$1"),e=e.replace(i,s),n},getRegex:()=>new RegExp(e,t)};return n}function de(o){try{o=encodeURI(o).replace(/%25/g,"%")}catch{return null}return o}const A={exec:()=>null};function ke(o,t){const e=o.replace(/\|/g,(r,s,l)=>{let a=!1,u=s;for(;--u>=0&&l[u]==="\\";)a=!a;return a?"|":" |"}),n=e.split(/ \|/);let i=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(/\\\|/g,"|");return n}function B(o,t,e){const n=o.length;if(n===0)return"";let i=0;for(;i<n&&o.charAt(n-i-1)===t;)i++;return o.slice(0,n-i)}function Ke(o,t){if(o.indexOf(t[1])===-1)return-1;let e=0;for(let n=0;n<o.length;n++)if(o[n]==="\\")n++;else if(o[n]===t[0])e++;else if(o[n]===t[1]&&(e--,e<0))return n;return-1}function xe(o,t,e,n){const i=t.href,r=t.title?x(t.title):null,s=o[1].replace(/\\([\[\]])/g,"$1");if(o[0].charAt(0)!=="!"){n.state.inLink=!0;const l={type:"link",raw:e,href:i,title:r,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,l}return{type:"image",raw:e,href:i,title:r,text:x(s)}}function Ve(o,t){const e=o.match(/^(\s+)(?:```)/);if(e===null)return t;const n=e[1];return t.split(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/bundle-full-Ci4Nsw1a.js","assets/index-DNAppyAC.js","assets/git-diff-vendor-CAv-4upN.js","assets/fast-diff-vendor-DgdwVvTQ.js","assets/highlight-vendor-8FKMu9os.js","assets/git-diff-vendor-HAZkIolJ.css","assets/monaco-viewer-DK-6pkvP.js","assets/index-C2RrcFJ5.css"])))=>i.map(i=>d[i]);
2
+ var He=Object.defineProperty;var ge=o=>{throw TypeError(o)};var Qe=(o,t,e)=>t in o?He(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var k=(o,t,e)=>Qe(o,typeof t!="symbol"?t+"":t,e),Oe=(o,t,e)=>t.has(o)||ge("Cannot "+e);var fe=(o,t,e)=>t.has(o)?ge("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(o):t.set(o,e);var Z=(o,t,e)=>(Oe(o,t,"access private method"),e);import{t as De,_ as je}from"./index-DNAppyAC.js";import{k as Ne}from"./monaco-viewer-DK-6pkvP.js";import{ai as H,v as b}from"./main-JkDQRHSo.js";import"./git-diff-vendor-CAv-4upN.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";function se(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let L=se();function ye(o){L=o}const $e=/[&<>"']/,Fe=new RegExp($e.source,"g"),Te=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Ue=new RegExp(Te.source,"g"),Ge={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},de=o=>Ge[o];function x(o,t){if(t){if($e.test(o))return o.replace(Fe,de)}else if(Te.test(o))return o.replace(Ue,de);return o}const We=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Xe(o){return o.replace(We,(t,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)):""))}const Ke=/(^|[^\[])\^/g;function d(o,t){let e=typeof o=="string"?o:o.source;t=t||"";const n={replace:(i,r)=>{let s=typeof r=="string"?r:r.source;return s=s.replace(Ke,"$1"),e=e.replace(i,s),n},getRegex:()=>new RegExp(e,t)};return n}function ke(o){try{o=encodeURI(o).replace(/%25/g,"%")}catch{return null}return o}const A={exec:()=>null};function xe(o,t){const e=o.replace(/\|/g,(r,s,l)=>{let a=!1,u=s;for(;--u>=0&&l[u]==="\\";)a=!a;return a?"|":" |"}),n=e.split(/ \|/);let i=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(/\\\|/g,"|");return n}function B(o,t,e){const n=o.length;if(n===0)return"";let i=0;for(;i<n&&o.charAt(n-i-1)===t;)i++;return o.slice(0,n-i)}function Ve(o,t){if(o.indexOf(t[1])===-1)return-1;let e=0;for(let n=0;n<o.length;n++)if(o[n]==="\\")n++;else if(o[n]===t[0])e++;else if(o[n]===t[1]&&(e--,e<0))return n;return-1}function me(o,t,e,n){const i=t.href,r=t.title?x(t.title):null,s=o[1].replace(/\\([\[\]])/g,"$1");if(o[0].charAt(0)!=="!"){n.state.inLink=!0;const l={type:"link",raw:e,href:i,title:r,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,l}return{type:"image",raw:e,href:i,title:r,text:x(s)}}function Je(o,t){const e=o.match(/^(\s+)(?:```)/);if(e===null)return t;const n=e[1];return t.split(`
3
3
  `).map(i=>{const r=i.match(/^\s+/);if(r===null)return i;const[s]=r;return s.length>=n.length?i.slice(n.length):i}).join(`
4
- `)}class D{constructor(t){k(this,"options");k(this,"rules");k(this,"lexer");this.options=t||L}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const n=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:B(n,`
5
- `)}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const n=e[0],i=Ve(n,e[3]||"");return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:i}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(/#$/.test(n)){const i=B(n,"#");(this.options.pedantic||!i||/ $/.test(i))&&(n=i.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:e[0]}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let n=e[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
4
+ `)}class N{constructor(t){k(this,"options");k(this,"rules");k(this,"lexer");this.options=t||L}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const n=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:B(n,`
5
+ `)}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const n=e[0],i=Je(n,e[3]||"");return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:i}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(/#$/.test(n)){const i=B(n,"#");(this.options.pedantic||!i||/ $/.test(i))&&(n=i.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:e[0]}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let n=e[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
6
6
  $1`);n=B(n.replace(/^ *>[ \t]?/gm,""),`
7
7
  `);const i=this.lexer.state.top;this.lexer.state.top=!0;const r=this.lexer.blockTokens(n);return this.lexer.state.top=i,{type:"blockquote",raw:e[0],tokens:r,text:n}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim();const i=n.length>1,r={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");const s=new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`);let l="",a="",u=!1;for(;t;){let c=!1;if(!(e=s.exec(t))||this.rules.block.hr.test(t))break;l=e[0],t=t.substring(l.length);let p=e[2].split(`
8
- `,1)[0].replace(/^\t+/,X=>" ".repeat(3*X.length)),h=t.split(`
8
+ `,1)[0].replace(/^\t+/,V=>" ".repeat(3*V.length)),h=t.split(`
9
9
  `,1)[0],f=0;this.options.pedantic?(f=2,a=p.trimStart()):(f=e[2].search(/[^ ]/),f=f>4?1:f,a=p.slice(f),f+=e[1].length);let $=!1;if(!p&&/^ *$/.test(h)&&(l+=h+`
10
- `,t=t.substring(h.length+1),c=!0),!c){const X=new RegExp(`^ {0,${Math.min(3,f-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),ce=new RegExp(`^ {0,${Math.min(3,f-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),he=new RegExp(`^ {0,${Math.min(3,f-1)}}(?:\`\`\`|~~~)`),ue=new RegExp(`^ {0,${Math.min(3,f-1)}}#`);for(;t;){const K=t.split(`
11
- `,1)[0];if(h=K,this.options.pedantic&&(h=h.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),he.test(h)||ue.test(h)||X.test(h)||ce.test(t))break;if(h.search(/[^ ]/)>=f||!h.trim())a+=`
12
- `+h.slice(f);else{if($||p.search(/[^ ]/)>=4||he.test(p)||ue.test(p)||ce.test(p))break;a+=`
13
- `+h}!$&&!h.trim()&&($=!0),l+=K+`
14
- `,t=t.substring(K.length+1),p=h.slice(f)}}r.loose||(u?r.loose=!0:/\n *\n *$/.test(l)&&(u=!0));let m=null,z;this.options.gfm&&(m=/^\[[ xX]\] /.exec(a),m&&(z=m[0]!=="[ ] ",a=a.replace(/^\[[ xX]\] +/,""))),r.items.push({type:"list_item",raw:l,task:!!m,checked:z,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 c=0;c<r.items.length;c++)if(this.lexer.state.top=!1,r.items[c].tokens=this.lexer.blockTokens(r.items[c].text,[]),!r.loose){const p=r.items[c].tokens.filter(f=>f.type==="space"),h=p.length>0&&p.some(f=>/\n.*\n/.test(f.raw));r.loose=h}if(r.loose)for(let c=0;c<r.items.length;c++)r.items[c].loose=!0;return r}}html(t){const e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){const e=this.rules.block.def.exec(t);if(e){const n=e[1].toLowerCase().replace(/\s+/g," "),i=e[2]?e[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:i,title:r}}}table(t){const e=this.rules.block.table.exec(t);if(!e||!/[:|]/.test(e[2]))return;const n=ke(e[1]),i=e[2].replace(/^\||\| *$/g,"").split("|"),r=e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split(`
15
- `):[],s={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===i.length){for(const l of i)/^ *-+: *$/.test(l)?s.align.push("right"):/^ *:-+: *$/.test(l)?s.align.push("center"):/^ *:-+ *$/.test(l)?s.align.push("left"):s.align.push(null);for(const l of n)s.header.push({text:l,tokens:this.lexer.inline(l)});for(const l of r)s.rows.push(ke(l,s.header.length).map(a=>({text:a,tokens:this.lexer.inline(a)})));return s}}lheading(t){const e=this.rules.block.lheading.exec(t);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(t){const e=this.rules.block.paragraph.exec(t);if(e){const n=e[1].charAt(e[1].length-1)===`
16
- `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:x(e[1])}}tag(t){const e=this.rules.inline.tag.exec(t);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(t){const e=this.rules.inline.link.exec(t);if(e){const n=e[2].trim();if(!this.options.pedantic&&/^</.test(n)){if(!/>$/.test(n))return;const s=B(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{const s=Ke(e[2],"()");if(s>-1){const 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){const 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(n)?i=i.slice(1):i=i.slice(1,-1)),xe(e,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){const i=(n[2]||n[1]).replace(/\s+/g," "),r=e[i.toLowerCase()];if(!r){const s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return xe(n,r,n[0],this.lexer)}}emStrong(t,e,n=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!i||i[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const s=[...i[0]].length-1;let l,a,u=s,c=0;const p=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,e=e.slice(-1*t.length+s);(i=p.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]){u+=a;continue}else if((i[5]||i[6])&&s%3&&!((s+a)%3)){c+=a;continue}if(u-=a,u>0)continue;a=Math.min(a,a+u+c);const h=[...i[0]][0].length,f=t.slice(0,s+i.index+h+a);if(Math.min(s,a)%2){const m=f.slice(1,-1);return{type:"em",raw:f,text:m,tokens:this.lexer.inlineTokens(m)}}const $=f.slice(2,-2);return{type:"strong",raw:f,text:$,tokens:this.lexer.inlineTokens($)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(/\n/g," ");const i=/[^ ]/.test(n),r=/^ /.test(n)&&/ $/.test(n);return i&&r&&(n=n.substring(1,n.length-1)),n=x(n,!0),{type:"codespan",raw:e[0],text:n}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let n,i;return e[2]==="@"?(n=x(e[1]),i="mailto:"+n):(n=x(e[1]),i=n),{type:"link",raw:e[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(t){var n;let e;if(e=this.rules.inline.url.exec(t)){let i,r;if(e[2]==="@")i=x(e[0]),r="mailto:"+i;else{let s;do s=e[0],e[0]=((n=this.rules.inline._backpedal.exec(e[0]))==null?void 0:n[0])??"";while(s!==e[0]);i=x(e[0]),e[1]==="www."?r="http://"+e[0]:r=e[0]}return{type:"link",raw:e[0],text:i,href:r,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){let n;return this.lexer.state.inRawBlock?n=e[0]:n=x(e[0]),{type:"text",raw:e[0],text:n}}}}const Je=/^(?: *(?:\n|$))+/,Ye=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,et=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,P=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,tt=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Te=/(?:[*+-]|\d{1,9}[.)])/,ze=d(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,Te).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),se=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,nt=/^[^\n]+/,ie=/(?!\s*\])(?:\\.|[^\[\]\\])+/,st=d(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",ie).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),it=d(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Te).getRegex(),G="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",re=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,rt=d("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",re).replace("tag",G).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Re=d(se).replace("hr",P).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",G).getRegex(),lt=d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Re).getRegex(),le={blockquote:lt,code:Ye,def:st,fences:et,heading:tt,hr:P,html:rt,lheading:ze,list:it,newline:Je,paragraph:Re,table:A,text:nt},me=d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",P).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\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",G).getRegex(),ot={...le,table:me,paragraph:d(se).replace("hr",P).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",me).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",G).getRegex()},at={...le,html:d(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",re).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:A,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:d(se).replace("hr",P).replace("heading",` *#{1,6} *[^
17
- ]`).replace("lheading",ze).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},_e=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ct=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Se=/^( {2,}|\\)\n(?!\s*$)/,ht=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,q="\\p{P}\\p{S}",ut=d(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,q).getRegex(),pt=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,gt=d(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,q).getRegex(),ft=d("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,q).getRegex(),dt=d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,q).getRegex(),kt=d(/\\([punct])/,"gu").replace(/punct/g,q).getRegex(),xt=d(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),mt=d(re).replace("(?:-->|$)","-->").getRegex(),bt=d("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",mt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),j=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,wt=d(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",j).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Le=d(/^!?\[(label)\]\[(ref)\]/).replace("label",j).replace("ref",ie).getRegex(),Ie=d(/^!?\[(ref)\](?:\[\])?/).replace("ref",ie).getRegex(),yt=d("reflink|nolink(?!\\()","g").replace("reflink",Le).replace("nolink",Ie).getRegex(),oe={_backpedal:A,anyPunctuation:kt,autolink:xt,blockSkip:pt,br:Se,code:ct,del:A,emStrongLDelim:gt,emStrongRDelimAst:ft,emStrongRDelimUnd:dt,escape:_e,link:wt,nolink:Ie,punctuation:ut,reflink:Le,reflinkSearch:yt,tag:bt,text:ht,url:A},$t={...oe,link:d(/^!?\[(label)\]\((.*?)\)/).replace("label",j).getRegex(),reflink:d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",j).getRegex()},ee={...oe,escape:d(_e).replace("])","~|])").getRegex(),url:d(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Tt={...ee,br:d(Se).replace("{2,}","*").getRegex(),text:d(ee.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},M={normal:le,gfm:ot,pedantic:at},I={normal:oe,gfm:ee,breaks:Tt,pedantic:$t};class b{constructor(t){k(this,"tokens");k(this,"options");k(this,"state");k(this,"tokenizer");k(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||L,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 e={block:M.normal,inline:I.normal};this.options.pedantic?(e.block=M.pedantic,e.inline=I.pedantic):this.options.gfm&&(e.block=M.gfm,this.options.breaks?e.inline=I.breaks:e.inline=I.gfm),this.tokenizer.rules=e}static get rules(){return{block:M,inline:I}}static lex(t,e){return new b(e).lex(t)}static lexInline(t,e){return new b(e).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
10
+ `,t=t.substring(h.length+1),c=!0),!c){const V=new RegExp(`^ {0,${Math.min(3,f-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),he=new RegExp(`^ {0,${Math.min(3,f-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),ue=new RegExp(`^ {0,${Math.min(3,f-1)}}(?:\`\`\`|~~~)`),pe=new RegExp(`^ {0,${Math.min(3,f-1)}}#`);for(;t;){const J=t.split(`
11
+ `,1)[0];if(h=J,this.options.pedantic&&(h=h.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),ue.test(h)||pe.test(h)||V.test(h)||he.test(t))break;if(h.search(/[^ ]/)>=f||!h.trim())a+=`
12
+ `+h.slice(f);else{if($||p.search(/[^ ]/)>=4||ue.test(p)||pe.test(p)||he.test(p))break;a+=`
13
+ `+h}!$&&!h.trim()&&($=!0),l+=J+`
14
+ `,t=t.substring(J.length+1),p=h.slice(f)}}r.loose||(u?r.loose=!0:/\n *\n *$/.test(l)&&(u=!0));let m=null,z;this.options.gfm&&(m=/^\[[ xX]\] /.exec(a),m&&(z=m[0]!=="[ ] ",a=a.replace(/^\[[ xX]\] +/,""))),r.items.push({type:"list_item",raw:l,task:!!m,checked:z,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 c=0;c<r.items.length;c++)if(this.lexer.state.top=!1,r.items[c].tokens=this.lexer.blockTokens(r.items[c].text,[]),!r.loose){const p=r.items[c].tokens.filter(f=>f.type==="space"),h=p.length>0&&p.some(f=>/\n.*\n/.test(f.raw));r.loose=h}if(r.loose)for(let c=0;c<r.items.length;c++)r.items[c].loose=!0;return r}}html(t){const e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){const e=this.rules.block.def.exec(t);if(e){const n=e[1].toLowerCase().replace(/\s+/g," "),i=e[2]?e[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:i,title:r}}}table(t){const e=this.rules.block.table.exec(t);if(!e||!/[:|]/.test(e[2]))return;const n=xe(e[1]),i=e[2].replace(/^\||\| *$/g,"").split("|"),r=e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split(`
15
+ `):[],s={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===i.length){for(const l of i)/^ *-+: *$/.test(l)?s.align.push("right"):/^ *:-+: *$/.test(l)?s.align.push("center"):/^ *:-+ *$/.test(l)?s.align.push("left"):s.align.push(null);for(const l of n)s.header.push({text:l,tokens:this.lexer.inline(l)});for(const l of r)s.rows.push(xe(l,s.header.length).map(a=>({text:a,tokens:this.lexer.inline(a)})));return s}}lheading(t){const e=this.rules.block.lheading.exec(t);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(t){const e=this.rules.block.paragraph.exec(t);if(e){const n=e[1].charAt(e[1].length-1)===`
16
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:x(e[1])}}tag(t){const e=this.rules.inline.tag.exec(t);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(t){const e=this.rules.inline.link.exec(t);if(e){const n=e[2].trim();if(!this.options.pedantic&&/^</.test(n)){if(!/>$/.test(n))return;const s=B(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{const s=Ve(e[2],"()");if(s>-1){const 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){const 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(n)?i=i.slice(1):i=i.slice(1,-1)),me(e,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){const i=(n[2]||n[1]).replace(/\s+/g," "),r=e[i.toLowerCase()];if(!r){const s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return me(n,r,n[0],this.lexer)}}emStrong(t,e,n=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!i||i[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const s=[...i[0]].length-1;let l,a,u=s,c=0;const p=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,e=e.slice(-1*t.length+s);(i=p.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]){u+=a;continue}else if((i[5]||i[6])&&s%3&&!((s+a)%3)){c+=a;continue}if(u-=a,u>0)continue;a=Math.min(a,a+u+c);const h=[...i[0]][0].length,f=t.slice(0,s+i.index+h+a);if(Math.min(s,a)%2){const m=f.slice(1,-1);return{type:"em",raw:f,text:m,tokens:this.lexer.inlineTokens(m)}}const $=f.slice(2,-2);return{type:"strong",raw:f,text:$,tokens:this.lexer.inlineTokens($)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(/\n/g," ");const i=/[^ ]/.test(n),r=/^ /.test(n)&&/ $/.test(n);return i&&r&&(n=n.substring(1,n.length-1)),n=x(n,!0),{type:"codespan",raw:e[0],text:n}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let n,i;return e[2]==="@"?(n=x(e[1]),i="mailto:"+n):(n=x(e[1]),i=n),{type:"link",raw:e[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(t){var n;let e;if(e=this.rules.inline.url.exec(t)){let i,r;if(e[2]==="@")i=x(e[0]),r="mailto:"+i;else{let s;do s=e[0],e[0]=((n=this.rules.inline._backpedal.exec(e[0]))==null?void 0:n[0])??"";while(s!==e[0]);i=x(e[0]),e[1]==="www."?r="http://"+e[0]:r=e[0]}return{type:"link",raw:e[0],text:i,href:r,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){let n;return this.lexer.state.inRawBlock?n=e[0]:n=x(e[0]),{type:"text",raw:e[0],text:n}}}}const Ye=/^(?: *(?:\n|$))+/,et=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,tt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,P=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,nt=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ze=/(?:[*+-]|\d{1,9}[.)])/,Re=d(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,ze).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),ie=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,st=/^[^\n]+/,re=/(?!\s*\])(?:\\.|[^\[\]\\])+/,it=d(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",re).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),rt=d(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ze).getRegex(),X="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",le=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,lt=d("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",le).replace("tag",X).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_e=d(ie).replace("hr",P).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",X).getRegex(),ot=d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_e).getRegex(),oe={blockquote:ot,code:et,def:it,fences:tt,heading:nt,hr:P,html:lt,lheading:Re,list:rt,newline:Ye,paragraph:_e,table:A,text:st},be=d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",P).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\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",X).getRegex(),at={...oe,table:be,paragraph:d(ie).replace("hr",P).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",be).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",X).getRegex()},ct={...oe,html:d(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",le).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:A,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:d(ie).replace("hr",P).replace("heading",` *#{1,6} *[^
17
+ ]`).replace("lheading",Re).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Se=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ht=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Le=/^( {2,}|\\)\n(?!\s*$)/,ut=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,q="\\p{P}\\p{S}",pt=d(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,q).getRegex(),gt=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,ft=d(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,q).getRegex(),dt=d("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,q).getRegex(),kt=d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,q).getRegex(),xt=d(/\\([punct])/,"gu").replace(/punct/g,q).getRegex(),mt=d(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),bt=d(le).replace("(?:-->|$)","-->").getRegex(),wt=d("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",bt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),F=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,yt=d(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",F).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ie=d(/^!?\[(label)\]\[(ref)\]/).replace("label",F).replace("ref",re).getRegex(),Ae=d(/^!?\[(ref)\](?:\[\])?/).replace("ref",re).getRegex(),$t=d("reflink|nolink(?!\\()","g").replace("reflink",Ie).replace("nolink",Ae).getRegex(),ae={_backpedal:A,anyPunctuation:xt,autolink:mt,blockSkip:gt,br:Le,code:ht,del:A,emStrongLDelim:ft,emStrongRDelimAst:dt,emStrongRDelimUnd:kt,escape:Se,link:yt,nolink:Ae,punctuation:pt,reflink:Ie,reflinkSearch:$t,tag:wt,text:ut,url:A},Tt={...ae,link:d(/^!?\[(label)\]\((.*?)\)/).replace("label",F).getRegex(),reflink:d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",F).getRegex()},te={...ae,escape:d(Se).replace("])","~|])").getRegex(),url:d(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},zt={...te,br:d(Le).replace("{2,}","*").getRegex(),text:d(te.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},M={normal:oe,gfm:at,pedantic:ct},I={normal:ae,gfm:te,breaks:zt,pedantic:Tt};class w{constructor(t){k(this,"tokens");k(this,"options");k(this,"state");k(this,"tokenizer");k(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||L,this.options.tokenizer=this.options.tokenizer||new N,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 e={block:M.normal,inline:I.normal};this.options.pedantic?(e.block=M.pedantic,e.inline=I.pedantic):this.options.gfm&&(e.block=M.gfm,this.options.breaks?e.inline=I.breaks:e.inline=I.gfm),this.tokenizer.rules=e}static get rules(){return{block:M,inline:I}}static lex(t,e){return new w(e).lex(t)}static lexInline(t,e){return new w(e).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
18
18
  `),this.blockTokens(t,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){const n=this.inlineQueue[e];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(l,a,u)=>a+" ".repeat(u.length));let n,i,r,s;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(l=>(n=l.call({lexer:this},t,e))?(t=t.substring(n.raw.length),e.push(n),!0):!1))){if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length),n.raw.length===1&&e.length>0?e[e.length-1].raw+=`
19
19
  `:e.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length),i=e[e.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=`
20
20
  `+n.raw,i.text+=`
@@ -24,7 +24,7 @@ var Me=Object.defineProperty;var pe=o=>{throw TypeError(o)};var Qe=(o,t,e)=>t in
24
24
  `+n.raw,i.text+=`
25
25
  `+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(n),s=r.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length),i=e[e.length-1],i&&i.type==="text"?(i.raw+=`
26
26
  `+n.raw,i.text+=`
27
- `+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(n);continue}if(t){const l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let n,i,r,s=t,l,a,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)c.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(;t;)if(a||(u=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(n=c.call({lexer:this},t,e))?(t=t.substring(n.raw.length),e.push(n),!0):!1))){if(n=this.tokenizer.escape(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.tag(t)){t=t.substring(n.raw.length),i=e[e.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):e.push(n);continue}if(n=this.tokenizer.link(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(n.raw.length),i=e[e.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):e.push(n);continue}if(n=this.tokenizer.emStrong(t,s,u)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.codespan(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.br(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.del(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.autolink(t)){t=t.substring(n.raw.length),e.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(t))){t=t.substring(n.raw.length),e.push(n);continue}if(r=t,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const p=t.slice(1);let h;this.options.extensions.startInline.forEach(f=>{h=f.call({lexer:this},p),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(r=t.substring(0,c+1))}if(n=this.tokenizer.inlineText(r)){t=t.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(u=n.raw.slice(-1)),a=!0,i=e[e.length-1],i&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):e.push(n);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return e}}class N{constructor(t){k(this,"options");this.options=t||L}code(t,e,n){var r;const i=(r=(e||"").match(/^\S*/))==null?void 0:r[0];return t=t.replace(/\n$/,"")+`
27
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):e.push(n);continue}if(t){const l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let n,i,r,s=t,l,a,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)c.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(;t;)if(a||(u=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(n=c.call({lexer:this},t,e))?(t=t.substring(n.raw.length),e.push(n),!0):!1))){if(n=this.tokenizer.escape(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.tag(t)){t=t.substring(n.raw.length),i=e[e.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):e.push(n);continue}if(n=this.tokenizer.link(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(n.raw.length),i=e[e.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):e.push(n);continue}if(n=this.tokenizer.emStrong(t,s,u)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.codespan(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.br(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.del(t)){t=t.substring(n.raw.length),e.push(n);continue}if(n=this.tokenizer.autolink(t)){t=t.substring(n.raw.length),e.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(t))){t=t.substring(n.raw.length),e.push(n);continue}if(r=t,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const p=t.slice(1);let h;this.options.extensions.startInline.forEach(f=>{h=f.call({lexer:this},p),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(r=t.substring(0,c+1))}if(n=this.tokenizer.inlineText(r)){t=t.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(u=n.raw.slice(-1)),a=!0,i=e[e.length-1],i&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):e.push(n);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return e}}class U{constructor(t){k(this,"options");this.options=t||L}code(t,e,n){var r;const i=(r=(e||"").match(/^\S*/))==null?void 0:r[0];return t=t.replace(/\n$/,"")+`
28
28
  `,i?'<pre><code class="language-'+x(i)+'">'+(n?t:x(t,!0))+`</code></pre>
29
29
  `:"<pre><code>"+(n?t:x(t,!0))+`</code></pre>
30
30
  `}blockquote(t){return`<blockquote>
@@ -42,9 +42,9 @@ ${t}</blockquote>
42
42
  `}tablerow(t){return`<tr>
43
43
  ${t}</tr>
44
44
  `}tablecell(t,e){const n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
45
- `}strong(t){return`<strong>${t}</strong>`}em(t){return`<em>${t}</em>`}codespan(t){return`<code>${t}</code>`}br(){return"<br>"}del(t){return`<del>${t}</del>`}link(t,e,n){const i=de(t);if(i===null)return n;t=i;let r='<a href="'+t+'"';return e&&(r+=' title="'+e+'"'),r+=">"+n+"</a>",r}image(t,e,n){const i=de(t);if(i===null)return n;t=i;let r=`<img src="${t}" alt="${n}"`;return e&&(r+=` title="${e}"`),r+=">",r}text(t){return t}}class ae{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,e,n){return""+n}image(t,e,n){return""+n}br(){return""}}class w{constructor(t){k(this,"options");k(this,"renderer");k(this,"textRenderer");this.options=t||L,this.options.renderer=this.options.renderer||new N,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ae}static parse(t,e){return new w(e).parse(t)}static parseInline(t,e){return new w(e).parseInline(t)}parse(t,e=!0){let n="";for(let i=0;i<t.length;i++){const r=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){const 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)){n+=l||"";continue}}switch(r.type){case"space":continue;case"hr":{n+=this.renderer.hr();continue}case"heading":{const s=r;n+=this.renderer.heading(this.parseInline(s.tokens),s.depth,We(this.parseInline(s.tokens,this.textRenderer)));continue}case"code":{const s=r;n+=this.renderer.code(s.text,s.lang,!!s.escaped);continue}case"table":{const s=r;let l="",a="";for(let c=0;c<s.header.length;c++)a+=this.renderer.tablecell(this.parseInline(s.header[c].tokens),{header:!0,align:s.align[c]});l+=this.renderer.tablerow(a);let u="";for(let c=0;c<s.rows.length;c++){const p=s.rows[c];a="";for(let h=0;h<p.length;h++)a+=this.renderer.tablecell(this.parseInline(p[h].tokens),{header:!1,align:s.align[h]});u+=this.renderer.tablerow(a)}n+=this.renderer.table(l,u);continue}case"blockquote":{const s=r,l=this.parse(s.tokens);n+=this.renderer.blockquote(l);continue}case"list":{const s=r,l=s.ordered,a=s.start,u=s.loose;let c="";for(let p=0;p<s.items.length;p++){const h=s.items[p],f=h.checked,$=h.task;let m="";if(h.task){const z=this.renderer.checkbox(!!f);u?h.tokens.length>0&&h.tokens[0].type==="paragraph"?(h.tokens[0].text=z+" "+h.tokens[0].text,h.tokens[0].tokens&&h.tokens[0].tokens.length>0&&h.tokens[0].tokens[0].type==="text"&&(h.tokens[0].tokens[0].text=z+" "+h.tokens[0].tokens[0].text)):h.tokens.unshift({type:"text",text:z+" "}):m+=z+" "}m+=this.parse(h.tokens,u),c+=this.renderer.listitem(m,$,!!f)}n+=this.renderer.list(c,l,a);continue}case"html":{const s=r;n+=this.renderer.html(s.text,s.block);continue}case"paragraph":{const s=r;n+=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<t.length&&t[i+1].type==="text";)s=t[++i],l+=`
46
- `+(s.tokens?this.parseInline(s.tokens):s.text);n+=e?this.renderer.paragraph(l):l;continue}default:{const s='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}parseInline(t,e){e=e||this.renderer;let n="";for(let i=0;i<t.length;i++){const r=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){const 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)){n+=s||"";continue}}switch(r.type){case"escape":{const s=r;n+=e.text(s.text);break}case"html":{const s=r;n+=e.html(s.text);break}case"link":{const s=r;n+=e.link(s.href,s.title,this.parseInline(s.tokens,e));break}case"image":{const s=r;n+=e.image(s.href,s.title,s.text);break}case"strong":{const s=r;n+=e.strong(this.parseInline(s.tokens,e));break}case"em":{const s=r;n+=e.em(this.parseInline(s.tokens,e));break}case"codespan":{const s=r;n+=e.codespan(s.text);break}case"br":{n+=e.br();break}case"del":{const s=r;n+=e.del(this.parseInline(s.tokens,e));break}case"text":{const s=r;n+=e.text(s.text);break}default:{const s='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}}class v{constructor(t){k(this,"options");this.options=t||L}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}}k(v,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var S,te,Ae;class zt{constructor(...t){ge(this,S);k(this,"defaults",ne());k(this,"options",this.setOptions);k(this,"parse",Z(this,S,te).call(this,b.lex,w.parse));k(this,"parseInline",Z(this,S,te).call(this,b.lexInline,w.parseInline));k(this,"Parser",w);k(this,"Renderer",N);k(this,"TextRenderer",ae);k(this,"Lexer",b);k(this,"Tokenizer",D);k(this,"Hooks",v);this.use(...t)}walkTokens(t,e){var i,r;let n=[];for(const s of t)switch(n=n.concat(e.call(this,s)),s.type){case"table":{const l=s;for(const a of l.header)n=n.concat(this.walkTokens(a.tokens,e));for(const a of l.rows)for(const u of a)n=n.concat(this.walkTokens(u.tokens,e));break}case"list":{const l=s;n=n.concat(this.walkTokens(l.items,e));break}default:{const l=s;(r=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&r[l.type]?this.defaults.extensions.childTokens[l.type].forEach(a=>{const u=l[a].flat(1/0);n=n.concat(this.walkTokens(u,e))}):l.tokens&&(n=n.concat(this.walkTokens(l.tokens,e)))}}return n}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{const i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){const 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'");const 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),n.renderer){const r=this.defaults.renderer||new N(this.defaults);for(const s in n.renderer){if(!(s in r))throw new Error(`renderer '${s}' does not exist`);if(s==="options")continue;const l=s,a=n.renderer[l],u=r[l];r[l]=(...c)=>{let p=a.apply(r,c);return p===!1&&(p=u.apply(r,c)),p||""}}i.renderer=r}if(n.tokenizer){const r=this.defaults.tokenizer||new D(this.defaults);for(const s in n.tokenizer){if(!(s in r))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;const l=s,a=n.tokenizer[l],u=r[l];r[l]=(...c)=>{let p=a.apply(r,c);return p===!1&&(p=u.apply(r,c)),p}}i.tokenizer=r}if(n.hooks){const r=this.defaults.hooks||new v;for(const s in n.hooks){if(!(s in r))throw new Error(`hook '${s}' does not exist`);if(s==="options")continue;const l=s,a=n.hooks[l],u=r[l];v.passThroughHooks.has(s)?r[l]=c=>{if(this.defaults.async)return Promise.resolve(a.call(r,c)).then(h=>u.call(r,h));const p=a.call(r,c);return u.call(r,p)}:r[l]=(...c)=>{let p=a.apply(r,c);return p===!1&&(p=u.apply(r,c)),p}}i.hooks=r}if(n.walkTokens){const r=this.defaults.walkTokens,s=n.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={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return b.lex(t,e??this.defaults)}parser(t,e){return w.parse(t,e??this.defaults)}}S=new WeakSet,te=function(t,e){return(n,i)=>{const r={...i},s={...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);const l=Z(this,S,Ae).call(this,!!s.silent,!!s.async);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(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(n):n).then(a=>t(a,s)).then(a=>s.hooks?s.hooks.processAllTokens(a):a).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&&(n=s.hooks.preprocess(n));let a=t(n,s);s.hooks&&(a=s.hooks.processAllTokens(a)),s.walkTokens&&this.walkTokens(a,s.walkTokens);let u=e(a,s);return s.hooks&&(u=s.hooks.postprocess(u)),u}catch(a){return l(a)}}},Ae=function(t,e){return n=>{if(n.message+=`
47
- Please report this to https://github.com/markedjs/marked.`,t){const i="<p>An error occurred:</p><pre>"+x(n.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(n);throw n}};const _=new zt;function g(o,t){return _.parse(o,t)}g.options=g.setOptions=function(o){return _.setOptions(o),g.defaults=_.defaults,we(g.defaults),g};g.getDefaults=ne;g.defaults=L;g.use=function(...o){return _.use(...o),g.defaults=_.defaults,we(g.defaults),g};g.walkTokens=function(o,t){return _.walkTokens(o,t)};g.parseInline=_.parseInline;g.Parser=w;g.parser=w.parse;g.Renderer=N;g.TextRenderer=ae;g.Lexer=b;g.lexer=b.lex;g.Tokenizer=D;g.Hooks=v;g.parse=g;g.options;g.setOptions;g.use;g.walkTokens;g.parseInline;w.parse;b.lex;const ve=je("actions");let T=null,R=null,F="light",U=!1,C=!1,be=!1,V=null,Ce=null;const Q=new Set,J=new Set,E=[];let O=!1;const H=[];function qt(o){return H.push(o),()=>{const t=H.indexOf(o);t>-1&&H.splice(t,1)}}function Rt(){for(const o of H)try{o()}catch(t){ve.error("Error in language listener",t)}}async function W(){return T||R||(R=(async()=>(await Ee()).createHighlighter({themes:["github-light","github-light-high-contrast","github-dark"],langs:[]}))().catch(o=>{throw R=null,o}),T=await R,R=null,T)}async function Ee(){return V||(V=De(()=>import("./bundle-full-DaR4-84s.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])).then(o=>(Ce=o.bundledLanguages,o))),V}function Pe(){T||R||W().catch(o=>{ve.warn("Failed to initialize markdown highlighter",o)})}function qe(o){return o.trim().toLowerCase()}function Ze(o){const t=qe(o),e=Ce;if(!e)return{canonical:null,raw:t};if(t in e)return{canonical:t,raw:t};for(const[n,i]of Object.entries(e)){const r=i.aliases;if(r!=null&&r.includes(t))return{canonical:n,raw:t}}return{canonical:null,raw:t}}async function _t(o){if(C)return;const t=new Set;try{const e=g.lexer(o);g.walkTokens(e,n=>{if((n==null?void 0:n.type)!=="code")return;const i=typeof n.lang=="string"?n.lang:"";i.trim()&&t.add(i.trim())})}catch{return}for(const e of t){const n=qe(e);n&&n!=="text"&&(Q.has(n)||J.has(n)||(J.add(n),E.push(async()=>{try{await Ee();const{canonical:i,raw:r}=Ze(e),s=i||r;if(s==="text"||r==="text")return;await(await W()).loadLanguage(s),Q.add(s),Q.add(r),Rt()}catch{}finally{J.delete(n)}})))}E.length>0&&!O&&St()}async function St(){if(!(O||E.length===0)){for(O=!0;E.length>0;){const o=E.shift();o&&await o()}O=!1}}function Be(o){if(F=o?"dark":"light",be)return;g.setOptions({breaks:!0,gfm:!0});const t=new g.Renderer;t.code=(e,n)=>{const i=Y(e),r=encodeURIComponent(i),s=n&&n.trim()?n.trim():"text",l=y(s),a=y(He("markdown.copy")),u=`
45
+ `}strong(t){return`<strong>${t}</strong>`}em(t){return`<em>${t}</em>`}codespan(t){return`<code>${t}</code>`}br(){return"<br>"}del(t){return`<del>${t}</del>`}link(t,e,n){const i=ke(t);if(i===null)return n;t=i;let r='<a href="'+t+'"';return e&&(r+=' title="'+e+'"'),r+=">"+n+"</a>",r}image(t,e,n){const i=ke(t);if(i===null)return n;t=i;let r=`<img src="${t}" alt="${n}"`;return e&&(r+=` title="${e}"`),r+=">",r}text(t){return t}}class ce{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,e,n){return""+n}image(t,e,n){return""+n}br(){return""}}class y{constructor(t){k(this,"options");k(this,"renderer");k(this,"textRenderer");this.options=t||L,this.options.renderer=this.options.renderer||new U,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ce}static parse(t,e){return new y(e).parse(t)}static parseInline(t,e){return new y(e).parseInline(t)}parse(t,e=!0){let n="";for(let i=0;i<t.length;i++){const r=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){const 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)){n+=l||"";continue}}switch(r.type){case"space":continue;case"hr":{n+=this.renderer.hr();continue}case"heading":{const s=r;n+=this.renderer.heading(this.parseInline(s.tokens),s.depth,Xe(this.parseInline(s.tokens,this.textRenderer)));continue}case"code":{const s=r;n+=this.renderer.code(s.text,s.lang,!!s.escaped);continue}case"table":{const s=r;let l="",a="";for(let c=0;c<s.header.length;c++)a+=this.renderer.tablecell(this.parseInline(s.header[c].tokens),{header:!0,align:s.align[c]});l+=this.renderer.tablerow(a);let u="";for(let c=0;c<s.rows.length;c++){const p=s.rows[c];a="";for(let h=0;h<p.length;h++)a+=this.renderer.tablecell(this.parseInline(p[h].tokens),{header:!1,align:s.align[h]});u+=this.renderer.tablerow(a)}n+=this.renderer.table(l,u);continue}case"blockquote":{const s=r,l=this.parse(s.tokens);n+=this.renderer.blockquote(l);continue}case"list":{const s=r,l=s.ordered,a=s.start,u=s.loose;let c="";for(let p=0;p<s.items.length;p++){const h=s.items[p],f=h.checked,$=h.task;let m="";if(h.task){const z=this.renderer.checkbox(!!f);u?h.tokens.length>0&&h.tokens[0].type==="paragraph"?(h.tokens[0].text=z+" "+h.tokens[0].text,h.tokens[0].tokens&&h.tokens[0].tokens.length>0&&h.tokens[0].tokens[0].type==="text"&&(h.tokens[0].tokens[0].text=z+" "+h.tokens[0].tokens[0].text)):h.tokens.unshift({type:"text",text:z+" "}):m+=z+" "}m+=this.parse(h.tokens,u),c+=this.renderer.listitem(m,$,!!f)}n+=this.renderer.list(c,l,a);continue}case"html":{const s=r;n+=this.renderer.html(s.text,s.block);continue}case"paragraph":{const s=r;n+=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<t.length&&t[i+1].type==="text";)s=t[++i],l+=`
46
+ `+(s.tokens?this.parseInline(s.tokens):s.text);n+=e?this.renderer.paragraph(l):l;continue}default:{const s='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}parseInline(t,e){e=e||this.renderer;let n="";for(let i=0;i<t.length;i++){const r=t[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){const 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)){n+=s||"";continue}}switch(r.type){case"escape":{const s=r;n+=e.text(s.text);break}case"html":{const s=r;n+=e.html(s.text);break}case"link":{const s=r;n+=e.link(s.href,s.title,this.parseInline(s.tokens,e));break}case"image":{const s=r;n+=e.image(s.href,s.title,s.text);break}case"strong":{const s=r;n+=e.strong(this.parseInline(s.tokens,e));break}case"em":{const s=r;n+=e.em(this.parseInline(s.tokens,e));break}case"codespan":{const s=r;n+=e.codespan(s.text);break}case"br":{n+=e.br();break}case"del":{const s=r;n+=e.del(this.parseInline(s.tokens,e));break}case"text":{const s=r;n+=e.text(s.text);break}default:{const s='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}}class v{constructor(t){k(this,"options");this.options=t||L}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}}k(v,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var S,ne,ve;class Rt{constructor(...t){fe(this,S);k(this,"defaults",se());k(this,"options",this.setOptions);k(this,"parse",Z(this,S,ne).call(this,w.lex,y.parse));k(this,"parseInline",Z(this,S,ne).call(this,w.lexInline,y.parseInline));k(this,"Parser",y);k(this,"Renderer",U);k(this,"TextRenderer",ce);k(this,"Lexer",w);k(this,"Tokenizer",N);k(this,"Hooks",v);this.use(...t)}walkTokens(t,e){var i,r;let n=[];for(const s of t)switch(n=n.concat(e.call(this,s)),s.type){case"table":{const l=s;for(const a of l.header)n=n.concat(this.walkTokens(a.tokens,e));for(const a of l.rows)for(const u of a)n=n.concat(this.walkTokens(u.tokens,e));break}case"list":{const l=s;n=n.concat(this.walkTokens(l.items,e));break}default:{const l=s;(r=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&r[l.type]?this.defaults.extensions.childTokens[l.type].forEach(a=>{const u=l[a].flat(1/0);n=n.concat(this.walkTokens(u,e))}):l.tokens&&(n=n.concat(this.walkTokens(l.tokens,e)))}}return n}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{const i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){const 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'");const 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),n.renderer){const r=this.defaults.renderer||new U(this.defaults);for(const s in n.renderer){if(!(s in r))throw new Error(`renderer '${s}' does not exist`);if(s==="options")continue;const l=s,a=n.renderer[l],u=r[l];r[l]=(...c)=>{let p=a.apply(r,c);return p===!1&&(p=u.apply(r,c)),p||""}}i.renderer=r}if(n.tokenizer){const r=this.defaults.tokenizer||new N(this.defaults);for(const s in n.tokenizer){if(!(s in r))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;const l=s,a=n.tokenizer[l],u=r[l];r[l]=(...c)=>{let p=a.apply(r,c);return p===!1&&(p=u.apply(r,c)),p}}i.tokenizer=r}if(n.hooks){const r=this.defaults.hooks||new v;for(const s in n.hooks){if(!(s in r))throw new Error(`hook '${s}' does not exist`);if(s==="options")continue;const l=s,a=n.hooks[l],u=r[l];v.passThroughHooks.has(s)?r[l]=c=>{if(this.defaults.async)return Promise.resolve(a.call(r,c)).then(h=>u.call(r,h));const p=a.call(r,c);return u.call(r,p)}:r[l]=(...c)=>{let p=a.apply(r,c);return p===!1&&(p=u.apply(r,c)),p}}i.hooks=r}if(n.walkTokens){const r=this.defaults.walkTokens,s=n.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={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return w.lex(t,e??this.defaults)}parser(t,e){return y.parse(t,e??this.defaults)}}S=new WeakSet,ne=function(t,e){return(n,i)=>{const r={...i},s={...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);const l=Z(this,S,ve).call(this,!!s.silent,!!s.async);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(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(n):n).then(a=>t(a,s)).then(a=>s.hooks?s.hooks.processAllTokens(a):a).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&&(n=s.hooks.preprocess(n));let a=t(n,s);s.hooks&&(a=s.hooks.processAllTokens(a)),s.walkTokens&&this.walkTokens(a,s.walkTokens);let u=e(a,s);return s.hooks&&(u=s.hooks.postprocess(u)),u}catch(a){return l(a)}}},ve=function(t,e){return n=>{if(n.message+=`
47
+ Please report this to https://github.com/markedjs/marked.`,t){const i="<p>An error occurred:</p><pre>"+x(n.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(n);throw n}};const _=new Rt;function g(o,t){return _.parse(o,t)}g.options=g.setOptions=function(o){return _.setOptions(o),g.defaults=_.defaults,ye(g.defaults),g};g.getDefaults=se;g.defaults=L;g.use=function(...o){return _.use(...o),g.defaults=_.defaults,ye(g.defaults),g};g.walkTokens=function(o,t){return _.walkTokens(o,t)};g.parseInline=_.parseInline;g.Parser=y;g.parser=y.parse;g.Renderer=U;g.TextRenderer=ce;g.Lexer=w;g.lexer=w.lex;g.Tokenizer=N;g.Hooks=v;g.parse=g;g.options;g.setOptions;g.use;g.walkTokens;g.parseInline;y.parse;w.lex;const Ce=Ne("actions");let T=null,R=null,G="light",W=!1,C=!1,Q=!1,we=!1,Y=null,Ee=null;const O=new Set,ee=new Set,E=[];let D=!1;const j=[];function Zt(o){return j.push(o),()=>{const t=j.indexOf(o);t>-1&&j.splice(t,1)}}function _t(){for(const o of j)try{o()}catch(t){Ce.error("Error in language listener",t)}}async function K(){return T||R||(R=(async()=>(await Pe()).createHighlighter({themes:["github-light","github-light-high-contrast","github-dark"],langs:[]}))().catch(o=>{throw R=null,o}),T=await R,R=null,T)}async function Pe(){return Y||(Y=je(()=>import("./bundle-full-Ci4Nsw1a.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])).then(o=>(Ee=o.bundledLanguages,o))),Y}function qe(){T||R||K().catch(o=>{Ce.warn("Failed to initialize markdown highlighter",o)})}function Ze(o){return o.trim().toLowerCase()}function Be(o){const t=Ze(o),e=Ee;if(!e)return{canonical:null,raw:t};if(t in e)return{canonical:t,raw:t};for(const[n,i]of Object.entries(e)){const r=i.aliases;if(r!=null&&r.includes(t))return{canonical:n,raw:t}}return{canonical:null,raw:t}}async function St(o){if(C)return;const t=new Set;try{const e=g.lexer(o);g.walkTokens(e,n=>{if((n==null?void 0:n.type)!=="code")return;const i=typeof n.lang=="string"?n.lang:"";i.trim()&&t.add(i.trim())})}catch{return}for(const e of t){const n=Ze(e);n&&n!=="text"&&(O.has(n)||ee.has(n)||(ee.add(n),E.push(async()=>{try{await Pe();const{canonical:i,raw:r}=Be(e),s=i||r;if(s==="text"||r==="text")return;await(await K()).loadLanguage(s),O.add(s),O.add(r),_t()}catch{}finally{ee.delete(n)}})))}E.length>0&&!D&&Lt()}async function Lt(){if(!(D||E.length===0)){for(D=!0;E.length>0;){const o=E.shift();o&&await o()}D=!1}}function Me(o){if(G=o?"dark":"light",we)return;g.setOptions({breaks:!0,gfm:!0});const t=new g.Renderer;t.code=(e,n)=>{const i=H(e),r=encodeURIComponent(i),s=n&&n.trim()?n.trim():"text",l=b(s),a=b(De("markdown.copy")),u=`
48
48
  <div class="code-block-header">
49
49
  <span class="code-block-language">${l}</span>
50
50
  <button class="code-block-copy" data-code="${r}">
@@ -55,4 +55,4 @@ Please report this to https://github.com/markedjs/marked.`,t){const i="<p>An err
55
55
  <span class="copy-text">${a}</span>
56
56
  </button>
57
57
  </div>
58
- `.trim();if(C)return`<div class="markdown-code-block" data-language="${l}" data-code="${r}">${u}<pre><code class="language-${l}">${y(i)}</code></pre></div>`;if(s==="text"||!T)return`<div class="markdown-code-block" data-language="${l}" data-code="${r}">${u}<pre><code>${y(i)}</code></pre></div>`;const{canonical:c,raw:p}=Ze(s),h=c||p;if(h==="text"||p==="text")return`<div class="markdown-code-block" data-language="${l}" data-code="${r}">${u}<pre><code class="language-${l}">${y(i)}</code></pre></div>`;if(Q.has(h))try{const f=T.codeToHtml(i,{lang:h,theme:F==="dark"?"github-dark":"github-light-high-contrast"});return`<div class="markdown-code-block" data-language="${l}" data-code="${r}">${u}${f}</div>`}catch{}return`<div class="markdown-code-block" data-language="${l}" data-code="${r}">${u}<pre><code class="language-${l}">${y(i)}</code></pre></div>`},t.link=(e,n,i)=>{const r=n?` title="${y(n)}"`:"";return`<a href="${y(e)}" target="_blank" rel="noopener noreferrer"${r}>${i}</a>`},t.codespan=e=>{const n=Y(e);return`<code class="inline-code">${y(n)}</code>`},g.use({renderer:t}),be=!0}async function Zt(o){Be(o),Pe(),await W(),U=!0}function Bt(o){F=o?"dark":"light"}function Mt(){return U&&T!==null}async function Qt(o,t){U||(Be(F==="dark"),U=!0);const e=(t==null?void 0:t.suppressHighlight)??!1,n=Y(o);e||(Pe(),_t(n));const i=C;C=e;try{return g.parse(n)}finally{C=i}}async function Ot(){return W()}export{Ot as getSharedHighlighter,Zt as initMarkdown,Mt as isMarkdownReady,qt as onLanguagesLoaded,Qt as renderMarkdown,Bt as setMarkdownTheme};
58
+ `.trim();if(C)return`<div class="markdown-code-block" data-language="${l}" data-code="${r}">${u}<pre><code class="language-${l}">${b(i)}</code></pre></div>`;if(s==="text"||!T)return`<div class="markdown-code-block" data-language="${l}" data-code="${r}">${u}<pre><code>${b(i)}</code></pre></div>`;const{canonical:c,raw:p}=Be(s),h=c||p;if(h==="text"||p==="text")return`<div class="markdown-code-block" data-language="${l}" data-code="${r}">${u}<pre><code class="language-${l}">${b(i)}</code></pre></div>`;if(O.has(h))try{const f=T.codeToHtml(i,{lang:h,theme:G==="dark"?"github-dark":"github-light-high-contrast"});return`<div class="markdown-code-block" data-language="${l}" data-code="${r}">${u}${f}</div>`}catch{}return`<div class="markdown-code-block" data-language="${l}" data-code="${r}">${u}<pre><code class="language-${l}">${b(i)}</code></pre></div>`},t.link=(e,n,i)=>{const r=n?` title="${b(n)}"`:"";return`<a href="${b(e)}" target="_blank" rel="noopener noreferrer"${r}>${i}</a>`},t.codespan=e=>{const n=H(e);return`<code class="inline-code">${b(n)}</code>`},t.html=e=>Q?b(H(e)):e,g.use({renderer:t}),we=!0}async function Bt(o){Me(o),qe(),await K(),W=!0}function Mt(o){G=o?"dark":"light"}function Ht(){return W&&T!==null}async function Qt(o,t){W||(Me(G==="dark"),W=!0);const e=(t==null?void 0:t.suppressHighlight)??!1,n=(t==null?void 0:t.escapeRawHtml)??!1,i=H(o);e||(qe(),St(i));const r=C,s=Q;C=e,Q=n;try{return g.parse(i)}finally{C=r,Q=s}}async function Ot(){return K()}export{Ot as getSharedHighlighter,Bt as initMarkdown,Ht as isMarkdownReady,Zt as onLanguagesLoaded,Qt as renderMarkdown,Mt as setMarkdownTheme};