@visulima/pail 3.1.0 → 3.2.0
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 +34 -0
- package/LICENSE.md +1 -408
- package/README.md +298 -0
- package/dist/index.browser.d.ts +3 -3
- package/dist/index.browser.js +12 -1
- package/dist/index.server.d.ts +8 -5
- package/dist/index.server.js +535 -2
- package/dist/interactive/index.js +2 -1
- package/dist/object-tree.js +89 -2
- package/dist/packem_shared/AbstractJsonReporter-intFdT_A.js +204 -0
- package/dist/packem_shared/InteractiveManager-CZ85hGNW.js +172 -0
- package/dist/packem_shared/InteractiveStreamHook-DiSubbJ1.js +21 -0
- package/dist/packem_shared/JsonReporter-BqWsVkHP.js +60 -0
- package/dist/packem_shared/JsonReporter-DcM2LBX9.js +28 -0
- package/dist/packem_shared/PrettyReporter-BFWaYP_J.js +222 -0
- package/dist/packem_shared/PrettyReporter-CuLLKr6-.js +169 -0
- package/dist/packem_shared/{abstract-json-reporter-CPsNkpz8.d.ts → abstract-json-reporter-DiyVyU0j.d.ts} +1 -1
- package/dist/packem_shared/{abstract-pretty-reporter-DB2G-qlI.d.ts → abstract-pretty-reporter-BbOWXMCs.d.ts} +1 -1
- package/dist/packem_shared/abstract-pretty-reporter-DMPDCslJ.js +50 -0
- package/dist/packem_shared/constants-DfDr4MHC.js +119 -0
- package/dist/packem_shared/format-label-Btft2KGP.js +1194 -0
- package/dist/packem_shared/get-longest-label-C9PWeyKq.js +9 -0
- package/dist/packem_shared/index-BomQ3E6J.js +650 -0
- package/dist/packem_shared/index-DqKWykfa.js +1146 -0
- package/dist/packem_shared/interactive-stream-hook-DG4BtN12.js +141 -0
- package/dist/packem_shared/{pail.browser-CmWcqnn9.d.ts → pail.browser-By9KjOH7.d.ts} +8 -3
- package/dist/packem_shared/pail.browser-CPDOE_d1.js +1427 -0
- package/dist/packem_shared/{types-DVzG8TWL.d.ts → types-D3ycu8-x.d.ts} +1 -1
- package/dist/packem_shared/write-console-log-based-on-level-DBmRYXpj.js +14 -0
- package/dist/packem_shared/write-stream-BG8fhcs3.js +6 -0
- package/dist/processor/caller/caller-processor.d.ts +1 -1
- package/dist/processor/caller/caller-processor.js +59 -1
- package/dist/processor/message-formatter-processor.d.ts +1 -1
- package/dist/processor/message-formatter-processor.js +67 -1
- package/dist/processor/opentelemetry-processor.d.ts +19 -0
- package/dist/processor/opentelemetry-processor.js +52 -0
- package/dist/processor/redact-processor.d.ts +1 -1
- package/dist/processor/redact-processor.js +30 -1
- package/dist/progress-bar.js +404 -1
- package/dist/reporter/file/json-file-reporter.d.ts +2 -2
- package/dist/reporter/file/json-file-reporter.js +136 -4
- package/dist/reporter/http/abstract-http-reporter.d.ts +102 -0
- package/dist/reporter/http/abstract-http-reporter.js +435 -0
- package/dist/reporter/http/http-reporter.d.ts +13 -0
- package/dist/reporter/http/http-reporter.edge-light.d.ts +168 -0
- package/dist/reporter/http/http-reporter.edge-light.js +651 -0
- package/dist/reporter/http/http-reporter.js +13 -0
- package/dist/reporter/json/index.browser.d.ts +2 -2
- package/dist/reporter/json/index.browser.js +2 -1
- package/dist/reporter/json/index.d.ts +2 -2
- package/dist/reporter/json/index.js +2 -1
- package/dist/reporter/pretty/index.browser.d.ts +2 -2
- package/dist/reporter/pretty/index.browser.js +1 -1
- package/dist/reporter/pretty/index.d.ts +2 -2
- package/dist/reporter/pretty/index.js +1 -1
- package/dist/reporter/simple/simple-reporter.server.d.ts +2 -2
- package/dist/reporter/simple/simple-reporter.server.js +186 -8
- package/dist/spinner.js +2150 -1
- package/package.json +53 -3
- package/dist/packem_shared/AbstractJsonReporter-UftN6CIL.js +0 -1
- package/dist/packem_shared/InteractiveManager-CgmJyW9x.js +0 -3
- package/dist/packem_shared/InteractiveStreamHook-NtJu71aN.js +0 -1
- package/dist/packem_shared/JsonReporter-DTBtHNaD.js +0 -2
- package/dist/packem_shared/JsonReporter-Dl4m0xZe.js +0 -1
- package/dist/packem_shared/PrettyReporter-Bns0ZWLy.js +0 -12
- package/dist/packem_shared/PrettyReporter-CGKSTI7X.js +0 -5
- package/dist/packem_shared/abstract-pretty-reporter-CUtSm20r.js +0 -1
- package/dist/packem_shared/constants-DKfCaSUR.js +0 -1
- package/dist/packem_shared/format-label-CpyyTBom.js +0 -26
- package/dist/packem_shared/get-longest-label-B0NrI-o2.js +0 -1
- package/dist/packem_shared/index-CysYvHXs.js +0 -8
- package/dist/packem_shared/index-D9hWq9ka.js +0 -1
- package/dist/packem_shared/interactive-stream-hook-CeVo4Kth.js +0 -2
- package/dist/packem_shared/pail.browser-BmHoDvEA.js +0 -19
- package/dist/packem_shared/write-console-log-based-on-level-BP95fgQZ.js +0 -1
- package/dist/packem_shared/write-stream-CD8XFv1L.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/pail",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Highly configurable Logger for Node.js, Edge and Browser.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ansi",
|
|
@@ -110,10 +110,26 @@
|
|
|
110
110
|
"types": "./dist/processor/caller/caller-processor.d.ts",
|
|
111
111
|
"default": "./dist/processor/caller/caller-processor.js"
|
|
112
112
|
},
|
|
113
|
+
"./processor/opentelemetry": {
|
|
114
|
+
"types": "./dist/processor/opentelemetry-processor.d.ts",
|
|
115
|
+
"default": "./dist/processor/opentelemetry-processor.js"
|
|
116
|
+
},
|
|
113
117
|
"./reporter/file": {
|
|
114
118
|
"types": "./dist/reporter/file/json-file-reporter.d.ts",
|
|
115
119
|
"default": "./dist/reporter/file/json-file-reporter.js"
|
|
116
120
|
},
|
|
121
|
+
"./server/reporter/json": {
|
|
122
|
+
"import": {
|
|
123
|
+
"types": "./dist/reporter/json/index.d.ts",
|
|
124
|
+
"default": "./dist/reporter/json/index.js"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"./browser/reporter/json": {
|
|
128
|
+
"import": {
|
|
129
|
+
"types": "./dist/reporter/json/index.browser.d.ts",
|
|
130
|
+
"default": "./dist/reporter/json/index.browser.js"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
117
133
|
"./reporter/json": {
|
|
118
134
|
"browser": "./dist/reporter/json/index.browser.js",
|
|
119
135
|
"import": {
|
|
@@ -121,6 +137,18 @@
|
|
|
121
137
|
"default": "./dist/reporter/json/index.js"
|
|
122
138
|
}
|
|
123
139
|
},
|
|
140
|
+
"./server/reporter/pretty": {
|
|
141
|
+
"import": {
|
|
142
|
+
"types": "./dist/reporter/pretty/index.d.ts",
|
|
143
|
+
"default": "./dist/reporter/pretty/index.js"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"./browser/reporter/pretty": {
|
|
147
|
+
"import": {
|
|
148
|
+
"types": "./dist/reporter/pretty/index.browser.d.ts",
|
|
149
|
+
"default": "./dist/reporter/pretty/index.browser.js"
|
|
150
|
+
}
|
|
151
|
+
},
|
|
124
152
|
"./reporter/pretty": {
|
|
125
153
|
"browser": "./dist/reporter/pretty/index.browser.js",
|
|
126
154
|
"import": {
|
|
@@ -132,6 +160,24 @@
|
|
|
132
160
|
"types": "./dist/reporter/simple/simple-reporter.server.d.ts",
|
|
133
161
|
"default": "./dist/reporter/simple/simple-reporter.server.js"
|
|
134
162
|
},
|
|
163
|
+
"./reporter/abstract-http": {
|
|
164
|
+
"types": "./dist/reporter/http/abstract-http-reporter.d.ts",
|
|
165
|
+
"default": "./dist/reporter/http/abstract-http-reporter.js"
|
|
166
|
+
},
|
|
167
|
+
"./reporter/http": {
|
|
168
|
+
"edge-light": {
|
|
169
|
+
"types": "./dist/reporter/http/http-reporter.edge-light.d.ts",
|
|
170
|
+
"default": "./dist/reporter/http/http-reporter.edge-light.js"
|
|
171
|
+
},
|
|
172
|
+
"browser": {
|
|
173
|
+
"types": "./dist/reporter/http/http-reporter.d.ts",
|
|
174
|
+
"default": "./dist/reporter/http/http-reporter.js"
|
|
175
|
+
},
|
|
176
|
+
"import": {
|
|
177
|
+
"types": "./dist/reporter/http/http-reporter.d.ts",
|
|
178
|
+
"default": "./dist/reporter/http/http-reporter.js"
|
|
179
|
+
}
|
|
180
|
+
},
|
|
135
181
|
"./progress-bar": {
|
|
136
182
|
"types": "./dist/progress-bar.d.ts",
|
|
137
183
|
"default": "./dist/progress-bar.js"
|
|
@@ -157,14 +203,18 @@
|
|
|
157
203
|
"LICENSE.md"
|
|
158
204
|
],
|
|
159
205
|
"dependencies": {
|
|
160
|
-
"@visulima/colorize": "1.4.
|
|
206
|
+
"@visulima/colorize": "1.4.27",
|
|
161
207
|
"type-fest": "^5.2.0"
|
|
162
208
|
},
|
|
163
209
|
"peerDependencies": {
|
|
164
|
-
"@
|
|
210
|
+
"@opentelemetry/api": "^1.9",
|
|
211
|
+
"@visulima/redact": "2.0.3",
|
|
165
212
|
"rotating-file-stream": "^3.2.7"
|
|
166
213
|
},
|
|
167
214
|
"peerDependenciesMeta": {
|
|
215
|
+
"@opentelemetry/api": {
|
|
216
|
+
"optional": true
|
|
217
|
+
},
|
|
168
218
|
"@visulima/redact": {
|
|
169
219
|
"optional": true
|
|
170
220
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var h=Object.defineProperty;var c=(e,t)=>h(e,"name",{value:t,configurable:!0});import{E as y}from"./constants-DKfCaSUR.js";var S=Object.defineProperty,O=c((e,t)=>S(e,"name",{value:t,configurable:!0}),"r"),j=Object.defineProperty,d=O((e,t)=>j(e,"name",{value:t,configurable:!0}),"o"),x=Object.defineProperty,N=d((e,t)=>x(e,"name",{value:t,configurable:!0}),"e");function f(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}c(f,"o");O(f,"i");d(f,"r");N(f,"isPlainObject");var P=Object.defineProperty,J=c((e,t)=>P(e,"name",{value:t,configurable:!0}),"l"),w=Object.defineProperty,A=J((e,t)=>w(e,"name",{value:t,configurable:!0}),"f");const E=Object.create({},{cause:{enumerable:!0,value:void 0,writable:!0},code:{enumerable:!0,value:void 0,writable:!0},errors:{enumerable:!0,value:void 0,writable:!0},message:{enumerable:!0,value:void 0,writable:!0},name:{enumerable:!0,value:void 0,writable:!0},stack:{enumerable:!0,value:void 0,writable:!0}});var T=Object.defineProperty,b=A((e,t)=>T(e,"name",{value:t,configurable:!0}),"c");const m=new WeakSet,D=b(e=>{m.add(e);const t=e.toJSON();return m.delete(e),t},"toJSON"),g=b((e,t,o,a)=>{if(e&&e instanceof Uint8Array&&e.constructor.name==="Buffer")return"[object Buffer]";if(e!==null&&typeof e=="object"&&typeof e.pipe=="function")return"[object Stream]";if(e instanceof Error)return t.includes(e)?"[Circular]":(o+=1,l(e,a,t,o));if(a.useToJSON&&typeof e.toJSON=="function")return e.toJSON();if(typeof e=="object"&&e instanceof Date)return e.toISOString();if(typeof e=="function")return`[Function: ${e.name||"anonymous"}]`;if(f(e)){if(o+=1,a.maxDepth&&o>=a.maxDepth)return{};const r={};for(const n in e)r[n]=g(e[n],t,o,a);return r}try{return e}catch{return"[Not Available]"}},"serializeValue"),l=b((e,t,o,a)=>{if(o.push(e),t.maxDepth===0)return{};if(t.useToJSON&&typeof e.toJSON=="function"&&!m.has(e))return D(e);const r=Object.create(E);if(r.name=Object.prototype.toString.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,r.message=e.message,r.stack=e.stack,Array.isArray(e.errors)){const n=[];for(const u of e.errors){if(!(u instanceof Error))throw new TypeError("All errors in the 'errors' property must be instances of Error");if(o.includes(u))return r.errors=[],r;n.push(l(u,t,o,a))}r.errors=n}e.cause instanceof Error&&!o.includes(e.cause)&&(r.cause=l(e.cause,t,o,a));for(const n in e)if(r[n]===void 0){const u=e[n];r[n]=g(u,o,a,t)}if(Array.isArray(t.exclude)&&t.exclude.length>0)for(const n of t.exclude)try{delete r[n]}catch{}return r},"_serialize"),v=b((e,t={})=>l(e,{exclude:t.exclude??[],maxDepth:t.maxDepth??Number.POSITIVE_INFINITY,useToJSON:t.useToJSON??!1},[],0),"serialize");var I=Object.defineProperty,$=c((e,t)=>I(e,"name",{value:t,configurable:!0}),"p");class z{static{c(this,"AbstractJsonReporter")}static{$(this,"AbstractJsonReporter")}stringify;errorOptions;constructor(t={}){this.errorOptions=t.error??{}}setStringify(t){this.stringify=t}log(t){const{context:o,error:a,file:r,message:n,type:u,...i}=t;if(i.label&&(i.label=i.label.trim()),r&&(i.file=`${r.name}:${r.line}${r.column?`:${r.column}`:""}`),n===y?i.message=void 0:i.message=n,a&&(i.error=v(a,this.errorOptions)),o){const p=[];for(const s of o)s!==y&&(s instanceof Error?p.push(v(s,this.errorOptions)):p.push(s));i.context=p}this._log(this.stringify(i),u.level)}}export{z as AbstractJsonReporter};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
var v=Object.defineProperty;var l=(a,t)=>v(a,"name",{value:t,configurable:!0});import{O as g,i as m,B as p}from"./index-CysYvHXs.js";var w=Object.defineProperty,b=l((a,t)=>w(a,"name",{value:t,configurable:!0}),"l");class M{static{l(this,"g")}static{b(this,"InteractiveManager")}#t;#e=!1;#s=!1;#i=0;#r=0;constructor(t,e){this.#t={stderr:e,stdout:t}}get lastLength(){return this.#i}get outside(){return this.#r}get isHooked(){return this.#e}get isSuspended(){return this.#s}erase(t,e=this.#i){if(this.#t[t]===void 0)throw new TypeError(`Stream "${t}" is not available`);this.#t[t].erase(e)}hook(){return this.#e||(Object.values(this.#t).forEach(t=>t.active()),this.#a(!0)),this.#e}resume(t,e){this.#s&&(this.#s=!1,e&&this.erase(t,e),this.#i=0,Object.values(this.#t).forEach(i=>i.active()))}suspend(t,e=!0){this.#s||(this.#s=!0,e&&this.erase(t),Object.values(this.#t).forEach(i=>i.renew()))}unhook(t=!0){return this.#e&&(Object.values(this.#t).forEach(e=>e.inactive(t)),this.#a()),!this.#e}update(t,e,i=0){if(e.length>0){if(this.#t[t]===void 0)throw new TypeError(`Stream "${t}" is not available`);const n=this.#t[t],{columns:c,rows:s}=g(),u=i>s?s-1:Math.max(0,Math.min(s-1,i)),h=this.lastLength-u,o=Math.max(h-s,this.outside);let r=e.reduce((d,f)=>[...d,m(f,{trim:!1,width:c,wrapMode:p.STRICT_WIDTH})],[]);s<=h?(n.erase(s),u<o&&(r=r.slice(o-u+1))):h&&n.erase(h),n.write(`${r.join(`
|
|
2
|
-
`)}
|
|
3
|
-
`),this.#i=o?o+r.length+1:r.length,this.#r=Math.max(this.lastLength-s,this.outside)}}#a(t=!1){this.#e=t,this.#i=0,this.#r=0}}export{M as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire as e}from"node:module";import{t as u}from"./interactive-stream-hook-CeVo4Kth.js";const t=e(import.meta.url),i=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process;export{u as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var i=Object.defineProperty;var r=(t,e)=>i(t,"name",{value:e,configurable:!0});import{createRequire as c}from"node:module";import{n as p}from"./write-stream-CD8XFv1L.js";import{AbstractJsonReporter as d}from"./AbstractJsonReporter-UftN6CIL.js";const m=c(import.meta.url),a=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,{stdout:n,stderr:u}=a;var l=Object.defineProperty,f=r((t,e)=>l(t,"name",{value:e,configurable:!0}),"e");class j extends d{static{r(this,"d")}static{f(this,"JsonReporter")}#e;#t;constructor(e={}){super(e),this.#e=n,this.#t=u}setStdout(e){this.#e=e}setStderr(e){this.#t=e}_log(e,s){const o=["error","warn"].includes(s)?this.#t:this.#e;p(`${e}
|
|
2
|
-
`,o)}}export{j as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var s=Object.defineProperty;var t=(e,r)=>s(e,"name",{value:r,configurable:!0});import{AbstractJsonReporter as a}from"./AbstractJsonReporter-UftN6CIL.js";import{t as p}from"./write-console-log-based-on-level-BP95fgQZ.js";var c=Object.defineProperty,n=t((e,r)=>c(e,"name",{value:r,configurable:!0}),"e");class l extends a{static{t(this,"p")}static{n(this,"JsonReporter")}constructor(r={}){super(r)}_log(r,o){p(o)(r)}}export{l as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
var O=Object.defineProperty;var T=(n,e)=>O(n,"name",{value:e,configurable:!0});import{createRequire as q}from"node:module";import Y,{red as b,greenBright as D,cyan as G,green as H,grey as s,white as W,bgGrey as z,underline as C}from"@visulima/colorize";import{u as J,n as K,a as I,G as M}from"./format-label-CpyyTBom.js";import{O as N,o as g,i as Q,B as U}from"./index-CysYvHXs.js";import{E as X}from"./constants-DKfCaSUR.js";import{A as Z,s as ee}from"./abstract-pretty-reporter-CUtSm20r.js";import{s as te}from"./get-longest-label-B0NrI-o2.js";import{n as re}from"./write-stream-CD8XFv1L.js";const ae=q(import.meta.url),B=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,{stdout:F,stderr:V}=B;var se=Object.defineProperty,L=T((n,e)=>se(n,"name",{value:e,configurable:!0}),"x");const w=L(n=>!/[\\/]pail[\\/]dist/.test(n),"pailFileFilter");class ge extends Z{static{T(this,"PrettyReporter")}static{L(this,"PrettyReporter")}#t;#r;#s;#o=!1;#i;#e;constructor(e={}){const{error:p,inspect:i,...a}=e;super({uppercase:{label:!0,...a.uppercase},...a}),this.#i={...J,...i},this.#e={...p,color:{fileLine:H,hint:G,marker:b,message:b,method:D,title:b}},this.#t=F,this.#r=V}setStdout(e){this.#t=e}setStderr(e){this.#r=e}setInteractiveManager(e){this.#s=e}setIsInteractive(e){this.#o=e}log(e){this._log(this._formatMessage(e),e.type.level)}_formatMessage(e){const{columns:p}=N();let i=p;typeof this.styles.messageLength=="number"&&(i=this.styles.messageLength);const{badge:a,context:j,date:u,error:E,file:c,groups:m,label:d,message:f,prefix:y,repeated:v,scope:l,suffix:$,traceError:S,type:k}=e,{color:P}=this.loggerTypes[k.name],R=P?Y[P]:W,h=m.map(()=>" ").join(""),t=[];if(m.length>0&&t.push(`${h+s(`[${m.at(-1)}]`)} `),u&&t.push(`${s(this.styles.dateFormatter(typeof u=="string"?new Date(u):u))} `),a)t.push(R(a));else{const r=ee(this.loggerTypes);r.length>0&&t.push(`${s(".".repeat(r.length))} `)}const A=te(this.loggerTypes);if(d){const r=g(A),o=g(d);t.push(`${R(K(d,this.styles))} `,s(".".repeat(Math.max(0,r-o))))}else t.push(s(".".repeat(A.length+2)));v&&t.push(`${z.white(`[${v}x]`)} `),Array.isArray(l)&&l.length>0&&t.push(` ${s(`[${l.join(" > ")}]`)} `),y&&t.push(`${s(`${Array.isArray(l)&&l.length>0?". ":" "}[${this.styles.underline.prefix?C(y):y}]`)} `);const _=g(t.join(" "));if(c){const r=c.name+(c.line?`:${c.line}`:""),o=g(r);if(o+_+2>i)t.push(s(` ${r}`));else{const x=Math.max(0,i-_-o-2);t.push(s(`${".".repeat(x)} ${r}`))}}else t.push(s(".".repeat(Math.max(0,i-_-1))));if(t.length>0&&t.push(`
|
|
2
|
-
|
|
3
|
-
`),f!==X){const r=typeof f=="string"?f:I(f,this.#i);t.push(h+Q(r,{trim:!1,width:i-3,wrapMode:U.STRICT_WIDTH}))}if(j){let r=!1;t.push(...j.map(o=>{if(o instanceof Error)return r=!0,`
|
|
4
|
-
|
|
5
|
-
${M(o,{...this.#e,filterStacktrace:w,prefix:h})}`;if(typeof o=="object")return` ${I(o,this.#i)}`;const x=(r?`
|
|
6
|
-
|
|
7
|
-
`:" ")+o;return r=!1,x}))}return E&&t.push(M(E,{...this.#e,filterStacktrace:w,prefix:h})),S&&t.push(`
|
|
8
|
-
|
|
9
|
-
${M(S,{...this.#e,filterStacktrace:w,hideErrorCauseCodeView:!0,hideErrorCodeView:!0,hideErrorErrorsCodeView:!0,hideMessage:!0,prefix:h})}`),$&&t.push(`
|
|
10
|
-
`,h+s(this.styles.underline.suffix?C($):$)),t.join("")}_log(e,p){const i=["error","trace","warn"].includes(p)?"stderr":"stdout",a=i==="stderr"?this.#r:this.#t;this.#o&&this.#s!==void 0&&a.isTTY?this.#s.update(i,e.split(`
|
|
11
|
-
`),0):re(`${e}
|
|
12
|
-
`,a)}}export{ge as PrettyReporter};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
var Y=Object.defineProperty;var d=(h,i)=>Y(h,"name",{value:i,configurable:!0});import E,{grey as o,white as R,underline as b,bold as L}from"@visulima/colorize/browser";import{v as r}from"./index-D9hWq9ka.js";import{E as O}from"./constants-DKfCaSUR.js";import{A as k,s as B}from"./abstract-pretty-reporter-CUtSm20r.js";import{s as C}from"./get-longest-label-B0NrI-o2.js";import{t as D}from"./write-console-log-based-on-level-BP95fgQZ.js";var F=Object.defineProperty,U=d((h,i)=>F(h,"name",{value:i,configurable:!0}),"A");class K extends k{static{d(this,"Y")}static{U(this,"PrettyReporter")}constructor(i={}){super({uppercase:{label:!0,...i.uppercase},...i})}log(i){const t=typeof globalThis.window<"u"&&typeof globalThis.document<"u",x=D(i.type.level),{badge:A,context:T,date:u,error:v,groups:f,label:g,message:w,prefix:y,repeated:a,scope:n,suffix:m,type:S}=i,{color:P}=this.loggerTypes[S.name],j=P?E[P]:R,e=[];if(t&&f.length>0){const s=f.map(()=>" ").join(""),l=o(`[${f.at(-1)}]`);e.push(r(s+l[0],l.slice(1)))}if(u){const s=o(this.styles.dateFormatter(typeof u=="string"?new Date(u):u));t?e.push(r(s[0],s.slice(1))):e.push([`${s[0]} `,...s.slice(1)])}if(A){const s=j(A);t?e.push(r(s[0],s.slice(1))):e.push([`${s[0]} `,...s.slice(1)])}else{const s=B(this.loggerTypes);if(s.length>0){const l=o(".".repeat(s.length));t?e.push(r(`${l[0]} `,l.slice(1))):e.push([`${l[0]} `,...l.slice(1)])}}const M=C(this.loggerTypes);let $;if(a){const s=R(`[${a}x]`);$=t?r(s[0],s.slice(1)):[s[0],...s.slice(1)]}if(g){const s=j(this.#s(g));t?e.push(r(s[0],s.slice(1))):e.push([s[0],...s.slice(1)]),$&&e.push($);let l=M.length-g.length;if(a?l-=String(a).length+3:l+=1,l>0){const p=o(".".repeat(l));t?e.push(r(p[0],p.slice(1))):e.push([` ${p[0]}`,...p.slice(1)])}}else{const s=o(".".repeat(M.length+1));t?e.push(r(s[0],s.slice(1))):e.push([s[0],...s.slice(1)])}if(Array.isArray(n)&&n.length>0){const s=o(`[${n.join(" > ")}]`);t?e.push(r(s[0],s.slice(1))):e.push([s[0],...s.slice(1)])}if(y){const s=o(`${Array.isArray(n)&&n.length>0?". ":" "}[${this.styles.underline.prefix?b(y):y}] `);t?e.push(r(s[0],s.slice(1))):e.push([s[0],...s.slice(1)])}if(w!==O&&e.push(w),T&&e.push(...T),v&&e.push(v,`
|
|
2
|
-
|
|
3
|
-
`),m){const s=o(this.styles.underline.suffix?b(m):m);t?e.push(r(`
|
|
4
|
-
${s[0]}`,s.slice(1))):e.push([`
|
|
5
|
-
${s[0]}`,...s.slice(1)])}if(t)x(...e);else{let s="";const l=[],p=[];for(const c of e)Array.isArray(c)&&c.length>1&&c[0].includes("%c")?(s+=c[0],l.push(...c.slice(1))):p.push(c);x(`${s}%c`,...l,"",...p)}}#s(i){let t=this.styles.uppercase.label?i.toUpperCase():i;return t=this.styles.underline.label?b(t):t,this.styles.bold.label&&(t=L(t)),t}}export{K as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var o=Object.defineProperty;var s=(t,e)=>o(t,"name",{value:e,configurable:!0});import{L as g}from"./constants-DKfCaSUR.js";var n=Object.defineProperty,c=s((t,e)=>n(t,"name",{value:e,configurable:!0}),"r$1");const b=c(t=>{const e=Object.keys(t).map(r=>t[r].badge??"");return e.length===0?"":e.reduce((r,a)=>r.length>a.length?r:a)},"getLongestBadge");var i=Object.defineProperty,l=s((t,e)=>i(t,"name",{value:e,configurable:!0}),"o");const p=l(t=>[t.getHours(),t.getMinutes(),t.getSeconds()].map(e=>String(e).padStart(2,"0")).join(":"),"dateFormatter");class d{static{s(this,"AbstractPrettyReporter")}static{l(this,"AbstractPrettyReporter")}styles;loggerTypes;constructor(e){this.styles={bold:{label:!1},dateFormatter:p,underline:{label:!1,message:!1,prefix:!1,suffix:!1},uppercase:{label:!1},...e},this.loggerTypes=g}setLoggerTypes(e){this.loggerTypes=e}}export{d as A,b as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const l={alert:7,critical:6,debug:1,emergency:8,error:5,informational:2,notice:3,trace:2,warning:4},e={alert:{color:"red",label:"alert",logLevel:"alert"},await:{color:"blue",label:"awaiting",logLevel:"informational"},complete:{color:"cyan",label:"complete",logLevel:"informational"},critical:{color:"redBright",label:"critical",logLevel:"critical"},debug:{color:"gray",label:"debug",logLevel:"debug"},emergency:{color:"redBright",label:"emergency",logLevel:"emergency"},error:{color:"red",label:"error",logLevel:"error"},info:{color:"blueBright",label:"info",logLevel:"informational"},log:{label:"",logLevel:"informational"},notice:{color:"magentaBright",label:"notice",logLevel:"notice"},pending:{color:"magenta",label:"pending",logLevel:"informational"},start:{color:"greenBright",label:"start",logLevel:"informational"},stop:{color:"red",label:"stop",logLevel:"informational"},success:{color:"green",label:"success",logLevel:"informational"},trace:{color:"cyanBright",label:"trace",logLevel:"trace"},wait:{color:"blue",label:"waiting",logLevel:"informational"},warn:{color:"yellow",label:"warning",logLevel:"warning"},warning:{color:"yellow",label:"warning",logLevel:"warning"},watch:{color:"yellowBright",label:"watching",logLevel:"informational"}},o=Symbol("EMPTY");export{o as E,e as L,l as a};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
var xe=Object.defineProperty;var O=(e,t)=>xe(e,"name",{value:t,configurable:!0});import{createRequire as Ie}from"node:module";import{grey as _e,green as Y,cyan as ze,red as Me,yellow as G,bold as ne,magenta as Le,underline as Be}from"@visulima/colorize";const Te=Ie(import.meta.url),T=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ee=O(e=>{if(typeof T<"u"&&T.versions&&T.versions.node){const[t,r]=T.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return T.getBuiltinModule(e)}return Te(e)},"__cjs_getBuiltinModule"),{createRequire:ke}=Ee("node:module");var Ce=Object.defineProperty,Fe=O((e,t)=>Ce(e,"name",{value:t,configurable:!0}),"A$3"),We=Object.defineProperty,D=Fe((e,t)=>We(e,"name",{value:t,configurable:!0}),"v"),Ve=Object.defineProperty,Ge=D((e,t)=>Ve(e,"name",{value:t,configurable:!0}),"r$1");const Re=Ge(e=>e.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
|
|
2
|
-
`),"normalizeLF"),De=globalThis.process||Object.create(null),U={versions:{}},H=new Proxy(De,{get(e,t){if(t in e)return e[t];if(t in U)return U[t]}});var qe=Object.defineProperty,Je=D((e,t)=>qe(e,"name",{value:t,configurable:!0}),"b");const Ye=Je((e,t,r,n)=>{const i={column:0,line:-1,...e.start},o={...i,...e.end},l=i.line,a=i.column,s=o.line,c=o.column;let u=Math.max(l-(r+1),0),g=Math.min(t.length,s+n);l===-1&&(u=0),s===-1&&(g=t.length);const m=s-l,f={};if(m)for(let d=0;d<=m;d++){const y=d+l;if(!a)f[y]=!0;else if(d===0){const h=t[y-1]?.length;f[y]=[a,(h??0)-a+1]}else if(d===m)f[y]=[0,c];else{const h=t[y-d]?.length;f[y]=[0,h]}}else a===c?f[l]=a?[a,0]:!0:f[l]=[a,(c??0)-(a??0)];return{end:g,markerLines:f,start:u}},"getMarkerLines");var Ue=Object.defineProperty,z=D((e,t)=>Ue(e,"name",{value:t,configurable:!0}),"o");const He=H.platform==="win32"&&!H.env?.WT_SESSION?">":"❯",Ke=z((e,t,r)=>{const n={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...r,color:{gutter:z(d=>d,"gutter"),marker:z(d=>d,"marker"),message:z(d=>d,"message"),...r?.color}},i=t.start&&typeof t.start.column=="number";let o=Re(e).split(`
|
|
3
|
-
`);typeof n?.tabWidth=="number"&&(o=o.map(d=>d.replaceAll(" "," ".repeat(n.tabWidth))));const{end:l,markerLines:a,start:s}=Ye(t,o,n.linesAbove,n.linesBelow),c=String(l).length,{gutter:u,marker:g,message:m}=n.color;let f=o.slice(s,l).map((d,y)=>{const h=s+1+y,S=a[h],_=` ${h}`.slice(-c),we=!a[h+1],W=` ${_}${n.showGutter?" |":""}`;if(S){let V="";if(Array.isArray(S)){const Pe=d.replaceAll(/[^\t]/g," ").slice(0,Math.max(S[0]-1,0)),Ae=S[1]||1;V=[`
|
|
4
|
-
`,n.prefix+u(W.replaceAll(/\d/g," "))," ",Pe,g("^").repeat(Ae)].join(""),we&&n.message&&(V+=` ${m(n.message)}`)}return[n.prefix+g(He),u(W),d.length>0?` ${d}`:"",V].join("")}return`${n.prefix} ${u(W)}${d.length>0?` ${d}`:""}`}).join(`
|
|
5
|
-
`);return n.message&&!i&&(f=`${n.prefix+" ".repeat(c+1)+n.message}
|
|
6
|
-
${f}`),f},"codeFrame");var Qe=Object.defineProperty,Xe=O((e,t)=>Qe(e,"name",{value:t,configurable:!0}),"v$1"),Ze=Object.defineProperty,et=Xe((e,t)=>Ze(e,"name",{value:t,configurable:!0}),"v"),tt=Object.defineProperty,N=et((e,t)=>tt(e,"name",{value:t,configurable:!0}),"u");const P=N((e,...t)=>{process.env.DEBUG&&String(process.env.DEBUG)==="true"&&console.debug(`error:parse-stacktrace: ${e}`,...t)},"debugLog"),A="<unknown>",rt=/^.*?\s*at\s(?:(.+?\)(?:\s\[.+\])?|\(?.*?)\s?\((?:address\sat\s)?)?(?:async\s)?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,nt=/\((\S+)\),\s(<[^>]+>)?:(\d+)?:(\d+)?\)?/,it=/(.*?):(\d+):(\d+)(\s<-\s(.+):(\d+):(\d+))?/,ot=/(eval)\sat\s(<anonymous>)\s\((.*)\)?:(\d+)?:(\d+)\),\s*(<anonymous>)?:(\d+)?:(\d+)/,at=/^\s*in\s(?:([^\\/]+(?:\s\[as\s\S+\])?)\s\(?)?\(at?\s?(.*?):(\d+)(?::(\d+))?\)?\s*$/,lt=/in\s(.*)\s\(at\s(.+)\)\sat/,st=/^(?:.*@)?(.*):(\d+):(\d+)$/,ct=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. \/=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ut=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ft=/(\S[^\s[]*\[.*\]|.*?)@(.*):(\d+):(\d+)/,K=/\(error: (.*)\)/,ie=N((e,t)=>{const r=e.includes("safari-extension"),n=e.includes("safari-web-extension");return r||n?[e.includes("@")?e.split("@")[0]:A,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},"extractSafariExtensionDetails"),oe=N((e,t)=>{const r=it.exec(t);r&&(e.file=r[1],e.line=+r[2],e.column=+r[3])},"parseMapped"),dt=N(e=>{const t=lt.exec(e);if(t){P(`parse nested node error stack line: "${e}"`,`found: ${JSON.stringify(t)}`);const n=t[2].split(":");return{column:n[2]?+n[2]:void 0,file:n[0],line:n[1]?+n[1]:void 0,methodName:t[1]||A,raw:e,type:void 0}}const r=at.exec(e);if(r){P(`parse node error stack line: "${e}"`,`found: ${JSON.stringify(r)}`);const n={column:r[4]?+r[4]:void 0,file:r[2]?r[2].replace(/at\s/,""):void 0,line:r[3]?+r[3]:void 0,methodName:r[1]||A,raw:e,type:e.startsWith("internal")?"internal":void 0};return oe(n,`${r[2]}:${r[3]}:${r[4]}`),n}},"parseNode"),pt=N(e=>{const t=rt.exec(e);if(t){P(`parse chrome error stack line: "${e}"`,`found: ${JSON.stringify(t)}`);const r=t[2]?.startsWith("native"),n=t[2]?.startsWith("eval")||t[1]?.startsWith("eval");let i,o;if(n){const c=nt.exec(e);if(c){const u=/^(\S+):(\d+):(\d+)$|^(\S+):(\d+)$/.exec(c[1]);u?(t[2]=u[4]??u[1],t[3]=u[5]??u[2],t[4]=u[3]):c[2]&&(t[2]=c[1]),c[2]&&(i={column:c[4]?+c[4]:void 0,file:c[2],line:c[3]?+c[3]:void 0,methodName:"eval",raw:e,type:"eval"})}else{const u=ot.exec(e);u&&(o={column:u[5]?+u[5]:void 0,file:u[3],line:u[4]?+u[4]:void 0},i={column:u[8]?+u[8]:void 0,file:u[2],line:u[7]?+u[7]:void 0,methodName:"eval",raw:u[0],type:"eval"})}}const[l,a]=ie(t[1]?t[1].replace(/^Anonymous function$/,"<anonymous>"):A,t[2]),s={column:t[4]?+t[4]:void 0,evalOrigin:i,file:a,line:t[3]?+t[3]:void 0,methodName:l,raw:e,type:n?"eval":r?"native":void 0};return o?(s.column=o.column,s.file=o.file,s.line=o.line):oe(s,`${a}:${t[3]}:${t[4]}`),s}},"parseChromium"),gt=N((e,t)=>{const r=ct.exec(e);if(r){P(`parse gecko error stack line: "${e}"`,`found: ${JSON.stringify(r)}`);const n=r[3]?.includes(" > eval"),i=n&&r[3]&&ut.exec(r[3]);let o;n&&i&&(r[3]=i[1],o={column:r[5]?+r[5]:void 0,file:r[3],line:r[4]?+r[4]:void 0,methodName:"eval",raw:e,type:"eval"},r[4]=i[2]);const[l,a]=ie(r[1]?r[1].replace(/^Anonymous function$/,"<anonymous>"):A,r[3]);let s;(t?.type==="safari"||!n&&t?.type==="firefox")&&t.column?s=t.column:!n&&r[5]&&(s=+r[5]);let c;return(t?.type==="safari"||!n&&t?.type==="firefox")&&t.line?c=t.line:r[4]&&(c=+r[4]),{column:s,evalOrigin:o,file:a,line:c,methodName:l,raw:e,type:n?"eval":a.includes("[native code]")?"native":void 0}}},"parseGecko"),mt=N((e,t)=>{const r=ft.exec(e);if(!(r&&r[2].includes(" > eval"))&&r)return P(`parse firefox error stack line: "${e}"`,`found: ${JSON.stringify(r)}`),{column:r[4]?+r[4]:t?.column??void 0,file:r[2],line:r[3]?+r[3]:t?.line??void 0,methodName:r[1]||A,raw:e,type:void 0}},"parseFirefox"),bt=N(e=>{const t=st.exec(e);if(t)return P(`parse react android native error stack line: "${e}"`,`found: ${JSON.stringify(t)}`),{column:t[3]?+t[3]:void 0,file:t[1],line:t[2]?+t[2]:void 0,methodName:A,raw:e,type:void 0}},"parseReactAndroidNative"),ae=N((e,{filter:t,frameLimit:r=50}={})=>{let n=(e.stacktrace??e.stack??"").split(`
|
|
7
|
-
`).map(i=>(K.test(i)?i.replace(K,"$1"):i).replace(/^\s+|\s+$/g,"")).filter(i=>!/\S*(?:Error: |AggregateError:)/.test(i)&&i!=="eval code");return t&&(n=n.filter(i=>t(i))),n=n.slice(0,r),n.reduce((i,o,l)=>{if(!o||o.length>1024)return i;let a;if(/^\s*in\s.*/.test(o))a=dt(o);else if(/^.*?\s*at\s.*/.test(o))a=pt(o);else if(/^.*?\s*@.*|\[native code\]/.test(o)){let s;l===0&&(e.columnNumber||e.lineNumber?s={column:e.columnNumber,line:e.lineNumber,type:"firefox"}:(e.line||e.column)&&(s={column:e.column,line:e.line,type:"safari"})),a=mt(o,s)||gt(o,s)}else a=bt(o);return a?i.push(a):P(`parse error stack line: "${o}"`,"not parser found"),i},[])},"parseStacktrace");var $t=Object.defineProperty,yt=O((e,t)=>$t(e,"name",{value:t,configurable:!0}),"p$1"),vt=Object.defineProperty,le=yt((e,t)=>vt(e,"name",{value:t,configurable:!0}),"m");const ht=ke(import.meta.url),x=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,q=le(e=>{if(typeof x<"u"&&x.versions&&x.versions.node){const[t,r]=x.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return x.getBuiltinModule(e)}return ht(e)},"__cjs_getBuiltinModule"),{existsSync:St,readFileSync:Ot}=q("node:fs"),{relative:jt}=q("node:path"),{cwd:Nt}=x,{fileURLToPath:wt}=q("node:url");var Pt=Object.defineProperty,b=le((e,t)=>Pt(e,"name",{value:t,configurable:!0}),"o");const I=b((e,t,r)=>r===0?e.toString():t===" "?e+" ".repeat(r):e+" ".repeat(t*r),"getPrefix"),At=b((e,t)=>{const r=e.replace("async file:","file:");return jt(t,r.startsWith("file:")?wt(r):r)},"getRelativePath"),xt=b((e,t,r)=>{if(t)return r.title(e.message);const n=e.message?`: ${e.message}`:"";return r.title(e.name+n)},"getTitleText"),se=b((e,{color:t,hideErrorTitle:r,indentation:n,prefix:i},o)=>`${I(i,n,o)}${xt(e,r,t)}
|
|
8
|
-
`,"getMessage"),ce=b((e,{color:t,indentation:r,prefix:n},i)=>{if(e.hint===void 0)return;const o=I(n,r,i);let l="";if(Array.isArray(e.hint))for(const a of e.hint)l+=`${(o+a).toString()}
|
|
9
|
-
`;else l+=o+e.hint;return t.hint(l)},"getHint"),J=b((e,{color:t,cwd:r,displayShortPath:n,indentation:i,prefix:o},l=0)=>{const a=n?At(e.file,r):e.file,{fileLine:s,method:c}=t;return`${I(o,i,l)}at ${e.methodName?`${c(e.methodName)} `:""}${s(a)}:${s(e.line?.toString()??"")}`.toString()},"getMainFrame"),ue=b((e,{color:t,indentation:r,linesAbove:n,linesBelow:i,prefix:o,showGutter:l,showLineNumbers:a,tabWidth:s},c)=>{if(e.file===void 0)return;const u=e.file.replace("file://","");if(!St(u))return;const g=Ot(u,"utf8");return Ke(g,{start:{column:e.column,line:e.line}},{color:t,linesAbove:n,linesBelow:i,prefix:I(o,r,c),showGutter:l,showLineNumbers:a,tabWidth:s})},"getCode"),fe=b((e,t,r)=>{if(e.errors.length===0)return;let n=`${I(t.prefix,t.indentation,r)}Errors:
|
|
10
|
-
|
|
11
|
-
`,i=!0;for(const o of e.errors)i?i=!1:n+=`
|
|
12
|
-
|
|
13
|
-
`,n+=pe(o,{...t,framesMaxLimit:1,hideErrorCodeView:t.hideErrorErrorsCodeView},r+1);return`
|
|
14
|
-
${n}`},"getErrors"),de=b((e,t,r)=>{let n=`${I(t.prefix,t.indentation,r)}Caused by:
|
|
15
|
-
|
|
16
|
-
`;const i=e.cause;n+=se(i,t,r);const o=ae(i).shift(),l=ce(i,t,r);if(l&&(n+=`${l}
|
|
17
|
-
`),o&&(n+=J(o,t,r),!t.hideErrorCauseCodeView)){const a=ue(o,t,r);a!==void 0&&(n+=`
|
|
18
|
-
${a}`)}if(i.cause)n+=`
|
|
19
|
-
${de(i,t,r+1)}`;else if(i instanceof AggregateError){const a=fe(i,t,r);a!==void 0&&(n+=`
|
|
20
|
-
${a}`)}return`
|
|
21
|
-
${n}`},"getCause"),It=b((e,t)=>(e.length>0?`
|
|
22
|
-
`:"")+e.map(r=>J(r,t)).join(`
|
|
23
|
-
`),"getStacktrace"),pe=b((e,t,r)=>{const n={cwd:Nt(),displayShortPath:!1,filterStacktrace:void 0,framesMaxLimit:Number.POSITIVE_INFINITY,hideErrorCauseCodeView:!1,hideErrorCodeView:!1,hideErrorErrorsCodeView:!1,hideErrorTitle:!1,hideMessage:!1,indentation:4,linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,showLineNumbers:!0,tabWidth:4,...t,color:{fileLine:b(l=>l,"fileLine"),gutter:b(l=>l,"gutter"),hint:b(l=>l,"hint"),marker:b(l=>l,"marker"),message:b(l=>l,"message"),method:b(l=>l,"method"),title:b(l=>l,"title"),...t.color}},i=ae(e,{filter:t.filterStacktrace,frameLimit:n.framesMaxLimit}),o=i.shift();return[t.hideMessage?void 0:se(e,n,r),ce(e,n,r),o?J(o,n,r):void 0,o&&!n.hideErrorCodeView?ue(o,n,r):void 0,e instanceof AggregateError?fe(e,n,r):void 0,e.cause===void 0?void 0:de(e,n,r),i.length>0?It(i,n):void 0].filter(Boolean).join(`
|
|
24
|
-
`).replaceAll("\\","/")},"internalRenderError"),Ur=b((e,t={})=>{if(t.framesMaxLimit!==void 0&&t.framesMaxLimit<=0)throw new RangeError("The 'framesMaxLimit' option must be a positive number");return pe(e,t,0)},"renderError");var Tt=Object.defineProperty,ge=O((e,t)=>Tt(e,"name",{value:t,configurable:!0}),"w"),Et=Object.defineProperty,p=ge((e,t)=>Et(e,"name",{value:t,configurable:!0}),"l"),kt=Object.defineProperty,_t=p((e,t)=>kt(e,"name",{value:t,configurable:!0}),"L$1");const v=_t((e,t,r,n,i,o=", ")=>{const l=e.length;if(l===0)return"";let a=n;i!==void 0&&(a=i);const s=r.truncate;let c="",u="",g="";for(let m=0;m<l;m+=1){const f=m+1===e.length,d=m+2===e.length;g=`…(${e.length-m})`;let y=e[m];r.truncate=s-c.length-(f?0:o.length);const h=u||a(y,t,r,n)+(f?"":o),S=c.length+h.length,_=S+g.length;if(f&&S>s&&c.length+g.length<=s||!f&&!d&&_>s||(y=e[m+1],u=f?"":a(y,t,r,n)+(d?"":o),!f&&d&&_>s&&S+u.length>s))break;if(c+=h,!f&&!d&&S+u.length>=s){g=`…(${e.length-m-1})`;break}g=""}return`${c}${g}`},"inspectList");var zt=Object.defineProperty,C=p((e,t)=>zt(e,"name",{value:t,configurable:!0}),"s$8");const Mt=C(([e,t],r,n)=>(n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:n.stylize(String(e),"yellow")),"inspectAttribute"),Lt=C((e,t,r)=>{switch(e.nodeType){case 1:return me(e,e,r,t);case 3:return t(e.data,t,r);default:return t(e,t,r)}},"inspectNode"),R=C((e,t,r,n)=>v(e,e,t,r,Lt,`
|
|
25
|
-
`),"inspectNodeCollection"),me=C((e,t,r,n)=>{const i=e.getAttributeNames(),o=e.tagName.toLowerCase(),l=r.stylize(`<${o}`,"special"),a=r.stylize(">","special"),s=r.stylize(`</${o}>`,"special");r.truncate-=o.length*2+5;let c="";i.length>0&&(c+=" ",c+=v(i.map(m=>[m,e.getAttribute(m)]),t,r,n,Mt," ")),r.truncate-=c.length;const{truncate:u}=r;let g=R(e.children,r,n,void 0);return g&&g.length>u&&(g=`…(${e.children.length})`),`${l}${c}${a}${g}${s}`},"inspectHTMLElement");var Bt=Object.defineProperty,Ct=p((e,t)=>Bt(e,"name",{value:t,configurable:!0}),"n$3");const Ft=Ct((e,t,r)=>e.length===0?"Arguments []":(t.truncate-=13,`Arguments [ ${v(e,e,t,r)} ]`),"inspectArguments");var Wt=Object.defineProperty,be=p((e,t)=>Wt(e,"name",{value:t,configurable:!0}),"r$2");const Vt=be((e,t)=>{let r;if(e===" ")r=" ";else if(typeof e=="number"&&e>0)r=Array.from({length:e+1}).join(" ");else return;return{base:r,prev:`
|
|
26
|
-
${Array.from({length:t+1}).join(r)}`}},"getIndent"),F=be((e,t)=>{if(e.length===0)return"";const r=t.prev+t.base;return r+e.split(", ").join(`,${r}`)+t.prev},"indentedJoin");var Gt=Object.defineProperty,$e=p((e,t)=>Gt(e,"name",{value:t,configurable:!0}),"i$4");const Rt=$e((e,t)=>{if(/^[a-z_]\w*$/i.test(e))return e;const r=JSON.stringify(e);return t.quoteStyle==="double"?r.replaceAll('"',String.raw`\"`):r.replaceAll("'",String.raw`\'`).replaceAll(String.raw`\"`,'"').replaceAll(/^"|"$/g,"'")},"quoteComplexKey"),E=$e(([e,t],r,n,i)=>(n.truncate-=2,typeof e=="string"?e=Rt(e,n):typeof e!="number"&&(e=`[${i(e,r,n)}]`),n.truncate-=e.length,t=i(t,r,n),`${e}: ${t}`),"inspectProperty");var Dt=Object.defineProperty,ye=p((e,t)=>Dt(e,"name",{value:t,configurable:!0}),"p$6");const qt=ye(e=>{for(const t of e)if(Array.isArray(t)||typeof t=="object"&&t!==null)return!0;return!1},"multiLineValues"),Jt=ye((e,t,r,n)=>{const i=Object.keys(e).slice(e.length);if(e.length===0&&i.length===0)return"[]";t.truncate-=4;let o=v(e,e,t,r);t.truncate-=o.length;let l="";i.length>0&&(l=v(i.map(s=>[s,e[s]]),e,t,r,E));const a=n&&qt(e);return a&&(o=F(o,n)),`[${a?"":" "}${o}${l?`, ${l}`:""}${a?"":" "}]`},"inspectArray");var Yt=Object.defineProperty,Ut=p((e,t)=>Yt(e,"name",{value:t,configurable:!0}),"a$4");const ve=Ut((e,t)=>{if(e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY||t.includes("e"))return t;const r=/\d(?=(?:\d{3})+(?!\d))/g;if(typeof e=="number"){const n=e<0?-Math.floor(-e):Math.floor(e);if(n!==e){const i=String(n),o=t.slice(i.length+1);return`${i.replace(r,"$&_")}.${o.replace(/\d{3}/g,"$&_").replace(/_$/,"")}`}}return t.replace(r,"$&_")},"addNumericSeparator");var Ht=Object.defineProperty,he=p((e,t)=>Ht(e,"name",{value:t,configurable:!0}),"i$3");const Kt=he(e=>e>="\uD800"&&e<="\uDBFF","isHighSurrogate"),w=he((e,t,r="…")=>{e=String(e);const n=r.length,i=e.length;if(n>t&&i>n)return r;if(i>t&&i>n){let o=t-n;return o>0&&Kt(e[o-1])&&(o-=1),`${e.slice(0,o)}${r}`}return e},"truncate");var Qt=Object.defineProperty,Xt=p((e,t)=>Qt(e,"name",{value:t,configurable:!0}),"e$5");const Q=Xt((e,t)=>{let r=w(e.toString(),t.truncate-1);return r!=="…"&&(r+="n"),t.stylize(t.numericSeparator?ve(e,r):r,"bigint")},"inspectBigInt");var Zt=Object.defineProperty,er=p((e,t)=>Zt(e,"name",{value:t,configurable:!0}),"g$1");const tr=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null),M=er((e,t,r,n)=>{if(globalThis.window!==void 0&&e===globalThis)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||globalThis.global!==void 0&&e===globalThis)return"{ [object globalThis] }";const i=Object.getOwnPropertyNames(e),o=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[],l=tr(e)===Object.prototype||e.constructor===Object,a=e instanceof Object?"":"null prototype",s=!l&&typeof Symbol<"u"&&Symbol.toStringTag in e?e[Symbol.toStringTag]:a?"Object":"",c=s||a?`[${[s,a].filter(Boolean).join(": ")}] `:"";if(i.length===0&&o.length===0)return`${c}{}`;t.truncate-=4;const u=v(i.map(f=>[f,e[f]]),e,t,r,E),g=v(o.map(f=>[f,e[f]]),e,t,r,E);let m="";return u&&g&&(m=", "),n?`${c}{${F(u+m+g,n)}}`:`${c}{ ${u}${m}${g} }`},"inspectObject");var rr=Object.defineProperty,nr=p((e,t)=>rr(e,"name",{value:t,configurable:!0}),"s$5");const ir=nr((e,t,r,n)=>{let i="";return i=i||e.constructor.name,(!i||i==="_class")&&(i="<Anonymous Class>"),t.truncate-=i.length,`${i} ${M(e,t,r,n)}`},"inspectClass");var or=Object.defineProperty,ar=p((e,t)=>or(e,"name",{value:t,configurable:!0}),"i$2");const lr=ar((e,t)=>{const r=e.toJSON();if(r===null)return"Invalid Date";const n=r.split("T"),i=n[0];return t.stylize(`${i}T${w(n[1],t.truncate-i.length-1)}`,"date")},"inspectDate");var sr=Object.defineProperty,cr=p((e,t)=>sr(e,"name",{value:t,configurable:!0}),"c$4");const ur=new Set(["column","columnNumber","description","fileName","line","lineNumber","message","name","number","stack"]),fr=cr((e,t,r)=>{const n=Object.getOwnPropertyNames(e).filter(a=>!ur.has(a)),{name:i}=e;t.truncate-=i.length;let o="";typeof e.message=="string"?o=w(e.message,t.truncate):n.unshift("message"),o=o?`: ${o}`:"",t.truncate-=o.length+5;const l=v(n.map(a=>[a,e[a]]),e,t,r,E);return`${i}${o}${l?` { ${l} }`:""}`},"inspectObject");var dr=Object.defineProperty,pr=p((e,t)=>dr(e,"name",{value:t,configurable:!0}),"c$3");const X=pr((e,t)=>{const r=e[Symbol.toStringTag]||"Function",n=e.toString();if(n.length<t.truncate-12)return t.stylize(`[${r}: ${n}]`,"special");const{name:i}=e;return i?t.stylize(`[${r} ${w(i,t.truncate-11)}]`,"special"):t.stylize(`[${r}]`,"special")},"inspectFunction");var gr=Object.defineProperty,Se=p((e,t)=>gr(e,"name",{value:t,configurable:!0}),"p$4");const mr=Se(([e,t],r,n,i)=>(n.truncate-=4,e=i(e,r,n),n.truncate-=e.length,`${e} => ${i(t,r,n)}`),"inspectMapEntry"),br=Se((e,t,r,n)=>{if(e.size<=0)return"Map (0) {}";t.truncate-=7;let i=v([...e.entries()],e,t,r,mr);return n&&(i=F(i,n)),`Map (${e.size}) {${n?"":" "}${i}${n?"":" "}}`},"inspectMap");var $r=Object.defineProperty,yr=p((e,t)=>$r(e,"name",{value:t,configurable:!0}),"e$4");function k(e,t){return Number.isNaN(e)?t.stylize("NaN","number"):e===Number.POSITIVE_INFINITY?t.stylize("Infinity","number"):e===Number.NEGATIVE_INFINITY?t.stylize("-Infinity","number"):e===0?t.stylize(1/e===Number.POSITIVE_INFINITY?"+0":"-0","number"):t.stylize(w(t.numericSeparator?ve(e,e.toString()):e.toString(),t.truncate),"number")}O(k,"j");ge(k,"w");p(k,"u$1");yr(k,"inspectNumber");var vr=Object.defineProperty,hr=p((e,t)=>vr(e,"name",{value:t,configurable:!0}),"e$3");const Sr=hr(()=>"Promise{…}","getPromiseValue");var Or=Object.defineProperty,jr=p((e,t)=>Or(e,"name",{value:t,configurable:!0}),"s$2");const Nr=jr((e,t)=>{const r=t.truncate-(2+e.flags.length);return t.stylize(`/${w(e.source,r)}/${e.flags}`,"regexp")},"inspectRegExp");var wr=Object.defineProperty,Pr=p((e,t)=>wr(e,"name",{value:t,configurable:!0}),"p$1");const Ar=Pr((e,t,r,n)=>{if(e.size===0)return"Set (0) {}";t.truncate-=7;let i=v([...e],e,t,r);return n&&(i=F(i,n)),`Set (${e.size}) {${n?"":" "}${i}${n?"":" "}}`},"inspectSet");var xr=Object.defineProperty,Ir=p((e,t)=>xr(e,"name",{value:t,configurable:!0}),"l");const Tr=Ir((e,t)=>{const r=t.quoteStyle==="double"?'"':"'";return t.quoteStyle==="double"&&(e=e.replaceAll('"','"')),r+e+r},"wrapQuotes");var Er=Object.defineProperty,Oe=p((e,t)=>Er(e,"name",{value:t,configurable:!0}),"e$2");const Z=new RegExp(String.raw`['\0-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5`+String.raw`\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]`,"g"),kr={" ":String.raw`\t`,"\n":String.raw`\n`,"\f":String.raw`\f`,"\r":String.raw`\r`,"\b":String.raw`\b`,"'":String.raw`\'`,"\\":"\\\\"},_r=16,zr=Oe(e=>kr[e]||`\\u${`0000${e.codePointAt(0).toString(_r)}`.slice(-4)}`,"escape"),ee=Oe((e,t)=>(Z.test(e)&&(e=e.replaceAll(Z,zr)),t.stylize(Tr(w(e,t.truncate-2),t),"string")),"inspectString");var Mr=Object.defineProperty,Lr=p((e,t)=>Mr(e,"name",{value:t,configurable:!0}),"o");const te=Lr(e=>"description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString(),"inspectSymbol");var Br=Object.defineProperty,je=p((e,t)=>Br(e,"name",{value:t,configurable:!0}),"c");const Cr=je(e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name,"getArrayName"),j=je((e,t,r)=>{const n=Cr(e);t.truncate-=n.length+4;const i=Object.keys(e).slice(e.length);if(e.length===0&&i.length===0)return`${n}[]`;let o="";for(let a=0;a<e.length;a++){const s=`${t.stylize(w(e[a],t.truncate),"number")}${a===e.length-1?"":", "}`;if(t.truncate-=s.length,e[a]!==e.length&&t.truncate<=3){o+=`…(${e.length-e[a]+1})`;break}o+=s}let l="";return i.length>0&&(l=v(i.map(a=>[a,e[a]]),e,t,r,E)),`${n}[ ${o}${l?`, ${l}`:""} ]`},"inspectTypedArray");var Fr=Object.defineProperty,$=p((e,t)=>Fr(e,"name",{value:t,configurable:!0}),"e");const L=new WeakMap,B={},re={Arguments:Ft,Array:Jt,ArrayBuffer:$(()=>"","ArrayBuffer"),BigInt:Q,bigint:Q,Boolean:$((e,t)=>t.stylize(String(e),"boolean"),"Boolean"),boolean:$((e,t)=>t.stylize(String(e),"boolean"),"boolean"),DataView:$(()=>"","DataView"),Date:lr,Error:fr,Float32Array:j,Float64Array:j,Function:X,function:X,Generator:$(()=>"","Generator"),HTMLCollection:R,Int8Array:j,Int16Array:j,Int32Array:j,Map:br,NodeList:R,null:$((e,t)=>t.stylize("null","null"),"null"),Number:k,number:k,Promise:Sr,RegExp:Nr,Set:Ar,String:ee,string:ee,Symbol:te,symbol:te,Uint8Array:j,Uint8ClampedArray:j,Uint16Array:j,Uint32Array:j,undefined:$((e,t)=>t.stylize("undefined","undefined"),"undefined"),WeakMap:$((e,t)=>t.stylize("WeakMap{…}","special"),"WeakMap"),WeakSet:$((e,t)=>t.stylize("WeakSet{…}","special"),"WeakSet")},Wr=$((e,t,r,n)=>globalThis.window===void 0&&typeof e[Symbol.for("nodejs.util.inspect.custom")]=="function"?e[Symbol.for("nodejs.util.inspect.custom")](n,t):"inspect"in e&&typeof e.inspect=="function"?e.inspect(n,t):"constructor"in e&&L.has(e.constructor)?L.get(e.constructor)?.(e,t)??"unknown":B[r]?B[r](e,t):"","inspectCustom"),Ne=$((e,t,r,n)=>{if(n.includes(e))return"[Circular]";if(r>=t.depth&&t.depth>0&&typeof e=="object")return Array.isArray(e)?"[Array]":"[Object]";const i=$((s,c,u)=>(c&&(n=[...n],n.push(c)),Ne(s,u,r+1,n)),"inspect"),o=t.indent?Vt(t.indent,r):void 0;let l=e===null?"null":typeof e;if(l==="object"&&(l=Object.prototype.toString.call(e).slice(8,-1)),re[l]!==void 0)return re[l](e,t,i,o);if(t.customInspect&&e){const s=Wr(e,t,l,t.depth-r);if(s)return typeof s=="string"?s:i(s,e,t)}const a=e?Object.getPrototypeOf(e):!1;return a===Object.prototype||a===null?M(e,t,i,o):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?me(e,e,t,i):"constructor"in e?e.constructor!==Object?ir(e,t,i,o):M(e,t,i,o):e===Object(e)?M(e,t,i,o):t.stylize(String(e),l)},"internalInspect"),Hr=$((e,t={})=>{const r={breakLength:Number.POSITIVE_INFINITY,customInspect:!0,depth:5,indent:void 0,maxArrayLength:Number.POSITIVE_INFINITY,numericSeparator:!0,quoteStyle:"single",showHidden:!1,showProxy:!1,stylize:$(n=>n.toString(),"stylize"),truncate:Number.POSITIVE_INFINITY,...t};if(r.indent!==void 0&&r.indent!==" "&&!(Number.parseInt(r.indent,10)===r.indent&&r.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `undefined`');return Ne(e,r,0,[])},"inspect");$((e,t)=>L.has(e)?!1:(L.set(e,t),!0),"registerConstructor");$((e,t)=>e in B?!1:(B[e]=t,!0),"registerStringTag");var Vr=Object.defineProperty,Gr=O((e,t)=>Vr(e,"name",{value:t,configurable:!0}),"t");const Kr={indent:2,quoteStyle:"single",stylize:Gr((e,t)=>{const r={bigint:G,boolean:G,date:Le,null:ne,number:G,regexp:Me,special:ze,string:Y,symbol:Y,undefined:_e};return r[t]===void 0?e:r[t](e)},"stylize")};var Rr=Object.defineProperty,Dr=O((e,t)=>Rr(e,"name",{value:t,configurable:!0}),"o");const Qr=Dr((e,t)=>{let r=t.uppercase.label?e.toUpperCase():e;return r=t.underline.label?Be(r):r,t.bold.label&&(r=ne(r)),r},"formatLabel");export{Ur as G,Hr as a,Qr as n,Kr as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var l=Object.defineProperty;var a=(e,t)=>l(e,"name",{value:t,configurable:!0});var g=Object.defineProperty,o=a((e,t)=>g(e,"name",{value:t,configurable:!0}),"g");const b=o(e=>{const t=Object.keys(e).map(n=>e[n].label??"");return t.length===0?"":t.reduce((n,r)=>n.length>r.length?n:r)},"getLongestLabel");export{b as s};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
var $e=Object.defineProperty;var g=(e,i)=>$e(e,"name",{value:i,configurable:!0});import{createRequire as Se}from"node:module";const We=Se(import.meta.url),y=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ee=g(e=>{if(typeof y<"u"&&y.versions&&y.versions.node){const[i,r]=y.versions.node.split(".").map(Number);if(i>22||i===22&&r>=3||i===20&&r>=16)return y.getBuiltinModule(e)}return We(e)},"__cjs_getBuiltinModule"),B=y,{execFileSync:ye}=ee("node:child_process"),T=ee("node:fs"),Be=ee("node:tty");var ke=Object.defineProperty,Ie=g((e,i)=>ke(e,"name",{value:i,configurable:!0}),"p$1"),Fe=Object.defineProperty,de=Ie((e,i)=>Fe(e,"name",{value:i,configurable:!0}),"R"),Oe=Object.defineProperty,je=de((e,i)=>Oe(e,"name",{value:i,configurable:!0}),"E");const he=String.raw,ae=he`\p{Emoji}(?:\p{EMod}|[\u{E0020}-\u{E007E}]+\u{E007F}|\uFE0F?\u20E3?)`,Ne=je(()=>new RegExp(he`\p{RI}{2}|(?)${ae}(?:\u200D${ae})*`,"gu"),"default");var Re=Object.defineProperty,Te=de((e,i)=>Re(e,"name",{value:i,configurable:!0}),"p");const k=new Set(["\x1B",""]),D="\x07",fe="[",ie="m",L="]8;;",_e=39,Ce=/[\u200B\uFEFF\u2060-\u2064]/g,Pe=new RegExp(`(?:\\${fe}(?<code>\\d+)m|\\${L}(?<uri>.*)${D})`),Me=Object.freeze(new Map([[0,0],[1,22],[2,22],[3,23],[4,24],[7,27],[8,28],[9,29],[30,39],[31,39],[32,39],[33,39],[34,39],[35,39],[36,39],[37,39],[40,49],[41,49],[42,49],[43,49],[44,49],[45,49],[46,49],[47,49],[90,39]])),I=/[\u001B\u009B](?:[[()#;?]{0,10}(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-ORZcf-nqry=><]|\]8;;[^\u0007\u001B]{0,100}(?:\u0007|\u001B\\))/g,_=/[\u0000-\u0008\n-\u001F\u007F-\u009F]{1,1000}/y,M=Ne();Te(e=>e.replace(M,""),"stripEmoji");var He=Object.defineProperty,x=g((e,i)=>He(e,"name",{value:i,configurable:!0}),"f$1"),qe=Object.defineProperty,b=x((e,i)=>qe(e,"name",{value:i,configurable:!0}),"c"),Le=Object.defineProperty,K=b((e,i)=>Le(e,"name",{value:i,configurable:!0}),"E$1");function F(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}g(F,"M$1");x(F,"M");b(F,"A");K(F,"isAmbiguous");function O(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}g(O,"A$1");x(O,"C");b(O,"D$1");K(O,"isFullWidth");function j(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||e===129736||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}g(j,"N$2");x(j,"T");b(j,"C");K(j,"isWide");function V(e){return F(e)?"ambiguous":O(e)?"fullwidth":e===8361||e>=65377&&e<=65470||e>=65474&&e<=65479||e>=65482&&e<=65487||e>=65490&&e<=65495||e>=65498&&e<=65500||e>=65512&&e<=65518?"halfwidth":e>=32&&e<=126||e===162||e===163||e===165||e===166||e===172||e===175||e>=10214&&e<=10221||e===10629||e===10630?"narrow":j(e)?"wide":"neutral"}g(V,"F");x(V,"R");b(V,"t");K(V,"getCategory");var De=Object.defineProperty,re=b((e,i)=>De(e,"name",{value:i,configurable:!0}),"e");function N(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}g(N,"j$1");x(N,"O");b(N,"r");re(N,"validate");function R(e){return N(e),V(e)}g(R,"y$2");x(R,"v");b(R,"eastAsianWidthType");re(R,"eastAsianWidthType");function ne(e,{ambiguousAsWide:i=!1}={}){return N(e),O(e)||j(e)||i&&F(e)?2:1}g(ne,"Y$1");x(ne,"J");b(ne,"eastAsianWidth");re(ne,"eastAsianWidth");var Ke=Object.defineProperty,z=b((e,i)=>Ke(e,"name",{value:i,configurable:!0}),"b");const ue=new Map,C=/(?:[\u0020-\u007E\u00A0-\u00FF](?!\uFE0F)){1,1000}/y,H=z(e=>e>=32&&e<=126?"latin":e===8203||e===8204||e===8205||e===8288?"zero":e<=31||e>=127&&e<=159?"control":e>=160&&e<=255||e>=9472&&e<=9599?"latin":e>=4352&&e<=4607||e>=11904&&e<=40959||e>=44032&&e<=55215||e>=63744&&e<=64255||e>=65280&&e<=65519&&!(e>=65377&&e<=65439)||e>=12352&&e<=12543?"wide":e===8230?"latin":"other","getCharType"),Ve=z((e,i)=>{const r=Math.floor(e/65536),s=e%65536;let l=ue.get(r);if(l||(l=new Map,ue.set(r,l)),l.has(s))return l.get(s);let u;if(H(e)==="latin")u=i.width.regular;else if(H(e)==="control")u=i.width.control;else if(H(e)==="wide")u=i.width.wide;else switch(R(e)){case"ambiguous":{u=i.width.ambiguousIsNarrow?i.width.regular:i.width.wide;break}case"fullwidth":{u=i.width.fullWidth;break}case"wide":{u=i.width.wide;break}default:u=i.width.regular}return l.set(s,u),u},"getCachedCharWidth"),ze=z(e=>e>=768&&e<=879||e>=6832&&e<=6911||e>=7616&&e<=7679||e>=8400&&e<=8447||e>=65056&&e<=65071||e>=917760&&e<=917999||e>=65024&&e<=65039||e>=3633&&e<=3642||e>=3655&&e<=3662||e>=3761&&e<=3769||e>=3771&&e<=3772||e>=3784&&e<=3789||e>=2304&&e<=2307||e>=2362&&e<=2383||e>=2385&&e<=2391||e>=2402&&e<=2403||e>=2433&&e<=2435||e>=2492&&e<=2500||e>=2509&&e<=2509||e>=2561&&e<=2563||e>=2620&&e<=2637||e>=1611&&e<=1631||e>=1648&&e<=1648||e>=1750&&e<=1773||e>=2276&&e<=2302||e>=1425&&e<=1469||e>=1471&&e<=1471||e>=1473&&e<=1474||e>=1476&&e<=1477||e>=1479&&e<=1479||e>=3893&&e<=3893||e>=3895&&e<=3895||e>=3897&&e<=3897||e>=3953&&e<=3966||e>=3968&&e<=3972||e>=3974&&e<=3975?!0:e>=768&&e<=777||e>=803&&e<=803,"isCombiningCharacter"),Q=z((e,i={})=>{if(!e||e.length===0)return{ellipsed:!1,index:0,truncated:!1,width:0};const r={truncation:{countAnsiEscapeCodes:i.countAnsiEscapeCodes??!1,ellipsis:i.ellipsis??"",ellipsisWidth:i.ellipsisWidth??(i.ellipsis?Q(i.ellipsis,{...i,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width:0),limit:i.limit??Number.POSITIVE_INFINITY},width:{ambiguousIsNarrow:i.ambiguousIsNarrow??!1,ansi:i.ansiWidth??0,control:i.controlWidth??0,emoji:i.emojiWidth??2,fullWidth:i.fullWidth??2,halfWidth:i.halfWidth??1,regular:i.regularWidth??1,tab:i.tabWidth??8,wide:i.wideWidth??2}},s=Math.max(0,r.truncation.limit-r.truncation.ellipsisWidth),{length:l}=e,u=l>1e4;let n=0,a=0,o=l,d=!1;const c=e.includes("\x1B")||e.includes("");for(;n<l;){if(c&&(e[n]==="\x1B"||e[n]==="")){if(e.startsWith("\x1B]8;;",n)){const t="\x1B]8;;\x07",A=t.length,G=e.indexOf("\x07",n+5);if(G!==-1){const U=e.indexOf(t,G+1);if(U!==-1){const xe=U+A,Ae=e.slice(G+1,U).replace(I,""),se=Q(Ae,{ambiguousIsNarrow:r.width.ambiguousIsNarrow,ansiWidth:r.width.ansi,controlWidth:r.width.control,countAnsiEscapeCodes:!1,ellipsis:r.truncation.ellipsis,ellipsisWidth:r.truncation.ellipsisWidth,emojiWidth:r.width.emoji,fullWidth:r.width.fullWidth,halfWidth:r.width.halfWidth,limit:Math.max(0,s-a),regularWidth:r.width.regular,tabWidth:r.width.tab,wideWidth:r.width.wide}),Y=se.width;if(se.truncated)d=!0,o=Math.min(o,n);else if(a+Y>s&&(o=Math.min(o,n),d=!0,a+Y>r.truncation.limit))break;if(a+=Y,n=xe,d&&a>=r.truncation.limit)break;continue}}}if(I.lastIndex=n,I.test(e)){const t=I.lastIndex-n,A=r.truncation.countAnsiEscapeCodes?t:r.width.ansi;if(a+A>s&&(o=Math.min(o,n),a+A>r.truncation.limit)){d=!0;break}a+=A,n=I.lastIndex;continue}}const f=e.codePointAt(n);if(f===8203||f===65279||f>=8288&&f<=8292){n+=1;continue}if(f===9){if(a+r.width.tab>s&&(o=Math.min(o,n),a+r.width.tab>r.truncation.limit)){d=!0;break}a+=r.width.tab,n+=1;continue}if(C.lastIndex=n,C.test(e)){const t=(C.lastIndex-n)*r.width.regular;if(a+t>s){const A=Math.floor((s-a)/r.width.regular);if(o=Math.min(o,n+A),a+t>r.truncation.limit){d=!0;break}}a+=t,n=C.lastIndex;continue}if((f<=31||f>=127&&f<=159)&&(_.lastIndex=n,_.test(e))){const t=(_.lastIndex-n)*r.width.control;if(a+t>s&&(o=Math.min(o,n+Math.floor((s-a)/r.width.control)),a+t>r.truncation.limit)){d=!0;break}a+=t,n=_.lastIndex;continue}if(M.lastIndex=n,M.test(e)){if(a+r.width.emoji>s&&(o=Math.min(o,n),a+r.width.emoji>r.truncation.limit)){d=!0;break}a+=r.width.emoji,n=M.lastIndex;continue}const m=e.codePointAt(n)??0;if(ze(m)){n+=m>65535?2:1;continue}let p;if(u)p=Ve(m,r);else switch(H(m)){case"control":{p=r.width.control;break}case"latin":{p=r.width.regular;break}case"wide":{p=r.width.wide;break}case"zero":{p=0;break}default:switch(R(m)){case"ambiguous":{p=r.width.ambiguousIsNarrow?r.width.regular:r.width.wide;break}case"fullwidth":{p=r.width.fullWidth;break}case"wide":{p=r.width.wide;break}default:p=r.width.regular}}if(a+p>s&&(o=Math.min(o,n),a+p>r.truncation.limit)){d=!0;break}a+=p,n+=m>65535?2:1}let h=a,w=!1;return d&&r.truncation.limit>=r.truncation.ellipsisWidth&&(h=r.truncation.limit,w=!0),{ellipsed:w,index:d?o:l,truncated:d,width:h}},"getStringTruncatedWidth");var Ge=Object.defineProperty,Ue=g((e,i)=>Ge(e,"name",{value:i,configurable:!0}),"i$1"),Ye=Object.defineProperty,Je=Ue((e,i)=>Ye(e,"name",{value:i,configurable:!0}),"e"),Ze=Object.defineProperty,Qe=Je((e,i)=>Ze(e,"name",{value:i,configurable:!0}),"r");const v=Qe((e,i={})=>Q(e,{...i,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width,"getStringWidth");var Xe=Object.defineProperty,pe=g((e,i)=>Xe(e,"name",{value:i,configurable:!0}),"x"),ei=Object.defineProperty,S=pe((e,i)=>ei(e,"name",{value:i,configurable:!0}),"m"),ii=Object.defineProperty,ri=S((e,i)=>ii(e,"name",{value:i,configurable:!0}),"n");class me{static{g(this,"T")}static{pe(this,"w")}static{S(this,"u")}static{ri(this,"AnsiStateTracker")}activeForeground=null;activeBackground=null;activeFormatting=[];processEscape(i){const r=/\x1B\[(\d+)m/.exec(i);if(!r)return;const s=Number.parseInt(r[1],10);switch(s){case 0:{this.activeForeground=null,this.activeBackground=null,this.activeFormatting=[];break}case 39:{this.activeForeground=null;break}case 49:{this.activeBackground=null;break}default:if(s>=30&&s<=37||s>=90&&s<=97)this.activeForeground=i;else if(s>=40&&s<=47||s>=100&&s<=107)this.activeBackground=i;else if([1,2,3,4,7,8,9].includes(s))this.activeFormatting.push(i);else if([22,23,24,27,28,29].includes(s)){const l={22:"[1m",23:"[3m",24:"[4m",27:"[7m",28:"[8m",29:"[9m"}[s];l&&(this.activeFormatting=this.activeFormatting.filter(u=>!u.includes(l)))}}}getStartEscapesForAllActiveAttributes(){return[this.activeBackground,this.activeForeground,...this.activeFormatting].filter(Boolean).join("")}getEndEscapesForAllActiveAttributes(){const i=[];if(this.activeFormatting.length>0){const r={"\x1B[1m":"\x1B[22m","\x1B[2m":"\x1B[22m","\x1B[3m":"\x1B[23m","\x1B[4m":"\x1B[24m","\x1B[7m":"\x1B[27m","\x1B[8m":"\x1B[28m","\x1B[9m":"\x1B[29m"};[...this.activeFormatting].reverse().forEach(s=>{const l=r[s];l&&i.push(l)})}return this.activeForeground&&i.push("\x1B[39m"),this.activeBackground&&i.push("\x1B[49m"),i.join("")}}var ni=Object.defineProperty,ge=S((e,i)=>ni(e,"name",{value:i,configurable:!0}),"o");const te=ge((e,i)=>{if(!k.has(e[i]))return{isInsideEscape:!1,isInsideLinkEscape:!1};const r=!0,s=e.slice(i+1,i+1+L.length).join("")===L;return{isInsideEscape:r,isInsideLinkEscape:s}},"checkEscapeSequence"),si=ge((e,i={})=>{const r=new me;let s="",l=!1,u=!1,n="",a="",o=!1;const d=[...e];for(let c=0;c<d.length;c++){const h=d[c];if(h&&k.has(h)){if(s){const m=i.getWidth?.(s)??0,p={isEscapeSequence:!1,isGrapheme:!0,text:s,width:m};if(o&&(p.isHyperlink=!0,p.hyperlinkUrl=a),i.onSegment?.(p,r)===!1)return;s=""}if(l=!0,n=h,u=te(d,c).isInsideLinkEscape,u){let m=c+1;for(a="";m<d.length;){const t=d[m];if(t===D)break;a+=t,m+=1}a=a.slice(4);const p={hyperlinkUrl:a,isEscapeSequence:!0,isGrapheme:!1,isHyperlink:!0,isHyperlinkStart:!0,width:0};if(i.onSegment?.(p,r)===!1)return;c=m,o=!0,l=!1,u=!1,n="";continue}if(c+1<d.length&&d[c+1]==="\\"&&o){const m={isEscapeSequence:!0,isGrapheme:!1,isHyperlink:!0,isHyperlinkEnd:!0,width:0};if(i.onSegment?.(m,r)===!1)return;o=!1,a="",c+=1,l=!1,n="";continue}}if(l){if(n!==h&&(n+=h),h===ie){l=!1,r.processEscape(n);const m={isEscapeSequence:!0,isGrapheme:!1,text:n,width:0};if(i.onSegment?.(m,r)===!1)return;n=""}continue}s+=h;const w=i.getWidth?.(s)??0,f={isEscapeSequence:!1,isGrapheme:!0,text:s,width:w};if(o&&(f.isHyperlink=!0,f.hyperlinkUrl=a),i.onSegment?.(f,r)===!1)return;s=""}if(s){const c=i.getWidth?.(s)??0,h={isEscapeSequence:!1,isGrapheme:!0,text:s,width:c};o&&(h.isHyperlink=!0,h.hyperlinkUrl=a),i.onSegment?.(h,r)}if(n){const c={isEscapeSequence:!0,isGrapheme:!1,text:n,width:0};i.onSegment?.(c,r)}},"processAnsiString");var ai=Object.defineProperty,ui=S((e,i)=>ai(e,"name",{value:i,configurable:!0}),"t$1");const oe=ui(e=>`${k.values().next().value}${fe}${e}${ie}`,"wrapAnsiCode");var oi=Object.defineProperty,li=S((e,i)=>oi(e,"name",{value:i,configurable:!0}),"t");const le=li(e=>`${k.values().next().value}${L}${e}${D}`,"wrapAnsiHyperlink");var ci=Object.defineProperty,di=S((e,i)=>ci(e,"name",{value:i,configurable:!0}),"l");const hi=di(e=>{if(e.length===0)return"";if(e.length===1)return e[0];let i="",r,s;const l=e.join(`
|
|
2
|
-
`),u=[...l];let n=0;for(const[a,o]of u.entries()){if(i+=o,k.has(o)){const c=Pe.exec(l.slice(n))?.groups??{};if(c.code!==void 0){const h=Number.parseFloat(c.code);r=h===_e?void 0:h}else c.uri!==void 0&&(s=c.uri.length===0?void 0:c.uri)}const d=Me.get(Number(r));u[a+1]===`
|
|
3
|
-
`?(s&&(i+=le("")),r&&d&&(i+=oe(d))):o===`
|
|
4
|
-
`&&(r&&d&&(i+=oe(r)),s&&(i+=le(s))),n+=o.length}return i},"preserveAnsi");var fi=Object.defineProperty,E=S((e,i)=>fi(e,"name",{value:i,configurable:!0}),"h");const J=E(e=>{if(!e.includes("\x1B"))return e;let i=e;return e.includes("\x1B[30m")&&(i+="\x1B[39m"),e.includes("\x1B[42m")&&(i+="\x1B[49m"),i},"resetAnsiAtLineBreak"),$=E(e=>{const i=e.split(" ");let r=i.length;for(;r>0&&v(i[r-1])===0;)r--;return r===i.length?e:i.slice(0,r).join(" ")+i.slice(r).join("")},"stringVisibleTrimSpacesRight"),we=E((e,i,r)=>{if(e.length===0)return[""];if(i<=0)return[e];const s=[],l=new me;let u="",n=0,a=!1,o=!1,d="";for(let c=0;c<e.length;c++){const h=e[c];if(k.has(h)){a=!0,d=h,u+=h,o=te([...e],c).isInsideLinkEscape;continue}if(a){d+=h,u+=h,o?h===D&&(a=o=!1):h===ie&&(a=!1,l.processEscape(d));continue}const w=v(h),f=h===" ";if(w===0){u+=h;continue}if(n+w>i&&(u&&s.push(u+l.getEndEscapesForAllActiveAttributes()),u=l.getStartEscapesForAllActiveAttributes(),n=v(u),f&&r)){for(;c<e.length&&e[c]===" "&&(c+=1,!(c>=e.length)););c<e.length&&c--;continue}if(u+=h,n+=w,n===i&&c<e.length-1&&(s.push(u+l.getEndEscapesForAllActiveAttributes()),u=l.getStartEscapesForAllActiveAttributes(),n=v(u),c+1<e.length&&e[c+1]===" "&&r)){for(c+=1;c<e.length&&e[c]===" ";)c+=1;c--}}return u&&s.push(u+l.getEndEscapesForAllActiveAttributes()),r?s.map(c=>$(c)):s},"wrapWithBreakAtWidth"),pi=E((e,i,r)=>{if(e.length===0)return[];const s=r?e.trim():e;if(s.length===0)return[];const l=[];let u="",n=0;return si(s,{getWidth:v,onSegment:E((a,o)=>{if(a.isEscapeSequence)u+=a.text;else{const d=a.text===" ";if(a.width===0)return u+=a.text,!0;if(n+a.width>i&&(u&&l.push(u),u=o.getStartEscapesForAllActiveAttributes(),n=0,d))return r||l.push(o.getStartEscapesForAllActiveAttributes()+a.text),!0;u+=a.text,n+=a.width}return!0},"onSegment")}),u&&l.push(u),r?l.map(a=>$(a)):l},"wrapCharByChar"),mi=E((e,i,r)=>{if(e.length===0)return[];const s=r?e.trim():e;if(s.length===0)return[];const l=s.split(/(?=\s)|(?<=\s)/),u=[];let n="",a=0,o=0;for(;o<l.length;){const d=l[o],c=/^\s+$/.test(d),h=v(d);if(d.length===0){o+=1;continue}if(r&&c&&a===0){o+=1;continue}if(a+h>i&&a>0){r?u.push($(n)):u.push(n),n="",a=0;continue}n+=d,a+=h,o+=1}return n&&(r?u.push($(n)):u.push(n)),u},"wrapWithWordBoundaries"),gi=E((e,i,r)=>{if(e.length===0)return[];const s=r?e.trim():e;if(s.length===0)return[];const l=s.split(/(?=\s)|(?<=\s)/),u=[];let n="",a=0,o=0;for(;o<l.length;){const d=l[o],c=/^\s+$/.test(d),h=v(d);if(d.length===0){o+=1;continue}if(r&&c&&a===0){o+=1;continue}if(h>i){n&&u.push(J(r?$(n):n));const w=we(d,i,r);if(w.length>0){for(let f=0;f<w.length-1;f++)u.push(w[f]);n=w[w.length-1],a=v(n)}else n="",a=0;o+=1;continue}if(a+h>i&&a>0&&(u.push(J(r?$(n):n)),n="",a=0,r&&c)){o+=1;continue}n+=d,a+=h,o+=1}return n&&u.push(J(r?$(n):n)),u},"wrapAndBreakWords"),P={BREAK_AT_CHARACTERS:"BREAK_AT_CHARACTERS",BREAK_WORDS:"BREAK_WORDS",PRESERVE_WORDS:"PRESERVE_WORDS",STRICT_WIDTH:"STRICT_WIDTH"},xi=E((e,i={})=>{const{removeZeroWidthCharacters:r=!0,trim:s=!0,width:l=80,wrapMode:u=P.PRESERVE_WORDS}=i;if(s&&e.trim()==="")return"";let n=String(e).normalize("NFC").replaceAll(`\r
|
|
5
|
-
`,`
|
|
6
|
-
`);return r&&(n=n.replaceAll(Ce,"")),n.split(`
|
|
7
|
-
`).map(a=>{if(s&&a.trim()==="")return"";let o;switch(u){case P.BREAK_AT_CHARACTERS:{o=pi(a,l,s);break}case P.BREAK_WORDS:{o=gi(a,l,s);break}case P.STRICT_WIDTH:{o=we(a,l,s);break}default:o=mi(a,l,s)}return hi(o)}).join(`
|
|
8
|
-
`)},"wordWrap");var ti=Object.defineProperty,W=g((e,i)=>ti(e,"name",{value:i,configurable:!0}),"e");const be=80,ve=24,X=W((e,i,{shell:r,env:s}={})=>ye(e,i,{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:500,shell:r,env:s}).trim(),"exec"),q=W((e,i)=>({columns:Number.parseInt(e,10),rows:Number.parseInt(i,10)}),"create"),Ee=W((e,i)=>{const{columns:r,rows:s}=q(e,i);if(!(Number.isNaN(r)||Number.isNaN(s))&&!(r===be&&s===ve))return{columns:r,rows:s}},"createIfNotDefault");function wi(){const{env:e,stdout:i,stderr:r}=B;if(i?.columns&&i?.rows)return q(i.columns,i.rows);if(r?.columns&&r?.rows)return q(r.columns,r.rows);if(e.COLUMNS&&e.LINES)return q(e.COLUMNS,e.LINES);const s={columns:be,rows:ve};return B.platform==="win32"?Z()??s:B.platform==="darwin"?ce()??Z()??s:ce()??Z()??bi()??s}g(wi,"O");W(wi,"terminalSize");const ce=W(()=>{try{const e=B.platform==="darwin"?T.constants.O_EVTONLY|T.constants.O_NONBLOCK:T.constants.O_NONBLOCK,{columns:i,rows:r}=Be.WriteStream(T.openSync("/dev/tty",e));return{columns:i,rows:r}}catch{}},"devTty"),Z=W(()=>{try{const e=X("tput",["cols"],{env:{TERM:"dumb",...B.env}}),i=X("tput",["lines"],{env:{TERM:"dumb",...B.env}});if(e&&i)return Ee(e,i)}catch{}},"tput"),bi=W(()=>{try{const e=X("resize",["-u"]).match(/\d+/g);if(e.length===2)return Ee(e[0],e[1])}catch{}},"resize");export{P as B,wi as O,xi as i,v as o};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var v=Object.defineProperty;var x=(e,r)=>v(e,"name",{value:r,configurable:!0});var A=Object.defineProperty,D=x((e,r)=>A(e,"name",{value:r,configurable:!0}),"x"),C=Object.defineProperty,B=D((e,r)=>C(e,"name",{value:r,configurable:!0}),"h"),M=Object.defineProperty,m=B((e,r)=>M(e,"name",{value:r,configurable:!0}),"m$1");const y=new Map([["aliceblue","#f0f8ff"],["antiquewhite","#faebd7"],["aqua","#00ffff"],["aquamarine","#7fffd4"],["azure","#f0ffff"],["beige","#f5f5dc"],["bisque","#ffe4c4"],["black","#000000"],["blanchedalmond","#ffebcd"],["blue","#0000ff"],["blueviolet","#8a2be2"],["brown","#a52a2a"],["burlywood","#deb887"],["cadetblue","#5f9ea0"],["chartreuse","#7fff00"],["chocolate","#d2691e"],["coral","#ff7f50"],["cornflowerblue","#6495ed"],["cornsilk","#fff8dc"],["crimson","#dc143c"],["cyan","#00ffff"],["darkblue","#00008b"],["darkcyan","#008b8b"],["darkgoldenrod","#b8860b"],["darkgray","#a9a9a9"],["darkgreen","#006400"],["darkgrey","#a9a9a9"],["darkkhaki","#bdb76b"],["darkmagenta","#8b008b"],["darkolivegreen","#556b2f"],["darkorange","#ff8c00"],["darkorchid","#9932cc"],["darkred","#8b0000"],["darksalmon","#e9967a"],["darkseagreen","#8fbc8f"],["darkslateblue","#483d8b"],["darkslategray","#2f4f4f"],["darkslategrey","#2f4f4f"],["darkturquoise","#00ced1"],["darkviolet","#9400d3"],["deeppink","#ff1493"],["deepskyblue","#00bfff"],["dimgray","#696969"],["dimgrey","#696969"],["dodgerblue","#1e90ff"],["firebrick","#b22222"],["floralwhite","#fffaf0"],["forestgreen","#228b22"],["fuchsia","#ff00ff"],["gainsboro","#dcdcdc"],["ghostwhite","#f8f8ff"],["gold","#ffd700"],["goldenrod","#daa520"],["gray","#808080"],["green","#008000"],["greenyellow","#adff2f"],["grey","#808080"],["honeydew","#f0fff0"],["hotpink","#ff69b4"],["indianred","#cd5c5c"],["indigo","#4b0082"],["ivory","#fffff0"],["khaki","#f0e68c"],["lavender","#e6e6fa"],["lavenderblush","#fff0f5"],["lawngreen","#7cfc00"],["lemonchiffon","#fffacd"],["lightblue","#add8e6"],["lightcoral","#f08080"],["lightcyan","#e0ffff"],["lightgoldenrodyellow","#fafad2"],["lightgray","#d3d3d3"],["lightgreen","#90ee90"],["lightgrey","#d3d3d3"],["lightpink","#ffb6c1"],["lightsalmon","#ffa07a"],["lightseagreen","#20b2aa"],["lightskyblue","#87cefa"],["lightslategray","#778899"],["lightslategrey","#778899"],["lightsteelblue","#b0c4de"],["lightyellow","#ffffe0"],["lime","#00ff00"],["limegreen","#32cd32"],["linen","#faf0e6"],["magenta","#ff00ff"],["maroon","#800000"],["mediumaquamarine","#66cdaa"],["mediumblue","#0000cd"],["mediumorchid","#ba55d3"],["mediumpurple","#9370db"],["mediumseagreen","#3cb371"],["mediumslateblue","#7b68ee"],["mediumspringgreen","#00fa9a"],["mediumturquoise","#48d1cc"],["mediumvioletred","#c71585"],["midnightblue","#191970"],["mintcream","#f5fffa"],["mistyrose","#ffe4e1"],["moccasin","#ffe4b5"],["navajowhite","#ffdead"],["navy","#000080"],["oldlace","#fdf5e6"],["olive","#808000"],["olivedrab","#6b8e23"],["orange","#ffa500"],["orangered","#ff4500"],["orchid","#da70d6"],["palegoldenrod","#eee8aa"],["palegreen","#98fb98"],["paleturquoise","#afeeee"],["palevioletred","#db7093"],["papayawhip","#ffefd5"],["peachpuff","#ffdab9"],["peru","#cd853f"],["pink","#ffc0cb"],["plum","#dda0dd"],["powderblue","#b0e0e6"],["purple","#800080"],["rebeccapurple","#663399"],["red","#ff0000"],["rosybrown","#bc8f8f"],["royalblue","#4169e1"],["saddlebrown","#8b4513"],["salmon","#fa8072"],["sandybrown","#f4a460"],["seagreen","#2e8b57"],["seashell","#fff5ee"],["sienna","#a0522d"],["silver","#c0c0c0"],["skyblue","#87ceeb"],["slateblue","#6a5acd"],["slategray","#708090"],["slategrey","#708090"],["snow","#fffafa"],["springgreen","#00ff7f"],["steelblue","#4682b4"],["tan","#d2b48c"],["teal","#008080"],["thistle","#d8bfd8"],["tomato","#ff6347"],["turquoise","#40e0d0"],["violet","#ee82ee"],["wheat","#f5deb3"],["white","#ffffff"],["whitesmoke","#f5f5f5"],["yellow","#ffff00"],["yellowgreen","#9acd32"]]),P=/^#([\dA-F]{2})([\dA-F]{2})([\dA-F]{2})([\dA-F]{2})?$/i,N=/^#([\dA-F])([\dA-F])([\dA-F])([\dA-F])?$/i,L=/^rgba?\(\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*(,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*)?\)$/,j=/^hsla?\(\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))%\s*,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))%\s*(,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*)?\)$/,$=m(()=>({__proto__:null,backgroundColor:null,color:null,fontStyle:null,fontWeight:null,textDecorationColor:null,textDecorationLine:[]}),"getDefaultCss"),p=/\s+/g,g=m(e=>{y.has(e)&&(e=y.get(e));const r=P.exec(e);if(r)return[Number.parseInt(r[1],16),Number.parseInt(r[2],16),Number.parseInt(r[3],16)];const t=N.exec(e);if(t)return[Number.parseInt(`${t[1]}${t[1]}`,16),Number.parseInt(`${t[2]}${t[2]}`,16),Number.parseInt(`${t[3]}${t[3]}`,16)];const f=L.exec(e);if(f)return[Math.round(Math.max(0,Math.min(255,Number(f[1])))),Math.round(Math.max(0,Math.min(255,Number(f[2])))),Math.round(Math.max(0,Math.min(255,Number(f[3]))))];const i=j.exec(e);if(i){let o=Number(i[1])%360;o<0&&(o+=360);const l=Math.max(0,Math.min(100,Number(i[2])))/100,n=Math.max(0,Math.min(100,Number(i[3])))/100,c=(1-Math.abs(2*n-1))*l,u=c*(1-Math.abs(o/60%2-1)),a=n-c/2;let s,d,b;return o<60?{0:s,1:d,2:b}=[c,u,0]:o<120?{0:s,1:d,2:b}=[u,c,0]:o<180?{0:s,1:d,2:b}=[0,c,u]:o<240?{0:s,1:d,2:b}=[0,u,c]:o<300?{0:s,1:d,2:b}=[u,0,c]:{0:s,1:d,2:b}=[c,0,u],[Math.round((s+a)*255),Math.round((d+a)*255),Math.round((b+a)*255)]}return null},"parseCssColor"),h=m((e,r)=>e?.[0]===r?.[0]&&e?.[1]===r?.[1]&&e?.[2]===r?.[2],"colorEquals"),F=m(e=>{const r=$(),t=[];let f=!1,i=null,o=0,l="";for(const n of e){if(n==="(")o++;else if(o>0)n===")"&&o--;else if(f){if(n===";"){const c=l.trim();c!==""&&t.push([i,c]),i=null,l="",f=!1;continue}}else if(n===":"){i=l.trim(),l="",f=!0;continue}l+=n}if(f&&o===0){const n=l.trim();n!==""&&t.push([i,n]),i=null,l=""}for(const{0:n,1:c}of t)switch(n){case"background-color":{c!=null&&(r.backgroundColor=c);break}case"color":{c!=null&&(r.color=c);break}case"font-style":{["italic","oblique","oblique 14deg"].includes(c)&&(r.fontStyle="italic");break}case"font-weight":{c==="bold"&&(r.fontWeight=c);break}case"text-decoration":{r.textDecorationColor=null,r.textDecorationLine=[];const u=c.split(p);for(const a of u){const s=g(a);s!=null?r.textDecorationColor=s:["line-through","overline","underline"].includes(a)&&r.textDecorationLine.push(a)}break}case"text-decoration-color":{const u=g(c);u!=null&&(r.textDecorationColor=u);break}case"text-decoration-line":{r.textDecorationLine=[];const u=c.split(p);for(const a of u)["line-through","overline","underline"].includes(a)&&r.textDecorationLine.push(a);break}}return r},"parseCss"),q=m((e,r=null)=>{r=r??$();let t="";if(!h(e.backgroundColor,r.backgroundColor))if(e.backgroundColor==null)t+="\x1B[49m";else switch(e.backgroundColor){case"black":{t+="\x1B[40m";break}case"blue":{t+="\x1B[44m";break}case"cyan":{t+="\x1B[46m";break}case"green":{t+="\x1B[42m";break}case"magenta":{t+="\x1B[45m";break}case"red":{t+="\x1B[41m";break}case"white":{t+="\x1B[47m";break}case"yellow":{t+="\x1B[43m";break}default:if(Array.isArray(e.backgroundColor)){const{0:f,1:i,2:o}=e.backgroundColor;t+=`\x1B[48;2;${f};${i};${o}m`}else{const f=g(e.backgroundColor);if(f===null)t+="\x1B[49m";else{const{0:i,1:o,2:l}=f;t+=`\x1B[48;2;${i};${o};${l}m`}}}if(!h(e.color,r.color))if(e.color==null)t+="\x1B[39m";else switch(e.color){case"black":{t+="\x1B[30m";break}case"blue":{t+="\x1B[34m";break}case"cyan":{t+="\x1B[36m";break}case"green":{t+="\x1B[32m";break}case"magenta":{t+="\x1B[35m";break}case"red":{t+="\x1B[31m";break}case"white":{t+="\x1B[37m";break}case"yellow":{t+="\x1B[33m";break}default:if(Array.isArray(e.color)){const{0:f,1:i,2:o}=e.color;t+=`\x1B[38;2;${f};${i};${o}m`}else{const f=g(e.color);if(f===null)t+="\x1B[39m";else{const{0:i,1:o,2:l}=f;t+=`\x1B[38;2;${i};${o};${l}m`}}}if(e.fontWeight!==r.fontWeight&&(t+=e.fontWeight==="bold"?"\x1B[1m":"\x1B[22m"),e.fontStyle!==r.fontStyle&&(t+=e.fontStyle==="italic"?"\x1B[3m":"\x1B[23m"),!h(e.textDecorationColor,r.textDecorationColor))if(e.textDecorationColor==null)t+="\x1B[59m";else{const{0:f,1:i,2:o}=e.textDecorationColor;t+=`\x1B[58;2;${f};${i};${o}m`}return e.textDecorationLine.includes("line-through")!==r.textDecorationLine.includes("line-through")&&(t+=e.textDecorationLine.includes("line-through")?"\x1B[9m":"\x1B[29m"),e.textDecorationLine.includes("overline")!==r.textDecorationLine.includes("overline")&&(t+=e.textDecorationLine.includes("overline")?"\x1B[53m":"\x1B[55m"),e.textDecorationLine.includes("underline")!==r.textDecorationLine.includes("underline")&&(t+=e.textDecorationLine.includes("underline")?"\x1B[4m":"\x1B[24m"),t},"cssToAnsi");var S=Object.defineProperty,k=B((e,r)=>S(e,"name",{value:r,configurable:!0}),"y");const E=k(e=>{try{return JSON.stringify(e)}catch{return'"[Circular]"'}},"tryStringify"),w="%".codePointAt(0),O="s".codePointAt(0),I="d".codePointAt(0),W="f".codePointAt(0),T="i".codePointAt(0),_="O".codePointAt(0),z="o".codePointAt(0),J="j".codePointAt(0),G="c".codePointAt(0),H=k((e,r=[],t={})=>{if(typeof e!="string"&&typeof e!="object"||e===null)throw new TypeError(`fmt must be a string or object, got ${e===null?"null":typeof e}`);const f=t.stringify??E,i=1;if(typeof e=="object"){const a=r.length+i;if(a===1)return"{}";const s=Array.from({length:a});s[0]=f(e);for(let d=1;d<a;d++)s[d]=f(r[d-i]);return s.join(" ")}if(r.length===0)return e;let o="",l=1-i,n=-1,c=!1,u=null;for(let a=0;a<e.length;){if(e.codePointAt(a)===w&&a+1<e.length){n=n>-1?n:0;const s=e.codePointAt(a+1);if(s===void 0){++l;break}switch(s){case G:{if(globalThis.window===void 0){const d=F(r[l]);n<a&&(o+=e.slice(n,a)),o+=q(d,u),o!==""&&(c=!0,u=d)}n=a+2,a++;break}case I:case W:{if(l>=r.length||r[l]==null)break;n<a&&(o+=e.slice(n,a)),o+=Number(r[l]).toString(),n=a+2,a++;break}case T:{if(l>=r.length||r[l]==null)break;n<a&&(o+=e.slice(n,a)),o+=Math.floor(Number(r[l])).toString(),n=a+2,a++;break}case J:case _:case z:{if(l>=r.length||r[l]===void 0)break;n<a&&(o+=e.slice(n,a));const d=r[l],b=typeof d;if(b==="string"){o+=`'${d}'`,n=a+2;break}if(b==="function"){o+=d.name?`[Function: ${d.name}]`:"[Function: <anonymous>]",n=a+2;break}o+=f(d),n=a+2,a++;break}case w:{n<a&&(o+=e.slice(n,a)),o+="%",n=a+2,a++,l--;break}case O:{if(l>=r.length)break;n<a&&(o+=e.slice(n,a)),o+=typeof r[l]=="object"?f(r[l]):String(r[l]),n=a+2,a++;break}default:typeof t.formatters?.[s]=="function"&&(n<a&&(o+=e.slice(n,a)),o+=t.formatters[s](r[l]),n=a+2,a++)}++l}++a}return n===-1?e:(n<e.length&&(o+=e.slice(n)),c&&(o+="\x1B[0m"),o)},"format"),Q=k((e={})=>{const r={};return typeof e.formatters=="object"&&Object.entries(e.formatters).forEach(([t,f])=>{if(t.length===0)throw new Error(`Formatter %${t} has no characters`);if(t.length>1)throw new Error(`Formatter %${t} has more than one character`);if(typeof f!="function")throw new TypeError(`Formatter for %${t} is not a function`);const i=t.codePointAt(0);if(i===void 0)throw new Error(`${t}.codePointAt(0) failed to return a value, please report this issue`);r[i]=f}),(t,f=[],i={})=>H(t,f,{...i,formatters:r})},"build");export{Q as G,H as v};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var u=Object.defineProperty;var s=(t,e)=>u(t,"name",{value:e,configurable:!0});import{createRequire as f}from"node:module";const h=f(import.meta.url),i=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,l=s(t=>{if(typeof i<"u"&&i.versions&&i.versions.node){const[e,r]=i.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return i.getBuiltinModule(t)}return h(t)},"__cjs_getBuiltinModule"),{StringDecoder:p}=l("node:string_decoder");var d=Object.defineProperty,c=s((t,e)=>d(t,"name",{value:e,configurable:!0}),"t$1");const n="\x1B[2J",w="\x1B[2K",m=c((t=1)=>`${"\x1B["+t}A`,"cursorUp"),j=process.platform==="win32"?`${n}\x1B[0f`:`${n}\x1B[3J\x1B[H`,g="\x1B[?25l",v="\x1B[?25h",B=c(t=>{let e="";for(let r=0;r<t;r++)e+=w+(r<t-1?m():"");return t&&(e+="\x1B[G"),e},"eraseLines");var _=Object.defineProperty,x=s((t,e)=>_(t,"name",{value:e,configurable:!0}),"s");class a{static{s(this,"t")}static{x(this,"InteractiveStreamHook")}static DRAIN=!0;#s=new p;#e=[];#r;#t;constructor(e){this.#r=e.write,this.#t=e}active(){this.write(g),this.#t.write=(e,...r)=>{const o=r.at(-1);return this.#e.push(this.#s.write(typeof e=="string"?Buffer.from(e,typeof r[0]=="string"?r[0]:void 0):Buffer.from(e))),typeof o=="function"&&o(),a.DRAIN}}erase(e){e>0&&this.write(B(e+1))}inactive(e=!1){this.#e.length>0&&(e&&this.write(`
|
|
2
|
-
`),this.#e.forEach(r=>{this.write(r)}),this.#e=[]),this.renew()}renew(){this.#t.write=this.#r,this.write(v)}write(e){this.#r.apply(this.#t,[e])}}export{j as c,a as t};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
var re=Object.defineProperty;var y=(d,e)=>re(d,"name",{value:e,configurable:!0});import{L as ie,a as se,E as oe}from"./constants-DKfCaSUR.js";import{t as ne}from"./write-console-log-based-on-level-BP95fgQZ.js";import{s as le}from"./get-longest-label-B0NrI-o2.js";function ae(d){return d&&d.__esModule&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d}y(ae,"getDefaultExportFromCjs");var Q={exports:{}},te;function ue(){return te||(te=1,(function(d,e){var n=Object.defineProperty,i=y((r,s)=>n(r,"name",{value:s,configurable:!0}),"$");const{hasOwnProperty:a}=Object.prototype,b=z();b.configure=z,b.stringify=b,b.default=b,e.stringify=b,e.configure=z,d.exports=b;const C=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function L(r){return r.length<5e3&&!C.test(r)?`"${r}"`:JSON.stringify(r)}y(L,"strEscape"),i(L,"strEscape");function N(r,s){if(r.length>200||s)return r.sort(s);for(let g=1;g<r.length;g++){const E=r[g];let T=g;for(;T!==0&&r[T-1]>E;)r[T]=r[T-1],T--;r[T]=E}return r}y(N,"sort"),i(N,"sort");const P=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function _(r){return P.call(r)!==void 0&&r.length!==0}y(_,"isTypedArrayWithEntries"),i(_,"isTypedArrayWithEntries");function G(r,s,g){r.length<g&&(g=r.length);const E=s===","?"":" ";let T=`"0":${E}${r[0]}`;for(let D=1;D<g;D++)T+=`${s}"${D}":${E}${r[D]}`;return T}y(G,"stringifyTypedArray"),i(G,"stringifyTypedArray");function W(r){if(a.call(r,"circularValue")){const s=r.circularValue;if(typeof s=="string")return`"${s}"`;if(s==null)return s;if(s===Error||s===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}y(W,"getCircularValueOption"),i(W,"getCircularValueOption");function K(r){let s;if(a.call(r,"deterministic")&&(s=r.deterministic,typeof s!="boolean"&&typeof s!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return s===void 0?!0:s}y(K,"getDeterministicOption"),i(K,"getDeterministicOption");function X(r,s){let g;if(a.call(r,s)&&(g=r[s],typeof g!="boolean"))throw new TypeError(`The "${s}" argument must be of type boolean`);return g===void 0?!0:g}y(X,"getBooleanOption"),i(X,"getBooleanOption");function Y(r,s){let g;if(a.call(r,s)){if(g=r[s],typeof g!="number")throw new TypeError(`The "${s}" argument must be of type number`);if(!Number.isInteger(g))throw new TypeError(`The "${s}" argument must be an integer`);if(g<1)throw new RangeError(`The "${s}" argument must be >= 1`)}return g===void 0?1/0:g}y(Y,"getPositiveIntegerOption"),i(Y,"getPositiveIntegerOption");function q(r){return r===1?"1 item":`${r} items`}y(q,"getItemCount"),i(q,"getItemCount");function H(r){const s=new Set;for(const g of r)(typeof g=="string"||typeof g=="number")&&s.add(String(g));return s}y(H,"getUniqueReplacerSet"),i(H,"getUniqueReplacerSet");function Z(r){if(a.call(r,"strict")){const s=r.strict;if(typeof s!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(s)return g=>{let E=`Object can not safely be stringified. Received type ${typeof g}`;throw typeof g!="function"&&(E+=` (${g.toString()})`),new Error(E)}}}y(Z,"getStrictOption"),i(Z,"getStrictOption");function z(r){r={...r};const s=Z(r);s&&(r.bigint===void 0&&(r.bigint=!1),"circularValue"in r||(r.circularValue=Error));const g=W(r),E=X(r,"bigint"),T=K(r),D=typeof T=="function"?T:void 0,J=Y(r,"maximumDepth"),$=Y(r,"maximumBreadth");function V(O,t,o,f,u,h){let l=t[O];switch(typeof l=="object"&&l!==null&&typeof l.toJSON=="function"&&(l=l.toJSON(O)),l=f.call(t,O,l),typeof l){case"string":return L(l);case"object":{if(l===null)return"null";if(o.indexOf(l)!==-1)return g;let c="",v=",";const w=h;if(Array.isArray(l)){if(l.length===0)return"[]";if(J<o.length+1)return'"[Array]"';o.push(l),u!==""&&(h+=u,c+=`
|
|
2
|
-
${h}`,v=`,
|
|
3
|
-
${h}`);const j=Math.min(l.length,$);let A=0;for(;A<j-1;A++){const k=V(String(A),l,o,f,u,h);c+=k!==void 0?k:"null",c+=v}const R=V(String(A),l,o,f,u,h);if(c+=R!==void 0?R:"null",l.length-1>$){const k=l.length-$-1;c+=`${v}"... ${q(k)} not stringified"`}return u!==""&&(c+=`
|
|
4
|
-
${w}`),o.pop(),`[${c}]`}let m=Object.keys(l);const S=m.length;if(S===0)return"{}";if(J<o.length+1)return'"[Object]"';let p="",x="";u!==""&&(h+=u,v=`,
|
|
5
|
-
${h}`,p=" ");const M=Math.min(S,$);T&&!_(l)&&(m=N(m,D)),o.push(l);for(let j=0;j<M;j++){const A=m[j],R=V(A,l,o,f,u,h);R!==void 0&&(c+=`${x}${L(A)}:${p}${R}`,x=v)}if(S>$){const j=S-$;c+=`${x}"...":${p}"${q(j)} not stringified"`,x=v}return u!==""&&x.length>1&&(c=`
|
|
6
|
-
${h}${c}
|
|
7
|
-
${w}`),o.pop(),`{${c}}`}case"number":return isFinite(l)?String(l):s?s(l):"null";case"boolean":return l===!0?"true":"false";case"undefined":return;case"bigint":if(E)return String(l);default:return s?s(l):void 0}}y(V,"J"),i(V,"stringifyFnReplacer");function B(O,t,o,f,u,h){switch(typeof t=="object"&&t!==null&&typeof t.toJSON=="function"&&(t=t.toJSON(O)),typeof t){case"string":return L(t);case"object":{if(t===null)return"null";if(o.indexOf(t)!==-1)return g;const l=h;let c="",v=",";if(Array.isArray(t)){if(t.length===0)return"[]";if(J<o.length+1)return'"[Array]"';o.push(t),u!==""&&(h+=u,c+=`
|
|
8
|
-
${h}`,v=`,
|
|
9
|
-
${h}`);const S=Math.min(t.length,$);let p=0;for(;p<S-1;p++){const M=B(String(p),t[p],o,f,u,h);c+=M!==void 0?M:"null",c+=v}const x=B(String(p),t[p],o,f,u,h);if(c+=x!==void 0?x:"null",t.length-1>$){const M=t.length-$-1;c+=`${v}"... ${q(M)} not stringified"`}return u!==""&&(c+=`
|
|
10
|
-
${l}`),o.pop(),`[${c}]`}o.push(t);let w="";u!==""&&(h+=u,v=`,
|
|
11
|
-
${h}`,w=" ");let m="";for(const S of f){const p=B(S,t[S],o,f,u,h);p!==void 0&&(c+=`${m}${L(S)}:${w}${p}`,m=v)}return u!==""&&m.length>1&&(c=`
|
|
12
|
-
${h}${c}
|
|
13
|
-
${l}`),o.pop(),`{${c}}`}case"number":return isFinite(t)?String(t):s?s(t):"null";case"boolean":return t===!0?"true":"false";case"undefined":return;case"bigint":if(E)return String(t);default:return s?s(t):void 0}}y(B,"I"),i(B,"stringifyArrayReplacer");function I(O,t,o,f,u){switch(typeof t){case"string":return L(t);case"object":{if(t===null)return"null";if(typeof t.toJSON=="function"){if(t=t.toJSON(O),typeof t!="object")return I(O,t,o,f,u);if(t===null)return"null"}if(o.indexOf(t)!==-1)return g;const h=u;if(Array.isArray(t)){if(t.length===0)return"[]";if(J<o.length+1)return'"[Array]"';o.push(t),u+=f;let p=`
|
|
14
|
-
${u}`;const x=`,
|
|
15
|
-
${u}`,M=Math.min(t.length,$);let j=0;for(;j<M-1;j++){const R=I(String(j),t[j],o,f,u);p+=R!==void 0?R:"null",p+=x}const A=I(String(j),t[j],o,f,u);if(p+=A!==void 0?A:"null",t.length-1>$){const R=t.length-$-1;p+=`${x}"... ${q(R)} not stringified"`}return p+=`
|
|
16
|
-
${h}`,o.pop(),`[${p}]`}let l=Object.keys(t);const c=l.length;if(c===0)return"{}";if(J<o.length+1)return'"[Object]"';u+=f;const v=`,
|
|
17
|
-
${u}`;let w="",m="",S=Math.min(c,$);_(t)&&(w+=G(t,v,$),l=l.slice(t.length),S-=t.length,m=v),T&&(l=N(l,D)),o.push(t);for(let p=0;p<S;p++){const x=l[p],M=I(x,t[x],o,f,u);M!==void 0&&(w+=`${m}${L(x)}: ${M}`,m=v)}if(c>$){const p=c-$;w+=`${m}"...": "${q(p)} not stringified"`,m=v}return m!==""&&(w=`
|
|
18
|
-
${u}${w}
|
|
19
|
-
${h}`),o.pop(),`{${w}}`}case"number":return isFinite(t)?String(t):s?s(t):"null";case"boolean":return t===!0?"true":"false";case"undefined":return;case"bigint":if(E)return String(t);default:return s?s(t):void 0}}y(I,"V"),i(I,"stringifyIndent");function F(O,t,o){switch(typeof t){case"string":return L(t);case"object":{if(t===null)return"null";if(typeof t.toJSON=="function"){if(t=t.toJSON(O),typeof t!="object")return F(O,t,o);if(t===null)return"null"}if(o.indexOf(t)!==-1)return g;let f="";const u=t.length!==void 0;if(u&&Array.isArray(t)){if(t.length===0)return"[]";if(J<o.length+1)return'"[Array]"';o.push(t);const w=Math.min(t.length,$);let m=0;for(;m<w-1;m++){const p=F(String(m),t[m],o);f+=p!==void 0?p:"null",f+=","}const S=F(String(m),t[m],o);if(f+=S!==void 0?S:"null",t.length-1>$){const p=t.length-$-1;f+=`,"... ${q(p)} not stringified"`}return o.pop(),`[${f}]`}let h=Object.keys(t);const l=h.length;if(l===0)return"{}";if(J<o.length+1)return'"[Object]"';let c="",v=Math.min(l,$);u&&_(t)&&(f+=G(t,",",$),h=h.slice(t.length),v-=t.length,c=","),T&&(h=N(h,D)),o.push(t);for(let w=0;w<v;w++){const m=h[w],S=F(m,t[m],o);S!==void 0&&(f+=`${c}${L(m)}:${S}`,c=",")}if(l>$){const w=l-$;f+=`${c}"...":"${q(w)} not stringified"`}return o.pop(),`{${f}}`}case"number":return isFinite(t)?String(t):s?s(t):"null";case"boolean":return t===!0?"true":"false";case"undefined":return;case"bigint":if(E)return String(t);default:return s?s(t):void 0}}y(F,"N"),i(F,"stringifySimple");function ee(O,t,o){if(arguments.length>1){let f="";if(typeof o=="number"?f=" ".repeat(Math.min(o,10)):typeof o=="string"&&(f=o.slice(0,10)),t!=null){if(typeof t=="function")return V("",{"":O},[],t,f,"");if(Array.isArray(t))return B("",O,[],H(t),f,"")}if(f.length!==0)return I("",O,[],f,"")}return F("",O,[])}return y(ee,"M"),i(ee,"stringify"),ee}y(z,"configure"),i(z,"configure")})(Q,Q.exports)),Q.exports}y(ue,"requireSafeStableStringify");var ce=ue();const ge=ae(ce),fe=ge.configure;var he=Object.defineProperty,pe=y((d,e)=>he(d,"name",{value:e,configurable:!0}),"t");class de{static{y(this,"i")}static{pe(this,"RawReporter")}log(e){const{context:n=[],message:i,type:a}=e;ne(a.level)(i,...n)}}var ye=Object.defineProperty,me=y((d,e)=>ye(d,"name",{value:e,configurable:!0}),"a");const be=me(d=>d===void 0?[]:Array.isArray(d)?d:[d],"arrayify");var $e=Object.defineProperty,ve=y((d,e)=>$e(d,"name",{value:e,configurable:!0}),"g");const we=ve((d,e)=>{const n={...d};return Object.keys(e).forEach(i=>{n[i]={...n[i],...e[i]}}),n},"mergeTypes");var Se=Object.defineProperty,U=y((d,e)=>Se(d,"name",{value:e,configurable:!0}),"c");const Oe=U(d=>{let e=!1;return function(...n){if(!e){e=!0;try{const i=d.apply(this,n);return e=!1,i}catch(i){throw e=!1,i}}}},"preventLoop");class Te{static{y(this,"PailBrowserImpl")}static{U(this,"PailBrowserImpl")}timersMap;countMap;seqTimers;lastLog;logLevels;disabled;paused;messageQueue;scopeName;types;longestLabel;processors;generalLogLevel;reporters;throttle;throttleMin;stringify;groups;startTimerMessage;endTimerMessage;rawReporter;constructor(e){this.throttle=e.throttle??1e3,this.throttleMin=e.throttleMin??5,this.stringify=fe({strict:!0}),this.startTimerMessage=e.messages?.timerStart??"Initialized timer...",this.endTimerMessage=e.messages?.timerEnd??"Timer run for:",this.types=we(ie,e.types??{}),this.longestLabel=le(this.types),this.logLevels={...se,...e.logLevels},this.generalLogLevel=this.#t(e.logLevel),this.reporters=new Set,this.processors=new Set,this.disabled=e.disabled??!1,this.paused=!1,this.messageQueue=[],this.scopeName=be(e.scope).filter(Boolean),this.timersMap=new Map,this.countMap=new Map,this.groups=[],this.seqTimers=new Set,this.lastLog={},this.logger=Oe(this.logger).bind(this);for(const n in this.types)this[n]=this.logger.bind(this,n,!1);Array.isArray(e.reporters)&&this.registerReporters(e.reporters),this.rawReporter=this.extendReporter(e.rawReporter??new de),Array.isArray(e.processors)&&this.#r(e.processors)}wrapConsole(){for(const e in this.types)console[`__${e}`]||(console[`__${e}`]=console[e]),console[e]=this[e]}restoreConsole(){for(const e in this.types)console[`__${e}`]&&(console[e]=console[`__${e}`],delete console[`__${e}`])}wrapException(){process.on("uncaughtException",e=>{this.error(e)}),process.on("unhandledRejection",e=>{this.error(e)})}disable(){this.disabled=!0}enable(){this.disabled=!1}isEnabled(){return!this.disabled}pause(){this.paused=!0}resume(){this.paused=!1;const e=this.messageQueue.splice(0);for(const{messageObject:n,raw:i,type:a}of e)this.logger(a,i,...n)}scope(...e){if(e.length===0)throw new Error("No scope name was defined.");return this.scopeName=e.flat(),this}unscope(){this.scopeName=[]}time(e="default"){this.seqTimers.has(e)?this.logger("warn",!1,{message:`Timer '${e}' already exists`,prefix:e}):(this.seqTimers.add(e),this.timersMap.set(e,Date.now()),this.logger("start",!1,{message:this.startTimerMessage,prefix:e}))}timeLog(e,...n){if(!e&&this.seqTimers.size>0&&(e=[...this.seqTimers].pop()),e&&this.timersMap.has(e)){const i=Date.now()-this.timersMap.get(e);this.logger("info",!1,{context:n,message:i<1e3?`${i} ms`:`${(i/1e3).toFixed(2)} s`,prefix:e})}else this.logger("warn",!1,{context:n,message:"Timer not found",prefix:e})}timeEnd(e){if(!e&&this.seqTimers.size>0&&(e=[...this.seqTimers].pop()),e&&this.timersMap.has(e)){const n=Date.now()-this.timersMap.get(e);this.timersMap.delete(e),this.logger("stop",!1,{message:`${this.endTimerMessage} ${n<1e3?`${n} ms`:`${(n/1e3).toFixed(2)} s`}`,prefix:e})}else this.logger("warn",!1,{message:"Timer not found",prefix:e})}group(e="console.group"){globalThis.window===void 0?this.groups.push(e):console.group(e)}groupEnd(){globalThis.window===void 0?this.groups.pop():console.groupEnd()}count(e="default"){const n=this.countMap.get(e)??0;this.countMap.set(e,n+1),this.logger("log",!1,{message:`${e}: ${n+1}`,prefix:e})}countReset(e="default"){this.countMap.has(e)?this.countMap.delete(e):this.logger("warn",!1,{message:`Count for ${e} does not exist`,prefix:e})}clear(){console.clear()}raw(e,...n){this.disabled||this.logger("log",!0,{context:n,message:e})}extendReporter(e){return typeof e.setLoggerTypes=="function"&&e.setLoggerTypes(this.types),typeof e.setStringify=="function"&&e.setStringify(this.stringify),e}registerReporters(e){for(const n of e)this.reporters.add(this.extendReporter(n))}#e(e,n){if(n)this.rawReporter.log(Object.freeze(e));else for(const i of this.reporters)i.log(Object.freeze(e))}#r(e){for(const n of e)typeof n.setStringify=="function"&&n.setStringify(this.stringify),this.processors.add(n)}#t(e){return e&&this.logLevels[e]?e:"debug"}#i(e,n,...i){const a={badge:void 0,context:void 0,error:void 0,label:void 0,message:oe,prefix:void 0,repeated:void 0,scope:void 0,suffix:void 0};if(a.type={level:n.logLevel,name:e},a.groups=this.groups,a.scope=this.scopeName,a.date=new Date,i.length>0&&i[0]instanceof Error)a.error=i[0],i.length>1&&(a.context=i.slice(1));else if(i.length>0&&typeof i[0]=="object"&&i[0]!==null&&"message"in i[0]){const{context:b,message:C,prefix:L,suffix:N}=i[0];if(b&&(a.context=b),L&&(a.prefix=L),N&&(a.suffix=N),a.message=C,i.length>1){const P=i.slice(1);a.context?a.context=Array.isArray(a.context)?[...a.context,...P]:[a.context,...P]:a.context=P}}else i.length>1?(a.message=i[0],a.context=i.slice(1)):i.length===1?a.message=i[0]:a.message=void 0;return n.logLevel==="trace"&&(a.traceError=new Error("Trace")),n.badge&&(a.badge=n.badge),n.label&&(a.label=n.label),a}logger(e,n,...i){if(this.disabled)return;if(this.paused){this.messageQueue.push({messageObject:i,raw:n,type:e});return}const a=this.#t(this.types[e].logLevel);if(this.logLevels[a]>=this.logLevels[this.generalLogLevel]){let b=this.#i(e,this.types[e],...i);const C=U((N=!1)=>{const P=(this.lastLog.count||0)-this.throttleMin;if(this.lastLog.object&&P>0){const _={...this.lastLog.object};P>1&&(_.repeated=P),this.#e(_,n),this.lastLog.count=1}if(N){for(const _ of this.processors)b={..._.process(b)};this.lastLog.object=b,this.#e(b,n)}},"resolveLog");clearTimeout(this.lastLog.timeout);const L=this.lastLog.time&&b.date?new Date(b.date).getTime()-this.lastLog.time.getTime():0;if(this.lastLog.time=new Date(b.date),L<this.throttle)try{if(this.lastLog.object&&JSON.stringify([b.label,b.scope,b.type,b.message,b.prefix,b.suffix,b.context])===JSON.stringify([this.lastLog.object.label,this.lastLog.object.scope,this.lastLog.object.type,this.lastLog.object.message,this.lastLog.object.prefix,this.lastLog.object.suffix,this.lastLog.object.context])&&(this.lastLog.count=(this.lastLog.count||0)+1,this.lastLog.count>this.throttleMin)){this.lastLog.timeout=setTimeout(C,this.throttle);return}}catch{}C(!0)}}}const Me=Te;export{Me as P,Te as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var n=Object.defineProperty;var r=(o,e)=>n(o,"name",{value:e,configurable:!0});var c=Object.defineProperty,l=r((o,e)=>c(o,"name",{value:e,configurable:!0}),"o");const s=l(o=>o==="error"?console.__error??console.error:o==="warn"?console.__warn??console.warn:o==="trace"?console.__trace??console.trace:console.__log??console.log,"writeConsoleLogBasedOnLevel");export{s as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t=Object.defineProperty;var a=(r,e)=>t(r,"name",{value:e,configurable:!0});var i=Object.defineProperty,n=a((r,e)=>i(r,"name",{value:e,configurable:!0}),"r");const l=n((r,e)=>(e.__write??e.write).call(e,r),"writeStream");export{l as n};
|