@visulima/vite-overlay 2.0.0-alpha.17 → 2.0.0-alpha.19

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 (3) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/index.js +13 -13
  3. package/package.json +17 -17
package/CHANGELOG.md CHANGED
@@ -1,3 +1,22 @@
1
+ ## @visulima/vite-overlay [2.0.0-alpha.19](https://github.com/visulima/visulima/compare/@visulima/vite-overlay@2.0.0-alpha.18...@visulima/vite-overlay@2.0.0-alpha.19) (2026-05-06)
2
+
3
+
4
+ ### Dependencies
5
+
6
+ * **@visulima/error:** upgraded to 6.0.0-alpha.17
7
+
8
+ ## @visulima/vite-overlay [2.0.0-alpha.18](https://github.com/visulima/visulima/compare/@visulima/vite-overlay@2.0.0-alpha.17...@visulima/vite-overlay@2.0.0-alpha.18) (2026-05-06)
9
+
10
+ ### Miscellaneous Chores
11
+
12
+ * **vite-overlay:** apply prettier and eslint quote-style auto-fix ([9778781](https://github.com/visulima/visulima/commit/9778781ec8e1542860cded3e7c05a3269345f5a3))
13
+ * **vite-overlay:** housekeeping cleanup ([de2491d](https://github.com/visulima/visulima/commit/de2491d209965aa66c0752a2f55263f0d335eadd))
14
+
15
+
16
+ ### Dependencies
17
+
18
+ * **@visulima/error:** upgraded to 6.0.0-alpha.16
19
+
1
20
  ## @visulima/vite-overlay [2.0.0-alpha.17](https://github.com/visulima/visulima/compare/@visulima/vite-overlay@2.0.0-alpha.16...@visulima/vite-overlay@2.0.0-alpha.17) (2026-05-04)
2
21
 
3
22
 
package/dist/index.js CHANGED
@@ -356,7 +356,7 @@ class ErrorOverlay extends HTMLElement {
356
356
  balloonCount: root.querySelector("#__v_o__balloon_count"),
357
357
  balloonGroup: root.querySelector("#__v_o__balloon_group"),
358
358
  balloonText: root.querySelector("#__v_o__balloon_text"),
359
- fileButton: root.querySelector("button[class*=\\"underline\\"]"),
359
+ fileButton: root.querySelector('button[class*="underline"]'),
360
360
  heading: root.querySelector("#__v_o__heading"),
361
361
  historyIndicator: root.querySelector("#__v_o__history_indicator"),
362
362
  historyLayerDepth: root.querySelector("#__v_o__history_layer_depth"),
@@ -557,7 +557,7 @@ class ErrorOverlay extends HTMLElement {
557
557
  ? \`\${currentError.originalFilePath}:\${currentError.originalFileLine}:\${currentError.originalFileColumn}\`
558
558
  : "Unknown location",
559
559
  currentError.message || "No error message available",
560
- ...codeFrame ? ["", codeFrame] : [],
560
+ ...(codeFrame ? ["", codeFrame] : []),
561
561
  "",
562
562
  "## Stack Trace",
563
563
  currentError.stack || "No stack trace available",
@@ -605,8 +605,8 @@ class ErrorOverlay extends HTMLElement {
605
605
  * @private
606
606
  */
607
607
  _initializeFocusTrap() {
608
- const FOCUSABLE_SELECTORS
609
- = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\\"-1\\"])";
608
+ const FOCUSABLE_SELECTORS =
609
+ 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
610
610
 
611
611
  this._addEventListener(this.root, "keydown", (event) => {
612
612
  if (event.key !== "Tab") {
@@ -760,8 +760,8 @@ class ErrorOverlay extends HTMLElement {
760
760
  const stackElement = stackHost && stackHost.querySelector("div:last-child");
761
761
 
762
762
  if (stackHost && stackElement) {
763
- const stackText
764
- = mode === "compiled"
763
+ const stackText =
764
+ mode === "compiled"
765
765
  ? String(currentError.compiledStack || this.__v_oPayload.compiledStack || currentError.stack || "")
766
766
  : String(currentError.originalStack || currentError.stack || this.__v_oPayload.originalStack || this.__v_oPayload.stack || "");
767
767
 
@@ -863,8 +863,8 @@ class ErrorOverlay extends HTMLElement {
863
863
  modeSwitch.classList.add("hidden");
864
864
  }
865
865
 
866
- const originalButton = this.root.querySelector("[data-flame-mode=\\"original\\"]");
867
- const compiledButton = this.root.querySelector("[data-flame-mode=\\"compiled\\"]");
866
+ const originalButton = this.root.querySelector('[data-flame-mode="original"]');
867
+ const compiledButton = this.root.querySelector('[data-flame-mode="compiled"]');
868
868
 
869
869
  if (originalButton) {
870
870
  originalButton.style.display = hasOriginal ? "" : "none";
@@ -879,7 +879,7 @@ class ErrorOverlay extends HTMLElement {
879
879
  return;
880
880
  }
881
881
 
882
- let codeFrame = "<div class=\\"no-code-frame font-mono py-4 px-5\\">No code frame could be generated.</div>";
882
+ let codeFrame = '<div class="no-code-frame font-mono py-4 px-5">No code frame could be generated.</div>';
883
883
 
884
884
  // Try current error's code frame first
885
885
  if (mode === "compiled" && currentError.compiledCodeFrameContent) {
@@ -1072,8 +1072,8 @@ class ErrorOverlay extends HTMLElement {
1072
1072
  const isDark = currentTheme === "dark";
1073
1073
 
1074
1074
  const rootElement = this.__elements?.root;
1075
- const darkButton = this.root.querySelector("[data-v-o-theme-click-value=\\"dark\\"]");
1076
- const lightButton = this.root.querySelector("[data-v-o-theme-click-value=\\"light\\"]");
1075
+ const darkButton = this.root.querySelector('[data-v-o-theme-click-value="dark"]');
1076
+ const lightButton = this.root.querySelector('[data-v-o-theme-click-value="light"]');
1077
1077
 
1078
1078
  if (isDark) {
1079
1079
  if (darkButton) {
@@ -1893,7 +1893,7 @@ ${Qs};`,s},"patchOverlay");var sa=Object.defineProperty,W=b((t,e)=>sa(t,"name",{
1893
1893
  `)}</ul>`;if(d){const h=r;[...qr].some(f=>h.includes(f))&&(p+=`Files in the \`public\` folder should be accessed via absolute URLs like \`/${h}\`.`)}return p},"findSimilarFiles"),xa=[{solution:{body:"Browser APIs like `window` and `document` are not available during server-side rendering. Use dynamic imports or check for SSR environment before using browser APIs.",header:"SSR Browser API Error"},test:W(t=>Q(t,"window is not defined","document is not defined"),"test")},{solution:{body:"Some plugins need specific ordering. Use `enforce: 'pre'` for plugins that need to run first, or `enforce: 'post'` for plugins that need to run last.",header:"Plugin Ordering Issue"},test:W(t=>Q(t,"Plugin ordering","enforce"),"test")},{solution:{body:"CSS Modules require proper configuration. Make sure your CSS files use the `.module.css` extension and are imported correctly.",header:"CSS Modules Configuration"},test:W(t=>Q(t,"CSS Modules","module.css"),"test")},{solution:{body:["Only variables prefixed with `VITE_` are exposed on `import.meta.env` to the client at build time.","Server-only variables should not be prefixed with `VITE_`.","- Do not use `process.env` in browser code; prefer `import.meta.env.*`","- Custom vars must be prefixed with `VITE_` to be exposed to client",'- For TS, add `/// <reference types="vite/client" />` for type-safe access'].join(`
1894
1894
  `),header:"Environment Variables"},test:W(t=>Q(t,"VITE_","process.env"),"test")},{solution:{body:"For static assets, use the `new URL('./path/to/asset', import.meta.url)` syntax or import them and use the returned URL.",header:"Asset Import Issue"},test:W(t=>Q(t,"Failed to load")&&Q(t,".png",".jpg",".svg"),"test")},{solution:{body:"Some issues only occur in production builds. Check if the error happens in development mode. You might need different configurations for build vs dev.",header:"Build vs Development Mode"},test:W(t=>Q(t,"production","build"),"test")},{solution:{body:"HMR issues can occur with certain patterns. Make sure you're not mutating module-level variables and consider using `import.meta.hot` guards.",header:"Hot Module Replacement Issue"},test:W(t=>Q(t,"HMR","hot reload"),"test")},{solution:{body:"Check your `tsconfig.json` and make sure it includes proper paths and compiler options. For Vite, you might need a `vite-env.d.ts` file.",header:"TypeScript Configuration"},test:W((t,e)=>Q(t,"TypeScript")||e?.endsWith(".ts"),"test")},{solution:{body:"Some dependencies need to be excluded from pre-bundling. Add them to `optimizeDeps.exclude` in your Vite config.",header:"Dependency Optimization"},test:W(t=>Q(t,"optimizeDeps","pre-bundling"),"test")},{solution:{body:"Configure path aliases in your Vite config using the `resolve.alias` option to match your TypeScript path mappings.",header:"Path Resolution"},test:W(t=>Q(t,"resolve.alias","Cannot find module"),"test")},{solution:{body:"Server middleware and proxy settings should be configured in the `server` section of your Vite config.",header:"Server Configuration"},test:W(t=>Q(t,"middleware","proxy"),"test")},{solution:{body:"Check your plugin configuration in `vite.config.js/ts`. Make sure all required options are provided and options are correctly typed.",header:"Plugin Configuration"},test:W(t=>Q(t,"plugin","configuration"),"test")},{solution:{body:"Configure your build output directory using `build.outDir` in your Vite config. Make sure the directory is writable.",header:"Build Output Configuration"},test:W(t=>Q(t,"build.outDir","dist"),"test")},{solution:{body:["Client and server rendered markup differ.","","Checklist:","- A server/client branch `if (typeof window !== 'undefined')`.","- Variable input such as `Date.now()` or `Math.random()` which changes each time it's called.","- Date formatting in a user's locale which doesn't match the server.","- External changing data without sending a snapshot of it along with the HTML.","- Invalid HTML tag nesting.","","It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.","","https://react.dev/link/hydration-mismatch"].join(`
1895
1895
  `)},test:W(t=>Q(t,"hydration failed","did not match","expected server html","text content does not match"),"test")}],ka=W(t=>({async handle(e,n){const{file:r,language:i}=n,o=e.message??"";if(Q(o,"Failed to resolve import","Cannot resolve module")){const s=o.match(aa),a=o.match(la),c=s?.[1]||a?.[1];if(c&&r){const l=ar(c,r,t);if(l)return{body:`The import path \`${c}\` could not be resolved.<br/><br/>Did you mean one of these files?<br/>${l}`};if([".jsx",".tsx"].includes(i)||Q(o,"react"))return{body:"Install and configure the React plugin. Add `@vitejs/plugin-react` to your dependencies and include it in your Vite config.",header:"Missing React Plugin"};if(i==="vue")return{body:"Install and configure the Vue plugin. Add `@vitejs/plugin-vue` to your dependencies and include it in your Vite config.",header:"Missing Vue Plugin"}}}if(Q(o,"Cannot resolve")&&(i==="typescript"||i==="javascript")){const s=o.match(ca);if(s){const a=s[1];if(a&&r){const c=ar(a,r,t);if(c)return{body:`Cannot resolve \`${a}\`. Did you mean one of these files?${c}`,header:"File Not Found"}}}return{body:"In Vite, you may need to include file extensions in imports, especially for TypeScript files. Try adding `.js` extension to your imports.",header:"Missing File Extension"}}for(const s of xa)if(s.test(o,r))return s.solution},name:"vite-solution-finder",priority:20}),"createViteSolutionFinder");var _a=Object.defineProperty,we=b((t,e)=>_a(t,"name",{value:e,configurable:!0}),"o$4");const $a=/\.mdx$/i,Ea=1,Sa=/syntax error/i,Ca=/Failed to load url\s+(.*?)\s+\(resolved id:/i,La=/glob:\s*"(.+)"\s*\(/i,Ta=we(t=>t instanceof Error?t:new Error(String(t)),"createEnhancedError"),Pa=we((t,e)=>{try{t.ssrFixStacktrace(e)}catch(n){console.warn("[visulima:vite-overlay:server] SSR stack trace fix failed:",n)}},"safeSsrFixStacktrace"),Ra=we(t=>{try{const e=Ne(t,{frameLimit:Ea})?.[0];return String(e?.file||t.loc?.file||t.id||"")}catch(e){console.warn("[visulima:vite-overlay:server] Stack trace parsing failed:",e);return}},"extractTopFileFromStack"),Fa=we(async t=>{try{return await Er(t,"utf8")}catch(e){console.warn(`[visulima:vite-overlay:server] Failed to read file ${t}:`,e);return}},"safeReadFile"),za=we((t,e)=>{const n=t.id||t.loc?.file||e;n&&$a.test(String(n))&&Sa.test(t.message)&&(t.hint=t.hint||"MDX detected without an appropriate integration. Install and configure the MDX plugin for Vite/your framework.")},"enhanceMdxError"),Nr=we((t,e)=>{const n=t.split(`
1896
- `),r=n.findIndex(o=>o.includes(e));if(r===-1)return;const i=n[r]||"";return{column:Math.max(0,i.indexOf(e))+1,line:r+1}},"findImportLocation"),Da=we(async(t,e,n)=>{const r=Ca.exec(t.message)?.[1];if(r&&(t.title="Failed to Load Module (SSR)",t.name="FailedToLoadModuleSSR",t.message=`Failed to load module: ${r}`,t.hint="Verify import path, ensure a plugin handles this file type during SSR, and check for typos or missing files.",n&&e)){const i=Nr(n,r);i&&(t.loc={...i,file:e})}},"enhanceFailedLoadError"),Aa=we(async(t,e,n)=>{const r=La.exec(t.message)?.[1];if(r&&(t.name="InvalidGlob",t.title="Invalid Glob Pattern",t.message=`Invalid glob pattern: ${r}`,t.hint=t.hint||"Ensure your glob follows the expected syntax and matches existing files. Avoid unintended special characters.",n&&e)){const i=Nr(n,r);i&&(t.loc={...i,file:e})}},"enhanceGlobError"),Ma=we(async(t,e)=>{const n=Ta(t);Pa(e,n);const r=Ra(n),i=r?await Fa(r):void 0;return await Da(n,r,i),za(n,r),await Aa(n,r,i),n},"enhanceViteSsrError");var Ia=Object.defineProperty,G=b((t,e)=>Ia(t,"name",{value:e,configurable:!0}),"t$1");const Ur={javascript:G(()=>import("@shikijs/langs/javascript"),"javascript"),typescript:G(()=>import("@shikijs/langs/typescript"),"typescript"),jsx:G(()=>import("@shikijs/langs/jsx"),"jsx"),tsx:G(()=>import("@shikijs/langs/tsx"),"tsx"),json:G(()=>import("@shikijs/langs/json"),"json"),jsonc:G(()=>import("@shikijs/langs/jsonc"),"jsonc"),xml:G(()=>import("@shikijs/langs/xml"),"xml"),sql:G(()=>import("@shikijs/langs/sql"),"sql"),markdown:G(()=>import("@shikijs/langs/markdown"),"markdown"),mdx:G(()=>import("@shikijs/langs/mdx"),"mdx"),html:G(()=>import("@shikijs/langs/html"),"html"),css:G(()=>import("@shikijs/langs/css"),"css"),scss:G(()=>import("@shikijs/langs/scss"),"scss"),less:G(()=>import("@shikijs/langs/less"),"less"),sass:G(()=>import("@shikijs/langs/sass"),"sass"),stylus:G(()=>import("@shikijs/langs/stylus"),"stylus"),styl:G(()=>import("@shikijs/langs/styl"),"styl"),svelte:G(()=>import("@shikijs/langs/svelte"),"svelte"),vue:G(()=>import("@shikijs/langs/vue"),"vue"),bash:G(()=>import("@shikijs/langs/bash"),"bash"),shell:G(()=>import("@shikijs/langs/shell"),"shell"),text:G(()=>Promise.resolve({name:"text",patterns:[],scopeName:"source.text",repository:{}}),"text")};G(async t=>{if(typeof t!="string"||!t)return;const e=Ur[t.toLowerCase()];if(e)return await e()},"getLanguageImport");var Ba=Object.defineProperty,Ge=b((t,e)=>Ba(t,"name",{value:e,configurable:!0}),"a$7");let ft,vt;const ja=Ge(async()=>{const[t,e]=await Promise.all([import("shiki/core"),import("shiki/engine/javascript")]),{createHighlighterCore:n}=t,{createJavaScriptRegexEngine:r}=e,i=await n({themes:[import("./packem_chunks/min-dark.js"),import("./packem_chunks/min-light.js")],langs:[],engine:r()}),o=i;return vt=Ge(()=>{try{i?.dispose?.()}catch{}ft=void 0},"disposeFn"),o},"createSingletonHighlighter"),Oa=Ge(async(t,e)=>{if(e==="text")return;const n=e.toLowerCase();if(!(t.getLoadedLanguages?.()??t.getLanguages?.()??[]).includes(n)){const r=Ur[n];r&&await t.loadLanguage?.(await r())}},"ensureLanguageLoaded"),Gr=Ge(async(t=[])=>{ft||(ft=ja());const e=await ft,n=[];for(const r of t)if(typeof r=="string")n.push(r.toLowerCase());else{const i=r.name;i&&n.push(i.toLowerCase())}return await Promise.all(n.map(r=>Oa(e,r))),e},"getHighlighter");Ge(async()=>{try{vt&&(vt(),vt=void 0)}catch{}},"disposeHighlighter");const lr=Ge((t=[])=>({name:"@shikijs/transformers:compact-line-options",line(e,n){const r=t.find(i=>i.line===n);return r?.classes&&this.addClassToHast(e,r.classes),e}}),"transformerCompactLineOptions");var Ha=Object.defineProperty,Wr=b((t,e)=>Ha(t,"name",{value:e,configurable:!0}),"s$2");const qa=Wr(t=>!Array.isArray(t)||t.length===0?!1:t.some(e=>e&&typeof e=="object"&&("location"in e||"pluginName"in e||"text"in e)),"isESBuildErrorArray"),Na=Wr(t=>t.map((e,n)=>{const{location:r,pluginName:i,text:o}=e,s={message:o||`ESBuild error #${n+1}`,name:e.name||"Error",stack:e.stack||""};return r&&(s.file=r.file,s.line=r.line,s.column=r.column),i&&(s.plugin=i),s}),"processESBuildErrors");var Ua=Object.defineProperty,Vr=b((t,e)=>Ua(t,"name",{value:e,configurable:!0}),"c$7");const Ga=/^\/@fs\//,Wa=/^[./]*/,Va=Vr((t,e)=>{for(const[n,r]of t.moduleGraph.idToModuleMap){if(!r)continue;const i=r,o=[String(i.file||"").replaceAll("\\","/"),String(n||"").replaceAll("\\","/"),String(i.url||"").replaceAll("\\","/")];for(const s of e)if(o.some(a=>a===s||a.includes(s)||s.includes(a)))return r}},"findBestModuleMatch"),it=Vr((t,e)=>{const n=[...e,...e.map(o=>o.replace(Ga,"")),...e.map(o=>o.replace(Wa,""))];let r,i=0;for(const o of n)try{const s=t.moduleGraph.getModuleById(o);if(s){const c=Object.keys(s).length>0,l=!!s.transformResult;let d=0;if(c&&l?d=2:c&&(d=1),c&&(d>i&&(r=s,i=d),l))return s}const a=t.moduleGraph.getModuleByUrl?.(o);if(a){const c=Object.keys(a).length>0,l=!!a.transformResult;let d=0;if(c&&l?d=2:c&&(d=1),c&&(d>i&&(r=a,i=d),l))return a}}catch{}return r||Va(t,e)||void 0},"findModuleForPath");var Za=Object.defineProperty,hn=b((t,e)=>Za(t,"name",{value:e,configurable:!0}),"r$1");const Ya=/^https?:\/\//,Xa=/^\/@fs\//,Qa=hn(t=>{const e=new URL(t),{pathname:n}=e,r=e.search||"",i=[n+r,n,n.replace(Xa,""),decodeURIComponent(n+r),decodeURIComponent(n)];return[...new Set(i)].filter(Boolean)},"generateUrlCandidates"),Zr=hn(t=>Ya.test(t),"isHttpUrl"),Ce=hn(t=>{if(!t)return[];try{if(Zr(t))return Qa(t);const e=[t];if(t.startsWith("/")&&e.push(t.slice(1)),t.includes("?")){const n=t.split("?")[0];n&&e.push(n)}return[...new Set(e)].filter(Boolean)}catch(e){return console.warn(`Failed to normalize path "${t}":`,e),[]}},"normalizeIdCandidates");var Ja=Object.defineProperty,_e=b((t,e)=>Ja(t,"name",{value:e,configurable:!0}),"o$2");const Yr=/\n/,Ka=/\s+/g,el=/[A-Z_$][\w$]{2,}/i,tl=/\s/,nl=_e((t,e)=>t.split(Yr)[e-1]??"","getLine"),cr=_e(t=>t.replaceAll(Ka,""),"removeWhitespace"),rl=_e((t,e)=>{if(e<=0||e>t.length)return"";const n=Math.max(0,e-1),r=t.slice(n,n+64),i=el.exec(r);if(i?.[0])return i[0];let o=r.trim();return o.length<4&&(o=t.slice(Math.max(0,n-16),n+16).trim()),o},"extractCandidateToken"),ol=_e((t,e)=>{let n=0;for(const[r,i]of[...t].entries())if(typeof i=="string"){if(n===e)return r+1;tl.test(i)||(n+=1)}return-1},"mapNormalizedToOriginalPosition"),il=_e((t,e)=>{if(!(!t||t.length<3))for(const[n,r]of e.entries()){if(!r)continue;const i=r.indexOf(t);if(i!==-1)return{column:i+1,line:n+1}}},"tryTokenBasedSearch"),sl=_e((t,e)=>{if(t)for(const[n,r]of e.entries()){if(!r)continue;const i=r.indexOf(t);if(i!==-1)return{column:i+1,line:n+1}}},"tryLineSubstringSearch"),al=_e((t,e)=>{if(!t)return;const n=cr(t);if(n)for(const[r,i]of e.entries()){if(!i)continue;const o=cr(i).indexOf(n);if(o!==-1){const s=ol(i,o);if(s!==-1)return{column:s,line:r+1}}}},"tryWhitespaceInsensitiveSearch"),ll=_e((t,e,n,r)=>{const i=nl(t,e);if(!i)return;const o=r.split(Yr),s=rl(i,n);return il(s,o)||sl(i.trim(),o)||al(i.trim(),o)},"realignOriginalPosition");var cl=Object.defineProperty,te=b((t,e)=>cl(t,"name",{value:e,configurable:!0}),"C$6"),We=44,Xr=59,dr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qr=new Uint8Array(64),Jr=new Uint8Array(128);for(let t=0;t<dr.length;t++){const e=dr.charCodeAt(t);Qr[t]=e,Jr[e]=t}function N(t,e){let n=0,r=0,i=0;do{const s=t.next();i=Jr[s],n|=(i&31)<<r,r+=5}while(i&32);const o=n&1;return n>>>=1,o&&(n=-2147483648|-n),e+n}b(N,"h$2");te(N,"decodeInteger");function B(t,e,n){let r=e-n;r=r<0?-r<<1|1:r<<1;do{let i=r&31;r>>>=5,r>0&&(i|=32),t.write(Qr[i])}while(r>0);return e}b(B,"i$4");te(B,"encodeInteger");function fe(t,e){return t.pos>=e?!1:t.peek()!==We}b(fe,"S$2");te(fe,"hasMoreVlq");var ur=1024*16,pr=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(t){return Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString()}}:{decode(t){let e="";for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return e}},gn=class{static{b(this,"T")}static{te(this,"StringWriter")}constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(ur)}write(e){const{buffer:n}=this;n[this.pos++]=e,this.pos===ur&&(this.out+=pr.decode(n),this.pos=0)}flush(){const{buffer:e,out:n,pos:r}=this;return r>0?n+pr.decode(e.subarray(0,r)):n}},mn=class{static{b(this,"w")}static{te(this,"StringReader")}constructor(e){this.pos=0,this.buffer=e}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){const{buffer:n,pos:r}=this,i=n.indexOf(e,r);return i===-1?n.length:i}},Kr=[];function dl(t){const{length:e}=t,n=new mn(t),r=[],i=[];let o=0;for(;n.pos<e;n.pos++){o=N(n,o);const s=N(n,0);if(!fe(n,e)){const d=i.pop();d[2]=o,d[3]=s;continue}const a=N(n,0),c=N(n,0)&1?[o,s,0,0,a,N(n,0)]:[o,s,0,0,a];let l=Kr;if(fe(n,e)){l=[];do{const d=N(n,0);l.push(d)}while(fe(n,e))}c.vars=l,r.push(c),i.push(c)}return r}b(dl,"z");te(dl,"decodeOriginalScopes");function ul(t){const e=new gn;for(let n=0;n<t.length;)n=fn(t,n,e,[0]);return e.flush()}b(ul,"F$4");te(ul,"encodeOriginalScopes");function fn(t,e,n,r){const i=t[e],{0:o,1:s,2:a,3:c,4:l,vars:d}=i;e>0&&n.write(We),r[0]=B(n,o,r[0]),B(n,s,0),B(n,l,0);const p=i.length===6?1:0;B(n,p,0),i.length===6&&B(n,i[5],0);for(const h of d)B(n,h,0);for(e++;e<t.length;){const h=t[e],{0:f,1:v}=h;if(f>a||f===a&&v>=c)break;e=fn(t,e,n,r)}return n.write(We),r[0]=B(n,a,r[0]),B(n,c,0),e}b(fn,"P$4");te(fn,"_encodeOriginalScopes");function pl(t){const{length:e}=t,n=new mn(t),r=[],i=[];let o=0,s=0,a=0,c=0,l=0,d=0,p=0,h=0;do{const f=n.indexOf(";");let v=0;for(;n.pos<f;n.pos++){if(v=N(n,v),!fe(n,f)){const M=i.pop();M[2]=o,M[3]=v;continue}const m=N(n,0),k=m&1,L=m&2,T=m&4;let $=null,R=Kr,A;if(k){const M=N(n,s);a=N(n,s===M?a:0),s=M,A=[o,v,0,0,M,a]}else A=[o,v,0,0];if(A.isScope=!!T,L){const M=c,j=l;c=N(n,c);const U=M===c;l=N(n,U?l:0),d=N(n,U&&j===l?d:0),$=[c,l,d]}if(A.callsite=$,fe(n,f)){R=[];do{p=o,h=v;const M=N(n,0);let j;if(M<-1){j=[[N(n,0)]];for(let U=-1;U>M;U--){const O=p;p=N(n,p),h=N(n,p===O?h:0);const ce=N(n,0);j.push([ce,p,h])}}else j=[[M]];R.push(j)}while(fe(n,f))}A.bindings=R,r.push(A),i.push(A)}o++,n.pos=f+1}while(n.pos<e);return r}b(pl,"H$2");te(pl,"decodeGeneratedRanges");function hl(t){if(t.length===0)return"";const e=new gn;for(let n=0;n<t.length;)n=vn(t,n,e,[0,0,0,0,0,0,0]);return e.flush()}b(hl,"J$1");te(hl,"encodeGeneratedRanges");function vn(t,e,n,r){const i=t[e],{0:o,1:s,2:a,3:c,isScope:l,callsite:d,bindings:p}=i;r[0]<o?(Yt(n,r[0],o),r[0]=o,r[1]=0):e>0&&n.write(We),r[1]=B(n,i[1],r[1]);const h=(i.length===6?1:0)|(d?2:0)|(l?4:0);if(B(n,h,0),i.length===6){const{4:f,5:v}=i;f!==r[2]&&(r[3]=0),r[2]=B(n,f,r[2]),r[3]=B(n,v,r[3])}if(d){const{0:f,1:v,2:m}=i.callsite;f!==r[4]?(r[5]=0,r[6]=0):v!==r[5]&&(r[6]=0),r[4]=B(n,f,r[4]),r[5]=B(n,v,r[5]),r[6]=B(n,m,r[6])}if(p)for(const f of p){f.length>1&&B(n,-f.length,0);const v=f[0][0];B(n,v,0);let m=o,k=s;for(let L=1;L<f.length;L++){const T=f[L];m=B(n,T[1],m),k=B(n,T[2],k),B(n,T[0],0)}}for(e++;e<t.length;){const f=t[e],{0:v,1:m}=f;if(v>a||v===a&&m>=c)break;e=vn(t,e,n,r)}return r[0]<a?(Yt(n,r[0],a),r[0]=a,r[1]=0):n.write(We),r[1]=B(n,c,r[1]),e}b(vn,"V$1");te(vn,"_encodeGeneratedRanges");function Yt(t,e,n){do t.write(Xr);while(++e<n)}b(Yt,"U$2");te(Yt,"catchupLine");function eo(t){const{length:e}=t,n=new mn(t),r=[];let i=0,o=0,s=0,a=0,c=0;do{const l=n.indexOf(";"),d=[];let p=!0,h=0;for(i=0;n.pos<l;){let f;i=N(n,i),i<h&&(p=!1),h=i,fe(n,l)?(o=N(n,o),s=N(n,s),a=N(n,a),fe(n,l)?(c=N(n,c),f=[i,o,s,a,c]):f=[i,o,s,a]):f=[i],d.push(f),n.pos++}p||to(d),r.push(d),n.pos=l+1}while(n.pos<=e);return r}b(eo,"K$1");te(eo,"decode");function to(t){t.sort(no)}b(to,"Q$4");te(to,"sort");function no(t,e){return t[0]-e[0]}b(no,"X$3");te(no,"sortComparator");function ro(t){const e=new gn;let n=0,r=0,i=0,o=0;for(let s=0;s<t.length;s++){const a=t[s];if(s>0&&e.write(Xr),a.length===0)continue;let c=0;for(let l=0;l<a.length;l++){const d=a[l];l>0&&e.write(We),c=B(e,d[0],c),d.length!==1&&(n=B(e,d[1],n),r=B(e,d[2],r),i=B(e,d[3],i),d.length!==4&&(o=B(e,d[4],o)))}}return e.flush()}b(ro,"Z$3");te(ro,"encode");var gl=Object.defineProperty,re=b((t,e)=>gl(t,"name",{value:e,configurable:!0}),"c$5");const ml=/^[\w+.-]+:\/\//,fl=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,vl=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function oo(t){return ml.test(t)}b(oo,"R$4");re(oo,"isAbsoluteUrl");function io(t){return t.startsWith("//")}b(io,"q$2");re(io,"isSchemeRelativeUrl");function wn(t){return t.startsWith("/")}b(wn,"m$5");re(wn,"isAbsolutePath");function so(t){return t.startsWith("file:")}b(so,"v$4");re(so,"isFileUrl");function Xt(t){return/^[.?#]/.test(t)}b(Xt,"u$1");re(Xt,"isRelative");function rt(t){const e=fl.exec(t);return bn(e[1],e[2]||"",e[3],e[4]||"",e[5]||"/",e[6]||"",e[7]||"")}b(rt,"f$6");re(rt,"parseAbsoluteUrl");function ao(t){const e=vl.exec(t),n=e[2];return bn("file:","",e[1]||"","",wn(n)?n:"/"+n,e[3]||"",e[4]||"")}b(ao,"w$5");re(ao,"parseFileUrl");function bn(t,e,n,r,i,o,s){return{scheme:t,user:e,host:n,port:r,path:i,query:o,hash:s,type:7}}b(bn,"y$4");re(bn,"makeUrl");function Qt(t){if(io(t)){const n=rt("http:"+t);return n.scheme="",n.type=6,n}if(wn(t)){const n=rt("http://foo.com"+t);return n.scheme="",n.host="",n.type=5,n}if(so(t))return ao(t);if(oo(t))return rt(t);const e=rt("http://foo.com/"+t);return e.scheme="",e.host="",e.type=t?t.startsWith("?")?3:t.startsWith("#")?2:4:1,e}b(Qt,"p$2");re(Qt,"parseUrl");function lo(t){if(t.endsWith("/.."))return t;const e=t.lastIndexOf("/");return t.slice(0,e+1)}b(lo,"P$3");re(lo,"stripPathFilename");function co(t,e){yn(e,e.type),t.path==="/"?t.path=e.path:t.path=lo(e.path)+t.path}b(co,"A$3");re(co,"mergePaths");function yn(t,e){const n=e<=4,r=t.path.split("/");let i=1,o=0,s=!1;for(let c=1;c<r.length;c++){const l=r[c];if(!l){s=!0;continue}if(s=!1,l!=="."){if(l===".."){o?(s=!0,o--,i--):n&&(r[i++]=l);continue}r[i++]=l,o++}}let a="";for(let c=1;c<i;c++)a+="/"+r[c];(!a||s&&!a.endsWith("/.."))&&(a+="/"),t.path=a}b(yn,"d$5");re(yn,"normalizePath");function uo(t,e){if(!t&&!e)return"";const n=Qt(t);let r=n.type;if(e&&r!==7){const o=Qt(e),s=o.type;switch(r){case 1:n.hash=o.hash;case 2:n.query=o.query;case 3:case 4:co(n,o);case 5:n.user=o.user,n.host=o.host,n.port=o.port;case 6:n.scheme=o.scheme}s>r&&(r=s)}yn(n,r);const i=n.query+n.hash;switch(r){case 2:case 3:return i;case 4:{const o=n.path.slice(1);return o?Xt(e||t)&&!Xt(o)?"./"+o+i:o+i:i||"."}case 5:return n.path+i;default:return n.scheme+"//"+n.user+n.host+n.port+n.path+i}}b(uo,"F$3");re(uo,"resolve");var wl=Object.defineProperty,P=b((t,e)=>wl(t,"name",{value:e,configurable:!0}),"i$3");function po(t){if(!t)return"";const e=t.lastIndexOf("/");return t.slice(0,e+1)}b(po,"ae$2");P(po,"stripFilename");function ho(t,e){const n=po(t),r=e?e+"/":"";return i=>uo(r+(i||""),n)}b(ho,"ge");P(ho,"resolver");var ae=0,xn=1,kn=2,_n=3,go=4,mo=1,fo=2;function vo(t,e){const n=Jt(t,0);if(n===t.length)return t;e||(t=t.slice());for(let r=n;r<t.length;r=Jt(t,r+1))t[r]=bo(t[r],e);return t}b(vo,"he");P(vo,"maybeSort");function Jt(t,e){for(let n=e;n<t.length;n++)if(!wo(t[n]))return n;return t.length}b(Jt,"X$2");P(Jt,"nextUnsortedSegmentLine");function wo(t){for(let e=1;e<t.length;e++)if(t[e][ae]<t[e-1][ae])return!1;return!0}b(wo,"_e");P(wo,"isSorted");function bo(t,e){return e||(t=t.slice()),t.sort($n)}b(bo,"ve$1");P(bo,"sortSegments");function $n(t,e){return t[ae]-e[ae]}b($n,"$$2");P($n,"sortComparator");function yo(t,e){const n=e.map(()=>[]);for(let r=0;r<t.length;r++){const i=t[r];for(let o=0;o<i.length;o++){const s=i[o];if(s.length===1)continue;const a=s[xn],c=s[kn],l=s[_n],d=n[a];(d[c]||(d[c]=[])).push([l,r,s[ae]])}}for(let r=0;r<n.length;r++){const i=n[r];for(let o=0;o<i.length;o++){const s=i[o];s&&s.sort($n)}}return n}b(yo,"Se$1");P(yo,"buildBySources");var Le=!1;function xo(t,e,n,r){for(;n<=r;){const i=n+(r-n>>1),o=t[i][ae]-e;if(o===0)return Le=!0,i;o<0?n=i+1:r=i-1}return Le=!1,n-1}b(xo,"Ee$1");P(xo,"binarySearch");function En(t,e,n){for(let r=n+1;r<t.length&&t[r][ae]===e;n=r++);return n}b(En,"H$1");P(En,"upperBound");function Sn(t,e,n){for(let r=n-1;r>=0&&t[r][ae]===e;n=r--);return n}b(Sn,"Y");P(Sn,"lowerBound");function Cn(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}b(Cn,"k$2");P(Cn,"memoizedState");function ko(t,e,n,r){const{lastKey:i,lastNeedle:o,lastIndex:s}=n;let a=0,c=t.length-1;if(r===i){if(e===o)return Le=s!==-1&&t[s][ae]===e,s;e>=o?a=s===-1?0:s:c=s}return n.lastKey=r,n.lastNeedle=e,n.lastIndex=xo(t,e,a,c)}b(ko,"Me$1");P(ko,"memoizedBinarySearch");function Rt(t){return typeof t=="string"?JSON.parse(t):t}b(Rt,"j");P(Rt,"parse");P(function(t,e){const n=Rt(t);if(!("sections"in n))return new zt(n,e);const r=[],i=[],o=[],s=[],a=[];Ln(n,e,r,i,o,s,a,0,0,1/0,1/0);const c={version:3,file:n.file,names:s,sources:i,sourcesContent:o,mappings:r,ignoreList:a};return To(c)},"FlattenMap");function Ln(t,e,n,r,i,o,s,a,c,l,d){const{sections:p}=t;for(let h=0;h<p.length;h++){const{map:f,offset:v}=p[h];let m=l,k=d;if(h+1<p.length){const L=p[h+1].offset;m=Math.min(l,a+L.line),m===l?k=Math.min(d,c+L.column):m<l&&(k=c+L.column)}_o(f,e,n,r,i,o,s,a+v.line,c+v.column,m,k)}}b(Ln,"ee$2");P(Ln,"recurse");function _o(t,e,n,r,i,o,s,a,c,l,d){const p=Rt(t);if("sections"in p)return Ln(...arguments);const h=new zt(p,e),f=r.length,v=o.length,m=Fe(h),{resolvedSources:k,sourcesContent:L,ignoreList:T}=h;if(wt(r,k),wt(o,h.names),L)wt(i,L);else for(let $=0;$<k.length;$++)i.push(null);if(T)for(let $=0;$<T.length;$++)s.push(T[$]+f);for(let $=0;$<m.length;$++){const R=a+$;if(R>l)return;const A=$o(n,R),M=$===0?c:0,j=m[$];for(let U=0;U<j.length;U++){const O=j[U],ce=M+O[ae];if(R===l&&ce>=d)return;if(O.length===1){A.push([ce]);continue}const Ae=f+O[xn],de=O[kn],$e=O[_n];A.push(O.length===4?[ce,Ae,de,$e]:[ce,Ae,de,$e,v+O[go]])}}}b(_o,"me");P(_o,"addSection");function wt(t,e){for(let n=0;n<e.length;n++)t.push(e[n])}b(wt,"G$1");P(wt,"append");function $o(t,e){for(let n=t.length;n<=e;n++)t[n]=[];return t[e]}b($o,"xe");P($o,"getLine");var Eo="`line` must be greater than 0 (lines start at line 1)",So="`column` must be greater than or equal to 0 (columns start at column 0)",_t=-1,Ft=1,zt=class{static{b(this,"R")}static{P(this,"TraceMap")}constructor(e,n){const r=typeof e=="string";if(!r&&e._decodedMemo)return e;const i=Rt(e),{version:o,file:s,names:a,sourceRoot:c,sources:l,sourcesContent:d}=i;this.version=o,this.file=s,this.names=a||[],this.sourceRoot=c,this.sources=l,this.sourcesContent=d,this.ignoreList=i.ignoreList||i.x_google_ignoreList||void 0;const p=ho(n,c);this.resolvedSources=l.map(p);const{mappings:h}=i;if(typeof h=="string")this._encoded=h,this._decoded=void 0;else if(Array.isArray(h))this._encoded=void 0,this._decoded=vo(h,r);else throw i.sections?new Error("TraceMap passed sectioned source map, please use FlattenMap export instead"):new Error(`invalid source map: ${JSON.stringify(i)}`);this._decodedMemo=Cn(),this._bySources=void 0,this._bySourceMemos=void 0}};function Co(t){var e,n;return(n=(e=t)._encoded)!=null?n:e._encoded=ro(t._decoded)}b(Co,"oe$1");P(Co,"encodedMappings");function Fe(t){var e;return(e=t)._decoded||(e._decoded=eo(t._encoded))}b(Fe,"O$3");P(Fe,"decodedMappings");function bl(t,e,n){const r=Fe(t);if(e>=r.length)return null;const i=r[e],o=lt(i,t._decodedMemo,e,n,Ft);return o===-1?null:i[o]}b(bl,"Oe");P(bl,"traceSegment");function Lo(t,e){let{line:n,column:r,bias:i}=e;if(n--,n<0)throw new Error(Eo);if(r<0)throw new Error(So);const o=Fe(t);if(n>=o.length)return ot(null,null,null,null);const s=o[n],a=lt(s,t._decodedMemo,n,r,i||Ft);if(a===-1)return ot(null,null,null,null);const c=s[a];if(c.length===1)return ot(null,null,null,null);const{names:l,resolvedSources:d}=t;return ot(d[c[xn]],c[kn]+1,c[_n],c.length===5?l[c[go]]:null)}b(Lo,"Le$1");P(Lo,"originalPositionFor");function yl(t,e){const{source:n,line:r,column:i,bias:o}=e;return Pn(t,n,r,i,o||Ft,!1)}b(yl,"ye$1");P(yl,"generatedPositionFor");function xl(t,e){const{source:n,line:r,column:i,bias:o}=e;return Pn(t,n,r,i,o||_t,!0)}b(xl,"Ce");P(xl,"allGeneratedPositionsFor");function kl(t,e){const n=Fe(t),{names:r,resolvedSources:i}=t;for(let o=0;o<n.length;o++){const s=n[o];for(let a=0;a<s.length;a++){const c=s[a],l=o+1,d=c[0];let p=null,h=null,f=null,v=null;c.length!==1&&(p=i[c[1]],h=c[2]+1,f=c[3]),c.length===5&&(v=r[c[4]]),e({generatedLine:l,generatedColumn:d,source:p,originalLine:h,originalColumn:f,name:v})}}}b(kl,"Ie");P(kl,"eachMapping");function Tn(t,e){const{sources:n,resolvedSources:r}=t;let i=n.indexOf(e);return i===-1&&(i=r.indexOf(e)),i}b(Tn,"re$1");P(Tn,"sourceIndex");function _l(t,e){const{sourcesContent:n}=t;if(n==null)return null;const r=Tn(t,e);return r===-1?null:n[r]}b(_l,"Ne");P(_l,"sourceContentFor");function $l(t,e){const{ignoreList:n}=t;if(n==null)return!1;const r=Tn(t,e);return r===-1?!1:n.includes(r)}b($l,"be$1");P($l,"isIgnored");function To(t,e){const n=new zt(Dt(t,[]),e);return n._decoded=t.mappings,n}b(To,"se$1");P(To,"presortedDecodedMap");function El(t){return Dt(t,Fe(t))}b(El,"Re$1");P(El,"decodedMap");function Sl(t){return Dt(t,Co(t))}b(Sl,"we$2");P(Sl,"encodedMap");function Dt(t,e){return{version:t.version,file:t.file,names:t.names,sourceRoot:t.sourceRoot,sources:t.sources,sourcesContent:t.sourcesContent,mappings:e,ignoreList:t.ignoreList||t.x_google_ignoreList}}b(Dt,"B");P(Dt,"clone");function ot(t,e,n,r){return{source:t,line:e,column:n,name:r}}b(ot,"b$4");P(ot,"OMapping");function qe(t,e){return{line:t,column:e}}b(qe,"y$3");P(qe,"GMapping");function lt(t,e,n,r,i){let o=ko(t,r,e,n);return Le?o=(i===_t?En:Sn)(t,r,o):i===_t&&o++,o===-1||o===t.length?-1:o}b(lt,"w$4");P(lt,"traceSegmentInternal");function Po(t,e,n,r,i){let o=lt(t,e,n,r,Ft);if(!Le&&i===_t&&o++,o===-1||o===t.length)return[];const s=Le?r:t[o][ae];Le||(o=Sn(t,s,o));const a=En(t,s,o),c=[];for(;o<=a;o++){const l=t[o];c.push(qe(l[mo]+1,l[fo]))}return c}b(Po,"Ue");P(Po,"sliceGeneratedPositions");function Pn(t,e,n,r,i,o){var s,a;if(n--,n<0)throw new Error(Eo);if(r<0)throw new Error(So);const{sources:c,resolvedSources:l}=t;let d=c.indexOf(e);if(d===-1&&(d=l.indexOf(e)),d===-1)return o?[]:qe(null,null);const p=(s=t)._bySourceMemos||(s._bySourceMemos=c.map(Cn)),h=((a=t)._bySources||(a._bySources=yo(Fe(t),p)))[d][n];if(h==null)return o?[]:qe(null,null);const f=p[d];if(o)return Po(h,f,n,r,i);const v=lt(h,f,n,r,i);if(v===-1)return qe(null,null);const m=h[v];return qe(m[mo]+1,m[fo])}b(Pn,"ie$1");P(Pn,"generatedPosition");var Cl=Object.defineProperty,oe=b((t,e)=>Cl(t,"name",{value:e,configurable:!0}),"f$5");const Ll=/`((?:[^`$]|\$\{[^}]+\})*)`/g,hr=/\$\{[^}]+\}/g,Tl=/[.*+?^${}()|[\]\\]/g,Ro=[/new Error\(/,/throw new Error\(/,/new Error`/,/throw new Error`/,/new [A-Z]\w*\(/,/throw new [A-Z]\w*\(/,/new [A-Z]\w*`/,/throw new [A-Z]\w*`/],Te=oe(t=>t.replaceAll(Tl,String.raw`\$&`),"escapeRegex"),Pl=oe(t=>{const e=Te(t);return[t,`new Error("${e}")`,`new Error('${e}')`,`new Error(\`${Te(t)}\`)`,`throw new Error("${e}")`,`throw new Error('${e}')`,`throw new Error(\`${Te(t)}\`)`,`Error("${e}")`,`Error('${e}')`]},"createErrorPatterns"),gr=oe((t,e)=>{const n=[...t.matchAll(Ll)];for(const r of n){const i=r[1];if(!i)continue;const o=i.split(hr);if(o.every(a=>a===""||e.includes(a))&&o.length>1)return!0;if(!i)continue;const s=i.replaceAll(hr,"(.+?)");try{if(new RegExp(`^${Te(s)}$`).test(e))return!0}catch{}}return!1},"checkTemplateLiteralMatch"),Rl=[/Failed to resolve import ["']([^"']+)["'](?:\s+from ["']([^"']+)["'])?/,/(.+?)\s+from line \d+/,/(.+?)\s+is not defined/,/(.+?)\s+is not a function/,/Cannot read properties of (.+?)\s+\(reading (.+?)\)/],Fl=oe(t=>{for(const e of Rl){const n=t.match(e);if(n)return n}},"findDynamicErrorMatch"),mr=oe(t=>{let e,n;for(const r of Ro){const i=t.match(r);i&&(!e||r.source.includes("throw")&&!n?.source.includes("throw"))&&(e=i,n=r)}return{bestMatch:e,bestPattern:n}},"findBestErrorConstructor"),fr=oe((t,e)=>{let n=t.index??0;if(e.source.includes("throw new")&&t[0].startsWith("throw new")){const r=t[0].indexOf("new");r!==-1&&(n+=r)}return n+1},"calculateActualColumn"),zl=oe((t,e,n=0)=>{if(!t||!e)return;const r=t.split(`
1896
+ `),r=n.findIndex(o=>o.includes(e));if(r===-1)return;const i=n[r]||"";return{column:Math.max(0,i.indexOf(e))+1,line:r+1}},"findImportLocation"),Da=we(async(t,e,n)=>{const r=Ca.exec(t.message)?.[1];if(r&&(t.title="Failed to Load Module (SSR)",t.name="FailedToLoadModuleSSR",t.message=`Failed to load module: ${r}`,t.hint="Verify import path, ensure a plugin handles this file type during SSR, and check for typos or missing files.",n&&e)){const i=Nr(n,r);i&&(t.loc={...i,file:e})}},"enhanceFailedLoadError"),Aa=we(async(t,e,n)=>{const r=La.exec(t.message)?.[1];if(r&&(t.name="InvalidGlob",t.title="Invalid Glob Pattern",t.message=`Invalid glob pattern: ${r}`,t.hint=t.hint||"Ensure your glob follows the expected syntax and matches existing files. Avoid unintended special characters.",n&&e)){const i=Nr(n,r);i&&(t.loc={...i,file:e})}},"enhanceGlobError"),Ma=we(async(t,e)=>{const n=Ta(t);Pa(e,n);const r=Ra(n),i=r?await Fa(r):void 0;return await Da(n,r,i),za(n,r),await Aa(n,r,i),n},"enhanceViteSsrError");var Ia=Object.defineProperty,G=b((t,e)=>Ia(t,"name",{value:e,configurable:!0}),"t$1");const Ur={javascript:G(()=>import("@shikijs/langs/javascript"),"javascript"),typescript:G(()=>import("@shikijs/langs/typescript"),"typescript"),jsx:G(()=>import("@shikijs/langs/jsx"),"jsx"),tsx:G(()=>import("@shikijs/langs/tsx"),"tsx"),json:G(()=>import("@shikijs/langs/json"),"json"),jsonc:G(()=>import("@shikijs/langs/jsonc"),"jsonc"),xml:G(()=>import("@shikijs/langs/xml"),"xml"),sql:G(()=>import("@shikijs/langs/sql"),"sql"),markdown:G(()=>import("@shikijs/langs/markdown"),"markdown"),mdx:G(()=>import("@shikijs/langs/mdx"),"mdx"),html:G(()=>import("@shikijs/langs/html"),"html"),css:G(()=>import("@shikijs/langs/css"),"css"),scss:G(()=>import("@shikijs/langs/scss"),"scss"),less:G(()=>import("@shikijs/langs/less"),"less"),sass:G(()=>import("@shikijs/langs/sass"),"sass"),stylus:G(()=>import("@shikijs/langs/stylus"),"stylus"),styl:G(()=>import("@shikijs/langs/styl"),"styl"),svelte:G(()=>import("@shikijs/langs/svelte"),"svelte"),vue:G(()=>import("@shikijs/langs/vue"),"vue"),bash:G(()=>import("@shikijs/langs/bash"),"bash"),shell:G(()=>import("@shikijs/langs/shell"),"shell"),text:G(()=>Promise.resolve({name:"text",patterns:[],scopeName:"source.text",repository:{}}),"text")};G(async t=>{if(typeof t!="string"||!t)return;const e=Ur[t.toLowerCase()];if(e)return await e()},"getLanguageImport");var Ba=Object.defineProperty,Ge=b((t,e)=>Ba(t,"name",{value:e,configurable:!0}),"a$7");let ft,vt;const ja=Ge(async()=>{const[t,e]=await Promise.all([import("shiki/core"),import("shiki/engine/javascript")]),{createHighlighterCore:n}=t,{createJavaScriptRegexEngine:r}=e,i=await n({themes:[import("./packem_chunks/min-dark.js"),import("./packem_chunks/min-light.js")],langs:[],engine:r()}),o=i;return vt=Ge(()=>{try{i?.dispose?.()}catch{}ft=void 0},"disposeFn"),o},"createSingletonHighlighter"),Oa=Ge(async(t,e)=>{if(e==="text")return;const n=e.toLowerCase();if(!(t.getLoadedLanguages?.()??t.getLanguages?.()??[]).includes(n)){const r=Ur[n];r&&await t.loadLanguage?.(await r())}},"ensureLanguageLoaded"),Gr=Ge(async(t=[])=>{ft||(ft=ja());const e=await ft,n=[];for(const r of t)if(typeof r=="string")n.push(r.toLowerCase());else{const i=r.name;i&&n.push(i.toLowerCase())}return await Promise.all(n.map(r=>Oa(e,r))),e},"getHighlighter");Ge(async()=>{try{vt&&(vt(),vt=void 0)}catch{}},"disposeHighlighter");const lr=Ge((t=[])=>({name:"@shikijs/transformers:compact-line-options",line(e,n){const r=t.find(i=>i.line===n);return r?.classes&&this.addClassToHast(e,r.classes),e}}),"transformerCompactLineOptions");var Ha=Object.defineProperty,Wr=b((t,e)=>Ha(t,"name",{value:e,configurable:!0}),"s$2");const qa=Wr(t=>!Array.isArray(t)||t.length===0?!1:t.some(e=>e&&typeof e=="object"&&("location"in e||"pluginName"in e||"text"in e)),"isESBuildErrorArray"),Na=Wr(t=>t.map((e,n)=>{const{location:r,pluginName:i,text:o}=e,s={message:o||`ESBuild error #${n+1}`,name:e.name||"Error",stack:e.stack||""};return r&&(s.file=r.file,s.line=r.line,s.column=r.column),i&&(s.plugin=i),s}),"processESBuildErrors");var Ua=Object.defineProperty,Vr=b((t,e)=>Ua(t,"name",{value:e,configurable:!0}),"c$7");const Ga=/^\/@fs\//,Wa=/^[./]*/,Va=Vr((t,e)=>{for(const[n,r]of t.moduleGraph.idToModuleMap){if(!r)continue;const i=r,o=[String(i.file||"").replaceAll("\\","/"),String(n||"").replaceAll("\\","/"),String(i.url||"").replaceAll("\\","/")];for(const s of e)if(o.some(a=>a===s||a.includes(s)||s.includes(a)))return r}},"findBestModuleMatch"),it=Vr((t,e)=>{const n=[...e,...e.map(o=>o.replace(Ga,"")),...e.map(o=>o.replace(Wa,""))];let r,i=0;for(const o of n)try{const s=t.moduleGraph.getModuleById(o);if(s){const c=Object.keys(s).length>0,l=!!s.transformResult;let d=0;if(c&&l?d=2:c&&(d=1),c&&(d>i&&(r=s,i=d),l))return s}const a=t.moduleGraph.getModuleByUrl?.(o);if(a){const c=Object.keys(a).length>0,l=!!a.transformResult;let d=0;if(c&&l?d=2:c&&(d=1),c&&(d>i&&(r=a,i=d),l))return a}}catch{}return r||Va(t,e)||void 0},"findModuleForPath");var Za=Object.defineProperty,hn=b((t,e)=>Za(t,"name",{value:e,configurable:!0}),"r$1");const Ya=/^https?:\/\//,Xa=/^\/@fs\//,Qa=hn(t=>{const e=new URL(t),{pathname:n}=e,r=e.search||"",i=[n+r,n,n.replace(Xa,""),decodeURIComponent(n+r),decodeURIComponent(n)];return[...new Set(i)].filter(Boolean)},"generateUrlCandidates"),Zr=hn(t=>Ya.test(t),"isHttpUrl"),Ce=hn(t=>{if(!t)return[];try{if(Zr(t))return Qa(t);const e=[t];if(t.startsWith("/")&&e.push(t.slice(1)),t.includes("?")){const n=t.split("?")[0];n&&e.push(n)}return[...new Set(e)].filter(Boolean)}catch(e){return console.warn(`Failed to normalize path "${t}":`,e),[]}},"normalizeIdCandidates");var Ja=Object.defineProperty,_e=b((t,e)=>Ja(t,"name",{value:e,configurable:!0}),"o$2");const Yr=/\n/,Ka=/\s+/g,el=/[A-Z_$][\w$]{2,}/i,tl=/\s/,nl=_e((t,e)=>t.split(Yr)[e-1]??"","getLine"),cr=_e(t=>t.replaceAll(Ka,""),"removeWhitespace"),rl=_e((t,e)=>{if(e<=0||e>t.length)return"";const n=Math.max(0,e-1),r=t.slice(n,n+64),i=el.exec(r);if(i?.[0])return i[0];let o=r.trim();return o.length<4&&(o=t.slice(Math.max(0,n-16),n+16).trim()),o},"extractCandidateToken"),ol=_e((t,e)=>{let n=0;for(const[r,i]of[...t].entries())if(typeof i=="string"){if(n===e)return r+1;tl.test(i)||(n+=1)}return-1},"mapNormalizedToOriginalPosition"),il=_e((t,e)=>{if(!(!t||t.length<3))for(const[n,r]of e.entries()){if(!r)continue;const i=r.indexOf(t);if(i!==-1)return{column:i+1,line:n+1}}},"tryTokenBasedSearch"),sl=_e((t,e)=>{if(t)for(const[n,r]of e.entries()){if(!r)continue;const i=r.indexOf(t);if(i!==-1)return{column:i+1,line:n+1}}},"tryLineSubstringSearch"),al=_e((t,e)=>{if(!t)return;const n=cr(t);if(n)for(const[r,i]of e.entries()){if(!i)continue;const o=cr(i).indexOf(n);if(o!==-1){const s=ol(i,o);if(s!==-1)return{column:s,line:r+1}}}},"tryWhitespaceInsensitiveSearch"),ll=_e((t,e,n,r)=>{const i=nl(t,e);if(!i)return;const o=r.split(Yr),s=rl(i,n);return il(s,o)||sl(i.trim(),o)||al(i.trim(),o)},"realignOriginalPosition");var cl=Object.defineProperty,te=b((t,e)=>cl(t,"name",{value:e,configurable:!0}),"C$6"),We=44,Xr=59,dr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qr=new Uint8Array(64),Jr=new Uint8Array(128);for(let t=0;t<dr.length;t++){const e=dr.charCodeAt(t);Qr[t]=e,Jr[e]=t}function N(t,e){let n=0,r=0,i=0;do{const s=t.next();i=Jr[s],n|=(i&31)<<r,r+=5}while(i&32);const o=n&1;return n>>>=1,o&&(n=-2147483648|-n),e+n}b(N,"h$2");te(N,"decodeInteger");function B(t,e,n){let r=e-n;r=r<0?-r<<1|1:r<<1;do{let i=r&31;r>>>=5,r>0&&(i|=32),t.write(Qr[i])}while(r>0);return e}b(B,"i$4");te(B,"encodeInteger");function fe(t,e){return t.pos>=e?!1:t.peek()!==We}b(fe,"S$2");te(fe,"hasMoreVlq");var ur=1024*16,pr=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(t){return Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString()}}:{decode(t){let e="";for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return e}},gn=class{static{b(this,"T")}static{te(this,"StringWriter")}constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(ur)}write(e){const{buffer:n}=this;n[this.pos++]=e,this.pos===ur&&(this.out+=pr.decode(n),this.pos=0)}flush(){const{buffer:e,out:n,pos:r}=this;return r>0?n+pr.decode(e.subarray(0,r)):n}},mn=class{static{b(this,"w")}static{te(this,"StringReader")}constructor(e){this.pos=0,this.buffer=e}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){const{buffer:n,pos:r}=this,i=n.indexOf(e,r);return i===-1?n.length:i}},Kr=[];function dl(t){const{length:e}=t,n=new mn(t),r=[],i=[];let o=0;for(;n.pos<e;n.pos++){o=N(n,o);const s=N(n,0);if(!fe(n,e)){const d=i.pop();d[2]=o,d[3]=s;continue}const a=N(n,0),c=N(n,0)&1?[o,s,0,0,a,N(n,0)]:[o,s,0,0,a];let l=Kr;if(fe(n,e)){l=[];do{const d=N(n,0);l.push(d)}while(fe(n,e))}c.vars=l,r.push(c),i.push(c)}return r}b(dl,"z");te(dl,"decodeOriginalScopes");function ul(t){const e=new gn;for(let n=0;n<t.length;)n=fn(t,n,e,[0]);return e.flush()}b(ul,"F$4");te(ul,"encodeOriginalScopes");function fn(t,e,n,r){const i=t[e],{0:o,1:s,2:a,3:c,4:l,vars:d}=i;e>0&&n.write(We),r[0]=B(n,o,r[0]),B(n,s,0),B(n,l,0);const p=i.length===6?1:0;B(n,p,0),i.length===6&&B(n,i[5],0);for(const h of d)B(n,h,0);for(e++;e<t.length;){const h=t[e],{0:f,1:v}=h;if(f>a||f===a&&v>=c)break;e=fn(t,e,n,r)}return n.write(We),r[0]=B(n,a,r[0]),B(n,c,0),e}b(fn,"P$4");te(fn,"_encodeOriginalScopes");function pl(t){const{length:e}=t,n=new mn(t),r=[],i=[];let o=0,s=0,a=0,c=0,l=0,d=0,p=0,h=0;do{const f=n.indexOf(";");let v=0;for(;n.pos<f;n.pos++){if(v=N(n,v),!fe(n,f)){const M=i.pop();M[2]=o,M[3]=v;continue}const m=N(n,0),k=m&1,L=m&2,T=m&4;let $=null,R=Kr,A;if(k){const M=N(n,s);a=N(n,s===M?a:0),s=M,A=[o,v,0,0,M,a]}else A=[o,v,0,0];if(A.isScope=!!T,L){const M=c,j=l;c=N(n,c);const U=M===c;l=N(n,U?l:0),d=N(n,U&&j===l?d:0),$=[c,l,d]}if(A.callsite=$,fe(n,f)){R=[];do{p=o,h=v;const M=N(n,0);let j;if(M<-1){j=[[N(n,0)]];for(let U=-1;U>M;U--){const O=p;p=N(n,p),h=N(n,p===O?h:0);const ce=N(n,0);j.push([ce,p,h])}}else j=[[M]];R.push(j)}while(fe(n,f))}A.bindings=R,r.push(A),i.push(A)}o++,n.pos=f+1}while(n.pos<e);return r}b(pl,"H$2");te(pl,"decodeGeneratedRanges");function hl(t){if(t.length===0)return"";const e=new gn;for(let n=0;n<t.length;)n=vn(t,n,e,[0,0,0,0,0,0,0]);return e.flush()}b(hl,"J$1");te(hl,"encodeGeneratedRanges");function vn(t,e,n,r){const i=t[e],{0:o,1:s,2:a,3:c,isScope:l,callsite:d,bindings:p}=i;r[0]<o?(Yt(n,r[0],o),r[0]=o,r[1]=0):e>0&&n.write(We),r[1]=B(n,i[1],r[1]);const h=(i.length===6?1:0)|(d?2:0)|(l?4:0);if(B(n,h,0),i.length===6){const{4:f,5:v}=i;f!==r[2]&&(r[3]=0),r[2]=B(n,f,r[2]),r[3]=B(n,v,r[3])}if(d){const{0:f,1:v,2:m}=i.callsite;f!==r[4]?(r[5]=0,r[6]=0):v!==r[5]&&(r[6]=0),r[4]=B(n,f,r[4]),r[5]=B(n,v,r[5]),r[6]=B(n,m,r[6])}if(p)for(const f of p){f.length>1&&B(n,-f.length,0);const v=f[0][0];B(n,v,0);let m=o,k=s;for(let L=1;L<f.length;L++){const T=f[L];m=B(n,T[1],m),k=B(n,T[2],k),B(n,T[0],0)}}for(e++;e<t.length;){const f=t[e],{0:v,1:m}=f;if(v>a||v===a&&m>=c)break;e=vn(t,e,n,r)}return r[0]<a?(Yt(n,r[0],a),r[0]=a,r[1]=0):n.write(We),r[1]=B(n,c,r[1]),e}b(vn,"V$1");te(vn,"_encodeGeneratedRanges");function Yt(t,e,n){do t.write(Xr);while(++e<n)}b(Yt,"U$2");te(Yt,"catchupLine");function eo(t){const{length:e}=t,n=new mn(t),r=[];let i=0,o=0,s=0,a=0,c=0;do{const l=n.indexOf(";"),d=[];let p=!0,h=0;for(i=0;n.pos<l;){let f;i=N(n,i),i<h&&(p=!1),h=i,fe(n,l)?(o=N(n,o),s=N(n,s),a=N(n,a),fe(n,l)?(c=N(n,c),f=[i,o,s,a,c]):f=[i,o,s,a]):f=[i],d.push(f),n.pos++}p||to(d),r.push(d),n.pos=l+1}while(n.pos<=e);return r}b(eo,"K$1");te(eo,"decode");function to(t){t.sort(no)}b(to,"Q$4");te(to,"sort");function no(t,e){return t[0]-e[0]}b(no,"X$3");te(no,"sortComparator");function ro(t){const e=new gn;let n=0,r=0,i=0,o=0;for(let s=0;s<t.length;s++){const a=t[s];if(s>0&&e.write(Xr),a.length===0)continue;let c=0;for(let l=0;l<a.length;l++){const d=a[l];l>0&&e.write(We),c=B(e,d[0],c),d.length!==1&&(n=B(e,d[1],n),r=B(e,d[2],r),i=B(e,d[3],i),d.length!==4&&(o=B(e,d[4],o)))}}return e.flush()}b(ro,"Z$3");te(ro,"encode");var gl=Object.defineProperty,re=b((t,e)=>gl(t,"name",{value:e,configurable:!0}),"c$5");const ml=/^[\w+.-]+:\/\//,fl=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,vl=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function oo(t){return ml.test(t)}b(oo,"R$4");re(oo,"isAbsoluteUrl");function io(t){return t.startsWith("//")}b(io,"q$2");re(io,"isSchemeRelativeUrl");function wn(t){return t.startsWith("/")}b(wn,"m$5");re(wn,"isAbsolutePath");function so(t){return t.startsWith("file:")}b(so,"v$4");re(so,"isFileUrl");function Xt(t){return/^[.?#]/.test(t)}b(Xt,"u$1");re(Xt,"isRelative");function rt(t){const e=fl.exec(t);return bn(e[1],e[2]||"",e[3],e[4]||"",e[5]||"/",e[6]||"",e[7]||"")}b(rt,"f$6");re(rt,"parseAbsoluteUrl");function ao(t){const e=vl.exec(t),n=e[2];return bn("file:","",e[1]||"","",wn(n)?n:"/"+n,e[3]||"",e[4]||"")}b(ao,"w$4");re(ao,"parseFileUrl");function bn(t,e,n,r,i,o,s){return{scheme:t,user:e,host:n,port:r,path:i,query:o,hash:s,type:7}}b(bn,"y$4");re(bn,"makeUrl");function Qt(t){if(io(t)){const n=rt("http:"+t);return n.scheme="",n.type=6,n}if(wn(t)){const n=rt("http://foo.com"+t);return n.scheme="",n.host="",n.type=5,n}if(so(t))return ao(t);if(oo(t))return rt(t);const e=rt("http://foo.com/"+t);return e.scheme="",e.host="",e.type=t?t.startsWith("?")?3:t.startsWith("#")?2:4:1,e}b(Qt,"p$2");re(Qt,"parseUrl");function lo(t){if(t.endsWith("/.."))return t;const e=t.lastIndexOf("/");return t.slice(0,e+1)}b(lo,"P$3");re(lo,"stripPathFilename");function co(t,e){yn(e,e.type),t.path==="/"?t.path=e.path:t.path=lo(e.path)+t.path}b(co,"A$3");re(co,"mergePaths");function yn(t,e){const n=e<=4,r=t.path.split("/");let i=1,o=0,s=!1;for(let c=1;c<r.length;c++){const l=r[c];if(!l){s=!0;continue}if(s=!1,l!=="."){if(l===".."){o?(s=!0,o--,i--):n&&(r[i++]=l);continue}r[i++]=l,o++}}let a="";for(let c=1;c<i;c++)a+="/"+r[c];(!a||s&&!a.endsWith("/.."))&&(a+="/"),t.path=a}b(yn,"d$5");re(yn,"normalizePath");function uo(t,e){if(!t&&!e)return"";const n=Qt(t);let r=n.type;if(e&&r!==7){const o=Qt(e),s=o.type;switch(r){case 1:n.hash=o.hash;case 2:n.query=o.query;case 3:case 4:co(n,o);case 5:n.user=o.user,n.host=o.host,n.port=o.port;case 6:n.scheme=o.scheme}s>r&&(r=s)}yn(n,r);const i=n.query+n.hash;switch(r){case 2:case 3:return i;case 4:{const o=n.path.slice(1);return o?Xt(e||t)&&!Xt(o)?"./"+o+i:o+i:i||"."}case 5:return n.path+i;default:return n.scheme+"//"+n.user+n.host+n.port+n.path+i}}b(uo,"F$3");re(uo,"resolve");var wl=Object.defineProperty,P=b((t,e)=>wl(t,"name",{value:e,configurable:!0}),"i$3");function po(t){if(!t)return"";const e=t.lastIndexOf("/");return t.slice(0,e+1)}b(po,"ae$2");P(po,"stripFilename");function ho(t,e){const n=po(t),r=e?e+"/":"";return i=>uo(r+(i||""),n)}b(ho,"ge");P(ho,"resolver");var ae=0,xn=1,kn=2,_n=3,go=4,mo=1,fo=2;function vo(t,e){const n=Jt(t,0);if(n===t.length)return t;e||(t=t.slice());for(let r=n;r<t.length;r=Jt(t,r+1))t[r]=bo(t[r],e);return t}b(vo,"he");P(vo,"maybeSort");function Jt(t,e){for(let n=e;n<t.length;n++)if(!wo(t[n]))return n;return t.length}b(Jt,"X$2");P(Jt,"nextUnsortedSegmentLine");function wo(t){for(let e=1;e<t.length;e++)if(t[e][ae]<t[e-1][ae])return!1;return!0}b(wo,"_e");P(wo,"isSorted");function bo(t,e){return e||(t=t.slice()),t.sort($n)}b(bo,"ve$1");P(bo,"sortSegments");function $n(t,e){return t[ae]-e[ae]}b($n,"$$2");P($n,"sortComparator");function yo(t,e){const n=e.map(()=>[]);for(let r=0;r<t.length;r++){const i=t[r];for(let o=0;o<i.length;o++){const s=i[o];if(s.length===1)continue;const a=s[xn],c=s[kn],l=s[_n],d=n[a];(d[c]||(d[c]=[])).push([l,r,s[ae]])}}for(let r=0;r<n.length;r++){const i=n[r];for(let o=0;o<i.length;o++){const s=i[o];s&&s.sort($n)}}return n}b(yo,"Se");P(yo,"buildBySources");var Le=!1;function xo(t,e,n,r){for(;n<=r;){const i=n+(r-n>>1),o=t[i][ae]-e;if(o===0)return Le=!0,i;o<0?n=i+1:r=i-1}return Le=!1,n-1}b(xo,"Ee$1");P(xo,"binarySearch");function En(t,e,n){for(let r=n+1;r<t.length&&t[r][ae]===e;n=r++);return n}b(En,"H$1");P(En,"upperBound");function Sn(t,e,n){for(let r=n-1;r>=0&&t[r][ae]===e;n=r--);return n}b(Sn,"Y");P(Sn,"lowerBound");function Cn(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}b(Cn,"k$2");P(Cn,"memoizedState");function ko(t,e,n,r){const{lastKey:i,lastNeedle:o,lastIndex:s}=n;let a=0,c=t.length-1;if(r===i){if(e===o)return Le=s!==-1&&t[s][ae]===e,s;e>=o?a=s===-1?0:s:c=s}return n.lastKey=r,n.lastNeedle=e,n.lastIndex=xo(t,e,a,c)}b(ko,"Me$1");P(ko,"memoizedBinarySearch");function Rt(t){return typeof t=="string"?JSON.parse(t):t}b(Rt,"j");P(Rt,"parse");P(function(t,e){const n=Rt(t);if(!("sections"in n))return new zt(n,e);const r=[],i=[],o=[],s=[],a=[];Ln(n,e,r,i,o,s,a,0,0,1/0,1/0);const c={version:3,file:n.file,names:s,sources:i,sourcesContent:o,mappings:r,ignoreList:a};return To(c)},"FlattenMap");function Ln(t,e,n,r,i,o,s,a,c,l,d){const{sections:p}=t;for(let h=0;h<p.length;h++){const{map:f,offset:v}=p[h];let m=l,k=d;if(h+1<p.length){const L=p[h+1].offset;m=Math.min(l,a+L.line),m===l?k=Math.min(d,c+L.column):m<l&&(k=c+L.column)}_o(f,e,n,r,i,o,s,a+v.line,c+v.column,m,k)}}b(Ln,"ee$2");P(Ln,"recurse");function _o(t,e,n,r,i,o,s,a,c,l,d){const p=Rt(t);if("sections"in p)return Ln(...arguments);const h=new zt(p,e),f=r.length,v=o.length,m=Fe(h),{resolvedSources:k,sourcesContent:L,ignoreList:T}=h;if(wt(r,k),wt(o,h.names),L)wt(i,L);else for(let $=0;$<k.length;$++)i.push(null);if(T)for(let $=0;$<T.length;$++)s.push(T[$]+f);for(let $=0;$<m.length;$++){const R=a+$;if(R>l)return;const A=$o(n,R),M=$===0?c:0,j=m[$];for(let U=0;U<j.length;U++){const O=j[U],ce=M+O[ae];if(R===l&&ce>=d)return;if(O.length===1){A.push([ce]);continue}const Ae=f+O[xn],de=O[kn],$e=O[_n];A.push(O.length===4?[ce,Ae,de,$e]:[ce,Ae,de,$e,v+O[go]])}}}b(_o,"me");P(_o,"addSection");function wt(t,e){for(let n=0;n<e.length;n++)t.push(e[n])}b(wt,"G$1");P(wt,"append");function $o(t,e){for(let n=t.length;n<=e;n++)t[n]=[];return t[e]}b($o,"xe");P($o,"getLine");var Eo="`line` must be greater than 0 (lines start at line 1)",So="`column` must be greater than or equal to 0 (columns start at column 0)",_t=-1,Ft=1,zt=class{static{b(this,"R")}static{P(this,"TraceMap")}constructor(e,n){const r=typeof e=="string";if(!r&&e._decodedMemo)return e;const i=Rt(e),{version:o,file:s,names:a,sourceRoot:c,sources:l,sourcesContent:d}=i;this.version=o,this.file=s,this.names=a||[],this.sourceRoot=c,this.sources=l,this.sourcesContent=d,this.ignoreList=i.ignoreList||i.x_google_ignoreList||void 0;const p=ho(n,c);this.resolvedSources=l.map(p);const{mappings:h}=i;if(typeof h=="string")this._encoded=h,this._decoded=void 0;else if(Array.isArray(h))this._encoded=void 0,this._decoded=vo(h,r);else throw i.sections?new Error("TraceMap passed sectioned source map, please use FlattenMap export instead"):new Error(`invalid source map: ${JSON.stringify(i)}`);this._decodedMemo=Cn(),this._bySources=void 0,this._bySourceMemos=void 0}};function Co(t){var e,n;return(n=(e=t)._encoded)!=null?n:e._encoded=ro(t._decoded)}b(Co,"oe$1");P(Co,"encodedMappings");function Fe(t){var e;return(e=t)._decoded||(e._decoded=eo(t._encoded))}b(Fe,"O$3");P(Fe,"decodedMappings");function bl(t,e,n){const r=Fe(t);if(e>=r.length)return null;const i=r[e],o=lt(i,t._decodedMemo,e,n,Ft);return o===-1?null:i[o]}b(bl,"Oe");P(bl,"traceSegment");function Lo(t,e){let{line:n,column:r,bias:i}=e;if(n--,n<0)throw new Error(Eo);if(r<0)throw new Error(So);const o=Fe(t);if(n>=o.length)return ot(null,null,null,null);const s=o[n],a=lt(s,t._decodedMemo,n,r,i||Ft);if(a===-1)return ot(null,null,null,null);const c=s[a];if(c.length===1)return ot(null,null,null,null);const{names:l,resolvedSources:d}=t;return ot(d[c[xn]],c[kn]+1,c[_n],c.length===5?l[c[go]]:null)}b(Lo,"Le$1");P(Lo,"originalPositionFor");function yl(t,e){const{source:n,line:r,column:i,bias:o}=e;return Pn(t,n,r,i,o||Ft,!1)}b(yl,"ye$1");P(yl,"generatedPositionFor");function xl(t,e){const{source:n,line:r,column:i,bias:o}=e;return Pn(t,n,r,i,o||_t,!0)}b(xl,"Ce");P(xl,"allGeneratedPositionsFor");function kl(t,e){const n=Fe(t),{names:r,resolvedSources:i}=t;for(let o=0;o<n.length;o++){const s=n[o];for(let a=0;a<s.length;a++){const c=s[a],l=o+1,d=c[0];let p=null,h=null,f=null,v=null;c.length!==1&&(p=i[c[1]],h=c[2]+1,f=c[3]),c.length===5&&(v=r[c[4]]),e({generatedLine:l,generatedColumn:d,source:p,originalLine:h,originalColumn:f,name:v})}}}b(kl,"Ie");P(kl,"eachMapping");function Tn(t,e){const{sources:n,resolvedSources:r}=t;let i=n.indexOf(e);return i===-1&&(i=r.indexOf(e)),i}b(Tn,"re$1");P(Tn,"sourceIndex");function _l(t,e){const{sourcesContent:n}=t;if(n==null)return null;const r=Tn(t,e);return r===-1?null:n[r]}b(_l,"Ne");P(_l,"sourceContentFor");function $l(t,e){const{ignoreList:n}=t;if(n==null)return!1;const r=Tn(t,e);return r===-1?!1:n.includes(r)}b($l,"be$1");P($l,"isIgnored");function To(t,e){const n=new zt(Dt(t,[]),e);return n._decoded=t.mappings,n}b(To,"se$1");P(To,"presortedDecodedMap");function El(t){return Dt(t,Fe(t))}b(El,"Re$1");P(El,"decodedMap");function Sl(t){return Dt(t,Co(t))}b(Sl,"we$2");P(Sl,"encodedMap");function Dt(t,e){return{version:t.version,file:t.file,names:t.names,sourceRoot:t.sourceRoot,sources:t.sources,sourcesContent:t.sourcesContent,mappings:e,ignoreList:t.ignoreList||t.x_google_ignoreList}}b(Dt,"B");P(Dt,"clone");function ot(t,e,n,r){return{source:t,line:e,column:n,name:r}}b(ot,"b$4");P(ot,"OMapping");function qe(t,e){return{line:t,column:e}}b(qe,"y$3");P(qe,"GMapping");function lt(t,e,n,r,i){let o=ko(t,r,e,n);return Le?o=(i===_t?En:Sn)(t,r,o):i===_t&&o++,o===-1||o===t.length?-1:o}b(lt,"w$3");P(lt,"traceSegmentInternal");function Po(t,e,n,r,i){let o=lt(t,e,n,r,Ft);if(!Le&&i===_t&&o++,o===-1||o===t.length)return[];const s=Le?r:t[o][ae];Le||(o=Sn(t,s,o));const a=En(t,s,o),c=[];for(;o<=a;o++){const l=t[o];c.push(qe(l[mo]+1,l[fo]))}return c}b(Po,"Ue");P(Po,"sliceGeneratedPositions");function Pn(t,e,n,r,i,o){var s,a;if(n--,n<0)throw new Error(Eo);if(r<0)throw new Error(So);const{sources:c,resolvedSources:l}=t;let d=c.indexOf(e);if(d===-1&&(d=l.indexOf(e)),d===-1)return o?[]:qe(null,null);const p=(s=t)._bySourceMemos||(s._bySourceMemos=c.map(Cn)),h=((a=t)._bySources||(a._bySources=yo(Fe(t),p)))[d][n];if(h==null)return o?[]:qe(null,null);const f=p[d];if(o)return Po(h,f,n,r,i);const v=lt(h,f,n,r,i);if(v===-1)return qe(null,null);const m=h[v];return qe(m[mo]+1,m[fo])}b(Pn,"ie$1");P(Pn,"generatedPosition");var Cl=Object.defineProperty,oe=b((t,e)=>Cl(t,"name",{value:e,configurable:!0}),"f$5");const Ll=/`((?:[^`$]|\$\{[^}]+\})*)`/g,hr=/\$\{[^}]+\}/g,Tl=/[.*+?^${}()|[\]\\]/g,Ro=[/new Error\(/,/throw new Error\(/,/new Error`/,/throw new Error`/,/new [A-Z]\w*\(/,/throw new [A-Z]\w*\(/,/new [A-Z]\w*`/,/throw new [A-Z]\w*`/],Te=oe(t=>t.replaceAll(Tl,String.raw`\$&`),"escapeRegex"),Pl=oe(t=>{const e=Te(t);return[t,`new Error("${e}")`,`new Error('${e}')`,`new Error(\`${Te(t)}\`)`,`throw new Error("${e}")`,`throw new Error('${e}')`,`throw new Error(\`${Te(t)}\`)`,`Error("${e}")`,`Error('${e}')`]},"createErrorPatterns"),gr=oe((t,e)=>{const n=[...t.matchAll(Ll)];for(const r of n){const i=r[1];if(!i)continue;const o=i.split(hr);if(o.every(a=>a===""||e.includes(a))&&o.length>1)return!0;if(!i)continue;const s=i.replaceAll(hr,"(.+?)");try{if(new RegExp(`^${Te(s)}$`).test(e))return!0}catch{}}return!1},"checkTemplateLiteralMatch"),Rl=[/Failed to resolve import ["']([^"']+)["'](?:\s+from ["']([^"']+)["'])?/,/(.+?)\s+from line \d+/,/(.+?)\s+is not defined/,/(.+?)\s+is not a function/,/Cannot read properties of (.+?)\s+\(reading (.+?)\)/],Fl=oe(t=>{for(const e of Rl){const n=t.match(e);if(n)return n}},"findDynamicErrorMatch"),mr=oe(t=>{let e,n;for(const r of Ro){const i=t.match(r);i&&(!e||r.source.includes("throw")&&!n?.source.includes("throw"))&&(e=i,n=r)}return{bestMatch:e,bestPattern:n}},"findBestErrorConstructor"),fr=oe((t,e)=>{let n=t.index??0;if(e.source.includes("throw new")&&t[0].startsWith("throw new")){const r=t[0].indexOf("new");r!==-1&&(n+=r)}return n+1},"calculateActualColumn"),zl=oe((t,e,n=0)=>{if(!t||!e)return;const r=t.split(`
1897
1897
  `),i=Fl(e),o=Pl(e),s=oe((p,h,f)=>{let v=0;for(const[m,k]of p.entries()){if(!k)continue;const L=k.includes(h)||gr(k,h),T=Ro.some($=>$.test(k));if(L&&T){const{bestMatch:$,bestPattern:R}=mr(k);if($&&R&&(v+=1,v>f))return{column:fr($,R),line:m+1}}}},"processErrorConstructorLines")(r,e,n);if(s)return s;i&&oe((p,h,f)=>{if(p[0].includes("Failed to resolve import")){const v=p[1];if(!v)return;const m=Te(v);f.unshift(`import.*from ["']${m}["']`,`import.*["']${m}["']`,v)}else if(p[0].includes("is not defined")){const v=p[1];if(!v)return;f.unshift(v,`{${v}}`,`src={${v}}`,`${v}.`,`=${v}`)}else if(p[0].includes("Cannot read properties")){const v=p[1],m=p[2];if(!m)return;f.unshift(m,`${v}.${m}`,`${v}?.${m}`,`${v}[${m}]`)}else{const v=p[1];if(!v)return;const m=Te(h),k=Te(v);f.unshift(`new Error(\`${k}`,`throw new Error(\`${k}`,`new Error("${k}`,`new Error('${k}`,`throw new Error("${k}`,`throw new Error('${k}`,`new Error("${m}")`,`new Error('${m}')`,`throw new Error("${m}")`,`throw new Error('${m}')`,`new Error(\`${m}\`)`,`throw new Error(\`${m}\`)`)}},"addDynamicPatterns")(i,e,o);const a=oe((p,h,f)=>{let v=0;for(const[m,k]of p.entries()){if(!k||!gr(k,h))continue;const{bestMatch:L,bestPattern:T}=mr(k);if(L&&T&&(v+=1,v>f))return{column:fr(L,T),line:m+1}}},"processTemplateLiteralLines"),c=oe((p,h,f,v)=>{if(!v)return p+1;if(v[0].includes("Failed to resolve import")){const m=v[1];if(f.includes(`"${m}"`)||f.includes(`'${m}'`)){const k=f.includes(`"${m}"`)?'"':"'";return f.indexOf(`${k}${m}${k}`)+1}}else if(v[0].includes("is not defined")){const m=v[1];if(m&&h===m)return p+1;if(m&&h.includes(m))return p+h.indexOf(m)+1}else if(v[0].includes("Cannot read properties")){const m=v[2];if(m&&h.includes(m))return p+h.indexOf(m)+1}else if(h.includes("new Error("))return f.indexOf("new Error(")+1;return p+1},"calculatePatternColumn"),l=oe((p,h,f,v)=>{let m=0;for(const[k,L]of p.entries()){if(!L)continue;let T=-1,$;for(const R of h){const A=L.indexOf(R);A!==-1&&(T===-1||A<T)&&(T=A,$=R)}if(T!==-1&&$&&(m+=1,m>v))return{column:c(T,$,L,f),line:k+1}}},"processPatternLines");return a(r,e,n)||l(r,o,i,n)},"findErrorInSourceCode");var Dl=Object.defineProperty,ct=b((t,e)=>Dl(t,"name",{value:e,configurable:!0}),"m$4");const Al=1,Ml=/^\//,vr=ct((t,e)=>{const n=Math.max(1,t),r=Math.max(0,e);let i,o;return n>=20?i=Math.max(1,Math.round(n*.5)):n>15?i=Math.max(1,Math.round(n*.6)):n>10?i=Math.max(1,n-8):i=Math.max(1,n-3),r>=10||r>7?o=Math.max(0,r-1):r>5?o=Math.max(0,r):o=r,{estimatedColumn:o,estimatedLine:i}},"estimateOriginalPosition"),Il=ct((t,e,n)=>{try{const r=new zt(t);if(e<=0)return;const i=[{column:n,desc:"original",line:e},{column:Math.max(0,n-Al),desc:"offset",line:e},{column:n,desc:"line above",line:e-1},{column:n,desc:"line below",line:e+1},...Array.from({length:5},(o,s)=>({column:Math.max(0,n-2+s),desc:`col ${n-2+s}`,line:e}))].filter(o=>o.line>0);for(const o of i){const s=Lo(r,{column:o.column,line:o.line});if(s.source&&s.line!==void 0&&s.column!==void 0&&s.line>0&&s.column>=0)return{column:s.column,line:s.line,source:s.source}}}catch(r){console.warn("Source map processing failed:",r)}},"resolveSourceMapPosition"),Bl=ct((t,e)=>e?Zr(t)?jl(t,e):e:t,"resolveSourcePath"),jl=ct((t,e)=>{try{const n=new URL(t),r=(n.pathname||"").replace(Ml,""),i=r.includes("/")?r.slice(0,Math.max(0,r.lastIndexOf("/"))):"";return`${n.origin}/${i?`${i}/`:""}${e}`}catch(n){return console.warn("URL parsing failed for source path resolution:",n),t}},"resolveHttpSourcePath"),Kt=ct(async(t,e,n,r,i,o,s=0)=>{if(o&&e)try{let c;if(e.transformResult?.map?.sourcesContent?.[0]?[c]=e.transformResult.map.sourcesContent:e.transformResult?.code&&(c=e.transformResult.code),!c&&(e.id||e.url)){const l=e.id||e.url;if(l)try{const d=await t.transformRequest(l);d?.map&&"sourcesContent"in d.map&&d.map.sourcesContent?.[0]?[c]=d.map.sourcesContent:d?.code&&(c=d.code)}catch(d){console.warn("Failed to get fresh source for error search:",d)}}if(!c&&n)try{const l=await import("node:fs/promises");let d=n;if(n.includes("://"))try{d=new URL(n).pathname}catch{const p=n.indexOf("://");p!==-1&&(d=n.slice(p+3))}d.startsWith("/")||(d=`${t.config.root||process.cwd()}/${d}`),c=await l.readFile(d,"utf8")}catch(l){console.warn("Failed to read source file from disk:",l)}if(c){const l=zl(c,o,s);if(l)return{originalFileColumn:l.column,originalFileLine:l.line,originalFilePath:n}}}catch(c){console.warn("Source code search failed:",c)}let a=e?.transformResult?.map;if(!a&&(e?.id||e?.url)){const c=e.id||e.url;if(c)try{const l=await t.transformRequest(c);l?.map&&(a=l.map)}catch(l){console.warn("Failed to get fresh source map:",l)}}if(!a){const{estimatedColumn:c,estimatedLine:l}=vr(r,i);return{originalFileColumn:c,originalFileLine:l,originalFilePath:n}}try{const c=Il(a,r,i);if(!c){const{estimatedColumn:d,estimatedLine:p}=vr(r,i);return{originalFileColumn:d,originalFileLine:p,originalFilePath:n}}const l=Bl(n,c.source);return{originalFileColumn:c.column,originalFileLine:c.line,originalFilePath:l}}catch(c){return console.warn("Source map resolution failed:",c),{originalFileColumn:i,originalFileLine:r,originalFilePath:n}}},"resolveOriginalLocation");var Ol=Object.defineProperty,Hl=b((t,e)=>Ol(t,"name",{value:e,configurable:!0}),"$e"),ql=Object.defineProperty,Rn=Hl((t,e)=>ql(t,"name",{value:e,configurable:!0}),"W"),Nl=Object.defineProperty,E=Rn((t,e)=>Nl(t,"name",{value:e,configurable:!0}),"u$1");let wr=E(()=>{var t=(()=>{var e=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.prototype.hasOwnProperty,o=E((u,g)=>{for(var w in g)e(u,w,{get:g[w],enumerable:!0})},"ne"),s=E((u,g,w,x)=>{if(g&&typeof g=="object"||typeof g=="function")for(let y of r(g))!i.call(u,y)&&y!==w&&e(u,y,{get:E(()=>g[y],"get"),enumerable:!(x=n(g,y))||x.enumerable});return u},"ae"),a=E(u=>s(e({},"__esModule",{value:!0}),u),"oe"),c={};o(c,{zeptomatch:E(()=>Gn,"zeptomatch")});var l=E(u=>{const g=new Set,w=[u];for(let x=0;x<w.length;x++){const y=w[x];if(g.has(y))continue;g.add(y);const{children:_}=y;if(_?.length)for(let C=0,I=_.length;C<I;C++)w.push(_[C])}return Array.from(g)},"M"),d=E(u=>{let g="";const w=l(u);for(let x=0,y=w.length;x<y;x++){const _=w[x];if(!_.regex)continue;const C=_.regex.flags;if(g||(g=C),g!==C)throw new Error(`Inconsistent RegExp flags used: "${g}" and "${C}"`)}return g},"se"),p=E((u,g,w)=>{const x=w.get(u);if(x!==void 0)return x;const y=u.partial??g;let _="";if(u.regex&&(_+=y?"(?:$|":"",_+=u.regex.source),u.children?.length){const C=f(u.children.map(I=>p(I,g,w)).filter(Boolean));if(C?.length){const I=u.children.some(Je=>!Je.regex||!(Je.partial??g)),J=C.length>1||y&&(!_.length||I);_+=J?y?"(?:$|":"(?:":"",_+=C.join("|"),_+=J?")":""}}return u.regex&&(_+=y?")":""),w.set(u,_),_},"O"),h=E((u,g)=>{const w=new Map,x=l(u);for(let y=x.length-1;y>=0;y--){const _=p(x[y],g,w);if(!(y>0))return _}return""},"ie"),f=E(u=>Array.from(new Set(u)),"ue"),v=E((u,g,w)=>v.compile(u,w).test(g),"R");v.compile=(u,g)=>{const w=g?.partial??!1,x=h(u,w),y=d(u);return new RegExp(`^(?:${x})$`,y)};var m=v,k=E((u,g)=>{const w=m.compile(u,g),x=`${w.source.slice(0,-1)}[\\\\/]?$`,y=w.flags;return new RegExp(x,y)},"le"),L=k,T=E(u=>{const g=u.map(x=>x.source).join("|")||"$^",w=u[0]?.flags;return new RegExp(g,w)},"ve"),$=T,R=E(u=>Array.isArray(u),"j"),A=E(u=>typeof u=="function","_"),M=E(u=>u.length===0,"he"),j=(()=>{const{toString:u}=Function.prototype,g=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return w=>(w.length===0||w.length===1)&&g.test(u.call(w))})(),U=E(u=>typeof u=="number","de"),O=E(u=>typeof u=="object"&&u!==null,"xe"),ce=E(u=>u instanceof RegExp,"me"),Ae=(()=>{const u=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return g=>u.test(g.source)})(),de=(()=>{const u=/^[a-zA-Z0-9_-]+$/;return g=>u.test(g.source)&&!g.flags.includes("i")})(),$e=E(u=>typeof u=="string","A"),F=E(u=>u===void 0,"f"),H=E(u=>{const g=new Map;return w=>{const x=g.get(w);if(x!==void 0)return x;const y=u(w);return g.set(w,y),y}},"ye"),X=E((u,g,w={})=>{const x={cache:{},input:u,index:0,indexBacktrackMax:0,options:w,output:[]},y=xe(g)(x),_=Math.max(x.index,x.indexBacktrackMax);if(y&&x.index===u.length)return x.output;throw new Error(`Failed to parse at index ${_}`)},"I"),S=E((u,g)=>R(u)?Me(u,g):$e(u)?Ze(u,g):be(u,g),"i"),Me=E((u,g)=>{const w={};for(const x of u){if(x.length!==1)throw new Error(`Invalid character: "${x}"`);const y=x.charCodeAt(0);w[y]=!0}return x=>{const y=x.input;let _=x.index,C=_;for(;C<y.length&&y.charCodeAt(C)in w;)C+=1;if(C>_){if(!F(g)&&!x.options.silent){const I=y.slice(_,C),J=A(g)?g(I,y,`${_}`):g;F(J)||x.output.push(J)}x.index=C}return!0}},"we"),be=E((u,g)=>{if(de(u))return Ze(u.source,g);{const w=u.source,x=u.flags.replace(/y|$/,"y"),y=new RegExp(w,x);return Ae(u)&&A(g)&&!j(g)?ut(y,g):pt(y,g)}},"$e"),ut=E((u,g)=>w=>{const x=w.index,y=w.input;u.lastIndex=x;const _=u.exec(y);if(_){const C=u.lastIndex;if(!w.options.silent){const I=g(..._,y,`${x}`);F(I)||w.output.push(I)}return w.index=C,!0}else return!1},"Ee"),pt=E((u,g)=>w=>{const x=w.index,y=w.input;if(u.lastIndex=x,u.test(y)){const _=u.lastIndex;if(!F(g)&&!w.options.silent){const C=A(g)?g(y.slice(x,_),y,`${x}`):g;F(C)||w.output.push(C)}return w.index=_,!0}else return!1},"Ce"),Ze=E((u,g)=>w=>{const x=w.index,y=w.input;if(y.startsWith(u,x)){if(!F(g)&&!w.options.silent){const _=A(g)?g(u,y,`${x}`):g;F(_)||w.output.push(_)}return w.index+=u.length,!0}else return!1},"F"),Ie=E((u,g,w,x)=>{const y=xe(u),_=g>1;return Xe(ue(ye(C=>{let I=0;for(;I<w;){const J=C.index;if(!y(C)||(I+=1,C.index===J))break}return I>=g},_),x))},"k"),Ye=E((u,g)=>Ie(u,0,1,g),"L"),Be=E((u,g)=>Ie(u,0,1/0,g),"$"),je=E((u,g)=>Ie(u,1,1/0,g),"Re"),V=E((u,g)=>{const w=u.map(xe);return Xe(ue(ye(x=>{for(let y=0,_=w.length;y<_;y++)if(!w[y](x))return!1;return!0}),g))},"x"),Z=E((u,g)=>{const w=u.map(xe);return Xe(ue(x=>{for(let y=0,_=w.length;y<_;y++)if(w[y](x))return!0;return!1},g))},"p"),ye=E((u,g=!0,w=!1)=>{const x=xe(u);return g?y=>{const _=y.index,C=y.output.length,I=x(y);return!I&&!w&&(y.indexBacktrackMax=Math.max(y.indexBacktrackMax,y.index)),(!I||w)&&(y.index=_,y.output.length!==C&&(y.output.length=C)),I}:x},"q"),ue=E((u,g)=>{const w=xe(u);return g?x=>{if(x.options.silent)return w(x);const y=x.output.length;if(w(x)){const _=x.output.splice(y,1/0),C=g(_);return F(C)||x.output.push(C),!0}else return!1}:w},"B"),Xe=(()=>{let u=0;return g=>{const w=xe(g),x=u+=1;return y=>{var _;if(y.options.memoization===!1)return w(y);const C=y.index,I=(_=y.cache)[x]||(_[x]={indexMax:-1,queue:[]}),J=I.queue;if(C<=I.indexMax){const Ke=I.store||(I.store=new Map);if(J.length){for(let He=0,Hi=J.length;He<Hi;He+=2){const qi=J[He*2],Ni=J[He*2+1];Ke.set(qi,Ni)}J.length=0}const pe=Ke.get(C);if(pe===!1)return!1;if(U(pe))return y.index=pe,!0;if(pe)return y.index=pe.index,pe.output?.length&&y.output.push(...pe.output),!0}const Je=y.output.length,Oi=w(y);if(I.indexMax=Math.max(I.indexMax,C),Oi){const Ke=y.index,pe=y.output.length;if(pe>Je){const He=y.output.slice(Je,pe);J.push(C,{index:Ke,output:He})}else J.push(C,Ke);return!0}else return J.push(C,!1),!1}}})(),Dn=E(u=>{let g;return w=>(g||(g=xe(u())),g(w))},"G"),xe=H(u=>{if(A(u))return M(u)?Dn(u):u;if($e(u)||ce(u))return S(u);if(R(u))return V(u);if(O(u))return Z(Object.values(u));throw new Error("Invalid rule")}),Ee=E(u=>u,"d"),Bo=E(u=>typeof u=="string","ke"),jo=E(u=>{const g=new WeakMap,w=new WeakMap;return(x,y)=>{const _=y?.partial?w:g,C=_.get(x);if(C!==void 0)return C;const I=u(x,y);return _.set(x,I),I}},"Be"),Oo=E(u=>{const g={},w={};return(x,y)=>{const _=y?.partial?w:g;return _[x]??(_[x]=u(x,y))}},"Pe"),Ho=S(/\\./,Ee),qo=S(/./,Ee),No=S(/\*\*\*+/,"*"),Uo=S(/([^/{[(!])\*\*/,(u,g)=>`${g}*`),Go=S(/(^|.)\*\*(?=[^*/)\]}])/,(u,g)=>`${g}*`),Wo=Be(Z([Ho,No,Uo,Go,qo])),Vo=Wo,Zo=E(u=>X(u,Vo,{memoization:!1}).join(""),"Ie"),Yo=Zo,An="abcdefghijklmnopqrstuvwxyz",Xo=E(u=>{let g="";for(;u>0;){const w=(u-1)%26;g=An[w]+g,u=Math.floor((u-1)/26)}return g},"Le"),Mn=E(u=>{let g=0;for(let w=0,x=u.length;w<x;w++)g=g*26+An.indexOf(u[w])+1;return g},"V"),Mt=E((u,g)=>{if(g<u)return Mt(g,u);const w=[];for(;u<=g;)w.push(u++);return w},"b"),Qo=E((u,g,w)=>Mt(u,g).map(x=>String(x).padStart(w,"0")),"qe"),In=E((u,g)=>Mt(Mn(u),Mn(g)).map(Xo),"W"),Y=E(u=>({partial:!1,regex:new RegExp(u,"s"),children:[]}),"c"),Qe=E(u=>({children:u}),"y"),Oe=(()=>{const u=E((g,w,x)=>{if(x.has(g))return;x.add(g);const{children:y}=g;if(!y.length)y.push(w);else for(let _=0,C=y.length;_<C;_++)u(y[_],w,x)},"e");return g=>{if(!g.length)return Qe([]);for(let w=g.length-1;w>=1;w--){const x=new Set,y=g[w-1],_=g[w];u(y,_,x)}return g[0]}})(),ke=E(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),Jo=S(/\\./,Y),Ko=S(/[$.*+?^(){}[\]\|]/,u=>Y(`\\${u}`)),ei=S(/[\\\/]/,ke),ti=S(/[^$.*+?^(){}[\]\|\\\/]+/,Y),ni=S(/^(?:!!)*!(.*)$/,(u,g)=>Y(`(?!^${Gn.compile(g).source}$).*?`)),ri=S(/^(!!)+/),oi=Z([ni,ri]),ii=S(/\/(\*\*\/)+/,()=>Qe([Oe([ke(),Y(".+?"),ke()]),ke()])),si=S(/^(\*\*\/)+/,()=>Qe([Y("^"),Oe([Y(".*?"),ke()])])),ai=S(/\/(\*\*)$/,()=>Qe([Oe([ke(),Y(".*?")]),Y("$")])),li=S(/\*\*/,()=>Y(".*?")),Bn=Z([ii,si,ai,li]),ci=S(/\*\/(?!\*\*\/|\*$)/,()=>Oe([Y("[^\\\\/]*?"),ke()])),di=S(/\*/,()=>Y("[^\\\\/]*")),jn=Z([ci,di]),On=S("?",()=>Y("[^\\\\/]")),ui=S("[",Ee),pi=S("]",Ee),hi=S(/[!^]/,"^\\\\/"),gi=S(/[a-z]-[a-z]|[0-9]-[0-9]/i,Ee),mi=S(/\\./,Ee),fi=S(/[$.*+?^(){}[\|]/,u=>`\\${u}`),vi=S(/[\\\/]/,"\\\\/"),wi=S(/[^$.*+?^(){}[\]\|\\\/]+/,Ee),bi=Z([mi,fi,vi,gi,wi]),Hn=V([ui,Ye(hi),Be(bi),pi],u=>Y(u.join(""))),yi=S("{","(?:"),xi=S("}",")"),ki=S(/(\d+)\.\.(\d+)/,(u,g,w)=>Qo(+g,+w,Math.min(g.length,w.length)).join("|")),_i=S(/([a-z]+)\.\.([a-z]+)/,(u,g,w)=>In(g,w).join("|")),$i=S(/([A-Z]+)\.\.([A-Z]+)/,(u,g,w)=>In(g.toLowerCase(),w.toLowerCase()).join("|").toUpperCase()),Ei=Z([ki,_i,$i]),qn=V([yi,Ei,xi],u=>Y(u.join(""))),Si=S("{"),Ci=S("}"),Li=S(","),Ti=S(/\\./,Y),Pi=S(/[$.*+?^(){[\]\|]/,u=>Y(`\\${u}`)),Ri=S(/[\\\/]/,ke),Fi=S(/[^$.*+?^(){}[\]\|\\\/,]+/,Y),zi=Dn(()=>Un),Di=S("",()=>Y("(?:)")),Ai=je(Z([Bn,jn,On,Hn,qn,zi,Ti,Pi,Ri,Fi]),Oe),Nn=Z([Ai,Di]),Un=V([Si,Ye(V([Nn,Be(V([Li,Nn]))])),Ci],Qe),Mi=Be(Z([oi,Bn,jn,On,Hn,qn,Un,Jo,Ko,ei,ti]),Oe),Ii=Mi,Bi=E(u=>X(u,Ii,{memoization:!1})[0],"kr"),ji=Bi,It=E((u,g,w)=>It.compile(u,w).test(g),"N");It.compile=(()=>{const u=Oo((w,x)=>L(ji(Yo(w)),x)),g=jo((w,x)=>$(w.map(y=>u(y,x))));return(w,x)=>Bo(w)?u(w,x):g(w,x)})();var Gn=It;return a(c)})();return t.default||t},"_lazyMatch"),jt;const Ul=E((t,e)=>(jt||(jt=wr(),wr=null),jt(t,e)),"default");var Gl=Object.defineProperty,Wl=Rn((t,e)=>Gl(t,"name",{value:e,configurable:!0}),"t$1");const Vl=/^[A-Z]:\//i,ze=Wl((t="")=>t&&t.replaceAll("\\","/").replace(Vl,e=>e.toUpperCase()),"normalizeWindowsPath");var Zl=Object.defineProperty,ne=Rn((t,e)=>Zl(t,"name",{value:e,configurable:!0}),"r");const Yl=/^[/\\]{2}/,Xl=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,Fo=/^[A-Z]:$/i,br=/^\/([A-Z]:)?$/i,Ql=/.(\.[^./]+)$/,Jl=/^[/\\]|^[a-z]:[/\\]/i,Kl=/\/$/,ec=ne(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),zo=ne((t,e)=>{let n="",r=0,i=-1,o=0,s;for(let a=0;a<=t.length;++a){if(a<t.length)s=t[a];else{if(s==="/")break;s="/"}if(s==="/"){if(!(i===a-1||o===1))if(o===2){if(n.length<2||r!==2||!n.endsWith(".")||n.at(-2)!=="."){if(n.length>2){const c=n.lastIndexOf("/");c===-1?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}else if(n.length>0){n="",r=0,i=a,o=0;continue}}e&&(n+=n.length>0?"/..":"..",r=2)}else n.length>0?n+=`/${t.slice(i+1,a)}`:n=t.slice(i+1,a),r=a-i-1;i=a,o=0}else s==="."&&o!==-1?++o:o=-1}return n},"normalizeString"),st=ne(t=>Xl.test(t),"isAbsolute"),$t=ne(function(t){if(t.length===0)return".";t=ze(t);const e=Yl.exec(t),n=st(t),r=t.at(-1)==="/";return t=zo(t,!n),t.length===0?n?"/":r?"./":".":(r&&(t+="/"),Fo.test(t)&&(t+="/"),e?n?`//${t}`:`//./${t}`:n&&!st(t)?`/${t}`:t)},"normalize");ne((...t)=>{let e="";for(const n of t)if(n)if(e.length>0){const r=e.at(-1)==="/",i=n[0]==="/";r&&i?e+=n.slice(1):e+=r||i?n:`/${n}`}else e+=n;return $t(e)},"join");const Et=ne(function(...t){t=t.map(r=>ze(r));let e="",n=!1;for(let r=t.length-1;r>=-1&&!n;r--){const i=r>=0?t[r]:ec();!i||i.length===0||(e=`${i}/${e}`,n=st(i))}return e=zo(e,!n),n&&!st(e)?`/${e}`:e.length>0?e:"."},"resolve");ne(function(t){return ze(t)},"toNamespacedPath");const tc=ne(function(t){return Ql.exec(ze(t))?.[1]??""},"extname");ne(function(t,e){const n=Et(t).replace(br,"$1").split("/"),r=Et(e).replace(br,"$1").split("/");if(r[0][1]===":"&&n[0][1]===":"&&n[0]!==r[0])return r.join("/");const i=[...n];for(const o of i){if(r[0]!==o)break;n.shift(),r.shift()}return[...n.map(()=>".."),...r].join("/")},"relative");const nc=ne(t=>{const e=ze(t).replace(Kl,"").split("/").slice(0,-1);return e.length===1&&Fo.test(e[0])&&(e[0]=`${e[0]}/`),e.join("/")||(st(t)?"/":".")},"dirname");ne(function(t){const e=[t.root,t.dir,t.base??t.name+t.ext].filter(Boolean);return ze(t.root?Et(...e):e.join("/"))},"format");const rc=ne((t,e)=>{const n=ze(t).split("/").pop();return e&&n.endsWith(e)?n.slice(0,-e.length):n},"basename");ne(function(t){const e=Jl.exec(t)?.[0]?.replaceAll("\\","/")??"",n=rc(t),r=tc(n);return{base:n,dir:nc(t),ext:r,name:n.slice(0,n.length-r.length),root:e}},"parse");ne((t,e)=>Ul(e,$t(t)),"matchesGlob");var oc=Object.defineProperty,le=b((t,e)=>oc(t,"name",{value:e,configurable:!0}),"e$1");const en="/",yr=":",ic="at ",sc=/https?:\/\/[^\s)]+/g,ac=/file:\/\//g,Do=/\/@fs\//g,lc=/\([^)]*:\d+:\d+\)/,cc=/\([^)]*:\d+\)/,dc=/[^(\s][^:]*:\d+:\d+/,uc=/[^(\s][^:]*:\d+/,pc=/:(\d+)(?::(\d+))?$/,hc=/\n/,gc=new Set([".cjs",".js",".jsx",".mjs",".svelte",".ts",".tsx",".vue"]),mc=new Set(["<anonymous>","<unknown>","native"]),fc=le(t=>{const e=t.match(pc),n=e?.[1],r=e?.[2];return{baseUrl:e?t.slice(0,-e[0].length):t,col:r,line:n}},"parseUrlWithLocation"),vc=le((t,e)=>{const n=new URL(t);let r=decodeURIComponent(n.pathname||"");return r=r.replaceAll(Do,en),Et(e,r.startsWith(en)?r.slice(1):r)},"urlToAbsolutePath"),wc=le((t,e,n)=>{if(!e)return t;const r=n?`${yr}${n}`:"";return`${t}${yr}${e}${r}`},"formatAbsolutePath"),bc=le(t=>{const e=t.trim();return!e.startsWith(ic)||!([...gc].some(n=>e.includes(n))||[...mc].some(n=>e.includes(n)))?!1:lc.test(e)||cc.test(e)||dc.test(e)||uc.test(e)||e.includes("native")||e.includes("<unknown>")},"isValidStackFrame"),yc=le(t=>{let e=t.replaceAll(Do,en);return e=e.replaceAll(ac,""),e.includes("<unknown>")?e.trim()||"":e.trim()&&!bc(e)?"":e},"cleanStackLine"),xc=le((t,e)=>{try{const{baseUrl:n,col:r,line:i}=fc(t),o=vc(n,e);return wc(o,i,r)}catch(n){return console.warn("Failed to absolutize URL:",t,n),t}},"absolutizeUrl"),Fn=le(t=>t&&t.replaceAll(`\r
1898
1898
  `,`
1899
1899
  `).replaceAll("\r",`
@@ -1909,7 +1909,7 @@ ${Qs};`,s},"patchOverlay");var sa=Object.defineProperty,W=b((t,e)=>sa(t,"name",{
1909
1909
  at $1 $2`).replaceAll(qc,`
1910
1910
  at $1 $2`).replaceAll(Nc,`
1911
1911
  at $1 <$2>:0:0`),r=r.replaceAll(Uc,`
1912
- at $1 <unknown>:0:0`)),!r.includes("<unknown>")&&!r.includes("react-dom")&&!r.includes("react"))return r;const i=Ne({stack:r}),o=await Promise.all(i.map(async s=>{const{file:a}=s,c=s.line??0,l=s.column??0;if(a&&a!=="<unknown>"&&c>0&&l>0&&!a.includes("react-dom")&&!a.includes("react"))return s;if(!a||c<=0||l<=0){if((a==="<unknown>"||a&&(a.includes("react-dom")||a.includes("react")))&&s.methodName){const{methodName:d}=s,p={batchedUpdates:"Batch Updates",dispatchEvent:"Event System",executeDispatch:"Event Dispatcher",processDispatchQueue:"Event Queue",runWithFiber:"Fiber Reconciliation"};for(const[h,f]of Object.entries(p))if(d.includes(h))return{...s,column:0,file:`[React] ${f}`,line:0};if(!d.includes("$")&&!d.includes("anonymous")){const h=Ce(d),f=it(t,h);if(f){const v=await Kt(t,f,"",1,1);if(v.originalFilePath)return{...s,column:v.originalFileColumn||1,file:v.originalFilePath,line:v.originalFileLine||1}}}}return s}try{const d=Ce(a),p=it(t,d);if(!p)return s;const h=await Kt(t,p,a,c,l);return{...s,column:h.originalFileColumn,file:h.originalFilePath,line:h.originalFileLine}}catch{return s}}));return Sr(o,{header:n})},"remapStackToOriginal");var Wc=Object.defineProperty,dt=b((t,e)=>Wc(t,"name",{value:e,configurable:!0}),"t");const Vc=dt(t=>!!(t&&Array.isArray(t.sources)&&Array.isArray(t.sourcesContent)),"isValidSourceMap"),Ot=dt(t=>{if(typeof t=="string")return t},"getSourceContent"),Zc=dt((t,e)=>t===e||t.endsWith(e)||e.endsWith(t),"isPartialMatch"),Yc=dt((t,e)=>{if(!t||t.length===0)return-1;const n=t.indexOf(e);if(n!==-1)return n;if(!(e.includes("\\")||e.includes("/")))return-1;const r=$t(e),i=t.indexOf(r);if(i!==-1)return i;for(const[o,s]of t.entries()){if(!s||typeof s!="string")continue;const a=$t(s);if(Zc(a,r))return o}return-1},"findSourceIndex"),xr=dt((t,e)=>{if(!Vc(t))return;if(!e&&t.sourcesContent?.[0])return Ot(t.sourcesContent[0]);const n=Yc(t.sources,e||"");return n>=0&&t.sourcesContent?.[n]?Ot(t.sourcesContent[n]):t.sourcesContent?.[0]?Ot(t.sourcesContent[0]):void 0},"getSourceFromMap");var Xc=Object.defineProperty,Qc=b((t,e)=>Xc(t,"name",{value:e,configurable:!0}),"f");const kr=Qc(async(t,e,n,r)=>{let i,o;if(e&&typeof e=="object"&&"transformResult"in e&&e.transformResult){const a=e.transformResult;a.code&&!o&&(o=a.code),a.map&&!i&&(i=xr(a.map,n))}const s=e&&typeof e=="object"&&("id"in e&&e.id||"url"in e&&e.url)?"id"in e&&e.id||"url"in e&&e.url:r[0];if(s&&(!i||!o))try{const a=await t.transformRequest(s);if(a?.code&&!o&&(o=a.code),a?.map&&!i){const{map:c}=a,l=c;typeof c=="object"&&c!==null&&"mappings"in c&&l.mappings!==""&&(i=xr(l,n))}}catch{}if(!i&&e&&typeof e=="object"&&"file"in e&&e.file)try{i=await Er(e.file,"utf8")}catch{}return{compiledSourceText:o,originalSourceText:i}},"retrieveSourceTexts");var Jc=Object.defineProperty,Kc=b((t,e)=>Jc(t,"name",{value:e,configurable:!0}),"a");const ed=Kc((t={})=>{const{classActivePre:e="has-diff",classLineAdd:n="diff add",classLineRemove:r="diff remove"}=t;return{code(i){this.addClassToHast(this.pre,e),i.children.filter(o=>o.type==="element").forEach(o=>{for(const s of o.children){if(s.type!=="element")continue;const a=s.children[0];a.type==="text"&&(a.value.startsWith("[!code ++]")&&(a.value=a.value.slice(10),this.addClassToHast(o,n)),a.value.startsWith("[!code --]")&&(a.value=a.value.slice(10),this.addClassToHast(o,r)))}})},name:"shiki-diff"}},"shikiDiffTransformer");var td=Object.defineProperty,nd=b((t,e)=>td(t,"name",{value:e,configurable:!0}),"r");const rd=nd((t,e)=>!e||t.includes("?")?t:t+e,"addQueryToUrl");var od=Object.defineProperty,id=b((t,e)=>od(t,"name",{value:e,configurable:!0}),"e");const sd=id(t=>{try{return new URL(t).search}catch{return""}},"extractQueryFromHttpUrl");var ad=Object.defineProperty,De=b((t,e)=>ad(t,"name",{value:e,configurable:!0}),"w");const ld=/[&<>"']/g,_r=/^https?:\/\/[^/]+/,$r=/^\//,cd={'"':"&quot;","&":"&amp;","'":"&#39;","<":"&lt;",">":"&gt;"},tn=De(t=>t.replaceAll(ld,e=>cd[e]||e),"escapeHtml"),dd=De(t=>Array.isArray(t)&&qa(t)?Na(t).map(e=>({message:e.message||"ESBuild error",name:e.name||"Error",stack:e.stack||""})):$c(t),"extractIndividualErrors"),ud=De(t=>{const e=Ne(t,{frameLimit:10}),n=e?.find(r=>r?.file?.startsWith("http"))||e?.[0];return{compiledColumn:n?.column??0,compiledFilePath:n?.file??"",compiledLine:n?.line??0}},"extractLocationFromStack"),pd=De(async(t,e,n,r,i,o,s=0,a)=>{const c=i?.originalFilePath||e,l=i?.line??r,d=i?.column??n;if(c){let p=c,h=c;if(c.startsWith("http://")||c.startsWith("https://"))try{p=new URL(c).pathname,p.startsWith("/")&&(p=p.slice(1));const L=t.config.root||process.cwd();h=p.startsWith("/")?p:`${L}/${p}`}catch{console.warn("Failed to parse HTTP URL:",c)}const f=Ce(p),v=it(t,f);if(v)try{const L=await Kt(t,v,e||a||p,l,d,o,s),T=h||L.originalFilePath;return{originalFileColumn:L.originalFileColumn,originalFileLine:L.originalFileLine,originalFilePath:T}}catch{console.warn("Source map resolution failed, using estimation")}let m,k=d;return l>=20?m=Math.max(1,Math.round(l*.5)):l>15?m=Math.max(1,Math.round(l*.6)):l>10?m=Math.max(1,l-8):m=Math.max(1,l-3),d>=10||d>7?k=Math.max(0,d-1):d>5&&(k=Math.max(0,d)),{originalFileColumn:k,originalFileLine:m,originalFilePath:h||c}}return{originalFileColumn:d,originalFileLine:l,originalFilePath:c}},"resolveOriginalLocationInfo"),hd=De((t,e,n,r,i,o)=>({compiledCodeFrameContent:void 0,compiledColumn:t,compiledFilePath:e,compiledLine:n,fixPrompt:"",originalCodeFrameContent:void 0,originalFileColumn:r,originalFileLine:i,originalFilePath:o,originalSnippet:""}),"createEmptyResult"),gd=De(async(t,e,n,r,i,o)=>{let s,a;const c=Ue(n),l=Ue(r)||c;if(c==="text"&&t&&t.trim()&&(s=`<pre class="shiki"><code>${tn(t)}</code></pre>`),l==="text"&&e&&e.trim()&&(a=`<pre class="shiki"><code>${tn(e)}</code></pre>`),c==="text"&&l==="text")return{compiledCodeFrameContent:a,originalCodeFrameContent:s};const d=await Gr([l,c]),p={themes:{dark:"min-dark",light:"min-light"}};if(t&&t.trim())try{s=d.codeToHtml(t,{...p,lang:c,transformers:[lr([{classes:["error-line"],line:i}])]})}catch{}if(e&&e.trim())try{a=d.codeToHtml(e,{...p,lang:l,transformers:[lr([{classes:["error-line"],line:o}])]})}catch{}return{compiledCodeFrameContent:a,originalCodeFrameContent:s}},"generateSyntaxHighlightedFrames"),md=De(async(t,e,n=0,r,i,o)=>{const s=r==="vue"&&t?.message?Tc(t.message):void 0,a=dd(t),c=a[0]||t,l=r==="react"&&t.message&&(t.message.toLowerCase().includes("hydration")||t.message.toLowerCase().includes("hydrating"));let d="";if(o&&o.length>1)for(const F of o.slice(1)){const H=F.stack||"",X=Ne({stack:H},{frameLimit:10})?.find(S=>S?.file?.startsWith("http"));if(X?.file&&(d=sd(X.file),d))break}const p=kc(c),h=Fn(c.stack||""),f=await Gc(e,h,{message:p,name:c.name});let v,m,k;if(i?.file&&i?.line&&i?.column)v=i.column,m=i.file,k=i.line;else{const F=ud(c);if(v=F.compiledColumn,m=F.compiledFilePath,k=F.compiledLine,m&&!m.startsWith("http")){const H=e.config.root;let X=m;m.startsWith(H)&&(X=m.slice(H.length)),X.startsWith("/")||(X=`/${X}`);const S=e.config.server.port||e.config.preview?.port||5173,Me=e.config.server.host||e.config.preview?.host||"localhost";let be=`${e.config.server.https?"https":"http"}://${Me}:${S}${X}`;d&&(be=rd(be,d)),m=be}}if(l){const F=Ic(t);if(F){const H=m?Ue(m):"javascript";if(H==="text")return{errorCount:1,fixPrompt:Bt({applicationType:void 0,error:c,file:{file:m,language:"jsx",line:k,snippet:F}}),message:c.message,originalCodeFrameContent:`<pre class="shiki"><code>${tn(F)}</code></pre>`,originalFileColumn:v,originalFileLine:k,originalFilePath:m,originalSnippet:F,originalStack:c.stack||""};const X=await Gr([H]);return{errorCount:1,fixPrompt:Bt({applicationType:void 0,error:c,file:{file:m,language:"jsx",line:k,snippet:F}}),message:c.message,originalCodeFrameContent:X.codeToHtml(F,{lang:H,themes:{dark:"min-dark",light:"min-light"},transformers:[ed()]}),originalFileColumn:v,originalFileLine:k,originalFilePath:m,originalSnippet:F,originalStack:c.stack||""}}}let L=i?.file||m;if(!i?.file&&c.stack){const F=Ne(c,{frameLimit:10})?.find(H=>H?.file&&!H.file.startsWith("http")&&!H.file.includes("node_modules")&&!H.file.includes(".vite")&&H.file.includes(".tsx"));F?.file&&(L=F.file)}let{originalFileColumn:T,originalFileLine:$,originalFilePath:R}=await pd(e,L,v,k,s,c.message,n,m);const A=i?.plugin;let M="",j="",U,O;try{const[F,H]=await Promise.all([it(e,Ce(m)),it(e,Ce(R))]);if(!F&&!H)return hd(v,m,k,T,$,R);const X=m.startsWith("http")?m.replace(_r,"").replace($r,""):m,S=R.startsWith("http")?R.replace(_r,"").replace($r,""):R,Me=F||H;if(Me?.transformResult?.code&&(O=Me.transformResult.code),H?.transformResult?.map&&!U){const V=H.transformResult.map;try{const Z=V.sourcesContent?.[0];Z&&(U=Z)}catch(Z){console.warn("Failed to get original source from source map:",Z)}}const be={compiledSourceText:void 0,originalSourceText:void 0};let ut=Promise.resolve(be);!O&&F&&(ut=kr(e,F,X,Ce(X)));let pt=Promise.resolve(be);!U&&H&&(pt=kr(e,H,S,Ce(S)));const[Ze,Ie]=await Promise.all([ut,pt]);if(!O&&Ze.compiledSourceText&&({compiledSourceText:O}=Ze),!U&&Ie.originalSourceText&&({originalSourceText:U}=Ie),U){if(O&&$<=0&&k>0){const V=ll(O,k,v,U);V&&($=V.line,T=V.column)}try{M=Vn(U,{start:{column:Math.max(1,T),line:Math.max(1,$)}},{showGutter:!1})}catch{M=U?.slice(0,500)||""}}const Ye=O&&k>0,Be=$>0&&T>0;let je=!1;if(Ye&&k>0&&c.message&&O){const V=O.split(`
1912
+ at $1 <unknown>:0:0`)),!r.includes("<unknown>")&&!r.includes("react-dom")&&!r.includes("react"))return r;const i=Ne({stack:r}),o=await Promise.all(i.map(async s=>{const{file:a}=s,c=s.line??0,l=s.column??0;if(a&&a!=="<unknown>"&&c>0&&l>0&&!a.includes("react-dom")&&!a.includes("react"))return s;if(!a||c<=0||l<=0){if((a==="<unknown>"||a&&(a.includes("react-dom")||a.includes("react")))&&s.methodName){const{methodName:d}=s,p={batchedUpdates:"Batch Updates",dispatchEvent:"Event System",executeDispatch:"Event Dispatcher",processDispatchQueue:"Event Queue",runWithFiber:"Fiber Reconciliation"};for(const[h,f]of Object.entries(p))if(d.includes(h))return{...s,column:0,file:`[React] ${f}`,line:0};if(!d.includes("$")&&!d.includes("anonymous")){const h=Ce(d),f=it(t,h);if(f){const v=await Kt(t,f,"",1,1);if(v.originalFilePath)return{...s,column:v.originalFileColumn||1,file:v.originalFilePath,line:v.originalFileLine||1}}}}return s}try{const d=Ce(a),p=it(t,d);if(!p)return s;const h=await Kt(t,p,a,c,l);return{...s,column:h.originalFileColumn,file:h.originalFilePath,line:h.originalFileLine}}catch{return s}}));return Sr(o,{header:n})},"remapStackToOriginal");var Wc=Object.defineProperty,dt=b((t,e)=>Wc(t,"name",{value:e,configurable:!0}),"t");const Vc=dt(t=>!!(t&&Array.isArray(t.sources)&&Array.isArray(t.sourcesContent)),"isValidSourceMap"),Ot=dt(t=>{if(typeof t=="string")return t},"getSourceContent"),Zc=dt((t,e)=>t===e||t.endsWith(e)||e.endsWith(t),"isPartialMatch"),Yc=dt((t,e)=>{if(!t||t.length===0)return-1;const n=t.indexOf(e);if(n!==-1)return n;if(!(e.includes("\\")||e.includes("/")))return-1;const r=$t(e),i=t.indexOf(r);if(i!==-1)return i;for(const[o,s]of t.entries()){if(!s||typeof s!="string")continue;const a=$t(s);if(Zc(a,r))return o}return-1},"findSourceIndex"),xr=dt((t,e)=>{if(!Vc(t))return;if(!e&&t.sourcesContent?.[0])return Ot(t.sourcesContent[0]);const n=Yc(t.sources,e||"");return n>=0&&t.sourcesContent?.[n]?Ot(t.sourcesContent[n]):t.sourcesContent?.[0]?Ot(t.sourcesContent[0]):void 0},"getSourceFromMap");var Xc=Object.defineProperty,Qc=b((t,e)=>Xc(t,"name",{value:e,configurable:!0}),"f");const kr=Qc(async(t,e,n,r)=>{let i,o;if(e&&typeof e=="object"&&"transformResult"in e&&e.transformResult){const a=e.transformResult;a.code&&!o&&(o=a.code),a.map&&!i&&(i=xr(a.map,n))}const s=e&&typeof e=="object"&&("id"in e&&e.id||"url"in e&&e.url)?"id"in e&&e.id||"url"in e&&e.url:r[0];if(s&&(!i||!o))try{const a=await t.transformRequest(s);if(a?.code&&!o&&(o=a.code),a?.map&&!i){const{map:c}=a,l=c;typeof c=="object"&&c!==null&&"mappings"in c&&l.mappings!==""&&(i=xr(l,n))}}catch{}if(!i&&e&&typeof e=="object"&&"file"in e&&e.file)try{i=await Er(e.file,"utf8")}catch{}return{compiledSourceText:o,originalSourceText:i}},"retrieveSourceTexts");var Jc=Object.defineProperty,Kc=b((t,e)=>Jc(t,"name",{value:e,configurable:!0}),"a");const ed=Kc((t={})=>{const{classActivePre:e="has-diff",classLineAdd:n="diff add",classLineRemove:r="diff remove"}=t;return{code(i){this.addClassToHast(this.pre,e),i.children.filter(o=>o.type==="element").forEach(o=>{for(const s of o.children){if(s.type!=="element")continue;const a=s.children[0];a.type==="text"&&(a.value.startsWith("[!code ++]")&&(a.value=a.value.slice(10),this.addClassToHast(o,n)),a.value.startsWith("[!code --]")&&(a.value=a.value.slice(10),this.addClassToHast(o,r)))}})},name:"shiki-diff"}},"shikiDiffTransformer");var td=Object.defineProperty,nd=b((t,e)=>td(t,"name",{value:e,configurable:!0}),"r");const rd=nd((t,e)=>!e||t.includes("?")?t:t+e,"addQueryToUrl");var od=Object.defineProperty,id=b((t,e)=>od(t,"name",{value:e,configurable:!0}),"e");const sd=id(t=>{try{return new URL(t).search}catch{return""}},"extractQueryFromHttpUrl");var ad=Object.defineProperty,De=b((t,e)=>ad(t,"name",{value:e,configurable:!0}),"T");const ld=/[&<>"']/g,_r=/^https?:\/\/[^/]+/,$r=/^\//,cd={'"':"&quot;","&":"&amp;","'":"&#39;","<":"&lt;",">":"&gt;"},tn=De(t=>t.replaceAll(ld,e=>cd[e]||e),"escapeHtml"),dd=De(t=>Array.isArray(t)&&qa(t)?Na(t).map(e=>({message:e.message||"ESBuild error",name:e.name||"Error",stack:e.stack||""})):$c(t),"extractIndividualErrors"),ud=De(t=>{const e=Ne(t,{frameLimit:10}),n=e?.find(r=>r?.file?.startsWith("http"))||e?.[0];return{compiledColumn:n?.column??0,compiledFilePath:n?.file??"",compiledLine:n?.line??0}},"extractLocationFromStack"),pd=De(async(t,e,n,r,i,o,s=0,a)=>{const c=i?.originalFilePath||e,l=i?.line??r,d=i?.column??n;if(c){let p=c,h=c;if(c.startsWith("http://")||c.startsWith("https://"))try{p=new URL(c).pathname,p.startsWith("/")&&(p=p.slice(1));const L=t.config.root||process.cwd();h=p.startsWith("/")?p:`${L}/${p}`}catch{console.warn("Failed to parse HTTP URL:",c)}const f=Ce(p),v=it(t,f);if(v)try{const L=await Kt(t,v,e||a||p,l,d,o,s),T=h||L.originalFilePath;return{originalFileColumn:L.originalFileColumn,originalFileLine:L.originalFileLine,originalFilePath:T}}catch{console.warn("Source map resolution failed, using estimation")}let m,k=d;return l>=20?m=Math.max(1,Math.round(l*.5)):l>15?m=Math.max(1,Math.round(l*.6)):l>10?m=Math.max(1,l-8):m=Math.max(1,l-3),d>=10||d>7?k=Math.max(0,d-1):d>5&&(k=Math.max(0,d)),{originalFileColumn:k,originalFileLine:m,originalFilePath:h||c}}return{originalFileColumn:d,originalFileLine:l,originalFilePath:c}},"resolveOriginalLocationInfo"),hd=De((t,e,n,r,i,o)=>({compiledCodeFrameContent:void 0,compiledColumn:t,compiledFilePath:e,compiledLine:n,fixPrompt:"",originalCodeFrameContent:void 0,originalFileColumn:r,originalFileLine:i,originalFilePath:o,originalSnippet:""}),"createEmptyResult"),gd=De(async(t,e,n,r,i,o)=>{let s,a;const c=Ue(n),l=Ue(r)||c;if(c==="text"&&t&&t.trim()&&(s=`<pre class="shiki"><code>${tn(t)}</code></pre>`),l==="text"&&e&&e.trim()&&(a=`<pre class="shiki"><code>${tn(e)}</code></pre>`),c==="text"&&l==="text")return{compiledCodeFrameContent:a,originalCodeFrameContent:s};const d=await Gr([l,c]),p={themes:{dark:"min-dark",light:"min-light"}};if(t&&t.trim())try{s=d.codeToHtml(t,{...p,lang:c,transformers:[lr([{classes:["error-line"],line:i}])]})}catch{}if(e&&e.trim())try{a=d.codeToHtml(e,{...p,lang:l,transformers:[lr([{classes:["error-line"],line:o}])]})}catch{}return{compiledCodeFrameContent:a,originalCodeFrameContent:s}},"generateSyntaxHighlightedFrames"),md=De(async(t,e,n=0,r,i,o)=>{const s=r==="vue"&&t?.message?Tc(t.message):void 0,a=dd(t),c=a[0]||t,l=r==="react"&&t.message&&(t.message.toLowerCase().includes("hydration")||t.message.toLowerCase().includes("hydrating"));let d="";if(o&&o.length>1)for(const F of o.slice(1)){const H=F.stack||"",X=Ne({stack:H},{frameLimit:10})?.find(S=>S?.file?.startsWith("http"));if(X?.file&&(d=sd(X.file),d))break}const p=kc(c),h=Fn(c.stack||""),f=await Gc(e,h,{message:p,name:c.name});let v,m,k;if(i?.file&&i?.line&&i?.column)v=i.column,m=i.file,k=i.line;else{const F=ud(c);if(v=F.compiledColumn,m=F.compiledFilePath,k=F.compiledLine,m&&!m.startsWith("http")){const H=e.config.root;let X=m;m.startsWith(H)&&(X=m.slice(H.length)),X.startsWith("/")||(X=`/${X}`);const S=e.config.server.port||e.config.preview?.port||5173,Me=e.config.server.host||e.config.preview?.host||"localhost";let be=`${e.config.server.https?"https":"http"}://${Me}:${S}${X}`;d&&(be=rd(be,d)),m=be}}if(l){const F=Ic(t);if(F){const H=m?Ue(m):"javascript";if(H==="text")return{errorCount:1,fixPrompt:Bt({applicationType:void 0,error:c,file:{file:m,language:"jsx",line:k,snippet:F}}),message:c.message,originalCodeFrameContent:`<pre class="shiki"><code>${tn(F)}</code></pre>`,originalFileColumn:v,originalFileLine:k,originalFilePath:m,originalSnippet:F,originalStack:c.stack||""};const X=await Gr([H]);return{errorCount:1,fixPrompt:Bt({applicationType:void 0,error:c,file:{file:m,language:"jsx",line:k,snippet:F}}),message:c.message,originalCodeFrameContent:X.codeToHtml(F,{lang:H,themes:{dark:"min-dark",light:"min-light"},transformers:[ed()]}),originalFileColumn:v,originalFileLine:k,originalFilePath:m,originalSnippet:F,originalStack:c.stack||""}}}let L=i?.file||m;if(!i?.file&&c.stack){const F=Ne(c,{frameLimit:10})?.find(H=>H?.file&&!H.file.startsWith("http")&&!H.file.includes("node_modules")&&!H.file.includes(".vite")&&H.file.includes(".tsx"));F?.file&&(L=F.file)}let{originalFileColumn:T,originalFileLine:$,originalFilePath:R}=await pd(e,L,v,k,s,c.message,n,m);const A=i?.plugin;let M="",j="",U,O;try{const[F,H]=await Promise.all([it(e,Ce(m)),it(e,Ce(R))]);if(!F&&!H)return hd(v,m,k,T,$,R);const X=m.startsWith("http")?m.replace(_r,"").replace($r,""):m,S=R.startsWith("http")?R.replace(_r,"").replace($r,""):R,Me=F||H;if(Me?.transformResult?.code&&(O=Me.transformResult.code),H?.transformResult?.map&&!U){const V=H.transformResult.map;try{const Z=V.sourcesContent?.[0];Z&&(U=Z)}catch(Z){console.warn("Failed to get original source from source map:",Z)}}const be={compiledSourceText:void 0,originalSourceText:void 0};let ut=Promise.resolve(be);!O&&F&&(ut=kr(e,F,X,Ce(X)));let pt=Promise.resolve(be);!U&&H&&(pt=kr(e,H,S,Ce(S)));const[Ze,Ie]=await Promise.all([ut,pt]);if(!O&&Ze.compiledSourceText&&({compiledSourceText:O}=Ze),!U&&Ie.originalSourceText&&({originalSourceText:U}=Ie),U){if(O&&$<=0&&k>0){const V=ll(O,k,v,U);V&&($=V.line,T=V.column)}try{M=Vn(U,{start:{column:Math.max(1,T),line:Math.max(1,$)}},{showGutter:!1})}catch{M=U?.slice(0,500)||""}}const Ye=O&&k>0,Be=$>0&&T>0;let je=!1;if(Ye&&k>0&&c.message&&O){const V=O.split(`
1913
1913
  `)[k-1];if(V&&v<=V.length){const Z=c.message,ye=Math.max(0,v-1),ue=new Set(V.slice(Math.max(0,ye)));je=ue.has("new Error(")||ue.has("throw new Error")||ue.has("throw ")||ue.has(Z.slice(0,20)),!je&&Be&&(R.includes(".svelte")||R.includes(".vue")||R.includes(".astro")||m.includes(".js")||m.includes(".ts"))&&(je=!0)}}if(Ye&&je&&O){const V=O.split(`
1914
1914
  `),Z=V.length,ye=Math.min(k,Z)||Math.max(1,Z-2),ue=V[ye-1]?Math.min(v||1,V[ye-1]?.length||1):1;try{j=Vn(O,{start:{column:ue,line:ye}},{showGutter:!1})}catch(Xe){console.warn("Compiled codeFrame failed:",Xe),j=O?.slice(0,500)||""}}}catch(F){console.warn("Source retrieval failed:",F)}const{compiledCodeFrameContent:ce,originalCodeFrameContent:Ae}=await gd(M,j,R,m,$,k);let de=M;if(!de&&U){const F=U.split(`
1915
1915
  `),H=Math.max(0,$-3),X=Math.min(F.length,$+2);de=F.slice(H,X).join(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/vite-overlay",
3
- "version": "2.0.0-alpha.17",
3
+ "version": "2.0.0-alpha.19",
4
4
  "description": "Improved vite overlay",
5
5
  "keywords": [
6
6
  "error-handling",
@@ -21,6 +21,11 @@
21
21
  "bugs": {
22
22
  "url": "https://github.com/visulima/visulima/issues"
23
23
  },
24
+ "license": "MIT",
25
+ "author": {
26
+ "name": "Daniel Bannert",
27
+ "email": "d.bannert@anolilab.de"
28
+ },
24
29
  "repository": {
25
30
  "type": "git",
26
31
  "url": "git+https://github.com/visulima/visulima.git",
@@ -36,13 +41,13 @@
36
41
  "url": "https://anolilab.com/support"
37
42
  }
38
43
  ],
39
- "license": "MIT",
40
- "author": {
41
- "name": "Daniel Bannert",
42
- "email": "d.bannert@anolilab.de"
43
- },
44
- "sideEffects": false,
44
+ "files": [
45
+ "dist",
46
+ "README.md",
47
+ "CHANGELOG.md"
48
+ ],
45
49
  "type": "module",
50
+ "sideEffects": false,
46
51
  "exports": {
47
52
  ".": {
48
53
  "types": "./dist/index.d.ts",
@@ -50,15 +55,14 @@
50
55
  },
51
56
  "./package.json": "./package.json"
52
57
  },
53
- "files": [
54
- "dist",
55
- "README.md",
56
- "CHANGELOG.md"
57
- ],
58
+ "publishConfig": {
59
+ "access": "public",
60
+ "provenance": true
61
+ },
58
62
  "dependencies": {
59
63
  "@shikijs/cli": "4.0.2",
60
64
  "@shikijs/langs": "^4.0.2",
61
- "@visulima/error": "6.0.0-alpha.15",
65
+ "@visulima/error": "6.0.0-alpha.17",
62
66
  "fastest-levenshtein": "^1.0.16",
63
67
  "shiki": "4.0.2"
64
68
  },
@@ -67,9 +71,5 @@
67
71
  },
68
72
  "engines": {
69
73
  "node": "^22.14.0 || >=24.10.0"
70
- },
71
- "publishConfig": {
72
- "access": "public",
73
- "provenance": true
74
74
  }
75
75
  }