@visulima/vite-overlay 1.0.0 → 1.0.1
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.
- package/CHANGELOG.md +7 -0
- package/README.md +13 -12
- package/dist/index.js +69 -33
- package/package.json +14 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## @visulima/vite-overlay [1.0.1](https://github.com/visulima/visulima/compare/@visulima/vite-overlay@1.0.0...@visulima/vite-overlay@1.0.1) (2025-09-20)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **vite-overlay:** correct import statement in README.md for errorOverlay ([8f4907d](https://github.com/visulima/visulima/commit/8f4907d176b05b549616e3b6df98147aea062ac3))
|
|
6
|
+
* **vite-overlay:** update dependencies and improve error handling ([7c58b6a](https://github.com/visulima/visulima/commit/7c58b6aca8a84dc2073ecb53dd0513b0f7cc8d60))
|
|
7
|
+
|
|
1
8
|
## @visulima/vite-overlay 1.0.0 (2025-09-20)
|
|
2
9
|
|
|
3
10
|
### Features
|
package/README.md
CHANGED
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
|
|
26
26
|
---
|
|
27
27
|
|
|
28
|
-
| Light Mode | Dark Mode | Solution Mode
|
|
29
|
-
| -------------------------------- | ------------------------------ |
|
|
28
|
+
| Light Mode | Dark Mode | Solution Mode |
|
|
29
|
+
| -------------------------------- | ------------------------------ | ------------------------------------- |
|
|
30
30
|
|  |  |  |
|
|
31
31
|
|
|
32
32
|
## Features
|
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
- **Enhanced Error Display** - Rich, interactive error overlays with syntax highlighting
|
|
35
35
|
- **Source Map Integration** - Shows original `.tsx`/`.ts` files instead of compiled paths
|
|
36
36
|
- **Cause Chain Navigation** - Navigate through multi-level error chains with original source locations
|
|
37
|
-
- **Cross-browser Support** - Works seamlessly in Chromium, Firefox, and WebKit
|
|
38
37
|
- **Beautiful UI** - Modern, accessible interface with light/dark theme support
|
|
39
38
|
- **Intelligent Solutions** - AI-powered error analysis and suggested fixes
|
|
40
39
|
- **Real-time Updates** - Hot Module Replacement (HMR) integration for instant error feedback
|
|
@@ -60,7 +59,7 @@ Add the plugin to your Vite configuration:
|
|
|
60
59
|
|
|
61
60
|
```typescript
|
|
62
61
|
import { defineConfig } from "vite";
|
|
63
|
-
import
|
|
62
|
+
import errorOverlay from "@visulima/vite-overlay";
|
|
64
63
|
|
|
65
64
|
export default defineConfig({
|
|
66
65
|
plugins: [errorOverlay()],
|
|
@@ -73,7 +72,7 @@ The plugin accepts an optional configuration object:
|
|
|
73
72
|
|
|
74
73
|
```typescript
|
|
75
74
|
import { defineConfig } from "vite";
|
|
76
|
-
import
|
|
75
|
+
import errorOverlay from "@visulima/vite-overlay";
|
|
77
76
|
|
|
78
77
|
export default defineConfig({
|
|
79
78
|
plugins: [
|
|
@@ -93,29 +92,32 @@ export default defineConfig({
|
|
|
93
92
|
|
|
94
93
|
#### Options
|
|
95
94
|
|
|
96
|
-
| Option
|
|
97
|
-
|
|
98
|
-
| `logClientRuntimeError` | `boolean`
|
|
99
|
-
| `reactPluginName`
|
|
100
|
-
| `solutionFinders`
|
|
95
|
+
| Option | Type | Default | Description |
|
|
96
|
+
| ----------------------- | ------------------ | ----------- | ------------------------------------------------------------------------ |
|
|
97
|
+
| `logClientRuntimeError` | `boolean` | `true` | Enable/disable client-side runtime error logging and overlay display |
|
|
98
|
+
| `reactPluginName` | `string` | `undefined` | Custom React plugin name for detection (useful for custom React plugins) |
|
|
99
|
+
| `solutionFinders` | `SolutionFinder[]` | `[]` | Array of custom solution finder functions for enhanced error analysis |
|
|
101
100
|
|
|
102
101
|
## Error Handling
|
|
103
102
|
|
|
104
103
|
The plugin automatically handles various types of errors:
|
|
105
104
|
|
|
106
105
|
### Client-Side Errors
|
|
106
|
+
|
|
107
107
|
- Runtime JavaScript errors
|
|
108
108
|
- Unhandled promise rejections
|
|
109
109
|
- React component errors (when React plugin is detected)
|
|
110
110
|
- Async context errors
|
|
111
111
|
|
|
112
112
|
### Server-Side Errors (SSR)
|
|
113
|
+
|
|
113
114
|
- Build-time errors during SSR
|
|
114
115
|
- Import resolution failures
|
|
115
116
|
- Module loading errors
|
|
116
117
|
- Plugin-specific errors
|
|
117
118
|
|
|
118
119
|
### Special Cases
|
|
120
|
+
|
|
119
121
|
- **Vue SFC Compilation Errors** - Enhanced parsing for `.vue` files
|
|
120
122
|
- **Import Resolution Errors** - Smart suggestions for missing modules
|
|
121
123
|
- **TypeScript Errors** - Source map integration for `.tsx`/`.ts` files
|
|
@@ -137,7 +139,7 @@ You can extend the plugin with custom solution finders:
|
|
|
137
139
|
|
|
138
140
|
```typescript
|
|
139
141
|
import { defineConfig } from "vite";
|
|
140
|
-
import
|
|
142
|
+
import errorOverlay from "@visulima/vite-overlay";
|
|
141
143
|
import type { SolutionFinder } from "@visulima/error/solution";
|
|
142
144
|
|
|
143
145
|
const customSolutionFinder: SolutionFinder = {
|
|
@@ -195,7 +197,6 @@ The error overlay uses a custom design system with CSS custom properties:
|
|
|
195
197
|
--ono-v-text: #c9d1d9;
|
|
196
198
|
```
|
|
197
199
|
|
|
198
|
-
|
|
199
200
|
## Supported Node.js Versions
|
|
200
201
|
|
|
201
202
|
Libraries in this ecosystem make the best effort to track [Node.js’ release schedule](https://github.com/nodejs/release#release-schedule).
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var Ro=Object.defineProperty;var $=(t,e)=>Ro(t,"name",{value:e,configurable:!0});import{renderError as To,getErrorCauses as Ao}from"@visulima/error/error";import{ruleBasedFinder as cr,errorHintFinder as dr}from"@visulima/error/solution";import{parseStacktrace as jo}from"@visulima/error/stacktrace";import{boxen as Bo}from"@visulima/boxen";import{readFile as mt}from"node:fs/promises";import{fileURLToPath as
|
|
2
|
-
]`).replace("lheading",hr).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},on=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,nn=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,gr=/^( {2,}|\\)\n(?!\s*$)/,sn=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Qe=/[\p{P}\p{S}]/u,yt=/[\s\p{P}\p{S}]/u,fr=/[^\s\p{P}\p{S}]/u,an=C(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,yt).getRegex(),wr=/(?!~)[\p{P}\p{S}]/u,ln=/(?!~)[\s\p{P}\p{S}]/u,cn=/(?:[^\s\p{P}\p{S}]|~)/u,dn=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,vr=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,pn=C(vr,"u").replace(/punct/g,Qe).getRegex(),un=C(vr,"u").replace(/punct/g,wr).getRegex(),br="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",hn=C(br,"gu").replace(/notPunctSpace/g,fr).replace(/punctSpace/g,yt).replace(/punct/g,Qe).getRegex(),mn=C(br,"gu").replace(/notPunctSpace/g,cn).replace(/punctSpace/g,ln).replace(/punct/g,wr).getRegex(),gn=C("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,fr).replace(/punctSpace/g,yt).replace(/punct/g,Qe).getRegex(),fn=C(/\\(punct)/,"gu").replace(/punct/g,Qe).getRegex(),wn=C(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),vn=C(bt).replace("(?:-->|$)","-->").getRegex(),bn=C("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",vn).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),He=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,kn=C(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",He).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),kr=C(/^!?\[(label)\]\[(ref)\]/).replace("label",He).replace("ref",vt).getRegex(),yr=C(/^!?\[(ref)\](?:\[\])?/).replace("ref",vt).getRegex(),yn=C("reflink|nolink(?!\\()","g").replace("reflink",kr).replace("nolink",yr).getRegex(),xt={_backpedal:Se,anyPunctuation:fn,autolink:wn,blockSkip:dn,br:gr,code:nn,del:Se,emStrongLDelim:pn,emStrongRDelimAst:hn,emStrongRDelimUnd:gn,escape:on,link:kn,nolink:yr,punctuation:an,reflink:kr,reflinkSearch:yn,tag:bn,text:sn,url:Se},xn={...xt,link:C(/^!?\[(label)\]\((.*?)\)/).replace("label",He).getRegex(),reflink:C(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",He).getRegex()},nt={...xt,emStrongRDelimAst:mn,emStrongLDelim:un,url:C(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},$n={...nt,br:C(gr).replace("{2,}","*").getRegex(),text:C(nt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},
|
|
1
|
+
var Ro=Object.defineProperty;var $=(t,e)=>Ro(t,"name",{value:e,configurable:!0});import{renderError as To,getErrorCauses as Ao}from"@visulima/error/error";import{ruleBasedFinder as cr,errorHintFinder as dr}from"@visulima/error/solution";import{parseStacktrace as jo}from"@visulima/error/stacktrace";import{boxen as Bo}from"@visulima/boxen";import{readFile as mt}from"node:fs/promises";import{fileURLToPath as Do}from"node:url";import Io from"node:fs";import Y from"node:path";import{distance as Oe}from"fastest-levenshtein";import{parseStacktrace as ve,formatStacktrace as pr,codeFrame as Dt}from"@visulima/error";import Oo from"@visulima/error/solution/ai/prompt";import{TraceMap as Ho,originalPositionFor as qo}from"@jridgewell/trace-mapping";import{stripVTControlCharacters as Zo}from"node:util";var Vo=Object.defineProperty,z=$((t,e)=>Vo(t,"name",{value:e,configurable:!0}),"g$6");function We(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}$(We,"q$2");z(We,"L");var ue=We();function gt(t){ue=t}$(gt,"le");z(gt,"G");var Se={exec:z(()=>null,"exec")};function C(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:z((o,s)=>{let i=typeof s=="string"?s:s.source;return i=i.replace(q.caret,"$1"),r=r.replace(o,i),n},"replace"),getRegex:z(()=>new RegExp(r,e),"getRegex")};return n}$(C,"u$7");z(C,"h");var q={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:z(t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),"listItemRegex"),nextBulletRegex:z(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),"nextBulletRegex"),hrRegex:z(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),"hrRegex"),fencesBeginRegex:z(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),"fencesBeginRegex"),headingBeginRegex:z(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),"headingBeginRegex"),htmlBeginRegex:z(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),"htmlBeginRegex")},No=/^(?:[ \t]*(?:\n|$))+/,Uo=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Wo=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Fe=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Go=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ft=/(?:[*+-]|\d{1,9}[.)])/,ur=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,hr=C(ur).replace(/bull/g,ft).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Qo=C(ur).replace(/bull/g,ft).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),wt=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Xo=/^[^\n]+/,vt=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Jo=C(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",vt).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Yo=C(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ft).getRegex(),Ge="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",bt=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ko=C("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",bt).replace("tag",Ge).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),mr=C(wt).replace("hr",Fe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ge).getRegex(),en=C(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",mr).getRegex(),kt={blockquote:en,code:Uo,def:Jo,fences:Wo,heading:Go,hr:Fe,html:Ko,lheading:hr,list:Yo,newline:No,paragraph:mr,table:Se,text:Xo},It=C("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Fe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ge).getRegex(),tn={...kt,lheading:Qo,table:It,paragraph:C(wt).replace("hr",Fe).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",It).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ge).getRegex()},rn={...kt,html:C(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",bt).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Se,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:C(wt).replace("hr",Fe).replace("heading",` *#{1,6} *[^
|
|
2
|
+
]`).replace("lheading",hr).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},on=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,nn=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,gr=/^( {2,}|\\)\n(?!\s*$)/,sn=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Qe=/[\p{P}\p{S}]/u,yt=/[\s\p{P}\p{S}]/u,fr=/[^\s\p{P}\p{S}]/u,an=C(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,yt).getRegex(),wr=/(?!~)[\p{P}\p{S}]/u,ln=/(?!~)[\s\p{P}\p{S}]/u,cn=/(?:[^\s\p{P}\p{S}]|~)/u,dn=/\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,vr=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,pn=C(vr,"u").replace(/punct/g,Qe).getRegex(),un=C(vr,"u").replace(/punct/g,wr).getRegex(),br="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",hn=C(br,"gu").replace(/notPunctSpace/g,fr).replace(/punctSpace/g,yt).replace(/punct/g,Qe).getRegex(),mn=C(br,"gu").replace(/notPunctSpace/g,cn).replace(/punctSpace/g,ln).replace(/punct/g,wr).getRegex(),gn=C("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,fr).replace(/punctSpace/g,yt).replace(/punct/g,Qe).getRegex(),fn=C(/\\(punct)/,"gu").replace(/punct/g,Qe).getRegex(),wn=C(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),vn=C(bt).replace("(?:-->|$)","-->").getRegex(),bn=C("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",vn).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),He=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,kn=C(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",He).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),kr=C(/^!?\[(label)\]\[(ref)\]/).replace("label",He).replace("ref",vt).getRegex(),yr=C(/^!?\[(ref)\](?:\[\])?/).replace("ref",vt).getRegex(),yn=C("reflink|nolink(?!\\()","g").replace("reflink",kr).replace("nolink",yr).getRegex(),xt={_backpedal:Se,anyPunctuation:fn,autolink:wn,blockSkip:dn,br:gr,code:nn,del:Se,emStrongLDelim:pn,emStrongRDelimAst:hn,emStrongRDelimUnd:gn,escape:on,link:kn,nolink:yr,punctuation:an,reflink:kr,reflinkSearch:yn,tag:bn,text:sn,url:Se},xn={...xt,link:C(/^!?\[(label)\]\((.*?)\)/).replace("label",He).getRegex(),reflink:C(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",He).getRegex()},nt={...xt,emStrongRDelimAst:mn,emStrongLDelim:un,url:C(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},$n={...nt,br:C(gr).replace("{2,}","*").getRegex(),text:C(nt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},De={normal:kt,gfm:tn,pedantic:rn},$e={normal:xt,gfm:nt,breaks:$n,pedantic:xn},_n={"&":"&","<":"<",">":">",'"':""","'":"'"},Ot=z(t=>_n[t],"ke");function J(t,e){if(e){if(q.escapeTest.test(t))return t.replace(q.escapeReplace,Ot)}else if(q.escapeTestNoEncode.test(t))return t.replace(q.escapeReplaceNoEncode,Ot);return t}$(J,"m$9");z(J,"w");function it(t){try{t=encodeURI(t).replace(q.percentDecode,"%")}catch{return null}return t}$(it,"ne");z(it,"J");function st(t,e){let r=t.replace(q.findPipe,(s,i,a)=>{let l=!1,c=i;for(;--c>=0&&a[c]==="\\";)l=!l;return l?"|":" |"}),n=r.split(q.splitPipe),o=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;o<n.length;o++)n[o]=n[o].trim().replace(q.slashPipe,"|");return n}$(st,"se");z(st,"V");function we(t,e,r){let n=t.length;if(n===0)return"";let o=0;for(;o<n;){let s=t.charAt(n-o-1);if(s===e&&!r)o++;else if(s!==e&&r)o++;else break}return t.slice(0,n-o)}$(we,"_$2");z(we,"z");function xr(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<t.length;n++)if(t[n]==="\\")n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return r>0?-2:-1}$(xr,"Ye");z(xr,"ge");function at(t,e,r,n,o){let s=e.href,i=e.title||null,a=t[1].replace(o.other.outputLinkReplace,"$1");n.state.inLink=!0;let l={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:s,title:i,text:a,tokens:n.inlineTokens(a)};return n.state.inLink=!1,l}$(at,"ie");z(at,"fe");function $r(t,e,r){let n=t.match(r.other.indentCodeCompensation);if(n===null)return e;let o=n[1];return e.split(`
|
|
3
3
|
`).map(s=>{let i=s.match(r.other.beginningSpace);if(i===null)return s;let[a]=i;return a.length>=o.length?s.slice(o.length):s}).join(`
|
|
4
4
|
`)}$($r,"et");z($r,"Je");var qe=class{static{$(this,"I")}static{z(this,"y")}options;rules;lexer;constructor(e){this.options=e||ue}space(e){let r=this.rules.block.newline.exec(e);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(e){let r=this.rules.block.code.exec(e);if(r){let n=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:we(n,`
|
|
5
5
|
`)}}}fences(e){let r=this.rules.block.fences.exec(e);if(r){let n=r[0],o=$r(n,r[3]||"",this.rules);return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:o}}}heading(e){let r=this.rules.block.heading.exec(e);if(r){let n=r[2].trim();if(this.rules.other.endingHash.test(n)){let o=we(n,"#");(this.options.pedantic||!o||this.rules.other.endingSpaceChar.test(o))&&(n=o.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let r=this.rules.block.hr.exec(e);if(r)return{type:"hr",raw:we(r[0],`
|
|
@@ -23,7 +23,7 @@ ${f}`:f;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
|
|
|
23
23
|
`+m}!w&&!m.trim()&&(w=!0),p+=B+`
|
|
24
24
|
`,e=e.substring(B.length+1),h=te.slice(g)}}s.loose||(a?s.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(a=!0));let y=null,E;this.options.gfm&&(y=this.rules.other.listIsTask.exec(f),y&&(E=y[0]!=="[ ] ",f=f.replace(this.rules.other.listReplaceTask,""))),s.items.push({type:"list_item",raw:p,task:!!y,checked:E,loose:!1,text:f,tokens:[]}),s.raw+=p}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let c=0;c<s.items.length;c++)if(this.lexer.state.top=!1,s.items[c].tokens=this.lexer.blockTokens(s.items[c].text,[]),!s.loose){let p=s.items[c].tokens.filter(h=>h.type==="space"),f=p.length>0&&p.some(h=>this.rules.other.anyLine.test(h.raw));s.loose=f}if(s.loose)for(let c=0;c<s.items.length;c++)s.items[c].loose=!0;return s}}html(e){let r=this.rules.block.html.exec(e);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(e){let r=this.rules.block.def.exec(e);if(r){let n=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),o=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:o,title:s}}}table(e){let r=this.rules.block.table.exec(e);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let n=st(r[1]),o=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
25
25
|
`):[],i={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===o.length){for(let a of o)this.rules.other.tableAlignRight.test(a)?i.align.push("right"):this.rules.other.tableAlignCenter.test(a)?i.align.push("center"):this.rules.other.tableAlignLeft.test(a)?i.align.push("left"):i.align.push(null);for(let a=0;a<n.length;a++)i.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:!0,align:i.align[a]});for(let a of s)i.rows.push(st(a,i.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:i.align[c]})));return i}}lheading(e){let r=this.rules.block.lheading.exec(e);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(e){let r=this.rules.block.paragraph.exec(e);if(r){let n=r[1].charAt(r[1].length-1)===`
|
|
26
|
-
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let r=this.rules.block.text.exec(e);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(e){let r=this.rules.inline.escape.exec(e);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(e){let r=this.rules.inline.tag.exec(e);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(e){let r=this.rules.inline.link.exec(e);if(r){let n=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let i=we(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{let i=xr(r[2],"()");if(i===-2)return;if(i>-1){let a=(r[0].indexOf("!")===0?5:4)+r[1].length+i;r[2]=r[2].substring(0,i),r[0]=r[0].substring(0,a).trim(),r[3]=""}}let o=r[2],s="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(o);i&&(o=i[1],s=i[3])}else s=r[3]?r[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?o=o.slice(1):o=o.slice(1,-1)),at(r,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(e,r){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let o=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=r[o.toLowerCase()];if(!s){let i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return at(n,s,n[0],this.lexer,this.rules)}}emStrong(e,r,n=""){let o=this.rules.inline.emStrongLDelim.exec(e);if(!(!o||o[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(o[1]||o[2])||!n||this.rules.inline.punctuation.exec(n))){let s=[...o[0]].length-1,i,a,l=s,c=0,p=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,r=r.slice(-1*e.length+s);(o=p.exec(r))!=null;){if(i=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!i)continue;if(a=[...i].length,o[3]||o[4]){l+=a;continue}else if((o[5]||o[6])&&s%3&&!((s+a)%3)){c+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l+c);let f=[...o[0]][0].length,h=e.slice(0,s+o.index+f+a);if(Math.min(s,a)%2){let w=h.slice(1,-1);return{type:"em",raw:h,text:w,tokens:this.lexer.inlineTokens(w)}}let m=h.slice(2,-2);return{type:"strong",raw:h,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(e){let r=this.rules.inline.code.exec(e);if(r){let n=r[2].replace(this.rules.other.newLineCharGlobal," "),o=this.rules.other.nonSpaceChar.test(n),s=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return o&&s&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:r[0],text:n}}}br(e){let r=this.rules.inline.br.exec(e);if(r)return{type:"br",raw:r[0]}}del(e){let r=this.rules.inline.del.exec(e);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(e){let r=this.rules.inline.autolink.exec(e);if(r){let n,o;return r[2]==="@"?(n=r[1],o="mailto:"+n):(n=r[1],o=n),{type:"link",raw:r[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let r;if(r=this.rules.inline.url.exec(e)){let n,o;if(r[2]==="@")n=r[0],o="mailto:"+n;else{let s;do s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(s!==r[0]);n=r[0],r[1]==="www."?o="http://"+r[0]:o=r[0]}return{type:"link",raw:r[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let r=this.rules.inline.text.exec(e);if(r){let n=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:n}}}},ne=class lt{static{$(this,"N")}static{z(this,"l")}tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||ue,this.options.tokenizer=this.options.tokenizer||new qe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:q,block:
|
|
26
|
+
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let r=this.rules.block.text.exec(e);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(e){let r=this.rules.inline.escape.exec(e);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(e){let r=this.rules.inline.tag.exec(e);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(e){let r=this.rules.inline.link.exec(e);if(r){let n=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let i=we(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{let i=xr(r[2],"()");if(i===-2)return;if(i>-1){let a=(r[0].indexOf("!")===0?5:4)+r[1].length+i;r[2]=r[2].substring(0,i),r[0]=r[0].substring(0,a).trim(),r[3]=""}}let o=r[2],s="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(o);i&&(o=i[1],s=i[3])}else s=r[3]?r[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?o=o.slice(1):o=o.slice(1,-1)),at(r,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(e,r){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let o=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=r[o.toLowerCase()];if(!s){let i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return at(n,s,n[0],this.lexer,this.rules)}}emStrong(e,r,n=""){let o=this.rules.inline.emStrongLDelim.exec(e);if(!(!o||o[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(o[1]||o[2])||!n||this.rules.inline.punctuation.exec(n))){let s=[...o[0]].length-1,i,a,l=s,c=0,p=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,r=r.slice(-1*e.length+s);(o=p.exec(r))!=null;){if(i=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!i)continue;if(a=[...i].length,o[3]||o[4]){l+=a;continue}else if((o[5]||o[6])&&s%3&&!((s+a)%3)){c+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l+c);let f=[...o[0]][0].length,h=e.slice(0,s+o.index+f+a);if(Math.min(s,a)%2){let w=h.slice(1,-1);return{type:"em",raw:h,text:w,tokens:this.lexer.inlineTokens(w)}}let m=h.slice(2,-2);return{type:"strong",raw:h,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(e){let r=this.rules.inline.code.exec(e);if(r){let n=r[2].replace(this.rules.other.newLineCharGlobal," "),o=this.rules.other.nonSpaceChar.test(n),s=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return o&&s&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:r[0],text:n}}}br(e){let r=this.rules.inline.br.exec(e);if(r)return{type:"br",raw:r[0]}}del(e){let r=this.rules.inline.del.exec(e);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(e){let r=this.rules.inline.autolink.exec(e);if(r){let n,o;return r[2]==="@"?(n=r[1],o="mailto:"+n):(n=r[1],o=n),{type:"link",raw:r[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let r;if(r=this.rules.inline.url.exec(e)){let n,o;if(r[2]==="@")n=r[0],o="mailto:"+n;else{let s;do s=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(s!==r[0]);n=r[0],r[1]==="www."?o="http://"+r[0]:o=r[0]}return{type:"link",raw:r[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let r=this.rules.inline.text.exec(e);if(r){let n=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:n}}}},ne=class lt{static{$(this,"N")}static{z(this,"l")}tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||ue,this.options.tokenizer=this.options.tokenizer||new qe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:q,block:De.normal,inline:$e.normal};this.options.pedantic?(r.block=De.pedantic,r.inline=$e.pedantic):this.options.gfm&&(r.block=De.gfm,this.options.breaks?r.inline=$e.breaks:r.inline=$e.gfm),this.tokenizer.rules=r}static get rules(){return{block:De,inline:$e}}static lex(e,r){return new lt(r).lex(e)}static lexInline(e,r){return new lt(r).inlineTokens(e)}lex(e){e=e.replace(q.carriageReturn,`
|
|
27
27
|
`),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],n=!1){for(this.options.pedantic&&(e=e.replace(q.tabCharGlobal," ").replace(q.spaceLine,""));e;){let o;if(this.options.extensions?.block?.some(i=>(o=i.call({lexer:this},e,r))?(e=e.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let i=r.at(-1);o.raw.length===1&&i!==void 0?i.raw+=`
|
|
28
28
|
`:r.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let i=r.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=(i.raw.endsWith(`
|
|
29
29
|
`)?"":`
|
|
@@ -57,13 +57,16 @@ ${e}</tr>
|
|
|
57
57
|
`}tablecell(e){let r=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+r+`</${n}>
|
|
58
58
|
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${J(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:r,tokens:n}){let o=this.parser.parseInline(n),s=it(e);if(s===null)return o;e=s;let i='<a href="'+e+'"';return r&&(i+=' title="'+J(r)+'"'),i+=">"+o+"</a>",i}image({href:e,title:r,text:n,tokens:o}){o&&(n=this.parser.parseInline(o,this.parser.textRenderer));let s=it(e);if(s===null)return J(n);e=s;let i=`<img src="${e}" alt="${n}"`;return r&&(i+=` title="${J(r)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:J(e.text)}},$t=class{static{$(this,"D")}static{z(this,"$")}strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},ie=class ct{static{$(this,"O")}static{z(this,"l")}options;renderer;textRenderer;constructor(e){this.options=e||ue,this.options.renderer=this.options.renderer||new Ze,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new $t}static parse(e,r){return new ct(r).parse(e)}static parseInline(e,r){return new ct(r).parseInline(e)}parse(e,r=!0){let n="";for(let o=0;o<e.length;o++){let s=e[o];if(this.options.extensions?.renderers?.[s.type]){let a=s,l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){n+=l||"";continue}}let i=s;switch(i.type){case"space":{n+=this.renderer.space(i);continue}case"hr":{n+=this.renderer.hr(i);continue}case"heading":{n+=this.renderer.heading(i);continue}case"code":{n+=this.renderer.code(i);continue}case"table":{n+=this.renderer.table(i);continue}case"blockquote":{n+=this.renderer.blockquote(i);continue}case"list":{n+=this.renderer.list(i);continue}case"html":{n+=this.renderer.html(i);continue}case"def":{n+=this.renderer.def(i);continue}case"paragraph":{n+=this.renderer.paragraph(i);continue}case"text":{let a=i,l=this.renderer.text(a);for(;o+1<e.length&&e[o+1].type==="text";)a=e[++o],l+=`
|
|
59
59
|
`+this.renderer.text(a);r?n+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):n+=l;continue}default:{let a='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}parseInline(e,r=this.renderer){let n="";for(let o=0;o<e.length;o++){let s=e[o];if(this.options.extensions?.renderers?.[s.type]){let a=this.options.extensions.renderers[s.type].call({parser:this},s);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){n+=a||"";continue}}let i=s;switch(i.type){case"escape":{n+=r.text(i);break}case"html":{n+=r.html(i);break}case"link":{n+=r.link(i);break}case"image":{n+=r.image(i);break}case"strong":{n+=r.strong(i);break}case"em":{n+=r.em(i);break}case"codespan":{n+=r.codespan(i);break}case"br":{n+=r.br(i);break}case"del":{n+=r.del(i);break}case"text":{n+=r.text(i);break}default:{let a='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}},_e=class{static{$(this,"T")}static{z(this,"S")}options;block;constructor(e){this.options=e||ue}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?ne.lex:ne.lexInline}provideParser(){return this.block?ie.parse:ie.parseInline}},Sn=class{static{$(this,"xe")}static{z(this,"B")}defaults=We();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ie;Renderer=Ze;TextRenderer=$t;Lexer=ne;Tokenizer=qe;Hooks=_e;constructor(...t){this.use(...t)}walkTokens(t,e){let r=[];for(let n of t)switch(r=r.concat(e.call(this,n)),n.type){case"table":{let o=n;for(let s of o.header)r=r.concat(this.walkTokens(s.tokens,e));for(let s of o.rows)for(let i of s)r=r.concat(this.walkTokens(i.tokens,e));break}case"list":{let o=n;r=r.concat(this.walkTokens(o.items,e));break}default:{let o=n;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach(s=>{let i=o[s].flat(1/0);r=r.concat(this.walkTokens(i,e))}):o.tokens&&(r=r.concat(this.walkTokens(o.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let s=e.renderers[o.name];s?e.renderers[o.name]=function(...i){let a=o.renderer.apply(this,i);return a===!1&&(a=s.apply(this,i)),a}:e.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=e[o.level];s?s.unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),n.extensions=e),r.renderer){let o=this.defaults.renderer||new Ze(this.defaults);for(let s in r.renderer){if(!(s in o))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let i=s,a=r.renderer[i],l=o[i];o[i]=(...c)=>{let p=a.apply(o,c);return p===!1&&(p=l.apply(o,c)),p||""}}n.renderer=o}if(r.tokenizer){let o=this.defaults.tokenizer||new qe(this.defaults);for(let s in r.tokenizer){if(!(s in o))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let i=s,a=r.tokenizer[i],l=o[i];o[i]=(...c)=>{let p=a.apply(o,c);return p===!1&&(p=l.apply(o,c)),p}}n.tokenizer=o}if(r.hooks){let o=this.defaults.hooks||new _e;for(let s in r.hooks){if(!(s in o))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let i=s,a=r.hooks[i],l=o[i];_e.passThroughHooks.has(s)?o[i]=c=>{if(this.defaults.async&&_e.passThroughHooksRespectAsync.has(s))return Promise.resolve(a.call(o,c)).then(f=>l.call(o,f));let p=a.call(o,c);return l.call(o,p)}:o[i]=(...c)=>{let p=a.apply(o,c);return p===!1&&(p=l.apply(o,c)),p}}n.hooks=o}if(r.walkTokens){let o=this.defaults.walkTokens,s=r.walkTokens;n.walkTokens=function(i){let a=[];return a.push(s.call(this,i)),o&&(a=a.concat(o.call(this,i))),a}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return ne.lex(t,e??this.defaults)}parser(t,e){return ie.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let n={...r},o={...this.defaults,...n},s=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&n.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=t);let i=o.hooks?o.hooks.provideLexer():t?ne.lex:ne.lexInline,a=o.hooks?o.hooks.provideParser():t?ie.parse:ie.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(e):e).then(l=>i(l,o)).then(l=>o.hooks?o.hooks.processAllTokens(l):l).then(l=>o.walkTokens?Promise.all(this.walkTokens(l,o.walkTokens)).then(()=>l):l).then(l=>a(l,o)).then(l=>o.hooks?o.hooks.postprocess(l):l).catch(s);try{o.hooks&&(e=o.hooks.preprocess(e));let l=i(e,o);o.hooks&&(l=o.hooks.processAllTokens(l)),o.walkTokens&&this.walkTokens(l,o.walkTokens);let c=a(l,o);return o.hooks&&(c=o.hooks.postprocess(c)),c}catch(l){return s(l)}}}onError(t,e){return r=>{if(r.message+=`
|
|
60
|
-
Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+J(r.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},pe=new Sn;function
|
|
60
|
+
Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+J(r.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},pe=new Sn;function F(t,e){return pe.parse(t,e)}$(F,"p$5");z(F,"d");F.options=F.setOptions=function(t){return pe.setOptions(t),F.defaults=pe.defaults,gt(F.defaults),F};F.getDefaults=We;F.defaults=ue;F.use=function(...t){return pe.use(...t),F.defaults=pe.defaults,gt(F.defaults),F};F.walkTokens=function(t,e){return pe.walkTokens(t,e)};F.parseInline=pe.parseInline;F.Parser=ie;F.parser=ie.parse;F.Renderer=Ze;F.TextRenderer=$t;F.Lexer=ne;F.lexer=ne.lex;F.Tokenizer=qe;F.Hooks=_e;F.parse=F;var Ht=F,En=Object.defineProperty,Cn=$((t,e)=>En(t,"name",{value:e,configurable:!0}),"t$1");const Ln=["cjs","mjs"],Mn=["mdoc"],Le=Cn(t=>{const e=(t.split("?")[0]??t).split(".").pop()?.toLowerCase();if(!e||Ln.includes(e))return"javascript";if(Mn.includes(e))return"markdown";switch(e){case"js":return"javascript";case"json":return"json";case"json5":return"json5";case"jsonc":return"jsonc";case"jsx":return"jsx";case"sql":return"sql";case"ts":return"typescript";case"tsx":return"tsx";case"xml":return"xml";case"md":return"markdown";case"mdx":return"mdx";case"svelte":return"svelte";case"vue":return"vue";case"html":return"html";case"css":return"css";case"scss":return"scss";case"less":return"less";case"sass":return"sass";case"stylus":return"stylus";case"styl":return"styl";default:return"javascript"}},"findLanguageBasedOnExtension");var zn=Object.defineProperty,Fn=$((t,e)=>zn(t,"name",{value:e,configurable:!0}),"s$4");const Ie=new Map,Pn=Fn(async t=>{if(/^(?:http|https|file|data):/.test(t)){if(Ie.has(t))return Ie.get(t);if(t.startsWith("file:"))try{const e=Do(t),r=await mt(e,"utf8");return Ie.set(t,r),r}catch{return}try{const e=await fetch(t);if(!e.ok)return;const r=await e.text();return Ie.set(t,r),r}catch{return}}},"getFileSource");var Rn=Object.defineProperty,Xe=$((t,e)=>Rn(t,"name",{value:e,configurable:!0}),"d$6");const Tn=Xe(t=>t.replace(/^\s*#+\s*/,"").trim(),"sanitizeTitle"),An=Xe(async(t,e,r=!1)=>{const n=[...e,cr,dr],o=jo(t,{frameLimit:1})[0]??{};for await(const s of n.sort((i,a)=>i.priority-a.priority)){const{handle:i}=s;if(typeof i!="function")continue;const a=await i(t,{file:o.file??"",language:Le(o.file??""),line:o.line??0,snippet:o.file?await Pn(o.file):""});if(a)return a}},"runSolutionFinders"),jn=Xe(async(t,e)=>{const{solutionFinders:r=[],solutionTitle:n,color:o,debug:s=!1,...i}=e,a=To(t,{...i,...o?.codeFrame}),l=await An(t,r,s);if(!l)return{errorAnsi:a,solutionBox:void 0};const c=Tn(l.header??n??"A possible solution to this error"),p=Bo(l.body,{borderStyle:"round",padding:{top:1,right:2,bottom:1,left:2},margin:{top:0,right:0,bottom:0,left:0},headerText:`💡 ${c}`,headerAlignment:"left",textAlignment:"left",...o?.boxen});return{errorAnsi:a,solutionBox:p}},"buildOutput"),_r=Xe(async(t,e={})=>{const{logger:r=console,...n}=e,{errorAnsi:o,solutionBox:s}=await jn(t,n);r.error(o),s&&(r.log(""),r.log(s))},"terminalOutput"),Bn=500,Sr="visulima:vite-overlay:error",Dn="visulima-vite-overlay",Er="Error",In="Runtime error",qt="data:image/svg+xml;charset=utf-8,%3Csvg%20class%3D%22lucide%20lucide-copy%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20%3E%20%3Crect%20width%3D%2214%22%20height%3D%2214%22%20x%3D%228%22%20y%3D%228%22%20rx%3D%222%22%20ry%3D%222%22%20%2F%3E%20%3Cpath%20d%3D%22M4%2016c-1.1%200-2-.9-2-2V4c0-1.1.9-2%202-2h10c1.1%200%202%20.9%202%202%22%20%2F%3E%20%3C%2Fsvg%3E",Zt="data:image/svg+xml;charset=utf-8,%3Csvg%20class%3D%22lucide%20lucide-info%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20%3E%20%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%2210%22%20%2F%3E%20%3Cpath%20d%3D%22M12%2016v-4%22%20%2F%3E%20%3Cpath%20d%3D%22M12%208h.01%22%20%2F%3E%20%3C%2Fsvg%3E",Vt="data:image/svg+xml;charset=utf-8,%3Csvg%20class%3D%22lucide%20lucide-moon-star%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20%3E%20%3Cpath%20d%3D%22M18%205h4%22%20%2F%3E%20%3Cpath%20d%3D%22M20%203v4%22%20%2F%3E%20%3Cpath%20d%3D%22M20.985%2012.486a9%209%200%201%201-9.473-9.472c.405-.022.617.46.402.803a6%206%200%200%200%208.268%208.268c.344-.215.825-.004.803.401%22%20%2F%3E%20%3C%2Fsvg%3E",Nt="data:image/svg+xml;charset=utf-8,%3Csvg%20class%3D%22lucide%20lucide-sun%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20%3E%20%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%224%22%20%2F%3E%20%3Cpath%20d%3D%22M12%202v2%22%20%2F%3E%20%3Cpath%20d%3D%22M12%2020v2%22%20%2F%3E%20%3Cpath%20d%3D%22m4.93%204.93%201.41%201.41%22%20%2F%3E%20%3Cpath%20d%3D%22m17.66%2017.66%201.41%201.41%22%20%2F%3E%20%3Cpath%20d%3D%22M2%2012h2%22%20%2F%3E%20%3Cpath%20d%3D%22M20%2012h2%22%20%2F%3E%20%3Cpath%20d%3D%22m6.34%2017.66-1.41%201.41%22%20%2F%3E%20%3Cpath%20d%3D%22m19.07%204.93-1.41%201.41%22%20%2F%3E%20%3C%2Fsvg%3E",Ut="data:image/svg+xml;charset=utf-8,%3Csvg%20class%3D%22lucide%20lucide-x%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20%3E%20%3Cpath%20d%3D%22M18%206%206%2018%22%20%2F%3E%20%3Cpath%20d%3D%22m6%206%2012%2012%22%20%2F%3E%20%3C%2Fsvg%3E";var dt=(t=>(t.appcode="AppCode",t["android-studio"]="Android Studio",t.atom="Atom",t["atom-beta"]="Atom Beta",t.brackets="Brackets",t.clion="CLion",t.code="Visual Studio Code",t["code-insiders"]="Visual Studio Code Insiders",t.codium="VSCodium",t.cursor="Cursor",t.emacs="GNU Emacs",t.emacsforosx="GNU Emacs for Mac OS X",t.intellij="IntelliJ IDEA",t.idea="IntelliJ IDEA",t.nano="GNU nano",t.neovim="NeoVim",t["notepad++"]="Notepad++",t.phpstorm="PhpStorm",t.pycharm="PyCharm",t.rider="Rider",t.rubymine="RubyMine",t.sublime="SublimeText",t.textmate="TextMate",t.vim="Vim",t.visualstudio="Visual Studio",t.vscode="Visual Studio Code",t.vscodium="VSCodium",t.webstorm="WebStorm",t.xcode="Xcode",t.zed="Zed",t))(dt||{}),On=`/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */
|
|
61
61
|
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-outline-style:solid}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-lime-800:oklch(45.3% .124 130.933);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-blue-50:oklch(97% .014 254.604);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-700:oklch(37.2% .044 257.287);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-4xl:56rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25/1.875);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-md:.375rem;--radius-lg:.5rem;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}button:not(:disabled),[role=button]:not(:disabled){cursor:pointer}body{background-color:var(--ono-v-bg);color:var(--ono-v-text)}pre,code{color:var(--ono-v-text)}.text-muted{color:var(--ono-v-text-muted)}a{color:var(--ono-v-link)}a:hover{text-decoration:underline}::selection{background:var(--ono-v-red-orange)}@supports (color:color-mix(in lab, red, red)){::selection{background:color-mix(in srgb,var(--ono-v-red-orange)20%,transparent)}}kbd{background-color:var(--ono-v-chip-bg);color:var(--ono-v-chip-text);border-radius:.375rem;padding:.125rem .375rem;font:.75rem ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}hr{border-color:var(--ono-v-border)}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{appearance:none;--tw-shadow:0 0 #0000;background-color:#fff;border-width:1px;border-color:oklch(55.1% .027 264.364);border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem}:is([type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select):focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:oklch(54.6% .245 262.881);--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:oklch(54.6% .245 262.881);outline:2px solid #0000}input::placeholder,textarea::placeholder{color:oklch(55.1% .027 264.364);opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}::-webkit-date-and-time-value{text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-year-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-month-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-day-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-hour-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-minute-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-second-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-millisecond-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{print-color-adjust:exact;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='oklch(55.1%25 0.027 264.364)' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;print-color-adjust:unset;padding-right:.75rem}[type=checkbox],[type=radio]{appearance:none;print-color-adjust:exact;vertical-align:middle;-webkit-user-select:none;user-select:none;color:oklch(54.6% .245 262.881);--tw-shadow:0 0 #0000;background-color:#fff;background-origin:border-box;border-width:1px;border-color:oklch(55.1% .027 264.364);flex-shrink:0;width:1rem;height:1rem;padding:0;display:inline-block}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:oklch(54.6% .245 262.881);--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid #0000}[type=checkbox]:checked,[type=radio]:checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors:active){[type=checkbox]:checked{appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors:active){[type=radio]:checked{appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{background-color:currentColor;border-color:#0000}[type=checkbox]:indeterminate{background-color:currentColor;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}@media (forced-colors:active){[type=checkbox]:indeterminate{appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{background-color:currentColor;border-color:#0000}[type=file]{background:unset;border-color:inherit;font-size:unset;line-height:inherit;border-width:0;border-radius:0;padding:0}[type=file]:focus{outline:1px solid buttontext;outline:1px auto -webkit-focus-ring-color}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing)*0)}.top-4{top:calc(var(--spacing)*4)}.top-\\[calc\\(var\\(--ono-v-dialog-border-width\\)\\*-1\\)\\]{top:calc(var(--ono-v-dialog-border-width)*-1)}.right-4{right:calc(var(--spacing)*4)}.right-\\[-54px\\]{right:-54px}.left-\\[-54px\\]{left:-54px}.-z-1,.-z-\\[1\\]{z-index:calc(1*-1)}.z-0{z-index:0}.z-10{z-index:10}.z-\\[2\\]{z-index:2}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.m-1{margin:calc(var(--spacing)*1)}.mx-auto{margin-inline:auto}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);margin-top:1.2em;margin-bottom:1.2em;font-size:1.25em;line-height:1.6}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);font-weight:500;text-decoration:underline}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:decimal}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:disc}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-counters);font-weight:400}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.25em;font-weight:600}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-quotes);border-inline-start-width:.25rem;border-inline-start-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-inline-start:1em;font-style:italic;font-weight:500}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:0;margin-bottom:.888889em;font-size:2.25em;font-weight:800;line-height:1.11111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:900}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:2em;margin-bottom:1em;font-size:1.5em;font-weight:700;line-height:1.33333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:800}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.6em;margin-bottom:.6em;font-size:1.25em;font-weight:600;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);margin-top:1.5em;margin-bottom:.5em;font-weight:600;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em;display:block}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-kbd);box-shadow:0 0 0 1px var(--tw-prose-kbd-shadows),0 3px 0 var(--tw-prose-kbd-shadows);padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;border-radius:.3125rem;padding-inline-start:.375em;font-family:inherit;font-size:.875em;font-weight:500}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-size:.875em;font-weight:600}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before,.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"\`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);padding-top:.857143em;padding-inline-end:1.14286em;padding-bottom:.857143em;border-radius:.375rem;margin-top:1.71429em;margin-bottom:1.71429em;padding-inline-start:1.14286em;font-size:.875em;font-weight:400;line-height:1.71429;overflow-x:auto}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit;background-color:#0000;border-width:0;border-radius:0;padding:0}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before,.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){table-layout:auto;width:100%;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.71429}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);vertical-align:bottom;padding-inline-end:.571429em;padding-bottom:.571429em;padding-inline-start:.571429em;font-weight:600}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);margin-top:.857143em;font-size:.875em;line-height:1.42857}.prose{--tw-prose-body:oklch(37.3% .034 259.733);--tw-prose-headings:oklch(21% .034 264.665);--tw-prose-lead:oklch(44.6% .03 256.802);--tw-prose-links:oklch(21% .034 264.665);--tw-prose-bold:oklch(21% .034 264.665);--tw-prose-counters:oklch(55.1% .027 264.364);--tw-prose-bullets:oklch(87.2% .01 258.338);--tw-prose-hr:oklch(92.8% .006 264.531);--tw-prose-quotes:oklch(21% .034 264.665);--tw-prose-quote-borders:oklch(92.8% .006 264.531);--tw-prose-captions:oklch(55.1% .027 264.364);--tw-prose-kbd:oklch(21% .034 264.665);--tw-prose-kbd-shadows:oklab(21% -.00316127 -.0338527/.1);--tw-prose-code:oklch(21% .034 264.665);--tw-prose-pre-code:oklch(92.8% .006 264.531);--tw-prose-pre-bg:oklch(27.8% .033 256.848);--tw-prose-th-borders:oklch(87.2% .01 258.338);--tw-prose-td-borders:oklch(92.8% .006 264.531);--tw-prose-invert-body:oklch(87.2% .01 258.338);--tw-prose-invert-headings:#fff;--tw-prose-invert-lead:oklch(70.7% .022 261.325);--tw-prose-invert-links:#fff;--tw-prose-invert-bold:#fff;--tw-prose-invert-counters:oklch(70.7% .022 261.325);--tw-prose-invert-bullets:oklch(44.6% .03 256.802);--tw-prose-invert-hr:oklch(37.3% .034 259.733);--tw-prose-invert-quotes:oklch(96.7% .003 264.542);--tw-prose-invert-quote-borders:oklch(37.3% .034 259.733);--tw-prose-invert-captions:oklch(70.7% .022 261.325);--tw-prose-invert-kbd:#fff;--tw-prose-invert-kbd-shadows:rgb(255,255,255/10%);--tw-prose-invert-code:#fff;--tw-prose-invert-pre-code:oklch(87.2% .01 258.338);--tw-prose-invert-pre-bg:#00000080;--tw-prose-invert-th-borders:oklch(44.6% .03 256.802);--tw-prose-invert-td-borders:oklch(37.3% .034 259.733);font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.571429em;padding-inline-end:.571429em;padding-bottom:.571429em;padding-inline-start:.571429em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-sm{font-size:.875rem;line-height:1.71429}.prose-sm :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em;margin-bottom:1.14286em}.prose-sm :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.888889em;margin-bottom:.888889em;font-size:1.28571em;line-height:1.55556}.prose-sm :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.33333em;margin-bottom:1.33333em;padding-inline-start:1.11111em}.prose-sm :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:.8em;font-size:2.14286em;line-height:1.2}.prose-sm :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.6em;margin-bottom:.8em;font-size:1.42857em;line-height:1.4}.prose-sm :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.55556em;margin-bottom:.444444em;font-size:1.28571em;line-height:1.55556}.prose-sm :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.42857em;margin-bottom:.571429em;line-height:1.42857}.prose-sm :where(img):not(:where([class~=not-prose],[class~=not-prose] *)),.prose-sm :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.71429em;margin-bottom:1.71429em}.prose-sm :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.71429em;margin-bottom:1.71429em}.prose-sm :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.142857em;padding-inline-end:.357143em;padding-bottom:.142857em;border-radius:.3125rem;padding-inline-start:.357143em;font-size:.857143em}.prose-sm :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.857143em}.prose-sm :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}.prose-sm :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.888889em}.prose-sm :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.666667em;padding-inline-end:1em;padding-bottom:.666667em;border-radius:.25rem;margin-top:1.66667em;margin-bottom:1.66667em;padding-inline-start:1em;font-size:.857143em;line-height:1.66667}.prose-sm :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)),.prose-sm :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em;margin-bottom:1.14286em;padding-inline-start:1.57143em}.prose-sm :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.285714em;margin-bottom:.285714em}.prose-sm :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)),.prose-sm :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.428571em}.prose-sm :where(.prose-sm>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.571429em;margin-bottom:.571429em}.prose-sm :where(.prose-sm>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em}.prose-sm :where(.prose-sm>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.14286em}.prose-sm :where(.prose-sm>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em}.prose-sm :where(.prose-sm>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.14286em}.prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.571429em;margin-bottom:.571429em}.prose-sm :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em;margin-bottom:1.14286em}.prose-sm :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.14286em}.prose-sm :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.285714em;padding-inline-start:1.57143em}.prose-sm :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2.85714em;margin-bottom:2.85714em}.prose-sm :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose-sm :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose-sm :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose-sm :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.857143em;line-height:1.5}.prose-sm :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:1em;padding-bottom:.666667em;padding-inline-start:1em}.prose-sm :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.666667em;padding-inline-end:1em;padding-bottom:.666667em;padding-inline-start:1em}.prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.71429em;margin-bottom:1.71429em}.prose-sm :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.666667em;font-size:.857143em;line-height:1.33333}.prose-sm :where(.prose-sm>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(.prose-sm>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.-mt-5{margin-top:calc(var(--spacing)*-5)}.mt-8{margin-top:calc(var(--spacing)*8)}.mb-0{margin-bottom:calc(var(--spacing)*0)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.ml-2{margin-left:calc(var(--spacing)*2)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.size-5{width:calc(var(--spacing)*5);height:calc(var(--spacing)*5)}.size-6\\.5{width:calc(var(--spacing)*6.5);height:calc(var(--spacing)*6.5)}.size-8{width:calc(var(--spacing)*8);height:calc(var(--spacing)*8)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-\\[40vmin\\]{height:40vmin}.h-\\[calc\\(100\\%\\+var\\(--ono-v-dialog-border-width\\)\\)\\]{height:calc(100% + var(--ono-v-dialog-border-width))}.h-\\[var\\(--ono-v-dialog-notch-height\\)\\]{height:var(--ono-v-dialog-notch-height)}.max-h-\\[140px\\]{max-height:140px}.max-h-\\[calc\\(100\\%-56px\\)\\]{max-height:calc(100% - 56px)}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-screen{min-height:100vh}.w-1\\/2{width:50%}.w-1\\/3{width:33.3333%}.w-2\\/3{width:66.6667%}.w-2\\/5{width:40%}.w-3\\/4{width:75%}.w-3\\/5{width:60%}.w-4{width:calc(var(--spacing)*4)}.w-4\\/5{width:80%}.w-6{width:calc(var(--spacing)*6)}.w-44{width:calc(var(--spacing)*44)}.w-fit{width:fit-content}.w-full{width:100%}.max-w-4xl{max-width:var(--container-4xl)}.max-w-\\[var\\(--ono-v-dialog-max-width\\)\\]{max-width:var(--ono-v-dialog-max-width)}.max-w-full{max-width:100%}.min-w-8{min-width:calc(var(--spacing)*8)}.shrink-0{flex-shrink:0}.translate-x-\\[calc\\(var\\(--ono-v-dialog-border-width\\)\\*-1\\)\\]{--tw-translate-x:calc(var(--ono-v-dialog-border-width)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-\\[var\\(--ono-v-dialog-border-width\\)\\]{--tw-translate-x:var(--ono-v-dialog-border-width);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\\[var\\(--ono-v-dialog-border-width\\)\\]{--tw-translate-y:var(--ono-v-dialog-border-width);translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.\\[transform\\:rotateY\\(180deg\\)\\]{transform:rotateY(180deg)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-\\[spin_20s_linear_infinite\\]{animation:20s linear infinite spin}.animate-pulse{animation:var(--animate-pulse)}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-6{gap:calc(var(--spacing)*6)}:where(.space-y-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-\\[var\\(--ono-v-radius-md\\)\\]{border-radius:var(--ono-v-radius-md)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-tl-\\[var\\(--ono-v-dialog-radius\\)\\]{border-top-left-radius:var(--ono-v-dialog-radius)}.rounded-tr-\\[var\\(--ono-v-dialog-radius\\)\\]{border-top-right-radius:var(--ono-v-dialog-radius)}.rounded-b-\\[var\\(--ono-v-dialog-radius\\)\\]{border-bottom-right-radius:var(--ono-v-dialog-radius);border-bottom-left-radius:var(--ono-v-dialog-radius)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-none{--tw-border-style:none;border-style:none}.border-\\[var\\(--ono-v-border\\)\\]{border-color:var(--ono-v-border)}.border-\\[var\\(--stroke-color\\)\\]{border-color:var(--stroke-color)}.bg-\\[\\#282c34\\]{background-color:#282c34}.bg-\\[\\#b0c8aa\\]{background-color:#b0c8aa}.bg-\\[var\\(--background-color\\)\\]{background-color:var(--background-color)}.bg-\\[var\\(--ono-v-chip-bg\\)\\]{background-color:var(--ono-v-chip-bg)}.bg-\\[var\\(--ono-v-success-bg\\)\\]{background-color:var(--ono-v-success-bg)}.bg-\\[var\\(--ono-v-surface\\)\\]{background-color:var(--ono-v-surface)}.bg-\\[var\\(--ono-v-surface-muted\\)\\]{background-color:var(--ono-v-surface-muted)}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\\/60{background-color:color-mix(in oklab,var(--color-black)60%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-green-500{background-color:var(--color-green-500)}.bg-red-500{background-color:var(--color-red-500)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-yellow-500{background-color:var(--color-yellow-500)}.p-3{padding:calc(var(--spacing)*3)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-\\[15px\\]{padding-inline:15px}.py-1{padding-block:calc(var(--spacing)*1)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.pe-6{padding-inline-end:calc(var(--spacing)*6)}.pt-5{padding-top:calc(var(--spacing)*5)}.pt-\\[10vh\\]{padding-top:10vh}.pr-0{padding-right:calc(var(--spacing)*0)}.pl-0{padding-left:calc(var(--spacing)*0)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[11px\\]{font-size:11px}.text-\\[calc\\(10px\\+2vmin\\)\\]{font-size:calc(10px + 2vmin)}.leading-4{--tw-leading:calc(var(--spacing)*4);line-height:calc(var(--spacing)*4)}.leading-5{--tw-leading:calc(var(--spacing)*5);line-height:calc(var(--spacing)*5)}.leading-none{--tw-leading:1;line-height:1}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-\\[\\#61dafb\\]{color:#61dafb}.text-\\[var\\(--ono-v-red-orange\\)\\]{color:var(--ono-v-red-orange)}.text-\\[var\\(--ono-v-text\\)\\]{color:var(--ono-v-text)}.text-\\[var\\(--ono-v-text-muted\\)\\]{color:var(--ono-v-text-muted)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-white{color:var(--color-white)}.underline{text-decoration-line:underline}.opacity-100{opacity:1}.shadow-\\[var\\(--ono-v-elevation-1\\)\\]{--tw-shadow:var(--ono-v-elevation-1);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[var\\(--ono-v-elevation-2\\)\\]{--tw-shadow:var(--ono-v-elevation-2);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.outline-none{--tw-outline-style:none;outline-style:none}.\\[vite\\:legacy\\]{vite:legacy}.\\[vite\\:react-babel\\]{vite:react-babel}.\\[vite\\:vue\\]{vite:vue}.hover\\:bg-\\[var\\(--ono-v-hover-overlay\\)\\]:hover{background-color:var(--ono-v-hover-overlay)}.hover\\:bg-blue-600:hover{background-color:var(--color-blue-600)}.hover\\:bg-green-600:hover{background-color:var(--color-green-600)}.hover\\:bg-red-600:hover{background-color:var(--color-red-600)}.hover\\:bg-yellow-600:hover{background-color:var(--color-yellow-600)}.hover\\:text-\\[var\\(--ono-v-text\\)\\]:hover{color:var(--ono-v-text)}.hover\\:text-\\[var\\(--ono-v-text-muted\\)\\]:hover{color:var(--ono-v-text-muted)}.hover\\:underline:hover{text-decoration-line:underline}.focus\\:bg-\\[var\\(--ono-v-hover-overlay\\)\\]:focus{background-color:var(--ono-v-hover-overlay)}.focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-\\[var\\(--ono-v-red-orange\\)\\]:focus{--tw-ring-color:var(--ono-v-red-orange)}.focus\\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.focus\\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus-visible\\:outline:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\\:outline-\\[var\\(--ono-v-red-orange\\)\\]:focus-visible{outline-color:var(--ono-v-red-orange)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}@media (min-width:40rem){.sm\\:flex{display:flex}}@media (min-width:48rem){.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}}.dark\\:bg-lime-800:where(.dark,.dark *){background-color:var(--color-lime-800)}.dark\\:prose-invert:where(.dark,.dark *){--tw-prose-body:var(--tw-prose-invert-body);--tw-prose-headings:var(--tw-prose-invert-headings);--tw-prose-lead:var(--tw-prose-invert-lead);--tw-prose-links:var(--tw-prose-invert-links);--tw-prose-bold:var(--tw-prose-invert-bold);--tw-prose-counters:var(--tw-prose-invert-counters);--tw-prose-bullets:var(--tw-prose-invert-bullets);--tw-prose-hr:var(--tw-prose-invert-hr);--tw-prose-quotes:var(--tw-prose-invert-quotes);--tw-prose-quote-borders:var(--tw-prose-invert-quote-borders);--tw-prose-captions:var(--tw-prose-invert-captions);--tw-prose-kbd:var(--tw-prose-invert-kbd);--tw-prose-kbd-shadows:var(--tw-prose-invert-kbd-shadows);--tw-prose-code:var(--tw-prose-invert-code);--tw-prose-pre-code:var(--tw-prose-invert-pre-code);--tw-prose-pre-bg:var(--tw-prose-invert-pre-bg);--tw-prose-th-borders:var(--tw-prose-invert-th-borders);--tw-prose-td-borders:var(--tw-prose-invert-td-borders)}.prose-headings\\:text-white :where(h1,h2,h3,h4,h5,h6,th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--color-white)}.prose-ul\\:list-none :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:none}.prose-hr\\:my-6 :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-block:calc(var(--spacing)*6)}.prose-hr\\:border :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-style:var(--tw-border-style);border-width:1px}}:host{--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:rotateX(0);--tw-rotate-y:rotateY(0);--tw-rotate-z:rotateZ(0);--tw-skew-x:skewX(0);--tw-skew-y:skewY(0);--tw-space-x-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial:;--ono-v-white-smoke:#f5f5f5;--ono-v-red-orange:#ff4628;--ono-v-charcoal-black:#202020;--ono-v-bg:var(--ono-v-white-smoke);--ono-v-surface:#fff;--ono-v-surface-muted:#fafafa;--ono-v-border:#b9c8d780;--ono-v-hover-overlay:#2020200d;--ono-v-success:#2ea043;--ono-v-success-bg:#d6eed1;--ono-v-neutral:#6e7681;--ono-v-neutral-bg:#6e76812e;--ono-v-chip-bg:#6e768124;--ono-v-chip-text:var(--ono-v-text);--ono-v-radius-md:.5rem;--ono-v-radius-lg:.75rem;--ono-v-elevation-1:0 1px 2px #0000000a,0 1px 1px #00000005;--ono-v-elevation-2:0 10px 25px -5px #2020201a,0 8px 10px -6px #2020201a;--ono-v-text:#111827;--ono-v-text-muted:#374151;--ono-v-link:#c4311d;--ono-v-muted-on-surface:#374151;--ono-v-on-accent:#fff;--ono-v-dialog-border-width:1px;--ono-v-dialog-radius:12px;--ono-v-dialog-max-width:960px;--ono-v-dialog-row-padding:16px;--ono-v-dialog-padding:12px;--ono-v-dialog-notch-height:42px}.dark{--ono-v-bg:#161b22;--ono-v-surface:#0d1117;--ono-v-surface-muted:#0f141b;--ono-v-border:#30363d99;--ono-v-text:#c9d1d9;--ono-v-text-muted:#8b949e;--ono-v-link:#ff6a52;--ono-v-muted-on-surface:#8b949e;--ono-v-hover-overlay:#f0f6fc0f;--ono-v-on-accent:#fff;--ono-v-success:#2ea043;--ono-v-success-bg:#2ea04333;--ono-v-neutral:#6e7681;--ono-v-neutral-bg:#6e768140;--ono-v-chip-bg:#6e768133;--ono-v-chip-text:var(--ono-v-text)}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}@media (min-width:576px){:host{--ono-v-dialog-max-width:540px}}@media (min-width:768px){:host{--ono-v-dialog-max-width:720px}}@media (min-width:992px){:host{--ono-v-dialog-max-width:960px}}button:focus-visible,[role=tab]:focus-visible,summary:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible,[data-open-in-editor]:focus-visible,.js-clipboard:focus-visible{outline:2px solid var(--ono-v-red-orange);outline-offset:2px}.lucide{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.dui{width:1rem;height:1rem;-webkit-mask-image:var(--icon);-webkit-mask-position:50%;-webkit-mask-size:contain;-webkit-mask-repeat:no-repeat;-webkit-mask-image:var(--icon);-webkit-mask-image:var(--icon);mask-image:var(--icon);background-color:currentColor;display:inline-block;-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.dui.hidden{display:none!important}.shiki{max-width:100%;padding-bottom:calc(var(--spacing)*4);overflow-wrap:break-word;overflow:auto}.shiki pre{max-width:100%;overflow:auto}.shiki::-webkit-scrollbar{height:calc(var(--spacing)*2)}.shiki::-webkit-scrollbar-thumb{border-radius:3.40282e38px}.shiki::-webkit-scrollbar-thumb{background-color:var(--color-gray-500)}.shiki:where(.dark,.dark *)::-webkit-scrollbar-thumb{background-color:var(--color-slate-500)}.shiki::-webkit-scrollbar-track{border-radius:3.40282e38px}.shiki::-webkit-scrollbar-track{background-color:var(--color-gray-100)}.shiki:where(.dark,.dark *)::-webkit-scrollbar-track{background-color:var(--color-slate-700)}.dark .shiki,.dark .shiki span{color:var(--shiki-dark)!important;background-color:var(--shiki-dark-bg)!important;font-style:var(--shiki-dark-font-style)!important;font-weight:var(--shiki-dark-font-weight)!important;-webkit-text-decoration:var(--shiki-dark-text-decoration)!important;-webkit-text-decoration:var(--shiki-dark-text-decoration)!important;text-decoration:var(--shiki-dark-text-decoration)!important}.dark [type=checkbox]:checked,.dark [type=radio]:checked{background-color:currentColor}.v-o-skeleton{background:linear-gradient(90deg,#00000014 25%,#0000 50%,#00000014 75%) 0 0/200% 100%}.dark .v-o-skeleton{background:linear-gradient(90deg,#ffffff1a 25%,#0000 50%,#ffffff1a 75%)}#__v_o__stacktrace summary svg{transition:transform .2s}#__v_o__stacktrace[open] summary svg{transform:rotate(90deg)}:has(#__v_o__root){overflow:hidden}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}`;const Wt=`/* eslint-disable n/no-unsupported-features/node-builtins */
|
|
62
62
|
/* eslint-disable no-unsanitized/property */
|
|
63
63
|
/* eslint-disable no-underscore-dangle */
|
|
64
64
|
/* eslint-disable func-names */
|
|
65
65
|
/* eslint-disable no-plusplus */
|
|
66
|
+
|
|
67
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
66
68
|
// @ts-nocheck
|
|
69
|
+
|
|
67
70
|
/**
|
|
68
71
|
* Custom HTML element that displays error overlays in the browser.
|
|
69
72
|
* Provides interactive error display with theme switching, code frames, and navigation.
|
|
@@ -361,7 +364,9 @@ class ErrorOverlay extends HTMLElement {
|
|
|
361
364
|
fileElement.textContent = \`.\${displayPath}\${line ? \`:\${line}\` : ""}\`;
|
|
362
365
|
const editor = localStorage.getItem("vo:editor");
|
|
363
366
|
|
|
364
|
-
|
|
367
|
+
// injected by the hmr plugin when served
|
|
368
|
+
// eslint-disable-next-line no-undef
|
|
369
|
+
const url = \`\${base}__open-in-editor?file=\${encodeURIComponent(fullPath)}\${
|
|
365
370
|
line ? \`&line=\${line}\` : ""
|
|
366
371
|
}\${column ? \`&column=\${column}\` : ""}\${editor ? \`&editor=\${editor}\` : ""}\`;
|
|
367
372
|
|
|
@@ -372,7 +377,7 @@ class ErrorOverlay extends HTMLElement {
|
|
|
372
377
|
|
|
373
378
|
newFileElement.addEventListener("click", (event) => {
|
|
374
379
|
event.preventDefault();
|
|
375
|
-
fetch(url
|
|
380
|
+
fetch(url);
|
|
376
381
|
});
|
|
377
382
|
|
|
378
383
|
newFileElement.classList.remove("hidden");
|
|
@@ -417,8 +422,9 @@ class ErrorOverlay extends HTMLElement {
|
|
|
417
422
|
const fmt = (line) => {
|
|
418
423
|
const m = /\\s*at\\s+(?:(.+?)\\s+\\()?(.*?):(\\d+):(\\d+)\\)?/.exec(line);
|
|
419
424
|
|
|
420
|
-
if (!m)
|
|
425
|
+
if (!m) {
|
|
421
426
|
return \`<div class="frame">\${escape(line)}</div>\`;
|
|
427
|
+
}
|
|
422
428
|
|
|
423
429
|
const function_ = m[1] ? escape(m[1]) : "";
|
|
424
430
|
const file = m[2];
|
|
@@ -450,11 +456,13 @@ class ErrorOverlay extends HTMLElement {
|
|
|
450
456
|
|
|
451
457
|
const editor = localStorage.getItem("vo:editor");
|
|
452
458
|
|
|
453
|
-
|
|
459
|
+
// injected by the hmr plugin when served
|
|
460
|
+
// eslint-disable-next-line no-undef
|
|
461
|
+
const url = \`\${base}__open-in-editor?file=\${encodeURIComponent(resolved)}\${
|
|
454
462
|
line ? \`&line=\${line}\` : ""
|
|
455
463
|
}\${column ? \`&column=\${column}\` : ""}\${editor ? \`&editor=\${editor}\` : ""}\`;
|
|
456
464
|
|
|
457
|
-
fetch(url
|
|
465
|
+
fetch(url);
|
|
458
466
|
});
|
|
459
467
|
});
|
|
460
468
|
}
|
|
@@ -557,11 +565,13 @@ class ErrorOverlay extends HTMLElement {
|
|
|
557
565
|
const previousButton = this.root.querySelector("[data-flame-dialog-error-previous]");
|
|
558
566
|
const nextButton = this.root.querySelector("[data-flame-dialog-error-next]");
|
|
559
567
|
|
|
560
|
-
if (indexElement)
|
|
568
|
+
if (indexElement) {
|
|
561
569
|
indexElement.textContent = (currentIndex + 1).toString();
|
|
570
|
+
}
|
|
562
571
|
|
|
563
|
-
if (totalElement)
|
|
572
|
+
if (totalElement) {
|
|
564
573
|
totalElement.textContent = totalErrors.toString();
|
|
574
|
+
}
|
|
565
575
|
|
|
566
576
|
// Update button states
|
|
567
577
|
if (previousButton) {
|
|
@@ -713,7 +723,7 @@ class ErrorOverlay extends HTMLElement {
|
|
|
713
723
|
}
|
|
714
724
|
}
|
|
715
725
|
}
|
|
716
|
-
`;var Hn=Object.defineProperty,_t=$((t,e)=>Hn(t,"name",{value:e,configurable:!0}),"a$4");const Gt='<option value="">Auto-detected Editor</option>',qn="class ErrorOverlay",Zn="var ErrorOverlay = ",Vn="window.ErrorOverlay = ErrorOverlay;",
|
|
726
|
+
`;var Hn=Object.defineProperty,_t=$((t,e)=>Hn(t,"name",{value:e,configurable:!0}),"a$4");const Gt='<option value="">Auto-detected Editor</option>',qn="class ErrorOverlay",Zn="var ErrorOverlay = ",Vn="window.ErrorOverlay = ErrorOverlay;",Nn=_t(()=>{try{const t=Object.keys(dt);return[Gt,...t.map(e=>`<option value="${String(e)}">${String(dt[e])}</option>`)].join("")}catch{return Gt}},"generateEditorOptions"),Un=_t(()=>{const t=Nn();return`<style>${On}</style>
|
|
717
727
|
<div id="__v_o__root" class="fixed inset-0 z-0 flex flex-col items-center pt-[10vh] px-[15px] hidden">
|
|
718
728
|
<div id="__v_o__backdrop" class="fixed inset-0 -z-1 bg-black/60 backdrop-blur-sm md:backdrop-blur pointer-events-auto"></div>
|
|
719
729
|
<div id="__v_o__notch" class="relative z-[2] flex w-full max-w-[var(--ono-v-dialog-max-width)] items-center justify-between outline-none translate-x-[var(--ono-v-dialog-border-width)] translate-y-[var(--ono-v-dialog-border-width)]" style="--stroke-color: var(--ono-v-border); --background-color: var(--ono-v-surface);">
|
|
@@ -768,7 +778,7 @@ class ErrorOverlay extends HTMLElement {
|
|
|
768
778
|
</button>
|
|
769
779
|
<button type="button" title="Switch to light mode" aria-label="Switch to light mode" class="hidden font-medium rounded-full hover:bg-[var(--ono-v-hover-overlay)] focus:outline-hidden focus:bg-[var(--ono-v-hover-overlay)] text-[var(--ono-v-text)]" data-v-o-theme-click-value="light">
|
|
770
780
|
<span class="inline-flex shrink-0 justify-center items-center size-8">
|
|
771
|
-
<span class="dui size-5" style="-webkit-mask-image: url('${
|
|
781
|
+
<span class="dui size-5" style="-webkit-mask-image: url('${Nt}'); mask-image: url('${Nt}')"></span>
|
|
772
782
|
</span>
|
|
773
783
|
</button>
|
|
774
784
|
</div>
|
|
@@ -776,7 +786,7 @@ class ErrorOverlay extends HTMLElement {
|
|
|
776
786
|
<div class="flex items-center">
|
|
777
787
|
<button type="button" id="__v_o__close" aria-label="Close error overlay" class="font-medium rounded-full hover:bg-[var(--ono-v-hover-overlay)] focus:outline-hidden focus:bg-[var(--ono-v-hover-overlay)] text-[var(--ono-v-text)]">
|
|
778
788
|
<span class="inline-flex shrink-0 justify-center items-center size-8">
|
|
779
|
-
<span class="dui size-5" style="-webkit-mask-image: url('${
|
|
789
|
+
<span class="dui size-5" style="-webkit-mask-image: url('${Ut}'); mask-image: url('${Ut}')"></span>
|
|
780
790
|
</span>
|
|
781
791
|
</button>
|
|
782
792
|
</div>
|
|
@@ -854,34 +864,34 @@ class ErrorOverlay extends HTMLElement {
|
|
|
854
864
|
</summary>
|
|
855
865
|
<div class="px-4 py-3 text-[var(--ono-v-text)] text-xs rounded-b-[var(--ono-v-dialog-radius)] font-mono leading-5 overflow-auto space-y-0.5 max-h-[140px] bg-[var(--ono-v-surface)] border-t border-[var(--ono-v-border)]"></div>
|
|
856
866
|
</details>
|
|
857
|
-
</div>`},"generateOverlayTemplate"),Wn=_t(t=>{const e=
|
|
867
|
+
</div>`},"generateOverlayTemplate"),Wn=_t(t=>{const e=Un(),r=`const overlayTemplate = ${JSON.stringify(e)};`;let n=t.replace(qn,`${r}
|
|
858
868
|
${Wt}
|
|
859
869
|
class ViteErrorOverlay`);return n=n.replace(Zn,`${r}
|
|
860
870
|
${Wt}
|
|
861
871
|
var ViteErrorOverlay = `),n=`${n}
|
|
862
872
|
|
|
863
|
-
${Vn};`,n},"patchOverlay");var Gn=Object.defineProperty,
|
|
864
|
-
`),o=gi(e),s=hi(e),i=X((f,h,m)=>{let w=0;for(const[g,y]of f.entries()){if(!y)continue;const E=y.includes(h)||Yt(y,h),S=Mr.some(R=>R.test(y));if(E&&S){const{bestMatch:R,bestPattern:H}=Kt(y);if(R&&H&&(w++,w>m))return{column:er(R,H),line:g+1}}}return null},"processErrorConstructorLines")(n,e,r);if(i)return i;o&&X((f,h,m)=>{if(f[0].includes("Failed to resolve import")){const w=f[1];if(!w)return;const g=de(w);m.unshift(`import.*from ["']${g}["']`,`import.*["']${g}["']`,w)}else if(f[0].includes("is not defined")){const w=f[1];if(!w)return;m.unshift(w,`{${w}}`,`src={${w}}`,`${w}.`,`=${w}`)}else if(f[0].includes("Cannot read properties")){const w=f[1],g=f[2];if(!g)return;m.unshift(g,`${w}.${g}`,`${w}?.${g}`,`${w}[${g}]`)}else{const w=f[1];if(!w)return;const g=de(h),y=de(w);m.unshift(`new Error(\`${y}`,`throw new Error(\`${y}`,`new Error("${y}`,`new Error('${y}`,`throw new Error("${y}`,`throw new Error('${y}`,`new Error("${g}")`,`new Error('${g}')`,`throw new Error("${g}")`,`throw new Error('${g}')`,`new Error(\`${g}\`)`,`throw new Error(\`${g}\`)`)}},"addDynamicPatterns")(o,e,s);const a=X((f,h,m)=>{let w=0;for(const[g,y]of f.entries()){if(!y||!Yt(y,h))continue;const{bestMatch:E,bestPattern:S}=Kt(y);if(E&&S&&(w++,w>m))return{column:er(E,S),line:g+1}}return null},"processTemplateLiteralLines"),l=X((f,h,m,w)=>{let g=0;for(const[y,E]of f.entries()){if(!E)continue;let S=-1,R=null;for(const H of h){const V=E.indexOf(H);V!==-1&&(S===-1||V<S)&&(S=V,R=H)}if(S!==-1&&R&&(g++,g>w))return{column:c(S,R,E,m),line:y+1}}return null},"processPatternLines"),c=X((f,h,m,w)=>{if(!w)return f+1;if(w[0].includes("Failed to resolve import")){const g=w[1];if(m.includes(`"${g}"`)||m.includes(`'${g}'`)){const y=m.includes(`"${g}"`)?'"':"'";return m.indexOf(`${y}${g}${y}`)+1}}else if(w[0].includes("is not defined")){const g=w[1];if(g&&h===g)return f+1;if(g&&h.includes(g))return f+h.indexOf(g)+1}else if(w[0].includes("Cannot read properties")){const g=w[2];if(g&&h.includes(g))return f+h.indexOf(g)+1}else if(h.includes("new Error("))return m.indexOf("new Error(")+1;return f+1},"calculatePatternColumn");return a(n,e,r)||l(n,s,o,r)},"findErrorInSourceCode");var wi=Object.defineProperty,Fe=$((t,e)=>wi(t,"name",{value:e,configurable:!0}),"m$3");const vi=1,tr=Fe((t,e)=>{let r=t,n=e;return t>=20?r=Math.max(1,Math.round(t*.5)):t>15?r=Math.max(1,Math.round(t*.6)):t>10?r=Math.max(1,t-8):r=Math.max(1,t-3),e>=10||e>7?n=Math.max(0,e-1):e>5&&(n=Math.max(0,e)),{estimatedColumn:n,estimatedLine:r}},"estimateOriginalPosition"),bi=Fe((t,e,r)=>{try{const n=new Io(t),o=[{column:r,desc:"original",line:e},{column:Math.max(0,r-vi),desc:"offset",line:e},{column:r,desc:"line above",line:e-1},{column:r,desc:"line below",line:e+1},...Array.from({length:5},(s,i)=>({column:Math.max(0,r-2+i),desc:`col ${r-2+i}`,line:e}))];for(const s of o){const i=Ho(n,{column:s.column,line:s.line});if(i.source&&i.line!==void 0&&i.column!==void 0&&i.line>0&&i.column>=0)return{column:i.column,line:i.line,source:i.source}}}catch(n){console.warn("Source map processing failed:",n)}return null},"resolveSourceMapPosition"),ki=Fe((t,e)=>e?Lr(t)?yi(t,e):e:t,"resolveSourcePath"),yi=Fe((t,e)=>{try{const r=new URL(t),n=(r.pathname||"").replace(/^\//,""),o=n.includes("/")?n.slice(0,Math.max(0,n.lastIndexOf("/"))):"";return`${r.origin}/${o?`${o}/`:""}${e}`}catch(r){return console.warn("URL parsing failed for source path resolution:",r),t}},"resolveHttpSourcePath"),pt=Fe(async(t,e,r,n,o,s,i=0)=>{if(s&&e)try{let l=null;if(e.transformResult?.map?.sourcesContent?.[0]?l=e.transformResult.map.sourcesContent[0]:e.transformResult?.code&&(l=e.transformResult.code),!l&&(e.id||e.url)){const c=e.id||e.url;if(c)try{const p=await t.transformRequest(c);p?.map&&"sourcesContent"in p.map&&p.map.sourcesContent?.[0]?l=p.map.sourcesContent[0]:p?.code&&(l=p.code)}catch(p){console.warn("Failed to get fresh source for error search:",p)}}if(!l&&r)try{const c=await import("node:fs/promises");let p=r;if(r.includes("://"))try{p=new URL(r).pathname}catch{const f=r.indexOf("://");f!==-1&&(p=r.slice(f+3))}p.startsWith("/")||(p=`${t.config.root||process.cwd()}/${p}`),l=await c.readFile(p,"utf8")}catch(c){console.warn("Failed to read source file from disk:",c)}if(l){const c=fi(l,s,i);if(c)return{originalFileColumn:c.column,originalFileLine:c.line,originalFilePath:r}}}catch(l){console.warn("Source code search failed:",l)}let a=e?.transformResult?.map;if(!a&&(e?.id||e?.url)){const l=e.id||e.url;if(l)try{const c=await t.transformRequest(l);c?.map&&(a=c.map)}catch(c){console.warn("Failed to get fresh source map:",c)}}if(!a){const{estimatedColumn:l,estimatedLine:c}=tr(n,o);return{originalFileColumn:l,originalFileLine:c,originalFilePath:r}}try{const l=bi(a,n,o);if(!l){const{estimatedColumn:p,estimatedLine:f}=tr(n,o);return{originalFileColumn:p,originalFileLine:f,originalFilePath:r}}const c=ki(r,l.source);return{originalFileColumn:l.column,originalFileLine:l.line,originalFilePath:c}}catch(l){return console.warn("Source map resolution failed:",l),{originalFileColumn:o,originalFileLine:n,originalFilePath:r}}},"resolveOriginalLocation");var xi=Object.defineProperty,$i=$((t,e)=>xi(t,"name",{value:e,configurable:!0}),"ce"),_i=Object.defineProperty,Et=$i((t,e)=>_i(t,"name",{value:e,configurable:!0}),"C"),Si=Object.defineProperty,_=Et((t,e)=>Si(t,"name",{value:e,configurable:!0}),"u$1");let rr=_(()=>{var t=(()=>{var e=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,s=_((d,u)=>{for(var v in u)e(d,v,{get:u[v],enumerable:!0})},"J"),i=_((d,u,v,k)=>{if(u&&typeof u=="object"||typeof u=="function")for(let b of n(u))!o.call(d,b)&&b!==v&&e(d,b,{get:_(()=>u[b],"get"),enumerable:!(k=r(u,b))||k.enumerable});return d},"T"),a=_(d=>i(e({},"__esModule",{value:!0}),d),"W"),l={};s(l,{zeptomatch:_(()=>Lo,"zeptomatch")});var c=_(d=>Array.isArray(d),"k"),p=_(d=>typeof d=="function","x"),f=_(d=>d.length===0,"K"),h=(()=>{const{toString:d}=Function.prototype,u=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return v=>(v.length===0||v.length===1)&&u.test(d.call(v))})(),m=_(d=>typeof d=="number","Y"),w=_(d=>typeof d=="object"&&d!==null,"rr"),g=_(d=>d instanceof RegExp,"er"),y=(()=>{const d=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return u=>d.test(u.source)})(),E=(()=>{const d=/^[a-zA-Z0-9_-]+$/;return u=>d.test(u.source)&&!u.flags.includes("i")})(),S=_(d=>typeof d=="string","M"),R=_(d=>d===void 0,"f"),H=_(d=>{const u=new Map;return v=>{const k=u.get(v);if(k!==void 0)return k;const b=d(v);return u.set(v,b),b}},"ar"),V=_((d,u,v={})=>{const k={cache:{},input:d,index:0,indexBacktrackMax:0,options:v,output:[]},b=N(u)(k),L=Math.max(k.index,k.indexBacktrackMax);if(b&&k.index===d.length)return k.output;throw new Error(`Failed to parse at index ${L}`)},"or"),x=_((d,u)=>c(d)?B(d,u):S(d)?Ae(d,u):te(d,u),"o"),B=_((d,u)=>{const v={};for(const k of d){if(k.length!==1)throw new Error(`Invalid character: "${k}"`);const b=k.charCodeAt(0);v[b]=!0}return k=>{const b=k.input;let L=k.index,M=L;for(;M<b.length&&b.charCodeAt(M)in v;)M+=1;if(M>L){if(!R(u)&&!k.options.silent){const O=b.slice(L,M),W=p(u)?u(O,b,`${L}`):u;R(W)||k.output.push(W)}k.index=M}return!0}},"ir"),te=_((d,u)=>{if(E(d))return Ae(d.source,u);{const v=d.source,k=d.flags.replace(/y|$/,"y"),b=new RegExp(v,k);return y(d)&&p(u)&&!h(u)?Ye(b,u):ae(b,u)}},"ur"),Ye=_((d,u)=>v=>{const k=v.index,b=v.input;d.lastIndex=k;const L=d.exec(b);if(L){const M=d.lastIndex;if(!v.options.silent){const O=u(...L,b,`${k}`);R(O)||v.output.push(O)}return v.index=M,!0}else return!1},"sr"),ae=_((d,u)=>v=>{const k=v.index,b=v.input;if(d.lastIndex=k,d.test(b)){const L=d.lastIndex;if(!R(u)&&!v.options.silent){const M=p(u)?u(b.slice(k,L),b,`${k}`):u;R(M)||v.output.push(M)}return v.index=L,!0}else return!1},"cr"),Ae=_((d,u)=>v=>{const k=v.index,b=v.input;if(b.startsWith(d,k)){if(!R(u)&&!v.options.silent){const L=p(u)?u(d,b,`${k}`):u;R(L)||v.output.push(L)}return v.index+=d.length,!0}else return!1},"R"),T=_((d,u,v,k)=>{const b=N(d),L=u>1;return ge(me(ye(M=>{let O=0;for(;O<v;){const W=M.index;if(!b(M)||(O+=1,M.index===W))break}return O>=u},L),k))},"O"),A=_((d,u)=>T(d,0,1,u),"lr"),D=_((d,u)=>T(d,0,1/0,u),"m"),U=_((d,u)=>{const v=d.map(N);return ge(me(ye(k=>{for(let b=0,L=v.length;b<L;b++)if(!v[b](k))return!1;return!0}),u))},"_"),G=_((d,u)=>{const v=d.map(N);return ge(me(k=>{for(let b=0,L=v.length;b<L;b++)if(v[b](k))return!0;return!1},u))},"p"),ye=_((d,u=!0,v=!1)=>{const k=N(d);return u?b=>{const L=b.index,M=b.output.length,O=k(b);return!O&&!v&&(b.indexBacktrackMax=Math.max(b.indexBacktrackMax,b.index)),(!O||v)&&(b.index=L,b.output.length!==M&&(b.output.length=M)),O}:k},"P"),me=_((d,u)=>{const v=N(d);return u?k=>{if(k.options.silent)return v(k);const b=k.output.length;if(v(k)){const L=k.output.splice(b,1/0),M=u(L);return R(M)||k.output.push(M),!0}else return!1}:v},"C"),ge=(()=>{let d=0;return u=>{const v=N(u),k=d+=1;return b=>{var L;if(b.options.memoization===!1)return v(b);const M=b.index,O=(L=b.cache)[k]||(L[k]={indexMax:-1,queue:[]}),W=O.queue;if(M<=O.indexMax){const xe=O.store||(O.store=new Map);if(W.length){for(let fe=0,zo=W.length;fe<zo;fe+=2){const Po=W[fe*2],Fo=W[fe*2+1];xe.set(Po,Fo)}W.length=0}const ee=xe.get(M);if(ee===!1)return!1;if(m(ee))return b.index=ee,!0;if(ee)return b.index=ee.index,ee.output?.length&&b.output.push(...ee.output),!0}const Bt=b.output.length,Mo=v(b);if(O.indexMax=Math.max(O.indexMax,M),Mo){const xe=b.index,ee=b.output.length;if(ee>Bt){const fe=b.output.slice(Bt,ee);W.push(M,{index:xe,output:fe})}else W.push(M,xe);return!0}else return W.push(M,!1),!1}}})(),je=_(d=>{let u;return v=>(u||(u=N(d())),u(v))},"A"),N=H(d=>{if(p(d))return f(d)?je(d):d;if(S(d)||g(d))return x(d);if(c(d))return U(d);if(w(d))return G(Object.values(d));throw new Error("Invalid rule")}),F=_(d=>d,"v"),Q=_(d=>u=>V(u,d,{memoization:!1}).join(""),"z"),le=_(d=>{const u={};return v=>u[v]??(u[v]=d(v))},"pr"),re="abcdefghijklmnopqrstuvwxyz",Ke=_(d=>{let u="";for(;d>0;){const v=(d-1)%26;u=re[v]+u,d=Math.floor((d-1)/26)}return u},"vr"),Lt=_(d=>{let u=0;for(let v=0,k=d.length;v<k;v++)u=u*26+re.indexOf(d[v])+1;return u},"N"),et=_((d,u)=>{if(u<d)return et(u,d);const v=[];for(;d<=u;)v.push(d++);return v},"$"),Br=_((d,u,v)=>et(d,u).map(k=>String(k).padStart(v,"0")),"fr"),Mt=_((d,u)=>et(Lt(d),Lt(u)).map(Ke),"j"),tt=x(/\\./,F),Or=x(/[$.*+?^(){}[\]\|]/,d=>`\\${d}`),Dr=x(/./,F),Ir=x(/^(?:!!)*!(.*)$/,(d,u)=>`(?!^${jt(u)}$).*?`),Hr=x(/^(!!)+/,""),qr=G([Ir,Hr]),Zr=x(/\/(\*\*\/)+/,"(?:[\\\\/].+[\\\\/]|[\\\\/])"),Vr=x(/^(\*\*\/)+/,"(?:^|.*[\\\\/])"),Ur=x(/\/(\*\*)$/,"(?:[\\\\/].*|$)"),Nr=x(/\*\*/,".*"),zt=G([Zr,Vr,Ur,Nr]),Wr=x(/\*\/(?!\*\*\/|\*$)/,"[^\\\\/]*[\\\\/]"),Gr=x(/\*/,"[^\\\\/]*"),Pt=G([Wr,Gr]),Ft=x("?","[^\\\\/]"),Qr=x("[",F),Xr=x("]",F),Jr=x(/[!^]/,"^\\\\/"),Yr=x(/[a-z]-[a-z]|[0-9]-[0-9]/i,F),Kr=x(/[$.*+?^(){}[\|]/,d=>`\\${d}`),eo=x(/[^\]]/,F),to=G([tt,Kr,Yr,eo]),Rt=U([Qr,A(Jr),D(to),Xr]),ro=x("{","(?:"),oo=x("}",")"),no=x(/(\d+)\.\.(\d+)/,(d,u,v)=>Br(+u,+v,Math.min(u.length,v.length)).join("|")),io=x(/([a-z]+)\.\.([a-z]+)/,(d,u,v)=>Mt(u,v).join("|")),so=x(/([A-Z]+)\.\.([A-Z]+)/,(d,u,v)=>Mt(u.toLowerCase(),v.toLowerCase()).join("|").toUpperCase()),ao=G([no,io,so]),Tt=U([ro,ao,oo]),lo=x("{","(?:"),co=x("}",")"),po=x(",","|"),uo=x(/[$.*+?^(){[\]\|]/,d=>`\\${d}`),ho=x(/[^}]/,F),mo=je(()=>At),go=G([zt,Pt,Ft,Rt,Tt,mo,tt,uo,po,ho]),At=U([lo,D(go),co]),fo=D(G([qr,zt,Pt,Ft,Rt,Tt,At,tt,Or,Dr])),wo=fo,vo=Q(wo),jt=vo,bo=x(/\\./,F),ko=x(/./,F),yo=x(/\*\*\*+/,"*"),xo=x(/([^/{[(!])\*\*/,(d,u)=>`${u}*`),$o=x(/(^|.)\*\*(?=[^*/)\]}])/,(d,u)=>`${u}*`),_o=D(G([bo,yo,xo,$o,ko])),So=_o,Eo=Q(So),Co=Eo,Be=_((d,u)=>Array.isArray(d)?d.map(Be.compile).some(v=>v.test(u)):Be.compile(d).test(u),"S");Be.compile=le(d=>new RegExp(`^${jt(Co(d))}[\\\\/]?$`,"s"));var Lo=Be;return a(l)})();return t.default||t},"_lazyMatch"),rt;const Ei=_((t,e)=>(rt||(rt=rr(),rr=null),rt(t,e)),"default");var Ci=Object.defineProperty,Li=Et((t,e)=>Ci(t,"name",{value:e,configurable:!0}),"t");const Mi=/^[A-Z]:\//i,he=Li((t="")=>t&&t.replaceAll("\\","/").replace(Mi,e=>e.toUpperCase()),"normalizeWindowsPath");var zi=Object.defineProperty,Z=Et((t,e)=>zi(t,"name",{value:e,configurable:!0}),"r");const Pi=/^[/\\]{2}/,Fi=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,zr=/^[A-Z]:$/i,or=/^\/([A-Z]:)?$/i,Ri=/.(\.[^./]+)$/,Ti=/^[/\\]|^[a-z]:[/\\]/i,Ai=Z(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),Pr=Z((t,e)=>{let r="",n=0,o=-1,s=0,i=null;for(let a=0;a<=t.length;++a){if(a<t.length)i=t[a];else{if(i==="/")break;i="/"}if(i==="/"){if(!(o===a-1||s===1))if(s===2){if(r.length<2||n!==2||!r.endsWith(".")||r.at(-2)!=="."){if(r.length>2){const l=r.lastIndexOf("/");l===-1?(r="",n=0):(r=r.slice(0,l),n=r.length-1-r.lastIndexOf("/")),o=a,s=0;continue}else if(r.length>0){r="",n=0,o=a,s=0;continue}}e&&(r+=r.length>0?"/..":"..",n=2)}else r.length>0?r+=`/${t.slice(o+1,a)}`:r=t.slice(o+1,a),n=a-o-1;o=a,s=0}else i==="."&&s!==-1?++s:s=-1}return r},"normalizeString"),ze=Z(t=>Fi.test(t),"isAbsolute"),Ve=Z(function(t){if(t.length===0)return".";t=he(t);const e=Pi.exec(t),r=ze(t),n=t.at(-1)==="/";return t=Pr(t,!r),t.length===0?r?"/":n?"./":".":(n&&(t+="/"),zr.test(t)&&(t+="/"),e?r?`//${t}`:`//./${t}`:r&&!ze(t)?`/${t}`:t)},"normalize");Z((...t)=>{let e="";for(const r of t)if(r)if(e.length>0){const n=e[e.length-1]==="/",o=r[0]==="/";n&&o?e+=r.slice(1):e+=n||o?r:`/${r}`}else e+=r;return Ve(e)},"join");const Ue=Z(function(...t){t=t.map(n=>he(n));let e="",r=!1;for(let n=t.length-1;n>=-1&&!r;n--){const o=n>=0?t[n]:Ai();!o||o.length===0||(e=`${o}/${e}`,r=ze(o))}return e=Pr(e,!r),r&&!ze(e)?`/${e}`:e.length>0?e:"."},"resolve");Z(function(t){return he(t)},"toNamespacedPath");const ji=Z(function(t){return Ri.exec(he(t))?.[1]??""},"extname");Z(function(t,e){const r=Ue(t).replace(or,"$1").split("/"),n=Ue(e).replace(or,"$1").split("/");if(n[0][1]===":"&&r[0][1]===":"&&r[0]!==n[0])return n.join("/");const o=[...r];for(const s of o){if(n[0]!==s)break;r.shift(),n.shift()}return[...r.map(()=>".."),...n].join("/")},"relative");const Bi=Z(t=>{const e=he(t).replace(/\/$/,"").split("/").slice(0,-1);return e.length===1&&zr.test(e[0])&&(e[0]+="/"),e.join("/")||(ze(t)?"/":".")},"dirname");Z(function(t){const e=[t.root,t.dir,t.base??t.name+t.ext].filter(Boolean);return he(t.root?Ue(...e):e.join("/"))},"format");const Oi=Z((t,e)=>{const r=he(t).split("/").pop();return e&&r.endsWith(e)?r.slice(0,-e.length):r},"basename");Z(function(t){const e=Ti.exec(t)?.[0]?.replace(/\\/g,"/")??"",r=Oi(t),n=ji(r);return{base:r,dir:Bi(t),ext:n,name:r.slice(0,r.length-n.length),root:e}},"parse");Z((t,e)=>Ei(e,Ve(t)),"matchesGlob");var Di=Object.defineProperty,K=$((t,e)=>Di(t,"name",{value:e,configurable:!0}),"e$1");const ut="/",nr=":",Ii="at ",Hi=/https?:\/\/[^\s)]+/g,qi=/file:\/\//g,Fr=/\/@fs\//g,Zi=new Set([".cjs",".js",".jsx",".mjs",".svelte",".ts",".tsx",".vue"]),Vi=new Set(["<anonymous>","<unknown>","native"]),Ui=K(t=>{const e=t.trim();return!e.startsWith(Ii)||!([...Zi].some(r=>e.includes(r))||[...Vi].some(r=>e.includes(r)))?!1:/\([^)]*:\d+:\d+\)/.test(e)||/\([^)]*:\d+\)/.test(e)||/[^(\s][^:]*:\d+:\d+/.test(e)||/[^(\s][^:]*:\d+/.test(e)||e.includes("native")||e.includes("<unknown>")},"isValidStackFrame"),Ni=K(t=>(t=t.replaceAll(Fr,ut),t=t.replaceAll(qi,""),t.includes("<unknown>")?t.trim()||"":t.trim()&&!Ui(t)?"":t),"cleanStackLine"),Wi=K((t,e)=>{try{const{baseUrl:r,col:n,line:o}=Gi(t),s=Qi(r,e);return Xi(s,o,n)}catch(r){return console.warn("Failed to absolutize URL:",t,r),t}},"absolutizeUrl"),Gi=K(t=>{const e=t.match(/:(\d+)(?::(\d+))?$/),r=e?.[1],n=e?.[2];return{baseUrl:e?t.slice(0,-e[0].length):t,col:n,line:r}},"parseUrlWithLocation"),Qi=K((t,e)=>{const r=new URL(t);let n=decodeURIComponent(r.pathname||"");return n=n.replaceAll(Fr,ut),Ue(e,n.startsWith(ut)?n.slice(1):n)},"urlToAbsolutePath"),Xi=K((t,e,r)=>{if(!e)return t;const n=r?`${nr}${r}`:"";return`${t}${nr}${e}${n}`},"formatAbsolutePath"),Je=K(t=>t&&t.replaceAll(`\r
|
|
873
|
+
${Vn};`,n},"patchOverlay");var Gn=Object.defineProperty,j=$((t,e)=>Gn(t,"name",{value:e,configurable:!0}),"n$2");const Qn=4,Qt=1e3,Xn=5,Jn=.5,Yn=[".js",".ts",".jsx",".tsx",".mjs",".cjs"],Kn=[".css",".scss",".sass",".less"],Cr=[".svg",".png",".jpg",".jpeg",".gif",".webp",".ico"],ei=new Set([...Cr,...Yn,...Kn]),ti=j((t,e)=>{const r=Y.relative(t,e);return r.startsWith(".")?r:`./${r}`},"getRelativePath"),ri=j(t=>t===0?"":t===1?" (in parent directory)":t===2?" (in grandparent directory)":` (${t} directories away)`,"getPathContext"),oi=j((t,e)=>{try{const r=Y.relative(t,e).split(Y.sep).filter(o=>o&&o!==".");let n=0;for(const o of r)n+=o===".."?2:1;return n}catch{return 10}},"calculatePathDistance"),ni=j((t,e,r,n)=>{if(e&&n===e){const s=Oe(t,r);return s<=Math.max(3,Math.floor(t.length*Jn))?10-s:0}if(!e){const s=Oe(t,r);return s===0?9:s<=Math.max(2,Math.floor(t.length*.3))&&ei.has(n)?7-s:0}const o=Oe(t,r);return o<=Math.max(2,Math.floor(t.length*.4))?5-o:0},"calculateRelevanceScore"),ii=j((t,e,r)=>{const n=[],o=j((s,i=0)=>{if(!(i>Qn||n.length>Qt))try{const a=Io.readdirSync(s,{withFileTypes:!0});for(const l of a){if(n.length>Qt)break;const c=Y.join(s,l.name);if(l.isDirectory()&&!l.name.startsWith(".")&&l.name!=="node_modules")o(c,i+1);else if(l.isFile()){const p=Y.extname(l.name),f=Y.basename(l.name,p),h=ni(e,r,f,p);h>0&&n.push({baseName:f,extension:p,fullPath:c,path:c,relevanceScore:h})}}}catch{}},"walk");return o(t),n},"collectFileCandidates"),Xt=j((t,e,r)=>{const n=Y.basename(t),o=Y.extname(n),s=Y.basename(n,o),i=Y.dirname(e),a=ii(r,s,o).map(h=>{const m=Oe(s,h.baseName),w=oi(i,Y.dirname(h.fullPath)),g=h.relevanceScore*.7+w*.2+m*.1;return{...h,nameDistance:m,pathDistance:w,score:g}});a.sort((h,m)=>h.score-m.score);const l=[],c=a.slice(0,8);let p=!1;for(const h of c){const m=ti(i,h.fullPath);if(!l.includes(m)){const w=ri(h.pathDistance);l.push(m+w);const g=h.fullPath.replaceAll("\\","/").split("/"),y=g.indexOf("public");y!==-1&&y<g.length-1&&(p=!0)}}let f=`<ul>${[...new Set(l)].slice(0,Xn).map(h=>`<li>\`${h}\`</li>`).join(`
|
|
874
|
+
`)}</ul>`;if(p){const h=n;[...Cr].some(m=>h.includes(m))&&(f+=`Files in the \`public\` folder should be accessed via absolute URLs like \`/${h}\`.`)}return f},"findSimilarFiles"),si=[{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:j(t=>t.includes("window is not defined")||t.includes("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:j(t=>t.includes("Plugin ordering")||t.includes("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:j(t=>t.includes("CSS Modules")||t.includes("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(`
|
|
875
|
+
`),header:"Environment Variables"},test:j(t=>t.includes("VITE_")||t.includes("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:j(t=>t.includes("Failed to load")&&(t.includes(".png")||t.includes(".jpg")||t.includes(".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:j(t=>t.includes("production")||t.includes("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:j(t=>t.includes("HMR")||t.includes("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:j((t,e)=>t.includes("TypeScript")||e&&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:j(t=>t.includes("optimizeDeps")||t.includes("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:j(t=>t.includes("resolve.alias")||t.includes("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:j(t=>t.includes("middleware")||t.includes("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:j(t=>t.includes("plugin")&&t.includes("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:j(t=>t.includes("build.outDir")||t.includes("dist"),"test")}],ai=j(t=>({async handle(e,r){const{file:n,language:o}=r,s=e.message??"";if(s.includes("Failed to resolve import")||s.includes("Cannot resolve module")){const i=s.match(/Failed to resolve import ["']([^"']+)["']/),a=s.match(/Cannot resolve module ["']([^"']+)["']/),l=i?.[1]||a?.[1];if(l&&n){const c=Xt(l,n,t);if(c)return{body:`The import path \`${l}\` could not be resolved.<br/><br/>Did you mean one of these files?<br/>${c}`};if([".jsx",".tsx"].includes(o)||s.includes("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(o==="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(s.includes("Cannot resolve")&&(o==="typescript"||o==="javascript")){const i=s.match(/Cannot resolve ["'](\.\.?\/[^"']*)["']/);if(i){const a=i[1];if(a&&n){const l=Xt(a,n,t);if(l)return{body:`Cannot resolve \`${a}\`. Did you mean one of these files?${l}`,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 i of si)if(i.test(s,n))return i.solution},name:"vite-solution-finder",priority:20}),"createViteSolutionFinder");var li=Object.defineProperty,be=$((t,e)=>li(t,"name",{value:e,configurable:!0}),"r$2");let Ee,Ce;const ci=be(async(t=[])=>{try{const[e,r]=await Promise.all([import("shiki/core"),import("shiki/engine/javascript")]),{createHighlighterCore:n}=e,{createJavaScriptRegexEngine:o}=r,s=await n({themes:[import("@shikijs/themes/github-dark-default"),import("@shikijs/themes/github-light")],langs:[import("@shikijs/langs/javascript"),import("@shikijs/langs/typescript"),import("@shikijs/langs/jsx"),import("@shikijs/langs/tsx"),import("@shikijs/langs/json"),import("@shikijs/langs/jsonc"),import("@shikijs/langs/xml"),import("@shikijs/langs/sql"),import("@shikijs/langs/bash"),import("@shikijs/langs/shell"),import("@shikijs/langs/markdown"),import("@shikijs/langs/mdx"),import("@shikijs/langs/html"),import("@shikijs/langs/css"),import("@shikijs/langs/scss"),import("@shikijs/langs/less"),import("@shikijs/langs/sass"),import("@shikijs/langs/stylus"),import("@shikijs/langs/styl"),...t],engine:o()}),i=s;return Ce=be(()=>{try{s?.dispose?.()}catch{}Ee=void 0},"disposeFn"),i}catch{const{createHighlighter:e}=await import("shiki"),r=await e({langs:["javascript","typescript","jsx","tsx","json","jsonc","xml","sql","bash","shell","markdown","mdx"],themes:["github-dark-default","github-light"]});return Ce=be(()=>{try{r?.dispose?.()}catch{}Ee=void 0},"disposeFn"),r}},"createSingletonHighlighter"),di=be(async(t=[])=>(Ee||(Ee=ci(t)),Ee),"getHighlighter");be(async()=>{try{Ce&&(Ce(),Ce=void 0)}catch{}},"disposeHighlighter");const Jt=be((t=[])=>({name:"@shikijs/transformers:compact-line-options",line(e,r){const n=t.find(o=>o.line===r);return n?.classes&&this.addClassToHast(e,n.classes),e}}),"transformerCompactLineOptions");var pi=Object.defineProperty,Lr=$((t,e)=>pi(t,"name",{value:e,configurable:!0}),"s$2");const ui=Lr(t=>!Array.isArray(t)||t.length===0?!1:t.some(e=>e&&typeof e=="object"&&(e.location||e.pluginName||e.text)),"isESBuildErrorArray"),hi=Lr(t=>t.map((e,r)=>{const{location:n,pluginName:o,text:s}=e,i={message:s||`ESBuild error #${r+1}`};return n&&(i.file=n.file,i.line=n.line,i.column=n.column),o&&(i.plugin=o),i.name=e.name||"Error",i.stack=e.stack||"",i}),"processESBuildErrors");var mi=Object.defineProperty,Mr=$((t,e)=>mi(t,"name",{value:e,configurable:!0}),"c$3");const gi=Mr((t,e)=>{for(const[r,n]of t.moduleGraph.idToModuleMap){if(!n)continue;const o=n,s=[String(o.file||"").replaceAll("\\","/"),String(r||"").replaceAll("\\","/"),String(o.url||"").replaceAll("\\","/")];for(const i of e)if(s.some(a=>a===i||a.includes(i)||i.includes(a)))return n}},"findBestModuleMatch"),Me=Mr((t,e)=>{const r=[...e,...e.map(s=>s.replace(/^\/@fs\//,"")),...e.map(s=>s.replace(/^[./]*/,""))];let n,o=0;for(const s of r)try{const i=t.moduleGraph.getModuleById(s);if(i){const l=Object.keys(i).length>0,c=!!i.transformResult;let p=0;if(l&&c?p=2:l&&(p=1),l&&(p>o&&(n=i,o=p),c))return i}const a=t.moduleGraph.getModuleByUrl?.(s);if(a){const l=Object.keys(a).length>0,c=!!a.transformResult;let p=0;if(l&&c?p=2:l&&(p=1),l&&(p>o&&(n=a,o=p),c))return a}}catch{}return n||gi(t,e)||void 0},"findModuleForPath");var fi=Object.defineProperty,St=$((t,e)=>fi(t,"name",{value:e,configurable:!0}),"r$1");const wi=/^https?:\/\//,vi=St(t=>{const e=new URL(t),{pathname:r}=e,n=e.search||"",o=[r+n,r,r.replace(/^\/@fs\//,""),decodeURIComponent(r+n),decodeURIComponent(r)];return[...new Set(o)].filter(Boolean)},"generateUrlCandidates"),zr=St(t=>wi.test(t),"isHttpUrl"),ce=St(t=>{if(!t)return[];try{if(zr(t))return vi(t);const e=[t];if(t.startsWith("/")&&e.push(t.slice(1)),t.includes("?")){const r=t.split("?")[0];r&&e.push(r)}return[...new Set(e)].filter(Boolean)}catch(e){return console.warn(`Failed to normalize path "${t}":`,e),[]}},"normalizeIdCandidates");var bi=Object.defineProperty,se=$((t,e)=>bi(t,"name",{value:e,configurable:!0}),"o$3");const ki=se((t,e)=>t.split(/\n/g)[e-1]??"","getLine"),Yt=se(t=>t.replaceAll(/\s+/g,""),"removeWhitespace"),yi=se((t,e)=>{if(e<=0||e>t.length)return"";const r=Math.max(0,e-1),n=t.slice(r,r+64),o=/[A-Z_$][\w$]{2,}/i.exec(n);if(o?.[0])return o[0];let s=n.trim();return s.length<4&&(s=t.slice(Math.max(0,r-16),r+16).trim()),s},"extractCandidateToken"),xi=se((t,e)=>{if(!t||t.length<3)return null;for(const[r,n]of e.entries()){if(!n)continue;const o=n.indexOf(t);if(o!==-1)return{column:o+1,line:r+1}}return null},"tryTokenBasedSearch"),$i=se((t,e)=>{if(!t)return null;for(const[r,n]of e.entries()){if(!n)continue;const o=n.indexOf(t);if(o!==-1)return{column:o+1,line:r+1}}return null},"tryLineSubstringSearch"),_i=se((t,e)=>{if(!t)return null;const r=Yt(t);if(!r)return null;for(const[n,o]of e.entries()){if(!o)continue;const s=Yt(o).indexOf(r);if(s!==-1){const i=Si(o,s);if(i!==-1)return{column:i,line:n+1}}}return null},"tryWhitespaceInsensitiveSearch"),Si=se((t,e)=>{let r=0;for(const[n,o]of[...t].entries())if(typeof o=="string"){if(r===e)return n+1;/\s/.test(o)||r++}return-1},"mapNormalizedToOriginalPosition"),Ei=se((t,e,r,n)=>{const o=ki(t,e);if(!o)return null;const s=n.split(/\n/g),i=yi(o,r);return xi(i,s)||$i(o.trim(),s)||_i(o.trim(),s)},"realignOriginalPosition");var Ci=Object.defineProperty,X=$((t,e)=>Ci(t,"name",{value:e,configurable:!0}),"u$3");const Li=/`((?:[^`$]|\$\{[^}]+\})*)`/g,Kt=/\$\{[^}]+\}/g,Mi=/[.*+?^${}()|[\]\\]/g,Fr=[/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*`/],de=X(t=>t.replaceAll(Mi,String.raw`\$&`),"escapeRegex"),zi=X(t=>{const e=de(t);return[t,`new Error("${e}")`,`new Error('${e}')`,`new Error(\`${de(t)}\`)`,`throw new Error("${e}")`,`throw new Error('${e}')`,`throw new Error(\`${de(t)}\`)`,`Error("${e}")`,`Error('${e}')`]},"createErrorPatterns"),er=X((t,e)=>{const r=[...t.matchAll(Li)];for(const n of r){const o=n[1];if(!o)continue;const s=o.split(Kt);if(s.every(a=>a===""||e.includes(a))&&s.length>1)return!0;if(!o)continue;const i=o.replaceAll(Kt,"(.+?)");try{if(new RegExp(`^${de(i)}$`).test(e))return!0}catch{}}return!1},"checkTemplateLiteralMatch"),Fi=[/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 (.+?)\)/],Pi=X(t=>{for(const e of Fi){const r=t.match(e);if(r)return r}return null},"findDynamicErrorMatch"),tr=X(t=>{let e=null,r=null;for(const n of Fr){const o=t.match(n);o&&(!e||n.source.includes("throw")&&!r?.source.includes("throw"))&&(e=o,r=n)}return{bestMatch:e,bestPattern:r}},"findBestErrorConstructor"),rr=X((t,e)=>{let r=t.index;if(e.source.includes("throw new")&&t[0].startsWith("throw new")){const n=t[0].indexOf("new");n!==-1&&(r+=n)}return r+1},"calculateActualColumn"),Ri=X((t,e,r=0)=>{if(!t||!e)return null;const n=t.split(`
|
|
876
|
+
`),o=Pi(e),s=zi(e),i=X((f,h,m)=>{let w=0;for(const[g,y]of f.entries()){if(!y)continue;const E=y.includes(h)||er(y,h),S=Fr.some(R=>R.test(y));if(E&&S){const{bestMatch:R,bestPattern:H}=tr(y);if(R&&H&&(w++,w>m))return{column:rr(R,H),line:g+1}}}return null},"processErrorConstructorLines")(n,e,r);if(i)return i;o&&X((f,h,m)=>{if(f[0].includes("Failed to resolve import")){const w=f[1];if(!w)return;const g=de(w);m.unshift(`import.*from ["']${g}["']`,`import.*["']${g}["']`,w)}else if(f[0].includes("is not defined")){const w=f[1];if(!w)return;m.unshift(w,`{${w}}`,`src={${w}}`,`${w}.`,`=${w}`)}else if(f[0].includes("Cannot read properties")){const w=f[1],g=f[2];if(!g)return;m.unshift(g,`${w}.${g}`,`${w}?.${g}`,`${w}[${g}]`)}else{const w=f[1];if(!w)return;const g=de(h),y=de(w);m.unshift(`new Error(\`${y}`,`throw new Error(\`${y}`,`new Error("${y}`,`new Error('${y}`,`throw new Error("${y}`,`throw new Error('${y}`,`new Error("${g}")`,`new Error('${g}')`,`throw new Error("${g}")`,`throw new Error('${g}')`,`new Error(\`${g}\`)`,`throw new Error(\`${g}\`)`)}},"addDynamicPatterns")(o,e,s);const a=X((f,h,m)=>{let w=0;for(const[g,y]of f.entries()){if(!y||!er(y,h))continue;const{bestMatch:E,bestPattern:S}=tr(y);if(E&&S&&(w++,w>m))return{column:rr(E,S),line:g+1}}return null},"processTemplateLiteralLines"),l=X((f,h,m,w)=>{let g=0;for(const[y,E]of f.entries()){if(!E)continue;let S=-1,R=null;for(const H of h){const V=E.indexOf(H);V!==-1&&(S===-1||V<S)&&(S=V,R=H)}if(S!==-1&&R&&(g++,g>w))return{column:c(S,R,E,m),line:y+1}}return null},"processPatternLines"),c=X((f,h,m,w)=>{if(!w)return f+1;if(w[0].includes("Failed to resolve import")){const g=w[1];if(m.includes(`"${g}"`)||m.includes(`'${g}'`)){const y=m.includes(`"${g}"`)?'"':"'";return m.indexOf(`${y}${g}${y}`)+1}}else if(w[0].includes("is not defined")){const g=w[1];if(g&&h===g)return f+1;if(g&&h.includes(g))return f+h.indexOf(g)+1}else if(w[0].includes("Cannot read properties")){const g=w[2];if(g&&h.includes(g))return f+h.indexOf(g)+1}else if(h.includes("new Error("))return m.indexOf("new Error(")+1;return f+1},"calculatePatternColumn");return a(n,e,r)||l(n,s,o,r)},"findErrorInSourceCode");var Ti=Object.defineProperty,Pe=$((t,e)=>Ti(t,"name",{value:e,configurable:!0}),"m$3");const Ai=1,or=Pe((t,e)=>{let r=t,n=e;return t>=20?r=Math.max(1,Math.round(t*.5)):t>15?r=Math.max(1,Math.round(t*.6)):t>10?r=Math.max(1,t-8):r=Math.max(1,t-3),e>=10||e>7?n=Math.max(0,e-1):e>5&&(n=Math.max(0,e)),{estimatedColumn:n,estimatedLine:r}},"estimateOriginalPosition"),ji=Pe((t,e,r)=>{try{const n=new Ho(t),o=[{column:r,desc:"original",line:e},{column:Math.max(0,r-Ai),desc:"offset",line:e},{column:r,desc:"line above",line:e-1},{column:r,desc:"line below",line:e+1},...Array.from({length:5},(s,i)=>({column:Math.max(0,r-2+i),desc:`col ${r-2+i}`,line:e}))];for(const s of o){const i=qo(n,{column:s.column,line:s.line});if(i.source&&i.line!==void 0&&i.column!==void 0&&i.line>0&&i.column>=0)return{column:i.column,line:i.line,source:i.source}}}catch(n){console.warn("Source map processing failed:",n)}return null},"resolveSourceMapPosition"),Bi=Pe((t,e)=>e?zr(t)?Di(t,e):e:t,"resolveSourcePath"),Di=Pe((t,e)=>{try{const r=new URL(t),n=(r.pathname||"").replace(/^\//,""),o=n.includes("/")?n.slice(0,Math.max(0,n.lastIndexOf("/"))):"";return`${r.origin}/${o?`${o}/`:""}${e}`}catch(r){return console.warn("URL parsing failed for source path resolution:",r),t}},"resolveHttpSourcePath"),pt=Pe(async(t,e,r,n,o,s,i=0)=>{if(s&&e)try{let l=null;if(e.transformResult?.map?.sourcesContent?.[0]?l=e.transformResult.map.sourcesContent[0]:e.transformResult?.code&&(l=e.transformResult.code),!l&&(e.id||e.url)){const c=e.id||e.url;if(c)try{const p=await t.transformRequest(c);p?.map&&"sourcesContent"in p.map&&p.map.sourcesContent?.[0]?l=p.map.sourcesContent[0]:p?.code&&(l=p.code)}catch(p){console.warn("Failed to get fresh source for error search:",p)}}if(!l&&r)try{const c=await import("node:fs/promises");let p=r;if(r.includes("://"))try{p=new URL(r).pathname}catch{const f=r.indexOf("://");f!==-1&&(p=r.slice(f+3))}p.startsWith("/")||(p=`${t.config.root||process.cwd()}/${p}`),l=await c.readFile(p,"utf8")}catch(c){console.warn("Failed to read source file from disk:",c)}if(l){const c=Ri(l,s,i);if(c)return{originalFileColumn:c.column,originalFileLine:c.line,originalFilePath:r}}}catch(l){console.warn("Source code search failed:",l)}let a=e?.transformResult?.map;if(!a&&(e?.id||e?.url)){const l=e.id||e.url;if(l)try{const c=await t.transformRequest(l);c?.map&&(a=c.map)}catch(c){console.warn("Failed to get fresh source map:",c)}}if(!a){const{estimatedColumn:l,estimatedLine:c}=or(n,o);return{originalFileColumn:l,originalFileLine:c,originalFilePath:r}}try{const l=ji(a,n,o);if(!l){const{estimatedColumn:p,estimatedLine:f}=or(n,o);return{originalFileColumn:p,originalFileLine:f,originalFilePath:r}}const c=Bi(r,l.source);return{originalFileColumn:l.column,originalFileLine:l.line,originalFilePath:c}}catch(l){return console.warn("Source map resolution failed:",l),{originalFileColumn:o,originalFileLine:n,originalFilePath:r}}},"resolveOriginalLocation");var Ii=Object.defineProperty,Et=$((t,e)=>Ii(t,"name",{value:e,configurable:!0}),"I"),Oi=Object.defineProperty,_=Et((t,e)=>Oi(t,"name",{value:e,configurable:!0}),"__name$2");let nr=_(()=>{var t=(()=>{var e=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,s=_((d,u)=>{for(var v in u)e(d,v,{get:u[v],enumerable:!0})},"J"),i=_((d,u,v,k)=>{if(u&&typeof u=="object"||typeof u=="function")for(let b of n(u))!o.call(d,b)&&b!==v&&e(d,b,{get:_(()=>u[b],"get"),enumerable:!(k=r(u,b))||k.enumerable});return d},"T"),a=_(d=>i(e({},"__esModule",{value:!0}),d),"W"),l={};s(l,{zeptomatch:_(()=>Lo,"zeptomatch")});var c=_(d=>Array.isArray(d),"k"),p=_(d=>typeof d=="function","x"),f=_(d=>d.length===0,"K"),h=(()=>{const{toString:d}=Function.prototype,u=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return v=>(v.length===0||v.length===1)&&u.test(d.call(v))})(),m=_(d=>typeof d=="number","Y"),w=_(d=>typeof d=="object"&&d!==null,"rr"),g=_(d=>d instanceof RegExp,"er"),y=(()=>{const d=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return u=>d.test(u.source)})(),E=(()=>{const d=/^[a-zA-Z0-9_-]+$/;return u=>d.test(u.source)&&!u.flags.includes("i")})(),S=_(d=>typeof d=="string","M"),R=_(d=>d===void 0,"f"),H=_(d=>{const u=new Map;return v=>{const k=u.get(v);if(k!==void 0)return k;const b=d(v);return u.set(v,b),b}},"ar"),V=_((d,u,v={})=>{const k={cache:{},input:d,index:0,indexBacktrackMax:0,options:v,output:[]},b=U(u)(k),L=Math.max(k.index,k.indexBacktrackMax);if(b&&k.index===d.length)return k.output;throw new Error(`Failed to parse at index ${L}`)},"or"),x=_((d,u)=>c(d)?B(d,u):S(d)?Ae(d,u):te(d,u),"o"),B=_((d,u)=>{const v={};for(const k of d){if(k.length!==1)throw new Error(`Invalid character: "${k}"`);const b=k.charCodeAt(0);v[b]=!0}return k=>{const b=k.input;let L=k.index,M=L;for(;M<b.length&&b.charCodeAt(M)in v;)M+=1;if(M>L){if(!R(u)&&!k.options.silent){const D=b.slice(L,M),W=p(u)?u(D,b,`${L}`):u;R(W)||k.output.push(W)}k.index=M}return!0}},"ir"),te=_((d,u)=>{if(E(d))return Ae(d.source,u);{const v=d.source,k=d.flags.replace(/y|$/,"y"),b=new RegExp(v,k);return y(d)&&p(u)&&!h(u)?Ye(b,u):ae(b,u)}},"ur"),Ye=_((d,u)=>v=>{const k=v.index,b=v.input;d.lastIndex=k;const L=d.exec(b);if(L){const M=d.lastIndex;if(!v.options.silent){const D=u(...L,b,`${k}`);R(D)||v.output.push(D)}return v.index=M,!0}else return!1},"sr"),ae=_((d,u)=>v=>{const k=v.index,b=v.input;if(d.lastIndex=k,d.test(b)){const L=d.lastIndex;if(!R(u)&&!v.options.silent){const M=p(u)?u(b.slice(k,L),b,`${k}`):u;R(M)||v.output.push(M)}return v.index=L,!0}else return!1},"cr"),Ae=_((d,u)=>v=>{const k=v.index,b=v.input;if(b.startsWith(d,k)){if(!R(u)&&!v.options.silent){const L=p(u)?u(d,b,`${k}`):u;R(L)||v.output.push(L)}return v.index+=d.length,!0}else return!1},"R"),T=_((d,u,v,k)=>{const b=U(d),L=u>1;return ge(me(ye(M=>{let D=0;for(;D<v;){const W=M.index;if(!b(M)||(D+=1,M.index===W))break}return D>=u},L),k))},"O"),A=_((d,u)=>T(d,0,1,u),"lr"),I=_((d,u)=>T(d,0,1/0,u),"m"),N=_((d,u)=>{const v=d.map(U);return ge(me(ye(k=>{for(let b=0,L=v.length;b<L;b++)if(!v[b](k))return!1;return!0}),u))},"_"),G=_((d,u)=>{const v=d.map(U);return ge(me(k=>{for(let b=0,L=v.length;b<L;b++)if(v[b](k))return!0;return!1},u))},"p"),ye=_((d,u=!0,v=!1)=>{const k=U(d);return u?b=>{const L=b.index,M=b.output.length,D=k(b);return!D&&!v&&(b.indexBacktrackMax=Math.max(b.indexBacktrackMax,b.index)),(!D||v)&&(b.index=L,b.output.length!==M&&(b.output.length=M)),D}:k},"P"),me=_((d,u)=>{const v=U(d);return u?k=>{if(k.options.silent)return v(k);const b=k.output.length;if(v(k)){const L=k.output.splice(b,1/0),M=u(L);return R(M)||k.output.push(M),!0}else return!1}:v},"C"),ge=(()=>{let d=0;return u=>{const v=U(u),k=d+=1;return b=>{var L;if(b.options.memoization===!1)return v(b);const M=b.index,D=(L=b.cache)[k]||(L[k]={indexMax:-1,queue:[]}),W=D.queue;if(M<=D.indexMax){const xe=D.store||(D.store=new Map);if(W.length){for(let fe=0,zo=W.length;fe<zo;fe+=2){const Fo=W[fe*2],Po=W[fe*2+1];xe.set(Fo,Po)}W.length=0}const ee=xe.get(M);if(ee===!1)return!1;if(m(ee))return b.index=ee,!0;if(ee)return b.index=ee.index,ee.output?.length&&b.output.push(...ee.output),!0}const Bt=b.output.length,Mo=v(b);if(D.indexMax=Math.max(D.indexMax,M),Mo){const xe=b.index,ee=b.output.length;if(ee>Bt){const fe=b.output.slice(Bt,ee);W.push(M,{index:xe,output:fe})}else W.push(M,xe);return!0}else return W.push(M,!1),!1}}})(),je=_(d=>{let u;return v=>(u||(u=U(d())),u(v))},"A"),U=H(d=>{if(p(d))return f(d)?je(d):d;if(S(d)||g(d))return x(d);if(c(d))return N(d);if(w(d))return G(Object.values(d));throw new Error("Invalid rule")}),P=_(d=>d,"v"),Q=_(d=>u=>V(u,d,{memoization:!1}).join(""),"z"),le=_(d=>{const u={};return v=>u[v]??(u[v]=d(v))},"pr"),re="abcdefghijklmnopqrstuvwxyz",Ke=_(d=>{let u="";for(;d>0;){const v=(d-1)%26;u=re[v]+u,d=Math.floor((d-1)/26)}return u},"vr"),Lt=_(d=>{let u=0;for(let v=0,k=d.length;v<k;v++)u=u*26+re.indexOf(d[v])+1;return u},"N"),et=_((d,u)=>{if(u<d)return et(u,d);const v=[];for(;d<=u;)v.push(d++);return v},"$"),Br=_((d,u,v)=>et(d,u).map(k=>String(k).padStart(v,"0")),"fr"),Mt=_((d,u)=>et(Lt(d),Lt(u)).map(Ke),"j"),tt=x(/\\./,P),Dr=x(/[$.*+?^(){}[\]\|]/,d=>`\\${d}`),Ir=x(/./,P),Or=x(/^(?:!!)*!(.*)$/,(d,u)=>`(?!^${jt(u)}$).*?`),Hr=x(/^(!!)+/,""),qr=G([Or,Hr]),Zr=x(/\/(\*\*\/)+/,"(?:[\\\\/].+[\\\\/]|[\\\\/])"),Vr=x(/^(\*\*\/)+/,"(?:^|.*[\\\\/])"),Nr=x(/\/(\*\*)$/,"(?:[\\\\/].*|$)"),Ur=x(/\*\*/,".*"),zt=G([Zr,Vr,Nr,Ur]),Wr=x(/\*\/(?!\*\*\/|\*$)/,"[^\\\\/]*[\\\\/]"),Gr=x(/\*/,"[^\\\\/]*"),Ft=G([Wr,Gr]),Pt=x("?","[^\\\\/]"),Qr=x("[",P),Xr=x("]",P),Jr=x(/[!^]/,"^\\\\/"),Yr=x(/[a-z]-[a-z]|[0-9]-[0-9]/i,P),Kr=x(/[$.*+?^(){}[\|]/,d=>`\\${d}`),eo=x(/[^\]]/,P),to=G([tt,Kr,Yr,eo]),Rt=N([Qr,A(Jr),I(to),Xr]),ro=x("{","(?:"),oo=x("}",")"),no=x(/(\d+)\.\.(\d+)/,(d,u,v)=>Br(+u,+v,Math.min(u.length,v.length)).join("|")),io=x(/([a-z]+)\.\.([a-z]+)/,(d,u,v)=>Mt(u,v).join("|")),so=x(/([A-Z]+)\.\.([A-Z]+)/,(d,u,v)=>Mt(u.toLowerCase(),v.toLowerCase()).join("|").toUpperCase()),ao=G([no,io,so]),Tt=N([ro,ao,oo]),lo=x("{","(?:"),co=x("}",")"),po=x(",","|"),uo=x(/[$.*+?^(){[\]\|]/,d=>`\\${d}`),ho=x(/[^}]/,P),mo=je(()=>At),go=G([zt,Ft,Pt,Rt,Tt,mo,tt,uo,po,ho]),At=N([lo,I(go),co]),fo=I(G([qr,zt,Ft,Pt,Rt,Tt,At,tt,Dr,Ir])),wo=fo,vo=Q(wo),jt=vo,bo=x(/\\./,P),ko=x(/./,P),yo=x(/\*\*\*+/,"*"),xo=x(/([^/{[(!])\*\*/,(d,u)=>`${u}*`),$o=x(/(^|.)\*\*(?=[^*/)\]}])/,(d,u)=>`${u}*`),_o=I(G([bo,yo,xo,$o,ko])),So=_o,Eo=Q(So),Co=Eo,Be=_((d,u)=>Array.isArray(d)?d.map(Be.compile).some(v=>v.test(u)):Be.compile(d).test(u),"S");Be.compile=le(d=>new RegExp(`^${jt(Co(d))}[\\\\/]?$`,"s"));var Lo=Be;return a(l)})();return t.default||t},"_lazyMatch"),rt;const Hi=_((t,e)=>(rt||(rt=nr(),nr=null),rt(t,e)),"default");var qi=Object.defineProperty,Zi=Et((t,e)=>qi(t,"name",{value:e,configurable:!0}),"__name$1");const Vi=/^[A-Z]:\//i,he=Zi((t="")=>t&&t.replaceAll("\\","/").replace(Vi,e=>e.toUpperCase()),"normalizeWindowsPath");var Ni=Object.defineProperty,Z=Et((t,e)=>Ni(t,"name",{value:e,configurable:!0}),"__name");const Ui=/^[/\\]{2}/,Wi=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,Pr=/^[A-Z]:$/i,ir=/^\/([A-Z]:)?$/i,Gi=/.(\.[^./]+)$/,Qi=/^[/\\]|^[a-z]:[/\\]/i,Xi=Z(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),Rr=Z((t,e)=>{let r="",n=0,o=-1,s=0,i=null;for(let a=0;a<=t.length;++a){if(a<t.length)i=t[a];else{if(i==="/")break;i="/"}if(i==="/"){if(!(o===a-1||s===1))if(s===2){if(r.length<2||n!==2||!r.endsWith(".")||r.at(-2)!=="."){if(r.length>2){const l=r.lastIndexOf("/");l===-1?(r="",n=0):(r=r.slice(0,l),n=r.length-1-r.lastIndexOf("/")),o=a,s=0;continue}else if(r.length>0){r="",n=0,o=a,s=0;continue}}e&&(r+=r.length>0?"/..":"..",n=2)}else r.length>0?r+=`/${t.slice(o+1,a)}`:r=t.slice(o+1,a),n=a-o-1;o=a,s=0}else i==="."&&s!==-1?++s:s=-1}return r},"normalizeString"),ze=Z(t=>Wi.test(t),"isAbsolute"),Ve=Z(function(t){if(t.length===0)return".";t=he(t);const e=Ui.exec(t),r=ze(t),n=t.at(-1)==="/";return t=Rr(t,!r),t.length===0?r?"/":n?"./":".":(n&&(t+="/"),Pr.test(t)&&(t+="/"),e?r?`//${t}`:`//./${t}`:r&&!ze(t)?`/${t}`:t)},"normalize");Z((...t)=>{let e="";for(const r of t)if(r)if(e.length>0){const n=e[e.length-1]==="/",o=r[0]==="/";n&&o?e+=r.slice(1):e+=n||o?r:`/${r}`}else e+=r;return Ve(e)},"join");const Ne=Z(function(...t){t=t.map(n=>he(n));let e="",r=!1;for(let n=t.length-1;n>=-1&&!r;n--){const o=n>=0?t[n]:Xi();!o||o.length===0||(e=`${o}/${e}`,r=ze(o))}return e=Rr(e,!r),r&&!ze(e)?`/${e}`:e.length>0?e:"."},"resolve");Z(function(t){return he(t)},"toNamespacedPath");const Ji=Z(function(t){return Gi.exec(he(t))?.[1]??""},"extname");Z(function(t,e){const r=Ne(t).replace(ir,"$1").split("/"),n=Ne(e).replace(ir,"$1").split("/");if(n[0][1]===":"&&r[0][1]===":"&&r[0]!==n[0])return n.join("/");const o=[...r];for(const s of o){if(n[0]!==s)break;r.shift(),n.shift()}return[...r.map(()=>".."),...n].join("/")},"relative");const Yi=Z(t=>{const e=he(t).replace(/\/$/,"").split("/").slice(0,-1);return e.length===1&&Pr.test(e[0])&&(e[0]+="/"),e.join("/")||(ze(t)?"/":".")},"dirname");Z(function(t){const e=[t.root,t.dir,t.base??t.name+t.ext].filter(Boolean);return he(t.root?Ne(...e):e.join("/"))},"format");const Ki=Z((t,e)=>{const r=he(t).split("/").pop();return e&&r.endsWith(e)?r.slice(0,-e.length):r},"basename");Z(function(t){const e=Qi.exec(t)?.[0]?.replace(/\\/g,"/")??"",r=Ki(t),n=Ji(r);return{base:r,dir:Yi(t),ext:n,name:r.slice(0,r.length-n.length),root:e}},"parse");Z((t,e)=>Hi(e,Ve(t)),"matchesGlob");var es=Object.defineProperty,K=$((t,e)=>es(t,"name",{value:e,configurable:!0}),"e$1");const ut="/",sr=":",ts="at ",rs=/https?:\/\/[^\s)]+/g,os=/file:\/\//g,Tr=/\/@fs\//g,ns=new Set([".cjs",".js",".jsx",".mjs",".svelte",".ts",".tsx",".vue"]),is=new Set(["<anonymous>","<unknown>","native"]),ss=K(t=>{const e=t.trim();return!e.startsWith(ts)||!([...ns].some(r=>e.includes(r))||[...is].some(r=>e.includes(r)))?!1:/\([^)]*:\d+:\d+\)/.test(e)||/\([^)]*:\d+\)/.test(e)||/[^(\s][^:]*:\d+:\d+/.test(e)||/[^(\s][^:]*:\d+/.test(e)||e.includes("native")||e.includes("<unknown>")},"isValidStackFrame"),as=K(t=>(t=t.replaceAll(Tr,ut),t=t.replaceAll(os,""),t.includes("<unknown>")?t.trim()||"":t.trim()&&!ss(t)?"":t),"cleanStackLine"),ls=K((t,e)=>{try{const{baseUrl:r,col:n,line:o}=cs(t),s=ds(r,e);return ps(s,o,n)}catch(r){return console.warn("Failed to absolutize URL:",t,r),t}},"absolutizeUrl"),cs=K(t=>{const e=t.match(/:(\d+)(?::(\d+))?$/),r=e?.[1],n=e?.[2];return{baseUrl:e?t.slice(0,-e[0].length):t,col:n,line:r}},"parseUrlWithLocation"),ds=K((t,e)=>{const r=new URL(t);let n=decodeURIComponent(r.pathname||"");return n=n.replaceAll(Tr,ut),Ne(e,n.startsWith(ut)?n.slice(1):n)},"urlToAbsolutePath"),ps=K((t,e,r)=>{if(!e)return t;const n=r?`${sr}${r}`:"";return`${t}${sr}${e}${n}`},"formatAbsolutePath"),Je=K(t=>t&&t.replaceAll(`\r
|
|
865
877
|
`,`
|
|
866
878
|
`).replaceAll("\r",`
|
|
867
|
-
`).split(/\n/).map(
|
|
868
|
-
`),"cleanErrorStack"),
|
|
869
|
-
`)[0]||t;return e&&r>0&&n>0?{column:n,line:r,message:l,originalFilePath:e}:null},"parseVueCompilationError");var
|
|
879
|
+
`).split(/\n/).map(as).filter(e=>e.trim()!=="").join(`
|
|
880
|
+
`),"cleanErrorStack"),us=K(t=>{const e=typeof t=="string"?t:t.message||String(t);return Zo(e)},"cleanErrorMessage"),hs=K(t=>t instanceof AggregateError||t&&typeof t=="object"&&"errors"in t&&Array.isArray(t.errors),"isAggregateError"),ms=K(t=>hs(t)?t.errors:[t],"extractErrors"),Re=K((t,e)=>t&&String(t).replaceAll(rs,r=>ls(r,e)),"absolutizeStackUrls");var gs=Object.defineProperty,fs=$((t,e)=>gs(t,"name",{value:e,configurable:!0}),"o$2");const ws=fs(t=>{if(!t.includes("[vue/compiler-sfc]"))return null;let e="",r=0,n=0;const o=/\((\d+):(\d+)\)/,s=t.match(o);s&&s[1]&&s[2]&&(r=Number.parseInt(s[1],10),n=Number.parseInt(s[2],10));const i=/(\S+\.vue)/,a=t.match(i);a&&a[1]&&(e=a[1]);const l=t.split(`
|
|
881
|
+
`)[0]||t;return e&&r>0&&n>0?{column:n,line:r,message:l,originalFilePath:e}:null},"parseVueCompilationError");var vs=Object.defineProperty,bs=$((t,e)=>vs(t,"name",{value:e,configurable:!0}),"m$1");const ks=bs(async(t,e,r)=>{let n=e;if(e.includes("at ")&&!e.includes(`
|
|
870
882
|
at `)&&(n=e.replace(/^(Error:.*?)at /,`$1
|
|
871
883
|
at `).replaceAll(/at ([^<\s]+)\s*(<[^>]+>:\d+:\d+)/g,`
|
|
872
884
|
at $1 $2`).replaceAll(/at ([^<\s]+)\s*(<unknown>:\d+:\d+)/g,`
|
|
873
885
|
at $1 $2`).replaceAll(/at ([^<\s]+)\s*<([^>]+)>:\d+:\d+/g,`
|
|
874
886
|
at $1 <$2>:d+:d+`),n=n.replaceAll(/at ([^<\s]+)(?=\s*at|$)/g,`
|
|
875
|
-
at $1 <unknown>:0:0`)),!n.includes("<unknown>")&&!n.includes("react-dom")&&!n.includes("react"))return n;const o=ve({stack:n}),s=await Promise.all(o.map(async i=>{const{file:a}=i,l=i.line??0,c=i.column??0;if(a&&a!=="<unknown>"&&l>0&&c>0&&!a.includes("react-dom")&&!a.includes("react"))return i;if(!a||l<=0||c<=0){if((a==="<unknown>"||a&&(a.includes("react-dom")||a.includes("react")))&&i.methodName){const{methodName:p}=i,f={batchedUpdates:"Batch Updates",dispatchEvent:"Event System",executeDispatch:"Event Dispatcher",processDispatchQueue:"Event Queue",runWithFiber:"Fiber Reconciliation"};for(const[h,m]of Object.entries(f))if(p.includes(h))return{...i,column:0,file:`[React] ${m}`,line:0};if(!p.includes("$")&&!p.includes("anonymous")){const h=ce(p),m=Me(t,h);if(m){const w=await pt(t,m,"",1,1);if(w.originalFilePath)return{...i,column:w.originalFileColumn||1,file:w.originalFilePath,line:w.originalFileLine||1}}}}return i}try{const p=ce(a),f=Me(t,p);if(!f)return i;const h=await pt(t,f,a,l,c);return{...i,column:h.originalFileColumn,file:h.originalFilePath,line:h.originalFileLine}}catch{return i}}));return pr(s,{header:r})},"remapStackToOriginal");var
|
|
876
|
-
`)[w-1];if(
|
|
877
|
-
`),Q=
|
|
878
|
-
`),A=Math.max(0,E-3),
|
|
879
|
-
`)}ae||(ae=V||`Error at line ${E} in ${S}`);const Ae=
|
|
880
|
-
`),n=r.findIndex(s=>s.includes(e));if(n===-1)return;const o=r[n]||"";return{column:Math.max(0,o.indexOf(e))+1,line:n+1}},"findImportLocation"),
|
|
881
|
-
|
|
882
|
-
`)
|
|
883
|
-
${String(t?.stack||"")}`,"createErrorSignature"),na=I(async(t,e,r)=>{try{t.stack=Re(Je(String(t.stack||"")),e)}catch{}await _r(t,{logger:r})},"processRuntimeError"),ia=I((t,e,r)=>async n=>{const o=n instanceof Error?n:new Error(String(n?.stack||n));try{t.ssrFixStacktrace(o)}catch(s){Ne(t,"[visulima:vite-overlay:server] ssrFixStacktrace failed",s)}try{const s=await Is(o,t);Object.assign(o,s)}catch(s){Ne(t,"[visulima:vite-overlay:server] enhanceViteSsrError failed",s)}try{o.stack=Re(Je(String(o.stack||"")),e)}catch{}await _r(o,{logger:r}),t.ws.send({err:o,type:"error"})},"createUnhandledRejectionHandler"),sa=I(async(t,e,r)=>{let n;e.push(dr,ea(r),cr);for await(const o of e.toSorted((s,i)=>i.priority-s.priority)){const{handle:s,name:i}=o;if(process.env.DEBUG&&console.debug(`Running solution finder: ${i}`),typeof s=="function")try{const a=await s({hint:t?.hint??"",message:t.message,name:t.name,stack:t?.stack},{file:t?.originalFilePath??"",language:Le(t?.originalFilePath??""),line:t?.originalFileLine??0,snippet:t?.originalSnippet??""});if(a===void 0)continue;const l=await Ht(a.header??"");n={body:await Ht(a.body??""),header:l};break}catch{continue}}return n},"findSolution"),ht=I(async(t,e,r,n,o,s)=>{const i=Ao(t);if(i.length===0)throw new Error("No errors found in the error stack");const a=await Promise.all(i.map(async(c,p)=>{let f=n;if(p>0){const w=(c?.stack?.split(`
|
|
884
|
-
`)||[]).find(g=>g.includes("at ")&&!g.includes("node_modules"));if(w){const g=w.match(/at\s+[^(\s]+\s*\(([^:)]+):(\d+):(\d+)\)/)||w.match(/at\s+([^:)]+):(\d+):(\d+)/);if(g){const[,y,E,S]=g;f={column:Number.parseInt(S||"0",10),file:y,line:Number.parseInt(E||"0",10),plugin:n?.plugin}}}}let h=f;p===0&&c?.sourceFile&&(h={...f,file:c.sourceFile});const m=await Cs(c,e,h,i,p);return{hint:c?.hint,message:c?.message||"",name:c?.name||Er,stack:Re(Je(c?.stack||""),r),...m}})),l=await sa(a[0],s,r);return{errors:a,errorType:o,rootPath:r,solution:l}},"buildExtendedError"),aa=I((t,e)=>{const r=String.raw`var orig = console.error;
|
|
887
|
+
at $1 <unknown>:0:0`)),!n.includes("<unknown>")&&!n.includes("react-dom")&&!n.includes("react"))return n;const o=ve({stack:n}),s=await Promise.all(o.map(async i=>{const{file:a}=i,l=i.line??0,c=i.column??0;if(a&&a!=="<unknown>"&&l>0&&c>0&&!a.includes("react-dom")&&!a.includes("react"))return i;if(!a||l<=0||c<=0){if((a==="<unknown>"||a&&(a.includes("react-dom")||a.includes("react")))&&i.methodName){const{methodName:p}=i,f={batchedUpdates:"Batch Updates",dispatchEvent:"Event System",executeDispatch:"Event Dispatcher",processDispatchQueue:"Event Queue",runWithFiber:"Fiber Reconciliation"};for(const[h,m]of Object.entries(f))if(p.includes(h))return{...i,column:0,file:`[React] ${m}`,line:0};if(!p.includes("$")&&!p.includes("anonymous")){const h=ce(p),m=Me(t,h);if(m){const w=await pt(t,m,"",1,1);if(w.originalFilePath)return{...i,column:w.originalFileColumn||1,file:w.originalFilePath,line:w.originalFileLine||1}}}}return i}try{const p=ce(a),f=Me(t,p);if(!f)return i;const h=await pt(t,f,a,l,c);return{...i,column:h.originalFileColumn,file:h.originalFilePath,line:h.originalFileLine}}catch{return i}}));return pr(s,{header:r})},"remapStackToOriginal");var ys=Object.defineProperty,Te=$((t,e)=>ys(t,"name",{value:e,configurable:!0}),"t");const xs=Te(t=>!!(t&&Array.isArray(t.sources)&&Array.isArray(t.sourcesContent)),"isValidSourceMap"),ot=Te(t=>typeof t=="string"?t:void 0,"getSourceContent"),$s=Te((t,e)=>t===e||t.endsWith(e)||e.endsWith(t),"isPartialMatch"),_s=Te((t,e)=>{if(!t||t.length===0)return-1;const r=t.indexOf(e);if(r!==-1)return r;if(!(e.includes("\\")||e.includes("/")))return-1;const n=Ve(e),o=t.indexOf(n);if(o!==-1)return o;for(const[s,i]of t.entries()){if(!i||typeof i!="string")continue;const a=Ve(i);if($s(a,n))return s}return-1},"findSourceIndex"),ar=Te((t,e)=>{if(!xs(t))return;if(!e&&t.sourcesContent?.[0])return ot(t.sourcesContent[0]);const r=_s(t.sources,e||"");return r>=0&&t.sourcesContent?.[r]?ot(t.sourcesContent[r]):t.sourcesContent?.[0]?ot(t.sourcesContent[0]):void 0},"getSourceFromMap");var Ss=Object.defineProperty,Es=$((t,e)=>Ss(t,"name",{value:e,configurable:!0}),"f");const lr=Es(async(t,e,r,n)=>{let o,s;if(e&&typeof e=="object"&&"transformResult"in e&&e.transformResult){const a=e.transformResult;a.code&&!s&&(s=a.code),a.map&&!o&&(o=ar(a.map,r))}const i=e&&typeof e=="object"&&("id"in e&&e.id||"url"in e&&e.url)?"id"in e&&e.id||"url"in e&&e.url:n[0];if(i&&(!o||!s))try{const a=await t.transformRequest(i);if(a?.code&&!s&&(s=a.code),a?.map&&!o){const{map:l}=a;typeof l=="object"&&l!==null&&"mappings"in l&&l.mappings!==""&&(o=ar(l,r))}}catch{}if(!o&&e&&typeof e=="object"&&"file"in e&&e.file)try{o=await mt(e.file,"utf8")}catch{}return{compiledSourceText:s,originalSourceText:o}},"retrieveSourceTexts");var Cs=Object.defineProperty,Ls=$((t,e)=>Cs(t,"name",{value:e,configurable:!0}),"r");const Ms=Ls((t,e)=>!e||t.includes("?")?t:t+e,"addQueryToUrl");var zs=Object.defineProperty,Fs=$((t,e)=>zs(t,"name",{value:e,configurable:!0}),"e");const Ps=Fs(t=>{try{return new URL(t).search}catch{return""}},"extractQueryFromHttpUrl");var Rs=Object.defineProperty,ke=$((t,e)=>Rs(t,"name",{value:e,configurable:!0}),"k");const Ts=ke(t=>Array.isArray(t)&&ui(t)?hi(t).map(e=>({message:e.message||"ESBuild error",name:e.name||"Error",stack:e.stack||""})):ms(t),"extractIndividualErrors"),As=ke(t=>{const e=ve(t,{frameLimit:10}),r=e?.find(n=>n?.file?.startsWith("http"))||e?.[0];return{compiledColumn:r?.column??0,compiledFilePath:r?.file??"",compiledLine:r?.line??0}},"extractLocationFromStack"),js=ke(async(t,e,r,n,o,s,i=0,a)=>{const l=o?.originalFilePath||e,c=o?.line??n,p=o?.column??r;if(l){let f=l,h=l;if(l.startsWith("http://")||l.startsWith("https://"))try{f=new URL(l).pathname,f.startsWith("/")&&(f=f.slice(1));const E=t.config.root||process.cwd();h=f.startsWith("/")?f:`${E}/${f}`}catch{console.warn("Failed to parse HTTP URL:",l)}const m=ce(f),w=Me(t,m);if(w)try{const E=await pt(t,w,e||a||f,c,p,s,i),S=h||E.originalFilePath;return{originalFileColumn:E.originalFileColumn,originalFileLine:E.originalFileLine,originalFilePath:S}}catch{console.warn("⚠️ Source map resolution failed, using estimation")}let g=c,y=p;return c>=20?g=Math.max(1,Math.round(c*.5)):c>15?g=Math.max(1,Math.round(c*.6)):c>10?g=Math.max(1,c-8):g=Math.max(1,c-3),p>=10||p>7?y=Math.max(0,p-1):p>5&&(y=Math.max(0,p)),{originalFileColumn:y,originalFileLine:g,originalFilePath:h||l}}return{originalFileColumn:p,originalFileLine:c,originalFilePath:l}},"resolveOriginalLocationInfo"),Bs=ke((t,e,r,n,o,s)=>({compiledCodeFrameContent:void 0,compiledColumn:t,compiledFilePath:e,compiledLine:r,fixPrompt:"",originalCodeFrameContent:void 0,originalFileColumn:n,originalFileLine:o,originalFilePath:s,originalSnippet:""}),"createEmptyResult"),Ds=ke(async(t,e,r,n,o,s)=>{let i,a;const l=Le(r)||"text",c=Le(n)||l,p=[],f=new Set([c,l]);f.has("svelte")&&p.push(import("@shikijs/langs/svelte")),f.has("vue")&&p.push(import("@shikijs/langs/vue"));const h=await di(p),m={themes:{dark:"github-dark-default",light:"github-light"}};if(t&&t.trim())try{i=h.codeToHtml(t,{...m,lang:l,transformers:[Jt([{classes:["error-line"],line:o}])]})}catch{}if(e&&e.trim())try{a=h.codeToHtml(e,{...m,lang:c,transformers:[Jt([{classes:["error-line"],line:s}])]})}catch{}return{compiledCodeFrameContent:a,originalCodeFrameContent:i}},"generateSyntaxHighlightedFrames"),Is=ke(async(t,e,r,n,o=0)=>{const s=t?.message?ws(t.message):void 0,i=Ts(t),a=i[0]||t;let l="";if(n&&n.length>1)for(const T of n.slice(1)){const A=T.stack||"",I=ve({stack:A},{frameLimit:10})?.find(N=>N?.file?.startsWith("http"));if(I?.file&&(l=Ps(I.file),l))break}const c=us(a),p=Je(a.stack||""),f=await ks(e,p,{message:c,name:a.name});let h,m,w;if(r?.file&&r?.line&&r?.column)h=r.column,m=r.file,w=r.line;else{const T=As(a);if(h=T.compiledColumn,m=T.compiledFilePath,w=T.compiledLine,m&&!m.startsWith("http")){const A=e.config.root;let I=m;m.startsWith(A)&&(I=m.slice(A.length)),I.startsWith("/")||(I=`/${I}`);let N=`http://localhost:5173${I}`;l&&(N=Ms(N,l)),m=N}}let g=r?.file||m;if(!r?.file&&a.stack){const T=ve(a,{frameLimit:10})?.find(A=>A?.file&&!A.file.startsWith("http")&&!A.file.includes("node_modules")&&!A.file.includes(".vite")&&A.file.includes(".tsx"));T?.file&&(g=T.file)}let{originalFileColumn:y,originalFileLine:E,originalFilePath:S}=await js(e,g,h,w,s,a.message,o,m);const R=r?.plugin;let H="",V="",x,B;try{const[T,A]=await Promise.all([Me(e,ce(m)),Me(e,ce(S))]);if(!T&&!A)return Bs(h,m,w,y,E,S);const I=m.startsWith("http")?m.replace(/^https?:\/\/[^/]+/,"").replace(/^\//,""):m,N=S.startsWith("http")?S.replace(/^https?:\/\/[^/]+/,"").replace(/^\//,""):S,G=T||A;if(G?.transformResult?.code&&(B=G.transformResult.code),A?.transformResult?.map&&!x){const P=A.transformResult.map;try{const Q=P.sourcesContent?.[0];Q&&(x=Q)}catch(Q){console.warn("Failed to get original source from source map:",Q)}}const[ye,me]=await Promise.all([!B&&T?lr(e,T,I,ce(I)):Promise.resolve({compiledSourceText:void 0,originalSourceText:void 0}),!x&&A?lr(e,A,N,ce(N)):Promise.resolve({compiledSourceText:void 0,originalSourceText:void 0})]);if(!B&&ye.compiledSourceText&&({compiledSourceText:B}=ye),!x&&me.originalSourceText&&({originalSourceText:x}=me),x){if(B&&E<=0&&w>0){const P=Ei(B,w,h,x);P&&(E=P.line,y=P.column)}try{H=Dt(x,{start:{column:Math.max(1,y),line:Math.max(1,E)}},{showGutter:!1})}catch{H=x?.slice(0,500)||""}}const ge=B&&w>0,je=E>0&&y>0;let U=!1;if(ge&&w>0&&a.message&&B){const P=B.split(`
|
|
888
|
+
`)[w-1];if(P&&h<=P.length){const Q=a.message,le=Math.max(0,h-1),re=new Set(P.slice(Math.max(0,le)));U=re.has("new Error(")||re.has("throw new Error")||re.has("throw ")||re.has(Q.slice(0,20)),!U&&je&&(S.includes(".svelte")||S.includes(".vue")||S.includes(".astro")||m.includes(".js")||m.includes(".ts"))&&(U=!0)}}if(ge&&U&&B){const P=B.split(`
|
|
889
|
+
`),Q=P.length,le=Math.min(w,Q)||Math.max(1,Q-2),re=P[le-1]?Math.min(h||1,P[le-1]?.length||1):1;try{V=Dt(B,{start:{column:re,line:le}},{showGutter:!1})}catch(Ke){console.warn("Compiled codeFrame failed:",Ke),V=B?.slice(0,500)||""}}}catch(T){console.warn("Source retrieval failed:",T)}const{compiledCodeFrameContent:te,originalCodeFrameContent:Ye}=await Ds(H,V,S,m,E,w);let ae=H;if(!ae&&x){const T=x.split(`
|
|
890
|
+
`),A=Math.max(0,E-3),I=Math.min(T.length,E+2);ae=T.slice(A,I).join(`
|
|
891
|
+
`)}ae||(ae=V||`Error at line ${E} in ${S}`);const Ae=Oo({applicationType:void 0,error:t,file:{file:S,language:Le(S),line:E,snippet:ae}});return{compiledCodeFrameContent:te,compiledColumn:h,compiledFilePath:m,compiledLine:w,compiledStack:pr(ve({message:c,name:a.name,stack:p}),{header:{message:c,name:a.name}}),errorCount:i.length,fixPrompt:Ae,originalCodeFrameContent:Ye,originalFileColumn:y,originalFileLine:E,originalFilePath:S,originalSnippet:H,originalStack:f||p,plugin:R}},"buildExtendedErrorData");var Os=Object.defineProperty,oe=$((t,e)=>Os(t,"name",{value:e,configurable:!0}),"o");const Hs=/\.mdx$/i,qs=1,Zs=/Failed to load url\s+(.*?)\s+\(resolved id:/i,Vs=/glob:\s*"(.+)"\s*\(/i,Ns=oe(t=>t instanceof Error?t:new Error(String(t)),"createEnhancedError"),Us=oe((t,e)=>{try{t.ssrFixStacktrace(e)}catch(r){console.warn("[visulima:vite-overlay:server] SSR stack trace fix failed:",r)}},"safeSsrFixStacktrace"),Ws=oe(t=>{try{const e=ve(t,{frameLimit:qs})?.[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"),Gs=oe(async t=>{try{return await mt(t,"utf8")}catch(e){console.warn(`[visulima:vite-overlay:server] Failed to read file ${t}:`,e);return}},"safeReadFile"),Qs=oe((t,e)=>{const r=t.id||t.loc?.file||e;r&&Hs.test(String(r))&&/syntax error/i.test(t.message)&&(t.hint=t.hint||"MDX detected without an appropriate integration. Install and configure the MDX plugin for Vite/your framework.")},"enhanceMdxError"),Ar=oe((t,e)=>{const r=t.split(`
|
|
892
|
+
`),n=r.findIndex(s=>s.includes(e));if(n===-1)return;const o=r[n]||"";return{column:Math.max(0,o.indexOf(e))+1,line:n+1}},"findImportLocation"),Xs=oe(async(t,e,r)=>{const n=Zs.exec(t.message)?.[1];if(n&&(t.title="Failed to Load Module (SSR)",t.name="FailedToLoadModuleSSR",t.message=`Failed to load module: ${n}`,t.hint="Verify import path, ensure a plugin handles this file type during SSR, and check for typos or missing files.",r&&e)){const o=Ar(r,n);o&&(t.loc={...o,file:e})}},"enhanceFailedLoadError"),Js=oe(async(t,e,r)=>{const n=Vs.exec(t.message)?.[1];if(n&&(t.name="InvalidGlob",t.title="Invalid Glob Pattern",t.message=`Invalid glob pattern: ${n}`,t.hint=t.hint||"Ensure your glob follows the expected syntax and matches existing files. Avoid unintended special characters.",r&&e)){const o=Ar(r,n);o&&(t.loc={...o,file:e})}},"enhanceGlobError"),Ys=oe(async(t,e)=>{const r=Ns(t);Us(e,r);const n=Ws(r),o=n?await Gs(n):void 0;return await Xs(r,n,o),Qs(r,n),await Js(r,n,o),r},"enhanceViteSsrError");var Ks=Object.defineProperty,O=$((t,e)=>Ks(t,"name",{value:e,configurable:!0}),"u");const Ue=O((t,e,r)=>{try{const n=r instanceof Error?r.message:String(r);t.config.logger.error(`${e}: ${n}`,{clear:!0,timestamp:!0})}catch{}},"logError"),ea=O(t=>({error:O(e=>t.config.logger.error(String(e??""),{clear:!0,timestamp:!0}),"error"),log:O(e=>t.config.logger.info(String(e??"")),"log")}),"createDevelopmentLogger"),ta=O(()=>{const t=new Map;return{recentErrors:t,shouldSkip:O(e=>{const r=Date.now(),n=t.get(e)||0;return r-n<Bn?!0:(t.set(e,r),!1)},"shouldSkip")}},"createRecentErrorTracker"),jr=O(t=>`${String(t?.message||"")}
|
|
893
|
+
${String(t?.stack||"")}`,"createErrorSignature"),ra=O(async(t,e,r)=>{try{t.stack=Re(Je(String(t.stack||"")),e)}catch{}await _r(t,{logger:r})},"processRuntimeError"),oa=O((t,e,r)=>async n=>{const o=n instanceof Error?n:new Error(String(n?.stack||n));try{t.ssrFixStacktrace(o)}catch(s){Ue(t,"[visulima:vite-overlay:server] ssrFixStacktrace failed",s)}try{const s=await Ys(o,t);Object.assign(o,s)}catch(s){Ue(t,"[visulima:vite-overlay:server] enhanceViteSsrError failed",s)}try{o.stack=Re(Je(String(o.stack||"")),e)}catch{}await _r(o,{logger:r}),t.ws.send({err:o,type:"error"})},"createUnhandledRejectionHandler"),na=O(async(t,e,r)=>{let n;e.push(dr,ai(r),cr);for await(const o of e.toSorted((s,i)=>i.priority-s.priority)){const{handle:s,name:i}=o;if(process.env.DEBUG&&console.debug(`Running solution finder: ${i}`),typeof s=="function")try{const a=await s({hint:t?.hint??"",message:t.message,name:t.name,stack:t?.stack},{file:t?.originalFilePath??"",language:Le(t?.originalFilePath??""),line:t?.originalFileLine??0,snippet:t?.originalSnippet??""});if(a===void 0)continue;const l=await Ht(a.header??"");n={body:await Ht(a.body??""),header:l};break}catch{continue}}return n},"findSolution"),ht=O(async(t,e,r,n,o,s)=>{const i=Ao(t);if(i.length===0)throw new Error("No errors found in the error stack");const a=await Promise.all(i.map(async(c,p)=>{let f=n;if(p>0){const w=(c?.stack?.split(`
|
|
894
|
+
`)||[]).find(g=>g.includes("at ")&&!g.includes("node_modules"));if(w){const g=w.match(/at\s+[^(\s]+\s*\(([^:)]+):(\d+):(\d+)\)/)||w.match(/at\s+([^:)]+):(\d+):(\d+)/);if(g){const[,y,E,S]=g;f={column:Number.parseInt(S||"0",10),file:y,line:Number.parseInt(E||"0",10),plugin:n?.plugin}}}}let h=f;p===0&&c?.sourceFile&&(h={...f,file:c.sourceFile});const m=await Is(c,e,h,i,p);return{hint:c?.hint,message:c?.message||"",name:c?.name||Er,stack:Re(Je(c?.stack||""),r),...m}})),l=await na(a[0],s,r);return{errors:a,errorType:o,rootPath:r,solution:l}},"buildExtendedError"),ia=O((t,e)=>{const r=String.raw`var orig = console.error;
|
|
885
895
|
|
|
886
896
|
console.error = function() {
|
|
887
897
|
function parseConsoleArgs(args) {
|
|
@@ -998,6 +1008,32 @@ async function sendError(error, loc) {
|
|
|
998
1008
|
});
|
|
999
1009
|
}
|
|
1000
1010
|
|
|
1011
|
+
|
|
1012
|
+
|
|
1013
|
+
let stackTraceRegistered = false;
|
|
1014
|
+
|
|
1015
|
+
const MAX_STACK_LENGTH = 50;
|
|
1016
|
+
|
|
1017
|
+
/**
|
|
1018
|
+
* Registers the stack trace limit for better error capturing.
|
|
1019
|
+
* @param {number} limit - The stack trace limit to register.
|
|
1020
|
+
*/
|
|
1021
|
+
// eslint-disable-next-line func-style
|
|
1022
|
+
function registerStackTraceLimit(limit = MAX_STACK_LENGTH) {
|
|
1023
|
+
if (stackTraceRegistered) {
|
|
1024
|
+
return;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
try {
|
|
1028
|
+
Error.stackTraceLimit = limit;
|
|
1029
|
+
stackTraceRegistered = true;
|
|
1030
|
+
} catch {
|
|
1031
|
+
// Not all browsers support this so we don't care if it errors
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
registerStackTraceLimit();
|
|
1036
|
+
|
|
1001
1037
|
window.addEventListener("error", function (evt) {
|
|
1002
1038
|
sendError(evt.error, { filename: evt.filename, lineno: evt.lineno, colno: evt.colno });
|
|
1003
1039
|
});
|
|
@@ -1009,6 +1045,6 @@ window.addEventListener("unhandledrejection", function (evt) {
|
|
|
1009
1045
|
window.__flameSendError = sendError;
|
|
1010
1046
|
|
|
1011
1047
|
${e?r:""}
|
|
1012
|
-
`},"generateClientScript"),Ct=
|
|
1013
|
-
${Re(h,n)}`,l.cause&&(m.cause=Ct(l.cause));const w=l.sourceFile?{column:l.column,file:l.sourceFile,line:l.line,plugin:l.plugin}:void 0,g=await ht(m,t,n,w,"server",o);i.err=g,r.set(JSON.stringify(g),Date.now())}}s(i,a)}catch(l){
|
|
1014
|
-
${Re(m,o)}`,c.cause&&(w.cause=Ct(c.cause));try{await
|
|
1048
|
+
`},"generateClientScript"),Ct=O(t=>{if(!t)return null;const e=new Error(String(t.message||"Caused by error"));return e.name=String(t.name||"Error"),e.stack=String(t.stack||""),t.cause&&(e.cause=Ct(t.cause)),e},"reconstructCauseChain"),sa=O((t,e,r,n,o)=>{const s=t.ws.send.bind(t.ws);t.ws.send=async(i,a)=>{try{if(i&&typeof i=="object"&&i.type==="error"&&i.err){const{err:l}=i,c=jr(l);if(e(c))return;if(l.message?.includes("Failed to resolve import")){const p=l.message.match(/Failed to resolve import ["']([^"']+)["'] from ["']([^"']+)["']/);if(p){const f=p[2],h=new Error(l.message);h.name="ImportResolutionError",h.stack=l.stack;const m=await ht(h,t,n,{column:l.loc?.column||1,file:f,line:l.loc?.line||1,plugin:l.plugin||"vite:import-analysis"},"server",o);i.err=m,r.set(JSON.stringify(m),Date.now())}}else{const p=String(l?.name||"Error"),f=String(l.message),h=String(l.stack),m=new Error(f);m.name=p,m.stack=`${p}: ${f}
|
|
1049
|
+
${Re(h,n)}`,l.cause&&(m.cause=Ct(l.cause));const w=l.sourceFile?{column:l.column,file:l.sourceFile,line:l.line,plugin:l.plugin}:void 0,g=await ht(m,t,n,w,"server",o);i.err=g,r.set(JSON.stringify(g),Date.now())}}s(i,a)}catch(l){Ue(t,"[visulima:vite-overlay:server] ws.send intercept failed",l),a.send(i,a)}}},"setupWebSocketInterception"),aa=O((t,e,r,n,o,s,i)=>{t.ws.on(Sr,async(a,l)=>{if(!i)return;const c=a&&typeof a=="object"?a:{message:In,stack:""},p=jr(c);if(r(p))return;const f=String(c?.name||"Error"),h=String(c.message),m=String(c.stack),w=new Error(h);w.name=f,w.stack=`${f}: ${h}
|
|
1050
|
+
${Re(m,o)}`,c.cause&&(w.cause=Ct(c.cause));try{await ra(w,o,e);const g=await ht(w,t,o,{column:c?.column,file:c?.file,line:c?.line,plugin:c?.plugin},"client",s);n.set(JSON.stringify(g),Date.now());const y={err:g,type:"error"};g.solution&&(y.solutions=g.solution),l.send(y)}catch(g){Ue(t,"[visulima:vite-overlay:server] failed to build extended client error",g),l.send({err:{message:g.message,name:String(g.name||Er),stack:g.stack},type:"error"})}})},"setupHMRHandler"),la=O((t,e)=>t.flat().some(r=>r&&(e&&r.name===e||r.name==="vite:react"||r.name==="@vitejs/plugin-react"||typeof r=="function"&&r.name?.includes("react")||r.constructor&&r.constructor.name?.includes("React"))),"hasReactPlugin"),Ca=O(t=>{let e,r;return{apply:"serve",config(n,o){return n.plugins&&(r=la(n.plugins,t?.reactPluginName)),e=o.mode||"development",n},configureServer(n){const o=n.config.root||process.cwd(),s=ea(n),{recentErrors:i,shouldSkip:a}=ta(),l=n.transformRequest.bind(n);n.transformRequest=async(p,f)=>{try{return await l(p,f)}catch(h){if(h?.message?.includes("Failed to resolve import")){const m=h.message.match(/Failed to resolve import ["']([^"']+)["'] from ["']([^"']+)["']/);if(m){const[,w,g]=m;h.sourceFile=g,h.importPath=w}}throw h}},sa(n,a,i,o,t?.solutionFinders??[]),aa(n,s,a,i,o,t?.solutionFinders??[],t?.logClientRuntimeError??!0);const c=oa(n,o,s);process.on("unhandledRejection",c),n.httpServer?.on("close",()=>{process.off("unhandledRejection",c)})},enforce:"pre",name:Dn,transform(n,o,s){return s?.ssr||!(o.includes("vite/dist/client/client.mjs")||o.includes("/@vite/client"))?null:Wn(n)},transformIndexHtml(){return{html:"",tags:[{attrs:{type:"module"},children:ia(e,r),injectTo:"head",tag:"script"}]}}}},"errorOverlayPlugin");export{Ca as default};
|
package/package.json
CHANGED
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/vite-overlay",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Improved vite overlay",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"
|
|
7
|
-
"vite-
|
|
6
|
+
"vite",
|
|
7
|
+
"vite-plugin",
|
|
8
|
+
"vite-overlay",
|
|
9
|
+
"vite-error-overlay",
|
|
10
|
+
"error-overlay",
|
|
11
|
+
"error-handling",
|
|
12
|
+
"source-map",
|
|
13
|
+
"typescript",
|
|
14
|
+
"react",
|
|
15
|
+
"vue",
|
|
16
|
+
"svelte",
|
|
17
|
+
"overlay",
|
|
18
|
+
"visulima"
|
|
8
19
|
],
|
|
9
20
|
"homepage": "https://visulima.com/packages/vite-overlay",
|
|
10
21
|
"bugs": {
|