@stlite/desktop 0.78.1 → 0.79.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/bin/dump_artifacts.js +17 -17
- package/build/assets/{FileDownload.esm-D2QqHv2c.js → FileDownload.esm-CUqgQU-j.js} +1 -1
- package/build/assets/{FormClearHelper-DliGOSkq.js → FormClearHelper-DmeZ2QuQ.js} +1 -1
- package/build/assets/{Hooks-Daeq69Zu.js → Hooks-CBIuRW4z.js} +1 -1
- package/build/assets/{InputInstructions-BQD8A2_u.js → InputInstructions-iKTPb-Lc.js} +1 -1
- package/build/assets/{ProgressBar-DuGylkeS.js → ProgressBar-Dfr9f8u1.js} +1 -1
- package/build/assets/{RenderInPortalIfExists-HKy5CC9C.js → RenderInPortalIfExists-CxeJAxCs.js} +1 -1
- package/build/assets/{Toolbar-B9grKd8p.js → Toolbar-CG7W1D-O.js} +1 -1
- package/build/assets/{base-input-DJ1o9wy-.js → base-input-DoV-1XUt.js} +1 -1
- package/build/assets/{createSuper-BCtrEkDw.js → createSuper-CvaFdVoD.js} +1 -1
- package/build/assets/{data-grid-overlay-editor-SiNLnLoA.js → data-grid-overlay-editor-CCUG7ReD.js} +1 -1
- package/build/assets/{downloader-y7WtJrbZ.js → downloader-B6rOwzu2.js} +1 -1
- package/build/assets/{es6-ChzZtMws.js → es6-CTcMcfqp.js} +2 -2
- package/build/assets/{getPrototypeOf-jxUzvEiF.js → getPrototypeOf-CFHg57KG.js} +1 -1
- package/build/assets/{iframeResizer.contentWindow-VeTSZzxi.js → iframeResizer.contentWindow-DLNn1A7T.js} +1 -1
- package/build/assets/{index-Di0b5deS.js → index-0aipcnh6.js} +1 -1
- package/build/assets/{index-NW5mgelH.js → index-6rnmC53g.js} +1 -1
- package/build/assets/{index-C-G07XIn.js → index-BHysWwrh.js} +1 -1
- package/build/assets/{index-lR3NBV82.js → index-BTHCcLIl.js} +1 -1
- package/build/assets/{index-B7GLWddS.js → index-BhkIHxDp.js} +1 -1
- package/build/assets/{index-JLaGWCy4.js → index-Bp04iQqW.js} +1 -1
- package/build/assets/{index-CSRB3KZi.js → index-BpeIvyJQ.js} +1 -1
- package/build/assets/{index-CFVMKjCp.js → index-BrRb8POj.js} +1 -1
- package/build/assets/{index-C9Os1Tio.js → index-ByOIN0Gm.js} +1 -1
- package/build/assets/{index-z2lXC7XI.js → index-BzTZZCvL.js} +4 -4
- package/build/assets/{index-Cxp-1GAt.js → index-C4j64dI5.js} +1 -1
- package/build/assets/{index-C5VxAqHf.js → index-CGhw9Sdf.js} +1 -1
- package/build/assets/{index-GTNwQsph.js → index-CIL1eIZN.js} +1 -1
- package/build/assets/{index-Dh5Ef2Om.js → index-CIs9EQe5.js} +1 -1
- package/build/assets/{index-CQ8B9Pyu.js → index-CSyyBx79.js} +1 -1
- package/build/assets/{index-DXHAdPWu.js → index-CW4i_Lge.js} +1 -1
- package/build/assets/{index-UrV00MOE.js → index-CWiqZgRl.js} +1 -1
- package/build/assets/{index-CxF9whAo.js → index-CoKgwXo8.js} +1 -1
- package/build/assets/{index-CvKkwQxq.js → index-Cua9_98i.js} +1 -1
- package/build/assets/{index-BYdd9282.js → index-D-lzdDJ5.js} +1 -1
- package/build/assets/{index-j3NobT-r.js → index-D9QNa8Xs.js} +1 -1
- package/build/assets/{index-Bia2Aiul.js → index-DHFNQm8n.js} +1 -1
- package/build/assets/{index-CnPYErGb.js → index-DURajqPC.js} +1 -1
- package/build/assets/{index-DYrQR0Ux.js → index-Df9nIm6O.js} +1 -1
- package/build/assets/{index-Dkd6yjmr.js → index-DjQcVgxO.js} +1 -1
- package/build/assets/{index-Bsw1C-zM.js → index-DqxtC9MD.js} +1 -1
- package/build/assets/{index-CGRaMNW7.js → index-DtrE1h0V.js} +1 -1
- package/build/assets/{index-ByZKQf5p.js → index-Dwt05210.js} +1 -1
- package/build/assets/{index-Do74AQgb.js → index-N6IvabtE.js} +1 -1
- package/build/assets/{index-BqYxHJ94.js → index-OR2HlVVN.js} +1 -1
- package/build/assets/{index-B2k4Ofkz.js → index-P_LN9wWJ.js} +1 -1
- package/build/assets/{index-Bh9EjD0o.js → index-RhMZ16-Y.js} +1 -1
- package/build/assets/{index-C_q5O89K.js → index-fudEipDa.js} +1 -1
- package/build/assets/{index-CS3mWYPw.js → index-hsTwnoRn.js} +1 -1
- package/build/assets/{index-BCDKFsnk.js → index-qMuFpOqI.js} +1 -1
- package/build/assets/{index-DMBd-bc-.js → index-steA8SlM.js} +5 -5
- package/build/assets/{index-CpzAXWaZ.js → index-xGO_nKX1.js} +1 -1
- package/build/assets/{input-Dhep7xP0.js → input-BrXgmYe9.js} +1 -1
- package/build/assets/{memory-BqTZFgXm.js → memory-Bf74T19z.js} +1 -1
- package/build/assets/{number-overlay-editor-BywJqzaW.js → number-overlay-editor-20er5Sp-.js} +1 -1
- package/build/assets/{sandbox-DmnKum9A.js → sandbox-CV8SMiuv.js} +1 -1
- package/build/assets/{slicedToArray-DkF8JK54.js → slicedToArray-tqzlNjPF.js} +1 -1
- package/build/assets/{textarea-CCmBHfjM.js → textarea-DMefjquC.js} +1 -1
- package/build/assets/{timepicker-DWOLsPBU.js → timepicker-D5Qmkk9Q.js} +1 -1
- package/build/assets/{uniqueId-C3qA3EXY.js → uniqueId-IQr2jcrE.js} +1 -1
- package/build/assets/{useBasicWidgetState-CDQNZkN8.js → useBasicWidgetState-Cqy4gnzY.js} +1 -1
- package/build/assets/{useOnInputChange-FEZNS9DP.js → useOnInputChange-BD_aeagL.js} +1 -1
- package/build/assets/{withFullScreenWrapper-dTVQmtO5.js → withFullScreenWrapper-DIS3bwns.js} +1 -1
- package/build/assets/worker-B1MO5Shr.js +216 -0
- package/build/electron/worker.js +109 -10
- package/build/index.html +1 -1
- package/package.json +4 -4
- package/wheels/streamlit-1.41.0-cp312-none-any.whl +0 -0
- package/build/assets/worker-CLbVOjel.js +0 -117
package/bin/dump_artifacts.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var Ug=Object.create;var
|
|
2
|
+
"use strict";var Ug=Object.create;var kl=Object.defineProperty;var zg=Object.getOwnPropertyDescriptor;var Hg=Object.getOwnPropertyNames;var Gg=Object.getPrototypeOf,Yg=Object.prototype.hasOwnProperty;var w=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Vg=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Hg(e))!Yg.call(t,n)&&n!==r&&kl(t,n,{get:()=>e[n],enumerable:!(i=zg(e,n))||i.enumerable});return t};var be=(t,e,r)=>(r=t!=null?Ug(Gg(t)):{},Vg(e||!t||!t.__esModule?kl(r,"default",{value:t,enumerable:!0}):r,t));var Ae=w((HE,Dl)=>{"use strict";var Ks=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=zt[i[n]];e=s.open+e.replace(s.closeRe,s.open)+s.close,r&&(e=e.replace(Xg,function(a){return s.close+a+s.open}))}return e}N.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){N[r]=function(i){if(typeof t[r]=="object"){var n=i;for(var s in t[r])n=N[t[r][s]](n);return n}return N[t[r]](i)}})(e)};function nm(){var t={};return Object.keys(
|
|
7
|
-
`));return!0}la.exports=(...t)=>{let e=gm(
|
|
5
|
+
`),Error.captureStackTrace(this,t)}};Dl.exports=t=>{if(t.length>2)throw new Ks(t);function e(i={}){this.options=i}e.prototype.transform=t;function r(i){return new e(i)}return r.Format=e,r}});var Ll=w((GE,ql)=>{var Cl={};ql.exports=Cl;var Pl={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(Pl).forEach(function(t){var e=Pl[t],r=Cl[t]=[];r.open="\x1B["+e[0]+"m",r.close="\x1B["+e[1]+"m"})});var Nl=w((YE,jl)=>{"use strict";jl.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 Il=w((VE,Fl)=>{"use strict";var Kg=require("os"),Ge=Nl(),Re=process.env,hr=void 0;Ge("no-color")||Ge("no-colors")||Ge("color=false")?hr=!1:(Ge("color")||Ge("colors")||Ge("color=true")||Ge("color=always"))&&(hr=!0);"FORCE_COLOR"in Re&&(hr=Re.FORCE_COLOR.length===0||parseInt(Re.FORCE_COLOR,10)!==0);function Jg(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Zg(t){if(hr===!1)return 0;if(Ge("color=16m")||Ge("color=full")||Ge("color=truecolor"))return 3;if(Ge("color=256"))return 2;if(t&&!t.isTTY&&hr!==!0)return 0;var e=hr?1:0;if(process.platform==="win32"){var r=Kg.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 Re)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(n){return n in Re})||Re.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in Re)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Re.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in Re){var i=parseInt((Re.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Re.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Re.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(Re.TERM)||"COLORTERM"in Re?1:(Re.TERM==="dumb",e)}function Js(t){var e=Zg(t);return Jg(e)}Fl.exports={supportsColor:Js,stdout:Js(process.stdout),stderr:Js(process.stderr)}});var Wl=w((KE,$l)=>{$l.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 Ul=w((JE,Bl)=>{Bl.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(c){u=c===l}),u}function o(l,u){var c="",h,d;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(d in l)if(!a(d)){switch(c=c+l[d],h={up:0,down:0,mid:0},u.size){case"mini":h.up=s(8),h.mid=s(2),h.down=s(8);break;case"maxi":h.up=s(16)+3,h.mid=s(4)+1,h.down=s(64)+3;break;default:h.up=s(8)+1,h.mid=s(6)/2,h.down=s(8)+1;break}var f=["up","mid","down"];for(var y in f)for(var b=f[y],_=0;_<=h[b];_++)u[b]&&(c=c+i[b][s(i[b].length)])}return c}return o(e,r)}});var Hl=w((ZE,zl)=>{zl.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 Yl=w((QE,Gl)=>{Gl.exports=function(t){return function(e,r,i){return r%2===0?e:t.inverse(e)}}});var Kl=w((XE,Vl)=>{Vl.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 Zl=w((e2,Jl)=>{Jl.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 iu=w((r2,ru)=>{var N={};ru.exports=N;N.themes={};var Qg=require("util"),zt=N.styles=Ll(),Xl=Object.defineProperties,Xg=new RegExp(/[\r\n]+/g);N.supportsColor=Il().supportsColor;typeof N.enabled>"u"&&(N.enabled=N.supportsColor()!==!1);N.enable=function(){N.enabled=!0};N.disable=function(){N.enabled=!1};N.stripColors=N.strip=function(t){return(""+t).replace(/\x1B\[\d+m/g,"")};var t2=N.stylize=function(e,r){if(!N.enabled)return e+"";var i=zt[r];return!i&&r in N?N[r](e):i.open+e+i.close},em=/[|\\{}()[\]^$+*?.]/g,tm=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(em,"\\$&")};function eu(t){var e=function r(){return im.apply(r,arguments)};return e._styles=t,e.__proto__=rm,e}var tu=function(){var t={};return zt.grey=zt.gray,Object.keys(zt).forEach(function(e){zt[e].closeRe=new RegExp(tm(zt[e].close),"g"),t[e]={get:function(){return eu(this._styles.concat(e))}}}),t}(),rm=Xl(function(){},tu);function im(){var t=Array.prototype.slice.call(arguments),e=t.map(function(a){return a!=null&&a.constructor===String?a:Qg.inspect(a)}).join(" ");if(!N.enabled||!e)return e;for(var r=e.indexOf(`
|
|
6
|
+
`)!=-1,i=this._styles,n=i.length;n--;){var s=zt[i[n]];e=s.open+e.replace(s.closeRe,s.open)+s.close,r&&(e=e.replace(Xg,function(a){return s.close+a+s.open}))}return e}N.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){N[r]=function(i){if(typeof t[r]=="object"){var n=i;for(var s in t[r])n=N[t[r][s]](n);return n}return N[t[r]](i)}})(e)};function nm(){var t={};return Object.keys(tu).forEach(function(e){t[e]={get:function(){return eu([e])}}}),t}var sm=function(e,r){var i=r.split("");return i=i.map(e),i.join("")};N.trap=Wl();N.zalgo=Ul();N.maps={};N.maps.america=Hl()(N);N.maps.zebra=Yl()(N);N.maps.rainbow=Kl()(N);N.maps.random=Zl()(N);for(Ql in N.maps)(function(t){N[t]=function(e){return sm(N.maps[t],e)}})(Ql);var Ql;Xl(N,nm())});var Zs=w((i2,nu)=>{var am=iu();nu.exports=am});var su=w(Qs=>{"use strict";Qs.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9};Qs.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}});var au=w(Xs=>{"use strict";Xs.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6};Xs.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}});var ou=w(ea=>{"use strict";ea.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7};ea.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}});var lu=w(Xi=>{"use strict";Object.defineProperty(Xi,"cli",{value:su()});Object.defineProperty(Xi,"npm",{value:au()});Object.defineProperty(Xi,"syslog",{value:ou()})});var re=w(Hr=>{"use strict";Object.defineProperty(Hr,"LEVEL",{value:Symbol.for("level")});Object.defineProperty(Hr,"MESSAGE",{value:Symbol.for("message")});Object.defineProperty(Hr,"SPLAT",{value:Symbol.for("splat")});Object.defineProperty(Hr,"configs",{value:lu()})});var rn=w((u2,tn)=>{"use strict";var ia=Zs(),{LEVEL:ta,MESSAGE:ra}=re();ia.enabled=!0;var uu=/\s+/,en=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]=uu.test(e[n])?e[n].split(uu):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 ia[t.allColors[e]](i);for(let n=0,s=t.allColors[e].length;n<s;n++)i=ia[t.allColors[e][n]](i);return i}transform(e,r){return r.all&&typeof e[ra]=="string"&&(e[ra]=this.colorize(e[ta],e.level,e[ra])),(r.level||r.all||!r.message)&&(e.level=this.colorize(e[ta],e.level)),(r.all||r.message)&&(e.message=this.colorize(e[ta],e.level,e.message)),e}};tn.exports=t=>new en(t);tn.exports.Colorizer=tn.exports.Format=en});var hu=w((f2,fu)=>{"use strict";var{Colorizer:om}=rn();fu.exports=t=>(om.addColors(t.colors||t),t)});var du=w((h2,cu)=>{"use strict";var lm=Ae();cu.exports=lm(t=>(t.message=` ${t.message}`,t))});var mu=w((c2,gu)=>{"use strict";var um=Ae(),{LEVEL:pu,MESSAGE:na}=re();gu.exports=um((t,{stack:e,cause:r})=>{if(t instanceof Error){let n=Object.assign({},t,{level:t.level,[pu]:t[pu]||t.level,message:t.message,[na]:t[na]||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[na]=i.message,e&&(t.stack=i.stack),r&&(t.cause=i.cause),t})});var aa=w((d2,sn)=>{"use strict";var{configs:fm,LEVEL:yu,MESSAGE:sa}=re(),nn=class t{constructor(e={levels:fm.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[yu]]}${e.message}`,e[sa]&&(e[sa]=`${this.paddings[e[yu]]}${e[sa]}`),e}};sn.exports=t=>new nn(t);sn.exports.Padder=sn.exports.Format=nn});var bu=w((p2,oa)=>{"use strict";var{Colorizer:hm}=rn(),{Padder:cm}=aa(),{configs:dm,MESSAGE:pm}=re(),an=class{constructor(e={}){e.levels||(e.levels=dm.cli.levels),this.colorizer=new hm(e),this.padder=new cm(e),this.options=e}transform(e,r){return this.colorizer.transform(this.padder.transform(e,r),r),e[pm]=`${e.level}:${e.message}`,e}};oa.exports=t=>new an(t);oa.exports.Format=an});var vu=w((g2,la)=>{"use strict";var gm=Ae();function wu(t){if(t.every(mm))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 mm(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}la.exports=(...t)=>{let e=gm(wu(t)),r=e();return r.Format=e.Format,r};la.exports.cascade=wu});var Gr=w((ca,Ru)=>{"use strict";var{hasOwnProperty:on}=Object.prototype,Gt=ha();Gt.configure=ha;Gt.stringify=Gt;Gt.default=Gt;ca.stringify=Gt;ca.configure=ha;Ru.exports=Gt;var ym=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;function St(t){return t.length<5e3&&!ym.test(t)?`"${t}"`:JSON.stringify(t)}function ua(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 bm=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function fa(t){return bm.call(t)!==void 0&&t.length!==0}function _u(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 wm(t){if(on.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 Su(t,e){let r;if(on.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 Eu(t,e){let r;if(on.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 Ht(t){return t===1?"1 item":`${t} items`}function vm(t){let e=new Set;for(let r of t)(typeof r=="string"||typeof r=="number")&&e.add(String(r));return e}function _m(t){if(on.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 ha(t){t={...t};let e=_m(t);e&&(t.bigint===void 0&&(t.bigint=!1),"circularValue"in t||(t.circularValue=Error));let r=wm(t),i=Su(t,"bigint"),n=Su(t,"deterministic"),s=Eu(t,"maximumDepth"),a=Eu(t,"maximumBreadth");function o(d,f,y,b,_,E){let R=f[d];switch(typeof R=="object"&&R!==null&&typeof R.toJSON=="function"&&(R=R.toJSON(d)),R=b.call(f,d,R),typeof R){case"string":return St(R);case"object":{if(R===null)return"null";if(y.indexOf(R)!==-1)return r;let x="",M=",",k=E;if(Array.isArray(R)){if(R.length===0)return"[]";if(s<y.length+1)return'"[Array]"';y.push(R),_!==""&&(E+=_,x+=`
|
|
8
8
|
${E}`,M=`,
|
|
9
9
|
${E}`);let K=Math.min(R.length,a),Se=0;for(;Se<K-1;Se++){let ft=o(String(Se),R,y,b,_,E);x+=ft!==void 0?ft:"null",x+=M}let Ee=o(String(Se),R,y,b,_,E);if(x+=Ee!==void 0?Ee:"null",R.length-1>a){let ft=R.length-a-1;x+=`${M}"... ${Ht(ft)} not stringified"`}return _!==""&&(x+=`
|
|
10
10
|
${k}`),y.pop(),`[${x}]`}let C=Object.keys(R),F=C.length;if(F===0)return"{}";if(s<y.length+1)return'"[Object]"';let q="",U="";_!==""&&(E+=_,M=`,
|
|
@@ -20,20 +20,20 @@ ${R}`),y.pop(),`{${x}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";
|
|
|
20
20
|
${_}`,U=`,
|
|
21
21
|
${_}`,te=Math.min(f.length,a),K=0;for(;K<te-1;K++){let Ee=u(String(K),f[K],y,b,_);q+=Ee!==void 0?Ee:"null",q+=U}let Se=u(String(K),f[K],y,b,_);if(q+=Se!==void 0?Se:"null",f.length-1>a){let Ee=f.length-a-1;q+=`${U}"... ${Ht(Ee)} not stringified"`}return q+=`
|
|
22
22
|
${E}`,y.pop(),`[${q}]`}let R=Object.keys(f),x=R.length;if(x===0)return"{}";if(s<y.length+1)return'"[Object]"';_+=b;let M=`,
|
|
23
|
-
${_}`,k="",C="",F=Math.min(x,a);fa(f)&&(k+=
|
|
23
|
+
${_}`,k="",C="",F=Math.min(x,a);fa(f)&&(k+=_u(f,M,a),R=R.slice(f.length),F-=f.length,C=M),n&&(R=ua(R)),y.push(f);for(let q=0;q<F;q++){let U=R[q],te=u(U,f[U],y,b,_);te!==void 0&&(k+=`${C}${St(U)}: ${te}`,C=M)}if(x>a){let q=x-a;k+=`${C}"...": "${Ht(q)} not stringified"`,C=M}return C!==""&&(k=`
|
|
24
24
|
${_}${k}
|
|
25
|
-
${E}`),y.pop(),`{${k}}`}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 c(d,f,y){switch(typeof f){case"string":return St(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(d),typeof f!="object")return c(d,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 M=Math.min(f.length,a),k=0;for(;k<M-1;k++){let F=c(String(k),f[k],y);b+=F!==void 0?F:"null",b+=","}let C=c(String(k),f[k],y);if(b+=C!==void 0?C:"null",f.length-1>a){let F=f.length-a-1;b+=`,"... ${Ht(F)} not stringified"`}return y.pop(),`[${b}]`}let _=Object.keys(f),E=_.length;if(E===0)return"{}";if(s<y.length+1)return'"[Object]"';let R="",x=Math.min(E,a);fa(f)&&(b+=vu(f,",",a),_=_.slice(f.length),x-=f.length,R=","),n&&(_=ua(_)),y.push(f);for(let M=0;M<x;M++){let k=_[M],C=c(k,f[k],y);C!==void 0&&(b+=`${R}${St(k)}:${C}`,R=",")}if(E>a){let M=E-a;b+=`${R}"...":"${Ht(M)} 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 h(d,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("",{"":d},[],f,b,"");if(Array.isArray(f))return l("",d,[],vm(f),b,"")}if(b.length!==0)return u("",d,[],b,"")}return c("",d,[])}return h}});var da=w((m2,Ru)=>{"use strict";var Sm=Ae(),{MESSAGE:Em}=re(),Rm=Gr();function xm(t,e){return typeof e=="bigint"?e.toString():e}Ru.exports=Sm((t,e)=>{let r=Rm.configure(e);return t[Em]=r(t,e.replacer||xm,e.space),t})});var Tu=w((y2,xu)=>{"use strict";var Tm=Ae();xu.exports=Tm((t,e)=>e.message?(t.message=`[${e.label}] ${t.message}`,t):(t.label=e.label,t))});var Ou=w((b2,Mu)=>{"use strict";var Mm=Ae(),{MESSAGE:Om}=re(),Am=Gr();Mu.exports=Mm(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[Om]=Am(e),t})});var ku=w((w2,Au)=>{"use strict";var km=Ae();function Dm(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 Pm(t,e,r){return t[r]=e.reduce((i,n)=>(i[n]=t[n],delete t[n],i),{}),t}Au.exports=km((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?Dm(t,i,r):e.fillWith?Pm(t,e.fillWith,r):t})});var Pu=w((v2,Du)=>{var cr=1e3,dr=cr*60,pr=dr*60,Yt=pr*24,Cm=Yt*7,qm=Yt*365.25;Du.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Lm(t);if(r==="number"&&isFinite(t))return e.long?Nm(t):jm(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Lm(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*qm;case"weeks":case"week":case"w":return r*Cm;case"days":case"day":case"d":return r*Yt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*pr;case"minutes":case"minute":case"mins":case"min":case"m":return r*dr;case"seconds":case"second":case"secs":case"sec":case"s":return r*cr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function jm(t){var e=Math.abs(t);return e>=Yt?Math.round(t/Yt)+"d":e>=pr?Math.round(t/pr)+"h":e>=dr?Math.round(t/dr)+"m":e>=cr?Math.round(t/cr)+"s":t+"ms"}function Nm(t){var e=Math.abs(t);return e>=Yt?ln(t,e,Yt,"day"):e>=pr?ln(t,e,pr,"hour"):e>=dr?ln(t,e,dr,"minute"):e>=cr?ln(t,e,cr,"second"):t+" ms"}function ln(t,e,r,i){var n=e>=r*1.5;return Math.round(t/r)+" "+i+(n?"s":"")}});var qu=w((Yr,Cu)=>{"use strict";var Fm=Ae(),Im=Pu();Cu.exports=Fm(t=>{let e=+new Date;return Yr.diff=e-(Yr.prevTime||e),Yr.prevTime=e,t.ms=`+${Im(Yr.diff)}`,t})});var Nu=w((_2,ju)=>{"use strict";var $m=require("util").inspect,Wm=Ae(),{LEVEL:Bm,MESSAGE:Lu,SPLAT:Um}=re();ju.exports=Wm((t,e={})=>{let r=Object.assign({},t);return delete r[Bm],delete r[Lu],delete r[Um],t[Lu]=$m(r,!1,e.depth||null,e.colorize),t})});var Fu=w((S2,fn)=>{"use strict";var{MESSAGE:zm}=re(),un=class{constructor(e){this.template=e}transform(e){return e[zm]=this.template(e),e}};fn.exports=t=>new un(t);fn.exports.Printf=fn.exports.Format=un});var Wu=w((E2,$u)=>{"use strict";var Hm=Ae(),{MESSAGE:Iu}=re(),Gm=Gr();$u.exports=Hm(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[Iu]=`${t.level}:${r} ${t.message} ${e}`:t[Iu]=`${t.level}:${r} ${t.message}`,t})});var zu=w((R2,Uu)=>{"use strict";var Ym=require("util"),{SPLAT:Bu}=re(),Vm=/%[scdjifoO%]/g,Km=/%%/g,pa=class{constructor(e){this.options=e}_splat(e,r){let i=e.message,n=e[Bu]||e.splat||[],s=i.match(Km),a=s&&s.length||0,l=r.length-a-n.length,u=l<0?n.splice(l,-1*l):[],c=u.length;if(c)for(let h=0;h<c;h++)Object.assign(e,u[h]);return e.message=Ym.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(Vm);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}};Uu.exports=t=>new pa(t)});var Gu=w((hn,Hu)=>{(function(t,e){typeof hn=="object"&&typeof Hu<"u"?e(hn):typeof define=="function"&&define.amd?define(["exports"],e):e(t.fecha={})})(hn,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(S,O){for(var z=[],ye=0,D=S.length;ye<D;ye++)z.push(S[ye].substr(0,O));return z}var u=function(S){return function(O,z){var ye=z[S].map(function(Ne){return Ne.toLowerCase()}),D=ye.indexOf(O.toLowerCase());return D>-1?D:null}};function c(S){for(var O=[],z=1;z<arguments.length;z++)O[z-1]=arguments[z];for(var ye=0,D=O;ye<D.length;ye++){var Ne=D[ye];for(var He in Ne)S[He]=Ne[He]}return S}var h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"],f=l(d,3),y=l(h,3),b={dayNamesShort:y,dayNames:h,monthNamesShort:f,monthNames:d,amPm:["am","pm"],DoFn:function(S){return S+["th","st","nd","rd"][S%10>3?0:(S-S%10!==10?1:0)*S%10]}},_=c({},b),E=function(S){return _=c(_,S)},R=function(S){return S.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},x=function(S,O){for(O===void 0&&(O=2),S=String(S);S.length<O;)S="0"+S;return S},M={D:function(S){return String(S.getDate())},DD:function(S){return x(S.getDate())},Do:function(S,O){return O.DoFn(S.getDate())},d:function(S){return String(S.getDay())},dd:function(S){return x(S.getDay())},ddd:function(S,O){return O.dayNamesShort[S.getDay()]},dddd:function(S,O){return O.dayNames[S.getDay()]},M:function(S){return String(S.getMonth()+1)},MM:function(S){return x(S.getMonth()+1)},MMM:function(S,O){return O.monthNamesShort[S.getMonth()]},MMMM:function(S,O){return O.monthNames[S.getMonth()]},YY:function(S){return x(String(S.getFullYear()),4).substr(2)},YYYY:function(S){return x(S.getFullYear(),4)},h:function(S){return String(S.getHours()%12||12)},hh:function(S){return x(S.getHours()%12||12)},H:function(S){return String(S.getHours())},HH:function(S){return x(S.getHours())},m:function(S){return String(S.getMinutes())},mm:function(S){return x(S.getMinutes())},s:function(S){return String(S.getSeconds())},ss:function(S){return x(S.getSeconds())},S:function(S){return String(Math.round(S.getMilliseconds()/100))},SS:function(S){return x(Math.round(S.getMilliseconds()/10),2)},SSS:function(S){return x(S.getMilliseconds(),3)},a:function(S,O){return S.getHours()<12?O.amPm[0]:O.amPm[1]},A:function(S,O){return S.getHours()<12?O.amPm[0].toUpperCase():O.amPm[1].toUpperCase()},ZZ:function(S){var O=S.getTimezoneOffset();return(O>0?"-":"+")+x(Math.floor(Math.abs(O)/60)*100+Math.abs(O)%60,4)},Z:function(S){var O=S.getTimezoneOffset();return(O>0?"-":"+")+x(Math.floor(Math.abs(O)/60),2)+":"+x(Math.abs(O)%60,2)}},k=function(S){return+S-1},C=[null,r],F=[null,a],q=["isPm",a,function(S,O){var z=S.toLowerCase();return z===O.amPm[0]?0:z===O.amPm[1]?1:null}],U=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(S){var O=(S+"").match(/([+-]|\d\d)/gi);if(O){var z=+O[1]*60+parseInt(O[2],10);return O[0]==="+"?z:-z}return 0}],te={D:["day",r],DD:["day",i],Do:["day",r+a,function(S){return parseInt(S,10)}],M:["month",r,k],MM:["month",i,k],YY:["year",i,function(S){var O=new Date,z=+(""+O.getFullYear()).substr(0,2);return+(""+(+S>68?z-1:z)+S)}],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(S){return+S*100}],SS:["millisecond",i,function(S){return+S*10}],SSS:["millisecond",n],d:C,dd:C,ddd:F,dddd:F,MMM:["month",a,u("monthNamesShort")],MMMM:["month",a,u("monthNames")],a:q,A:q,ZZ:U,Z:U},K={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"},Se=function(S){return c(K,S)},Ee=function(S,O,z){if(O===void 0&&(O=K.default),z===void 0&&(z={}),typeof S=="number"&&(S=new Date(S)),Object.prototype.toString.call(S)!=="[object Date]"||isNaN(S.getTime()))throw new Error("Invalid Date pass to format");O=K[O]||O;var ye=[];O=O.replace(o,function(Ne,He){return ye.push(He),"@@@"});var D=c(c({},_),z);return O=O.replace(e,function(Ne){return M[Ne](S,D)}),O.replace(/@@@/g,function(){return ye.shift()})};function ft(S,O,z){if(z===void 0&&(z={}),typeof O!="string")throw new Error("Invalid format in fecha parse");if(O=K[O]||O,S.length>1e3)return null;var ye=new Date,D={year:ye.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},Ne=[],He=[],It=O.replace(o,function(Bt,_t){return He.push(R(_t)),"@@@"}),ur={},wt={};It=R(It).replace(e,function(Bt){var _t=te[Bt],zr=_t[0],Ji=_t[1],Zi=_t[3];if(ur[zr])throw new Error("Invalid format. "+zr+" specified twice in format");return ur[zr]=!0,Zi&&(wt[Zi]=!0),Ne.push(_t),"("+Ji+")"}),Object.keys(wt).forEach(function(Bt){if(!ur[Bt])throw new Error("Invalid format. "+Bt+" is required in specified format")}),It=It.replace(/@@@/g,function(){return He.shift()});var $t=S.match(new RegExp(It,"i"));if(!$t)return null;for(var Vs=c(c({},_),z),De=1;De<$t.length;De++){var Yi=Ne[De-1],Vi=Yi[0],Ki=Yi[2],vt=Ki?Ki($t[De],Vs):+$t[De];if(vt==null)return null;D[Vi]=vt}D.isPm===1&&D.hour!=null&&+D.hour!=12?D.hour=+D.hour+12:D.isPm===0&&+D.hour==12&&(D.hour=0);var fr;if(D.timezoneOffset==null){fr=new Date(D.year,D.month,D.day,D.hour,D.minute,D.second,D.millisecond);for(var Wt=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],De=0,Ur=Wt.length;De<Ur;De++)if(ur[Wt[De][0]]&&D[Wt[De][0]]!==fr[Wt[De][1]]())return null}else if(fr=new Date(Date.UTC(D.year,D.month,D.day,D.hour,D.minute-D.timezoneOffset,D.second,D.millisecond)),D.month>11||D.month<0||D.day>31||D.day<1||D.hour>23||D.hour<0||D.minute>59||D.minute<0||D.second>59||D.second<0)return null;return fr}var Ys={format:Ee,parse:ft,defaultI18n:b,setGlobalDateI18n:E,setGlobalDateMasks:Se};t.assign=c,t.default=Ys,t.format=Ee,t.parse=ft,t.defaultI18n=b,t.setGlobalDateI18n=E,t.setGlobalDateMasks=Se,Object.defineProperty(t,"__esModule",{value:!0})})});var Vu=w((x2,Yu)=>{"use strict";var Jm=Gu(),Zm=Ae();Yu.exports=Zm((t,e={})=>(e.format&&(t.timestamp=typeof e.format=="function"?e.format():Jm.format(new Date,e.format)),t.timestamp||(t.timestamp=new Date().toISOString()),e.alias&&(t[e.alias]=t.timestamp),t))});var Ju=w((T2,Ku)=>{"use strict";var ga=Zs(),Qm=Ae(),{MESSAGE:ma}=re();Ku.exports=Qm((t,e)=>(e.level!==!1&&(t.level=ga.strip(t.level)),e.message!==!1&&(t.message=ga.strip(String(t.message))),e.raw!==!1&&t[ma]&&(t[ma]=ga.strip(String(t[ma]))),t))});var ba=w(ya=>{"use strict";var Xm=ya.format=Ae();ya.levels=fu();function ce(t,e){Object.defineProperty(Xm,t,{get(){return e()},configurable:!0})}ce("align",function(){return cu()});ce("errors",function(){return gu()});ce("cli",function(){return yu()});ce("combine",function(){return wu()});ce("colorize",function(){return rn()});ce("json",function(){return da()});ce("label",function(){return Tu()});ce("logstash",function(){return Ou()});ce("metadata",function(){return ku()});ce("ms",function(){return qu()});ce("padLevels",function(){return aa()});ce("prettyPrint",function(){return Nu()});ce("printf",function(){return Fu()});ce("simple",function(){return Wu()});ce("splat",function(){return zu()});ce("timestamp",function(){return Vu()});ce("uncolorize",function(){return Ju()})});var wa=w(cn=>{"use strict";var{format:Zu}=require("util");cn.warn={deprecated(t){return()=>{throw new Error(Zu("{ %s } was removed in winston@3.0.0.",t))}},useFormat(t){return()=>{throw new Error([Zu("{ %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]=cn.warn[e](i)})},forProperties(t,e,r){r.forEach(i=>{let n=cn.warn[e](i);Object.defineProperty(t,i,{get:n,set:n})})}}});var Qu=w((A2,ey)=>{ey.exports={name:"winston",description:"A logger for just about everything.",version:"3.17.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.7.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.9.0"},devDependencies:{"@babel/cli":"^7.23.9","@babel/core":"^7.24.0","@babel/preset-env":"^7.24.0","@dabh/eslint-config-populist":"^4.4.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:"^17.1.0",rimraf:"5.0.1",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 va=w((k2,Xu)=>{Xu.exports=require("util").deprecate});var _a=w((D2,ef)=>{ef.exports=require("stream")});var Ea=w((P2,rf)=>{"use strict";function ty(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(Sa,this,t)):process.nextTick(Sa,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(dn,r):(r._writableState.errorEmitted=!0,process.nextTick(tf,r,s)):process.nextTick(tf,r,s):e?(process.nextTick(dn,r),e(s)):process.nextTick(dn,r)}),this)}function tf(t,e){Sa(t,e),dn(t)}function dn(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function ry(){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 Sa(t,e){t.emit("error",e)}function iy(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}rf.exports={destroy:ty,undestroy:ry,errorOrDestroy:iy}});var gr=w((C2,af)=>{"use strict";var sf={};function Ie(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,sf[t]=n}function nf(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 ny(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function sy(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function ay(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}Ie("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);Ie("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&ny(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(sy(t," argument"))n=`The ${t} ${i} ${nf(e,"type")}`;else{let s=ay(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${nf(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);Ie("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Ie("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});Ie("ERR_STREAM_PREMATURE_CLOSE","Premature close");Ie("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});Ie("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Ie("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Ie("ERR_STREAM_WRITE_AFTER_END","write after end");Ie("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Ie("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);Ie("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");af.exports.codes=sf});var Ra=w((q2,of)=>{"use strict";var oy=gr().codes.ERR_INVALID_OPT_VALUE;function ly(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function uy(t,e,r,i){var n=ly(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new oy(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}of.exports={getHighWaterMark:uy}});var lf=w((L2,xa)=>{typeof Object.create=="function"?xa.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:xa.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 ht=w((j2,Ma)=>{try{if(Ta=require("util"),typeof Ta.inherits!="function")throw"";Ma.exports=Ta.inherits}catch{Ma.exports=lf()}var Ta});var pf=w((N2,df)=>{"use strict";function uf(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 ff(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?uf(Object(r),!0).forEach(function(i){fy(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):uf(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function fy(t,e,r){return e=cf(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hf(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,cf(i.key),i)}}function cy(t,e,r){return e&&hf(t.prototype,e),r&&hf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function cf(t){var e=dy(t,"string");return typeof e=="symbol"?e:String(e)}function dy(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 py=require("buffer"),pn=py.Buffer,gy=require("util"),Oa=gy.inspect,my=Oa&&Oa.custom||"inspect";function yy(t,e,r){pn.prototype.copy.call(t,e,r)}df.exports=function(){function t(){hy(this,t),this.head=null,this.tail=null,this.length=0}return cy(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 pn.alloc(0);for(var i=pn.allocUnsafe(r>>>0),n=this.head,s=0;n;)yy(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=pn.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:my,value:function(r,i){return Oa(this,ff(ff({},i),{},{depth:0,customInspect:!1}))}}]),t}()});var ka=w((Aa,mf)=>{var gn=require("buffer"),et=gn.Buffer;function gf(t,e){for(var r in t)e[r]=t[r]}et.from&&et.alloc&&et.allocUnsafe&&et.allocUnsafeSlow?mf.exports=gn:(gf(gn,Aa),Aa.Buffer=Vt);function Vt(t,e,r){return et(t,e,r)}Vt.prototype=Object.create(et.prototype);gf(et,Vt);Vt.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return et(t,e,r)};Vt.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=et(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};Vt.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return et(t)};Vt.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return gn.SlowBuffer(t)}});var Ca=w(bf=>{"use strict";var Pa=ka().Buffer,yf=Pa.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 by(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 wy(t){var e=by(t);if(typeof e!="string"&&(Pa.isEncoding===yf||!yf(t)))throw new Error("Unknown encoding: "+t);return e||t}bf.StringDecoder=Vr;function Vr(t){this.encoding=wy(t);var e;switch(this.encoding){case"utf16le":this.text=xy,this.end=Ty,e=4;break;case"utf8":this.fillLast=Sy,e=4;break;case"base64":this.text=My,this.end=Oy,e=3;break;default:this.write=Ay,this.end=ky;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Pa.allocUnsafe(e)}Vr.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||""};Vr.prototype.end=Ry;Vr.prototype.text=Ey;Vr.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 Da(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function vy(t,e,r){var i=e.length-1;if(i<r)return 0;var n=Da(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=Da(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=Da(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function _y(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 Sy(t){var e=this.lastTotal-this.lastNeed,r=_y(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 Ey(t,e){var r=vy(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 Ry(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function xy(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 Ty(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 My(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 Oy(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Ay(t){return t.toString(this.encoding)}function ky(t){return t&&t.length?this.write(t):""}});var Sf=w((I2,_f)=>{"use strict";var wf=gr().codes.ERR_STREAM_PREMATURE_CLOSE;function Dy(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 Py(){}function Cy(t){return t.setHeader&&typeof t.abort=="function"}function vf(t,e,r){if(typeof e=="function")return vf(t,null,e);e||(e={}),r=Dy(r||Py);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)},c=function(y){r.call(t,y)},h=function(){var y;if(i&&!l)return(!t._readableState||!t._readableState.ended)&&(y=new wf),r.call(t,y);if(n&&!a)return(!t._writableState||!t._writableState.ended)&&(y=new wf),r.call(t,y)},d=function(){t.req.on("finish",o)};return Cy(t)?(t.on("complete",o),t.on("abort",h),t.req?d():t.on("request",d)):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",c),t.on("close",h),function(){t.removeListener("complete",o),t.removeListener("abort",h),t.removeListener("request",d),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",c),t.removeListener("close",h)}}_f.exports=vf});var Rf=w(($2,Ef)=>{"use strict";var mn;function Et(t,e,r){return e=qy(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qy(t){var e=Ly(t,"string");return typeof e=="symbol"?e:String(e)}function Ly(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 jy=Sf(),Rt=Symbol("lastResolve"),Kt=Symbol("lastReject"),Kr=Symbol("error"),yn=Symbol("ended"),Jt=Symbol("lastPromise"),qa=Symbol("handlePromise"),Zt=Symbol("stream");function xt(t,e){return{value:t,done:e}}function Ny(t){var e=t[Rt];if(e!==null){var r=t[Zt].read();r!==null&&(t[Jt]=null,t[Rt]=null,t[Kt]=null,e(xt(r,!1)))}}function Fy(t){process.nextTick(Ny,t)}function Iy(t,e){return function(r,i){t.then(function(){if(e[yn]){r(xt(void 0,!0));return}e[qa](r,i)},i)}}var $y=Object.getPrototypeOf(function(){}),Wy=Object.setPrototypeOf((mn={get stream(){return this[Zt]},next:function(){var e=this,r=this[Kr];if(r!==null)return Promise.reject(r);if(this[yn])return Promise.resolve(xt(void 0,!0));if(this[Zt].destroyed)return new Promise(function(a,o){process.nextTick(function(){e[Kr]?o(e[Kr]):a(xt(void 0,!0))})});var i=this[Jt],n;if(i)n=new Promise(Iy(i,this));else{var s=this[Zt].read();if(s!==null)return Promise.resolve(xt(s,!1));n=new Promise(this[qa])}return this[Jt]=n,n}},Et(mn,Symbol.asyncIterator,function(){return this}),Et(mn,"return",function(){var e=this;return new Promise(function(r,i){e[Zt].destroy(null,function(n){if(n){i(n);return}r(xt(void 0,!0))})})}),mn),$y),By=function(e){var r,i=Object.create(Wy,(r={},Et(r,Zt,{value:e,writable:!0}),Et(r,Rt,{value:null,writable:!0}),Et(r,Kt,{value:null,writable:!0}),Et(r,Kr,{value:null,writable:!0}),Et(r,yn,{value:e._readableState.endEmitted,writable:!0}),Et(r,qa,{value:function(s,a){var o=i[Zt].read();o?(i[Jt]=null,i[Rt]=null,i[Kt]=null,s(xt(o,!1))):(i[Rt]=s,i[Kt]=a)},writable:!0}),r));return i[Jt]=null,jy(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[Kt];s!==null&&(i[Jt]=null,i[Rt]=null,i[Kt]=null,s(n)),i[Kr]=n;return}var a=i[Rt];a!==null&&(i[Jt]=null,i[Rt]=null,i[Kt]=null,a(xt(void 0,!0))),i[yn]=!0}),e.on("readable",Fy.bind(null,i)),i};Ef.exports=By});var Of=w((W2,Mf)=>{"use strict";function xf(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 Uy(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function a(l){xf(s,i,n,a,o,"next",l)}function o(l){xf(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 zy(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){Hy(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 Hy(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=Yy(t,"string");return typeof e=="symbol"?e:String(e)}function Yy(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 Vy=gr().codes.ERR_INVALID_ARG_TYPE;function Ky(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 Vy("iterable",["Iterable"],e);var n=new t(zy({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,a())};function a(){return o.apply(this,arguments)}function o(){return o=Uy(function*(){try{var l=yield i.next(),u=l.value,c=l.done;c?n.push(null):n.push(yield u)?a():s=!1}catch(h){n.destroy(h)}}),o.apply(this,arguments)}return n}Mf.exports=Ky});var If=w((U2,Ff)=>{"use strict";Ff.exports=W;var mr;W.ReadableState=Pf;var B2=require("events").EventEmitter,Df=function(e,r){return e.listeners(r).length},Zr=_a(),bn=require("buffer").Buffer,Jy=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Zy(t){return bn.from(t)}function Qy(t){return bn.isBuffer(t)||t instanceof Jy}var La=require("util"),L;La&&La.debuglog?L=La.debuglog("stream"):L=function(){};var Xy=pf(),Ba=Ea(),e0=Ra(),t0=e0.getHighWaterMark,wn=gr().codes,r0=wn.ERR_INVALID_ARG_TYPE,i0=wn.ERR_STREAM_PUSH_AFTER_EOF,n0=wn.ERR_METHOD_NOT_IMPLEMENTED,s0=wn.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,yr,ja,Na;ht()(W,Zr);var Jr=Ba.errorOrDestroy,Fa=["error","close","destroy","pause","resume"];function a0(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 Pf(t,e,r){mr=mr||Qr(),t=t||{},typeof r!="boolean"&&(r=e instanceof mr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=t0(this,t,"readableHighWaterMark",r),this.buffer=new Xy,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&&(yr||(yr=Ca().StringDecoder),this.decoder=new yr(t.encoding),this.encoding=t.encoding)}function W(t){if(mr=mr||Qr(),!(this instanceof W))return new W(t);var e=this instanceof mr;this._readableState=new Pf(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Zr.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=Ba.destroy;W.prototype._undestroy=Ba.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=bn.from(t,e),e=""),i=!0),Cf(this,t,e,!1,i)};W.prototype.unshift=function(t){return Cf(this,t,null,!0,!1)};function Cf(t,e,r,i,n){L("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,u0(t,s);else{var a;if(n||(a=o0(s,e)),a)Jr(t,a);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==bn.prototype&&(e=Zy(e)),i)s.endEmitted?Jr(t,new s0):Ia(t,s,e,!0);else if(s.ended)Jr(t,new i0);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?Ia(t,s,e,!1):Wa(t,s)):Ia(t,s,e,!1)}else i||(s.reading=!1,Wa(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function Ia(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&&vn(t)),Wa(t,e)}function o0(t,e){var r;return!Qy(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new r0("chunk",["string","Buffer","Uint8Array"],e)),r}W.prototype.isPaused=function(){return this._readableState.flowing===!1};W.prototype.setEncoding=function(t){yr||(yr=Ca().StringDecoder);var e=new yr(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 Af=1073741824;function l0(t){return t>=Af?t=Af:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function kf(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=l0(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?$a(this):vn(this),null;if(t=kf(t,e),t===0&&e.ended)return e.length===0&&$a(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=kf(r,e)));var n;return t>0?n=jf(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&&$a(this)),n!==null&&this.emit("data",n),n};function u0(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?vn(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,qf(t)))}}function vn(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(qf,t))}function qf(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,Ua(t)}function Wa(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(f0,t,e))}function f0(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){Jr(this,new n0("_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(_,E){L("onunpipe"),_===r&&E&&E.hasUnpiped===!1&&(E.hasUnpiped=!0,c())}function o(){L("onend"),t.end()}var l=h0(r);t.on("drain",l);var u=!1;function c(){L("cleanup"),t.removeListener("close",f),t.removeListener("finish",y),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",b),r.removeListener("data",h),u=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}r.on("data",h);function h(_){L("ondata");var E=t.write(_);L("dest.write",E),E===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&Nf(i.pipes,t)!==-1)&&!u&&(L("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(_){L("onerror",_),b(),t.removeListener("error",d),Df(t,"error")===0&&Jr(t,_)}a0(t,"error",d);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 h0(t){return function(){var r=t._readableState;L("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Df(t,"data")&&(r.flowing=!0,Ua(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=Nf(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=Zr.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?vn(this):i.reading||process.nextTick(c0,this)),r};W.prototype.addListener=W.prototype.on;W.prototype.removeListener=function(t,e){var r=Zr.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Lf,this),r};W.prototype.removeAllListeners=function(t){var e=Zr.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Lf,this),e};function Lf(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 c0(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,d0(this,t)),t.paused=!1,this};function d0(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(p0,t,e))}function p0(t,e){L("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),Ua(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 Ua(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<Fa.length;s++)t.on(Fa[s],this.emit.bind(this,Fa[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 ja===void 0&&(ja=Rf()),ja(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=jf;Object.defineProperty(W.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function jf(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 $a(t){var e=t._readableState;L("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(g0,e,t))}function g0(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 Na===void 0&&(Na=Of()),Na(W,t,e)});function Nf(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Qr=w((z2,Wf)=>{"use strict";var m0=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};Wf.exports=tt;var $f=If(),Ha=Ga();ht()(tt,$f);for(za=m0(Ha.prototype),_n=0;_n<za.length;_n++)Sn=za[_n],tt.prototype[Sn]||(tt.prototype[Sn]=Ha.prototype[Sn]);var za,Sn,_n;function tt(t){if(!(this instanceof tt))return new tt(t);$f.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",y0)))}Object.defineProperty(tt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(tt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(tt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function y0(){this._writableState.ended||process.nextTick(b0,this)}function b0(t){t.end()}Object.defineProperty(tt.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 Ga=w((H2,Yf)=>{"use strict";Yf.exports=G;function Uf(t){var e=this;this.next=null,this.entry=null,this.finish=function(){H0(e,t)}}var br;G.WritableState=ei;var w0={deprecate:va()},zf=_a(),Rn=require("buffer").Buffer,v0=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function _0(t){return Rn.from(t)}function S0(t){return Rn.isBuffer(t)||t instanceof v0}var Va=Ea(),E0=Ra(),R0=E0.getHighWaterMark,Tt=gr().codes,x0=Tt.ERR_INVALID_ARG_TYPE,T0=Tt.ERR_METHOD_NOT_IMPLEMENTED,M0=Tt.ERR_MULTIPLE_CALLBACK,O0=Tt.ERR_STREAM_CANNOT_PIPE,A0=Tt.ERR_STREAM_DESTROYED,k0=Tt.ERR_STREAM_NULL_VALUES,D0=Tt.ERR_STREAM_WRITE_AFTER_END,P0=Tt.ERR_UNKNOWN_ENCODING,wr=Va.errorOrDestroy;ht()(G,zf);function C0(){}function ei(t,e,r){br=br||Qr(),t=t||{},typeof r!="boolean"&&(r=e instanceof br),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=R0(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){$0(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 Uf(this)}ei.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(ei.prototype,"buffer",{get:w0.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(G,Symbol.hasInstance,{value:function(e){return En.call(this,e)?!0:this!==G?!1:e&&e._writableState instanceof ei}})):En=function(e){return e instanceof this};function G(t){br=br||Qr();var e=this instanceof br;if(!e&&!En.call(G,this))return new G(t);this._writableState=new ei(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)),zf.call(this)}G.prototype.pipe=function(){wr(this,new O0)};function q0(t,e){var r=new D0;wr(t,r),process.nextTick(e,r)}function L0(t,e,r,i){var n;return r===null?n=new k0:typeof r!="string"&&!e.objectMode&&(n=new x0("chunk",["string","Buffer"],r)),n?(wr(t,n),process.nextTick(i,n),!1):!0}G.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&S0(t);return s&&!Rn.isBuffer(t)&&(t=_0(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=C0),i.ending?q0(this,r):(s||L0(this,i,t,r))&&(i.pendingcb++,n=N0(this,i,s,t,e,r)),n};G.prototype.cork=function(){this._writableState.corked++};G.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Hf(this,t))};G.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 P0(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(G.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function j0(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Rn.from(e,r)),e}Object.defineProperty(G.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function N0(t,e,r,i,n,s){if(!r){var a=j0(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 Ya(t,e,!1,o,i,n,s);return l}function Ya(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new A0("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function F0(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(Xr,t,e),t._writableState.errorEmitted=!0,wr(t,i)):(n(i),t._writableState.errorEmitted=!0,wr(t,i),Xr(t,e))}function I0(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function $0(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new M0;if(I0(r),e)F0(t,r,i,e,n);else{var s=Gf(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Hf(t,r),i?process.nextTick(Bf,t,r,s,n):Bf(t,r,s,n)}}function Bf(t,e,r,i){r||W0(t,e),e.pendingcb--,i(),Xr(t,e)}function W0(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function Hf(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,Ya(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 Uf(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,h=e.objectMode?1:l.length;if(Ya(t,e,!1,h,l,u,c),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}G.prototype._write=function(t,e,r){r(new T0("_write()"))};G.prototype._writev=null;G.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||z0(this,i,r),this};Object.defineProperty(G.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Gf(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function B0(t,e){t._final(function(r){e.pendingcb--,r&&wr(t,r),e.prefinished=!0,t.emit("prefinish"),Xr(t,e)})}function U0(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(B0,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Xr(t,e){var r=Gf(e);if(r&&(U0(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 z0(t,e,r){e.ending=!0,Xr(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function H0(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(G.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});G.prototype.destroy=Va.destroy;G.prototype._undestroy=Va.undestroy;G.prototype._destroy=function(t,e){e(t)}});var Ka=w((G2,Jf)=>{"use strict";var G0=require("util"),Vf=Ga(),{LEVEL:Kf}=re(),ti=Jf.exports=function(e={}){Vf.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(ti,Vf);ti.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[Kf]]){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)};ti.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)};ti.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[Kf]])&&(this.handleExceptions||r.exception!==!0))};ti.prototype._nop=function(){}});var Za=w((Y2,Qf)=>{"use strict";var Y0=require("util"),{LEVEL:Ja}=re(),Zf=Ka(),ri=Qf.exports=function(e={}){if(Zf.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))};Y0.inherits(ri,Zf);ri.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[Ja]])&&this.transport.log(e[Ja],e.message,e,this._nop),i(null)};ri.prototype._writev=function(e,r){for(let i=0;i<e.length;i++)this._accept(e[i])&&(this.transport.log(e[i].chunk[Ja],e[i].chunk.message,e[i].chunk,this._nop),e[i].callback());return r(null)};ri.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
|
-
`))};ri.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}});var vr=w((V2,Qa)=>{"use strict";Qa.exports=Ka();Qa.exports.LegacyTransportStream=Za()});var th=w((J2,eh)=>{"use strict";var V0=require("os"),{LEVEL:Xf,MESSAGE:_r}=re(),K0=vr();eh.exports=class extends K0{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:V0.EOL,this.forceConsole=e.forceConsole||!1,this._consoleLog=console.log.bind(console),this._consoleWarn=console.warn.bind(console),this._consoleError=console.error.bind(console),this.setMaxListeners(30)}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.stderrLevels[e[Xf]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[_r]}${this.eol}`):this._consoleError(e[_r]),r&&r();return}else if(this.consoleWarnLevels[e[Xf]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[_r]}${this.eol}`):this._consoleWarn(e[_r]),r&&r();return}console._stdout&&!this.forceConsole?console._stdout.write(`${e[_r]}${this.eol}`):this._consoleLog(e[_r]),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 Tn=w((xn,rh)=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.default=J0;function J0(t){return t&&typeof t.length=="number"&&t.length>=0&&t.length%1===0}rh.exports=xn.default});var nh=w((Mn,ih)=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.default=function(t){return function(...e){var r=e.pop();return t.call(this,e,r)}};ih.exports=Mn.default});var oh=w(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.fallback=sh;Mt.wrap=ah;var Z0=Mt.hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,Q0=Mt.hasSetImmediate=typeof setImmediate=="function"&&setImmediate,X0=Mt.hasNextTick=typeof process=="object"&&typeof process.nextTick=="function";function sh(t){setTimeout(t,0)}function ah(t){return(e,...r)=>t(()=>e(...r))}var ii;Z0?ii=queueMicrotask:Q0?ii=setImmediate:X0?ii=process.nextTick:ii=sh;Mt.default=ah(ii)});var ch=w((On,hh)=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.default=sb;var eb=nh(),tb=fh(eb),rb=oh(),ib=fh(rb),nb=Qt();function fh(t){return t&&t.__esModule?t:{default:t}}function sb(t){return(0,nb.isAsync)(t)?function(...e){let r=e.pop(),i=t.apply(this,e);return lh(i,r)}:(0,tb.default)(function(e,r){var i;try{i=t.apply(this,e)}catch(n){return r(n)}if(i&&typeof i.then=="function")return lh(i,r);r(null,i)})}function lh(t,e){return t.then(r=>{uh(e,null,r)},r=>{uh(e,r&&(r instanceof Error||r.message)?r:new Error(r))})}function uh(t,e,r){try{t(e,r)}catch(i){(0,ib.default)(n=>{throw n},i)}}hh.exports=On.default});var Qt=w(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.isAsyncIterable=ct.isAsyncGenerator=ct.isAsync=void 0;var ab=ch(),ob=lb(ab);function lb(t){return t&&t.__esModule?t:{default:t}}function dh(t){return t[Symbol.toStringTag]==="AsyncFunction"}function ub(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function fb(t){return typeof t[Symbol.asyncIterator]=="function"}function hb(t){if(typeof t!="function")throw new Error("expected a function");return dh(t)?(0,ob.default)(t):t}ct.default=hb;ct.isAsync=dh;ct.isAsyncGenerator=ub;ct.isAsyncIterable=fb});var Sr=w((An,ph)=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.default=cb;function cb(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}ph.exports=An.default});var mh=w((kn,gh)=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});var db=Tn(),pb=Xa(db),gb=Qt(),mb=Xa(gb),yb=Sr(),bb=Xa(yb);function Xa(t){return t&&t.__esModule?t:{default:t}}kn.default=(0,bb.default)((t,e,r)=>{var i=(0,pb.default)(e)?[]:{};t(e,(n,s,a)=>{(0,mb.default)(n)((o,...l)=>{l.length<2&&([l]=l),i[s]=l,a(o)})},n=>r(n,i))},3);gh.exports=kn.default});var eo=w((Dn,yh)=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.default=wb;function wb(t){function e(...r){if(t!==null){var i=t;t=null,i.apply(this,r)}}return Object.assign(e,t),e}yh.exports=Dn.default});var wh=w((Pn,bh)=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.default=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()};bh.exports=Pn.default});var Sh=w((Cn,_h)=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.default=Mb;var vb=Tn(),_b=vh(vb),Sb=wh(),Eb=vh(Sb);function vh(t){return t&&t.__esModule?t:{default:t}}function Rb(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}function xb(t){var e=-1;return function(){var i=t.next();return i.done?null:(e++,{value:i.value,key:e})}}function Tb(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 Mb(t){if((0,_b.default)(t))return Rb(t);var e=(0,Eb.default)(t);return e?xb(e):Tb(t)}_h.exports=Cn.default});var to=w((qn,Eh)=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.default=Ob;function Ob(t){return function(...e){if(t===null)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}Eh.exports=qn.default});var jn=w((Ln,Rh)=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});var Ab={};Ln.default=Ab;Rh.exports=Ln.default});var Th=w((Nn,xh)=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.default=Cb;var kb=jn(),Db=Pb(kb);function Pb(t){return t&&t.__esModule?t:{default:t}}function Cb(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:d,done:f})=>{if(!(s||n)){if(a=!1,f){n=!0,o<=0&&i(null);return}o++,r(d,l,c),l++,u()}}).catch(h))}function c(d,f){if(o-=1,!s){if(d)return h(d);if(d===!1){n=!0,s=!0;return}if(f===Db.default||n&&o<=0)return n=!0,i(null);u()}}function h(d){s||(a=!1,n=!0,i(d))}u()}xh.exports=Nn.default});var kh=w((Fn,Ah)=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});var qb=eo(),Lb=ni(qb),jb=Sh(),Nb=ni(jb),Fb=to(),Ib=ni(Fb),Mh=Qt(),$b=Th(),Oh=ni($b),Wb=jn(),Bb=ni(Wb);function ni(t){return t&&t.__esModule?t:{default:t}}Fn.default=t=>(e,r,i)=>{if(i=(0,Lb.default)(i),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return i(null);if((0,Mh.isAsyncGenerator)(e))return(0,Oh.default)(e,t,r,i);if((0,Mh.isAsyncIterable)(e))return(0,Oh.default)(e[Symbol.asyncIterator](),t,r,i);var n=(0,Nb.default)(e),s=!1,a=!1,o=0,l=!1;function u(h,d){if(!a)if(o-=1,h)s=!0,i(h);else if(h===!1)s=!0,a=!0;else{if(d===Bb.default||s&&o<=0)return s=!0,i(null);l||c()}}function c(){for(l=!0;o<t&&!s;){var h=n();if(h===null){s=!0,o<=0&&i(null);return}o+=1,r(h.value,h.key,(0,Ib.default)(u))}l=!1}c()};Ah.exports=Fn.default});var io=w((In,Dh)=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});var Ub=kh(),zb=ro(Ub),Hb=Qt(),Gb=ro(Hb),Yb=Sr(),Vb=ro(Yb);function ro(t){return t&&t.__esModule?t:{default:t}}function Kb(t,e,r,i){return(0,zb.default)(e)(t,(0,Gb.default)(r),i)}In.default=(0,Vb.default)(Kb,4);Dh.exports=In.default});var qh=w(($n,Ch)=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});var Jb=io(),Zb=Ph(Jb),Qb=Sr(),Xb=Ph(Qb);function Ph(t){return t&&t.__esModule?t:{default:t}}function ew(t,e,r){return(0,Zb.default)(t,1,e,r)}$n.default=(0,Xb.default)(ew,3);Ch.exports=$n.default});var Nh=w((Wn,jh)=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.default=sw;var tw=mh(),rw=Lh(tw),iw=qh(),nw=Lh(iw);function Lh(t){return t&&t.__esModule?t:{default:t}}function sw(t,e){return(0,rw.default)(nw.default,t,e)}jh.exports=Wn.default});var no=w((X2,Fh)=>{Fh.exports=require("stream")});var zh=w((eR,Uh)=>{"use strict";function Ih(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 $h(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ih(Object(r),!0).forEach(function(i){aw(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ih(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function aw(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 ow(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wh(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 lw(t,e,r){return e&&Wh(t.prototype,e),r&&Wh(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Bh(t){var e=uw(t,"string");return typeof e=="symbol"?e:String(e)}function uw(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 fw=require("buffer"),Bn=fw.Buffer,hw=require("util"),so=hw.inspect,cw=so&&so.custom||"inspect";function dw(t,e,r){Bn.prototype.copy.call(t,e,r)}Uh.exports=function(){function t(){ow(this,t),this.head=null,this.tail=null,this.length=0}return lw(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 Bn.alloc(0);for(var i=Bn.allocUnsafe(r>>>0),n=this.head,s=0;n;)dw(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=Bn.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:cw,value:function(r,i){return so(this,$h($h({},i),{},{depth:0,customInspect:!1}))}}]),t}()});var oo=w((tR,Gh)=>{"use strict";function pw(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(ao,this,t)):process.nextTick(ao,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(Un,r):(r._writableState.errorEmitted=!0,process.nextTick(Hh,r,s)):process.nextTick(Hh,r,s):e?(process.nextTick(Un,r),e(s)):process.nextTick(Un,r)}),this)}function Hh(t,e){ao(t,e),Un(t)}function Un(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function gw(){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 ao(t,e){t.emit("error",e)}function mw(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}Gh.exports={destroy:pw,undestroy:gw,errorOrDestroy:mw}});var Ot=w((rR,Kh)=>{"use strict";var Vh={};function $e(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,Vh[t]=n}function Yh(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 yw(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function bw(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function ww(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}$e("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);$e("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&yw(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(bw(t," argument"))n=`The ${t} ${i} ${Yh(e,"type")}`;else{let s=ww(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${Yh(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);$e("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");$e("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});$e("ERR_STREAM_PREMATURE_CLOSE","Premature close");$e("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});$e("ERR_MULTIPLE_CALLBACK","Callback called multiple times");$e("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");$e("ERR_STREAM_WRITE_AFTER_END","write after end");$e("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);$e("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);$e("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Kh.exports.codes=Vh});var lo=w((iR,Jh)=>{"use strict";var vw=Ot().codes.ERR_INVALID_OPT_VALUE;function _w(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Sw(t,e,r,i){var n=_w(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new vw(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}Jh.exports={getHighWaterMark:Sw}});var ho=w((nR,rc)=>{"use strict";rc.exports=Y;function Qh(t){var e=this;this.next=null,this.entry=null,this.finish=function(){Kw(e,t)}}var Er;Y.WritableState=ai;var Ew={deprecate:va()},Xh=no(),Hn=require("buffer").Buffer,Rw=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function xw(t){return Hn.from(t)}function Tw(t){return Hn.isBuffer(t)||t instanceof Rw}var fo=oo(),Mw=lo(),Ow=Mw.getHighWaterMark,At=Ot().codes,Aw=At.ERR_INVALID_ARG_TYPE,kw=At.ERR_METHOD_NOT_IMPLEMENTED,Dw=At.ERR_MULTIPLE_CALLBACK,Pw=At.ERR_STREAM_CANNOT_PIPE,Cw=At.ERR_STREAM_DESTROYED,qw=At.ERR_STREAM_NULL_VALUES,Lw=At.ERR_STREAM_WRITE_AFTER_END,jw=At.ERR_UNKNOWN_ENCODING,Rr=fo.errorOrDestroy;ht()(Y,Xh);function Nw(){}function ai(t,e,r){Er=Er||Xt(),t=t||{},typeof r!="boolean"&&(r=e instanceof Er),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Ow(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){zw(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 Qh(this)}ai.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(ai.prototype,"buffer",{get:Ew.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var zn;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(zn=Function.prototype[Symbol.hasInstance],Object.defineProperty(Y,Symbol.hasInstance,{value:function(e){return zn.call(this,e)?!0:this!==Y?!1:e&&e._writableState instanceof ai}})):zn=function(e){return e instanceof this};function Y(t){Er=Er||Xt();var e=this instanceof Er;if(!e&&!zn.call(Y,this))return new Y(t);this._writableState=new ai(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)),Xh.call(this)}Y.prototype.pipe=function(){Rr(this,new Pw)};function Fw(t,e){var r=new Lw;Rr(t,r),process.nextTick(e,r)}function Iw(t,e,r,i){var n;return r===null?n=new qw:typeof r!="string"&&!e.objectMode&&(n=new Aw("chunk",["string","Buffer"],r)),n?(Rr(t,n),process.nextTick(i,n),!1):!0}Y.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&Tw(t);return s&&!Hn.isBuffer(t)&&(t=xw(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=Nw),i.ending?Fw(this,r):(s||Iw(this,i,t,r))&&(i.pendingcb++,n=Ww(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&&ec(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 jw(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Y.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function $w(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Hn.from(e,r)),e}Object.defineProperty(Y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Ww(t,e,r,i,n,s){if(!r){var a=$w(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 uo(t,e,!1,o,i,n,s);return l}function uo(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new Cw("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function Bw(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(si,t,e),t._writableState.errorEmitted=!0,Rr(t,i)):(n(i),t._writableState.errorEmitted=!0,Rr(t,i),si(t,e))}function Uw(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function zw(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new Dw;if(Uw(r),e)Bw(t,r,i,e,n);else{var s=tc(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&ec(t,r),i?process.nextTick(Zh,t,r,s,n):Zh(t,r,s,n)}}function Zh(t,e,r,i){r||Hw(t,e),e.pendingcb--,i(),si(t,e)}function Hw(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function ec(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,uo(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 Qh(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,h=e.objectMode?1:l.length;if(uo(t,e,!1,h,l,u,c),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 kw("_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||Vw(this,i,r),this};Object.defineProperty(Y.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function tc(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&&Rr(t,r),e.prefinished=!0,t.emit("prefinish"),si(t,e)})}function Yw(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 si(t,e){var r=tc(e);if(r&&(Yw(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 Vw(t,e,r){e.ending=!0,si(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function Kw(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=fo.destroy;Y.prototype._undestroy=fo.undestroy;Y.prototype._destroy=function(t,e){e(t)}});var Xt=w((sR,nc)=>{"use strict";var Jw=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};nc.exports=rt;var ic=go(),po=ho();ht()(rt,ic);for(co=Jw(po.prototype),Gn=0;Gn<co.length;Gn++)Yn=co[Gn],rt.prototype[Yn]||(rt.prototype[Yn]=po.prototype[Yn]);var co,Yn,Gn;function rt(t){if(!(this instanceof rt))return new rt(t);ic.call(this,t),po.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",Zw)))}Object.defineProperty(rt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(rt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(rt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Zw(){this._writableState.ended||process.nextTick(Qw,this)}function Qw(t){t.end()}Object.defineProperty(rt.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 bo=w(ac=>{"use strict";var yo=ka().Buffer,sc=yo.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 Xw(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 ev(t){var e=Xw(t);if(typeof e!="string"&&(yo.isEncoding===sc||!sc(t)))throw new Error("Unknown encoding: "+t);return e||t}ac.StringDecoder=oi;function oi(t){this.encoding=ev(t);var e;switch(this.encoding){case"utf16le":this.text=av,this.end=ov,e=4;break;case"utf8":this.fillLast=iv,e=4;break;case"base64":this.text=lv,this.end=uv,e=3;break;default:this.write=fv,this.end=hv;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=yo.allocUnsafe(e)}oi.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||""};oi.prototype.end=sv;oi.prototype.text=nv;oi.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 mo(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function tv(t,e,r){var i=e.length-1;if(i<r)return 0;var n=mo(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=mo(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=mo(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function rv(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 iv(t){var e=this.lastTotal-this.lastNeed,r=rv(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 nv(t,e){var r=tv(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 sv(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function av(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 ov(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 lv(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 uv(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function fv(t){return t.toString(this.encoding)}function hv(t){return t&&t.length?this.write(t):""}});var Vn=w((oR,uc)=>{"use strict";var oc=Ot().codes.ERR_STREAM_PREMATURE_CLOSE;function cv(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 dv(){}function pv(t){return t.setHeader&&typeof t.abort=="function"}function lc(t,e,r){if(typeof e=="function")return lc(t,null,e);e||(e={}),r=cv(r||dv);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)},c=function(y){r.call(t,y)},h=function(){var y;if(i&&!l)return(!t._readableState||!t._readableState.ended)&&(y=new oc),r.call(t,y);if(n&&!a)return(!t._writableState||!t._writableState.ended)&&(y=new oc),r.call(t,y)},d=function(){t.req.on("finish",o)};return pv(t)?(t.on("complete",o),t.on("abort",h),t.req?d():t.on("request",d)):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",c),t.on("close",h),function(){t.removeListener("complete",o),t.removeListener("abort",h),t.removeListener("request",d),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",c),t.removeListener("close",h)}}uc.exports=lc});var hc=w((lR,fc)=>{"use strict";var Kn;function kt(t,e,r){return e=gv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gv(t){var e=mv(t,"string");return typeof e=="symbol"?e:String(e)}function mv(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 yv=Vn(),Dt=Symbol("lastResolve"),er=Symbol("lastReject"),li=Symbol("error"),Jn=Symbol("ended"),tr=Symbol("lastPromise"),wo=Symbol("handlePromise"),rr=Symbol("stream");function Pt(t,e){return{value:t,done:e}}function bv(t){var e=t[Dt];if(e!==null){var r=t[rr].read();r!==null&&(t[tr]=null,t[Dt]=null,t[er]=null,e(Pt(r,!1)))}}function wv(t){process.nextTick(bv,t)}function vv(t,e){return function(r,i){t.then(function(){if(e[Jn]){r(Pt(void 0,!0));return}e[wo](r,i)},i)}}var _v=Object.getPrototypeOf(function(){}),Sv=Object.setPrototypeOf((Kn={get stream(){return this[rr]},next:function(){var e=this,r=this[li];if(r!==null)return Promise.reject(r);if(this[Jn])return Promise.resolve(Pt(void 0,!0));if(this[rr].destroyed)return new Promise(function(a,o){process.nextTick(function(){e[li]?o(e[li]):a(Pt(void 0,!0))})});var i=this[tr],n;if(i)n=new Promise(vv(i,this));else{var s=this[rr].read();if(s!==null)return Promise.resolve(Pt(s,!1));n=new Promise(this[wo])}return this[tr]=n,n}},kt(Kn,Symbol.asyncIterator,function(){return this}),kt(Kn,"return",function(){var e=this;return new Promise(function(r,i){e[rr].destroy(null,function(n){if(n){i(n);return}r(Pt(void 0,!0))})})}),Kn),_v),Ev=function(e){var r,i=Object.create(Sv,(r={},kt(r,rr,{value:e,writable:!0}),kt(r,Dt,{value:null,writable:!0}),kt(r,er,{value:null,writable:!0}),kt(r,li,{value:null,writable:!0}),kt(r,Jn,{value:e._readableState.endEmitted,writable:!0}),kt(r,wo,{value:function(s,a){var o=i[rr].read();o?(i[tr]=null,i[Dt]=null,i[er]=null,s(Pt(o,!1))):(i[Dt]=s,i[er]=a)},writable:!0}),r));return i[tr]=null,yv(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[er];s!==null&&(i[tr]=null,i[Dt]=null,i[er]=null,s(n)),i[li]=n;return}var a=i[Dt];a!==null&&(i[tr]=null,i[Dt]=null,i[er]=null,a(Pt(void 0,!0))),i[Jn]=!0}),e.on("readable",wv.bind(null,i)),i};fc.exports=Ev});var gc=w((uR,pc)=>{"use strict";function cc(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 Rv(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function a(l){cc(s,i,n,a,o,"next",l)}function o(l){cc(s,i,n,a,o,"throw",l)}a(void 0)})}}function dc(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 xv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?dc(Object(r),!0).forEach(function(i){Tv(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):dc(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Tv(t,e,r){return e=Mv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mv(t){var e=Ov(t,"string");return typeof e=="symbol"?e:String(e)}function Ov(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 Av=Ot().codes.ERR_INVALID_ARG_TYPE;function kv(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 Av("iterable",["Iterable"],e);var n=new t(xv({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,a())};function a(){return o.apply(this,arguments)}function o(){return o=Rv(function*(){try{var l=yield i.next(),u=l.value,c=l.done;c?n.push(null):n.push(yield u)?a():s=!1}catch(h){n.destroy(h)}}),o.apply(this,arguments)}return n}pc.exports=kv});var go=w((hR,xc)=>{"use strict";xc.exports=B;var xr;B.ReadableState=wc;var fR=require("events").EventEmitter,bc=function(e,r){return e.listeners(r).length},fi=no(),Zn=require("buffer").Buffer,Dv=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Pv(t){return Zn.from(t)}function Cv(t){return Zn.isBuffer(t)||t instanceof Dv}var vo=require("util"),j;vo&&vo.debuglog?j=vo.debuglog("stream"):j=function(){};var qv=zh(),Mo=oo(),Lv=lo(),jv=Lv.getHighWaterMark,Qn=Ot().codes,Nv=Qn.ERR_INVALID_ARG_TYPE,Fv=Qn.ERR_STREAM_PUSH_AFTER_EOF,Iv=Qn.ERR_METHOD_NOT_IMPLEMENTED,$v=Qn.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Tr,_o,So;ht()(B,fi);var ui=Mo.errorOrDestroy,Eo=["error","close","destroy","pause","resume"];function Wv(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 wc(t,e,r){xr=xr||Xt(),t=t||{},typeof r!="boolean"&&(r=e instanceof xr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=jv(this,t,"readableHighWaterMark",r),this.buffer=new qv,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&&(Tr||(Tr=bo().StringDecoder),this.decoder=new Tr(t.encoding),this.encoding=t.encoding)}function B(t){if(xr=xr||Xt(),!(this instanceof B))return new B(t);var e=this instanceof xr;this._readableState=new wc(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),fi.call(this)}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});B.prototype.destroy=Mo.destroy;B.prototype._undestroy=Mo.undestroy;B.prototype._destroy=function(t,e){e(t)};B.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=Zn.from(t,e),e=""),i=!0),vc(this,t,e,!1,i)};B.prototype.unshift=function(t){return vc(this,t,null,!0,!1)};function vc(t,e,r,i,n){j("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,zv(t,s);else{var a;if(n||(a=Bv(s,e)),a)ui(t,a);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Zn.prototype&&(e=Pv(e)),i)s.endEmitted?ui(t,new $v):Ro(t,s,e,!0);else if(s.ended)ui(t,new Fv);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?Ro(t,s,e,!1):To(t,s)):Ro(t,s,e,!1)}else i||(s.reading=!1,To(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function Ro(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&&Xn(t)),To(t,e)}function Bv(t,e){var r;return!Cv(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new Nv("chunk",["string","Buffer","Uint8Array"],e)),r}B.prototype.isPaused=function(){return this._readableState.flowing===!1};B.prototype.setEncoding=function(t){Tr||(Tr=bo().StringDecoder);var e=new Tr(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 mc=1073741824;function Uv(t){return t>=mc?t=mc:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function yc(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=Uv(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}B.prototype.read=function(t){j("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 j("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?xo(this):Xn(this),null;if(t=yc(t,e),t===0&&e.ended)return e.length===0&&xo(this),null;var i=e.needReadable;j("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,j("length less than watermark",i)),e.ended||e.reading?(i=!1,j("reading or ended",i)):i&&(j("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=yc(r,e)));var n;return t>0?n=Ec(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&&xo(this)),n!==null&&this.emit("data",n),n};function zv(t,e){if(j("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?Xn(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,_c(t)))}}function Xn(t){var e=t._readableState;j("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(j("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(_c,t))}function _c(t){var e=t._readableState;j("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,Oo(t)}function To(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(Hv,t,e))}function Hv(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(j("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}B.prototype._read=function(t){ui(this,new Iv("_read()"))};B.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,j("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(_,E){j("onunpipe"),_===r&&E&&E.hasUnpiped===!1&&(E.hasUnpiped=!0,c())}function o(){j("onend"),t.end()}var l=Gv(r);t.on("drain",l);var u=!1;function c(){j("cleanup"),t.removeListener("close",f),t.removeListener("finish",y),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",b),r.removeListener("data",h),u=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}r.on("data",h);function h(_){j("ondata");var E=t.write(_);j("dest.write",E),E===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&Rc(i.pipes,t)!==-1)&&!u&&(j("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(_){j("onerror",_),b(),t.removeListener("error",d),bc(t,"error")===0&&ui(t,_)}Wv(t,"error",d);function f(){t.removeListener("finish",y),b()}t.once("close",f);function y(){j("onfinish"),t.removeListener("close",f),b()}t.once("finish",y);function b(){j("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(j("pipe resume"),r.resume()),t};function Gv(t){return function(){var r=t._readableState;j("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&bc(t,"data")&&(r.flowing=!0,Oo(t))}}B.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=Rc(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)};B.prototype.on=function(t,e){var r=fi.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,j("on readable",i.length,i.reading),i.length?Xn(this):i.reading||process.nextTick(Yv,this)),r};B.prototype.addListener=B.prototype.on;B.prototype.removeListener=function(t,e){var r=fi.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Sc,this),r};B.prototype.removeAllListeners=function(t){var e=fi.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Sc,this),e};function Sc(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 Yv(t){j("readable nexttick read 0"),t.read(0)}B.prototype.resume=function(){var t=this._readableState;return t.flowing||(j("resume"),t.flowing=!t.readableListening,Vv(this,t)),t.paused=!1,this};function Vv(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(Kv,t,e))}function Kv(t,e){j("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),Oo(t),e.flowing&&!e.reading&&t.read(0)}B.prototype.pause=function(){return j("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(j("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Oo(t){var e=t._readableState;for(j("flow",e.flowing);e.flowing&&t.read()!==null;);}B.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(j("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(j("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){j("wrapped _read",a),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(B.prototype[Symbol.asyncIterator]=function(){return _o===void 0&&(_o=hc()),_o(this)});Object.defineProperty(B.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(B.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(B.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});B._fromList=Ec;Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Ec(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 xo(t){var e=t._readableState;j("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(Jv,e,t))}function Jv(t,e){if(j("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"&&(B.from=function(t,e){return So===void 0&&(So=gc()),So(B,t,e)});function Rc(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Ao=w((cR,Mc)=>{"use strict";Mc.exports=dt;var es=Ot().codes,Zv=es.ERR_METHOD_NOT_IMPLEMENTED,Qv=es.ERR_MULTIPLE_CALLBACK,Xv=es.ERR_TRANSFORM_ALREADY_TRANSFORMING,e1=es.ERR_TRANSFORM_WITH_LENGTH_0,ts=Xt();ht()(dt,ts);function t1(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new Qv);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 dt(t){if(!(this instanceof dt))return new dt(t);ts.call(this,t),this._transformState={afterTransform:t1.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",r1)}function r1(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){Tc(t,e,r)}):Tc(this,null,null)}dt.prototype.push=function(t,e){return this._transformState.needTransform=!1,ts.prototype.push.call(this,t,e)};dt.prototype._transform=function(t,e,r){r(new Zv("_transform()"))};dt.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)}};dt.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};dt.prototype._destroy=function(t,e){ts.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 e1;if(t._transformState.transforming)throw new Xv;return t.push(null)}});var kc=w((dR,Ac)=>{"use strict";Ac.exports=hi;var Oc=Ao();ht()(hi,Oc);function hi(t){if(!(this instanceof hi))return new hi(t);Oc.call(this,t)}hi.prototype._transform=function(t,e,r){r(null,t)}});var Lc=w((pR,qc)=>{"use strict";var ko;function i1(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var Cc=Ot().codes,n1=Cc.ERR_MISSING_ARGS,s1=Cc.ERR_STREAM_DESTROYED;function Dc(t){if(t)throw t}function a1(t){return t.setHeader&&typeof t.abort=="function"}function o1(t,e,r,i){i=i1(i);var n=!1;t.on("close",function(){n=!0}),ko===void 0&&(ko=Vn()),ko(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,a1(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(a||new s1("pipe"))}}}function Pc(t){t()}function l1(t,e){return t.pipe(e)}function u1(t){return!t.length||typeof t[t.length-1]!="function"?Dc:t.pop()}function f1(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=u1(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new n1("streams");var n,s=e.map(function(a,o){var l=o<e.length-1,u=o>0;return o1(a,l,u,function(c){n||(n=c),c&&s.forEach(Pc),!l&&(s.forEach(Pc),i(n))})});return e.reduce(l1)}qc.exports=f1});var ir=w((We,di)=>{var ci=require("stream");process.env.READABLE_STREAM==="disable"&&ci?(di.exports=ci.Readable,Object.assign(di.exports,ci),di.exports.Stream=ci):(We=di.exports=go(),We.Stream=ci||We,We.Readable=We,We.Writable=ho(),We.Duplex=Xt(),We.Transform=Ao(),We.PassThrough=kc(),We.finished=Vn(),We.pipeline=Lc())});var No=w((gR,Nc)=>{var Mr=[],pi=[],Do=function(){};function Co(t){return~Mr.indexOf(t)?!1:(Mr.push(t),!0)}function qo(t){Do=t}function h1(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 Lo(t){return~pi.indexOf(t)?!1:(pi.push(t),!0)}function Po(){Do.apply(Do,arguments)}function jc(t){for(var e=0;e<pi.length;e++)t=pi[e].apply(pi[e],arguments);return t}function jo(t,e){var r=Object.prototype.hasOwnProperty;for(var i in e)r.call(e,i)&&(t[i]=e[i]);return t}function c1(t){return t.enabled=!1,t.modify=Lo,t.set=qo,t.use=Co,jo(function(){return!1},t)}function d1(t){function e(){var r=Array.prototype.slice.call(arguments,0);return Po.call(Po,t,jc(r,t)),!0}return t.enabled=!0,t.modify=Lo,t.set=qo,t.use=Co,jo(e,t)}Nc.exports=function(e){return e.introduce=jo,e.enabled=h1,e.process=jc,e.modify=Lo,e.write=Po,e.nope=c1,e.yep=d1,e.set=qo,e.use=Co,e}});var Ic=w((mR,Fc)=>{var p1=No(),g1=p1(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)});Fc.exports=g1});var Wc=w((yR,$c)=>{"use strict";$c.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 Uc=w((bR,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 Gc=w((wR,Hc)=>{"use strict";var m1=Uc(),y1=Array.prototype.concat,b1=Array.prototype.slice,zc=Hc.exports=function(e){for(var r=[],i=0,n=e.length;i<n;i++){var s=e[i];m1(s)?r=y1.call(r,b1.call(s)):r.push(s)}return r};zc.wrap=function(t){return function(){return t(zc(arguments))}}});var Jc=w((vR,Kc)=>{var gi=Wc(),mi=Gc(),Yc=Object.hasOwnProperty,Vc=Object.create(null);for(rs in gi)Yc.call(gi,rs)&&(Vc[gi[rs]]=rs);var rs,Pe=Kc.exports={to:{},get:{}};Pe.get=function(t){var e=t.substring(0,3).toLowerCase(),r,i;switch(e){case"hsl":r=Pe.get.hsl(t),i="hsl";break;case"hwb":r=Pe.get.hwb(t),i="hwb";break;default:r=Pe.get.rgb(t),i="rgb";break}return r?{model:i,value:r}:null};Pe.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 c=l*2;a[l]=parseInt(o.slice(c,c+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]:Yc.call(gi,o[1])?(a=gi[o[1]],a[3]=1,a):null:null;for(l=0;l<3;l++)a[l]=Ct(a[l],0,255);return a[3]=Ct(a[3],0,1),a};Pe.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=Ct(parseFloat(r[2]),0,100),a=Ct(parseFloat(r[3]),0,100),o=Ct(isNaN(i)?1:i,0,1);return[n,s,a,o]}return null};Pe.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=Ct(parseFloat(r[2]),0,100),a=Ct(parseFloat(r[3]),0,100),o=Ct(isNaN(i)?1:i,0,1);return[n,s,a,o]}return null};Pe.to.hex=function(){var t=mi(arguments);return"#"+is(t[0])+is(t[1])+is(t[2])+(t[3]<1?is(Math.round(t[3]*255)):"")};Pe.to.rgb=function(){var t=mi(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]+")"};Pe.to.rgb.percent=function(){var t=mi(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]+")"};Pe.to.hsl=function(){var t=mi(arguments);return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};Pe.to.hwb=function(){var t=mi(arguments),e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};Pe.to.keyword=function(t){return Vc[t.slice(0,3)]};function Ct(t,e,r){return Math.min(Math.max(e,t),r)}function is(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}});var Qc=w((_R,Zc)=>{"use strict";Zc.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 Fo=w((SR,rd)=>{var nr=Qc(),td={};for(ns in nr)nr.hasOwnProperty(ns)&&(td[nr[ns]]=ns);var ns,A=rd.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(xe in A)if(A.hasOwnProperty(xe)){if(!("channels"in A[xe]))throw new Error("missing channels property: "+xe);if(!("labels"in A[xe]))throw new Error("missing channel labels property: "+xe);if(A[xe].labels.length!==A[xe].channels)throw new Error("channel and label counts mismatch: "+xe);Xc=A[xe].channels,ed=A[xe].labels,delete A[xe].channels,delete A[xe].labels,Object.defineProperty(A[xe],"channels",{value:Xc}),Object.defineProperty(A[xe],"labels",{value:ed})}var Xc,ed,xe;A.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]};A.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),c=u-Math.min(a,o,l),h=function(d){return(u-d)/6/c+1/2};return c===0?n=s=0:(s=c/u,e=h(a),r=h(o),i=h(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]};A.rgb.hwb=function(t){var e=t[0],r=t[1],i=t[2],n=A.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]};A.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 w1(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}A.rgb.keyword=function(t){var e=td[t];if(e)return e;var r=1/0,i;for(var n in nr)if(nr.hasOwnProperty(n)){var s=nr[n],a=w1(t,s);a<r&&(r=a,i=n)}return i};A.keyword.rgb=function(t){return nr[t]};A.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]};A.rgb.lab=function(t){var e=A.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]};A.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};A.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]};A.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]}};A.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]};A.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)!==0&&(o=1-o),l=r+o*(a-r);var u,c,h;switch(s){default:case 6:case 0:u=a,c=l,h=r;break;case 1:u=l,c=a,h=r;break;case 2:u=r,c=a,h=l;break;case 3:u=r,c=l,h=a;break;case 4:u=l,c=r,h=a;break;case 5:u=a,c=r,h=l;break}return[u*255,c*255,h*255]};A.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]};A.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]};A.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]};A.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]};A.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]};A.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]};A.rgb.ansi16=function(t){var e=t[0],r=t[1],i=t[2],n=1 in arguments?arguments[1]:A.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};A.hsv.ansi16=function(t){return A.rgb.ansi16(A.hsv.rgb(t),t[2])};A.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};A.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]};A.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]};A.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};A.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]};A.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]};A.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]};A.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]};A.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]};A.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]};A.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]};A.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]};A.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]};A.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};A.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};A.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};A.gray.hsl=A.gray.hsv=function(t){return[0,0,t[0]]};A.gray.hwb=function(t){return[0,100,t[0]]};A.gray.cmyk=function(t){return[0,0,0,t[0]]};A.gray.lab=function(t){return[t[0],0,0]};A.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};A.rgb.gray=function(t){var e=(t[0]+t[1]+t[2])/3;return[e/255*100]}});var nd=w((ER,id)=>{var ss=Fo();function v1(){for(var t={},e=Object.keys(ss),r=e.length,i=0;i<r;i++)t[e[i]]={distance:-1,parent:null};return t}function _1(t){var e=v1(),r=[t];for(e[t].distance=0;r.length;)for(var i=r.pop(),n=Object.keys(ss[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 S1(t,e){return function(r){return e(t(r))}}function E1(t,e){for(var r=[e[t].parent,t],i=ss[e[t].parent][t],n=e[t].parent;e[n].parent;)r.unshift(e[n].parent),i=S1(ss[e[n].parent][n],i),n=e[n].parent;return i.conversion=r,i}id.exports=function(t){for(var e=_1(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]=E1(a,e))}return r}});var ad=w((RR,sd)=>{var Io=Fo(),R1=nd(),Or={},x1=Object.keys(Io);function T1(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 M1(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}x1.forEach(function(t){Or[t]={},Object.defineProperty(Or[t],"channels",{value:Io[t].channels}),Object.defineProperty(Or[t],"labels",{value:Io[t].labels});var e=R1(t),r=Object.keys(e);r.forEach(function(i){var n=e[i];Or[t][i]=M1(n),Or[t][i].raw=T1(n)})});sd.exports=Or});var ud=w((xR,ld)=>{"use strict";var yi=Jc(),Ce=ad(),Bo=[].slice,od=["keyword","gray","hex"],$o={};Object.keys(Ce).forEach(function(t){$o[Bo.call(Ce[t].labels).sort().join("")]=t});var as={};function de(t,e){if(!(this instanceof de))return new de(t,e);if(e&&e in od&&(e=null),e&&!(e in Ce))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 de)this.model=t.model,this.color=t.color.slice(),this.valpha=t.valpha;else if(typeof t=="string"){var n=yi.get(t);if(n===null)throw new Error("Unable to parse color from string: "+t);this.model=n.model,i=Ce[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=Ce[this.model].channels;var s=Bo.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 $o))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=$o[o];var l=Ce[this.model].labels,u=[];for(r=0;r<l.length;r++)u.push(t[l[r]]);this.color=Wo(u)}if(as[this.model])for(i=Ce[this.model].channels,r=0;r<i;r++){var c=as[this.model][r];c&&(this.color[r]=c(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}de.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(t){var e=this.model in yi.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 yi.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 yi.to.rgb.percent(r)},array:function(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var t={},e=Ce[this.model].channels,r=Ce[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 de(this.color.map(A1(t)).concat(this.valpha),this.model)},alpha:function(t){return arguments.length?new de(this.color.concat(Math.max(0,Math.min(1,t))),this.model):this.valpha},red:V("rgb",0,ne(255)),green:V("rgb",1,ne(255)),blue:V("rgb",2,ne(255)),hue:V(["hsl","hsv","hsl","hwb","hcg"],0,function(t){return(t%360+360)%360}),saturationl:V("hsl",1,ne(100)),lightness:V("hsl",2,ne(100)),saturationv:V("hsv",1,ne(100)),value:V("hsv",2,ne(100)),chroma:V("hcg",1,ne(100)),gray:V("hcg",2,ne(100)),white:V("hwb",1,ne(100)),wblack:V("hwb",2,ne(100)),cyan:V("cmyk",0,ne(100)),magenta:V("cmyk",1,ne(100)),yellow:V("cmyk",2,ne(100)),black:V("cmyk",3,ne(100)),x:V("xyz",0,ne(100)),y:V("xyz",1,ne(100)),z:V("xyz",2,ne(100)),l:V("lab",0,ne(100)),a:V("lab",1),b:V("lab",2),keyword:function(t){return arguments.length?new de(t):Ce[this.model].keyword(this.color)},hex:function(t){return arguments.length?new de(t):yi.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 de.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 de.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(Ce).forEach(function(t){if(od.indexOf(t)===-1){var e=Ce[t].channels;de.prototype[t]=function(){if(this.model===t)return new de(this);if(arguments.length)return new de(arguments,t);var r=typeof arguments[e]=="number"?e:this.valpha;return new de(k1(Ce[this.model][t].raw(this.color)).concat(r),t)},de[t]=function(r){return typeof r=="number"&&(r=Wo(Bo.call(arguments),e)),new de(r,t)}}});function O1(t,e){return Number(t.toFixed(e))}function A1(t){return function(e){return O1(e,t)}}function V(t,e,r){return t=Array.isArray(t)?t:[t],t.forEach(function(i){(as[i]||(as[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 ne(t){return function(e){return Math.max(0,Math.min(t,e))}}function k1(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}ld.exports=de});var hd=w((TR,fd)=>{"use strict";fd.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 gd=w((MR,pd)=>{"use strict";var cd=ud(),dd=hd();pd.exports=function(e,r){var i=e.split(r||":"),n=dd(i[0]);if(!i.length)return n;for(var s=0,a=i.length-1;s<a;s++)n=cd(n).mix(cd(dd(i[s+1]))).saturate(1).hex();return n}});var yd=w((OR,md)=>{"use strict";function Ye(t,e){if(e)return new Ye(t).style(e);if(!(this instanceof Ye))return new Ye(t);this.text=t}Ye.prototype.prefix="\x1B[";Ye.prototype.suffix="m";Ye.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)]};Ye.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)};Ye.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};Ye.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};Ye.prototype.style=function(e){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(e))+this.suffix+this.text+this.reset()};md.exports=Ye});var wd=w((AR,bd)=>{var D1=gd(),P1=yd();bd.exports=function(e,r){var i=r.namespace,n=r.colors!==!1?P1(i+":",D1(i)):i+":";return e[0]=n+" "+e[0],e}});var _d=w((kR,vd)=>{"use strict";vd.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 Ed=w((DR,Sd)=>{var C1=_d();Sd.exports=function(e){return function(i){try{return C1(i,e())}catch{}return!1}}});var xd=w((PR,Rd)=>{var q1=Ed();Rd.exports=q1(function(){return process.env.DEBUG||process.env.DIAGNOSTICS})});var Md=w((CR,Td)=>{Td.exports=function(t,e){try{Function.prototype.apply.call(console.log,console,e)}catch{}}});var Ad=w((qR,Od)=>{var L1=No(),j1=require("tty").isatty(1),os=L1(function t(e,r){return r=r||{},r.colors="colors"in r?r.colors:j1,r.namespace=e,r.prod=!1,r.dev=!0,!t.enabled(e)&&!(r.force||t.force)?t.nope(r):t.yep(r)});os.modify(wd());os.use(xd());os.set(Md());Od.exports=os});var bi=w((LR,Uo)=>{process.env.NODE_ENV==="production"?Uo.exports=Ic():Uo.exports=Ad()});var Dd=w((jR,kd)=>{"use strict";var zo=require("fs"),{StringDecoder:N1}=require("string_decoder"),{Stream:F1}=ir();function I1(){}kd.exports=(t,e)=>{let r=Buffer.alloc(65536),i=new N1("utf8"),n=new F1,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")},zo.open(t.file,"a+","0644",(l,u)=>{if(l){e?e(l):n.emit("error",l),n.destroy();return}(function c(){if(n.destroyed){zo.close(u,I1);return}return zo.read(u,r,0,r.length,a,(h,d)=>{if(h){e?e(h):n.emit("error",h),n.destroy();return}if(!d)return s&&((t.start==null||o>t.start)&&(e?e(null,s):n.emit("line",s)),o++,s=""),setTimeout(c,1e3);let f=i.write(r.slice(0,d));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+=d,c()})})()}),e?n.destroy:n}});var Ld=w((FR,qd)=>{"use strict";var ke=require("fs"),se=require("path"),Pd=Nh(),$1=require("zlib"),{MESSAGE:W1}=re(),{Stream:B1,PassThrough:Cd}=ir(),U1=vr(),Ve=bi()("winston:file"),z1=require("os"),H1=Dd();qd.exports=class extends U1{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 Cd,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?se.basename(e.filename):"winston.log",this.dirname=e.dirname||se.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=se.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:z1.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[W1]}${this.eol}`,n=Buffer.byteLength(i);function s(){if(this._size+=n,this._pendingSize-=n,Ve("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()})),Ve("written",a,this._drain),this.finishIfEnding(),a}query(e,r){typeof e=="function"&&(r=e,e={}),e=h(e);let i=se.join(this.dirname,this.filename),n="",s=[],a=0,o=ke.createReadStream(i,{encoding:"utf8"});o.on("error",d=>{if(o.readable&&o.destroy(),!!r)return d.code!=="ENOENT"?r(d):r(null,s)}),o.on("data",d=>{d=(n+d).split(/\n+/);let f=d.length-1,y=0;for(;y<f;y++)(!e.start||a>=e.start)&&l(d[y]),a++;n=d[f]}),o.on("close",()=>{n&&l(n,!0),e.order==="desc"&&(s=s.reverse()),r&&r(null,s)});function l(d,f){try{let y=JSON.parse(d);c(y)&&u(y)}catch(y){f||o.emit("error",y)}}function u(d){if(e.rows&&s.length>=e.rows&&e.order!=="desc"){o.readable&&o.destroy();return}e.fields&&(d=e.fields.reduce((f,y)=>(f[y]=d[y],f),{})),e.order==="desc"&&s.length>=e.rows&&s.shift(),s.push(d)}function c(d){if(!d||typeof d!="object")return;let f=new Date(d.timestamp);if(!(e.from&&f<e.from||e.until&&f>e.until||e.level&&e.level!==d.level))return!0}function h(d){return d=d||{},d.rows=d.rows||d.limit||10,d.start=d.start||0,d.until=d.until||new Date,typeof d.until!="object"&&(d.until=new Date(d.until)),d.from=d.from||d.until-24*60*60*1e3,typeof d.from!="object"&&(d.from=new Date(d.from)),d.order=d.order||"desc",d}}stream(e={}){let r=se.join(this.dirname,this.filename),i=new B1,n={file:r,start:e.start};return i.destroy=H1(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);Ve("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.emit("rotate")||(this._rotate=!1)})})))}stat(e){let r=this._getFile(),i=se.join(this.dirname,r);ke.stat(i,(n,s)=>{if(n&&n.code==="ENOENT")return Ve("ENOENT\xA0ok",i),this.filename=r,e(null,0);if(n)return Ve(`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=se.join(this.dirname,this.filename);Ve("create stream start",r,this.options);let i=ke.createWriteStream(r,this.options).on("error",n=>Ve(n)).on("close",()=>Ve("close",i.path,i.bytesWritten)).on("open",()=>{Ve("file open ok",r),this.emit("open",r),e.pipe(i),this.rotatedWhileOpening&&(this._stream=new Cd,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(i),e.end())});return Ve("create stream ok",r),i}_incFile(e){Ve("_incFile",this.filename);let r=se.extname(this._basename),i=se.basename(this._basename,r),n=[];this.zippedArchive&&n.push(function(s){let a=this._created>0&&!this.tailable?this._created:"";this._compressFile(se.join(this.dirname,`${i}${a}${r}`),se.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)),Pd(n,e)}_getFile(){let e=se.extname(this._basename),r=se.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=se.join(this.dirname,o);ke.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}`,c=se.join(this.dirname,u);ke.exists(c,h=>{if(!h)return l(null);u=`${r}${o}${e}${s}`,ke.rename(c,se.join(this.dirname,u),l)})}.bind(this,a));Pd(n,()=>{ke.rename(se.join(this.dirname,`${r}${e}${s}`),se.join(this.dirname,`${r}1${e}${s}`),i)})}_compressFile(e,r,i){ke.access(e,ke.F_OK,n=>{if(n)return i();var s=$1.createGzip(),a=ke.createReadStream(e),o=ke.createWriteStream(r);o.on("finish",()=>{ke.unlink(e,i)}),a.pipe(s).pipe(o)})}_createLogDirIfNotExist(e){ke.existsSync(e)||ke.mkdirSync(e,{recursive:!0})}}});var Nd=w(($R,jd)=>{"use strict";var G1=require("http"),Y1=require("https"),{Stream:V1}=ir(),K1=vr(),{configure:J1}=Gr();jd.exports=class extends K1{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 V1;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(c){r.emit("error",c)}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?Y1: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=J1({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});a.end(Buffer.from(o(e,this.options.replacer),"utf8"))}}});var Ho=w((WR,Fd)=>{"use strict";var it=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";it.writable=t=>it(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";it.readable=t=>it(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";it.duplex=t=>it.writable(t)&&it.readable(t);it.transform=t=>it.duplex(t)&&typeof t._transform=="function";Fd.exports=it});var $d=w((UR,Id)=>{"use strict";var Z1=Ho(),{MESSAGE:Q1}=re(),X1=require("os"),e_=vr();Id.exports=class extends e_{constructor(e={}){if(super(e),!e.stream||!Z1(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:X1.EOL}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.isObjectMode){this._stream.write(e),r&&r();return}this._stream.write(`${e[Q1]}${this.eol}`),r&&r()}}});var Wd=w(wi=>{"use strict";Object.defineProperty(wi,"Console",{configurable:!0,enumerable:!0,get(){return th()}});Object.defineProperty(wi,"File",{configurable:!0,enumerable:!0,get(){return Ld()}});Object.defineProperty(wi,"Http",{configurable:!0,enumerable:!0,get(){return Nd()}});Object.defineProperty(wi,"Stream",{configurable:!0,enumerable:!0,get(){return $d()}})});var us=w(vi=>{"use strict";var ls=ba(),{configs:Go}=re();vi.cli=ls.levels(Go.cli);vi.npm=ls.levels(Go.npm);vi.syslog=ls.levels(Go.syslog);vi.addColors=ls.levels});var Ud=w((fs,Bd)=>{"use strict";Object.defineProperty(fs,"__esModule",{value:!0});var t_=Tn(),r_=sr(t_),i_=jn(),n_=sr(i_),s_=io(),a_=sr(s_),o_=eo(),l_=sr(o_),u_=to(),f_=sr(u_),h_=Qt(),c_=sr(h_),d_=Sr(),p_=sr(d_);function sr(t){return t&&t.__esModule?t:{default:t}}function g_(t,e,r){r=(0,l_.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===n_.default)&&r(null))}for(;i<s;i++)e(t[i],i,(0,f_.default)(o))}function m_(t,e,r){return(0,a_.default)(t,1/0,e,r)}function y_(t,e,r){var i=(0,r_.default)(t)?g_:m_;return i(t,(0,c_.default)(e),r)}fs.default=(0,p_.default)(y_,3);Bd.exports=fs.default});var Hd=w((hs,zd)=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});hs.default=b_;function b_(t){return(e,r,i)=>t(e,i)}zd.exports=hs.default});var ps=w((ds,Gd)=>{"use strict";Object.defineProperty(ds,"__esModule",{value:!0});var w_=Ud(),v_=cs(w_),__=Hd(),S_=cs(__),E_=Qt(),R_=cs(E_),x_=Sr(),T_=cs(x_);function cs(t){return t&&t.__esModule?t:{default:t}}function M_(t,e,r){return(0,v_.default)(t,(0,S_.default)((0,R_.default)(e)),r)}ds.default=(0,T_.default)(M_,3);Gd.exports=ds.default});var Vd=w((GR,Yd)=>{"use strict";var O_=Object.prototype.toString;Yd.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=O_.call(e).slice(8,-1);return i==="Function"?r=r.substring(r.indexOf("(")+1,r.indexOf(")")):r=i,r||"anonymous"}});var Yo=w((YR,Kd)=>{"use strict";var A_=Vd();Kd.exports=function(e){var r=0,i;function n(){return r||(r=1,i=e.apply(this,arguments),e=null),i}return n.displayName=A_(e),n}});var Vo=w(Si=>{Si.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||Si.get);var n=r.stack;return Error.prepareStackTrace=i,Error.stackTraceLimit=e,n};Si.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,c=n[5]==="native";if(n[1]){o=n[1];var h=o.lastIndexOf(".");if(o[h-1]=="."&&h--,h>0){s=o.substr(0,h),a=o.substr(h+1);var d=s.indexOf(".Module");d>0&&(o=o.substr(d+1),s=s.substr(0,d))}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:c};return e._createParsedCallSite(f)}}).filter(function(i){return!!i})};function _i(t){for(var e in t)this[e]=t[e]}var k_=["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"],D_=["topLevel","eval","native","constructor"];k_.forEach(function(t){_i.prototype[t]=null,_i.prototype["get"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]}});D_.forEach(function(t){_i.prototype[t]=!1,_i.prototype["is"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]}});Si._createParsedCallSite=function(t){return new _i(t)}});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=el(this.levels,e);if(r===null)return!1;let i=el(this.levels,this.level);return i===null?!1:!this.transports||this.transports.length===0?i>=r:this.transports.findIndex(s=>{let a=el(this.levels,s.level);return a===null&&(a=i),a>=r})!==-1}log(e,r,...i){if(arguments.length===1)return e[nt]=e.level,this._addDefaultMeta(e),this.write(e),this;if(arguments.length===2)return r&&typeof r=="object"?(r[nt]=r.level=e,this._addDefaultMeta(r),this.write(r),this):(r={[nt]: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(V_))){let a=Object.assign({},this.defaultMeta,n,{[nt]:e,[
|
|
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 el(t,e){let r=t[e];return!r&&r!==0?null:r}Object.defineProperty(ms.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});hp.exports=ms});var tl=w((sx,cp)=>{"use strict";var{LEVEL:K_}=re(),J_=us(),Z_=gs(),Q_=bi()("winston:create-logger");function X_(t){return"is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}cp.exports=function(t={}){t.levels=t.levels||J_.npm.levels;class e extends Z_{constructor(n){super(n)}}let r=new e(t);return Object.keys(t.levels).forEach(function(i){if(Q_('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[K_]=i,s._addDefaultMeta(o),s.write(o),this||r}return n.length===0?(s.log(i,""),s):s.log(i,...n)},e.prototype[X_(i)]=function(){return(this||r).isLevelEnabled(i)}}),r}});var pp=w((ox,dp)=>{"use strict";var eS=tl();dp.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=eS(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 mp=w(H=>{"use strict";var gp=ba(),{warn:Ei}=wa();H.version=Qu().version;H.transports=Wd();H.config=us();H.addColors=gp.levels;H.format=gp.format;H.createLogger=tl();H.Logger=gs();H.ExceptionHandler=Jo();H.RejectionHandler=Qo();H.Container=pp();H.Transport=vr();H.loggers=new H.Container;var st=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)=>st[t](...e));Object.defineProperty(H,"level",{get(){return st.level},set(t){st.level=t}});Object.defineProperty(H,"exceptions",{get(){return st.exceptions}});Object.defineProperty(H,"rejections",{get(){return st.rejections}});["exitOnError"].forEach(t=>{Object.defineProperty(H,t,{get(){return st[t]},set(e){st[t]=e}})});Object.defineProperty(H,"default",{get(){return{exceptionHandlers:st.exceptionHandlers,rejectionHandlers:st.rejectionHandlers,transports:st.transports}}});Ei.deprecated(H,"setLevels");Ei.forFunctions(H,"useFormat",["cli"]);Ei.forProperties(H,"useFormat",["padLevels","stripColors"]);Ei.forFunctions(H,"deprecated",["addRewriter","addFilter","clone","extend"]);Ei.forProperties(H,"deprecated",["emitErrs","levelLength"])});var ws=w((bs,wp)=>{(function(t,e){typeof bs=="object"&&typeof wp<"u"?e(bs):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.Superstruct={}))})(bs,function(t){"use strict";class e extends TypeError{constructor(g,m){let v,{message:T,explanation:P,...$}=g,{path:J}=g,Z=J.length===0?T:`At path: ${J.join(".")} -- ${T}`;super(P??Z),P!=null&&(this.cause=Z),Object.assign(this,$),this.name=this.constructor.name,this.failures=()=>v??(v=[g,...m()])}}function r(p){return i(p)&&typeof p[Symbol.iterator]=="function"}function i(p){return typeof p=="object"&&p!=null}function n(p){return i(p)&&!Array.isArray(p)}function s(p){if(Object.prototype.toString.call(p)!=="[object Object]")return!1;let g=Object.getPrototypeOf(p);return g===null||g===Object.prototype}function a(p){return typeof p=="symbol"?p.toString():typeof p=="string"?JSON.stringify(p):`${p}`}function o(p){let{done:g,value:m}=p.next();return g?void 0:m}function l(p,g,m,v){if(p===!0)return;p===!1?p={}:typeof p=="string"&&(p={message:p});let{path:T,branch:P}=g,{type:$}=m,{refinement:J,message:Z=`Expected a value of type \`${$}\`${J?` with refinement \`${J}\``:""}, but received: \`${a(v)}\``}=p;return{value:v,type:$,refinement:J,key:T[T.length-1],path:T,branch:P,...p,message:Z}}function*u(p,g,m,v){r(p)||(p=[p]);for(let T of p){let P=l(T,g,m,v);P&&(yield P)}}function*c(p,g,m={}){let{path:v=[],branch:T=[p],coerce:P=!1,mask:$=!1}=m,J={path:v,branch:T,mask:$};P&&(p=g.coercer(p,J));let Z="valid";for(let ie of g.validator(p,J))ie.explanation=m.message,Z="not_valid",yield[ie,void 0];for(let[ie,Fe,Wg]of g.entries(p,J)){let Bg=c(Fe,Wg,{path:ie===void 0?v:[...v,ie],branch:ie===void 0?T:[...T,Fe],coerce:P,mask:$,message:m.message});for(let Qi of Bg)Qi[0]?(Z=Qi[0].refinement!=null?"not_refined":"not_valid",yield[Qi[0],void 0]):P&&(Fe=Qi[1],ie===void 0?p=Fe:p instanceof Map?p.set(ie,Fe):p instanceof Set?p.add(Fe):i(p)&&(Fe!==void 0||ie in p)&&(p[ie]=Fe))}if(Z!=="not_valid")for(let ie of g.refiner(p,J))ie.explanation=m.message,Z="not_refined",yield[ie,void 0];Z==="valid"&&(yield[void 0,p])}class h{constructor(g){let{type:m,schema:v,validator:T,refiner:P,coercer:$=Z=>Z,entries:J=function*(){}}=g;this.type=m,this.schema=v,this.entries=J,this.coercer=$,T?this.validator=(Z,ie)=>{let Fe=T(Z,ie);return u(Fe,ie,this,Z)}:this.validator=()=>[],P?this.refiner=(Z,ie)=>{let Fe=P(Z,ie);return u(Fe,ie,this,Z)}:this.refiner=()=>[]}assert(g,m){return d(g,this,m)}create(g,m){return f(g,this,m)}is(g){return b(g,this)}mask(g,m){return y(g,this,m)}validate(g,m={}){return _(g,this,m)}}function d(p,g,m){let v=_(p,g,{message:m});if(v[0])throw v[0]}function f(p,g,m){let v=_(p,g,{coerce:!0,message:m});if(v[0])throw v[0];return v[1]}function y(p,g,m){let v=_(p,g,{coerce:!0,mask:!0,message:m});if(v[0])throw v[0];return v[1]}function b(p,g){return!_(p,g)[0]}function _(p,g,m={}){let v=c(p,g,m),T=o(v);return T[0]?[new e(T[0],function*(){for(let $ of v)$[0]&&(yield $[0])}),void 0]:[void 0,T[1]]}function E(...p){let g=p[0].type==="type",m=p.map(T=>T.schema),v=Object.assign({},...m);return g?vt(v):wt(v)}function R(p,g){return new h({type:p,schema:null,validator:g})}function x(p,g){return new h({...p,refiner:(m,v)=>m===void 0||p.refiner(m,v),validator(m,v){return m===void 0?!0:(g(m,v),p.validator(m,v))}})}function M(p){return new h({type:"dynamic",schema:null,*entries(g,m){yield*p(g,m).entries(g,m)},validator(g,m){return p(g,m).validator(g,m)},coercer(g,m){return p(g,m).coercer(g,m)},refiner(g,m){return p(g,m).refiner(g,m)}})}function k(p){let g;return new h({type:"lazy",schema:null,*entries(m,v){g??(g=p()),yield*g.entries(m,v)},validator(m,v){return g??(g=p()),g.validator(m,v)},coercer(m,v){return g??(g=p()),g.coercer(m,v)},refiner(m,v){return g??(g=p()),g.refiner(m,v)}})}function C(p,g){let{schema:m}=p,v={...m};for(let T of g)delete v[T];switch(p.type){case"type":return vt(v);default:return wt(v)}}function F(p){let g=p instanceof h,m=g?{...p.schema}:{...p};for(let v in m)m[v]=$t(m[v]);return g&&p.type==="type"?vt(m):wt(m)}function q(p,g){let{schema:m}=p,v={};for(let T of g)v[T]=m[T];switch(p.type){case"type":return vt(v);default:return wt(v)}}function U(p,g){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),R(p,g)}function te(){return R("any",()=>!0)}function K(p){return new h({type:"array",schema:p,*entries(g){if(p&&Array.isArray(g))for(let[m,v]of g.entries())yield[m,v,p]},coercer(g){return Array.isArray(g)?g.slice():g},validator(g){return Array.isArray(g)||`Expected an array value, but received: ${a(g)}`}})}function Se(){return R("bigint",p=>typeof p=="bigint")}function Ee(){return R("boolean",p=>typeof p=="boolean")}function ft(){return R("date",p=>p instanceof Date&&!isNaN(p.getTime())||`Expected a valid \`Date\` object, but received: ${a(p)}`)}function Ys(p){let g={},m=p.map(v=>a(v)).join();for(let v of p)g[v]=v;return new h({type:"enums",schema:g,validator(v){return p.includes(v)||`Expected one of \`${m}\`, but received: ${a(v)}`}})}function S(){return R("func",p=>typeof p=="function"||`Expected a function, but received: ${a(p)}`)}function O(p){return R("instance",g=>g instanceof p||`Expected a \`${p.name}\` instance, but received: ${a(g)}`)}function z(){return R("integer",p=>typeof p=="number"&&!isNaN(p)&&Number.isInteger(p)||`Expected an integer, but received: ${a(p)}`)}function ye(p){return new h({type:"intersection",schema:null,*entries(g,m){for(let v of p)yield*v.entries(g,m)},*validator(g,m){for(let v of p)yield*v.validator(g,m)},*refiner(g,m){for(let v of p)yield*v.refiner(g,m)}})}function D(p){let g=a(p),m=typeof p;return new h({type:"literal",schema:m==="string"||m==="number"||m==="boolean"?p:null,validator(v){return v===p||`Expected the literal \`${g}\`, but received: ${a(v)}`}})}function Ne(p,g){return new h({type:"map",schema:null,*entries(m){if(p&&g&&m instanceof Map)for(let[v,T]of m.entries())yield[v,v,p],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: ${a(m)}`}})}function He(){return R("never",()=>!1)}function It(p){return new h({...p,validator:(g,m)=>g===null||p.validator(g,m),refiner:(g,m)=>g===null||p.refiner(g,m)})}function ur(){return R("number",p=>typeof p=="number"&&!isNaN(p)||`Expected a number, but received: ${a(p)}`)}function wt(p){let g=p?Object.keys(p):[],m=He();return new h({type:"object",schema:p||null,*entries(v){if(p&&i(v)){let T=new Set(Object.keys(v));for(let P of g)T.delete(P),yield[P,v[P],p[P]];for(let P of T)yield[P,v[P],m]}},validator(v){return n(v)||`Expected an object, but received: ${a(v)}`},coercer(v,T){if(!n(v))return v;let P={...v};if(T.mask&&p)for(let $ in P)p[$]===void 0&&delete P[$];return P}})}function $t(p){return new h({...p,validator:(g,m)=>g===void 0||p.validator(g,m),refiner:(g,m)=>g===void 0||p.refiner(g,m)})}function Vs(p,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,p],yield[v,T,g]}},validator(m){return n(m)||`Expected an object, but received: ${a(m)}`},coercer(m){return n(m)?{...m}:m}})}function De(){return R("regexp",p=>p instanceof RegExp)}function Yi(p){return new h({type:"set",schema:null,*entries(g){if(p&&g instanceof Set)for(let m of g)yield[m,m,p]},coercer(g){return g instanceof Set?new Set(g):g},validator(g){return g instanceof Set||`Expected a \`Set\` object, but received: ${a(g)}`}})}function Vi(){return R("string",p=>typeof p=="string"||`Expected a string, but received: ${a(p)}`)}function Ki(p){let g=He();return new h({type:"tuple",schema:null,*entries(m){if(Array.isArray(m)){let v=Math.max(p.length,m.length);for(let T=0;T<v;T++)yield[T,m[T],p[T]||g]}},validator(m){return Array.isArray(m)||`Expected an array, but received: ${a(m)}`},coercer(m){return Array.isArray(m)?m.slice():m}})}function vt(p){let g=Object.keys(p);return new h({type:"type",schema:p,*entries(m){if(i(m))for(let v of g)yield[v,m[v],p[v]]},validator(m){return n(m)||`Expected an object, but received: ${a(m)}`},coercer(m){return n(m)?{...m}:m}})}function fr(p){let g=p.map(m=>m.type).join(" | ");return new h({type:"union",schema:null,coercer(m,v){for(let T of p){let[P,$]=T.validate(m,{coerce:!0,mask:v.mask});if(!P)return $}return m},validator(m,v){let T=[];for(let P of p){let[...$]=c(m,P,v),[J]=$;if(J[0])for(let[Z]of $)Z&&T.push(Z);else return[]}return[`Expected the value to satisfy a union of \`${g}\`, but received: ${a(m)}`,...T]}})}function Wt(){return R("unknown",()=>!0)}function Ur(p,g,m){return new h({...p,coercer:(v,T)=>b(v,g)?p.coercer(m(v,T),T):p.coercer(v,T)})}function Bt(p,g,m={}){return Ur(p,Wt(),v=>{let T=typeof g=="function"?g():g;if(v===void 0)return T;if(!m.strict&&s(v)&&s(T)){let P={...v},$=!1;for(let J in T)P[J]===void 0&&(P[J]=T[J],$=!0);if($)return P}return v})}function _t(p){return Ur(p,Vi(),g=>g.trim())}function zr(p){return Ut(p,"empty",g=>{let m=Ji(g);return m===0||`Expected an empty ${p.type} but received one with a size of \`${m}\``})}function Ji(p){return p instanceof Map||p instanceof Set?p.size:p.length}function Zi(p,g,m={}){let{exclusive:v}=m;return Ut(p,"max",T=>v?T<g:T<=g||`Expected a ${p.type} less than ${v?"":"or equal to "}${g} but received \`${T}\``)}function Ng(p,g,m={}){let{exclusive:v}=m;return Ut(p,"min",T=>v?T>g:T>=g||`Expected a ${p.type} greater than ${v?"":"or equal to "}${g} but received \`${T}\``)}function Fg(p){return Ut(p,"nonempty",g=>Ji(g)>0||`Expected a nonempty ${p.type} but received an empty one`)}function Ig(p,g){return Ut(p,"pattern",m=>g.test(m)||`Expected a ${p.type} matching \`/${g.source}/\` but received "${m}"`)}function $g(p,g,m=g){let v=`Expected a ${p.type}`,T=g===m?`of \`${g}\``:`between \`${g}\` and \`${m}\``;return Ut(p,"size",P=>{if(typeof P=="number"||P instanceof Date)return g<=P&&P<=m||`${v} ${T} but received \`${P}\``;if(P instanceof Map||P instanceof Set){let{size:$}=P;return g<=$&&$<=m||`${v} with a size ${T} but received one with a size of \`${$}\``}else{let{length:$}=P;return g<=$&&$<=m||`${v} with a length ${T} but received one with a length of \`${$}\``}})}function Ut(p,g,m){return new h({...p,*refiner(v,T){yield*p.refiner(v,T);let P=m(v,T),$=u(P,T,p,v);for(let J of $)yield{...J,refinement:g}}})}t.Struct=h,t.StructError=e,t.any=te,t.array=K,t.assert=d,t.assign=E,t.bigint=Se,t.boolean=Ee,t.coerce=Ur,t.create=f,t.date=ft,t.defaulted=Bt,t.define=R,t.deprecated=x,t.dynamic=M,t.empty=zr,t.enums=Ys,t.func=S,t.instance=O,t.integer=z,t.intersection=ye,t.is=b,t.lazy=k,t.literal=D,t.map=Ne,t.mask=y,t.max=Zi,t.min=Ng,t.never=He,t.nonempty=Fg,t.nullable=It,t.number=ur,t.object=wt,t.omit=C,t.optional=$t,t.partial=F,t.pattern=Ig,t.pick=q,t.record=Vs,t.refine=Ut,t.regexp=De,t.set=Yi,t.size=$g,t.string=Vi,t.struct=U,t.trimmed=_t,t.tuple=Ki,t.type=vt,t.union=fr,t.unknown=Wt,t.validate=_})});var Pp=w((xx,Dp)=>{"use strict";Dp.exports=Ap;function Ap(t,e,r){t instanceof RegExp&&(t=Op(t,r)),e instanceof RegExp&&(e=Op(e,r));var i=kp(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 Op(t,e){var r=e.match(t);return r?r[0]:null}Ap.range=kp;function kp(t,e,r){var i,n,s,a,o,l=r.indexOf(t),u=r.indexOf(e,l+1),c=l;if(l>=0&&u>0){if(t===e)return[l,u];for(i=[],s=r.length;c>=0&&!o;)c==l?(i.push(c),l=r.indexOf(t,c+1)):i.length==1?o=[i.pop(),u]:(n=i.pop(),n<s&&(s=n,a=u),u=r.indexOf(e,c+1)),c=l<u&&l>=0?l:u;i.length&&(o=[s,a])}return o}});var $p=w((Tx,Ip)=>{var Cp=Pp();Ip.exports=pS;var qp="\0SLASH"+Math.random()+"\0",Lp="\0OPEN"+Math.random()+"\0",il="\0CLOSE"+Math.random()+"\0",jp="\0COMMA"+Math.random()+"\0",Np="\0PERIOD"+Math.random()+"\0";function rl(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function cS(t){return t.split("\\\\").join(qp).split("\\{").join(Lp).split("\\}").join(il).split("\\,").join(jp).split("\\.").join(Np)}function dS(t){return t.split(qp).join("\\").split(Lp).join("{").split(il).join("}").split(jp).join(",").split(Np).join(".")}function Fp(t){if(!t)return[""];var e=[],r=Cp("{","}",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=Fp(s);return s.length&&(a[a.length-1]+=o.shift(),a.push.apply(a,o)),e.push.apply(e,a),e}function pS(t){return t?(t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),xi(cS(t),!0).map(dS)):[]}function gS(t){return"{"+t+"}"}function mS(t){return/^-?0\d/.test(t)}function yS(t,e){return t<=e}function bS(t,e){return t>=e}function xi(t,e){var r=[],i=Cp("{","}",t);if(!i)return[t];var n=i.pre,s=i.post.length?xi(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),c=l||u,h=i.body.indexOf(",")>=0;if(!c&&!h)return i.post.match(/,.*\}/)?(t=i.pre+"{"+i.body+il+i.post,xi(t)):[t];var d;if(c)d=i.body.split(/\.\./);else if(d=Fp(i.body),d.length===1&&(d=xi(d[0],!1).map(gS),d.length===1))return s.map(function(te){return i.pre+d[0]+te});var f;if(c){var y=rl(d[0]),b=rl(d[1]),_=Math.max(d[0].length,d[1].length),E=d.length==3?Math.abs(rl(d[2])):1,R=yS,x=b<y;x&&(E*=-1,R=bS);var M=d.some(mS);f=[];for(var k=y;R(k,b);k+=E){var C;if(u)C=String.fromCharCode(k),C==="\\"&&(C="");else if(C=String(k),M){var F=_-C.length;if(F>0){var q=new Array(F+1).join("0");k<0?C="-"+q+C.slice(1):C=q+C}}f.push(C)}}else{f=[];for(var U=0;U<d.length;U++)f.push.apply(f,xi(d[U],!1))}for(var U=0;U<f.length;U++)for(var a=0;a<s.length;a++){var o=n+f[U]+s[a];(!e||c||o)&&r.push(o)}}return r}});var Cg=be(require("yargs")),qg=require("yargs/helpers"),me=be(require("node:path")),bt=be(require("node:fs/promises")),Ol=be(require("fs-extra")),Gi=require("pyodide");var yp=be(require("node:path")),bp=be(require("node:fs/promises"));var qt=be(mp()),I=qt.createLogger({transports:[new qt.transports.Console({format:qt.format.combine(qt.format.splat(),qt.format.cli())})]});function Ri(t){process.emitWarning(t,{type:"DeprecationWarning"})}var ys=class{sourceUrl;isRemote;_data=null;constructor(e){e.startsWith("file://")&&(e=e.slice(7)),this.sourceUrl=e,this.isRemote=e.includes("://")}async readJson(e){let r=yp.default.join(this.sourceUrl,e);if(this.isRemote){I.debug(`Fetching ${r}`);let i=await fetch(r);if(!i.ok)throw new Error(`Failed to download ${r}: ${i.status} ${i.statusText}`);return await i.json()}else{I.debug(`Reading ${r}`);let i=await bp.default.readFile(r);return JSON.parse(i.toString())}}async loadPrebuiltPackageData(){if(this._data!=null)return this._data;I.info("Load pyodide-lock.json");let e=await this.readJson("pyodide-lock.json");return this._data=e.packages,e.packages}async getPackageInfoByName(e){let r=await this.loadPrebuiltPackageData(),i=Object.values(r).find(n=>n.name===e);if(i==null)throw new Error(`Package ${e} is not found in the lock file.`);return i}};var _p=be(require("node:fs/promises")),Sp=be(ws());var Q=be(ws()),vp=Q.object({entrypoint:Q.string(),embed:Q.defaulted(Q.boolean(),!1),idbfsMountpoints:Q.optional(Q.array(Q.string())),nodeJsWorker:Q.defaulted(Q.boolean(),!1),nodefsMountpoints:Q.optional(Q.record(Q.string(),Q.string()))});function tS(t){let e=Sp.mask(t??{},vp);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 Ep(t){let e=tS({...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 _p.default.writeFile(t.manifestFilePath,r,{encoding:"utf-8"})}var Rp=be(require("node:path")),pe=be(ws());async function xp(t){let{files:e,entrypoint:r}=rS(t),i=await iS(t),n=await nS(t);return{files:e,entrypoint:r,dependencies:i,requirementsTxtFilePaths:n}}function rS(t){let{packageJsonStliteDesktopField:e,fallbacks:{appHomeDirSource:r}}=t,i=e?.files,n=e?.entrypoint;if(i==null||n==null){Ri("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&&Ri("The `appHomeDirSource` argument is deprecated and has been ignored because `stlite.desktop.files` is specified in `package.json`.");return pe.assert(n,pe.string(),"The `stlite.desktop.entrypoint` field must be a string."),pe.assert(i,pe.array(pe.string()),"The `stlite.desktop.files` field must be an array of strings."),{files:i,entrypoint:n}}async function iS(t){let{packageJsonStliteDesktopField:e,fallbacks:{packages:r}}=t,i=e?.dependencies;pe.assert(i,pe.optional(pe.array(pe.string())),"The `stlite.desktop.dependencies` field must be an array of strings.");let n=[];return r!=null&&(Ri("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 nS(t){let{pathResolutionRoot:e,packageJsonStliteDesktopField:r,fallbacks:{requirementsTxtFilePaths:i}}=t,n=r?.requirementsTxtFiles;pe.assert(n,pe.optional(pe.array(pe.string())),"The `stlite.desktop.requirementsTxtFiles` field must be an array of strings.");let s=n?.map(o=>Rp.default.resolve(e,o)),a=[];return i!=null&&i.length>0&&(Ri("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 sS="[",aS="(<=>!~",oS=";",lS="@",uS=new RegExp(`[${sS+aS+oS+lS}]`);function fS(t){return t.split(uS)[0].trim()}function Tp(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=>fS(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)}var hS=/\s#.*$/;function Mp(t){return t.split(`
|
|
33
|
-
`).filter(e=>!e.startsWith("#")).map(e=>e.replace(hS,"")).map(e=>e.trim()).filter(e=>e!=="")}var Vp=be($p(),1);var Ti=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")};var wS={"[: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]},Mi=t=>t.replace(/[[\]\\-]/g,"\\$&"),vS=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Wp=t=>t.join(""),Bp=(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,c=r,h="";e:for(;s<t.length;){let b=t.charAt(s);if((b==="!"||b==="^")&&s===r+1){u=!0,s++;continue}if(b==="]"&&a&&!l){c=s+1;break}if(a=!0,b==="\\"&&!l){l=!0,s++;continue}if(b==="["&&!l){for(let[_,[E,R,x]]of Object.entries(wS))if(t.startsWith(_,s)){if(h)return["$.",!1,t.length-r,!0];s+=_.length,x?n.push(E):i.push(E),o=o||R;continue e}}if(l=!1,h){b>h?i.push(Mi(h)+"-"+Mi(b)):b===h&&i.push(Mi(b)),h="",s++;continue}if(t.startsWith("-]",s+1)){i.push(Mi(b+"-")),s+=2;continue}if(t.startsWith("-",s+1)){h=b,s+=2;continue}i.push(Mi(b)),s++}if(c<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[vS(b),!1,c-r,!1]}let d="["+(u?"^":"")+Wp(i)+"]",f="["+(u?"":"^")+Wp(n)+"]";return[i.length&&n.length?"("+d+"|"+f+")":i.length?d:f,o,c-r,!0]};var Ke=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var _S=new Set(["!","?","+","*","@"]),Up=t=>_S.has(t),SS="(?!(?:^|/)\\.\\.?(?:$|/))",vs="(?!\\.)",ES=new Set(["[","."]),RS=new Set(["..","."]),xS=new Set("().*{}+?[]^$\\!"),TS=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),nl="[^/]",zp=nl+"*?",Hp=nl+"+?",Ar=class t{type;#e;#t;#s=!1;#i=[];#a;#v;#u;#h=!1;#o;#l;#n=!1;constructor(e,r,i={}){this.type=e,e&&(this.#t=!0),this.#a=r,this.#e=this.#a?this.#a.#e:this,this.#o=this.#e===this?i:this.#e.#o,this.#u=this.#e===this?[]:this.#e.#u,e==="!"&&!this.#e.#h&&this.#u.push(this),this.#v=this.#a?this.#a.#i.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#i)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#l!==void 0?this.#l:this.type?this.#l=this.type+"("+this.#i.map(e=>String(e)).join("|")+")":this.#l=this.#i.map(e=>String(e)).join("")}#m(){if(this!==this.#e)throw new Error("should only call on root");if(this.#h)return this;this.toString(),this.#h=!0;let e;for(;e=this.#u.pop();){if(e.type!=="!")continue;let r=e,i=r.#a;for(;i;){for(let n=r.#v+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.#a}}return this}push(...e){for(let r of e)if(r!==""){if(typeof r!="string"&&!(r instanceof t&&r.#a===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.#h&&this.#a?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#a?.isStart())return!1;if(this.#v===0)return!0;let e=this.#a;for(let r=0;r<this.#v;r++){let i=e.#i[r];if(!(i instanceof t&&i.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#a?.type==="!")return!0;if(!this.#a?.isEnd())return!1;if(!this.type)return this.#a?.isEnd();let e=this.#a?this.#a.#i.length:0;return this.#v===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#y(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&&Up(b)&&e.charAt(f)==="("){r.push(y),y="";let _=new t(b,r);f=t.#y(e,_,f,n),r.push(_);continue}y+=b}return r.push(y),f}let u=i+1,c=new t(null,r),h=[],d="";for(;u<e.length;){let f=e.charAt(u++);if(s||f==="\\"){s=!s,d+=f;continue}if(a){u===o+1?(f==="^"||f==="!")&&(l=!0):f==="]"&&!(u===o+2&&l)&&(a=!1),d+=f;continue}else if(f==="["){a=!0,o=u,l=!1,d+=f;continue}if(Up(f)&&e.charAt(u)==="("){c.push(d),d="";let y=new t(f,c);c.push(y),u=t.#y(e,y,u,n);continue}if(f==="|"){c.push(d),d="",h.push(c),c=new t(null,r);continue}if(f===")")return d===""&&r.#i.length===0&&(r.#n=!0),c.push(d),d="",r.push(...h,c),u;d+=f}return r.type=null,r.#t=void 0,r.#i=[e.substring(i-1)],u}static fromGlob(e,r={}){let i=new t(null,void 0,r);return t.#y(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.#t||this.#o.nocase&&!this.#o.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return i;let o=(this.#o.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${r}$`,o),{_src:r,_glob:e})}get options(){return this.#o}toRegExpSource(e){let r=e??!!this.#o.dot;if(this.#e===this&&this.#m(),!this.type){let l=this.isStart()&&this.isEnd(),u=this.#i.map(f=>{let[y,b,_,E]=typeof f=="string"?t.#c(f,this.#t,l):f.toRegExpSource(e);return this.#t=this.#t||_,this.#s=this.#s||E,y}).join(""),c="";if(this.isStart()&&typeof this.#i[0]=="string"&&!(this.#i.length===1&&RS.has(this.#i[0]))){let y=ES,b=r&&y.has(u.charAt(0))||u.startsWith("\\.")&&y.has(u.charAt(2))||u.startsWith("\\.\\.")&&y.has(u.charAt(4)),_=!r&&!e&&y.has(u.charAt(0));c=b?SS:_?vs:""}let h="";return this.isEnd()&&this.#e.#h&&this.#a?.type==="!"&&(h="(?:$|\\/)"),[c+u+h,Ke(u),this.#t=!!this.#t,this.#s]}let i=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#d(r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let l=this.toString();return this.#i=[l],this.type=null,this.#t=void 0,[l,Ke(this.toString()),!1,!1]}let a=!i||e||r||!vs?"":this.#d(!0);a===s&&(a=""),a&&(s=`(?:${s})(?:${a})*?`);let o="";if(this.type==="!"&&this.#n)o=(this.isStart()&&!r?vs:"")+Hp;else{let l=this.type==="!"?"))"+(this.isStart()&&!r&&!e?vs:"")+zp+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;o=n+s+l}return[o,Ke(s),this.#t=!!this.#t,this.#s]}#d(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#c(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+=(xS.has(l)?"\\":"")+l;continue}if(l==="\\"){o===e.length-1?s+="\\\\":n=!0;continue}if(l==="["){let[u,c,h,d]=Bp(e,o);if(h){s+=u,a=a||c,o+=h-1,r=r||d;continue}}if(l==="*"){i&&e==="*"?s+=Hp:s+=zp,r=!0;continue}if(l==="?"){s+=nl,r=!0;continue}s+=TS(l)}return[s,Ke(e),!!r,a]}};var kr=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");var Te=(t,e,r={})=>(Ti(e),!r.nocomment&&e.charAt(0)==="#"?!1:new qe(e,r).match(t)),MS=/^\*+([^+@!?\*\[\(]*)$/,OS=t=>e=>!e.startsWith(".")&&e.endsWith(t),AS=t=>e=>e.endsWith(t),kS=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),DS=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),PS=/^\*+\.\*+$/,CS=t=>!t.startsWith(".")&&t.includes("."),qS=t=>t!=="."&&t!==".."&&t.includes("."),LS=/^\.\*+$/,jS=t=>t!=="."&&t!==".."&&t.startsWith("."),NS=/^\*+$/,FS=t=>t.length!==0&&!t.startsWith("."),IS=t=>t.length!==0&&t!=="."&&t!=="..",$S=/^\?+([^+@!?\*\[\(]*)?$/,WS=([t,e=""])=>{let r=Kp([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},BS=([t,e=""])=>{let r=Jp([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},US=([t,e=""])=>{let r=Jp([t]);return e?i=>r(i)&&i.endsWith(e):r},zS=([t,e=""])=>{let r=Kp([t]);return e?i=>r(i)&&i.endsWith(e):r},Kp=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},Jp=([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},Zp=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Gp={win32:{sep:"\\"},posix:{sep:"/"}},HS=Zp==="win32"?Gp.win32.sep:Gp.posix.sep;Te.sep=HS;var ge=Symbol("globstar **");Te.GLOBSTAR=ge;var GS="[^/]",YS=GS+"*?",VS="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",KS="(?:(?!(?:\\/|^)\\.).)*?",JS=(t,e={})=>r=>Te(r,t,e);Te.filter=JS;var Be=(t,e={})=>Object.assign({},t,e),ZS=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return Te;let e=Te;return Object.assign((i,n,s={})=>e(i,n,Be(t,s)),{Minimatch:class extends e.Minimatch{constructor(n,s={}){super(n,Be(t,s))}static defaults(n){return e.defaults(Be(t,n)).Minimatch}},AST:class extends e.AST{constructor(n,s,a={}){super(n,s,Be(t,a))}static fromGlob(n,s={}){return e.AST.fromGlob(n,Be(t,s))}},unescape:(i,n={})=>e.unescape(i,Be(t,n)),escape:(i,n={})=>e.escape(i,Be(t,n)),filter:(i,n={})=>e.filter(i,Be(t,n)),defaults:i=>e.defaults(Be(t,i)),makeRe:(i,n={})=>e.makeRe(i,Be(t,n)),braceExpand:(i,n={})=>e.braceExpand(i,Be(t,n)),match:(i,n,s={})=>e.match(i,n,Be(t,s)),sep:e.sep,GLOBSTAR:ge})};Te.defaults=ZS;var Qp=(t,e={})=>(Ti(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,Vp.default)(t));Te.braceExpand=Qp;var QS=(t,e={})=>new qe(t,e).makeRe();Te.makeRe=QS;var XS=(t,e,r={})=>{let i=new qe(e,r);return t=t.filter(n=>i.match(n)),i.options.nonull&&!t.length&&t.push(e),t};Te.match=XS;var Yp=/[?*]|[+@!]\(.*?\)|\[|\]/,eE=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),qe=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,r={}){Ti(e),r=r||{},this.options=r,this.pattern=e,this.platform=r.platform||Zp,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]==="?"||!Yp.test(s[2]))&&!Yp.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map(c=>this.parse(c))];if(u)return[s[0],...s.slice(1).map(c=>this.parse(c))]}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 c=i.slice(0);c[n]="**",e.push(c),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);if(n){e[r]=[],e[i]=n;break}}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]),_=!b&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),E=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),R=!E&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),x=_?3:b?0:void 0,M=R?3:E?0:void 0;if(typeof x=="number"&&typeof M=="number"){let[k,C]=[e[x],r[M]];k.toLowerCase()===C.toLowerCase()&&(r[M]=k,M>x?r=r.slice(M):x>M&&(e=e.slice(x)))}}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 c=r[o],h=e[a];if(this.debug(r,c,h),c===!1)return!1;if(c===ge){this.debug("GLOBSTAR",[r,c,h]);var d=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(;d<l;){var y=e[d];if(this.debug(`
|
|
25
|
+
${E}`),y.pop(),`{${k}}`}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 c(d,f,y){switch(typeof f){case"string":return St(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(d),typeof f!="object")return c(d,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 M=Math.min(f.length,a),k=0;for(;k<M-1;k++){let F=c(String(k),f[k],y);b+=F!==void 0?F:"null",b+=","}let C=c(String(k),f[k],y);if(b+=C!==void 0?C:"null",f.length-1>a){let F=f.length-a-1;b+=`,"... ${Ht(F)} not stringified"`}return y.pop(),`[${b}]`}let _=Object.keys(f),E=_.length;if(E===0)return"{}";if(s<y.length+1)return'"[Object]"';let R="",x=Math.min(E,a);fa(f)&&(b+=_u(f,",",a),_=_.slice(f.length),x-=f.length,R=","),n&&(_=ua(_)),y.push(f);for(let M=0;M<x;M++){let k=_[M],C=c(k,f[k],y);C!==void 0&&(b+=`${R}${St(k)}:${C}`,R=",")}if(E>a){let M=E-a;b+=`${R}"...":"${Ht(M)} 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 h(d,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("",{"":d},[],f,b,"");if(Array.isArray(f))return l("",d,[],vm(f),b,"")}if(b.length!==0)return u("",d,[],b,"")}return c("",d,[])}return h}});var da=w((m2,xu)=>{"use strict";var Sm=Ae(),{MESSAGE:Em}=re(),Rm=Gr();function xm(t,e){return typeof e=="bigint"?e.toString():e}xu.exports=Sm((t,e)=>{let r=Rm.configure(e);return t[Em]=r(t,e.replacer||xm,e.space),t})});var Mu=w((y2,Tu)=>{"use strict";var Tm=Ae();Tu.exports=Tm((t,e)=>e.message?(t.message=`[${e.label}] ${t.message}`,t):(t.label=e.label,t))});var Au=w((b2,Ou)=>{"use strict";var Mm=Ae(),{MESSAGE:Om}=re(),Am=Gr();Ou.exports=Mm(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[Om]=Am(e),t})});var Du=w((w2,ku)=>{"use strict";var km=Ae();function Dm(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 Pm(t,e,r){return t[r]=e.reduce((i,n)=>(i[n]=t[n],delete t[n],i),{}),t}ku.exports=km((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?Dm(t,i,r):e.fillWith?Pm(t,e.fillWith,r):t})});var Cu=w((v2,Pu)=>{var cr=1e3,dr=cr*60,pr=dr*60,Yt=pr*24,Cm=Yt*7,qm=Yt*365.25;Pu.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return Lm(t);if(r==="number"&&isFinite(t))return e.long?Nm(t):jm(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Lm(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*qm;case"weeks":case"week":case"w":return r*Cm;case"days":case"day":case"d":return r*Yt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*pr;case"minutes":case"minute":case"mins":case"min":case"m":return r*dr;case"seconds":case"second":case"secs":case"sec":case"s":return r*cr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function jm(t){var e=Math.abs(t);return e>=Yt?Math.round(t/Yt)+"d":e>=pr?Math.round(t/pr)+"h":e>=dr?Math.round(t/dr)+"m":e>=cr?Math.round(t/cr)+"s":t+"ms"}function Nm(t){var e=Math.abs(t);return e>=Yt?ln(t,e,Yt,"day"):e>=pr?ln(t,e,pr,"hour"):e>=dr?ln(t,e,dr,"minute"):e>=cr?ln(t,e,cr,"second"):t+" ms"}function ln(t,e,r,i){var n=e>=r*1.5;return Math.round(t/r)+" "+i+(n?"s":"")}});var Lu=w((Yr,qu)=>{"use strict";var Fm=Ae(),Im=Cu();qu.exports=Fm(t=>{let e=+new Date;return Yr.diff=e-(Yr.prevTime||e),Yr.prevTime=e,t.ms=`+${Im(Yr.diff)}`,t})});var Fu=w((_2,Nu)=>{"use strict";var $m=require("util").inspect,Wm=Ae(),{LEVEL:Bm,MESSAGE:ju,SPLAT:Um}=re();Nu.exports=Wm((t,e={})=>{let r=Object.assign({},t);return delete r[Bm],delete r[ju],delete r[Um],t[ju]=$m(r,!1,e.depth||null,e.colorize),t})});var Iu=w((S2,fn)=>{"use strict";var{MESSAGE:zm}=re(),un=class{constructor(e){this.template=e}transform(e){return e[zm]=this.template(e),e}};fn.exports=t=>new un(t);fn.exports.Printf=fn.exports.Format=un});var Bu=w((E2,Wu)=>{"use strict";var Hm=Ae(),{MESSAGE:$u}=re(),Gm=Gr();Wu.exports=Hm(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[$u]=`${t.level}:${r} ${t.message} ${e}`:t[$u]=`${t.level}:${r} ${t.message}`,t})});var Hu=w((R2,zu)=>{"use strict";var Ym=require("util"),{SPLAT:Uu}=re(),Vm=/%[scdjifoO%]/g,Km=/%%/g,pa=class{constructor(e){this.options=e}_splat(e,r){let i=e.message,n=e[Uu]||e.splat||[],s=i.match(Km),a=s&&s.length||0,l=r.length-a-n.length,u=l<0?n.splice(l,-1*l):[],c=u.length;if(c)for(let h=0;h<c;h++)Object.assign(e,u[h]);return e.message=Ym.format(i,...n),e}transform(e){let r=e.message,i=e[Uu]||e.splat;if(!i||!i.length)return e;let n=r&&r.match&&r.match(Vm);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}};zu.exports=t=>new pa(t)});var Yu=w((hn,Gu)=>{(function(t,e){typeof hn=="object"&&typeof Gu<"u"?e(hn):typeof define=="function"&&define.amd?define(["exports"],e):e(t.fecha={})})(hn,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(S,O){for(var z=[],ye=0,D=S.length;ye<D;ye++)z.push(S[ye].substr(0,O));return z}var u=function(S){return function(O,z){var ye=z[S].map(function(Ne){return Ne.toLowerCase()}),D=ye.indexOf(O.toLowerCase());return D>-1?D:null}};function c(S){for(var O=[],z=1;z<arguments.length;z++)O[z-1]=arguments[z];for(var ye=0,D=O;ye<D.length;ye++){var Ne=D[ye];for(var He in Ne)S[He]=Ne[He]}return S}var h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"],f=l(d,3),y=l(h,3),b={dayNamesShort:y,dayNames:h,monthNamesShort:f,monthNames:d,amPm:["am","pm"],DoFn:function(S){return S+["th","st","nd","rd"][S%10>3?0:(S-S%10!==10?1:0)*S%10]}},_=c({},b),E=function(S){return _=c(_,S)},R=function(S){return S.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},x=function(S,O){for(O===void 0&&(O=2),S=String(S);S.length<O;)S="0"+S;return S},M={D:function(S){return String(S.getDate())},DD:function(S){return x(S.getDate())},Do:function(S,O){return O.DoFn(S.getDate())},d:function(S){return String(S.getDay())},dd:function(S){return x(S.getDay())},ddd:function(S,O){return O.dayNamesShort[S.getDay()]},dddd:function(S,O){return O.dayNames[S.getDay()]},M:function(S){return String(S.getMonth()+1)},MM:function(S){return x(S.getMonth()+1)},MMM:function(S,O){return O.monthNamesShort[S.getMonth()]},MMMM:function(S,O){return O.monthNames[S.getMonth()]},YY:function(S){return x(String(S.getFullYear()),4).substr(2)},YYYY:function(S){return x(S.getFullYear(),4)},h:function(S){return String(S.getHours()%12||12)},hh:function(S){return x(S.getHours()%12||12)},H:function(S){return String(S.getHours())},HH:function(S){return x(S.getHours())},m:function(S){return String(S.getMinutes())},mm:function(S){return x(S.getMinutes())},s:function(S){return String(S.getSeconds())},ss:function(S){return x(S.getSeconds())},S:function(S){return String(Math.round(S.getMilliseconds()/100))},SS:function(S){return x(Math.round(S.getMilliseconds()/10),2)},SSS:function(S){return x(S.getMilliseconds(),3)},a:function(S,O){return S.getHours()<12?O.amPm[0]:O.amPm[1]},A:function(S,O){return S.getHours()<12?O.amPm[0].toUpperCase():O.amPm[1].toUpperCase()},ZZ:function(S){var O=S.getTimezoneOffset();return(O>0?"-":"+")+x(Math.floor(Math.abs(O)/60)*100+Math.abs(O)%60,4)},Z:function(S){var O=S.getTimezoneOffset();return(O>0?"-":"+")+x(Math.floor(Math.abs(O)/60),2)+":"+x(Math.abs(O)%60,2)}},k=function(S){return+S-1},C=[null,r],F=[null,a],q=["isPm",a,function(S,O){var z=S.toLowerCase();return z===O.amPm[0]?0:z===O.amPm[1]?1:null}],U=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(S){var O=(S+"").match(/([+-]|\d\d)/gi);if(O){var z=+O[1]*60+parseInt(O[2],10);return O[0]==="+"?z:-z}return 0}],te={D:["day",r],DD:["day",i],Do:["day",r+a,function(S){return parseInt(S,10)}],M:["month",r,k],MM:["month",i,k],YY:["year",i,function(S){var O=new Date,z=+(""+O.getFullYear()).substr(0,2);return+(""+(+S>68?z-1:z)+S)}],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(S){return+S*100}],SS:["millisecond",i,function(S){return+S*10}],SSS:["millisecond",n],d:C,dd:C,ddd:F,dddd:F,MMM:["month",a,u("monthNamesShort")],MMMM:["month",a,u("monthNames")],a:q,A:q,ZZ:U,Z:U},K={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"},Se=function(S){return c(K,S)},Ee=function(S,O,z){if(O===void 0&&(O=K.default),z===void 0&&(z={}),typeof S=="number"&&(S=new Date(S)),Object.prototype.toString.call(S)!=="[object Date]"||isNaN(S.getTime()))throw new Error("Invalid Date pass to format");O=K[O]||O;var ye=[];O=O.replace(o,function(Ne,He){return ye.push(He),"@@@"});var D=c(c({},_),z);return O=O.replace(e,function(Ne){return M[Ne](S,D)}),O.replace(/@@@/g,function(){return ye.shift()})};function ft(S,O,z){if(z===void 0&&(z={}),typeof O!="string")throw new Error("Invalid format in fecha parse");if(O=K[O]||O,S.length>1e3)return null;var ye=new Date,D={year:ye.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},Ne=[],He=[],It=O.replace(o,function(Bt,_t){return He.push(R(_t)),"@@@"}),ur={},wt={};It=R(It).replace(e,function(Bt){var _t=te[Bt],zr=_t[0],Ji=_t[1],Zi=_t[3];if(ur[zr])throw new Error("Invalid format. "+zr+" specified twice in format");return ur[zr]=!0,Zi&&(wt[Zi]=!0),Ne.push(_t),"("+Ji+")"}),Object.keys(wt).forEach(function(Bt){if(!ur[Bt])throw new Error("Invalid format. "+Bt+" is required in specified format")}),It=It.replace(/@@@/g,function(){return He.shift()});var $t=S.match(new RegExp(It,"i"));if(!$t)return null;for(var Vs=c(c({},_),z),De=1;De<$t.length;De++){var Yi=Ne[De-1],Vi=Yi[0],Ki=Yi[2],vt=Ki?Ki($t[De],Vs):+$t[De];if(vt==null)return null;D[Vi]=vt}D.isPm===1&&D.hour!=null&&+D.hour!=12?D.hour=+D.hour+12:D.isPm===0&&+D.hour==12&&(D.hour=0);var fr;if(D.timezoneOffset==null){fr=new Date(D.year,D.month,D.day,D.hour,D.minute,D.second,D.millisecond);for(var Wt=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],De=0,Ur=Wt.length;De<Ur;De++)if(ur[Wt[De][0]]&&D[Wt[De][0]]!==fr[Wt[De][1]]())return null}else if(fr=new Date(Date.UTC(D.year,D.month,D.day,D.hour,D.minute-D.timezoneOffset,D.second,D.millisecond)),D.month>11||D.month<0||D.day>31||D.day<1||D.hour>23||D.hour<0||D.minute>59||D.minute<0||D.second>59||D.second<0)return null;return fr}var Ys={format:Ee,parse:ft,defaultI18n:b,setGlobalDateI18n:E,setGlobalDateMasks:Se};t.assign=c,t.default=Ys,t.format=Ee,t.parse=ft,t.defaultI18n=b,t.setGlobalDateI18n=E,t.setGlobalDateMasks=Se,Object.defineProperty(t,"__esModule",{value:!0})})});var Ku=w((x2,Vu)=>{"use strict";var Jm=Yu(),Zm=Ae();Vu.exports=Zm((t,e={})=>(e.format&&(t.timestamp=typeof e.format=="function"?e.format():Jm.format(new Date,e.format)),t.timestamp||(t.timestamp=new Date().toISOString()),e.alias&&(t[e.alias]=t.timestamp),t))});var Zu=w((T2,Ju)=>{"use strict";var ga=Zs(),Qm=Ae(),{MESSAGE:ma}=re();Ju.exports=Qm((t,e)=>(e.level!==!1&&(t.level=ga.strip(t.level)),e.message!==!1&&(t.message=ga.strip(String(t.message))),e.raw!==!1&&t[ma]&&(t[ma]=ga.strip(String(t[ma]))),t))});var ba=w(ya=>{"use strict";var Xm=ya.format=Ae();ya.levels=hu();function ce(t,e){Object.defineProperty(Xm,t,{get(){return e()},configurable:!0})}ce("align",function(){return du()});ce("errors",function(){return mu()});ce("cli",function(){return bu()});ce("combine",function(){return vu()});ce("colorize",function(){return rn()});ce("json",function(){return da()});ce("label",function(){return Mu()});ce("logstash",function(){return Au()});ce("metadata",function(){return Du()});ce("ms",function(){return Lu()});ce("padLevels",function(){return aa()});ce("prettyPrint",function(){return Fu()});ce("printf",function(){return Iu()});ce("simple",function(){return Bu()});ce("splat",function(){return Hu()});ce("timestamp",function(){return Ku()});ce("uncolorize",function(){return Zu()})});var wa=w(cn=>{"use strict";var{format:Qu}=require("util");cn.warn={deprecated(t){return()=>{throw new Error(Qu("{ %s } was removed in winston@3.0.0.",t))}},useFormat(t){return()=>{throw new Error([Qu("{ %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]=cn.warn[e](i)})},forProperties(t,e,r){r.forEach(i=>{let n=cn.warn[e](i);Object.defineProperty(t,i,{get:n,set:n})})}}});var Xu=w((A2,ey)=>{ey.exports={name:"winston",description:"A logger for just about everything.",version:"3.17.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.7.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.9.0"},devDependencies:{"@babel/cli":"^7.23.9","@babel/core":"^7.24.0","@babel/preset-env":"^7.24.0","@dabh/eslint-config-populist":"^4.4.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:"^17.1.0",rimraf:"5.0.1",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 va=w((k2,ef)=>{ef.exports=require("util").deprecate});var _a=w((D2,tf)=>{tf.exports=require("stream")});var Ea=w((P2,nf)=>{"use strict";function ty(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(Sa,this,t)):process.nextTick(Sa,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(dn,r):(r._writableState.errorEmitted=!0,process.nextTick(rf,r,s)):process.nextTick(rf,r,s):e?(process.nextTick(dn,r),e(s)):process.nextTick(dn,r)}),this)}function rf(t,e){Sa(t,e),dn(t)}function dn(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function ry(){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 Sa(t,e){t.emit("error",e)}function iy(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}nf.exports={destroy:ty,undestroy:ry,errorOrDestroy:iy}});var gr=w((C2,of)=>{"use strict";var af={};function Ie(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,af[t]=n}function sf(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 ny(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function sy(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function ay(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}Ie("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);Ie("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&ny(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(sy(t," argument"))n=`The ${t} ${i} ${sf(e,"type")}`;else{let s=ay(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${sf(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);Ie("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Ie("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});Ie("ERR_STREAM_PREMATURE_CLOSE","Premature close");Ie("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});Ie("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Ie("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Ie("ERR_STREAM_WRITE_AFTER_END","write after end");Ie("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Ie("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);Ie("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");of.exports.codes=af});var Ra=w((q2,lf)=>{"use strict";var oy=gr().codes.ERR_INVALID_OPT_VALUE;function ly(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function uy(t,e,r,i){var n=ly(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new oy(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}lf.exports={getHighWaterMark:uy}});var uf=w((L2,xa)=>{typeof Object.create=="function"?xa.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:xa.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 ht=w((j2,Ma)=>{try{if(Ta=require("util"),typeof Ta.inherits!="function")throw"";Ma.exports=Ta.inherits}catch{Ma.exports=uf()}var Ta});var gf=w((N2,pf)=>{"use strict";function ff(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 hf(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ff(Object(r),!0).forEach(function(i){fy(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ff(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function fy(t,e,r){return e=df(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cf(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,df(i.key),i)}}function cy(t,e,r){return e&&cf(t.prototype,e),r&&cf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function df(t){var e=dy(t,"string");return typeof e=="symbol"?e:String(e)}function dy(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 py=require("buffer"),pn=py.Buffer,gy=require("util"),Oa=gy.inspect,my=Oa&&Oa.custom||"inspect";function yy(t,e,r){pn.prototype.copy.call(t,e,r)}pf.exports=function(){function t(){hy(this,t),this.head=null,this.tail=null,this.length=0}return cy(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 pn.alloc(0);for(var i=pn.allocUnsafe(r>>>0),n=this.head,s=0;n;)yy(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=pn.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:my,value:function(r,i){return Oa(this,hf(hf({},i),{},{depth:0,customInspect:!1}))}}]),t}()});var ka=w((Aa,yf)=>{var gn=require("buffer"),et=gn.Buffer;function mf(t,e){for(var r in t)e[r]=t[r]}et.from&&et.alloc&&et.allocUnsafe&&et.allocUnsafeSlow?yf.exports=gn:(mf(gn,Aa),Aa.Buffer=Vt);function Vt(t,e,r){return et(t,e,r)}Vt.prototype=Object.create(et.prototype);mf(et,Vt);Vt.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return et(t,e,r)};Vt.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=et(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};Vt.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return et(t)};Vt.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return gn.SlowBuffer(t)}});var Ca=w(wf=>{"use strict";var Pa=ka().Buffer,bf=Pa.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 by(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 wy(t){var e=by(t);if(typeof e!="string"&&(Pa.isEncoding===bf||!bf(t)))throw new Error("Unknown encoding: "+t);return e||t}wf.StringDecoder=Vr;function Vr(t){this.encoding=wy(t);var e;switch(this.encoding){case"utf16le":this.text=xy,this.end=Ty,e=4;break;case"utf8":this.fillLast=Sy,e=4;break;case"base64":this.text=My,this.end=Oy,e=3;break;default:this.write=Ay,this.end=ky;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Pa.allocUnsafe(e)}Vr.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||""};Vr.prototype.end=Ry;Vr.prototype.text=Ey;Vr.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 Da(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function vy(t,e,r){var i=e.length-1;if(i<r)return 0;var n=Da(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=Da(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=Da(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function _y(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 Sy(t){var e=this.lastTotal-this.lastNeed,r=_y(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 Ey(t,e){var r=vy(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 Ry(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function xy(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 Ty(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 My(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 Oy(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Ay(t){return t.toString(this.encoding)}function ky(t){return t&&t.length?this.write(t):""}});var Ef=w((I2,Sf)=>{"use strict";var vf=gr().codes.ERR_STREAM_PREMATURE_CLOSE;function Dy(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 Py(){}function Cy(t){return t.setHeader&&typeof t.abort=="function"}function _f(t,e,r){if(typeof e=="function")return _f(t,null,e);e||(e={}),r=Dy(r||Py);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)},c=function(y){r.call(t,y)},h=function(){var y;if(i&&!l)return(!t._readableState||!t._readableState.ended)&&(y=new vf),r.call(t,y);if(n&&!a)return(!t._writableState||!t._writableState.ended)&&(y=new vf),r.call(t,y)},d=function(){t.req.on("finish",o)};return Cy(t)?(t.on("complete",o),t.on("abort",h),t.req?d():t.on("request",d)):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",c),t.on("close",h),function(){t.removeListener("complete",o),t.removeListener("abort",h),t.removeListener("request",d),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",c),t.removeListener("close",h)}}Sf.exports=_f});var xf=w(($2,Rf)=>{"use strict";var mn;function Et(t,e,r){return e=qy(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qy(t){var e=Ly(t,"string");return typeof e=="symbol"?e:String(e)}function Ly(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 jy=Ef(),Rt=Symbol("lastResolve"),Kt=Symbol("lastReject"),Kr=Symbol("error"),yn=Symbol("ended"),Jt=Symbol("lastPromise"),qa=Symbol("handlePromise"),Zt=Symbol("stream");function xt(t,e){return{value:t,done:e}}function Ny(t){var e=t[Rt];if(e!==null){var r=t[Zt].read();r!==null&&(t[Jt]=null,t[Rt]=null,t[Kt]=null,e(xt(r,!1)))}}function Fy(t){process.nextTick(Ny,t)}function Iy(t,e){return function(r,i){t.then(function(){if(e[yn]){r(xt(void 0,!0));return}e[qa](r,i)},i)}}var $y=Object.getPrototypeOf(function(){}),Wy=Object.setPrototypeOf((mn={get stream(){return this[Zt]},next:function(){var e=this,r=this[Kr];if(r!==null)return Promise.reject(r);if(this[yn])return Promise.resolve(xt(void 0,!0));if(this[Zt].destroyed)return new Promise(function(a,o){process.nextTick(function(){e[Kr]?o(e[Kr]):a(xt(void 0,!0))})});var i=this[Jt],n;if(i)n=new Promise(Iy(i,this));else{var s=this[Zt].read();if(s!==null)return Promise.resolve(xt(s,!1));n=new Promise(this[qa])}return this[Jt]=n,n}},Et(mn,Symbol.asyncIterator,function(){return this}),Et(mn,"return",function(){var e=this;return new Promise(function(r,i){e[Zt].destroy(null,function(n){if(n){i(n);return}r(xt(void 0,!0))})})}),mn),$y),By=function(e){var r,i=Object.create(Wy,(r={},Et(r,Zt,{value:e,writable:!0}),Et(r,Rt,{value:null,writable:!0}),Et(r,Kt,{value:null,writable:!0}),Et(r,Kr,{value:null,writable:!0}),Et(r,yn,{value:e._readableState.endEmitted,writable:!0}),Et(r,qa,{value:function(s,a){var o=i[Zt].read();o?(i[Jt]=null,i[Rt]=null,i[Kt]=null,s(xt(o,!1))):(i[Rt]=s,i[Kt]=a)},writable:!0}),r));return i[Jt]=null,jy(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[Kt];s!==null&&(i[Jt]=null,i[Rt]=null,i[Kt]=null,s(n)),i[Kr]=n;return}var a=i[Rt];a!==null&&(i[Jt]=null,i[Rt]=null,i[Kt]=null,a(xt(void 0,!0))),i[yn]=!0}),e.on("readable",Fy.bind(null,i)),i};Rf.exports=By});var Af=w((W2,Of)=>{"use strict";function Tf(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 Uy(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function a(l){Tf(s,i,n,a,o,"next",l)}function o(l){Tf(s,i,n,a,o,"throw",l)}a(void 0)})}}function Mf(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 zy(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Mf(Object(r),!0).forEach(function(i){Hy(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Mf(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Hy(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=Yy(t,"string");return typeof e=="symbol"?e:String(e)}function Yy(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 Vy=gr().codes.ERR_INVALID_ARG_TYPE;function Ky(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 Vy("iterable",["Iterable"],e);var n=new t(zy({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,a())};function a(){return o.apply(this,arguments)}function o(){return o=Uy(function*(){try{var l=yield i.next(),u=l.value,c=l.done;c?n.push(null):n.push(yield u)?a():s=!1}catch(h){n.destroy(h)}}),o.apply(this,arguments)}return n}Of.exports=Ky});var $f=w((U2,If)=>{"use strict";If.exports=W;var mr;W.ReadableState=Cf;var B2=require("events").EventEmitter,Pf=function(e,r){return e.listeners(r).length},Zr=_a(),bn=require("buffer").Buffer,Jy=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Zy(t){return bn.from(t)}function Qy(t){return bn.isBuffer(t)||t instanceof Jy}var La=require("util"),L;La&&La.debuglog?L=La.debuglog("stream"):L=function(){};var Xy=gf(),Ba=Ea(),e0=Ra(),t0=e0.getHighWaterMark,wn=gr().codes,r0=wn.ERR_INVALID_ARG_TYPE,i0=wn.ERR_STREAM_PUSH_AFTER_EOF,n0=wn.ERR_METHOD_NOT_IMPLEMENTED,s0=wn.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,yr,ja,Na;ht()(W,Zr);var Jr=Ba.errorOrDestroy,Fa=["error","close","destroy","pause","resume"];function a0(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 Cf(t,e,r){mr=mr||Qr(),t=t||{},typeof r!="boolean"&&(r=e instanceof mr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=t0(this,t,"readableHighWaterMark",r),this.buffer=new Xy,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&&(yr||(yr=Ca().StringDecoder),this.decoder=new yr(t.encoding),this.encoding=t.encoding)}function W(t){if(mr=mr||Qr(),!(this instanceof W))return new W(t);var e=this instanceof mr;this._readableState=new Cf(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Zr.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=Ba.destroy;W.prototype._undestroy=Ba.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=bn.from(t,e),e=""),i=!0),qf(this,t,e,!1,i)};W.prototype.unshift=function(t){return qf(this,t,null,!0,!1)};function qf(t,e,r,i,n){L("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,u0(t,s);else{var a;if(n||(a=o0(s,e)),a)Jr(t,a);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==bn.prototype&&(e=Zy(e)),i)s.endEmitted?Jr(t,new s0):Ia(t,s,e,!0);else if(s.ended)Jr(t,new i0);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?Ia(t,s,e,!1):Wa(t,s)):Ia(t,s,e,!1)}else i||(s.reading=!1,Wa(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function Ia(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&&vn(t)),Wa(t,e)}function o0(t,e){var r;return!Qy(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new r0("chunk",["string","Buffer","Uint8Array"],e)),r}W.prototype.isPaused=function(){return this._readableState.flowing===!1};W.prototype.setEncoding=function(t){yr||(yr=Ca().StringDecoder);var e=new yr(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 kf=1073741824;function l0(t){return t>=kf?t=kf:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Df(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=l0(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?$a(this):vn(this),null;if(t=Df(t,e),t===0&&e.ended)return e.length===0&&$a(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=Df(r,e)));var n;return t>0?n=Nf(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&&$a(this)),n!==null&&this.emit("data",n),n};function u0(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?vn(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Lf(t)))}}function vn(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(Lf,t))}function Lf(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,Ua(t)}function Wa(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(f0,t,e))}function f0(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){Jr(this,new n0("_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(_,E){L("onunpipe"),_===r&&E&&E.hasUnpiped===!1&&(E.hasUnpiped=!0,c())}function o(){L("onend"),t.end()}var l=h0(r);t.on("drain",l);var u=!1;function c(){L("cleanup"),t.removeListener("close",f),t.removeListener("finish",y),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",b),r.removeListener("data",h),u=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}r.on("data",h);function h(_){L("ondata");var E=t.write(_);L("dest.write",E),E===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&Ff(i.pipes,t)!==-1)&&!u&&(L("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(_){L("onerror",_),b(),t.removeListener("error",d),Pf(t,"error")===0&&Jr(t,_)}a0(t,"error",d);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 h0(t){return function(){var r=t._readableState;L("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Pf(t,"data")&&(r.flowing=!0,Ua(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=Ff(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=Zr.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?vn(this):i.reading||process.nextTick(c0,this)),r};W.prototype.addListener=W.prototype.on;W.prototype.removeListener=function(t,e){var r=Zr.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(jf,this),r};W.prototype.removeAllListeners=function(t){var e=Zr.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(jf,this),e};function jf(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 c0(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,d0(this,t)),t.paused=!1,this};function d0(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(p0,t,e))}function p0(t,e){L("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),Ua(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 Ua(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<Fa.length;s++)t.on(Fa[s],this.emit.bind(this,Fa[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 ja===void 0&&(ja=xf()),ja(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=Nf;Object.defineProperty(W.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Nf(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 $a(t){var e=t._readableState;L("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(g0,e,t))}function g0(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 Na===void 0&&(Na=Af()),Na(W,t,e)});function Ff(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Qr=w((z2,Bf)=>{"use strict";var m0=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};Bf.exports=tt;var Wf=$f(),Ha=Ga();ht()(tt,Wf);for(za=m0(Ha.prototype),_n=0;_n<za.length;_n++)Sn=za[_n],tt.prototype[Sn]||(tt.prototype[Sn]=Ha.prototype[Sn]);var za,Sn,_n;function tt(t){if(!(this instanceof tt))return new tt(t);Wf.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",y0)))}Object.defineProperty(tt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(tt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(tt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function y0(){this._writableState.ended||process.nextTick(b0,this)}function b0(t){t.end()}Object.defineProperty(tt.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 Ga=w((H2,Vf)=>{"use strict";Vf.exports=G;function zf(t){var e=this;this.next=null,this.entry=null,this.finish=function(){H0(e,t)}}var br;G.WritableState=ei;var w0={deprecate:va()},Hf=_a(),Rn=require("buffer").Buffer,v0=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function _0(t){return Rn.from(t)}function S0(t){return Rn.isBuffer(t)||t instanceof v0}var Va=Ea(),E0=Ra(),R0=E0.getHighWaterMark,Tt=gr().codes,x0=Tt.ERR_INVALID_ARG_TYPE,T0=Tt.ERR_METHOD_NOT_IMPLEMENTED,M0=Tt.ERR_MULTIPLE_CALLBACK,O0=Tt.ERR_STREAM_CANNOT_PIPE,A0=Tt.ERR_STREAM_DESTROYED,k0=Tt.ERR_STREAM_NULL_VALUES,D0=Tt.ERR_STREAM_WRITE_AFTER_END,P0=Tt.ERR_UNKNOWN_ENCODING,wr=Va.errorOrDestroy;ht()(G,Hf);function C0(){}function ei(t,e,r){br=br||Qr(),t=t||{},typeof r!="boolean"&&(r=e instanceof br),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=R0(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){$0(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 zf(this)}ei.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(ei.prototype,"buffer",{get:w0.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(G,Symbol.hasInstance,{value:function(e){return En.call(this,e)?!0:this!==G?!1:e&&e._writableState instanceof ei}})):En=function(e){return e instanceof this};function G(t){br=br||Qr();var e=this instanceof br;if(!e&&!En.call(G,this))return new G(t);this._writableState=new ei(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)),Hf.call(this)}G.prototype.pipe=function(){wr(this,new O0)};function q0(t,e){var r=new D0;wr(t,r),process.nextTick(e,r)}function L0(t,e,r,i){var n;return r===null?n=new k0:typeof r!="string"&&!e.objectMode&&(n=new x0("chunk",["string","Buffer"],r)),n?(wr(t,n),process.nextTick(i,n),!1):!0}G.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&S0(t);return s&&!Rn.isBuffer(t)&&(t=_0(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=C0),i.ending?q0(this,r):(s||L0(this,i,t,r))&&(i.pendingcb++,n=N0(this,i,s,t,e,r)),n};G.prototype.cork=function(){this._writableState.corked++};G.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Gf(this,t))};G.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 P0(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(G.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function j0(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Rn.from(e,r)),e}Object.defineProperty(G.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function N0(t,e,r,i,n,s){if(!r){var a=j0(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 Ya(t,e,!1,o,i,n,s);return l}function Ya(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new A0("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function F0(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(Xr,t,e),t._writableState.errorEmitted=!0,wr(t,i)):(n(i),t._writableState.errorEmitted=!0,wr(t,i),Xr(t,e))}function I0(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function $0(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new M0;if(I0(r),e)F0(t,r,i,e,n);else{var s=Yf(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Gf(t,r),i?process.nextTick(Uf,t,r,s,n):Uf(t,r,s,n)}}function Uf(t,e,r,i){r||W0(t,e),e.pendingcb--,i(),Xr(t,e)}function W0(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function Gf(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,Ya(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 zf(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,h=e.objectMode?1:l.length;if(Ya(t,e,!1,h,l,u,c),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}G.prototype._write=function(t,e,r){r(new T0("_write()"))};G.prototype._writev=null;G.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||z0(this,i,r),this};Object.defineProperty(G.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Yf(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function B0(t,e){t._final(function(r){e.pendingcb--,r&&wr(t,r),e.prefinished=!0,t.emit("prefinish"),Xr(t,e)})}function U0(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(B0,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Xr(t,e){var r=Yf(e);if(r&&(U0(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 z0(t,e,r){e.ending=!0,Xr(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function H0(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(G.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});G.prototype.destroy=Va.destroy;G.prototype._undestroy=Va.undestroy;G.prototype._destroy=function(t,e){e(t)}});var Ka=w((G2,Zf)=>{"use strict";var G0=require("util"),Kf=Ga(),{LEVEL:Jf}=re(),ti=Zf.exports=function(e={}){Kf.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(ti,Kf);ti.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[Jf]]){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)};ti.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)};ti.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[Jf]])&&(this.handleExceptions||r.exception!==!0))};ti.prototype._nop=function(){}});var Za=w((Y2,Xf)=>{"use strict";var Y0=require("util"),{LEVEL:Ja}=re(),Qf=Ka(),ri=Xf.exports=function(e={}){if(Qf.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))};Y0.inherits(ri,Qf);ri.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[Ja]])&&this.transport.log(e[Ja],e.message,e,this._nop),i(null)};ri.prototype._writev=function(e,r){for(let i=0;i<e.length;i++)this._accept(e[i])&&(this.transport.log(e[i].chunk[Ja],e[i].chunk.message,e[i].chunk,this._nop),e[i].callback());return r(null)};ri.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
|
+
`))};ri.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}});var vr=w((V2,Qa)=>{"use strict";Qa.exports=Ka();Qa.exports.LegacyTransportStream=Za()});var rh=w((J2,th)=>{"use strict";var V0=require("os"),{LEVEL:eh,MESSAGE:_r}=re(),K0=vr();th.exports=class extends K0{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:V0.EOL,this.forceConsole=e.forceConsole||!1,this._consoleLog=console.log.bind(console),this._consoleWarn=console.warn.bind(console),this._consoleError=console.error.bind(console),this.setMaxListeners(30)}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.stderrLevels[e[eh]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[_r]}${this.eol}`):this._consoleError(e[_r]),r&&r();return}else if(this.consoleWarnLevels[e[eh]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[_r]}${this.eol}`):this._consoleWarn(e[_r]),r&&r();return}console._stdout&&!this.forceConsole?console._stdout.write(`${e[_r]}${this.eol}`):this._consoleLog(e[_r]),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 Tn=w((xn,ih)=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.default=J0;function J0(t){return t&&typeof t.length=="number"&&t.length>=0&&t.length%1===0}ih.exports=xn.default});var sh=w((Mn,nh)=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.default=function(t){return function(...e){var r=e.pop();return t.call(this,e,r)}};nh.exports=Mn.default});var lh=w(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.fallback=ah;Mt.wrap=oh;var Z0=Mt.hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,Q0=Mt.hasSetImmediate=typeof setImmediate=="function"&&setImmediate,X0=Mt.hasNextTick=typeof process=="object"&&typeof process.nextTick=="function";function ah(t){setTimeout(t,0)}function oh(t){return(e,...r)=>t(()=>e(...r))}var ii;Z0?ii=queueMicrotask:Q0?ii=setImmediate:X0?ii=process.nextTick:ii=ah;Mt.default=oh(ii)});var dh=w((On,ch)=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.default=sb;var eb=sh(),tb=hh(eb),rb=lh(),ib=hh(rb),nb=Qt();function hh(t){return t&&t.__esModule?t:{default:t}}function sb(t){return(0,nb.isAsync)(t)?function(...e){let r=e.pop(),i=t.apply(this,e);return uh(i,r)}:(0,tb.default)(function(e,r){var i;try{i=t.apply(this,e)}catch(n){return r(n)}if(i&&typeof i.then=="function")return uh(i,r);r(null,i)})}function uh(t,e){return t.then(r=>{fh(e,null,r)},r=>{fh(e,r&&(r instanceof Error||r.message)?r:new Error(r))})}function fh(t,e,r){try{t(e,r)}catch(i){(0,ib.default)(n=>{throw n},i)}}ch.exports=On.default});var Qt=w(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.isAsyncIterable=ct.isAsyncGenerator=ct.isAsync=void 0;var ab=dh(),ob=lb(ab);function lb(t){return t&&t.__esModule?t:{default:t}}function ph(t){return t[Symbol.toStringTag]==="AsyncFunction"}function ub(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function fb(t){return typeof t[Symbol.asyncIterator]=="function"}function hb(t){if(typeof t!="function")throw new Error("expected a function");return ph(t)?(0,ob.default)(t):t}ct.default=hb;ct.isAsync=ph;ct.isAsyncGenerator=ub;ct.isAsyncIterable=fb});var Sr=w((An,gh)=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.default=cb;function cb(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}gh.exports=An.default});var yh=w((kn,mh)=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});var db=Tn(),pb=Xa(db),gb=Qt(),mb=Xa(gb),yb=Sr(),bb=Xa(yb);function Xa(t){return t&&t.__esModule?t:{default:t}}kn.default=(0,bb.default)((t,e,r)=>{var i=(0,pb.default)(e)?[]:{};t(e,(n,s,a)=>{(0,mb.default)(n)((o,...l)=>{l.length<2&&([l]=l),i[s]=l,a(o)})},n=>r(n,i))},3);mh.exports=kn.default});var eo=w((Dn,bh)=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.default=wb;function wb(t){function e(...r){if(t!==null){var i=t;t=null,i.apply(this,r)}}return Object.assign(e,t),e}bh.exports=Dn.default});var vh=w((Pn,wh)=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.default=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()};wh.exports=Pn.default});var Eh=w((Cn,Sh)=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.default=Mb;var vb=Tn(),_b=_h(vb),Sb=vh(),Eb=_h(Sb);function _h(t){return t&&t.__esModule?t:{default:t}}function Rb(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}function xb(t){var e=-1;return function(){var i=t.next();return i.done?null:(e++,{value:i.value,key:e})}}function Tb(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 Mb(t){if((0,_b.default)(t))return Rb(t);var e=(0,Eb.default)(t);return e?xb(e):Tb(t)}Sh.exports=Cn.default});var to=w((qn,Rh)=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.default=Ob;function Ob(t){return function(...e){if(t===null)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}Rh.exports=qn.default});var jn=w((Ln,xh)=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});var Ab={};Ln.default=Ab;xh.exports=Ln.default});var Mh=w((Nn,Th)=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.default=Cb;var kb=jn(),Db=Pb(kb);function Pb(t){return t&&t.__esModule?t:{default:t}}function Cb(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:d,done:f})=>{if(!(s||n)){if(a=!1,f){n=!0,o<=0&&i(null);return}o++,r(d,l,c),l++,u()}}).catch(h))}function c(d,f){if(o-=1,!s){if(d)return h(d);if(d===!1){n=!0,s=!0;return}if(f===Db.default||n&&o<=0)return n=!0,i(null);u()}}function h(d){s||(a=!1,n=!0,i(d))}u()}Th.exports=Nn.default});var Dh=w((Fn,kh)=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});var qb=eo(),Lb=ni(qb),jb=Eh(),Nb=ni(jb),Fb=to(),Ib=ni(Fb),Oh=Qt(),$b=Mh(),Ah=ni($b),Wb=jn(),Bb=ni(Wb);function ni(t){return t&&t.__esModule?t:{default:t}}Fn.default=t=>(e,r,i)=>{if(i=(0,Lb.default)(i),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return i(null);if((0,Oh.isAsyncGenerator)(e))return(0,Ah.default)(e,t,r,i);if((0,Oh.isAsyncIterable)(e))return(0,Ah.default)(e[Symbol.asyncIterator](),t,r,i);var n=(0,Nb.default)(e),s=!1,a=!1,o=0,l=!1;function u(h,d){if(!a)if(o-=1,h)s=!0,i(h);else if(h===!1)s=!0,a=!0;else{if(d===Bb.default||s&&o<=0)return s=!0,i(null);l||c()}}function c(){for(l=!0;o<t&&!s;){var h=n();if(h===null){s=!0,o<=0&&i(null);return}o+=1,r(h.value,h.key,(0,Ib.default)(u))}l=!1}c()};kh.exports=Fn.default});var io=w((In,Ph)=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});var Ub=Dh(),zb=ro(Ub),Hb=Qt(),Gb=ro(Hb),Yb=Sr(),Vb=ro(Yb);function ro(t){return t&&t.__esModule?t:{default:t}}function Kb(t,e,r,i){return(0,zb.default)(e)(t,(0,Gb.default)(r),i)}In.default=(0,Vb.default)(Kb,4);Ph.exports=In.default});var Lh=w(($n,qh)=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});var Jb=io(),Zb=Ch(Jb),Qb=Sr(),Xb=Ch(Qb);function Ch(t){return t&&t.__esModule?t:{default:t}}function ew(t,e,r){return(0,Zb.default)(t,1,e,r)}$n.default=(0,Xb.default)(ew,3);qh.exports=$n.default});var Fh=w((Wn,Nh)=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.default=sw;var tw=yh(),rw=jh(tw),iw=Lh(),nw=jh(iw);function jh(t){return t&&t.__esModule?t:{default:t}}function sw(t,e){return(0,rw.default)(nw.default,t,e)}Nh.exports=Wn.default});var no=w((X2,Ih)=>{Ih.exports=require("stream")});var Hh=w((eR,zh)=>{"use strict";function $h(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 Wh(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?$h(Object(r),!0).forEach(function(i){aw(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$h(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function aw(t,e,r){return e=Uh(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ow(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bh(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,Uh(i.key),i)}}function lw(t,e,r){return e&&Bh(t.prototype,e),r&&Bh(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Uh(t){var e=uw(t,"string");return typeof e=="symbol"?e:String(e)}function uw(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 fw=require("buffer"),Bn=fw.Buffer,hw=require("util"),so=hw.inspect,cw=so&&so.custom||"inspect";function dw(t,e,r){Bn.prototype.copy.call(t,e,r)}zh.exports=function(){function t(){ow(this,t),this.head=null,this.tail=null,this.length=0}return lw(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 Bn.alloc(0);for(var i=Bn.allocUnsafe(r>>>0),n=this.head,s=0;n;)dw(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=Bn.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:cw,value:function(r,i){return so(this,Wh(Wh({},i),{},{depth:0,customInspect:!1}))}}]),t}()});var oo=w((tR,Yh)=>{"use strict";function pw(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(ao,this,t)):process.nextTick(ao,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(Un,r):(r._writableState.errorEmitted=!0,process.nextTick(Gh,r,s)):process.nextTick(Gh,r,s):e?(process.nextTick(Un,r),e(s)):process.nextTick(Un,r)}),this)}function Gh(t,e){ao(t,e),Un(t)}function Un(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function gw(){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 ao(t,e){t.emit("error",e)}function mw(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}Yh.exports={destroy:pw,undestroy:gw,errorOrDestroy:mw}});var Ot=w((rR,Jh)=>{"use strict";var Kh={};function $e(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,Kh[t]=n}function Vh(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 yw(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function bw(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function ww(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}$e("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);$e("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&yw(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(bw(t," argument"))n=`The ${t} ${i} ${Vh(e,"type")}`;else{let s=ww(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${Vh(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);$e("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");$e("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});$e("ERR_STREAM_PREMATURE_CLOSE","Premature close");$e("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});$e("ERR_MULTIPLE_CALLBACK","Callback called multiple times");$e("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");$e("ERR_STREAM_WRITE_AFTER_END","write after end");$e("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);$e("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);$e("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Jh.exports.codes=Kh});var lo=w((iR,Zh)=>{"use strict";var vw=Ot().codes.ERR_INVALID_OPT_VALUE;function _w(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Sw(t,e,r,i){var n=_w(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new vw(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}Zh.exports={getHighWaterMark:Sw}});var ho=w((nR,ic)=>{"use strict";ic.exports=Y;function Xh(t){var e=this;this.next=null,this.entry=null,this.finish=function(){Kw(e,t)}}var Er;Y.WritableState=ai;var Ew={deprecate:va()},ec=no(),Hn=require("buffer").Buffer,Rw=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function xw(t){return Hn.from(t)}function Tw(t){return Hn.isBuffer(t)||t instanceof Rw}var fo=oo(),Mw=lo(),Ow=Mw.getHighWaterMark,At=Ot().codes,Aw=At.ERR_INVALID_ARG_TYPE,kw=At.ERR_METHOD_NOT_IMPLEMENTED,Dw=At.ERR_MULTIPLE_CALLBACK,Pw=At.ERR_STREAM_CANNOT_PIPE,Cw=At.ERR_STREAM_DESTROYED,qw=At.ERR_STREAM_NULL_VALUES,Lw=At.ERR_STREAM_WRITE_AFTER_END,jw=At.ERR_UNKNOWN_ENCODING,Rr=fo.errorOrDestroy;ht()(Y,ec);function Nw(){}function ai(t,e,r){Er=Er||Xt(),t=t||{},typeof r!="boolean"&&(r=e instanceof Er),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Ow(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){zw(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 Xh(this)}ai.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(ai.prototype,"buffer",{get:Ew.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var zn;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(zn=Function.prototype[Symbol.hasInstance],Object.defineProperty(Y,Symbol.hasInstance,{value:function(e){return zn.call(this,e)?!0:this!==Y?!1:e&&e._writableState instanceof ai}})):zn=function(e){return e instanceof this};function Y(t){Er=Er||Xt();var e=this instanceof Er;if(!e&&!zn.call(Y,this))return new Y(t);this._writableState=new ai(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)),ec.call(this)}Y.prototype.pipe=function(){Rr(this,new Pw)};function Fw(t,e){var r=new Lw;Rr(t,r),process.nextTick(e,r)}function Iw(t,e,r,i){var n;return r===null?n=new qw:typeof r!="string"&&!e.objectMode&&(n=new Aw("chunk",["string","Buffer"],r)),n?(Rr(t,n),process.nextTick(i,n),!1):!0}Y.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&Tw(t);return s&&!Hn.isBuffer(t)&&(t=xw(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=Nw),i.ending?Fw(this,r):(s||Iw(this,i,t,r))&&(i.pendingcb++,n=Ww(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&&tc(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 jw(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Y.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function $w(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Hn.from(e,r)),e}Object.defineProperty(Y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Ww(t,e,r,i,n,s){if(!r){var a=$w(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 uo(t,e,!1,o,i,n,s);return l}function uo(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new Cw("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function Bw(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(si,t,e),t._writableState.errorEmitted=!0,Rr(t,i)):(n(i),t._writableState.errorEmitted=!0,Rr(t,i),si(t,e))}function Uw(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function zw(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new Dw;if(Uw(r),e)Bw(t,r,i,e,n);else{var s=rc(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&tc(t,r),i?process.nextTick(Qh,t,r,s,n):Qh(t,r,s,n)}}function Qh(t,e,r,i){r||Hw(t,e),e.pendingcb--,i(),si(t,e)}function Hw(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function tc(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,uo(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 Xh(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,h=e.objectMode?1:l.length;if(uo(t,e,!1,h,l,u,c),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 kw("_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||Vw(this,i,r),this};Object.defineProperty(Y.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function rc(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&&Rr(t,r),e.prefinished=!0,t.emit("prefinish"),si(t,e)})}function Yw(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 si(t,e){var r=rc(e);if(r&&(Yw(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 Vw(t,e,r){e.ending=!0,si(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function Kw(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=fo.destroy;Y.prototype._undestroy=fo.undestroy;Y.prototype._destroy=function(t,e){e(t)}});var Xt=w((sR,sc)=>{"use strict";var Jw=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};sc.exports=rt;var nc=go(),po=ho();ht()(rt,nc);for(co=Jw(po.prototype),Gn=0;Gn<co.length;Gn++)Yn=co[Gn],rt.prototype[Yn]||(rt.prototype[Yn]=po.prototype[Yn]);var co,Yn,Gn;function rt(t){if(!(this instanceof rt))return new rt(t);nc.call(this,t),po.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",Zw)))}Object.defineProperty(rt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(rt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(rt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Zw(){this._writableState.ended||process.nextTick(Qw,this)}function Qw(t){t.end()}Object.defineProperty(rt.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 bo=w(oc=>{"use strict";var yo=ka().Buffer,ac=yo.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 Xw(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 ev(t){var e=Xw(t);if(typeof e!="string"&&(yo.isEncoding===ac||!ac(t)))throw new Error("Unknown encoding: "+t);return e||t}oc.StringDecoder=oi;function oi(t){this.encoding=ev(t);var e;switch(this.encoding){case"utf16le":this.text=av,this.end=ov,e=4;break;case"utf8":this.fillLast=iv,e=4;break;case"base64":this.text=lv,this.end=uv,e=3;break;default:this.write=fv,this.end=hv;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=yo.allocUnsafe(e)}oi.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||""};oi.prototype.end=sv;oi.prototype.text=nv;oi.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 mo(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function tv(t,e,r){var i=e.length-1;if(i<r)return 0;var n=mo(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=mo(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=mo(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function rv(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 iv(t){var e=this.lastTotal-this.lastNeed,r=rv(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 nv(t,e){var r=tv(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 sv(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function av(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 ov(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 lv(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 uv(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function fv(t){return t.toString(this.encoding)}function hv(t){return t&&t.length?this.write(t):""}});var Vn=w((oR,fc)=>{"use strict";var lc=Ot().codes.ERR_STREAM_PREMATURE_CLOSE;function cv(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 dv(){}function pv(t){return t.setHeader&&typeof t.abort=="function"}function uc(t,e,r){if(typeof e=="function")return uc(t,null,e);e||(e={}),r=cv(r||dv);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)},c=function(y){r.call(t,y)},h=function(){var y;if(i&&!l)return(!t._readableState||!t._readableState.ended)&&(y=new lc),r.call(t,y);if(n&&!a)return(!t._writableState||!t._writableState.ended)&&(y=new lc),r.call(t,y)},d=function(){t.req.on("finish",o)};return pv(t)?(t.on("complete",o),t.on("abort",h),t.req?d():t.on("request",d)):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",c),t.on("close",h),function(){t.removeListener("complete",o),t.removeListener("abort",h),t.removeListener("request",d),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",c),t.removeListener("close",h)}}fc.exports=uc});var cc=w((lR,hc)=>{"use strict";var Kn;function kt(t,e,r){return e=gv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gv(t){var e=mv(t,"string");return typeof e=="symbol"?e:String(e)}function mv(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 yv=Vn(),Dt=Symbol("lastResolve"),er=Symbol("lastReject"),li=Symbol("error"),Jn=Symbol("ended"),tr=Symbol("lastPromise"),wo=Symbol("handlePromise"),rr=Symbol("stream");function Pt(t,e){return{value:t,done:e}}function bv(t){var e=t[Dt];if(e!==null){var r=t[rr].read();r!==null&&(t[tr]=null,t[Dt]=null,t[er]=null,e(Pt(r,!1)))}}function wv(t){process.nextTick(bv,t)}function vv(t,e){return function(r,i){t.then(function(){if(e[Jn]){r(Pt(void 0,!0));return}e[wo](r,i)},i)}}var _v=Object.getPrototypeOf(function(){}),Sv=Object.setPrototypeOf((Kn={get stream(){return this[rr]},next:function(){var e=this,r=this[li];if(r!==null)return Promise.reject(r);if(this[Jn])return Promise.resolve(Pt(void 0,!0));if(this[rr].destroyed)return new Promise(function(a,o){process.nextTick(function(){e[li]?o(e[li]):a(Pt(void 0,!0))})});var i=this[tr],n;if(i)n=new Promise(vv(i,this));else{var s=this[rr].read();if(s!==null)return Promise.resolve(Pt(s,!1));n=new Promise(this[wo])}return this[tr]=n,n}},kt(Kn,Symbol.asyncIterator,function(){return this}),kt(Kn,"return",function(){var e=this;return new Promise(function(r,i){e[rr].destroy(null,function(n){if(n){i(n);return}r(Pt(void 0,!0))})})}),Kn),_v),Ev=function(e){var r,i=Object.create(Sv,(r={},kt(r,rr,{value:e,writable:!0}),kt(r,Dt,{value:null,writable:!0}),kt(r,er,{value:null,writable:!0}),kt(r,li,{value:null,writable:!0}),kt(r,Jn,{value:e._readableState.endEmitted,writable:!0}),kt(r,wo,{value:function(s,a){var o=i[rr].read();o?(i[tr]=null,i[Dt]=null,i[er]=null,s(Pt(o,!1))):(i[Dt]=s,i[er]=a)},writable:!0}),r));return i[tr]=null,yv(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[er];s!==null&&(i[tr]=null,i[Dt]=null,i[er]=null,s(n)),i[li]=n;return}var a=i[Dt];a!==null&&(i[tr]=null,i[Dt]=null,i[er]=null,a(Pt(void 0,!0))),i[Jn]=!0}),e.on("readable",wv.bind(null,i)),i};hc.exports=Ev});var mc=w((uR,gc)=>{"use strict";function dc(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 Rv(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function a(l){dc(s,i,n,a,o,"next",l)}function o(l){dc(s,i,n,a,o,"throw",l)}a(void 0)})}}function pc(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 xv(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?pc(Object(r),!0).forEach(function(i){Tv(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pc(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Tv(t,e,r){return e=Mv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mv(t){var e=Ov(t,"string");return typeof e=="symbol"?e:String(e)}function Ov(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 Av=Ot().codes.ERR_INVALID_ARG_TYPE;function kv(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 Av("iterable",["Iterable"],e);var n=new t(xv({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,a())};function a(){return o.apply(this,arguments)}function o(){return o=Rv(function*(){try{var l=yield i.next(),u=l.value,c=l.done;c?n.push(null):n.push(yield u)?a():s=!1}catch(h){n.destroy(h)}}),o.apply(this,arguments)}return n}gc.exports=kv});var go=w((hR,Tc)=>{"use strict";Tc.exports=B;var xr;B.ReadableState=vc;var fR=require("events").EventEmitter,wc=function(e,r){return e.listeners(r).length},fi=no(),Zn=require("buffer").Buffer,Dv=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Pv(t){return Zn.from(t)}function Cv(t){return Zn.isBuffer(t)||t instanceof Dv}var vo=require("util"),j;vo&&vo.debuglog?j=vo.debuglog("stream"):j=function(){};var qv=Hh(),Mo=oo(),Lv=lo(),jv=Lv.getHighWaterMark,Qn=Ot().codes,Nv=Qn.ERR_INVALID_ARG_TYPE,Fv=Qn.ERR_STREAM_PUSH_AFTER_EOF,Iv=Qn.ERR_METHOD_NOT_IMPLEMENTED,$v=Qn.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Tr,_o,So;ht()(B,fi);var ui=Mo.errorOrDestroy,Eo=["error","close","destroy","pause","resume"];function Wv(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 vc(t,e,r){xr=xr||Xt(),t=t||{},typeof r!="boolean"&&(r=e instanceof xr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=jv(this,t,"readableHighWaterMark",r),this.buffer=new qv,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&&(Tr||(Tr=bo().StringDecoder),this.decoder=new Tr(t.encoding),this.encoding=t.encoding)}function B(t){if(xr=xr||Xt(),!(this instanceof B))return new B(t);var e=this instanceof xr;this._readableState=new vc(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),fi.call(this)}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});B.prototype.destroy=Mo.destroy;B.prototype._undestroy=Mo.undestroy;B.prototype._destroy=function(t,e){e(t)};B.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=Zn.from(t,e),e=""),i=!0),_c(this,t,e,!1,i)};B.prototype.unshift=function(t){return _c(this,t,null,!0,!1)};function _c(t,e,r,i,n){j("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,zv(t,s);else{var a;if(n||(a=Bv(s,e)),a)ui(t,a);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Zn.prototype&&(e=Pv(e)),i)s.endEmitted?ui(t,new $v):Ro(t,s,e,!0);else if(s.ended)ui(t,new Fv);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?Ro(t,s,e,!1):To(t,s)):Ro(t,s,e,!1)}else i||(s.reading=!1,To(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function Ro(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&&Xn(t)),To(t,e)}function Bv(t,e){var r;return!Cv(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new Nv("chunk",["string","Buffer","Uint8Array"],e)),r}B.prototype.isPaused=function(){return this._readableState.flowing===!1};B.prototype.setEncoding=function(t){Tr||(Tr=bo().StringDecoder);var e=new Tr(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 yc=1073741824;function Uv(t){return t>=yc?t=yc:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function bc(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=Uv(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}B.prototype.read=function(t){j("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 j("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?xo(this):Xn(this),null;if(t=bc(t,e),t===0&&e.ended)return e.length===0&&xo(this),null;var i=e.needReadable;j("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,j("length less than watermark",i)),e.ended||e.reading?(i=!1,j("reading or ended",i)):i&&(j("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=bc(r,e)));var n;return t>0?n=Rc(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&&xo(this)),n!==null&&this.emit("data",n),n};function zv(t,e){if(j("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?Xn(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Sc(t)))}}function Xn(t){var e=t._readableState;j("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(j("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(Sc,t))}function Sc(t){var e=t._readableState;j("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,Oo(t)}function To(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(Hv,t,e))}function Hv(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(j("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}B.prototype._read=function(t){ui(this,new Iv("_read()"))};B.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,j("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(_,E){j("onunpipe"),_===r&&E&&E.hasUnpiped===!1&&(E.hasUnpiped=!0,c())}function o(){j("onend"),t.end()}var l=Gv(r);t.on("drain",l);var u=!1;function c(){j("cleanup"),t.removeListener("close",f),t.removeListener("finish",y),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",o),r.removeListener("end",b),r.removeListener("data",h),u=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}r.on("data",h);function h(_){j("ondata");var E=t.write(_);j("dest.write",E),E===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&xc(i.pipes,t)!==-1)&&!u&&(j("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(_){j("onerror",_),b(),t.removeListener("error",d),wc(t,"error")===0&&ui(t,_)}Wv(t,"error",d);function f(){t.removeListener("finish",y),b()}t.once("close",f);function y(){j("onfinish"),t.removeListener("close",f),b()}t.once("finish",y);function b(){j("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(j("pipe resume"),r.resume()),t};function Gv(t){return function(){var r=t._readableState;j("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&wc(t,"data")&&(r.flowing=!0,Oo(t))}}B.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=xc(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)};B.prototype.on=function(t,e){var r=fi.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,j("on readable",i.length,i.reading),i.length?Xn(this):i.reading||process.nextTick(Yv,this)),r};B.prototype.addListener=B.prototype.on;B.prototype.removeListener=function(t,e){var r=fi.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Ec,this),r};B.prototype.removeAllListeners=function(t){var e=fi.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Ec,this),e};function Ec(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 Yv(t){j("readable nexttick read 0"),t.read(0)}B.prototype.resume=function(){var t=this._readableState;return t.flowing||(j("resume"),t.flowing=!t.readableListening,Vv(this,t)),t.paused=!1,this};function Vv(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(Kv,t,e))}function Kv(t,e){j("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),Oo(t),e.flowing&&!e.reading&&t.read(0)}B.prototype.pause=function(){return j("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(j("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Oo(t){var e=t._readableState;for(j("flow",e.flowing);e.flowing&&t.read()!==null;);}B.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(j("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(j("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){j("wrapped _read",a),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(B.prototype[Symbol.asyncIterator]=function(){return _o===void 0&&(_o=cc()),_o(this)});Object.defineProperty(B.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(B.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(B.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});B._fromList=Rc;Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Rc(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 xo(t){var e=t._readableState;j("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(Jv,e,t))}function Jv(t,e){if(j("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"&&(B.from=function(t,e){return So===void 0&&(So=mc()),So(B,t,e)});function xc(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Ao=w((cR,Oc)=>{"use strict";Oc.exports=dt;var es=Ot().codes,Zv=es.ERR_METHOD_NOT_IMPLEMENTED,Qv=es.ERR_MULTIPLE_CALLBACK,Xv=es.ERR_TRANSFORM_ALREADY_TRANSFORMING,e1=es.ERR_TRANSFORM_WITH_LENGTH_0,ts=Xt();ht()(dt,ts);function t1(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new Qv);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 dt(t){if(!(this instanceof dt))return new dt(t);ts.call(this,t),this._transformState={afterTransform:t1.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",r1)}function r1(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){Mc(t,e,r)}):Mc(this,null,null)}dt.prototype.push=function(t,e){return this._transformState.needTransform=!1,ts.prototype.push.call(this,t,e)};dt.prototype._transform=function(t,e,r){r(new Zv("_transform()"))};dt.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)}};dt.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};dt.prototype._destroy=function(t,e){ts.prototype._destroy.call(this,t,function(r){e(r)})};function Mc(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new e1;if(t._transformState.transforming)throw new Xv;return t.push(null)}});var Dc=w((dR,kc)=>{"use strict";kc.exports=hi;var Ac=Ao();ht()(hi,Ac);function hi(t){if(!(this instanceof hi))return new hi(t);Ac.call(this,t)}hi.prototype._transform=function(t,e,r){r(null,t)}});var jc=w((pR,Lc)=>{"use strict";var ko;function i1(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var qc=Ot().codes,n1=qc.ERR_MISSING_ARGS,s1=qc.ERR_STREAM_DESTROYED;function Pc(t){if(t)throw t}function a1(t){return t.setHeader&&typeof t.abort=="function"}function o1(t,e,r,i){i=i1(i);var n=!1;t.on("close",function(){n=!0}),ko===void 0&&(ko=Vn()),ko(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,a1(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(a||new s1("pipe"))}}}function Cc(t){t()}function l1(t,e){return t.pipe(e)}function u1(t){return!t.length||typeof t[t.length-1]!="function"?Pc:t.pop()}function f1(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=u1(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new n1("streams");var n,s=e.map(function(a,o){var l=o<e.length-1,u=o>0;return o1(a,l,u,function(c){n||(n=c),c&&s.forEach(Cc),!l&&(s.forEach(Cc),i(n))})});return e.reduce(l1)}Lc.exports=f1});var ir=w((We,di)=>{var ci=require("stream");process.env.READABLE_STREAM==="disable"&&ci?(di.exports=ci.Readable,Object.assign(di.exports,ci),di.exports.Stream=ci):(We=di.exports=go(),We.Stream=ci||We,We.Readable=We,We.Writable=ho(),We.Duplex=Xt(),We.Transform=Ao(),We.PassThrough=Dc(),We.finished=Vn(),We.pipeline=jc())});var No=w((gR,Fc)=>{var Mr=[],pi=[],Do=function(){};function Co(t){return~Mr.indexOf(t)?!1:(Mr.push(t),!0)}function qo(t){Do=t}function h1(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 Lo(t){return~pi.indexOf(t)?!1:(pi.push(t),!0)}function Po(){Do.apply(Do,arguments)}function Nc(t){for(var e=0;e<pi.length;e++)t=pi[e].apply(pi[e],arguments);return t}function jo(t,e){var r=Object.prototype.hasOwnProperty;for(var i in e)r.call(e,i)&&(t[i]=e[i]);return t}function c1(t){return t.enabled=!1,t.modify=Lo,t.set=qo,t.use=Co,jo(function(){return!1},t)}function d1(t){function e(){var r=Array.prototype.slice.call(arguments,0);return Po.call(Po,t,Nc(r,t)),!0}return t.enabled=!0,t.modify=Lo,t.set=qo,t.use=Co,jo(e,t)}Fc.exports=function(e){return e.introduce=jo,e.enabled=h1,e.process=Nc,e.modify=Lo,e.write=Po,e.nope=c1,e.yep=d1,e.set=qo,e.use=Co,e}});var $c=w((mR,Ic)=>{var p1=No(),g1=p1(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)});Ic.exports=g1});var Bc=w((yR,Wc)=>{"use strict";Wc.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 zc=w((bR,Uc)=>{Uc.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 Yc=w((wR,Gc)=>{"use strict";var m1=zc(),y1=Array.prototype.concat,b1=Array.prototype.slice,Hc=Gc.exports=function(e){for(var r=[],i=0,n=e.length;i<n;i++){var s=e[i];m1(s)?r=y1.call(r,b1.call(s)):r.push(s)}return r};Hc.wrap=function(t){return function(){return t(Hc(arguments))}}});var Zc=w((vR,Jc)=>{var gi=Bc(),mi=Yc(),Vc=Object.hasOwnProperty,Kc=Object.create(null);for(rs in gi)Vc.call(gi,rs)&&(Kc[gi[rs]]=rs);var rs,Pe=Jc.exports={to:{},get:{}};Pe.get=function(t){var e=t.substring(0,3).toLowerCase(),r,i;switch(e){case"hsl":r=Pe.get.hsl(t),i="hsl";break;case"hwb":r=Pe.get.hwb(t),i="hwb";break;default:r=Pe.get.rgb(t),i="rgb";break}return r?{model:i,value:r}:null};Pe.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 c=l*2;a[l]=parseInt(o.slice(c,c+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]:Vc.call(gi,o[1])?(a=gi[o[1]],a[3]=1,a):null:null;for(l=0;l<3;l++)a[l]=Ct(a[l],0,255);return a[3]=Ct(a[3],0,1),a};Pe.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=Ct(parseFloat(r[2]),0,100),a=Ct(parseFloat(r[3]),0,100),o=Ct(isNaN(i)?1:i,0,1);return[n,s,a,o]}return null};Pe.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=Ct(parseFloat(r[2]),0,100),a=Ct(parseFloat(r[3]),0,100),o=Ct(isNaN(i)?1:i,0,1);return[n,s,a,o]}return null};Pe.to.hex=function(){var t=mi(arguments);return"#"+is(t[0])+is(t[1])+is(t[2])+(t[3]<1?is(Math.round(t[3]*255)):"")};Pe.to.rgb=function(){var t=mi(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]+")"};Pe.to.rgb.percent=function(){var t=mi(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]+")"};Pe.to.hsl=function(){var t=mi(arguments);return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};Pe.to.hwb=function(){var t=mi(arguments),e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};Pe.to.keyword=function(t){return Kc[t.slice(0,3)]};function Ct(t,e,r){return Math.min(Math.max(e,t),r)}function is(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}});var Xc=w((_R,Qc)=>{"use strict";Qc.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 Fo=w((SR,id)=>{var nr=Xc(),rd={};for(ns in nr)nr.hasOwnProperty(ns)&&(rd[nr[ns]]=ns);var ns,A=id.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(xe in A)if(A.hasOwnProperty(xe)){if(!("channels"in A[xe]))throw new Error("missing channels property: "+xe);if(!("labels"in A[xe]))throw new Error("missing channel labels property: "+xe);if(A[xe].labels.length!==A[xe].channels)throw new Error("channel and label counts mismatch: "+xe);ed=A[xe].channels,td=A[xe].labels,delete A[xe].channels,delete A[xe].labels,Object.defineProperty(A[xe],"channels",{value:ed}),Object.defineProperty(A[xe],"labels",{value:td})}var ed,td,xe;A.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]};A.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),c=u-Math.min(a,o,l),h=function(d){return(u-d)/6/c+1/2};return c===0?n=s=0:(s=c/u,e=h(a),r=h(o),i=h(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]};A.rgb.hwb=function(t){var e=t[0],r=t[1],i=t[2],n=A.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]};A.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 w1(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}A.rgb.keyword=function(t){var e=rd[t];if(e)return e;var r=1/0,i;for(var n in nr)if(nr.hasOwnProperty(n)){var s=nr[n],a=w1(t,s);a<r&&(r=a,i=n)}return i};A.keyword.rgb=function(t){return nr[t]};A.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]};A.rgb.lab=function(t){var e=A.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]};A.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};A.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]};A.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]}};A.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]};A.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)!==0&&(o=1-o),l=r+o*(a-r);var u,c,h;switch(s){default:case 6:case 0:u=a,c=l,h=r;break;case 1:u=l,c=a,h=r;break;case 2:u=r,c=a,h=l;break;case 3:u=r,c=l,h=a;break;case 4:u=l,c=r,h=a;break;case 5:u=a,c=r,h=l;break}return[u*255,c*255,h*255]};A.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]};A.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]};A.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]};A.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]};A.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]};A.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]};A.rgb.ansi16=function(t){var e=t[0],r=t[1],i=t[2],n=1 in arguments?arguments[1]:A.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};A.hsv.ansi16=function(t){return A.rgb.ansi16(A.hsv.rgb(t),t[2])};A.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};A.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]};A.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]};A.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};A.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]};A.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]};A.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]};A.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]};A.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]};A.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]};A.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]};A.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]};A.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]};A.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};A.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};A.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};A.gray.hsl=A.gray.hsv=function(t){return[0,0,t[0]]};A.gray.hwb=function(t){return[0,100,t[0]]};A.gray.cmyk=function(t){return[0,0,0,t[0]]};A.gray.lab=function(t){return[t[0],0,0]};A.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};A.rgb.gray=function(t){var e=(t[0]+t[1]+t[2])/3;return[e/255*100]}});var sd=w((ER,nd)=>{var ss=Fo();function v1(){for(var t={},e=Object.keys(ss),r=e.length,i=0;i<r;i++)t[e[i]]={distance:-1,parent:null};return t}function _1(t){var e=v1(),r=[t];for(e[t].distance=0;r.length;)for(var i=r.pop(),n=Object.keys(ss[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 S1(t,e){return function(r){return e(t(r))}}function E1(t,e){for(var r=[e[t].parent,t],i=ss[e[t].parent][t],n=e[t].parent;e[n].parent;)r.unshift(e[n].parent),i=S1(ss[e[n].parent][n],i),n=e[n].parent;return i.conversion=r,i}nd.exports=function(t){for(var e=_1(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]=E1(a,e))}return r}});var od=w((RR,ad)=>{var Io=Fo(),R1=sd(),Or={},x1=Object.keys(Io);function T1(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 M1(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}x1.forEach(function(t){Or[t]={},Object.defineProperty(Or[t],"channels",{value:Io[t].channels}),Object.defineProperty(Or[t],"labels",{value:Io[t].labels});var e=R1(t),r=Object.keys(e);r.forEach(function(i){var n=e[i];Or[t][i]=M1(n),Or[t][i].raw=T1(n)})});ad.exports=Or});var fd=w((xR,ud)=>{"use strict";var yi=Zc(),Ce=od(),Bo=[].slice,ld=["keyword","gray","hex"],$o={};Object.keys(Ce).forEach(function(t){$o[Bo.call(Ce[t].labels).sort().join("")]=t});var as={};function de(t,e){if(!(this instanceof de))return new de(t,e);if(e&&e in ld&&(e=null),e&&!(e in Ce))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 de)this.model=t.model,this.color=t.color.slice(),this.valpha=t.valpha;else if(typeof t=="string"){var n=yi.get(t);if(n===null)throw new Error("Unable to parse color from string: "+t);this.model=n.model,i=Ce[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=Ce[this.model].channels;var s=Bo.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 $o))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=$o[o];var l=Ce[this.model].labels,u=[];for(r=0;r<l.length;r++)u.push(t[l[r]]);this.color=Wo(u)}if(as[this.model])for(i=Ce[this.model].channels,r=0;r<i;r++){var c=as[this.model][r];c&&(this.color[r]=c(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}de.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(t){var e=this.model in yi.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 yi.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 yi.to.rgb.percent(r)},array:function(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var t={},e=Ce[this.model].channels,r=Ce[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 de(this.color.map(A1(t)).concat(this.valpha),this.model)},alpha:function(t){return arguments.length?new de(this.color.concat(Math.max(0,Math.min(1,t))),this.model):this.valpha},red:V("rgb",0,ne(255)),green:V("rgb",1,ne(255)),blue:V("rgb",2,ne(255)),hue:V(["hsl","hsv","hsl","hwb","hcg"],0,function(t){return(t%360+360)%360}),saturationl:V("hsl",1,ne(100)),lightness:V("hsl",2,ne(100)),saturationv:V("hsv",1,ne(100)),value:V("hsv",2,ne(100)),chroma:V("hcg",1,ne(100)),gray:V("hcg",2,ne(100)),white:V("hwb",1,ne(100)),wblack:V("hwb",2,ne(100)),cyan:V("cmyk",0,ne(100)),magenta:V("cmyk",1,ne(100)),yellow:V("cmyk",2,ne(100)),black:V("cmyk",3,ne(100)),x:V("xyz",0,ne(100)),y:V("xyz",1,ne(100)),z:V("xyz",2,ne(100)),l:V("lab",0,ne(100)),a:V("lab",1),b:V("lab",2),keyword:function(t){return arguments.length?new de(t):Ce[this.model].keyword(this.color)},hex:function(t){return arguments.length?new de(t):yi.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 de.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 de.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(Ce).forEach(function(t){if(ld.indexOf(t)===-1){var e=Ce[t].channels;de.prototype[t]=function(){if(this.model===t)return new de(this);if(arguments.length)return new de(arguments,t);var r=typeof arguments[e]=="number"?e:this.valpha;return new de(k1(Ce[this.model][t].raw(this.color)).concat(r),t)},de[t]=function(r){return typeof r=="number"&&(r=Wo(Bo.call(arguments),e)),new de(r,t)}}});function O1(t,e){return Number(t.toFixed(e))}function A1(t){return function(e){return O1(e,t)}}function V(t,e,r){return t=Array.isArray(t)?t:[t],t.forEach(function(i){(as[i]||(as[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 ne(t){return function(e){return Math.max(0,Math.min(t,e))}}function k1(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}ud.exports=de});var cd=w((TR,hd)=>{"use strict";hd.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 md=w((MR,gd)=>{"use strict";var dd=fd(),pd=cd();gd.exports=function(e,r){var i=e.split(r||":"),n=pd(i[0]);if(!i.length)return n;for(var s=0,a=i.length-1;s<a;s++)n=dd(n).mix(dd(pd(i[s+1]))).saturate(1).hex();return n}});var bd=w((OR,yd)=>{"use strict";function Ye(t,e){if(e)return new Ye(t).style(e);if(!(this instanceof Ye))return new Ye(t);this.text=t}Ye.prototype.prefix="\x1B[";Ye.prototype.suffix="m";Ye.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)]};Ye.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)};Ye.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};Ye.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};Ye.prototype.style=function(e){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(e))+this.suffix+this.text+this.reset()};yd.exports=Ye});var vd=w((AR,wd)=>{var D1=md(),P1=bd();wd.exports=function(e,r){var i=r.namespace,n=r.colors!==!1?P1(i+":",D1(i)):i+":";return e[0]=n+" "+e[0],e}});var Sd=w((kR,_d)=>{"use strict";_d.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 Rd=w((DR,Ed)=>{var C1=Sd();Ed.exports=function(e){return function(i){try{return C1(i,e())}catch{}return!1}}});var Td=w((PR,xd)=>{var q1=Rd();xd.exports=q1(function(){return process.env.DEBUG||process.env.DIAGNOSTICS})});var Od=w((CR,Md)=>{Md.exports=function(t,e){try{Function.prototype.apply.call(console.log,console,e)}catch{}}});var kd=w((qR,Ad)=>{var L1=No(),j1=require("tty").isatty(1),os=L1(function t(e,r){return r=r||{},r.colors="colors"in r?r.colors:j1,r.namespace=e,r.prod=!1,r.dev=!0,!t.enabled(e)&&!(r.force||t.force)?t.nope(r):t.yep(r)});os.modify(vd());os.use(Td());os.set(Od());Ad.exports=os});var bi=w((LR,Uo)=>{process.env.NODE_ENV==="production"?Uo.exports=$c():Uo.exports=kd()});var Pd=w((jR,Dd)=>{"use strict";var zo=require("fs"),{StringDecoder:N1}=require("string_decoder"),{Stream:F1}=ir();function I1(){}Dd.exports=(t,e)=>{let r=Buffer.alloc(65536),i=new N1("utf8"),n=new F1,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")},zo.open(t.file,"a+","0644",(l,u)=>{if(l){e?e(l):n.emit("error",l),n.destroy();return}(function c(){if(n.destroyed){zo.close(u,I1);return}return zo.read(u,r,0,r.length,a,(h,d)=>{if(h){e?e(h):n.emit("error",h),n.destroy();return}if(!d)return s&&((t.start==null||o>t.start)&&(e?e(null,s):n.emit("line",s)),o++,s=""),setTimeout(c,1e3);let f=i.write(r.slice(0,d));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+=d,c()})})()}),e?n.destroy:n}});var jd=w((FR,Ld)=>{"use strict";var ke=require("fs"),se=require("path"),Cd=Fh(),$1=require("zlib"),{MESSAGE:W1}=re(),{Stream:B1,PassThrough:qd}=ir(),U1=vr(),Ve=bi()("winston:file"),z1=require("os"),H1=Pd();Ld.exports=class extends U1{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 qd,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?se.basename(e.filename):"winston.log",this.dirname=e.dirname||se.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=se.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:z1.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[W1]}${this.eol}`,n=Buffer.byteLength(i);function s(){if(this._size+=n,this._pendingSize-=n,Ve("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()})),Ve("written",a,this._drain),this.finishIfEnding(),a}query(e,r){typeof e=="function"&&(r=e,e={}),e=h(e);let i=se.join(this.dirname,this.filename),n="",s=[],a=0,o=ke.createReadStream(i,{encoding:"utf8"});o.on("error",d=>{if(o.readable&&o.destroy(),!!r)return d.code!=="ENOENT"?r(d):r(null,s)}),o.on("data",d=>{d=(n+d).split(/\n+/);let f=d.length-1,y=0;for(;y<f;y++)(!e.start||a>=e.start)&&l(d[y]),a++;n=d[f]}),o.on("close",()=>{n&&l(n,!0),e.order==="desc"&&(s=s.reverse()),r&&r(null,s)});function l(d,f){try{let y=JSON.parse(d);c(y)&&u(y)}catch(y){f||o.emit("error",y)}}function u(d){if(e.rows&&s.length>=e.rows&&e.order!=="desc"){o.readable&&o.destroy();return}e.fields&&(d=e.fields.reduce((f,y)=>(f[y]=d[y],f),{})),e.order==="desc"&&s.length>=e.rows&&s.shift(),s.push(d)}function c(d){if(!d||typeof d!="object")return;let f=new Date(d.timestamp);if(!(e.from&&f<e.from||e.until&&f>e.until||e.level&&e.level!==d.level))return!0}function h(d){return d=d||{},d.rows=d.rows||d.limit||10,d.start=d.start||0,d.until=d.until||new Date,typeof d.until!="object"&&(d.until=new Date(d.until)),d.from=d.from||d.until-24*60*60*1e3,typeof d.from!="object"&&(d.from=new Date(d.from)),d.order=d.order||"desc",d}}stream(e={}){let r=se.join(this.dirname,this.filename),i=new B1,n={file:r,start:e.start};return i.destroy=H1(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);Ve("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.emit("rotate")||(this._rotate=!1)})})))}stat(e){let r=this._getFile(),i=se.join(this.dirname,r);ke.stat(i,(n,s)=>{if(n&&n.code==="ENOENT")return Ve("ENOENT\xA0ok",i),this.filename=r,e(null,0);if(n)return Ve(`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=se.join(this.dirname,this.filename);Ve("create stream start",r,this.options);let i=ke.createWriteStream(r,this.options).on("error",n=>Ve(n)).on("close",()=>Ve("close",i.path,i.bytesWritten)).on("open",()=>{Ve("file open ok",r),this.emit("open",r),e.pipe(i),this.rotatedWhileOpening&&(this._stream=new qd,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(i),e.end())});return Ve("create stream ok",r),i}_incFile(e){Ve("_incFile",this.filename);let r=se.extname(this._basename),i=se.basename(this._basename,r),n=[];this.zippedArchive&&n.push(function(s){let a=this._created>0&&!this.tailable?this._created:"";this._compressFile(se.join(this.dirname,`${i}${a}${r}`),se.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)),Cd(n,e)}_getFile(){let e=se.extname(this._basename),r=se.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=se.join(this.dirname,o);ke.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}`,c=se.join(this.dirname,u);ke.exists(c,h=>{if(!h)return l(null);u=`${r}${o}${e}${s}`,ke.rename(c,se.join(this.dirname,u),l)})}.bind(this,a));Cd(n,()=>{ke.rename(se.join(this.dirname,`${r}${e}${s}`),se.join(this.dirname,`${r}1${e}${s}`),i)})}_compressFile(e,r,i){ke.access(e,ke.F_OK,n=>{if(n)return i();var s=$1.createGzip(),a=ke.createReadStream(e),o=ke.createWriteStream(r);o.on("finish",()=>{ke.unlink(e,i)}),a.pipe(s).pipe(o)})}_createLogDirIfNotExist(e){ke.existsSync(e)||ke.mkdirSync(e,{recursive:!0})}}});var Fd=w(($R,Nd)=>{"use strict";var G1=require("http"),Y1=require("https"),{Stream:V1}=ir(),K1=vr(),{configure:J1}=Gr();Nd.exports=class extends K1{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 V1;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(c){r.emit("error",c)}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?Y1: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=J1({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});a.end(Buffer.from(o(e,this.options.replacer),"utf8"))}}});var Ho=w((WR,Id)=>{"use strict";var it=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";it.writable=t=>it(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";it.readable=t=>it(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";it.duplex=t=>it.writable(t)&&it.readable(t);it.transform=t=>it.duplex(t)&&typeof t._transform=="function";Id.exports=it});var Wd=w((UR,$d)=>{"use strict";var Z1=Ho(),{MESSAGE:Q1}=re(),X1=require("os"),e_=vr();$d.exports=class extends e_{constructor(e={}){if(super(e),!e.stream||!Z1(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:X1.EOL}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.isObjectMode){this._stream.write(e),r&&r();return}this._stream.write(`${e[Q1]}${this.eol}`),r&&r()}}});var Bd=w(wi=>{"use strict";Object.defineProperty(wi,"Console",{configurable:!0,enumerable:!0,get(){return rh()}});Object.defineProperty(wi,"File",{configurable:!0,enumerable:!0,get(){return jd()}});Object.defineProperty(wi,"Http",{configurable:!0,enumerable:!0,get(){return Fd()}});Object.defineProperty(wi,"Stream",{configurable:!0,enumerable:!0,get(){return Wd()}})});var us=w(vi=>{"use strict";var ls=ba(),{configs:Go}=re();vi.cli=ls.levels(Go.cli);vi.npm=ls.levels(Go.npm);vi.syslog=ls.levels(Go.syslog);vi.addColors=ls.levels});var zd=w((fs,Ud)=>{"use strict";Object.defineProperty(fs,"__esModule",{value:!0});var t_=Tn(),r_=sr(t_),i_=jn(),n_=sr(i_),s_=io(),a_=sr(s_),o_=eo(),l_=sr(o_),u_=to(),f_=sr(u_),h_=Qt(),c_=sr(h_),d_=Sr(),p_=sr(d_);function sr(t){return t&&t.__esModule?t:{default:t}}function g_(t,e,r){r=(0,l_.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===n_.default)&&r(null))}for(;i<s;i++)e(t[i],i,(0,f_.default)(o))}function m_(t,e,r){return(0,a_.default)(t,1/0,e,r)}function y_(t,e,r){var i=(0,r_.default)(t)?g_:m_;return i(t,(0,c_.default)(e),r)}fs.default=(0,p_.default)(y_,3);Ud.exports=fs.default});var Gd=w((hs,Hd)=>{"use strict";Object.defineProperty(hs,"__esModule",{value:!0});hs.default=b_;function b_(t){return(e,r,i)=>t(e,i)}Hd.exports=hs.default});var ps=w((ds,Yd)=>{"use strict";Object.defineProperty(ds,"__esModule",{value:!0});var w_=zd(),v_=cs(w_),__=Gd(),S_=cs(__),E_=Qt(),R_=cs(E_),x_=Sr(),T_=cs(x_);function cs(t){return t&&t.__esModule?t:{default:t}}function M_(t,e,r){return(0,v_.default)(t,(0,S_.default)((0,R_.default)(e)),r)}ds.default=(0,T_.default)(M_,3);Yd.exports=ds.default});var Kd=w((GR,Vd)=>{"use strict";var O_=Object.prototype.toString;Vd.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=O_.call(e).slice(8,-1);return i==="Function"?r=r.substring(r.indexOf("(")+1,r.indexOf(")")):r=i,r||"anonymous"}});var Yo=w((YR,Jd)=>{"use strict";var A_=Kd();Jd.exports=function(e){var r=0,i;function n(){return r||(r=1,i=e.apply(this,arguments),e=null),i}return n.displayName=A_(e),n}});var Vo=w(Si=>{Si.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||Si.get);var n=r.stack;return Error.prepareStackTrace=i,Error.stackTraceLimit=e,n};Si.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,c=n[5]==="native";if(n[1]){o=n[1];var h=o.lastIndexOf(".");if(o[h-1]=="."&&h--,h>0){s=o.substr(0,h),a=o.substr(h+1);var d=s.indexOf(".Module");d>0&&(o=o.substr(d+1),s=s.substr(0,d))}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:c};return e._createParsedCallSite(f)}}).filter(function(i){return!!i})};function _i(t){for(var e in t)this[e]=t[e]}var k_=["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"],D_=["topLevel","eval","native","constructor"];k_.forEach(function(t){_i.prototype[t]=null,_i.prototype["get"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]}});D_.forEach(function(t){_i.prototype[t]=!1,_i.prototype["is"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]}});Si._createParsedCallSite=function(t){return new _i(t)}});var Qd=w((JR,Zd)=>{"use strict";var{Writable:P_}=ir();Zd.exports=class extends P_{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 Jo=w((QR,tp)=>{"use strict";var Xd=require("os"),C_=ps(),Ko=bi()("winston:exception"),q_=Yo(),ep=Vo(),L_=Qd();tp.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:Xd.loadavg(),uptime:Xd.uptime()}}getTrace(e){return(e?ep.parse(e):ep.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 L_(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(){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);C_(i,(o,l)=>{let u=q_(l),c=o.transport||o;function h(d){return()=>{Ko(d),u()}}c._ending=!0,c.once("finish",h("finished")),c.once("error",h("error"))},()=>n&&a()),this.logger.log(r),n&&(s=setTimeout(a,3e3))}_getExceptionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleExceptions)}}});var ip=w((ex,rp)=>{"use strict";var{Writable:j_}=ir();rp.exports=class extends j_{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 Qo=w((rx,ap)=>{"use strict";var np=require("os"),N_=ps(),Zo=bi()("winston:rejection"),F_=Yo(),sp=Vo(),I_=ip();ap.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:np.loadavg(),uptime:np.uptime()}}getTrace(e){return(e?sp.parse(e):sp.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 I_(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(){Zo("doExit",n),Zo("process._exiting",process._exiting),n&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!i||i.length===0)return process.nextTick(a);N_(i,(o,l)=>{let u=F_(l),c=o.transport||o;function h(d){return()=>{Zo(d),u()}}c._ending=!0,c.once("finish",h("finished")),c.once("error",h("error"))},()=>n&&a()),this.logger.log(r),n&&(s=setTimeout(a,3e3))}_getRejectionHandlers(){return this.logger.transports.filter(e=>(e.transport||e).handleRejections)}}});var lp=w((ix,op)=>{"use strict";var Xo=class{constructor(e){let r=gs();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)}};op.exports=Xo});var gs=w((nx,cp)=>{"use strict";var{Stream:$_,Transform:W_}=ir(),up=ps(),{LEVEL:nt,SPLAT:fp}=re(),hp=Ho(),B_=Jo(),U_=Qo(),z_=Za(),H_=lp(),{warn:G_}=wa(),Y_=us(),V_=/%[scdjifoO%]/g,ms=class extends W_{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:c,padLevels:h,rewriters:d,stripColors:f,exceptionHandlers:y,rejectionHandlers:b}={}){if(this.transports.length&&this.clear(),this.silent=e,this.format=r||this.format||da()(),this.defaultMeta=i||null,this.levels=n||this.levels||Y_.npm.levels,this.level=s,this.exceptions&&this.exceptions.unhandle(),this.rejections&&this.rejections.unhandle(),this.exceptions=new B_(this),this.rejections=new U_(this),this.profilers={},this.exitOnError=a,o&&(o=Array.isArray(o)?o:[o],o.forEach(_=>this.add(_))),l||u||c||h||d||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=el(this.levels,e);if(r===null)return!1;let i=el(this.levels,this.level);return i===null?!1:!this.transports||this.transports.length===0?i>=r:this.transports.findIndex(s=>{let a=el(this.levels,s.level);return a===null&&(a=i),a>=r})!==-1}log(e,r,...i){if(arguments.length===1)return e[nt]=e.level,this._addDefaultMeta(e),this.write(e),this;if(arguments.length===2)return r&&typeof r=="object"?(r[nt]=r.level=e,this._addDefaultMeta(r),this.write(r),this):(r={[nt]: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(V_))){let a=Object.assign({},this.defaultMeta,n,{[nt]:e,[fp]:i,level:e,message:r});return n.message&&(a.message=`${a.message} ${n.message}`),n.stack&&(a.stack=n.stack),n.cause&&(a.cause=n.cause),this.write(a),this}return this.write(Object.assign({},this.defaultMeta,{[nt]:e,[fp]:i,level:e,message:r})),this}_transform(e,r,i){if(this.silent)return i();e[nt]||(e[nt]=e.level),!this.levels[e[nt]]&&this.levels[e[nt]]!==0&&console.error("[winston] Unknown logger level: %s",e[nt]),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();up(r,(i,n)=>{if(!i||i.finished)return setImmediate(n);i.once("finish",n),i.end()},e)}add(e){let r=!hp(e)||e.log.length>2?new z_({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(!hp(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,c)=>{if(u)return l(u);typeof o.formatResults=="function"&&(c=o.formatResults(c,e.format)),l(null,c)})}function a(o,l){s(o,(u,c)=>{l&&(c=u||c,c&&(i[o.name]=c),l()),l=null})}up(this.transports.filter(o=>!!o.query),a,()=>r(null,i))}stream(e={}){let r=new $_,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 H_(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 el(t,e){let r=t[e];return!r&&r!==0?null:r}Object.defineProperty(ms.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});cp.exports=ms});var tl=w((sx,dp)=>{"use strict";var{LEVEL:K_}=re(),J_=us(),Z_=gs(),Q_=bi()("winston:create-logger");function X_(t){return"is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}dp.exports=function(t={}){t.levels=t.levels||J_.npm.levels;class e extends Z_{constructor(n){super(n)}}let r=new e(t);return Object.keys(t.levels).forEach(function(i){if(Q_('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[K_]=i,s._addDefaultMeta(o),s.write(o),this||r}return n.length===0?(s.log(i,""),s):s.log(i,...n)},e.prototype[X_(i)]=function(){return(this||r).isLevelEnabled(i)}}),r}});var gp=w((ox,pp)=>{"use strict";var eS=tl();pp.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=eS(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 yp=w(H=>{"use strict";var mp=ba(),{warn:Ei}=wa();H.version=Xu().version;H.transports=Bd();H.config=us();H.addColors=mp.levels;H.format=mp.format;H.createLogger=tl();H.Logger=gs();H.ExceptionHandler=Jo();H.RejectionHandler=Qo();H.Container=gp();H.Transport=vr();H.loggers=new H.Container;var st=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)=>st[t](...e));Object.defineProperty(H,"level",{get(){return st.level},set(t){st.level=t}});Object.defineProperty(H,"exceptions",{get(){return st.exceptions}});Object.defineProperty(H,"rejections",{get(){return st.rejections}});["exitOnError"].forEach(t=>{Object.defineProperty(H,t,{get(){return st[t]},set(e){st[t]=e}})});Object.defineProperty(H,"default",{get(){return{exceptionHandlers:st.exceptionHandlers,rejectionHandlers:st.rejectionHandlers,transports:st.transports}}});Ei.deprecated(H,"setLevels");Ei.forFunctions(H,"useFormat",["cli"]);Ei.forProperties(H,"useFormat",["padLevels","stripColors"]);Ei.forFunctions(H,"deprecated",["addRewriter","addFilter","clone","extend"]);Ei.forProperties(H,"deprecated",["emitErrs","levelLength"])});var ws=w((bs,wp)=>{(function(t,e){typeof bs=="object"&&typeof wp<"u"?e(bs):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.Superstruct={}))})(bs,function(t){"use strict";class e extends TypeError{constructor(g,m){let v,{message:T,explanation:P,...$}=g,{path:J}=g,Z=J.length===0?T:`At path: ${J.join(".")} -- ${T}`;super(P??Z),P!=null&&(this.cause=Z),Object.assign(this,$),this.name=this.constructor.name,this.failures=()=>v??(v=[g,...m()])}}function r(p){return i(p)&&typeof p[Symbol.iterator]=="function"}function i(p){return typeof p=="object"&&p!=null}function n(p){return i(p)&&!Array.isArray(p)}function s(p){if(Object.prototype.toString.call(p)!=="[object Object]")return!1;let g=Object.getPrototypeOf(p);return g===null||g===Object.prototype}function a(p){return typeof p=="symbol"?p.toString():typeof p=="string"?JSON.stringify(p):`${p}`}function o(p){let{done:g,value:m}=p.next();return g?void 0:m}function l(p,g,m,v){if(p===!0)return;p===!1?p={}:typeof p=="string"&&(p={message:p});let{path:T,branch:P}=g,{type:$}=m,{refinement:J,message:Z=`Expected a value of type \`${$}\`${J?` with refinement \`${J}\``:""}, but received: \`${a(v)}\``}=p;return{value:v,type:$,refinement:J,key:T[T.length-1],path:T,branch:P,...p,message:Z}}function*u(p,g,m,v){r(p)||(p=[p]);for(let T of p){let P=l(T,g,m,v);P&&(yield P)}}function*c(p,g,m={}){let{path:v=[],branch:T=[p],coerce:P=!1,mask:$=!1}=m,J={path:v,branch:T,mask:$};P&&(p=g.coercer(p,J));let Z="valid";for(let ie of g.validator(p,J))ie.explanation=m.message,Z="not_valid",yield[ie,void 0];for(let[ie,Fe,Wg]of g.entries(p,J)){let Bg=c(Fe,Wg,{path:ie===void 0?v:[...v,ie],branch:ie===void 0?T:[...T,Fe],coerce:P,mask:$,message:m.message});for(let Qi of Bg)Qi[0]?(Z=Qi[0].refinement!=null?"not_refined":"not_valid",yield[Qi[0],void 0]):P&&(Fe=Qi[1],ie===void 0?p=Fe:p instanceof Map?p.set(ie,Fe):p instanceof Set?p.add(Fe):i(p)&&(Fe!==void 0||ie in p)&&(p[ie]=Fe))}if(Z!=="not_valid")for(let ie of g.refiner(p,J))ie.explanation=m.message,Z="not_refined",yield[ie,void 0];Z==="valid"&&(yield[void 0,p])}class h{constructor(g){let{type:m,schema:v,validator:T,refiner:P,coercer:$=Z=>Z,entries:J=function*(){}}=g;this.type=m,this.schema=v,this.entries=J,this.coercer=$,T?this.validator=(Z,ie)=>{let Fe=T(Z,ie);return u(Fe,ie,this,Z)}:this.validator=()=>[],P?this.refiner=(Z,ie)=>{let Fe=P(Z,ie);return u(Fe,ie,this,Z)}:this.refiner=()=>[]}assert(g,m){return d(g,this,m)}create(g,m){return f(g,this,m)}is(g){return b(g,this)}mask(g,m){return y(g,this,m)}validate(g,m={}){return _(g,this,m)}}function d(p,g,m){let v=_(p,g,{message:m});if(v[0])throw v[0]}function f(p,g,m){let v=_(p,g,{coerce:!0,message:m});if(v[0])throw v[0];return v[1]}function y(p,g,m){let v=_(p,g,{coerce:!0,mask:!0,message:m});if(v[0])throw v[0];return v[1]}function b(p,g){return!_(p,g)[0]}function _(p,g,m={}){let v=c(p,g,m),T=o(v);return T[0]?[new e(T[0],function*(){for(let $ of v)$[0]&&(yield $[0])}),void 0]:[void 0,T[1]]}function E(...p){let g=p[0].type==="type",m=p.map(T=>T.schema),v=Object.assign({},...m);return g?vt(v):wt(v)}function R(p,g){return new h({type:p,schema:null,validator:g})}function x(p,g){return new h({...p,refiner:(m,v)=>m===void 0||p.refiner(m,v),validator(m,v){return m===void 0?!0:(g(m,v),p.validator(m,v))}})}function M(p){return new h({type:"dynamic",schema:null,*entries(g,m){yield*p(g,m).entries(g,m)},validator(g,m){return p(g,m).validator(g,m)},coercer(g,m){return p(g,m).coercer(g,m)},refiner(g,m){return p(g,m).refiner(g,m)}})}function k(p){let g;return new h({type:"lazy",schema:null,*entries(m,v){g??(g=p()),yield*g.entries(m,v)},validator(m,v){return g??(g=p()),g.validator(m,v)},coercer(m,v){return g??(g=p()),g.coercer(m,v)},refiner(m,v){return g??(g=p()),g.refiner(m,v)}})}function C(p,g){let{schema:m}=p,v={...m};for(let T of g)delete v[T];switch(p.type){case"type":return vt(v);default:return wt(v)}}function F(p){let g=p instanceof h,m=g?{...p.schema}:{...p};for(let v in m)m[v]=$t(m[v]);return g&&p.type==="type"?vt(m):wt(m)}function q(p,g){let{schema:m}=p,v={};for(let T of g)v[T]=m[T];switch(p.type){case"type":return vt(v);default:return wt(v)}}function U(p,g){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),R(p,g)}function te(){return R("any",()=>!0)}function K(p){return new h({type:"array",schema:p,*entries(g){if(p&&Array.isArray(g))for(let[m,v]of g.entries())yield[m,v,p]},coercer(g){return Array.isArray(g)?g.slice():g},validator(g){return Array.isArray(g)||`Expected an array value, but received: ${a(g)}`}})}function Se(){return R("bigint",p=>typeof p=="bigint")}function Ee(){return R("boolean",p=>typeof p=="boolean")}function ft(){return R("date",p=>p instanceof Date&&!isNaN(p.getTime())||`Expected a valid \`Date\` object, but received: ${a(p)}`)}function Ys(p){let g={},m=p.map(v=>a(v)).join();for(let v of p)g[v]=v;return new h({type:"enums",schema:g,validator(v){return p.includes(v)||`Expected one of \`${m}\`, but received: ${a(v)}`}})}function S(){return R("func",p=>typeof p=="function"||`Expected a function, but received: ${a(p)}`)}function O(p){return R("instance",g=>g instanceof p||`Expected a \`${p.name}\` instance, but received: ${a(g)}`)}function z(){return R("integer",p=>typeof p=="number"&&!isNaN(p)&&Number.isInteger(p)||`Expected an integer, but received: ${a(p)}`)}function ye(p){return new h({type:"intersection",schema:null,*entries(g,m){for(let v of p)yield*v.entries(g,m)},*validator(g,m){for(let v of p)yield*v.validator(g,m)},*refiner(g,m){for(let v of p)yield*v.refiner(g,m)}})}function D(p){let g=a(p),m=typeof p;return new h({type:"literal",schema:m==="string"||m==="number"||m==="boolean"?p:null,validator(v){return v===p||`Expected the literal \`${g}\`, but received: ${a(v)}`}})}function Ne(p,g){return new h({type:"map",schema:null,*entries(m){if(p&&g&&m instanceof Map)for(let[v,T]of m.entries())yield[v,v,p],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: ${a(m)}`}})}function He(){return R("never",()=>!1)}function It(p){return new h({...p,validator:(g,m)=>g===null||p.validator(g,m),refiner:(g,m)=>g===null||p.refiner(g,m)})}function ur(){return R("number",p=>typeof p=="number"&&!isNaN(p)||`Expected a number, but received: ${a(p)}`)}function wt(p){let g=p?Object.keys(p):[],m=He();return new h({type:"object",schema:p||null,*entries(v){if(p&&i(v)){let T=new Set(Object.keys(v));for(let P of g)T.delete(P),yield[P,v[P],p[P]];for(let P of T)yield[P,v[P],m]}},validator(v){return n(v)||`Expected an object, but received: ${a(v)}`},coercer(v,T){if(!n(v))return v;let P={...v};if(T.mask&&p)for(let $ in P)p[$]===void 0&&delete P[$];return P}})}function $t(p){return new h({...p,validator:(g,m)=>g===void 0||p.validator(g,m),refiner:(g,m)=>g===void 0||p.refiner(g,m)})}function Vs(p,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,p],yield[v,T,g]}},validator(m){return n(m)||`Expected an object, but received: ${a(m)}`},coercer(m){return n(m)?{...m}:m}})}function De(){return R("regexp",p=>p instanceof RegExp)}function Yi(p){return new h({type:"set",schema:null,*entries(g){if(p&&g instanceof Set)for(let m of g)yield[m,m,p]},coercer(g){return g instanceof Set?new Set(g):g},validator(g){return g instanceof Set||`Expected a \`Set\` object, but received: ${a(g)}`}})}function Vi(){return R("string",p=>typeof p=="string"||`Expected a string, but received: ${a(p)}`)}function Ki(p){let g=He();return new h({type:"tuple",schema:null,*entries(m){if(Array.isArray(m)){let v=Math.max(p.length,m.length);for(let T=0;T<v;T++)yield[T,m[T],p[T]||g]}},validator(m){return Array.isArray(m)||`Expected an array, but received: ${a(m)}`},coercer(m){return Array.isArray(m)?m.slice():m}})}function vt(p){let g=Object.keys(p);return new h({type:"type",schema:p,*entries(m){if(i(m))for(let v of g)yield[v,m[v],p[v]]},validator(m){return n(m)||`Expected an object, but received: ${a(m)}`},coercer(m){return n(m)?{...m}:m}})}function fr(p){let g=p.map(m=>m.type).join(" | ");return new h({type:"union",schema:null,coercer(m,v){for(let T of p){let[P,$]=T.validate(m,{coerce:!0,mask:v.mask});if(!P)return $}return m},validator(m,v){let T=[];for(let P of p){let[...$]=c(m,P,v),[J]=$;if(J[0])for(let[Z]of $)Z&&T.push(Z);else return[]}return[`Expected the value to satisfy a union of \`${g}\`, but received: ${a(m)}`,...T]}})}function Wt(){return R("unknown",()=>!0)}function Ur(p,g,m){return new h({...p,coercer:(v,T)=>b(v,g)?p.coercer(m(v,T),T):p.coercer(v,T)})}function Bt(p,g,m={}){return Ur(p,Wt(),v=>{let T=typeof g=="function"?g():g;if(v===void 0)return T;if(!m.strict&&s(v)&&s(T)){let P={...v},$=!1;for(let J in T)P[J]===void 0&&(P[J]=T[J],$=!0);if($)return P}return v})}function _t(p){return Ur(p,Vi(),g=>g.trim())}function zr(p){return Ut(p,"empty",g=>{let m=Ji(g);return m===0||`Expected an empty ${p.type} but received one with a size of \`${m}\``})}function Ji(p){return p instanceof Map||p instanceof Set?p.size:p.length}function Zi(p,g,m={}){let{exclusive:v}=m;return Ut(p,"max",T=>v?T<g:T<=g||`Expected a ${p.type} less than ${v?"":"or equal to "}${g} but received \`${T}\``)}function Ng(p,g,m={}){let{exclusive:v}=m;return Ut(p,"min",T=>v?T>g:T>=g||`Expected a ${p.type} greater than ${v?"":"or equal to "}${g} but received \`${T}\``)}function Fg(p){return Ut(p,"nonempty",g=>Ji(g)>0||`Expected a nonempty ${p.type} but received an empty one`)}function Ig(p,g){return Ut(p,"pattern",m=>g.test(m)||`Expected a ${p.type} matching \`/${g.source}/\` but received "${m}"`)}function $g(p,g,m=g){let v=`Expected a ${p.type}`,T=g===m?`of \`${g}\``:`between \`${g}\` and \`${m}\``;return Ut(p,"size",P=>{if(typeof P=="number"||P instanceof Date)return g<=P&&P<=m||`${v} ${T} but received \`${P}\``;if(P instanceof Map||P instanceof Set){let{size:$}=P;return g<=$&&$<=m||`${v} with a size ${T} but received one with a size of \`${$}\``}else{let{length:$}=P;return g<=$&&$<=m||`${v} with a length ${T} but received one with a length of \`${$}\``}})}function Ut(p,g,m){return new h({...p,*refiner(v,T){yield*p.refiner(v,T);let P=m(v,T),$=u(P,T,p,v);for(let J of $)yield{...J,refinement:g}}})}t.Struct=h,t.StructError=e,t.any=te,t.array=K,t.assert=d,t.assign=E,t.bigint=Se,t.boolean=Ee,t.coerce=Ur,t.create=f,t.date=ft,t.defaulted=Bt,t.define=R,t.deprecated=x,t.dynamic=M,t.empty=zr,t.enums=Ys,t.func=S,t.instance=O,t.integer=z,t.intersection=ye,t.is=b,t.lazy=k,t.literal=D,t.map=Ne,t.mask=y,t.max=Zi,t.min=Ng,t.never=He,t.nonempty=Fg,t.nullable=It,t.number=ur,t.object=wt,t.omit=C,t.optional=$t,t.partial=F,t.pattern=Ig,t.pick=q,t.record=Vs,t.refine=Ut,t.regexp=De,t.set=Yi,t.size=$g,t.string=Vi,t.struct=U,t.trimmed=_t,t.tuple=Ki,t.type=vt,t.union=fr,t.unknown=Wt,t.validate=_})});var Pp=w((xx,Dp)=>{"use strict";Dp.exports=Ap;function Ap(t,e,r){t instanceof RegExp&&(t=Op(t,r)),e instanceof RegExp&&(e=Op(e,r));var i=kp(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 Op(t,e){var r=e.match(t);return r?r[0]:null}Ap.range=kp;function kp(t,e,r){var i,n,s,a,o,l=r.indexOf(t),u=r.indexOf(e,l+1),c=l;if(l>=0&&u>0){if(t===e)return[l,u];for(i=[],s=r.length;c>=0&&!o;)c==l?(i.push(c),l=r.indexOf(t,c+1)):i.length==1?o=[i.pop(),u]:(n=i.pop(),n<s&&(s=n,a=u),u=r.indexOf(e,c+1)),c=l<u&&l>=0?l:u;i.length&&(o=[s,a])}return o}});var $p=w((Tx,Ip)=>{var Cp=Pp();Ip.exports=pS;var qp="\0SLASH"+Math.random()+"\0",Lp="\0OPEN"+Math.random()+"\0",nl="\0CLOSE"+Math.random()+"\0",jp="\0COMMA"+Math.random()+"\0",Np="\0PERIOD"+Math.random()+"\0";function il(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function cS(t){return t.split("\\\\").join(qp).split("\\{").join(Lp).split("\\}").join(nl).split("\\,").join(jp).split("\\.").join(Np)}function dS(t){return t.split(qp).join("\\").split(Lp).join("{").split(nl).join("}").split(jp).join(",").split(Np).join(".")}function Fp(t){if(!t)return[""];var e=[],r=Cp("{","}",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=Fp(s);return s.length&&(a[a.length-1]+=o.shift(),a.push.apply(a,o)),e.push.apply(e,a),e}function pS(t){return t?(t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),xi(cS(t),!0).map(dS)):[]}function gS(t){return"{"+t+"}"}function mS(t){return/^-?0\d/.test(t)}function yS(t,e){return t<=e}function bS(t,e){return t>=e}function xi(t,e){var r=[],i=Cp("{","}",t);if(!i)return[t];var n=i.pre,s=i.post.length?xi(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),c=l||u,h=i.body.indexOf(",")>=0;if(!c&&!h)return i.post.match(/,.*\}/)?(t=i.pre+"{"+i.body+nl+i.post,xi(t)):[t];var d;if(c)d=i.body.split(/\.\./);else if(d=Fp(i.body),d.length===1&&(d=xi(d[0],!1).map(gS),d.length===1))return s.map(function(te){return i.pre+d[0]+te});var f;if(c){var y=il(d[0]),b=il(d[1]),_=Math.max(d[0].length,d[1].length),E=d.length==3?Math.abs(il(d[2])):1,R=yS,x=b<y;x&&(E*=-1,R=bS);var M=d.some(mS);f=[];for(var k=y;R(k,b);k+=E){var C;if(u)C=String.fromCharCode(k),C==="\\"&&(C="");else if(C=String(k),M){var F=_-C.length;if(F>0){var q=new Array(F+1).join("0");k<0?C="-"+q+C.slice(1):C=q+C}}f.push(C)}}else{f=[];for(var U=0;U<d.length;U++)f.push.apply(f,xi(d[U],!1))}for(var U=0;U<f.length;U++)for(var a=0;a<s.length;a++){var o=n+f[U]+s[a];(!e||c||o)&&r.push(o)}}return r}});var Cg=be(require("yargs")),qg=require("yargs/helpers"),me=be(require("node:path")),bt=be(require("node:fs/promises")),Al=be(require("fs-extra")),Gi=require("pyodide");var rl=be(require("node:path")),bp=be(require("node:fs/promises"));var qt=be(yp()),I=qt.createLogger({transports:[new qt.transports.Console({format:qt.format.combine(qt.format.splat(),qt.format.cli())})]});function Ri(t){process.emitWarning(t,{type:"DeprecationWarning"})}var ys=class{sourceUrl;isRemote;_data=null;constructor(e){e.startsWith("file://")&&(e=e.slice(7)),this.sourceUrl=e,this.isRemote=e.includes("://")}async readJson(e){if(this.isRemote){let r=rl.default.posix.join(this.sourceUrl,e);I.debug(`Fetching ${r}`);let i=await fetch(r);if(!i.ok)throw new Error(`Failed to download ${r}: ${i.status} ${i.statusText}`);return await i.json()}else{let r=rl.default.join(this.sourceUrl,e);I.debug(`Reading ${r}`);let i=await bp.default.readFile(r);return JSON.parse(i.toString())}}async loadPrebuiltPackageData(){if(this._data!=null)return this._data;I.info("Load pyodide-lock.json");let e=await this.readJson("pyodide-lock.json");return this._data=e.packages,e.packages}async getPackageInfoByName(e){let r=await this.loadPrebuiltPackageData(),i=Object.values(r).find(n=>n.name===e);if(i==null)throw new Error(`Package ${e} is not found in the lock file.`);return i}};var _p=be(require("node:fs/promises")),Sp=be(ws());var Q=be(ws()),vp=Q.object({entrypoint:Q.string(),embed:Q.defaulted(Q.boolean(),!1),idbfsMountpoints:Q.optional(Q.array(Q.string())),nodeJsWorker:Q.defaulted(Q.boolean(),!1),nodefsMountpoints:Q.optional(Q.record(Q.string(),Q.string()))});function tS(t){let e=Sp.mask(t??{},vp);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 Ep(t){let e=tS({...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 _p.default.writeFile(t.manifestFilePath,r,{encoding:"utf-8"})}var Rp=be(require("node:path")),pe=be(ws());async function xp(t){let{files:e,entrypoint:r}=rS(t),i=await iS(t),n=await nS(t);return{files:e,entrypoint:r,dependencies:i,requirementsTxtFilePaths:n}}function rS(t){let{packageJsonStliteDesktopField:e,fallbacks:{appHomeDirSource:r}}=t,i=e?.files,n=e?.entrypoint;if(i==null||n==null){Ri("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&&Ri("The `appHomeDirSource` argument is deprecated and has been ignored because `stlite.desktop.files` is specified in `package.json`.");return pe.assert(n,pe.string(),"The `stlite.desktop.entrypoint` field must be a string."),pe.assert(i,pe.array(pe.string()),"The `stlite.desktop.files` field must be an array of strings."),{files:i,entrypoint:n}}async function iS(t){let{packageJsonStliteDesktopField:e,fallbacks:{packages:r}}=t,i=e?.dependencies;pe.assert(i,pe.optional(pe.array(pe.string())),"The `stlite.desktop.dependencies` field must be an array of strings.");let n=[];return r!=null&&(Ri("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 nS(t){let{pathResolutionRoot:e,packageJsonStliteDesktopField:r,fallbacks:{requirementsTxtFilePaths:i}}=t,n=r?.requirementsTxtFiles;pe.assert(n,pe.optional(pe.array(pe.string())),"The `stlite.desktop.requirementsTxtFiles` field must be an array of strings.");let s=n?.map(o=>Rp.default.resolve(e,o)),a=[];return i!=null&&i.length>0&&(Ri("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 sS="[",aS="(<=>!~",oS=";",lS="@",uS=new RegExp(`[${sS+aS+oS+lS}]`);function fS(t){return t.split(uS)[0].trim()}function Tp(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=>fS(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)}var hS=/\s#.*$/;function Mp(t){return t.split(`
|
|
33
|
+
`).filter(e=>!e.startsWith("#")).map(e=>e.replace(hS,"")).map(e=>e.trim()).filter(e=>e!=="")}var Vp=be($p(),1);var Ti=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")};var wS={"[: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]},Mi=t=>t.replace(/[[\]\\-]/g,"\\$&"),vS=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Wp=t=>t.join(""),Bp=(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,c=r,h="";e:for(;s<t.length;){let b=t.charAt(s);if((b==="!"||b==="^")&&s===r+1){u=!0,s++;continue}if(b==="]"&&a&&!l){c=s+1;break}if(a=!0,b==="\\"&&!l){l=!0,s++;continue}if(b==="["&&!l){for(let[_,[E,R,x]]of Object.entries(wS))if(t.startsWith(_,s)){if(h)return["$.",!1,t.length-r,!0];s+=_.length,x?n.push(E):i.push(E),o=o||R;continue e}}if(l=!1,h){b>h?i.push(Mi(h)+"-"+Mi(b)):b===h&&i.push(Mi(b)),h="",s++;continue}if(t.startsWith("-]",s+1)){i.push(Mi(b+"-")),s+=2;continue}if(t.startsWith("-",s+1)){h=b,s+=2;continue}i.push(Mi(b)),s++}if(c<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[vS(b),!1,c-r,!1]}let d="["+(u?"^":"")+Wp(i)+"]",f="["+(u?"":"^")+Wp(n)+"]";return[i.length&&n.length?"("+d+"|"+f+")":i.length?d:f,o,c-r,!0]};var Ke=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var _S=new Set(["!","?","+","*","@"]),Up=t=>_S.has(t),SS="(?!(?:^|/)\\.\\.?(?:$|/))",vs="(?!\\.)",ES=new Set(["[","."]),RS=new Set(["..","."]),xS=new Set("().*{}+?[]^$\\!"),TS=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),sl="[^/]",zp=sl+"*?",Hp=sl+"+?",Ar=class t{type;#e;#t;#s=!1;#i=[];#a;#v;#u;#h=!1;#o;#l;#n=!1;constructor(e,r,i={}){this.type=e,e&&(this.#t=!0),this.#a=r,this.#e=this.#a?this.#a.#e:this,this.#o=this.#e===this?i:this.#e.#o,this.#u=this.#e===this?[]:this.#e.#u,e==="!"&&!this.#e.#h&&this.#u.push(this),this.#v=this.#a?this.#a.#i.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#i)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#l!==void 0?this.#l:this.type?this.#l=this.type+"("+this.#i.map(e=>String(e)).join("|")+")":this.#l=this.#i.map(e=>String(e)).join("")}#m(){if(this!==this.#e)throw new Error("should only call on root");if(this.#h)return this;this.toString(),this.#h=!0;let e;for(;e=this.#u.pop();){if(e.type!=="!")continue;let r=e,i=r.#a;for(;i;){for(let n=r.#v+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.#a}}return this}push(...e){for(let r of e)if(r!==""){if(typeof r!="string"&&!(r instanceof t&&r.#a===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.#h&&this.#a?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#a?.isStart())return!1;if(this.#v===0)return!0;let e=this.#a;for(let r=0;r<this.#v;r++){let i=e.#i[r];if(!(i instanceof t&&i.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#a?.type==="!")return!0;if(!this.#a?.isEnd())return!1;if(!this.type)return this.#a?.isEnd();let e=this.#a?this.#a.#i.length:0;return this.#v===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#y(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&&Up(b)&&e.charAt(f)==="("){r.push(y),y="";let _=new t(b,r);f=t.#y(e,_,f,n),r.push(_);continue}y+=b}return r.push(y),f}let u=i+1,c=new t(null,r),h=[],d="";for(;u<e.length;){let f=e.charAt(u++);if(s||f==="\\"){s=!s,d+=f;continue}if(a){u===o+1?(f==="^"||f==="!")&&(l=!0):f==="]"&&!(u===o+2&&l)&&(a=!1),d+=f;continue}else if(f==="["){a=!0,o=u,l=!1,d+=f;continue}if(Up(f)&&e.charAt(u)==="("){c.push(d),d="";let y=new t(f,c);c.push(y),u=t.#y(e,y,u,n);continue}if(f==="|"){c.push(d),d="",h.push(c),c=new t(null,r);continue}if(f===")")return d===""&&r.#i.length===0&&(r.#n=!0),c.push(d),d="",r.push(...h,c),u;d+=f}return r.type=null,r.#t=void 0,r.#i=[e.substring(i-1)],u}static fromGlob(e,r={}){let i=new t(null,void 0,r);return t.#y(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.#t||this.#o.nocase&&!this.#o.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return i;let o=(this.#o.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${r}$`,o),{_src:r,_glob:e})}get options(){return this.#o}toRegExpSource(e){let r=e??!!this.#o.dot;if(this.#e===this&&this.#m(),!this.type){let l=this.isStart()&&this.isEnd(),u=this.#i.map(f=>{let[y,b,_,E]=typeof f=="string"?t.#c(f,this.#t,l):f.toRegExpSource(e);return this.#t=this.#t||_,this.#s=this.#s||E,y}).join(""),c="";if(this.isStart()&&typeof this.#i[0]=="string"&&!(this.#i.length===1&&RS.has(this.#i[0]))){let y=ES,b=r&&y.has(u.charAt(0))||u.startsWith("\\.")&&y.has(u.charAt(2))||u.startsWith("\\.\\.")&&y.has(u.charAt(4)),_=!r&&!e&&y.has(u.charAt(0));c=b?SS:_?vs:""}let h="";return this.isEnd()&&this.#e.#h&&this.#a?.type==="!"&&(h="(?:$|\\/)"),[c+u+h,Ke(u),this.#t=!!this.#t,this.#s]}let i=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#d(r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let l=this.toString();return this.#i=[l],this.type=null,this.#t=void 0,[l,Ke(this.toString()),!1,!1]}let a=!i||e||r||!vs?"":this.#d(!0);a===s&&(a=""),a&&(s=`(?:${s})(?:${a})*?`);let o="";if(this.type==="!"&&this.#n)o=(this.isStart()&&!r?vs:"")+Hp;else{let l=this.type==="!"?"))"+(this.isStart()&&!r&&!e?vs:"")+zp+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;o=n+s+l}return[o,Ke(s),this.#t=!!this.#t,this.#s]}#d(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#c(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+=(xS.has(l)?"\\":"")+l;continue}if(l==="\\"){o===e.length-1?s+="\\\\":n=!0;continue}if(l==="["){let[u,c,h,d]=Bp(e,o);if(h){s+=u,a=a||c,o+=h-1,r=r||d;continue}}if(l==="*"){i&&e==="*"?s+=Hp:s+=zp,r=!0;continue}if(l==="?"){s+=sl,r=!0;continue}s+=TS(l)}return[s,Ke(e),!!r,a]}};var kr=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");var Te=(t,e,r={})=>(Ti(e),!r.nocomment&&e.charAt(0)==="#"?!1:new qe(e,r).match(t)),MS=/^\*+([^+@!?\*\[\(]*)$/,OS=t=>e=>!e.startsWith(".")&&e.endsWith(t),AS=t=>e=>e.endsWith(t),kS=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),DS=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),PS=/^\*+\.\*+$/,CS=t=>!t.startsWith(".")&&t.includes("."),qS=t=>t!=="."&&t!==".."&&t.includes("."),LS=/^\.\*+$/,jS=t=>t!=="."&&t!==".."&&t.startsWith("."),NS=/^\*+$/,FS=t=>t.length!==0&&!t.startsWith("."),IS=t=>t.length!==0&&t!=="."&&t!=="..",$S=/^\?+([^+@!?\*\[\(]*)?$/,WS=([t,e=""])=>{let r=Kp([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},BS=([t,e=""])=>{let r=Jp([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},US=([t,e=""])=>{let r=Jp([t]);return e?i=>r(i)&&i.endsWith(e):r},zS=([t,e=""])=>{let r=Kp([t]);return e?i=>r(i)&&i.endsWith(e):r},Kp=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},Jp=([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},Zp=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Gp={win32:{sep:"\\"},posix:{sep:"/"}},HS=Zp==="win32"?Gp.win32.sep:Gp.posix.sep;Te.sep=HS;var ge=Symbol("globstar **");Te.GLOBSTAR=ge;var GS="[^/]",YS=GS+"*?",VS="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",KS="(?:(?!(?:\\/|^)\\.).)*?",JS=(t,e={})=>r=>Te(r,t,e);Te.filter=JS;var Be=(t,e={})=>Object.assign({},t,e),ZS=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return Te;let e=Te;return Object.assign((i,n,s={})=>e(i,n,Be(t,s)),{Minimatch:class extends e.Minimatch{constructor(n,s={}){super(n,Be(t,s))}static defaults(n){return e.defaults(Be(t,n)).Minimatch}},AST:class extends e.AST{constructor(n,s,a={}){super(n,s,Be(t,a))}static fromGlob(n,s={}){return e.AST.fromGlob(n,Be(t,s))}},unescape:(i,n={})=>e.unescape(i,Be(t,n)),escape:(i,n={})=>e.escape(i,Be(t,n)),filter:(i,n={})=>e.filter(i,Be(t,n)),defaults:i=>e.defaults(Be(t,i)),makeRe:(i,n={})=>e.makeRe(i,Be(t,n)),braceExpand:(i,n={})=>e.braceExpand(i,Be(t,n)),match:(i,n,s={})=>e.match(i,n,Be(t,s)),sep:e.sep,GLOBSTAR:ge})};Te.defaults=ZS;var Qp=(t,e={})=>(Ti(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,Vp.default)(t));Te.braceExpand=Qp;var QS=(t,e={})=>new qe(t,e).makeRe();Te.makeRe=QS;var XS=(t,e,r={})=>{let i=new qe(e,r);return t=t.filter(n=>i.match(n)),i.options.nonull&&!t.length&&t.push(e),t};Te.match=XS;var Yp=/[?*]|[+@!]\(.*?\)|\[|\]/,eE=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),qe=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,r={}){Ti(e),r=r||{},this.options=r,this.pattern=e,this.platform=r.platform||Zp,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]==="?"||!Yp.test(s[2]))&&!Yp.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map(c=>this.parse(c))];if(u)return[s[0],...s.slice(1).map(c=>this.parse(c))]}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 c=i.slice(0);c[n]="**",e.push(c),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);if(n){e[r]=[],e[i]=n;break}}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]),_=!b&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),E=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),R=!E&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),x=_?3:b?0:void 0,M=R?3:E?0:void 0;if(typeof x=="number"&&typeof M=="number"){let[k,C]=[e[x],r[M]];k.toLowerCase()===C.toLowerCase()&&(r[M]=k,M>x?r=r.slice(M):x>M&&(e=e.slice(x)))}}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 c=r[o],h=e[a];if(this.debug(r,c,h),c===!1)return!1;if(c===ge){this.debug("GLOBSTAR",[r,c,h]);var d=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(;d<l;){var y=e[d];if(this.debug(`
|
|
34
34
|
globstar while`,e,d,r,f,y),this.matchOne(e.slice(d),r.slice(f),i))return this.debug("globstar found match!",d,l,y),!0;if(y==="."||y===".."||!n.dot&&y.charAt(0)==="."){this.debug("dot detected!",e,d,r,f);break}this.debug("globstar swallow a segment, and continue"),d++}return!!(i&&(this.debug(`
|
|
35
|
-
>>> no match, partial?`,e,d,r,f),d===l))}let b;if(typeof c=="string"?(b=h===c,this.debug("string match",c,h,b)):(b=c.test(h),this.debug("pattern match",c,h,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 Qp(this.pattern,this.options)}parse(e){Ti(e);let r=this.options;if(e==="**")return ge;if(e==="")return"";let i,n=null;(i=e.match(NS))?n=r.dot?IS:FS:(i=e.match(MS))?n=(r.nocase?r.dot?DS:kS:r.dot?AS:OS)(i[1]):(i=e.match($S))?n=(r.nocase?r.dot?BS:WS:r.dot?US:zS)(i):(i=e.match(PS))?n=r.dot?qS:CS:(i=e.match(LS))&&(n=jS);let s=Ar.fromGlob(e,this.options).toMMPattern();return n&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value: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?YS:r.dot?VS:KS,n=new Set(r.nocase?["i"]:[]),s=e.map(l=>{let u=l.map(c=>{if(c instanceof RegExp)for(let h of c.flags.split(""))n.add(h);return typeof c=="string"?eE(c):c===ge?ge:c._src});return u.forEach((c,h)=>{let d=u[h+1],f=u[h-1];c!==ge||f===ge||(f===void 0?d!==void 0&&d!==ge?u[h+1]="(?:\\/|"+i+"\\/)?"+d:u[h]=i:d===void 0?u[h-1]=f+"(?:\\/|"+i+")?":d!==ge&&(u[h-1]=f+"(?:\\/|\\/"+i+"\\/)"+d,u[h+1]=ge))}),u.filter(c=>c!==ge).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 Te.defaults(e).Minimatch}};Te.AST=Ar;Te.Minimatch=qe;Te.escape=kr;Te.unescape=Ke;var Mg=require("node:url");var Dr=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,eg=new Set,sl=typeof process=="object"&&process?process:{},tg=(t,e,r,i)=>{typeof sl.emitWarning=="function"?sl.emitWarning(t,e,r,i):console.error(`[${r}] ${e}: ${t}`)},_s=globalThis.AbortController,Xp=globalThis.AbortSignal;if(typeof _s>"u"){Xp=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,n){this._onabort.push(n)}},_s=class{constructor(){e()}signal=new Xp;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=sl.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,tg("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 tE=t=>!eg.has(t),Gx=Symbol("type"),Lt=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),rg=t=>Lt(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Pr:null:null,Pr=class extends Array{constructor(e){super(e),this.fill(0)}},al=class t{heap;length;static#e=!1;static create(e){let r=rg(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]}},Oi=class t{#e;#t;#s;#i;#a;#v;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#u;#h;#o;#l;#n;#m;#y;#d;#c;#E;#g;#R;#x;#w;#_;#S;#p;static unsafeExposeInternals(e){return{starts:e.#x,ttls:e.#w,sizes:e.#R,keyMap:e.#o,keyList:e.#l,valList:e.#n,next:e.#m,prev:e.#y,get head(){return e.#d},get tail(){return e.#c},free:e.#E,isBackgroundFetch:r=>e.#f(r),backgroundFetch:(r,i,n,s)=>e.#F(r,i,n,s),moveToTail:r=>e.#$(r),indexes:r=>e.#M(r),rindexes:r=>e.#O(r),isStale:r=>e.#b(r)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#h}get size(){return this.#u}get fetchMethod(){return this.#a}get memoMethod(){return this.#v}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:c,noDisposeOnSet:h,noUpdateTTL:d,maxSize:f=0,maxEntrySize:y=0,sizeCalculation:b,fetchMethod:_,memoMethod:E,noDeleteOnFetchRejection:R,noDeleteOnStaleGet:x,allowStaleOnFetchRejection:M,allowStaleOnFetchAbort:k,ignoreFetchAbort:C}=e;if(r!==0&&!Lt(r))throw new TypeError("max option must be a nonnegative integer");let F=r?rg(r):Array;if(!F)throw new Error("invalid max value: "+r);if(this.#e=r,this.#t=f,this.maxEntrySize=y||this.#t,this.sizeCalculation=b,this.sizeCalculation){if(!this.#t&&!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(E!==void 0&&typeof E!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#v=E,_!==void 0&&typeof _!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#a=_,this.#S=!!_,this.#o=new Map,this.#l=new Array(r).fill(void 0),this.#n=new Array(r).fill(void 0),this.#m=new F(r),this.#y=new F(r),this.#d=0,this.#c=0,this.#E=al.create(r),this.#u=0,this.#h=0,typeof u=="function"&&(this.#s=u),typeof c=="function"?(this.#i=c,this.#g=[]):(this.#i=void 0,this.#g=void 0),this.#_=!!this.#s,this.#p=!!this.#i,this.noDisposeOnSet=!!h,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!R,this.allowStaleOnFetchRejection=!!M,this.allowStaleOnFetchAbort=!!k,this.ignoreFetchAbort=!!C,this.maxEntrySize!==0){if(this.#t!==0&&!Lt(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!Lt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#k()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!x,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!o,this.ttlResolution=Lt(n)||n===0?n:1,this.ttlAutopurge=!!s,this.ttl=i||0,this.ttl){if(!Lt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#A()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let q="LRU_CACHE_UNBOUNDED";tE(q)&&(eg.add(q),tg("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",q,t))}}getRemainingTTL(e){return this.#o.has(e)?1/0:0}#A(){let e=new Pr(this.#e),r=new Pr(this.#e);this.#w=e,this.#x=r,this.#P=(s,a,o=Dr.now())=>{if(r[s]=a!==0?o:0,e[s]=a,a!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#b(s)&&this.#D(this.#l[s],"expire")},a+1);l.unref&&l.unref()}},this.#T=s=>{r[s]=e[s]!==0?Dr.now():0},this.#r=(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=Dr.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.#o.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}}#T=()=>{};#r=()=>{};#P=()=>{};#b=()=>!1;#k(){let e=new Pr(this.#e);this.#h=0,this.#R=e,this.#C=r=>{this.#h-=e[r],e[r]=0},this.#L=(r,i,n,s)=>{if(this.#f(i))return 0;if(!Lt(n))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(n=s(i,r),!Lt(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.#q=(r,i,n)=>{if(e[r]=i,this.#t){let s=this.#t-e[r];for(;this.#h>s;)this.#N(!0)}this.#h+=e[r],n&&(n.entrySize=i,n.totalCalculatedSize=this.#h)}}#C=e=>{};#q=(e,r,i)=>{};#L=(e,r,i,n)=>{if(i||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#M({allowStale:e=this.allowStale}={}){if(this.#u)for(let r=this.#c;!(!this.#j(r)||((e||!this.#b(r))&&(yield r),r===this.#d));)r=this.#y[r]}*#O({allowStale:e=this.allowStale}={}){if(this.#u)for(let r=this.#d;!(!this.#j(r)||((e||!this.#b(r))&&(yield r),r===this.#c));)r=this.#m[r]}#j(e){return e!==void 0&&this.#o.get(this.#l[e])===e}*entries(){for(let e of this.#M())this.#n[e]!==void 0&&this.#l[e]!==void 0&&!this.#f(this.#n[e])&&(yield[this.#l[e],this.#n[e]])}*rentries(){for(let e of this.#O())this.#n[e]!==void 0&&this.#l[e]!==void 0&&!this.#f(this.#n[e])&&(yield[this.#l[e],this.#n[e]])}*keys(){for(let e of this.#M()){let r=this.#l[e];r!==void 0&&!this.#f(this.#n[e])&&(yield r)}}*rkeys(){for(let e of this.#O()){let r=this.#l[e];r!==void 0&&!this.#f(this.#n[e])&&(yield r)}}*values(){for(let e of this.#M())this.#n[e]!==void 0&&!this.#f(this.#n[e])&&(yield this.#n[e])}*rvalues(){for(let e of this.#O())this.#n[e]!==void 0&&!this.#f(this.#n[e])&&(yield this.#n[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,r={}){for(let i of this.#M()){let n=this.#n[i],s=this.#f(n)?n.__staleWhileFetching:n;if(s!==void 0&&e(s,this.#l[i],this))return this.get(this.#l[i],r)}}forEach(e,r=this){for(let i of this.#M()){let n=this.#n[i],s=this.#f(n)?n.__staleWhileFetching:n;s!==void 0&&e.call(r,s,this.#l[i],this)}}rforEach(e,r=this){for(let i of this.#O()){let n=this.#n[i],s=this.#f(n)?n.__staleWhileFetching:n;s!==void 0&&e.call(r,s,this.#l[i],this)}}purgeStale(){let e=!1;for(let r of this.#O({allowStale:!0}))this.#b(r)&&(this.#D(this.#l[r],"expire"),e=!0);return e}info(e){let r=this.#o.get(e);if(r===void 0)return;let i=this.#n[r],n=this.#f(i)?i.__staleWhileFetching:i;if(n===void 0)return;let s={value:n};if(this.#w&&this.#x){let a=this.#w[r],o=this.#x[r];if(a&&o){let l=a-(Dr.now()-o);s.ttl=l,s.start=Date.now()}}return this.#R&&(s.size=this.#R[r]),s}dump(){let e=[];for(let r of this.#M({allowStale:!0})){let i=this.#l[r],n=this.#n[r],s=this.#f(n)?n.__staleWhileFetching:n;if(s===void 0||i===void 0)continue;let a={value:s};if(this.#w&&this.#x){a.ttl=this.#w[r];let o=Dr.now()-this.#x[r];a.start=Math.floor(Date.now()-o)}this.#R&&(a.size=this.#R[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=Dr.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,c=this.#L(e,r,i.size||0,o);if(this.maxEntrySize&&c>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.#D(e,"set"),this;let h=this.#u===0?void 0:this.#o.get(e);if(h===void 0)h=this.#u===0?this.#c:this.#E.length!==0?this.#E.pop():this.#u===this.#e?this.#N(!1):this.#u,this.#l[h]=e,this.#n[h]=r,this.#o.set(e,h),this.#m[this.#c]=h,this.#y[h]=this.#c,this.#c=h,this.#u++,this.#q(h,c,l),l&&(l.set="add"),u=!1;else{this.#$(h);let d=this.#n[h];if(r!==d){if(this.#S&&this.#f(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:f}=d;f!==void 0&&!a&&(this.#_&&this.#s?.(f,e,"set"),this.#p&&this.#g?.push([f,e,"set"]))}else a||(this.#_&&this.#s?.(d,e,"set"),this.#p&&this.#g?.push([d,e,"set"]));if(this.#C(h),this.#q(h,c,l),this.#n[h]=r,l){l.set="replace";let f=d&&this.#f(d)?d.__staleWhileFetching:d;f!==void 0&&(l.oldValue=f)}}else l&&(l.set="update")}if(n!==0&&!this.#w&&this.#A(),this.#w&&(u||this.#P(h,n,s),l&&this.#r(l,h)),!a&&this.#p&&this.#g){let d=this.#g,f;for(;f=d?.shift();)this.#i?.(...f)}return this}pop(){try{for(;this.#u;){let e=this.#n[this.#d];if(this.#N(!0),this.#f(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#p&&this.#g){let e=this.#g,r;for(;r=e?.shift();)this.#i?.(...r)}}}#N(e){let r=this.#d,i=this.#l[r],n=this.#n[r];return this.#S&&this.#f(n)?n.__abortController.abort(new Error("evicted")):(this.#_||this.#p)&&(this.#_&&this.#s?.(n,i,"evict"),this.#p&&this.#g?.push([n,i,"evict"])),this.#C(r),e&&(this.#l[r]=void 0,this.#n[r]=void 0,this.#E.push(r)),this.#u===1?(this.#d=this.#c=0,this.#E.length=0):this.#d=this.#m[r],this.#o.delete(i),this.#u--,r}has(e,r={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:n}=r,s=this.#o.get(e);if(s!==void 0){let a=this.#n[s];if(this.#f(a)&&a.__staleWhileFetching===void 0)return!1;if(this.#b(s))n&&(n.has="stale",this.#r(n,s));else return i&&this.#T(s),n&&(n.has="hit",this.#r(n,s)),!0}else n&&(n.has="miss");return!1}peek(e,r={}){let{allowStale:i=this.allowStale}=r,n=this.#o.get(e);if(n===void 0||!i&&this.#b(n))return;let s=this.#n[n];return this.#f(s)?s.__staleWhileFetching:s}#F(e,r,i,n){let s=r===void 0?void 0:this.#n[r];if(this.#f(s))return s;let a=new _s,{signal:o}=i;o?.addEventListener("abort",()=>a.abort(o.reason),{signal:a.signal});let l={signal:a.signal,options:i,context:n},u=(b,_=!1)=>{let{aborted:E}=a.signal,R=i.ignoreFetchAbort&&b!==void 0;if(i.status&&(E&&!_?(i.status.fetchAborted=!0,i.status.fetchError=a.signal.reason,R&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),E&&!R&&!_)return h(a.signal.reason);let x=f;return this.#n[r]===f&&(b===void 0?x.__staleWhileFetching?this.#n[r]=x.__staleWhileFetching:this.#D(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(e,b,l.options))),b},c=b=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=b),h(b)),h=b=>{let{aborted:_}=a.signal,E=_&&i.allowStaleOnFetchAbort,R=E||i.allowStaleOnFetchRejection,x=R||i.noDeleteOnFetchRejection,M=f;if(this.#n[r]===f&&(!x||M.__staleWhileFetching===void 0?this.#D(e,"fetch"):E||(this.#n[r]=M.__staleWhileFetching)),R)return i.status&&M.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),M.__staleWhileFetching;if(M.__returned===M)throw b},d=(b,_)=>{let E=this.#a?.(e,s,l);E&&E instanceof Promise&&E.then(R=>b(R===void 0?void 0:R),_),a.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(b(void 0),i.allowStaleOnFetchAbort&&(b=R=>u(R,!0)))})};i.status&&(i.status.fetchDispatched=!0);let f=new Promise(d).then(u,c),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.#o.get(e)):this.#n[r]=y,y}#f(e){if(!this.#S)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof _s}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:c=this.noUpdateTTL,noDeleteOnFetchRejection:h=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:y=this.allowStaleOnFetchAbort,context:b,forceRefresh:_=!1,status:E,signal:R}=r;if(!this.#S)return E&&(E.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,status:E});let x={allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,ttl:a,noDisposeOnSet:o,size:l,sizeCalculation:u,noUpdateTTL:c,noDeleteOnFetchRejection:h,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:y,ignoreFetchAbort:f,status:E,signal:R},M=this.#o.get(e);if(M===void 0){E&&(E.fetch="miss");let k=this.#F(e,M,x,b);return k.__returned=k}else{let k=this.#n[M];if(this.#f(k)){let te=i&&k.__staleWhileFetching!==void 0;return E&&(E.fetch="inflight",te&&(E.returnedStale=!0)),te?k.__staleWhileFetching:k.__returned=k}let C=this.#b(M);if(!_&&!C)return E&&(E.fetch="hit"),this.#$(M),n&&this.#T(M),E&&this.#r(E,M),k;let F=this.#F(e,M,x,b),U=F.__staleWhileFetching!==void 0&&i;return E&&(E.fetch=C?"stale":"refresh",U&&C&&(E.returnedStale=!0)),U?F.__staleWhileFetching:F.__returned=F}}async forceFetch(e,r={}){let i=await this.fetch(e,r);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,r={}){let i=this.#v;if(!i)throw new Error("no memoMethod provided to constructor");let{context:n,forceRefresh:s,...a}=r,o=this.get(e,a);if(!s&&o!==void 0)return o;let l=i(e,o,{options:a,context:n});return this.set(e,l,a),l}get(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:a}=r,o=this.#o.get(e);if(o!==void 0){let l=this.#n[o],u=this.#f(l);return a&&this.#r(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.#D(e,"expire"),a&&i&&(a.returnedStale=!0),i?l:void 0)):(a&&(a.get="hit"),u?l.__staleWhileFetching:(this.#$(o),n&&this.#T(o),l))}else a&&(a.get="miss")}#I(e,r){this.#y[r]=e,this.#m[e]=r}#$(e){e!==this.#c&&(e===this.#d?this.#d=this.#m[e]:this.#I(this.#y[e],this.#m[e]),this.#I(this.#c,e),this.#c=e)}delete(e){return this.#D(e,"delete")}#D(e,r){let i=!1;if(this.#u!==0){let n=this.#o.get(e);if(n!==void 0)if(i=!0,this.#u===1)this.#W(r);else{this.#C(n);let s=this.#n[n];if(this.#f(s)?s.__abortController.abort(new Error("deleted")):(this.#_||this.#p)&&(this.#_&&this.#s?.(s,e,r),this.#p&&this.#g?.push([s,e,r])),this.#o.delete(e),this.#l[n]=void 0,this.#n[n]=void 0,n===this.#c)this.#c=this.#y[n];else if(n===this.#d)this.#d=this.#m[n];else{let a=this.#y[n];this.#m[a]=this.#m[n];let o=this.#m[n];this.#y[o]=this.#y[n]}this.#u--,this.#E.push(n)}}if(this.#p&&this.#g?.length){let n=this.#g,s;for(;s=n?.shift();)this.#i?.(...s)}return i}clear(){return this.#W("delete")}#W(e){for(let r of this.#O({allowStale:!0})){let i=this.#n[r];if(this.#f(i))i.__abortController.abort(new Error("deleted"));else{let n=this.#l[r];this.#_&&this.#s?.(i,n,e),this.#p&&this.#g?.push([i,n,e])}}if(this.#o.clear(),this.#n.fill(void 0),this.#l.fill(void 0),this.#w&&this.#x&&(this.#w.fill(0),this.#x.fill(0)),this.#R&&this.#R.fill(0),this.#d=0,this.#c=0,this.#E.length=0,this.#h=0,this.#u=0,this.#p&&this.#g){let r=this.#g,i;for(;i=r?.shift();)this.#i?.(...i)}}};var jr=require("node:path"),cg=require("node:url"),lt=require("fs"),hE=be(require("node:fs"),1),Nt=require("node:fs/promises");var Os=require("node:events"),dl=be(require("node:stream"),1),og=require("node:string_decoder"),ig=typeof process=="object"&&process?process:{stdout:null,stderr:null},rE=t=>!!t&&typeof t=="object"&&(t instanceof Lr||t instanceof dl.default||iE(t)||nE(t)),iE=t=>!!t&&typeof t=="object"&&t instanceof Os.EventEmitter&&typeof t.pipe=="function"&&t.pipe!==dl.default.Writable.prototype.pipe,nE=t=>!!t&&typeof t=="object"&&t instanceof Os.EventEmitter&&typeof t.write=="function"&&typeof t.end=="function",pt=Symbol("EOF"),gt=Symbol("maybeEmitEnd"),jt=Symbol("emittedEnd"),Ss=Symbol("emittingEnd"),Ai=Symbol("emittedError"),Es=Symbol("closed"),ng=Symbol("read"),Rs=Symbol("flush"),sg=Symbol("flushChunk"),Je=Symbol("encoding"),Cr=Symbol("decoder"),ae=Symbol("flowing"),ki=Symbol("paused"),qr=Symbol("resume"),oe=Symbol("buffer"),Me=Symbol("pipes"),le=Symbol("bufferLength"),ol=Symbol("bufferPush"),xs=Symbol("bufferShift"),we=Symbol("objectMode"),X=Symbol("destroyed"),ll=Symbol("error"),ul=Symbol("emitData"),ag=Symbol("emitEnd"),fl=Symbol("emitEnd2"),at=Symbol("async"),hl=Symbol("abort"),Ts=Symbol("aborted"),Di=Symbol("signal"),ar=Symbol("dataListeners"),Le=Symbol("discarded"),Pi=t=>Promise.resolve().then(t),sE=t=>t(),aE=t=>t==="end"||t==="finish"||t==="prefinish",oE=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,lE=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),Ms=class{src;dest;opts;ondrain;constructor(e,r,i){this.src=e,this.dest=r,this.opts=i,this.ondrain=()=>e[qr](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},cl=class extends Ms{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)}},uE=t=>!!t.objectMode,fE=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",Lr=class extends Os.EventEmitter{[ae]=!1;[ki]=!1;[Me]=[];[oe]=[];[we];[Je];[at];[Cr];[pt]=!1;[jt]=!1;[Ss]=!1;[Es]=!1;[Ai]=null;[le]=0;[X]=!1;[Di];[Ts]=!1;[ar]=0;[Le]=!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");uE(r)?(this[we]=!0,this[Je]=null):fE(r)?(this[Je]=r.encoding,this[we]=!1):(this[we]=!1,this[Je]=null),this[at]=!!r.async,this[Cr]=this[Je]?new og.StringDecoder(this[Je]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[oe]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Me]});let{signal:i}=r;i&&(this[Di]=i,i.aborted?this[hl]():i.addEventListener("abort",()=>this[hl]()))}get bufferLength(){return this[le]}get encoding(){return this[Je]}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[we]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[at]}set async(e){this[at]=this[at]||!!e}[hl](){this[Ts]=!0,this.emit("abort",this[Di]?.reason),this.destroy(this[Di]?.reason)}get aborted(){return this[Ts]}set aborted(e){}write(e,r,i){if(this[Ts])return!1;if(this[pt])throw new Error("write after end");if(this[X])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[at]?Pi:sE;if(!this[we]&&!Buffer.isBuffer(e)){if(lE(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(oE(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[we]?(this[ae]&&this[le]!==0&&this[Rs](!0),this[ae]?this.emit("data",e):this[ol](e),this[le]!==0&&this.emit("readable"),i&&n(i),this[ae]):e.length?(typeof e=="string"&&!(r===this[Je]&&!this[Cr]?.lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[Je]&&(e=this[Cr].write(e)),this[ae]&&this[le]!==0&&this[Rs](!0),this[ae]?this.emit("data",e):this[ol](e),this[le]!==0&&this.emit("readable"),i&&n(i),this[ae]):(this[le]!==0&&this.emit("readable"),i&&n(i),this[ae])}read(e){if(this[X])return null;if(this[Le]=!1,this[le]===0||e===0||e&&e>this[le])return this[gt](),null;this[we]&&(e=null),this[oe].length>1&&!this[we]&&(this[oe]=[this[Je]?this[oe].join(""):Buffer.concat(this[oe],this[le])]);let r=this[ng](e||null,this[oe][0]);return this[gt](),r}[ng](e,r){if(this[we])this[xs]();else{let i=r;e===i.length||e===null?this[xs]():typeof i=="string"?(this[oe][0]=i.slice(e),r=i.slice(0,e),this[le]-=e):(this[oe][0]=i.subarray(e),r=i.subarray(0,e),this[le]-=e)}return this.emit("data",r),!this[oe].length&&!this[pt]&&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[pt]=!0,this.writable=!1,(this[ae]||!this[ki])&&this[gt](),this}[qr](){this[X]||(!this[ar]&&!this[Me].length&&(this[Le]=!0),this[ki]=!1,this[ae]=!0,this.emit("resume"),this[oe].length?this[Rs]():this[pt]?this[gt]():this.emit("drain"))}resume(){return this[qr]()}pause(){this[ae]=!1,this[ki]=!0,this[Le]=!1}get destroyed(){return this[X]}get flowing(){return this[ae]}get paused(){return this[ki]}[ol](e){this[we]?this[le]+=1:this[le]+=e.length,this[oe].push(e)}[xs](){return this[we]?this[le]-=1:this[le]-=this[oe][0].length,this[oe].shift()}[Rs](e=!1){do;while(this[sg](this[xs]())&&this[oe].length);!e&&!this[oe].length&&!this[pt]&&this.emit("drain")}[sg](e){return this.emit("data",e),this[ae]}pipe(e,r){if(this[X])return e;this[Le]=!1;let i=this[jt];return r=r||{},e===ig.stdout||e===ig.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,i?r.end&&e.end():(this[Me].push(r.proxyErrors?new cl(this,e,r):new Ms(this,e,r)),this[at]?Pi(()=>this[qr]()):this[qr]()),e}unpipe(e){let r=this[Me].find(i=>i.dest===e);r&&(this[Me].length===1?(this[ae]&&this[ar]===0&&(this[ae]=!1),this[Me]=[]):this[Me].splice(this[Me].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[Le]=!1,this[ar]++,!this[Me].length&&!this[ae]&&this[qr]();else if(e==="readable"&&this[le]!==0)super.emit("readable");else if(aE(e)&&this[jt])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[Ai]){let n=r;this[at]?Pi(()=>n.call(this,this[Ai])):n.call(this,this[Ai])}return i}removeListener(e,r){return this.off(e,r)}off(e,r){let i=super.off(e,r);return e==="data"&&(this[ar]=this.listeners("data").length,this[ar]===0&&!this[Le]&&!this[Me].length&&(this[ae]=!1)),i}removeAllListeners(e){let r=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[ar]=0,!this[Le]&&!this[Me].length&&(this[ae]=!1)),r}get emittedEnd(){return this[jt]}[gt](){!this[Ss]&&!this[jt]&&!this[X]&&this[oe].length===0&&this[pt]&&(this[Ss]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Es]&&this.emit("close"),this[Ss]=!1)}emit(e,...r){let i=r[0];if(e!=="error"&&e!=="close"&&e!==X&&this[X])return!1;if(e==="data")return!this[we]&&!i?!1:this[at]?(Pi(()=>this[ul](i)),!0):this[ul](i);if(e==="end")return this[ag]();if(e==="close"){if(this[Es]=!0,!this[jt]&&!this[X])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[Ai]=i,super.emit(ll,i);let s=!this[Di]||this.listeners("error").length?super.emit("error",i):!1;return this[gt](),s}else if(e==="resume"){let s=super.emit("resume");return this[gt](),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[gt](),n}[ul](e){for(let i of this[Me])i.dest.write(e)===!1&&this.pause();let r=this[Le]?!1:super.emit("data",e);return this[gt](),r}[ag](){return this[jt]?!1:(this[jt]=!0,this.readable=!1,this[at]?(Pi(()=>this[fl]()),!0):this[fl]())}[fl](){if(this[Cr]){let r=this[Cr].end();if(r){for(let i of this[Me])i.dest.write(r);this[Le]||super.emit("data",r)}}for(let r of this[Me])r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[we]||(e.dataLength=0);let r=this.promise();return this.on("data",i=>{e.push(i),this[we]||(e.dataLength+=i.length)}),await r,e}async concat(){if(this[we])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Je]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,r)=>{this.on(X,()=>r(new Error("stream destroyed"))),this.on("error",i=>r(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Le]=!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[pt])return r();let s,a,o=h=>{this.off("data",l),this.off("end",u),this.off(X,c),r(),a(h)},l=h=>{this.off("error",o),this.off("end",u),this.off(X,c),this.pause(),s({value:h,done:!!this[pt]})},u=()=>{this.off("error",o),this.off("data",l),this.off(X,c),r(),s({done:!0,value:void 0})},c=()=>o(new Error("stream destroyed"));return new Promise((h,d)=>{a=d,s=h,this.once(X,c),this.once("error",o),this.once("end",u),this.once("data",l)})},throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Le]=!1;let e=!1,r=()=>(this.pause(),this.off(ll,r),this.off(X,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(ll,r),this.once(X,r),{next:i,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(e){if(this[X])return e?this.emit("error",e):this.emit(X),this;this[X]=!0,this[Le]=!0,this[oe].length=0,this[le]=0;let r=this;return typeof r.close=="function"&&!this[Es]&&r.close(),e?this.emit("error",e):this.emit(X),this}static get isStream(){return rE}};var cE=lt.realpathSync.native,qi={lstatSync:lt.lstatSync,readdir:lt.readdir,readdirSync:lt.readdirSync,readlinkSync:lt.readlinkSync,realpathSync:cE,promises:{lstat:Nt.lstat,readdir:Nt.readdir,readlink:Nt.readlink,realpath:Nt.realpath}},dg=t=>!t||t===qi||t===hE?qi:{...qi,...t,promises:{...qi.promises,...t.promises||{}}},pg=/^\\\\\?\\([a-z]:)\\?$/i,dE=t=>t.replace(/\//g,"\\").replace(pg,"$1\\"),pE=/[\\\/]/,ze=0,gg=1,mg=2,ot=4,yg=6,bg=8,or=10,wg=12,Ue=15,Ci=~Ue,pl=16,lg=32,Li=64,Ze=128,As=256,Ds=512,ug=Li|Ze|Ds,gE=1023,gl=t=>t.isFile()?bg:t.isDirectory()?ot:t.isSymbolicLink()?or:t.isCharacterDevice()?mg:t.isBlockDevice()?yg:t.isSocket()?wg:t.isFIFO()?gg:ze,fg=new Map,ji=t=>{let e=fg.get(t);if(e)return e;let r=t.normalize("NFKD");return fg.set(t,r),r},hg=new Map,ks=t=>{let e=hg.get(t);if(e)return e;let r=ji(t.toLowerCase());return hg.set(t,r),r},Ps=class extends Oi{constructor(){super({max:256})}},ml=class extends Oi{constructor(e=16*1024){super({maxSize:e,sizeCalculation:r=>r.length+1})}},vg=Symbol("PathScurry setAsCwd"),ve=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#s;get mode(){return this.#s}#i;get nlink(){return this.#i}#a;get uid(){return this.#a}#v;get gid(){return this.#v}#u;get rdev(){return this.#u}#h;get blksize(){return this.#h}#o;get ino(){return this.#o}#l;get size(){return this.#l}#n;get blocks(){return this.#n}#m;get atimeMs(){return this.#m}#y;get mtimeMs(){return this.#y}#d;get ctimeMs(){return this.#d}#c;get birthtimeMs(){return this.#c}#E;get atime(){return this.#E}#g;get mtime(){return this.#g}#R;get ctime(){return this.#R}#x;get birthtime(){return this.#x}#w;#_;#S;#p;#A;#T;#r;#P;#b;#k;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,r=ze,i,n,s,a,o){this.name=e,this.#w=s?ks(e):ji(e),this.#r=r&gE,this.nocase=s,this.roots=n,this.root=i||this,this.#P=a,this.#S=o.fullpath,this.#A=o.relative,this.#T=o.relativePosix,this.parent=o.parent,this.parent?this.#e=this.parent.#e:this.#e=dg(o.fs)}depth(){return this.#_!==void 0?this.#_:this.parent?this.#_=this.parent.depth()+1:this.#_=0}childrenCache(){return this.#P}resolve(e){if(!e)return this;let r=this.getRootString(e),n=e.substring(r.length).split(this.splitSep);return r?this.getRoot(r).#C(n):this.#C(n)}#C(e){let r=this;for(let i of e)r=r.child(i);return r}children(){let e=this.#P.get(this);if(e)return e;let r=Object.assign([],{provisional:0});return this.#P.set(this,r),this.#r&=~pl,r}child(e,r){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let i=this.children(),n=this.nocase?ks(e):ji(e);for(let l of i)if(l.#w===n)return l;let s=this.parent?this.sep:"",a=this.#S?this.#S+s+e:void 0,o=this.newChild(e,ze,{...r,parent:this,fullpath:a});return this.canReaddir()||(o.#r|=Ze),i.push(o),o}relative(){if(this.isCWD)return"";if(this.#A!==void 0)return this.#A;let e=this.name,r=this.parent;if(!r)return this.#A=this.name;let i=r.relative();return i+(!i||!r.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#T!==void 0)return this.#T;let e=this.name,r=this.parent;if(!r)return this.#T=this.fullpathPosix();let i=r.relativePosix();return i+(!i||!r.parent?"":"/")+e}fullpath(){if(this.#S!==void 0)return this.#S;let e=this.name,r=this.parent;if(!r)return this.#S=this.name;let n=r.fullpath()+(r.parent?this.sep:"")+e;return this.#S=n}fullpathPosix(){if(this.#p!==void 0)return this.#p;if(this.sep==="/")return this.#p=this.fullpath();if(!this.parent){let n=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(n)?this.#p=`//?/${n}`:this.#p=n}let e=this.parent,r=e.fullpathPosix(),i=r+(!r||!e.parent?"":"/")+this.name;return this.#p=i}isUnknown(){return(this.#r&Ue)===ze}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.#r&Ue)===bg}isDirectory(){return(this.#r&Ue)===ot}isCharacterDevice(){return(this.#r&Ue)===mg}isBlockDevice(){return(this.#r&Ue)===yg}isFIFO(){return(this.#r&Ue)===gg}isSocket(){return(this.#r&Ue)===wg}isSymbolicLink(){return(this.#r&or)===or}lstatCached(){return this.#r&lg?this:void 0}readlinkCached(){return this.#b}realpathCached(){return this.#k}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#b)return!0;if(!this.parent)return!1;let e=this.#r&Ue;return!(e!==ze&&e!==or||this.#r&As||this.#r&Ze)}calledReaddir(){return!!(this.#r&pl)}isENOENT(){return!!(this.#r&Ze)}isNamed(e){return this.nocase?this.#w===ks(e):this.#w===ji(e)}async readlink(){let e=this.#b;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.#b=i}catch(r){this.#f(r.code);return}}readlinkSync(){let e=this.#b;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.#b=i}catch(r){this.#f(r.code);return}}#q(e){this.#r|=pl;for(let r=e.provisional;r<e.length;r++){let i=e[r];i&&i.#L()}}#L(){this.#r&Ze||(this.#r=(this.#r|Ze)&Ci,this.#M())}#M(){let e=this.children();e.provisional=0;for(let r of e)r.#L()}#O(){this.#r|=Ds,this.#j()}#j(){if(this.#r&Li)return;let e=this.#r;(e&Ue)===ot&&(e&=Ci),this.#r=e|Li,this.#M()}#N(e=""){e==="ENOTDIR"||e==="EPERM"?this.#j():e==="ENOENT"?this.#L():this.children().provisional=0}#F(e=""){e==="ENOTDIR"?this.parent.#j():e==="ENOENT"&&this.#L()}#f(e=""){let r=this.#r;r|=As,e==="ENOENT"&&(r|=Ze),(e==="EINVAL"||e==="UNKNOWN")&&(r&=Ci),this.#r=r,e==="ENOTDIR"&&this.parent&&this.parent.#j()}#I(e,r){return this.#D(e,r)||this.#$(e,r)}#$(e,r){let i=gl(e),n=this.newChild(e.name,i,{parent:this}),s=n.#r&Ue;return s!==ot&&s!==or&&s!==ze&&(n.#r|=Li),r.unshift(n),r.provisional++,n}#D(e,r){for(let i=r.provisional;i<r.length;i++){let n=r[i];if((this.nocase?ks(e.name):ji(e.name))===n.#w)return this.#W(e,n,i,r)}}#W(e,r,i,n){let s=r.name;return r.#r=r.#r&Ci|gl(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.#r&Ze)===0)try{return this.#H(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#F(e.code)}}lstatSync(){if((this.#r&Ze)===0)try{return this.#H(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#F(e.code)}}#H(e){let{atime:r,atimeMs:i,birthtime:n,birthtimeMs:s,blksize:a,blocks:o,ctime:l,ctimeMs:u,dev:c,gid:h,ino:d,mode:f,mtime:y,mtimeMs:b,nlink:_,rdev:E,size:R,uid:x}=e;this.#E=r,this.#m=i,this.#x=n,this.#c=s,this.#h=a,this.#n=o,this.#R=l,this.#d=u,this.#t=c,this.#v=h,this.#o=d,this.#s=f,this.#g=y,this.#y=b,this.#i=_,this.#u=E,this.#l=R,this.#a=x;let M=gl(e);this.#r=this.#r&Ci|M|lg,M!==ze&&M!==ot&&M!==or&&(this.#r|=Li)}#U=[];#z=!1;#G(e){this.#z=!1;let r=this.#U.slice();this.#U.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.#U.push(e),this.#z)return;this.#z=!0;let n=this.fullpath();this.#e.readdir(n,{withFileTypes:!0},(s,a)=>{if(s)this.#N(s.code),i.provisional=0;else{for(let o of a)this.#I(o,i);this.#q(i)}this.#G(i.slice(0,i.provisional))})}#B;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.#B)await this.#B;else{let i=()=>{};this.#B=new Promise(n=>i=n);try{for(let n of await this.#e.promises.readdir(r,{withFileTypes:!0}))this.#I(n,e);this.#q(e)}catch(n){this.#N(n.code),e.provisional=0}this.#B=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.#I(i,e);this.#q(e)}catch(i){this.#N(i.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#r&ug)return!1;let e=Ue&this.#r;return e===ze||e===ot||e===or}shouldWalk(e,r){return(this.#r&ot)===ot&&!(this.#r&ug)&&!e.has(this)&&(!r||r(this))}async realpath(){if(this.#k)return this.#k;if(!((Ds|As|Ze)&this.#r))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#k=this.resolve(e)}catch{this.#O()}}realpathSync(){if(this.#k)return this.#k;if(!((Ds|As|Ze)&this.#r))try{let e=this.#e.realpathSync(this.fullpath());return this.#k=this.resolve(e)}catch{this.#O()}}[vg](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let r=new Set([]),i=[],n=this;for(;n&&n.parent;)r.add(n),n.#A=i.join(this.sep),n.#T=i.join("/"),n=n.parent,i.push("..");for(n=e;n&&n.parent&&!r.has(n);)n.#A=void 0,n.#T=void 0,n=n.parent}},Cs=class t extends ve{sep="\\";splitSep=pE;constructor(e,r=ze,i,n,s,a,o){super(e,r,i,n,s,a,o)}newChild(e,r=ze,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(e){return jr.win32.parse(e).root}getRoot(e){if(e=dE(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 Nr(e,this).root}sameRoot(e,r=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(pg,"$1\\"),e===r}},qs=class t extends ve{splitSep="/";sep="/";constructor(e,r=ze,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=ze,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}},Ls=class{root;rootPath;roots;cwd;#e;#t;#s;nocase;#i;constructor(e=process.cwd(),r,i,{nocase:n,childrenCacheSize:s=16*1024,fs:a=qi}={}){this.#i=dg(a),(e instanceof URL||e.startsWith("file://"))&&(e=(0,cg.fileURLToPath)(e));let o=r.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#e=new Ps,this.#t=new Ps,this.#s=new ml(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,c=l.length-1,h=r.sep,d=this.rootPath,f=!1;for(let y of l){let b=c--;u=u.child(y,{relative:new Array(b).fill("..").join(h),relativePosix:new Array(b).fill("..").join("/"),fullpath:d+=(f?"":h)+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.#t.get(r);if(i!==void 0)return i;let n=this.cwd.resolve(r).fullpathPosix();return this.#t.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 ve||(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 ve||(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 ve||(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 ve||(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 ve||(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 ve||(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 ve||(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=(h,d)=>{l.add(h),h.readdirCB((f,y)=>{if(f)return d(f);let b=y.length;if(!b)return d();let _=()=>{--b===0&&d()};for(let E of y)(!s||s(E))&&o.push(i?E:E.fullpath()),n&&E.isSymbolicLink()?E.realpath().then(R=>R?.isUnknown()?R.lstat():R).then(R=>R?.shouldWalk(l,a)?u(R,_):_()):E.shouldWalk(l,a)?u(E,_):_()},!0)},c=e;return new Promise((h,d)=>{u(c,f=>{if(f)return d(f);h(o)})})}walkSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(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 c=u.readdirSync();for(let h of c){(!s||s(h))&&o.push(i?h:h.fullpath());let d=h;if(h.isSymbolicLink()){if(!(n&&(d=h.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(l,a)&&l.add(d)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,r={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(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 ve||(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 c of u){(!s||s(c))&&(yield i?c:c.fullpath());let h=c;if(c.isSymbolicLink()){if(!(n&&(h=c.realpathSync())))continue;h.isUnknown()&&h.lstatSync()}h.shouldWalk(o,a)&&o.add(h)}}}stream(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=new Lr({objectMode:!0});(!s||s(e))&&o.write(i?e:e.fullpath());let l=new Set,u=[e],c=0,h=()=>{let d=!1;for(;!d;){let f=u.shift();if(!f){c===0&&o.end();return}c++,l.add(f);let y=(_,E,R=!1)=>{if(_)return o.emit("error",_);if(n&&!R){let x=[];for(let M of E)M.isSymbolicLink()&&x.push(M.realpath().then(k=>k?.isUnknown()?k.lstat():k));if(x.length){Promise.all(x).then(()=>y(null,E,!0));return}}for(let x of E)x&&(!s||s(x))&&(o.write(i?x:x.fullpath())||(d=!0));c--;for(let x of E){let M=x.realpathCached()||x;M.shouldWalk(l,a)&&u.push(M)}d&&!o.flowing?o.once("drain",h):b||h()},b=!0;f.readdirCB(y,!0),b=!1}};return h(),o}streamSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=new Lr({objectMode:!0}),l=new Set;(!s||s(e))&&o.write(i?e:e.fullpath());let u=[e],c=0,h=()=>{let d=!1;for(;!d;){let f=u.shift();if(!f){c===0&&o.end();return}c++,l.add(f);let y=f.readdirSync();for(let b of y)(!s||s(b))&&(o.write(i?b:b.fullpath())||(d=!0));c--;for(let b of y){let _=b;if(b.isSymbolicLink()){if(!(n&&(_=b.realpathSync())))continue;_.isUnknown()&&_.lstatSync()}_.shouldWalk(l,a)&&u.push(_)}}d&&!o.flowing&&o.once("drain",h)};return h(),o}chdir(e=this.cwd){let r=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[vg](r)}},Nr=class extends Ls{sep="\\";constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,jr.win32,"\\",{...r,nocase:i}),this.nocase=i;for(let n=this.cwd;n;n=n.parent)n.nocase=this.nocase}parseRootPath(e){return jr.win32.parse(e).root.toUpperCase()}newRoot(e){return new Cs(this.rootPath,ot,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},Fr=class extends Ls{sep="/";constructor(e=process.cwd(),r={}){let{nocase:i=!1}=r;super(e,jr.posix,"/",{...r,nocase:i}),this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new qs(this.rootPath,ot,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},Ni=class extends Fr{constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,{...r,nocase:i})}},Zx=process.platform==="win32"?Cs:qs,_g=process.platform==="win32"?Nr:process.platform==="darwin"?Ni:Fr;var mE=t=>t.length>=1,yE=t=>t.length>=1,Ir=class t{#e;#t;#s;length;#i;#a;#v;#u;#h;#o;#l=!0;constructor(e,r,i,n){if(!mE(e))throw new TypeError("empty pattern list");if(!yE(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.#t=r,this.#s=i,this.#i=n,this.#s===0){if(this.isUNC()){let[s,a,o,l,...u]=this.#e,[c,h,d,f,...y]=this.#t;u[0]===""&&(u.shift(),y.shift());let b=[s,a,o,l,""].join("/"),_=[c,h,d,f,""].join("/");this.#e=[b,...u],this.#t=[_,...y],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[s,...a]=this.#e,[o,...l]=this.#t;a[0]===""&&(a.shift(),l.shift());let u=s+"/",c=o+"/";this.#e=[u,...a],this.#t=[c,...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]===ge}isRegExp(){return this.#e[this.#s]instanceof RegExp}globString(){return this.#v=this.#v||(this.#s===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join("/"):this.#t.join("/"):this.#t.slice(this.#s).join("/"))}hasMore(){return this.length>this.#s+1}rest(){return this.#a!==void 0?this.#a:this.hasMore()?(this.#a=new t(this.#e,this.#t,this.#s+1,this.#i),this.#a.#o=this.#o,this.#a.#h=this.#h,this.#a.#u=this.#u,this.#a):this.#a=null}isUNC(){let e=this.#e;return this.#h!==void 0?this.#h:this.#h=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.#u!==void 0?this.#u:this.#u=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.#o!==void 0?this.#o:this.#o=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.#l)}markFollowGlobstar(){return this.#s===0||!this.isGlobstar()||!this.#l?!1:(this.#l=!1,!0)}};var Bs=require("node:events"),El=be(require("node:stream"),1),Tg=require("node:string_decoder"),Sg=typeof process=="object"&&process?process:{stdout:null,stderr:null},bE=t=>!!t&&typeof t=="object"&&(t instanceof Bi||t instanceof El.default||wE(t)||vE(t)),wE=t=>!!t&&typeof t=="object"&&t instanceof Bs.EventEmitter&&typeof t.pipe=="function"&&t.pipe!==El.default.Writable.prototype.pipe,vE=t=>!!t&&typeof t=="object"&&t instanceof Bs.EventEmitter&&typeof t.write=="function"&&typeof t.end=="function",mt=Symbol("EOF"),yt=Symbol("maybeEmitEnd"),Ft=Symbol("emittedEnd"),js=Symbol("emittingEnd"),Fi=Symbol("emittedError"),Ns=Symbol("closed"),Eg=Symbol("read"),Fs=Symbol("flush"),Rg=Symbol("flushChunk"),Qe=Symbol("encoding"),$r=Symbol("decoder"),ue=Symbol("flowing"),Ii=Symbol("paused"),Wr=Symbol("resume"),fe=Symbol("buffer"),Oe=Symbol("pipes"),he=Symbol("bufferLength"),yl=Symbol("bufferPush"),Is=Symbol("bufferShift"),_e=Symbol("objectMode"),ee=Symbol("destroyed"),bl=Symbol("error"),wl=Symbol("emitData"),xg=Symbol("emitEnd"),vl=Symbol("emitEnd2"),ut=Symbol("async"),_l=Symbol("abort"),$s=Symbol("aborted"),$i=Symbol("signal"),lr=Symbol("dataListeners"),je=Symbol("discarded"),Wi=t=>Promise.resolve().then(t),_E=t=>t(),SE=t=>t==="end"||t==="finish"||t==="prefinish",EE=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,RE=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),Ws=class{src;dest;opts;ondrain;constructor(e,r,i){this.src=e,this.dest=r,this.opts=i,this.ondrain=()=>e[Wr](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Sl=class extends Ws{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)}},xE=t=>!!t.objectMode,TE=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",Bi=class extends Bs.EventEmitter{[ue]=!1;[Ii]=!1;[Oe]=[];[fe]=[];[_e];[Qe];[ut];[$r];[mt]=!1;[Ft]=!1;[js]=!1;[Ns]=!1;[Fi]=null;[he]=0;[ee]=!1;[$i];[$s]=!1;[lr]=0;[je]=!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");xE(r)?(this[_e]=!0,this[Qe]=null):TE(r)?(this[Qe]=r.encoding,this[_e]=!1):(this[_e]=!1,this[Qe]=null),this[ut]=!!r.async,this[$r]=this[Qe]?new Tg.StringDecoder(this[Qe]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[fe]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Oe]});let{signal:i}=r;i&&(this[$i]=i,i.aborted?this[_l]():i.addEventListener("abort",()=>this[_l]()))}get bufferLength(){return this[he]}get encoding(){return this[Qe]}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[_e]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[ut]}set async(e){this[ut]=this[ut]||!!e}[_l](){this[$s]=!0,this.emit("abort",this[$i]?.reason),this.destroy(this[$i]?.reason)}get aborted(){return this[$s]}set aborted(e){}write(e,r,i){if(this[$s])return!1;if(this[mt])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[ut]?Wi:_E;if(!this[_e]&&!Buffer.isBuffer(e)){if(RE(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(EE(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[_e]?(this[ue]&&this[he]!==0&&this[Fs](!0),this[ue]?this.emit("data",e):this[yl](e),this[he]!==0&&this.emit("readable"),i&&n(i),this[ue]):e.length?(typeof e=="string"&&!(r===this[Qe]&&!this[$r]?.lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[Qe]&&(e=this[$r].write(e)),this[ue]&&this[he]!==0&&this[Fs](!0),this[ue]?this.emit("data",e):this[yl](e),this[he]!==0&&this.emit("readable"),i&&n(i),this[ue]):(this[he]!==0&&this.emit("readable"),i&&n(i),this[ue])}read(e){if(this[ee])return null;if(this[je]=!1,this[he]===0||e===0||e&&e>this[he])return this[yt](),null;this[_e]&&(e=null),this[fe].length>1&&!this[_e]&&(this[fe]=[this[Qe]?this[fe].join(""):Buffer.concat(this[fe],this[he])]);let r=this[Eg](e||null,this[fe][0]);return this[yt](),r}[Eg](e,r){if(this[_e])this[Is]();else{let i=r;e===i.length||e===null?this[Is]():typeof i=="string"?(this[fe][0]=i.slice(e),r=i.slice(0,e),this[he]-=e):(this[fe][0]=i.subarray(e),r=i.subarray(0,e),this[he]-=e)}return this.emit("data",r),!this[fe].length&&!this[mt]&&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[mt]=!0,this.writable=!1,(this[ue]||!this[Ii])&&this[yt](),this}[Wr](){this[ee]||(!this[lr]&&!this[Oe].length&&(this[je]=!0),this[Ii]=!1,this[ue]=!0,this.emit("resume"),this[fe].length?this[Fs]():this[mt]?this[yt]():this.emit("drain"))}resume(){return this[Wr]()}pause(){this[ue]=!1,this[Ii]=!0,this[je]=!1}get destroyed(){return this[ee]}get flowing(){return this[ue]}get paused(){return this[Ii]}[yl](e){this[_e]?this[he]+=1:this[he]+=e.length,this[fe].push(e)}[Is](){return this[_e]?this[he]-=1:this[he]-=this[fe][0].length,this[fe].shift()}[Fs](e=!1){do;while(this[Rg](this[Is]())&&this[fe].length);!e&&!this[fe].length&&!this[mt]&&this.emit("drain")}[Rg](e){return this.emit("data",e),this[ue]}pipe(e,r){if(this[ee])return e;this[je]=!1;let i=this[Ft];return r=r||{},e===Sg.stdout||e===Sg.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,i?r.end&&e.end():(this[Oe].push(r.proxyErrors?new Sl(this,e,r):new Ws(this,e,r)),this[ut]?Wi(()=>this[Wr]()):this[Wr]()),e}unpipe(e){let r=this[Oe].find(i=>i.dest===e);r&&(this[Oe].length===1?(this[ue]&&this[lr]===0&&(this[ue]=!1),this[Oe]=[]):this[Oe].splice(this[Oe].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[je]=!1,this[lr]++,!this[Oe].length&&!this[ue]&&this[Wr]();else if(e==="readable"&&this[he]!==0)super.emit("readable");else if(SE(e)&&this[Ft])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[Fi]){let n=r;this[ut]?Wi(()=>n.call(this,this[Fi])):n.call(this,this[Fi])}return i}removeListener(e,r){return this.off(e,r)}off(e,r){let i=super.off(e,r);return e==="data"&&(this[lr]=this.listeners("data").length,this[lr]===0&&!this[je]&&!this[Oe].length&&(this[ue]=!1)),i}removeAllListeners(e){let r=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[lr]=0,!this[je]&&!this[Oe].length&&(this[ue]=!1)),r}get emittedEnd(){return this[Ft]}[yt](){!this[js]&&!this[Ft]&&!this[ee]&&this[fe].length===0&&this[mt]&&(this[js]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Ns]&&this.emit("close"),this[js]=!1)}emit(e,...r){let i=r[0];if(e!=="error"&&e!=="close"&&e!==ee&&this[ee])return!1;if(e==="data")return!this[_e]&&!i?!1:this[ut]?(Wi(()=>this[wl](i)),!0):this[wl](i);if(e==="end")return this[xg]();if(e==="close"){if(this[Ns]=!0,!this[Ft]&&!this[ee])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[Fi]=i,super.emit(bl,i);let s=!this[$i]||this.listeners("error").length?super.emit("error",i):!1;return this[yt](),s}else if(e==="resume"){let s=super.emit("resume");return this[yt](),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[yt](),n}[wl](e){for(let i of this[Oe])i.dest.write(e)===!1&&this.pause();let r=this[je]?!1:super.emit("data",e);return this[yt](),r}[xg](){return this[Ft]?!1:(this[Ft]=!0,this.readable=!1,this[ut]?(Wi(()=>this[vl]()),!0):this[vl]())}[vl](){if(this[$r]){let r=this[$r].end();if(r){for(let i of this[Oe])i.dest.write(r);this[je]||super.emit("data",r)}}for(let r of this[Oe])r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[_e]||(e.dataLength=0);let r=this.promise();return this.on("data",i=>{e.push(i),this[_e]||(e.dataLength+=i.length)}),await r,e}async concat(){if(this[_e])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Qe]?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[je]=!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[mt])return r();let s,a,o=h=>{this.off("data",l),this.off("end",u),this.off(ee,c),r(),a(h)},l=h=>{this.off("error",o),this.off("end",u),this.off(ee,c),this.pause(),s({value:h,done:!!this[mt]})},u=()=>{this.off("error",o),this.off("data",l),this.off(ee,c),r(),s({done:!0,value:void 0})},c=()=>o(new Error("stream destroyed"));return new Promise((h,d)=>{a=d,s=h,this.once(ee,c),this.once("error",o),this.once("end",u),this.once("data",l)})},throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[je]=!1;let e=!1,r=()=>(this.pause(),this.off(bl,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(bl,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[je]=!0,this[fe].length=0,this[he]=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 bE}};var ME=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Br=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:r,nocase:i,noext:n,noglobstar:s,platform:a=ME}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=a,this.mmopts={dot:!0,nobrace:r,nocase:i,noext:n,noglobstar:s,optimizationLevel:2,platform:a,nocomment:!0,nonegate:!0};for(let o of e)this.add(o)}add(e){let r=new qe(e,this.mmopts);for(let i=0;i<r.set.length;i++){let n=r.set[i],s=r.globParts[i];if(!n||!s)throw new Error("invalid pattern object");for(;n[0]==="."&&s[0]===".";)n.shift(),s.shift();let a=new Ir(n,s,0,this.platform),o=new qe(a.globString(),this.mmopts),l=s[s.length-1]==="**",u=a.isAbsolute();u?this.absolute.push(o):this.relative.push(o),l&&(u?this.absoluteChildren.push(o):this.relativeChildren.push(o))}}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 Rl=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()]))}},xl=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)])}},Tl=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())}},Ui=class t{hasWalkedCache;matches=new xl;subwalks=new Tl;patterns;follow;dot;opts;constructor(e,r){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=r?r.copy():new Rl}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 h=s.rest();if(h)s=h;else{this.matches.add(n,!0,!1);continue}}if(n.isENOENT())continue;let l,u,c=!1;for(;typeof(l=s.pattern())=="string"&&(u=s.rest());)n=n.resolve(l),s=u,c=!0;if(l=s.pattern(),u=s.rest(),c){if(this.hasWalkedCache.hasWalked(n,s))continue;this.hasWalkedCache.storeWalked(n,s)}if(typeof l=="string"){let h=l===".."||l===""||l===".";this.matches.add(n.resolve(l),o,h);continue}else if(l===ge){(!n.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(n,s);let h=u?.pattern(),d=u?.rest();if(!u||(h===""||h===".")&&!d)this.matches.add(n,o,h===""||h===".");else if(h===".."){let f=n.parent||n;d?this.hasWalkedCache.hasWalked(f,d)||this.subwalks.add(f,d):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===ge?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 OE=(t,e)=>typeof t=="string"?new Br([t],e):Array.isArray(t)?new Br(t,e):t,Us=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#s;signal;maxDepth;includeChildMatches;constructor(e,r,i){if(this.patterns=e,this.path=r,this.opts=i,this.#s=!i.posix&&i.platform==="win32"?"\\":"/",this.includeChildMatches=i.includeChildMatches!==!1,(i.ignore||!this.includeChildMatches)&&(this.#t=OE(i.ignore??[],i),!this.includeChildMatches&&typeof this.#t.add!="function")){let n="cannot ignore child matches, ignore lacks add() method.";throw new Error(n)}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.#t?.ignored?.(e)}#a(e){return!!this.#t?.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;if(!this.includeChildMatches&&this.#t?.add){let s=`${e.relativePosix()}/**`;this.#t.add(s)}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 Ui(this.opts),i)}walkCB2(e,r,i,n){if(this.#a(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,c)=>this.walkCB3(o,c,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 Ui(this.opts),i)}walkCB2Sync(e,r,i,n){if(this.#a(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()}},zi=class extends Us{matches=new Set;constructor(e,r,i){super(e,r,i)}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}},Hi=class extends Us{results;constructor(e,r,i){super(e,r,i),this.results=new Bi({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 AE=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Xe=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;includeChildMatches;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,Mg.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.includeChildMatches=r.includeChildMatches!==!1,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||AE,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"?Nr:r.platform==="darwin"?Ni:r.platform?Fr:_g;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 qe(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 c=o[u];if(!c)throw new Error("invalid pattern object");return new Ir(l,c,0,this.platform)})}async walk(){return[...await new zi(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,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new zi(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,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new Hi(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,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new Hi(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,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};var Ml=(t,e={})=>{Array.isArray(t)||(t=[t]);for(let r of t)if(new qe(r,e).hasMagic())return!0;return!1};function Hs(t,e={}){return new Xe(t,e).streamSync()}function Ag(t,e={}){return new Xe(t,e).stream()}function kg(t,e={}){return new Xe(t,e).walkSync()}async function Og(t,e={}){return new Xe(t,e).walk()}function Gs(t,e={}){return new Xe(t,e).iterateSync()}function Dg(t,e={}){return new Xe(t,e).iterate()}var kE=Hs,DE=Object.assign(Ag,{sync:Hs}),PE=Gs,CE=Object.assign(Dg,{sync:Gs}),qE=Object.assign(kg,{stream:Hs,iterate:Gs}),zs=Object.assign(Og,{glob:Og,globSync:kg,sync:qE,globStream:Ag,stream:DE,globStreamSync:Hs,streamSync:kE,globIterate:Dg,iterate:CE,globIterateSync:Gs,iterateSync:PE,Glob:Xe,hasMagic:Ml,escape:kr,unescape:Ke});zs.glob=zs;var LE="../build",jE="../wheels";async function Lg(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 NE(t){I.info("Copy the build directory (the bare built app files) to this directory...");let e=me.default.resolve(__dirname,LE);if(!(await bt.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 bt.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 bt.default.rm(t.copyTo,{recursive:!0,force:!0}),await
|
|
35
|
+
>>> no match, partial?`,e,d,r,f),d===l))}let b;if(typeof c=="string"?(b=h===c,this.debug("string match",c,h,b)):(b=c.test(h),this.debug("pattern match",c,h,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 Qp(this.pattern,this.options)}parse(e){Ti(e);let r=this.options;if(e==="**")return ge;if(e==="")return"";let i,n=null;(i=e.match(NS))?n=r.dot?IS:FS:(i=e.match(MS))?n=(r.nocase?r.dot?DS:kS:r.dot?AS:OS)(i[1]):(i=e.match($S))?n=(r.nocase?r.dot?BS:WS:r.dot?US:zS)(i):(i=e.match(PS))?n=r.dot?qS:CS:(i=e.match(LS))&&(n=jS);let s=Ar.fromGlob(e,this.options).toMMPattern();return n&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value: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?YS:r.dot?VS:KS,n=new Set(r.nocase?["i"]:[]),s=e.map(l=>{let u=l.map(c=>{if(c instanceof RegExp)for(let h of c.flags.split(""))n.add(h);return typeof c=="string"?eE(c):c===ge?ge:c._src});return u.forEach((c,h)=>{let d=u[h+1],f=u[h-1];c!==ge||f===ge||(f===void 0?d!==void 0&&d!==ge?u[h+1]="(?:\\/|"+i+"\\/)?"+d:u[h]=i:d===void 0?u[h-1]=f+"(?:\\/|"+i+")?":d!==ge&&(u[h-1]=f+"(?:\\/|\\/"+i+"\\/)"+d,u[h+1]=ge))}),u.filter(c=>c!==ge).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 Te.defaults(e).Minimatch}};Te.AST=Ar;Te.Minimatch=qe;Te.escape=kr;Te.unescape=Ke;var Mg=require("node:url");var Dr=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,eg=new Set,al=typeof process=="object"&&process?process:{},tg=(t,e,r,i)=>{typeof al.emitWarning=="function"?al.emitWarning(t,e,r,i):console.error(`[${r}] ${e}: ${t}`)},_s=globalThis.AbortController,Xp=globalThis.AbortSignal;if(typeof _s>"u"){Xp=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,n){this._onabort.push(n)}},_s=class{constructor(){e()}signal=new Xp;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=al.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,tg("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 tE=t=>!eg.has(t),Gx=Symbol("type"),Lt=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),rg=t=>Lt(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Pr:null:null,Pr=class extends Array{constructor(e){super(e),this.fill(0)}},ol=class t{heap;length;static#e=!1;static create(e){let r=rg(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]}},Oi=class t{#e;#t;#s;#i;#a;#v;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#u;#h;#o;#l;#n;#m;#y;#d;#c;#E;#g;#R;#x;#w;#_;#S;#p;static unsafeExposeInternals(e){return{starts:e.#x,ttls:e.#w,sizes:e.#R,keyMap:e.#o,keyList:e.#l,valList:e.#n,next:e.#m,prev:e.#y,get head(){return e.#d},get tail(){return e.#c},free:e.#E,isBackgroundFetch:r=>e.#f(r),backgroundFetch:(r,i,n,s)=>e.#F(r,i,n,s),moveToTail:r=>e.#$(r),indexes:r=>e.#M(r),rindexes:r=>e.#O(r),isStale:r=>e.#b(r)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#h}get size(){return this.#u}get fetchMethod(){return this.#a}get memoMethod(){return this.#v}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:c,noDisposeOnSet:h,noUpdateTTL:d,maxSize:f=0,maxEntrySize:y=0,sizeCalculation:b,fetchMethod:_,memoMethod:E,noDeleteOnFetchRejection:R,noDeleteOnStaleGet:x,allowStaleOnFetchRejection:M,allowStaleOnFetchAbort:k,ignoreFetchAbort:C}=e;if(r!==0&&!Lt(r))throw new TypeError("max option must be a nonnegative integer");let F=r?rg(r):Array;if(!F)throw new Error("invalid max value: "+r);if(this.#e=r,this.#t=f,this.maxEntrySize=y||this.#t,this.sizeCalculation=b,this.sizeCalculation){if(!this.#t&&!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(E!==void 0&&typeof E!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#v=E,_!==void 0&&typeof _!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#a=_,this.#S=!!_,this.#o=new Map,this.#l=new Array(r).fill(void 0),this.#n=new Array(r).fill(void 0),this.#m=new F(r),this.#y=new F(r),this.#d=0,this.#c=0,this.#E=ol.create(r),this.#u=0,this.#h=0,typeof u=="function"&&(this.#s=u),typeof c=="function"?(this.#i=c,this.#g=[]):(this.#i=void 0,this.#g=void 0),this.#_=!!this.#s,this.#p=!!this.#i,this.noDisposeOnSet=!!h,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!R,this.allowStaleOnFetchRejection=!!M,this.allowStaleOnFetchAbort=!!k,this.ignoreFetchAbort=!!C,this.maxEntrySize!==0){if(this.#t!==0&&!Lt(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!Lt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#k()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!x,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!o,this.ttlResolution=Lt(n)||n===0?n:1,this.ttlAutopurge=!!s,this.ttl=i||0,this.ttl){if(!Lt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#A()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let q="LRU_CACHE_UNBOUNDED";tE(q)&&(eg.add(q),tg("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",q,t))}}getRemainingTTL(e){return this.#o.has(e)?1/0:0}#A(){let e=new Pr(this.#e),r=new Pr(this.#e);this.#w=e,this.#x=r,this.#P=(s,a,o=Dr.now())=>{if(r[s]=a!==0?o:0,e[s]=a,a!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#b(s)&&this.#D(this.#l[s],"expire")},a+1);l.unref&&l.unref()}},this.#T=s=>{r[s]=e[s]!==0?Dr.now():0},this.#r=(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=Dr.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.#o.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}}#T=()=>{};#r=()=>{};#P=()=>{};#b=()=>!1;#k(){let e=new Pr(this.#e);this.#h=0,this.#R=e,this.#C=r=>{this.#h-=e[r],e[r]=0},this.#L=(r,i,n,s)=>{if(this.#f(i))return 0;if(!Lt(n))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(n=s(i,r),!Lt(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.#q=(r,i,n)=>{if(e[r]=i,this.#t){let s=this.#t-e[r];for(;this.#h>s;)this.#N(!0)}this.#h+=e[r],n&&(n.entrySize=i,n.totalCalculatedSize=this.#h)}}#C=e=>{};#q=(e,r,i)=>{};#L=(e,r,i,n)=>{if(i||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#M({allowStale:e=this.allowStale}={}){if(this.#u)for(let r=this.#c;!(!this.#j(r)||((e||!this.#b(r))&&(yield r),r===this.#d));)r=this.#y[r]}*#O({allowStale:e=this.allowStale}={}){if(this.#u)for(let r=this.#d;!(!this.#j(r)||((e||!this.#b(r))&&(yield r),r===this.#c));)r=this.#m[r]}#j(e){return e!==void 0&&this.#o.get(this.#l[e])===e}*entries(){for(let e of this.#M())this.#n[e]!==void 0&&this.#l[e]!==void 0&&!this.#f(this.#n[e])&&(yield[this.#l[e],this.#n[e]])}*rentries(){for(let e of this.#O())this.#n[e]!==void 0&&this.#l[e]!==void 0&&!this.#f(this.#n[e])&&(yield[this.#l[e],this.#n[e]])}*keys(){for(let e of this.#M()){let r=this.#l[e];r!==void 0&&!this.#f(this.#n[e])&&(yield r)}}*rkeys(){for(let e of this.#O()){let r=this.#l[e];r!==void 0&&!this.#f(this.#n[e])&&(yield r)}}*values(){for(let e of this.#M())this.#n[e]!==void 0&&!this.#f(this.#n[e])&&(yield this.#n[e])}*rvalues(){for(let e of this.#O())this.#n[e]!==void 0&&!this.#f(this.#n[e])&&(yield this.#n[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,r={}){for(let i of this.#M()){let n=this.#n[i],s=this.#f(n)?n.__staleWhileFetching:n;if(s!==void 0&&e(s,this.#l[i],this))return this.get(this.#l[i],r)}}forEach(e,r=this){for(let i of this.#M()){let n=this.#n[i],s=this.#f(n)?n.__staleWhileFetching:n;s!==void 0&&e.call(r,s,this.#l[i],this)}}rforEach(e,r=this){for(let i of this.#O()){let n=this.#n[i],s=this.#f(n)?n.__staleWhileFetching:n;s!==void 0&&e.call(r,s,this.#l[i],this)}}purgeStale(){let e=!1;for(let r of this.#O({allowStale:!0}))this.#b(r)&&(this.#D(this.#l[r],"expire"),e=!0);return e}info(e){let r=this.#o.get(e);if(r===void 0)return;let i=this.#n[r],n=this.#f(i)?i.__staleWhileFetching:i;if(n===void 0)return;let s={value:n};if(this.#w&&this.#x){let a=this.#w[r],o=this.#x[r];if(a&&o){let l=a-(Dr.now()-o);s.ttl=l,s.start=Date.now()}}return this.#R&&(s.size=this.#R[r]),s}dump(){let e=[];for(let r of this.#M({allowStale:!0})){let i=this.#l[r],n=this.#n[r],s=this.#f(n)?n.__staleWhileFetching:n;if(s===void 0||i===void 0)continue;let a={value:s};if(this.#w&&this.#x){a.ttl=this.#w[r];let o=Dr.now()-this.#x[r];a.start=Math.floor(Date.now()-o)}this.#R&&(a.size=this.#R[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=Dr.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,c=this.#L(e,r,i.size||0,o);if(this.maxEntrySize&&c>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.#D(e,"set"),this;let h=this.#u===0?void 0:this.#o.get(e);if(h===void 0)h=this.#u===0?this.#c:this.#E.length!==0?this.#E.pop():this.#u===this.#e?this.#N(!1):this.#u,this.#l[h]=e,this.#n[h]=r,this.#o.set(e,h),this.#m[this.#c]=h,this.#y[h]=this.#c,this.#c=h,this.#u++,this.#q(h,c,l),l&&(l.set="add"),u=!1;else{this.#$(h);let d=this.#n[h];if(r!==d){if(this.#S&&this.#f(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:f}=d;f!==void 0&&!a&&(this.#_&&this.#s?.(f,e,"set"),this.#p&&this.#g?.push([f,e,"set"]))}else a||(this.#_&&this.#s?.(d,e,"set"),this.#p&&this.#g?.push([d,e,"set"]));if(this.#C(h),this.#q(h,c,l),this.#n[h]=r,l){l.set="replace";let f=d&&this.#f(d)?d.__staleWhileFetching:d;f!==void 0&&(l.oldValue=f)}}else l&&(l.set="update")}if(n!==0&&!this.#w&&this.#A(),this.#w&&(u||this.#P(h,n,s),l&&this.#r(l,h)),!a&&this.#p&&this.#g){let d=this.#g,f;for(;f=d?.shift();)this.#i?.(...f)}return this}pop(){try{for(;this.#u;){let e=this.#n[this.#d];if(this.#N(!0),this.#f(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#p&&this.#g){let e=this.#g,r;for(;r=e?.shift();)this.#i?.(...r)}}}#N(e){let r=this.#d,i=this.#l[r],n=this.#n[r];return this.#S&&this.#f(n)?n.__abortController.abort(new Error("evicted")):(this.#_||this.#p)&&(this.#_&&this.#s?.(n,i,"evict"),this.#p&&this.#g?.push([n,i,"evict"])),this.#C(r),e&&(this.#l[r]=void 0,this.#n[r]=void 0,this.#E.push(r)),this.#u===1?(this.#d=this.#c=0,this.#E.length=0):this.#d=this.#m[r],this.#o.delete(i),this.#u--,r}has(e,r={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:n}=r,s=this.#o.get(e);if(s!==void 0){let a=this.#n[s];if(this.#f(a)&&a.__staleWhileFetching===void 0)return!1;if(this.#b(s))n&&(n.has="stale",this.#r(n,s));else return i&&this.#T(s),n&&(n.has="hit",this.#r(n,s)),!0}else n&&(n.has="miss");return!1}peek(e,r={}){let{allowStale:i=this.allowStale}=r,n=this.#o.get(e);if(n===void 0||!i&&this.#b(n))return;let s=this.#n[n];return this.#f(s)?s.__staleWhileFetching:s}#F(e,r,i,n){let s=r===void 0?void 0:this.#n[r];if(this.#f(s))return s;let a=new _s,{signal:o}=i;o?.addEventListener("abort",()=>a.abort(o.reason),{signal:a.signal});let l={signal:a.signal,options:i,context:n},u=(b,_=!1)=>{let{aborted:E}=a.signal,R=i.ignoreFetchAbort&&b!==void 0;if(i.status&&(E&&!_?(i.status.fetchAborted=!0,i.status.fetchError=a.signal.reason,R&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),E&&!R&&!_)return h(a.signal.reason);let x=f;return this.#n[r]===f&&(b===void 0?x.__staleWhileFetching?this.#n[r]=x.__staleWhileFetching:this.#D(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(e,b,l.options))),b},c=b=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=b),h(b)),h=b=>{let{aborted:_}=a.signal,E=_&&i.allowStaleOnFetchAbort,R=E||i.allowStaleOnFetchRejection,x=R||i.noDeleteOnFetchRejection,M=f;if(this.#n[r]===f&&(!x||M.__staleWhileFetching===void 0?this.#D(e,"fetch"):E||(this.#n[r]=M.__staleWhileFetching)),R)return i.status&&M.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),M.__staleWhileFetching;if(M.__returned===M)throw b},d=(b,_)=>{let E=this.#a?.(e,s,l);E&&E instanceof Promise&&E.then(R=>b(R===void 0?void 0:R),_),a.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(b(void 0),i.allowStaleOnFetchAbort&&(b=R=>u(R,!0)))})};i.status&&(i.status.fetchDispatched=!0);let f=new Promise(d).then(u,c),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.#o.get(e)):this.#n[r]=y,y}#f(e){if(!this.#S)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof _s}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:c=this.noUpdateTTL,noDeleteOnFetchRejection:h=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:y=this.allowStaleOnFetchAbort,context:b,forceRefresh:_=!1,status:E,signal:R}=r;if(!this.#S)return E&&(E.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,status:E});let x={allowStale:i,updateAgeOnGet:n,noDeleteOnStaleGet:s,ttl:a,noDisposeOnSet:o,size:l,sizeCalculation:u,noUpdateTTL:c,noDeleteOnFetchRejection:h,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:y,ignoreFetchAbort:f,status:E,signal:R},M=this.#o.get(e);if(M===void 0){E&&(E.fetch="miss");let k=this.#F(e,M,x,b);return k.__returned=k}else{let k=this.#n[M];if(this.#f(k)){let te=i&&k.__staleWhileFetching!==void 0;return E&&(E.fetch="inflight",te&&(E.returnedStale=!0)),te?k.__staleWhileFetching:k.__returned=k}let C=this.#b(M);if(!_&&!C)return E&&(E.fetch="hit"),this.#$(M),n&&this.#T(M),E&&this.#r(E,M),k;let F=this.#F(e,M,x,b),U=F.__staleWhileFetching!==void 0&&i;return E&&(E.fetch=C?"stale":"refresh",U&&C&&(E.returnedStale=!0)),U?F.__staleWhileFetching:F.__returned=F}}async forceFetch(e,r={}){let i=await this.fetch(e,r);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,r={}){let i=this.#v;if(!i)throw new Error("no memoMethod provided to constructor");let{context:n,forceRefresh:s,...a}=r,o=this.get(e,a);if(!s&&o!==void 0)return o;let l=i(e,o,{options:a,context:n});return this.set(e,l,a),l}get(e,r={}){let{allowStale:i=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:a}=r,o=this.#o.get(e);if(o!==void 0){let l=this.#n[o],u=this.#f(l);return a&&this.#r(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.#D(e,"expire"),a&&i&&(a.returnedStale=!0),i?l:void 0)):(a&&(a.get="hit"),u?l.__staleWhileFetching:(this.#$(o),n&&this.#T(o),l))}else a&&(a.get="miss")}#I(e,r){this.#y[r]=e,this.#m[e]=r}#$(e){e!==this.#c&&(e===this.#d?this.#d=this.#m[e]:this.#I(this.#y[e],this.#m[e]),this.#I(this.#c,e),this.#c=e)}delete(e){return this.#D(e,"delete")}#D(e,r){let i=!1;if(this.#u!==0){let n=this.#o.get(e);if(n!==void 0)if(i=!0,this.#u===1)this.#W(r);else{this.#C(n);let s=this.#n[n];if(this.#f(s)?s.__abortController.abort(new Error("deleted")):(this.#_||this.#p)&&(this.#_&&this.#s?.(s,e,r),this.#p&&this.#g?.push([s,e,r])),this.#o.delete(e),this.#l[n]=void 0,this.#n[n]=void 0,n===this.#c)this.#c=this.#y[n];else if(n===this.#d)this.#d=this.#m[n];else{let a=this.#y[n];this.#m[a]=this.#m[n];let o=this.#m[n];this.#y[o]=this.#y[n]}this.#u--,this.#E.push(n)}}if(this.#p&&this.#g?.length){let n=this.#g,s;for(;s=n?.shift();)this.#i?.(...s)}return i}clear(){return this.#W("delete")}#W(e){for(let r of this.#O({allowStale:!0})){let i=this.#n[r];if(this.#f(i))i.__abortController.abort(new Error("deleted"));else{let n=this.#l[r];this.#_&&this.#s?.(i,n,e),this.#p&&this.#g?.push([i,n,e])}}if(this.#o.clear(),this.#n.fill(void 0),this.#l.fill(void 0),this.#w&&this.#x&&(this.#w.fill(0),this.#x.fill(0)),this.#R&&this.#R.fill(0),this.#d=0,this.#c=0,this.#E.length=0,this.#h=0,this.#u=0,this.#p&&this.#g){let r=this.#g,i;for(;i=r?.shift();)this.#i?.(...i)}}};var jr=require("node:path"),cg=require("node:url"),lt=require("fs"),hE=be(require("node:fs"),1),Nt=require("node:fs/promises");var Os=require("node:events"),pl=be(require("node:stream"),1),og=require("node:string_decoder"),ig=typeof process=="object"&&process?process:{stdout:null,stderr:null},rE=t=>!!t&&typeof t=="object"&&(t instanceof Lr||t instanceof pl.default||iE(t)||nE(t)),iE=t=>!!t&&typeof t=="object"&&t instanceof Os.EventEmitter&&typeof t.pipe=="function"&&t.pipe!==pl.default.Writable.prototype.pipe,nE=t=>!!t&&typeof t=="object"&&t instanceof Os.EventEmitter&&typeof t.write=="function"&&typeof t.end=="function",pt=Symbol("EOF"),gt=Symbol("maybeEmitEnd"),jt=Symbol("emittedEnd"),Ss=Symbol("emittingEnd"),Ai=Symbol("emittedError"),Es=Symbol("closed"),ng=Symbol("read"),Rs=Symbol("flush"),sg=Symbol("flushChunk"),Je=Symbol("encoding"),Cr=Symbol("decoder"),ae=Symbol("flowing"),ki=Symbol("paused"),qr=Symbol("resume"),oe=Symbol("buffer"),Me=Symbol("pipes"),le=Symbol("bufferLength"),ll=Symbol("bufferPush"),xs=Symbol("bufferShift"),we=Symbol("objectMode"),X=Symbol("destroyed"),ul=Symbol("error"),fl=Symbol("emitData"),ag=Symbol("emitEnd"),hl=Symbol("emitEnd2"),at=Symbol("async"),cl=Symbol("abort"),Ts=Symbol("aborted"),Di=Symbol("signal"),ar=Symbol("dataListeners"),Le=Symbol("discarded"),Pi=t=>Promise.resolve().then(t),sE=t=>t(),aE=t=>t==="end"||t==="finish"||t==="prefinish",oE=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,lE=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),Ms=class{src;dest;opts;ondrain;constructor(e,r,i){this.src=e,this.dest=r,this.opts=i,this.ondrain=()=>e[qr](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},dl=class extends Ms{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)}},uE=t=>!!t.objectMode,fE=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",Lr=class extends Os.EventEmitter{[ae]=!1;[ki]=!1;[Me]=[];[oe]=[];[we];[Je];[at];[Cr];[pt]=!1;[jt]=!1;[Ss]=!1;[Es]=!1;[Ai]=null;[le]=0;[X]=!1;[Di];[Ts]=!1;[ar]=0;[Le]=!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");uE(r)?(this[we]=!0,this[Je]=null):fE(r)?(this[Je]=r.encoding,this[we]=!1):(this[we]=!1,this[Je]=null),this[at]=!!r.async,this[Cr]=this[Je]?new og.StringDecoder(this[Je]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[oe]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Me]});let{signal:i}=r;i&&(this[Di]=i,i.aborted?this[cl]():i.addEventListener("abort",()=>this[cl]()))}get bufferLength(){return this[le]}get encoding(){return this[Je]}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[we]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[at]}set async(e){this[at]=this[at]||!!e}[cl](){this[Ts]=!0,this.emit("abort",this[Di]?.reason),this.destroy(this[Di]?.reason)}get aborted(){return this[Ts]}set aborted(e){}write(e,r,i){if(this[Ts])return!1;if(this[pt])throw new Error("write after end");if(this[X])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[at]?Pi:sE;if(!this[we]&&!Buffer.isBuffer(e)){if(lE(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(oE(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[we]?(this[ae]&&this[le]!==0&&this[Rs](!0),this[ae]?this.emit("data",e):this[ll](e),this[le]!==0&&this.emit("readable"),i&&n(i),this[ae]):e.length?(typeof e=="string"&&!(r===this[Je]&&!this[Cr]?.lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[Je]&&(e=this[Cr].write(e)),this[ae]&&this[le]!==0&&this[Rs](!0),this[ae]?this.emit("data",e):this[ll](e),this[le]!==0&&this.emit("readable"),i&&n(i),this[ae]):(this[le]!==0&&this.emit("readable"),i&&n(i),this[ae])}read(e){if(this[X])return null;if(this[Le]=!1,this[le]===0||e===0||e&&e>this[le])return this[gt](),null;this[we]&&(e=null),this[oe].length>1&&!this[we]&&(this[oe]=[this[Je]?this[oe].join(""):Buffer.concat(this[oe],this[le])]);let r=this[ng](e||null,this[oe][0]);return this[gt](),r}[ng](e,r){if(this[we])this[xs]();else{let i=r;e===i.length||e===null?this[xs]():typeof i=="string"?(this[oe][0]=i.slice(e),r=i.slice(0,e),this[le]-=e):(this[oe][0]=i.subarray(e),r=i.subarray(0,e),this[le]-=e)}return this.emit("data",r),!this[oe].length&&!this[pt]&&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[pt]=!0,this.writable=!1,(this[ae]||!this[ki])&&this[gt](),this}[qr](){this[X]||(!this[ar]&&!this[Me].length&&(this[Le]=!0),this[ki]=!1,this[ae]=!0,this.emit("resume"),this[oe].length?this[Rs]():this[pt]?this[gt]():this.emit("drain"))}resume(){return this[qr]()}pause(){this[ae]=!1,this[ki]=!0,this[Le]=!1}get destroyed(){return this[X]}get flowing(){return this[ae]}get paused(){return this[ki]}[ll](e){this[we]?this[le]+=1:this[le]+=e.length,this[oe].push(e)}[xs](){return this[we]?this[le]-=1:this[le]-=this[oe][0].length,this[oe].shift()}[Rs](e=!1){do;while(this[sg](this[xs]())&&this[oe].length);!e&&!this[oe].length&&!this[pt]&&this.emit("drain")}[sg](e){return this.emit("data",e),this[ae]}pipe(e,r){if(this[X])return e;this[Le]=!1;let i=this[jt];return r=r||{},e===ig.stdout||e===ig.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,i?r.end&&e.end():(this[Me].push(r.proxyErrors?new dl(this,e,r):new Ms(this,e,r)),this[at]?Pi(()=>this[qr]()):this[qr]()),e}unpipe(e){let r=this[Me].find(i=>i.dest===e);r&&(this[Me].length===1?(this[ae]&&this[ar]===0&&(this[ae]=!1),this[Me]=[]):this[Me].splice(this[Me].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[Le]=!1,this[ar]++,!this[Me].length&&!this[ae]&&this[qr]();else if(e==="readable"&&this[le]!==0)super.emit("readable");else if(aE(e)&&this[jt])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[Ai]){let n=r;this[at]?Pi(()=>n.call(this,this[Ai])):n.call(this,this[Ai])}return i}removeListener(e,r){return this.off(e,r)}off(e,r){let i=super.off(e,r);return e==="data"&&(this[ar]=this.listeners("data").length,this[ar]===0&&!this[Le]&&!this[Me].length&&(this[ae]=!1)),i}removeAllListeners(e){let r=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[ar]=0,!this[Le]&&!this[Me].length&&(this[ae]=!1)),r}get emittedEnd(){return this[jt]}[gt](){!this[Ss]&&!this[jt]&&!this[X]&&this[oe].length===0&&this[pt]&&(this[Ss]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Es]&&this.emit("close"),this[Ss]=!1)}emit(e,...r){let i=r[0];if(e!=="error"&&e!=="close"&&e!==X&&this[X])return!1;if(e==="data")return!this[we]&&!i?!1:this[at]?(Pi(()=>this[fl](i)),!0):this[fl](i);if(e==="end")return this[ag]();if(e==="close"){if(this[Es]=!0,!this[jt]&&!this[X])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[Ai]=i,super.emit(ul,i);let s=!this[Di]||this.listeners("error").length?super.emit("error",i):!1;return this[gt](),s}else if(e==="resume"){let s=super.emit("resume");return this[gt](),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[gt](),n}[fl](e){for(let i of this[Me])i.dest.write(e)===!1&&this.pause();let r=this[Le]?!1:super.emit("data",e);return this[gt](),r}[ag](){return this[jt]?!1:(this[jt]=!0,this.readable=!1,this[at]?(Pi(()=>this[hl]()),!0):this[hl]())}[hl](){if(this[Cr]){let r=this[Cr].end();if(r){for(let i of this[Me])i.dest.write(r);this[Le]||super.emit("data",r)}}for(let r of this[Me])r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[we]||(e.dataLength=0);let r=this.promise();return this.on("data",i=>{e.push(i),this[we]||(e.dataLength+=i.length)}),await r,e}async concat(){if(this[we])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Je]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,r)=>{this.on(X,()=>r(new Error("stream destroyed"))),this.on("error",i=>r(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Le]=!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[pt])return r();let s,a,o=h=>{this.off("data",l),this.off("end",u),this.off(X,c),r(),a(h)},l=h=>{this.off("error",o),this.off("end",u),this.off(X,c),this.pause(),s({value:h,done:!!this[pt]})},u=()=>{this.off("error",o),this.off("data",l),this.off(X,c),r(),s({done:!0,value:void 0})},c=()=>o(new Error("stream destroyed"));return new Promise((h,d)=>{a=d,s=h,this.once(X,c),this.once("error",o),this.once("end",u),this.once("data",l)})},throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Le]=!1;let e=!1,r=()=>(this.pause(),this.off(ul,r),this.off(X,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(ul,r),this.once(X,r),{next:i,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(e){if(this[X])return e?this.emit("error",e):this.emit(X),this;this[X]=!0,this[Le]=!0,this[oe].length=0,this[le]=0;let r=this;return typeof r.close=="function"&&!this[Es]&&r.close(),e?this.emit("error",e):this.emit(X),this}static get isStream(){return rE}};var cE=lt.realpathSync.native,qi={lstatSync:lt.lstatSync,readdir:lt.readdir,readdirSync:lt.readdirSync,readlinkSync:lt.readlinkSync,realpathSync:cE,promises:{lstat:Nt.lstat,readdir:Nt.readdir,readlink:Nt.readlink,realpath:Nt.realpath}},dg=t=>!t||t===qi||t===hE?qi:{...qi,...t,promises:{...qi.promises,...t.promises||{}}},pg=/^\\\\\?\\([a-z]:)\\?$/i,dE=t=>t.replace(/\//g,"\\").replace(pg,"$1\\"),pE=/[\\\/]/,ze=0,gg=1,mg=2,ot=4,yg=6,bg=8,or=10,wg=12,Ue=15,Ci=~Ue,gl=16,lg=32,Li=64,Ze=128,As=256,Ds=512,ug=Li|Ze|Ds,gE=1023,ml=t=>t.isFile()?bg:t.isDirectory()?ot:t.isSymbolicLink()?or:t.isCharacterDevice()?mg:t.isBlockDevice()?yg:t.isSocket()?wg:t.isFIFO()?gg:ze,fg=new Map,ji=t=>{let e=fg.get(t);if(e)return e;let r=t.normalize("NFKD");return fg.set(t,r),r},hg=new Map,ks=t=>{let e=hg.get(t);if(e)return e;let r=ji(t.toLowerCase());return hg.set(t,r),r},Ps=class extends Oi{constructor(){super({max:256})}},yl=class extends Oi{constructor(e=16*1024){super({maxSize:e,sizeCalculation:r=>r.length+1})}},vg=Symbol("PathScurry setAsCwd"),ve=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#s;get mode(){return this.#s}#i;get nlink(){return this.#i}#a;get uid(){return this.#a}#v;get gid(){return this.#v}#u;get rdev(){return this.#u}#h;get blksize(){return this.#h}#o;get ino(){return this.#o}#l;get size(){return this.#l}#n;get blocks(){return this.#n}#m;get atimeMs(){return this.#m}#y;get mtimeMs(){return this.#y}#d;get ctimeMs(){return this.#d}#c;get birthtimeMs(){return this.#c}#E;get atime(){return this.#E}#g;get mtime(){return this.#g}#R;get ctime(){return this.#R}#x;get birthtime(){return this.#x}#w;#_;#S;#p;#A;#T;#r;#P;#b;#k;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,r=ze,i,n,s,a,o){this.name=e,this.#w=s?ks(e):ji(e),this.#r=r&gE,this.nocase=s,this.roots=n,this.root=i||this,this.#P=a,this.#S=o.fullpath,this.#A=o.relative,this.#T=o.relativePosix,this.parent=o.parent,this.parent?this.#e=this.parent.#e:this.#e=dg(o.fs)}depth(){return this.#_!==void 0?this.#_:this.parent?this.#_=this.parent.depth()+1:this.#_=0}childrenCache(){return this.#P}resolve(e){if(!e)return this;let r=this.getRootString(e),n=e.substring(r.length).split(this.splitSep);return r?this.getRoot(r).#C(n):this.#C(n)}#C(e){let r=this;for(let i of e)r=r.child(i);return r}children(){let e=this.#P.get(this);if(e)return e;let r=Object.assign([],{provisional:0});return this.#P.set(this,r),this.#r&=~gl,r}child(e,r){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let i=this.children(),n=this.nocase?ks(e):ji(e);for(let l of i)if(l.#w===n)return l;let s=this.parent?this.sep:"",a=this.#S?this.#S+s+e:void 0,o=this.newChild(e,ze,{...r,parent:this,fullpath:a});return this.canReaddir()||(o.#r|=Ze),i.push(o),o}relative(){if(this.isCWD)return"";if(this.#A!==void 0)return this.#A;let e=this.name,r=this.parent;if(!r)return this.#A=this.name;let i=r.relative();return i+(!i||!r.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#T!==void 0)return this.#T;let e=this.name,r=this.parent;if(!r)return this.#T=this.fullpathPosix();let i=r.relativePosix();return i+(!i||!r.parent?"":"/")+e}fullpath(){if(this.#S!==void 0)return this.#S;let e=this.name,r=this.parent;if(!r)return this.#S=this.name;let n=r.fullpath()+(r.parent?this.sep:"")+e;return this.#S=n}fullpathPosix(){if(this.#p!==void 0)return this.#p;if(this.sep==="/")return this.#p=this.fullpath();if(!this.parent){let n=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(n)?this.#p=`//?/${n}`:this.#p=n}let e=this.parent,r=e.fullpathPosix(),i=r+(!r||!e.parent?"":"/")+this.name;return this.#p=i}isUnknown(){return(this.#r&Ue)===ze}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.#r&Ue)===bg}isDirectory(){return(this.#r&Ue)===ot}isCharacterDevice(){return(this.#r&Ue)===mg}isBlockDevice(){return(this.#r&Ue)===yg}isFIFO(){return(this.#r&Ue)===gg}isSocket(){return(this.#r&Ue)===wg}isSymbolicLink(){return(this.#r&or)===or}lstatCached(){return this.#r&lg?this:void 0}readlinkCached(){return this.#b}realpathCached(){return this.#k}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#b)return!0;if(!this.parent)return!1;let e=this.#r&Ue;return!(e!==ze&&e!==or||this.#r&As||this.#r&Ze)}calledReaddir(){return!!(this.#r&gl)}isENOENT(){return!!(this.#r&Ze)}isNamed(e){return this.nocase?this.#w===ks(e):this.#w===ji(e)}async readlink(){let e=this.#b;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.#b=i}catch(r){this.#f(r.code);return}}readlinkSync(){let e=this.#b;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.#b=i}catch(r){this.#f(r.code);return}}#q(e){this.#r|=gl;for(let r=e.provisional;r<e.length;r++){let i=e[r];i&&i.#L()}}#L(){this.#r&Ze||(this.#r=(this.#r|Ze)&Ci,this.#M())}#M(){let e=this.children();e.provisional=0;for(let r of e)r.#L()}#O(){this.#r|=Ds,this.#j()}#j(){if(this.#r&Li)return;let e=this.#r;(e&Ue)===ot&&(e&=Ci),this.#r=e|Li,this.#M()}#N(e=""){e==="ENOTDIR"||e==="EPERM"?this.#j():e==="ENOENT"?this.#L():this.children().provisional=0}#F(e=""){e==="ENOTDIR"?this.parent.#j():e==="ENOENT"&&this.#L()}#f(e=""){let r=this.#r;r|=As,e==="ENOENT"&&(r|=Ze),(e==="EINVAL"||e==="UNKNOWN")&&(r&=Ci),this.#r=r,e==="ENOTDIR"&&this.parent&&this.parent.#j()}#I(e,r){return this.#D(e,r)||this.#$(e,r)}#$(e,r){let i=ml(e),n=this.newChild(e.name,i,{parent:this}),s=n.#r&Ue;return s!==ot&&s!==or&&s!==ze&&(n.#r|=Li),r.unshift(n),r.provisional++,n}#D(e,r){for(let i=r.provisional;i<r.length;i++){let n=r[i];if((this.nocase?ks(e.name):ji(e.name))===n.#w)return this.#W(e,n,i,r)}}#W(e,r,i,n){let s=r.name;return r.#r=r.#r&Ci|ml(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.#r&Ze)===0)try{return this.#H(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#F(e.code)}}lstatSync(){if((this.#r&Ze)===0)try{return this.#H(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#F(e.code)}}#H(e){let{atime:r,atimeMs:i,birthtime:n,birthtimeMs:s,blksize:a,blocks:o,ctime:l,ctimeMs:u,dev:c,gid:h,ino:d,mode:f,mtime:y,mtimeMs:b,nlink:_,rdev:E,size:R,uid:x}=e;this.#E=r,this.#m=i,this.#x=n,this.#c=s,this.#h=a,this.#n=o,this.#R=l,this.#d=u,this.#t=c,this.#v=h,this.#o=d,this.#s=f,this.#g=y,this.#y=b,this.#i=_,this.#u=E,this.#l=R,this.#a=x;let M=ml(e);this.#r=this.#r&Ci|M|lg,M!==ze&&M!==ot&&M!==or&&(this.#r|=Li)}#U=[];#z=!1;#G(e){this.#z=!1;let r=this.#U.slice();this.#U.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.#U.push(e),this.#z)return;this.#z=!0;let n=this.fullpath();this.#e.readdir(n,{withFileTypes:!0},(s,a)=>{if(s)this.#N(s.code),i.provisional=0;else{for(let o of a)this.#I(o,i);this.#q(i)}this.#G(i.slice(0,i.provisional))})}#B;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.#B)await this.#B;else{let i=()=>{};this.#B=new Promise(n=>i=n);try{for(let n of await this.#e.promises.readdir(r,{withFileTypes:!0}))this.#I(n,e);this.#q(e)}catch(n){this.#N(n.code),e.provisional=0}this.#B=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.#I(i,e);this.#q(e)}catch(i){this.#N(i.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#r&ug)return!1;let e=Ue&this.#r;return e===ze||e===ot||e===or}shouldWalk(e,r){return(this.#r&ot)===ot&&!(this.#r&ug)&&!e.has(this)&&(!r||r(this))}async realpath(){if(this.#k)return this.#k;if(!((Ds|As|Ze)&this.#r))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#k=this.resolve(e)}catch{this.#O()}}realpathSync(){if(this.#k)return this.#k;if(!((Ds|As|Ze)&this.#r))try{let e=this.#e.realpathSync(this.fullpath());return this.#k=this.resolve(e)}catch{this.#O()}}[vg](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let r=new Set([]),i=[],n=this;for(;n&&n.parent;)r.add(n),n.#A=i.join(this.sep),n.#T=i.join("/"),n=n.parent,i.push("..");for(n=e;n&&n.parent&&!r.has(n);)n.#A=void 0,n.#T=void 0,n=n.parent}},Cs=class t extends ve{sep="\\";splitSep=pE;constructor(e,r=ze,i,n,s,a,o){super(e,r,i,n,s,a,o)}newChild(e,r=ze,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(e){return jr.win32.parse(e).root}getRoot(e){if(e=dE(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 Nr(e,this).root}sameRoot(e,r=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(pg,"$1\\"),e===r}},qs=class t extends ve{splitSep="/";sep="/";constructor(e,r=ze,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=ze,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}},Ls=class{root;rootPath;roots;cwd;#e;#t;#s;nocase;#i;constructor(e=process.cwd(),r,i,{nocase:n,childrenCacheSize:s=16*1024,fs:a=qi}={}){this.#i=dg(a),(e instanceof URL||e.startsWith("file://"))&&(e=(0,cg.fileURLToPath)(e));let o=r.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#e=new Ps,this.#t=new Ps,this.#s=new yl(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,c=l.length-1,h=r.sep,d=this.rootPath,f=!1;for(let y of l){let b=c--;u=u.child(y,{relative:new Array(b).fill("..").join(h),relativePosix:new Array(b).fill("..").join("/"),fullpath:d+=(f?"":h)+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.#t.get(r);if(i!==void 0)return i;let n=this.cwd.resolve(r).fullpathPosix();return this.#t.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 ve||(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 ve||(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 ve||(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 ve||(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 ve||(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 ve||(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 ve||(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=(h,d)=>{l.add(h),h.readdirCB((f,y)=>{if(f)return d(f);let b=y.length;if(!b)return d();let _=()=>{--b===0&&d()};for(let E of y)(!s||s(E))&&o.push(i?E:E.fullpath()),n&&E.isSymbolicLink()?E.realpath().then(R=>R?.isUnknown()?R.lstat():R).then(R=>R?.shouldWalk(l,a)?u(R,_):_()):E.shouldWalk(l,a)?u(E,_):_()},!0)},c=e;return new Promise((h,d)=>{u(c,f=>{if(f)return d(f);h(o)})})}walkSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(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 c=u.readdirSync();for(let h of c){(!s||s(h))&&o.push(i?h:h.fullpath());let d=h;if(h.isSymbolicLink()){if(!(n&&(d=h.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(l,a)&&l.add(d)}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,r={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(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 ve||(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 c of u){(!s||s(c))&&(yield i?c:c.fullpath());let h=c;if(c.isSymbolicLink()){if(!(n&&(h=c.realpathSync())))continue;h.isUnknown()&&h.lstatSync()}h.shouldWalk(o,a)&&o.add(h)}}}stream(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=new Lr({objectMode:!0});(!s||s(e))&&o.write(i?e:e.fullpath());let l=new Set,u=[e],c=0,h=()=>{let d=!1;for(;!d;){let f=u.shift();if(!f){c===0&&o.end();return}c++,l.add(f);let y=(_,E,R=!1)=>{if(_)return o.emit("error",_);if(n&&!R){let x=[];for(let M of E)M.isSymbolicLink()&&x.push(M.realpath().then(k=>k?.isUnknown()?k.lstat():k));if(x.length){Promise.all(x).then(()=>y(null,E,!0));return}}for(let x of E)x&&(!s||s(x))&&(o.write(i?x:x.fullpath())||(d=!0));c--;for(let x of E){let M=x.realpathCached()||x;M.shouldWalk(l,a)&&u.push(M)}d&&!o.flowing?o.once("drain",h):b||h()},b=!0;f.readdirCB(y,!0),b=!1}};return h(),o}streamSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=new Lr({objectMode:!0}),l=new Set;(!s||s(e))&&o.write(i?e:e.fullpath());let u=[e],c=0,h=()=>{let d=!1;for(;!d;){let f=u.shift();if(!f){c===0&&o.end();return}c++,l.add(f);let y=f.readdirSync();for(let b of y)(!s||s(b))&&(o.write(i?b:b.fullpath())||(d=!0));c--;for(let b of y){let _=b;if(b.isSymbolicLink()){if(!(n&&(_=b.realpathSync())))continue;_.isUnknown()&&_.lstatSync()}_.shouldWalk(l,a)&&u.push(_)}}d&&!o.flowing&&o.once("drain",h)};return h(),o}chdir(e=this.cwd){let r=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[vg](r)}},Nr=class extends Ls{sep="\\";constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,jr.win32,"\\",{...r,nocase:i}),this.nocase=i;for(let n=this.cwd;n;n=n.parent)n.nocase=this.nocase}parseRootPath(e){return jr.win32.parse(e).root.toUpperCase()}newRoot(e){return new Cs(this.rootPath,ot,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},Fr=class extends Ls{sep="/";constructor(e=process.cwd(),r={}){let{nocase:i=!1}=r;super(e,jr.posix,"/",{...r,nocase:i}),this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new qs(this.rootPath,ot,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},Ni=class extends Fr{constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,{...r,nocase:i})}},Zx=process.platform==="win32"?Cs:qs,_g=process.platform==="win32"?Nr:process.platform==="darwin"?Ni:Fr;var mE=t=>t.length>=1,yE=t=>t.length>=1,Ir=class t{#e;#t;#s;length;#i;#a;#v;#u;#h;#o;#l=!0;constructor(e,r,i,n){if(!mE(e))throw new TypeError("empty pattern list");if(!yE(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.#t=r,this.#s=i,this.#i=n,this.#s===0){if(this.isUNC()){let[s,a,o,l,...u]=this.#e,[c,h,d,f,...y]=this.#t;u[0]===""&&(u.shift(),y.shift());let b=[s,a,o,l,""].join("/"),_=[c,h,d,f,""].join("/");this.#e=[b,...u],this.#t=[_,...y],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[s,...a]=this.#e,[o,...l]=this.#t;a[0]===""&&(a.shift(),l.shift());let u=s+"/",c=o+"/";this.#e=[u,...a],this.#t=[c,...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]===ge}isRegExp(){return this.#e[this.#s]instanceof RegExp}globString(){return this.#v=this.#v||(this.#s===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join("/"):this.#t.join("/"):this.#t.slice(this.#s).join("/"))}hasMore(){return this.length>this.#s+1}rest(){return this.#a!==void 0?this.#a:this.hasMore()?(this.#a=new t(this.#e,this.#t,this.#s+1,this.#i),this.#a.#o=this.#o,this.#a.#h=this.#h,this.#a.#u=this.#u,this.#a):this.#a=null}isUNC(){let e=this.#e;return this.#h!==void 0?this.#h:this.#h=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.#u!==void 0?this.#u:this.#u=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.#o!==void 0?this.#o:this.#o=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.#l)}markFollowGlobstar(){return this.#s===0||!this.isGlobstar()||!this.#l?!1:(this.#l=!1,!0)}};var Bs=require("node:events"),Rl=be(require("node:stream"),1),Tg=require("node:string_decoder"),Sg=typeof process=="object"&&process?process:{stdout:null,stderr:null},bE=t=>!!t&&typeof t=="object"&&(t instanceof Bi||t instanceof Rl.default||wE(t)||vE(t)),wE=t=>!!t&&typeof t=="object"&&t instanceof Bs.EventEmitter&&typeof t.pipe=="function"&&t.pipe!==Rl.default.Writable.prototype.pipe,vE=t=>!!t&&typeof t=="object"&&t instanceof Bs.EventEmitter&&typeof t.write=="function"&&typeof t.end=="function",mt=Symbol("EOF"),yt=Symbol("maybeEmitEnd"),Ft=Symbol("emittedEnd"),js=Symbol("emittingEnd"),Fi=Symbol("emittedError"),Ns=Symbol("closed"),Eg=Symbol("read"),Fs=Symbol("flush"),Rg=Symbol("flushChunk"),Qe=Symbol("encoding"),$r=Symbol("decoder"),ue=Symbol("flowing"),Ii=Symbol("paused"),Wr=Symbol("resume"),fe=Symbol("buffer"),Oe=Symbol("pipes"),he=Symbol("bufferLength"),bl=Symbol("bufferPush"),Is=Symbol("bufferShift"),_e=Symbol("objectMode"),ee=Symbol("destroyed"),wl=Symbol("error"),vl=Symbol("emitData"),xg=Symbol("emitEnd"),_l=Symbol("emitEnd2"),ut=Symbol("async"),Sl=Symbol("abort"),$s=Symbol("aborted"),$i=Symbol("signal"),lr=Symbol("dataListeners"),je=Symbol("discarded"),Wi=t=>Promise.resolve().then(t),_E=t=>t(),SE=t=>t==="end"||t==="finish"||t==="prefinish",EE=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,RE=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),Ws=class{src;dest;opts;ondrain;constructor(e,r,i){this.src=e,this.dest=r,this.opts=i,this.ondrain=()=>e[Wr](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},El=class extends Ws{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)}},xE=t=>!!t.objectMode,TE=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",Bi=class extends Bs.EventEmitter{[ue]=!1;[Ii]=!1;[Oe]=[];[fe]=[];[_e];[Qe];[ut];[$r];[mt]=!1;[Ft]=!1;[js]=!1;[Ns]=!1;[Fi]=null;[he]=0;[ee]=!1;[$i];[$s]=!1;[lr]=0;[je]=!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");xE(r)?(this[_e]=!0,this[Qe]=null):TE(r)?(this[Qe]=r.encoding,this[_e]=!1):(this[_e]=!1,this[Qe]=null),this[ut]=!!r.async,this[$r]=this[Qe]?new Tg.StringDecoder(this[Qe]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[fe]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Oe]});let{signal:i}=r;i&&(this[$i]=i,i.aborted?this[Sl]():i.addEventListener("abort",()=>this[Sl]()))}get bufferLength(){return this[he]}get encoding(){return this[Qe]}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[_e]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[ut]}set async(e){this[ut]=this[ut]||!!e}[Sl](){this[$s]=!0,this.emit("abort",this[$i]?.reason),this.destroy(this[$i]?.reason)}get aborted(){return this[$s]}set aborted(e){}write(e,r,i){if(this[$s])return!1;if(this[mt])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[ut]?Wi:_E;if(!this[_e]&&!Buffer.isBuffer(e)){if(RE(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(EE(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[_e]?(this[ue]&&this[he]!==0&&this[Fs](!0),this[ue]?this.emit("data",e):this[bl](e),this[he]!==0&&this.emit("readable"),i&&n(i),this[ue]):e.length?(typeof e=="string"&&!(r===this[Qe]&&!this[$r]?.lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[Qe]&&(e=this[$r].write(e)),this[ue]&&this[he]!==0&&this[Fs](!0),this[ue]?this.emit("data",e):this[bl](e),this[he]!==0&&this.emit("readable"),i&&n(i),this[ue]):(this[he]!==0&&this.emit("readable"),i&&n(i),this[ue])}read(e){if(this[ee])return null;if(this[je]=!1,this[he]===0||e===0||e&&e>this[he])return this[yt](),null;this[_e]&&(e=null),this[fe].length>1&&!this[_e]&&(this[fe]=[this[Qe]?this[fe].join(""):Buffer.concat(this[fe],this[he])]);let r=this[Eg](e||null,this[fe][0]);return this[yt](),r}[Eg](e,r){if(this[_e])this[Is]();else{let i=r;e===i.length||e===null?this[Is]():typeof i=="string"?(this[fe][0]=i.slice(e),r=i.slice(0,e),this[he]-=e):(this[fe][0]=i.subarray(e),r=i.subarray(0,e),this[he]-=e)}return this.emit("data",r),!this[fe].length&&!this[mt]&&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[mt]=!0,this.writable=!1,(this[ue]||!this[Ii])&&this[yt](),this}[Wr](){this[ee]||(!this[lr]&&!this[Oe].length&&(this[je]=!0),this[Ii]=!1,this[ue]=!0,this.emit("resume"),this[fe].length?this[Fs]():this[mt]?this[yt]():this.emit("drain"))}resume(){return this[Wr]()}pause(){this[ue]=!1,this[Ii]=!0,this[je]=!1}get destroyed(){return this[ee]}get flowing(){return this[ue]}get paused(){return this[Ii]}[bl](e){this[_e]?this[he]+=1:this[he]+=e.length,this[fe].push(e)}[Is](){return this[_e]?this[he]-=1:this[he]-=this[fe][0].length,this[fe].shift()}[Fs](e=!1){do;while(this[Rg](this[Is]())&&this[fe].length);!e&&!this[fe].length&&!this[mt]&&this.emit("drain")}[Rg](e){return this.emit("data",e),this[ue]}pipe(e,r){if(this[ee])return e;this[je]=!1;let i=this[Ft];return r=r||{},e===Sg.stdout||e===Sg.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,i?r.end&&e.end():(this[Oe].push(r.proxyErrors?new El(this,e,r):new Ws(this,e,r)),this[ut]?Wi(()=>this[Wr]()):this[Wr]()),e}unpipe(e){let r=this[Oe].find(i=>i.dest===e);r&&(this[Oe].length===1?(this[ue]&&this[lr]===0&&(this[ue]=!1),this[Oe]=[]):this[Oe].splice(this[Oe].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[je]=!1,this[lr]++,!this[Oe].length&&!this[ue]&&this[Wr]();else if(e==="readable"&&this[he]!==0)super.emit("readable");else if(SE(e)&&this[Ft])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[Fi]){let n=r;this[ut]?Wi(()=>n.call(this,this[Fi])):n.call(this,this[Fi])}return i}removeListener(e,r){return this.off(e,r)}off(e,r){let i=super.off(e,r);return e==="data"&&(this[lr]=this.listeners("data").length,this[lr]===0&&!this[je]&&!this[Oe].length&&(this[ue]=!1)),i}removeAllListeners(e){let r=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[lr]=0,!this[je]&&!this[Oe].length&&(this[ue]=!1)),r}get emittedEnd(){return this[Ft]}[yt](){!this[js]&&!this[Ft]&&!this[ee]&&this[fe].length===0&&this[mt]&&(this[js]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Ns]&&this.emit("close"),this[js]=!1)}emit(e,...r){let i=r[0];if(e!=="error"&&e!=="close"&&e!==ee&&this[ee])return!1;if(e==="data")return!this[_e]&&!i?!1:this[ut]?(Wi(()=>this[vl](i)),!0):this[vl](i);if(e==="end")return this[xg]();if(e==="close"){if(this[Ns]=!0,!this[Ft]&&!this[ee])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[Fi]=i,super.emit(wl,i);let s=!this[$i]||this.listeners("error").length?super.emit("error",i):!1;return this[yt](),s}else if(e==="resume"){let s=super.emit("resume");return this[yt](),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[yt](),n}[vl](e){for(let i of this[Oe])i.dest.write(e)===!1&&this.pause();let r=this[je]?!1:super.emit("data",e);return this[yt](),r}[xg](){return this[Ft]?!1:(this[Ft]=!0,this.readable=!1,this[ut]?(Wi(()=>this[_l]()),!0):this[_l]())}[_l](){if(this[$r]){let r=this[$r].end();if(r){for(let i of this[Oe])i.dest.write(r);this[je]||super.emit("data",r)}}for(let r of this[Oe])r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[_e]||(e.dataLength=0);let r=this.promise();return this.on("data",i=>{e.push(i),this[_e]||(e.dataLength+=i.length)}),await r,e}async concat(){if(this[_e])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Qe]?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[je]=!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[mt])return r();let s,a,o=h=>{this.off("data",l),this.off("end",u),this.off(ee,c),r(),a(h)},l=h=>{this.off("error",o),this.off("end",u),this.off(ee,c),this.pause(),s({value:h,done:!!this[mt]})},u=()=>{this.off("error",o),this.off("data",l),this.off(ee,c),r(),s({done:!0,value:void 0})},c=()=>o(new Error("stream destroyed"));return new Promise((h,d)=>{a=d,s=h,this.once(ee,c),this.once("error",o),this.once("end",u),this.once("data",l)})},throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[je]=!1;let e=!1,r=()=>(this.pause(),this.off(wl,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(wl,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[je]=!0,this[fe].length=0,this[he]=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 bE}};var ME=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Br=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:r,nocase:i,noext:n,noglobstar:s,platform:a=ME}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=a,this.mmopts={dot:!0,nobrace:r,nocase:i,noext:n,noglobstar:s,optimizationLevel:2,platform:a,nocomment:!0,nonegate:!0};for(let o of e)this.add(o)}add(e){let r=new qe(e,this.mmopts);for(let i=0;i<r.set.length;i++){let n=r.set[i],s=r.globParts[i];if(!n||!s)throw new Error("invalid pattern object");for(;n[0]==="."&&s[0]===".";)n.shift(),s.shift();let a=new Ir(n,s,0,this.platform),o=new qe(a.globString(),this.mmopts),l=s[s.length-1]==="**",u=a.isAbsolute();u?this.absolute.push(o):this.relative.push(o),l&&(u?this.absoluteChildren.push(o):this.relativeChildren.push(o))}}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 xl=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()]))}},Tl=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)])}},Ml=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())}},Ui=class t{hasWalkedCache;matches=new Tl;subwalks=new Ml;patterns;follow;dot;opts;constructor(e,r){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=r?r.copy():new xl}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 h=s.rest();if(h)s=h;else{this.matches.add(n,!0,!1);continue}}if(n.isENOENT())continue;let l,u,c=!1;for(;typeof(l=s.pattern())=="string"&&(u=s.rest());)n=n.resolve(l),s=u,c=!0;if(l=s.pattern(),u=s.rest(),c){if(this.hasWalkedCache.hasWalked(n,s))continue;this.hasWalkedCache.storeWalked(n,s)}if(typeof l=="string"){let h=l===".."||l===""||l===".";this.matches.add(n.resolve(l),o,h);continue}else if(l===ge){(!n.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(n,s);let h=u?.pattern(),d=u?.rest();if(!u||(h===""||h===".")&&!d)this.matches.add(n,o,h===""||h===".");else if(h===".."){let f=n.parent||n;d?this.hasWalkedCache.hasWalked(f,d)||this.subwalks.add(f,d):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===ge?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 OE=(t,e)=>typeof t=="string"?new Br([t],e):Array.isArray(t)?new Br(t,e):t,Us=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#s;signal;maxDepth;includeChildMatches;constructor(e,r,i){if(this.patterns=e,this.path=r,this.opts=i,this.#s=!i.posix&&i.platform==="win32"?"\\":"/",this.includeChildMatches=i.includeChildMatches!==!1,(i.ignore||!this.includeChildMatches)&&(this.#t=OE(i.ignore??[],i),!this.includeChildMatches&&typeof this.#t.add!="function")){let n="cannot ignore child matches, ignore lacks add() method.";throw new Error(n)}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.#t?.ignored?.(e)}#a(e){return!!this.#t?.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;if(!this.includeChildMatches&&this.#t?.add){let s=`${e.relativePosix()}/**`;this.#t.add(s)}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 Ui(this.opts),i)}walkCB2(e,r,i,n){if(this.#a(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,c)=>this.walkCB3(o,c,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 Ui(this.opts),i)}walkCB2Sync(e,r,i,n){if(this.#a(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()}},zi=class extends Us{matches=new Set;constructor(e,r,i){super(e,r,i)}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}},Hi=class extends Us{results;constructor(e,r,i){super(e,r,i),this.results=new Bi({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 AE=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Xe=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;includeChildMatches;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,Mg.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.includeChildMatches=r.includeChildMatches!==!1,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||AE,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"?Nr:r.platform==="darwin"?Ni:r.platform?Fr:_g;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 qe(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 c=o[u];if(!c)throw new Error("invalid pattern object");return new Ir(l,c,0,this.platform)})}async walk(){return[...await new zi(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,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new zi(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,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new Hi(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,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new Hi(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,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};var Ol=(t,e={})=>{Array.isArray(t)||(t=[t]);for(let r of t)if(new qe(r,e).hasMagic())return!0;return!1};function Hs(t,e={}){return new Xe(t,e).streamSync()}function Ag(t,e={}){return new Xe(t,e).stream()}function kg(t,e={}){return new Xe(t,e).walkSync()}async function Og(t,e={}){return new Xe(t,e).walk()}function Gs(t,e={}){return new Xe(t,e).iterateSync()}function Dg(t,e={}){return new Xe(t,e).iterate()}var kE=Hs,DE=Object.assign(Ag,{sync:Hs}),PE=Gs,CE=Object.assign(Dg,{sync:Gs}),qE=Object.assign(kg,{stream:Hs,iterate:Gs}),zs=Object.assign(Og,{glob:Og,globSync:kg,sync:qE,globStream:Ag,stream:DE,globStreamSync:Hs,streamSync:kE,globIterate:Dg,iterate:CE,globIterateSync:Gs,iterateSync:PE,Glob:Xe,hasMagic:Ol,escape:kr,unescape:Ke});zs.glob=zs;var LE="../build",jE="../wheels";async function Lg(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 NE(t){I.info("Copy the build directory (the bare built app files) to this directory...");let e=me.default.resolve(__dirname,LE);if(!(await bt.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 bt.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 bt.default.rm(t.copyTo,{recursive:!0,force:!0}),await Al.default.copy(e,t.copyTo,{errorOnExist:!0})}async function FE(t){if(t.requirements.length===0)return[];let e=await(0,Gi.loadPyodide)({packageCacheDir:t.pyodideRuntimeDir});return e._api.setCdnUrl(t.pyodideSource),await jg(e,{requirements:t.requirements}),Object.entries(e.loadedPackages).filter(([,r])=>r==="default channel").map(([r])=>r)}async function Pg(t,e){I.debug("Preparing the local wheel: %s",e);let r=await bt.default.readFile(e),i="/tmp/"+me.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 jg(t,e){await Lg(t,"micropip");let r=t.pyimport("micropip"),i=[...e.requirements],n=me.default.join(__dirname,jE),s=await Pg(t,me.default.join(n,"stlite_lib-0.1.0-py3-none-any.whl"));i.push(s);let a=await Pg(t,me.default.join(n,"streamlit-1.41.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 IE(t){I.info("Create the site-packages snapshot file...");let e=await(0,Gi.loadPyodide)({packageCacheDir:t.pyodideRuntimeDir});e._api.setCdnUrl(t.pyodideSource),await Lg(e,"micropip");let r=e.pyimport("micropip"),i=new ys(t.pyodideSource),n=[];if(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...");for(let o of t.usedPrebuiltPackages){let l=await 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 jg(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,7 +46,7 @@ globstar while`,e,d,r,f,y),this.matchOne(e.slice(d),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 bt.default.writeFile(t.saveTo,a)}async function $E(t){I.info("Copy the app directory..."),await Promise.all(t.filePathPatterns.map(async e=>{let r=await zs(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=me.default.resolve(t.cwd,i),s=me.default.resolve(t.destAppDir,i);I.debug(`Copy ${n} to ${s}`),await
|
|
49
|
+
`),I.info("Extract the archive file from EMFS");let a=e.FS.readFile(s);I.info(`Save the archive file (${t.saveTo})`),await bt.default.writeFile(t.saveTo,a)}async function $E(t){I.info("Copy the app directory..."),await Promise.all(t.filePathPatterns.map(async e=>{let r=await zs(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=me.default.resolve(t.cwd,i),s=me.default.resolve(t.destAppDir,i);I.debug(`Copy ${n} to ${s}`),await Al.default.copy(n,s,{errorOnExist:!0})}))}))}async function WE(t,e){try{await bt.default.access(me.default.resolve(t,e))}catch{throw new Error(`The entrypoint file "${e}" is not included in the bundled files.`)}}async function BE(t){let e=await bt.default.readFile(t,{encoding:"utf-8"});return Mp(e)}async function UE(t,e){let r=e.join(`
|
|
50
50
|
`);await bt.default.writeFile(t,r,{encoding:"utf-8"})}(0,Cg.default)((0,qg.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("pyodideSource",{type:"string",describe:"The base URL or path of the Pyodide files to download or copy, such as the prebuild package wheels and pyodide-lock.json",default:`https://cdn.jsdelivr.net/pyodide/v${Gi.version}/full/`,coerce:t=>(t.endsWith("/")||(t+="/"),t)}).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=me.default.resolve(e,"./build"),i=me.default.resolve(e,"./package.json"),n=require(i),s=await xp({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 c=>BE(c))).then(c=>c.flat());I.info("Dependencies from `requirements.txt` files: %j",a);let o=Tp([...s.dependencies,...a]);I.info("Validated dependency list: %j",o),await NE({copyTo:r,keepOld:t.keepOldBuild});let l=await FE({pyodideSource:t.pyodideSource,pyodideRuntimeDir:me.default.resolve(r,"./pyodide"),requirements:o});I.info("The prebuilt packages loaded for the given requirements: %j",l);let u=me.default.resolve(r,"./app_files");await $E({cwd:e,filePathPatterns:s.files,destAppDir:u}),WE(u,s.entrypoint),await IE({requirements:o,usedPrebuiltPackages:l,pyodideSource:t.pyodideSource,pyodideRuntimeDir:me.default.resolve(r,"./pyodide"),saveTo:me.default.resolve(r,"./site-packages-snapshot.tar.gz")}),await UE(me.default.resolve(r,"./prebuilt-packages.txt"),l),await Ep({packageJsonStliteDesktopField:n.stlite?.desktop,manifestFilePath:me.default.resolve(r,"./stlite-manifest.json"),fallbacks:{entrypoint:s.entrypoint}})});
|
|
51
51
|
/*! Bundled license information:
|
|
52
52
|
|