@stlite/desktop 0.55.0 → 0.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/dump_artifacts.js +21 -21
- package/build/asset-manifest.json +8 -8
- package/build/electron/worker.js +4 -4
- package/build/index.html +1 -1
- package/build/pyodide/pyodide-lock.json +1 -1
- package/build/pyodide/pyodide.asm.js +5 -5
- package/build/pyodide/pyodide.asm.wasm +0 -0
- package/build/pyodide/pyodide.mjs +6 -6
- package/build/pyodide/python_stdlib.zip +0 -0
- package/build/static/js/{144.88686aae.chunk.js → 144.fa398340.chunk.js} +1 -1
- package/build/static/js/{1740.8721df70.chunk.js → 1740.9d03a50a.chunk.js} +1 -1
- package/build/static/js/{3936.0940f40e.chunk.js → 3936.a3e17800.chunk.js} +1 -1
- package/build/static/js/{4785.dfc6ec31.chunk.js → 4785.0c41f474.chunk.js} +1 -1
- package/build/static/js/{6134.705b9bd4.chunk.js → 6134.38a4a22f.chunk.js} +1 -1
- package/build/static/js/main.1e159f80.js +28 -0
- package/package.json +10 -9
- package/wheels/stlite_server-0.1.0-py3-none-any.whl +0 -0
- package/wheels/streamlit-1.35.0-cp312-none-any.whl +0 -0
- package/build/static/js/main.d4b476f6.js +0 -28
- package/wheels/streamlit-1.35.0-cp311-none-any.whl +0 -0
- /package/build/static/js/{main.d4b476f6.js.LICENSE.txt → main.1e159f80.js.LICENSE.txt} +0 -0
package/bin/dump_artifacts.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var
|
|
2
|
+
"use strict";var cg=Object.create;var il=Object.defineProperty;var dg=Object.getOwnPropertyDescriptor;var pg=Object.getOwnPropertyNames;var gg=Object.getPrototypeOf,mg=Object.prototype.hasOwnProperty;var w=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var yg=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of pg(e))!mg.call(t,n)&&n!==r&&il(t,n,{get:()=>e[n],enumerable:!(i=dg(e,n))||i.enumerable});return t};var Ee=(t,e,r)=>(r=t!=null?cg(gg(t)):{},yg(e||!t||!t.__esModule?il(r,"default",{value:t,enumerable:!0}):r,t));var Re=w((fE,sl)=>{"use strict";var Os=class t extends Error{constructor(e){super(`Format functions must be synchronous taking a two arguments: (info, opts)
|
|
3
3
|
Found: ${e.toString().split(`
|
|
4
4
|
`)[0]}
|
|
5
|
-
`),Error.captureStackTrace(this,t)}};
|
|
6
|
-
`)!=-1,i=this._styles,n=i.length;n--;){var s=Ct[i[n]];e=s.open+e.replace(s.closeRe,s.open)+s.close,r&&(e=e.replace(
|
|
7
|
-
`));return!0}$s.exports=(...t)=>{let e
|
|
5
|
+
`),Error.captureStackTrace(this,t)}};sl.exports=t=>{if(t.length>2)throw new Os(t);function e(i={}){this.options=i}e.prototype.transform=t;function r(i){return new e(i)}return r.Format=e,r}});var ul=w((hE,ll)=>{var ol={};ll.exports=ol;var al={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(al).forEach(function(t){var e=al[t],r=ol[t]=[];r.open="\x1B["+e[0]+"m",r.close="\x1B["+e[1]+"m"})});var hl=w((cE,fl)=>{"use strict";fl.exports=function(t,e){e=e||process.argv||[];var r=e.indexOf("--"),i=/^-{1,2}/.test(t)?"":"--",n=e.indexOf(i+t);return n!==-1&&(r===-1?!0:n<r)}});var dl=w((dE,cl)=>{"use strict";var bg=require("os"),Fe=hl(),be=process.env,er=void 0;Fe("no-color")||Fe("no-colors")||Fe("color=false")?er=!1:(Fe("color")||Fe("colors")||Fe("color=true")||Fe("color=always"))&&(er=!0);"FORCE_COLOR"in be&&(er=be.FORCE_COLOR.length===0||parseInt(be.FORCE_COLOR,10)!==0);function wg(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function vg(t){if(er===!1)return 0;if(Fe("color=16m")||Fe("color=full")||Fe("color=truecolor"))return 3;if(Fe("color=256"))return 2;if(t&&!t.isTTY&&er!==!0)return 0;var e=er?1:0;if(process.platform==="win32"){var r=bg.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in be)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(n){return n in be})||be.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in be)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(be.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in be){var i=parseInt((be.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(be.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(be.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(be.TERM)||"COLORTERM"in be?1:(be.TERM==="dumb",e)}function Ms(t){var e=vg(t);return wg(e)}cl.exports={supportsColor:Ms,stdout:Ms(process.stdout),stderr:Ms(process.stderr)}});var gl=w((pE,pl)=>{pl.exports=function(e,r){var i="";e=e||"Run the trap, drop the bass",e=e.split("");var n={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return e.forEach(function(s){s=s.toLowerCase();var a=n[s]||[" "],o=Math.floor(Math.random()*a.length);typeof n[s]<"u"?i+=n[s][o]:i+=s}),i}});var yl=w((gE,ml)=>{ml.exports=function(e,r){e=e||" he is here ";var i={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},n=[].concat(i.up,i.down,i.mid);function s(l){var u=Math.floor(Math.random()*l);return u}function a(l){var u=!1;return n.filter(function(h){u=h===l}),u}function o(l,u){var h="",p,c;u=u||{},u.up=typeof u.up<"u"?u.up:!0,u.mid=typeof u.mid<"u"?u.mid:!0,u.down=typeof u.down<"u"?u.down:!0,u.size=typeof u.size<"u"?u.size:"maxi",l=l.split("");for(c in l)if(!a(c)){switch(h=h+l[c],p={up:0,down:0,mid:0},u.size){case"mini":p.up=s(8),p.mid=s(2),p.down=s(8);break;case"maxi":p.up=s(16)+3,p.mid=s(4)+1,p.down=s(64)+3;break;default:p.up=s(8)+1,p.mid=s(6)/2,p.down=s(8)+1;break}var f=["up","mid","down"];for(var y in f)for(var b=f[y],S=0;S<=p[b];S++)u[b]&&(h=h+i[b][s(i[b].length)])}return h}return o(e,r)}});var wl=w((mE,bl)=>{bl.exports=function(t){return function(e,r,i){if(e===" ")return e;switch(r%3){case 0:return t.red(e);case 1:return t.white(e);case 2:return t.blue(e)}}}});var _l=w((yE,vl)=>{vl.exports=function(t){return function(e,r,i){return r%2===0?e:t.inverse(e)}}});var El=w((bE,Sl)=>{Sl.exports=function(t){var e=["red","yellow","green","blue","magenta"];return function(r,i,n){return r===" "?r:t[e[i++%e.length]](r)}}});var xl=w((wE,Rl)=>{Rl.exports=function(t){var e=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(r,i,n){return r===" "?r:t[e[Math.round(Math.random()*(e.length-2))]](r)}}});var Pl=w((_E,Al)=>{var j={};Al.exports=j;j.themes={};var _g=require("util"),Ct=j.styles=ul(),Ol=Object.defineProperties,Sg=new RegExp(/[\r\n]+/g);j.supportsColor=dl().supportsColor;typeof j.enabled>"u"&&(j.enabled=j.supportsColor()!==!1);j.enable=function(){j.enabled=!0};j.disable=function(){j.enabled=!1};j.stripColors=j.strip=function(t){return(""+t).replace(/\x1B\[\d+m/g,"")};var vE=j.stylize=function(e,r){if(!j.enabled)return e+"";var i=Ct[r];return!i&&r in j?j[r](e):i.open+e+i.close},Eg=/[|\\{}()[\]^$+*?.]/g,Rg=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(Eg,"\\$&")};function Ml(t){var e=function r(){return Tg.apply(r,arguments)};return e._styles=t,e.__proto__=xg,e}var kl=function(){var t={};return Ct.grey=Ct.gray,Object.keys(Ct).forEach(function(e){Ct[e].closeRe=new RegExp(Rg(Ct[e].close),"g"),t[e]={get:function(){return Ml(this._styles.concat(e))}}}),t}(),xg=Ol(function(){},kl);function Tg(){var t=Array.prototype.slice.call(arguments),e=t.map(function(a){return a!=null&&a.constructor===String?a:_g.inspect(a)}).join(" ");if(!j.enabled||!e)return e;for(var r=e.indexOf(`
|
|
6
|
+
`)!=-1,i=this._styles,n=i.length;n--;){var s=Ct[i[n]];e=s.open+e.replace(s.closeRe,s.open)+s.close,r&&(e=e.replace(Sg,function(a){return s.close+a+s.open}))}return e}j.setTheme=function(t){if(typeof t=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var e in t)(function(r){j[r]=function(i){if(typeof t[r]=="object"){var n=i;for(var s in t[r])n=j[t[r][s]](n);return n}return j[t[r]](i)}})(e)};function Og(){var t={};return Object.keys(kl).forEach(function(e){t[e]={get:function(){return Ml([e])}}}),t}var Mg=function(e,r){var i=r.split("");return i=i.map(e),i.join("")};j.trap=gl();j.zalgo=yl();j.maps={};j.maps.america=wl()(j);j.maps.zebra=_l()(j);j.maps.rainbow=El()(j);j.maps.random=xl()(j);for(Tl in j.maps)(function(t){j[t]=function(e){return Mg(j.maps[t],e)}})(Tl);var Tl;Ol(j,Og())});var ks=w((SE,Dl)=>{var kg=Pl();Dl.exports=kg});var ql=w(As=>{"use strict";As.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9};As.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}});var Cl=w(Ps=>{"use strict";Ps.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6};Ps.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}});var Ll=w(Ds=>{"use strict";Ds.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7};Ds.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}});var jl=w(Di=>{"use strict";Object.defineProperty(Di,"cli",{value:ql()});Object.defineProperty(Di,"npm",{value:Cl()});Object.defineProperty(Di,"syslog",{value:Ll()})});var re=w(Ar=>{"use strict";Object.defineProperty(Ar,"LEVEL",{value:Symbol.for("level")});Object.defineProperty(Ar,"MESSAGE",{value:Symbol.for("message")});Object.defineProperty(Ar,"SPLAT",{value:Symbol.for("splat")});Object.defineProperty(Ar,"configs",{value:jl()})});var Li=w((ME,Ci)=>{"use strict";var Ls=ks(),{LEVEL:qs,MESSAGE:Cs}=re();Ls.enabled=!0;var Nl=/\s+/,qi=class t{constructor(e={}){e.colors&&this.addColors(e.colors),this.options=e}static addColors(e){let r=Object.keys(e).reduce((i,n)=>(i[n]=Nl.test(e[n])?e[n].split(Nl):e[n],i),{});return t.allColors=Object.assign({},t.allColors||{},r),t.allColors}addColors(e){return t.addColors(e)}colorize(e,r,i){if(typeof i>"u"&&(i=r),!Array.isArray(t.allColors[e]))return Ls[t.allColors[e]](i);for(let n=0,s=t.allColors[e].length;n<s;n++)i=Ls[t.allColors[e][n]](i);return i}transform(e,r){return r.all&&typeof e[Cs]=="string"&&(e[Cs]=this.colorize(e[qs],e.level,e[Cs])),(r.level||r.all||!r.message)&&(e.level=this.colorize(e[qs],e.level)),(r.all||r.message)&&(e.message=this.colorize(e[qs],e.level,e.message)),e}};Ci.exports=t=>new qi(t);Ci.exports.Colorizer=Ci.exports.Format=qi});var Il=w((kE,Fl)=>{"use strict";var{Colorizer:Ag}=Li();Fl.exports=t=>(Ag.addColors(t.colors||t),t)});var Wl=w((AE,$l)=>{"use strict";var Pg=Re();$l.exports=Pg(t=>(t.message=` ${t.message}`,t))});var zl=w((PE,Ul)=>{"use strict";var Dg=Re(),{LEVEL:Bl,MESSAGE:js}=re();Ul.exports=Dg((t,{stack:e,cause:r})=>{if(t instanceof Error){let n=Object.assign({},t,{level:t.level,[Bl]:t[Bl]||t.level,message:t.message,[js]:t[js]||t.message});return e&&(n.stack=t.stack),r&&(n.cause=t.cause),n}if(!(t.message instanceof Error))return t;let i=t.message;return Object.assign(t,i),t.message=i.message,t[js]=i.message,e&&(t.stack=i.stack),r&&(t.cause=i.cause),t})});var Fs=w((DE,Ni)=>{"use strict";var{configs:qg,LEVEL:Hl,MESSAGE:Ns}=re(),ji=class t{constructor(e={levels:qg.npm.levels}){this.paddings=t.paddingForLevels(e.levels,e.filler),this.options=e}static getLongestLevel(e){let r=Object.keys(e).map(i=>i.length);return Math.max(...r)}static paddingForLevel(e,r,i){let n=i+1-e.length,s=Math.floor(n/r.length);return`${r}${r.repeat(s)}`.slice(0,n)}static paddingForLevels(e,r=" "){let i=t.getLongestLevel(e);return Object.keys(e).reduce((n,s)=>(n[s]=t.paddingForLevel(s,r,i),n),{})}transform(e,r){return e.message=`${this.paddings[e[Hl]]}${e.message}`,e[Ns]&&(e[Ns]=`${this.paddings[e[Hl]]}${e[Ns]}`),e}};Ni.exports=t=>new ji(t);Ni.exports.Padder=Ni.exports.Format=ji});var Gl=w((qE,Is)=>{"use strict";var{Colorizer:Cg}=Li(),{Padder:Lg}=Fs(),{configs:jg,MESSAGE:Ng}=re(),Fi=class{constructor(e={}){e.levels||(e.levels=jg.cli.levels),this.colorizer=new Cg(e),this.padder=new Lg(e),this.options=e}transform(e,r){return this.colorizer.transform(this.padder.transform(e,r),r),e[Ng]=`${e.level}:${e.message}`,e}};Is.exports=t=>new Fi(t);Is.exports.Format=Fi});var Vl=w((CE,$s)=>{"use strict";var Fg=Re();function Yl(t){if(t.every(Ig))return e=>{let r=e;for(let i=0;i<t.length;i++)if(r=t[i].transform(r,t[i].options),!r)return!1;return r}}function Ig(t){if(typeof t.transform!="function")throw new Error(["No transform function found on format. Did you create a format instance?","const myFormat = format(formatFn);","const instance = myFormat();"].join(`
|
|
7
|
+
`));return!0}$s.exports=(...t)=>{let e=Fg(Yl(t)),r=e();return r.Format=e.Format,r};$s.exports.cascade=Yl});var Pr=w((zs,Ql)=>{"use strict";var{hasOwnProperty:Ii}=Object.prototype,jt=Us();jt.configure=Us;jt.stringify=jt;jt.default=jt;zs.stringify=jt;zs.configure=Us;Ql.exports=jt;var $g=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;function dt(t){return t.length<5e3&&!$g.test(t)?`"${t}"`:JSON.stringify(t)}function Ws(t){if(t.length>200)return t.sort();for(let e=1;e<t.length;e++){let r=t[e],i=e;for(;i!==0&&t[i-1]>r;)t[i]=t[i-1],i--;t[i]=r}return t}var Wg=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function Bs(t){return Wg.call(t)!==void 0&&t.length!==0}function Kl(t,e,r){t.length<r&&(r=t.length);let i=e===","?"":" ",n=`"0":${i}${t[0]}`;for(let s=1;s<r;s++)n+=`${e}"${s}":${i}${t[s]}`;return n}function Bg(t){if(Ii.call(t,"circularValue")){let e=t.circularValue;if(typeof e=="string")return`"${e}"`;if(e==null)return e;if(e===Error||e===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]"'}function Jl(t,e){let r;if(Ii.call(t,e)&&(r=t[e],typeof r!="boolean"))throw new TypeError(`The "${e}" argument must be of type boolean`);return r===void 0?!0:r}function Zl(t,e){let r;if(Ii.call(t,e)){if(r=t[e],typeof r!="number")throw new TypeError(`The "${e}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${e}" argument must be an integer`);if(r<1)throw new RangeError(`The "${e}" argument must be >= 1`)}return r===void 0?1/0:r}function Lt(t){return t===1?"1 item":`${t} items`}function Ug(t){let e=new Set;for(let r of t)(typeof r=="string"||typeof r=="number")&&e.add(String(r));return e}function zg(t){if(Ii.call(t,"strict")){let e=t.strict;if(typeof e!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(e)return r=>{let i=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(i+=` (${r.toString()})`),new Error(i)}}}function Us(t){t={...t};let e=zg(t);e&&(t.bigint===void 0&&(t.bigint=!1),"circularValue"in t||(t.circularValue=Error));let r=Bg(t),i=Jl(t,"bigint"),n=Jl(t,"deterministic"),s=Zl(t,"maximumDepth"),a=Zl(t,"maximumBreadth");function o(c,f,y,b,S,_){let x=f[c];switch(typeof x=="object"&&x!==null&&typeof x.toJSON=="function"&&(x=x.toJSON(c)),x=b.call(f,c,x),typeof x){case"string":return dt(x);case"object":{if(x===null)return"null";if(y.indexOf(x)!==-1)return r;let R="",O=",",A=_;if(Array.isArray(x)){if(x.length===0)return"[]";if(s<y.length+1)return'"[Array]"';y.push(x),S!==""&&(_+=S,R+=`
|
|
8
8
|
${_}`,O=`,
|
|
9
|
-
${_}`);let J=Math.min(x.length,a),
|
|
9
|
+
${_}`);let J=Math.min(x.length,a),me=0;for(;me<J-1;me++){let rt=o(String(me),x,y,b,S,_);R+=rt!==void 0?rt:"null",R+=O}let ye=o(String(me),x,y,b,S,_);if(R+=ye!==void 0?ye:"null",x.length-1>a){let rt=x.length-a-1;R+=`${O}"... ${Lt(rt)} not stringified"`}return S!==""&&(R+=`
|
|
10
10
|
${A}`),y.pop(),`[${R}]`}let D=Object.keys(x),F=D.length;if(F===0)return"{}";if(s<y.length+1)return'"[Object]"';let N="",B="";S!==""&&(_+=S,O=`,
|
|
11
|
-
${_}`,N=" ");let te=Math.min(F,a);n&&!Bs(x)&&(D=Ws(D)),y.push(x);for(let J=0;J<te;J++){let
|
|
11
|
+
${_}`,N=" ");let te=Math.min(F,a);n&&!Bs(x)&&(D=Ws(D)),y.push(x);for(let J=0;J<te;J++){let me=D[J],ye=o(me,x,y,b,S,_);ye!==void 0&&(R+=`${B}${dt(me)}:${N}${ye}`,B=O)}if(F>a){let J=F-a;R+=`${B}"...":${N}"${Lt(J)} not stringified"`,B=O}return S!==""&&B.length>1&&(R=`
|
|
12
12
|
${_}${R}
|
|
13
13
|
${A}`),y.pop(),`{${R}}`}case"number":return isFinite(x)?String(x):e?e(x):"null";case"boolean":return x===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(x);default:return e?e(x):void 0}}function l(c,f,y,b,S,_){switch(typeof f=="object"&&f!==null&&typeof f.toJSON=="function"&&(f=f.toJSON(c)),typeof f){case"string":return dt(f);case"object":{if(f===null)return"null";if(y.indexOf(f)!==-1)return r;let x=_,R="",O=",";if(Array.isArray(f)){if(f.length===0)return"[]";if(s<y.length+1)return'"[Array]"';y.push(f),S!==""&&(_+=S,R+=`
|
|
14
14
|
${_}`,O=`,
|
|
@@ -18,22 +18,22 @@ ${_}`,A=" ");let D="";for(let F of b){let N=l(F,f[F],y,b,S,_);N!==void 0&&(R+=`$
|
|
|
18
18
|
${_}${R}
|
|
19
19
|
${x}`),y.pop(),`{${R}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function u(c,f,y,b,S){switch(typeof f){case"string":return dt(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(c),typeof f!="object")return u(c,f,y,b,S);if(f===null)return"null"}if(y.indexOf(f)!==-1)return r;let _=S;if(Array.isArray(f)){if(f.length===0)return"[]";if(s<y.length+1)return'"[Array]"';y.push(f),S+=b;let N=`
|
|
20
20
|
${S}`,B=`,
|
|
21
|
-
${S}`,te=Math.min(f.length,a),J=0;for(;J<te-1;J++){let
|
|
21
|
+
${S}`,te=Math.min(f.length,a),J=0;for(;J<te-1;J++){let ye=u(String(J),f[J],y,b,S);N+=ye!==void 0?ye:"null",N+=B}let me=u(String(J),f[J],y,b,S);if(N+=me!==void 0?me:"null",f.length-1>a){let ye=f.length-a-1;N+=`${B}"... ${Lt(ye)} not stringified"`}return N+=`
|
|
22
22
|
${_}`,y.pop(),`[${N}]`}let x=Object.keys(f),R=x.length;if(R===0)return"{}";if(s<y.length+1)return'"[Object]"';S+=b;let O=`,
|
|
23
|
-
${S}`,A="",D="",F=Math.min(R,a);Bs(f)&&(A+=
|
|
23
|
+
${S}`,A="",D="",F=Math.min(R,a);Bs(f)&&(A+=Kl(f,O,a),x=x.slice(f.length),F-=f.length,D=O),n&&(x=Ws(x)),y.push(f);for(let N=0;N<F;N++){let B=x[N],te=u(B,f[B],y,b,S);te!==void 0&&(A+=`${D}${dt(B)}: ${te}`,D=O)}if(R>a){let N=R-a;A+=`${D}"...": "${Lt(N)} not stringified"`,D=O}return D!==""&&(A=`
|
|
24
24
|
${S}${A}
|
|
25
|
-
${_}`),y.pop(),`{${A}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function h(c,f,y){switch(typeof f){case"string":return dt(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(c),typeof f!="object")return h(c,f,y);if(f===null)return"null"}if(y.indexOf(f)!==-1)return r;let b="";if(Array.isArray(f)){if(f.length===0)return"[]";if(s<y.length+1)return'"[Array]"';y.push(f);let O=Math.min(f.length,a),A=0;for(;A<O-1;A++){let F=h(String(A),f[A],y);b+=F!==void 0?F:"null",b+=","}let D=h(String(A),f[A],y);if(b+=D!==void 0?D:"null",f.length-1>a){let F=f.length-a-1;b+=`,"... ${Lt(F)} not stringified"`}return y.pop(),`[${b}]`}let S=Object.keys(f),_=S.length;if(_===0)return"{}";if(s<y.length+1)return'"[Object]"';let x="",R=Math.min(_,a);Bs(f)&&(b+=Jl(f,",",a),S=S.slice(f.length),R-=f.length,x=","),n&&(S=Ws(S)),y.push(f);for(let O=0;O<R;O++){let A=S[O],D=h(A,f[A],y);D!==void 0&&(b+=`${x}${dt(A)}:${D}`,x=",")}if(_>a){let O=_-a;b+=`${x}"...":"${Lt(O)} not stringified"`}return y.pop(),`{${b}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function p(c,f,y){if(arguments.length>1){let b="";if(typeof y=="number"?b=" ".repeat(Math.min(y,10)):typeof y=="string"&&(b=y.slice(0,10)),f!=null){if(typeof f=="function")return o("",{"":c},[],f,b,"");if(Array.isArray(f))return l("",c,[],Hg(f),b,"")}if(b.length!==0)return u("",c,[],b,"")}return h("",c,[])}return p}});var Hs=w((NE,eu)=>{"use strict";var Yg=Re(),{MESSAGE:Vg}=re(),Kg=Pr();function Jg(t,e){return typeof e=="bigint"?e.toString():e}eu.exports=Yg((t,e)=>{let r=Kg.configure(e);return t[Vg]=r(t,e.replacer||Jg,e.space),t})});var ru=w((FE,tu)=>{"use strict";var Zg=Re();tu.exports=Zg((t,e)=>e.message?(t.message=`[${e.label}] ${t.message}`,t):(t.label=e.label,t))});var nu=w((IE,iu)=>{"use strict";var Qg=Re(),{MESSAGE:Xg}=re(),em=Pr();iu.exports=Qg(t=>{let e={};return t.message&&(e["@message"]=t.message,delete t.message),t.timestamp&&(e["@timestamp"]=t.timestamp,delete t.timestamp),e["@fields"]=t,t[Xg]=em(e),t})});var au=w(($E,su)=>{"use strict";var tm=Re();function rm(t,e,r){let i=e.reduce((s,a)=>(s[a]=t[a],delete t[a],s),{}),n=Object.keys(t).reduce((s,a)=>(s[a]=t[a],delete t[a],s),{});return Object.assign(t,i,{[r]:n}),t}function im(t,e,r){return t[r]=e.reduce((i,n)=>(i[n]=t[n],delete t[n],i),{}),t}su.exports=tm((t,e={})=>{let r="metadata";e.key&&(r=e.key);let i=[];return!e.fillExcept&&!e.fillWith&&(i.push("level"),i.push("message")),e.fillExcept&&(i=e.fillExcept),i.length>0?rm(t,i,r):e.fillWith?im(t,e.fillWith,r):t})});var lu=w((WE,ou)=>{var tr=1e3,rr=tr*60,ir=rr*60,Nt=ir*24,nm=Nt*7,sm=Nt*365.25;ou.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return am(t);if(r==="number"&&isFinite(t))return e.long?lm(t):om(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function am(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return r*sm;case"weeks":case"week":case"w":return r*nm;case"days":case"day":case"d":return r*Nt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ir;case"minutes":case"minute":case"mins":case"min":case"m":return r*rr;case"seconds":case"second":case"secs":case"sec":case"s":return r*tr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function om(t){var e=Math.abs(t);return e>=Nt?Math.round(t/Nt)+"d":e>=ir?Math.round(t/ir)+"h":e>=rr?Math.round(t/rr)+"m":e>=tr?Math.round(t/tr)+"s":t+"ms"}function lm(t){var e=Math.abs(t);return e>=Nt?$i(t,e,Nt,"day"):e>=ir?$i(t,e,ir,"hour"):e>=rr?$i(t,e,rr,"minute"):e>=tr?$i(t,e,tr,"second"):t+" ms"}function $i(t,e,r,i){var n=e>=r*1.5;return Math.round(t/r)+" "+i+(n?"s":"")}});var fu=w((Dr,uu)=>{"use strict";var um=Re(),fm=lu();uu.exports=um(t=>{let e=+new Date;return Dr.diff=e-(Dr.prevTime||e),Dr.prevTime=e,t.ms=`+${fm(Dr.diff)}`,t})});var du=w((BE,cu)=>{"use strict";var hm=require("util").inspect,cm=Re(),{LEVEL:dm,MESSAGE:hu,SPLAT:pm}=re();cu.exports=cm((t,e={})=>{let r=Object.assign({},t);return delete r[dm],delete r[hu],delete r[pm],t[hu]=hm(r,!1,e.depth||null,e.colorize),t})});var pu=w((UE,Bi)=>{"use strict";var{MESSAGE:gm}=re(),Wi=class{constructor(e){this.template=e}transform(e){return e[gm]=this.template(e),e}};Bi.exports=t=>new Wi(t);Bi.exports.Printf=Bi.exports.Format=Wi});var yu=w((zE,mu)=>{"use strict";var mm=Re(),{MESSAGE:gu}=re(),ym=Pr();mu.exports=mm(t=>{let e=ym(Object.assign({},t,{level:void 0,message:void 0,splat:void 0})),r=t.padding&&t.padding[t.level]||"";return e!=="{}"?t[gu]=`${t.level}:${r} ${t.message} ${e}`:t[gu]=`${t.level}:${r} ${t.message}`,t})});var vu=w((HE,wu)=>{"use strict";var bm=require("util"),{SPLAT:bu}=re(),wm=/%[scdjifoO%]/g,vm=/%%/g,Gs=class{constructor(e){this.options=e}_splat(e,r){let i=e.message,n=e[bu]||e.splat||[],s=i.match(vm),a=s&&s.length||0,l=r.length-a-n.length,u=l<0?n.splice(l,-1*l):[],h=u.length;if(h)for(let p=0;p<h;p++)Object.assign(e,u[p]);return e.message=bm.format(i,...n),e}transform(e){let r=e.message,i=e[bu]||e.splat;if(!i||!i.length)return e;let n=r&&r.match&&r.match(wm);if(!n&&(i||i.length)){let s=i.length>1?i.splice(0):i,a=s.length;if(a)for(let o=0;o<a;o++)Object.assign(e,s[o]);return e}return n?this._splat(e,n):e}};wu.exports=t=>new Gs(t)});var Su=w((Ui,_u)=>{(function(t,e){typeof Ui=="object"&&typeof _u<"u"?e(Ui):typeof define=="function"&&define.amd?define(["exports"],e):e(t.fecha={})})(Ui,function(t){"use strict";var e=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,r="\\d\\d?",i="\\d\\d",n="\\d{3}",s="\\d{4}",a="[^\\s]+",o=/\[([^]*?)\]/gm;function l(E,M){for(var U=[],de=0,P=E.length;de<P;de++)U.push(E[de].substr(0,M));return U}var u=function(E){return function(M,U){var de=U[E].map(function(Ee){return Ee.toLowerCase()}),P=de.indexOf(M.toLowerCase());return P>-1?P:null}};function h(E){for(var M=[],U=1;U<arguments.length;U++)M[U-1]=arguments[U];for(var de=0,P=M;de<P.length;de++){var Ee=P[de];for(var it in Ee)E[it]=Ee[it]}return E}var p=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["January","February","March","April","May","June","July","August","September","October","November","December"],f=l(c,3),y=l(p,3),b={dayNamesShort:y,dayNames:p,monthNamesShort:f,monthNames:c,amPm:["am","pm"],DoFn:function(E){return E+["th","st","nd","rd"][E%10>3?0:(E-E%10!==10?1:0)*E%10]}},S=h({},b),_=function(E){return S=h(S,E)},x=function(E){return E.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},R=function(E,M){for(M===void 0&&(M=2),E=String(E);E.length<M;)E="0"+E;return E},O={D:function(E){return String(E.getDate())},DD:function(E){return R(E.getDate())},Do:function(E,M){return M.DoFn(E.getDate())},d:function(E){return String(E.getDay())},dd:function(E){return R(E.getDay())},ddd:function(E,M){return M.dayNamesShort[E.getDay()]},dddd:function(E,M){return M.dayNames[E.getDay()]},M:function(E){return String(E.getMonth()+1)},MM:function(E){return R(E.getMonth()+1)},MMM:function(E,M){return M.monthNamesShort[E.getMonth()]},MMMM:function(E,M){return M.monthNames[E.getMonth()]},YY:function(E){return R(String(E.getFullYear()),4).substr(2)},YYYY:function(E){return R(E.getFullYear(),4)},h:function(E){return String(E.getHours()%12||12)},hh:function(E){return R(E.getHours()%12||12)},H:function(E){return String(E.getHours())},HH:function(E){return R(E.getHours())},m:function(E){return String(E.getMinutes())},mm:function(E){return R(E.getMinutes())},s:function(E){return String(E.getSeconds())},ss:function(E){return R(E.getSeconds())},S:function(E){return String(Math.round(E.getMilliseconds()/100))},SS:function(E){return R(Math.round(E.getMilliseconds()/10),2)},SSS:function(E){return R(E.getMilliseconds(),3)},a:function(E,M){return E.getHours()<12?M.amPm[0]:M.amPm[1]},A:function(E,M){return E.getHours()<12?M.amPm[0].toUpperCase():M.amPm[1].toUpperCase()},ZZ:function(E){var M=E.getTimezoneOffset();return(M>0?"-":"+")+R(Math.floor(Math.abs(M)/60)*100+Math.abs(M)%60,4)},Z:function(E){var M=E.getTimezoneOffset();return(M>0?"-":"+")+R(Math.floor(Math.abs(M)/60),2)+":"+R(Math.abs(M)%60,2)}},A=function(E){return+E-1},D=[null,r],F=[null,a],N=["isPm",a,function(E,M){var U=E.toLowerCase();return U===M.amPm[0]?0:U===M.amPm[1]?1:null}],B=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(E){var M=(E+"").match(/([+-]|\d\d)/gi);if(M){var U=+M[1]*60+parseInt(M[2],10);return M[0]==="+"?U:-U}return 0}],te={D:["day",r],DD:["day",i],Do:["day",r+a,function(E){return parseInt(E,10)}],M:["month",r,A],MM:["month",i,A],YY:["year",i,function(E){var M=new Date,U=+(""+M.getFullYear()).substr(0,2);return+(""+(+E>68?U-1:U)+E)}],h:["hour",r,void 0,"isPm"],hh:["hour",i,void 0,"isPm"],H:["hour",r],HH:["hour",i],m:["minute",r],mm:["minute",i],s:["second",r],ss:["second",i],YYYY:["year",s],S:["millisecond","\\d",function(E){return+E*100}],SS:["millisecond",i,function(E){return+E*10}],SSS:["millisecond",n],d:D,dd:D,ddd:F,dddd:F,MMM:["month",a,u("monthNamesShort")],MMMM:["month",a,u("monthNames")],a:N,A:N,ZZ:B,Z:B},J={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},ye=function(E){return h(J,E)},be=function(E,M,U){if(M===void 0&&(M=J.default),U===void 0&&(U={}),typeof E=="number"&&(E=new Date(E)),Object.prototype.toString.call(E)!=="[object Date]"||isNaN(E.getTime()))throw new Error("Invalid Date pass to format");M=J[M]||M;var de=[];M=M.replace(o,function(Ee,it){return de.push(it),"@@@"});var P=h(h({},S),U);return M=M.replace(e,function(Ee){return O[Ee](E,P)}),M.replace(/@@@/g,function(){return de.shift()})};function rt(E,M,U){if(U===void 0&&(U={}),typeof M!="string")throw new Error("Invalid format in fecha parse");if(M=J[M]||M,E.length>1e3)return null;var de=new Date,P={year:de.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},Ee=[],it=[],At=M.replace(o,function(Dt,ct){return it.push(x(ct)),"@@@"}),He={},Mr={};At=x(At).replace(e,function(Dt){var ct=te[Dt],Xt=ct[0],Ts=ct[1],ki=ct[3];if(He[Xt])throw new Error("Invalid format. "+Xt+" specified twice in format");return He[Xt]=!0,ki&&(Mr[ki]=!0),Ee.push(ct),"("+Ts+")"}),Object.keys(Mr).forEach(function(Dt){if(!He[Dt])throw new Error("Invalid format. "+Dt+" is required in specified format")}),At=At.replace(/@@@/g,function(){return it.shift()});var Qt=E.match(new RegExp(At,"i"));if(!Qt)return null;for(var Es=h(h({},S),U),Te=1;Te<Qt.length;Te++){var kr=Ee[Te-1],Rs=kr[0],ft=kr[2],Mi=ft?ft(Qt[Te],Es):+Qt[Te];if(Mi==null)return null;P[Rs]=Mi}P.isPm===1&&P.hour!=null&&+P.hour!=12?P.hour=+P.hour+12:P.isPm===0&&+P.hour==12&&(P.hour=0);var Pt;if(P.timezoneOffset==null){Pt=new Date(P.year,P.month,P.day,P.hour,P.minute,P.second,P.millisecond);for(var ht=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],Te=0,xs=ht.length;Te<xs;Te++)if(He[ht[Te][0]]&&P[ht[Te][0]]!==Pt[ht[Te][1]]())return null}else if(Pt=new Date(Date.UTC(P.year,P.month,P.day,P.hour,P.minute-P.timezoneOffset,P.second,P.millisecond)),P.month>11||P.month<0||P.day>31||P.day<1||P.hour>23||P.hour<0||P.minute>59||P.minute<0||P.second>59||P.second<0)return null;return Pt}var Ss={format:be,parse:rt,defaultI18n:b,setGlobalDateI18n:_,setGlobalDateMasks:ye};t.assign=h,t.default=Ss,t.format=be,t.parse=rt,t.defaultI18n=b,t.setGlobalDateI18n=_,t.setGlobalDateMasks=ye,Object.defineProperty(t,"__esModule",{value:!0})})});var Ru=w((GE,Eu)=>{"use strict";var _m=Su(),Sm=Re();Eu.exports=Sm((t,e={})=>(e.format&&(t.timestamp=typeof e.format=="function"?e.format():_m.format(new Date,e.format)),t.timestamp||(t.timestamp=new Date().toISOString()),e.alias&&(t[e.alias]=t.timestamp),t))});var Tu=w((YE,xu)=>{"use strict";var Ys=ks(),Em=Re(),{MESSAGE:Vs}=re();xu.exports=Em((t,e)=>(e.level!==!1&&(t.level=Ys.strip(t.level)),e.message!==!1&&(t.message=Ys.strip(String(t.message))),e.raw!==!1&&t[Vs]&&(t[Vs]=Ys.strip(String(t[Vs]))),t))});var Js=w(Ks=>{"use strict";var Rm=Ks.format=Re();Ks.levels=$l();function le(t,e){Object.defineProperty(Rm,t,{get(){return e()},configurable:!0})}le("align",function(){return Bl()});le("errors",function(){return Hl()});le("cli",function(){return Yl()});le("combine",function(){return Kl()});le("colorize",function(){return Li()});le("json",function(){return Hs()});le("label",function(){return ru()});le("logstash",function(){return nu()});le("metadata",function(){return au()});le("ms",function(){return fu()});le("padLevels",function(){return Fs()});le("prettyPrint",function(){return du()});le("printf",function(){return pu()});le("simple",function(){return yu()});le("splat",function(){return vu()});le("timestamp",function(){return Ru()});le("uncolorize",function(){return Tu()})});var Zs=w(zi=>{"use strict";var{format:Ou}=require("util");zi.warn={deprecated(t){return()=>{throw new Error(Ou("{ %s } was removed in winston@3.0.0.",t))}},useFormat(t){return()=>{throw new Error([Ou("{ %s } was removed in winston@3.0.0.",t),"Use a custom winston.format = winston.format(function) instead."].join(`
|
|
26
|
-
`))}},forFunctions(t,e,r){r.forEach(i=>{t[i]=zi.warn[e](i)})},forProperties(t,e,r){r.forEach(i=>{let n=zi.warn[e](i);Object.defineProperty(t,i,{get:n,set:n})})}}});var Mu=w((JE,xm)=>{xm.exports={name:"winston",description:"A logger for just about everything.",version:"3.13.0",author:"Charlie Robbins <charlie.robbins@gmail.com>",maintainers:["David Hyde <dabh@alumni.stanford.edu>"],repository:{type:"git",url:"https://github.com/winstonjs/winston.git"},keywords:["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],dependencies:{"@dabh/diagnostics":"^2.0.2","@colors/colors":"^1.6.0",async:"^3.2.3","is-stream":"^2.0.0",logform:"^2.4.0","one-time":"^1.0.0","readable-stream":"^3.4.0","safe-stable-stringify":"^2.3.1","stack-trace":"0.0.x","triple-beam":"^1.3.0","winston-transport":"^4.7.0"},devDependencies:{"@babel/cli":"^7.23.9","@babel/core":"^7.24.0","@babel/preset-env":"^7.24.0","@dabh/eslint-config-populist":"^5.0.0","@types/node":"^20.11.24","abstract-winston-transport":"^0.5.1",assume:"^2.2.0","cross-spawn-async":"^2.2.5",eslint:"^8.57.0",hock:"^1.4.1",mocha:"^10.3.0",nyc:"^15.1.0",rimraf:"^5.0.5",split2:"^4.1.0","std-mocks":"^2.0.0",through2:"^4.0.2","winston-compat":"^0.1.5"},main:"./lib/winston.js",browser:"./dist/winston",types:"./index.d.ts",scripts:{lint:"eslint lib/*.js lib/winston/*.js lib/winston/**/*.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist",test:"rimraf test/fixtures/logs/* && mocha","test:coverage":"nyc npm run test:unit","test:unit":"mocha test/unit","test:integration":"mocha test/integration",build:"rimraf dist && babel lib -d dist",prepublishOnly:"npm run build"},engines:{node:">= 12.0.0"},license:"MIT"}});var Qs=w((ZE,ku)=>{ku.exports=require("util").deprecate});var Xs=w((QE,Au)=>{Au.exports=require("stream")});var ta=w((XE,Du)=>{"use strict";function Tm(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(ea,this,t)):process.nextTick(ea,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(Hi,r):(r._writableState.errorEmitted=!0,process.nextTick(Pu,r,s)):process.nextTick(Pu,r,s):e?(process.nextTick(Hi,r),e(s)):process.nextTick(Hi,r)}),this)}function Pu(t,e){ea(t,e),Hi(t)}function Hi(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Om(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function ea(t,e){t.emit("error",e)}function Mm(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}Du.exports={destroy:Tm,undestroy:Om,errorOrDestroy:Mm}});var nr=w((e2,Lu)=>{"use strict";var Cu={};function De(t,e,r){r||(r=Error);function i(s,a,o){return typeof e=="string"?e:e(s,a,o)}class n extends r{constructor(a,o,l){super(i(a,o,l))}}n.prototype.name=r.name,n.prototype.code=t,Cu[t]=n}function qu(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(i=>String(i)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function km(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Am(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Pm(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}De("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);De("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&km(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(Am(t," argument"))n=`The ${t} ${i} ${qu(e,"type")}`;else{let s=Pm(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${qu(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);De("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");De("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});De("ERR_STREAM_PREMATURE_CLOSE","Premature close");De("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});De("ERR_MULTIPLE_CALLBACK","Callback called multiple times");De("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");De("ERR_STREAM_WRITE_AFTER_END","write after end");De("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);De("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);De("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Lu.exports.codes=Cu});var ra=w((t2,ju)=>{"use strict";var Dm=nr().codes.ERR_INVALID_OPT_VALUE;function qm(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Cm(t,e,r,i){var n=qm(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new Dm(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}ju.exports={getHighWaterMark:Cm}});var Nu=w((r2,ia)=>{typeof Object.create=="function"?ia.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:ia.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var nt=w((i2,sa)=>{try{if(na=require("util"),typeof na.inherits!="function")throw"";sa.exports=na.inherits}catch{sa.exports=Nu()}var na});var Uu=w((n2,Bu)=>{"use strict";function Fu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function Iu(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Fu(Object(r),!0).forEach(function(i){Lm(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fu(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Lm(t,e,r){return e=Wu(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function jm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $u(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Wu(i.key),i)}}function Nm(t,e,r){return e&&$u(t.prototype,e),r&&$u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Wu(t){var e=Fm(t,"string");return typeof e=="symbol"?e:String(e)}function Fm(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Im=require("buffer"),Gi=Im.Buffer,$m=require("util"),aa=$m.inspect,Wm=aa&&aa.custom||"inspect";function Bm(t,e,r){Gi.prototype.copy.call(t,e,r)}Bu.exports=function(){function t(){jm(this,t),this.head=null,this.tail=null,this.length=0}return Nm(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return Gi.alloc(0);for(var i=Gi.allocUnsafe(r>>>0),n=this.head,s=0;n;)Bm(n.data,i,s),s+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,s=i.data;for(r-=s.length;i=i.next;){var a=i.data,o=r>a.length?a.length:r;if(o===a.length?s+=a:s+=a.slice(0,r),r-=o,r===0){o===a.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=a.slice(o));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=Gi.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var a=n.data,o=r>a.length?a.length:r;if(a.copy(i,i.length-r,0,o),r-=o,r===0){o===a.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(o));break}++s}return this.length-=s,i}},{key:Wm,value:function(r,i){return aa(this,Iu(Iu({},i),{},{depth:0,customInspect:!1}))}}]),t}()});var la=w((oa,Hu)=>{var Yi=require("buffer"),Ge=Yi.Buffer;function zu(t,e){for(var r in t)e[r]=t[r]}Ge.from&&Ge.alloc&&Ge.allocUnsafe&&Ge.allocUnsafeSlow?Hu.exports=Yi:(zu(Yi,oa),oa.Buffer=Ft);function Ft(t,e,r){return Ge(t,e,r)}Ft.prototype=Object.create(Ge.prototype);zu(Ge,Ft);Ft.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Ge(t,e,r)};Ft.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Ge(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};Ft.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Ge(t)};Ft.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Yi.SlowBuffer(t)}});var ha=w(Yu=>{"use strict";var fa=la().Buffer,Gu=fa.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Um(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function zm(t){var e=Um(t);if(typeof e!="string"&&(fa.isEncoding===Gu||!Gu(t)))throw new Error("Unknown encoding: "+t);return e||t}Yu.StringDecoder=qr;function qr(t){this.encoding=zm(t);var e;switch(this.encoding){case"utf16le":this.text=Jm,this.end=Zm,e=4;break;case"utf8":this.fillLast=Ym,e=4;break;case"base64":this.text=Qm,this.end=Xm,e=3;break;default:this.write=ey,this.end=ty;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=fa.allocUnsafe(e)}qr.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};qr.prototype.end=Km;qr.prototype.text=Vm;qr.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function ua(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function Hm(t,e,r){var i=e.length-1;if(i<r)return 0;var n=ua(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=ua(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=ua(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function Gm(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function Ym(t){var e=this.lastTotal-this.lastNeed,r=Gm(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function Vm(t,e){var r=Hm(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function Km(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function Jm(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function Zm(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function Qm(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function Xm(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function ey(t){return t.toString(this.encoding)}function ty(t){return t&&t.length?this.write(t):""}});var Zu=w((a2,Ju)=>{"use strict";var Vu=nr().codes.ERR_STREAM_PREMATURE_CLOSE;function ry(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}function iy(){}function ny(t){return t.setHeader&&typeof t.abort=="function"}function Ku(t,e,r){if(typeof e=="function")return Ku(t,null,e);e||(e={}),r=ry(r||iy);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||o()},a=t._writableState&&t._writableState.finished,o=function(){n=!1,a=!0,i||r.call(t)},l=t._readableState&&t._readableState.endEmitted,u=function(){i=!1,l=!0,n||r.call(t)},h=function(y){r.call(t,y)},p=function(){var y;if(i&&!l)return(!t._readableState||!t._readableState.ended)&&(y=new Vu),r.call(t,y);if(n&&!a)return(!t._writableState||!t._writableState.ended)&&(y=new Vu),r.call(t,y)},c=function(){t.req.on("finish",o)};return ny(t)?(t.on("complete",o),t.on("abort",p),t.req?c():t.on("request",c)):n&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",u),t.on("finish",o),e.error!==!1&&t.on("error",h),t.on("close",p),function(){t.removeListener("complete",o),t.removeListener("abort",p),t.removeListener("request",c),t.req&&t.req.removeListener("finish",o),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",o),t.removeListener("end",u),t.removeListener("error",h),t.removeListener("close",p)}}Ju.exports=Ku});var Xu=w((o2,Qu)=>{"use strict";var Vi;function pt(t,e,r){return e=sy(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function sy(t){var e=ay(t,"string");return typeof e=="symbol"?e:String(e)}function ay(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var oy=Zu(),gt=Symbol("lastResolve"),It=Symbol("lastReject"),Cr=Symbol("error"),Ki=Symbol("ended"),$t=Symbol("lastPromise"),ca=Symbol("handlePromise"),Wt=Symbol("stream");function mt(t,e){return{value:t,done:e}}function ly(t){var e=t[gt];if(e!==null){var r=t[Wt].read();r!==null&&(t[$t]=null,t[gt]=null,t[It]=null,e(mt(r,!1)))}}function uy(t){process.nextTick(ly,t)}function fy(t,e){return function(r,i){t.then(function(){if(e[Ki]){r(mt(void 0,!0));return}e[ca](r,i)},i)}}var hy=Object.getPrototypeOf(function(){}),cy=Object.setPrototypeOf((Vi={get stream(){return this[Wt]},next:function(){var e=this,r=this[Cr];if(r!==null)return Promise.reject(r);if(this[Ki])return Promise.resolve(mt(void 0,!0));if(this[Wt].destroyed)return new Promise(function(a,o){process.nextTick(function(){e[Cr]?o(e[Cr]):a(mt(void 0,!0))})});var i=this[$t],n;if(i)n=new Promise(fy(i,this));else{var s=this[Wt].read();if(s!==null)return Promise.resolve(mt(s,!1));n=new Promise(this[ca])}return this[$t]=n,n}},pt(Vi,Symbol.asyncIterator,function(){return this}),pt(Vi,"return",function(){var e=this;return new Promise(function(r,i){e[Wt].destroy(null,function(n){if(n){i(n);return}r(mt(void 0,!0))})})}),Vi),hy),dy=function(e){var r,i=Object.create(cy,(r={},pt(r,Wt,{value:e,writable:!0}),pt(r,gt,{value:null,writable:!0}),pt(r,It,{value:null,writable:!0}),pt(r,Cr,{value:null,writable:!0}),pt(r,Ki,{value:e._readableState.endEmitted,writable:!0}),pt(r,ca,{value:function(s,a){var o=i[Wt].read();o?(i[$t]=null,i[gt]=null,i[It]=null,s(mt(o,!1))):(i[gt]=s,i[It]=a)},writable:!0}),r));return i[$t]=null,oy(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[It];s!==null&&(i[$t]=null,i[gt]=null,i[It]=null,s(n)),i[Cr]=n;return}var a=i[gt];a!==null&&(i[$t]=null,i[gt]=null,i[It]=null,a(mt(void 0,!0))),i[Ki]=!0}),e.on("readable",uy.bind(null,i)),i};Qu.exports=dy});var nf=w((l2,rf)=>{"use strict";function ef(t,e,r,i,n,s,a){try{var o=t[s](a),l=o.value}catch(u){r(u);return}o.done?e(l):Promise.resolve(l).then(i,n)}function py(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function a(l){ef(s,i,n,a,o,"next",l)}function o(l){ef(s,i,n,a,o,"throw",l)}a(void 0)})}}function tf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function gy(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?tf(Object(r),!0).forEach(function(i){my(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):tf(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function my(t,e,r){return e=yy(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yy(t){var e=by(t,"string");return typeof e=="symbol"?e:String(e)}function by(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var wy=nr().codes.ERR_INVALID_ARG_TYPE;function vy(t,e,r){var i;if(e&&typeof e.next=="function")i=e;else if(e&&e[Symbol.asyncIterator])i=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])i=e[Symbol.iterator]();else throw new wy("iterable",["Iterable"],e);var n=new t(gy({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,a())};function a(){return o.apply(this,arguments)}function o(){return o=py(function*(){try{var l=yield i.next(),u=l.value,h=l.done;h?n.push(null):n.push(yield u)?a():s=!1}catch(p){n.destroy(p)}}),o.apply(this,arguments)}return n}rf.exports=vy});var gf=w((f2,pf)=>{"use strict";pf.exports=$;var sr;$.ReadableState=lf;var u2=require("events").EventEmitter,of=function(e,r){return e.listeners(r).length},jr=Xs(),Ji=require("buffer").Buffer,_y=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Sy(t){return Ji.from(t)}function Ey(t){return Ji.isBuffer(t)||t instanceof _y}var da=require("util"),C;da&&da.debuglog?C=da.debuglog("stream"):C=function(){};var Ry=Uu(),va=ta(),xy=ra(),Ty=xy.getHighWaterMark,Zi=nr().codes,Oy=Zi.ERR_INVALID_ARG_TYPE,My=Zi.ERR_STREAM_PUSH_AFTER_EOF,ky=Zi.ERR_METHOD_NOT_IMPLEMENTED,Ay=Zi.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,ar,pa,ga;nt()($,jr);var Lr=va.errorOrDestroy,ma=["error","close","destroy","pause","resume"];function Py(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function lf(t,e,r){sr=sr||Nr(),t=t||{},typeof r!="boolean"&&(r=e instanceof sr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=Ty(this,t,"readableHighWaterMark",r),this.buffer=new Ry,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(ar||(ar=ha().StringDecoder),this.decoder=new ar(t.encoding),this.encoding=t.encoding)}function $(t){if(sr=sr||Nr(),!(this instanceof $))return new $(t);var e=this instanceof sr;this._readableState=new lf(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),jr.call(this)}Object.defineProperty($.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});$.prototype.destroy=va.destroy;$.prototype._undestroy=va.undestroy;$.prototype._destroy=function(t,e){e(t)};$.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Ji.from(t,e),e=""),i=!0),uf(this,t,e,!1,i)};$.prototype.unshift=function(t){return uf(this,t,null,!0,!1)};function uf(t,e,r,i,n){C("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,Cy(t,s);else{var a;if(n||(a=Dy(s,e)),a)Lr(t,a);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Ji.prototype&&(e=Sy(e)),i)s.endEmitted?Lr(t,new Ay):ya(t,s,e,!0);else if(s.ended)Lr(t,new My);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?ya(t,s,e,!1):wa(t,s)):ya(t,s,e,!1)}else i||(s.reading=!1,wa(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function ya(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Qi(t)),wa(t,e)}function Dy(t,e){var r;return!Ey(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new Oy("chunk",["string","Buffer","Uint8Array"],e)),r}$.prototype.isPaused=function(){return this._readableState.flowing===!1};$.prototype.setEncoding=function(t){ar||(ar=ha().StringDecoder);var e=new ar(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var sf=1073741824;function qy(t){return t>=sf?t=sf:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function af(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=qy(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}$.prototype.read=function(t){C("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return C("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?ba(this):Qi(this),null;if(t=af(t,e),t===0&&e.ended)return e.length===0&&ba(this),null;var i=e.needReadable;C("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,C("length less than watermark",i)),e.ended||e.reading?(i=!1,C("reading or ended",i)):i&&(C("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=af(r,e)));var n;return t>0?n=cf(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&ba(this)),n!==null&&this.emit("data",n),n};function Cy(t,e){if(C("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?Qi(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,ff(t)))}}function Qi(t){var e=t._readableState;C("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(C("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(ff,t))}function ff(t){var e=t._readableState;C("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,_a(t)}function wa(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(Ly,t,e))}function Ly(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(C("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}$.prototype._read=function(t){Lr(this,new ky("_read()"))};$.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,C("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?o:b;i.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",a);function a(S,_){C("onunpipe"),S===r&&_&&_.hasUnpiped===!1&&(_.hasUnpiped=!0,h())}function o(){C("onend"),t.end()}var l=jy(r);t.on("drain",l);var u=!1;function h(){C("cleanup"),t.removeListener("close",f),t.removeListener("finish",y),t.removeListener("drain",l),t.removeListener("error",c),t.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",b),r.removeListener("data",p),u=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}r.on("data",p);function p(S){C("ondata");var _=t.write(S);C("dest.write",_),_===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&df(i.pipes,t)!==-1)&&!u&&(C("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function c(S){C("onerror",S),b(),t.removeListener("error",c),of(t,"error")===0&&Lr(t,S)}Py(t,"error",c);function f(){t.removeListener("finish",y),b()}t.once("close",f);function y(){C("onfinish"),t.removeListener("close",f),b()}t.once("finish",y);function b(){C("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(C("pipe resume"),r.resume()),t};function jy(t){return function(){var r=t._readableState;C("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&of(t,"data")&&(r.flowing=!0,_a(t))}}$.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var a=df(e.pipes,t);return a===-1?this:(e.pipes.splice(a,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};$.prototype.on=function(t,e){var r=jr.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,C("on readable",i.length,i.reading),i.length?Qi(this):i.reading||process.nextTick(Ny,this)),r};$.prototype.addListener=$.prototype.on;$.prototype.removeListener=function(t,e){var r=jr.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(hf,this),r};$.prototype.removeAllListeners=function(t){var e=jr.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(hf,this),e};function hf(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function Ny(t){C("readable nexttick read 0"),t.read(0)}$.prototype.resume=function(){var t=this._readableState;return t.flowing||(C("resume"),t.flowing=!t.readableListening,Fy(this,t)),t.paused=!1,this};function Fy(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(Iy,t,e))}function Iy(t,e){C("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),_a(t),e.flowing&&!e.reading&&t.read(0)}$.prototype.pause=function(){return C("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(C("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function _a(t){var e=t._readableState;for(C("flow",e.flowing);e.flowing&&t.read()!==null;);}$.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(C("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&e.push(a)}e.push(null)}),t.on("data",function(a){if(C("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var o=e.push(a);o||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=function(o){return function(){return t[o].apply(t,arguments)}}(n));for(var s=0;s<ma.length;s++)t.on(ma[s],this.emit.bind(this,ma[s]));return this._read=function(a){C("wrapped _read",a),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&($.prototype[Symbol.asyncIterator]=function(){return pa===void 0&&(pa=Xu()),pa(this)});Object.defineProperty($.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty($.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty($.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});$._fromList=cf;Object.defineProperty($.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function cf(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function ba(t){var e=t._readableState;C("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick($y,e,t))}function $y(t,e){if(C("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&($.from=function(t,e){return ga===void 0&&(ga=nf()),ga($,t,e)});function df(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Nr=w((h2,yf)=>{"use strict";var Wy=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};yf.exports=Ye;var mf=gf(),Ea=Ra();nt()(Ye,mf);for(Sa=Wy(Ea.prototype),Xi=0;Xi<Sa.length;Xi++)en=Sa[Xi],Ye.prototype[en]||(Ye.prototype[en]=Ea.prototype[en]);var Sa,en,Xi;function Ye(t){if(!(this instanceof Ye))return new Ye(t);mf.call(this,t),Ea.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",By)))}Object.defineProperty(Ye.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Ye.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Ye.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function By(){this._writableState.ended||process.nextTick(Uy,this)}function Uy(t){t.end()}Object.defineProperty(Ye.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var Ra=w((c2,Ef)=>{"use strict";Ef.exports=Y;function wf(t){var e=this;this.next=null,this.entry=null,this.finish=function(){m0(e,t)}}var or;Y.WritableState=Ir;var zy={deprecate:Qs()},vf=Xs(),rn=require("buffer").Buffer,Hy=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Gy(t){return rn.from(t)}function Yy(t){return rn.isBuffer(t)||t instanceof Hy}var Ta=ta(),Vy=ra(),Ky=Vy.getHighWaterMark,yt=nr().codes,Jy=yt.ERR_INVALID_ARG_TYPE,Zy=yt.ERR_METHOD_NOT_IMPLEMENTED,Qy=yt.ERR_MULTIPLE_CALLBACK,Xy=yt.ERR_STREAM_CANNOT_PIPE,e0=yt.ERR_STREAM_DESTROYED,t0=yt.ERR_STREAM_NULL_VALUES,r0=yt.ERR_STREAM_WRITE_AFTER_END,i0=yt.ERR_UNKNOWN_ENCODING,lr=Ta.errorOrDestroy;nt()(Y,vf);function n0(){}function Ir(t,e,r){or=or||Nr(),t=t||{},typeof r!="boolean"&&(r=e instanceof or),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Ky(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){h0(e,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new wf(this)}Ir.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Ir.prototype,"buffer",{get:zy.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var tn;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(tn=Function.prototype[Symbol.hasInstance],Object.defineProperty(Y,Symbol.hasInstance,{value:function(e){return tn.call(this,e)?!0:this!==Y?!1:e&&e._writableState instanceof Ir}})):tn=function(e){return e instanceof this};function Y(t){or=or||Nr();var e=this instanceof or;if(!e&&!tn.call(Y,this))return new Y(t);this._writableState=new Ir(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),vf.call(this)}Y.prototype.pipe=function(){lr(this,new Xy)};function s0(t,e){var r=new r0;lr(t,r),process.nextTick(e,r)}function a0(t,e,r,i){var n;return r===null?n=new t0:typeof r!="string"&&!e.objectMode&&(n=new Jy("chunk",["string","Buffer"],r)),n?(lr(t,n),process.nextTick(i,n),!1):!0}Y.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&Yy(t);return s&&!rn.isBuffer(t)&&(t=Gy(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=n0),i.ending?s0(this,r):(s||a0(this,i,t,r))&&(i.pendingcb++,n=l0(this,i,s,t,e,r)),n};Y.prototype.cork=function(){this._writableState.corked++};Y.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&_f(this,t))};Y.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new i0(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Y.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function o0(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=rn.from(e,r)),e}Object.defineProperty(Y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function l0(t,e,r,i,n,s){if(!r){var a=o0(e,i,n);i!==a&&(r=!0,n="buffer",i=a)}var o=e.objectMode?1:i.length;e.length+=o;var l=e.length<e.highWaterMark;if(l||(e.needDrain=!0),e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else xa(t,e,!1,o,i,n,s);return l}function xa(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new e0("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function u0(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(Fr,t,e),t._writableState.errorEmitted=!0,lr(t,i)):(n(i),t._writableState.errorEmitted=!0,lr(t,i),Fr(t,e))}function f0(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function h0(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new Qy;if(f0(r),e)u0(t,r,i,e,n);else{var s=Sf(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&_f(t,r),i?process.nextTick(bf,t,r,s,n):bf(t,r,s,n)}}function bf(t,e,r,i){r||c0(t,e),e.pendingcb--,i(),Fr(t,e)}function c0(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function _f(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var a=0,o=!0;r;)n[a]=r,r.isBuf||(o=!1),r=r.next,a+=1;n.allBuffers=o,xa(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new wf(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,h=r.callback,p=e.objectMode?1:l.length;if(xa(t,e,!1,p,l,u,h),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Y.prototype._write=function(t,e,r){r(new Zy("_write()"))};Y.prototype._writev=null;Y.prototype.end=function(t,e,r){var i=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||g0(this,i,r),this};Object.defineProperty(Y.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Sf(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function d0(t,e){t._final(function(r){e.pendingcb--,r&&lr(t,r),e.prefinished=!0,t.emit("prefinish"),Fr(t,e)})}function p0(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(d0,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Fr(t,e){var r=Sf(e);if(r&&(p0(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}function g0(t,e,r){e.ending=!0,Fr(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function m0(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(Y.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});Y.prototype.destroy=Ta.destroy;Y.prototype._undestroy=Ta.undestroy;Y.prototype._destroy=function(t,e){e(t)}});var Oa=w((d2,Tf)=>{"use strict";var y0=require("util"),Rf=Ra(),{LEVEL:xf}=re(),$r=Tf.exports=function(e={}){Rf.call(this,{objectMode:!0,highWaterMark:e.highWaterMark}),this.format=e.format,this.level=e.level,this.handleExceptions=e.handleExceptions,this.handleRejections=e.handleRejections,this.silent=e.silent,e.log&&(this.log=e.log),e.logv&&(this.logv=e.logv),e.close&&(this.close=e.close),this.once("pipe",r=>{this.levels=r.levels,this.parent=r}),this.once("unpipe",r=>{r===this.parent&&(this.parent=null,this.close&&this.close())})};y0.inherits($r,Rf);$r.prototype._write=function(e,r,i){if(this.silent||e.exception===!0&&!this.handleExceptions)return i(null);let n=this.level||this.parent&&this.parent.level;if(!n||this.levels[n]>=this.levels[e[xf]]){if(e&&!this.format)return this.log(e,i);let s,a;try{a=this.format.transform(Object.assign({},e),this.format.options)}catch(o){s=o}if(s||!a){if(i(),s)throw s;return}return this.log(a,i)}return this._writableState.sync=!1,i(null)};$r.prototype._writev=function(e,r){if(this.logv){let i=e.filter(this._accept,this);return i.length?this.logv(i,r):r(null)}for(let i=0;i<e.length;i++){if(!this._accept(e[i]))continue;if(e[i].chunk&&!this.format){this.log(e[i].chunk,e[i].callback);continue}let n,s;try{s=this.format.transform(Object.assign({},e[i].chunk),this.format.options)}catch(a){n=a}if(n||!s){if(e[i].callback(),n)throw r(null),n}else this.log(s,e[i].callback)}return r(null)};$r.prototype._accept=function(e){let r=e.chunk;if(this.silent)return!1;let i=this.level||this.parent&&this.parent.level;return!!((r.exception===!0||!i||this.levels[i]>=this.levels[r[xf]])&&(this.handleExceptions||r.exception!==!0))};$r.prototype._nop=function(){}});var ka=w((p2,Mf)=>{"use strict";var b0=require("util"),{LEVEL:Ma}=re(),Of=Oa(),Wr=Mf.exports=function(e={}){if(Of.call(this,e),!e.transport||typeof e.transport.log!="function")throw new Error("Invalid transport, must be an object with a log method.");this.transport=e.transport,this.level=this.level||e.transport.level,this.handleExceptions=this.handleExceptions||e.transport.handleExceptions,this._deprecated();function r(i){this.emit("error",i,this.transport)}this.transport.__winstonError||(this.transport.__winstonError=r.bind(this),this.transport.on("error",this.transport.__winstonError))};b0.inherits(Wr,Of);Wr.prototype._write=function(e,r,i){if(this.silent||e.exception===!0&&!this.handleExceptions)return i(null);(!this.level||this.levels[this.level]>=this.levels[e[Ma]])&&this.transport.log(e[Ma],e.message,e,this._nop),i(null)};Wr.prototype._writev=function(e,r){for(let i=0;i<e.length;i++)this._accept(e[i])&&(this.transport.log(e[i].chunk[Ma],e[i].chunk.message,e[i].chunk,this._nop),e[i].callback());return r(null)};Wr.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
|
|
27
|
-
`))};Wr.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}});var ur=w((g2,Aa)=>{"use strict";Aa.exports=Oa();Aa.exports.LegacyTransportStream=ka()});var Pf=w((y2,Af)=>{"use strict";var w0=require("os"),{LEVEL:kf,MESSAGE:fr}=re(),v0=ur();Af.exports=class extends v0{constructor(e={}){super(e),this.name=e.name||"console",this.stderrLevels=this._stringArrayToSet(e.stderrLevels),this.consoleWarnLevels=this._stringArrayToSet(e.consoleWarnLevels),this.eol=typeof e.eol=="string"?e.eol:w0.EOL,this.setMaxListeners(30)}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.stderrLevels[e[kf]]){console._stderr?console._stderr.write(`${e[fr]}${this.eol}`):console.error(e[fr]),r&&r();return}else if(this.consoleWarnLevels[e[kf]]){console._stderr?console._stderr.write(`${e[fr]}${this.eol}`):console.warn(e[fr]),r&&r();return}console._stdout?console._stdout.write(`${e[fr]}${this.eol}`):console.log(e[fr]),r&&r()}_stringArrayToSet(e,r){if(!e)return{};if(r=r||"Cannot make set from type other than Array of string elements",!Array.isArray(e))throw new Error(r);return e.reduce((i,n)=>{if(typeof n!="string")throw new Error(r);return i[n]=!0,i},{})}}});var sn=w((nn,Df)=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.default=_0;function _0(t){return t&&typeof t.length=="number"&&t.length>=0&&t.length%1===0}Df.exports=nn.default});var Cf=w((an,qf)=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.default=function(t){return function(...e){var r=e.pop();return t.call(this,e,r)}};qf.exports=an.default});var Nf=w(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.fallback=Lf;bt.wrap=jf;var S0=bt.hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,E0=bt.hasSetImmediate=typeof setImmediate=="function"&&setImmediate,R0=bt.hasNextTick=typeof process=="object"&&typeof process.nextTick=="function";function Lf(t){setTimeout(t,0)}function jf(t){return(e,...r)=>t(()=>e(...r))}var Br;S0?Br=queueMicrotask:E0?Br=setImmediate:R0?Br=process.nextTick:Br=Lf;bt.default=jf(Br)});var Bf=w((on,Wf)=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.default=A0;var x0=Cf(),T0=$f(x0),O0=Nf(),M0=$f(O0),k0=Bt();function $f(t){return t&&t.__esModule?t:{default:t}}function A0(t){return(0,k0.isAsync)(t)?function(...e){let r=e.pop(),i=t.apply(this,e);return Ff(i,r)}:(0,T0.default)(function(e,r){var i;try{i=t.apply(this,e)}catch(n){return r(n)}if(i&&typeof i.then=="function")return Ff(i,r);r(null,i)})}function Ff(t,e){return t.then(r=>{If(e,null,r)},r=>{If(e,r&&(r instanceof Error||r.message)?r:new Error(r))})}function If(t,e,r){try{t(e,r)}catch(i){(0,M0.default)(n=>{throw n},i)}}Wf.exports=on.default});var Bt=w(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});st.isAsyncIterable=st.isAsyncGenerator=st.isAsync=void 0;var P0=Bf(),D0=q0(P0);function q0(t){return t&&t.__esModule?t:{default:t}}function Uf(t){return t[Symbol.toStringTag]==="AsyncFunction"}function C0(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function L0(t){return typeof t[Symbol.asyncIterator]=="function"}function j0(t){if(typeof t!="function")throw new Error("expected a function");return Uf(t)?(0,D0.default)(t):t}st.default=j0;st.isAsync=Uf;st.isAsyncGenerator=C0;st.isAsyncIterable=L0});var hr=w((ln,zf)=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.default=N0;function N0(t,e){if(e||(e=t.length),!e)throw new Error("arity is undefined");function r(...i){return typeof i[e-1]=="function"?t.apply(this,i):new Promise((n,s)=>{i[e-1]=(a,...o)=>{if(a)return s(a);n(o.length>1?o:o[0])},t.apply(this,i)})}return r}zf.exports=ln.default});var Gf=w((un,Hf)=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});var F0=sn(),I0=Pa(F0),$0=Bt(),W0=Pa($0),B0=hr(),U0=Pa(B0);function Pa(t){return t&&t.__esModule?t:{default:t}}un.default=(0,U0.default)((t,e,r)=>{var i=(0,I0.default)(e)?[]:{};t(e,(n,s,a)=>{(0,W0.default)(n)((o,...l)=>{l.length<2&&([l]=l),i[s]=l,a(o)})},n=>r(n,i))},3);Hf.exports=un.default});var Da=w((fn,Yf)=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.default=z0;function z0(t){function e(...r){if(t!==null){var i=t;t=null,i.apply(this,r)}}return Object.assign(e,t),e}Yf.exports=fn.default});var Kf=w((hn,Vf)=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.default=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()};Vf.exports=hn.default});var Qf=w((cn,Zf)=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.default=Q0;var H0=sn(),G0=Jf(H0),Y0=Kf(),V0=Jf(Y0);function Jf(t){return t&&t.__esModule?t:{default:t}}function K0(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}function J0(t){var e=-1;return function(){var i=t.next();return i.done?null:(e++,{value:i.value,key:e})}}function Z0(t){var e=t?Object.keys(t):[],r=-1,i=e.length;return function n(){var s=e[++r];return s==="__proto__"?n():r<i?{value:t[s],key:s}:null}}function Q0(t){if((0,G0.default)(t))return K0(t);var e=(0,V0.default)(t);return e?J0(e):Z0(t)}Zf.exports=cn.default});var qa=w((dn,Xf)=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.default=X0;function X0(t){return function(...e){if(t===null)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}Xf.exports=dn.default});var gn=w((pn,eh)=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});var eb={};pn.default=eb;eh.exports=pn.default});var rh=w((mn,th)=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.default=nb;var tb=gn(),rb=ib(tb);function ib(t){return t&&t.__esModule?t:{default:t}}function nb(t,e,r,i){let n=!1,s=!1,a=!1,o=0,l=0;function u(){o>=e||a||n||(a=!0,t.next().then(({value:c,done:f})=>{if(!(s||n)){if(a=!1,f){n=!0,o<=0&&i(null);return}o++,r(c,l,h),l++,u()}}).catch(p))}function h(c,f){if(o-=1,!s){if(c)return p(c);if(c===!1){n=!0,s=!0;return}if(f===rb.default||n&&o<=0)return n=!0,i(null);u()}}function p(c){s||(a=!1,n=!0,i(c))}u()}th.exports=mn.default});var ah=w((yn,sh)=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});var sb=Da(),ab=Ur(sb),ob=Qf(),lb=Ur(ob),ub=qa(),fb=Ur(ub),ih=Bt(),hb=rh(),nh=Ur(hb),cb=gn(),db=Ur(cb);function Ur(t){return t&&t.__esModule?t:{default:t}}yn.default=t=>(e,r,i)=>{if(i=(0,ab.default)(i),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return i(null);if((0,ih.isAsyncGenerator)(e))return(0,nh.default)(e,t,r,i);if((0,ih.isAsyncIterable)(e))return(0,nh.default)(e[Symbol.asyncIterator](),t,r,i);var n=(0,lb.default)(e),s=!1,a=!1,o=0,l=!1;function u(p,c){if(!a)if(o-=1,p)s=!0,i(p);else if(p===!1)s=!0,a=!0;else{if(c===db.default||s&&o<=0)return s=!0,i(null);l||h()}}function h(){for(l=!0;o<t&&!s;){var p=n();if(p===null){s=!0,o<=0&&i(null);return}o+=1,r(p.value,p.key,(0,fb.default)(u))}l=!1}h()};sh.exports=yn.default});var La=w((bn,oh)=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});var pb=ah(),gb=Ca(pb),mb=Bt(),yb=Ca(mb),bb=hr(),wb=Ca(bb);function Ca(t){return t&&t.__esModule?t:{default:t}}function vb(t,e,r,i){return(0,gb.default)(e)(t,(0,yb.default)(r),i)}bn.default=(0,wb.default)(vb,4);oh.exports=bn.default});var fh=w((wn,uh)=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});var _b=La(),Sb=lh(_b),Eb=hr(),Rb=lh(Eb);function lh(t){return t&&t.__esModule?t:{default:t}}function xb(t,e,r){return(0,Sb.default)(t,1,e,r)}wn.default=(0,Rb.default)(xb,3);uh.exports=wn.default});var dh=w((vn,ch)=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.default=Ab;var Tb=Gf(),Ob=hh(Tb),Mb=fh(),kb=hh(Mb);function hh(t){return t&&t.__esModule?t:{default:t}}function Ab(t,e){return(0,Ob.default)(kb.default,t,e)}ch.exports=vn.default});var ja=w((v2,ph)=>{ph.exports=require("stream")});var vh=w((_2,wh)=>{"use strict";function gh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function mh(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?gh(Object(r),!0).forEach(function(i){Pb(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gh(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Pb(t,e,r){return e=bh(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Db(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yh(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,bh(i.key),i)}}function qb(t,e,r){return e&&yh(t.prototype,e),r&&yh(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function bh(t){var e=Cb(t,"string");return typeof e=="symbol"?e:String(e)}function Cb(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Lb=require("buffer"),_n=Lb.Buffer,jb=require("util"),Na=jb.inspect,Nb=Na&&Na.custom||"inspect";function Fb(t,e,r){_n.prototype.copy.call(t,e,r)}wh.exports=function(){function t(){Db(this,t),this.head=null,this.tail=null,this.length=0}return qb(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return _n.alloc(0);for(var i=_n.allocUnsafe(r>>>0),n=this.head,s=0;n;)Fb(n.data,i,s),s+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,s=i.data;for(r-=s.length;i=i.next;){var a=i.data,o=r>a.length?a.length:r;if(o===a.length?s+=a:s+=a.slice(0,r),r-=o,r===0){o===a.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=a.slice(o));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=_n.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var a=n.data,o=r>a.length?a.length:r;if(a.copy(i,i.length-r,0,o),r-=o,r===0){o===a.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(o));break}++s}return this.length-=s,i}},{key:Nb,value:function(r,i){return Na(this,mh(mh({},i),{},{depth:0,customInspect:!1}))}}]),t}()});var Ia=w((S2,Sh)=>{"use strict";function Ib(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Fa,this,t)):process.nextTick(Fa,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(Sn,r):(r._writableState.errorEmitted=!0,process.nextTick(_h,r,s)):process.nextTick(_h,r,s):e?(process.nextTick(Sn,r),e(s)):process.nextTick(Sn,r)}),this)}function _h(t,e){Fa(t,e),Sn(t)}function Sn(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function $b(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Fa(t,e){t.emit("error",e)}function Wb(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}Sh.exports={destroy:Ib,undestroy:$b,errorOrDestroy:Wb}});var wt=w((E2,xh)=>{"use strict";var Rh={};function qe(t,e,r){r||(r=Error);function i(s,a,o){return typeof e=="string"?e:e(s,a,o)}class n extends r{constructor(a,o,l){super(i(a,o,l))}}n.prototype.name=r.name,n.prototype.code=t,Rh[t]=n}function Eh(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(i=>String(i)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function Bb(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Ub(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function zb(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}qe("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);qe("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&Bb(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(Ub(t," argument"))n=`The ${t} ${i} ${Eh(e,"type")}`;else{let s=zb(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${Eh(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);qe("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");qe("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});qe("ERR_STREAM_PREMATURE_CLOSE","Premature close");qe("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});qe("ERR_MULTIPLE_CALLBACK","Callback called multiple times");qe("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");qe("ERR_STREAM_WRITE_AFTER_END","write after end");qe("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);qe("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);qe("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");xh.exports.codes=Rh});var $a=w((R2,Th)=>{"use strict";var Hb=wt().codes.ERR_INVALID_OPT_VALUE;function Gb(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Yb(t,e,r,i){var n=Gb(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new Hb(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}Th.exports={getHighWaterMark:Yb}});var Ua=w((x2,Dh)=>{"use strict";Dh.exports=V;function Mh(t){var e=this;this.next=null,this.entry=null,this.finish=function(){vw(e,t)}}var cr;V.WritableState=Hr;var Vb={deprecate:Qs()},kh=ja(),Rn=require("buffer").Buffer,Kb=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Jb(t){return Rn.from(t)}function Zb(t){return Rn.isBuffer(t)||t instanceof Kb}var Ba=Ia(),Qb=$a(),Xb=Qb.getHighWaterMark,vt=wt().codes,ew=vt.ERR_INVALID_ARG_TYPE,tw=vt.ERR_METHOD_NOT_IMPLEMENTED,rw=vt.ERR_MULTIPLE_CALLBACK,iw=vt.ERR_STREAM_CANNOT_PIPE,nw=vt.ERR_STREAM_DESTROYED,sw=vt.ERR_STREAM_NULL_VALUES,aw=vt.ERR_STREAM_WRITE_AFTER_END,ow=vt.ERR_UNKNOWN_ENCODING,dr=Ba.errorOrDestroy;nt()(V,kh);function lw(){}function Hr(t,e,r){cr=cr||Ut(),t=t||{},typeof r!="boolean"&&(r=e instanceof cr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Xb(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){gw(e,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Mh(this)}Hr.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Hr.prototype,"buffer",{get:Vb.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var En;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(En=Function.prototype[Symbol.hasInstance],Object.defineProperty(V,Symbol.hasInstance,{value:function(e){return En.call(this,e)?!0:this!==V?!1:e&&e._writableState instanceof Hr}})):En=function(e){return e instanceof this};function V(t){cr=cr||Ut();var e=this instanceof cr;if(!e&&!En.call(V,this))return new V(t);this._writableState=new Hr(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),kh.call(this)}V.prototype.pipe=function(){dr(this,new iw)};function uw(t,e){var r=new aw;dr(t,r),process.nextTick(e,r)}function fw(t,e,r,i){var n;return r===null?n=new sw:typeof r!="string"&&!e.objectMode&&(n=new ew("chunk",["string","Buffer"],r)),n?(dr(t,n),process.nextTick(i,n),!1):!0}V.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&Zb(t);return s&&!Rn.isBuffer(t)&&(t=Jb(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=lw),i.ending?uw(this,r):(s||fw(this,i,t,r))&&(i.pendingcb++,n=cw(this,i,s,t,e,r)),n};V.prototype.cork=function(){this._writableState.corked++};V.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Ah(this,t))};V.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new ow(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(V.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function hw(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Rn.from(e,r)),e}Object.defineProperty(V.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function cw(t,e,r,i,n,s){if(!r){var a=hw(e,i,n);i!==a&&(r=!0,n="buffer",i=a)}var o=e.objectMode?1:i.length;e.length+=o;var l=e.length<e.highWaterMark;if(l||(e.needDrain=!0),e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Wa(t,e,!1,o,i,n,s);return l}function Wa(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new nw("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function dw(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(zr,t,e),t._writableState.errorEmitted=!0,dr(t,i)):(n(i),t._writableState.errorEmitted=!0,dr(t,i),zr(t,e))}function pw(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function gw(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new rw;if(pw(r),e)dw(t,r,i,e,n);else{var s=Ph(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Ah(t,r),i?process.nextTick(Oh,t,r,s,n):Oh(t,r,s,n)}}function Oh(t,e,r,i){r||mw(t,e),e.pendingcb--,i(),zr(t,e)}function mw(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function Ah(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var a=0,o=!0;r;)n[a]=r,r.isBuf||(o=!1),r=r.next,a+=1;n.allBuffers=o,Wa(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new Mh(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,h=r.callback,p=e.objectMode?1:l.length;if(Wa(t,e,!1,p,l,u,h),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}V.prototype._write=function(t,e,r){r(new tw("_write()"))};V.prototype._writev=null;V.prototype.end=function(t,e,r){var i=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||ww(this,i,r),this};Object.defineProperty(V.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Ph(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function yw(t,e){t._final(function(r){e.pendingcb--,r&&dr(t,r),e.prefinished=!0,t.emit("prefinish"),zr(t,e)})}function bw(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(yw,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function zr(t,e){var r=Ph(e);if(r&&(bw(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}function ww(t,e,r){e.ending=!0,zr(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function vw(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(V.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});V.prototype.destroy=Ba.destroy;V.prototype._undestroy=Ba.undestroy;V.prototype._destroy=function(t,e){e(t)}});var Ut=w((T2,Ch)=>{"use strict";var _w=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};Ch.exports=Ve;var qh=Ga(),Ha=Ua();nt()(Ve,qh);for(za=_w(Ha.prototype),xn=0;xn<za.length;xn++)Tn=za[xn],Ve.prototype[Tn]||(Ve.prototype[Tn]=Ha.prototype[Tn]);var za,Tn,xn;function Ve(t){if(!(this instanceof Ve))return new Ve(t);qh.call(this,t),Ha.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",Sw)))}Object.defineProperty(Ve.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Ve.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Ve.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Sw(){this._writableState.ended||process.nextTick(Ew,this)}function Ew(t){t.end()}Object.defineProperty(Ve.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var Ka=w(jh=>{"use strict";var Va=la().Buffer,Lh=Va.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Rw(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function xw(t){var e=Rw(t);if(typeof e!="string"&&(Va.isEncoding===Lh||!Lh(t)))throw new Error("Unknown encoding: "+t);return e||t}jh.StringDecoder=Gr;function Gr(t){this.encoding=xw(t);var e;switch(this.encoding){case"utf16le":this.text=Pw,this.end=Dw,e=4;break;case"utf8":this.fillLast=Mw,e=4;break;case"base64":this.text=qw,this.end=Cw,e=3;break;default:this.write=Lw,this.end=jw;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Va.allocUnsafe(e)}Gr.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};Gr.prototype.end=Aw;Gr.prototype.text=kw;Gr.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function Ya(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function Tw(t,e,r){var i=e.length-1;if(i<r)return 0;var n=Ya(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=Ya(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=Ya(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function Ow(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function Mw(t){var e=this.lastTotal-this.lastNeed,r=Ow(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function kw(t,e){var r=Tw(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function Aw(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function Pw(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function Dw(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function qw(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function Cw(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Lw(t){return t.toString(this.encoding)}function jw(t){return t&&t.length?this.write(t):""}});var On=w((M2,Ih)=>{"use strict";var Nh=wt().codes.ERR_STREAM_PREMATURE_CLOSE;function Nw(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}function Fw(){}function Iw(t){return t.setHeader&&typeof t.abort=="function"}function Fh(t,e,r){if(typeof e=="function")return Fh(t,null,e);e||(e={}),r=Nw(r||Fw);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||o()},a=t._writableState&&t._writableState.finished,o=function(){n=!1,a=!0,i||r.call(t)},l=t._readableState&&t._readableState.endEmitted,u=function(){i=!1,l=!0,n||r.call(t)},h=function(y){r.call(t,y)},p=function(){var y;if(i&&!l)return(!t._readableState||!t._readableState.ended)&&(y=new Nh),r.call(t,y);if(n&&!a)return(!t._writableState||!t._writableState.ended)&&(y=new Nh),r.call(t,y)},c=function(){t.req.on("finish",o)};return Iw(t)?(t.on("complete",o),t.on("abort",p),t.req?c():t.on("request",c)):n&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",u),t.on("finish",o),e.error!==!1&&t.on("error",h),t.on("close",p),function(){t.removeListener("complete",o),t.removeListener("abort",p),t.removeListener("request",c),t.req&&t.req.removeListener("finish",o),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",o),t.removeListener("end",u),t.removeListener("error",h),t.removeListener("close",p)}}Ih.exports=Fh});var Wh=w((k2,$h)=>{"use strict";var Mn;function _t(t,e,r){return e=$w(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $w(t){var e=Ww(t,"string");return typeof e=="symbol"?e:String(e)}function Ww(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Bw=On(),St=Symbol("lastResolve"),zt=Symbol("lastReject"),Yr=Symbol("error"),kn=Symbol("ended"),Ht=Symbol("lastPromise"),Ja=Symbol("handlePromise"),Gt=Symbol("stream");function Et(t,e){return{value:t,done:e}}function Uw(t){var e=t[St];if(e!==null){var r=t[Gt].read();r!==null&&(t[Ht]=null,t[St]=null,t[zt]=null,e(Et(r,!1)))}}function zw(t){process.nextTick(Uw,t)}function Hw(t,e){return function(r,i){t.then(function(){if(e[kn]){r(Et(void 0,!0));return}e[Ja](r,i)},i)}}var Gw=Object.getPrototypeOf(function(){}),Yw=Object.setPrototypeOf((Mn={get stream(){return this[Gt]},next:function(){var e=this,r=this[Yr];if(r!==null)return Promise.reject(r);if(this[kn])return Promise.resolve(Et(void 0,!0));if(this[Gt].destroyed)return new Promise(function(a,o){process.nextTick(function(){e[Yr]?o(e[Yr]):a(Et(void 0,!0))})});var i=this[Ht],n;if(i)n=new Promise(Hw(i,this));else{var s=this[Gt].read();if(s!==null)return Promise.resolve(Et(s,!1));n=new Promise(this[Ja])}return this[Ht]=n,n}},_t(Mn,Symbol.asyncIterator,function(){return this}),_t(Mn,"return",function(){var e=this;return new Promise(function(r,i){e[Gt].destroy(null,function(n){if(n){i(n);return}r(Et(void 0,!0))})})}),Mn),Gw),Vw=function(e){var r,i=Object.create(Yw,(r={},_t(r,Gt,{value:e,writable:!0}),_t(r,St,{value:null,writable:!0}),_t(r,zt,{value:null,writable:!0}),_t(r,Yr,{value:null,writable:!0}),_t(r,kn,{value:e._readableState.endEmitted,writable:!0}),_t(r,Ja,{value:function(s,a){var o=i[Gt].read();o?(i[Ht]=null,i[St]=null,i[zt]=null,s(Et(o,!1))):(i[St]=s,i[zt]=a)},writable:!0}),r));return i[Ht]=null,Bw(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[zt];s!==null&&(i[Ht]=null,i[St]=null,i[zt]=null,s(n)),i[Yr]=n;return}var a=i[St];a!==null&&(i[Ht]=null,i[St]=null,i[zt]=null,a(Et(void 0,!0))),i[kn]=!0}),e.on("readable",zw.bind(null,i)),i};$h.exports=Vw});var Hh=w((A2,zh)=>{"use strict";function Bh(t,e,r,i,n,s,a){try{var o=t[s](a),l=o.value}catch(u){r(u);return}o.done?e(l):Promise.resolve(l).then(i,n)}function Kw(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function a(l){Bh(s,i,n,a,o,"next",l)}function o(l){Bh(s,i,n,a,o,"throw",l)}a(void 0)})}}function Uh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function Jw(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Uh(Object(r),!0).forEach(function(i){Zw(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Uh(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Zw(t,e,r){return e=Qw(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Qw(t){var e=Xw(t,"string");return typeof e=="symbol"?e:String(e)}function Xw(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var ev=wt().codes.ERR_INVALID_ARG_TYPE;function tv(t,e,r){var i;if(e&&typeof e.next=="function")i=e;else if(e&&e[Symbol.asyncIterator])i=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])i=e[Symbol.iterator]();else throw new ev("iterable",["Iterable"],e);var n=new t(Jw({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,a())};function a(){return o.apply(this,arguments)}function o(){return o=Kw(function*(){try{var l=yield i.next(),u=l.value,h=l.done;h?n.push(null):n.push(yield u)?a():s=!1}catch(p){n.destroy(p)}}),o.apply(this,arguments)}return n}zh.exports=tv});var Ga=w((D2,tc)=>{"use strict";tc.exports=W;var pr;W.ReadableState=Kh;var P2=require("events").EventEmitter,Vh=function(e,r){return e.listeners(r).length},Kr=ja(),An=require("buffer").Buffer,rv=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function iv(t){return An.from(t)}function nv(t){return An.isBuffer(t)||t instanceof rv}var Za=require("util"),L;Za&&Za.debuglog?L=Za.debuglog("stream"):L=function(){};var sv=vh(),no=Ia(),av=$a(),ov=av.getHighWaterMark,Pn=wt().codes,lv=Pn.ERR_INVALID_ARG_TYPE,uv=Pn.ERR_STREAM_PUSH_AFTER_EOF,fv=Pn.ERR_METHOD_NOT_IMPLEMENTED,hv=Pn.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,gr,Qa,Xa;nt()(W,Kr);var Vr=no.errorOrDestroy,eo=["error","close","destroy","pause","resume"];function cv(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Kh(t,e,r){pr=pr||Ut(),t=t||{},typeof r!="boolean"&&(r=e instanceof pr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=ov(this,t,"readableHighWaterMark",r),this.buffer=new sv,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(gr||(gr=Ka().StringDecoder),this.decoder=new gr(t.encoding),this.encoding=t.encoding)}function W(t){if(pr=pr||Ut(),!(this instanceof W))return new W(t);var e=this instanceof pr;this._readableState=new Kh(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Kr.call(this)}Object.defineProperty(W.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});W.prototype.destroy=no.destroy;W.prototype._undestroy=no.undestroy;W.prototype._destroy=function(t,e){e(t)};W.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=An.from(t,e),e=""),i=!0),Jh(this,t,e,!1,i)};W.prototype.unshift=function(t){return Jh(this,t,null,!0,!1)};function Jh(t,e,r,i,n){L("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,gv(t,s);else{var a;if(n||(a=dv(s,e)),a)Vr(t,a);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==An.prototype&&(e=iv(e)),i)s.endEmitted?Vr(t,new hv):to(t,s,e,!0);else if(s.ended)Vr(t,new uv);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?to(t,s,e,!1):io(t,s)):to(t,s,e,!1)}else i||(s.reading=!1,io(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function to(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Dn(t)),io(t,e)}function dv(t,e){var r;return!nv(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new lv("chunk",["string","Buffer","Uint8Array"],e)),r}W.prototype.isPaused=function(){return this._readableState.flowing===!1};W.prototype.setEncoding=function(t){gr||(gr=Ka().StringDecoder);var e=new gr(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var Gh=1073741824;function pv(t){return t>=Gh?t=Gh:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Yh(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=pv(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}W.prototype.read=function(t){L("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return L("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?ro(this):Dn(this),null;if(t=Yh(t,e),t===0&&e.ended)return e.length===0&&ro(this),null;var i=e.needReadable;L("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,L("length less than watermark",i)),e.ended||e.reading?(i=!1,L("reading or ended",i)):i&&(L("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Yh(r,e)));var n;return t>0?n=Xh(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&ro(this)),n!==null&&this.emit("data",n),n};function gv(t,e){if(L("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?Dn(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Zh(t)))}}function Dn(t){var e=t._readableState;L("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(L("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(Zh,t))}function Zh(t){var e=t._readableState;L("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,so(t)}function io(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(mv,t,e))}function mv(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(L("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}W.prototype._read=function(t){Vr(this,new fv("_read()"))};W.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,L("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?o:b;i.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",a);function a(S,_){L("onunpipe"),S===r&&_&&_.hasUnpiped===!1&&(_.hasUnpiped=!0,h())}function o(){L("onend"),t.end()}var l=yv(r);t.on("drain",l);var u=!1;function h(){L("cleanup"),t.removeListener("close",f),t.removeListener("finish",y),t.removeListener("drain",l),t.removeListener("error",c),t.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",b),r.removeListener("data",p),u=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}r.on("data",p);function p(S){L("ondata");var _=t.write(S);L("dest.write",_),_===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&ec(i.pipes,t)!==-1)&&!u&&(L("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function c(S){L("onerror",S),b(),t.removeListener("error",c),Vh(t,"error")===0&&Vr(t,S)}cv(t,"error",c);function f(){t.removeListener("finish",y),b()}t.once("close",f);function y(){L("onfinish"),t.removeListener("close",f),b()}t.once("finish",y);function b(){L("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(L("pipe resume"),r.resume()),t};function yv(t){return function(){var r=t._readableState;L("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Vh(t,"data")&&(r.flowing=!0,so(t))}}W.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var a=ec(e.pipes,t);return a===-1?this:(e.pipes.splice(a,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};W.prototype.on=function(t,e){var r=Kr.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,L("on readable",i.length,i.reading),i.length?Dn(this):i.reading||process.nextTick(bv,this)),r};W.prototype.addListener=W.prototype.on;W.prototype.removeListener=function(t,e){var r=Kr.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Qh,this),r};W.prototype.removeAllListeners=function(t){var e=Kr.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Qh,this),e};function Qh(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function bv(t){L("readable nexttick read 0"),t.read(0)}W.prototype.resume=function(){var t=this._readableState;return t.flowing||(L("resume"),t.flowing=!t.readableListening,wv(this,t)),t.paused=!1,this};function wv(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(vv,t,e))}function vv(t,e){L("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),so(t),e.flowing&&!e.reading&&t.read(0)}W.prototype.pause=function(){return L("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(L("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function so(t){var e=t._readableState;for(L("flow",e.flowing);e.flowing&&t.read()!==null;);}W.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(L("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&e.push(a)}e.push(null)}),t.on("data",function(a){if(L("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var o=e.push(a);o||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=function(o){return function(){return t[o].apply(t,arguments)}}(n));for(var s=0;s<eo.length;s++)t.on(eo[s],this.emit.bind(this,eo[s]));return this._read=function(a){L("wrapped _read",a),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(W.prototype[Symbol.asyncIterator]=function(){return Qa===void 0&&(Qa=Wh()),Qa(this)});Object.defineProperty(W.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(W.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(W.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});W._fromList=Xh;Object.defineProperty(W.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Xh(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function ro(t){var e=t._readableState;L("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(_v,e,t))}function _v(t,e){if(L("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(W.from=function(t,e){return Xa===void 0&&(Xa=Hh()),Xa(W,t,e)});function ec(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var ao=w((q2,ic)=>{"use strict";ic.exports=at;var qn=wt().codes,Sv=qn.ERR_METHOD_NOT_IMPLEMENTED,Ev=qn.ERR_MULTIPLE_CALLBACK,Rv=qn.ERR_TRANSFORM_ALREADY_TRANSFORMING,xv=qn.ERR_TRANSFORM_WITH_LENGTH_0,Cn=Ut();nt()(at,Cn);function Tv(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new Ev);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function at(t){if(!(this instanceof at))return new at(t);Cn.call(this,t),this._transformState={afterTransform:Tv.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",Ov)}function Ov(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){rc(t,e,r)}):rc(this,null,null)}at.prototype.push=function(t,e){return this._transformState.needTransform=!1,Cn.prototype.push.call(this,t,e)};at.prototype._transform=function(t,e,r){r(new Sv("_transform()"))};at.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};at.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};at.prototype._destroy=function(t,e){Cn.prototype._destroy.call(this,t,function(r){e(r)})};function rc(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new xv;if(t._transformState.transforming)throw new Rv;return t.push(null)}});var ac=w((C2,sc)=>{"use strict";sc.exports=Jr;var nc=ao();nt()(Jr,nc);function Jr(t){if(!(this instanceof Jr))return new Jr(t);nc.call(this,t)}Jr.prototype._transform=function(t,e,r){r(null,t)}});var hc=w((L2,fc)=>{"use strict";var oo;function Mv(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var uc=wt().codes,kv=uc.ERR_MISSING_ARGS,Av=uc.ERR_STREAM_DESTROYED;function oc(t){if(t)throw t}function Pv(t){return t.setHeader&&typeof t.abort=="function"}function Dv(t,e,r,i){i=Mv(i);var n=!1;t.on("close",function(){n=!0}),oo===void 0&&(oo=On()),oo(t,{readable:e,writable:r},function(a){if(a)return i(a);n=!0,i()});var s=!1;return function(a){if(!n&&!s){if(s=!0,Pv(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(a||new Av("pipe"))}}}function lc(t){t()}function qv(t,e){return t.pipe(e)}function Cv(t){return!t.length||typeof t[t.length-1]!="function"?oc:t.pop()}function Lv(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=Cv(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new kv("streams");var n,s=e.map(function(a,o){var l=o<e.length-1,u=o>0;return Dv(a,l,u,function(h){n||(n=h),h&&s.forEach(lc),!l&&(s.forEach(lc),i(n))})});return e.reduce(qv)}fc.exports=Lv});var Yt=w((Ce,Qr)=>{var Zr=require("stream");process.env.READABLE_STREAM==="disable"&&Zr?(Qr.exports=Zr.Readable,Object.assign(Qr.exports,Zr),Qr.exports.Stream=Zr):(Ce=Qr.exports=Ga(),Ce.Stream=Zr||Ce,Ce.Readable=Ce,Ce.Writable=Ua(),Ce.Duplex=Ut(),Ce.Transform=ao(),Ce.PassThrough=ac(),Ce.finished=On(),Ce.pipeline=hc())});var go=w((j2,dc)=>{var mr=[],Xr=[],lo=function(){};function fo(t){return~mr.indexOf(t)?!1:(mr.push(t),!0)}function ho(t){lo=t}function jv(t){for(var e=[],r=0;r<mr.length;r++){if(mr[r].async){e.push(mr[r]);continue}if(mr[r](t))return!0}return e.length?new Promise(function(n){Promise.all(e.map(function(a){return a(t)})).then(function(a){n(a.some(Boolean))})}):!1}function co(t){return~Xr.indexOf(t)?!1:(Xr.push(t),!0)}function uo(){lo.apply(lo,arguments)}function cc(t){for(var e=0;e<Xr.length;e++)t=Xr[e].apply(Xr[e],arguments);return t}function po(t,e){var r=Object.prototype.hasOwnProperty;for(var i in e)r.call(e,i)&&(t[i]=e[i]);return t}function Nv(t){return t.enabled=!1,t.modify=co,t.set=ho,t.use=fo,po(function(){return!1},t)}function Fv(t){function e(){var r=Array.prototype.slice.call(arguments,0);return uo.call(uo,t,cc(r,t)),!0}return t.enabled=!0,t.modify=co,t.set=ho,t.use=fo,po(e,t)}dc.exports=function(e){return e.introduce=po,e.enabled=jv,e.process=cc,e.modify=co,e.write=uo,e.nope=Nv,e.yep=Fv,e.set=ho,e.use=fo,e}});var gc=w((N2,pc)=>{var Iv=go(),$v=Iv(function t(e,r){return r=r||{},r.namespace=e,r.prod=!0,r.dev=!1,r.force||t.force?t.yep(r):t.nope(r)});pc.exports=$v});var yc=w((F2,mc)=>{"use strict";mc.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var wc=w((I2,bc)=>{bc.exports=function(e){return!e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")}});var Sc=w(($2,_c)=>{"use strict";var Wv=wc(),Bv=Array.prototype.concat,Uv=Array.prototype.slice,vc=_c.exports=function(e){for(var r=[],i=0,n=e.length;i<n;i++){var s=e[i];Wv(s)?r=Bv.call(r,Uv.call(s)):r.push(s)}return r};vc.wrap=function(t){return function(){return t(vc(arguments))}}});var Tc=w((W2,xc)=>{var ei=yc(),ti=Sc(),Ec=Object.hasOwnProperty,Rc=Object.create(null);for(Ln in ei)Ec.call(ei,Ln)&&(Rc[ei[Ln]]=Ln);var Ln,Oe=xc.exports={to:{},get:{}};Oe.get=function(t){var e=t.substring(0,3).toLowerCase(),r,i;switch(e){case"hsl":r=Oe.get.hsl(t),i="hsl";break;case"hwb":r=Oe.get.hwb(t),i="hwb";break;default:r=Oe.get.rgb(t),i="rgb";break}return r?{model:i,value:r}:null};Oe.get.rgb=function(t){if(!t)return null;var e=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,n=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,s=/^(\w+)$/,a=[0,0,0,1],o,l,u;if(o=t.match(r)){for(u=o[2],o=o[1],l=0;l<3;l++){var h=l*2;a[l]=parseInt(o.slice(h,h+2),16)}u&&(a[3]=parseInt(u,16)/255)}else if(o=t.match(e)){for(o=o[1],u=o[3],l=0;l<3;l++)a[l]=parseInt(o[l]+o[l],16);u&&(a[3]=parseInt(u+u,16)/255)}else if(o=t.match(i)){for(l=0;l<3;l++)a[l]=parseInt(o[l+1],0);o[4]&&(o[5]?a[3]=parseFloat(o[4])*.01:a[3]=parseFloat(o[4]))}else if(o=t.match(n)){for(l=0;l<3;l++)a[l]=Math.round(parseFloat(o[l+1])*2.55);o[4]&&(o[5]?a[3]=parseFloat(o[4])*.01:a[3]=parseFloat(o[4]))}else return(o=t.match(s))?o[1]==="transparent"?[0,0,0,0]:Ec.call(ei,o[1])?(a=ei[o[1]],a[3]=1,a):null:null;for(l=0;l<3;l++)a[l]=Rt(a[l],0,255);return a[3]=Rt(a[3],0,1),a};Oe.get.hsl=function(t){if(!t)return null;var e=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,s=Rt(parseFloat(r[2]),0,100),a=Rt(parseFloat(r[3]),0,100),o=Rt(isNaN(i)?1:i,0,1);return[n,s,a,o]}return null};Oe.get.hwb=function(t){if(!t)return null;var e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,s=Rt(parseFloat(r[2]),0,100),a=Rt(parseFloat(r[3]),0,100),o=Rt(isNaN(i)?1:i,0,1);return[n,s,a,o]}return null};Oe.to.hex=function(){var t=ti(arguments);return"#"+jn(t[0])+jn(t[1])+jn(t[2])+(t[3]<1?jn(Math.round(t[3]*255)):"")};Oe.to.rgb=function(){var t=ti(arguments);return t.length<4||t[3]===1?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"};Oe.to.rgb.percent=function(){var t=ti(arguments),e=Math.round(t[0]/255*100),r=Math.round(t[1]/255*100),i=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+e+"%, "+r+"%, "+i+"%)":"rgba("+e+"%, "+r+"%, "+i+"%, "+t[3]+")"};Oe.to.hsl=function(){var t=ti(arguments);return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};Oe.to.hwb=function(){var t=ti(arguments),e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};Oe.to.keyword=function(t){return Rc[t.slice(0,3)]};function Rt(t,e,r){return Math.min(Math.max(e,t),r)}function jn(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}});var Mc=w((B2,Oc)=>{"use strict";Oc.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var mo=w((U2,Dc)=>{var Vt=Mc(),Pc={};for(Nn in Vt)Vt.hasOwnProperty(Nn)&&(Pc[Vt[Nn]]=Nn);var Nn,k=Dc.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(ve in k)if(k.hasOwnProperty(ve)){if(!("channels"in k[ve]))throw new Error("missing channels property: "+ve);if(!("labels"in k[ve]))throw new Error("missing channel labels property: "+ve);if(k[ve].labels.length!==k[ve].channels)throw new Error("channel and label counts mismatch: "+ve);kc=k[ve].channels,Ac=k[ve].labels,delete k[ve].channels,delete k[ve].labels,Object.defineProperty(k[ve],"channels",{value:kc}),Object.defineProperty(k[ve],"labels",{value:Ac})}var kc,Ac,ve;k.rgb.hsl=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.min(e,r,i),s=Math.max(e,r,i),a=s-n,o,l,u;return s===n?o=0:e===s?o=(r-i)/a:r===s?o=2+(i-e)/a:i===s&&(o=4+(e-r)/a),o=Math.min(o*60,360),o<0&&(o+=360),u=(n+s)/2,s===n?l=0:u<=.5?l=a/(s+n):l=a/(2-s-n),[o,l*100,u*100]};k.rgb.hsv=function(t){var e,r,i,n,s,a=t[0]/255,o=t[1]/255,l=t[2]/255,u=Math.max(a,o,l),h=u-Math.min(a,o,l),p=function(c){return(u-c)/6/h+1/2};return h===0?n=s=0:(s=h/u,e=p(a),r=p(o),i=p(l),a===u?n=i-r:o===u?n=1/3+e-i:l===u&&(n=2/3+r-e),n<0?n+=1:n>1&&(n-=1)),[n*360,s*100,u*100]};k.rgb.hwb=function(t){var e=t[0],r=t[1],i=t[2],n=k.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,i));return i=1-1/255*Math.max(e,Math.max(r,i)),[n,s*100,i*100]};k.rgb.cmyk=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255,n,s,a,o;return o=Math.min(1-e,1-r,1-i),n=(1-e-o)/(1-o)||0,s=(1-r-o)/(1-o)||0,a=(1-i-o)/(1-o)||0,[n*100,s*100,a*100,o*100]};function zv(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}k.rgb.keyword=function(t){var e=Pc[t];if(e)return e;var r=1/0,i;for(var n in Vt)if(Vt.hasOwnProperty(n)){var s=Vt[n],a=zv(t,s);a<r&&(r=a,i=n)}return i};k.keyword.rgb=function(t){return Vt[t]};k.rgb.xyz=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92;var n=e*.4124+r*.3576+i*.1805,s=e*.2126+r*.7152+i*.0722,a=e*.0193+r*.1192+i*.9505;return[n*100,s*100,a*100]};k.rgb.lab=function(t){var e=k.rgb.xyz(t),r=e[0],i=e[1],n=e[2],s,a,o;return r/=95.047,i/=100,n/=108.883,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,s=116*i-16,a=500*(r-i),o=200*(i-n),[s,a,o]};k.hsl.rgb=function(t){var e=t[0]/360,r=t[1]/100,i=t[2]/100,n,s,a,o,l;if(r===0)return l=i*255,[l,l,l];i<.5?s=i*(1+r):s=i+r-i*r,n=2*i-s,o=[0,0,0];for(var u=0;u<3;u++)a=e+1/3*-(u-1),a<0&&a++,a>1&&a--,6*a<1?l=n+(s-n)*6*a:2*a<1?l=s:3*a<2?l=n+(s-n)*(2/3-a)*6:l=n,o[u]=l*255;return o};k.hsl.hsv=function(t){var e=t[0],r=t[1]/100,i=t[2]/100,n=r,s=Math.max(i,.01),a,o;return i*=2,r*=i<=1?i:2-i,n*=s<=1?s:2-s,o=(i+r)/2,a=i===0?2*n/(s+n):2*r/(i+r),[e,a*100,o*100]};k.hsv.rgb=function(t){var e=t[0]/60,r=t[1]/100,i=t[2]/100,n=Math.floor(e)%6,s=e-Math.floor(e),a=255*i*(1-r),o=255*i*(1-r*s),l=255*i*(1-r*(1-s));switch(i*=255,n){case 0:return[i,l,a];case 1:return[o,i,a];case 2:return[a,i,l];case 3:return[a,o,i];case 4:return[l,a,i];case 5:return[i,a,o]}};k.hsv.hsl=function(t){var e=t[0],r=t[1]/100,i=t[2]/100,n=Math.max(i,.01),s,a,o;return o=(2-r)*i,s=(2-r)*n,a=r*n,a/=s<=1?s:2-s,a=a||0,o/=2,[e,a*100,o*100]};k.hwb.rgb=function(t){var e=t[0]/360,r=t[1]/100,i=t[2]/100,n=r+i,s,a,o,l;n>1&&(r/=n,i/=n),s=Math.floor(6*e),a=1-i,o=6*e-s,s&1&&(o=1-o),l=r+o*(a-r);var u,h,p;switch(s){default:case 6:case 0:u=a,h=l,p=r;break;case 1:u=l,h=a,p=r;break;case 2:u=r,h=a,p=l;break;case 3:u=r,h=l,p=a;break;case 4:u=l,h=r,p=a;break;case 5:u=a,h=r,p=l;break}return[u*255,h*255,p*255]};k.cmyk.rgb=function(t){var e=t[0]/100,r=t[1]/100,i=t[2]/100,n=t[3]/100,s,a,o;return s=1-Math.min(1,e*(1-n)+n),a=1-Math.min(1,r*(1-n)+n),o=1-Math.min(1,i*(1-n)+n),[s*255,a*255,o*255]};k.xyz.rgb=function(t){var e=t[0]/100,r=t[1]/100,i=t[2]/100,n,s,a;return n=e*3.2406+r*-1.5372+i*-.4986,s=e*-.9689+r*1.8758+i*.0415,a=e*.0557+r*-.204+i*1.057,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*12.92,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*12.92,n=Math.min(Math.max(0,n),1),s=Math.min(Math.max(0,s),1),a=Math.min(Math.max(0,a),1),[n*255,s*255,a*255]};k.xyz.lab=function(t){var e=t[0],r=t[1],i=t[2],n,s,a;return e/=95.047,r/=100,i/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,n=116*r-16,s=500*(e-r),a=200*(r-i),[n,s,a]};k.lab.xyz=function(t){var e=t[0],r=t[1],i=t[2],n,s,a;s=(e+16)/116,n=r/500+s,a=s-i/200;var o=Math.pow(s,3),l=Math.pow(n,3),u=Math.pow(a,3);return s=o>.008856?o:(s-16/116)/7.787,n=l>.008856?l:(n-16/116)/7.787,a=u>.008856?u:(a-16/116)/7.787,n*=95.047,s*=100,a*=108.883,[n,s,a]};k.lab.lch=function(t){var e=t[0],r=t[1],i=t[2],n,s,a;return n=Math.atan2(i,r),s=n*360/2/Math.PI,s<0&&(s+=360),a=Math.sqrt(r*r+i*i),[e,a,s]};k.lch.lab=function(t){var e=t[0],r=t[1],i=t[2],n,s,a;return a=i/360*2*Math.PI,n=r*Math.cos(a),s=r*Math.sin(a),[e,n,s]};k.rgb.ansi16=function(t){var e=t[0],r=t[1],i=t[2],n=1 in arguments?arguments[1]:k.rgb.hsv(t)[2];if(n=Math.round(n/50),n===0)return 30;var s=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(e/255));return n===2&&(s+=60),s};k.hsv.ansi16=function(t){return k.rgb.ansi16(k.hsv.rgb(t),t[2])};k.rgb.ansi256=function(t){var e=t[0],r=t[1],i=t[2];if(e===r&&r===i)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var n=16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5);return n};k.ansi16.rgb=function(t){var e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var r=(~~(t>50)+1)*.5,i=(e&1)*r*255,n=(e>>1&1)*r*255,s=(e>>2&1)*r*255;return[i,n,s]};k.ansi256.rgb=function(t){if(t>=232){var e=(t-232)*10+8;return[e,e,e]}t-=16;var r,i=Math.floor(t/36)/5*255,n=Math.floor((r=t%36)/6)/5*255,s=r%6/5*255;return[i,n,s]};k.rgb.hex=function(t){var e=((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255),r=e.toString(16).toUpperCase();return"000000".substring(r.length)+r};k.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var r=e[0];e[0].length===3&&(r=r.split("").map(function(o){return o+o}).join(""));var i=parseInt(r,16),n=i>>16&255,s=i>>8&255,a=i&255;return[n,s,a]};k.rgb.hcg=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.max(Math.max(e,r),i),s=Math.min(Math.min(e,r),i),a=n-s,o,l;return a<1?o=s/(1-a):o=0,a<=0?l=0:n===e?l=(r-i)/a%6:n===r?l=2+(i-e)/a:l=4+(e-r)/a+4,l/=6,l%=1,[l*360,a*100,o*100]};k.hsl.hcg=function(t){var e=t[1]/100,r=t[2]/100,i=1,n=0;return r<.5?i=2*e*r:i=2*e*(1-r),i<1&&(n=(r-.5*i)/(1-i)),[t[0],i*100,n*100]};k.hsv.hcg=function(t){var e=t[1]/100,r=t[2]/100,i=e*r,n=0;return i<1&&(n=(r-i)/(1-i)),[t[0],i*100,n*100]};k.hcg.rgb=function(t){var e=t[0]/360,r=t[1]/100,i=t[2]/100;if(r===0)return[i*255,i*255,i*255];var n=[0,0,0],s=e%1*6,a=s%1,o=1-a,l=0;switch(Math.floor(s)){case 0:n[0]=1,n[1]=a,n[2]=0;break;case 1:n[0]=o,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=a;break;case 3:n[0]=0,n[1]=o,n[2]=1;break;case 4:n[0]=a,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=o}return l=(1-r)*i,[(r*n[0]+l)*255,(r*n[1]+l)*255,(r*n[2]+l)*255]};k.hcg.hsv=function(t){var e=t[1]/100,r=t[2]/100,i=e+r*(1-e),n=0;return i>0&&(n=e/i),[t[0],n*100,i*100]};k.hcg.hsl=function(t){var e=t[1]/100,r=t[2]/100,i=r*(1-e)+.5*e,n=0;return i>0&&i<.5?n=e/(2*i):i>=.5&&i<1&&(n=e/(2*(1-i))),[t[0],n*100,i*100]};k.hcg.hwb=function(t){var e=t[1]/100,r=t[2]/100,i=e+r*(1-e);return[t[0],(i-e)*100,(1-i)*100]};k.hwb.hcg=function(t){var e=t[1]/100,r=t[2]/100,i=1-r,n=i-e,s=0;return n<1&&(s=(i-n)/(1-n)),[t[0],n*100,s*100]};k.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};k.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};k.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};k.gray.hsl=k.gray.hsv=function(t){return[0,0,t[0]]};k.gray.hwb=function(t){return[0,100,t[0]]};k.gray.cmyk=function(t){return[0,0,0,t[0]]};k.gray.lab=function(t){return[t[0],0,0]};k.gray.hex=function(t){var e=Math.round(t[0]/100*255)&255,r=(e<<16)+(e<<8)+e,i=r.toString(16).toUpperCase();return"000000".substring(i.length)+i};k.rgb.gray=function(t){var e=(t[0]+t[1]+t[2])/3;return[e/255*100]}});var Cc=w((z2,qc)=>{var Fn=mo();function Hv(){for(var t={},e=Object.keys(Fn),r=e.length,i=0;i<r;i++)t[e[i]]={distance:-1,parent:null};return t}function Gv(t){var e=Hv(),r=[t];for(e[t].distance=0;r.length;)for(var i=r.pop(),n=Object.keys(Fn[i]),s=n.length,a=0;a<s;a++){var o=n[a],l=e[o];l.distance===-1&&(l.distance=e[i].distance+1,l.parent=i,r.unshift(o))}return e}function Yv(t,e){return function(r){return e(t(r))}}function Vv(t,e){for(var r=[e[t].parent,t],i=Fn[e[t].parent][t],n=e[t].parent;e[n].parent;)r.unshift(e[n].parent),i=Yv(Fn[e[n].parent][n],i),n=e[n].parent;return i.conversion=r,i}qc.exports=function(t){for(var e=Gv(t),r={},i=Object.keys(e),n=i.length,s=0;s<n;s++){var a=i[s],o=e[a];o.parent!==null&&(r[a]=Vv(a,e))}return r}});var jc=w((H2,Lc)=>{var yo=mo(),Kv=Cc(),yr={},Jv=Object.keys(yo);function Zv(t){var e=function(r){return r==null?r:(arguments.length>1&&(r=Array.prototype.slice.call(arguments)),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function Qv(t){var e=function(r){if(r==null)return r;arguments.length>1&&(r=Array.prototype.slice.call(arguments));var i=t(r);if(typeof i=="object")for(var n=i.length,s=0;s<n;s++)i[s]=Math.round(i[s]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}Jv.forEach(function(t){yr[t]={},Object.defineProperty(yr[t],"channels",{value:yo[t].channels}),Object.defineProperty(yr[t],"labels",{value:yo[t].labels});var e=Kv(t),r=Object.keys(e);r.forEach(function(i){var n=e[i];yr[t][i]=Qv(n),yr[t][i].raw=Zv(n)})});Lc.exports=yr});var Ic=w((G2,Fc)=>{"use strict";var ri=Tc(),Me=jc(),vo=[].slice,Nc=["keyword","gray","hex"],bo={};Object.keys(Me).forEach(function(t){bo[vo.call(Me[t].labels).sort().join("")]=t});var In={};function ue(t,e){if(!(this instanceof ue))return new ue(t,e);if(e&&e in Nc&&(e=null),e&&!(e in Me))throw new Error("Unknown model: "+e);var r,i;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof ue)this.model=t.model,this.color=t.color.slice(),this.valpha=t.valpha;else if(typeof t=="string"){var n=ri.get(t);if(n===null)throw new Error("Unable to parse color from string: "+t);this.model=n.model,i=Me[this.model].channels,this.color=n.value.slice(0,i),this.valpha=typeof n.value[i]=="number"?n.value[i]:1}else if(t.length){this.model=e||"rgb",i=Me[this.model].channels;var s=vo.call(t,0,i);this.color=wo(s,i),this.valpha=typeof t[i]=="number"?t[i]:1}else if(typeof t=="number")t&=16777215,this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;var a=Object.keys(t);"alpha"in t&&(a.splice(a.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);var o=a.sort().join("");if(!(o in bo))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=bo[o];var l=Me[this.model].labels,u=[];for(r=0;r<l.length;r++)u.push(t[l[r]]);this.color=wo(u)}if(In[this.model])for(i=Me[this.model].channels,r=0;r<i;r++){var h=In[this.model][r];h&&(this.color[r]=h(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}ue.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(t){var e=this.model in ri.to?this:this.rgb();e=e.round(typeof t=="number"?t:1);var r=e.valpha===1?e.color:e.color.concat(this.valpha);return ri.to[e.model](r)},percentString:function(t){var e=this.rgb().round(typeof t=="number"?t:1),r=e.valpha===1?e.color:e.color.concat(this.valpha);return ri.to.rgb.percent(r)},array:function(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var t={},e=Me[this.model].channels,r=Me[this.model].labels,i=0;i<e;i++)t[r[i]]=this.color[i];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray:function(){var t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject:function(){var t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round:function(t){return t=Math.max(t||0,0),new ue(this.color.map(e1(t)).concat(this.valpha),this.model)},alpha:function(t){return arguments.length?new ue(this.color.concat(Math.max(0,Math.min(1,t))),this.model):this.valpha},red:K("rgb",0,ie(255)),green:K("rgb",1,ie(255)),blue:K("rgb",2,ie(255)),hue:K(["hsl","hsv","hsl","hwb","hcg"],0,function(t){return(t%360+360)%360}),saturationl:K("hsl",1,ie(100)),lightness:K("hsl",2,ie(100)),saturationv:K("hsv",1,ie(100)),value:K("hsv",2,ie(100)),chroma:K("hcg",1,ie(100)),gray:K("hcg",2,ie(100)),white:K("hwb",1,ie(100)),wblack:K("hwb",2,ie(100)),cyan:K("cmyk",0,ie(100)),magenta:K("cmyk",1,ie(100)),yellow:K("cmyk",2,ie(100)),black:K("cmyk",3,ie(100)),x:K("xyz",0,ie(100)),y:K("xyz",1,ie(100)),z:K("xyz",2,ie(100)),l:K("lab",0,ie(100)),a:K("lab",1),b:K("lab",2),keyword:function(t){return arguments.length?new ue(t):Me[this.model].keyword(this.color)},hex:function(t){return arguments.length?new ue(t):ri.to.hex(this.rgb().round().color)},rgbNumber:function(){var t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity:function(){for(var t=this.rgb().color,e=[],r=0;r<t.length;r++){var i=t[r]/255;e[r]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),r=t.luminosity();return e>r?(e+.05)/(r+.05):(r+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},isDark:function(){var t=this.rgb().color,e=(t[0]*299+t[1]*587+t[2]*114)/1e3;return e<128},isLight:function(){return!this.isDark()},negate:function(){for(var t=this.rgb(),e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten:function(t){var e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken:function(t){var e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate:function(t){var e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate:function(t){var e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten:function(t){var e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken:function(t){var e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale:function(){var t=this.rgb().color,e=t[0]*.3+t[1]*.59+t[2]*.11;return ue.rgb(e,e,e)},fade:function(t){return this.alpha(this.valpha-this.valpha*t)},opaquer:function(t){return this.alpha(this.valpha+this.valpha*t)},rotate:function(t){var e=this.hsl(),r=e.color[0];return r=(r+t)%360,r=r<0?360+r:r,e.color[0]=r,e},mix:function(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);var r=t.rgb(),i=this.rgb(),n=e===void 0?.5:e,s=2*n-1,a=r.alpha()-i.alpha(),o=((s*a===-1?s:(s+a)/(1+s*a))+1)/2,l=1-o;return ue.rgb(o*r.red()+l*i.red(),o*r.green()+l*i.green(),o*r.blue()+l*i.blue(),r.alpha()*n+i.alpha()*(1-n))}};Object.keys(Me).forEach(function(t){if(Nc.indexOf(t)===-1){var e=Me[t].channels;ue.prototype[t]=function(){if(this.model===t)return new ue(this);if(arguments.length)return new ue(arguments,t);var r=typeof arguments[e]=="number"?e:this.valpha;return new ue(t1(Me[this.model][t].raw(this.color)).concat(r),t)},ue[t]=function(r){return typeof r=="number"&&(r=wo(vo.call(arguments),e)),new ue(r,t)}}});function Xv(t,e){return Number(t.toFixed(e))}function e1(t){return function(e){return Xv(e,t)}}function K(t,e,r){return t=Array.isArray(t)?t:[t],t.forEach(function(i){(In[i]||(In[i]=[]))[e]=r}),t=t[0],function(i){var n;return arguments.length?(r&&(i=r(i)),n=this[t](),n.color[e]=i,n):(n=this[t]().color[e],r&&(n=r(n)),n)}}function ie(t){return function(e){return Math.max(0,Math.min(t,e))}}function t1(t){return Array.isArray(t)?t:[t]}function wo(t,e){for(var r=0;r<e;r++)typeof t[r]!="number"&&(t[r]=0);return t}Fc.exports=ue});var Wc=w((Y2,$c)=>{"use strict";$c.exports=function(e){for(var r=0,i=0;r<e.length;i=e.charCodeAt(r++)+((i<<5)-i));var n=Math.floor(Math.abs(Math.sin(i)*1e4%1*16777216)).toString(16);return"#"+Array(6-n.length+1).join("0")+n}});var Hc=w((V2,zc)=>{"use strict";var Bc=Ic(),Uc=Wc();zc.exports=function(e,r){var i=e.split(r||":"),n=Uc(i[0]);if(!i.length)return n;for(var s=0,a=i.length-1;s<a;s++)n=Bc(n).mix(Bc(Uc(i[s+1]))).saturate(1).hex();return n}});var Yc=w((K2,Gc)=>{"use strict";function Ie(t,e){if(e)return new Ie(t).style(e);if(!(this instanceof Ie))return new Ie(t);this.text=t}Ie.prototype.prefix="\x1B[";Ie.prototype.suffix="m";Ie.prototype.hex=function(e){e=e[0]==="#"?e.substring(1):e,e.length===3&&(e=e.split(""),e[5]=e[2],e[4]=e[2],e[3]=e[1],e[2]=e[1],e[1]=e[0],e=e.join(""));var r=e.substring(0,2),i=e.substring(2,4),n=e.substring(4,6);return[parseInt(r,16),parseInt(i,16),parseInt(n,16)]};Ie.prototype.rgb=function(e,r,i){var n=e/255*5,s=r/255*5,a=i/255*5;return this.ansi(n,s,a)};Ie.prototype.ansi=function(e,r,i){var n=Math.round(e),s=Math.round(r),a=Math.round(i);return 16+n*36+s*6+a};Ie.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};Ie.prototype.style=function(e){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(e))+this.suffix+this.text+this.reset()};Gc.exports=Ie});var Kc=w((J2,Vc)=>{var r1=Hc(),i1=Yc();Vc.exports=function(e,r){var i=r.namespace,n=r.colors!==!1?i1(i+":",r1(i)):i+":";return e[0]=n+" "+e[0],e}});var Zc=w((Z2,Jc)=>{"use strict";Jc.exports=function(e,r){if(!r)return!1;for(var i=r.split(/[\s,]+/),n=0;n<i.length;n++){if(r=i[n].replace("*",".*?"),r.charAt(0)==="-"){if(new RegExp("^"+r.substr(1)+"$").test(e))return!1;continue}if(new RegExp("^"+r+"$").test(e))return!0}return!1}});var Xc=w((Q2,Qc)=>{var n1=Zc();Qc.exports=function(e){return function(i){try{return n1(i,e())}catch{}return!1}}});var td=w((X2,ed)=>{var s1=Xc();ed.exports=s1(function(){return process.env.DEBUG||process.env.DIAGNOSTICS})});var id=w((eR,rd)=>{rd.exports=function(t,e){try{Function.prototype.apply.call(console.log,console,e)}catch{}}});var sd=w((tR,nd)=>{var a1=go(),o1=require("tty").isatty(1),$n=a1(function t(e,r){return r=r||{},r.colors="colors"in r?r.colors:o1,r.namespace=e,r.prod=!1,r.dev=!0,!t.enabled(e)&&!(r.force||t.force)?t.nope(r):t.yep(r)});$n.modify(Kc());$n.use(td());$n.set(id());nd.exports=$n});var ii=w((rR,_o)=>{process.env.NODE_ENV==="production"?_o.exports=gc():_o.exports=sd()});var od=w((iR,ad)=>{"use strict";var So=require("fs"),{StringDecoder:l1}=require("string_decoder"),{Stream:u1}=Yt();function f1(){}ad.exports=(t,e)=>{let r=Buffer.alloc(65536),i=new l1("utf8"),n=new u1,s="",a=0,o=0;return t.start===-1&&delete t.start,n.readable=!0,n.destroy=()=>{n.destroyed=!0,n.emit("end"),n.emit("close")},So.open(t.file,"a+","0644",(l,u)=>{if(l){e?e(l):n.emit("error",l),n.destroy();return}(function h(){if(n.destroyed){So.close(u,f1);return}return So.read(u,r,0,r.length,a,(p,c)=>{if(p){e?e(p):n.emit("error",p),n.destroy();return}if(!c)return s&&((t.start==null||o>t.start)&&(e?e(null,s):n.emit("line",s)),o++,s=""),setTimeout(h,1e3);let f=i.write(r.slice(0,c));e||n.emit("data",f),f=(s+f).split(/\n+/);let y=f.length-1,b=0;for(;b<y;b++)(t.start==null||o>t.start)&&(e?e(null,f[b]):n.emit("line",f[b])),o++;return s=f[y],a+=c,h()})})()}),e?n.destroy:n}});var hd=w((sR,fd)=>{"use strict";var xe=require("fs"),ne=require("path"),ld=dh(),h1=require("zlib"),{MESSAGE:c1}=re(),{Stream:d1,PassThrough:ud}=Yt(),p1=ur(),$e=ii()("winston:file"),g1=require("os"),m1=od();fd.exports=class extends p1{constructor(e={}){super(e),this.name=e.name||"file";function r(i,...n){n.slice(1).forEach(s=>{if(e[s])throw new Error(`Cannot set ${s} and ${i} together`)})}if(this._stream=new ud,this._stream.setMaxListeners(30),this._onError=this._onError.bind(this),e.filename||e.dirname)r("filename or dirname","stream"),this._basename=this.filename=e.filename?ne.basename(e.filename):"winston.log",this.dirname=e.dirname||ne.dirname(e.filename),this.options=e.options||{flags:"a"};else if(e.stream)console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),r("stream","filename","maxsize"),this._dest=this._stream.pipe(this._setupStream(e.stream)),this.dirname=ne.dirname(this._dest.path);else throw new Error("Cannot log to file without filename or stream.");this.maxsize=e.maxsize||null,this.rotationFormat=e.rotationFormat||!1,this.zippedArchive=e.zippedArchive||!1,this.maxFiles=e.maxFiles||null,this.eol=typeof e.eol=="string"?e.eol:g1.EOL,this.tailable=e.tailable||!1,this.lazy=e.lazy||!1,this._size=0,this._pendingSize=0,this._created=0,this._drain=!1,this._opening=!1,this._ending=!1,this._fileExist=!1,this.dirname&&this._createLogDirIfNotExist(this.dirname),this.lazy||this.open()}finishIfEnding(){this._ending&&(this._opening?this.once("open",()=>{this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())}):(this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())))}log(e,r=()=>{}){if(this.silent)return r(),!0;if(this._drain){this._stream.once("drain",()=>{this._drain=!1,this.log(e,r)});return}if(this._rotate){this._stream.once("rotate",()=>{this._rotate=!1,this.log(e,r)});return}if(this.lazy){if(!this._fileExist){this._opening||this.open(),this.once("open",()=>{this._fileExist=!0,this.log(e,r)});return}if(this._needsNewFile(this._pendingSize)){this._dest.once("close",()=>{this._opening||this.open(),this.once("open",()=>{this.log(e,r)})});return}}let i=`${e[c1]}${this.eol}`,n=Buffer.byteLength(i);function s(){if(this._size+=n,this._pendingSize-=n,$e("logged %s %s",this._size,i),this.emit("logged",e),!this._rotate&&!this._opening&&this._needsNewFile()){if(this.lazy){this._endStream(()=>{this.emit("fileclosed")});return}this._rotate=!0,this._endStream(()=>this._rotateFile())}}this._pendingSize+=n,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);let a=this._stream.write(i,s.bind(this));return a?r():(this._drain=!0,this._stream.once("drain",()=>{this._drain=!1,r()})),$e("written",a,this._drain),this.finishIfEnding(),a}query(e,r){typeof e=="function"&&(r=e,e={}),e=p(e);let i=ne.join(this.dirname,this.filename),n="",s=[],a=0,o=xe.createReadStream(i,{encoding:"utf8"});o.on("error",c=>{if(o.readable&&o.destroy(),!!r)return c.code!=="ENOENT"?r(c):r(null,s)}),o.on("data",c=>{c=(n+c).split(/\n+/);let f=c.length-1,y=0;for(;y<f;y++)(!e.start||a>=e.start)&&l(c[y]),a++;n=c[f]}),o.on("close",()=>{n&&l(n,!0),e.order==="desc"&&(s=s.reverse()),r&&r(null,s)});function l(c,f){try{let y=JSON.parse(c);h(y)&&u(y)}catch(y){f||o.emit("error",y)}}function u(c){if(e.rows&&s.length>=e.rows&&e.order!=="desc"){o.readable&&o.destroy();return}e.fields&&(c=e.fields.reduce((f,y)=>(f[y]=c[y],f),{})),e.order==="desc"&&s.length>=e.rows&&s.shift(),s.push(c)}function h(c){if(!c||typeof c!="object")return;let f=new Date(c.timestamp);if(!(e.from&&f<e.from||e.until&&f>e.until||e.level&&e.level!==c.level))return!0}function p(c){return c=c||{},c.rows=c.rows||c.limit||10,c.start=c.start||0,c.until=c.until||new Date,typeof c.until!="object"&&(c.until=new Date(c.until)),c.from=c.from||c.until-24*60*60*1e3,typeof c.from!="object"&&(c.from=new Date(c.from)),c.order=c.order||"desc",c}}stream(e={}){let r=ne.join(this.dirname,this.filename),i=new d1,n={file:r,start:e.start};return i.destroy=m1(n,(s,a)=>{if(s)return i.emit("error",s);try{i.emit("data",a),a=JSON.parse(a),i.emit("log",a)}catch(o){i.emit("error",o)}}),i}open(){this.filename&&(this._opening||(this._opening=!0,this.stat((e,r)=>{if(e)return this.emit("error",e);$e("stat done: %s { size: %s }",this.filename,r),this._size=r,this._dest=this._createStream(this._stream),this._opening=!1,this.once("open",()=>{this._stream.eventNames().includes("rotate")?this._stream.emit("rotate"):this._rotate=!1})})))}stat(e){let r=this._getFile(),i=ne.join(this.dirname,r);xe.stat(i,(n,s)=>{if(n&&n.code==="ENOENT")return $e("ENOENT\xA0ok",i),this.filename=r,e(null,0);if(n)return $e(`err ${n.code} ${i}`),e(n);if(!s||this._needsNewFile(s.size))return this._incFile(()=>this.stat(e));this.filename=r,e(null,s.size)})}close(e){this._stream&&this._stream.end(()=>{e&&e(),this.emit("flush"),this.emit("closed")})}_needsNewFile(e){return e=e||this._size,this.maxsize&&e>=this.maxsize}_onError(e){this.emit("error",e)}_setupStream(e){return e.on("error",this._onError),e}_cleanupStream(e){return e.removeListener("error",this._onError),e.destroy(),e}_rotateFile(){this._incFile(()=>this.open())}_endStream(e=()=>{}){this._dest?(this._stream.unpipe(this._dest),this._dest.end(()=>{this._cleanupStream(this._dest),e()})):e()}_createStream(e){let r=ne.join(this.dirname,this.filename);$e("create stream start",r,this.options);let i=xe.createWriteStream(r,this.options).on("error",n=>$e(n)).on("close",()=>$e("close",i.path,i.bytesWritten)).on("open",()=>{$e("file open ok",r),this.emit("open",r),e.pipe(i),this.rotatedWhileOpening&&(this._stream=new ud,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(i),e.end())});return $e("create stream ok",r),i}_incFile(e){$e("_incFile",this.filename);let r=ne.extname(this._basename),i=ne.basename(this._basename,r),n=[];this.zippedArchive&&n.push(function(s){let a=this._created>0&&!this.tailable?this._created:"";this._compressFile(ne.join(this.dirname,`${i}${a}${r}`),ne.join(this.dirname,`${i}${a}${r}.gz`),s)}.bind(this)),n.push(function(s){this.tailable?this._checkMaxFilesTailable(r,i,s):(this._created+=1,this._checkMaxFilesIncrementing(r,i,s))}.bind(this)),ld(n,e)}_getFile(){let e=ne.extname(this._basename),r=ne.basename(this._basename,e),i=this.rotationFormat?this.rotationFormat():this._created;return!this.tailable&&this._created?`${r}${i}${e}`:`${r}${e}`}_checkMaxFilesIncrementing(e,r,i){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(i);let n=this._created-this.maxFiles,s=n!==0?n:"",a=this.zippedArchive?".gz":"",o=`${r}${s}${e}${a}`,l=ne.join(this.dirname,o);xe.unlink(l,i)}_checkMaxFilesTailable(e,r,i){let n=[];if(!this.maxFiles)return;let s=this.zippedArchive?".gz":"";for(let a=this.maxFiles-1;a>1;a--)n.push(function(o,l){let u=`${r}${o-1}${e}${s}`,h=ne.join(this.dirname,u);xe.exists(h,p=>{if(!p)return l(null);u=`${r}${o}${e}${s}`,xe.rename(h,ne.join(this.dirname,u),l)})}.bind(this,a));ld(n,()=>{xe.rename(ne.join(this.dirname,`${r}${e}${s}`),ne.join(this.dirname,`${r}1${e}${s}`),i)})}_compressFile(e,r,i){xe.access(e,xe.F_OK,n=>{if(n)return i();var s=h1.createGzip(),a=xe.createReadStream(e),o=xe.createWriteStream(r);o.on("finish",()=>{xe.unlink(e,i)}),a.pipe(s).pipe(o)})}_createLogDirIfNotExist(e){xe.existsSync(e)||xe.mkdirSync(e,{recursive:!0})}}});var dd=w((oR,cd)=>{"use strict";var y1=require("http"),b1=require("https"),{Stream:w1}=Yt(),v1=ur(),{configure:_1}=Pr();cd.exports=class extends v1{constructor(e={}){super(e),this.options=e,this.name=e.name||"http",this.ssl=!!e.ssl,this.host=e.host||"localhost",this.port=e.port,this.auth=e.auth,this.path=e.path||"",this.maximumDepth=e.maximumDepth,this.agent=e.agent,this.headers=e.headers||{},this.headers["content-type"]="application/json",this.batch=e.batch||!1,this.batchInterval=e.batchInterval||5e3,this.batchCount=e.batchCount||10,this.batchOptions=[],this.batchTimeoutID=-1,this.batchCallback={},this.port||(this.port=this.ssl?443:80)}log(e,r){this._request(e,null,null,(i,n)=>{n&&n.statusCode!==200&&(i=new Error(`Invalid HTTP Status Code: ${n.statusCode}`)),i?this.emit("warn",i):this.emit("logged",e)}),r&&setImmediate(r)}query(e,r){typeof e=="function"&&(r=e,e={}),e={method:"query",params:this.normalizeQuery(e)};let i=e.params.auth||null;delete e.params.auth;let n=e.params.path||null;delete e.params.path,this._request(e,i,n,(s,a,o)=>{if(a&&a.statusCode!==200&&(s=new Error(`Invalid HTTP Status Code: ${a.statusCode}`)),s)return r(s);if(typeof o=="string")try{o=JSON.parse(o)}catch(l){return r(l)}r(null,o)})}stream(e={}){let r=new w1;e={method:"stream",params:e};let i=e.params.path||null;delete e.params.path;let n=e.params.auth||null;delete e.params.auth;let s="",a=this._request(e,n,i);return r.destroy=()=>a.destroy(),a.on("data",o=>{o=(s+o).split(/\n+/);let l=o.length-1,u=0;for(;u<l;u++)try{r.emit("log",JSON.parse(o[u]))}catch(h){r.emit("error",h)}s=o[l]}),a.on("error",o=>r.emit("error",o)),r}_request(e,r,i,n){e=e||{},r=r||this.auth,i=i||this.path||"",this.batch?this._doBatch(e,n,r,i):this._doRequest(e,n,r,i)}_doBatch(e,r,i,n){if(this.batchOptions.push(e),this.batchOptions.length===1){let s=this;this.batchCallback=r,this.batchTimeoutID=setTimeout(function(){s.batchTimeoutID=-1,s._doBatchRequest(s.batchCallback,i,n)},this.batchInterval)}this.batchOptions.length===this.batchCount&&this._doBatchRequest(this.batchCallback,i,n)}_doBatchRequest(e,r,i){this.batchTimeoutID>0&&(clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1);let n=this.batchOptions.slice();this.batchOptions=[],this._doRequest(n,e,r,i)}_doRequest(e,r,i,n){let s=Object.assign({},this.headers);i&&i.bearer&&(s.Authorization=`Bearer ${i.bearer}`);let a=(this.ssl?b1:y1).request({...this.options,method:"POST",host:this.host,port:this.port,path:`/${n.replace(/^\//,"")}`,headers:s,auth:i&&i.username&&i.password?`${i.username}:${i.password}`:"",agent:this.agent});a.on("error",r),a.on("response",l=>l.on("end",()=>r(null,l)).resume());let o=_1({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});a.end(Buffer.from(o(e,this.options.replacer),"utf8"))}}});var Eo=w((lR,pd)=>{"use strict";var Ke=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";Ke.writable=t=>Ke(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";Ke.readable=t=>Ke(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";Ke.duplex=t=>Ke.writable(t)&&Ke.readable(t);Ke.transform=t=>Ke.duplex(t)&&typeof t._transform=="function";pd.exports=Ke});var md=w((fR,gd)=>{"use strict";var S1=Eo(),{MESSAGE:E1}=re(),R1=require("os"),x1=ur();gd.exports=class extends x1{constructor(e={}){if(super(e),!e.stream||!S1(e.stream))throw new Error("options.stream is required.");this._stream=e.stream,this._stream.setMaxListeners(1/0),this.isObjectMode=e.stream._writableState.objectMode,this.eol=typeof e.eol=="string"?e.eol:R1.EOL}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.isObjectMode){this._stream.write(e),r&&r();return}this._stream.write(`${e[E1]}${this.eol}`),r&&r()}}});var yd=w(ni=>{"use strict";Object.defineProperty(ni,"Console",{configurable:!0,enumerable:!0,get(){return Pf()}});Object.defineProperty(ni,"File",{configurable:!0,enumerable:!0,get(){return hd()}});Object.defineProperty(ni,"Http",{configurable:!0,enumerable:!0,get(){return dd()}});Object.defineProperty(ni,"Stream",{configurable:!0,enumerable:!0,get(){return md()}})});var Bn=w(si=>{"use strict";var Wn=Js(),{configs:Ro}=re();si.cli=Wn.levels(Ro.cli);si.npm=Wn.levels(Ro.npm);si.syslog=Wn.levels(Ro.syslog);si.addColors=Wn.levels});var wd=w((Un,bd)=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});var T1=sn(),O1=Kt(T1),M1=gn(),k1=Kt(M1),A1=La(),P1=Kt(A1),D1=Da(),q1=Kt(D1),C1=qa(),L1=Kt(C1),j1=Bt(),N1=Kt(j1),F1=hr(),I1=Kt(F1);function Kt(t){return t&&t.__esModule?t:{default:t}}function $1(t,e,r){r=(0,q1.default)(r);var i=0,n=0,{length:s}=t,a=!1;s===0&&r(null);function o(l,u){l===!1&&(a=!0),a!==!0&&(l?r(l):(++n===s||u===k1.default)&&r(null))}for(;i<s;i++)e(t[i],i,(0,L1.default)(o))}function W1(t,e,r){return(0,P1.default)(t,1/0,e,r)}function B1(t,e,r){var i=(0,O1.default)(t)?$1:W1;return i(t,(0,N1.default)(e),r)}Un.default=(0,I1.default)(B1,3);bd.exports=Un.default});var _d=w((zn,vd)=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.default=U1;function U1(t){return(e,r,i)=>t(e,i)}vd.exports=zn.default});var Yn=w((Gn,Sd)=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});var z1=wd(),H1=Hn(z1),G1=_d(),Y1=Hn(G1),V1=Bt(),K1=Hn(V1),J1=hr(),Z1=Hn(J1);function Hn(t){return t&&t.__esModule?t:{default:t}}function Q1(t,e,r){return(0,H1.default)(t,(0,Y1.default)((0,K1.default)(e)),r)}Gn.default=(0,Z1.default)(Q1,3);Sd.exports=Gn.default});var Rd=w((dR,Ed)=>{"use strict";var X1=Object.prototype.toString;Ed.exports=function(e){if(typeof e.displayName=="string"&&e.constructor.name)return e.displayName;if(typeof e.name=="string"&&e.name)return e.name;if(typeof e=="object"&&e.constructor&&typeof e.constructor.name=="string")return e.constructor.name;var r=e.toString(),i=X1.call(e).slice(8,-1);return i==="Function"?r=r.substring(r.indexOf("(")+1,r.indexOf(")")):r=i,r||"anonymous"}});var xo=w((pR,xd)=>{"use strict";var e_=Rd();xd.exports=function(e){var r=0,i;function n(){return r||(r=1,i=e.apply(this,arguments),e=null),i}return n.displayName=e_(e),n}});var To=w(oi=>{oi.get=function(t){var e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var r={},i=Error.prepareStackTrace;Error.prepareStackTrace=function(s,a){return a},Error.captureStackTrace(r,t||oi.get);var n=r.stack;return Error.prepareStackTrace=i,Error.stackTraceLimit=e,n};oi.parse=function(t){if(!t.stack)return[];var e=this,r=t.stack.split(`
|
|
28
|
-
`).slice(1);return r.map(function(i){if(i.match(/^\s*[-]{4,}$/))return e._createParsedCallSite({fileName:i,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var n=i.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(n){var s=null,a=null,o=null,l=null,u=null,h=n[5]==="native";if(n[1]){o=n[1];var p=o.lastIndexOf(".");if(o[p-1]=="."&&p--,p>0){s=o.substr(0,p),a=o.substr(p+1);var c=s.indexOf(".Module");c>0&&(o=o.substr(c+1),s=s.substr(0,c))}l=null}a&&(l=s,u=a),a==="<anonymous>"&&(u=null,o=null);var f={fileName:n[2]||null,lineNumber:parseInt(n[3],10)||null,functionName:o,typeName:l,methodName:u,columnNumber:parseInt(n[4],10)||null,native:h};return e._createParsedCallSite(f)}}).filter(function(i){return!!i})};function ai(t){for(var e in t)this[e]=t[e]}var
|
|
29
|
-
`),stack:e&&e.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:
|
|
30
|
-
`),stack:e&&e.stack,rejection:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:
|
|
31
|
-
`));y&&this.exceptions.handle(y),b&&this.rejections.handle(b)}isLevelEnabled(e){let r=Do(this.levels,e);if(r===null)return!1;let i=Do(this.levels,this.level);return i===null?!1:!this.transports||this.transports.length===0?i>=r:this.transports.findIndex(s=>{let a=Do(this.levels,s.level);return a===null&&(a=i),a>=r})!==-1}log(e,r,...i){if(arguments.length===1)return e[Je]=e.level,this._addDefaultMeta(e),this.write(e),this;if(arguments.length===2)return r&&typeof r=="object"?(r[Je]=r.level=e,this._addDefaultMeta(r),this.write(r),this):(r={[Je]:e,level:e,message:r},this._addDefaultMeta(r),this.write(r),this);let[n]=i;if(typeof n=="object"&&n!==null&&!(r&&r.match&&r.match(
|
|
32
|
-
`))}_onEvent(e,r){function i(n){e==="error"&&!this.transports.includes(r)&&this.add(r),this.emit(e,n,r)}r["__winston"+e]||(r["__winston"+e]=i.bind(this),r.on(e,r["__winston"+e]))}_addDefaultMeta(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}};function Do(t,e){let r=t[e];return!r&&r!==0?null:r}Object.defineProperty(Kn.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});Wd.exports=Kn});var qo=w((TR,Bd)=>{"use strict";var{LEVEL:v_}=re(),__=Bn(),S_=Vn(),E_=ii()("winston:create-logger");function R_(t){return"is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}Bd.exports=function(t={}){t.levels=t.levels||__.npm.levels;class e extends S_{constructor(n){super(n)}}let r=new e(t);return Object.keys(t.levels).forEach(function(i){if(E_('Define prototype method for "%s"',i),i==="log"){console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.');return}e.prototype[i]=function(...n){let s=this||r;if(n.length===1){let[a]=n,o=a&&a.message&&a||{message:a};return o.level=o[v_]=i,s._addDefaultMeta(o),s.write(o),this||r}return n.length===0?(s.log(i,""),s):s.log(i,...n)},e.prototype[R_(i)]=function(){return(this||r).isLevelEnabled(i)}}),r}});var zd=w((MR,Ud)=>{"use strict";var x_=qo();Ud.exports=class{constructor(e={}){this.loggers=new Map,this.options=e}add(e,r){if(!this.loggers.has(e)){r=Object.assign({},r||this.options);let i=r.transports||this.options.transports;i?r.transports=Array.isArray(i)?i.slice():[i]:r.transports=[];let n=x_(r);n.on("close",()=>this._delete(e)),this.loggers.set(e,n)}return this.loggers.get(e)}get(e,r){return this.add(e,r)}has(e){return!!this.loggers.has(e)}close(e){if(e)return this._removeLogger(e);this.loggers.forEach((r,i)=>this._removeLogger(i))}_removeLogger(e){if(!this.loggers.has(e))return;this.loggers.get(e).close(),this._delete(e)}_delete(e){this.loggers.delete(e)}}});var Gd=w(H=>{"use strict";var Hd=Js(),{warn:li}=Zs();H.version=Mu().version;H.transports=yd();H.config=Bn();H.addColors=Hd.levels;H.format=Hd.format;H.createLogger=qo();H.Logger=Vn();H.ExceptionHandler=Mo();H.RejectionHandler=Ao();H.Container=zd();H.Transport=ur();H.loggers=new H.Container;var Ze=H.createLogger();Object.keys(H.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(t=>H[t]=(...e)=>Ze[t](...e));Object.defineProperty(H,"level",{get(){return Ze.level},set(t){Ze.level=t}});Object.defineProperty(H,"exceptions",{get(){return Ze.exceptions}});Object.defineProperty(H,"rejections",{get(){return Ze.rejections}});["exitOnError"].forEach(t=>{Object.defineProperty(H,t,{get(){return Ze[t]},set(e){Ze[t]=e}})});Object.defineProperty(H,"default",{get(){return{exceptionHandlers:Ze.exceptionHandlers,rejectionHandlers:Ze.rejectionHandlers,transports:Ze.transports}}});li.deprecated(H,"setLevels");li.forFunctions(H,"useFormat",["cli"]);li.forProperties(H,"useFormat",["padLevels","stripColors"]);li.forFunctions(H,"deprecated",["addRewriter","addFilter","clone","extend"]);li.forProperties(H,"deprecated",["emitErrs","levelLength"])});var Zn=w((Jn,Vd)=>{(function(t,e){typeof Jn=="object"&&typeof Vd<"u"?e(Jn):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.Superstruct={}))})(Jn,function(t){"use strict";class e extends TypeError{constructor(g,m){let v,{message:T,explanation:q,...z}=g,{path:Z}=g,Q=Z.length===0?T:`At path: ${Z.join(".")} -- ${T}`;super(q??Q),q!=null&&(this.cause=Q),Object.assign(this,z),this.name=this.constructor.name,this.failures=()=>v??(v=[g,...m()])}}function r(d){return i(d)&&typeof d[Symbol.iterator]=="function"}function i(d){return typeof d=="object"&&d!=null}function n(d){if(Object.prototype.toString.call(d)!=="[object Object]")return!1;let g=Object.getPrototypeOf(d);return g===null||g===Object.prototype}function s(d){return typeof d=="symbol"?d.toString():typeof d=="string"?JSON.stringify(d):`${d}`}function a(d){let{done:g,value:m}=d.next();return g?void 0:m}function o(d,g,m,v){if(d===!0)return;d===!1?d={}:typeof d=="string"&&(d={message:d});let{path:T,branch:q}=g,{type:z}=m,{refinement:Z,message:Q=`Expected a value of type \`${z}\`${Z?` with refinement \`${Z}\``:""}, but received: \`${s(v)}\``}=d;return{value:v,type:z,refinement:Z,key:T[T.length-1],path:T,branch:q,...d,message:Q}}function*l(d,g,m,v){r(d)||(d=[d]);for(let T of d){let q=o(T,g,m,v);q&&(yield q)}}function*u(d,g,m={}){let{path:v=[],branch:T=[d],coerce:q=!1,mask:z=!1}=m,Z={path:v,branch:T};if(q&&(d=g.coercer(d,Z),z&&g.type!=="type"&&i(g.schema)&&i(d)&&!Array.isArray(d)))for(let G in d)g.schema[G]===void 0&&delete d[G];let Q="valid";for(let G of g.validator(d,Z))G.explanation=m.message,Q="not_valid",yield[G,void 0];for(let[G,Pe,cg]of g.entries(d,Z)){let dg=u(Pe,cg,{path:G===void 0?v:[...v,G],branch:G===void 0?T:[...T,Pe],coerce:q,mask:z,message:m.message});for(let Ai of dg)Ai[0]?(Q=Ai[0].refinement!=null?"not_refined":"not_valid",yield[Ai[0],void 0]):q&&(Pe=Ai[1],G===void 0?d=Pe:d instanceof Map?d.set(G,Pe):d instanceof Set?d.add(Pe):i(d)&&(Pe!==void 0||G in d)&&(d[G]=Pe))}if(Q!=="not_valid")for(let G of g.refiner(d,Z))G.explanation=m.message,Q="not_refined",yield[G,void 0];Q==="valid"&&(yield[void 0,d])}class h{constructor(g){let{type:m,schema:v,validator:T,refiner:q,coercer:z=Q=>Q,entries:Z=function*(){}}=g;this.type=m,this.schema=v,this.entries=Z,this.coercer=z,T?this.validator=(Q,G)=>{let Pe=T(Q,G);return l(Pe,G,this,Q)}:this.validator=()=>[],q?this.refiner=(Q,G)=>{let Pe=q(Q,G);return l(Pe,G,this,Q)}:this.refiner=()=>[]}assert(g,m){return p(g,this,m)}create(g,m){return c(g,this,m)}is(g){return y(g,this)}mask(g,m){return f(g,this,m)}validate(g,m={}){return b(g,this,m)}}function p(d,g,m){let v=b(d,g,{message:m});if(v[0])throw v[0]}function c(d,g,m){let v=b(d,g,{coerce:!0,message:m});if(v[0])throw v[0];return v[1]}function f(d,g,m){let v=b(d,g,{coerce:!0,mask:!0,message:m});if(v[0])throw v[0];return v[1]}function y(d,g){return!b(d,g)[0]}function b(d,g,m={}){let v=u(d,g,m),T=a(v);return T[0]?[new e(T[0],function*(){for(let z of v)z[0]&&(yield z[0])}),void 0]:[void 0,T[1]]}function S(...d){let g=d[0].type==="type",m=d.map(T=>T.schema),v=Object.assign({},...m);return g?ft(v):He(v)}function _(d,g){return new h({type:d,schema:null,validator:g})}function x(d,g){return new h({...d,refiner:(m,v)=>m===void 0||d.refiner(m,v),validator(m,v){return m===void 0?!0:(g(m,v),d.validator(m,v))}})}function R(d){return new h({type:"dynamic",schema:null,*entries(g,m){yield*d(g,m).entries(g,m)},validator(g,m){return d(g,m).validator(g,m)},coercer(g,m){return d(g,m).coercer(g,m)},refiner(g,m){return d(g,m).refiner(g,m)}})}function O(d){let g;return new h({type:"lazy",schema:null,*entries(m,v){g??(g=d()),yield*g.entries(m,v)},validator(m,v){return g??(g=d()),g.validator(m,v)},coercer(m,v){return g??(g=d()),g.coercer(m,v)},refiner(m,v){return g??(g=d()),g.refiner(m,v)}})}function A(d,g){let{schema:m}=d,v={...m};for(let T of g)delete v[T];switch(d.type){case"type":return ft(v);default:return He(v)}}function D(d){let g=d instanceof h,m=g?{...d.schema}:{...d};for(let v in m)m[v]=Mr(m[v]);return g&&d.type==="type"?ft(m):He(m)}function F(d,g){let{schema:m}=d,v={};for(let T of g)v[T]=m[T];switch(d.type){case"type":return ft(v);default:return He(v)}}function N(d,g){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),_(d,g)}function B(){return _("any",()=>!0)}function te(d){return new h({type:"array",schema:d,*entries(g){if(d&&Array.isArray(g))for(let[m,v]of g.entries())yield[m,v,d]},coercer(g){return Array.isArray(g)?g.slice():g},validator(g){return Array.isArray(g)||`Expected an array value, but received: ${s(g)}`}})}function J(){return _("bigint",d=>typeof d=="bigint")}function ye(){return _("boolean",d=>typeof d=="boolean")}function be(){return _("date",d=>d instanceof Date&&!isNaN(d.getTime())||`Expected a valid \`Date\` object, but received: ${s(d)}`)}function rt(d){let g={},m=d.map(v=>s(v)).join();for(let v of d)g[v]=v;return new h({type:"enums",schema:g,validator(v){return d.includes(v)||`Expected one of \`${m}\`, but received: ${s(v)}`}})}function Ss(){return _("func",d=>typeof d=="function"||`Expected a function, but received: ${s(d)}`)}function E(d){return _("instance",g=>g instanceof d||`Expected a \`${d.name}\` instance, but received: ${s(g)}`)}function M(){return _("integer",d=>typeof d=="number"&&!isNaN(d)&&Number.isInteger(d)||`Expected an integer, but received: ${s(d)}`)}function U(d){return new h({type:"intersection",schema:null,*entries(g,m){for(let v of d)yield*v.entries(g,m)},*validator(g,m){for(let v of d)yield*v.validator(g,m)},*refiner(g,m){for(let v of d)yield*v.refiner(g,m)}})}function de(d){let g=s(d),m=typeof d;return new h({type:"literal",schema:m==="string"||m==="number"||m==="boolean"?d:null,validator(v){return v===d||`Expected the literal \`${g}\`, but received: ${s(v)}`}})}function P(d,g){return new h({type:"map",schema:null,*entries(m){if(d&&g&&m instanceof Map)for(let[v,T]of m.entries())yield[v,v,d],yield[v,T,g]},coercer(m){return m instanceof Map?new Map(m):m},validator(m){return m instanceof Map||`Expected a \`Map\` object, but received: ${s(m)}`}})}function Ee(){return _("never",()=>!1)}function it(d){return new h({...d,validator:(g,m)=>g===null||d.validator(g,m),refiner:(g,m)=>g===null||d.refiner(g,m)})}function At(){return _("number",d=>typeof d=="number"&&!isNaN(d)||`Expected a number, but received: ${s(d)}`)}function He(d){let g=d?Object.keys(d):[],m=Ee();return new h({type:"object",schema:d||null,*entries(v){if(d&&i(v)){let T=new Set(Object.keys(v));for(let q of g)T.delete(q),yield[q,v[q],d[q]];for(let q of T)yield[q,v[q],m]}},validator(v){return i(v)||`Expected an object, but received: ${s(v)}`},coercer(v){return i(v)?{...v}:v}})}function Mr(d){return new h({...d,validator:(g,m)=>g===void 0||d.validator(g,m),refiner:(g,m)=>g===void 0||d.refiner(g,m)})}function Qt(d,g){return new h({type:"record",schema:null,*entries(m){if(i(m))for(let v in m){let T=m[v];yield[v,v,d],yield[v,T,g]}},validator(m){return i(m)||`Expected an object, but received: ${s(m)}`}})}function Es(){return _("regexp",d=>d instanceof RegExp)}function Te(d){return new h({type:"set",schema:null,*entries(g){if(d&&g instanceof Set)for(let m of g)yield[m,m,d]},coercer(g){return g instanceof Set?new Set(g):g},validator(g){return g instanceof Set||`Expected a \`Set\` object, but received: ${s(g)}`}})}function kr(){return _("string",d=>typeof d=="string"||`Expected a string, but received: ${s(d)}`)}function Rs(d){let g=Ee();return new h({type:"tuple",schema:null,*entries(m){if(Array.isArray(m)){let v=Math.max(d.length,m.length);for(let T=0;T<v;T++)yield[T,m[T],d[T]||g]}},validator(m){return Array.isArray(m)||`Expected an array, but received: ${s(m)}`}})}function ft(d){let g=Object.keys(d);return new h({type:"type",schema:d,*entries(m){if(i(m))for(let v of g)yield[v,m[v],d[v]]},validator(m){return i(m)||`Expected an object, but received: ${s(m)}`},coercer(m){return i(m)?{...m}:m}})}function Mi(d){let g=d.map(m=>m.type).join(" | ");return new h({type:"union",schema:null,coercer(m){for(let v of d){let[T,q]=v.validate(m,{coerce:!0});if(!T)return q}return m},validator(m,v){let T=[];for(let q of d){let[...z]=u(m,q,v),[Z]=z;if(Z[0])for(let[Q]of z)Q&&T.push(Q);else return[]}return[`Expected the value to satisfy a union of \`${g}\`, but received: ${s(m)}`,...T]}})}function Pt(){return _("unknown",()=>!0)}function ht(d,g,m){return new h({...d,coercer:(v,T)=>y(v,g)?d.coercer(m(v,T),T):d.coercer(v,T)})}function xs(d,g,m={}){return ht(d,Pt(),v=>{let T=typeof g=="function"?g():g;if(v===void 0)return T;if(!m.strict&&n(v)&&n(T)){let q={...v},z=!1;for(let Z in T)q[Z]===void 0&&(q[Z]=T[Z],z=!0);if(z)return q}return v})}function Dt(d){return ht(d,kr(),g=>g.trim())}function ct(d){return qt(d,"empty",g=>{let m=Xt(g);return m===0||`Expected an empty ${d.type} but received one with a size of \`${m}\``})}function Xt(d){return d instanceof Map||d instanceof Set?d.size:d.length}function Ts(d,g,m={}){let{exclusive:v}=m;return qt(d,"max",T=>v?T<g:T<=g||`Expected a ${d.type} less than ${v?"":"or equal to "}${g} but received \`${T}\``)}function ki(d,g,m={}){let{exclusive:v}=m;return qt(d,"min",T=>v?T>g:T>=g||`Expected a ${d.type} greater than ${v?"":"or equal to "}${g} but received \`${T}\``)}function ug(d){return qt(d,"nonempty",g=>Xt(g)>0||`Expected a nonempty ${d.type} but received an empty one`)}function fg(d,g){return qt(d,"pattern",m=>g.test(m)||`Expected a ${d.type} matching \`/${g.source}/\` but received "${m}"`)}function hg(d,g,m=g){let v=`Expected a ${d.type}`,T=g===m?`of \`${g}\``:`between \`${g}\` and \`${m}\``;return qt(d,"size",q=>{if(typeof q=="number"||q instanceof Date)return g<=q&&q<=m||`${v} ${T} but received \`${q}\``;if(q instanceof Map||q instanceof Set){let{size:z}=q;return g<=z&&z<=m||`${v} with a size ${T} but received one with a size of \`${z}\``}else{let{length:z}=q;return g<=z&&z<=m||`${v} with a length ${T} but received one with a length of \`${z}\``}})}function qt(d,g,m){return new h({...d,*refiner(v,T){yield*d.refiner(v,T);let q=m(v,T),z=l(q,T,d,v);for(let Z of z)yield{...Z,refinement:g}}})}t.Struct=h,t.StructError=e,t.any=B,t.array=te,t.assert=p,t.assign=S,t.bigint=J,t.boolean=ye,t.coerce=ht,t.create=c,t.date=be,t.defaulted=xs,t.define=_,t.deprecated=x,t.dynamic=R,t.empty=ct,t.enums=rt,t.func=Ss,t.instance=E,t.integer=M,t.intersection=U,t.is=y,t.lazy=O,t.literal=de,t.map=P,t.mask=f,t.max=Ts,t.min=ki,t.never=Ee,t.nonempty=ug,t.nullable=it,t.number=At,t.object=He,t.omit=A,t.optional=Mr,t.partial=D,t.pattern=fg,t.pick=F,t.record=Qt,t.refine=qt,t.regexp=Es,t.set=Te,t.size=hg,t.string=kr,t.struct=N,t.trimmed=Dt,t.tuple=Rs,t.type=ft,t.union=Mi,t.unknown=Pt,t.validate=b})});var tp=w(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.validateRequirements=void 0;var A_="[",P_="(<=>!~",D_=";",q_="@",C_=new RegExp(`[${A_+P_+D_+q_}]`);function L_(t){return t.split(C_)[0].trim()}function j_(t){return t.forEach(r=>{let i;try{i=new URL(r)}catch{return}if(i.protocol==="emfs:"||i.protocol==="file:")throw new Error(`"emfs:" and "file:" protocols are not allowed for the requirement (${r})`)}),t.filter(r=>L_(r)==="streamlit"?(console.warn(`Streamlit is specified in the requirements ("${r}"), but it will be ignored. A built-in version of Streamlit will be used.`),!1):!0)}Qn.validateRequirements=j_});var rp=w(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.parseRequirementsTxt=void 0;var N_=/\s#.*$/;function F_(t){return t.split(`
|
|
33
|
-
`).filter(e=>!e.startsWith("#")).map(e=>e.replace(N_,"")).map(e=>e.trim()).filter(e=>e!=="")}Xn.parseRequirementsTxt=F_});var ip=w(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.PromiseDelegate=void 0;var Co=class{constructor(){this.promise=new Promise((e,r)=>{this.resolveInternal=e,this.rejectInternal=r})}resolve(e){this.resolveInternal(e)}reject(e){this.rejectInternal(e)}};es.PromiseDelegate=Co});var np=w(ot=>{"use strict";var I_=ot&&ot.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),Lo=ot&&ot.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&I_(e,t,r)};Object.defineProperty(ot,"__esModule",{value:!0});Lo(tp(),ot);Lo(rp(),ot);Lo(ip(),ot)});var up=w((zR,lp)=>{"use strict";lp.exports=ap;function ap(t,e,r){t instanceof RegExp&&(t=sp(t,r)),e instanceof RegExp&&(e=sp(e,r));var i=op(t,e,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+t.length,i[1]),post:r.slice(i[1]+e.length)}}function sp(t,e){var r=e.match(t);return r?r[0]:null}ap.range=op;function op(t,e,r){var i,n,s,a,o,l=r.indexOf(t),u=r.indexOf(e,l+1),h=l;if(l>=0&&u>0){if(t===e)return[l,u];for(i=[],s=r.length;h>=0&&!o;)h==l?(i.push(h),l=r.indexOf(t,h+1)):i.length==1?o=[i.pop(),u]:(n=i.pop(),n<s&&(s=n,a=u),u=r.indexOf(e,h+1)),h=l<u&&l>=0?l:u;i.length&&(o=[s,a])}return o}});var yp=w((HR,mp)=>{var fp=up();mp.exports=B_;var hp="\0SLASH"+Math.random()+"\0",cp="\0OPEN"+Math.random()+"\0",No="\0CLOSE"+Math.random()+"\0",dp="\0COMMA"+Math.random()+"\0",pp="\0PERIOD"+Math.random()+"\0";function jo(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function $_(t){return t.split("\\\\").join(hp).split("\\{").join(cp).split("\\}").join(No).split("\\,").join(dp).split("\\.").join(pp)}function W_(t){return t.split(hp).join("\\").split(cp).join("{").split(No).join("}").split(dp).join(",").split(pp).join(".")}function gp(t){if(!t)return[""];var e=[],r=fp("{","}",t);if(!r)return t.split(",");var i=r.pre,n=r.body,s=r.post,a=i.split(",");a[a.length-1]+="{"+n+"}";var o=gp(s);return s.length&&(a[a.length-1]+=o.shift(),a.push.apply(a,o)),e.push.apply(e,a),e}function B_(t){return t?(t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),hi($_(t),!0).map(W_)):[]}function U_(t){return"{"+t+"}"}function z_(t){return/^-?0\d/.test(t)}function H_(t,e){return t<=e}function G_(t,e){return t>=e}function hi(t,e){var r=[],i=fp("{","}",t);if(!i)return[t];var n=i.pre,s=i.post.length?hi(i.post,!1):[""];if(/\$$/.test(i.pre))for(var a=0;a<s.length;a++){var o=n+"{"+i.body+"}"+s[a];r.push(o)}else{var l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),h=l||u,p=i.body.indexOf(",")>=0;if(!h&&!p)return i.post.match(/,.*\}/)?(t=i.pre+"{"+i.body+No+i.post,hi(t)):[t];var c;if(h)c=i.body.split(/\.\./);else if(c=gp(i.body),c.length===1&&(c=hi(c[0],!1).map(U_),c.length===1))return s.map(function(te){return i.pre+c[0]+te});var f;if(h){var y=jo(c[0]),b=jo(c[1]),S=Math.max(c[0].length,c[1].length),_=c.length==3?Math.abs(jo(c[2])):1,x=H_,R=b<y;R&&(_*=-1,x=G_);var O=c.some(z_);f=[];for(var A=y;x(A,b);A+=_){var D;if(u)D=String.fromCharCode(A),D==="\\"&&(D="");else if(D=String(A),O){var F=S-D.length;if(F>0){var N=new Array(F+1).join("0");A<0?D="-"+N+D.slice(1):D=N+D}}f.push(D)}}else{f=[];for(var B=0;B<c.length;B++)f.push.apply(f,hi(c[B],!1))}for(var B=0;B<f.length;B++)for(var a=0;a<s.length;a++){var o=n+f[B]+s[a];(!e||h||o)&&r.push(o)}}return r}});var sg=pe(require("yargs")),ag=require("yargs/helpers"),ce=pe(require("node:path")),tt=pe(require("node:fs/promises")),tl=pe(require("fs-extra")),rl=pe(require("node-fetch")),il=require("pyodide");var sl=require("pyodide");function Pi(t){return`https://cdn.jsdelivr.net/pyodide/v${sl.version}/full/${t}`}var Yd=pe(require("node-fetch"));var xt=pe(Gd()),I=xt.createLogger({transports:[new xt.transports.Console({format:xt.format.combine(xt.format.splat(),xt.format.cli())})]});function ui(t){process.emitWarning(t,{type:"DeprecationWarning"})}var fi=class t{static _instance;_data=null;constructor(){}static async loadPrebuiltPackageData(){let e=Pi("pyodide-lock.json");return I.info(`Load the Pyodide pyodide-lock.json from ${e}`),(await(await(0,Yd.default)(e,void 0)).json()).packages}static async getInstance(){return this._instance==null&&(this._instance=new t,this._instance._data=await this.loadPrebuiltPackageData()),this._instance}getPackageInfoByName(e){if(this._data==null)throw new Error("The package data is not loaded yet.");let r=Object.values(this._data).find(i=>i.name===e);if(r==null)throw new Error(`Package ${e} is not found in the lock file.`);return r}};var Jd=pe(require("node:fs/promises")),Zd=pe(Zn());var X=pe(Zn()),Kd=X.object({entrypoint:X.string(),embed:X.defaulted(X.boolean(),!1),idbfsMountpoints:X.optional(X.array(X.string())),nodeJsWorker:X.defaulted(X.boolean(),!1),nodefsMountpoints:X.optional(X.record(X.string(),X.string()))});function T_(t){let e=Zd.mask(t??{},Kd);if(e.nodeJsWorker){if(e.idbfsMountpoints!=null)throw new Error("The `idbfsMountpoints` field is not allowed when `nodeJsWorker` is true.")}else if(e.nodefsMountpoints!=null)throw new Error("The `nodefsMountpoints` field is not allowed when `nodeJsWorker` is false.");return e}async function Qd(t){let e=T_({...t.packageJsonStliteDesktopField,...t.fallbacks});I.info("App manifest: %j",e);let r=JSON.stringify(e,null,2);I.info(`Dump the manifest file -> ${t.manifestFilePath}`),await Jd.default.writeFile(t.manifestFilePath,r,{encoding:"utf-8"})}var Xd=pe(require("node:path")),fe=pe(Zn());async function ep(t){let{files:e,entrypoint:r}=O_(t),i=await M_(t),n=await k_(t);return{files:e,entrypoint:r,dependencies:i,requirementsTxtFilePaths:n}}function O_(t){let{packageJsonStliteDesktopField:e,fallbacks:{appHomeDirSource:r}}=t,i=e?.files,n=e?.entrypoint;if(i==null||n==null){ui("Missing `stlite.desktop.files` and `stlite.desktop.entrypoint` in `package.json`. Falling back to the `appHomeDirSource` argument to determine the app directory. Please update your `package.json` as this fallback is deprecated and will be removed in a future release.");let s=r;if(typeof s!="string")throw new Error("The `appHomeDirSource` argument is required when `stlite.desktop.files` and `stlite.desktop.entrypoint` are not found in the package.json. Note that `appHomeDirSource` is deprecated and will be removed in the future, so please specify `stlite.desktop.files` and `stlite.desktop.entrypoint` in the package.json.");i=[s],n=`./${s}/streamlit_app.py`}else r!=null&&ui("The `appHomeDirSource` argument is deprecated and has been ignored because `stlite.desktop.files` is specified in `package.json`.");return fe.assert(n,fe.string(),"The `stlite.desktop.entrypoint` field must be a string."),fe.assert(i,fe.array(fe.string()),"The `stlite.desktop.files` field must be an array of strings."),{files:i,entrypoint:n}}async function M_(t){let{packageJsonStliteDesktopField:e,fallbacks:{packages:r}}=t,i=e?.dependencies;fe.assert(i,fe.optional(fe.array(fe.string())),"The `stlite.desktop.dependencies` field must be an array of strings.");let n=[];return r!=null&&(ui("The `packages` argument is deprecated and will be removed in a future release. Use `stlite.desktop.dependencies` in your `package.json` instead."),n=r),[...i??[],...n]}async function k_(t){let{pathResolutionRoot:e,packageJsonStliteDesktopField:r,fallbacks:{requirementsTxtFilePaths:i}}=t,n=r?.requirementsTxtFiles;fe.assert(n,fe.optional(fe.array(fe.string())),"The `stlite.desktop.requirementsTxtFiles` field must be an array of strings.");let s=n?.map(o=>Xd.default.resolve(e,o)),a=[];return i!=null&&i.length>0&&(ui("The `requirement` argument is deprecated and will be removed in a future release. Use `stlite.desktop.requirementsTxtFiles` in your `package.json` instead."),a=i),[...s??[],...a]}var _s=pe(np());var xp=pe(yp(),1);var ci=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")};var Y_={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},di=t=>t.replace(/[[\]\\-]/g,"\\$&"),V_=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),bp=t=>t.join(""),wp=(t,e)=>{let r=e;if(t.charAt(r)!=="[")throw new Error("not in a brace expression");let i=[],n=[],s=r+1,a=!1,o=!1,l=!1,u=!1,h=r,p="";e:for(;s<t.length;){let b=t.charAt(s);if((b==="!"||b==="^")&&s===r+1){u=!0,s++;continue}if(b==="]"&&a&&!l){h=s+1;break}if(a=!0,b==="\\"&&!l){l=!0,s++;continue}if(b==="["&&!l){for(let[S,[_,x,R]]of Object.entries(Y_))if(t.startsWith(S,s)){if(p)return["$.",!1,t.length-r,!0];s+=S.length,R?n.push(_):i.push(_),o=o||x;continue e}}if(l=!1,p){b>p?i.push(di(p)+"-"+di(b)):b===p&&i.push(di(b)),p="",s++;continue}if(t.startsWith("-]",s+1)){i.push(di(b+"-")),s+=2;continue}if(t.startsWith("-",s+1)){p=b,s+=2;continue}i.push(di(b)),s++}if(h<s)return["",!1,0,!1];if(!i.length&&!n.length)return["$.",!1,t.length-r,!0];if(n.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!u){let b=i[0].length===2?i[0].slice(-1):i[0];return[V_(b),!1,h-r,!1]}let c="["+(u?"^":"")+bp(i)+"]",f="["+(u?"":"^")+bp(n)+"]";return[i.length&&n.length?"("+c+"|"+f+")":i.length?c:f,o,h-r,!0]};var We=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var K_=new Set(["!","?","+","*","@"]),vp=t=>K_.has(t),J_="(?!(?:^|/)\\.\\.?(?:$|/))",ts="(?!\\.)",Z_=new Set(["[","."]),Q_=new Set(["..","."]),X_=new Set("().*{}+?[]^$\\!"),eS=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Fo="[^/]",_p=Fo+"*?",Sp=Fo+"+?",br=class t{type;#e;#r;#s=!1;#i=[];#o;#u;#h;#l=!1;#a;#t;#g=!1;constructor(e,r,i={}){this.type=e,e&&(this.#r=!0),this.#o=r,this.#e=this.#o?this.#o.#e:this,this.#a=this.#e===this?i:this.#e.#a,this.#h=this.#e===this?[]:this.#e.#h,e==="!"&&!this.#e.#l&&this.#h.push(this),this.#u=this.#o?this.#o.#i.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let e of this.#i)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#t!==void 0?this.#t:this.type?this.#t=this.type+"("+this.#i.map(e=>String(e)).join("|")+")":this.#t=this.#i.map(e=>String(e)).join("")}#y(){if(this!==this.#e)throw new Error("should only call on root");if(this.#l)return this;this.toString(),this.#l=!0;let e;for(;e=this.#h.pop();){if(e.type!=="!")continue;let r=e,i=r.#o;for(;i;){for(let n=r.#u+1;!i.type&&n<i.#i.length;n++)for(let s of e.#i){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(i.#i[n])}r=i,i=r.#o}}return this}push(...e){for(let r of e)if(r!==""){if(typeof r!="string"&&!(r instanceof t&&r.#o===this))throw new Error("invalid part: "+r);this.#i.push(r)}}toJSON(){let e=this.type===null?this.#i.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#i.map(r=>r.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#l&&this.#o?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#o?.isStart())return!1;if(this.#u===0)return!0;let e=this.#o;for(let r=0;r<this.#u;r++){let i=e.#i[r];if(!(i instanceof t&&i.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#o?.type==="!")return!0;if(!this.#o?.isEnd())return!1;if(!this.type)return this.#o?.isEnd();let e=this.#o?this.#o.#i.length:0;return this.#u===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let r=new t(this.type,e);for(let i of this.#i)r.copyIn(i);return r}static#d(e,r,i,n){let s=!1,a=!1,o=-1,l=!1;if(r.type===null){let f=i,y="";for(;f<e.length;){let b=e.charAt(f++);if(s||b==="\\"){s=!s,y+=b;continue}if(a){f===o+1?(b==="^"||b==="!")&&(l=!0):b==="]"&&!(f===o+2&&l)&&(a=!1),y+=b;continue}else if(b==="["){a=!0,o=f,l=!1,y+=b;continue}if(!n.noext&&vp(b)&&e.charAt(f)==="("){r.push(y),y="";let S=new t(b,r);f=t.#d(e,S,f,n),r.push(S);continue}y+=b}return r.push(y),f}let u=i+1,h=new t(null,r),p=[],c="";for(;u<e.length;){let f=e.charAt(u++);if(s||f==="\\"){s=!s,c+=f;continue}if(a){u===o+1?(f==="^"||f==="!")&&(l=!0):f==="]"&&!(u===o+2&&l)&&(a=!1),c+=f;continue}else if(f==="["){a=!0,o=u,l=!1,c+=f;continue}if(vp(f)&&e.charAt(u)==="("){h.push(c),c="";let y=new t(f,h);h.push(y),u=t.#d(e,y,u,n);continue}if(f==="|"){h.push(c),c="",p.push(h),h=new t(null,r);continue}if(f===")")return c===""&&r.#i.length===0&&(r.#g=!0),h.push(c),c="",r.push(...p,h),u;c+=f}return r.type=null,r.#r=void 0,r.#i=[e.substring(i-1)],u}static fromGlob(e,r={}){let i=new t(null,void 0,r);return t.#d(e,i,0,r),i}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[r,i,n,s]=this.toRegExpSource();if(!(n||this.#r||this.#a.nocase&&!this.#a.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return i;let o=(this.#a.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${r}$`,o),{_src:r,_glob:e})}toRegExpSource(e){let r=e??!!this.#a.dot;if(this.#e===this&&this.#y(),!this.type){let l=this.isStart()&&this.isEnd(),u=this.#i.map(f=>{let[y,b,S,_]=typeof f=="string"?t.#v(f,this.#r,l):f.toRegExpSource(e);return this.#r=this.#r||S,this.#s=this.#s||_,y}).join(""),h="";if(this.isStart()&&typeof this.#i[0]=="string"&&!(this.#i.length===1&&Q_.has(this.#i[0]))){let y=Z_,b=r&&y.has(u.charAt(0))||u.startsWith("\\.")&&y.has(u.charAt(2))||u.startsWith("\\.\\.")&&y.has(u.charAt(4)),S=!r&&!e&&y.has(u.charAt(0));h=b?J_:S?ts:""}let p="";return this.isEnd()&&this.#e.#l&&this.#o?.type==="!"&&(p="(?:$|\\/)"),[h+u+p,We(u),this.#r=!!this.#r,this.#s]}let i=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#c(r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let l=this.toString();return this.#i=[l],this.type=null,this.#r=void 0,[l,We(this.toString()),!1,!1]}let a=!i||e||r||!ts?"":this.#c(!0);a===s&&(a=""),a&&(s=`(?:${s})(?:${a})*?`);let o="";if(this.type==="!"&&this.#g)o=(this.isStart()&&!r?ts:"")+Sp;else{let l=this.type==="!"?"))"+(this.isStart()&&!r&&!e?ts:"")+_p+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;o=n+s+l}return[o,We(s),this.#r=!!this.#r,this.#s]}#c(e){return this.#i.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[i,n,s,a]=r.toRegExpSource(e);return this.#s=this.#s||a,i}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#v(e,r,i=!1){let n=!1,s="",a=!1;for(let o=0;o<e.length;o++){let l=e.charAt(o);if(n){n=!1,s+=(X_.has(l)?"\\":"")+l;continue}if(l==="\\"){o===e.length-1?s+="\\\\":n=!0;continue}if(l==="["){let[u,h,p,c]=wp(e,o);if(p){s+=u,a=a||h,o+=p-1,r=r||c;continue}}if(l==="*"){i&&e==="*"?s+=Sp:s+=_p,r=!0;continue}if(l==="?"){s+=Fo,r=!0;continue}s+=eS(l)}return[s,We(e),!!r,a]}};var wr=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");var _e=(t,e,r={})=>(ci(e),!r.nocomment&&e.charAt(0)==="#"?!1:new ke(e,r).match(t)),tS=/^\*+([^+@!?\*\[\(]*)$/,rS=t=>e=>!e.startsWith(".")&&e.endsWith(t),iS=t=>e=>e.endsWith(t),nS=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),sS=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),aS=/^\*+\.\*+$/,oS=t=>!t.startsWith(".")&&t.includes("."),lS=t=>t!=="."&&t!==".."&&t.includes("."),uS=/^\.\*+$/,fS=t=>t!=="."&&t!==".."&&t.startsWith("."),hS=/^\*+$/,cS=t=>t.length!==0&&!t.startsWith("."),dS=t=>t.length!==0&&t!=="."&&t!=="..",pS=/^\?+([^+@!?\*\[\(]*)?$/,gS=([t,e=""])=>{let r=Tp([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},mS=([t,e=""])=>{let r=Op([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},yS=([t,e=""])=>{let r=Op([t]);return e?i=>r(i)&&i.endsWith(e):r},bS=([t,e=""])=>{let r=Tp([t]);return e?i=>r(i)&&i.endsWith(e):r},Tp=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},Op=([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},Mp=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Ep={win32:{sep:"\\"},posix:{sep:"/"}},wS=Mp==="win32"?Ep.win32.sep:Ep.posix.sep;_e.sep=wS;var he=Symbol("globstar **");_e.GLOBSTAR=he;var vS="[^/]",_S=vS+"*?",SS="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",ES="(?:(?!(?:\\/|^)\\.).)*?",RS=(t,e={})=>r=>_e(r,t,e);_e.filter=RS;var Le=(t,e={})=>Object.assign({},t,e),xS=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return _e;let e=_e;return Object.assign((i,n,s={})=>e(i,n,Le(t,s)),{Minimatch:class extends e.Minimatch{constructor(n,s={}){super(n,Le(t,s))}static defaults(n){return e.defaults(Le(t,n)).Minimatch}},AST:class extends e.AST{constructor(n,s,a={}){super(n,s,Le(t,a))}static fromGlob(n,s={}){return e.AST.fromGlob(n,Le(t,s))}},unescape:(i,n={})=>e.unescape(i,Le(t,n)),escape:(i,n={})=>e.escape(i,Le(t,n)),filter:(i,n={})=>e.filter(i,Le(t,n)),defaults:i=>e.defaults(Le(t,i)),makeRe:(i,n={})=>e.makeRe(i,Le(t,n)),braceExpand:(i,n={})=>e.braceExpand(i,Le(t,n)),match:(i,n,s={})=>e.match(i,n,Le(t,s)),sep:e.sep,GLOBSTAR:he})};_e.defaults=xS;var kp=(t,e={})=>(ci(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,xp.default)(t));_e.braceExpand=kp;var TS=(t,e={})=>new ke(t,e).makeRe();_e.makeRe=TS;var OS=(t,e,r={})=>{let i=new ke(e,r);return t=t.filter(n=>i.match(n)),i.options.nonull&&!t.length&&t.push(e),t};_e.match=OS;var Rp=/[?*]|[+@!]\(.*?\)|\[|\]/,MS=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ke=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,r={}){ci(e),r=r||{},this.options=r,this.pattern=e,this.platform=r.platform||Mp,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let r of e)if(typeof r!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((s,a,o)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=s[0]===""&&s[1]===""&&(s[2]==="?"||!Rp.test(s[2]))&&!Rp.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map(h=>this.parse(h))];if(u)return[s[0],...s.slice(1).map(h=>this.parse(h))]}return s.map(l=>this.parse(l))});if(this.debug(this.pattern,n),this.set=n.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let a=this.set[s];a[0]===""&&a[1]===""&&this.globParts[s][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let i=0;i<e.length;i++)for(let n=0;n<e[i].length;n++)e[i][n]==="**"&&(e[i][n]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):r>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(r=>{let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let n=i;for(;r[n+1]==="**";)n++;n!==i&&r.splice(i,n-i)}return r})}levelOneOptimize(e){return e.map(r=>(r=r.reduce((i,n)=>{let s=i[i.length-1];return n==="**"&&s==="**"?i:n===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(i.pop(),i):(i.push(n),i)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let s=e[n];n===1&&s===""&&e[0]===""||(s==="."||s==="")&&(r=!0,e.splice(n,1),n--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(r=!0,e.pop())}let i=0;for(;(i=e.indexOf("..",i+1))!==-1;){let n=e[i-1];n&&n!=="."&&n!==".."&&n!=="**"&&(r=!0,e.splice(i-1,2),i-=2)}}while(r);return e.length===0?[""]:e}firstPhasePreProcess(e){let r=!1;do{r=!1;for(let i of e){let n=-1;for(;(n=i.indexOf("**",n+1))!==-1;){let a=n;for(;i[a+1]==="**";)a++;a>n&&i.splice(n+1,a-n);let o=i[n+1],l=i[n+2],u=i[n+3];if(o!==".."||!l||l==="."||l===".."||!u||u==="."||u==="..")continue;r=!0,i.splice(n,1);let h=i.slice(0);h[n]="**",e.push(h),n--}if(!this.preserveMultipleSlashes){for(let a=1;a<i.length-1;a++){let o=i[a];a===1&&o===""&&i[0]===""||(o==="."||o==="")&&(r=!0,i.splice(a,1),a--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(r=!0,i.pop())}let s=0;for(;(s=i.indexOf("..",s+1))!==-1;){let a=i[s-1];if(a&&a!=="."&&a!==".."&&a!=="**"){r=!0;let l=s===1&&i[s+1]==="**"?["."]:[];i.splice(s-1,2,...l),i.length===0&&i.push(""),s-=2}}}}while(r);return e}secondPhasePreProcess(e){for(let r=0;r<e.length-1;r++)for(let i=r+1;i<e.length;i++){let n=this.partsMatch(e[r],e[i],!this.preserveMultipleSlashes);n&&(e[r]=n,e[i]=[])}return e.filter(r=>r.length)}partsMatch(e,r,i=!1){let n=0,s=0,a=[],o="";for(;n<e.length&&s<r.length;)if(e[n]===r[s])a.push(o==="b"?r[s]:e[n]),n++,s++;else if(i&&e[n]==="**"&&r[s]===e[n+1])a.push(e[n]),n++;else if(i&&r[s]==="**"&&e[n]===r[s+1])a.push(r[s]),s++;else if(e[n]==="*"&&r[s]&&(this.options.dot||!r[s].startsWith("."))&&r[s]!=="**"){if(o==="b")return!1;o="a",a.push(e[n]),n++,s++}else if(r[s]==="*"&&e[n]&&(this.options.dot||!e[n].startsWith("."))&&e[n]!=="**"){if(o==="a")return!1;o="b",a.push(r[s]),n++,s++}else return!1;return e.length===r.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,r=!1,i=0;for(let n=0;n<e.length&&e.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=e.slice(i)),this.negate=r}matchOne(e,r,i=!1){let n=this.options;if(this.isWindows){let b=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),S=!b&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),_=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),x=!_&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),R=S?3:b?0:void 0,O=x?3:_?0:void 0;if(typeof R=="number"&&typeof O=="number"){let[A,D]=[e[R],r[O]];A.toLowerCase()===D.toLowerCase()&&(r[O]=A,O>R?r=r.slice(O):R>O&&(e=e.slice(R)))}}let{optimizationLevel:s=1}=this.options;s>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:r}),this.debug("matchOne",e.length,r.length);for(var a=0,o=0,l=e.length,u=r.length;a<l&&o<u;a++,o++){this.debug("matchOne loop");var h=r[o],p=e[a];if(this.debug(r,h,p),h===!1)return!1;if(h===he){this.debug("GLOBSTAR",[r,h,p]);var c=a,f=o+1;if(f===u){for(this.debug("** at the end");a<l;a++)if(e[a]==="."||e[a]===".."||!n.dot&&e[a].charAt(0)===".")return!1;return!0}for(;c<l;){var y=e[c];if(this.debug(`
|
|
25
|
+
${_}`),y.pop(),`{${A}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function h(c,f,y){switch(typeof f){case"string":return dt(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(c),typeof f!="object")return h(c,f,y);if(f===null)return"null"}if(y.indexOf(f)!==-1)return r;let b="";if(Array.isArray(f)){if(f.length===0)return"[]";if(s<y.length+1)return'"[Array]"';y.push(f);let O=Math.min(f.length,a),A=0;for(;A<O-1;A++){let F=h(String(A),f[A],y);b+=F!==void 0?F:"null",b+=","}let D=h(String(A),f[A],y);if(b+=D!==void 0?D:"null",f.length-1>a){let F=f.length-a-1;b+=`,"... ${Lt(F)} not stringified"`}return y.pop(),`[${b}]`}let S=Object.keys(f),_=S.length;if(_===0)return"{}";if(s<y.length+1)return'"[Object]"';let x="",R=Math.min(_,a);Bs(f)&&(b+=Kl(f,",",a),S=S.slice(f.length),R-=f.length,x=","),n&&(S=Ws(S)),y.push(f);for(let O=0;O<R;O++){let A=S[O],D=h(A,f[A],y);D!==void 0&&(b+=`${x}${dt(A)}:${D}`,x=",")}if(_>a){let O=_-a;b+=`${x}"...":"${Lt(O)} not stringified"`}return y.pop(),`{${b}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function p(c,f,y){if(arguments.length>1){let b="";if(typeof y=="number"?b=" ".repeat(Math.min(y,10)):typeof y=="string"&&(b=y.slice(0,10)),f!=null){if(typeof f=="function")return o("",{"":c},[],f,b,"");if(Array.isArray(f))return l("",c,[],Ug(f),b,"")}if(b.length!==0)return u("",c,[],b,"")}return h("",c,[])}return p}});var Hs=w((LE,Xl)=>{"use strict";var Hg=Re(),{MESSAGE:Gg}=re(),Yg=Pr();function Vg(t,e){return typeof e=="bigint"?e.toString():e}Xl.exports=Hg((t,e)=>{let r=Yg.configure(e);return t[Gg]=r(t,e.replacer||Vg,e.space),t})});var tu=w((jE,eu)=>{"use strict";var Kg=Re();eu.exports=Kg((t,e)=>e.message?(t.message=`[${e.label}] ${t.message}`,t):(t.label=e.label,t))});var iu=w((NE,ru)=>{"use strict";var Jg=Re(),{MESSAGE:Zg}=re(),Qg=Pr();ru.exports=Jg(t=>{let e={};return t.message&&(e["@message"]=t.message,delete t.message),t.timestamp&&(e["@timestamp"]=t.timestamp,delete t.timestamp),e["@fields"]=t,t[Zg]=Qg(e),t})});var su=w((FE,nu)=>{"use strict";var Xg=Re();function em(t,e,r){let i=e.reduce((s,a)=>(s[a]=t[a],delete t[a],s),{}),n=Object.keys(t).reduce((s,a)=>(s[a]=t[a],delete t[a],s),{});return Object.assign(t,i,{[r]:n}),t}function tm(t,e,r){return t[r]=e.reduce((i,n)=>(i[n]=t[n],delete t[n],i),{}),t}nu.exports=Xg((t,e={})=>{let r="metadata";e.key&&(r=e.key);let i=[];return!e.fillExcept&&!e.fillWith&&(i.push("level"),i.push("message")),e.fillExcept&&(i=e.fillExcept),i.length>0?em(t,i,r):e.fillWith?tm(t,e.fillWith,r):t})});var ou=w((IE,au)=>{var tr=1e3,rr=tr*60,ir=rr*60,Nt=ir*24,rm=Nt*7,im=Nt*365.25;au.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return nm(t);if(r==="number"&&isFinite(t))return e.long?am(t):sm(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function nm(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return r*im;case"weeks":case"week":case"w":return r*rm;case"days":case"day":case"d":return r*Nt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ir;case"minutes":case"minute":case"mins":case"min":case"m":return r*rr;case"seconds":case"second":case"secs":case"sec":case"s":return r*tr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function sm(t){var e=Math.abs(t);return e>=Nt?Math.round(t/Nt)+"d":e>=ir?Math.round(t/ir)+"h":e>=rr?Math.round(t/rr)+"m":e>=tr?Math.round(t/tr)+"s":t+"ms"}function am(t){var e=Math.abs(t);return e>=Nt?$i(t,e,Nt,"day"):e>=ir?$i(t,e,ir,"hour"):e>=rr?$i(t,e,rr,"minute"):e>=tr?$i(t,e,tr,"second"):t+" ms"}function $i(t,e,r,i){var n=e>=r*1.5;return Math.round(t/r)+" "+i+(n?"s":"")}});var uu=w((Dr,lu)=>{"use strict";var om=Re(),lm=ou();lu.exports=om(t=>{let e=+new Date;return Dr.diff=e-(Dr.prevTime||e),Dr.prevTime=e,t.ms=`+${lm(Dr.diff)}`,t})});var cu=w(($E,hu)=>{"use strict";var um=require("util").inspect,fm=Re(),{LEVEL:hm,MESSAGE:fu,SPLAT:cm}=re();hu.exports=fm((t,e={})=>{let r=Object.assign({},t);return delete r[hm],delete r[fu],delete r[cm],t[fu]=um(r,!1,e.depth||null,e.colorize),t})});var du=w((WE,Bi)=>{"use strict";var{MESSAGE:dm}=re(),Wi=class{constructor(e){this.template=e}transform(e){return e[dm]=this.template(e),e}};Bi.exports=t=>new Wi(t);Bi.exports.Printf=Bi.exports.Format=Wi});var mu=w((BE,gu)=>{"use strict";var pm=Re(),{MESSAGE:pu}=re(),gm=Pr();gu.exports=pm(t=>{let e=gm(Object.assign({},t,{level:void 0,message:void 0,splat:void 0})),r=t.padding&&t.padding[t.level]||"";return e!=="{}"?t[pu]=`${t.level}:${r} ${t.message} ${e}`:t[pu]=`${t.level}:${r} ${t.message}`,t})});var wu=w((UE,bu)=>{"use strict";var mm=require("util"),{SPLAT:yu}=re(),ym=/%[scdjifoO%]/g,bm=/%%/g,Gs=class{constructor(e){this.options=e}_splat(e,r){let i=e.message,n=e[yu]||e.splat||[],s=i.match(bm),a=s&&s.length||0,l=r.length-a-n.length,u=l<0?n.splice(l,-1*l):[],h=u.length;if(h)for(let p=0;p<h;p++)Object.assign(e,u[p]);return e.message=mm.format(i,...n),e}transform(e){let r=e.message,i=e[yu]||e.splat;if(!i||!i.length)return e;let n=r&&r.match&&r.match(ym);if(!n&&(i||i.length)){let s=i.length>1?i.splice(0):i,a=s.length;if(a)for(let o=0;o<a;o++)Object.assign(e,s[o]);return e}return n?this._splat(e,n):e}};bu.exports=t=>new Gs(t)});var _u=w((Ui,vu)=>{(function(t,e){typeof Ui=="object"&&typeof vu<"u"?e(Ui):typeof define=="function"&&define.amd?define(["exports"],e):e(t.fecha={})})(Ui,function(t){"use strict";var e=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,r="\\d\\d?",i="\\d\\d",n="\\d{3}",s="\\d{4}",a="[^\\s]+",o=/\[([^]*?)\]/gm;function l(E,M){for(var U=[],de=0,P=E.length;de<P;de++)U.push(E[de].substr(0,M));return U}var u=function(E){return function(M,U){var de=U[E].map(function(Se){return Se.toLowerCase()}),P=de.indexOf(M.toLowerCase());return P>-1?P:null}};function h(E){for(var M=[],U=1;U<arguments.length;U++)M[U-1]=arguments[U];for(var de=0,P=M;de<P.length;de++){var Se=P[de];for(var it in Se)E[it]=Se[it]}return E}var p=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["January","February","March","April","May","June","July","August","September","October","November","December"],f=l(c,3),y=l(p,3),b={dayNamesShort:y,dayNames:p,monthNamesShort:f,monthNames:c,amPm:["am","pm"],DoFn:function(E){return E+["th","st","nd","rd"][E%10>3?0:(E-E%10!==10?1:0)*E%10]}},S=h({},b),_=function(E){return S=h(S,E)},x=function(E){return E.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},R=function(E,M){for(M===void 0&&(M=2),E=String(E);E.length<M;)E="0"+E;return E},O={D:function(E){return String(E.getDate())},DD:function(E){return R(E.getDate())},Do:function(E,M){return M.DoFn(E.getDate())},d:function(E){return String(E.getDay())},dd:function(E){return R(E.getDay())},ddd:function(E,M){return M.dayNamesShort[E.getDay()]},dddd:function(E,M){return M.dayNames[E.getDay()]},M:function(E){return String(E.getMonth()+1)},MM:function(E){return R(E.getMonth()+1)},MMM:function(E,M){return M.monthNamesShort[E.getMonth()]},MMMM:function(E,M){return M.monthNames[E.getMonth()]},YY:function(E){return R(String(E.getFullYear()),4).substr(2)},YYYY:function(E){return R(E.getFullYear(),4)},h:function(E){return String(E.getHours()%12||12)},hh:function(E){return R(E.getHours()%12||12)},H:function(E){return String(E.getHours())},HH:function(E){return R(E.getHours())},m:function(E){return String(E.getMinutes())},mm:function(E){return R(E.getMinutes())},s:function(E){return String(E.getSeconds())},ss:function(E){return R(E.getSeconds())},S:function(E){return String(Math.round(E.getMilliseconds()/100))},SS:function(E){return R(Math.round(E.getMilliseconds()/10),2)},SSS:function(E){return R(E.getMilliseconds(),3)},a:function(E,M){return E.getHours()<12?M.amPm[0]:M.amPm[1]},A:function(E,M){return E.getHours()<12?M.amPm[0].toUpperCase():M.amPm[1].toUpperCase()},ZZ:function(E){var M=E.getTimezoneOffset();return(M>0?"-":"+")+R(Math.floor(Math.abs(M)/60)*100+Math.abs(M)%60,4)},Z:function(E){var M=E.getTimezoneOffset();return(M>0?"-":"+")+R(Math.floor(Math.abs(M)/60),2)+":"+R(Math.abs(M)%60,2)}},A=function(E){return+E-1},D=[null,r],F=[null,a],N=["isPm",a,function(E,M){var U=E.toLowerCase();return U===M.amPm[0]?0:U===M.amPm[1]?1:null}],B=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(E){var M=(E+"").match(/([+-]|\d\d)/gi);if(M){var U=+M[1]*60+parseInt(M[2],10);return M[0]==="+"?U:-U}return 0}],te={D:["day",r],DD:["day",i],Do:["day",r+a,function(E){return parseInt(E,10)}],M:["month",r,A],MM:["month",i,A],YY:["year",i,function(E){var M=new Date,U=+(""+M.getFullYear()).substr(0,2);return+(""+(+E>68?U-1:U)+E)}],h:["hour",r,void 0,"isPm"],hh:["hour",i,void 0,"isPm"],H:["hour",r],HH:["hour",i],m:["minute",r],mm:["minute",i],s:["second",r],ss:["second",i],YYYY:["year",s],S:["millisecond","\\d",function(E){return+E*100}],SS:["millisecond",i,function(E){return+E*10}],SSS:["millisecond",n],d:D,dd:D,ddd:F,dddd:F,MMM:["month",a,u("monthNamesShort")],MMMM:["month",a,u("monthNames")],a:N,A:N,ZZ:B,Z:B},J={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},me=function(E){return h(J,E)},ye=function(E,M,U){if(M===void 0&&(M=J.default),U===void 0&&(U={}),typeof E=="number"&&(E=new Date(E)),Object.prototype.toString.call(E)!=="[object Date]"||isNaN(E.getTime()))throw new Error("Invalid Date pass to format");M=J[M]||M;var de=[];M=M.replace(o,function(Se,it){return de.push(it),"@@@"});var P=h(h({},S),U);return M=M.replace(e,function(Se){return O[Se](E,P)}),M.replace(/@@@/g,function(){return de.shift()})};function rt(E,M,U){if(U===void 0&&(U={}),typeof M!="string")throw new Error("Invalid format in fecha parse");if(M=J[M]||M,E.length>1e3)return null;var de=new Date,P={year:de.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},Se=[],it=[],At=M.replace(o,function(Dt,ct){return it.push(x(ct)),"@@@"}),He={},Mr={};At=x(At).replace(e,function(Dt){var ct=te[Dt],Xt=ct[0],Ts=ct[1],ki=ct[3];if(He[Xt])throw new Error("Invalid format. "+Xt+" specified twice in format");return He[Xt]=!0,ki&&(Mr[ki]=!0),Se.push(ct),"("+Ts+")"}),Object.keys(Mr).forEach(function(Dt){if(!He[Dt])throw new Error("Invalid format. "+Dt+" is required in specified format")}),At=At.replace(/@@@/g,function(){return it.shift()});var Qt=E.match(new RegExp(At,"i"));if(!Qt)return null;for(var Es=h(h({},S),U),Te=1;Te<Qt.length;Te++){var kr=Se[Te-1],Rs=kr[0],ft=kr[2],Mi=ft?ft(Qt[Te],Es):+Qt[Te];if(Mi==null)return null;P[Rs]=Mi}P.isPm===1&&P.hour!=null&&+P.hour!=12?P.hour=+P.hour+12:P.isPm===0&&+P.hour==12&&(P.hour=0);var Pt;if(P.timezoneOffset==null){Pt=new Date(P.year,P.month,P.day,P.hour,P.minute,P.second,P.millisecond);for(var ht=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],Te=0,xs=ht.length;Te<xs;Te++)if(He[ht[Te][0]]&&P[ht[Te][0]]!==Pt[ht[Te][1]]())return null}else if(Pt=new Date(Date.UTC(P.year,P.month,P.day,P.hour,P.minute-P.timezoneOffset,P.second,P.millisecond)),P.month>11||P.month<0||P.day>31||P.day<1||P.hour>23||P.hour<0||P.minute>59||P.minute<0||P.second>59||P.second<0)return null;return Pt}var Ss={format:ye,parse:rt,defaultI18n:b,setGlobalDateI18n:_,setGlobalDateMasks:me};t.assign=h,t.default=Ss,t.format=ye,t.parse=rt,t.defaultI18n=b,t.setGlobalDateI18n=_,t.setGlobalDateMasks=me,Object.defineProperty(t,"__esModule",{value:!0})})});var Eu=w((zE,Su)=>{"use strict";var wm=_u(),vm=Re();Su.exports=vm((t,e={})=>(e.format&&(t.timestamp=typeof e.format=="function"?e.format():wm.format(new Date,e.format)),t.timestamp||(t.timestamp=new Date().toISOString()),e.alias&&(t[e.alias]=t.timestamp),t))});var xu=w((HE,Ru)=>{"use strict";var Ys=ks(),_m=Re(),{MESSAGE:Vs}=re();Ru.exports=_m((t,e)=>(e.level!==!1&&(t.level=Ys.strip(t.level)),e.message!==!1&&(t.message=Ys.strip(String(t.message))),e.raw!==!1&&t[Vs]&&(t[Vs]=Ys.strip(String(t[Vs]))),t))});var Js=w(Ks=>{"use strict";var Sm=Ks.format=Re();Ks.levels=Il();function le(t,e){Object.defineProperty(Sm,t,{get(){return e()},configurable:!0})}le("align",function(){return Wl()});le("errors",function(){return zl()});le("cli",function(){return Gl()});le("combine",function(){return Vl()});le("colorize",function(){return Li()});le("json",function(){return Hs()});le("label",function(){return tu()});le("logstash",function(){return iu()});le("metadata",function(){return su()});le("ms",function(){return uu()});le("padLevels",function(){return Fs()});le("prettyPrint",function(){return cu()});le("printf",function(){return du()});le("simple",function(){return mu()});le("splat",function(){return wu()});le("timestamp",function(){return Eu()});le("uncolorize",function(){return xu()})});var Zs=w(zi=>{"use strict";var{format:Tu}=require("util");zi.warn={deprecated(t){return()=>{throw new Error(Tu("{ %s } was removed in winston@3.0.0.",t))}},useFormat(t){return()=>{throw new Error([Tu("{ %s } was removed in winston@3.0.0.",t),"Use a custom winston.format = winston.format(function) instead."].join(`
|
|
26
|
+
`))}},forFunctions(t,e,r){r.forEach(i=>{t[i]=zi.warn[e](i)})},forProperties(t,e,r){r.forEach(i=>{let n=zi.warn[e](i);Object.defineProperty(t,i,{get:n,set:n})})}}});var Ou=w((VE,Em)=>{Em.exports={name:"winston",description:"A logger for just about everything.",version:"3.13.0",author:"Charlie Robbins <charlie.robbins@gmail.com>",maintainers:["David Hyde <dabh@alumni.stanford.edu>"],repository:{type:"git",url:"https://github.com/winstonjs/winston.git"},keywords:["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],dependencies:{"@dabh/diagnostics":"^2.0.2","@colors/colors":"^1.6.0",async:"^3.2.3","is-stream":"^2.0.0",logform:"^2.4.0","one-time":"^1.0.0","readable-stream":"^3.4.0","safe-stable-stringify":"^2.3.1","stack-trace":"0.0.x","triple-beam":"^1.3.0","winston-transport":"^4.7.0"},devDependencies:{"@babel/cli":"^7.23.9","@babel/core":"^7.24.0","@babel/preset-env":"^7.24.0","@dabh/eslint-config-populist":"^5.0.0","@types/node":"^20.11.24","abstract-winston-transport":"^0.5.1",assume:"^2.2.0","cross-spawn-async":"^2.2.5",eslint:"^8.57.0",hock:"^1.4.1",mocha:"^10.3.0",nyc:"^15.1.0",rimraf:"^5.0.5",split2:"^4.1.0","std-mocks":"^2.0.0",through2:"^4.0.2","winston-compat":"^0.1.5"},main:"./lib/winston.js",browser:"./dist/winston",types:"./index.d.ts",scripts:{lint:"eslint lib/*.js lib/winston/*.js lib/winston/**/*.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist",test:"rimraf test/fixtures/logs/* && mocha","test:coverage":"nyc npm run test:unit","test:unit":"mocha test/unit","test:integration":"mocha test/integration",build:"rimraf dist && babel lib -d dist",prepublishOnly:"npm run build"},engines:{node:">= 12.0.0"},license:"MIT"}});var Qs=w((KE,Mu)=>{Mu.exports=require("util").deprecate});var Xs=w((JE,ku)=>{ku.exports=require("stream")});var ta=w((ZE,Pu)=>{"use strict";function Rm(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(ea,this,t)):process.nextTick(ea,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(Hi,r):(r._writableState.errorEmitted=!0,process.nextTick(Au,r,s)):process.nextTick(Au,r,s):e?(process.nextTick(Hi,r),e(s)):process.nextTick(Hi,r)}),this)}function Au(t,e){ea(t,e),Hi(t)}function Hi(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function xm(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function ea(t,e){t.emit("error",e)}function Tm(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}Pu.exports={destroy:Rm,undestroy:xm,errorOrDestroy:Tm}});var nr=w((QE,Cu)=>{"use strict";var qu={};function De(t,e,r){r||(r=Error);function i(s,a,o){return typeof e=="string"?e:e(s,a,o)}class n extends r{constructor(a,o,l){super(i(a,o,l))}}n.prototype.name=r.name,n.prototype.code=t,qu[t]=n}function Du(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(i=>String(i)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function Om(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Mm(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function km(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}De("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);De("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&Om(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(Mm(t," argument"))n=`The ${t} ${i} ${Du(e,"type")}`;else{let s=km(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${Du(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);De("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");De("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});De("ERR_STREAM_PREMATURE_CLOSE","Premature close");De("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});De("ERR_MULTIPLE_CALLBACK","Callback called multiple times");De("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");De("ERR_STREAM_WRITE_AFTER_END","write after end");De("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);De("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);De("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Cu.exports.codes=qu});var ra=w((XE,Lu)=>{"use strict";var Am=nr().codes.ERR_INVALID_OPT_VALUE;function Pm(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Dm(t,e,r,i){var n=Pm(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new Am(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}Lu.exports={getHighWaterMark:Dm}});var ju=w((e2,ia)=>{typeof Object.create=="function"?ia.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:ia.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var nt=w((t2,sa)=>{try{if(na=require("util"),typeof na.inherits!="function")throw"";sa.exports=na.inherits}catch{sa.exports=ju()}var na});var Bu=w((r2,Wu)=>{"use strict";function Nu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function Fu(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Nu(Object(r),!0).forEach(function(i){qm(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nu(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function qm(t,e,r){return e=$u(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Cm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Iu(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,$u(i.key),i)}}function Lm(t,e,r){return e&&Iu(t.prototype,e),r&&Iu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function $u(t){var e=jm(t,"string");return typeof e=="symbol"?e:String(e)}function jm(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Nm=require("buffer"),Gi=Nm.Buffer,Fm=require("util"),aa=Fm.inspect,Im=aa&&aa.custom||"inspect";function $m(t,e,r){Gi.prototype.copy.call(t,e,r)}Wu.exports=function(){function t(){Cm(this,t),this.head=null,this.tail=null,this.length=0}return Lm(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return Gi.alloc(0);for(var i=Gi.allocUnsafe(r>>>0),n=this.head,s=0;n;)$m(n.data,i,s),s+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,s=i.data;for(r-=s.length;i=i.next;){var a=i.data,o=r>a.length?a.length:r;if(o===a.length?s+=a:s+=a.slice(0,r),r-=o,r===0){o===a.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=a.slice(o));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=Gi.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var a=n.data,o=r>a.length?a.length:r;if(a.copy(i,i.length-r,0,o),r-=o,r===0){o===a.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(o));break}++s}return this.length-=s,i}},{key:Im,value:function(r,i){return aa(this,Fu(Fu({},i),{},{depth:0,customInspect:!1}))}}]),t}()});var la=w((oa,zu)=>{var Yi=require("buffer"),Ge=Yi.Buffer;function Uu(t,e){for(var r in t)e[r]=t[r]}Ge.from&&Ge.alloc&&Ge.allocUnsafe&&Ge.allocUnsafeSlow?zu.exports=Yi:(Uu(Yi,oa),oa.Buffer=Ft);function Ft(t,e,r){return Ge(t,e,r)}Ft.prototype=Object.create(Ge.prototype);Uu(Ge,Ft);Ft.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Ge(t,e,r)};Ft.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Ge(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};Ft.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Ge(t)};Ft.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Yi.SlowBuffer(t)}});var ha=w(Gu=>{"use strict";var fa=la().Buffer,Hu=fa.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Wm(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function Bm(t){var e=Wm(t);if(typeof e!="string"&&(fa.isEncoding===Hu||!Hu(t)))throw new Error("Unknown encoding: "+t);return e||t}Gu.StringDecoder=qr;function qr(t){this.encoding=Bm(t);var e;switch(this.encoding){case"utf16le":this.text=Vm,this.end=Km,e=4;break;case"utf8":this.fillLast=Hm,e=4;break;case"base64":this.text=Jm,this.end=Zm,e=3;break;default:this.write=Qm,this.end=Xm;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=fa.allocUnsafe(e)}qr.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};qr.prototype.end=Ym;qr.prototype.text=Gm;qr.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function ua(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function Um(t,e,r){var i=e.length-1;if(i<r)return 0;var n=ua(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=ua(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=ua(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function zm(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function Hm(t){var e=this.lastTotal-this.lastNeed,r=zm(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function Gm(t,e){var r=Um(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function Ym(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function Vm(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function Km(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function Jm(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function Zm(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Qm(t){return t.toString(this.encoding)}function Xm(t){return t&&t.length?this.write(t):""}});var Ju=w((n2,Ku)=>{"use strict";var Yu=nr().codes.ERR_STREAM_PREMATURE_CLOSE;function ey(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}function ty(){}function ry(t){return t.setHeader&&typeof t.abort=="function"}function Vu(t,e,r){if(typeof e=="function")return Vu(t,null,e);e||(e={}),r=ey(r||ty);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||o()},a=t._writableState&&t._writableState.finished,o=function(){n=!1,a=!0,i||r.call(t)},l=t._readableState&&t._readableState.endEmitted,u=function(){i=!1,l=!0,n||r.call(t)},h=function(y){r.call(t,y)},p=function(){var y;if(i&&!l)return(!t._readableState||!t._readableState.ended)&&(y=new Yu),r.call(t,y);if(n&&!a)return(!t._writableState||!t._writableState.ended)&&(y=new Yu),r.call(t,y)},c=function(){t.req.on("finish",o)};return ry(t)?(t.on("complete",o),t.on("abort",p),t.req?c():t.on("request",c)):n&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",u),t.on("finish",o),e.error!==!1&&t.on("error",h),t.on("close",p),function(){t.removeListener("complete",o),t.removeListener("abort",p),t.removeListener("request",c),t.req&&t.req.removeListener("finish",o),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",o),t.removeListener("end",u),t.removeListener("error",h),t.removeListener("close",p)}}Ku.exports=Vu});var Qu=w((s2,Zu)=>{"use strict";var Vi;function pt(t,e,r){return e=iy(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function iy(t){var e=ny(t,"string");return typeof e=="symbol"?e:String(e)}function ny(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var sy=Ju(),gt=Symbol("lastResolve"),It=Symbol("lastReject"),Cr=Symbol("error"),Ki=Symbol("ended"),$t=Symbol("lastPromise"),ca=Symbol("handlePromise"),Wt=Symbol("stream");function mt(t,e){return{value:t,done:e}}function ay(t){var e=t[gt];if(e!==null){var r=t[Wt].read();r!==null&&(t[$t]=null,t[gt]=null,t[It]=null,e(mt(r,!1)))}}function oy(t){process.nextTick(ay,t)}function ly(t,e){return function(r,i){t.then(function(){if(e[Ki]){r(mt(void 0,!0));return}e[ca](r,i)},i)}}var uy=Object.getPrototypeOf(function(){}),fy=Object.setPrototypeOf((Vi={get stream(){return this[Wt]},next:function(){var e=this,r=this[Cr];if(r!==null)return Promise.reject(r);if(this[Ki])return Promise.resolve(mt(void 0,!0));if(this[Wt].destroyed)return new Promise(function(a,o){process.nextTick(function(){e[Cr]?o(e[Cr]):a(mt(void 0,!0))})});var i=this[$t],n;if(i)n=new Promise(ly(i,this));else{var s=this[Wt].read();if(s!==null)return Promise.resolve(mt(s,!1));n=new Promise(this[ca])}return this[$t]=n,n}},pt(Vi,Symbol.asyncIterator,function(){return this}),pt(Vi,"return",function(){var e=this;return new Promise(function(r,i){e[Wt].destroy(null,function(n){if(n){i(n);return}r(mt(void 0,!0))})})}),Vi),uy),hy=function(e){var r,i=Object.create(fy,(r={},pt(r,Wt,{value:e,writable:!0}),pt(r,gt,{value:null,writable:!0}),pt(r,It,{value:null,writable:!0}),pt(r,Cr,{value:null,writable:!0}),pt(r,Ki,{value:e._readableState.endEmitted,writable:!0}),pt(r,ca,{value:function(s,a){var o=i[Wt].read();o?(i[$t]=null,i[gt]=null,i[It]=null,s(mt(o,!1))):(i[gt]=s,i[It]=a)},writable:!0}),r));return i[$t]=null,sy(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[It];s!==null&&(i[$t]=null,i[gt]=null,i[It]=null,s(n)),i[Cr]=n;return}var a=i[gt];a!==null&&(i[$t]=null,i[gt]=null,i[It]=null,a(mt(void 0,!0))),i[Ki]=!0}),e.on("readable",oy.bind(null,i)),i};Zu.exports=hy});var rf=w((a2,tf)=>{"use strict";function Xu(t,e,r,i,n,s,a){try{var o=t[s](a),l=o.value}catch(u){r(u);return}o.done?e(l):Promise.resolve(l).then(i,n)}function cy(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function a(l){Xu(s,i,n,a,o,"next",l)}function o(l){Xu(s,i,n,a,o,"throw",l)}a(void 0)})}}function ef(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function dy(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ef(Object(r),!0).forEach(function(i){py(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ef(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function py(t,e,r){return e=gy(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gy(t){var e=my(t,"string");return typeof e=="symbol"?e:String(e)}function my(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var yy=nr().codes.ERR_INVALID_ARG_TYPE;function by(t,e,r){var i;if(e&&typeof e.next=="function")i=e;else if(e&&e[Symbol.asyncIterator])i=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])i=e[Symbol.iterator]();else throw new yy("iterable",["Iterable"],e);var n=new t(dy({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,a())};function a(){return o.apply(this,arguments)}function o(){return o=cy(function*(){try{var l=yield i.next(),u=l.value,h=l.done;h?n.push(null):n.push(yield u)?a():s=!1}catch(p){n.destroy(p)}}),o.apply(this,arguments)}return n}tf.exports=by});var pf=w((l2,df)=>{"use strict";df.exports=$;var sr;$.ReadableState=of;var o2=require("events").EventEmitter,af=function(e,r){return e.listeners(r).length},jr=Xs(),Ji=require("buffer").Buffer,wy=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function vy(t){return Ji.from(t)}function _y(t){return Ji.isBuffer(t)||t instanceof wy}var da=require("util"),C;da&&da.debuglog?C=da.debuglog("stream"):C=function(){};var Sy=Bu(),va=ta(),Ey=ra(),Ry=Ey.getHighWaterMark,Zi=nr().codes,xy=Zi.ERR_INVALID_ARG_TYPE,Ty=Zi.ERR_STREAM_PUSH_AFTER_EOF,Oy=Zi.ERR_METHOD_NOT_IMPLEMENTED,My=Zi.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,ar,pa,ga;nt()($,jr);var Lr=va.errorOrDestroy,ma=["error","close","destroy","pause","resume"];function ky(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function of(t,e,r){sr=sr||Nr(),t=t||{},typeof r!="boolean"&&(r=e instanceof sr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=Ry(this,t,"readableHighWaterMark",r),this.buffer=new Sy,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(ar||(ar=ha().StringDecoder),this.decoder=new ar(t.encoding),this.encoding=t.encoding)}function $(t){if(sr=sr||Nr(),!(this instanceof $))return new $(t);var e=this instanceof sr;this._readableState=new of(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),jr.call(this)}Object.defineProperty($.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});$.prototype.destroy=va.destroy;$.prototype._undestroy=va.undestroy;$.prototype._destroy=function(t,e){e(t)};$.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Ji.from(t,e),e=""),i=!0),lf(this,t,e,!1,i)};$.prototype.unshift=function(t){return lf(this,t,null,!0,!1)};function lf(t,e,r,i,n){C("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,Dy(t,s);else{var a;if(n||(a=Ay(s,e)),a)Lr(t,a);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Ji.prototype&&(e=vy(e)),i)s.endEmitted?Lr(t,new My):ya(t,s,e,!0);else if(s.ended)Lr(t,new Ty);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?ya(t,s,e,!1):wa(t,s)):ya(t,s,e,!1)}else i||(s.reading=!1,wa(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function ya(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Qi(t)),wa(t,e)}function Ay(t,e){var r;return!_y(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new xy("chunk",["string","Buffer","Uint8Array"],e)),r}$.prototype.isPaused=function(){return this._readableState.flowing===!1};$.prototype.setEncoding=function(t){ar||(ar=ha().StringDecoder);var e=new ar(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var nf=1073741824;function Py(t){return t>=nf?t=nf:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function sf(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=Py(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}$.prototype.read=function(t){C("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return C("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?ba(this):Qi(this),null;if(t=sf(t,e),t===0&&e.ended)return e.length===0&&ba(this),null;var i=e.needReadable;C("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,C("length less than watermark",i)),e.ended||e.reading?(i=!1,C("reading or ended",i)):i&&(C("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=sf(r,e)));var n;return t>0?n=hf(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&ba(this)),n!==null&&this.emit("data",n),n};function Dy(t,e){if(C("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?Qi(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,uf(t)))}}function Qi(t){var e=t._readableState;C("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(C("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(uf,t))}function uf(t){var e=t._readableState;C("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,_a(t)}function wa(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(qy,t,e))}function qy(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(C("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}$.prototype._read=function(t){Lr(this,new Oy("_read()"))};$.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,C("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?o:b;i.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",a);function a(S,_){C("onunpipe"),S===r&&_&&_.hasUnpiped===!1&&(_.hasUnpiped=!0,h())}function o(){C("onend"),t.end()}var l=Cy(r);t.on("drain",l);var u=!1;function h(){C("cleanup"),t.removeListener("close",f),t.removeListener("finish",y),t.removeListener("drain",l),t.removeListener("error",c),t.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",b),r.removeListener("data",p),u=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}r.on("data",p);function p(S){C("ondata");var _=t.write(S);C("dest.write",_),_===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&cf(i.pipes,t)!==-1)&&!u&&(C("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function c(S){C("onerror",S),b(),t.removeListener("error",c),af(t,"error")===0&&Lr(t,S)}ky(t,"error",c);function f(){t.removeListener("finish",y),b()}t.once("close",f);function y(){C("onfinish"),t.removeListener("close",f),b()}t.once("finish",y);function b(){C("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(C("pipe resume"),r.resume()),t};function Cy(t){return function(){var r=t._readableState;C("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&af(t,"data")&&(r.flowing=!0,_a(t))}}$.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var a=cf(e.pipes,t);return a===-1?this:(e.pipes.splice(a,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};$.prototype.on=function(t,e){var r=jr.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,C("on readable",i.length,i.reading),i.length?Qi(this):i.reading||process.nextTick(Ly,this)),r};$.prototype.addListener=$.prototype.on;$.prototype.removeListener=function(t,e){var r=jr.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(ff,this),r};$.prototype.removeAllListeners=function(t){var e=jr.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(ff,this),e};function ff(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function Ly(t){C("readable nexttick read 0"),t.read(0)}$.prototype.resume=function(){var t=this._readableState;return t.flowing||(C("resume"),t.flowing=!t.readableListening,jy(this,t)),t.paused=!1,this};function jy(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(Ny,t,e))}function Ny(t,e){C("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),_a(t),e.flowing&&!e.reading&&t.read(0)}$.prototype.pause=function(){return C("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(C("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function _a(t){var e=t._readableState;for(C("flow",e.flowing);e.flowing&&t.read()!==null;);}$.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(C("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&e.push(a)}e.push(null)}),t.on("data",function(a){if(C("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var o=e.push(a);o||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=function(o){return function(){return t[o].apply(t,arguments)}}(n));for(var s=0;s<ma.length;s++)t.on(ma[s],this.emit.bind(this,ma[s]));return this._read=function(a){C("wrapped _read",a),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&($.prototype[Symbol.asyncIterator]=function(){return pa===void 0&&(pa=Qu()),pa(this)});Object.defineProperty($.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty($.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty($.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});$._fromList=hf;Object.defineProperty($.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function hf(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function ba(t){var e=t._readableState;C("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(Fy,e,t))}function Fy(t,e){if(C("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&($.from=function(t,e){return ga===void 0&&(ga=rf()),ga($,t,e)});function cf(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Nr=w((u2,mf)=>{"use strict";var Iy=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};mf.exports=Ye;var gf=pf(),Ea=Ra();nt()(Ye,gf);for(Sa=Iy(Ea.prototype),Xi=0;Xi<Sa.length;Xi++)en=Sa[Xi],Ye.prototype[en]||(Ye.prototype[en]=Ea.prototype[en]);var Sa,en,Xi;function Ye(t){if(!(this instanceof Ye))return new Ye(t);gf.call(this,t),Ea.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",$y)))}Object.defineProperty(Ye.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Ye.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Ye.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function $y(){this._writableState.ended||process.nextTick(Wy,this)}function Wy(t){t.end()}Object.defineProperty(Ye.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var Ra=w((f2,Sf)=>{"use strict";Sf.exports=Y;function bf(t){var e=this;this.next=null,this.entry=null,this.finish=function(){p0(e,t)}}var or;Y.WritableState=Ir;var By={deprecate:Qs()},wf=Xs(),rn=require("buffer").Buffer,Uy=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function zy(t){return rn.from(t)}function Hy(t){return rn.isBuffer(t)||t instanceof Uy}var Ta=ta(),Gy=ra(),Yy=Gy.getHighWaterMark,yt=nr().codes,Vy=yt.ERR_INVALID_ARG_TYPE,Ky=yt.ERR_METHOD_NOT_IMPLEMENTED,Jy=yt.ERR_MULTIPLE_CALLBACK,Zy=yt.ERR_STREAM_CANNOT_PIPE,Qy=yt.ERR_STREAM_DESTROYED,Xy=yt.ERR_STREAM_NULL_VALUES,e0=yt.ERR_STREAM_WRITE_AFTER_END,t0=yt.ERR_UNKNOWN_ENCODING,lr=Ta.errorOrDestroy;nt()(Y,wf);function r0(){}function Ir(t,e,r){or=or||Nr(),t=t||{},typeof r!="boolean"&&(r=e instanceof or),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Yy(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){u0(e,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new bf(this)}Ir.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Ir.prototype,"buffer",{get:By.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var tn;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(tn=Function.prototype[Symbol.hasInstance],Object.defineProperty(Y,Symbol.hasInstance,{value:function(e){return tn.call(this,e)?!0:this!==Y?!1:e&&e._writableState instanceof Ir}})):tn=function(e){return e instanceof this};function Y(t){or=or||Nr();var e=this instanceof or;if(!e&&!tn.call(Y,this))return new Y(t);this._writableState=new Ir(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),wf.call(this)}Y.prototype.pipe=function(){lr(this,new Zy)};function i0(t,e){var r=new e0;lr(t,r),process.nextTick(e,r)}function n0(t,e,r,i){var n;return r===null?n=new Xy:typeof r!="string"&&!e.objectMode&&(n=new Vy("chunk",["string","Buffer"],r)),n?(lr(t,n),process.nextTick(i,n),!1):!0}Y.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&Hy(t);return s&&!rn.isBuffer(t)&&(t=zy(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=r0),i.ending?i0(this,r):(s||n0(this,i,t,r))&&(i.pendingcb++,n=a0(this,i,s,t,e,r)),n};Y.prototype.cork=function(){this._writableState.corked++};Y.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&vf(this,t))};Y.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new t0(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Y.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function s0(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=rn.from(e,r)),e}Object.defineProperty(Y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function a0(t,e,r,i,n,s){if(!r){var a=s0(e,i,n);i!==a&&(r=!0,n="buffer",i=a)}var o=e.objectMode?1:i.length;e.length+=o;var l=e.length<e.highWaterMark;if(l||(e.needDrain=!0),e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else xa(t,e,!1,o,i,n,s);return l}function xa(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new Qy("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function o0(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(Fr,t,e),t._writableState.errorEmitted=!0,lr(t,i)):(n(i),t._writableState.errorEmitted=!0,lr(t,i),Fr(t,e))}function l0(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function u0(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new Jy;if(l0(r),e)o0(t,r,i,e,n);else{var s=_f(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&vf(t,r),i?process.nextTick(yf,t,r,s,n):yf(t,r,s,n)}}function yf(t,e,r,i){r||f0(t,e),e.pendingcb--,i(),Fr(t,e)}function f0(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function vf(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var a=0,o=!0;r;)n[a]=r,r.isBuf||(o=!1),r=r.next,a+=1;n.allBuffers=o,xa(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new bf(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,h=r.callback,p=e.objectMode?1:l.length;if(xa(t,e,!1,p,l,u,h),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Y.prototype._write=function(t,e,r){r(new Ky("_write()"))};Y.prototype._writev=null;Y.prototype.end=function(t,e,r){var i=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||d0(this,i,r),this};Object.defineProperty(Y.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function _f(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function h0(t,e){t._final(function(r){e.pendingcb--,r&&lr(t,r),e.prefinished=!0,t.emit("prefinish"),Fr(t,e)})}function c0(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(h0,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Fr(t,e){var r=_f(e);if(r&&(c0(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}function d0(t,e,r){e.ending=!0,Fr(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function p0(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(Y.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});Y.prototype.destroy=Ta.destroy;Y.prototype._undestroy=Ta.undestroy;Y.prototype._destroy=function(t,e){e(t)}});var Oa=w((h2,xf)=>{"use strict";var g0=require("util"),Ef=Ra(),{LEVEL:Rf}=re(),$r=xf.exports=function(e={}){Ef.call(this,{objectMode:!0,highWaterMark:e.highWaterMark}),this.format=e.format,this.level=e.level,this.handleExceptions=e.handleExceptions,this.handleRejections=e.handleRejections,this.silent=e.silent,e.log&&(this.log=e.log),e.logv&&(this.logv=e.logv),e.close&&(this.close=e.close),this.once("pipe",r=>{this.levels=r.levels,this.parent=r}),this.once("unpipe",r=>{r===this.parent&&(this.parent=null,this.close&&this.close())})};g0.inherits($r,Ef);$r.prototype._write=function(e,r,i){if(this.silent||e.exception===!0&&!this.handleExceptions)return i(null);let n=this.level||this.parent&&this.parent.level;if(!n||this.levels[n]>=this.levels[e[Rf]]){if(e&&!this.format)return this.log(e,i);let s,a;try{a=this.format.transform(Object.assign({},e),this.format.options)}catch(o){s=o}if(s||!a){if(i(),s)throw s;return}return this.log(a,i)}return this._writableState.sync=!1,i(null)};$r.prototype._writev=function(e,r){if(this.logv){let i=e.filter(this._accept,this);return i.length?this.logv(i,r):r(null)}for(let i=0;i<e.length;i++){if(!this._accept(e[i]))continue;if(e[i].chunk&&!this.format){this.log(e[i].chunk,e[i].callback);continue}let n,s;try{s=this.format.transform(Object.assign({},e[i].chunk),this.format.options)}catch(a){n=a}if(n||!s){if(e[i].callback(),n)throw r(null),n}else this.log(s,e[i].callback)}return r(null)};$r.prototype._accept=function(e){let r=e.chunk;if(this.silent)return!1;let i=this.level||this.parent&&this.parent.level;return!!((r.exception===!0||!i||this.levels[i]>=this.levels[r[Rf]])&&(this.handleExceptions||r.exception!==!0))};$r.prototype._nop=function(){}});var ka=w((c2,Of)=>{"use strict";var m0=require("util"),{LEVEL:Ma}=re(),Tf=Oa(),Wr=Of.exports=function(e={}){if(Tf.call(this,e),!e.transport||typeof e.transport.log!="function")throw new Error("Invalid transport, must be an object with a log method.");this.transport=e.transport,this.level=this.level||e.transport.level,this.handleExceptions=this.handleExceptions||e.transport.handleExceptions,this._deprecated();function r(i){this.emit("error",i,this.transport)}this.transport.__winstonError||(this.transport.__winstonError=r.bind(this),this.transport.on("error",this.transport.__winstonError))};m0.inherits(Wr,Tf);Wr.prototype._write=function(e,r,i){if(this.silent||e.exception===!0&&!this.handleExceptions)return i(null);(!this.level||this.levels[this.level]>=this.levels[e[Ma]])&&this.transport.log(e[Ma],e.message,e,this._nop),i(null)};Wr.prototype._writev=function(e,r){for(let i=0;i<e.length;i++)this._accept(e[i])&&(this.transport.log(e[i].chunk[Ma],e[i].chunk.message,e[i].chunk,this._nop),e[i].callback());return r(null)};Wr.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
|
|
27
|
+
`))};Wr.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}});var ur=w((d2,Aa)=>{"use strict";Aa.exports=Oa();Aa.exports.LegacyTransportStream=ka()});var Af=w((g2,kf)=>{"use strict";var y0=require("os"),{LEVEL:Mf,MESSAGE:fr}=re(),b0=ur();kf.exports=class extends b0{constructor(e={}){super(e),this.name=e.name||"console",this.stderrLevels=this._stringArrayToSet(e.stderrLevels),this.consoleWarnLevels=this._stringArrayToSet(e.consoleWarnLevels),this.eol=typeof e.eol=="string"?e.eol:y0.EOL,this.setMaxListeners(30)}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.stderrLevels[e[Mf]]){console._stderr?console._stderr.write(`${e[fr]}${this.eol}`):console.error(e[fr]),r&&r();return}else if(this.consoleWarnLevels[e[Mf]]){console._stderr?console._stderr.write(`${e[fr]}${this.eol}`):console.warn(e[fr]),r&&r();return}console._stdout?console._stdout.write(`${e[fr]}${this.eol}`):console.log(e[fr]),r&&r()}_stringArrayToSet(e,r){if(!e)return{};if(r=r||"Cannot make set from type other than Array of string elements",!Array.isArray(e))throw new Error(r);return e.reduce((i,n)=>{if(typeof n!="string")throw new Error(r);return i[n]=!0,i},{})}}});var sn=w((nn,Pf)=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.default=w0;function w0(t){return t&&typeof t.length=="number"&&t.length>=0&&t.length%1===0}Pf.exports=nn.default});var qf=w((an,Df)=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.default=function(t){return function(...e){var r=e.pop();return t.call(this,e,r)}};Df.exports=an.default});var jf=w(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.fallback=Cf;bt.wrap=Lf;var v0=bt.hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,_0=bt.hasSetImmediate=typeof setImmediate=="function"&&setImmediate,S0=bt.hasNextTick=typeof process=="object"&&typeof process.nextTick=="function";function Cf(t){setTimeout(t,0)}function Lf(t){return(e,...r)=>t(()=>e(...r))}var Br;v0?Br=queueMicrotask:_0?Br=setImmediate:S0?Br=process.nextTick:Br=Cf;bt.default=Lf(Br)});var Wf=w((on,$f)=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.default=M0;var E0=qf(),R0=If(E0),x0=jf(),T0=If(x0),O0=Bt();function If(t){return t&&t.__esModule?t:{default:t}}function M0(t){return(0,O0.isAsync)(t)?function(...e){let r=e.pop(),i=t.apply(this,e);return Nf(i,r)}:(0,R0.default)(function(e,r){var i;try{i=t.apply(this,e)}catch(n){return r(n)}if(i&&typeof i.then=="function")return Nf(i,r);r(null,i)})}function Nf(t,e){return t.then(r=>{Ff(e,null,r)},r=>{Ff(e,r&&(r instanceof Error||r.message)?r:new Error(r))})}function Ff(t,e,r){try{t(e,r)}catch(i){(0,T0.default)(n=>{throw n},i)}}$f.exports=on.default});var Bt=w(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});st.isAsyncIterable=st.isAsyncGenerator=st.isAsync=void 0;var k0=Wf(),A0=P0(k0);function P0(t){return t&&t.__esModule?t:{default:t}}function Bf(t){return t[Symbol.toStringTag]==="AsyncFunction"}function D0(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function q0(t){return typeof t[Symbol.asyncIterator]=="function"}function C0(t){if(typeof t!="function")throw new Error("expected a function");return Bf(t)?(0,A0.default)(t):t}st.default=C0;st.isAsync=Bf;st.isAsyncGenerator=D0;st.isAsyncIterable=q0});var hr=w((ln,Uf)=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.default=L0;function L0(t,e){if(e||(e=t.length),!e)throw new Error("arity is undefined");function r(...i){return typeof i[e-1]=="function"?t.apply(this,i):new Promise((n,s)=>{i[e-1]=(a,...o)=>{if(a)return s(a);n(o.length>1?o:o[0])},t.apply(this,i)})}return r}Uf.exports=ln.default});var Hf=w((un,zf)=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});var j0=sn(),N0=Pa(j0),F0=Bt(),I0=Pa(F0),$0=hr(),W0=Pa($0);function Pa(t){return t&&t.__esModule?t:{default:t}}un.default=(0,W0.default)((t,e,r)=>{var i=(0,N0.default)(e)?[]:{};t(e,(n,s,a)=>{(0,I0.default)(n)((o,...l)=>{l.length<2&&([l]=l),i[s]=l,a(o)})},n=>r(n,i))},3);zf.exports=un.default});var Da=w((fn,Gf)=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.default=B0;function B0(t){function e(...r){if(t!==null){var i=t;t=null,i.apply(this,r)}}return Object.assign(e,t),e}Gf.exports=fn.default});var Vf=w((hn,Yf)=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.default=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()};Yf.exports=hn.default});var Zf=w((cn,Jf)=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.default=J0;var U0=sn(),z0=Kf(U0),H0=Vf(),G0=Kf(H0);function Kf(t){return t&&t.__esModule?t:{default:t}}function Y0(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}function V0(t){var e=-1;return function(){var i=t.next();return i.done?null:(e++,{value:i.value,key:e})}}function K0(t){var e=t?Object.keys(t):[],r=-1,i=e.length;return function n(){var s=e[++r];return s==="__proto__"?n():r<i?{value:t[s],key:s}:null}}function J0(t){if((0,z0.default)(t))return Y0(t);var e=(0,G0.default)(t);return e?V0(e):K0(t)}Jf.exports=cn.default});var qa=w((dn,Qf)=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.default=Z0;function Z0(t){return function(...e){if(t===null)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}Qf.exports=dn.default});var gn=w((pn,Xf)=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});var Q0={};pn.default=Q0;Xf.exports=pn.default});var th=w((mn,eh)=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.default=rb;var X0=gn(),eb=tb(X0);function tb(t){return t&&t.__esModule?t:{default:t}}function rb(t,e,r,i){let n=!1,s=!1,a=!1,o=0,l=0;function u(){o>=e||a||n||(a=!0,t.next().then(({value:c,done:f})=>{if(!(s||n)){if(a=!1,f){n=!0,o<=0&&i(null);return}o++,r(c,l,h),l++,u()}}).catch(p))}function h(c,f){if(o-=1,!s){if(c)return p(c);if(c===!1){n=!0,s=!0;return}if(f===eb.default||n&&o<=0)return n=!0,i(null);u()}}function p(c){s||(a=!1,n=!0,i(c))}u()}eh.exports=mn.default});var sh=w((yn,nh)=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});var ib=Da(),nb=Ur(ib),sb=Zf(),ab=Ur(sb),ob=qa(),lb=Ur(ob),rh=Bt(),ub=th(),ih=Ur(ub),fb=gn(),hb=Ur(fb);function Ur(t){return t&&t.__esModule?t:{default:t}}yn.default=t=>(e,r,i)=>{if(i=(0,nb.default)(i),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return i(null);if((0,rh.isAsyncGenerator)(e))return(0,ih.default)(e,t,r,i);if((0,rh.isAsyncIterable)(e))return(0,ih.default)(e[Symbol.asyncIterator](),t,r,i);var n=(0,ab.default)(e),s=!1,a=!1,o=0,l=!1;function u(p,c){if(!a)if(o-=1,p)s=!0,i(p);else if(p===!1)s=!0,a=!0;else{if(c===hb.default||s&&o<=0)return s=!0,i(null);l||h()}}function h(){for(l=!0;o<t&&!s;){var p=n();if(p===null){s=!0,o<=0&&i(null);return}o+=1,r(p.value,p.key,(0,lb.default)(u))}l=!1}h()};nh.exports=yn.default});var La=w((bn,ah)=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});var cb=sh(),db=Ca(cb),pb=Bt(),gb=Ca(pb),mb=hr(),yb=Ca(mb);function Ca(t){return t&&t.__esModule?t:{default:t}}function bb(t,e,r,i){return(0,db.default)(e)(t,(0,gb.default)(r),i)}bn.default=(0,yb.default)(bb,4);ah.exports=bn.default});var uh=w((wn,lh)=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});var wb=La(),vb=oh(wb),_b=hr(),Sb=oh(_b);function oh(t){return t&&t.__esModule?t:{default:t}}function Eb(t,e,r){return(0,vb.default)(t,1,e,r)}wn.default=(0,Sb.default)(Eb,3);lh.exports=wn.default});var ch=w((vn,hh)=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.default=Mb;var Rb=Hf(),xb=fh(Rb),Tb=uh(),Ob=fh(Tb);function fh(t){return t&&t.__esModule?t:{default:t}}function Mb(t,e){return(0,xb.default)(Ob.default,t,e)}hh.exports=vn.default});var ja=w((b2,dh)=>{dh.exports=require("stream")});var wh=w((w2,bh)=>{"use strict";function ph(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function gh(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ph(Object(r),!0).forEach(function(i){kb(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ph(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function kb(t,e,r){return e=yh(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ab(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mh(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,yh(i.key),i)}}function Pb(t,e,r){return e&&mh(t.prototype,e),r&&mh(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function yh(t){var e=Db(t,"string");return typeof e=="symbol"?e:String(e)}function Db(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var qb=require("buffer"),_n=qb.Buffer,Cb=require("util"),Na=Cb.inspect,Lb=Na&&Na.custom||"inspect";function jb(t,e,r){_n.prototype.copy.call(t,e,r)}bh.exports=function(){function t(){Ab(this,t),this.head=null,this.tail=null,this.length=0}return Pb(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return _n.alloc(0);for(var i=_n.allocUnsafe(r>>>0),n=this.head,s=0;n;)jb(n.data,i,s),s+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,s=i.data;for(r-=s.length;i=i.next;){var a=i.data,o=r>a.length?a.length:r;if(o===a.length?s+=a:s+=a.slice(0,r),r-=o,r===0){o===a.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=a.slice(o));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=_n.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var a=n.data,o=r>a.length?a.length:r;if(a.copy(i,i.length-r,0,o),r-=o,r===0){o===a.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(o));break}++s}return this.length-=s,i}},{key:Lb,value:function(r,i){return Na(this,gh(gh({},i),{},{depth:0,customInspect:!1}))}}]),t}()});var Ia=w((v2,_h)=>{"use strict";function Nb(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Fa,this,t)):process.nextTick(Fa,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(Sn,r):(r._writableState.errorEmitted=!0,process.nextTick(vh,r,s)):process.nextTick(vh,r,s):e?(process.nextTick(Sn,r),e(s)):process.nextTick(Sn,r)}),this)}function vh(t,e){Fa(t,e),Sn(t)}function Sn(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Fb(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Fa(t,e){t.emit("error",e)}function Ib(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}_h.exports={destroy:Nb,undestroy:Fb,errorOrDestroy:Ib}});var wt=w((_2,Rh)=>{"use strict";var Eh={};function qe(t,e,r){r||(r=Error);function i(s,a,o){return typeof e=="string"?e:e(s,a,o)}class n extends r{constructor(a,o,l){super(i(a,o,l))}}n.prototype.name=r.name,n.prototype.code=t,Eh[t]=n}function Sh(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(i=>String(i)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function $b(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Wb(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Bb(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}qe("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);qe("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&$b(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(Wb(t," argument"))n=`The ${t} ${i} ${Sh(e,"type")}`;else{let s=Bb(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${Sh(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);qe("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");qe("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});qe("ERR_STREAM_PREMATURE_CLOSE","Premature close");qe("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});qe("ERR_MULTIPLE_CALLBACK","Callback called multiple times");qe("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");qe("ERR_STREAM_WRITE_AFTER_END","write after end");qe("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);qe("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);qe("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Rh.exports.codes=Eh});var $a=w((S2,xh)=>{"use strict";var Ub=wt().codes.ERR_INVALID_OPT_VALUE;function zb(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Hb(t,e,r,i){var n=zb(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new Ub(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}xh.exports={getHighWaterMark:Hb}});var Ua=w((E2,Ph)=>{"use strict";Ph.exports=V;function Oh(t){var e=this;this.next=null,this.entry=null,this.finish=function(){bw(e,t)}}var cr;V.WritableState=Hr;var Gb={deprecate:Qs()},Mh=ja(),Rn=require("buffer").Buffer,Yb=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Vb(t){return Rn.from(t)}function Kb(t){return Rn.isBuffer(t)||t instanceof Yb}var Ba=Ia(),Jb=$a(),Zb=Jb.getHighWaterMark,vt=wt().codes,Qb=vt.ERR_INVALID_ARG_TYPE,Xb=vt.ERR_METHOD_NOT_IMPLEMENTED,ew=vt.ERR_MULTIPLE_CALLBACK,tw=vt.ERR_STREAM_CANNOT_PIPE,rw=vt.ERR_STREAM_DESTROYED,iw=vt.ERR_STREAM_NULL_VALUES,nw=vt.ERR_STREAM_WRITE_AFTER_END,sw=vt.ERR_UNKNOWN_ENCODING,dr=Ba.errorOrDestroy;nt()(V,Mh);function aw(){}function Hr(t,e,r){cr=cr||Ut(),t=t||{},typeof r!="boolean"&&(r=e instanceof cr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Zb(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){dw(e,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Oh(this)}Hr.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Hr.prototype,"buffer",{get:Gb.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var En;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(En=Function.prototype[Symbol.hasInstance],Object.defineProperty(V,Symbol.hasInstance,{value:function(e){return En.call(this,e)?!0:this!==V?!1:e&&e._writableState instanceof Hr}})):En=function(e){return e instanceof this};function V(t){cr=cr||Ut();var e=this instanceof cr;if(!e&&!En.call(V,this))return new V(t);this._writableState=new Hr(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),Mh.call(this)}V.prototype.pipe=function(){dr(this,new tw)};function ow(t,e){var r=new nw;dr(t,r),process.nextTick(e,r)}function lw(t,e,r,i){var n;return r===null?n=new iw:typeof r!="string"&&!e.objectMode&&(n=new Qb("chunk",["string","Buffer"],r)),n?(dr(t,n),process.nextTick(i,n),!1):!0}V.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&Kb(t);return s&&!Rn.isBuffer(t)&&(t=Vb(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=aw),i.ending?ow(this,r):(s||lw(this,i,t,r))&&(i.pendingcb++,n=fw(this,i,s,t,e,r)),n};V.prototype.cork=function(){this._writableState.corked++};V.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&kh(this,t))};V.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new sw(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(V.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function uw(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Rn.from(e,r)),e}Object.defineProperty(V.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function fw(t,e,r,i,n,s){if(!r){var a=uw(e,i,n);i!==a&&(r=!0,n="buffer",i=a)}var o=e.objectMode?1:i.length;e.length+=o;var l=e.length<e.highWaterMark;if(l||(e.needDrain=!0),e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Wa(t,e,!1,o,i,n,s);return l}function Wa(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new rw("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function hw(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(zr,t,e),t._writableState.errorEmitted=!0,dr(t,i)):(n(i),t._writableState.errorEmitted=!0,dr(t,i),zr(t,e))}function cw(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function dw(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new ew;if(cw(r),e)hw(t,r,i,e,n);else{var s=Ah(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&kh(t,r),i?process.nextTick(Th,t,r,s,n):Th(t,r,s,n)}}function Th(t,e,r,i){r||pw(t,e),e.pendingcb--,i(),zr(t,e)}function pw(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function kh(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var a=0,o=!0;r;)n[a]=r,r.isBuf||(o=!1),r=r.next,a+=1;n.allBuffers=o,Wa(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new Oh(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,h=r.callback,p=e.objectMode?1:l.length;if(Wa(t,e,!1,p,l,u,h),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}V.prototype._write=function(t,e,r){r(new Xb("_write()"))};V.prototype._writev=null;V.prototype.end=function(t,e,r){var i=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||yw(this,i,r),this};Object.defineProperty(V.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Ah(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function gw(t,e){t._final(function(r){e.pendingcb--,r&&dr(t,r),e.prefinished=!0,t.emit("prefinish"),zr(t,e)})}function mw(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(gw,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function zr(t,e){var r=Ah(e);if(r&&(mw(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}function yw(t,e,r){e.ending=!0,zr(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function bw(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(V.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});V.prototype.destroy=Ba.destroy;V.prototype._undestroy=Ba.undestroy;V.prototype._destroy=function(t,e){e(t)}});var Ut=w((R2,qh)=>{"use strict";var ww=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};qh.exports=Ve;var Dh=Ga(),Ha=Ua();nt()(Ve,Dh);for(za=ww(Ha.prototype),xn=0;xn<za.length;xn++)Tn=za[xn],Ve.prototype[Tn]||(Ve.prototype[Tn]=Ha.prototype[Tn]);var za,Tn,xn;function Ve(t){if(!(this instanceof Ve))return new Ve(t);Dh.call(this,t),Ha.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",vw)))}Object.defineProperty(Ve.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Ve.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Ve.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function vw(){this._writableState.ended||process.nextTick(_w,this)}function _w(t){t.end()}Object.defineProperty(Ve.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var Ka=w(Lh=>{"use strict";var Va=la().Buffer,Ch=Va.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Sw(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function Ew(t){var e=Sw(t);if(typeof e!="string"&&(Va.isEncoding===Ch||!Ch(t)))throw new Error("Unknown encoding: "+t);return e||t}Lh.StringDecoder=Gr;function Gr(t){this.encoding=Ew(t);var e;switch(this.encoding){case"utf16le":this.text=kw,this.end=Aw,e=4;break;case"utf8":this.fillLast=Tw,e=4;break;case"base64":this.text=Pw,this.end=Dw,e=3;break;default:this.write=qw,this.end=Cw;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Va.allocUnsafe(e)}Gr.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};Gr.prototype.end=Mw;Gr.prototype.text=Ow;Gr.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function Ya(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function Rw(t,e,r){var i=e.length-1;if(i<r)return 0;var n=Ya(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=Ya(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=Ya(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function xw(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function Tw(t){var e=this.lastTotal-this.lastNeed,r=xw(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function Ow(t,e){var r=Rw(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function Mw(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function kw(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function Aw(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function Pw(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function Dw(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function qw(t){return t.toString(this.encoding)}function Cw(t){return t&&t.length?this.write(t):""}});var On=w((T2,Fh)=>{"use strict";var jh=wt().codes.ERR_STREAM_PREMATURE_CLOSE;function Lw(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}function jw(){}function Nw(t){return t.setHeader&&typeof t.abort=="function"}function Nh(t,e,r){if(typeof e=="function")return Nh(t,null,e);e||(e={}),r=Lw(r||jw);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||o()},a=t._writableState&&t._writableState.finished,o=function(){n=!1,a=!0,i||r.call(t)},l=t._readableState&&t._readableState.endEmitted,u=function(){i=!1,l=!0,n||r.call(t)},h=function(y){r.call(t,y)},p=function(){var y;if(i&&!l)return(!t._readableState||!t._readableState.ended)&&(y=new jh),r.call(t,y);if(n&&!a)return(!t._writableState||!t._writableState.ended)&&(y=new jh),r.call(t,y)},c=function(){t.req.on("finish",o)};return Nw(t)?(t.on("complete",o),t.on("abort",p),t.req?c():t.on("request",c)):n&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",u),t.on("finish",o),e.error!==!1&&t.on("error",h),t.on("close",p),function(){t.removeListener("complete",o),t.removeListener("abort",p),t.removeListener("request",c),t.req&&t.req.removeListener("finish",o),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",o),t.removeListener("end",u),t.removeListener("error",h),t.removeListener("close",p)}}Fh.exports=Nh});var $h=w((O2,Ih)=>{"use strict";var Mn;function _t(t,e,r){return e=Fw(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Fw(t){var e=Iw(t,"string");return typeof e=="symbol"?e:String(e)}function Iw(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var $w=On(),St=Symbol("lastResolve"),zt=Symbol("lastReject"),Yr=Symbol("error"),kn=Symbol("ended"),Ht=Symbol("lastPromise"),Ja=Symbol("handlePromise"),Gt=Symbol("stream");function Et(t,e){return{value:t,done:e}}function Ww(t){var e=t[St];if(e!==null){var r=t[Gt].read();r!==null&&(t[Ht]=null,t[St]=null,t[zt]=null,e(Et(r,!1)))}}function Bw(t){process.nextTick(Ww,t)}function Uw(t,e){return function(r,i){t.then(function(){if(e[kn]){r(Et(void 0,!0));return}e[Ja](r,i)},i)}}var zw=Object.getPrototypeOf(function(){}),Hw=Object.setPrototypeOf((Mn={get stream(){return this[Gt]},next:function(){var e=this,r=this[Yr];if(r!==null)return Promise.reject(r);if(this[kn])return Promise.resolve(Et(void 0,!0));if(this[Gt].destroyed)return new Promise(function(a,o){process.nextTick(function(){e[Yr]?o(e[Yr]):a(Et(void 0,!0))})});var i=this[Ht],n;if(i)n=new Promise(Uw(i,this));else{var s=this[Gt].read();if(s!==null)return Promise.resolve(Et(s,!1));n=new Promise(this[Ja])}return this[Ht]=n,n}},_t(Mn,Symbol.asyncIterator,function(){return this}),_t(Mn,"return",function(){var e=this;return new Promise(function(r,i){e[Gt].destroy(null,function(n){if(n){i(n);return}r(Et(void 0,!0))})})}),Mn),zw),Gw=function(e){var r,i=Object.create(Hw,(r={},_t(r,Gt,{value:e,writable:!0}),_t(r,St,{value:null,writable:!0}),_t(r,zt,{value:null,writable:!0}),_t(r,Yr,{value:null,writable:!0}),_t(r,kn,{value:e._readableState.endEmitted,writable:!0}),_t(r,Ja,{value:function(s,a){var o=i[Gt].read();o?(i[Ht]=null,i[St]=null,i[zt]=null,s(Et(o,!1))):(i[St]=s,i[zt]=a)},writable:!0}),r));return i[Ht]=null,$w(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[zt];s!==null&&(i[Ht]=null,i[St]=null,i[zt]=null,s(n)),i[Yr]=n;return}var a=i[St];a!==null&&(i[Ht]=null,i[St]=null,i[zt]=null,a(Et(void 0,!0))),i[kn]=!0}),e.on("readable",Bw.bind(null,i)),i};Ih.exports=Gw});var zh=w((M2,Uh)=>{"use strict";function Wh(t,e,r,i,n,s,a){try{var o=t[s](a),l=o.value}catch(u){r(u);return}o.done?e(l):Promise.resolve(l).then(i,n)}function Yw(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function a(l){Wh(s,i,n,a,o,"next",l)}function o(l){Wh(s,i,n,a,o,"throw",l)}a(void 0)})}}function Bh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function Vw(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Bh(Object(r),!0).forEach(function(i){Kw(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Bh(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Kw(t,e,r){return e=Jw(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Jw(t){var e=Zw(t,"string");return typeof e=="symbol"?e:String(e)}function Zw(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Qw=wt().codes.ERR_INVALID_ARG_TYPE;function Xw(t,e,r){var i;if(e&&typeof e.next=="function")i=e;else if(e&&e[Symbol.asyncIterator])i=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])i=e[Symbol.iterator]();else throw new Qw("iterable",["Iterable"],e);var n=new t(Vw({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,a())};function a(){return o.apply(this,arguments)}function o(){return o=Yw(function*(){try{var l=yield i.next(),u=l.value,h=l.done;h?n.push(null):n.push(yield u)?a():s=!1}catch(p){n.destroy(p)}}),o.apply(this,arguments)}return n}Uh.exports=Xw});var Ga=w((A2,ec)=>{"use strict";ec.exports=W;var pr;W.ReadableState=Vh;var k2=require("events").EventEmitter,Yh=function(e,r){return e.listeners(r).length},Kr=ja(),An=require("buffer").Buffer,ev=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function tv(t){return An.from(t)}function rv(t){return An.isBuffer(t)||t instanceof ev}var Za=require("util"),L;Za&&Za.debuglog?L=Za.debuglog("stream"):L=function(){};var iv=wh(),no=Ia(),nv=$a(),sv=nv.getHighWaterMark,Pn=wt().codes,av=Pn.ERR_INVALID_ARG_TYPE,ov=Pn.ERR_STREAM_PUSH_AFTER_EOF,lv=Pn.ERR_METHOD_NOT_IMPLEMENTED,uv=Pn.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,gr,Qa,Xa;nt()(W,Kr);var Vr=no.errorOrDestroy,eo=["error","close","destroy","pause","resume"];function fv(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Vh(t,e,r){pr=pr||Ut(),t=t||{},typeof r!="boolean"&&(r=e instanceof pr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=sv(this,t,"readableHighWaterMark",r),this.buffer=new iv,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(gr||(gr=Ka().StringDecoder),this.decoder=new gr(t.encoding),this.encoding=t.encoding)}function W(t){if(pr=pr||Ut(),!(this instanceof W))return new W(t);var e=this instanceof pr;this._readableState=new Vh(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Kr.call(this)}Object.defineProperty(W.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});W.prototype.destroy=no.destroy;W.prototype._undestroy=no.undestroy;W.prototype._destroy=function(t,e){e(t)};W.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=An.from(t,e),e=""),i=!0),Kh(this,t,e,!1,i)};W.prototype.unshift=function(t){return Kh(this,t,null,!0,!1)};function Kh(t,e,r,i,n){L("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,dv(t,s);else{var a;if(n||(a=hv(s,e)),a)Vr(t,a);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==An.prototype&&(e=tv(e)),i)s.endEmitted?Vr(t,new uv):to(t,s,e,!0);else if(s.ended)Vr(t,new ov);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?to(t,s,e,!1):io(t,s)):to(t,s,e,!1)}else i||(s.reading=!1,io(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function to(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Dn(t)),io(t,e)}function hv(t,e){var r;return!rv(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new av("chunk",["string","Buffer","Uint8Array"],e)),r}W.prototype.isPaused=function(){return this._readableState.flowing===!1};W.prototype.setEncoding=function(t){gr||(gr=Ka().StringDecoder);var e=new gr(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var Hh=1073741824;function cv(t){return t>=Hh?t=Hh:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Gh(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=cv(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}W.prototype.read=function(t){L("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return L("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?ro(this):Dn(this),null;if(t=Gh(t,e),t===0&&e.ended)return e.length===0&&ro(this),null;var i=e.needReadable;L("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,L("length less than watermark",i)),e.ended||e.reading?(i=!1,L("reading or ended",i)):i&&(L("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Gh(r,e)));var n;return t>0?n=Qh(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&ro(this)),n!==null&&this.emit("data",n),n};function dv(t,e){if(L("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?Dn(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Jh(t)))}}function Dn(t){var e=t._readableState;L("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(L("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(Jh,t))}function Jh(t){var e=t._readableState;L("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,so(t)}function io(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(pv,t,e))}function pv(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(L("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}W.prototype._read=function(t){Vr(this,new lv("_read()"))};W.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,L("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?o:b;i.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",a);function a(S,_){L("onunpipe"),S===r&&_&&_.hasUnpiped===!1&&(_.hasUnpiped=!0,h())}function o(){L("onend"),t.end()}var l=gv(r);t.on("drain",l);var u=!1;function h(){L("cleanup"),t.removeListener("close",f),t.removeListener("finish",y),t.removeListener("drain",l),t.removeListener("error",c),t.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",b),r.removeListener("data",p),u=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}r.on("data",p);function p(S){L("ondata");var _=t.write(S);L("dest.write",_),_===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&Xh(i.pipes,t)!==-1)&&!u&&(L("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function c(S){L("onerror",S),b(),t.removeListener("error",c),Yh(t,"error")===0&&Vr(t,S)}fv(t,"error",c);function f(){t.removeListener("finish",y),b()}t.once("close",f);function y(){L("onfinish"),t.removeListener("close",f),b()}t.once("finish",y);function b(){L("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(L("pipe resume"),r.resume()),t};function gv(t){return function(){var r=t._readableState;L("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Yh(t,"data")&&(r.flowing=!0,so(t))}}W.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var a=Xh(e.pipes,t);return a===-1?this:(e.pipes.splice(a,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};W.prototype.on=function(t,e){var r=Kr.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,L("on readable",i.length,i.reading),i.length?Dn(this):i.reading||process.nextTick(mv,this)),r};W.prototype.addListener=W.prototype.on;W.prototype.removeListener=function(t,e){var r=Kr.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Zh,this),r};W.prototype.removeAllListeners=function(t){var e=Kr.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Zh,this),e};function Zh(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function mv(t){L("readable nexttick read 0"),t.read(0)}W.prototype.resume=function(){var t=this._readableState;return t.flowing||(L("resume"),t.flowing=!t.readableListening,yv(this,t)),t.paused=!1,this};function yv(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(bv,t,e))}function bv(t,e){L("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),so(t),e.flowing&&!e.reading&&t.read(0)}W.prototype.pause=function(){return L("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(L("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function so(t){var e=t._readableState;for(L("flow",e.flowing);e.flowing&&t.read()!==null;);}W.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(L("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&e.push(a)}e.push(null)}),t.on("data",function(a){if(L("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var o=e.push(a);o||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=function(o){return function(){return t[o].apply(t,arguments)}}(n));for(var s=0;s<eo.length;s++)t.on(eo[s],this.emit.bind(this,eo[s]));return this._read=function(a){L("wrapped _read",a),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(W.prototype[Symbol.asyncIterator]=function(){return Qa===void 0&&(Qa=$h()),Qa(this)});Object.defineProperty(W.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(W.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(W.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});W._fromList=Qh;Object.defineProperty(W.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Qh(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function ro(t){var e=t._readableState;L("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(wv,e,t))}function wv(t,e){if(L("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(W.from=function(t,e){return Xa===void 0&&(Xa=zh()),Xa(W,t,e)});function Xh(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var ao=w((P2,rc)=>{"use strict";rc.exports=at;var qn=wt().codes,vv=qn.ERR_METHOD_NOT_IMPLEMENTED,_v=qn.ERR_MULTIPLE_CALLBACK,Sv=qn.ERR_TRANSFORM_ALREADY_TRANSFORMING,Ev=qn.ERR_TRANSFORM_WITH_LENGTH_0,Cn=Ut();nt()(at,Cn);function Rv(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new _v);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function at(t){if(!(this instanceof at))return new at(t);Cn.call(this,t),this._transformState={afterTransform:Rv.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",xv)}function xv(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){tc(t,e,r)}):tc(this,null,null)}at.prototype.push=function(t,e){return this._transformState.needTransform=!1,Cn.prototype.push.call(this,t,e)};at.prototype._transform=function(t,e,r){r(new vv("_transform()"))};at.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};at.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};at.prototype._destroy=function(t,e){Cn.prototype._destroy.call(this,t,function(r){e(r)})};function tc(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Ev;if(t._transformState.transforming)throw new Sv;return t.push(null)}});var sc=w((D2,nc)=>{"use strict";nc.exports=Jr;var ic=ao();nt()(Jr,ic);function Jr(t){if(!(this instanceof Jr))return new Jr(t);ic.call(this,t)}Jr.prototype._transform=function(t,e,r){r(null,t)}});var fc=w((q2,uc)=>{"use strict";var oo;function Tv(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var lc=wt().codes,Ov=lc.ERR_MISSING_ARGS,Mv=lc.ERR_STREAM_DESTROYED;function ac(t){if(t)throw t}function kv(t){return t.setHeader&&typeof t.abort=="function"}function Av(t,e,r,i){i=Tv(i);var n=!1;t.on("close",function(){n=!0}),oo===void 0&&(oo=On()),oo(t,{readable:e,writable:r},function(a){if(a)return i(a);n=!0,i()});var s=!1;return function(a){if(!n&&!s){if(s=!0,kv(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(a||new Mv("pipe"))}}}function oc(t){t()}function Pv(t,e){return t.pipe(e)}function Dv(t){return!t.length||typeof t[t.length-1]!="function"?ac:t.pop()}function qv(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=Dv(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Ov("streams");var n,s=e.map(function(a,o){var l=o<e.length-1,u=o>0;return Av(a,l,u,function(h){n||(n=h),h&&s.forEach(oc),!l&&(s.forEach(oc),i(n))})});return e.reduce(Pv)}uc.exports=qv});var Yt=w((Ce,Qr)=>{var Zr=require("stream");process.env.READABLE_STREAM==="disable"&&Zr?(Qr.exports=Zr.Readable,Object.assign(Qr.exports,Zr),Qr.exports.Stream=Zr):(Ce=Qr.exports=Ga(),Ce.Stream=Zr||Ce,Ce.Readable=Ce,Ce.Writable=Ua(),Ce.Duplex=Ut(),Ce.Transform=ao(),Ce.PassThrough=sc(),Ce.finished=On(),Ce.pipeline=fc())});var go=w((C2,cc)=>{var mr=[],Xr=[],lo=function(){};function fo(t){return~mr.indexOf(t)?!1:(mr.push(t),!0)}function ho(t){lo=t}function Cv(t){for(var e=[],r=0;r<mr.length;r++){if(mr[r].async){e.push(mr[r]);continue}if(mr[r](t))return!0}return e.length?new Promise(function(n){Promise.all(e.map(function(a){return a(t)})).then(function(a){n(a.some(Boolean))})}):!1}function co(t){return~Xr.indexOf(t)?!1:(Xr.push(t),!0)}function uo(){lo.apply(lo,arguments)}function hc(t){for(var e=0;e<Xr.length;e++)t=Xr[e].apply(Xr[e],arguments);return t}function po(t,e){var r=Object.prototype.hasOwnProperty;for(var i in e)r.call(e,i)&&(t[i]=e[i]);return t}function Lv(t){return t.enabled=!1,t.modify=co,t.set=ho,t.use=fo,po(function(){return!1},t)}function jv(t){function e(){var r=Array.prototype.slice.call(arguments,0);return uo.call(uo,t,hc(r,t)),!0}return t.enabled=!0,t.modify=co,t.set=ho,t.use=fo,po(e,t)}cc.exports=function(e){return e.introduce=po,e.enabled=Cv,e.process=hc,e.modify=co,e.write=uo,e.nope=Lv,e.yep=jv,e.set=ho,e.use=fo,e}});var pc=w((L2,dc)=>{var Nv=go(),Fv=Nv(function t(e,r){return r=r||{},r.namespace=e,r.prod=!0,r.dev=!1,r.force||t.force?t.yep(r):t.nope(r)});dc.exports=Fv});var mc=w((j2,gc)=>{"use strict";gc.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var bc=w((N2,yc)=>{yc.exports=function(e){return!e||typeof e=="string"?!1:e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!=="String")}});var _c=w((F2,vc)=>{"use strict";var Iv=bc(),$v=Array.prototype.concat,Wv=Array.prototype.slice,wc=vc.exports=function(e){for(var r=[],i=0,n=e.length;i<n;i++){var s=e[i];Iv(s)?r=$v.call(r,Wv.call(s)):r.push(s)}return r};wc.wrap=function(t){return function(){return t(wc(arguments))}}});var xc=w((I2,Rc)=>{var ei=mc(),ti=_c(),Sc=Object.hasOwnProperty,Ec=Object.create(null);for(Ln in ei)Sc.call(ei,Ln)&&(Ec[ei[Ln]]=Ln);var Ln,Oe=Rc.exports={to:{},get:{}};Oe.get=function(t){var e=t.substring(0,3).toLowerCase(),r,i;switch(e){case"hsl":r=Oe.get.hsl(t),i="hsl";break;case"hwb":r=Oe.get.hwb(t),i="hwb";break;default:r=Oe.get.rgb(t),i="rgb";break}return r?{model:i,value:r}:null};Oe.get.rgb=function(t){if(!t)return null;var e=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,n=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,s=/^(\w+)$/,a=[0,0,0,1],o,l,u;if(o=t.match(r)){for(u=o[2],o=o[1],l=0;l<3;l++){var h=l*2;a[l]=parseInt(o.slice(h,h+2),16)}u&&(a[3]=parseInt(u,16)/255)}else if(o=t.match(e)){for(o=o[1],u=o[3],l=0;l<3;l++)a[l]=parseInt(o[l]+o[l],16);u&&(a[3]=parseInt(u+u,16)/255)}else if(o=t.match(i)){for(l=0;l<3;l++)a[l]=parseInt(o[l+1],0);o[4]&&(o[5]?a[3]=parseFloat(o[4])*.01:a[3]=parseFloat(o[4]))}else if(o=t.match(n)){for(l=0;l<3;l++)a[l]=Math.round(parseFloat(o[l+1])*2.55);o[4]&&(o[5]?a[3]=parseFloat(o[4])*.01:a[3]=parseFloat(o[4]))}else return(o=t.match(s))?o[1]==="transparent"?[0,0,0,0]:Sc.call(ei,o[1])?(a=ei[o[1]],a[3]=1,a):null:null;for(l=0;l<3;l++)a[l]=Rt(a[l],0,255);return a[3]=Rt(a[3],0,1),a};Oe.get.hsl=function(t){if(!t)return null;var e=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,s=Rt(parseFloat(r[2]),0,100),a=Rt(parseFloat(r[3]),0,100),o=Rt(isNaN(i)?1:i,0,1);return[n,s,a,o]}return null};Oe.get.hwb=function(t){if(!t)return null;var e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=t.match(e);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,s=Rt(parseFloat(r[2]),0,100),a=Rt(parseFloat(r[3]),0,100),o=Rt(isNaN(i)?1:i,0,1);return[n,s,a,o]}return null};Oe.to.hex=function(){var t=ti(arguments);return"#"+jn(t[0])+jn(t[1])+jn(t[2])+(t[3]<1?jn(Math.round(t[3]*255)):"")};Oe.to.rgb=function(){var t=ti(arguments);return t.length<4||t[3]===1?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"};Oe.to.rgb.percent=function(){var t=ti(arguments),e=Math.round(t[0]/255*100),r=Math.round(t[1]/255*100),i=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+e+"%, "+r+"%, "+i+"%)":"rgba("+e+"%, "+r+"%, "+i+"%, "+t[3]+")"};Oe.to.hsl=function(){var t=ti(arguments);return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};Oe.to.hwb=function(){var t=ti(arguments),e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};Oe.to.keyword=function(t){return Ec[t.slice(0,3)]};function Rt(t,e,r){return Math.min(Math.max(e,t),r)}function jn(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}});var Oc=w(($2,Tc)=>{"use strict";Tc.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var mo=w((W2,Pc)=>{var Vt=Oc(),Ac={};for(Nn in Vt)Vt.hasOwnProperty(Nn)&&(Ac[Vt[Nn]]=Nn);var Nn,k=Pc.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(we in k)if(k.hasOwnProperty(we)){if(!("channels"in k[we]))throw new Error("missing channels property: "+we);if(!("labels"in k[we]))throw new Error("missing channel labels property: "+we);if(k[we].labels.length!==k[we].channels)throw new Error("channel and label counts mismatch: "+we);Mc=k[we].channels,kc=k[we].labels,delete k[we].channels,delete k[we].labels,Object.defineProperty(k[we],"channels",{value:Mc}),Object.defineProperty(k[we],"labels",{value:kc})}var Mc,kc,we;k.rgb.hsl=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.min(e,r,i),s=Math.max(e,r,i),a=s-n,o,l,u;return s===n?o=0:e===s?o=(r-i)/a:r===s?o=2+(i-e)/a:i===s&&(o=4+(e-r)/a),o=Math.min(o*60,360),o<0&&(o+=360),u=(n+s)/2,s===n?l=0:u<=.5?l=a/(s+n):l=a/(2-s-n),[o,l*100,u*100]};k.rgb.hsv=function(t){var e,r,i,n,s,a=t[0]/255,o=t[1]/255,l=t[2]/255,u=Math.max(a,o,l),h=u-Math.min(a,o,l),p=function(c){return(u-c)/6/h+1/2};return h===0?n=s=0:(s=h/u,e=p(a),r=p(o),i=p(l),a===u?n=i-r:o===u?n=1/3+e-i:l===u&&(n=2/3+r-e),n<0?n+=1:n>1&&(n-=1)),[n*360,s*100,u*100]};k.rgb.hwb=function(t){var e=t[0],r=t[1],i=t[2],n=k.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,i));return i=1-1/255*Math.max(e,Math.max(r,i)),[n,s*100,i*100]};k.rgb.cmyk=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255,n,s,a,o;return o=Math.min(1-e,1-r,1-i),n=(1-e-o)/(1-o)||0,s=(1-r-o)/(1-o)||0,a=(1-i-o)/(1-o)||0,[n*100,s*100,a*100,o*100]};function Bv(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}k.rgb.keyword=function(t){var e=Ac[t];if(e)return e;var r=1/0,i;for(var n in Vt)if(Vt.hasOwnProperty(n)){var s=Vt[n],a=Bv(t,s);a<r&&(r=a,i=n)}return i};k.keyword.rgb=function(t){return Vt[t]};k.rgb.xyz=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92;var n=e*.4124+r*.3576+i*.1805,s=e*.2126+r*.7152+i*.0722,a=e*.0193+r*.1192+i*.9505;return[n*100,s*100,a*100]};k.rgb.lab=function(t){var e=k.rgb.xyz(t),r=e[0],i=e[1],n=e[2],s,a,o;return r/=95.047,i/=100,n/=108.883,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,s=116*i-16,a=500*(r-i),o=200*(i-n),[s,a,o]};k.hsl.rgb=function(t){var e=t[0]/360,r=t[1]/100,i=t[2]/100,n,s,a,o,l;if(r===0)return l=i*255,[l,l,l];i<.5?s=i*(1+r):s=i+r-i*r,n=2*i-s,o=[0,0,0];for(var u=0;u<3;u++)a=e+1/3*-(u-1),a<0&&a++,a>1&&a--,6*a<1?l=n+(s-n)*6*a:2*a<1?l=s:3*a<2?l=n+(s-n)*(2/3-a)*6:l=n,o[u]=l*255;return o};k.hsl.hsv=function(t){var e=t[0],r=t[1]/100,i=t[2]/100,n=r,s=Math.max(i,.01),a,o;return i*=2,r*=i<=1?i:2-i,n*=s<=1?s:2-s,o=(i+r)/2,a=i===0?2*n/(s+n):2*r/(i+r),[e,a*100,o*100]};k.hsv.rgb=function(t){var e=t[0]/60,r=t[1]/100,i=t[2]/100,n=Math.floor(e)%6,s=e-Math.floor(e),a=255*i*(1-r),o=255*i*(1-r*s),l=255*i*(1-r*(1-s));switch(i*=255,n){case 0:return[i,l,a];case 1:return[o,i,a];case 2:return[a,i,l];case 3:return[a,o,i];case 4:return[l,a,i];case 5:return[i,a,o]}};k.hsv.hsl=function(t){var e=t[0],r=t[1]/100,i=t[2]/100,n=Math.max(i,.01),s,a,o;return o=(2-r)*i,s=(2-r)*n,a=r*n,a/=s<=1?s:2-s,a=a||0,o/=2,[e,a*100,o*100]};k.hwb.rgb=function(t){var e=t[0]/360,r=t[1]/100,i=t[2]/100,n=r+i,s,a,o,l;n>1&&(r/=n,i/=n),s=Math.floor(6*e),a=1-i,o=6*e-s,s&1&&(o=1-o),l=r+o*(a-r);var u,h,p;switch(s){default:case 6:case 0:u=a,h=l,p=r;break;case 1:u=l,h=a,p=r;break;case 2:u=r,h=a,p=l;break;case 3:u=r,h=l,p=a;break;case 4:u=l,h=r,p=a;break;case 5:u=a,h=r,p=l;break}return[u*255,h*255,p*255]};k.cmyk.rgb=function(t){var e=t[0]/100,r=t[1]/100,i=t[2]/100,n=t[3]/100,s,a,o;return s=1-Math.min(1,e*(1-n)+n),a=1-Math.min(1,r*(1-n)+n),o=1-Math.min(1,i*(1-n)+n),[s*255,a*255,o*255]};k.xyz.rgb=function(t){var e=t[0]/100,r=t[1]/100,i=t[2]/100,n,s,a;return n=e*3.2406+r*-1.5372+i*-.4986,s=e*-.9689+r*1.8758+i*.0415,a=e*.0557+r*-.204+i*1.057,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*12.92,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*12.92,n=Math.min(Math.max(0,n),1),s=Math.min(Math.max(0,s),1),a=Math.min(Math.max(0,a),1),[n*255,s*255,a*255]};k.xyz.lab=function(t){var e=t[0],r=t[1],i=t[2],n,s,a;return e/=95.047,r/=100,i/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,n=116*r-16,s=500*(e-r),a=200*(r-i),[n,s,a]};k.lab.xyz=function(t){var e=t[0],r=t[1],i=t[2],n,s,a;s=(e+16)/116,n=r/500+s,a=s-i/200;var o=Math.pow(s,3),l=Math.pow(n,3),u=Math.pow(a,3);return s=o>.008856?o:(s-16/116)/7.787,n=l>.008856?l:(n-16/116)/7.787,a=u>.008856?u:(a-16/116)/7.787,n*=95.047,s*=100,a*=108.883,[n,s,a]};k.lab.lch=function(t){var e=t[0],r=t[1],i=t[2],n,s,a;return n=Math.atan2(i,r),s=n*360/2/Math.PI,s<0&&(s+=360),a=Math.sqrt(r*r+i*i),[e,a,s]};k.lch.lab=function(t){var e=t[0],r=t[1],i=t[2],n,s,a;return a=i/360*2*Math.PI,n=r*Math.cos(a),s=r*Math.sin(a),[e,n,s]};k.rgb.ansi16=function(t){var e=t[0],r=t[1],i=t[2],n=1 in arguments?arguments[1]:k.rgb.hsv(t)[2];if(n=Math.round(n/50),n===0)return 30;var s=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(e/255));return n===2&&(s+=60),s};k.hsv.ansi16=function(t){return k.rgb.ansi16(k.hsv.rgb(t),t[2])};k.rgb.ansi256=function(t){var e=t[0],r=t[1],i=t[2];if(e===r&&r===i)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var n=16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5);return n};k.ansi16.rgb=function(t){var e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var r=(~~(t>50)+1)*.5,i=(e&1)*r*255,n=(e>>1&1)*r*255,s=(e>>2&1)*r*255;return[i,n,s]};k.ansi256.rgb=function(t){if(t>=232){var e=(t-232)*10+8;return[e,e,e]}t-=16;var r,i=Math.floor(t/36)/5*255,n=Math.floor((r=t%36)/6)/5*255,s=r%6/5*255;return[i,n,s]};k.rgb.hex=function(t){var e=((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255),r=e.toString(16).toUpperCase();return"000000".substring(r.length)+r};k.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var r=e[0];e[0].length===3&&(r=r.split("").map(function(o){return o+o}).join(""));var i=parseInt(r,16),n=i>>16&255,s=i>>8&255,a=i&255;return[n,s,a]};k.rgb.hcg=function(t){var e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.max(Math.max(e,r),i),s=Math.min(Math.min(e,r),i),a=n-s,o,l;return a<1?o=s/(1-a):o=0,a<=0?l=0:n===e?l=(r-i)/a%6:n===r?l=2+(i-e)/a:l=4+(e-r)/a+4,l/=6,l%=1,[l*360,a*100,o*100]};k.hsl.hcg=function(t){var e=t[1]/100,r=t[2]/100,i=1,n=0;return r<.5?i=2*e*r:i=2*e*(1-r),i<1&&(n=(r-.5*i)/(1-i)),[t[0],i*100,n*100]};k.hsv.hcg=function(t){var e=t[1]/100,r=t[2]/100,i=e*r,n=0;return i<1&&(n=(r-i)/(1-i)),[t[0],i*100,n*100]};k.hcg.rgb=function(t){var e=t[0]/360,r=t[1]/100,i=t[2]/100;if(r===0)return[i*255,i*255,i*255];var n=[0,0,0],s=e%1*6,a=s%1,o=1-a,l=0;switch(Math.floor(s)){case 0:n[0]=1,n[1]=a,n[2]=0;break;case 1:n[0]=o,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=a;break;case 3:n[0]=0,n[1]=o,n[2]=1;break;case 4:n[0]=a,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=o}return l=(1-r)*i,[(r*n[0]+l)*255,(r*n[1]+l)*255,(r*n[2]+l)*255]};k.hcg.hsv=function(t){var e=t[1]/100,r=t[2]/100,i=e+r*(1-e),n=0;return i>0&&(n=e/i),[t[0],n*100,i*100]};k.hcg.hsl=function(t){var e=t[1]/100,r=t[2]/100,i=r*(1-e)+.5*e,n=0;return i>0&&i<.5?n=e/(2*i):i>=.5&&i<1&&(n=e/(2*(1-i))),[t[0],n*100,i*100]};k.hcg.hwb=function(t){var e=t[1]/100,r=t[2]/100,i=e+r*(1-e);return[t[0],(i-e)*100,(1-i)*100]};k.hwb.hcg=function(t){var e=t[1]/100,r=t[2]/100,i=1-r,n=i-e,s=0;return n<1&&(s=(i-n)/(1-n)),[t[0],n*100,s*100]};k.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};k.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};k.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};k.gray.hsl=k.gray.hsv=function(t){return[0,0,t[0]]};k.gray.hwb=function(t){return[0,100,t[0]]};k.gray.cmyk=function(t){return[0,0,0,t[0]]};k.gray.lab=function(t){return[t[0],0,0]};k.gray.hex=function(t){var e=Math.round(t[0]/100*255)&255,r=(e<<16)+(e<<8)+e,i=r.toString(16).toUpperCase();return"000000".substring(i.length)+i};k.rgb.gray=function(t){var e=(t[0]+t[1]+t[2])/3;return[e/255*100]}});var qc=w((B2,Dc)=>{var Fn=mo();function Uv(){for(var t={},e=Object.keys(Fn),r=e.length,i=0;i<r;i++)t[e[i]]={distance:-1,parent:null};return t}function zv(t){var e=Uv(),r=[t];for(e[t].distance=0;r.length;)for(var i=r.pop(),n=Object.keys(Fn[i]),s=n.length,a=0;a<s;a++){var o=n[a],l=e[o];l.distance===-1&&(l.distance=e[i].distance+1,l.parent=i,r.unshift(o))}return e}function Hv(t,e){return function(r){return e(t(r))}}function Gv(t,e){for(var r=[e[t].parent,t],i=Fn[e[t].parent][t],n=e[t].parent;e[n].parent;)r.unshift(e[n].parent),i=Hv(Fn[e[n].parent][n],i),n=e[n].parent;return i.conversion=r,i}Dc.exports=function(t){for(var e=zv(t),r={},i=Object.keys(e),n=i.length,s=0;s<n;s++){var a=i[s],o=e[a];o.parent!==null&&(r[a]=Gv(a,e))}return r}});var Lc=w((U2,Cc)=>{var yo=mo(),Yv=qc(),yr={},Vv=Object.keys(yo);function Kv(t){var e=function(r){return r==null?r:(arguments.length>1&&(r=Array.prototype.slice.call(arguments)),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function Jv(t){var e=function(r){if(r==null)return r;arguments.length>1&&(r=Array.prototype.slice.call(arguments));var i=t(r);if(typeof i=="object")for(var n=i.length,s=0;s<n;s++)i[s]=Math.round(i[s]);return i};return"conversion"in t&&(e.conversion=t.conversion),e}Vv.forEach(function(t){yr[t]={},Object.defineProperty(yr[t],"channels",{value:yo[t].channels}),Object.defineProperty(yr[t],"labels",{value:yo[t].labels});var e=Yv(t),r=Object.keys(e);r.forEach(function(i){var n=e[i];yr[t][i]=Jv(n),yr[t][i].raw=Kv(n)})});Cc.exports=yr});var Fc=w((z2,Nc)=>{"use strict";var ri=xc(),Me=Lc(),vo=[].slice,jc=["keyword","gray","hex"],bo={};Object.keys(Me).forEach(function(t){bo[vo.call(Me[t].labels).sort().join("")]=t});var In={};function ue(t,e){if(!(this instanceof ue))return new ue(t,e);if(e&&e in jc&&(e=null),e&&!(e in Me))throw new Error("Unknown model: "+e);var r,i;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof ue)this.model=t.model,this.color=t.color.slice(),this.valpha=t.valpha;else if(typeof t=="string"){var n=ri.get(t);if(n===null)throw new Error("Unable to parse color from string: "+t);this.model=n.model,i=Me[this.model].channels,this.color=n.value.slice(0,i),this.valpha=typeof n.value[i]=="number"?n.value[i]:1}else if(t.length){this.model=e||"rgb",i=Me[this.model].channels;var s=vo.call(t,0,i);this.color=wo(s,i),this.valpha=typeof t[i]=="number"?t[i]:1}else if(typeof t=="number")t&=16777215,this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;var a=Object.keys(t);"alpha"in t&&(a.splice(a.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);var o=a.sort().join("");if(!(o in bo))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=bo[o];var l=Me[this.model].labels,u=[];for(r=0;r<l.length;r++)u.push(t[l[r]]);this.color=wo(u)}if(In[this.model])for(i=Me[this.model].channels,r=0;r<i;r++){var h=In[this.model][r];h&&(this.color[r]=h(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}ue.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(t){var e=this.model in ri.to?this:this.rgb();e=e.round(typeof t=="number"?t:1);var r=e.valpha===1?e.color:e.color.concat(this.valpha);return ri.to[e.model](r)},percentString:function(t){var e=this.rgb().round(typeof t=="number"?t:1),r=e.valpha===1?e.color:e.color.concat(this.valpha);return ri.to.rgb.percent(r)},array:function(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var t={},e=Me[this.model].channels,r=Me[this.model].labels,i=0;i<e;i++)t[r[i]]=this.color[i];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray:function(){var t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject:function(){var t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round:function(t){return t=Math.max(t||0,0),new ue(this.color.map(Qv(t)).concat(this.valpha),this.model)},alpha:function(t){return arguments.length?new ue(this.color.concat(Math.max(0,Math.min(1,t))),this.model):this.valpha},red:K("rgb",0,ie(255)),green:K("rgb",1,ie(255)),blue:K("rgb",2,ie(255)),hue:K(["hsl","hsv","hsl","hwb","hcg"],0,function(t){return(t%360+360)%360}),saturationl:K("hsl",1,ie(100)),lightness:K("hsl",2,ie(100)),saturationv:K("hsv",1,ie(100)),value:K("hsv",2,ie(100)),chroma:K("hcg",1,ie(100)),gray:K("hcg",2,ie(100)),white:K("hwb",1,ie(100)),wblack:K("hwb",2,ie(100)),cyan:K("cmyk",0,ie(100)),magenta:K("cmyk",1,ie(100)),yellow:K("cmyk",2,ie(100)),black:K("cmyk",3,ie(100)),x:K("xyz",0,ie(100)),y:K("xyz",1,ie(100)),z:K("xyz",2,ie(100)),l:K("lab",0,ie(100)),a:K("lab",1),b:K("lab",2),keyword:function(t){return arguments.length?new ue(t):Me[this.model].keyword(this.color)},hex:function(t){return arguments.length?new ue(t):ri.to.hex(this.rgb().round().color)},rgbNumber:function(){var t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity:function(){for(var t=this.rgb().color,e=[],r=0;r<t.length;r++){var i=t[r]/255;e[r]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),r=t.luminosity();return e>r?(e+.05)/(r+.05):(r+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},isDark:function(){var t=this.rgb().color,e=(t[0]*299+t[1]*587+t[2]*114)/1e3;return e<128},isLight:function(){return!this.isDark()},negate:function(){for(var t=this.rgb(),e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten:function(t){var e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken:function(t){var e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate:function(t){var e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate:function(t){var e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten:function(t){var e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken:function(t){var e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale:function(){var t=this.rgb().color,e=t[0]*.3+t[1]*.59+t[2]*.11;return ue.rgb(e,e,e)},fade:function(t){return this.alpha(this.valpha-this.valpha*t)},opaquer:function(t){return this.alpha(this.valpha+this.valpha*t)},rotate:function(t){var e=this.hsl(),r=e.color[0];return r=(r+t)%360,r=r<0?360+r:r,e.color[0]=r,e},mix:function(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);var r=t.rgb(),i=this.rgb(),n=e===void 0?.5:e,s=2*n-1,a=r.alpha()-i.alpha(),o=((s*a===-1?s:(s+a)/(1+s*a))+1)/2,l=1-o;return ue.rgb(o*r.red()+l*i.red(),o*r.green()+l*i.green(),o*r.blue()+l*i.blue(),r.alpha()*n+i.alpha()*(1-n))}};Object.keys(Me).forEach(function(t){if(jc.indexOf(t)===-1){var e=Me[t].channels;ue.prototype[t]=function(){if(this.model===t)return new ue(this);if(arguments.length)return new ue(arguments,t);var r=typeof arguments[e]=="number"?e:this.valpha;return new ue(Xv(Me[this.model][t].raw(this.color)).concat(r),t)},ue[t]=function(r){return typeof r=="number"&&(r=wo(vo.call(arguments),e)),new ue(r,t)}}});function Zv(t,e){return Number(t.toFixed(e))}function Qv(t){return function(e){return Zv(e,t)}}function K(t,e,r){return t=Array.isArray(t)?t:[t],t.forEach(function(i){(In[i]||(In[i]=[]))[e]=r}),t=t[0],function(i){var n;return arguments.length?(r&&(i=r(i)),n=this[t](),n.color[e]=i,n):(n=this[t]().color[e],r&&(n=r(n)),n)}}function ie(t){return function(e){return Math.max(0,Math.min(t,e))}}function Xv(t){return Array.isArray(t)?t:[t]}function wo(t,e){for(var r=0;r<e;r++)typeof t[r]!="number"&&(t[r]=0);return t}Nc.exports=ue});var $c=w((H2,Ic)=>{"use strict";Ic.exports=function(e){for(var r=0,i=0;r<e.length;i=e.charCodeAt(r++)+((i<<5)-i));var n=Math.floor(Math.abs(Math.sin(i)*1e4%1*16777216)).toString(16);return"#"+Array(6-n.length+1).join("0")+n}});var zc=w((G2,Uc)=>{"use strict";var Wc=Fc(),Bc=$c();Uc.exports=function(e,r){var i=e.split(r||":"),n=Bc(i[0]);if(!i.length)return n;for(var s=0,a=i.length-1;s<a;s++)n=Wc(n).mix(Wc(Bc(i[s+1]))).saturate(1).hex();return n}});var Gc=w((Y2,Hc)=>{"use strict";function Ie(t,e){if(e)return new Ie(t).style(e);if(!(this instanceof Ie))return new Ie(t);this.text=t}Ie.prototype.prefix="\x1B[";Ie.prototype.suffix="m";Ie.prototype.hex=function(e){e=e[0]==="#"?e.substring(1):e,e.length===3&&(e=e.split(""),e[5]=e[2],e[4]=e[2],e[3]=e[1],e[2]=e[1],e[1]=e[0],e=e.join(""));var r=e.substring(0,2),i=e.substring(2,4),n=e.substring(4,6);return[parseInt(r,16),parseInt(i,16),parseInt(n,16)]};Ie.prototype.rgb=function(e,r,i){var n=e/255*5,s=r/255*5,a=i/255*5;return this.ansi(n,s,a)};Ie.prototype.ansi=function(e,r,i){var n=Math.round(e),s=Math.round(r),a=Math.round(i);return 16+n*36+s*6+a};Ie.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};Ie.prototype.style=function(e){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(e))+this.suffix+this.text+this.reset()};Hc.exports=Ie});var Vc=w((V2,Yc)=>{var e1=zc(),t1=Gc();Yc.exports=function(e,r){var i=r.namespace,n=r.colors!==!1?t1(i+":",e1(i)):i+":";return e[0]=n+" "+e[0],e}});var Jc=w((K2,Kc)=>{"use strict";Kc.exports=function(e,r){if(!r)return!1;for(var i=r.split(/[\s,]+/),n=0;n<i.length;n++){if(r=i[n].replace("*",".*?"),r.charAt(0)==="-"){if(new RegExp("^"+r.substr(1)+"$").test(e))return!1;continue}if(new RegExp("^"+r+"$").test(e))return!0}return!1}});var Qc=w((J2,Zc)=>{var r1=Jc();Zc.exports=function(e){return function(i){try{return r1(i,e())}catch{}return!1}}});var ed=w((Z2,Xc)=>{var i1=Qc();Xc.exports=i1(function(){return process.env.DEBUG||process.env.DIAGNOSTICS})});var rd=w((Q2,td)=>{td.exports=function(t,e){try{Function.prototype.apply.call(console.log,console,e)}catch{}}});var nd=w((X2,id)=>{var n1=go(),s1=require("tty").isatty(1),$n=n1(function t(e,r){return r=r||{},r.colors="colors"in r?r.colors:s1,r.namespace=e,r.prod=!1,r.dev=!0,!t.enabled(e)&&!(r.force||t.force)?t.nope(r):t.yep(r)});$n.modify(Vc());$n.use(ed());$n.set(rd());id.exports=$n});var ii=w((eR,_o)=>{process.env.NODE_ENV==="production"?_o.exports=pc():_o.exports=nd()});var ad=w((tR,sd)=>{"use strict";var So=require("fs"),{StringDecoder:a1}=require("string_decoder"),{Stream:o1}=Yt();function l1(){}sd.exports=(t,e)=>{let r=Buffer.alloc(65536),i=new a1("utf8"),n=new o1,s="",a=0,o=0;return t.start===-1&&delete t.start,n.readable=!0,n.destroy=()=>{n.destroyed=!0,n.emit("end"),n.emit("close")},So.open(t.file,"a+","0644",(l,u)=>{if(l){e?e(l):n.emit("error",l),n.destroy();return}(function h(){if(n.destroyed){So.close(u,l1);return}return So.read(u,r,0,r.length,a,(p,c)=>{if(p){e?e(p):n.emit("error",p),n.destroy();return}if(!c)return s&&((t.start==null||o>t.start)&&(e?e(null,s):n.emit("line",s)),o++,s=""),setTimeout(h,1e3);let f=i.write(r.slice(0,c));e||n.emit("data",f),f=(s+f).split(/\n+/);let y=f.length-1,b=0;for(;b<y;b++)(t.start==null||o>t.start)&&(e?e(null,f[b]):n.emit("line",f[b])),o++;return s=f[y],a+=c,h()})})()}),e?n.destroy:n}});var fd=w((iR,ud)=>{"use strict";var xe=require("fs"),ne=require("path"),od=ch(),u1=require("zlib"),{MESSAGE:f1}=re(),{Stream:h1,PassThrough:ld}=Yt(),c1=ur(),$e=ii()("winston:file"),d1=require("os"),p1=ad();ud.exports=class extends c1{constructor(e={}){super(e),this.name=e.name||"file";function r(i,...n){n.slice(1).forEach(s=>{if(e[s])throw new Error(`Cannot set ${s} and ${i} together`)})}if(this._stream=new ld,this._stream.setMaxListeners(30),this._onError=this._onError.bind(this),e.filename||e.dirname)r("filename or dirname","stream"),this._basename=this.filename=e.filename?ne.basename(e.filename):"winston.log",this.dirname=e.dirname||ne.dirname(e.filename),this.options=e.options||{flags:"a"};else if(e.stream)console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),r("stream","filename","maxsize"),this._dest=this._stream.pipe(this._setupStream(e.stream)),this.dirname=ne.dirname(this._dest.path);else throw new Error("Cannot log to file without filename or stream.");this.maxsize=e.maxsize||null,this.rotationFormat=e.rotationFormat||!1,this.zippedArchive=e.zippedArchive||!1,this.maxFiles=e.maxFiles||null,this.eol=typeof e.eol=="string"?e.eol:d1.EOL,this.tailable=e.tailable||!1,this.lazy=e.lazy||!1,this._size=0,this._pendingSize=0,this._created=0,this._drain=!1,this._opening=!1,this._ending=!1,this._fileExist=!1,this.dirname&&this._createLogDirIfNotExist(this.dirname),this.lazy||this.open()}finishIfEnding(){this._ending&&(this._opening?this.once("open",()=>{this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())}):(this._stream.once("finish",()=>this.emit("finish")),setImmediate(()=>this._stream.end())))}log(e,r=()=>{}){if(this.silent)return r(),!0;if(this._drain){this._stream.once("drain",()=>{this._drain=!1,this.log(e,r)});return}if(this._rotate){this._stream.once("rotate",()=>{this._rotate=!1,this.log(e,r)});return}if(this.lazy){if(!this._fileExist){this._opening||this.open(),this.once("open",()=>{this._fileExist=!0,this.log(e,r)});return}if(this._needsNewFile(this._pendingSize)){this._dest.once("close",()=>{this._opening||this.open(),this.once("open",()=>{this.log(e,r)})});return}}let i=`${e[f1]}${this.eol}`,n=Buffer.byteLength(i);function s(){if(this._size+=n,this._pendingSize-=n,$e("logged %s %s",this._size,i),this.emit("logged",e),!this._rotate&&!this._opening&&this._needsNewFile()){if(this.lazy){this._endStream(()=>{this.emit("fileclosed")});return}this._rotate=!0,this._endStream(()=>this._rotateFile())}}this._pendingSize+=n,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);let a=this._stream.write(i,s.bind(this));return a?r():(this._drain=!0,this._stream.once("drain",()=>{this._drain=!1,r()})),$e("written",a,this._drain),this.finishIfEnding(),a}query(e,r){typeof e=="function"&&(r=e,e={}),e=p(e);let i=ne.join(this.dirname,this.filename),n="",s=[],a=0,o=xe.createReadStream(i,{encoding:"utf8"});o.on("error",c=>{if(o.readable&&o.destroy(),!!r)return c.code!=="ENOENT"?r(c):r(null,s)}),o.on("data",c=>{c=(n+c).split(/\n+/);let f=c.length-1,y=0;for(;y<f;y++)(!e.start||a>=e.start)&&l(c[y]),a++;n=c[f]}),o.on("close",()=>{n&&l(n,!0),e.order==="desc"&&(s=s.reverse()),r&&r(null,s)});function l(c,f){try{let y=JSON.parse(c);h(y)&&u(y)}catch(y){f||o.emit("error",y)}}function u(c){if(e.rows&&s.length>=e.rows&&e.order!=="desc"){o.readable&&o.destroy();return}e.fields&&(c=e.fields.reduce((f,y)=>(f[y]=c[y],f),{})),e.order==="desc"&&s.length>=e.rows&&s.shift(),s.push(c)}function h(c){if(!c||typeof c!="object")return;let f=new Date(c.timestamp);if(!(e.from&&f<e.from||e.until&&f>e.until||e.level&&e.level!==c.level))return!0}function p(c){return c=c||{},c.rows=c.rows||c.limit||10,c.start=c.start||0,c.until=c.until||new Date,typeof c.until!="object"&&(c.until=new Date(c.until)),c.from=c.from||c.until-24*60*60*1e3,typeof c.from!="object"&&(c.from=new Date(c.from)),c.order=c.order||"desc",c}}stream(e={}){let r=ne.join(this.dirname,this.filename),i=new h1,n={file:r,start:e.start};return i.destroy=p1(n,(s,a)=>{if(s)return i.emit("error",s);try{i.emit("data",a),a=JSON.parse(a),i.emit("log",a)}catch(o){i.emit("error",o)}}),i}open(){this.filename&&(this._opening||(this._opening=!0,this.stat((e,r)=>{if(e)return this.emit("error",e);$e("stat done: %s { size: %s }",this.filename,r),this._size=r,this._dest=this._createStream(this._stream),this._opening=!1,this.once("open",()=>{this._stream.eventNames().includes("rotate")?this._stream.emit("rotate"):this._rotate=!1})})))}stat(e){let r=this._getFile(),i=ne.join(this.dirname,r);xe.stat(i,(n,s)=>{if(n&&n.code==="ENOENT")return $e("ENOENT\xA0ok",i),this.filename=r,e(null,0);if(n)return $e(`err ${n.code} ${i}`),e(n);if(!s||this._needsNewFile(s.size))return this._incFile(()=>this.stat(e));this.filename=r,e(null,s.size)})}close(e){this._stream&&this._stream.end(()=>{e&&e(),this.emit("flush"),this.emit("closed")})}_needsNewFile(e){return e=e||this._size,this.maxsize&&e>=this.maxsize}_onError(e){this.emit("error",e)}_setupStream(e){return e.on("error",this._onError),e}_cleanupStream(e){return e.removeListener("error",this._onError),e.destroy(),e}_rotateFile(){this._incFile(()=>this.open())}_endStream(e=()=>{}){this._dest?(this._stream.unpipe(this._dest),this._dest.end(()=>{this._cleanupStream(this._dest),e()})):e()}_createStream(e){let r=ne.join(this.dirname,this.filename);$e("create stream start",r,this.options);let i=xe.createWriteStream(r,this.options).on("error",n=>$e(n)).on("close",()=>$e("close",i.path,i.bytesWritten)).on("open",()=>{$e("file open ok",r),this.emit("open",r),e.pipe(i),this.rotatedWhileOpening&&(this._stream=new ld,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(i),e.end())});return $e("create stream ok",r),i}_incFile(e){$e("_incFile",this.filename);let r=ne.extname(this._basename),i=ne.basename(this._basename,r),n=[];this.zippedArchive&&n.push(function(s){let a=this._created>0&&!this.tailable?this._created:"";this._compressFile(ne.join(this.dirname,`${i}${a}${r}`),ne.join(this.dirname,`${i}${a}${r}.gz`),s)}.bind(this)),n.push(function(s){this.tailable?this._checkMaxFilesTailable(r,i,s):(this._created+=1,this._checkMaxFilesIncrementing(r,i,s))}.bind(this)),od(n,e)}_getFile(){let e=ne.extname(this._basename),r=ne.basename(this._basename,e),i=this.rotationFormat?this.rotationFormat():this._created;return!this.tailable&&this._created?`${r}${i}${e}`:`${r}${e}`}_checkMaxFilesIncrementing(e,r,i){if(!this.maxFiles||this._created<this.maxFiles)return setImmediate(i);let n=this._created-this.maxFiles,s=n!==0?n:"",a=this.zippedArchive?".gz":"",o=`${r}${s}${e}${a}`,l=ne.join(this.dirname,o);xe.unlink(l,i)}_checkMaxFilesTailable(e,r,i){let n=[];if(!this.maxFiles)return;let s=this.zippedArchive?".gz":"";for(let a=this.maxFiles-1;a>1;a--)n.push(function(o,l){let u=`${r}${o-1}${e}${s}`,h=ne.join(this.dirname,u);xe.exists(h,p=>{if(!p)return l(null);u=`${r}${o}${e}${s}`,xe.rename(h,ne.join(this.dirname,u),l)})}.bind(this,a));od(n,()=>{xe.rename(ne.join(this.dirname,`${r}${e}${s}`),ne.join(this.dirname,`${r}1${e}${s}`),i)})}_compressFile(e,r,i){xe.access(e,xe.F_OK,n=>{if(n)return i();var s=u1.createGzip(),a=xe.createReadStream(e),o=xe.createWriteStream(r);o.on("finish",()=>{xe.unlink(e,i)}),a.pipe(s).pipe(o)})}_createLogDirIfNotExist(e){xe.existsSync(e)||xe.mkdirSync(e,{recursive:!0})}}});var cd=w((sR,hd)=>{"use strict";var g1=require("http"),m1=require("https"),{Stream:y1}=Yt(),b1=ur(),{configure:w1}=Pr();hd.exports=class extends b1{constructor(e={}){super(e),this.options=e,this.name=e.name||"http",this.ssl=!!e.ssl,this.host=e.host||"localhost",this.port=e.port,this.auth=e.auth,this.path=e.path||"",this.maximumDepth=e.maximumDepth,this.agent=e.agent,this.headers=e.headers||{},this.headers["content-type"]="application/json",this.batch=e.batch||!1,this.batchInterval=e.batchInterval||5e3,this.batchCount=e.batchCount||10,this.batchOptions=[],this.batchTimeoutID=-1,this.batchCallback={},this.port||(this.port=this.ssl?443:80)}log(e,r){this._request(e,null,null,(i,n)=>{n&&n.statusCode!==200&&(i=new Error(`Invalid HTTP Status Code: ${n.statusCode}`)),i?this.emit("warn",i):this.emit("logged",e)}),r&&setImmediate(r)}query(e,r){typeof e=="function"&&(r=e,e={}),e={method:"query",params:this.normalizeQuery(e)};let i=e.params.auth||null;delete e.params.auth;let n=e.params.path||null;delete e.params.path,this._request(e,i,n,(s,a,o)=>{if(a&&a.statusCode!==200&&(s=new Error(`Invalid HTTP Status Code: ${a.statusCode}`)),s)return r(s);if(typeof o=="string")try{o=JSON.parse(o)}catch(l){return r(l)}r(null,o)})}stream(e={}){let r=new y1;e={method:"stream",params:e};let i=e.params.path||null;delete e.params.path;let n=e.params.auth||null;delete e.params.auth;let s="",a=this._request(e,n,i);return r.destroy=()=>a.destroy(),a.on("data",o=>{o=(s+o).split(/\n+/);let l=o.length-1,u=0;for(;u<l;u++)try{r.emit("log",JSON.parse(o[u]))}catch(h){r.emit("error",h)}s=o[l]}),a.on("error",o=>r.emit("error",o)),r}_request(e,r,i,n){e=e||{},r=r||this.auth,i=i||this.path||"",this.batch?this._doBatch(e,n,r,i):this._doRequest(e,n,r,i)}_doBatch(e,r,i,n){if(this.batchOptions.push(e),this.batchOptions.length===1){let s=this;this.batchCallback=r,this.batchTimeoutID=setTimeout(function(){s.batchTimeoutID=-1,s._doBatchRequest(s.batchCallback,i,n)},this.batchInterval)}this.batchOptions.length===this.batchCount&&this._doBatchRequest(this.batchCallback,i,n)}_doBatchRequest(e,r,i){this.batchTimeoutID>0&&(clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1);let n=this.batchOptions.slice();this.batchOptions=[],this._doRequest(n,e,r,i)}_doRequest(e,r,i,n){let s=Object.assign({},this.headers);i&&i.bearer&&(s.Authorization=`Bearer ${i.bearer}`);let a=(this.ssl?m1:g1).request({...this.options,method:"POST",host:this.host,port:this.port,path:`/${n.replace(/^\//,"")}`,headers:s,auth:i&&i.username&&i.password?`${i.username}:${i.password}`:"",agent:this.agent});a.on("error",r),a.on("response",l=>l.on("end",()=>r(null,l)).resume());let o=w1({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});a.end(Buffer.from(o(e,this.options.replacer),"utf8"))}}});var Eo=w((aR,dd)=>{"use strict";var Ke=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";Ke.writable=t=>Ke(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";Ke.readable=t=>Ke(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";Ke.duplex=t=>Ke.writable(t)&&Ke.readable(t);Ke.transform=t=>Ke.duplex(t)&&typeof t._transform=="function";dd.exports=Ke});var gd=w((lR,pd)=>{"use strict";var v1=Eo(),{MESSAGE:_1}=re(),S1=require("os"),E1=ur();pd.exports=class extends E1{constructor(e={}){if(super(e),!e.stream||!v1(e.stream))throw new Error("options.stream is required.");this._stream=e.stream,this._stream.setMaxListeners(1/0),this.isObjectMode=e.stream._writableState.objectMode,this.eol=typeof e.eol=="string"?e.eol:S1.EOL}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.isObjectMode){this._stream.write(e),r&&r();return}this._stream.write(`${e[_1]}${this.eol}`),r&&r()}}});var md=w(ni=>{"use strict";Object.defineProperty(ni,"Console",{configurable:!0,enumerable:!0,get(){return Af()}});Object.defineProperty(ni,"File",{configurable:!0,enumerable:!0,get(){return fd()}});Object.defineProperty(ni,"Http",{configurable:!0,enumerable:!0,get(){return cd()}});Object.defineProperty(ni,"Stream",{configurable:!0,enumerable:!0,get(){return gd()}})});var Bn=w(si=>{"use strict";var Wn=Js(),{configs:Ro}=re();si.cli=Wn.levels(Ro.cli);si.npm=Wn.levels(Ro.npm);si.syslog=Wn.levels(Ro.syslog);si.addColors=Wn.levels});var bd=w((Un,yd)=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});var R1=sn(),x1=Kt(R1),T1=gn(),O1=Kt(T1),M1=La(),k1=Kt(M1),A1=Da(),P1=Kt(A1),D1=qa(),q1=Kt(D1),C1=Bt(),L1=Kt(C1),j1=hr(),N1=Kt(j1);function Kt(t){return t&&t.__esModule?t:{default:t}}function F1(t,e,r){r=(0,P1.default)(r);var i=0,n=0,{length:s}=t,a=!1;s===0&&r(null);function o(l,u){l===!1&&(a=!0),a!==!0&&(l?r(l):(++n===s||u===O1.default)&&r(null))}for(;i<s;i++)e(t[i],i,(0,q1.default)(o))}function I1(t,e,r){return(0,k1.default)(t,1/0,e,r)}function $1(t,e,r){var i=(0,x1.default)(t)?F1:I1;return i(t,(0,L1.default)(e),r)}Un.default=(0,N1.default)($1,3);yd.exports=Un.default});var vd=w((zn,wd)=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.default=W1;function W1(t){return(e,r,i)=>t(e,i)}wd.exports=zn.default});var Yn=w((Gn,_d)=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});var B1=bd(),U1=Hn(B1),z1=vd(),H1=Hn(z1),G1=Bt(),Y1=Hn(G1),V1=hr(),K1=Hn(V1);function Hn(t){return t&&t.__esModule?t:{default:t}}function J1(t,e,r){return(0,U1.default)(t,(0,H1.default)((0,Y1.default)(e)),r)}Gn.default=(0,K1.default)(J1,3);_d.exports=Gn.default});var Ed=w((hR,Sd)=>{"use strict";var Z1=Object.prototype.toString;Sd.exports=function(e){if(typeof e.displayName=="string"&&e.constructor.name)return e.displayName;if(typeof e.name=="string"&&e.name)return e.name;if(typeof e=="object"&&e.constructor&&typeof e.constructor.name=="string")return e.constructor.name;var r=e.toString(),i=Z1.call(e).slice(8,-1);return i==="Function"?r=r.substring(r.indexOf("(")+1,r.indexOf(")")):r=i,r||"anonymous"}});var xo=w((cR,Rd)=>{"use strict";var Q1=Ed();Rd.exports=function(e){var r=0,i;function n(){return r||(r=1,i=e.apply(this,arguments),e=null),i}return n.displayName=Q1(e),n}});var To=w(oi=>{oi.get=function(t){var e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var r={},i=Error.prepareStackTrace;Error.prepareStackTrace=function(s,a){return a},Error.captureStackTrace(r,t||oi.get);var n=r.stack;return Error.prepareStackTrace=i,Error.stackTraceLimit=e,n};oi.parse=function(t){if(!t.stack)return[];var e=this,r=t.stack.split(`
|
|
28
|
+
`).slice(1);return r.map(function(i){if(i.match(/^\s*[-]{4,}$/))return e._createParsedCallSite({fileName:i,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var n=i.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(n){var s=null,a=null,o=null,l=null,u=null,h=n[5]==="native";if(n[1]){o=n[1];var p=o.lastIndexOf(".");if(o[p-1]=="."&&p--,p>0){s=o.substr(0,p),a=o.substr(p+1);var c=s.indexOf(".Module");c>0&&(o=o.substr(c+1),s=s.substr(0,c))}l=null}a&&(l=s,u=a),a==="<anonymous>"&&(u=null,o=null);var f={fileName:n[2]||null,lineNumber:parseInt(n[3],10)||null,functionName:o,typeName:l,methodName:u,columnNumber:parseInt(n[4],10)||null,native:h};return e._createParsedCallSite(f)}}).filter(function(i){return!!i})};function ai(t){for(var e in t)this[e]=t[e]}var X1=["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"],e_=["topLevel","eval","native","constructor"];X1.forEach(function(t){ai.prototype[t]=null,ai.prototype["get"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]}});e_.forEach(function(t){ai.prototype[t]=!1,ai.prototype["is"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]}});oi._createParsedCallSite=function(t){return new ai(t)}});var Td=w((gR,xd)=>{"use strict";var{Writable:t_}=Yt();xd.exports=class extends t_{constructor(e){if(super({objectMode:!0}),!e)throw new Error("ExceptionStream requires a TransportStream instance.");this.handleExceptions=!0,this.transport=e}_write(e,r,i){return e.exception?this.transport.log(e,i):(i(),!0)}}});var Mo=w((yR,kd)=>{"use strict";var Od=require("os"),r_=Yn(),Oo=ii()("winston:exception"),i_=xo(),Md=To(),n_=Td();kd.exports=class{constructor(e){if(!e)throw new Error("Logger is required to handle exceptions");this.logger=e,this.handlers=new Map}handle(...e){e.forEach(r=>{if(Array.isArray(r))return r.forEach(i=>this._addHandler(i));this._addHandler(r)}),this.catcher||(this.catcher=this._uncaughtException.bind(this),process.on("uncaughtException",this.catcher))}unhandle(){this.catcher&&(process.removeListener("uncaughtException",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach(e=>this.logger.unpipe(e)))}getAllInfo(e){let r=null;return e&&(r=typeof e=="string"?e:e.message),{error:e,level:"error",message:[`uncaughtException: ${r||"(no error message)"}`,e&&e.stack||" No stack trace"].join(`
|
|
29
|
+
`),stack:e&&e.stack,exception:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:Od.loadavg(),uptime:Od.uptime()}}getTrace(e){return(e?Md.parse(e):Md.get()).map(i=>({column:i.getColumnNumber(),file:i.getFileName(),function:i.getFunctionName(),line:i.getLineNumber(),method:i.getMethodName(),native:i.isNative()}))}_addHandler(e){if(!this.handlers.has(e)){e.handleExceptions=!0;let r=new n_(e);this.handlers.set(e,r),this.logger.pipe(r)}}_uncaughtException(e){let r=this.getAllInfo(e),i=this._getExceptionHandlers(),n=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(e):this.logger.exitOnError,s;!i.length&&n&&(console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),n=!1);function a(){Oo("doExit",n),Oo("process._exiting",process._exiting),n&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!i||i.length===0)return process.nextTick(a);r_(i,(o,l)=>{let u=i_(l),h=o.transport||o;function p(c){return()=>{Oo(c),u()}}h._ending=!0,h.once("finish",p("finished")),h.once("error",p("error"))},()=>n&&a()),this.logger.log(r),n&&(s=setTimeout(a,3e3))}_getExceptionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleExceptions)}}});var Pd=w((wR,Ad)=>{"use strict";var{Writable:s_}=Yt();Ad.exports=class extends s_{constructor(e){if(super({objectMode:!0}),!e)throw new Error("RejectionStream requires a TransportStream instance.");this.handleRejections=!0,this.transport=e}_write(e,r,i){return e.rejection?this.transport.log(e,i):(i(),!0)}}});var Ao=w((_R,Cd)=>{"use strict";var Dd=require("os"),a_=Yn(),ko=ii()("winston:rejection"),o_=xo(),qd=To(),l_=Pd();Cd.exports=class{constructor(e){if(!e)throw new Error("Logger is required to handle rejections");this.logger=e,this.handlers=new Map}handle(...e){e.forEach(r=>{if(Array.isArray(r))return r.forEach(i=>this._addHandler(i));this._addHandler(r)}),this.catcher||(this.catcher=this._unhandledRejection.bind(this),process.on("unhandledRejection",this.catcher))}unhandle(){this.catcher&&(process.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach(e=>this.logger.unpipe(e)))}getAllInfo(e){let r=null;return e&&(r=typeof e=="string"?e:e.message),{error:e,level:"error",message:[`unhandledRejection: ${r||"(no error message)"}`,e&&e.stack||" No stack trace"].join(`
|
|
30
|
+
`),stack:e&&e.stack,rejection:!0,date:new Date().toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:Dd.loadavg(),uptime:Dd.uptime()}}getTrace(e){return(e?qd.parse(e):qd.get()).map(i=>({column:i.getColumnNumber(),file:i.getFileName(),function:i.getFunctionName(),line:i.getLineNumber(),method:i.getMethodName(),native:i.isNative()}))}_addHandler(e){if(!this.handlers.has(e)){e.handleRejections=!0;let r=new l_(e);this.handlers.set(e,r),this.logger.pipe(r)}}_unhandledRejection(e){let r=this.getAllInfo(e),i=this._getRejectionHandlers(),n=typeof this.logger.exitOnError=="function"?this.logger.exitOnError(e):this.logger.exitOnError,s;!i.length&&n&&(console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),n=!1);function a(){ko("doExit",n),ko("process._exiting",process._exiting),n&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!i||i.length===0)return process.nextTick(a);a_(i,(o,l)=>{let u=o_(l),h=o.transport||o;function p(c){return()=>{ko(c),u()}}h._ending=!0,h.once("finish",p("finished")),h.once("error",p("error"))},()=>n&&a()),this.logger.log(r),n&&(s=setTimeout(a,3e3))}_getRejectionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleRejections)}}});var jd=w((SR,Ld)=>{"use strict";var Po=class{constructor(e){let r=Vn();if(typeof e!="object"||Array.isArray(e)||!(e instanceof r))throw new Error("Logger is required for profiling");this.logger=e,this.start=Date.now()}done(...e){typeof e[e.length-1]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),e.pop());let r=typeof e[e.length-1]=="object"?e.pop():{};return r.level=r.level||"info",r.durationMs=Date.now()-this.start,this.logger.write(r)}};Ld.exports=Po});var Vn=w((ER,$d)=>{"use strict";var{Stream:u_,Transform:f_}=Yt(),Nd=Yn(),{LEVEL:Je,SPLAT:Fd}=re(),Id=Eo(),h_=Mo(),c_=Ao(),d_=ka(),p_=jd(),{warn:g_}=Zs(),m_=Bn(),y_=/%[scdjifoO%]/g,Kn=class extends f_{constructor(e){super({objectMode:!0}),this.configure(e)}child(e){let r=this;return Object.create(r,{write:{value:function(i){let n=Object.assign({},e,i);i instanceof Error&&(n.stack=i.stack,n.message=i.message),r.write(n)}}})}configure({silent:e,format:r,defaultMeta:i,levels:n,level:s="info",exitOnError:a=!0,transports:o,colors:l,emitErrs:u,formatters:h,padLevels:p,rewriters:c,stripColors:f,exceptionHandlers:y,rejectionHandlers:b}={}){if(this.transports.length&&this.clear(),this.silent=e,this.format=r||this.format||Hs()(),this.defaultMeta=i||null,this.levels=n||this.levels||m_.npm.levels,this.level=s,this.exceptions&&this.exceptions.unhandle(),this.rejections&&this.rejections.unhandle(),this.exceptions=new h_(this),this.rejections=new c_(this),this.profilers={},this.exitOnError=a,o&&(o=Array.isArray(o)?o:[o],o.forEach(S=>this.add(S))),l||u||h||p||c||f)throw new Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
|
|
31
|
+
`));y&&this.exceptions.handle(y),b&&this.rejections.handle(b)}isLevelEnabled(e){let r=Do(this.levels,e);if(r===null)return!1;let i=Do(this.levels,this.level);return i===null?!1:!this.transports||this.transports.length===0?i>=r:this.transports.findIndex(s=>{let a=Do(this.levels,s.level);return a===null&&(a=i),a>=r})!==-1}log(e,r,...i){if(arguments.length===1)return e[Je]=e.level,this._addDefaultMeta(e),this.write(e),this;if(arguments.length===2)return r&&typeof r=="object"?(r[Je]=r.level=e,this._addDefaultMeta(r),this.write(r),this):(r={[Je]:e,level:e,message:r},this._addDefaultMeta(r),this.write(r),this);let[n]=i;if(typeof n=="object"&&n!==null&&!(r&&r.match&&r.match(y_))){let a=Object.assign({},this.defaultMeta,n,{[Je]:e,[Fd]:i,level:e,message:r});return n.message&&(a.message=`${a.message} ${n.message}`),n.stack&&(a.stack=n.stack),this.write(a),this}return this.write(Object.assign({},this.defaultMeta,{[Je]:e,[Fd]:i,level:e,message:r})),this}_transform(e,r,i){if(this.silent)return i();e[Je]||(e[Je]=e.level),!this.levels[e[Je]]&&this.levels[e[Je]]!==0&&console.error("[winston] Unknown logger level: %s",e[Je]),this._readableState.pipes||console.error("[winston] Attempt to write logs with no transports, which can increase memory usage: %j",e);try{this.push(this.format.transform(e,this.format.options))}finally{this._writableState.sync=!1,i()}}_final(e){let r=this.transports.slice();Nd(r,(i,n)=>{if(!i||i.finished)return setImmediate(n);i.once("finish",n),i.end()},e)}add(e){let r=!Id(e)||e.log.length>2?new d_({transport:e}):e;if(!r._writableState||!r._writableState.objectMode)throw new Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");return this._onEvent("error",r),this._onEvent("warn",r),this.pipe(r),e.handleExceptions&&this.exceptions.handle(),e.handleRejections&&this.rejections.handle(),this}remove(e){if(!e)return this;let r=e;return(!Id(e)||e.log.length>2)&&(r=this.transports.filter(i=>i.transport===e)[0]),r&&this.unpipe(r),this}clear(){return this.unpipe(),this}close(){return this.exceptions.unhandle(),this.rejections.unhandle(),this.clear(),this.emit("close"),this}setLevels(){g_.deprecated("setLevels")}query(e,r){typeof e=="function"&&(r=e,e={}),e=e||{};let i={},n=Object.assign({},e.query||{});function s(o,l){e.query&&typeof o.formatQuery=="function"&&(e.query=o.formatQuery(n)),o.query(e,(u,h)=>{if(u)return l(u);typeof o.formatResults=="function"&&(h=o.formatResults(h,e.format)),l(null,h)})}function a(o,l){s(o,(u,h)=>{l&&(h=u||h,h&&(i[o.name]=h),l()),l=null})}Nd(this.transports.filter(o=>!!o.query),a,()=>r(null,i))}stream(e={}){let r=new u_,i=[];return r._streams=i,r.destroy=()=>{let n=i.length;for(;n--;)i[n].destroy()},this.transports.filter(n=>!!n.stream).forEach(n=>{let s=n.stream(e);s&&(i.push(s),s.on("log",a=>{a.transport=a.transport||[],a.transport.push(n.name),r.emit("log",a)}),s.on("error",a=>{a.transport=a.transport||[],a.transport.push(n.name),r.emit("error",a)}))}),r}startTimer(){return new p_(this)}profile(e,...r){let i=Date.now();if(this.profilers[e]){let n=this.profilers[e];delete this.profilers[e],typeof r[r.length-2]=="function"&&(console.warn("Callback function no longer supported as of winston@3.0.0"),r.pop());let s=typeof r[r.length-1]=="object"?r.pop():{};return s.level=s.level||"info",s.durationMs=i-n,s.message=s.message||e,this.write(s)}return this.profilers[e]=i,this}handleExceptions(...e){console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),this.exceptions.handle(...e)}unhandleExceptions(...e){console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),this.exceptions.unhandle(...e)}cli(){throw new Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join(`
|
|
32
|
+
`))}_onEvent(e,r){function i(n){e==="error"&&!this.transports.includes(r)&&this.add(r),this.emit(e,n,r)}r["__winston"+e]||(r["__winston"+e]=i.bind(this),r.on(e,r["__winston"+e]))}_addDefaultMeta(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}};function Do(t,e){let r=t[e];return!r&&r!==0?null:r}Object.defineProperty(Kn.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});$d.exports=Kn});var qo=w((RR,Wd)=>{"use strict";var{LEVEL:b_}=re(),w_=Bn(),v_=Vn(),__=ii()("winston:create-logger");function S_(t){return"is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}Wd.exports=function(t={}){t.levels=t.levels||w_.npm.levels;class e extends v_{constructor(n){super(n)}}let r=new e(t);return Object.keys(t.levels).forEach(function(i){if(__('Define prototype method for "%s"',i),i==="log"){console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.');return}e.prototype[i]=function(...n){let s=this||r;if(n.length===1){let[a]=n,o=a&&a.message&&a||{message:a};return o.level=o[b_]=i,s._addDefaultMeta(o),s.write(o),this||r}return n.length===0?(s.log(i,""),s):s.log(i,...n)},e.prototype[S_(i)]=function(){return(this||r).isLevelEnabled(i)}}),r}});var Ud=w((TR,Bd)=>{"use strict";var E_=qo();Bd.exports=class{constructor(e={}){this.loggers=new Map,this.options=e}add(e,r){if(!this.loggers.has(e)){r=Object.assign({},r||this.options);let i=r.transports||this.options.transports;i?r.transports=Array.isArray(i)?i.slice():[i]:r.transports=[];let n=E_(r);n.on("close",()=>this._delete(e)),this.loggers.set(e,n)}return this.loggers.get(e)}get(e,r){return this.add(e,r)}has(e){return!!this.loggers.has(e)}close(e){if(e)return this._removeLogger(e);this.loggers.forEach((r,i)=>this._removeLogger(i))}_removeLogger(e){if(!this.loggers.has(e))return;this.loggers.get(e).close(),this._delete(e)}_delete(e){this.loggers.delete(e)}}});var Hd=w(H=>{"use strict";var zd=Js(),{warn:li}=Zs();H.version=Ou().version;H.transports=md();H.config=Bn();H.addColors=zd.levels;H.format=zd.format;H.createLogger=qo();H.Logger=Vn();H.ExceptionHandler=Mo();H.RejectionHandler=Ao();H.Container=Ud();H.Transport=ur();H.loggers=new H.Container;var Ze=H.createLogger();Object.keys(H.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(t=>H[t]=(...e)=>Ze[t](...e));Object.defineProperty(H,"level",{get(){return Ze.level},set(t){Ze.level=t}});Object.defineProperty(H,"exceptions",{get(){return Ze.exceptions}});Object.defineProperty(H,"rejections",{get(){return Ze.rejections}});["exitOnError"].forEach(t=>{Object.defineProperty(H,t,{get(){return Ze[t]},set(e){Ze[t]=e}})});Object.defineProperty(H,"default",{get(){return{exceptionHandlers:Ze.exceptionHandlers,rejectionHandlers:Ze.rejectionHandlers,transports:Ze.transports}}});li.deprecated(H,"setLevels");li.forFunctions(H,"useFormat",["cli"]);li.forProperties(H,"useFormat",["padLevels","stripColors"]);li.forFunctions(H,"deprecated",["addRewriter","addFilter","clone","extend"]);li.forProperties(H,"deprecated",["emitErrs","levelLength"])});var Zn=w((Jn,Gd)=>{(function(t,e){typeof Jn=="object"&&typeof Gd<"u"?e(Jn):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.Superstruct={}))})(Jn,function(t){"use strict";class e extends TypeError{constructor(g,m){let v,{message:T,explanation:q,...z}=g,{path:Z}=g,Q=Z.length===0?T:`At path: ${Z.join(".")} -- ${T}`;super(q??Q),q!=null&&(this.cause=Q),Object.assign(this,z),this.name=this.constructor.name,this.failures=()=>v??(v=[g,...m()])}}function r(d){return i(d)&&typeof d[Symbol.iterator]=="function"}function i(d){return typeof d=="object"&&d!=null}function n(d){if(Object.prototype.toString.call(d)!=="[object Object]")return!1;let g=Object.getPrototypeOf(d);return g===null||g===Object.prototype}function s(d){return typeof d=="symbol"?d.toString():typeof d=="string"?JSON.stringify(d):`${d}`}function a(d){let{done:g,value:m}=d.next();return g?void 0:m}function o(d,g,m,v){if(d===!0)return;d===!1?d={}:typeof d=="string"&&(d={message:d});let{path:T,branch:q}=g,{type:z}=m,{refinement:Z,message:Q=`Expected a value of type \`${z}\`${Z?` with refinement \`${Z}\``:""}, but received: \`${s(v)}\``}=d;return{value:v,type:z,refinement:Z,key:T[T.length-1],path:T,branch:q,...d,message:Q}}function*l(d,g,m,v){r(d)||(d=[d]);for(let T of d){let q=o(T,g,m,v);q&&(yield q)}}function*u(d,g,m={}){let{path:v=[],branch:T=[d],coerce:q=!1,mask:z=!1}=m,Z={path:v,branch:T};if(q&&(d=g.coercer(d,Z),z&&g.type!=="type"&&i(g.schema)&&i(d)&&!Array.isArray(d)))for(let G in d)g.schema[G]===void 0&&delete d[G];let Q="valid";for(let G of g.validator(d,Z))G.explanation=m.message,Q="not_valid",yield[G,void 0];for(let[G,Pe,fg]of g.entries(d,Z)){let hg=u(Pe,fg,{path:G===void 0?v:[...v,G],branch:G===void 0?T:[...T,Pe],coerce:q,mask:z,message:m.message});for(let Ai of hg)Ai[0]?(Q=Ai[0].refinement!=null?"not_refined":"not_valid",yield[Ai[0],void 0]):q&&(Pe=Ai[1],G===void 0?d=Pe:d instanceof Map?d.set(G,Pe):d instanceof Set?d.add(Pe):i(d)&&(Pe!==void 0||G in d)&&(d[G]=Pe))}if(Q!=="not_valid")for(let G of g.refiner(d,Z))G.explanation=m.message,Q="not_refined",yield[G,void 0];Q==="valid"&&(yield[void 0,d])}class h{constructor(g){let{type:m,schema:v,validator:T,refiner:q,coercer:z=Q=>Q,entries:Z=function*(){}}=g;this.type=m,this.schema=v,this.entries=Z,this.coercer=z,T?this.validator=(Q,G)=>{let Pe=T(Q,G);return l(Pe,G,this,Q)}:this.validator=()=>[],q?this.refiner=(Q,G)=>{let Pe=q(Q,G);return l(Pe,G,this,Q)}:this.refiner=()=>[]}assert(g,m){return p(g,this,m)}create(g,m){return c(g,this,m)}is(g){return y(g,this)}mask(g,m){return f(g,this,m)}validate(g,m={}){return b(g,this,m)}}function p(d,g,m){let v=b(d,g,{message:m});if(v[0])throw v[0]}function c(d,g,m){let v=b(d,g,{coerce:!0,message:m});if(v[0])throw v[0];return v[1]}function f(d,g,m){let v=b(d,g,{coerce:!0,mask:!0,message:m});if(v[0])throw v[0];return v[1]}function y(d,g){return!b(d,g)[0]}function b(d,g,m={}){let v=u(d,g,m),T=a(v);return T[0]?[new e(T[0],function*(){for(let z of v)z[0]&&(yield z[0])}),void 0]:[void 0,T[1]]}function S(...d){let g=d[0].type==="type",m=d.map(T=>T.schema),v=Object.assign({},...m);return g?ft(v):He(v)}function _(d,g){return new h({type:d,schema:null,validator:g})}function x(d,g){return new h({...d,refiner:(m,v)=>m===void 0||d.refiner(m,v),validator(m,v){return m===void 0?!0:(g(m,v),d.validator(m,v))}})}function R(d){return new h({type:"dynamic",schema:null,*entries(g,m){yield*d(g,m).entries(g,m)},validator(g,m){return d(g,m).validator(g,m)},coercer(g,m){return d(g,m).coercer(g,m)},refiner(g,m){return d(g,m).refiner(g,m)}})}function O(d){let g;return new h({type:"lazy",schema:null,*entries(m,v){g??(g=d()),yield*g.entries(m,v)},validator(m,v){return g??(g=d()),g.validator(m,v)},coercer(m,v){return g??(g=d()),g.coercer(m,v)},refiner(m,v){return g??(g=d()),g.refiner(m,v)}})}function A(d,g){let{schema:m}=d,v={...m};for(let T of g)delete v[T];switch(d.type){case"type":return ft(v);default:return He(v)}}function D(d){let g=d instanceof h,m=g?{...d.schema}:{...d};for(let v in m)m[v]=Mr(m[v]);return g&&d.type==="type"?ft(m):He(m)}function F(d,g){let{schema:m}=d,v={};for(let T of g)v[T]=m[T];switch(d.type){case"type":return ft(v);default:return He(v)}}function N(d,g){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),_(d,g)}function B(){return _("any",()=>!0)}function te(d){return new h({type:"array",schema:d,*entries(g){if(d&&Array.isArray(g))for(let[m,v]of g.entries())yield[m,v,d]},coercer(g){return Array.isArray(g)?g.slice():g},validator(g){return Array.isArray(g)||`Expected an array value, but received: ${s(g)}`}})}function J(){return _("bigint",d=>typeof d=="bigint")}function me(){return _("boolean",d=>typeof d=="boolean")}function ye(){return _("date",d=>d instanceof Date&&!isNaN(d.getTime())||`Expected a valid \`Date\` object, but received: ${s(d)}`)}function rt(d){let g={},m=d.map(v=>s(v)).join();for(let v of d)g[v]=v;return new h({type:"enums",schema:g,validator(v){return d.includes(v)||`Expected one of \`${m}\`, but received: ${s(v)}`}})}function Ss(){return _("func",d=>typeof d=="function"||`Expected a function, but received: ${s(d)}`)}function E(d){return _("instance",g=>g instanceof d||`Expected a \`${d.name}\` instance, but received: ${s(g)}`)}function M(){return _("integer",d=>typeof d=="number"&&!isNaN(d)&&Number.isInteger(d)||`Expected an integer, but received: ${s(d)}`)}function U(d){return new h({type:"intersection",schema:null,*entries(g,m){for(let v of d)yield*v.entries(g,m)},*validator(g,m){for(let v of d)yield*v.validator(g,m)},*refiner(g,m){for(let v of d)yield*v.refiner(g,m)}})}function de(d){let g=s(d),m=typeof d;return new h({type:"literal",schema:m==="string"||m==="number"||m==="boolean"?d:null,validator(v){return v===d||`Expected the literal \`${g}\`, but received: ${s(v)}`}})}function P(d,g){return new h({type:"map",schema:null,*entries(m){if(d&&g&&m instanceof Map)for(let[v,T]of m.entries())yield[v,v,d],yield[v,T,g]},coercer(m){return m instanceof Map?new Map(m):m},validator(m){return m instanceof Map||`Expected a \`Map\` object, but received: ${s(m)}`}})}function Se(){return _("never",()=>!1)}function it(d){return new h({...d,validator:(g,m)=>g===null||d.validator(g,m),refiner:(g,m)=>g===null||d.refiner(g,m)})}function At(){return _("number",d=>typeof d=="number"&&!isNaN(d)||`Expected a number, but received: ${s(d)}`)}function He(d){let g=d?Object.keys(d):[],m=Se();return new h({type:"object",schema:d||null,*entries(v){if(d&&i(v)){let T=new Set(Object.keys(v));for(let q of g)T.delete(q),yield[q,v[q],d[q]];for(let q of T)yield[q,v[q],m]}},validator(v){return i(v)||`Expected an object, but received: ${s(v)}`},coercer(v){return i(v)?{...v}:v}})}function Mr(d){return new h({...d,validator:(g,m)=>g===void 0||d.validator(g,m),refiner:(g,m)=>g===void 0||d.refiner(g,m)})}function Qt(d,g){return new h({type:"record",schema:null,*entries(m){if(i(m))for(let v in m){let T=m[v];yield[v,v,d],yield[v,T,g]}},validator(m){return i(m)||`Expected an object, but received: ${s(m)}`}})}function Es(){return _("regexp",d=>d instanceof RegExp)}function Te(d){return new h({type:"set",schema:null,*entries(g){if(d&&g instanceof Set)for(let m of g)yield[m,m,d]},coercer(g){return g instanceof Set?new Set(g):g},validator(g){return g instanceof Set||`Expected a \`Set\` object, but received: ${s(g)}`}})}function kr(){return _("string",d=>typeof d=="string"||`Expected a string, but received: ${s(d)}`)}function Rs(d){let g=Se();return new h({type:"tuple",schema:null,*entries(m){if(Array.isArray(m)){let v=Math.max(d.length,m.length);for(let T=0;T<v;T++)yield[T,m[T],d[T]||g]}},validator(m){return Array.isArray(m)||`Expected an array, but received: ${s(m)}`}})}function ft(d){let g=Object.keys(d);return new h({type:"type",schema:d,*entries(m){if(i(m))for(let v of g)yield[v,m[v],d[v]]},validator(m){return i(m)||`Expected an object, but received: ${s(m)}`},coercer(m){return i(m)?{...m}:m}})}function Mi(d){let g=d.map(m=>m.type).join(" | ");return new h({type:"union",schema:null,coercer(m){for(let v of d){let[T,q]=v.validate(m,{coerce:!0});if(!T)return q}return m},validator(m,v){let T=[];for(let q of d){let[...z]=u(m,q,v),[Z]=z;if(Z[0])for(let[Q]of z)Q&&T.push(Q);else return[]}return[`Expected the value to satisfy a union of \`${g}\`, but received: ${s(m)}`,...T]}})}function Pt(){return _("unknown",()=>!0)}function ht(d,g,m){return new h({...d,coercer:(v,T)=>y(v,g)?d.coercer(m(v,T),T):d.coercer(v,T)})}function xs(d,g,m={}){return ht(d,Pt(),v=>{let T=typeof g=="function"?g():g;if(v===void 0)return T;if(!m.strict&&n(v)&&n(T)){let q={...v},z=!1;for(let Z in T)q[Z]===void 0&&(q[Z]=T[Z],z=!0);if(z)return q}return v})}function Dt(d){return ht(d,kr(),g=>g.trim())}function ct(d){return qt(d,"empty",g=>{let m=Xt(g);return m===0||`Expected an empty ${d.type} but received one with a size of \`${m}\``})}function Xt(d){return d instanceof Map||d instanceof Set?d.size:d.length}function Ts(d,g,m={}){let{exclusive:v}=m;return qt(d,"max",T=>v?T<g:T<=g||`Expected a ${d.type} less than ${v?"":"or equal to "}${g} but received \`${T}\``)}function ki(d,g,m={}){let{exclusive:v}=m;return qt(d,"min",T=>v?T>g:T>=g||`Expected a ${d.type} greater than ${v?"":"or equal to "}${g} but received \`${T}\``)}function og(d){return qt(d,"nonempty",g=>Xt(g)>0||`Expected a nonempty ${d.type} but received an empty one`)}function lg(d,g){return qt(d,"pattern",m=>g.test(m)||`Expected a ${d.type} matching \`/${g.source}/\` but received "${m}"`)}function ug(d,g,m=g){let v=`Expected a ${d.type}`,T=g===m?`of \`${g}\``:`between \`${g}\` and \`${m}\``;return qt(d,"size",q=>{if(typeof q=="number"||q instanceof Date)return g<=q&&q<=m||`${v} ${T} but received \`${q}\``;if(q instanceof Map||q instanceof Set){let{size:z}=q;return g<=z&&z<=m||`${v} with a size ${T} but received one with a size of \`${z}\``}else{let{length:z}=q;return g<=z&&z<=m||`${v} with a length ${T} but received one with a length of \`${z}\``}})}function qt(d,g,m){return new h({...d,*refiner(v,T){yield*d.refiner(v,T);let q=m(v,T),z=l(q,T,d,v);for(let Z of z)yield{...Z,refinement:g}}})}t.Struct=h,t.StructError=e,t.any=B,t.array=te,t.assert=p,t.assign=S,t.bigint=J,t.boolean=me,t.coerce=ht,t.create=c,t.date=ye,t.defaulted=xs,t.define=_,t.deprecated=x,t.dynamic=R,t.empty=ct,t.enums=rt,t.func=Ss,t.instance=E,t.integer=M,t.intersection=U,t.is=y,t.lazy=O,t.literal=de,t.map=P,t.mask=f,t.max=Ts,t.min=ki,t.never=Se,t.nonempty=og,t.nullable=it,t.number=At,t.object=He,t.omit=A,t.optional=Mr,t.partial=D,t.pattern=lg,t.pick=F,t.record=Qt,t.refine=qt,t.regexp=Es,t.set=Te,t.size=ug,t.string=kr,t.struct=N,t.trimmed=Dt,t.tuple=Rs,t.type=ft,t.union=Mi,t.unknown=Pt,t.validate=b})});var Xd=w(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.validateRequirements=void 0;var M_="[",k_="(<=>!~",A_=";",P_="@",D_=new RegExp(`[${M_+k_+A_+P_}]`);function q_(t){return t.split(D_)[0].trim()}function C_(t){return t.forEach(r=>{let i;try{i=new URL(r)}catch{return}if(i.protocol==="emfs:"||i.protocol==="file:")throw new Error(`"emfs:" and "file:" protocols are not allowed for the requirement (${r})`)}),t.filter(r=>q_(r)==="streamlit"?(console.warn(`Streamlit is specified in the requirements ("${r}"), but it will be ignored. A built-in version of Streamlit will be used.`),!1):!0)}Qn.validateRequirements=C_});var ep=w(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.parseRequirementsTxt=void 0;var L_=/\s#.*$/;function j_(t){return t.split(`
|
|
33
|
+
`).filter(e=>!e.startsWith("#")).map(e=>e.replace(L_,"")).map(e=>e.trim()).filter(e=>e!=="")}Xn.parseRequirementsTxt=j_});var tp=w(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.PromiseDelegate=void 0;var Co=class{constructor(){this.promise=new Promise((e,r)=>{this.resolveInternal=e,this.rejectInternal=r})}resolve(e){this.resolveInternal(e)}reject(e){this.rejectInternal(e)}};es.PromiseDelegate=Co});var rp=w(ot=>{"use strict";var N_=ot&&ot.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,i,n)}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),Lo=ot&&ot.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&N_(e,t,r)};Object.defineProperty(ot,"__esModule",{value:!0});Lo(Xd(),ot);Lo(ep(),ot);Lo(tp(),ot)});var op=w((BR,ap)=>{"use strict";ap.exports=np;function np(t,e,r){t instanceof RegExp&&(t=ip(t,r)),e instanceof RegExp&&(e=ip(e,r));var i=sp(t,e,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+t.length,i[1]),post:r.slice(i[1]+e.length)}}function ip(t,e){var r=e.match(t);return r?r[0]:null}np.range=sp;function sp(t,e,r){var i,n,s,a,o,l=r.indexOf(t),u=r.indexOf(e,l+1),h=l;if(l>=0&&u>0){if(t===e)return[l,u];for(i=[],s=r.length;h>=0&&!o;)h==l?(i.push(h),l=r.indexOf(t,h+1)):i.length==1?o=[i.pop(),u]:(n=i.pop(),n<s&&(s=n,a=u),u=r.indexOf(e,h+1)),h=l<u&&l>=0?l:u;i.length&&(o=[s,a])}return o}});var gp=w((UR,pp)=>{var lp=op();pp.exports=$_;var up="\0SLASH"+Math.random()+"\0",fp="\0OPEN"+Math.random()+"\0",No="\0CLOSE"+Math.random()+"\0",hp="\0COMMA"+Math.random()+"\0",cp="\0PERIOD"+Math.random()+"\0";function jo(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function F_(t){return t.split("\\\\").join(up).split("\\{").join(fp).split("\\}").join(No).split("\\,").join(hp).split("\\.").join(cp)}function I_(t){return t.split(up).join("\\").split(fp).join("{").split(No).join("}").split(hp).join(",").split(cp).join(".")}function dp(t){if(!t)return[""];var e=[],r=lp("{","}",t);if(!r)return t.split(",");var i=r.pre,n=r.body,s=r.post,a=i.split(",");a[a.length-1]+="{"+n+"}";var o=dp(s);return s.length&&(a[a.length-1]+=o.shift(),a.push.apply(a,o)),e.push.apply(e,a),e}function $_(t){return t?(t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),hi(F_(t),!0).map(I_)):[]}function W_(t){return"{"+t+"}"}function B_(t){return/^-?0\d/.test(t)}function U_(t,e){return t<=e}function z_(t,e){return t>=e}function hi(t,e){var r=[],i=lp("{","}",t);if(!i)return[t];var n=i.pre,s=i.post.length?hi(i.post,!1):[""];if(/\$$/.test(i.pre))for(var a=0;a<s.length;a++){var o=n+"{"+i.body+"}"+s[a];r.push(o)}else{var l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),h=l||u,p=i.body.indexOf(",")>=0;if(!h&&!p)return i.post.match(/,.*\}/)?(t=i.pre+"{"+i.body+No+i.post,hi(t)):[t];var c;if(h)c=i.body.split(/\.\./);else if(c=dp(i.body),c.length===1&&(c=hi(c[0],!1).map(W_),c.length===1))return s.map(function(te){return i.pre+c[0]+te});var f;if(h){var y=jo(c[0]),b=jo(c[1]),S=Math.max(c[0].length,c[1].length),_=c.length==3?Math.abs(jo(c[2])):1,x=U_,R=b<y;R&&(_*=-1,x=z_);var O=c.some(B_);f=[];for(var A=y;x(A,b);A+=_){var D;if(u)D=String.fromCharCode(A),D==="\\"&&(D="");else if(D=String(A),O){var F=S-D.length;if(F>0){var N=new Array(F+1).join("0");A<0?D="-"+N+D.slice(1):D=N+D}}f.push(D)}}else{f=[];for(var B=0;B<c.length;B++)f.push.apply(f,hi(c[B],!1))}for(var B=0;B<f.length;B++)for(var a=0;a<s.length;a++){var o=n+f[B]+s[a];(!e||h||o)&&r.push(o)}}return r}});var ig=Ee(require("yargs")),ng=require("yargs/helpers"),ce=Ee(require("node:path")),tt=Ee(require("node:fs/promises")),tl=Ee(require("fs-extra")),rl=require("pyodide");var nl=require("pyodide");function Pi(t){return`https://cdn.jsdelivr.net/pyodide/v${nl.version}/full/${t}`}var xt=Ee(Hd()),I=xt.createLogger({transports:[new xt.transports.Console({format:xt.format.combine(xt.format.splat(),xt.format.cli())})]});function ui(t){process.emitWarning(t,{type:"DeprecationWarning"})}var fi=class t{static _instance;_data=null;constructor(){}static async loadPrebuiltPackageData(){let e=Pi("pyodide-lock.json");return I.info(`Load the Pyodide pyodide-lock.json from ${e}`),(await(await fetch(e,void 0)).json()).packages}static async getInstance(){return this._instance==null&&(this._instance=new t,this._instance._data=await this.loadPrebuiltPackageData()),this._instance}getPackageInfoByName(e){if(this._data==null)throw new Error("The package data is not loaded yet.");let r=Object.values(this._data).find(i=>i.name===e);if(r==null)throw new Error(`Package ${e} is not found in the lock file.`);return r}};var Vd=Ee(require("node:fs/promises")),Kd=Ee(Zn());var X=Ee(Zn()),Yd=X.object({entrypoint:X.string(),embed:X.defaulted(X.boolean(),!1),idbfsMountpoints:X.optional(X.array(X.string())),nodeJsWorker:X.defaulted(X.boolean(),!1),nodefsMountpoints:X.optional(X.record(X.string(),X.string()))});function R_(t){let e=Kd.mask(t??{},Yd);if(e.nodeJsWorker){if(e.idbfsMountpoints!=null)throw new Error("The `idbfsMountpoints` field is not allowed when `nodeJsWorker` is true.")}else if(e.nodefsMountpoints!=null)throw new Error("The `nodefsMountpoints` field is not allowed when `nodeJsWorker` is false.");return e}async function Jd(t){let e=R_({...t.packageJsonStliteDesktopField,...t.fallbacks});I.info("App manifest: %j",e);let r=JSON.stringify(e,null,2);I.info(`Dump the manifest file -> ${t.manifestFilePath}`),await Vd.default.writeFile(t.manifestFilePath,r,{encoding:"utf-8"})}var Zd=Ee(require("node:path")),fe=Ee(Zn());async function Qd(t){let{files:e,entrypoint:r}=x_(t),i=await T_(t),n=await O_(t);return{files:e,entrypoint:r,dependencies:i,requirementsTxtFilePaths:n}}function x_(t){let{packageJsonStliteDesktopField:e,fallbacks:{appHomeDirSource:r}}=t,i=e?.files,n=e?.entrypoint;if(i==null||n==null){ui("Missing `stlite.desktop.files` and `stlite.desktop.entrypoint` in `package.json`. Falling back to the `appHomeDirSource` argument to determine the app directory. Please update your `package.json` as this fallback is deprecated and will be removed in a future release.");let s=r;if(typeof s!="string")throw new Error("The `appHomeDirSource` argument is required when `stlite.desktop.files` and `stlite.desktop.entrypoint` are not found in the package.json. Note that `appHomeDirSource` is deprecated and will be removed in the future, so please specify `stlite.desktop.files` and `stlite.desktop.entrypoint` in the package.json.");i=[s],n=`./${s}/streamlit_app.py`}else r!=null&&ui("The `appHomeDirSource` argument is deprecated and has been ignored because `stlite.desktop.files` is specified in `package.json`.");return fe.assert(n,fe.string(),"The `stlite.desktop.entrypoint` field must be a string."),fe.assert(i,fe.array(fe.string()),"The `stlite.desktop.files` field must be an array of strings."),{files:i,entrypoint:n}}async function T_(t){let{packageJsonStliteDesktopField:e,fallbacks:{packages:r}}=t,i=e?.dependencies;fe.assert(i,fe.optional(fe.array(fe.string())),"The `stlite.desktop.dependencies` field must be an array of strings.");let n=[];return r!=null&&(ui("The `packages` argument is deprecated and will be removed in a future release. Use `stlite.desktop.dependencies` in your `package.json` instead."),n=r),[...i??[],...n]}async function O_(t){let{pathResolutionRoot:e,packageJsonStliteDesktopField:r,fallbacks:{requirementsTxtFilePaths:i}}=t,n=r?.requirementsTxtFiles;fe.assert(n,fe.optional(fe.array(fe.string())),"The `stlite.desktop.requirementsTxtFiles` field must be an array of strings.");let s=n?.map(o=>Zd.default.resolve(e,o)),a=[];return i!=null&&i.length>0&&(ui("The `requirement` argument is deprecated and will be removed in a future release. Use `stlite.desktop.requirementsTxtFiles` in your `package.json` instead."),a=i),[...s??[],...a]}var _s=Ee(rp());var Ep=Ee(gp(),1);var ci=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")};var H_={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},di=t=>t.replace(/[[\]\\-]/g,"\\$&"),G_=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),mp=t=>t.join(""),yp=(t,e)=>{let r=e;if(t.charAt(r)!=="[")throw new Error("not in a brace expression");let i=[],n=[],s=r+1,a=!1,o=!1,l=!1,u=!1,h=r,p="";e:for(;s<t.length;){let b=t.charAt(s);if((b==="!"||b==="^")&&s===r+1){u=!0,s++;continue}if(b==="]"&&a&&!l){h=s+1;break}if(a=!0,b==="\\"&&!l){l=!0,s++;continue}if(b==="["&&!l){for(let[S,[_,x,R]]of Object.entries(H_))if(t.startsWith(S,s)){if(p)return["$.",!1,t.length-r,!0];s+=S.length,R?n.push(_):i.push(_),o=o||x;continue e}}if(l=!1,p){b>p?i.push(di(p)+"-"+di(b)):b===p&&i.push(di(b)),p="",s++;continue}if(t.startsWith("-]",s+1)){i.push(di(b+"-")),s+=2;continue}if(t.startsWith("-",s+1)){p=b,s+=2;continue}i.push(di(b)),s++}if(h<s)return["",!1,0,!1];if(!i.length&&!n.length)return["$.",!1,t.length-r,!0];if(n.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!u){let b=i[0].length===2?i[0].slice(-1):i[0];return[G_(b),!1,h-r,!1]}let c="["+(u?"^":"")+mp(i)+"]",f="["+(u?"":"^")+mp(n)+"]";return[i.length&&n.length?"("+c+"|"+f+")":i.length?c:f,o,h-r,!0]};var We=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var Y_=new Set(["!","?","+","*","@"]),bp=t=>Y_.has(t),V_="(?!(?:^|/)\\.\\.?(?:$|/))",ts="(?!\\.)",K_=new Set(["[","."]),J_=new Set(["..","."]),Z_=new Set("().*{}+?[]^$\\!"),Q_=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Fo="[^/]",wp=Fo+"*?",vp=Fo+"+?",br=class t{type;#e;#r;#s=!1;#i=[];#o;#u;#h;#l=!1;#a;#t;#g=!1;constructor(e,r,i={}){this.type=e,e&&(this.#r=!0),this.#o=r,this.#e=this.#o?this.#o.#e:this,this.#a=this.#e===this?i:this.#e.#a,this.#h=this.#e===this?[]:this.#e.#h,e==="!"&&!this.#e.#l&&this.#h.push(this),this.#u=this.#o?this.#o.#i.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let e of this.#i)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#t!==void 0?this.#t:this.type?this.#t=this.type+"("+this.#i.map(e=>String(e)).join("|")+")":this.#t=this.#i.map(e=>String(e)).join("")}#y(){if(this!==this.#e)throw new Error("should only call on root");if(this.#l)return this;this.toString(),this.#l=!0;let e;for(;e=this.#h.pop();){if(e.type!=="!")continue;let r=e,i=r.#o;for(;i;){for(let n=r.#u+1;!i.type&&n<i.#i.length;n++)for(let s of e.#i){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(i.#i[n])}r=i,i=r.#o}}return this}push(...e){for(let r of e)if(r!==""){if(typeof r!="string"&&!(r instanceof t&&r.#o===this))throw new Error("invalid part: "+r);this.#i.push(r)}}toJSON(){let e=this.type===null?this.#i.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#i.map(r=>r.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#l&&this.#o?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#o?.isStart())return!1;if(this.#u===0)return!0;let e=this.#o;for(let r=0;r<this.#u;r++){let i=e.#i[r];if(!(i instanceof t&&i.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#o?.type==="!")return!0;if(!this.#o?.isEnd())return!1;if(!this.type)return this.#o?.isEnd();let e=this.#o?this.#o.#i.length:0;return this.#u===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let r=new t(this.type,e);for(let i of this.#i)r.copyIn(i);return r}static#d(e,r,i,n){let s=!1,a=!1,o=-1,l=!1;if(r.type===null){let f=i,y="";for(;f<e.length;){let b=e.charAt(f++);if(s||b==="\\"){s=!s,y+=b;continue}if(a){f===o+1?(b==="^"||b==="!")&&(l=!0):b==="]"&&!(f===o+2&&l)&&(a=!1),y+=b;continue}else if(b==="["){a=!0,o=f,l=!1,y+=b;continue}if(!n.noext&&bp(b)&&e.charAt(f)==="("){r.push(y),y="";let S=new t(b,r);f=t.#d(e,S,f,n),r.push(S);continue}y+=b}return r.push(y),f}let u=i+1,h=new t(null,r),p=[],c="";for(;u<e.length;){let f=e.charAt(u++);if(s||f==="\\"){s=!s,c+=f;continue}if(a){u===o+1?(f==="^"||f==="!")&&(l=!0):f==="]"&&!(u===o+2&&l)&&(a=!1),c+=f;continue}else if(f==="["){a=!0,o=u,l=!1,c+=f;continue}if(bp(f)&&e.charAt(u)==="("){h.push(c),c="";let y=new t(f,h);h.push(y),u=t.#d(e,y,u,n);continue}if(f==="|"){h.push(c),c="",p.push(h),h=new t(null,r);continue}if(f===")")return c===""&&r.#i.length===0&&(r.#g=!0),h.push(c),c="",r.push(...p,h),u;c+=f}return r.type=null,r.#r=void 0,r.#i=[e.substring(i-1)],u}static fromGlob(e,r={}){let i=new t(null,void 0,r);return t.#d(e,i,0,r),i}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[r,i,n,s]=this.toRegExpSource();if(!(n||this.#r||this.#a.nocase&&!this.#a.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return i;let o=(this.#a.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${r}$`,o),{_src:r,_glob:e})}toRegExpSource(e){let r=e??!!this.#a.dot;if(this.#e===this&&this.#y(),!this.type){let l=this.isStart()&&this.isEnd(),u=this.#i.map(f=>{let[y,b,S,_]=typeof f=="string"?t.#v(f,this.#r,l):f.toRegExpSource(e);return this.#r=this.#r||S,this.#s=this.#s||_,y}).join(""),h="";if(this.isStart()&&typeof this.#i[0]=="string"&&!(this.#i.length===1&&J_.has(this.#i[0]))){let y=K_,b=r&&y.has(u.charAt(0))||u.startsWith("\\.")&&y.has(u.charAt(2))||u.startsWith("\\.\\.")&&y.has(u.charAt(4)),S=!r&&!e&&y.has(u.charAt(0));h=b?V_:S?ts:""}let p="";return this.isEnd()&&this.#e.#l&&this.#o?.type==="!"&&(p="(?:$|\\/)"),[h+u+p,We(u),this.#r=!!this.#r,this.#s]}let i=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#c(r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let l=this.toString();return this.#i=[l],this.type=null,this.#r=void 0,[l,We(this.toString()),!1,!1]}let a=!i||e||r||!ts?"":this.#c(!0);a===s&&(a=""),a&&(s=`(?:${s})(?:${a})*?`);let o="";if(this.type==="!"&&this.#g)o=(this.isStart()&&!r?ts:"")+vp;else{let l=this.type==="!"?"))"+(this.isStart()&&!r&&!e?ts:"")+wp+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;o=n+s+l}return[o,We(s),this.#r=!!this.#r,this.#s]}#c(e){return this.#i.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[i,n,s,a]=r.toRegExpSource(e);return this.#s=this.#s||a,i}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#v(e,r,i=!1){let n=!1,s="",a=!1;for(let o=0;o<e.length;o++){let l=e.charAt(o);if(n){n=!1,s+=(Z_.has(l)?"\\":"")+l;continue}if(l==="\\"){o===e.length-1?s+="\\\\":n=!0;continue}if(l==="["){let[u,h,p,c]=yp(e,o);if(p){s+=u,a=a||h,o+=p-1,r=r||c;continue}}if(l==="*"){i&&e==="*"?s+=vp:s+=wp,r=!0;continue}if(l==="?"){s+=Fo,r=!0;continue}s+=Q_(l)}return[s,We(e),!!r,a]}};var wr=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");var ve=(t,e,r={})=>(ci(e),!r.nocomment&&e.charAt(0)==="#"?!1:new ke(e,r).match(t)),X_=/^\*+([^+@!?\*\[\(]*)$/,eS=t=>e=>!e.startsWith(".")&&e.endsWith(t),tS=t=>e=>e.endsWith(t),rS=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),iS=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),nS=/^\*+\.\*+$/,sS=t=>!t.startsWith(".")&&t.includes("."),aS=t=>t!=="."&&t!==".."&&t.includes("."),oS=/^\.\*+$/,lS=t=>t!=="."&&t!==".."&&t.startsWith("."),uS=/^\*+$/,fS=t=>t.length!==0&&!t.startsWith("."),hS=t=>t.length!==0&&t!=="."&&t!=="..",cS=/^\?+([^+@!?\*\[\(]*)?$/,dS=([t,e=""])=>{let r=Rp([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},pS=([t,e=""])=>{let r=xp([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},gS=([t,e=""])=>{let r=xp([t]);return e?i=>r(i)&&i.endsWith(e):r},mS=([t,e=""])=>{let r=Rp([t]);return e?i=>r(i)&&i.endsWith(e):r},Rp=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},xp=([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},Tp=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",_p={win32:{sep:"\\"},posix:{sep:"/"}},yS=Tp==="win32"?_p.win32.sep:_p.posix.sep;ve.sep=yS;var he=Symbol("globstar **");ve.GLOBSTAR=he;var bS="[^/]",wS=bS+"*?",vS="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",_S="(?:(?!(?:\\/|^)\\.).)*?",SS=(t,e={})=>r=>ve(r,t,e);ve.filter=SS;var Le=(t,e={})=>Object.assign({},t,e),ES=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return ve;let e=ve;return Object.assign((i,n,s={})=>e(i,n,Le(t,s)),{Minimatch:class extends e.Minimatch{constructor(n,s={}){super(n,Le(t,s))}static defaults(n){return e.defaults(Le(t,n)).Minimatch}},AST:class extends e.AST{constructor(n,s,a={}){super(n,s,Le(t,a))}static fromGlob(n,s={}){return e.AST.fromGlob(n,Le(t,s))}},unescape:(i,n={})=>e.unescape(i,Le(t,n)),escape:(i,n={})=>e.escape(i,Le(t,n)),filter:(i,n={})=>e.filter(i,Le(t,n)),defaults:i=>e.defaults(Le(t,i)),makeRe:(i,n={})=>e.makeRe(i,Le(t,n)),braceExpand:(i,n={})=>e.braceExpand(i,Le(t,n)),match:(i,n,s={})=>e.match(i,n,Le(t,s)),sep:e.sep,GLOBSTAR:he})};ve.defaults=ES;var Op=(t,e={})=>(ci(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,Ep.default)(t));ve.braceExpand=Op;var RS=(t,e={})=>new ke(t,e).makeRe();ve.makeRe=RS;var xS=(t,e,r={})=>{let i=new ke(e,r);return t=t.filter(n=>i.match(n)),i.options.nonull&&!t.length&&t.push(e),t};ve.match=xS;var Sp=/[?*]|[+@!]\(.*?\)|\[|\]/,TS=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ke=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,r={}){ci(e),r=r||{},this.options=r,this.pattern=e,this.platform=r.platform||Tp,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let r of e)if(typeof r!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((s,a,o)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=s[0]===""&&s[1]===""&&(s[2]==="?"||!Sp.test(s[2]))&&!Sp.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map(h=>this.parse(h))];if(u)return[s[0],...s.slice(1).map(h=>this.parse(h))]}return s.map(l=>this.parse(l))});if(this.debug(this.pattern,n),this.set=n.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let a=this.set[s];a[0]===""&&a[1]===""&&this.globParts[s][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let i=0;i<e.length;i++)for(let n=0;n<e[i].length;n++)e[i][n]==="**"&&(e[i][n]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):r>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(r=>{let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let n=i;for(;r[n+1]==="**";)n++;n!==i&&r.splice(i,n-i)}return r})}levelOneOptimize(e){return e.map(r=>(r=r.reduce((i,n)=>{let s=i[i.length-1];return n==="**"&&s==="**"?i:n===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(i.pop(),i):(i.push(n),i)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let s=e[n];n===1&&s===""&&e[0]===""||(s==="."||s==="")&&(r=!0,e.splice(n,1),n--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(r=!0,e.pop())}let i=0;for(;(i=e.indexOf("..",i+1))!==-1;){let n=e[i-1];n&&n!=="."&&n!==".."&&n!=="**"&&(r=!0,e.splice(i-1,2),i-=2)}}while(r);return e.length===0?[""]:e}firstPhasePreProcess(e){let r=!1;do{r=!1;for(let i of e){let n=-1;for(;(n=i.indexOf("**",n+1))!==-1;){let a=n;for(;i[a+1]==="**";)a++;a>n&&i.splice(n+1,a-n);let o=i[n+1],l=i[n+2],u=i[n+3];if(o!==".."||!l||l==="."||l===".."||!u||u==="."||u==="..")continue;r=!0,i.splice(n,1);let h=i.slice(0);h[n]="**",e.push(h),n--}if(!this.preserveMultipleSlashes){for(let a=1;a<i.length-1;a++){let o=i[a];a===1&&o===""&&i[0]===""||(o==="."||o==="")&&(r=!0,i.splice(a,1),a--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(r=!0,i.pop())}let s=0;for(;(s=i.indexOf("..",s+1))!==-1;){let a=i[s-1];if(a&&a!=="."&&a!==".."&&a!=="**"){r=!0;let l=s===1&&i[s+1]==="**"?["."]:[];i.splice(s-1,2,...l),i.length===0&&i.push(""),s-=2}}}}while(r);return e}secondPhasePreProcess(e){for(let r=0;r<e.length-1;r++)for(let i=r+1;i<e.length;i++){let n=this.partsMatch(e[r],e[i],!this.preserveMultipleSlashes);n&&(e[r]=n,e[i]=[])}return e.filter(r=>r.length)}partsMatch(e,r,i=!1){let n=0,s=0,a=[],o="";for(;n<e.length&&s<r.length;)if(e[n]===r[s])a.push(o==="b"?r[s]:e[n]),n++,s++;else if(i&&e[n]==="**"&&r[s]===e[n+1])a.push(e[n]),n++;else if(i&&r[s]==="**"&&e[n]===r[s+1])a.push(r[s]),s++;else if(e[n]==="*"&&r[s]&&(this.options.dot||!r[s].startsWith("."))&&r[s]!=="**"){if(o==="b")return!1;o="a",a.push(e[n]),n++,s++}else if(r[s]==="*"&&e[n]&&(this.options.dot||!e[n].startsWith("."))&&e[n]!=="**"){if(o==="a")return!1;o="b",a.push(r[s]),n++,s++}else return!1;return e.length===r.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,r=!1,i=0;for(let n=0;n<e.length&&e.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=e.slice(i)),this.negate=r}matchOne(e,r,i=!1){let n=this.options;if(this.isWindows){let b=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),S=!b&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),_=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),x=!_&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),R=S?3:b?0:void 0,O=x?3:_?0:void 0;if(typeof R=="number"&&typeof O=="number"){let[A,D]=[e[R],r[O]];A.toLowerCase()===D.toLowerCase()&&(r[O]=A,O>R?r=r.slice(O):R>O&&(e=e.slice(R)))}}let{optimizationLevel:s=1}=this.options;s>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:r}),this.debug("matchOne",e.length,r.length);for(var a=0,o=0,l=e.length,u=r.length;a<l&&o<u;a++,o++){this.debug("matchOne loop");var h=r[o],p=e[a];if(this.debug(r,h,p),h===!1)return!1;if(h===he){this.debug("GLOBSTAR",[r,h,p]);var c=a,f=o+1;if(f===u){for(this.debug("** at the end");a<l;a++)if(e[a]==="."||e[a]===".."||!n.dot&&e[a].charAt(0)===".")return!1;return!0}for(;c<l;){var y=e[c];if(this.debug(`
|
|
34
34
|
globstar while`,e,c,r,f,y),this.matchOne(e.slice(c),r.slice(f),i))return this.debug("globstar found match!",c,l,y),!0;if(y==="."||y===".."||!n.dot&&y.charAt(0)==="."){this.debug("dot detected!",e,c,r,f);break}this.debug("globstar swallow a segment, and continue"),c++}return!!(i&&(this.debug(`
|
|
35
|
-
>>> no match, partial?`,e,c,r,f),c===l))}let b;if(typeof h=="string"?(b=p===h,this.debug("string match",h,p,b)):(b=h.test(p),this.debug("pattern match",h,p,b)),!b)return!1}if(a===l&&o===u)return!0;if(a===l)return i;if(o===u)return a===l-1&&e[a]==="";throw new Error("wtf?")}braceExpand(){return kp(this.pattern,this.options)}parse(e){ci(e);let r=this.options;if(e==="**")return he;if(e==="")return"";let i,n=null;(i=e.match(hS))?n=r.dot?dS:cS:(i=e.match(tS))?n=(r.nocase?r.dot?sS:nS:r.dot?iS:rS)(i[1]):(i=e.match(pS))?n=(r.nocase?r.dot?mS:gS:r.dot?yS:bS)(i):(i=e.match(aS))?n=r.dot?lS:oS:(i=e.match(uS))&&(n=fS);let s=br.fromGlob(e,this.options).toMMPattern();return n?Object.assign(s,{test:n}):s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,i=r.noglobstar?_S:r.dot?SS:ES,n=new Set(r.nocase?["i"]:[]),s=e.map(l=>{let u=l.map(h=>{if(h instanceof RegExp)for(let p of h.flags.split(""))n.add(p);return typeof h=="string"?MS(h):h===he?he:h._src});return u.forEach((h,p)=>{let c=u[p+1],f=u[p-1];h!==he||f===he||(f===void 0?c!==void 0&&c!==he?u[p+1]="(?:\\/|"+i+"\\/)?"+c:u[p]=i:c===void 0?u[p-1]=f+"(?:\\/|"+i+")?":c!==he&&(u[p-1]=f+"(?:\\/|\\/"+i+"\\/)"+c,u[p+1]=he))}),u.filter(h=>h!==he).join("/")}).join("|"),[a,o]=e.length>1?["(?:",")"]:["",""];s="^"+a+s+o+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let i=this.options;this.isWindows&&(e=e.split("\\").join("/"));let n=this.slashSplit(e);this.debug(this.pattern,"split",n);let s=this.set;this.debug(this.pattern,"set",s);let a=n[n.length-1];if(!a)for(let o=n.length-2;!a&&o>=0;o--)a=n[o];for(let o=0;o<s.length;o++){let l=s[o],u=n;if(i.matchBase&&l.length===1&&(u=[a]),this.matchOne(u,l,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(e){return _e.defaults(e).Minimatch}};_e.AST=br;_e.Minimatch=ke;_e.escape=wr;_e.unescape=We;var vr=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Pp=new Set,Io=typeof process=="object"&&process?process:{},Dp=(t,e,r,i)=>{typeof Io.emitWarning=="function"?Io.emitWarning(t,e,r,i):console.error(`[${r}] ${e}: ${t}`)},rs=globalThis.AbortController,Ap=globalThis.AbortSignal;if(typeof rs>"u"){Ap=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,n){this._onabort.push(n)}},rs=class{constructor(){e()}signal=new Ap;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let n of this.signal._onabort)n(i);this.signal.onabort?.(i)}}};let t=Io.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,Dp("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}var kS=t=>!Pp.has(t),hx=Symbol("type"),Tt=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),qp=t=>Tt(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?_r:null:null,_r=class extends Array{constructor(e){super(e),this.fill(0)}},$o=class t{heap;length;static#e=!1;static create(e){let r=qp(e);if(!r)return[];t.#e=!0;let i=new t(e,r);return t.#e=!1,i}constructor(e,r){if(!t.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},pi=class t{#e;#r;#s;#i;#o;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#u;#h;#l;#a;#t;#g;#y;#d;#c;#v;#m;#x;#T;#_;#w;#M;#p;static unsafeExposeInternals(e){return{starts:e.#T,ttls:e.#_,sizes:e.#x,keyMap:e.#l,keyList:e.#a,valList:e.#t,next:e.#g,prev:e.#y,get head(){return e.#d},get tail(){return e.#c},free:e.#v,isBackgroundFetch:r=>e.#f(r),backgroundFetch:(r,i,n,s)=>e.#C(r,i,n,s),moveToTail:r=>e.#q(r),indexes:r=>e.#R(r),rindexes:r=>e.#k(r),isStale:r=>e.#b(r)}}get max(){return this.#e}get maxSize(){return this.#r}get calculatedSize(){return this.#h}get size(){return this.#u}get fetchMethod(){return this.#o}get dispose(){return this.#s}get disposeAfter(){return this.#i}constructor(e){let{max:r=0,ttl:i,ttlResolution:n=1,ttlAutopurge:s,updateAgeOnGet:a,updateAgeOnHas:o,allowStale:l,dispose:u,disposeAfter:h,noDisposeOnSet:p,noUpdateTTL:c,maxSize:f=0,maxEntrySize:y=0,sizeCalculation:b,fetchMethod:S,noDeleteOnFetchRejection:_,noDeleteOnStaleGet:x,allowStaleOnFetchRejection:R,allowStaleOnFetchAbort:O,ignoreFetchAbort:A}=e;if(r!==0&&!Tt(r))throw new TypeError("max option must be a nonnegative integer");let D=r?qp(r):Array;if(!D)throw new Error("invalid max value: "+r);if(this.#e=r,this.#r=f,this.maxEntrySize=y||this.#r,this.sizeCalculation=b,this.sizeCalculation){if(!this.#r&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(S!==void 0&&typeof S!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#o=S,this.#M=!!S,this.#l=new Map,this.#a=new Array(r).fill(void 0),this.#t=new Array(r).fill(void 0),this.#g=new D(r),this.#y=new D(r),this.#d=0,this.#c=0,this.#v=$o.create(r),this.#u=0,this.#h=0,typeof u=="function"&&(this.#s=u),typeof h=="function"?(this.#i=h,this.#m=[]):(this.#i=void 0,this.#m=void 0),this.#w=!!this.#s,this.#p=!!this.#i,this.noDisposeOnSet=!!p,this.noUpdateTTL=!!c,this.noDeleteOnFetchRejection=!!_,this.allowStaleOnFetchRejection=!!R,this.allowStaleOnFetchAbort=!!O,this.ignoreFetchAbort=!!A,this.maxEntrySize!==0){if(this.#r!==0&&!Tt(this.#r))throw new TypeError("maxSize must be a positive integer if specified");if(!Tt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#P()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!x,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!o,this.ttlResolution=Tt(n)||n===0?n:1,this.ttlAutopurge=!!s,this.ttl=i||0,this.ttl){if(!Tt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#A()}if(this.#e===0&&this.ttl===0&&this.#r===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#r){let F="LRU_CACHE_UNBOUNDED";kS(F)&&(Pp.add(F),Dp("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",F,t))}}getRemainingTTL(e){return this.#l.has(e)?1/0:0}#A(){let e=new _r(this.#e),r=new _r(this.#e);this.#_=e,this.#T=r,this.#n=(s,a,o=vr.now())=>{if(r[s]=a!==0?o:0,e[s]=a,a!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#b(s)&&this.delete(this.#a[s])},a+1);l.unref&&l.unref()}},this.#O=s=>{r[s]=e[s]!==0?vr.now():0},this.#S=(s,a)=>{if(e[a]){let o=e[a],l=r[a];if(!o||!l)return;s.ttl=o,s.start=l,s.now=i||n();let u=s.now-l;s.remainingTTL=o-u}};let i=0,n=()=>{let s=vr.now();if(this.ttlResolution>0){i=s;let a=setTimeout(()=>i=0,this.ttlResolution);a.unref&&a.unref()}return s};this.getRemainingTTL=s=>{let a=this.#l.get(s);if(a===void 0)return 0;let o=e[a],l=r[a];if(!o||!l)return 1/0;let u=(i||n())-l;return o-u},this.#b=s=>{let a=r[s],o=e[s];return!!o&&!!a&&(i||n())-a>o}}#O=()=>{};#S=()=>{};#n=()=>{};#b=()=>!1;#P(){let e=new _r(this.#e);this.#h=0,this.#x=e,this.#E=r=>{this.#h-=e[r],e[r]=0},this.#j=(r,i,n,s)=>{if(this.#f(i))return 0;if(!Tt(n))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(n=s(i,r),!Tt(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return n},this.#L=(r,i,n)=>{if(e[r]=i,this.#r){let s=this.#r-e[r];for(;this.#h>s;)this.#D(!0)}this.#h+=e[r],n&&(n.entrySize=i,n.totalCalculatedSize=this.#h)}}#E=e=>{};#L=(e,r,i)=>{};#j=(e,r,i,n)=>{if(i||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#R({allowStale:e=this.allowStale}={}){if(this.#u)for(let r=this.#c;!(!this.#N(r)||((e||!this.#b(r))&&(yield r),r===this.#d));)r=this.#y[r]}*#k({allowStale:e=this.allowStale}={}){if(this.#u)for(let r=this.#d;!(!this.#N(r)||((e||!this.#b(r))&&(yield r),r===this.#c));)r=this.#g[r]}#N(e){return e!==void 0&&this.#l.get(this.#a[e])===e}*entries(){for(let e of this.#R())this.#t[e]!==void 0&&this.#a[e]!==void 0&&!this.#f(this.#t[e])&&(yield[this.#a[e],this.#t[e]])}*rentries(){for(let e of this.#k())this.#t[e]!==void 0&&this.#a[e]!==void 0&&!this.#f(this.#t[e])&&(yield[this.#a[e],this.#t[e]])}*keys(){for(let e of this.#R()){let r=this.#a[e];r!==void 0&&!this.#f(this.#t[e])&&(yield r)}}*rkeys(){for(let e of this.#k()){let r=this.#a[e];r!==void 0&&!this.#f(this.#t[e])&&(yield r)}}*values(){for(let e of this.#R())this.#t[e]!==void 0&&!this.#f(this.#t[e])&&(yield this.#t[e])}*rvalues(){for(let e of this.#k())this.#t[e]!==void 0&&!this.#f(this.#t[e])&&(yield this.#t[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,r={}){for(let i of this.#R()){let n=this.#t[i],s=this.#f(n)?n.__staleWhileFetching:n;if(s!==void 0&&e(s,this.#a[i],this))return this.get(this.#a[i],r)}}forEach(e,r=this){for(let i of this.#R()){let n=this.#t[i],s=this.#f(n)?n.__staleWhileFetching:n;s!==void 0&&e.call(r,s,this.#a[i],this)}}rforEach(e,r=this){for(let i of this.#k()){let n=this.#t[i],s=this.#f(n)?n.__staleWhileFetching:n;s!==void 0&&e.call(r,s,this.#a[i],this)}}purgeStale(){let e=!1;for(let r of this.#k({allowStale:!0}))this.#b(r)&&(this.delete(this.#a[r]),e=!0);return e}info(e){let r=this.#l.get(e);if(r===void 0)return;let i=this.#t[r],n=this.#f(i)?i.__staleWhileFetching:i;if(n===void 0)return;let s={value:n};if(this.#_&&this.#T){let a=this.#_[r],o=this.#T[r];if(a&&o){let l=a-(vr.now()-o);s.ttl=l,s.start=Date.now()}}return this.#x&&(s.size=this.#x[r]),s}dump(){let e=[];for(let r of this.#R({allowStale:!0})){let i=this.#a[r],n=this.#t[r],s=this.#f(n)?n.__staleWhileFetching:n;if(s===void 0||i===void 0)continue;let a={value:s};if(this.#_&&this.#T){a.ttl=this.#_[r];let o=vr.now()-this.#T[r];a.start=Math.floor(Date.now()-o)}this.#x&&(a.size=this.#x[r]),e.unshift([i,a])}return e}load(e){this.clear();for(let[r,i]of e){if(i.start){let n=Date.now()-i.start;i.start=vr.now()-n}this.set(r,i.value,i)}}set(e,r,i={}){if(r===void 0)return this.delete(e),this;let{ttl:n=this.ttl,start:s,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:l}=i,{noUpdateTTL:u=this.noUpdateTTL}=i,h=this.#j(e,r,i.size||0,o);if(this.maxEntrySize&&h>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.delete(e),this;let p=this.#u===0?void 0:this.#l.get(e);if(p===void 0)p=this.#u===0?this.#c:this.#v.length!==0?this.#v.pop():this.#u===this.#e?this.#D(!1):this.#u,this.#a[p]=e,this.#t[p]=r,this.#l.set(e,p),this.#g[this.#c]=p,this.#y[p]=this.#c,this.#c=p,this.#u++,this.#L(p,h,l),l&&(l.set="add"),u=!1;else{this.#q(p);let c=this.#t[p];if(r!==c){if(this.#M&&this.#f(c)){c.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:f}=c;f!==void 0&&!a&&(this.#w&&this.#s?.(f,e,"set"),this.#p&&this.#m?.push([f,e,"set"]))}else a||(this.#w&&this.#s?.(c,e,"set"),this.#p&&this.#m?.push([c,e,"set"]));if(this.#E(p),this.#L(p,h,l),this.#t[p]=r,l){l.set="replace";let f=c&&this.#f(c)?c.__staleWhileFetching:c;f!==void 0&&(l.oldValue=f)}}else l&&(l.set="update")}if(n!==0&&!this.#_&&this.#A(),this.#_&&(u||this.#n(p,n,s),l&&this.#S(l,p)),!a&&this.#p&&this.#m){let c=this.#m,f;for(;f=c?.shift();)this.#i?.(...f)}return this}pop(){try{for(;this.#u;){let e=this.#t[this.#d];if(this.#D(!0),this.#f(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#p&&this.#m){let e=this.#m,r;for(;r=e?.shift();)this.#i?.(...r)}}}#D(e){let r=this.#d,i=this.#a[r],n=this.#t[r];return this.#M&&this.#f(n)?n.__abortController.abort(new Error("evicted")):(this.#w||this.#p)&&(this.#w&&this.#s?.(n,i,"evict"),this.#p&&this.#m?.push([n,i,"evict"])),this.#E(r),e&&(this.#a[r]=void 0,this.#t[r]=void 0,this.#v.push(r)),this.#u===1?(this.#d=this.#c=0,this.#v.length=0):this.#d=this.#g[r],this.#l.delete(i),this.#u--,r}has(e,r={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:n}=r,s=this.#l.get(e);if(s!==void 0){let a=this.#t[s];if(this.#f(a)&&a.__staleWhileFetching===void 0)return!1;if(this.#b(s))n&&(n.has="stale",this.#S(n,s));else return i&&this.#O(s),n&&(n.has="hit",this.#S(n,s)),!0}else n&&(n.has="miss");return!1}peek(e,r={}){let{allowStale:i=this.allowStale}=r,n=this.#l.get(e);if(n===void 0||!i&&this.#b(n))return;let s=this.#t[n];return this.#f(s)?s.__staleWhileFetching:s}#C(e,r,i,n){let s=r===void 0?void 0:this.#t[r];if(this.#f(s))return s;let a=new rs,{signal:o}=i;o?.addEventListener("abort",()=>a.abort(o.reason),{signal:a.signal});let l={signal:a.signal,options:i,context:n},u=(b,S=!1)=>{let{aborted:_}=a.signal,x=i.ignoreFetchAbort&&b!==void 0;if(i.status&&(_&&!S?(i.status.fetchAborted=!0,i.status.fetchError=a.signal.reason,x&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),_&&!x&&!S)return p(a.signal.reason);let R=f;return this.#t[r]===f&&(b===void 0?R.__staleWhileFetching?this.#t[r]=R.__staleWhileFetching:this.delete(e):(i.status&&(i.status.fetchUpdated=!0),this.set(e,b,l.options))),b},h=b=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=b),p(b)),p=b=>{let{aborted:S}=a.signal,_=S&&i.allowStaleOnFetchAbort,x=_||i.allowStaleOnFetchRejection,R=x||i.noDeleteOnFetchRejection,O=f;if(this.#t[r]===f&&(!R||O.__staleWhileFetching===void 0?this.delete(e):_||(this.#t[r]=O.__staleWhileFetching)),x)return i.status&&O.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),O.__staleWhileFetching;if(O.__returned===O)throw b},c=(b,S)=>{let _=this.#o?.(e,s,l);_&&_ instanceof Promise&&_.then(x=>b(x===void 0?void 0:x),S),a.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(b(void 0),i.allowStaleOnFetchAbort&&(b=x=>u(x,!0)))})};i.status&&(i.status.fetchDispatched=!0);let f=new Promise(c).then(u,h),y=Object.assign(f,{__abortController:a,__staleWhileFetching:s,__returned:void 0});return r===void 0?(this.set(e,y,{...l.options,status:void 0}),r=this.#l.get(e)):this.#t[r]=y,y}#f(e){if(!this.#M)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof rs}async fetch(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:l=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:p=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:c=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:y=this.allowStaleOnFetchAbort,context:b,forceRefresh:S=!1,status:_,signal:x}=r;if(!this.#M)return _&&(_.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,status:_});let R={allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,ttl:a,noDisposeOnSet:o,size:l,sizeCalculation:u,noUpdateTTL:h,noDeleteOnFetchRejection:p,allowStaleOnFetchRejection:c,allowStaleOnFetchAbort:y,ignoreFetchAbort:f,status:_,signal:x},O=this.#l.get(e);if(O===void 0){_&&(_.fetch="miss");let A=this.#C(e,O,R,b);return A.__returned=A}else{let A=this.#t[O];if(this.#f(A)){let te=i&&A.__staleWhileFetching!==void 0;return _&&(_.fetch="inflight",te&&(_.returnedStale=!0)),te?A.__staleWhileFetching:A.__returned=A}let D=this.#b(O);if(!S&&!D)return _&&(_.fetch="hit"),this.#q(O),n&&this.#O(O),_&&this.#S(_,O),A;let F=this.#C(e,O,R,b),B=F.__staleWhileFetching!==void 0&&i;return _&&(_.fetch=D?"stale":"refresh",B&&D&&(_.returnedStale=!0)),B?F.__staleWhileFetching:F.__returned=F}}get(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:a}=r,o=this.#l.get(e);if(o!==void 0){let l=this.#t[o],u=this.#f(l);return a&&this.#S(a,o),this.#b(o)?(a&&(a.get="stale"),u?(a&&i&&l.__staleWhileFetching!==void 0&&(a.returnedStale=!0),i?l.__staleWhileFetching:void 0):(s||this.delete(e),a&&i&&(a.returnedStale=!0),i?l:void 0)):(a&&(a.get="hit"),u?l.__staleWhileFetching:(this.#q(o),n&&this.#O(o),l))}else a&&(a.get="miss")}#F(e,r){this.#y[r]=e,this.#g[e]=r}#q(e){e!==this.#c&&(e===this.#d?this.#d=this.#g[e]:this.#F(this.#y[e],this.#g[e]),this.#F(this.#c,e),this.#c=e)}delete(e){let r=!1;if(this.#u!==0){let i=this.#l.get(e);if(i!==void 0)if(r=!0,this.#u===1)this.clear();else{this.#E(i);let n=this.#t[i];if(this.#f(n)?n.__abortController.abort(new Error("deleted")):(this.#w||this.#p)&&(this.#w&&this.#s?.(n,e,"delete"),this.#p&&this.#m?.push([n,e,"delete"])),this.#l.delete(e),this.#a[i]=void 0,this.#t[i]=void 0,i===this.#c)this.#c=this.#y[i];else if(i===this.#d)this.#d=this.#g[i];else{let s=this.#y[i];this.#g[s]=this.#g[i];let a=this.#g[i];this.#y[a]=this.#y[i]}this.#u--,this.#v.push(i)}}if(this.#p&&this.#m?.length){let i=this.#m,n;for(;n=i?.shift();)this.#i?.(...n)}return r}clear(){for(let e of this.#k({allowStale:!0})){let r=this.#t[e];if(this.#f(r))r.__abortController.abort(new Error("deleted"));else{let i=this.#a[e];this.#w&&this.#s?.(r,i,"delete"),this.#p&&this.#m?.push([r,i,"delete"])}}if(this.#l.clear(),this.#t.fill(void 0),this.#a.fill(void 0),this.#_&&this.#T&&(this.#_.fill(0),this.#T.fill(0)),this.#x&&this.#x.fill(0),this.#d=0,this.#c=0,this.#v.length=0,this.#h=0,this.#u=0,this.#p&&this.#m){let e=this.#m,r;for(;r=e?.shift();)this.#i?.(...r)}}};var Rr=require("path"),Up=require("url"),IS=pe(require("fs"),1),et=require("fs"),kt=require("fs/promises");var us=require("events"),Yo=pe(require("stream"),1),Fp=require("string_decoder"),Cp=typeof process=="object"&&process?process:{stdout:null,stderr:null},AS=t=>!!t&&typeof t=="object"&&(t instanceof Mt||t instanceof Yo.default||PS(t)||DS(t)),PS=t=>!!t&&typeof t=="object"&&t instanceof us.EventEmitter&&typeof t.pipe=="function"&&t.pipe!==Yo.default.Writable.prototype.pipe,DS=t=>!!t&&typeof t=="object"&&t instanceof us.EventEmitter&&typeof t.write=="function"&&typeof t.end=="function",lt=Symbol("EOF"),ut=Symbol("maybeEmitEnd"),Ot=Symbol("emittedEnd"),is=Symbol("emittingEnd"),gi=Symbol("emittedError"),ns=Symbol("closed"),Lp=Symbol("read"),ss=Symbol("flush"),jp=Symbol("flushChunk"),Be=Symbol("encoding"),Sr=Symbol("decoder"),se=Symbol("flowing"),mi=Symbol("paused"),Er=Symbol("resume"),ae=Symbol("buffer"),Se=Symbol("pipes"),oe=Symbol("bufferLength"),Wo=Symbol("bufferPush"),as=Symbol("bufferShift"),ge=Symbol("objectMode"),ee=Symbol("destroyed"),Bo=Symbol("error"),Uo=Symbol("emitData"),Np=Symbol("emitEnd"),zo=Symbol("emitEnd2"),Qe=Symbol("async"),Ho=Symbol("abort"),os=Symbol("aborted"),yi=Symbol("signal"),Jt=Symbol("dataListeners"),Ae=Symbol("discarded"),bi=t=>Promise.resolve().then(t),qS=t=>t(),CS=t=>t==="end"||t==="finish"||t==="prefinish",LS=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,jS=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),ls=class{src;dest;opts;ondrain;constructor(e,r,i){this.src=e,this.dest=r,this.opts=i,this.ondrain=()=>e[Er](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Go=class extends ls{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,i){super(e,r,i),this.proxyErrors=n=>r.emit("error",n),e.on("error",this.proxyErrors)}},NS=t=>!!t.objectMode,FS=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",Mt=class extends us.EventEmitter{[se]=!1;[mi]=!1;[Se]=[];[ae]=[];[ge];[Be];[Qe];[Sr];[lt]=!1;[Ot]=!1;[is]=!1;[ns]=!1;[gi]=null;[oe]=0;[ee]=!1;[yi];[os]=!1;[Jt]=0;[Ae]=!1;writable=!0;readable=!0;constructor(...e){let r=e[0]||{};if(super(),r.objectMode&&typeof r.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");NS(r)?(this[ge]=!0,this[Be]=null):FS(r)?(this[Be]=r.encoding,this[ge]=!1):(this[ge]=!1,this[Be]=null),this[Qe]=!!r.async,this[Sr]=this[Be]?new Fp.StringDecoder(this[Be]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[ae]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Se]});let{signal:i}=r;i&&(this[yi]=i,i.aborted?this[Ho]():i.addEventListener("abort",()=>this[Ho]()))}get bufferLength(){return this[oe]}get encoding(){return this[Be]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[ge]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Qe]}set async(e){this[Qe]=this[Qe]||!!e}[Ho](){this[os]=!0,this.emit("abort",this[yi]?.reason),this.destroy(this[yi]?.reason)}get aborted(){return this[os]}set aborted(e){}write(e,r,i){if(this[os])return!1;if(this[lt])throw new Error("write after end");if(this[ee])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(i=r,r="utf8"),r||(r="utf8");let n=this[Qe]?bi:qS;if(!this[ge]&&!Buffer.isBuffer(e)){if(jS(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(LS(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[ge]?(this[se]&&this[oe]!==0&&this[ss](!0),this[se]?this.emit("data",e):this[Wo](e),this[oe]!==0&&this.emit("readable"),i&&n(i),this[se]):e.length?(typeof e=="string"&&!(r===this[Be]&&!this[Sr]?.lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[Be]&&(e=this[Sr].write(e)),this[se]&&this[oe]!==0&&this[ss](!0),this[se]?this.emit("data",e):this[Wo](e),this[oe]!==0&&this.emit("readable"),i&&n(i),this[se]):(this[oe]!==0&&this.emit("readable"),i&&n(i),this[se])}read(e){if(this[ee])return null;if(this[Ae]=!1,this[oe]===0||e===0||e&&e>this[oe])return this[ut](),null;this[ge]&&(e=null),this[ae].length>1&&!this[ge]&&(this[ae]=[this[Be]?this[ae].join(""):Buffer.concat(this[ae],this[oe])]);let r=this[Lp](e||null,this[ae][0]);return this[ut](),r}[Lp](e,r){if(this[ge])this[as]();else{let i=r;e===i.length||e===null?this[as]():typeof i=="string"?(this[ae][0]=i.slice(e),r=i.slice(0,e),this[oe]-=e):(this[ae][0]=i.subarray(e),r=i.subarray(0,e),this[oe]-=e)}return this.emit("data",r),!this[ae].length&&!this[lt]&&this.emit("drain"),r}end(e,r,i){return typeof e=="function"&&(i=e,e=void 0),typeof r=="function"&&(i=r,r="utf8"),e!==void 0&&this.write(e,r),i&&this.once("end",i),this[lt]=!0,this.writable=!1,(this[se]||!this[mi])&&this[ut](),this}[Er](){this[ee]||(!this[Jt]&&!this[Se].length&&(this[Ae]=!0),this[mi]=!1,this[se]=!0,this.emit("resume"),this[ae].length?this[ss]():this[lt]?this[ut]():this.emit("drain"))}resume(){return this[Er]()}pause(){this[se]=!1,this[mi]=!0,this[Ae]=!1}get destroyed(){return this[ee]}get flowing(){return this[se]}get paused(){return this[mi]}[Wo](e){this[ge]?this[oe]+=1:this[oe]+=e.length,this[ae].push(e)}[as](){return this[ge]?this[oe]-=1:this[oe]-=this[ae][0].length,this[ae].shift()}[ss](e=!1){do;while(this[jp](this[as]())&&this[ae].length);!e&&!this[ae].length&&!this[lt]&&this.emit("drain")}[jp](e){return this.emit("data",e),this[se]}pipe(e,r){if(this[ee])return e;this[Ae]=!1;let i=this[Ot];return r=r||{},e===Cp.stdout||e===Cp.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,i?r.end&&e.end():(this[Se].push(r.proxyErrors?new Go(this,e,r):new ls(this,e,r)),this[Qe]?bi(()=>this[Er]()):this[Er]()),e}unpipe(e){let r=this[Se].find(i=>i.dest===e);r&&(this[Se].length===1?(this[se]&&this[Jt]===0&&(this[se]=!1),this[Se]=[]):this[Se].splice(this[Se].indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let i=super.on(e,r);if(e==="data")this[Ae]=!1,this[Jt]++,!this[Se].length&&!this[se]&&this[Er]();else if(e==="readable"&&this[oe]!==0)super.emit("readable");else if(CS(e)&&this[Ot])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[gi]){let n=r;this[Qe]?bi(()=>n.call(this,this[gi])):n.call(this,this[gi])}return i}removeListener(e,r){return this.off(e,r)}off(e,r){let i=super.off(e,r);return e==="data"&&(this[Jt]=this.listeners("data").length,this[Jt]===0&&!this[Ae]&&!this[Se].length&&(this[se]=!1)),i}removeAllListeners(e){let r=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Jt]=0,!this[Ae]&&!this[Se].length&&(this[se]=!1)),r}get emittedEnd(){return this[Ot]}[ut](){!this[is]&&!this[Ot]&&!this[ee]&&this[ae].length===0&&this[lt]&&(this[is]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[ns]&&this.emit("close"),this[is]=!1)}emit(e,...r){let i=r[0];if(e!=="error"&&e!=="close"&&e!==ee&&this[ee])return!1;if(e==="data")return!this[ge]&&!i?!1:this[Qe]?(bi(()=>this[Uo](i)),!0):this[Uo](i);if(e==="end")return this[Np]();if(e==="close"){if(this[ns]=!0,!this[Ot]&&!this[ee])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[gi]=i,super.emit(Bo,i);let s=!this[yi]||this.listeners("error").length?super.emit("error",i):!1;return this[ut](),s}else if(e==="resume"){let s=super.emit("resume");return this[ut](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let n=super.emit(e,...r);return this[ut](),n}[Uo](e){for(let i of this[Se])i.dest.write(e)===!1&&this.pause();let r=this[Ae]?!1:super.emit("data",e);return this[ut](),r}[Np](){return this[Ot]?!1:(this[Ot]=!0,this.readable=!1,this[Qe]?(bi(()=>this[zo]()),!0):this[zo]())}[zo](){if(this[Sr]){let r=this[Sr].end();if(r){for(let i of this[Se])i.dest.write(r);this[Ae]||super.emit("data",r)}}for(let r of this[Se])r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[ge]||(e.dataLength=0);let r=this.promise();return this.on("data",i=>{e.push(i),this[ge]||(e.dataLength+=i.length)}),await r,e}async concat(){if(this[ge])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Be]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,r)=>{this.on(ee,()=>r(new Error("stream destroyed"))),this.on("error",i=>r(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Ae]=!1;let e=!1,r=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return r();let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[lt])return r();let s,a,o=p=>{this.off("data",l),this.off("end",u),this.off(ee,h),r(),a(p)},l=p=>{this.off("error",o),this.off("end",u),this.off(ee,h),this.pause(),s({value:p,done:!!this[lt]})},u=()=>{this.off("error",o),this.off("data",l),this.off(ee,h),r(),s({done:!0,value:void 0})},h=()=>o(new Error("stream destroyed"));return new Promise((p,c)=>{a=c,s=p,this.once(ee,h),this.once("error",o),this.once("end",u),this.once("data",l)})},throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Ae]=!1;let e=!1,r=()=>(this.pause(),this.off(Bo,r),this.off(ee,r),this.off("end",r),e=!0,{done:!0,value:void 0}),i=()=>{if(e)return r();let n=this.read();return n===null?r():{done:!1,value:n}};return this.once("end",r),this.once(Bo,r),this.once(ee,r),{next:i,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(e){if(this[ee])return e?this.emit("error",e):this.emit(ee),this;this[ee]=!0,this[Ae]=!0,this[ae].length=0,this[oe]=0;let r=this;return typeof r.close=="function"&&!this[ns]&&r.close(),e?this.emit("error",e):this.emit(ee),this}static get isStream(){return AS}};var $S=et.realpathSync.native,vi={lstatSync:et.lstatSync,readdir:et.readdir,readdirSync:et.readdirSync,readlinkSync:et.readlinkSync,realpathSync:$S,promises:{lstat:kt.lstat,readdir:kt.readdir,readlink:kt.readlink,realpath:kt.realpath}},zp=t=>!t||t===vi||t===IS?vi:{...vi,...t,promises:{...vi.promises,...t.promises||{}}},Hp=/^\\\\\?\\([a-z]:)\\?$/i,WS=t=>t.replace(/\//g,"\\").replace(Hp,"$1\\"),BS=/[\\\/]/,Ne=0,Gp=1,Yp=2,Xe=4,Vp=6,Kp=8,Zt=10,Jp=12,je=15,wi=~je,Vo=16,Ip=32,_i=64,Ue=128,fs=256,cs=512,$p=_i|Ue|cs,US=1023,Ko=t=>t.isFile()?Kp:t.isDirectory()?Xe:t.isSymbolicLink()?Zt:t.isCharacterDevice()?Yp:t.isBlockDevice()?Vp:t.isSocket()?Jp:t.isFIFO()?Gp:Ne,Wp=new Map,Si=t=>{let e=Wp.get(t);if(e)return e;let r=t.normalize("NFKD");return Wp.set(t,r),r},Bp=new Map,hs=t=>{let e=Bp.get(t);if(e)return e;let r=Si(t.toLowerCase());return Bp.set(t,r),r},ds=class extends pi{constructor(){super({max:256})}},Jo=class extends pi{constructor(e=16*1024){super({maxSize:e,sizeCalculation:r=>r.length+1})}},Zp=Symbol("PathScurry setAsCwd"),me=class{name;root;roots;parent;nocase;#e;#r;get dev(){return this.#r}#s;get mode(){return this.#s}#i;get nlink(){return this.#i}#o;get uid(){return this.#o}#u;get gid(){return this.#u}#h;get rdev(){return this.#h}#l;get blksize(){return this.#l}#a;get ino(){return this.#a}#t;get size(){return this.#t}#g;get blocks(){return this.#g}#y;get atimeMs(){return this.#y}#d;get mtimeMs(){return this.#d}#c;get ctimeMs(){return this.#c}#v;get birthtimeMs(){return this.#v}#m;get atime(){return this.#m}#x;get mtime(){return this.#x}#T;get ctime(){return this.#T}#_;get birthtime(){return this.#_}#w;#M;#p;#A;#O;#S;#n;#b;#P;#E;get path(){return(this.parent||this).fullpath()}constructor(e,r=Ne,i,n,s,a,o){this.name=e,this.#w=s?hs(e):Si(e),this.#n=r&US,this.nocase=s,this.roots=n,this.root=i||this,this.#b=a,this.#p=o.fullpath,this.#O=o.relative,this.#S=o.relativePosix,this.parent=o.parent,this.parent?this.#e=this.parent.#e:this.#e=zp(o.fs)}depth(){return this.#M!==void 0?this.#M:this.parent?this.#M=this.parent.depth()+1:this.#M=0}childrenCache(){return this.#b}resolve(e){if(!e)return this;let r=this.getRootString(e),n=e.substring(r.length).split(this.splitSep);return r?this.getRoot(r).#L(n):this.#L(n)}#L(e){let r=this;for(let i of e)r=r.child(i);return r}children(){let e=this.#b.get(this);if(e)return e;let r=Object.assign([],{provisional:0});return this.#b.set(this,r),this.#n&=~Vo,r}child(e,r){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let i=this.children(),n=this.nocase?hs(e):Si(e);for(let l of i)if(l.#w===n)return l;let s=this.parent?this.sep:"",a=this.#p?this.#p+s+e:void 0,o=this.newChild(e,Ne,{...r,parent:this,fullpath:a});return this.canReaddir()||(o.#n|=Ue),i.push(o),o}relative(){if(this.#O!==void 0)return this.#O;let e=this.name,r=this.parent;if(!r)return this.#O=this.name;let i=r.relative();return i+(!i||!r.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.#S!==void 0)return this.#S;let e=this.name,r=this.parent;if(!r)return this.#S=this.fullpathPosix();let i=r.relativePosix();return i+(!i||!r.parent?"":"/")+e}fullpath(){if(this.#p!==void 0)return this.#p;let e=this.name,r=this.parent;if(!r)return this.#p=this.name;let n=r.fullpath()+(r.parent?this.sep:"")+e;return this.#p=n}fullpathPosix(){if(this.#A!==void 0)return this.#A;if(this.sep==="/")return this.#A=this.fullpath();if(!this.parent){let n=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(n)?this.#A=`//?/${n}`:this.#A=n}let e=this.parent,r=e.fullpathPosix(),i=r+(!r||!e.parent?"":"/")+this.name;return this.#A=i}isUnknown(){return(this.#n&je)===Ne}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#n&je)===Kp}isDirectory(){return(this.#n&je)===Xe}isCharacterDevice(){return(this.#n&je)===Yp}isBlockDevice(){return(this.#n&je)===Vp}isFIFO(){return(this.#n&je)===Gp}isSocket(){return(this.#n&je)===Jp}isSymbolicLink(){return(this.#n&Zt)===Zt}lstatCached(){return this.#n&Ip?this:void 0}readlinkCached(){return this.#P}realpathCached(){return this.#E}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#P)return!0;if(!this.parent)return!1;let e=this.#n&je;return!(e!==Ne&&e!==Zt||this.#n&fs||this.#n&Ue)}calledReaddir(){return!!(this.#n&Vo)}isENOENT(){return!!(this.#n&Ue)}isNamed(e){return this.nocase?this.#w===hs(e):this.#w===Si(e)}async readlink(){let e=this.#P;if(e)return e;if(this.canReadlink()&&this.parent)try{let r=await this.#e.promises.readlink(this.fullpath()),i=(await this.parent.realpath())?.resolve(r);if(i)return this.#P=i}catch(r){this.#F(r.code);return}}readlinkSync(){let e=this.#P;if(e)return e;if(this.canReadlink()&&this.parent)try{let r=this.#e.readlinkSync(this.fullpath()),i=this.parent.realpathSync()?.resolve(r);if(i)return this.#P=i}catch(r){this.#F(r.code);return}}#j(e){this.#n|=Vo;for(let r=e.provisional;r<e.length;r++){let i=e[r];i&&i.#R()}}#R(){this.#n&Ue||(this.#n=(this.#n|Ue)&wi,this.#k())}#k(){let e=this.children();e.provisional=0;for(let r of e)r.#R()}#N(){this.#n|=cs,this.#D()}#D(){if(this.#n&_i)return;let e=this.#n;(e&je)===Xe&&(e&=wi),this.#n=e|_i,this.#k()}#C(e=""){e==="ENOTDIR"||e==="EPERM"?this.#D():e==="ENOENT"?this.#R():this.children().provisional=0}#f(e=""){e==="ENOTDIR"?this.parent.#D():e==="ENOENT"&&this.#R()}#F(e=""){let r=this.#n;r|=fs,e==="ENOENT"&&(r|=Ue),(e==="EINVAL"||e==="UNKNOWN")&&(r&=wi),this.#n=r,e==="ENOTDIR"&&this.parent&&this.parent.#D()}#q(e,r){return this.#z(e,r)||this.#U(e,r)}#U(e,r){let i=Ko(e),n=this.newChild(e.name,i,{parent:this}),s=n.#n&je;return s!==Xe&&s!==Zt&&s!==Ne&&(n.#n|=_i),r.unshift(n),r.provisional++,n}#z(e,r){for(let i=r.provisional;i<r.length;i++){let n=r[i];if((this.nocase?hs(e.name):Si(e.name))===n.#w)return this.#H(e,n,i,r)}}#H(e,r,i,n){let s=r.name;return r.#n=r.#n&wi|Ko(e),s!==e.name&&(r.name=e.name),i!==n.provisional&&(i===n.length-1?n.pop():n.splice(i,1),n.unshift(r)),n.provisional++,r}async lstat(){if(!(this.#n&Ue))try{return this.#B(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#f(e.code)}}lstatSync(){if(!(this.#n&Ue))try{return this.#B(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#f(e.code)}}#B(e){let{atime:r,atimeMs:i,birthtime:n,birthtimeMs:s,blksize:a,blocks:o,ctime:l,ctimeMs:u,dev:h,gid:p,ino:c,mode:f,mtime:y,mtimeMs:b,nlink:S,rdev:_,size:x,uid:R}=e;this.#m=r,this.#y=i,this.#_=n,this.#v=s,this.#l=a,this.#g=o,this.#T=l,this.#c=u,this.#r=h,this.#u=p,this.#a=c,this.#s=f,this.#x=y,this.#d=b,this.#i=S,this.#h=_,this.#t=x,this.#o=R;let O=Ko(e);this.#n=this.#n&wi|O|Ip,O!==Ne&&O!==Xe&&O!==Zt&&(this.#n|=_i)}#$=[];#W=!1;#G(e){this.#W=!1;let r=this.#$.slice();this.#$.length=0,r.forEach(i=>i(null,e))}readdirCB(e,r=!1){if(!this.canReaddir()){r?e(null,[]):queueMicrotask(()=>e(null,[]));return}let i=this.children();if(this.calledReaddir()){let s=i.slice(0,i.provisional);r?e(null,s):queueMicrotask(()=>e(null,s));return}if(this.#$.push(e),this.#W)return;this.#W=!0;let n=this.fullpath();this.#e.readdir(n,{withFileTypes:!0},(s,a)=>{if(s)this.#C(s.code),i.provisional=0;else{for(let o of a)this.#q(o,i);this.#j(i)}this.#G(i.slice(0,i.provisional))})}#I;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();if(this.#I)await this.#I;else{let i=()=>{};this.#I=new Promise(n=>i=n);try{for(let n of await this.#e.promises.readdir(r,{withFileTypes:!0}))this.#q(n,e);this.#j(e)}catch(n){this.#C(n.code),e.provisional=0}this.#I=void 0,i()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();try{for(let i of this.#e.readdirSync(r,{withFileTypes:!0}))this.#q(i,e);this.#j(e)}catch(i){this.#C(i.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#n&$p)return!1;let e=je&this.#n;return e===Ne||e===Xe||e===Zt}shouldWalk(e,r){return(this.#n&Xe)===Xe&&!(this.#n&$p)&&!e.has(this)&&(!r||r(this))}async realpath(){if(this.#E)return this.#E;if(!((cs|fs|Ue)&this.#n))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#E=this.resolve(e)}catch{this.#N()}}realpathSync(){if(this.#E)return this.#E;if(!((cs|fs|Ue)&this.#n))try{let e=this.#e.realpathSync(this.fullpath());return this.#E=this.resolve(e)}catch{this.#N()}}[Zp](e){if(e===this)return;let r=new Set([]),i=[],n=this;for(;n&&n.parent;)r.add(n),n.#O=i.join(this.sep),n.#S=i.join("/"),n=n.parent,i.push("..");for(n=e;n&&n.parent&&!r.has(n);)n.#O=void 0,n.#S=void 0,n=n.parent}},ps=class t extends me{sep="\\";splitSep=BS;constructor(e,r=Ne,i,n,s,a,o){super(e,r,i,n,s,a,o)}newChild(e,r=Ne,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(e){return Rr.win32.parse(e).root}getRoot(e){if(e=WS(e.toUpperCase()),e===this.root.name)return this.root;for(let[r,i]of Object.entries(this.roots))if(this.sameRoot(e,r))return this.roots[e]=i;return this.roots[e]=new xr(e,this).root}sameRoot(e,r=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(Hp,"$1\\"),e===r}},gs=class t extends me{splitSep="/";sep="/";constructor(e,r=Ne,i,n,s,a,o){super(e,r,i,n,s,a,o)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,r=Ne,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}},ms=class{root;rootPath;roots;cwd;#e;#r;#s;nocase;#i;constructor(e=process.cwd(),r,i,{nocase:n,childrenCacheSize:s=16*1024,fs:a=vi}={}){this.#i=zp(a),(e instanceof URL||e.startsWith("file://"))&&(e=(0,Up.fileURLToPath)(e));let o=r.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#e=new ds,this.#r=new ds,this.#s=new Jo(s);let l=o.substring(this.rootPath.length).split(i);if(l.length===1&&!l[0]&&l.pop(),n===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=n,this.root=this.newRoot(this.#i),this.roots[this.rootPath]=this.root;let u=this.root,h=l.length-1,p=r.sep,c=this.rootPath,f=!1;for(let y of l){let b=h--;u=u.child(y,{relative:new Array(b).fill("..").join(p),relativePosix:new Array(b).fill("..").join("/"),fullpath:c+=(f?"":p)+y}),f=!0}this.cwd=u}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#s}resolve(...e){let r="";for(let s=e.length-1;s>=0;s--){let a=e[s];if(!(!a||a===".")&&(r=r?`${a}/${r}`:a,this.isAbsolute(a)))break}let i=this.#e.get(r);if(i!==void 0)return i;let n=this.cwd.resolve(r).fullpath();return this.#e.set(r,n),n}resolvePosix(...e){let r="";for(let s=e.length-1;s>=0;s--){let a=e[s];if(!(!a||a===".")&&(r=r?`${a}/${r}`:a,this.isAbsolute(a)))break}let i=this.#r.get(r);if(i!==void 0)return i;let n=this.cwd.resolve(r).fullpathPosix();return this.#r.set(r,n),n}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i}=r;if(e.canReaddir()){let n=await e.readdir();return i?n:n.map(s=>s.name)}else return[]}readdirSync(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0}=r;return e.canReaddir()?i?e.readdirSync():e.readdirSync().map(n=>n.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=await e.readlink();return r?i:i?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=e.readlinkSync();return r?i:i?.fullpath()}async realpath(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=await e.realpath();return r?i:i?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=e.realpathSync();return r?i:i?.fullpath()}async walk(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=[];(!s||s(e))&&o.push(i?e:e.fullpath());let l=new Set,u=(p,c)=>{l.add(p),p.readdirCB((f,y)=>{if(f)return c(f);let b=y.length;if(!b)return c();let S=()=>{--b===0&&c()};for(let _ of y)(!s||s(_))&&o.push(i?_:_.fullpath()),n&&_.isSymbolicLink()?_.realpath().then(x=>x?.isUnknown()?x.lstat():x).then(x=>x?.shouldWalk(l,a)?u(x,S):S()):_.shouldWalk(l,a)?u(_,S):S()},!0)},h=e;return new Promise((p,c)=>{u(h,f=>{if(f)return c(f);p(o)})})}walkSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=[];(!s||s(e))&&o.push(i?e:e.fullpath());let l=new Set([e]);for(let u of l){let h=u.readdirSync();for(let p of h){(!s||s(p))&&o.push(i?p:p.fullpath());let c=p;if(p.isSymbolicLink()){if(!(n&&(c=p.realpathSync())))continue;c.isUnknown()&&c.lstatSync()}c.shouldWalk(l,a)&&l.add(c)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,r={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd),this.stream(e,r)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r;(!s||s(e))&&(yield i?e:e.fullpath());let o=new Set([e]);for(let l of o){let u=l.readdirSync();for(let h of u){(!s||s(h))&&(yield i?h:h.fullpath());let p=h;if(h.isSymbolicLink()){if(!(n&&(p=h.realpathSync())))continue;p.isUnknown()&&p.lstatSync()}p.shouldWalk(o,a)&&o.add(p)}}}stream(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=new Mt({objectMode:!0});(!s||s(e))&&o.write(i?e:e.fullpath());let l=new Set,u=[e],h=0,p=()=>{let c=!1;for(;!c;){let f=u.shift();if(!f){h===0&&o.end();return}h++,l.add(f);let y=(S,_,x=!1)=>{if(S)return o.emit("error",S);if(n&&!x){let R=[];for(let O of _)O.isSymbolicLink()&&R.push(O.realpath().then(A=>A?.isUnknown()?A.lstat():A));if(R.length){Promise.all(R).then(()=>y(null,_,!0));return}}for(let R of _)R&&(!s||s(R))&&(o.write(i?R:R.fullpath())||(c=!0));h--;for(let R of _){let O=R.realpathCached()||R;O.shouldWalk(l,a)&&u.push(O)}c&&!o.flowing?o.once("drain",p):b||p()},b=!0;f.readdirCB(y,!0),b=!1}};return p(),o}streamSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=new Mt({objectMode:!0}),l=new Set;(!s||s(e))&&o.write(i?e:e.fullpath());let u=[e],h=0,p=()=>{let c=!1;for(;!c;){let f=u.shift();if(!f){h===0&&o.end();return}h++,l.add(f);let y=f.readdirSync();for(let b of y)(!s||s(b))&&(o.write(i?b:b.fullpath())||(c=!0));h--;for(let b of y){let S=b;if(b.isSymbolicLink()){if(!(n&&(S=b.realpathSync())))continue;S.isUnknown()&&S.lstatSync()}S.shouldWalk(l,a)&&u.push(S)}}c&&!o.flowing&&o.once("drain",p)};return p(),o}chdir(e=this.cwd){let r=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[Zp](r)}},xr=class extends ms{sep="\\";constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,Rr.win32,"\\",{...r,nocase:i}),this.nocase=i;for(let n=this.cwd;n;n=n.parent)n.nocase=this.nocase}parseRootPath(e){return Rr.win32.parse(e).root.toUpperCase()}newRoot(e){return new ps(this.rootPath,Xe,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},Tr=class extends ms{sep="/";constructor(e=process.cwd(),r={}){let{nocase:i=!1}=r;super(e,Rr.posix,"/",{...r,nocase:i}),this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new gs(this.rootPath,Xe,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},Ei=class extends Tr{constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,{...r,nocase:i})}},mx=process.platform==="win32"?ps:gs,Qp=process.platform==="win32"?xr:process.platform==="darwin"?Ei:Tr;var Xp=require("url");var zS=t=>t.length>=1,HS=t=>t.length>=1,Or=class t{#e;#r;#s;length;#i;#o;#u;#h;#l;#a;#t=!0;constructor(e,r,i,n){if(!zS(e))throw new TypeError("empty pattern list");if(!HS(r))throw new TypeError("empty glob list");if(r.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,i<0||i>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#r=r,this.#s=i,this.#i=n,this.#s===0){if(this.isUNC()){let[s,a,o,l,...u]=this.#e,[h,p,c,f,...y]=this.#r;u[0]===""&&(u.shift(),y.shift());let b=[s,a,o,l,""].join("/"),S=[h,p,c,f,""].join("/");this.#e=[b,...u],this.#r=[S,...y],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[s,...a]=this.#e,[o,...l]=this.#r;a[0]===""&&(a.shift(),l.shift());let u=s+"/",h=o+"/";this.#e=[u,...a],this.#r=[h,...l],this.length=this.#e.length}}}pattern(){return this.#e[this.#s]}isString(){return typeof this.#e[this.#s]=="string"}isGlobstar(){return this.#e[this.#s]===he}isRegExp(){return this.#e[this.#s]instanceof RegExp}globString(){return this.#u=this.#u||(this.#s===0?this.isAbsolute()?this.#r[0]+this.#r.slice(1).join("/"):this.#r.join("/"):this.#r.slice(this.#s).join("/"))}hasMore(){return this.length>this.#s+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new t(this.#e,this.#r,this.#s+1,this.#i),this.#o.#a=this.#a,this.#o.#l=this.#l,this.#o.#h=this.#h,this.#o):this.#o=null}isUNC(){let e=this.#e;return this.#l!==void 0?this.#l:this.#l=this.#i==="win32"&&this.#s===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#h!==void 0?this.#h:this.#h=this.#i==="win32"&&this.#s===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#a!==void 0?this.#a:this.#a=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#s===0?e:""}checkFollowGlobstar(){return!(this.#s===0||!this.isGlobstar()||!this.#t)}markFollowGlobstar(){return this.#s===0||!this.isGlobstar()||!this.#t?!1:(this.#t=!1,!0)}};var GS=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Ri=class{relative;relativeChildren;absolute;absoluteChildren;constructor(e,{nobrace:r,nocase:i,noext:n,noglobstar:s,platform:a=GS}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[];let o={dot:!0,nobrace:r,nocase:i,noext:n,noglobstar:s,optimizationLevel:2,platform:a,nocomment:!0,nonegate:!0};for(let l of e){let u=new ke(l,o);for(let h=0;h<u.set.length;h++){let p=u.set[h],c=u.globParts[h];if(!p||!c)throw new Error("invalid pattern object");for(;p[0]==="."&&c[0]===".";)p.shift(),c.shift();let f=new Or(p,c,0,a),y=new ke(f.globString(),o),b=c[c.length-1]==="**",S=f.isAbsolute();S?this.absolute.push(y):this.relative.push(y),b&&(S?this.absoluteChildren.push(y):this.relativeChildren.push(y))}}}ignored(e){let r=e.fullpath(),i=`${r}/`,n=e.relative()||".",s=`${n}/`;for(let a of this.relative)if(a.match(n)||a.match(s))return!0;for(let a of this.absolute)if(a.match(r)||a.match(i))return!0;return!1}childrenIgnored(e){let r=e.fullpath()+"/",i=(e.relative()||".")+"/";for(let n of this.relativeChildren)if(n.match(i))return!0;for(let n of this.absoluteChildren)if(n.match(r))return!0;return!1}};var Zo=class t{store;constructor(e=new Map){this.store=e}copy(){return new t(new Map(this.store))}hasWalked(e,r){return this.store.get(e.fullpath())?.has(r.globString())}storeWalked(e,r){let i=e.fullpath(),n=this.store.get(i);n?n.add(r.globString()):this.store.set(i,new Set([r.globString()]))}},Qo=class{store=new Map;add(e,r,i){let n=(r?2:0)|(i?1:0),s=this.store.get(e);this.store.set(e,s===void 0?n:n&s)}entries(){return[...this.store.entries()].map(([e,r])=>[e,!!(r&2),!!(r&1)])}},Xo=class{store=new Map;add(e,r){if(!e.canReaddir())return;let i=this.store.get(e);i?i.find(n=>n.globString()===r.globString())||i.push(r):this.store.set(e,[r])}get(e){let r=this.store.get(e);if(!r)throw new Error("attempting to walk unknown path");return r}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},xi=class t{hasWalkedCache;matches=new Qo;subwalks=new Xo;patterns;follow;dot;opts;constructor(e,r){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=r?r.copy():new Zo}processPatterns(e,r){this.patterns=r;let i=r.map(n=>[e,n]);for(let[n,s]of i){this.hasWalkedCache.storeWalked(n,s);let a=s.root(),o=s.isAbsolute()&&this.opts.absolute!==!1;if(a){n=n.resolve(a==="/"&&this.opts.root!==void 0?this.opts.root:a);let p=s.rest();if(p)s=p;else{this.matches.add(n,!0,!1);continue}}if(n.isENOENT())continue;let l,u,h=!1;for(;typeof(l=s.pattern())=="string"&&(u=s.rest());)n=n.resolve(l),s=u,h=!0;if(l=s.pattern(),u=s.rest(),h){if(this.hasWalkedCache.hasWalked(n,s))continue;this.hasWalkedCache.storeWalked(n,s)}if(typeof l=="string"){let p=l===".."||l===""||l===".";this.matches.add(n.resolve(l),o,p);continue}else if(l===he){(!n.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(n,s);let p=u?.pattern(),c=u?.rest();if(!u||(p===""||p===".")&&!c)this.matches.add(n,o,p===""||p===".");else if(p===".."){let f=n.parent||n;c?this.hasWalkedCache.hasWalked(f,c)||this.subwalks.add(f,c):this.matches.add(f,o,!0)}}else l instanceof RegExp&&this.subwalks.add(n,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new t(this.opts,this.hasWalkedCache)}filterEntries(e,r){let i=this.subwalks.get(e),n=this.child();for(let s of r)for(let a of i){let o=a.isAbsolute(),l=a.pattern(),u=a.rest();l===he?n.testGlobstar(s,a,u,o):l instanceof RegExp?n.testRegExp(s,l,u,o):n.testString(s,l,u,o)}return n}testGlobstar(e,r,i,n){if((this.dot||!e.name.startsWith("."))&&(r.hasMore()||this.matches.add(e,n,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,r):e.isSymbolicLink()&&(i&&r.checkFollowGlobstar()?this.subwalks.add(e,i):r.markFollowGlobstar()&&this.subwalks.add(e,r)))),i){let s=i.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(e,s,i.rest(),n);else if(s===".."){let a=e.parent||e;this.subwalks.add(a,i)}else s instanceof RegExp&&this.testRegExp(e,s,i.rest(),n)}}testRegExp(e,r,i,n){r.test(e.name)&&(i?this.subwalks.add(e,i):this.matches.add(e,n,!1))}testString(e,r,i,n){e.isNamed(r)&&(i?this.subwalks.add(e,i):this.matches.add(e,n,!1))}};var YS=(t,e)=>typeof t=="string"?new Ri([t],e):Array.isArray(t)?new Ri(t,e):t,ys=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#r;#s;signal;maxDepth;constructor(e,r,i){this.patterns=e,this.path=r,this.opts=i,this.#s=!i.posix&&i.platform==="win32"?"\\":"/",i.ignore&&(this.#r=YS(i.ignore,i)),this.maxDepth=i.maxDepth||1/0,i.signal&&(this.signal=i.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#i(e){return this.seen.has(e)||!!this.#r?.ignored?.(e)}#o(e){return!!this.#r?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,r){if(r&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||await e.realpath(),!i)return;e=i}let s=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let a=await s.realpath();a&&(a.isUnknown()||this.opts.stat)&&await a.lstat()}return this.matchCheckTest(s,r)}matchCheckTest(e,r){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!r||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#i(e)?e:void 0}matchCheckSync(e,r){if(r&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||e.realpathSync(),!i)return;e=i}let s=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let a=s.realpathSync();a&&(a?.isUnknown()||this.opts.stat)&&a.lstatSync()}return this.matchCheckTest(s,r)}matchFinish(e,r){if(this.#i(e))return;let i=this.opts.absolute===void 0?r:this.opts.absolute;this.seen.add(e);let n=this.opts.mark&&e.isDirectory()?this.#s:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(i){let s=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(s+n)}else{let s=this.opts.posix?e.relativePosix():e.relative(),a=this.opts.dotRelative&&!s.startsWith(".."+this.#s)?"."+this.#s:"";this.matchEmit(s?a+s+n:"."+n)}}async match(e,r,i){let n=await this.matchCheck(e,i);n&&this.matchFinish(n,r)}matchSync(e,r,i){let n=this.matchCheckSync(e,i);n&&this.matchFinish(n,r)}walkCB(e,r,i){this.signal?.aborted&&i(),this.walkCB2(e,r,new xi(this.opts),i)}walkCB2(e,r,i,n){if(this.#o(e))return n();if(this.signal?.aborted&&n(),this.paused){this.onResume(()=>this.walkCB2(e,r,i,n));return}i.processPatterns(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||(s++,this.match(o,l,u).then(()=>a()));for(let o of i.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;s++;let l=o.readdirCached();o.calledReaddir()?this.walkCB3(o,l,i,a):o.readdirCB((u,h)=>this.walkCB3(o,h,i,a),!0)}a()}walkCB3(e,r,i,n){i=i.filterEntries(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||(s++,this.match(o,l,u).then(()=>a()));for(let[o,l]of i.subwalks.entries())s++,this.walkCB2(o,l,i.child(),a);a()}walkCBSync(e,r,i){this.signal?.aborted&&i(),this.walkCB2Sync(e,r,new xi(this.opts),i)}walkCB2Sync(e,r,i,n){if(this.#o(e))return n();if(this.signal?.aborted&&n(),this.paused){this.onResume(()=>this.walkCB2Sync(e,r,i,n));return}i.processPatterns(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||this.matchSync(o,l,u);for(let o of i.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;s++;let l=o.readdirSync();this.walkCB3Sync(o,l,i,a)}a()}walkCB3Sync(e,r,i,n){i=i.filterEntries(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||this.matchSync(o,l,u);for(let[o,l]of i.subwalks.entries())s++,this.walkCB2Sync(o,l,i.child(),a);a()}},Ti=class extends ys{matches;constructor(e,r,i){super(e,r,i),this.matches=new Set}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,r)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?r(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},Oi=class extends ys{results;constructor(e,r,i){super(e,r,i),this.results=new Mt({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};var VS=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",ze=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;opts;patterns;constructor(e,r){if(!r)throw new TypeError("glob options required");if(this.withFileTypes=!!r.withFileTypes,this.signal=r.signal,this.follow=!!r.follow,this.dot=!!r.dot,this.dotRelative=!!r.dotRelative,this.nodir=!!r.nodir,this.mark=!!r.mark,r.cwd?(r.cwd instanceof URL||r.cwd.startsWith("file://"))&&(r.cwd=(0,Xp.fileURLToPath)(r.cwd)):this.cwd="",this.cwd=r.cwd||"",this.root=r.root,this.magicalBraces=!!r.magicalBraces,this.nobrace=!!r.nobrace,this.noext=!!r.noext,this.realpath=!!r.realpath,this.absolute=r.absolute,this.noglobstar=!!r.noglobstar,this.matchBase=!!r.matchBase,this.maxDepth=typeof r.maxDepth=="number"?r.maxDepth:1/0,this.stat=!!r.stat,this.ignore=r.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(r.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=e,this.platform=r.platform||VS,this.opts={...r,platform:this.platform},r.scurry){if(this.scurry=r.scurry,r.nocase!==void 0&&r.nocase!==r.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=r.platform==="win32"?xr:r.platform==="darwin"?Ei:r.platform?Tr:Qp;this.scurry=new l(this.cwd,{nocase:r.nocase,fs:r.fs})}this.nocase=this.scurry.nocase;let i=this.platform==="darwin"||this.platform==="win32",n={...r,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:i,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},s=this.pattern.map(l=>new ke(l,n)),[a,o]=s.reduce((l,u)=>(l[0].push(...u.set),l[1].push(...u.globParts),l),[[],[]]);this.patterns=a.map((l,u)=>{let h=o[u];if(!h)throw new Error("invalid pattern object");return new Or(l,h,0,this.platform)})}async walk(){return[...await new Ti(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).walk()]}walkSync(){return[...new Ti(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).walkSync()]}stream(){return new Oi(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).stream()}streamSync(){return new Oi(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};var el=(t,e={})=>{Array.isArray(t)||(t=[t]);for(let r of t)if(new ke(r,e).hasMagic())return!0;return!1};function ws(t,e={}){return new ze(t,e).streamSync()}function tg(t,e={}){return new ze(t,e).stream()}function rg(t,e={}){return new ze(t,e).walkSync()}async function eg(t,e={}){return new ze(t,e).walk()}function vs(t,e={}){return new ze(t,e).iterateSync()}function ig(t,e={}){return new ze(t,e).iterate()}var KS=ws,JS=Object.assign(tg,{sync:ws}),ZS=vs,QS=Object.assign(ig,{sync:vs}),XS=Object.assign(rg,{stream:ws,iterate:vs}),bs=Object.assign(eg,{glob:eg,globSync:rg,sync:XS,globStream:tg,stream:JS,globStreamSync:ws,streamSync:KS,globIterate:ig,iterate:QS,globIterateSync:vs,iterateSync:ZS,Glob:ze,hasMagic:el,escape:wr,unescape:We});bs.glob=bs;global.fetch=rl.default;var eE="../build",tE="../wheels";async function og(t,e){let r=[],i=n=>{r.push(n)};if(await t.loadPackage(e,{errorCallback:i}),r.length>0)throw new Error(r.join(`
|
|
36
|
-
`))}async function
|
|
35
|
+
>>> no match, partial?`,e,c,r,f),c===l))}let b;if(typeof h=="string"?(b=p===h,this.debug("string match",h,p,b)):(b=h.test(p),this.debug("pattern match",h,p,b)),!b)return!1}if(a===l&&o===u)return!0;if(a===l)return i;if(o===u)return a===l-1&&e[a]==="";throw new Error("wtf?")}braceExpand(){return Op(this.pattern,this.options)}parse(e){ci(e);let r=this.options;if(e==="**")return he;if(e==="")return"";let i,n=null;(i=e.match(uS))?n=r.dot?hS:fS:(i=e.match(X_))?n=(r.nocase?r.dot?iS:rS:r.dot?tS:eS)(i[1]):(i=e.match(cS))?n=(r.nocase?r.dot?pS:dS:r.dot?gS:mS)(i):(i=e.match(nS))?n=r.dot?aS:sS:(i=e.match(oS))&&(n=lS);let s=br.fromGlob(e,this.options).toMMPattern();return n?Object.assign(s,{test:n}):s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,i=r.noglobstar?wS:r.dot?vS:_S,n=new Set(r.nocase?["i"]:[]),s=e.map(l=>{let u=l.map(h=>{if(h instanceof RegExp)for(let p of h.flags.split(""))n.add(p);return typeof h=="string"?TS(h):h===he?he:h._src});return u.forEach((h,p)=>{let c=u[p+1],f=u[p-1];h!==he||f===he||(f===void 0?c!==void 0&&c!==he?u[p+1]="(?:\\/|"+i+"\\/)?"+c:u[p]=i:c===void 0?u[p-1]=f+"(?:\\/|"+i+")?":c!==he&&(u[p-1]=f+"(?:\\/|\\/"+i+"\\/)"+c,u[p+1]=he))}),u.filter(h=>h!==he).join("/")}).join("|"),[a,o]=e.length>1?["(?:",")"]:["",""];s="^"+a+s+o+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let i=this.options;this.isWindows&&(e=e.split("\\").join("/"));let n=this.slashSplit(e);this.debug(this.pattern,"split",n);let s=this.set;this.debug(this.pattern,"set",s);let a=n[n.length-1];if(!a)for(let o=n.length-2;!a&&o>=0;o--)a=n[o];for(let o=0;o<s.length;o++){let l=s[o],u=n;if(i.matchBase&&l.length===1&&(u=[a]),this.matchOne(u,l,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(e){return ve.defaults(e).Minimatch}};ve.AST=br;ve.Minimatch=ke;ve.escape=wr;ve.unescape=We;var vr=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,kp=new Set,Io=typeof process=="object"&&process?process:{},Ap=(t,e,r,i)=>{typeof Io.emitWarning=="function"?Io.emitWarning(t,e,r,i):console.error(`[${r}] ${e}: ${t}`)},rs=globalThis.AbortController,Mp=globalThis.AbortSignal;if(typeof rs>"u"){Mp=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,n){this._onabort.push(n)}},rs=class{constructor(){e()}signal=new Mp;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let n of this.signal._onabort)n(i);this.signal.onabort?.(i)}}};let t=Io.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,Ap("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}var OS=t=>!kp.has(t),ux=Symbol("type"),Tt=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Pp=t=>Tt(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?_r:null:null,_r=class extends Array{constructor(e){super(e),this.fill(0)}},$o=class t{heap;length;static#e=!1;static create(e){let r=Pp(e);if(!r)return[];t.#e=!0;let i=new t(e,r);return t.#e=!1,i}constructor(e,r){if(!t.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},pi=class t{#e;#r;#s;#i;#o;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#u;#h;#l;#a;#t;#g;#y;#d;#c;#v;#m;#x;#T;#_;#w;#M;#p;static unsafeExposeInternals(e){return{starts:e.#T,ttls:e.#_,sizes:e.#x,keyMap:e.#l,keyList:e.#a,valList:e.#t,next:e.#g,prev:e.#y,get head(){return e.#d},get tail(){return e.#c},free:e.#v,isBackgroundFetch:r=>e.#f(r),backgroundFetch:(r,i,n,s)=>e.#C(r,i,n,s),moveToTail:r=>e.#q(r),indexes:r=>e.#R(r),rindexes:r=>e.#k(r),isStale:r=>e.#b(r)}}get max(){return this.#e}get maxSize(){return this.#r}get calculatedSize(){return this.#h}get size(){return this.#u}get fetchMethod(){return this.#o}get dispose(){return this.#s}get disposeAfter(){return this.#i}constructor(e){let{max:r=0,ttl:i,ttlResolution:n=1,ttlAutopurge:s,updateAgeOnGet:a,updateAgeOnHas:o,allowStale:l,dispose:u,disposeAfter:h,noDisposeOnSet:p,noUpdateTTL:c,maxSize:f=0,maxEntrySize:y=0,sizeCalculation:b,fetchMethod:S,noDeleteOnFetchRejection:_,noDeleteOnStaleGet:x,allowStaleOnFetchRejection:R,allowStaleOnFetchAbort:O,ignoreFetchAbort:A}=e;if(r!==0&&!Tt(r))throw new TypeError("max option must be a nonnegative integer");let D=r?Pp(r):Array;if(!D)throw new Error("invalid max value: "+r);if(this.#e=r,this.#r=f,this.maxEntrySize=y||this.#r,this.sizeCalculation=b,this.sizeCalculation){if(!this.#r&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(S!==void 0&&typeof S!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#o=S,this.#M=!!S,this.#l=new Map,this.#a=new Array(r).fill(void 0),this.#t=new Array(r).fill(void 0),this.#g=new D(r),this.#y=new D(r),this.#d=0,this.#c=0,this.#v=$o.create(r),this.#u=0,this.#h=0,typeof u=="function"&&(this.#s=u),typeof h=="function"?(this.#i=h,this.#m=[]):(this.#i=void 0,this.#m=void 0),this.#w=!!this.#s,this.#p=!!this.#i,this.noDisposeOnSet=!!p,this.noUpdateTTL=!!c,this.noDeleteOnFetchRejection=!!_,this.allowStaleOnFetchRejection=!!R,this.allowStaleOnFetchAbort=!!O,this.ignoreFetchAbort=!!A,this.maxEntrySize!==0){if(this.#r!==0&&!Tt(this.#r))throw new TypeError("maxSize must be a positive integer if specified");if(!Tt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#P()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!x,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!o,this.ttlResolution=Tt(n)||n===0?n:1,this.ttlAutopurge=!!s,this.ttl=i||0,this.ttl){if(!Tt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#A()}if(this.#e===0&&this.ttl===0&&this.#r===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#r){let F="LRU_CACHE_UNBOUNDED";OS(F)&&(kp.add(F),Ap("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",F,t))}}getRemainingTTL(e){return this.#l.has(e)?1/0:0}#A(){let e=new _r(this.#e),r=new _r(this.#e);this.#_=e,this.#T=r,this.#n=(s,a,o=vr.now())=>{if(r[s]=a!==0?o:0,e[s]=a,a!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#b(s)&&this.delete(this.#a[s])},a+1);l.unref&&l.unref()}},this.#O=s=>{r[s]=e[s]!==0?vr.now():0},this.#S=(s,a)=>{if(e[a]){let o=e[a],l=r[a];if(!o||!l)return;s.ttl=o,s.start=l,s.now=i||n();let u=s.now-l;s.remainingTTL=o-u}};let i=0,n=()=>{let s=vr.now();if(this.ttlResolution>0){i=s;let a=setTimeout(()=>i=0,this.ttlResolution);a.unref&&a.unref()}return s};this.getRemainingTTL=s=>{let a=this.#l.get(s);if(a===void 0)return 0;let o=e[a],l=r[a];if(!o||!l)return 1/0;let u=(i||n())-l;return o-u},this.#b=s=>{let a=r[s],o=e[s];return!!o&&!!a&&(i||n())-a>o}}#O=()=>{};#S=()=>{};#n=()=>{};#b=()=>!1;#P(){let e=new _r(this.#e);this.#h=0,this.#x=e,this.#E=r=>{this.#h-=e[r],e[r]=0},this.#j=(r,i,n,s)=>{if(this.#f(i))return 0;if(!Tt(n))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(n=s(i,r),!Tt(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return n},this.#L=(r,i,n)=>{if(e[r]=i,this.#r){let s=this.#r-e[r];for(;this.#h>s;)this.#D(!0)}this.#h+=e[r],n&&(n.entrySize=i,n.totalCalculatedSize=this.#h)}}#E=e=>{};#L=(e,r,i)=>{};#j=(e,r,i,n)=>{if(i||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#R({allowStale:e=this.allowStale}={}){if(this.#u)for(let r=this.#c;!(!this.#N(r)||((e||!this.#b(r))&&(yield r),r===this.#d));)r=this.#y[r]}*#k({allowStale:e=this.allowStale}={}){if(this.#u)for(let r=this.#d;!(!this.#N(r)||((e||!this.#b(r))&&(yield r),r===this.#c));)r=this.#g[r]}#N(e){return e!==void 0&&this.#l.get(this.#a[e])===e}*entries(){for(let e of this.#R())this.#t[e]!==void 0&&this.#a[e]!==void 0&&!this.#f(this.#t[e])&&(yield[this.#a[e],this.#t[e]])}*rentries(){for(let e of this.#k())this.#t[e]!==void 0&&this.#a[e]!==void 0&&!this.#f(this.#t[e])&&(yield[this.#a[e],this.#t[e]])}*keys(){for(let e of this.#R()){let r=this.#a[e];r!==void 0&&!this.#f(this.#t[e])&&(yield r)}}*rkeys(){for(let e of this.#k()){let r=this.#a[e];r!==void 0&&!this.#f(this.#t[e])&&(yield r)}}*values(){for(let e of this.#R())this.#t[e]!==void 0&&!this.#f(this.#t[e])&&(yield this.#t[e])}*rvalues(){for(let e of this.#k())this.#t[e]!==void 0&&!this.#f(this.#t[e])&&(yield this.#t[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,r={}){for(let i of this.#R()){let n=this.#t[i],s=this.#f(n)?n.__staleWhileFetching:n;if(s!==void 0&&e(s,this.#a[i],this))return this.get(this.#a[i],r)}}forEach(e,r=this){for(let i of this.#R()){let n=this.#t[i],s=this.#f(n)?n.__staleWhileFetching:n;s!==void 0&&e.call(r,s,this.#a[i],this)}}rforEach(e,r=this){for(let i of this.#k()){let n=this.#t[i],s=this.#f(n)?n.__staleWhileFetching:n;s!==void 0&&e.call(r,s,this.#a[i],this)}}purgeStale(){let e=!1;for(let r of this.#k({allowStale:!0}))this.#b(r)&&(this.delete(this.#a[r]),e=!0);return e}info(e){let r=this.#l.get(e);if(r===void 0)return;let i=this.#t[r],n=this.#f(i)?i.__staleWhileFetching:i;if(n===void 0)return;let s={value:n};if(this.#_&&this.#T){let a=this.#_[r],o=this.#T[r];if(a&&o){let l=a-(vr.now()-o);s.ttl=l,s.start=Date.now()}}return this.#x&&(s.size=this.#x[r]),s}dump(){let e=[];for(let r of this.#R({allowStale:!0})){let i=this.#a[r],n=this.#t[r],s=this.#f(n)?n.__staleWhileFetching:n;if(s===void 0||i===void 0)continue;let a={value:s};if(this.#_&&this.#T){a.ttl=this.#_[r];let o=vr.now()-this.#T[r];a.start=Math.floor(Date.now()-o)}this.#x&&(a.size=this.#x[r]),e.unshift([i,a])}return e}load(e){this.clear();for(let[r,i]of e){if(i.start){let n=Date.now()-i.start;i.start=vr.now()-n}this.set(r,i.value,i)}}set(e,r,i={}){if(r===void 0)return this.delete(e),this;let{ttl:n=this.ttl,start:s,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:l}=i,{noUpdateTTL:u=this.noUpdateTTL}=i,h=this.#j(e,r,i.size||0,o);if(this.maxEntrySize&&h>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.delete(e),this;let p=this.#u===0?void 0:this.#l.get(e);if(p===void 0)p=this.#u===0?this.#c:this.#v.length!==0?this.#v.pop():this.#u===this.#e?this.#D(!1):this.#u,this.#a[p]=e,this.#t[p]=r,this.#l.set(e,p),this.#g[this.#c]=p,this.#y[p]=this.#c,this.#c=p,this.#u++,this.#L(p,h,l),l&&(l.set="add"),u=!1;else{this.#q(p);let c=this.#t[p];if(r!==c){if(this.#M&&this.#f(c)){c.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:f}=c;f!==void 0&&!a&&(this.#w&&this.#s?.(f,e,"set"),this.#p&&this.#m?.push([f,e,"set"]))}else a||(this.#w&&this.#s?.(c,e,"set"),this.#p&&this.#m?.push([c,e,"set"]));if(this.#E(p),this.#L(p,h,l),this.#t[p]=r,l){l.set="replace";let f=c&&this.#f(c)?c.__staleWhileFetching:c;f!==void 0&&(l.oldValue=f)}}else l&&(l.set="update")}if(n!==0&&!this.#_&&this.#A(),this.#_&&(u||this.#n(p,n,s),l&&this.#S(l,p)),!a&&this.#p&&this.#m){let c=this.#m,f;for(;f=c?.shift();)this.#i?.(...f)}return this}pop(){try{for(;this.#u;){let e=this.#t[this.#d];if(this.#D(!0),this.#f(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#p&&this.#m){let e=this.#m,r;for(;r=e?.shift();)this.#i?.(...r)}}}#D(e){let r=this.#d,i=this.#a[r],n=this.#t[r];return this.#M&&this.#f(n)?n.__abortController.abort(new Error("evicted")):(this.#w||this.#p)&&(this.#w&&this.#s?.(n,i,"evict"),this.#p&&this.#m?.push([n,i,"evict"])),this.#E(r),e&&(this.#a[r]=void 0,this.#t[r]=void 0,this.#v.push(r)),this.#u===1?(this.#d=this.#c=0,this.#v.length=0):this.#d=this.#g[r],this.#l.delete(i),this.#u--,r}has(e,r={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:n}=r,s=this.#l.get(e);if(s!==void 0){let a=this.#t[s];if(this.#f(a)&&a.__staleWhileFetching===void 0)return!1;if(this.#b(s))n&&(n.has="stale",this.#S(n,s));else return i&&this.#O(s),n&&(n.has="hit",this.#S(n,s)),!0}else n&&(n.has="miss");return!1}peek(e,r={}){let{allowStale:i=this.allowStale}=r,n=this.#l.get(e);if(n===void 0||!i&&this.#b(n))return;let s=this.#t[n];return this.#f(s)?s.__staleWhileFetching:s}#C(e,r,i,n){let s=r===void 0?void 0:this.#t[r];if(this.#f(s))return s;let a=new rs,{signal:o}=i;o?.addEventListener("abort",()=>a.abort(o.reason),{signal:a.signal});let l={signal:a.signal,options:i,context:n},u=(b,S=!1)=>{let{aborted:_}=a.signal,x=i.ignoreFetchAbort&&b!==void 0;if(i.status&&(_&&!S?(i.status.fetchAborted=!0,i.status.fetchError=a.signal.reason,x&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),_&&!x&&!S)return p(a.signal.reason);let R=f;return this.#t[r]===f&&(b===void 0?R.__staleWhileFetching?this.#t[r]=R.__staleWhileFetching:this.delete(e):(i.status&&(i.status.fetchUpdated=!0),this.set(e,b,l.options))),b},h=b=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=b),p(b)),p=b=>{let{aborted:S}=a.signal,_=S&&i.allowStaleOnFetchAbort,x=_||i.allowStaleOnFetchRejection,R=x||i.noDeleteOnFetchRejection,O=f;if(this.#t[r]===f&&(!R||O.__staleWhileFetching===void 0?this.delete(e):_||(this.#t[r]=O.__staleWhileFetching)),x)return i.status&&O.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),O.__staleWhileFetching;if(O.__returned===O)throw b},c=(b,S)=>{let _=this.#o?.(e,s,l);_&&_ instanceof Promise&&_.then(x=>b(x===void 0?void 0:x),S),a.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(b(void 0),i.allowStaleOnFetchAbort&&(b=x=>u(x,!0)))})};i.status&&(i.status.fetchDispatched=!0);let f=new Promise(c).then(u,h),y=Object.assign(f,{__abortController:a,__staleWhileFetching:s,__returned:void 0});return r===void 0?(this.set(e,y,{...l.options,status:void 0}),r=this.#l.get(e)):this.#t[r]=y,y}#f(e){if(!this.#M)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof rs}async fetch(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:l=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:p=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:c=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:y=this.allowStaleOnFetchAbort,context:b,forceRefresh:S=!1,status:_,signal:x}=r;if(!this.#M)return _&&(_.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,status:_});let R={allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,ttl:a,noDisposeOnSet:o,size:l,sizeCalculation:u,noUpdateTTL:h,noDeleteOnFetchRejection:p,allowStaleOnFetchRejection:c,allowStaleOnFetchAbort:y,ignoreFetchAbort:f,status:_,signal:x},O=this.#l.get(e);if(O===void 0){_&&(_.fetch="miss");let A=this.#C(e,O,R,b);return A.__returned=A}else{let A=this.#t[O];if(this.#f(A)){let te=i&&A.__staleWhileFetching!==void 0;return _&&(_.fetch="inflight",te&&(_.returnedStale=!0)),te?A.__staleWhileFetching:A.__returned=A}let D=this.#b(O);if(!S&&!D)return _&&(_.fetch="hit"),this.#q(O),n&&this.#O(O),_&&this.#S(_,O),A;let F=this.#C(e,O,R,b),B=F.__staleWhileFetching!==void 0&&i;return _&&(_.fetch=D?"stale":"refresh",B&&D&&(_.returnedStale=!0)),B?F.__staleWhileFetching:F.__returned=F}}get(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:a}=r,o=this.#l.get(e);if(o!==void 0){let l=this.#t[o],u=this.#f(l);return a&&this.#S(a,o),this.#b(o)?(a&&(a.get="stale"),u?(a&&i&&l.__staleWhileFetching!==void 0&&(a.returnedStale=!0),i?l.__staleWhileFetching:void 0):(s||this.delete(e),a&&i&&(a.returnedStale=!0),i?l:void 0)):(a&&(a.get="hit"),u?l.__staleWhileFetching:(this.#q(o),n&&this.#O(o),l))}else a&&(a.get="miss")}#F(e,r){this.#y[r]=e,this.#g[e]=r}#q(e){e!==this.#c&&(e===this.#d?this.#d=this.#g[e]:this.#F(this.#y[e],this.#g[e]),this.#F(this.#c,e),this.#c=e)}delete(e){let r=!1;if(this.#u!==0){let i=this.#l.get(e);if(i!==void 0)if(r=!0,this.#u===1)this.clear();else{this.#E(i);let n=this.#t[i];if(this.#f(n)?n.__abortController.abort(new Error("deleted")):(this.#w||this.#p)&&(this.#w&&this.#s?.(n,e,"delete"),this.#p&&this.#m?.push([n,e,"delete"])),this.#l.delete(e),this.#a[i]=void 0,this.#t[i]=void 0,i===this.#c)this.#c=this.#y[i];else if(i===this.#d)this.#d=this.#g[i];else{let s=this.#y[i];this.#g[s]=this.#g[i];let a=this.#g[i];this.#y[a]=this.#y[i]}this.#u--,this.#v.push(i)}}if(this.#p&&this.#m?.length){let i=this.#m,n;for(;n=i?.shift();)this.#i?.(...n)}return r}clear(){for(let e of this.#k({allowStale:!0})){let r=this.#t[e];if(this.#f(r))r.__abortController.abort(new Error("deleted"));else{let i=this.#a[e];this.#w&&this.#s?.(r,i,"delete"),this.#p&&this.#m?.push([r,i,"delete"])}}if(this.#l.clear(),this.#t.fill(void 0),this.#a.fill(void 0),this.#_&&this.#T&&(this.#_.fill(0),this.#T.fill(0)),this.#x&&this.#x.fill(0),this.#d=0,this.#c=0,this.#v.length=0,this.#h=0,this.#u=0,this.#p&&this.#m){let e=this.#m,r;for(;r=e?.shift();)this.#i?.(...r)}}};var Rr=require("path"),Wp=require("url"),NS=Ee(require("fs"),1),et=require("fs"),kt=require("fs/promises");var us=require("events"),Yo=Ee(require("stream"),1),jp=require("string_decoder"),Dp=typeof process=="object"&&process?process:{stdout:null,stderr:null},MS=t=>!!t&&typeof t=="object"&&(t instanceof Mt||t instanceof Yo.default||kS(t)||AS(t)),kS=t=>!!t&&typeof t=="object"&&t instanceof us.EventEmitter&&typeof t.pipe=="function"&&t.pipe!==Yo.default.Writable.prototype.pipe,AS=t=>!!t&&typeof t=="object"&&t instanceof us.EventEmitter&&typeof t.write=="function"&&typeof t.end=="function",lt=Symbol("EOF"),ut=Symbol("maybeEmitEnd"),Ot=Symbol("emittedEnd"),is=Symbol("emittingEnd"),gi=Symbol("emittedError"),ns=Symbol("closed"),qp=Symbol("read"),ss=Symbol("flush"),Cp=Symbol("flushChunk"),Be=Symbol("encoding"),Sr=Symbol("decoder"),se=Symbol("flowing"),mi=Symbol("paused"),Er=Symbol("resume"),ae=Symbol("buffer"),_e=Symbol("pipes"),oe=Symbol("bufferLength"),Wo=Symbol("bufferPush"),as=Symbol("bufferShift"),pe=Symbol("objectMode"),ee=Symbol("destroyed"),Bo=Symbol("error"),Uo=Symbol("emitData"),Lp=Symbol("emitEnd"),zo=Symbol("emitEnd2"),Qe=Symbol("async"),Ho=Symbol("abort"),os=Symbol("aborted"),yi=Symbol("signal"),Jt=Symbol("dataListeners"),Ae=Symbol("discarded"),bi=t=>Promise.resolve().then(t),PS=t=>t(),DS=t=>t==="end"||t==="finish"||t==="prefinish",qS=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,CS=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),ls=class{src;dest;opts;ondrain;constructor(e,r,i){this.src=e,this.dest=r,this.opts=i,this.ondrain=()=>e[Er](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Go=class extends ls{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,i){super(e,r,i),this.proxyErrors=n=>r.emit("error",n),e.on("error",this.proxyErrors)}},LS=t=>!!t.objectMode,jS=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",Mt=class extends us.EventEmitter{[se]=!1;[mi]=!1;[_e]=[];[ae]=[];[pe];[Be];[Qe];[Sr];[lt]=!1;[Ot]=!1;[is]=!1;[ns]=!1;[gi]=null;[oe]=0;[ee]=!1;[yi];[os]=!1;[Jt]=0;[Ae]=!1;writable=!0;readable=!0;constructor(...e){let r=e[0]||{};if(super(),r.objectMode&&typeof r.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");LS(r)?(this[pe]=!0,this[Be]=null):jS(r)?(this[Be]=r.encoding,this[pe]=!1):(this[pe]=!1,this[Be]=null),this[Qe]=!!r.async,this[Sr]=this[Be]?new jp.StringDecoder(this[Be]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[ae]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[_e]});let{signal:i}=r;i&&(this[yi]=i,i.aborted?this[Ho]():i.addEventListener("abort",()=>this[Ho]()))}get bufferLength(){return this[oe]}get encoding(){return this[Be]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[pe]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Qe]}set async(e){this[Qe]=this[Qe]||!!e}[Ho](){this[os]=!0,this.emit("abort",this[yi]?.reason),this.destroy(this[yi]?.reason)}get aborted(){return this[os]}set aborted(e){}write(e,r,i){if(this[os])return!1;if(this[lt])throw new Error("write after end");if(this[ee])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(i=r,r="utf8"),r||(r="utf8");let n=this[Qe]?bi:PS;if(!this[pe]&&!Buffer.isBuffer(e)){if(CS(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(qS(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[pe]?(this[se]&&this[oe]!==0&&this[ss](!0),this[se]?this.emit("data",e):this[Wo](e),this[oe]!==0&&this.emit("readable"),i&&n(i),this[se]):e.length?(typeof e=="string"&&!(r===this[Be]&&!this[Sr]?.lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[Be]&&(e=this[Sr].write(e)),this[se]&&this[oe]!==0&&this[ss](!0),this[se]?this.emit("data",e):this[Wo](e),this[oe]!==0&&this.emit("readable"),i&&n(i),this[se]):(this[oe]!==0&&this.emit("readable"),i&&n(i),this[se])}read(e){if(this[ee])return null;if(this[Ae]=!1,this[oe]===0||e===0||e&&e>this[oe])return this[ut](),null;this[pe]&&(e=null),this[ae].length>1&&!this[pe]&&(this[ae]=[this[Be]?this[ae].join(""):Buffer.concat(this[ae],this[oe])]);let r=this[qp](e||null,this[ae][0]);return this[ut](),r}[qp](e,r){if(this[pe])this[as]();else{let i=r;e===i.length||e===null?this[as]():typeof i=="string"?(this[ae][0]=i.slice(e),r=i.slice(0,e),this[oe]-=e):(this[ae][0]=i.subarray(e),r=i.subarray(0,e),this[oe]-=e)}return this.emit("data",r),!this[ae].length&&!this[lt]&&this.emit("drain"),r}end(e,r,i){return typeof e=="function"&&(i=e,e=void 0),typeof r=="function"&&(i=r,r="utf8"),e!==void 0&&this.write(e,r),i&&this.once("end",i),this[lt]=!0,this.writable=!1,(this[se]||!this[mi])&&this[ut](),this}[Er](){this[ee]||(!this[Jt]&&!this[_e].length&&(this[Ae]=!0),this[mi]=!1,this[se]=!0,this.emit("resume"),this[ae].length?this[ss]():this[lt]?this[ut]():this.emit("drain"))}resume(){return this[Er]()}pause(){this[se]=!1,this[mi]=!0,this[Ae]=!1}get destroyed(){return this[ee]}get flowing(){return this[se]}get paused(){return this[mi]}[Wo](e){this[pe]?this[oe]+=1:this[oe]+=e.length,this[ae].push(e)}[as](){return this[pe]?this[oe]-=1:this[oe]-=this[ae][0].length,this[ae].shift()}[ss](e=!1){do;while(this[Cp](this[as]())&&this[ae].length);!e&&!this[ae].length&&!this[lt]&&this.emit("drain")}[Cp](e){return this.emit("data",e),this[se]}pipe(e,r){if(this[ee])return e;this[Ae]=!1;let i=this[Ot];return r=r||{},e===Dp.stdout||e===Dp.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,i?r.end&&e.end():(this[_e].push(r.proxyErrors?new Go(this,e,r):new ls(this,e,r)),this[Qe]?bi(()=>this[Er]()):this[Er]()),e}unpipe(e){let r=this[_e].find(i=>i.dest===e);r&&(this[_e].length===1?(this[se]&&this[Jt]===0&&(this[se]=!1),this[_e]=[]):this[_e].splice(this[_e].indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let i=super.on(e,r);if(e==="data")this[Ae]=!1,this[Jt]++,!this[_e].length&&!this[se]&&this[Er]();else if(e==="readable"&&this[oe]!==0)super.emit("readable");else if(DS(e)&&this[Ot])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[gi]){let n=r;this[Qe]?bi(()=>n.call(this,this[gi])):n.call(this,this[gi])}return i}removeListener(e,r){return this.off(e,r)}off(e,r){let i=super.off(e,r);return e==="data"&&(this[Jt]=this.listeners("data").length,this[Jt]===0&&!this[Ae]&&!this[_e].length&&(this[se]=!1)),i}removeAllListeners(e){let r=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Jt]=0,!this[Ae]&&!this[_e].length&&(this[se]=!1)),r}get emittedEnd(){return this[Ot]}[ut](){!this[is]&&!this[Ot]&&!this[ee]&&this[ae].length===0&&this[lt]&&(this[is]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[ns]&&this.emit("close"),this[is]=!1)}emit(e,...r){let i=r[0];if(e!=="error"&&e!=="close"&&e!==ee&&this[ee])return!1;if(e==="data")return!this[pe]&&!i?!1:this[Qe]?(bi(()=>this[Uo](i)),!0):this[Uo](i);if(e==="end")return this[Lp]();if(e==="close"){if(this[ns]=!0,!this[Ot]&&!this[ee])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[gi]=i,super.emit(Bo,i);let s=!this[yi]||this.listeners("error").length?super.emit("error",i):!1;return this[ut](),s}else if(e==="resume"){let s=super.emit("resume");return this[ut](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let n=super.emit(e,...r);return this[ut](),n}[Uo](e){for(let i of this[_e])i.dest.write(e)===!1&&this.pause();let r=this[Ae]?!1:super.emit("data",e);return this[ut](),r}[Lp](){return this[Ot]?!1:(this[Ot]=!0,this.readable=!1,this[Qe]?(bi(()=>this[zo]()),!0):this[zo]())}[zo](){if(this[Sr]){let r=this[Sr].end();if(r){for(let i of this[_e])i.dest.write(r);this[Ae]||super.emit("data",r)}}for(let r of this[_e])r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[pe]||(e.dataLength=0);let r=this.promise();return this.on("data",i=>{e.push(i),this[pe]||(e.dataLength+=i.length)}),await r,e}async concat(){if(this[pe])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Be]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,r)=>{this.on(ee,()=>r(new Error("stream destroyed"))),this.on("error",i=>r(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Ae]=!1;let e=!1,r=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return r();let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[lt])return r();let s,a,o=p=>{this.off("data",l),this.off("end",u),this.off(ee,h),r(),a(p)},l=p=>{this.off("error",o),this.off("end",u),this.off(ee,h),this.pause(),s({value:p,done:!!this[lt]})},u=()=>{this.off("error",o),this.off("data",l),this.off(ee,h),r(),s({done:!0,value:void 0})},h=()=>o(new Error("stream destroyed"));return new Promise((p,c)=>{a=c,s=p,this.once(ee,h),this.once("error",o),this.once("end",u),this.once("data",l)})},throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Ae]=!1;let e=!1,r=()=>(this.pause(),this.off(Bo,r),this.off(ee,r),this.off("end",r),e=!0,{done:!0,value:void 0}),i=()=>{if(e)return r();let n=this.read();return n===null?r():{done:!1,value:n}};return this.once("end",r),this.once(Bo,r),this.once(ee,r),{next:i,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(e){if(this[ee])return e?this.emit("error",e):this.emit(ee),this;this[ee]=!0,this[Ae]=!0,this[ae].length=0,this[oe]=0;let r=this;return typeof r.close=="function"&&!this[ns]&&r.close(),e?this.emit("error",e):this.emit(ee),this}static get isStream(){return MS}};var FS=et.realpathSync.native,vi={lstatSync:et.lstatSync,readdir:et.readdir,readdirSync:et.readdirSync,readlinkSync:et.readlinkSync,realpathSync:FS,promises:{lstat:kt.lstat,readdir:kt.readdir,readlink:kt.readlink,realpath:kt.realpath}},Bp=t=>!t||t===vi||t===NS?vi:{...vi,...t,promises:{...vi.promises,...t.promises||{}}},Up=/^\\\\\?\\([a-z]:)\\?$/i,IS=t=>t.replace(/\//g,"\\").replace(Up,"$1\\"),$S=/[\\\/]/,Ne=0,zp=1,Hp=2,Xe=4,Gp=6,Yp=8,Zt=10,Vp=12,je=15,wi=~je,Vo=16,Np=32,_i=64,Ue=128,fs=256,cs=512,Fp=_i|Ue|cs,WS=1023,Ko=t=>t.isFile()?Yp:t.isDirectory()?Xe:t.isSymbolicLink()?Zt:t.isCharacterDevice()?Hp:t.isBlockDevice()?Gp:t.isSocket()?Vp:t.isFIFO()?zp:Ne,Ip=new Map,Si=t=>{let e=Ip.get(t);if(e)return e;let r=t.normalize("NFKD");return Ip.set(t,r),r},$p=new Map,hs=t=>{let e=$p.get(t);if(e)return e;let r=Si(t.toLowerCase());return $p.set(t,r),r},ds=class extends pi{constructor(){super({max:256})}},Jo=class extends pi{constructor(e=16*1024){super({maxSize:e,sizeCalculation:r=>r.length+1})}},Kp=Symbol("PathScurry setAsCwd"),ge=class{name;root;roots;parent;nocase;#e;#r;get dev(){return this.#r}#s;get mode(){return this.#s}#i;get nlink(){return this.#i}#o;get uid(){return this.#o}#u;get gid(){return this.#u}#h;get rdev(){return this.#h}#l;get blksize(){return this.#l}#a;get ino(){return this.#a}#t;get size(){return this.#t}#g;get blocks(){return this.#g}#y;get atimeMs(){return this.#y}#d;get mtimeMs(){return this.#d}#c;get ctimeMs(){return this.#c}#v;get birthtimeMs(){return this.#v}#m;get atime(){return this.#m}#x;get mtime(){return this.#x}#T;get ctime(){return this.#T}#_;get birthtime(){return this.#_}#w;#M;#p;#A;#O;#S;#n;#b;#P;#E;get path(){return(this.parent||this).fullpath()}constructor(e,r=Ne,i,n,s,a,o){this.name=e,this.#w=s?hs(e):Si(e),this.#n=r&WS,this.nocase=s,this.roots=n,this.root=i||this,this.#b=a,this.#p=o.fullpath,this.#O=o.relative,this.#S=o.relativePosix,this.parent=o.parent,this.parent?this.#e=this.parent.#e:this.#e=Bp(o.fs)}depth(){return this.#M!==void 0?this.#M:this.parent?this.#M=this.parent.depth()+1:this.#M=0}childrenCache(){return this.#b}resolve(e){if(!e)return this;let r=this.getRootString(e),n=e.substring(r.length).split(this.splitSep);return r?this.getRoot(r).#L(n):this.#L(n)}#L(e){let r=this;for(let i of e)r=r.child(i);return r}children(){let e=this.#b.get(this);if(e)return e;let r=Object.assign([],{provisional:0});return this.#b.set(this,r),this.#n&=~Vo,r}child(e,r){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let i=this.children(),n=this.nocase?hs(e):Si(e);for(let l of i)if(l.#w===n)return l;let s=this.parent?this.sep:"",a=this.#p?this.#p+s+e:void 0,o=this.newChild(e,Ne,{...r,parent:this,fullpath:a});return this.canReaddir()||(o.#n|=Ue),i.push(o),o}relative(){if(this.#O!==void 0)return this.#O;let e=this.name,r=this.parent;if(!r)return this.#O=this.name;let i=r.relative();return i+(!i||!r.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.#S!==void 0)return this.#S;let e=this.name,r=this.parent;if(!r)return this.#S=this.fullpathPosix();let i=r.relativePosix();return i+(!i||!r.parent?"":"/")+e}fullpath(){if(this.#p!==void 0)return this.#p;let e=this.name,r=this.parent;if(!r)return this.#p=this.name;let n=r.fullpath()+(r.parent?this.sep:"")+e;return this.#p=n}fullpathPosix(){if(this.#A!==void 0)return this.#A;if(this.sep==="/")return this.#A=this.fullpath();if(!this.parent){let n=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(n)?this.#A=`//?/${n}`:this.#A=n}let e=this.parent,r=e.fullpathPosix(),i=r+(!r||!e.parent?"":"/")+this.name;return this.#A=i}isUnknown(){return(this.#n&je)===Ne}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#n&je)===Yp}isDirectory(){return(this.#n&je)===Xe}isCharacterDevice(){return(this.#n&je)===Hp}isBlockDevice(){return(this.#n&je)===Gp}isFIFO(){return(this.#n&je)===zp}isSocket(){return(this.#n&je)===Vp}isSymbolicLink(){return(this.#n&Zt)===Zt}lstatCached(){return this.#n&Np?this:void 0}readlinkCached(){return this.#P}realpathCached(){return this.#E}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#P)return!0;if(!this.parent)return!1;let e=this.#n&je;return!(e!==Ne&&e!==Zt||this.#n&fs||this.#n&Ue)}calledReaddir(){return!!(this.#n&Vo)}isENOENT(){return!!(this.#n&Ue)}isNamed(e){return this.nocase?this.#w===hs(e):this.#w===Si(e)}async readlink(){let e=this.#P;if(e)return e;if(this.canReadlink()&&this.parent)try{let r=await this.#e.promises.readlink(this.fullpath()),i=(await this.parent.realpath())?.resolve(r);if(i)return this.#P=i}catch(r){this.#F(r.code);return}}readlinkSync(){let e=this.#P;if(e)return e;if(this.canReadlink()&&this.parent)try{let r=this.#e.readlinkSync(this.fullpath()),i=this.parent.realpathSync()?.resolve(r);if(i)return this.#P=i}catch(r){this.#F(r.code);return}}#j(e){this.#n|=Vo;for(let r=e.provisional;r<e.length;r++){let i=e[r];i&&i.#R()}}#R(){this.#n&Ue||(this.#n=(this.#n|Ue)&wi,this.#k())}#k(){let e=this.children();e.provisional=0;for(let r of e)r.#R()}#N(){this.#n|=cs,this.#D()}#D(){if(this.#n&_i)return;let e=this.#n;(e&je)===Xe&&(e&=wi),this.#n=e|_i,this.#k()}#C(e=""){e==="ENOTDIR"||e==="EPERM"?this.#D():e==="ENOENT"?this.#R():this.children().provisional=0}#f(e=""){e==="ENOTDIR"?this.parent.#D():e==="ENOENT"&&this.#R()}#F(e=""){let r=this.#n;r|=fs,e==="ENOENT"&&(r|=Ue),(e==="EINVAL"||e==="UNKNOWN")&&(r&=wi),this.#n=r,e==="ENOTDIR"&&this.parent&&this.parent.#D()}#q(e,r){return this.#z(e,r)||this.#U(e,r)}#U(e,r){let i=Ko(e),n=this.newChild(e.name,i,{parent:this}),s=n.#n&je;return s!==Xe&&s!==Zt&&s!==Ne&&(n.#n|=_i),r.unshift(n),r.provisional++,n}#z(e,r){for(let i=r.provisional;i<r.length;i++){let n=r[i];if((this.nocase?hs(e.name):Si(e.name))===n.#w)return this.#H(e,n,i,r)}}#H(e,r,i,n){let s=r.name;return r.#n=r.#n&wi|Ko(e),s!==e.name&&(r.name=e.name),i!==n.provisional&&(i===n.length-1?n.pop():n.splice(i,1),n.unshift(r)),n.provisional++,r}async lstat(){if(!(this.#n&Ue))try{return this.#B(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#f(e.code)}}lstatSync(){if(!(this.#n&Ue))try{return this.#B(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#f(e.code)}}#B(e){let{atime:r,atimeMs:i,birthtime:n,birthtimeMs:s,blksize:a,blocks:o,ctime:l,ctimeMs:u,dev:h,gid:p,ino:c,mode:f,mtime:y,mtimeMs:b,nlink:S,rdev:_,size:x,uid:R}=e;this.#m=r,this.#y=i,this.#_=n,this.#v=s,this.#l=a,this.#g=o,this.#T=l,this.#c=u,this.#r=h,this.#u=p,this.#a=c,this.#s=f,this.#x=y,this.#d=b,this.#i=S,this.#h=_,this.#t=x,this.#o=R;let O=Ko(e);this.#n=this.#n&wi|O|Np,O!==Ne&&O!==Xe&&O!==Zt&&(this.#n|=_i)}#$=[];#W=!1;#G(e){this.#W=!1;let r=this.#$.slice();this.#$.length=0,r.forEach(i=>i(null,e))}readdirCB(e,r=!1){if(!this.canReaddir()){r?e(null,[]):queueMicrotask(()=>e(null,[]));return}let i=this.children();if(this.calledReaddir()){let s=i.slice(0,i.provisional);r?e(null,s):queueMicrotask(()=>e(null,s));return}if(this.#$.push(e),this.#W)return;this.#W=!0;let n=this.fullpath();this.#e.readdir(n,{withFileTypes:!0},(s,a)=>{if(s)this.#C(s.code),i.provisional=0;else{for(let o of a)this.#q(o,i);this.#j(i)}this.#G(i.slice(0,i.provisional))})}#I;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();if(this.#I)await this.#I;else{let i=()=>{};this.#I=new Promise(n=>i=n);try{for(let n of await this.#e.promises.readdir(r,{withFileTypes:!0}))this.#q(n,e);this.#j(e)}catch(n){this.#C(n.code),e.provisional=0}this.#I=void 0,i()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();try{for(let i of this.#e.readdirSync(r,{withFileTypes:!0}))this.#q(i,e);this.#j(e)}catch(i){this.#C(i.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#n&Fp)return!1;let e=je&this.#n;return e===Ne||e===Xe||e===Zt}shouldWalk(e,r){return(this.#n&Xe)===Xe&&!(this.#n&Fp)&&!e.has(this)&&(!r||r(this))}async realpath(){if(this.#E)return this.#E;if(!((cs|fs|Ue)&this.#n))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#E=this.resolve(e)}catch{this.#N()}}realpathSync(){if(this.#E)return this.#E;if(!((cs|fs|Ue)&this.#n))try{let e=this.#e.realpathSync(this.fullpath());return this.#E=this.resolve(e)}catch{this.#N()}}[Kp](e){if(e===this)return;let r=new Set([]),i=[],n=this;for(;n&&n.parent;)r.add(n),n.#O=i.join(this.sep),n.#S=i.join("/"),n=n.parent,i.push("..");for(n=e;n&&n.parent&&!r.has(n);)n.#O=void 0,n.#S=void 0,n=n.parent}},ps=class t extends ge{sep="\\";splitSep=$S;constructor(e,r=Ne,i,n,s,a,o){super(e,r,i,n,s,a,o)}newChild(e,r=Ne,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(e){return Rr.win32.parse(e).root}getRoot(e){if(e=IS(e.toUpperCase()),e===this.root.name)return this.root;for(let[r,i]of Object.entries(this.roots))if(this.sameRoot(e,r))return this.roots[e]=i;return this.roots[e]=new xr(e,this).root}sameRoot(e,r=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(Up,"$1\\"),e===r}},gs=class t extends ge{splitSep="/";sep="/";constructor(e,r=Ne,i,n,s,a,o){super(e,r,i,n,s,a,o)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,r=Ne,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}},ms=class{root;rootPath;roots;cwd;#e;#r;#s;nocase;#i;constructor(e=process.cwd(),r,i,{nocase:n,childrenCacheSize:s=16*1024,fs:a=vi}={}){this.#i=Bp(a),(e instanceof URL||e.startsWith("file://"))&&(e=(0,Wp.fileURLToPath)(e));let o=r.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#e=new ds,this.#r=new ds,this.#s=new Jo(s);let l=o.substring(this.rootPath.length).split(i);if(l.length===1&&!l[0]&&l.pop(),n===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=n,this.root=this.newRoot(this.#i),this.roots[this.rootPath]=this.root;let u=this.root,h=l.length-1,p=r.sep,c=this.rootPath,f=!1;for(let y of l){let b=h--;u=u.child(y,{relative:new Array(b).fill("..").join(p),relativePosix:new Array(b).fill("..").join("/"),fullpath:c+=(f?"":p)+y}),f=!0}this.cwd=u}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#s}resolve(...e){let r="";for(let s=e.length-1;s>=0;s--){let a=e[s];if(!(!a||a===".")&&(r=r?`${a}/${r}`:a,this.isAbsolute(a)))break}let i=this.#e.get(r);if(i!==void 0)return i;let n=this.cwd.resolve(r).fullpath();return this.#e.set(r,n),n}resolvePosix(...e){let r="";for(let s=e.length-1;s>=0;s--){let a=e[s];if(!(!a||a===".")&&(r=r?`${a}/${r}`:a,this.isAbsolute(a)))break}let i=this.#r.get(r);if(i!==void 0)return i;let n=this.cwd.resolve(r).fullpathPosix();return this.#r.set(r,n),n}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ge||(r=e,e=this.cwd);let{withFileTypes:i}=r;if(e.canReaddir()){let n=await e.readdir();return i?n:n.map(s=>s.name)}else return[]}readdirSync(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ge||(r=e,e=this.cwd);let{withFileTypes:i=!0}=r;return e.canReaddir()?i?e.readdirSync():e.readdirSync().map(n=>n.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ge||(r=e.withFileTypes,e=this.cwd);let i=await e.readlink();return r?i:i?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ge||(r=e.withFileTypes,e=this.cwd);let i=e.readlinkSync();return r?i:i?.fullpath()}async realpath(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ge||(r=e.withFileTypes,e=this.cwd);let i=await e.realpath();return r?i:i?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ge||(r=e.withFileTypes,e=this.cwd);let i=e.realpathSync();return r?i:i?.fullpath()}async walk(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ge||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=[];(!s||s(e))&&o.push(i?e:e.fullpath());let l=new Set,u=(p,c)=>{l.add(p),p.readdirCB((f,y)=>{if(f)return c(f);let b=y.length;if(!b)return c();let S=()=>{--b===0&&c()};for(let _ of y)(!s||s(_))&&o.push(i?_:_.fullpath()),n&&_.isSymbolicLink()?_.realpath().then(x=>x?.isUnknown()?x.lstat():x).then(x=>x?.shouldWalk(l,a)?u(x,S):S()):_.shouldWalk(l,a)?u(_,S):S()},!0)},h=e;return new Promise((p,c)=>{u(h,f=>{if(f)return c(f);p(o)})})}walkSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ge||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=[];(!s||s(e))&&o.push(i?e:e.fullpath());let l=new Set([e]);for(let u of l){let h=u.readdirSync();for(let p of h){(!s||s(p))&&o.push(i?p:p.fullpath());let c=p;if(p.isSymbolicLink()){if(!(n&&(c=p.realpathSync())))continue;c.isUnknown()&&c.lstatSync()}c.shouldWalk(l,a)&&l.add(c)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,r={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof ge||(r=e,e=this.cwd),this.stream(e,r)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ge||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r;(!s||s(e))&&(yield i?e:e.fullpath());let o=new Set([e]);for(let l of o){let u=l.readdirSync();for(let h of u){(!s||s(h))&&(yield i?h:h.fullpath());let p=h;if(h.isSymbolicLink()){if(!(n&&(p=h.realpathSync())))continue;p.isUnknown()&&p.lstatSync()}p.shouldWalk(o,a)&&o.add(p)}}}stream(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ge||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=new Mt({objectMode:!0});(!s||s(e))&&o.write(i?e:e.fullpath());let l=new Set,u=[e],h=0,p=()=>{let c=!1;for(;!c;){let f=u.shift();if(!f){h===0&&o.end();return}h++,l.add(f);let y=(S,_,x=!1)=>{if(S)return o.emit("error",S);if(n&&!x){let R=[];for(let O of _)O.isSymbolicLink()&&R.push(O.realpath().then(A=>A?.isUnknown()?A.lstat():A));if(R.length){Promise.all(R).then(()=>y(null,_,!0));return}}for(let R of _)R&&(!s||s(R))&&(o.write(i?R:R.fullpath())||(c=!0));h--;for(let R of _){let O=R.realpathCached()||R;O.shouldWalk(l,a)&&u.push(O)}c&&!o.flowing?o.once("drain",p):b||p()},b=!0;f.readdirCB(y,!0),b=!1}};return p(),o}streamSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ge||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=new Mt({objectMode:!0}),l=new Set;(!s||s(e))&&o.write(i?e:e.fullpath());let u=[e],h=0,p=()=>{let c=!1;for(;!c;){let f=u.shift();if(!f){h===0&&o.end();return}h++,l.add(f);let y=f.readdirSync();for(let b of y)(!s||s(b))&&(o.write(i?b:b.fullpath())||(c=!0));h--;for(let b of y){let S=b;if(b.isSymbolicLink()){if(!(n&&(S=b.realpathSync())))continue;S.isUnknown()&&S.lstatSync()}S.shouldWalk(l,a)&&u.push(S)}}c&&!o.flowing&&o.once("drain",p)};return p(),o}chdir(e=this.cwd){let r=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[Kp](r)}},xr=class extends ms{sep="\\";constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,Rr.win32,"\\",{...r,nocase:i}),this.nocase=i;for(let n=this.cwd;n;n=n.parent)n.nocase=this.nocase}parseRootPath(e){return Rr.win32.parse(e).root.toUpperCase()}newRoot(e){return new ps(this.rootPath,Xe,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},Tr=class extends ms{sep="/";constructor(e=process.cwd(),r={}){let{nocase:i=!1}=r;super(e,Rr.posix,"/",{...r,nocase:i}),this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new gs(this.rootPath,Xe,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},Ei=class extends Tr{constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,{...r,nocase:i})}},px=process.platform==="win32"?ps:gs,Jp=process.platform==="win32"?xr:process.platform==="darwin"?Ei:Tr;var Zp=require("url");var BS=t=>t.length>=1,US=t=>t.length>=1,Or=class t{#e;#r;#s;length;#i;#o;#u;#h;#l;#a;#t=!0;constructor(e,r,i,n){if(!BS(e))throw new TypeError("empty pattern list");if(!US(r))throw new TypeError("empty glob list");if(r.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,i<0||i>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#r=r,this.#s=i,this.#i=n,this.#s===0){if(this.isUNC()){let[s,a,o,l,...u]=this.#e,[h,p,c,f,...y]=this.#r;u[0]===""&&(u.shift(),y.shift());let b=[s,a,o,l,""].join("/"),S=[h,p,c,f,""].join("/");this.#e=[b,...u],this.#r=[S,...y],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[s,...a]=this.#e,[o,...l]=this.#r;a[0]===""&&(a.shift(),l.shift());let u=s+"/",h=o+"/";this.#e=[u,...a],this.#r=[h,...l],this.length=this.#e.length}}}pattern(){return this.#e[this.#s]}isString(){return typeof this.#e[this.#s]=="string"}isGlobstar(){return this.#e[this.#s]===he}isRegExp(){return this.#e[this.#s]instanceof RegExp}globString(){return this.#u=this.#u||(this.#s===0?this.isAbsolute()?this.#r[0]+this.#r.slice(1).join("/"):this.#r.join("/"):this.#r.slice(this.#s).join("/"))}hasMore(){return this.length>this.#s+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new t(this.#e,this.#r,this.#s+1,this.#i),this.#o.#a=this.#a,this.#o.#l=this.#l,this.#o.#h=this.#h,this.#o):this.#o=null}isUNC(){let e=this.#e;return this.#l!==void 0?this.#l:this.#l=this.#i==="win32"&&this.#s===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#h!==void 0?this.#h:this.#h=this.#i==="win32"&&this.#s===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#a!==void 0?this.#a:this.#a=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#s===0?e:""}checkFollowGlobstar(){return!(this.#s===0||!this.isGlobstar()||!this.#t)}markFollowGlobstar(){return this.#s===0||!this.isGlobstar()||!this.#t?!1:(this.#t=!1,!0)}};var zS=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Ri=class{relative;relativeChildren;absolute;absoluteChildren;constructor(e,{nobrace:r,nocase:i,noext:n,noglobstar:s,platform:a=zS}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[];let o={dot:!0,nobrace:r,nocase:i,noext:n,noglobstar:s,optimizationLevel:2,platform:a,nocomment:!0,nonegate:!0};for(let l of e){let u=new ke(l,o);for(let h=0;h<u.set.length;h++){let p=u.set[h],c=u.globParts[h];if(!p||!c)throw new Error("invalid pattern object");for(;p[0]==="."&&c[0]===".";)p.shift(),c.shift();let f=new Or(p,c,0,a),y=new ke(f.globString(),o),b=c[c.length-1]==="**",S=f.isAbsolute();S?this.absolute.push(y):this.relative.push(y),b&&(S?this.absoluteChildren.push(y):this.relativeChildren.push(y))}}}ignored(e){let r=e.fullpath(),i=`${r}/`,n=e.relative()||".",s=`${n}/`;for(let a of this.relative)if(a.match(n)||a.match(s))return!0;for(let a of this.absolute)if(a.match(r)||a.match(i))return!0;return!1}childrenIgnored(e){let r=e.fullpath()+"/",i=(e.relative()||".")+"/";for(let n of this.relativeChildren)if(n.match(i))return!0;for(let n of this.absoluteChildren)if(n.match(r))return!0;return!1}};var Zo=class t{store;constructor(e=new Map){this.store=e}copy(){return new t(new Map(this.store))}hasWalked(e,r){return this.store.get(e.fullpath())?.has(r.globString())}storeWalked(e,r){let i=e.fullpath(),n=this.store.get(i);n?n.add(r.globString()):this.store.set(i,new Set([r.globString()]))}},Qo=class{store=new Map;add(e,r,i){let n=(r?2:0)|(i?1:0),s=this.store.get(e);this.store.set(e,s===void 0?n:n&s)}entries(){return[...this.store.entries()].map(([e,r])=>[e,!!(r&2),!!(r&1)])}},Xo=class{store=new Map;add(e,r){if(!e.canReaddir())return;let i=this.store.get(e);i?i.find(n=>n.globString()===r.globString())||i.push(r):this.store.set(e,[r])}get(e){let r=this.store.get(e);if(!r)throw new Error("attempting to walk unknown path");return r}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},xi=class t{hasWalkedCache;matches=new Qo;subwalks=new Xo;patterns;follow;dot;opts;constructor(e,r){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=r?r.copy():new Zo}processPatterns(e,r){this.patterns=r;let i=r.map(n=>[e,n]);for(let[n,s]of i){this.hasWalkedCache.storeWalked(n,s);let a=s.root(),o=s.isAbsolute()&&this.opts.absolute!==!1;if(a){n=n.resolve(a==="/"&&this.opts.root!==void 0?this.opts.root:a);let p=s.rest();if(p)s=p;else{this.matches.add(n,!0,!1);continue}}if(n.isENOENT())continue;let l,u,h=!1;for(;typeof(l=s.pattern())=="string"&&(u=s.rest());)n=n.resolve(l),s=u,h=!0;if(l=s.pattern(),u=s.rest(),h){if(this.hasWalkedCache.hasWalked(n,s))continue;this.hasWalkedCache.storeWalked(n,s)}if(typeof l=="string"){let p=l===".."||l===""||l===".";this.matches.add(n.resolve(l),o,p);continue}else if(l===he){(!n.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(n,s);let p=u?.pattern(),c=u?.rest();if(!u||(p===""||p===".")&&!c)this.matches.add(n,o,p===""||p===".");else if(p===".."){let f=n.parent||n;c?this.hasWalkedCache.hasWalked(f,c)||this.subwalks.add(f,c):this.matches.add(f,o,!0)}}else l instanceof RegExp&&this.subwalks.add(n,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new t(this.opts,this.hasWalkedCache)}filterEntries(e,r){let i=this.subwalks.get(e),n=this.child();for(let s of r)for(let a of i){let o=a.isAbsolute(),l=a.pattern(),u=a.rest();l===he?n.testGlobstar(s,a,u,o):l instanceof RegExp?n.testRegExp(s,l,u,o):n.testString(s,l,u,o)}return n}testGlobstar(e,r,i,n){if((this.dot||!e.name.startsWith("."))&&(r.hasMore()||this.matches.add(e,n,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,r):e.isSymbolicLink()&&(i&&r.checkFollowGlobstar()?this.subwalks.add(e,i):r.markFollowGlobstar()&&this.subwalks.add(e,r)))),i){let s=i.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(e,s,i.rest(),n);else if(s===".."){let a=e.parent||e;this.subwalks.add(a,i)}else s instanceof RegExp&&this.testRegExp(e,s,i.rest(),n)}}testRegExp(e,r,i,n){r.test(e.name)&&(i?this.subwalks.add(e,i):this.matches.add(e,n,!1))}testString(e,r,i,n){e.isNamed(r)&&(i?this.subwalks.add(e,i):this.matches.add(e,n,!1))}};var HS=(t,e)=>typeof t=="string"?new Ri([t],e):Array.isArray(t)?new Ri(t,e):t,ys=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#r;#s;signal;maxDepth;constructor(e,r,i){this.patterns=e,this.path=r,this.opts=i,this.#s=!i.posix&&i.platform==="win32"?"\\":"/",i.ignore&&(this.#r=HS(i.ignore,i)),this.maxDepth=i.maxDepth||1/0,i.signal&&(this.signal=i.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#i(e){return this.seen.has(e)||!!this.#r?.ignored?.(e)}#o(e){return!!this.#r?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,r){if(r&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||await e.realpath(),!i)return;e=i}let s=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let a=await s.realpath();a&&(a.isUnknown()||this.opts.stat)&&await a.lstat()}return this.matchCheckTest(s,r)}matchCheckTest(e,r){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!r||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#i(e)?e:void 0}matchCheckSync(e,r){if(r&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||e.realpathSync(),!i)return;e=i}let s=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let a=s.realpathSync();a&&(a?.isUnknown()||this.opts.stat)&&a.lstatSync()}return this.matchCheckTest(s,r)}matchFinish(e,r){if(this.#i(e))return;let i=this.opts.absolute===void 0?r:this.opts.absolute;this.seen.add(e);let n=this.opts.mark&&e.isDirectory()?this.#s:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(i){let s=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(s+n)}else{let s=this.opts.posix?e.relativePosix():e.relative(),a=this.opts.dotRelative&&!s.startsWith(".."+this.#s)?"."+this.#s:"";this.matchEmit(s?a+s+n:"."+n)}}async match(e,r,i){let n=await this.matchCheck(e,i);n&&this.matchFinish(n,r)}matchSync(e,r,i){let n=this.matchCheckSync(e,i);n&&this.matchFinish(n,r)}walkCB(e,r,i){this.signal?.aborted&&i(),this.walkCB2(e,r,new xi(this.opts),i)}walkCB2(e,r,i,n){if(this.#o(e))return n();if(this.signal?.aborted&&n(),this.paused){this.onResume(()=>this.walkCB2(e,r,i,n));return}i.processPatterns(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||(s++,this.match(o,l,u).then(()=>a()));for(let o of i.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;s++;let l=o.readdirCached();o.calledReaddir()?this.walkCB3(o,l,i,a):o.readdirCB((u,h)=>this.walkCB3(o,h,i,a),!0)}a()}walkCB3(e,r,i,n){i=i.filterEntries(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||(s++,this.match(o,l,u).then(()=>a()));for(let[o,l]of i.subwalks.entries())s++,this.walkCB2(o,l,i.child(),a);a()}walkCBSync(e,r,i){this.signal?.aborted&&i(),this.walkCB2Sync(e,r,new xi(this.opts),i)}walkCB2Sync(e,r,i,n){if(this.#o(e))return n();if(this.signal?.aborted&&n(),this.paused){this.onResume(()=>this.walkCB2Sync(e,r,i,n));return}i.processPatterns(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||this.matchSync(o,l,u);for(let o of i.subwalkTargets()){if(this.maxDepth!==1/0&&o.depth()>=this.maxDepth)continue;s++;let l=o.readdirSync();this.walkCB3Sync(o,l,i,a)}a()}walkCB3Sync(e,r,i,n){i=i.filterEntries(e,r);let s=1,a=()=>{--s===0&&n()};for(let[o,l,u]of i.matches.entries())this.#i(o)||this.matchSync(o,l,u);for(let[o,l]of i.subwalks.entries())s++,this.walkCB2Sync(o,l,i.child(),a);a()}},Ti=class extends ys{matches;constructor(e,r,i){super(e,r,i),this.matches=new Set}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,r)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?r(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},Oi=class extends ys{results;constructor(e,r,i){super(e,r,i),this.results=new Mt({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};var GS=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",ze=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;opts;patterns;constructor(e,r){if(!r)throw new TypeError("glob options required");if(this.withFileTypes=!!r.withFileTypes,this.signal=r.signal,this.follow=!!r.follow,this.dot=!!r.dot,this.dotRelative=!!r.dotRelative,this.nodir=!!r.nodir,this.mark=!!r.mark,r.cwd?(r.cwd instanceof URL||r.cwd.startsWith("file://"))&&(r.cwd=(0,Zp.fileURLToPath)(r.cwd)):this.cwd="",this.cwd=r.cwd||"",this.root=r.root,this.magicalBraces=!!r.magicalBraces,this.nobrace=!!r.nobrace,this.noext=!!r.noext,this.realpath=!!r.realpath,this.absolute=r.absolute,this.noglobstar=!!r.noglobstar,this.matchBase=!!r.matchBase,this.maxDepth=typeof r.maxDepth=="number"?r.maxDepth:1/0,this.stat=!!r.stat,this.ignore=r.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(r.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=e,this.platform=r.platform||GS,this.opts={...r,platform:this.platform},r.scurry){if(this.scurry=r.scurry,r.nocase!==void 0&&r.nocase!==r.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=r.platform==="win32"?xr:r.platform==="darwin"?Ei:r.platform?Tr:Jp;this.scurry=new l(this.cwd,{nocase:r.nocase,fs:r.fs})}this.nocase=this.scurry.nocase;let i=this.platform==="darwin"||this.platform==="win32",n={...r,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:i,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},s=this.pattern.map(l=>new ke(l,n)),[a,o]=s.reduce((l,u)=>(l[0].push(...u.set),l[1].push(...u.globParts),l),[[],[]]);this.patterns=a.map((l,u)=>{let h=o[u];if(!h)throw new Error("invalid pattern object");return new Or(l,h,0,this.platform)})}async walk(){return[...await new Ti(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).walk()]}walkSync(){return[...new Ti(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).walkSync()]}stream(){return new Oi(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).stream()}streamSync(){return new Oi(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};var el=(t,e={})=>{Array.isArray(t)||(t=[t]);for(let r of t)if(new ke(r,e).hasMagic())return!0;return!1};function ws(t,e={}){return new ze(t,e).streamSync()}function Xp(t,e={}){return new ze(t,e).stream()}function eg(t,e={}){return new ze(t,e).walkSync()}async function Qp(t,e={}){return new ze(t,e).walk()}function vs(t,e={}){return new ze(t,e).iterateSync()}function tg(t,e={}){return new ze(t,e).iterate()}var YS=ws,VS=Object.assign(Xp,{sync:ws}),KS=vs,JS=Object.assign(tg,{sync:vs}),ZS=Object.assign(eg,{stream:ws,iterate:vs}),bs=Object.assign(Qp,{glob:Qp,globSync:eg,sync:ZS,globStream:Xp,stream:VS,globStreamSync:ws,streamSync:YS,globIterate:tg,iterate:JS,globIterateSync:vs,iterateSync:KS,Glob:ze,hasMagic:el,escape:wr,unescape:We});bs.glob=bs;var QS="../build",XS="../wheels";async function sg(t,e){let r=[],i=n=>{r.push(n)};if(await t.loadPackage(e,{errorCallback:i}),r.length>0)throw new Error(r.join(`
|
|
36
|
+
`))}async function eE(t){I.info("Copy the build directory (the bare built app files) to this directory...");let e=ce.default.resolve(__dirname,QS);if(!(await tt.default.stat(e)).isDirectory())throw new Error(`The source ${e} does not exist.`);if(e===t.copyTo){I.warn(`sourceDir == destDir (${e}). Are you in the development environment? Skip copying the directory.`);return}if(t.keepOld)try{await tt.default.access(t.copyTo),I.info(`${t.copyTo} already exists. Use it and skip copying.`);return}catch{throw new Error(`${t.copyTo} does not exist even though the \`keepOld\` option is specified`)}I.debug(`Copy ${e} to ${t.copyTo}`),await tt.default.rm(t.copyTo,{recursive:!0,force:!0}),await tl.default.copy(e,t.copyTo,{errorOnExist:!0})}async function tE(t){if(t.requirements.length===0)return[];let e=await(0,rl.loadPyodide)();return await ag(e,{requirements:t.requirements}),Object.entries(e.loadedPackages).filter(([,r])=>r==="default channel").map(([r])=>r)}async function rg(t,e){I.debug("Preparing the local wheel: %s",e);let r=await tt.default.readFile(e),i="/tmp/"+ce.default.basename(e);t.FS.writeFile(i,r);let n=`emfs:${i}`;return I.debug("The local wheel %s is prepared as %s",e,n),n}async function ag(t,e){await sg(t,"micropip");let r=t.pyimport("micropip"),i=[...e.requirements],n=ce.default.join(__dirname,XS),s=await rg(t,ce.default.join(n,"stlite_server-0.1.0-py3-none-any.whl"));i.push(s);let a=await rg(t,ce.default.join(n,"streamlit-1.35.0-cp312-none-any.whl"));i.push(a),I.info("Install the packages: %j",i),await r.install.callKwargs(i,{keep_going:!0})}async function rE(t){I.info("Create the site-packages snapshot file...");let e=await(0,rl.loadPyodide)();await sg(e,"micropip");let r=e.pyimport("micropip"),i=await fi.getInstance(),n=[];t.usedPrebuiltPackages.length>0&&(I.info("Mocking prebuilt packages so that they will not be included in the site-packages snapshot because these will be installed from the vendored wheel files at runtime..."),t.usedPrebuiltPackages.forEach(o=>{let l=i.getPackageInfoByName(o);if(l==null)throw new Error(`Package ${o} is not found in the lock file.`);I.debug(`Mock ${l.name} ${l.version}`),r.add_mock_package(l.name,l.version),n.push(l.name)})),I.info("Install the requirements %j",t.requirements),await ag(e,{requirements:t.requirements}),I.info("Remove the mocked packages: %j",n),n.forEach(o=>r.remove_mock_package(o)),I.info("Archive the site-packages director(y|ies)");let s="/tmp/site-packages-snapshot.tar.gz";await e.runPythonAsync(`
|
|
37
37
|
import os
|
|
38
38
|
import tarfile
|
|
39
39
|
import site
|
|
@@ -46,8 +46,8 @@ globstar while`,e,c,r,f,y),this.matchOne(e.slice(c),r.slice(f),i))return this.de
|
|
|
46
46
|
print("Add site-package:", site_packages)
|
|
47
47
|
print(os.listdir(site_packages))
|
|
48
48
|
gzf.add(site_packages)
|
|
49
|
-
`),I.info("Extract the archive file from EMFS");let a=e.FS.readFile(s);I.info(`Save the archive file (${t.saveTo})`),await tt.default.writeFile(t.saveTo,a)}async function
|
|
50
|
-
`);await tt.default.writeFile(t,r,{encoding:"utf-8"})}async function
|
|
49
|
+
`),I.info("Extract the archive file from EMFS");let a=e.FS.readFile(s);I.info(`Save the archive file (${t.saveTo})`),await tt.default.writeFile(t.saveTo,a)}async function iE(t){I.info("Copy the app directory..."),await Promise.all(t.filePathPatterns.map(async e=>{let r=await bs(e,{cwd:t.cwd,absolute:!1});if(r.length===0){I.warn(`No files match the pattern "${e}" in "${t.cwd}".`);return}await Promise.all(r.map(async i=>{let n=ce.default.resolve(t.cwd,i),s=ce.default.resolve(t.buildAppDirectory,i);I.debug(`Copy ${n} to ${s}`),await tl.default.copy(n,s,{errorOnExist:!0})}))}))}async function nE(t,e){try{await tt.default.access(ce.default.resolve(t,e))}catch{throw new Error(`The entrypoint file "${e}" is not included in the bundled files.`)}}async function sE(t){let e=await tt.default.readFile(t,{encoding:"utf-8"});return(0,_s.parseRequirementsTxt)(e)}async function aE(t,e){let r=e.join(`
|
|
50
|
+
`);await tt.default.writeFile(t,r,{encoding:"utf-8"})}async function oE(t){let e=await fi.getInstance(),i=t.packages.map(n=>e.getPackageInfoByName(n)).map(n=>Pi(n.file_name));I.info("Downloading the used prebuilt packages..."),await Promise.all(i.map(async n=>{let s=ce.default.resolve(t.destDir,"./pyodide",ce.default.basename(n));I.debug(`Download ${n} to ${s}`);let a=await fetch(n);if(!a.ok)throw new Error(`Failed to download ${n}: ${a.status} ${a.statusText}`);let o=await a.arrayBuffer();await tt.default.writeFile(s,Buffer.from(o))}))}(0,ig.default)((0,ng.hideBin)(process.argv)).command("* [appHomeDirSource] [packages..]","Put the user code and data and the snapshot of the required packages into the build artifact.",()=>{}).positional("appHomeDirSource",{describe:"[Deprecated] The source directory of the user code and data that will be mounted in the Pyodide file system at app runtime",type:"string",demandOption:!1}).positional("packages",{describe:"[Deprecated] Package names to install.",type:"string",array:!0}).options("project",{describe:"The project directory",type:"string",alias:"p",default:process.cwd()}).options("requirement",{describe:"Install from the given requirements file. This option can be used multiple times.",array:!0,type:"string",alias:"r",default:[],deprecated:!0}).options("keepOldBuild",{type:"boolean",default:!1,alias:"k",describe:"Keep the existing build directory contents except appHomeDir."}).options("logLevel",{type:"string",default:"info",describe:"The log level",choices:["debug","info","warn","error"]}).parseAsync().then(async t=>{I.level=t.logLevel,I.debug("Command line arguments: %j",t);let e=t.project,r=ce.default.resolve(e,"./build"),i=ce.default.resolve(e,"./package.json"),n=require(i),s=await Qd({pathResolutionRoot:e,packageJsonStliteDesktopField:n.stlite?.desktop,fallbacks:{appHomeDirSource:t.appHomeDirSource,packages:t.packages,requirementsTxtFilePaths:t.requirement}});I.info("File/directory patterns to be included: %j",s.files),I.info("Entrypoint: %s",s.entrypoint),I.info("Dependencies: %j",s.dependencies),I.info("`requirements.txt` files: %j",s.requirementsTxtFilePaths);let a=await Promise.all(s.requirementsTxtFilePaths.map(async h=>sE(h))).then(h=>h.flat());I.info("Dependencies from `requirements.txt` files: %j",a);let o=(0,_s.validateRequirements)([...s.dependencies,...a]);I.info("Validated dependency list: %j",o);let l=await tE({requirements:o});I.info("The prebuilt packages loaded for the given requirements: %j",l),await eE({copyTo:r,keepOld:t.keepOldBuild});let u=ce.default.resolve(r,"./app_files");await iE({cwd:e,filePathPatterns:s.files,buildAppDirectory:u}),nE(u,s.entrypoint),await rE({requirements:o,usedPrebuiltPackages:l,saveTo:ce.default.resolve(r,"./site-packages-snapshot.tar.gz")}),await aE(ce.default.resolve(r,"./prebuilt-packages.txt"),l),await oE({packages:l,destDir:r}),await Jd({packageJsonStliteDesktopField:n.stlite?.desktop,manifestFilePath:ce.default.resolve(r,"./stlite-manifest.json"),fallbacks:{entrypoint:s.entrypoint}})});
|
|
51
51
|
/*! Bundled license information:
|
|
52
52
|
|
|
53
53
|
safe-buffer/index.js:
|