@stlite/desktop 0.83.0 → 0.83.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/bin/dump_artifacts.js +31 -31
  2. package/build/assets/{ErrorOutline.esm-w3SotGgg.js → ErrorOutline.esm-Cdc3NAX8.js} +1 -1
  3. package/build/assets/{FileDownload.esm-DNaG7mhy.js → FileDownload.esm-CbXaPbiH.js} +1 -1
  4. package/build/assets/{FileHelper-DoUfoupm.js → FileHelper-WDsMYNBw.js} +1 -1
  5. package/build/assets/{FormClearHelper-DI9KwuTl.js → FormClearHelper-CT0Jwp4X.js} +1 -1
  6. package/build/assets/{Hooks-BRr-mPDr.js → Hooks-BKPTn6xf.js} +1 -1
  7. package/build/assets/{InputInstructions-mpv25B9R.js → InputInstructions-Cyg7opie.js} +1 -1
  8. package/build/assets/{ProgressBar-DalMRT-4.js → ProgressBar-CA-bplbU.js} +1 -1
  9. package/build/assets/{RenderInPortalIfExists-CfX3LXlx.js → RenderInPortalIfExists-BozYGWdi.js} +1 -1
  10. package/build/assets/{Toolbar-1r13KE9d.js → Toolbar-DlGOP7h4.js} +1 -1
  11. package/build/assets/{base-input-BJ4WO1K3.js → base-input-BnIlcFzX.js} +1 -1
  12. package/build/assets/{checkbox-COr-UunX.js → checkbox-CGvNPQQ1.js} +1 -1
  13. package/build/assets/{createSuper-BD8Om4of.js → createSuper-B8yCxQGq.js} +1 -1
  14. package/build/assets/{data-grid-overlay-editor-DUKLRWRf.js → data-grid-overlay-editor-CltKX1-_.js} +1 -1
  15. package/build/assets/{downloader-K2yu2VBv.js → downloader-Cof1FiXt.js} +1 -1
  16. package/build/assets/{es6-CqFPgbyx.js → es6-Ca0BcWDW.js} +2 -2
  17. package/build/assets/{iframeResizer.contentWindow-CYxwXEKD.js → iframeResizer.contentWindow-3AhBUVoO.js} +1 -1
  18. package/build/assets/{index-DIR2fiU3.js → index--NPqZQqZ.js} +1 -1
  19. package/build/assets/{index-Bga7N97D.js → index-2MeZae5n.js} +1 -1
  20. package/build/assets/{index-Dkkplt7E.js → index-BBjBAKoV.js} +1 -1
  21. package/build/assets/{index-CgIf_789.js → index-BMvzOjlv.js} +1 -1
  22. package/build/assets/{index-CBHSzhtV.js → index-BUOOlidY.js} +1 -1
  23. package/build/assets/{index-CgaLKbNA.js → index-BafYTuwa.js} +1 -1
  24. package/build/assets/{index-CbGVTpRX.js → index-Bc7AX3-A.js} +1 -1
  25. package/build/assets/{index-h6PFbOmO.js → index-Bcsdrj2S.js} +5 -5
  26. package/build/assets/{index-DAyJZph2.js → index-C8-4FAc1.js} +1 -1
  27. package/build/assets/{index-CG0w2Shn.js → index-CLBVu_mK.js} +1 -1
  28. package/build/assets/{index-BTWAYrEA.js → index-CN5CjLsc.js} +1 -1
  29. package/build/assets/{index-GeTKqk0L.js → index-COAtiAK0.js} +1 -1
  30. package/build/assets/{index-oIFkiM-w.js → index-CS3tnJiL.js} +1 -1
  31. package/build/assets/{index-DAFr20lD.js → index-CVrdwKzt.js} +1 -1
  32. package/build/assets/{index-BY2_5dEP.js → index-CWEVeVJ6.js} +1 -1
  33. package/build/assets/{index-CJj5-jL6.js → index-C_kIyk9w.js} +1 -1
  34. package/build/assets/{index-CVPZJuoC.js → index-Cbvbjd8C.js} +4 -4
  35. package/build/assets/{index-DJ9ENWJ6.js → index-ChbiMLbp.js} +1 -1
  36. package/build/assets/{index-QxKGd3KZ.js → index-DCoy2PDE.js} +1 -1
  37. package/build/assets/{index-Cy3sYumn.js → index-DIBxvKdk.js} +1 -1
  38. package/build/assets/{index-BVYhtbL7.js → index-DSVyX96W.js} +1 -1
  39. package/build/assets/{index-CTKSPDuj.js → index-DfeaHlsl.js} +1 -1
  40. package/build/assets/{index-D4DI0i3_.js → index-Do3iUH-x.js} +1 -1
  41. package/build/assets/{index-DhpOSNWU.js → index-Dw5G4t9P.js} +1 -1
  42. package/build/assets/{index-B7nFcP4b.js → index-Dx-GFi6o.js} +1 -1
  43. package/build/assets/{index-TIqCq-vm.js → index-J-18FLnE.js} +1 -1
  44. package/build/assets/{index-BBSx627c.js → index-PRsYLT-9.js} +1 -1
  45. package/build/assets/{index-Chg_Z_Ai.js → index-TkDz3vqu.js} +1 -1
  46. package/build/assets/{index-DHvjd_NM.js → index-XyUVDWZe.js} +1 -1
  47. package/build/assets/{index-WJi2gbUd.js → index-Zd66ep5J.js} +1 -1
  48. package/build/assets/{index-D_aTbShm.js → index-ax2rbmoZ.js} +1 -1
  49. package/build/assets/{index-qPiigGKE.js → index-bQj3l0zc.js} +1 -1
  50. package/build/assets/{index-DZGNB9Z2.js → index-bfhlF0Xi.js} +1 -1
  51. package/build/assets/{index-dOLNZa0u.js → index-dalh9Y65.js} +1 -1
  52. package/build/assets/{index-FQnDjdgN.js → index-ocHxXLCt.js} +1 -1
  53. package/build/assets/{index-bXFpQSEH.js → index-uxEQ8qdA.js} +1 -1
  54. package/build/assets/{index-DbWqdg_N.js → index-wCYAC2ZH.js} +1 -1
  55. package/build/assets/{inherits-DtR6i4OG.js → inherits-BaopKHev.js} +1 -1
  56. package/build/assets/{input-9qldoJOB.js → input-BH9uqfZf.js} +1 -1
  57. package/build/assets/{memory-Cy3-iIgx.js → memory-DWTwf9Ch.js} +1 -1
  58. package/build/assets/{mergeWith-DdD-5zWL.js → mergeWith-Bt-C9xRx.js} +1 -1
  59. package/build/assets/{number-overlay-editor-DmP64vrs.js → number-overlay-editor-Dm8-09pg.js} +1 -1
  60. package/build/assets/{sandbox-DzhFXmWd.js → sandbox-DGYybjEz.js} +1 -1
  61. package/build/assets/{slicedToArray-CNrowD0v.js → slicedToArray-CEuyIGI5.js} +1 -1
  62. package/build/assets/{textarea-Bql4j-_M.js → textarea-BKB-3cBX.js} +1 -1
  63. package/build/assets/{timepicker-sEhIITXf.js → timepicker-B1BEcpbo.js} +1 -1
  64. package/build/assets/{uniqueId-DfRnwW3q.js → uniqueId-BSuwhGjw.js} +1 -1
  65. package/build/assets/{useBasicWidgetState-DJ8kXLgn.js → useBasicWidgetState-D3a9XYx3.js} +1 -1
  66. package/build/assets/{useOnInputChange-CZX_IkMh.js → useOnInputChange-BlFu2GNS.js} +1 -1
  67. package/build/assets/{withFullScreenWrapper-DBlEST2L.js → withFullScreenWrapper-D8NJOCKn.js} +1 -1
  68. package/build/assets/worker-Cy9Gj5BL.js +113 -0
  69. package/build/electron/worker.js +10 -112
  70. package/build/index.html +1 -1
  71. package/package.json +4 -4
  72. package/wheels/streamlit-1.45.1-cp312-none-any.whl +0 -0
  73. package/build/assets/worker-CXcujS1W.js +0 -215
@@ -3,41 +3,41 @@
3
3
  import { createRequire } from "module";
4
4
  const require = createRequire(import.meta.url);
5
5
 
6
- var zp=Object.create;var Wo=Object.defineProperty;var Hp=Object.getOwnPropertyDescriptor;var Gp=Object.getOwnPropertyNames;var Vp=Object.getPrototypeOf,Yp=Object.prototype.hasOwnProperty;var L=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var w=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Kp=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Gp(e))!Yp.call(t,n)&&n!==r&&Wo(t,n,{get:()=>e[n],enumerable:!(i=Hp(e,n))||i.enumerable});return t};var Tr=(t,e,r)=>(r=t!=null?zp(Vp(t)):{},Kp(e||!t||!t.__esModule?Wo(r,"default",{value:t,enumerable:!0}):r,t));var Ee=w((VS,Bo)=>{"use strict";var bs=class t extends Error{constructor(e){super(`Format functions must be synchronous taking a two arguments: (info, opts)
6
+ var Fp=Object.create;var Bo=Object.defineProperty;var Ip=Object.getOwnPropertyDescriptor;var $p=Object.getOwnPropertyNames;var Wp=Object.getPrototypeOf,Bp=Object.prototype.hasOwnProperty;var q=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var w=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Up=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of $p(e))!Bp.call(t,n)&&n!==r&&Bo(t,n,{get:()=>e[n],enumerable:!(i=Ip(e,n))||i.enumerable});return t};var Ai=(t,e,r)=>(r=t!=null?Fp(Wp(t)):{},Up(e||!t||!t.__esModule?Bo(r,"default",{value:t,enumerable:!0}):r,t));var Ee=w((ZS,Uo)=>{"use strict";var bs=class t extends Error{constructor(e){super(`Format functions must be synchronous taking a two arguments: (info, opts)
7
7
  Found: ${e.toString().split(`
8
8
  `)[0]}
9
- `),Error.captureStackTrace(this,t)}};Bo.exports=t=>{if(t.length>2)throw new bs(t);function e(i={}){this.options=i}e.prototype.transform=t;function r(i){return new e(i)}return r.Format=e,r}});var Go=w((YS,Ho)=>{var zo={};Ho.exports=zo;var Uo={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(Uo).forEach(function(t){var e=Uo[t],r=zo[t]=[];r.open="\x1B["+e[0]+"m",r.close="\x1B["+e[1]+"m"})});var Yo=w((KS,Vo)=>{"use strict";Vo.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 Jo=w((JS,Ko)=>{"use strict";var Jp=L("os"),Ie=Yo(),we=process.env,Zt=void 0;Ie("no-color")||Ie("no-colors")||Ie("color=false")?Zt=!1:(Ie("color")||Ie("colors")||Ie("color=true")||Ie("color=always"))&&(Zt=!0);"FORCE_COLOR"in we&&(Zt=we.FORCE_COLOR.length===0||parseInt(we.FORCE_COLOR,10)!==0);function Zp(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Qp(t){if(Zt===!1)return 0;if(Ie("color=16m")||Ie("color=full")||Ie("color=truecolor"))return 3;if(Ie("color=256"))return 2;if(t&&!t.isTTY&&Zt!==!0)return 0;var e=Zt?1:0;if(process.platform==="win32"){var r=Jp.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 we)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(n){return n in we})||we.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in we)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(we.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in we){var i=parseInt((we.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(we.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(we.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(we.TERM)||"COLORTERM"in we?1:(we.TERM==="dumb",e)}function ws(t){var e=Qp(t);return Zp(e)}Ko.exports={supportsColor:ws,stdout:ws(process.stdout),stderr:ws(process.stderr)}});var Qo=w((ZS,Zo)=>{Zo.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 el=w((QS,Xo)=>{Xo.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 rl=w((XS,tl)=>{tl.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 nl=w((eE,il)=>{il.exports=function(t){return function(e,r,i){return r%2===0?e:t.inverse(e)}}});var al=w((tE,sl)=>{sl.exports=function(t){var e=["red","yellow","green","blue","magenta"];return function(r,i,n){return r===" "?r:t[e[i++%e.length]](r)}}});var ll=w((rE,ol)=>{ol.exports=function(t){var e=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(r,i,n){return r===" "?r:t[e[Math.round(Math.random()*(e.length-2))]](r)}}});var pl=w((nE,dl)=>{var F={};dl.exports=F;F.themes={};var Xp=L("util"),Pt=F.styles=Go(),fl=Object.defineProperties,eg=new RegExp(/[\r\n]+/g);F.supportsColor=Jo().supportsColor;typeof F.enabled>"u"&&(F.enabled=F.supportsColor()!==!1);F.enable=function(){F.enabled=!0};F.disable=function(){F.enabled=!1};F.stripColors=F.strip=function(t){return(""+t).replace(/\x1B\[\d+m/g,"")};var iE=F.stylize=function(e,r){if(!F.enabled)return e+"";var i=Pt[r];return!i&&r in F?F[r](e):i.open+e+i.close},tg=/[|\\{}()[\]^$+*?.]/g,rg=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(tg,"\\$&")};function hl(t){var e=function r(){return ng.apply(r,arguments)};return e._styles=t,e.__proto__=ig,e}var cl=function(){var t={};return Pt.grey=Pt.gray,Object.keys(Pt).forEach(function(e){Pt[e].closeRe=new RegExp(rg(Pt[e].close),"g"),t[e]={get:function(){return hl(this._styles.concat(e))}}}),t}(),ig=fl(function(){},cl);function ng(){var t=Array.prototype.slice.call(arguments),e=t.map(function(a){return a!=null&&a.constructor===String?a:Xp.inspect(a)}).join(" ");if(!F.enabled||!e)return e;for(var r=e.indexOf(`
10
- `)!=-1,i=this._styles,n=i.length;n--;){var s=Pt[i[n]];e=s.open+e.replace(s.closeRe,s.open)+s.close,r&&(e=e.replace(eg,function(a){return s.close+a+s.open}))}return e}F.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){F[r]=function(i){if(typeof t[r]=="object"){var n=i;for(var s in t[r])n=F[t[r][s]](n);return n}return F[t[r]](i)}})(e)};function sg(){var t={};return Object.keys(cl).forEach(function(e){t[e]={get:function(){return hl([e])}}}),t}var ag=function(e,r){var i=r.split("");return i=i.map(e),i.join("")};F.trap=Qo();F.zalgo=el();F.maps={};F.maps.america=rl()(F);F.maps.zebra=nl()(F);F.maps.rainbow=al()(F);F.maps.random=ll()(F);for(ul in F.maps)(function(t){F[t]=function(e){return ag(F.maps[t],e)}})(ul);var ul;fl(F,sg())});var vs=w((sE,gl)=>{var og=pl();gl.exports=og});var ml=w(_s=>{"use strict";_s.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9};_s.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}});var yl=w(Ss=>{"use strict";Ss.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6};Ss.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}});var bl=w(Es=>{"use strict";Es.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7};Es.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}});var wl=w(ki=>{"use strict";Object.defineProperty(ki,"cli",{value:ml()});Object.defineProperty(ki,"npm",{value:yl()});Object.defineProperty(ki,"syslog",{value:bl()})});var re=w(Or=>{"use strict";Object.defineProperty(Or,"LEVEL",{value:Symbol.for("level")});Object.defineProperty(Or,"MESSAGE",{value:Symbol.for("message")});Object.defineProperty(Or,"SPLAT",{value:Symbol.for("splat")});Object.defineProperty(Or,"configs",{value:wl()})});var qi=w((hE,Di)=>{"use strict";var Ms=vs(),{LEVEL:Rs,MESSAGE:xs}=re();Ms.enabled=!0;var vl=/\s+/,Pi=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]=vl.test(e[n])?e[n].split(vl):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 Ms[t.allColors[e]](i);for(let n=0,s=t.allColors[e].length;n<s;n++)i=Ms[t.allColors[e][n]](i);return i}transform(e,r){return r.all&&typeof e[xs]=="string"&&(e[xs]=this.colorize(e[Rs],e.level,e[xs])),(r.level||r.all||!r.message)&&(e.level=this.colorize(e[Rs],e.level)),(r.all||r.message)&&(e.message=this.colorize(e[Rs],e.level,e.message)),e}};Di.exports=t=>new Pi(t);Di.exports.Colorizer=Di.exports.Format=Pi});var Sl=w((cE,_l)=>{"use strict";var{Colorizer:lg}=qi();_l.exports=t=>(lg.addColors(t.colors||t),t)});var Rl=w((dE,El)=>{"use strict";var ug=Ee();El.exports=ug(t=>(t.message=` ${t.message}`,t))});var Tl=w((pE,Ml)=>{"use strict";var fg=Ee(),{LEVEL:xl,MESSAGE:Ts}=re();Ml.exports=fg((t,{stack:e,cause:r})=>{if(t instanceof Error){let n=Object.assign({},t,{level:t.level,[xl]:t[xl]||t.level,message:t.message,[Ts]:t[Ts]||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[Ts]=i.message,e&&(t.stack=i.stack),r&&(t.cause=i.cause),t})});var As=w((gE,Li)=>{"use strict";var{configs:hg,LEVEL:Ol,MESSAGE:Os}=re(),Ci=class t{constructor(e={levels:hg.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[Ol]]}${e.message}`,e[Os]&&(e[Os]=`${this.paddings[e[Ol]]}${e[Os]}`),e}};Li.exports=t=>new Ci(t);Li.exports.Padder=Li.exports.Format=Ci});var Al=w((mE,ks)=>{"use strict";var{Colorizer:cg}=qi(),{Padder:dg}=As(),{configs:pg,MESSAGE:gg}=re(),ji=class{constructor(e={}){e.levels||(e.levels=pg.cli.levels),this.colorizer=new cg(e),this.padder=new dg(e),this.options=e}transform(e,r){return this.colorizer.transform(this.padder.transform(e,r),r),e[gg]=`${e.level}:${e.message}`,e}};ks.exports=t=>new ji(t);ks.exports.Format=ji});var Pl=w((yE,Ps)=>{"use strict";var mg=Ee();function kl(t){if(t.every(yg))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 yg(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(`
11
- `));return!0}Ps.exports=(...t)=>{let e=mg(kl(t)),r=e();return r.Format=e.Format,r};Ps.exports.cascade=kl});var Ar=w((Ls,Ll)=>{"use strict";var{hasOwnProperty:Ni}=Object.prototype,qt=Cs();qt.configure=Cs;qt.stringify=qt;qt.default=qt;Ls.stringify=qt;Ls.configure=Cs;Ll.exports=qt;var bg=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;function ut(t){return t.length<5e3&&!bg.test(t)?`"${t}"`:JSON.stringify(t)}function Ds(t){if(t.length>200)return t.sort();for(let e=1;e<t.length;e++){let r=t[e],i=e;for(;i!==0&&t[i-1]>r;)t[i]=t[i-1],i--;t[i]=r}return t}var wg=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function qs(t){return wg.call(t)!==void 0&&t.length!==0}function Dl(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 vg(t){if(Ni.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 ql(t,e){let r;if(Ni.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 Cl(t,e){let r;if(Ni.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 Dt(t){return t===1?"1 item":`${t} items`}function _g(t){let e=new Set;for(let r of t)(typeof r=="string"||typeof r=="number")&&e.add(String(r));return e}function Sg(t){if(Ni.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 Cs(t){t={...t};let e=Sg(t);e&&(t.bigint===void 0&&(t.bigint=!1),"circularValue"in t||(t.circularValue=Error));let r=vg(t),i=ql(t,"bigint"),n=ql(t,"deterministic"),s=Cl(t,"maximumDepth"),a=Cl(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 ut(R);case"object":{if(R===null)return"null";if(y.indexOf(R)!==-1)return r;let x="",T=",",k=E;if(Array.isArray(R)){if(R.length===0)return"[]";if(s<y.length+1)return'"[Array]"';y.push(R),_!==""&&(E+=_,x+=`
12
- ${E}`,T=`,
13
- ${E}`);let J=Math.min(R.length,a),ye=0;for(;ye<J-1;ye++){let et=o(String(ye),R,y,b,_,E);x+=et!==void 0?et:"null",x+=T}let be=o(String(ye),R,y,b,_,E);if(x+=be!==void 0?be:"null",R.length-1>a){let et=R.length-a-1;x+=`${T}"... ${Dt(et)} not stringified"`}return _!==""&&(x+=`
14
- ${k}`),y.pop(),`[${x}]`}let q=Object.keys(R),I=q.length;if(I===0)return"{}";if(s<y.length+1)return'"[Object]"';let C="",z="";_!==""&&(E+=_,T=`,
15
- ${E}`,C=" ");let te=Math.min(I,a);n&&!qs(R)&&(q=Ds(q)),y.push(R);for(let J=0;J<te;J++){let ye=q[J],be=o(ye,R,y,b,_,E);be!==void 0&&(x+=`${z}${ut(ye)}:${C}${be}`,z=T)}if(I>a){let J=I-a;x+=`${z}"...":${C}"${Dt(J)} not stringified"`,z=T}return _!==""&&z.length>1&&(x=`
9
+ `),Error.captureStackTrace(this,t)}};Uo.exports=t=>{if(t.length>2)throw new bs(t);function e(i={}){this.options=i}e.prototype.transform=t;function r(i){return new e(i)}return r.Format=e,r}});var Vo=w((QS,Go)=>{var Ho={};Go.exports=Ho;var zo={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(zo).forEach(function(t){var e=zo[t],r=Ho[t]=[];r.open="\x1B["+e[0]+"m",r.close="\x1B["+e[1]+"m"})});var Ko=w((XS,Yo)=>{"use strict";Yo.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 Zo=w((eE,Jo)=>{"use strict";var zp=q("os"),Ie=Ko(),we=process.env,Zt=void 0;Ie("no-color")||Ie("no-colors")||Ie("color=false")?Zt=!1:(Ie("color")||Ie("colors")||Ie("color=true")||Ie("color=always"))&&(Zt=!0);"FORCE_COLOR"in we&&(Zt=we.FORCE_COLOR.length===0||parseInt(we.FORCE_COLOR,10)!==0);function Hp(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Gp(t){if(Zt===!1)return 0;if(Ie("color=16m")||Ie("color=full")||Ie("color=truecolor"))return 3;if(Ie("color=256"))return 2;if(t&&!t.isTTY&&Zt!==!0)return 0;var e=Zt?1:0;if(process.platform==="win32"){var r=zp.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 we)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(n){return n in we})||we.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in we)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(we.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in we){var i=parseInt((we.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(we.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(we.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(we.TERM)||"COLORTERM"in we?1:(we.TERM==="dumb",e)}function ws(t){var e=Gp(t);return Hp(e)}Jo.exports={supportsColor:ws,stdout:ws(process.stdout),stderr:ws(process.stderr)}});var Xo=w((tE,Qo)=>{Qo.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 tl=w((rE,el)=>{el.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 il=w((iE,rl)=>{rl.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 sl=w((nE,nl)=>{nl.exports=function(t){return function(e,r,i){return r%2===0?e:t.inverse(e)}}});var ol=w((sE,al)=>{al.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 ul=w((aE,ll)=>{ll.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 gl=w((lE,pl)=>{var N={};pl.exports=N;N.themes={};var Vp=q("util"),Pt=N.styles=Vo(),cl=Object.defineProperties,Yp=new RegExp(/[\r\n]+/g);N.supportsColor=Zo().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 oE=N.stylize=function(e,r){if(!N.enabled)return e+"";var i=Pt[r];return!i&&r in N?N[r](e):i.open+e+i.close},Kp=/[|\\{}()[\]^$+*?.]/g,Jp=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(Kp,"\\$&")};function hl(t){var e=function r(){return Qp.apply(r,arguments)};return e._styles=t,e.__proto__=Zp,e}var dl=function(){var t={};return Pt.grey=Pt.gray,Object.keys(Pt).forEach(function(e){Pt[e].closeRe=new RegExp(Jp(Pt[e].close),"g"),t[e]={get:function(){return hl(this._styles.concat(e))}}}),t}(),Zp=cl(function(){},dl);function Qp(){var t=Array.prototype.slice.call(arguments),e=t.map(function(a){return a!=null&&a.constructor===String?a:Vp.inspect(a)}).join(" ");if(!N.enabled||!e)return e;for(var r=e.indexOf(`
10
+ `)!=-1,i=this._styles,n=i.length;n--;){var s=Pt[i[n]];e=s.open+e.replace(s.closeRe,s.open)+s.close,r&&(e=e.replace(Yp,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 Xp(){var t={};return Object.keys(dl).forEach(function(e){t[e]={get:function(){return hl([e])}}}),t}var eg=function(e,r){var i=r.split("");return i=i.map(e),i.join("")};N.trap=Xo();N.zalgo=tl();N.maps={};N.maps.america=il()(N);N.maps.zebra=sl()(N);N.maps.rainbow=ol()(N);N.maps.random=ul()(N);for(fl in N.maps)(function(t){N[t]=function(e){return eg(N.maps[t],e)}})(fl);var fl;cl(N,Xp())});var vs=w((uE,ml)=>{var tg=gl();ml.exports=tg});var yl=w(_s=>{"use strict";_s.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9};_s.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}});var bl=w(Ss=>{"use strict";Ss.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6};Ss.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}});var wl=w(Es=>{"use strict";Es.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7};Es.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}});var vl=w(ki=>{"use strict";Object.defineProperty(ki,"cli",{value:yl()});Object.defineProperty(ki,"npm",{value:bl()});Object.defineProperty(ki,"syslog",{value:wl()})});var te=w(Tr=>{"use strict";Object.defineProperty(Tr,"LEVEL",{value:Symbol.for("level")});Object.defineProperty(Tr,"MESSAGE",{value:Symbol.for("message")});Object.defineProperty(Tr,"SPLAT",{value:Symbol.for("splat")});Object.defineProperty(Tr,"configs",{value:vl()})});var qi=w((gE,Di)=>{"use strict";var Ms=vs(),{LEVEL:Rs,MESSAGE:xs}=te();Ms.enabled=!0;var _l=/\s+/,Pi=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]=_l.test(e[n])?e[n].split(_l):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 Ms[t.allColors[e]](i);for(let n=0,s=t.allColors[e].length;n<s;n++)i=Ms[t.allColors[e][n]](i);return i}transform(e,r){return r.all&&typeof e[xs]=="string"&&(e[xs]=this.colorize(e[Rs],e.level,e[xs])),(r.level||r.all||!r.message)&&(e.level=this.colorize(e[Rs],e.level)),(r.all||r.message)&&(e.message=this.colorize(e[Rs],e.level,e.message)),e}};Di.exports=t=>new Pi(t);Di.exports.Colorizer=Di.exports.Format=Pi});var El=w((mE,Sl)=>{"use strict";var{Colorizer:rg}=qi();Sl.exports=t=>(rg.addColors(t.colors||t),t)});var xl=w((yE,Rl)=>{"use strict";var ig=Ee();Rl.exports=ig(t=>(t.message=` ${t.message}`,t))});var Ol=w((bE,Tl)=>{"use strict";var ng=Ee(),{LEVEL:Ml,MESSAGE:Ts}=te();Tl.exports=ng((t,{stack:e,cause:r})=>{if(t instanceof Error){let n=Object.assign({},t,{level:t.level,[Ml]:t[Ml]||t.level,message:t.message,[Ts]:t[Ts]||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[Ts]=i.message,e&&(t.stack=i.stack),r&&(t.cause=i.cause),t})});var As=w((wE,Li)=>{"use strict";var{configs:sg,LEVEL:Al,MESSAGE:Os}=te(),Ci=class t{constructor(e={levels:sg.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[Al]]}${e.message}`,e[Os]&&(e[Os]=`${this.paddings[e[Al]]}${e[Os]}`),e}};Li.exports=t=>new Ci(t);Li.exports.Padder=Li.exports.Format=Ci});var kl=w((vE,ks)=>{"use strict";var{Colorizer:ag}=qi(),{Padder:og}=As(),{configs:lg,MESSAGE:ug}=te(),ji=class{constructor(e={}){e.levels||(e.levels=lg.cli.levels),this.colorizer=new ag(e),this.padder=new og(e),this.options=e}transform(e,r){return this.colorizer.transform(this.padder.transform(e,r),r),e[ug]=`${e.level}:${e.message}`,e}};ks.exports=t=>new ji(t);ks.exports.Format=ji});var Dl=w((_E,Ps)=>{"use strict";var fg=Ee();function Pl(t){if(t.every(cg))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 cg(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(`
11
+ `));return!0}Ps.exports=(...t)=>{let e=fg(Pl(t)),r=e();return r.Format=e.Format,r};Ps.exports.cascade=Pl});var Or=w((Ls,jl)=>{"use strict";var{hasOwnProperty:Ni}=Object.prototype,qt=Cs();qt.configure=Cs;qt.stringify=qt;qt.default=qt;Ls.stringify=qt;Ls.configure=Cs;jl.exports=qt;var hg=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;function ut(t){return t.length<5e3&&!hg.test(t)?`"${t}"`:JSON.stringify(t)}function Ds(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 dg=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function qs(t){return dg.call(t)!==void 0&&t.length!==0}function ql(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 pg(t){if(Ni.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 Cl(t,e){let r;if(Ni.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 Ll(t,e){let r;if(Ni.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 Dt(t){return t===1?"1 item":`${t} items`}function gg(t){let e=new Set;for(let r of t)(typeof r=="string"||typeof r=="number")&&e.add(String(r));return e}function mg(t){if(Ni.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 Cs(t){t={...t};let e=mg(t);e&&(t.bigint===void 0&&(t.bigint=!1),"circularValue"in t||(t.circularValue=Error));let r=pg(t),i=Cl(t,"bigint"),n=Cl(t,"deterministic"),s=Ll(t,"maximumDepth"),a=Ll(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 ut(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+=`
12
+ ${E}`,M=`,
13
+ ${E}`);let J=Math.min(R.length,a),ye=0;for(;ye<J-1;ye++){let et=o(String(ye),R,y,b,_,E);x+=et!==void 0?et:"null",x+=M}let be=o(String(ye),R,y,b,_,E);if(x+=be!==void 0?be:"null",R.length-1>a){let et=R.length-a-1;x+=`${M}"... ${Dt(et)} not stringified"`}return _!==""&&(x+=`
14
+ ${k}`),y.pop(),`[${x}]`}let j=Object.keys(R),U=j.length;if(U===0)return"{}";if(s<y.length+1)return'"[Object]"';let F="",G="";_!==""&&(E+=_,M=`,
15
+ ${E}`,F=" ");let ne=Math.min(U,a);n&&!qs(R)&&(j=Ds(j)),y.push(R);for(let J=0;J<ne;J++){let ye=j[J],be=o(ye,R,y,b,_,E);be!==void 0&&(x+=`${G}${ut(ye)}:${F}${be}`,G=M)}if(U>a){let J=U-a;x+=`${G}"...":${F}"${Dt(J)} not stringified"`,G=M}return _!==""&&G.length>1&&(x=`
16
16
  ${E}${x}
17
- ${k}`),y.pop(),`{${x}}`}case"number":return isFinite(R)?String(R):e?e(R):"null";case"boolean":return R===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(R);default:return e?e(R):void 0}}function l(d,f,y,b,_,E){switch(typeof f=="object"&&f!==null&&typeof f.toJSON=="function"&&(f=f.toJSON(d)),typeof f){case"string":return ut(f);case"object":{if(f===null)return"null";if(y.indexOf(f)!==-1)return r;let R=E,x="",T=",";if(Array.isArray(f)){if(f.length===0)return"[]";if(s<y.length+1)return'"[Array]"';y.push(f),_!==""&&(E+=_,x+=`
18
- ${E}`,T=`,
19
- ${E}`);let I=Math.min(f.length,a),C=0;for(;C<I-1;C++){let te=l(String(C),f[C],y,b,_,E);x+=te!==void 0?te:"null",x+=T}let z=l(String(C),f[C],y,b,_,E);if(x+=z!==void 0?z:"null",f.length-1>a){let te=f.length-a-1;x+=`${T}"... ${Dt(te)} not stringified"`}return _!==""&&(x+=`
20
- ${R}`),y.pop(),`[${x}]`}y.push(f);let k="";_!==""&&(E+=_,T=`,
21
- ${E}`,k=" ");let q="";for(let I of b){let C=l(I,f[I],y,b,_,E);C!==void 0&&(x+=`${q}${ut(I)}:${k}${C}`,q=T)}return _!==""&&q.length>1&&(x=`
17
+ ${k}`),y.pop(),`{${x}}`}case"number":return isFinite(R)?String(R):e?e(R):"null";case"boolean":return R===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(R);default:return e?e(R):void 0}}function l(d,f,y,b,_,E){switch(typeof f=="object"&&f!==null&&typeof f.toJSON=="function"&&(f=f.toJSON(d)),typeof f){case"string":return ut(f);case"object":{if(f===null)return"null";if(y.indexOf(f)!==-1)return r;let R=E,x="",M=",";if(Array.isArray(f)){if(f.length===0)return"[]";if(s<y.length+1)return'"[Array]"';y.push(f),_!==""&&(E+=_,x+=`
18
+ ${E}`,M=`,
19
+ ${E}`);let U=Math.min(f.length,a),F=0;for(;F<U-1;F++){let ne=l(String(F),f[F],y,b,_,E);x+=ne!==void 0?ne:"null",x+=M}let G=l(String(F),f[F],y,b,_,E);if(x+=G!==void 0?G:"null",f.length-1>a){let ne=f.length-a-1;x+=`${M}"... ${Dt(ne)} not stringified"`}return _!==""&&(x+=`
20
+ ${R}`),y.pop(),`[${x}]`}y.push(f);let k="";_!==""&&(E+=_,M=`,
21
+ ${E}`,k=" ");let j="";for(let U of b){let F=l(U,f[U],y,b,_,E);F!==void 0&&(x+=`${j}${ut(U)}:${k}${F}`,j=M)}return _!==""&&j.length>1&&(x=`
22
22
  ${E}${x}
23
- ${R}`),y.pop(),`{${x}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function u(d,f,y,b,_){switch(typeof f){case"string":return ut(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(d),typeof f!="object")return u(d,f,y,b,_);if(f===null)return"null"}if(y.indexOf(f)!==-1)return r;let E=_;if(Array.isArray(f)){if(f.length===0)return"[]";if(s<y.length+1)return'"[Array]"';y.push(f),_+=b;let C=`
24
- ${_}`,z=`,
25
- ${_}`,te=Math.min(f.length,a),J=0;for(;J<te-1;J++){let be=u(String(J),f[J],y,b,_);C+=be!==void 0?be:"null",C+=z}let ye=u(String(J),f[J],y,b,_);if(C+=ye!==void 0?ye:"null",f.length-1>a){let be=f.length-a-1;C+=`${z}"... ${Dt(be)} not stringified"`}return C+=`
26
- ${E}`,y.pop(),`[${C}]`}let R=Object.keys(f),x=R.length;if(x===0)return"{}";if(s<y.length+1)return'"[Object]"';_+=b;let T=`,
27
- ${_}`,k="",q="",I=Math.min(x,a);qs(f)&&(k+=Dl(f,T,a),R=R.slice(f.length),I-=f.length,q=T),n&&(R=Ds(R)),y.push(f);for(let C=0;C<I;C++){let z=R[C],te=u(z,f[z],y,b,_);te!==void 0&&(k+=`${q}${ut(z)}: ${te}`,q=T)}if(x>a){let C=x-a;k+=`${q}"...": "${Dt(C)} not stringified"`,q=T}return q!==""&&(k=`
23
+ ${R}`),y.pop(),`{${x}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function u(d,f,y,b,_){switch(typeof f){case"string":return ut(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(d),typeof f!="object")return u(d,f,y,b,_);if(f===null)return"null"}if(y.indexOf(f)!==-1)return r;let E=_;if(Array.isArray(f)){if(f.length===0)return"[]";if(s<y.length+1)return'"[Array]"';y.push(f),_+=b;let F=`
24
+ ${_}`,G=`,
25
+ ${_}`,ne=Math.min(f.length,a),J=0;for(;J<ne-1;J++){let be=u(String(J),f[J],y,b,_);F+=be!==void 0?be:"null",F+=G}let ye=u(String(J),f[J],y,b,_);if(F+=ye!==void 0?ye:"null",f.length-1>a){let be=f.length-a-1;F+=`${G}"... ${Dt(be)} not stringified"`}return F+=`
26
+ ${E}`,y.pop(),`[${F}]`}let R=Object.keys(f),x=R.length;if(x===0)return"{}";if(s<y.length+1)return'"[Object]"';_+=b;let M=`,
27
+ ${_}`,k="",j="",U=Math.min(x,a);qs(f)&&(k+=ql(f,M,a),R=R.slice(f.length),U-=f.length,j=M),n&&(R=Ds(R)),y.push(f);for(let F=0;F<U;F++){let G=R[F],ne=u(G,f[G],y,b,_);ne!==void 0&&(k+=`${j}${ut(G)}: ${ne}`,j=M)}if(x>a){let F=x-a;k+=`${j}"...": "${Dt(F)} not stringified"`,j=M}return j!==""&&(k=`
28
28
  ${_}${k}
29
- ${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 ut(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 T=Math.min(f.length,a),k=0;for(;k<T-1;k++){let I=c(String(k),f[k],y);b+=I!==void 0?I:"null",b+=","}let q=c(String(k),f[k],y);if(b+=q!==void 0?q:"null",f.length-1>a){let I=f.length-a-1;b+=`,"... ${Dt(I)} 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);qs(f)&&(b+=Dl(f,",",a),_=_.slice(f.length),x-=f.length,R=","),n&&(_=Ds(_)),y.push(f);for(let T=0;T<x;T++){let k=_[T],q=c(k,f[k],y);q!==void 0&&(b+=`${R}${ut(k)}:${q}`,R=",")}if(E>a){let T=E-a;b+=`${R}"...":"${Dt(T)} 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,[],_g(f),b,"")}if(b.length!==0)return u("",d,[],b,"")}return c("",d,[])}return h}});var js=w((bE,jl)=>{"use strict";var Eg=Ee(),{MESSAGE:Rg}=re(),xg=Ar();function Mg(t,e){return typeof e=="bigint"?e.toString():e}jl.exports=Eg((t,e)=>{let r=xg.configure(e);return t[Rg]=r(t,e.replacer||Mg,e.space),t})});var Fl=w((wE,Nl)=>{"use strict";var Tg=Ee();Nl.exports=Tg((t,e)=>e.message?(t.message=`[${e.label}] ${t.message}`,t):(t.label=e.label,t))});var $l=w((vE,Il)=>{"use strict";var Og=Ee(),{MESSAGE:Ag}=re(),kg=Ar();Il.exports=Og(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[Ag]=kg(e),t})});var Bl=w((_E,Wl)=>{"use strict";var Pg=Ee();function Dg(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 qg(t,e,r){return t[r]=e.reduce((i,n)=>(i[n]=t[n],delete t[n],i),{}),t}Wl.exports=Pg((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?Dg(t,i,r):e.fillWith?qg(t,e.fillWith,r):t})});var zl=w((SE,Ul)=>{var Qt=1e3,Xt=Qt*60,er=Xt*60,Ct=er*24,Cg=Ct*7,Lg=Ct*365.25;Ul.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return jg(t);if(r==="number"&&isFinite(t))return e.long?Fg(t):Ng(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function jg(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*Lg;case"weeks":case"week":case"w":return r*Cg;case"days":case"day":case"d":return r*Ct;case"hours":case"hour":case"hrs":case"hr":case"h":return r*er;case"minutes":case"minute":case"mins":case"min":case"m":return r*Xt;case"seconds":case"second":case"secs":case"sec":case"s":return r*Qt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Ng(t){var e=Math.abs(t);return e>=Ct?Math.round(t/Ct)+"d":e>=er?Math.round(t/er)+"h":e>=Xt?Math.round(t/Xt)+"m":e>=Qt?Math.round(t/Qt)+"s":t+"ms"}function Fg(t){var e=Math.abs(t);return e>=Ct?Fi(t,e,Ct,"day"):e>=er?Fi(t,e,er,"hour"):e>=Xt?Fi(t,e,Xt,"minute"):e>=Qt?Fi(t,e,Qt,"second"):t+" ms"}function Fi(t,e,r,i){var n=e>=r*1.5;return Math.round(t/r)+" "+i+(n?"s":"")}});var Gl=w((kr,Hl)=>{"use strict";var Ig=Ee(),$g=zl();Hl.exports=Ig(t=>{let e=+new Date;return kr.diff=e-(kr.prevTime||e),kr.prevTime=e,t.ms=`+${$g(kr.diff)}`,t})});var Kl=w((EE,Yl)=>{"use strict";var Wg=L("util").inspect,Bg=Ee(),{LEVEL:Ug,MESSAGE:Vl,SPLAT:zg}=re();Yl.exports=Bg((t,e={})=>{let r=Object.assign({},t);return delete r[Ug],delete r[Vl],delete r[zg],t[Vl]=Wg(r,!1,e.depth||null,e.colorize),t})});var Jl=w((RE,$i)=>{"use strict";var{MESSAGE:Hg}=re(),Ii=class{constructor(e){this.template=e}transform(e){return e[Hg]=this.template(e),e}};$i.exports=t=>new Ii(t);$i.exports.Printf=$i.exports.Format=Ii});var Xl=w((xE,Ql)=>{"use strict";var Gg=Ee(),{MESSAGE:Zl}=re(),Vg=Ar();Ql.exports=Gg(t=>{let e=Vg(Object.assign({},t,{level:void 0,message:void 0,splat:void 0})),r=t.padding&&t.padding[t.level]||"";return e!=="{}"?t[Zl]=`${t.level}:${r} ${t.message} ${e}`:t[Zl]=`${t.level}:${r} ${t.message}`,t})});var ru=w((ME,tu)=>{"use strict";var Yg=L("util"),{SPLAT:eu}=re(),Kg=/%[scdjifoO%]/g,Jg=/%%/g,Ns=class{constructor(e){this.options=e}_splat(e,r){let i=e.message,n=e[eu]||e.splat||[],s=i.match(Jg),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=Yg.format(i,...n),e}transform(e){let r=e.message,i=e[eu]||e.splat;if(!i||!i.length)return e;let n=r&&r.match&&r.match(Kg);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}};tu.exports=t=>new Ns(t)});var nu=w((Wi,iu)=>{(function(t,e){typeof Wi=="object"&&typeof iu<"u"?e(Wi):typeof define=="function"&&define.amd?define(["exports"],e):e(t.fecha={})})(Wi,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 H=[],pe=0,P=S.length;pe<P;pe++)H.push(S[pe].substr(0,O));return H}var u=function(S){return function(O,H){var pe=H[S].map(function(ke){return ke.toLowerCase()}),P=pe.indexOf(O.toLowerCase());return P>-1?P:null}};function c(S){for(var O=[],H=1;H<arguments.length;H++)O[H-1]=arguments[H];for(var pe=0,P=O;pe<P.length;pe++){var ke=P[pe];for(var Fe in ke)S[Fe]=ke[Fe]}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},T={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},q=[null,r],I=[null,a],C=["isPm",a,function(S,O){var H=S.toLowerCase();return H===O.amPm[0]?0:H===O.amPm[1]?1:null}],z=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(S){var O=(S+"").match(/([+-]|\d\d)/gi);if(O){var H=+O[1]*60+parseInt(O[2],10);return O[0]==="+"?H:-H}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,H=+(""+O.getFullYear()).substr(0,2);return+(""+(+S>68?H-1:H)+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:q,dd:q,ddd:I,dddd:I,MMM:["month",a,u("monthNamesShort")],MMMM:["month",a,u("monthNames")],a:C,A:C,ZZ:z,Z:z},J={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},ye=function(S){return c(J,S)},be=function(S,O,H){if(O===void 0&&(O=J.default),H===void 0&&(H={}),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=J[O]||O;var pe=[];O=O.replace(o,function(ke,Fe){return pe.push(Fe),"@@@"});var P=c(c({},_),H);return O=O.replace(e,function(ke){return T[ke](S,P)}),O.replace(/@@@/g,function(){return pe.shift()})};function et(S,O,H){if(H===void 0&&(H={}),typeof O!="string")throw new Error("Invalid format in fecha parse");if(O=J[O]||O,S.length>1e3)return null;var pe=new Date,P={year:pe.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},ke=[],Fe=[],Mt=O.replace(o,function(At,lt){return Fe.push(R(lt)),"@@@"}),Kt={},at={};Mt=R(Mt).replace(e,function(At){var lt=te[At],Mr=lt[0],Ti=lt[1],Oi=lt[3];if(Kt[Mr])throw new Error("Invalid format. "+Mr+" specified twice in format");return Kt[Mr]=!0,Oi&&(at[Oi]=!0),ke.push(lt),"("+Ti+")"}),Object.keys(at).forEach(function(At){if(!Kt[At])throw new Error("Invalid format. "+At+" is required in specified format")}),Mt=Mt.replace(/@@@/g,function(){return Fe.shift()});var Tt=S.match(new RegExp(Mt,"i"));if(!Tt)return null;for(var ys=c(c({},_),H),xe=1;xe<Tt.length;xe++){var Ri=ke[xe-1],xi=Ri[0],Mi=Ri[2],ot=Mi?Mi(Tt[xe],ys):+Tt[xe];if(ot==null)return null;P[xi]=ot}P.isPm===1&&P.hour!=null&&+P.hour!=12?P.hour=+P.hour+12:P.isPm===0&&+P.hour==12&&(P.hour=0);var Jt;if(P.timezoneOffset==null){Jt=new Date(P.year,P.month,P.day,P.hour,P.minute,P.second,P.millisecond);for(var Ot=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],xe=0,xr=Ot.length;xe<xr;xe++)if(Kt[Ot[xe][0]]&&P[Ot[xe][0]]!==Jt[Ot[xe][1]]())return null}else if(Jt=new Date(Date.UTC(P.year,P.month,P.day,P.hour,P.minute-P.timezoneOffset,P.second,P.millisecond)),P.month>11||P.month<0||P.day>31||P.day<1||P.hour>23||P.hour<0||P.minute>59||P.minute<0||P.second>59||P.second<0)return null;return Jt}var ms={format:be,parse:et,defaultI18n:b,setGlobalDateI18n:E,setGlobalDateMasks:ye};t.assign=c,t.default=ms,t.format=be,t.parse=et,t.defaultI18n=b,t.setGlobalDateI18n=E,t.setGlobalDateMasks=ye,Object.defineProperty(t,"__esModule",{value:!0})})});var au=w((TE,su)=>{"use strict";var Zg=nu(),Qg=Ee();su.exports=Qg((t,e={})=>(e.format&&(t.timestamp=typeof e.format=="function"?e.format():Zg.format(new Date,e.format)),t.timestamp||(t.timestamp=new Date().toISOString()),e.alias&&(t[e.alias]=t.timestamp),t))});var lu=w((OE,ou)=>{"use strict";var Fs=vs(),Xg=Ee(),{MESSAGE:Is}=re();ou.exports=Xg((t,e)=>(e.level!==!1&&(t.level=Fs.strip(t.level)),e.message!==!1&&(t.message=Fs.strip(String(t.message))),e.raw!==!1&&t[Is]&&(t[Is]=Fs.strip(String(t[Is]))),t))});var Ws=w($s=>{"use strict";var em=$s.format=Ee();$s.levels=Sl();function ue(t,e){Object.defineProperty(em,t,{get(){return e()},configurable:!0})}ue("align",function(){return Rl()});ue("errors",function(){return Tl()});ue("cli",function(){return Al()});ue("combine",function(){return Pl()});ue("colorize",function(){return qi()});ue("json",function(){return js()});ue("label",function(){return Fl()});ue("logstash",function(){return $l()});ue("metadata",function(){return Bl()});ue("ms",function(){return Gl()});ue("padLevels",function(){return As()});ue("prettyPrint",function(){return Kl()});ue("printf",function(){return Jl()});ue("simple",function(){return Xl()});ue("splat",function(){return ru()});ue("timestamp",function(){return au()});ue("uncolorize",function(){return lu()})});var Bs=w(Bi=>{"use strict";var{format:uu}=L("util");Bi.warn={deprecated(t){return()=>{throw new Error(uu("{ %s } was removed in winston@3.0.0.",t))}},useFormat(t){return()=>{throw new Error([uu("{ %s } was removed in winston@3.0.0.",t),"Use a custom winston.format = winston.format(function) instead."].join(`
30
- `))}},forFunctions(t,e,r){r.forEach(i=>{t[i]=Bi.warn[e](i)})},forProperties(t,e,r){r.forEach(i=>{let n=Bi.warn[e](i);Object.defineProperty(t,i,{get:n,set:n})})}}});var fu=w((PE,tm)=>{tm.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 Us=w((DE,hu)=>{hu.exports=L("util").deprecate});var zs=w((qE,cu)=>{cu.exports=L("stream")});var Gs=w((CE,pu)=>{"use strict";function rm(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Hs,this,t)):process.nextTick(Hs,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(Ui,r):(r._writableState.errorEmitted=!0,process.nextTick(du,r,s)):process.nextTick(du,r,s):e?(process.nextTick(Ui,r),e(s)):process.nextTick(Ui,r)}),this)}function du(t,e){Hs(t,e),Ui(t)}function Ui(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function im(){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 Hs(t,e){t.emit("error",e)}function nm(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}pu.exports={destroy:rm,undestroy:im,errorOrDestroy:nm}});var tr=w((LE,yu)=>{"use strict";var mu={};function De(t,e,r){r||(r=Error);function i(s,a,o){return typeof e=="string"?e:e(s,a,o)}class n extends r{constructor(a,o,l){super(i(a,o,l))}}n.prototype.name=r.name,n.prototype.code=t,mu[t]=n}function gu(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 sm(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function am(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function om(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}De("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);De("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&sm(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(am(t," argument"))n=`The ${t} ${i} ${gu(e,"type")}`;else{let s=om(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${gu(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);De("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");De("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});De("ERR_STREAM_PREMATURE_CLOSE","Premature close");De("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});De("ERR_MULTIPLE_CALLBACK","Callback called multiple times");De("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");De("ERR_STREAM_WRITE_AFTER_END","write after end");De("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);De("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);De("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");yu.exports.codes=mu});var Vs=w((jE,bu)=>{"use strict";var lm=tr().codes.ERR_INVALID_OPT_VALUE;function um(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function fm(t,e,r,i){var n=um(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new lm(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}bu.exports={getHighWaterMark:fm}});var wu=w((NE,Ys)=>{typeof Object.create=="function"?Ys.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Ys.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 tt=w((FE,Js)=>{try{if(Ks=L("util"),typeof Ks.inherits!="function")throw"";Js.exports=Ks.inherits}catch{Js.exports=wu()}var Ks});var xu=w((IE,Ru)=>{"use strict";function vu(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 _u(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?vu(Object(r),!0).forEach(function(i){hm(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vu(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function hm(t,e,r){return e=Eu(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function cm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Su(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,Eu(i.key),i)}}function dm(t,e,r){return e&&Su(t.prototype,e),r&&Su(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Eu(t){var e=pm(t,"string");return typeof e=="symbol"?e:String(e)}function pm(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 gm=L("buffer"),zi=gm.Buffer,mm=L("util"),Zs=mm.inspect,ym=Zs&&Zs.custom||"inspect";function bm(t,e,r){zi.prototype.copy.call(t,e,r)}Ru.exports=function(){function t(){cm(this,t),this.head=null,this.tail=null,this.length=0}return dm(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 zi.alloc(0);for(var i=zi.allocUnsafe(r>>>0),n=this.head,s=0;n;)bm(n.data,i,s),s+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,s=i.data;for(r-=s.length;i=i.next;){var a=i.data,o=r>a.length?a.length:r;if(o===a.length?s+=a:s+=a.slice(0,r),r-=o,r===0){o===a.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=a.slice(o));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=zi.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:ym,value:function(r,i){return Zs(this,_u(_u({},i),{},{depth:0,customInspect:!1}))}}]),t}()});var Ou=w((Qs,Tu)=>{var Hi=L("buffer"),Ge=Hi.Buffer;function Mu(t,e){for(var r in t)e[r]=t[r]}Ge.from&&Ge.alloc&&Ge.allocUnsafe&&Ge.allocUnsafeSlow?Tu.exports=Hi:(Mu(Hi,Qs),Qs.Buffer=Lt);function Lt(t,e,r){return Ge(t,e,r)}Lt.prototype=Object.create(Ge.prototype);Mu(Ge,Lt);Lt.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Ge(t,e,r)};Lt.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Ge(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};Lt.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Ge(t)};Lt.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Hi.SlowBuffer(t)}});var Dr=w(ku=>{"use strict";var ea=Ou().Buffer,Au=ea.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function wm(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function vm(t){var e=wm(t);if(typeof e!="string"&&(ea.isEncoding===Au||!Au(t)))throw new Error("Unknown encoding: "+t);return e||t}ku.StringDecoder=Pr;function Pr(t){this.encoding=vm(t);var e;switch(this.encoding){case"utf16le":this.text=Mm,this.end=Tm,e=4;break;case"utf8":this.fillLast=Em,e=4;break;case"base64":this.text=Om,this.end=Am,e=3;break;default:this.write=km,this.end=Pm;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=ea.allocUnsafe(e)}Pr.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||""};Pr.prototype.end=xm;Pr.prototype.text=Rm;Pr.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 Xs(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function _m(t,e,r){var i=e.length-1;if(i<r)return 0;var n=Xs(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=Xs(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=Xs(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function Sm(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 Em(t){var e=this.lastTotal-this.lastNeed,r=Sm(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 Rm(t,e){var r=_m(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 xm(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function Mm(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 Tm(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 Om(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 Am(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function km(t){return t.toString(this.encoding)}function Pm(t){return t&&t.length?this.write(t):""}});var Cu=w((WE,qu)=>{"use strict";var Pu=tr().codes.ERR_STREAM_PREMATURE_CLOSE;function Dm(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 qm(){}function Cm(t){return t.setHeader&&typeof t.abort=="function"}function Du(t,e,r){if(typeof e=="function")return Du(t,null,e);e||(e={}),r=Dm(r||qm);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 Pu),r.call(t,y);if(n&&!a)return(!t._writableState||!t._writableState.ended)&&(y=new Pu),r.call(t,y)},d=function(){t.req.on("finish",o)};return Cm(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)}}qu.exports=Du});var ju=w((BE,Lu)=>{"use strict";var Gi;function ft(t,e,r){return e=Lm(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Lm(t){var e=jm(t,"string");return typeof e=="symbol"?e:String(e)}function jm(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Nm=Cu(),ht=Symbol("lastResolve"),jt=Symbol("lastReject"),qr=Symbol("error"),Vi=Symbol("ended"),Nt=Symbol("lastPromise"),ta=Symbol("handlePromise"),Ft=Symbol("stream");function ct(t,e){return{value:t,done:e}}function Fm(t){var e=t[ht];if(e!==null){var r=t[Ft].read();r!==null&&(t[Nt]=null,t[ht]=null,t[jt]=null,e(ct(r,!1)))}}function Im(t){process.nextTick(Fm,t)}function $m(t,e){return function(r,i){t.then(function(){if(e[Vi]){r(ct(void 0,!0));return}e[ta](r,i)},i)}}var Wm=Object.getPrototypeOf(function(){}),Bm=Object.setPrototypeOf((Gi={get stream(){return this[Ft]},next:function(){var e=this,r=this[qr];if(r!==null)return Promise.reject(r);if(this[Vi])return Promise.resolve(ct(void 0,!0));if(this[Ft].destroyed)return new Promise(function(a,o){process.nextTick(function(){e[qr]?o(e[qr]):a(ct(void 0,!0))})});var i=this[Nt],n;if(i)n=new Promise($m(i,this));else{var s=this[Ft].read();if(s!==null)return Promise.resolve(ct(s,!1));n=new Promise(this[ta])}return this[Nt]=n,n}},ft(Gi,Symbol.asyncIterator,function(){return this}),ft(Gi,"return",function(){var e=this;return new Promise(function(r,i){e[Ft].destroy(null,function(n){if(n){i(n);return}r(ct(void 0,!0))})})}),Gi),Wm),Um=function(e){var r,i=Object.create(Bm,(r={},ft(r,Ft,{value:e,writable:!0}),ft(r,ht,{value:null,writable:!0}),ft(r,jt,{value:null,writable:!0}),ft(r,qr,{value:null,writable:!0}),ft(r,Vi,{value:e._readableState.endEmitted,writable:!0}),ft(r,ta,{value:function(s,a){var o=i[Ft].read();o?(i[Nt]=null,i[ht]=null,i[jt]=null,s(ct(o,!1))):(i[ht]=s,i[jt]=a)},writable:!0}),r));return i[Nt]=null,Nm(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[jt];s!==null&&(i[Nt]=null,i[ht]=null,i[jt]=null,s(n)),i[qr]=n;return}var a=i[ht];a!==null&&(i[Nt]=null,i[ht]=null,i[jt]=null,a(ct(void 0,!0))),i[Vi]=!0}),e.on("readable",Im.bind(null,i)),i};Lu.exports=Um});var $u=w((UE,Iu)=>{"use strict";function Nu(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 zm(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function a(l){Nu(s,i,n,a,o,"next",l)}function o(l){Nu(s,i,n,a,o,"throw",l)}a(void 0)})}}function Fu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function Hm(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Fu(Object(r),!0).forEach(function(i){Gm(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fu(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Gm(t,e,r){return e=Vm(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Vm(t){var e=Ym(t,"string");return typeof e=="symbol"?e:String(e)}function Ym(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 Km=tr().codes.ERR_INVALID_ARG_TYPE;function Jm(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 Km("iterable",["Iterable"],e);var n=new t(Hm({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,a())};function a(){return o.apply(this,arguments)}function o(){return o=zm(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}Iu.exports=Jm});var Zu=w((HE,Ju)=>{"use strict";Ju.exports=B;var rr;B.ReadableState=zu;var zE=L("events").EventEmitter,Uu=function(e,r){return e.listeners(r).length},Lr=zs(),Yi=L("buffer").Buffer,Zm=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Qm(t){return Yi.from(t)}function Xm(t){return Yi.isBuffer(t)||t instanceof Zm}var ra=L("util"),j;ra&&ra.debuglog?j=ra.debuglog("stream"):j=function(){};var ey=xu(),ua=Gs(),ty=Vs(),ry=ty.getHighWaterMark,Ki=tr().codes,iy=Ki.ERR_INVALID_ARG_TYPE,ny=Ki.ERR_STREAM_PUSH_AFTER_EOF,sy=Ki.ERR_METHOD_NOT_IMPLEMENTED,ay=Ki.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,ir,ia,na;tt()(B,Lr);var Cr=ua.errorOrDestroy,sa=["error","close","destroy","pause","resume"];function oy(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 zu(t,e,r){rr=rr||jr(),t=t||{},typeof r!="boolean"&&(r=e instanceof rr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=ry(this,t,"readableHighWaterMark",r),this.buffer=new ey,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&&(ir||(ir=Dr().StringDecoder),this.decoder=new ir(t.encoding),this.encoding=t.encoding)}function B(t){if(rr=rr||jr(),!(this instanceof B))return new B(t);var e=this instanceof rr;this._readableState=new zu(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Lr.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=ua.destroy;B.prototype._undestroy=ua.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=Yi.from(t,e),e=""),i=!0),Hu(this,t,e,!1,i)};B.prototype.unshift=function(t){return Hu(this,t,null,!0,!1)};function Hu(t,e,r,i,n){j("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,fy(t,s);else{var a;if(n||(a=ly(s,e)),a)Cr(t,a);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Yi.prototype&&(e=Qm(e)),i)s.endEmitted?Cr(t,new ay):aa(t,s,e,!0);else if(s.ended)Cr(t,new ny);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?aa(t,s,e,!1):la(t,s)):aa(t,s,e,!1)}else i||(s.reading=!1,la(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function aa(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&&Ji(t)),la(t,e)}function ly(t,e){var r;return!Xm(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new iy("chunk",["string","Buffer","Uint8Array"],e)),r}B.prototype.isPaused=function(){return this._readableState.flowing===!1};B.prototype.setEncoding=function(t){ir||(ir=Dr().StringDecoder);var e=new ir(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 Wu=1073741824;function uy(t){return t>=Wu?t=Wu:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Bu(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=uy(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?oa(this):Ji(this),null;if(t=Bu(t,e),t===0&&e.ended)return e.length===0&&oa(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=Bu(r,e)));var n;return t>0?n=Yu(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&&oa(this)),n!==null&&this.emit("data",n),n};function fy(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?Ji(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Gu(t)))}}function Ji(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(Gu,t))}function Gu(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,fa(t)}function la(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(hy,t,e))}function hy(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){Cr(this,new sy("_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=cy(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&&Ku(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),Uu(t,"error")===0&&Cr(t,_)}oy(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 cy(t){return function(){var r=t._readableState;j("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Uu(t,"data")&&(r.flowing=!0,fa(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=Ku(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=Lr.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?Ji(this):i.reading||process.nextTick(dy,this)),r};B.prototype.addListener=B.prototype.on;B.prototype.removeListener=function(t,e){var r=Lr.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Vu,this),r};B.prototype.removeAllListeners=function(t){var e=Lr.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Vu,this),e};function Vu(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 dy(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,py(this,t)),t.paused=!1,this};function py(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(gy,t,e))}function gy(t,e){j("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),fa(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 fa(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<sa.length;s++)t.on(sa[s],this.emit.bind(this,sa[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 ia===void 0&&(ia=ju()),ia(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=Yu;Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Yu(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 oa(t){var e=t._readableState;j("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(my,e,t))}function my(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 na===void 0&&(na=$u()),na(B,t,e)});function Ku(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var jr=w((GE,Xu)=>{"use strict";var yy=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};Xu.exports=Ve;var Qu=Zu(),ca=da();tt()(Ve,Qu);for(ha=yy(ca.prototype),Zi=0;Zi<ha.length;Zi++)Qi=ha[Zi],Ve.prototype[Qi]||(Ve.prototype[Qi]=ca.prototype[Qi]);var ha,Qi,Zi;function Ve(t){if(!(this instanceof Ve))return new Ve(t);Qu.call(this,t),ca.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",by)))}Object.defineProperty(Ve.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Ve.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Ve.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function by(){this._writableState.ended||process.nextTick(wy,this)}function wy(t){t.end()}Object.defineProperty(Ve.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var da=w((VE,af)=>{"use strict";af.exports=V;function tf(t){var e=this;this.next=null,this.entry=null,this.finish=function(){Gy(e,t)}}var nr;V.WritableState=Fr;var vy={deprecate:Us()},rf=zs(),en=L("buffer").Buffer,_y=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Sy(t){return en.from(t)}function Ey(t){return en.isBuffer(t)||t instanceof _y}var ga=Gs(),Ry=Vs(),xy=Ry.getHighWaterMark,dt=tr().codes,My=dt.ERR_INVALID_ARG_TYPE,Ty=dt.ERR_METHOD_NOT_IMPLEMENTED,Oy=dt.ERR_MULTIPLE_CALLBACK,Ay=dt.ERR_STREAM_CANNOT_PIPE,ky=dt.ERR_STREAM_DESTROYED,Py=dt.ERR_STREAM_NULL_VALUES,Dy=dt.ERR_STREAM_WRITE_AFTER_END,qy=dt.ERR_UNKNOWN_ENCODING,sr=ga.errorOrDestroy;tt()(V,rf);function Cy(){}function Fr(t,e,r){nr=nr||jr(),t=t||{},typeof r!="boolean"&&(r=e instanceof nr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=xy(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){Wy(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 tf(this)}Fr.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Fr.prototype,"buffer",{get:vy.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Xi;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Xi=Function.prototype[Symbol.hasInstance],Object.defineProperty(V,Symbol.hasInstance,{value:function(e){return Xi.call(this,e)?!0:this!==V?!1:e&&e._writableState instanceof Fr}})):Xi=function(e){return e instanceof this};function V(t){nr=nr||jr();var e=this instanceof nr;if(!e&&!Xi.call(V,this))return new V(t);this._writableState=new Fr(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)),rf.call(this)}V.prototype.pipe=function(){sr(this,new Ay)};function Ly(t,e){var r=new Dy;sr(t,r),process.nextTick(e,r)}function jy(t,e,r,i){var n;return r===null?n=new Py:typeof r!="string"&&!e.objectMode&&(n=new My("chunk",["string","Buffer"],r)),n?(sr(t,n),process.nextTick(i,n),!1):!0}V.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&Ey(t);return s&&!en.isBuffer(t)&&(t=Sy(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=Cy),i.ending?Ly(this,r):(s||jy(this,i,t,r))&&(i.pendingcb++,n=Fy(this,i,s,t,e,r)),n};V.prototype.cork=function(){this._writableState.corked++};V.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&nf(this,t))};V.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new qy(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(V.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Ny(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=en.from(e,r)),e}Object.defineProperty(V.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Fy(t,e,r,i,n,s){if(!r){var a=Ny(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 pa(t,e,!1,o,i,n,s);return l}function pa(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new ky("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function Iy(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(Nr,t,e),t._writableState.errorEmitted=!0,sr(t,i)):(n(i),t._writableState.errorEmitted=!0,sr(t,i),Nr(t,e))}function $y(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function Wy(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new Oy;if($y(r),e)Iy(t,r,i,e,n);else{var s=sf(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&nf(t,r),i?process.nextTick(ef,t,r,s,n):ef(t,r,s,n)}}function ef(t,e,r,i){r||By(t,e),e.pendingcb--,i(),Nr(t,e)}function By(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function nf(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,pa(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 tf(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,h=e.objectMode?1:l.length;if(pa(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}V.prototype._write=function(t,e,r){r(new Ty("_write()"))};V.prototype._writev=null;V.prototype.end=function(t,e,r){var i=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||Hy(this,i,r),this};Object.defineProperty(V.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function sf(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function Uy(t,e){t._final(function(r){e.pendingcb--,r&&sr(t,r),e.prefinished=!0,t.emit("prefinish"),Nr(t,e)})}function zy(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(Uy,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Nr(t,e){var r=sf(e);if(r&&(zy(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 Hy(t,e,r){e.ending=!0,Nr(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function Gy(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(V.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});V.prototype.destroy=ga.destroy;V.prototype._undestroy=ga.undestroy;V.prototype._destroy=function(t,e){e(t)}});var ma=w((YE,uf)=>{"use strict";var Vy=L("util"),of=da(),{LEVEL:lf}=re(),Ir=uf.exports=function(e={}){of.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())})};Vy.inherits(Ir,of);Ir.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[lf]]){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)};Ir.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)};Ir.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[lf]])&&(this.handleExceptions||r.exception!==!0))};Ir.prototype._nop=function(){}});var ba=w((KE,hf)=>{"use strict";var Yy=L("util"),{LEVEL:ya}=re(),ff=ma(),$r=hf.exports=function(e={}){if(ff.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))};Yy.inherits($r,ff);$r.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[ya]])&&this.transport.log(e[ya],e.message,e,this._nop),i(null)};$r.prototype._writev=function(e,r){for(let i=0;i<e.length;i++)this._accept(e[i])&&(this.transport.log(e[i].chunk[ya],e[i].chunk.message,e[i].chunk,this._nop),e[i].callback());return r(null)};$r.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(`
31
- `))};$r.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}});var ar=w((JE,wa)=>{"use strict";wa.exports=ma();wa.exports.LegacyTransportStream=ba()});var pf=w((QE,df)=>{"use strict";var Ky=L("os"),{LEVEL:cf,MESSAGE:or}=re(),Jy=ar();df.exports=class extends Jy{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:Ky.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[cf]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[or]}${this.eol}`):this._consoleError(e[or]),r&&r();return}else if(this.consoleWarnLevels[e[cf]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[or]}${this.eol}`):this._consoleWarn(e[or]),r&&r();return}console._stdout&&!this.forceConsole?console._stdout.write(`${e[or]}${this.eol}`):this._consoleLog(e[or]),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 rn=w((tn,gf)=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.default=Zy;function Zy(t){return t&&typeof t.length=="number"&&t.length>=0&&t.length%1===0}gf.exports=tn.default});var yf=w((nn,mf)=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.default=function(t){return function(...e){var r=e.pop();return t.call(this,e,r)}};mf.exports=nn.default});var vf=w(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.fallback=bf;pt.wrap=wf;var Qy=pt.hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,Xy=pt.hasSetImmediate=typeof setImmediate=="function"&&setImmediate,eb=pt.hasNextTick=typeof process=="object"&&typeof process.nextTick=="function";function bf(t){setTimeout(t,0)}function wf(t){return(e,...r)=>t(()=>e(...r))}var Wr;Qy?Wr=queueMicrotask:Xy?Wr=setImmediate:eb?Wr=process.nextTick:Wr=bf;pt.default=wf(Wr)});var xf=w((sn,Rf)=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.default=ab;var tb=yf(),rb=Ef(tb),ib=vf(),nb=Ef(ib),sb=It();function Ef(t){return t&&t.__esModule?t:{default:t}}function ab(t){return(0,sb.isAsync)(t)?function(...e){let r=e.pop(),i=t.apply(this,e);return _f(i,r)}:(0,rb.default)(function(e,r){var i;try{i=t.apply(this,e)}catch(n){return r(n)}if(i&&typeof i.then=="function")return _f(i,r);r(null,i)})}function _f(t,e){return t.then(r=>{Sf(e,null,r)},r=>{Sf(e,r&&(r instanceof Error||r.message)?r:new Error(r))})}function Sf(t,e,r){try{t(e,r)}catch(i){(0,nb.default)(n=>{throw n},i)}}Rf.exports=sn.default});var It=w(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.isAsyncIterable=rt.isAsyncGenerator=rt.isAsync=void 0;var ob=xf(),lb=ub(ob);function ub(t){return t&&t.__esModule?t:{default:t}}function Mf(t){return t[Symbol.toStringTag]==="AsyncFunction"}function fb(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function hb(t){return typeof t[Symbol.asyncIterator]=="function"}function cb(t){if(typeof t!="function")throw new Error("expected a function");return Mf(t)?(0,lb.default)(t):t}rt.default=cb;rt.isAsync=Mf;rt.isAsyncGenerator=fb;rt.isAsyncIterable=hb});var lr=w((an,Tf)=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.default=db;function db(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}Tf.exports=an.default});var Af=w((on,Of)=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});var pb=rn(),gb=va(pb),mb=It(),yb=va(mb),bb=lr(),wb=va(bb);function va(t){return t&&t.__esModule?t:{default:t}}on.default=(0,wb.default)((t,e,r)=>{var i=(0,gb.default)(e)?[]:{};t(e,(n,s,a)=>{(0,yb.default)(n)((o,...l)=>{l.length<2&&([l]=l),i[s]=l,a(o)})},n=>r(n,i))},3);Of.exports=on.default});var _a=w((ln,kf)=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.default=vb;function vb(t){function e(...r){if(t!==null){var i=t;t=null,i.apply(this,r)}}return Object.assign(e,t),e}kf.exports=ln.default});var Df=w((un,Pf)=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.default=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()};Pf.exports=un.default});var Lf=w((fn,Cf)=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.default=Ob;var _b=rn(),Sb=qf(_b),Eb=Df(),Rb=qf(Eb);function qf(t){return t&&t.__esModule?t:{default:t}}function xb(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}function Mb(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 Ob(t){if((0,Sb.default)(t))return xb(t);var e=(0,Rb.default)(t);return e?Mb(e):Tb(t)}Cf.exports=fn.default});var Sa=w((hn,jf)=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.default=Ab;function Ab(t){return function(...e){if(t===null)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}jf.exports=hn.default});var dn=w((cn,Nf)=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});var kb={};cn.default=kb;Nf.exports=cn.default});var If=w((pn,Ff)=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.default=Cb;var Pb=dn(),Db=qb(Pb);function qb(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()}Ff.exports=pn.default});var Uf=w((gn,Bf)=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});var Lb=_a(),jb=Br(Lb),Nb=Lf(),Fb=Br(Nb),Ib=Sa(),$b=Br(Ib),$f=It(),Wb=If(),Wf=Br(Wb),Bb=dn(),Ub=Br(Bb);function Br(t){return t&&t.__esModule?t:{default:t}}gn.default=t=>(e,r,i)=>{if(i=(0,jb.default)(i),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return i(null);if((0,$f.isAsyncGenerator)(e))return(0,Wf.default)(e,t,r,i);if((0,$f.isAsyncIterable)(e))return(0,Wf.default)(e[Symbol.asyncIterator](),t,r,i);var n=(0,Fb.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===Ub.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,$b.default)(u))}l=!1}c()};Bf.exports=gn.default});var Ra=w((mn,zf)=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});var zb=Uf(),Hb=Ea(zb),Gb=It(),Vb=Ea(Gb),Yb=lr(),Kb=Ea(Yb);function Ea(t){return t&&t.__esModule?t:{default:t}}function Jb(t,e,r,i){return(0,Hb.default)(e)(t,(0,Vb.default)(r),i)}mn.default=(0,Kb.default)(Jb,4);zf.exports=mn.default});var Vf=w((yn,Gf)=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});var Zb=Ra(),Qb=Hf(Zb),Xb=lr(),e0=Hf(Xb);function Hf(t){return t&&t.__esModule?t:{default:t}}function t0(t,e,r){return(0,Qb.default)(t,1,e,r)}yn.default=(0,e0.default)(t0,3);Gf.exports=yn.default});var Jf=w((bn,Kf)=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.default=a0;var r0=Af(),i0=Yf(r0),n0=Vf(),s0=Yf(n0);function Yf(t){return t&&t.__esModule?t:{default:t}}function a0(t,e){return(0,i0.default)(s0.default,t,e)}Kf.exports=bn.default});var xa=w((t2,Zf)=>{Zf.exports=L("stream")});var ih=w((r2,rh)=>{"use strict";function Qf(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 Xf(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Qf(Object(r),!0).forEach(function(i){o0(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Qf(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function o0(t,e,r){return e=th(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function l0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function eh(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,th(i.key),i)}}function u0(t,e,r){return e&&eh(t.prototype,e),r&&eh(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function th(t){var e=f0(t,"string");return typeof e=="symbol"?e:String(e)}function f0(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 h0=L("buffer"),wn=h0.Buffer,c0=L("util"),Ma=c0.inspect,d0=Ma&&Ma.custom||"inspect";function p0(t,e,r){wn.prototype.copy.call(t,e,r)}rh.exports=function(){function t(){l0(this,t),this.head=null,this.tail=null,this.length=0}return u0(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 wn.alloc(0);for(var i=wn.allocUnsafe(r>>>0),n=this.head,s=0;n;)p0(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=wn.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:d0,value:function(r,i){return Ma(this,Xf(Xf({},i),{},{depth:0,customInspect:!1}))}}]),t}()});var Oa=w((i2,sh)=>{"use strict";function g0(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(Ta,this,t)):process.nextTick(Ta,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(vn,r):(r._writableState.errorEmitted=!0,process.nextTick(nh,r,s)):process.nextTick(nh,r,s):e?(process.nextTick(vn,r),e(s)):process.nextTick(vn,r)}),this)}function nh(t,e){Ta(t,e),vn(t)}function vn(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function m0(){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 Ta(t,e){t.emit("error",e)}function y0(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}sh.exports={destroy:g0,undestroy:m0,errorOrDestroy:y0}});var gt=w((n2,lh)=>{"use strict";var oh={};function qe(t,e,r){r||(r=Error);function i(s,a,o){return typeof e=="string"?e:e(s,a,o)}class n extends r{constructor(a,o,l){super(i(a,o,l))}}n.prototype.name=r.name,n.prototype.code=t,oh[t]=n}function ah(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 b0(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function w0(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function v0(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}qe("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);qe("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&b0(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(w0(t," argument"))n=`The ${t} ${i} ${ah(e,"type")}`;else{let s=v0(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${ah(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);qe("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");qe("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});qe("ERR_STREAM_PREMATURE_CLOSE","Premature close");qe("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});qe("ERR_MULTIPLE_CALLBACK","Callback called multiple times");qe("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");qe("ERR_STREAM_WRITE_AFTER_END","write after end");qe("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);qe("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);qe("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");lh.exports.codes=oh});var Aa=w((s2,uh)=>{"use strict";var _0=gt().codes.ERR_INVALID_OPT_VALUE;function S0(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function E0(t,e,r,i){var n=S0(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new _0(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}uh.exports={getHighWaterMark:E0}});var Da=w((a2,gh)=>{"use strict";gh.exports=Y;function hh(t){var e=this;this.next=null,this.entry=null,this.finish=function(){J0(e,t)}}var ur;Y.WritableState=zr;var R0={deprecate:Us()},ch=xa(),Sn=L("buffer").Buffer,x0=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function M0(t){return Sn.from(t)}function T0(t){return Sn.isBuffer(t)||t instanceof x0}var Pa=Oa(),O0=Aa(),A0=O0.getHighWaterMark,mt=gt().codes,k0=mt.ERR_INVALID_ARG_TYPE,P0=mt.ERR_METHOD_NOT_IMPLEMENTED,D0=mt.ERR_MULTIPLE_CALLBACK,q0=mt.ERR_STREAM_CANNOT_PIPE,C0=mt.ERR_STREAM_DESTROYED,L0=mt.ERR_STREAM_NULL_VALUES,j0=mt.ERR_STREAM_WRITE_AFTER_END,N0=mt.ERR_UNKNOWN_ENCODING,fr=Pa.errorOrDestroy;tt()(Y,ch);function F0(){}function zr(t,e,r){ur=ur||$t(),t=t||{},typeof r!="boolean"&&(r=e instanceof ur),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=A0(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){H0(e,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new hh(this)}zr.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(zr.prototype,"buffer",{get:R0.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var _n;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(_n=Function.prototype[Symbol.hasInstance],Object.defineProperty(Y,Symbol.hasInstance,{value:function(e){return _n.call(this,e)?!0:this!==Y?!1:e&&e._writableState instanceof zr}})):_n=function(e){return e instanceof this};function Y(t){ur=ur||$t();var e=this instanceof ur;if(!e&&!_n.call(Y,this))return new Y(t);this._writableState=new zr(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)),ch.call(this)}Y.prototype.pipe=function(){fr(this,new q0)};function I0(t,e){var r=new j0;fr(t,r),process.nextTick(e,r)}function $0(t,e,r,i){var n;return r===null?n=new L0:typeof r!="string"&&!e.objectMode&&(n=new k0("chunk",["string","Buffer"],r)),n?(fr(t,n),process.nextTick(i,n),!1):!0}Y.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&T0(t);return s&&!Sn.isBuffer(t)&&(t=M0(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=F0),i.ending?I0(this,r):(s||$0(this,i,t,r))&&(i.pendingcb++,n=B0(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&&dh(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 N0(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Y.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function W0(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Sn.from(e,r)),e}Object.defineProperty(Y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function B0(t,e,r,i,n,s){if(!r){var a=W0(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 ka(t,e,!1,o,i,n,s);return l}function ka(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new C0("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function U0(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(Ur,t,e),t._writableState.errorEmitted=!0,fr(t,i)):(n(i),t._writableState.errorEmitted=!0,fr(t,i),Ur(t,e))}function z0(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function H0(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new D0;if(z0(r),e)U0(t,r,i,e,n);else{var s=ph(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&dh(t,r),i?process.nextTick(fh,t,r,s,n):fh(t,r,s,n)}}function fh(t,e,r,i){r||G0(t,e),e.pendingcb--,i(),Ur(t,e)}function G0(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function dh(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,ka(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 hh(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,h=e.objectMode?1:l.length;if(ka(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 P0("_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||K0(this,i,r),this};Object.defineProperty(Y.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ph(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function V0(t,e){t._final(function(r){e.pendingcb--,r&&fr(t,r),e.prefinished=!0,t.emit("prefinish"),Ur(t,e)})}function Y0(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(V0,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Ur(t,e){var r=ph(e);if(r&&(Y0(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 K0(t,e,r){e.ending=!0,Ur(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function J0(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=Pa.destroy;Y.prototype._undestroy=Pa.undestroy;Y.prototype._destroy=function(t,e){e(t)}});var $t=w((o2,yh)=>{"use strict";var Z0=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};yh.exports=Ye;var mh=La(),Ca=Da();tt()(Ye,mh);for(qa=Z0(Ca.prototype),En=0;En<qa.length;En++)Rn=qa[En],Ye.prototype[Rn]||(Ye.prototype[Rn]=Ca.prototype[Rn]);var qa,Rn,En;function Ye(t){if(!(this instanceof Ye))return new Ye(t);mh.call(this,t),Ca.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",Q0)))}Object.defineProperty(Ye.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Ye.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Ye.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Q0(){this._writableState.ended||process.nextTick(X0,this)}function X0(t){t.end()}Object.defineProperty(Ye.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var xn=w((l2,vh)=>{"use strict";var bh=gt().codes.ERR_STREAM_PREMATURE_CLOSE;function ew(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 tw(){}function rw(t){return t.setHeader&&typeof t.abort=="function"}function wh(t,e,r){if(typeof e=="function")return wh(t,null,e);e||(e={}),r=ew(r||tw);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 bh),r.call(t,y);if(n&&!a)return(!t._writableState||!t._writableState.ended)&&(y=new bh),r.call(t,y)},d=function(){t.req.on("finish",o)};return rw(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)}}vh.exports=wh});var Sh=w((u2,_h)=>{"use strict";var Mn;function yt(t,e,r){return e=iw(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function iw(t){var e=nw(t,"string");return typeof e=="symbol"?e:String(e)}function nw(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 sw=xn(),bt=Symbol("lastResolve"),Wt=Symbol("lastReject"),Hr=Symbol("error"),Tn=Symbol("ended"),Bt=Symbol("lastPromise"),ja=Symbol("handlePromise"),Ut=Symbol("stream");function wt(t,e){return{value:t,done:e}}function aw(t){var e=t[bt];if(e!==null){var r=t[Ut].read();r!==null&&(t[Bt]=null,t[bt]=null,t[Wt]=null,e(wt(r,!1)))}}function ow(t){process.nextTick(aw,t)}function lw(t,e){return function(r,i){t.then(function(){if(e[Tn]){r(wt(void 0,!0));return}e[ja](r,i)},i)}}var uw=Object.getPrototypeOf(function(){}),fw=Object.setPrototypeOf((Mn={get stream(){return this[Ut]},next:function(){var e=this,r=this[Hr];if(r!==null)return Promise.reject(r);if(this[Tn])return Promise.resolve(wt(void 0,!0));if(this[Ut].destroyed)return new Promise(function(a,o){process.nextTick(function(){e[Hr]?o(e[Hr]):a(wt(void 0,!0))})});var i=this[Bt],n;if(i)n=new Promise(lw(i,this));else{var s=this[Ut].read();if(s!==null)return Promise.resolve(wt(s,!1));n=new Promise(this[ja])}return this[Bt]=n,n}},yt(Mn,Symbol.asyncIterator,function(){return this}),yt(Mn,"return",function(){var e=this;return new Promise(function(r,i){e[Ut].destroy(null,function(n){if(n){i(n);return}r(wt(void 0,!0))})})}),Mn),uw),hw=function(e){var r,i=Object.create(fw,(r={},yt(r,Ut,{value:e,writable:!0}),yt(r,bt,{value:null,writable:!0}),yt(r,Wt,{value:null,writable:!0}),yt(r,Hr,{value:null,writable:!0}),yt(r,Tn,{value:e._readableState.endEmitted,writable:!0}),yt(r,ja,{value:function(s,a){var o=i[Ut].read();o?(i[Bt]=null,i[bt]=null,i[Wt]=null,s(wt(o,!1))):(i[bt]=s,i[Wt]=a)},writable:!0}),r));return i[Bt]=null,sw(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[Wt];s!==null&&(i[Bt]=null,i[bt]=null,i[Wt]=null,s(n)),i[Hr]=n;return}var a=i[bt];a!==null&&(i[Bt]=null,i[bt]=null,i[Wt]=null,a(wt(void 0,!0))),i[Tn]=!0}),e.on("readable",ow.bind(null,i)),i};_h.exports=hw});var Mh=w((f2,xh)=>{"use strict";function Eh(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 cw(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function a(l){Eh(s,i,n,a,o,"next",l)}function o(l){Eh(s,i,n,a,o,"throw",l)}a(void 0)})}}function Rh(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 dw(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Rh(Object(r),!0).forEach(function(i){pw(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Rh(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function pw(t,e,r){return e=gw(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gw(t){var e=mw(t,"string");return typeof e=="symbol"?e:String(e)}function mw(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 yw=gt().codes.ERR_INVALID_ARG_TYPE;function bw(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 yw("iterable",["Iterable"],e);var n=new t(dw({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,a())};function a(){return o.apply(this,arguments)}function o(){return o=cw(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}xh.exports=bw});var La=w((c2,jh)=>{"use strict";jh.exports=U;var hr;U.ReadableState=kh;var h2=L("events").EventEmitter,Ah=function(e,r){return e.listeners(r).length},Vr=xa(),On=L("buffer").Buffer,ww=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function vw(t){return On.from(t)}function _w(t){return On.isBuffer(t)||t instanceof ww}var Na=L("util"),N;Na&&Na.debuglog?N=Na.debuglog("stream"):N=function(){};var Sw=ih(),za=Oa(),Ew=Aa(),Rw=Ew.getHighWaterMark,An=gt().codes,xw=An.ERR_INVALID_ARG_TYPE,Mw=An.ERR_STREAM_PUSH_AFTER_EOF,Tw=An.ERR_METHOD_NOT_IMPLEMENTED,Ow=An.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,cr,Fa,Ia;tt()(U,Vr);var Gr=za.errorOrDestroy,$a=["error","close","destroy","pause","resume"];function Aw(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function kh(t,e,r){hr=hr||$t(),t=t||{},typeof r!="boolean"&&(r=e instanceof hr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=Rw(this,t,"readableHighWaterMark",r),this.buffer=new Sw,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&&(cr||(cr=Dr().StringDecoder),this.decoder=new cr(t.encoding),this.encoding=t.encoding)}function U(t){if(hr=hr||$t(),!(this instanceof U))return new U(t);var e=this instanceof hr;this._readableState=new kh(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Vr.call(this)}Object.defineProperty(U.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});U.prototype.destroy=za.destroy;U.prototype._undestroy=za.undestroy;U.prototype._destroy=function(t,e){e(t)};U.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=On.from(t,e),e=""),i=!0),Ph(this,t,e,!1,i)};U.prototype.unshift=function(t){return Ph(this,t,null,!0,!1)};function Ph(t,e,r,i,n){N("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,Dw(t,s);else{var a;if(n||(a=kw(s,e)),a)Gr(t,a);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==On.prototype&&(e=vw(e)),i)s.endEmitted?Gr(t,new Ow):Wa(t,s,e,!0);else if(s.ended)Gr(t,new Mw);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?Wa(t,s,e,!1):Ua(t,s)):Wa(t,s,e,!1)}else i||(s.reading=!1,Ua(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function Wa(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&&kn(t)),Ua(t,e)}function kw(t,e){var r;return!_w(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new xw("chunk",["string","Buffer","Uint8Array"],e)),r}U.prototype.isPaused=function(){return this._readableState.flowing===!1};U.prototype.setEncoding=function(t){cr||(cr=Dr().StringDecoder);var e=new cr(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 Th=1073741824;function Pw(t){return t>=Th?t=Th:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Oh(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=Pw(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}U.prototype.read=function(t){N("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 N("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Ba(this):kn(this),null;if(t=Oh(t,e),t===0&&e.ended)return e.length===0&&Ba(this),null;var i=e.needReadable;N("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,N("length less than watermark",i)),e.ended||e.reading?(i=!1,N("reading or ended",i)):i&&(N("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Oh(r,e)));var n;return t>0?n=Ch(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&Ba(this)),n!==null&&this.emit("data",n),n};function Dw(t,e){if(N("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?kn(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Dh(t)))}}function kn(t){var e=t._readableState;N("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(N("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(Dh,t))}function Dh(t){var e=t._readableState;N("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,Ha(t)}function Ua(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(qw,t,e))}function qw(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(N("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}U.prototype._read=function(t){Gr(this,new Tw("_read()"))};U.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,N("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){N("onunpipe"),_===r&&E&&E.hasUnpiped===!1&&(E.hasUnpiped=!0,c())}function o(){N("onend"),t.end()}var l=Cw(r);t.on("drain",l);var u=!1;function c(){N("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(_){N("ondata");var E=t.write(_);N("dest.write",E),E===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&Lh(i.pipes,t)!==-1)&&!u&&(N("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(_){N("onerror",_),b(),t.removeListener("error",d),Ah(t,"error")===0&&Gr(t,_)}Aw(t,"error",d);function f(){t.removeListener("finish",y),b()}t.once("close",f);function y(){N("onfinish"),t.removeListener("close",f),b()}t.once("finish",y);function b(){N("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(N("pipe resume"),r.resume()),t};function Cw(t){return function(){var r=t._readableState;N("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Ah(t,"data")&&(r.flowing=!0,Ha(t))}}U.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=Lh(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)};U.prototype.on=function(t,e){var r=Vr.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,N("on readable",i.length,i.reading),i.length?kn(this):i.reading||process.nextTick(Lw,this)),r};U.prototype.addListener=U.prototype.on;U.prototype.removeListener=function(t,e){var r=Vr.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(qh,this),r};U.prototype.removeAllListeners=function(t){var e=Vr.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(qh,this),e};function qh(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function Lw(t){N("readable nexttick read 0"),t.read(0)}U.prototype.resume=function(){var t=this._readableState;return t.flowing||(N("resume"),t.flowing=!t.readableListening,jw(this,t)),t.paused=!1,this};function jw(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(Nw,t,e))}function Nw(t,e){N("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),Ha(t),e.flowing&&!e.reading&&t.read(0)}U.prototype.pause=function(){return N("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(N("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Ha(t){var e=t._readableState;for(N("flow",e.flowing);e.flowing&&t.read()!==null;);}U.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(N("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(N("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<$a.length;s++)t.on($a[s],this.emit.bind(this,$a[s]));return this._read=function(a){N("wrapped _read",a),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(U.prototype[Symbol.asyncIterator]=function(){return Fa===void 0&&(Fa=Sh()),Fa(this)});Object.defineProperty(U.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(U.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(U.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});U._fromList=Ch;Object.defineProperty(U.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Ch(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function Ba(t){var e=t._readableState;N("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(Fw,e,t))}function Fw(t,e){if(N("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"&&(U.from=function(t,e){return Ia===void 0&&(Ia=Mh()),Ia(U,t,e)});function Lh(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Ga=w((d2,Fh)=>{"use strict";Fh.exports=it;var Pn=gt().codes,Iw=Pn.ERR_METHOD_NOT_IMPLEMENTED,$w=Pn.ERR_MULTIPLE_CALLBACK,Ww=Pn.ERR_TRANSFORM_ALREADY_TRANSFORMING,Bw=Pn.ERR_TRANSFORM_WITH_LENGTH_0,Dn=$t();tt()(it,Dn);function Uw(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new $w);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 it(t){if(!(this instanceof it))return new it(t);Dn.call(this,t),this._transformState={afterTransform:Uw.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",zw)}function zw(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){Nh(t,e,r)}):Nh(this,null,null)}it.prototype.push=function(t,e){return this._transformState.needTransform=!1,Dn.prototype.push.call(this,t,e)};it.prototype._transform=function(t,e,r){r(new Iw("_transform()"))};it.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)}};it.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};it.prototype._destroy=function(t,e){Dn.prototype._destroy.call(this,t,function(r){e(r)})};function Nh(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Bw;if(t._transformState.transforming)throw new Ww;return t.push(null)}});var Wh=w((p2,$h)=>{"use strict";$h.exports=Yr;var Ih=Ga();tt()(Yr,Ih);function Yr(t){if(!(this instanceof Yr))return new Yr(t);Ih.call(this,t)}Yr.prototype._transform=function(t,e,r){r(null,t)}});var Gh=w((g2,Hh)=>{"use strict";var Va;function Hw(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var zh=gt().codes,Gw=zh.ERR_MISSING_ARGS,Vw=zh.ERR_STREAM_DESTROYED;function Bh(t){if(t)throw t}function Yw(t){return t.setHeader&&typeof t.abort=="function"}function Kw(t,e,r,i){i=Hw(i);var n=!1;t.on("close",function(){n=!0}),Va===void 0&&(Va=xn()),Va(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,Yw(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(a||new Vw("pipe"))}}}function Uh(t){t()}function Jw(t,e){return t.pipe(e)}function Zw(t){return!t.length||typeof t[t.length-1]!="function"?Bh:t.pop()}function Qw(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=Zw(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Gw("streams");var n,s=e.map(function(a,o){var l=o<e.length-1,u=o>0;return Kw(a,l,u,function(c){n||(n=c),c&&s.forEach(Uh),!l&&(s.forEach(Uh),i(n))})});return e.reduce(Jw)}Hh.exports=Qw});var zt=w((Ce,Jr)=>{var Kr=L("stream");process.env.READABLE_STREAM==="disable"&&Kr?(Jr.exports=Kr.Readable,Object.assign(Jr.exports,Kr),Jr.exports.Stream=Kr):(Ce=Jr.exports=La(),Ce.Stream=Kr||Ce,Ce.Readable=Ce,Ce.Writable=Da(),Ce.Duplex=$t(),Ce.Transform=Ga(),Ce.PassThrough=Wh(),Ce.finished=xn(),Ce.pipeline=Gh())});var eo=w((m2,Yh)=>{var dr=[],Zr=[],Ya=function(){};function Ja(t){return~dr.indexOf(t)?!1:(dr.push(t),!0)}function Za(t){Ya=t}function Xw(t){for(var e=[],r=0;r<dr.length;r++){if(dr[r].async){e.push(dr[r]);continue}if(dr[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 Qa(t){return~Zr.indexOf(t)?!1:(Zr.push(t),!0)}function Ka(){Ya.apply(Ya,arguments)}function Vh(t){for(var e=0;e<Zr.length;e++)t=Zr[e].apply(Zr[e],arguments);return t}function Xa(t,e){var r=Object.prototype.hasOwnProperty;for(var i in e)r.call(e,i)&&(t[i]=e[i]);return t}function ev(t){return t.enabled=!1,t.modify=Qa,t.set=Za,t.use=Ja,Xa(function(){return!1},t)}function tv(t){function e(){var r=Array.prototype.slice.call(arguments,0);return Ka.call(Ka,t,Vh(r,t)),!0}return t.enabled=!0,t.modify=Qa,t.set=Za,t.use=Ja,Xa(e,t)}Yh.exports=function(e){return e.introduce=Xa,e.enabled=Xw,e.process=Vh,e.modify=Qa,e.write=Ka,e.nope=ev,e.yep=tv,e.set=Za,e.use=Ja,e}});var Jh=w((y2,Kh)=>{var rv=eo(),iv=rv(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)});Kh.exports=iv});var Qh=w((b2,Zh)=>{"use strict";Zh.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 ec=w((w2,Xh)=>{Xh.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 ic=w((v2,rc)=>{"use strict";var nv=ec(),sv=Array.prototype.concat,av=Array.prototype.slice,tc=rc.exports=function(e){for(var r=[],i=0,n=e.length;i<n;i++){var s=e[i];nv(s)?r=sv.call(r,av.call(s)):r.push(s)}return r};tc.wrap=function(t){return function(){return t(tc(arguments))}}});var oc=w((_2,ac)=>{var Qr=Qh(),Xr=ic(),nc=Object.hasOwnProperty,sc=Object.create(null);for(qn in Qr)nc.call(Qr,qn)&&(sc[Qr[qn]]=qn);var qn,Me=ac.exports={to:{},get:{}};Me.get=function(t){var e=t.substring(0,3).toLowerCase(),r,i;switch(e){case"hsl":r=Me.get.hsl(t),i="hsl";break;case"hwb":r=Me.get.hwb(t),i="hwb";break;default:r=Me.get.rgb(t),i="rgb";break}return r?{model:i,value:r}:null};Me.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]:nc.call(Qr,o[1])?(a=Qr[o[1]],a[3]=1,a):null:null;for(l=0;l<3;l++)a[l]=vt(a[l],0,255);return a[3]=vt(a[3],0,1),a};Me.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=vt(parseFloat(r[2]),0,100),a=vt(parseFloat(r[3]),0,100),o=vt(isNaN(i)?1:i,0,1);return[n,s,a,o]}return null};Me.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=vt(parseFloat(r[2]),0,100),a=vt(parseFloat(r[3]),0,100),o=vt(isNaN(i)?1:i,0,1);return[n,s,a,o]}return null};Me.to.hex=function(){var t=Xr(arguments);return"#"+Cn(t[0])+Cn(t[1])+Cn(t[2])+(t[3]<1?Cn(Math.round(t[3]*255)):"")};Me.to.rgb=function(){var t=Xr(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]+")"};Me.to.rgb.percent=function(){var t=Xr(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]+")"};Me.to.hsl=function(){var t=Xr(arguments);return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};Me.to.hwb=function(){var t=Xr(arguments),e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};Me.to.keyword=function(t){return sc[t.slice(0,3)]};function vt(t,e,r){return Math.min(Math.max(e,t),r)}function Cn(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}});var uc=w((S2,lc)=>{"use strict";lc.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 to=w((E2,dc)=>{var Ht=uc(),cc={};for(Ln in Ht)Ht.hasOwnProperty(Ln)&&(cc[Ht[Ln]]=Ln);var Ln,A=dc.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(ve in A)if(A.hasOwnProperty(ve)){if(!("channels"in A[ve]))throw new Error("missing channels property: "+ve);if(!("labels"in A[ve]))throw new Error("missing channel labels property: "+ve);if(A[ve].labels.length!==A[ve].channels)throw new Error("channel and label counts mismatch: "+ve);fc=A[ve].channels,hc=A[ve].labels,delete A[ve].channels,delete A[ve].labels,Object.defineProperty(A[ve],"channels",{value:fc}),Object.defineProperty(A[ve],"labels",{value:hc})}var fc,hc,ve;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 ov(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=cc[t];if(e)return e;var r=1/0,i;for(var n in Ht)if(Ht.hasOwnProperty(n)){var s=Ht[n],a=ov(t,s);a<r&&(r=a,i=n)}return i};A.keyword.rgb=function(t){return Ht[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 gc=w((R2,pc)=>{var jn=to();function lv(){for(var t={},e=Object.keys(jn),r=e.length,i=0;i<r;i++)t[e[i]]={distance:-1,parent:null};return t}function uv(t){var e=lv(),r=[t];for(e[t].distance=0;r.length;)for(var i=r.pop(),n=Object.keys(jn[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 fv(t,e){return function(r){return e(t(r))}}function hv(t,e){for(var r=[e[t].parent,t],i=jn[e[t].parent][t],n=e[t].parent;e[n].parent;)r.unshift(e[n].parent),i=fv(jn[e[n].parent][n],i),n=e[n].parent;return i.conversion=r,i}pc.exports=function(t){for(var e=uv(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]=hv(a,e))}return r}});var yc=w((x2,mc)=>{var ro=to(),cv=gc(),pr={},dv=Object.keys(ro);function pv(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 gv(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}dv.forEach(function(t){pr[t]={},Object.defineProperty(pr[t],"channels",{value:ro[t].channels}),Object.defineProperty(pr[t],"labels",{value:ro[t].labels});var e=cv(t),r=Object.keys(e);r.forEach(function(i){var n=e[i];pr[t][i]=gv(n),pr[t][i].raw=pv(n)})});mc.exports=pr});var vc=w((M2,wc)=>{"use strict";var ei=oc(),Te=yc(),so=[].slice,bc=["keyword","gray","hex"],io={};Object.keys(Te).forEach(function(t){io[so.call(Te[t].labels).sort().join("")]=t});var Nn={};function fe(t,e){if(!(this instanceof fe))return new fe(t,e);if(e&&e in bc&&(e=null),e&&!(e in Te))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 fe)this.model=t.model,this.color=t.color.slice(),this.valpha=t.valpha;else if(typeof t=="string"){var n=ei.get(t);if(n===null)throw new Error("Unable to parse color from string: "+t);this.model=n.model,i=Te[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=Te[this.model].channels;var s=so.call(t,0,i);this.color=no(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 io))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=io[o];var l=Te[this.model].labels,u=[];for(r=0;r<l.length;r++)u.push(t[l[r]]);this.color=no(u)}if(Nn[this.model])for(i=Te[this.model].channels,r=0;r<i;r++){var c=Nn[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)}fe.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(t){var e=this.model in ei.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 ei.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 ei.to.rgb.percent(r)},array:function(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var t={},e=Te[this.model].channels,r=Te[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 fe(this.color.map(yv(t)).concat(this.valpha),this.model)},alpha:function(t){return arguments.length?new fe(this.color.concat(Math.max(0,Math.min(1,t))),this.model):this.valpha},red:K("rgb",0,ne(255)),green:K("rgb",1,ne(255)),blue:K("rgb",2,ne(255)),hue:K(["hsl","hsv","hsl","hwb","hcg"],0,function(t){return(t%360+360)%360}),saturationl:K("hsl",1,ne(100)),lightness:K("hsl",2,ne(100)),saturationv:K("hsv",1,ne(100)),value:K("hsv",2,ne(100)),chroma:K("hcg",1,ne(100)),gray:K("hcg",2,ne(100)),white:K("hwb",1,ne(100)),wblack:K("hwb",2,ne(100)),cyan:K("cmyk",0,ne(100)),magenta:K("cmyk",1,ne(100)),yellow:K("cmyk",2,ne(100)),black:K("cmyk",3,ne(100)),x:K("xyz",0,ne(100)),y:K("xyz",1,ne(100)),z:K("xyz",2,ne(100)),l:K("lab",0,ne(100)),a:K("lab",1),b:K("lab",2),keyword:function(t){return arguments.length?new fe(t):Te[this.model].keyword(this.color)},hex:function(t){return arguments.length?new fe(t):ei.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 fe.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 fe.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(Te).forEach(function(t){if(bc.indexOf(t)===-1){var e=Te[t].channels;fe.prototype[t]=function(){if(this.model===t)return new fe(this);if(arguments.length)return new fe(arguments,t);var r=typeof arguments[e]=="number"?e:this.valpha;return new fe(bv(Te[this.model][t].raw(this.color)).concat(r),t)},fe[t]=function(r){return typeof r=="number"&&(r=no(so.call(arguments),e)),new fe(r,t)}}});function mv(t,e){return Number(t.toFixed(e))}function yv(t){return function(e){return mv(e,t)}}function K(t,e,r){return t=Array.isArray(t)?t:[t],t.forEach(function(i){(Nn[i]||(Nn[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 bv(t){return Array.isArray(t)?t:[t]}function no(t,e){for(var r=0;r<e;r++)typeof t[r]!="number"&&(t[r]=0);return t}wc.exports=fe});var Sc=w((T2,_c)=>{"use strict";_c.exports=function(e){for(var r=0,i=0;r<e.length;i=e.charCodeAt(r++)+((i<<5)-i));var n=Math.floor(Math.abs(Math.sin(i)*1e4%1*16777216)).toString(16);return"#"+Array(6-n.length+1).join("0")+n}});var Mc=w((O2,xc)=>{"use strict";var Ec=vc(),Rc=Sc();xc.exports=function(e,r){var i=e.split(r||":"),n=Rc(i[0]);if(!i.length)return n;for(var s=0,a=i.length-1;s<a;s++)n=Ec(n).mix(Ec(Rc(i[s+1]))).saturate(1).hex();return n}});var Oc=w((A2,Tc)=>{"use strict";function $e(t,e){if(e)return new $e(t).style(e);if(!(this instanceof $e))return new $e(t);this.text=t}$e.prototype.prefix="\x1B[";$e.prototype.suffix="m";$e.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)]};$e.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)};$e.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};$e.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};$e.prototype.style=function(e){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(e))+this.suffix+this.text+this.reset()};Tc.exports=$e});var kc=w((k2,Ac)=>{var wv=Mc(),vv=Oc();Ac.exports=function(e,r){var i=r.namespace,n=r.colors!==!1?vv(i+":",wv(i)):i+":";return e[0]=n+" "+e[0],e}});var Dc=w((P2,Pc)=>{"use strict";Pc.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 Cc=w((D2,qc)=>{var _v=Dc();qc.exports=function(e){return function(i){try{return _v(i,e())}catch{}return!1}}});var jc=w((q2,Lc)=>{var Sv=Cc();Lc.exports=Sv(function(){return process.env.DEBUG||process.env.DIAGNOSTICS})});var Fc=w((C2,Nc)=>{Nc.exports=function(t,e){try{Function.prototype.apply.call(console.log,console,e)}catch{}}});var $c=w((L2,Ic)=>{var Ev=eo(),Rv=L("tty").isatty(1),Fn=Ev(function t(e,r){return r=r||{},r.colors="colors"in r?r.colors:Rv,r.namespace=e,r.prod=!1,r.dev=!0,!t.enabled(e)&&!(r.force||t.force)?t.nope(r):t.yep(r)});Fn.modify(kc());Fn.use(jc());Fn.set(Fc());Ic.exports=Fn});var ti=w((j2,ao)=>{process.env.NODE_ENV==="production"?ao.exports=Jh():ao.exports=$c()});var Bc=w((N2,Wc)=>{"use strict";var oo=L("fs"),{StringDecoder:xv}=L("string_decoder"),{Stream:Mv}=zt();function Tv(){}Wc.exports=(t,e)=>{let r=Buffer.alloc(65536),i=new xv("utf8"),n=new Mv,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")},oo.open(t.file,"a+","0644",(l,u)=>{if(l){e?e(l):n.emit("error",l),n.destroy();return}(function c(){if(n.destroyed){oo.close(u,Tv);return}return oo.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 Gc=w((I2,Hc)=>{"use strict";var Re=L("fs"),se=L("path"),Uc=Jf(),Ov=L("zlib"),{MESSAGE:Av}=re(),{Stream:kv,PassThrough:zc}=zt(),Pv=ar(),We=ti()("winston:file"),Dv=L("os"),qv=Bc();Hc.exports=class extends Pv{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 zc,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:Dv.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[Av]}${this.eol}`,n=Buffer.byteLength(i);function s(){if(this._size+=n,this._pendingSize-=n,We("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()})),We("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=Re.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 kv,n={file:r,start:e.start};return i.destroy=qv(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);We("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);Re.stat(i,(n,s)=>{if(n&&n.code==="ENOENT")return We("ENOENT\xA0ok",i),this.filename=r,e(null,0);if(n)return We(`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);We("create stream start",r,this.options);let i=Re.createWriteStream(r,this.options).on("error",n=>We(n)).on("close",()=>We("close",i.path,i.bytesWritten)).on("open",()=>{We("file open ok",r),this.emit("open",r),e.pipe(i),this.rotatedWhileOpening&&(this._stream=new zc,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(i),e.end())});return We("create stream ok",r),i}_incFile(e){We("_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)),Uc(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);Re.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);Re.exists(c,h=>{if(!h)return l(null);u=`${r}${o}${e}${s}`,Re.rename(c,se.join(this.dirname,u),l)})}.bind(this,a));Uc(n,()=>{Re.rename(se.join(this.dirname,`${r}${e}${s}`),se.join(this.dirname,`${r}1${e}${s}`),i)})}_compressFile(e,r,i){Re.access(e,Re.F_OK,n=>{if(n)return i();var s=Ov.createGzip(),a=Re.createReadStream(e),o=Re.createWriteStream(r);o.on("finish",()=>{Re.unlink(e,i)}),a.pipe(s).pipe(o)})}_createLogDirIfNotExist(e){Re.existsSync(e)||Re.mkdirSync(e,{recursive:!0})}}});var Yc=w((W2,Vc)=>{"use strict";var Cv=L("http"),Lv=L("https"),{Stream:jv}=zt(),Nv=ar(),{configure:Fv}=Ar();Vc.exports=class extends Nv{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 jv;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?Lv:Cv).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=Fv({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});a.end(Buffer.from(o(e,this.options.replacer),"utf8"))}}});var lo=w((B2,Kc)=>{"use strict";var Ke=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";Ke.writable=t=>Ke(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";Ke.readable=t=>Ke(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";Ke.duplex=t=>Ke.writable(t)&&Ke.readable(t);Ke.transform=t=>Ke.duplex(t)&&typeof t._transform=="function";Kc.exports=Ke});var Zc=w((z2,Jc)=>{"use strict";var Iv=lo(),{MESSAGE:$v}=re(),Wv=L("os"),Bv=ar();Jc.exports=class extends Bv{constructor(e={}){if(super(e),!e.stream||!Iv(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:Wv.EOL}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.isObjectMode){this._stream.write(e),r&&r();return}this._stream.write(`${e[$v]}${this.eol}`),r&&r()}}});var Qc=w(ri=>{"use strict";Object.defineProperty(ri,"Console",{configurable:!0,enumerable:!0,get(){return pf()}});Object.defineProperty(ri,"File",{configurable:!0,enumerable:!0,get(){return Gc()}});Object.defineProperty(ri,"Http",{configurable:!0,enumerable:!0,get(){return Yc()}});Object.defineProperty(ri,"Stream",{configurable:!0,enumerable:!0,get(){return Zc()}})});var $n=w(ii=>{"use strict";var In=Ws(),{configs:uo}=re();ii.cli=In.levels(uo.cli);ii.npm=In.levels(uo.npm);ii.syslog=In.levels(uo.syslog);ii.addColors=In.levels});var ed=w((Wn,Xc)=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});var Uv=rn(),zv=Gt(Uv),Hv=dn(),Gv=Gt(Hv),Vv=Ra(),Yv=Gt(Vv),Kv=_a(),Jv=Gt(Kv),Zv=Sa(),Qv=Gt(Zv),Xv=It(),e1=Gt(Xv),t1=lr(),r1=Gt(t1);function Gt(t){return t&&t.__esModule?t:{default:t}}function i1(t,e,r){r=(0,Jv.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===Gv.default)&&r(null))}for(;i<s;i++)e(t[i],i,(0,Qv.default)(o))}function n1(t,e,r){return(0,Yv.default)(t,1/0,e,r)}function s1(t,e,r){var i=(0,zv.default)(t)?i1:n1;return i(t,(0,e1.default)(e),r)}Wn.default=(0,r1.default)(s1,3);Xc.exports=Wn.default});var rd=w((Bn,td)=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.default=a1;function a1(t){return(e,r,i)=>t(e,i)}td.exports=Bn.default});var Hn=w((zn,id)=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});var o1=ed(),l1=Un(o1),u1=rd(),f1=Un(u1),h1=It(),c1=Un(h1),d1=lr(),p1=Un(d1);function Un(t){return t&&t.__esModule?t:{default:t}}function g1(t,e,r){return(0,l1.default)(t,(0,f1.default)((0,c1.default)(e)),r)}zn.default=(0,p1.default)(g1,3);id.exports=zn.default});var sd=w((V2,nd)=>{"use strict";var m1=Object.prototype.toString;nd.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=m1.call(e).slice(8,-1);return i==="Function"?r=r.substring(r.indexOf("(")+1,r.indexOf(")")):r=i,r||"anonymous"}});var fo=w((Y2,ad)=>{"use strict";var y1=sd();ad.exports=function(e){var r=0,i;function n(){return r||(r=1,i=e.apply(this,arguments),e=null),i}return n.displayName=y1(e),n}});var ho=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(`
32
- `).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 ni(t){for(var e in t)this[e]=t[e]}var b1=["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"],w1=["topLevel","eval","native","constructor"];b1.forEach(function(t){ni.prototype[t]=null,ni.prototype["get"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]}});w1.forEach(function(t){ni.prototype[t]=!1,ni.prototype["is"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]}});si._createParsedCallSite=function(t){return new ni(t)}});var ld=w((Z2,od)=>{"use strict";var{Writable:v1}=zt();od.exports=class extends v1{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 po=w((X2,hd)=>{"use strict";var ud=L("os"),_1=Hn(),co=ti()("winston:exception"),S1=fo(),fd=ho(),E1=ld();hd.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(`
33
- `),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:ud.loadavg(),uptime:ud.uptime()}}getTrace(e){return(e?fd.parse(e):fd.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 E1(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(){co("doExit",n),co("process._exiting",process._exiting),n&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!i||i.length===0)return process.nextTick(a);_1(i,(o,l)=>{let u=S1(l),c=o.transport||o;function h(d){return()=>{co(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 dd=w((tR,cd)=>{"use strict";var{Writable:R1}=zt();cd.exports=class extends R1{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 mo=w((iR,md)=>{"use strict";var pd=L("os"),x1=Hn(),go=ti()("winston:rejection"),M1=fo(),gd=ho(),T1=dd();md.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(`
34
- `),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:pd.loadavg(),uptime:pd.uptime()}}getTrace(e){return(e?gd.parse(e):gd.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 T1(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(){go("doExit",n),go("process._exiting",process._exiting),n&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!i||i.length===0)return process.nextTick(a);x1(i,(o,l)=>{let u=M1(l),c=o.transport||o;function h(d){return()=>{go(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 bd=w((nR,yd)=>{"use strict";var yo=class{constructor(e){let r=Gn();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)}};yd.exports=yo});var Gn=w((sR,Sd)=>{"use strict";var{Stream:O1,Transform:A1}=zt(),wd=Hn(),{LEVEL:Je,SPLAT:vd}=re(),_d=lo(),k1=po(),P1=mo(),D1=ba(),q1=bd(),{warn:C1}=Bs(),L1=$n(),j1=/%[scdjifoO%]/g,Vn=class extends A1{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||js()(),this.defaultMeta=i||null,this.levels=n||this.levels||L1.npm.levels,this.level=s,this.exceptions&&this.exceptions.unhandle(),this.rejections&&this.rejections.unhandle(),this.exceptions=new k1(this),this.rejections=new P1(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(`
35
- `));y&&this.exceptions.handle(y),b&&this.rejections.handle(b)}isLevelEnabled(e){let r=bo(this.levels,e);if(r===null)return!1;let i=bo(this.levels,this.level);return i===null?!1:!this.transports||this.transports.length===0?i>=r:this.transports.findIndex(s=>{let a=bo(this.levels,s.level);return a===null&&(a=i),a>=r})!==-1}log(e,r,...i){if(arguments.length===1)return e[Je]=e.level,this._addDefaultMeta(e),this.write(e),this;if(arguments.length===2)return r&&typeof r=="object"?(r[Je]=r.level=e,this._addDefaultMeta(r),this.write(r),this):(r={[Je]:e,level:e,message:r},this._addDefaultMeta(r),this.write(r),this);let[n]=i;if(typeof n=="object"&&n!==null&&!(r&&r.match&&r.match(j1))){let a=Object.assign({},this.defaultMeta,n,{[Je]:e,[vd]: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,{[Je]:e,[vd]:i,level:e,message:r})),this}_transform(e,r,i){if(this.silent)return i();e[Je]||(e[Je]=e.level),!this.levels[e[Je]]&&this.levels[e[Je]]!==0&&console.error("[winston] Unknown logger level: %s",e[Je]),this._readableState.pipes||console.error("[winston] Attempt to write logs with no transports, which can increase memory usage: %j",e);try{this.push(this.format.transform(e,this.format.options))}finally{this._writableState.sync=!1,i()}}_final(e){let r=this.transports.slice();wd(r,(i,n)=>{if(!i||i.finished)return setImmediate(n);i.once("finish",n),i.end()},e)}add(e){let r=!_d(e)||e.log.length>2?new D1({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(!_d(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(){C1.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})}wd(this.transports.filter(o=>!!o.query),a,()=>r(null,i))}stream(e={}){let r=new O1,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 q1(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(`
36
- `))}_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 bo(t,e){let r=t[e];return!r&&r!==0?null:r}Object.defineProperty(Vn.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});Sd.exports=Vn});var wo=w((aR,Ed)=>{"use strict";var{LEVEL:N1}=re(),F1=$n(),I1=Gn(),$1=ti()("winston:create-logger");function W1(t){return"is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}Ed.exports=function(t={}){t.levels=t.levels||F1.npm.levels;class e extends I1{constructor(n){super(n)}}let r=new e(t);return Object.keys(t.levels).forEach(function(i){if($1('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[N1]=i,s._addDefaultMeta(o),s.write(o),this||r}return n.length===0?(s.log(i,""),s):s.log(i,...n)},e.prototype[W1(i)]=function(){return(this||r).isLevelEnabled(i)}}),r}});var xd=w((lR,Rd)=>{"use strict";var B1=wo();Rd.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=B1(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 Td=w(G=>{"use strict";var Md=Ws(),{warn:ai}=Bs();G.version=fu().version;G.transports=Qc();G.config=$n();G.addColors=Md.levels;G.format=Md.format;G.createLogger=wo();G.Logger=Gn();G.ExceptionHandler=po();G.RejectionHandler=mo();G.Container=xd();G.Transport=ar();G.loggers=new G.Container;var Ze=G.createLogger();Object.keys(G.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(t=>G[t]=(...e)=>Ze[t](...e));Object.defineProperty(G,"level",{get(){return Ze.level},set(t){Ze.level=t}});Object.defineProperty(G,"exceptions",{get(){return Ze.exceptions}});Object.defineProperty(G,"rejections",{get(){return Ze.rejections}});["exitOnError"].forEach(t=>{Object.defineProperty(G,t,{get(){return Ze[t]},set(e){Ze[t]=e}})});Object.defineProperty(G,"default",{get(){return{exceptionHandlers:Ze.exceptionHandlers,rejectionHandlers:Ze.rejectionHandlers,transports:Ze.transports}}});ai.deprecated(G,"setLevels");ai.forFunctions(G,"useFormat",["cli"]);ai.forProperties(G,"useFormat",["padLevels","stripColors"]);ai.forFunctions(G,"deprecated",["addRewriter","addFilter","clone","extend"]);ai.forProperties(G,"deprecated",["emitErrs","levelLength"])});var Jn=w((Kn,Ad)=>{(function(t,e){typeof Kn=="object"&&typeof Ad<"u"?e(Kn):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.Superstruct={}))})(Kn,function(t){"use strict";class e extends TypeError{constructor(g,m){let v,{message:M,explanation:D,...W}=g,{path:Z}=g,Q=Z.length===0?M:`At path: ${Z.join(".")} -- ${M}`;super(D??Q),D!=null&&(this.cause=Q),Object.assign(this,W),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:M,branch:D}=g,{type:W}=m,{refinement:Z,message:Q=`Expected a value of type \`${W}\`${Z?` with refinement \`${Z}\``:""}, but received: \`${a(v)}\``}=p;return{value:v,type:W,refinement:Z,key:M[M.length-1],path:M,branch:D,...p,message:Q}}function*u(p,g,m,v){r(p)||(p=[p]);for(let M of p){let D=l(M,g,m,v);D&&(yield D)}}function*c(p,g,m={}){let{path:v=[],branch:M=[p],coerce:D=!1,mask:W=!1}=m,Z={path:v,branch:M,mask:W};D&&(p=g.coercer(p,Z));let Q="valid";for(let ie of g.validator(p,Z))ie.explanation=m.message,Q="not_valid",yield[ie,void 0];for(let[ie,Pe,Bp]of g.entries(p,Z)){let Up=c(Pe,Bp,{path:ie===void 0?v:[...v,ie],branch:ie===void 0?M:[...M,Pe],coerce:D,mask:W,message:m.message});for(let Ai of Up)Ai[0]?(Q=Ai[0].refinement!=null?"not_refined":"not_valid",yield[Ai[0],void 0]):D&&(Pe=Ai[1],ie===void 0?p=Pe:p instanceof Map?p.set(ie,Pe):p instanceof Set?p.add(Pe):i(p)&&(Pe!==void 0||ie in p)&&(p[ie]=Pe))}if(Q!=="not_valid")for(let ie of g.refiner(p,Z))ie.explanation=m.message,Q="not_refined",yield[ie,void 0];Q==="valid"&&(yield[void 0,p])}class h{constructor(g){let{type:m,schema:v,validator:M,refiner:D,coercer:W=Q=>Q,entries:Z=function*(){}}=g;this.type=m,this.schema=v,this.entries=Z,this.coercer=W,M?this.validator=(Q,ie)=>{let Pe=M(Q,ie);return u(Pe,ie,this,Q)}:this.validator=()=>[],D?this.refiner=(Q,ie)=>{let Pe=D(Q,ie);return u(Pe,ie,this,Q)}: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),M=o(v);return M[0]?[new e(M[0],function*(){for(let W of v)W[0]&&(yield W[0])}),void 0]:[void 0,M[1]]}function E(...p){let g=p[0].type==="type",m=p.map(M=>M.schema),v=Object.assign({},...m);return g?ot(v):at(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 T(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 q(p,g){let{schema:m}=p,v={...m};for(let M of g)delete v[M];switch(p.type){case"type":return ot(v);default:return at(v)}}function I(p){let g=p instanceof h,m=g?{...p.schema}:{...p};for(let v in m)m[v]=Tt(m[v]);return g&&p.type==="type"?ot(m):at(m)}function C(p,g){let{schema:m}=p,v={};for(let M of g)v[M]=m[M];switch(p.type){case"type":return ot(v);default:return at(v)}}function z(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 J(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 ye(){return R("bigint",p=>typeof p=="bigint")}function be(){return R("boolean",p=>typeof p=="boolean")}function et(){return R("date",p=>p instanceof Date&&!isNaN(p.getTime())||`Expected a valid \`Date\` object, but received: ${a(p)}`)}function ms(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 H(){return R("integer",p=>typeof p=="number"&&!isNaN(p)&&Number.isInteger(p)||`Expected an integer, but received: ${a(p)}`)}function pe(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 P(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 ke(p,g){return new h({type:"map",schema:null,*entries(m){if(p&&g&&m instanceof Map)for(let[v,M]of m.entries())yield[v,v,p],yield[v,M,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 Fe(){return R("never",()=>!1)}function Mt(p){return new h({...p,validator:(g,m)=>g===null||p.validator(g,m),refiner:(g,m)=>g===null||p.refiner(g,m)})}function Kt(){return R("number",p=>typeof p=="number"&&!isNaN(p)||`Expected a number, but received: ${a(p)}`)}function at(p){let g=p?Object.keys(p):[],m=Fe();return new h({type:"object",schema:p||null,*entries(v){if(p&&i(v)){let M=new Set(Object.keys(v));for(let D of g)M.delete(D),yield[D,v[D],p[D]];for(let D of M)yield[D,v[D],m]}},validator(v){return n(v)||`Expected an object, but received: ${a(v)}`},coercer(v,M){if(!n(v))return v;let D={...v};if(M.mask&&p)for(let W in D)p[W]===void 0&&delete D[W];return D}})}function Tt(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 ys(p,g){return new h({type:"record",schema:null,*entries(m){if(i(m))for(let v in m){let M=m[v];yield[v,v,p],yield[v,M,g]}},validator(m){return n(m)||`Expected an object, but received: ${a(m)}`},coercer(m){return n(m)?{...m}:m}})}function xe(){return R("regexp",p=>p instanceof RegExp)}function Ri(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 xi(){return R("string",p=>typeof p=="string"||`Expected a string, but received: ${a(p)}`)}function Mi(p){let g=Fe();return new h({type:"tuple",schema:null,*entries(m){if(Array.isArray(m)){let v=Math.max(p.length,m.length);for(let M=0;M<v;M++)yield[M,m[M],p[M]||g]}},validator(m){return Array.isArray(m)||`Expected an array, but received: ${a(m)}`},coercer(m){return Array.isArray(m)?m.slice():m}})}function ot(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 Jt(p){let g=p.map(m=>m.type).join(" | ");return new h({type:"union",schema:null,coercer(m,v){for(let M of p){let[D,W]=M.validate(m,{coerce:!0,mask:v.mask});if(!D)return W}return m},validator(m,v){let M=[];for(let D of p){let[...W]=c(m,D,v),[Z]=W;if(Z[0])for(let[Q]of W)Q&&M.push(Q);else return[]}return[`Expected the value to satisfy a union of \`${g}\`, but received: ${a(m)}`,...M]}})}function Ot(){return R("unknown",()=>!0)}function xr(p,g,m){return new h({...p,coercer:(v,M)=>b(v,g)?p.coercer(m(v,M),M):p.coercer(v,M)})}function At(p,g,m={}){return xr(p,Ot(),v=>{let M=typeof g=="function"?g():g;if(v===void 0)return M;if(!m.strict&&s(v)&&s(M)){let D={...v},W=!1;for(let Z in M)D[Z]===void 0&&(D[Z]=M[Z],W=!0);if(W)return D}return v})}function lt(p){return xr(p,xi(),g=>g.trim())}function Mr(p){return kt(p,"empty",g=>{let m=Ti(g);return m===0||`Expected an empty ${p.type} but received one with a size of \`${m}\``})}function Ti(p){return p instanceof Map||p instanceof Set?p.size:p.length}function Oi(p,g,m={}){let{exclusive:v}=m;return kt(p,"max",M=>v?M<g:M<=g||`Expected a ${p.type} less than ${v?"":"or equal to "}${g} but received \`${M}\``)}function Fp(p,g,m={}){let{exclusive:v}=m;return kt(p,"min",M=>v?M>g:M>=g||`Expected a ${p.type} greater than ${v?"":"or equal to "}${g} but received \`${M}\``)}function Ip(p){return kt(p,"nonempty",g=>Ti(g)>0||`Expected a nonempty ${p.type} but received an empty one`)}function $p(p,g){return kt(p,"pattern",m=>g.test(m)||`Expected a ${p.type} matching \`/${g.source}/\` but received "${m}"`)}function Wp(p,g,m=g){let v=`Expected a ${p.type}`,M=g===m?`of \`${g}\``:`between \`${g}\` and \`${m}\``;return kt(p,"size",D=>{if(typeof D=="number"||D instanceof Date)return g<=D&&D<=m||`${v} ${M} but received \`${D}\``;if(D instanceof Map||D instanceof Set){let{size:W}=D;return g<=W&&W<=m||`${v} with a size ${M} but received one with a size of \`${W}\``}else{let{length:W}=D;return g<=W&&W<=m||`${v} with a length ${M} but received one with a length of \`${W}\``}})}function kt(p,g,m){return new h({...p,*refiner(v,M){yield*p.refiner(v,M);let D=m(v,M),W=u(D,M,p,v);for(let Z of W)yield{...Z,refinement:g}}})}t.Struct=h,t.StructError=e,t.any=te,t.array=J,t.assert=d,t.assign=E,t.bigint=ye,t.boolean=be,t.coerce=xr,t.create=f,t.date=et,t.defaulted=At,t.define=R,t.deprecated=x,t.dynamic=T,t.empty=Mr,t.enums=ms,t.func=S,t.instance=O,t.integer=H,t.intersection=pe,t.is=b,t.lazy=k,t.literal=P,t.map=ke,t.mask=y,t.max=Oi,t.min=Fp,t.never=Fe,t.nonempty=Ip,t.nullable=Mt,t.number=Kt,t.object=at,t.omit=q,t.optional=Tt,t.partial=I,t.pattern=$p,t.pick=C,t.record=ys,t.refine=kt,t.regexp=xe,t.set=Ri,t.size=Wp,t.string=xi,t.struct=z,t.trimmed=lt,t.tuple=Mi,t.type=ot,t.union=Jt,t.unknown=Ot,t.validate=_})});var $d=w((kR,Id)=>{"use strict";Id.exports=Nd;function Nd(t,e,r){t instanceof RegExp&&(t=jd(t,r)),e instanceof RegExp&&(e=jd(e,r));var i=Fd(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 jd(t,e){var r=e.match(t);return r?r[0]:null}Nd.range=Fd;function Fd(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 Yd=w((PR,Vd)=>{var Wd=$d();Vd.exports=s_;var Bd="\0SLASH"+Math.random()+"\0",Ud="\0OPEN"+Math.random()+"\0",_o="\0CLOSE"+Math.random()+"\0",zd="\0COMMA"+Math.random()+"\0",Hd="\0PERIOD"+Math.random()+"\0";function vo(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function i_(t){return t.split("\\\\").join(Bd).split("\\{").join(Ud).split("\\}").join(_o).split("\\,").join(zd).split("\\.").join(Hd)}function n_(t){return t.split(Bd).join("\\").split(Ud).join("{").split(_o).join("}").split(zd).join(",").split(Hd).join(".")}function Gd(t){if(!t)return[""];var e=[],r=Wd("{","}",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=Gd(s);return s.length&&(a[a.length-1]+=o.shift(),a.push.apply(a,o)),e.push.apply(e,a),e}function s_(t){return t?(t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),li(i_(t),!0).map(n_)):[]}function a_(t){return"{"+t+"}"}function o_(t){return/^-?0\d/.test(t)}function l_(t,e){return t<=e}function u_(t,e){return t>=e}function li(t,e){var r=[],i=Wd("{","}",t);if(!i)return[t];var n=i.pre,s=i.post.length?li(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+_o+i.post,li(t)):[t];var d;if(c)d=i.body.split(/\.\./);else if(d=Gd(i.body),d.length===1&&(d=li(d[0],!1).map(a_),d.length===1))return s.map(function(te){return i.pre+d[0]+te});var f;if(c){var y=vo(d[0]),b=vo(d[1]),_=Math.max(d[0].length,d[1].length),E=d.length==3?Math.abs(vo(d[2])):1,R=l_,x=b<y;x&&(E*=-1,R=u_);var T=d.some(o_);f=[];for(var k=y;R(k,b);k+=E){var q;if(u)q=String.fromCharCode(k),q==="\\"&&(q="");else if(q=String(k),T){var I=_-q.length;if(I>0){var C=new Array(I+1).join("0");k<0?q="-"+C+q.slice(1):q=C+q}}f.push(q)}}else{f=[];for(var z=0;z<d.length;z++)f.push.apply(f,li(d[z],!1))}for(var z=0;z<f.length;z++)for(var a=0;a<s.length;a++){var o=n+f[z]+s[a];(!e||c||o)&&r.push(o)}}return r}});import kS from"yargs";import{hideBin as PS}from"yargs/helpers";import de from"node:path";import xt from"node:fs/promises";import{fileURLToPath as DS}from"node:url";import $o from"fs-extra";import{loadPyodide as Cp,version as qS}from"pyodide";import Od from"node:path";import U1 from"node:fs/promises";var _t=Tr(Td(),1),$=_t.createLogger({transports:[new _t.transports.Console({format:_t.format.combine(_t.format.splat(),_t.format.cli())})]});function oi(t){process.emitWarning(t,{type:"DeprecationWarning"})}var Yn=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=Od.posix.join(this.sourceUrl,e);$.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=Od.join(this.sourceUrl,e);$.debug(`Reading ${r}`);let i=await U1.readFile(r);return JSON.parse(i.toString())}}async loadPrebuiltPackageData(){if(this._data!=null)return this._data;$.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 Pd=Tr(Jn(),1);import z1 from"node:fs/promises";var X=Tr(Jn(),1),kd=X.object({entrypoint:X.string(),embed:X.defaulted(X.boolean(),!1),idbfsMountpoints:X.optional(X.array(X.string())),nodeJsWorker:X.defaulted(X.boolean(),!1),nodefsMountpoints:X.optional(X.record(X.string(),X.string()))});function H1(t){let e=Pd.mask(t??{},kd);if(e.nodeJsWorker){if(e.idbfsMountpoints!=null)throw new Error("The `idbfsMountpoints` field is not allowed when `nodeJsWorker` is true.")}else if(e.nodefsMountpoints!=null)throw new Error("The `nodefsMountpoints` field is not allowed when `nodeJsWorker` is false.");return e}async function Dd(t){let e=H1({...t.packageJsonStliteDesktopField,...t.fallbacks});$.info("App manifest: %j",e);let r=JSON.stringify(e,null,2);$.info(`Dump the manifest file -> ${t.manifestFilePath}`),await z1.writeFile(t.manifestFilePath,r,{encoding:"utf-8"})}var he=Tr(Jn(),1);import G1 from"node:path";async function qd(t){let{files:e,entrypoint:r}=V1(t),i=await Y1(t),n=await K1(t);return{files:e,entrypoint:r,dependencies:i,requirementsTxtFilePaths:n}}function V1(t){let{packageJsonStliteDesktopField:e,fallbacks:{appHomeDirSource:r}}=t,i=e?.files,n=e?.entrypoint;if(i==null||n==null){oi("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&&oi("The `appHomeDirSource` argument is deprecated and has been ignored because `stlite.desktop.files` is specified in `package.json`.");return he.assert(n,he.string(),"The `stlite.desktop.entrypoint` field must be a string."),he.assert(i,he.array(he.string()),"The `stlite.desktop.files` field must be an array of strings."),{files:i,entrypoint:n}}async function Y1(t){let{packageJsonStliteDesktopField:e,fallbacks:{packages:r}}=t,i=e?.dependencies;he.assert(i,he.optional(he.array(he.string())),"The `stlite.desktop.dependencies` field must be an array of strings.");let n=[];return r!=null&&(oi("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 K1(t){let{pathResolutionRoot:e,packageJsonStliteDesktopField:r,fallbacks:{requirementsTxtFilePaths:i}}=t,n=r?.requirementsTxtFiles;he.assert(n,he.optional(he.array(he.string())),"The `stlite.desktop.requirementsTxtFiles` field must be an array of strings.");let s=n?.map(o=>G1.resolve(e,o)),a=[];return i!=null&&i.length>0&&(oi("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 J1="[",Z1="(<=>!~",Q1=";",X1="@",e_=new RegExp(`[${J1+Z1+Q1+X1}]`);function t_(t){return t.split(e_)[0].trim()}function Cd(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=>t_(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 r_=/\s#.*$/;function Ld(t){return t.split(`
37
- `).filter(e=>!e.startsWith("#")).map(e=>e.replace(r_,"")).map(e=>e.trim()).filter(e=>e!=="")}var rp=Tr(Yd(),1);var ui=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")};var f_={"[: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]},fi=t=>t.replace(/[[\]\\-]/g,"\\$&"),h_=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Kd=t=>t.join(""),Jd=(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(f_))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(fi(h)+"-"+fi(b)):b===h&&i.push(fi(b)),h="",s++;continue}if(t.startsWith("-]",s+1)){i.push(fi(b+"-")),s+=2;continue}if(t.startsWith("-",s+1)){h=b,s+=2;continue}i.push(fi(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[h_(b),!1,c-r,!1]}let d="["+(u?"^":"")+Kd(i)+"]",f="["+(u?"":"^")+Kd(n)+"]";return[i.length&&n.length?"("+d+"|"+f+")":i.length?d:f,o,c-r,!0]};var Be=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var c_=new Set(["!","?","+","*","@"]),Zd=t=>c_.has(t),d_="(?!(?:^|/)\\.\\.?(?:$|/))",Zn="(?!\\.)",p_=new Set(["[","."]),g_=new Set(["..","."]),m_=new Set("().*{}+?[]^$\\!"),y_=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),So="[^/]",Qd=So+"*?",Xd=So+"+?",gr=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&&Zd(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(Zd(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&&g_.has(this.#i[0]))){let y=p_,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?d_:_?Zn:""}let h="";return this.isEnd()&&this.#e.#h&&this.#a?.type==="!"&&(h="(?:$|\\/)"),[c+u+h,Be(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,Be(this.toString()),!1,!1]}let a=!i||e||r||!Zn?"":this.#d(!0);a===s&&(a=""),a&&(s=`(?:${s})(?:${a})*?`);let o="";if(this.type==="!"&&this.#n)o=(this.isStart()&&!r?Zn:"")+Xd;else{let l=this.type==="!"?"))"+(this.isStart()&&!r&&!e?Zn:"")+Qd+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;o=n+s+l}return[o,Be(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+=(m_.has(l)?"\\":"")+l;continue}if(l==="\\"){o===e.length-1?s+="\\\\":n=!0;continue}if(l==="["){let[u,c,h,d]=Jd(e,o);if(h){s+=u,a=a||c,o+=h-1,r=r||d;continue}}if(l==="*"){i&&e==="*"?s+=Xd:s+=Qd,r=!0;continue}if(l==="?"){s+=So,r=!0;continue}s+=y_(l)}return[s,Be(e),!!r,a]}};var mr=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");var _e=(t,e,r={})=>(ui(e),!r.nocomment&&e.charAt(0)==="#"?!1:new Oe(e,r).match(t)),b_=/^\*+([^+@!?\*\[\(]*)$/,w_=t=>e=>!e.startsWith(".")&&e.endsWith(t),v_=t=>e=>e.endsWith(t),__=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),S_=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),E_=/^\*+\.\*+$/,R_=t=>!t.startsWith(".")&&t.includes("."),x_=t=>t!=="."&&t!==".."&&t.includes("."),M_=/^\.\*+$/,T_=t=>t!=="."&&t!==".."&&t.startsWith("."),O_=/^\*+$/,A_=t=>t.length!==0&&!t.startsWith("."),k_=t=>t.length!==0&&t!=="."&&t!=="..",P_=/^\?+([^+@!?\*\[\(]*)?$/,D_=([t,e=""])=>{let r=ip([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},q_=([t,e=""])=>{let r=np([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},C_=([t,e=""])=>{let r=np([t]);return e?i=>r(i)&&i.endsWith(e):r},L_=([t,e=""])=>{let r=ip([t]);return e?i=>r(i)&&i.endsWith(e):r},ip=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},np=([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},sp=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",ep={win32:{sep:"\\"},posix:{sep:"/"}},j_=sp==="win32"?ep.win32.sep:ep.posix.sep;_e.sep=j_;var ce=Symbol("globstar **");_e.GLOBSTAR=ce;var N_="[^/]",F_=N_+"*?",I_="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",$_="(?:(?!(?:\\/|^)\\.).)*?",W_=(t,e={})=>r=>_e(r,t,e);_e.filter=W_;var Le=(t,e={})=>Object.assign({},t,e),B_=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return _e;let e=_e;return Object.assign((i,n,s={})=>e(i,n,Le(t,s)),{Minimatch:class extends e.Minimatch{constructor(n,s={}){super(n,Le(t,s))}static defaults(n){return e.defaults(Le(t,n)).Minimatch}},AST:class extends e.AST{constructor(n,s,a={}){super(n,s,Le(t,a))}static fromGlob(n,s={}){return e.AST.fromGlob(n,Le(t,s))}},unescape:(i,n={})=>e.unescape(i,Le(t,n)),escape:(i,n={})=>e.escape(i,Le(t,n)),filter:(i,n={})=>e.filter(i,Le(t,n)),defaults:i=>e.defaults(Le(t,i)),makeRe:(i,n={})=>e.makeRe(i,Le(t,n)),braceExpand:(i,n={})=>e.braceExpand(i,Le(t,n)),match:(i,n,s={})=>e.match(i,n,Le(t,s)),sep:e.sep,GLOBSTAR:ce})};_e.defaults=B_;var ap=(t,e={})=>(ui(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,rp.default)(t));_e.braceExpand=ap;var U_=(t,e={})=>new Oe(t,e).makeRe();_e.makeRe=U_;var z_=(t,e,r={})=>{let i=new Oe(e,r);return t=t.filter(n=>i.match(n)),i.options.nonull&&!t.length&&t.push(e),t};_e.match=z_;var tp=/[?*]|[+@!]\(.*?\)|\[|\]/,H_=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Oe=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,r={}){ui(e),r=r||{},this.options=r,this.pattern=e,this.platform=r.platform||sp,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]==="?"||!tp.test(s[2]))&&!tp.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,T=R?3:E?0:void 0;if(typeof x=="number"&&typeof T=="number"){let[k,q]=[e[x],r[T]];k.toLowerCase()===q.toLowerCase()&&(r[T]=k,T>x?r=r.slice(T):x>T&&(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===ce){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(`
29
+ ${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 ut(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 U=c(String(k),f[k],y);b+=U!==void 0?U:"null",b+=","}let j=c(String(k),f[k],y);if(b+=j!==void 0?j:"null",f.length-1>a){let U=f.length-a-1;b+=`,"... ${Dt(U)} 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);qs(f)&&(b+=ql(f,",",a),_=_.slice(f.length),x-=f.length,R=","),n&&(_=Ds(_)),y.push(f);for(let M=0;M<x;M++){let k=_[M],j=c(k,f[k],y);j!==void 0&&(b+=`${R}${ut(k)}:${j}`,R=",")}if(E>a){let M=E-a;b+=`${R}"...":"${Dt(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,[],gg(f),b,"")}if(b.length!==0)return u("",d,[],b,"")}return c("",d,[])}return h}});var js=w((SE,Nl)=>{"use strict";var yg=Ee(),{MESSAGE:bg}=te(),wg=Or();function vg(t,e){return typeof e=="bigint"?e.toString():e}Nl.exports=yg((t,e)=>{let r=wg.configure(e);return t[bg]=r(t,e.replacer||vg,e.space),t})});var Il=w((EE,Fl)=>{"use strict";var _g=Ee();Fl.exports=_g((t,e)=>e.message?(t.message=`[${e.label}] ${t.message}`,t):(t.label=e.label,t))});var Wl=w((RE,$l)=>{"use strict";var Sg=Ee(),{MESSAGE:Eg}=te(),Rg=Or();$l.exports=Sg(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[Eg]=Rg(e),t})});var Ul=w((xE,Bl)=>{"use strict";var xg=Ee();function Mg(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 Tg(t,e,r){return t[r]=e.reduce((i,n)=>(i[n]=t[n],delete t[n],i),{}),t}Bl.exports=xg((t,e={})=>{let r="metadata";e.key&&(r=e.key);let i=[];return!e.fillExcept&&!e.fillWith&&(i.push("level"),i.push("message")),e.fillExcept&&(i=e.fillExcept),i.length>0?Mg(t,i,r):e.fillWith?Tg(t,e.fillWith,r):t})});var Hl=w((ME,zl)=>{var Qt=1e3,Xt=Qt*60,er=Xt*60,Ct=er*24,Og=Ct*7,Ag=Ct*365.25;zl.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return kg(t);if(r==="number"&&isFinite(t))return e.long?Dg(t):Pg(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function kg(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*Ag;case"weeks":case"week":case"w":return r*Og;case"days":case"day":case"d":return r*Ct;case"hours":case"hour":case"hrs":case"hr":case"h":return r*er;case"minutes":case"minute":case"mins":case"min":case"m":return r*Xt;case"seconds":case"second":case"secs":case"sec":case"s":return r*Qt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Pg(t){var e=Math.abs(t);return e>=Ct?Math.round(t/Ct)+"d":e>=er?Math.round(t/er)+"h":e>=Xt?Math.round(t/Xt)+"m":e>=Qt?Math.round(t/Qt)+"s":t+"ms"}function Dg(t){var e=Math.abs(t);return e>=Ct?Fi(t,e,Ct,"day"):e>=er?Fi(t,e,er,"hour"):e>=Xt?Fi(t,e,Xt,"minute"):e>=Qt?Fi(t,e,Qt,"second"):t+" ms"}function Fi(t,e,r,i){var n=e>=r*1.5;return Math.round(t/r)+" "+i+(n?"s":"")}});var Vl=w((Ar,Gl)=>{"use strict";var qg=Ee(),Cg=Hl();Gl.exports=qg(t=>{let e=+new Date;return Ar.diff=e-(Ar.prevTime||e),Ar.prevTime=e,t.ms=`+${Cg(Ar.diff)}`,t})});var Jl=w((TE,Kl)=>{"use strict";var Lg=q("util").inspect,jg=Ee(),{LEVEL:Ng,MESSAGE:Yl,SPLAT:Fg}=te();Kl.exports=jg((t,e={})=>{let r=Object.assign({},t);return delete r[Ng],delete r[Yl],delete r[Fg],t[Yl]=Lg(r,!1,e.depth||null,e.colorize),t})});var Zl=w((OE,$i)=>{"use strict";var{MESSAGE:Ig}=te(),Ii=class{constructor(e){this.template=e}transform(e){return e[Ig]=this.template(e),e}};$i.exports=t=>new Ii(t);$i.exports.Printf=$i.exports.Format=Ii});var eu=w((AE,Xl)=>{"use strict";var $g=Ee(),{MESSAGE:Ql}=te(),Wg=Or();Xl.exports=$g(t=>{let e=Wg(Object.assign({},t,{level:void 0,message:void 0,splat:void 0})),r=t.padding&&t.padding[t.level]||"";return e!=="{}"?t[Ql]=`${t.level}:${r} ${t.message} ${e}`:t[Ql]=`${t.level}:${r} ${t.message}`,t})});var iu=w((kE,ru)=>{"use strict";var Bg=q("util"),{SPLAT:tu}=te(),Ug=/%[scdjifoO%]/g,zg=/%%/g,Ns=class{constructor(e){this.options=e}_splat(e,r){let i=e.message,n=e[tu]||e.splat||[],s=i.match(zg),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=Bg.format(i,...n),e}transform(e){let r=e.message,i=e[tu]||e.splat;if(!i||!i.length)return e;let n=r&&r.match&&r.match(Ug);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}};ru.exports=t=>new Ns(t)});var su=w((Wi,nu)=>{(function(t,e){typeof Wi=="object"&&typeof nu<"u"?e(Wi):typeof define=="function"&&define.amd?define(["exports"],e):e(t.fecha={})})(Wi,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=[],pe=0,P=S.length;pe<P;pe++)z.push(S[pe].substr(0,O));return z}var u=function(S){return function(O,z){var pe=z[S].map(function(ke){return ke.toLowerCase()}),P=pe.indexOf(O.toLowerCase());return P>-1?P:null}};function c(S){for(var O=[],z=1;z<arguments.length;z++)O[z-1]=arguments[z];for(var pe=0,P=O;pe<P.length;pe++){var ke=P[pe];for(var Fe in ke)S[Fe]=ke[Fe]}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},j=[null,r],U=[null,a],F=["isPm",a,function(S,O){var z=S.toLowerCase();return z===O.amPm[0]?0:z===O.amPm[1]?1:null}],G=["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}],ne={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:j,dd:j,ddd:U,dddd:U,MMM:["month",a,u("monthNamesShort")],MMMM:["month",a,u("monthNames")],a:F,A:F,ZZ:G,Z:G},J={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},ye=function(S){return c(J,S)},be=function(S,O,z){if(O===void 0&&(O=J.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=J[O]||O;var pe=[];O=O.replace(o,function(ke,Fe){return pe.push(Fe),"@@@"});var P=c(c({},_),z);return O=O.replace(e,function(ke){return M[ke](S,P)}),O.replace(/@@@/g,function(){return pe.shift()})};function et(S,O,z){if(z===void 0&&(z={}),typeof O!="string")throw new Error("Invalid format in fecha parse");if(O=J[O]||O,S.length>1e3)return null;var pe=new Date,P={year:pe.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},ke=[],Fe=[],Mt=O.replace(o,function(At,lt){return Fe.push(R(lt)),"@@@"}),Kt={},at={};Mt=R(Mt).replace(e,function(At){var lt=ne[At],Mr=lt[0],Mi=lt[1],Ti=lt[3];if(Kt[Mr])throw new Error("Invalid format. "+Mr+" specified twice in format");return Kt[Mr]=!0,Ti&&(at[Ti]=!0),ke.push(lt),"("+Mi+")"}),Object.keys(at).forEach(function(At){if(!Kt[At])throw new Error("Invalid format. "+At+" is required in specified format")}),Mt=Mt.replace(/@@@/g,function(){return Fe.shift()});var Tt=S.match(new RegExp(Mt,"i"));if(!Tt)return null;for(var ys=c(c({},_),z),xe=1;xe<Tt.length;xe++){var Ei=ke[xe-1],Ri=Ei[0],xi=Ei[2],ot=xi?xi(Tt[xe],ys):+Tt[xe];if(ot==null)return null;P[Ri]=ot}P.isPm===1&&P.hour!=null&&+P.hour!=12?P.hour=+P.hour+12:P.isPm===0&&+P.hour==12&&(P.hour=0);var Jt;if(P.timezoneOffset==null){Jt=new Date(P.year,P.month,P.day,P.hour,P.minute,P.second,P.millisecond);for(var Ot=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],xe=0,xr=Ot.length;xe<xr;xe++)if(Kt[Ot[xe][0]]&&P[Ot[xe][0]]!==Jt[Ot[xe][1]]())return null}else if(Jt=new Date(Date.UTC(P.year,P.month,P.day,P.hour,P.minute-P.timezoneOffset,P.second,P.millisecond)),P.month>11||P.month<0||P.day>31||P.day<1||P.hour>23||P.hour<0||P.minute>59||P.minute<0||P.second>59||P.second<0)return null;return Jt}var ms={format:be,parse:et,defaultI18n:b,setGlobalDateI18n:E,setGlobalDateMasks:ye};t.assign=c,t.default=ms,t.format=be,t.parse=et,t.defaultI18n=b,t.setGlobalDateI18n=E,t.setGlobalDateMasks=ye,Object.defineProperty(t,"__esModule",{value:!0})})});var ou=w((PE,au)=>{"use strict";var Hg=su(),Gg=Ee();au.exports=Gg((t,e={})=>(e.format&&(t.timestamp=typeof e.format=="function"?e.format():Hg.format(new Date,e.format)),t.timestamp||(t.timestamp=new Date().toISOString()),e.alias&&(t[e.alias]=t.timestamp),t))});var uu=w((DE,lu)=>{"use strict";var Fs=vs(),Vg=Ee(),{MESSAGE:Is}=te();lu.exports=Vg((t,e)=>(e.level!==!1&&(t.level=Fs.strip(t.level)),e.message!==!1&&(t.message=Fs.strip(String(t.message))),e.raw!==!1&&t[Is]&&(t[Is]=Fs.strip(String(t[Is]))),t))});var Ws=w($s=>{"use strict";var Yg=$s.format=Ee();$s.levels=El();function ue(t,e){Object.defineProperty(Yg,t,{get(){return e()},configurable:!0})}ue("align",function(){return xl()});ue("errors",function(){return Ol()});ue("cli",function(){return kl()});ue("combine",function(){return Dl()});ue("colorize",function(){return qi()});ue("json",function(){return js()});ue("label",function(){return Il()});ue("logstash",function(){return Wl()});ue("metadata",function(){return Ul()});ue("ms",function(){return Vl()});ue("padLevels",function(){return As()});ue("prettyPrint",function(){return Jl()});ue("printf",function(){return Zl()});ue("simple",function(){return eu()});ue("splat",function(){return iu()});ue("timestamp",function(){return ou()});ue("uncolorize",function(){return uu()})});var Bs=w(Bi=>{"use strict";var{format:fu}=q("util");Bi.warn={deprecated(t){return()=>{throw new Error(fu("{ %s } was removed in winston@3.0.0.",t))}},useFormat(t){return()=>{throw new Error([fu("{ %s } was removed in winston@3.0.0.",t),"Use a custom winston.format = winston.format(function) instead."].join(`
30
+ `))}},forFunctions(t,e,r){r.forEach(i=>{t[i]=Bi.warn[e](i)})},forProperties(t,e,r){r.forEach(i=>{let n=Bi.warn[e](i);Object.defineProperty(t,i,{get:n,set:n})})}}});var cu=w((LE,Kg)=>{Kg.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 Us=w((jE,hu)=>{hu.exports=q("util").deprecate});var zs=w((NE,du)=>{du.exports=q("stream")});var Gs=w((FE,gu)=>{"use strict";function Jg(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(Hs,this,t)):process.nextTick(Hs,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(Ui,r):(r._writableState.errorEmitted=!0,process.nextTick(pu,r,s)):process.nextTick(pu,r,s):e?(process.nextTick(Ui,r),e(s)):process.nextTick(Ui,r)}),this)}function pu(t,e){Hs(t,e),Ui(t)}function Ui(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Zg(){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 Hs(t,e){t.emit("error",e)}function Qg(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}gu.exports={destroy:Jg,undestroy:Zg,errorOrDestroy:Qg}});var tr=w((IE,bu)=>{"use strict";var yu={};function De(t,e,r){r||(r=Error);function i(s,a,o){return typeof e=="string"?e:e(s,a,o)}class n extends r{constructor(a,o,l){super(i(a,o,l))}}n.prototype.name=r.name,n.prototype.code=t,yu[t]=n}function mu(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 Xg(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function em(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function tm(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}De("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);De("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&Xg(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(em(t," argument"))n=`The ${t} ${i} ${mu(e,"type")}`;else{let s=tm(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${mu(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);De("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");De("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});De("ERR_STREAM_PREMATURE_CLOSE","Premature close");De("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});De("ERR_MULTIPLE_CALLBACK","Callback called multiple times");De("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");De("ERR_STREAM_WRITE_AFTER_END","write after end");De("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);De("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);De("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");bu.exports.codes=yu});var Vs=w(($E,wu)=>{"use strict";var rm=tr().codes.ERR_INVALID_OPT_VALUE;function im(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function nm(t,e,r,i){var n=im(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new rm(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}wu.exports={getHighWaterMark:nm}});var vu=w((WE,Ys)=>{typeof Object.create=="function"?Ys.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Ys.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 tt=w((BE,Js)=>{try{if(Ks=q("util"),typeof Ks.inherits!="function")throw"";Js.exports=Ks.inherits}catch{Js.exports=vu()}var Ks});var Mu=w((UE,xu)=>{"use strict";function _u(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 Su(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?_u(Object(r),!0).forEach(function(i){sm(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_u(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function sm(t,e,r){return e=Ru(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function am(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Eu(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,Ru(i.key),i)}}function om(t,e,r){return e&&Eu(t.prototype,e),r&&Eu(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ru(t){var e=lm(t,"string");return typeof e=="symbol"?e:String(e)}function lm(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 um=q("buffer"),zi=um.Buffer,fm=q("util"),Zs=fm.inspect,cm=Zs&&Zs.custom||"inspect";function hm(t,e,r){zi.prototype.copy.call(t,e,r)}xu.exports=function(){function t(){am(this,t),this.head=null,this.tail=null,this.length=0}return om(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 zi.alloc(0);for(var i=zi.allocUnsafe(r>>>0),n=this.head,s=0;n;)hm(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=zi.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:cm,value:function(r,i){return Zs(this,Su(Su({},i),{},{depth:0,customInspect:!1}))}}]),t}()});var Au=w((Qs,Ou)=>{var Hi=q("buffer"),Ge=Hi.Buffer;function Tu(t,e){for(var r in t)e[r]=t[r]}Ge.from&&Ge.alloc&&Ge.allocUnsafe&&Ge.allocUnsafeSlow?Ou.exports=Hi:(Tu(Hi,Qs),Qs.Buffer=Lt);function Lt(t,e,r){return Ge(t,e,r)}Lt.prototype=Object.create(Ge.prototype);Tu(Ge,Lt);Lt.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Ge(t,e,r)};Lt.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Ge(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};Lt.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Ge(t)};Lt.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Hi.SlowBuffer(t)}});var Pr=w(Pu=>{"use strict";var ea=Au().Buffer,ku=ea.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 dm(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 pm(t){var e=dm(t);if(typeof e!="string"&&(ea.isEncoding===ku||!ku(t)))throw new Error("Unknown encoding: "+t);return e||t}Pu.StringDecoder=kr;function kr(t){this.encoding=pm(t);var e;switch(this.encoding){case"utf16le":this.text=vm,this.end=_m,e=4;break;case"utf8":this.fillLast=ym,e=4;break;case"base64":this.text=Sm,this.end=Em,e=3;break;default:this.write=Rm,this.end=xm;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=ea.allocUnsafe(e)}kr.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||""};kr.prototype.end=wm;kr.prototype.text=bm;kr.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 Xs(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function gm(t,e,r){var i=e.length-1;if(i<r)return 0;var n=Xs(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=Xs(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=Xs(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function mm(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function ym(t){var e=this.lastTotal-this.lastNeed,r=mm(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 bm(t,e){var r=gm(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 wm(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function vm(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function _m(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 Sm(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 Em(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function Rm(t){return t.toString(this.encoding)}function xm(t){return t&&t.length?this.write(t):""}});var Lu=w((HE,Cu)=>{"use strict";var Du=tr().codes.ERR_STREAM_PREMATURE_CLOSE;function Mm(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 Tm(){}function Om(t){return t.setHeader&&typeof t.abort=="function"}function qu(t,e,r){if(typeof e=="function")return qu(t,null,e);e||(e={}),r=Mm(r||Tm);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 Du),r.call(t,y);if(n&&!a)return(!t._writableState||!t._writableState.ended)&&(y=new Du),r.call(t,y)},d=function(){t.req.on("finish",o)};return Om(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)}}Cu.exports=qu});var Nu=w((GE,ju)=>{"use strict";var Gi;function ft(t,e,r){return e=Am(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Am(t){var e=km(t,"string");return typeof e=="symbol"?e:String(e)}function km(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 Pm=Lu(),ct=Symbol("lastResolve"),jt=Symbol("lastReject"),Dr=Symbol("error"),Vi=Symbol("ended"),Nt=Symbol("lastPromise"),ta=Symbol("handlePromise"),Ft=Symbol("stream");function ht(t,e){return{value:t,done:e}}function Dm(t){var e=t[ct];if(e!==null){var r=t[Ft].read();r!==null&&(t[Nt]=null,t[ct]=null,t[jt]=null,e(ht(r,!1)))}}function qm(t){process.nextTick(Dm,t)}function Cm(t,e){return function(r,i){t.then(function(){if(e[Vi]){r(ht(void 0,!0));return}e[ta](r,i)},i)}}var Lm=Object.getPrototypeOf(function(){}),jm=Object.setPrototypeOf((Gi={get stream(){return this[Ft]},next:function(){var e=this,r=this[Dr];if(r!==null)return Promise.reject(r);if(this[Vi])return Promise.resolve(ht(void 0,!0));if(this[Ft].destroyed)return new Promise(function(a,o){process.nextTick(function(){e[Dr]?o(e[Dr]):a(ht(void 0,!0))})});var i=this[Nt],n;if(i)n=new Promise(Cm(i,this));else{var s=this[Ft].read();if(s!==null)return Promise.resolve(ht(s,!1));n=new Promise(this[ta])}return this[Nt]=n,n}},ft(Gi,Symbol.asyncIterator,function(){return this}),ft(Gi,"return",function(){var e=this;return new Promise(function(r,i){e[Ft].destroy(null,function(n){if(n){i(n);return}r(ht(void 0,!0))})})}),Gi),Lm),Nm=function(e){var r,i=Object.create(jm,(r={},ft(r,Ft,{value:e,writable:!0}),ft(r,ct,{value:null,writable:!0}),ft(r,jt,{value:null,writable:!0}),ft(r,Dr,{value:null,writable:!0}),ft(r,Vi,{value:e._readableState.endEmitted,writable:!0}),ft(r,ta,{value:function(s,a){var o=i[Ft].read();o?(i[Nt]=null,i[ct]=null,i[jt]=null,s(ht(o,!1))):(i[ct]=s,i[jt]=a)},writable:!0}),r));return i[Nt]=null,Pm(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[jt];s!==null&&(i[Nt]=null,i[ct]=null,i[jt]=null,s(n)),i[Dr]=n;return}var a=i[ct];a!==null&&(i[Nt]=null,i[ct]=null,i[jt]=null,a(ht(void 0,!0))),i[Vi]=!0}),e.on("readable",qm.bind(null,i)),i};ju.exports=Nm});var Wu=w((VE,$u)=>{"use strict";function Fu(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 Fm(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function a(l){Fu(s,i,n,a,o,"next",l)}function o(l){Fu(s,i,n,a,o,"throw",l)}a(void 0)})}}function Iu(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 Im(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Iu(Object(r),!0).forEach(function(i){$m(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Iu(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function $m(t,e,r){return e=Wm(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Wm(t){var e=Bm(t,"string");return typeof e=="symbol"?e:String(e)}function Bm(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 Um=tr().codes.ERR_INVALID_ARG_TYPE;function zm(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 Um("iterable",["Iterable"],e);var n=new t(Im({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,a())};function a(){return o.apply(this,arguments)}function o(){return o=Fm(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}$u.exports=zm});var Qu=w((KE,Zu)=>{"use strict";Zu.exports=W;var rr;W.ReadableState=Hu;var YE=q("events").EventEmitter,zu=function(e,r){return e.listeners(r).length},Cr=zs(),Yi=q("buffer").Buffer,Hm=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Gm(t){return Yi.from(t)}function Vm(t){return Yi.isBuffer(t)||t instanceof Hm}var ra=q("util"),C;ra&&ra.debuglog?C=ra.debuglog("stream"):C=function(){};var Ym=Mu(),ua=Gs(),Km=Vs(),Jm=Km.getHighWaterMark,Ki=tr().codes,Zm=Ki.ERR_INVALID_ARG_TYPE,Qm=Ki.ERR_STREAM_PUSH_AFTER_EOF,Xm=Ki.ERR_METHOD_NOT_IMPLEMENTED,ey=Ki.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,ir,ia,na;tt()(W,Cr);var qr=ua.errorOrDestroy,sa=["error","close","destroy","pause","resume"];function ty(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 Hu(t,e,r){rr=rr||Lr(),t=t||{},typeof r!="boolean"&&(r=e instanceof rr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=Jm(this,t,"readableHighWaterMark",r),this.buffer=new Ym,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&&(ir||(ir=Pr().StringDecoder),this.decoder=new ir(t.encoding),this.encoding=t.encoding)}function W(t){if(rr=rr||Lr(),!(this instanceof W))return new W(t);var e=this instanceof rr;this._readableState=new Hu(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Cr.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=ua.destroy;W.prototype._undestroy=ua.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=Yi.from(t,e),e=""),i=!0),Gu(this,t,e,!1,i)};W.prototype.unshift=function(t){return Gu(this,t,null,!0,!1)};function Gu(t,e,r,i,n){C("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,ny(t,s);else{var a;if(n||(a=ry(s,e)),a)qr(t,a);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Yi.prototype&&(e=Gm(e)),i)s.endEmitted?qr(t,new ey):aa(t,s,e,!0);else if(s.ended)qr(t,new Qm);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?aa(t,s,e,!1):la(t,s)):aa(t,s,e,!1)}else i||(s.reading=!1,la(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function aa(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&&Ji(t)),la(t,e)}function ry(t,e){var r;return!Vm(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new Zm("chunk",["string","Buffer","Uint8Array"],e)),r}W.prototype.isPaused=function(){return this._readableState.flowing===!1};W.prototype.setEncoding=function(t){ir||(ir=Pr().StringDecoder);var e=new ir(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 Bu=1073741824;function iy(t){return t>=Bu?t=Bu:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Uu(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=iy(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}W.prototype.read=function(t){C("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return C("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?oa(this):Ji(this),null;if(t=Uu(t,e),t===0&&e.ended)return e.length===0&&oa(this),null;var i=e.needReadable;C("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,C("length less than watermark",i)),e.ended||e.reading?(i=!1,C("reading or ended",i)):i&&(C("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Uu(r,e)));var n;return t>0?n=Ku(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&&oa(this)),n!==null&&this.emit("data",n),n};function ny(t,e){if(C("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?Ji(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Vu(t)))}}function Ji(t){var e=t._readableState;C("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(C("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(Vu,t))}function Vu(t){var e=t._readableState;C("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,fa(t)}function la(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(sy,t,e))}function sy(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(C("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}W.prototype._read=function(t){qr(this,new Xm("_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,C("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?o:b;i.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",a);function a(_,E){C("onunpipe"),_===r&&E&&E.hasUnpiped===!1&&(E.hasUnpiped=!0,c())}function o(){C("onend"),t.end()}var l=ay(r);t.on("drain",l);var u=!1;function c(){C("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(_){C("ondata");var E=t.write(_);C("dest.write",E),E===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&Ju(i.pipes,t)!==-1)&&!u&&(C("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(_){C("onerror",_),b(),t.removeListener("error",d),zu(t,"error")===0&&qr(t,_)}ty(t,"error",d);function f(){t.removeListener("finish",y),b()}t.once("close",f);function y(){C("onfinish"),t.removeListener("close",f),b()}t.once("finish",y);function b(){C("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(C("pipe resume"),r.resume()),t};function ay(t){return function(){var r=t._readableState;C("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&zu(t,"data")&&(r.flowing=!0,fa(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=Ju(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=Cr.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,C("on readable",i.length,i.reading),i.length?Ji(this):i.reading||process.nextTick(oy,this)),r};W.prototype.addListener=W.prototype.on;W.prototype.removeListener=function(t,e){var r=Cr.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Yu,this),r};W.prototype.removeAllListeners=function(t){var e=Cr.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Yu,this),e};function Yu(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 oy(t){C("readable nexttick read 0"),t.read(0)}W.prototype.resume=function(){var t=this._readableState;return t.flowing||(C("resume"),t.flowing=!t.readableListening,ly(this,t)),t.paused=!1,this};function ly(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(uy,t,e))}function uy(t,e){C("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),fa(t),e.flowing&&!e.reading&&t.read(0)}W.prototype.pause=function(){return C("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(C("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function fa(t){var e=t._readableState;for(C("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(C("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&e.push(a)}e.push(null)}),t.on("data",function(a){if(C("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var o=e.push(a);o||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=function(o){return function(){return t[o].apply(t,arguments)}}(n));for(var s=0;s<sa.length;s++)t.on(sa[s],this.emit.bind(this,sa[s]));return this._read=function(a){C("wrapped _read",a),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(W.prototype[Symbol.asyncIterator]=function(){return ia===void 0&&(ia=Nu()),ia(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=Ku;Object.defineProperty(W.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Ku(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 oa(t){var e=t._readableState;C("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(fy,e,t))}function fy(t,e){if(C("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(W.from=function(t,e){return na===void 0&&(na=Wu()),na(W,t,e)});function Ju(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Lr=w((JE,ef)=>{"use strict";var cy=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};ef.exports=Ve;var Xu=Qu(),ha=da();tt()(Ve,Xu);for(ca=cy(ha.prototype),Zi=0;Zi<ca.length;Zi++)Qi=ca[Zi],Ve.prototype[Qi]||(Ve.prototype[Qi]=ha.prototype[Qi]);var ca,Qi,Zi;function Ve(t){if(!(this instanceof Ve))return new Ve(t);Xu.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",hy)))}Object.defineProperty(Ve.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Ve.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Ve.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function hy(){this._writableState.ended||process.nextTick(dy,this)}function dy(t){t.end()}Object.defineProperty(Ve.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var da=w((ZE,of)=>{"use strict";of.exports=V;function rf(t){var e=this;this.next=null,this.entry=null,this.finish=function(){$y(e,t)}}var nr;V.WritableState=Nr;var py={deprecate:Us()},nf=zs(),en=q("buffer").Buffer,gy=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function my(t){return en.from(t)}function yy(t){return en.isBuffer(t)||t instanceof gy}var ga=Gs(),by=Vs(),wy=by.getHighWaterMark,dt=tr().codes,vy=dt.ERR_INVALID_ARG_TYPE,_y=dt.ERR_METHOD_NOT_IMPLEMENTED,Sy=dt.ERR_MULTIPLE_CALLBACK,Ey=dt.ERR_STREAM_CANNOT_PIPE,Ry=dt.ERR_STREAM_DESTROYED,xy=dt.ERR_STREAM_NULL_VALUES,My=dt.ERR_STREAM_WRITE_AFTER_END,Ty=dt.ERR_UNKNOWN_ENCODING,sr=ga.errorOrDestroy;tt()(V,nf);function Oy(){}function Nr(t,e,r){nr=nr||Lr(),t=t||{},typeof r!="boolean"&&(r=e instanceof nr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=wy(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){Ly(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 rf(this)}Nr.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Nr.prototype,"buffer",{get:py.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Xi;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Xi=Function.prototype[Symbol.hasInstance],Object.defineProperty(V,Symbol.hasInstance,{value:function(e){return Xi.call(this,e)?!0:this!==V?!1:e&&e._writableState instanceof Nr}})):Xi=function(e){return e instanceof this};function V(t){nr=nr||Lr();var e=this instanceof nr;if(!e&&!Xi.call(V,this))return new V(t);this._writableState=new Nr(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)),nf.call(this)}V.prototype.pipe=function(){sr(this,new Ey)};function Ay(t,e){var r=new My;sr(t,r),process.nextTick(e,r)}function ky(t,e,r,i){var n;return r===null?n=new xy:typeof r!="string"&&!e.objectMode&&(n=new vy("chunk",["string","Buffer"],r)),n?(sr(t,n),process.nextTick(i,n),!1):!0}V.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&yy(t);return s&&!en.isBuffer(t)&&(t=my(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=Oy),i.ending?Ay(this,r):(s||ky(this,i,t,r))&&(i.pendingcb++,n=Dy(this,i,s,t,e,r)),n};V.prototype.cork=function(){this._writableState.corked++};V.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&sf(this,t))};V.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new Ty(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(V.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Py(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=en.from(e,r)),e}Object.defineProperty(V.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function Dy(t,e,r,i,n,s){if(!r){var a=Py(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 pa(t,e,!1,o,i,n,s);return l}function pa(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new Ry("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function qy(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(jr,t,e),t._writableState.errorEmitted=!0,sr(t,i)):(n(i),t._writableState.errorEmitted=!0,sr(t,i),jr(t,e))}function Cy(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function Ly(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new Sy;if(Cy(r),e)qy(t,r,i,e,n);else{var s=af(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&sf(t,r),i?process.nextTick(tf,t,r,s,n):tf(t,r,s,n)}}function tf(t,e,r,i){r||jy(t,e),e.pendingcb--,i(),jr(t,e)}function jy(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function sf(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,pa(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 rf(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,h=e.objectMode?1:l.length;if(pa(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}V.prototype._write=function(t,e,r){r(new _y("_write()"))};V.prototype._writev=null;V.prototype.end=function(t,e,r){var i=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||Iy(this,i,r),this};Object.defineProperty(V.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function af(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function Ny(t,e){t._final(function(r){e.pendingcb--,r&&sr(t,r),e.prefinished=!0,t.emit("prefinish"),jr(t,e)})}function Fy(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(Ny,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function jr(t,e){var r=af(e);if(r&&(Fy(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 Iy(t,e,r){e.ending=!0,jr(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function $y(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(V.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});V.prototype.destroy=ga.destroy;V.prototype._undestroy=ga.undestroy;V.prototype._destroy=function(t,e){e(t)}});var ma=w((QE,ff)=>{"use strict";var Wy=q("util"),lf=da(),{LEVEL:uf}=te(),Fr=ff.exports=function(e={}){lf.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())})};Wy.inherits(Fr,lf);Fr.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[uf]]){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)};Fr.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)};Fr.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[uf]])&&(this.handleExceptions||r.exception!==!0))};Fr.prototype._nop=function(){}});var ba=w((XE,hf)=>{"use strict";var By=q("util"),{LEVEL:ya}=te(),cf=ma(),Ir=hf.exports=function(e={}){if(cf.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))};By.inherits(Ir,cf);Ir.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[ya]])&&this.transport.log(e[ya],e.message,e,this._nop),i(null)};Ir.prototype._writev=function(e,r){for(let i=0;i<e.length;i++)this._accept(e[i])&&(this.transport.log(e[i].chunk[ya],e[i].chunk.message,e[i].chunk,this._nop),e[i].callback());return r(null)};Ir.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(`
31
+ `))};Ir.prototype.close=function(){this.transport.close&&this.transport.close(),this.transport.__winstonError&&(this.transport.removeListener("error",this.transport.__winstonError),this.transport.__winstonError=null)}});var ar=w((e2,wa)=>{"use strict";wa.exports=ma();wa.exports.LegacyTransportStream=ba()});var gf=w((r2,pf)=>{"use strict";var Uy=q("os"),{LEVEL:df,MESSAGE:or}=te(),zy=ar();pf.exports=class extends zy{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:Uy.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[df]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[or]}${this.eol}`):this._consoleError(e[or]),r&&r();return}else if(this.consoleWarnLevels[e[df]]){console._stderr&&!this.forceConsole?console._stderr.write(`${e[or]}${this.eol}`):this._consoleWarn(e[or]),r&&r();return}console._stdout&&!this.forceConsole?console._stdout.write(`${e[or]}${this.eol}`):this._consoleLog(e[or]),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 rn=w((tn,mf)=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.default=Hy;function Hy(t){return t&&typeof t.length=="number"&&t.length>=0&&t.length%1===0}mf.exports=tn.default});var bf=w((nn,yf)=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.default=function(t){return function(...e){var r=e.pop();return t.call(this,e,r)}};yf.exports=nn.default});var _f=w(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.fallback=wf;pt.wrap=vf;var Gy=pt.hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,Vy=pt.hasSetImmediate=typeof setImmediate=="function"&&setImmediate,Yy=pt.hasNextTick=typeof process=="object"&&typeof process.nextTick=="function";function wf(t){setTimeout(t,0)}function vf(t){return(e,...r)=>t(()=>e(...r))}var $r;Gy?$r=queueMicrotask:Vy?$r=setImmediate:Yy?$r=process.nextTick:$r=wf;pt.default=vf($r)});var Mf=w((sn,xf)=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.default=eb;var Ky=bf(),Jy=Rf(Ky),Zy=_f(),Qy=Rf(Zy),Xy=It();function Rf(t){return t&&t.__esModule?t:{default:t}}function eb(t){return(0,Xy.isAsync)(t)?function(...e){let r=e.pop(),i=t.apply(this,e);return Sf(i,r)}:(0,Jy.default)(function(e,r){var i;try{i=t.apply(this,e)}catch(n){return r(n)}if(i&&typeof i.then=="function")return Sf(i,r);r(null,i)})}function Sf(t,e){return t.then(r=>{Ef(e,null,r)},r=>{Ef(e,r&&(r instanceof Error||r.message)?r:new Error(r))})}function Ef(t,e,r){try{t(e,r)}catch(i){(0,Qy.default)(n=>{throw n},i)}}xf.exports=sn.default});var It=w(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.isAsyncIterable=rt.isAsyncGenerator=rt.isAsync=void 0;var tb=Mf(),rb=ib(tb);function ib(t){return t&&t.__esModule?t:{default:t}}function Tf(t){return t[Symbol.toStringTag]==="AsyncFunction"}function nb(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function sb(t){return typeof t[Symbol.asyncIterator]=="function"}function ab(t){if(typeof t!="function")throw new Error("expected a function");return Tf(t)?(0,rb.default)(t):t}rt.default=ab;rt.isAsync=Tf;rt.isAsyncGenerator=nb;rt.isAsyncIterable=sb});var lr=w((an,Of)=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.default=ob;function ob(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}Of.exports=an.default});var kf=w((on,Af)=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});var lb=rn(),ub=va(lb),fb=It(),cb=va(fb),hb=lr(),db=va(hb);function va(t){return t&&t.__esModule?t:{default:t}}on.default=(0,db.default)((t,e,r)=>{var i=(0,ub.default)(e)?[]:{};t(e,(n,s,a)=>{(0,cb.default)(n)((o,...l)=>{l.length<2&&([l]=l),i[s]=l,a(o)})},n=>r(n,i))},3);Af.exports=on.default});var _a=w((ln,Pf)=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.default=pb;function pb(t){function e(...r){if(t!==null){var i=t;t=null,i.apply(this,r)}}return Object.assign(e,t),e}Pf.exports=ln.default});var qf=w((un,Df)=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.default=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()};Df.exports=un.default});var jf=w((fn,Lf)=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.default=Sb;var gb=rn(),mb=Cf(gb),yb=qf(),bb=Cf(yb);function Cf(t){return t&&t.__esModule?t:{default:t}}function wb(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}function vb(t){var e=-1;return function(){var i=t.next();return i.done?null:(e++,{value:i.value,key:e})}}function _b(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 Sb(t){if((0,mb.default)(t))return wb(t);var e=(0,bb.default)(t);return e?vb(e):_b(t)}Lf.exports=fn.default});var Sa=w((cn,Nf)=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.default=Eb;function Eb(t){return function(...e){if(t===null)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}Nf.exports=cn.default});var dn=w((hn,Ff)=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});var Rb={};hn.default=Rb;Ff.exports=hn.default});var $f=w((pn,If)=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.default=Ob;var xb=dn(),Mb=Tb(xb);function Tb(t){return t&&t.__esModule?t:{default:t}}function Ob(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===Mb.default||n&&o<=0)return n=!0,i(null);u()}}function h(d){s||(a=!1,n=!0,i(d))}u()}If.exports=pn.default});var zf=w((gn,Uf)=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});var Ab=_a(),kb=Wr(Ab),Pb=jf(),Db=Wr(Pb),qb=Sa(),Cb=Wr(qb),Wf=It(),Lb=$f(),Bf=Wr(Lb),jb=dn(),Nb=Wr(jb);function Wr(t){return t&&t.__esModule?t:{default:t}}gn.default=t=>(e,r,i)=>{if(i=(0,kb.default)(i),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return i(null);if((0,Wf.isAsyncGenerator)(e))return(0,Bf.default)(e,t,r,i);if((0,Wf.isAsyncIterable)(e))return(0,Bf.default)(e[Symbol.asyncIterator](),t,r,i);var n=(0,Db.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===Nb.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,Cb.default)(u))}l=!1}c()};Uf.exports=gn.default});var Ra=w((mn,Hf)=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});var Fb=zf(),Ib=Ea(Fb),$b=It(),Wb=Ea($b),Bb=lr(),Ub=Ea(Bb);function Ea(t){return t&&t.__esModule?t:{default:t}}function zb(t,e,r,i){return(0,Ib.default)(e)(t,(0,Wb.default)(r),i)}mn.default=(0,Ub.default)(zb,4);Hf.exports=mn.default});var Yf=w((yn,Vf)=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});var Hb=Ra(),Gb=Gf(Hb),Vb=lr(),Yb=Gf(Vb);function Gf(t){return t&&t.__esModule?t:{default:t}}function Kb(t,e,r){return(0,Gb.default)(t,1,e,r)}yn.default=(0,Yb.default)(Kb,3);Vf.exports=yn.default});var Zf=w((bn,Jf)=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.default=e0;var Jb=kf(),Zb=Kf(Jb),Qb=Yf(),Xb=Kf(Qb);function Kf(t){return t&&t.__esModule?t:{default:t}}function e0(t,e){return(0,Zb.default)(Xb.default,t,e)}Jf.exports=bn.default});var xa=w((s2,Qf)=>{Qf.exports=q("stream")});var nc=w((a2,ic)=>{"use strict";function Xf(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 ec(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Xf(Object(r),!0).forEach(function(i){t0(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xf(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function t0(t,e,r){return e=rc(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function r0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tc(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,rc(i.key),i)}}function i0(t,e,r){return e&&tc(t.prototype,e),r&&tc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function rc(t){var e=n0(t,"string");return typeof e=="symbol"?e:String(e)}function n0(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 s0=q("buffer"),wn=s0.Buffer,a0=q("util"),Ma=a0.inspect,o0=Ma&&Ma.custom||"inspect";function l0(t,e,r){wn.prototype.copy.call(t,e,r)}ic.exports=function(){function t(){r0(this,t),this.head=null,this.tail=null,this.length=0}return i0(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 wn.alloc(0);for(var i=wn.allocUnsafe(r>>>0),n=this.head,s=0;n;)l0(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=wn.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:o0,value:function(r,i){return Ma(this,ec(ec({},i),{},{depth:0,customInspect:!1}))}}]),t}()});var Oa=w((o2,ac)=>{"use strict";function u0(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(Ta,this,t)):process.nextTick(Ta,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(vn,r):(r._writableState.errorEmitted=!0,process.nextTick(sc,r,s)):process.nextTick(sc,r,s):e?(process.nextTick(vn,r),e(s)):process.nextTick(vn,r)}),this)}function sc(t,e){Ta(t,e),vn(t)}function vn(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function f0(){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 Ta(t,e){t.emit("error",e)}function c0(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}ac.exports={destroy:u0,undestroy:f0,errorOrDestroy:c0}});var gt=w((l2,uc)=>{"use strict";var lc={};function qe(t,e,r){r||(r=Error);function i(s,a,o){return typeof e=="string"?e:e(s,a,o)}class n extends r{constructor(a,o,l){super(i(a,o,l))}}n.prototype.name=r.name,n.prototype.code=t,lc[t]=n}function oc(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 h0(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function d0(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function p0(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}qe("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);qe("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&h0(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(d0(t," argument"))n=`The ${t} ${i} ${oc(e,"type")}`;else{let s=p0(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${oc(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);qe("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");qe("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});qe("ERR_STREAM_PREMATURE_CLOSE","Premature close");qe("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});qe("ERR_MULTIPLE_CALLBACK","Callback called multiple times");qe("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");qe("ERR_STREAM_WRITE_AFTER_END","write after end");qe("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);qe("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);qe("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");uc.exports.codes=lc});var Aa=w((u2,fc)=>{"use strict";var g0=gt().codes.ERR_INVALID_OPT_VALUE;function m0(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function y0(t,e,r,i){var n=m0(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new g0(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}fc.exports={getHighWaterMark:y0}});var Da=w((f2,mc)=>{"use strict";mc.exports=Y;function hc(t){var e=this;this.next=null,this.entry=null,this.finish=function(){z0(e,t)}}var ur;Y.WritableState=Ur;var b0={deprecate:Us()},dc=xa(),Sn=q("buffer").Buffer,w0=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function v0(t){return Sn.from(t)}function _0(t){return Sn.isBuffer(t)||t instanceof w0}var Pa=Oa(),S0=Aa(),E0=S0.getHighWaterMark,mt=gt().codes,R0=mt.ERR_INVALID_ARG_TYPE,x0=mt.ERR_METHOD_NOT_IMPLEMENTED,M0=mt.ERR_MULTIPLE_CALLBACK,T0=mt.ERR_STREAM_CANNOT_PIPE,O0=mt.ERR_STREAM_DESTROYED,A0=mt.ERR_STREAM_NULL_VALUES,k0=mt.ERR_STREAM_WRITE_AFTER_END,P0=mt.ERR_UNKNOWN_ENCODING,fr=Pa.errorOrDestroy;tt()(Y,dc);function D0(){}function Ur(t,e,r){ur=ur||$t(),t=t||{},typeof r!="boolean"&&(r=e instanceof ur),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=E0(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){I0(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 hc(this)}Ur.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Ur.prototype,"buffer",{get:b0.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var _n;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(_n=Function.prototype[Symbol.hasInstance],Object.defineProperty(Y,Symbol.hasInstance,{value:function(e){return _n.call(this,e)?!0:this!==Y?!1:e&&e._writableState instanceof Ur}})):_n=function(e){return e instanceof this};function Y(t){ur=ur||$t();var e=this instanceof ur;if(!e&&!_n.call(Y,this))return new Y(t);this._writableState=new Ur(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)),dc.call(this)}Y.prototype.pipe=function(){fr(this,new T0)};function q0(t,e){var r=new k0;fr(t,r),process.nextTick(e,r)}function C0(t,e,r,i){var n;return r===null?n=new A0:typeof r!="string"&&!e.objectMode&&(n=new R0("chunk",["string","Buffer"],r)),n?(fr(t,n),process.nextTick(i,n),!1):!0}Y.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&_0(t);return s&&!Sn.isBuffer(t)&&(t=v0(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=D0),i.ending?q0(this,r):(s||C0(this,i,t,r))&&(i.pendingcb++,n=j0(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&&pc(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 P0(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Y.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function L0(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Sn.from(e,r)),e}Object.defineProperty(Y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function j0(t,e,r,i,n,s){if(!r){var a=L0(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 ka(t,e,!1,o,i,n,s);return l}function ka(t,e,r,i,n,s,a){e.writelen=i,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new O0("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function N0(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(Br,t,e),t._writableState.errorEmitted=!0,fr(t,i)):(n(i),t._writableState.errorEmitted=!0,fr(t,i),Br(t,e))}function F0(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function I0(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new M0;if(F0(r),e)N0(t,r,i,e,n);else{var s=gc(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&pc(t,r),i?process.nextTick(cc,t,r,s,n):cc(t,r,s,n)}}function cc(t,e,r,i){r||$0(t,e),e.pendingcb--,i(),Br(t,e)}function $0(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function pc(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,ka(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 hc(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,c=r.callback,h=e.objectMode?1:l.length;if(ka(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 x0("_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||U0(this,i,r),this};Object.defineProperty(Y.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function gc(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function W0(t,e){t._final(function(r){e.pendingcb--,r&&fr(t,r),e.prefinished=!0,t.emit("prefinish"),Br(t,e)})}function B0(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(W0,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Br(t,e){var r=gc(e);if(r&&(B0(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 U0(t,e,r){e.ending=!0,Br(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function z0(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=Pa.destroy;Y.prototype._undestroy=Pa.undestroy;Y.prototype._destroy=function(t,e){e(t)}});var $t=w((c2,bc)=>{"use strict";var H0=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};bc.exports=Ye;var yc=La(),Ca=Da();tt()(Ye,yc);for(qa=H0(Ca.prototype),En=0;En<qa.length;En++)Rn=qa[En],Ye.prototype[Rn]||(Ye.prototype[Rn]=Ca.prototype[Rn]);var qa,Rn,En;function Ye(t){if(!(this instanceof Ye))return new Ye(t);yc.call(this,t),Ca.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",G0)))}Object.defineProperty(Ye.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Ye.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Ye.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function G0(){this._writableState.ended||process.nextTick(V0,this)}function V0(t){t.end()}Object.defineProperty(Ye.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var xn=w((h2,_c)=>{"use strict";var wc=gt().codes.ERR_STREAM_PREMATURE_CLOSE;function Y0(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 K0(){}function J0(t){return t.setHeader&&typeof t.abort=="function"}function vc(t,e,r){if(typeof e=="function")return vc(t,null,e);e||(e={}),r=Y0(r||K0);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 wc),r.call(t,y);if(n&&!a)return(!t._writableState||!t._writableState.ended)&&(y=new wc),r.call(t,y)},d=function(){t.req.on("finish",o)};return J0(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)}}_c.exports=vc});var Ec=w((d2,Sc)=>{"use strict";var Mn;function yt(t,e,r){return e=Z0(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Z0(t){var e=Q0(t,"string");return typeof e=="symbol"?e:String(e)}function Q0(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 X0=xn(),bt=Symbol("lastResolve"),Wt=Symbol("lastReject"),zr=Symbol("error"),Tn=Symbol("ended"),Bt=Symbol("lastPromise"),ja=Symbol("handlePromise"),Ut=Symbol("stream");function wt(t,e){return{value:t,done:e}}function ew(t){var e=t[bt];if(e!==null){var r=t[Ut].read();r!==null&&(t[Bt]=null,t[bt]=null,t[Wt]=null,e(wt(r,!1)))}}function tw(t){process.nextTick(ew,t)}function rw(t,e){return function(r,i){t.then(function(){if(e[Tn]){r(wt(void 0,!0));return}e[ja](r,i)},i)}}var iw=Object.getPrototypeOf(function(){}),nw=Object.setPrototypeOf((Mn={get stream(){return this[Ut]},next:function(){var e=this,r=this[zr];if(r!==null)return Promise.reject(r);if(this[Tn])return Promise.resolve(wt(void 0,!0));if(this[Ut].destroyed)return new Promise(function(a,o){process.nextTick(function(){e[zr]?o(e[zr]):a(wt(void 0,!0))})});var i=this[Bt],n;if(i)n=new Promise(rw(i,this));else{var s=this[Ut].read();if(s!==null)return Promise.resolve(wt(s,!1));n=new Promise(this[ja])}return this[Bt]=n,n}},yt(Mn,Symbol.asyncIterator,function(){return this}),yt(Mn,"return",function(){var e=this;return new Promise(function(r,i){e[Ut].destroy(null,function(n){if(n){i(n);return}r(wt(void 0,!0))})})}),Mn),iw),sw=function(e){var r,i=Object.create(nw,(r={},yt(r,Ut,{value:e,writable:!0}),yt(r,bt,{value:null,writable:!0}),yt(r,Wt,{value:null,writable:!0}),yt(r,zr,{value:null,writable:!0}),yt(r,Tn,{value:e._readableState.endEmitted,writable:!0}),yt(r,ja,{value:function(s,a){var o=i[Ut].read();o?(i[Bt]=null,i[bt]=null,i[Wt]=null,s(wt(o,!1))):(i[bt]=s,i[Wt]=a)},writable:!0}),r));return i[Bt]=null,X0(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[Wt];s!==null&&(i[Bt]=null,i[bt]=null,i[Wt]=null,s(n)),i[zr]=n;return}var a=i[bt];a!==null&&(i[Bt]=null,i[bt]=null,i[Wt]=null,a(wt(void 0,!0))),i[Tn]=!0}),e.on("readable",tw.bind(null,i)),i};Sc.exports=sw});var Tc=w((p2,Mc)=>{"use strict";function Rc(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 aw(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function a(l){Rc(s,i,n,a,o,"next",l)}function o(l){Rc(s,i,n,a,o,"throw",l)}a(void 0)})}}function xc(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 ow(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?xc(Object(r),!0).forEach(function(i){lw(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xc(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function lw(t,e,r){return e=uw(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function uw(t){var e=fw(t,"string");return typeof e=="symbol"?e:String(e)}function fw(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 cw=gt().codes.ERR_INVALID_ARG_TYPE;function hw(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 cw("iterable",["Iterable"],e);var n=new t(ow({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,a())};function a(){return o.apply(this,arguments)}function o(){return o=aw(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}Mc.exports=hw});var La=w((m2,Nc)=>{"use strict";Nc.exports=B;var cr;B.ReadableState=Pc;var g2=q("events").EventEmitter,kc=function(e,r){return e.listeners(r).length},Gr=xa(),On=q("buffer").Buffer,dw=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function pw(t){return On.from(t)}function gw(t){return On.isBuffer(t)||t instanceof dw}var Na=q("util"),L;Na&&Na.debuglog?L=Na.debuglog("stream"):L=function(){};var mw=nc(),za=Oa(),yw=Aa(),bw=yw.getHighWaterMark,An=gt().codes,ww=An.ERR_INVALID_ARG_TYPE,vw=An.ERR_STREAM_PUSH_AFTER_EOF,_w=An.ERR_METHOD_NOT_IMPLEMENTED,Sw=An.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,hr,Fa,Ia;tt()(B,Gr);var Hr=za.errorOrDestroy,$a=["error","close","destroy","pause","resume"];function Ew(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 Pc(t,e,r){cr=cr||$t(),t=t||{},typeof r!="boolean"&&(r=e instanceof cr),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=bw(this,t,"readableHighWaterMark",r),this.buffer=new mw,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&&(hr||(hr=Pr().StringDecoder),this.decoder=new hr(t.encoding),this.encoding=t.encoding)}function B(t){if(cr=cr||$t(),!(this instanceof B))return new B(t);var e=this instanceof cr;this._readableState=new Pc(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Gr.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=za.destroy;B.prototype._undestroy=za.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=On.from(t,e),e=""),i=!0),Dc(this,t,e,!1,i)};B.prototype.unshift=function(t){return Dc(this,t,null,!0,!1)};function Dc(t,e,r,i,n){L("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,Mw(t,s);else{var a;if(n||(a=Rw(s,e)),a)Hr(t,a);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==On.prototype&&(e=pw(e)),i)s.endEmitted?Hr(t,new Sw):Wa(t,s,e,!0);else if(s.ended)Hr(t,new vw);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?Wa(t,s,e,!1):Ua(t,s)):Wa(t,s,e,!1)}else i||(s.reading=!1,Ua(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function Wa(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&&kn(t)),Ua(t,e)}function Rw(t,e){var r;return!gw(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new ww("chunk",["string","Buffer","Uint8Array"],e)),r}B.prototype.isPaused=function(){return this._readableState.flowing===!1};B.prototype.setEncoding=function(t){hr||(hr=Pr().StringDecoder);var e=new hr(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 Oc=1073741824;function xw(t){return t>=Oc?t=Oc:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Ac(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=xw(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}B.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?Ba(this):kn(this),null;if(t=Ac(t,e),t===0&&e.ended)return e.length===0&&Ba(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=Ac(r,e)));var n;return t>0?n=Lc(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&Ba(this)),n!==null&&this.emit("data",n),n};function Mw(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?kn(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,qc(t)))}}function kn(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(qc,t))}function qc(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,Ha(t)}function Ua(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(Tw,t,e))}function Tw(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}B.prototype._read=function(t){Hr(this,new _w("_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,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=Ow(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&&jc(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),kc(t,"error")===0&&Hr(t,_)}Ew(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 Ow(t){return function(){var r=t._readableState;L("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&kc(t,"data")&&(r.flowing=!0,Ha(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=jc(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=Gr.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?kn(this):i.reading||process.nextTick(Aw,this)),r};B.prototype.addListener=B.prototype.on;B.prototype.removeListener=function(t,e){var r=Gr.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Cc,this),r};B.prototype.removeAllListeners=function(t){var e=Gr.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Cc,this),e};function Cc(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 Aw(t){L("readable nexttick read 0"),t.read(0)}B.prototype.resume=function(){var t=this._readableState;return t.flowing||(L("resume"),t.flowing=!t.readableListening,kw(this,t)),t.paused=!1,this};function kw(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(Pw,t,e))}function Pw(t,e){L("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),Ha(t),e.flowing&&!e.reading&&t.read(0)}B.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 Ha(t){var e=t._readableState;for(L("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(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<$a.length;s++)t.on($a[s],this.emit.bind(this,$a[s]));return this._read=function(a){L("wrapped _read",a),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(B.prototype[Symbol.asyncIterator]=function(){return Fa===void 0&&(Fa=Ec()),Fa(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=Lc;Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Lc(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function Ba(t){var e=t._readableState;L("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(Dw,e,t))}function Dw(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"&&(B.from=function(t,e){return Ia===void 0&&(Ia=Tc()),Ia(B,t,e)});function jc(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Ga=w((y2,Ic)=>{"use strict";Ic.exports=it;var Pn=gt().codes,qw=Pn.ERR_METHOD_NOT_IMPLEMENTED,Cw=Pn.ERR_MULTIPLE_CALLBACK,Lw=Pn.ERR_TRANSFORM_ALREADY_TRANSFORMING,jw=Pn.ERR_TRANSFORM_WITH_LENGTH_0,Dn=$t();tt()(it,Dn);function Nw(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new Cw);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 it(t){if(!(this instanceof it))return new it(t);Dn.call(this,t),this._transformState={afterTransform:Nw.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",Fw)}function Fw(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){Fc(t,e,r)}):Fc(this,null,null)}it.prototype.push=function(t,e){return this._transformState.needTransform=!1,Dn.prototype.push.call(this,t,e)};it.prototype._transform=function(t,e,r){r(new qw("_transform()"))};it.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)}};it.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};it.prototype._destroy=function(t,e){Dn.prototype._destroy.call(this,t,function(r){e(r)})};function Fc(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new jw;if(t._transformState.transforming)throw new Lw;return t.push(null)}});var Bc=w((b2,Wc)=>{"use strict";Wc.exports=Vr;var $c=Ga();tt()(Vr,$c);function Vr(t){if(!(this instanceof Vr))return new Vr(t);$c.call(this,t)}Vr.prototype._transform=function(t,e,r){r(null,t)}});var Vc=w((w2,Gc)=>{"use strict";var Va;function Iw(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var Hc=gt().codes,$w=Hc.ERR_MISSING_ARGS,Ww=Hc.ERR_STREAM_DESTROYED;function Uc(t){if(t)throw t}function Bw(t){return t.setHeader&&typeof t.abort=="function"}function Uw(t,e,r,i){i=Iw(i);var n=!1;t.on("close",function(){n=!0}),Va===void 0&&(Va=xn()),Va(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,Bw(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(a||new Ww("pipe"))}}}function zc(t){t()}function zw(t,e){return t.pipe(e)}function Hw(t){return!t.length||typeof t[t.length-1]!="function"?Uc:t.pop()}function Gw(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=Hw(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new $w("streams");var n,s=e.map(function(a,o){var l=o<e.length-1,u=o>0;return Uw(a,l,u,function(c){n||(n=c),c&&s.forEach(zc),!l&&(s.forEach(zc),i(n))})});return e.reduce(zw)}Gc.exports=Gw});var zt=w((Ce,Kr)=>{var Yr=q("stream");process.env.READABLE_STREAM==="disable"&&Yr?(Kr.exports=Yr.Readable,Object.assign(Kr.exports,Yr),Kr.exports.Stream=Yr):(Ce=Kr.exports=La(),Ce.Stream=Yr||Ce,Ce.Readable=Ce,Ce.Writable=Da(),Ce.Duplex=$t(),Ce.Transform=Ga(),Ce.PassThrough=Bc(),Ce.finished=xn(),Ce.pipeline=Vc())});var eo=w((v2,Kc)=>{var dr=[],Jr=[],Ya=function(){};function Ja(t){return~dr.indexOf(t)?!1:(dr.push(t),!0)}function Za(t){Ya=t}function Vw(t){for(var e=[],r=0;r<dr.length;r++){if(dr[r].async){e.push(dr[r]);continue}if(dr[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 Qa(t){return~Jr.indexOf(t)?!1:(Jr.push(t),!0)}function Ka(){Ya.apply(Ya,arguments)}function Yc(t){for(var e=0;e<Jr.length;e++)t=Jr[e].apply(Jr[e],arguments);return t}function Xa(t,e){var r=Object.prototype.hasOwnProperty;for(var i in e)r.call(e,i)&&(t[i]=e[i]);return t}function Yw(t){return t.enabled=!1,t.modify=Qa,t.set=Za,t.use=Ja,Xa(function(){return!1},t)}function Kw(t){function e(){var r=Array.prototype.slice.call(arguments,0);return Ka.call(Ka,t,Yc(r,t)),!0}return t.enabled=!0,t.modify=Qa,t.set=Za,t.use=Ja,Xa(e,t)}Kc.exports=function(e){return e.introduce=Xa,e.enabled=Vw,e.process=Yc,e.modify=Qa,e.write=Ka,e.nope=Yw,e.yep=Kw,e.set=Za,e.use=Ja,e}});var Zc=w((_2,Jc)=>{var Jw=eo(),Zw=Jw(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)});Jc.exports=Zw});var Xc=w((S2,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 th=w((E2,eh)=>{eh.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 nh=w((R2,ih)=>{"use strict";var Qw=th(),Xw=Array.prototype.concat,ev=Array.prototype.slice,rh=ih.exports=function(e){for(var r=[],i=0,n=e.length;i<n;i++){var s=e[i];Qw(s)?r=Xw.call(r,ev.call(s)):r.push(s)}return r};rh.wrap=function(t){return function(){return t(rh(arguments))}}});var lh=w((x2,oh)=>{var Zr=Xc(),Qr=nh(),sh=Object.hasOwnProperty,ah=Object.create(null);for(qn in Zr)sh.call(Zr,qn)&&(ah[Zr[qn]]=qn);var qn,Me=oh.exports={to:{},get:{}};Me.get=function(t){var e=t.substring(0,3).toLowerCase(),r,i;switch(e){case"hsl":r=Me.get.hsl(t),i="hsl";break;case"hwb":r=Me.get.hwb(t),i="hwb";break;default:r=Me.get.rgb(t),i="rgb";break}return r?{model:i,value:r}:null};Me.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]:sh.call(Zr,o[1])?(a=Zr[o[1]],a[3]=1,a):null:null;for(l=0;l<3;l++)a[l]=vt(a[l],0,255);return a[3]=vt(a[3],0,1),a};Me.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=vt(parseFloat(r[2]),0,100),a=vt(parseFloat(r[3]),0,100),o=vt(isNaN(i)?1:i,0,1);return[n,s,a,o]}return null};Me.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=vt(parseFloat(r[2]),0,100),a=vt(parseFloat(r[3]),0,100),o=vt(isNaN(i)?1:i,0,1);return[n,s,a,o]}return null};Me.to.hex=function(){var t=Qr(arguments);return"#"+Cn(t[0])+Cn(t[1])+Cn(t[2])+(t[3]<1?Cn(Math.round(t[3]*255)):"")};Me.to.rgb=function(){var t=Qr(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]+")"};Me.to.rgb.percent=function(){var t=Qr(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]+")"};Me.to.hsl=function(){var t=Qr(arguments);return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};Me.to.hwb=function(){var t=Qr(arguments),e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};Me.to.keyword=function(t){return ah[t.slice(0,3)]};function vt(t,e,r){return Math.min(Math.max(e,t),r)}function Cn(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}});var fh=w((M2,uh)=>{"use strict";uh.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 to=w((T2,ph)=>{var Ht=fh(),dh={};for(Ln in Ht)Ht.hasOwnProperty(Ln)&&(dh[Ht[Ln]]=Ln);var Ln,A=ph.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(ve in A)if(A.hasOwnProperty(ve)){if(!("channels"in A[ve]))throw new Error("missing channels property: "+ve);if(!("labels"in A[ve]))throw new Error("missing channel labels property: "+ve);if(A[ve].labels.length!==A[ve].channels)throw new Error("channel and label counts mismatch: "+ve);ch=A[ve].channels,hh=A[ve].labels,delete A[ve].channels,delete A[ve].labels,Object.defineProperty(A[ve],"channels",{value:ch}),Object.defineProperty(A[ve],"labels",{value:hh})}var ch,hh,ve;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 tv(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=dh[t];if(e)return e;var r=1/0,i;for(var n in Ht)if(Ht.hasOwnProperty(n)){var s=Ht[n],a=tv(t,s);a<r&&(r=a,i=n)}return i};A.keyword.rgb=function(t){return Ht[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 mh=w((O2,gh)=>{var jn=to();function rv(){for(var t={},e=Object.keys(jn),r=e.length,i=0;i<r;i++)t[e[i]]={distance:-1,parent:null};return t}function iv(t){var e=rv(),r=[t];for(e[t].distance=0;r.length;)for(var i=r.pop(),n=Object.keys(jn[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 nv(t,e){return function(r){return e(t(r))}}function sv(t,e){for(var r=[e[t].parent,t],i=jn[e[t].parent][t],n=e[t].parent;e[n].parent;)r.unshift(e[n].parent),i=nv(jn[e[n].parent][n],i),n=e[n].parent;return i.conversion=r,i}gh.exports=function(t){for(var e=iv(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]=sv(a,e))}return r}});var bh=w((A2,yh)=>{var ro=to(),av=mh(),pr={},ov=Object.keys(ro);function lv(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 uv(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}ov.forEach(function(t){pr[t]={},Object.defineProperty(pr[t],"channels",{value:ro[t].channels}),Object.defineProperty(pr[t],"labels",{value:ro[t].labels});var e=av(t),r=Object.keys(e);r.forEach(function(i){var n=e[i];pr[t][i]=uv(n),pr[t][i].raw=lv(n)})});yh.exports=pr});var _h=w((k2,vh)=>{"use strict";var Xr=lh(),Te=bh(),so=[].slice,wh=["keyword","gray","hex"],io={};Object.keys(Te).forEach(function(t){io[so.call(Te[t].labels).sort().join("")]=t});var Nn={};function fe(t,e){if(!(this instanceof fe))return new fe(t,e);if(e&&e in wh&&(e=null),e&&!(e in Te))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 fe)this.model=t.model,this.color=t.color.slice(),this.valpha=t.valpha;else if(typeof t=="string"){var n=Xr.get(t);if(n===null)throw new Error("Unable to parse color from string: "+t);this.model=n.model,i=Te[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=Te[this.model].channels;var s=so.call(t,0,i);this.color=no(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 io))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=io[o];var l=Te[this.model].labels,u=[];for(r=0;r<l.length;r++)u.push(t[l[r]]);this.color=no(u)}if(Nn[this.model])for(i=Te[this.model].channels,r=0;r<i;r++){var c=Nn[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)}fe.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(t){var e=this.model in Xr.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 Xr.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 Xr.to.rgb.percent(r)},array:function(){return this.valpha===1?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var t={},e=Te[this.model].channels,r=Te[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 fe(this.color.map(cv(t)).concat(this.valpha),this.model)},alpha:function(t){return arguments.length?new fe(this.color.concat(Math.max(0,Math.min(1,t))),this.model):this.valpha},red:K("rgb",0,ie(255)),green:K("rgb",1,ie(255)),blue:K("rgb",2,ie(255)),hue:K(["hsl","hsv","hsl","hwb","hcg"],0,function(t){return(t%360+360)%360}),saturationl:K("hsl",1,ie(100)),lightness:K("hsl",2,ie(100)),saturationv:K("hsv",1,ie(100)),value:K("hsv",2,ie(100)),chroma:K("hcg",1,ie(100)),gray:K("hcg",2,ie(100)),white:K("hwb",1,ie(100)),wblack:K("hwb",2,ie(100)),cyan:K("cmyk",0,ie(100)),magenta:K("cmyk",1,ie(100)),yellow:K("cmyk",2,ie(100)),black:K("cmyk",3,ie(100)),x:K("xyz",0,ie(100)),y:K("xyz",1,ie(100)),z:K("xyz",2,ie(100)),l:K("lab",0,ie(100)),a:K("lab",1),b:K("lab",2),keyword:function(t){return arguments.length?new fe(t):Te[this.model].keyword(this.color)},hex:function(t){return arguments.length?new fe(t):Xr.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 fe.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 fe.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(Te).forEach(function(t){if(wh.indexOf(t)===-1){var e=Te[t].channels;fe.prototype[t]=function(){if(this.model===t)return new fe(this);if(arguments.length)return new fe(arguments,t);var r=typeof arguments[e]=="number"?e:this.valpha;return new fe(hv(Te[this.model][t].raw(this.color)).concat(r),t)},fe[t]=function(r){return typeof r=="number"&&(r=no(so.call(arguments),e)),new fe(r,t)}}});function fv(t,e){return Number(t.toFixed(e))}function cv(t){return function(e){return fv(e,t)}}function K(t,e,r){return t=Array.isArray(t)?t:[t],t.forEach(function(i){(Nn[i]||(Nn[i]=[]))[e]=r}),t=t[0],function(i){var n;return arguments.length?(r&&(i=r(i)),n=this[t](),n.color[e]=i,n):(n=this[t]().color[e],r&&(n=r(n)),n)}}function ie(t){return function(e){return Math.max(0,Math.min(t,e))}}function hv(t){return Array.isArray(t)?t:[t]}function no(t,e){for(var r=0;r<e;r++)typeof t[r]!="number"&&(t[r]=0);return t}vh.exports=fe});var Eh=w((P2,Sh)=>{"use strict";Sh.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 Th=w((D2,Mh)=>{"use strict";var Rh=_h(),xh=Eh();Mh.exports=function(e,r){var i=e.split(r||":"),n=xh(i[0]);if(!i.length)return n;for(var s=0,a=i.length-1;s<a;s++)n=Rh(n).mix(Rh(xh(i[s+1]))).saturate(1).hex();return n}});var Ah=w((q2,Oh)=>{"use strict";function $e(t,e){if(e)return new $e(t).style(e);if(!(this instanceof $e))return new $e(t);this.text=t}$e.prototype.prefix="\x1B[";$e.prototype.suffix="m";$e.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)]};$e.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)};$e.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};$e.prototype.reset=function(){return this.prefix+"39;49"+this.suffix};$e.prototype.style=function(e){return this.prefix+"38;5;"+this.rgb.apply(this,this.hex(e))+this.suffix+this.text+this.reset()};Oh.exports=$e});var Ph=w((C2,kh)=>{var dv=Th(),pv=Ah();kh.exports=function(e,r){var i=r.namespace,n=r.colors!==!1?pv(i+":",dv(i)):i+":";return e[0]=n+" "+e[0],e}});var qh=w((L2,Dh)=>{"use strict";Dh.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 Lh=w((j2,Ch)=>{var gv=qh();Ch.exports=function(e){return function(i){try{return gv(i,e())}catch{}return!1}}});var Nh=w((N2,jh)=>{var mv=Lh();jh.exports=mv(function(){return process.env.DEBUG||process.env.DIAGNOSTICS})});var Ih=w((F2,Fh)=>{Fh.exports=function(t,e){try{Function.prototype.apply.call(console.log,console,e)}catch{}}});var Wh=w((I2,$h)=>{var yv=eo(),bv=q("tty").isatty(1),Fn=yv(function t(e,r){return r=r||{},r.colors="colors"in r?r.colors:bv,r.namespace=e,r.prod=!1,r.dev=!0,!t.enabled(e)&&!(r.force||t.force)?t.nope(r):t.yep(r)});Fn.modify(Ph());Fn.use(Nh());Fn.set(Ih());$h.exports=Fn});var ei=w(($2,ao)=>{process.env.NODE_ENV==="production"?ao.exports=Zc():ao.exports=Wh()});var Uh=w((W2,Bh)=>{"use strict";var oo=q("fs"),{StringDecoder:wv}=q("string_decoder"),{Stream:vv}=zt();function _v(){}Bh.exports=(t,e)=>{let r=Buffer.alloc(65536),i=new wv("utf8"),n=new vv,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")},oo.open(t.file,"a+","0644",(l,u)=>{if(l){e?e(l):n.emit("error",l),n.destroy();return}(function c(){if(n.destroyed){oo.close(u,_v);return}return oo.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 Vh=w((U2,Gh)=>{"use strict";var Re=q("fs"),se=q("path"),zh=Zf(),Sv=q("zlib"),{MESSAGE:Ev}=te(),{Stream:Rv,PassThrough:Hh}=zt(),xv=ar(),We=ei()("winston:file"),Mv=q("os"),Tv=Uh();Gh.exports=class extends xv{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 Hh,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:Mv.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[Ev]}${this.eol}`,n=Buffer.byteLength(i);function s(){if(this._size+=n,this._pendingSize-=n,We("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()})),We("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=Re.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 Rv,n={file:r,start:e.start};return i.destroy=Tv(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);We("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);Re.stat(i,(n,s)=>{if(n&&n.code==="ENOENT")return We("ENOENT\xA0ok",i),this.filename=r,e(null,0);if(n)return We(`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);We("create stream start",r,this.options);let i=Re.createWriteStream(r,this.options).on("error",n=>We(n)).on("close",()=>We("close",i.path,i.bytesWritten)).on("open",()=>{We("file open ok",r),this.emit("open",r),e.pipe(i),this.rotatedWhileOpening&&(this._stream=new Hh,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(i),e.end())});return We("create stream ok",r),i}_incFile(e){We("_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)),zh(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);Re.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);Re.exists(c,h=>{if(!h)return l(null);u=`${r}${o}${e}${s}`,Re.rename(c,se.join(this.dirname,u),l)})}.bind(this,a));zh(n,()=>{Re.rename(se.join(this.dirname,`${r}${e}${s}`),se.join(this.dirname,`${r}1${e}${s}`),i)})}_compressFile(e,r,i){Re.access(e,Re.F_OK,n=>{if(n)return i();var s=Sv.createGzip(),a=Re.createReadStream(e),o=Re.createWriteStream(r);o.on("finish",()=>{Re.unlink(e,i)}),a.pipe(s).pipe(o)})}_createLogDirIfNotExist(e){Re.existsSync(e)||Re.mkdirSync(e,{recursive:!0})}}});var Kh=w((H2,Yh)=>{"use strict";var Ov=q("http"),Av=q("https"),{Stream:kv}=zt(),Pv=ar(),{configure:Dv}=Or();Yh.exports=class extends Pv{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 kv;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?Av:Ov).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=Dv({...this.maximumDepth&&{maximumDepth:this.maximumDepth}});a.end(Buffer.from(o(e,this.options.replacer),"utf8"))}}});var lo=w((G2,Jh)=>{"use strict";var Ke=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";Ke.writable=t=>Ke(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";Ke.readable=t=>Ke(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";Ke.duplex=t=>Ke.writable(t)&&Ke.readable(t);Ke.transform=t=>Ke.duplex(t)&&typeof t._transform=="function";Jh.exports=Ke});var Qh=w((Y2,Zh)=>{"use strict";var qv=lo(),{MESSAGE:Cv}=te(),Lv=q("os"),jv=ar();Zh.exports=class extends jv{constructor(e={}){if(super(e),!e.stream||!qv(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:Lv.EOL}log(e,r){if(setImmediate(()=>this.emit("logged",e)),this.isObjectMode){this._stream.write(e),r&&r();return}this._stream.write(`${e[Cv]}${this.eol}`),r&&r()}}});var Xh=w(ti=>{"use strict";Object.defineProperty(ti,"Console",{configurable:!0,enumerable:!0,get(){return gf()}});Object.defineProperty(ti,"File",{configurable:!0,enumerable:!0,get(){return Vh()}});Object.defineProperty(ti,"Http",{configurable:!0,enumerable:!0,get(){return Kh()}});Object.defineProperty(ti,"Stream",{configurable:!0,enumerable:!0,get(){return Qh()}})});var $n=w(ri=>{"use strict";var In=Ws(),{configs:uo}=te();ri.cli=In.levels(uo.cli);ri.npm=In.levels(uo.npm);ri.syslog=In.levels(uo.syslog);ri.addColors=In.levels});var td=w((Wn,ed)=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});var Nv=rn(),Fv=Gt(Nv),Iv=dn(),$v=Gt(Iv),Wv=Ra(),Bv=Gt(Wv),Uv=_a(),zv=Gt(Uv),Hv=Sa(),Gv=Gt(Hv),Vv=It(),Yv=Gt(Vv),Kv=lr(),Jv=Gt(Kv);function Gt(t){return t&&t.__esModule?t:{default:t}}function Zv(t,e,r){r=(0,zv.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===$v.default)&&r(null))}for(;i<s;i++)e(t[i],i,(0,Gv.default)(o))}function Qv(t,e,r){return(0,Bv.default)(t,1/0,e,r)}function Xv(t,e,r){var i=(0,Fv.default)(t)?Zv:Qv;return i(t,(0,Yv.default)(e),r)}Wn.default=(0,Jv.default)(Xv,3);ed.exports=Wn.default});var id=w((Bn,rd)=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.default=e1;function e1(t){return(e,r,i)=>t(e,i)}rd.exports=Bn.default});var Hn=w((zn,nd)=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});var t1=td(),r1=Un(t1),i1=id(),n1=Un(i1),s1=It(),a1=Un(s1),o1=lr(),l1=Un(o1);function Un(t){return t&&t.__esModule?t:{default:t}}function u1(t,e,r){return(0,r1.default)(t,(0,n1.default)((0,a1.default)(e)),r)}zn.default=(0,l1.default)(u1,3);nd.exports=zn.default});var ad=w((Z2,sd)=>{"use strict";var f1=Object.prototype.toString;sd.exports=function(e){if(typeof e.displayName=="string"&&e.constructor.name)return e.displayName;if(typeof e.name=="string"&&e.name)return e.name;if(typeof e=="object"&&e.constructor&&typeof e.constructor.name=="string")return e.constructor.name;var r=e.toString(),i=f1.call(e).slice(8,-1);return i==="Function"?r=r.substring(r.indexOf("(")+1,r.indexOf(")")):r=i,r||"anonymous"}});var fo=w((Q2,od)=>{"use strict";var c1=ad();od.exports=function(e){var r=0,i;function n(){return r||(r=1,i=e.apply(this,arguments),e=null),i}return n.displayName=c1(e),n}});var co=w(ni=>{ni.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||ni.get);var n=r.stack;return Error.prepareStackTrace=i,Error.stackTraceLimit=e,n};ni.parse=function(t){if(!t.stack)return[];var e=this,r=t.stack.split(`
32
+ `).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 ii(t){for(var e in t)this[e]=t[e]}var h1=["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"],d1=["topLevel","eval","native","constructor"];h1.forEach(function(t){ii.prototype[t]=null,ii.prototype["get"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]}});d1.forEach(function(t){ii.prototype[t]=!1,ii.prototype["is"+t[0].toUpperCase()+t.substr(1)]=function(){return this[t]}});ni._createParsedCallSite=function(t){return new ii(t)}});var ud=w((tR,ld)=>{"use strict";var{Writable:p1}=zt();ld.exports=class extends p1{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 po=w((iR,hd)=>{"use strict";var fd=q("os"),g1=Hn(),ho=ei()("winston:exception"),m1=fo(),cd=co(),y1=ud();hd.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(`
33
+ `),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:fd.loadavg(),uptime:fd.uptime()}}getTrace(e){return(e?cd.parse(e):cd.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 y1(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(){ho("doExit",n),ho("process._exiting",process._exiting),n&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!i||i.length===0)return process.nextTick(a);g1(i,(o,l)=>{let u=m1(l),c=o.transport||o;function h(d){return()=>{ho(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 pd=w((sR,dd)=>{"use strict";var{Writable:b1}=zt();dd.exports=class extends b1{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 mo=w((oR,yd)=>{"use strict";var gd=q("os"),w1=Hn(),go=ei()("winston:rejection"),v1=fo(),md=co(),_1=pd();yd.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(`
34
+ `),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:gd.loadavg(),uptime:gd.uptime()}}getTrace(e){return(e?md.parse(e):md.get()).map(i=>({column:i.getColumnNumber(),file:i.getFileName(),function:i.getFunctionName(),line:i.getLineNumber(),method:i.getMethodName(),native:i.isNative()}))}_addHandler(e){if(!this.handlers.has(e)){e.handleRejections=!0;let r=new _1(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(){go("doExit",n),go("process._exiting",process._exiting),n&&!process._exiting&&(s&&clearTimeout(s),process.exit(1))}if(!i||i.length===0)return process.nextTick(a);w1(i,(o,l)=>{let u=v1(l),c=o.transport||o;function h(d){return()=>{go(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 wd=w((lR,bd)=>{"use strict";var yo=class{constructor(e){let r=Gn();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)}};bd.exports=yo});var Gn=w((uR,Ed)=>{"use strict";var{Stream:S1,Transform:E1}=zt(),vd=Hn(),{LEVEL:Je,SPLAT:_d}=te(),Sd=lo(),R1=po(),x1=mo(),M1=ba(),T1=wd(),{warn:O1}=Bs(),A1=$n(),k1=/%[scdjifoO%]/g,Vn=class extends E1{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||js()(),this.defaultMeta=i||null,this.levels=n||this.levels||A1.npm.levels,this.level=s,this.exceptions&&this.exceptions.unhandle(),this.rejections&&this.rejections.unhandle(),this.exceptions=new R1(this),this.rejections=new x1(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(`
35
+ `));y&&this.exceptions.handle(y),b&&this.rejections.handle(b)}isLevelEnabled(e){let r=bo(this.levels,e);if(r===null)return!1;let i=bo(this.levels,this.level);return i===null?!1:!this.transports||this.transports.length===0?i>=r:this.transports.findIndex(s=>{let a=bo(this.levels,s.level);return a===null&&(a=i),a>=r})!==-1}log(e,r,...i){if(arguments.length===1)return e[Je]=e.level,this._addDefaultMeta(e),this.write(e),this;if(arguments.length===2)return r&&typeof r=="object"?(r[Je]=r.level=e,this._addDefaultMeta(r),this.write(r),this):(r={[Je]:e,level:e,message:r},this._addDefaultMeta(r),this.write(r),this);let[n]=i;if(typeof n=="object"&&n!==null&&!(r&&r.match&&r.match(k1))){let a=Object.assign({},this.defaultMeta,n,{[Je]:e,[_d]: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,{[Je]:e,[_d]:i,level:e,message:r})),this}_transform(e,r,i){if(this.silent)return i();e[Je]||(e[Je]=e.level),!this.levels[e[Je]]&&this.levels[e[Je]]!==0&&console.error("[winston] Unknown logger level: %s",e[Je]),this._readableState.pipes||console.error("[winston] Attempt to write logs with no transports, which can increase memory usage: %j",e);try{this.push(this.format.transform(e,this.format.options))}finally{this._writableState.sync=!1,i()}}_final(e){let r=this.transports.slice();vd(r,(i,n)=>{if(!i||i.finished)return setImmediate(n);i.once("finish",n),i.end()},e)}add(e){let r=!Sd(e)||e.log.length>2?new M1({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(!Sd(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(){O1.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})}vd(this.transports.filter(o=>!!o.query),a,()=>r(null,i))}stream(e={}){let r=new S1,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 T1(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(`
36
+ `))}_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 bo(t,e){let r=t[e];return!r&&r!==0?null:r}Object.defineProperty(Vn.prototype,"transports",{configurable:!1,enumerable:!0,get(){let{pipes:t}=this._readableState;return Array.isArray(t)?t:[t].filter(Boolean)}});Ed.exports=Vn});var wo=w((fR,Rd)=>{"use strict";var{LEVEL:P1}=te(),D1=$n(),q1=Gn(),C1=ei()("winston:create-logger");function L1(t){return"is"+t.charAt(0).toUpperCase()+t.slice(1)+"Enabled"}Rd.exports=function(t={}){t.levels=t.levels||D1.npm.levels;class e extends q1{constructor(n){super(n)}}let r=new e(t);return Object.keys(t.levels).forEach(function(i){if(C1('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[P1]=i,s._addDefaultMeta(o),s.write(o),this||r}return n.length===0?(s.log(i,""),s):s.log(i,...n)},e.prototype[L1(i)]=function(){return(this||r).isLevelEnabled(i)}}),r}});var Md=w((hR,xd)=>{"use strict";var j1=wo();xd.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=j1(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 Od=w(H=>{"use strict";var Td=Ws(),{warn:si}=Bs();H.version=cu().version;H.transports=Xh();H.config=$n();H.addColors=Td.levels;H.format=Td.format;H.createLogger=wo();H.Logger=Gn();H.ExceptionHandler=po();H.RejectionHandler=mo();H.Container=Md();H.Transport=ar();H.loggers=new H.Container;var Ze=H.createLogger();Object.keys(H.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(t=>H[t]=(...e)=>Ze[t](...e));Object.defineProperty(H,"level",{get(){return Ze.level},set(t){Ze.level=t}});Object.defineProperty(H,"exceptions",{get(){return Ze.exceptions}});Object.defineProperty(H,"rejections",{get(){return Ze.rejections}});["exitOnError"].forEach(t=>{Object.defineProperty(H,t,{get(){return Ze[t]},set(e){Ze[t]=e}})});Object.defineProperty(H,"default",{get(){return{exceptionHandlers:Ze.exceptionHandlers,rejectionHandlers:Ze.rejectionHandlers,transports:Ze.transports}}});si.deprecated(H,"setLevels");si.forFunctions(H,"useFormat",["cli"]);si.forProperties(H,"useFormat",["padLevels","stripColors"]);si.forFunctions(H,"deprecated",["addRewriter","addFilter","clone","extend"]);si.forProperties(H,"deprecated",["emitErrs","levelLength"])});var Jn=w((Kn,kd)=>{(function(t,e){typeof Kn=="object"&&typeof kd<"u"?e(Kn):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.Superstruct={}))})(Kn,function(t){"use strict";class e extends TypeError{constructor(g,m){let v,{message:T,explanation:D,...$}=g,{path:Z}=g,Q=Z.length===0?T:`At path: ${Z.join(".")} -- ${T}`;super(D??Q),D!=null&&(this.cause=Q),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:D}=g,{type:$}=m,{refinement:Z,message:Q=`Expected a value of type \`${$}\`${Z?` with refinement \`${Z}\``:""}, but received: \`${a(v)}\``}=p;return{value:v,type:$,refinement:Z,key:T[T.length-1],path:T,branch:D,...p,message:Q}}function*u(p,g,m,v){r(p)||(p=[p]);for(let T of p){let D=l(T,g,m,v);D&&(yield D)}}function*c(p,g,m={}){let{path:v=[],branch:T=[p],coerce:D=!1,mask:$=!1}=m,Z={path:v,branch:T,mask:$};D&&(p=g.coercer(p,Z));let Q="valid";for(let re of g.validator(p,Z))re.explanation=m.message,Q="not_valid",yield[re,void 0];for(let[re,Pe,jp]of g.entries(p,Z)){let Np=c(Pe,jp,{path:re===void 0?v:[...v,re],branch:re===void 0?T:[...T,Pe],coerce:D,mask:$,message:m.message});for(let Oi of Np)Oi[0]?(Q=Oi[0].refinement!=null?"not_refined":"not_valid",yield[Oi[0],void 0]):D&&(Pe=Oi[1],re===void 0?p=Pe:p instanceof Map?p.set(re,Pe):p instanceof Set?p.add(Pe):i(p)&&(Pe!==void 0||re in p)&&(p[re]=Pe))}if(Q!=="not_valid")for(let re of g.refiner(p,Z))re.explanation=m.message,Q="not_refined",yield[re,void 0];Q==="valid"&&(yield[void 0,p])}class h{constructor(g){let{type:m,schema:v,validator:T,refiner:D,coercer:$=Q=>Q,entries:Z=function*(){}}=g;this.type=m,this.schema=v,this.entries=Z,this.coercer=$,T?this.validator=(Q,re)=>{let Pe=T(Q,re);return u(Pe,re,this,Q)}:this.validator=()=>[],D?this.refiner=(Q,re)=>{let Pe=D(Q,re);return u(Pe,re,this,Q)}: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?ot(v):at(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 j(p,g){let{schema:m}=p,v={...m};for(let T of g)delete v[T];switch(p.type){case"type":return ot(v);default:return at(v)}}function U(p){let g=p instanceof h,m=g?{...p.schema}:{...p};for(let v in m)m[v]=Tt(m[v]);return g&&p.type==="type"?ot(m):at(m)}function F(p,g){let{schema:m}=p,v={};for(let T of g)v[T]=m[T];switch(p.type){case"type":return ot(v);default:return at(v)}}function G(p,g){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),R(p,g)}function ne(){return R("any",()=>!0)}function J(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 ye(){return R("bigint",p=>typeof p=="bigint")}function be(){return R("boolean",p=>typeof p=="boolean")}function et(){return R("date",p=>p instanceof Date&&!isNaN(p.getTime())||`Expected a valid \`Date\` object, but received: ${a(p)}`)}function ms(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 pe(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 P(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 ke(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 Fe(){return R("never",()=>!1)}function Mt(p){return new h({...p,validator:(g,m)=>g===null||p.validator(g,m),refiner:(g,m)=>g===null||p.refiner(g,m)})}function Kt(){return R("number",p=>typeof p=="number"&&!isNaN(p)||`Expected a number, but received: ${a(p)}`)}function at(p){let g=p?Object.keys(p):[],m=Fe();return new h({type:"object",schema:p||null,*entries(v){if(p&&i(v)){let T=new Set(Object.keys(v));for(let D of g)T.delete(D),yield[D,v[D],p[D]];for(let D of T)yield[D,v[D],m]}},validator(v){return n(v)||`Expected an object, but received: ${a(v)}`},coercer(v,T){if(!n(v))return v;let D={...v};if(T.mask&&p)for(let $ in D)p[$]===void 0&&delete D[$];return D}})}function Tt(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 ys(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 xe(){return R("regexp",p=>p instanceof RegExp)}function Ei(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 Ri(){return R("string",p=>typeof p=="string"||`Expected a string, but received: ${a(p)}`)}function xi(p){let g=Fe();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 ot(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 Jt(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[D,$]=T.validate(m,{coerce:!0,mask:v.mask});if(!D)return $}return m},validator(m,v){let T=[];for(let D of p){let[...$]=c(m,D,v),[Z]=$;if(Z[0])for(let[Q]of $)Q&&T.push(Q);else return[]}return[`Expected the value to satisfy a union of \`${g}\`, but received: ${a(m)}`,...T]}})}function Ot(){return R("unknown",()=>!0)}function xr(p,g,m){return new h({...p,coercer:(v,T)=>b(v,g)?p.coercer(m(v,T),T):p.coercer(v,T)})}function At(p,g,m={}){return xr(p,Ot(),v=>{let T=typeof g=="function"?g():g;if(v===void 0)return T;if(!m.strict&&s(v)&&s(T)){let D={...v},$=!1;for(let Z in T)D[Z]===void 0&&(D[Z]=T[Z],$=!0);if($)return D}return v})}function lt(p){return xr(p,Ri(),g=>g.trim())}function Mr(p){return kt(p,"empty",g=>{let m=Mi(g);return m===0||`Expected an empty ${p.type} but received one with a size of \`${m}\``})}function Mi(p){return p instanceof Map||p instanceof Set?p.size:p.length}function Ti(p,g,m={}){let{exclusive:v}=m;return kt(p,"max",T=>v?T<g:T<=g||`Expected a ${p.type} less than ${v?"":"or equal to "}${g} but received \`${T}\``)}function Dp(p,g,m={}){let{exclusive:v}=m;return kt(p,"min",T=>v?T>g:T>=g||`Expected a ${p.type} greater than ${v?"":"or equal to "}${g} but received \`${T}\``)}function qp(p){return kt(p,"nonempty",g=>Mi(g)>0||`Expected a nonempty ${p.type} but received an empty one`)}function Cp(p,g){return kt(p,"pattern",m=>g.test(m)||`Expected a ${p.type} matching \`/${g.source}/\` but received "${m}"`)}function Lp(p,g,m=g){let v=`Expected a ${p.type}`,T=g===m?`of \`${g}\``:`between \`${g}\` and \`${m}\``;return kt(p,"size",D=>{if(typeof D=="number"||D instanceof Date)return g<=D&&D<=m||`${v} ${T} but received \`${D}\``;if(D instanceof Map||D instanceof Set){let{size:$}=D;return g<=$&&$<=m||`${v} with a size ${T} but received one with a size of \`${$}\``}else{let{length:$}=D;return g<=$&&$<=m||`${v} with a length ${T} but received one with a length of \`${$}\``}})}function kt(p,g,m){return new h({...p,*refiner(v,T){yield*p.refiner(v,T);let D=m(v,T),$=u(D,T,p,v);for(let Z of $)yield{...Z,refinement:g}}})}t.Struct=h,t.StructError=e,t.any=ne,t.array=J,t.assert=d,t.assign=E,t.bigint=ye,t.boolean=be,t.coerce=xr,t.create=f,t.date=et,t.defaulted=At,t.define=R,t.deprecated=x,t.dynamic=M,t.empty=Mr,t.enums=ms,t.func=S,t.instance=O,t.integer=z,t.intersection=pe,t.is=b,t.lazy=k,t.literal=P,t.map=ke,t.mask=y,t.max=Ti,t.min=Dp,t.never=Fe,t.nonempty=qp,t.nullable=Mt,t.number=Kt,t.object=at,t.omit=j,t.optional=Tt,t.partial=U,t.pattern=Cp,t.pick=F,t.record=ys,t.refine=kt,t.regexp=xe,t.set=Ei,t.size=Lp,t.string=Ri,t.struct=G,t.trimmed=lt,t.tuple=xi,t.type=ot,t.union=Jt,t.unknown=Ot,t.validate=_})});import CS from"yargs";import{hideBin as LS}from"yargs/helpers";import de from"node:path";import xt from"node:fs/promises";import{fileURLToPath as jS}from"node:url";import Wo from"fs-extra";import{loadPyodide as Op,version as NS}from"pyodide";import Ad from"node:path";import N1 from"node:fs/promises";var _t=Ai(Od(),1),I=_t.createLogger({transports:[new _t.transports.Console({format:_t.format.combine(_t.format.splat(),_t.format.cli())})]});function ai(t){process.emitWarning(t,{type:"DeprecationWarning"})}var Yn=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=Ad.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=Ad.join(this.sourceUrl,e);I.debug(`Reading ${r}`);let i=await N1.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 Dd=Ai(Jn(),1);import F1 from"node:fs/promises";var X=Ai(Jn(),1),Pd=X.object({entrypoint:X.string(),embed:X.defaulted(X.boolean(),!1),idbfsMountpoints:X.optional(X.array(X.string())),nodeJsWorker:X.defaulted(X.boolean(),!1),nodefsMountpoints:X.optional(X.record(X.string(),X.string()))});function I1(t){let e=Dd.mask(t??{},Pd);if(e.nodeJsWorker){if(e.idbfsMountpoints!=null)throw new Error("The `idbfsMountpoints` field is not allowed when `nodeJsWorker` is true.")}else if(e.nodefsMountpoints!=null)throw new Error("The `nodefsMountpoints` field is not allowed when `nodeJsWorker` is false.");return e}async function qd(t){let e=I1({...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 F1.writeFile(t.manifestFilePath,r,{encoding:"utf-8"})}var ce=Ai(Jn(),1);import $1 from"node:path";async function Cd(t){let{files:e,entrypoint:r}=W1(t),i=await B1(t),n=await U1(t);return{files:e,entrypoint:r,dependencies:i,requirementsTxtFilePaths:n}}function W1(t){let{packageJsonStliteDesktopField:e,fallbacks:{appHomeDirSource:r}}=t,i=e?.files,n=e?.entrypoint;if(i==null||n==null){ai("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&&ai("The `appHomeDirSource` argument is deprecated and has been ignored because `stlite.desktop.files` is specified in `package.json`.");return ce.assert(n,ce.string(),"The `stlite.desktop.entrypoint` field must be a string."),ce.assert(i,ce.array(ce.string()),"The `stlite.desktop.files` field must be an array of strings."),{files:i,entrypoint:n}}async function B1(t){let{packageJsonStliteDesktopField:e,fallbacks:{packages:r}}=t,i=e?.dependencies;ce.assert(i,ce.optional(ce.array(ce.string())),"The `stlite.desktop.dependencies` field must be an array of strings.");let n=[];return r!=null&&(ai("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 U1(t){let{pathResolutionRoot:e,packageJsonStliteDesktopField:r,fallbacks:{requirementsTxtFilePaths:i}}=t,n=r?.requirementsTxtFiles;ce.assert(n,ce.optional(ce.array(ce.string())),"The `stlite.desktop.requirementsTxtFiles` field must be an array of strings.");let s=n?.map(o=>$1.resolve(e,o)),a=[];return i!=null&&i.length>0&&(ai("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 z1="[",H1="(<=>!~",G1=";",V1="@",Y1=new RegExp(`[${z1+H1+G1+V1}]`);function K1(t){return t.split(Y1)[0].trim()}function Ld(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=>K1(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 J1=/\s#.*$/;function jd(t){return t.split(`
37
+ `).filter(e=>!e.startsWith("#")).map(e=>e.replace(J1,"")).map(e=>e.trim()).filter(e=>e!=="")}var vo=(t,e,r)=>{let i=t instanceof RegExp?Nd(t,r):t,n=e instanceof RegExp?Nd(e,r):e,s=i!==null&&n!=null&&Z1(i,n,r);return s&&{start:s[0],end:s[1],pre:r.slice(0,s[0]),body:r.slice(s[0]+i.length,s[1]),post:r.slice(s[1]+n.length)}},Nd=(t,e)=>{let r=e.match(t);return r?r[0]:null},Z1=(t,e,r)=>{let 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;){if(c===l)i.push(c),l=r.indexOf(t,c+1);else if(i.length===1){let h=i.pop();h!==void 0&&(o=[h,u])}else n=i.pop(),n!==void 0&&n<s&&(s=n,a=u),u=r.indexOf(e,c+1);c=l<u&&l>=0?l:u}i.length&&a!==void 0&&(o=[s,a])}return o};var Fd="\0SLASH"+Math.random()+"\0",Id="\0OPEN"+Math.random()+"\0",So="\0CLOSE"+Math.random()+"\0",$d="\0COMMA"+Math.random()+"\0",Wd="\0PERIOD"+Math.random()+"\0",Q1=new RegExp(Fd,"g"),X1=new RegExp(Id,"g"),e_=new RegExp(So,"g"),t_=new RegExp($d,"g"),r_=new RegExp(Wd,"g"),i_=/\\\\/g,n_=/\\{/g,s_=/\\}/g,a_=/\\,/g,o_=/\\./g;function _o(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function l_(t){return t.replace(i_,Fd).replace(n_,Id).replace(s_,So).replace(a_,$d).replace(o_,Wd)}function u_(t){return t.replace(Q1,"\\").replace(X1,"{").replace(e_,"}").replace(t_,",").replace(r_,".")}function Bd(t){if(!t)return[""];let e=[],r=vo("{","}",t);if(!r)return t.split(",");let{pre:i,body:n,post:s}=r,a=i.split(",");a[a.length-1]+="{"+n+"}";let o=Bd(s);return s.length&&(a[a.length-1]+=o.shift(),a.push.apply(a,o)),e.push.apply(e,a),e}function Ud(t){return t?(t.slice(0,2)==="{}"&&(t="\\{\\}"+t.slice(2)),oi(l_(t),!0).map(u_)):[]}function f_(t){return"{"+t+"}"}function c_(t){return/^-?0\d/.test(t)}function h_(t,e){return t<=e}function d_(t,e){return t>=e}function oi(t,e){let r=[],i=vo("{","}",t);if(!i)return[t];let n=i.pre,s=i.post.length?oi(i.post,!1):[""];if(/\$$/.test(i.pre))for(let a=0;a<s.length;a++){let o=n+"{"+i.body+"}"+s[a];r.push(o)}else{let a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),o=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),l=a||o,u=i.body.indexOf(",")>=0;if(!l&&!u)return i.post.match(/,(?!,).*\}/)?(t=i.pre+"{"+i.body+So+i.post,oi(t)):[t];let c;if(l)c=i.body.split(/\.\./);else if(c=Bd(i.body),c.length===1&&c[0]!==void 0&&(c=oi(c[0],!1).map(f_),c.length===1))return s.map(d=>i.pre+c[0]+d);let h;if(l&&c[0]!==void 0&&c[1]!==void 0){let d=_o(c[0]),f=_o(c[1]),y=Math.max(c[0].length,c[1].length),b=c.length===3&&c[2]!==void 0?Math.abs(_o(c[2])):1,_=h_;f<d&&(b*=-1,_=d_);let R=c.some(c_);h=[];for(let x=d;_(x,f);x+=b){let M;if(o)M=String.fromCharCode(x),M==="\\"&&(M="");else if(M=String(x),R){let k=y-M.length;if(k>0){let j=new Array(k+1).join("0");x<0?M="-"+j+M.slice(1):M=j+M}}h.push(M)}}else{h=[];for(let d=0;d<c.length;d++)h.push.apply(h,oi(c[d],!1))}for(let d=0;d<h.length;d++)for(let f=0;f<s.length;f++){let y=n+h[d]+s[f];(!e||l||y)&&r.push(y)}}return r}var li=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")};var p_={"[: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]},ui=t=>t.replace(/[[\]\\-]/g,"\\$&"),g_=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),zd=t=>t.join(""),Hd=(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(p_))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(ui(h)+"-"+ui(b)):b===h&&i.push(ui(b)),h="",s++;continue}if(t.startsWith("-]",s+1)){i.push(ui(b+"-")),s+=2;continue}if(t.startsWith("-",s+1)){h=b,s+=2;continue}i.push(ui(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[g_(b),!1,c-r,!1]}let d="["+(u?"^":"")+zd(i)+"]",f="["+(u?"":"^")+zd(n)+"]";return[i.length&&n.length?"("+d+"|"+f+")":i.length?d:f,o,c-r,!0]};var Be=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var m_=new Set(["!","?","+","*","@"]),Gd=t=>m_.has(t),y_="(?!(?:^|/)\\.\\.?(?:$|/))",Zn="(?!\\.)",b_=new Set(["[","."]),w_=new Set(["..","."]),v_=new Set("().*{}+?[]^$\\!"),__=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Eo="[^/]",Vd=Eo+"*?",Yd=Eo+"+?",gr=class t{type;#e;#t;#s=!1;#i=[];#a;#v;#u;#c=!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.#c&&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.#c)return this;this.toString(),this.#c=!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.#c&&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&&Gd(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(Gd(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.#h(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&&w_.has(this.#i[0]))){let y=b_,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?y_:_?Zn:""}let h="";return this.isEnd()&&this.#e.#c&&this.#a?.type==="!"&&(h="(?:$|\\/)"),[c+u+h,Be(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,Be(this.toString()),!1,!1]}let a=!i||e||r||!Zn?"":this.#d(!0);a===s&&(a=""),a&&(s=`(?:${s})(?:${a})*?`);let o="";if(this.type==="!"&&this.#n)o=(this.isStart()&&!r?Zn:"")+Yd;else{let l=this.type==="!"?"))"+(this.isStart()&&!r&&!e?Zn:"")+Vd+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;o=n+s+l}return[o,Be(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#h(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+=(v_.has(l)?"\\":"")+l;continue}if(l==="\\"){o===e.length-1?s+="\\\\":n=!0;continue}if(l==="["){let[u,c,h,d]=Hd(e,o);if(h){s+=u,a=a||c,o+=h-1,r=r||d;continue}}if(l==="*"){i&&e==="*"?s+=Yd:s+=Vd,r=!0;continue}if(l==="?"){s+=Eo,r=!0;continue}s+=__(l)}return[s,Be(e),!!r,a]}};var mr=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");var _e=(t,e,r={})=>(li(e),!r.nocomment&&e.charAt(0)==="#"?!1:new Oe(e,r).match(t)),S_=/^\*+([^+@!?\*\[\(]*)$/,E_=t=>e=>!e.startsWith(".")&&e.endsWith(t),R_=t=>e=>e.endsWith(t),x_=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),M_=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),T_=/^\*+\.\*+$/,O_=t=>!t.startsWith(".")&&t.includes("."),A_=t=>t!=="."&&t!==".."&&t.includes("."),k_=/^\.\*+$/,P_=t=>t!=="."&&t!==".."&&t.startsWith("."),D_=/^\*+$/,q_=t=>t.length!==0&&!t.startsWith("."),C_=t=>t.length!==0&&t!=="."&&t!=="..",L_=/^\?+([^+@!?\*\[\(]*)?$/,j_=([t,e=""])=>{let r=Zd([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},N_=([t,e=""])=>{let r=Qd([t]);return e?(e=e.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(e)):r},F_=([t,e=""])=>{let r=Qd([t]);return e?i=>r(i)&&i.endsWith(e):r},I_=([t,e=""])=>{let r=Zd([t]);return e?i=>r(i)&&i.endsWith(e):r},Zd=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},Qd=([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},Xd=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Kd={win32:{sep:"\\"},posix:{sep:"/"}},$_=Xd==="win32"?Kd.win32.sep:Kd.posix.sep;_e.sep=$_;var he=Symbol("globstar **");_e.GLOBSTAR=he;var W_="[^/]",B_=W_+"*?",U_="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",z_="(?:(?!(?:\\/|^)\\.).)*?",H_=(t,e={})=>r=>_e(r,t,e);_e.filter=H_;var Le=(t,e={})=>Object.assign({},t,e),G_=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return _e;let e=_e;return Object.assign((i,n,s={})=>e(i,n,Le(t,s)),{Minimatch:class extends e.Minimatch{constructor(n,s={}){super(n,Le(t,s))}static defaults(n){return e.defaults(Le(t,n)).Minimatch}},AST:class extends e.AST{constructor(n,s,a={}){super(n,s,Le(t,a))}static fromGlob(n,s={}){return e.AST.fromGlob(n,Le(t,s))}},unescape:(i,n={})=>e.unescape(i,Le(t,n)),escape:(i,n={})=>e.escape(i,Le(t,n)),filter:(i,n={})=>e.filter(i,Le(t,n)),defaults:i=>e.defaults(Le(t,i)),makeRe:(i,n={})=>e.makeRe(i,Le(t,n)),braceExpand:(i,n={})=>e.braceExpand(i,Le(t,n)),match:(i,n,s={})=>e.match(i,n,Le(t,s)),sep:e.sep,GLOBSTAR:he})};_e.defaults=G_;var ep=(t,e={})=>(li(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:Ud(t));_e.braceExpand=ep;var V_=(t,e={})=>new Oe(t,e).makeRe();_e.makeRe=V_;var Y_=(t,e,r={})=>{let i=new Oe(e,r);return t=t.filter(n=>i.match(n)),i.options.nonull&&!t.length&&t.push(e),t};_e.match=Y_;var Jd=/[?*]|[+@!]\(.*?\)|\[|\]/,K_=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Oe=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,r={}){li(e),r=r||{},this.options=r,this.pattern=e,this.platform=r.platform||Xd,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]==="?"||!Jd.test(s[2]))&&!Jd.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,j]=[e[x],r[M]];k.toLowerCase()===j.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===he){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(`
38
38
  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(`
39
- >>> 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 ap(this.pattern,this.options)}parse(e){ui(e);let r=this.options;if(e==="**")return ce;if(e==="")return"";let i,n=null;(i=e.match(O_))?n=r.dot?k_:A_:(i=e.match(b_))?n=(r.nocase?r.dot?S_:__:r.dot?v_:w_)(i[1]):(i=e.match(P_))?n=(r.nocase?r.dot?q_:D_:r.dot?C_:L_)(i):(i=e.match(E_))?n=r.dot?x_:R_:(i=e.match(M_))&&(n=T_);let s=gr.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?F_:r.dot?I_:$_,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"?H_(c):c===ce?ce:c._src});return u.forEach((c,h)=>{let d=u[h+1],f=u[h-1];c!==ce||f===ce||(f===void 0?d!==void 0&&d!==ce?u[h+1]="(?:\\/|"+i+"\\/)?"+d:u[h]=i:d===void 0?u[h-1]=f+"(?:\\/|"+i+")?":d!==ce&&(u[h-1]=f+"(?:\\/|\\/"+i+"\\/)"+d,u[h+1]=ce))}),u.filter(c=>c!==ce).join("/")}).join("|"),[a,o]=e.length>1?["(?:",")"]:["",""];s="^"+a+s+o+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let i=this.options;this.isWindows&&(e=e.split("\\").join("/"));let n=this.slashSplit(e);this.debug(this.pattern,"split",n);let s=this.set;this.debug(this.pattern,"set",s);let a=n[n.length-1];if(!a)for(let o=n.length-2;!a&&o>=0;o--)a=n[o];for(let o=0;o<s.length;o++){let l=s[o],u=n;if(i.matchBase&&l.length===1&&(u=[a]),this.matchOne(u,l,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(e){return _e.defaults(e).Minimatch}};_e.AST=gr;_e.Minimatch=Oe;_e.escape=mr;_e.unescape=Be;import{fileURLToPath as ES}from"node:url";var yr=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,lp=new Set,Eo=typeof process=="object"&&process?process:{},up=(t,e,r,i)=>{typeof Eo.emitWarning=="function"?Eo.emitWarning(t,e,r,i):console.error(`[${r}] ${e}: ${t}`)},Qn=globalThis.AbortController,op=globalThis.AbortSignal;if(typeof Qn>"u"){op=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,n){this._onabort.push(n)}},Qn=class{constructor(){e()}signal=new op;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=Eo.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,up("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 G_=t=>!lp.has(t),ZR=Symbol("type"),St=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),fp=t=>St(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?br:null:null,br=class extends Array{constructor(e){super(e),this.fill(0)}},Ro=class t{heap;length;static#e=!1;static create(e){let r=fp(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]}},hi=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.#T(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:T,allowStaleOnFetchAbort:k,ignoreFetchAbort:q}=e;if(r!==0&&!St(r))throw new TypeError("max option must be a nonnegative integer");let I=r?fp(r):Array;if(!I)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 I(r),this.#y=new I(r),this.#d=0,this.#c=0,this.#E=Ro.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=!!T,this.allowStaleOnFetchAbort=!!k,this.ignoreFetchAbort=!!q,this.maxEntrySize!==0){if(this.#t!==0&&!St(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!St(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=St(n)||n===0?n:1,this.ttlAutopurge=!!s,this.ttl=i||0,this.ttl){if(!St(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 C="LRU_CACHE_UNBOUNDED";G_(C)&&(lp.add(C),up("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",C,t))}}getRemainingTTL(e){return this.#o.has(e)?1/0:0}#A(){let e=new br(this.#e),r=new br(this.#e);this.#w=e,this.#x=r,this.#D=(s,a,o=yr.now())=>{if(r[s]=a!==0?o:0,e[s]=a,a!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#b(s)&&this.#P(this.#l[s],"expire")},a+1);l.unref&&l.unref()}},this.#M=s=>{r[s]=e[s]!==0?yr.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=yr.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}}#M=()=>{};#r=()=>{};#D=()=>{};#b=()=>!1;#k(){let e=new br(this.#e);this.#h=0,this.#R=e,this.#q=r=>{this.#h-=e[r],e[r]=0},this.#L=(r,i,n,s)=>{if(this.#f(i))return 0;if(!St(n))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(n=s(i,r),!St(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.#C=(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)}}#q=e=>{};#C=(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};*#T({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.#T())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.#T()){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.#T())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.#T()){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.#T()){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.#P(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-(yr.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.#T({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=yr.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=yr.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.#P(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.#C(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.#q(h),this.#C(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.#D(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.#q(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.#M(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 Qn,{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.#P(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,T=f;if(this.#n[r]===f&&(!x||T.__staleWhileFetching===void 0?this.#P(e,"fetch"):E||(this.#n[r]=T.__staleWhileFetching)),R)return i.status&&T.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),T.__staleWhileFetching;if(T.__returned===T)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 Qn}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},T=this.#o.get(e);if(T===void 0){E&&(E.fetch="miss");let k=this.#F(e,T,x,b);return k.__returned=k}else{let k=this.#n[T];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 q=this.#b(T);if(!_&&!q)return E&&(E.fetch="hit"),this.#$(T),n&&this.#M(T),E&&this.#r(E,T),k;let I=this.#F(e,T,x,b),z=I.__staleWhileFetching!==void 0&&i;return E&&(E.fetch=q?"stale":"refresh",z&&q&&(E.returnedStale=!0)),z?I.__staleWhileFetching:I.__returned=I}}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.#P(e,"expire"),a&&i&&(a.returnedStale=!0),i?l:void 0)):(a&&(a.get="hit"),u?l.__staleWhileFetching:(this.#$(o),n&&this.#M(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.#P(e,"delete")}#P(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.#q(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)}}};import{posix as iS,win32 as Co}from"node:path";import{fileURLToPath as nS}from"node:url";import{lstatSync as sS,readdir as aS,readdirSync as oS,readlinkSync as lS,realpathSync as uS}from"fs";import*as fS from"node:fs";import{lstat as cS,readdir as dS,readlink as pS,realpath as gS}from"node:fs/promises";import{EventEmitter as Po}from"node:events";import gp from"node:stream";import{StringDecoder as V_}from"node:string_decoder";var hp=typeof process=="object"&&process?process:{stdout:null,stderr:null},Y_=t=>!!t&&typeof t=="object"&&(t instanceof Rt||t instanceof gp||K_(t)||J_(t)),K_=t=>!!t&&typeof t=="object"&&t instanceof Po&&typeof t.pipe=="function"&&t.pipe!==gp.Writable.prototype.pipe,J_=t=>!!t&&typeof t=="object"&&t instanceof Po&&typeof t.write=="function"&&typeof t.end=="function",nt=Symbol("EOF"),st=Symbol("maybeEmitEnd"),Et=Symbol("emittedEnd"),Xn=Symbol("emittingEnd"),ci=Symbol("emittedError"),es=Symbol("closed"),cp=Symbol("read"),ts=Symbol("flush"),dp=Symbol("flushChunk"),Ue=Symbol("encoding"),wr=Symbol("decoder"),ae=Symbol("flowing"),di=Symbol("paused"),vr=Symbol("resume"),oe=Symbol("buffer"),Se=Symbol("pipes"),le=Symbol("bufferLength"),xo=Symbol("bufferPush"),rs=Symbol("bufferShift"),ge=Symbol("objectMode"),ee=Symbol("destroyed"),Mo=Symbol("error"),To=Symbol("emitData"),pp=Symbol("emitEnd"),Oo=Symbol("emitEnd2"),Qe=Symbol("async"),Ao=Symbol("abort"),is=Symbol("aborted"),pi=Symbol("signal"),Vt=Symbol("dataListeners"),Ae=Symbol("discarded"),gi=t=>Promise.resolve().then(t),Z_=t=>t(),Q_=t=>t==="end"||t==="finish"||t==="prefinish",X_=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,eS=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),ns=class{src;dest;opts;ondrain;constructor(e,r,i){this.src=e,this.dest=r,this.opts=i,this.ondrain=()=>e[vr](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},ko=class extends ns{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)}},tS=t=>!!t.objectMode,rS=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",Rt=class extends Po{[ae]=!1;[di]=!1;[Se]=[];[oe]=[];[ge];[Ue];[Qe];[wr];[nt]=!1;[Et]=!1;[Xn]=!1;[es]=!1;[ci]=null;[le]=0;[ee]=!1;[pi];[is]=!1;[Vt]=0;[Ae]=!1;writable=!0;readable=!0;constructor(...e){let r=e[0]||{};if(super(),r.objectMode&&typeof r.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");tS(r)?(this[ge]=!0,this[Ue]=null):rS(r)?(this[Ue]=r.encoding,this[ge]=!1):(this[ge]=!1,this[Ue]=null),this[Qe]=!!r.async,this[wr]=this[Ue]?new V_(this[Ue]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[oe]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Se]});let{signal:i}=r;i&&(this[pi]=i,i.aborted?this[Ao]():i.addEventListener("abort",()=>this[Ao]()))}get bufferLength(){return this[le]}get encoding(){return this[Ue]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[ge]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Qe]}set async(e){this[Qe]=this[Qe]||!!e}[Ao](){this[is]=!0,this.emit("abort",this[pi]?.reason),this.destroy(this[pi]?.reason)}get aborted(){return this[is]}set aborted(e){}write(e,r,i){if(this[is])return!1;if(this[nt])throw new Error("write after end");if(this[ee])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(i=r,r="utf8"),r||(r="utf8");let n=this[Qe]?gi:Z_;if(!this[ge]&&!Buffer.isBuffer(e)){if(eS(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(X_(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[ge]?(this[ae]&&this[le]!==0&&this[ts](!0),this[ae]?this.emit("data",e):this[xo](e),this[le]!==0&&this.emit("readable"),i&&n(i),this[ae]):e.length?(typeof e=="string"&&!(r===this[Ue]&&!this[wr]?.lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[Ue]&&(e=this[wr].write(e)),this[ae]&&this[le]!==0&&this[ts](!0),this[ae]?this.emit("data",e):this[xo](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[ee])return null;if(this[Ae]=!1,this[le]===0||e===0||e&&e>this[le])return this[st](),null;this[ge]&&(e=null),this[oe].length>1&&!this[ge]&&(this[oe]=[this[Ue]?this[oe].join(""):Buffer.concat(this[oe],this[le])]);let r=this[cp](e||null,this[oe][0]);return this[st](),r}[cp](e,r){if(this[ge])this[rs]();else{let i=r;e===i.length||e===null?this[rs]():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[nt]&&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[nt]=!0,this.writable=!1,(this[ae]||!this[di])&&this[st](),this}[vr](){this[ee]||(!this[Vt]&&!this[Se].length&&(this[Ae]=!0),this[di]=!1,this[ae]=!0,this.emit("resume"),this[oe].length?this[ts]():this[nt]?this[st]():this.emit("drain"))}resume(){return this[vr]()}pause(){this[ae]=!1,this[di]=!0,this[Ae]=!1}get destroyed(){return this[ee]}get flowing(){return this[ae]}get paused(){return this[di]}[xo](e){this[ge]?this[le]+=1:this[le]+=e.length,this[oe].push(e)}[rs](){return this[ge]?this[le]-=1:this[le]-=this[oe][0].length,this[oe].shift()}[ts](e=!1){do;while(this[dp](this[rs]())&&this[oe].length);!e&&!this[oe].length&&!this[nt]&&this.emit("drain")}[dp](e){return this.emit("data",e),this[ae]}pipe(e,r){if(this[ee])return e;this[Ae]=!1;let i=this[Et];return r=r||{},e===hp.stdout||e===hp.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,i?r.end&&e.end():(this[Se].push(r.proxyErrors?new ko(this,e,r):new ns(this,e,r)),this[Qe]?gi(()=>this[vr]()):this[vr]()),e}unpipe(e){let r=this[Se].find(i=>i.dest===e);r&&(this[Se].length===1?(this[ae]&&this[Vt]===0&&(this[ae]=!1),this[Se]=[]):this[Se].splice(this[Se].indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let i=super.on(e,r);if(e==="data")this[Ae]=!1,this[Vt]++,!this[Se].length&&!this[ae]&&this[vr]();else if(e==="readable"&&this[le]!==0)super.emit("readable");else if(Q_(e)&&this[Et])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[ci]){let n=r;this[Qe]?gi(()=>n.call(this,this[ci])):n.call(this,this[ci])}return i}removeListener(e,r){return this.off(e,r)}off(e,r){let i=super.off(e,r);return e==="data"&&(this[Vt]=this.listeners("data").length,this[Vt]===0&&!this[Ae]&&!this[Se].length&&(this[ae]=!1)),i}removeAllListeners(e){let r=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Vt]=0,!this[Ae]&&!this[Se].length&&(this[ae]=!1)),r}get emittedEnd(){return this[Et]}[st](){!this[Xn]&&!this[Et]&&!this[ee]&&this[oe].length===0&&this[nt]&&(this[Xn]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[es]&&this.emit("close"),this[Xn]=!1)}emit(e,...r){let i=r[0];if(e!=="error"&&e!=="close"&&e!==ee&&this[ee])return!1;if(e==="data")return!this[ge]&&!i?!1:this[Qe]?(gi(()=>this[To](i)),!0):this[To](i);if(e==="end")return this[pp]();if(e==="close"){if(this[es]=!0,!this[Et]&&!this[ee])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[ci]=i,super.emit(Mo,i);let s=!this[pi]||this.listeners("error").length?super.emit("error",i):!1;return this[st](),s}else if(e==="resume"){let s=super.emit("resume");return this[st](),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[st](),n}[To](e){for(let i of this[Se])i.dest.write(e)===!1&&this.pause();let r=this[Ae]?!1:super.emit("data",e);return this[st](),r}[pp](){return this[Et]?!1:(this[Et]=!0,this.readable=!1,this[Qe]?(gi(()=>this[Oo]()),!0):this[Oo]())}[Oo](){if(this[wr]){let r=this[wr].end();if(r){for(let i of this[Se])i.dest.write(r);this[Ae]||super.emit("data",r)}}for(let r of this[Se])r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[ge]||(e.dataLength=0);let r=this.promise();return this.on("data",i=>{e.push(i),this[ge]||(e.dataLength+=i.length)}),await r,e}async concat(){if(this[ge])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Ue]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,r)=>{this.on(ee,()=>r(new Error("stream destroyed"))),this.on("error",i=>r(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Ae]=!1;let e=!1,r=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return r();let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[nt])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[nt]})},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[Ae]=!1;let e=!1,r=()=>(this.pause(),this.off(Mo,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(Mo,r),this.once(ee,r),{next:i,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(e){if(this[ee])return e?this.emit("error",e):this.emit(ee),this;this[ee]=!0,this[Ae]=!0,this[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(ee),this}static get isStream(){return Y_}};var hS=uS.native,yi={lstatSync:sS,readdir:aS,readdirSync:oS,readlinkSync:lS,realpathSync:hS,promises:{lstat:cS,readdir:dS,readlink:pS,realpath:gS}},vp=t=>!t||t===yi||t===fS?yi:{...yi,...t,promises:{...yi.promises,...t.promises||{}}},_p=/^\\\\\?\\([a-z]:)\\?$/i,mS=t=>t.replace(/\//g,"\\").replace(_p,"$1\\"),yS=/[\\\/]/,Ne=0,Sp=1,Ep=2,Xe=4,Rp=6,xp=8,Yt=10,Mp=12,je=15,mi=~je,Do=16,mp=32,bi=64,ze=128,ss=256,os=512,yp=bi|ze|os,bS=1023,qo=t=>t.isFile()?xp:t.isDirectory()?Xe:t.isSymbolicLink()?Yt:t.isCharacterDevice()?Ep:t.isBlockDevice()?Rp:t.isSocket()?Mp:t.isFIFO()?Sp:Ne,bp=new Map,wi=t=>{let e=bp.get(t);if(e)return e;let r=t.normalize("NFKD");return bp.set(t,r),r},wp=new Map,as=t=>{let e=wp.get(t);if(e)return e;let r=wi(t.toLowerCase());return wp.set(t,r),r},ls=class extends hi{constructor(){super({max:256})}},Lo=class extends hi{constructor(e=16*1024){super({maxSize:e,sizeCalculation:r=>r.length+1})}},Tp=Symbol("PathScurry setAsCwd"),me=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;#M;#r;#D;#b;#k;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,r=Ne,i,n,s,a,o){this.name=e,this.#w=s?as(e):wi(e),this.#r=r&bS,this.nocase=s,this.roots=n,this.root=i||this,this.#D=a,this.#S=o.fullpath,this.#A=o.relative,this.#M=o.relativePosix,this.parent=o.parent,this.parent?this.#e=this.parent.#e:this.#e=vp(o.fs)}depth(){return this.#_!==void 0?this.#_:this.parent?this.#_=this.parent.depth()+1:this.#_=0}childrenCache(){return this.#D}resolve(e){if(!e)return this;let r=this.getRootString(e),n=e.substring(r.length).split(this.splitSep);return r?this.getRoot(r).#q(n):this.#q(n)}#q(e){let r=this;for(let i of e)r=r.child(i);return r}children(){let e=this.#D.get(this);if(e)return e;let r=Object.assign([],{provisional:0});return this.#D.set(this,r),this.#r&=~Do,r}child(e,r){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let i=this.children(),n=this.nocase?as(e):wi(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,Ne,{...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.#M!==void 0)return this.#M;let e=this.name,r=this.parent;if(!r)return this.#M=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&je)===Ne}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#r&je)===xp}isDirectory(){return(this.#r&je)===Xe}isCharacterDevice(){return(this.#r&je)===Ep}isBlockDevice(){return(this.#r&je)===Rp}isFIFO(){return(this.#r&je)===Sp}isSocket(){return(this.#r&je)===Mp}isSymbolicLink(){return(this.#r&Yt)===Yt}lstatCached(){return this.#r&mp?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&je;return!(e!==Ne&&e!==Yt||this.#r&ss||this.#r&ze)}calledReaddir(){return!!(this.#r&Do)}isENOENT(){return!!(this.#r&ze)}isNamed(e){return this.nocase?this.#w===as(e):this.#w===wi(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}}#C(e){this.#r|=Do;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)&mi,this.#T())}#T(){let e=this.children();e.provisional=0;for(let r of e)r.#L()}#O(){this.#r|=os,this.#j()}#j(){if(this.#r&bi)return;let e=this.#r;(e&je)===Xe&&(e&=mi),this.#r=e|bi,this.#T()}#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|=ss,e==="ENOENT"&&(r|=ze),(e==="EINVAL"||e==="UNKNOWN")&&(r&=mi),this.#r=r,e==="ENOTDIR"&&this.parent&&this.parent.#j()}#I(e,r){return this.#P(e,r)||this.#$(e,r)}#$(e,r){let i=qo(e),n=this.newChild(e.name,i,{parent:this}),s=n.#r&je;return s!==Xe&&s!==Yt&&s!==Ne&&(n.#r|=bi),r.unshift(n),r.provisional++,n}#P(e,r){for(let i=r.provisional;i<r.length;i++){let n=r[i];if((this.nocase?as(e.name):wi(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&mi|qo(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 T=qo(e);this.#r=this.#r&mi|T|mp,T!==Ne&&T!==Xe&&T!==Yt&&(this.#r|=bi)}#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.#C(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.#C(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.#C(e)}catch(i){this.#N(i.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#r&yp)return!1;let e=je&this.#r;return e===Ne||e===Xe||e===Yt}shouldWalk(e,r){return(this.#r&Xe)===Xe&&!(this.#r&yp)&&!e.has(this)&&(!r||r(this))}async realpath(){if(this.#k)return this.#k;if(!((os|ss|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(!((os|ss|ze)&this.#r))try{let e=this.#e.realpathSync(this.fullpath());return this.#k=this.resolve(e)}catch{this.#O()}}[Tp](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.#M=i.join("/"),n=n.parent,i.push("..");for(n=e;n&&n.parent&&!r.has(n);)n.#A=void 0,n.#M=void 0,n=n.parent}},us=class t extends me{sep="\\";splitSep=yS;constructor(e,r=Ne,i,n,s,a,o){super(e,r,i,n,s,a,o)}newChild(e,r=Ne,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(e){return Co.parse(e).root}getRoot(e){if(e=mS(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 _r(e,this).root}sameRoot(e,r=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(_p,"$1\\"),e===r}},fs=class t extends me{splitSep="/";sep="/";constructor(e,r=Ne,i,n,s,a,o){super(e,r,i,n,s,a,o)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,r=Ne,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}},hs=class{root;rootPath;roots;cwd;#e;#t;#s;nocase;#i;constructor(e=process.cwd(),r,i,{nocase:n,childrenCacheSize:s=16*1024,fs:a=yi}={}){this.#i=vp(a),(e instanceof URL||e.startsWith("file://"))&&(e=nS(e));let o=r.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#e=new ls,this.#t=new ls,this.#s=new Lo(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 me||(r=e,e=this.cwd);let{withFileTypes:i}=r;if(e.canReaddir()){let n=await e.readdir();return i?n:n.map(s=>s.name)}else return[]}readdirSync(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0}=r;return e.canReaddir()?i?e.readdirSync():e.readdirSync().map(n=>n.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=await e.readlink();return r?i:i?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=e.readlinkSync();return r?i:i?.fullpath()}async realpath(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=await e.realpath();return r?i:i?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=e.realpathSync();return r?i:i?.fullpath()}async walk(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=[];(!s||s(e))&&o.push(i?e:e.fullpath());let l=new Set,u=(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 me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=[];(!s||s(e))&&o.push(i?e:e.fullpath());let l=new Set([e]);for(let u of l){let 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 me||(r=e,e=this.cwd),this.stream(e,r)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r;(!s||s(e))&&(yield i?e:e.fullpath());let o=new Set([e]);for(let l of o){let u=l.readdirSync();for(let 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 me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=new Rt({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 T of E)T.isSymbolicLink()&&x.push(T.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 T=x.realpathCached()||x;T.shouldWalk(l,a)&&u.push(T)}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 me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=new Rt({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[Tp](r)}},_r=class extends hs{sep="\\";constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,Co,"\\",{...r,nocase:i}),this.nocase=i;for(let n=this.cwd;n;n=n.parent)n.nocase=this.nocase}parseRootPath(e){return Co.parse(e).root.toUpperCase()}newRoot(e){return new us(this.rootPath,Xe,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},Sr=class extends hs{sep="/";constructor(e=process.cwd(),r={}){let{nocase:i=!1}=r;super(e,iS,"/",{...r,nocase:i}),this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new fs(this.rootPath,Xe,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},vi=class extends Sr{constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,{...r,nocase:i})}},ux=process.platform==="win32"?us:fs,Op=process.platform==="win32"?_r:process.platform==="darwin"?vi:Sr;var wS=t=>t.length>=1,vS=t=>t.length>=1,Er=class t{#e;#t;#s;length;#i;#a;#v;#u;#h;#o;#l=!0;constructor(e,r,i,n){if(!wS(e))throw new TypeError("empty pattern list");if(!vS(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]===ce}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 _S=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Rr=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:r,nocase:i,noext:n,noglobstar:s,platform:a=_S}){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 Oe(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 Er(n,s,0,this.platform),o=new Oe(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 jo=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()]))}},No=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)])}},Fo=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())}},_i=class t{hasWalkedCache;matches=new No;subwalks=new Fo;patterns;follow;dot;opts;constructor(e,r){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=r?r.copy():new jo}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===ce){(!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===ce?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 SS=(t,e)=>typeof t=="string"?new Rr([t],e):Array.isArray(t)?new Rr(t,e):t,cs=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=SS(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 _i(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 _i(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()}},Si=class extends cs{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}},Ei=class extends cs{results;constructor(e,r,i){super(e,r,i),this.results=new Rt({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 RS=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",He=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=ES(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||RS,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"?_r:r.platform==="darwin"?vi:r.platform?Sr:Op;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 Oe(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 Er(l,c,0,this.platform)})}async walk(){return[...await new Si(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 Si(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 Ei(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 Ei(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 Io=(t,e={})=>{Array.isArray(t)||(t=[t]);for(let r of t)if(new Oe(r,e).hasMagic())return!0;return!1};function ps(t,e={}){return new He(t,e).streamSync()}function kp(t,e={}){return new He(t,e).stream()}function Pp(t,e={}){return new He(t,e).walkSync()}async function Ap(t,e={}){return new He(t,e).walk()}function gs(t,e={}){return new He(t,e).iterateSync()}function Dp(t,e={}){return new He(t,e).iterate()}var xS=ps,MS=Object.assign(kp,{sync:ps}),TS=gs,OS=Object.assign(Dp,{sync:gs}),AS=Object.assign(Pp,{stream:ps,iterate:gs}),ds=Object.assign(Ap,{glob:Ap,globSync:Pp,sync:AS,globStream:kp,stream:MS,globStreamSync:ps,streamSync:xS,globIterate:Dp,iterate:OS,globIterateSync:gs,iterateSync:TS,Glob:He,hasMagic:Io,escape:mr,unescape:Be});ds.glob=ds;var CS="../build",LS="../wheels",jS="streamlit-1.45.1-cp312-none-any.whl",NS="stlite_lib-0.1.0-py3-none-any.whl",FS=DS(import.meta.url),Lp=de.dirname(FS);async function jp(t,e){let r=[],i=n=>{r.push(n)};if(await t.loadPackage(e,{errorCallback:i}),r.length>0)throw new Error(r.join(`
40
- `))}async function IS(t){$.info("Copy the build directory (the bare built app files) to this directory...");let e=de.resolve(Lp,CS);if(!(await xt.stat(e)).isDirectory())throw new Error(`The source ${e} does not exist.`);if(e===t.copyTo){$.warn(`sourceDir == destDir (${e}). Are you in the development environment? Skip copying the directory.`);return}if(t.keepOld)try{await xt.access(t.copyTo),$.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`)}$.debug(`Copy ${e} to ${t.copyTo}`),await xt.rm(t.copyTo,{recursive:!0,force:!0}),await $o.copy(e,t.copyTo,{errorOnExist:!0})}async function $S(t){if(t.requirements.length===0)return[];let e=await Cp({packageCacheDir:t.pyodideRuntimeDir});return e._api.setCdnUrl(t.pyodideSource),await Np(e,{requirements:t.requirements}),Object.entries(e.loadedPackages).filter(([,r])=>r==="default channel").map(([r])=>r)}async function qp(t,e){$.debug("Preparing the local wheel: %s",e);let r=await xt.readFile(e),i="/tmp/"+de.basename(e);t.FS.writeFile(i,r);let n=`emfs:${i}`;return $.debug("The local wheel %s is prepared as %s",e,n),n}async function Np(t,e){await jp(t,"micropip");let r=t.pyimport("micropip"),i=[...e.requirements],n=de.join(Lp,LS),s=await qp(t,de.join(n,NS));i.push(s);let a=await qp(t,de.join(n,jS));i.push(a),$.info("Install the packages: %j",i),await r.install.callKwargs(i,{keep_going:!0})}async function WS(t){$.info("Create the site-packages snapshot file...");let e=await Cp({packageCacheDir:t.pyodideRuntimeDir});e._api.setCdnUrl(t.pyodideSource),await jp(e,"micropip");let r=e.pyimport("micropip"),i=new Yn(t.pyodideSource),n=[];if(t.usedPrebuiltPackages.length>0){$.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.`);$.debug(`Mock ${l.name} ${l.version}`),r.add_mock_package(l.name,l.version),n.push(l.name)}}$.info("Install the requirements %j",t.requirements),await Np(e,{requirements:t.requirements}),$.info("Remove the mocked packages: %j",n),n.forEach(o=>r.remove_mock_package(o)),$.info("Archive the site-packages director(y|ies)");let s="/tmp/site-packages-snapshot.tar.gz";await e.runPythonAsync(`
39
+ >>> 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 ep(this.pattern,this.options)}parse(e){li(e);let r=this.options;if(e==="**")return he;if(e==="")return"";let i,n=null;(i=e.match(D_))?n=r.dot?C_:q_:(i=e.match(S_))?n=(r.nocase?r.dot?M_:x_:r.dot?R_:E_)(i[1]):(i=e.match(L_))?n=(r.nocase?r.dot?N_:j_:r.dot?F_:I_)(i):(i=e.match(T_))?n=r.dot?A_:O_:(i=e.match(k_))&&(n=P_);let s=gr.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?B_:r.dot?U_:z_,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"?K_(c):c===he?he:c._src});return u.forEach((c,h)=>{let d=u[h+1],f=u[h-1];c!==he||f===he||(f===void 0?d!==void 0&&d!==he?u[h+1]="(?:\\/|"+i+"\\/)?"+d:u[h]=i:d===void 0?u[h-1]=f+"(?:\\/|"+i+")?":d!==he&&(u[h-1]=f+"(?:\\/|\\/"+i+"\\/)"+d,u[h+1]=he))}),u.filter(c=>c!==he).join("/")}).join("|"),[a,o]=e.length>1?["(?:",")"]:["",""];s="^"+a+s+o+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let i=this.options;this.isWindows&&(e=e.split("\\").join("/"));let n=this.slashSplit(e);this.debug(this.pattern,"split",n);let s=this.set;this.debug(this.pattern,"set",s);let a=n[n.length-1];if(!a)for(let o=n.length-2;!a&&o>=0;o--)a=n[o];for(let o=0;o<s.length;o++){let l=s[o],u=n;if(i.matchBase&&l.length===1&&(u=[a]),this.matchOne(u,l,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(e){return _e.defaults(e).Minimatch}};_e.AST=gr;_e.Minimatch=Oe;_e.escape=mr;_e.unescape=Be;import{fileURLToPath as TS}from"node:url";var yr=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,rp=new Set,Ro=typeof process=="object"&&process?process:{},ip=(t,e,r,i)=>{typeof Ro.emitWarning=="function"?Ro.emitWarning(t,e,r,i):console.error(`[${r}] ${e}: ${t}`)},Qn=globalThis.AbortController,tp=globalThis.AbortSignal;if(typeof Qn>"u"){tp=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,n){this._onabort.push(n)}},Qn=class{constructor(){e()}signal=new tp;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=Ro.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,ip("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 J_=t=>!rp.has(t),ix=Symbol("type"),St=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),np=t=>St(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?br:null:null,br=class extends Array{constructor(e){super(e),this.fill(0)}},xo=class t{heap;length;static#e=!1;static create(e){let r=np(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]}},fi=class t{#e;#t;#s;#i;#a;#v;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#u;#c;#o;#l;#n;#m;#y;#d;#h;#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.#h},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.#T(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.#c}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:j}=e;if(r!==0&&!St(r))throw new TypeError("max option must be a nonnegative integer");let U=r?np(r):Array;if(!U)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 U(r),this.#y=new U(r),this.#d=0,this.#h=0,this.#E=xo.create(r),this.#u=0,this.#c=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=!!j,this.maxEntrySize!==0){if(this.#t!==0&&!St(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!St(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=St(n)||n===0?n:1,this.ttlAutopurge=!!s,this.ttl=i||0,this.ttl){if(!St(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 F="LRU_CACHE_UNBOUNDED";J_(F)&&(rp.add(F),ip("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",F,t))}}getRemainingTTL(e){return this.#o.has(e)?1/0:0}#A(){let e=new br(this.#e),r=new br(this.#e);this.#w=e,this.#x=r,this.#D=(s,a,o=yr.now())=>{if(r[s]=a!==0?o:0,e[s]=a,a!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#b(s)&&this.#P(this.#l[s],"expire")},a+1);l.unref&&l.unref()}},this.#M=s=>{r[s]=e[s]!==0?yr.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=yr.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}}#M=()=>{};#r=()=>{};#D=()=>{};#b=()=>!1;#k(){let e=new br(this.#e);this.#c=0,this.#R=e,this.#q=r=>{this.#c-=e[r],e[r]=0},this.#L=(r,i,n,s)=>{if(this.#f(i))return 0;if(!St(n))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(n=s(i,r),!St(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.#C=(r,i,n)=>{if(e[r]=i,this.#t){let s=this.#t-e[r];for(;this.#c>s;)this.#N(!0)}this.#c+=e[r],n&&(n.entrySize=i,n.totalCalculatedSize=this.#c)}}#q=e=>{};#C=(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};*#T({allowStale:e=this.allowStale}={}){if(this.#u)for(let r=this.#h;!(!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.#h));)r=this.#m[r]}#j(e){return e!==void 0&&this.#o.get(this.#l[e])===e}*entries(){for(let e of this.#T())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.#T()){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.#T())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.#T()){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.#T()){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.#P(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-(yr.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.#T({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=yr.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=yr.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.#P(e,"set"),this;let h=this.#u===0?void 0:this.#o.get(e);if(h===void 0)h=this.#u===0?this.#h: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.#h]=h,this.#y[h]=this.#h,this.#h=h,this.#u++,this.#C(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.#q(h),this.#C(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.#D(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.#q(r),e&&(this.#l[r]=void 0,this.#n[r]=void 0,this.#E.push(r)),this.#u===1?(this.#d=this.#h=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.#M(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 Qn,{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.#P(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.#P(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 Qn}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 ne=i&&k.__staleWhileFetching!==void 0;return E&&(E.fetch="inflight",ne&&(E.returnedStale=!0)),ne?k.__staleWhileFetching:k.__returned=k}let j=this.#b(M);if(!_&&!j)return E&&(E.fetch="hit"),this.#$(M),n&&this.#M(M),E&&this.#r(E,M),k;let U=this.#F(e,M,x,b),G=U.__staleWhileFetching!==void 0&&i;return E&&(E.fetch=j?"stale":"refresh",G&&j&&(E.returnedStale=!0)),G?U.__staleWhileFetching:U.__returned=U}}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.#P(e,"expire"),a&&i&&(a.returnedStale=!0),i?l:void 0)):(a&&(a.get="hit"),u?l.__staleWhileFetching:(this.#$(o),n&&this.#M(o),l))}else a&&(a.get="miss")}#I(e,r){this.#y[r]=e,this.#m[e]=r}#$(e){e!==this.#h&&(e===this.#d?this.#d=this.#m[e]:this.#I(this.#y[e],this.#m[e]),this.#I(this.#h,e),this.#h=e)}delete(e){return this.#P(e,"delete")}#P(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.#q(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.#h)this.#h=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.#h=0,this.#E.length=0,this.#c=0,this.#u=0,this.#p&&this.#g){let r=this.#g,i;for(;i=r?.shift();)this.#i?.(...i)}}};import{posix as oS,win32 as Lo}from"node:path";import{fileURLToPath as lS}from"node:url";import{lstatSync as uS,readdir as fS,readdirSync as cS,readlinkSync as hS,realpathSync as dS}from"fs";import*as pS from"node:fs";import{lstat as mS,readdir as yS,readlink as bS,realpath as wS}from"node:fs/promises";import{EventEmitter as Do}from"node:events";import up from"node:stream";import{StringDecoder as Z_}from"node:string_decoder";var sp=typeof process=="object"&&process?process:{stdout:null,stderr:null},Q_=t=>!!t&&typeof t=="object"&&(t instanceof Rt||t instanceof up||X_(t)||eS(t)),X_=t=>!!t&&typeof t=="object"&&t instanceof Do&&typeof t.pipe=="function"&&t.pipe!==up.Writable.prototype.pipe,eS=t=>!!t&&typeof t=="object"&&t instanceof Do&&typeof t.write=="function"&&typeof t.end=="function",nt=Symbol("EOF"),st=Symbol("maybeEmitEnd"),Et=Symbol("emittedEnd"),Xn=Symbol("emittingEnd"),ci=Symbol("emittedError"),es=Symbol("closed"),ap=Symbol("read"),ts=Symbol("flush"),op=Symbol("flushChunk"),Ue=Symbol("encoding"),wr=Symbol("decoder"),ae=Symbol("flowing"),hi=Symbol("paused"),vr=Symbol("resume"),oe=Symbol("buffer"),Se=Symbol("pipes"),le=Symbol("bufferLength"),Mo=Symbol("bufferPush"),rs=Symbol("bufferShift"),ge=Symbol("objectMode"),ee=Symbol("destroyed"),To=Symbol("error"),Oo=Symbol("emitData"),lp=Symbol("emitEnd"),Ao=Symbol("emitEnd2"),Qe=Symbol("async"),ko=Symbol("abort"),is=Symbol("aborted"),di=Symbol("signal"),Vt=Symbol("dataListeners"),Ae=Symbol("discarded"),pi=t=>Promise.resolve().then(t),tS=t=>t(),rS=t=>t==="end"||t==="finish"||t==="prefinish",iS=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,nS=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),ns=class{src;dest;opts;ondrain;constructor(e,r,i){this.src=e,this.dest=r,this.opts=i,this.ondrain=()=>e[vr](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Po=class extends ns{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)}},sS=t=>!!t.objectMode,aS=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",Rt=class extends Do{[ae]=!1;[hi]=!1;[Se]=[];[oe]=[];[ge];[Ue];[Qe];[wr];[nt]=!1;[Et]=!1;[Xn]=!1;[es]=!1;[ci]=null;[le]=0;[ee]=!1;[di];[is]=!1;[Vt]=0;[Ae]=!1;writable=!0;readable=!0;constructor(...e){let r=e[0]||{};if(super(),r.objectMode&&typeof r.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");sS(r)?(this[ge]=!0,this[Ue]=null):aS(r)?(this[Ue]=r.encoding,this[ge]=!1):(this[ge]=!1,this[Ue]=null),this[Qe]=!!r.async,this[wr]=this[Ue]?new Z_(this[Ue]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[oe]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Se]});let{signal:i}=r;i&&(this[di]=i,i.aborted?this[ko]():i.addEventListener("abort",()=>this[ko]()))}get bufferLength(){return this[le]}get encoding(){return this[Ue]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[ge]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Qe]}set async(e){this[Qe]=this[Qe]||!!e}[ko](){this[is]=!0,this.emit("abort",this[di]?.reason),this.destroy(this[di]?.reason)}get aborted(){return this[is]}set aborted(e){}write(e,r,i){if(this[is])return!1;if(this[nt])throw new Error("write after end");if(this[ee])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(i=r,r="utf8"),r||(r="utf8");let n=this[Qe]?pi:tS;if(!this[ge]&&!Buffer.isBuffer(e)){if(nS(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(iS(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[ge]?(this[ae]&&this[le]!==0&&this[ts](!0),this[ae]?this.emit("data",e):this[Mo](e),this[le]!==0&&this.emit("readable"),i&&n(i),this[ae]):e.length?(typeof e=="string"&&!(r===this[Ue]&&!this[wr]?.lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[Ue]&&(e=this[wr].write(e)),this[ae]&&this[le]!==0&&this[ts](!0),this[ae]?this.emit("data",e):this[Mo](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[ee])return null;if(this[Ae]=!1,this[le]===0||e===0||e&&e>this[le])return this[st](),null;this[ge]&&(e=null),this[oe].length>1&&!this[ge]&&(this[oe]=[this[Ue]?this[oe].join(""):Buffer.concat(this[oe],this[le])]);let r=this[ap](e||null,this[oe][0]);return this[st](),r}[ap](e,r){if(this[ge])this[rs]();else{let i=r;e===i.length||e===null?this[rs]():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[nt]&&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[nt]=!0,this.writable=!1,(this[ae]||!this[hi])&&this[st](),this}[vr](){this[ee]||(!this[Vt]&&!this[Se].length&&(this[Ae]=!0),this[hi]=!1,this[ae]=!0,this.emit("resume"),this[oe].length?this[ts]():this[nt]?this[st]():this.emit("drain"))}resume(){return this[vr]()}pause(){this[ae]=!1,this[hi]=!0,this[Ae]=!1}get destroyed(){return this[ee]}get flowing(){return this[ae]}get paused(){return this[hi]}[Mo](e){this[ge]?this[le]+=1:this[le]+=e.length,this[oe].push(e)}[rs](){return this[ge]?this[le]-=1:this[le]-=this[oe][0].length,this[oe].shift()}[ts](e=!1){do;while(this[op](this[rs]())&&this[oe].length);!e&&!this[oe].length&&!this[nt]&&this.emit("drain")}[op](e){return this.emit("data",e),this[ae]}pipe(e,r){if(this[ee])return e;this[Ae]=!1;let i=this[Et];return r=r||{},e===sp.stdout||e===sp.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,i?r.end&&e.end():(this[Se].push(r.proxyErrors?new Po(this,e,r):new ns(this,e,r)),this[Qe]?pi(()=>this[vr]()):this[vr]()),e}unpipe(e){let r=this[Se].find(i=>i.dest===e);r&&(this[Se].length===1?(this[ae]&&this[Vt]===0&&(this[ae]=!1),this[Se]=[]):this[Se].splice(this[Se].indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let i=super.on(e,r);if(e==="data")this[Ae]=!1,this[Vt]++,!this[Se].length&&!this[ae]&&this[vr]();else if(e==="readable"&&this[le]!==0)super.emit("readable");else if(rS(e)&&this[Et])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[ci]){let n=r;this[Qe]?pi(()=>n.call(this,this[ci])):n.call(this,this[ci])}return i}removeListener(e,r){return this.off(e,r)}off(e,r){let i=super.off(e,r);return e==="data"&&(this[Vt]=this.listeners("data").length,this[Vt]===0&&!this[Ae]&&!this[Se].length&&(this[ae]=!1)),i}removeAllListeners(e){let r=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Vt]=0,!this[Ae]&&!this[Se].length&&(this[ae]=!1)),r}get emittedEnd(){return this[Et]}[st](){!this[Xn]&&!this[Et]&&!this[ee]&&this[oe].length===0&&this[nt]&&(this[Xn]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[es]&&this.emit("close"),this[Xn]=!1)}emit(e,...r){let i=r[0];if(e!=="error"&&e!=="close"&&e!==ee&&this[ee])return!1;if(e==="data")return!this[ge]&&!i?!1:this[Qe]?(pi(()=>this[Oo](i)),!0):this[Oo](i);if(e==="end")return this[lp]();if(e==="close"){if(this[es]=!0,!this[Et]&&!this[ee])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[ci]=i,super.emit(To,i);let s=!this[di]||this.listeners("error").length?super.emit("error",i):!1;return this[st](),s}else if(e==="resume"){let s=super.emit("resume");return this[st](),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[st](),n}[Oo](e){for(let i of this[Se])i.dest.write(e)===!1&&this.pause();let r=this[Ae]?!1:super.emit("data",e);return this[st](),r}[lp](){return this[Et]?!1:(this[Et]=!0,this.readable=!1,this[Qe]?(pi(()=>this[Ao]()),!0):this[Ao]())}[Ao](){if(this[wr]){let r=this[wr].end();if(r){for(let i of this[Se])i.dest.write(r);this[Ae]||super.emit("data",r)}}for(let r of this[Se])r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[ge]||(e.dataLength=0);let r=this.promise();return this.on("data",i=>{e.push(i),this[ge]||(e.dataLength+=i.length)}),await r,e}async concat(){if(this[ge])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Ue]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,r)=>{this.on(ee,()=>r(new Error("stream destroyed"))),this.on("error",i=>r(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Ae]=!1;let e=!1,r=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return r();let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[nt])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[nt]})},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[Ae]=!1;let e=!1,r=()=>(this.pause(),this.off(To,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(To,r),this.once(ee,r),{next:i,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(e){if(this[ee])return e?this.emit("error",e):this.emit(ee),this;this[ee]=!0,this[Ae]=!0,this[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(ee),this}static get isStream(){return Q_}};var gS=dS.native,mi={lstatSync:uS,readdir:fS,readdirSync:cS,readlinkSync:hS,realpathSync:gS,promises:{lstat:mS,readdir:yS,readlink:bS,realpath:wS}},pp=t=>!t||t===mi||t===pS?mi:{...mi,...t,promises:{...mi.promises,...t.promises||{}}},gp=/^\\\\\?\\([a-z]:)\\?$/i,vS=t=>t.replace(/\//g,"\\").replace(gp,"$1\\"),_S=/[\\\/]/,Ne=0,mp=1,yp=2,Xe=4,bp=6,wp=8,Yt=10,vp=12,je=15,gi=~je,qo=16,fp=32,yi=64,ze=128,ss=256,os=512,cp=yi|ze|os,SS=1023,Co=t=>t.isFile()?wp:t.isDirectory()?Xe:t.isSymbolicLink()?Yt:t.isCharacterDevice()?yp:t.isBlockDevice()?bp:t.isSocket()?vp:t.isFIFO()?mp:Ne,hp=new Map,bi=t=>{let e=hp.get(t);if(e)return e;let r=t.normalize("NFKD");return hp.set(t,r),r},dp=new Map,as=t=>{let e=dp.get(t);if(e)return e;let r=bi(t.toLowerCase());return dp.set(t,r),r},ls=class extends fi{constructor(){super({max:256})}},jo=class extends fi{constructor(e=16*1024){super({maxSize:e,sizeCalculation:r=>r.length+1})}},_p=Symbol("PathScurry setAsCwd"),me=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}#c;get blksize(){return this.#c}#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}#h;get birthtimeMs(){return this.#h}#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;#M;#r;#D;#b;#k;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,r=Ne,i,n,s,a,o){this.name=e,this.#w=s?as(e):bi(e),this.#r=r&SS,this.nocase=s,this.roots=n,this.root=i||this,this.#D=a,this.#S=o.fullpath,this.#A=o.relative,this.#M=o.relativePosix,this.parent=o.parent,this.parent?this.#e=this.parent.#e:this.#e=pp(o.fs)}depth(){return this.#_!==void 0?this.#_:this.parent?this.#_=this.parent.depth()+1:this.#_=0}childrenCache(){return this.#D}resolve(e){if(!e)return this;let r=this.getRootString(e),n=e.substring(r.length).split(this.splitSep);return r?this.getRoot(r).#q(n):this.#q(n)}#q(e){let r=this;for(let i of e)r=r.child(i);return r}children(){let e=this.#D.get(this);if(e)return e;let r=Object.assign([],{provisional:0});return this.#D.set(this,r),this.#r&=~qo,r}child(e,r){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let i=this.children(),n=this.nocase?as(e):bi(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,Ne,{...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.#M!==void 0)return this.#M;let e=this.name,r=this.parent;if(!r)return this.#M=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&je)===Ne}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#r&je)===wp}isDirectory(){return(this.#r&je)===Xe}isCharacterDevice(){return(this.#r&je)===yp}isBlockDevice(){return(this.#r&je)===bp}isFIFO(){return(this.#r&je)===mp}isSocket(){return(this.#r&je)===vp}isSymbolicLink(){return(this.#r&Yt)===Yt}lstatCached(){return this.#r&fp?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&je;return!(e!==Ne&&e!==Yt||this.#r&ss||this.#r&ze)}calledReaddir(){return!!(this.#r&qo)}isENOENT(){return!!(this.#r&ze)}isNamed(e){return this.nocase?this.#w===as(e):this.#w===bi(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}}#C(e){this.#r|=qo;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)&gi,this.#T())}#T(){let e=this.children();e.provisional=0;for(let r of e)r.#L()}#O(){this.#r|=os,this.#j()}#j(){if(this.#r&yi)return;let e=this.#r;(e&je)===Xe&&(e&=gi),this.#r=e|yi,this.#T()}#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|=ss,e==="ENOENT"&&(r|=ze),(e==="EINVAL"||e==="UNKNOWN")&&(r&=gi),this.#r=r,e==="ENOTDIR"&&this.parent&&this.parent.#j()}#I(e,r){return this.#P(e,r)||this.#$(e,r)}#$(e,r){let i=Co(e),n=this.newChild(e.name,i,{parent:this}),s=n.#r&je;return s!==Xe&&s!==Yt&&s!==Ne&&(n.#r|=yi),r.unshift(n),r.provisional++,n}#P(e,r){for(let i=r.provisional;i<r.length;i++){let n=r[i];if((this.nocase?as(e.name):bi(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&gi|Co(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.#h=s,this.#c=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=Co(e);this.#r=this.#r&gi|M|fp,M!==Ne&&M!==Xe&&M!==Yt&&(this.#r|=yi)}#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.#C(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.#C(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.#C(e)}catch(i){this.#N(i.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#r&cp)return!1;let e=je&this.#r;return e===Ne||e===Xe||e===Yt}shouldWalk(e,r){return(this.#r&Xe)===Xe&&!(this.#r&cp)&&!e.has(this)&&(!r||r(this))}async realpath(){if(this.#k)return this.#k;if(!((os|ss|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(!((os|ss|ze)&this.#r))try{let e=this.#e.realpathSync(this.fullpath());return this.#k=this.resolve(e)}catch{this.#O()}}[_p](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.#M=i.join("/"),n=n.parent,i.push("..");for(n=e;n&&n.parent&&!r.has(n);)n.#A=void 0,n.#M=void 0,n=n.parent}},us=class t extends me{sep="\\";splitSep=_S;constructor(e,r=Ne,i,n,s,a,o){super(e,r,i,n,s,a,o)}newChild(e,r=Ne,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(e){return Lo.parse(e).root}getRoot(e){if(e=vS(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 _r(e,this).root}sameRoot(e,r=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(gp,"$1\\"),e===r}},fs=class t extends me{splitSep="/";sep="/";constructor(e,r=Ne,i,n,s,a,o){super(e,r,i,n,s,a,o)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,r=Ne,i={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),i)}},cs=class{root;rootPath;roots;cwd;#e;#t;#s;nocase;#i;constructor(e=process.cwd(),r,i,{nocase:n,childrenCacheSize:s=16*1024,fs:a=mi}={}){this.#i=pp(a),(e instanceof URL||e.startsWith("file://"))&&(e=lS(e));let o=r.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(o),this.#e=new ls,this.#t=new ls,this.#s=new jo(s);let l=o.substring(this.rootPath.length).split(i);if(l.length===1&&!l[0]&&l.pop(),n===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=n,this.root=this.newRoot(this.#i),this.roots[this.rootPath]=this.root;let u=this.root,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 me||(r=e,e=this.cwd);let{withFileTypes:i}=r;if(e.canReaddir()){let n=await e.readdir();return i?n:n.map(s=>s.name)}else return[]}readdirSync(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0}=r;return e.canReaddir()?i?e.readdirSync():e.readdirSync().map(n=>n.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=await e.readlink();return r?i:i?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=e.readlinkSync();return r?i:i?.fullpath()}async realpath(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=await e.realpath();return r?i:i?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e.withFileTypes,e=this.cwd);let i=e.realpathSync();return r?i:i?.fullpath()}async walk(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=[];(!s||s(e))&&o.push(i?e:e.fullpath());let l=new Set,u=(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 me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=[];(!s||s(e))&&o.push(i?e:e.fullpath());let l=new Set([e]);for(let u of l){let 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 me||(r=e,e=this.cwd),this.stream(e,r)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r;(!s||s(e))&&(yield i?e:e.fullpath());let o=new Set([e]);for(let l of o){let u=l.readdirSync();for(let 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 me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=new Rt({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 me||(r=e,e=this.cwd);let{withFileTypes:i=!0,follow:n=!1,filter:s,walkFilter:a}=r,o=new Rt({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[_p](r)}},_r=class extends cs{sep="\\";constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,Lo,"\\",{...r,nocase:i}),this.nocase=i;for(let n=this.cwd;n;n=n.parent)n.nocase=this.nocase}parseRootPath(e){return Lo.parse(e).root.toUpperCase()}newRoot(e){return new us(this.rootPath,Xe,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},Sr=class extends cs{sep="/";constructor(e=process.cwd(),r={}){let{nocase:i=!1}=r;super(e,oS,"/",{...r,nocase:i}),this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new fs(this.rootPath,Xe,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},wi=class extends Sr{constructor(e=process.cwd(),r={}){let{nocase:i=!0}=r;super(e,{...r,nocase:i})}},gx=process.platform==="win32"?us:fs,Sp=process.platform==="win32"?_r:process.platform==="darwin"?wi:Sr;var ES=t=>t.length>=1,RS=t=>t.length>=1,Er=class t{#e;#t;#s;length;#i;#a;#v;#u;#c;#o;#l=!0;constructor(e,r,i,n){if(!ES(e))throw new TypeError("empty pattern list");if(!RS(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]===he}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.#c=this.#c,this.#a.#u=this.#u,this.#a):this.#a=null}isUNC(){let e=this.#e;return this.#c!==void 0?this.#c:this.#c=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 xS=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Rr=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:r,nocase:i,noext:n,noglobstar:s,platform:a=xS}){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 Oe(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 Er(n,s,0,this.platform),o=new Oe(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 No=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()]))}},Fo=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)])}},Io=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())}},vi=class t{hasWalkedCache;matches=new Fo;subwalks=new Io;patterns;follow;dot;opts;constructor(e,r){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=r?r.copy():new No}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===he){(!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===he?n.testGlobstar(s,a,u,o):l instanceof RegExp?n.testRegExp(s,l,u,o):n.testString(s,l,u,o)}return n}testGlobstar(e,r,i,n){if((this.dot||!e.name.startsWith("."))&&(r.hasMore()||this.matches.add(e,n,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,r):e.isSymbolicLink()&&(i&&r.checkFollowGlobstar()?this.subwalks.add(e,i):r.markFollowGlobstar()&&this.subwalks.add(e,r)))),i){let s=i.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(e,s,i.rest(),n);else if(s===".."){let a=e.parent||e;this.subwalks.add(a,i)}else s instanceof RegExp&&this.testRegExp(e,s,i.rest(),n)}}testRegExp(e,r,i,n){r.test(e.name)&&(i?this.subwalks.add(e,i):this.matches.add(e,n,!1))}testString(e,r,i,n){e.isNamed(r)&&(i?this.subwalks.add(e,i):this.matches.add(e,n,!1))}};var MS=(t,e)=>typeof t=="string"?new Rr([t],e):Array.isArray(t)?new Rr(t,e):t,hs=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=MS(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 vi(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 vi(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()}},_i=class extends hs{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}},Si=class extends hs{results;constructor(e,r,i){super(e,r,i),this.results=new Rt({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 OS=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",He=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=TS(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||OS,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"?_r:r.platform==="darwin"?wi:r.platform?Sr:Sp;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 Oe(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 Er(l,c,0,this.platform)})}async walk(){return[...await new _i(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 _i(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 Si(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 Si(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 $o=(t,e={})=>{Array.isArray(t)||(t=[t]);for(let r of t)if(new Oe(r,e).hasMagic())return!0;return!1};function ps(t,e={}){return new He(t,e).streamSync()}function Rp(t,e={}){return new He(t,e).stream()}function xp(t,e={}){return new He(t,e).walkSync()}async function Ep(t,e={}){return new He(t,e).walk()}function gs(t,e={}){return new He(t,e).iterateSync()}function Mp(t,e={}){return new He(t,e).iterate()}var AS=ps,kS=Object.assign(Rp,{sync:ps}),PS=gs,DS=Object.assign(Mp,{sync:gs}),qS=Object.assign(xp,{stream:ps,iterate:gs}),ds=Object.assign(Ep,{glob:Ep,globSync:xp,sync:qS,globStream:Rp,stream:kS,globStreamSync:ps,streamSync:AS,globIterate:Mp,iterate:DS,globIterateSync:gs,iterateSync:PS,Glob:He,hasMagic:$o,escape:mr,unescape:Be});ds.glob=ds;var FS="../build",IS="../wheels",$S="streamlit-1.45.1-cp312-none-any.whl",WS="stlite_lib-0.1.0-py3-none-any.whl",BS=jS(import.meta.url),Ap=de.dirname(BS);async function kp(t,e){let r=[],i=n=>{r.push(n)};if(await t.loadPackage(e,{errorCallback:i}),r.length>0)throw new Error(r.join(`
40
+ `))}async function US(t){I.info("Copy the build directory (the bare built app files) to this directory...");let e=de.resolve(Ap,FS);if(!(await xt.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 xt.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 xt.rm(t.copyTo,{recursive:!0,force:!0}),await Wo.copy(e,t.copyTo,{errorOnExist:!0})}async function zS(t){if(t.requirements.length===0)return[];let e=await Op({packageCacheDir:t.pyodideRuntimeDir});return e._api.setCdnUrl(t.pyodideSource),await Pp(e,{requirements:t.requirements}),Object.entries(e.loadedPackages).filter(([,r])=>r==="default channel").map(([r])=>r)}async function Tp(t,e){I.debug("Preparing the local wheel: %s",e);let r=await xt.readFile(e),i="/tmp/"+de.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 Pp(t,e){await kp(t,"micropip");let r=t.pyimport("micropip"),i=[...e.requirements],n=de.join(Ap,IS),s=await Tp(t,de.join(n,WS));i.push(s);let a=await Tp(t,de.join(n,$S));i.push(a),I.info("Install the packages: %j",i),await r.install.callKwargs(i,{keep_going:!0})}async function HS(t){I.info("Create the site-packages snapshot file...");let e=await Op({packageCacheDir:t.pyodideRuntimeDir});e._api.setCdnUrl(t.pyodideSource),await kp(e,"micropip");let r=e.pyimport("micropip"),i=new Yn(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 Pp(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(`
41
41
  import os
42
42
  import tarfile
43
43
  import site
@@ -50,8 +50,8 @@ globstar while`,e,d,r,f,y),this.matchOne(e.slice(d),r.slice(f),i))return this.de
50
50
  print("Add site-package:", site_packages)
51
51
  print(os.listdir(site_packages))
52
52
  gzf.add(site_packages)
53
- `),$.info("Extract the archive file from EMFS");let a=e.FS.readFile(s);$.info(`Save the archive file (${t.saveTo})`),await xt.writeFile(t.saveTo,a)}async function BS(t){$.info("Copy the app directory..."),await Promise.all(t.filePathPatterns.map(async e=>{let r=await ds(e,{cwd:t.cwd,absolute:!1});if(r.length===0){$.warn(`No files match the pattern "${e}" in "${t.cwd}".`);return}await Promise.all(r.map(async i=>{let n=de.resolve(t.cwd,i),s=de.resolve(t.destAppDir,i);$.debug(`Copy ${n} to ${s}`),await $o.copy(n,s,{errorOnExist:!0})}))}))}async function US(t,e){try{await xt.access(de.resolve(t,e))}catch{throw new Error(`The entrypoint file "${e}" is not included in the bundled files.`)}}async function zS(t){let e=await xt.readFile(t,{encoding:"utf-8"});return Ld(e)}async function HS(t,e){let r=e.join(`
54
- `);await xt.writeFile(t,r,{encoding:"utf-8"})}kS(PS(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${qS}/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=>{$.level=t.logLevel,$.debug("Command line arguments: %j",t);let e=t.project,r=de.resolve(e,"./build"),i=de.resolve(e,"./package.json"),n=await $o.readJson(i),s=await qd({pathResolutionRoot:e,packageJsonStliteDesktopField:n.stlite?.desktop,fallbacks:{appHomeDirSource:t.appHomeDirSource,packages:t.packages,requirementsTxtFilePaths:t.requirement}});$.info("File/directory patterns to be included: %j",s.files),$.info("Entrypoint: %s",s.entrypoint),$.info("Dependencies: %j",s.dependencies),$.info("`requirements.txt` files: %j",s.requirementsTxtFilePaths);let a=await Promise.all(s.requirementsTxtFilePaths.map(async c=>zS(c))).then(c=>c.flat());$.info("Dependencies from `requirements.txt` files: %j",a);let o=Cd([...s.dependencies,...a]);$.info("Validated dependency list: %j",o),await IS({copyTo:r,keepOld:t.keepOldBuild});let l=await $S({pyodideSource:t.pyodideSource,pyodideRuntimeDir:de.resolve(r,"./pyodide"),requirements:o});$.info("The prebuilt packages loaded for the given requirements: %j",l);let u=de.resolve(r,"./app_files");await BS({cwd:e,filePathPatterns:s.files,destAppDir:u}),US(u,s.entrypoint),await WS({requirements:o,usedPrebuiltPackages:l,pyodideSource:t.pyodideSource,pyodideRuntimeDir:de.resolve(r,"./pyodide"),saveTo:de.resolve(r,"./site-packages-snapshot.tar.gz")}),await HS(de.resolve(r,"./prebuilt-packages.txt"),l),await Dd({packageJsonStliteDesktopField:n.stlite?.desktop,manifestFilePath:de.resolve(r,"./stlite-manifest.json"),fallbacks:{entrypoint:s.entrypoint}})});
53
+ `),I.info("Extract the archive file from EMFS");let a=e.FS.readFile(s);I.info(`Save the archive file (${t.saveTo})`),await xt.writeFile(t.saveTo,a)}async function GS(t){I.info("Copy the app directory..."),await Promise.all(t.filePathPatterns.map(async e=>{let r=await ds(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=de.resolve(t.cwd,i),s=de.resolve(t.destAppDir,i);I.debug(`Copy ${n} to ${s}`),await Wo.copy(n,s,{errorOnExist:!0})}))}))}async function VS(t,e){try{await xt.access(de.resolve(t,e))}catch{throw new Error(`The entrypoint file "${e}" is not included in the bundled files.`)}}async function YS(t){let e=await xt.readFile(t,{encoding:"utf-8"});return jd(e)}async function KS(t,e){let r=e.join(`
54
+ `);await xt.writeFile(t,r,{encoding:"utf-8"})}CS(LS(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${NS}/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=de.resolve(e,"./build"),i=de.resolve(e,"./package.json"),n=await Wo.readJson(i),s=await Cd({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=>YS(c))).then(c=>c.flat());I.info("Dependencies from `requirements.txt` files: %j",a);let o=Ld([...s.dependencies,...a]);I.info("Validated dependency list: %j",o),await US({copyTo:r,keepOld:t.keepOldBuild});let l=await zS({pyodideSource:t.pyodideSource,pyodideRuntimeDir:de.resolve(r,"./pyodide"),requirements:o});I.info("The prebuilt packages loaded for the given requirements: %j",l);let u=de.resolve(r,"./app_files");await GS({cwd:e,filePathPatterns:s.files,destAppDir:u}),VS(u,s.entrypoint),await HS({requirements:o,usedPrebuiltPackages:l,pyodideSource:t.pyodideSource,pyodideRuntimeDir:de.resolve(r,"./pyodide"),saveTo:de.resolve(r,"./site-packages-snapshot.tar.gz")}),await KS(de.resolve(r,"./prebuilt-packages.txt"),l),await qd({packageJsonStliteDesktopField:n.stlite?.desktop,manifestFilePath:de.resolve(r,"./stlite-manifest.json"),fallbacks:{entrypoint:s.entrypoint}})});
55
55
  /*! Bundled license information:
56
56
 
57
57
  safe-buffer/index.js: