@neuralnomads/codenomad-dev 0.13.1-dev-20260331-197dee2a → 0.13.1-dev-20260331-995fb3b6

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 (44) hide show
  1. package/dist/clients/connection-manager.js +93 -0
  2. package/dist/plugins/voice-mode.js +77 -0
  3. package/dist/server/http-server.js +16 -1
  4. package/dist/server/routes/events.js +24 -1
  5. package/dist/server/routes/plugin.js +4 -7
  6. package/package.json +1 -1
  7. package/public/assets/{ChangesTab-C8zdDjmi.js → ChangesTab-X8IIoIdB.js} +2 -2
  8. package/public/assets/{DiffToolbar-9t70qPdk.js → DiffToolbar-Djg0ksr_.js} +1 -1
  9. package/public/assets/{FilesTab-D7BmKaIy.js → FilesTab-BpYPA_Zr.js} +2 -2
  10. package/public/assets/{GitChangesTab-LxDWDUWh.js → GitChangesTab-DeGsV8--.js} +2 -2
  11. package/public/assets/{SplitFilePanel-CiGeO3Fu.js → SplitFilePanel-DwrJM7GQ.js} +1 -1
  12. package/public/assets/StatusTab-mT1B3wST.js +1 -0
  13. package/public/assets/{bundle-full-Ci4Nsw1a.js → bundle-full-JwmTIwMd.js} +1 -1
  14. package/public/assets/{diff-viewer-DUacI4bj.js → diff-viewer-CKnTxbWB.js} +1 -1
  15. package/public/assets/{index-C2RrcFJ5.css → index-BEzx5r3P.css} +1 -1
  16. package/public/assets/index-BHjkPi4D.js +1 -0
  17. package/public/assets/index-CUkIenrg.js +1 -0
  18. package/public/assets/{index-BbGDMdki.js → index-CkYwnPl7.js} +1 -1
  19. package/public/assets/index-D9RMxxcS.js +1 -0
  20. package/public/assets/index-DiFfJ0HM.js +1 -0
  21. package/public/assets/{index-5Van9SDX.js → index-LmDdmmJP.js} +1 -1
  22. package/public/assets/index-UaIyK67v.js +1 -0
  23. package/public/assets/index-lhjxIgwf.js +2 -0
  24. package/public/assets/index-xsUu1uOf.js +1 -0
  25. package/public/assets/{loading-5fXD_yBJ.js → loading-CfqkoCbA.js} +1 -1
  26. package/public/assets/main-B3yZBpaS.js +56 -0
  27. package/public/assets/{markdown-DZ9UzdXg.js → markdown-D2uUJada.js} +19 -19
  28. package/public/assets/monaco-viewer-UU9TfOpS.js +15 -0
  29. package/public/assets/{todo-BxfNuKUB.js → todo-i3zWdksA.js} +1 -1
  30. package/public/assets/{tool-call-Bakver9o.js → tool-call-Bl3Lai68.js} +3 -3
  31. package/public/assets/{unified-picker-Qz5srwQH.js → unified-picker-B506AoQt.js} +1 -1
  32. package/public/index.html +4 -4
  33. package/public/loading.html +4 -4
  34. package/public/sw.js +1 -1
  35. package/public/assets/StatusTab-Aa5lKnqY.js +0 -1
  36. package/public/assets/index-BMjCY26M.js +0 -1
  37. package/public/assets/index-CAUPG2JG.js +0 -1
  38. package/public/assets/index-DBKPDTTj.js +0 -1
  39. package/public/assets/index-DNAppyAC.js +0 -2
  40. package/public/assets/index-DzF6d6KL.js +0 -1
  41. package/public/assets/index-Xia2ufwz.js +0 -1
  42. package/public/assets/index-hY6tafTK.js +0 -1
  43. package/public/assets/main-JkDQRHSo.js +0 -56
  44. package/public/assets/monaco-viewer-DK-6pkvP.js +0 -15
@@ -1,20 +1,20 @@
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(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/bundle-full-JwmTIwMd.js","assets/index-lhjxIgwf.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-UU9TfOpS.js","assets/index-BEzx5r3P.css"])))=>i.map(i=>d[i]);
2
+ var Qe=Object.defineProperty;var de=o=>{throw TypeError(o)};var Oe=(o,t,e)=>t in o?Qe(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var k=(o,t,e)=>Oe(o,typeof t!="symbol"?t+"":t,e),De=(o,t,e)=>t.has(o)||de("Cannot "+e);var ke=(o,t,e)=>t.has(o)?de("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(o):t.set(o,e);var B=(o,t,e)=>(De(o,t,"access private method"),e);import{t as je,_ as Ne}from"./index-lhjxIgwf.js";import{k as Fe}from"./monaco-viewer-UU9TfOpS.js";import{al as Q,v as b}from"./main-B3yZBpaS.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 S=se();function Te(o){S=o}const ze=/[&<>"']/,Ue=new RegExp(ze.source,"g"),Re=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Ge=new RegExp(Re.source,"g"),Ke={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},xe=o=>Ke[o];function x(o,t){if(t){if(ze.test(o))return o.replace(Ue,xe)}else if(Re.test(o))return o.replace(Ge,xe);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 Ve=/(^|[^\[])\^/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(Ve,"$1"),e=e.replace(i,s),n},getRegex:()=>new RegExp(e,t)};return n}function me(o){try{o=encodeURI(o).replace(/%25/g,"%")}catch{return null}return o}const A={exec:()=>null};function be(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 H(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 Je(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 we(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 Ye(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 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
- $1`);n=B(n.replace(/^ *>[ \t]?/gm,""),`
4
+ `)}class N{constructor(t){k(this,"options");k(this,"rules");k(this,"lexer");this.options=t||S}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:H(n,`
5
+ `)}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const n=e[0],i=Ye(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=H(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
+ $1`);n=H(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
8
  `,1)[0].replace(/^\t+/,V=>" ".repeat(3*V.length)),h=t.split(`
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 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,`
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 T=!1;if(!p&&/^ *$/.test(h)&&(l+=h+`
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|$))`),pe=new RegExp(`^ {0,${Math.min(3,f-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),ge=new RegExp(`^ {0,${Math.min(3,f-1)}}(?:\`\`\`|~~~)`),fe=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," ")),ge.test(h)||fe.test(h)||V.test(h)||pe.test(t))break;if(h.search(/[^ ]/)>=f||!h.trim())a+=`
12
+ `+h.slice(f);else{if(T||p.search(/[^ ]/)>=4||ge.test(p)||fe.test(p)||pe.test(p))break;a+=`
13
+ `+h}!T&&!h.trim()&&(T=!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=be(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(be(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=H(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{const s=Je(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)),we(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 we(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 T=f.slice(2,-2);return{type:"strong",raw:f,text:T,tokens:this.lexer.inlineTokens(T)}}}}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 et=/^(?: *(?:\n|$))+/,tt=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,nt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,q=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,st=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,_e=/(?:[*+-]|\d{1,9}[.)])/,Le=d(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,_e).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]+)*)/,it=/^[^\n]+/,re=/(?!\s*\])(?:\\.|[^\[\]\\])+/,rt=d(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",re).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),lt=d(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,_e).getRegex(),W="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]*?(?:-->|$))/,ot=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",W).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Se=d(ie).replace("hr",q).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",W).getRegex(),at=d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Se).getRegex(),oe={blockquote:at,code:tt,def:rt,fences:nt,heading:st,hr:q,html:ot,lheading:Le,list:lt,newline:et,paragraph:Se,table:A,text:it},ye=d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",q).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",W).getRegex(),ct={...oe,table:ye,paragraph:d(ie).replace("hr",q).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ye).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",W).getRegex()},ht={...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",q).replace("heading",` *#{1,6} *[^
17
+ ]`).replace("lheading",Le).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ie=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ut=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ae=/^( {2,}|\\)\n(?!\s*$)/,pt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Z="\\p{P}\\p{S}",gt=d(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Z).getRegex(),ft=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,dt=d(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Z).getRegex(),kt=d("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Z).getRegex(),xt=d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Z).getRegex(),mt=d(/\\([punct])/,"gu").replace(/punct/g,Z).getRegex(),bt=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(),wt=d(le).replace("(?:-->|$)","-->").getRegex(),yt=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",wt).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),F=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,$t=d(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",F).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ve=d(/^!?\[(label)\]\[(ref)\]/).replace("label",F).replace("ref",re).getRegex(),Ce=d(/^!?\[(ref)\](?:\[\])?/).replace("ref",re).getRegex(),Tt=d("reflink|nolink(?!\\()","g").replace("reflink",ve).replace("nolink",Ce).getRegex(),ae={_backpedal:A,anyPunctuation:mt,autolink:bt,blockSkip:ft,br:Ae,code:ut,del:A,emStrongLDelim:dt,emStrongRDelimAst:kt,emStrongRDelimUnd:xt,escape:Ie,link:$t,nolink:Ce,punctuation:gt,reflink:ve,reflinkSearch:Tt,tag:yt,text:pt,url:A},zt={...ae,link:d(/^!?\[(label)\]\((.*?)\)/).replace("label",F).getRegex(),reflink:d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",F).getRegex()},te={...ae,escape:d(Ie).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.!#$%&'*+\/=?_`{\|}~-]+@)))/},Rt={...te,br:d(Ae).replace("{2,}","*").getRegex(),text:d(te.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},M={normal:oe,gfm:ct,pedantic:ht},I={normal:ae,gfm:te,breaks:Rt,pedantic:zt};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||S,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 He=Object.defineProperty;var ge=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 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$/,"")+`
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||S}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=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=`
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=me(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=me(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||S,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,T=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,T,!!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||S}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}}k(v,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var L,ne,Ee;class _t{constructor(...t){ke(this,L);k(this,"defaults",se());k(this,"options",this.setOptions);k(this,"parse",B(this,L,ne).call(this,w.lex,y.parse));k(this,"parseInline",B(this,L,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)}}L=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=B(this,L,Ee).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)}}},Ee=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 _t;function g(o,t){return _.parse(o,t)}g.options=g.setOptions=function(o){return _.setOptions(o),g.defaults=_.defaults,Te(g.defaults),g};g.getDefaults=se;g.defaults=S;g.use=function(...o){return _.use(...o),g.defaults=_.defaults,Te(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 Pe=Fe("actions");let $=null,R=null,G="light",K=!1,C=!1,O=!1,$e=!1,Y=null,qe=null;const E=new Set,ee=new Set,P=[];let D=!1;const j=[];function Bt(o){return j.push(o),()=>{const t=j.indexOf(o);t>-1&&j.splice(t,1)}}function Lt(){for(const o of j)try{o()}catch(t){Pe.error("Error in language listener",t)}}async function X(){return $||R||(R=(async()=>(await Ze()).createHighlighter({themes:["github-light","github-light-high-contrast","github-dark"],langs:[]}))().catch(o=>{throw R=null,o}),$=await R,R=null,$)}async function Ze(){return Y||(Y=Ne(()=>import("./bundle-full-JwmTIwMd.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])).then(o=>(qe=o.bundledLanguages,o))),Y}function Be(){$||R||X().catch(o=>{Pe.warn("Failed to initialize markdown highlighter",o)})}function he(o){return o.trim().toLowerCase()}function ue(o){const t=he(o),e=qe;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}}function He(o){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[]}return[...t]}function Ht(o){const t=He(o);for(const e of t){const n=he(e);if(!n||n==="text")continue;const{canonical:i,raw:r}=ue(e),s=i||r;if(!(s==="text"||r==="text")&&(!$||!E.has(s)))return!0}return!1}async function St(o){if(C)return;const t=He(o);for(const e of t){const n=he(e);n&&n!=="text"&&(E.has(n)||ee.has(n)||(ee.add(n),P.push(async()=>{try{await Ze();const{canonical:i,raw:r}=ue(e),s=i||r;if(s==="text"||r==="text")return;await(await X()).loadLanguage(s),E.add(s),E.add(r),Lt()}catch{}finally{ee.delete(n)}})))}P.length>0&&!D&&It()}async function It(){if(!(D||P.length===0)){for(D=!0;P.length>0;){const o=P.shift();o&&await o()}D=!1}}function Me(o){if(G=o?"dark":"light",$e)return;g.setOptions({breaks:!0,gfm:!0});const t=new g.Renderer;t.code=(e,n)=>{const i=Q(e),r=encodeURIComponent(i),s=n&&n.trim()?n.trim():"text",l=b(s),a=b(je("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}">${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};
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"||!$)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}=ue(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(E.has(h))try{const f=$.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=Q(e);return`<code class="inline-code">${b(n)}</code>`},t.html=e=>O?b(Q(e)):e,g.use({renderer:t}),$e=!0}async function Mt(o){Me(o),Be(),await X(),K=!0}function Qt(o){G=o?"dark":"light"}function Ot(){return K&&$!==null}async function Dt(o,t){K||(Me(G==="dark"),K=!0);const e=(t==null?void 0:t.suppressHighlight)??!1,n=(t==null?void 0:t.escapeRawHtml)??!1,i=Q(o);e||(Be(),St(i));const r=C,s=O;C=e,O=n;try{return g.parse(i)}finally{C=r,O=s}}async function jt(){return X()}export{jt as getSharedHighlighter,Ht as hasPendingCodeHighlight,Mt as initMarkdown,Ot as isMarkdownReady,Bt as onLanguagesLoaded,Dt as renderMarkdown,Qt as setMarkdownTheme};
@@ -0,0 +1,15 @@
1
+ var Fr=Object.defineProperty;var Dr=(e,t,n)=>t in e?Fr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Re=(e,t,n)=>Dr(e,typeof t!="symbol"?t+"":t,n);import{c as $,u as Te,a as Q,s as rt,b as ee,r as Lr,d as k,e as kn,o as be,g as Xt,f as x,$ as A,h as fe,i as Je,j as Pe,k as xe,l as Fe,m as $n,n as te,p as Nr,q as Rr,t as ot,v as Br}from"./git-diff-vendor-CAv-4upN.js";import{g as Ur}from"./fast-diff-vendor-DgdwVvTQ.js";const _r=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],jr=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",..._r]),Vr=new Set(["innerHTML","textContent","innerText","children"]),Wr=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),zr=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function Kr(e,t){const n=zr[e];return typeof n=="object"?n[t]?n.$:void 0:n}const Hr=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),En=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),Gr={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},qr=e=>$(()=>e());function Jr(e,t,n){let r=n.length,o=t.length,s=r,i=0,a=0,c=t[o-1].nextSibling,u=null;for(;i<o||a<s;){if(t[i]===n[a]){i++,a++;continue}for(;t[o-1]===n[s-1];)o--,s--;if(o===i){const l=s<r?a?n[a-1].nextSibling:n[s-a]:c;for(;a<s;)e.insertBefore(n[a++],l)}else if(s===a)for(;i<o;)(!u||!u.has(t[i]))&&t[i].remove(),i++;else if(t[i]===n[s-1]&&n[a]===t[o-1]){const l=t[--o].nextSibling;e.insertBefore(n[a++],t[i++].nextSibling),e.insertBefore(n[--s],l),t[o]=n[s]}else{if(!u){u=new Map;let d=a;for(;d<s;)u.set(n[d],d++)}const l=u.get(t[i]);if(l!=null)if(a<l&&l<s){let d=i,f=1,g;for(;++d<o&&d<s&&!((g=u.get(t[d]))==null||g!==l+f);)f++;if(f>l-a){const p=t[i];for(;a<l;)e.insertBefore(n[a++],p)}else e.replaceChild(n[a++],t[i++])}else i++;else t[i++].remove()}}}const Yt="_$DX_DELEGATE";function Ja(e,t,n,r={}){let o;return kn(s=>{o=s,t===document?e():vt(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{o(),t.textContent=""}}function An(e,t,n,r){let o;const s=()=>{const a=r?document.createElementNS("http://www.w3.org/1998/Math/MathML","template"):document.createElement("template");return a.innerHTML=e,n?a.content.firstChild.firstChild:r?a.firstChild:a.content.firstChild},i=t?()=>Te(()=>document.importNode(o||(o=s()),!0)):()=>(o||(o=s())).cloneNode(!0);return i.cloneNode=i,i}function Xr(e,t=window.document){const n=t[Yt]||(t[Yt]=new Set);for(let r=0,o=e.length;r<o;r++){const s=e[r];n.has(s)||(n.add(s),t.addEventListener(s,so))}}function Ot(e,t,n){se(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function Yr(e,t,n,r){se(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function Zr(e,t,n){se(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function Qr(e,t){se(e)||(t==null?e.removeAttribute("class"):e.className=t)}function eo(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const o=n[0];e.addEventListener(t,n[0]=s=>o.call(e,n[1],s))}else e.addEventListener(t,n,typeof n!="function"&&n)}function to(e,t,n={}){const r=Object.keys(t||{}),o=Object.keys(n);let s,i;for(s=0,i=o.length;s<i;s++){const a=o[s];!a||a==="undefined"||t[a]||(Zt(e,a,!1),delete n[a])}for(s=0,i=r.length;s<i;s++){const a=r[s],c=!!t[a];!a||a==="undefined"||n[a]===c||!c||(Zt(e,a,!0),n[a]=c)}return n}function no(e,t,n){if(!t)return n?Ot(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let o,s;for(s in n)t[s]==null&&r.removeProperty(s),delete n[s];for(s in t)o=t[s],o!==n[s]&&(r.setProperty(s,o),n[s]=o);return n}function Xa(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t)}function In(e,t={},n,r){const o={};return r||Q(()=>o.children=Me(e,t.children,o.children)),Q(()=>typeof t.ref=="function"&&Ut(t.ref,e)),Q(()=>ro(e,t,n,!0,o,!0)),o}function Ut(e,t,n){return Te(()=>e(t,n))}function vt(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Me(e,t,r,n);Q(o=>Me(e,t(),o,n),r)}function ro(e,t,n,r,o={},s=!1){t||(t={});for(const i in o)if(!(i in t)){if(i==="children")continue;o[i]=Qt(e,i,null,o[i],n,s,t)}for(const i in t){if(i==="children")continue;const a=t[i];o[i]=Qt(e,i,a,o[i],n,s,t)}}function Tn(e){let t,n;return!se()||!(t=x.registry.get(n=io()))?e():(x.completed&&x.completed.add(t),x.registry.delete(n),t)}function se(e){return!!x.context&&!x.done&&(!e||e.isConnected)}function oo(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Zt(e,t,n){const r=t.trim().split(/\s+/);for(let o=0,s=r.length;o<s;o++)e.classList.toggle(r[o],n)}function Qt(e,t,n,r,o,s,i){let a,c,u,l,d;if(t==="style")return no(e,n,r);if(t==="classList")return to(e,n,r);if(n===r)return r;if(t==="ref")s||n(e);else if(t.slice(0,3)==="on:"){const f=t.slice(3);r&&e.removeEventListener(f,r,typeof r!="function"&&r),n&&e.addEventListener(f,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const f=t.slice(10);r&&e.removeEventListener(f,r,!0),n&&e.addEventListener(f,n,!0)}else if(t.slice(0,2)==="on"){const f=t.slice(2).toLowerCase(),g=Hr.has(f);if(!g&&r){const p=Array.isArray(r)?r[0]:r;e.removeEventListener(f,p)}(g||n)&&(eo(e,f,n,g),g&&Xr([f]))}else if(t.slice(0,5)==="attr:")Ot(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")Zr(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(u=Vr.has(t))||!o&&((l=Kr(t,e.tagName))||(c=jr.has(t)))||(a=e.nodeName.includes("-")||"is"in i)){if(d)t=t.slice(5),c=!0;else if(se(e))return n;t==="class"||t==="className"?Qr(e,n):a&&!c&&!u?e[oo(t)]=n:e[l||t]=n}else{const f=o&&t.indexOf(":")>-1&&Gr[t.split(":")[0]];f?Yr(e,f,t,n):Ot(e,Wr[t]||t,n)}return n}function so(e){if(x.registry&&x.events&&x.events.find(([c,u])=>u===e))return;let t=e.target;const n=`$$${e.type}`,r=e.target,o=e.currentTarget,s=c=>Object.defineProperty(e,"target",{configurable:!0,value:c}),i=()=>{const c=t[n];if(c&&!t.disabled){const u=t[`${n}Data`];if(u!==void 0?c.call(t,u,e):c.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&s(t.host),!0},a=()=>{for(;i()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),x.registry&&!x.done&&(x.done=_$HY.done=!0),e.composedPath){const c=e.composedPath();s(c[0]);for(let u=0;u<c.length-2&&(t=c[u],!!i());u++){if(t._$host){t=t._$host,a();break}if(t.parentNode===o)break}}else a();s(r)}function Me(e,t,n,r,o){const s=se(e);if(s){!n&&(n=[...e.childNodes]);let c=[];for(let u=0;u<n.length;u++){const l=n[u];l.nodeType===8&&l.data.slice(0,2)==="!$"?l.remove():c.push(l)}n=c}for(;typeof n=="function";)n=n();if(t===n)return n;const i=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,i==="string"||i==="number"){if(s||i==="number"&&(t=t.toString(),t===n))return n;if(a){let c=n[0];c&&c.nodeType===3?c.data!==t&&(c.data=t):c=document.createTextNode(t),n=ce(e,n,r,c)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||i==="boolean"){if(s)return n;n=ce(e,n,r)}else{if(i==="function")return Q(()=>{let c=t();for(;typeof c=="function";)c=c();n=Me(e,c,n,r)}),()=>n;if(Array.isArray(t)){const c=[],u=n&&Array.isArray(n);if(kt(c,t,n,o))return Q(()=>n=Me(e,c,n,r,!0)),()=>n;if(s){if(!c.length)return n;if(r===void 0)return n=[...e.childNodes];let l=c[0];if(l.parentNode!==e)return n;const d=[l];for(;(l=l.nextSibling)!==r;)d.push(l);return n=d}if(c.length===0){if(n=ce(e,n,r),a)return n}else u?n.length===0?en(e,c,r):Jr(e,n,c):(n&&ce(e),en(e,c));n=c}else if(t.nodeType){if(s&&t.parentNode)return n=a?[t]:t;if(Array.isArray(n)){if(a)return n=ce(e,n,r,t);ce(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function kt(e,t,n,r){let o=!1;for(let s=0,i=t.length;s<i;s++){let a=t[s],c=n&&n[e.length],u;if(!(a==null||a===!0||a===!1))if((u=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))o=kt(e,a,c)||o;else if(u==="function")if(r){for(;typeof a=="function";)a=a();o=kt(e,Array.isArray(a)?a:[a],Array.isArray(c)?c:[c])||o}else e.push(a),o=!0;else{const l=String(a);c&&c.nodeType===3&&c.data===l?e.push(c):e.push(document.createTextNode(l))}}return o}function en(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function ce(e,t,n,r){if(n===void 0)return e.textContent="";const o=r||document.createTextNode("");if(t.length){let s=!1;for(let i=t.length-1;i>=0;i--){const a=t[i];if(o!==a){const c=a.parentNode===e;!s&&!i?c?e.replaceChild(o,a):e.insertBefore(o,n):c&&a.remove()}else s=!0}}else e.insertBefore(o,n);return[o]}function io(){return x.getNextContextId()}const ao="http://www.w3.org/2000/svg";function Pn(e,t=!1,n=void 0){return t?document.createElementNS(ao,e):document.createElement(e,{is:n})}function Ya(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,o=Xt();let s,i=!!x.context;return ee(()=>{i&&(Xt().user=i=!1),s||(s=Lr(o,()=>$(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[c,u]=k(!1),l=()=>u(!0);kn(d=>vt(a,()=>c()?d():s(),null)),be(l)}else{const c=Pn(e.isSVG?"g":"div",e.isSVG),u=t&&c.attachShadow?c.attachShadow({mode:"open"}):c;Object.defineProperty(c,"_$host",{get(){return n.parentNode},configurable:!0}),vt(u,s),a.appendChild(c),e.ref&&e.ref(c),be(()=>a.removeChild(c))}},void 0,{render:!i}),n}function co(e,t){const n=$(e);return $(()=>{const r=n();switch(typeof r){case"function":return Te(()=>r(t));case"string":const o=En.has(r),s=x.context?Tn():Pn(r,o,Te(()=>t.is));return In(s,t,o),s}})}function Za(e){const[,t]=rt(e,["component"]);return co(()=>e.component,t)}const we=Symbol("store-raw"),V=Symbol("store-node"),F=Symbol("store-has"),Mn=Symbol("store-self");function Fn(e){let t=e[A];if(!t&&(Object.defineProperty(e,A,{value:t=new Proxy(e,uo)}),!Array.isArray(e))){const n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let o=0,s=n.length;o<s;o++){const i=n[o];r[i].get&&Object.defineProperty(e,i,{enumerable:r[i].enumerable,get:r[i].get.bind(t)})}}return t}function B(e){let t;return e!=null&&typeof e=="object"&&(e[A]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function W(e,t=new Set){let n,r,o,s;if(n=e!=null&&e[we])return n;if(!B(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let i=0,a=e.length;i<a;i++)o=e[i],(r=W(o,t))!==o&&(e[i]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const i=Object.keys(e),a=Object.getOwnPropertyDescriptors(e);for(let c=0,u=i.length;c<u;c++)s=i[c],!a[s].get&&(o=e[s],(r=W(o,t))!==o&&(e[s]=r))}return e}function Ce(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function ne(e,t,n){if(e[t])return e[t];const[r,o]=k(n,{equals:!1,internal:!0});return r.$=o,e[t]=r}function lo(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===A||t===V||(delete n.value,delete n.writable,n.get=()=>e[A][t]),n}function _t(e){Pe()&&ne(Ce(e,V),Mn)()}function Dn(e){return _t(e),Reflect.ownKeys(e)}const uo={get(e,t,n){if(t===we)return e;if(t===A)return n;if(t===Je)return _t(e),n;const r=Ce(e,V),o=r[t];let s=o?o():e[t];if(t===V||t===F||t==="__proto__")return s;if(!o){const i=Object.getOwnPropertyDescriptor(e,t);Pe()&&(typeof s!="function"||e.hasOwnProperty(t))&&!(i&&i.get)&&(s=ne(r,t,s)())}return B(s)?Fn(s):s},has(e,t){return t===we||t===A||t===Je||t===V||t===F||t==="__proto__"?!0:(Pe()&&ne(Ce(e,F),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Dn,getOwnPropertyDescriptor:lo};function v(e,t,n,r=!1){if(!r&&e[t]===n)return;const o=e[t],s=e.length;n===void 0?(delete e[t],e[F]&&e[F][t]&&o!==void 0&&e[F][t].$()):(e[t]=n,e[F]&&e[F][t]&&o===void 0&&e[F][t].$());let i=Ce(e,V),a;if((a=ne(i,t,o))&&a.$(()=>n),Array.isArray(e)&&e.length!==s){for(let c=e.length;c<s;c++)(a=i[c])&&a.$();(a=ne(i,"length",s))&&a.$(e.length)}(a=i[Mn])&&a.$()}function Ln(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=n[r];v(e,o,t[o])}}function fo(e,t){if(typeof t=="function"&&(t=t(e)),t=W(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){const o=t[n];e[n]!==o&&v(e,n,o)}v(e,"length",r)}else Ln(e,t)}function ke(e,t,n=[]){let r,o=e;if(t.length>1){r=t.shift();const i=typeof r,a=Array.isArray(e);if(Array.isArray(r)){for(let c=0;c<r.length;c++)ke(e,[r[c]].concat(t),n);return}else if(a&&i==="function"){for(let c=0;c<e.length;c++)r(e[c],c)&&ke(e,[c].concat(t),n);return}else if(a&&i==="object"){const{from:c=0,to:u=e.length-1,by:l=1}=r;for(let d=c;d<=u;d+=l)ke(e,[d].concat(t),n);return}else if(t.length>1){ke(e[r],t,[r].concat(n));return}o=e[r],n=[r].concat(n)}let s=t[0];typeof s=="function"&&(s=s(o,n),s===o)||r===void 0&&s==null||(s=W(s),r===void 0||B(o)&&B(s)&&!Array.isArray(s)?Ln(o,s):v(e,r,s))}function Qa(...[e,t]){const n=W(e||{}),r=Array.isArray(n),o=Fn(n);function s(...i){fe(()=>{r&&i.length===1?fo(n,i[0]):ke(n,i)})}return[o,s]}function ho(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||n.set||!n.configurable||t===A||t===V||(delete n.value,delete n.writable,n.get=()=>e[A][t],n.set=r=>e[A][t]=r),n}const go={get(e,t,n){if(t===we)return e;if(t===A)return n;if(t===Je)return _t(e),n;const r=Ce(e,V),o=r[t];let s=o?o():e[t];if(t===V||t===F||t==="__proto__")return s;if(!o){const i=Object.getOwnPropertyDescriptor(e,t),a=typeof s=="function";if(Pe()&&(!a||e.hasOwnProperty(t))&&!(i&&i.get))s=ne(r,t,s)();else if(s!=null&&a&&s===Array.prototype[t])return(...c)=>fe(()=>Array.prototype[t].apply(n,c))}return B(s)?Nn(s):s},has(e,t){return t===we||t===A||t===Je||t===V||t===F||t==="__proto__"?!0:(Pe()&&ne(Ce(e,F),t)(),t in e)},set(e,t,n){return fe(()=>v(e,t,W(n))),!0},deleteProperty(e,t){return fe(()=>v(e,t,void 0,!0)),!0},ownKeys:Dn,getOwnPropertyDescriptor:ho};function Nn(e){let t=e[A];if(!t){Object.defineProperty(e,A,{value:t=new Proxy(e,go)});const n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e),o=Object.getPrototypeOf(e),s=o!==null&&e!==null&&typeof e=="object"&&!Array.isArray(e)&&o!==Object.prototype;if(s){let i=o;for(;i!=null;){const a=Object.getOwnPropertyDescriptors(i);n.push(...Object.keys(a)),Object.assign(r,a),i=Object.getPrototypeOf(i)}}for(let i=0,a=n.length;i<a;i++){const c=n[i];if(!(s&&c==="constructor")){if(r[c].get){const u=r[c].get.bind(t);Object.defineProperty(e,c,{get:u,configurable:!0})}if(r[c].set){const u=r[c].set;Object.defineProperty(e,c,{set:d=>fe(()=>u.call(t,d)),configurable:!0})}}}}return t}function po(e,t){const n=W(e||{});return Nn(n)}const $t=Symbol("store-root");function ue(e,t,n,r,o){const s=t[n];if(e===s)return;const i=Array.isArray(e);if(n!==$t&&(!B(e)||!B(s)||i!==Array.isArray(s)||o&&e[o]!==s[o])){v(t,n,e);return}if(i){if(e.length&&s.length&&(!r||o&&e[0]&&e[0][o]!=null)){let u,l,d,f,g,p,b,y;for(d=0,f=Math.min(s.length,e.length);d<f&&(s[d]===e[d]||o&&s[d]&&e[d]&&s[d][o]&&s[d][o]===e[d][o]);d++)ue(e[d],s,d,r,o);const O=new Array(e.length),L=new Map;for(f=s.length-1,g=e.length-1;f>=d&&g>=d&&(s[f]===e[g]||o&&s[f]&&e[g]&&s[f][o]&&s[f][o]===e[g][o]);f--,g--)O[g]=s[f];if(d>g||d>f){for(l=d;l<=g;l++)v(s,l,e[l]);for(;l<e.length;l++)v(s,l,O[l]),ue(e[l],s,l,r,o);s.length>e.length&&v(s,"length",e.length);return}for(b=new Array(g+1),l=g;l>=d;l--)p=e[l],y=o&&p?p[o]:p,u=L.get(y),b[l]=u===void 0?-1:u,L.set(y,l);for(u=d;u<=f;u++)p=s[u],y=o&&p?p[o]:p,l=L.get(y),l!==void 0&&l!==-1&&(O[l]=s[u],l=b[l],L.set(y,l));for(l=d;l<e.length;l++)l in O?(v(s,l,O[l]),ue(e[l],s,l,r,o)):v(s,l,e[l])}else for(let u=0,l=e.length;u<l;u++)ue(e[u],s,u,r,o);s.length>e.length&&v(s,"length",e.length);return}const a=Object.keys(e);for(let u=0,l=a.length;u<l;u++)ue(e[a[u]],s,a[u],r,o);const c=Object.keys(s);for(let u=0,l=c.length;u<l;u++)e[c[u]]===void 0&&v(s,c[u],void 0)}function ec(e,t={}){const{merge:n,key:r="id"}=t,o=W(e);return s=>{if(!B(s)||!B(o))return o;const i=ue(o,{[$t]:s},$t,n,r);return i===void 0?s:i}}const Xe=new WeakMap,Rn={get(e,t){if(t===we)return e;const n=e[t];let r;return B(n)?Xe.get(n)||(Xe.set(n,r=new Proxy(n,Rn)),r):n},set(e,t,n){return v(e,t,W(n)),!0},deleteProperty(e,t){return v(e,t,void 0,!0),!0}};function tc(e){return t=>{if(B(t)){let n;(n=Xe.get(t))||Xe.set(t,n=new Proxy(t,Rn)),e(n)}return t}}function jt(e,t=0,n=1){return Math.min(Math.max(t,e),n)}function mo(e){e=e.substr(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function re(e){if(typeof e!="string")return e;if(e.charAt(0)==="#")return re(mo(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error("MUI: Unsupported `%s` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color(). "+e);const r=e.substring(t+1,e.length-1);let o,s;if(n==="color"){if(o=r.split(" "),s=o.shift(),o.length===4&&o[3].charAt(0)==="/"&&(o[3]=o[3].substr(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(s)===-1)throw new Error("MUI: unsupported `%s` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020. "+s)}else o=r.split(",");return{type:n,values:o.map(i=>parseFloat(i)),colorSpace:s}}function st(e){const{type:t,colorSpace:n}=e,{values:r}=e;let o;return t.indexOf("rgb")!==-1?o=r.map((s,i)=>i<3?parseInt(s.toString(),10):s).join(","):t.indexOf("hsl")!==-1&&(o=r.map((s,i)=>i===1||i===2?`${s}%`:s).join(",")),t.indexOf("color")!==-1?o=`${n} ${r.join(" ")}`:o=`${r.join(", ")}`,`${t}(${o})`}function yo(e){const t=re(e),{values:n}=t,r=n[0],o=n[1]/100,s=n[2]/100,i=o*Math.min(s,1-s),a=(l,d=(l+r/30)%12)=>s-i*Math.max(Math.min(d-3,9-d,1),-1);let c="rgb";const u=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return t.type==="hsla"&&(c+="a",u.push(n[3])),st({type:c,values:u})}function tn(e){const{type:t,values:n}=re(e);let r=t==="hsl"?re(yo(e)).values:n;return r=r.map(o=>(t!=="color"&&(o/=255),o<=.03928?o/12.92:((o+.055)/1.055)**2.4)),Number((.2126*r[0]+.7152*r[1]+.0722*r[2]).toFixed(3))}function bo(e,t){const n=tn(e),r=tn(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function nc(e,t){let{type:n,values:r}=re(e);return t=jt(t),(n==="rgb"||n==="hsl")&&(n+="a"),n==="color"?r[3]=`/${t}`:r[3]=t,st({type:n,values:r})}function wo(e,t){const n=re(e);if(t=jt(t),n.type.indexOf("hsl")!==-1)n.values[2]*=1-t;else if(n.type.indexOf("rgb")!==-1||n.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)n.values[r]*=1-t;return st(n)}function Co(e,t){const n=re(e);if(t=jt(t),n.type.indexOf("hsl")!==-1)n.values[2]+=(100-n.values[2])*t;else if(n.type.indexOf("rgb")!==-1)for(let r=0;r<3;r+=1)n.values[r]+=(255-n.values[r])*t;else if(n.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)n.values[r]+=(1-n.values[r])*t;return st(n)}const So={xs:0,sm:600,md:900,lg:1200,xl:1536};function xo(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const s=r.breakpoints;return t.reduce((i,a,c)=>(i={...i,...s.up(s.keys[c],n(t[c]))},i),{})}if(typeof t=="object"){const s=r.breakpoints;return Object.keys(t).reduce((a,c)=>{if(Object.keys(s.values||So).indexOf(c)!==-1)a={...a,...s.up(c,n(t[c],c))};else{const u=c;a[u]=t[u]}return a},{})}return n(t)}const Oo={cleanupStyles:!0},vo=xe(Oo),oe={black:"#000",white:"#fff"},he={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},ge={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},pe={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},me={300:"#4fc3f7",400:"#29b6f6",700:"#0288d1",800:"#0277bd",900:"#01579b"},ye={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},Ae={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},ko={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function $e(e){return e!==null&&typeof e=="object"&&e.constructor===Object}function $o(e,t){for(const n of t){const r=e[n];delete e[n],e[n]=r}}function Vt(e,t,n={clone:!0}){const r=n.clone?{...e}:e,o=n.sortKeys?[]:void 0;return $e(e)&&$e(t)&&(Object.keys(t).forEach(s=>{if(s==="__proto__")return;o&&o.push(s);let i,a;$e(i=t[s])&&s in e&&$e(a=e[s])?r[s]=Vt(a,i,n):i!==void 0&&(r[s]=i)}),o&&$o(r,o)),r}function Et(e){if(Array.isArray(e)){const t=[];for(const n of e)t.push(Et(n));return t}else if($e(e)){const t={};for(const n in e)n!=="__proto__"&&(t[n]=Et(e[n]));return t}else return e}function De(e,...t){for(const n of t)Vt(e,Et(n),{clone:!1});return e}const Eo=()=>({text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:oe.white,default:oe.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}),Ao={primary:{main:pe[700],light:pe[400],dark:pe[800]},secondary:{main:ge[500],light:ge[300],dark:ge[700]},error:{main:he[700],light:he[400],dark:he[800]},info:{main:me[700],light:me[800],dark:me[900]},success:{main:ye[800],light:ye[500],dark:ye[900]},warning:{main:"#ED6C02",light:Ae[500],dark:Ae[900]}},Io=()=>({text:{primary:oe.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:oe.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}),To={primary:{main:pe[200],light:pe[50],dark:pe[400]},secondary:{main:ge[200],light:ge[50],dark:ge[400]},error:{main:he[500],light:he[300],dark:he[700]},info:{main:me[400],light:me[300],dark:me[700]},success:{main:ye[400],light:ye[300],dark:ye[700]},warning:{main:Ae[400],light:Ae[300],dark:Ae[700]}},Po={light:Eo,dark:Io};function Bn(e,t){return bo(e,oe.white)>=t?oe.white:"rgba(0, 0, 0, 0.87)"}function nn(e,t,n,r){const o=typeof r=="number"?r:r.light,s=typeof r=="number"?r*1.5:r.dark;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Co(e.main,o):t==="dark"&&(e.dark=wo(e.main,s)))}function Mo(e){const t={...e.color},n=e.mainShade??500;return!e.color.main&&e.color[n]&&(t.main=e.color[n]),nn(t,"light",e.lightShade??300,e.tonalOffset),nn(t,"dark",e.darkShade??700,e.tonalOffset),t.contrastText||(t.contrastText=Bn(t.main,e.contrastThreshold)),t}const Fo=()=>({mode:"light",tonalOffset:.2,contrastThreshold:3,grey:ko,common:oe});function Do(e){const t=["error","info","primary","secondary","success","warning"],n=Fo(),r={...De({},n,Po[(e==null?void 0:e.mode)??n.mode](),e),isColorName(s){return t.includes(s)},getColorObject(s){return r[s]},getColor(s){return r.mode==="light"?r[s].light:r[s].dark},augmentColor(s){return Mo({...s,tonalOffset:r.tonalOffset,contrastThreshold:r.contrastThreshold})},getContrastText(s){return Bn(s,r.contrastThreshold)}},o=s=>r.mode==="light"?Ao[s]:To[s];return r.primary=r.augmentColor({color:r.primary||o("primary")}),r.secondary=r.augmentColor({color:r.secondary||o("secondary"),mainShade:"A400",lightShade:"A200",darkShade:"A700"}),r.error=r.augmentColor({color:r.error||o("error")}),r.warning=r.augmentColor({color:r.warning||o("warning")}),r.info=r.augmentColor({color:r.info||o("info")}),r.success=r.augmentColor({color:r.success||o("success")}),r}const Lo={};function No(e){return{...De({},Lo,e??{})}}function Ro(e,t=void 0,n={}){return{toolbar:{minHeight:56,[`${e.up("xs")} and (orientation: landscape)`]:{minHeight:48},[e.up("sm")]:{minHeight:64}},...n}}const gt={},Bo=.2,Uo=.14,_o=.12;function w(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Bo})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Uo})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${_o})`].join(",")}const jo=[()=>"none",()=>w(0,2,1,-1,0,1,1,0,0,1,3,0),()=>w(0,3,1,-2,0,2,2,0,0,1,5,0),()=>w(0,3,3,-2,0,3,4,0,0,1,8,0),()=>w(0,2,4,-1,0,4,5,0,0,1,10,0),()=>w(0,3,5,-1,0,5,8,0,0,1,14,0),()=>w(0,3,5,-1,0,6,10,0,0,1,18,0),()=>w(0,4,5,-2,0,7,10,1,0,2,16,1),()=>w(0,5,5,-3,0,8,10,1,0,3,14,2),()=>w(0,5,6,-3,0,9,12,1,0,3,16,2),()=>w(0,6,6,-3,0,10,14,1,0,4,18,3),()=>w(0,6,7,-4,0,11,15,1,0,4,20,3),()=>w(0,7,8,-4,0,12,17,2,0,5,22,4),()=>w(0,7,8,-4,0,13,19,2,0,5,24,4),()=>w(0,7,9,-4,0,14,21,2,0,5,26,4),()=>w(0,8,9,-5,0,15,22,2,0,6,28,5),()=>w(0,8,10,-5,0,16,24,2,0,6,30,5),()=>w(0,8,11,-5,0,17,26,2,0,6,32,5),()=>w(0,9,11,-5,0,18,28,2,0,7,34,6),()=>w(0,9,12,-6,0,19,29,2,0,7,36,6),()=>w(0,10,13,-6,0,20,31,3,0,8,38,7),()=>w(0,10,13,-6,0,21,33,3,0,8,40,7),()=>w(0,10,14,-6,0,22,35,3,0,8,42,7),()=>w(0,11,14,-7,0,23,36,3,0,9,44,8),()=>w(0,11,15,-7,0,24,38,3,0,9,46,8)];function Vo(){return new Proxy([],{get:(e,t)=>typeof t!="string"||isNaN(Number(t))?e[t]:t in gt?gt[t]:gt[t]=jo[t]()})}const Wo={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},zo={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function rn(e){return`${Math.round(e)}ms`}function Ko(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function Ho(e){const t={...Wo,...e.easing},n={...zo,...e.duration};return{getAutoHeightDuration:Ko,create:(o=["all"],s={})=>{const{duration:i=n.standard,easing:a=t.easeInOut,delay:c=0,...u}=s;return(Array.isArray(o)?o:[o]).map(l=>`${l} ${typeof i=="string"?i:rn(i)} ${a} ${typeof c=="string"?c:rn(c)}`).join(",")},...e,easing:t,duration:n}}const I={light:300,regular:400,medium:500},Be={fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif',fontSize:14,htmlFontSize:16,h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},subtitle1:{},subtitle2:{},body1:{},body2:{},button:{},caption:{},overline:{},fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:500,fontWeightBold:700};function Go(e){return Math.round(e*1e5)/1e5}function T(e,t,n,r,o,s){return{fontFamily:e.fontFamily,fontWeight:t,fontSize:e.pxToRem(n),lineHeight:`${r}`,letterSpacing:`${Go(o/n)}em`,...s?{textTransform:"uppercase"}:{}}}function qo(e={}){const t={fontFamily:e.fontFamily??Be.fontFamily,fontSize:e.fontSize??Be.fontSize,htmlFontSize:(e==null?void 0:e.htmlFontSize)??Be.htmlFontSize,pxToRem:n=>{const r=t.fontSize/14;return`${n/t.htmlFontSize*r}rem`}};return De(Be,t,{h1:T(t,I.light,96,1.167,-1.5),h2:T(t,I.light,60,1.2,-.5),h3:T(t,I.regular,48,1.167,0),h4:T(t,I.regular,34,1.235,.25),h5:T(t,I.regular,24,1.334,0),h6:T(t,I.medium,20,1.6,.15),subtitle1:T(t,I.regular,16,1.75,.15),subtitle2:T(t,I.medium,14,1.57,.1),body1:T(t,I.regular,16,1.5,.15),body2:T(t,I.regular,14,1.43,.15),button:T(t,I.medium,14,1.75,.4,!0),caption:T(t,I.regular,12,1.66,.4),overline:T(t,I.regular,12,2.66,1,!0)},e)}const Jo={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Xo(e){return{...De({},Jo,e)}}function pt(e,t,n="px"){let r;if(e==="up")r=`(min-width:${t}${n})`;else if(e==="down")r=`(max-width:${t}${n})`;else if(e==="between"){const[o,s]=t;r=`(max-width:${o}${n}) and (min-width:${s}${n})`}else throw new Error(`Invalid comparator: ${e}`);return`@media ${r}`}const Yo={columns:12,keys:["xs","sm","md","lg","xl"],values:{xs:0,sm:600,md:900,lg:1200,xl:1536},unit:"px"};function Un(e){const t={...Yo,...e??{},up:(n,r)=>{const o=pt("up",t.resolve(n));return r?{[o]:r}:o},down:(n,r)=>{const o=pt("down",t.resolve(n));return r?{[o]:r}:o},between:(n,r)=>{const o=pt("between",[t.resolve(n[0]),t.resolve(n[1])]);return r?{[o]:r}:o},resolve:n=>typeof n=="number"?n:t.values[n]};return t}function _n(e){return typeof e=="function"?e:(...n)=>n.map(r=>typeof r=="number"?`${r*(e??8)}px`:r).join(" ")}const Zo={borderRadius:4};function jn(e){return{...De({},Zo,e)}}function Vn(e={}){const t={direction:"ltr",...e};function n(r,o){const s=e[r];Object.defineProperty(t,r,{configurable:!0,enumerable:!0,...typeof s=="function"?{get:s}:{value:o({[r]:s})}})}return n("breakpoints",r=>Un(r.breakpoints)),n("components",r=>No(r.components)),n("palette",r=>Do(r.palette)),n("shape",r=>jn(r.shape)),n("spacing",r=>_n(r.spacing)),n("typography",r=>qo(r.typography)),n("shadows",()=>Vo()),n("transitions",()=>Ho({})),n("zIndex",r=>Xo(r.zIndex)),n("mixins",()=>Ro(t.breakpoints)),t}function Wn(e){let t;return function(){return t||(t=e()),t}}const Qo=Wn(Vn);let zn;zn=xe({});const it=zn;function es(e){return{direction:"ltr",shadows:void 0,transitions:void 0,components:void 0,palette:void 0,typography:void 0,zIndex:void 0,mixins:void 0,...e,breakpoints:Un(e==null?void 0:e.breakpoints),shape:jn(e==null?void 0:e.shape),spacing:_n(e==null?void 0:e.spacing)}}const ts=Wn(es);function ns(e){for(const t in e)return!1;return!0}function Wt(e=ts,t=it){const n=Fe(t);if(typeof n=="function")return new Proxy({},{get:(r,o)=>n()[o]});if(ns(n)&&e)return typeof e=="function"?e():e;if(!n)throw new Error("Theme is not defined");return n}function Kn(e=Qo){return Wt(e,it)}function rs(e){return Wt(e,it)}function os(e){var s,i;const t=[],n=typeof e.propDefaults=="function"?e.propDefaults({set:a=>a,inProps:e.props}):e.propDefaults,o=(i=(s=rs().components)==null?void 0:s[e.name])==null?void 0:i.defaultProps;return n&&t.push(n),o&&t.push(o),t.length?$n(...t,e.props):e.props}function ss(e){return te(it.Provider,{get value(){return e.theme},get children(){return e.children}})}function is(e,t=!1){return t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}function as(e,t){switch(typeof e){case"function":return Object.assign(e,{[Nr]:!0}),Te(()=>e(t));case"string":const n=En.has(e),r=x.context?Tn():is(e,n);return In(r,t,n),r}}function Hn(e,t){const n=$(e);return $(()=>as(n(),t))}function rc(e){const[t,n]=rt(e,["$component"]);return Hn(()=>t.$component,n)}function cs(e){const t=e.reduce((n,r)=>("name"in r&&(n[`--${r.name}`]="0"),Vt(n,r,{clone:!1,sortKeys:!0}),n),{});return delete t.name,t}function Gn(e){return e.startsWith("--")}function ls(e){return e.startsWith("__")}function qn(e){return/[^a-z-]/i.test(e)&&!Gn(e)}function Jn(e){return e.startsWith("@global")}function At(e){return e.startsWith("@media")}function Xn(e){return e.startsWith("@keyframes")}function on(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function sn(e,t,n=[],r={}){const o=e.split(",").map(s=>(s=s.trim(),s.includes("&")?s:`& ${s}`));return Ye(t,(n.length?n:[""]).flatMap(s=>o.map(i=>i.replace(/&/g,s).trim())),{...r})}function an(e,t){if(!t)return on(e);let n=t.get(e);return n||(t.set(e,n=on(e)),n)}function Ye(e,t=[],n={}){const r=[],o=[];for(let i in e){const a=e[i];if(!ls(i))if(Jn(i))for(const c in a)o.push(...sn(c,a[c],[],n));else if(At(i))o.push(...Ye(a,t,{...n,sublevel:!0}).map(c=>`${i} {
2
+ ${c}
3
+ }`));else if(Gn(i))a!=null&&r.push(`${i}: ${a};`);else if(Xn(i)){const c=[];for(const u in a)c.push(...Ye(a[u],[/^\d+$/.test(u)?`${u}%`:u],{...n,sublevel:!0}));o.push(`${i} {
4
+ ${c.join(`
5
+ `)}
6
+ }`)}else if(qn(i))o.push(...sn(i,a,t,n));else if(n.extraProperties&&i in n.extraProperties){const c=n.extraProperties[i](a);for(const u in c){const l=c[u],d=n.onPropertyValue?n.onPropertyValue(u,l):l;d!=null&&r.push(`${an(u,n.propertyNameCache)}: ${d};`)}}else{i=an(i,n.propertyNameCache);const c=n.onPropertyValue?n.onPropertyValue(i,a):a;c!=null&&r.push(`${i}: ${c};`)}}const s=i=>{const a=" ".repeat(i);return`${a}${r.join(`
7
+ ${a}`)}`};if(t.length){const i=n.sublevel?" ":"",a=i+t.join(`,
8
+ ${i}`);return[...r.length?[`${a} {
9
+ ${s(n.sublevel?2:1)}
10
+ ${i}}`]:[],...o]}else return[...r.length?[s(0)]:[],...o]}function us(e){return e?Array.isArray(e)?e:[e]:[]}function ds(e){return typeof e=="function"&&(e=e()),e}class fs{constructor(){Re(this,"ids",new Map);Re(this,"rules",new Map);Re(this,"propertyNames",new Map)}create(t,n,r){let o=this.rules.get(n);if(o)return o;let s=this.ids.get(r);return typeof s=="number"&&(this.ids.set(r,++s),r+=`_${s}`),o=Yn(t,n,r),this.save(o,n),o}save(t,n){this.ids.set(t.id,0),this.rules.set(n,t)}delete(t){this.ids.delete(t.id),this.rules.delete(t.rules)}}function Yn(e,t,n){return{id:n,name:e,className:`${e}-${n}`,rules:t.replaceAll("$id",`${n}`)}}function hs(e){var s,i;const t=`${e.name}-$id`,n=us(ds(e.props)),r=(s=e.cache)==null?void 0:s.propertyNames,o=n.map(a=>typeof a=="string"?`.${t} {
11
+ ${a}
12
+ }`:Ye(a,[`.${t}`],{extraProperties:e.extraProperties,propertyNameCache:r}).join(`
13
+ `)).join(`
14
+ `);return((i=e.cache)==null?void 0:i.create(e.name,o,e.componentId))||Yn(e.name,o,e.componentId)}function Zn(e,t){"styleSheet"in e?e.styleSheet.cssText=t:(e.innerText="",e.appendChild(document.createTextNode(t)))}function gs(e,t){for(const n in t){const r=t[n];r!==void 0&&(r===null?e.removeAttribute(n):e.setAttribute(n,r))}}function ps(e,t){const n=document.createElement("style");return n.type="text/css",t&&gs(n,t),Zn(n,e),n}function It(e){let t=Number(e.getAttribute("data-uses"));t++,e.setAttribute("data-uses",t.toString())}const cn="suid-injectFirst";function ms(e,t,n){Array.isArray(e)&&(e=e.join(`
15
+ `));const r=t==null?void 0:t.id,o=document.head||document.getElementsByTagName("head")[0],s=r&&document.getElementById(r);if(s&&s instanceof HTMLStyleElement)return Zn(s,e),It(s),s;{s&&s.remove();const i=ps(e,t);if(It(i),n){let a=o.querySelector(`#${cn}`);a||(a=document.createElement("style"),a.setAttribute("id",cn),o.prepend(a)),o.insertBefore(i,a)}else o.appendChild(i);return i}}function ys(e,t="css-"){if(typeof e=="string")return document.getElementById(e);const n=[...e.classList].find(r=>r.startsWith(t));if(n)return document.getElementById(n.slice(t.length))}function ln(e,t=!0){let n=Number(e.getAttribute("data-uses"));n--,n<=0?t?e.remove():e.setAttribute("data-uses","0"):e.setAttribute("data-uses",n.toString())}function oc(e){if(typeof e!="string")throw new Error("MUI: `capitalize(string)` expects a string argument.");return e.charAt(0).toUpperCase()+e.slice(1)}function sc(e,t=166){let n;function r(...o){const s=()=>{e.apply(null,o)};clearTimeout(n),n=setTimeout(s,t)}return r.clear=()=>{clearTimeout(n)},r}function ic(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}function bs(e){return e&&e.ownerDocument||document}function ac(e){return bs(e).defaultView||window}function Qn(){return Math.random().toString(36).substring(2,15).slice(0,8)}let at=!0,Tt=!1,un;const ws={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function Cs(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&ws[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function Ss(e){e.metaKey||e.altKey||e.ctrlKey||(at=!0)}function mt(){at=!1}function xs(){this.visibilityState==="hidden"&&Tt&&(at=!0)}function Os(e){e.addEventListener("keydown",Ss,!0),e.addEventListener("mousedown",mt,!0),e.addEventListener("pointerdown",mt,!0),e.addEventListener("touchstart",mt,!0),e.addEventListener("visibilitychange",xs,!0)}function vs(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return at||Cs(t)}function cc(){const e=s=>{s!=null&&Os(s.ownerDocument)},[t,n]=k(!1);function r(){return t()?(Tt=!0,window.clearTimeout(un),un=window.setTimeout(()=>{Tt=!1},100),n(!1),!0):!1}function o(s){return vs(s)?(n(!0),!0):!1}return{isFocusVisibleRef:{get current(){return t()}},onFocus:o,onBlur:r,ref:e}}const ks=new fs;function $s(e){return e?Array.isArray(e)?e.flat(1/0).filter(t=>!!t):[e]:[]}function Es(){if(!x.context)return Qn();const e=Rr().replaceAll("-",""),t=9,n=Math.ceil(e.length/t),r=[];for(let o=1;o<=n;++o){const s=(o-1)*t,i=Number(e.slice(s,s+t));r.push(i.toString(32))}return r.join("-")}function er(e){const t=Fe(vo),[n,r]=k(""),o=Es();let s,i=!1;return Q(a=>{var l;const c=e();let u;if(c){const d=cs($s(c));i="@global"in d,u=hs({name:"css",props:d,cache:ks,componentId:o}),s=ys(u.id),s?It(s):s=ms(u.rules,{id:u.id,nonce:(l=t.cache)==null?void 0:l.nonce},t.injectFirst),a!=null&&a.styleElement&&ln(a.styleElement)}return typeof(u==null?void 0:u.className)=="string"?r(u.className):r(""),{className:u==null?void 0:u.className,styleElement:s}},void 0),be(()=>{s&&ln(s,t.cleanupStyles??i)}),n}function de(e,t,n={}){for(const r in e){const o=e[r];if(Jn(r))n[r]=de(o,t);else if(At(r))n[r]=de(o,t);else if(Xn(r)){n[r]={};for(const s in o)n[r][s]=de(o[s],t)}else if(qn(r))n[r]=de(o,t);else{const s=t(r,o);if(s)for(const i in s)n[i]=At(i)?{...n[i],...s[i]}:s[i];else n[r]=o}}return n}const As=new Set(["animationIterationCount","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","msGridRow","msGridRowSpan","msGridColumn","msGridColumnSpan","fontWeight","lineHeight","opacity","order","orphans","tabSize","widows","zIndex","zoom","WebkitLineClamp","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth"]);function tr(e,t){if(typeof t=="number")return{[e]:As.has(e)?t.toString():`${t}px`}}function dn(e,t={}){return de(e,tr,t)}function Ze(e,t,n){if(typeof n!="string")return n;const r=n.split(".");let o=e[t];for(let s=0;s<r.length&&(o=o==null?void 0:o[r[s]],!!o);s++);return o??n}function Is(e,t){return t.split(".").reduce((n,r)=>n&&n[r]?n[r]:null,e)}function Ts(e,t,n,r){const o=Is(e,t)||n;return typeof o=="number"?s=>typeof s=="string"?s:o*s:Array.isArray(o)?s=>typeof s=="string"?s:o[s]:typeof o=="function"?o:()=>{}}const G={x:["Left","Right"],y:["Top","Bottom"]};function nr(e){return typeof e=="number"?`${e}px`:e}function rr(e,t){return(n,r)=>t(e,n,r)}function h(e,t){return t?(n,r)=>({[e]:t(e,n,r)}):n=>({[e]:n})}function Ee(e){return h(e,(t,n)=>nr(n))}function M(e,t,n){const r=t.map(o=>`${e}${o}`);return n?(o,s)=>r.reduce((i,a)=>(i[a]=n(a,o,s),i),{}):o=>r.reduce((s,i)=>(s[i]=o,s),{})}function Ps(){return{...Ms(),...Fs(),...Ds(),...Ls(),...Ns(),...Rs(),...Bs(),..._s(),...Us()}}function Ms(){return{displayPrint:rr("displayPrint",(e,t)=>({"@media print":{display:t}})),displayRaw:h("display"),overflow:h("overflow"),textOverflow:h("textOverflow"),visibility:h("visibility"),whiteSpace:h("whiteSpace")}}function Fs(){return{flexBasis:h("flexBasis"),flexDirection:h("flexDirection"),flexWrap:h("flexWrap"),justifyContent:h("justifyContent"),alignItems:h("alignItems"),alignContent:h("alignContent"),order:h("order"),flex:h("flex"),flexGrow:h("flexGrow"),flexShrink:h("flexShrink"),alignSelf:h("alignSelf"),justifyItems:h("justifyItems"),justifySelf:h("justifySelf")}}function Ds(){const e=(t,n,r)=>Ts(r,"spacing",8)(n);return{gap:h("gap",e),columnGap:h("columnGap",e),rowGap:h("rowGap",e),gridColumn:h("gridColumn"),gridRow:h("gridRow"),gridAutoFlow:h("gridAutoFlow"),gridAutoColumns:h("gridAutoColumns"),gridAutoRows:h("gridAutoRows"),gridTemplateColumns:h("gridTemplateColumns"),gridTemplateRows:h("gridTemplateRows"),gridTemplateAreas:h("gridTemplateAreas"),gridArea:h("gridArea")}}function Ls(){return{position:h("position"),zIndex:h("zIndex",(e,t,n)=>{var r;return((r=n.zIndex)==null?void 0:r[e])??t}),top:Ee("top"),right:Ee("right"),bottom:Ee("bottom"),left:Ee("left")}}function Ns(){const e=(t,n,r)=>Ze(r,"palette",n);return{color:h("color",e),bgcolor:h("backgroundColor",e),backgroundColor:h("backgroundColor",e)}}function Rs(){const e=(t,n,r)=>(t==="maxWidth"&&(n=r.breakpoints.values[t]??n),typeof n=="number"&&(n=n>0&&n<=1?`${n*100}%`:`${n}px`),n);return{width:h("width",e),maxWidth:h("maxWidth",e),minWidth:h("minWidth",e),height:h("height",e),maxHeight:h("maxHeight",e),minHeight:h("minHeight",e),boxSizing:h("boxSizing",e)}}function Bs(){const e=(n,r)=>typeof r=="number"?`${r}px solid`:r,t=(n,r,o)=>Ze(o,"palette",r);return{border:h("border",e),borderTop:h("borderTop",e),borderRight:h("borderRight",e),borderBottom:h("borderBottom",e),borderLeft:h("borderLeft",e),borderColor:h("borderColor",t),borderTopColor:h("borderTopColor",t),borderRightColor:h("borderRightColor",t),borderBottomColor:h("borderBottomColor",t),borderLeftColor:h("borderLeftColor",t),borderRadius:h("borderRadius",(n,r,o)=>typeof r=="number"?`${o.shape.borderRadius*r}px`:r)}}function Us(){const e=(t,n,r)=>Ze(r,"typography",n);return{typography:rr("typography",(t,n,r)=>Ze(r,"typography",n)),fontFamily:h("fontFamily",e),fontSize:h("fontSize",(t,n,r)=>nr(e(t,n,r))),fontStyle:h("fontStyle",e),fontWeight:h("fontWeight",e),letterSpacing:Ee("letterSpacing"),lineHeight:h("lineHeight"),textAlign:h("textAlign"),textTransform:h("textTransform")}}function _s(){const e=(r,o,s)=>s.spacing(o),t="margin",n="padding";return{m:h(t,e),mt:h("marginTop",e),mr:h("marginRight",e),mb:h("marginBottom",e),ml:h("marginLeft",e),mx:M(t,G.x,e),my:M(t,G.y,e),margin:h(t,e),marginTop:h("marginTop",e),marginRight:h("marginRight",e),marginBottom:h("marginBottom",e),marginLeft:h("marginLeft",e),marginX:M(t,G.x,e),marginY:M(t,G.y,e),marginInline:M(t,["Inline","InlineStart"],e),marginInlineStart:h("marginInlineStart",e),marginInlineEnd:h("marginInlineEnd",e),marginBlock:M(t,["BlockStart","BlockEnd"],e),marginBlockStart:h("marginBlockStart",e),marginBlockEnd:h("marginBlockEnd",e),p:h(n,e),pt:h("paddingTop",e),pr:h("paddingRight",e),pb:h("paddingBottom",e),pl:h("paddingLeft",e),px:M(n,G.x,e),py:M(n,G.y,e),padding:h(n,e),paddingTop:h("paddingTop",e),paddingRight:h("paddingRight",e),paddingBottom:h("paddingBottom",e),paddingLeft:h("paddingLeft",e),paddingX:M(n,G.x,e),paddingY:M(n,G.y,e),paddingInline:M(n,["Inline","InlineStart"],e),paddingInlineStart:h("paddingInlineStart",e),paddingInlineEnd:h("paddingInlineEnd",e),paddingBlock:M(n,["BlockStart","BlockEnd"],e),paddingBlockStart:h("paddingBlockStart",e),paddingBlockEnd:h("paddingBlockEnd",e)}}const zt=Ps(),lc=Object.keys(zt);function js(e,t,n){return zt[e](t,n)}function fn(e,t,n){return e in zt?js(e,t,n):tr(e,t)}function Vs(e,t){return de(e,(n,r)=>{if(typeof r=="function"&&(r=r(t)),r==null)return r;if(typeof r=="object"){const o={};for(const s of t.breakpoints.keys)o[t.breakpoints.up(s)]={};return Object.assign(o,xo({theme:t},r,s=>fn(n,s,t)??{[n]:s}))}else return fn(n,r,t)})}function or(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=or(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ws(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=or(e))&&(r&&(r+=" "),r+=t);return r}const sr=["ownerState","theme","sx","as"];function zs(e,t){var n,r;return(r=(n=t.components)==null?void 0:n[e])==null?void 0:r.styleOverrides}function Ks(e,t,n,r,o={}){return $(()=>{const s=e(),i=zs(o.name,s),a=r.ownerState,c=n.reduce((l,d)=>{let f;return typeof d=="function"?f=d({ownerState:a,theme:s,get sx(){return r.sx},get as(){return r.as},props:r}):d&&(f=d),f&&l.push(dn(f,{name:t,__resolved:!0})),l},[]);let u=[];return o.overridesResolver&&typeof o.overridesResolver=="function"&&i&&(u=o.overridesResolver(r,i).map(l=>l?dn(l,{}):null).filter(Boolean)),c.concat(u)})}function ir(e,t){e.__suid=t}function hn(e){if(typeof e=="function")return e.__suid}function Hs(e){return function(n,r={}){let o,s;if(r.name){const a=r.slot||"Root";s=o=`${r.name}-${a.slice(0,1).toLowerCase()+a.slice(1)}`}else s=`styled-${Qn()}`,o="css";const i=hn(n);return function(...a){function c(u){let l;const d=()=>{const E=u.theme;return E||l||(l=e&&e.onUseTheme?e.onUseTheme():Wt())},[,f]=rt(u,r.skipProps||sr),g=Ks(d,o,a,u,r),p=()=>{const E=u.sx;return E?Array.isArray(E)?E:[E]:[]},b=()=>{if(i)return n;const E=u.as;return E||n},y=i?()=>i:$(()=>hn(b())),O=r.skipSx?()=>g():()=>{const E=d();return[...g(),...p().map(H=>H.__resolved?H:Vs(H,E))]},L=er(()=>y()?void 0:O());return Hn(b,$n(f,{get children(){return u.children},get component(){return y()?u.component:null},get as(){return i?u.as:void 0},get sx(){return y()?O():void 0},get ownerState(){return y()==="system"?u.ownerState:void 0},get class(){return Ws([...new Set([u.class,s,L()])])}}))}return ir(c,"system"),s&&(c.toString=()=>`.${s}`),c}}}const uc=[...sr,"classes"],dc=Hs({onUseTheme:()=>Kn()}),Gs="codenomad.client-id",qs="codenomad.connection-id";let Ue=null,_e=null;function Pt(){return{clientId:Js(),connectionId:Xs()}}function Js(){return Ue||(Ue=ar(Gs,window.localStorage),Ue)}function Xs(){return _e||(_e=ar(qs,window.sessionStorage),_e)}function ar(e,t){if(typeof window>"u")return yt();try{const r=t.getItem(e);if(r&&r.trim())return r.trim()}catch{return yt()}const n=yt();try{t.setItem(e,n)}catch{}return n}function yt(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}var Mt={exports:{}},bt,gn;function Ys(){if(gn)return bt;gn=1;var e=1e3,t=e*60,n=t*60,r=n*24,o=r*7,s=r*365.25;bt=function(l,d){d=d||{};var f=typeof l;if(f==="string"&&l.length>0)return i(l);if(f==="number"&&isFinite(l))return d.long?c(l):a(l);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(l))};function i(l){if(l=String(l),!(l.length>100)){var d=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(l);if(d){var f=parseFloat(d[1]),g=(d[2]||"ms").toLowerCase();switch(g){case"years":case"year":case"yrs":case"yr":case"y":return f*s;case"weeks":case"week":case"w":return f*o;case"days":case"day":case"d":return f*r;case"hours":case"hour":case"hrs":case"hr":case"h":return f*n;case"minutes":case"minute":case"mins":case"min":case"m":return f*t;case"seconds":case"second":case"secs":case"sec":case"s":return f*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return f;default:return}}}}function a(l){var d=Math.abs(l);return d>=r?Math.round(l/r)+"d":d>=n?Math.round(l/n)+"h":d>=t?Math.round(l/t)+"m":d>=e?Math.round(l/e)+"s":l+"ms"}function c(l){var d=Math.abs(l);return d>=r?u(l,d,r,"day"):d>=n?u(l,d,n,"hour"):d>=t?u(l,d,t,"minute"):d>=e?u(l,d,e,"second"):l+" ms"}function u(l,d,f,g){var p=d>=f*1.5;return Math.round(l/f)+" "+g+(p?"s":"")}return bt}function Zs(e){n.debug=n,n.default=n,n.coerce=c,n.disable=i,n.enable=o,n.enabled=a,n.humanize=Ys(),n.destroy=u,Object.keys(e).forEach(l=>{n[l]=e[l]}),n.names=[],n.skips=[],n.formatters={};function t(l){let d=0;for(let f=0;f<l.length;f++)d=(d<<5)-d+l.charCodeAt(f),d|=0;return n.colors[Math.abs(d)%n.colors.length]}n.selectColor=t;function n(l){let d,f=null,g,p;function b(...y){if(!b.enabled)return;const O=b,L=Number(new Date),E=L-(d||L);O.diff=E,O.prev=d,O.curr=L,d=L,y[0]=n.coerce(y[0]),typeof y[0]!="string"&&y.unshift("%O");let H=0;y[0]=y[0].replace(/%([a-zA-Z%])/g,(ht,Pr)=>{if(ht==="%%")return"%";H++;const Jt=n.formatters[Pr];if(typeof Jt=="function"){const Mr=y[H];ht=Jt.call(O,Mr),y.splice(H,1),H--}return ht}),n.formatArgs.call(O,y),(O.log||n.log).apply(O,y)}return b.namespace=l,b.useColors=n.useColors(),b.color=n.selectColor(l),b.extend=r,b.destroy=n.destroy,Object.defineProperty(b,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(g!==n.namespaces&&(g=n.namespaces,p=n.enabled(l)),p),set:y=>{f=y}}),typeof n.init=="function"&&n.init(b),b}function r(l,d){const f=n(this.namespace+(typeof d>"u"?":":d)+l);return f.log=this.log,f}function o(l){n.save(l),n.namespaces=l,n.names=[],n.skips=[];const d=(typeof l=="string"?l:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const f of d)f[0]==="-"?n.skips.push(f.slice(1)):n.names.push(f)}function s(l,d){let f=0,g=0,p=-1,b=0;for(;f<l.length;)if(g<d.length&&(d[g]===l[f]||d[g]==="*"))d[g]==="*"?(p=g,b=f,g++):(f++,g++);else if(p!==-1)g=p+1,b++,f=b;else return!1;for(;g<d.length&&d[g]==="*";)g++;return g===d.length}function i(){const l=[...n.names,...n.skips.map(d=>"-"+d)].join(",");return n.enable(""),l}function a(l){for(const d of n.skips)if(s(l,d))return!1;for(const d of n.names)if(s(l,d))return!0;return!1}function c(l){return l instanceof Error?l.stack||l.message:l}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}var Qs=Zs;(function(e,t){var n={};t.formatArgs=o,t.save=s,t.load=i,t.useColors=r,t.storage=a(),t.destroy=(()=>{let u=!1;return()=>{u||(u=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let u;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(u=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(u[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function o(u){if(u[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+u[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const l="color: "+this.color;u.splice(1,0,l,"color: inherit");let d=0,f=0;u[0].replace(/%[a-zA-Z%]/g,g=>{g!=="%%"&&(d++,g==="%c"&&(f=d))}),u.splice(f,0,l)}t.log=console.debug||console.log||(()=>{});function s(u){try{u?t.storage.setItem("debug",u):t.storage.removeItem("debug")}catch{}}function i(){let u;try{u=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch{}return!u&&typeof process<"u"&&"env"in process&&(u=n.DEBUG),u}function a(){try{return localStorage}catch{}}e.exports=Qs(t);const{formatters:c}=e.exports;c.j=function(u){try{return JSON.stringify(u)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}})(Mt,Mt.exports);var ei=Mt.exports;const Ft=Ur(ei),Oe=["sse","api","session","actions"],cr="opencode:logger:namespaces",wt=new Map,U=new Set,j=typeof globalThis<"u"?globalThis.console:void 0;function Le(){U.size===0?Ft.disable():Ft.enable(Array.from(U).join(","))}function ct(){var e;if(!(typeof window>"u"||!(window!=null&&window.localStorage)))try{window.localStorage.setItem(cr,JSON.stringify(Array.from(U)))}catch(t){(e=j==null?void 0:j.warn)==null||e.call(j,"Failed to persist logger namespaces",t)}}function ti(){var e;if(!(typeof window>"u"||!(window!=null&&window.localStorage)))try{const t=window.localStorage.getItem(cr);if(!t)return;const n=JSON.parse(t);if(!Array.isArray(n))return;for(const r of n)Oe.includes(r)&&U.add(r)}catch(t){(e=j==null?void 0:j.warn)==null||e.call(j,"Failed to hydrate logger namespaces",t)}}ti();Le();function ni(e){const n=Ft(e),r=(o,s)=>{n(o,...s)};return{log:(...o)=>n(...o),info:(...o)=>n(...o),warn:(...o)=>r("[warn]",o),error:(...o)=>r("[error]",o)}}function ie(e){if(!Oe.includes(e))throw new Error(`Unknown logger namespace: ${e}`);return wt.has(e)||wt.set(e,ni(e)),wt.get(e)}function ri(){return Oe.map(e=>({name:e,enabled:U.has(e)}))}function oi(e){if(!Oe.includes(e))throw new Error(`Unknown logger namespace: ${e}`);U.has(e)||(U.add(e),ct(),Le())}function si(e){if(!Oe.includes(e))throw new Error(`Unknown logger namespace: ${e}`);U.has(e)&&(U.delete(e),ct(),Le())}function ii(){U.clear(),ct(),Le()}function ai(){Oe.forEach(e=>U.add(e)),ct(),Le()}const ci={listLoggerNamespaces:ri,enableLogger:oi,disableLogger:si,enableAllLoggers:ai,disableAllLoggers:ii};function li(){typeof window>"u"||(window.codenomadLogger=ci)}li();var vn;const ui=typeof window<"u"?(vn=window.location)==null?void 0:vn.origin:void 0,di=typeof window<"u"?window.__CODENOMAD_API_BASE__??ui:void 0,fi=typeof window<"u"?window.__CODENOMAD_EVENTS_URL__??"/api/events":"/api/events",J=di,Ct=hi(J,fi),fc=J;function hc(e,t){const n=encodeURIComponent(e),r=encodeURIComponent(t);return gi(`/workspaces/${n}/plugin/background-processes/${r}/stream`)}function hi(e,t){if(t.startsWith("http://")||t.startsWith("https://"))return t;if(e){const n=t.startsWith("/")?t:`/${t}`;return`${e}${n}`}return t}function gi(e){if(e.startsWith("http://")||e.startsWith("https://")||!J)return e;const t=e.startsWith("/")?e:`/${e}`;return`${J}${t}`}const pn=ie("api"),je=ie("sse");function lr(e){const t={};if(!e)return t;if(e instanceof Headers)return e.forEach((n,r)=>{t[r]=n}),t;if(Array.isArray(e)){for(const[n,r]of e)t[n]=r;return t}return{...e}}function Z(e,t){if(t){pn.info(e,t);return}pn.info(e)}async function m(e,t){const n=J?new URL(e,J).toString():e,r=lr(t==null?void 0:t.headers);(t==null?void 0:t.body)!==void 0&&(r["Content-Type"]="application/json");const o=((t==null?void 0:t.method)??"GET").toUpperCase(),s=Date.now();Z(`${o} ${e}`);try{const i=await fetch(n,{...t,headers:r,credentials:(t==null?void 0:t.credentials)??"include"});if(!i.ok){const c=await i.text();throw Z(`${o} ${e} -> ${i.status}`,{durationMs:Date.now()-s,error:c}),new Error(c||`Request failed with ${i.status}`)}const a=Date.now()-s;return Z(`${o} ${e} -> ${i.status}`,{durationMs:a}),i.status===204?void 0:await i.json()}catch(i){throw Z(`${o} ${e} failed`,{durationMs:Date.now()-s,error:i}),i}}async function pi(e,t){const n=J?new URL(e,J).toString():e,r=lr(t==null?void 0:t.headers);(t==null?void 0:t.body)!==void 0&&!r["Content-Type"]&&(r["Content-Type"]="application/json");const o=((t==null?void 0:t.method)??"GET").toUpperCase(),s=Date.now();Z(`${o} ${e}`);const i=await fetch(n,{...t,headers:r,credentials:(t==null?void 0:t.credentials)??"include"});if(!i.ok){const a=await i.text();throw Z(`${o} ${e} -> ${i.status}`,{durationMs:Date.now()-s,error:a}),new Error(a||`Request failed with ${i.status}`)}return Z(`${o} ${e} -> ${i.status}`,{durationMs:Date.now()-s}),i}const _={fetchWorkspaces(){return m("/api/workspaces")},fetchWorktrees(e){return m(`/api/workspaces/${encodeURIComponent(e)}/worktrees`)},createWorktree(e,t){return m(`/api/workspaces/${encodeURIComponent(e)}/worktrees`,{method:"POST",body:JSON.stringify(t)})},deleteWorktree(e,t,n){const r=new URLSearchParams;n!=null&&n.force&&r.set("force","true");const o=r.toString()?`?${r.toString()}`:"";return m(`/api/workspaces/${encodeURIComponent(e)}/worktrees/${encodeURIComponent(t)}${o}`,{method:"DELETE"})},readWorktreeMap(e){return m(`/api/workspaces/${encodeURIComponent(e)}/worktrees/map`)},writeWorktreeMap(e,t){return m(`/api/workspaces/${encodeURIComponent(e)}/worktrees/map`,{method:"PUT",body:JSON.stringify(t)})},createWorkspace(e){return m("/api/workspaces",{method:"POST",body:JSON.stringify(e)})},fetchServerMeta(){return m("/api/meta")},fetchAuthStatus(){return m("/api/auth/status")},setServerPassword(e){return m("/api/auth/password",{method:"POST",body:JSON.stringify({password:e})})},deleteWorkspace(e){return m(`/api/workspaces/${encodeURIComponent(e)}`,{method:"DELETE"})},listWorkspaceFiles(e,t="."){const n=new URLSearchParams({path:t});return m(`/api/workspaces/${encodeURIComponent(e)}/files?${n.toString()}`)},searchWorkspaceFiles(e,t,n){const r=t.trim();if(!r)return Promise.resolve([]);const o=new URLSearchParams({q:r});return n!=null&&n.limit&&o.set("limit",String(n.limit)),n!=null&&n.type&&o.set("type",n.type),m(`/api/workspaces/${encodeURIComponent(e)}/files/search?${o.toString()}`)},readWorkspaceFile(e,t){const n=new URLSearchParams({path:t});return m(`/api/workspaces/${encodeURIComponent(e)}/files/content?${n.toString()}`)},writeWorkspaceFile(e,t,n){const r=new URLSearchParams({path:t});return m(`/api/workspaces/${encodeURIComponent(e)}/files/content?${r.toString()}`,{method:"PUT",body:JSON.stringify({contents:n})})},fetchConfigOwner(e){return m(`/api/storage/config/${encodeURIComponent(e)}`)},patchConfigOwner(e,t){return m(`/api/storage/config/${encodeURIComponent(e)}`,{method:"PATCH",body:JSON.stringify(t??{})})},fetchStateOwner(e){return m(`/api/storage/state/${encodeURIComponent(e)}`)},patchStateOwner(e,t){return m(`/api/storage/state/${encodeURIComponent(e)}`,{method:"PATCH",body:JSON.stringify(t??{})})},validateBinary(e){return m("/api/storage/binaries/validate",{method:"POST",body:JSON.stringify({path:e})})},fetchSpeechCapabilities(){return m("/api/speech/capabilities")},transcribeAudio(e){return m("/api/speech/transcribe",{method:"POST",body:JSON.stringify(e)})},synthesizeSpeech(e){return m("/api/speech/synthesize",{method:"POST",body:JSON.stringify(e)})},synthesizeSpeechStream(e,t){return pi("/api/speech/synthesize/stream",{method:"POST",body:JSON.stringify(e),signal:t})},listFileSystem(e,t){const n=new URLSearchParams;e&&e!=="."&&n.set("path",e),(t==null?void 0:t.includeFiles)!==void 0&&n.set("includeFiles",String(t.includeFiles));const r=n.toString();return m(r?`/api/filesystem?${r}`:"/api/filesystem")},createFileSystemFolder(e,t){return m("/api/filesystem/folders",{method:"POST",body:JSON.stringify({parentPath:e,name:t})})},readInstanceData(e){return m(`/api/storage/instances/${encodeURIComponent(e)}`)},writeInstanceData(e,t){return m(`/api/storage/instances/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify(t)})},deleteInstanceData(e){return m(`/api/storage/instances/${encodeURIComponent(e)}`,{method:"DELETE"})},listBackgroundProcesses(e){return m(`/workspaces/${encodeURIComponent(e)}/plugin/background-processes`)},stopBackgroundProcess(e,t){return m(`/workspaces/${encodeURIComponent(e)}/plugin/background-processes/${encodeURIComponent(t)}/stop`,{method:"POST"})},terminateBackgroundProcess(e,t){return m(`/workspaces/${encodeURIComponent(e)}/plugin/background-processes/${encodeURIComponent(t)}/terminate`,{method:"POST"})},updateVoiceMode(e,t){const n=Pt();return m(`/workspaces/${encodeURIComponent(e)}/plugin/voice-mode`,{method:"POST",body:JSON.stringify({...n,enabled:t})})},sendClientConnectionPong(e){return m("/api/client-connections/pong",{method:"POST",body:JSON.stringify(e)})},fetchBackgroundProcessOutput(e,t,n){const r=new URLSearchParams;n!=null&&n.method&&r.set("method",n.method),n!=null&&n.pattern&&r.set("pattern",n.pattern),n!=null&&n.lines&&r.set("lines",String(n.lines)),(n==null?void 0:n.maxBytes)!==void 0&&r.set("maxBytes",String(n.maxBytes));const o=r.toString(),s=o?`?${o}`:"";return m(`/workspaces/${encodeURIComponent(e)}/plugin/background-processes/${encodeURIComponent(t)}/output${s}`)},connectEvents(e,t,n){const r=Pt(),o=mi(r);je.info(`Connecting to ${o}`);const s=new EventSource(o,{withCredentials:!0});return s.onmessage=i=>{try{const a=JSON.parse(i.data);e(a)}catch(a){je.error("Failed to parse event",a)}},s.onerror=()=>{je.warn("EventSource error, closing stream"),t==null||t()},s.addEventListener("codenomad.client.ping",i=>{try{const a=i.data?JSON.parse(i.data):{};n==null||n(a)}catch(a){je.error("Failed to parse ping event",a)}}),s}};function mi(e){const t=new URL(Ct,typeof window<"u"?window.location.origin:"http://localhost");return t.searchParams.set("clientId",e.clientId),t.searchParams.set("connectionId",e.connectionId),Ct.startsWith("http://")||Ct.startsWith("https://")?t.toString():`${t.pathname}${t.search}`}const mn=1e3,yi=1e4,Dt=ie("sse");function Ve(e,t){if(t){Dt.info(e,t);return}Dt.info(e)}class bi{constructor(){this.handlers=new Map,this.openHandlers=new Set,this.source=null,this.retryDelay=mn,this.connect()}connect(){this.source&&this.source.close(),Ve("Connecting to backend events stream"),this.source=_.connectEvents(t=>this.dispatch(t),()=>this.scheduleReconnect(),t=>{_.sendClientConnectionPong({...Pt(),pingTs:t.ts}).catch(n=>{Dt.error("Failed to send client connection pong",n)})}),this.source.onopen=()=>{Ve("Events stream connected"),this.retryDelay=mn,this.openHandlers.forEach(t=>t())}}scheduleReconnect(){this.source&&(this.source.close(),this.source=null),Ve("Events stream disconnected, scheduling reconnect",{delayMs:this.retryDelay}),setTimeout(()=>{this.retryDelay=Math.min(this.retryDelay*2,yi),this.connect()},this.retryDelay)}dispatch(t){var n,r;Ve(`event ${t.type}`),(n=this.handlers.get("*"))==null||n.forEach(o=>o(t)),(r=this.handlers.get(t.type))==null||r.forEach(o=>o(t))}on(t,n){this.handlers.has(t)||this.handlers.set(t,new Set);const r=this.handlers.get(t);return r.add(n),()=>r.delete(n)}onOpen(t){return this.openHandlers.add(t),()=>this.openHandlers.delete(t)}}const St=new bi,wi=ie("actions"),yn={messageHistory:[],agentModelSelections:{}};function bn(e,t){if(e===t)return!0;if(typeof e=="object"&&e!==null&&typeof t=="object"&&t!==null)try{return JSON.stringify(e)===JSON.stringify(t)}catch(n){wi.warn("Failed to compare config objects",n)}return!1}class Ci{constructor(){this.configOwnerCache=new Map,this.stateOwnerCache=new Map,this.configOwnerLoadPromises=new Map,this.stateOwnerLoadPromises=new Map,this.configOwnerListeners=new Map,this.stateOwnerListeners=new Map,this.instanceDataCache=new Map,this.instanceDataListeners=new Map,this.instanceLoadPromises=new Map,St.on("storage.configChanged",t=>{t.type==="storage.configChanged"&&this.setOwnerCache("config",t.owner,t.value)}),St.on("storage.stateChanged",t=>{t.type==="storage.stateChanged"&&this.setOwnerCache("state",t.owner,t.value)}),St.on("instance.dataChanged",t=>{t.type==="instance.dataChanged"&&this.setInstanceDataCache(t.instanceId,t.data)})}async loadConfigOwner(t){const n=this.configOwnerCache.get(t);if(n)return n;if(!this.configOwnerLoadPromises.has(t)){const r=_.fetchConfigOwner(t).then(o=>(this.setOwnerCache("config",t,o),o)).finally(()=>{this.configOwnerLoadPromises.delete(t)});this.configOwnerLoadPromises.set(t,r)}return this.configOwnerLoadPromises.get(t)}async patchConfigOwner(t,n){const r=await _.patchConfigOwner(t,n);return this.setOwnerCache("config",t,r),r}async loadStateOwner(t){const n=this.stateOwnerCache.get(t);if(n)return n;if(!this.stateOwnerLoadPromises.has(t)){const r=_.fetchStateOwner(t).then(o=>(this.setOwnerCache("state",t,o),o)).finally(()=>{this.stateOwnerLoadPromises.delete(t)});this.stateOwnerLoadPromises.set(t,r)}return this.stateOwnerLoadPromises.get(t)}async patchStateOwner(t,n){const r=await _.patchStateOwner(t,n);return this.setOwnerCache("state",t,r),r}async loadInstanceData(t){const n=this.instanceDataCache.get(t);if(n)return n;if(!this.instanceLoadPromises.has(t)){const r=_.readInstanceData(t).then(o=>{const s=this.normalizeInstanceData(o);return this.setInstanceDataCache(t,s),s}).finally(()=>{this.instanceLoadPromises.delete(t)});this.instanceLoadPromises.set(t,r)}return this.instanceLoadPromises.get(t)}async saveInstanceData(t,n){const r=this.normalizeInstanceData(n);await _.writeInstanceData(t,r),this.setInstanceDataCache(t,r)}async deleteInstanceData(t){await _.deleteInstanceData(t),this.setInstanceDataCache(t,yn)}onConfigOwnerChanged(t,n){this.configOwnerListeners.has(t)||this.configOwnerListeners.set(t,new Set);const r=this.configOwnerListeners.get(t);r.add(n);const o=this.configOwnerCache.get(t);return o&&n(o),()=>{r.delete(n),r.size===0&&this.configOwnerListeners.delete(t)}}onStateOwnerChanged(t,n){this.stateOwnerListeners.has(t)||this.stateOwnerListeners.set(t,new Set);const r=this.stateOwnerListeners.get(t);r.add(n);const o=this.stateOwnerCache.get(t);return o&&n(o),()=>{r.delete(n),r.size===0&&this.stateOwnerListeners.delete(t)}}onInstanceDataChanged(t,n){this.instanceDataListeners.has(t)||this.instanceDataListeners.set(t,new Set);const r=this.instanceDataListeners.get(t);r.add(n);const o=this.instanceDataCache.get(t);return o&&n(o),()=>{r.delete(n),r.size===0&&this.instanceDataListeners.delete(t)}}setOwnerCache(t,n,r){if(n==="*"){t==="config"?this.configOwnerCache.clear():this.stateOwnerCache.clear();return}const o=t==="config"?this.configOwnerCache:this.stateOwnerCache,s=t==="config"?this.configOwnerListeners:this.stateOwnerListeners,i=o.get(n);if(i&&bn(i,r)){o.set(n,r);return}o.set(n,r);const a=s.get(n);if(a)for(const c of a)c(r)}normalizeInstanceData(t){const n=t??yn,r=Array.isArray(n.messageHistory)?[...n.messageHistory]:[],o={...n.agentModelSelections??{}};return{...n,messageHistory:r,agentModelSelections:o}}setInstanceDataCache(t,n){const r=this.normalizeInstanceData(n),o=this.instanceDataCache.get(t);if(o&&bn(o,r)){this.instanceDataCache.set(t,r);return}this.instanceDataCache.set(t,r),this.notifyInstanceDataChanged(t,r)}notifyInstanceDataChanged(t,n){const r=this.instanceDataListeners.get(t);if(r)for(const o of r)o(n)}}const R=new Ci,ur=ie("api"),lt={messageHistory:[],agentModelSelections:{}},[Kt,dr]=k(new Map),We=new Map,Se=new Map;function fr(e){const t=e??lt;return{...t,messageHistory:Array.isArray(t.messageHistory)?[...t.messageHistory]:[],agentModelSelections:{...t.agentModelSelections??{}}}}function wn(e){if(Se.has(e))return;const t=R.onInstanceDataChanged(e,n=>{Qe(e,n)});Se.set(e,t)}function Si(e){const t=Se.get(e);t&&(t(),Se.delete(e))}function Qe(e,t){dr(n=>{const r=new Map(n);return r.set(e,fr(t)),r})}async function ut(e){if(!e||Kt().has(e))return;if(We.has(e)){await We.get(e);return}const t=R.loadInstanceData(e).then(n=>{Qe(e,n),wn(e)}).catch(n=>{ur.warn("Failed to load instance data",n),Qe(e,lt),wn(e)}).finally(()=>{We.delete(e)});We.set(e,t),await t}async function hr(e,t){if(!e)return;await ut(e);const n=Kt().get(e)??lt,r=fr(n);t(r);try{await R.saveInstanceData(e,r)}catch(o){ur.warn("Failed to persist instance data",o)}Qe(e,r)}function gr(e){return Kt().get(e)??lt}function xi(e){dr(t=>{if(!t.has(e))return t;const n=new Map(t);return n.delete(e),n}),Si(e)}const Oi=xe(),vi={getInstanceConfig:gr,ensureInstanceConfig:ut,updateInstanceConfig:hr,clearInstanceConfig:xi},gc=e=>(be(()=>{for(const t of Se.values())t();Se.clear()}),te(Oi.Provider,{value:vi,get children(){return e.children}})),ki=ie("api"),[Cn,Lt]=k(null),[pc,Sn]=k(!1),[mc,qe]=k(null);let ve=null;async function $i(e=!1){return!e&&Cn()?Cn():ve||(Sn(!0),qe(null),ve=_.fetchSpeechCapabilities().then(t=>(Lt(t),qe(null),t)).catch(t=>(ki.error("Failed to load speech capabilities",t),Lt(null),qe(t instanceof Error?t.message:String(t)),null)).finally(()=>{Sn(!1),ve=null}),ve)}function Ei(){Lt(null),qe(null)}const C=ie("actions"),Ai=20,Ii=5,Ti=50,S={showThinkingBlocks:!1,showKeyboardShortcutHints:!0,thinkingBlocksExpansion:"expanded",showTimelineTools:!0,promptSubmitOnEnter:!1,showPromptVoiceInput:!0,diffViewMode:"split",toolOutputExpansion:"expanded",diagnosticsExpansion:"expanded",toolInputsVisibility:"collapsed",showUsageMetrics:!0,autoCleanupBlankSessions:!0,osNotificationsEnabled:!1,osNotificationsAllowWhenVisible:!1,notifyOnNeedsInput:!0,notifyOnIdle:!0},le={provider:"openai-compatible",sttModel:"gpt-4o-mini-transcribe",ttsModel:"gpt-4o-mini-tts",ttsVoice:"alloy",playbackMode:"streaming",ttsFormat:"mp3"};function pr(e){const t=e??{};return{showThinkingBlocks:t.showThinkingBlocks??S.showThinkingBlocks,showKeyboardShortcutHints:t.showKeyboardShortcutHints??S.showKeyboardShortcutHints,thinkingBlocksExpansion:t.thinkingBlocksExpansion??S.thinkingBlocksExpansion,showTimelineTools:t.showTimelineTools??S.showTimelineTools,promptSubmitOnEnter:t.promptSubmitOnEnter??S.promptSubmitOnEnter,showPromptVoiceInput:t.showPromptVoiceInput??S.showPromptVoiceInput,locale:t.locale??S.locale,diffViewMode:t.diffViewMode??S.diffViewMode,toolOutputExpansion:t.toolOutputExpansion??S.toolOutputExpansion,diagnosticsExpansion:t.diagnosticsExpansion??S.diagnosticsExpansion,toolInputsVisibility:t.toolInputsVisibility==="hidden"||t.toolInputsVisibility==="collapsed"||t.toolInputsVisibility==="expanded"?t.toolInputsVisibility:S.toolInputsVisibility,showUsageMetrics:t.showUsageMetrics??S.showUsageMetrics,autoCleanupBlankSessions:t.autoCleanupBlankSessions??S.autoCleanupBlankSessions,osNotificationsEnabled:t.osNotificationsEnabled??S.osNotificationsEnabled,osNotificationsAllowWhenVisible:t.osNotificationsAllowWhenVisible??S.osNotificationsAllowWhenVisible,notifyOnNeedsInput:t.notifyOnNeedsInput??S.notifyOnNeedsInput,notifyOnIdle:t.notifyOnIdle??S.notifyOnIdle}}function mr(e){if(!e||typeof e!="object"||Array.isArray(e))return{};const t={};for(const[n,r]of Object.entries(e))typeof r=="string"&&(t[n]=r);return t}function yr(e){const t=e??{};return{provider:t.provider==="openai-compatible"?t.provider:le.provider,apiKey:typeof t.apiKey=="string"&&t.apiKey.trim()?t.apiKey.trim():void 0,hasApiKey:t.hasApiKey===!0||typeof t.apiKey=="string"&&t.apiKey.trim().length>0,baseUrl:typeof t.baseUrl=="string"&&t.baseUrl.trim()?t.baseUrl.trim():void 0,sttModel:typeof t.sttModel=="string"&&t.sttModel.trim()?t.sttModel.trim():le.sttModel,ttsModel:typeof t.ttsModel=="string"&&t.ttsModel.trim()?t.ttsModel.trim():le.ttsModel,ttsVoice:typeof t.ttsVoice=="string"&&t.ttsVoice.trim()?t.ttsVoice.trim():le.ttsVoice,playbackMode:t.playbackMode==="buffered"||t.playbackMode==="streaming"?t.playbackMode:le.playbackMode,ttsFormat:t.ttsFormat==="wav"||t.ttsFormat==="opus"||t.ttsFormat==="aac"||t.ttsFormat==="mp3"?t.ttsFormat:le.ttsFormat}}function ze(e,t){if(!Array.isArray(e))return[];const n=[];for(const r of e){const o=t(r);o&&n.push(o)}return n}function Pi(e){var n,r,o;const t=e??{};return{recentFolders:ze(t.recentFolders,s=>{if(!s||typeof s!="object")return null;const i=s.path,a=s.lastAccessed;if(typeof i!="string")return null;const c=typeof a=="number"?a:Date.now();return{path:i,lastAccessed:c}}),opencodeBinaries:ze(t.opencodeBinaries,s=>{if(!s||typeof s!="object")return null;const i=s.path;if(typeof i!="string")return null;const a=typeof s.lastUsed=="number"?s.lastUsed:Date.now(),c=typeof s.version=="string"?s.version:void 0,u=typeof s.label=="string"?s.label:void 0;return{path:i,version:c,label:u,lastUsed:a}}),models:{recents:ze((n=t.models)==null?void 0:n.recents,s=>{if(!s||typeof s!="object")return null;const i=s.providerId,a=s.modelId;return typeof i!="string"||typeof a!="string"?null:{providerId:i,modelId:a}}),favorites:ze((r=t.models)==null?void 0:r.favorites,s=>{if(!s||typeof s!="object")return null;const i=s.providerId,a=s.modelId;return typeof i!="string"||typeof a!="string"?null:{providerId:i,modelId:a}}),thinkingSelections:mr((o=t.models)==null?void 0:o.thinkingSelections)}}}function Mi(e){const t=e??{},n=t.listeningMode==="all"?"all":"local",r=typeof t.opencodeBinary=="string"&&t.opencodeBinary.trim()?t.opencodeBinary:"opencode",o=mr(t.environmentVariables),s=yr(t.speech);return{listeningMode:n,opencodeBinary:r,environmentVariables:o,speech:s}}function br(e){return`${e.providerId}/${e.modelId}`}function wr(e,t){const n=t.filter(r=>r.path!==e);return n.unshift({path:e,lastAccessed:Date.now()}),n.slice(0,Ai)}function Ht(e,t,n){const r=Date.now(),o=n.find(i=>i.path===e);if(o){const i={...o,lastUsed:r,version:t??o.version},a=n.filter(c=>c.path!==e);return[i,...a]}return[t?{path:e,version:t,lastUsed:r}:{path:e,lastUsed:r},...n].slice(0,10)}const[Gt,et]=k({}),[Fi,tt]=k({}),[Di,nt]=k({}),[Cr,Ie]=k(!1),Li=$(()=>pr(Gt().settings)),Sr=$(()=>Gt().theme??"system"),ae=$(()=>Mi(Fi())),z=$(()=>Pi(Di())),P=Li,dt=$(()=>z().recentFolders),Ne=$(()=>z().opencodeBinaries);let Ke=null;async function ft(){Cr()||(Ke||(Ke=Promise.all([R.loadConfigOwner("ui"),R.loadConfigOwner("server"),R.loadStateOwner("ui")]).then(([e,t,n])=>{et(e),tt(t),nt(n),Ie(!0)}).catch(e=>{C.error("Failed to load settings",e),et({}),tt({}),nt({}),Ie(!0)}).finally(()=>{Ke=null})),await Ke)}async function X(e,t){await ft();const n=await R.patchConfigOwner(e,t);e==="ui"&&et(n),e==="server"&&tt(n)}async function K(e,t){await ft();const n=await R.patchStateOwner(e,t);nt(n)}function D(e){const t=Gt(),r={settings:pr({...t.settings??{},...e})};X("ui",r).catch(o=>C.error("Failed to patch ui settings",o))}function xr(e){D(e)}function Ni(e){Sr()!==e&&X("ui",{theme:e}).catch(t=>C.error("Failed to set theme",t))}async function Ri(e){ae().listeningMode!==e&&await X("server",{listeningMode:e})}function qt(e){X("server",{environmentVariables:e}).catch(t=>C.error("Failed to update environment variables",t))}function Bi(e,t){const n=ae().environmentVariables;qt({...n,[e]:t})}function Ui(e){const t=ae().environmentVariables,{[e]:n,...r}=t;qt(r)}function _i(e){const t=e&&e.trim().length>0?e:"opencode";X("server",{opencodeBinary:t}).catch(r=>C.error("Failed to set default binary",r));const n=Ht(t,void 0,Ne());K("ui",{opencodeBinaries:n}).catch(r=>C.error("Failed to update binary list",r))}async function ji(e){const t=e.apiKey,{apiKey:n,...r}=e,o=yr({...ae().speech,...r,...t===null?{}:{apiKey:t}}),{hasApiKey:s,...i}=o,a={...i,...t===null?{apiKey:null}:{}};try{await X("server",{speech:a})}catch(c){throw C.error("Failed to update speech settings",c),c}}function Vi(e,t){const n=Ht(e,t,Ne());K("ui",{opencodeBinaries:n}).catch(r=>C.error("Failed to add binary",r))}function Wi(e){const t=Ne().filter(n=>n.path!==e);K("ui",{opencodeBinaries:t}).catch(n=>C.error("Failed to remove binary",n)),ae().opencodeBinary===e&&X("server",{opencodeBinary:"opencode"}).catch(n=>C.error("Failed to reset default binary",n))}function zi(e){const t=wr(e,dt());K("ui",{recentFolders:t}).catch(n=>C.error("Failed to add recent folder",n))}function Ki(e){const t=dt().filter(n=>n.path!==e);K("ui",{recentFolders:t}).catch(n=>C.error("Failed to remove recent folder",n))}function Hi(e,t){const n=t&&t.trim().length>0?t:ae().opencodeBinary,r=wr(e,dt()),o=Ht(n,void 0,Ne());K("ui",{recentFolders:r,opencodeBinaries:o}).catch(s=>C.error("Failed to update ui state on launch",s)),X("server",{opencodeBinary:n}).catch(s=>C.error("Failed to persist selected binary",s))}function Gi(e){if(!e.providerId||!e.modelId)return;const n=z().models.recents.filter(o=>o.providerId!==e.providerId||o.modelId!==e.modelId),r=[e,...n].slice(0,Ii);K("ui",{models:{recents:r}}).catch(o=>C.error("Failed to update model recents",o))}function qi(e){return!e.providerId||!e.modelId?!1:z().models.favorites.some(t=>t.providerId===e.providerId&&t.modelId===e.modelId)}function Ji(e){if(!e.providerId||!e.modelId)return;const t=z().models.favorites,r=t.some(o=>o.providerId===e.providerId&&o.modelId===e.modelId)?t.filter(o=>o.providerId!==e.providerId||o.modelId!==e.modelId):[e,...t.filter(o=>o.providerId!==e.providerId||o.modelId!==e.modelId)].slice(0,Ti);K("ui",{models:{favorites:r}}).catch(o=>C.error("Failed to update model favorites",o))}function Xi(e){if(!(!e.providerId||!e.modelId))return z().models.thinkingSelections[br(e)]}function Yi(e,t){if(!e.providerId||!e.modelId)return;const n=br(e);if(z().models.thinkingSelections[n]===t)return;const o={...z().models.thinkingSelections};t?o[n]=t:delete o[n],K("ui",{models:{thinkingSelections:o}}).catch(s=>C.error("Failed to update thinking selection",s))}function Zi(e){P().diffViewMode!==e&&D({diffViewMode:e})}function Qi(e){P().toolOutputExpansion!==e&&D({toolOutputExpansion:e})}function ea(e){P().diagnosticsExpansion!==e&&D({diagnosticsExpansion:e})}function ta(e){P().toolInputsVisibility!==e&&D({toolInputsVisibility:e})}function na(e){P().thinkingBlocksExpansion!==e&&D({thinkingBlocksExpansion:e})}function ra(){D({showThinkingBlocks:!P().showThinkingBlocks})}function oa(){xr({showKeyboardShortcutHints:!P().showKeyboardShortcutHints})}function sa(){D({showTimelineTools:!P().showTimelineTools})}function ia(){D({showUsageMetrics:!P().showUsageMetrics})}function aa(){D({promptSubmitOnEnter:!P().promptSubmitOnEnter})}function ca(){D({showPromptVoiceInput:!P().showPromptVoiceInput})}function la(){const e=!P().autoCleanupBlankSessions;C.info("toggle auto cleanup",{value:e}),D({autoCleanupBlankSessions:e})}async function ua(e,t,n){!e||!t||!n.providerId||!n.modelId||(await ut(e),await hr(e,r=>{const o={...r.agentModelSelections??{}},s=o[t];s&&s.providerId===n.providerId&&s.modelId===n.modelId||(o[t]=n,r.agentModelSelections=o)}))}async function da(e,t){return!e||!t?void 0:(await ut(e),(gr(e).agentModelSelections??{})[t])}ft().catch(e=>{C.error("Failed to initialize settings",e)});const Or=xe(),fa={isLoaded:Cr,preferences:P,updatePreferences:xr,themePreference:Sr,setThemePreference:Ni,serverSettings:ae,setListeningMode:Ri,updateEnvironmentVariables:qt,addEnvironmentVariable:Bi,removeEnvironmentVariable:Ui,updateLastUsedBinary:_i,updateSpeechSettings:ji,recentFolders:dt,opencodeBinaries:Ne,uiState:z,addRecentFolder:zi,removeRecentFolder:Ki,addOpenCodeBinary:Vi,removeOpenCodeBinary:Wi,recordWorkspaceLaunch:Hi,addRecentModelPreference:Gi,isFavoriteModelPreference:qi,toggleFavoriteModelPreference:Ji,getModelThinkingSelection:Xi,setModelThinkingSelection:Yi,toggleShowThinkingBlocks:ra,toggleKeyboardShortcutHints:oa,toggleShowTimelineTools:sa,toggleUsageMetrics:ia,toggleAutoCleanupBlankSessions:la,togglePromptSubmitOnEnter:aa,toggleShowPromptVoiceInput:ca,setDiffViewMode:Zi,setToolOutputExpansion:Qi,setDiagnosticsExpansion:ea,setThinkingBlocksExpansion:na,setToolInputsVisibility:ta,setAgentModelPreference:ua,getAgentModelPreference:da},yc=e=>(ot(()=>{ft().catch(o=>{C.error("Failed to initialize settings",o)});const t=R.onConfigOwnerChanged("ui",o=>{et(o),Ie(!0)}),n=R.onConfigOwnerChanged("server",o=>{tt(o),Ie(!0),Ei(),$i(!0)}),r=R.onStateOwnerChanged("ui",o=>{nt(o),Ie(!0)});return()=>{t(),n(),r()}}),te(Or.Provider,{value:fa,get children(){return e.children}}));function ha(){const e=Fe(Or);if(!e)throw new Error("useConfig must be used within ConfigProvider");return e}function ga(e,t,n){const r={};return Object.keys(e).forEach(o=>{r[o]=e[o].reduce((s,i)=>(i&&(n&&n[i]&&s.push(n[i]),s.push(t(i))),s),[]).join(" ")}),r}const pa=Symbol("solid-inspect"),ma=xe();function ya(e){function t(n){var r;return(r=Fe(ma))!=null&&r.enabled?{Component:t,props:n,$INSPECT:pa}:e(n)}return Object.defineProperty(t,"name",{value:e.name}),t.toString=e.toString,t}function vr(){return function(e){function t(a){const c=!!e.slotClasses,u=()=>{if(!e.slotClasses)throw new Error("'slotClasses' option is not defined");if(!e.utilityClass)throw new Error("'utilityClass' option is not defined");return ga(e.slotClasses(a),e.utilityClass,a.classes??"")},l=po({});return c&&Br(()=>{const d=u();fe(()=>{for(const f in d)l[f]=d[f]})}),l}function n(a){const[c,u]=rt(a,e.selfPropNames);return{allProps:a,props:c,otherProps:u}}function r(a){return os({propDefaults:a.propDefaults||e.propDefaults,props:a.props,name:e.name})}function o(a){const c=r({props:a});return n(c)}function s(a,c=!0){return a=ya(a),a.toString=()=>`.${e.name}-root`,c&&ir(a,"base"),a}function i(a){const c=s(function(l){const{allProps:d,otherProps:f,props:g}=o(l),p=e.autoCallUseClasses??!0?t(d):{};return a({allProps:d,otherProps:f,props:g,classes:p})});return Object.defineProperty(c,"name",{value:a.name}),c}return{name:e.name,selfPropNames:e.selfPropNames,component:i,defineComponent:s,useClasses:t,useThemeProps:r,useProps:o,splitInProps:n}}}const ba=vr()({name:"MuiGlobalStyles",selfPropNames:["styles"]}),wa=ba.component(function({props:t}){return er(()=>({"@global":t.styles||{}})),[]}),Ca=vr()({name:"MuiCssBaseline",selfPropNames:["children","enableColorScheme"],propDefaults:({set:e})=>e({enableColorScheme:!1})}),Sa=(e,t)=>({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...t&&{colorScheme:e.palette.mode}}),xa=e=>({color:e.palette.text.primary,...e.typography.body1,backgroundColor:e.palette.background.default,"@media print":{backgroundColor:e.palette.common.white}}),Oa=(e,t=!1)=>({html:Sa(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...xa(e),"&::backdrop":{backgroundColor:e.palette.background.default}}}),va=Ca.component(function({props:t}){const n=Kn();return te(wa,{get styles(){return Oa(n,t.enableColorScheme)}})}),kr=xe();function xn(e){if(!(typeof document>"u")){if(e==="system"){document.documentElement.removeAttribute("data-theme");return}document.documentElement.setAttribute("data-theme",e)}}const ka={backgroundDefault:"#ffffff",backgroundPaper:"#f5f5f5",primary:"#0066ff",primaryContrast:"#ffffff",textPrimary:"#1a1a1a",textSecondary:"#666666",divider:"#e0e0e0"},$a={backgroundDefault:"#1a1a1a",backgroundPaper:"#2a2a2a",primary:"#0080ff",primaryContrast:"#1a1a1a",textPrimary:"#cfd4dc",textSecondary:"#999999",divider:"#3a3a3a"},Y=(e,t,n)=>{if(!n)return t;const r=n.getPropertyValue(e);return r&&r.trim()||t},Ea=e=>{const t=e?$a:ka,n=typeof window<"u"?getComputedStyle(document.documentElement):null;return{backgroundDefault:Y("--surface-base",t.backgroundDefault,n),backgroundPaper:Y("--surface-secondary",t.backgroundPaper,n),primary:Y("--accent-primary",t.primary,n),primaryContrast:Y("--text-inverted",t.primaryContrast,n),textPrimary:Y("--text-primary",t.textPrimary,n),textSecondary:Y("--text-secondary",t.textSecondary,n),divider:Y("--border-base",t.divider,n)}};function bc(e){const t=typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)"):null,{themePreference:n,setThemePreference:r}=ha(),[o,s]=k(!0),[i,a]=k(0),c=()=>n(),u=()=>{const p=c();return p==="dark"?!0:p==="light"?!1:(t==null?void 0:t.matches)??!1},l=()=>{const p=c(),b=u();xn(p==="system"?"system":p),s(b),typeof window<"u"?requestAnimationFrame(()=>a(y=>y+1)):a(y=>y+1)};ee(()=>{l()}),ot(()=>{if(!t)return;const p=()=>{l()};return t.addEventListener("change",p),()=>{t.removeEventListener("change",p)}});const d=p=>{r(p)},f=()=>{const p=c();d(p==="system"?"light":p==="light"?"dark":"system")},g=$(()=>{i();const p=Ea(o());return Vn({palette:{mode:o()?"dark":"light",primary:{main:p.primary,contrastText:p.primaryContrast},secondary:{main:p.primary},background:{default:p.backgroundDefault,paper:p.backgroundPaper},text:{primary:p.textPrimary,secondary:p.textSecondary},divider:p.divider},typography:{fontFamily:"var(--font-family-sans)"},shape:{borderRadius:8},components:{MuiIconButton:{styleOverrides:{root:{color:"inherit","&.Mui-disabled":{color:"var(--text-muted)",opacity:.55}}}},MuiDrawer:{styleOverrides:{paper:{backgroundColor:"var(--surface-secondary)",color:"var(--text-primary)"}}},MuiAppBar:{styleOverrides:{root:{backgroundColor:"var(--surface-secondary)",color:"var(--text-primary)",boxShadow:"none",borderBottom:"1px solid var(--border-base)",zIndex:10}}},MuiToolbar:{styleOverrides:{root:{minHeight:"56px"}}}}})});return te(kr.Provider,{value:{isDark:o,themeMode:c,setThemeMode:d,cycleThemeMode:f},get children(){return te(ss,{get theme(){return g()},get children(){return[te(va,{}),qr(()=>e.children)]}})}})}function $r(){const e=Fe(kr);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}const Aa="0.52.2",Nt=`https://cdn.jsdelivr.net/npm/monaco-editor@${Aa}/min/vs`,N="/monaco/vs";let He=null;function Ia(e,t){return new Promise((n,r)=>{const o=setTimeout(()=>r(new Error("timeout")),t);e.then(s=>{clearTimeout(o),n(s)}).catch(s=>{clearTimeout(o),r(s)})})}async function Ta(){if(typeof fetch>"u")return!1;try{const e=new AbortController,t=fetch(`${Nt}/loader.js`,{method:"HEAD",signal:e.signal}),n=await Ia(t,1200);return e.abort(),n.ok}catch{return!1}}function Pa(){return typeof document>"u"||document.querySelector('script[data-monaco-loader="true"]')?Promise.resolve():new Promise((t,n)=>{const r=document.createElement("script");r.dataset.monacoLoader="true",r.src=`${N}/loader.js`,r.async=!0,r.onload=()=>t(),r.onerror=()=>n(new Error("Failed to load Monaco AMD loader")),document.head.appendChild(r)})}function Ma(){if(typeof document>"u"||document.querySelector('link[data-monaco-editor-css="true"]'))return;const t=document.createElement("link");t.rel="stylesheet",t.href=`${N}/editor/editor.main.css`,t.dataset.monacoEditorCss="true",document.head.appendChild(t)}function Fa(){const e=globalThis,t=e.MonacoEnvironment??{},n="/monaco.worker.js";e.MonacoEnvironment={...t,getWorkerUrl(r,o){return n}}}function Er(){const e=globalThis.require;if(!e)throw new Error("Monaco AMD loader is not available");return e}function Da(){const t=Er().config;if(!t)throw new Error("require.config is not available");return t}function Rt(e){const t=Er();return new Promise((n,r)=>{t(e,(...o)=>n(o),o=>r(o))})}function La(e){const t=String(e||"plaintext");return!t||t==="plaintext"?null:t==="typescript"||t==="javascript"?"vs/language/typescript/monaco.contribution":t==="json"?"vs/language/json/monaco.contribution":t==="css"||t==="scss"||t==="less"?"vs/language/css/monaco.contribution":t==="html"?"vs/language/html/monaco.contribution":t==="toml"?"vs/basic-languages/toml/toml":`vs/basic-languages/${t}/${t}`}const On=new Set,xt=new Map;async function Ar(e){const t=La(e);if(!t||On.has(t))return;const n=xt.get(t);if(n)return n;const r=(async()=>{let o=!1;try{await Rt([t]),o=!0}catch{}finally{o&&On.add(t),xt.delete(t)}})();return xt.set(t,r),r}async function Ir(){return He||(He=(async()=>{await Pa(),Fa(),Ma();const e=await Ta(),t=Da(),n={vs:N};e&&(n["vs/basic-languages"]=`${Nt}/basic-languages`,n["vs/language"]=`${Nt}/language`,n["vs/basic-languages/python"]=`${N}/basic-languages/python`,n["vs/basic-languages/markdown"]=`${N}/basic-languages/markdown`,n["vs/basic-languages/cpp"]=`${N}/basic-languages/cpp`,n["vs/basic-languages/kotlin"]=`${N}/basic-languages/kotlin`,n["vs/language/typescript"]=`${N}/language/typescript`,n["vs/language/html"]=`${N}/language/html`,n["vs/language/json"]=`${N}/language/json`,n["vs/language/css"]=`${N}/language/css`),t({paths:n,ignoreDuplicateModules:["vs/editor/editor.main"]});const[r]=await Rt(["vs/editor/editor.main"]);return await Rt(["vs/basic-languages/monaco.contribution"]).catch(()=>[]),globalThis.monaco??r})(),He)}const Na=5,q=new Map;function Ra(e,t){q.delete(e),q.set(e,t)}function Ba(){for(;q.size>Na;){const e=q.keys().next().value;if(!e)return;const t=q.get(e);q.delete(e);try{t==null||t.model.dispose()}catch{}}}function Bt(e){const t=q.get(e.cacheKey);if(t)return Ra(e.cacheKey,t),t.model.getValue()!==e.value&&t.model.setValue(e.value),t.model;const n=e.monaco.Uri.parse(`opencode://model/${encodeURIComponent(e.cacheKey)}`),r=e.monaco.editor.createModel(e.value,"plaintext",n),o={model:r};return q.set(e.cacheKey,o),Ba(),r}let Ge=null;function Ua(e){var o;if(Ge)return Ge;const t=new Map,n=new Map,r=typeof((o=e==null?void 0:e.languages)==null?void 0:o.getLanguages)=="function"?e.languages.getLanguages():[];if(Array.isArray(r))for(const s of r){const i=typeof(s==null?void 0:s.id)=="string"?s.id:null;if(!i)continue;const a=Array.isArray(s==null?void 0:s.filenames)?s.filenames:[];for(const u of a)typeof u=="string"&&(t.has(u)||t.set(u,i));const c=Array.isArray(s==null?void 0:s.extensions)?s.extensions:[];for(const u of c)typeof u=="string"&&(n.has(u)||n.set(u,i))}return Ge={fileNameToId:t,extToId:n},Ge}function _a(e){return e===".gitignore"||e===".gitattributes"||e===".gitmodules"||e==="Makefile"||e.startsWith("Makefile.")?"shell":null}function Tr(e,t){const n=String(t||"").trim(),r=n.split("/").pop()||n,o=_a(r);if(o)return o;const s=Ua(e),i=s.fileNameToId.get(r);if(i)return i;const a=r.lastIndexOf(".");if(a>0){const c=r.slice(a),u=s.extToId.get(c);if(u)return u}return"plaintext"}var ja=An("<div class=monaco-viewer>");function Va(e){const{isDark:t}=$r();let n,r=null,o=null;const[s,i]=k(!1),a=()=>{try{r==null||r.setModel(null)}catch{}try{r==null||r.dispose()}catch{}r=null};return ot(()=>{let c=!1;(async()=>(o=await Ir(),!c&&(!n||!o||(o.editor.setTheme(t()?"vs-dark":"vs"),r=o.editor.createDiffEditor(n,{readOnly:!0,automaticLayout:!0,renderSideBySide:!0,renderSideBySideInlineBreakpoint:0,renderMarginRevertIcon:!1,minimap:{enabled:!1},scrollBeyondLastLine:!1,renderWhitespace:"selection",fontSize:13,wordWrap:e.wordWrap==="on"?"on":"off",glyphMargin:!1,folding:!1,lineNumbersMinChars:4,lineDecorationsWidth:12,diffAlgorithm:"legacy",maxComputationTime:1e4}),i(!0)))))(),be(()=>{c=!0,i(!1),a()})}),ee(()=>{!s()||!o||!r||o.editor.setTheme(t()?"vs-dark":"vs")}),ee(()=>{var d,f,g,p,b,y;if(!s()||!o||!r)return;const c=e.viewMode==="unified"?"unified":"split",u=e.contextMode==="collapsed"?"collapsed":"expanded",l=e.wordWrap==="on"?"on":"off";r.updateOptions({renderSideBySide:c==="split",renderSideBySideInlineBreakpoint:0,hideUnchangedRegions:u==="collapsed"?{enabled:!0}:{enabled:!1},wordWrap:l});try{(g=(f=(d=r.getOriginalEditor)==null?void 0:d.call(r))==null?void 0:f.updateOptions)==null||g.call(f,{wordWrap:l})}catch{}try{(y=(b=(p=r.getModifiedEditor)==null?void 0:p.call(r))==null?void 0:b.updateOptions)==null||y.call(b,{wordWrap:l})}catch{}}),ee(()=>{if(!s()||!o||!r)return;const c=Tr(o,e.path),u=`${e.scopeKey}:diff:${e.path}:before`,l=`${e.scopeKey}:diff:${e.path}:after`,d=Bt({monaco:o,cacheKey:u,value:e.before}),f=Bt({monaco:o,cacheKey:l,value:e.after});r.setModel({original:d,modified:f}),Ar(c).then(()=>{try{o.editor.setModelLanguage(d,c),o.editor.setModelLanguage(f,c)}catch{}})}),(()=>{var c=ja(),u=n;return typeof u=="function"?Ut(u,c):n=c,c})()}const wc=Object.freeze(Object.defineProperty({__proto__:null,MonacoDiffViewer:Va},Symbol.toStringTag,{value:"Module"}));var Wa=An("<div class=monaco-viewer>");function za(e){const{isDark:t}=$r();let n,r=null,o=null;const[s,i]=k(!1),a=()=>{try{r==null||r.setModel(null)}catch{}try{r==null||r.dispose()}catch{}r=null},c=()=>{!r||!e.onSave||e.onSave(r.getValue())};return ot(()=>{let u=!1;(async()=>(o=await Ir(),!u&&(!n||!o||(o.editor.setTheme(t()?"vs-dark":"vs"),r=o.editor.create(n,{value:"",language:"plaintext",readOnly:!1,automaticLayout:!0,lineNumbers:"on",minimap:{enabled:!1},scrollBeyondLastLine:!1,wordWrap:"off",renderWhitespace:"selection",fontSize:13}),r.addCommand(o.KeyMod.CtrlCmd|o.KeyCode.KeyS,c),r.onDidChangeModelContent(()=>{e.onContentChange&&e.onContentChange(r.getValue())}),i(!0)))))(),be(()=>{u=!0,i(!1),a()})}),ee(()=>{!s()||!o||!r||o.editor.setTheme(t()?"vs-dark":"vs")}),ee(()=>{if(!s()||!o||!r)return;const u=Tr(o,e.path),l=`${e.scopeKey}:file:${e.path}`,d=Bt({monaco:o,cacheKey:l,value:e.content});r.setModel(d),Ar(u).then(()=>{try{o.editor.setModelLanguage(d,u)}catch{}})}),(()=>{var u=Wa(),l=n;return typeof l=="function"?Ut(l,u):n=u,u})()}const Cc=Object.freeze(Object.defineProperty({__proto__:null,MonacoFileViewer:za},Symbol.toStringTag,{value:"Module"}));export{hc as $,Xi as A,P as B,fc as C,Za as D,ut as E,dc as F,nc as G,vr as H,Ws as I,oc as J,lc as K,Hs as L,sr as M,rc as N,ic as O,Ya as P,bs as Q,ac as R,sc as S,uc as T,po as U,cc as V,Co as W,wo as X,$r as Y,gr as Z,hr as _,Qr as a,Ji as a0,Yi as a1,Ri as a2,pc as a3,mc as a4,R as a5,Ja as a6,gc as a7,bc as a8,yc as a9,wc as aa,Cc as ab,In as b,Qa as c,Ot as d,Kn as e,Xr as f,Xa as g,_ as h,vt as i,eo as j,ie as k,ha as l,qr as m,St as n,da as o,tc as p,z as q,ec as r,no as s,An as t,Ut as u,$i as v,Cn as w,ae as x,ua as y,Gi as z};
@@ -1 +1 @@
1
- import{t as u,i as d,d as $,a as S}from"./monaco-viewer-DK-6pkvP.js";import{n as f,S as A,a as b,F as w}from"./git-diff-vendor-CAv-4upN.js";import{r as F}from"./main-JkDQRHSo.js";import{t as i,u as z}from"./index-DNAppyAC.js";var P=u("<div class=tool-call-todo-empty>"),R=u("<div class=tool-call-todo-region><div class=tool-call-todos role=list>"),k=u("<span>"),B=u("<div class=tool-call-todo-item role=listitem><span class=tool-call-todo-checkbox></span><div class=tool-call-todo-body><div class=tool-call-todo-heading><span class=tool-call-todo-text>");function E(t){return t==="completed"||t==="in_progress"||t==="cancelled"?t:"pending"}function y(t){if(!t)return[];const{metadata:e}=F(t),o=Array.isArray(e.todos)?e.todos:[],m=[];for(let n=0;n<o.length;n++){const r=o[n],s=typeof(r==null?void 0:r.content)=="string"?r.content.trim():"";if(!s)continue;const c=E(r.status),a=typeof(r==null?void 0:r.id)=="string"&&r.id.length>0?r.id:`${n}-${s}`;m.push({id:a,content:s,status:c})}return m}function T(t){return t.reduce((e,o)=>(e.total+=1,e[o.status]=(e[o.status]||0)+1,e),{total:0,pending:0,in_progress:0,completed:0,cancelled:0})}function G(t,e){switch(e){case"completed":return t("toolCall.renderer.todo.status.completed");case"in_progress":return t("toolCall.renderer.todo.status.inProgress");case"cancelled":return t("toolCall.renderer.todo.status.cancelled");default:return t("toolCall.renderer.todo.status.pending")}}function I(t){const{t:e}=z(),o=y(t.state);return T(o).total===0?(()=>{var n=P();return d(n,()=>t.emptyLabel??e("toolCall.renderer.todo.empty")),n})():(()=>{var n=R(),r=n.firstChild;return d(r,f(w,{each:o,children:s=>{const c=G(e,s.status);return(()=>{var a=B(),g=a.firstChild,L=g.nextSibling,p=L.firstChild,x=p.firstChild;return $(g,"aria-label",c),d(x,()=>s.content),d(p,f(A,{get when(){return t.showStatusLabel!==!1},get children(){var l=k();return d(l,c),b(()=>S(l,`tool-call-todo-status tool-call-todo-status-${s.status}`)),l}}),null),b(l=>{var v=s.status==="completed",h=s.status==="cancelled",C=s.status==="in_progress",_=s.status;return v!==l.e&&a.classList.toggle("tool-call-todo-item-completed",l.e=v),h!==l.t&&a.classList.toggle("tool-call-todo-item-cancelled",l.t=h),C!==l.a&&a.classList.toggle("tool-call-todo-item-active",l.a=C),_!==l.o&&$(g,"data-status",l.o=_),l},{e:void 0,t:void 0,a:void 0,o:void 0}),a})()}})),n})()}function N(t){if(!t)return i("toolCall.renderer.todo.title.plan");const e=y(t);if(t.status!=="completed"||e.length===0)return i("toolCall.renderer.todo.title.plan");const o=T(e);return o.pending===o.total?i("toolCall.renderer.todo.title.creating"):o.completed===o.total?i("toolCall.renderer.todo.title.completing"):i("toolCall.renderer.todo.title.updating")}const H={tools:["todowrite","todoread"],getAction:()=>i("toolCall.renderer.action.planning"),getTitle({toolState:t}){return N(t())},renderBody({toolState:t}){const e=t();return e?f(I,{state:e}):null}};export{I as T,H as t};
1
+ import{t as u,i as d,d as $,a as S}from"./monaco-viewer-UU9TfOpS.js";import{n as f,S as A,a as b,F as w}from"./git-diff-vendor-CAv-4upN.js";import{r as F}from"./main-B3yZBpaS.js";import{t as i,u as z}from"./index-lhjxIgwf.js";var P=u("<div class=tool-call-todo-empty>"),R=u("<div class=tool-call-todo-region><div class=tool-call-todos role=list>"),k=u("<span>"),B=u("<div class=tool-call-todo-item role=listitem><span class=tool-call-todo-checkbox></span><div class=tool-call-todo-body><div class=tool-call-todo-heading><span class=tool-call-todo-text>");function E(t){return t==="completed"||t==="in_progress"||t==="cancelled"?t:"pending"}function y(t){if(!t)return[];const{metadata:e}=F(t),o=Array.isArray(e.todos)?e.todos:[],m=[];for(let n=0;n<o.length;n++){const r=o[n],s=typeof(r==null?void 0:r.content)=="string"?r.content.trim():"";if(!s)continue;const c=E(r.status),a=typeof(r==null?void 0:r.id)=="string"&&r.id.length>0?r.id:`${n}-${s}`;m.push({id:a,content:s,status:c})}return m}function T(t){return t.reduce((e,o)=>(e.total+=1,e[o.status]=(e[o.status]||0)+1,e),{total:0,pending:0,in_progress:0,completed:0,cancelled:0})}function G(t,e){switch(e){case"completed":return t("toolCall.renderer.todo.status.completed");case"in_progress":return t("toolCall.renderer.todo.status.inProgress");case"cancelled":return t("toolCall.renderer.todo.status.cancelled");default:return t("toolCall.renderer.todo.status.pending")}}function I(t){const{t:e}=z(),o=y(t.state);return T(o).total===0?(()=>{var n=P();return d(n,()=>t.emptyLabel??e("toolCall.renderer.todo.empty")),n})():(()=>{var n=R(),r=n.firstChild;return d(r,f(w,{each:o,children:s=>{const c=G(e,s.status);return(()=>{var a=B(),g=a.firstChild,L=g.nextSibling,p=L.firstChild,x=p.firstChild;return $(g,"aria-label",c),d(x,()=>s.content),d(p,f(A,{get when(){return t.showStatusLabel!==!1},get children(){var l=k();return d(l,c),b(()=>S(l,`tool-call-todo-status tool-call-todo-status-${s.status}`)),l}}),null),b(l=>{var v=s.status==="completed",h=s.status==="cancelled",C=s.status==="in_progress",_=s.status;return v!==l.e&&a.classList.toggle("tool-call-todo-item-completed",l.e=v),h!==l.t&&a.classList.toggle("tool-call-todo-item-cancelled",l.t=h),C!==l.a&&a.classList.toggle("tool-call-todo-item-active",l.a=C),_!==l.o&&$(g,"data-status",l.o=_),l},{e:void 0,t:void 0,a:void 0,o:void 0}),a})()}})),n})()}function N(t){if(!t)return i("toolCall.renderer.todo.title.plan");const e=y(t);if(t.status!=="completed"||e.length===0)return i("toolCall.renderer.todo.title.plan");const o=T(e);return o.pending===o.total?i("toolCall.renderer.todo.title.creating"):o.completed===o.total?i("toolCall.renderer.todo.title.completing"):i("toolCall.renderer.todo.title.updating")}const H={tools:["todowrite","todoread"],getAction:()=>i("toolCall.renderer.action.planning"),getTitle({toolState:t}){return N(t())},renderBody({toolState:t}){const e=t();return e?f(I,{state:e}):null}};export{I as T,H as t};