monocart-reporter 2.9.21 → 2.9.22

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.
@@ -1,16 +1,16 @@
1
1
  var $u=Object.create;var Kt=Object.defineProperty;var zu=Object.getOwnPropertyDescriptor;var Gu=Object.getOwnPropertyNames;var ju=Object.getPrototypeOf,Hu=Object.prototype.hasOwnProperty;var v=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Vu=(r,e)=>{for(var t in e)Kt(r,t,{get:e[t],enumerable:!0})},Br=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Gu(e))!Hu.call(r,s)&&s!==t&&Kt(r,s,{get:()=>e[s],enumerable:!(i=zu(e,s))||i.enumerable});return r};var F=(r,e,t)=>(t=r!=null?$u(ju(r)):{},Br(e||!r||!r.__esModule?Kt(t,"default",{value:r,enumerable:!0}):t,r)),qu=r=>Br(Kt({},"__esModule",{value:!0}),r);var $r=v((bd,Wr)=>{"use strict";var Zu=/[|\\{}()[\]^$+*?.-]/g;Wr.exports=r=>{if(typeof r!="string")throw new TypeError("Expected a string");return r.replace(Zu,"\\$&")}});var Hr=v((wd,jr)=>{"use strict";var Yu=$r(),Ku=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",Gr=[].concat(require("module").builtinModules,"bootstrap_node","node").map(r=>new RegExp(`(?:\\((?:node:)?${r}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${r}(?:\\.js)?:\\d+:\\d+$)`));Gr.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var es=class r{constructor(e){e={ignoredPackages:[],...e},"internals"in e||(e.internals=r.nodeInternals()),"cwd"in e||(e.cwd=Ku),this._cwd=e.cwd.replace(/\\/g,"/"),this._internals=[].concat(e.internals,Xu(e.ignoredPackages)),this._wrapCallSite=e.wrapCallSite||!1}static nodeInternals(){return[...Gr]}clean(e,t=0){t=" ".repeat(t),Array.isArray(e)||(e=e.split(`
2
2
  `)),!/^\s*at /.test(e[0])&&/^\s*at /.test(e[1])&&(e=e.slice(1));let i=!1,s=null,n=[];return e.forEach(o=>{if(o=o.replace(/\\/g,"/"),this._internals.some(a=>a.test(o)))return;let u=/^\s*at /.test(o);i?o=o.trimEnd().replace(/^(\s+)at /,"$1"):(o=o.trim(),u&&(o=o.slice(3))),o=o.replace(`${this._cwd}/`,""),o&&(u?(s&&(n.push(s),s=null),n.push(o)):(i=!0,s=o))}),n.map(o=>`${t}${o}
3
- `).join("")}captureString(e,t=this.captureString){typeof e=="function"&&(t=e,e=1/0);let{stackTraceLimit:i}=Error;e&&(Error.stackTraceLimit=e);let s={};Error.captureStackTrace(s,t);let{stack:n}=s;return Error.stackTraceLimit=i,this.clean(n)}capture(e,t=this.capture){typeof e=="function"&&(t=e,e=1/0);let{prepareStackTrace:i,stackTraceLimit:s}=Error;Error.prepareStackTrace=(u,a)=>this._wrapCallSite?a.map(this._wrapCallSite):a,e&&(Error.stackTraceLimit=e);let n={};Error.captureStackTrace(n,t);let{stack:o}=n;return Object.assign(Error,{prepareStackTrace:i,stackTraceLimit:s}),o}at(e=this.at){let[t]=this.capture(1,e);if(!t)return{};let i={line:t.getLineNumber(),column:t.getColumnNumber()};zr(i,t.getFileName(),this._cwd),t.isConstructor()&&Object.defineProperty(i,"constructor",{value:!0,configurable:!0}),t.isEval()&&(i.evalOrigin=t.getEvalOrigin()),t.isNative()&&(i.native=!0);let s;try{s=t.getTypeName()}catch{}s&&s!=="Object"&&s!=="[object Object]"&&(i.type=s);let n=t.getFunctionName();n&&(i.function=n);let o=t.getMethodName();return o&&n!==o&&(i.method=o),i}parseLine(e){let t=e&&e.match(Ju);if(!t)return null;let i=t[1]==="new",s=t[2],n=t[3],o=t[4],u=Number(t[5]),a=Number(t[6]),h=t[7],l=t[8],c=t[9],d=t[10]==="native",p=t[11]===")",m,f={};if(l&&(f.line=Number(l)),c&&(f.column=Number(c)),p&&h){let b=0;for(let g=h.length-1;g>0;g--)if(h.charAt(g)===")")b++;else if(h.charAt(g)==="("&&h.charAt(g-1)===" "&&(b--,b===-1&&h.charAt(g-1)===" ")){let y=h.slice(0,g-1);h=h.slice(g+1),s+=` (${y}`;break}}if(s){let b=s.match(Qu);b&&(s=b[1],m=b[2])}return zr(f,h,this._cwd),i&&Object.defineProperty(f,"constructor",{value:!0,configurable:!0}),n&&(f.evalOrigin=n,f.evalLine=u,f.evalColumn=a,f.evalFile=o&&o.replace(/\\/g,"/")),d&&(f.native=!0),s&&(f.function=s),m&&s!==m&&(f.method=m),f}};function zr(r,e,t){e&&(e=e.replace(/\\/g,"/"),e.startsWith(`${t}/`)&&(e=e.slice(t.length+1)),r.file=e)}function Xu(r){if(r.length===0)return[];let e=r.map(t=>Yu(t));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${e.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var Ju=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),Qu=/^(.*?) \[as (.*?)\]$/;jr.exports=es});var Zr=v((Ed,ts)=>{var Jt=process||{},Vr=Jt.argv||[],Xt=Jt.env||{},eh=!(Xt.NO_COLOR||Vr.includes("--no-color"))&&(!!Xt.FORCE_COLOR||Vr.includes("--color")||Jt.platform==="win32"||(Jt.stdout||{}).isTTY&&Xt.TERM!=="dumb"||!!Xt.CI),th=(r,e,t=r)=>i=>{let s=""+i,n=s.indexOf(e,r.length);return~n?r+ih(s,e,t,n)+e:r+s+e},ih=(r,e,t,i)=>{let s="",n=0;do s+=r.substring(n,i)+t,n=i+e.length,i=r.indexOf(e,n);while(~i);return s+r.substring(n)},qr=(r=eh)=>{let e=r?th:()=>String;return{isColorSupported:r,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};ts.exports=qr();ts.exports.createColors=qr});var Yr=v(Qt=>{Object.defineProperty(Qt,"__esModule",{value:!0});Qt.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;Qt.matchToToken=function(r){var e={type:"invalid",value:r[0],closed:void 0};return r[1]?(e.type="string",e.closed=!!(r[3]||r[4])):r[5]?e.type="comment":r[6]?(e.type="comment",e.closed=!!r[7]):r[8]?e.type="regex":r[9]?e.type="number":r[10]?e.type="name":r[11]?e.type="punctuator":r[12]&&(e.type="whitespace"),e}});var en=v(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.isIdentifierChar=Qr;Et.isIdentifierName=oh;Et.isIdentifierStart=Jr;var ss="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",Kr="\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",sh=new RegExp("["+ss+"]"),rh=new RegExp("["+ss+Kr+"]");ss=Kr=null;var Xr=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],nh=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239];function is(r,e){let t=65536;for(let i=0,s=e.length;i<s;i+=2){if(t+=e[i],t>r)return!1;if(t+=e[i+1],t>=r)return!0}return!1}function Jr(r){return r<65?r===36:r<=90?!0:r<97?r===95:r<=122?!0:r<=65535?r>=170&&sh.test(String.fromCharCode(r)):is(r,Xr)}function Qr(r){return r<48?r===36:r<58?!0:r<65?!1:r<=90?!0:r<97?r===95:r<=122?!0:r<=65535?r>=170&&rh.test(String.fromCharCode(r)):is(r,Xr)||is(r,nh)}function oh(r){let e=!0;for(let t=0;t<r.length;t++){let i=r.charCodeAt(t);if((i&64512)===55296&&t+1<r.length){let s=r.charCodeAt(++t);(s&64512)===56320&&(i=65536+((i&1023)<<10)+(s&1023))}if(e){if(e=!1,!Jr(i))return!1}else if(!Qr(i))return!1}return!e}});var nn=v(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.isKeyword=ch;Ge.isReservedWord=tn;Ge.isStrictBindOnlyReservedWord=rn;Ge.isStrictBindReservedWord=lh;Ge.isStrictReservedWord=sn;var rs={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},ah=new Set(rs.keyword),uh=new Set(rs.strict),hh=new Set(rs.strictBind);function tn(r,e){return e&&r==="await"||r==="enum"}function sn(r,e){return tn(r,e)||uh.has(r)}function rn(r){return hh.has(r)}function lh(r,e){return sn(r,e)||rn(r)}function ch(r){return ah.has(r)}});var on=v(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});Object.defineProperty(ge,"isIdentifierChar",{enumerable:!0,get:function(){return ns.isIdentifierChar}});Object.defineProperty(ge,"isIdentifierName",{enumerable:!0,get:function(){return ns.isIdentifierName}});Object.defineProperty(ge,"isIdentifierStart",{enumerable:!0,get:function(){return ns.isIdentifierStart}});Object.defineProperty(ge,"isKeyword",{enumerable:!0,get:function(){return yt.isKeyword}});Object.defineProperty(ge,"isReservedWord",{enumerable:!0,get:function(){return yt.isReservedWord}});Object.defineProperty(ge,"isStrictBindOnlyReservedWord",{enumerable:!0,get:function(){return yt.isStrictBindOnlyReservedWord}});Object.defineProperty(ge,"isStrictBindReservedWord",{enumerable:!0,get:function(){return yt.isStrictBindReservedWord}});Object.defineProperty(ge,"isStrictReservedWord",{enumerable:!0,get:function(){return yt.isStrictReservedWord}});var ns=en(),yt=nn()});var gn=v(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});var os=Zr(),an=Yr(),un=on();function fh(){return typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?!1:os.isColorSupported}var ei=(r,e)=>t=>r(e(t));function cn(r){return{keyword:r.cyan,capitalized:r.yellow,jsxIdentifier:r.yellow,punctuator:r.yellow,number:r.magenta,string:r.green,regex:r.magenta,comment:r.gray,invalid:ei(ei(r.white,r.bgRed),r.bold),gutter:r.gray,marker:ei(r.red,r.bold),message:ei(r.red,r.bold),reset:r.reset}}var dh=cn(os.createColors(!0)),ph=cn(os.createColors(!1));function fn(r){return r?dh:ph}var mh=new Set(["as","async","from","get","of","set"]),gh=/\r\n|[\n\r\u2028\u2029]/,_h=/^[()[\]{}]$/,dn;{let r=/^[a-z][\w-]*$/i,e=function(t,i,s){if(t.type==="name"){if(un.isKeyword(t.value)||un.isStrictReservedWord(t.value,!0)||mh.has(t.value))return"keyword";if(r.test(t.value)&&(s[i-1]==="<"||s.slice(i-2,i)==="</"))return"jsxIdentifier";if(t.value[0]!==t.value[0].toLowerCase())return"capitalized"}return t.type==="punctuator"&&_h.test(t.value)?"bracket":t.type==="invalid"&&(t.value==="@"||t.value==="#")?"punctuator":t.type};dn=function*(t){let i;for(;i=an.default.exec(t);){let s=an.matchToToken(i);yield{type:e(s,i.index,t),value:s.value}}}}function pn(r){if(r==="")return"";let e=fn(!0),t="";for(let{type:i,value:s}of dn(r))i in e?t+=s.split(gh).map(n=>e[i](n)).join(`
4
- `):t+=s;return t}var hn=!1,ln=/\r\n|[\n\r\u2028\u2029]/;function bh(r,e,t){let i=Object.assign({column:0,line:-1},r.start),s=Object.assign({},i,r.end),{linesAbove:n=2,linesBelow:o=3}=t||{},u=i.line,a=i.column,h=s.line,l=s.column,c=Math.max(u-(n+1),0),d=Math.min(e.length,h+o);u===-1&&(c=0),h===-1&&(d=e.length);let p=h-u,m={};if(p)for(let f=0;f<=p;f++){let b=f+u;if(!a)m[b]=!0;else if(f===0){let g=e[b-1].length;m[b]=[a,g-a+1]}else if(f===p)m[b]=[0,l];else{let g=e[b-f].length;m[b]=[0,g]}}else a===l?a?m[u]=[a,0]:m[u]=!0:m[u]=[a,l-a];return{start:c,end:d,markerLines:m}}function mn(r,e,t={}){let i=t.forceColor||fh()&&t.highlightCode,s=fn(i),n=r.split(ln),{start:o,end:u,markerLines:a}=bh(e,n,t),h=e.start&&typeof e.start.column=="number",l=String(u).length,d=(i?pn(r):r).split(ln,u).slice(o,u).map((p,m)=>{let f=o+1+m,g=` ${` ${f}`.slice(-l)} |`,y=a[f],C=!a[f+1];if(y){let S="";if(Array.isArray(y)){let L=p.slice(0,Math.max(y[0]-1,0)).replace(/[^\t]/g," "),U=y[1]||1;S=[`
5
- `,s.gutter(g.replace(/\d/g," "))," ",L,s.marker("^").repeat(U)].join(""),C&&t.message&&(S+=" "+s.message(t.message))}return[s.marker(">"),s.gutter(g),p.length>0?` ${p}`:"",S].join("")}else return` ${s.gutter(g)}${p.length>0?` ${p}`:""}`}).join(`
3
+ `).join("")}captureString(e,t=this.captureString){typeof e=="function"&&(t=e,e=1/0);let{stackTraceLimit:i}=Error;e&&(Error.stackTraceLimit=e);let s={};Error.captureStackTrace(s,t);let{stack:n}=s;return Error.stackTraceLimit=i,this.clean(n)}capture(e,t=this.capture){typeof e=="function"&&(t=e,e=1/0);let{prepareStackTrace:i,stackTraceLimit:s}=Error;Error.prepareStackTrace=(u,a)=>this._wrapCallSite?a.map(this._wrapCallSite):a,e&&(Error.stackTraceLimit=e);let n={};Error.captureStackTrace(n,t);let{stack:o}=n;return Object.assign(Error,{prepareStackTrace:i,stackTraceLimit:s}),o}at(e=this.at){let[t]=this.capture(1,e);if(!t)return{};let i={line:t.getLineNumber(),column:t.getColumnNumber()};zr(i,t.getFileName(),this._cwd),t.isConstructor()&&Object.defineProperty(i,"constructor",{value:!0,configurable:!0}),t.isEval()&&(i.evalOrigin=t.getEvalOrigin()),t.isNative()&&(i.native=!0);let s;try{s=t.getTypeName()}catch{}s&&s!=="Object"&&s!=="[object Object]"&&(i.type=s);let n=t.getFunctionName();n&&(i.function=n);let o=t.getMethodName();return o&&n!==o&&(i.method=o),i}parseLine(e){let t=e&&e.match(Ju);if(!t)return null;let i=t[1]==="new",s=t[2],n=t[3],o=t[4],u=Number(t[5]),a=Number(t[6]),h=t[7],l=t[8],c=t[9],d=t[10]==="native",p=t[11]===")",m,f={};if(l&&(f.line=Number(l)),c&&(f.column=Number(c)),p&&h){let w=0;for(let _=h.length-1;_>0;_--)if(h.charAt(_)===")")w++;else if(h.charAt(_)==="("&&h.charAt(_-1)===" "&&(w--,w===-1&&h.charAt(_-1)===" ")){let C=h.slice(0,_-1);h=h.slice(_+1),s+=` (${C}`;break}}if(s){let w=s.match(Qu);w&&(s=w[1],m=w[2])}return zr(f,h,this._cwd),i&&Object.defineProperty(f,"constructor",{value:!0,configurable:!0}),n&&(f.evalOrigin=n,f.evalLine=u,f.evalColumn=a,f.evalFile=o&&o.replace(/\\/g,"/")),d&&(f.native=!0),s&&(f.function=s),m&&s!==m&&(f.method=m),f}};function zr(r,e,t){e&&(e=e.replace(/\\/g,"/"),e.startsWith(`${t}/`)&&(e=e.slice(t.length+1)),r.file=e)}function Xu(r){if(r.length===0)return[];let e=r.map(t=>Yu(t));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${e.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var Ju=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),Qu=/^(.*?) \[as (.*?)\]$/;jr.exports=es});var Zr=v((Ed,ts)=>{var Jt=process||{},Vr=Jt.argv||[],Xt=Jt.env||{},eh=!(Xt.NO_COLOR||Vr.includes("--no-color"))&&(!!Xt.FORCE_COLOR||Vr.includes("--color")||Jt.platform==="win32"||(Jt.stdout||{}).isTTY&&Xt.TERM!=="dumb"||!!Xt.CI),th=(r,e,t=r)=>i=>{let s=""+i,n=s.indexOf(e,r.length);return~n?r+ih(s,e,t,n)+e:r+s+e},ih=(r,e,t,i)=>{let s="",n=0;do s+=r.substring(n,i)+t,n=i+e.length,i=r.indexOf(e,n);while(~i);return s+r.substring(n)},qr=(r=eh)=>{let e=r?th:()=>String;return{isColorSupported:r,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};ts.exports=qr();ts.exports.createColors=qr});var Yr=v(Qt=>{Object.defineProperty(Qt,"__esModule",{value:!0});Qt.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;Qt.matchToToken=function(r){var e={type:"invalid",value:r[0],closed:void 0};return r[1]?(e.type="string",e.closed=!!(r[3]||r[4])):r[5]?e.type="comment":r[6]?(e.type="comment",e.closed=!!r[7]):r[8]?e.type="regex":r[9]?e.type="number":r[10]?e.type="name":r[11]?e.type="punctuator":r[12]&&(e.type="whitespace"),e}});var en=v(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.isIdentifierChar=Qr;Et.isIdentifierName=oh;Et.isIdentifierStart=Jr;var ss="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",Kr="\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",sh=new RegExp("["+ss+"]"),rh=new RegExp("["+ss+Kr+"]");ss=Kr=null;var Xr=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,2,60,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,496,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],nh=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,80,3,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,343,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,726,6,110,6,6,9,4759,9,787719,239];function is(r,e){let t=65536;for(let i=0,s=e.length;i<s;i+=2){if(t+=e[i],t>r)return!1;if(t+=e[i+1],t>=r)return!0}return!1}function Jr(r){return r<65?r===36:r<=90?!0:r<97?r===95:r<=122?!0:r<=65535?r>=170&&sh.test(String.fromCharCode(r)):is(r,Xr)}function Qr(r){return r<48?r===36:r<58?!0:r<65?!1:r<=90?!0:r<97?r===95:r<=122?!0:r<=65535?r>=170&&rh.test(String.fromCharCode(r)):is(r,Xr)||is(r,nh)}function oh(r){let e=!0;for(let t=0;t<r.length;t++){let i=r.charCodeAt(t);if((i&64512)===55296&&t+1<r.length){let s=r.charCodeAt(++t);(s&64512)===56320&&(i=65536+((i&1023)<<10)+(s&1023))}if(e){if(e=!1,!Jr(i))return!1}else if(!Qr(i))return!1}return!e}});var nn=v(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.isKeyword=ch;Ge.isReservedWord=tn;Ge.isStrictBindOnlyReservedWord=rn;Ge.isStrictBindReservedWord=lh;Ge.isStrictReservedWord=sn;var rs={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},ah=new Set(rs.keyword),uh=new Set(rs.strict),hh=new Set(rs.strictBind);function tn(r,e){return e&&r==="await"||r==="enum"}function sn(r,e){return tn(r,e)||uh.has(r)}function rn(r){return hh.has(r)}function lh(r,e){return sn(r,e)||rn(r)}function ch(r){return ah.has(r)}});var on=v(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});Object.defineProperty(ge,"isIdentifierChar",{enumerable:!0,get:function(){return ns.isIdentifierChar}});Object.defineProperty(ge,"isIdentifierName",{enumerable:!0,get:function(){return ns.isIdentifierName}});Object.defineProperty(ge,"isIdentifierStart",{enumerable:!0,get:function(){return ns.isIdentifierStart}});Object.defineProperty(ge,"isKeyword",{enumerable:!0,get:function(){return yt.isKeyword}});Object.defineProperty(ge,"isReservedWord",{enumerable:!0,get:function(){return yt.isReservedWord}});Object.defineProperty(ge,"isStrictBindOnlyReservedWord",{enumerable:!0,get:function(){return yt.isStrictBindOnlyReservedWord}});Object.defineProperty(ge,"isStrictBindReservedWord",{enumerable:!0,get:function(){return yt.isStrictBindReservedWord}});Object.defineProperty(ge,"isStrictReservedWord",{enumerable:!0,get:function(){return yt.isStrictReservedWord}});var ns=en(),yt=nn()});var gn=v(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});var os=Zr(),an=Yr(),un=on();function fh(){return typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?!1:os.isColorSupported}var ei=(r,e)=>t=>r(e(t));function cn(r){return{keyword:r.cyan,capitalized:r.yellow,jsxIdentifier:r.yellow,punctuator:r.yellow,number:r.magenta,string:r.green,regex:r.magenta,comment:r.gray,invalid:ei(ei(r.white,r.bgRed),r.bold),gutter:r.gray,marker:ei(r.red,r.bold),message:ei(r.red,r.bold),reset:r.reset}}var dh=cn(os.createColors(!0)),ph=cn(os.createColors(!1));function fn(r){return r?dh:ph}var mh=new Set(["as","async","from","get","of","set"]),gh=/\r\n|[\n\r\u2028\u2029]/,_h=/^[()[\]{}]$/,dn;{let r=/^[a-z][\w-]*$/i,e=function(t,i,s){if(t.type==="name"){if(un.isKeyword(t.value)||un.isStrictReservedWord(t.value,!0)||mh.has(t.value))return"keyword";if(r.test(t.value)&&(s[i-1]==="<"||s.slice(i-2,i)==="</"))return"jsxIdentifier";if(t.value[0]!==t.value[0].toLowerCase())return"capitalized"}return t.type==="punctuator"&&_h.test(t.value)?"bracket":t.type==="invalid"&&(t.value==="@"||t.value==="#")?"punctuator":t.type};dn=function*(t){let i;for(;i=an.default.exec(t);){let s=an.matchToToken(i);yield{type:e(s,i.index,t),value:s.value}}}}function pn(r){if(r==="")return"";let e=fn(!0),t="";for(let{type:i,value:s}of dn(r))i in e?t+=s.split(gh).map(n=>e[i](n)).join(`
4
+ `):t+=s;return t}var hn=!1,ln=/\r\n|[\n\r\u2028\u2029]/;function bh(r,e,t){let i=Object.assign({column:0,line:-1},r.start),s=Object.assign({},i,r.end),{linesAbove:n=2,linesBelow:o=3}=t||{},u=i.line,a=i.column,h=s.line,l=s.column,c=Math.max(u-(n+1),0),d=Math.min(e.length,h+o);u===-1&&(c=0),h===-1&&(d=e.length);let p=h-u,m={};if(p)for(let f=0;f<=p;f++){let w=f+u;if(!a)m[w]=!0;else if(f===0){let _=e[w-1].length;m[w]=[a,_-a+1]}else if(f===p)m[w]=[0,l];else{let _=e[w-f].length;m[w]=[0,_]}}else a===l?a?m[u]=[a,0]:m[u]=!0:m[u]=[a,l-a];return{start:c,end:d,markerLines:m}}function mn(r,e,t={}){let i=t.forceColor||fh()&&t.highlightCode,s=fn(i),n=r.split(ln),{start:o,end:u,markerLines:a}=bh(e,n,t),h=e.start&&typeof e.start.column=="number",l=String(u).length,d=(i?pn(r):r).split(ln,u).slice(o,u).map((p,m)=>{let f=o+1+m,_=` ${` ${f}`.slice(-l)} |`,C=a[f],y=!a[f+1];if(C){let E="";if(Array.isArray(C)){let L=p.slice(0,Math.max(C[0]-1,0)).replace(/[^\t]/g," "),U=C[1]||1;E=[`
5
+ `,s.gutter(_.replace(/\d/g," "))," ",L,s.marker("^").repeat(U)].join(""),y&&t.message&&(E+=" "+s.message(t.message))}return[s.marker(">"),s.gutter(_),p.length>0?` ${p}`:"",E].join("")}else return` ${s.gutter(_)}${p.length>0?` ${p}`:""}`}).join(`
6
6
  `);return t.message&&!h&&(d=`${" ".repeat(l+1)}${t.message}
7
- ${d}`),i?s.reset(d):d}function wh(r,e,t,i={}){if(!hn){hn=!0;let n="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning)process.emitWarning(n,"DeprecationWarning");else{let o=new Error(n);o.name="DeprecationWarning",console.warn(new Error(n))}}return t=Math.max(t,0),mn(r,{start:{column:t,line:e}},i)}St.codeFrameColumns=mn;St.default=wh;St.highlight=pn});var ye=v((vd,wn)=>{"use strict";var _n=["nodebuffer","arraybuffer","fragments"],bn=typeof Blob<"u";bn&&_n.push("blob");wn.exports={BINARY_TYPES:_n,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:bn,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var xt=v((Td,ti)=>{"use strict";var{EMPTY_BUFFER:Eh}=ye(),as=Buffer[Symbol.species];function yh(r,e){if(r.length===0)return Eh;if(r.length===1)return r[0];let t=Buffer.allocUnsafe(e),i=0;for(let s=0;s<r.length;s++){let n=r[s];t.set(n,i),i+=n.length}return i<e?new as(t.buffer,t.byteOffset,i):t}function En(r,e,t,i,s){for(let n=0;n<s;n++)t[i+n]=r[n]^e[n&3]}function yn(r,e){for(let t=0;t<r.length;t++)r[t]^=e[t&3]}function Sh(r){return r.length===r.buffer.byteLength?r.buffer:r.buffer.slice(r.byteOffset,r.byteOffset+r.length)}function us(r){if(us.readOnly=!0,Buffer.isBuffer(r))return r;let e;return r instanceof ArrayBuffer?e=new as(r):ArrayBuffer.isView(r)?e=new as(r.buffer,r.byteOffset,r.byteLength):(e=Buffer.from(r),us.readOnly=!1),e}ti.exports={concat:yh,mask:En,toArrayBuffer:Sh,toBuffer:us,unmask:yn};if(!process.env.WS_NO_BUFFER_UTIL)try{let r=require("bufferutil");ti.exports.mask=function(e,t,i,s,n){n<48?En(e,t,i,s,n):r.mask(e,t,i,s,n)},ti.exports.unmask=function(e,t){e.length<32?yn(e,t):r.unmask(e,t)}}catch{}});var Cn=v((Ld,xn)=>{"use strict";var Sn=Symbol("kDone"),hs=Symbol("kRun"),ls=class{constructor(e){this[Sn]=()=>{this.pending--,this[hs]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[hs]()}[hs](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[Sn])}}};xn.exports=ls});var Ot=v((Ad,Ln)=>{"use strict";var Ct=require("zlib"),On=xt(),xh=Cn(),{kStatusCode:vn}=ye(),Ch=Buffer[Symbol.species],Oh=Buffer.from([0,0,255,255]),si=Symbol("permessage-deflate"),Se=Symbol("total-length"),Je=Symbol("callback"),Ae=Symbol("buffers"),Qe=Symbol("error"),ii,cs=class{constructor(e,t,i){if(this._maxPayload=i|0,this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!t,this._deflate=null,this._inflate=null,this.params=null,!ii){let s=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;ii=new xh(s)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[Je];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let t=this._options,i=e.find(s=>!(t.serverNoContextTakeover===!1&&s.server_no_context_takeover||s.server_max_window_bits&&(t.serverMaxWindowBits===!1||typeof t.serverMaxWindowBits=="number"&&t.serverMaxWindowBits>s.server_max_window_bits)||typeof t.clientMaxWindowBits=="number"&&!s.client_max_window_bits));if(!i)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(i.server_no_context_takeover=!0),t.clientNoContextTakeover&&(i.client_no_context_takeover=!0),typeof t.serverMaxWindowBits=="number"&&(i.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits=="number"?i.client_max_window_bits=t.clientMaxWindowBits:(i.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete i.client_max_window_bits,i}acceptAsClient(e){let t=e[0];if(this._options.clientNoContextTakeover===!1&&t.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!t.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(t.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return t}normalizeParams(e){return e.forEach(t=>{Object.keys(t).forEach(i=>{let s=t[i];if(s.length>1)throw new Error(`Parameter "${i}" must have only a single value`);if(s=s[0],i==="client_max_window_bits"){if(s!==!0){let n=+s;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${i}": ${s}`);s=n}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${i}": ${s}`)}else if(i==="server_max_window_bits"){let n=+s;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${i}": ${s}`);s=n}else if(i==="client_no_context_takeover"||i==="server_no_context_takeover"){if(s!==!0)throw new TypeError(`Invalid value for parameter "${i}": ${s}`)}else throw new Error(`Unknown parameter "${i}"`);t[i]=s})}),e}decompress(e,t,i){ii.add(s=>{this._decompress(e,t,(n,o)=>{s(),i(n,o)})})}compress(e,t,i){ii.add(s=>{this._compress(e,t,(n,o)=>{s(),i(n,o)})})}_decompress(e,t,i){let s=this._isServer?"client":"server";if(!this._inflate){let n=`${s}_max_window_bits`,o=typeof this.params[n]!="number"?Ct.Z_DEFAULT_WINDOWBITS:this.params[n];this._inflate=Ct.createInflateRaw({...this._options.zlibInflateOptions,windowBits:o}),this._inflate[si]=this,this._inflate[Se]=0,this._inflate[Ae]=[],this._inflate.on("error",Th),this._inflate.on("data",Tn)}this._inflate[Je]=i,this._inflate.write(e),t&&this._inflate.write(Oh),this._inflate.flush(()=>{let n=this._inflate[Qe];if(n){this._inflate.close(),this._inflate=null,i(n);return}let o=On.concat(this._inflate[Ae],this._inflate[Se]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[Se]=0,this._inflate[Ae]=[],t&&this.params[`${s}_no_context_takeover`]&&this._inflate.reset()),i(null,o)})}_compress(e,t,i){let s=this._isServer?"server":"client";if(!this._deflate){let n=`${s}_max_window_bits`,o=typeof this.params[n]!="number"?Ct.Z_DEFAULT_WINDOWBITS:this.params[n];this._deflate=Ct.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:o}),this._deflate[Se]=0,this._deflate[Ae]=[],this._deflate.on("data",vh)}this._deflate[Je]=i,this._deflate.write(e),this._deflate.flush(Ct.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let n=On.concat(this._deflate[Ae],this._deflate[Se]);t&&(n=new Ch(n.buffer,n.byteOffset,n.length-4)),this._deflate[Je]=null,this._deflate[Se]=0,this._deflate[Ae]=[],t&&this.params[`${s}_no_context_takeover`]&&this._deflate.reset(),i(null,n)})}};Ln.exports=cs;function vh(r){this[Ae].push(r),this[Se]+=r.length}function Tn(r){if(this[Se]+=r.length,this[si]._maxPayload<1||this[Se]<=this[si]._maxPayload){this[Ae].push(r);return}this[Qe]=new RangeError("Max payload size exceeded"),this[Qe].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Qe][vn]=1009,this.removeListener("data",Tn),this.reset()}function Th(r){if(this[si]._inflate=null,this[Qe]){this[Je](this[Qe]);return}r[vn]=1007,this[Je](r)}});var et=v((Id,ri)=>{"use strict";var{isUtf8:An}=require("buffer"),{hasBlob:Lh}=ye(),Ah=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function Ih(r){return r>=1e3&&r<=1014&&r!==1004&&r!==1005&&r!==1006||r>=3e3&&r<=4999}function fs(r){let e=r.length,t=0;for(;t<e;)if((r[t]&128)===0)t++;else if((r[t]&224)===192){if(t+1===e||(r[t+1]&192)!==128||(r[t]&254)===192)return!1;t+=2}else if((r[t]&240)===224){if(t+2>=e||(r[t+1]&192)!==128||(r[t+2]&192)!==128||r[t]===224&&(r[t+1]&224)===128||r[t]===237&&(r[t+1]&224)===160)return!1;t+=3}else if((r[t]&248)===240){if(t+3>=e||(r[t+1]&192)!==128||(r[t+2]&192)!==128||(r[t+3]&192)!==128||r[t]===240&&(r[t+1]&240)===128||r[t]===244&&r[t+1]>143||r[t]>244)return!1;t+=4}else return!1;return!0}function Dh(r){return Lh&&typeof r=="object"&&typeof r.arrayBuffer=="function"&&typeof r.type=="string"&&typeof r.stream=="function"&&(r[Symbol.toStringTag]==="Blob"||r[Symbol.toStringTag]==="File")}ri.exports={isBlob:Dh,isValidStatusCode:Ih,isValidUTF8:fs,tokenChars:Ah};if(An)ri.exports.isValidUTF8=function(r){return r.length<24?fs(r):An(r)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let r=require("utf-8-validate");ri.exports.isValidUTF8=function(e){return e.length<32?fs(e):r(e)}}catch{}});var _s=v((Dd,Pn)=>{"use strict";var{Writable:Nh}=require("stream"),In=Ot(),{BINARY_TYPES:Rh,EMPTY_BUFFER:Dn,kStatusCode:kh,kWebSocket:Fh}=ye(),{concat:ds,toArrayBuffer:Ph,unmask:Mh}=xt(),{isValidStatusCode:Uh,isValidUTF8:Nn}=et(),ni=Buffer[Symbol.species],Q=0,Rn=1,kn=2,Fn=3,ps=4,ms=5,oi=6,gs=class extends Nh{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||Rh[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[Fh]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=Q}_write(e,t,i){if(this._opcode===8&&this._state==Q)return i();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(i)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let i=this._buffers[0];return this._buffers[0]=new ni(i.buffer,i.byteOffset+e,i.length-e),new ni(i.buffer,i.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let i=this._buffers[0],s=t.length-e;e>=i.length?t.set(this._buffers.shift(),s):(t.set(new Uint8Array(i.buffer,i.byteOffset,e),s),this._buffers[0]=new ni(i.buffer,i.byteOffset+e,i.length-e)),e-=i.length}while(e>0);return t}startLoop(e){this._loop=!0;do switch(this._state){case Q:this.getInfo(e);break;case Rn:this.getPayloadLength16(e);break;case kn:this.getPayloadLength64(e);break;case Fn:this.getMask();break;case ps:this.getData(e);break;case ms:case oi:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let t=this.consume(2);if((t[0]&48)!==0){let s=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(s);return}let i=(t[0]&64)===64;if(i&&!this._extensions[In.extensionName]){let s=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(s);return}if(this._fin=(t[0]&128)===128,this._opcode=t[0]&15,this._payloadLength=t[1]&127,this._opcode===0){if(i){let s=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(s);return}if(!this._fragmented){let s=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(s);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let s=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(s);return}this._compressed=i}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let s=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(s);return}if(i){let s=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(s);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let s=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(s);return}}else{let s=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(s);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(t[1]&128)===128,this._isServer){if(!this._masked){let s=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(s);return}}else if(this._masked){let s=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(s);return}this._payloadLength===126?this._state=Rn:this._payloadLength===127?this._state=kn:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let t=this.consume(8),i=t.readUInt32BE(0);if(i>Math.pow(2,21)-1){let s=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(s);return}this._payloadLength=i*Math.pow(2,32)+t.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let t=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(t);return}this._masked?this._state=Fn:this._state=ps}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=ps}getData(e){let t=Dn;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}t=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&Mh(t,this._mask)}if(this._opcode>7){this.controlMessage(t,e);return}if(this._compressed){this._state=ms,this.decompress(t,e);return}t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e)}decompress(e,t){this._extensions[In.extensionName].decompress(e,this._fin,(s,n)=>{if(s)return t(s);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let o=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");t(o);return}this._fragments.push(n)}this.dataMessage(t),this._state===Q&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=Q;return}let t=this._messageLength,i=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let s;this._binaryType==="nodebuffer"?s=ds(i,t):this._binaryType==="arraybuffer"?s=Ph(ds(i,t)):this._binaryType==="blob"?s=new Blob(i):s=i,this._allowSynchronousEvents?(this.emit("message",s,!0),this._state=Q):(this._state=oi,setImmediate(()=>{this.emit("message",s,!0),this._state=Q,this.startLoop(e)}))}else{let s=ds(i,t);if(!this._skipUTF8Validation&&!Nn(s)){let n=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(n);return}this._state===ms||this._allowSynchronousEvents?(this.emit("message",s,!1),this._state=Q):(this._state=oi,setImmediate(()=>{this.emit("message",s,!1),this._state=Q,this.startLoop(e)}))}}controlMessage(e,t){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,Dn),this.end();else{let i=e.readUInt16BE(0);if(!Uh(i)){let n=this.createError(RangeError,`invalid status code ${i}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");t(n);return}let s=new ni(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!Nn(s)){let n=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(n);return}this._loop=!1,this.emit("conclude",i,s),this.end()}this._state=Q;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=Q):(this._state=oi,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=Q,this.startLoop(t)}))}createError(e,t,i,s,n){this._loop=!1,this._errored=!0;let o=new e(i?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(o,this.createError),o.code=n,o[kh]=s,o}};Pn.exports=gs});var Es=v((Rd,Bn)=>{"use strict";var{Duplex:Nd}=require("stream"),{randomFillSync:Bh}=require("crypto"),Mn=Ot(),{EMPTY_BUFFER:Wh,kWebSocket:$h,NOOP:zh}=ye(),{isBlob:tt,isValidStatusCode:Gh}=et(),{mask:Un,toBuffer:je}=xt(),ee=Symbol("kByteLength"),jh=Buffer.alloc(4),ai=8*1024,He,it=ai,he=0,Hh=1,Vh=2,bs=class r{constructor(e,t,i){this._extensions=t||{},i&&(this._generateMask=i,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=he,this.onerror=zh,this[$h]=void 0}static frame(e,t){let i,s=!1,n=2,o=!1;t.mask&&(i=t.maskBuffer||jh,t.generateMask?t.generateMask(i):(it===ai&&(He===void 0&&(He=Buffer.alloc(ai)),Bh(He,0,ai),it=0),i[0]=He[it++],i[1]=He[it++],i[2]=He[it++],i[3]=He[it++]),o=(i[0]|i[1]|i[2]|i[3])===0,n=6);let u;typeof e=="string"?(!t.mask||o)&&t[ee]!==void 0?u=t[ee]:(e=Buffer.from(e),u=e.length):(u=e.length,s=t.mask&&t.readOnly&&!o);let a=u;u>=65536?(n+=8,a=127):u>125&&(n+=2,a=126);let h=Buffer.allocUnsafe(s?u+n:n);return h[0]=t.fin?t.opcode|128:t.opcode,t.rsv1&&(h[0]|=64),h[1]=a,a===126?h.writeUInt16BE(u,2):a===127&&(h[2]=h[3]=0,h.writeUIntBE(u,4,6)),t.mask?(h[1]|=128,h[n-4]=i[0],h[n-3]=i[1],h[n-2]=i[2],h[n-1]=i[3],o?[h,e]:s?(Un(e,i,h,n,u),[h]):(Un(e,i,e,0,u),[h,e])):[h,e]}close(e,t,i,s){let n;if(e===void 0)n=Wh;else{if(typeof e!="number"||!Gh(e))throw new TypeError("First argument must be a valid error code number");if(t===void 0||!t.length)n=Buffer.allocUnsafe(2),n.writeUInt16BE(e,0);else{let u=Buffer.byteLength(t);if(u>123)throw new RangeError("The message must not be greater than 123 bytes");n=Buffer.allocUnsafe(2+u),n.writeUInt16BE(e,0),typeof t=="string"?n.write(t,2):n.set(t,2)}}let o={[ee]:n.length,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==he?this.enqueue([this.dispatch,n,!1,o,s]):this.sendFrame(r.frame(n,o),s)}ping(e,t,i){let s,n;if(typeof e=="string"?(s=Buffer.byteLength(e),n=!1):tt(e)?(s=e.size,n=!1):(e=je(e),s=e.length,n=je.readOnly),s>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[ee]:s,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:n,rsv1:!1};tt(e)?this._state!==he?this.enqueue([this.getBlobData,e,!1,o,i]):this.getBlobData(e,!1,o,i):this._state!==he?this.enqueue([this.dispatch,e,!1,o,i]):this.sendFrame(r.frame(e,o),i)}pong(e,t,i){let s,n;if(typeof e=="string"?(s=Buffer.byteLength(e),n=!1):tt(e)?(s=e.size,n=!1):(e=je(e),s=e.length,n=je.readOnly),s>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[ee]:s,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:n,rsv1:!1};tt(e)?this._state!==he?this.enqueue([this.getBlobData,e,!1,o,i]):this.getBlobData(e,!1,o,i):this._state!==he?this.enqueue([this.dispatch,e,!1,o,i]):this.sendFrame(r.frame(e,o),i)}send(e,t,i){let s=this._extensions[Mn.extensionName],n=t.binary?2:1,o=t.compress,u,a;typeof e=="string"?(u=Buffer.byteLength(e),a=!1):tt(e)?(u=e.size,a=!1):(e=je(e),u=e.length,a=je.readOnly),this._firstFragment?(this._firstFragment=!1,o&&s&&s.params[s._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(o=u>=s._threshold),this._compress=o):(o=!1,n=0),t.fin&&(this._firstFragment=!0);let h={[ee]:u,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:n,readOnly:a,rsv1:o};tt(e)?this._state!==he?this.enqueue([this.getBlobData,e,this._compress,h,i]):this.getBlobData(e,this._compress,h,i):this._state!==he?this.enqueue([this.dispatch,e,this._compress,h,i]):this.dispatch(e,this._compress,h,i)}getBlobData(e,t,i,s){this._bufferedBytes+=i[ee],this._state=Vh,e.arrayBuffer().then(n=>{if(this._socket.destroyed){let u=new Error("The socket was closed while the blob was being read");process.nextTick(ws,this,u,s);return}this._bufferedBytes-=i[ee];let o=je(n);t?this.dispatch(o,t,i,s):(this._state=he,this.sendFrame(r.frame(o,i),s),this.dequeue())}).catch(n=>{process.nextTick(qh,this,n,s)})}dispatch(e,t,i,s){if(!t){this.sendFrame(r.frame(e,i),s);return}let n=this._extensions[Mn.extensionName];this._bufferedBytes+=i[ee],this._state=Hh,n.compress(e,i.fin,(o,u)=>{if(this._socket.destroyed){let a=new Error("The socket was closed while data was being compressed");ws(this,a,s);return}this._bufferedBytes-=i[ee],this._state=he,i.readOnly=!1,this.sendFrame(r.frame(u,i),s),this.dequeue()})}dequeue(){for(;this._state===he&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][ee],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][ee],this._queue.push(e)}sendFrame(e,t){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}};Bn.exports=bs;function ws(r,e,t){typeof t=="function"&&t(e);for(let i=0;i<r._queue.length;i++){let s=r._queue[i],n=s[s.length-1];typeof n=="function"&&n(e)}}function qh(r,e,t){ws(r,e,t),r.onerror(e)}});var Zn=v((kd,qn)=>{"use strict";var{kForOnEventAttribute:vt,kListener:ys}=ye(),Wn=Symbol("kCode"),$n=Symbol("kData"),zn=Symbol("kError"),Gn=Symbol("kMessage"),jn=Symbol("kReason"),st=Symbol("kTarget"),Hn=Symbol("kType"),Vn=Symbol("kWasClean"),xe=class{constructor(e){this[st]=null,this[Hn]=e}get target(){return this[st]}get type(){return this[Hn]}};Object.defineProperty(xe.prototype,"target",{enumerable:!0});Object.defineProperty(xe.prototype,"type",{enumerable:!0});var Ve=class extends xe{constructor(e,t={}){super(e),this[Wn]=t.code===void 0?0:t.code,this[jn]=t.reason===void 0?"":t.reason,this[Vn]=t.wasClean===void 0?!1:t.wasClean}get code(){return this[Wn]}get reason(){return this[jn]}get wasClean(){return this[Vn]}};Object.defineProperty(Ve.prototype,"code",{enumerable:!0});Object.defineProperty(Ve.prototype,"reason",{enumerable:!0});Object.defineProperty(Ve.prototype,"wasClean",{enumerable:!0});var rt=class extends xe{constructor(e,t={}){super(e),this[zn]=t.error===void 0?null:t.error,this[Gn]=t.message===void 0?"":t.message}get error(){return this[zn]}get message(){return this[Gn]}};Object.defineProperty(rt.prototype,"error",{enumerable:!0});Object.defineProperty(rt.prototype,"message",{enumerable:!0});var Tt=class extends xe{constructor(e,t={}){super(e),this[$n]=t.data===void 0?null:t.data}get data(){return this[$n]}};Object.defineProperty(Tt.prototype,"data",{enumerable:!0});var Zh={addEventListener(r,e,t={}){for(let s of this.listeners(r))if(!t[vt]&&s[ys]===e&&!s[vt])return;let i;if(r==="message")i=function(n,o){let u=new Tt("message",{data:o?n:n.toString()});u[st]=this,ui(e,this,u)};else if(r==="close")i=function(n,o){let u=new Ve("close",{code:n,reason:o.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});u[st]=this,ui(e,this,u)};else if(r==="error")i=function(n){let o=new rt("error",{error:n,message:n.message});o[st]=this,ui(e,this,o)};else if(r==="open")i=function(){let n=new xe("open");n[st]=this,ui(e,this,n)};else return;i[vt]=!!t[vt],i[ys]=e,t.once?this.once(r,i):this.on(r,i)},removeEventListener(r,e){for(let t of this.listeners(r))if(t[ys]===e&&!t[vt]){this.removeListener(r,t);break}}};qn.exports={CloseEvent:Ve,ErrorEvent:rt,Event:xe,EventTarget:Zh,MessageEvent:Tt};function ui(r,e,t){typeof r=="object"&&r.handleEvent?r.handleEvent.call(r,t):r.call(e,t)}});var Ss=v((Fd,Yn)=>{"use strict";var{tokenChars:Lt}=et();function _e(r,e,t){r[e]===void 0?r[e]=[t]:r[e].push(t)}function Yh(r){let e=Object.create(null),t=Object.create(null),i=!1,s=!1,n=!1,o,u,a=-1,h=-1,l=-1,c=0;for(;c<r.length;c++)if(h=r.charCodeAt(c),o===void 0)if(l===-1&&Lt[h]===1)a===-1&&(a=c);else if(c!==0&&(h===32||h===9))l===-1&&a!==-1&&(l=c);else if(h===59||h===44){if(a===-1)throw new SyntaxError(`Unexpected character at index ${c}`);l===-1&&(l=c);let p=r.slice(a,l);h===44?(_e(e,p,t),t=Object.create(null)):o=p,a=l=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);else if(u===void 0)if(l===-1&&Lt[h]===1)a===-1&&(a=c);else if(h===32||h===9)l===-1&&a!==-1&&(l=c);else if(h===59||h===44){if(a===-1)throw new SyntaxError(`Unexpected character at index ${c}`);l===-1&&(l=c),_e(t,r.slice(a,l),!0),h===44&&(_e(e,o,t),t=Object.create(null),o=void 0),a=l=-1}else if(h===61&&a!==-1&&l===-1)u=r.slice(a,c),a=l=-1;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(s){if(Lt[h]!==1)throw new SyntaxError(`Unexpected character at index ${c}`);a===-1?a=c:i||(i=!0),s=!1}else if(n)if(Lt[h]===1)a===-1&&(a=c);else if(h===34&&a!==-1)n=!1,l=c;else if(h===92)s=!0;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(h===34&&r.charCodeAt(c-1)===61)n=!0;else if(l===-1&&Lt[h]===1)a===-1&&(a=c);else if(a!==-1&&(h===32||h===9))l===-1&&(l=c);else if(h===59||h===44){if(a===-1)throw new SyntaxError(`Unexpected character at index ${c}`);l===-1&&(l=c);let p=r.slice(a,l);i&&(p=p.replace(/\\/g,""),i=!1),_e(t,u,p),h===44&&(_e(e,o,t),t=Object.create(null),o=void 0),u=void 0,a=l=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);if(a===-1||n||h===32||h===9)throw new SyntaxError("Unexpected end of input");l===-1&&(l=c);let d=r.slice(a,l);return o===void 0?_e(e,d,t):(u===void 0?_e(t,d,!0):i?_e(t,u,d.replace(/\\/g,"")):_e(t,u,d),_e(e,o,t)),e}function Kh(r){return Object.keys(r).map(e=>{let t=r[e];return Array.isArray(t)||(t=[t]),t.map(i=>[e].concat(Object.keys(i).map(s=>{let n=i[s];return Array.isArray(n)||(n=[n]),n.map(o=>o===!0?s:`${s}=${o}`).join("; ")})).join("; ")).join(", ")}).join(", ")}Yn.exports={format:Kh,parse:Yh}});var fi=v((Ud,ao)=>{"use strict";var Xh=require("events"),Jh=require("https"),Qh=require("http"),Jn=require("net"),el=require("tls"),{randomBytes:tl,createHash:il}=require("crypto"),{Duplex:Pd,Readable:Md}=require("stream"),{URL:xs}=require("url"),Ie=Ot(),sl=_s(),rl=Es(),{isBlob:nl}=et(),{BINARY_TYPES:Kn,EMPTY_BUFFER:hi,GUID:ol,kForOnEventAttribute:Cs,kListener:al,kStatusCode:ul,kWebSocket:B,NOOP:Qn}=ye(),{EventTarget:{addEventListener:hl,removeEventListener:ll}}=Zn(),{format:cl,parse:fl}=Ss(),{toBuffer:dl}=xt(),pl=30*1e3,eo=Symbol("kAborted"),Os=[8,13],Ce=["CONNECTING","OPEN","CLOSING","CLOSED"],ml=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,N=class r extends Xh{constructor(e,t,i){super(),this._binaryType=Kn[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=hi,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=r.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,t===void 0?t=[]:Array.isArray(t)||(typeof t=="object"&&t!==null?(i=t,t=[]):t=[t]),to(this,e,t,i)):(this._autoPong=i.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){Kn.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,t,i){let s=new sl({allowSynchronousEvents:i.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation}),n=new rl(e,this._extensions,i.generateMask);this._receiver=s,this._sender=n,this._socket=e,s[B]=this,n[B]=this,e[B]=this,s.on("conclude",bl),s.on("drain",wl),s.on("error",El),s.on("message",yl),s.on("ping",Sl),s.on("pong",xl),n.onerror=Cl,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",ro),e.on("data",ci),e.on("end",no),e.on("error",oo),this._readyState=r.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=r.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[Ie.extensionName]&&this._extensions[Ie.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=r.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==r.CLOSED){if(this.readyState===r.CONNECTING){K(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===r.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=r.CLOSING,this._sender.close(e,t,!this._isServer,i=>{i||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),so(this)}}pause(){this.readyState===r.CONNECTING||this.readyState===r.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,t,i){if(this.readyState===r.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(i=e,e=t=void 0):typeof t=="function"&&(i=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==r.OPEN){vs(this,e,i);return}t===void 0&&(t=!this._isServer),this._sender.ping(e||hi,t,i)}pong(e,t,i){if(this.readyState===r.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(i=e,e=t=void 0):typeof t=="function"&&(i=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==r.OPEN){vs(this,e,i);return}t===void 0&&(t=!this._isServer),this._sender.pong(e||hi,t,i)}resume(){this.readyState===r.CONNECTING||this.readyState===r.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,i){if(this.readyState===r.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"&&(i=t,t={}),typeof e=="number"&&(e=e.toString()),this.readyState!==r.OPEN){vs(this,e,i);return}let s={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[Ie.extensionName]||(s.compress=!1),this._sender.send(e||hi,s,i)}terminate(){if(this.readyState!==r.CLOSED){if(this.readyState===r.CONNECTING){K(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=r.CLOSING,this._socket.destroy())}}};Object.defineProperty(N,"CONNECTING",{enumerable:!0,value:Ce.indexOf("CONNECTING")});Object.defineProperty(N.prototype,"CONNECTING",{enumerable:!0,value:Ce.indexOf("CONNECTING")});Object.defineProperty(N,"OPEN",{enumerable:!0,value:Ce.indexOf("OPEN")});Object.defineProperty(N.prototype,"OPEN",{enumerable:!0,value:Ce.indexOf("OPEN")});Object.defineProperty(N,"CLOSING",{enumerable:!0,value:Ce.indexOf("CLOSING")});Object.defineProperty(N.prototype,"CLOSING",{enumerable:!0,value:Ce.indexOf("CLOSING")});Object.defineProperty(N,"CLOSED",{enumerable:!0,value:Ce.indexOf("CLOSED")});Object.defineProperty(N.prototype,"CLOSED",{enumerable:!0,value:Ce.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(r=>{Object.defineProperty(N.prototype,r,{enumerable:!0})});["open","error","close","message"].forEach(r=>{Object.defineProperty(N.prototype,`on${r}`,{enumerable:!0,get(){for(let e of this.listeners(r))if(e[Cs])return e[al];return null},set(e){for(let t of this.listeners(r))if(t[Cs]){this.removeListener(r,t);break}typeof e=="function"&&this.addEventListener(r,e,{[Cs]:!0})}})});N.prototype.addEventListener=hl;N.prototype.removeEventListener=ll;ao.exports=N;function to(r,e,t,i){let s={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:Os[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...i,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(r._autoPong=s.autoPong,!Os.includes(s.protocolVersion))throw new RangeError(`Unsupported protocol version: ${s.protocolVersion} (supported versions: ${Os.join(", ")})`);let n;if(e instanceof xs)n=e;else try{n=new xs(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}n.protocol==="http:"?n.protocol="ws:":n.protocol==="https:"&&(n.protocol="wss:"),r._url=n.href;let o=n.protocol==="wss:",u=n.protocol==="ws+unix:",a;if(n.protocol!=="ws:"&&!o&&!u?a=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:u&&!n.pathname?a="The URL's pathname is empty":n.hash&&(a="The URL contains a fragment identifier"),a){let f=new SyntaxError(a);if(r._redirects===0)throw f;li(r,f);return}let h=o?443:80,l=tl(16).toString("base64"),c=o?Jh.request:Qh.request,d=new Set,p;if(s.createConnection=s.createConnection||(o?_l:gl),s.defaultPort=s.defaultPort||h,s.port=n.port||h,s.host=n.hostname.startsWith("[")?n.hostname.slice(1,-1):n.hostname,s.headers={...s.headers,"Sec-WebSocket-Version":s.protocolVersion,"Sec-WebSocket-Key":l,Connection:"Upgrade",Upgrade:"websocket"},s.path=n.pathname+n.search,s.timeout=s.handshakeTimeout,s.perMessageDeflate&&(p=new Ie(s.perMessageDeflate!==!0?s.perMessageDeflate:{},!1,s.maxPayload),s.headers["Sec-WebSocket-Extensions"]=cl({[Ie.extensionName]:p.offer()})),t.length){for(let f of t){if(typeof f!="string"||!ml.test(f)||d.has(f))throw new SyntaxError("An invalid or duplicated subprotocol was specified");d.add(f)}s.headers["Sec-WebSocket-Protocol"]=t.join(",")}if(s.origin&&(s.protocolVersion<13?s.headers["Sec-WebSocket-Origin"]=s.origin:s.headers.Origin=s.origin),(n.username||n.password)&&(s.auth=`${n.username}:${n.password}`),u){let f=s.path.split(":");s.socketPath=f[0],s.path=f[1]}let m;if(s.followRedirects){if(r._redirects===0){r._originalIpc=u,r._originalSecure=o,r._originalHostOrSocketPath=u?s.socketPath:n.host;let f=i&&i.headers;if(i={...i,headers:{}},f)for(let[b,g]of Object.entries(f))i.headers[b.toLowerCase()]=g}else if(r.listenerCount("redirect")===0){let f=u?r._originalIpc?s.socketPath===r._originalHostOrSocketPath:!1:r._originalIpc?!1:n.host===r._originalHostOrSocketPath;(!f||r._originalSecure&&!o)&&(delete s.headers.authorization,delete s.headers.cookie,f||delete s.headers.host,s.auth=void 0)}s.auth&&!i.headers.authorization&&(i.headers.authorization="Basic "+Buffer.from(s.auth).toString("base64")),m=r._req=c(s),r._redirects&&r.emit("redirect",r.url,m)}else m=r._req=c(s);s.timeout&&m.on("timeout",()=>{K(r,m,"Opening handshake has timed out")}),m.on("error",f=>{m===null||m[eo]||(m=r._req=null,li(r,f))}),m.on("response",f=>{let b=f.headers.location,g=f.statusCode;if(b&&s.followRedirects&&g>=300&&g<400){if(++r._redirects>s.maxRedirects){K(r,m,"Maximum redirects exceeded");return}m.abort();let y;try{y=new xs(b,e)}catch{let S=new SyntaxError(`Invalid URL: ${b}`);li(r,S);return}to(r,y,t,i)}else r.emit("unexpected-response",m,f)||K(r,m,`Unexpected server response: ${f.statusCode}`)}),m.on("upgrade",(f,b,g)=>{if(r.emit("upgrade",f),r.readyState!==N.CONNECTING)return;m=r._req=null;let y=f.headers.upgrade;if(y===void 0||y.toLowerCase()!=="websocket"){K(r,b,"Invalid Upgrade header");return}let C=il("sha1").update(l+ol).digest("base64");if(f.headers["sec-websocket-accept"]!==C){K(r,b,"Invalid Sec-WebSocket-Accept header");return}let S=f.headers["sec-websocket-protocol"],L;if(S!==void 0?d.size?d.has(S)||(L="Server sent an invalid subprotocol"):L="Server sent a subprotocol but none was requested":d.size&&(L="Server sent no subprotocol"),L){K(r,b,L);return}S&&(r._protocol=S);let U=f.headers["sec-websocket-extensions"];if(U!==void 0){if(!p){K(r,b,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let V;try{V=fl(U)}catch{K(r,b,"Invalid Sec-WebSocket-Extensions header");return}let me=Object.keys(V);if(me.length!==1||me[0]!==Ie.extensionName){K(r,b,"Server indicated an extension that was not requested");return}try{p.accept(V[Ie.extensionName])}catch{K(r,b,"Invalid Sec-WebSocket-Extensions header");return}r._extensions[Ie.extensionName]=p}r.setSocket(b,g,{allowSynchronousEvents:s.allowSynchronousEvents,generateMask:s.generateMask,maxPayload:s.maxPayload,skipUTF8Validation:s.skipUTF8Validation})}),s.finishRequest?s.finishRequest(m,r):m.end()}function li(r,e){r._readyState=N.CLOSING,r._errorEmitted=!0,r.emit("error",e),r.emitClose()}function gl(r){return r.path=r.socketPath,Jn.connect(r)}function _l(r){return r.path=void 0,!r.servername&&r.servername!==""&&(r.servername=Jn.isIP(r.host)?"":r.host),el.connect(r)}function K(r,e,t){r._readyState=N.CLOSING;let i=new Error(t);Error.captureStackTrace(i,K),e.setHeader?(e[eo]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(li,r,i)):(e.destroy(i),e.once("error",r.emit.bind(r,"error")),e.once("close",r.emitClose.bind(r)))}function vs(r,e,t){if(e){let i=nl(e)?e.size:dl(e).length;r._socket?r._sender._bufferedBytes+=i:r._bufferedAmount+=i}if(t){let i=new Error(`WebSocket is not open: readyState ${r.readyState} (${Ce[r.readyState]})`);process.nextTick(t,i)}}function bl(r,e){let t=this[B];t._closeFrameReceived=!0,t._closeMessage=e,t._closeCode=r,t._socket[B]!==void 0&&(t._socket.removeListener("data",ci),process.nextTick(io,t._socket),r===1005?t.close():t.close(r,e))}function wl(){let r=this[B];r.isPaused||r._socket.resume()}function El(r){let e=this[B];e._socket[B]!==void 0&&(e._socket.removeListener("data",ci),process.nextTick(io,e._socket),e.close(r[ul])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",r))}function Xn(){this[B].emitClose()}function yl(r,e){this[B].emit("message",r,e)}function Sl(r){let e=this[B];e._autoPong&&e.pong(r,!this._isServer,Qn),e.emit("ping",r)}function xl(r){this[B].emit("pong",r)}function io(r){r.resume()}function Cl(r){let e=this[B];e.readyState!==N.CLOSED&&(e.readyState===N.OPEN&&(e._readyState=N.CLOSING,so(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",r)))}function so(r){r._closeTimer=setTimeout(r._socket.destroy.bind(r._socket),pl)}function ro(){let r=this[B];this.removeListener("close",ro),this.removeListener("data",ci),this.removeListener("end",no),r._readyState=N.CLOSING;let e;!this._readableState.endEmitted&&!r._closeFrameReceived&&!r._receiver._writableState.errorEmitted&&(e=r._socket.read())!==null&&r._receiver.write(e),r._receiver.end(),this[B]=void 0,clearTimeout(r._closeTimer),r._receiver._writableState.finished||r._receiver._writableState.errorEmitted?r.emitClose():(r._receiver.on("error",Xn),r._receiver.on("finish",Xn))}function ci(r){this[B]._receiver.write(r)||this.pause()}function no(){let r=this[B];r._readyState=N.CLOSING,r._receiver.end(),this.end()}function oo(){let r=this[B];this.removeListener("error",oo),this.on("error",Qn),r&&(r._readyState=N.CLOSING,this.destroy())}});var co=v((Wd,lo)=>{"use strict";var Bd=fi(),{Duplex:Ol}=require("stream");function uo(r){r.emit("close")}function vl(){!this.destroyed&&this._writableState.finished&&this.destroy()}function ho(r){this.removeListener("error",ho),this.destroy(),this.listenerCount("error")===0&&this.emit("error",r)}function Tl(r,e){let t=!0,i=new Ol({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return r.on("message",function(n,o){let u=!o&&i._readableState.objectMode?n.toString():n;i.push(u)||r.pause()}),r.once("error",function(n){i.destroyed||(t=!1,i.destroy(n))}),r.once("close",function(){i.destroyed||i.push(null)}),i._destroy=function(s,n){if(r.readyState===r.CLOSED){n(s),process.nextTick(uo,i);return}let o=!1;r.once("error",function(a){o=!0,n(a)}),r.once("close",function(){o||n(s),process.nextTick(uo,i)}),t&&r.terminate()},i._final=function(s){if(r.readyState===r.CONNECTING){r.once("open",function(){i._final(s)});return}r._socket!==null&&(r._socket._writableState.finished?(s(),i._readableState.endEmitted&&i.destroy()):(r._socket.once("finish",function(){s()}),r.close()))},i._read=function(){r.isPaused&&r.resume()},i._write=function(s,n,o){if(r.readyState===r.CONNECTING){r.once("open",function(){i._write(s,n,o)});return}r.send(s,o)},i.on("end",vl),i.on("error",ho),i}lo.exports=Tl});var po=v(($d,fo)=>{"use strict";var{tokenChars:Ll}=et();function Al(r){let e=new Set,t=-1,i=-1,s=0;for(s;s<r.length;s++){let o=r.charCodeAt(s);if(i===-1&&Ll[o]===1)t===-1&&(t=s);else if(s!==0&&(o===32||o===9))i===-1&&t!==-1&&(i=s);else if(o===44){if(t===-1)throw new SyntaxError(`Unexpected character at index ${s}`);i===-1&&(i=s);let u=r.slice(t,i);if(e.has(u))throw new SyntaxError(`The "${u}" subprotocol is duplicated`);e.add(u),t=i=-1}else throw new SyntaxError(`Unexpected character at index ${s}`)}if(t===-1||i!==-1)throw new SyntaxError("Unexpected end of input");let n=r.slice(t,s);if(e.has(n))throw new SyntaxError(`The "${n}" subprotocol is duplicated`);return e.add(n),e}fo.exports={parse:Al}});var yo=v((Gd,Eo)=>{"use strict";var Il=require("events"),di=require("http"),{Duplex:zd}=require("stream"),{createHash:Dl}=require("crypto"),mo=Ss(),qe=Ot(),Nl=po(),Rl=fi(),{GUID:kl,kWebSocket:Fl}=ye(),Pl=/^[+/0-9A-Za-z]{22}==$/,go=0,_o=1,wo=2,Ts=class extends Il{constructor(e,t){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:Rl,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=di.createServer((i,s)=>{let n=di.STATUS_CODES[426];s.writeHead(426,{"Content-Length":n.length,"Content-Type":"text/plain"}),s.end(n)}),this._server.listen(e.port,e.host,e.backlog,t)):e.server&&(this._server=e.server),this._server){let i=this.emit.bind(this,"connection");this._removeListeners=Ml(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(s,n,o)=>{this.handleUpgrade(s,n,o,i)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=go}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===wo){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(At,this);return}if(e&&this.once("close",e),this._state!==_o)if(this._state=_o,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(At,this):process.nextTick(At,this);else{let t=this._server;this._removeListeners(),this._removeListeners=this._server=null,t.close(()=>{At(this)})}}shouldHandle(e){if(this.options.path){let t=e.url.indexOf("?");if((t!==-1?e.url.slice(0,t):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,t,i,s){t.on("error",bo);let n=e.headers["sec-websocket-key"],o=e.headers.upgrade,u=+e.headers["sec-websocket-version"];if(e.method!=="GET"){Ze(this,e,t,405,"Invalid HTTP method");return}if(o===void 0||o.toLowerCase()!=="websocket"){Ze(this,e,t,400,"Invalid Upgrade header");return}if(n===void 0||!Pl.test(n)){Ze(this,e,t,400,"Missing or invalid Sec-WebSocket-Key header");return}if(u!==8&&u!==13){Ze(this,e,t,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(e)){It(t,400);return}let a=e.headers["sec-websocket-protocol"],h=new Set;if(a!==void 0)try{h=Nl.parse(a)}catch{Ze(this,e,t,400,"Invalid Sec-WebSocket-Protocol header");return}let l=e.headers["sec-websocket-extensions"],c={};if(this.options.perMessageDeflate&&l!==void 0){let d=new qe(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let p=mo.parse(l);p[qe.extensionName]&&(d.accept(p[qe.extensionName]),c[qe.extensionName]=d)}catch{Ze(this,e,t,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let d={origin:e.headers[`${u===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(d,(p,m,f,b)=>{if(!p)return It(t,m||401,f,b);this.completeUpgrade(c,n,h,e,t,i,s)});return}if(!this.options.verifyClient(d))return It(t,401)}this.completeUpgrade(c,n,h,e,t,i,s)}completeUpgrade(e,t,i,s,n,o,u){if(!n.readable||!n.writable)return n.destroy();if(n[Fl])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>go)return It(n,503);let h=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${Dl("sha1").update(t+kl).digest("base64")}`],l=new this.options.WebSocket(null,void 0,this.options);if(i.size){let c=this.options.handleProtocols?this.options.handleProtocols(i,s):i.values().next().value;c&&(h.push(`Sec-WebSocket-Protocol: ${c}`),l._protocol=c)}if(e[qe.extensionName]){let c=e[qe.extensionName].params,d=mo.format({[qe.extensionName]:[c]});h.push(`Sec-WebSocket-Extensions: ${d}`),l._extensions=e}this.emit("headers",h,s),n.write(h.concat(`\r
7
+ ${d}`),i?s.reset(d):d}function wh(r,e,t,i={}){if(!hn){hn=!0;let n="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning)process.emitWarning(n,"DeprecationWarning");else{let o=new Error(n);o.name="DeprecationWarning",console.warn(new Error(n))}}return t=Math.max(t,0),mn(r,{start:{column:t,line:e}},i)}St.codeFrameColumns=mn;St.default=wh;St.highlight=pn});var ye=v((vd,wn)=>{"use strict";var _n=["nodebuffer","arraybuffer","fragments"],bn=typeof Blob<"u";bn&&_n.push("blob");wn.exports={BINARY_TYPES:_n,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:bn,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var xt=v((Td,ti)=>{"use strict";var{EMPTY_BUFFER:Eh}=ye(),as=Buffer[Symbol.species];function yh(r,e){if(r.length===0)return Eh;if(r.length===1)return r[0];let t=Buffer.allocUnsafe(e),i=0;for(let s=0;s<r.length;s++){let n=r[s];t.set(n,i),i+=n.length}return i<e?new as(t.buffer,t.byteOffset,i):t}function En(r,e,t,i,s){for(let n=0;n<s;n++)t[i+n]=r[n]^e[n&3]}function yn(r,e){for(let t=0;t<r.length;t++)r[t]^=e[t&3]}function Sh(r){return r.length===r.buffer.byteLength?r.buffer:r.buffer.slice(r.byteOffset,r.byteOffset+r.length)}function us(r){if(us.readOnly=!0,Buffer.isBuffer(r))return r;let e;return r instanceof ArrayBuffer?e=new as(r):ArrayBuffer.isView(r)?e=new as(r.buffer,r.byteOffset,r.byteLength):(e=Buffer.from(r),us.readOnly=!1),e}ti.exports={concat:yh,mask:En,toArrayBuffer:Sh,toBuffer:us,unmask:yn};if(!process.env.WS_NO_BUFFER_UTIL)try{let r=require("bufferutil");ti.exports.mask=function(e,t,i,s,n){n<48?En(e,t,i,s,n):r.mask(e,t,i,s,n)},ti.exports.unmask=function(e,t){e.length<32?yn(e,t):r.unmask(e,t)}}catch{}});var Cn=v((Ld,xn)=>{"use strict";var Sn=Symbol("kDone"),hs=Symbol("kRun"),ls=class{constructor(e){this[Sn]=()=>{this.pending--,this[hs]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[hs]()}[hs](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[Sn])}}};xn.exports=ls});var Ot=v((Ad,Ln)=>{"use strict";var Ct=require("zlib"),On=xt(),xh=Cn(),{kStatusCode:vn}=ye(),Ch=Buffer[Symbol.species],Oh=Buffer.from([0,0,255,255]),si=Symbol("permessage-deflate"),Se=Symbol("total-length"),Je=Symbol("callback"),Ie=Symbol("buffers"),Qe=Symbol("error"),ii,cs=class{constructor(e,t,i){if(this._maxPayload=i|0,this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!t,this._deflate=null,this._inflate=null,this.params=null,!ii){let s=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;ii=new xh(s)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[Je];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let t=this._options,i=e.find(s=>!(t.serverNoContextTakeover===!1&&s.server_no_context_takeover||s.server_max_window_bits&&(t.serverMaxWindowBits===!1||typeof t.serverMaxWindowBits=="number"&&t.serverMaxWindowBits>s.server_max_window_bits)||typeof t.clientMaxWindowBits=="number"&&!s.client_max_window_bits));if(!i)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(i.server_no_context_takeover=!0),t.clientNoContextTakeover&&(i.client_no_context_takeover=!0),typeof t.serverMaxWindowBits=="number"&&(i.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits=="number"?i.client_max_window_bits=t.clientMaxWindowBits:(i.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete i.client_max_window_bits,i}acceptAsClient(e){let t=e[0];if(this._options.clientNoContextTakeover===!1&&t.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!t.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(t.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return t}normalizeParams(e){return e.forEach(t=>{Object.keys(t).forEach(i=>{let s=t[i];if(s.length>1)throw new Error(`Parameter "${i}" must have only a single value`);if(s=s[0],i==="client_max_window_bits"){if(s!==!0){let n=+s;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${i}": ${s}`);s=n}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${i}": ${s}`)}else if(i==="server_max_window_bits"){let n=+s;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${i}": ${s}`);s=n}else if(i==="client_no_context_takeover"||i==="server_no_context_takeover"){if(s!==!0)throw new TypeError(`Invalid value for parameter "${i}": ${s}`)}else throw new Error(`Unknown parameter "${i}"`);t[i]=s})}),e}decompress(e,t,i){ii.add(s=>{this._decompress(e,t,(n,o)=>{s(),i(n,o)})})}compress(e,t,i){ii.add(s=>{this._compress(e,t,(n,o)=>{s(),i(n,o)})})}_decompress(e,t,i){let s=this._isServer?"client":"server";if(!this._inflate){let n=`${s}_max_window_bits`,o=typeof this.params[n]!="number"?Ct.Z_DEFAULT_WINDOWBITS:this.params[n];this._inflate=Ct.createInflateRaw({...this._options.zlibInflateOptions,windowBits:o}),this._inflate[si]=this,this._inflate[Se]=0,this._inflate[Ie]=[],this._inflate.on("error",Th),this._inflate.on("data",Tn)}this._inflate[Je]=i,this._inflate.write(e),t&&this._inflate.write(Oh),this._inflate.flush(()=>{let n=this._inflate[Qe];if(n){this._inflate.close(),this._inflate=null,i(n);return}let o=On.concat(this._inflate[Ie],this._inflate[Se]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[Se]=0,this._inflate[Ie]=[],t&&this.params[`${s}_no_context_takeover`]&&this._inflate.reset()),i(null,o)})}_compress(e,t,i){let s=this._isServer?"server":"client";if(!this._deflate){let n=`${s}_max_window_bits`,o=typeof this.params[n]!="number"?Ct.Z_DEFAULT_WINDOWBITS:this.params[n];this._deflate=Ct.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:o}),this._deflate[Se]=0,this._deflate[Ie]=[],this._deflate.on("data",vh)}this._deflate[Je]=i,this._deflate.write(e),this._deflate.flush(Ct.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let n=On.concat(this._deflate[Ie],this._deflate[Se]);t&&(n=new Ch(n.buffer,n.byteOffset,n.length-4)),this._deflate[Je]=null,this._deflate[Se]=0,this._deflate[Ie]=[],t&&this.params[`${s}_no_context_takeover`]&&this._deflate.reset(),i(null,n)})}};Ln.exports=cs;function vh(r){this[Ie].push(r),this[Se]+=r.length}function Tn(r){if(this[Se]+=r.length,this[si]._maxPayload<1||this[Se]<=this[si]._maxPayload){this[Ie].push(r);return}this[Qe]=new RangeError("Max payload size exceeded"),this[Qe].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Qe][vn]=1009,this.removeListener("data",Tn),this.reset()}function Th(r){if(this[si]._inflate=null,this[Qe]){this[Je](this[Qe]);return}r[vn]=1007,this[Je](r)}});var et=v((Id,ri)=>{"use strict";var{isUtf8:An}=require("buffer"),{hasBlob:Lh}=ye(),Ah=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function Ih(r){return r>=1e3&&r<=1014&&r!==1004&&r!==1005&&r!==1006||r>=3e3&&r<=4999}function fs(r){let e=r.length,t=0;for(;t<e;)if((r[t]&128)===0)t++;else if((r[t]&224)===192){if(t+1===e||(r[t+1]&192)!==128||(r[t]&254)===192)return!1;t+=2}else if((r[t]&240)===224){if(t+2>=e||(r[t+1]&192)!==128||(r[t+2]&192)!==128||r[t]===224&&(r[t+1]&224)===128||r[t]===237&&(r[t+1]&224)===160)return!1;t+=3}else if((r[t]&248)===240){if(t+3>=e||(r[t+1]&192)!==128||(r[t+2]&192)!==128||(r[t+3]&192)!==128||r[t]===240&&(r[t+1]&240)===128||r[t]===244&&r[t+1]>143||r[t]>244)return!1;t+=4}else return!1;return!0}function Dh(r){return Lh&&typeof r=="object"&&typeof r.arrayBuffer=="function"&&typeof r.type=="string"&&typeof r.stream=="function"&&(r[Symbol.toStringTag]==="Blob"||r[Symbol.toStringTag]==="File")}ri.exports={isBlob:Dh,isValidStatusCode:Ih,isValidUTF8:fs,tokenChars:Ah};if(An)ri.exports.isValidUTF8=function(r){return r.length<24?fs(r):An(r)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let r=require("utf-8-validate");ri.exports.isValidUTF8=function(e){return e.length<32?fs(e):r(e)}}catch{}});var _s=v((Dd,Pn)=>{"use strict";var{Writable:Nh}=require("stream"),In=Ot(),{BINARY_TYPES:Rh,EMPTY_BUFFER:Dn,kStatusCode:kh,kWebSocket:Fh}=ye(),{concat:ds,toArrayBuffer:Ph,unmask:Mh}=xt(),{isValidStatusCode:Uh,isValidUTF8:Nn}=et(),ni=Buffer[Symbol.species],ee=0,Rn=1,kn=2,Fn=3,ps=4,ms=5,oi=6,gs=class extends Nh{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||Rh[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[Fh]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=ee}_write(e,t,i){if(this._opcode===8&&this._state==ee)return i();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(i)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let i=this._buffers[0];return this._buffers[0]=new ni(i.buffer,i.byteOffset+e,i.length-e),new ni(i.buffer,i.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let i=this._buffers[0],s=t.length-e;e>=i.length?t.set(this._buffers.shift(),s):(t.set(new Uint8Array(i.buffer,i.byteOffset,e),s),this._buffers[0]=new ni(i.buffer,i.byteOffset+e,i.length-e)),e-=i.length}while(e>0);return t}startLoop(e){this._loop=!0;do switch(this._state){case ee:this.getInfo(e);break;case Rn:this.getPayloadLength16(e);break;case kn:this.getPayloadLength64(e);break;case Fn:this.getMask();break;case ps:this.getData(e);break;case ms:case oi:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let t=this.consume(2);if((t[0]&48)!==0){let s=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(s);return}let i=(t[0]&64)===64;if(i&&!this._extensions[In.extensionName]){let s=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(s);return}if(this._fin=(t[0]&128)===128,this._opcode=t[0]&15,this._payloadLength=t[1]&127,this._opcode===0){if(i){let s=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(s);return}if(!this._fragmented){let s=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(s);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let s=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(s);return}this._compressed=i}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let s=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(s);return}if(i){let s=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(s);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let s=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(s);return}}else{let s=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(s);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(t[1]&128)===128,this._isServer){if(!this._masked){let s=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(s);return}}else if(this._masked){let s=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(s);return}this._payloadLength===126?this._state=Rn:this._payloadLength===127?this._state=kn:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let t=this.consume(8),i=t.readUInt32BE(0);if(i>Math.pow(2,21)-1){let s=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(s);return}this._payloadLength=i*Math.pow(2,32)+t.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let t=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(t);return}this._masked?this._state=Fn:this._state=ps}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=ps}getData(e){let t=Dn;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}t=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&Mh(t,this._mask)}if(this._opcode>7){this.controlMessage(t,e);return}if(this._compressed){this._state=ms,this.decompress(t,e);return}t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e)}decompress(e,t){this._extensions[In.extensionName].decompress(e,this._fin,(s,n)=>{if(s)return t(s);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let o=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");t(o);return}this._fragments.push(n)}this.dataMessage(t),this._state===ee&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=ee;return}let t=this._messageLength,i=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let s;this._binaryType==="nodebuffer"?s=ds(i,t):this._binaryType==="arraybuffer"?s=Ph(ds(i,t)):this._binaryType==="blob"?s=new Blob(i):s=i,this._allowSynchronousEvents?(this.emit("message",s,!0),this._state=ee):(this._state=oi,setImmediate(()=>{this.emit("message",s,!0),this._state=ee,this.startLoop(e)}))}else{let s=ds(i,t);if(!this._skipUTF8Validation&&!Nn(s)){let n=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(n);return}this._state===ms||this._allowSynchronousEvents?(this.emit("message",s,!1),this._state=ee):(this._state=oi,setImmediate(()=>{this.emit("message",s,!1),this._state=ee,this.startLoop(e)}))}}controlMessage(e,t){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,Dn),this.end();else{let i=e.readUInt16BE(0);if(!Uh(i)){let n=this.createError(RangeError,`invalid status code ${i}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");t(n);return}let s=new ni(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!Nn(s)){let n=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(n);return}this._loop=!1,this.emit("conclude",i,s),this.end()}this._state=ee;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=ee):(this._state=oi,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=ee,this.startLoop(t)}))}createError(e,t,i,s,n){this._loop=!1,this._errored=!0;let o=new e(i?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(o,this.createError),o.code=n,o[kh]=s,o}};Pn.exports=gs});var Es=v((Rd,Bn)=>{"use strict";var{Duplex:Nd}=require("stream"),{randomFillSync:Bh}=require("crypto"),Mn=Ot(),{EMPTY_BUFFER:Wh,kWebSocket:$h,NOOP:zh}=ye(),{isBlob:tt,isValidStatusCode:Gh}=et(),{mask:Un,toBuffer:je}=xt(),te=Symbol("kByteLength"),jh=Buffer.alloc(4),ai=8*1024,He,it=ai,he=0,Hh=1,Vh=2,bs=class r{constructor(e,t,i){this._extensions=t||{},i&&(this._generateMask=i,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=he,this.onerror=zh,this[$h]=void 0}static frame(e,t){let i,s=!1,n=2,o=!1;t.mask&&(i=t.maskBuffer||jh,t.generateMask?t.generateMask(i):(it===ai&&(He===void 0&&(He=Buffer.alloc(ai)),Bh(He,0,ai),it=0),i[0]=He[it++],i[1]=He[it++],i[2]=He[it++],i[3]=He[it++]),o=(i[0]|i[1]|i[2]|i[3])===0,n=6);let u;typeof e=="string"?(!t.mask||o)&&t[te]!==void 0?u=t[te]:(e=Buffer.from(e),u=e.length):(u=e.length,s=t.mask&&t.readOnly&&!o);let a=u;u>=65536?(n+=8,a=127):u>125&&(n+=2,a=126);let h=Buffer.allocUnsafe(s?u+n:n);return h[0]=t.fin?t.opcode|128:t.opcode,t.rsv1&&(h[0]|=64),h[1]=a,a===126?h.writeUInt16BE(u,2):a===127&&(h[2]=h[3]=0,h.writeUIntBE(u,4,6)),t.mask?(h[1]|=128,h[n-4]=i[0],h[n-3]=i[1],h[n-2]=i[2],h[n-1]=i[3],o?[h,e]:s?(Un(e,i,h,n,u),[h]):(Un(e,i,e,0,u),[h,e])):[h,e]}close(e,t,i,s){let n;if(e===void 0)n=Wh;else{if(typeof e!="number"||!Gh(e))throw new TypeError("First argument must be a valid error code number");if(t===void 0||!t.length)n=Buffer.allocUnsafe(2),n.writeUInt16BE(e,0);else{let u=Buffer.byteLength(t);if(u>123)throw new RangeError("The message must not be greater than 123 bytes");n=Buffer.allocUnsafe(2+u),n.writeUInt16BE(e,0),typeof t=="string"?n.write(t,2):n.set(t,2)}}let o={[te]:n.length,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==he?this.enqueue([this.dispatch,n,!1,o,s]):this.sendFrame(r.frame(n,o),s)}ping(e,t,i){let s,n;if(typeof e=="string"?(s=Buffer.byteLength(e),n=!1):tt(e)?(s=e.size,n=!1):(e=je(e),s=e.length,n=je.readOnly),s>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[te]:s,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:n,rsv1:!1};tt(e)?this._state!==he?this.enqueue([this.getBlobData,e,!1,o,i]):this.getBlobData(e,!1,o,i):this._state!==he?this.enqueue([this.dispatch,e,!1,o,i]):this.sendFrame(r.frame(e,o),i)}pong(e,t,i){let s,n;if(typeof e=="string"?(s=Buffer.byteLength(e),n=!1):tt(e)?(s=e.size,n=!1):(e=je(e),s=e.length,n=je.readOnly),s>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[te]:s,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:n,rsv1:!1};tt(e)?this._state!==he?this.enqueue([this.getBlobData,e,!1,o,i]):this.getBlobData(e,!1,o,i):this._state!==he?this.enqueue([this.dispatch,e,!1,o,i]):this.sendFrame(r.frame(e,o),i)}send(e,t,i){let s=this._extensions[Mn.extensionName],n=t.binary?2:1,o=t.compress,u,a;typeof e=="string"?(u=Buffer.byteLength(e),a=!1):tt(e)?(u=e.size,a=!1):(e=je(e),u=e.length,a=je.readOnly),this._firstFragment?(this._firstFragment=!1,o&&s&&s.params[s._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(o=u>=s._threshold),this._compress=o):(o=!1,n=0),t.fin&&(this._firstFragment=!0);let h={[te]:u,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:n,readOnly:a,rsv1:o};tt(e)?this._state!==he?this.enqueue([this.getBlobData,e,this._compress,h,i]):this.getBlobData(e,this._compress,h,i):this._state!==he?this.enqueue([this.dispatch,e,this._compress,h,i]):this.dispatch(e,this._compress,h,i)}getBlobData(e,t,i,s){this._bufferedBytes+=i[te],this._state=Vh,e.arrayBuffer().then(n=>{if(this._socket.destroyed){let u=new Error("The socket was closed while the blob was being read");process.nextTick(ws,this,u,s);return}this._bufferedBytes-=i[te];let o=je(n);t?this.dispatch(o,t,i,s):(this._state=he,this.sendFrame(r.frame(o,i),s),this.dequeue())}).catch(n=>{process.nextTick(qh,this,n,s)})}dispatch(e,t,i,s){if(!t){this.sendFrame(r.frame(e,i),s);return}let n=this._extensions[Mn.extensionName];this._bufferedBytes+=i[te],this._state=Hh,n.compress(e,i.fin,(o,u)=>{if(this._socket.destroyed){let a=new Error("The socket was closed while data was being compressed");ws(this,a,s);return}this._bufferedBytes-=i[te],this._state=he,i.readOnly=!1,this.sendFrame(r.frame(u,i),s),this.dequeue()})}dequeue(){for(;this._state===he&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][te],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][te],this._queue.push(e)}sendFrame(e,t){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}};Bn.exports=bs;function ws(r,e,t){typeof t=="function"&&t(e);for(let i=0;i<r._queue.length;i++){let s=r._queue[i],n=s[s.length-1];typeof n=="function"&&n(e)}}function qh(r,e,t){ws(r,e,t),r.onerror(e)}});var Zn=v((kd,qn)=>{"use strict";var{kForOnEventAttribute:vt,kListener:ys}=ye(),Wn=Symbol("kCode"),$n=Symbol("kData"),zn=Symbol("kError"),Gn=Symbol("kMessage"),jn=Symbol("kReason"),st=Symbol("kTarget"),Hn=Symbol("kType"),Vn=Symbol("kWasClean"),xe=class{constructor(e){this[st]=null,this[Hn]=e}get target(){return this[st]}get type(){return this[Hn]}};Object.defineProperty(xe.prototype,"target",{enumerable:!0});Object.defineProperty(xe.prototype,"type",{enumerable:!0});var Ve=class extends xe{constructor(e,t={}){super(e),this[Wn]=t.code===void 0?0:t.code,this[jn]=t.reason===void 0?"":t.reason,this[Vn]=t.wasClean===void 0?!1:t.wasClean}get code(){return this[Wn]}get reason(){return this[jn]}get wasClean(){return this[Vn]}};Object.defineProperty(Ve.prototype,"code",{enumerable:!0});Object.defineProperty(Ve.prototype,"reason",{enumerable:!0});Object.defineProperty(Ve.prototype,"wasClean",{enumerable:!0});var rt=class extends xe{constructor(e,t={}){super(e),this[zn]=t.error===void 0?null:t.error,this[Gn]=t.message===void 0?"":t.message}get error(){return this[zn]}get message(){return this[Gn]}};Object.defineProperty(rt.prototype,"error",{enumerable:!0});Object.defineProperty(rt.prototype,"message",{enumerable:!0});var Tt=class extends xe{constructor(e,t={}){super(e),this[$n]=t.data===void 0?null:t.data}get data(){return this[$n]}};Object.defineProperty(Tt.prototype,"data",{enumerable:!0});var Zh={addEventListener(r,e,t={}){for(let s of this.listeners(r))if(!t[vt]&&s[ys]===e&&!s[vt])return;let i;if(r==="message")i=function(n,o){let u=new Tt("message",{data:o?n:n.toString()});u[st]=this,ui(e,this,u)};else if(r==="close")i=function(n,o){let u=new Ve("close",{code:n,reason:o.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});u[st]=this,ui(e,this,u)};else if(r==="error")i=function(n){let o=new rt("error",{error:n,message:n.message});o[st]=this,ui(e,this,o)};else if(r==="open")i=function(){let n=new xe("open");n[st]=this,ui(e,this,n)};else return;i[vt]=!!t[vt],i[ys]=e,t.once?this.once(r,i):this.on(r,i)},removeEventListener(r,e){for(let t of this.listeners(r))if(t[ys]===e&&!t[vt]){this.removeListener(r,t);break}}};qn.exports={CloseEvent:Ve,ErrorEvent:rt,Event:xe,EventTarget:Zh,MessageEvent:Tt};function ui(r,e,t){typeof r=="object"&&r.handleEvent?r.handleEvent.call(r,t):r.call(e,t)}});var Ss=v((Fd,Yn)=>{"use strict";var{tokenChars:Lt}=et();function _e(r,e,t){r[e]===void 0?r[e]=[t]:r[e].push(t)}function Yh(r){let e=Object.create(null),t=Object.create(null),i=!1,s=!1,n=!1,o,u,a=-1,h=-1,l=-1,c=0;for(;c<r.length;c++)if(h=r.charCodeAt(c),o===void 0)if(l===-1&&Lt[h]===1)a===-1&&(a=c);else if(c!==0&&(h===32||h===9))l===-1&&a!==-1&&(l=c);else if(h===59||h===44){if(a===-1)throw new SyntaxError(`Unexpected character at index ${c}`);l===-1&&(l=c);let p=r.slice(a,l);h===44?(_e(e,p,t),t=Object.create(null)):o=p,a=l=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);else if(u===void 0)if(l===-1&&Lt[h]===1)a===-1&&(a=c);else if(h===32||h===9)l===-1&&a!==-1&&(l=c);else if(h===59||h===44){if(a===-1)throw new SyntaxError(`Unexpected character at index ${c}`);l===-1&&(l=c),_e(t,r.slice(a,l),!0),h===44&&(_e(e,o,t),t=Object.create(null),o=void 0),a=l=-1}else if(h===61&&a!==-1&&l===-1)u=r.slice(a,c),a=l=-1;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(s){if(Lt[h]!==1)throw new SyntaxError(`Unexpected character at index ${c}`);a===-1?a=c:i||(i=!0),s=!1}else if(n)if(Lt[h]===1)a===-1&&(a=c);else if(h===34&&a!==-1)n=!1,l=c;else if(h===92)s=!0;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(h===34&&r.charCodeAt(c-1)===61)n=!0;else if(l===-1&&Lt[h]===1)a===-1&&(a=c);else if(a!==-1&&(h===32||h===9))l===-1&&(l=c);else if(h===59||h===44){if(a===-1)throw new SyntaxError(`Unexpected character at index ${c}`);l===-1&&(l=c);let p=r.slice(a,l);i&&(p=p.replace(/\\/g,""),i=!1),_e(t,u,p),h===44&&(_e(e,o,t),t=Object.create(null),o=void 0),u=void 0,a=l=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);if(a===-1||n||h===32||h===9)throw new SyntaxError("Unexpected end of input");l===-1&&(l=c);let d=r.slice(a,l);return o===void 0?_e(e,d,t):(u===void 0?_e(t,d,!0):i?_e(t,u,d.replace(/\\/g,"")):_e(t,u,d),_e(e,o,t)),e}function Kh(r){return Object.keys(r).map(e=>{let t=r[e];return Array.isArray(t)||(t=[t]),t.map(i=>[e].concat(Object.keys(i).map(s=>{let n=i[s];return Array.isArray(n)||(n=[n]),n.map(o=>o===!0?s:`${s}=${o}`).join("; ")})).join("; ")).join(", ")}).join(", ")}Yn.exports={format:Kh,parse:Yh}});var fi=v((Ud,ao)=>{"use strict";var Xh=require("events"),Jh=require("https"),Qh=require("http"),Jn=require("net"),el=require("tls"),{randomBytes:tl,createHash:il}=require("crypto"),{Duplex:Pd,Readable:Md}=require("stream"),{URL:xs}=require("url"),De=Ot(),sl=_s(),rl=Es(),{isBlob:nl}=et(),{BINARY_TYPES:Kn,EMPTY_BUFFER:hi,GUID:ol,kForOnEventAttribute:Cs,kListener:al,kStatusCode:ul,kWebSocket:B,NOOP:Qn}=ye(),{EventTarget:{addEventListener:hl,removeEventListener:ll}}=Zn(),{format:cl,parse:fl}=Ss(),{toBuffer:dl}=xt(),pl=30*1e3,eo=Symbol("kAborted"),Os=[8,13],Ce=["CONNECTING","OPEN","CLOSING","CLOSED"],ml=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,N=class r extends Xh{constructor(e,t,i){super(),this._binaryType=Kn[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=hi,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=r.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,t===void 0?t=[]:Array.isArray(t)||(typeof t=="object"&&t!==null?(i=t,t=[]):t=[t]),to(this,e,t,i)):(this._autoPong=i.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){Kn.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,t,i){let s=new sl({allowSynchronousEvents:i.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation}),n=new rl(e,this._extensions,i.generateMask);this._receiver=s,this._sender=n,this._socket=e,s[B]=this,n[B]=this,e[B]=this,s.on("conclude",bl),s.on("drain",wl),s.on("error",El),s.on("message",yl),s.on("ping",Sl),s.on("pong",xl),n.onerror=Cl,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",ro),e.on("data",ci),e.on("end",no),e.on("error",oo),this._readyState=r.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=r.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[De.extensionName]&&this._extensions[De.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=r.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==r.CLOSED){if(this.readyState===r.CONNECTING){X(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===r.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=r.CLOSING,this._sender.close(e,t,!this._isServer,i=>{i||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),so(this)}}pause(){this.readyState===r.CONNECTING||this.readyState===r.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,t,i){if(this.readyState===r.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(i=e,e=t=void 0):typeof t=="function"&&(i=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==r.OPEN){vs(this,e,i);return}t===void 0&&(t=!this._isServer),this._sender.ping(e||hi,t,i)}pong(e,t,i){if(this.readyState===r.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(i=e,e=t=void 0):typeof t=="function"&&(i=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==r.OPEN){vs(this,e,i);return}t===void 0&&(t=!this._isServer),this._sender.pong(e||hi,t,i)}resume(){this.readyState===r.CONNECTING||this.readyState===r.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,i){if(this.readyState===r.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"&&(i=t,t={}),typeof e=="number"&&(e=e.toString()),this.readyState!==r.OPEN){vs(this,e,i);return}let s={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[De.extensionName]||(s.compress=!1),this._sender.send(e||hi,s,i)}terminate(){if(this.readyState!==r.CLOSED){if(this.readyState===r.CONNECTING){X(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=r.CLOSING,this._socket.destroy())}}};Object.defineProperty(N,"CONNECTING",{enumerable:!0,value:Ce.indexOf("CONNECTING")});Object.defineProperty(N.prototype,"CONNECTING",{enumerable:!0,value:Ce.indexOf("CONNECTING")});Object.defineProperty(N,"OPEN",{enumerable:!0,value:Ce.indexOf("OPEN")});Object.defineProperty(N.prototype,"OPEN",{enumerable:!0,value:Ce.indexOf("OPEN")});Object.defineProperty(N,"CLOSING",{enumerable:!0,value:Ce.indexOf("CLOSING")});Object.defineProperty(N.prototype,"CLOSING",{enumerable:!0,value:Ce.indexOf("CLOSING")});Object.defineProperty(N,"CLOSED",{enumerable:!0,value:Ce.indexOf("CLOSED")});Object.defineProperty(N.prototype,"CLOSED",{enumerable:!0,value:Ce.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(r=>{Object.defineProperty(N.prototype,r,{enumerable:!0})});["open","error","close","message"].forEach(r=>{Object.defineProperty(N.prototype,`on${r}`,{enumerable:!0,get(){for(let e of this.listeners(r))if(e[Cs])return e[al];return null},set(e){for(let t of this.listeners(r))if(t[Cs]){this.removeListener(r,t);break}typeof e=="function"&&this.addEventListener(r,e,{[Cs]:!0})}})});N.prototype.addEventListener=hl;N.prototype.removeEventListener=ll;ao.exports=N;function to(r,e,t,i){let s={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:Os[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...i,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(r._autoPong=s.autoPong,!Os.includes(s.protocolVersion))throw new RangeError(`Unsupported protocol version: ${s.protocolVersion} (supported versions: ${Os.join(", ")})`);let n;if(e instanceof xs)n=e;else try{n=new xs(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}n.protocol==="http:"?n.protocol="ws:":n.protocol==="https:"&&(n.protocol="wss:"),r._url=n.href;let o=n.protocol==="wss:",u=n.protocol==="ws+unix:",a;if(n.protocol!=="ws:"&&!o&&!u?a=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:u&&!n.pathname?a="The URL's pathname is empty":n.hash&&(a="The URL contains a fragment identifier"),a){let f=new SyntaxError(a);if(r._redirects===0)throw f;li(r,f);return}let h=o?443:80,l=tl(16).toString("base64"),c=o?Jh.request:Qh.request,d=new Set,p;if(s.createConnection=s.createConnection||(o?_l:gl),s.defaultPort=s.defaultPort||h,s.port=n.port||h,s.host=n.hostname.startsWith("[")?n.hostname.slice(1,-1):n.hostname,s.headers={...s.headers,"Sec-WebSocket-Version":s.protocolVersion,"Sec-WebSocket-Key":l,Connection:"Upgrade",Upgrade:"websocket"},s.path=n.pathname+n.search,s.timeout=s.handshakeTimeout,s.perMessageDeflate&&(p=new De(s.perMessageDeflate!==!0?s.perMessageDeflate:{},!1,s.maxPayload),s.headers["Sec-WebSocket-Extensions"]=cl({[De.extensionName]:p.offer()})),t.length){for(let f of t){if(typeof f!="string"||!ml.test(f)||d.has(f))throw new SyntaxError("An invalid or duplicated subprotocol was specified");d.add(f)}s.headers["Sec-WebSocket-Protocol"]=t.join(",")}if(s.origin&&(s.protocolVersion<13?s.headers["Sec-WebSocket-Origin"]=s.origin:s.headers.Origin=s.origin),(n.username||n.password)&&(s.auth=`${n.username}:${n.password}`),u){let f=s.path.split(":");s.socketPath=f[0],s.path=f[1]}let m;if(s.followRedirects){if(r._redirects===0){r._originalIpc=u,r._originalSecure=o,r._originalHostOrSocketPath=u?s.socketPath:n.host;let f=i&&i.headers;if(i={...i,headers:{}},f)for(let[w,_]of Object.entries(f))i.headers[w.toLowerCase()]=_}else if(r.listenerCount("redirect")===0){let f=u?r._originalIpc?s.socketPath===r._originalHostOrSocketPath:!1:r._originalIpc?!1:n.host===r._originalHostOrSocketPath;(!f||r._originalSecure&&!o)&&(delete s.headers.authorization,delete s.headers.cookie,f||delete s.headers.host,s.auth=void 0)}s.auth&&!i.headers.authorization&&(i.headers.authorization="Basic "+Buffer.from(s.auth).toString("base64")),m=r._req=c(s),r._redirects&&r.emit("redirect",r.url,m)}else m=r._req=c(s);s.timeout&&m.on("timeout",()=>{X(r,m,"Opening handshake has timed out")}),m.on("error",f=>{m===null||m[eo]||(m=r._req=null,li(r,f))}),m.on("response",f=>{let w=f.headers.location,_=f.statusCode;if(w&&s.followRedirects&&_>=300&&_<400){if(++r._redirects>s.maxRedirects){X(r,m,"Maximum redirects exceeded");return}m.abort();let C;try{C=new xs(w,e)}catch{let E=new SyntaxError(`Invalid URL: ${w}`);li(r,E);return}to(r,C,t,i)}else r.emit("unexpected-response",m,f)||X(r,m,`Unexpected server response: ${f.statusCode}`)}),m.on("upgrade",(f,w,_)=>{if(r.emit("upgrade",f),r.readyState!==N.CONNECTING)return;m=r._req=null;let C=f.headers.upgrade;if(C===void 0||C.toLowerCase()!=="websocket"){X(r,w,"Invalid Upgrade header");return}let y=il("sha1").update(l+ol).digest("base64");if(f.headers["sec-websocket-accept"]!==y){X(r,w,"Invalid Sec-WebSocket-Accept header");return}let E=f.headers["sec-websocket-protocol"],L;if(E!==void 0?d.size?d.has(E)||(L="Server sent an invalid subprotocol"):L="Server sent a subprotocol but none was requested":d.size&&(L="Server sent no subprotocol"),L){X(r,w,L);return}E&&(r._protocol=E);let U=f.headers["sec-websocket-extensions"];if(U!==void 0){if(!p){X(r,w,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let K;try{K=fl(U)}catch{X(r,w,"Invalid Sec-WebSocket-Extensions header");return}let me=Object.keys(K);if(me.length!==1||me[0]!==De.extensionName){X(r,w,"Server indicated an extension that was not requested");return}try{p.accept(K[De.extensionName])}catch{X(r,w,"Invalid Sec-WebSocket-Extensions header");return}r._extensions[De.extensionName]=p}r.setSocket(w,_,{allowSynchronousEvents:s.allowSynchronousEvents,generateMask:s.generateMask,maxPayload:s.maxPayload,skipUTF8Validation:s.skipUTF8Validation})}),s.finishRequest?s.finishRequest(m,r):m.end()}function li(r,e){r._readyState=N.CLOSING,r._errorEmitted=!0,r.emit("error",e),r.emitClose()}function gl(r){return r.path=r.socketPath,Jn.connect(r)}function _l(r){return r.path=void 0,!r.servername&&r.servername!==""&&(r.servername=Jn.isIP(r.host)?"":r.host),el.connect(r)}function X(r,e,t){r._readyState=N.CLOSING;let i=new Error(t);Error.captureStackTrace(i,X),e.setHeader?(e[eo]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(li,r,i)):(e.destroy(i),e.once("error",r.emit.bind(r,"error")),e.once("close",r.emitClose.bind(r)))}function vs(r,e,t){if(e){let i=nl(e)?e.size:dl(e).length;r._socket?r._sender._bufferedBytes+=i:r._bufferedAmount+=i}if(t){let i=new Error(`WebSocket is not open: readyState ${r.readyState} (${Ce[r.readyState]})`);process.nextTick(t,i)}}function bl(r,e){let t=this[B];t._closeFrameReceived=!0,t._closeMessage=e,t._closeCode=r,t._socket[B]!==void 0&&(t._socket.removeListener("data",ci),process.nextTick(io,t._socket),r===1005?t.close():t.close(r,e))}function wl(){let r=this[B];r.isPaused||r._socket.resume()}function El(r){let e=this[B];e._socket[B]!==void 0&&(e._socket.removeListener("data",ci),process.nextTick(io,e._socket),e.close(r[ul])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",r))}function Xn(){this[B].emitClose()}function yl(r,e){this[B].emit("message",r,e)}function Sl(r){let e=this[B];e._autoPong&&e.pong(r,!this._isServer,Qn),e.emit("ping",r)}function xl(r){this[B].emit("pong",r)}function io(r){r.resume()}function Cl(r){let e=this[B];e.readyState!==N.CLOSED&&(e.readyState===N.OPEN&&(e._readyState=N.CLOSING,so(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",r)))}function so(r){r._closeTimer=setTimeout(r._socket.destroy.bind(r._socket),pl)}function ro(){let r=this[B];this.removeListener("close",ro),this.removeListener("data",ci),this.removeListener("end",no),r._readyState=N.CLOSING;let e;!this._readableState.endEmitted&&!r._closeFrameReceived&&!r._receiver._writableState.errorEmitted&&(e=r._socket.read())!==null&&r._receiver.write(e),r._receiver.end(),this[B]=void 0,clearTimeout(r._closeTimer),r._receiver._writableState.finished||r._receiver._writableState.errorEmitted?r.emitClose():(r._receiver.on("error",Xn),r._receiver.on("finish",Xn))}function ci(r){this[B]._receiver.write(r)||this.pause()}function no(){let r=this[B];r._readyState=N.CLOSING,r._receiver.end(),this.end()}function oo(){let r=this[B];this.removeListener("error",oo),this.on("error",Qn),r&&(r._readyState=N.CLOSING,this.destroy())}});var co=v((Wd,lo)=>{"use strict";var Bd=fi(),{Duplex:Ol}=require("stream");function uo(r){r.emit("close")}function vl(){!this.destroyed&&this._writableState.finished&&this.destroy()}function ho(r){this.removeListener("error",ho),this.destroy(),this.listenerCount("error")===0&&this.emit("error",r)}function Tl(r,e){let t=!0,i=new Ol({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return r.on("message",function(n,o){let u=!o&&i._readableState.objectMode?n.toString():n;i.push(u)||r.pause()}),r.once("error",function(n){i.destroyed||(t=!1,i.destroy(n))}),r.once("close",function(){i.destroyed||i.push(null)}),i._destroy=function(s,n){if(r.readyState===r.CLOSED){n(s),process.nextTick(uo,i);return}let o=!1;r.once("error",function(a){o=!0,n(a)}),r.once("close",function(){o||n(s),process.nextTick(uo,i)}),t&&r.terminate()},i._final=function(s){if(r.readyState===r.CONNECTING){r.once("open",function(){i._final(s)});return}r._socket!==null&&(r._socket._writableState.finished?(s(),i._readableState.endEmitted&&i.destroy()):(r._socket.once("finish",function(){s()}),r.close()))},i._read=function(){r.isPaused&&r.resume()},i._write=function(s,n,o){if(r.readyState===r.CONNECTING){r.once("open",function(){i._write(s,n,o)});return}r.send(s,o)},i.on("end",vl),i.on("error",ho),i}lo.exports=Tl});var po=v(($d,fo)=>{"use strict";var{tokenChars:Ll}=et();function Al(r){let e=new Set,t=-1,i=-1,s=0;for(s;s<r.length;s++){let o=r.charCodeAt(s);if(i===-1&&Ll[o]===1)t===-1&&(t=s);else if(s!==0&&(o===32||o===9))i===-1&&t!==-1&&(i=s);else if(o===44){if(t===-1)throw new SyntaxError(`Unexpected character at index ${s}`);i===-1&&(i=s);let u=r.slice(t,i);if(e.has(u))throw new SyntaxError(`The "${u}" subprotocol is duplicated`);e.add(u),t=i=-1}else throw new SyntaxError(`Unexpected character at index ${s}`)}if(t===-1||i!==-1)throw new SyntaxError("Unexpected end of input");let n=r.slice(t,s);if(e.has(n))throw new SyntaxError(`The "${n}" subprotocol is duplicated`);return e.add(n),e}fo.exports={parse:Al}});var yo=v((Gd,Eo)=>{"use strict";var Il=require("events"),di=require("http"),{Duplex:zd}=require("stream"),{createHash:Dl}=require("crypto"),mo=Ss(),qe=Ot(),Nl=po(),Rl=fi(),{GUID:kl,kWebSocket:Fl}=ye(),Pl=/^[+/0-9A-Za-z]{22}==$/,go=0,_o=1,wo=2,Ts=class extends Il{constructor(e,t){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:Rl,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=di.createServer((i,s)=>{let n=di.STATUS_CODES[426];s.writeHead(426,{"Content-Length":n.length,"Content-Type":"text/plain"}),s.end(n)}),this._server.listen(e.port,e.host,e.backlog,t)):e.server&&(this._server=e.server),this._server){let i=this.emit.bind(this,"connection");this._removeListeners=Ml(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(s,n,o)=>{this.handleUpgrade(s,n,o,i)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=go}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===wo){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(At,this);return}if(e&&this.once("close",e),this._state!==_o)if(this._state=_o,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(At,this):process.nextTick(At,this);else{let t=this._server;this._removeListeners(),this._removeListeners=this._server=null,t.close(()=>{At(this)})}}shouldHandle(e){if(this.options.path){let t=e.url.indexOf("?");if((t!==-1?e.url.slice(0,t):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,t,i,s){t.on("error",bo);let n=e.headers["sec-websocket-key"],o=e.headers.upgrade,u=+e.headers["sec-websocket-version"];if(e.method!=="GET"){Ze(this,e,t,405,"Invalid HTTP method");return}if(o===void 0||o.toLowerCase()!=="websocket"){Ze(this,e,t,400,"Invalid Upgrade header");return}if(n===void 0||!Pl.test(n)){Ze(this,e,t,400,"Missing or invalid Sec-WebSocket-Key header");return}if(u!==13&&u!==8){Ze(this,e,t,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(e)){It(t,400);return}let a=e.headers["sec-websocket-protocol"],h=new Set;if(a!==void 0)try{h=Nl.parse(a)}catch{Ze(this,e,t,400,"Invalid Sec-WebSocket-Protocol header");return}let l=e.headers["sec-websocket-extensions"],c={};if(this.options.perMessageDeflate&&l!==void 0){let d=new qe(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let p=mo.parse(l);p[qe.extensionName]&&(d.accept(p[qe.extensionName]),c[qe.extensionName]=d)}catch{Ze(this,e,t,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let d={origin:e.headers[`${u===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(d,(p,m,f,w)=>{if(!p)return It(t,m||401,f,w);this.completeUpgrade(c,n,h,e,t,i,s)});return}if(!this.options.verifyClient(d))return It(t,401)}this.completeUpgrade(c,n,h,e,t,i,s)}completeUpgrade(e,t,i,s,n,o,u){if(!n.readable||!n.writable)return n.destroy();if(n[Fl])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>go)return It(n,503);let h=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${Dl("sha1").update(t+kl).digest("base64")}`],l=new this.options.WebSocket(null,void 0,this.options);if(i.size){let c=this.options.handleProtocols?this.options.handleProtocols(i,s):i.values().next().value;c&&(h.push(`Sec-WebSocket-Protocol: ${c}`),l._protocol=c)}if(e[qe.extensionName]){let c=e[qe.extensionName].params,d=mo.format({[qe.extensionName]:[c]});h.push(`Sec-WebSocket-Extensions: ${d}`),l._extensions=e}this.emit("headers",h,s),n.write(h.concat(`\r
8
8
  `).join(`\r
9
9
  `)),n.removeListener("error",bo),l.setSocket(n,o,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(l),l.on("close",()=>{this.clients.delete(l),this._shouldEmitClose&&!this.clients.size&&process.nextTick(At,this)})),u(l,s)}};Eo.exports=Ts;function Ml(r,e){for(let t of Object.keys(e))r.on(t,e[t]);return function(){for(let i of Object.keys(e))r.removeListener(i,e[i])}}function At(r){r._state=wo,r.emit("close")}function bo(){this.destroy()}function It(r,e,t,i){t=t||di.STATUS_CODES[e],i={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(t),...i},r.once("finish",r.destroy),r.end(`HTTP/1.1 ${e} ${di.STATUS_CODES[e]}\r
10
10
  `+Object.keys(i).map(s=>`${s}: ${i[s]}`).join(`\r
11
11
  `)+`\r
12
12
  \r
13
- `+t)}function Ze(r,e,t,i,s){if(r.listenerCount("wsClientError")){let n=new Error(s);Error.captureStackTrace(n,Ze),r.emit("wsClientError",n,t,e)}else It(t,i,s)}});var Oo=v((Hd,Co)=>{"use strict";function $l(r){return r>=55296&&r<=56319}function zl(r){return r>=56320&&r<=57343}Co.exports=function(e,t,i){if(typeof t!="string")throw new Error("Input must be string");for(var s=t.length,n=0,o,u,a=0;a<s;a+=1){if(o=t.charCodeAt(a),u=t[a],$l(o)&&zl(t.charCodeAt(a+1))&&(a+=1,u+=t[a]),n+=e(u),n===i)return t.slice(0,a+1);if(n>i)return t.slice(0,a-u.length+1)}return t}});var To=v((Vd,vo)=>{"use strict";var Gl=Oo(),jl=Buffer.byteLength.bind(Buffer);vo.exports=Gl.bind(null,jl)});var Io=v((qd,Ao)=>{"use strict";var Hl=To(),Vl=/[\/\?<>\\:\*\|"]/g,ql=/[\x00-\x1f\x80-\x9f]/g,Zl=/^\.+$/,Yl=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,Kl=/[\. ]+$/;function Lo(r,e){if(typeof r!="string")throw new Error("Input must be string");var t=r.replace(Vl,e).replace(ql,e).replace(Zl,e).replace(Yl,e).replace(Kl,e);return Hl(t,255)}Ao.exports=function(r,e){var t=e&&e.replacement||"",i=Lo(r,t);return t===""?i:Lo(i,"")}});var Dt=v(Is=>{var pi=class extends Error{constructor(e,t,i){super(i),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},As=class extends pi{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Is.CommanderError=pi;Is.InvalidArgumentError=As});var mi=v(Ns=>{var{InvalidArgumentError:Xl}=Dt(),Ds=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,i)=>{if(!this.argChoices.includes(t))throw new Xl(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,i):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Jl(r){let e=r.name()+(r.variadic===!0?"...":"");return r.required?"<"+e+">":"["+e+"]"}Ns.Argument=Ds;Ns.humanReadableArgName=Jl});var Fs=v(ks=>{var{humanReadableArgName:Ql}=mi(),Rs=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let t=e.commands.filter(s=>!s._hidden),i=e._getHelpCommand();return i&&!i._hidden&&t.push(i),this.sortSubcommands&&t.sort((s,n)=>s.name().localeCompare(n.name())),t}compareOptions(e,t){let i=s=>s.short?s.short.replace(/^-/,""):s.long.replace(/^--/,"");return i(e).localeCompare(i(t))}visibleOptions(e){let t=e.options.filter(s=>!s.hidden),i=e._getHelpOption();if(i&&!i.hidden){let s=i.short&&e._findOption(i.short),n=i.long&&e._findOption(i.long);!s&&!n?t.push(i):i.long&&!n?t.push(e.createOption(i.long,i.description)):i.short&&!s&&t.push(e.createOption(i.short,i.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let i=e.parent;i;i=i.parent){let s=i.options.filter(n=>!n.hidden);t.push(...s)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(i=>Ql(i)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((i,s)=>Math.max(i,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(s)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((i,s)=>Math.max(i,this.displayWidth(t.styleOptionTerm(t.optionTerm(s)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((i,s)=>Math.max(i,this.displayWidth(t.styleOptionTerm(t.optionTerm(s)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((i,s)=>Math.max(i,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(s)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let i="";for(let s=e.parent;s;s=s.parent)i=s.name()+" "+i;return i+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0){let i=`(${t.join(", ")})`;return e.description?`${e.description} ${i}`:i}return e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let i=`(${t.join(", ")})`;return e.description?`${e.description} ${i}`:i}return e.description}formatItemList(e,t,i){return t.length===0?[]:[i.styleTitle(e),...t,""]}groupItems(e,t,i){let s=new Map;return e.forEach(n=>{let o=i(n);s.has(o)||s.set(o,[])}),t.forEach(n=>{let o=i(n);s.has(o)||s.set(o,[]),s.get(o).push(n)}),s}formatHelp(e,t){let i=t.padWidth(e,t),s=t.helpWidth??80;function n(c,d){return t.formatItem(c,i,d,t)}let o=[`${t.styleTitle("Usage:")} ${t.styleUsage(t.commandUsage(e))}`,""],u=t.commandDescription(e);u.length>0&&(o=o.concat([t.boxWrap(t.styleCommandDescription(u),s),""]));let a=t.visibleArguments(e).map(c=>n(t.styleArgumentTerm(t.argumentTerm(c)),t.styleArgumentDescription(t.argumentDescription(c))));if(o=o.concat(this.formatItemList("Arguments:",a,t)),this.groupItems(e.options,t.visibleOptions(e),c=>c.helpGroupHeading??"Options:").forEach((c,d)=>{let p=c.map(m=>n(t.styleOptionTerm(t.optionTerm(m)),t.styleOptionDescription(t.optionDescription(m))));o=o.concat(this.formatItemList(d,p,t))}),t.showGlobalOptions){let c=t.visibleGlobalOptions(e).map(d=>n(t.styleOptionTerm(t.optionTerm(d)),t.styleOptionDescription(t.optionDescription(d))));o=o.concat(this.formatItemList("Global Options:",c,t))}return this.groupItems(e.commands,t.visibleCommands(e),c=>c.helpGroup()||"Commands:").forEach((c,d)=>{let p=c.map(m=>n(t.styleSubcommandTerm(t.subcommandTerm(m)),t.styleSubcommandDescription(t.subcommandDescription(m))));o=o.concat(this.formatItemList(d,p,t))}),o.join(`
13
+ `+t)}function Ze(r,e,t,i,s,n){if(r.listenerCount("wsClientError")){let o=new Error(s);Error.captureStackTrace(o,Ze),r.emit("wsClientError",o,t,e)}else It(t,i,s,n)}});var Oo=v((Hd,Co)=>{"use strict";function $l(r){return r>=55296&&r<=56319}function zl(r){return r>=56320&&r<=57343}Co.exports=function(e,t,i){if(typeof t!="string")throw new Error("Input must be string");for(var s=t.length,n=0,o,u,a=0;a<s;a+=1){if(o=t.charCodeAt(a),u=t[a],$l(o)&&zl(t.charCodeAt(a+1))&&(a+=1,u+=t[a]),n+=e(u),n===i)return t.slice(0,a+1);if(n>i)return t.slice(0,a-u.length+1)}return t}});var To=v((Vd,vo)=>{"use strict";var Gl=Oo(),jl=Buffer.byteLength.bind(Buffer);vo.exports=Gl.bind(null,jl)});var Io=v((qd,Ao)=>{"use strict";var Hl=To(),Vl=/[\/\?<>\\:\*\|"]/g,ql=/[\x00-\x1f\x80-\x9f]/g,Zl=/^\.+$/,Yl=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,Kl=/[\. ]+$/;function Lo(r,e){if(typeof r!="string")throw new Error("Input must be string");var t=r.replace(Vl,e).replace(ql,e).replace(Zl,e).replace(Yl,e).replace(Kl,e);return Hl(t,255)}Ao.exports=function(r,e){var t=e&&e.replacement||"",i=Lo(r,t);return t===""?i:Lo(i,"")}});var Dt=v(Is=>{var pi=class extends Error{constructor(e,t,i){super(i),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},As=class extends pi{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Is.CommanderError=pi;Is.InvalidArgumentError=As});var mi=v(Ns=>{var{InvalidArgumentError:Xl}=Dt(),Ds=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.length>3&&this._name.slice(-3)==="..."&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,i)=>{if(!this.argChoices.includes(t))throw new Xl(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,i):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Jl(r){let e=r.name()+(r.variadic===!0?"...":"");return r.required?"<"+e+">":"["+e+"]"}Ns.Argument=Ds;Ns.humanReadableArgName=Jl});var Fs=v(ks=>{var{humanReadableArgName:Ql}=mi(),Rs=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let t=e.commands.filter(s=>!s._hidden),i=e._getHelpCommand();return i&&!i._hidden&&t.push(i),this.sortSubcommands&&t.sort((s,n)=>s.name().localeCompare(n.name())),t}compareOptions(e,t){let i=s=>s.short?s.short.replace(/^-/,""):s.long.replace(/^--/,"");return i(e).localeCompare(i(t))}visibleOptions(e){let t=e.options.filter(s=>!s.hidden),i=e._getHelpOption();if(i&&!i.hidden){let s=i.short&&e._findOption(i.short),n=i.long&&e._findOption(i.long);!s&&!n?t.push(i):i.long&&!n?t.push(e.createOption(i.long,i.description)):i.short&&!s&&t.push(e.createOption(i.short,i.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let i=e.parent;i;i=i.parent){let s=i.options.filter(n=>!n.hidden);t.push(...s)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(i=>Ql(i)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((i,s)=>Math.max(i,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(s)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((i,s)=>Math.max(i,this.displayWidth(t.styleOptionTerm(t.optionTerm(s)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((i,s)=>Math.max(i,this.displayWidth(t.styleOptionTerm(t.optionTerm(s)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((i,s)=>Math.max(i,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(s)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let i="";for(let s=e.parent;s;s=s.parent)i=s.name()+" "+i;return i+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0){let i=`(${t.join(", ")})`;return e.description?`${e.description} ${i}`:i}return e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(i=>JSON.stringify(i)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let i=`(${t.join(", ")})`;return e.description?`${e.description} ${i}`:i}return e.description}formatItemList(e,t,i){return t.length===0?[]:[i.styleTitle(e),...t,""]}groupItems(e,t,i){let s=new Map;return e.forEach(n=>{let o=i(n);s.has(o)||s.set(o,[])}),t.forEach(n=>{let o=i(n);s.has(o)||s.set(o,[]),s.get(o).push(n)}),s}formatHelp(e,t){let i=t.padWidth(e,t),s=t.helpWidth??80;function n(c,d){return t.formatItem(c,i,d,t)}let o=[`${t.styleTitle("Usage:")} ${t.styleUsage(t.commandUsage(e))}`,""],u=t.commandDescription(e);u.length>0&&(o=o.concat([t.boxWrap(t.styleCommandDescription(u),s),""]));let a=t.visibleArguments(e).map(c=>n(t.styleArgumentTerm(t.argumentTerm(c)),t.styleArgumentDescription(t.argumentDescription(c))));if(o=o.concat(this.formatItemList("Arguments:",a,t)),this.groupItems(e.options,t.visibleOptions(e),c=>c.helpGroupHeading??"Options:").forEach((c,d)=>{let p=c.map(m=>n(t.styleOptionTerm(t.optionTerm(m)),t.styleOptionDescription(t.optionDescription(m))));o=o.concat(this.formatItemList(d,p,t))}),t.showGlobalOptions){let c=t.visibleGlobalOptions(e).map(d=>n(t.styleOptionTerm(t.optionTerm(d)),t.styleOptionDescription(t.optionDescription(d))));o=o.concat(this.formatItemList("Global Options:",c,t))}return this.groupItems(e.commands,t.visibleCommands(e),c=>c.helpGroup()||"Commands:").forEach((c,d)=>{let p=c.map(m=>n(t.styleSubcommandTerm(t.subcommandTerm(m)),t.styleSubcommandDescription(t.subcommandDescription(m))));o=o.concat(this.formatItemList(d,p,t))}),o.join(`
14
14
  `)}displayWidth(e){return Do(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t==="[command]"?this.styleSubcommandText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleCommandText(t)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleSubcommandText(t)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,i,s){let o=" ".repeat(2);if(!i)return o+e;let u=e.padEnd(t+e.length-s.displayWidth(e)),a=2,l=(this.helpWidth??80)-t-a-2,c;return l<this.minWidthToWrap||s.preformatted(i)?c=i:c=s.boxWrap(i,l).replace(/\n/g,`
15
15
  `+" ".repeat(t+a)),o+u+" ".repeat(a)+c.replace(/\n/g,`
16
16
  ${o}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let i=e.split(/\r\n|\n/),s=/[\s]*[^\s]+/g,n=[];return i.forEach(o=>{let u=o.match(s);if(u===null){n.push("");return}let a=[u.shift()],h=this.displayWidth(a[0]);u.forEach(l=>{let c=this.displayWidth(l);if(h+c<=t){a.push(l),h+=c;return}n.push(a.join(""));let d=l.trimStart();a=[d],h=this.displayWidth(d)}),n.push(a.join(""))}),n.join(`
@@ -35,6 +35,6 @@ Expecting one of '${i.join("', '")}'`);return this._lifeCycleHooks[e]?this._life
35
35
  `),this.outputHelp({error:!0}));let i=t||{},s=i.exitCode||1,n=i.code||"commander.error";this._exit(s,n,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in I.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,I.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new hc(this.options),t=i=>this.getOptionValue(i)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(i));this.options.filter(i=>i.implied!==void 0&&t(i.attributeName())&&e.valueFromOption(this.getOptionValue(i.attributeName()),i)).forEach(i=>{Object.keys(i.implied).filter(s=>!t(s)).forEach(s=>{this.setOptionValueWithSource(s,i.implied[s],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let i=o=>{let u=o.attributeName(),a=this.getOptionValue(u),h=this.options.find(c=>c.negate&&u===c.attributeName()),l=this.options.find(c=>!c.negate&&u===c.attributeName());return h&&(h.presetArg===void 0&&a===!1||h.presetArg!==void 0&&a===h.presetArg)?h:l||o},s=o=>{let u=i(o),a=u.attributeName();return this.getOptionValueSource(a)==="env"?`environment variable '${u.envVar}'`:`option '${u.flags}'`},n=`error: ${s(e)} cannot be used with ${s(t)}`;this.error(n,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let s=[],n=this;do{let o=n.createHelp().visibleOptions(n).filter(u=>u.long).map(u=>u.long);s=s.concat(o),n=n.parent}while(n&&!n._enablePositionalOptions);t=Po(e,s)}let i=`error: unknown option '${e}'${t}`;this.error(i,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,i=t===1?"":"s",n=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${i} but got ${e.length}.`;this.error(n,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let s=[];this.createHelp().visibleCommands(this).forEach(n=>{s.push(n.name()),n.alias()&&s.push(n.alias())}),t=Po(e,s)}let i=`error: unknown command '${e}'${t}`;this.error(i,{code:"commander.unknownCommand"})}version(e,t,i){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",i=i||"output the version number";let s=this.createOption(t,i);return this._versionOptionName=s.attributeName(),this._registerOption(s),this.on("option:"+s.name(),()=>{this._outputConfiguration.writeOut(`${e}
36
36
  `),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){var s;if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");let i=(s=this.parent)==null?void 0:s._findCommand(e);if(i){let n=[i.name()].concat(i.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${n}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this.registeredArguments.map(i=>oc(i));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}helpGroup(e){return e===void 0?this._helpGroupHeading??"":(this._helpGroupHeading=e,this)}commandsGroup(e){return e===void 0?this._defaultCommandGroup??"":(this._defaultCommandGroup=e,this)}optionsGroup(e){return e===void 0?this._defaultOptionGroup??"":(this._defaultOptionGroup=e,this)}_initOptionGroup(e){this._defaultOptionGroup&&!e.helpGroupHeading&&e.helpGroup(this._defaultOptionGroup)}_initCommandGroup(e){this._defaultCommandGroup&&!e.helpGroup()&&e.helpGroup(this._defaultCommandGroup)}nameFromFilename(e){return this._name=Oe.basename(e,Oe.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp(),i=this._getOutputContext(e);t.prepareContext({error:i.error,helpWidth:i.helpWidth,outputHasColors:i.hasColors});let s=t.formatHelp(this,t);return i.hasColors?s:this._outputConfiguration.stripColor(s)}_getOutputContext(e){e=e||{};let t=!!e.error,i,s,n;return t?(i=u=>this._outputConfiguration.writeErr(u),s=this._outputConfiguration.getErrHasColors(),n=this._outputConfiguration.getErrHelpWidth()):(i=u=>this._outputConfiguration.writeOut(u),s=this._outputConfiguration.getOutHasColors(),n=this._outputConfiguration.getOutHelpWidth()),{error:t,write:u=>(s||(u=this._outputConfiguration.stripColor(u)),i(u)),hasColors:s,helpWidth:n}}outputHelp(e){var o;let t;typeof e=="function"&&(t=e,e=void 0);let i=this._getOutputContext(e),s={error:i.error,write:i.write,command:this};this._getCommandAndAncestors().reverse().forEach(u=>u.emit("beforeAllHelp",s)),this.emit("beforeHelp",s);let n=this.helpInformation({error:i.error});if(t&&(n=t(n),typeof n!="string"&&!Buffer.isBuffer(n)))throw new Error("outputHelp callback must return a string or a Buffer");i.write(n),(o=this._getHelpOption())!=null&&o.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",s),this._getCommandAndAncestors().forEach(u=>u.emit("afterAllHelp",s))}helpOption(e,t){return typeof e=="boolean"?(e?(this._helpOption===null&&(this._helpOption=void 0),this._defaultOptionGroup&&this._initOptionGroup(this._getHelpOption())):this._helpOption=null,this):(this._helpOption=this.createOption(e??"-h, --help",t??"display help for command"),(e||t)&&this._initOptionGroup(this._helpOption),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this._initOptionGroup(e),this}help(e){this.outputHelp(e);let t=Number(I.exitCode??0);t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let i=["beforeAll","before","after","afterAll"];if(!i.includes(e))throw new Error(`Unexpected value for position to addHelpText.
37
37
  Expecting one of '${i.join("', '")}'`);let s=`${e}Help`;return this.on(s,n=>{let o;typeof t=="function"?o=t({error:n.error,command:n.command}):o=t,o&&n.write(`${o}
38
- `)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(s=>t.is(s))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Mo(r){return r.map(e=>{if(!e.startsWith("--inspect"))return e;let t,i="127.0.0.1",s="9229",n;return(n=e.match(/^(--inspect(-brk)?)$/))!==null?t=n[1]:(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=n[1],/^\d+$/.test(n[3])?s=n[3]:i=n[3]):(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=n[1],i=n[3],s=n[4]),t&&s!=="0"?`${t}=${i}:${parseInt(s)+1}`:e})}function Gs(){if(I.env.NO_COLOR||I.env.FORCE_COLOR==="0"||I.env.FORCE_COLOR==="false")return!1;if(I.env.FORCE_COLOR||I.env.CLICOLOR_FORCE!==void 0)return!0}js.Command=zs;js.useColor=Gs});var zo=v(te=>{var{Argument:Bo}=mi(),{Command:Hs}=Uo(),{CommanderError:lc,InvalidArgumentError:Wo}=Dt(),{Help:cc}=Fs(),{Option:$o}=Bs();te.program=new Hs;te.createCommand=r=>new Hs(r);te.createOption=(r,e)=>new $o(r,e);te.createArgument=(r,e)=>new Bo(r,e);te.Command=Hs;te.Option=$o;te.Argument=Bo;te.Help=cc;te.CommanderError=lc;te.InvalidArgumentError=Wo;te.InvalidOptionArgumentError=Wo});var qs=v((fp,Vo)=>{"use strict";var Ho=require("fs"),Vs;function fc(){try{return Ho.statSync("/.dockerenv"),!0}catch{return!1}}function dc(){try{return Ho.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}Vo.exports=()=>(Vs===void 0&&(Vs=fc()||dc()),Vs)});var Yo=v((dp,Zs)=>{"use strict";var pc=require("os"),mc=require("fs"),qo=qs(),Zo=()=>{if(process.platform!=="linux")return!1;if(pc.release().toLowerCase().includes("microsoft"))return!qo();try{return mc.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!qo():!1}catch{return!1}};process.env.__IS_WSL_TEST__?Zs.exports=Zo:Zs.exports=Zo()});var Xo=v((pp,Ko)=>{"use strict";Ko.exports=(r,e,t)=>{let i=s=>Object.defineProperty(r,e,{value:s,enumerable:!0,writable:!0});return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get(){let s=t();return i(s),s},set(s){i(s)}}),r}});var ra=v((mp,sa)=>{var gc=require("path"),_c=require("child_process"),{promises:bi,constants:ia}=require("fs"),_i=Yo(),bc=qs(),Ks=Xo(),Jo=gc.join(__dirname,"xdg-open"),{platform:nt,arch:Qo}=process,wc=()=>{try{return bi.statSync("/run/.containerenv"),!0}catch{return!1}},Ys;function Ec(){return Ys===void 0&&(Ys=wc()||bc()),Ys}var yc=(()=>{let r="/mnt/",e;return async function(){if(e)return e;let t="/etc/wsl.conf",i=!1;try{await bi.access(t,ia.F_OK),i=!0}catch{}if(!i)return r;let s=await bi.readFile(t,{encoding:"utf8"}),n=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(s);return n?(e=n.groups.mountPoint.trim(),e=e.endsWith("/")?e:`${e}/`,e):r}})(),ea=async(r,e)=>{let t;for(let i of r)try{return await e(i)}catch(s){t=s}throw t},wi=async r=>{if(r={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...r},Array.isArray(r.app))return ea(r.app,u=>wi({...r,app:u}));let{name:e,arguments:t=[]}=r.app||{};if(t=[...t],Array.isArray(e))return ea(e,u=>wi({...r,app:{name:u,arguments:t}}));let i,s=[],n={};if(nt==="darwin")i="open",r.wait&&s.push("--wait-apps"),r.background&&s.push("--background"),r.newInstance&&s.push("--new"),e&&s.push("-a",e);else if(nt==="win32"||_i&&!Ec()&&!e){let u=await yc();i=_i?`${u}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,s.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),_i||(n.windowsVerbatimArguments=!0);let a=["Start"];r.wait&&a.push("-Wait"),e?(a.push(`"\`"${e}\`""`,"-ArgumentList"),r.target&&t.unshift(r.target)):r.target&&a.push(`"${r.target}"`),t.length>0&&(t=t.map(h=>`"\`"${h}\`""`),a.push(t.join(","))),r.target=Buffer.from(a.join(" "),"utf16le").toString("base64")}else{if(e)i=e;else{let u=!__dirname||__dirname==="/",a=!1;try{await bi.access(Jo,ia.X_OK),a=!0}catch{}i=process.versions.electron||nt==="android"||u||!a?"xdg-open":Jo}t.length>0&&s.push(...t),r.wait||(n.stdio="ignore",n.detached=!0)}r.target&&s.push(r.target),nt==="darwin"&&t.length>0&&s.push("--args",...t);let o=_c.spawn(i,s,n);return r.wait?new Promise((u,a)=>{o.once("error",a),o.once("close",h=>{if(!r.allowNonzeroExitCode&&h>0){a(new Error(`Exited with code ${h}`));return}u(o)})}):(o.unref(),o)},Xs=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a `target`");return wi({...e,target:r})},Sc=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a `name`");let{arguments:t=[]}=e||{};if(t!=null&&!Array.isArray(t))throw new TypeError("Expected `appArguments` as Array type");return wi({...e,app:{name:r,arguments:t}})};function ta(r){if(typeof r=="string"||Array.isArray(r))return r;let{[Qo]:e}=r;if(!e)throw new Error(`${Qo} is not supported`);return e}function Js({[nt]:r},{wsl:e}){if(e&&_i)return ta(e);if(!r)throw new Error(`${nt} is not supported`);return ta(r)}var Ei={};Ks(Ei,"chrome",()=>Js({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));Ks(Ei,"firefox",()=>Js({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));Ks(Ei,"edge",()=>Js({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));Xs.apps=Ei;Xs.openApp=Sc;sa.exports=Xs});var ou=v((Fm,nu)=>{"use strict";function Qf(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ed=new Int32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);function ru(r){if(Buffer.isBuffer(r))return r;if(typeof r=="number")return Buffer.alloc(r);if(typeof r=="string")return Buffer.from(r);throw new Error("input must be buffer, number, or string, received "+typeof r)}function td(r){let e=ru(4);return e.writeInt32BE(r,0),e}function yr(r,e){r=ru(r),Buffer.isBuffer(e)&&(e=e.readUInt32BE(0));let t=~~e^-1;for(var i=0;i<r.length;i++)t=ed[(t^r[i])&255]^t>>>8;return t^-1}function Sr(){return td(yr.apply(null,arguments))}Sr.signed=function(){return yr.apply(null,arguments)};Sr.unsigned=function(){return yr.apply(null,arguments)>>>0};var id=Sr,sd=Qf(id);nu.exports=sd});var Cu=v(Ar=>{var au=require("fs"),Vi=require("stream").Transform,lu=require("stream").PassThrough,cu=require("zlib"),Tr=require("util"),rd=require("events").EventEmitter,nd=require("events").errorMonitor,fu=ou();Ar.ZipFile=Me;Ar.dateToDosDateTime=xu;Tr.inherits(Me,rd);function Me(){this.outputStream=new lu,this.entries=[],this.outputStreamCursor=0,this.ended=!1,this.allDone=!1,this.forceZip64Eocd=!1,this.errored=!1,this.on(nd,function(){this.errored=!0})}Me.prototype.addFile=function(r,e,t){var i=this;if(e=Zi(e,!1),t==null&&(t={}),!qi(i)){var s=new D(e,!1,t);i.entries.push(s),au.stat(r,function(n,o){if(n)return i.emit("error",n);if(!o.isFile())return i.emit("error",new Error("not a file: "+r));s.uncompressedSize=o.size,t.mtime==null&&s.setLastModDate(o.mtime),t.mode==null&&s.setFileAttributesMode(o.mode),s.setFileDataPumpFunction(function(){var u=au.createReadStream(r);s.state=D.FILE_DATA_IN_PROGRESS,u.on("error",function(a){i.emit("error",a)}),du(i,s,u)}),Pe(i)})}};Me.prototype.addReadStream=function(r,e,t){this.addReadStreamLazy(e,t,function(i){i(null,r)})};Me.prototype.addReadStreamLazy=function(r,e,t){var i=this;if(typeof e=="function"&&(t=e,e=null),e==null&&(e={}),r=Zi(r,!1),!qi(i)){var s=new D(r,!1,e);i.entries.push(s),s.setFileDataPumpFunction(function(){s.state=D.FILE_DATA_IN_PROGRESS,t(function(n,o){if(n)return i.emit("error",n);du(i,s,o)})}),Pe(i)}};Me.prototype.addBuffer=function(r,e,t){var i=this;if(e=Zi(e,!1),r.length>1073741823)throw new Error("buffer too large: "+r.length+" > 1073741823");if(t==null&&(t={}),t.size!=null)throw new Error("options.size not allowed");if(qi(i))return;var s=new D(e,!1,t);s.uncompressedSize=r.length,s.crc32=fu.unsigned(r),s.crcAndFileSizeKnown=!0,i.entries.push(s),s.compressionLevel===0?n(r):cu.deflateRaw(r,{level:s.compressionLevel},function(o,u){n(u)});function n(o){s.compressedSize=o.length,s.setFileDataPumpFunction(function(){Xe(i,o),Xe(i,s.getDataDescriptor()),s.state=D.FILE_DATA_DONE,setImmediate(function(){Pe(i)})}),Pe(i)}};Me.prototype.addEmptyDirectory=function(r,e){var t=this;if(r=Zi(r,!0),e==null&&(e={}),e.size!=null)throw new Error("options.size not allowed");if(e.compress!=null)throw new Error("options.compress not allowed");if(e.compressionLevel!=null)throw new Error("options.compressionLevel not allowed");if(!qi(t)){var i=new D(r,!0,e);t.entries.push(i),i.setFileDataPumpFunction(function(){Xe(t,i.getDataDescriptor()),i.state=D.FILE_DATA_DONE,Pe(t)}),Pe(t)}};var od=Fe([80,75,5,6]);Me.prototype.end=function(r,e){if(typeof r=="function"&&(e=r,r=null),r==null&&(r={}),!this.ended&&(this.ended=!0,!this.errored)){if(this.calculatedTotalSizeCallback=e,this.forceZip64Eocd=!!r.forceZip64Format,r.comment){if(typeof r.comment=="string"?this.comment=ld(r.comment):this.comment=r.comment,this.comment.length>65535)throw new Error("comment is too large");if(Zt(this.comment,od))throw new Error("comment contains end of central directory record signature")}else this.comment=Yt;Pe(this)}};function Xe(r,e){r.outputStream.write(e),r.outputStreamCursor+=e.length}function du(r,e,t){var i=new Lr,s=new Hi,n=e.compressionLevel!==0?new cu.DeflateRaw({level:e.compressionLevel}):new lu,o=new Hi;t.pipe(i).pipe(s).pipe(n).pipe(o).pipe(r.outputStream,{end:!1}),o.on("end",function(){if(e.crc32=i.crc32,e.uncompressedSize==null)e.uncompressedSize=s.byteCount;else if(e.uncompressedSize!==s.byteCount)return r.emit("error",new Error("file data stream has unexpected number of bytes"));e.compressedSize=o.byteCount,r.outputStreamCursor+=e.compressedSize,Xe(r,e.getDataDescriptor()),e.state=D.FILE_DATA_DONE,Pe(r)})}function ad(r){if(r.compress!=null&&r.compressionLevel!=null&&!!r.compress!=!!r.compressionLevel)throw new Error("conflicting settings for compress and compressionLevel");return r.compressionLevel!=null?r.compressionLevel:r.compress===!1?0:6}function Pe(r){if(r.allDone||r.errored)return;if(r.ended&&r.calculatedTotalSizeCallback!=null){var e=ud(r);e!=null&&(r.calculatedTotalSizeCallback(e),r.calculatedTotalSizeCallback=null)}var t=i();function i(){for(var n=0;n<r.entries.length;n++){var o=r.entries[n];if(o.state<D.FILE_DATA_DONE)return o}return null}if(t!=null){if(t.state<D.READY_TO_PUMP_FILE_DATA||t.state===D.FILE_DATA_IN_PROGRESS)return;t.relativeOffsetOfLocalHeader=r.outputStreamCursor;var s=t.getLocalFileHeader();Xe(r,s),t.doFileDataPump()}else r.ended&&(r.offsetOfStartOfCentralDirectory=r.outputStreamCursor,r.entries.forEach(function(n){var o=n.getCentralDirectoryRecord();Xe(r,o)}),Xe(r,hd(r)),r.outputStream.end(),r.allDone=!0)}function ud(r){for(var e=0,t=0,i=0;i<r.entries.length;i++){var s=r.entries[i];if(s.compressionLevel!==0)return-1;if(s.state>=D.READY_TO_PUMP_FILE_DATA){if(s.uncompressedSize==null)return-1}else if(s.uncompressedSize==null)return null;s.relativeOffsetOfLocalHeader=e;var n=s.useZip64Format();e+=pu+s.utf8FileName.length,e+=s.uncompressedSize,s.crcAndFileSizeKnown||(n?e+=yu:e+=Eu),t+=Su+s.utf8FileName.length+s.fileComment.length,s.forceDosTimestamp||(t+=Cr),n&&(t+=Or)}var o=0;return(r.forceZip64Eocd||r.entries.length>=65535||t>=65535||e>=4294967295)&&(o+=Gi+xr),o+=ji+r.comment.length,e+t+o}function qi(r){if(r.ended)throw new Error("cannot add entries after calling end()");return!!r.errored}var Gi=56,xr=20,ji=22;function hd(r,e){var t=!1,i=r.entries.length;(r.forceZip64Eocd||r.entries.length>=65535)&&(i=65535,t=!0);var s=r.outputStreamCursor-r.offsetOfStartOfCentralDirectory,n=s;(r.forceZip64Eocd||s>=4294967295)&&(n=4294967295,t=!0);var o=r.offsetOfStartOfCentralDirectory;if((r.forceZip64Eocd||r.offsetOfStartOfCentralDirectory>=4294967295)&&(o=4294967295,t=!0),e)return t?Gi+xr+ji:ji;var u=Y(ji+r.comment.length);if(u.writeUInt32LE(101010256,0),u.writeUInt16LE(0,4),u.writeUInt16LE(0,6),u.writeUInt16LE(i,8),u.writeUInt16LE(i,10),u.writeUInt32LE(n,12),u.writeUInt32LE(o,16),u.writeUInt16LE(r.comment.length,20),r.comment.copy(u,22),!t)return u;var a=Y(Gi);a.writeUInt32LE(101075792,0),pe(a,Gi-12,4),a.writeUInt16LE(_u,12),a.writeUInt16LE(gu,14),a.writeUInt32LE(0,16),a.writeUInt32LE(0,20),pe(a,r.entries.length,24),pe(a,r.entries.length,32),pe(a,s,40),pe(a,r.offsetOfStartOfCentralDirectory,48);var h=Y(xr);return h.writeUInt32LE(117853008,0),h.writeUInt32LE(0,4),pe(h,r.outputStreamCursor,8),h.writeUInt32LE(1,16),Buffer.concat([a,h,u])}function Zi(r,e){if(r==="")throw new Error("empty metadataPath");if(r=r.replace(/\\/g,"/"),/^[a-zA-Z]:/.test(r)||/^\//.test(r))throw new Error("absolute path: "+r);if(r.split("/").indexOf("..")!==-1)throw new Error("invalid relative path: "+r);var t=/\/$/.test(r);if(e)t||(r+="/");else if(t)throw new Error("file path cannot end with '/': "+r);return r}var Yt=Y(0);function D(r,e,t){if(this.utf8FileName=Fe(r),this.utf8FileName.length>65535)throw new Error("utf8 file name too long. "+utf8FileName.length+" > 65535");if(this.isDirectory=e,this.state=D.WAITING_FOR_METADATA,this.setLastModDate(t.mtime!=null?t.mtime:new Date),this.forceDosTimestamp=!!t.forceDosTimestamp,t.mode!=null?this.setFileAttributesMode(t.mode):this.setFileAttributesMode(e?16893:33204),e?(this.crcAndFileSizeKnown=!0,this.crc32=0,this.uncompressedSize=0,this.compressedSize=0):(this.crcAndFileSizeKnown=!1,this.crc32=null,this.uncompressedSize=null,this.compressedSize=null,t.size!=null&&(this.uncompressedSize=t.size)),e?this.compressionLevel=0:this.compressionLevel=ad(t),this.forceZip64Format=!!t.forceZip64Format,t.fileComment){if(typeof t.fileComment=="string"?this.fileComment=Fe(t.fileComment,"utf-8"):this.fileComment=t.fileComment,this.fileComment.length>65535)throw new Error("fileComment is too large")}else this.fileComment=Yt}D.WAITING_FOR_METADATA=0;D.READY_TO_PUMP_FILE_DATA=1;D.FILE_DATA_IN_PROGRESS=2;D.FILE_DATA_DONE=3;D.prototype.setLastModDate=function(r){this.mtime=r;var e=xu(r);this.lastModFileTime=e.time,this.lastModFileDate=e.date};D.prototype.setFileAttributesMode=function(r){if((r&65535)!==r)throw new Error("invalid mode. expected: 0 <= "+r+" <= 65535");this.externalFileAttributes=r<<16>>>0};D.prototype.setFileDataPumpFunction=function(r){this.doFileDataPump=r,this.state=D.READY_TO_PUMP_FILE_DATA};D.prototype.useZip64Format=function(){return this.forceZip64Format||this.uncompressedSize!=null&&this.uncompressedSize>4294967294||this.compressedSize!=null&&this.compressedSize>4294967294||this.relativeOffsetOfLocalHeader!=null&&this.relativeOffsetOfLocalHeader>4294967294};var pu=30,mu=20,gu=45,_u=831,bu=2048,wu=8;D.prototype.getLocalFileHeader=function(){var r=0,e=0,t=0;this.crcAndFileSizeKnown&&(r=this.crc32,e=this.compressedSize,t=this.uncompressedSize);var i=Y(pu),s=bu;return this.crcAndFileSizeKnown||(s|=wu),i.writeUInt32LE(67324752,0),i.writeUInt16LE(mu,4),i.writeUInt16LE(s,6),i.writeUInt16LE(this.getCompressionMethod(),8),i.writeUInt16LE(this.lastModFileTime,10),i.writeUInt16LE(this.lastModFileDate,12),i.writeUInt32LE(r,14),i.writeUInt32LE(e,18),i.writeUInt32LE(t,22),i.writeUInt16LE(this.utf8FileName.length,26),i.writeUInt16LE(0,28),Buffer.concat([i,this.utf8FileName])};var Eu=16,yu=24;D.prototype.getDataDescriptor=function(){if(this.crcAndFileSizeKnown)return Yt;if(this.useZip64Format()){var r=Y(yu);return r.writeUInt32LE(134695760,0),r.writeUInt32LE(this.crc32,4),pe(r,this.compressedSize,8),pe(r,this.uncompressedSize,16),r}else{var r=Y(Eu);return r.writeUInt32LE(134695760,0),r.writeUInt32LE(this.crc32,4),r.writeUInt32LE(this.compressedSize,8),r.writeUInt32LE(this.uncompressedSize,12),r}};var Su=46,Cr=9,Or=28;D.prototype.getCentralDirectoryRecord=function(){var r=Y(Su),e=bu;this.crcAndFileSizeKnown||(e|=wu);var t=Yt;if(!this.forceDosTimestamp){t=Y(Cr),t.writeUInt16LE(21589,0),t.writeUInt16LE(Cr-4,2);var i=1,s=2;t.writeUInt8(i|s,4);var n=Math.floor(this.mtime.getTime()/1e3);n<-2147483648&&(n=-2147483648),n>2147483647&&(n=2147483647),t.writeUInt32LE(n,5)}var o=this.compressedSize,u=this.uncompressedSize,a=this.relativeOffsetOfLocalHeader,h=mu,l=Yt;return this.useZip64Format()&&(o=4294967295,u=4294967295,a=4294967295,h=gu,l=Y(Or),l.writeUInt16LE(1,0),l.writeUInt16LE(Or-4,2),pe(l,this.uncompressedSize,4),pe(l,this.compressedSize,12),pe(l,this.relativeOffsetOfLocalHeader,20)),r.writeUInt32LE(33639248,0),r.writeUInt16LE(_u,4),r.writeUInt16LE(h,6),r.writeUInt16LE(e,8),r.writeUInt16LE(this.getCompressionMethod(),10),r.writeUInt16LE(this.lastModFileTime,12),r.writeUInt16LE(this.lastModFileDate,14),r.writeUInt32LE(this.crc32,16),r.writeUInt32LE(o,20),r.writeUInt32LE(u,24),r.writeUInt16LE(this.utf8FileName.length,28),r.writeUInt16LE(t.length+l.length,30),r.writeUInt16LE(this.fileComment.length,32),r.writeUInt16LE(0,34),r.writeUInt16LE(0,36),r.writeUInt32LE(this.externalFileAttributes,38),r.writeUInt32LE(a,42),Buffer.concat([r,this.utf8FileName,t,l,this.fileComment])};D.prototype.getCompressionMethod=function(){var r=0,e=8;return this.compressionLevel===0?r:e};var uu=new Date(1980,0,1),hu=new Date(2107,11,31,23,59,58);function xu(r){r<uu?r=uu:r>hu&&(r=hu);var e=0;e|=r.getDate()&31,e|=(r.getMonth()+1&15)<<5,e|=(r.getFullYear()-1980&127)<<9;var t=0;return t|=Math.floor(r.getSeconds()/2),t|=(r.getMinutes()&63)<<5,t|=(r.getHours()&31)<<11,{date:e,time:t}}function pe(r,e,t){var i=Math.floor(e/4294967296),s=e%4294967296;r.writeUInt32LE(s,t),r.writeUInt32LE(i,t+4)}Tr.inherits(Hi,Vi);function Hi(r){Vi.call(this,r),this.byteCount=0}Hi.prototype._transform=function(r,e,t){this.byteCount+=r.length,t(null,r)};Tr.inherits(Lr,Vi);function Lr(r){Vi.call(this,r),this.crc32=0}Lr.prototype._transform=function(r,e,t){this.crc32=fu.unsigned(r,this.crc32),t(null,r)};var vr="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0";if(vr.length!==256)throw new Error("assertion failure");var zi=null;function ld(r){if(/^[\x20-\x7e]*$/.test(r))return Fe(r,"utf-8");if(zi==null){zi={};for(var e=0;e<vr.length;e++)zi[vr[e]]=e}for(var t=Y(r.length),e=0;e<r.length;e++){var i=zi[r[e]];if(i==null)throw new Error("character not encodable in CP437: "+JSON.stringify(r[e]));t[e]=i}return t}function Y(r){Y=e;try{return Y(r)}catch{return Y=t,Y(r)}function e(i){return Buffer.allocUnsafe(i)}function t(i){return new Buffer(i)}}function Fe(r,e){Fe=t;try{return Fe(r,e)}catch{return Fe=i,Fe(r,e)}function t(s,n){return Buffer.from(s,n)}function i(s,n){return new Buffer(s,n)}}function Zt(r,e){Zt=t;try{return Zt(r,e)}catch{return Zt=i,Zt(r,e)}function t(s,n){return s.includes(n)}function i(s,n){for(var o=0;o<=s.length-n.length;o++)for(var u=0;;u++){if(u===n.length)return!0;if(s[o+u]!==n[u])break}return!1}}});var Iu=v((Um,Au)=>{var ne=require("fs"),cd=require("util"),bt=require("path"),Pr=require("events"),Ou=require("zlib"),Lu=require("stream"),w={LOCHDR:30,LOCSIG:67324752,LOCVER:4,LOCFLG:6,LOCHOW:8,LOCTIM:10,LOCCRC:14,LOCSIZ:18,LOCLEN:22,LOCNAM:26,LOCEXT:28,EXTSIG:134695760,EXTHDR:16,EXTCRC:4,EXTSIZ:8,EXTLEN:12,CENHDR:46,CENSIG:33639248,CENVEM:4,CENVER:6,CENFLG:8,CENHOW:10,CENTIM:12,CENCRC:16,CENSIZ:20,CENLEN:24,CENNAM:28,CENEXT:30,CENCOM:32,CENDSK:34,CENATT:36,CENATX:38,CENOFF:42,ENDHDR:22,ENDSIG:101010256,ENDSIGFIRST:80,ENDSUB:8,ENDTOT:10,ENDSIZ:12,ENDOFF:16,ENDCOM:20,MAXFILECOMMENT:65535,ENDL64HDR:20,ENDL64SIG:117853008,ENDL64SIGFIRST:80,ENDL64OFS:8,END64HDR:56,END64SIG:101075792,END64SIGFIRST:80,END64SUB:24,END64TOT:32,END64SIZ:40,END64OFF:48,STORED:0,SHRUNK:1,REDUCED1:2,REDUCED2:3,REDUCED3:4,REDUCED4:5,IMPLODED:6,DEFLATED:8,ENHANCED_DEFLATED:9,PKWARE:10,BZIP2:12,LZMA:14,IBM_TERSE:18,IBM_LZ77:19,FLG_ENC:0,FLG_COMP1:1,FLG_COMP2:2,FLG_DESC:4,FLG_ENH:8,FLG_STR:16,FLG_LNG:1024,FLG_MSK:4096,FLG_ENTRY_ENC:1,EF_ID:0,EF_SIZE:2,ID_ZIP64:1,ID_AVINFO:7,ID_PFS:8,ID_OS2:9,ID_NTFS:10,ID_OPENVMS:12,ID_UNIX:13,ID_FORK:14,ID_PATCH:15,ID_X509_PKCS7:20,ID_X509_CERTID_F:21,ID_X509_CERTID_C:22,ID_STRONGENC:23,ID_RECORD_MGT:24,ID_X509_PKCS7_RL:25,ID_IBM1:101,ID_IBM2:102,ID_POSZIP:18064,EF_ZIP64_OR_32:4294967295,EF_ZIP64_OR_16:65535},$e=function(r){let e,t,i,s,n,o,a=this,h=r.storeEntries!==!1?{}:null,l=r.file,c=r.nameEncoding?new TextDecoder(r.nameEncoding):null;d();function d(){r.fd?(e=r.fd,p()):ne.open(l,"r",(_,E)=>{if(_)return a.emit("error",_);e=E,p()})}function p(){ne.fstat(e,(_,E)=>{if(_)return a.emit("error",_);t=E.size,i=r.chunkSize||Math.round(t/1e3),i=Math.max(Math.min(i,Math.min(128*1024,t)),Math.min(1024,t)),f()})}function m(_,E){if(_||!E)return a.emit("error",_||new Error("Archive read error"));let O=s.lastPos,x=O-s.win.position,A=s.win.buffer,T=s.minPos;for(;--O>=T&&--x>=0;)if(A.length-x>=4&&A[x]===s.firstByte&&A.readUInt32LE(x)===s.sig){s.lastBufferPosition=x,s.lastBytesRead=E,s.complete();return}if(O===T)return a.emit("error",new Error("Bad archive"));if(s.lastPos=O+1,s.chunkSize*=2,O<=T)return a.emit("error",new Error("Bad archive"));let k=Math.min(s.chunkSize,O-T);s.win.expandLeft(k,m)}function f(){let _=Math.min(w.ENDHDR+w.MAXFILECOMMENT,t);s={win:new Yi(e),totalReadLength:_,minPos:t-_,lastPos:t,chunkSize:Math.min(1024,i),firstByte:w.ENDSIGFIRST,sig:w.ENDSIG,complete:b},s.win.read(t-s.chunkSize,s.chunkSize,m)}function b(){let _=s.win.buffer,E=s.lastBufferPosition;try{n=new Ir,n.read(_.slice(E,E+w.ENDHDR)),n.headerOffset=s.win.position+E,n.commentLength?a.comment=_.slice(E+w.ENDHDR,E+w.ENDHDR+n.commentLength).toString():a.comment=null,a.entriesCount=n.volumeEntries,a.centralDirectory=n,n.volumeEntries===w.EF_ZIP64_OR_16&&n.totalEntries===w.EF_ZIP64_OR_16||n.size===w.EF_ZIP64_OR_32||n.offset===w.EF_ZIP64_OR_32?g():(s={},S())}catch(O){a.emit("error",O)}}function g(){let _=w.ENDL64HDR;s.lastBufferPosition>_?(s.lastBufferPosition-=_,y()):(s={win:s.win,totalReadLength:_,minPos:s.win.position-_,lastPos:s.win.position,chunkSize:s.chunkSize,firstByte:w.ENDL64SIGFIRST,sig:w.ENDL64SIG,complete:y},s.win.read(s.lastPos-s.chunkSize,s.chunkSize,m))}function y(){let _=s.win.buffer,E=new Dr;E.read(_.slice(s.lastBufferPosition,s.lastBufferPosition+w.ENDL64HDR));let O=t-E.headerOffset;s={win:s.win,totalReadLength:O,minPos:E.headerOffset,lastPos:s.lastPos,chunkSize:s.chunkSize,firstByte:w.END64SIGFIRST,sig:w.END64SIG,complete:C},s.win.read(t-s.chunkSize,s.chunkSize,m)}function C(){let _=s.win.buffer,E=new Nr;E.read(_.slice(s.lastBufferPosition,s.lastBufferPosition+w.END64HDR)),a.centralDirectory.volumeEntries=E.volumeEntries,a.centralDirectory.totalEntries=E.totalEntries,a.centralDirectory.size=E.size,a.centralDirectory.offset=E.offset,a.entriesCount=E.volumeEntries,s={},S()}function S(){s={win:new Yi(e),pos:n.offset,chunkSize:i,entriesLeft:n.volumeEntries},s.win.read(s.pos,Math.min(i,t-s.pos),L)}function L(_,E){if(_||!E)return a.emit("error",_||new Error("Entries read error"));let O=s.pos-s.win.position,x=s.entry,A=s.win.buffer,T=A.length;try{for(;s.entriesLeft>0;){x||(x=new Rr,x.readHeader(A,O),x.headerOffset=s.win.position+O,s.entry=x,s.pos+=w.CENHDR,O+=w.CENHDR);let k=x.fnameLen+x.extraLen+x.comLen,M=k+(s.entriesLeft>1?w.CENHDR:0);if(T-O<M){s.win.moveRight(i,L,O),s.move=!0;return}x.read(A,O,c),r.skipEntryNameValidation||x.validateName(),h&&(h[x.name]=x),a.emit("entry",x),s.entry=x=null,s.entriesLeft--,s.pos+=k,O+=k}a.emit("ready")}catch(k){a.emit("error",k)}}function U(){if(!h)throw new Error("storeEntries disabled")}Object.defineProperty(this,"ready",{get(){return!1}}),this.entry=function(_){return U(),h[_]},this.entries=function(){return U(),h},this.stream=function(_,E){return this.openEntry(_,(O,x)=>{if(O)return E(O);let A=V(x),T=new kr(e,A,x.compressedSize);if(x.method!==w.STORED)if(x.method===w.DEFLATED)T=T.pipe(Ou.createInflateRaw());else return E(new Error("Unknown compression method: "+x.method));me(x)&&(T=T.pipe(new Fr(T,x.crc,x.size))),E(null,T)},!1)},this.entryDataSync=function(_){let E=null;if(this.openEntry(_,(x,A)=>{E=x,_=A},!0),E)throw E;let O=Buffer.alloc(_.compressedSize);if(new Be(e,O,0,_.compressedSize,V(_),x=>{E=x}).read(!0),E)throw E;if(_.method!==w.STORED)if(_.method===w.DEFLATED||_.method===w.ENHANCED_DEFLATED)O=Ou.inflateRawSync(O);else throw new Error("Unknown compression method: "+_.method);if(O.length!==_.size)throw new Error("Invalid size");return me(_)&&new Ki(_.crc,_.size).data(O),O},this.openEntry=function(_,E,O){if(typeof _=="string"&&(U(),_=h[_],!_))return E(new Error("Entry not found"));if(!_.isFile)return E(new Error("Entry is not file"));if(!e)return E(new Error("Archive closed"));let x=Buffer.alloc(w.LOCHDR);new Be(e,x,0,x.length,_.offset,A=>{if(A)return E(A);let T;try{_.readDataHeader(x),_.encrypted&&(T=new Error("Entry encrypted"))}catch(k){T=k}E(T,_)}).read(O)};function V(_){return _.offset+w.LOCHDR+_.fnameLen+_.extraLen}function me(_){return(_.flags&8)!==8}function ae(_,E,O){a.stream(_,(x,A)=>{if(x)O(x);else{let T,k;A.on("error",M=>{k=M,T&&(A.unpipe(T),T.close(()=>{O(M)}))}),ne.open(E,"w",(M,ue)=>{if(M)return O(M);if(k){ne.close(e,()=>{O(k)});return}T=ne.createWriteStream(E,{fd:ue}),T.on("finish",()=>{a.emit("extract",_,E),k||O()}),A.pipe(T)})}})}function ze(_,E,O){if(!E.length)return O();let x=E.shift();x=bt.join(_,bt.join(...x)),ne.mkdir(x,{recursive:!0},A=>{if(A&&A.code!=="EEXIST")return O(A);ze(_,E,O)})}function Qi(_,E,O,x,A){if(!O.length)return x(null,A);let T=O.shift(),k=bt.join(_,T.name.replace(E,""));ae(T,k,M=>{if(M)return x(M,A);Qi(_,E,O,x,A+1)})}this.extract=function(_,E,O){let x=_||"";if(typeof _=="string"&&(_=this.entry(_),_?x=_.name:x.length&&x[x.length-1]!=="/"&&(x+="/")),!_||_.isDirectory){let A=[],T=[],k={};for(let M in h)if(Object.prototype.hasOwnProperty.call(h,M)&&M.lastIndexOf(x,0)===0){let ue=M.replace(x,""),Ur=h[M];if(Ur.isFile&&(A.push(Ur),ue=bt.dirname(ue)),ue&&!k[ue]&&ue!=="."){k[ue]=!0;let Le=ue.split("/").filter(wt=>wt);for(Le.length&&T.push(Le);Le.length>1;){Le=Le.slice(0,Le.length-1);let wt=Le.join("/");if(k[wt]||wt===".")break;k[wt]=!0,T.push(Le)}}}T.sort((M,ue)=>M.length-ue.length),T.length?ze(E,T,M=>{M?O(M):Qi(E,x,A,O,0)}):Qi(E,x,A,O,0)}else ne.stat(E,(A,T)=>{T&&T.isDirectory()?ae(_,bt.join(E,bt.basename(_.name)),O):ae(_,E,O)})},this.close=function(_){o||!e?(o=!0,_&&_()):(o=!0,ne.close(e,E=>{e=null,_&&_(E)}))};let Wu=Pr.EventEmitter.prototype.emit;this.emit=function(..._){if(!o)return Wu.call(this,..._)}};$e.setFs=function(r){ne=r};$e.debugLog=(...r)=>{$e.debug&&console.log(...r)};cd.inherits($e,Pr.EventEmitter);var Ue=Symbol("zip");$e.async=class extends Pr.EventEmitter{constructor(e){super();let t=new $e(e);t.on("entry",i=>this.emit("entry",i)),t.on("extract",(i,s)=>this.emit("extract",i,s)),this[Ue]=new Promise((i,s)=>{t.on("ready",()=>{t.removeListener("error",s),i(t)}),t.on("error",s)})}get entriesCount(){return this[Ue].then(e=>e.entriesCount)}get comment(){return this[Ue].then(e=>e.comment)}async entry(e){return(await this[Ue]).entry(e)}async entries(){return(await this[Ue]).entries()}async stream(e){let t=await this[Ue];return new Promise((i,s)=>{t.stream(e,(n,o)=>{n?s(n):i(o)})})}async entryData(e){let t=await this.stream(e);return new Promise((i,s)=>{let n=[];t.on("data",o=>n.push(o)),t.on("end",()=>{i(Buffer.concat(n))}),t.on("error",o=>{t.removeAllListeners("end"),s(o)})})}async extract(e,t){let i=await this[Ue];return new Promise((s,n)=>{i.extract(e,t,(o,u)=>{o?n(o):s(u)})})}async close(){let e=await this[Ue];return new Promise((t,i)=>{e.close(s=>{s?i(s):t()})})}};var Ir=class{read(e){if(e.length!==w.ENDHDR||e.readUInt32LE(0)!==w.ENDSIG)throw new Error("Invalid central directory");this.volumeEntries=e.readUInt16LE(w.ENDSUB),this.totalEntries=e.readUInt16LE(w.ENDTOT),this.size=e.readUInt32LE(w.ENDSIZ),this.offset=e.readUInt32LE(w.ENDOFF),this.commentLength=e.readUInt16LE(w.ENDCOM)}},Dr=class{read(e){if(e.length!==w.ENDL64HDR||e.readUInt32LE(0)!==w.ENDL64SIG)throw new Error("Invalid zip64 central directory locator");this.headerOffset=We(e,w.ENDSUB)}},Nr=class{read(e){if(e.length!==w.END64HDR||e.readUInt32LE(0)!==w.END64SIG)throw new Error("Invalid central directory");this.volumeEntries=We(e,w.END64SUB),this.totalEntries=We(e,w.END64TOT),this.size=We(e,w.END64SIZ),this.offset=We(e,w.END64OFF)}},Rr=class{readHeader(e,t){if(e.length<t+w.CENHDR||e.readUInt32LE(t)!==w.CENSIG)throw new Error("Invalid entry header");this.verMade=e.readUInt16LE(t+w.CENVEM),this.version=e.readUInt16LE(t+w.CENVER),this.flags=e.readUInt16LE(t+w.CENFLG),this.method=e.readUInt16LE(t+w.CENHOW);let i=e.readUInt16LE(t+w.CENTIM),s=e.readUInt16LE(t+w.CENTIM+2);this.time=vu(i,s),this.crc=e.readUInt32LE(t+w.CENCRC),this.compressedSize=e.readUInt32LE(t+w.CENSIZ),this.size=e.readUInt32LE(t+w.CENLEN),this.fnameLen=e.readUInt16LE(t+w.CENNAM),this.extraLen=e.readUInt16LE(t+w.CENEXT),this.comLen=e.readUInt16LE(t+w.CENCOM),this.diskStart=e.readUInt16LE(t+w.CENDSK),this.inattr=e.readUInt16LE(t+w.CENATT),this.attr=e.readUInt32LE(t+w.CENATX),this.offset=e.readUInt32LE(t+w.CENOFF)}readDataHeader(e){if(e.readUInt32LE(0)!==w.LOCSIG)throw new Error("Invalid local header");this.version=e.readUInt16LE(w.LOCVER),this.flags=e.readUInt16LE(w.LOCFLG),this.method=e.readUInt16LE(w.LOCHOW);let t=e.readUInt16LE(w.LOCTIM),i=e.readUInt16LE(w.LOCTIM+2);this.time=vu(t,i),this.crc=e.readUInt32LE(w.LOCCRC)||this.crc;let s=e.readUInt32LE(w.LOCSIZ);s&&s!==w.EF_ZIP64_OR_32&&(this.compressedSize=s);let n=e.readUInt32LE(w.LOCLEN);n&&n!==w.EF_ZIP64_OR_32&&(this.size=n),this.fnameLen=e.readUInt16LE(w.LOCNAM),this.extraLen=e.readUInt16LE(w.LOCEXT)}read(e,t,i){let s=e.slice(t,t+=this.fnameLen);this.name=i?i.decode(new Uint8Array(s)):s.toString("utf8");let n=e[t-1];this.isDirectory=n===47||n===92,this.extraLen&&(this.readExtra(e,t),t+=this.extraLen),this.comment=this.comLen?e.slice(t,t+this.comLen).toString():null}validateName(){if(/\\|^\w+:|^\/|(^|\/)\.\.(\/|$)/.test(this.name))throw new Error("Malicious entry: "+this.name)}readExtra(e,t){let i,s,n=t+this.extraLen;for(;t<n;)i=e.readUInt16LE(t),t+=2,s=e.readUInt16LE(t),t+=2,w.ID_ZIP64===i&&this.parseZip64Extra(e,t,s),t+=s}parseZip64Extra(e,t,i){i>=8&&this.size===w.EF_ZIP64_OR_32&&(this.size=We(e,t),t+=8,i-=8),i>=8&&this.compressedSize===w.EF_ZIP64_OR_32&&(this.compressedSize=We(e,t),t+=8,i-=8),i>=8&&this.offset===w.EF_ZIP64_OR_32&&(this.offset=We(e,t),t+=8,i-=8),i>=4&&this.diskStart===w.EF_ZIP64_OR_16&&(this.diskStart=e.readUInt32LE(t))}get encrypted(){return(this.flags&w.FLG_ENTRY_ENC)===w.FLG_ENTRY_ENC}get isFile(){return!this.isDirectory}},Be=class{constructor(e,t,i,s,n,o){this.fd=e,this.buffer=t,this.offset=i,this.length=s,this.position=n,this.callback=o,this.bytesRead=0,this.waiting=!1}read(e){$e.debugLog("read",this.position,this.bytesRead,this.length,this.offset),this.waiting=!0;let t;if(e){let i=0;try{i=ne.readSync(this.fd,this.buffer,this.offset+this.bytesRead,this.length-this.bytesRead,this.position+this.bytesRead)}catch(s){t=s}this.readCallback(e,t,t?i:null)}else ne.read(this.fd,this.buffer,this.offset+this.bytesRead,this.length-this.bytesRead,this.position+this.bytesRead,this.readCallback.bind(this,e))}readCallback(e,t,i){if(typeof i=="number"&&(this.bytesRead+=i),t||!i||this.bytesRead===this.length)return this.waiting=!1,this.callback(t,this.bytesRead);this.read(e)}},Yi=class{constructor(e){this.position=0,this.buffer=Buffer.alloc(0),this.fd=e,this.fsOp=null}checkOp(){if(this.fsOp&&this.fsOp.waiting)throw new Error("Operation in progress")}read(e,t,i){this.checkOp(),this.buffer.length<t&&(this.buffer=Buffer.alloc(t)),this.position=e,this.fsOp=new Be(this.fd,this.buffer,0,t,this.position,i).read()}expandLeft(e,t){this.checkOp(),this.buffer=Buffer.concat([Buffer.alloc(e),this.buffer]),this.position-=e,this.position<0&&(this.position=0),this.fsOp=new Be(this.fd,this.buffer,0,e,this.position,t).read()}expandRight(e,t){this.checkOp();let i=this.buffer.length;this.buffer=Buffer.concat([this.buffer,Buffer.alloc(e)]),this.fsOp=new Be(this.fd,this.buffer,i,e,this.position+i,t).read()}moveRight(e,t,i){this.checkOp(),i?this.buffer.copy(this.buffer,0,i):i=0,this.position+=i,this.fsOp=new Be(this.fd,this.buffer,this.buffer.length-i,i,this.position+this.buffer.length-i,t).read()}},kr=class extends Lu.Readable{constructor(e,t,i){super(),this.fd=e,this.offset=t,this.length=i,this.pos=0,this.readCallback=this.readCallback.bind(this)}_read(e){let t=Buffer.alloc(Math.min(e,this.length-this.pos));t.length?ne.read(this.fd,t,0,t.length,this.offset+this.pos,this.readCallback):this.push(null)}readCallback(e,t,i){this.pos+=t,e?(this.emit("error",e),this.push(null)):t?(t!==i.length&&(i=i.slice(0,t)),this.push(i)):this.push(null)}},Fr=class extends Lu.Transform{constructor(e,t,i){super(),this.verify=new Ki(t,i),e.on("error",s=>{this.emit("error",s)})}_transform(e,t,i){let s;try{this.verify.data(e)}catch(n){s=n}i(s,e)}},Ki=class r{constructor(e,t){this.crc=e,this.size=t,this.state={crc:-1,size:0}}data(e){let t=r.getCrcTable(),i=this.state.crc,s=0,n=e.length;for(;--n>=0;)i=t[(i^e[s++])&255]^i>>>8;if(this.state.crc=i,this.state.size+=e.length,this.state.size>=this.size){let o=Buffer.alloc(4);if(o.writeInt32LE(~this.state.crc&4294967295,0),i=o.readUInt32LE(0),i!==this.crc)throw new Error("Invalid CRC");if(this.state.size!==this.size)throw new Error("Invalid size")}}static getCrcTable(){let e=r.crcTable;if(!e){r.crcTable=e=[];let t=Buffer.alloc(4);for(let i=0;i<256;i++){let s=i;for(let n=8;--n>=0;)(s&1)!==0?s=3988292384^s>>>1:s=s>>>1;s<0&&(t.writeInt32LE(s,0),s=t.readUInt32LE(0)),e[i]=s}}return e}};function vu(r,e){let t=Tu(r,16),i=Tu(e,16),s={h:parseInt(t.slice(0,5).join(""),2),m:parseInt(t.slice(5,11).join(""),2),s:parseInt(t.slice(11,16).join(""),2)*2,Y:parseInt(i.slice(0,7).join(""),2)+1980,M:parseInt(i.slice(7,11).join(""),2),D:parseInt(i.slice(11,16).join(""),2)},n=[s.Y,s.M,s.D].join("-")+" "+[s.h,s.m,s.s].join(":")+" GMT+0";return new Date(n).getTime()}function Tu(r,e){let t=(r>>>0).toString(2);for(;t.length<e;)t="0"+t;return t.split("")}function We(r,e){return r.readUInt32LE(e+4)*4294967296+r.readUInt32LE(e)}Au.exports=$e});var gd={};Vu(gd,{StackUtils:()=>ku.default,StreamZip:()=>Bu.async,WebSocket:()=>xo,WebSocketServer:()=>Ls.default,ZipFile:()=>Uu.ZipFile,codeFrameColumns:()=>Fu.codeFrameColumns,findUpSync:()=>su,glob:()=>Ui,open:()=>Mu.default,program:()=>jo,sanitize:()=>Pu.default,supportsColor:()=>Ru});module.exports=qu(gd);var ku=F(Hr()),Fu=F(gn());var Ul=F(co(),1),Bl=F(_s(),1),Wl=F(Es(),1),So=F(fi(),1),Ls=F(yo(),1);var xo=So.default;var Pu=F(Io());var Go=F(zo(),1),{program:jo,createCommand:tp,createArgument:ip,createOption:sp,CommanderError:rp,InvalidArgumentError:np,InvalidOptionArgumentError:op,Command:ap,Argument:up,Option:hp,Help:lp}=Go.default;var Mu=F(ra());var Qs=(r,e,t)=>{let i=r instanceof RegExp?na(r,t):r,s=e instanceof RegExp?na(e,t):e,n=i!==null&&s!=null&&xc(i,s,t);return n&&{start:n[0],end:n[1],pre:t.slice(0,n[0]),body:t.slice(n[0]+i.length,n[1]),post:t.slice(n[1]+s.length)}},na=(r,e)=>{let t=e.match(r);return t?t[0]:null},xc=(r,e,t)=>{let i,s,n,o,u,a=t.indexOf(r),h=t.indexOf(e,a+1),l=a;if(a>=0&&h>0){if(r===e)return[a,h];for(i=[],n=t.length;l>=0&&!u;){if(l===a)i.push(l),a=t.indexOf(r,l+1);else if(i.length===1){let c=i.pop();c!==void 0&&(u=[c,h])}else s=i.pop(),s!==void 0&&s<n&&(n=s,o=h),h=t.indexOf(e,l+1);l=a<h&&a>=0?a:h}i.length&&o!==void 0&&(u=[n,o])}return u};var oa="\0SLASH"+Math.random()+"\0",aa="\0OPEN"+Math.random()+"\0",tr="\0CLOSE"+Math.random()+"\0",ua="\0COMMA"+Math.random()+"\0",ha="\0PERIOD"+Math.random()+"\0",Cc=new RegExp(oa,"g"),Oc=new RegExp(aa,"g"),vc=new RegExp(tr,"g"),Tc=new RegExp(ua,"g"),Lc=new RegExp(ha,"g"),Ac=/\\\\/g,Ic=/\\{/g,Dc=/\\}/g,Nc=/\\,/g,Rc=/\\./g;function er(r){return isNaN(r)?r.charCodeAt(0):parseInt(r,10)}function kc(r){return r.replace(Ac,oa).replace(Ic,aa).replace(Dc,tr).replace(Nc,ua).replace(Rc,ha)}function Fc(r){return r.replace(Cc,"\\").replace(Oc,"{").replace(vc,"}").replace(Tc,",").replace(Lc,".")}function la(r){if(!r)return[""];let e=[],t=Qs("{","}",r);if(!t)return r.split(",");let{pre:i,body:s,post:n}=t,o=i.split(",");o[o.length-1]+="{"+s+"}";let u=la(n);return n.length&&(o[o.length-1]+=u.shift(),o.push.apply(o,u)),e.push.apply(e,o),e}function ca(r){return r?(r.slice(0,2)==="{}"&&(r="\\{\\}"+r.slice(2)),Nt(kc(r),!0).map(Fc)):[]}function Pc(r){return"{"+r+"}"}function Mc(r){return/^-?0\d/.test(r)}function Uc(r,e){return r<=e}function Bc(r,e){return r>=e}function Nt(r,e){let t=[],i=Qs("{","}",r);if(!i)return[r];let s=i.pre,n=i.post.length?Nt(i.post,!1):[""];if(/\$$/.test(i.pre))for(let o=0;o<n.length;o++){let u=s+"{"+i.body+"}"+n[o];t.push(u)}else{let o=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),a=o||u,h=i.body.indexOf(",")>=0;if(!a&&!h)return i.post.match(/,(?!,).*\}/)?(r=i.pre+"{"+i.body+tr+i.post,Nt(r)):[r];let l;if(a)l=i.body.split(/\.\./);else if(l=la(i.body),l.length===1&&l[0]!==void 0&&(l=Nt(l[0],!1).map(Pc),l.length===1))return n.map(d=>i.pre+l[0]+d);let c;if(a&&l[0]!==void 0&&l[1]!==void 0){let d=er(l[0]),p=er(l[1]),m=Math.max(l[0].length,l[1].length),f=l.length===3&&l[2]!==void 0?Math.abs(er(l[2])):1,b=Uc;p<d&&(f*=-1,b=Bc);let y=l.some(Mc);c=[];for(let C=d;b(C,p);C+=f){let S;if(u)S=String.fromCharCode(C),S==="\\"&&(S="");else if(S=String(C),y){let L=m-S.length;if(L>0){let U=new Array(L+1).join("0");C<0?S="-"+U+S.slice(1):S=U+S}}c.push(S)}}else{c=[];for(let d=0;d<l.length;d++)c.push.apply(c,Nt(l[d],!1))}for(let d=0;d<c.length;d++)for(let p=0;p<n.length;p++){let m=s+c[d]+n[p];(!e||a||m)&&t.push(m)}}return t}var Rt=r=>{if(typeof r!="string")throw new TypeError("invalid pattern");if(r.length>65536)throw new TypeError("pattern is too long")};var Wc={"[: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]},kt=r=>r.replace(/[[\]\\-]/g,"\\$&"),$c=r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),fa=r=>r.join(""),da=(r,e)=>{let t=e;if(r.charAt(t)!=="[")throw new Error("not in a brace expression");let i=[],s=[],n=t+1,o=!1,u=!1,a=!1,h=!1,l=t,c="";e:for(;n<r.length;){let f=r.charAt(n);if((f==="!"||f==="^")&&n===t+1){h=!0,n++;continue}if(f==="]"&&o&&!a){l=n+1;break}if(o=!0,f==="\\"&&!a){a=!0,n++;continue}if(f==="["&&!a){for(let[b,[g,y,C]]of Object.entries(Wc))if(r.startsWith(b,n)){if(c)return["$.",!1,r.length-t,!0];n+=b.length,C?s.push(g):i.push(g),u=u||y;continue e}}if(a=!1,c){f>c?i.push(kt(c)+"-"+kt(f)):f===c&&i.push(kt(f)),c="",n++;continue}if(r.startsWith("-]",n+1)){i.push(kt(f+"-")),n+=2;continue}if(r.startsWith("-",n+1)){c=f,n+=2;continue}i.push(kt(f)),n++}if(l<n)return["",!1,0,!1];if(!i.length&&!s.length)return["$.",!1,r.length-t,!0];if(s.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!h){let f=i[0].length===2?i[0].slice(-1):i[0];return[$c(f),!1,l-t,!1]}let d="["+(h?"^":"")+fa(i)+"]",p="["+(h?"":"^")+fa(s)+"]";return[i.length&&s.length?"("+d+"|"+p+")":i.length?d:p,u,l-t,!0]};var le=(r,{windowsPathsNoEscape:e=!1}={})=>e?r.replace(/\[([^\/\\])\]/g,"$1"):r.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var zc=new Set(["!","?","+","*","@"]),pa=r=>zc.has(r),Gc="(?!(?:^|/)\\.\\.?(?:$|/))",yi="(?!\\.)",jc=new Set(["[","."]),Hc=new Set(["..","."]),Vc=new Set("().*{}+?[]^$\\!"),qc=r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ir="[^/]",ma=ir+"*?",ga=ir+"+?",ot=class r{type;#e;#t;#n=!1;#s=[];#o;#E;#h;#c=!1;#a;#u;#r=!1;constructor(e,t,i={}){this.type=e,e&&(this.#t=!0),this.#o=t,this.#e=this.#o?this.#o.#e:this,this.#a=this.#e===this?i:this.#e.#a,this.#h=this.#e===this?[]:this.#e.#h,e==="!"&&!this.#e.#c&&this.#h.push(this),this.#E=this.#o?this.#o.#s.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#s)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#u!==void 0?this.#u:this.type?this.#u=this.type+"("+this.#s.map(e=>String(e)).join("|")+")":this.#u=this.#s.map(e=>String(e)).join("")}#g(){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.#h.pop();){if(e.type!=="!")continue;let t=e,i=t.#o;for(;i;){for(let s=t.#E+1;!i.type&&s<i.#s.length;s++)for(let n of e.#s){if(typeof n=="string")throw new Error("string part in extglob AST??");n.copyIn(i.#s[s])}t=i,i=t.#o}}return this}push(...e){for(let t of e)if(t!==""){if(typeof t!="string"&&!(t instanceof r&&t.#o===this))throw new Error("invalid part: "+t);this.#s.push(t)}}toJSON(){var t;let e=this.type===null?this.#s.slice().map(i=>typeof i=="string"?i:i.toJSON()):[this.type,...this.#s.map(i=>i.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#c&&((t=this.#o)==null?void 0:t.type)==="!")&&e.push({}),e}isStart(){var t;if(this.#e===this)return!0;if(!((t=this.#o)!=null&&t.isStart()))return!1;if(this.#E===0)return!0;let e=this.#o;for(let i=0;i<this.#E;i++){let s=e.#s[i];if(!(s instanceof r&&s.type==="!"))return!1}return!0}isEnd(){var t,i,s;if(this.#e===this||((t=this.#o)==null?void 0:t.type)==="!")return!0;if(!((i=this.#o)!=null&&i.isEnd()))return!1;if(!this.type)return(s=this.#o)==null?void 0:s.isEnd();let e=this.#o?this.#o.#s.length:0;return this.#E===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let t=new r(this.type,e);for(let i of this.#s)t.copyIn(i);return t}static#_(e,t,i,s){let n=!1,o=!1,u=-1,a=!1;if(t.type===null){let p=i,m="";for(;p<e.length;){let f=e.charAt(p++);if(n||f==="\\"){n=!n,m+=f;continue}if(o){p===u+1?(f==="^"||f==="!")&&(a=!0):f==="]"&&!(p===u+2&&a)&&(o=!1),m+=f;continue}else if(f==="["){o=!0,u=p,a=!1,m+=f;continue}if(!s.noext&&pa(f)&&e.charAt(p)==="("){t.push(m),m="";let b=new r(f,t);p=r.#_(e,b,p,s),t.push(b);continue}m+=f}return t.push(m),p}let h=i+1,l=new r(null,t),c=[],d="";for(;h<e.length;){let p=e.charAt(h++);if(n||p==="\\"){n=!n,d+=p;continue}if(o){h===u+1?(p==="^"||p==="!")&&(a=!0):p==="]"&&!(h===u+2&&a)&&(o=!1),d+=p;continue}else if(p==="["){o=!0,u=h,a=!1,d+=p;continue}if(pa(p)&&e.charAt(h)==="("){l.push(d),d="";let m=new r(p,l);l.push(m),h=r.#_(e,m,h,s);continue}if(p==="|"){l.push(d),d="",c.push(l),l=new r(null,t);continue}if(p===")")return d===""&&t.#s.length===0&&(t.#r=!0),l.push(d),d="",t.push(...c,l),h;d+=p}return t.type=null,t.#t=void 0,t.#s=[e.substring(i-1)],h}static fromGlob(e,t={}){let i=new r(null,void 0,t);return r.#_(e,i,0,t),i}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,i,s,n]=this.toRegExpSource();if(!(s||this.#t||this.#a.nocase&&!this.#a.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return i;let u=(this.#a.nocase?"i":"")+(n?"u":"");return Object.assign(new RegExp(`^${t}$`,u),{_src:t,_glob:e})}get options(){return this.#a}toRegExpSource(e){var a;let t=e??!!this.#a.dot;if(this.#e===this&&this.#g(),!this.type){let h=this.isStart()&&this.isEnd(),l=this.#s.map(m=>{let[f,b,g,y]=typeof m=="string"?r.#f(m,this.#t,h):m.toRegExpSource(e);return this.#t=this.#t||g,this.#n=this.#n||y,f}).join(""),c="";if(this.isStart()&&typeof this.#s[0]=="string"&&!(this.#s.length===1&&Hc.has(this.#s[0]))){let f=jc,b=t&&f.has(l.charAt(0))||l.startsWith("\\.")&&f.has(l.charAt(2))||l.startsWith("\\.\\.")&&f.has(l.charAt(4)),g=!t&&!e&&f.has(l.charAt(0));c=b?Gc:g?yi:""}let d="";return this.isEnd()&&this.#e.#c&&((a=this.#o)==null?void 0:a.type)==="!"&&(d="(?:$|\\/)"),[c+l+d,le(l),this.#t=!!this.#t,this.#n]}let i=this.type==="*"||this.type==="+",s=this.type==="!"?"(?:(?!(?:":"(?:",n=this.#d(t);if(this.isStart()&&this.isEnd()&&!n&&this.type!=="!"){let h=this.toString();return this.#s=[h],this.type=null,this.#t=void 0,[h,le(this.toString()),!1,!1]}let o=!i||e||t||!yi?"":this.#d(!0);o===n&&(o=""),o&&(n=`(?:${n})(?:${o})*?`);let u="";if(this.type==="!"&&this.#r)u=(this.isStart()&&!t?yi:"")+ga;else{let h=this.type==="!"?"))"+(this.isStart()&&!t&&!e?yi:"")+ma+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;u=s+n+h}return[u,le(n),this.#t=!!this.#t,this.#n]}#d(e){return this.#s.map(t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");let[i,s,n,o]=t.toRegExpSource(e);return this.#n=this.#n||o,i}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#f(e,t,i=!1){let s=!1,n="",o=!1;for(let u=0;u<e.length;u++){let a=e.charAt(u);if(s){s=!1,n+=(Vc.has(a)?"\\":"")+a;continue}if(a==="\\"){u===e.length-1?n+="\\\\":s=!0;continue}if(a==="["){let[h,l,c,d]=da(e,u);if(c){n+=h,o=o||l,u+=c-1,t=t||d;continue}}if(a==="*"){i&&e==="*"?n+=ga:n+=ma,t=!0;continue}if(a==="?"){n+=ir,t=!0;continue}n+=qc(a)}return[n,le(e),!!t,o]}};var at=(r,{windowsPathsNoEscape:e=!1}={})=>e?r.replace(/[?*()[\]]/g,"[$&]"):r.replace(/[?*()[\]\\]/g,"\\$&");var q=(r,e,t={})=>(Rt(e),!t.nocomment&&e.charAt(0)==="#"?!1:new X(e,t).match(r)),Zc=/^\*+([^+@!?\*\[\(]*)$/,Yc=r=>e=>!e.startsWith(".")&&e.endsWith(r),Kc=r=>e=>e.endsWith(r),Xc=r=>(r=r.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(r)),Jc=r=>(r=r.toLowerCase(),e=>e.toLowerCase().endsWith(r)),Qc=/^\*+\.\*+$/,ef=r=>!r.startsWith(".")&&r.includes("."),tf=r=>r!=="."&&r!==".."&&r.includes("."),sf=/^\.\*+$/,rf=r=>r!=="."&&r!==".."&&r.startsWith("."),nf=/^\*+$/,of=r=>r.length!==0&&!r.startsWith("."),af=r=>r.length!==0&&r!=="."&&r!=="..",uf=/^\?+([^+@!?\*\[\(]*)?$/,hf=([r,e=""])=>{let t=wa([r]);return e?(e=e.toLowerCase(),i=>t(i)&&i.toLowerCase().endsWith(e)):t},lf=([r,e=""])=>{let t=Ea([r]);return e?(e=e.toLowerCase(),i=>t(i)&&i.toLowerCase().endsWith(e)):t},cf=([r,e=""])=>{let t=Ea([r]);return e?i=>t(i)&&i.endsWith(e):t},ff=([r,e=""])=>{let t=wa([r]);return e?i=>t(i)&&i.endsWith(e):t},wa=([r])=>{let e=r.length;return t=>t.length===e&&!t.startsWith(".")},Ea=([r])=>{let e=r.length;return t=>t.length===e&&t!=="."&&t!==".."},ya=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",_a={win32:{sep:"\\"},posix:{sep:"/"}},df=ya==="win32"?_a.win32.sep:_a.posix.sep;q.sep=df;var G=Symbol("globstar **");q.GLOBSTAR=G;var pf="[^/]",mf=pf+"*?",gf="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",_f="(?:(?!(?:\\/|^)\\.).)*?",bf=(r,e={})=>t=>q(t,r,e);q.filter=bf;var ie=(r,e={})=>Object.assign({},r,e),wf=r=>{if(!r||typeof r!="object"||!Object.keys(r).length)return q;let e=q;return Object.assign((i,s,n={})=>e(i,s,ie(r,n)),{Minimatch:class extends e.Minimatch{constructor(s,n={}){super(s,ie(r,n))}static defaults(s){return e.defaults(ie(r,s)).Minimatch}},AST:class extends e.AST{constructor(s,n,o={}){super(s,n,ie(r,o))}static fromGlob(s,n={}){return e.AST.fromGlob(s,ie(r,n))}},unescape:(i,s={})=>e.unescape(i,ie(r,s)),escape:(i,s={})=>e.escape(i,ie(r,s)),filter:(i,s={})=>e.filter(i,ie(r,s)),defaults:i=>e.defaults(ie(r,i)),makeRe:(i,s={})=>e.makeRe(i,ie(r,s)),braceExpand:(i,s={})=>e.braceExpand(i,ie(r,s)),match:(i,s,n={})=>e.match(i,s,ie(r,n)),sep:e.sep,GLOBSTAR:G})};q.defaults=wf;var Sa=(r,e={})=>(Rt(r),e.nobrace||!/\{(?:(?!\{).)*\}/.test(r)?[r]:ca(r));q.braceExpand=Sa;var Ef=(r,e={})=>new X(r,e).makeRe();q.makeRe=Ef;var yf=(r,e,t={})=>{let i=new X(e,t);return r=r.filter(s=>i.match(s)),i.options.nonull&&!r.length&&r.push(e),r};q.match=yf;var ba=/[?*]|[+@!]\(.*?\)|\[|\]/,Sf=r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),X=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){Rt(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||ya,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.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 t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...n)=>console.error(...n)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(n=>this.slashSplit(n));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let s=this.globParts.map((n,o,u)=>{if(this.isWindows&&this.windowsNoMagicRoot){let a=n[0]===""&&n[1]===""&&(n[2]==="?"||!ba.test(n[2]))&&!ba.test(n[3]),h=/^[a-z]:/i.test(n[0]);if(a)return[...n.slice(0,4),...n.slice(4).map(l=>this.parse(l))];if(h)return[n[0],...n.slice(1).map(l=>this.parse(l))]}return n.map(a=>this.parse(a))});if(this.debug(this.pattern,s),this.set=s.filter(n=>n.indexOf(!1)===-1),this.isWindows)for(let n=0;n<this.set.length;n++){let o=this.set[n];o[0]===""&&o[1]===""&&this.globParts[n][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let i=0;i<e.length;i++)for(let s=0;s<e[i].length;s++)e[i][s]==="**"&&(e[i][s]="*");let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let i=-1;for(;(i=t.indexOf("**",i+1))!==-1;){let s=i;for(;t[s+1]==="**";)s++;s!==i&&t.splice(i,s-i)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((i,s)=>{let n=i[i.length-1];return s==="**"&&n==="**"?i:s===".."&&n&&n!==".."&&n!=="."&&n!=="**"?(i.pop(),i):(i.push(s),i)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let s=1;s<e.length-1;s++){let n=e[s];s===1&&n===""&&e[0]===""||(n==="."||n==="")&&(t=!0,e.splice(s,1),s--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(t=!0,e.pop())}let i=0;for(;(i=e.indexOf("..",i+1))!==-1;){let s=e[i-1];s&&s!=="."&&s!==".."&&s!=="**"&&(t=!0,e.splice(i-1,2),i-=2)}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let i of e){let s=-1;for(;(s=i.indexOf("**",s+1))!==-1;){let o=s;for(;i[o+1]==="**";)o++;o>s&&i.splice(s+1,o-s);let u=i[s+1],a=i[s+2],h=i[s+3];if(u!==".."||!a||a==="."||a===".."||!h||h==="."||h==="..")continue;t=!0,i.splice(s,1);let l=i.slice(0);l[s]="**",e.push(l),s--}if(!this.preserveMultipleSlashes){for(let o=1;o<i.length-1;o++){let u=i[o];o===1&&u===""&&i[0]===""||(u==="."||u==="")&&(t=!0,i.splice(o,1),o--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(t=!0,i.pop())}let n=0;for(;(n=i.indexOf("..",n+1))!==-1;){let o=i[n-1];if(o&&o!=="."&&o!==".."&&o!=="**"){t=!0;let a=n===1&&i[n+1]==="**"?["."]:[];i.splice(n-1,2,...a),i.length===0&&i.push(""),n-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let i=t+1;i<e.length;i++){let s=this.partsMatch(e[t],e[i],!this.preserveMultipleSlashes);if(s){e[t]=[],e[i]=s;break}}return e.filter(t=>t.length)}partsMatch(e,t,i=!1){let s=0,n=0,o=[],u="";for(;s<e.length&&n<t.length;)if(e[s]===t[n])o.push(u==="b"?t[n]:e[s]),s++,n++;else if(i&&e[s]==="**"&&t[n]===e[s+1])o.push(e[s]),s++;else if(i&&t[n]==="**"&&e[s]===t[n+1])o.push(t[n]),n++;else if(e[s]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(u==="b")return!1;u="a",o.push(e[s]),s++,n++}else if(t[n]==="*"&&e[s]&&(this.options.dot||!e[s].startsWith("."))&&e[s]!=="**"){if(u==="a")return!1;u="b",o.push(t[n]),s++,n++}else return!1;return e.length===t.length&&o}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,i=0;for(let s=0;s<e.length&&e.charAt(s)==="!";s++)t=!t,i++;i&&(this.pattern=e.slice(i)),this.negate=t}matchOne(e,t,i=!1){let s=this.options;if(this.isWindows){let f=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),b=!f&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),g=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),y=!g&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),C=b?3:f?0:void 0,S=y?3:g?0:void 0;if(typeof C=="number"&&typeof S=="number"){let[L,U]=[e[C],t[S]];L.toLowerCase()===U.toLowerCase()&&(t[S]=L,S>C?t=t.slice(S):C>S&&(e=e.slice(C)))}}let{optimizationLevel:n=1}=this.options;n>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var o=0,u=0,a=e.length,h=t.length;o<a&&u<h;o++,u++){this.debug("matchOne loop");var l=t[u],c=e[o];if(this.debug(t,l,c),l===!1)return!1;if(l===G){this.debug("GLOBSTAR",[t,l,c]);var d=o,p=u+1;if(p===h){for(this.debug("** at the end");o<a;o++)if(e[o]==="."||e[o]===".."||!s.dot&&e[o].charAt(0)===".")return!1;return!0}for(;d<a;){var m=e[d];if(this.debug(`
38
+ `)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(s=>t.is(s))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Mo(r){return r.map(e=>{if(!e.startsWith("--inspect"))return e;let t,i="127.0.0.1",s="9229",n;return(n=e.match(/^(--inspect(-brk)?)$/))!==null?t=n[1]:(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=n[1],/^\d+$/.test(n[3])?s=n[3]:i=n[3]):(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=n[1],i=n[3],s=n[4]),t&&s!=="0"?`${t}=${i}:${parseInt(s)+1}`:e})}function Gs(){if(I.env.NO_COLOR||I.env.FORCE_COLOR==="0"||I.env.FORCE_COLOR==="false")return!1;if(I.env.FORCE_COLOR||I.env.CLICOLOR_FORCE!==void 0)return!0}js.Command=zs;js.useColor=Gs});var zo=v(ie=>{var{Argument:Bo}=mi(),{Command:Hs}=Uo(),{CommanderError:lc,InvalidArgumentError:Wo}=Dt(),{Help:cc}=Fs(),{Option:$o}=Bs();ie.program=new Hs;ie.createCommand=r=>new Hs(r);ie.createOption=(r,e)=>new $o(r,e);ie.createArgument=(r,e)=>new Bo(r,e);ie.Command=Hs;ie.Option=$o;ie.Argument=Bo;ie.Help=cc;ie.CommanderError=lc;ie.InvalidArgumentError=Wo;ie.InvalidOptionArgumentError=Wo});var qs=v((fp,Vo)=>{"use strict";var Ho=require("fs"),Vs;function fc(){try{return Ho.statSync("/.dockerenv"),!0}catch{return!1}}function dc(){try{return Ho.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}Vo.exports=()=>(Vs===void 0&&(Vs=fc()||dc()),Vs)});var Yo=v((dp,Zs)=>{"use strict";var pc=require("os"),mc=require("fs"),qo=qs(),Zo=()=>{if(process.platform!=="linux")return!1;if(pc.release().toLowerCase().includes("microsoft"))return!qo();try{return mc.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!qo():!1}catch{return!1}};process.env.__IS_WSL_TEST__?Zs.exports=Zo:Zs.exports=Zo()});var Xo=v((pp,Ko)=>{"use strict";Ko.exports=(r,e,t)=>{let i=s=>Object.defineProperty(r,e,{value:s,enumerable:!0,writable:!0});return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get(){let s=t();return i(s),s},set(s){i(s)}}),r}});var ra=v((mp,sa)=>{var gc=require("path"),_c=require("child_process"),{promises:bi,constants:ia}=require("fs"),_i=Yo(),bc=qs(),Ks=Xo(),Jo=gc.join(__dirname,"xdg-open"),{platform:nt,arch:Qo}=process,wc=()=>{try{return bi.statSync("/run/.containerenv"),!0}catch{return!1}},Ys;function Ec(){return Ys===void 0&&(Ys=wc()||bc()),Ys}var yc=(()=>{let r="/mnt/",e;return async function(){if(e)return e;let t="/etc/wsl.conf",i=!1;try{await bi.access(t,ia.F_OK),i=!0}catch{}if(!i)return r;let s=await bi.readFile(t,{encoding:"utf8"}),n=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(s);return n?(e=n.groups.mountPoint.trim(),e=e.endsWith("/")?e:`${e}/`,e):r}})(),ea=async(r,e)=>{let t;for(let i of r)try{return await e(i)}catch(s){t=s}throw t},wi=async r=>{if(r={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...r},Array.isArray(r.app))return ea(r.app,u=>wi({...r,app:u}));let{name:e,arguments:t=[]}=r.app||{};if(t=[...t],Array.isArray(e))return ea(e,u=>wi({...r,app:{name:u,arguments:t}}));let i,s=[],n={};if(nt==="darwin")i="open",r.wait&&s.push("--wait-apps"),r.background&&s.push("--background"),r.newInstance&&s.push("--new"),e&&s.push("-a",e);else if(nt==="win32"||_i&&!Ec()&&!e){let u=await yc();i=_i?`${u}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,s.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),_i||(n.windowsVerbatimArguments=!0);let a=["Start"];r.wait&&a.push("-Wait"),e?(a.push(`"\`"${e}\`""`,"-ArgumentList"),r.target&&t.unshift(r.target)):r.target&&a.push(`"${r.target}"`),t.length>0&&(t=t.map(h=>`"\`"${h}\`""`),a.push(t.join(","))),r.target=Buffer.from(a.join(" "),"utf16le").toString("base64")}else{if(e)i=e;else{let u=!__dirname||__dirname==="/",a=!1;try{await bi.access(Jo,ia.X_OK),a=!0}catch{}i=process.versions.electron||nt==="android"||u||!a?"xdg-open":Jo}t.length>0&&s.push(...t),r.wait||(n.stdio="ignore",n.detached=!0)}r.target&&s.push(r.target),nt==="darwin"&&t.length>0&&s.push("--args",...t);let o=_c.spawn(i,s,n);return r.wait?new Promise((u,a)=>{o.once("error",a),o.once("close",h=>{if(!r.allowNonzeroExitCode&&h>0){a(new Error(`Exited with code ${h}`));return}u(o)})}):(o.unref(),o)},Xs=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a `target`");return wi({...e,target:r})},Sc=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a `name`");let{arguments:t=[]}=e||{};if(t!=null&&!Array.isArray(t))throw new TypeError("Expected `appArguments` as Array type");return wi({...e,app:{name:r,arguments:t}})};function ta(r){if(typeof r=="string"||Array.isArray(r))return r;let{[Qo]:e}=r;if(!e)throw new Error(`${Qo} is not supported`);return e}function Js({[nt]:r},{wsl:e}){if(e&&_i)return ta(e);if(!r)throw new Error(`${nt} is not supported`);return ta(r)}var Ei={};Ks(Ei,"chrome",()=>Js({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));Ks(Ei,"firefox",()=>Js({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));Ks(Ei,"edge",()=>Js({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));Xs.apps=Ei;Xs.openApp=Sc;sa.exports=Xs});var ou=v((Fm,nu)=>{"use strict";function Qf(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ed=new Int32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);function ru(r){if(Buffer.isBuffer(r))return r;if(typeof r=="number")return Buffer.alloc(r);if(typeof r=="string")return Buffer.from(r);throw new Error("input must be buffer, number, or string, received "+typeof r)}function td(r){let e=ru(4);return e.writeInt32BE(r,0),e}function yr(r,e){r=ru(r),Buffer.isBuffer(e)&&(e=e.readUInt32BE(0));let t=~~e^-1;for(var i=0;i<r.length;i++)t=ed[(t^r[i])&255]^t>>>8;return t^-1}function Sr(){return td(yr.apply(null,arguments))}Sr.signed=function(){return yr.apply(null,arguments)};Sr.unsigned=function(){return yr.apply(null,arguments)>>>0};var id=Sr,sd=Qf(id);nu.exports=sd});var Cu=v(Ar=>{var au=require("fs"),Vi=require("stream").Transform,lu=require("stream").PassThrough,cu=require("zlib"),Tr=require("util"),rd=require("events").EventEmitter,nd=require("events").errorMonitor,fu=ou();Ar.ZipFile=Ue;Ar.dateToDosDateTime=xu;Tr.inherits(Ue,rd);function Ue(){this.outputStream=new lu,this.entries=[],this.outputStreamCursor=0,this.ended=!1,this.allDone=!1,this.forceZip64Eocd=!1,this.errored=!1,this.on(nd,function(){this.errored=!0})}Ue.prototype.addFile=function(r,e,t){var i=this;if(e=Zi(e,!1),t==null&&(t={}),!qi(i)){var s=new D(e,!1,t);i.entries.push(s),au.stat(r,function(n,o){if(n)return i.emit("error",n);if(!o.isFile())return i.emit("error",new Error("not a file: "+r));s.uncompressedSize=o.size,t.mtime==null&&s.setLastModDate(o.mtime),t.mode==null&&s.setFileAttributesMode(o.mode),s.setFileDataPumpFunction(function(){var u=au.createReadStream(r);s.state=D.FILE_DATA_IN_PROGRESS,u.on("error",function(a){i.emit("error",a)}),du(i,s,u)}),Me(i)})}};Ue.prototype.addReadStream=function(r,e,t){this.addReadStreamLazy(e,t,function(i){i(null,r)})};Ue.prototype.addReadStreamLazy=function(r,e,t){var i=this;if(typeof e=="function"&&(t=e,e=null),e==null&&(e={}),r=Zi(r,!1),!qi(i)){var s=new D(r,!1,e);i.entries.push(s),s.setFileDataPumpFunction(function(){s.state=D.FILE_DATA_IN_PROGRESS,t(function(n,o){if(n)return i.emit("error",n);du(i,s,o)})}),Me(i)}};Ue.prototype.addBuffer=function(r,e,t){var i=this;if(e=Zi(e,!1),r.length>1073741823)throw new Error("buffer too large: "+r.length+" > 1073741823");if(t==null&&(t={}),t.size!=null)throw new Error("options.size not allowed");if(qi(i))return;var s=new D(e,!1,t);s.uncompressedSize=r.length,s.crc32=fu.unsigned(r),s.crcAndFileSizeKnown=!0,i.entries.push(s),s.compressionLevel===0?n(r):cu.deflateRaw(r,{level:s.compressionLevel},function(o,u){n(u)});function n(o){s.compressedSize=o.length,s.setFileDataPumpFunction(function(){Xe(i,o),Xe(i,s.getDataDescriptor()),s.state=D.FILE_DATA_DONE,setImmediate(function(){Me(i)})}),Me(i)}};Ue.prototype.addEmptyDirectory=function(r,e){var t=this;if(r=Zi(r,!0),e==null&&(e={}),e.size!=null)throw new Error("options.size not allowed");if(e.compress!=null)throw new Error("options.compress not allowed");if(e.compressionLevel!=null)throw new Error("options.compressionLevel not allowed");if(!qi(t)){var i=new D(r,!0,e);t.entries.push(i),i.setFileDataPumpFunction(function(){Xe(t,i.getDataDescriptor()),i.state=D.FILE_DATA_DONE,Me(t)}),Me(t)}};var od=Pe([80,75,5,6]);Ue.prototype.end=function(r,e){if(typeof r=="function"&&(e=r,r=null),r==null&&(r={}),!this.ended&&(this.ended=!0,!this.errored)){if(this.calculatedTotalSizeCallback=e,this.forceZip64Eocd=!!r.forceZip64Format,r.comment){if(typeof r.comment=="string"?this.comment=ld(r.comment):this.comment=r.comment,this.comment.length>65535)throw new Error("comment is too large");if(Zt(this.comment,od))throw new Error("comment contains end of central directory record signature")}else this.comment=Yt;Me(this)}};function Xe(r,e){r.outputStream.write(e),r.outputStreamCursor+=e.length}function du(r,e,t){var i=new Lr,s=new Hi,n=e.compressionLevel!==0?new cu.DeflateRaw({level:e.compressionLevel}):new lu,o=new Hi;t.pipe(i).pipe(s).pipe(n).pipe(o).pipe(r.outputStream,{end:!1}),o.on("end",function(){if(e.crc32=i.crc32,e.uncompressedSize==null)e.uncompressedSize=s.byteCount;else if(e.uncompressedSize!==s.byteCount)return r.emit("error",new Error("file data stream has unexpected number of bytes"));e.compressedSize=o.byteCount,r.outputStreamCursor+=e.compressedSize,Xe(r,e.getDataDescriptor()),e.state=D.FILE_DATA_DONE,Me(r)})}function ad(r){if(r.compress!=null&&r.compressionLevel!=null&&!!r.compress!=!!r.compressionLevel)throw new Error("conflicting settings for compress and compressionLevel");return r.compressionLevel!=null?r.compressionLevel:r.compress===!1?0:6}function Me(r){if(r.allDone||r.errored)return;if(r.ended&&r.calculatedTotalSizeCallback!=null){var e=ud(r);e!=null&&(r.calculatedTotalSizeCallback(e),r.calculatedTotalSizeCallback=null)}var t=i();function i(){for(var n=0;n<r.entries.length;n++){var o=r.entries[n];if(o.state<D.FILE_DATA_DONE)return o}return null}if(t!=null){if(t.state<D.READY_TO_PUMP_FILE_DATA||t.state===D.FILE_DATA_IN_PROGRESS)return;t.relativeOffsetOfLocalHeader=r.outputStreamCursor;var s=t.getLocalFileHeader();Xe(r,s),t.doFileDataPump()}else r.ended&&(r.offsetOfStartOfCentralDirectory=r.outputStreamCursor,r.entries.forEach(function(n){var o=n.getCentralDirectoryRecord();Xe(r,o)}),Xe(r,hd(r)),r.outputStream.end(),r.allDone=!0)}function ud(r){for(var e=0,t=0,i=0;i<r.entries.length;i++){var s=r.entries[i];if(s.compressionLevel!==0)return-1;if(s.state>=D.READY_TO_PUMP_FILE_DATA){if(s.uncompressedSize==null)return-1}else if(s.uncompressedSize==null)return null;s.relativeOffsetOfLocalHeader=e;var n=s.useZip64Format();e+=pu+s.utf8FileName.length,e+=s.uncompressedSize,s.crcAndFileSizeKnown||(n?e+=yu:e+=Eu),t+=Su+s.utf8FileName.length+s.fileComment.length,s.forceDosTimestamp||(t+=Cr),n&&(t+=Or)}var o=0;return(r.forceZip64Eocd||r.entries.length>=65535||t>=65535||e>=4294967295)&&(o+=Gi+xr),o+=ji+r.comment.length,e+t+o}function qi(r){if(r.ended)throw new Error("cannot add entries after calling end()");return!!r.errored}var Gi=56,xr=20,ji=22;function hd(r,e){var t=!1,i=r.entries.length;(r.forceZip64Eocd||r.entries.length>=65535)&&(i=65535,t=!0);var s=r.outputStreamCursor-r.offsetOfStartOfCentralDirectory,n=s;(r.forceZip64Eocd||s>=4294967295)&&(n=4294967295,t=!0);var o=r.offsetOfStartOfCentralDirectory;if((r.forceZip64Eocd||r.offsetOfStartOfCentralDirectory>=4294967295)&&(o=4294967295,t=!0),e)return t?Gi+xr+ji:ji;var u=Z(ji+r.comment.length);if(u.writeUInt32LE(101010256,0),u.writeUInt16LE(0,4),u.writeUInt16LE(0,6),u.writeUInt16LE(i,8),u.writeUInt16LE(i,10),u.writeUInt32LE(n,12),u.writeUInt32LE(o,16),u.writeUInt16LE(r.comment.length,20),r.comment.copy(u,22),!t)return u;var a=Z(Gi);a.writeUInt32LE(101075792,0),pe(a,Gi-12,4),a.writeUInt16LE(_u,12),a.writeUInt16LE(gu,14),a.writeUInt32LE(0,16),a.writeUInt32LE(0,20),pe(a,r.entries.length,24),pe(a,r.entries.length,32),pe(a,s,40),pe(a,r.offsetOfStartOfCentralDirectory,48);var h=Z(xr);return h.writeUInt32LE(117853008,0),h.writeUInt32LE(0,4),pe(h,r.outputStreamCursor,8),h.writeUInt32LE(1,16),Buffer.concat([a,h,u])}function Zi(r,e){if(r==="")throw new Error("empty metadataPath");if(r=r.replace(/\\/g,"/"),/^[a-zA-Z]:/.test(r)||/^\//.test(r))throw new Error("absolute path: "+r);if(r.split("/").indexOf("..")!==-1)throw new Error("invalid relative path: "+r);var t=/\/$/.test(r);if(e)t||(r+="/");else if(t)throw new Error("file path cannot end with '/': "+r);return r}var Yt=Z(0);function D(r,e,t){if(this.utf8FileName=Pe(r),this.utf8FileName.length>65535)throw new Error("utf8 file name too long. "+utf8FileName.length+" > 65535");if(this.isDirectory=e,this.state=D.WAITING_FOR_METADATA,this.setLastModDate(t.mtime!=null?t.mtime:new Date),this.forceDosTimestamp=!!t.forceDosTimestamp,t.mode!=null?this.setFileAttributesMode(t.mode):this.setFileAttributesMode(e?16893:33204),e?(this.crcAndFileSizeKnown=!0,this.crc32=0,this.uncompressedSize=0,this.compressedSize=0):(this.crcAndFileSizeKnown=!1,this.crc32=null,this.uncompressedSize=null,this.compressedSize=null,t.size!=null&&(this.uncompressedSize=t.size)),e?this.compressionLevel=0:this.compressionLevel=ad(t),this.forceZip64Format=!!t.forceZip64Format,t.fileComment){if(typeof t.fileComment=="string"?this.fileComment=Pe(t.fileComment,"utf-8"):this.fileComment=t.fileComment,this.fileComment.length>65535)throw new Error("fileComment is too large")}else this.fileComment=Yt}D.WAITING_FOR_METADATA=0;D.READY_TO_PUMP_FILE_DATA=1;D.FILE_DATA_IN_PROGRESS=2;D.FILE_DATA_DONE=3;D.prototype.setLastModDate=function(r){this.mtime=r;var e=xu(r);this.lastModFileTime=e.time,this.lastModFileDate=e.date};D.prototype.setFileAttributesMode=function(r){if((r&65535)!==r)throw new Error("invalid mode. expected: 0 <= "+r+" <= 65535");this.externalFileAttributes=r<<16>>>0};D.prototype.setFileDataPumpFunction=function(r){this.doFileDataPump=r,this.state=D.READY_TO_PUMP_FILE_DATA};D.prototype.useZip64Format=function(){return this.forceZip64Format||this.uncompressedSize!=null&&this.uncompressedSize>4294967294||this.compressedSize!=null&&this.compressedSize>4294967294||this.relativeOffsetOfLocalHeader!=null&&this.relativeOffsetOfLocalHeader>4294967294};var pu=30,mu=20,gu=45,_u=831,bu=2048,wu=8;D.prototype.getLocalFileHeader=function(){var r=0,e=0,t=0;this.crcAndFileSizeKnown&&(r=this.crc32,e=this.compressedSize,t=this.uncompressedSize);var i=Z(pu),s=bu;return this.crcAndFileSizeKnown||(s|=wu),i.writeUInt32LE(67324752,0),i.writeUInt16LE(mu,4),i.writeUInt16LE(s,6),i.writeUInt16LE(this.getCompressionMethod(),8),i.writeUInt16LE(this.lastModFileTime,10),i.writeUInt16LE(this.lastModFileDate,12),i.writeUInt32LE(r,14),i.writeUInt32LE(e,18),i.writeUInt32LE(t,22),i.writeUInt16LE(this.utf8FileName.length,26),i.writeUInt16LE(0,28),Buffer.concat([i,this.utf8FileName])};var Eu=16,yu=24;D.prototype.getDataDescriptor=function(){if(this.crcAndFileSizeKnown)return Yt;if(this.useZip64Format()){var r=Z(yu);return r.writeUInt32LE(134695760,0),r.writeUInt32LE(this.crc32,4),pe(r,this.compressedSize,8),pe(r,this.uncompressedSize,16),r}else{var r=Z(Eu);return r.writeUInt32LE(134695760,0),r.writeUInt32LE(this.crc32,4),r.writeUInt32LE(this.compressedSize,8),r.writeUInt32LE(this.uncompressedSize,12),r}};var Su=46,Cr=9,Or=28;D.prototype.getCentralDirectoryRecord=function(){var r=Z(Su),e=bu;this.crcAndFileSizeKnown||(e|=wu);var t=Yt;if(!this.forceDosTimestamp){t=Z(Cr),t.writeUInt16LE(21589,0),t.writeUInt16LE(Cr-4,2);var i=1,s=2;t.writeUInt8(i|s,4);var n=Math.floor(this.mtime.getTime()/1e3);n<-2147483648&&(n=-2147483648),n>2147483647&&(n=2147483647),t.writeUInt32LE(n,5)}var o=this.compressedSize,u=this.uncompressedSize,a=this.relativeOffsetOfLocalHeader,h=mu,l=Yt;return this.useZip64Format()&&(o=4294967295,u=4294967295,a=4294967295,h=gu,l=Z(Or),l.writeUInt16LE(1,0),l.writeUInt16LE(Or-4,2),pe(l,this.uncompressedSize,4),pe(l,this.compressedSize,12),pe(l,this.relativeOffsetOfLocalHeader,20)),r.writeUInt32LE(33639248,0),r.writeUInt16LE(_u,4),r.writeUInt16LE(h,6),r.writeUInt16LE(e,8),r.writeUInt16LE(this.getCompressionMethod(),10),r.writeUInt16LE(this.lastModFileTime,12),r.writeUInt16LE(this.lastModFileDate,14),r.writeUInt32LE(this.crc32,16),r.writeUInt32LE(o,20),r.writeUInt32LE(u,24),r.writeUInt16LE(this.utf8FileName.length,28),r.writeUInt16LE(t.length+l.length,30),r.writeUInt16LE(this.fileComment.length,32),r.writeUInt16LE(0,34),r.writeUInt16LE(0,36),r.writeUInt32LE(this.externalFileAttributes,38),r.writeUInt32LE(a,42),Buffer.concat([r,this.utf8FileName,t,l,this.fileComment])};D.prototype.getCompressionMethod=function(){var r=0,e=8;return this.compressionLevel===0?r:e};var uu=new Date(1980,0,1),hu=new Date(2107,11,31,23,59,58);function xu(r){r<uu?r=uu:r>hu&&(r=hu);var e=0;e|=r.getDate()&31,e|=(r.getMonth()+1&15)<<5,e|=(r.getFullYear()-1980&127)<<9;var t=0;return t|=Math.floor(r.getSeconds()/2),t|=(r.getMinutes()&63)<<5,t|=(r.getHours()&31)<<11,{date:e,time:t}}function pe(r,e,t){var i=Math.floor(e/4294967296),s=e%4294967296;r.writeUInt32LE(s,t),r.writeUInt32LE(i,t+4)}Tr.inherits(Hi,Vi);function Hi(r){Vi.call(this,r),this.byteCount=0}Hi.prototype._transform=function(r,e,t){this.byteCount+=r.length,t(null,r)};Tr.inherits(Lr,Vi);function Lr(r){Vi.call(this,r),this.crc32=0}Lr.prototype._transform=function(r,e,t){this.crc32=fu.unsigned(r,this.crc32),t(null,r)};var vr="\0\u263A\u263B\u2665\u2666\u2663\u2660\u2022\u25D8\u25CB\u25D9\u2642\u2640\u266A\u266B\u263C\u25BA\u25C4\u2195\u203C\xB6\xA7\u25AC\u21A8\u2191\u2193\u2192\u2190\u221F\u2194\u25B2\u25BC !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u2302\xC7\xFC\xE9\xE2\xE4\xE0\xE5\xE7\xEA\xEB\xE8\xEF\xEE\xEC\xC4\xC5\xC9\xE6\xC6\xF4\xF6\xF2\xFB\xF9\xFF\xD6\xDC\xA2\xA3\xA5\u20A7\u0192\xE1\xED\xF3\xFA\xF1\xD1\xAA\xBA\xBF\u2310\xAC\xBD\xBC\xA1\xAB\xBB\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255D\u255C\u255B\u2510\u2514\u2534\u252C\u251C\u2500\u253C\u255E\u255F\u255A\u2554\u2569\u2566\u2560\u2550\u256C\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256B\u256A\u2518\u250C\u2588\u2584\u258C\u2590\u2580\u03B1\xDF\u0393\u03C0\u03A3\u03C3\xB5\u03C4\u03A6\u0398\u03A9\u03B4\u221E\u03C6\u03B5\u2229\u2261\xB1\u2265\u2264\u2320\u2321\xF7\u2248\xB0\u2219\xB7\u221A\u207F\xB2\u25A0\xA0";if(vr.length!==256)throw new Error("assertion failure");var zi=null;function ld(r){if(/^[\x20-\x7e]*$/.test(r))return Pe(r,"utf-8");if(zi==null){zi={};for(var e=0;e<vr.length;e++)zi[vr[e]]=e}for(var t=Z(r.length),e=0;e<r.length;e++){var i=zi[r[e]];if(i==null)throw new Error("character not encodable in CP437: "+JSON.stringify(r[e]));t[e]=i}return t}function Z(r){Z=e;try{return Z(r)}catch{return Z=t,Z(r)}function e(i){return Buffer.allocUnsafe(i)}function t(i){return new Buffer(i)}}function Pe(r,e){Pe=t;try{return Pe(r,e)}catch{return Pe=i,Pe(r,e)}function t(s,n){return Buffer.from(s,n)}function i(s,n){return new Buffer(s,n)}}function Zt(r,e){Zt=t;try{return Zt(r,e)}catch{return Zt=i,Zt(r,e)}function t(s,n){return s.includes(n)}function i(s,n){for(var o=0;o<=s.length-n.length;o++)for(var u=0;;u++){if(u===n.length)return!0;if(s[o+u]!==n[u])break}return!1}}});var Iu=v((Um,Au)=>{var oe=require("fs"),cd=require("util"),bt=require("path"),Pr=require("events"),Ou=require("zlib"),Lu=require("stream"),b={LOCHDR:30,LOCSIG:67324752,LOCVER:4,LOCFLG:6,LOCHOW:8,LOCTIM:10,LOCCRC:14,LOCSIZ:18,LOCLEN:22,LOCNAM:26,LOCEXT:28,EXTSIG:134695760,EXTHDR:16,EXTCRC:4,EXTSIZ:8,EXTLEN:12,CENHDR:46,CENSIG:33639248,CENVEM:4,CENVER:6,CENFLG:8,CENHOW:10,CENTIM:12,CENCRC:16,CENSIZ:20,CENLEN:24,CENNAM:28,CENEXT:30,CENCOM:32,CENDSK:34,CENATT:36,CENATX:38,CENOFF:42,ENDHDR:22,ENDSIG:101010256,ENDSIGFIRST:80,ENDSUB:8,ENDTOT:10,ENDSIZ:12,ENDOFF:16,ENDCOM:20,MAXFILECOMMENT:65535,ENDL64HDR:20,ENDL64SIG:117853008,ENDL64SIGFIRST:80,ENDL64OFS:8,END64HDR:56,END64SIG:101075792,END64SIGFIRST:80,END64SUB:24,END64TOT:32,END64SIZ:40,END64OFF:48,STORED:0,SHRUNK:1,REDUCED1:2,REDUCED2:3,REDUCED3:4,REDUCED4:5,IMPLODED:6,DEFLATED:8,ENHANCED_DEFLATED:9,PKWARE:10,BZIP2:12,LZMA:14,IBM_TERSE:18,IBM_LZ77:19,FLG_ENC:0,FLG_COMP1:1,FLG_COMP2:2,FLG_DESC:4,FLG_ENH:8,FLG_STR:16,FLG_LNG:1024,FLG_MSK:4096,FLG_ENTRY_ENC:1,EF_ID:0,EF_SIZE:2,ID_ZIP64:1,ID_AVINFO:7,ID_PFS:8,ID_OS2:9,ID_NTFS:10,ID_OPENVMS:12,ID_UNIX:13,ID_FORK:14,ID_PATCH:15,ID_X509_PKCS7:20,ID_X509_CERTID_F:21,ID_X509_CERTID_C:22,ID_STRONGENC:23,ID_RECORD_MGT:24,ID_X509_PKCS7_RL:25,ID_IBM1:101,ID_IBM2:102,ID_POSZIP:18064,EF_ZIP64_OR_32:4294967295,EF_ZIP64_OR_16:65535},ze=function(r){let e,t,i,s,n,o,a=this,h=r.storeEntries!==!1?{}:null,l=r.file,c=r.nameEncoding?new TextDecoder(r.nameEncoding):null;d();function d(){r.fd?(e=r.fd,p()):oe.open(l,"r",(g,S)=>{if(g)return a.emit("error",g);e=S,p()})}function p(){oe.fstat(e,(g,S)=>{if(g)return a.emit("error",g);t=S.size,i=r.chunkSize||Math.round(t/1e3),i=Math.max(Math.min(i,Math.min(128*1024,t)),Math.min(1024,t)),f()})}function m(g,S){if(g||!S)return a.emit("error",g||new Error("Archive read error"));let O=s.lastPos,x=O-s.win.position,A=s.win.buffer,T=s.minPos;for(;--O>=T&&--x>=0;)if(A.length-x>=4&&A[x]===s.firstByte&&A.readUInt32LE(x)===s.sig){s.lastBufferPosition=x,s.lastBytesRead=S,s.complete();return}if(O===T)return a.emit("error",new Error("Bad archive"));if(s.lastPos=O+1,s.chunkSize*=2,O<=T)return a.emit("error",new Error("Bad archive"));let k=Math.min(s.chunkSize,O-T);s.win.expandLeft(k,m)}function f(){let g=Math.min(b.ENDHDR+b.MAXFILECOMMENT,t);s={win:new Yi(e),totalReadLength:g,minPos:t-g,lastPos:t,chunkSize:Math.min(1024,i),firstByte:b.ENDSIGFIRST,sig:b.ENDSIG,complete:w},s.win.read(t-s.chunkSize,s.chunkSize,m)}function w(){let g=s.win.buffer,S=s.lastBufferPosition;try{n=new Ir,n.read(g.slice(S,S+b.ENDHDR)),n.headerOffset=s.win.position+S,n.commentLength?a.comment=g.slice(S+b.ENDHDR,S+b.ENDHDR+n.commentLength).toString():a.comment=null,a.entriesCount=n.volumeEntries,a.centralDirectory=n,n.volumeEntries===b.EF_ZIP64_OR_16&&n.totalEntries===b.EF_ZIP64_OR_16||n.size===b.EF_ZIP64_OR_32||n.offset===b.EF_ZIP64_OR_32?_():(s={},E())}catch(O){a.emit("error",O)}}function _(){let g=b.ENDL64HDR;s.lastBufferPosition>g?(s.lastBufferPosition-=g,C()):(s={win:s.win,totalReadLength:g,minPos:s.win.position-g,lastPos:s.win.position,chunkSize:s.chunkSize,firstByte:b.ENDL64SIGFIRST,sig:b.ENDL64SIG,complete:C},s.win.read(s.lastPos-s.chunkSize,s.chunkSize,m))}function C(){let g=s.win.buffer,S=new Dr;S.read(g.slice(s.lastBufferPosition,s.lastBufferPosition+b.ENDL64HDR));let O=t-S.headerOffset;s={win:s.win,totalReadLength:O,minPos:S.headerOffset,lastPos:s.lastPos,chunkSize:s.chunkSize,firstByte:b.END64SIGFIRST,sig:b.END64SIG,complete:y},s.win.read(t-s.chunkSize,s.chunkSize,m)}function y(){let g=s.win.buffer,S=new Nr;S.read(g.slice(s.lastBufferPosition,s.lastBufferPosition+b.END64HDR)),a.centralDirectory.volumeEntries=S.volumeEntries,a.centralDirectory.totalEntries=S.totalEntries,a.centralDirectory.size=S.size,a.centralDirectory.offset=S.offset,a.entriesCount=S.volumeEntries,s={},E()}function E(){s={win:new Yi(e),pos:n.offset,chunkSize:i,entriesLeft:n.volumeEntries},s.win.read(s.pos,Math.min(i,t-s.pos),L)}function L(g,S){if(g||!S)return a.emit("error",g||new Error("Entries read error"));let O=s.pos-s.win.position,x=s.entry,A=s.win.buffer,T=A.length;try{for(;s.entriesLeft>0;){x||(x=new Rr,x.readHeader(A,O),x.headerOffset=s.win.position+O,s.entry=x,s.pos+=b.CENHDR,O+=b.CENHDR);let k=x.fnameLen+x.extraLen+x.comLen,M=k+(s.entriesLeft>1?b.CENHDR:0);if(T-O<M){s.win.moveRight(i,L,O),s.move=!0;return}x.read(A,O,c),r.skipEntryNameValidation||x.validateName(),h&&(h[x.name]=x),a.emit("entry",x),s.entry=x=null,s.entriesLeft--,s.pos+=k,O+=k}a.emit("ready")}catch(k){a.emit("error",k)}}function U(){if(!h)throw new Error("storeEntries disabled")}Object.defineProperty(this,"ready",{get(){return!1}}),this.entry=function(g){return U(),h[g]},this.entries=function(){return U(),h},this.stream=function(g,S){return this.openEntry(g,(O,x)=>{if(O)return S(O);let A=K(x),T=new kr(e,A,x.compressedSize);if(x.method!==b.STORED)if(x.method===b.DEFLATED)T=T.pipe(Ou.createInflateRaw());else return S(new Error("Unknown compression method: "+x.method));me(x)&&(T=T.pipe(new Fr(T,x.crc,x.size))),S(null,T)},!1)},this.entryDataSync=function(g){let S=null;if(this.openEntry(g,(x,A)=>{S=x,g=A},!0),S)throw S;let O=Buffer.alloc(g.compressedSize);if(new We(e,O,0,g.compressedSize,K(g),x=>{S=x}).read(!0),S)throw S;if(g.method!==b.STORED)if(g.method===b.DEFLATED||g.method===b.ENHANCED_DEFLATED)O=Ou.inflateRawSync(O);else throw new Error("Unknown compression method: "+g.method);if(O.length!==g.size)throw new Error("Invalid size");return me(g)&&new Ki(g.crc,g.size).data(O),O},this.openEntry=function(g,S,O){if(typeof g=="string"&&(U(),g=h[g],!g))return S(new Error("Entry not found"));if(!g.isFile)return S(new Error("Entry is not file"));if(!e)return S(new Error("Archive closed"));let x=Buffer.alloc(b.LOCHDR);new We(e,x,0,x.length,g.offset,A=>{if(A)return S(A);let T;try{g.readDataHeader(x),g.encrypted&&(T=new Error("Entry encrypted"))}catch(k){T=k}S(T,g)}).read(O)};function K(g){return g.offset+b.LOCHDR+g.fnameLen+g.extraLen}function me(g){return(g.flags&8)!==8}function Y(g,S,O){a.stream(g,(x,A)=>{if(x)O(x);else{let T,k;A.on("error",M=>{k=M,T&&(A.unpipe(T),T.close(()=>{O(M)}))}),oe.open(S,"w",(M,ue)=>{if(M)return O(M);if(k){oe.close(e,()=>{O(k)});return}T=oe.createWriteStream(S,{fd:ue}),T.on("finish",()=>{a.emit("extract",g,S),k||O()}),A.pipe(T)})}})}function Le(g,S,O){if(!S.length)return O();let x=S.shift();x=bt.join(g,bt.join(...x)),oe.mkdir(x,{recursive:!0},A=>{if(A&&A.code!=="EEXIST")return O(A);Le(g,S,O)})}function Qi(g,S,O,x,A){if(!O.length)return x(null,A);let T=O.shift(),k=bt.join(g,T.name.replace(S,""));Y(T,k,M=>{if(M)return x(M,A);Qi(g,S,O,x,A+1)})}this.extract=function(g,S,O){let x=g||"";if(typeof g=="string"&&(g=this.entry(g),g?x=g.name:x.length&&x[x.length-1]!=="/"&&(x+="/")),!g||g.isDirectory){let A=[],T=[],k={};for(let M in h)if(Object.prototype.hasOwnProperty.call(h,M)&&M.lastIndexOf(x,0)===0){let ue=M.replace(x,""),Ur=h[M];if(Ur.isFile&&(A.push(Ur),ue=bt.dirname(ue)),ue&&!k[ue]&&ue!=="."){k[ue]=!0;let Ae=ue.split("/").filter(wt=>wt);for(Ae.length&&T.push(Ae);Ae.length>1;){Ae=Ae.slice(0,Ae.length-1);let wt=Ae.join("/");if(k[wt]||wt===".")break;k[wt]=!0,T.push(Ae)}}}T.sort((M,ue)=>M.length-ue.length),T.length?Le(S,T,M=>{M?O(M):Qi(S,x,A,O,0)}):Qi(S,x,A,O,0)}else oe.stat(S,(A,T)=>{T&&T.isDirectory()?Y(g,bt.join(S,bt.basename(g.name)),O):Y(g,S,O)})},this.close=function(g){o||!e?(o=!0,g&&g()):(o=!0,oe.close(e,S=>{e=null,g&&g(S)}))};let Wu=Pr.EventEmitter.prototype.emit;this.emit=function(...g){if(!o)return Wu.call(this,...g)}};ze.setFs=function(r){oe=r};ze.debugLog=(...r)=>{ze.debug&&console.log(...r)};cd.inherits(ze,Pr.EventEmitter);var Be=Symbol("zip");ze.async=class extends Pr.EventEmitter{constructor(e){super();let t=new ze(e);t.on("entry",i=>this.emit("entry",i)),t.on("extract",(i,s)=>this.emit("extract",i,s)),this[Be]=new Promise((i,s)=>{t.on("ready",()=>{t.removeListener("error",s),i(t)}),t.on("error",s)})}get entriesCount(){return this[Be].then(e=>e.entriesCount)}get comment(){return this[Be].then(e=>e.comment)}async entry(e){return(await this[Be]).entry(e)}async entries(){return(await this[Be]).entries()}async stream(e){let t=await this[Be];return new Promise((i,s)=>{t.stream(e,(n,o)=>{n?s(n):i(o)})})}async entryData(e){let t=await this.stream(e);return new Promise((i,s)=>{let n=[];t.on("data",o=>n.push(o)),t.on("end",()=>{i(Buffer.concat(n))}),t.on("error",o=>{t.removeAllListeners("end"),s(o)})})}async extract(e,t){let i=await this[Be];return new Promise((s,n)=>{i.extract(e,t,(o,u)=>{o?n(o):s(u)})})}async close(){let e=await this[Be];return new Promise((t,i)=>{e.close(s=>{s?i(s):t()})})}};var Ir=class{read(e){if(e.length!==b.ENDHDR||e.readUInt32LE(0)!==b.ENDSIG)throw new Error("Invalid central directory");this.volumeEntries=e.readUInt16LE(b.ENDSUB),this.totalEntries=e.readUInt16LE(b.ENDTOT),this.size=e.readUInt32LE(b.ENDSIZ),this.offset=e.readUInt32LE(b.ENDOFF),this.commentLength=e.readUInt16LE(b.ENDCOM)}},Dr=class{read(e){if(e.length!==b.ENDL64HDR||e.readUInt32LE(0)!==b.ENDL64SIG)throw new Error("Invalid zip64 central directory locator");this.headerOffset=$e(e,b.ENDSUB)}},Nr=class{read(e){if(e.length!==b.END64HDR||e.readUInt32LE(0)!==b.END64SIG)throw new Error("Invalid central directory");this.volumeEntries=$e(e,b.END64SUB),this.totalEntries=$e(e,b.END64TOT),this.size=$e(e,b.END64SIZ),this.offset=$e(e,b.END64OFF)}},Rr=class{readHeader(e,t){if(e.length<t+b.CENHDR||e.readUInt32LE(t)!==b.CENSIG)throw new Error("Invalid entry header");this.verMade=e.readUInt16LE(t+b.CENVEM),this.version=e.readUInt16LE(t+b.CENVER),this.flags=e.readUInt16LE(t+b.CENFLG),this.method=e.readUInt16LE(t+b.CENHOW);let i=e.readUInt16LE(t+b.CENTIM),s=e.readUInt16LE(t+b.CENTIM+2);this.time=vu(i,s),this.crc=e.readUInt32LE(t+b.CENCRC),this.compressedSize=e.readUInt32LE(t+b.CENSIZ),this.size=e.readUInt32LE(t+b.CENLEN),this.fnameLen=e.readUInt16LE(t+b.CENNAM),this.extraLen=e.readUInt16LE(t+b.CENEXT),this.comLen=e.readUInt16LE(t+b.CENCOM),this.diskStart=e.readUInt16LE(t+b.CENDSK),this.inattr=e.readUInt16LE(t+b.CENATT),this.attr=e.readUInt32LE(t+b.CENATX),this.offset=e.readUInt32LE(t+b.CENOFF)}readDataHeader(e){if(e.readUInt32LE(0)!==b.LOCSIG)throw new Error("Invalid local header");this.version=e.readUInt16LE(b.LOCVER),this.flags=e.readUInt16LE(b.LOCFLG),this.method=e.readUInt16LE(b.LOCHOW);let t=e.readUInt16LE(b.LOCTIM),i=e.readUInt16LE(b.LOCTIM+2);this.time=vu(t,i),this.crc=e.readUInt32LE(b.LOCCRC)||this.crc;let s=e.readUInt32LE(b.LOCSIZ);s&&s!==b.EF_ZIP64_OR_32&&(this.compressedSize=s);let n=e.readUInt32LE(b.LOCLEN);n&&n!==b.EF_ZIP64_OR_32&&(this.size=n),this.fnameLen=e.readUInt16LE(b.LOCNAM),this.extraLen=e.readUInt16LE(b.LOCEXT)}read(e,t,i){let s=e.slice(t,t+=this.fnameLen);this.name=i?i.decode(new Uint8Array(s)):s.toString("utf8");let n=e[t-1];this.isDirectory=n===47||n===92,this.extraLen&&(this.readExtra(e,t),t+=this.extraLen),this.comment=this.comLen?e.slice(t,t+this.comLen).toString():null}validateName(){if(/\\|^\w+:|^\/|(^|\/)\.\.(\/|$)/.test(this.name))throw new Error("Malicious entry: "+this.name)}readExtra(e,t){let i,s,n=t+this.extraLen;for(;t<n;)i=e.readUInt16LE(t),t+=2,s=e.readUInt16LE(t),t+=2,b.ID_ZIP64===i&&this.parseZip64Extra(e,t,s),t+=s}parseZip64Extra(e,t,i){i>=8&&this.size===b.EF_ZIP64_OR_32&&(this.size=$e(e,t),t+=8,i-=8),i>=8&&this.compressedSize===b.EF_ZIP64_OR_32&&(this.compressedSize=$e(e,t),t+=8,i-=8),i>=8&&this.offset===b.EF_ZIP64_OR_32&&(this.offset=$e(e,t),t+=8,i-=8),i>=4&&this.diskStart===b.EF_ZIP64_OR_16&&(this.diskStart=e.readUInt32LE(t))}get encrypted(){return(this.flags&b.FLG_ENTRY_ENC)===b.FLG_ENTRY_ENC}get isFile(){return!this.isDirectory}},We=class{constructor(e,t,i,s,n,o){this.fd=e,this.buffer=t,this.offset=i,this.length=s,this.position=n,this.callback=o,this.bytesRead=0,this.waiting=!1}read(e){ze.debugLog("read",this.position,this.bytesRead,this.length,this.offset),this.waiting=!0;let t;if(e){let i=0;try{i=oe.readSync(this.fd,this.buffer,this.offset+this.bytesRead,this.length-this.bytesRead,this.position+this.bytesRead)}catch(s){t=s}this.readCallback(e,t,t?i:null)}else oe.read(this.fd,this.buffer,this.offset+this.bytesRead,this.length-this.bytesRead,this.position+this.bytesRead,this.readCallback.bind(this,e))}readCallback(e,t,i){if(typeof i=="number"&&(this.bytesRead+=i),t||!i||this.bytesRead===this.length)return this.waiting=!1,this.callback(t,this.bytesRead);this.read(e)}},Yi=class{constructor(e){this.position=0,this.buffer=Buffer.alloc(0),this.fd=e,this.fsOp=null}checkOp(){if(this.fsOp&&this.fsOp.waiting)throw new Error("Operation in progress")}read(e,t,i){this.checkOp(),this.buffer.length<t&&(this.buffer=Buffer.alloc(t)),this.position=e,this.fsOp=new We(this.fd,this.buffer,0,t,this.position,i).read()}expandLeft(e,t){this.checkOp(),this.buffer=Buffer.concat([Buffer.alloc(e),this.buffer]),this.position-=e,this.position<0&&(this.position=0),this.fsOp=new We(this.fd,this.buffer,0,e,this.position,t).read()}expandRight(e,t){this.checkOp();let i=this.buffer.length;this.buffer=Buffer.concat([this.buffer,Buffer.alloc(e)]),this.fsOp=new We(this.fd,this.buffer,i,e,this.position+i,t).read()}moveRight(e,t,i){this.checkOp(),i?this.buffer.copy(this.buffer,0,i):i=0,this.position+=i,this.fsOp=new We(this.fd,this.buffer,this.buffer.length-i,i,this.position+this.buffer.length-i,t).read()}},kr=class extends Lu.Readable{constructor(e,t,i){super(),this.fd=e,this.offset=t,this.length=i,this.pos=0,this.readCallback=this.readCallback.bind(this)}_read(e){let t=Buffer.alloc(Math.min(e,this.length-this.pos));t.length?oe.read(this.fd,t,0,t.length,this.offset+this.pos,this.readCallback):this.push(null)}readCallback(e,t,i){this.pos+=t,e?(this.emit("error",e),this.push(null)):t?(t!==i.length&&(i=i.slice(0,t)),this.push(i)):this.push(null)}},Fr=class extends Lu.Transform{constructor(e,t,i){super(),this.verify=new Ki(t,i),e.on("error",s=>{this.emit("error",s)})}_transform(e,t,i){let s;try{this.verify.data(e)}catch(n){s=n}i(s,e)}},Ki=class r{constructor(e,t){this.crc=e,this.size=t,this.state={crc:-1,size:0}}data(e){let t=r.getCrcTable(),i=this.state.crc,s=0,n=e.length;for(;--n>=0;)i=t[(i^e[s++])&255]^i>>>8;if(this.state.crc=i,this.state.size+=e.length,this.state.size>=this.size){let o=Buffer.alloc(4);if(o.writeInt32LE(~this.state.crc&4294967295,0),i=o.readUInt32LE(0),i!==this.crc)throw new Error("Invalid CRC");if(this.state.size!==this.size)throw new Error("Invalid size")}}static getCrcTable(){let e=r.crcTable;if(!e){r.crcTable=e=[];let t=Buffer.alloc(4);for(let i=0;i<256;i++){let s=i;for(let n=8;--n>=0;)(s&1)!==0?s=3988292384^s>>>1:s=s>>>1;s<0&&(t.writeInt32LE(s,0),s=t.readUInt32LE(0)),e[i]=s}}return e}};function vu(r,e){let t=Tu(r,16),i=Tu(e,16),s={h:parseInt(t.slice(0,5).join(""),2),m:parseInt(t.slice(5,11).join(""),2),s:parseInt(t.slice(11,16).join(""),2)*2,Y:parseInt(i.slice(0,7).join(""),2)+1980,M:parseInt(i.slice(7,11).join(""),2),D:parseInt(i.slice(11,16).join(""),2)},n=[s.Y,s.M,s.D].join("-")+" "+[s.h,s.m,s.s].join(":")+" GMT+0";return new Date(n).getTime()}function Tu(r,e){let t=(r>>>0).toString(2);for(;t.length<e;)t="0"+t;return t.split("")}function $e(r,e){return r.readUInt32LE(e+4)*4294967296+r.readUInt32LE(e)}Au.exports=ze});var gd={};Vu(gd,{StackUtils:()=>ku.default,StreamZip:()=>Bu.async,WebSocket:()=>xo,WebSocketServer:()=>Ls.default,ZipFile:()=>Uu.ZipFile,codeFrameColumns:()=>Fu.codeFrameColumns,findUpSync:()=>su,glob:()=>Ui,open:()=>Mu.default,program:()=>jo,sanitize:()=>Pu.default,supportsColor:()=>Ru});module.exports=qu(gd);var ku=F(Hr()),Fu=F(gn());var Ul=F(co(),1),Bl=F(_s(),1),Wl=F(Es(),1),So=F(fi(),1),Ls=F(yo(),1);var xo=So.default;var Pu=F(Io());var Go=F(zo(),1),{program:jo,createCommand:tp,createArgument:ip,createOption:sp,CommanderError:rp,InvalidArgumentError:np,InvalidOptionArgumentError:op,Command:ap,Argument:up,Option:hp,Help:lp}=Go.default;var Mu=F(ra());var Qs=(r,e,t)=>{let i=r instanceof RegExp?na(r,t):r,s=e instanceof RegExp?na(e,t):e,n=i!==null&&s!=null&&xc(i,s,t);return n&&{start:n[0],end:n[1],pre:t.slice(0,n[0]),body:t.slice(n[0]+i.length,n[1]),post:t.slice(n[1]+s.length)}},na=(r,e)=>{let t=e.match(r);return t?t[0]:null},xc=(r,e,t)=>{let i,s,n,o,u,a=t.indexOf(r),h=t.indexOf(e,a+1),l=a;if(a>=0&&h>0){if(r===e)return[a,h];for(i=[],n=t.length;l>=0&&!u;){if(l===a)i.push(l),a=t.indexOf(r,l+1);else if(i.length===1){let c=i.pop();c!==void 0&&(u=[c,h])}else s=i.pop(),s!==void 0&&s<n&&(n=s,o=h),h=t.indexOf(e,l+1);l=a<h&&a>=0?a:h}i.length&&o!==void 0&&(u=[n,o])}return u};var oa="\0SLASH"+Math.random()+"\0",aa="\0OPEN"+Math.random()+"\0",tr="\0CLOSE"+Math.random()+"\0",ua="\0COMMA"+Math.random()+"\0",ha="\0PERIOD"+Math.random()+"\0",Cc=new RegExp(oa,"g"),Oc=new RegExp(aa,"g"),vc=new RegExp(tr,"g"),Tc=new RegExp(ua,"g"),Lc=new RegExp(ha,"g"),Ac=/\\\\/g,Ic=/\\{/g,Dc=/\\}/g,Nc=/\\,/g,Rc=/\\./g;function er(r){return isNaN(r)?r.charCodeAt(0):parseInt(r,10)}function kc(r){return r.replace(Ac,oa).replace(Ic,aa).replace(Dc,tr).replace(Nc,ua).replace(Rc,ha)}function Fc(r){return r.replace(Cc,"\\").replace(Oc,"{").replace(vc,"}").replace(Tc,",").replace(Lc,".")}function la(r){if(!r)return[""];let e=[],t=Qs("{","}",r);if(!t)return r.split(",");let{pre:i,body:s,post:n}=t,o=i.split(",");o[o.length-1]+="{"+s+"}";let u=la(n);return n.length&&(o[o.length-1]+=u.shift(),o.push.apply(o,u)),e.push.apply(e,o),e}function ca(r){return r?(r.slice(0,2)==="{}"&&(r="\\{\\}"+r.slice(2)),Nt(kc(r),!0).map(Fc)):[]}function Pc(r){return"{"+r+"}"}function Mc(r){return/^-?0\d/.test(r)}function Uc(r,e){return r<=e}function Bc(r,e){return r>=e}function Nt(r,e){let t=[],i=Qs("{","}",r);if(!i)return[r];let s=i.pre,n=i.post.length?Nt(i.post,!1):[""];if(/\$$/.test(i.pre))for(let o=0;o<n.length;o++){let u=s+"{"+i.body+"}"+n[o];t.push(u)}else{let o=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),a=o||u,h=i.body.indexOf(",")>=0;if(!a&&!h)return i.post.match(/,(?!,).*\}/)?(r=i.pre+"{"+i.body+tr+i.post,Nt(r)):[r];let l;if(a)l=i.body.split(/\.\./);else if(l=la(i.body),l.length===1&&l[0]!==void 0&&(l=Nt(l[0],!1).map(Pc),l.length===1))return n.map(d=>i.pre+l[0]+d);let c;if(a&&l[0]!==void 0&&l[1]!==void 0){let d=er(l[0]),p=er(l[1]),m=Math.max(l[0].length,l[1].length),f=l.length===3&&l[2]!==void 0?Math.abs(er(l[2])):1,w=Uc;p<d&&(f*=-1,w=Bc);let C=l.some(Mc);c=[];for(let y=d;w(y,p);y+=f){let E;if(u)E=String.fromCharCode(y),E==="\\"&&(E="");else if(E=String(y),C){let L=m-E.length;if(L>0){let U=new Array(L+1).join("0");y<0?E="-"+U+E.slice(1):E=U+E}}c.push(E)}}else{c=[];for(let d=0;d<l.length;d++)c.push.apply(c,Nt(l[d],!1))}for(let d=0;d<c.length;d++)for(let p=0;p<n.length;p++){let m=s+c[d]+n[p];(!e||a||m)&&t.push(m)}}return t}var Rt=r=>{if(typeof r!="string")throw new TypeError("invalid pattern");if(r.length>65536)throw new TypeError("pattern is too long")};var Wc={"[: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]},kt=r=>r.replace(/[[\]\\-]/g,"\\$&"),$c=r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),fa=r=>r.join(""),da=(r,e)=>{let t=e;if(r.charAt(t)!=="[")throw new Error("not in a brace expression");let i=[],s=[],n=t+1,o=!1,u=!1,a=!1,h=!1,l=t,c="";e:for(;n<r.length;){let f=r.charAt(n);if((f==="!"||f==="^")&&n===t+1){h=!0,n++;continue}if(f==="]"&&o&&!a){l=n+1;break}if(o=!0,f==="\\"&&!a){a=!0,n++;continue}if(f==="["&&!a){for(let[w,[_,C,y]]of Object.entries(Wc))if(r.startsWith(w,n)){if(c)return["$.",!1,r.length-t,!0];n+=w.length,y?s.push(_):i.push(_),u=u||C;continue e}}if(a=!1,c){f>c?i.push(kt(c)+"-"+kt(f)):f===c&&i.push(kt(f)),c="",n++;continue}if(r.startsWith("-]",n+1)){i.push(kt(f+"-")),n+=2;continue}if(r.startsWith("-",n+1)){c=f,n+=2;continue}i.push(kt(f)),n++}if(l<n)return["",!1,0,!1];if(!i.length&&!s.length)return["$.",!1,r.length-t,!0];if(s.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!h){let f=i[0].length===2?i[0].slice(-1):i[0];return[$c(f),!1,l-t,!1]}let d="["+(h?"^":"")+fa(i)+"]",p="["+(h?"":"^")+fa(s)+"]";return[i.length&&s.length?"("+d+"|"+p+")":i.length?d:p,u,l-t,!0]};var le=(r,{windowsPathsNoEscape:e=!1}={})=>e?r.replace(/\[([^\/\\])\]/g,"$1"):r.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var zc=new Set(["!","?","+","*","@"]),pa=r=>zc.has(r),Gc="(?!(?:^|/)\\.\\.?(?:$|/))",yi="(?!\\.)",jc=new Set(["[","."]),Hc=new Set(["..","."]),Vc=new Set("().*{}+?[]^$\\!"),qc=r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ir="[^/]",ma=ir+"*?",ga=ir+"+?",ot=class r{type;#e;#t;#n=!1;#r=[];#o;#E;#_;#a=!1;#c;#u;#h=!1;constructor(e,t,i={}){this.type=e,e&&(this.#t=!0),this.#o=t,this.#e=this.#o?this.#o.#e:this,this.#c=this.#e===this?i:this.#e.#c,this.#_=this.#e===this?[]:this.#e.#_,e==="!"&&!this.#e.#a&&this.#_.push(this),this.#E=this.#o?this.#o.#r.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#r)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#u!==void 0?this.#u:this.type?this.#u=this.type+"("+this.#r.map(e=>String(e)).join("|")+")":this.#u=this.#r.map(e=>String(e)).join("")}#i(){if(this!==this.#e)throw new Error("should only call on root");if(this.#a)return this;this.toString(),this.#a=!0;let e;for(;e=this.#_.pop();){if(e.type!=="!")continue;let t=e,i=t.#o;for(;i;){for(let s=t.#E+1;!i.type&&s<i.#r.length;s++)for(let n of e.#r){if(typeof n=="string")throw new Error("string part in extglob AST??");n.copyIn(i.#r[s])}t=i,i=t.#o}}return this}push(...e){for(let t of e)if(t!==""){if(typeof t!="string"&&!(t instanceof r&&t.#o===this))throw new Error("invalid part: "+t);this.#r.push(t)}}toJSON(){var t;let e=this.type===null?this.#r.slice().map(i=>typeof i=="string"?i:i.toJSON()):[this.type,...this.#r.map(i=>i.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#a&&((t=this.#o)==null?void 0:t.type)==="!")&&e.push({}),e}isStart(){var t;if(this.#e===this)return!0;if(!((t=this.#o)!=null&&t.isStart()))return!1;if(this.#E===0)return!0;let e=this.#o;for(let i=0;i<this.#E;i++){let s=e.#r[i];if(!(s instanceof r&&s.type==="!"))return!1}return!0}isEnd(){var t,i,s;if(this.#e===this||((t=this.#o)==null?void 0:t.type)==="!")return!0;if(!((i=this.#o)!=null&&i.isEnd()))return!1;if(!this.type)return(s=this.#o)==null?void 0:s.isEnd();let e=this.#o?this.#o.#r.length:0;return this.#E===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let t=new r(this.type,e);for(let i of this.#r)t.copyIn(i);return t}static#f(e,t,i,s){let n=!1,o=!1,u=-1,a=!1;if(t.type===null){let p=i,m="";for(;p<e.length;){let f=e.charAt(p++);if(n||f==="\\"){n=!n,m+=f;continue}if(o){p===u+1?(f==="^"||f==="!")&&(a=!0):f==="]"&&!(p===u+2&&a)&&(o=!1),m+=f;continue}else if(f==="["){o=!0,u=p,a=!1,m+=f;continue}if(!s.noext&&pa(f)&&e.charAt(p)==="("){t.push(m),m="";let w=new r(f,t);p=r.#f(e,w,p,s),t.push(w);continue}m+=f}return t.push(m),p}let h=i+1,l=new r(null,t),c=[],d="";for(;h<e.length;){let p=e.charAt(h++);if(n||p==="\\"){n=!n,d+=p;continue}if(o){h===u+1?(p==="^"||p==="!")&&(a=!0):p==="]"&&!(h===u+2&&a)&&(o=!1),d+=p;continue}else if(p==="["){o=!0,u=h,a=!1,d+=p;continue}if(pa(p)&&e.charAt(h)==="("){l.push(d),d="";let m=new r(p,l);l.push(m),h=r.#f(e,m,h,s);continue}if(p==="|"){l.push(d),d="",c.push(l),l=new r(null,t);continue}if(p===")")return d===""&&t.#r.length===0&&(t.#h=!0),l.push(d),d="",t.push(...c,l),h;d+=p}return t.type=null,t.#t=void 0,t.#r=[e.substring(i-1)],h}static fromGlob(e,t={}){let i=new r(null,void 0,t);return r.#f(e,i,0,t),i}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,i,s,n]=this.toRegExpSource();if(!(s||this.#t||this.#c.nocase&&!this.#c.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return i;let u=(this.#c.nocase?"i":"")+(n?"u":"");return Object.assign(new RegExp(`^${t}$`,u),{_src:t,_glob:e})}get options(){return this.#c}toRegExpSource(e){var a;let t=e??!!this.#c.dot;if(this.#e===this&&this.#i(),!this.type){let h=this.isStart()&&this.isEnd(),l=this.#r.map(m=>{let[f,w,_,C]=typeof m=="string"?r.#p(m,this.#t,h):m.toRegExpSource(e);return this.#t=this.#t||_,this.#n=this.#n||C,f}).join(""),c="";if(this.isStart()&&typeof this.#r[0]=="string"&&!(this.#r.length===1&&Hc.has(this.#r[0]))){let f=jc,w=t&&f.has(l.charAt(0))||l.startsWith("\\.")&&f.has(l.charAt(2))||l.startsWith("\\.\\.")&&f.has(l.charAt(4)),_=!t&&!e&&f.has(l.charAt(0));c=w?Gc:_?yi:""}let d="";return this.isEnd()&&this.#e.#a&&((a=this.#o)==null?void 0:a.type)==="!"&&(d="(?:$|\\/)"),[c+l+d,le(l),this.#t=!!this.#t,this.#n]}let i=this.type==="*"||this.type==="+",s=this.type==="!"?"(?:(?!(?:":"(?:",n=this.#b(t);if(this.isStart()&&this.isEnd()&&!n&&this.type!=="!"){let h=this.toString();return this.#r=[h],this.type=null,this.#t=void 0,[h,le(this.toString()),!1,!1]}let o=!i||e||t||!yi?"":this.#b(!0);o===n&&(o=""),o&&(n=`(?:${n})(?:${o})*?`);let u="";if(this.type==="!"&&this.#h)u=(this.isStart()&&!t?yi:"")+ga;else{let h=this.type==="!"?"))"+(this.isStart()&&!t&&!e?yi:"")+ma+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;u=s+n+h}return[u,le(n),this.#t=!!this.#t,this.#n]}#b(e){return this.#r.map(t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");let[i,s,n,o]=t.toRegExpSource(e);return this.#n=this.#n||o,i}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#p(e,t,i=!1){let s=!1,n="",o=!1;for(let u=0;u<e.length;u++){let a=e.charAt(u);if(s){s=!1,n+=(Vc.has(a)?"\\":"")+a;continue}if(a==="\\"){u===e.length-1?n+="\\\\":s=!0;continue}if(a==="["){let[h,l,c,d]=da(e,u);if(c){n+=h,o=o||l,u+=c-1,t=t||d;continue}}if(a==="*"){i&&e==="*"?n+=ga:n+=ma,t=!0;continue}if(a==="?"){n+=ir,t=!0;continue}n+=qc(a)}return[n,le(e),!!t,o]}};var at=(r,{windowsPathsNoEscape:e=!1}={})=>e?r.replace(/[?*()[\]]/g,"[$&]"):r.replace(/[?*()[\]\\]/g,"\\$&");var V=(r,e,t={})=>(Rt(e),!t.nocomment&&e.charAt(0)==="#"?!1:new J(e,t).match(r)),Zc=/^\*+([^+@!?\*\[\(]*)$/,Yc=r=>e=>!e.startsWith(".")&&e.endsWith(r),Kc=r=>e=>e.endsWith(r),Xc=r=>(r=r.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(r)),Jc=r=>(r=r.toLowerCase(),e=>e.toLowerCase().endsWith(r)),Qc=/^\*+\.\*+$/,ef=r=>!r.startsWith(".")&&r.includes("."),tf=r=>r!=="."&&r!==".."&&r.includes("."),sf=/^\.\*+$/,rf=r=>r!=="."&&r!==".."&&r.startsWith("."),nf=/^\*+$/,of=r=>r.length!==0&&!r.startsWith("."),af=r=>r.length!==0&&r!=="."&&r!=="..",uf=/^\?+([^+@!?\*\[\(]*)?$/,hf=([r,e=""])=>{let t=wa([r]);return e?(e=e.toLowerCase(),i=>t(i)&&i.toLowerCase().endsWith(e)):t},lf=([r,e=""])=>{let t=Ea([r]);return e?(e=e.toLowerCase(),i=>t(i)&&i.toLowerCase().endsWith(e)):t},cf=([r,e=""])=>{let t=Ea([r]);return e?i=>t(i)&&i.endsWith(e):t},ff=([r,e=""])=>{let t=wa([r]);return e?i=>t(i)&&i.endsWith(e):t},wa=([r])=>{let e=r.length;return t=>t.length===e&&!t.startsWith(".")},Ea=([r])=>{let e=r.length;return t=>t.length===e&&t!=="."&&t!==".."},ya=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",_a={win32:{sep:"\\"},posix:{sep:"/"}},df=ya==="win32"?_a.win32.sep:_a.posix.sep;V.sep=df;var G=Symbol("globstar **");V.GLOBSTAR=G;var pf="[^/]",mf=pf+"*?",gf="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",_f="(?:(?!(?:\\/|^)\\.).)*?",bf=(r,e={})=>t=>V(t,r,e);V.filter=bf;var se=(r,e={})=>Object.assign({},r,e),wf=r=>{if(!r||typeof r!="object"||!Object.keys(r).length)return V;let e=V;return Object.assign((i,s,n={})=>e(i,s,se(r,n)),{Minimatch:class extends e.Minimatch{constructor(s,n={}){super(s,se(r,n))}static defaults(s){return e.defaults(se(r,s)).Minimatch}},AST:class extends e.AST{constructor(s,n,o={}){super(s,n,se(r,o))}static fromGlob(s,n={}){return e.AST.fromGlob(s,se(r,n))}},unescape:(i,s={})=>e.unescape(i,se(r,s)),escape:(i,s={})=>e.escape(i,se(r,s)),filter:(i,s={})=>e.filter(i,se(r,s)),defaults:i=>e.defaults(se(r,i)),makeRe:(i,s={})=>e.makeRe(i,se(r,s)),braceExpand:(i,s={})=>e.braceExpand(i,se(r,s)),match:(i,s,n={})=>e.match(i,s,se(r,n)),sep:e.sep,GLOBSTAR:G})};V.defaults=wf;var Sa=(r,e={})=>(Rt(r),e.nobrace||!/\{(?:(?!\{).)*\}/.test(r)?[r]:ca(r));V.braceExpand=Sa;var Ef=(r,e={})=>new J(r,e).makeRe();V.makeRe=Ef;var yf=(r,e,t={})=>{let i=new J(e,t);return r=r.filter(s=>i.match(s)),i.options.nonull&&!r.length&&r.push(e),r};V.match=yf;var ba=/[?*]|[+@!]\(.*?\)|\[|\]/,Sf=r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),J=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){Rt(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||ya,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.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 t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...n)=>console.error(...n)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(n=>this.slashSplit(n));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let s=this.globParts.map((n,o,u)=>{if(this.isWindows&&this.windowsNoMagicRoot){let a=n[0]===""&&n[1]===""&&(n[2]==="?"||!ba.test(n[2]))&&!ba.test(n[3]),h=/^[a-z]:/i.test(n[0]);if(a)return[...n.slice(0,4),...n.slice(4).map(l=>this.parse(l))];if(h)return[n[0],...n.slice(1).map(l=>this.parse(l))]}return n.map(a=>this.parse(a))});if(this.debug(this.pattern,s),this.set=s.filter(n=>n.indexOf(!1)===-1),this.isWindows)for(let n=0;n<this.set.length;n++){let o=this.set[n];o[0]===""&&o[1]===""&&this.globParts[n][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let i=0;i<e.length;i++)for(let s=0;s<e[i].length;s++)e[i][s]==="**"&&(e[i][s]="*");let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let i=-1;for(;(i=t.indexOf("**",i+1))!==-1;){let s=i;for(;t[s+1]==="**";)s++;s!==i&&t.splice(i,s-i)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((i,s)=>{let n=i[i.length-1];return s==="**"&&n==="**"?i:s===".."&&n&&n!==".."&&n!=="."&&n!=="**"?(i.pop(),i):(i.push(s),i)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let s=1;s<e.length-1;s++){let n=e[s];s===1&&n===""&&e[0]===""||(n==="."||n==="")&&(t=!0,e.splice(s,1),s--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(t=!0,e.pop())}let i=0;for(;(i=e.indexOf("..",i+1))!==-1;){let s=e[i-1];s&&s!=="."&&s!==".."&&s!=="**"&&(t=!0,e.splice(i-1,2),i-=2)}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let i of e){let s=-1;for(;(s=i.indexOf("**",s+1))!==-1;){let o=s;for(;i[o+1]==="**";)o++;o>s&&i.splice(s+1,o-s);let u=i[s+1],a=i[s+2],h=i[s+3];if(u!==".."||!a||a==="."||a===".."||!h||h==="."||h==="..")continue;t=!0,i.splice(s,1);let l=i.slice(0);l[s]="**",e.push(l),s--}if(!this.preserveMultipleSlashes){for(let o=1;o<i.length-1;o++){let u=i[o];o===1&&u===""&&i[0]===""||(u==="."||u==="")&&(t=!0,i.splice(o,1),o--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(t=!0,i.pop())}let n=0;for(;(n=i.indexOf("..",n+1))!==-1;){let o=i[n-1];if(o&&o!=="."&&o!==".."&&o!=="**"){t=!0;let a=n===1&&i[n+1]==="**"?["."]:[];i.splice(n-1,2,...a),i.length===0&&i.push(""),n-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let i=t+1;i<e.length;i++){let s=this.partsMatch(e[t],e[i],!this.preserveMultipleSlashes);if(s){e[t]=[],e[i]=s;break}}return e.filter(t=>t.length)}partsMatch(e,t,i=!1){let s=0,n=0,o=[],u="";for(;s<e.length&&n<t.length;)if(e[s]===t[n])o.push(u==="b"?t[n]:e[s]),s++,n++;else if(i&&e[s]==="**"&&t[n]===e[s+1])o.push(e[s]),s++;else if(i&&t[n]==="**"&&e[s]===t[n+1])o.push(t[n]),n++;else if(e[s]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(u==="b")return!1;u="a",o.push(e[s]),s++,n++}else if(t[n]==="*"&&e[s]&&(this.options.dot||!e[s].startsWith("."))&&e[s]!=="**"){if(u==="a")return!1;u="b",o.push(t[n]),s++,n++}else return!1;return e.length===t.length&&o}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,i=0;for(let s=0;s<e.length&&e.charAt(s)==="!";s++)t=!t,i++;i&&(this.pattern=e.slice(i)),this.negate=t}matchOne(e,t,i=!1){let s=this.options;if(this.isWindows){let f=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),w=!f&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),_=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),C=!_&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),y=w?3:f?0:void 0,E=C?3:_?0:void 0;if(typeof y=="number"&&typeof E=="number"){let[L,U]=[e[y],t[E]];L.toLowerCase()===U.toLowerCase()&&(t[E]=L,E>y?t=t.slice(E):y>E&&(e=e.slice(y)))}}let{optimizationLevel:n=1}=this.options;n>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var o=0,u=0,a=e.length,h=t.length;o<a&&u<h;o++,u++){this.debug("matchOne loop");var l=t[u],c=e[o];if(this.debug(t,l,c),l===!1)return!1;if(l===G){this.debug("GLOBSTAR",[t,l,c]);var d=o,p=u+1;if(p===h){for(this.debug("** at the end");o<a;o++)if(e[o]==="."||e[o]===".."||!s.dot&&e[o].charAt(0)===".")return!1;return!0}for(;d<a;){var m=e[d];if(this.debug(`
39
39
  globstar while`,e,d,t,p,m),this.matchOne(e.slice(d),t.slice(p),i))return this.debug("globstar found match!",d,a,m),!0;if(m==="."||m===".."||!s.dot&&m.charAt(0)==="."){this.debug("dot detected!",e,d,t,p);break}this.debug("globstar swallow a segment, and continue"),d++}return!!(i&&(this.debug(`
40
- >>> no match, partial?`,e,d,t,p),d===a))}let f;if(typeof l=="string"?(f=c===l,this.debug("string match",l,c,f)):(f=l.test(c),this.debug("pattern match",l,c,f)),!f)return!1}if(o===a&&u===h)return!0;if(o===a)return i;if(u===h)return o===a-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return Sa(this.pattern,this.options)}parse(e){Rt(e);let t=this.options;if(e==="**")return G;if(e==="")return"";let i,s=null;(i=e.match(nf))?s=t.dot?af:of:(i=e.match(Zc))?s=(t.nocase?t.dot?Jc:Xc:t.dot?Kc:Yc)(i[1]):(i=e.match(uf))?s=(t.nocase?t.dot?lf:hf:t.dot?cf:ff)(i):(i=e.match(Qc))?s=t.dot?tf:ef:(i=e.match(sf))&&(s=rf);let n=ot.fromGlob(e,this.options).toMMPattern();return s&&typeof n=="object"&&Reflect.defineProperty(n,"test",{value:s}),n}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,i=t.noglobstar?mf:t.dot?gf:_f,s=new Set(t.nocase?["i"]:[]),n=e.map(a=>{let h=a.map(l=>{if(l instanceof RegExp)for(let c of l.flags.split(""))s.add(c);return typeof l=="string"?Sf(l):l===G?G:l._src});return h.forEach((l,c)=>{let d=h[c+1],p=h[c-1];l!==G||p===G||(p===void 0?d!==void 0&&d!==G?h[c+1]="(?:\\/|"+i+"\\/)?"+d:h[c]=i:d===void 0?h[c-1]=p+"(?:\\/|"+i+")?":d!==G&&(h[c-1]=p+"(?:\\/|\\/"+i+"\\/)"+d,h[c+1]=G))}),h.filter(l=>l!==G).join("/")}).join("|"),[o,u]=e.length>1?["(?:",")"]:["",""];n="^"+o+n+u+"$",this.negate&&(n="^(?!"+n+").+$");try{this.regexp=new RegExp(n,[...s].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,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;let i=this.options;this.isWindows&&(e=e.split("\\").join("/"));let s=this.slashSplit(e);this.debug(this.pattern,"split",s);let n=this.set;this.debug(this.pattern,"set",n);let o=s[s.length-1];if(!o)for(let u=s.length-2;!o&&u>=0;u--)o=s[u];for(let u=0;u<n.length;u++){let a=n[u],h=s;if(i.matchBase&&a.length===1&&(h=[o]),this.matchOne(h,a,t))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(e){return q.defaults(e).Minimatch}};q.AST=ot;q.Minimatch=X;q.escape=at;q.unescape=le;var qa=require("node:url");var ut=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Oa=new Set,sr=typeof process=="object"&&process?process:{},va=(r,e,t,i)=>{typeof sr.emitWarning=="function"?sr.emitWarning(r,e,t,i):console.error(`[${t}] ${e}: ${r}`)},Si=globalThis.AbortController,xa=globalThis.AbortSignal,Ca;if(typeof Si>"u"){xa=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,s){this._onabort.push(s)}},Si=class{constructor(){e()}signal=new xa;abort(i){var s,n;if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let o of this.signal._onabort)o(i);(n=(s=this.signal).onabort)==null||n.call(s,i)}}};let r=((Ca=sr.env)==null?void 0:Ca.LRU_CACHE_IGNORE_AC_WARNING)!=="1",e=()=>{r&&(r=!1,va("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 xf=r=>!Oa.has(r),Bp=Symbol("type"),De=r=>r&&r===Math.floor(r)&&r>0&&isFinite(r),Ta=r=>De(r)?r<=Math.pow(2,8)?Uint8Array:r<=Math.pow(2,16)?Uint16Array:r<=Math.pow(2,32)?Uint32Array:r<=Number.MAX_SAFE_INTEGER?ht:null:null,ht=class extends Array{constructor(e){super(e),this.fill(0)}},rr=class r{heap;length;static#e=!1;static create(e){let t=Ta(e);if(!t)return[];r.#e=!0;let i=new r(e,t);return r.#e=!1,i}constructor(e,t){if(!r.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Ft=class r{#e;#t;#n;#s;#o;#E;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#h;#c;#a;#u;#r;#g;#_;#d;#f;#x;#m;#C;#O;#w;#y;#S;#p;static unsafeExposeInternals(e){return{starts:e.#O,ttls:e.#w,sizes:e.#C,keyMap:e.#a,keyList:e.#u,valList:e.#r,next:e.#g,prev:e.#_,get head(){return e.#d},get tail(){return e.#f},free:e.#x,isBackgroundFetch:t=>e.#l(t),backgroundFetch:(t,i,s,n)=>e.#U(t,i,s,n),moveToTail:t=>e.#W(t),indexes:t=>e.#T(t),rindexes:t=>e.#L(t),isStale:t=>e.#b(t)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#c}get size(){return this.#h}get fetchMethod(){return this.#o}get memoMethod(){return this.#E}get dispose(){return this.#n}get disposeAfter(){return this.#s}constructor(e){let{max:t=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:o,updateAgeOnHas:u,allowStale:a,dispose:h,disposeAfter:l,noDisposeOnSet:c,noUpdateTTL:d,maxSize:p=0,maxEntrySize:m=0,sizeCalculation:f,fetchMethod:b,memoMethod:g,noDeleteOnFetchRejection:y,noDeleteOnStaleGet:C,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:L,ignoreFetchAbort:U}=e;if(t!==0&&!De(t))throw new TypeError("max option must be a nonnegative integer");let V=t?Ta(t):Array;if(!V)throw new Error("invalid max value: "+t);if(this.#e=t,this.#t=p,this.maxEntrySize=m||this.#t,this.sizeCalculation=f,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(g!==void 0&&typeof g!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#E=g,b!==void 0&&typeof b!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#o=b,this.#S=!!b,this.#a=new Map,this.#u=new Array(t).fill(void 0),this.#r=new Array(t).fill(void 0),this.#g=new V(t),this.#_=new V(t),this.#d=0,this.#f=0,this.#x=rr.create(t),this.#h=0,this.#c=0,typeof h=="function"&&(this.#n=h),typeof l=="function"?(this.#s=l,this.#m=[]):(this.#s=void 0,this.#m=void 0),this.#y=!!this.#n,this.#p=!!this.#s,this.noDisposeOnSet=!!c,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!y,this.allowStaleOnFetchRejection=!!S,this.allowStaleOnFetchAbort=!!L,this.ignoreFetchAbort=!!U,this.maxEntrySize!==0){if(this.#t!==0&&!De(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!De(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#I()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!C,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!u,this.ttlResolution=De(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!De(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 me="LRU_CACHE_UNBOUNDED";xf(me)&&(Oa.add(me),va("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",me,r))}}getRemainingTTL(e){return this.#a.has(e)?1/0:0}#A(){let e=new ht(this.#e),t=new ht(this.#e);this.#w=e,this.#O=t,this.#N=(n,o,u=ut.now())=>{if(t[n]=o!==0?u:0,e[n]=o,o!==0&&this.ttlAutopurge){let a=setTimeout(()=>{this.#b(n)&&this.#D(this.#u[n],"expire")},o+1);a.unref&&a.unref()}},this.#v=n=>{t[n]=e[n]!==0?ut.now():0},this.#i=(n,o)=>{if(e[o]){let u=e[o],a=t[o];if(!u||!a)return;n.ttl=u,n.start=a,n.now=i||s();let h=n.now-a;n.remainingTTL=u-h}};let i=0,s=()=>{let n=ut.now();if(this.ttlResolution>0){i=n;let o=setTimeout(()=>i=0,this.ttlResolution);o.unref&&o.unref()}return n};this.getRemainingTTL=n=>{let o=this.#a.get(n);if(o===void 0)return 0;let u=e[o],a=t[o];if(!u||!a)return 1/0;let h=(i||s())-a;return u-h},this.#b=n=>{let o=t[n],u=e[n];return!!u&&!!o&&(i||s())-o>u}}#v=()=>{};#i=()=>{};#N=()=>{};#b=()=>!1;#I(){let e=new ht(this.#e);this.#c=0,this.#C=e,this.#R=t=>{this.#c-=e[t],e[t]=0},this.#F=(t,i,s,n)=>{if(this.#l(i))return 0;if(!De(s))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(i,t),!De(s))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 s},this.#k=(t,i,s)=>{if(e[t]=i,this.#t){let n=this.#t-e[t];for(;this.#c>n;)this.#M(!0)}this.#c+=e[t],s&&(s.entrySize=i,s.totalCalculatedSize=this.#c)}}#R=e=>{};#k=(e,t,i)=>{};#F=(e,t,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#T({allowStale:e=this.allowStale}={}){if(this.#h)for(let t=this.#f;!(!this.#P(t)||((e||!this.#b(t))&&(yield t),t===this.#d));)t=this.#_[t]}*#L({allowStale:e=this.allowStale}={}){if(this.#h)for(let t=this.#d;!(!this.#P(t)||((e||!this.#b(t))&&(yield t),t===this.#f));)t=this.#g[t]}#P(e){return e!==void 0&&this.#a.get(this.#u[e])===e}*entries(){for(let e of this.#T())this.#r[e]!==void 0&&this.#u[e]!==void 0&&!this.#l(this.#r[e])&&(yield[this.#u[e],this.#r[e]])}*rentries(){for(let e of this.#L())this.#r[e]!==void 0&&this.#u[e]!==void 0&&!this.#l(this.#r[e])&&(yield[this.#u[e],this.#r[e]])}*keys(){for(let e of this.#T()){let t=this.#u[e];t!==void 0&&!this.#l(this.#r[e])&&(yield t)}}*rkeys(){for(let e of this.#L()){let t=this.#u[e];t!==void 0&&!this.#l(this.#r[e])&&(yield t)}}*values(){for(let e of this.#T())this.#r[e]!==void 0&&!this.#l(this.#r[e])&&(yield this.#r[e])}*rvalues(){for(let e of this.#L())this.#r[e]!==void 0&&!this.#l(this.#r[e])&&(yield this.#r[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let i of this.#T()){let s=this.#r[i],n=this.#l(s)?s.__staleWhileFetching:s;if(n!==void 0&&e(n,this.#u[i],this))return this.get(this.#u[i],t)}}forEach(e,t=this){for(let i of this.#T()){let s=this.#r[i],n=this.#l(s)?s.__staleWhileFetching:s;n!==void 0&&e.call(t,n,this.#u[i],this)}}rforEach(e,t=this){for(let i of this.#L()){let s=this.#r[i],n=this.#l(s)?s.__staleWhileFetching:s;n!==void 0&&e.call(t,n,this.#u[i],this)}}purgeStale(){let e=!1;for(let t of this.#L({allowStale:!0}))this.#b(t)&&(this.#D(this.#u[t],"expire"),e=!0);return e}info(e){let t=this.#a.get(e);if(t===void 0)return;let i=this.#r[t],s=this.#l(i)?i.__staleWhileFetching:i;if(s===void 0)return;let n={value:s};if(this.#w&&this.#O){let o=this.#w[t],u=this.#O[t];if(o&&u){let a=o-(ut.now()-u);n.ttl=a,n.start=Date.now()}}return this.#C&&(n.size=this.#C[t]),n}dump(){let e=[];for(let t of this.#T({allowStale:!0})){let i=this.#u[t],s=this.#r[t],n=this.#l(s)?s.__staleWhileFetching:s;if(n===void 0||i===void 0)continue;let o={value:n};if(this.#w&&this.#O){o.ttl=this.#w[t];let u=ut.now()-this.#O[t];o.start=Math.floor(Date.now()-u)}this.#C&&(o.size=this.#C[t]),e.unshift([i,o])}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let s=Date.now()-i.start;i.start=ut.now()-s}this.set(t,i.value,i)}}set(e,t,i={}){var d,p,m,f,b;if(t===void 0)return this.delete(e),this;let{ttl:s=this.ttl,start:n,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:u=this.sizeCalculation,status:a}=i,{noUpdateTTL:h=this.noUpdateTTL}=i,l=this.#F(e,t,i.size||0,u);if(this.maxEntrySize&&l>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#D(e,"set"),this;let c=this.#h===0?void 0:this.#a.get(e);if(c===void 0)c=this.#h===0?this.#f:this.#x.length!==0?this.#x.pop():this.#h===this.#e?this.#M(!1):this.#h,this.#u[c]=e,this.#r[c]=t,this.#a.set(e,c),this.#g[this.#f]=c,this.#_[c]=this.#f,this.#f=c,this.#h++,this.#k(c,l,a),a&&(a.set="add"),h=!1;else{this.#W(c);let g=this.#r[c];if(t!==g){if(this.#S&&this.#l(g)){g.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:y}=g;y!==void 0&&!o&&(this.#y&&((d=this.#n)==null||d.call(this,y,e,"set")),this.#p&&((p=this.#m)==null||p.push([y,e,"set"])))}else o||(this.#y&&((m=this.#n)==null||m.call(this,g,e,"set")),this.#p&&((f=this.#m)==null||f.push([g,e,"set"])));if(this.#R(c),this.#k(c,l,a),this.#r[c]=t,a){a.set="replace";let y=g&&this.#l(g)?g.__staleWhileFetching:g;y!==void 0&&(a.oldValue=y)}}else a&&(a.set="update")}if(s!==0&&!this.#w&&this.#A(),this.#w&&(h||this.#N(c,s,n),a&&this.#i(a,c)),!o&&this.#p&&this.#m){let g=this.#m,y;for(;y=g==null?void 0:g.shift();)(b=this.#s)==null||b.call(this,...y)}return this}pop(){var e;try{for(;this.#h;){let t=this.#r[this.#d];if(this.#M(!0),this.#l(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#p&&this.#m){let t=this.#m,i;for(;i=t==null?void 0:t.shift();)(e=this.#s)==null||e.call(this,...i)}}}#M(e){var n,o;let t=this.#d,i=this.#u[t],s=this.#r[t];return this.#S&&this.#l(s)?s.__abortController.abort(new Error("evicted")):(this.#y||this.#p)&&(this.#y&&((n=this.#n)==null||n.call(this,s,i,"evict")),this.#p&&((o=this.#m)==null||o.push([s,i,"evict"]))),this.#R(t),e&&(this.#u[t]=void 0,this.#r[t]=void 0,this.#x.push(t)),this.#h===1?(this.#d=this.#f=0,this.#x.length=0):this.#d=this.#g[t],this.#a.delete(i),this.#h--,t}has(e,t={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=t,n=this.#a.get(e);if(n!==void 0){let o=this.#r[n];if(this.#l(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#b(n))s&&(s.has="stale",this.#i(s,n));else return i&&this.#v(n),s&&(s.has="hit",this.#i(s,n)),!0}else s&&(s.has="miss");return!1}peek(e,t={}){let{allowStale:i=this.allowStale}=t,s=this.#a.get(e);if(s===void 0||!i&&this.#b(s))return;let n=this.#r[s];return this.#l(n)?n.__staleWhileFetching:n}#U(e,t,i,s){let n=t===void 0?void 0:this.#r[t];if(this.#l(n))return n;let o=new Si,{signal:u}=i;u==null||u.addEventListener("abort",()=>o.abort(u.reason),{signal:o.signal});let a={signal:o.signal,options:i,context:s},h=(f,b=!1)=>{let{aborted:g}=o.signal,y=i.ignoreFetchAbort&&f!==void 0;if(i.status&&(g&&!b?(i.status.fetchAborted=!0,i.status.fetchError=o.signal.reason,y&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),g&&!y&&!b)return c(o.signal.reason);let C=p;return this.#r[t]===p&&(f===void 0?C.__staleWhileFetching?this.#r[t]=C.__staleWhileFetching:this.#D(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(e,f,a.options))),f},l=f=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=f),c(f)),c=f=>{let{aborted:b}=o.signal,g=b&&i.allowStaleOnFetchAbort,y=g||i.allowStaleOnFetchRejection,C=y||i.noDeleteOnFetchRejection,S=p;if(this.#r[t]===p&&(!C||S.__staleWhileFetching===void 0?this.#D(e,"fetch"):g||(this.#r[t]=S.__staleWhileFetching)),y)return i.status&&S.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),S.__staleWhileFetching;if(S.__returned===S)throw f},d=(f,b)=>{var y;let g=(y=this.#o)==null?void 0:y.call(this,e,n,a);g&&g instanceof Promise&&g.then(C=>f(C===void 0?void 0:C),b),o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(f(void 0),i.allowStaleOnFetchAbort&&(f=C=>h(C,!0)))})};i.status&&(i.status.fetchDispatched=!0);let p=new Promise(d).then(h,l),m=Object.assign(p,{__abortController:o,__staleWhileFetching:n,__returned:void 0});return t===void 0?(this.set(e,m,{...a.options,status:void 0}),t=this.#a.get(e)):this.#r[t]=m,m}#l(e){if(!this.#S)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof Si}async fetch(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:a=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:m=this.allowStaleOnFetchAbort,context:f,forceRefresh:b=!1,status:g,signal:y}=t;if(!this.#S)return g&&(g.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:g});let C={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:o,noDisposeOnSet:u,size:a,sizeCalculation:h,noUpdateTTL:l,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:m,ignoreFetchAbort:p,status:g,signal:y},S=this.#a.get(e);if(S===void 0){g&&(g.fetch="miss");let L=this.#U(e,S,C,f);return L.__returned=L}else{let L=this.#r[S];if(this.#l(L)){let ze=i&&L.__staleWhileFetching!==void 0;return g&&(g.fetch="inflight",ze&&(g.returnedStale=!0)),ze?L.__staleWhileFetching:L.__returned=L}let U=this.#b(S);if(!b&&!U)return g&&(g.fetch="hit"),this.#W(S),s&&this.#v(S),g&&this.#i(g,S),L;let V=this.#U(e,S,C,f),ae=V.__staleWhileFetching!==void 0&&i;return g&&(g.fetch=U?"stale":"refresh",ae&&U&&(g.returnedStale=!0)),ae?V.__staleWhileFetching:V.__returned=V}}async forceFetch(e,t={}){let i=await this.fetch(e,t);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,t={}){let i=this.#E;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:n,...o}=t,u=this.get(e,o);if(!n&&u!==void 0)return u;let a=i(e,u,{options:o,context:s});return this.set(e,a,o),a}get(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:o}=t,u=this.#a.get(e);if(u!==void 0){let a=this.#r[u],h=this.#l(a);return o&&this.#i(o,u),this.#b(u)?(o&&(o.get="stale"),h?(o&&i&&a.__staleWhileFetching!==void 0&&(o.returnedStale=!0),i?a.__staleWhileFetching:void 0):(n||this.#D(e,"expire"),o&&i&&(o.returnedStale=!0),i?a:void 0)):(o&&(o.get="hit"),h?a.__staleWhileFetching:(this.#W(u),s&&this.#v(u),a))}else o&&(o.get="miss")}#B(e,t){this.#_[t]=e,this.#g[e]=t}#W(e){e!==this.#f&&(e===this.#d?this.#d=this.#g[e]:this.#B(this.#_[e],this.#g[e]),this.#B(this.#f,e),this.#f=e)}delete(e){return this.#D(e,"delete")}#D(e,t){var s,n,o,u;let i=!1;if(this.#h!==0){let a=this.#a.get(e);if(a!==void 0)if(i=!0,this.#h===1)this.#$(t);else{this.#R(a);let h=this.#r[a];if(this.#l(h)?h.__abortController.abort(new Error("deleted")):(this.#y||this.#p)&&(this.#y&&((s=this.#n)==null||s.call(this,h,e,t)),this.#p&&((n=this.#m)==null||n.push([h,e,t]))),this.#a.delete(e),this.#u[a]=void 0,this.#r[a]=void 0,a===this.#f)this.#f=this.#_[a];else if(a===this.#d)this.#d=this.#g[a];else{let l=this.#_[a];this.#g[l]=this.#g[a];let c=this.#g[a];this.#_[c]=this.#_[a]}this.#h--,this.#x.push(a)}}if(this.#p&&((o=this.#m)!=null&&o.length)){let a=this.#m,h;for(;h=a==null?void 0:a.shift();)(u=this.#s)==null||u.call(this,...h)}return i}clear(){return this.#$("delete")}#$(e){var t,i,s;for(let n of this.#L({allowStale:!0})){let o=this.#r[n];if(this.#l(o))o.__abortController.abort(new Error("deleted"));else{let u=this.#u[n];this.#y&&((t=this.#n)==null||t.call(this,o,u,e)),this.#p&&((i=this.#m)==null||i.push([o,u,e]))}}if(this.#a.clear(),this.#r.fill(void 0),this.#u.fill(void 0),this.#w&&this.#O&&(this.#w.fill(0),this.#O.fill(0)),this.#C&&this.#C.fill(0),this.#d=0,this.#f=0,this.#x.length=0,this.#c=0,this.#h=0,this.#p&&this.#m){let n=this.#m,o;for(;o=n==null?void 0:n.shift();)(s=this.#s)==null||s.call(this,...o)}}};var ft=require("node:path"),Ma=require("node:url"),Ee=require("fs"),Rf=F(require("node:fs"),1),ke=require("node:fs/promises");var Ai=require("node:events"),cr=F(require("node:stream"),1),Na=require("node:string_decoder"),La=typeof process=="object"&&process?process:{stdout:null,stderr:null},Cf=r=>!!r&&typeof r=="object"&&(r instanceof Re||r instanceof cr.default||Of(r)||vf(r)),Of=r=>!!r&&typeof r=="object"&&r instanceof Ai.EventEmitter&&typeof r.pipe=="function"&&r.pipe!==cr.default.Writable.prototype.pipe,vf=r=>!!r&&typeof r=="object"&&r instanceof Ai.EventEmitter&&typeof r.write=="function"&&typeof r.end=="function",ve=Symbol("EOF"),Te=Symbol("maybeEmitEnd"),Ne=Symbol("emittedEnd"),xi=Symbol("emittingEnd"),Pt=Symbol("emittedError"),Ci=Symbol("closed"),Aa=Symbol("read"),Oi=Symbol("flush"),Ia=Symbol("flushChunk"),ce=Symbol("encoding"),lt=Symbol("decoder"),W=Symbol("flowing"),Mt=Symbol("paused"),ct=Symbol("resume"),$=Symbol("buffer"),Z=Symbol("pipes"),z=Symbol("bufferLength"),nr=Symbol("bufferPush"),vi=Symbol("bufferShift"),j=Symbol("objectMode"),P=Symbol("destroyed"),or=Symbol("error"),ar=Symbol("emitData"),Da=Symbol("emitEnd"),ur=Symbol("emitEnd2"),be=Symbol("async"),hr=Symbol("abort"),Ti=Symbol("aborted"),Ut=Symbol("signal"),Ye=Symbol("dataListeners"),J=Symbol("discarded"),Bt=r=>Promise.resolve().then(r),Tf=r=>r(),Lf=r=>r==="end"||r==="finish"||r==="prefinish",Af=r=>r instanceof ArrayBuffer||!!r&&typeof r=="object"&&r.constructor&&r.constructor.name==="ArrayBuffer"&&r.byteLength>=0,If=r=>!Buffer.isBuffer(r)&&ArrayBuffer.isView(r),Li=class{src;dest;opts;ondrain;constructor(e,t,i){this.src=e,this.dest=t,this.opts=i,this.ondrain=()=>e[ct](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},lr=class extends Li{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,i){super(e,t,i),this.proxyErrors=s=>t.emit("error",s),e.on("error",this.proxyErrors)}},Df=r=>!!r.objectMode,Nf=r=>!r.objectMode&&!!r.encoding&&r.encoding!=="buffer",Re=class extends Ai.EventEmitter{[W]=!1;[Mt]=!1;[Z]=[];[$]=[];[j];[ce];[be];[lt];[ve]=!1;[Ne]=!1;[xi]=!1;[Ci]=!1;[Pt]=null;[z]=0;[P]=!1;[Ut];[Ti]=!1;[Ye]=0;[J]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");Df(t)?(this[j]=!0,this[ce]=null):Nf(t)?(this[ce]=t.encoding,this[j]=!1):(this[j]=!1,this[ce]=null),this[be]=!!t.async,this[lt]=this[ce]?new Na.StringDecoder(this[ce]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[$]}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[Z]});let{signal:i}=t;i&&(this[Ut]=i,i.aborted?this[hr]():i.addEventListener("abort",()=>this[hr]()))}get bufferLength(){return this[z]}get encoding(){return this[ce]}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[j]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[be]}set async(e){this[be]=this[be]||!!e}[hr](){var e,t;this[Ti]=!0,this.emit("abort",(e=this[Ut])==null?void 0:e.reason),this.destroy((t=this[Ut])==null?void 0:t.reason)}get aborted(){return this[Ti]}set aborted(e){}write(e,t,i){var n;if(this[Ti])return!1;if(this[ve])throw new Error("write after end");if(this[P])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof t=="function"&&(i=t,t="utf8"),t||(t="utf8");let s=this[be]?Bt:Tf;if(!this[j]&&!Buffer.isBuffer(e)){if(If(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(Af(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[j]?(this[W]&&this[z]!==0&&this[Oi](!0),this[W]?this.emit("data",e):this[nr](e),this[z]!==0&&this.emit("readable"),i&&s(i),this[W]):e.length?(typeof e=="string"&&!(t===this[ce]&&!((n=this[lt])!=null&&n.lastNeed))&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[ce]&&(e=this[lt].write(e)),this[W]&&this[z]!==0&&this[Oi](!0),this[W]?this.emit("data",e):this[nr](e),this[z]!==0&&this.emit("readable"),i&&s(i),this[W]):(this[z]!==0&&this.emit("readable"),i&&s(i),this[W])}read(e){if(this[P])return null;if(this[J]=!1,this[z]===0||e===0||e&&e>this[z])return this[Te](),null;this[j]&&(e=null),this[$].length>1&&!this[j]&&(this[$]=[this[ce]?this[$].join(""):Buffer.concat(this[$],this[z])]);let t=this[Aa](e||null,this[$][0]);return this[Te](),t}[Aa](e,t){if(this[j])this[vi]();else{let i=t;e===i.length||e===null?this[vi]():typeof i=="string"?(this[$][0]=i.slice(e),t=i.slice(0,e),this[z]-=e):(this[$][0]=i.subarray(e),t=i.subarray(0,e),this[z]-=e)}return this.emit("data",t),!this[$].length&&!this[ve]&&this.emit("drain"),t}end(e,t,i){return typeof e=="function"&&(i=e,e=void 0),typeof t=="function"&&(i=t,t="utf8"),e!==void 0&&this.write(e,t),i&&this.once("end",i),this[ve]=!0,this.writable=!1,(this[W]||!this[Mt])&&this[Te](),this}[ct](){this[P]||(!this[Ye]&&!this[Z].length&&(this[J]=!0),this[Mt]=!1,this[W]=!0,this.emit("resume"),this[$].length?this[Oi]():this[ve]?this[Te]():this.emit("drain"))}resume(){return this[ct]()}pause(){this[W]=!1,this[Mt]=!0,this[J]=!1}get destroyed(){return this[P]}get flowing(){return this[W]}get paused(){return this[Mt]}[nr](e){this[j]?this[z]+=1:this[z]+=e.length,this[$].push(e)}[vi](){return this[j]?this[z]-=1:this[z]-=this[$][0].length,this[$].shift()}[Oi](e=!1){do;while(this[Ia](this[vi]())&&this[$].length);!e&&!this[$].length&&!this[ve]&&this.emit("drain")}[Ia](e){return this.emit("data",e),this[W]}pipe(e,t){if(this[P])return e;this[J]=!1;let i=this[Ne];return t=t||{},e===La.stdout||e===La.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,i?t.end&&e.end():(this[Z].push(t.proxyErrors?new lr(this,e,t):new Li(this,e,t)),this[be]?Bt(()=>this[ct]()):this[ct]()),e}unpipe(e){let t=this[Z].find(i=>i.dest===e);t&&(this[Z].length===1?(this[W]&&this[Ye]===0&&(this[W]=!1),this[Z]=[]):this[Z].splice(this[Z].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let i=super.on(e,t);if(e==="data")this[J]=!1,this[Ye]++,!this[Z].length&&!this[W]&&this[ct]();else if(e==="readable"&&this[z]!==0)super.emit("readable");else if(Lf(e)&&this[Ne])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[Pt]){let s=t;this[be]?Bt(()=>s.call(this,this[Pt])):s.call(this,this[Pt])}return i}removeListener(e,t){return this.off(e,t)}off(e,t){let i=super.off(e,t);return e==="data"&&(this[Ye]=this.listeners("data").length,this[Ye]===0&&!this[J]&&!this[Z].length&&(this[W]=!1)),i}removeAllListeners(e){let t=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Ye]=0,!this[J]&&!this[Z].length&&(this[W]=!1)),t}get emittedEnd(){return this[Ne]}[Te](){!this[xi]&&!this[Ne]&&!this[P]&&this[$].length===0&&this[ve]&&(this[xi]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Ci]&&this.emit("close"),this[xi]=!1)}emit(e,...t){let i=t[0];if(e!=="error"&&e!=="close"&&e!==P&&this[P])return!1;if(e==="data")return!this[j]&&!i?!1:this[be]?(Bt(()=>this[ar](i)),!0):this[ar](i);if(e==="end")return this[Da]();if(e==="close"){if(this[Ci]=!0,!this[Ne]&&!this[P])return!1;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[Pt]=i,super.emit(or,i);let n=!this[Ut]||this.listeners("error").length?super.emit("error",i):!1;return this[Te](),n}else if(e==="resume"){let n=super.emit("resume");return this[Te](),n}else if(e==="finish"||e==="prefinish"){let n=super.emit(e);return this.removeAllListeners(e),n}let s=super.emit(e,...t);return this[Te](),s}[ar](e){for(let i of this[Z])i.dest.write(e)===!1&&this.pause();let t=this[J]?!1:super.emit("data",e);return this[Te](),t}[Da](){return this[Ne]?!1:(this[Ne]=!0,this.readable=!1,this[be]?(Bt(()=>this[ur]()),!0):this[ur]())}[ur](){if(this[lt]){let t=this[lt].end();if(t){for(let i of this[Z])i.dest.write(t);this[J]||super.emit("data",t)}}for(let t of this[Z])t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[j]||(e.dataLength=0);let t=this.promise();return this.on("data",i=>{e.push(i),this[j]||(e.dataLength+=i.length)}),await t,e}async concat(){if(this[j])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[ce]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(P,()=>t(new Error("stream destroyed"))),this.on("error",i=>t(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[J]=!1;let e=!1,t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();let s=this.read();if(s!==null)return Promise.resolve({done:!1,value:s});if(this[ve])return t();let n,o,u=c=>{this.off("data",a),this.off("end",h),this.off(P,l),t(),o(c)},a=c=>{this.off("error",u),this.off("end",h),this.off(P,l),this.pause(),n({value:c,done:!!this[ve]})},h=()=>{this.off("error",u),this.off("data",a),this.off(P,l),t(),n({done:!0,value:void 0})},l=()=>u(new Error("stream destroyed"));return new Promise((c,d)=>{o=d,n=c,this.once(P,l),this.once("error",u),this.once("end",h),this.once("data",a)})},throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[J]=!1;let e=!1,t=()=>(this.pause(),this.off(or,t),this.off(P,t),this.off("end",t),e=!0,{done:!0,value:void 0}),i=()=>{if(e)return t();let s=this.read();return s===null?t():{done:!1,value:s}};return this.once("end",t),this.once(or,t),this.once(P,t),{next:i,throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[P])return e?this.emit("error",e):this.emit(P),this;this[P]=!0,this[J]=!0,this[$].length=0,this[z]=0;let t=this;return typeof t.close=="function"&&!this[Ci]&&t.close(),e?this.emit("error",e):this.emit(P),this}static get isStream(){return Cf}};var kf=Ee.realpathSync.native,$t={lstatSync:Ee.lstatSync,readdir:Ee.readdir,readdirSync:Ee.readdirSync,readlinkSync:Ee.readlinkSync,realpathSync:kf,promises:{lstat:ke.lstat,readdir:ke.readdir,readlink:ke.readlink,realpath:ke.realpath}},Ua=r=>!r||r===$t||r===Rf?$t:{...$t,...r,promises:{...$t.promises,...r.promises||{}}},Ba=/^\\\\\?\\([a-z]:)\\?$/i,Ff=r=>r.replace(/\//g,"\\").replace(Ba,"$1\\"),Pf=/[\\\/]/,re=0,Wa=1,$a=2,we=4,za=6,Ga=8,Ke=10,ja=12,se=15,Wt=~se,fr=16,Ra=32,zt=64,fe=128,Ii=256,Ni=512,ka=zt|fe|Ni,Mf=1023,dr=r=>r.isFile()?Ga:r.isDirectory()?we:r.isSymbolicLink()?Ke:r.isCharacterDevice()?$a:r.isBlockDevice()?za:r.isSocket()?ja:r.isFIFO()?Wa:re,Fa=new Map,Gt=r=>{let e=Fa.get(r);if(e)return e;let t=r.normalize("NFKD");return Fa.set(r,t),t},Pa=new Map,Di=r=>{let e=Pa.get(r);if(e)return e;let t=Gt(r.toLowerCase());return Pa.set(r,t),t},Ri=class extends Ft{constructor(){super({max:256})}},pr=class extends Ft{constructor(e=16*1024){super({maxSize:e,sizeCalculation:t=>t.length+1})}},Ha=Symbol("PathScurry setAsCwd"),H=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#n;get mode(){return this.#n}#s;get nlink(){return this.#s}#o;get uid(){return this.#o}#E;get gid(){return this.#E}#h;get rdev(){return this.#h}#c;get blksize(){return this.#c}#a;get ino(){return this.#a}#u;get size(){return this.#u}#r;get blocks(){return this.#r}#g;get atimeMs(){return this.#g}#_;get mtimeMs(){return this.#_}#d;get ctimeMs(){return this.#d}#f;get birthtimeMs(){return this.#f}#x;get atime(){return this.#x}#m;get mtime(){return this.#m}#C;get ctime(){return this.#C}#O;get birthtime(){return this.#O}#w;#y;#S;#p;#A;#v;#i;#N;#b;#I;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=re,i,s,n,o,u){this.name=e,this.#w=n?Di(e):Gt(e),this.#i=t&Mf,this.nocase=n,this.roots=s,this.root=i||this,this.#N=o,this.#S=u.fullpath,this.#A=u.relative,this.#v=u.relativePosix,this.parent=u.parent,this.parent?this.#e=this.parent.#e:this.#e=Ua(u.fs)}depth(){return this.#y!==void 0?this.#y:this.parent?this.#y=this.parent.depth()+1:this.#y=0}childrenCache(){return this.#N}resolve(e){if(!e)return this;let t=this.getRootString(e),s=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#R(s):this.#R(s)}#R(e){let t=this;for(let i of e)t=t.child(i);return t}children(){let e=this.#N.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#N.set(this,t),this.#i&=~fr,t}child(e,t){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let i=this.children(),s=this.nocase?Di(e):Gt(e);for(let a of i)if(a.#w===s)return a;let n=this.parent?this.sep:"",o=this.#S?this.#S+n+e:void 0,u=this.newChild(e,re,{...t,parent:this,fullpath:o});return this.canReaddir()||(u.#i|=fe),i.push(u),u}relative(){if(this.isCWD)return"";if(this.#A!==void 0)return this.#A;let e=this.name,t=this.parent;if(!t)return this.#A=this.name;let i=t.relative();return i+(!i||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#v!==void 0)return this.#v;let e=this.name,t=this.parent;if(!t)return this.#v=this.fullpathPosix();let i=t.relativePosix();return i+(!i||!t.parent?"":"/")+e}fullpath(){if(this.#S!==void 0)return this.#S;let e=this.name,t=this.parent;if(!t)return this.#S=this.name;let s=t.fullpath()+(t.parent?this.sep:"")+e;return this.#S=s}fullpathPosix(){if(this.#p!==void 0)return this.#p;if(this.sep==="/")return this.#p=this.fullpath();if(!this.parent){let s=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(s)?this.#p=`//?/${s}`:this.#p=s}let e=this.parent,t=e.fullpathPosix(),i=t+(!t||!e.parent?"":"/")+this.name;return this.#p=i}isUnknown(){return(this.#i&se)===re}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.#i&se)===Ga}isDirectory(){return(this.#i&se)===we}isCharacterDevice(){return(this.#i&se)===$a}isBlockDevice(){return(this.#i&se)===za}isFIFO(){return(this.#i&se)===Wa}isSocket(){return(this.#i&se)===ja}isSymbolicLink(){return(this.#i&Ke)===Ke}lstatCached(){return this.#i&Ra?this:void 0}readlinkCached(){return this.#b}realpathCached(){return this.#I}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.#i&se;return!(e!==re&&e!==Ke||this.#i&Ii||this.#i&fe)}calledReaddir(){return!!(this.#i&fr)}isENOENT(){return!!(this.#i&fe)}isNamed(e){return this.nocase?this.#w===Di(e):this.#w===Gt(e)}async readlink(){var t;let e=this.#b;if(e)return e;if(this.canReadlink()&&this.parent)try{let i=await this.#e.promises.readlink(this.fullpath()),s=(t=await this.parent.realpath())==null?void 0:t.resolve(i);if(s)return this.#b=s}catch(i){this.#l(i.code);return}}readlinkSync(){var t;let e=this.#b;if(e)return e;if(this.canReadlink()&&this.parent)try{let i=this.#e.readlinkSync(this.fullpath()),s=(t=this.parent.realpathSync())==null?void 0:t.resolve(i);if(s)return this.#b=s}catch(i){this.#l(i.code);return}}#k(e){this.#i|=fr;for(let t=e.provisional;t<e.length;t++){let i=e[t];i&&i.#F()}}#F(){this.#i&fe||(this.#i=(this.#i|fe)&Wt,this.#T())}#T(){let e=this.children();e.provisional=0;for(let t of e)t.#F()}#L(){this.#i|=Ni,this.#P()}#P(){if(this.#i&zt)return;let e=this.#i;(e&se)===we&&(e&=Wt),this.#i=e|zt,this.#T()}#M(e=""){e==="ENOTDIR"||e==="EPERM"?this.#P():e==="ENOENT"?this.#F():this.children().provisional=0}#U(e=""){e==="ENOTDIR"?this.parent.#P():e==="ENOENT"&&this.#F()}#l(e=""){let t=this.#i;t|=Ii,e==="ENOENT"&&(t|=fe),(e==="EINVAL"||e==="UNKNOWN")&&(t&=Wt),this.#i=t,e==="ENOTDIR"&&this.parent&&this.parent.#P()}#B(e,t){return this.#D(e,t)||this.#W(e,t)}#W(e,t){let i=dr(e),s=this.newChild(e.name,i,{parent:this}),n=s.#i&se;return n!==we&&n!==Ke&&n!==re&&(s.#i|=zt),t.unshift(s),t.provisional++,s}#D(e,t){for(let i=t.provisional;i<t.length;i++){let s=t[i];if((this.nocase?Di(e.name):Gt(e.name))===s.#w)return this.#$(e,s,i,t)}}#$(e,t,i,s){let n=t.name;return t.#i=t.#i&Wt|dr(e),n!==e.name&&(t.name=e.name),i!==s.provisional&&(i===s.length-1?s.pop():s.splice(i,1),s.unshift(t)),s.provisional++,t}async lstat(){if((this.#i&fe)===0)try{return this.#H(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#U(e.code)}}lstatSync(){if((this.#i&fe)===0)try{return this.#H(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#U(e.code)}}#H(e){let{atime:t,atimeMs:i,birthtime:s,birthtimeMs:n,blksize:o,blocks:u,ctime:a,ctimeMs:h,dev:l,gid:c,ino:d,mode:p,mtime:m,mtimeMs:f,nlink:b,rdev:g,size:y,uid:C}=e;this.#x=t,this.#g=i,this.#O=s,this.#f=n,this.#c=o,this.#r=u,this.#C=a,this.#d=h,this.#t=l,this.#E=c,this.#a=d,this.#n=p,this.#m=m,this.#_=f,this.#s=b,this.#h=g,this.#u=y,this.#o=C;let S=dr(e);this.#i=this.#i&Wt|S|Ra,S!==re&&S!==we&&S!==Ke&&(this.#i|=zt)}#G=[];#j=!1;#V(e){this.#j=!1;let t=this.#G.slice();this.#G.length=0,t.forEach(i=>i(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let i=this.children();if(this.calledReaddir()){let n=i.slice(0,i.provisional);t?e(null,n):queueMicrotask(()=>e(null,n));return}if(this.#G.push(e),this.#j)return;this.#j=!0;let s=this.fullpath();this.#e.readdir(s,{withFileTypes:!0},(n,o)=>{if(n)this.#M(n.code),i.provisional=0;else{for(let u of o)this.#B(u,i);this.#k(i)}this.#V(i.slice(0,i.provisional))})}#z;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#z)await this.#z;else{let i=()=>{};this.#z=new Promise(s=>i=s);try{for(let s of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#B(s,e);this.#k(e)}catch(s){this.#M(s.code),e.provisional=0}this.#z=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 t=this.fullpath();try{for(let i of this.#e.readdirSync(t,{withFileTypes:!0}))this.#B(i,e);this.#k(e)}catch(i){this.#M(i.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#i&ka)return!1;let e=se&this.#i;return e===re||e===we||e===Ke}shouldWalk(e,t){return(this.#i&we)===we&&!(this.#i&ka)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#I)return this.#I;if(!((Ni|Ii|fe)&this.#i))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#I=this.resolve(e)}catch{this.#L()}}realpathSync(){if(this.#I)return this.#I;if(!((Ni|Ii|fe)&this.#i))try{let e=this.#e.realpathSync(this.fullpath());return this.#I=this.resolve(e)}catch{this.#L()}}[Ha](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),i=[],s=this;for(;s&&s.parent;)t.add(s),s.#A=i.join(this.sep),s.#v=i.join("/"),s=s.parent,i.push("..");for(s=e;s&&s.parent&&!t.has(s);)s.#A=void 0,s.#v=void 0,s=s.parent}},ki=class r extends H{sep="\\";splitSep=Pf;constructor(e,t=re,i,s,n,o,u){super(e,t,i,s,n,o,u)}newChild(e,t=re,i={}){return new r(e,t,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(e){return ft.win32.parse(e).root}getRoot(e){if(e=Ff(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,i]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=i;return this.roots[e]=new dt(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(Ba,"$1\\"),e===t}},Fi=class r extends H{splitSep="/";sep="/";constructor(e,t=re,i,s,n,o,u){super(e,t,i,s,n,o,u)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=re,i={}){return new r(e,t,this.root,this.roots,this.nocase,this.childrenCache(),i)}},Pi=class{root;rootPath;roots;cwd;#e;#t;#n;nocase;#s;constructor(e=process.cwd(),t,i,{nocase:s,childrenCacheSize:n=16*1024,fs:o=$t}={}){this.#s=Ua(o),(e instanceof URL||e.startsWith("file://"))&&(e=(0,Ma.fileURLToPath)(e));let u=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(u),this.#e=new Ri,this.#t=new Ri,this.#n=new pr(n);let a=u.substring(this.rootPath.length).split(i);if(a.length===1&&!a[0]&&a.pop(),s===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=s,this.root=this.newRoot(this.#s),this.roots[this.rootPath]=this.root;let h=this.root,l=a.length-1,c=t.sep,d=this.rootPath,p=!1;for(let m of a){let f=l--;h=h.child(m,{relative:new Array(f).fill("..").join(c),relativePosix:new Array(f).fill("..").join("/"),fullpath:d+=(p?"":c)+m}),p=!0}this.cwd=h}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#n}resolve(...e){let t="";for(let n=e.length-1;n>=0;n--){let o=e[n];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let i=this.#e.get(t);if(i!==void 0)return i;let s=this.cwd.resolve(t).fullpath();return this.#e.set(t,s),s}resolvePosix(...e){let t="";for(let n=e.length-1;n>=0;n--){let o=e[n];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let i=this.#t.get(t);if(i!==void 0)return i;let s=this.cwd.resolve(t).fullpathPosix();return this.#t.set(t,s),s}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,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e,e=this.cwd);let{withFileTypes:i}=t;if(e.canReaddir()){let s=await e.readdir();return i?s:s.map(n=>n.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e,e=this.cwd);let{withFileTypes:i=!0}=t;return e.canReaddir()?i?e.readdirSync():e.readdirSync().map(s=>s.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:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e.withFileTypes,e=this.cwd);let i=await e.readlink();return t?i:i==null?void 0:i.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e.withFileTypes,e=this.cwd);let i=e.readlinkSync();return t?i:i==null?void 0:i.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e.withFileTypes,e=this.cwd);let i=await e.realpath();return t?i:i==null?void 0:i.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e.withFileTypes,e=this.cwd);let i=e.realpathSync();return t?i:i==null?void 0:i.fullpath()}async walk(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:n,walkFilter:o}=t,u=[];(!n||n(e))&&u.push(i?e:e.fullpath());let a=new Set,h=(c,d)=>{a.add(c),c.readdirCB((p,m)=>{if(p)return d(p);let f=m.length;if(!f)return d();let b=()=>{--f===0&&d()};for(let g of m)(!n||n(g))&&u.push(i?g:g.fullpath()),s&&g.isSymbolicLink()?g.realpath().then(y=>y!=null&&y.isUnknown()?y.lstat():y).then(y=>y!=null&&y.shouldWalk(a,o)?h(y,b):b()):g.shouldWalk(a,o)?h(g,b):b()},!0)},l=e;return new Promise((c,d)=>{h(l,p=>{if(p)return d(p);c(u)})})}walkSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:n,walkFilter:o}=t,u=[];(!n||n(e))&&u.push(i?e:e.fullpath());let a=new Set([e]);for(let h of a){let l=h.readdirSync();for(let c of l){(!n||n(c))&&u.push(i?c:c.fullpath());let d=c;if(c.isSymbolicLink()){if(!(s&&(d=c.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(a,o)&&a.add(d)}}return u}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:n,walkFilter:o}=t;(!n||n(e))&&(yield i?e:e.fullpath());let u=new Set([e]);for(let a of u){let h=a.readdirSync();for(let l of h){(!n||n(l))&&(yield i?l:l.fullpath());let c=l;if(l.isSymbolicLink()){if(!(s&&(c=l.realpathSync())))continue;c.isUnknown()&&c.lstatSync()}c.shouldWalk(u,o)&&u.add(c)}}}stream(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:n,walkFilter:o}=t,u=new Re({objectMode:!0});(!n||n(e))&&u.write(i?e:e.fullpath());let a=new Set,h=[e],l=0,c=()=>{let d=!1;for(;!d;){let p=h.shift();if(!p){l===0&&u.end();return}l++,a.add(p);let m=(b,g,y=!1)=>{if(b)return u.emit("error",b);if(s&&!y){let C=[];for(let S of g)S.isSymbolicLink()&&C.push(S.realpath().then(L=>L!=null&&L.isUnknown()?L.lstat():L));if(C.length){Promise.all(C).then(()=>m(null,g,!0));return}}for(let C of g)C&&(!n||n(C))&&(u.write(i?C:C.fullpath())||(d=!0));l--;for(let C of g){let S=C.realpathCached()||C;S.shouldWalk(a,o)&&h.push(S)}d&&!u.flowing?u.once("drain",c):f||c()},f=!0;p.readdirCB(m,!0),f=!1}};return c(),u}streamSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:n,walkFilter:o}=t,u=new Re({objectMode:!0}),a=new Set;(!n||n(e))&&u.write(i?e:e.fullpath());let h=[e],l=0,c=()=>{let d=!1;for(;!d;){let p=h.shift();if(!p){l===0&&u.end();return}l++,a.add(p);let m=p.readdirSync();for(let f of m)(!n||n(f))&&(u.write(i?f:f.fullpath())||(d=!0));l--;for(let f of m){let b=f;if(f.isSymbolicLink()){if(!(s&&(b=f.realpathSync())))continue;b.isUnknown()&&b.lstatSync()}b.shouldWalk(a,o)&&h.push(b)}}d&&!u.flowing&&u.once("drain",c)};return c(),u}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[Ha](t)}},dt=class extends Pi{sep="\\";constructor(e=process.cwd(),t={}){let{nocase:i=!0}=t;super(e,ft.win32,"\\",{...t,nocase:i}),this.nocase=i;for(let s=this.cwd;s;s=s.parent)s.nocase=this.nocase}parseRootPath(e){return ft.win32.parse(e).root.toUpperCase()}newRoot(e){return new ki(this.rootPath,we,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},pt=class extends Pi{sep="/";constructor(e=process.cwd(),t={}){let{nocase:i=!1}=t;super(e,ft.posix,"/",{...t,nocase:i}),this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new Fi(this.rootPath,we,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},jt=class extends pt{constructor(e=process.cwd(),t={}){let{nocase:i=!0}=t;super(e,{...t,nocase:i})}},jp=process.platform==="win32"?ki:Fi,Va=process.platform==="win32"?dt:process.platform==="darwin"?jt:pt;var Uf=r=>r.length>=1,Bf=r=>r.length>=1,mt=class r{#e;#t;#n;length;#s;#o;#E;#h;#c;#a;#u=!0;constructor(e,t,i,s){if(!Uf(e))throw new TypeError("empty pattern list");if(!Bf(t))throw new TypeError("empty glob list");if(t.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=t,this.#n=i,this.#s=s,this.#n===0){if(this.isUNC()){let[n,o,u,a,...h]=this.#e,[l,c,d,p,...m]=this.#t;h[0]===""&&(h.shift(),m.shift());let f=[n,o,u,a,""].join("/"),b=[l,c,d,p,""].join("/");this.#e=[f,...h],this.#t=[b,...m],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[n,...o]=this.#e,[u,...a]=this.#t;o[0]===""&&(o.shift(),a.shift());let h=n+"/",l=u+"/";this.#e=[h,...o],this.#t=[l,...a],this.length=this.#e.length}}}pattern(){return this.#e[this.#n]}isString(){return typeof this.#e[this.#n]=="string"}isGlobstar(){return this.#e[this.#n]===G}isRegExp(){return this.#e[this.#n]instanceof RegExp}globString(){return this.#E=this.#E||(this.#n===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join("/"):this.#t.join("/"):this.#t.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new r(this.#e,this.#t,this.#n+1,this.#s),this.#o.#a=this.#a,this.#o.#c=this.#c,this.#o.#h=this.#h,this.#o):this.#o=null}isUNC(){let e=this.#e;return this.#c!==void 0?this.#c:this.#c=this.#s==="win32"&&this.#n===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#h!==void 0?this.#h:this.#h=this.#s==="win32"&&this.#n===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#a!==void 0?this.#a:this.#a=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#n===0?e:""}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#u)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#u?!1:(this.#u=!1,!0)}};var Wf=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",gt=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:i,noext:s,noglobstar:n,platform:o=Wf}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:t,nocase:i,noext:s,noglobstar:n,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let u of e)this.add(u)}add(e){let t=new X(e,this.mmopts);for(let i=0;i<t.set.length;i++){let s=t.set[i],n=t.globParts[i];if(!s||!n)throw new Error("invalid pattern object");for(;s[0]==="."&&n[0]===".";)s.shift(),n.shift();let o=new mt(s,n,0,this.platform),u=new X(o.globString(),this.mmopts),a=n[n.length-1]==="**",h=o.isAbsolute();h?this.absolute.push(u):this.relative.push(u),a&&(h?this.absoluteChildren.push(u):this.relativeChildren.push(u))}}ignored(e){let t=e.fullpath(),i=`${t}/`,s=e.relative()||".",n=`${s}/`;for(let o of this.relative)if(o.match(s)||o.match(n))return!0;for(let o of this.absolute)if(o.match(t)||o.match(i))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+"/",i=(e.relative()||".")+"/";for(let s of this.relativeChildren)if(s.match(i))return!0;for(let s of this.absoluteChildren)if(s.match(t))return!0;return!1}};var mr=class r{store;constructor(e=new Map){this.store=e}copy(){return new r(new Map(this.store))}hasWalked(e,t){var i;return(i=this.store.get(e.fullpath()))==null?void 0:i.has(t.globString())}storeWalked(e,t){let i=e.fullpath(),s=this.store.get(i);s?s.add(t.globString()):this.store.set(i,new Set([t.globString()]))}},gr=class{store=new Map;add(e,t,i){let s=(t?2:0)|(i?1:0),n=this.store.get(e);this.store.set(e,n===void 0?s:s&n)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}},_r=class{store=new Map;add(e,t){if(!e.canReaddir())return;let i=this.store.get(e);i?i.find(s=>s.globString()===t.globString())||i.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},Ht=class r{hasWalkedCache;matches=new gr;subwalks=new _r;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new mr}processPatterns(e,t){this.patterns=t;let i=t.map(s=>[e,s]);for(let[s,n]of i){this.hasWalkedCache.storeWalked(s,n);let o=n.root(),u=n.isAbsolute()&&this.opts.absolute!==!1;if(o){s=s.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let c=n.rest();if(c)n=c;else{this.matches.add(s,!0,!1);continue}}if(s.isENOENT())continue;let a,h,l=!1;for(;typeof(a=n.pattern())=="string"&&(h=n.rest());)s=s.resolve(a),n=h,l=!0;if(a=n.pattern(),h=n.rest(),l){if(this.hasWalkedCache.hasWalked(s,n))continue;this.hasWalkedCache.storeWalked(s,n)}if(typeof a=="string"){let c=a===".."||a===""||a===".";this.matches.add(s.resolve(a),u,c);continue}else if(a===G){(!s.isSymbolicLink()||this.follow||n.checkFollowGlobstar())&&this.subwalks.add(s,n);let c=h==null?void 0:h.pattern(),d=h==null?void 0:h.rest();if(!h||(c===""||c===".")&&!d)this.matches.add(s,u,c===""||c===".");else if(c===".."){let p=s.parent||s;d?this.hasWalkedCache.hasWalked(p,d)||this.subwalks.add(p,d):this.matches.add(p,u,!0)}}else a instanceof RegExp&&this.subwalks.add(s,n)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new r(this.opts,this.hasWalkedCache)}filterEntries(e,t){let i=this.subwalks.get(e),s=this.child();for(let n of t)for(let o of i){let u=o.isAbsolute(),a=o.pattern(),h=o.rest();a===G?s.testGlobstar(n,o,h,u):a instanceof RegExp?s.testRegExp(n,a,h,u):s.testString(n,a,h,u)}return s}testGlobstar(e,t,i,s){if((this.dot||!e.name.startsWith("."))&&(t.hasMore()||this.matches.add(e,s,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(i&&t.checkFollowGlobstar()?this.subwalks.add(e,i):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),i){let n=i.pattern();if(typeof n=="string"&&n!==".."&&n!==""&&n!==".")this.testString(e,n,i.rest(),s);else if(n===".."){let o=e.parent||e;this.subwalks.add(o,i)}else n instanceof RegExp&&this.testRegExp(e,n,i.rest(),s)}}testRegExp(e,t,i,s){t.test(e.name)&&(i?this.subwalks.add(e,i):this.matches.add(e,s,!1))}testString(e,t,i,s){e.isNamed(t)&&(i?this.subwalks.add(e,i):this.matches.add(e,s,!1))}};var $f=(r,e)=>typeof r=="string"?new gt([r],e):Array.isArray(r)?new gt(r,e):r,Mi=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#n;signal;maxDepth;includeChildMatches;constructor(e,t,i){if(this.patterns=e,this.path=t,this.opts=i,this.#n=!i.posix&&i.platform==="win32"?"\\":"/",this.includeChildMatches=i.includeChildMatches!==!1,(i.ignore||!this.includeChildMatches)&&(this.#t=$f(i.ignore??[],i),!this.includeChildMatches&&typeof this.#t.add!="function")){let s="cannot ignore child matches, ignore lacks add() method.";throw new Error(s)}this.maxDepth=i.maxDepth||1/0,i.signal&&(this.signal=i.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#s(e){var t,i;return this.seen.has(e)||!!((i=(t=this.#t)==null?void 0:t.ignored)!=null&&i.call(t,e))}#o(e){var t,i;return!!((i=(t=this.#t)==null?void 0:t.childrenIgnored)!=null&&i.call(t,e))}pause(){this.paused=!0}resume(){var t;if((t=this.signal)!=null&&t.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){var t;(t=this.signal)!=null&&t.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||await e.realpath(),!i)return;e=i}let n=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&(n!=null&&n.isSymbolicLink())){let o=await n.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.lstat()}return this.matchCheckTest(n,t)}matchCheckTest(e,t){var i;return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!((i=e.realpathCached())!=null&&i.isDirectory()))&&!this.#s(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||e.realpathSync(),!i)return;e=i}let n=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&(n!=null&&n.isSymbolicLink())){let o=n.realpathSync();o&&(o!=null&&o.isUnknown()||this.opts.stat)&&o.lstatSync()}return this.matchCheckTest(n,t)}matchFinish(e,t){var n;if(this.#s(e))return;if(!this.includeChildMatches&&((n=this.#t)!=null&&n.add)){let o=`${e.relativePosix()}/**`;this.#t.add(o)}let i=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let s=this.opts.mark&&e.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(i){let o=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(o+s)}else{let o=this.opts.posix?e.relativePosix():e.relative(),u=this.opts.dotRelative&&!o.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(o?u+o+s:"."+s)}}async match(e,t,i){let s=await this.matchCheck(e,i);s&&this.matchFinish(s,t)}matchSync(e,t,i){let s=this.matchCheckSync(e,i);s&&this.matchFinish(s,t)}walkCB(e,t,i){var s;(s=this.signal)!=null&&s.aborted&&i(),this.walkCB2(e,t,new Ht(this.opts),i)}walkCB2(e,t,i,s){var u;if(this.#o(e))return s();if((u=this.signal)!=null&&u.aborted&&s(),this.paused){this.onResume(()=>this.walkCB2(e,t,i,s));return}i.processPatterns(e,t);let n=1,o=()=>{--n===0&&s()};for(let[a,h,l]of i.matches.entries())this.#s(a)||(n++,this.match(a,h,l).then(()=>o()));for(let a of i.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;n++;let h=a.readdirCached();a.calledReaddir()?this.walkCB3(a,h,i,o):a.readdirCB((l,c)=>this.walkCB3(a,c,i,o),!0)}o()}walkCB3(e,t,i,s){i=i.filterEntries(e,t);let n=1,o=()=>{--n===0&&s()};for(let[u,a,h]of i.matches.entries())this.#s(u)||(n++,this.match(u,a,h).then(()=>o()));for(let[u,a]of i.subwalks.entries())n++,this.walkCB2(u,a,i.child(),o);o()}walkCBSync(e,t,i){var s;(s=this.signal)!=null&&s.aborted&&i(),this.walkCB2Sync(e,t,new Ht(this.opts),i)}walkCB2Sync(e,t,i,s){var u;if(this.#o(e))return s();if((u=this.signal)!=null&&u.aborted&&s(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,i,s));return}i.processPatterns(e,t);let n=1,o=()=>{--n===0&&s()};for(let[a,h,l]of i.matches.entries())this.#s(a)||this.matchSync(a,h,l);for(let a of i.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;n++;let h=a.readdirSync();this.walkCB3Sync(a,h,i,o)}o()}walkCB3Sync(e,t,i,s){i=i.filterEntries(e,t);let n=1,o=()=>{--n===0&&s()};for(let[u,a,h]of i.matches.entries())this.#s(u)||this.matchSync(u,a,h);for(let[u,a]of i.subwalks.entries())n++,this.walkCB2Sync(u,a,i.child(),o);o()}},Vt=class extends Mi{matches=new Set;constructor(e,t,i){super(e,t,i)}matchEmit(e){this.matches.add(e)}async walk(){var e;if((e=this.signal)!=null&&e.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,i)=>{this.walkCB(this.path,this.patterns,()=>{var s;(s=this.signal)!=null&&s.aborted?i(this.signal.reason):t(this.matches)})}),this.matches}walkSync(){var e;if((e=this.signal)!=null&&e.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{var t;if((t=this.signal)!=null&&t.aborted)throw this.signal.reason}),this.matches}},qt=class extends Mi{results;constructor(e,t,i){super(e,t,i),this.results=new Re({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 zf=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",de=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,t){if(!t)throw new TypeError("glob options required");if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith("file://"))&&(t.cwd=(0,qa.fileURLToPath)(t.cwd)):this.cwd="",this.cwd=t.cwd||"",this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.includeChildMatches=t.includeChildMatches!==!1,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth=typeof t.maxDepth=="number"?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(a=>a.replace(/\\/g,"/"))),this.matchBase){if(t.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(a=>a.includes("/")?a:`./**/${a}`)}if(this.pattern=e,this.platform=t.platform||zf,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,t.nocase!==void 0&&t.nocase!==t.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let a=t.platform==="win32"?dt:t.platform==="darwin"?jt:t.platform?pt:Va;this.scurry=new a(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let i=this.platform==="darwin"||this.platform==="win32",s={...t,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},n=this.pattern.map(a=>new X(a,s)),[o,u]=n.reduce((a,h)=>(a[0].push(...h.set),a[1].push(...h.globParts),a),[[],[]]);this.patterns=o.map((a,h)=>{let l=u[h];if(!l)throw new Error("invalid pattern object");return new mt(a,l,0,this.platform)})}async walk(){return[...await new Vt(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 Vt(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 qt(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 qt(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 br=(r,e={})=>{Array.isArray(r)||(r=[r]);for(let t of r)if(new X(t,e).hasMagic())return!0;return!1};function Bi(r,e={}){return new de(r,e).streamSync()}function Ya(r,e={}){return new de(r,e).stream()}function Ka(r,e={}){return new de(r,e).walkSync()}async function Za(r,e={}){return new de(r,e).walk()}function Wi(r,e={}){return new de(r,e).iterateSync()}function Xa(r,e={}){return new de(r,e).iterate()}var Gf=Bi,jf=Object.assign(Ya,{sync:Bi}),Hf=Wi,Vf=Object.assign(Xa,{sync:Wi}),qf=Object.assign(Ka,{stream:Bi,iterate:Wi}),Ui=Object.assign(Za,{glob:Za,globSync:Ka,sync:qf,globStream:Ya,stream:jf,globStreamSync:Bi,streamSync:Gf,globIterate:Xa,iterate:Vf,globIterateSync:Wi,iterateSync:Hf,Glob:de,hasMagic:br,escape:at,unescape:le});Ui.glob=Ui;var _t=F(require("node:path"),1);var Ja=F(require("node:process"),1),Qa=F(require("node:path"),1),$i=F(require("node:fs"),1),eu=require("node:url");var tu={directory:"isDirectory",file:"isFile"};function Zf(r){if(!Object.hasOwnProperty.call(tu,r))throw new Error(`Invalid type specified: ${r}`)}var Yf=(r,e)=>e[tu[r]](),Kf=r=>r instanceof URL?(0,eu.fileURLToPath)(r):r;function wr(r,{cwd:e=Ja.default.cwd(),type:t="file",allowSymlinks:i=!0}={}){Zf(t),e=Kf(e);let s=i?$i.default.statSync:$i.default.lstatSync;for(let n of r)try{let o=s(Qa.default.resolve(e,n),{throwIfNoEntry:!1});if(!o)continue;if(Yf(t,o))return n}catch{}}var iu=require("node:url");function Er(r){return r instanceof URL?(0,iu.fileURLToPath)(r):r}var Xf=Symbol("findUpStop");function Jf(r,e={}){let t=_t.default.resolve(Er(e.cwd)??""),{root:i}=_t.default.parse(t),s=_t.default.resolve(t,Er(e.stopAt)??i),n=e.limit??Number.POSITIVE_INFINITY,o=[r].flat(),u=h=>{if(typeof r!="function")return wr(o,h);let l=r(h.cwd);return typeof l=="string"?wr([l],h):l},a=[];for(;;){let h=u({...e,cwd:t});if(h===Xf||(h&&a.push(_t.default.resolve(t,h)),t===s||a.length>=n))break;t=_t.default.dirname(t)}return a}function su(r,e={}){return Jf(r,{...e,limit:1})[0]}var Uu=F(Cu()),Bu=F(Iu());var Ji=F(require("node:process"),1),Nu=F(require("node:os"),1),Mr=F(require("node:tty"),1);function oe(r,e=globalThis.Deno?globalThis.Deno.args:Ji.default.argv){let t=r.startsWith("-")?"":r.length===1?"-":"--",i=e.indexOf(t+r),s=e.indexOf("--");return i!==-1&&(s===-1||i<s)}var{env:R}=Ji.default,Xi;oe("no-color")||oe("no-colors")||oe("color=false")||oe("color=never")?Xi=0:(oe("color")||oe("colors")||oe("color=true")||oe("color=always"))&&(Xi=1);function fd(){if(!("FORCE_COLOR"in R))return;if(R.FORCE_COLOR==="true")return 1;if(R.FORCE_COLOR==="false")return 0;if(R.FORCE_COLOR.length===0)return 1;let r=Math.min(Number.parseInt(R.FORCE_COLOR,10),3);if([0,1,2,3].includes(r))return r}function dd(r){return r===0?!1:{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}function pd(r,{streamIsTTY:e,sniffFlags:t=!0}={}){let i=fd();i!==void 0&&(Xi=i);let s=t?Xi:i;if(s===0)return 0;if(t){if(oe("color=16m")||oe("color=full")||oe("color=truecolor"))return 3;if(oe("color=256"))return 2}if("TF_BUILD"in R&&"AGENT_NAME"in R)return 1;if(r&&!e&&s===void 0)return 0;let n=s||0;if(R.TERM==="dumb")return n;if(Ji.default.platform==="win32"){let o=Nu.default.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in R)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in R)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in R)||R.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in R)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(R.TEAMCITY_VERSION)?1:0;if(R.COLORTERM==="truecolor"||R.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in R){let o=Number.parseInt((R.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(R.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(R.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(R.TERM)||"COLORTERM"in R?1:n}function Du(r,e={}){let t=pd(r,{streamIsTTY:r&&r.isTTY,...e});return dd(t)}var md={stdout:Du({isTTY:Mr.default.isatty(1)}),stderr:Du({isTTY:Mr.default.isatty(2)})},Ru=md;0&&(module.exports={StackUtils,StreamZip,WebSocket,WebSocketServer,ZipFile,codeFrameColumns,findUpSync,glob,open,program,sanitize,supportsColor});
40
+ >>> no match, partial?`,e,d,t,p),d===a))}let f;if(typeof l=="string"?(f=c===l,this.debug("string match",l,c,f)):(f=l.test(c),this.debug("pattern match",l,c,f)),!f)return!1}if(o===a&&u===h)return!0;if(o===a)return i;if(u===h)return o===a-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return Sa(this.pattern,this.options)}parse(e){Rt(e);let t=this.options;if(e==="**")return G;if(e==="")return"";let i,s=null;(i=e.match(nf))?s=t.dot?af:of:(i=e.match(Zc))?s=(t.nocase?t.dot?Jc:Xc:t.dot?Kc:Yc)(i[1]):(i=e.match(uf))?s=(t.nocase?t.dot?lf:hf:t.dot?cf:ff)(i):(i=e.match(Qc))?s=t.dot?tf:ef:(i=e.match(sf))&&(s=rf);let n=ot.fromGlob(e,this.options).toMMPattern();return s&&typeof n=="object"&&Reflect.defineProperty(n,"test",{value:s}),n}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,i=t.noglobstar?mf:t.dot?gf:_f,s=new Set(t.nocase?["i"]:[]),n=e.map(a=>{let h=a.map(l=>{if(l instanceof RegExp)for(let c of l.flags.split(""))s.add(c);return typeof l=="string"?Sf(l):l===G?G:l._src});return h.forEach((l,c)=>{let d=h[c+1],p=h[c-1];l!==G||p===G||(p===void 0?d!==void 0&&d!==G?h[c+1]="(?:\\/|"+i+"\\/)?"+d:h[c]=i:d===void 0?h[c-1]=p+"(?:\\/|"+i+")?":d!==G&&(h[c-1]=p+"(?:\\/|\\/"+i+"\\/)"+d,h[c+1]=G))}),h.filter(l=>l!==G).join("/")}).join("|"),[o,u]=e.length>1?["(?:",")"]:["",""];n="^"+o+n+u+"$",this.negate&&(n="^(?!"+n+").+$");try{this.regexp=new RegExp(n,[...s].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,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;let i=this.options;this.isWindows&&(e=e.split("\\").join("/"));let s=this.slashSplit(e);this.debug(this.pattern,"split",s);let n=this.set;this.debug(this.pattern,"set",n);let o=s[s.length-1];if(!o)for(let u=s.length-2;!o&&u>=0;u--)o=s[u];for(let u=0;u<n.length;u++){let a=n[u],h=s;if(i.matchBase&&a.length===1&&(h=[o]),this.matchOne(h,a,t))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(e){return V.defaults(e).Minimatch}};V.AST=ot;V.Minimatch=J;V.escape=at;V.unescape=le;var qa=require("node:url");var ut=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Oa=new Set,sr=typeof process=="object"&&process?process:{},va=(r,e,t,i)=>{typeof sr.emitWarning=="function"?sr.emitWarning(r,e,t,i):console.error(`[${t}] ${e}: ${r}`)},Si=globalThis.AbortController,xa=globalThis.AbortSignal,Ca;if(typeof Si>"u"){xa=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,s){this._onabort.push(s)}},Si=class{constructor(){e()}signal=new xa;abort(i){var s,n;if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let o of this.signal._onabort)o(i);(n=(s=this.signal).onabort)==null||n.call(s,i)}}};let r=((Ca=sr.env)==null?void 0:Ca.LRU_CACHE_IGNORE_AC_WARNING)!=="1",e=()=>{r&&(r=!1,va("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 xf=r=>!Oa.has(r),Bp=Symbol("type"),Ne=r=>r&&r===Math.floor(r)&&r>0&&isFinite(r),Ta=r=>Ne(r)?r<=Math.pow(2,8)?Uint8Array:r<=Math.pow(2,16)?Uint16Array:r<=Math.pow(2,32)?Uint32Array:r<=Number.MAX_SAFE_INTEGER?ht:null:null,ht=class extends Array{constructor(e){super(e),this.fill(0)}},rr=class r{heap;length;static#e=!1;static create(e){let t=Ta(e);if(!t)return[];r.#e=!0;let i=new r(e,t);return r.#e=!1,i}constructor(e,t){if(!r.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Ft=class r{#e;#t;#n;#r;#o;#E;#_;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#c;#u;#h;#i;#f;#b;#p;#m;#T;#g;#L;#S;#y;#w;#O;#d;#I;static unsafeExposeInternals(e){return{starts:e.#S,ttls:e.#y,sizes:e.#L,keyMap:e.#u,keyList:e.#h,valList:e.#i,next:e.#f,prev:e.#b,get head(){return e.#p},get tail(){return e.#m},free:e.#T,isBackgroundFetch:t=>e.#l(t),backgroundFetch:(t,i,s,n)=>e.#F(t,i,s,n),moveToTail:t=>e.#U(t),indexes:t=>e.#v(t),rindexes:t=>e.#A(t),isStale:t=>e.#C(t)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#c}get size(){return this.#a}get fetchMethod(){return this.#E}get memoMethod(){return this.#_}get dispose(){return this.#n}get onInsert(){return this.#r}get disposeAfter(){return this.#o}constructor(e){let{max:t=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:o,updateAgeOnHas:u,allowStale:a,dispose:h,onInsert:l,disposeAfter:c,noDisposeOnSet:d,noUpdateTTL:p,maxSize:m=0,maxEntrySize:f=0,sizeCalculation:w,fetchMethod:_,memoMethod:C,noDeleteOnFetchRejection:y,noDeleteOnStaleGet:E,allowStaleOnFetchRejection:L,allowStaleOnFetchAbort:U,ignoreFetchAbort:K}=e;if(t!==0&&!Ne(t))throw new TypeError("max option must be a nonnegative integer");let me=t?Ta(t):Array;if(!me)throw new Error("invalid max value: "+t);if(this.#e=t,this.#t=m,this.maxEntrySize=f||this.#t,this.sizeCalculation=w,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(C!==void 0&&typeof C!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#_=C,_!==void 0&&typeof _!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#E=_,this.#O=!!_,this.#u=new Map,this.#h=new Array(t).fill(void 0),this.#i=new Array(t).fill(void 0),this.#f=new me(t),this.#b=new me(t),this.#p=0,this.#m=0,this.#T=rr.create(t),this.#a=0,this.#c=0,typeof h=="function"&&(this.#n=h),typeof l=="function"&&(this.#r=l),typeof c=="function"?(this.#o=c,this.#g=[]):(this.#o=void 0,this.#g=void 0),this.#w=!!this.#n,this.#I=!!this.#r,this.#d=!!this.#o,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!y,this.allowStaleOnFetchRejection=!!L,this.allowStaleOnFetchAbort=!!U,this.ignoreFetchAbort=!!K,this.maxEntrySize!==0){if(this.#t!==0&&!Ne(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!Ne(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#W()}if(this.allowStale=!!a,this.noDeleteOnStaleGet=!!E,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!u,this.ttlResolution=Ne(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!Ne(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#s()}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 Y="LRU_CACHE_UNBOUNDED";xf(Y)&&(Oa.add(Y),va("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",Y,r))}}getRemainingTTL(e){return this.#u.has(e)?1/0:0}#s(){let e=new ht(this.#e),t=new ht(this.#e);this.#y=e,this.#S=t,this.#D=(n,o,u=ut.now())=>{if(t[n]=o!==0?u:0,e[n]=o,o!==0&&this.ttlAutopurge){let a=setTimeout(()=>{this.#C(n)&&this.#N(this.#h[n],"expire")},o+1);a.unref&&a.unref()}},this.#R=n=>{t[n]=e[n]!==0?ut.now():0},this.#x=(n,o)=>{if(e[o]){let u=e[o],a=t[o];if(!u||!a)return;n.ttl=u,n.start=a,n.now=i||s();let h=n.now-a;n.remainingTTL=u-h}};let i=0,s=()=>{let n=ut.now();if(this.ttlResolution>0){i=n;let o=setTimeout(()=>i=0,this.ttlResolution);o.unref&&o.unref()}return n};this.getRemainingTTL=n=>{let o=this.#u.get(n);if(o===void 0)return 0;let u=e[o],a=t[o];if(!u||!a)return 1/0;let h=(i||s())-a;return u-h},this.#C=n=>{let o=t[n],u=e[n];return!!u&&!!o&&(i||s())-o>u}}#R=()=>{};#x=()=>{};#D=()=>{};#C=()=>!1;#W(){let e=new ht(this.#e);this.#c=0,this.#L=e,this.#k=t=>{this.#c-=e[t],e[t]=0},this.#$=(t,i,s,n)=>{if(this.#l(i))return 0;if(!Ne(s))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(i,t),!Ne(s))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 s},this.#P=(t,i,s)=>{if(e[t]=i,this.#t){let n=this.#t-e[t];for(;this.#c>n;)this.#M(!0)}this.#c+=e[t],s&&(s.entrySize=i,s.totalCalculatedSize=this.#c)}}#k=e=>{};#P=(e,t,i)=>{};#$=(e,t,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#v({allowStale:e=this.allowStale}={}){if(this.#a)for(let t=this.#m;!(!this.#z(t)||((e||!this.#C(t))&&(yield t),t===this.#p));)t=this.#b[t]}*#A({allowStale:e=this.allowStale}={}){if(this.#a)for(let t=this.#p;!(!this.#z(t)||((e||!this.#C(t))&&(yield t),t===this.#m));)t=this.#f[t]}#z(e){return e!==void 0&&this.#u.get(this.#h[e])===e}*entries(){for(let e of this.#v())this.#i[e]!==void 0&&this.#h[e]!==void 0&&!this.#l(this.#i[e])&&(yield[this.#h[e],this.#i[e]])}*rentries(){for(let e of this.#A())this.#i[e]!==void 0&&this.#h[e]!==void 0&&!this.#l(this.#i[e])&&(yield[this.#h[e],this.#i[e]])}*keys(){for(let e of this.#v()){let t=this.#h[e];t!==void 0&&!this.#l(this.#i[e])&&(yield t)}}*rkeys(){for(let e of this.#A()){let t=this.#h[e];t!==void 0&&!this.#l(this.#i[e])&&(yield t)}}*values(){for(let e of this.#v())this.#i[e]!==void 0&&!this.#l(this.#i[e])&&(yield this.#i[e])}*rvalues(){for(let e of this.#A())this.#i[e]!==void 0&&!this.#l(this.#i[e])&&(yield this.#i[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let i of this.#v()){let s=this.#i[i],n=this.#l(s)?s.__staleWhileFetching:s;if(n!==void 0&&e(n,this.#h[i],this))return this.get(this.#h[i],t)}}forEach(e,t=this){for(let i of this.#v()){let s=this.#i[i],n=this.#l(s)?s.__staleWhileFetching:s;n!==void 0&&e.call(t,n,this.#h[i],this)}}rforEach(e,t=this){for(let i of this.#A()){let s=this.#i[i],n=this.#l(s)?s.__staleWhileFetching:s;n!==void 0&&e.call(t,n,this.#h[i],this)}}purgeStale(){let e=!1;for(let t of this.#A({allowStale:!0}))this.#C(t)&&(this.#N(this.#h[t],"expire"),e=!0);return e}info(e){let t=this.#u.get(e);if(t===void 0)return;let i=this.#i[t],s=this.#l(i)?i.__staleWhileFetching:i;if(s===void 0)return;let n={value:s};if(this.#y&&this.#S){let o=this.#y[t],u=this.#S[t];if(o&&u){let a=o-(ut.now()-u);n.ttl=a,n.start=Date.now()}}return this.#L&&(n.size=this.#L[t]),n}dump(){let e=[];for(let t of this.#v({allowStale:!0})){let i=this.#h[t],s=this.#i[t],n=this.#l(s)?s.__staleWhileFetching:s;if(n===void 0||i===void 0)continue;let o={value:n};if(this.#y&&this.#S){o.ttl=this.#y[t];let u=ut.now()-this.#S[t];o.start=Math.floor(Date.now()-u)}this.#L&&(o.size=this.#L[t]),e.unshift([i,o])}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let s=Date.now()-i.start;i.start=ut.now()-s}this.set(t,i.value,i)}}set(e,t,i={}){var d,p,m,f,w,_,C;if(t===void 0)return this.delete(e),this;let{ttl:s=this.ttl,start:n,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:u=this.sizeCalculation,status:a}=i,{noUpdateTTL:h=this.noUpdateTTL}=i,l=this.#$(e,t,i.size||0,u);if(this.maxEntrySize&&l>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.#N(e,"set"),this;let c=this.#a===0?void 0:this.#u.get(e);if(c===void 0)c=this.#a===0?this.#m:this.#T.length!==0?this.#T.pop():this.#a===this.#e?this.#M(!1):this.#a,this.#h[c]=e,this.#i[c]=t,this.#u.set(e,c),this.#f[this.#m]=c,this.#b[c]=this.#m,this.#m=c,this.#a++,this.#P(c,l,a),a&&(a.set="add"),h=!1,this.#I&&((d=this.#r)==null||d.call(this,t,e,"add"));else{this.#U(c);let y=this.#i[c];if(t!==y){if(this.#O&&this.#l(y)){y.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:E}=y;E!==void 0&&!o&&(this.#w&&((p=this.#n)==null||p.call(this,E,e,"set")),this.#d&&((m=this.#g)==null||m.push([E,e,"set"])))}else o||(this.#w&&((f=this.#n)==null||f.call(this,y,e,"set")),this.#d&&((w=this.#g)==null||w.push([y,e,"set"])));if(this.#k(c),this.#P(c,l,a),this.#i[c]=t,a){a.set="replace";let E=y&&this.#l(y)?y.__staleWhileFetching:y;E!==void 0&&(a.oldValue=E)}}else a&&(a.set="update");this.#I&&((_=this.onInsert)==null||_.call(this,t,e,t===y?"update":"replace"))}if(s!==0&&!this.#y&&this.#s(),this.#y&&(h||this.#D(c,s,n),a&&this.#x(a,c)),!o&&this.#d&&this.#g){let y=this.#g,E;for(;E=y==null?void 0:y.shift();)(C=this.#o)==null||C.call(this,...E)}return this}pop(){var e;try{for(;this.#a;){let t=this.#i[this.#p];if(this.#M(!0),this.#l(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#d&&this.#g){let t=this.#g,i;for(;i=t==null?void 0:t.shift();)(e=this.#o)==null||e.call(this,...i)}}}#M(e){var n,o;let t=this.#p,i=this.#h[t],s=this.#i[t];return this.#O&&this.#l(s)?s.__abortController.abort(new Error("evicted")):(this.#w||this.#d)&&(this.#w&&((n=this.#n)==null||n.call(this,s,i,"evict")),this.#d&&((o=this.#g)==null||o.push([s,i,"evict"]))),this.#k(t),e&&(this.#h[t]=void 0,this.#i[t]=void 0,this.#T.push(t)),this.#a===1?(this.#p=this.#m=0,this.#T.length=0):this.#p=this.#f[t],this.#u.delete(i),this.#a--,t}has(e,t={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=t,n=this.#u.get(e);if(n!==void 0){let o=this.#i[n];if(this.#l(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#C(n))s&&(s.has="stale",this.#x(s,n));else return i&&this.#R(n),s&&(s.has="hit",this.#x(s,n)),!0}else s&&(s.has="miss");return!1}peek(e,t={}){let{allowStale:i=this.allowStale}=t,s=this.#u.get(e);if(s===void 0||!i&&this.#C(s))return;let n=this.#i[s];return this.#l(n)?n.__staleWhileFetching:n}#F(e,t,i,s){let n=t===void 0?void 0:this.#i[t];if(this.#l(n))return n;let o=new Si,{signal:u}=i;u==null||u.addEventListener("abort",()=>o.abort(u.reason),{signal:o.signal});let a={signal:o.signal,options:i,context:s},h=(f,w=!1)=>{let{aborted:_}=o.signal,C=i.ignoreFetchAbort&&f!==void 0;if(i.status&&(_&&!w?(i.status.fetchAborted=!0,i.status.fetchError=o.signal.reason,C&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),_&&!C&&!w)return c(o.signal.reason);let y=p;return this.#i[t]===p&&(f===void 0?y.__staleWhileFetching?this.#i[t]=y.__staleWhileFetching:this.#N(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(e,f,a.options))),f},l=f=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=f),c(f)),c=f=>{let{aborted:w}=o.signal,_=w&&i.allowStaleOnFetchAbort,C=_||i.allowStaleOnFetchRejection,y=C||i.noDeleteOnFetchRejection,E=p;if(this.#i[t]===p&&(!y||E.__staleWhileFetching===void 0?this.#N(e,"fetch"):_||(this.#i[t]=E.__staleWhileFetching)),C)return i.status&&E.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),E.__staleWhileFetching;if(E.__returned===E)throw f},d=(f,w)=>{var C;let _=(C=this.#E)==null?void 0:C.call(this,e,n,a);_&&_ instanceof Promise&&_.then(y=>f(y===void 0?void 0:y),w),o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(f(void 0),i.allowStaleOnFetchAbort&&(f=y=>h(y,!0)))})};i.status&&(i.status.fetchDispatched=!0);let p=new Promise(d).then(h,l),m=Object.assign(p,{__abortController:o,__staleWhileFetching:n,__returned:void 0});return t===void 0?(this.set(e,m,{...a.options,status:void 0}),t=this.#u.get(e)):this.#i[t]=m,m}#l(e){if(!this.#O)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof Si}async fetch(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:a=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:m=this.allowStaleOnFetchAbort,context:f,forceRefresh:w=!1,status:_,signal:C}=t;if(!this.#O)return _&&(_.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:_});let y={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:o,noDisposeOnSet:u,size:a,sizeCalculation:h,noUpdateTTL:l,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:m,ignoreFetchAbort:p,status:_,signal:C},E=this.#u.get(e);if(E===void 0){_&&(_.fetch="miss");let L=this.#F(e,E,y,f);return L.__returned=L}else{let L=this.#i[E];if(this.#l(L)){let Le=i&&L.__staleWhileFetching!==void 0;return _&&(_.fetch="inflight",Le&&(_.returnedStale=!0)),Le?L.__staleWhileFetching:L.__returned=L}let U=this.#C(E);if(!w&&!U)return _&&(_.fetch="hit"),this.#U(E),s&&this.#R(E),_&&this.#x(_,E),L;let K=this.#F(e,E,y,f),Y=K.__staleWhileFetching!==void 0&&i;return _&&(_.fetch=U?"stale":"refresh",Y&&U&&(_.returnedStale=!0)),Y?K.__staleWhileFetching:K.__returned=K}}async forceFetch(e,t={}){let i=await this.fetch(e,t);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,t={}){let i=this.#_;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:n,...o}=t,u=this.get(e,o);if(!n&&u!==void 0)return u;let a=i(e,u,{options:o,context:s});return this.set(e,a,o),a}get(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:o}=t,u=this.#u.get(e);if(u!==void 0){let a=this.#i[u],h=this.#l(a);return o&&this.#x(o,u),this.#C(u)?(o&&(o.get="stale"),h?(o&&i&&a.__staleWhileFetching!==void 0&&(o.returnedStale=!0),i?a.__staleWhileFetching:void 0):(n||this.#N(e,"expire"),o&&i&&(o.returnedStale=!0),i?a:void 0)):(o&&(o.get="hit"),h?a.__staleWhileFetching:(this.#U(u),s&&this.#R(u),a))}else o&&(o.get="miss")}#G(e,t){this.#b[t]=e,this.#f[e]=t}#U(e){e!==this.#m&&(e===this.#p?this.#p=this.#f[e]:this.#G(this.#b[e],this.#f[e]),this.#G(this.#m,e),this.#m=e)}delete(e){return this.#N(e,"delete")}#N(e,t){var s,n,o,u;let i=!1;if(this.#a!==0){let a=this.#u.get(e);if(a!==void 0)if(i=!0,this.#a===1)this.#B(t);else{this.#k(a);let h=this.#i[a];if(this.#l(h)?h.__abortController.abort(new Error("deleted")):(this.#w||this.#d)&&(this.#w&&((s=this.#n)==null||s.call(this,h,e,t)),this.#d&&((n=this.#g)==null||n.push([h,e,t]))),this.#u.delete(e),this.#h[a]=void 0,this.#i[a]=void 0,a===this.#m)this.#m=this.#b[a];else if(a===this.#p)this.#p=this.#f[a];else{let l=this.#b[a];this.#f[l]=this.#f[a];let c=this.#f[a];this.#b[c]=this.#b[a]}this.#a--,this.#T.push(a)}}if(this.#d&&((o=this.#g)!=null&&o.length)){let a=this.#g,h;for(;h=a==null?void 0:a.shift();)(u=this.#o)==null||u.call(this,...h)}return i}clear(){return this.#B("delete")}#B(e){var t,i,s;for(let n of this.#A({allowStale:!0})){let o=this.#i[n];if(this.#l(o))o.__abortController.abort(new Error("deleted"));else{let u=this.#h[n];this.#w&&((t=this.#n)==null||t.call(this,o,u,e)),this.#d&&((i=this.#g)==null||i.push([o,u,e]))}}if(this.#u.clear(),this.#i.fill(void 0),this.#h.fill(void 0),this.#y&&this.#S&&(this.#y.fill(0),this.#S.fill(0)),this.#L&&this.#L.fill(0),this.#p=0,this.#m=0,this.#T.length=0,this.#c=0,this.#a=0,this.#d&&this.#g){let n=this.#g,o;for(;o=n==null?void 0:n.shift();)(s=this.#o)==null||s.call(this,...o)}}};var ft=require("node:path"),Ma=require("node:url"),Ee=require("fs"),Rf=F(require("node:fs"),1),Fe=require("node:fs/promises");var Ai=require("node:events"),cr=F(require("node:stream"),1),Na=require("node:string_decoder"),La=typeof process=="object"&&process?process:{stdout:null,stderr:null},Cf=r=>!!r&&typeof r=="object"&&(r instanceof ke||r instanceof cr.default||Of(r)||vf(r)),Of=r=>!!r&&typeof r=="object"&&r instanceof Ai.EventEmitter&&typeof r.pipe=="function"&&r.pipe!==cr.default.Writable.prototype.pipe,vf=r=>!!r&&typeof r=="object"&&r instanceof Ai.EventEmitter&&typeof r.write=="function"&&typeof r.end=="function",ve=Symbol("EOF"),Te=Symbol("maybeEmitEnd"),Re=Symbol("emittedEnd"),xi=Symbol("emittingEnd"),Pt=Symbol("emittedError"),Ci=Symbol("closed"),Aa=Symbol("read"),Oi=Symbol("flush"),Ia=Symbol("flushChunk"),ce=Symbol("encoding"),lt=Symbol("decoder"),W=Symbol("flowing"),Mt=Symbol("paused"),ct=Symbol("resume"),$=Symbol("buffer"),q=Symbol("pipes"),z=Symbol("bufferLength"),nr=Symbol("bufferPush"),vi=Symbol("bufferShift"),j=Symbol("objectMode"),P=Symbol("destroyed"),or=Symbol("error"),ar=Symbol("emitData"),Da=Symbol("emitEnd"),ur=Symbol("emitEnd2"),be=Symbol("async"),hr=Symbol("abort"),Ti=Symbol("aborted"),Ut=Symbol("signal"),Ye=Symbol("dataListeners"),Q=Symbol("discarded"),Bt=r=>Promise.resolve().then(r),Tf=r=>r(),Lf=r=>r==="end"||r==="finish"||r==="prefinish",Af=r=>r instanceof ArrayBuffer||!!r&&typeof r=="object"&&r.constructor&&r.constructor.name==="ArrayBuffer"&&r.byteLength>=0,If=r=>!Buffer.isBuffer(r)&&ArrayBuffer.isView(r),Li=class{src;dest;opts;ondrain;constructor(e,t,i){this.src=e,this.dest=t,this.opts=i,this.ondrain=()=>e[ct](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},lr=class extends Li{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,i){super(e,t,i),this.proxyErrors=s=>t.emit("error",s),e.on("error",this.proxyErrors)}},Df=r=>!!r.objectMode,Nf=r=>!r.objectMode&&!!r.encoding&&r.encoding!=="buffer",ke=class extends Ai.EventEmitter{[W]=!1;[Mt]=!1;[q]=[];[$]=[];[j];[ce];[be];[lt];[ve]=!1;[Re]=!1;[xi]=!1;[Ci]=!1;[Pt]=null;[z]=0;[P]=!1;[Ut];[Ti]=!1;[Ye]=0;[Q]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");Df(t)?(this[j]=!0,this[ce]=null):Nf(t)?(this[ce]=t.encoding,this[j]=!1):(this[j]=!1,this[ce]=null),this[be]=!!t.async,this[lt]=this[ce]?new Na.StringDecoder(this[ce]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[$]}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[q]});let{signal:i}=t;i&&(this[Ut]=i,i.aborted?this[hr]():i.addEventListener("abort",()=>this[hr]()))}get bufferLength(){return this[z]}get encoding(){return this[ce]}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[j]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[be]}set async(e){this[be]=this[be]||!!e}[hr](){var e,t;this[Ti]=!0,this.emit("abort",(e=this[Ut])==null?void 0:e.reason),this.destroy((t=this[Ut])==null?void 0:t.reason)}get aborted(){return this[Ti]}set aborted(e){}write(e,t,i){var n;if(this[Ti])return!1;if(this[ve])throw new Error("write after end");if(this[P])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof t=="function"&&(i=t,t="utf8"),t||(t="utf8");let s=this[be]?Bt:Tf;if(!this[j]&&!Buffer.isBuffer(e)){if(If(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(Af(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[j]?(this[W]&&this[z]!==0&&this[Oi](!0),this[W]?this.emit("data",e):this[nr](e),this[z]!==0&&this.emit("readable"),i&&s(i),this[W]):e.length?(typeof e=="string"&&!(t===this[ce]&&!((n=this[lt])!=null&&n.lastNeed))&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[ce]&&(e=this[lt].write(e)),this[W]&&this[z]!==0&&this[Oi](!0),this[W]?this.emit("data",e):this[nr](e),this[z]!==0&&this.emit("readable"),i&&s(i),this[W]):(this[z]!==0&&this.emit("readable"),i&&s(i),this[W])}read(e){if(this[P])return null;if(this[Q]=!1,this[z]===0||e===0||e&&e>this[z])return this[Te](),null;this[j]&&(e=null),this[$].length>1&&!this[j]&&(this[$]=[this[ce]?this[$].join(""):Buffer.concat(this[$],this[z])]);let t=this[Aa](e||null,this[$][0]);return this[Te](),t}[Aa](e,t){if(this[j])this[vi]();else{let i=t;e===i.length||e===null?this[vi]():typeof i=="string"?(this[$][0]=i.slice(e),t=i.slice(0,e),this[z]-=e):(this[$][0]=i.subarray(e),t=i.subarray(0,e),this[z]-=e)}return this.emit("data",t),!this[$].length&&!this[ve]&&this.emit("drain"),t}end(e,t,i){return typeof e=="function"&&(i=e,e=void 0),typeof t=="function"&&(i=t,t="utf8"),e!==void 0&&this.write(e,t),i&&this.once("end",i),this[ve]=!0,this.writable=!1,(this[W]||!this[Mt])&&this[Te](),this}[ct](){this[P]||(!this[Ye]&&!this[q].length&&(this[Q]=!0),this[Mt]=!1,this[W]=!0,this.emit("resume"),this[$].length?this[Oi]():this[ve]?this[Te]():this.emit("drain"))}resume(){return this[ct]()}pause(){this[W]=!1,this[Mt]=!0,this[Q]=!1}get destroyed(){return this[P]}get flowing(){return this[W]}get paused(){return this[Mt]}[nr](e){this[j]?this[z]+=1:this[z]+=e.length,this[$].push(e)}[vi](){return this[j]?this[z]-=1:this[z]-=this[$][0].length,this[$].shift()}[Oi](e=!1){do;while(this[Ia](this[vi]())&&this[$].length);!e&&!this[$].length&&!this[ve]&&this.emit("drain")}[Ia](e){return this.emit("data",e),this[W]}pipe(e,t){if(this[P])return e;this[Q]=!1;let i=this[Re];return t=t||{},e===La.stdout||e===La.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,i?t.end&&e.end():(this[q].push(t.proxyErrors?new lr(this,e,t):new Li(this,e,t)),this[be]?Bt(()=>this[ct]()):this[ct]()),e}unpipe(e){let t=this[q].find(i=>i.dest===e);t&&(this[q].length===1?(this[W]&&this[Ye]===0&&(this[W]=!1),this[q]=[]):this[q].splice(this[q].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let i=super.on(e,t);if(e==="data")this[Q]=!1,this[Ye]++,!this[q].length&&!this[W]&&this[ct]();else if(e==="readable"&&this[z]!==0)super.emit("readable");else if(Lf(e)&&this[Re])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[Pt]){let s=t;this[be]?Bt(()=>s.call(this,this[Pt])):s.call(this,this[Pt])}return i}removeListener(e,t){return this.off(e,t)}off(e,t){let i=super.off(e,t);return e==="data"&&(this[Ye]=this.listeners("data").length,this[Ye]===0&&!this[Q]&&!this[q].length&&(this[W]=!1)),i}removeAllListeners(e){let t=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Ye]=0,!this[Q]&&!this[q].length&&(this[W]=!1)),t}get emittedEnd(){return this[Re]}[Te](){!this[xi]&&!this[Re]&&!this[P]&&this[$].length===0&&this[ve]&&(this[xi]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Ci]&&this.emit("close"),this[xi]=!1)}emit(e,...t){let i=t[0];if(e!=="error"&&e!=="close"&&e!==P&&this[P])return!1;if(e==="data")return!this[j]&&!i?!1:this[be]?(Bt(()=>this[ar](i)),!0):this[ar](i);if(e==="end")return this[Da]();if(e==="close"){if(this[Ci]=!0,!this[Re]&&!this[P])return!1;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[Pt]=i,super.emit(or,i);let n=!this[Ut]||this.listeners("error").length?super.emit("error",i):!1;return this[Te](),n}else if(e==="resume"){let n=super.emit("resume");return this[Te](),n}else if(e==="finish"||e==="prefinish"){let n=super.emit(e);return this.removeAllListeners(e),n}let s=super.emit(e,...t);return this[Te](),s}[ar](e){for(let i of this[q])i.dest.write(e)===!1&&this.pause();let t=this[Q]?!1:super.emit("data",e);return this[Te](),t}[Da](){return this[Re]?!1:(this[Re]=!0,this.readable=!1,this[be]?(Bt(()=>this[ur]()),!0):this[ur]())}[ur](){if(this[lt]){let t=this[lt].end();if(t){for(let i of this[q])i.dest.write(t);this[Q]||super.emit("data",t)}}for(let t of this[q])t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[j]||(e.dataLength=0);let t=this.promise();return this.on("data",i=>{e.push(i),this[j]||(e.dataLength+=i.length)}),await t,e}async concat(){if(this[j])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[ce]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(P,()=>t(new Error("stream destroyed"))),this.on("error",i=>t(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Q]=!1;let e=!1,t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();let s=this.read();if(s!==null)return Promise.resolve({done:!1,value:s});if(this[ve])return t();let n,o,u=c=>{this.off("data",a),this.off("end",h),this.off(P,l),t(),o(c)},a=c=>{this.off("error",u),this.off("end",h),this.off(P,l),this.pause(),n({value:c,done:!!this[ve]})},h=()=>{this.off("error",u),this.off("data",a),this.off(P,l),t(),n({done:!0,value:void 0})},l=()=>u(new Error("stream destroyed"));return new Promise((c,d)=>{o=d,n=c,this.once(P,l),this.once("error",u),this.once("end",h),this.once("data",a)})},throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Q]=!1;let e=!1,t=()=>(this.pause(),this.off(or,t),this.off(P,t),this.off("end",t),e=!0,{done:!0,value:void 0}),i=()=>{if(e)return t();let s=this.read();return s===null?t():{done:!1,value:s}};return this.once("end",t),this.once(or,t),this.once(P,t),{next:i,throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[P])return e?this.emit("error",e):this.emit(P),this;this[P]=!0,this[Q]=!0,this[$].length=0,this[z]=0;let t=this;return typeof t.close=="function"&&!this[Ci]&&t.close(),e?this.emit("error",e):this.emit(P),this}static get isStream(){return Cf}};var kf=Ee.realpathSync.native,$t={lstatSync:Ee.lstatSync,readdir:Ee.readdir,readdirSync:Ee.readdirSync,readlinkSync:Ee.readlinkSync,realpathSync:kf,promises:{lstat:Fe.lstat,readdir:Fe.readdir,readlink:Fe.readlink,realpath:Fe.realpath}},Ua=r=>!r||r===$t||r===Rf?$t:{...$t,...r,promises:{...$t.promises,...r.promises||{}}},Ba=/^\\\\\?\\([a-z]:)\\?$/i,Ff=r=>r.replace(/\//g,"\\").replace(Ba,"$1\\"),Pf=/[\\\/]/,ne=0,Wa=1,$a=2,we=4,za=6,Ga=8,Ke=10,ja=12,re=15,Wt=~re,fr=16,Ra=32,zt=64,fe=128,Ii=256,Ni=512,ka=zt|fe|Ni,Mf=1023,dr=r=>r.isFile()?Ga:r.isDirectory()?we:r.isSymbolicLink()?Ke:r.isCharacterDevice()?$a:r.isBlockDevice()?za:r.isSocket()?ja:r.isFIFO()?Wa:ne,Fa=new Map,Gt=r=>{let e=Fa.get(r);if(e)return e;let t=r.normalize("NFKD");return Fa.set(r,t),t},Pa=new Map,Di=r=>{let e=Pa.get(r);if(e)return e;let t=Gt(r.toLowerCase());return Pa.set(r,t),t},Ri=class extends Ft{constructor(){super({max:256})}},pr=class extends Ft{constructor(e=16*1024){super({maxSize:e,sizeCalculation:t=>t.length+1})}},Ha=Symbol("PathScurry setAsCwd"),H=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#n;get mode(){return this.#n}#r;get nlink(){return this.#r}#o;get uid(){return this.#o}#E;get gid(){return this.#E}#_;get rdev(){return this.#_}#a;get blksize(){return this.#a}#c;get ino(){return this.#c}#u;get size(){return this.#u}#h;get blocks(){return this.#h}#i;get atimeMs(){return this.#i}#f;get mtimeMs(){return this.#f}#b;get ctimeMs(){return this.#b}#p;get birthtimeMs(){return this.#p}#m;get atime(){return this.#m}#T;get mtime(){return this.#T}#g;get ctime(){return this.#g}#L;get birthtime(){return this.#L}#S;#y;#w;#O;#d;#I;#s;#R;#x;#D;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=ne,i,s,n,o,u){this.name=e,this.#S=n?Di(e):Gt(e),this.#s=t&Mf,this.nocase=n,this.roots=s,this.root=i||this,this.#R=o,this.#w=u.fullpath,this.#d=u.relative,this.#I=u.relativePosix,this.parent=u.parent,this.parent?this.#e=this.parent.#e:this.#e=Ua(u.fs)}depth(){return this.#y!==void 0?this.#y:this.parent?this.#y=this.parent.depth()+1:this.#y=0}childrenCache(){return this.#R}resolve(e){if(!e)return this;let t=this.getRootString(e),s=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#C(s):this.#C(s)}#C(e){let t=this;for(let i of e)t=t.child(i);return t}children(){let e=this.#R.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#R.set(this,t),this.#s&=~fr,t}child(e,t){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let i=this.children(),s=this.nocase?Di(e):Gt(e);for(let a of i)if(a.#S===s)return a;let n=this.parent?this.sep:"",o=this.#w?this.#w+n+e:void 0,u=this.newChild(e,ne,{...t,parent:this,fullpath:o});return this.canReaddir()||(u.#s|=fe),i.push(u),u}relative(){if(this.isCWD)return"";if(this.#d!==void 0)return this.#d;let e=this.name,t=this.parent;if(!t)return this.#d=this.name;let i=t.relative();return i+(!i||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#I!==void 0)return this.#I;let e=this.name,t=this.parent;if(!t)return this.#I=this.fullpathPosix();let i=t.relativePosix();return i+(!i||!t.parent?"":"/")+e}fullpath(){if(this.#w!==void 0)return this.#w;let e=this.name,t=this.parent;if(!t)return this.#w=this.name;let s=t.fullpath()+(t.parent?this.sep:"")+e;return this.#w=s}fullpathPosix(){if(this.#O!==void 0)return this.#O;if(this.sep==="/")return this.#O=this.fullpath();if(!this.parent){let s=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(s)?this.#O=`//?/${s}`:this.#O=s}let e=this.parent,t=e.fullpathPosix(),i=t+(!t||!e.parent?"":"/")+this.name;return this.#O=i}isUnknown(){return(this.#s&re)===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.#s&re)===Ga}isDirectory(){return(this.#s&re)===we}isCharacterDevice(){return(this.#s&re)===$a}isBlockDevice(){return(this.#s&re)===za}isFIFO(){return(this.#s&re)===Wa}isSocket(){return(this.#s&re)===ja}isSymbolicLink(){return(this.#s&Ke)===Ke}lstatCached(){return this.#s&Ra?this:void 0}readlinkCached(){return this.#x}realpathCached(){return this.#D}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#x)return!0;if(!this.parent)return!1;let e=this.#s&re;return!(e!==ne&&e!==Ke||this.#s&Ii||this.#s&fe)}calledReaddir(){return!!(this.#s&fr)}isENOENT(){return!!(this.#s&fe)}isNamed(e){return this.nocase?this.#S===Di(e):this.#S===Gt(e)}async readlink(){var t;let e=this.#x;if(e)return e;if(this.canReadlink()&&this.parent)try{let i=await this.#e.promises.readlink(this.fullpath()),s=(t=await this.parent.realpath())==null?void 0:t.resolve(i);if(s)return this.#x=s}catch(i){this.#M(i.code);return}}readlinkSync(){var t;let e=this.#x;if(e)return e;if(this.canReadlink()&&this.parent)try{let i=this.#e.readlinkSync(this.fullpath()),s=(t=this.parent.realpathSync())==null?void 0:t.resolve(i);if(s)return this.#x=s}catch(i){this.#M(i.code);return}}#W(e){this.#s|=fr;for(let t=e.provisional;t<e.length;t++){let i=e[t];i&&i.#k()}}#k(){this.#s&fe||(this.#s=(this.#s|fe)&Wt,this.#P())}#P(){let e=this.children();e.provisional=0;for(let t of e)t.#k()}#$(){this.#s|=Ni,this.#v()}#v(){if(this.#s&zt)return;let e=this.#s;(e&re)===we&&(e&=Wt),this.#s=e|zt,this.#P()}#A(e=""){e==="ENOTDIR"||e==="EPERM"?this.#v():e==="ENOENT"?this.#k():this.children().provisional=0}#z(e=""){e==="ENOTDIR"?this.parent.#v():e==="ENOENT"&&this.#k()}#M(e=""){let t=this.#s;t|=Ii,e==="ENOENT"&&(t|=fe),(e==="EINVAL"||e==="UNKNOWN")&&(t&=Wt),this.#s=t,e==="ENOTDIR"&&this.parent&&this.parent.#v()}#F(e,t){return this.#G(e,t)||this.#l(e,t)}#l(e,t){let i=dr(e),s=this.newChild(e.name,i,{parent:this}),n=s.#s&re;return n!==we&&n!==Ke&&n!==ne&&(s.#s|=zt),t.unshift(s),t.provisional++,s}#G(e,t){for(let i=t.provisional;i<t.length;i++){let s=t[i];if((this.nocase?Di(e.name):Gt(e.name))===s.#S)return this.#U(e,s,i,t)}}#U(e,t,i,s){let n=t.name;return t.#s=t.#s&Wt|dr(e),n!==e.name&&(t.name=e.name),i!==s.provisional&&(i===s.length-1?s.pop():s.splice(i,1),s.unshift(t)),s.provisional++,t}async lstat(){if((this.#s&fe)===0)try{return this.#N(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#z(e.code)}}lstatSync(){if((this.#s&fe)===0)try{return this.#N(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#z(e.code)}}#N(e){let{atime:t,atimeMs:i,birthtime:s,birthtimeMs:n,blksize:o,blocks:u,ctime:a,ctimeMs:h,dev:l,gid:c,ino:d,mode:p,mtime:m,mtimeMs:f,nlink:w,rdev:_,size:C,uid:y}=e;this.#m=t,this.#i=i,this.#L=s,this.#p=n,this.#a=o,this.#h=u,this.#g=a,this.#b=h,this.#t=l,this.#E=c,this.#c=d,this.#n=p,this.#T=m,this.#f=f,this.#r=w,this.#_=_,this.#u=C,this.#o=y;let E=dr(e);this.#s=this.#s&Wt|E|Ra,E!==ne&&E!==we&&E!==Ke&&(this.#s|=zt)}#B=[];#H=!1;#V(e){this.#H=!1;let t=this.#B.slice();this.#B.length=0,t.forEach(i=>i(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let i=this.children();if(this.calledReaddir()){let n=i.slice(0,i.provisional);t?e(null,n):queueMicrotask(()=>e(null,n));return}if(this.#B.push(e),this.#H)return;this.#H=!0;let s=this.fullpath();this.#e.readdir(s,{withFileTypes:!0},(n,o)=>{if(n)this.#A(n.code),i.provisional=0;else{for(let u of o)this.#F(u,i);this.#W(i)}this.#V(i.slice(0,i.provisional))})}#j;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#j)await this.#j;else{let i=()=>{};this.#j=new Promise(s=>i=s);try{for(let s of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#F(s,e);this.#W(e)}catch(s){this.#A(s.code),e.provisional=0}this.#j=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 t=this.fullpath();try{for(let i of this.#e.readdirSync(t,{withFileTypes:!0}))this.#F(i,e);this.#W(e)}catch(i){this.#A(i.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#s&ka)return!1;let e=re&this.#s;return e===ne||e===we||e===Ke}shouldWalk(e,t){return(this.#s&we)===we&&!(this.#s&ka)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#D)return this.#D;if(!((Ni|Ii|fe)&this.#s))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#D=this.resolve(e)}catch{this.#$()}}realpathSync(){if(this.#D)return this.#D;if(!((Ni|Ii|fe)&this.#s))try{let e=this.#e.realpathSync(this.fullpath());return this.#D=this.resolve(e)}catch{this.#$()}}[Ha](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),i=[],s=this;for(;s&&s.parent;)t.add(s),s.#d=i.join(this.sep),s.#I=i.join("/"),s=s.parent,i.push("..");for(s=e;s&&s.parent&&!t.has(s);)s.#d=void 0,s.#I=void 0,s=s.parent}},ki=class r extends H{sep="\\";splitSep=Pf;constructor(e,t=ne,i,s,n,o,u){super(e,t,i,s,n,o,u)}newChild(e,t=ne,i={}){return new r(e,t,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(e){return ft.win32.parse(e).root}getRoot(e){if(e=Ff(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,i]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=i;return this.roots[e]=new dt(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(Ba,"$1\\"),e===t}},Fi=class r extends H{splitSep="/";sep="/";constructor(e,t=ne,i,s,n,o,u){super(e,t,i,s,n,o,u)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=ne,i={}){return new r(e,t,this.root,this.roots,this.nocase,this.childrenCache(),i)}},Pi=class{root;rootPath;roots;cwd;#e;#t;#n;nocase;#r;constructor(e=process.cwd(),t,i,{nocase:s,childrenCacheSize:n=16*1024,fs:o=$t}={}){this.#r=Ua(o),(e instanceof URL||e.startsWith("file://"))&&(e=(0,Ma.fileURLToPath)(e));let u=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(u),this.#e=new Ri,this.#t=new Ri,this.#n=new pr(n);let a=u.substring(this.rootPath.length).split(i);if(a.length===1&&!a[0]&&a.pop(),s===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=s,this.root=this.newRoot(this.#r),this.roots[this.rootPath]=this.root;let h=this.root,l=a.length-1,c=t.sep,d=this.rootPath,p=!1;for(let m of a){let f=l--;h=h.child(m,{relative:new Array(f).fill("..").join(c),relativePosix:new Array(f).fill("..").join("/"),fullpath:d+=(p?"":c)+m}),p=!0}this.cwd=h}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#n}resolve(...e){let t="";for(let n=e.length-1;n>=0;n--){let o=e[n];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let i=this.#e.get(t);if(i!==void 0)return i;let s=this.cwd.resolve(t).fullpath();return this.#e.set(t,s),s}resolvePosix(...e){let t="";for(let n=e.length-1;n>=0;n--){let o=e[n];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let i=this.#t.get(t);if(i!==void 0)return i;let s=this.cwd.resolve(t).fullpathPosix();return this.#t.set(t,s),s}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,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e,e=this.cwd);let{withFileTypes:i}=t;if(e.canReaddir()){let s=await e.readdir();return i?s:s.map(n=>n.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e,e=this.cwd);let{withFileTypes:i=!0}=t;return e.canReaddir()?i?e.readdirSync():e.readdirSync().map(s=>s.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:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e.withFileTypes,e=this.cwd);let i=await e.readlink();return t?i:i==null?void 0:i.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e.withFileTypes,e=this.cwd);let i=e.readlinkSync();return t?i:i==null?void 0:i.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e.withFileTypes,e=this.cwd);let i=await e.realpath();return t?i:i==null?void 0:i.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e.withFileTypes,e=this.cwd);let i=e.realpathSync();return t?i:i==null?void 0:i.fullpath()}async walk(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:n,walkFilter:o}=t,u=[];(!n||n(e))&&u.push(i?e:e.fullpath());let a=new Set,h=(c,d)=>{a.add(c),c.readdirCB((p,m)=>{if(p)return d(p);let f=m.length;if(!f)return d();let w=()=>{--f===0&&d()};for(let _ of m)(!n||n(_))&&u.push(i?_:_.fullpath()),s&&_.isSymbolicLink()?_.realpath().then(C=>C!=null&&C.isUnknown()?C.lstat():C).then(C=>C!=null&&C.shouldWalk(a,o)?h(C,w):w()):_.shouldWalk(a,o)?h(_,w):w()},!0)},l=e;return new Promise((c,d)=>{h(l,p=>{if(p)return d(p);c(u)})})}walkSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:n,walkFilter:o}=t,u=[];(!n||n(e))&&u.push(i?e:e.fullpath());let a=new Set([e]);for(let h of a){let l=h.readdirSync();for(let c of l){(!n||n(c))&&u.push(i?c:c.fullpath());let d=c;if(c.isSymbolicLink()){if(!(s&&(d=c.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(a,o)&&a.add(d)}}return u}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:n,walkFilter:o}=t;(!n||n(e))&&(yield i?e:e.fullpath());let u=new Set([e]);for(let a of u){let h=a.readdirSync();for(let l of h){(!n||n(l))&&(yield i?l:l.fullpath());let c=l;if(l.isSymbolicLink()){if(!(s&&(c=l.realpathSync())))continue;c.isUnknown()&&c.lstatSync()}c.shouldWalk(u,o)&&u.add(c)}}}stream(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:n,walkFilter:o}=t,u=new ke({objectMode:!0});(!n||n(e))&&u.write(i?e:e.fullpath());let a=new Set,h=[e],l=0,c=()=>{let d=!1;for(;!d;){let p=h.shift();if(!p){l===0&&u.end();return}l++,a.add(p);let m=(w,_,C=!1)=>{if(w)return u.emit("error",w);if(s&&!C){let y=[];for(let E of _)E.isSymbolicLink()&&y.push(E.realpath().then(L=>L!=null&&L.isUnknown()?L.lstat():L));if(y.length){Promise.all(y).then(()=>m(null,_,!0));return}}for(let y of _)y&&(!n||n(y))&&(u.write(i?y:y.fullpath())||(d=!0));l--;for(let y of _){let E=y.realpathCached()||y;E.shouldWalk(a,o)&&h.push(E)}d&&!u.flowing?u.once("drain",c):f||c()},f=!0;p.readdirCB(m,!0),f=!1}};return c(),u}streamSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:s=!1,filter:n,walkFilter:o}=t,u=new ke({objectMode:!0}),a=new Set;(!n||n(e))&&u.write(i?e:e.fullpath());let h=[e],l=0,c=()=>{let d=!1;for(;!d;){let p=h.shift();if(!p){l===0&&u.end();return}l++,a.add(p);let m=p.readdirSync();for(let f of m)(!n||n(f))&&(u.write(i?f:f.fullpath())||(d=!0));l--;for(let f of m){let w=f;if(f.isSymbolicLink()){if(!(s&&(w=f.realpathSync())))continue;w.isUnknown()&&w.lstatSync()}w.shouldWalk(a,o)&&h.push(w)}}d&&!u.flowing&&u.once("drain",c)};return c(),u}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[Ha](t)}},dt=class extends Pi{sep="\\";constructor(e=process.cwd(),t={}){let{nocase:i=!0}=t;super(e,ft.win32,"\\",{...t,nocase:i}),this.nocase=i;for(let s=this.cwd;s;s=s.parent)s.nocase=this.nocase}parseRootPath(e){return ft.win32.parse(e).root.toUpperCase()}newRoot(e){return new ki(this.rootPath,we,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},pt=class extends Pi{sep="/";constructor(e=process.cwd(),t={}){let{nocase:i=!1}=t;super(e,ft.posix,"/",{...t,nocase:i}),this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new Fi(this.rootPath,we,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},jt=class extends pt{constructor(e=process.cwd(),t={}){let{nocase:i=!0}=t;super(e,{...t,nocase:i})}},jp=process.platform==="win32"?ki:Fi,Va=process.platform==="win32"?dt:process.platform==="darwin"?jt:pt;var Uf=r=>r.length>=1,Bf=r=>r.length>=1,mt=class r{#e;#t;#n;length;#r;#o;#E;#_;#a;#c;#u=!0;constructor(e,t,i,s){if(!Uf(e))throw new TypeError("empty pattern list");if(!Bf(t))throw new TypeError("empty glob list");if(t.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=t,this.#n=i,this.#r=s,this.#n===0){if(this.isUNC()){let[n,o,u,a,...h]=this.#e,[l,c,d,p,...m]=this.#t;h[0]===""&&(h.shift(),m.shift());let f=[n,o,u,a,""].join("/"),w=[l,c,d,p,""].join("/");this.#e=[f,...h],this.#t=[w,...m],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[n,...o]=this.#e,[u,...a]=this.#t;o[0]===""&&(o.shift(),a.shift());let h=n+"/",l=u+"/";this.#e=[h,...o],this.#t=[l,...a],this.length=this.#e.length}}}pattern(){return this.#e[this.#n]}isString(){return typeof this.#e[this.#n]=="string"}isGlobstar(){return this.#e[this.#n]===G}isRegExp(){return this.#e[this.#n]instanceof RegExp}globString(){return this.#E=this.#E||(this.#n===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join("/"):this.#t.join("/"):this.#t.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new r(this.#e,this.#t,this.#n+1,this.#r),this.#o.#c=this.#c,this.#o.#a=this.#a,this.#o.#_=this.#_,this.#o):this.#o=null}isUNC(){let e=this.#e;return this.#a!==void 0?this.#a:this.#a=this.#r==="win32"&&this.#n===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#_!==void 0?this.#_:this.#_=this.#r==="win32"&&this.#n===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#c!==void 0?this.#c:this.#c=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#n===0?e:""}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#u)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#u?!1:(this.#u=!1,!0)}};var Wf=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",gt=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:i,noext:s,noglobstar:n,platform:o=Wf}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:t,nocase:i,noext:s,noglobstar:n,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let u of e)this.add(u)}add(e){let t=new J(e,this.mmopts);for(let i=0;i<t.set.length;i++){let s=t.set[i],n=t.globParts[i];if(!s||!n)throw new Error("invalid pattern object");for(;s[0]==="."&&n[0]===".";)s.shift(),n.shift();let o=new mt(s,n,0,this.platform),u=new J(o.globString(),this.mmopts),a=n[n.length-1]==="**",h=o.isAbsolute();h?this.absolute.push(u):this.relative.push(u),a&&(h?this.absoluteChildren.push(u):this.relativeChildren.push(u))}}ignored(e){let t=e.fullpath(),i=`${t}/`,s=e.relative()||".",n=`${s}/`;for(let o of this.relative)if(o.match(s)||o.match(n))return!0;for(let o of this.absolute)if(o.match(t)||o.match(i))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+"/",i=(e.relative()||".")+"/";for(let s of this.relativeChildren)if(s.match(i))return!0;for(let s of this.absoluteChildren)if(s.match(t))return!0;return!1}};var mr=class r{store;constructor(e=new Map){this.store=e}copy(){return new r(new Map(this.store))}hasWalked(e,t){var i;return(i=this.store.get(e.fullpath()))==null?void 0:i.has(t.globString())}storeWalked(e,t){let i=e.fullpath(),s=this.store.get(i);s?s.add(t.globString()):this.store.set(i,new Set([t.globString()]))}},gr=class{store=new Map;add(e,t,i){let s=(t?2:0)|(i?1:0),n=this.store.get(e);this.store.set(e,n===void 0?s:s&n)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}},_r=class{store=new Map;add(e,t){if(!e.canReaddir())return;let i=this.store.get(e);i?i.find(s=>s.globString()===t.globString())||i.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},Ht=class r{hasWalkedCache;matches=new gr;subwalks=new _r;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new mr}processPatterns(e,t){this.patterns=t;let i=t.map(s=>[e,s]);for(let[s,n]of i){this.hasWalkedCache.storeWalked(s,n);let o=n.root(),u=n.isAbsolute()&&this.opts.absolute!==!1;if(o){s=s.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let c=n.rest();if(c)n=c;else{this.matches.add(s,!0,!1);continue}}if(s.isENOENT())continue;let a,h,l=!1;for(;typeof(a=n.pattern())=="string"&&(h=n.rest());)s=s.resolve(a),n=h,l=!0;if(a=n.pattern(),h=n.rest(),l){if(this.hasWalkedCache.hasWalked(s,n))continue;this.hasWalkedCache.storeWalked(s,n)}if(typeof a=="string"){let c=a===".."||a===""||a===".";this.matches.add(s.resolve(a),u,c);continue}else if(a===G){(!s.isSymbolicLink()||this.follow||n.checkFollowGlobstar())&&this.subwalks.add(s,n);let c=h==null?void 0:h.pattern(),d=h==null?void 0:h.rest();if(!h||(c===""||c===".")&&!d)this.matches.add(s,u,c===""||c===".");else if(c===".."){let p=s.parent||s;d?this.hasWalkedCache.hasWalked(p,d)||this.subwalks.add(p,d):this.matches.add(p,u,!0)}}else a instanceof RegExp&&this.subwalks.add(s,n)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new r(this.opts,this.hasWalkedCache)}filterEntries(e,t){let i=this.subwalks.get(e),s=this.child();for(let n of t)for(let o of i){let u=o.isAbsolute(),a=o.pattern(),h=o.rest();a===G?s.testGlobstar(n,o,h,u):a instanceof RegExp?s.testRegExp(n,a,h,u):s.testString(n,a,h,u)}return s}testGlobstar(e,t,i,s){if((this.dot||!e.name.startsWith("."))&&(t.hasMore()||this.matches.add(e,s,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(i&&t.checkFollowGlobstar()?this.subwalks.add(e,i):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),i){let n=i.pattern();if(typeof n=="string"&&n!==".."&&n!==""&&n!==".")this.testString(e,n,i.rest(),s);else if(n===".."){let o=e.parent||e;this.subwalks.add(o,i)}else n instanceof RegExp&&this.testRegExp(e,n,i.rest(),s)}}testRegExp(e,t,i,s){t.test(e.name)&&(i?this.subwalks.add(e,i):this.matches.add(e,s,!1))}testString(e,t,i,s){e.isNamed(t)&&(i?this.subwalks.add(e,i):this.matches.add(e,s,!1))}};var $f=(r,e)=>typeof r=="string"?new gt([r],e):Array.isArray(r)?new gt(r,e):r,Mi=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#n;signal;maxDepth;includeChildMatches;constructor(e,t,i){if(this.patterns=e,this.path=t,this.opts=i,this.#n=!i.posix&&i.platform==="win32"?"\\":"/",this.includeChildMatches=i.includeChildMatches!==!1,(i.ignore||!this.includeChildMatches)&&(this.#t=$f(i.ignore??[],i),!this.includeChildMatches&&typeof this.#t.add!="function")){let s="cannot ignore child matches, ignore lacks add() method.";throw new Error(s)}this.maxDepth=i.maxDepth||1/0,i.signal&&(this.signal=i.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#r(e){var t,i;return this.seen.has(e)||!!((i=(t=this.#t)==null?void 0:t.ignored)!=null&&i.call(t,e))}#o(e){var t,i;return!!((i=(t=this.#t)==null?void 0:t.childrenIgnored)!=null&&i.call(t,e))}pause(){this.paused=!0}resume(){var t;if((t=this.signal)!=null&&t.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){var t;(t=this.signal)!=null&&t.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||await e.realpath(),!i)return;e=i}let n=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&(n!=null&&n.isSymbolicLink())){let o=await n.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.lstat()}return this.matchCheckTest(n,t)}matchCheckTest(e,t){var i;return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!((i=e.realpathCached())!=null&&i.isDirectory()))&&!this.#r(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||e.realpathSync(),!i)return;e=i}let n=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&(n!=null&&n.isSymbolicLink())){let o=n.realpathSync();o&&(o!=null&&o.isUnknown()||this.opts.stat)&&o.lstatSync()}return this.matchCheckTest(n,t)}matchFinish(e,t){var n;if(this.#r(e))return;if(!this.includeChildMatches&&((n=this.#t)!=null&&n.add)){let o=`${e.relativePosix()}/**`;this.#t.add(o)}let i=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let s=this.opts.mark&&e.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(i){let o=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(o+s)}else{let o=this.opts.posix?e.relativePosix():e.relative(),u=this.opts.dotRelative&&!o.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(o?u+o+s:"."+s)}}async match(e,t,i){let s=await this.matchCheck(e,i);s&&this.matchFinish(s,t)}matchSync(e,t,i){let s=this.matchCheckSync(e,i);s&&this.matchFinish(s,t)}walkCB(e,t,i){var s;(s=this.signal)!=null&&s.aborted&&i(),this.walkCB2(e,t,new Ht(this.opts),i)}walkCB2(e,t,i,s){var u;if(this.#o(e))return s();if((u=this.signal)!=null&&u.aborted&&s(),this.paused){this.onResume(()=>this.walkCB2(e,t,i,s));return}i.processPatterns(e,t);let n=1,o=()=>{--n===0&&s()};for(let[a,h,l]of i.matches.entries())this.#r(a)||(n++,this.match(a,h,l).then(()=>o()));for(let a of i.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;n++;let h=a.readdirCached();a.calledReaddir()?this.walkCB3(a,h,i,o):a.readdirCB((l,c)=>this.walkCB3(a,c,i,o),!0)}o()}walkCB3(e,t,i,s){i=i.filterEntries(e,t);let n=1,o=()=>{--n===0&&s()};for(let[u,a,h]of i.matches.entries())this.#r(u)||(n++,this.match(u,a,h).then(()=>o()));for(let[u,a]of i.subwalks.entries())n++,this.walkCB2(u,a,i.child(),o);o()}walkCBSync(e,t,i){var s;(s=this.signal)!=null&&s.aborted&&i(),this.walkCB2Sync(e,t,new Ht(this.opts),i)}walkCB2Sync(e,t,i,s){var u;if(this.#o(e))return s();if((u=this.signal)!=null&&u.aborted&&s(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,i,s));return}i.processPatterns(e,t);let n=1,o=()=>{--n===0&&s()};for(let[a,h,l]of i.matches.entries())this.#r(a)||this.matchSync(a,h,l);for(let a of i.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;n++;let h=a.readdirSync();this.walkCB3Sync(a,h,i,o)}o()}walkCB3Sync(e,t,i,s){i=i.filterEntries(e,t);let n=1,o=()=>{--n===0&&s()};for(let[u,a,h]of i.matches.entries())this.#r(u)||this.matchSync(u,a,h);for(let[u,a]of i.subwalks.entries())n++,this.walkCB2Sync(u,a,i.child(),o);o()}},Vt=class extends Mi{matches=new Set;constructor(e,t,i){super(e,t,i)}matchEmit(e){this.matches.add(e)}async walk(){var e;if((e=this.signal)!=null&&e.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((t,i)=>{this.walkCB(this.path,this.patterns,()=>{var s;(s=this.signal)!=null&&s.aborted?i(this.signal.reason):t(this.matches)})}),this.matches}walkSync(){var e;if((e=this.signal)!=null&&e.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{var t;if((t=this.signal)!=null&&t.aborted)throw this.signal.reason}),this.matches}},qt=class extends Mi{results;constructor(e,t,i){super(e,t,i),this.results=new ke({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 zf=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",de=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,t){if(!t)throw new TypeError("glob options required");if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith("file://"))&&(t.cwd=(0,qa.fileURLToPath)(t.cwd)):this.cwd="",this.cwd=t.cwd||"",this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.includeChildMatches=t.includeChildMatches!==!1,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth=typeof t.maxDepth=="number"?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(a=>a.replace(/\\/g,"/"))),this.matchBase){if(t.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(a=>a.includes("/")?a:`./**/${a}`)}if(this.pattern=e,this.platform=t.platform||zf,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,t.nocase!==void 0&&t.nocase!==t.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let a=t.platform==="win32"?dt:t.platform==="darwin"?jt:t.platform?pt:Va;this.scurry=new a(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let i=this.platform==="darwin"||this.platform==="win32",s={...t,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},n=this.pattern.map(a=>new J(a,s)),[o,u]=n.reduce((a,h)=>(a[0].push(...h.set),a[1].push(...h.globParts),a),[[],[]]);this.patterns=o.map((a,h)=>{let l=u[h];if(!l)throw new Error("invalid pattern object");return new mt(a,l,0,this.platform)})}async walk(){return[...await new Vt(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 Vt(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 qt(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 qt(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 br=(r,e={})=>{Array.isArray(r)||(r=[r]);for(let t of r)if(new J(t,e).hasMagic())return!0;return!1};function Bi(r,e={}){return new de(r,e).streamSync()}function Ya(r,e={}){return new de(r,e).stream()}function Ka(r,e={}){return new de(r,e).walkSync()}async function Za(r,e={}){return new de(r,e).walk()}function Wi(r,e={}){return new de(r,e).iterateSync()}function Xa(r,e={}){return new de(r,e).iterate()}var Gf=Bi,jf=Object.assign(Ya,{sync:Bi}),Hf=Wi,Vf=Object.assign(Xa,{sync:Wi}),qf=Object.assign(Ka,{stream:Bi,iterate:Wi}),Ui=Object.assign(Za,{glob:Za,globSync:Ka,sync:qf,globStream:Ya,stream:jf,globStreamSync:Bi,streamSync:Gf,globIterate:Xa,iterate:Vf,globIterateSync:Wi,iterateSync:Hf,Glob:de,hasMagic:br,escape:at,unescape:le});Ui.glob=Ui;var _t=F(require("node:path"),1);var Ja=F(require("node:process"),1),Qa=F(require("node:path"),1),$i=F(require("node:fs"),1),eu=require("node:url");var tu={directory:"isDirectory",file:"isFile"};function Zf(r){if(!Object.hasOwnProperty.call(tu,r))throw new Error(`Invalid type specified: ${r}`)}var Yf=(r,e)=>e[tu[r]](),Kf=r=>r instanceof URL?(0,eu.fileURLToPath)(r):r;function wr(r,{cwd:e=Ja.default.cwd(),type:t="file",allowSymlinks:i=!0}={}){Zf(t),e=Kf(e);let s=i?$i.default.statSync:$i.default.lstatSync;for(let n of r)try{let o=s(Qa.default.resolve(e,n),{throwIfNoEntry:!1});if(!o)continue;if(Yf(t,o))return n}catch{}}var iu=require("node:url");function Er(r){return r instanceof URL?(0,iu.fileURLToPath)(r):r}var Xf=Symbol("findUpStop");function Jf(r,e={}){let t=_t.default.resolve(Er(e.cwd)??""),{root:i}=_t.default.parse(t),s=_t.default.resolve(t,Er(e.stopAt)??i),n=e.limit??Number.POSITIVE_INFINITY,o=[r].flat(),u=h=>{if(typeof r!="function")return wr(o,h);let l=r(h.cwd);return typeof l=="string"?wr([l],h):l},a=[];for(;;){let h=u({...e,cwd:t});if(h===Xf||(h&&a.push(_t.default.resolve(t,h)),t===s||a.length>=n))break;t=_t.default.dirname(t)}return a}function su(r,e={}){return Jf(r,{...e,limit:1})[0]}var Uu=F(Cu()),Bu=F(Iu());var Ji=F(require("node:process"),1),Nu=F(require("node:os"),1),Mr=F(require("node:tty"),1);function ae(r,e=globalThis.Deno?globalThis.Deno.args:Ji.default.argv){let t=r.startsWith("-")?"":r.length===1?"-":"--",i=e.indexOf(t+r),s=e.indexOf("--");return i!==-1&&(s===-1||i<s)}var{env:R}=Ji.default,Xi;ae("no-color")||ae("no-colors")||ae("color=false")||ae("color=never")?Xi=0:(ae("color")||ae("colors")||ae("color=true")||ae("color=always"))&&(Xi=1);function fd(){if(!("FORCE_COLOR"in R))return;if(R.FORCE_COLOR==="true")return 1;if(R.FORCE_COLOR==="false")return 0;if(R.FORCE_COLOR.length===0)return 1;let r=Math.min(Number.parseInt(R.FORCE_COLOR,10),3);if([0,1,2,3].includes(r))return r}function dd(r){return r===0?!1:{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}function pd(r,{streamIsTTY:e,sniffFlags:t=!0}={}){let i=fd();i!==void 0&&(Xi=i);let s=t?Xi:i;if(s===0)return 0;if(t){if(ae("color=16m")||ae("color=full")||ae("color=truecolor"))return 3;if(ae("color=256"))return 2}if("TF_BUILD"in R&&"AGENT_NAME"in R)return 1;if(r&&!e&&s===void 0)return 0;let n=s||0;if(R.TERM==="dumb")return n;if(Ji.default.platform==="win32"){let o=Nu.default.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in R)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in R)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in R)||R.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in R)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(R.TEAMCITY_VERSION)?1:0;if(R.COLORTERM==="truecolor"||R.TERM==="xterm-kitty"||R.TERM==="xterm-ghostty"||R.TERM==="wezterm")return 3;if("TERM_PROGRAM"in R){let o=Number.parseInt((R.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(R.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(R.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(R.TERM)||"COLORTERM"in R?1:n}function Du(r,e={}){let t=pd(r,{streamIsTTY:r&&r.isTTY,...e});return dd(t)}var md={stdout:Du({isTTY:Mr.default.isatty(1)}),stderr:Du({isTTY:Mr.default.isatty(2)})},Ru=md;0&&(module.exports={StackUtils,StreamZip,WebSocket,WebSocketServer,ZipFile,codeFrameColumns,findUpSync,glob,open,program,sanitize,supportsColor});