monocart-reporter 2.5.2 → 2.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,35 +1,35 @@
1
- var as=Object.create;var Se=Object.defineProperty;var os=Object.getOwnPropertyDescriptor;var us=Object.getOwnPropertyNames;var ls=Object.getPrototypeOf,cs=Object.prototype.hasOwnProperty;var g=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),fs=(r,e)=>{for(var t in e)Se(r,t,{get:e[t],enumerable:!0})},or=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of us(e))!cs.call(r,i)&&i!==t&&Se(r,i,{get:()=>e[i],enumerable:!(n=os(e,i))||n.enumerable});return r};var N=(r,e,t)=>(t=r!=null?as(ls(r)):{},or(e||!r||!r.__esModule?Se(t,"default",{value:r,enumerable:!0}):t,r)),hs=r=>or(Se({},"__esModule",{value:!0}),r);var lr=g((hu,ur)=>{"use strict";var ds=/[|\\{}()[\]^$+*?.-]/g;ur.exports=r=>{if(typeof r!="string")throw new TypeError("Expected a string");return r.replace(ds,"\\$&")}});var dr=g((du,hr)=>{"use strict";var ps=lr(),ms=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",fr=[].concat(require("module").builtinModules,"bootstrap_node","node").map(r=>new RegExp(`(?:\\((?:node:)?${r}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${r}(?:\\.js)?:\\d+:\\d+$)`));fr.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var tt=class r{constructor(e){e={ignoredPackages:[],...e},"internals"in e||(e.internals=r.nodeInternals()),"cwd"in e||(e.cwd=ms),this._cwd=e.cwd.replace(/\\/g,"/"),this._internals=[].concat(e.internals,gs(e.ignoredPackages)),this._wrapCallSite=e.wrapCallSite||!1}static nodeInternals(){return[...fr]}clean(e,t=0){t=" ".repeat(t),Array.isArray(e)||(e=e.split(`
2
- `)),!/^\s*at /.test(e[0])&&/^\s*at /.test(e[1])&&(e=e.slice(1));let n=!1,i=null,s=[];return e.forEach(a=>{if(a=a.replace(/\\/g,"/"),this._internals.some(o=>o.test(a)))return;let u=/^\s*at /.test(a);n?a=a.trimEnd().replace(/^(\s+)at /,"$1"):(a=a.trim(),u&&(a=a.slice(3))),a=a.replace(`${this._cwd}/`,""),a&&(u?(i&&(s.push(i),i=null),s.push(a)):(n=!0,i=a))}),s.map(a=>`${t}${a}
3
- `).join("")}captureString(e,t=this.captureString){typeof e=="function"&&(t=e,e=1/0);let{stackTraceLimit:n}=Error;e&&(Error.stackTraceLimit=e);let i={};Error.captureStackTrace(i,t);let{stack:s}=i;return Error.stackTraceLimit=n,this.clean(s)}capture(e,t=this.capture){typeof e=="function"&&(t=e,e=1/0);let{prepareStackTrace:n,stackTraceLimit:i}=Error;Error.prepareStackTrace=(u,o)=>this._wrapCallSite?o.map(this._wrapCallSite):o,e&&(Error.stackTraceLimit=e);let s={};Error.captureStackTrace(s,t);let{stack:a}=s;return Object.assign(Error,{prepareStackTrace:n,stackTraceLimit:i}),a}at(e=this.at){let[t]=this.capture(1,e);if(!t)return{};let n={line:t.getLineNumber(),column:t.getColumnNumber()};cr(n,t.getFileName(),this._cwd),t.isConstructor()&&Object.defineProperty(n,"constructor",{value:!0,configurable:!0}),t.isEval()&&(n.evalOrigin=t.getEvalOrigin()),t.isNative()&&(n.native=!0);let i;try{i=t.getTypeName()}catch{}i&&i!=="Object"&&i!=="[object Object]"&&(n.type=i);let s=t.getFunctionName();s&&(n.function=s);let a=t.getMethodName();return a&&s!==a&&(n.method=a),n}parseLine(e){let t=e&&e.match(_s);if(!t)return null;let n=t[1]==="new",i=t[2],s=t[3],a=t[4],u=Number(t[5]),o=Number(t[6]),l=t[7],c=t[8],f=t[9],m=t[10]==="native",b=t[11]===")",d,h={};if(c&&(h.line=Number(c)),f&&(h.column=Number(f)),b&&l){let _=0;for(let v=l.length-1;v>0;v--)if(l.charAt(v)===")")_++;else if(l.charAt(v)==="("&&l.charAt(v-1)===" "&&(_--,_===-1&&l.charAt(v-1)===" ")){let W=l.slice(0,v-1);l=l.slice(v+1),i+=` (${W}`;break}}if(i){let _=i.match(bs);_&&(i=_[1],d=_[2])}return cr(h,l,this._cwd),n&&Object.defineProperty(h,"constructor",{value:!0,configurable:!0}),s&&(h.evalOrigin=s,h.evalLine=u,h.evalColumn=o,h.evalFile=a&&a.replace(/\\/g,"/")),m&&(h.native=!0),i&&(h.function=i),d&&i!==d&&(h.method=d),h}};function cr(r,e,t){e&&(e=e.replace(/\\/g,"/"),e.startsWith(`${t}/`)&&(e=e.slice(t.length+1)),r.file=e)}function gs(r){if(r.length===0)return[];let e=r.map(t=>ps(t));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${e.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var _s=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),bs=/^(.*?) \[as (.*?)\]$/;hr.exports=tt});var pr=g(Ce=>{Object.defineProperty(Ce,"__esModule",{value:!0});Ce.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;Ce.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 vr=g(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.isIdentifierChar=br;ue.isIdentifierName=ws;ue.isIdentifierStart=_r;var nt="\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-\u1C88\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-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\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",mr="\u200C\u200D\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\u0898-\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",vs=new RegExp("["+nt+"]"),ys=new RegExp("["+nt+mr+"]");nt=mr=null;var gr=[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,68,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,349,41,7,1,79,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,159,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,264,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,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,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,757,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],xs=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,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,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,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,406,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,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,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,983,6,110,6,6,9,4759,9,787719,239];function rt(r,e){let t=65536;for(let n=0,i=e.length;n<i;n+=2){if(t+=e[n],t>r)return!1;if(t+=e[n+1],t>=r)return!0}return!1}function _r(r){return r<65?r===36:r<=90?!0:r<97?r===95:r<=122?!0:r<=65535?r>=170&&vs.test(String.fromCharCode(r)):rt(r,gr)}function br(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&&ys.test(String.fromCharCode(r)):rt(r,gr)||rt(r,xs)}function ws(r){let e=!0;for(let t=0;t<r.length;t++){let n=r.charCodeAt(t);if((n&64512)===55296&&t+1<r.length){let i=r.charCodeAt(++t);(i&64512)===56320&&(n=65536+((n&1023)<<10)+(i&1023))}if(e){if(e=!1,!_r(n))return!1}else if(!br(n))return!1}return!e}});var Or=g(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.isKeyword=ks;H.isReservedWord=yr;H.isStrictBindOnlyReservedWord=wr;H.isStrictBindReservedWord=Cs;H.isStrictReservedWord=xr;var it={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"]},Os=new Set(it.keyword),Es=new Set(it.strict),Ss=new Set(it.strictBind);function yr(r,e){return e&&r==="await"||r==="enum"}function xr(r,e){return yr(r,e)||Es.has(r)}function wr(r){return Ss.has(r)}function Cs(r,e){return xr(r,e)||wr(r)}function ks(r){return Os.has(r)}});var Er=g(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});Object.defineProperty(R,"isIdentifierChar",{enumerable:!0,get:function(){return st.isIdentifierChar}});Object.defineProperty(R,"isIdentifierName",{enumerable:!0,get:function(){return st.isIdentifierName}});Object.defineProperty(R,"isIdentifierStart",{enumerable:!0,get:function(){return st.isIdentifierStart}});Object.defineProperty(R,"isKeyword",{enumerable:!0,get:function(){return le.isKeyword}});Object.defineProperty(R,"isReservedWord",{enumerable:!0,get:function(){return le.isReservedWord}});Object.defineProperty(R,"isStrictBindOnlyReservedWord",{enumerable:!0,get:function(){return le.isStrictBindOnlyReservedWord}});Object.defineProperty(R,"isStrictBindReservedWord",{enumerable:!0,get:function(){return le.isStrictBindReservedWord}});Object.defineProperty(R,"isStrictReservedWord",{enumerable:!0,get:function(){return le.isStrictReservedWord}});var st=vr(),le=Or()});var ot=g((bu,at)=>{var Sr=process.argv||[],ke=process.env,As=!("NO_COLOR"in ke||Sr.includes("--no-color"))&&("FORCE_COLOR"in ke||Sr.includes("--color")||process.platform==="win32"||require!=null&&require("tty").isatty(1)&&ke.TERM!=="dumb"||"CI"in ke),Ts=(r,e,t=r)=>n=>{let i=""+n,s=i.indexOf(e,r.length);return~s?r+Ps(i,e,t,s)+e:r+i+e},Ps=(r,e,t,n)=>{let i="",s=0;do i+=r.substring(s,n)+t,s=n+e.length,n=r.indexOf(e,s);while(~n);return i+r.substring(s)},Cr=(r=As)=>{let e=r?Ts:()=>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")}};at.exports=Cr();at.exports.createColors=Cr});var Ar=g((vu,kr)=>{"use strict";var Ms=/[|\\{}()[\]^$+*?.]/g;kr.exports=function(r){if(typeof r!="string")throw new TypeError("Expected a string");return r.replace(Ms,"\\$&")}});var Pr=g((yu,Tr)=>{"use strict";Tr.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var ut=g((xu,$r)=>{var G=Pr(),Rr={};for(Ae in G)G.hasOwnProperty(Ae)&&(Rr[G[Ae]]=Ae);var Ae,p=$r.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(S in p)if(p.hasOwnProperty(S)){if(!("channels"in p[S]))throw new Error("missing channels property: "+S);if(!("labels"in p[S]))throw new Error("missing channel labels property: "+S);if(p[S].labels.length!==p[S].channels)throw new Error("channel and label counts mismatch: "+S);Mr=p[S].channels,Nr=p[S].labels,delete p[S].channels,delete p[S].labels,Object.defineProperty(p[S],"channels",{value:Mr}),Object.defineProperty(p[S],"labels",{value:Nr})}var Mr,Nr,S;p.rgb.hsl=function(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255,i=Math.min(e,t,n),s=Math.max(e,t,n),a=s-i,u,o,l;return s===i?u=0:e===s?u=(t-n)/a:t===s?u=2+(n-e)/a:n===s&&(u=4+(e-t)/a),u=Math.min(u*60,360),u<0&&(u+=360),l=(i+s)/2,s===i?o=0:l<=.5?o=a/(s+i):o=a/(2-s-i),[u,o*100,l*100]};p.rgb.hsv=function(r){var e,t,n,i,s,a=r[0]/255,u=r[1]/255,o=r[2]/255,l=Math.max(a,u,o),c=l-Math.min(a,u,o),f=function(m){return(l-m)/6/c+1/2};return c===0?i=s=0:(s=c/l,e=f(a),t=f(u),n=f(o),a===l?i=n-t:u===l?i=1/3+e-n:o===l&&(i=2/3+t-e),i<0?i+=1:i>1&&(i-=1)),[i*360,s*100,l*100]};p.rgb.hwb=function(r){var e=r[0],t=r[1],n=r[2],i=p.rgb.hsl(r)[0],s=1/255*Math.min(e,Math.min(t,n));return n=1-1/255*Math.max(e,Math.max(t,n)),[i,s*100,n*100]};p.rgb.cmyk=function(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255,i,s,a,u;return u=Math.min(1-e,1-t,1-n),i=(1-e-u)/(1-u)||0,s=(1-t-u)/(1-u)||0,a=(1-n-u)/(1-u)||0,[i*100,s*100,a*100,u*100]};function Ns(r,e){return Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2)+Math.pow(r[2]-e[2],2)}p.rgb.keyword=function(r){var e=Rr[r];if(e)return e;var t=1/0,n;for(var i in G)if(G.hasOwnProperty(i)){var s=G[i],a=Ns(r,s);a<t&&(t=a,n=i)}return n};p.keyword.rgb=function(r){return G[r]};p.rgb.xyz=function(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92;var i=e*.4124+t*.3576+n*.1805,s=e*.2126+t*.7152+n*.0722,a=e*.0193+t*.1192+n*.9505;return[i*100,s*100,a*100]};p.rgb.lab=function(r){var e=p.rgb.xyz(r),t=e[0],n=e[1],i=e[2],s,a,u;return t/=95.047,n/=100,i/=108.883,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,s=116*n-16,a=500*(t-n),u=200*(n-i),[s,a,u]};p.hsl.rgb=function(r){var e=r[0]/360,t=r[1]/100,n=r[2]/100,i,s,a,u,o;if(t===0)return o=n*255,[o,o,o];n<.5?s=n*(1+t):s=n+t-n*t,i=2*n-s,u=[0,0,0];for(var l=0;l<3;l++)a=e+1/3*-(l-1),a<0&&a++,a>1&&a--,6*a<1?o=i+(s-i)*6*a:2*a<1?o=s:3*a<2?o=i+(s-i)*(2/3-a)*6:o=i,u[l]=o*255;return u};p.hsl.hsv=function(r){var e=r[0],t=r[1]/100,n=r[2]/100,i=t,s=Math.max(n,.01),a,u;return n*=2,t*=n<=1?n:2-n,i*=s<=1?s:2-s,u=(n+t)/2,a=n===0?2*i/(s+i):2*t/(n+t),[e,a*100,u*100]};p.hsv.rgb=function(r){var e=r[0]/60,t=r[1]/100,n=r[2]/100,i=Math.floor(e)%6,s=e-Math.floor(e),a=255*n*(1-t),u=255*n*(1-t*s),o=255*n*(1-t*(1-s));switch(n*=255,i){case 0:return[n,o,a];case 1:return[u,n,a];case 2:return[a,n,o];case 3:return[a,u,n];case 4:return[o,a,n];case 5:return[n,a,u]}};p.hsv.hsl=function(r){var e=r[0],t=r[1]/100,n=r[2]/100,i=Math.max(n,.01),s,a,u;return u=(2-t)*n,s=(2-t)*i,a=t*i,a/=s<=1?s:2-s,a=a||0,u/=2,[e,a*100,u*100]};p.hwb.rgb=function(r){var e=r[0]/360,t=r[1]/100,n=r[2]/100,i=t+n,s,a,u,o;i>1&&(t/=i,n/=i),s=Math.floor(6*e),a=1-n,u=6*e-s,s&1&&(u=1-u),o=t+u*(a-t);var l,c,f;switch(s){default:case 6:case 0:l=a,c=o,f=t;break;case 1:l=o,c=a,f=t;break;case 2:l=t,c=a,f=o;break;case 3:l=t,c=o,f=a;break;case 4:l=o,c=t,f=a;break;case 5:l=a,c=t,f=o;break}return[l*255,c*255,f*255]};p.cmyk.rgb=function(r){var e=r[0]/100,t=r[1]/100,n=r[2]/100,i=r[3]/100,s,a,u;return s=1-Math.min(1,e*(1-i)+i),a=1-Math.min(1,t*(1-i)+i),u=1-Math.min(1,n*(1-i)+i),[s*255,a*255,u*255]};p.xyz.rgb=function(r){var e=r[0]/100,t=r[1]/100,n=r[2]/100,i,s,a;return i=e*3.2406+t*-1.5372+n*-.4986,s=e*-.9689+t*1.8758+n*.0415,a=e*.0557+t*-.204+n*1.057,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*12.92,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),a=Math.min(Math.max(0,a),1),[i*255,s*255,a*255]};p.xyz.lab=function(r){var e=r[0],t=r[1],n=r[2],i,s,a;return e/=95.047,t/=100,n/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=116*t-16,s=500*(e-t),a=200*(t-n),[i,s,a]};p.lab.xyz=function(r){var e=r[0],t=r[1],n=r[2],i,s,a;s=(e+16)/116,i=t/500+s,a=s-n/200;var u=Math.pow(s,3),o=Math.pow(i,3),l=Math.pow(a,3);return s=u>.008856?u:(s-16/116)/7.787,i=o>.008856?o:(i-16/116)/7.787,a=l>.008856?l:(a-16/116)/7.787,i*=95.047,s*=100,a*=108.883,[i,s,a]};p.lab.lch=function(r){var e=r[0],t=r[1],n=r[2],i,s,a;return i=Math.atan2(n,t),s=i*360/2/Math.PI,s<0&&(s+=360),a=Math.sqrt(t*t+n*n),[e,a,s]};p.lch.lab=function(r){var e=r[0],t=r[1],n=r[2],i,s,a;return a=n/360*2*Math.PI,i=t*Math.cos(a),s=t*Math.sin(a),[e,i,s]};p.rgb.ansi16=function(r){var e=r[0],t=r[1],n=r[2],i=1 in arguments?arguments[1]:p.rgb.hsv(r)[2];if(i=Math.round(i/50),i===0)return 30;var s=30+(Math.round(n/255)<<2|Math.round(t/255)<<1|Math.round(e/255));return i===2&&(s+=60),s};p.hsv.ansi16=function(r){return p.rgb.ansi16(p.hsv.rgb(r),r[2])};p.rgb.ansi256=function(r){var e=r[0],t=r[1],n=r[2];if(e===t&&t===n)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var i=16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5);return i};p.ansi16.rgb=function(r){var e=r%10;if(e===0||e===7)return r>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var t=(~~(r>50)+1)*.5,n=(e&1)*t*255,i=(e>>1&1)*t*255,s=(e>>2&1)*t*255;return[n,i,s]};p.ansi256.rgb=function(r){if(r>=232){var e=(r-232)*10+8;return[e,e,e]}r-=16;var t,n=Math.floor(r/36)/5*255,i=Math.floor((t=r%36)/6)/5*255,s=t%6/5*255;return[n,i,s]};p.rgb.hex=function(r){var e=((Math.round(r[0])&255)<<16)+((Math.round(r[1])&255)<<8)+(Math.round(r[2])&255),t=e.toString(16).toUpperCase();return"000000".substring(t.length)+t};p.hex.rgb=function(r){var e=r.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var t=e[0];e[0].length===3&&(t=t.split("").map(function(u){return u+u}).join(""));var n=parseInt(t,16),i=n>>16&255,s=n>>8&255,a=n&255;return[i,s,a]};p.rgb.hcg=function(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255,i=Math.max(Math.max(e,t),n),s=Math.min(Math.min(e,t),n),a=i-s,u,o;return a<1?u=s/(1-a):u=0,a<=0?o=0:i===e?o=(t-n)/a%6:i===t?o=2+(n-e)/a:o=4+(e-t)/a+4,o/=6,o%=1,[o*360,a*100,u*100]};p.hsl.hcg=function(r){var e=r[1]/100,t=r[2]/100,n=1,i=0;return t<.5?n=2*e*t:n=2*e*(1-t),n<1&&(i=(t-.5*n)/(1-n)),[r[0],n*100,i*100]};p.hsv.hcg=function(r){var e=r[1]/100,t=r[2]/100,n=e*t,i=0;return n<1&&(i=(t-n)/(1-n)),[r[0],n*100,i*100]};p.hcg.rgb=function(r){var e=r[0]/360,t=r[1]/100,n=r[2]/100;if(t===0)return[n*255,n*255,n*255];var i=[0,0,0],s=e%1*6,a=s%1,u=1-a,o=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=a,i[2]=0;break;case 1:i[0]=u,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=a;break;case 3:i[0]=0,i[1]=u,i[2]=1;break;case 4:i[0]=a,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=u}return o=(1-t)*n,[(t*i[0]+o)*255,(t*i[1]+o)*255,(t*i[2]+o)*255]};p.hcg.hsv=function(r){var e=r[1]/100,t=r[2]/100,n=e+t*(1-e),i=0;return n>0&&(i=e/n),[r[0],i*100,n*100]};p.hcg.hsl=function(r){var e=r[1]/100,t=r[2]/100,n=t*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[r[0],i*100,n*100]};p.hcg.hwb=function(r){var e=r[1]/100,t=r[2]/100,n=e+t*(1-e);return[r[0],(n-e)*100,(1-n)*100]};p.hwb.hcg=function(r){var e=r[1]/100,t=r[2]/100,n=1-t,i=n-e,s=0;return i<1&&(s=(n-i)/(1-i)),[r[0],i*100,s*100]};p.apple.rgb=function(r){return[r[0]/65535*255,r[1]/65535*255,r[2]/65535*255]};p.rgb.apple=function(r){return[r[0]/255*65535,r[1]/255*65535,r[2]/255*65535]};p.gray.rgb=function(r){return[r[0]/100*255,r[0]/100*255,r[0]/100*255]};p.gray.hsl=p.gray.hsv=function(r){return[0,0,r[0]]};p.gray.hwb=function(r){return[0,100,r[0]]};p.gray.cmyk=function(r){return[0,0,0,r[0]]};p.gray.lab=function(r){return[r[0],0,0]};p.gray.hex=function(r){var e=Math.round(r[0]/100*255)&255,t=(e<<16)+(e<<8)+e,n=t.toString(16).toUpperCase();return"000000".substring(n.length)+n};p.rgb.gray=function(r){var e=(r[0]+r[1]+r[2])/3;return[e/255*100]}});var Ir=g((wu,Lr)=>{var Te=ut();function Rs(){for(var r={},e=Object.keys(Te),t=e.length,n=0;n<t;n++)r[e[n]]={distance:-1,parent:null};return r}function $s(r){var e=Rs(),t=[r];for(e[r].distance=0;t.length;)for(var n=t.pop(),i=Object.keys(Te[n]),s=i.length,a=0;a<s;a++){var u=i[a],o=e[u];o.distance===-1&&(o.distance=e[n].distance+1,o.parent=n,t.unshift(u))}return e}function Ls(r,e){return function(t){return e(r(t))}}function Is(r,e){for(var t=[e[r].parent,r],n=Te[e[r].parent][r],i=e[r].parent;e[i].parent;)t.unshift(e[i].parent),n=Ls(Te[e[i].parent][i],n),i=e[i].parent;return n.conversion=t,n}Lr.exports=function(r){for(var e=$s(r),t={},n=Object.keys(e),i=n.length,s=0;s<i;s++){var a=n[s],u=e[a];u.parent!==null&&(t[a]=Is(a,e))}return t}});var Br=g((Ou,Fr)=>{var lt=ut(),Fs=Ir(),Z={},Bs=Object.keys(lt);function Ws(r){var e=function(t){return t==null?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),r(t))};return"conversion"in r&&(e.conversion=r.conversion),e}function js(r){var e=function(t){if(t==null)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=r(t);if(typeof n=="object")for(var i=n.length,s=0;s<i;s++)n[s]=Math.round(n[s]);return n};return"conversion"in r&&(e.conversion=r.conversion),e}Bs.forEach(function(r){Z[r]={},Object.defineProperty(Z[r],"channels",{value:lt[r].channels}),Object.defineProperty(Z[r],"labels",{value:lt[r].labels});var e=Fs(r),t=Object.keys(e);t.forEach(function(n){var i=e[n];Z[r][n]=js(i),Z[r][n].raw=Ws(i)})});Fr.exports=Z});var jr=g((Eu,Wr)=>{"use strict";var Q=Br(),Pe=(r,e)=>function(){return`\x1B[${r.apply(Q,arguments)+e}m`},Me=(r,e)=>function(){let t=r.apply(Q,arguments);return`\x1B[${38+e};5;${t}m`},Ne=(r,e)=>function(){let t=r.apply(Q,arguments);return`\x1B[${38+e};2;${t[0]};${t[1]};${t[2]}m`};function Ds(){let r=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.grey=e.color.gray;for(let i of Object.keys(e)){let s=e[i];for(let a of Object.keys(s)){let u=s[a];e[a]={open:`\x1B[${u[0]}m`,close:`\x1B[${u[1]}m`},s[a]=e[a],r.set(u[0],u[1])}Object.defineProperty(e,i,{value:s,enumerable:!1}),Object.defineProperty(e,"codes",{value:r,enumerable:!1})}let t=i=>i,n=(i,s,a)=>[i,s,a];e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi={ansi:Pe(t,0)},e.color.ansi256={ansi256:Me(t,0)},e.color.ansi16m={rgb:Ne(n,0)},e.bgColor.ansi={ansi:Pe(t,10)},e.bgColor.ansi256={ansi256:Me(t,10)},e.bgColor.ansi16m={rgb:Ne(n,10)};for(let i of Object.keys(Q)){if(typeof Q[i]!="object")continue;let s=Q[i];i==="ansi16"&&(i="ansi"),"ansi16"in s&&(e.color.ansi[i]=Pe(s.ansi16,0),e.bgColor.ansi[i]=Pe(s.ansi16,10)),"ansi256"in s&&(e.color.ansi256[i]=Me(s.ansi256,0),e.bgColor.ansi256[i]=Me(s.ansi256,10)),"rgb"in s&&(e.color.ansi16m[i]=Ne(s.rgb,0),e.bgColor.ansi16m[i]=Ne(s.rgb,10))}return e}Object.defineProperty(Wr,"exports",{enumerable:!0,get:Ds})});var qr=g((Su,Dr)=>{"use strict";Dr.exports=(r,e)=>{e=e||process.argv;let t=r.startsWith("-")?"":r.length===1?"-":"--",n=e.indexOf(t+r),i=e.indexOf("--");return n!==-1&&(i===-1?!0:n<i)}});var Ur=g((Cu,Vr)=>{"use strict";var qs=require("os"),P=qr(),O=process.env,ee;P("no-color")||P("no-colors")||P("color=false")?ee=!1:(P("color")||P("colors")||P("color=true")||P("color=always"))&&(ee=!0);"FORCE_COLOR"in O&&(ee=O.FORCE_COLOR.length===0||parseInt(O.FORCE_COLOR,10)!==0);function Vs(r){return r===0?!1:{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}function Us(r){if(ee===!1)return 0;if(P("color=16m")||P("color=full")||P("color=truecolor"))return 3;if(P("color=256"))return 2;if(r&&!r.isTTY&&ee!==!0)return 0;let e=ee?1:0;if(process.platform==="win32"){let t=qs.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in O)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(t=>t in O)||O.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in O)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(O.TEAMCITY_VERSION)?1:0;if(O.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in O){let t=parseInt((O.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(O.TERM_PROGRAM){case"iTerm.app":return t>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(O.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(O.TERM)||"COLORTERM"in O?1:(O.TERM==="dumb",e)}function ct(r){let e=Us(r);return Vs(e)}Vr.exports={supportsColor:ct,stdout:ct(process.stdout),stderr:ct(process.stderr)}});var Kr=g((ku,Yr)=>{"use strict";var Hs=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Hr=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Gs=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,zs=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,Ys=new Map([["n",`
4
- `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function zr(r){return r[0]==="u"&&r.length===5||r[0]==="x"&&r.length===3?String.fromCharCode(parseInt(r.slice(1),16)):Ys.get(r)||r}function Ks(r,e){let t=[],n=e.trim().split(/\s*,\s*/g),i;for(let s of n)if(!isNaN(s))t.push(Number(s));else if(i=s.match(Gs))t.push(i[2].replace(zs,(a,u,o)=>u?zr(u):o));else throw new Error(`Invalid Chalk template style argument: ${s} (in style '${r}')`);return t}function Xs(r){Hr.lastIndex=0;let e=[],t;for(;(t=Hr.exec(r))!==null;){let n=t[1];if(t[2]){let i=Ks(n,t[2]);e.push([n].concat(i))}else e.push([n])}return e}function Gr(r,e){let t={};for(let i of e)for(let s of i.styles)t[s[0]]=i.inverse?null:s.slice(1);let n=r;for(let i of Object.keys(t))if(Array.isArray(t[i])){if(!(i in n))throw new Error(`Unknown Chalk style: ${i}`);t[i].length>0?n=n[i].apply(n,t[i]):n=n[i]}return n}Yr.exports=(r,e)=>{let t=[],n=[],i=[];if(e.replace(Hs,(s,a,u,o,l,c)=>{if(a)i.push(zr(a));else if(o){let f=i.join("");i=[],n.push(t.length===0?f:Gr(r,t)(f)),t.push({inverse:u,styles:Xs(o)})}else if(l){if(t.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(Gr(r,t)(i.join(""))),i=[],t.pop()}else i.push(c)}),n.push(i.join("")),t.length>0){let s=`Chalk template literal is missing ${t.length} closing bracket${t.length===1?"":"s"} (\`}\`)`;throw new Error(s)}return n.join("")}});var en=g((Au,fe)=>{"use strict";var ht=Ar(),w=jr(),ft=Ur().stdout,Js=Kr(),Jr=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),Zr=["ansi","ansi","ansi256","ansi16m"],Qr=new Set(["gray"]),te=Object.create(null);function Xr(r,e){e=e||{};let t=ft?ft.level:0;r.level=e.level===void 0?t:e.level,r.enabled="enabled"in e?e.enabled:r.level>0}function ce(r){if(!this||!(this instanceof ce)||this.template){let e={};return Xr(e,r),e.template=function(){let t=[].slice.call(arguments);return ea.apply(null,[e.template].concat(t))},Object.setPrototypeOf(e,ce.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=ce,e.template}Xr(this,r)}Jr&&(w.blue.open="\x1B[94m");for(let r of Object.keys(w))w[r].closeRe=new RegExp(ht(w[r].close),"g"),te[r]={get(){let e=w[r];return Re.call(this,this._styles?this._styles.concat(e):[e],this._empty,r)}};te.visible={get(){return Re.call(this,this._styles||[],!0,"visible")}};w.color.closeRe=new RegExp(ht(w.color.close),"g");for(let r of Object.keys(w.color.ansi))Qr.has(r)||(te[r]={get(){let e=this.level;return function(){let n={open:w.color[Zr[e]][r].apply(null,arguments),close:w.color.close,closeRe:w.color.closeRe};return Re.call(this,this._styles?this._styles.concat(n):[n],this._empty,r)}}});w.bgColor.closeRe=new RegExp(ht(w.bgColor.close),"g");for(let r of Object.keys(w.bgColor.ansi)){if(Qr.has(r))continue;let e="bg"+r[0].toUpperCase()+r.slice(1);te[e]={get(){let t=this.level;return function(){let i={open:w.bgColor[Zr[t]][r].apply(null,arguments),close:w.bgColor.close,closeRe:w.bgColor.closeRe};return Re.call(this,this._styles?this._styles.concat(i):[i],this._empty,r)}}}}var Zs=Object.defineProperties(()=>{},te);function Re(r,e,t){let n=function(){return Qs.apply(n,arguments)};n._styles=r,n._empty=e;let i=this;return Object.defineProperty(n,"level",{enumerable:!0,get(){return i.level},set(s){i.level=s}}),Object.defineProperty(n,"enabled",{enumerable:!0,get(){return i.enabled},set(s){i.enabled=s}}),n.hasGrey=this.hasGrey||t==="gray"||t==="grey",n.__proto__=Zs,n}function Qs(){let r=arguments,e=r.length,t=String(arguments[0]);if(e===0)return"";if(e>1)for(let i=1;i<e;i++)t+=" "+r[i];if(!this.enabled||this.level<=0||!t)return this._empty?"":t;let n=w.dim.open;Jr&&this.hasGrey&&(w.dim.open="");for(let i of this._styles.slice().reverse())t=i.open+t.replace(i.closeRe,i.open)+i.close,t=t.replace(/\r?\n/g,`${i.close}$&${i.open}`);return w.dim.open=n,t}function ea(r,e){if(!Array.isArray(e))return[].slice.call(arguments,1).join(" ");let t=[].slice.call(arguments,2),n=[e.raw[0]];for(let i=1;i<e.length;i++)n.push(String(t[i-1]).replace(/[{}\\]/g,"\\$&")),n.push(String(e.raw[i]));return Js(r,n.join(""))}Object.defineProperties(ce.prototype,te);fe.exports=ce();fe.exports.supportsColor=ft;fe.exports.default=fe.exports});var ln=g(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.default=ua;he.shouldHighlight=un;var tn=pr(),rn=Er(),pt=ta(ot(),!0);function sn(r){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(sn=function(n){return n?t:e})(r)}function ta(r,e){if(!e&&r&&r.__esModule)return r;if(r===null||typeof r!="object"&&typeof r!="function")return{default:r};var t=sn(e);if(t&&t.has(r))return t.get(r);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in r)if(s!=="default"&&{}.hasOwnProperty.call(r,s)){var a=i?Object.getOwnPropertyDescriptor(r,s):null;a&&(a.get||a.set)?Object.defineProperty(n,s,a):n[s]=r[s]}return n.default=r,t&&t.set(r,n),n}var an=typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?(0,pt.createColors)(!1):pt.default,nn=(r,e)=>t=>r(e(t)),ra=new Set(["as","async","from","get","of","set"]);function na(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:nn(nn(r.white,r.bgRed),r.bold)}}var ia=/\r\n|[\n\r\u2028\u2029]/,sa=/^[()[\]{}]$/,on;{let r=/^[a-z][\w-]*$/i,e=function(t,n,i){if(t.type==="name"){if((0,rn.isKeyword)(t.value)||(0,rn.isStrictReservedWord)(t.value,!0)||ra.has(t.value))return"keyword";if(r.test(t.value)&&(i[n-1]==="<"||i.slice(n-2,n)==="</"))return"jsxIdentifier";if(t.value[0]!==t.value[0].toLowerCase())return"capitalized"}return t.type==="punctuator"&&sa.test(t.value)?"bracket":t.type==="invalid"&&(t.value==="@"||t.value==="#")?"punctuator":t.type};on=function*(t){let n;for(;n=tn.default.exec(t);){let i=tn.matchToToken(n);yield{type:e(i,n.index,t),value:i.value}}}}function aa(r,e){let t="";for(let{type:n,value:i}of on(e)){let s=r[n];s?t+=i.split(ia).map(a=>s(a)).join(`
5
- `):t+=i}return t}function un(r){return an.isColorSupported||r.forceColor}var dt;function oa(r){if(r){var e;return(e=dt)!=null||(dt=(0,pt.createColors)(!0)),dt}return an}function ua(r,e={}){if(r!==""&&un(e)){let t=na(oa(e.forceColor));return aa(t,r)}else return r}{let r,e;he.getChalk=({forceColor:t})=>{var n;if((n=r)!=null||(r=en()),t){var i;return(i=e)!=null||(e=new r.constructor({enabled:!0,level:1})),e}return r}}});var gn=g($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.codeFrameColumns=mn;$e.default=pa;var cn=ln(),gt=la(ot(),!0);function pn(r){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(pn=function(n){return n?t:e})(r)}function la(r,e){if(!e&&r&&r.__esModule)return r;if(r===null||typeof r!="object"&&typeof r!="function")return{default:r};var t=pn(e);if(t&&t.has(r))return t.get(r);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in r)if(s!=="default"&&{}.hasOwnProperty.call(r,s)){var a=i?Object.getOwnPropertyDescriptor(r,s):null;a&&(a.get||a.set)?Object.defineProperty(n,s,a):n[s]=r[s]}return n.default=r,t&&t.set(r,n),n}var ca=typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?(0,gt.createColors)(!1):gt.default,fn=(r,e)=>t=>r(e(t)),mt;function fa(r){if(r){var e;return(e=mt)!=null||(mt=(0,gt.createColors)(!0)),mt}return ca}var hn=!1;function ha(r){return{gutter:r.gray,marker:fn(r.red,r.bold),message:fn(r.red,r.bold)}}var dn=/\r\n|[\n\r\u2028\u2029]/;function da(r,e,t){let n=Object.assign({column:0,line:-1},r.start),i=Object.assign({},n,r.end),{linesAbove:s=2,linesBelow:a=3}=t||{},u=n.line,o=n.column,l=i.line,c=i.column,f=Math.max(u-(s+1),0),m=Math.min(e.length,l+a);u===-1&&(f=0),l===-1&&(m=e.length);let b=l-u,d={};if(b)for(let h=0;h<=b;h++){let _=h+u;if(!o)d[_]=!0;else if(h===0){let v=e[_-1].length;d[_]=[o,v-o+1]}else if(h===b)d[_]=[0,c];else{let v=e[_-h].length;d[_]=[0,v]}}else o===c?o?d[u]=[o,0]:d[u]=!0:d[u]=[o,c-o];return{start:f,end:m,markerLines:d}}function mn(r,e,t={}){let n=(t.highlightCode||t.forceColor)&&(0,cn.shouldHighlight)(t),i=fa(t.forceColor),s=ha(i),a=(h,_)=>n?h(_):_,u=r.split(dn),{start:o,end:l,markerLines:c}=da(e,u,t),f=e.start&&typeof e.start.column=="number",m=String(l).length,d=(n?(0,cn.default)(r,t):r).split(dn,l).slice(o,l).map((h,_)=>{let v=o+1+_,V=` ${` ${v}`.slice(-m)} |`,T=c[v],U=!c[v+1];if(T){let J="";if(Array.isArray(T)){let oe=h.slice(0,Math.max(T[0]-1,0)).replace(/[^\t]/g," "),Ee=T[1]||1;J=[`
6
- `,a(s.gutter,V.replace(/\d/g," "))," ",oe,a(s.marker,"^").repeat(Ee)].join(""),U&&t.message&&(J+=" "+a(s.message,t.message))}return[a(s.marker,">"),a(s.gutter,V),h.length>0?` ${h}`:"",J].join("")}else return` ${a(s.gutter,V)}${h.length>0?` ${h}`:""}`}).join(`
1
+ var hs=Object.create;var ke=Object.defineProperty;var ds=Object.getOwnPropertyDescriptor;var ps=Object.getOwnPropertyNames;var ms=Object.getPrototypeOf,gs=Object.prototype.hasOwnProperty;var g=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),_s=(r,e)=>{for(var t in e)ke(r,t,{get:e[t],enumerable:!0})},cr=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ps(e))!gs.call(r,i)&&i!==t&&ke(r,i,{get:()=>e[i],enumerable:!(n=ds(e,i))||n.enumerable});return r};var R=(r,e,t)=>(t=r!=null?hs(ms(r)):{},cr(e||!r||!r.__esModule?ke(t,"default",{value:r,enumerable:!0}):t,r)),bs=r=>cr(ke({},"__esModule",{value:!0}),r);var hr=g((ku,fr)=>{"use strict";var vs=/[|\\{}()[\]^$+*?.-]/g;fr.exports=r=>{if(typeof r!="string")throw new TypeError("Expected a string");return r.replace(vs,"\\$&")}});var gr=g((Au,mr)=>{"use strict";var ys=hr(),xs=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",pr=[].concat(require("module").builtinModules,"bootstrap_node","node").map(r=>new RegExp(`(?:\\((?:node:)?${r}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${r}(?:\\.js)?:\\d+:\\d+$)`));pr.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var nt=class r{constructor(e){e={ignoredPackages:[],...e},"internals"in e||(e.internals=r.nodeInternals()),"cwd"in e||(e.cwd=xs),this._cwd=e.cwd.replace(/\\/g,"/"),this._internals=[].concat(e.internals,ws(e.ignoredPackages)),this._wrapCallSite=e.wrapCallSite||!1}static nodeInternals(){return[...pr]}clean(e,t=0){t=" ".repeat(t),Array.isArray(e)||(e=e.split(`
2
+ `)),!/^\s*at /.test(e[0])&&/^\s*at /.test(e[1])&&(e=e.slice(1));let n=!1,i=null,s=[];return e.forEach(o=>{if(o=o.replace(/\\/g,"/"),this._internals.some(u=>u.test(o)))return;let a=/^\s*at /.test(o);n?o=o.trimEnd().replace(/^(\s+)at /,"$1"):(o=o.trim(),a&&(o=o.slice(3))),o=o.replace(`${this._cwd}/`,""),o&&(a?(i&&(s.push(i),i=null),s.push(o)):(n=!0,i=o))}),s.map(o=>`${t}${o}
3
+ `).join("")}captureString(e,t=this.captureString){typeof e=="function"&&(t=e,e=1/0);let{stackTraceLimit:n}=Error;e&&(Error.stackTraceLimit=e);let i={};Error.captureStackTrace(i,t);let{stack:s}=i;return Error.stackTraceLimit=n,this.clean(s)}capture(e,t=this.capture){typeof e=="function"&&(t=e,e=1/0);let{prepareStackTrace:n,stackTraceLimit:i}=Error;Error.prepareStackTrace=(a,u)=>this._wrapCallSite?u.map(this._wrapCallSite):u,e&&(Error.stackTraceLimit=e);let s={};Error.captureStackTrace(s,t);let{stack:o}=s;return Object.assign(Error,{prepareStackTrace:n,stackTraceLimit:i}),o}at(e=this.at){let[t]=this.capture(1,e);if(!t)return{};let n={line:t.getLineNumber(),column:t.getColumnNumber()};dr(n,t.getFileName(),this._cwd),t.isConstructor()&&Object.defineProperty(n,"constructor",{value:!0,configurable:!0}),t.isEval()&&(n.evalOrigin=t.getEvalOrigin()),t.isNative()&&(n.native=!0);let i;try{i=t.getTypeName()}catch{}i&&i!=="Object"&&i!=="[object Object]"&&(n.type=i);let s=t.getFunctionName();s&&(n.function=s);let o=t.getMethodName();return o&&s!==o&&(n.method=o),n}parseLine(e){let t=e&&e.match(Es);if(!t)return null;let n=t[1]==="new",i=t[2],s=t[3],o=t[4],a=Number(t[5]),u=Number(t[6]),l=t[7],c=t[8],f=t[9],m=t[10]==="native",b=t[11]===")",d,h={};if(c&&(h.line=Number(c)),f&&(h.column=Number(f)),b&&l){let _=0;for(let y=l.length-1;y>0;y--)if(l.charAt(y)===")")_++;else if(l.charAt(y)==="("&&l.charAt(y-1)===" "&&(_--,_===-1&&l.charAt(y-1)===" ")){let D=l.slice(0,y-1);l=l.slice(y+1),i+=` (${D}`;break}}if(i){let _=i.match(Os);_&&(i=_[1],d=_[2])}return dr(h,l,this._cwd),n&&Object.defineProperty(h,"constructor",{value:!0,configurable:!0}),s&&(h.evalOrigin=s,h.evalLine=a,h.evalColumn=u,h.evalFile=o&&o.replace(/\\/g,"/")),m&&(h.native=!0),i&&(h.function=i),d&&i!==d&&(h.method=d),h}};function dr(r,e,t){e&&(e=e.replace(/\\/g,"/"),e.startsWith(`${t}/`)&&(e=e.slice(t.length+1)),r.file=e)}function ws(r){if(r.length===0)return[];let e=r.map(t=>ys(t));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${e.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var Es=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),Os=/^(.*?) \[as (.*?)\]$/;mr.exports=nt});var _r=g(Ae=>{Object.defineProperty(Ae,"__esModule",{value:!0});Ae.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;Ae.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 wr=g(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.isIdentifierChar=xr;fe.isIdentifierName=As;fe.isIdentifierStart=yr;var st="\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-\u1C88\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-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\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",br="\u200C\u200D\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\u0898-\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",Ss=new RegExp("["+st+"]"),Cs=new RegExp("["+st+br+"]");st=br=null;var vr=[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,68,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,349,41,7,1,79,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,159,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,264,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,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,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,757,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],ks=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,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,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,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,406,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,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,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,983,6,110,6,6,9,4759,9,787719,239];function it(r,e){let t=65536;for(let n=0,i=e.length;n<i;n+=2){if(t+=e[n],t>r)return!1;if(t+=e[n+1],t>=r)return!0}return!1}function yr(r){return r<65?r===36:r<=90?!0:r<97?r===95:r<=122?!0:r<=65535?r>=170&&Ss.test(String.fromCharCode(r)):it(r,vr)}function xr(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&&Cs.test(String.fromCharCode(r)):it(r,vr)||it(r,ks)}function As(r){let e=!0;for(let t=0;t<r.length;t++){let n=r.charCodeAt(t);if((n&64512)===55296&&t+1<r.length){let i=r.charCodeAt(++t);(i&64512)===56320&&(n=65536+((n&1023)<<10)+(i&1023))}if(e){if(e=!1,!yr(n))return!1}else if(!xr(n))return!1}return!e}});var Cr=g(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.isKeyword=Rs;G.isReservedWord=Er;G.isStrictBindOnlyReservedWord=Sr;G.isStrictBindReservedWord=Ms;G.isStrictReservedWord=Or;var ot={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"]},Ts=new Set(ot.keyword),Ps=new Set(ot.strict),Ns=new Set(ot.strictBind);function Er(r,e){return e&&r==="await"||r==="enum"}function Or(r,e){return Er(r,e)||Ps.has(r)}function Sr(r){return Ns.has(r)}function Ms(r,e){return Or(r,e)||Sr(r)}function Rs(r){return Ts.has(r)}});var kr=g(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});Object.defineProperty(L,"isIdentifierChar",{enumerable:!0,get:function(){return at.isIdentifierChar}});Object.defineProperty(L,"isIdentifierName",{enumerable:!0,get:function(){return at.isIdentifierName}});Object.defineProperty(L,"isIdentifierStart",{enumerable:!0,get:function(){return at.isIdentifierStart}});Object.defineProperty(L,"isKeyword",{enumerable:!0,get:function(){return he.isKeyword}});Object.defineProperty(L,"isReservedWord",{enumerable:!0,get:function(){return he.isReservedWord}});Object.defineProperty(L,"isStrictBindOnlyReservedWord",{enumerable:!0,get:function(){return he.isStrictBindOnlyReservedWord}});Object.defineProperty(L,"isStrictBindReservedWord",{enumerable:!0,get:function(){return he.isStrictBindReservedWord}});Object.defineProperty(L,"isStrictReservedWord",{enumerable:!0,get:function(){return he.isStrictReservedWord}});var at=wr(),he=Cr()});var lt=g((Ru,ut)=>{var Ar=process.argv||[],Te=process.env,Ls=!("NO_COLOR"in Te||Ar.includes("--no-color"))&&("FORCE_COLOR"in Te||Ar.includes("--color")||process.platform==="win32"||require!=null&&require("tty").isatty(1)&&Te.TERM!=="dumb"||"CI"in Te),$s=(r,e,t=r)=>n=>{let i=""+n,s=i.indexOf(e,r.length);return~s?r+Is(i,e,t,s)+e:r+i+e},Is=(r,e,t,n)=>{let i="",s=0;do i+=r.substring(s,n)+t,s=n+e.length,n=r.indexOf(e,s);while(~n);return i+r.substring(s)},Tr=(r=Ls)=>{let e=r?$s:()=>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")}};ut.exports=Tr();ut.exports.createColors=Tr});var Nr=g((Lu,Pr)=>{"use strict";var Bs=/[|\\{}()[\]^$+*?.]/g;Pr.exports=function(r){if(typeof r!="string")throw new TypeError("Expected a string");return r.replace(Bs,"\\$&")}});var Rr=g(($u,Mr)=>{"use strict";Mr.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var ct=g((Iu,Br)=>{var z=Rr(),Ir={};for(Pe in z)z.hasOwnProperty(Pe)&&(Ir[z[Pe]]=Pe);var Pe,p=Br.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(S in p)if(p.hasOwnProperty(S)){if(!("channels"in p[S]))throw new Error("missing channels property: "+S);if(!("labels"in p[S]))throw new Error("missing channel labels property: "+S);if(p[S].labels.length!==p[S].channels)throw new Error("channel and label counts mismatch: "+S);Lr=p[S].channels,$r=p[S].labels,delete p[S].channels,delete p[S].labels,Object.defineProperty(p[S],"channels",{value:Lr}),Object.defineProperty(p[S],"labels",{value:$r})}var Lr,$r,S;p.rgb.hsl=function(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255,i=Math.min(e,t,n),s=Math.max(e,t,n),o=s-i,a,u,l;return s===i?a=0:e===s?a=(t-n)/o:t===s?a=2+(n-e)/o:n===s&&(a=4+(e-t)/o),a=Math.min(a*60,360),a<0&&(a+=360),l=(i+s)/2,s===i?u=0:l<=.5?u=o/(s+i):u=o/(2-s-i),[a,u*100,l*100]};p.rgb.hsv=function(r){var e,t,n,i,s,o=r[0]/255,a=r[1]/255,u=r[2]/255,l=Math.max(o,a,u),c=l-Math.min(o,a,u),f=function(m){return(l-m)/6/c+1/2};return c===0?i=s=0:(s=c/l,e=f(o),t=f(a),n=f(u),o===l?i=n-t:a===l?i=1/3+e-n:u===l&&(i=2/3+t-e),i<0?i+=1:i>1&&(i-=1)),[i*360,s*100,l*100]};p.rgb.hwb=function(r){var e=r[0],t=r[1],n=r[2],i=p.rgb.hsl(r)[0],s=1/255*Math.min(e,Math.min(t,n));return n=1-1/255*Math.max(e,Math.max(t,n)),[i,s*100,n*100]};p.rgb.cmyk=function(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255,i,s,o,a;return a=Math.min(1-e,1-t,1-n),i=(1-e-a)/(1-a)||0,s=(1-t-a)/(1-a)||0,o=(1-n-a)/(1-a)||0,[i*100,s*100,o*100,a*100]};function Fs(r,e){return Math.pow(r[0]-e[0],2)+Math.pow(r[1]-e[1],2)+Math.pow(r[2]-e[2],2)}p.rgb.keyword=function(r){var e=Ir[r];if(e)return e;var t=1/0,n;for(var i in z)if(z.hasOwnProperty(i)){var s=z[i],o=Fs(r,s);o<t&&(t=o,n=i)}return n};p.keyword.rgb=function(r){return z[r]};p.rgb.xyz=function(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92;var i=e*.4124+t*.3576+n*.1805,s=e*.2126+t*.7152+n*.0722,o=e*.0193+t*.1192+n*.9505;return[i*100,s*100,o*100]};p.rgb.lab=function(r){var e=p.rgb.xyz(r),t=e[0],n=e[1],i=e[2],s,o,a;return t/=95.047,n/=100,i/=108.883,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,s=116*n-16,o=500*(t-n),a=200*(n-i),[s,o,a]};p.hsl.rgb=function(r){var e=r[0]/360,t=r[1]/100,n=r[2]/100,i,s,o,a,u;if(t===0)return u=n*255,[u,u,u];n<.5?s=n*(1+t):s=n+t-n*t,i=2*n-s,a=[0,0,0];for(var l=0;l<3;l++)o=e+1/3*-(l-1),o<0&&o++,o>1&&o--,6*o<1?u=i+(s-i)*6*o:2*o<1?u=s:3*o<2?u=i+(s-i)*(2/3-o)*6:u=i,a[l]=u*255;return a};p.hsl.hsv=function(r){var e=r[0],t=r[1]/100,n=r[2]/100,i=t,s=Math.max(n,.01),o,a;return n*=2,t*=n<=1?n:2-n,i*=s<=1?s:2-s,a=(n+t)/2,o=n===0?2*i/(s+i):2*t/(n+t),[e,o*100,a*100]};p.hsv.rgb=function(r){var e=r[0]/60,t=r[1]/100,n=r[2]/100,i=Math.floor(e)%6,s=e-Math.floor(e),o=255*n*(1-t),a=255*n*(1-t*s),u=255*n*(1-t*(1-s));switch(n*=255,i){case 0:return[n,u,o];case 1:return[a,n,o];case 2:return[o,n,u];case 3:return[o,a,n];case 4:return[u,o,n];case 5:return[n,o,a]}};p.hsv.hsl=function(r){var e=r[0],t=r[1]/100,n=r[2]/100,i=Math.max(n,.01),s,o,a;return a=(2-t)*n,s=(2-t)*i,o=t*i,o/=s<=1?s:2-s,o=o||0,a/=2,[e,o*100,a*100]};p.hwb.rgb=function(r){var e=r[0]/360,t=r[1]/100,n=r[2]/100,i=t+n,s,o,a,u;i>1&&(t/=i,n/=i),s=Math.floor(6*e),o=1-n,a=6*e-s,s&1&&(a=1-a),u=t+a*(o-t);var l,c,f;switch(s){default:case 6:case 0:l=o,c=u,f=t;break;case 1:l=u,c=o,f=t;break;case 2:l=t,c=o,f=u;break;case 3:l=t,c=u,f=o;break;case 4:l=u,c=t,f=o;break;case 5:l=o,c=t,f=u;break}return[l*255,c*255,f*255]};p.cmyk.rgb=function(r){var e=r[0]/100,t=r[1]/100,n=r[2]/100,i=r[3]/100,s,o,a;return s=1-Math.min(1,e*(1-i)+i),o=1-Math.min(1,t*(1-i)+i),a=1-Math.min(1,n*(1-i)+i),[s*255,o*255,a*255]};p.xyz.rgb=function(r){var e=r[0]/100,t=r[1]/100,n=r[2]/100,i,s,o;return i=e*3.2406+t*-1.5372+n*-.4986,s=e*-.9689+t*1.8758+n*.0415,o=e*.0557+t*-.204+n*1.057,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o*12.92,i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[i*255,s*255,o*255]};p.xyz.lab=function(r){var e=r[0],t=r[1],n=r[2],i,s,o;return e/=95.047,t/=100,n/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=116*t-16,s=500*(e-t),o=200*(t-n),[i,s,o]};p.lab.xyz=function(r){var e=r[0],t=r[1],n=r[2],i,s,o;s=(e+16)/116,i=t/500+s,o=s-n/200;var a=Math.pow(s,3),u=Math.pow(i,3),l=Math.pow(o,3);return s=a>.008856?a:(s-16/116)/7.787,i=u>.008856?u:(i-16/116)/7.787,o=l>.008856?l:(o-16/116)/7.787,i*=95.047,s*=100,o*=108.883,[i,s,o]};p.lab.lch=function(r){var e=r[0],t=r[1],n=r[2],i,s,o;return i=Math.atan2(n,t),s=i*360/2/Math.PI,s<0&&(s+=360),o=Math.sqrt(t*t+n*n),[e,o,s]};p.lch.lab=function(r){var e=r[0],t=r[1],n=r[2],i,s,o;return o=n/360*2*Math.PI,i=t*Math.cos(o),s=t*Math.sin(o),[e,i,s]};p.rgb.ansi16=function(r){var e=r[0],t=r[1],n=r[2],i=1 in arguments?arguments[1]:p.rgb.hsv(r)[2];if(i=Math.round(i/50),i===0)return 30;var s=30+(Math.round(n/255)<<2|Math.round(t/255)<<1|Math.round(e/255));return i===2&&(s+=60),s};p.hsv.ansi16=function(r){return p.rgb.ansi16(p.hsv.rgb(r),r[2])};p.rgb.ansi256=function(r){var e=r[0],t=r[1],n=r[2];if(e===t&&t===n)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;var i=16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5);return i};p.ansi16.rgb=function(r){var e=r%10;if(e===0||e===7)return r>50&&(e+=3.5),e=e/10.5*255,[e,e,e];var t=(~~(r>50)+1)*.5,n=(e&1)*t*255,i=(e>>1&1)*t*255,s=(e>>2&1)*t*255;return[n,i,s]};p.ansi256.rgb=function(r){if(r>=232){var e=(r-232)*10+8;return[e,e,e]}r-=16;var t,n=Math.floor(r/36)/5*255,i=Math.floor((t=r%36)/6)/5*255,s=t%6/5*255;return[n,i,s]};p.rgb.hex=function(r){var e=((Math.round(r[0])&255)<<16)+((Math.round(r[1])&255)<<8)+(Math.round(r[2])&255),t=e.toString(16).toUpperCase();return"000000".substring(t.length)+t};p.hex.rgb=function(r){var e=r.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var t=e[0];e[0].length===3&&(t=t.split("").map(function(a){return a+a}).join(""));var n=parseInt(t,16),i=n>>16&255,s=n>>8&255,o=n&255;return[i,s,o]};p.rgb.hcg=function(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255,i=Math.max(Math.max(e,t),n),s=Math.min(Math.min(e,t),n),o=i-s,a,u;return o<1?a=s/(1-o):a=0,o<=0?u=0:i===e?u=(t-n)/o%6:i===t?u=2+(n-e)/o:u=4+(e-t)/o+4,u/=6,u%=1,[u*360,o*100,a*100]};p.hsl.hcg=function(r){var e=r[1]/100,t=r[2]/100,n=1,i=0;return t<.5?n=2*e*t:n=2*e*(1-t),n<1&&(i=(t-.5*n)/(1-n)),[r[0],n*100,i*100]};p.hsv.hcg=function(r){var e=r[1]/100,t=r[2]/100,n=e*t,i=0;return n<1&&(i=(t-n)/(1-n)),[r[0],n*100,i*100]};p.hcg.rgb=function(r){var e=r[0]/360,t=r[1]/100,n=r[2]/100;if(t===0)return[n*255,n*255,n*255];var i=[0,0,0],s=e%1*6,o=s%1,a=1-o,u=0;switch(Math.floor(s)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return u=(1-t)*n,[(t*i[0]+u)*255,(t*i[1]+u)*255,(t*i[2]+u)*255]};p.hcg.hsv=function(r){var e=r[1]/100,t=r[2]/100,n=e+t*(1-e),i=0;return n>0&&(i=e/n),[r[0],i*100,n*100]};p.hcg.hsl=function(r){var e=r[1]/100,t=r[2]/100,n=t*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[r[0],i*100,n*100]};p.hcg.hwb=function(r){var e=r[1]/100,t=r[2]/100,n=e+t*(1-e);return[r[0],(n-e)*100,(1-n)*100]};p.hwb.hcg=function(r){var e=r[1]/100,t=r[2]/100,n=1-t,i=n-e,s=0;return i<1&&(s=(n-i)/(1-i)),[r[0],i*100,s*100]};p.apple.rgb=function(r){return[r[0]/65535*255,r[1]/65535*255,r[2]/65535*255]};p.rgb.apple=function(r){return[r[0]/255*65535,r[1]/255*65535,r[2]/255*65535]};p.gray.rgb=function(r){return[r[0]/100*255,r[0]/100*255,r[0]/100*255]};p.gray.hsl=p.gray.hsv=function(r){return[0,0,r[0]]};p.gray.hwb=function(r){return[0,100,r[0]]};p.gray.cmyk=function(r){return[0,0,0,r[0]]};p.gray.lab=function(r){return[r[0],0,0]};p.gray.hex=function(r){var e=Math.round(r[0]/100*255)&255,t=(e<<16)+(e<<8)+e,n=t.toString(16).toUpperCase();return"000000".substring(n.length)+n};p.rgb.gray=function(r){var e=(r[0]+r[1]+r[2])/3;return[e/255*100]}});var Wr=g((Bu,Fr)=>{var Ne=ct();function Ws(){for(var r={},e=Object.keys(Ne),t=e.length,n=0;n<t;n++)r[e[n]]={distance:-1,parent:null};return r}function js(r){var e=Ws(),t=[r];for(e[r].distance=0;t.length;)for(var n=t.pop(),i=Object.keys(Ne[n]),s=i.length,o=0;o<s;o++){var a=i[o],u=e[a];u.distance===-1&&(u.distance=e[n].distance+1,u.parent=n,t.unshift(a))}return e}function Ds(r,e){return function(t){return e(r(t))}}function qs(r,e){for(var t=[e[r].parent,r],n=Ne[e[r].parent][r],i=e[r].parent;e[i].parent;)t.unshift(e[i].parent),n=Ds(Ne[e[i].parent][i],n),i=e[i].parent;return n.conversion=t,n}Fr.exports=function(r){for(var e=js(r),t={},n=Object.keys(e),i=n.length,s=0;s<i;s++){var o=n[s],a=e[o];a.parent!==null&&(t[o]=qs(o,e))}return t}});var Dr=g((Fu,jr)=>{var ft=ct(),Vs=Wr(),ee={},Us=Object.keys(ft);function Hs(r){var e=function(t){return t==null?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),r(t))};return"conversion"in r&&(e.conversion=r.conversion),e}function Gs(r){var e=function(t){if(t==null)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=r(t);if(typeof n=="object")for(var i=n.length,s=0;s<i;s++)n[s]=Math.round(n[s]);return n};return"conversion"in r&&(e.conversion=r.conversion),e}Us.forEach(function(r){ee[r]={},Object.defineProperty(ee[r],"channels",{value:ft[r].channels}),Object.defineProperty(ee[r],"labels",{value:ft[r].labels});var e=Vs(r),t=Object.keys(e);t.forEach(function(n){var i=e[n];ee[r][n]=Gs(i),ee[r][n].raw=Hs(i)})});jr.exports=ee});var Vr=g((Wu,qr)=>{"use strict";var te=Dr(),Me=(r,e)=>function(){return`\x1B[${r.apply(te,arguments)+e}m`},Re=(r,e)=>function(){let t=r.apply(te,arguments);return`\x1B[${38+e};5;${t}m`},Le=(r,e)=>function(){let t=r.apply(te,arguments);return`\x1B[${38+e};2;${t[0]};${t[1]};${t[2]}m`};function zs(){let r=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.grey=e.color.gray;for(let i of Object.keys(e)){let s=e[i];for(let o of Object.keys(s)){let a=s[o];e[o]={open:`\x1B[${a[0]}m`,close:`\x1B[${a[1]}m`},s[o]=e[o],r.set(a[0],a[1])}Object.defineProperty(e,i,{value:s,enumerable:!1}),Object.defineProperty(e,"codes",{value:r,enumerable:!1})}let t=i=>i,n=(i,s,o)=>[i,s,o];e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",e.color.ansi={ansi:Me(t,0)},e.color.ansi256={ansi256:Re(t,0)},e.color.ansi16m={rgb:Le(n,0)},e.bgColor.ansi={ansi:Me(t,10)},e.bgColor.ansi256={ansi256:Re(t,10)},e.bgColor.ansi16m={rgb:Le(n,10)};for(let i of Object.keys(te)){if(typeof te[i]!="object")continue;let s=te[i];i==="ansi16"&&(i="ansi"),"ansi16"in s&&(e.color.ansi[i]=Me(s.ansi16,0),e.bgColor.ansi[i]=Me(s.ansi16,10)),"ansi256"in s&&(e.color.ansi256[i]=Re(s.ansi256,0),e.bgColor.ansi256[i]=Re(s.ansi256,10)),"rgb"in s&&(e.color.ansi16m[i]=Le(s.rgb,0),e.bgColor.ansi16m[i]=Le(s.rgb,10))}return e}Object.defineProperty(qr,"exports",{enumerable:!0,get:zs})});var Hr=g((ju,Ur)=>{"use strict";Ur.exports=(r,e)=>{e=e||process.argv;let t=r.startsWith("-")?"":r.length===1?"-":"--",n=e.indexOf(t+r),i=e.indexOf("--");return n!==-1&&(i===-1?!0:n<i)}});var zr=g((Du,Gr)=>{"use strict";var Ys=require("os"),N=Hr(),O=process.env,re;N("no-color")||N("no-colors")||N("color=false")?re=!1:(N("color")||N("colors")||N("color=true")||N("color=always"))&&(re=!0);"FORCE_COLOR"in O&&(re=O.FORCE_COLOR.length===0||parseInt(O.FORCE_COLOR,10)!==0);function Ks(r){return r===0?!1:{level:r,hasBasic:!0,has256:r>=2,has16m:r>=3}}function Xs(r){if(re===!1)return 0;if(N("color=16m")||N("color=full")||N("color=truecolor"))return 3;if(N("color=256"))return 2;if(r&&!r.isTTY&&re!==!0)return 0;let e=re?1:0;if(process.platform==="win32"){let t=Ys.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in O)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(t=>t in O)||O.CI_NAME==="codeship"?1:e;if("TEAMCITY_VERSION"in O)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(O.TEAMCITY_VERSION)?1:0;if(O.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in O){let t=parseInt((O.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(O.TERM_PROGRAM){case"iTerm.app":return t>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(O.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(O.TERM)||"COLORTERM"in O?1:(O.TERM==="dumb",e)}function ht(r){let e=Xs(r);return Ks(e)}Gr.exports={supportsColor:ht,stdout:ht(process.stdout),stderr:ht(process.stderr)}});var Zr=g((qu,Jr)=>{"use strict";var Js=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Yr=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Zs=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,Qs=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,eo=new Map([["n",`
4
+ `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function Xr(r){return r[0]==="u"&&r.length===5||r[0]==="x"&&r.length===3?String.fromCharCode(parseInt(r.slice(1),16)):eo.get(r)||r}function to(r,e){let t=[],n=e.trim().split(/\s*,\s*/g),i;for(let s of n)if(!isNaN(s))t.push(Number(s));else if(i=s.match(Zs))t.push(i[2].replace(Qs,(o,a,u)=>a?Xr(a):u));else throw new Error(`Invalid Chalk template style argument: ${s} (in style '${r}')`);return t}function ro(r){Yr.lastIndex=0;let e=[],t;for(;(t=Yr.exec(r))!==null;){let n=t[1];if(t[2]){let i=to(n,t[2]);e.push([n].concat(i))}else e.push([n])}return e}function Kr(r,e){let t={};for(let i of e)for(let s of i.styles)t[s[0]]=i.inverse?null:s.slice(1);let n=r;for(let i of Object.keys(t))if(Array.isArray(t[i])){if(!(i in n))throw new Error(`Unknown Chalk style: ${i}`);t[i].length>0?n=n[i].apply(n,t[i]):n=n[i]}return n}Jr.exports=(r,e)=>{let t=[],n=[],i=[];if(e.replace(Js,(s,o,a,u,l,c)=>{if(o)i.push(Xr(o));else if(u){let f=i.join("");i=[],n.push(t.length===0?f:Kr(r,t)(f)),t.push({inverse:a,styles:ro(u)})}else if(l){if(t.length===0)throw new Error("Found extraneous } in Chalk template literal");n.push(Kr(r,t)(i.join(""))),i=[],t.pop()}else i.push(c)}),n.push(i.join("")),t.length>0){let s=`Chalk template literal is missing ${t.length} closing bracket${t.length===1?"":"s"} (\`}\`)`;throw new Error(s)}return n.join("")}});var nn=g((Vu,pe)=>{"use strict";var pt=Nr(),w=Vr(),dt=zr().stdout,no=Zr(),en=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),tn=["ansi","ansi","ansi256","ansi16m"],rn=new Set(["gray"]),ne=Object.create(null);function Qr(r,e){e=e||{};let t=dt?dt.level:0;r.level=e.level===void 0?t:e.level,r.enabled="enabled"in e?e.enabled:r.level>0}function de(r){if(!this||!(this instanceof de)||this.template){let e={};return Qr(e,r),e.template=function(){let t=[].slice.call(arguments);return oo.apply(null,[e.template].concat(t))},Object.setPrototypeOf(e,de.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=de,e.template}Qr(this,r)}en&&(w.blue.open="\x1B[94m");for(let r of Object.keys(w))w[r].closeRe=new RegExp(pt(w[r].close),"g"),ne[r]={get(){let e=w[r];return $e.call(this,this._styles?this._styles.concat(e):[e],this._empty,r)}};ne.visible={get(){return $e.call(this,this._styles||[],!0,"visible")}};w.color.closeRe=new RegExp(pt(w.color.close),"g");for(let r of Object.keys(w.color.ansi))rn.has(r)||(ne[r]={get(){let e=this.level;return function(){let n={open:w.color[tn[e]][r].apply(null,arguments),close:w.color.close,closeRe:w.color.closeRe};return $e.call(this,this._styles?this._styles.concat(n):[n],this._empty,r)}}});w.bgColor.closeRe=new RegExp(pt(w.bgColor.close),"g");for(let r of Object.keys(w.bgColor.ansi)){if(rn.has(r))continue;let e="bg"+r[0].toUpperCase()+r.slice(1);ne[e]={get(){let t=this.level;return function(){let i={open:w.bgColor[tn[t]][r].apply(null,arguments),close:w.bgColor.close,closeRe:w.bgColor.closeRe};return $e.call(this,this._styles?this._styles.concat(i):[i],this._empty,r)}}}}var io=Object.defineProperties(()=>{},ne);function $e(r,e,t){let n=function(){return so.apply(n,arguments)};n._styles=r,n._empty=e;let i=this;return Object.defineProperty(n,"level",{enumerable:!0,get(){return i.level},set(s){i.level=s}}),Object.defineProperty(n,"enabled",{enumerable:!0,get(){return i.enabled},set(s){i.enabled=s}}),n.hasGrey=this.hasGrey||t==="gray"||t==="grey",n.__proto__=io,n}function so(){let r=arguments,e=r.length,t=String(arguments[0]);if(e===0)return"";if(e>1)for(let i=1;i<e;i++)t+=" "+r[i];if(!this.enabled||this.level<=0||!t)return this._empty?"":t;let n=w.dim.open;en&&this.hasGrey&&(w.dim.open="");for(let i of this._styles.slice().reverse())t=i.open+t.replace(i.closeRe,i.open)+i.close,t=t.replace(/\r?\n/g,`${i.close}$&${i.open}`);return w.dim.open=n,t}function oo(r,e){if(!Array.isArray(e))return[].slice.call(arguments,1).join(" ");let t=[].slice.call(arguments,2),n=[e.raw[0]];for(let i=1;i<e.length;i++)n.push(String(t[i-1]).replace(/[{}\\]/g,"\\$&")),n.push(String(e.raw[i]));return no(r,n.join(""))}Object.defineProperties(de.prototype,ne);pe.exports=de();pe.exports.supportsColor=dt;pe.exports.default=pe.exports});var hn=g(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.default=mo;me.shouldHighlight=fn;var sn=_r(),on=kr(),gt=ao(lt(),!0);function un(r){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(un=function(n){return n?t:e})(r)}function ao(r,e){if(!e&&r&&r.__esModule)return r;if(r===null||typeof r!="object"&&typeof r!="function")return{default:r};var t=un(e);if(t&&t.has(r))return t.get(r);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in r)if(s!=="default"&&{}.hasOwnProperty.call(r,s)){var o=i?Object.getOwnPropertyDescriptor(r,s):null;o&&(o.get||o.set)?Object.defineProperty(n,s,o):n[s]=r[s]}return n.default=r,t&&t.set(r,n),n}var ln=typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?(0,gt.createColors)(!1):gt.default,an=(r,e)=>t=>r(e(t)),uo=new Set(["as","async","from","get","of","set"]);function lo(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:an(an(r.white,r.bgRed),r.bold)}}var co=/\r\n|[\n\r\u2028\u2029]/,fo=/^[()[\]{}]$/,cn;{let r=/^[a-z][\w-]*$/i,e=function(t,n,i){if(t.type==="name"){if((0,on.isKeyword)(t.value)||(0,on.isStrictReservedWord)(t.value,!0)||uo.has(t.value))return"keyword";if(r.test(t.value)&&(i[n-1]==="<"||i.slice(n-2,n)==="</"))return"jsxIdentifier";if(t.value[0]!==t.value[0].toLowerCase())return"capitalized"}return t.type==="punctuator"&&fo.test(t.value)?"bracket":t.type==="invalid"&&(t.value==="@"||t.value==="#")?"punctuator":t.type};cn=function*(t){let n;for(;n=sn.default.exec(t);){let i=sn.matchToToken(n);yield{type:e(i,n.index,t),value:i.value}}}}function ho(r,e){let t="";for(let{type:n,value:i}of cn(e)){let s=r[n];s?t+=i.split(co).map(o=>s(o)).join(`
5
+ `):t+=i}return t}function fn(r){return ln.isColorSupported||r.forceColor}var mt;function po(r){if(r){var e;return(e=mt)!=null||(mt=(0,gt.createColors)(!0)),mt}return ln}function mo(r,e={}){if(r!==""&&fn(e)){let t=lo(po(e.forceColor));return ho(t,r)}else return r}{let r,e;me.getChalk=({forceColor:t})=>{var n;if((n=r)!=null||(r=nn()),t){var i;return(i=e)!=null||(e=new r.constructor({enabled:!0,level:1})),e}return r}}});var vn=g(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.codeFrameColumns=bn;Ie.default=xo;var dn=hn(),bt=go(lt(),!0);function _n(r){if(typeof WeakMap!="function")return null;var e=new WeakMap,t=new WeakMap;return(_n=function(n){return n?t:e})(r)}function go(r,e){if(!e&&r&&r.__esModule)return r;if(r===null||typeof r!="object"&&typeof r!="function")return{default:r};var t=_n(e);if(t&&t.has(r))return t.get(r);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in r)if(s!=="default"&&{}.hasOwnProperty.call(r,s)){var o=i?Object.getOwnPropertyDescriptor(r,s):null;o&&(o.get||o.set)?Object.defineProperty(n,s,o):n[s]=r[s]}return n.default=r,t&&t.set(r,n),n}var _o=typeof process=="object"&&(process.env.FORCE_COLOR==="0"||process.env.FORCE_COLOR==="false")?(0,bt.createColors)(!1):bt.default,pn=(r,e)=>t=>r(e(t)),_t;function bo(r){if(r){var e;return(e=_t)!=null||(_t=(0,bt.createColors)(!0)),_t}return _o}var mn=!1;function vo(r){return{gutter:r.gray,marker:pn(r.red,r.bold),message:pn(r.red,r.bold)}}var gn=/\r\n|[\n\r\u2028\u2029]/;function yo(r,e,t){let n=Object.assign({column:0,line:-1},r.start),i=Object.assign({},n,r.end),{linesAbove:s=2,linesBelow:o=3}=t||{},a=n.line,u=n.column,l=i.line,c=i.column,f=Math.max(a-(s+1),0),m=Math.min(e.length,l+o);a===-1&&(f=0),l===-1&&(m=e.length);let b=l-a,d={};if(b)for(let h=0;h<=b;h++){let _=h+a;if(!u)d[_]=!0;else if(h===0){let y=e[_-1].length;d[_]=[u,y-u+1]}else if(h===b)d[_]=[0,c];else{let y=e[_-h].length;d[_]=[0,y]}}else u===c?u?d[a]=[u,0]:d[a]=!0:d[a]=[u,c-u];return{start:f,end:m,markerLines:d}}function bn(r,e,t={}){let n=(t.highlightCode||t.forceColor)&&(0,dn.shouldHighlight)(t),i=bo(t.forceColor),s=vo(i),o=(h,_)=>n?h(_):_,a=r.split(gn),{start:u,end:l,markerLines:c}=yo(e,a,t),f=e.start&&typeof e.start.column=="number",m=String(l).length,d=(n?(0,dn.default)(r,t):r).split(gn,l).slice(u,l).map((h,_)=>{let y=u+1+_,U=` ${` ${y}`.slice(-m)} |`,P=c[y],H=!c[y+1];if(P){let Q="";if(Array.isArray(P)){let ce=h.slice(0,Math.max(P[0]-1,0)).replace(/[^\t]/g," "),Ce=P[1]||1;Q=[`
6
+ `,o(s.gutter,U.replace(/\d/g," "))," ",ce,o(s.marker,"^").repeat(Ce)].join(""),H&&t.message&&(Q+=" "+o(s.message,t.message))}return[o(s.marker,">"),o(s.gutter,U),h.length>0?` ${h}`:"",Q].join("")}else return` ${o(s.gutter,U)}${h.length>0?` ${h}`:""}`}).join(`
7
7
  `);return t.message&&!f&&(d=`${" ".repeat(m+1)}${t.message}
8
- ${d}`),n?i.reset(d):d}function pa(r,e,t,n={}){if(!hn){hn=!0;let s="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning)process.emitWarning(s,"DeprecationWarning");else{let a=new Error(s);a.name="DeprecationWarning",console.warn(new Error(s))}}return t=Math.max(t,0),mn(r,{start:{column:t,line:e}},n)}});var yn=g((Mu,vn)=>{"use strict";var{Duplex:ma}=require("stream");function _n(r){r.emit("close")}function ga(){!this.destroyed&&this._writableState.finished&&this.destroy()}function bn(r){this.removeListener("error",bn),this.destroy(),this.listenerCount("error")===0&&this.emit("error",r)}function _a(r,e){let t=!0,n=new ma({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return r.on("message",function(s,a){let u=!a&&n._readableState.objectMode?s.toString():s;n.push(u)||r.pause()}),r.once("error",function(s){n.destroyed||(t=!1,n.destroy(s))}),r.once("close",function(){n.destroyed||n.push(null)}),n._destroy=function(i,s){if(r.readyState===r.CLOSED){s(i),process.nextTick(_n,n);return}let a=!1;r.once("error",function(o){a=!0,s(o)}),r.once("close",function(){a||s(i),process.nextTick(_n,n)}),t&&r.terminate()},n._final=function(i){if(r.readyState===r.CONNECTING){r.once("open",function(){n._final(i)});return}r._socket!==null&&(r._socket._writableState.finished?(i(),n._readableState.endEmitted&&n.destroy()):(r._socket.once("finish",function(){i()}),r.close()))},n._read=function(){r.isPaused&&r.resume()},n._write=function(i,s,a){if(r.readyState===r.CONNECTING){r.once("open",function(){n._write(i,s,a)});return}r.send(i,a)},n.on("end",ga),n.on("error",bn),n}vn.exports=_a});var j=g((Nu,xn)=>{"use strict";xn.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var de=g((Ru,Le)=>{"use strict";var{EMPTY_BUFFER:ba}=j(),_t=Buffer[Symbol.species];function va(r,e){if(r.length===0)return ba;if(r.length===1)return r[0];let t=Buffer.allocUnsafe(e),n=0;for(let i=0;i<r.length;i++){let s=r[i];t.set(s,n),n+=s.length}return n<e?new _t(t.buffer,t.byteOffset,n):t}function wn(r,e,t,n,i){for(let s=0;s<i;s++)t[n+s]=r[s]^e[s&3]}function On(r,e){for(let t=0;t<r.length;t++)r[t]^=e[t&3]}function ya(r){return r.length===r.buffer.byteLength?r.buffer:r.buffer.slice(r.byteOffset,r.byteOffset+r.length)}function bt(r){if(bt.readOnly=!0,Buffer.isBuffer(r))return r;let e;return r instanceof ArrayBuffer?e=new _t(r):ArrayBuffer.isView(r)?e=new _t(r.buffer,r.byteOffset,r.byteLength):(e=Buffer.from(r),bt.readOnly=!1),e}Le.exports={concat:va,mask:wn,toArrayBuffer:ya,toBuffer:bt,unmask:On};if(!process.env.WS_NO_BUFFER_UTIL)try{let r=require("bufferutil");Le.exports.mask=function(e,t,n,i,s){s<48?wn(e,t,n,i,s):r.mask(e,t,n,i,s)},Le.exports.unmask=function(e,t){e.length<32?On(e,t):r.unmask(e,t)}}catch{}});var Cn=g(($u,Sn)=>{"use strict";var En=Symbol("kDone"),vt=Symbol("kRun"),yt=class{constructor(e){this[En]=()=>{this.pending--,this[vt]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[vt]()}[vt](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[En])}}};Sn.exports=yt});var ge=g((Lu,Pn)=>{"use strict";var pe=require("zlib"),kn=de(),xa=Cn(),{kStatusCode:An}=j(),wa=Buffer[Symbol.species],Oa=Buffer.from([0,0,255,255]),Be=Symbol("permessage-deflate"),L=Symbol("total-length"),me=Symbol("callback"),D=Symbol("buffers"),Fe=Symbol("error"),Ie,xt=class{constructor(e,t,n){if(this._maxPayload=n|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,!Ie){let i=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;Ie=new xa(i)}}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[me];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,n=e.find(i=>!(t.serverNoContextTakeover===!1&&i.server_no_context_takeover||i.server_max_window_bits&&(t.serverMaxWindowBits===!1||typeof t.serverMaxWindowBits=="number"&&t.serverMaxWindowBits>i.server_max_window_bits)||typeof t.clientMaxWindowBits=="number"&&!i.client_max_window_bits));if(!n)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(n.server_no_context_takeover=!0),t.clientNoContextTakeover&&(n.client_no_context_takeover=!0),typeof t.serverMaxWindowBits=="number"&&(n.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits=="number"?n.client_max_window_bits=t.clientMaxWindowBits:(n.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete n.client_max_window_bits,n}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(n=>{let i=t[n];if(i.length>1)throw new Error(`Parameter "${n}" must have only a single value`);if(i=i[0],n==="client_max_window_bits"){if(i!==!0){let s=+i;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${n}": ${i}`);i=s}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${n}": ${i}`)}else if(n==="server_max_window_bits"){let s=+i;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${n}": ${i}`);i=s}else if(n==="client_no_context_takeover"||n==="server_no_context_takeover"){if(i!==!0)throw new TypeError(`Invalid value for parameter "${n}": ${i}`)}else throw new Error(`Unknown parameter "${n}"`);t[n]=i})}),e}decompress(e,t,n){Ie.add(i=>{this._decompress(e,t,(s,a)=>{i(),n(s,a)})})}compress(e,t,n){Ie.add(i=>{this._compress(e,t,(s,a)=>{i(),n(s,a)})})}_decompress(e,t,n){let i=this._isServer?"client":"server";if(!this._inflate){let s=`${i}_max_window_bits`,a=typeof this.params[s]!="number"?pe.Z_DEFAULT_WINDOWBITS:this.params[s];this._inflate=pe.createInflateRaw({...this._options.zlibInflateOptions,windowBits:a}),this._inflate[Be]=this,this._inflate[L]=0,this._inflate[D]=[],this._inflate.on("error",Sa),this._inflate.on("data",Tn)}this._inflate[me]=n,this._inflate.write(e),t&&this._inflate.write(Oa),this._inflate.flush(()=>{let s=this._inflate[Fe];if(s){this._inflate.close(),this._inflate=null,n(s);return}let a=kn.concat(this._inflate[D],this._inflate[L]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[L]=0,this._inflate[D]=[],t&&this.params[`${i}_no_context_takeover`]&&this._inflate.reset()),n(null,a)})}_compress(e,t,n){let i=this._isServer?"server":"client";if(!this._deflate){let s=`${i}_max_window_bits`,a=typeof this.params[s]!="number"?pe.Z_DEFAULT_WINDOWBITS:this.params[s];this._deflate=pe.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:a}),this._deflate[L]=0,this._deflate[D]=[],this._deflate.on("data",Ea)}this._deflate[me]=n,this._deflate.write(e),this._deflate.flush(pe.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let s=kn.concat(this._deflate[D],this._deflate[L]);t&&(s=new wa(s.buffer,s.byteOffset,s.length-4)),this._deflate[me]=null,this._deflate[L]=0,this._deflate[D]=[],t&&this.params[`${i}_no_context_takeover`]&&this._deflate.reset(),n(null,s)})}};Pn.exports=xt;function Ea(r){this[D].push(r),this[L]+=r.length}function Tn(r){if(this[L]+=r.length,this[Be]._maxPayload<1||this[L]<=this[Be]._maxPayload){this[D].push(r);return}this[Fe]=new RangeError("Max payload size exceeded"),this[Fe].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Fe][An]=1009,this.removeListener("data",Tn),this.reset()}function Sa(r){this[Be]._inflate=null,r[An]=1007,this[me](r)}});var _e=g((Iu,We)=>{"use strict";var{isUtf8:Mn}=require("buffer"),Ca=[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 ka(r){return r>=1e3&&r<=1014&&r!==1004&&r!==1005&&r!==1006||r>=3e3&&r<=4999}function wt(r){let e=r.length,t=0;for(;t<e;)if(!(r[t]&128))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}We.exports={isValidStatusCode:ka,isValidUTF8:wt,tokenChars:Ca};if(Mn)We.exports.isValidUTF8=function(r){return r.length<24?wt(r):Mn(r)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let r=require("utf-8-validate");We.exports.isValidUTF8=function(e){return e.length<32?wt(e):r(e)}}catch{}});var kt=g((Fu,Bn)=>{"use strict";var{Writable:Aa}=require("stream"),Nn=ge(),{BINARY_TYPES:Ta,EMPTY_BUFFER:Rn,kStatusCode:Pa,kWebSocket:Ma}=j(),{concat:Ot,toArrayBuffer:Na,unmask:Ra}=de(),{isValidStatusCode:$a,isValidUTF8:$n}=_e(),je=Buffer[Symbol.species],k=0,Ln=1,In=2,Fn=3,Et=4,St=5,De=6,Ct=class extends Aa{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||Ta[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[Ma]=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=k}_write(e,t,n){if(this._opcode===8&&this._state==k)return n();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(n)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let n=this._buffers[0];return this._buffers[0]=new je(n.buffer,n.byteOffset+e,n.length-e),new je(n.buffer,n.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let n=this._buffers[0],i=t.length-e;e>=n.length?t.set(this._buffers.shift(),i):(t.set(new Uint8Array(n.buffer,n.byteOffset,e),i),this._buffers[0]=new je(n.buffer,n.byteOffset+e,n.length-e)),e-=n.length}while(e>0);return t}startLoop(e){this._loop=!0;do switch(this._state){case k:this.getInfo(e);break;case Ln:this.getPayloadLength16(e);break;case In:this.getPayloadLength64(e);break;case Fn:this.getMask();break;case Et:this.getData(e);break;case St:case De: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){let i=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(i);return}let n=(t[0]&64)===64;if(n&&!this._extensions[Nn.extensionName]){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._fin=(t[0]&128)===128,this._opcode=t[0]&15,this._payloadLength=t[1]&127,this._opcode===0){if(n){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(!this._fragmented){let i=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._compressed=n}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let i=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(i);return}if(n){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let i=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(i);return}}else{let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(t[1]&128)===128,this._isServer){if(!this._masked){let i=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(i);return}}else if(this._masked){let i=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(i);return}this._payloadLength===126?this._state=Ln:this._payloadLength===127?this._state=In: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),n=t.readUInt32BE(0);if(n>Math.pow(2,21)-1){let i=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(i);return}this._payloadLength=n*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=Et}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=Et}getData(e){let t=Rn;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]&&Ra(t,this._mask)}if(this._opcode>7){this.controlMessage(t,e);return}if(this._compressed){this._state=St,this.decompress(t,e);return}t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e)}decompress(e,t){this._extensions[Nn.extensionName].decompress(e,this._fin,(i,s)=>{if(i)return t(i);if(s.length){if(this._messageLength+=s.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let a=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");t(a);return}this._fragments.push(s)}this.dataMessage(t),this._state===k&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=k;return}let t=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let i;this._binaryType==="nodebuffer"?i=Ot(n,t):this._binaryType==="arraybuffer"?i=Na(Ot(n,t)):i=n,this._allowSynchronousEvents?(this.emit("message",i,!0),this._state=k):(this._state=De,setImmediate(()=>{this.emit("message",i,!0),this._state=k,this.startLoop(e)}))}else{let i=Ot(n,t);if(!this._skipUTF8Validation&&!$n(i)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(s);return}this._state===St||this._allowSynchronousEvents?(this.emit("message",i,!1),this._state=k):(this._state=De,setImmediate(()=>{this.emit("message",i,!1),this._state=k,this.startLoop(e)}))}}controlMessage(e,t){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,Rn),this.end();else{let n=e.readUInt16BE(0);if(!$a(n)){let s=this.createError(RangeError,`invalid status code ${n}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");t(s);return}let i=new je(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!$n(i)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(s);return}this._loop=!1,this.emit("conclude",n,i),this.end()}this._state=k;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=k):(this._state=De,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=k,this.startLoop(t)}))}createError(e,t,n,i,s){this._loop=!1,this._errored=!0;let a=new e(n?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(a,this.createError),a.code=s,a[Pa]=i,a}};Bn.exports=Ct});var Tt=g((Wu,Dn)=>{"use strict";var{Duplex:Bu}=require("stream"),{randomFillSync:La}=require("crypto"),Wn=ge(),{EMPTY_BUFFER:Ia}=j(),{isValidStatusCode:Fa}=_e(),{mask:jn,toBuffer:re}=de(),M=Symbol("kByteLength"),Ba=Buffer.alloc(4),qe=8*1024,z,ne=qe,At=class r{constructor(e,t,n){this._extensions=t||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(e,t){let n,i=!1,s=2,a=!1;t.mask&&(n=t.maskBuffer||Ba,t.generateMask?t.generateMask(n):(ne===qe&&(z===void 0&&(z=Buffer.alloc(qe)),La(z,0,qe),ne=0),n[0]=z[ne++],n[1]=z[ne++],n[2]=z[ne++],n[3]=z[ne++]),a=(n[0]|n[1]|n[2]|n[3])===0,s=6);let u;typeof e=="string"?(!t.mask||a)&&t[M]!==void 0?u=t[M]:(e=Buffer.from(e),u=e.length):(u=e.length,i=t.mask&&t.readOnly&&!a);let o=u;u>=65536?(s+=8,o=127):u>125&&(s+=2,o=126);let l=Buffer.allocUnsafe(i?u+s:s);return l[0]=t.fin?t.opcode|128:t.opcode,t.rsv1&&(l[0]|=64),l[1]=o,o===126?l.writeUInt16BE(u,2):o===127&&(l[2]=l[3]=0,l.writeUIntBE(u,4,6)),t.mask?(l[1]|=128,l[s-4]=n[0],l[s-3]=n[1],l[s-2]=n[2],l[s-1]=n[3],a?[l,e]:i?(jn(e,n,l,s,u),[l]):(jn(e,n,e,0,u),[l,e])):[l,e]}close(e,t,n,i){let s;if(e===void 0)s=Ia;else{if(typeof e!="number"||!Fa(e))throw new TypeError("First argument must be a valid error code number");if(t===void 0||!t.length)s=Buffer.allocUnsafe(2),s.writeUInt16BE(e,0);else{let u=Buffer.byteLength(t);if(u>123)throw new RangeError("The message must not be greater than 123 bytes");s=Buffer.allocUnsafe(2+u),s.writeUInt16BE(e,0),typeof t=="string"?s.write(t,2):s.set(t,2)}}let a={[M]:s.length,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,s,!1,a,i]):this.sendFrame(r.frame(s,a),i)}ping(e,t,n){let i,s;if(typeof e=="string"?(i=Buffer.byteLength(e),s=!1):(e=re(e),i=e.length,s=re.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let a={[M]:i,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:s,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,a,n]):this.sendFrame(r.frame(e,a),n)}pong(e,t,n){let i,s;if(typeof e=="string"?(i=Buffer.byteLength(e),s=!1):(e=re(e),i=e.length,s=re.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let a={[M]:i,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:s,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,a,n]):this.sendFrame(r.frame(e,a),n)}send(e,t,n){let i=this._extensions[Wn.extensionName],s=t.binary?2:1,a=t.compress,u,o;if(typeof e=="string"?(u=Buffer.byteLength(e),o=!1):(e=re(e),u=e.length,o=re.readOnly),this._firstFragment?(this._firstFragment=!1,a&&i&&i.params[i._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(a=u>=i._threshold),this._compress=a):(a=!1,s=0),t.fin&&(this._firstFragment=!0),i){let l={[M]:u,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:o,rsv1:a};this._deflating?this.enqueue([this.dispatch,e,this._compress,l,n]):this.dispatch(e,this._compress,l,n)}else this.sendFrame(r.frame(e,{[M]:u,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:o,rsv1:!1}),n)}dispatch(e,t,n,i){if(!t){this.sendFrame(r.frame(e,n),i);return}let s=this._extensions[Wn.extensionName];this._bufferedBytes+=n[M],this._deflating=!0,s.compress(e,n.fin,(a,u)=>{if(this._socket.destroyed){let o=new Error("The socket was closed while data was being compressed");typeof i=="function"&&i(o);for(let l=0;l<this._queue.length;l++){let c=this._queue[l],f=c[c.length-1];typeof f=="function"&&f(o)}return}this._bufferedBytes-=n[M],this._deflating=!1,n.readOnly=!1,this.sendFrame(r.frame(u,n),i),this.dequeue()})}dequeue(){for(;!this._deflating&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][M],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][M],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)}};Dn.exports=At});var Xn=g((ju,Kn)=>{"use strict";var{kForOnEventAttribute:be,kListener:Pt}=j(),qn=Symbol("kCode"),Vn=Symbol("kData"),Un=Symbol("kError"),Hn=Symbol("kMessage"),Gn=Symbol("kReason"),ie=Symbol("kTarget"),zn=Symbol("kType"),Yn=Symbol("kWasClean"),I=class{constructor(e){this[ie]=null,this[zn]=e}get target(){return this[ie]}get type(){return this[zn]}};Object.defineProperty(I.prototype,"target",{enumerable:!0});Object.defineProperty(I.prototype,"type",{enumerable:!0});var Y=class extends I{constructor(e,t={}){super(e),this[qn]=t.code===void 0?0:t.code,this[Gn]=t.reason===void 0?"":t.reason,this[Yn]=t.wasClean===void 0?!1:t.wasClean}get code(){return this[qn]}get reason(){return this[Gn]}get wasClean(){return this[Yn]}};Object.defineProperty(Y.prototype,"code",{enumerable:!0});Object.defineProperty(Y.prototype,"reason",{enumerable:!0});Object.defineProperty(Y.prototype,"wasClean",{enumerable:!0});var se=class extends I{constructor(e,t={}){super(e),this[Un]=t.error===void 0?null:t.error,this[Hn]=t.message===void 0?"":t.message}get error(){return this[Un]}get message(){return this[Hn]}};Object.defineProperty(se.prototype,"error",{enumerable:!0});Object.defineProperty(se.prototype,"message",{enumerable:!0});var ve=class extends I{constructor(e,t={}){super(e),this[Vn]=t.data===void 0?null:t.data}get data(){return this[Vn]}};Object.defineProperty(ve.prototype,"data",{enumerable:!0});var Wa={addEventListener(r,e,t={}){for(let i of this.listeners(r))if(!t[be]&&i[Pt]===e&&!i[be])return;let n;if(r==="message")n=function(s,a){let u=new ve("message",{data:a?s:s.toString()});u[ie]=this,Ve(e,this,u)};else if(r==="close")n=function(s,a){let u=new Y("close",{code:s,reason:a.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});u[ie]=this,Ve(e,this,u)};else if(r==="error")n=function(s){let a=new se("error",{error:s,message:s.message});a[ie]=this,Ve(e,this,a)};else if(r==="open")n=function(){let s=new I("open");s[ie]=this,Ve(e,this,s)};else return;n[be]=!!t[be],n[Pt]=e,t.once?this.once(r,n):this.on(r,n)},removeEventListener(r,e){for(let t of this.listeners(r))if(t[Pt]===e&&!t[be]){this.removeListener(r,t);break}}};Kn.exports={CloseEvent:Y,ErrorEvent:se,Event:I,EventTarget:Wa,MessageEvent:ve};function Ve(r,e,t){typeof r=="object"&&r.handleEvent?r.handleEvent.call(r,t):r.call(e,t)}});var Mt=g((Du,Jn)=>{"use strict";var{tokenChars:ye}=_e();function $(r,e,t){r[e]===void 0?r[e]=[t]:r[e].push(t)}function ja(r){let e=Object.create(null),t=Object.create(null),n=!1,i=!1,s=!1,a,u,o=-1,l=-1,c=-1,f=0;for(;f<r.length;f++)if(l=r.charCodeAt(f),a===void 0)if(c===-1&&ye[l]===1)o===-1&&(o=f);else if(f!==0&&(l===32||l===9))c===-1&&o!==-1&&(c=f);else if(l===59||l===44){if(o===-1)throw new SyntaxError(`Unexpected character at index ${f}`);c===-1&&(c=f);let b=r.slice(o,c);l===44?($(e,b,t),t=Object.create(null)):a=b,o=c=-1}else throw new SyntaxError(`Unexpected character at index ${f}`);else if(u===void 0)if(c===-1&&ye[l]===1)o===-1&&(o=f);else if(l===32||l===9)c===-1&&o!==-1&&(c=f);else if(l===59||l===44){if(o===-1)throw new SyntaxError(`Unexpected character at index ${f}`);c===-1&&(c=f),$(t,r.slice(o,c),!0),l===44&&($(e,a,t),t=Object.create(null),a=void 0),o=c=-1}else if(l===61&&o!==-1&&c===-1)u=r.slice(o,f),o=c=-1;else throw new SyntaxError(`Unexpected character at index ${f}`);else if(i){if(ye[l]!==1)throw new SyntaxError(`Unexpected character at index ${f}`);o===-1?o=f:n||(n=!0),i=!1}else if(s)if(ye[l]===1)o===-1&&(o=f);else if(l===34&&o!==-1)s=!1,c=f;else if(l===92)i=!0;else throw new SyntaxError(`Unexpected character at index ${f}`);else if(l===34&&r.charCodeAt(f-1)===61)s=!0;else if(c===-1&&ye[l]===1)o===-1&&(o=f);else if(o!==-1&&(l===32||l===9))c===-1&&(c=f);else if(l===59||l===44){if(o===-1)throw new SyntaxError(`Unexpected character at index ${f}`);c===-1&&(c=f);let b=r.slice(o,c);n&&(b=b.replace(/\\/g,""),n=!1),$(t,u,b),l===44&&($(e,a,t),t=Object.create(null),a=void 0),u=void 0,o=c=-1}else throw new SyntaxError(`Unexpected character at index ${f}`);if(o===-1||s||l===32||l===9)throw new SyntaxError("Unexpected end of input");c===-1&&(c=f);let m=r.slice(o,c);return a===void 0?$(e,m,t):(u===void 0?$(t,m,!0):n?$(t,u,m.replace(/\\/g,"")):$(t,u,m),$(e,a,t)),e}function Da(r){return Object.keys(r).map(e=>{let t=r[e];return Array.isArray(t)||(t=[t]),t.map(n=>[e].concat(Object.keys(n).map(i=>{let s=n[i];return Array.isArray(s)||(s=[s]),s.map(a=>a===!0?i:`${i}=${a}`).join("; ")})).join("; ")).join(", ")}).join(", ")}Jn.exports={format:Da,parse:ja}});var It=g((Uu,ui)=>{"use strict";var qa=require("events"),Va=require("https"),Ua=require("http"),ei=require("net"),Ha=require("tls"),{randomBytes:Ga,createHash:za}=require("crypto"),{Duplex:qu,Readable:Vu}=require("stream"),{URL:Nt}=require("url"),q=ge(),Ya=kt(),Ka=Tt(),{BINARY_TYPES:Zn,EMPTY_BUFFER:Ue,GUID:Xa,kForOnEventAttribute:Rt,kListener:Ja,kStatusCode:Za,kWebSocket:E,NOOP:ti}=j(),{EventTarget:{addEventListener:Qa,removeEventListener:eo}}=Xn(),{format:to,parse:ro}=Mt(),{toBuffer:no}=de(),io=30*1e3,ri=Symbol("kAborted"),$t=[8,13],F=["CONNECTING","OPEN","CLOSING","CLOSED"],so=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,x=class r extends qa{constructor(e,t,n){super(),this._binaryType=Zn[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Ue,this._closeTimer=null,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?(n=t,t=[]):t=[t]),ni(this,e,t,n)):(this._autoPong=n.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){Zn.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,n){let i=new Ya({allowSynchronousEvents:n.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation});this._sender=new Ka(e,this._extensions,n.generateMask),this._receiver=i,this._socket=e,i[E]=this,e[E]=this,i.on("conclude",uo),i.on("drain",lo),i.on("error",co),i.on("message",fo),i.on("ping",ho),i.on("pong",po),e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",si),e.on("data",Ge),e.on("end",ai),e.on("error",oi),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[q.extensionName]&&this._extensions[q.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){C(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,n=>{n||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),io)}}pause(){this.readyState===r.CONNECTING||this.readyState===r.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,t,n){if(this.readyState===r.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(n=e,e=t=void 0):typeof t=="function"&&(n=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==r.OPEN){Lt(this,e,n);return}t===void 0&&(t=!this._isServer),this._sender.ping(e||Ue,t,n)}pong(e,t,n){if(this.readyState===r.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(n=e,e=t=void 0):typeof t=="function"&&(n=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==r.OPEN){Lt(this,e,n);return}t===void 0&&(t=!this._isServer),this._sender.pong(e||Ue,t,n)}resume(){this.readyState===r.CONNECTING||this.readyState===r.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,n){if(this.readyState===r.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"&&(n=t,t={}),typeof e=="number"&&(e=e.toString()),this.readyState!==r.OPEN){Lt(this,e,n);return}let i={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[q.extensionName]||(i.compress=!1),this._sender.send(e||Ue,i,n)}terminate(){if(this.readyState!==r.CLOSED){if(this.readyState===r.CONNECTING){C(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=r.CLOSING,this._socket.destroy())}}};Object.defineProperty(x,"CONNECTING",{enumerable:!0,value:F.indexOf("CONNECTING")});Object.defineProperty(x.prototype,"CONNECTING",{enumerable:!0,value:F.indexOf("CONNECTING")});Object.defineProperty(x,"OPEN",{enumerable:!0,value:F.indexOf("OPEN")});Object.defineProperty(x.prototype,"OPEN",{enumerable:!0,value:F.indexOf("OPEN")});Object.defineProperty(x,"CLOSING",{enumerable:!0,value:F.indexOf("CLOSING")});Object.defineProperty(x.prototype,"CLOSING",{enumerable:!0,value:F.indexOf("CLOSING")});Object.defineProperty(x,"CLOSED",{enumerable:!0,value:F.indexOf("CLOSED")});Object.defineProperty(x.prototype,"CLOSED",{enumerable:!0,value:F.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(r=>{Object.defineProperty(x.prototype,r,{enumerable:!0})});["open","error","close","message"].forEach(r=>{Object.defineProperty(x.prototype,`on${r}`,{enumerable:!0,get(){for(let e of this.listeners(r))if(e[Rt])return e[Ja];return null},set(e){for(let t of this.listeners(r))if(t[Rt]){this.removeListener(r,t);break}typeof e=="function"&&this.addEventListener(r,e,{[Rt]:!0})}})});x.prototype.addEventListener=Qa;x.prototype.removeEventListener=eo;ui.exports=x;function ni(r,e,t,n){let i={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:$t[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...n,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=i.autoPong,!$t.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${$t.join(", ")})`);let s;if(e instanceof Nt)s=e;else try{s=new Nt(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}s.protocol==="http:"?s.protocol="ws:":s.protocol==="https:"&&(s.protocol="wss:"),r._url=s.href;let a=s.protocol==="wss:",u=s.protocol==="ws+unix:",o;if(s.protocol!=="ws:"&&!a&&!u?o=`The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`:u&&!s.pathname?o="The URL's pathname is empty":s.hash&&(o="The URL contains a fragment identifier"),o){let h=new SyntaxError(o);if(r._redirects===0)throw h;He(r,h);return}let l=a?443:80,c=Ga(16).toString("base64"),f=a?Va.request:Ua.request,m=new Set,b;if(i.createConnection=i.createConnection||(a?oo:ao),i.defaultPort=i.defaultPort||l,i.port=s.port||l,i.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,i.headers={...i.headers,"Sec-WebSocket-Version":i.protocolVersion,"Sec-WebSocket-Key":c,Connection:"Upgrade",Upgrade:"websocket"},i.path=s.pathname+s.search,i.timeout=i.handshakeTimeout,i.perMessageDeflate&&(b=new q(i.perMessageDeflate!==!0?i.perMessageDeflate:{},!1,i.maxPayload),i.headers["Sec-WebSocket-Extensions"]=to({[q.extensionName]:b.offer()})),t.length){for(let h of t){if(typeof h!="string"||!so.test(h)||m.has(h))throw new SyntaxError("An invalid or duplicated subprotocol was specified");m.add(h)}i.headers["Sec-WebSocket-Protocol"]=t.join(",")}if(i.origin&&(i.protocolVersion<13?i.headers["Sec-WebSocket-Origin"]=i.origin:i.headers.Origin=i.origin),(s.username||s.password)&&(i.auth=`${s.username}:${s.password}`),u){let h=i.path.split(":");i.socketPath=h[0],i.path=h[1]}let d;if(i.followRedirects){if(r._redirects===0){r._originalIpc=u,r._originalSecure=a,r._originalHostOrSocketPath=u?i.socketPath:s.host;let h=n&&n.headers;if(n={...n,headers:{}},h)for(let[_,v]of Object.entries(h))n.headers[_.toLowerCase()]=v}else if(r.listenerCount("redirect")===0){let h=u?r._originalIpc?i.socketPath===r._originalHostOrSocketPath:!1:r._originalIpc?!1:s.host===r._originalHostOrSocketPath;(!h||r._originalSecure&&!a)&&(delete i.headers.authorization,delete i.headers.cookie,h||delete i.headers.host,i.auth=void 0)}i.auth&&!n.headers.authorization&&(n.headers.authorization="Basic "+Buffer.from(i.auth).toString("base64")),d=r._req=f(i),r._redirects&&r.emit("redirect",r.url,d)}else d=r._req=f(i);i.timeout&&d.on("timeout",()=>{C(r,d,"Opening handshake has timed out")}),d.on("error",h=>{d===null||d[ri]||(d=r._req=null,He(r,h))}),d.on("response",h=>{let _=h.headers.location,v=h.statusCode;if(_&&i.followRedirects&&v>=300&&v<400){if(++r._redirects>i.maxRedirects){C(r,d,"Maximum redirects exceeded");return}d.abort();let W;try{W=new Nt(_,e)}catch{let T=new SyntaxError(`Invalid URL: ${_}`);He(r,T);return}ni(r,W,t,n)}else r.emit("unexpected-response",d,h)||C(r,d,`Unexpected server response: ${h.statusCode}`)}),d.on("upgrade",(h,_,v)=>{if(r.emit("upgrade",h),r.readyState!==x.CONNECTING)return;d=r._req=null;let W=h.headers.upgrade;if(W===void 0||W.toLowerCase()!=="websocket"){C(r,_,"Invalid Upgrade header");return}let V=za("sha1").update(c+Xa).digest("base64");if(h.headers["sec-websocket-accept"]!==V){C(r,_,"Invalid Sec-WebSocket-Accept header");return}let T=h.headers["sec-websocket-protocol"],U;if(T!==void 0?m.size?m.has(T)||(U="Server sent an invalid subprotocol"):U="Server sent a subprotocol but none was requested":m.size&&(U="Server sent no subprotocol"),U){C(r,_,U);return}T&&(r._protocol=T);let J=h.headers["sec-websocket-extensions"];if(J!==void 0){if(!b){C(r,_,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let oe;try{oe=ro(J)}catch{C(r,_,"Invalid Sec-WebSocket-Extensions header");return}let Ee=Object.keys(oe);if(Ee.length!==1||Ee[0]!==q.extensionName){C(r,_,"Server indicated an extension that was not requested");return}try{b.accept(oe[q.extensionName])}catch{C(r,_,"Invalid Sec-WebSocket-Extensions header");return}r._extensions[q.extensionName]=b}r.setSocket(_,v,{allowSynchronousEvents:i.allowSynchronousEvents,generateMask:i.generateMask,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation})}),i.finishRequest?i.finishRequest(d,r):d.end()}function He(r,e){r._readyState=x.CLOSING,r.emit("error",e),r.emitClose()}function ao(r){return r.path=r.socketPath,ei.connect(r)}function oo(r){return r.path=void 0,!r.servername&&r.servername!==""&&(r.servername=ei.isIP(r.host)?"":r.host),Ha.connect(r)}function C(r,e,t){r._readyState=x.CLOSING;let n=new Error(t);Error.captureStackTrace(n,C),e.setHeader?(e[ri]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(He,r,n)):(e.destroy(n),e.once("error",r.emit.bind(r,"error")),e.once("close",r.emitClose.bind(r)))}function Lt(r,e,t){if(e){let n=no(e).length;r._socket?r._sender._bufferedBytes+=n:r._bufferedAmount+=n}if(t){let n=new Error(`WebSocket is not open: readyState ${r.readyState} (${F[r.readyState]})`);process.nextTick(t,n)}}function uo(r,e){let t=this[E];t._closeFrameReceived=!0,t._closeMessage=e,t._closeCode=r,t._socket[E]!==void 0&&(t._socket.removeListener("data",Ge),process.nextTick(ii,t._socket),r===1005?t.close():t.close(r,e))}function lo(){let r=this[E];r.isPaused||r._socket.resume()}function co(r){let e=this[E];e._socket[E]!==void 0&&(e._socket.removeListener("data",Ge),process.nextTick(ii,e._socket),e.close(r[Za])),e.emit("error",r)}function Qn(){this[E].emitClose()}function fo(r,e){this[E].emit("message",r,e)}function ho(r){let e=this[E];e._autoPong&&e.pong(r,!this._isServer,ti),e.emit("ping",r)}function po(r){this[E].emit("pong",r)}function ii(r){r.resume()}function si(){let r=this[E];this.removeListener("close",si),this.removeListener("data",Ge),this.removeListener("end",ai),r._readyState=x.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[E]=void 0,clearTimeout(r._closeTimer),r._receiver._writableState.finished||r._receiver._writableState.errorEmitted?r.emitClose():(r._receiver.on("error",Qn),r._receiver.on("finish",Qn))}function Ge(r){this[E]._receiver.write(r)||this.pause()}function ai(){let r=this[E];r._readyState=x.CLOSING,r._receiver.end(),this.end()}function oi(){let r=this[E];this.removeListener("error",oi),this.on("error",ti),r&&(r._readyState=x.CLOSING,this.destroy())}});var ci=g((Hu,li)=>{"use strict";var{tokenChars:mo}=_e();function go(r){let e=new Set,t=-1,n=-1,i=0;for(i;i<r.length;i++){let a=r.charCodeAt(i);if(n===-1&&mo[a]===1)t===-1&&(t=i);else if(i!==0&&(a===32||a===9))n===-1&&t!==-1&&(n=i);else if(a===44){if(t===-1)throw new SyntaxError(`Unexpected character at index ${i}`);n===-1&&(n=i);let u=r.slice(t,n);if(e.has(u))throw new SyntaxError(`The "${u}" subprotocol is duplicated`);e.add(u),t=n=-1}else throw new SyntaxError(`Unexpected character at index ${i}`)}if(t===-1||n!==-1)throw new SyntaxError("Unexpected end of input");let s=r.slice(t,i);if(e.has(s))throw new SyntaxError(`The "${s}" subprotocol is duplicated`);return e.add(s),e}li.exports={parse:go}});var _i=g((zu,gi)=>{"use strict";var _o=require("events"),ze=require("http"),{Duplex:Gu}=require("stream"),{createHash:bo}=require("crypto"),fi=Mt(),K=ge(),vo=ci(),yo=It(),{GUID:xo,kWebSocket:wo}=j(),Oo=/^[+/0-9A-Za-z]{22}==$/,hi=0,di=1,mi=2,Ft=class extends _o{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:yo,...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=ze.createServer((n,i)=>{let s=ze.STATUS_CODES[426];i.writeHead(426,{"Content-Length":s.length,"Content-Type":"text/plain"}),i.end(s)}),this._server.listen(e.port,e.host,e.backlog,t)):e.server&&(this._server=e.server),this._server){let n=this.emit.bind(this,"connection");this._removeListeners=Eo(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(i,s,a)=>{this.handleUpgrade(i,s,a,n)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=hi}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===mi){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(xe,this);return}if(e&&this.once("close",e),this._state!==di)if(this._state=di,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(xe,this):process.nextTick(xe,this);else{let t=this._server;this._removeListeners(),this._removeListeners=this._server=null,t.close(()=>{xe(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,n,i){t.on("error",pi);let s=e.headers["sec-websocket-key"],a=e.headers.upgrade,u=+e.headers["sec-websocket-version"];if(e.method!=="GET"){X(this,e,t,405,"Invalid HTTP method");return}if(a===void 0||a.toLowerCase()!=="websocket"){X(this,e,t,400,"Invalid Upgrade header");return}if(s===void 0||!Oo.test(s)){X(this,e,t,400,"Missing or invalid Sec-WebSocket-Key header");return}if(u!==8&&u!==13){X(this,e,t,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(e)){we(t,400);return}let o=e.headers["sec-websocket-protocol"],l=new Set;if(o!==void 0)try{l=vo.parse(o)}catch{X(this,e,t,400,"Invalid Sec-WebSocket-Protocol header");return}let c=e.headers["sec-websocket-extensions"],f={};if(this.options.perMessageDeflate&&c!==void 0){let m=new K(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let b=fi.parse(c);b[K.extensionName]&&(m.accept(b[K.extensionName]),f[K.extensionName]=m)}catch{X(this,e,t,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let m={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(m,(b,d,h,_)=>{if(!b)return we(t,d||401,h,_);this.completeUpgrade(f,s,l,e,t,n,i)});return}if(!this.options.verifyClient(m))return we(t,401)}this.completeUpgrade(f,s,l,e,t,n,i)}completeUpgrade(e,t,n,i,s,a,u){if(!s.readable||!s.writable)return s.destroy();if(s[wo])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>hi)return we(s,503);let l=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${bo("sha1").update(t+xo).digest("base64")}`],c=new this.options.WebSocket(null,void 0,this.options);if(n.size){let f=this.options.handleProtocols?this.options.handleProtocols(n,i):n.values().next().value;f&&(l.push(`Sec-WebSocket-Protocol: ${f}`),c._protocol=f)}if(e[K.extensionName]){let f=e[K.extensionName].params,m=fi.format({[K.extensionName]:[f]});l.push(`Sec-WebSocket-Extensions: ${m}`),c._extensions=e}this.emit("headers",l,i),s.write(l.concat(`\r
8
+ ${d}`),n?i.reset(d):d}function xo(r,e,t,n={}){if(!mn){mn=!0;let s="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning)process.emitWarning(s,"DeprecationWarning");else{let o=new Error(s);o.name="DeprecationWarning",console.warn(new Error(s))}}return t=Math.max(t,0),bn(r,{start:{column:t,line:e}},n)}});var En=g((Gu,wn)=>{"use strict";var{Duplex:wo}=require("stream");function yn(r){r.emit("close")}function Eo(){!this.destroyed&&this._writableState.finished&&this.destroy()}function xn(r){this.removeListener("error",xn),this.destroy(),this.listenerCount("error")===0&&this.emit("error",r)}function Oo(r,e){let t=!0,n=new wo({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return r.on("message",function(s,o){let a=!o&&n._readableState.objectMode?s.toString():s;n.push(a)||r.pause()}),r.once("error",function(s){n.destroyed||(t=!1,n.destroy(s))}),r.once("close",function(){n.destroyed||n.push(null)}),n._destroy=function(i,s){if(r.readyState===r.CLOSED){s(i),process.nextTick(yn,n);return}let o=!1;r.once("error",function(u){o=!0,s(u)}),r.once("close",function(){o||s(i),process.nextTick(yn,n)}),t&&r.terminate()},n._final=function(i){if(r.readyState===r.CONNECTING){r.once("open",function(){n._final(i)});return}r._socket!==null&&(r._socket._writableState.finished?(i(),n._readableState.endEmitted&&n.destroy()):(r._socket.once("finish",function(){i()}),r.close()))},n._read=function(){r.isPaused&&r.resume()},n._write=function(i,s,o){if(r.readyState===r.CONNECTING){r.once("open",function(){n._write(i,s,o)});return}r.send(i,o)},n.on("end",Eo),n.on("error",xn),n}wn.exports=Oo});var I=g((zu,Cn)=>{"use strict";var On=["nodebuffer","arraybuffer","fragments"],Sn=typeof Blob<"u";Sn&&On.push("blob");Cn.exports={BINARY_TYPES:On,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:Sn,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var ge=g((Yu,Be)=>{"use strict";var{EMPTY_BUFFER:So}=I(),vt=Buffer[Symbol.species];function Co(r,e){if(r.length===0)return So;if(r.length===1)return r[0];let t=Buffer.allocUnsafe(e),n=0;for(let i=0;i<r.length;i++){let s=r[i];t.set(s,n),n+=s.length}return n<e?new vt(t.buffer,t.byteOffset,n):t}function kn(r,e,t,n,i){for(let s=0;s<i;s++)t[n+s]=r[s]^e[s&3]}function An(r,e){for(let t=0;t<r.length;t++)r[t]^=e[t&3]}function ko(r){return r.length===r.buffer.byteLength?r.buffer:r.buffer.slice(r.byteOffset,r.byteOffset+r.length)}function yt(r){if(yt.readOnly=!0,Buffer.isBuffer(r))return r;let e;return r instanceof ArrayBuffer?e=new vt(r):ArrayBuffer.isView(r)?e=new vt(r.buffer,r.byteOffset,r.byteLength):(e=Buffer.from(r),yt.readOnly=!1),e}Be.exports={concat:Co,mask:kn,toArrayBuffer:ko,toBuffer:yt,unmask:An};if(!process.env.WS_NO_BUFFER_UTIL)try{let r=require("bufferutil");Be.exports.mask=function(e,t,n,i,s){s<48?kn(e,t,n,i,s):r.mask(e,t,n,i,s)},Be.exports.unmask=function(e,t){e.length<32?An(e,t):r.unmask(e,t)}}catch{}});var Nn=g((Ku,Pn)=>{"use strict";var Tn=Symbol("kDone"),xt=Symbol("kRun"),wt=class{constructor(e){this[Tn]=()=>{this.pending--,this[xt]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[xt]()}[xt](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[Tn])}}};Pn.exports=wt});var ve=g((Xu,$n)=>{"use strict";var _e=require("zlib"),Mn=ge(),Ao=Nn(),{kStatusCode:Rn}=I(),To=Buffer[Symbol.species],Po=Buffer.from([0,0,255,255]),je=Symbol("permessage-deflate"),B=Symbol("total-length"),be=Symbol("callback"),q=Symbol("buffers"),We=Symbol("error"),Fe,Et=class{constructor(e,t,n){if(this._maxPayload=n|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,!Fe){let i=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;Fe=new Ao(i)}}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[be];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,n=e.find(i=>!(t.serverNoContextTakeover===!1&&i.server_no_context_takeover||i.server_max_window_bits&&(t.serverMaxWindowBits===!1||typeof t.serverMaxWindowBits=="number"&&t.serverMaxWindowBits>i.server_max_window_bits)||typeof t.clientMaxWindowBits=="number"&&!i.client_max_window_bits));if(!n)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(n.server_no_context_takeover=!0),t.clientNoContextTakeover&&(n.client_no_context_takeover=!0),typeof t.serverMaxWindowBits=="number"&&(n.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits=="number"?n.client_max_window_bits=t.clientMaxWindowBits:(n.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete n.client_max_window_bits,n}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(n=>{let i=t[n];if(i.length>1)throw new Error(`Parameter "${n}" must have only a single value`);if(i=i[0],n==="client_max_window_bits"){if(i!==!0){let s=+i;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${n}": ${i}`);i=s}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${n}": ${i}`)}else if(n==="server_max_window_bits"){let s=+i;if(!Number.isInteger(s)||s<8||s>15)throw new TypeError(`Invalid value for parameter "${n}": ${i}`);i=s}else if(n==="client_no_context_takeover"||n==="server_no_context_takeover"){if(i!==!0)throw new TypeError(`Invalid value for parameter "${n}": ${i}`)}else throw new Error(`Unknown parameter "${n}"`);t[n]=i})}),e}decompress(e,t,n){Fe.add(i=>{this._decompress(e,t,(s,o)=>{i(),n(s,o)})})}compress(e,t,n){Fe.add(i=>{this._compress(e,t,(s,o)=>{i(),n(s,o)})})}_decompress(e,t,n){let i=this._isServer?"client":"server";if(!this._inflate){let s=`${i}_max_window_bits`,o=typeof this.params[s]!="number"?_e.Z_DEFAULT_WINDOWBITS:this.params[s];this._inflate=_e.createInflateRaw({...this._options.zlibInflateOptions,windowBits:o}),this._inflate[je]=this,this._inflate[B]=0,this._inflate[q]=[],this._inflate.on("error",Mo),this._inflate.on("data",Ln)}this._inflate[be]=n,this._inflate.write(e),t&&this._inflate.write(Po),this._inflate.flush(()=>{let s=this._inflate[We];if(s){this._inflate.close(),this._inflate=null,n(s);return}let o=Mn.concat(this._inflate[q],this._inflate[B]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[B]=0,this._inflate[q]=[],t&&this.params[`${i}_no_context_takeover`]&&this._inflate.reset()),n(null,o)})}_compress(e,t,n){let i=this._isServer?"server":"client";if(!this._deflate){let s=`${i}_max_window_bits`,o=typeof this.params[s]!="number"?_e.Z_DEFAULT_WINDOWBITS:this.params[s];this._deflate=_e.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:o}),this._deflate[B]=0,this._deflate[q]=[],this._deflate.on("data",No)}this._deflate[be]=n,this._deflate.write(e),this._deflate.flush(_e.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let s=Mn.concat(this._deflate[q],this._deflate[B]);t&&(s=new To(s.buffer,s.byteOffset,s.length-4)),this._deflate[be]=null,this._deflate[B]=0,this._deflate[q]=[],t&&this.params[`${i}_no_context_takeover`]&&this._deflate.reset(),n(null,s)})}};$n.exports=Et;function No(r){this[q].push(r),this[B]+=r.length}function Ln(r){if(this[B]+=r.length,this[je]._maxPayload<1||this[B]<=this[je]._maxPayload){this[q].push(r);return}this[We]=new RangeError("Max payload size exceeded"),this[We].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[We][Rn]=1009,this.removeListener("data",Ln),this.reset()}function Mo(r){this[je]._inflate=null,r[Rn]=1007,this[be](r)}});var ie=g((Ju,De)=>{"use strict";var{isUtf8:In}=require("buffer"),{hasBlob:Ro}=I(),Lo=[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 $o(r){return r>=1e3&&r<=1014&&r!==1004&&r!==1005&&r!==1006||r>=3e3&&r<=4999}function Ot(r){let e=r.length,t=0;for(;t<e;)if(!(r[t]&128))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 Io(r){return Ro&&typeof r=="object"&&typeof r.arrayBuffer=="function"&&typeof r.type=="string"&&typeof r.stream=="function"&&(r[Symbol.toStringTag]==="Blob"||r[Symbol.toStringTag]==="File")}De.exports={isBlob:Io,isValidStatusCode:$o,isValidUTF8:Ot,tokenChars:Lo};if(In)De.exports.isValidUTF8=function(r){return r.length<24?Ot(r):In(r)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let r=require("utf-8-validate");De.exports.isValidUTF8=function(e){return e.length<32?Ot(e):r(e)}}catch{}});var Tt=g((Zu,Vn)=>{"use strict";var{Writable:Bo}=require("stream"),Bn=ve(),{BINARY_TYPES:Fo,EMPTY_BUFFER:Fn,kStatusCode:Wo,kWebSocket:jo}=I(),{concat:St,toArrayBuffer:Do,unmask:qo}=ge(),{isValidStatusCode:Vo,isValidUTF8:Wn}=ie(),qe=Buffer[Symbol.species],k=0,jn=1,Dn=2,qn=3,Ct=4,kt=5,Ve=6,At=class extends Bo{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||Fo[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[jo]=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=k}_write(e,t,n){if(this._opcode===8&&this._state==k)return n();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(n)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let n=this._buffers[0];return this._buffers[0]=new qe(n.buffer,n.byteOffset+e,n.length-e),new qe(n.buffer,n.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let n=this._buffers[0],i=t.length-e;e>=n.length?t.set(this._buffers.shift(),i):(t.set(new Uint8Array(n.buffer,n.byteOffset,e),i),this._buffers[0]=new qe(n.buffer,n.byteOffset+e,n.length-e)),e-=n.length}while(e>0);return t}startLoop(e){this._loop=!0;do switch(this._state){case k:this.getInfo(e);break;case jn:this.getPayloadLength16(e);break;case Dn:this.getPayloadLength64(e);break;case qn:this.getMask();break;case Ct:this.getData(e);break;case kt:case Ve: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){let i=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(i);return}let n=(t[0]&64)===64;if(n&&!this._extensions[Bn.extensionName]){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._fin=(t[0]&128)===128,this._opcode=t[0]&15,this._payloadLength=t[1]&127,this._opcode===0){if(n){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(!this._fragmented){let i=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._compressed=n}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let i=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(i);return}if(n){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let i=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(i);return}}else{let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(t[1]&128)===128,this._isServer){if(!this._masked){let i=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(i);return}}else if(this._masked){let i=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(i);return}this._payloadLength===126?this._state=jn:this._payloadLength===127?this._state=Dn: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),n=t.readUInt32BE(0);if(n>Math.pow(2,21)-1){let i=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(i);return}this._payloadLength=n*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=qn:this._state=Ct}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=Ct}getData(e){let t=Fn;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]&&qo(t,this._mask)}if(this._opcode>7){this.controlMessage(t,e);return}if(this._compressed){this._state=kt,this.decompress(t,e);return}t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e)}decompress(e,t){this._extensions[Bn.extensionName].decompress(e,this._fin,(i,s)=>{if(i)return t(i);if(s.length){if(this._messageLength+=s.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(s)}this.dataMessage(t),this._state===k&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=k;return}let t=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let i;this._binaryType==="nodebuffer"?i=St(n,t):this._binaryType==="arraybuffer"?i=Do(St(n,t)):this._binaryType==="blob"?i=new Blob(n):i=n,this._allowSynchronousEvents?(this.emit("message",i,!0),this._state=k):(this._state=Ve,setImmediate(()=>{this.emit("message",i,!0),this._state=k,this.startLoop(e)}))}else{let i=St(n,t);if(!this._skipUTF8Validation&&!Wn(i)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(s);return}this._state===kt||this._allowSynchronousEvents?(this.emit("message",i,!1),this._state=k):(this._state=Ve,setImmediate(()=>{this.emit("message",i,!1),this._state=k,this.startLoop(e)}))}}controlMessage(e,t){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,Fn),this.end();else{let n=e.readUInt16BE(0);if(!Vo(n)){let s=this.createError(RangeError,`invalid status code ${n}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");t(s);return}let i=new qe(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!Wn(i)){let s=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(s);return}this._loop=!1,this.emit("conclude",n,i),this.end()}this._state=k;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=k):(this._state=Ve,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=k,this.startLoop(t)}))}createError(e,t,n,i,s){this._loop=!1,this._errored=!0;let o=new e(n?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(o,this.createError),o.code=s,o[Wo]=i,o}};Vn.exports=At});var Mt=g((el,Gn)=>{"use strict";var{Duplex:Qu}=require("stream"),{randomFillSync:Uo}=require("crypto"),Un=ve(),{EMPTY_BUFFER:Ho,kWebSocket:Go,NOOP:zo}=I(),{isBlob:se,isValidStatusCode:Yo}=ie(),{mask:Hn,toBuffer:Y}=ge(),A=Symbol("kByteLength"),Ko=Buffer.alloc(4),Ue=8*1024,K,oe=Ue,M=0,Xo=1,Jo=2,Pt=class r{constructor(e,t,n){this._extensions=t||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=M,this.onerror=zo,this[Go]=void 0}static frame(e,t){let n,i=!1,s=2,o=!1;t.mask&&(n=t.maskBuffer||Ko,t.generateMask?t.generateMask(n):(oe===Ue&&(K===void 0&&(K=Buffer.alloc(Ue)),Uo(K,0,Ue),oe=0),n[0]=K[oe++],n[1]=K[oe++],n[2]=K[oe++],n[3]=K[oe++]),o=(n[0]|n[1]|n[2]|n[3])===0,s=6);let a;typeof e=="string"?(!t.mask||o)&&t[A]!==void 0?a=t[A]:(e=Buffer.from(e),a=e.length):(a=e.length,i=t.mask&&t.readOnly&&!o);let u=a;a>=65536?(s+=8,u=127):a>125&&(s+=2,u=126);let l=Buffer.allocUnsafe(i?a+s:s);return l[0]=t.fin?t.opcode|128:t.opcode,t.rsv1&&(l[0]|=64),l[1]=u,u===126?l.writeUInt16BE(a,2):u===127&&(l[2]=l[3]=0,l.writeUIntBE(a,4,6)),t.mask?(l[1]|=128,l[s-4]=n[0],l[s-3]=n[1],l[s-2]=n[2],l[s-1]=n[3],o?[l,e]:i?(Hn(e,n,l,s,a),[l]):(Hn(e,n,e,0,a),[l,e])):[l,e]}close(e,t,n,i){let s;if(e===void 0)s=Ho;else{if(typeof e!="number"||!Yo(e))throw new TypeError("First argument must be a valid error code number");if(t===void 0||!t.length)s=Buffer.allocUnsafe(2),s.writeUInt16BE(e,0);else{let a=Buffer.byteLength(t);if(a>123)throw new RangeError("The message must not be greater than 123 bytes");s=Buffer.allocUnsafe(2+a),s.writeUInt16BE(e,0),typeof t=="string"?s.write(t,2):s.set(t,2)}}let o={[A]:s.length,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==M?this.enqueue([this.dispatch,s,!1,o,i]):this.sendFrame(r.frame(s,o),i)}ping(e,t,n){let i,s;if(typeof e=="string"?(i=Buffer.byteLength(e),s=!1):se(e)?(i=e.size,s=!1):(e=Y(e),i=e.length,s=Y.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[A]:i,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:s,rsv1:!1};se(e)?this._state!==M?this.enqueue([this.getBlobData,e,!1,o,n]):this.getBlobData(e,!1,o,n):this._state!==M?this.enqueue([this.dispatch,e,!1,o,n]):this.sendFrame(r.frame(e,o),n)}pong(e,t,n){let i,s;if(typeof e=="string"?(i=Buffer.byteLength(e),s=!1):se(e)?(i=e.size,s=!1):(e=Y(e),i=e.length,s=Y.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[A]:i,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:s,rsv1:!1};se(e)?this._state!==M?this.enqueue([this.getBlobData,e,!1,o,n]):this.getBlobData(e,!1,o,n):this._state!==M?this.enqueue([this.dispatch,e,!1,o,n]):this.sendFrame(r.frame(e,o),n)}send(e,t,n){let i=this._extensions[Un.extensionName],s=t.binary?2:1,o=t.compress,a,u;typeof e=="string"?(a=Buffer.byteLength(e),u=!1):se(e)?(a=e.size,u=!1):(e=Y(e),a=e.length,u=Y.readOnly),this._firstFragment?(this._firstFragment=!1,o&&i&&i.params[i._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(o=a>=i._threshold),this._compress=o):(o=!1,s=0),t.fin&&(this._firstFragment=!0);let l={[A]:a,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:u,rsv1:o};se(e)?this._state!==M?this.enqueue([this.getBlobData,e,this._compress,l,n]):this.getBlobData(e,this._compress,l,n):this._state!==M?this.enqueue([this.dispatch,e,this._compress,l,n]):this.dispatch(e,this._compress,l,n)}getBlobData(e,t,n,i){this._bufferedBytes+=n[A],this._state=Jo,e.arrayBuffer().then(s=>{if(this._socket.destroyed){let a=new Error("The socket was closed while the blob was being read");process.nextTick(Nt,this,a,i);return}this._bufferedBytes-=n[A];let o=Y(s);t?this.dispatch(o,t,n,i):(this._state=M,this.sendFrame(r.frame(o,n),i),this.dequeue())}).catch(s=>{process.nextTick(Zo,this,s,i)})}dispatch(e,t,n,i){if(!t){this.sendFrame(r.frame(e,n),i);return}let s=this._extensions[Un.extensionName];this._bufferedBytes+=n[A],this._state=Xo,s.compress(e,n.fin,(o,a)=>{if(this._socket.destroyed){let u=new Error("The socket was closed while data was being compressed");Nt(this,u,i);return}this._bufferedBytes-=n[A],this._state=M,n.readOnly=!1,this.sendFrame(r.frame(a,n),i),this.dequeue()})}dequeue(){for(;this._state===M&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][A],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][A],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)}};Gn.exports=Pt;function Nt(r,e,t){typeof t=="function"&&t(e);for(let n=0;n<r._queue.length;n++){let i=r._queue[n],s=i[i.length-1];typeof s=="function"&&s(e)}}function Zo(r,e,t){Nt(r,e,t),r.onerror(e)}});var ti=g((tl,ei)=>{"use strict";var{kForOnEventAttribute:ye,kListener:Rt}=I(),zn=Symbol("kCode"),Yn=Symbol("kData"),Kn=Symbol("kError"),Xn=Symbol("kMessage"),Jn=Symbol("kReason"),ae=Symbol("kTarget"),Zn=Symbol("kType"),Qn=Symbol("kWasClean"),F=class{constructor(e){this[ae]=null,this[Zn]=e}get target(){return this[ae]}get type(){return this[Zn]}};Object.defineProperty(F.prototype,"target",{enumerable:!0});Object.defineProperty(F.prototype,"type",{enumerable:!0});var X=class extends F{constructor(e,t={}){super(e),this[zn]=t.code===void 0?0:t.code,this[Jn]=t.reason===void 0?"":t.reason,this[Qn]=t.wasClean===void 0?!1:t.wasClean}get code(){return this[zn]}get reason(){return this[Jn]}get wasClean(){return this[Qn]}};Object.defineProperty(X.prototype,"code",{enumerable:!0});Object.defineProperty(X.prototype,"reason",{enumerable:!0});Object.defineProperty(X.prototype,"wasClean",{enumerable:!0});var ue=class extends F{constructor(e,t={}){super(e),this[Kn]=t.error===void 0?null:t.error,this[Xn]=t.message===void 0?"":t.message}get error(){return this[Kn]}get message(){return this[Xn]}};Object.defineProperty(ue.prototype,"error",{enumerable:!0});Object.defineProperty(ue.prototype,"message",{enumerable:!0});var xe=class extends F{constructor(e,t={}){super(e),this[Yn]=t.data===void 0?null:t.data}get data(){return this[Yn]}};Object.defineProperty(xe.prototype,"data",{enumerable:!0});var Qo={addEventListener(r,e,t={}){for(let i of this.listeners(r))if(!t[ye]&&i[Rt]===e&&!i[ye])return;let n;if(r==="message")n=function(s,o){let a=new xe("message",{data:o?s:s.toString()});a[ae]=this,He(e,this,a)};else if(r==="close")n=function(s,o){let a=new X("close",{code:s,reason:o.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});a[ae]=this,He(e,this,a)};else if(r==="error")n=function(s){let o=new ue("error",{error:s,message:s.message});o[ae]=this,He(e,this,o)};else if(r==="open")n=function(){let s=new F("open");s[ae]=this,He(e,this,s)};else return;n[ye]=!!t[ye],n[Rt]=e,t.once?this.once(r,n):this.on(r,n)},removeEventListener(r,e){for(let t of this.listeners(r))if(t[Rt]===e&&!t[ye]){this.removeListener(r,t);break}}};ei.exports={CloseEvent:X,ErrorEvent:ue,Event:F,EventTarget:Qo,MessageEvent:xe};function He(r,e,t){typeof r=="object"&&r.handleEvent?r.handleEvent.call(r,t):r.call(e,t)}});var Lt=g((rl,ri)=>{"use strict";var{tokenChars:we}=ie();function $(r,e,t){r[e]===void 0?r[e]=[t]:r[e].push(t)}function ea(r){let e=Object.create(null),t=Object.create(null),n=!1,i=!1,s=!1,o,a,u=-1,l=-1,c=-1,f=0;for(;f<r.length;f++)if(l=r.charCodeAt(f),o===void 0)if(c===-1&&we[l]===1)u===-1&&(u=f);else if(f!==0&&(l===32||l===9))c===-1&&u!==-1&&(c=f);else if(l===59||l===44){if(u===-1)throw new SyntaxError(`Unexpected character at index ${f}`);c===-1&&(c=f);let b=r.slice(u,c);l===44?($(e,b,t),t=Object.create(null)):o=b,u=c=-1}else throw new SyntaxError(`Unexpected character at index ${f}`);else if(a===void 0)if(c===-1&&we[l]===1)u===-1&&(u=f);else if(l===32||l===9)c===-1&&u!==-1&&(c=f);else if(l===59||l===44){if(u===-1)throw new SyntaxError(`Unexpected character at index ${f}`);c===-1&&(c=f),$(t,r.slice(u,c),!0),l===44&&($(e,o,t),t=Object.create(null),o=void 0),u=c=-1}else if(l===61&&u!==-1&&c===-1)a=r.slice(u,f),u=c=-1;else throw new SyntaxError(`Unexpected character at index ${f}`);else if(i){if(we[l]!==1)throw new SyntaxError(`Unexpected character at index ${f}`);u===-1?u=f:n||(n=!0),i=!1}else if(s)if(we[l]===1)u===-1&&(u=f);else if(l===34&&u!==-1)s=!1,c=f;else if(l===92)i=!0;else throw new SyntaxError(`Unexpected character at index ${f}`);else if(l===34&&r.charCodeAt(f-1)===61)s=!0;else if(c===-1&&we[l]===1)u===-1&&(u=f);else if(u!==-1&&(l===32||l===9))c===-1&&(c=f);else if(l===59||l===44){if(u===-1)throw new SyntaxError(`Unexpected character at index ${f}`);c===-1&&(c=f);let b=r.slice(u,c);n&&(b=b.replace(/\\/g,""),n=!1),$(t,a,b),l===44&&($(e,o,t),t=Object.create(null),o=void 0),a=void 0,u=c=-1}else throw new SyntaxError(`Unexpected character at index ${f}`);if(u===-1||s||l===32||l===9)throw new SyntaxError("Unexpected end of input");c===-1&&(c=f);let m=r.slice(u,c);return o===void 0?$(e,m,t):(a===void 0?$(t,m,!0):n?$(t,a,m.replace(/\\/g,"")):$(t,a,m),$(e,o,t)),e}function ta(r){return Object.keys(r).map(e=>{let t=r[e];return Array.isArray(t)||(t=[t]),t.map(n=>[e].concat(Object.keys(n).map(i=>{let s=n[i];return Array.isArray(s)||(s=[s]),s.map(o=>o===!0?i:`${i}=${o}`).join("; ")})).join("; ")).join(", ")}).join(", ")}ri.exports={format:ta,parse:ea}});var Wt=g((sl,pi)=>{"use strict";var ra=require("events"),na=require("https"),ia=require("http"),si=require("net"),sa=require("tls"),{randomBytes:oa,createHash:aa}=require("crypto"),{Duplex:nl,Readable:il}=require("stream"),{URL:$t}=require("url"),V=ve(),ua=Tt(),la=Mt(),{isBlob:ca}=ie(),{BINARY_TYPES:ni,EMPTY_BUFFER:Ge,GUID:fa,kForOnEventAttribute:It,kListener:ha,kStatusCode:da,kWebSocket:E,NOOP:oi}=I(),{EventTarget:{addEventListener:pa,removeEventListener:ma}}=ti(),{format:ga,parse:_a}=Lt(),{toBuffer:ba}=ge(),va=30*1e3,ai=Symbol("kAborted"),Bt=[8,13],W=["CONNECTING","OPEN","CLOSING","CLOSED"],ya=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,v=class r extends ra{constructor(e,t,n){super(),this._binaryType=ni[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Ge,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?(n=t,t=[]):t=[t]),ui(this,e,t,n)):(this._autoPong=n.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){ni.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,n){let i=new ua({allowSynchronousEvents:n.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation}),s=new la(e,this._extensions,n.generateMask);this._receiver=i,this._sender=s,this._socket=e,i[E]=this,s[E]=this,e[E]=this,i.on("conclude",Ea),i.on("drain",Oa),i.on("error",Sa),i.on("message",Ca),i.on("ping",ka),i.on("pong",Aa),s.onerror=Ta,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",fi),e.on("data",Ye),e.on("end",hi),e.on("error",di),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[V.extensionName]&&this._extensions[V.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){C(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,n=>{n||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),ci(this)}}pause(){this.readyState===r.CONNECTING||this.readyState===r.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,t,n){if(this.readyState===r.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(n=e,e=t=void 0):typeof t=="function"&&(n=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==r.OPEN){Ft(this,e,n);return}t===void 0&&(t=!this._isServer),this._sender.ping(e||Ge,t,n)}pong(e,t,n){if(this.readyState===r.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(n=e,e=t=void 0):typeof t=="function"&&(n=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==r.OPEN){Ft(this,e,n);return}t===void 0&&(t=!this._isServer),this._sender.pong(e||Ge,t,n)}resume(){this.readyState===r.CONNECTING||this.readyState===r.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,n){if(this.readyState===r.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"&&(n=t,t={}),typeof e=="number"&&(e=e.toString()),this.readyState!==r.OPEN){Ft(this,e,n);return}let i={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[V.extensionName]||(i.compress=!1),this._sender.send(e||Ge,i,n)}terminate(){if(this.readyState!==r.CLOSED){if(this.readyState===r.CONNECTING){C(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=r.CLOSING,this._socket.destroy())}}};Object.defineProperty(v,"CONNECTING",{enumerable:!0,value:W.indexOf("CONNECTING")});Object.defineProperty(v.prototype,"CONNECTING",{enumerable:!0,value:W.indexOf("CONNECTING")});Object.defineProperty(v,"OPEN",{enumerable:!0,value:W.indexOf("OPEN")});Object.defineProperty(v.prototype,"OPEN",{enumerable:!0,value:W.indexOf("OPEN")});Object.defineProperty(v,"CLOSING",{enumerable:!0,value:W.indexOf("CLOSING")});Object.defineProperty(v.prototype,"CLOSING",{enumerable:!0,value:W.indexOf("CLOSING")});Object.defineProperty(v,"CLOSED",{enumerable:!0,value:W.indexOf("CLOSED")});Object.defineProperty(v.prototype,"CLOSED",{enumerable:!0,value:W.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(r=>{Object.defineProperty(v.prototype,r,{enumerable:!0})});["open","error","close","message"].forEach(r=>{Object.defineProperty(v.prototype,`on${r}`,{enumerable:!0,get(){for(let e of this.listeners(r))if(e[It])return e[ha];return null},set(e){for(let t of this.listeners(r))if(t[It]){this.removeListener(r,t);break}typeof e=="function"&&this.addEventListener(r,e,{[It]:!0})}})});v.prototype.addEventListener=pa;v.prototype.removeEventListener=ma;pi.exports=v;function ui(r,e,t,n){let i={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:Bt[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...n,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=i.autoPong,!Bt.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${Bt.join(", ")})`);let s;if(e instanceof $t)s=e;else try{s=new $t(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}s.protocol==="http:"?s.protocol="ws:":s.protocol==="https:"&&(s.protocol="wss:"),r._url=s.href;let o=s.protocol==="wss:",a=s.protocol==="ws+unix:",u;if(s.protocol!=="ws:"&&!o&&!a?u=`The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`:a&&!s.pathname?u="The URL's pathname is empty":s.hash&&(u="The URL contains a fragment identifier"),u){let h=new SyntaxError(u);if(r._redirects===0)throw h;ze(r,h);return}let l=o?443:80,c=oa(16).toString("base64"),f=o?na.request:ia.request,m=new Set,b;if(i.createConnection=i.createConnection||(o?wa:xa),i.defaultPort=i.defaultPort||l,i.port=s.port||l,i.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,i.headers={...i.headers,"Sec-WebSocket-Version":i.protocolVersion,"Sec-WebSocket-Key":c,Connection:"Upgrade",Upgrade:"websocket"},i.path=s.pathname+s.search,i.timeout=i.handshakeTimeout,i.perMessageDeflate&&(b=new V(i.perMessageDeflate!==!0?i.perMessageDeflate:{},!1,i.maxPayload),i.headers["Sec-WebSocket-Extensions"]=ga({[V.extensionName]:b.offer()})),t.length){for(let h of t){if(typeof h!="string"||!ya.test(h)||m.has(h))throw new SyntaxError("An invalid or duplicated subprotocol was specified");m.add(h)}i.headers["Sec-WebSocket-Protocol"]=t.join(",")}if(i.origin&&(i.protocolVersion<13?i.headers["Sec-WebSocket-Origin"]=i.origin:i.headers.Origin=i.origin),(s.username||s.password)&&(i.auth=`${s.username}:${s.password}`),a){let h=i.path.split(":");i.socketPath=h[0],i.path=h[1]}let d;if(i.followRedirects){if(r._redirects===0){r._originalIpc=a,r._originalSecure=o,r._originalHostOrSocketPath=a?i.socketPath:s.host;let h=n&&n.headers;if(n={...n,headers:{}},h)for(let[_,y]of Object.entries(h))n.headers[_.toLowerCase()]=y}else if(r.listenerCount("redirect")===0){let h=a?r._originalIpc?i.socketPath===r._originalHostOrSocketPath:!1:r._originalIpc?!1:s.host===r._originalHostOrSocketPath;(!h||r._originalSecure&&!o)&&(delete i.headers.authorization,delete i.headers.cookie,h||delete i.headers.host,i.auth=void 0)}i.auth&&!n.headers.authorization&&(n.headers.authorization="Basic "+Buffer.from(i.auth).toString("base64")),d=r._req=f(i),r._redirects&&r.emit("redirect",r.url,d)}else d=r._req=f(i);i.timeout&&d.on("timeout",()=>{C(r,d,"Opening handshake has timed out")}),d.on("error",h=>{d===null||d[ai]||(d=r._req=null,ze(r,h))}),d.on("response",h=>{let _=h.headers.location,y=h.statusCode;if(_&&i.followRedirects&&y>=300&&y<400){if(++r._redirects>i.maxRedirects){C(r,d,"Maximum redirects exceeded");return}d.abort();let D;try{D=new $t(_,e)}catch{let P=new SyntaxError(`Invalid URL: ${_}`);ze(r,P);return}ui(r,D,t,n)}else r.emit("unexpected-response",d,h)||C(r,d,`Unexpected server response: ${h.statusCode}`)}),d.on("upgrade",(h,_,y)=>{if(r.emit("upgrade",h),r.readyState!==v.CONNECTING)return;d=r._req=null;let D=h.headers.upgrade;if(D===void 0||D.toLowerCase()!=="websocket"){C(r,_,"Invalid Upgrade header");return}let U=aa("sha1").update(c+fa).digest("base64");if(h.headers["sec-websocket-accept"]!==U){C(r,_,"Invalid Sec-WebSocket-Accept header");return}let P=h.headers["sec-websocket-protocol"],H;if(P!==void 0?m.size?m.has(P)||(H="Server sent an invalid subprotocol"):H="Server sent a subprotocol but none was requested":m.size&&(H="Server sent no subprotocol"),H){C(r,_,H);return}P&&(r._protocol=P);let Q=h.headers["sec-websocket-extensions"];if(Q!==void 0){if(!b){C(r,_,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let ce;try{ce=_a(Q)}catch{C(r,_,"Invalid Sec-WebSocket-Extensions header");return}let Ce=Object.keys(ce);if(Ce.length!==1||Ce[0]!==V.extensionName){C(r,_,"Server indicated an extension that was not requested");return}try{b.accept(ce[V.extensionName])}catch{C(r,_,"Invalid Sec-WebSocket-Extensions header");return}r._extensions[V.extensionName]=b}r.setSocket(_,y,{allowSynchronousEvents:i.allowSynchronousEvents,generateMask:i.generateMask,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation})}),i.finishRequest?i.finishRequest(d,r):d.end()}function ze(r,e){r._readyState=v.CLOSING,r._errorEmitted=!0,r.emit("error",e),r.emitClose()}function xa(r){return r.path=r.socketPath,si.connect(r)}function wa(r){return r.path=void 0,!r.servername&&r.servername!==""&&(r.servername=si.isIP(r.host)?"":r.host),sa.connect(r)}function C(r,e,t){r._readyState=v.CLOSING;let n=new Error(t);Error.captureStackTrace(n,C),e.setHeader?(e[ai]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(ze,r,n)):(e.destroy(n),e.once("error",r.emit.bind(r,"error")),e.once("close",r.emitClose.bind(r)))}function Ft(r,e,t){if(e){let n=ca(e)?e.size:ba(e).length;r._socket?r._sender._bufferedBytes+=n:r._bufferedAmount+=n}if(t){let n=new Error(`WebSocket is not open: readyState ${r.readyState} (${W[r.readyState]})`);process.nextTick(t,n)}}function Ea(r,e){let t=this[E];t._closeFrameReceived=!0,t._closeMessage=e,t._closeCode=r,t._socket[E]!==void 0&&(t._socket.removeListener("data",Ye),process.nextTick(li,t._socket),r===1005?t.close():t.close(r,e))}function Oa(){let r=this[E];r.isPaused||r._socket.resume()}function Sa(r){let e=this[E];e._socket[E]!==void 0&&(e._socket.removeListener("data",Ye),process.nextTick(li,e._socket),e.close(r[da])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",r))}function ii(){this[E].emitClose()}function Ca(r,e){this[E].emit("message",r,e)}function ka(r){let e=this[E];e._autoPong&&e.pong(r,!this._isServer,oi),e.emit("ping",r)}function Aa(r){this[E].emit("pong",r)}function li(r){r.resume()}function Ta(r){let e=this[E];e.readyState!==v.CLOSED&&(e.readyState===v.OPEN&&(e._readyState=v.CLOSING,ci(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",r)))}function ci(r){r._closeTimer=setTimeout(r._socket.destroy.bind(r._socket),va)}function fi(){let r=this[E];this.removeListener("close",fi),this.removeListener("data",Ye),this.removeListener("end",hi),r._readyState=v.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[E]=void 0,clearTimeout(r._closeTimer),r._receiver._writableState.finished||r._receiver._writableState.errorEmitted?r.emitClose():(r._receiver.on("error",ii),r._receiver.on("finish",ii))}function Ye(r){this[E]._receiver.write(r)||this.pause()}function hi(){let r=this[E];r._readyState=v.CLOSING,r._receiver.end(),this.end()}function di(){let r=this[E];this.removeListener("error",di),this.on("error",oi),r&&(r._readyState=v.CLOSING,this.destroy())}});var gi=g((ol,mi)=>{"use strict";var{tokenChars:Pa}=ie();function Na(r){let e=new Set,t=-1,n=-1,i=0;for(i;i<r.length;i++){let o=r.charCodeAt(i);if(n===-1&&Pa[o]===1)t===-1&&(t=i);else if(i!==0&&(o===32||o===9))n===-1&&t!==-1&&(n=i);else if(o===44){if(t===-1)throw new SyntaxError(`Unexpected character at index ${i}`);n===-1&&(n=i);let a=r.slice(t,n);if(e.has(a))throw new SyntaxError(`The "${a}" subprotocol is duplicated`);e.add(a),t=n=-1}else throw new SyntaxError(`Unexpected character at index ${i}`)}if(t===-1||n!==-1)throw new SyntaxError("Unexpected end of input");let s=r.slice(t,i);if(e.has(s))throw new SyntaxError(`The "${s}" subprotocol is duplicated`);return e.add(s),e}mi.exports={parse:Na}});var Ei=g((ul,wi)=>{"use strict";var Ma=require("events"),Ke=require("http"),{Duplex:al}=require("stream"),{createHash:Ra}=require("crypto"),_i=Lt(),J=ve(),La=gi(),$a=Wt(),{GUID:Ia,kWebSocket:Ba}=I(),Fa=/^[+/0-9A-Za-z]{22}==$/,bi=0,vi=1,xi=2,jt=class extends Ma{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:$a,...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=Ke.createServer((n,i)=>{let s=Ke.STATUS_CODES[426];i.writeHead(426,{"Content-Length":s.length,"Content-Type":"text/plain"}),i.end(s)}),this._server.listen(e.port,e.host,e.backlog,t)):e.server&&(this._server=e.server),this._server){let n=this.emit.bind(this,"connection");this._removeListeners=Wa(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(i,s,o)=>{this.handleUpgrade(i,s,o,n)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=bi}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===xi){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(Ee,this);return}if(e&&this.once("close",e),this._state!==vi)if(this._state=vi,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(Ee,this):process.nextTick(Ee,this);else{let t=this._server;this._removeListeners(),this._removeListeners=this._server=null,t.close(()=>{Ee(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,n,i){t.on("error",yi);let s=e.headers["sec-websocket-key"],o=e.headers.upgrade,a=+e.headers["sec-websocket-version"];if(e.method!=="GET"){Z(this,e,t,405,"Invalid HTTP method");return}if(o===void 0||o.toLowerCase()!=="websocket"){Z(this,e,t,400,"Invalid Upgrade header");return}if(s===void 0||!Fa.test(s)){Z(this,e,t,400,"Missing or invalid Sec-WebSocket-Key header");return}if(a!==8&&a!==13){Z(this,e,t,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(e)){Oe(t,400);return}let u=e.headers["sec-websocket-protocol"],l=new Set;if(u!==void 0)try{l=La.parse(u)}catch{Z(this,e,t,400,"Invalid Sec-WebSocket-Protocol header");return}let c=e.headers["sec-websocket-extensions"],f={};if(this.options.perMessageDeflate&&c!==void 0){let m=new J(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let b=_i.parse(c);b[J.extensionName]&&(m.accept(b[J.extensionName]),f[J.extensionName]=m)}catch{Z(this,e,t,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let m={origin:e.headers[`${a===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(m,(b,d,h,_)=>{if(!b)return Oe(t,d||401,h,_);this.completeUpgrade(f,s,l,e,t,n,i)});return}if(!this.options.verifyClient(m))return Oe(t,401)}this.completeUpgrade(f,s,l,e,t,n,i)}completeUpgrade(e,t,n,i,s,o,a){if(!s.readable||!s.writable)return s.destroy();if(s[Ba])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>bi)return Oe(s,503);let l=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${Ra("sha1").update(t+Ia).digest("base64")}`],c=new this.options.WebSocket(null,void 0,this.options);if(n.size){let f=this.options.handleProtocols?this.options.handleProtocols(n,i):n.values().next().value;f&&(l.push(`Sec-WebSocket-Protocol: ${f}`),c._protocol=f)}if(e[J.extensionName]){let f=e[J.extensionName].params,m=_i.format({[J.extensionName]:[f]});l.push(`Sec-WebSocket-Extensions: ${m}`),c._extensions=e}this.emit("headers",l,i),s.write(l.concat(`\r
9
9
  `).join(`\r
10
- `)),s.removeListener("error",pi),c.setSocket(s,a,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(c),c.on("close",()=>{this.clients.delete(c),this._shouldEmitClose&&!this.clients.size&&process.nextTick(xe,this)})),u(c,i)}};gi.exports=Ft;function Eo(r,e){for(let t of Object.keys(e))r.on(t,e[t]);return function(){for(let n of Object.keys(e))r.removeListener(n,e[n])}}function xe(r){r._state=mi,r.emit("close")}function pi(){this.destroy()}function we(r,e,t,n){t=t||ze.STATUS_CODES[e],n={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(t),...n},r.once("finish",r.destroy),r.end(`HTTP/1.1 ${e} ${ze.STATUS_CODES[e]}\r
10
+ `)),s.removeListener("error",yi),c.setSocket(s,o,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(c),c.on("close",()=>{this.clients.delete(c),this._shouldEmitClose&&!this.clients.size&&process.nextTick(Ee,this)})),a(c,i)}};wi.exports=jt;function Wa(r,e){for(let t of Object.keys(e))r.on(t,e[t]);return function(){for(let n of Object.keys(e))r.removeListener(n,e[n])}}function Ee(r){r._state=xi,r.emit("close")}function yi(){this.destroy()}function Oe(r,e,t,n){t=t||Ke.STATUS_CODES[e],n={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(t),...n},r.once("finish",r.destroy),r.end(`HTTP/1.1 ${e} ${Ke.STATUS_CODES[e]}\r
11
11
  `+Object.keys(n).map(i=>`${i}: ${n[i]}`).join(`\r
12
12
  `)+`\r
13
13
  \r
14
- `+t)}function X(r,e,t,n,i){if(r.listenerCount("wsClientError")){let s=new Error(i);Error.captureStackTrace(s,X),r.emit("wsClientError",s,t,e)}else we(t,n,i)}});var xi=g((Ku,yi)=>{"use strict";function Ao(r){return r>=55296&&r<=56319}function To(r){return r>=56320&&r<=57343}yi.exports=function(e,t,n){if(typeof t!="string")throw new Error("Input must be string");for(var i=t.length,s=0,a,u,o=0;o<i;o+=1){if(a=t.charCodeAt(o),u=t[o],Ao(a)&&To(t.charCodeAt(o+1))&&(o+=1,u+=t[o]),s+=e(u),s===n)return t.slice(0,o+1);if(s>n)return t.slice(0,o-u.length+1)}return t}});var Oi=g((Xu,wi)=>{"use strict";var Po=xi(),Mo=Buffer.byteLength.bind(Buffer);wi.exports=Po.bind(null,Mo)});var Ci=g((Ju,Si)=>{"use strict";var No=Oi(),Ro=/[\/\?<>\\:\*\|"]/g,$o=/[\x00-\x1f\x80-\x9f]/g,Lo=/^\.+$/,Io=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,Fo=/[\. ]+$/;function Ei(r,e){if(typeof r!="string")throw new Error("Input must be string");var t=r.replace(Ro,e).replace($o,e).replace(Lo,e).replace(Io,e).replace(Fo,e);return No(t,255)}Si.exports=function(r,e){var t=e&&e.replacement||"",n=Ei(r,t);return t===""?n:Ei(n,"")}});var Oe=g(jt=>{var Ye=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},Wt=class extends Ye{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};jt.CommanderError=Ye;jt.InvalidArgumentError=Wt});var Ke=g(qt=>{var{InvalidArgumentError:Bo}=Oe(),Dt=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,n)=>{if(!this.argChoices.includes(t))throw new Bo(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,n):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function Wo(r){let e=r.name()+(r.variadic===!0?"...":"");return r.required?"<"+e+">":"["+e+"]"}qt.Argument=Dt;qt.humanReadableArgName=Wo});var Ut=g(ki=>{var{humanReadableArgName:jo}=Ke(),Vt=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){let t=e.commands.filter(i=>!i._hidden),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((i,s)=>i.name().localeCompare(s.name())),t}compareOptions(e,t){let n=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return n(e).localeCompare(n(t))}visibleOptions(e){let t=e.options.filter(i=>!i.hidden),n=e._getHelpOption();if(n&&!n.hidden){let i=n.short&&e._findOption(n.short),s=n.long&&e._findOption(n.long);!i&&!s?t.push(n):n.long&&!s?t.push(e.createOption(n.long,n.description)):n.short&&!i&&t.push(e.createOption(n.short,n.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let n=e.parent;n;n=n.parent){let i=n.options.filter(s=>!s.hidden);t.push(...i)}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(n=>jo(n)).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((n,i)=>Math.max(n,t.subcommandTerm(i).length),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((n,i)=>Math.max(n,t.optionTerm(i).length),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((n,i)=>Math.max(n,t.optionTerm(i).length),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((n,i)=>Math.max(n,t.argumentTerm(i).length),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let n="";for(let i=e.parent;i;i=i.parent)n=i.name()+" "+n;return n+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];return e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).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?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatHelp(e,t){let n=t.padWidth(e,t),i=t.helpWidth||80,s=2,a=2;function u(d,h){if(h){let _=`${d.padEnd(n+a)}${h}`;return t.wrap(_,i-s,n+a)}return d}function o(d){return d.join(`
15
- `).replace(/^/gm," ".repeat(s))}let l=[`Usage: ${t.commandUsage(e)}`,""],c=t.commandDescription(e);c.length>0&&(l=l.concat([t.wrap(c,i,0),""]));let f=t.visibleArguments(e).map(d=>u(t.argumentTerm(d),t.argumentDescription(d)));f.length>0&&(l=l.concat(["Arguments:",o(f),""]));let m=t.visibleOptions(e).map(d=>u(t.optionTerm(d),t.optionDescription(d)));if(m.length>0&&(l=l.concat(["Options:",o(m),""])),this.showGlobalOptions){let d=t.visibleGlobalOptions(e).map(h=>u(t.optionTerm(h),t.optionDescription(h)));d.length>0&&(l=l.concat(["Global Options:",o(d),""]))}let b=t.visibleCommands(e).map(d=>u(t.subcommandTerm(d),t.subcommandDescription(d)));return b.length>0&&(l=l.concat(["Commands:",o(b),""])),l.join(`
16
- `)}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,n,i=40){let s=" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF",a=new RegExp(`[\\n][${s}]+`);if(e.match(a))return e;let u=t-n;if(u<i)return e;let o=e.slice(0,n),l=e.slice(n).replace(`\r
14
+ `+t)}function Z(r,e,t,n,i){if(r.listenerCount("wsClientError")){let s=new Error(i);Error.captureStackTrace(s,Z),r.emit("wsClientError",s,t,e)}else Oe(t,n,i)}});var ki=g((cl,Ci)=>{"use strict";function Va(r){return r>=55296&&r<=56319}function Ua(r){return r>=56320&&r<=57343}Ci.exports=function(e,t,n){if(typeof t!="string")throw new Error("Input must be string");for(var i=t.length,s=0,o,a,u=0;u<i;u+=1){if(o=t.charCodeAt(u),a=t[u],Va(o)&&Ua(t.charCodeAt(u+1))&&(u+=1,a+=t[u]),s+=e(a),s===n)return t.slice(0,u+1);if(s>n)return t.slice(0,u-a.length+1)}return t}});var Ti=g((fl,Ai)=>{"use strict";var Ha=ki(),Ga=Buffer.byteLength.bind(Buffer);Ai.exports=Ha.bind(null,Ga)});var Mi=g((hl,Ni)=>{"use strict";var za=Ti(),Ya=/[\/\?<>\\:\*\|"]/g,Ka=/[\x00-\x1f\x80-\x9f]/g,Xa=/^\.+$/,Ja=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,Za=/[\. ]+$/;function Pi(r,e){if(typeof r!="string")throw new Error("Input must be string");var t=r.replace(Ya,e).replace(Ka,e).replace(Xa,e).replace(Ja,e).replace(Za,e);return za(t,255)}Ni.exports=function(r,e){var t=e&&e.replacement||"",n=Pi(r,t);return t===""?n:Pi(n,"")}});var Se=g(Vt=>{var Xe=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},qt=class extends Xe{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};Vt.CommanderError=Xe;Vt.InvalidArgumentError=qt});var Je=g(Ht=>{var{InvalidArgumentError:Qa}=Se(),Ut=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,n)=>{if(!this.argChoices.includes(t))throw new Qa(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,n):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function eu(r){let e=r.name()+(r.variadic===!0?"...":"");return r.required?"<"+e+">":"["+e+"]"}Ht.Argument=Ut;Ht.humanReadableArgName=eu});var zt=g(Ri=>{var{humanReadableArgName:tu}=Je(),Gt=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){let t=e.commands.filter(i=>!i._hidden),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((i,s)=>i.name().localeCompare(s.name())),t}compareOptions(e,t){let n=i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,"");return n(e).localeCompare(n(t))}visibleOptions(e){let t=e.options.filter(i=>!i.hidden),n=e._getHelpOption();if(n&&!n.hidden){let i=n.short&&e._findOption(n.short),s=n.long&&e._findOption(n.long);!i&&!s?t.push(n):n.long&&!s?t.push(e.createOption(n.long,n.description)):n.short&&!i&&t.push(e.createOption(n.short,n.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let n=e.parent;n;n=n.parent){let i=n.options.filter(s=>!s.hidden);t.push(...i)}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(n=>tu(n)).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((n,i)=>Math.max(n,t.subcommandTerm(i).length),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((n,i)=>Math.max(n,t.optionTerm(i).length),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((n,i)=>Math.max(n,t.optionTerm(i).length),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((n,i)=>Math.max(n,t.argumentTerm(i).length),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let n="";for(let i=e.parent;i;i=i.parent)n=i.name()+" "+n;return n+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];return e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).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?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatHelp(e,t){let n=t.padWidth(e,t),i=t.helpWidth||80,s=2,o=2;function a(d,h){if(h){let _=`${d.padEnd(n+o)}${h}`;return t.wrap(_,i-s,n+o)}return d}function u(d){return d.join(`
15
+ `).replace(/^/gm," ".repeat(s))}let l=[`Usage: ${t.commandUsage(e)}`,""],c=t.commandDescription(e);c.length>0&&(l=l.concat([t.wrap(c,i,0),""]));let f=t.visibleArguments(e).map(d=>a(t.argumentTerm(d),t.argumentDescription(d)));f.length>0&&(l=l.concat(["Arguments:",u(f),""]));let m=t.visibleOptions(e).map(d=>a(t.optionTerm(d),t.optionDescription(d)));if(m.length>0&&(l=l.concat(["Options:",u(m),""])),this.showGlobalOptions){let d=t.visibleGlobalOptions(e).map(h=>a(t.optionTerm(h),t.optionDescription(h)));d.length>0&&(l=l.concat(["Global Options:",u(d),""]))}let b=t.visibleCommands(e).map(d=>a(t.subcommandTerm(d),t.subcommandDescription(d)));return b.length>0&&(l=l.concat(["Commands:",u(b),""])),l.join(`
16
+ `)}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,n,i=40){let s=" \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF",o=new RegExp(`[\\n][${s}]+`);if(e.match(o))return e;let a=t-n;if(a<i)return e;let u=e.slice(0,n),l=e.slice(n).replace(`\r
17
17
  `,`
18
18
  `),c=" ".repeat(n),m="\\s\u200B",b=new RegExp(`
19
- |.{1,${u-1}}([${m}]|$)|[^${m}]+?([${m}]|$)`,"g"),d=l.match(b)||[];return o+d.map((h,_)=>h===`
19
+ |.{1,${a-1}}([${m}]|$)|[^${m}]+?([${m}]|$)`,"g"),d=l.match(b)||[];return u+d.map((h,_)=>h===`
20
20
  `?"":(_>0?c:"")+h.trimEnd()).join(`
21
- `)}};ki.Help=Vt});var Yt=g(zt=>{var{InvalidArgumentError:Do}=Oe(),Ht=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=Vo(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e=="string"&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new Do(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,n):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return qo(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Gt=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)}),this.negativeOptions.forEach((t,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(e,t){let n=t.attributeName();if(!this.dualOptions.has(n))return!0;let i=this.negativeOptions.get(n).presetArg,s=i!==void 0?i:!1;return t.negate===(s===e)}};function qo(r){return r.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function Vo(r){let e,t,n=r.split(/[ |,]+/);return n.length>1&&!/^[[<]/.test(n[1])&&(e=n.shift()),t=n.shift(),!e&&/^-[^-]$/.test(t)&&(e=t,t=void 0),{shortFlag:e,longFlag:t}}zt.Option=Ht;zt.DualOptions=Gt});var Ti=g(Ai=>{function Uo(r,e){if(Math.abs(r.length-e.length)>3)return Math.max(r.length,e.length);let t=[];for(let n=0;n<=r.length;n++)t[n]=[n];for(let n=0;n<=e.length;n++)t[0][n]=n;for(let n=1;n<=e.length;n++)for(let i=1;i<=r.length;i++){let s=1;r[i-1]===e[n-1]?s=0:s=1,t[i][n]=Math.min(t[i-1][n]+1,t[i][n-1]+1,t[i-1][n-1]+s),i>1&&n>1&&r[i-1]===e[n-2]&&r[i-2]===e[n-1]&&(t[i][n]=Math.min(t[i][n],t[i-2][n-2]+1))}return t[r.length][e.length]}function Ho(r,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=r.startsWith("--");t&&(r=r.slice(2),e=e.map(a=>a.slice(2)));let n=[],i=3,s=.4;return e.forEach(a=>{if(a.length<=1)return;let u=Uo(r,a),o=Math.max(r.length,a.length);(o-u)/o>s&&(u<i?(i=u,n=[a]):u===i&&n.push(a))}),n.sort((a,u)=>a.localeCompare(u)),t&&(n=n.map(a=>`--${a}`)),n.length>1?`
21
+ `)}};Ri.Help=Gt});var Jt=g(Xt=>{var{InvalidArgumentError:ru}=Se(),Yt=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=iu(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e=="string"&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,n)=>{if(!this.argChoices.includes(t))throw new ru(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(t,n):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return nu(this.name().replace(/^no-/,""))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},Kt=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(t=>{t.negate?this.negativeOptions.set(t.attributeName(),t):this.positiveOptions.set(t.attributeName(),t)}),this.negativeOptions.forEach((t,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(e,t){let n=t.attributeName();if(!this.dualOptions.has(n))return!0;let i=this.negativeOptions.get(n).presetArg,s=i!==void 0?i:!1;return t.negate===(s===e)}};function nu(r){return r.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function iu(r){let e,t,n=r.split(/[ |,]+/);return n.length>1&&!/^[[<]/.test(n[1])&&(e=n.shift()),t=n.shift(),!e&&/^-[^-]$/.test(t)&&(e=t,t=void 0),{shortFlag:e,longFlag:t}}Xt.Option=Yt;Xt.DualOptions=Kt});var $i=g(Li=>{function su(r,e){if(Math.abs(r.length-e.length)>3)return Math.max(r.length,e.length);let t=[];for(let n=0;n<=r.length;n++)t[n]=[n];for(let n=0;n<=e.length;n++)t[0][n]=n;for(let n=1;n<=e.length;n++)for(let i=1;i<=r.length;i++){let s=1;r[i-1]===e[n-1]?s=0:s=1,t[i][n]=Math.min(t[i-1][n]+1,t[i][n-1]+1,t[i-1][n-1]+s),i>1&&n>1&&r[i-1]===e[n-2]&&r[i-2]===e[n-1]&&(t[i][n]=Math.min(t[i][n],t[i-2][n-2]+1))}return t[r.length][e.length]}function ou(r,e){if(!e||e.length===0)return"";e=Array.from(new Set(e));let t=r.startsWith("--");t&&(r=r.slice(2),e=e.map(o=>o.slice(2)));let n=[],i=3,s=.4;return e.forEach(o=>{if(o.length<=1)return;let a=su(r,o),u=Math.max(r.length,o.length);(u-a)/u>s&&(a<i?(i=a,n=[o]):a===i&&n.push(o))}),n.sort((o,a)=>o.localeCompare(a)),t&&(n=n.map(o=>`--${o}`)),n.length>1?`
22
22
  (Did you mean one of ${n.join(", ")}?)`:n.length===1?`
23
- (Did you mean ${n[0]}?)`:""}Ai.suggestSimilar=Ho});var $i=g(Ri=>{var Go=require("node:events").EventEmitter,Kt=require("node:child_process"),B=require("node:path"),Xt=require("node:fs"),y=require("node:process"),{Argument:zo,humanReadableArgName:Yo}=Ke(),{CommanderError:Jt}=Oe(),{Help:Ko}=Ut(),{Option:Pi,DualOptions:Xo}=Yt(),{suggestSimilar:Mi}=Ti(),Zt=class r extends Go{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._outputConfiguration={writeOut:t=>y.stdout.write(t),writeErr:t=>y.stderr.write(t),getOutHelpWidth:()=>y.stdout.isTTY?y.stdout.columns:void 0,getErrHelpWidth:()=>y.stderr.isTTY?y.stderr.columns:void 0,outputError:(t,n)=>n(t)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,n){let i=t,s=n;typeof i=="object"&&i!==null&&(s=i,i=null),s=s||{};let[,a,u]=e.match(/([^ ]+) *(.*)/),o=this.createCommand(a);return i&&(o.description(i),o._executableHandler=!0),s.isDefault&&(this._defaultCommandName=o._name),o._hidden=!!(s.noHelp||s.hidden),o._executableFile=s.executableFile||null,u&&o.arguments(u),this._registerCommand(o),o.parent=this,o.copyInheritedSettings(this),i?this:o}createCommand(e){return new r(e)}createHelp(){return Object.assign(new Ko,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
24
- - specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new zo(e,t)}argument(e,t,n,i){let s=this.createArgument(e,t);return typeof n=="function"?s.default(i).argParser(n):s.default(n),this.addArgument(s),this}arguments(e){return e.trim().split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t&&t.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,this;e=e??"help [command]";let[,n,i]=e.match(/([^ ]+) *(.*)/),s=t??"display help for command",a=this.createCommand(n);return a.helpOption(!1),i&&a.arguments(i),s&&a.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=a,this}addHelpCommand(e,t){return typeof e!="object"?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){let n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
25
- Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new Jt(e,t,n)),y.exit(e)}action(e){let t=n=>{let i=this.registeredArguments.length,s=n.slice(0,i);return this._storeOptionsAsProperties?s[i]=this:s[i]=this.opts(),s.push(this),e.apply(this,s)};return this._actionHandler=t,this}createOption(e,t){return new Pi(e,t)}_callParseArg(e,t,n,i){try{return e.parseArg(t,n)}catch(s){if(s.code==="commander.invalidArgument"){let a=`${i} ${s.message}`;this.error(a,{exitCode:s.exitCode,code:s.code})}throw s}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let n=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
26
- - already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){let t=i=>[i.name()].concat(i.aliases()),n=t(e).find(i=>this._findCommand(i));if(n){let i=t(this._findCommand(n)).join("|"),s=t(e).join("|");throw new Error(`cannot add command '${s}' as already have command '${i}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),n=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(n,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,"default");let i=(s,a,u)=>{s==null&&e.presetArg!==void 0&&(s=e.presetArg);let o=this.getOptionValue(n);s!==null&&e.parseArg?s=this._callParseArg(e,s,o,a):s!==null&&e.variadic&&(s=e._concatValue(s,o)),s==null&&(e.negate?s=!1:e.isBoolean()||e.optional?s=!0:s=""),this.setOptionValueWithSource(n,s,u)};return this.on("option:"+t,s=>{let a=`error: option '${e.flags}' argument '${s}' is invalid.`;i(s,a,"cli")}),e.envVar&&this.on("optionEnv:"+t,s=>{let a=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;i(s,a,"env")}),this}_optionEx(e,t,n,i,s){if(typeof t=="object"&&t instanceof Pi)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let a=this.createOption(t,n);if(a.makeOptionMandatory(!!e.mandatory),typeof i=="function")a.default(s).argParser(i);else if(i instanceof RegExp){let u=i;i=(o,l)=>{let c=u.exec(o);return c?c[0]:l},a.default(s).argParser(i)}else a.default(i);return this.addOption(a)}option(e,t,n,i){return this._optionEx({},e,t,n,i)}requiredOption(e,t,n,i){return this._optionEx({mandatory:!0},e,t,n,i)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,n){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(t=n.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){var i;if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},e===void 0&&t.from===void 0){(i=y.versions)!=null&&i.electron&&(t.from="electron");let s=y.execArgv??[];(s.includes("-e")||s.includes("--eval")||s.includes("-p")||s.includes("--print"))&&(t.from="eval")}e===void 0&&(e=y.argv),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":y.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;case"eval":n=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,t){let n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){let n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_executeSubCommand(e,t){t=t.slice();let n=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function s(c,f){let m=B.resolve(c,f);if(Xt.existsSync(m))return m;if(i.includes(B.extname(f)))return;let b=i.find(d=>Xt.existsSync(`${m}${d}`));if(b)return`${m}${b}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let a=e._executableFile||`${this._name}-${e._name}`,u=this._executableDir||"";if(this._scriptPath){let c;try{c=Xt.realpathSync(this._scriptPath)}catch{c=this._scriptPath}u=B.resolve(B.dirname(c),u)}if(u){let c=s(u,a);if(!c&&!e._executableFile&&this._scriptPath){let f=B.basename(this._scriptPath,B.extname(this._scriptPath));f!==this._name&&(c=s(u,`${f}-${e._name}`))}a=c||a}n=i.includes(B.extname(a));let o;y.platform!=="win32"?n?(t.unshift(a),t=Ni(y.execArgv).concat(t),o=Kt.spawn(y.argv[0],t,{stdio:"inherit"})):o=Kt.spawn(a,t,{stdio:"inherit"}):(t.unshift(a),t=Ni(y.execArgv).concat(t),o=Kt.spawn(y.execPath,t,{stdio:"inherit"})),o.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(f=>{y.on(f,()=>{o.killed===!1&&o.exitCode===null&&o.kill(f)})});let l=this._exitCallback;o.on("close",c=>{c=c??1,l?l(new Jt(c,"commander.executeSubCommandAsync","(close)")):y.exit(c)}),o.on("error",c=>{if(c.code==="ENOENT"){let f=u?`searched for local subcommand relative to directory '${u}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",m=`'${a}' does not exist
23
+ (Did you mean ${n[0]}?)`:""}Li.suggestSimilar=ou});var ji=g(Wi=>{var au=require("node:events").EventEmitter,Zt=require("node:child_process"),j=require("node:path"),Qt=require("node:fs"),x=require("node:process"),{Argument:uu,humanReadableArgName:lu}=Je(),{CommanderError:er}=Se(),{Help:cu}=zt(),{Option:Ii,DualOptions:fu}=Jt(),{suggestSimilar:Bi}=$i(),tr=class r extends au{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._outputConfiguration={writeOut:t=>x.stdout.write(t),writeErr:t=>x.stderr.write(t),getOutHelpWidth:()=>x.stdout.isTTY?x.stdout.columns:void 0,getErrHelpWidth:()=>x.stderr.isTTY?x.stderr.columns:void 0,outputError:(t,n)=>n(t)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,n){let i=t,s=n;typeof i=="object"&&i!==null&&(s=i,i=null),s=s||{};let[,o,a]=e.match(/([^ ]+) *(.*)/),u=this.createCommand(o);return i&&(u.description(i),u._executableHandler=!0),s.isDefault&&(this._defaultCommandName=u._name),u._hidden=!!(s.noHelp||s.hidden),u._executableFile=s.executableFile||null,a&&u.arguments(a),this._registerCommand(u),u.parent=this,u.copyInheritedSettings(this),i?this:u}createCommand(e){return new r(e)}createHelp(){return Object.assign(new cu,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!="string"&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error(`Command passed to .addCommand() must have a name
24
+ - specify the name in Command constructor or using .name()`);return t=t||{},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new uu(e,t)}argument(e,t,n,i){let s=this.createArgument(e,t);return typeof n=="function"?s.default(i).argParser(n):s.default(n),this.addArgument(s),this}arguments(e){return e.trim().split(/ +/).forEach(t=>{this.argument(t)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t&&t.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e=="boolean")return this._addImplicitHelpCommand=e,this;e=e??"help [command]";let[,n,i]=e.match(/([^ ]+) *(.*)/),s=t??"display help for command",o=this.createCommand(n);return o.helpOption(!1),i&&o.arguments(i),s&&o.description(s),this._addImplicitHelpCommand=!0,this._helpCommand=o,this}addHelpCommand(e,t){return typeof e!="object"?(this.helpCommand(e,t),this):(this._addImplicitHelpCommand=!0,this._helpCommand=e,this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){let n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
25
+ Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return e?this._exitCallback=e:this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync")throw t},this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new er(e,t,n)),x.exit(e)}action(e){let t=n=>{let i=this.registeredArguments.length,s=n.slice(0,i);return this._storeOptionsAsProperties?s[i]=this:s[i]=this.opts(),s.push(this),e.apply(this,s)};return this._actionHandler=t,this}createOption(e,t){return new Ii(e,t)}_callParseArg(e,t,n,i){try{return e.parseArg(t,n)}catch(s){if(s.code==="commander.invalidArgument"){let o=`${i} ${s.message}`;this.error(o,{exitCode:s.exitCode,code:s.code})}throw s}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let n=e.long&&this._findOption(e.long)?e.long:e.short;throw new Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
26
+ - already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){let t=i=>[i.name()].concat(i.aliases()),n=t(e).find(i=>this._findCommand(i));if(n){let i=t(this._findCommand(n)).join("|"),s=t(e).join("|");throw new Error(`cannot add command '${s}' as already have command '${i}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),n=e.attributeName();if(e.negate){let s=e.long.replace(/^--no-/,"--");this._findOption(s)||this.setOptionValueWithSource(n,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,"default");let i=(s,o,a)=>{s==null&&e.presetArg!==void 0&&(s=e.presetArg);let u=this.getOptionValue(n);s!==null&&e.parseArg?s=this._callParseArg(e,s,u,o):s!==null&&e.variadic&&(s=e._concatValue(s,u)),s==null&&(e.negate?s=!1:e.isBoolean()||e.optional?s=!0:s=""),this.setOptionValueWithSource(n,s,a)};return this.on("option:"+t,s=>{let o=`error: option '${e.flags}' argument '${s}' is invalid.`;i(s,o,"cli")}),e.envVar&&this.on("optionEnv:"+t,s=>{let o=`error: option '${e.flags}' value '${s}' from env '${e.envVar}' is invalid.`;i(s,o,"env")}),this}_optionEx(e,t,n,i,s){if(typeof t=="object"&&t instanceof Ii)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(t,n);if(o.makeOptionMandatory(!!e.mandatory),typeof i=="function")o.default(s).argParser(i);else if(i instanceof RegExp){let a=i;i=(u,l)=>{let c=a.exec(u);return c?c[0]:l},o.default(s).argParser(i)}else o.default(i);return this.addOption(o)}option(e,t,n,i){return this._optionEx({},e,t,n,i)}requiredOption(e,t,n,i){return this._optionEx({mandatory:!0},e,t,n,i)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw new Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,n){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(t=n.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){var i;if(e!==void 0&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");if(t=t||{},e===void 0&&t.from===void 0){(i=x.versions)!=null&&i.electron&&(t.from="electron");let s=x.execArgv??[];(s.includes("-e")||s.includes("--eval")||s.includes("-p")||s.includes("--print"))&&(t.from="eval")}e===void 0&&(e=x.argv),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":x.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;case"eval":n=e.slice(1);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,t){let n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){let n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_executeSubCommand(e,t){t=t.slice();let n=!1,i=[".js",".ts",".tsx",".mjs",".cjs"];function s(c,f){let m=j.resolve(c,f);if(Qt.existsSync(m))return m;if(i.includes(j.extname(f)))return;let b=i.find(d=>Qt.existsSync(`${m}${d}`));if(b)return`${m}${b}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let c;try{c=Qt.realpathSync(this._scriptPath)}catch{c=this._scriptPath}a=j.resolve(j.dirname(c),a)}if(a){let c=s(a,o);if(!c&&!e._executableFile&&this._scriptPath){let f=j.basename(this._scriptPath,j.extname(this._scriptPath));f!==this._name&&(c=s(a,`${f}-${e._name}`))}o=c||o}n=i.includes(j.extname(o));let u;x.platform!=="win32"?n?(t.unshift(o),t=Fi(x.execArgv).concat(t),u=Zt.spawn(x.argv[0],t,{stdio:"inherit"})):u=Zt.spawn(o,t,{stdio:"inherit"}):(t.unshift(o),t=Fi(x.execArgv).concat(t),u=Zt.spawn(x.execPath,t,{stdio:"inherit"})),u.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(f=>{x.on(f,()=>{u.killed===!1&&u.exitCode===null&&u.kill(f)})});let l=this._exitCallback;u.on("close",c=>{c=c??1,l?l(new er(c,"commander.executeSubCommandAsync","(close)")):x.exit(c)}),u.on("error",c=>{if(c.code==="ENOENT"){let f=a?`searched for local subcommand relative to directory '${a}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",m=`'${o}' does not exist
27
27
  - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
28
28
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
29
- - ${f}`;throw new Error(m)}else if(c.code==="EACCES")throw new Error(`'${a}' not executable`);if(!l)y.exit(1);else{let f=new Jt(1,"commander.executeSubCommandAsync","(error)");f.nestedError=c,l(f)}}),this.runningCommand=o}_dispatchSubcommand(e,t,n){let i=this._findCommand(e);i||this.help({error:!0});let s;return s=this._chainOrCallSubCommandHook(s,i,"preSubcommand"),s=this._chainOrCall(s,()=>{if(i._executableHandler)this._executeSubCommand(i,t.concat(n));else return i._parseCommand(t,n)}),s}_dispatchHelpCommand(e){var n,i;e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[((n=this._getHelpOption())==null?void 0:n.long)??((i=this._getHelpOption())==null?void 0:i.short)??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(n,i,s)=>{let a=i;if(i!==null&&n.parseArg){let u=`error: command-argument value '${i}' is invalid for argument '${n.name()}'.`;a=this._callParseArg(n,i,s,u)}return a};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((n,i)=>{let s=n.defaultValue;n.variadic?i<this.args.length?(s=this.args.slice(i),n.parseArg&&(s=s.reduce((a,u)=>e(n,u,a),n.defaultValue))):s===void 0&&(s=[]):i<this.args.length&&(s=this.args[i],n.parseArg&&(s=e(n,s,n.defaultValue))),t[i]=s}),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let n=e,i=[];return this._getCommandAndAncestors().reverse().filter(s=>s._lifeCycleHooks[t]!==void 0).forEach(s=>{s._lifeCycleHooks[t].forEach(a=>{i.push({hookedCommand:s,callback:a})})}),t==="postAction"&&i.reverse(),i.forEach(s=>{n=this._chainOrCall(n,()=>s.callback(s.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,t,n){let i=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(s=>{i=this._chainOrCall(i,()=>s(this,t))}),i}_parseCommand(e,t){let n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){i(),this._processArguments();let a;return a=this._chainOrCallHooks(a,"preAction"),a=this._chainOrCall(a,()=>this._actionHandler(this.processedArgs)),this.parent&&(a=this._chainOrCall(a,()=>{this.parent.emit(s,e,t)})),a=this._chainOrCallHooks(a,"postAction"),a}if(this.parent&&this.parent.listenerCount(s))i(),this._processArguments(),this.parent.emit(s,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(n=>{let i=n.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});e.filter(n=>n.conflictsWith.length>0).forEach(n=>{let i=e.find(s=>n.conflictsWith.includes(s.attributeName()));i&&this._conflictingOption(n,i)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],n=[],i=t,s=e.slice();function a(o){return o.length>1&&o[0]==="-"}let u=null;for(;s.length;){let o=s.shift();if(o==="--"){i===n&&i.push(o),i.push(...s);break}if(u&&!a(o)){this.emit(`option:${u.name()}`,o);continue}if(u=null,a(o)){let l=this._findOption(o);if(l){if(l.required){let c=s.shift();c===void 0&&this.optionMissingArgument(l),this.emit(`option:${l.name()}`,c)}else if(l.optional){let c=null;s.length>0&&!a(s[0])&&(c=s.shift()),this.emit(`option:${l.name()}`,c)}else this.emit(`option:${l.name()}`);u=l.variadic?l:null;continue}}if(o.length>2&&o[0]==="-"&&o[1]!=="-"){let l=this._findOption(`-${o[1]}`);if(l){l.required||l.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${l.name()}`,o.slice(2)):(this.emit(`option:${l.name()}`),s.unshift(`-${o.slice(2)}`));continue}}if(/^--[^=]+=/.test(o)){let l=o.indexOf("="),c=this._findOption(o.slice(0,l));if(c&&(c.required||c.optional)){this.emit(`option:${c.name()}`,o.slice(l+1));continue}}if(a(o)&&(i=n),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&n.length===0){if(this._findCommand(o)){t.push(o),s.length>0&&n.push(...s);break}else if(this._getHelpCommand()&&o===this._getHelpCommand().name()){t.push(o),s.length>0&&t.push(...s);break}else if(this._defaultCommandName){n.push(o),s.length>0&&n.push(...s);break}}if(this._passThroughOptions){i.push(o),s.length>0&&i.push(...s);break}i.push(o)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let i=this.options[n].attributeName();e[i]=i===this._versionOptionName?this._version:this[i]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}
29
+ - ${f}`;throw new Error(m)}else if(c.code==="EACCES")throw new Error(`'${o}' not executable`);if(!l)x.exit(1);else{let f=new er(1,"commander.executeSubCommandAsync","(error)");f.nestedError=c,l(f)}}),this.runningCommand=u}_dispatchSubcommand(e,t,n){let i=this._findCommand(e);i||this.help({error:!0});let s;return s=this._chainOrCallSubCommandHook(s,i,"preSubcommand"),s=this._chainOrCall(s,()=>{if(i._executableHandler)this._executeSubCommand(i,t.concat(n));else return i._parseCommand(t,n)}),s}_dispatchHelpCommand(e){var n,i;e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[((n=this._getHelpOption())==null?void 0:n.long)??((i=this._getHelpOption())==null?void 0:i.short)??"--help"])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(n,i,s)=>{let o=i;if(i!==null&&n.parseArg){let a=`error: command-argument value '${i}' is invalid for argument '${n.name()}'.`;o=this._callParseArg(n,i,s,a)}return o};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((n,i)=>{let s=n.defaultValue;n.variadic?i<this.args.length?(s=this.args.slice(i),n.parseArg&&(s=s.reduce((o,a)=>e(n,a,o),n.defaultValue))):s===void 0&&(s=[]):i<this.args.length&&(s=this.args[i],n.parseArg&&(s=e(n,s,n.defaultValue))),t[i]=s}),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let n=e,i=[];return this._getCommandAndAncestors().reverse().filter(s=>s._lifeCycleHooks[t]!==void 0).forEach(s=>{s._lifeCycleHooks[t].forEach(o=>{i.push({hookedCommand:s,callback:o})})}),t==="postAction"&&i.reverse(),i.forEach(s=>{n=this._chainOrCall(n,()=>s.callback(s.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,t,n){let i=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(s=>{i=this._chainOrCall(i,()=>s(this,t))}),i}_parseCommand(e,t){let n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},s=`command:${this.name()}`;if(this._actionHandler){i(),this._processArguments();let o;return o=this._chainOrCallHooks(o,"preAction"),o=this._chainOrCall(o,()=>this._actionHandler(this.processedArgs)),this.parent&&(o=this._chainOrCall(o,()=>{this.parent.emit(s,e,t)})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent&&this.parent.listenerCount(s))i(),this._processArguments(),this.parent.emit(s,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(n=>{let i=n.attributeName();return this.getOptionValue(i)===void 0?!1:this.getOptionValueSource(i)!=="default"});e.filter(n=>n.conflictsWith.length>0).forEach(n=>{let i=e.find(s=>n.conflictsWith.includes(s.attributeName()));i&&this._conflictingOption(n,i)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],n=[],i=t,s=e.slice();function o(u){return u.length>1&&u[0]==="-"}let a=null;for(;s.length;){let u=s.shift();if(u==="--"){i===n&&i.push(u),i.push(...s);break}if(a&&!o(u)){this.emit(`option:${a.name()}`,u);continue}if(a=null,o(u)){let l=this._findOption(u);if(l){if(l.required){let c=s.shift();c===void 0&&this.optionMissingArgument(l),this.emit(`option:${l.name()}`,c)}else if(l.optional){let c=null;s.length>0&&!o(s[0])&&(c=s.shift()),this.emit(`option:${l.name()}`,c)}else this.emit(`option:${l.name()}`);a=l.variadic?l:null;continue}}if(u.length>2&&u[0]==="-"&&u[1]!=="-"){let l=this._findOption(`-${u[1]}`);if(l){l.required||l.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${l.name()}`,u.slice(2)):(this.emit(`option:${l.name()}`),s.unshift(`-${u.slice(2)}`));continue}}if(/^--[^=]+=/.test(u)){let l=u.indexOf("="),c=this._findOption(u.slice(0,l));if(c&&(c.required||c.optional)){this.emit(`option:${c.name()}`,u.slice(l+1));continue}}if(o(u)&&(i=n),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&n.length===0){if(this._findCommand(u)){t.push(u),s.length>0&&n.push(...s);break}else if(this._getHelpCommand()&&u===this._getHelpCommand().name()){t.push(u),s.length>0&&t.push(...s);break}else if(this._defaultCommandName){n.push(u),s.length>0&&n.push(...s);break}}if(this._passThroughOptions){i.push(u),s.length>0&&i.push(...s);break}i.push(u)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let i=this.options[n].attributeName();e[i]=i===this._versionOptionName?this._version:this[i]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}
30
30
  `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
31
31
  `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
32
- `),this.outputHelp({error:!0}));let n=t||{},i=n.exitCode||1,s=n.code||"commander.error";this._exit(i,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in y.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()}`,y.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new Xo(this.options),t=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(i=>!t(i)).forEach(i=>{this.setOptionValueWithSource(i,n.implied[i],"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 n=a=>{let u=a.attributeName(),o=this.getOptionValue(u),l=this.options.find(f=>f.negate&&u===f.attributeName()),c=this.options.find(f=>!f.negate&&u===f.attributeName());return l&&(l.presetArg===void 0&&o===!1||l.presetArg!==void 0&&o===l.presetArg)?l:c||a},i=a=>{let u=n(a),o=u.attributeName();return this.getOptionValueSource(o)==="env"?`environment variable '${u.envVar}'`:`option '${u.flags}'`},s=`error: ${i(e)} cannot be used with ${i(t)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],s=this;do{let a=s.createHelp().visibleOptions(s).filter(u=>u.long).map(u=>u.long);i=i.concat(a),s=s.parent}while(s&&!s._enablePositionalOptions);t=Mi(e,i)}let n=`error: unknown option '${e}'${t}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,n=t===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${n} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(s=>{i.push(s.name()),s.alias()&&i.push(s.alias())}),t=Mi(e,i)}let n=`error: unknown command '${e}'${t}`;this.error(n,{code:"commander.unknownCommand"})}version(e,t,n){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";let i=this.createOption(t,n);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
33
- `),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 i;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 n=(i=this.parent)==null?void 0:i._findCommand(e);if(n){let s=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${s}'`)}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(n=>Yo(n));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)}nameFromFilename(e){return this._name=B.basename(e,B.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp();return t.helpWidth===void 0&&(t.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),t.formatHelp(this,t)}_getHelpContext(e){e=e||{};let t={error:!!e.error},n;return t.error?n=i=>this._outputConfiguration.writeErr(i):n=i=>this._outputConfiguration.writeOut(i),t.write=e.write||n,t.command=this,t}outputHelp(e){var s;let t;typeof e=="function"&&(t=e,e=void 0);let n=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach(a=>a.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let i=this.helpInformation(n);if(t&&(i=t(i),typeof i!="string"&&!Buffer.isBuffer(i)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(i),(s=this._getHelpOption())!=null&&s.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach(a=>a.emit("afterAllHelp",n))}helpOption(e,t){return typeof e=="boolean"?(e?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(e=e??"-h, --help",t=t??"display help for command",this._helpOption=this.createOption(e,t),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let t=y.exitCode||0;t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
34
- Expecting one of '${n.join("', '")}'`);let i=`${e}Help`;return this.on(i,s=>{let a;typeof t=="function"?a=t({error:s.error,command:s.command}):a=t,a&&s.write(`${a}
35
- `)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(i=>t.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Ni(r){return r.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",i="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?t=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=s[1],/^\d+$/.test(s[3])?i=s[3]:n=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],n=s[3],i=s[4]),t&&i!=="0"?`${t}=${n}:${parseInt(i)+1}`:e})}Ri.Command=Zt});var Bi=g(A=>{var{Argument:Li}=Ke(),{Command:Qt}=$i(),{CommanderError:Jo,InvalidArgumentError:Ii}=Oe(),{Help:Zo}=Ut(),{Option:Fi}=Yt();A.program=new Qt;A.createCommand=r=>new Qt(r);A.createOption=(r,e)=>new Fi(r,e);A.createArgument=(r,e)=>new Li(r,e);A.Command=Qt;A.Option=Fi;A.Argument=Li;A.Help=Zo;A.CommanderError=Jo;A.InvalidArgumentError=Ii;A.InvalidOptionArgumentError=Ii});var tr=g((gl,qi)=>{"use strict";var Di=require("fs"),er;function Qo(){try{return Di.statSync("/.dockerenv"),!0}catch{return!1}}function eu(){try{return Di.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}qi.exports=()=>(er===void 0&&(er=Qo()||eu()),er)});var Hi=g((_l,rr)=>{"use strict";var tu=require("os"),ru=require("fs"),Vi=tr(),Ui=()=>{if(process.platform!=="linux")return!1;if(tu.release().toLowerCase().includes("microsoft"))return!Vi();try{return ru.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!Vi():!1}catch{return!1}};process.env.__IS_WSL_TEST__?rr.exports=Ui:rr.exports=Ui()});var zi=g((bl,Gi)=>{"use strict";Gi.exports=(r,e,t)=>{let n=i=>Object.defineProperty(r,e,{value:i,enumerable:!0,writable:!0});return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get(){let i=t();return n(i),i},set(i){n(i)}}),r}});var es=g((vl,Qi)=>{var nu=require("path"),iu=require("child_process"),{promises:Je,constants:Zi}=require("fs"),Xe=Hi(),su=tr(),ir=zi(),Yi=nu.join(__dirname,"xdg-open"),{platform:ae,arch:Ki}=process,au=()=>{try{return Je.statSync("/run/.containerenv"),!0}catch{return!1}},nr;function ou(){return nr===void 0&&(nr=au()||su()),nr}var uu=(()=>{let r="/mnt/",e;return async function(){if(e)return e;let t="/etc/wsl.conf",n=!1;try{await Je.access(t,Zi.F_OK),n=!0}catch{}if(!n)return r;let i=await Je.readFile(t,{encoding:"utf8"}),s=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(i);return s?(e=s.groups.mountPoint.trim(),e=e.endsWith("/")?e:`${e}/`,e):r}})(),Xi=async(r,e)=>{let t;for(let n of r)try{return await e(n)}catch(i){t=i}throw t},Ze=async r=>{if(r={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...r},Array.isArray(r.app))return Xi(r.app,u=>Ze({...r,app:u}));let{name:e,arguments:t=[]}=r.app||{};if(t=[...t],Array.isArray(e))return Xi(e,u=>Ze({...r,app:{name:u,arguments:t}}));let n,i=[],s={};if(ae==="darwin")n="open",r.wait&&i.push("--wait-apps"),r.background&&i.push("--background"),r.newInstance&&i.push("--new"),e&&i.push("-a",e);else if(ae==="win32"||Xe&&!ou()&&!e){let u=await uu();n=Xe?`${u}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,i.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),Xe||(s.windowsVerbatimArguments=!0);let o=["Start"];r.wait&&o.push("-Wait"),e?(o.push(`"\`"${e}\`""`,"-ArgumentList"),r.target&&t.unshift(r.target)):r.target&&o.push(`"${r.target}"`),t.length>0&&(t=t.map(l=>`"\`"${l}\`""`),o.push(t.join(","))),r.target=Buffer.from(o.join(" "),"utf16le").toString("base64")}else{if(e)n=e;else{let u=!__dirname||__dirname==="/",o=!1;try{await Je.access(Yi,Zi.X_OK),o=!0}catch{}n=process.versions.electron||ae==="android"||u||!o?"xdg-open":Yi}t.length>0&&i.push(...t),r.wait||(s.stdio="ignore",s.detached=!0)}r.target&&i.push(r.target),ae==="darwin"&&t.length>0&&i.push("--args",...t);let a=iu.spawn(n,i,s);return r.wait?new Promise((u,o)=>{a.once("error",o),a.once("close",l=>{if(!r.allowNonzeroExitCode&&l>0){o(new Error(`Exited with code ${l}`));return}u(a)})}):(a.unref(),a)},sr=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a `target`");return Ze({...e,target:r})},lu=(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 Ze({...e,app:{name:r,arguments:t}})};function Ji(r){if(typeof r=="string"||Array.isArray(r))return r;let{[Ki]:e}=r;if(!e)throw new Error(`${Ki} is not supported`);return e}function ar({[ae]:r},{wsl:e}){if(e&&Xe)return Ji(e);if(!r)throw new Error(`${ae} is not supported`);return Ji(r)}var Qe={};ir(Qe,"chrome",()=>ar({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"]}}));ir(Qe,"firefox",()=>ar({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));ir(Qe,"edge",()=>ar({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));sr.apps=Qe;sr.openApp=lu;Qi.exports=sr});var cu={};fs(cu,{StackUtils:()=>ts.default,WebSocket:()=>vi,WebSocketServer:()=>Bt.default,codeFrameColumns:()=>rs.codeFrameColumns,open:()=>is.default,program:()=>ji,sanitize:()=>ns.default});module.exports=hs(cu);var ts=N(dr()),rs=N(gn());var So=N(yn(),1),Co=N(kt(),1),ko=N(Tt(),1),bi=N(It(),1),Bt=N(_i(),1);var vi=bi.default;var ns=N(Ci());var Wi=N(Bi(),1),{program:ji,createCommand:sl,createArgument:al,createOption:ol,CommanderError:ul,InvalidArgumentError:ll,InvalidOptionArgumentError:cl,Command:fl,Argument:hl,Option:dl,Help:pl}=Wi.default;var is=N(es());0&&(module.exports={StackUtils,WebSocket,WebSocketServer,codeFrameColumns,open,program,sanitize});
32
+ `),this.outputHelp({error:!0}));let n=t||{},i=n.exitCode||1,s=n.code||"commander.error";this._exit(i,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in x.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()}`,x.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new fu(this.options),t=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(i=>!t(i)).forEach(i=>{this.setOptionValueWithSource(i,n.implied[i],"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 n=o=>{let a=o.attributeName(),u=this.getOptionValue(a),l=this.options.find(f=>f.negate&&a===f.attributeName()),c=this.options.find(f=>!f.negate&&a===f.attributeName());return l&&(l.presetArg===void 0&&u===!1||l.presetArg!==void 0&&u===l.presetArg)?l:c||o},i=o=>{let a=n(o),u=a.attributeName();return this.getOptionValueSource(u)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},s=`error: ${i(e)} cannot be used with ${i(t)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let i=[],s=this;do{let o=s.createHelp().visibleOptions(s).filter(a=>a.long).map(a=>a.long);i=i.concat(o),s=s.parent}while(s&&!s._enablePositionalOptions);t=Bi(e,i)}let n=`error: unknown option '${e}'${t}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,n=t===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${n} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let i=[];this.createHelp().visibleCommands(this).forEach(s=>{i.push(s.name()),s.alias()&&i.push(s.alias())}),t=Bi(e,i)}let n=`error: unknown command '${e}'${t}`;this.error(n,{code:"commander.unknownCommand"})}version(e,t,n){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";let i=this.createOption(t,n);return this._versionOptionName=i.attributeName(),this._registerOption(i),this.on("option:"+i.name(),()=>{this._outputConfiguration.writeOut(`${e}
33
+ `),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 i;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 n=(i=this.parent)==null?void 0:i._findCommand(e);if(n){let s=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${s}'`)}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(n=>lu(n));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)}nameFromFilename(e){return this._name=j.basename(e,j.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp();return t.helpWidth===void 0&&(t.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),t.formatHelp(this,t)}_getHelpContext(e){e=e||{};let t={error:!!e.error},n;return t.error?n=i=>this._outputConfiguration.writeErr(i):n=i=>this._outputConfiguration.writeOut(i),t.write=e.write||n,t.command=this,t}outputHelp(e){var s;let t;typeof e=="function"&&(t=e,e=void 0);let n=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach(o=>o.emit("beforeAllHelp",n)),this.emit("beforeHelp",n);let i=this.helpInformation(n);if(t&&(i=t(i),typeof i!="string"&&!Buffer.isBuffer(i)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(i),(s=this._getHelpOption())!=null&&s.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",n),this._getCommandAndAncestors().forEach(o=>o.emit("afterAllHelp",n))}helpOption(e,t){return typeof e=="boolean"?(e?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(e=e??"-h, --help",t=t??"display help for command",this._helpOption=this.createOption(e,t),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let t=x.exitCode||0;t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
34
+ Expecting one of '${n.join("', '")}'`);let i=`${e}Help`;return this.on(i,s=>{let o;typeof t=="function"?o=t({error:s.error,command:s.command}):o=t,o&&s.write(`${o}
35
+ `)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(i=>t.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Fi(r){return r.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",i="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?t=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=s[1],/^\d+$/.test(s[3])?i=s[3]:n=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],n=s[3],i=s[4]),t&&i!=="0"?`${t}=${n}:${parseInt(i)+1}`:e})}Wi.Command=tr});var Ui=g(T=>{var{Argument:Di}=Je(),{Command:rr}=ji(),{CommanderError:hu,InvalidArgumentError:qi}=Se(),{Help:du}=zt(),{Option:Vi}=Jt();T.program=new rr;T.createCommand=r=>new rr(r);T.createOption=(r,e)=>new Vi(r,e);T.createArgument=(r,e)=>new Di(r,e);T.Command=rr;T.Option=Vi;T.Argument=Di;T.Help=du;T.CommanderError=hu;T.InvalidArgumentError=qi;T.InvalidOptionArgumentError=qi});var ir=g((Nl,Yi)=>{"use strict";var zi=require("fs"),nr;function pu(){try{return zi.statSync("/.dockerenv"),!0}catch{return!1}}function mu(){try{return zi.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}Yi.exports=()=>(nr===void 0&&(nr=pu()||mu()),nr)});var Ji=g((Ml,sr)=>{"use strict";var gu=require("os"),_u=require("fs"),Ki=ir(),Xi=()=>{if(process.platform!=="linux")return!1;if(gu.release().toLowerCase().includes("microsoft"))return!Ki();try{return _u.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!Ki():!1}catch{return!1}};process.env.__IS_WSL_TEST__?sr.exports=Xi:sr.exports=Xi()});var Qi=g((Rl,Zi)=>{"use strict";Zi.exports=(r,e,t)=>{let n=i=>Object.defineProperty(r,e,{value:i,enumerable:!0,writable:!0});return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get(){let i=t();return n(i),i},set(i){n(i)}}),r}});var os=g((Ll,ss)=>{var bu=require("path"),vu=require("child_process"),{promises:Qe,constants:is}=require("fs"),Ze=Ji(),yu=ir(),ar=Qi(),es=bu.join(__dirname,"xdg-open"),{platform:le,arch:ts}=process,xu=()=>{try{return Qe.statSync("/run/.containerenv"),!0}catch{return!1}},or;function wu(){return or===void 0&&(or=xu()||yu()),or}var Eu=(()=>{let r="/mnt/",e;return async function(){if(e)return e;let t="/etc/wsl.conf",n=!1;try{await Qe.access(t,is.F_OK),n=!0}catch{}if(!n)return r;let i=await Qe.readFile(t,{encoding:"utf8"}),s=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(i);return s?(e=s.groups.mountPoint.trim(),e=e.endsWith("/")?e:`${e}/`,e):r}})(),rs=async(r,e)=>{let t;for(let n of r)try{return await e(n)}catch(i){t=i}throw t},et=async r=>{if(r={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...r},Array.isArray(r.app))return rs(r.app,a=>et({...r,app:a}));let{name:e,arguments:t=[]}=r.app||{};if(t=[...t],Array.isArray(e))return rs(e,a=>et({...r,app:{name:a,arguments:t}}));let n,i=[],s={};if(le==="darwin")n="open",r.wait&&i.push("--wait-apps"),r.background&&i.push("--background"),r.newInstance&&i.push("--new"),e&&i.push("-a",e);else if(le==="win32"||Ze&&!wu()&&!e){let a=await Eu();n=Ze?`${a}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,i.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),Ze||(s.windowsVerbatimArguments=!0);let u=["Start"];r.wait&&u.push("-Wait"),e?(u.push(`"\`"${e}\`""`,"-ArgumentList"),r.target&&t.unshift(r.target)):r.target&&u.push(`"${r.target}"`),t.length>0&&(t=t.map(l=>`"\`"${l}\`""`),u.push(t.join(","))),r.target=Buffer.from(u.join(" "),"utf16le").toString("base64")}else{if(e)n=e;else{let a=!__dirname||__dirname==="/",u=!1;try{await Qe.access(es,is.X_OK),u=!0}catch{}n=process.versions.electron||le==="android"||a||!u?"xdg-open":es}t.length>0&&i.push(...t),r.wait||(s.stdio="ignore",s.detached=!0)}r.target&&i.push(r.target),le==="darwin"&&t.length>0&&i.push("--args",...t);let o=vu.spawn(n,i,s);return r.wait?new Promise((a,u)=>{o.once("error",u),o.once("close",l=>{if(!r.allowNonzeroExitCode&&l>0){u(new Error(`Exited with code ${l}`));return}a(o)})}):(o.unref(),o)},ur=(r,e)=>{if(typeof r!="string")throw new TypeError("Expected a `target`");return et({...e,target:r})},Ou=(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 et({...e,app:{name:r,arguments:t}})};function ns(r){if(typeof r=="string"||Array.isArray(r))return r;let{[ts]:e}=r;if(!e)throw new Error(`${ts} is not supported`);return e}function lr({[le]:r},{wsl:e}){if(e&&Ze)return ns(e);if(!r)throw new Error(`${le} is not supported`);return ns(r)}var tt={};ar(tt,"chrome",()=>lr({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"]}}));ar(tt,"firefox",()=>lr({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));ar(tt,"edge",()=>lr({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));ur.apps=tt;ur.openApp=Ou;ss.exports=ur});var Su={};_s(Su,{StackUtils:()=>as.default,WebSocket:()=>Si,WebSocketServer:()=>Dt.default,codeFrameColumns:()=>us.codeFrameColumns,open:()=>cs.default,program:()=>Gi,sanitize:()=>ls.default});module.exports=bs(Su);var as=R(gr()),us=R(vn());var ja=R(En(),1),Da=R(Tt(),1),qa=R(Mt(),1),Oi=R(Wt(),1),Dt=R(Ei(),1);var Si=Oi.default;var ls=R(Mi());var Hi=R(Ui(),1),{program:Gi,createCommand:yl,createArgument:xl,createOption:wl,CommanderError:El,InvalidArgumentError:Ol,InvalidOptionArgumentError:Sl,Command:Cl,Argument:kl,Option:Al,Help:Tl}=Hi.default;var cs=R(os());0&&(module.exports={StackUtils,WebSocket,WebSocketServer,codeFrameColumns,open,program,sanitize});