@visulima/pail 4.0.0-alpha.16 → 4.0.0-alpha.18

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 CHANGED
@@ -1,3 +1,47 @@
1
+ ## @visulima/pail [4.0.0-alpha.18](https://github.com/visulima/visulima/compare/@visulima/pail@4.0.0-alpha.17...@visulima/pail@4.0.0-alpha.18) (2026-05-27)
2
+
3
+ ### Bug Fixes
4
+
5
+ * **storage-client:** percent-encode user fields in defaultFingerprint ([7c78a0f](https://github.com/visulima/visulima/commit/7c78a0f9512e2a673b941d80839e9f1e86b7b5d0))
6
+
7
+ ### Documentation
8
+
9
+ * prettier-format agent instructions ([71b6414](https://github.com/visulima/visulima/commit/71b6414528780ac82c4e0bb25b5f4f11faba5549))
10
+
11
+ ### Miscellaneous Chores
12
+
13
+ * sorted package.json ([b47c545](https://github.com/visulima/visulima/commit/b47c545591600fdab17d5cd3a3fbc68b61e199da))
14
+
15
+
16
+ ### Dependencies
17
+
18
+ * **@visulima/colorize:** upgraded to 2.0.0-alpha.12
19
+ * **@visulima/interactive-manager:** upgraded to 1.0.0-alpha.3
20
+ * **@visulima/ansi:** upgraded to 4.0.0-alpha.15
21
+ * **@visulima/error:** upgraded to 6.0.0-alpha.30
22
+ * **@visulima/inspector:** upgraded to 2.0.0-alpha.11
23
+ * **@visulima/redact:** upgraded to 3.0.0-alpha.12
24
+ * **@visulima/string:** upgraded to 3.0.0-alpha.14
25
+
26
+ ## @visulima/pail [4.0.0-alpha.17](https://github.com/visulima/visulima/compare/@visulima/pail@4.0.0-alpha.16...@visulima/pail@4.0.0-alpha.17) (2026-05-26)
27
+
28
+ ### Bug Fixes
29
+
30
+ * **pail,fs:** bind logger.raw and inline picomatch options ([e8b20d2](https://github.com/visulima/visulima/commit/e8b20d2afdbcadf2f531ac3593dc0b7210684955))
31
+
32
+ ### Miscellaneous Chores
33
+
34
+ * **ci-stability:** green CI across vis, native, lint, tests, attw ([#651](https://github.com/visulima/visulima/issues/651)) ([d4eb684](https://github.com/visulima/visulima/commit/d4eb684b5f75c818c9251048c605a0ed54a268e3))
35
+
36
+ ### Tests
37
+
38
+ * **repo:** add dist runtime + types integration tests ([32ee300](https://github.com/visulima/visulima/commit/32ee300b7184117a0ddf9f9d390f75f8932d5ed9))
39
+
40
+
41
+ ### Dependencies
42
+
43
+ * **@visulima/error:** upgraded to 6.0.0-alpha.28
44
+
1
45
  ## @visulima/pail [4.0.0-alpha.16](https://github.com/visulima/visulima/compare/@visulima/pail@4.0.0-alpha.15...@visulima/pail@4.0.0-alpha.16) (2026-05-14)
2
46
 
3
47
  ### Miscellaneous Chores
@@ -1,7 +1,6 @@
1
1
  import { stringify } from 'safe-stable-stringify';
2
- import { LiteralUnion } from 'type-fest';
3
- import { C as ConstructorOptions, M as Meta, D as DefaultLogTypes, L as LoggerTypesConfig, P as Processor, E as ExtendedRfc5424LogLevels, b as Reporter, c as LoggerFunction } from "./packem_shared/types.d-C51XNfQz.js";
4
- export { type d as DefaultLoggerTypes, type e as LoggerConfiguration, type a as LoggerTypesAwareReporter, type f as StreamAwareReporter } from "./packem_shared/types.d-C51XNfQz.js";
2
+ import { C as ConstructorOptions, M as Meta, D as DefaultLogTypes, L as LiteralUnion, a as LoggerTypesConfig, P as Processor, E as ExtendedRfc5424LogLevels, c as Reporter, d as LoggerFunction } from "./packem_shared/types.d-xxE3FOD3.js";
3
+ export { type e as DefaultLoggerTypes, type f as LoggerConfiguration, type b as LoggerTypesAwareReporter, type g as StreamAwareReporter } from "./packem_shared/types.d-xxE3FOD3.js";
5
4
  import '@visulima/colorize';
6
5
  import '@visulima/interactive-manager';
7
6
  /**
@@ -1,19 +1,19 @@
1
- var ce=Object.defineProperty;var u=(o,e)=>ce(o,"name",{value:e,configurable:!0});import{L as ue,a as ge,E as fe}from"./packem_shared/constants-DKfCaSUR.js";import{t as pe}from"./packem_shared/write-console-log-based-on-level-DfD64owL.js";import{s as se,G as he}from"./packem_shared/index-Bzp4LnJ5.js";import ye from"./packem_shared/JsonReporter-CE-lw7R0.js";import{PailError as Ue,createPailError as We}from"./packem_shared/createPailError-53jAfQ-T.js";var me=Object.defineProperty,k=u((o,e)=>me(o,"name",{value:e,configurable:!0}),"t$2");function le(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}u(le,"getDefaultExportFromCjs");k(le,"getDefaultExportFromCjs");function de(o){return o&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}u(de,"getDefaultExportFromNamespaceIfPresent");k(de,"getDefaultExportFromNamespaceIfPresent");function be(o){return o&&Object.prototype.hasOwnProperty.call(o,"default")&&Object.keys(o).length===1?o.default:o}u(be,"getDefaultExportFromNamespaceIfNotNamed");k(be,"getDefaultExportFromNamespaceIfNotNamed");function ve(o){if(Object.prototype.hasOwnProperty.call(o,"__esModule"))return o;var e=o.default;if(typeof e=="function"){var s=k(u(function r(){var a=!1;try{a=this instanceof r}catch{}return a?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)},"a"),"a");s.prototype=e.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(o).forEach(function(r){var a=Object.getOwnPropertyDescriptor(o,r);Object.defineProperty(s,r,a.get?a:{enumerable:!0,get:k(function(){return o[r]},"get")})}),s}u(ve,"getAugmentedNamespace");k(ve,"getAugmentedNamespace");var U={exports:{}},ie;function $e(){return ie||(ie=1,(function(o,e){var s=Object.defineProperty,r=u((i,n)=>s(i,"name",{value:n,configurable:!0}),"$");const{hasOwnProperty:a}=Object.prototype,v=Q();v.configure=Q,v.stringify=v,v.default=v,e.stringify=v,e.configure=Q,o.exports=v;const P=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function y(i){return i.length<5e3&&!P.test(i)?`"${i}"`:JSON.stringify(i)}u(y,"strEscape"),r(y,"strEscape");function L(i,n){if(i.length>200||n)return i.sort(n);for(let p=1;p<i.length;p++){const A=i[p];let j=p;for(;j!==0&&i[j-1]>A;)i[j]=i[j-1],j--;i[j]=A}return i}u(L,"sort"),r(L,"sort");const N=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function I(i){return N.call(i)!==void 0&&i.length!==0}u(I,"isTypedArrayWithEntries"),r(I,"isTypedArrayWithEntries");function T(i,n,p){i.length<p&&(p=i.length);const A=n===","?"":" ";let j=`"0":${A}${i[0]}`;for(let q=1;q<p;q++)j+=`${n}"${q}":${A}${i[q]}`;return j}u(T,"stringifyTypedArray"),r(T,"stringifyTypedArray");function _(i){if(a.call(i,"circularValue")){const n=i.circularValue;if(typeof n=="string")return`"${n}"`;if(n==null)return n;if(n===Error||n===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]"'}u(_,"getCircularValueOption"),r(_,"getCircularValueOption");function H(i){let n;if(a.call(i,"deterministic")&&(n=i.deterministic,typeof n!="boolean"&&typeof n!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return n===void 0?!0:n}u(H,"getDeterministicOption"),r(H,"getDeterministicOption");function Z(i,n){let p;if(a.call(i,n)&&(p=i[n],typeof p!="boolean"))throw new TypeError(`The "${n}" argument must be of type boolean`);return p===void 0?!0:p}u(Z,"getBooleanOption"),r(Z,"getBooleanOption");function W(i,n){let p;if(a.call(i,n)){if(p=i[n],typeof p!="number")throw new TypeError(`The "${n}" argument must be of type number`);if(!Number.isInteger(p))throw new TypeError(`The "${n}" argument must be an integer`);if(p<1)throw new RangeError(`The "${n}" argument must be >= 1`)}return p===void 0?1/0:p}u(W,"getPositiveIntegerOption"),r(W,"getPositiveIntegerOption");function J(i){return i===1?"1 item":`${i} items`}u(J,"getItemCount"),r(J,"getItemCount");function ee(i){const n=new Set;for(const p of i)(typeof p=="string"||typeof p=="number")&&n.add(String(p));return n}u(ee,"getUniqueReplacerSet"),r(ee,"getUniqueReplacerSet");function te(i){if(a.call(i,"strict")){const n=i.strict;if(typeof n!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(n)return p=>{let A=`Object can not safely be stringified. Received type ${typeof p}`;throw typeof p!="function"&&(A+=` (${p.toString()})`),new Error(A)}}}u(te,"getStrictOption"),r(te,"getStrictOption");function Q(i){i={...i};const n=te(i);n&&(i.bigint===void 0&&(i.bigint=!1),"circularValue"in i||(i.circularValue=Error));const p=_(i),A=Z(i,"bigint"),j=H(i),q=typeof j=="function"?j:void 0,C=W(i,"maximumDepth"),$=W(i,"maximumBreadth");function z(x,t,l,h,g,m){let c=t[x];switch(typeof c=="object"&&c!==null&&typeof c.toJSON=="function"&&(c=c.toJSON(x)),c=h.call(t,x,c),typeof c){case"string":return y(c);case"object":{if(c===null)return"null";if(l.indexOf(c)!==-1)return p;let f="",w=",";const O=m;if(Array.isArray(c)){if(c.length===0)return"[]";if(C<l.length+1)return'"[Array]"';l.push(c),g!==""&&(m+=g,f+=`
2
- ${m}`,w=`,
3
- ${m}`);const M=Math.min(c.length,$);let D=0;for(;D<M-1;D++){const Y=z(String(D),c,l,h,g,m);f+=Y!==void 0?Y:"null",f+=w}const F=z(String(D),c,l,h,g,m);if(f+=F!==void 0?F:"null",c.length-1>$){const Y=c.length-$-1;f+=`${w}"... ${J(Y)} not stringified"`}return g!==""&&(f+=`
4
- ${O}`),l.pop(),`[${f}]`}let b=Object.keys(c);const S=b.length;if(S===0)return"{}";if(C<l.length+1)return'"[Object]"';let d="",E="";g!==""&&(m+=g,w=`,
5
- ${m}`,d=" ");const R=Math.min(S,$);j&&!I(c)&&(b=L(b,q)),l.push(c);for(let M=0;M<R;M++){const D=b[M],F=z(D,c,l,h,g,m);F!==void 0&&(f+=`${E}${y(D)}:${d}${F}`,E=w)}if(S>$){const M=S-$;f+=`${E}"...":${d}"${J(M)} not stringified"`,E=w}return g!==""&&E.length>1&&(f=`
6
- ${m}${f}
7
- ${O}`),l.pop(),`{${f}}`}case"number":return isFinite(c)?String(c):n?n(c):"null";case"boolean":return c===!0?"true":"false";case"undefined":return;case"bigint":if(A)return String(c);default:return n?n(c):void 0}}u(z,"J"),r(z,"stringifyFnReplacer");function G(x,t,l,h,g,m){switch(typeof t=="object"&&t!==null&&typeof t.toJSON=="function"&&(t=t.toJSON(x)),typeof t){case"string":return y(t);case"object":{if(t===null)return"null";if(l.indexOf(t)!==-1)return p;const c=m;let f="",w=",";if(Array.isArray(t)){if(t.length===0)return"[]";if(C<l.length+1)return'"[Array]"';l.push(t),g!==""&&(m+=g,f+=`
8
- ${m}`,w=`,
9
- ${m}`);const S=Math.min(t.length,$);let d=0;for(;d<S-1;d++){const R=G(String(d),t[d],l,h,g,m);f+=R!==void 0?R:"null",f+=w}const E=G(String(d),t[d],l,h,g,m);if(f+=E!==void 0?E:"null",t.length-1>$){const R=t.length-$-1;f+=`${w}"... ${J(R)} not stringified"`}return g!==""&&(f+=`
10
- ${c}`),l.pop(),`[${f}]`}l.push(t);let O="";g!==""&&(m+=g,w=`,
11
- ${m}`,O=" ");let b="";for(const S of h){const d=G(S,t[S],l,h,g,m);d!==void 0&&(f+=`${b}${y(S)}:${O}${d}`,b=w)}return g!==""&&b.length>1&&(f=`
12
- ${m}${f}
13
- ${c}`),l.pop(),`{${f}}`}case"number":return isFinite(t)?String(t):n?n(t):"null";case"boolean":return t===!0?"true":"false";case"undefined":return;case"bigint":if(A)return String(t);default:return n?n(t):void 0}}u(G,"I"),r(G,"stringifyArrayReplacer");function V(x,t,l,h,g){switch(typeof t){case"string":return y(t);case"object":{if(t===null)return"null";if(typeof t.toJSON=="function"){if(t=t.toJSON(x),typeof t!="object")return V(x,t,l,h,g);if(t===null)return"null"}if(l.indexOf(t)!==-1)return p;const m=g;if(Array.isArray(t)){if(t.length===0)return"[]";if(C<l.length+1)return'"[Array]"';l.push(t),g+=h;let d=`
1
+ var ce=Object.defineProperty;var u=(o,e)=>ce(o,"name",{value:e,configurable:!0});import{L as ue,a as ge,E as fe}from"./packem_shared/constants-DKfCaSUR.js";import{t as pe}from"./packem_shared/write-console-log-based-on-level-DfD64owL.js";import{s as se,G as he}from"./packem_shared/index-Bzp4LnJ5.js";import ye from"./packem_shared/JsonReporter-CE-lw7R0.js";import{PailError as Ue,createPailError as We}from"./packem_shared/createPailError-53jAfQ-T.js";var de=Object.defineProperty,k=u((o,e)=>de(o,"name",{value:e,configurable:!0}),"t$2");function le(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}u(le,"getDefaultExportFromCjs");k(le,"getDefaultExportFromCjs");function me(o){return o&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}u(me,"getDefaultExportFromNamespaceIfPresent");k(me,"getDefaultExportFromNamespaceIfPresent");function be(o){return o&&Object.prototype.hasOwnProperty.call(o,"default")&&Object.keys(o).length===1?o.default:o}u(be,"getDefaultExportFromNamespaceIfNotNamed");k(be,"getDefaultExportFromNamespaceIfNotNamed");function ve(o){if(Object.prototype.hasOwnProperty.call(o,"__esModule"))return o;var e=o.default;if(typeof e=="function"){var s=k(u(function r(){var a=!1;try{a=this instanceof r}catch{}return a?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)},"a"),"a");s.prototype=e.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(o).forEach(function(r){var a=Object.getOwnPropertyDescriptor(o,r);Object.defineProperty(s,r,a.get?a:{enumerable:!0,get:k(function(){return o[r]},"get")})}),s}u(ve,"getAugmentedNamespace");k(ve,"getAugmentedNamespace");var U={exports:{}},ie;function $e(){return ie||(ie=1,(function(o,e){var s=Object.defineProperty,r=u((i,n)=>s(i,"name",{value:n,configurable:!0}),"$");const{hasOwnProperty:a}=Object.prototype,v=Q();v.configure=Q,v.stringify=v,v.default=v,e.stringify=v,e.configure=Q,o.exports=v;const P=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function y(i){return i.length<5e3&&!P.test(i)?`"${i}"`:JSON.stringify(i)}u(y,"strEscape"),r(y,"strEscape");function L(i,n){if(i.length>200||n)return i.sort(n);for(let p=1;p<i.length;p++){const A=i[p];let j=p;for(;j!==0&&i[j-1]>A;)i[j]=i[j-1],j--;i[j]=A}return i}u(L,"sort"),r(L,"sort");const N=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function I(i){return N.call(i)!==void 0&&i.length!==0}u(I,"isTypedArrayWithEntries"),r(I,"isTypedArrayWithEntries");function T(i,n,p){i.length<p&&(p=i.length);const A=n===","?"":" ";let j=`"0":${A}${i[0]}`;for(let q=1;q<p;q++)j+=`${n}"${q}":${A}${i[q]}`;return j}u(T,"stringifyTypedArray"),r(T,"stringifyTypedArray");function _(i){if(a.call(i,"circularValue")){const n=i.circularValue;if(typeof n=="string")return`"${n}"`;if(n==null)return n;if(n===Error||n===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]"'}u(_,"getCircularValueOption"),r(_,"getCircularValueOption");function H(i){let n;if(a.call(i,"deterministic")&&(n=i.deterministic,typeof n!="boolean"&&typeof n!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return n===void 0?!0:n}u(H,"getDeterministicOption"),r(H,"getDeterministicOption");function Z(i,n){let p;if(a.call(i,n)&&(p=i[n],typeof p!="boolean"))throw new TypeError(`The "${n}" argument must be of type boolean`);return p===void 0?!0:p}u(Z,"getBooleanOption"),r(Z,"getBooleanOption");function W(i,n){let p;if(a.call(i,n)){if(p=i[n],typeof p!="number")throw new TypeError(`The "${n}" argument must be of type number`);if(!Number.isInteger(p))throw new TypeError(`The "${n}" argument must be an integer`);if(p<1)throw new RangeError(`The "${n}" argument must be >= 1`)}return p===void 0?1/0:p}u(W,"getPositiveIntegerOption"),r(W,"getPositiveIntegerOption");function J(i){return i===1?"1 item":`${i} items`}u(J,"getItemCount"),r(J,"getItemCount");function ee(i){const n=new Set;for(const p of i)(typeof p=="string"||typeof p=="number")&&n.add(String(p));return n}u(ee,"getUniqueReplacerSet"),r(ee,"getUniqueReplacerSet");function te(i){if(a.call(i,"strict")){const n=i.strict;if(typeof n!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(n)return p=>{let A=`Object can not safely be stringified. Received type ${typeof p}`;throw typeof p!="function"&&(A+=` (${p.toString()})`),new Error(A)}}}u(te,"getStrictOption"),r(te,"getStrictOption");function Q(i){i={...i};const n=te(i);n&&(i.bigint===void 0&&(i.bigint=!1),"circularValue"in i||(i.circularValue=Error));const p=_(i),A=Z(i,"bigint"),j=H(i),q=typeof j=="function"?j:void 0,C=W(i,"maximumDepth"),$=W(i,"maximumBreadth");function z(x,t,l,h,g,d){let c=t[x];switch(typeof c=="object"&&c!==null&&typeof c.toJSON=="function"&&(c=c.toJSON(x)),c=h.call(t,x,c),typeof c){case"string":return y(c);case"object":{if(c===null)return"null";if(l.indexOf(c)!==-1)return p;let f="",w=",";const O=d;if(Array.isArray(c)){if(c.length===0)return"[]";if(C<l.length+1)return'"[Array]"';l.push(c),g!==""&&(d+=g,f+=`
2
+ ${d}`,w=`,
3
+ ${d}`);const M=Math.min(c.length,$);let D=0;for(;D<M-1;D++){const Y=z(String(D),c,l,h,g,d);f+=Y!==void 0?Y:"null",f+=w}const F=z(String(D),c,l,h,g,d);if(f+=F!==void 0?F:"null",c.length-1>$){const Y=c.length-$-1;f+=`${w}"... ${J(Y)} not stringified"`}return g!==""&&(f+=`
4
+ ${O}`),l.pop(),`[${f}]`}let b=Object.keys(c);const S=b.length;if(S===0)return"{}";if(C<l.length+1)return'"[Object]"';let m="",E="";g!==""&&(d+=g,w=`,
5
+ ${d}`,m=" ");const R=Math.min(S,$);j&&!I(c)&&(b=L(b,q)),l.push(c);for(let M=0;M<R;M++){const D=b[M],F=z(D,c,l,h,g,d);F!==void 0&&(f+=`${E}${y(D)}:${m}${F}`,E=w)}if(S>$){const M=S-$;f+=`${E}"...":${m}"${J(M)} not stringified"`,E=w}return g!==""&&E.length>1&&(f=`
6
+ ${d}${f}
7
+ ${O}`),l.pop(),`{${f}}`}case"number":return isFinite(c)?String(c):n?n(c):"null";case"boolean":return c===!0?"true":"false";case"undefined":return;case"bigint":if(A)return String(c);default:return n?n(c):void 0}}u(z,"J"),r(z,"stringifyFnReplacer");function G(x,t,l,h,g,d){switch(typeof t=="object"&&t!==null&&typeof t.toJSON=="function"&&(t=t.toJSON(x)),typeof t){case"string":return y(t);case"object":{if(t===null)return"null";if(l.indexOf(t)!==-1)return p;const c=d;let f="",w=",";if(Array.isArray(t)){if(t.length===0)return"[]";if(C<l.length+1)return'"[Array]"';l.push(t),g!==""&&(d+=g,f+=`
8
+ ${d}`,w=`,
9
+ ${d}`);const S=Math.min(t.length,$);let m=0;for(;m<S-1;m++){const R=G(String(m),t[m],l,h,g,d);f+=R!==void 0?R:"null",f+=w}const E=G(String(m),t[m],l,h,g,d);if(f+=E!==void 0?E:"null",t.length-1>$){const R=t.length-$-1;f+=`${w}"... ${J(R)} not stringified"`}return g!==""&&(f+=`
10
+ ${c}`),l.pop(),`[${f}]`}l.push(t);let O="";g!==""&&(d+=g,w=`,
11
+ ${d}`,O=" ");let b="";for(const S of h){const m=G(S,t[S],l,h,g,d);m!==void 0&&(f+=`${b}${y(S)}:${O}${m}`,b=w)}return g!==""&&b.length>1&&(f=`
12
+ ${d}${f}
13
+ ${c}`),l.pop(),`{${f}}`}case"number":return isFinite(t)?String(t):n?n(t):"null";case"boolean":return t===!0?"true":"false";case"undefined":return;case"bigint":if(A)return String(t);default:return n?n(t):void 0}}u(G,"I"),r(G,"stringifyArrayReplacer");function V(x,t,l,h,g){switch(typeof t){case"string":return y(t);case"object":{if(t===null)return"null";if(typeof t.toJSON=="function"){if(t=t.toJSON(x),typeof t!="object")return V(x,t,l,h,g);if(t===null)return"null"}if(l.indexOf(t)!==-1)return p;const d=g;if(Array.isArray(t)){if(t.length===0)return"[]";if(C<l.length+1)return'"[Array]"';l.push(t),g+=h;let m=`
14
14
  ${g}`;const E=`,
15
- ${g}`,R=Math.min(t.length,$);let M=0;for(;M<R-1;M++){const F=V(String(M),t[M],l,h,g);d+=F!==void 0?F:"null",d+=E}const D=V(String(M),t[M],l,h,g);if(d+=D!==void 0?D:"null",t.length-1>$){const F=t.length-$-1;d+=`${E}"... ${J(F)} not stringified"`}return d+=`
16
- ${m}`,l.pop(),`[${d}]`}let c=Object.keys(t);const f=c.length;if(f===0)return"{}";if(C<l.length+1)return'"[Object]"';g+=h;const w=`,
17
- ${g}`;let O="",b="",S=Math.min(f,$);I(t)&&(O+=T(t,w,$),c=c.slice(t.length),S-=t.length,b=w),j&&(c=L(c,q)),l.push(t);for(let d=0;d<S;d++){const E=c[d],R=V(E,t[E],l,h,g);R!==void 0&&(O+=`${b}${y(E)}: ${R}`,b=w)}if(f>$){const d=f-$;O+=`${b}"...": "${J(d)} not stringified"`,b=w}return b!==""&&(O=`
15
+ ${g}`,R=Math.min(t.length,$);let M=0;for(;M<R-1;M++){const F=V(String(M),t[M],l,h,g);m+=F!==void 0?F:"null",m+=E}const D=V(String(M),t[M],l,h,g);if(m+=D!==void 0?D:"null",t.length-1>$){const F=t.length-$-1;m+=`${E}"... ${J(F)} not stringified"`}return m+=`
16
+ ${d}`,l.pop(),`[${m}]`}let c=Object.keys(t);const f=c.length;if(f===0)return"{}";if(C<l.length+1)return'"[Object]"';g+=h;const w=`,
17
+ ${g}`;let O="",b="",S=Math.min(f,$);I(t)&&(O+=T(t,w,$),c=c.slice(t.length),S-=t.length,b=w),j&&(c=L(c,q)),l.push(t);for(let m=0;m<S;m++){const E=c[m],R=V(E,t[E],l,h,g);R!==void 0&&(O+=`${b}${y(E)}: ${R}`,b=w)}if(f>$){const m=f-$;O+=`${b}"...": "${J(m)} not stringified"`,b=w}return b!==""&&(O=`
18
18
  ${g}${O}
19
- ${m}`),l.pop(),`{${O}}`}case"number":return isFinite(t)?String(t):n?n(t):"null";case"boolean":return t===!0?"true":"false";case"undefined":return;case"bigint":if(A)return String(t);default:return n?n(t):void 0}}u(V,"V"),r(V,"stringifyIndent");function B(x,t,l){switch(typeof t){case"string":return y(t);case"object":{if(t===null)return"null";if(typeof t.toJSON=="function"){if(t=t.toJSON(x),typeof t!="object")return B(x,t,l);if(t===null)return"null"}if(l.indexOf(t)!==-1)return p;let h="";const g=t.length!==void 0;if(g&&Array.isArray(t)){if(t.length===0)return"[]";if(C<l.length+1)return'"[Array]"';l.push(t);const O=Math.min(t.length,$);let b=0;for(;b<O-1;b++){const d=B(String(b),t[b],l);h+=d!==void 0?d:"null",h+=","}const S=B(String(b),t[b],l);if(h+=S!==void 0?S:"null",t.length-1>$){const d=t.length-$-1;h+=`,"... ${J(d)} not stringified"`}return l.pop(),`[${h}]`}let m=Object.keys(t);const c=m.length;if(c===0)return"{}";if(C<l.length+1)return'"[Object]"';let f="",w=Math.min(c,$);g&&I(t)&&(h+=T(t,",",$),m=m.slice(t.length),w-=t.length,f=","),j&&(m=L(m,q)),l.push(t);for(let O=0;O<w;O++){const b=m[O],S=B(b,t[b],l);S!==void 0&&(h+=`${f}${y(b)}:${S}`,f=",")}if(c>$){const O=c-$;h+=`${f}"...":"${J(O)} not stringified"`}return l.pop(),`{${h}}`}case"number":return isFinite(t)?String(t):n?n(t):"null";case"boolean":return t===!0?"true":"false";case"undefined":return;case"bigint":if(A)return String(t);default:return n?n(t):void 0}}u(B,"N"),r(B,"stringifySimple");function re(x,t,l){if(arguments.length>1){let h="";if(typeof l=="number"?h=" ".repeat(Math.min(l,10)):typeof l=="string"&&(h=l.slice(0,10)),t!=null){if(typeof t=="function")return z("",{"":x},[],t,h,"");if(Array.isArray(t))return G("",x,[],ee(t),h,"")}if(h.length!==0)return V("",x,[],h,"")}return B("",x,[])}return u(re,"M"),r(re,"stringify"),re}u(Q,"configure"),r(Q,"configure")})(U,U.exports)),U.exports}u($e,"requireSafeStableStringify");var we=$e();const Oe=le(we),Se=Oe.configure;var Le=Object.defineProperty,Te=u((o,e)=>Le(o,"name",{value:e,configurable:!0}),"t$1");let xe=class{static{u(this,"a")}static{Te(this,"RawReporter")}log(e){const{context:s=[],message:r,type:a}=e;pe(a.level)(r,...s)}};var je=Object.defineProperty,Ee=u((o,e)=>je(o,"name",{value:e,configurable:!0}),"a");const oe=Ee(o=>o===void 0?[]:Array.isArray(o)?o:[o],"arrayify");var Me=Object.defineProperty,Ae=u((o,e)=>Me(o,"name",{value:e,configurable:!0}),"g$1");const ne=Ae((o,e)=>{const s={...o};return Object.keys(e).forEach(r=>{s[r]={...s[r],...e[r]}}),s},"mergeTypes");var Pe=Object.defineProperty,K=u((o,e)=>Pe(o,"name",{value:e,configurable:!0}),"d");const Ne=K(o=>{let e=!1;return function(...s){if(!e){e=!0;try{const r=o.apply(this,s);return e=!1,r}catch(r){throw e=!1,r}}}},"preventLoop");class X{static{u(this,"PailBrowserImpl")}static{K(this,"PailBrowserImpl")}timersMap;countMap;seqTimers;lastLog;logLevels;disabled;paused;messageQueue;scopeName;types;longestLabel;processors;generalLogLevel;reporters;throttle;throttleMin;stringify;groups;startTimerMessage;endTimerMessage;rawReporter;force={};constructor(e){this.throttle=e.throttle??1e3,this.throttleMin=e.throttleMin??5;const s=e.parentLongestLabel,r=e.parentTypes,a=e.parentStringify,v=e.parentLogLevels;this.stringify=a??Se({strict:!0}),this.startTimerMessage=e.messages?.timerStart??"Initialized timer...",this.endTimerMessage=e.messages?.timerEnd??"Timer run for:",r&&s?(this.types=r,this.longestLabel=s):(this.types=ne(ue,e.types??{}),this.longestLabel=se(this.types)),this.logLevels=v&&!e.logLevels?v:{...ge,...e.logLevels},this.generalLogLevel=this.#r(e.logLevel),this.reporters=new Set,this.processors=new Set,this.disabled=e.disabled??!1,this.paused=!1,this.messageQueue=[],this.scopeName=oe(e.scope).filter(Boolean),this.timersMap=new Map,this.countMap=new Map,this.groups=[],this.seqTimers=new Set,this.lastLog={},this.logger=Ne(this.logger.bind(this)),this.#e(),Array.isArray(e.reporters)&&this.registerReporters(e.reporters),this.rawReporter=this.extendReporter(e.rawReporter??new xe),Array.isArray(e.processors)&&this.registerProcessors(e.processors)}#e(){for(const e in this.types)this[e]=this.logger.bind(this,e,!1,!1);for(const e in this.types)this.force[e]=this.logger.bind(this,e,!1,!0)}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(let s=0;s<e.length;s+=1){const{messageObject:r,raw:a,type:v}=e[s];this.logger(v,a,!1,...r)}}scope(...e){if(e.length===0)throw new Error("No scope name was defined.");return this.scopeName=e.flat(),this}unscope(){this.scopeName=[]}child(e){const s=e?.types!==void 0,r=s?ne(this.types,e.types):this.types,a=e?.reporters??[],v=a.length>0?[...this.reporters,...a]:[...this.reporters],P=e?.processors??[],y=P.length>0?[...this.processors,...P]:[...this.processors],L=e?.logLevels?{...this.logLevels,...e.logLevels}:this.logLevels;let N;if(e?.scope){const _=oe(e.scope).filter(Boolean);N=this.scopeName.length>0?[...this.scopeName,..._]:_}else N=this.scopeName.length>0?this.scopeName:[];const I=e?.messages?{timerEnd:this.endTimerMessage,timerStart:this.startTimerMessage,...e.messages}:{timerEnd:this.endTimerMessage,timerStart:this.startTimerMessage},T={disabled:e?.disabled??this.disabled,logLevel:e?.logLevel??this.generalLogLevel,logLevels:L,messages:I,processors:y,rawReporter:e?.rawReporter??this.rawReporter,reporters:v,scope:N,throttle:e?.throttle??this.throttle,throttleMin:e?.throttleMin??this.throttleMin};return s?(T.parentTypes=r,T.parentLongestLabel=se(r)):(T.parentTypes=this.types,T.parentLongestLabel=this.longestLabel),e?.logLevels||(T.parentLogLevels=this.logLevels),e?.messages||(T.parentMessages={timerEnd:this.endTimerMessage,timerStart:this.startTimerMessage}),T.parentStringify=this.stringify,new X(T)}time(e="default"){this.seqTimers.has(e)?this.logger("warn",!1,!1,{message:`Timer '${e}' already exists`,prefix:e}):(this.seqTimers.add(e),this.timersMap.set(e,Date.now()),this.logger("start",!1,!1,{message:this.startTimerMessage,prefix:e}))}timeLog(e,...s){if(!e&&this.seqTimers.size>0&&(e=[...this.seqTimers].pop()),e&&this.timersMap.has(e)){const r=Date.now()-this.timersMap.get(e);this.logger("info",!1,!1,{context:s,message:r<1e3?`${String(r)} ms`:`${(r/1e3).toFixed(2)} s`,prefix:e})}else this.logger("warn",!1,!1,{context:s,message:"Timer not found",prefix:e})}timeEnd(e){if(!e&&this.seqTimers.size>0&&(e=[...this.seqTimers].pop()),e&&this.timersMap.has(e)){const s=Date.now()-this.timersMap.get(e);this.timersMap.delete(e),this.logger("stop",!1,!1,{message:`${this.endTimerMessage} ${s<1e3?`${String(s)} ms`:`${(s/1e3).toFixed(2)} s`}`,prefix:e})}else this.logger("warn",!1,!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 s=this.countMap.get(e)??0;this.countMap.set(e,s+1),this.logger("log",!1,!1,{message:`${e}: ${String(s+1)}`,prefix:e})}countReset(e="default"){this.countMap.has(e)?this.countMap.delete(e):this.logger("warn",!1,!1,{message:`Count for ${e} does not exist`,prefix:e})}clear(){console.clear()}raw(e,...s){this.disabled||this.logger("log",!0,!1,{context:s,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(let s=0;s<e.length;s+=1)this.reporters.add(this.extendReporter(e[s]))}registerProcessors(e){for(let s=0;s<e.length;s+=1){const r=e[s];typeof r.setStringify=="function"&&r.setStringify(this.stringify),this.processors.add(r)}}#t(e,s){if(s)this.rawReporter.log(Object.freeze(e));else for(const r of this.reporters)r.log(Object.freeze(e))}#r(e){return e&&this.logLevels[e]?e:"debug"}#s(e,s,...r){const a={badge:void 0,context:void 0,error:void 0,label:void 0,message:fe,prefix:void 0,repeated:void 0,scope:void 0,suffix:void 0};if(a.type={level:s.logLevel,name:e},a.groups=this.groups,a.scope=this.scopeName,a.date=new Date,r.length>0&&r[0]instanceof Error)a.error=r[0],r.length>1&&(a.context=r.slice(1));else if(r.length>0&&typeof r[0]=="object"&&r[0]!==null&&"message"in r[0]){const{context:v,message:P,prefix:y,suffix:L}=r[0];if(v&&(a.context=v),y&&(a.prefix=y),L&&(a.suffix=L),a.message=P,r.length>1){const N=r.slice(1);a.context?a.context=Array.isArray(a.context)?[...a.context,...N]:[a.context,...N]:a.context=N}}else r.length>1?(a.message=r[0],a.context=r.slice(1)):r.length===1?a.message=r[0]:a.message=void 0;return s.logLevel==="trace"&&(a.traceError=new Error("Trace")),s.badge&&(a.badge=s.badge),s.label&&(a.label=s.label),a}logger(e,s,r,...a){if(this.disabled)return;if(this.paused){this.messageQueue.push({messageObject:a,raw:s,type:e});return}const v=this.types[e],P=this.#r(v.logLevel);if(r||this.logLevels[P]>=this.logLevels[this.generalLogLevel]){let y=this.#s(e,v,...a);const L=K((I=!1)=>{const T=(this.lastLog.count??0)-this.throttleMin;if(this.lastLog.object&&T>0){const _={...this.lastLog.object};T>1&&(_.repeated=T),this.#t(_,s),this.lastLog.count=1}if(I){for(const _ of this.processors)y={..._.process(y)};this.lastLog.object=y,this.#t(y,s)}},"resolveLog");clearTimeout(this.lastLog.timeout);const N=this.lastLog.time&&y.date?new Date(y.date).getTime()-this.lastLog.time.getTime():0;if(this.lastLog.time=new Date(y.date),N<this.throttle)try{if(this.lastLog.object&&JSON.stringify([y.label,y.scope,y.type,y.message,y.prefix,y.suffix,y.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(L,this.throttle);return}}catch{}L(!0)}}}const Re=X;var _e=Object.defineProperty,ae=u((o,e)=>_e(o,"name",{value:e,configurable:!0}),"i");class De{static{u(this,"g")}static{ae(this,"MessageFormatterProcessor")}#e;#t;constructor(e={}){this.#t=e.formatters}setStringify(e){this.#e=e}process(e){const s=he({formatters:this.#t,stringify:ae(r=>this.#e?this.#e(r):JSON.stringify(r),"stringify")});return e.message!==void 0&&(e.message=this.#r(s,e.message,e.context??[])),e}#r(e,s,r=[]){if(typeof s=="string")return e(s,r);if(typeof s=="object"&&s!==null){const a=s,v=Object.keys(a);for(let P=0;P<v.length;P+=1){const y=v[P],L=a[y];(typeof L=="string"||Array.isArray(L)||typeof L=="object")&&(a[y]=this.#r(e,L,r))}}return s}}var Fe=Object.defineProperty,Ie=u((o,e)=>Fe(o,"name",{value:e,configurable:!0}),"e");const Je=Ie(o=>new Re({processors:[new De],reporters:[new ye],...o}),"createPail"),Ge=Je();export{Ue as PailError,Je as createPail,We as createPailError,Ge as pail};
19
+ ${d}`),l.pop(),`{${O}}`}case"number":return isFinite(t)?String(t):n?n(t):"null";case"boolean":return t===!0?"true":"false";case"undefined":return;case"bigint":if(A)return String(t);default:return n?n(t):void 0}}u(V,"V"),r(V,"stringifyIndent");function B(x,t,l){switch(typeof t){case"string":return y(t);case"object":{if(t===null)return"null";if(typeof t.toJSON=="function"){if(t=t.toJSON(x),typeof t!="object")return B(x,t,l);if(t===null)return"null"}if(l.indexOf(t)!==-1)return p;let h="";const g=t.length!==void 0;if(g&&Array.isArray(t)){if(t.length===0)return"[]";if(C<l.length+1)return'"[Array]"';l.push(t);const O=Math.min(t.length,$);let b=0;for(;b<O-1;b++){const m=B(String(b),t[b],l);h+=m!==void 0?m:"null",h+=","}const S=B(String(b),t[b],l);if(h+=S!==void 0?S:"null",t.length-1>$){const m=t.length-$-1;h+=`,"... ${J(m)} not stringified"`}return l.pop(),`[${h}]`}let d=Object.keys(t);const c=d.length;if(c===0)return"{}";if(C<l.length+1)return'"[Object]"';let f="",w=Math.min(c,$);g&&I(t)&&(h+=T(t,",",$),d=d.slice(t.length),w-=t.length,f=","),j&&(d=L(d,q)),l.push(t);for(let O=0;O<w;O++){const b=d[O],S=B(b,t[b],l);S!==void 0&&(h+=`${f}${y(b)}:${S}`,f=",")}if(c>$){const O=c-$;h+=`${f}"...":"${J(O)} not stringified"`}return l.pop(),`{${h}}`}case"number":return isFinite(t)?String(t):n?n(t):"null";case"boolean":return t===!0?"true":"false";case"undefined":return;case"bigint":if(A)return String(t);default:return n?n(t):void 0}}u(B,"N"),r(B,"stringifySimple");function re(x,t,l){if(arguments.length>1){let h="";if(typeof l=="number"?h=" ".repeat(Math.min(l,10)):typeof l=="string"&&(h=l.slice(0,10)),t!=null){if(typeof t=="function")return z("",{"":x},[],t,h,"");if(Array.isArray(t))return G("",x,[],ee(t),h,"")}if(h.length!==0)return V("",x,[],h,"")}return B("",x,[])}return u(re,"M"),r(re,"stringify"),re}u(Q,"configure"),r(Q,"configure")})(U,U.exports)),U.exports}u($e,"requireSafeStableStringify");var we=$e();const Oe=le(we),Se=Oe.configure;var Le=Object.defineProperty,Te=u((o,e)=>Le(o,"name",{value:e,configurable:!0}),"t$1");let xe=class{static{u(this,"a")}static{Te(this,"RawReporter")}log(e){const{context:s=[],message:r,type:a}=e;pe(a.level)(r,...s)}};var je=Object.defineProperty,Ee=u((o,e)=>je(o,"name",{value:e,configurable:!0}),"a");const oe=Ee(o=>o===void 0?[]:Array.isArray(o)?o:[o],"arrayify");var Me=Object.defineProperty,Ae=u((o,e)=>Me(o,"name",{value:e,configurable:!0}),"g$1");const ne=Ae((o,e)=>{const s={...o};return Object.keys(e).forEach(r=>{s[r]={...s[r],...e[r]}}),s},"mergeTypes");var Pe=Object.defineProperty,K=u((o,e)=>Pe(o,"name",{value:e,configurable:!0}),"d");const Ne=K(o=>{let e=!1;return function(...s){if(!e){e=!0;try{const r=o.apply(this,s);return e=!1,r}catch(r){throw e=!1,r}}}},"preventLoop");class X{static{u(this,"PailBrowserImpl")}static{K(this,"PailBrowserImpl")}timersMap;countMap;seqTimers;lastLog;logLevels;disabled;paused;messageQueue;scopeName;types;longestLabel;processors;generalLogLevel;reporters;throttle;throttleMin;stringify;groups;startTimerMessage;endTimerMessage;rawReporter;force={};constructor(e){this.throttle=e.throttle??1e3,this.throttleMin=e.throttleMin??5;const s=e.parentLongestLabel,r=e.parentTypes,a=e.parentStringify,v=e.parentLogLevels;this.stringify=a??Se({strict:!0}),this.startTimerMessage=e.messages?.timerStart??"Initialized timer...",this.endTimerMessage=e.messages?.timerEnd??"Timer run for:",r&&s?(this.types=r,this.longestLabel=s):(this.types=ne(ue,e.types??{}),this.longestLabel=se(this.types)),this.logLevels=v&&!e.logLevels?v:{...ge,...e.logLevels},this.generalLogLevel=this.#r(e.logLevel),this.reporters=new Set,this.processors=new Set,this.disabled=e.disabled??!1,this.paused=!1,this.messageQueue=[],this.scopeName=oe(e.scope).filter(Boolean),this.timersMap=new Map,this.countMap=new Map,this.groups=[],this.seqTimers=new Set,this.lastLog={},this.logger=Ne(this.logger.bind(this)),this.#e(),Array.isArray(e.reporters)&&this.registerReporters(e.reporters),this.rawReporter=this.extendReporter(e.rawReporter??new xe),Array.isArray(e.processors)&&this.registerProcessors(e.processors)}#e(){for(const e in this.types)this[e]=this.logger.bind(this,e,!1,!1);for(const e in this.types)this.force[e]=this.logger.bind(this,e,!1,!0);this.raw=this.raw.bind(this)}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(let s=0;s<e.length;s+=1){const{messageObject:r,raw:a,type:v}=e[s];this.logger(v,a,!1,...r)}}scope(...e){if(e.length===0)throw new Error("No scope name was defined.");return this.scopeName=e.flat(),this}unscope(){this.scopeName=[]}child(e){const s=e?.types!==void 0,r=s?ne(this.types,e.types):this.types,a=e?.reporters??[],v=a.length>0?[...this.reporters,...a]:[...this.reporters],P=e?.processors??[],y=P.length>0?[...this.processors,...P]:[...this.processors],L=e?.logLevels?{...this.logLevels,...e.logLevels}:this.logLevels;let N;if(e?.scope){const _=oe(e.scope).filter(Boolean);N=this.scopeName.length>0?[...this.scopeName,..._]:_}else N=this.scopeName.length>0?this.scopeName:[];const I=e?.messages?{timerEnd:this.endTimerMessage,timerStart:this.startTimerMessage,...e.messages}:{timerEnd:this.endTimerMessage,timerStart:this.startTimerMessage},T={disabled:e?.disabled??this.disabled,logLevel:e?.logLevel??this.generalLogLevel,logLevels:L,messages:I,processors:y,rawReporter:e?.rawReporter??this.rawReporter,reporters:v,scope:N,throttle:e?.throttle??this.throttle,throttleMin:e?.throttleMin??this.throttleMin};return s?(T.parentTypes=r,T.parentLongestLabel=se(r)):(T.parentTypes=this.types,T.parentLongestLabel=this.longestLabel),e?.logLevels||(T.parentLogLevels=this.logLevels),e?.messages||(T.parentMessages={timerEnd:this.endTimerMessage,timerStart:this.startTimerMessage}),T.parentStringify=this.stringify,new X(T)}time(e="default"){this.seqTimers.has(e)?this.logger("warn",!1,!1,{message:`Timer '${e}' already exists`,prefix:e}):(this.seqTimers.add(e),this.timersMap.set(e,Date.now()),this.logger("start",!1,!1,{message:this.startTimerMessage,prefix:e}))}timeLog(e,...s){if(!e&&this.seqTimers.size>0&&(e=[...this.seqTimers].pop()),e&&this.timersMap.has(e)){const r=Date.now()-this.timersMap.get(e);this.logger("info",!1,!1,{context:s,message:r<1e3?`${String(r)} ms`:`${(r/1e3).toFixed(2)} s`,prefix:e})}else this.logger("warn",!1,!1,{context:s,message:"Timer not found",prefix:e})}timeEnd(e){if(!e&&this.seqTimers.size>0&&(e=[...this.seqTimers].pop()),e&&this.timersMap.has(e)){const s=Date.now()-this.timersMap.get(e);this.timersMap.delete(e),this.logger("stop",!1,!1,{message:`${this.endTimerMessage} ${s<1e3?`${String(s)} ms`:`${(s/1e3).toFixed(2)} s`}`,prefix:e})}else this.logger("warn",!1,!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 s=this.countMap.get(e)??0;this.countMap.set(e,s+1),this.logger("log",!1,!1,{message:`${e}: ${String(s+1)}`,prefix:e})}countReset(e="default"){this.countMap.has(e)?this.countMap.delete(e):this.logger("warn",!1,!1,{message:`Count for ${e} does not exist`,prefix:e})}clear(){console.clear()}raw(e,...s){this.disabled||this.logger("log",!0,!1,{context:s,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(let s=0;s<e.length;s+=1)this.reporters.add(this.extendReporter(e[s]))}registerProcessors(e){for(let s=0;s<e.length;s+=1){const r=e[s];typeof r.setStringify=="function"&&r.setStringify(this.stringify),this.processors.add(r)}}#t(e,s){if(s)this.rawReporter.log(Object.freeze(e));else for(const r of this.reporters)r.log(Object.freeze(e))}#r(e){return e&&this.logLevels[e]?e:"debug"}#s(e,s,...r){const a={badge:void 0,context:void 0,error:void 0,label:void 0,message:fe,prefix:void 0,repeated:void 0,scope:void 0,suffix:void 0};if(a.type={level:s.logLevel,name:e},a.groups=this.groups,a.scope=this.scopeName,a.date=new Date,r.length>0&&r[0]instanceof Error)a.error=r[0],r.length>1&&(a.context=r.slice(1));else if(r.length>0&&typeof r[0]=="object"&&r[0]!==null&&"message"in r[0]){const{context:v,message:P,prefix:y,suffix:L}=r[0];if(v&&(a.context=v),y&&(a.prefix=y),L&&(a.suffix=L),a.message=P,r.length>1){const N=r.slice(1);a.context?a.context=Array.isArray(a.context)?[...a.context,...N]:[a.context,...N]:a.context=N}}else r.length>1?(a.message=r[0],a.context=r.slice(1)):r.length===1?a.message=r[0]:a.message=void 0;return s.logLevel==="trace"&&(a.traceError=new Error("Trace")),s.badge&&(a.badge=s.badge),s.label&&(a.label=s.label),a}logger(e,s,r,...a){if(this.disabled)return;if(this.paused){this.messageQueue.push({messageObject:a,raw:s,type:e});return}const v=this.types[e],P=this.#r(v.logLevel);if(r||this.logLevels[P]>=this.logLevels[this.generalLogLevel]){let y=this.#s(e,v,...a);const L=K((I=!1)=>{const T=(this.lastLog.count??0)-this.throttleMin;if(this.lastLog.object&&T>0){const _={...this.lastLog.object};T>1&&(_.repeated=T),this.#t(_,s),this.lastLog.count=1}if(I){for(const _ of this.processors)y={..._.process(y)};this.lastLog.object=y,this.#t(y,s)}},"resolveLog");clearTimeout(this.lastLog.timeout);const N=this.lastLog.time&&y.date?new Date(y.date).getTime()-this.lastLog.time.getTime():0;if(this.lastLog.time=new Date(y.date),N<this.throttle)try{if(this.lastLog.object&&JSON.stringify([y.label,y.scope,y.type,y.message,y.prefix,y.suffix,y.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(L,this.throttle);return}}catch{}L(!0)}}}const Re=X;var _e=Object.defineProperty,ae=u((o,e)=>_e(o,"name",{value:e,configurable:!0}),"i");class De{static{u(this,"g")}static{ae(this,"MessageFormatterProcessor")}#e;#t;constructor(e={}){this.#t=e.formatters}setStringify(e){this.#e=e}process(e){const s=he({formatters:this.#t,stringify:ae(r=>this.#e?this.#e(r):JSON.stringify(r),"stringify")});return e.message!==void 0&&(e.message=this.#r(s,e.message,e.context??[])),e}#r(e,s,r=[]){if(typeof s=="string")return e(s,r);if(typeof s=="object"&&s!==null){const a=s,v=Object.keys(a);for(let P=0;P<v.length;P+=1){const y=v[P],L=a[y];(typeof L=="string"||Array.isArray(L)||typeof L=="object")&&(a[y]=this.#r(e,L,r))}}return s}}var Fe=Object.defineProperty,Ie=u((o,e)=>Fe(o,"name",{value:e,configurable:!0}),"e");const Je=Ie(o=>new Re({processors:[new De],reporters:[new ye],...o}),"createPail"),Ge=Je();export{Ue as PailError,Je as createPail,We as createPailError,Ge as pail};
@@ -1,7 +1,8 @@
1
1
  import { InteractiveManager } from '@visulima/interactive-manager';
2
2
  import { stringify } from 'safe-stable-stringify';
3
- import { M as Meta, D as DefaultLogTypes, L as LiteralUnion, a as LoggerTypesConfig, P as Processor, E as ExtendedRfc5424LogLevels, R as Reporter, b as LoggerFunction, C as ConstructorOptions, S as ServerConstructorOptions } from "./packem_shared/types.d-CM5ie2qm.js";
4
- export { type c as DefaultLoggerTypes, type d as LoggerConfiguration, type e as LoggerTypesAwareReporter, type f as StreamAwareReporter } from "./packem_shared/types.d-CM5ie2qm.js";
3
+ import { LiteralUnion } from 'type-fest';
4
+ import { M as Meta, D as DefaultLogTypes, L as LoggerTypesConfig, P as Processor, E as ExtendedRfc5424LogLevels, R as Reporter, a as LoggerFunction, C as ConstructorOptions, S as ServerConstructorOptions } from "./packem_shared/types.d-Cz9S7jZh.js";
5
+ export { type b as DefaultLoggerTypes, type c as LoggerConfiguration, type d as LoggerTypesAwareReporter, type e as StreamAwareReporter } from "./packem_shared/types.d-Cz9S7jZh.js";
5
6
  import '@visulima/colorize';
6
7
  /**
7
8
  * Pail Browser Implementation.
@@ -1,4 +1,4 @@
1
- var Ge=Object.defineProperty;var p=(t,e)=>Ge(t,"name",{value:e,configurable:!0});import{createRequire as ze}from"node:module";import{InteractiveManager as We,InteractiveStreamHook as Me}from"@visulima/interactive-manager";import{L as Ue,s as le,E as Ye,a as Se,p as ce,i as _e,A as Qe,u as Ke,O as Xe,b as Ze,o as ne,c as et,d as tt,B as rt,G as ge}from"./packem_shared/abstract-pretty-reporter-Bag7lQKf.js";import De from"@visulima/colorize";import{PailError as Vr,createPailError as Gr}from"./packem_shared/createPailError-53jAfQ-T.js";const Br=ze(import.meta.url),He=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,{stdout:$e,stderr:ve,env:se}=He,st="\x1B",M="\x1B[",Ce=";";var it=Object.defineProperty,ot=p((t,e)=>it(t,"name",{value:e,configurable:!0}),"t$3"),nt=Object.defineProperty,at=ot((t,e)=>nt(t,"name",{value:e,configurable:!0}),"t");const lt=typeof globalThis<"u"&&typeof globalThis.window=="object"&&globalThis.window.document!==void 0,ct=/^(?:msys|cygwin)$/,ft=!lt&&(process.platform==="win32"||ct.test(process.env.OSTYPE));var ut=Object.defineProperty,D=at((t,e)=>ut(t,"name",{value:e,configurable:!0}),"n");const gt=D((t=1)=>`${M}${String(t)}D`,"cursorBackward");D((t=1)=>`${M}${String(t)}B`,"cursorDown");D((t=1)=>`${M}${String(t)}C`,"cursorForward");const ht=`${M}G`;D((t=1)=>gt(t),"cursorLeft");const dt=D((t=1)=>`${M}${String(t)}G`,"cursorHorizontalAbsolute");D((t,e)=>{let r="";return t<0?r+=`${M}${String(-t)}D`:t>0&&(r+=`${M}${String(t)}C`),e<0?r+=`${M}${String(-e)}A`:e>0&&(r+=`${M}${String(e)}B`),r},"cursorMove");D((t=1)=>`${M}${String(t)}E`,"cursorNextLine");D((t=1)=>`${M}${String(t)}F`,"cursorPreviousLine");const pt=D((t,e)=>e===void 0?dt(t+1):`${M}${String(e+1)}${Ce}${String(t+1)}H`,"cursorTo");D((t,e)=>e===void 0?`${M}${String(t)}H`:`${M}${String(t)}${Ce}${String(e)}H`,"cursorPosition");D((t=1)=>`${M}${String(t)}I`,"cursorHorizontalForwardTab");D((t=1)=>`${M}${String(t)}Z`,"cursorBackwardTab");D((t=1)=>`${M}${String(t)}X`,"eraseCharacter");D((t=1)=>`${M}${String(t)}d`,"cursorVerticalAbsolute");const mt=D((t=1)=>`${M}${String(t)}A`,"cursorUp");var bt=(t=>(t[t.Default=0]="Default",t[t.BlinkingBlock=1]="BlinkingBlock",t[t.SteadyBlock=2]="SteadyBlock",t[t.BlinkingUnderline=3]="BlinkingUnderline",t[t.SteadyUnderline=4]="SteadyUnderline",t[t.BlinkingBar=5]="BlinkingBar",t[t.SteadyBar=6]="SteadyBar",t))(bt||{});D(t=>`${M}${String(t)} q`,"setCursorStyle");var yt=Object.defineProperty,$t=p((t,e)=>yt(t,"name",{value:e,configurable:!0}),"o$3"),vt=Object.defineProperty,St=$t((t,e)=>vt(t,"name",{value:e,configurable:!0}),"s"),wt=Object.defineProperty,we=St((t,e)=>wt(t,"name",{value:e,configurable:!0}),"o"),Z=(t=>(t[t.ToEnd=0]="ToEnd",t[t.ToBeginning=1]="ToBeginning",t[t.EntireScreen=2]="EntireScreen",t[t.EntireScreenAndScrollback=3]="EntireScreenAndScrollback",t))(Z||{});const U=we(t=>{const e=t>=0&&t<=3?t:0;return`${M}${e===0?"":String(e)}J`},"eraseDisplay");var Re=(t=>(t[t.ToEnd=0]="ToEnd",t[t.ToBeginning=1]="ToBeginning",t[t.EntireLine=2]="EntireLine",t))(Re||{});const ue=we(t=>{const e=t>=0&&t<=2?t:0;return`${M}${e===0?"":String(e)}K`},"eraseInLine");U(0);const xt=ue(2);ue(0);ue(1);we(t=>{if(t<=0)return"";let e="";for(let r=0;r<t;r+=1)e+=xt,r<t-1&&(e+=mt());return e+=ht,e},"eraseLines");U(2);U(1);U(3);pt(0,0)+U(Z.ToEnd);`${ue(Re.EntireLine)}${M}`;`${M}${U(Z.EntireScreen)}`;const Oe=ft?`${U(Z.EntireScreen)}${M}0f`:`${U(Z.EntireScreen)}${U(Z.EntireScreenAndScrollback)}${M}H${st}c`;var Lt=Object.defineProperty,ee=p((t,e)=>Lt(t,"name",{value:e,configurable:!0}),"t$2");function Ie(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}p(Ie,"getDefaultExportFromCjs");ee(Ie,"getDefaultExportFromCjs");function Tt(t){return t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}p(Tt,"getDefaultExportFromNamespaceIfPresent");ee(Tt,"getDefaultExportFromNamespaceIfPresent");function kt(t){return t&&Object.prototype.hasOwnProperty.call(t,"default")&&Object.keys(t).length===1?t.default:t}p(kt,"getDefaultExportFromNamespaceIfNotNamed");ee(kt,"getDefaultExportFromNamespaceIfNotNamed");function Mt(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var r=ee(p(function s(){var i=!1;try{i=this instanceof s}catch{}return i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)},"a"),"a");r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(s){var i=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:ee(function(){return t[s]},"get")})}),r}p(Mt,"getAugmentedNamespace");ee(Mt,"getAugmentedNamespace");var ae={exports:{}},je;function Ot(){return je||(je=1,(function(t,e){var r=Object.defineProperty,s=p((f,l)=>r(f,"name",{value:l,configurable:!0}),"$");const{hasOwnProperty:i}=Object.prototype,a=Q();a.configure=Q,a.stringify=a,a.default=a,e.stringify=a,e.configure=Q,t.exports=a;const u=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function n(f){return f.length<5e3&&!u.test(f)?`"${f}"`:JSON.stringify(f)}p(n,"strEscape"),s(n,"strEscape");function g(f,l){if(f.length>200||l)return f.sort(l);for(let $=1;$<f.length;$++){const N=f[$];let T=$;for(;T!==0&&f[T-1]>N;)f[T]=f[T-1],T--;f[T]=N}return f}p(g,"sort"),s(g,"sort");const y=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function c(f){return y.call(f)!==void 0&&f.length!==0}p(c,"isTypedArrayWithEntries"),s(c,"isTypedArrayWithEntries");function d(f,l,$){f.length<$&&($=f.length);const N=l===","?"":" ";let T=`"0":${N}${f[0]}`;for(let P=1;P<$;P++)T+=`${l}"${P}":${N}${f[P]}`;return T}p(d,"stringifyTypedArray"),s(d,"stringifyTypedArray");function b(f){if(i.call(f,"circularValue")){const l=f.circularValue;if(typeof l=="string")return`"${l}"`;if(l==null)return l;if(l===Error||l===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]"'}p(b,"getCircularValueOption"),s(b,"getCircularValueOption");function A(f){let l;if(i.call(f,"deterministic")&&(l=f.deterministic,typeof l!="boolean"&&typeof l!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return l===void 0?!0:l}p(A,"getDeterministicOption"),s(A,"getDeterministicOption");function q(f,l){let $;if(i.call(f,l)&&($=f[l],typeof $!="boolean"))throw new TypeError(`The "${l}" argument must be of type boolean`);return $===void 0?!0:$}p(q,"getBooleanOption"),s(q,"getBooleanOption");function z(f,l){let $;if(i.call(f,l)){if($=f[l],typeof $!="number")throw new TypeError(`The "${l}" argument must be of type number`);if(!Number.isInteger($))throw new TypeError(`The "${l}" argument must be an integer`);if($<1)throw new RangeError(`The "${l}" argument must be >= 1`)}return $===void 0?1/0:$}p(z,"getPositiveIntegerOption"),s(z,"getPositiveIntegerOption");function R(f){return f===1?"1 item":`${f} items`}p(R,"getItemCount"),s(R,"getItemCount");function F(f){const l=new Set;for(const $ of f)(typeof $=="string"||typeof $=="number")&&l.add(String($));return l}p(F,"getUniqueReplacerSet"),s(F,"getUniqueReplacerSet");function Y(f){if(i.call(f,"strict")){const l=f.strict;if(typeof l!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(l)return $=>{let N=`Object can not safely be stringified. Received type ${typeof $}`;throw typeof $!="function"&&(N+=` (${$.toString()})`),new Error(N)}}}p(Y,"getStrictOption"),s(Y,"getStrictOption");function Q(f){f={...f};const l=Y(f);l&&(f.bigint===void 0&&(f.bigint=!1),"circularValue"in f||(f.circularValue=Error));const $=b(f),N=q(f,"bigint"),T=A(f),P=typeof T=="function"?T:void 0,J=z(f,"maximumDepth"),O=z(f,"maximumBreadth");function te(_,o,h,w,v,x){let m=o[_];switch(typeof m=="object"&&m!==null&&typeof m.toJSON=="function"&&(m=m.toJSON(_)),m=w.call(o,_,m),typeof m){case"string":return n(m);case"object":{if(m===null)return"null";if(h.indexOf(m)!==-1)return $;let S="",j=",";const E=x;if(Array.isArray(m)){if(m.length===0)return"[]";if(J<h.length+1)return'"[Array]"';h.push(m),v!==""&&(x+=v,S+=`
1
+ var Ge=Object.defineProperty;var p=(t,e)=>Ge(t,"name",{value:e,configurable:!0});import{createRequire as ze}from"node:module";import{InteractiveManager as We,InteractiveStreamHook as Me}from"@visulima/interactive-manager";import{L as Ue,s as le,E as Ye,a as Se,p as ce,i as _e,A as Qe,u as Ke,O as Xe,b as Ze,o as ne,c as et,d as tt,B as rt,G as ge}from"./packem_shared/abstract-pretty-reporter-DE6N5YR9.js";import De from"@visulima/colorize";import{PailError as Vr,createPailError as Gr}from"./packem_shared/createPailError-53jAfQ-T.js";const Br=ze(import.meta.url),He=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,{stdout:$e,stderr:ve,env:se}=He,st="\x1B",M="\x1B[",Ce=";";var it=Object.defineProperty,ot=p((t,e)=>it(t,"name",{value:e,configurable:!0}),"t$3"),nt=Object.defineProperty,at=ot((t,e)=>nt(t,"name",{value:e,configurable:!0}),"t");const lt=typeof globalThis<"u"&&typeof globalThis.window=="object"&&globalThis.window.document!==void 0,ct=/^(?:msys|cygwin)$/,ft=!lt&&(process.platform==="win32"||ct.test(process.env.OSTYPE));var ut=Object.defineProperty,D=at((t,e)=>ut(t,"name",{value:e,configurable:!0}),"n");const gt=D((t=1)=>`${M}${String(t)}D`,"cursorBackward");D((t=1)=>`${M}${String(t)}B`,"cursorDown");D((t=1)=>`${M}${String(t)}C`,"cursorForward");const ht=`${M}G`;D((t=1)=>gt(t),"cursorLeft");const dt=D((t=1)=>`${M}${String(t)}G`,"cursorHorizontalAbsolute");D((t,e)=>{let r="";return t<0?r+=`${M}${String(-t)}D`:t>0&&(r+=`${M}${String(t)}C`),e<0?r+=`${M}${String(-e)}A`:e>0&&(r+=`${M}${String(e)}B`),r},"cursorMove");D((t=1)=>`${M}${String(t)}E`,"cursorNextLine");D((t=1)=>`${M}${String(t)}F`,"cursorPreviousLine");const pt=D((t,e)=>e===void 0?dt(t+1):`${M}${String(e+1)}${Ce}${String(t+1)}H`,"cursorTo");D((t,e)=>e===void 0?`${M}${String(t)}H`:`${M}${String(t)}${Ce}${String(e)}H`,"cursorPosition");D((t=1)=>`${M}${String(t)}I`,"cursorHorizontalForwardTab");D((t=1)=>`${M}${String(t)}Z`,"cursorBackwardTab");D((t=1)=>`${M}${String(t)}X`,"eraseCharacter");D((t=1)=>`${M}${String(t)}d`,"cursorVerticalAbsolute");const mt=D((t=1)=>`${M}${String(t)}A`,"cursorUp");var bt=(t=>(t[t.Default=0]="Default",t[t.BlinkingBlock=1]="BlinkingBlock",t[t.SteadyBlock=2]="SteadyBlock",t[t.BlinkingUnderline=3]="BlinkingUnderline",t[t.SteadyUnderline=4]="SteadyUnderline",t[t.BlinkingBar=5]="BlinkingBar",t[t.SteadyBar=6]="SteadyBar",t))(bt||{});D(t=>`${M}${String(t)} q`,"setCursorStyle");var yt=Object.defineProperty,$t=p((t,e)=>yt(t,"name",{value:e,configurable:!0}),"o$3"),vt=Object.defineProperty,St=$t((t,e)=>vt(t,"name",{value:e,configurable:!0}),"s"),wt=Object.defineProperty,we=St((t,e)=>wt(t,"name",{value:e,configurable:!0}),"o"),Z=(t=>(t[t.ToEnd=0]="ToEnd",t[t.ToBeginning=1]="ToBeginning",t[t.EntireScreen=2]="EntireScreen",t[t.EntireScreenAndScrollback=3]="EntireScreenAndScrollback",t))(Z||{});const U=we(t=>{const e=t>=0&&t<=3?t:0;return`${M}${e===0?"":String(e)}J`},"eraseDisplay");var Re=(t=>(t[t.ToEnd=0]="ToEnd",t[t.ToBeginning=1]="ToBeginning",t[t.EntireLine=2]="EntireLine",t))(Re||{});const ue=we(t=>{const e=t>=0&&t<=2?t:0;return`${M}${e===0?"":String(e)}K`},"eraseInLine");U(0);const xt=ue(2);ue(0);ue(1);we(t=>{if(t<=0)return"";let e="";for(let r=0;r<t;r+=1)e+=xt,r<t-1&&(e+=mt());return e+=ht,e},"eraseLines");U(2);U(1);U(3);pt(0,0)+U(Z.ToEnd);`${ue(Re.EntireLine)}${M}`;`${M}${U(Z.EntireScreen)}`;const Oe=ft?`${U(Z.EntireScreen)}${M}0f`:`${U(Z.EntireScreen)}${U(Z.EntireScreenAndScrollback)}${M}H${st}c`;var Lt=Object.defineProperty,ee=p((t,e)=>Lt(t,"name",{value:e,configurable:!0}),"t$2");function Ie(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}p(Ie,"getDefaultExportFromCjs");ee(Ie,"getDefaultExportFromCjs");function Tt(t){return t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}p(Tt,"getDefaultExportFromNamespaceIfPresent");ee(Tt,"getDefaultExportFromNamespaceIfPresent");function kt(t){return t&&Object.prototype.hasOwnProperty.call(t,"default")&&Object.keys(t).length===1?t.default:t}p(kt,"getDefaultExportFromNamespaceIfNotNamed");ee(kt,"getDefaultExportFromNamespaceIfNotNamed");function Mt(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var r=ee(p(function s(){var i=!1;try{i=this instanceof s}catch{}return i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)},"a"),"a");r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(s){var i=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:ee(function(){return t[s]},"get")})}),r}p(Mt,"getAugmentedNamespace");ee(Mt,"getAugmentedNamespace");var ae={exports:{}},je;function Ot(){return je||(je=1,(function(t,e){var r=Object.defineProperty,s=p((f,l)=>r(f,"name",{value:l,configurable:!0}),"$");const{hasOwnProperty:i}=Object.prototype,a=Q();a.configure=Q,a.stringify=a,a.default=a,e.stringify=a,e.configure=Q,t.exports=a;const u=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function n(f){return f.length<5e3&&!u.test(f)?`"${f}"`:JSON.stringify(f)}p(n,"strEscape"),s(n,"strEscape");function g(f,l){if(f.length>200||l)return f.sort(l);for(let $=1;$<f.length;$++){const N=f[$];let T=$;for(;T!==0&&f[T-1]>N;)f[T]=f[T-1],T--;f[T]=N}return f}p(g,"sort"),s(g,"sort");const y=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function c(f){return y.call(f)!==void 0&&f.length!==0}p(c,"isTypedArrayWithEntries"),s(c,"isTypedArrayWithEntries");function d(f,l,$){f.length<$&&($=f.length);const N=l===","?"":" ";let T=`"0":${N}${f[0]}`;for(let P=1;P<$;P++)T+=`${l}"${P}":${N}${f[P]}`;return T}p(d,"stringifyTypedArray"),s(d,"stringifyTypedArray");function b(f){if(i.call(f,"circularValue")){const l=f.circularValue;if(typeof l=="string")return`"${l}"`;if(l==null)return l;if(l===Error||l===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]"'}p(b,"getCircularValueOption"),s(b,"getCircularValueOption");function A(f){let l;if(i.call(f,"deterministic")&&(l=f.deterministic,typeof l!="boolean"&&typeof l!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return l===void 0?!0:l}p(A,"getDeterministicOption"),s(A,"getDeterministicOption");function q(f,l){let $;if(i.call(f,l)&&($=f[l],typeof $!="boolean"))throw new TypeError(`The "${l}" argument must be of type boolean`);return $===void 0?!0:$}p(q,"getBooleanOption"),s(q,"getBooleanOption");function z(f,l){let $;if(i.call(f,l)){if($=f[l],typeof $!="number")throw new TypeError(`The "${l}" argument must be of type number`);if(!Number.isInteger($))throw new TypeError(`The "${l}" argument must be an integer`);if($<1)throw new RangeError(`The "${l}" argument must be >= 1`)}return $===void 0?1/0:$}p(z,"getPositiveIntegerOption"),s(z,"getPositiveIntegerOption");function R(f){return f===1?"1 item":`${f} items`}p(R,"getItemCount"),s(R,"getItemCount");function F(f){const l=new Set;for(const $ of f)(typeof $=="string"||typeof $=="number")&&l.add(String($));return l}p(F,"getUniqueReplacerSet"),s(F,"getUniqueReplacerSet");function Y(f){if(i.call(f,"strict")){const l=f.strict;if(typeof l!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(l)return $=>{let N=`Object can not safely be stringified. Received type ${typeof $}`;throw typeof $!="function"&&(N+=` (${$.toString()})`),new Error(N)}}}p(Y,"getStrictOption"),s(Y,"getStrictOption");function Q(f){f={...f};const l=Y(f);l&&(f.bigint===void 0&&(f.bigint=!1),"circularValue"in f||(f.circularValue=Error));const $=b(f),N=q(f,"bigint"),T=A(f),P=typeof T=="function"?T:void 0,J=z(f,"maximumDepth"),O=z(f,"maximumBreadth");function te(_,o,h,w,v,x){let m=o[_];switch(typeof m=="object"&&m!==null&&typeof m.toJSON=="function"&&(m=m.toJSON(_)),m=w.call(o,_,m),typeof m){case"string":return n(m);case"object":{if(m===null)return"null";if(h.indexOf(m)!==-1)return $;let S="",j=",";const E=x;if(Array.isArray(m)){if(m.length===0)return"[]";if(J<h.length+1)return'"[Array]"';h.push(m),v!==""&&(x+=v,S+=`
2
2
  ${x}`,j=`,
3
3
  ${x}`);const I=Math.min(m.length,O);let H=0;for(;H<I-1;H++){const oe=te(String(H),m,h,w,v,x);S+=oe!==void 0?oe:"null",S+=j}const W=te(String(H),m,h,w,v,x);if(S+=W!==void 0?W:"null",m.length-1>O){const oe=m.length-O-1;S+=`${j}"... ${R(oe)} not stringified"`}return v!==""&&(S+=`
4
4
  ${E}`),h.pop(),`[${S}]`}let k=Object.keys(m);const B=k.length;if(B===0)return"{}";if(J<h.length+1)return'"[Object]"';let L="",C="";v!==""&&(x+=v,j=`,
@@ -16,7 +16,7 @@ ${v}`,V=Math.min(o.length,O);let I=0;for(;I<V-1;I++){const W=K(String(I),o[I],h,
16
16
  ${x}`,h.pop(),`[${L}]`}let m=Object.keys(o);const S=m.length;if(S===0)return"{}";if(J<h.length+1)return'"[Object]"';v+=w;const j=`,
17
17
  ${v}`;let E="",k="",B=Math.min(S,O);c(o)&&(E+=d(o,j,O),m=m.slice(o.length),B-=o.length,k=j),T&&(m=g(m,P)),h.push(o);for(let L=0;L<B;L++){const C=m[L],V=K(C,o[C],h,w,v);V!==void 0&&(E+=`${k}${n(C)}: ${V}`,k=j)}if(S>O){const L=S-O;E+=`${k}"...": "${R(L)} not stringified"`,k=j}return k!==""&&(E=`
18
18
  ${v}${E}
19
- ${x}`),h.pop(),`{${E}}`}case"number":return isFinite(o)?String(o):l?l(o):"null";case"boolean":return o===!0?"true":"false";case"undefined":return;case"bigint":if(N)return String(o);default:return l?l(o):void 0}}p(K,"V"),s(K,"stringifyIndent");function X(_,o,h){switch(typeof o){case"string":return n(o);case"object":{if(o===null)return"null";if(typeof o.toJSON=="function"){if(o=o.toJSON(_),typeof o!="object")return X(_,o,h);if(o===null)return"null"}if(h.indexOf(o)!==-1)return $;let w="";const v=o.length!==void 0;if(v&&Array.isArray(o)){if(o.length===0)return"[]";if(J<h.length+1)return'"[Array]"';h.push(o);const E=Math.min(o.length,O);let k=0;for(;k<E-1;k++){const L=X(String(k),o[k],h);w+=L!==void 0?L:"null",w+=","}const B=X(String(k),o[k],h);if(w+=B!==void 0?B:"null",o.length-1>O){const L=o.length-O-1;w+=`,"... ${R(L)} not stringified"`}return h.pop(),`[${w}]`}let x=Object.keys(o);const m=x.length;if(m===0)return"{}";if(J<h.length+1)return'"[Object]"';let S="",j=Math.min(m,O);v&&c(o)&&(w+=d(o,",",O),x=x.slice(o.length),j-=o.length,S=","),T&&(x=g(x,P)),h.push(o);for(let E=0;E<j;E++){const k=x[E],B=X(k,o[k],h);B!==void 0&&(w+=`${S}${n(k)}:${B}`,S=",")}if(m>O){const E=m-O;w+=`${S}"...":"${R(E)} not stringified"`}return h.pop(),`{${w}}`}case"number":return isFinite(o)?String(o):l?l(o):"null";case"boolean":return o===!0?"true":"false";case"undefined":return;case"bigint":if(N)return String(o);default:return l?l(o):void 0}}p(X,"N"),s(X,"stringifySimple");function ke(_,o,h){if(arguments.length>1){let w="";if(typeof h=="number"?w=" ".repeat(Math.min(h,10)):typeof h=="string"&&(w=h.slice(0,10)),o!=null){if(typeof o=="function")return te("",{"":_},[],o,w,"");if(Array.isArray(o))return re("",_,[],F(o),w,"")}if(w.length!==0)return K("",_,[],w,"")}return X("",_,[])}return p(ke,"M"),s(ke,"stringify"),ke}p(Q,"configure"),s(Q,"configure")})(ae,ae.exports)),ae.exports}p(Ot,"requireSafeStableStringify");var jt=Ot();const Et=Ie(jt),At=Et.configure;var Pt=Object.defineProperty,Bt=p((t,e)=>Pt(t,"name",{value:e,configurable:!0}),"o$1");const Nt=Bt(t=>{const e=console;return t==="error"?e.__error??console.error:t==="warn"?e.__warn??console.warn:t==="trace"?e.__trace??console.trace:e.__log??console.log},"writeConsoleLogBasedOnLevel");var _t=Object.defineProperty,Dt=p((t,e)=>_t(t,"name",{value:e,configurable:!0}),"t");let Ct=class{static{p(this,"a")}static{Dt(this,"RawReporter")}log(e){const{context:r=[],message:s,type:i}=e;Nt(i.level)(s,...r)}};var Rt=Object.defineProperty,It=p((t,e)=>Rt(t,"name",{value:e,configurable:!0}),"a");const me=It(t=>t===void 0?[]:Array.isArray(t)?t:[t],"arrayify");var Ft=Object.defineProperty,qt=p((t,e)=>Ft(t,"name",{value:e,configurable:!0}),"g$3");const be=qt((t,e)=>{const r={...t};return Object.keys(e).forEach(s=>{r[s]={...r[s],...e[s]}}),r},"mergeTypes");var Jt=Object.defineProperty,ye=p((t,e)=>Jt(t,"name",{value:e,configurable:!0}),"d");const Vt=ye(t=>{let e=!1;return function(...r){if(!e){e=!0;try{const s=t.apply(this,r);return e=!1,s}catch(s){throw e=!1,s}}}},"preventLoop");class xe{static{p(this,"PailBrowserImpl")}static{ye(this,"PailBrowserImpl")}timersMap;countMap;seqTimers;lastLog;logLevels;disabled;paused;messageQueue;scopeName;types;longestLabel;processors;generalLogLevel;reporters;throttle;throttleMin;stringify;groups;startTimerMessage;endTimerMessage;rawReporter;force={};constructor(e){this.throttle=e.throttle??1e3,this.throttleMin=e.throttleMin??5;const r=e.parentLongestLabel,s=e.parentTypes,i=e.parentStringify,a=e.parentLogLevels;this.stringify=i??At({strict:!0}),this.startTimerMessage=e.messages?.timerStart??"Initialized timer...",this.endTimerMessage=e.messages?.timerEnd??"Timer run for:",s&&r?(this.types=s,this.longestLabel=r):(this.types=be(Ue,e.types??{}),this.longestLabel=le(this.types)),this.logLevels=a&&!e.logLevels?a:{...Ye,...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=me(e.scope).filter(Boolean),this.timersMap=new Map,this.countMap=new Map,this.groups=[],this.seqTimers=new Set,this.lastLog={},this.logger=Vt(this.logger.bind(this)),this.#r(),Array.isArray(e.reporters)&&this.registerReporters(e.reporters),this.rawReporter=this.extendReporter(e.rawReporter??new Ct),Array.isArray(e.processors)&&this.registerProcessors(e.processors)}#r(){for(const e in this.types)this[e]=this.logger.bind(this,e,!1,!1);for(const e in this.types)this.force[e]=this.logger.bind(this,e,!1,!0)}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(let r=0;r<e.length;r+=1){const{messageObject:s,raw:i,type:a}=e[r];this.logger(a,i,!1,...s)}}scope(...e){if(e.length===0)throw new Error("No scope name was defined.");return this.scopeName=e.flat(),this}unscope(){this.scopeName=[]}child(e){const r=e?.types!==void 0,s=r?be(this.types,e.types):this.types,i=e?.reporters??[],a=i.length>0?[...this.reporters,...i]:[...this.reporters],u=e?.processors??[],n=u.length>0?[...this.processors,...u]:[...this.processors],g=e?.logLevels?{...this.logLevels,...e.logLevels}:this.logLevels;let y;if(e?.scope){const b=me(e.scope).filter(Boolean);y=this.scopeName.length>0?[...this.scopeName,...b]:b}else y=this.scopeName.length>0?this.scopeName:[];const c=e?.messages?{timerEnd:this.endTimerMessage,timerStart:this.startTimerMessage,...e.messages}:{timerEnd:this.endTimerMessage,timerStart:this.startTimerMessage},d={disabled:e?.disabled??this.disabled,logLevel:e?.logLevel??this.generalLogLevel,logLevels:g,messages:c,processors:n,rawReporter:e?.rawReporter??this.rawReporter,reporters:a,scope:y,throttle:e?.throttle??this.throttle,throttleMin:e?.throttleMin??this.throttleMin};return r?(d.parentTypes=s,d.parentLongestLabel=le(s)):(d.parentTypes=this.types,d.parentLongestLabel=this.longestLabel),e?.logLevels||(d.parentLogLevels=this.logLevels),e?.messages||(d.parentMessages={timerEnd:this.endTimerMessage,timerStart:this.startTimerMessage}),d.parentStringify=this.stringify,new xe(d)}time(e="default"){this.seqTimers.has(e)?this.logger("warn",!1,!1,{message:`Timer '${e}' already exists`,prefix:e}):(this.seqTimers.add(e),this.timersMap.set(e,Date.now()),this.logger("start",!1,!1,{message:this.startTimerMessage,prefix:e}))}timeLog(e,...r){if(!e&&this.seqTimers.size>0&&(e=[...this.seqTimers].pop()),e&&this.timersMap.has(e)){const s=Date.now()-this.timersMap.get(e);this.logger("info",!1,!1,{context:r,message:s<1e3?`${String(s)} ms`:`${(s/1e3).toFixed(2)} s`,prefix:e})}else this.logger("warn",!1,!1,{context:r,message:"Timer not found",prefix:e})}timeEnd(e){if(!e&&this.seqTimers.size>0&&(e=[...this.seqTimers].pop()),e&&this.timersMap.has(e)){const r=Date.now()-this.timersMap.get(e);this.timersMap.delete(e),this.logger("stop",!1,!1,{message:`${this.endTimerMessage} ${r<1e3?`${String(r)} ms`:`${(r/1e3).toFixed(2)} s`}`,prefix:e})}else this.logger("warn",!1,!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 r=this.countMap.get(e)??0;this.countMap.set(e,r+1),this.logger("log",!1,!1,{message:`${e}: ${String(r+1)}`,prefix:e})}countReset(e="default"){this.countMap.has(e)?this.countMap.delete(e):this.logger("warn",!1,!1,{message:`Count for ${e} does not exist`,prefix:e})}clear(){console.clear()}raw(e,...r){this.disabled||this.logger("log",!0,!1,{context:r,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(let r=0;r<e.length;r+=1)this.reporters.add(this.extendReporter(e[r]))}registerProcessors(e){for(let r=0;r<e.length;r+=1){const s=e[r];typeof s.setStringify=="function"&&s.setStringify(this.stringify),this.processors.add(s)}}#e(e,r){if(r)this.rawReporter.log(Object.freeze(e));else for(const s of this.reporters)s.log(Object.freeze(e))}#t(e){return e&&this.logLevels[e]?e:"debug"}#s(e,r,...s){const i={badge:void 0,context:void 0,error:void 0,label:void 0,message:Se,prefix:void 0,repeated:void 0,scope:void 0,suffix:void 0};if(i.type={level:r.logLevel,name:e},i.groups=this.groups,i.scope=this.scopeName,i.date=new Date,s.length>0&&s[0]instanceof Error)i.error=s[0],s.length>1&&(i.context=s.slice(1));else if(s.length>0&&typeof s[0]=="object"&&s[0]!==null&&"message"in s[0]){const{context:a,message:u,prefix:n,suffix:g}=s[0];if(a&&(i.context=a),n&&(i.prefix=n),g&&(i.suffix=g),i.message=u,s.length>1){const y=s.slice(1);i.context?i.context=Array.isArray(i.context)?[...i.context,...y]:[i.context,...y]:i.context=y}}else s.length>1?(i.message=s[0],i.context=s.slice(1)):s.length===1?i.message=s[0]:i.message=void 0;return r.logLevel==="trace"&&(i.traceError=new Error("Trace")),r.badge&&(i.badge=r.badge),r.label&&(i.label=r.label),i}logger(e,r,s,...i){if(this.disabled)return;if(this.paused){this.messageQueue.push({messageObject:i,raw:r,type:e});return}const a=this.types[e],u=this.#t(a.logLevel);if(s||this.logLevels[u]>=this.logLevels[this.generalLogLevel]){let n=this.#s(e,a,...i);const g=ye((c=!1)=>{const d=(this.lastLog.count??0)-this.throttleMin;if(this.lastLog.object&&d>0){const b={...this.lastLog.object};d>1&&(b.repeated=d),this.#e(b,r),this.lastLog.count=1}if(c){for(const b of this.processors)n={...b.process(n)};this.lastLog.object=n,this.#e(n,r)}},"resolveLog");clearTimeout(this.lastLog.timeout);const y=this.lastLog.time&&n.date?new Date(n.date).getTime()-this.lastLog.time.getTime():0;if(this.lastLog.time=new Date(n.date),y<this.throttle)try{if(this.lastLog.object&&JSON.stringify([n.label,n.scope,n.type,n.message,n.prefix,n.suffix,n.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(g,this.throttle);return}}catch{}g(!0)}}}var Gt=Object.defineProperty,zt=p((t,e)=>Gt(t,"name",{value:e,configurable:!0}),"c$1");let Ht=class{static{p(this,"v")}static{zt(this,"RawReporter")}#r;#e;#t;#s=!1;#i;constructor(e={}){this.#r=$e,this.#e=ve,this.#i=e}setStdout(e){this.#r=e}setStderr(e){this.#e=e}setInteractiveManager(e){this.#t=e}setIsInteractive(e){this.#s=e}log(e){const{context:r,groups:s,message:i,type:a}=e,u=[];if(i!==Se){const c=typeof i=="string"?i:ce(i,this.#i);u.push(c)}r&&u.push(...r.map(c=>typeof c=="object"?` ${ce(c,this.#i)}`:` ${String(c)}`));const n=["error","trace","warn"].includes(a.level)?"stderr":"stdout",g=n==="stderr"?this.#e:this.#r,y=s.map(()=>" ").join("");this.#s&&this.#t!==void 0&&g.isTTY?this.#t.update(n,(y+u.join("")).split(`
19
+ ${x}`),h.pop(),`{${E}}`}case"number":return isFinite(o)?String(o):l?l(o):"null";case"boolean":return o===!0?"true":"false";case"undefined":return;case"bigint":if(N)return String(o);default:return l?l(o):void 0}}p(K,"V"),s(K,"stringifyIndent");function X(_,o,h){switch(typeof o){case"string":return n(o);case"object":{if(o===null)return"null";if(typeof o.toJSON=="function"){if(o=o.toJSON(_),typeof o!="object")return X(_,o,h);if(o===null)return"null"}if(h.indexOf(o)!==-1)return $;let w="";const v=o.length!==void 0;if(v&&Array.isArray(o)){if(o.length===0)return"[]";if(J<h.length+1)return'"[Array]"';h.push(o);const E=Math.min(o.length,O);let k=0;for(;k<E-1;k++){const L=X(String(k),o[k],h);w+=L!==void 0?L:"null",w+=","}const B=X(String(k),o[k],h);if(w+=B!==void 0?B:"null",o.length-1>O){const L=o.length-O-1;w+=`,"... ${R(L)} not stringified"`}return h.pop(),`[${w}]`}let x=Object.keys(o);const m=x.length;if(m===0)return"{}";if(J<h.length+1)return'"[Object]"';let S="",j=Math.min(m,O);v&&c(o)&&(w+=d(o,",",O),x=x.slice(o.length),j-=o.length,S=","),T&&(x=g(x,P)),h.push(o);for(let E=0;E<j;E++){const k=x[E],B=X(k,o[k],h);B!==void 0&&(w+=`${S}${n(k)}:${B}`,S=",")}if(m>O){const E=m-O;w+=`${S}"...":"${R(E)} not stringified"`}return h.pop(),`{${w}}`}case"number":return isFinite(o)?String(o):l?l(o):"null";case"boolean":return o===!0?"true":"false";case"undefined":return;case"bigint":if(N)return String(o);default:return l?l(o):void 0}}p(X,"N"),s(X,"stringifySimple");function ke(_,o,h){if(arguments.length>1){let w="";if(typeof h=="number"?w=" ".repeat(Math.min(h,10)):typeof h=="string"&&(w=h.slice(0,10)),o!=null){if(typeof o=="function")return te("",{"":_},[],o,w,"");if(Array.isArray(o))return re("",_,[],F(o),w,"")}if(w.length!==0)return K("",_,[],w,"")}return X("",_,[])}return p(ke,"M"),s(ke,"stringify"),ke}p(Q,"configure"),s(Q,"configure")})(ae,ae.exports)),ae.exports}p(Ot,"requireSafeStableStringify");var jt=Ot();const Et=Ie(jt),At=Et.configure;var Pt=Object.defineProperty,Bt=p((t,e)=>Pt(t,"name",{value:e,configurable:!0}),"o$1");const Nt=Bt(t=>{const e=console;return t==="error"?e.__error??console.error:t==="warn"?e.__warn??console.warn:t==="trace"?e.__trace??console.trace:e.__log??console.log},"writeConsoleLogBasedOnLevel");var _t=Object.defineProperty,Dt=p((t,e)=>_t(t,"name",{value:e,configurable:!0}),"t");let Ct=class{static{p(this,"a")}static{Dt(this,"RawReporter")}log(e){const{context:r=[],message:s,type:i}=e;Nt(i.level)(s,...r)}};var Rt=Object.defineProperty,It=p((t,e)=>Rt(t,"name",{value:e,configurable:!0}),"a");const me=It(t=>t===void 0?[]:Array.isArray(t)?t:[t],"arrayify");var Ft=Object.defineProperty,qt=p((t,e)=>Ft(t,"name",{value:e,configurable:!0}),"g$3");const be=qt((t,e)=>{const r={...t};return Object.keys(e).forEach(s=>{r[s]={...r[s],...e[s]}}),r},"mergeTypes");var Jt=Object.defineProperty,ye=p((t,e)=>Jt(t,"name",{value:e,configurable:!0}),"d");const Vt=ye(t=>{let e=!1;return function(...r){if(!e){e=!0;try{const s=t.apply(this,r);return e=!1,s}catch(s){throw e=!1,s}}}},"preventLoop");class xe{static{p(this,"PailBrowserImpl")}static{ye(this,"PailBrowserImpl")}timersMap;countMap;seqTimers;lastLog;logLevels;disabled;paused;messageQueue;scopeName;types;longestLabel;processors;generalLogLevel;reporters;throttle;throttleMin;stringify;groups;startTimerMessage;endTimerMessage;rawReporter;force={};constructor(e){this.throttle=e.throttle??1e3,this.throttleMin=e.throttleMin??5;const r=e.parentLongestLabel,s=e.parentTypes,i=e.parentStringify,a=e.parentLogLevels;this.stringify=i??At({strict:!0}),this.startTimerMessage=e.messages?.timerStart??"Initialized timer...",this.endTimerMessage=e.messages?.timerEnd??"Timer run for:",s&&r?(this.types=s,this.longestLabel=r):(this.types=be(Ue,e.types??{}),this.longestLabel=le(this.types)),this.logLevels=a&&!e.logLevels?a:{...Ye,...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=me(e.scope).filter(Boolean),this.timersMap=new Map,this.countMap=new Map,this.groups=[],this.seqTimers=new Set,this.lastLog={},this.logger=Vt(this.logger.bind(this)),this.#r(),Array.isArray(e.reporters)&&this.registerReporters(e.reporters),this.rawReporter=this.extendReporter(e.rawReporter??new Ct),Array.isArray(e.processors)&&this.registerProcessors(e.processors)}#r(){for(const e in this.types)this[e]=this.logger.bind(this,e,!1,!1);for(const e in this.types)this.force[e]=this.logger.bind(this,e,!1,!0);this.raw=this.raw.bind(this)}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(let r=0;r<e.length;r+=1){const{messageObject:s,raw:i,type:a}=e[r];this.logger(a,i,!1,...s)}}scope(...e){if(e.length===0)throw new Error("No scope name was defined.");return this.scopeName=e.flat(),this}unscope(){this.scopeName=[]}child(e){const r=e?.types!==void 0,s=r?be(this.types,e.types):this.types,i=e?.reporters??[],a=i.length>0?[...this.reporters,...i]:[...this.reporters],u=e?.processors??[],n=u.length>0?[...this.processors,...u]:[...this.processors],g=e?.logLevels?{...this.logLevels,...e.logLevels}:this.logLevels;let y;if(e?.scope){const b=me(e.scope).filter(Boolean);y=this.scopeName.length>0?[...this.scopeName,...b]:b}else y=this.scopeName.length>0?this.scopeName:[];const c=e?.messages?{timerEnd:this.endTimerMessage,timerStart:this.startTimerMessage,...e.messages}:{timerEnd:this.endTimerMessage,timerStart:this.startTimerMessage},d={disabled:e?.disabled??this.disabled,logLevel:e?.logLevel??this.generalLogLevel,logLevels:g,messages:c,processors:n,rawReporter:e?.rawReporter??this.rawReporter,reporters:a,scope:y,throttle:e?.throttle??this.throttle,throttleMin:e?.throttleMin??this.throttleMin};return r?(d.parentTypes=s,d.parentLongestLabel=le(s)):(d.parentTypes=this.types,d.parentLongestLabel=this.longestLabel),e?.logLevels||(d.parentLogLevels=this.logLevels),e?.messages||(d.parentMessages={timerEnd:this.endTimerMessage,timerStart:this.startTimerMessage}),d.parentStringify=this.stringify,new xe(d)}time(e="default"){this.seqTimers.has(e)?this.logger("warn",!1,!1,{message:`Timer '${e}' already exists`,prefix:e}):(this.seqTimers.add(e),this.timersMap.set(e,Date.now()),this.logger("start",!1,!1,{message:this.startTimerMessage,prefix:e}))}timeLog(e,...r){if(!e&&this.seqTimers.size>0&&(e=[...this.seqTimers].pop()),e&&this.timersMap.has(e)){const s=Date.now()-this.timersMap.get(e);this.logger("info",!1,!1,{context:r,message:s<1e3?`${String(s)} ms`:`${(s/1e3).toFixed(2)} s`,prefix:e})}else this.logger("warn",!1,!1,{context:r,message:"Timer not found",prefix:e})}timeEnd(e){if(!e&&this.seqTimers.size>0&&(e=[...this.seqTimers].pop()),e&&this.timersMap.has(e)){const r=Date.now()-this.timersMap.get(e);this.timersMap.delete(e),this.logger("stop",!1,!1,{message:`${this.endTimerMessage} ${r<1e3?`${String(r)} ms`:`${(r/1e3).toFixed(2)} s`}`,prefix:e})}else this.logger("warn",!1,!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 r=this.countMap.get(e)??0;this.countMap.set(e,r+1),this.logger("log",!1,!1,{message:`${e}: ${String(r+1)}`,prefix:e})}countReset(e="default"){this.countMap.has(e)?this.countMap.delete(e):this.logger("warn",!1,!1,{message:`Count for ${e} does not exist`,prefix:e})}clear(){console.clear()}raw(e,...r){this.disabled||this.logger("log",!0,!1,{context:r,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(let r=0;r<e.length;r+=1)this.reporters.add(this.extendReporter(e[r]))}registerProcessors(e){for(let r=0;r<e.length;r+=1){const s=e[r];typeof s.setStringify=="function"&&s.setStringify(this.stringify),this.processors.add(s)}}#e(e,r){if(r)this.rawReporter.log(Object.freeze(e));else for(const s of this.reporters)s.log(Object.freeze(e))}#t(e){return e&&this.logLevels[e]?e:"debug"}#s(e,r,...s){const i={badge:void 0,context:void 0,error:void 0,label:void 0,message:Se,prefix:void 0,repeated:void 0,scope:void 0,suffix:void 0};if(i.type={level:r.logLevel,name:e},i.groups=this.groups,i.scope=this.scopeName,i.date=new Date,s.length>0&&s[0]instanceof Error)i.error=s[0],s.length>1&&(i.context=s.slice(1));else if(s.length>0&&typeof s[0]=="object"&&s[0]!==null&&"message"in s[0]){const{context:a,message:u,prefix:n,suffix:g}=s[0];if(a&&(i.context=a),n&&(i.prefix=n),g&&(i.suffix=g),i.message=u,s.length>1){const y=s.slice(1);i.context?i.context=Array.isArray(i.context)?[...i.context,...y]:[i.context,...y]:i.context=y}}else s.length>1?(i.message=s[0],i.context=s.slice(1)):s.length===1?i.message=s[0]:i.message=void 0;return r.logLevel==="trace"&&(i.traceError=new Error("Trace")),r.badge&&(i.badge=r.badge),r.label&&(i.label=r.label),i}logger(e,r,s,...i){if(this.disabled)return;if(this.paused){this.messageQueue.push({messageObject:i,raw:r,type:e});return}const a=this.types[e],u=this.#t(a.logLevel);if(s||this.logLevels[u]>=this.logLevels[this.generalLogLevel]){let n=this.#s(e,a,...i);const g=ye((c=!1)=>{const d=(this.lastLog.count??0)-this.throttleMin;if(this.lastLog.object&&d>0){const b={...this.lastLog.object};d>1&&(b.repeated=d),this.#e(b,r),this.lastLog.count=1}if(c){for(const b of this.processors)n={...b.process(n)};this.lastLog.object=n,this.#e(n,r)}},"resolveLog");clearTimeout(this.lastLog.timeout);const y=this.lastLog.time&&n.date?new Date(n.date).getTime()-this.lastLog.time.getTime():0;if(this.lastLog.time=new Date(n.date),y<this.throttle)try{if(this.lastLog.object&&JSON.stringify([n.label,n.scope,n.type,n.message,n.prefix,n.suffix,n.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(g,this.throttle);return}}catch{}g(!0)}}}var Gt=Object.defineProperty,zt=p((t,e)=>Gt(t,"name",{value:e,configurable:!0}),"c$1");let Ht=class{static{p(this,"v")}static{zt(this,"RawReporter")}#r;#e;#t;#s=!1;#i;constructor(e={}){this.#r=$e,this.#e=ve,this.#i=e}setStdout(e){this.#r=e}setStderr(e){this.#e=e}setInteractiveManager(e){this.#t=e}setIsInteractive(e){this.#s=e}log(e){const{context:r,groups:s,message:i,type:a}=e,u=[];if(i!==Se){const c=typeof i=="string"?i:ce(i,this.#i);u.push(c)}r&&u.push(...r.map(c=>typeof c=="object"?` ${ce(c,this.#i)}`:` ${String(c)}`));const n=["error","trace","warn"].includes(a.level)?"stderr":"stdout",g=n==="stderr"?this.#e:this.#r,y=s.map(()=>" ").join("");this.#s&&this.#t!==void 0&&g.isTTY?this.#t.update(n,(y+u.join("")).split(`
20
20
  `),0):_e(y+u.join(""),g)}};var Wt=Object.defineProperty,Ut=p((t,e)=>Wt(t,"name",{value:e,configurable:!0}),"m$1");class Le extends xe{static{p(this,"c")}constructor(e){const r=e.parentStderr,s=e.parentStdout,{interactive:i,processors:a,rawReporter:u,reporters:n,stderr:g,stdout:y}=e,c=r??g,d=s??y,b=e.parentLongestLabel,A=e.parentTypes,{parentLogLevels:q,parentMessages:z,parentStringify:R}=e,F={disabled:e.disabled,logLevel:e.logLevel,logLevels:e.logLevels,messages:e.messages,processors:[],rawReporter:e.rawReporter,reporters:[],scope:e.scope,throttle:e.throttle,throttleMin:e.throttleMin},Y="types"in e;A&&b&&!Y?(F.parentTypes=A,F.parentLongestLabel=b):Y&&e.types!==void 0&&(F.types=e.types),R&&(F.parentStringify=R),q&&!e.logLevels&&(F.parentLogLevels=q),z&&!e.messages&&(F.parentMessages=z),super(F),this.options=e,this.interactive=i??!1,this.stdout=d,this.stderr=c,this.interactive&&(this.interactiveManager=new We(new Me(this.stdout),new Me(this.stderr))),Array.isArray(n)&&this.registerReporters(n),this.rawReporter=this.extendReporter(u??new Ht),Array.isArray(a)&&this.registerProcessors(a)}options;static{Ut(this,"PailServerImpl")}stdout;stderr;interactiveManager;interactive;scope(...e){if(e.length===0)throw new Error("No scope name was defined.");return this.scopeName=e.flat(),this}child(e){const r=e?.types!==void 0,s=r?be(this.types,e.types):this.types,i=e?.reporters??[],a=i.length>0?[...this.reporters,...i]:[...this.reporters],u=e?.processors??[],n=u.length>0?[...this.processors,...u]:[...this.processors],g=e?.logLevels?{...this.logLevels,...e.logLevels}:this.logLevels;let y;if(e?.scope){const b=me(e.scope).filter(Boolean);y=this.scopeName.length>0?[...this.scopeName,...b]:b}else y=this.scopeName.length>0?this.scopeName:[];const c=e?.messages?{timerEnd:this.endTimerMessage,timerStart:this.startTimerMessage,...e.messages}:{timerEnd:this.endTimerMessage,timerStart:this.startTimerMessage},d={disabled:e?.disabled??this.disabled,interactive:e?.interactive??this.interactive,logLevel:e?.logLevel??this.generalLogLevel,logLevels:g,messages:c,processors:n,rawReporter:e?.rawReporter??this.rawReporter,reporters:a,scope:y,stderr:e?.stderr??this.stderr,stdout:e?.stdout??this.stdout,throttle:e?.throttle??this.throttle,throttleMin:e?.throttleMin??this.throttleMin};return this.#r(d,e,r,s),new Le(d)}#r(e,r,s,i){s?(e.parentTypes=i,e.parentLongestLabel=le(i)):(e.parentTypes=this.types,e.parentLongestLabel=this.longestLabel),r?.logLevels||(e.parentLogLevels=this.logLevels),r?.messages||(e.parentMessages={timerEnd:this.endTimerMessage,timerStart:this.startTimerMessage}),e.parentStringify=this.stringify,r?.stdout||(e.parentStdout=this.stdout),r?.stderr||(e.parentStderr=this.stderr)}getInteractiveManager(){return this.interactiveManager}wrapStd(){this.#e(this.stdout,"log"),this.#e(this.stderr,"log")}restoreStd(){this.#t(this.stdout),this.#t(this.stderr)}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}clear(){this.stdout.write(Oe),this.stderr.write(Oe)}extendReporter(e){return typeof e.setStdout=="function"&&e.setStdout(this.stdout),typeof e.setStderr=="function"&&e.setStderr(this.stderr),typeof e.setLoggerTypes=="function"&&e.setLoggerTypes(this.types),typeof e.setStringify=="function"&&e.setStringify(this.stringify),typeof e.setIsInteractive=="function"&&e.setIsInteractive(this.interactive),this.interactive&&typeof e.setInteractiveManager=="function"&&e.setInteractiveManager(this.interactiveManager),e}#e(e,r){e&&(e.__write||(e.__write=e.write),e.write=s=>{this[r](String(s).trim())})}#t(e){e&&e.__write&&(e.write=e.__write,delete e.__write)}}const Yt=Le;var Qt=Object.defineProperty,Kt=p((t,e)=>Qt(t,"name",{value:e,configurable:!0}),"x"),Xt=Object.defineProperty,Fe=Kt((t,e)=>Xt(t,"name",{value:e,configurable:!0}),"h"),Zt=Object.defineProperty,ie=Fe((t,e)=>Zt(t,"name",{value:e,configurable:!0}),"g$1");const Ee=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"]]),er=/^#([\dA-F]{2})([\dA-F]{2})([\dA-F]{2})([\dA-F]{2})?$/i,tr=/^#([\dA-F])([\dA-F])([\dA-F])([\dA-F])?$/i,rr=/^rgba?\(\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*(,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*)?\)$/,sr=/^hsla?\(\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))%\s*,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))%\s*(,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*)?\)$/,qe=ie(()=>({__proto__:null,backgroundColor:null,color:null,fontStyle:null,fontWeight:null,textDecorationColor:null,textDecorationLine:[]}),"getDefaultCss"),Ae=/\s+/,fe=ie(t=>{Ee.has(t)&&(t=Ee.get(t));const e=er.exec(t);if(e)return[Number.parseInt(e[1],16),Number.parseInt(e[2],16),Number.parseInt(e[3],16)];const r=tr.exec(t);if(r)return[Number.parseInt(`${r[1]}${r[1]}`,16),Number.parseInt(`${r[2]}${r[2]}`,16),Number.parseInt(`${r[3]}${r[3]}`,16)];const s=rr.exec(t);if(s)return[Math.round(Math.max(0,Math.min(255,Number(s[1])))),Math.round(Math.max(0,Math.min(255,Number(s[2])))),Math.round(Math.max(0,Math.min(255,Number(s[3]))))];const i=sr.exec(t);if(i){let a=Number(i[1])%360;a<0&&(a+=360);const u=Math.max(0,Math.min(100,Number(i[2])))/100,n=Math.max(0,Math.min(100,Number(i[3])))/100,g=(1-Math.abs(2*n-1))*u,y=g*(1-Math.abs(a/60%2-1)),c=n-g/2;let d,b,A;return a<60?{0:d,1:b,2:A}=[g,y,0]:a<120?{0:d,1:b,2:A}=[y,g,0]:a<180?{0:d,1:b,2:A}=[0,g,y]:a<240?{0:d,1:b,2:A}=[0,y,g]:a<300?{0:d,1:b,2:A}=[y,0,g]:{0:d,1:b,2:A}=[g,0,y],[Math.round((d+c)*255),Math.round((b+c)*255),Math.round((A+c)*255)]}return null},"parseCssColor"),he=ie((t,e)=>t?.[0]===e?.[0]&&t?.[1]===e?.[1]&&t?.[2]===e?.[2],"colorEquals"),ir=ie(t=>{const e=qe(),r=[];let s=!1,i=null,a=0,u="";for(const n of t){if(n==="(")a+=1;else if(a>0)n===")"&&(a-=1);else if(s){if(n===";"){const g=u.trim();g!==""&&r.push([i,g]),i=null,u="",s=!1;continue}}else if(n===":"){i=u.trim(),u="",s=!0;continue}u+=n}if(s&&a===0){const n=u.trim();n!==""&&r.push([i,n]),i=null,u=""}for(const{0:n,1:g}of r)switch(n){case"background-color":{g!=null&&(e.backgroundColor=g);break}case"color":{g!=null&&(e.color=g);break}case"font-style":{["italic","oblique","oblique 14deg"].includes(g)&&(e.fontStyle="italic");break}case"font-weight":{g==="bold"&&(e.fontWeight=g);break}case"text-decoration":{e.textDecorationColor=null,e.textDecorationLine=[];const y=g.split(Ae);for(const c of y){const d=fe(c);d!=null?e.textDecorationColor=d:["line-through","overline","underline"].includes(c)&&e.textDecorationLine.push(c)}break}case"text-decoration-color":{const y=fe(g);y!=null&&(e.textDecorationColor=y);break}case"text-decoration-line":{e.textDecorationLine=[];const y=g.split(Ae);for(const c of y)["line-through","overline","underline"].includes(c)&&e.textDecorationLine.push(c);break}}return e},"parseCss"),or=ie((t,e)=>{e=e??qe();let r="";if(!he(t.backgroundColor,e.backgroundColor))if(t.backgroundColor==null)r+="\x1B[49m";else switch(t.backgroundColor){case"black":{r+="\x1B[40m";break}case"blue":{r+="\x1B[44m";break}case"cyan":{r+="\x1B[46m";break}case"green":{r+="\x1B[42m";break}case"magenta":{r+="\x1B[45m";break}case"red":{r+="\x1B[41m";break}case"white":{r+="\x1B[47m";break}case"yellow":{r+="\x1B[43m";break}default:if(Array.isArray(t.backgroundColor)){const{0:s,1:i,2:a}=t.backgroundColor;r+=`\x1B[48;2;${String(s)};${String(i)};${String(a)}m`}else{const s=fe(t.backgroundColor);if(s===null)r+="\x1B[49m";else{const{0:i,1:a,2:u}=s;r+=`\x1B[48;2;${String(i)};${String(a)};${String(u)}m`}}}if(!he(t.color,e.color))if(t.color==null)r+="\x1B[39m";else switch(t.color){case"black":{r+="\x1B[30m";break}case"blue":{r+="\x1B[34m";break}case"cyan":{r+="\x1B[36m";break}case"green":{r+="\x1B[32m";break}case"magenta":{r+="\x1B[35m";break}case"red":{r+="\x1B[31m";break}case"white":{r+="\x1B[37m";break}case"yellow":{r+="\x1B[33m";break}default:if(Array.isArray(t.color)){const{0:s,1:i,2:a}=t.color;r+=`\x1B[38;2;${String(s)};${String(i)};${String(a)}m`}else{const s=fe(t.color);if(s===null)r+="\x1B[39m";else{const{0:i,1:a,2:u}=s;r+=`\x1B[38;2;${String(i)};${String(a)};${String(u)}m`}}}if(t.fontWeight!==e.fontWeight&&(r+=t.fontWeight==="bold"?"\x1B[1m":"\x1B[22m"),t.fontStyle!==e.fontStyle&&(r+=t.fontStyle==="italic"?"\x1B[3m":"\x1B[23m"),!he(t.textDecorationColor,e.textDecorationColor))if(t.textDecorationColor==null)r+="\x1B[59m";else{const{0:s,1:i,2:a}=t.textDecorationColor;r+=`\x1B[58;2;${String(s)};${String(i)};${String(a)}m`}return t.textDecorationLine.includes("line-through")!==e.textDecorationLine.includes("line-through")&&(r+=t.textDecorationLine.includes("line-through")?"\x1B[9m":"\x1B[29m"),t.textDecorationLine.includes("overline")!==e.textDecorationLine.includes("overline")&&(r+=t.textDecorationLine.includes("overline")?"\x1B[53m":"\x1B[55m"),t.textDecorationLine.includes("underline")!==e.textDecorationLine.includes("underline")&&(r+=t.textDecorationLine.includes("underline")?"\x1B[4m":"\x1B[24m"),r},"cssToAnsi");var nr=Object.defineProperty,Te=Fe((t,e)=>nr(t,"name",{value:e,configurable:!0}),"y");const ar=Te(t=>{try{return JSON.stringify(t)}catch{return'"[Circular]"'}},"tryStringify"),Pe="%".codePointAt(0),lr="s".codePointAt(0),cr="d".codePointAt(0),fr="f".codePointAt(0),ur="i".codePointAt(0),gr="O".codePointAt(0),hr="o".codePointAt(0),dr="j".codePointAt(0),pr="c".codePointAt(0),mr=Te((t,e=[],r={})=>{if(typeof t!="string"&&typeof t!="object"||t===null)throw new TypeError(`fmt must be a string or object, got ${t===null?"null":typeof t}`);const s=r.stringify??ar,i=1;if(typeof t=="object"){const c=e.length+i;if(c===1)return"{}";const d=Array.from({length:c});d[0]=s(t);for(let b=1;b<c;b+=1)d[b]=s(e[b-i]);return d.join(" ")}if(e.length===0)return t;let a="",u=1-i,n=-1,g=!1,y;for(let c=0;c<t.length;){if(t.codePointAt(c)===Pe&&c+1<t.length){n=n>-1?n:0;const d=t.codePointAt(c+1);if(d===void 0){u+=1;break}switch(d){case pr:{if(globalThis.window===void 0){const b=ir(e[u]);n<c&&(a+=t.slice(n,c)),a+=or(b,y),a!==""&&(g=!0,y=b)}n=c+2,c+=1;break}case cr:case fr:{if(u>=e.length||e[u]==null)break;n<c&&(a+=t.slice(n,c)),a+=Number(e[u]).toString(),n=c+2,c+=1;break}case ur:{if(u>=e.length||e[u]==null)break;n<c&&(a+=t.slice(n,c)),a+=Math.floor(Number(e[u])).toString(),n=c+2,c+=1;break}case dr:case gr:case hr:{if(u>=e.length||e[u]===void 0)break;n<c&&(a+=t.slice(n,c));const b=e[u],A=typeof b;if(A==="string"){a+=`'${b}'`,n=c+2;break}if(A==="function"){a+=b.name?`[Function: ${b.name}]`:"[Function: <anonymous>]",n=c+2;break}a+=s(b),n=c+2,c+=1;break}case Pe:{n<c&&(a+=t.slice(n,c)),a+="%",n=c+2,c+=1,u-=1;break}case lr:{if(u>=e.length)break;n<c&&(a+=t.slice(n,c)),a+=typeof e[u]=="object"?s(e[u]):String(e[u]),n=c+2,c+=1;break}default:typeof r.formatters?.[d]=="function"&&(n<c&&(a+=t.slice(n,c)),a+=r.formatters[d](e[u]),n=c+2,c+=1)}u+=1}c+=1}return n===-1?t:(n<t.length&&(a+=t.slice(n)),g&&(a+="\x1B[0m"),a)},"format"),br=Te((t={})=>{const e={};return typeof t.formatters=="object"&&Object.entries(t.formatters).forEach(([r,s])=>{if(r.length===0)throw new Error(`Formatter %${r} has no characters`);if(r.length>1)throw new Error(`Formatter %${r} has more than one character`);if(typeof s!="function")throw new TypeError(`Formatter for %${r} is not a function`);const i=r.codePointAt(0);if(i===void 0)throw new Error(`${r}.codePointAt(0) failed to return a value, please report this issue`);e[i]=s}),(r,s=[],i={})=>mr(r,s,{...i,formatters:e})},"build");var yr=Object.defineProperty,Be=p((t,e)=>yr(t,"name",{value:e,configurable:!0}),"i$1");let $r=class{static{p(this,"g")}static{Be(this,"MessageFormatterProcessor")}#r;#e;constructor(e={}){this.#e=e.formatters}setStringify(e){this.#r=e}process(e){const r=br({formatters:this.#e,stringify:Be(s=>this.#r?this.#r(s):JSON.stringify(s),"stringify")});return e.message!==void 0&&(e.message=this.#t(r,e.message,e.context??[])),e}#t(e,r,s=[]){if(typeof r=="string")return e(r,s);if(typeof r=="object"&&r!==null){const i=r,a=Object.keys(i);for(let u=0;u<a.length;u+=1){const n=a[u],g=i[n];(typeof g=="string"||Array.isArray(g)||typeof g=="object")&&(i[n]=this.#t(e,g,s))}}return r}};var vr=Object.defineProperty,Je=p((t,e)=>vr(t,"name",{value:e,configurable:!0}),"M");const{bgGrey:Sr,cyan:wr,green:xr,greenBright:Lr,grey:G,red:de,underline:Ne,white:Tr}=De,kr=/[\\/]pail[\\/]dist/,pe=Je(t=>!kr.test(t),"pailFileFilter");class Mr extends Qe{static{p(this,"PrettyReporter")}static{Je(this,"PrettyReporter")}#r;#e;#t;#s=!1;#i;#o;constructor(e={}){const{error:r,inspect:s,...i}=e;super({uppercase:{label:!0,...i.uppercase},...i}),this.#i={...Ke,...s},this.#o={...r,color:{fileLine:xr,hint:wr,marker:de,message:de,method:Lr,title:de}},this.#r=$e,this.#e=ve}setStdout(e){this.#r=e}setStderr(e){this.#e=e}setInteractiveManager(e){this.#t=e}setIsInteractive(e){this.#s=e}log(e){this._log(this._formatMessage(e),e.type.level)}_formatMessage(e){const{columns:r}=Xe();let s=r;typeof this.styles.messageLength=="number"&&(s=this.styles.messageLength);const{badge:i,context:a,date:u,error:n,file:g,groups:y,label:c,message:d,prefix:b,repeated:A,scope:q,suffix:z,traceError:R,type:F}=e,{color:Y}=this.loggerTypes[F.name],Q=Y?De[Y]:Tr,f=y.map(()=>" ").join(""),l=[];if(y.length>0&&l.push(`${f+G(`[${y.at(-1)??""}]`)} `),u&&l.push(`${G(this.styles.dateFormatter(typeof u=="string"?new Date(u):u))} `),i)l.push(Q(i));else{const T=Ze(this.loggerTypes);T.length>0&&l.push(`${G(".".repeat(T.length))} `)}const $=le(this.loggerTypes);if(c){const T=ne($),P=ne(c);l.push(`${Q(et(c,this.styles))} `,G(".".repeat(Math.max(0,T-P))))}else l.push(G(".".repeat($.length+2)));A&&l.push(`${Sr.white(`[${String(A)}x]`)} `),Array.isArray(q)&&q.length>0&&l.push(` ${G(`[${q.join(" > ")}]`)} `),b&&l.push(`${G(`${Array.isArray(q)&&q.length>0?". ":" "}[${this.styles.underline.prefix?Ne(b):b}]`)} `);const N=ne(l.join(" "));if(g){const T=(g.name??"")+(g.line?`:${String(g.line)}`:""),P=ne(T);if(P+N+2>s)l.push(G(` ${T}`));else{const J=Math.max(0,s-N-P-2);l.push(G(`${".".repeat(J)} ${T}`))}}else l.push(G(".".repeat(Math.max(0,s-N-1))));if(l.length>0&&l.push(`
21
21
 
22
22
  `),d!==Se){const T=typeof d=="string"?d:ce(d,this.#i);l.push(f+tt(T,{trim:!1,width:s-3,wrapMode:rt.STRICT_WIDTH}))}if(a){let T=!1;l.push(...a.map(P=>{if(P instanceof Error)return T=!0,`
@@ -0,0 +1,44 @@
1
+ var Yt=Object.defineProperty;var $=(e,t)=>Yt(e,"name",{value:t,configurable:!0});import{createRequire as Ut}from"node:module";import de from"@visulima/colorize";import{L as tr,E as rr}from"./constants-ep2nsfdy.js";import{i as nr}from"./write-stream-Dd4_PTcm.js";const Jt=Ut(import.meta.url),D=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,fe=$(e=>{if(typeof D<"u"&&D.versions&&D.versions.node){const[t,r]=D.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return D.getBuiltinModule(e)}return Jt(e)},"__cjs_getBuiltinModule"),B=D,{stdout:Kt,stderr:Qt}=B,{createRequire:Zt}=fe("node:module"),{execFileSync:Xt}=fe("node:child_process"),J=fe("node:fs"),er=fe("node:tty");var ir=Object.defineProperty,sr=$((e,t)=>ir(e,"name",{value:t,configurable:!0}),"A$4"),ar=Object.defineProperty,We=sr((e,t)=>ar(e,"name",{value:t,configurable:!0}),"$"),or=Object.defineProperty,lr=We((e,t)=>or(e,"name",{value:t,configurable:!0}),"r$1");const ur=lr(e=>e.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
2
+ `),"normalizeLF"),cr=globalThis.process??Object.create(null),Le={versions:{}},ze=new Proxy(cr,{get(e,t){if(t in e)return e[t];if(t in Le)return Le[t]}});var fr=Object.defineProperty,dr=We((e,t)=>fr(e,"name",{value:t,configurable:!0}),"b");const pr=dr((e,t,r,n)=>{const i={column:0,line:-1,...e.start},s={...i,...e.end},a=i.line,o=i.column,l=s.line,u=s.column;let c=Math.max(a-(r+1),0),f=Math.min(t.length,l+n);a===-1&&(c=0),l===-1&&(f=t.length);const p=l-a,d={};if(p)for(let g=0;g<=p;g++){const h=g+a;if(!o)d[h]=!0;else if(g===0){const m=t[h-1]?.length;d[h]=[o,(m??0)-o+1]}else if(g===p)d[h]=[0,u];else{const m=t[h-g]?.length;d[h]=[0,m]}}else o===u?d[a]=o?[o,0]:!0:d[a]=[o,(u??0)-(o??0)];return{end:f,markerLines:d,start:c}},"getMarkerLines");var gr=Object.defineProperty,re=We((e,t)=>gr(e,"name",{value:t,configurable:!0}),"t");const hr=ze.platform==="win32"&&!ze.env?.WT_SESSION?">":"❯",mr=re((e,t,r)=>{const n={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...r,color:{gutter:re(g=>g,"gutter"),marker:re(g=>g,"marker"),message:re(g=>g,"message"),...r?.color}},i=typeof t.start.column=="number";let s=ur(e).split(`
3
+ `);typeof n.tabWidth=="number"&&(s=s.map(g=>g.replaceAll(" "," ".repeat(n.tabWidth))));const{end:a,markerLines:o,start:l}=pr(t,s,n.linesAbove,n.linesBelow),u=String(a).length,{gutter:c,marker:f,message:p}=n.color;let d=s.slice(l,a).map((g,h)=>{const m=l+1+h,y=o[m],A=` ${String(m)}`.slice(-u),I=!o[m+1],x=` ${A}${n.showGutter?" |":""}`;if(y){let b="";if(Array.isArray(y)){const C=g.replaceAll(/[^\t]/g," ").slice(0,Math.max(y[0]-1,0)),k=y[1]||1;b=[`
4
+ `,n.prefix+c(x.replaceAll(/\d/g," "))," ",C,f("^").repeat(k)].join(""),I&&n.message&&(b+=` ${p(n.message)}`)}return[n.prefix+f(hr),c(x),g.length>0?` ${g}`:"",b].join("")}return`${n.prefix} ${c(x)}${g.length>0?` ${g}`:""}`}).join(`
5
+ `);return n.message&&!i&&(d=`${n.prefix+" ".repeat(u+1)+n.message}
6
+ ${d}`),d},"codeFrame");var $r=Object.defineProperty,br=$((e,t)=>$r(e,"name",{value:t,configurable:!0}),"x$4"),vr=Object.defineProperty,yr=br((e,t)=>vr(e,"name",{value:t,configurable:!0}),"x"),wr=Object.defineProperty,W=yr((e,t)=>wr(e,"name",{value:t,configurable:!0}),"u");const L=W((e,...t)=>{process.env.DEBUG&&process.env.DEBUG==="true"&&console.debug(`error:parse-stacktrace: ${e}`,...t)},"debugLog"),z="<unknown>",Sr=/^.*?\s*at\s(?:(.+?\)(?:\s\[.+\])?|\(?.*?)\s?\((?:address\sat\s)?)?(?:async\s)?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Or=/\((\S+)\),\s(<[^>]+>)?:(\d+)?:(\d+)?\)?/,xr=/(.*?):(\d+):(\d+)(?:\s<-\s.+:\d+:\d+)?/,jr=/eval\sat\s(<anonymous>)\s\((.*)\)?:(\d+)?:(\d+)\),\s*<anonymous>?:(\d+)?:(\d+)/,Ar=/^\s*in\s(?:([^\\/]+(?:\s\[as\s\S+\])?)\s\(?)?\(at?\s?(.*?):(\d+)(?::(\d+))?\)?\s*$/,Er=/in\s(.*)\s\(at\s(.+)\)\sat/,Nr=/^(?:.*@)?(.*):(\d+):(\d+)$/,Ir=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. \/=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Pr=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,kr=/(\S[^\s[]*\[.*\]|.*?)@(.*):(\d+):(\d+)/,Ve=/\(error: (.*)\)/,Tr=/at\s/,Wr=/^(\S+):(\d+):(\d+)$|^(\S+):(\d+)$/,Br=/\S*(?:Error: |AggregateError:)/,st=/^Anonymous function$/,Fr=/^\s*in\s.*/,Mr=/^.*?\s*at\s.*/,_r=/^.*?\s*@.*|\[native code\]/,at=W((e,t)=>{const r=e.includes("safari-extension"),n=e.includes("safari-web-extension");return r||n?[e.includes("@")?e.split("@")[0]:z,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},"extractSafariExtensionDetails"),ot=W((e,t)=>{const r=xr.exec(t);r&&(e.file=r[1],e.line=+r[2],e.column=+r[3])},"parseMapped"),Cr=W(e=>{const t=Er.exec(e);if(t){L(`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]??z,raw:e,type:void 0}}const r=Ar.exec(e);if(r){L(`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(Tr,""):void 0,line:r[3]?+r[3]:void 0,methodName:r[1]??z,raw:e,type:e.startsWith("internal")?"internal":void 0};return ot(n,`${r[2]}:${r[3]}:${r[4]}`),n}},"parseNode"),Rr=W(e=>{const t=Sr.exec(e);if(t){L(`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,s;if(n){const u=Or.exec(e);if(u){const c=Wr.exec(u[1]);c?(t[2]=c[4]??c[1],t[3]=c[5]??c[2],t[4]=c[3]):u[2]&&(t[2]=u[1]),u[2]&&(i={column:u[4]?+u[4]:void 0,file:u[2],line:u[3]?+u[3]:void 0,methodName:"eval",raw:e,type:"eval"})}else{const c=jr.exec(e);c&&(s={column:c[4]?+c[4]:void 0,file:c[2],line:c[3]?+c[3]:void 0},i={column:c[6]?+c[6]:void 0,file:c[1],line:c[5]?+c[5]:void 0,methodName:"eval",raw:c[0],type:"eval"})}}const[a,o]=at(t[1]?t[1].replace(st,"<anonymous>"):z,t[2]),l={column:t[4]?+t[4]:void 0,evalOrigin:i,file:o,line:t[3]?+t[3]:void 0,methodName:a,raw:e,type:n?"eval":r?"native":void 0};return s?(l.column=s.column,l.file=s.file,l.line=s.line):ot(l,`${o}:${t[3]}:${t[4]}`),l}},"parseChromium"),Lr=W((e,t)=>{const r=Ir.exec(e);if(r){L(`parse gecko error stack line: "${e}"`,`found: ${JSON.stringify(r)}`);const n=r[3]?.includes(" > eval"),i=n&&r[3]&&Pr.exec(r[3]);let s;n&&i&&(r[3]=i[1],s={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[a,o]=at(r[1]?r[1].replace(st,"<anonymous>"):z,r[3]);let l;(t?.type==="safari"||!n&&t?.type==="firefox")&&t.column?l=t.column:!n&&r[5]&&(l=+r[5]);let u;return(t?.type==="safari"||!n&&t?.type==="firefox")&&t.line?u=t.line:r[4]&&(u=+r[4]),{column:l,evalOrigin:s,file:o,line:u,methodName:a,raw:e,type:n?"eval":o.includes("[native code]")?"native":void 0}}},"parseGecko"),zr=W((e,t)=>{const r=kr.exec(e);if(!(r&&r[2].includes(" > eval"))&&r)return L(`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]||z,raw:e,type:void 0}},"parseFirefox"),Vr=W(e=>{const t=Nr.exec(e);if(t)return L(`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:z,raw:e,type:void 0}},"parseReactAndroidNative"),lt=W((e,{filter:t,frameLimit:r=50}={})=>{const n=e;let i=(typeof n.stacktrace=="string"?n.stacktrace:e.stack??"").split(`
7
+ `).map(s=>(Ve.test(s)?s.replace(Ve,"$1"):s).trim()).filter(s=>!Br.test(s)&&s!=="eval code");return t&&(i=i.filter(s=>t(s))),i=i.slice(0,r),i.reduce((s,a,o)=>{if(!a||a.length>1024)return s;let l;if(Fr.test(a))l=Cr(a);else if(Mr.test(a))l=Rr(a);else if(_r.test(a)){let u;if(o===0){const c=e,f=c.columnNumber,p=c.lineNumber,d=c.line,g=c.column;f||p?u={column:f,line:p,type:"firefox"}:(d||g)&&(u={column:g,line:d,type:"safari"})}l=zr(a,u)??Lr(a,u)}else l=Vr(a);return l?s.push(l):L(`parse error stack line: "${a}"`,"not parser found"),s},[])},"parseStacktrace");var Hr=Object.defineProperty,Dr=$((e,t)=>Hr(e,"name",{value:t,configurable:!0}),"p$6"),Gr=Object.defineProperty,ut=Dr((e,t)=>Gr(e,"name",{value:t,configurable:!0}),"m");const qr=Zt(import.meta.url),G=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Be=ut(e=>{if(typeof G<"u"&&G.versions&&G.versions.node){const[t,r]=G.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return G.getBuiltinModule(e)}return qr(e)},"__cjs_getBuiltinModule"),{existsSync:Yr,readFileSync:Ur}=Be("node:fs"),{relative:Jr}=Be("node:path"),{cwd:Kr}=G,{fileURLToPath:Qr}=Be("node:url");var Zr=Object.defineProperty,w=ut((e,t)=>Zr(e,"name",{value:t,configurable:!0}),"o");const q=w((e,t,r)=>r===0?e:t===" "?e+" ".repeat(r):e+" ".repeat(t*r),"getPrefix"),Xr=w((e,t)=>{const r=e.replace("async file:","file:");return Jr(t,r.startsWith("file:")?Qr(r):r)},"getRelativePath"),en=w((e,t,r)=>{if(t)return r.title(e.message);const n=e.message?`: ${e.message}`:"";return r.title(e.name+n)},"getTitleText"),ct=w((e,{color:t,hideErrorTitle:r,indentation:n,prefix:i},s)=>`${q(i,n,s)}${en(e,r,t)}
8
+ `,"getMessage"),ft=w((e,{color:t,indentation:r,prefix:n},i)=>{if(e.hint===void 0)return;const s=q(n,r,i);let a="";if(Array.isArray(e.hint))for(const o of e.hint)a+=`${s+o}
9
+ `;else a+=s+e.hint;return t.hint(a)},"getHint"),Fe=w((e,{color:t,cwd:r,displayShortPath:n,indentation:i,prefix:s},a=0)=>{const o=n?Xr(e.file,r):e.file,{fileLine:l,method:u}=t;return`${q(s,i,a)}at ${e.methodName?`${u(e.methodName)} `:""}${l(o)}:${l(e.line?.toString()??"")}`},"getMainFrame"),dt=w((e,{color:t,indentation:r,linesAbove:n,linesBelow:i,prefix:s,showGutter:a,showLineNumbers:o,tabWidth:l},u)=>{if(e.file===void 0)return;const c=e.file.replace("file://","");if(!Yr(c))return;const f=Ur(c,"utf8");return mr(f,{start:{column:e.column,line:e.line}},{color:t,linesAbove:n,linesBelow:i,prefix:q(s,r,u),showGutter:a,showLineNumbers:o,tabWidth:l})},"getCode"),pt=w((e,t,r)=>{if(e.errors.length===0)return;let n=`${q(t.prefix,t.indentation,r)}Errors:
10
+
11
+ `,i=!0;for(const s of e.errors)i?i=!1:n+=`
12
+
13
+ `,n+=ht(s,{...t,framesMaxLimit:1,hideErrorCodeView:t.hideErrorErrorsCodeView},r+1);return`
14
+ ${n}`},"getErrors"),gt=w((e,t,r)=>{let n=`${q(t.prefix,t.indentation,r)}Caused by:
15
+
16
+ `;const i=e.cause;n+=ct(i,t,r);const s=lt(i).shift(),a=ft(i,t,r);if(a&&(n+=`${a}
17
+ `),s&&(n+=Fe(s,t,r),!t.hideErrorCauseCodeView)){const o=dt(s,t,r);o!==void 0&&(n+=`
18
+ ${o}`)}if(i.cause)n+=`
19
+ ${gt(i,t,r+1)}`;else if(i instanceof AggregateError){const o=pt(i,t,r);o!==void 0&&(n+=`
20
+ ${o}`)}return`
21
+ ${n}`},"getCause"),tn=w((e,t)=>(e.length>0?`
22
+ `:"")+e.map(r=>Fe(r,t)).join(`
23
+ `),"getStacktrace"),ht=w((e,t,r)=>{const n={cwd:Kr(),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:w(a=>a,"fileLine"),gutter:w(a=>a,"gutter"),hint:w(a=>a,"hint"),marker:w(a=>a,"marker"),message:w(a=>a,"message"),method:w(a=>a,"method"),title:w(a=>a,"title"),...t.color}},i=lt(e,{filter:t.filterStacktrace,frameLimit:n.framesMaxLimit}),s=i.shift();return[t.hideMessage?void 0:ct(e,n,r),ft(e,n,r),s?Fe(s,n,r):void 0,s&&!n.hideErrorCodeView?dt(s,n,r):void 0,e instanceof AggregateError?pt(e,n,r):void 0,e.cause===void 0?void 0:gt(e,n,r),i.length>0?tn(i,n):void 0].filter(Boolean).join(`
24
+ `).replaceAll("\\","/")},"internalRenderError"),Oe=w((e,t={})=>{if(t.framesMaxLimit!==void 0&&t.framesMaxLimit<=0)throw new RangeError("The 'framesMaxLimit' option must be a positive number");return ht(e,t,0)},"renderError");var rn=Object.defineProperty,mt=$((e,t)=>rn(e,"name",{value:t,configurable:!0}),"T$2"),nn=Object.defineProperty,v=mt((e,t)=>nn(e,"name",{value:t,configurable:!0}),"l"),sn=Object.defineProperty,an=v((e,t)=>sn(e,"name",{value:t,configurable:!0}),"L");const N=an((e,t,r,n,i,s=", ")=>{const a=e.length;if(a===0)return"";let o=n;i!==void 0&&(o=i);const l=r.truncate;let u="",c="",f="";for(let p=0;p<a;p+=1){const d=p+1===e.length,g=p+2===e.length;f=`…(${String(e.length-p)})`;let h=e[p];r.truncate=l-u.length-(d?0:s.length);const m=c||o(h,t,r,n)+(d?"":s),y=u.length+m.length,A=y+f.length;if(d&&y>l&&u.length+f.length<=l||!d&&!g&&A>l)break;h=e[p+1];const I=g?"":s;if(d?c="":c=o(h,t,r,n)+I,!d&&g&&A>l&&y+c.length>l)break;if(u+=m,!d&&!g&&y+c.length>=l){f=`…(${String(e.length-p-1)})`;break}f=""}return`${u}${f}`},"inspectList");var on=Object.defineProperty,pe=v((e,t)=>on(e,"name",{value:t,configurable:!0}),"s$6");const ln=pe(([e,t],r,n)=>(n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:n.stylize(String(e),"yellow")),"inspectAttribute"),un=pe((e,t,r)=>{switch(e.nodeType){case 1:return $t(e,e,r,t);case 3:return t(e.data,t,r);default:return t(e,t,r)}},"inspectNode"),Ie=pe((e,t,r,n)=>N(e,e,t,r,un,`
25
+ `),"inspectNodeCollection"),$t=pe((e,t,r,n)=>{const i=e.getAttributeNames(),s=e.tagName.toLowerCase(),a=r.stylize(`<${s}`,"special"),o=r.stylize(">","special"),l=r.stylize(`</${s}>`,"special");r.truncate-=s.length*2+5;let u="";i.length>0&&(u+=" ",u+=N(i.map(p=>[p,e.getAttribute(p)]),t,r,n,ln," ")),r.truncate-=u.length;const{truncate:c}=r;let f=Ie(e.children,r,n,void 0);return f&&f.length>c&&(f=`…(${String(e.children.length)})`),`${a}${u}${o}${f}${l}`},"inspectHTMLElement");var cn=Object.defineProperty,fn=v((e,t)=>cn(e,"name",{value:t,configurable:!0}),"n$4");const dn=fn((e,t,r)=>e.length===0?"Arguments []":(t.truncate-=13,`Arguments [ ${N(e,e,t,r)} ]`),"inspectArguments");var pn=Object.defineProperty,bt=v((e,t)=>pn(e,"name",{value:t,configurable:!0}),"r$3");const gn=bt((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"),ge=bt((e,t)=>{if(e.length===0)return"";const r=t.prev+t.base;return r+e.split(", ").join(`,${r}`)+t.prev},"indentedJoin");var hn=Object.defineProperty,vt=v((e,t)=>hn(e,"name",{value:t,configurable:!0}),"i$5");const mn=/^[a-z_]\w*$/i,$n=/^"|"$/g,bn=vt((e,t)=>{if(mn.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($n,"'")},"quoteComplexKey"),Q=vt(([e,t],r,n,i)=>{n.truncate-=2;let s;typeof e=="string"?s=bn(e,n):typeof e=="number"?s=String(e):s=`[${i(e,r,n)}]`,n.truncate-=s.length;const a=i(t,r,n);return`${s}: ${a}`},"inspectProperty");var vn=Object.defineProperty,yt=v((e,t)=>vn(e,"name",{value:t,configurable:!0}),"p$4");const yn=yt(e=>{for(const t of e)if(Array.isArray(t)||typeof t=="object"&&t!==null)return!0;return!1},"multiLineValues"),wn=yt((e,t,r,n)=>{const i=Object.keys(e).slice(e.length);if(e.length===0&&i.length===0)return"[]";t.truncate-=4;let s=N(e,e,t,r);t.truncate-=s.length;let a="";i.length>0&&(a=N(i.map(l=>[l,e[l]]),e,t,r,Q));const o=n&&yn(e);return o&&(s=ge(s,n)),`[${o?"":" "}${s}${a?`, ${a}`:""}${o?"":" "}]`},"inspectArray");var Sn=Object.defineProperty,On=v((e,t)=>Sn(e,"name",{value:t,configurable:!0}),"o$7");const He=/\d(?=(?:\d{3})+(?!\d))/g,xn=/\d{3}/g,jn=/_$/,wt=On((e,t)=>{if(e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY||t.includes("e"))return t;if(typeof e=="number"){const r=e<0?-Math.floor(-e):Math.floor(e);if(r!==e){const n=String(r),i=t.slice(n.length+1);return`${n.replace(He,"$&_")}.${i.replace(xn,"$&_").replace(jn,"")}`}}return t.replace(He,"$&_")},"addNumericSeparator");var An=Object.defineProperty,St=v((e,t)=>An(e,"name",{value:t,configurable:!0}),"i$4");const En=St(e=>e>="\uD800"&&e<="\uDBFF","isHighSurrogate"),M=St((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 s=t-n;return s>0&&En(e[s-1])&&(s-=1),`${e.slice(0,s)}${r}`}return e},"truncate");var Nn=Object.defineProperty,In=v((e,t)=>Nn(e,"name",{value:t,configurable:!0}),"e$4");const De=In((e,t)=>{let r=M(e.toString(),t.truncate-1);return r!=="…"&&(r+="n"),t.stylize(t.numericSeparator?wt(e,r):r,"bigint")},"inspectBigInt");var Pn=Object.defineProperty,kn=v((e,t)=>Pn(e,"name",{value:t,configurable:!0}),"y");const Tn=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:void 0),se=kn((e,t,r,n)=>{if("window"in globalThis&&e===globalThis)return"{ [object Window] }";if(e===globalThis||"global"in globalThis&&e===globalThis)return"{ [object globalThis] }";const i=Object.getOwnPropertyNames(e),s=Object.getOwnPropertySymbols(e),a=Tn(e)===Object.prototype||e.constructor===Object,o=e instanceof Object?"":"null prototype";let l;!a&&Symbol.toStringTag in e?l=e[Symbol.toStringTag]:l=o?"Object":"";const u=l||o?`[${[l,o].filter(Boolean).join(": ")}] `:"";if(i.length===0&&s.length===0)return`${u}{}`;t.truncate-=4;const c=N(i.map(d=>[d,e[d]]),e,t,r,Q),f=N(s.map(d=>[d,e[d]]),e,t,r,Q);let p="";return c&&f&&(p=", "),n?`${u}{${ge(c+p+f,n)}}`:`${u}{ ${c}${p}${f} }`},"inspectObject");var Wn=Object.defineProperty,Bn=v((e,t)=>Wn(e,"name",{value:t,configurable:!0}),"s$3");const Fn=Bn((e,t,r,n)=>{let i="";return i=i||e.constructor.name,(!i||i==="_class")&&(i="<Anonymous Class>"),t.truncate-=i.length,`${i} ${se(e,t,r,n)}`},"inspectClass");var Mn=Object.defineProperty,_n=v((e,t)=>Mn(e,"name",{value:t,configurable:!0}),"i$3");const Cn=_n((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${M(n[1],t.truncate-i.length-1)}`,"date")},"inspectDate");var Rn=Object.defineProperty,Ln=v((e,t)=>Rn(e,"name",{value:t,configurable:!0}),"c$4");const zn=new Set(["column","columnNumber","description","fileName","line","lineNumber","message","name","number","stack"]),Vn=Ln((e,t,r)=>{const n=Object.getOwnPropertyNames(e).filter(o=>!zn.has(o)),{name:i}=e;t.truncate-=i.length;let s="";typeof e.message=="string"?s=M(e.message,t.truncate):n.unshift("message"),s=s?`: ${s}`:"",t.truncate-=s.length+5;const a=N(n.map(o=>[o,e[o]]),e,t,r,Q);return`${i}${s}${a?` { ${a} }`:""}`},"inspectObject");var Hn=Object.defineProperty,Dn=v((e,t)=>Hn(e,"name",{value:t,configurable:!0}),"c$3");const Ge=Dn((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} ${M(i,t.truncate-11)}]`,"special"):t.stylize(`[${r}]`,"special")},"inspectFunction");var Gn=Object.defineProperty,Ot=v((e,t)=>Gn(e,"name",{value:t,configurable:!0}),"p$3");const qn=Ot(([e,t],r,n,i)=>(n.truncate-=4,e=i(e,r,n),n.truncate-=e.length,`${e} => ${i(t,r,n)}`),"inspectMapEntry"),Yn=Ot((e,t,r,n)=>{if(e.size<=0)return"Map (0) {}";t.truncate-=7;let i=N([...e.entries()],e,t,r,qn);return n&&(i=ge(i,n)),`Map (${String(e.size)}) {${n?"":" "}${i}${n?"":" "}}`},"inspectMap");var Un=Object.defineProperty,Jn=v((e,t)=>Un(e,"name",{value:t,configurable:!0}),"e$3");function Z(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(M(t.numericSeparator?wt(e,e.toString()):e.toString(),t.truncate),"number")}$(Z,"j$2");mt(Z,"P");v(Z,"u$3");Jn(Z,"inspectNumber");var Kn=Object.defineProperty,Qn=v((e,t)=>Kn(e,"name",{value:t,configurable:!0}),"e$2");const Zn=Qn(()=>"Promise{…}","getPromiseValue");var Xn=Object.defineProperty,ei=v((e,t)=>Xn(e,"name",{value:t,configurable:!0}),"p$1");const ti=ei((e,t)=>{const r=t.truncate-(2+e.flags.length);return t.stylize(`/${M(e.source,r)}/${e.flags}`,"regexp")},"inspectRegExp");var ri=Object.defineProperty,ni=v((e,t)=>ri(e,"name",{value:t,configurable:!0}),"i$1");const ii=ni((e,t,r,n)=>{if(e.size===0)return"Set (0) {}";t.truncate-=7;let i=N([...e],e,t,r);return n&&(i=ge(i,n)),`Set (${String(e.size)}) {${n?"":" "}${i}${n?"":" "}}`},"inspectSet");var si=Object.defineProperty,ai=v((e,t)=>si(e,"name",{value:t,configurable:!0}),"l");const oi=ai((e,t)=>{const r=t.quoteStyle==="double"?'"':"'";return t.quoteStyle==="double"&&(e=e.replaceAll('"','"')),r+e+r},"wrapQuotes");var li=Object.defineProperty,xt=v((e,t)=>li(e,"name",{value:t,configurable:!0}),"e$1");const qe=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"),ui={" ":String.raw`\t`,"\n":String.raw`\n`,"\f":String.raw`\f`,"\r":String.raw`\r`,"\b":String.raw`\b`,"'":String.raw`\'`,"\\":"\\\\"},ci=16,fi=xt(e=>ui[e]||String.raw`\u${`0000${e.codePointAt(0).toString(ci)}`.slice(-4)}`,"escape"),Ye=xt((e,t)=>(qe.test(e)&&(e=e.replaceAll(qe,fi)),t.stylize(oi(M(e,t.truncate-2),t),"string")),"inspectString");var di=Object.defineProperty,pi=v((e,t)=>di(e,"name",{value:t,configurable:!0}),"o");const Ue=pi(e=>"description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString(),"inspectSymbol");var gi=Object.defineProperty,jt=v((e,t)=>gi(e,"name",{value:t,configurable:!0}),"f");const hi=jt(e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag],"getArrayName"),T=jt((e,t,r)=>{const n=hi(e);t.truncate-=n.length+4;const i=Object.keys(e).slice(e.length);if(e.length===0&&i.length===0)return`${n}[]`;let s="";for(let o=0;o<e.length;o++){const l=`${t.stylize(M(e[o],t.truncate),"number")}${o===e.length-1?"":", "}`;if(t.truncate-=l.length,e[o]!==e.length&&t.truncate<=3){s+=`…(${String(e.length-e[o]+1)})`;break}s+=l}let a="";return i.length>0&&(a=N(i.map(o=>[o,e[o]]),e,t,r,Q)),`${n}[ ${s}${a?`, ${a}`:""} ]`},"inspectTypedArray");var mi=Object.defineProperty,S=v((e,t)=>mi(e,"name",{value:t,configurable:!0}),"r");const ue=new WeakMap,Pe={},$i={Arguments:dn,Array:wn,ArrayBuffer:S(()=>"","ArrayBuffer"),BigInt:De,bigint:De,Boolean:S((e,t)=>t.stylize(String(e),"boolean"),"Boolean"),boolean:S((e,t)=>t.stylize(String(e),"boolean"),"boolean"),DataView:S(()=>"","DataView"),Date:Cn,Error:Vn,Float32Array:T,Float64Array:T,Function:Ge,function:Ge,Generator:S(()=>"","Generator"),HTMLCollection:Ie,Int8Array:T,Int16Array:T,Int32Array:T,Map:Yn,NodeList:Ie,null:S((e,t)=>t.stylize("null","null"),"null"),Number:Z,number:Z,Promise:Zn,RegExp:ti,Set:ii,String:Ye,string:Ye,Symbol:Ue,symbol:Ue,Uint8Array:T,Uint8ClampedArray:T,Uint16Array:T,Uint32Array:T,undefined:S((e,t)=>t.stylize("undefined","undefined"),"undefined"),WeakMap:S((e,t)=>t.stylize("WeakMap{…}","special"),"WeakMap"),WeakSet:S((e,t)=>t.stylize("WeakSet{…}","special"),"WeakSet")},Je=Symbol.for("nodejs.util.inspect.custom"),bi=S((e,t,r,n)=>{if(!("window"in globalThis)&&typeof e[Je]=="function")return e[Je](n,t);if("inspect"in e&&typeof e.inspect=="function")return e.inspect(n,t);if("constructor"in e&&ue.has(e.constructor))return ue.get(e.constructor)?.(e,t)??"unknown";const i=Pe[r];return i?i(e,t):""},"inspectCustom"),At=S((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((u,c,f)=>(c&&(n=[...n,c]),At(u,f,r+1,n)),"inspect"),s=t.indent?gn(t.indent,r):void 0;let a=e===null?"null":typeof e;a==="object"&&(a=Object.prototype.toString.call(e).slice(8,-1));const o=$i[a];if(o!==void 0)return o(e,t,i,s);if(t.customInspect&&e){const u=bi(e,t,a,t.depth-r);if(u)return typeof u=="string"?u:i(u,e,t)}const l=e?Object.getPrototypeOf(e):!1;return l===Object.prototype||l===null?se(e,t,i,s):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?$t(e,e,t,i):"constructor"in e?e.constructor!==Object?Fn(e,t,i,s):se(e,t,i,s):e===Object(e)?se(e,t,i,s):t.stylize(String(e),a)},"internalInspect"),Ke=S((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:S(n=>n,"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 At(e,r,0,[])},"inspect");S((e,t)=>ue.has(e)?!1:(ue.set(e,t),!0),"registerConstructor");S((e,t)=>e in Pe?!1:(Pe[e]=t,!0),"registerStringTag");var vi=Object.defineProperty,Me=$((e,t)=>vi(e,"name",{value:t,configurable:!0}),"u$3"),yi=Object.defineProperty,he=Me((e,t)=>yi(e,"name",{value:t,configurable:!0}),"l");const wi=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],Si=12288,Oi=65510,xi=[12288,12288,65281,65376,65504,65510],ji=8361,Ai=65518,Ei=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],Ni=32,Ii=10630,Pi=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],ki=4352,Ti=262141,Et=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141];var Wi=Object.defineProperty,Bi=he((e,t)=>Wi(e,"name",{value:t,configurable:!0}),"r$1");const X=Bi((e,t)=>{let r=0,n=Math.floor(e.length/2)-1;for(;r<=n;){const i=Math.floor((r+n)/2),s=i*2;if(t<e[s])n=i-1;else if(t>e[s+1])r=i+1;else return!0}return!1},"isInRange");var Fi=Object.defineProperty,V=he((e,t)=>Fi(e,"name",{value:t,configurable:!0}),"r");const Qe=19968,[Mi,_i]=me(Et);function me(e){let t=e[0],r=e[1];for(let n=0;n<e.length;n+=2){const i=e[n],s=e[n+1];if(Qe>=i&&Qe<=s)return[i,s];s-i>r-t&&(t=i,r=s)}return[t,r]}$(me,"c$2");Me(me,"f");he(me,"k");V(me,"findWideFastPathRange");const Nt=V(e=>e<161||e>1114109?!1:X(wi,e),"isAmbiguous"),It=V(e=>e<Si||e>Oi?!1:X(xi,e),"isFullWidth"),Ci=V(e=>e<ji||e>Ai?!1:X(Ei,e),"isHalfWidth"),Ri=V(e=>e<Ni||e>Ii?!1:X(Pi,e),"isNarrow"),Pt=V(e=>e>=Mi&&e<=_i?!0:e<ki||e>Ti?!1:X(Et,e),"isWide");function $e(e){return Nt(e)?"ambiguous":It(e)?"fullwidth":Ci(e)?"halfwidth":Ri(e)?"narrow":Pt(e)?"wide":"neutral"}$($e,"g$5");Me($e,"S");he($e,"getCategory");V($e,"getCategory");var Li=Object.defineProperty,be=$((e,t)=>Li(e,"name",{value:t,configurable:!0}),"i$4"),zi=Object.defineProperty,ve=be((e,t)=>zi(e,"name",{value:t,configurable:!0}),"a"),Vi=Object.defineProperty,_e=ve((e,t)=>Vi(e,"name",{value:t,configurable:!0}),"e");function ee(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}$(ee,"s$3");be(ee,"s");ve(ee,"r");_e(ee,"validate");function te(e){return ee(e),$e(e)}$(te,"r$5");be(te,"p");ve(te,"eastAsianWidthType");_e(te,"eastAsianWidthType");function Ce(e,{ambiguousAsWide:t=!1}={}){return ee(e),It(e)||Pt(e)||t&&Nt(e)?2:1}$(Ce,"o$6");be(Ce,"W");ve(Ce,"eastAsianWidth");_e(Ce,"eastAsianWidth");var Hi=Object.defineProperty,Di=$((e,t)=>Hi(e,"name",{value:t,configurable:!0}),"p$3"),Gi=Object.defineProperty,kt=Di((e,t)=>Gi(e,"name",{value:t,configurable:!0}),"e"),qi=Object.defineProperty,Yi=kt((e,t)=>qi(e,"name",{value:t,configurable:!0}),"E");const Tt=String.raw,Ze=Tt`\p{Emoji}(?:\p{EMod}|[\u{E0020}-\u{E007E}]+\u{E007F}|\uFE0F?\u20E3?)`,Ui=Yi(()=>new RegExp(Tt`\p{RI}{2}|(?![#*\d](?!\uFE0F?\u20E3))${Ze}(?:\u200D${Ze})*`,"gu"),"default");var Ji=Object.defineProperty,Ki=kt((e,t)=>Ji(e,"name",{value:t,configurable:!0}),"p");const Y=new Set(["\x1B","›"]),ye="\x07",Wt="[",Re="m",ce="]8;;",Qi=39,Zi=/[\u200B\uFEFF\u2060-\u2064]/g,Xi=new RegExp(`(?:\\${Wt}(?<code>\\d+)m|\\${ce}(?<uri>.*)${ye})`),es=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]])),U=/[\u001B\u009B](?:[[()#;?]{0,10}(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-ORZcf-nqry=><]|\]8;;[^\u0007\u001B]{0,100}(?:\u0007|\u001B\\))/g,ne=/[\u0000-\u0008\n-\u001F\u007F-\u009F]{1,1000}/y,ae=Ui();Ki(e=>e.replace(ae,""),"stripEmoji");var ts=Object.defineProperty,rs=$((e,t)=>ts(e,"name",{value:t,configurable:!0}),"E"),ns=Object.defineProperty,is=rs((e,t)=>ns(e,"name",{value:t,configurable:!0}),"A"),ss=Object.defineProperty,we=is((e,t)=>ss(e,"name",{value:t,configurable:!0}),"d");const Xe=new Map,ie=/(?:[\u0020-\u007E\u00A0-\u00FF](?!\uFE0F)){1,1000}/y,oe=we(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"),as=we((e,t)=>{const r=Math.floor(e/65536),n=e%65536;let i=Xe.get(r);if(i||(i=new Map,Xe.set(r,i)),i.has(n))return i.get(n);let s;if(oe(e)==="latin")s=t.width.regular;else if(oe(e)==="control")s=t.width.control;else if(oe(e)==="wide")s=t.width.wide;else switch(te(e)){case"ambiguous":{s=t.width.ambiguousIsNarrow?t.width.regular:t.width.wide;break}case"fullwidth":{s=t.width.fullWidth;break}case"wide":{s=t.width.wide;break}default:s=t.width.regular}return i.set(n,s),s},"getCachedCharWidth"),os=we(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"),ke=we((e,t={})=>{if(!e||e.length===0)return{ellipsed:!1,index:0,truncated:!1,width:0};const r={truncation:{countAnsiEscapeCodes:t.countAnsiEscapeCodes??!1,ellipsis:t.ellipsis??"",ellipsisWidth:t.ellipsisWidth??(t.ellipsis?ke(t.ellipsis,{...t,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width:0),limit:t.limit??Number.POSITIVE_INFINITY},width:{ambiguousIsNarrow:t.ambiguousIsNarrow??!1,ansi:t.ansiWidth??0,control:t.controlWidth??0,emoji:t.emojiWidth??2,fullWidth:t.fullWidth??2,halfWidth:t.halfWidth??1,regular:t.regularWidth??1,tab:t.tabWidth??8,wide:t.wideWidth??2}},n=Math.max(0,r.truncation.limit-r.truncation.ellipsisWidth),{length:i}=e,s=i>1e4;let a=0,o=0,l=i,u=!1;const c=e.includes("\x1B")||e.includes("›");for(;a<i;){if(c&&(e[a]==="\x1B"||e[a]==="›")){if(e.startsWith("\x1B]8;;",a)){const m="\x1B]8;;\x07",y=m.length,A=e.indexOf("\x07",a+5);if(A!==-1){const I=e.indexOf(m,A+1);if(I!==-1){const x=I+y,b=e.slice(A+1,I).replace(U,""),C=ke(b,{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,n-o),regularWidth:r.width.regular,tabWidth:r.width.tab,wideWidth:r.width.wide}),k=C.width;if(C.truncated)u=!0,l=Math.min(l,a);else if(o+k>n&&(l=Math.min(l,a),u=!0,o+k>r.truncation.limit))break;if(o+=k,a=x,u&&o>=r.truncation.limit)break;continue}}}if(U.lastIndex=a,U.test(e)){const m=U.lastIndex-a,y=r.truncation.countAnsiEscapeCodes?m:r.width.ansi;if(o+y>n&&(l=Math.min(l,a),o+y>r.truncation.limit)){u=!0;break}o+=y,a=U.lastIndex;continue}}const d=e.codePointAt(a);if(d===8203||d===65279||d>=8288&&d<=8292){a+=1;continue}if(d===9){if(o+r.width.tab>n&&(l=Math.min(l,a),o+r.width.tab>r.truncation.limit)){u=!0;break}o+=r.width.tab,a+=1;continue}if(ie.lastIndex=a,ie.test(e)){const m=(ie.lastIndex-a)*r.width.regular;if(o+m>n){const y=Math.floor((n-o)/r.width.regular);if(l=Math.min(l,a+y),o+m>r.truncation.limit){u=!0;break}}o+=m,a=ie.lastIndex;continue}if((d<=31||d>=127&&d<=159)&&(ne.lastIndex=a,ne.test(e))){const m=(ne.lastIndex-a)*r.width.control;if(o+m>n&&(l=Math.min(l,a+Math.floor((n-o)/r.width.control)),o+m>r.truncation.limit)){u=!0;break}o+=m,a=ne.lastIndex;continue}if(ae.lastIndex=a,ae.test(e)){if(o+r.width.emoji>n&&(l=Math.min(l,a),o+r.width.emoji>r.truncation.limit)){u=!0;break}o+=r.width.emoji,a=ae.lastIndex;continue}const g=e.codePointAt(a)??0;if(os(g)){a+=g>65535?2:1;continue}let h;if(s)h=as(g,r);else switch(oe(g)){case"control":{h=r.width.control;break}case"latin":{h=r.width.regular;break}case"wide":{h=r.width.wide;break}case"zero":{h=0;break}default:switch(te(g)){case"ambiguous":{h=r.width.ambiguousIsNarrow?r.width.regular:r.width.wide;break}case"fullwidth":{h=r.width.fullWidth;break}case"wide":{h=r.width.wide;break}default:h=r.width.regular}}if(o+h>n&&(l=Math.min(l,a),o+h>r.truncation.limit)){u=!0;break}o+=h,a+=g>65535?2:1}let f=o,p=!1;return u&&r.truncation.limit>=r.truncation.ellipsisWidth&&(f=r.truncation.limit,p=!0),{ellipsed:p,index:u?l:i,truncated:u,width:f}},"getStringTruncatedWidth");var ls=Object.defineProperty,us=$((e,t)=>ls(e,"name",{value:t,configurable:!0}),"i$2"),cs=Object.defineProperty,fs=us((e,t)=>cs(e,"name",{value:t,configurable:!0}),"e"),ds=Object.defineProperty,ps=fs((e,t)=>ds(e,"name",{value:t,configurable:!0}),"r");const j=ps((e,t={})=>ke(e,{...t,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width,"getStringWidth");var gs=Object.defineProperty,Bt=$((e,t)=>gs(e,"name",{value:t,configurable:!0}),"b"),hs=Object.defineProperty,H=Bt((e,t)=>hs(e,"name",{value:t,configurable:!0}),"d"),ms=Object.defineProperty,$s=H((e,t)=>ms(e,"name",{value:t,configurable:!0}),"a");const bs=/\x1B\[(\d+)m/;class Ft{static{$(this,"T")}static{Bt(this,"T")}static{H(this,"d")}static{$s(this,"AnsiStateTracker")}activeForeground=void 0;activeBackground=void 0;activeFormatting=[];processEscape(t){const r=bs.exec(t);if(!r)return;const n=Number.parseInt(r[1],10);switch(n){case 0:{this.activeForeground=void 0,this.activeBackground=void 0,this.activeFormatting=[];break}case 39:{this.activeForeground=void 0;break}case 49:{this.activeBackground=void 0;break}default:if(n>=30&&n<=37||n>=90&&n<=97)this.activeForeground=t;else if(n>=40&&n<=47||n>=100&&n<=107)this.activeBackground=t;else if([1,2,3,4,7,8,9].includes(n))this.activeFormatting.push(t);else if([22,23,24,27,28,29].includes(n)){const i={22:"[1m",23:"[3m",24:"[4m",27:"[7m",28:"[8m",29:"[9m"}[n];i&&(this.activeFormatting=this.activeFormatting.filter(s=>!s.includes(i)))}}}getStartEscapesForAllActiveAttributes(){return[this.activeBackground,this.activeForeground,...this.activeFormatting].filter(Boolean).join("")}getEndEscapesForAllActiveAttributes(){const t=[];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].toReversed().forEach(n=>{const i=r[n];i&&t.push(i)})}return this.activeForeground&&t.push("\x1B[39m"),this.activeBackground&&t.push("\x1B[49m"),t.join("")}}var vs=Object.defineProperty,Mt=H((e,t)=>vs(e,"name",{value:t,configurable:!0}),"o");const _t=Mt((e,t)=>{if(!Y.has(e[t]))return{isInsideEscape:!1,isInsideLinkEscape:!1};const r=!0,n=e.slice(t+1,t+1+ce.length).join("")===ce;return{isInsideEscape:r,isInsideLinkEscape:n}},"checkEscapeSequence"),ys=Mt((e,t={})=>{const r=new Ft;let n="",i=!1,s="",a="",o=!1;const l=[...e];for(let u=0;u<l.length;u++){const c=l[u];if(c&&Y.has(c)){if(n){const h=t.getWidth?.(n)??0,m={isEscapeSequence:!1,isGrapheme:!0,text:n,width:h};if(o&&(m.isHyperlink=!0,m.hyperlinkUrl=a),t.onSegment?.(m,r)===!1)return;n=""}i=!0,s=c;const d=_t(l,u),{isInsideLinkEscape:g}=d;if(g){let h=u+1;for(a="";h<l.length;){const y=l[h];if(y===ye)break;a+=y,h+=1}a=a.slice(4);const m={hyperlinkUrl:a,isEscapeSequence:!0,isGrapheme:!1,isHyperlink:!0,isHyperlinkStart:!0,width:0};if(t.onSegment?.(m,r)===!1)return;u=h,o=!0,i=!1,s="";continue}if(u+1<l.length&&l[u+1]==="\\"&&o){const h={isEscapeSequence:!0,isGrapheme:!1,isHyperlink:!0,isHyperlinkEnd:!0,width:0};if(t.onSegment?.(h,r)===!1)return;o=!1,a="",u+=1,i=!1,s="";continue}}if(i){if(s!==c&&(s+=c),c===Re){i=!1,r.processEscape(s);const d={isEscapeSequence:!0,isGrapheme:!1,text:s,width:0};if(t.onSegment?.(d,r)===!1)return;s=""}continue}n+=c;const f=t.getWidth?.(n)??0,p={isEscapeSequence:!1,isGrapheme:!0,text:n,width:f};if(o&&(p.isHyperlink=!0,p.hyperlinkUrl=a),t.onSegment?.(p,r)===!1)return;n=""}if(n){const u=t.getWidth?.(n)??0,c={isEscapeSequence:!1,isGrapheme:!0,text:n,width:u};o&&(c.isHyperlink=!0,c.hyperlinkUrl=a),t.onSegment?.(c,r)}if(s){const u={isEscapeSequence:!0,isGrapheme:!1,text:s,width:0};t.onSegment?.(u,r)}},"processAnsiString");var ws=Object.defineProperty,Ss=H((e,t)=>ws(e,"name",{value:t,configurable:!0}),"t$1");const et=Ss(e=>`${Y.values().next().value}${Wt}${String(e)}${Re}`,"wrapAnsiCode");var Os=Object.defineProperty,xs=H((e,t)=>Os(e,"name",{value:t,configurable:!0}),"s");const tt=xs(e=>`${Y.values().next().value}${ce}${e}${ye}`,"wrapAnsiHyperlink");var js=Object.defineProperty,As=H((e,t)=>js(e,"name",{value:t,configurable:!0}),"l");const Es=As(e=>{if(e.length===0)return"";if(e.length===1)return e[0];let t="",r,n;const i=e.join(`
27
+ `),s=[...i];let a=0;for(const[o,l]of s.entries()){if(t+=l,Y.has(l)){const c=Xi.exec(i.slice(a))?.groups??{};if(c.code!==void 0){const f=Number.parseFloat(c.code);r=f===Qi?void 0:f}else c.uri!==void 0&&(n=c.uri.length===0?void 0:c.uri)}const u=es.get(Number(r));s[o+1]===`
28
+ `?(n&&(t+=tt("")),r&&u&&(t+=et(u))):l===`
29
+ `&&(r&&u&&(t+=et(r)),n&&(t+=tt(n))),a+=l.length}return t},"preserveAnsi");var Ns=Object.defineProperty,F=H((e,t)=>Ns(e,"name",{value:t,configurable:!0}),"f");const Ct=/(?=\s)|(?<=\s)/,Rt=/^\s+$/,xe=F(e=>{if(!e.includes("\x1B"))return e;let t=e;return e.includes("\x1B[30m")&&(t+="\x1B[39m"),e.includes("\x1B[42m")&&(t+="\x1B[49m"),t},"resetAnsiAtLineBreak"),R=F(e=>{const t=e.split(" ");let r=t.length;for(;r>0&&j(t[r-1])===0;)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},"stringVisibleTrimSpacesRight"),Lt=F((e,t,r)=>{if(e.length===0)return[""];if(t<=0)return[e];const n=[],i=new Ft;let s="",a=0,o=!1,l=!1,u="",c=0;for(;c<e.length;){const f=e[c];if(Y.has(f)){o=!0,u=f,s+=f,l=_t([...e],c).isInsideLinkEscape,c+=1;continue}if(o){u+=f,s+=f,l?f===ye&&(o=l=!1):f===Re&&(o=!1,i.processEscape(u)),c+=1;continue}const p=j(f),d=f===" ";if(p===0){s+=f,c+=1;continue}if(a+p>t&&(s&&n.push(s+i.getEndEscapesForAllActiveAttributes()),s=i.getStartEscapesForAllActiveAttributes(),a=j(s),d&&r)){for(;c<e.length&&e[c]===" ";)c+=1;continue}if(s+=f,a+=p,a===t&&c<e.length-1&&(n.push(s+i.getEndEscapesForAllActiveAttributes()),s=i.getStartEscapesForAllActiveAttributes(),a=j(s),c+1<e.length&&e[c+1]===" "&&r)){for(c+=1;c<e.length&&e[c]===" ";)c+=1;continue}c+=1}return s&&n.push(s+i.getEndEscapesForAllActiveAttributes()),r?n.map(f=>R(f)):n},"wrapWithBreakAtWidth"),Is=F((e,t,r)=>{if(e.length===0)return[];const n=r?e.trim():e;if(n.length===0)return[];const i=[];let s="",a=0;return ys(n,{getWidth:j,onSegment:F((o,l)=>{const u=o.text??"";if(o.isEscapeSequence)s+=u;else{const c=u===" ";if(o.width===0)return s+=u,!0;if(a+o.width>t&&(s&&i.push(s),s=l.getStartEscapesForAllActiveAttributes(),a=0,c))return r||i.push(l.getStartEscapesForAllActiveAttributes()+u),!0;s+=u,a+=o.width}return!0},"onSegment")}),s&&i.push(s),r?i.map(o=>R(o)):i},"wrapCharByChar"),Ps=F((e,t,r)=>{if(e.length===0)return[];const n=r?e.trim():e;if(n.length===0)return[];const i=n.split(Ct),s=[];let a="",o=0,l=0;for(;l<i.length;){const u=i[l],c=Rt.test(u),f=j(u);if(u.length===0){l+=1;continue}if(r&&c&&o===0){l+=1;continue}if(o+f>t&&o>0){r?s.push(R(a)):s.push(a),a="",o=0;continue}a+=u,o+=f,l+=1}return a&&(r?s.push(R(a)):s.push(a)),s},"wrapWithWordBoundaries"),ks=F((e,t,r)=>{if(e.length===0)return[];const n=r?e.trim():e;if(n.length===0)return[];const i=n.split(Ct),s=[];let a="",o=0,l=0;for(;l<i.length;){const u=i[l],c=Rt.test(u),f=j(u);if(u.length===0){l+=1;continue}if(r&&c&&o===0){l+=1;continue}if(f>t){a&&s.push(xe(r?R(a):a));const p=Lt(u,t,r);if(p.length>0){for(let d=0;d<p.length-1;d+=1)s.push(p[d]);a=p.at(-1),o=j(a)}else a="",o=0;l+=1;continue}if(o+f>t&&o>0&&(s.push(xe(r?R(a):a)),a="",o=0,r&&c)){l+=1;continue}a+=u,o+=f,l+=1}return a&&s.push(xe(r?R(a):a)),s},"wrapAndBreakWords"),K={BREAK_AT_CHARACTERS:"BREAK_AT_CHARACTERS",BREAK_WORDS:"BREAK_WORDS",PRESERVE_WORDS:"PRESERVE_WORDS",STRICT_WIDTH:"STRICT_WIDTH"},Ts=F((e,t={})=>{const{removeZeroWidthCharacters:r=!0,trim:n=!0,width:i=80,wrapMode:s=K.PRESERVE_WORDS}=t;if(n&&e.trim()==="")return"";let a=e.normalize("NFC").replaceAll(`\r
30
+ `,`
31
+ `);return r&&(a=a.replaceAll(Zi,"")),a.split(`
32
+ `).map(o=>{if(n&&o.trim()==="")return"";let l;switch(s){case K.BREAK_AT_CHARACTERS:{l=Is(o,i,n);break}case K.BREAK_WORDS:{l=ks(o,i,n);break}case K.STRICT_WIDTH:{l=Lt(o,i,n);break}default:l=Ps(o,i,n)}return Es(l)}).join(`
33
+ `)},"wordWrap");var Ws=Object.defineProperty,_=$((e,t)=>Ws(e,"name",{value:t,configurable:!0}),"n$2");const zt=80,Vt=24,Te=_((e,t,{shell:r,env:n}={})=>Xt(e,t,{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:500,shell:r,env:n}).trim(),"exec"),le=_((e,t)=>({columns:Number.parseInt(e,10),rows:Number.parseInt(t,10)}),"create"),Ht=_((e,t)=>{const{columns:r,rows:n}=le(e,t);if(!(Number.isNaN(r)||Number.isNaN(n))&&!(r===zt&&n===Vt))return{columns:r,rows:n}},"createIfNotDefault"),Bs=_(()=>{if(B.platform!=="linux")return!0;try{const e=J.readFileSync("/proc/self/stat","utf8"),t=e.lastIndexOf(") ");if(t===-1)return!1;const r=e.slice(t+2).trim().split(/\s+/),n=Number.parseInt(r[2],10),i=Number.parseInt(r[5],10);return Number.isNaN(n)||Number.isNaN(i)||i<=0?!1:n===i}catch{return!1}},"isForegroundProcess");function Dt(){const{env:e,stdout:t,stderr:r}=B;if(t?.columns&&t?.rows)return le(t.columns,t.rows);if(r?.columns&&r?.rows)return le(r.columns,r.rows);if(e.COLUMNS&&e.LINES)return le(e.COLUMNS,e.LINES);const n={columns:zt,rows:Vt};return B.platform==="win32"?je()??n:B.platform==="darwin"?rt()??je()??n:rt()??je()??Fs()??n}$(Dt,"O$1");_(Dt,"terminalSize");const rt=_(()=>{try{const e=B.platform==="darwin"?J.constants.O_EVTONLY|J.constants.O_NONBLOCK:J.constants.O_NONBLOCK,{columns:t,rows:r}=er.WriteStream(J.openSync("/dev/tty",e));return{columns:t,rows:r}}catch{}},"devTty"),je=_(()=>{try{const e=Te("tput",["cols"],{env:{TERM:"dumb",...B.env}}),t=Te("tput",["lines"],{env:{TERM:"dumb",...B.env}});if(e&&t)return Ht(e,t)}catch{}},"tput"),Fs=_(()=>{try{if(!Bs())return;const e=Te("resize",["-u"]).match(/\d+/g);if(e.length===2)return Ht(e[0],e[1])}catch{}},"resize");var Ms=Object.defineProperty,_s=$((e,t)=>Ms(e,"name",{value:t,configurable:!0}),"r$2");const Cs=_s(e=>{const t=Object.keys(e).map(r=>e[r].badge??"");return t.length===0?"":t.reduce((r,n)=>r.length>n.length?r:n,"")},"getLongestBadge");var Rs=Object.defineProperty,Ls=$((e,t)=>Rs(e,"name",{value:t,configurable:!0}),"g$1");const zs=Ls(e=>{const t=Object.keys(e).map(r=>e[r].label??"");return t.length===0?"":t.reduce((r,n)=>r.length>n.length?r:n,"")},"getLongestLabel");var Vs=Object.defineProperty,Hs=$((e,t)=>Vs(e,"name",{value:t,configurable:!0}),"r$1");const{bold:Ds,cyan:Gs,green:nt,grey:qs,magenta:Ys,red:Us,yellow:Ae}=de,Js={indent:2,quoteStyle:"single",stylize:Hs((e,t)=>{const r={bigint:Ae,boolean:Ae,date:Ys,null:Ds,number:Ae,regexp:Us,special:Gs,string:nt,symbol:nt,undefined:qs};return Object.hasOwn(r,t)?r[t](e):e},"stylize")};var Ks=Object.defineProperty,Qs=$((e,t)=>Ks(e,"name",{value:t,configurable:!0}),"o$1");const{bold:Zs,underline:Xs}=de,ea=Qs((e,t)=>{let r=t.uppercase.label?e.toUpperCase():e;return r=t.underline.label?Xs(r):r,t.bold.label&&(r=Zs(r)),r},"formatLabel");var ta=Object.defineProperty,Gt=$((e,t)=>ta(e,"name",{value:t,configurable:!0}),"o");const ra=Gt(e=>[e.getHours(),e.getMinutes(),e.getSeconds()].map(t=>String(t).padStart(2,"0")).join(":"),"dateFormatter");class na{static{$(this,"AbstractPrettyReporter")}static{Gt(this,"AbstractPrettyReporter")}styles;loggerTypes;constructor(t){this.styles={bold:{label:!1},dateFormatter:ra,underline:{label:!1,message:!1,prefix:!1,suffix:!1},uppercase:{label:!1},...t},this.loggerTypes=tr}setLoggerTypes(t){this.loggerTypes=t}}var ia=Object.defineProperty,qt=$((e,t)=>ia(e,"name",{value:t,configurable:!0}),"M");const{bgGrey:sa,cyan:aa,green:oa,greenBright:la,grey:E,red:Ee,underline:it,white:ua}=de,ca=/[\\/]pail[\\/]dist/,Ne=qt(e=>!ca.test(e),"pailFileFilter");class ma extends na{static{$(this,"PrettyReporter")}static{qt(this,"PrettyReporter")}#t;#r;#n;#s=!1;#i;#e;constructor(t={}){const{error:r,inspect:n,...i}=t;super({uppercase:{label:!0,...i.uppercase},...i}),this.#i={...Js,...n},this.#e={...r,color:{fileLine:oa,hint:aa,marker:Ee,message:Ee,method:la,title:Ee}},this.#t=Kt,this.#r=Qt}setStdout(t){this.#t=t}setStderr(t){this.#r=t}setInteractiveManager(t){this.#n=t}setIsInteractive(t){this.#s=t}log(t){this._log(this._formatMessage(t),t.type.level)}_formatMessage(t){const{columns:r}=Dt();let n=r;typeof this.styles.messageLength=="number"&&(n=this.styles.messageLength);const{badge:i,context:s,date:a,error:o,file:l,groups:u,label:c,message:f,prefix:p,repeated:d,scope:g,suffix:h,traceError:m,type:y}=t,{color:A}=this.loggerTypes[y.name],I=A?de[A]:ua,x=u.map(()=>" ").join(""),b=[];if(u.length>0&&b.push(`${x+E(`[${u.at(-1)??""}]`)} `),a&&b.push(`${E(this.styles.dateFormatter(typeof a=="string"?new Date(a):a))} `),i)b.push(I(i));else{const O=Cs(this.loggerTypes);O.length>0&&b.push(`${E(".".repeat(O.length))} `)}const C=zs(this.loggerTypes);if(c){const O=j(C),P=j(c);b.push(`${I(ea(c,this.styles))} `,E(".".repeat(Math.max(0,O-P))))}else b.push(E(".".repeat(C.length+2)));d&&b.push(`${sa.white(`[${String(d)}x]`)} `),Array.isArray(g)&&g.length>0&&b.push(` ${E(`[${g.join(" > ")}]`)} `),p&&b.push(`${E(`${Array.isArray(g)&&g.length>0?". ":" "}[${this.styles.underline.prefix?it(p):p}]`)} `);const k=j(b.join(" "));if(l){const O=(l.name??"")+(l.line?`:${String(l.line)}`:""),P=j(O);if(P+k+2>n)b.push(E(` ${O}`));else{const Se=Math.max(0,n-k-P-2);b.push(E(`${".".repeat(Se)} ${O}`))}}else b.push(E(".".repeat(Math.max(0,n-k-1))));if(b.length>0&&b.push(`
34
+
35
+ `),f!==rr){const O=typeof f=="string"?f:Ke(f,this.#i);b.push(x+Ts(O,{trim:!1,width:n-3,wrapMode:K.STRICT_WIDTH}))}if(s){let O=!1;b.push(...s.map(P=>{if(P instanceof Error)return O=!0,`
36
+
37
+ ${Oe(P,{...this.#e,filterStacktrace:Ne,prefix:x})}`;if(typeof P=="object")return` ${Ke(P,this.#i)}`;const Se=(O?`
38
+
39
+ `:" ")+String(P);return O=!1,Se}))}return o&&b.push(Oe(o,{...this.#e,filterStacktrace:Ne,prefix:x})),m&&b.push(`
40
+
41
+ ${Oe(m,{...this.#e,filterStacktrace:Ne,hideErrorCauseCodeView:!0,hideErrorCodeView:!0,hideErrorErrorsCodeView:!0,hideMessage:!0,prefix:x})}`),h&&b.push(`
42
+ `,x+E(this.styles.underline.suffix?it(h):h)),b.join("")}_log(t,r){const n=["error","trace","warn"].includes(r)?"stderr":"stdout",i=n==="stderr"?this.#r:this.#t;this.#s&&this.#n!==void 0&&i.isTTY?this.#n.update(n,t.split(`
43
+ `),0):nr(`${t}
44
+ `,i)}}export{ma as PrettyReporter};