monocart-reporter 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,22 +1,15 @@
1
- var to=Object.create;var Pt=Object.defineProperty;var so=Object.getOwnPropertyDescriptor;var ro=Object.getOwnPropertyNames;var io=Object.getPrototypeOf,ao=Object.prototype.hasOwnProperty;var A=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports),no=(i,t)=>{for(var e in t)Pt(i,e,{get:t[e],enumerable:!0})},Er=(i,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ro(t))!ao.call(i,r)&&r!==e&&Pt(i,r,{get:()=>t[r],enumerable:!(s=so(t,r))||s.enumerable});return i};var te=(i,t,e)=>(e=i!=null?to(io(i)):{},Er(t||!i||!i.__esModule?Pt(e,"default",{value:i,enumerable:!0}):e,i)),oo=i=>Er(Pt({},"__esModule",{value:!0}),i);var Ir=A((Eh,Cr)=>{"use strict";var uo=/[|\\{}()[\]^$+*?.-]/g;Cr.exports=i=>{if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(uo,"\\$&")}});var Or=A((Ch,_r)=>{"use strict";var lo=Ir(),co=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",Nr=[].concat(require("module").builtinModules,"bootstrap_node","node").map(i=>new RegExp(`(?:\\((?:node:)?${i}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${i}(?:\\.js)?:\\d+:\\d+$)`));Nr.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var as=class i{constructor(t){t={ignoredPackages:[],...t},"internals"in t||(t.internals=i.nodeInternals()),"cwd"in t||(t.cwd=co),this._cwd=t.cwd.replace(/\\/g,"/"),this._internals=[].concat(t.internals,ho(t.ignoredPackages)),this._wrapCallSite=t.wrapCallSite||!1}static nodeInternals(){return[...Nr]}clean(t,e=0){e=" ".repeat(e),Array.isArray(t)||(t=t.split(`
2
- `)),!/^\s*at /.test(t[0])&&/^\s*at /.test(t[1])&&(t=t.slice(1));let s=!1,r=null,a=[];return t.forEach(n=>{if(n=n.replace(/\\/g,"/"),this._internals.some(u=>u.test(n)))return;let o=/^\s*at /.test(n);s?n=n.trimEnd().replace(/^(\s+)at /,"$1"):(n=n.trim(),o&&(n=n.slice(3))),n=n.replace(`${this._cwd}/`,""),n&&(o?(r&&(a.push(r),r=null),a.push(n)):(s=!0,r=n))}),a.map(n=>`${e}${n}
3
- `).join("")}captureString(t,e=this.captureString){typeof t=="function"&&(e=t,t=1/0);let{stackTraceLimit:s}=Error;t&&(Error.stackTraceLimit=t);let r={};Error.captureStackTrace(r,e);let{stack:a}=r;return Error.stackTraceLimit=s,this.clean(a)}capture(t,e=this.capture){typeof t=="function"&&(e=t,t=1/0);let{prepareStackTrace:s,stackTraceLimit:r}=Error;Error.prepareStackTrace=(o,u)=>this._wrapCallSite?u.map(this._wrapCallSite):u,t&&(Error.stackTraceLimit=t);let a={};Error.captureStackTrace(a,e);let{stack:n}=a;return Object.assign(Error,{prepareStackTrace:s,stackTraceLimit:r}),n}at(t=this.at){let[e]=this.capture(1,t);if(!e)return{};let s={line:e.getLineNumber(),column:e.getColumnNumber()};kr(s,e.getFileName(),this._cwd),e.isConstructor()&&Object.defineProperty(s,"constructor",{value:!0,configurable:!0}),e.isEval()&&(s.evalOrigin=e.getEvalOrigin()),e.isNative()&&(s.native=!0);let r;try{r=e.getTypeName()}catch{}r&&r!=="Object"&&r!=="[object Object]"&&(s.type=r);let a=e.getFunctionName();a&&(s.function=a);let n=e.getMethodName();return n&&a!==n&&(s.method=n),s}parseLine(t){let e=t&&t.match(po);if(!e)return null;let s=e[1]==="new",r=e[2],a=e[3],n=e[4],o=Number(e[5]),u=Number(e[6]),l=e[7],c=e[8],p=e[9],f=e[10]==="native",m=e[11]===")",d,y={};if(c&&(y.line=Number(c)),p&&(y.column=Number(p)),m&&l){let v=0;for(let S=l.length-1;S>0;S--)if(l.charAt(S)===")")v++;else if(l.charAt(S)==="("&&l.charAt(S-1)===" "&&(v--,v===-1&&l.charAt(S-1)===" ")){let _=l.slice(0,S-1);l=l.slice(S+1),r+=` (${_}`;break}}if(r){let v=r.match(fo);v&&(r=v[1],d=v[2])}return kr(y,l,this._cwd),s&&Object.defineProperty(y,"constructor",{value:!0,configurable:!0}),a&&(y.evalOrigin=a,y.evalLine=o,y.evalColumn=u,y.evalFile=n&&n.replace(/\\/g,"/")),f&&(y.native=!0),r&&(y.function=r),d&&r!==d&&(y.method=d),y}};function kr(i,t,e){t&&(t=t.replace(/\\/g,"/"),t.startsWith(`${e}/`)&&(t=t.slice(e.length+1)),i.file=t)}function ho(i){if(i.length===0)return[];let t=i.map(e=>lo(e));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${t.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var po=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),fo=/^(.*?) \[as (.*?)\]$/;_r.exports=as});var Mr=A(vt=>{Object.defineProperty(vt,"__esModule",{value:!0});vt.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;vt.matchToToken=function(i){var t={type:"invalid",value:i[0],closed:void 0};return i[1]?(t.type="string",t.closed=!!(i[3]||i[4])):i[5]?t.type="comment":i[6]?(t.type="comment",t.closed=!!i[7]):i[8]?t.type="regex":i[9]?t.type="number":i[10]?t.type="name":i[11]?t.type="punctuator":i[12]&&(t.type="whitespace"),t}});var Rr=A(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.isIdentifierChar=Fr;Ve.isIdentifierName=go;Ve.isIdentifierStart=Br;var os="\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",Lr="\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",mo=new RegExp("["+os+"]"),yo=new RegExp("["+os+Lr+"]");os=Lr=null;var Dr=[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],xo=[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 ns(i,t){let e=65536;for(let s=0,r=t.length;s<r;s+=2){if(e+=t[s],e>i)return!1;if(e+=t[s+1],e>=i)return!0}return!1}function Br(i){return i<65?i===36:i<=90?!0:i<97?i===95:i<=122?!0:i<=65535?i>=170&&mo.test(String.fromCharCode(i)):ns(i,Dr)}function Fr(i){return i<48?i===36:i<58?!0:i<65?!1:i<=90?!0:i<97?i===95:i<=122?!0:i<=65535?i>=170&&yo.test(String.fromCharCode(i)):ns(i,Dr)||ns(i,xo)}function go(i){let t=!0;for(let e=0;e<i.length;e++){let s=i.charCodeAt(e);if((s&64512)===55296&&e+1<i.length){let r=i.charCodeAt(++e);(r&64512)===56320&&(s=65536+((s&1023)<<10)+(r&1023))}if(t){if(t=!1,!Br(s))return!1}else if(!Fr(s))return!1}return!t}});var qr=A(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.isKeyword=To;ge.isReservedWord=jr;ge.isStrictBindOnlyReservedWord=$r;ge.isStrictBindReservedWord=wo;ge.isStrictReservedWord=Ur;var us={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"]},bo=new Set(us.keyword),Po=new Set(us.strict),vo=new Set(us.strictBind);function jr(i,t){return t&&i==="await"||i==="enum"}function Ur(i,t){return jr(i,t)||Po.has(i)}function $r(i){return vo.has(i)}function wo(i,t){return Ur(i,t)||$r(i)}function To(i){return bo.has(i)}});var Wr=A(Y=>{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});Object.defineProperty(Y,"isIdentifierChar",{enumerable:!0,get:function(){return ls.isIdentifierChar}});Object.defineProperty(Y,"isIdentifierName",{enumerable:!0,get:function(){return ls.isIdentifierName}});Object.defineProperty(Y,"isIdentifierStart",{enumerable:!0,get:function(){return ls.isIdentifierStart}});Object.defineProperty(Y,"isKeyword",{enumerable:!0,get:function(){return ze.isKeyword}});Object.defineProperty(Y,"isReservedWord",{enumerable:!0,get:function(){return ze.isReservedWord}});Object.defineProperty(Y,"isStrictBindOnlyReservedWord",{enumerable:!0,get:function(){return ze.isStrictBindOnlyReservedWord}});Object.defineProperty(Y,"isStrictBindReservedWord",{enumerable:!0,get:function(){return ze.isStrictBindReservedWord}});Object.defineProperty(Y,"isStrictReservedWord",{enumerable:!0,get:function(){return ze.isStrictReservedWord}});var ls=Rr(),ze=qr()});var zr=A((Oh,Vr)=>{"use strict";var So=/[|\\{}()[\]^$+*?.]/g;Vr.exports=function(i){if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(So,"\\$&")}});var Kr=A((Mh,Hr)=>{"use strict";Hr.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 cs=A((Lh,Yr)=>{var be=Kr(),Jr={};for(wt in be)be.hasOwnProperty(wt)&&(Jr[be[wt]]=wt);var wt,b=Yr.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($ in b)if(b.hasOwnProperty($)){if(!("channels"in b[$]))throw new Error("missing channels property: "+$);if(!("labels"in b[$]))throw new Error("missing channel labels property: "+$);if(b[$].labels.length!==b[$].channels)throw new Error("channel and label counts mismatch: "+$);Gr=b[$].channels,Xr=b[$].labels,delete b[$].channels,delete b[$].labels,Object.defineProperty(b[$],"channels",{value:Gr}),Object.defineProperty(b[$],"labels",{value:Xr})}var Gr,Xr,$;b.rgb.hsl=function(i){var t=i[0]/255,e=i[1]/255,s=i[2]/255,r=Math.min(t,e,s),a=Math.max(t,e,s),n=a-r,o,u,l;return a===r?o=0:t===a?o=(e-s)/n:e===a?o=2+(s-t)/n:s===a&&(o=4+(t-e)/n),o=Math.min(o*60,360),o<0&&(o+=360),l=(r+a)/2,a===r?u=0:l<=.5?u=n/(a+r):u=n/(2-a-r),[o,u*100,l*100]};b.rgb.hsv=function(i){var t,e,s,r,a,n=i[0]/255,o=i[1]/255,u=i[2]/255,l=Math.max(n,o,u),c=l-Math.min(n,o,u),p=function(f){return(l-f)/6/c+1/2};return c===0?r=a=0:(a=c/l,t=p(n),e=p(o),s=p(u),n===l?r=s-e:o===l?r=1/3+t-s:u===l&&(r=2/3+e-t),r<0?r+=1:r>1&&(r-=1)),[r*360,a*100,l*100]};b.rgb.hwb=function(i){var t=i[0],e=i[1],s=i[2],r=b.rgb.hsl(i)[0],a=1/255*Math.min(t,Math.min(e,s));return s=1-1/255*Math.max(t,Math.max(e,s)),[r,a*100,s*100]};b.rgb.cmyk=function(i){var t=i[0]/255,e=i[1]/255,s=i[2]/255,r,a,n,o;return o=Math.min(1-t,1-e,1-s),r=(1-t-o)/(1-o)||0,a=(1-e-o)/(1-o)||0,n=(1-s-o)/(1-o)||0,[r*100,a*100,n*100,o*100]};function Ao(i,t){return Math.pow(i[0]-t[0],2)+Math.pow(i[1]-t[1],2)+Math.pow(i[2]-t[2],2)}b.rgb.keyword=function(i){var t=Jr[i];if(t)return t;var e=1/0,s;for(var r in be)if(be.hasOwnProperty(r)){var a=be[r],n=Ao(i,a);n<e&&(e=n,s=r)}return s};b.keyword.rgb=function(i){return be[i]};b.rgb.xyz=function(i){var t=i[0]/255,e=i[1]/255,s=i[2]/255;t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92,e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,s=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92;var r=t*.4124+e*.3576+s*.1805,a=t*.2126+e*.7152+s*.0722,n=t*.0193+e*.1192+s*.9505;return[r*100,a*100,n*100]};b.rgb.lab=function(i){var t=b.rgb.xyz(i),e=t[0],s=t[1],r=t[2],a,n,o;return e/=95.047,s/=100,r/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,a=116*s-16,n=500*(e-s),o=200*(s-r),[a,n,o]};b.hsl.rgb=function(i){var t=i[0]/360,e=i[1]/100,s=i[2]/100,r,a,n,o,u;if(e===0)return u=s*255,[u,u,u];s<.5?a=s*(1+e):a=s+e-s*e,r=2*s-a,o=[0,0,0];for(var l=0;l<3;l++)n=t+1/3*-(l-1),n<0&&n++,n>1&&n--,6*n<1?u=r+(a-r)*6*n:2*n<1?u=a:3*n<2?u=r+(a-r)*(2/3-n)*6:u=r,o[l]=u*255;return o};b.hsl.hsv=function(i){var t=i[0],e=i[1]/100,s=i[2]/100,r=e,a=Math.max(s,.01),n,o;return s*=2,e*=s<=1?s:2-s,r*=a<=1?a:2-a,o=(s+e)/2,n=s===0?2*r/(a+r):2*e/(s+e),[t,n*100,o*100]};b.hsv.rgb=function(i){var t=i[0]/60,e=i[1]/100,s=i[2]/100,r=Math.floor(t)%6,a=t-Math.floor(t),n=255*s*(1-e),o=255*s*(1-e*a),u=255*s*(1-e*(1-a));switch(s*=255,r){case 0:return[s,u,n];case 1:return[o,s,n];case 2:return[n,s,u];case 3:return[n,o,s];case 4:return[u,n,s];case 5:return[s,n,o]}};b.hsv.hsl=function(i){var t=i[0],e=i[1]/100,s=i[2]/100,r=Math.max(s,.01),a,n,o;return o=(2-e)*s,a=(2-e)*r,n=e*r,n/=a<=1?a:2-a,n=n||0,o/=2,[t,n*100,o*100]};b.hwb.rgb=function(i){var t=i[0]/360,e=i[1]/100,s=i[2]/100,r=e+s,a,n,o,u;r>1&&(e/=r,s/=r),a=Math.floor(6*t),n=1-s,o=6*t-a,a&1&&(o=1-o),u=e+o*(n-e);var l,c,p;switch(a){default:case 6:case 0:l=n,c=u,p=e;break;case 1:l=u,c=n,p=e;break;case 2:l=e,c=n,p=u;break;case 3:l=e,c=u,p=n;break;case 4:l=u,c=e,p=n;break;case 5:l=n,c=e,p=u;break}return[l*255,c*255,p*255]};b.cmyk.rgb=function(i){var t=i[0]/100,e=i[1]/100,s=i[2]/100,r=i[3]/100,a,n,o;return a=1-Math.min(1,t*(1-r)+r),n=1-Math.min(1,e*(1-r)+r),o=1-Math.min(1,s*(1-r)+r),[a*255,n*255,o*255]};b.xyz.rgb=function(i){var t=i[0]/100,e=i[1]/100,s=i[2]/100,r,a,n;return r=t*3.2406+e*-1.5372+s*-.4986,a=t*-.9689+e*1.8758+s*.0415,n=t*.0557+e*-.204+s*1.057,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*12.92,r=Math.min(Math.max(0,r),1),a=Math.min(Math.max(0,a),1),n=Math.min(Math.max(0,n),1),[r*255,a*255,n*255]};b.xyz.lab=function(i){var t=i[0],e=i[1],s=i[2],r,a,n;return t/=95.047,e/=100,s/=108.883,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,r=116*e-16,a=500*(t-e),n=200*(e-s),[r,a,n]};b.lab.xyz=function(i){var t=i[0],e=i[1],s=i[2],r,a,n;a=(t+16)/116,r=e/500+a,n=a-s/200;var o=Math.pow(a,3),u=Math.pow(r,3),l=Math.pow(n,3);return a=o>.008856?o:(a-16/116)/7.787,r=u>.008856?u:(r-16/116)/7.787,n=l>.008856?l:(n-16/116)/7.787,r*=95.047,a*=100,n*=108.883,[r,a,n]};b.lab.lch=function(i){var t=i[0],e=i[1],s=i[2],r,a,n;return r=Math.atan2(s,e),a=r*360/2/Math.PI,a<0&&(a+=360),n=Math.sqrt(e*e+s*s),[t,n,a]};b.lch.lab=function(i){var t=i[0],e=i[1],s=i[2],r,a,n;return n=s/360*2*Math.PI,r=e*Math.cos(n),a=e*Math.sin(n),[t,r,a]};b.rgb.ansi16=function(i){var t=i[0],e=i[1],s=i[2],r=1 in arguments?arguments[1]:b.rgb.hsv(i)[2];if(r=Math.round(r/50),r===0)return 30;var a=30+(Math.round(s/255)<<2|Math.round(e/255)<<1|Math.round(t/255));return r===2&&(a+=60),a};b.hsv.ansi16=function(i){return b.rgb.ansi16(b.hsv.rgb(i),i[2])};b.rgb.ansi256=function(i){var t=i[0],e=i[1],s=i[2];if(t===e&&e===s)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;var r=16+36*Math.round(t/255*5)+6*Math.round(e/255*5)+Math.round(s/255*5);return r};b.ansi16.rgb=function(i){var t=i%10;if(t===0||t===7)return i>50&&(t+=3.5),t=t/10.5*255,[t,t,t];var e=(~~(i>50)+1)*.5,s=(t&1)*e*255,r=(t>>1&1)*e*255,a=(t>>2&1)*e*255;return[s,r,a]};b.ansi256.rgb=function(i){if(i>=232){var t=(i-232)*10+8;return[t,t,t]}i-=16;var e,s=Math.floor(i/36)/5*255,r=Math.floor((e=i%36)/6)/5*255,a=e%6/5*255;return[s,r,a]};b.rgb.hex=function(i){var t=((Math.round(i[0])&255)<<16)+((Math.round(i[1])&255)<<8)+(Math.round(i[2])&255),e=t.toString(16).toUpperCase();return"000000".substring(e.length)+e};b.hex.rgb=function(i){var t=i.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var e=t[0];t[0].length===3&&(e=e.split("").map(function(o){return o+o}).join(""));var s=parseInt(e,16),r=s>>16&255,a=s>>8&255,n=s&255;return[r,a,n]};b.rgb.hcg=function(i){var t=i[0]/255,e=i[1]/255,s=i[2]/255,r=Math.max(Math.max(t,e),s),a=Math.min(Math.min(t,e),s),n=r-a,o,u;return n<1?o=a/(1-n):o=0,n<=0?u=0:r===t?u=(e-s)/n%6:r===e?u=2+(s-t)/n:u=4+(t-e)/n+4,u/=6,u%=1,[u*360,n*100,o*100]};b.hsl.hcg=function(i){var t=i[1]/100,e=i[2]/100,s=1,r=0;return e<.5?s=2*t*e:s=2*t*(1-e),s<1&&(r=(e-.5*s)/(1-s)),[i[0],s*100,r*100]};b.hsv.hcg=function(i){var t=i[1]/100,e=i[2]/100,s=t*e,r=0;return s<1&&(r=(e-s)/(1-s)),[i[0],s*100,r*100]};b.hcg.rgb=function(i){var t=i[0]/360,e=i[1]/100,s=i[2]/100;if(e===0)return[s*255,s*255,s*255];var r=[0,0,0],a=t%1*6,n=a%1,o=1-n,u=0;switch(Math.floor(a)){case 0:r[0]=1,r[1]=n,r[2]=0;break;case 1:r[0]=o,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=n;break;case 3:r[0]=0,r[1]=o,r[2]=1;break;case 4:r[0]=n,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=o}return u=(1-e)*s,[(e*r[0]+u)*255,(e*r[1]+u)*255,(e*r[2]+u)*255]};b.hcg.hsv=function(i){var t=i[1]/100,e=i[2]/100,s=t+e*(1-t),r=0;return s>0&&(r=t/s),[i[0],r*100,s*100]};b.hcg.hsl=function(i){var t=i[1]/100,e=i[2]/100,s=e*(1-t)+.5*t,r=0;return s>0&&s<.5?r=t/(2*s):s>=.5&&s<1&&(r=t/(2*(1-s))),[i[0],r*100,s*100]};b.hcg.hwb=function(i){var t=i[1]/100,e=i[2]/100,s=t+e*(1-t);return[i[0],(s-t)*100,(1-s)*100]};b.hwb.hcg=function(i){var t=i[1]/100,e=i[2]/100,s=1-e,r=s-t,a=0;return r<1&&(a=(s-r)/(1-r)),[i[0],r*100,a*100]};b.apple.rgb=function(i){return[i[0]/65535*255,i[1]/65535*255,i[2]/65535*255]};b.rgb.apple=function(i){return[i[0]/255*65535,i[1]/255*65535,i[2]/255*65535]};b.gray.rgb=function(i){return[i[0]/100*255,i[0]/100*255,i[0]/100*255]};b.gray.hsl=b.gray.hsv=function(i){return[0,0,i[0]]};b.gray.hwb=function(i){return[0,100,i[0]]};b.gray.cmyk=function(i){return[0,0,0,i[0]]};b.gray.lab=function(i){return[i[0],0,0]};b.gray.hex=function(i){var t=Math.round(i[0]/100*255)&255,e=(t<<16)+(t<<8)+t,s=e.toString(16).toUpperCase();return"000000".substring(s.length)+s};b.rgb.gray=function(i){var t=(i[0]+i[1]+i[2])/3;return[t/255*100]}});var Zr=A((Dh,Qr)=>{var Tt=cs();function Eo(){for(var i={},t=Object.keys(Tt),e=t.length,s=0;s<e;s++)i[t[s]]={distance:-1,parent:null};return i}function Co(i){var t=Eo(),e=[i];for(t[i].distance=0;e.length;)for(var s=e.pop(),r=Object.keys(Tt[s]),a=r.length,n=0;n<a;n++){var o=r[n],u=t[o];u.distance===-1&&(u.distance=t[s].distance+1,u.parent=s,e.unshift(o))}return t}function Io(i,t){return function(e){return t(i(e))}}function ko(i,t){for(var e=[t[i].parent,i],s=Tt[t[i].parent][i],r=t[i].parent;t[r].parent;)e.unshift(t[r].parent),s=Io(Tt[t[r].parent][r],s),r=t[r].parent;return s.conversion=e,s}Qr.exports=function(i){for(var t=Co(i),e={},s=Object.keys(t),r=s.length,a=0;a<r;a++){var n=s[a],o=t[n];o.parent!==null&&(e[n]=ko(n,t))}return e}});var ti=A((Bh,ei)=>{var hs=cs(),No=Zr(),Ee={},_o=Object.keys(hs);function Oo(i){var t=function(e){return e==null?e:(arguments.length>1&&(e=Array.prototype.slice.call(arguments)),i(e))};return"conversion"in i&&(t.conversion=i.conversion),t}function Mo(i){var t=function(e){if(e==null)return e;arguments.length>1&&(e=Array.prototype.slice.call(arguments));var s=i(e);if(typeof s=="object")for(var r=s.length,a=0;a<r;a++)s[a]=Math.round(s[a]);return s};return"conversion"in i&&(t.conversion=i.conversion),t}_o.forEach(function(i){Ee[i]={},Object.defineProperty(Ee[i],"channels",{value:hs[i].channels}),Object.defineProperty(Ee[i],"labels",{value:hs[i].labels});var t=No(i),e=Object.keys(t);e.forEach(function(s){var r=t[s];Ee[i][s]=Mo(r),Ee[i][s].raw=Oo(r)})});ei.exports=Ee});var ri=A((Fh,si)=>{"use strict";var Ce=ti(),St=(i,t)=>function(){return`\x1B[${i.apply(Ce,arguments)+t}m`},At=(i,t)=>function(){let e=i.apply(Ce,arguments);return`\x1B[${38+t};5;${e}m`},Et=(i,t)=>function(){let e=i.apply(Ce,arguments);return`\x1B[${38+t};2;${e[0]};${e[1]};${e[2]}m`};function Lo(){let i=new Map,t={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]}};t.color.grey=t.color.gray;for(let r of Object.keys(t)){let a=t[r];for(let n of Object.keys(a)){let o=a[n];t[n]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},a[n]=t[n],i.set(o[0],o[1])}Object.defineProperty(t,r,{value:a,enumerable:!1}),Object.defineProperty(t,"codes",{value:i,enumerable:!1})}let e=r=>r,s=(r,a,n)=>[r,a,n];t.color.close="\x1B[39m",t.bgColor.close="\x1B[49m",t.color.ansi={ansi:St(e,0)},t.color.ansi256={ansi256:At(e,0)},t.color.ansi16m={rgb:Et(s,0)},t.bgColor.ansi={ansi:St(e,10)},t.bgColor.ansi256={ansi256:At(e,10)},t.bgColor.ansi16m={rgb:Et(s,10)};for(let r of Object.keys(Ce)){if(typeof Ce[r]!="object")continue;let a=Ce[r];r==="ansi16"&&(r="ansi"),"ansi16"in a&&(t.color.ansi[r]=St(a.ansi16,0),t.bgColor.ansi[r]=St(a.ansi16,10)),"ansi256"in a&&(t.color.ansi256[r]=At(a.ansi256,0),t.bgColor.ansi256[r]=At(a.ansi256,10)),"rgb"in a&&(t.color.ansi16m[r]=Et(a.rgb,0),t.bgColor.ansi16m[r]=Et(a.rgb,10))}return t}Object.defineProperty(si,"exports",{enumerable:!0,get:Lo})});var ai=A((Rh,ii)=>{"use strict";ii.exports=(i,t)=>{t=t||process.argv;let e=i.startsWith("-")?"":i.length===1?"-":"--",s=t.indexOf(e+i),r=t.indexOf("--");return s!==-1&&(r===-1?!0:s<r)}});var oi=A((jh,ni)=>{"use strict";var Do=require("os"),K=ai(),F=process.env,Ie;K("no-color")||K("no-colors")||K("color=false")?Ie=!1:(K("color")||K("colors")||K("color=true")||K("color=always"))&&(Ie=!0);"FORCE_COLOR"in F&&(Ie=F.FORCE_COLOR.length===0||parseInt(F.FORCE_COLOR,10)!==0);function Bo(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function Fo(i){if(Ie===!1)return 0;if(K("color=16m")||K("color=full")||K("color=truecolor"))return 3;if(K("color=256"))return 2;if(i&&!i.isTTY&&Ie!==!0)return 0;let t=Ie?1:0;if(process.platform==="win32"){let e=Do.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in F)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(e=>e in F)||F.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in F)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(F.TEAMCITY_VERSION)?1:0;if(F.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in F){let e=parseInt((F.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(F.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(F.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(F.TERM)||"COLORTERM"in F?1:(F.TERM==="dumb",t)}function ps(i){let t=Fo(i);return Bo(t)}ni.exports={supportsColor:ps,stdout:ps(process.stdout),stderr:ps(process.stderr)}});var pi=A((Uh,hi)=>{"use strict";var Ro=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,ui=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,jo=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,Uo=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,$o=new Map([["n",`
4
- `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function ci(i){return i[0]==="u"&&i.length===5||i[0]==="x"&&i.length===3?String.fromCharCode(parseInt(i.slice(1),16)):$o.get(i)||i}function qo(i,t){let e=[],s=t.trim().split(/\s*,\s*/g),r;for(let a of s)if(!isNaN(a))e.push(Number(a));else if(r=a.match(jo))e.push(r[2].replace(Uo,(n,o,u)=>o?ci(o):u));else throw new Error(`Invalid Chalk template style argument: ${a} (in style '${i}')`);return e}function Wo(i){ui.lastIndex=0;let t=[],e;for(;(e=ui.exec(i))!==null;){let s=e[1];if(e[2]){let r=qo(s,e[2]);t.push([s].concat(r))}else t.push([s])}return t}function li(i,t){let e={};for(let r of t)for(let a of r.styles)e[a[0]]=r.inverse?null:a.slice(1);let s=i;for(let r of Object.keys(e))if(Array.isArray(e[r])){if(!(r in s))throw new Error(`Unknown Chalk style: ${r}`);e[r].length>0?s=s[r].apply(s,e[r]):s=s[r]}return s}hi.exports=(i,t)=>{let e=[],s=[],r=[];if(t.replace(Ro,(a,n,o,u,l,c)=>{if(n)r.push(ci(n));else if(u){let p=r.join("");r=[],s.push(e.length===0?p:li(i,e)(p)),e.push({inverse:o,styles:Wo(u)})}else if(l){if(e.length===0)throw new Error("Found extraneous } in Chalk template literal");s.push(li(i,e)(r.join(""))),r=[],e.pop()}else r.push(c)}),s.push(r.join("")),e.length>0){let a=`Chalk template literal is missing ${e.length} closing bracket${e.length===1?"":"s"} (\`}\`)`;throw new Error(a)}return s.join("")}});var xi=A(($h,Ke)=>{"use strict";var ds=zr(),M=ri(),fs=oi().stdout,Vo=pi(),di=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),mi=["ansi","ansi","ansi256","ansi16m"],yi=new Set(["gray"]),ke=Object.create(null);function fi(i,t){t=t||{};let e=fs?fs.level:0;i.level=t.level===void 0?e:t.level,i.enabled="enabled"in t?t.enabled:i.level>0}function He(i){if(!this||!(this instanceof He)||this.template){let t={};return fi(t,i),t.template=function(){let e=[].slice.call(arguments);return Ko.apply(null,[t.template].concat(e))},Object.setPrototypeOf(t,He.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=He,t.template}fi(this,i)}di&&(M.blue.open="\x1B[94m");for(let i of Object.keys(M))M[i].closeRe=new RegExp(ds(M[i].close),"g"),ke[i]={get(){let t=M[i];return Ct.call(this,this._styles?this._styles.concat(t):[t],this._empty,i)}};ke.visible={get(){return Ct.call(this,this._styles||[],!0,"visible")}};M.color.closeRe=new RegExp(ds(M.color.close),"g");for(let i of Object.keys(M.color.ansi))yi.has(i)||(ke[i]={get(){let t=this.level;return function(){let s={open:M.color[mi[t]][i].apply(null,arguments),close:M.color.close,closeRe:M.color.closeRe};return Ct.call(this,this._styles?this._styles.concat(s):[s],this._empty,i)}}});M.bgColor.closeRe=new RegExp(ds(M.bgColor.close),"g");for(let i of Object.keys(M.bgColor.ansi)){if(yi.has(i))continue;let t="bg"+i[0].toUpperCase()+i.slice(1);ke[t]={get(){let e=this.level;return function(){let r={open:M.bgColor[mi[e]][i].apply(null,arguments),close:M.bgColor.close,closeRe:M.bgColor.closeRe};return Ct.call(this,this._styles?this._styles.concat(r):[r],this._empty,i)}}}}var zo=Object.defineProperties(()=>{},ke);function Ct(i,t,e){let s=function(){return Ho.apply(s,arguments)};s._styles=i,s._empty=t;let r=this;return Object.defineProperty(s,"level",{enumerable:!0,get(){return r.level},set(a){r.level=a}}),Object.defineProperty(s,"enabled",{enumerable:!0,get(){return r.enabled},set(a){r.enabled=a}}),s.hasGrey=this.hasGrey||e==="gray"||e==="grey",s.__proto__=zo,s}function Ho(){let i=arguments,t=i.length,e=String(arguments[0]);if(t===0)return"";if(t>1)for(let r=1;r<t;r++)e+=" "+i[r];if(!this.enabled||this.level<=0||!e)return this._empty?"":e;let s=M.dim.open;di&&this.hasGrey&&(M.dim.open="");for(let r of this._styles.slice().reverse())e=r.open+e.replace(r.closeRe,r.open)+r.close,e=e.replace(/\r?\n/g,`${r.close}$&${r.open}`);return M.dim.open=s,e}function Ko(i,t){if(!Array.isArray(t))return[].slice.call(arguments,1).join(" ");let e=[].slice.call(arguments,2),s=[t.raw[0]];for(let r=1;r<t.length;r++)s.push(String(e[r-1]).replace(/[{}\\]/g,"\\$&")),s.push(String(t.raw[r]));return Vo(i,s.join(""))}Object.defineProperties(He.prototype,ke);Ke.exports=He();Ke.exports.supportsColor=fs;Ke.exports.default=Ke.exports});var Si=A(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.default=eu;Ge.shouldHighlight=wi;var gi=Mr(),bi=Wr(),ys=Go(xi(),!0);function Pi(i){if(typeof WeakMap!="function")return null;var t=new WeakMap,e=new WeakMap;return(Pi=function(s){return s?e:t})(i)}function Go(i,t){if(!t&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var e=Pi(t);if(e&&e.has(i))return e.get(i);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in i)if(a!=="default"&&Object.prototype.hasOwnProperty.call(i,a)){var n=r?Object.getOwnPropertyDescriptor(i,a):null;n&&(n.get||n.set)?Object.defineProperty(s,a,n):s[a]=i[a]}return s.default=i,e&&e.set(i,s),s}var Xo=new Set(["as","async","from","get","of","set"]);function Jo(i){return{keyword:i.cyan,capitalized:i.yellow,jsxIdentifier:i.yellow,punctuator:i.yellow,number:i.magenta,string:i.green,regex:i.magenta,comment:i.grey,invalid:i.white.bgRed.bold}}var Yo=/\r\n|[\n\r\u2028\u2029]/,Qo=/^[()[\]{}]$/,vi;{let i=/^[a-z][\w-]*$/i,t=function(e,s,r){if(e.type==="name"){if((0,bi.isKeyword)(e.value)||(0,bi.isStrictReservedWord)(e.value,!0)||Xo.has(e.value))return"keyword";if(i.test(e.value)&&(r[s-1]==="<"||r.slice(s-2,s)=="</"))return"jsxIdentifier";if(e.value[0]!==e.value[0].toLowerCase())return"capitalized"}return e.type==="punctuator"&&Qo.test(e.value)?"bracket":e.type==="invalid"&&(e.value==="@"||e.value==="#")?"punctuator":e.type};vi=function*(e){let s;for(;s=gi.default.exec(e);){let r=gi.matchToToken(s);yield{type:t(r,s.index,e),value:r.value}}}}function Zo(i,t){let e="";for(let{type:s,value:r}of vi(t)){let a=i[s];a?e+=r.split(Yo).map(n=>a(n)).join(`
5
- `):e+=r}return e}function wi(i){return ys.default.level>0||i.forceColor}var ms;function Ti(i){if(i){var t;return(t=ms)!=null||(ms=new ys.default.constructor({enabled:!0,level:1})),ms}return ys.default}Ge.getChalk=i=>Ti(i.forceColor);function eu(i,t={}){if(i!==""&&wi(t)){let e=Jo(Ti(t.forceColor));return Zo(e,i)}else return i}});var Ei=A((Wh,Ai)=>{"use strict";var tu=/[|\\{}()[\]^$+*?.]/g;Ai.exports=function(i){if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(tu,"\\$&")}});var Ii=A((Vh,Ci)=>{"use strict";Ci.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 xs=A((zh,Oi)=>{var Pe=Ii(),_i={};for(It in Pe)Pe.hasOwnProperty(It)&&(_i[Pe[It]]=It);var It,P=Oi.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(q in P)if(P.hasOwnProperty(q)){if(!("channels"in P[q]))throw new Error("missing channels property: "+q);if(!("labels"in P[q]))throw new Error("missing channel labels property: "+q);if(P[q].labels.length!==P[q].channels)throw new Error("channel and label counts mismatch: "+q);ki=P[q].channels,Ni=P[q].labels,delete P[q].channels,delete P[q].labels,Object.defineProperty(P[q],"channels",{value:ki}),Object.defineProperty(P[q],"labels",{value:Ni})}var ki,Ni,q;P.rgb.hsl=function(i){var t=i[0]/255,e=i[1]/255,s=i[2]/255,r=Math.min(t,e,s),a=Math.max(t,e,s),n=a-r,o,u,l;return a===r?o=0:t===a?o=(e-s)/n:e===a?o=2+(s-t)/n:s===a&&(o=4+(t-e)/n),o=Math.min(o*60,360),o<0&&(o+=360),l=(r+a)/2,a===r?u=0:l<=.5?u=n/(a+r):u=n/(2-a-r),[o,u*100,l*100]};P.rgb.hsv=function(i){var t,e,s,r,a,n=i[0]/255,o=i[1]/255,u=i[2]/255,l=Math.max(n,o,u),c=l-Math.min(n,o,u),p=function(f){return(l-f)/6/c+1/2};return c===0?r=a=0:(a=c/l,t=p(n),e=p(o),s=p(u),n===l?r=s-e:o===l?r=1/3+t-s:u===l&&(r=2/3+e-t),r<0?r+=1:r>1&&(r-=1)),[r*360,a*100,l*100]};P.rgb.hwb=function(i){var t=i[0],e=i[1],s=i[2],r=P.rgb.hsl(i)[0],a=1/255*Math.min(t,Math.min(e,s));return s=1-1/255*Math.max(t,Math.max(e,s)),[r,a*100,s*100]};P.rgb.cmyk=function(i){var t=i[0]/255,e=i[1]/255,s=i[2]/255,r,a,n,o;return o=Math.min(1-t,1-e,1-s),r=(1-t-o)/(1-o)||0,a=(1-e-o)/(1-o)||0,n=(1-s-o)/(1-o)||0,[r*100,a*100,n*100,o*100]};function su(i,t){return Math.pow(i[0]-t[0],2)+Math.pow(i[1]-t[1],2)+Math.pow(i[2]-t[2],2)}P.rgb.keyword=function(i){var t=_i[i];if(t)return t;var e=1/0,s;for(var r in Pe)if(Pe.hasOwnProperty(r)){var a=Pe[r],n=su(i,a);n<e&&(e=n,s=r)}return s};P.keyword.rgb=function(i){return Pe[i]};P.rgb.xyz=function(i){var t=i[0]/255,e=i[1]/255,s=i[2]/255;t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92,e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,s=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92;var r=t*.4124+e*.3576+s*.1805,a=t*.2126+e*.7152+s*.0722,n=t*.0193+e*.1192+s*.9505;return[r*100,a*100,n*100]};P.rgb.lab=function(i){var t=P.rgb.xyz(i),e=t[0],s=t[1],r=t[2],a,n,o;return e/=95.047,s/=100,r/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,a=116*s-16,n=500*(e-s),o=200*(s-r),[a,n,o]};P.hsl.rgb=function(i){var t=i[0]/360,e=i[1]/100,s=i[2]/100,r,a,n,o,u;if(e===0)return u=s*255,[u,u,u];s<.5?a=s*(1+e):a=s+e-s*e,r=2*s-a,o=[0,0,0];for(var l=0;l<3;l++)n=t+1/3*-(l-1),n<0&&n++,n>1&&n--,6*n<1?u=r+(a-r)*6*n:2*n<1?u=a:3*n<2?u=r+(a-r)*(2/3-n)*6:u=r,o[l]=u*255;return o};P.hsl.hsv=function(i){var t=i[0],e=i[1]/100,s=i[2]/100,r=e,a=Math.max(s,.01),n,o;return s*=2,e*=s<=1?s:2-s,r*=a<=1?a:2-a,o=(s+e)/2,n=s===0?2*r/(a+r):2*e/(s+e),[t,n*100,o*100]};P.hsv.rgb=function(i){var t=i[0]/60,e=i[1]/100,s=i[2]/100,r=Math.floor(t)%6,a=t-Math.floor(t),n=255*s*(1-e),o=255*s*(1-e*a),u=255*s*(1-e*(1-a));switch(s*=255,r){case 0:return[s,u,n];case 1:return[o,s,n];case 2:return[n,s,u];case 3:return[n,o,s];case 4:return[u,n,s];case 5:return[s,n,o]}};P.hsv.hsl=function(i){var t=i[0],e=i[1]/100,s=i[2]/100,r=Math.max(s,.01),a,n,o;return o=(2-e)*s,a=(2-e)*r,n=e*r,n/=a<=1?a:2-a,n=n||0,o/=2,[t,n*100,o*100]};P.hwb.rgb=function(i){var t=i[0]/360,e=i[1]/100,s=i[2]/100,r=e+s,a,n,o,u;r>1&&(e/=r,s/=r),a=Math.floor(6*t),n=1-s,o=6*t-a,a&1&&(o=1-o),u=e+o*(n-e);var l,c,p;switch(a){default:case 6:case 0:l=n,c=u,p=e;break;case 1:l=u,c=n,p=e;break;case 2:l=e,c=n,p=u;break;case 3:l=e,c=u,p=n;break;case 4:l=u,c=e,p=n;break;case 5:l=n,c=e,p=u;break}return[l*255,c*255,p*255]};P.cmyk.rgb=function(i){var t=i[0]/100,e=i[1]/100,s=i[2]/100,r=i[3]/100,a,n,o;return a=1-Math.min(1,t*(1-r)+r),n=1-Math.min(1,e*(1-r)+r),o=1-Math.min(1,s*(1-r)+r),[a*255,n*255,o*255]};P.xyz.rgb=function(i){var t=i[0]/100,e=i[1]/100,s=i[2]/100,r,a,n;return r=t*3.2406+e*-1.5372+s*-.4986,a=t*-.9689+e*1.8758+s*.0415,n=t*.0557+e*-.204+s*1.057,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*12.92,r=Math.min(Math.max(0,r),1),a=Math.min(Math.max(0,a),1),n=Math.min(Math.max(0,n),1),[r*255,a*255,n*255]};P.xyz.lab=function(i){var t=i[0],e=i[1],s=i[2],r,a,n;return t/=95.047,e/=100,s/=108.883,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,r=116*e-16,a=500*(t-e),n=200*(e-s),[r,a,n]};P.lab.xyz=function(i){var t=i[0],e=i[1],s=i[2],r,a,n;a=(t+16)/116,r=e/500+a,n=a-s/200;var o=Math.pow(a,3),u=Math.pow(r,3),l=Math.pow(n,3);return a=o>.008856?o:(a-16/116)/7.787,r=u>.008856?u:(r-16/116)/7.787,n=l>.008856?l:(n-16/116)/7.787,r*=95.047,a*=100,n*=108.883,[r,a,n]};P.lab.lch=function(i){var t=i[0],e=i[1],s=i[2],r,a,n;return r=Math.atan2(s,e),a=r*360/2/Math.PI,a<0&&(a+=360),n=Math.sqrt(e*e+s*s),[t,n,a]};P.lch.lab=function(i){var t=i[0],e=i[1],s=i[2],r,a,n;return n=s/360*2*Math.PI,r=e*Math.cos(n),a=e*Math.sin(n),[t,r,a]};P.rgb.ansi16=function(i){var t=i[0],e=i[1],s=i[2],r=1 in arguments?arguments[1]:P.rgb.hsv(i)[2];if(r=Math.round(r/50),r===0)return 30;var a=30+(Math.round(s/255)<<2|Math.round(e/255)<<1|Math.round(t/255));return r===2&&(a+=60),a};P.hsv.ansi16=function(i){return P.rgb.ansi16(P.hsv.rgb(i),i[2])};P.rgb.ansi256=function(i){var t=i[0],e=i[1],s=i[2];if(t===e&&e===s)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;var r=16+36*Math.round(t/255*5)+6*Math.round(e/255*5)+Math.round(s/255*5);return r};P.ansi16.rgb=function(i){var t=i%10;if(t===0||t===7)return i>50&&(t+=3.5),t=t/10.5*255,[t,t,t];var e=(~~(i>50)+1)*.5,s=(t&1)*e*255,r=(t>>1&1)*e*255,a=(t>>2&1)*e*255;return[s,r,a]};P.ansi256.rgb=function(i){if(i>=232){var t=(i-232)*10+8;return[t,t,t]}i-=16;var e,s=Math.floor(i/36)/5*255,r=Math.floor((e=i%36)/6)/5*255,a=e%6/5*255;return[s,r,a]};P.rgb.hex=function(i){var t=((Math.round(i[0])&255)<<16)+((Math.round(i[1])&255)<<8)+(Math.round(i[2])&255),e=t.toString(16).toUpperCase();return"000000".substring(e.length)+e};P.hex.rgb=function(i){var t=i.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var e=t[0];t[0].length===3&&(e=e.split("").map(function(o){return o+o}).join(""));var s=parseInt(e,16),r=s>>16&255,a=s>>8&255,n=s&255;return[r,a,n]};P.rgb.hcg=function(i){var t=i[0]/255,e=i[1]/255,s=i[2]/255,r=Math.max(Math.max(t,e),s),a=Math.min(Math.min(t,e),s),n=r-a,o,u;return n<1?o=a/(1-n):o=0,n<=0?u=0:r===t?u=(e-s)/n%6:r===e?u=2+(s-t)/n:u=4+(t-e)/n+4,u/=6,u%=1,[u*360,n*100,o*100]};P.hsl.hcg=function(i){var t=i[1]/100,e=i[2]/100,s=1,r=0;return e<.5?s=2*t*e:s=2*t*(1-e),s<1&&(r=(e-.5*s)/(1-s)),[i[0],s*100,r*100]};P.hsv.hcg=function(i){var t=i[1]/100,e=i[2]/100,s=t*e,r=0;return s<1&&(r=(e-s)/(1-s)),[i[0],s*100,r*100]};P.hcg.rgb=function(i){var t=i[0]/360,e=i[1]/100,s=i[2]/100;if(e===0)return[s*255,s*255,s*255];var r=[0,0,0],a=t%1*6,n=a%1,o=1-n,u=0;switch(Math.floor(a)){case 0:r[0]=1,r[1]=n,r[2]=0;break;case 1:r[0]=o,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=n;break;case 3:r[0]=0,r[1]=o,r[2]=1;break;case 4:r[0]=n,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=o}return u=(1-e)*s,[(e*r[0]+u)*255,(e*r[1]+u)*255,(e*r[2]+u)*255]};P.hcg.hsv=function(i){var t=i[1]/100,e=i[2]/100,s=t+e*(1-t),r=0;return s>0&&(r=t/s),[i[0],r*100,s*100]};P.hcg.hsl=function(i){var t=i[1]/100,e=i[2]/100,s=e*(1-t)+.5*t,r=0;return s>0&&s<.5?r=t/(2*s):s>=.5&&s<1&&(r=t/(2*(1-s))),[i[0],r*100,s*100]};P.hcg.hwb=function(i){var t=i[1]/100,e=i[2]/100,s=t+e*(1-t);return[i[0],(s-t)*100,(1-s)*100]};P.hwb.hcg=function(i){var t=i[1]/100,e=i[2]/100,s=1-e,r=s-t,a=0;return r<1&&(a=(s-r)/(1-r)),[i[0],r*100,a*100]};P.apple.rgb=function(i){return[i[0]/65535*255,i[1]/65535*255,i[2]/65535*255]};P.rgb.apple=function(i){return[i[0]/255*65535,i[1]/255*65535,i[2]/255*65535]};P.gray.rgb=function(i){return[i[0]/100*255,i[0]/100*255,i[0]/100*255]};P.gray.hsl=P.gray.hsv=function(i){return[0,0,i[0]]};P.gray.hwb=function(i){return[0,100,i[0]]};P.gray.cmyk=function(i){return[0,0,0,i[0]]};P.gray.lab=function(i){return[i[0],0,0]};P.gray.hex=function(i){var t=Math.round(i[0]/100*255)&255,e=(t<<16)+(t<<8)+t,s=e.toString(16).toUpperCase();return"000000".substring(s.length)+s};P.rgb.gray=function(i){var t=(i[0]+i[1]+i[2])/3;return[t/255*100]}});var Li=A((Hh,Mi)=>{var kt=xs();function ru(){for(var i={},t=Object.keys(kt),e=t.length,s=0;s<e;s++)i[t[s]]={distance:-1,parent:null};return i}function iu(i){var t=ru(),e=[i];for(t[i].distance=0;e.length;)for(var s=e.pop(),r=Object.keys(kt[s]),a=r.length,n=0;n<a;n++){var o=r[n],u=t[o];u.distance===-1&&(u.distance=t[s].distance+1,u.parent=s,e.unshift(o))}return t}function au(i,t){return function(e){return t(i(e))}}function nu(i,t){for(var e=[t[i].parent,i],s=kt[t[i].parent][i],r=t[i].parent;t[r].parent;)e.unshift(t[r].parent),s=au(kt[t[r].parent][r],s),r=t[r].parent;return s.conversion=e,s}Mi.exports=function(i){for(var t=iu(i),e={},s=Object.keys(t),r=s.length,a=0;a<r;a++){var n=s[a],o=t[n];o.parent!==null&&(e[n]=nu(n,t))}return e}});var Bi=A((Kh,Di)=>{var gs=xs(),ou=Li(),Ne={},uu=Object.keys(gs);function lu(i){var t=function(e){return e==null?e:(arguments.length>1&&(e=Array.prototype.slice.call(arguments)),i(e))};return"conversion"in i&&(t.conversion=i.conversion),t}function cu(i){var t=function(e){if(e==null)return e;arguments.length>1&&(e=Array.prototype.slice.call(arguments));var s=i(e);if(typeof s=="object")for(var r=s.length,a=0;a<r;a++)s[a]=Math.round(s[a]);return s};return"conversion"in i&&(t.conversion=i.conversion),t}uu.forEach(function(i){Ne[i]={},Object.defineProperty(Ne[i],"channels",{value:gs[i].channels}),Object.defineProperty(Ne[i],"labels",{value:gs[i].labels});var t=ou(i),e=Object.keys(t);e.forEach(function(s){var r=t[s];Ne[i][s]=cu(r),Ne[i][s].raw=lu(r)})});Di.exports=Ne});var Ri=A((Gh,Fi)=>{"use strict";var _e=Bi(),Nt=(i,t)=>function(){return`\x1B[${i.apply(_e,arguments)+t}m`},_t=(i,t)=>function(){let e=i.apply(_e,arguments);return`\x1B[${38+t};5;${e}m`},Ot=(i,t)=>function(){let e=i.apply(_e,arguments);return`\x1B[${38+t};2;${e[0]};${e[1]};${e[2]}m`};function hu(){let i=new Map,t={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]}};t.color.grey=t.color.gray;for(let r of Object.keys(t)){let a=t[r];for(let n of Object.keys(a)){let o=a[n];t[n]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},a[n]=t[n],i.set(o[0],o[1])}Object.defineProperty(t,r,{value:a,enumerable:!1}),Object.defineProperty(t,"codes",{value:i,enumerable:!1})}let e=r=>r,s=(r,a,n)=>[r,a,n];t.color.close="\x1B[39m",t.bgColor.close="\x1B[49m",t.color.ansi={ansi:Nt(e,0)},t.color.ansi256={ansi256:_t(e,0)},t.color.ansi16m={rgb:Ot(s,0)},t.bgColor.ansi={ansi:Nt(e,10)},t.bgColor.ansi256={ansi256:_t(e,10)},t.bgColor.ansi16m={rgb:Ot(s,10)};for(let r of Object.keys(_e)){if(typeof _e[r]!="object")continue;let a=_e[r];r==="ansi16"&&(r="ansi"),"ansi16"in a&&(t.color.ansi[r]=Nt(a.ansi16,0),t.bgColor.ansi[r]=Nt(a.ansi16,10)),"ansi256"in a&&(t.color.ansi256[r]=_t(a.ansi256,0),t.bgColor.ansi256[r]=_t(a.ansi256,10)),"rgb"in a&&(t.color.ansi16m[r]=Ot(a.rgb,0),t.bgColor.ansi16m[r]=Ot(a.rgb,10))}return t}Object.defineProperty(Fi,"exports",{enumerable:!0,get:hu})});var Ui=A((Xh,ji)=>{"use strict";ji.exports=(i,t)=>{t=t||process.argv;let e=i.startsWith("-")?"":i.length===1?"-":"--",s=t.indexOf(e+i),r=t.indexOf("--");return s!==-1&&(r===-1?!0:s<r)}});var qi=A((Jh,$i)=>{"use strict";var pu=require("os"),G=Ui(),R=process.env,Oe;G("no-color")||G("no-colors")||G("color=false")?Oe=!1:(G("color")||G("colors")||G("color=true")||G("color=always"))&&(Oe=!0);"FORCE_COLOR"in R&&(Oe=R.FORCE_COLOR.length===0||parseInt(R.FORCE_COLOR,10)!==0);function fu(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function du(i){if(Oe===!1)return 0;if(G("color=16m")||G("color=full")||G("color=truecolor"))return 3;if(G("color=256"))return 2;if(i&&!i.isTTY&&Oe!==!0)return 0;let t=Oe?1:0;if(process.platform==="win32"){let e=pu.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in R)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(e=>e in R)||R.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in R)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(R.TEAMCITY_VERSION)?1:0;if(R.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in R){let e=parseInt((R.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(R.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(R.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(R.TERM)||"COLORTERM"in R?1:(R.TERM==="dumb",t)}function bs(i){let t=du(i);return fu(t)}$i.exports={supportsColor:bs,stdout:bs(process.stdout),stderr:bs(process.stderr)}});var Ki=A((Yh,Hi)=>{"use strict";var mu=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Wi=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,yu=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,xu=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,gu=new Map([["n",`
6
- `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function zi(i){return i[0]==="u"&&i.length===5||i[0]==="x"&&i.length===3?String.fromCharCode(parseInt(i.slice(1),16)):gu.get(i)||i}function bu(i,t){let e=[],s=t.trim().split(/\s*,\s*/g),r;for(let a of s)if(!isNaN(a))e.push(Number(a));else if(r=a.match(yu))e.push(r[2].replace(xu,(n,o,u)=>o?zi(o):u));else throw new Error(`Invalid Chalk template style argument: ${a} (in style '${i}')`);return e}function Pu(i){Wi.lastIndex=0;let t=[],e;for(;(e=Wi.exec(i))!==null;){let s=e[1];if(e[2]){let r=bu(s,e[2]);t.push([s].concat(r))}else t.push([s])}return t}function Vi(i,t){let e={};for(let r of t)for(let a of r.styles)e[a[0]]=r.inverse?null:a.slice(1);let s=i;for(let r of Object.keys(e))if(Array.isArray(e[r])){if(!(r in s))throw new Error(`Unknown Chalk style: ${r}`);e[r].length>0?s=s[r].apply(s,e[r]):s=s[r]}return s}Hi.exports=(i,t)=>{let e=[],s=[],r=[];if(t.replace(mu,(a,n,o,u,l,c)=>{if(n)r.push(zi(n));else if(u){let p=r.join("");r=[],s.push(e.length===0?p:Vi(i,e)(p)),e.push({inverse:o,styles:Pu(u)})}else if(l){if(e.length===0)throw new Error("Found extraneous } in Chalk template literal");s.push(Vi(i,e)(r.join(""))),r=[],e.pop()}else r.push(c)}),s.push(r.join("")),e.length>0){let a=`Chalk template literal is missing ${e.length} closing bracket${e.length===1?"":"s"} (\`}\`)`;throw new Error(a)}return s.join("")}});var Qi=A((Qh,Je)=>{"use strict";var vs=Ei(),L=Ri(),Ps=qi().stdout,vu=Ki(),Xi=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),Ji=["ansi","ansi","ansi256","ansi16m"],Yi=new Set(["gray"]),Me=Object.create(null);function Gi(i,t){t=t||{};let e=Ps?Ps.level:0;i.level=t.level===void 0?e:t.level,i.enabled="enabled"in t?t.enabled:i.level>0}function Xe(i){if(!this||!(this instanceof Xe)||this.template){let t={};return Gi(t,i),t.template=function(){let e=[].slice.call(arguments);return Su.apply(null,[t.template].concat(e))},Object.setPrototypeOf(t,Xe.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=Xe,t.template}Gi(this,i)}Xi&&(L.blue.open="\x1B[94m");for(let i of Object.keys(L))L[i].closeRe=new RegExp(vs(L[i].close),"g"),Me[i]={get(){let t=L[i];return Mt.call(this,this._styles?this._styles.concat(t):[t],this._empty,i)}};Me.visible={get(){return Mt.call(this,this._styles||[],!0,"visible")}};L.color.closeRe=new RegExp(vs(L.color.close),"g");for(let i of Object.keys(L.color.ansi))Yi.has(i)||(Me[i]={get(){let t=this.level;return function(){let s={open:L.color[Ji[t]][i].apply(null,arguments),close:L.color.close,closeRe:L.color.closeRe};return Mt.call(this,this._styles?this._styles.concat(s):[s],this._empty,i)}}});L.bgColor.closeRe=new RegExp(vs(L.bgColor.close),"g");for(let i of Object.keys(L.bgColor.ansi)){if(Yi.has(i))continue;let t="bg"+i[0].toUpperCase()+i.slice(1);Me[t]={get(){let e=this.level;return function(){let r={open:L.bgColor[Ji[e]][i].apply(null,arguments),close:L.bgColor.close,closeRe:L.bgColor.closeRe};return Mt.call(this,this._styles?this._styles.concat(r):[r],this._empty,i)}}}}var wu=Object.defineProperties(()=>{},Me);function Mt(i,t,e){let s=function(){return Tu.apply(s,arguments)};s._styles=i,s._empty=t;let r=this;return Object.defineProperty(s,"level",{enumerable:!0,get(){return r.level},set(a){r.level=a}}),Object.defineProperty(s,"enabled",{enumerable:!0,get(){return r.enabled},set(a){r.enabled=a}}),s.hasGrey=this.hasGrey||e==="gray"||e==="grey",s.__proto__=wu,s}function Tu(){let i=arguments,t=i.length,e=String(arguments[0]);if(t===0)return"";if(t>1)for(let r=1;r<t;r++)e+=" "+i[r];if(!this.enabled||this.level<=0||!e)return this._empty?"":e;let s=L.dim.open;Xi&&this.hasGrey&&(L.dim.open="");for(let r of this._styles.slice().reverse())e=r.open+e.replace(r.closeRe,r.open)+r.close,e=e.replace(/\r?\n/g,`${r.close}$&${r.open}`);return L.dim.open=s,e}function Su(i,t){if(!Array.isArray(t))return[].slice.call(arguments,1).join(" ");let e=[].slice.call(arguments,2),s=[t.raw[0]];for(let r=1;r<t.length;r++)s.push(String(e[r-1]).replace(/[{}\\]/g,"\\$&")),s.push(String(t.raw[r]));return vu(i,s.join(""))}Object.defineProperties(Xe.prototype,Me);Je.exports=Xe();Je.exports.supportsColor=Ps;Je.exports.default=Je.exports});var aa=A(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.codeFrameColumns=ia;Lt.default=ku;var Zi=Si(),ea=Au(Qi(),!0);function ra(i){if(typeof WeakMap!="function")return null;var t=new WeakMap,e=new WeakMap;return(ra=function(s){return s?e:t})(i)}function Au(i,t){if(!t&&i&&i.__esModule)return i;if(i===null||typeof i!="object"&&typeof i!="function")return{default:i};var e=ra(t);if(e&&e.has(i))return e.get(i);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in i)if(a!=="default"&&Object.prototype.hasOwnProperty.call(i,a)){var n=r?Object.getOwnPropertyDescriptor(i,a):null;n&&(n.get||n.set)?Object.defineProperty(s,a,n):s[a]=i[a]}return s.default=i,e&&e.set(i,s),s}var ws;function Eu(i){if(i){var t;return(t=ws)!=null||(ws=new ea.default.constructor({enabled:!0,level:1})),ws}return ea.default}var ta=!1;function Cu(i){return{gutter:i.grey,marker:i.red.bold,message:i.red.bold}}var sa=/\r\n|[\n\r\u2028\u2029]/;function Iu(i,t,e){let s=Object.assign({column:0,line:-1},i.start),r=Object.assign({},s,i.end),{linesAbove:a=2,linesBelow:n=3}=e||{},o=s.line,u=s.column,l=r.line,c=r.column,p=Math.max(o-(a+1),0),f=Math.min(t.length,l+n);o===-1&&(p=0),l===-1&&(f=t.length);let m=l-o,d={};if(m)for(let y=0;y<=m;y++){let v=y+o;if(!u)d[v]=!0;else if(y===0){let S=t[v-1].length;d[v]=[u,S-u+1]}else if(y===m)d[v]=[0,c];else{let S=t[v-y].length;d[v]=[0,S]}}else u===c?u?d[o]=[u,0]:d[o]=!0:d[o]=[u,c-u];return{start:p,end:f,markerLines:d}}function ia(i,t,e={}){let s=(e.highlightCode||e.forceColor)&&(0,Zi.shouldHighlight)(e),r=Eu(e.forceColor),a=Cu(r),n=(y,v)=>s?y(v):v,o=i.split(sa),{start:u,end:l,markerLines:c}=Iu(t,o,e),p=t.start&&typeof t.start.column=="number",f=String(l).length,d=(s?(0,Zi.default)(i,e):i).split(sa,l).slice(u,l).map((y,v)=>{let S=u+1+v,U=` ${` ${S}`.slice(-f)} |`,B=c[S],gt=!c[S+1];if(B){let xe="";if(Array.isArray(B)){let bt=y.slice(0,Math.max(B[0]-1,0)).replace(/[^\t]/g," "),We=B[1]||1;xe=[`
7
- `,n(a.gutter,U.replace(/\d/g," "))," ",bt,n(a.marker,"^").repeat(We)].join(""),gt&&e.message&&(xe+=" "+n(a.message,e.message))}return[n(a.marker,">"),n(a.gutter,U),y.length>0?` ${y}`:"",xe].join("")}else return` ${n(a.gutter,U)}${y.length>0?` ${y}`:""}`}).join(`
8
- `);return e.message&&!p&&(d=`${" ".repeat(f+1)}${e.message}
9
- ${d}`),s?r.reset(d):d}function ku(i,t,e,s={}){if(!ta){ta=!0;let a="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning)process.emitWarning(a,"DeprecationWarning");else{let n=new Error(a);n.name="DeprecationWarning",console.warn(new Error(a))}}return e=Math.max(e,0),ia(i,{start:{column:e,line:t}},s)}});var Ra=A(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});function $t(i,t){if(i==null)return{};var e={},s=Object.keys(i),r,a;for(a=0;a<s.length;a++)r=s[a],!(t.indexOf(r)>=0)&&(e[r]=i[r]);return e}var Z=class{constructor(t,e,s){this.line=void 0,this.column=void 0,this.index=void 0,this.line=t,this.column=e,this.index=s}},Fe=class{constructor(t,e){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=e}};function V(i,t){let{line:e,column:s,index:r}=i;return new Z(e,s+t,r+t)}var na="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",Nu={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:na},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:na}},oa={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},Ft=({type:i,prefix:t})=>i==="UpdateExpression"?oa.UpdateExpression[String(t)]:oa[i],_u={AccessorIsGenerator:({kind:i})=>`A ${i}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:i})=>`Missing initializer in ${i} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:i})=>`\`${i}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:i})=>`'import.${i}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:i,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`.
10
- - Did you mean \`export { '${i}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:i})=>`'${i==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:i})=>`Unsyntactic ${i==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.",ImportBindingIsString:({importName:i})=>`A string literal cannot be used as an imported binding.
11
- - Did you mean \`import { "${i}" as foo }\`?`,ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:({maxArgumentCount:i})=>`\`import()\` requires exactly ${i===1?"one argument":"one or two arguments"}.`,ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:i})=>`Expected number in radix ${i}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:i})=>`Escape sequence in keyword ${i}.`,InvalidIdentifier:({identifierName:i})=>`Invalid identifier ${i}.`,InvalidLhs:({ancestor:i})=>`Invalid left-hand side in ${Ft(i)}.`,InvalidLhsBinding:({ancestor:i})=>`Binding invalid left-hand side in ${Ft(i)}.`,InvalidLhsOptionalChaining:({ancestor:i})=>`Invalid optional chaining in the left-hand side of ${Ft(i)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:i})=>`Unexpected character '${i}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:i})=>`Private name #${i} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:i})=>`Label '${i}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:i})=>`This experimental syntax requires enabling the parser plugin: ${i.map(t=>JSON.stringify(t)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:i})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${i.map(t=>JSON.stringify(t)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:i})=>`Duplicate key "${i}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:i})=>`An export name cannot include a lone surrogate, found '\\u${i.toString(16)}'.`,ModuleExportUndefined:({localName:i})=>`Export '${i}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:i})=>`Private names are only allowed in property accesses (\`obj.#${i}\`) or in \`in\` expressions (\`#${i} in obj\`).`,PrivateNameRedeclaration:({identifierName:i})=>`Duplicate private name #${i}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:i})=>`Unexpected keyword '${i}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:i})=>`Unexpected reserved word '${i}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:i,unexpected:t})=>`Unexpected token${t?` '${t}'.`:""}${i?`, expected "${i}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:i,onlyValidPropertyName:t})=>`The only valid meta property for ${i} is ${i}.${t}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:i})=>`Identifier '${i}' has already been declared.`,YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},Ou={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:i})=>`Assigning to '${i}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:i})=>`Binding '${i}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},Mu=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),Lu={PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:i})=>`Invalid topic token ${i}. In order to use ${i} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${i}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:i})=>`Hack-style pipe body cannot be an unparenthesized ${Ft({type:i})}; please wrap it in parentheses.`,PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'},Du=["toMessage"],Bu=["message"];function ua(i,t,e){Object.defineProperty(i,t,{enumerable:!1,configurable:!0,value:e})}function Fu(i){let{toMessage:t}=i,e=$t(i,Du);return function s({loc:r,details:a}){let n=new SyntaxError;return Object.assign(n,e,{loc:r,pos:r.index}),"missingPlugin"in a&&Object.assign(n,{missingPlugin:a.missingPlugin}),ua(n,"clone",function(u={}){var l;let{line:c,column:p,index:f}=(l=u.loc)!=null?l:r;return s({loc:new Z(c,p,f),details:Object.assign({},a,u.details)})}),ua(n,"details",a),Object.defineProperty(n,"message",{configurable:!0,get(){let o=`${t(a)} (${r.line}:${r.column})`;return this.message=o,o},set(o){Object.defineProperty(this,"message",{value:o,writable:!0})}}),n}}function ae(i,t){if(Array.isArray(i))return s=>ae(s,i[0]);let e={};for(let s of Object.keys(i)){let r=i[s],a=typeof r=="string"?{message:()=>r}:typeof r=="function"?{message:r}:r,{message:n}=a,o=$t(a,Bu),u=typeof n=="string"?()=>n:n;e[s]=Fu(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:s,toMessage:u},t?{syntaxPlugin:t}:{},o))}return e}var h=Object.assign({},ae(Nu),ae(_u),ae(Ou),ae`pipelineOperator`(Lu)),{defineProperty:Ru}=Object,la=(i,t)=>Ru(i,t,{enumerable:!1,value:i[t]});function Ye(i){return i.loc.start&&la(i.loc.start,"index"),i.loc.end&&la(i.loc.end,"index"),i}var ju=i=>class extends i{parse(){let e=Ye(super.parse());return this.options.tokens&&(e.tokens=e.tokens.map(Ye)),e}parseRegExpLiteral({pattern:e,flags:s}){let r=null;try{r=new RegExp(e,s)}catch{}let a=this.estreeParseLiteral(r);return a.regex={pattern:e,flags:s},a}parseBigIntLiteral(e){let s;try{s=BigInt(e)}catch{s=null}let r=this.estreeParseLiteral(s);return r.bigint=String(r.value||e),r}parseDecimalLiteral(e){let r=this.estreeParseLiteral(null);return r.decimal=String(r.value||e),r}estreeParseLiteral(e){return this.parseLiteral(e,"Literal")}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}directiveToStmt(e){let s=e.value;delete e.value,s.type="Literal",s.raw=s.extra.raw,s.value=s.extra.expressionValue;let r=e;return r.type="ExpressionStatement",r.expression=s,r.directive=s.extra.rawValue,delete s.extra,r}initFunction(e,s){super.initFunction(e,s),e.expression=!1}checkDeclaration(e){e!=null&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var s;return e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&!((s=e.expression.extra)!=null&&s.parenthesized)}parseBlockBody(e,s,r,a,n){super.parseBlockBody(e,s,r,a,n);let o=e.directives.map(u=>this.directiveToStmt(u));e.body=o.concat(e.body),delete e.directives}pushClassMethod(e,s,r,a,n,o){this.parseMethod(s,r,a,n,o,"ClassMethod",!0),s.typeParameters&&(s.value.typeParameters=s.typeParameters,delete s.typeParameters),e.body.push(s)}parsePrivateName(){let e=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){let s=super.getPrivateNameSV(e);return e=e,delete e.id,e.name=s,e.type="PrivateIdentifier",e}isPrivateName(e){return this.getPluginOption("estree","classFeatures")?e.type==="PrivateIdentifier":super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption("estree","classFeatures")?e.name:super.getPrivateNameSV(e)}parseLiteral(e,s){let r=super.parseLiteral(e,s);return r.raw=r.extra.raw,delete r.extra,r}parseFunctionBody(e,s,r=!1){super.parseFunctionBody(e,s,r),e.expression=e.body.type!=="BlockStatement"}parseMethod(e,s,r,a,n,o,u=!1){let l=this.startNode();return l.kind=e.kind,l=super.parseMethod(l,s,r,a,n,o,u),l.type="FunctionExpression",delete l.kind,e.value=l,o==="ClassPrivateMethod"&&(e.computed=!1),this.finishNode(e,"MethodDefinition")}parseClassProperty(...e){let s=super.parseClassProperty(...e);return this.getPluginOption("estree","classFeatures")&&(s.type="PropertyDefinition"),s}parseClassPrivateProperty(...e){let s=super.parseClassPrivateProperty(...e);return this.getPluginOption("estree","classFeatures")&&(s.type="PropertyDefinition",s.computed=!1),s}parseObjectMethod(e,s,r,a,n){let o=super.parseObjectMethod(e,s,r,a,n);return o&&(o.type="Property",o.kind==="method"&&(o.kind="init"),o.shorthand=!1),o}parseObjectProperty(e,s,r,a){let n=super.parseObjectProperty(e,s,r,a);return n&&(n.kind="init",n.type="Property"),n}isValidLVal(e,s,r){return e==="Property"?"value":super.isValidLVal(e,s,r)}isAssignable(e,s){return e!=null&&this.isObjectProperty(e)?this.isAssignable(e.value,s):super.isAssignable(e,s)}toAssignable(e,s=!1){if(e!=null&&this.isObjectProperty(e)){let{key:r,value:a}=e;this.isPrivateName(r)&&this.classScope.usePrivateName(this.getPrivateNameSV(r),r.loc.start),this.toAssignable(a,s)}else super.toAssignable(e,s)}toAssignableObjectExpressionProp(e,s,r){e.kind==="get"||e.kind==="set"?this.raise(h.PatternHasAccessor,{at:e.key}):e.method?this.raise(h.PatternHasMethod,{at:e.key}):super.toAssignableObjectExpressionProp(e,s,r)}finishCallExpression(e,s){let r=super.finishCallExpression(e,s);if(r.callee.type==="Import"){if(r.type="ImportExpression",r.source=r.arguments[0],this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")){var a,n;r.options=(a=r.arguments[1])!=null?a:null,r.attributes=(n=r.arguments[1])!=null?n:null}delete r.arguments,delete r.callee}return r}toReferencedArguments(e){e.type!=="ImportExpression"&&super.toReferencedArguments(e)}parseExport(e,s){let r=this.state.lastTokStartLoc,a=super.parseExport(e,s);switch(a.type){case"ExportAllDeclaration":a.exported=null;break;case"ExportNamedDeclaration":a.specifiers.length===1&&a.specifiers[0].type==="ExportNamespaceSpecifier"&&(a.type="ExportAllDeclaration",a.exported=a.specifiers[0].exported,delete a.specifiers);case"ExportDefaultDeclaration":{var n;let{declaration:o}=a;(o==null?void 0:o.type)==="ClassDeclaration"&&((n=o.decorators)==null?void 0:n.length)>0&&o.start===a.start&&this.resetStartLocation(a,r)}break}return a}parseSubscript(e,s,r,a){let n=super.parseSubscript(e,s,r,a);if(a.optionalChainMember){if((n.type==="OptionalMemberExpression"||n.type==="OptionalCallExpression")&&(n.type=n.type.substring(8)),a.stop){let o=this.startNodeAtNode(n);return o.expression=n,this.finishNode(o,"ChainExpression")}}else(n.type==="MemberExpression"||n.type==="CallExpression")&&(n.optional=!1);return n}isOptionalMemberExpression(e){return e.type==="ChainExpression"?e.expression.type==="MemberExpression":super.isOptionalMemberExpression(e)}hasPropertyAsPrivateName(e){return e.type==="ChainExpression"&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return e.type==="Property"&&e.kind==="init"&&!e.method}isObjectMethod(e){return e.method||e.kind==="get"||e.kind==="set"}finishNodeAt(e,s,r){return Ye(super.finishNodeAt(e,s,r))}resetStartLocation(e,s){super.resetStartLocation(e,s),Ye(e)}resetEndLocation(e,s=this.state.lastTokEndLoc){super.resetEndLocation(e,s),Ye(e)}},we=class{constructor(t,e){this.token=void 0,this.preserveSpace=void 0,this.token=t,this.preserveSpace=!!e}},N={brace:new we("{"),j_oTag:new we("<tag"),j_cTag:new we("</tag"),j_expr:new we("<tag>...</tag>",!0)};N.template=new we("`",!0);var C=!0,x=!0,Ts=!0,Qe=!0,ce=!0,Uu=!0,qt=class{constructor(t,e={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.rightAssociative=!!e.rightAssociative,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop!=null?e.binop:null,this.updateContext=null}},Gs=new Map;function I(i,t={}){t.keyword=i;let e=w(i,t);return Gs.set(i,e),e}function W(i,t){return w(i,{beforeExpr:C,binop:t})}var st=-1,re=[],Xs=[],Js=[],Ys=[],Qs=[],Zs=[];function w(i,t={}){var e,s,r,a;return++st,Xs.push(i),Js.push((e=t.binop)!=null?e:-1),Ys.push((s=t.beforeExpr)!=null?s:!1),Qs.push((r=t.startsExpr)!=null?r:!1),Zs.push((a=t.prefix)!=null?a:!1),re.push(new qt(i,t)),st}function E(i,t={}){var e,s,r,a;return++st,Gs.set(i,st),Xs.push(i),Js.push((e=t.binop)!=null?e:-1),Ys.push((s=t.beforeExpr)!=null?s:!1),Qs.push((r=t.startsExpr)!=null?r:!1),Zs.push((a=t.prefix)!=null?a:!1),re.push(new qt("name",t)),st}var $u={bracketL:w("[",{beforeExpr:C,startsExpr:x}),bracketHashL:w("#[",{beforeExpr:C,startsExpr:x}),bracketBarL:w("[|",{beforeExpr:C,startsExpr:x}),bracketR:w("]"),bracketBarR:w("|]"),braceL:w("{",{beforeExpr:C,startsExpr:x}),braceBarL:w("{|",{beforeExpr:C,startsExpr:x}),braceHashL:w("#{",{beforeExpr:C,startsExpr:x}),braceR:w("}"),braceBarR:w("|}"),parenL:w("(",{beforeExpr:C,startsExpr:x}),parenR:w(")"),comma:w(",",{beforeExpr:C}),semi:w(";",{beforeExpr:C}),colon:w(":",{beforeExpr:C}),doubleColon:w("::",{beforeExpr:C}),dot:w("."),question:w("?",{beforeExpr:C}),questionDot:w("?."),arrow:w("=>",{beforeExpr:C}),template:w("template"),ellipsis:w("...",{beforeExpr:C}),backQuote:w("`",{startsExpr:x}),dollarBraceL:w("${",{beforeExpr:C,startsExpr:x}),templateTail:w("...`",{startsExpr:x}),templateNonTail:w("...${",{beforeExpr:C,startsExpr:x}),at:w("@"),hash:w("#",{startsExpr:x}),interpreterDirective:w("#!..."),eq:w("=",{beforeExpr:C,isAssign:Qe}),assign:w("_=",{beforeExpr:C,isAssign:Qe}),slashAssign:w("_=",{beforeExpr:C,isAssign:Qe}),xorAssign:w("_=",{beforeExpr:C,isAssign:Qe}),moduloAssign:w("_=",{beforeExpr:C,isAssign:Qe}),incDec:w("++/--",{prefix:ce,postfix:Uu,startsExpr:x}),bang:w("!",{beforeExpr:C,prefix:ce,startsExpr:x}),tilde:w("~",{beforeExpr:C,prefix:ce,startsExpr:x}),doubleCaret:w("^^",{startsExpr:x}),doubleAt:w("@@",{startsExpr:x}),pipeline:W("|>",0),nullishCoalescing:W("??",1),logicalOR:W("||",1),logicalAND:W("&&",2),bitwiseOR:W("|",3),bitwiseXOR:W("^",4),bitwiseAND:W("&",5),equality:W("==/!=/===/!==",6),lt:W("</>/<=/>=",7),gt:W("</>/<=/>=",7),relational:W("</>/<=/>=",7),bitShift:W("<</>>/>>>",8),bitShiftL:W("<</>>/>>>",8),bitShiftR:W("<</>>/>>>",8),plusMin:w("+/-",{beforeExpr:C,binop:9,prefix:ce,startsExpr:x}),modulo:w("%",{binop:10,startsExpr:x}),star:w("*",{binop:10}),slash:W("/",10),exponent:w("**",{beforeExpr:C,binop:11,rightAssociative:!0}),_in:I("in",{beforeExpr:C,binop:7}),_instanceof:I("instanceof",{beforeExpr:C,binop:7}),_break:I("break"),_case:I("case",{beforeExpr:C}),_catch:I("catch"),_continue:I("continue"),_debugger:I("debugger"),_default:I("default",{beforeExpr:C}),_else:I("else",{beforeExpr:C}),_finally:I("finally"),_function:I("function",{startsExpr:x}),_if:I("if"),_return:I("return",{beforeExpr:C}),_switch:I("switch"),_throw:I("throw",{beforeExpr:C,prefix:ce,startsExpr:x}),_try:I("try"),_var:I("var"),_const:I("const"),_with:I("with"),_new:I("new",{beforeExpr:C,startsExpr:x}),_this:I("this",{startsExpr:x}),_super:I("super",{startsExpr:x}),_class:I("class",{startsExpr:x}),_extends:I("extends",{beforeExpr:C}),_export:I("export"),_import:I("import",{startsExpr:x}),_null:I("null",{startsExpr:x}),_true:I("true",{startsExpr:x}),_false:I("false",{startsExpr:x}),_typeof:I("typeof",{beforeExpr:C,prefix:ce,startsExpr:x}),_void:I("void",{beforeExpr:C,prefix:ce,startsExpr:x}),_delete:I("delete",{beforeExpr:C,prefix:ce,startsExpr:x}),_do:I("do",{isLoop:Ts,beforeExpr:C}),_for:I("for",{isLoop:Ts}),_while:I("while",{isLoop:Ts}),_as:E("as",{startsExpr:x}),_assert:E("assert",{startsExpr:x}),_async:E("async",{startsExpr:x}),_await:E("await",{startsExpr:x}),_defer:E("defer",{startsExpr:x}),_from:E("from",{startsExpr:x}),_get:E("get",{startsExpr:x}),_let:E("let",{startsExpr:x}),_meta:E("meta",{startsExpr:x}),_of:E("of",{startsExpr:x}),_sent:E("sent",{startsExpr:x}),_set:E("set",{startsExpr:x}),_source:E("source",{startsExpr:x}),_static:E("static",{startsExpr:x}),_using:E("using",{startsExpr:x}),_yield:E("yield",{startsExpr:x}),_asserts:E("asserts",{startsExpr:x}),_checks:E("checks",{startsExpr:x}),_exports:E("exports",{startsExpr:x}),_global:E("global",{startsExpr:x}),_implements:E("implements",{startsExpr:x}),_intrinsic:E("intrinsic",{startsExpr:x}),_infer:E("infer",{startsExpr:x}),_is:E("is",{startsExpr:x}),_mixins:E("mixins",{startsExpr:x}),_proto:E("proto",{startsExpr:x}),_require:E("require",{startsExpr:x}),_satisfies:E("satisfies",{startsExpr:x}),_keyof:E("keyof",{startsExpr:x}),_readonly:E("readonly",{startsExpr:x}),_unique:E("unique",{startsExpr:x}),_abstract:E("abstract",{startsExpr:x}),_declare:E("declare",{startsExpr:x}),_enum:E("enum",{startsExpr:x}),_module:E("module",{startsExpr:x}),_namespace:E("namespace",{startsExpr:x}),_interface:E("interface",{startsExpr:x}),_type:E("type",{startsExpr:x}),_opaque:E("opaque",{startsExpr:x}),name:w("name",{startsExpr:x}),string:w("string",{startsExpr:x}),num:w("num",{startsExpr:x}),bigint:w("bigint",{startsExpr:x}),decimal:w("decimal",{startsExpr:x}),regexp:w("regexp",{startsExpr:x}),privateName:w("#name",{startsExpr:x}),eof:w("eof"),jsxName:w("jsxName"),jsxText:w("jsxText",{beforeExpr:!0}),jsxTagStart:w("jsxTagStart",{startsExpr:!0}),jsxTagEnd:w("jsxTagEnd"),placeholder:w("%%",{startsExpr:!0})};function k(i){return i>=93&&i<=132}function qu(i){return i<=92}function X(i){return i>=58&&i<=132}function wa(i){return i>=58&&i<=136}function Wu(i){return Ys[i]}function Is(i){return Qs[i]}function Vu(i){return i>=29&&i<=33}function ca(i){return i>=129&&i<=131}function zu(i){return i>=90&&i<=92}function er(i){return i>=58&&i<=92}function Hu(i){return i>=39&&i<=59}function Ku(i){return i===34}function Gu(i){return Zs[i]}function Xu(i){return i>=121&&i<=123}function Ju(i){return i>=124&&i<=130}function fe(i){return Xs[i]}function Rt(i){return Js[i]}function Yu(i){return i===57}function Wt(i){return i>=24&&i<=25}function se(i){return re[i]}re[8].updateContext=i=>{i.pop()},re[5].updateContext=re[7].updateContext=re[23].updateContext=i=>{i.push(N.brace)},re[22].updateContext=i=>{i[i.length-1]===N.template?i.pop():i.push(N.template)},re[142].updateContext=i=>{i.push(N.j_expr,N.j_oTag)};var tr="\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",Ta="\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",Qu=new RegExp("["+tr+"]"),Zu=new RegExp("["+tr+Ta+"]");tr=Ta=null;var Sa=[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],el=[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 ks(i,t){let e=65536;for(let s=0,r=t.length;s<r;s+=2){if(e+=t[s],e>i)return!1;if(e+=t[s+1],e>=i)return!0}return!1}function ie(i){return i<65?i===36:i<=90?!0:i<97?i===95:i<=122?!0:i<=65535?i>=170&&Qu.test(String.fromCharCode(i)):ks(i,Sa)}function De(i){return i<48?i===36:i<58?!0:i<65?!1:i<=90?!0:i<97?i===95:i<=122?!0:i<=65535?i>=170&&Zu.test(String.fromCharCode(i)):ks(i,Sa)||ks(i,el)}var sr={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"]},tl=new Set(sr.keyword),sl=new Set(sr.strict),rl=new Set(sr.strictBind);function Aa(i,t){return t&&i==="await"||i==="enum"}function Ea(i,t){return Aa(i,t)||sl.has(i)}function Ca(i){return rl.has(i)}function Ia(i,t){return Ea(i,t)||Ca(i)}function il(i){return tl.has(i)}function al(i,t,e){return i===64&&t===64&&ie(e)}var nl=new Set(["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","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function ol(i){return nl.has(i)}var it=class{constructor(t){this.var=new Set,this.lexical=new Set,this.functions=new Set,this.flags=t}},at=class{constructor(t,e){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=t,this.inModule=e}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let t=this.currentThisScopeFlags();return(t&64)>0&&(t&2)===0}get inStaticBlock(){for(let t=this.scopeStack.length-1;;t--){let{flags:e}=this.scopeStack[t];if(e&128)return!0;if(e&451)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(t){return new it(t)}enter(t){this.scopeStack.push(this.createScope(t))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(t){return!!(t.flags&130||!this.parser.inModule&&t.flags&1)}declareName(t,e,s){let r=this.currentScope();if(e&8||e&16)this.checkRedeclarationInScope(r,t,e,s),e&16?r.functions.add(t):r.lexical.add(t),e&8&&this.maybeExportDefined(r,t);else if(e&4)for(let a=this.scopeStack.length-1;a>=0&&(r=this.scopeStack[a],this.checkRedeclarationInScope(r,t,e,s),r.var.add(t),this.maybeExportDefined(r,t),!(r.flags&387));--a);this.parser.inModule&&r.flags&1&&this.undefinedExports.delete(t)}maybeExportDefined(t,e){this.parser.inModule&&t.flags&1&&this.undefinedExports.delete(e)}checkRedeclarationInScope(t,e,s,r){this.isRedeclaredInScope(t,e,s)&&this.parser.raise(h.VarRedeclaration,{at:r,identifierName:e})}isRedeclaredInScope(t,e,s){return s&1?s&8?t.lexical.has(e)||t.functions.has(e)||t.var.has(e):s&16?t.lexical.has(e)||!this.treatFunctionsAsVarInScope(t)&&t.var.has(e):t.lexical.has(e)&&!(t.flags&8&&t.lexical.values().next().value===e)||!this.treatFunctionsAsVarInScope(t)&&t.functions.has(e):!1}checkLocalExport(t){let{name:e}=t,s=this.scopeStack[0];!s.lexical.has(e)&&!s.var.has(e)&&!s.functions.has(e)&&this.undefinedExports.set(e,t.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let t=this.scopeStack.length-1;;t--){let{flags:e}=this.scopeStack[t];if(e&387)return e}}currentThisScopeFlags(){for(let t=this.scopeStack.length-1;;t--){let{flags:e}=this.scopeStack[t];if(e&451&&!(e&4))return e}}},Ns=class extends it{constructor(...t){super(...t),this.declareFunctions=new Set}},_s=class extends at{createScope(t){return new Ns(t)}declareName(t,e,s){let r=this.currentScope();if(e&2048){this.checkRedeclarationInScope(r,t,e,s),this.maybeExportDefined(r,t),r.declareFunctions.add(t);return}super.declareName(t,e,s)}isRedeclaredInScope(t,e,s){return super.isRedeclaredInScope(t,e,s)?!0:s&2048?!t.declareFunctions.has(e)&&(t.lexical.has(e)||t.functions.has(e)):!1}checkLocalExport(t){this.scopeStack[0].declareFunctions.has(t.name)||super.checkLocalExport(t)}},Os=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(t){if(typeof t=="string")return this.plugins.has(t);{let[e,s]=t;if(!this.hasPlugin(e))return!1;let r=this.plugins.get(e);for(let a of Object.keys(s))if((r==null?void 0:r[a])!==s[a])return!1;return!0}}getPluginOption(t,e){var s;return(s=this.plugins.get(t))==null?void 0:s[e]}};function ka(i,t){i.trailingComments===void 0?i.trailingComments=t:i.trailingComments.unshift(...t)}function ul(i,t){i.leadingComments===void 0?i.leadingComments=t:i.leadingComments.unshift(...t)}function nt(i,t){i.innerComments===void 0?i.innerComments=t:i.innerComments.unshift(...t)}function Ze(i,t,e){let s=null,r=t.length;for(;s===null&&r>0;)s=t[--r];s===null||s.start>e.start?nt(i,e.comments):ka(s,e.comments)}var Ms=class extends Os{addComment(t){this.filename&&(t.loc.filename=this.filename),this.state.comments.push(t)}processComment(t){let{commentStack:e}=this.state,s=e.length;if(s===0)return;let r=s-1,a=e[r];a.start===t.end&&(a.leadingNode=t,r--);let{start:n}=t;for(;r>=0;r--){let o=e[r],u=o.end;if(u>n)o.containingNode=t,this.finalizeComment(o),e.splice(r,1);else{u===n&&(o.trailingNode=t);break}}}finalizeComment(t){let{comments:e}=t;if(t.leadingNode!==null||t.trailingNode!==null)t.leadingNode!==null&&ka(t.leadingNode,e),t.trailingNode!==null&&ul(t.trailingNode,e);else{let{containingNode:s,start:r}=t;if(this.input.charCodeAt(r-1)===44)switch(s.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":Ze(s,s.properties,t);break;case"CallExpression":case"OptionalCallExpression":Ze(s,s.arguments,t);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Ze(s,s.params,t);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":Ze(s,s.elements,t);break;case"ExportNamedDeclaration":case"ImportDeclaration":Ze(s,s.specifiers,t);break;default:nt(s,e)}else nt(s,e)}}finalizeRemainingComments(){let{commentStack:t}=this.state;for(let e=t.length-1;e>=0;e--)this.finalizeComment(t[e]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(t){let{commentStack:e}=this.state,{length:s}=e;if(s===0)return;let r=e[s-1];r.leadingNode===t&&(r.leadingNode=null)}resetPreviousIdentifierLeadingComments(t){let{commentStack:e}=this.state,{length:s}=e;s!==0&&(e[s-1].trailingNode===t?e[s-1].trailingNode=null:s>=2&&e[s-2].trailingNode===t&&(e[s-2].trailingNode=null))}takeSurroundingComments(t,e,s){let{commentStack:r}=this.state,a=r.length;if(a===0)return;let n=a-1;for(;n>=0;n--){let o=r[n],u=o.end;if(o.start===s)o.leadingNode=t;else if(u===e)o.trailingNode=t;else if(u<e)break}}},Na=/\r\n?|[\n\u2028\u2029]/,Dt=new RegExp(Na.source,"g");function rt(i){switch(i){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}var Ss=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,jt=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g,ha=new RegExp("(?=("+jt.source+"))\\1"+/(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source,"y");function ll(i){switch(i){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var Ls=class i{constructor(){this.strict=void 0,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.maybeInArrowParameters=!1,this.inType=!1,this.noAnonFunctionType=!1,this.hasFlowComment=!1,this.isAmbientContext=!1,this.inAbstractClass=!1,this.inDisallowConditionalTypesContext=!1,this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.soloAwait=!1,this.inFSharpPipelineDirectBody=!1,this.labels=[],this.comments=[],this.commentStack=[],this.pos=0,this.type=139,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.lastTokStart=0,this.context=[N.brace],this.canStartJSXElement=!0,this.containsEsc=!1,this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}init({strictMode:t,sourceType:e,startLine:s,startColumn:r}){this.strict=t===!1?!1:t===!0?!0:e==="module",this.curLine=s,this.lineStart=-r,this.startLoc=this.endLoc=new Z(s,r,0)}curPosition(){return new Z(this.curLine,this.pos-this.lineStart,this.pos)}clone(t){let e=new i,s=Object.keys(this);for(let r=0,a=s.length;r<a;r++){let n=s[r],o=this[n];!t&&Array.isArray(o)&&(o=o.slice()),e[n]=o}return e}},cl=function(t){return t>=48&&t<=57},pa={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},Bt={bin:i=>i===48||i===49,oct:i=>i>=48&&i<=55,dec:i=>i>=48&&i<=57,hex:i=>i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102};function fa(i,t,e,s,r,a){let n=e,o=s,u=r,l="",c=null,p=e,{length:f}=t;for(;;){if(e>=f){a.unterminated(n,o,u),l+=t.slice(p,e);break}let m=t.charCodeAt(e);if(hl(i,m,t,e)){l+=t.slice(p,e);break}if(m===92){l+=t.slice(p,e);let d=pl(t,e,s,r,i==="template",a);d.ch===null&&!c?c={pos:e,lineStart:s,curLine:r}:l+=d.ch,{pos:e,lineStart:s,curLine:r}=d,p=e}else m===8232||m===8233?(++e,++r,s=e):m===10||m===13?i==="template"?(l+=t.slice(p,e)+`
12
- `,++e,m===13&&t.charCodeAt(e)===10&&++e,++r,p=s=e):a.unterminated(n,o,u):++e}return{pos:e,str:l,firstInvalidLoc:c,lineStart:s,curLine:r,containsInvalid:!!c}}function hl(i,t,e,s){return i==="template"?t===96||t===36&&e.charCodeAt(s+1)===123:t===(i==="double"?34:39)}function pl(i,t,e,s,r,a){let n=!r;t++;let o=l=>({pos:t,ch:l,lineStart:e,curLine:s}),u=i.charCodeAt(t++);switch(u){case 110:return o(`
13
- `);case 114:return o("\r");case 120:{let l;return{code:l,pos:t}=Ds(i,t,e,s,2,!1,n,a),o(l===null?null:String.fromCharCode(l))}case 117:{let l;return{code:l,pos:t}=Oa(i,t,e,s,n,a),o(l===null?null:String.fromCodePoint(l))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:i.charCodeAt(t)===10&&++t;case 10:e=t,++s;case 8232:case 8233:return o("");case 56:case 57:if(r)return o(null);a.strictNumericEscape(t-1,e,s);default:if(u>=48&&u<=55){let l=t-1,p=i.slice(l,t+2).match(/^[0-7]+/)[0],f=parseInt(p,8);f>255&&(p=p.slice(0,-1),f=parseInt(p,8)),t+=p.length-1;let m=i.charCodeAt(t);if(p!=="0"||m===56||m===57){if(r)return o(null);a.strictNumericEscape(l,e,s)}return o(String.fromCharCode(f))}return o(String.fromCharCode(u))}}function Ds(i,t,e,s,r,a,n,o){let u=t,l;return{n:l,pos:t}=_a(i,t,e,s,16,r,a,!1,o,!n),l===null&&(n?o.invalidEscapeSequence(u,e,s):t=u-1),{code:l,pos:t}}function _a(i,t,e,s,r,a,n,o,u,l){let c=t,p=r===16?pa.hex:pa.decBinOct,f=r===16?Bt.hex:r===10?Bt.dec:r===8?Bt.oct:Bt.bin,m=!1,d=0;for(let y=0,v=a??1/0;y<v;++y){let S=i.charCodeAt(t),_;if(S===95&&o!=="bail"){let U=i.charCodeAt(t-1),B=i.charCodeAt(t+1);if(o){if(Number.isNaN(B)||!f(B)||p.has(U)||p.has(B)){if(l)return{n:null,pos:t};u.unexpectedNumericSeparator(t,e,s)}}else{if(l)return{n:null,pos:t};u.numericSeparatorInEscapeSequence(t,e,s)}++t;continue}if(S>=97?_=S-97+10:S>=65?_=S-65+10:cl(S)?_=S-48:_=1/0,_>=r){if(_<=9&&l)return{n:null,pos:t};if(_<=9&&u.invalidDigit(t,e,s,r))_=0;else if(n)_=0,m=!0;else break}++t,d=d*r+_}return t===c||a!=null&&t-c!==a||m?{n:null,pos:t}:{n:d,pos:t}}function Oa(i,t,e,s,r,a){let n=i.charCodeAt(t),o;if(n===123){if(++t,{code:o,pos:t}=Ds(i,t,e,s,i.indexOf("}",t)-t,!0,r,a),++t,o!==null&&o>1114111)if(r)a.invalidCodePoint(t,e,s);else return{code:null,pos:t}}else({code:o,pos:t}=Ds(i,t,e,s,4,!1,r,a));return{code:o,pos:t}}var fl=["at"],dl=["at"];function et(i,t,e){return new Z(e,i-t,i)}var ml=new Set([103,109,115,105,121,117,100,118]),Q=class{constructor(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new Fe(t.startLoc,t.endLoc)}},Bs=class extends Ms{constructor(t,e){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(s,r,a,n)=>this.options.errorRecovery?(this.raise(h.InvalidDigit,{at:et(s,r,a),radix:n}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(h.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(h.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(h.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(h.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(s,r,a)=>{this.recordStrictModeErrors(h.StrictNumericEscape,{at:et(s,r,a)})},unterminated:(s,r,a)=>{throw this.raise(h.UnterminatedString,{at:et(s-1,r,a)})}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(h.StrictNumericEscape),unterminated:(s,r,a)=>{throw this.raise(h.UnterminatedTemplate,{at:et(s,r,a)})}}),this.state=new Ls,this.state.init(t),this.input=e,this.length=e.length,this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new Q(this.state)),this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(t){return this.match(t)?(this.next(),!0):!1}match(t){return this.state.type===t}createLookaheadState(t){return{pos:t.pos,value:null,type:t.type,start:t.start,end:t.end,context:[this.curContext()],inType:t.inType,startLoc:t.startLoc,lastTokEndLoc:t.lastTokEndLoc,curLine:t.curLine,lineStart:t.lineStart,curPosition:t.curPosition}}lookahead(){let t=this.state;this.state=this.createLookaheadState(t),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let e=this.state;return this.state=t,e}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(t){return Ss.lastIndex=t,Ss.test(this.input)?Ss.lastIndex:t}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(t){return jt.lastIndex=t,jt.test(this.input)?jt.lastIndex:t}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(t){let e=this.input.charCodeAt(t);if((e&64512)===55296&&++t<this.input.length){let s=this.input.charCodeAt(t);(s&64512)===56320&&(e=65536+((e&1023)<<10)+(s&1023))}return e}setStrict(t){this.state.strict=t,t&&(this.state.strictErrors.forEach(([e,s])=>this.raise(e,{at:s})),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(139);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(t){let e;this.isLookahead||(e=this.state.curPosition());let s=this.state.pos,r=this.input.indexOf(t,s+2);if(r===-1)throw this.raise(h.UnterminatedComment,{at:this.state.curPosition()});for(this.state.pos=r+t.length,Dt.lastIndex=s+2;Dt.test(this.input)&&Dt.lastIndex<=r;)++this.state.curLine,this.state.lineStart=Dt.lastIndex;if(this.isLookahead)return;let a={type:"CommentBlock",value:this.input.slice(s+2,r),start:s,end:r+t.length,loc:new Fe(e,this.state.curPosition())};return this.options.tokens&&this.pushToken(a),a}skipLineComment(t){let e=this.state.pos,s;this.isLookahead||(s=this.state.curPosition());let r=this.input.charCodeAt(this.state.pos+=t);if(this.state.pos<this.length)for(;!rt(r)&&++this.state.pos<this.length;)r=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let a=this.state.pos,o={type:"CommentLine",value:this.input.slice(e+t,a),start:e,end:a,loc:new Fe(s,this.state.curPosition())};return this.options.tokens&&this.pushToken(o),o}skipSpace(){let t=this.state.pos,e=[];e:for(;this.state.pos<this.length;){let s=this.input.charCodeAt(this.state.pos);switch(s){case 32:case 160:case 9:++this.state.pos;break;case 13:this.input.charCodeAt(this.state.pos+1)===10&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{let r=this.skipBlockComment("*/");r!==void 0&&(this.addComment(r),this.options.attachComment&&e.push(r));break}case 47:{let r=this.skipLineComment(2);r!==void 0&&(this.addComment(r),this.options.attachComment&&e.push(r));break}default:break e}break;default:if(ll(s))++this.state.pos;else if(s===45&&!this.inModule&&this.options.annexB){let r=this.state.pos;if(this.input.charCodeAt(r+1)===45&&this.input.charCodeAt(r+2)===62&&(t===0||this.state.lineStart>t)){let a=this.skipLineComment(3);a!==void 0&&(this.addComment(a),this.options.attachComment&&e.push(a))}else break e}else if(s===60&&!this.inModule&&this.options.annexB){let r=this.state.pos;if(this.input.charCodeAt(r+1)===33&&this.input.charCodeAt(r+2)===45&&this.input.charCodeAt(r+3)===45){let a=this.skipLineComment(4);a!==void 0&&(this.addComment(a),this.options.attachComment&&e.push(a))}else break e}else break e}}if(e.length>0){let s=this.state.pos,r={start:t,end:s,comments:e,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(r)}}finishToken(t,e){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let s=this.state.type;this.state.type=t,this.state.value=e,this.isLookahead||this.updateContext(s)}replaceToken(t){this.state.type=t,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let t=this.state.pos+1,e=this.codePointAtPos(t);if(e>=48&&e<=57)throw this.raise(h.UnexpectedDigitAfterHash,{at:this.state.curPosition()});if(e===123||e===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(e===123?h.RecordExpressionHashIncorrectStartSyntaxType:h.TupleExpressionHashIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,e===123?this.finishToken(7):this.finishToken(1)}else ie(e)?(++this.state.pos,this.finishToken(138,this.readWord1(e))):e===92?(++this.state.pos,this.finishToken(138,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let t=this.input.charCodeAt(this.state.pos+1);if(t>=48&&t<=57){this.readNumber(!0);return}t===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let t=this.input.charCodeAt(this.state.pos+1);if(t!==33)return!1;let e=this.state.pos;for(this.state.pos+=1;!rt(t)&&++this.state.pos<this.length;)t=this.input.charCodeAt(this.state.pos);let s=this.input.slice(e+2,this.state.pos);return this.finishToken(28,s),!0}readToken_mult_modulo(t){let e=t===42?55:54,s=1,r=this.input.charCodeAt(this.state.pos+1);t===42&&r===42&&(s++,r=this.input.charCodeAt(this.state.pos+2),e=57),r===61&&!this.state.inType&&(s++,e=t===37?33:30),this.finishOp(e,s)}readToken_pipe_amp(t){let e=this.input.charCodeAt(this.state.pos+1);if(e===t){this.input.charCodeAt(this.state.pos+2)===61?this.finishOp(30,3):this.finishOp(t===124?41:42,2);return}if(t===124){if(e===62){this.finishOp(39,2);return}if(this.hasPlugin("recordAndTuple")&&e===125){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(h.RecordExpressionBarIncorrectEndSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,this.finishToken(9);return}if(this.hasPlugin("recordAndTuple")&&e===93){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(h.TupleExpressionBarIncorrectEndSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,this.finishToken(4);return}}if(e===61){this.finishOp(30,2);return}this.finishOp(t===124?43:45,1)}readToken_caret(){let t=this.input.charCodeAt(this.state.pos+1);t===61&&!this.state.inType?this.finishOp(32,2):t===94&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])?(this.finishOp(37,2),this.input.codePointAt(this.state.pos)===94&&this.unexpected()):this.finishOp(44,1)}readToken_atSign(){this.input.charCodeAt(this.state.pos+1)===64&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(38,2):this.finishOp(26,1)}readToken_plus_min(t){let e=this.input.charCodeAt(this.state.pos+1);if(e===t){this.finishOp(34,2);return}e===61?this.finishOp(30,2):this.finishOp(53,1)}readToken_lt(){let{pos:t}=this.state,e=this.input.charCodeAt(t+1);if(e===60){if(this.input.charCodeAt(t+2)===61){this.finishOp(30,3);return}this.finishOp(51,2);return}if(e===61){this.finishOp(49,2);return}this.finishOp(47,1)}readToken_gt(){let{pos:t}=this.state,e=this.input.charCodeAt(t+1);if(e===62){let s=this.input.charCodeAt(t+2)===62?3:2;if(this.input.charCodeAt(t+s)===61){this.finishOp(30,s+1);return}this.finishOp(52,s);return}if(e===61){this.finishOp(49,2);return}this.finishOp(48,1)}readToken_eq_excl(t){let e=this.input.charCodeAt(this.state.pos+1);if(e===61){this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(t===61&&e===62){this.state.pos+=2,this.finishToken(19);return}this.finishOp(t===61?29:35,1)}readToken_question(){let t=this.input.charCodeAt(this.state.pos+1),e=this.input.charCodeAt(this.state.pos+2);t===63?e===61?this.finishOp(30,3):this.finishOp(40,2):t===46&&!(e>=48&&e<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(t){switch(t){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(h.TupleExpressionBarIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(h.RecordExpressionBarIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let e=this.input.charCodeAt(this.state.pos+1);if(e===120||e===88){this.readRadixNumber(16);return}if(e===111||e===79){this.readRadixNumber(8);return}if(e===98||e===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(t);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(t);return;case 124:case 38:this.readToken_pipe_amp(t);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(t);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(t);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(ie(t)){this.readWord(t);return}}throw this.raise(h.InvalidOrUnexpectedToken,{at:this.state.curPosition(),unexpected:String.fromCodePoint(t)})}finishOp(t,e){let s=this.input.slice(this.state.pos,this.state.pos+e);this.state.pos+=e,this.finishToken(t,s)}readRegexp(){let t=this.state.startLoc,e=this.state.start+1,s,r,{pos:a}=this.state;for(;;++a){if(a>=this.length)throw this.raise(h.UnterminatedRegExp,{at:V(t,1)});let l=this.input.charCodeAt(a);if(rt(l))throw this.raise(h.UnterminatedRegExp,{at:V(t,1)});if(s)s=!1;else{if(l===91)r=!0;else if(l===93&&r)r=!1;else if(l===47&&!r)break;s=l===92}}let n=this.input.slice(e,a);++a;let o="",u=()=>V(t,a+2-e);for(;a<this.length;){let l=this.codePointAtPos(a),c=String.fromCharCode(l);if(ml.has(l))l===118?o.includes("u")&&this.raise(h.IncompatibleRegExpUVFlags,{at:u()}):l===117&&o.includes("v")&&this.raise(h.IncompatibleRegExpUVFlags,{at:u()}),o.includes(c)&&this.raise(h.DuplicateRegExpFlags,{at:u()});else if(De(l)||l===92)this.raise(h.MalformedRegExpFlags,{at:u()});else break;++a,o+=c}this.state.pos=a,this.finishToken(137,{pattern:n,flags:o})}readInt(t,e,s=!1,r=!0){let{n:a,pos:n}=_a(this.input,this.state.pos,this.state.lineStart,this.state.curLine,t,e,s,r,this.errorHandlers_readInt,!1);return this.state.pos=n,a}readRadixNumber(t){let e=this.state.curPosition(),s=!1;this.state.pos+=2;let r=this.readInt(t);r==null&&this.raise(h.InvalidDigit,{at:V(e,2),radix:t});let a=this.input.charCodeAt(this.state.pos);if(a===110)++this.state.pos,s=!0;else if(a===109)throw this.raise(h.InvalidDecimal,{at:e});if(ie(this.codePointAtPos(this.state.pos)))throw this.raise(h.NumberIdentifier,{at:this.state.curPosition()});if(s){let n=this.input.slice(e.index,this.state.pos).replace(/[_n]/g,"");this.finishToken(135,n);return}this.finishToken(134,r)}readNumber(t){let e=this.state.pos,s=this.state.curPosition(),r=!1,a=!1,n=!1,o=!1,u=!1;!t&&this.readInt(10)===null&&this.raise(h.InvalidNumber,{at:this.state.curPosition()});let l=this.state.pos-e>=2&&this.input.charCodeAt(e)===48;if(l){let m=this.input.slice(e,this.state.pos);if(this.recordStrictModeErrors(h.StrictOctalLiteral,{at:s}),!this.state.strict){let d=m.indexOf("_");d>0&&this.raise(h.ZeroDigitNumericSeparator,{at:V(s,d)})}u=l&&!/[89]/.test(m)}let c=this.input.charCodeAt(this.state.pos);if(c===46&&!u&&(++this.state.pos,this.readInt(10),r=!0,c=this.input.charCodeAt(this.state.pos)),(c===69||c===101)&&!u&&(c=this.input.charCodeAt(++this.state.pos),(c===43||c===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(h.InvalidOrMissingExponent,{at:s}),r=!0,o=!0,c=this.input.charCodeAt(this.state.pos)),c===110&&((r||l)&&this.raise(h.InvalidBigIntLiteral,{at:s}),++this.state.pos,a=!0),c===109&&(this.expectPlugin("decimal",this.state.curPosition()),(o||l)&&this.raise(h.InvalidDecimal,{at:s}),++this.state.pos,n=!0),ie(this.codePointAtPos(this.state.pos)))throw this.raise(h.NumberIdentifier,{at:this.state.curPosition()});let p=this.input.slice(e,this.state.pos).replace(/[_mn]/g,"");if(a){this.finishToken(135,p);return}if(n){this.finishToken(136,p);return}let f=u?parseInt(p,8):parseFloat(p);this.finishToken(134,f)}readCodePoint(t){let{code:e,pos:s}=Oa(this.input,this.state.pos,this.state.lineStart,this.state.curLine,t,this.errorHandlers_readCodePoint);return this.state.pos=s,e}readString(t){let{str:e,pos:s,curLine:r,lineStart:a}=fa(t===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=s+1,this.state.lineStart=a,this.state.curLine=r,this.finishToken(133,e)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let t=this.input[this.state.pos],{str:e,firstInvalidLoc:s,pos:r,curLine:a,lineStart:n}=fa("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=r+1,this.state.lineStart=n,this.state.curLine=a,s&&(this.state.firstInvalidTemplateEscapePos=new Z(s.curLine,s.pos-s.lineStart,s.pos)),this.input.codePointAt(r)===96?this.finishToken(24,s?null:t+e+"`"):(this.state.pos++,this.finishToken(25,s?null:t+e+"${"))}recordStrictModeErrors(t,{at:e}){let s=e.index;this.state.strict&&!this.state.strictErrors.has(s)?this.raise(t,{at:e}):this.state.strictErrors.set(s,[t,e])}readWord1(t){this.state.containsEsc=!1;let e="",s=this.state.pos,r=this.state.pos;for(t!==void 0&&(this.state.pos+=t<=65535?1:2);this.state.pos<this.length;){let a=this.codePointAtPos(this.state.pos);if(De(a))this.state.pos+=a<=65535?1:2;else if(a===92){this.state.containsEsc=!0,e+=this.input.slice(r,this.state.pos);let n=this.state.curPosition(),o=this.state.pos===s?ie:De;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(h.MissingUnicodeEscape,{at:this.state.curPosition()}),r=this.state.pos-1;continue}++this.state.pos;let u=this.readCodePoint(!0);u!==null&&(o(u)||this.raise(h.EscapedCharNotAnIdentifier,{at:n}),e+=String.fromCodePoint(u)),r=this.state.pos}else break}return e+this.input.slice(r,this.state.pos)}readWord(t){let e=this.readWord1(t),s=Gs.get(e);s!==void 0?this.finishToken(s,fe(s)):this.finishToken(132,e)}checkKeywordEscapes(){let{type:t}=this.state;er(t)&&this.state.containsEsc&&this.raise(h.InvalidEscapedReservedWord,{at:this.state.startLoc,reservedWord:fe(t)})}raise(t,e){let{at:s}=e,r=$t(e,fl),a=s instanceof Z?s:s.loc.start,n=t({loc:a,details:r});if(!this.options.errorRecovery)throw n;return this.isLookahead||this.state.errors.push(n),n}raiseOverwrite(t,e){let{at:s}=e,r=$t(e,dl),a=s instanceof Z?s:s.loc.start,n=a.index,o=this.state.errors;for(let u=o.length-1;u>=0;u--){let l=o[u];if(l.loc.index===n)return o[u]=t({loc:a,details:r});if(l.loc.index<n)break}return this.raise(t,e)}updateContext(t){}unexpected(t,e){throw this.raise(h.UnexpectedToken,{expected:e?fe(e):null,at:t??this.state.startLoc})}expectPlugin(t,e){if(this.hasPlugin(t))return!0;throw this.raise(h.MissingPlugin,{at:e??this.state.startLoc,missingPlugin:[t]})}expectOnePlugin(t){if(!t.some(e=>this.hasPlugin(e)))throw this.raise(h.MissingOneOfPlugins,{at:this.state.startLoc,missingPlugin:t})}errorBuilder(t){return(e,s,r)=>{this.raise(t,{at:et(e,s,r)})}}},Fs=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},Rs=class{constructor(t){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=t}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new Fs)}exit(){let t=this.stack.pop(),e=this.current();for(let[s,r]of Array.from(t.undefinedPrivateNames))e?e.undefinedPrivateNames.has(s)||e.undefinedPrivateNames.set(s,r):this.parser.raise(h.InvalidPrivateFieldResolution,{at:r,identifierName:s})}declarePrivateName(t,e,s){let{privateNames:r,loneAccessors:a,undefinedPrivateNames:n}=this.current(),o=r.has(t);if(e&3){let u=o&&a.get(t);if(u){let l=u&4,c=e&4,p=u&3,f=e&3;o=p===f||l!==c,o||a.delete(t)}else o||a.set(t,e)}o&&this.parser.raise(h.PrivateNameRedeclaration,{at:s,identifierName:t}),r.add(t),n.delete(t)}usePrivateName(t,e){let s;for(s of this.stack)if(s.privateNames.has(t))return;s?s.undefinedPrivateNames.set(t,e):this.parser.raise(h.InvalidPrivateFieldResolution,{at:e,identifierName:t})}},Re=class{constructor(t=0){this.type=t}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},Vt=class extends Re{constructor(t){super(t),this.declarationErrors=new Map}recordDeclarationError(t,{at:e}){let s=e.index;this.declarationErrors.set(s,[t,e])}clearDeclarationError(t){this.declarationErrors.delete(t)}iterateErrors(t){this.declarationErrors.forEach(t)}},js=class{constructor(t){this.parser=void 0,this.stack=[new Re],this.parser=t}enter(t){this.stack.push(t)}exit(){this.stack.pop()}recordParameterInitializerError(t,{at:e}){let s={at:e.loc.start},{stack:r}=this,a=r.length-1,n=r[a];for(;!n.isCertainlyParameterDeclaration();){if(n.canBeArrowParameterDeclaration())n.recordDeclarationError(t,s);else return;n=r[--a]}this.parser.raise(t,s)}recordArrowParameterBindingError(t,{at:e}){let{stack:s}=this,r=s[s.length-1],a={at:e.loc.start};if(r.isCertainlyParameterDeclaration())this.parser.raise(t,a);else if(r.canBeArrowParameterDeclaration())r.recordDeclarationError(t,a);else return}recordAsyncArrowParametersError({at:t}){let{stack:e}=this,s=e.length-1,r=e[s];for(;r.canBeArrowParameterDeclaration();)r.type===2&&r.recordDeclarationError(h.AwaitBindingIdentifier,{at:t}),r=e[--s]}validateAsPattern(){let{stack:t}=this,e=t[t.length-1];e.canBeArrowParameterDeclaration()&&e.iterateErrors(([s,r])=>{this.parser.raise(s,{at:r});let a=t.length-2,n=t[a];for(;n.canBeArrowParameterDeclaration();)n.clearDeclarationError(r.index),n=t[--a]})}};function yl(){return new Re(3)}function xl(){return new Vt(1)}function gl(){return new Vt(2)}function Ma(){return new Re}var Us=class{constructor(){this.stacks=[]}enter(t){this.stacks.push(t)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function Ut(i,t){return(i?2:0)|(t?1:0)}var $s=class extends Bs{addExtra(t,e,s,r=!0){if(!t)return;let a=t.extra=t.extra||{};r?a[e]=s:Object.defineProperty(a,e,{enumerable:r,value:s})}isContextual(t){return this.state.type===t&&!this.state.containsEsc}isUnparsedContextual(t,e){let s=t+e.length;if(this.input.slice(t,s)===e){let r=this.input.charCodeAt(s);return!(De(r)||(r&64512)===55296)}return!1}isLookaheadContextual(t){let e=this.nextTokenStart();return this.isUnparsedContextual(e,t)}eatContextual(t){return this.isContextual(t)?(this.next(),!0):!1}expectContextual(t,e){if(!this.eatContextual(t)){if(e!=null)throw this.raise(e,{at:this.state.startLoc});this.unexpected(null,t)}}canInsertSemicolon(){return this.match(139)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return Na.test(this.input.slice(this.state.lastTokEndLoc.index,this.state.start))}hasFollowingLineBreak(){return ha.lastIndex=this.state.end,ha.test(this.input)}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(t=!0){(t?this.isLineTerminator():this.eat(13))||this.raise(h.MissingSemicolon,{at:this.state.lastTokEndLoc})}expect(t,e){this.eat(t)||this.unexpected(e,t)}tryParse(t,e=this.state.clone()){let s={node:null};try{let r=t((a=null)=>{throw s.node=a,s});if(this.state.errors.length>e.errors.length){let a=this.state;return this.state=e,this.state.tokensLength=a.tokensLength,{node:r,error:a.errors[e.errors.length],thrown:!1,aborted:!1,failState:a}}return{node:r,error:null,thrown:!1,aborted:!1,failState:null}}catch(r){let a=this.state;if(this.state=e,r instanceof SyntaxError)return{node:null,error:r,thrown:!0,aborted:!1,failState:a};if(r===s)return{node:s.node,error:null,thrown:!1,aborted:!0,failState:a};throw r}}checkExpressionErrors(t,e){if(!t)return!1;let{shorthandAssignLoc:s,doubleProtoLoc:r,privateKeyLoc:a,optionalParametersLoc:n}=t,o=!!s||!!r||!!n||!!a;if(!e)return o;s!=null&&this.raise(h.InvalidCoverInitializedName,{at:s}),r!=null&&this.raise(h.DuplicateProto,{at:r}),a!=null&&this.raise(h.UnexpectedPrivateField,{at:a}),n!=null&&this.unexpected(n)}isLiteralPropertyName(){return wa(this.state.type)}isPrivateName(t){return t.type==="PrivateName"}getPrivateNameSV(t){return t.id.name}hasPropertyAsPrivateName(t){return(t.type==="MemberExpression"||t.type==="OptionalMemberExpression")&&this.isPrivateName(t.property)}isObjectProperty(t){return t.type==="ObjectProperty"}isObjectMethod(t){return t.type==="ObjectMethod"}initializeScopes(t=this.options.sourceType==="module"){let e=this.state.labels;this.state.labels=[];let s=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let r=this.inModule;this.inModule=t;let a=this.scope,n=this.getScopeHandler();this.scope=new n(this,t);let o=this.prodParam;this.prodParam=new Us;let u=this.classScope;this.classScope=new Rs(this);let l=this.expressionScope;return this.expressionScope=new js(this),()=>{this.state.labels=e,this.exportedIdentifiers=s,this.inModule=r,this.scope=a,this.prodParam=o,this.classScope=u,this.expressionScope=l}}enterInitialScopes(){let t=0;this.inModule&&(t|=2),this.scope.enter(1),this.prodParam.enter(t)}checkDestructuringPrivate(t){let{privateKeyLoc:e}=t;e!==null&&this.expectPlugin("destructuringPrivate",e)}},Be=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}},je=class{constructor(t,e,s){this.type="",this.start=e,this.end=0,this.loc=new Fe(s),t!=null&&t.options.ranges&&(this.range=[e,0]),t!=null&&t.filename&&(this.loc.filename=t.filename)}},rr=je.prototype;rr.__clone=function(){let i=new je(void 0,this.start,this.loc.start),t=Object.keys(this);for(let e=0,s=t.length;e<s;e++){let r=t[e];r!=="leadingComments"&&r!=="trailingComments"&&r!=="innerComments"&&(i[r]=this[r])}return i};function bl(i){return ne(i)}function ne(i){let{type:t,start:e,end:s,loc:r,range:a,extra:n,name:o}=i,u=Object.create(rr);return u.type=t,u.start=e,u.end=s,u.loc=r,u.range=a,u.extra=n,u.name=o,t==="Placeholder"&&(u.expectedNode=i.expectedNode),u}function Pl(i){let{type:t,start:e,end:s,loc:r,range:a,extra:n}=i;if(t==="Placeholder")return bl(i);let o=Object.create(rr);return o.type=t,o.start=e,o.end=s,o.loc=r,o.range=a,i.raw!==void 0?o.raw=i.raw:o.extra=n,o.value=i.value,o}var qs=class extends $s{startNode(){return new je(this,this.state.start,this.state.startLoc)}startNodeAt(t){return new je(this,t.index,t)}startNodeAtNode(t){return this.startNodeAt(t.loc.start)}finishNode(t,e){return this.finishNodeAt(t,e,this.state.lastTokEndLoc)}finishNodeAt(t,e,s){return t.type=e,t.end=s.index,t.loc.end=s,this.options.ranges&&(t.range[1]=s.index),this.options.attachComment&&this.processComment(t),t}resetStartLocation(t,e){t.start=e.index,t.loc.start=e,this.options.ranges&&(t.range[0]=e.index)}resetEndLocation(t,e=this.state.lastTokEndLoc){t.end=e.index,t.loc.end=e,this.options.ranges&&(t.range[1]=e.index)}resetStartLocationFromNode(t,e){this.resetStartLocation(t,e.loc.start)}},vl=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),T=ae`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:i})=>`Cannot overwrite reserved type ${i}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:i,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${i} = true,\` or \`${i} = false,\` in enum \`${t}\`.`,EnumDuplicateMemberName:({memberName:i,enumName:t})=>`Enum member names need to be unique, but the name \`${i}\` has already been used before in enum \`${t}\`.`,EnumInconsistentMemberValues:({enumName:i})=>`Enum \`${i}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:i,enumName:t})=>`Enum type \`${i}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:i})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${i}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:i,memberName:t,explicitType:e})=>`Enum \`${i}\` has type \`${e}\`, so the initializer of \`${t}\` needs to be a ${e} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:i,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${i}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:i,memberName:t})=>`The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${i}\`.`,EnumInvalidMemberName:({enumName:i,memberName:t,suggestion:e})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${e}\`, in enum \`${i}\`.`,EnumNumberMemberNotInitialized:({enumName:i,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${i}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:i})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${i}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:i})=>`Unexpected reserved type ${i}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:i,suggestion:t})=>`\`declare export ${i}\` is not supported. Use \`${t}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function wl(i){return i.type==="DeclareExportAllDeclaration"||i.type==="DeclareExportDeclaration"&&(!i.declaration||i.declaration.type!=="TypeAlias"&&i.declaration.type!=="InterfaceDeclaration")}function da(i){return i.importKind==="type"||i.importKind==="typeof"}var Tl={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function Sl(i,t){let e=[],s=[];for(let r=0;r<i.length;r++)(t(i[r],r,i)?e:s).push(i[r]);return[e,s]}var Al=/\*?\s*@((?:no)?flow)\b/,El=i=>class extends i{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return _s}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(e,s){e!==133&&e!==13&&e!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(e,s)}addComment(e){if(this.flowPragma===void 0){let s=Al.exec(e.value);if(s)if(s[1]==="flow")this.flowPragma="flow";else if(s[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(e)}flowParseTypeInitialiser(e){let s=this.state.inType;this.state.inType=!0,this.expect(e||14);let r=this.flowParseType();return this.state.inType=s,r}flowParsePredicate(){let e=this.startNode(),s=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStart>s.index+1&&this.raise(T.UnexpectedSpaceBetweenModuloChecks,{at:s}),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let e=this.state.inType;this.state.inType=!0,this.expect(14);let s=null,r=null;return this.match(54)?(this.state.inType=e,r=this.flowParsePredicate()):(s=this.flowParseType(),this.state.inType=e,this.match(54)&&(r=this.flowParsePredicate())),[s,r]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();let s=e.id=this.parseIdentifier(),r=this.startNode(),a=this.startNode();this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(10);let n=this.flowParseFunctionTypeParams();return r.params=n.params,r.rest=n.rest,r.this=n._this,this.expect(11),[r.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),a.typeAnnotation=this.finishNode(r,"FunctionTypeAnnotation"),s.typeAnnotation=this.finishNode(a,"TypeAnnotation"),this.resetEndLocation(s),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.loc.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,s){if(this.match(80))return this.flowParseDeclareClass(e);if(this.match(68))return this.flowParseDeclareFunction(e);if(this.match(74))return this.flowParseDeclareVariable(e);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(e):(s&&this.raise(T.NestedDeclareModule,{at:this.state.lastTokStartLoc}),this.flowParseDeclareModule(e));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(e);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(e);if(this.isContextual(129))return this.flowParseDeclareInterface(e);if(this.match(82))return this.flowParseDeclareExportDeclaration(e,s);this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(133)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();let s=e.body=this.startNode(),r=s.body=[];for(this.expect(5);!this.match(8);){let o=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(T.InvalidNonTypeImportInDeclareModule,{at:this.state.lastTokStartLoc}),super.parseImport(o)):(this.expectContextual(125,T.UnsupportedStatementInDeclareModule),o=this.flowParseDeclare(o,!0)),r.push(o)}this.scope.exit(),this.expect(8),this.finishNode(s,"BlockStatement");let a=null,n=!1;return r.forEach(o=>{wl(o)?(a==="CommonJS"&&this.raise(T.AmbiguousDeclareModuleKind,{at:o}),a="ES"):o.type==="DeclareModuleExports"&&(n&&this.raise(T.DuplicateDeclareModuleExports,{at:o}),a==="ES"&&this.raise(T.AmbiguousDeclareModuleKind,{at:o}),a="CommonJS",n=!0)}),e.kind=a||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,s){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!s){let r=this.state.value;throw this.raise(T.UnsupportedDeclareExportKind,{at:this.state.startLoc,unsupportedExportKind:r,suggestion:Tl[r]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return e=this.parseExport(e,null),e.type==="ExportNamedDeclaration"&&(e.type="ExportDeclaration",e.default=!1,delete e.exportKind),e.type="Declare"+e.type,e;this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(111),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();let s=this.flowParseTypeAlias(e);return s.type="DeclareTypeAlias",s}flowParseDeclareOpaqueType(e){this.next();let s=this.flowParseOpaqueType(e,!0);return s.type="DeclareOpaqueType",s}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,s){if(e.id=this.flowParseRestrictedIdentifier(!s,!0),this.scope.declareName(e.id.name,s?17:8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(!s&&this.eat(12));if(s){if(e.implements=[],e.mixins=[],this.eatContextual(117))do e.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do e.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:s,allowExact:!1,allowSpread:!1,allowProto:s,allowInexact:!1})}flowParseInterfaceExtends(){let e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){e==="_"&&this.raise(T.UnexpectedReservedUnderscore,{at:this.state.startLoc})}checkReservedType(e,s,r){vl.has(e)&&this.raise(r?T.AssignReservedType:T.UnexpectedReservedType,{at:s,reservedType:e})}flowParseRestrictedIdentifier(e,s){return this.checkReservedType(this.state.value,this.state.startLoc,s),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,s){return this.expectContextual(130),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,s||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=!1){let s=this.state.startLoc,r=this.startNode(),a=this.flowParseVariance(),n=this.flowParseTypeAnnotatableIdentifier();return r.name=n.name,r.variance=a,r.bound=n.typeAnnotation,this.match(29)?(this.eat(29),r.default=this.flowParseType()):e&&this.raise(T.MissingTypeParamDefault,{at:s}),this.finishNode(r,"TypeParameter")}flowParseTypeParameterDeclaration(){let e=this.state.inType,s=this.startNode();s.params=[],this.state.inType=!0,this.match(47)||this.match(142)?this.next():this.unexpected();let r=!1;do{let a=this.flowParseTypeParameter(r);s.params.push(a),a.default&&(r=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(s,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){let e=this.startNode(),s=this.state.inType;e.params=[],this.state.inType=!0,this.expect(47);let r=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=r,this.expect(48),this.state.inType=s,this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){let e=this.startNode(),s=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=s,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){let e=this.startNode();if(this.expectContextual(129),e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(134)||this.match(133)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,s,r){return e.static=s,this.lookahead().type===14?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=r,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,s){return e.static=s,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,s){let r=this.startNode();return e.static=s,e.value=this.flowParseObjectTypeMethodish(r),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:s,allowSpread:r,allowProto:a,allowInexact:n}){let o=this.state.inType;this.state.inType=!0;let u=this.startNode();u.callProperties=[],u.properties=[],u.indexers=[],u.internalSlots=[];let l,c,p=!1;for(s&&this.match(6)?(this.expect(6),l=9,c=!0):(this.expect(5),l=8,c=!1),u.exact=c;!this.match(l);){let m=!1,d=null,y=null,v=this.startNode();if(a&&this.isContextual(118)){let _=this.lookahead();_.type!==14&&_.type!==17&&(this.next(),d=this.state.startLoc,e=!1)}if(e&&this.isContextual(106)){let _=this.lookahead();_.type!==14&&_.type!==17&&(this.next(),m=!0)}let S=this.flowParseVariance();if(this.eat(0))d!=null&&this.unexpected(d),this.eat(0)?(S&&this.unexpected(S.loc.start),u.internalSlots.push(this.flowParseObjectTypeInternalSlot(v,m))):u.indexers.push(this.flowParseObjectTypeIndexer(v,m,S));else if(this.match(10)||this.match(47))d!=null&&this.unexpected(d),S&&this.unexpected(S.loc.start),u.callProperties.push(this.flowParseObjectTypeCallProperty(v,m));else{let _="init";if(this.isContextual(99)||this.isContextual(104)){let B=this.lookahead();wa(B.type)&&(_=this.state.value,this.next())}let U=this.flowParseObjectTypeProperty(v,m,d,S,_,r,n??!c);U===null?(p=!0,y=this.state.lastTokStartLoc):u.properties.push(U)}this.flowObjectTypeSemicolon(),y&&!this.match(8)&&!this.match(9)&&this.raise(T.UnexpectedExplicitInexactInObject,{at:y})}this.expect(l),r&&(u.inexact=p);let f=this.finishNode(u,"ObjectTypeAnnotation");return this.state.inType=o,f}flowParseObjectTypeProperty(e,s,r,a,n,o,u){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(o?u||this.raise(T.InexactInsideExact,{at:this.state.lastTokStartLoc}):this.raise(T.InexactInsideNonObject,{at:this.state.lastTokStartLoc}),a&&this.raise(T.InexactVariance,{at:a}),null):(o||this.raise(T.UnexpectedSpreadType,{at:this.state.lastTokStartLoc}),r!=null&&this.unexpected(r),a&&this.raise(T.SpreadVariance,{at:a}),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=s,e.proto=r!=null,e.kind=n;let l=!1;return this.match(47)||this.match(10)?(e.method=!0,r!=null&&this.unexpected(r),a&&this.unexpected(a.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),(n==="get"||n==="set")&&this.flowCheckGetterSetterParams(e),!o&&e.key.name==="constructor"&&e.value.this&&this.raise(T.ThisParamBannedInConstructor,{at:e.value.this})):(n!=="init"&&this.unexpected(),e.method=!1,this.eat(17)&&(l=!0),e.value=this.flowParseTypeInitialiser(),e.variance=a),e.optional=l,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){let s=e.kind==="get"?0:1,r=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise(e.kind==="get"?T.GetterMayNotHaveThisParam:T.SetterMayNotHaveThisParam,{at:e.value.this}),r!==s&&this.raise(e.kind==="get"?h.BadGetterArity:h.BadSetterArity,{at:e}),e.kind==="set"&&e.value.rest&&this.raise(h.BadSetterRestParameter,{at:e})}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,s){var r;(r=e)!=null||(e=this.state.startLoc);let a=s||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let n=this.startNodeAt(e);n.qualification=a,n.id=this.flowParseRestrictedIdentifier(!0),a=this.finishNode(n,"QualifiedTypeIdentifier")}return a}flowParseGenericType(e,s){let r=this.startNodeAt(e);return r.typeParameters=null,r.id=this.flowParseQualifiedTypeIdentifier(e,s),this.match(47)&&(r.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(r,"GenericTypeAnnotation")}flowParseTypeofType(){let e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){let e=this.startNode();for(e.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(e.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(e,"TupleTypeAnnotation")}flowParseFunctionTypeParam(e){let s=null,r=!1,a=null,n=this.startNode(),o=this.lookahead(),u=this.state.type===78;return o.type===14||o.type===17?(u&&!e&&this.raise(T.ThisParamMustBeFirst,{at:n}),s=this.parseIdentifier(u),this.eat(17)&&(r=!0,u&&this.raise(T.ThisParamMayNotBeOptional,{at:n})),a=this.flowParseTypeInitialiser()):a=this.flowParseType(),n.name=s,n.optional=r,n.typeAnnotation=a,this.finishNode(n,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(e){let s=this.startNodeAt(e.loc.start);return s.name=null,s.optional=!1,s.typeAnnotation=e,this.finishNode(s,"FunctionTypeParam")}flowParseFunctionTypeParams(e=[]){let s=null,r=null;for(this.match(78)&&(r=this.flowParseFunctionTypeParam(!0),r.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(s=this.flowParseFunctionTypeParam(!1)),{params:e,rest:s,_this:r}}flowIdentToTypeAnnotation(e,s,r){switch(r.name){case"any":return this.finishNode(s,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(s,"BooleanTypeAnnotation");case"mixed":return this.finishNode(s,"MixedTypeAnnotation");case"empty":return this.finishNode(s,"EmptyTypeAnnotation");case"number":return this.finishNode(s,"NumberTypeAnnotation");case"string":return this.finishNode(s,"StringTypeAnnotation");case"symbol":return this.finishNode(s,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(r.name),this.flowParseGenericType(e,r)}}flowParsePrimaryType(){let e=this.state.startLoc,s=this.startNode(),r,a,n=!1,o=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,a=this.flowParseTupleType(),this.state.noAnonFunctionType=o,a;case 47:return s.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),r=this.flowParseFunctionTypeParams(),s.params=r.params,s.rest=r.rest,s.this=r._this,this.expect(11),this.expect(19),s.returnType=this.flowParseType(),this.finishNode(s,"FunctionTypeAnnotation");case 10:if(this.next(),!this.match(11)&&!this.match(21))if(k(this.state.type)||this.match(78)){let u=this.lookahead().type;n=u!==17&&u!==14}else n=!0;if(n){if(this.state.noAnonFunctionType=!1,a=this.flowParseType(),this.state.noAnonFunctionType=o,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),a;this.eat(12)}return a?r=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(a)]):r=this.flowParseFunctionTypeParams(),s.params=r.params,s.rest=r.rest,s.this=r._this,this.expect(11),this.expect(19),s.returnType=this.flowParseType(),s.typeParameters=null,this.finishNode(s,"FunctionTypeAnnotation");case 133:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return s.value=this.match(85),this.next(),this.finishNode(s,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(134))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",s);if(this.match(135))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",s);throw this.raise(T.UnexpectedSubtractionOperand,{at:this.state.startLoc})}this.unexpected();return;case 134:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 135:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(s,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(s,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(s,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(s,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(er(this.state.type)){let u=fe(this.state.type);return this.next(),super.createIdentifier(s,u)}else if(k(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(e,s,this.parseIdentifier())}this.unexpected()}flowParsePostfixType(){let e=this.state.startLoc,s=this.flowParsePrimaryType(),r=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let a=this.startNodeAt(e),n=this.eat(18);r=r||n,this.expect(0),!n&&this.match(3)?(a.elementType=s,this.next(),s=this.finishNode(a,"ArrayTypeAnnotation")):(a.objectType=s,a.indexType=this.flowParseType(),this.expect(3),r?(a.optional=n,s=this.finishNode(a,"OptionalIndexedAccessType")):s=this.finishNode(a,"IndexedAccessType"))}return s}flowParsePrefixType(){let e=this.startNode();return this.eat(17)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let s=this.startNodeAt(e.loc.start);return s.params=[this.reinterpretTypeAsFunctionTypeParam(e)],s.rest=null,s.this=null,s.returnType=this.flowParseType(),s.typeParameters=null,this.finishNode(s,"FunctionTypeAnnotation")}return e}flowParseIntersectionType(){let e=this.startNode();this.eat(45);let s=this.flowParseAnonFunctionWithoutParens();for(e.types=[s];this.eat(45);)e.types.push(this.flowParseAnonFunctionWithoutParens());return e.types.length===1?s:this.finishNode(e,"IntersectionTypeAnnotation")}flowParseUnionType(){let e=this.startNode();this.eat(43);let s=this.flowParseIntersectionType();for(e.types=[s];this.eat(43);)e.types.push(this.flowParseIntersectionType());return e.types.length===1?s:this.finishNode(e,"UnionTypeAnnotation")}flowParseType(){let e=this.state.inType;this.state.inType=!0;let s=this.flowParseUnionType();return this.state.inType=e,s}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){let e=this.state.startLoc,s=this.parseIdentifier();return this.flowParseGenericType(e,s)}else return this.flowParseType()}flowParseTypeAnnotation(){let e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(e){let s=e?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(s.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(s)),s}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}flowParseVariance(){let e=null;return this.match(53)?(e=this.startNode(),this.state.value==="+"?e.kind="plus":e.kind="minus",this.next(),this.finishNode(e,"Variance")):e}parseFunctionBody(e,s,r=!1){if(s){this.forwardNoArrowParamsConversionAt(e,()=>super.parseFunctionBody(e,!0,r));return}super.parseFunctionBody(e,!1,r)}parseFunctionBodyAndFinish(e,s,r=!1){if(this.match(14)){let a=this.startNode();[a.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=a.typeAnnotation?this.finishNode(a,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,s,r)}parseStatementLike(e){if(this.state.strict&&this.isContextual(129)){let r=this.lookahead();if(X(r.type)){let a=this.startNode();return this.next(),this.flowParseInterface(a)}}else if(this.shouldParseEnums()&&this.isContextual(126)){let r=this.startNode();return this.next(),this.flowParseEnumDeclaration(r)}let s=super.parseStatementLike(e);return this.flowPragma===void 0&&!this.isValidDirective(s)&&(this.flowPragma=null),s}parseExpressionStatement(e,s,r){if(s.type==="Identifier"){if(s.name==="declare"){if(this.match(80)||k(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(k(this.state.type)){if(s.name==="interface")return this.flowParseInterface(e);if(s.name==="type")return this.flowParseTypeAlias(e);if(s.name==="opaque")return this.flowParseOpaqueType(e,!1)}}return super.parseExpressionStatement(e,s,r)}shouldParseExportDeclaration(){let{type:e}=this.state;return ca(e)||this.shouldParseEnums()&&e===126?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:e}=this.state;return ca(e)||this.shouldParseEnums()&&e===126?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual(126)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,s,r){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){let f=this.lookaheadCharCode();if(f===44||f===61||f===58||f===41)return this.setOptionalParametersError(r),e}this.expect(17);let a=this.state.clone(),n=this.state.noArrowAt,o=this.startNodeAt(s),{consequent:u,failed:l}=this.tryParseConditionalConsequent(),[c,p]=this.getArrowLikeExpressions(u);if(l||p.length>0){let f=[...n];if(p.length>0){this.state=a,this.state.noArrowAt=f;for(let m=0;m<p.length;m++)f.push(p[m].start);({consequent:u,failed:l}=this.tryParseConditionalConsequent()),[c,p]=this.getArrowLikeExpressions(u)}l&&c.length>1&&this.raise(T.AmbiguousConditionalArrow,{at:a.startLoc}),l&&c.length===1&&(this.state=a,f.push(c[0].start),this.state.noArrowAt=f,{consequent:u,failed:l}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(u,!0),this.state.noArrowAt=n,this.expect(14),o.test=e,o.consequent=u,o.alternate=this.forwardNoArrowParamsConversionAt(o,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(o,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let e=this.parseMaybeAssignAllowIn(),s=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:s}}getArrowLikeExpressions(e,s){let r=[e],a=[];for(;r.length!==0;){let n=r.pop();n.type==="ArrowFunctionExpression"?(n.typeParameters||!n.returnType?this.finishArrowValidation(n):a.push(n),r.push(n.body)):n.type==="ConditionalExpression"&&(r.push(n.consequent),r.push(n.alternate))}return s?(a.forEach(n=>this.finishArrowValidation(n)),[a,[]]):Sl(a,n=>n.params.every(o=>this.isAssignable(o,!0)))}finishArrowValidation(e){var s;this.toAssignableList(e.params,(s=e.extra)==null?void 0:s.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,s){let r;return this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1?(this.state.noArrowParamsConversionAt.push(this.state.start),r=s(),this.state.noArrowParamsConversionAt.pop()):r=s(),r}parseParenItem(e,s){if(e=super.parseParenItem(e,s),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){let r=this.startNodeAt(s);return r.expression=e,r.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(r,"TypeCastExpression")}return e}assertModuleNodeAllowed(e){e.type==="ImportDeclaration"&&(e.importKind==="type"||e.importKind==="typeof")||e.type==="ExportNamedDeclaration"&&e.exportKind==="type"||e.type==="ExportAllDeclaration"&&e.exportKind==="type"||super.assertModuleNodeAllowed(e)}parseExportDeclaration(e){if(this.isContextual(130)){e.exportKind="type";let s=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(s)}else if(this.isContextual(131)){e.exportKind="type";let s=this.startNode();return this.next(),this.flowParseOpaqueType(s,!1)}else if(this.isContextual(129)){e.exportKind="type";let s=this.startNode();return this.next(),this.flowParseInterface(s)}else if(this.shouldParseEnums()&&this.isContextual(126)){e.exportKind="value";let s=this.startNode();return this.next(),this.flowParseEnumDeclaration(s)}else return super.parseExportDeclaration(e)}eatExportStar(e){return super.eatExportStar(e)?!0:this.isContextual(130)&&this.lookahead().type===55?(e.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(e){let{startLoc:s}=this.state,r=super.maybeParseExportNamespaceSpecifier(e);return r&&e.exportKind==="type"&&this.unexpected(s),r}parseClassId(e,s,r){super.parseClassId(e,s,r),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,s,r){let{startLoc:a}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(e,s))return;s.declare=!0}super.parseClassMember(e,s,r),s.declare&&(s.type!=="ClassProperty"&&s.type!=="ClassPrivateProperty"&&s.type!=="PropertyDefinition"?this.raise(T.DeclareClassElement,{at:a}):s.value&&this.raise(T.DeclareClassFieldInitializer,{at:s.value}))}isIterator(e){return e==="iterator"||e==="asyncIterator"}readIterator(){let e=super.readWord1(),s="@@"+e;(!this.isIterator(e)||!this.state.inType)&&this.raise(h.InvalidIdentifier,{at:this.state.curPosition(),identifierName:s}),this.finishToken(132,s)}getTokenFromCode(e){let s=this.input.charCodeAt(this.state.pos+1);e===123&&s===124?this.finishOp(6,2):this.state.inType&&(e===62||e===60)?this.finishOp(e===62?48:47,1):this.state.inType&&e===63?s===46?this.finishOp(18,2):this.finishOp(17,1):al(e,s,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e)}isAssignable(e,s){return e.type==="TypeCastExpression"?this.isAssignable(e.expression,s):super.isAssignable(e,s)}toAssignable(e,s=!1){!s&&e.type==="AssignmentExpression"&&e.left.type==="TypeCastExpression"&&(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,s)}toAssignableList(e,s,r){for(let a=0;a<e.length;a++){let n=e[a];(n==null?void 0:n.type)==="TypeCastExpression"&&(e[a]=this.typeCastToParameter(n))}super.toAssignableList(e,s,r)}toReferencedList(e,s){for(let a=0;a<e.length;a++){var r;let n=e[a];n&&n.type==="TypeCastExpression"&&!((r=n.extra)!=null&&r.parenthesized)&&(e.length>1||!s)&&this.raise(T.TypeCastInPattern,{at:n.typeAnnotation})}return e}parseArrayLike(e,s,r,a){let n=super.parseArrayLike(e,s,r,a);return s&&!this.state.maybeInArrowParameters&&this.toReferencedList(n.elements),n}isValidLVal(e,s,r){return e==="TypeCastExpression"||super.isValidLVal(e,s,r)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,s,r,a,n,o){if(s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,s,r,a,n,o),s.params&&n){let u=s.params;u.length>0&&this.isThisParam(u[0])&&this.raise(T.ThisParamBannedInConstructor,{at:s})}else if(s.type==="MethodDefinition"&&n&&s.value.params){let u=s.value.params;u.length>0&&this.isThisParam(u[0])&&this.raise(T.ThisParamBannedInConstructor,{at:s})}}pushClassPrivateMethod(e,s,r,a){s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,s,r,a)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&this.match(47)&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(113)){this.next();let s=e.implements=[];do{let r=this.startNode();r.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?r.typeParameters=this.flowParseTypeParameterInstantiation():r.typeParameters=null,s.push(this.finishNode(r,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);let s=this.getObjectOrClassMethodParams(e);if(s.length>0){let r=s[0];this.isThisParam(r)&&e.kind==="get"?this.raise(T.GetterMayNotHaveThisParam,{at:r}):this.isThisParam(r)&&this.raise(T.SetterMayNotHaveThisParam,{at:r})}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,s,r,a,n,o,u){e.variance&&this.unexpected(e.variance.loc.start),delete e.variance;let l;this.match(47)&&!o&&(l=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let c=super.parseObjPropValue(e,s,r,a,n,o,u);return l&&((c.value||c).typeParameters=l),c}parseAssignableListItemTypes(e){return this.eat(17)&&(e.type!=="Identifier"&&this.raise(T.PatternIsOptional,{at:e}),this.isThisParam(e)&&this.raise(T.ThisParamMayNotBeOptional,{at:e}),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(T.ThisParamAnnotationRequired,{at:e}),this.match(29)&&this.isThisParam(e)&&this.raise(T.ThisParamNoDefault,{at:e}),this.resetEndLocation(e),e}parseMaybeDefault(e,s){let r=super.parseMaybeDefault(e,s);return r.type==="AssignmentPattern"&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(T.TypeBeforeInitializer,{at:r.typeAnnotation}),r}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(T.ImportReflectionHasImportType,{at:e.specifiers[0].loc.start})}parseImportSpecifierLocal(e,s,r){s.local=da(e)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(s,r))}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){if(!e)return!0;let s=this.lookaheadCharCode();return s===123||s===42}return!e&&this.isContextual(87)}applyImportPhase(e,s,r,a){if(super.applyImportPhase(e,s,r,a),s){if(!r&&this.match(65))return;e.exportKind=r==="type"?r:"value"}else r==="type"&&this.match(55)&&this.unexpected(),e.importKind=r==="type"||r==="typeof"?r:"value"}parseImportSpecifier(e,s,r,a,n){let o=e.imported,u=null;o.type==="Identifier"&&(o.name==="type"?u="type":o.name==="typeof"&&(u="typeof"));let l=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let p=this.parseIdentifier(!0);u!==null&&!X(this.state.type)?(e.imported=p,e.importKind=u,e.local=ne(p)):(e.imported=o,e.importKind=null,e.local=this.parseIdentifier())}else{if(u!==null&&X(this.state.type))e.imported=this.parseIdentifier(!0),e.importKind=u;else{if(s)throw this.raise(h.ImportBindingIsString,{at:e,importName:o.value});e.imported=o,e.importKind=null}this.eatContextual(93)?e.local=this.parseIdentifier():(l=!0,e.local=ne(e.imported))}let c=da(e);return r&&c&&this.raise(T.ImportTypeShorthandOnlyInPureImport,{at:e}),(r||c)&&this.checkReservedType(e.local.name,e.local.loc.start,!0),l&&!r&&!c&&this.checkReservedWord(e.local.name,e.loc.start,!0,!0),this.finishImportSpecifier(e,"ImportSpecifier")}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(e,s){let r=e.kind;r!=="get"&&r!=="set"&&this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(e,s)}parseVarId(e,s){super.parseVarId(e,s),this.match(14)&&(e.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,s){if(this.match(14)){let r=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,e.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=r}return super.parseAsyncArrowFromCallExpression(e,s)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(e,s){var r;let a=null,n;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(a=this.state.clone(),n=this.tryParse(()=>super.parseMaybeAssign(e,s),a),!n.error)return n.node;let{context:l}=this.state,c=l[l.length-1];(c===N.j_oTag||c===N.j_expr)&&l.pop()}if((r=n)!=null&&r.error||this.match(47)){var o,u;a=a||this.state.clone();let l,c=this.tryParse(f=>{var m;l=this.flowParseTypeParameterDeclaration();let d=this.forwardNoArrowParamsConversionAt(l,()=>{let v=super.parseMaybeAssign(e,s);return this.resetStartLocationFromNode(v,l),v});(m=d.extra)!=null&&m.parenthesized&&f();let y=this.maybeUnwrapTypeCastExpression(d);return y.type!=="ArrowFunctionExpression"&&f(),y.typeParameters=l,this.resetStartLocationFromNode(y,l),d},a),p=null;if(c.node&&this.maybeUnwrapTypeCastExpression(c.node).type==="ArrowFunctionExpression"){if(!c.error&&!c.aborted)return c.node.async&&this.raise(T.UnexpectedTypeParameterBeforeAsyncArrowFunction,{at:l}),c.node;p=c.node}if((o=n)!=null&&o.node)return this.state=n.failState,n.node;if(p)return this.state=c.failState,p;throw(u=n)!=null&&u.thrown?n.error:c.thrown?c.error:this.raise(T.UnexpectedTokenAfterTypeParameter,{at:l})}return super.parseMaybeAssign(e,s)}parseArrow(e){if(this.match(14)){let s=this.tryParse(()=>{let r=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let a=this.startNode();return[a.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=r,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),a});if(s.thrown)return null;s.error&&(this.state=s.failState),e.returnType=s.node.typeAnnotation?this.finishNode(s.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,s){this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1?e.params=s:super.setArrowFunctionParameters(e,s)}checkParams(e,s,r,a=!0){if(!(r&&this.state.noArrowParamsConversionAt.indexOf(e.start)!==-1)){for(let n=0;n<e.params.length;n++)this.isThisParam(e.params[n])&&n>0&&this.raise(T.ThisParamMustBeFirst,{at:e.params[n]});super.checkParams(e,s,r,a)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&this.state.noArrowAt.indexOf(this.state.start)===-1)}parseSubscripts(e,s,r){if(e.type==="Identifier"&&e.name==="async"&&this.state.noArrowAt.indexOf(s.index)!==-1){this.next();let a=this.startNodeAt(s);a.callee=e,a.arguments=super.parseCallExpressionArguments(11,!1),e=this.finishNode(a,"CallExpression")}else if(e.type==="Identifier"&&e.name==="async"&&this.match(47)){let a=this.state.clone(),n=this.tryParse(u=>this.parseAsyncArrowWithTypeParameters(s)||u(),a);if(!n.error&&!n.aborted)return n.node;let o=this.tryParse(()=>super.parseSubscripts(e,s,r),a);if(o.node&&!o.error)return o.node;if(n.node)return this.state=n.failState,n.node;if(o.node)return this.state=o.failState,o.node;throw n.error||o.error}return super.parseSubscripts(e,s,r)}parseSubscript(e,s,r,a){if(this.match(18)&&this.isLookaheadToken_lt()){if(a.optionalChainMember=!0,r)return a.stop=!0,e;this.next();let n=this.startNodeAt(s);return n.callee=e,n.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),n.arguments=this.parseCallExpressionArguments(11,!1),n.optional=!0,this.finishCallExpression(n,!0)}else if(!r&&this.shouldParseTypes()&&this.match(47)){let n=this.startNodeAt(s);n.callee=e;let o=this.tryParse(()=>(n.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),n.arguments=super.parseCallExpressionArguments(11,!1),a.optionalChainMember&&(n.optional=!1),this.finishCallExpression(n,a.optionalChainMember)));if(o.node)return o.error&&(this.state=o.failState),o.node}return super.parseSubscript(e,s,r,a)}parseNewCallee(e){super.parseNewCallee(e);let s=null;this.shouldParseTypes()&&this.match(47)&&(s=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),e.typeArguments=s}parseAsyncArrowWithTypeParameters(e){let s=this.startNodeAt(e);if(this.parseFunctionParams(s,!1),!!this.parseArrow(s))return super.parseArrowExpression(s,void 0,!0)}readToken_mult_modulo(e){let s=this.input.charCodeAt(this.state.pos+1);if(e===42&&s===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(e)}readToken_pipe_amp(e){let s=this.input.charCodeAt(this.state.pos+1);if(e===124&&s===125){this.finishOp(9,2);return}super.readToken_pipe_amp(e)}parseTopLevel(e,s){let r=super.parseTopLevel(e,s);return this.state.hasFlowComment&&this.raise(T.UnterminatedFlowComment,{at:this.state.curPosition()}),r}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(T.NestedFlowComment,{at:this.state.startLoc});this.hasFlowCommentCompletion();let e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:e}=this.state,s=2;for(;[32,9].includes(this.input.charCodeAt(e+s));)s++;let r=this.input.charCodeAt(s+e),a=this.input.charCodeAt(s+e+1);return r===58&&a===58?s+2:this.input.slice(s+e,s+e+12)==="flow-include"?s+12:r===58&&a!==58?s:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(h.UnterminatedComment,{at:this.state.curPosition()})}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:s,memberName:r}){this.raise(T.EnumBooleanMemberNotInitialized,{at:e,memberName:r,enumName:s})}flowEnumErrorInvalidMemberInitializer(e,s){return this.raise(s.explicitType?s.explicitType==="symbol"?T.EnumInvalidMemberInitializerSymbolType:T.EnumInvalidMemberInitializerPrimaryType:T.EnumInvalidMemberInitializerUnknownType,Object.assign({at:e},s))}flowEnumErrorNumberMemberNotInitialized(e,{enumName:s,memberName:r}){this.raise(T.EnumNumberMemberNotInitialized,{at:e,enumName:s,memberName:r})}flowEnumErrorStringMemberInconsistentlyInitialized(e,{enumName:s}){this.raise(T.EnumStringMemberInconsistentlyInitialized,{at:e,enumName:s})}flowEnumMemberInit(){let e=this.state.startLoc,s=()=>this.match(12)||this.match(8);switch(this.state.type){case 134:{let r=this.parseNumericLiteral(this.state.value);return s()?{type:"number",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 133:{let r=this.parseStringLiteral(this.state.value);return s()?{type:"string",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 85:case 86:{let r=this.parseBooleanLiteral(this.match(85));return s()?{type:"boolean",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){let e=this.state.startLoc,s=this.parseIdentifier(!0),r=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e};return{id:s,init:r}}flowEnumCheckExplicitTypeMismatch(e,s,r){let{explicitType:a}=s;a!==null&&a!==r&&this.flowEnumErrorInvalidMemberInitializer(e,s)}flowEnumMembers({enumName:e,explicitType:s}){let r=new Set,a={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},n=!1;for(;!this.match(8);){if(this.eat(21)){n=!0;break}let o=this.startNode(),{id:u,init:l}=this.flowEnumMemberRaw(),c=u.name;if(c==="")continue;/^[a-z]/.test(c)&&this.raise(T.EnumInvalidMemberName,{at:u,memberName:c,suggestion:c[0].toUpperCase()+c.slice(1),enumName:e}),r.has(c)&&this.raise(T.EnumDuplicateMemberName,{at:u,memberName:c,enumName:e}),r.add(c);let p={enumName:e,explicitType:s,memberName:c};switch(o.id=u,l.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(l.loc,p,"boolean"),o.init=l.value,a.booleanMembers.push(this.finishNode(o,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(l.loc,p,"number"),o.init=l.value,a.numberMembers.push(this.finishNode(o,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(l.loc,p,"string"),o.init=l.value,a.stringMembers.push(this.finishNode(o,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(l.loc,p);case"none":switch(s){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(l.loc,p);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(l.loc,p);break;default:a.defaultedMembers.push(this.finishNode(o,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:a,hasUnknownMembers:n}}flowEnumStringMembers(e,s,{enumName:r}){if(e.length===0)return s;if(s.length===0)return e;if(s.length>e.length){for(let a of e)this.flowEnumErrorStringMemberInconsistentlyInitialized(a,{enumName:r});return s}else{for(let a of s)this.flowEnumErrorStringMemberInconsistentlyInitialized(a,{enumName:r});return e}}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(102))return null;if(!k(this.state.type))throw this.raise(T.EnumInvalidExplicitTypeUnknownSupplied,{at:this.state.startLoc,enumName:e});let{value:s}=this.state;return this.next(),s!=="boolean"&&s!=="number"&&s!=="string"&&s!=="symbol"&&this.raise(T.EnumInvalidExplicitType,{at:this.state.startLoc,enumName:e,invalidEnumType:s}),s}flowEnumBody(e,s){let r=s.name,a=s.loc.start,n=this.flowEnumParseExplicitType({enumName:r});this.expect(5);let{members:o,hasUnknownMembers:u}=this.flowEnumMembers({enumName:r,explicitType:n});switch(e.hasUnknownMembers=u,n){case"boolean":return e.explicitType=!0,e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=o.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:{let l=()=>(e.members=[],this.expect(8),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;let c=o.booleanMembers.length,p=o.numberMembers.length,f=o.stringMembers.length,m=o.defaultedMembers.length;if(!c&&!p&&!f&&!m)return l();if(!c&&!p)return e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody");if(!p&&!f&&c>=m){for(let d of o.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(d.loc.start,{enumName:r,memberName:d.id.name});return e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}else if(!c&&!f&&p>=m){for(let d of o.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(d.loc.start,{enumName:r,memberName:d.id.name});return e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}else return this.raise(T.EnumInconsistentMemberValues,{at:a,enumName:r}),l()}}}flowParseEnumDeclaration(e){let s=this.parseIdentifier();return e.id=s,e.body=this.flowEnumBody(this.startNode(),s),this.finishNode(e,"EnumDeclaration")}isLookaheadToken_lt(){let e=this.nextTokenStart();if(this.input.charCodeAt(e)===60){let s=this.input.charCodeAt(e+1);return s!==60&&s!==61}return!1}maybeUnwrapTypeCastExpression(e){return e.type==="TypeCastExpression"?e.expression:e}},Cl={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},ve=ae`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:i})=>`Expected corresponding JSX closing tag for <${i}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:i,HTMLEntity:t})=>`Unexpected token \`${i}\`. Did you mean \`${t}\` or \`{'${i}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"});function he(i){return i?i.type==="JSXOpeningFragment"||i.type==="JSXClosingFragment":!1}function Le(i){if(i.type==="JSXIdentifier")return i.name;if(i.type==="JSXNamespacedName")return i.namespace.name+":"+i.name.name;if(i.type==="JSXMemberExpression")return Le(i.object)+"."+Le(i.property);throw new Error("Node had unexpected type: "+i.type)}var Il=i=>class extends i{jsxReadToken(){let e="",s=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(ve.UnterminatedJsxContent,{at:this.state.startLoc});let r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:if(this.state.pos===this.state.start){r===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(142)):super.getTokenFromCode(r);return}e+=this.input.slice(s,this.state.pos),this.finishToken(141,e);return;case 38:e+=this.input.slice(s,this.state.pos),e+=this.jsxReadEntity(),s=this.state.pos;break;case 62:case 125:default:rt(r)?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadNewLine(!0),s=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){let s=this.input.charCodeAt(this.state.pos),r;return++this.state.pos,s===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,r=e?`
14
- `:`\r
15
- `):r=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,r}jsxReadString(e){let s="",r=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(h.UnterminatedString,{at:this.state.startLoc});let a=this.input.charCodeAt(this.state.pos);if(a===e)break;a===38?(s+=this.input.slice(r,this.state.pos),s+=this.jsxReadEntity(),r=this.state.pos):rt(a)?(s+=this.input.slice(r,this.state.pos),s+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}s+=this.input.slice(r,this.state.pos++),this.finishToken(133,s)}jsxReadEntity(){let e=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let s=10;this.codePointAtPos(this.state.pos)===120&&(s=16,++this.state.pos);let r=this.readInt(s,void 0,!1,"bail");if(r!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(r)}else{let s=0,r=!1;for(;s++<10&&this.state.pos<this.length&&!(r=this.codePointAtPos(this.state.pos)==59);)++this.state.pos;if(r){let a=this.input.slice(e,this.state.pos),n=Cl[a];if(++this.state.pos,n)return n}}return this.state.pos=e,"&"}jsxReadWord(){let e,s=this.state.pos;do e=this.input.charCodeAt(++this.state.pos);while(De(e)||e===45);this.finishToken(140,this.input.slice(s,this.state.pos))}jsxParseIdentifier(){let e=this.startNode();return this.match(140)?e.name=this.state.value:er(this.state.type)?e.name=fe(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){let e=this.state.startLoc,s=this.jsxParseIdentifier();if(!this.eat(14))return s;let r=this.startNodeAt(e);return r.namespace=s,r.name=this.jsxParseIdentifier(),this.finishNode(r,"JSXNamespacedName")}jsxParseElementName(){let e=this.state.startLoc,s=this.jsxParseNamespacedName();if(s.type==="JSXNamespacedName")return s;for(;this.eat(16);){let r=this.startNodeAt(e);r.object=s,r.property=this.jsxParseIdentifier(),s=this.finishNode(r,"JSXMemberExpression")}return s}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext(N.brace),this.next(),e=this.jsxParseExpressionContainer(e,N.j_oTag),e.expression.type==="JSXEmptyExpression"&&this.raise(ve.AttributeIsEmpty,{at:e}),e;case 142:case 133:return this.parseExprAtom();default:throw this.raise(ve.UnsupportedJsxValue,{at:this.state.startLoc})}}jsxParseEmptyExpression(){let e=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(e){return this.next(),e.expression=this.parseExpression(),this.setContext(N.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,s){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{let r=this.parseExpression();e.expression=r}return this.setContext(s),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){let e=this.startNode();return this.match(5)?(this.setContext(N.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(N.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute"))}jsxParseOpeningElementAt(e){let s=this.startNodeAt(e);return this.eat(143)?this.finishNode(s,"JSXOpeningFragment"):(s.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(s))}jsxParseOpeningElementAfterName(e){let s=[];for(;!this.match(56)&&!this.match(143);)s.push(this.jsxParseAttribute());return e.attributes=s,e.selfClosing=this.eat(56),this.expect(143),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e){let s=this.startNodeAt(e);return this.eat(143)?this.finishNode(s,"JSXClosingFragment"):(s.name=this.jsxParseElementName(),this.expect(143),this.finishNode(s,"JSXClosingElement"))}jsxParseElementAt(e){let s=this.startNodeAt(e),r=[],a=this.jsxParseOpeningElementAt(e),n=null;if(!a.selfClosing){e:for(;;)switch(this.state.type){case 142:if(e=this.state.startLoc,this.next(),this.eat(56)){n=this.jsxParseClosingElementAt(e);break e}r.push(this.jsxParseElementAt(e));break;case 141:r.push(this.parseExprAtom());break;case 5:{let o=this.startNode();this.setContext(N.brace),this.next(),this.match(21)?r.push(this.jsxParseSpreadChild(o)):r.push(this.jsxParseExpressionContainer(o,N.j_expr));break}default:this.unexpected()}he(a)&&!he(n)&&n!==null?this.raise(ve.MissingClosingTagFragment,{at:n}):!he(a)&&he(n)?this.raise(ve.MissingClosingTagElement,{at:n,openingTagName:Le(a.name)}):!he(a)&&!he(n)&&Le(n.name)!==Le(a.name)&&this.raise(ve.MissingClosingTagElement,{at:n,openingTagName:Le(a.name)})}if(he(a)?(s.openingFragment=a,s.closingFragment=n):(s.openingElement=a,s.closingElement=n),s.children=r,this.match(47))throw this.raise(ve.UnwrappedAdjacentJSXElements,{at:this.state.startLoc});return he(a)?this.finishNode(s,"JSXFragment"):this.finishNode(s,"JSXElement")}jsxParseElement(){let e=this.state.startLoc;return this.next(),this.jsxParseElementAt(e)}setContext(e){let{context:s}=this.state;s[s.length-1]=e}parseExprAtom(e){return this.match(141)?this.parseLiteral(this.state.value,"JSXText"):this.match(142)?this.jsxParseElement():this.match(47)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(142),this.jsxParseElement()):super.parseExprAtom(e)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(e){let s=this.curContext();if(s===N.j_expr){this.jsxReadToken();return}if(s===N.j_oTag||s===N.j_cTag){if(ie(e)){this.jsxReadWord();return}if(e===62){++this.state.pos,this.finishToken(143);return}if((e===34||e===39)&&s===N.j_oTag){this.jsxReadString(e);return}}if(e===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(142);return}super.getTokenFromCode(e)}updateContext(e){let{context:s,type:r}=this.state;if(r===56&&e===142)s.splice(-2,2,N.j_cTag),this.state.canStartJSXElement=!1;else if(r===142)s.push(N.j_oTag);else if(r===143){let a=s[s.length-1];a===N.j_oTag&&e===56||a===N.j_cTag?(s.pop(),this.state.canStartJSXElement=s[s.length-1]===N.j_expr):(this.setContext(N.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=Wu(r)}},Ws=class extends it{constructor(...t){super(...t),this.types=new Set,this.enums=new Set,this.constEnums=new Set,this.classes=new Set,this.exportOnlyBindings=new Set}},Vs=class extends at{constructor(...t){super(...t),this.importsStack=[]}createScope(t){return this.importsStack.push(new Set),new Ws(t)}enter(t){t==256&&this.importsStack.push(new Set),super.enter(t)}exit(){let t=super.exit();return t==256&&this.importsStack.pop(),t}hasImport(t,e){let s=this.importsStack.length;if(this.importsStack[s-1].has(t))return!0;if(!e&&s>1){for(let r=0;r<s-1;r++)if(this.importsStack[r].has(t))return!0}return!1}declareName(t,e,s){if(e&4096){this.hasImport(t,!0)&&this.parser.raise(h.VarRedeclaration,{at:s,identifierName:t}),this.importsStack[this.importsStack.length-1].add(t);return}let r=this.currentScope();if(e&1024){this.maybeExportDefined(r,t),r.exportOnlyBindings.add(t);return}super.declareName(t,e,s),e&2&&(e&1||(this.checkRedeclarationInScope(r,t,e,s),this.maybeExportDefined(r,t)),r.types.add(t)),e&256&&r.enums.add(t),e&512&&r.constEnums.add(t),e&128&&r.classes.add(t)}isRedeclaredInScope(t,e,s){if(t.enums.has(e)){if(s&256){let r=!!(s&512),a=t.constEnums.has(e);return r!==a}return!0}return s&128&&t.classes.has(e)?t.lexical.has(e)?!!(s&1):!1:s&2&&t.types.has(e)?!0:super.isRedeclaredInScope(t,e,s)}checkLocalExport(t){let{name:e}=t;if(this.hasImport(e))return;let s=this.scopeStack.length;for(let r=s-1;r>=0;r--){let a=this.scopeStack[r];if(a.types.has(e)||a.exportOnlyBindings.has(e))return}super.checkLocalExport(t)}},kl=(i,t)=>Object.hasOwnProperty.call(i,t)&&i[t],La=i=>i.type==="ParenthesizedExpression"?La(i.expression):i,zs=class extends qs{toAssignable(t,e=!1){var s,r;let a;switch((t.type==="ParenthesizedExpression"||(s=t.extra)!=null&&s.parenthesized)&&(a=La(t),e?a.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(h.InvalidParenthesizedAssignment,{at:t}):a.type!=="MemberExpression"&&!this.isOptionalMemberExpression(a)&&this.raise(h.InvalidParenthesizedAssignment,{at:t}):this.raise(h.InvalidParenthesizedAssignment,{at:t})),t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern";for(let o=0,u=t.properties.length,l=u-1;o<u;o++){var n;let c=t.properties[o],p=o===l;this.toAssignableObjectExpressionProp(c,p,e),p&&c.type==="RestElement"&&(n=t.extra)!=null&&n.trailingCommaLoc&&this.raise(h.RestTrailingComma,{at:t.extra.trailingCommaLoc})}break;case"ObjectProperty":{let{key:o,value:u}=t;this.isPrivateName(o)&&this.classScope.usePrivateName(this.getPrivateNameSV(o),o.loc.start),this.toAssignable(u,e);break}case"SpreadElement":throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");case"ArrayExpression":t.type="ArrayPattern",this.toAssignableList(t.elements,(r=t.extra)==null?void 0:r.trailingCommaLoc,e);break;case"AssignmentExpression":t.operator!=="="&&this.raise(h.MissingEqInAssignment,{at:t.left.loc.end}),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(a,e);break}}toAssignableObjectExpressionProp(t,e,s){if(t.type==="ObjectMethod")this.raise(t.kind==="get"||t.kind==="set"?h.PatternHasAccessor:h.PatternHasMethod,{at:t.key});else if(t.type==="SpreadElement"){t.type="RestElement";let r=t.argument;this.checkToRestConversion(r,!1),this.toAssignable(r,s),e||this.raise(h.RestTrailingComma,{at:t})}else this.toAssignable(t,s)}toAssignableList(t,e,s){let r=t.length-1;for(let a=0;a<=r;a++){let n=t[a];if(n){if(n.type==="SpreadElement"){n.type="RestElement";let o=n.argument;this.checkToRestConversion(o,!0),this.toAssignable(o,s)}else this.toAssignable(n,s);n.type==="RestElement"&&(a<r?this.raise(h.RestTrailingComma,{at:n}):e&&this.raise(h.RestTrailingComma,{at:e}))}}}isAssignable(t,e){switch(t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{let s=t.properties.length-1;return t.properties.every((r,a)=>r.type!=="ObjectMethod"&&(a===s||r.type!=="SpreadElement")&&this.isAssignable(r))}case"ObjectProperty":return this.isAssignable(t.value);case"SpreadElement":return this.isAssignable(t.argument);case"ArrayExpression":return t.elements.every(s=>s===null||this.isAssignable(s));case"AssignmentExpression":return t.operator==="=";case"ParenthesizedExpression":return this.isAssignable(t.expression);case"MemberExpression":case"OptionalMemberExpression":return!e;default:return!1}}toReferencedList(t,e){return t}toReferencedListDeep(t,e){this.toReferencedList(t,e);for(let s of t)(s==null?void 0:s.type)==="ArrayExpression"&&this.toReferencedListDeep(s.elements)}parseSpread(t){let e=this.startNode();return this.next(),e.argument=this.parseMaybeAssignAllowIn(t,void 0),this.finishNode(e,"SpreadElement")}parseRestBinding(){let t=this.startNode();return this.next(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let t=this.startNode();return this.next(),t.elements=this.parseBindingList(3,93,1),this.finishNode(t,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(t,e,s){let r=s&1,a=[],n=!0;for(;!this.eat(t);)if(n?n=!1:this.expect(12),r&&this.match(12))a.push(null);else{if(this.eat(t))break;if(this.match(21)){if(a.push(this.parseAssignableListItemTypes(this.parseRestBinding(),s)),!this.checkCommaAfterRest(e)){this.expect(t);break}}else{let o=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(h.UnsupportedParameterDecorator,{at:this.state.startLoc});this.match(26);)o.push(this.parseDecorator());a.push(this.parseAssignableListItem(s,o))}}return a}parseBindingRestProperty(t){return this.next(),t.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(t,"RestElement")}parseBindingProperty(){let t=this.startNode(),{type:e,startLoc:s}=this.state;return e===21?this.parseBindingRestProperty(t):(e===138?(this.expectPlugin("destructuringPrivate",s),this.classScope.usePrivateName(this.state.value,s),t.key=this.parsePrivateName()):this.parsePropertyName(t),t.method=!1,this.parseObjPropValue(t,s,!1,!1,!0,!1))}parseAssignableListItem(t,e){let s=this.parseMaybeDefault();this.parseAssignableListItemTypes(s,t);let r=this.parseMaybeDefault(s.loc.start,s);return e.length&&(s.decorators=e),r}parseAssignableListItemTypes(t,e){return t}parseMaybeDefault(t,e){var s,r;if((s=t)!=null||(t=this.state.startLoc),e=(r=e)!=null?r:this.parseBindingAtom(),!this.eat(29))return e;let a=this.startNodeAt(t);return a.left=e,a.right=this.parseMaybeAssignAllowIn(),this.finishNode(a,"AssignmentPattern")}isValidLVal(t,e,s){return kl({AssignmentPattern:"left",RestElement:"argument",ObjectProperty:"value",ParenthesizedExpression:"expression",ArrayPattern:"elements",ObjectPattern:"properties"},t)}isOptionalMemberExpression(t){return t.type==="OptionalMemberExpression"}checkLVal(t,{in:e,binding:s=64,checkClashes:r=!1,strictModeChanged:a=!1,hasParenthesizedAncestor:n=!1}){var o;let u=t.type;if(this.isObjectMethod(t))return;let l=this.isOptionalMemberExpression(t);if(l||u==="MemberExpression"){l&&(this.expectPlugin("optionalChainingAssign",t.loc.start),e.type!=="AssignmentExpression"&&this.raise(h.InvalidLhsOptionalChaining,{at:t,ancestor:e})),s!==64&&this.raise(h.InvalidPropertyBindingPattern,{at:t});return}if(u==="Identifier"){this.checkIdentifier(t,s,a);let{name:d}=t;r&&(r.has(d)?this.raise(h.ParamDupe,{at:t}):r.add(d));return}let c=this.isValidLVal(u,!(n||(o=t.extra)!=null&&o.parenthesized)&&e.type==="AssignmentExpression",s);if(c===!0)return;if(c===!1){let d=s===64?h.InvalidLhs:h.InvalidLhsBinding;this.raise(d,{at:t,ancestor:e});return}let[p,f]=Array.isArray(c)?c:[c,u==="ParenthesizedExpression"],m=u==="ArrayPattern"||u==="ObjectPattern"?{type:u}:e;for(let d of[].concat(t[p]))d&&this.checkLVal(d,{in:m,binding:s,checkClashes:r,strictModeChanged:a,hasParenthesizedAncestor:f})}checkIdentifier(t,e,s=!1){this.state.strict&&(s?Ia(t.name,this.inModule):Ca(t.name))&&(e===64?this.raise(h.StrictEvalArguments,{at:t,referenceName:t.name}):this.raise(h.StrictEvalArgumentsBinding,{at:t,bindingName:t.name})),e&8192&&t.name==="let"&&this.raise(h.LetInLexicalBinding,{at:t}),e&64||this.declareNameFromIdentifier(t,e)}declareNameFromIdentifier(t,e){this.scope.declareName(t.name,e,t.loc.start)}checkToRestConversion(t,e){switch(t.type){case"ParenthesizedExpression":this.checkToRestConversion(t.expression,e);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(e)break;default:this.raise(h.InvalidRestAssignmentPattern,{at:t})}}checkCommaAfterRest(t){return this.match(12)?(this.raise(this.lookaheadCharCode()===t?h.RestTrailingComma:h.ElementAfterRest,{at:this.state.startLoc}),!0):!1}},Nl=(i,t)=>Object.hasOwnProperty.call(i,t)&&i[t];function _l(i){if(i==null)throw new Error(`Unexpected ${i} value.`);return i}function ma(i){if(!i)throw new Error("Assert fail")}var g=ae`typescript`({AbstractMethodHasImplementation:({methodName:i})=>`Method '${i}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:i})=>`Property '${i}' cannot have an initializer because it is marked abstract.`,AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:i})=>`'declare' is not allowed in ${i}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:i})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:i})=>`Duplicate modifier: '${i}'.`,EmptyHeritageClauseType:({token:i})=>`'${i}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:i})=>`'${i[0]}' modifier cannot be used with '${i[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:i})=>`Index signatures cannot have an accessibility modifier ('${i}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:i})=>`'${i}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:i})=>`'${i}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:i})=>`'${i}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:i})=>`'${i[0]}' modifier must precede '${i[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:i})=>`Private elements cannot have an accessibility modifier ('${i}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:i})=>`Single type parameter ${i} should have a trailing comma. Example usage: <${i},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:i})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${i}.`});function Ol(i){switch(i){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function ya(i){return i==="private"||i==="public"||i==="protected"}function Ml(i){return i==="in"||i==="out"}var Ll=i=>class extends i{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:g.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:g.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:g.InvalidModifierOnTypeParameter})}getScopeHandler(){return Vs}tsIsIdentifier(){return k(this.state.type)}tsTokenCanFollowModifier(){return(this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(138)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(),this.tsTokenCanFollowModifier()}tsParseModifier(e,s){if(!k(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let r=this.state.value;if(e.indexOf(r)!==-1){if(s&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return r}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:s,stopOnStartOfClassStaticBlock:r,errorTemplate:a=g.InvalidModifierOnTypeMember},n){let o=(l,c,p,f)=>{c===p&&n[f]&&this.raise(g.InvalidModifiersOrder,{at:l,orderedModifiers:[p,f]})},u=(l,c,p,f)=>{(n[p]&&c===f||n[f]&&c===p)&&this.raise(g.IncompatibleModifiers,{at:l,modifiers:[p,f]})};for(;;){let{startLoc:l}=this.state,c=this.tsParseModifier(e.concat(s??[]),r);if(!c)break;ya(c)?n.accessibility?this.raise(g.DuplicateAccessibilityModifier,{at:l,modifier:c}):(o(l,c,c,"override"),o(l,c,c,"static"),o(l,c,c,"readonly"),n.accessibility=c):Ml(c)?(n[c]&&this.raise(g.DuplicateModifier,{at:l,modifier:c}),n[c]=!0,o(l,c,"in","out")):(Object.hasOwnProperty.call(n,c)?this.raise(g.DuplicateModifier,{at:l,modifier:c}):(o(l,c,"static","readonly"),o(l,c,"static","override"),o(l,c,"override","readonly"),o(l,c,"abstract","override"),u(l,c,"declare","override"),u(l,c,"static","abstract")),n[c]=!0),s!=null&&s.includes(c)&&this.raise(a,{at:l,modifier:c})}}tsIsListTerminator(e){switch(e){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(e,s){let r=[];for(;!this.tsIsListTerminator(e);)r.push(s());return r}tsParseDelimitedList(e,s,r){return _l(this.tsParseDelimitedListWorker(e,s,!0,r))}tsParseDelimitedListWorker(e,s,r,a){let n=[],o=-1;for(;!this.tsIsListTerminator(e);){o=-1;let u=s();if(u==null)return;if(n.push(u),this.eat(12)){o=this.state.lastTokStart;continue}if(this.tsIsListTerminator(e))break;r&&this.expect(12);return}return a&&(a.value=o),n}tsParseBracketedList(e,s,r,a,n){a||(r?this.expect(0):this.expect(47));let o=this.tsParseDelimitedList(e,s,n);return r?this.expect(3):this.expect(48),o}tsParseImportType(){let e=this.startNode();return this.expect(83),this.expect(10),this.match(133)||this.raise(g.UnsupportedImportTypeArgument,{at:this.state.startLoc}),e.argument=super.parseExprAtom(),this.expect(11),this.eat(16)&&(e.qualifier=this.tsParseEntityName()),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseEntityName(e=!0){let s=this.parseIdentifier(e);for(;this.eat(16);){let r=this.startNodeAtNode(s);r.left=s,r.right=this.parseIdentifier(e),s=this.finishNode(r,"TSQualifiedName")}return s}tsParseTypeReference(){let e=this.startNode();return e.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();let s=this.startNodeAtNode(e);return s.parameterName=e,s.typeAnnotation=this.tsParseTypeAnnotation(!1),s.asserts=!1,this.finishNode(s,"TSTypePredicate")}tsParseThisTypeNode(){let e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){let e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(e){let s=this.startNode();return e(s),s.name=this.tsParseTypeParameterName(),s.constraint=this.tsEatThenParseType(81),s.default=this.tsEatThenParseType(29),this.finishNode(s,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){let s=this.startNode();this.match(47)||this.match(142)?this.next():this.unexpected();let r={value:-1};return s.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,r),s.params.length===0&&this.raise(g.EmptyTypeParameters,{at:s}),r.value!==-1&&this.addExtra(s,"trailingComma",r.value),this.finishNode(s,"TSTypeParameterDeclaration")}tsFillSignature(e,s){let r=e===19,a="parameters",n="typeAnnotation";s.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),s[a]=this.tsParseBindingListForSignature(),r?s[n]=this.tsParseTypeOrTypePredicateAnnotation(e):this.match(e)&&(s[n]=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){let e=super.parseBindingList(11,41,2);for(let s of e){let{type:r}=s;(r==="AssignmentPattern"||r==="TSParameterProperty")&&this.raise(g.UnsupportedSignatureParameterKind,{at:s,type:r})}return e}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(e,s){return this.tsFillSignature(14,s),this.tsParseTypeMemberSemicolon(),this.finishNode(s,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),k(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(e){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let s=this.parseIdentifier();s.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(s),this.expect(3),e.parameters=[s];let r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,s){this.eat(17)&&(e.optional=!0);let r=e;if(this.match(10)||this.match(47)){s&&this.raise(g.ReadonlyForMethodSignature,{at:e});let a=r;a.kind&&this.match(47)&&this.raise(g.AccesorCannotHaveTypeParameters,{at:this.state.curPosition()}),this.tsFillSignature(14,a),this.tsParseTypeMemberSemicolon();let n="parameters",o="typeAnnotation";if(a.kind==="get")a[n].length>0&&(this.raise(h.BadGetterArity,{at:this.state.curPosition()}),this.isThisParam(a[n][0])&&this.raise(g.AccesorCannotDeclareThisParameter,{at:this.state.curPosition()}));else if(a.kind==="set"){if(a[n].length!==1)this.raise(h.BadSetterArity,{at:this.state.curPosition()});else{let u=a[n][0];this.isThisParam(u)&&this.raise(g.AccesorCannotDeclareThisParameter,{at:this.state.curPosition()}),u.type==="Identifier"&&u.optional&&this.raise(g.SetAccesorCannotHaveOptionalParameter,{at:this.state.curPosition()}),u.type==="RestElement"&&this.raise(g.SetAccesorCannotHaveRestParameter,{at:this.state.curPosition()})}a[o]&&this.raise(g.SetAccesorCannotHaveReturnType,{at:a[o]})}else a.kind="method";return this.finishNode(a,"TSMethodSignature")}else{let a=r;s&&(a.readonly=!0);let n=this.tsTryParseTypeAnnotation();return n&&(a.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(a,"TSPropertySignature")}}tsParseTypeMember(){let e=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(77)){let r=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(r,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},e);let s=this.tsTryParseIndexSignature(e);return s||(super.parsePropertyName(e),!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.tsTokenCanFollowModifier()&&(e.kind=e.key.name,super.parsePropertyName(e)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){let e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),e}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedTypeParameter(){let e=this.startNode();return e.name=this.tsParseTypeParameterName(),e.constraint=this.tsExpectThenParseType(58),this.finishNode(e,"TSTypeParameter")}tsParseMappedType(){let e=this.startNode();return this.expect(5),this.match(53)?(e.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(e.readonly=!0),this.expect(0),e.typeParameter=this.tsParseMappedTypeParameter(),e.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(e.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(e,"TSMappedType")}tsParseTupleType(){let e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let s=!1;return e.elementTypes.forEach(r=>{let{type:a}=r;s&&a!=="TSRestType"&&a!=="TSOptionalType"&&!(a==="TSNamedTupleMember"&&r.optional)&&this.raise(g.OptionalTypeBeforeRequired,{at:r}),s||(s=a==="TSNamedTupleMember"&&r.optional||a==="TSOptionalType")}),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){let{startLoc:e}=this.state,s=this.eat(21),r,a,n,o,l=X(this.state.type)?this.lookaheadCharCode():null;if(l===58)r=!0,n=!1,a=this.parseIdentifier(!0),this.expect(14),o=this.tsParseType();else if(l===63){n=!0;let c=this.state.startLoc,p=this.state.value,f=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(r=!0,a=this.createIdentifier(this.startNodeAt(c),p),this.expect(17),this.expect(14),o=this.tsParseType()):(r=!1,o=f,this.expect(17))}else o=this.tsParseType(),n=this.eat(17),r=this.eat(14);if(r){let c;a?(c=this.startNodeAtNode(a),c.optional=n,c.label=a,c.elementType=o,this.eat(17)&&(c.optional=!0,this.raise(g.TupleOptionalAfterType,{at:this.state.lastTokStartLoc}))):(c=this.startNodeAtNode(o),c.optional=n,this.raise(g.InvalidTupleMemberLabel,{at:o}),c.label=o,c.elementType=this.tsParseType()),o=this.finishNode(c,"TSNamedTupleMember")}else if(n){let c=this.startNodeAtNode(o);c.typeAnnotation=o,o=this.finishNode(c,"TSOptionalType")}if(s){let c=this.startNodeAt(e);c.typeAnnotation=o,o=this.finishNode(c,"TSRestType")}return o}tsParseParenthesizedType(){let e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,s){let r=this.startNode();return e==="TSConstructorType"&&(r.abstract=!!s,s&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,r)),this.finishNode(r,e)}tsParseLiteralTypeNode(){let e=this.startNode();switch(this.state.type){case 134:case 135:case 133:case 85:case 86:e.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){let e=this.startNode();return e.literal=super.parseTemplate(!1),this.finishNode(e,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let e=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case 133:case 134:case 135:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let e=this.startNode(),s=this.lookahead();return s.type!==134&&s.type!==135&&this.unexpected(),e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:e}=this.state;if(k(e)||e===88||e===84){let s=e===88?"TSVoidKeyword":e===84?"TSNullKeyword":Ol(this.state.value);if(s!==void 0&&this.lookaheadCharCode()!==46){let r=this.startNode();return this.next(),this.finishNode(r,s)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let s=this.startNodeAtNode(e);s.elementType=e,this.expect(3),e=this.finishNode(s,"TSArrayType")}else{let s=this.startNodeAtNode(e);s.objectType=e,s.indexType=this.tsParseType(),this.expect(3),e=this.finishNode(s,"TSIndexedAccessType")}return e}tsParseTypeOperator(){let e=this.startNode(),s=this.state.value;return this.next(),e.operator=s,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),s==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(g.UnexpectedReadonly,{at:e})}}tsParseInferType(){let e=this.startNode();this.expectContextual(115);let s=this.startNode();return s.name=this.tsParseTypeParameterName(),s.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),e.typeParameter=this.finishNode(s,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let e=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return e}}tsParseTypeOperatorOrHigher(){return Xu(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(e,s,r){let a=this.startNode(),n=this.eat(r),o=[];do o.push(s());while(this.eat(r));return o.length===1&&!n?o[0]:(a.types=o,this.finishNode(a,e))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(k(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:e}=this.state,s=e.length;try{return this.parseObjectLike(8,!0),e.length===s}catch{return!1}}if(this.match(0)){this.next();let{errors:e}=this.state,s=e.length;try{return super.parseBindingList(3,93,1),e.length===s}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType(()=>{let s=this.startNode();this.expect(e);let r=this.startNode(),a=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(a&&this.match(78)){let u=this.tsParseThisTypeOrThisTypePredicate();return u.type==="TSThisType"?(r.parameterName=u,r.asserts=!0,r.typeAnnotation=null,u=this.finishNode(r,"TSTypePredicate")):(this.resetStartLocationFromNode(u,r),u.asserts=!0),s.typeAnnotation=u,this.finishNode(s,"TSTypeAnnotation")}let n=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!n)return a?(r.parameterName=this.parseIdentifier(),r.asserts=a,r.typeAnnotation=null,s.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(s,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,s);let o=this.tsParseTypeAnnotation(!1);return r.parameterName=n,r.typeAnnotation=o,r.asserts=a,s.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(s,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let e=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let e=this.state.containsEsc;return this.next(),!k(this.state.type)&&!this.match(78)?!1:(e&&this.raise(h.InvalidEscapedReservedWord,{at:this.state.lastTokStartLoc,reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(e=!0,s=this.startNode()){return this.tsInType(()=>{e&&this.expect(14),s.typeAnnotation=this.tsParseType()}),this.finishNode(s,"TSTypeAnnotation")}tsParseType(){ma(this.state.inType);let e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;let s=this.startNodeAtNode(e);return s.checkType=e,s.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),s.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),s.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(s,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.lookahead().type===77}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(g.ReservedTypeAssertion,{at:this.state.startLoc});let e=this.startNode();return e.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}tsParseHeritageClause(e){let s=this.state.startLoc,r=this.tsParseDelimitedList("HeritageClauseElement",()=>{let a=this.startNode();return a.expression=this.tsParseEntityName(),this.match(47)&&(a.typeParameters=this.tsParseTypeArguments()),this.finishNode(a,"TSExpressionWithTypeArguments")});return r.length||this.raise(g.EmptyHeritageClauseType,{at:s,token:e}),r}tsParseInterfaceDeclaration(e,s={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),s.declare&&(e.declare=!0),k(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(g.MissingInterfaceName,{at:this.state.startLoc})),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));let r=this.startNode();return r.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(r,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdentifier(),this.checkIdentifier(e.id,2),e.typeAnnotation=this.tsInType(()=>{if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookahead().type!==16){let s=this.startNode();return this.next(),this.finishNode(s,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInNoContext(e){let s=this.state.context;this.state.context=[s[0]];try{return e()}finally{this.state.context=s}}tsInType(e){let s=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=s}}tsInDisallowConditionalTypesContext(e){let s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=s}}tsInAllowConditionalTypesContext(e){let s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=s}}tsEatThenParseType(e){if(this.match(e))return this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsInType(()=>(this.expect(e),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let e=this.startNode();return e.id=this.match(133)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,s={}){return s.const&&(e.const=!0),s.declare&&(e.declare=!0),this.expectContextual(126),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumDeclaration")}tsParseModuleBlock(){let e=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,s=!1){if(e.id=this.parseIdentifier(),s||this.checkIdentifier(e.id,1024),this.eat(16)){let r=this.startNode();this.tsParseModuleOrNamespaceDeclaration(r,!0),e.body=r}else this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(112)?(e.global=!0,e.id=this.parseIdentifier()):this.match(133)?e.id=super.parseStringLiteral(this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(256),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,s,r){e.isExport=r||!1,e.id=s||this.parseIdentifier(),this.checkIdentifier(e.id,4096),this.expect(29);let a=this.tsParseModuleReference();return e.importKind==="type"&&a.type!=="TSExternalModuleReference"&&this.raise(g.ImportAliasHasImportType,{at:a}),e.moduleReference=a,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){let e=this.startNode();return this.expectContextual(119),this.expect(10),this.match(133)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){let s=this.state.clone(),r=e();return this.state=s,r}tsTryParseAndCatch(e){let s=this.tryParse(r=>e()||r());if(!(s.aborted||!s.node))return s.error&&(this.state=s.failState),s.node}tsTryParse(e){let s=this.state.clone(),r=e();if(r!==void 0&&r!==!1)return r;this.state=s}tsTryParseDeclare(e){if(this.isLineTerminator())return;let s=this.state.type,r;return this.isContextual(100)&&(s=74,r="let"),this.tsInAmbientContext(()=>{switch(s){case 68:return e.declare=!0,super.parseFunctionStatement(e,!1,!1);case 80:return e.declare=!0,this.parseClass(e,!0,!1);case 126:return this.tsParseEnumDeclaration(e,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(e);case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(e.declare=!0,this.parseVarStatement(e,r||this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0}));case 129:{let a=this.tsParseInterfaceDeclaration(e,{declare:!0});if(a)return a}default:if(k(s))return this.tsParseDeclaration(e,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(e,s,r){switch(s.name){case"declare":{let a=this.tsTryParseDeclare(e);return a&&(a.declare=!0),a}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);let a=e;return a.global=!0,a.id=s,a.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(a,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,s.name,!1,r)}}tsParseDeclaration(e,s,r,a){switch(s){case"abstract":if(this.tsCheckLineTerminator(r)&&(this.match(80)||k(this.state.type)))return this.tsParseAbstractDeclaration(e,a);break;case"module":if(this.tsCheckLineTerminator(r)){if(this.match(133))return this.tsParseAmbientExternalModuleDeclaration(e);if(k(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(r)&&k(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(r)&&k(this.state.type))return this.tsParseTypeAliasDeclaration(e);break}}tsCheckLineTerminator(e){return e?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(47))return;let s=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let r=this.tsTryParseAndCatch(()=>{let a=this.startNodeAt(e);return a.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(a),a.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),a});if(this.state.maybeInArrowParameters=s,!!r)return super.parseArrowExpression(r,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let e=this.startNode();return e.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),e.params.length===0?this.raise(g.EmptyTypeArguments,{at:e}):!this.state.inType&&this.curContext()===N.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return Ju(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(e,s){let r=this.state.startLoc,a={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},a);let n=a.accessibility,o=a.override,u=a.readonly;!(e&4)&&(n||u||o)&&this.raise(g.UnexpectedParameterModifier,{at:r});let l=this.parseMaybeDefault();this.parseAssignableListItemTypes(l,e);let c=this.parseMaybeDefault(l.loc.start,l);if(n||u||o){let p=this.startNodeAt(r);return s.length&&(p.decorators=s),n&&(p.accessibility=n),u&&(p.readonly=u),o&&(p.override=o),c.type!=="Identifier"&&c.type!=="AssignmentPattern"&&this.raise(g.UnsupportedParameterPropertyKind,{at:p}),p.parameter=c,this.finishNode(p,"TSParameterProperty")}return s.length&&(l.decorators=s),c}isSimpleParameter(e){return e.type==="TSParameterProperty"&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(let s of e.params)s.type!=="Identifier"&&s.optional&&!this.state.isAmbientContext&&this.raise(g.PatternIsOptional,{at:s})}setArrowFunctionParameters(e,s,r){super.setArrowFunctionParameters(e,s,r),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,s,r=!1){this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let a=s==="FunctionDeclaration"?"TSDeclareFunction":s==="ClassMethod"||s==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return a&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,a):a==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(g.DeclareFunctionHasImplementation,{at:e}),e.declare)?super.parseFunctionBodyAndFinish(e,a,r):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,s,r))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach(s=>{(s==null?void 0:s.type)==="TSTypeCastExpression"&&this.raise(g.UnexpectedTypeAnnotation,{at:s.typeAnnotation})})}toReferencedList(e,s){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,s,r,a){let n=super.parseArrayLike(e,s,r,a);return n.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(n.elements),n}parseSubscript(e,s,r,a){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let o=this.startNodeAt(s);return o.expression=e,this.finishNode(o,"TSNonNullExpression")}let n=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(r)return a.stop=!0,e;a.optionalChainMember=n=!0,this.next()}if(this.match(47)||this.match(51)){let o,u=this.tsTryParseAndCatch(()=>{if(!r&&this.atPossibleAsyncArrow(e)){let f=this.tsTryParseGenericAsyncArrowFunction(s);if(f)return f}let l=this.tsParseTypeArgumentsInExpression();if(!l)return;if(n&&!this.match(10)){o=this.state.curPosition();return}if(Wt(this.state.type)){let f=super.parseTaggedTemplateExpression(e,s,a);return f.typeParameters=l,f}if(!r&&this.eat(10)){let f=this.startNodeAt(s);return f.callee=e,f.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(f.arguments),f.typeParameters=l,a.optionalChainMember&&(f.optional=n),this.finishCallExpression(f,a.optionalChainMember)}let c=this.state.type;if(c===48||c===52||c!==10&&Is(c)&&!this.hasPrecedingLineBreak())return;let p=this.startNodeAt(s);return p.expression=e,p.typeParameters=l,this.finishNode(p,"TSInstantiationExpression")});if(o&&this.unexpected(o,10),u)return u.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(g.InvalidPropertyAccessAfterInstantiationExpression,{at:this.state.startLoc}),u}return super.parseSubscript(e,s,r,a)}parseNewCallee(e){var s;super.parseNewCallee(e);let{callee:r}=e;r.type==="TSInstantiationExpression"&&!((s=r.extra)!=null&&s.parenthesized)&&(e.typeParameters=r.typeParameters,e.callee=r.expression)}parseExprOp(e,s,r){let a;if(Rt(58)>r&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(a=this.isContextual(120)))){let n=this.startNodeAt(s);return n.expression=e,n.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(a&&this.raise(h.UnexpectedKeyword,{at:this.state.startLoc,keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(n,a?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(n,s,r)}return super.parseExprOp(e,s,r)}checkReservedWord(e,s,r,a){this.state.isAmbientContext||super.checkReservedWord(e,s,r,a)}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(g.ImportReflectionHasImportType,{at:e.specifiers[0].loc.start})}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){let s=this.lookaheadCharCode();return e?s===123||s===42:s!==61}return!e&&this.isContextual(87)}applyImportPhase(e,s,r,a){super.applyImportPhase(e,s,r,a),s?e.exportKind=r==="type"?"type":"value":e.importKind=r==="type"||r==="typeof"?r:"value"}parseImport(e){if(this.match(133))return e.importKind="value",super.parseImport(e);let s;if(k(this.state.type)&&this.lookaheadCharCode()===61)return e.importKind="value",this.tsParseImportEqualsDeclaration(e);if(this.isContextual(130)){let r=this.parseMaybeImportPhase(e,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(e,r);s=super.parseImportSpecifiersAndAfter(e,r)}else s=super.parseImport(e);return s.importKind==="type"&&s.specifiers.length>1&&s.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(g.TypeImportCannotSpecifyDefaultAndNamed,{at:s}),s}parseExport(e,s){if(this.match(83)){this.next();let r=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?r=this.parseMaybeImportPhase(e,!1):e.importKind="value",this.tsParseImportEqualsDeclaration(e,r,!0)}else if(this.eat(29)){let r=e;return r.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(r,"TSExportAssignment")}else if(this.eatContextual(93)){let r=e;return this.expectContextual(128),r.id=this.parseIdentifier(),this.semicolon(),this.finishNode(r,"TSNamespaceExportDeclaration")}else return super.parseExport(e,s)}isAbstractClass(){return this.isContextual(124)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){let e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(129)){let e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,s,r=!1){let{isAmbientContext:a}=this.state,n=super.parseVarStatement(e,s,r||a);if(!a)return n;for(let{id:o,init:u}of n.declarations)u&&(s!=="const"||o.typeAnnotation?this.raise(g.InitializerNotAllowedInAmbientContext,{at:u}):Bl(u,this.hasPlugin("estree"))||this.raise(g.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference,{at:u}));return n}parseStatementContent(e,s){if(this.match(75)&&this.isLookaheadContextual("enum")){let r=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(r,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){let r=this.tsParseInterfaceDeclaration(this.startNode());if(r)return r}return super.parseStatementContent(e,s)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,s){return s.some(r=>ya(r)?e.accessibility===r:!!e[r])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(e,s,r){let a=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:a,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:g.InvalidModifierOnTypeParameterPositions},s);let n=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(s,a)&&this.raise(g.StaticBlockCannotHaveModifier,{at:this.state.curPosition()}),super.parseClassStaticBlock(e,s)):this.parseClassMemberWithIsStatic(e,s,r,!!s.static)};s.declare?this.tsInAmbientContext(n):n()}parseClassMemberWithIsStatic(e,s,r,a){let n=this.tsTryParseIndexSignature(s);if(n){e.body.push(n),s.abstract&&this.raise(g.IndexSignatureHasAbstract,{at:s}),s.accessibility&&this.raise(g.IndexSignatureHasAccessibility,{at:s,modifier:s.accessibility}),s.declare&&this.raise(g.IndexSignatureHasDeclare,{at:s}),s.override&&this.raise(g.IndexSignatureHasOverride,{at:s});return}!this.state.inAbstractClass&&s.abstract&&this.raise(g.NonAbstractClassHasAbstractMethod,{at:s}),s.override&&(r.hadSuperClass||this.raise(g.OverrideNotInSubClass,{at:s})),super.parseClassMemberWithIsStatic(e,s,r,a)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(g.ClassMethodHasReadonly,{at:e}),e.declare&&this.match(10)&&this.raise(g.ClassMethodHasDeclare,{at:e})}parseExpressionStatement(e,s,r){return(s.type==="Identifier"?this.tsParseExpressionStatement(e,s,r):void 0)||super.parseExpressionStatement(e,s,r)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(e,s,r){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(e,s,r);let a=this.tryParse(()=>super.parseConditional(e,s));return a.node?(a.error&&(this.state=a.failState),a.node):(a.error&&super.setOptionalParametersError(r,a.error),e)}parseParenItem(e,s){if(e=super.parseParenItem(e,s),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){let r=this.startNodeAt(s);return r.expression=e,r.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(r,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(e));let s=this.state.startLoc,r=this.eatContextual(125);if(r&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(g.ExpectedAmbientAfterExportDeclare,{at:this.state.startLoc});let n=k(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return n?((n.type==="TSInterfaceDeclaration"||n.type==="TSTypeAliasDeclaration"||r)&&(e.exportKind="type"),r&&(this.resetStartLocation(n,s),n.declare=!0),n):null}parseClassId(e,s,r,a){if((!s||r)&&this.isContextual(113))return;super.parseClassId(e,s,r,e.declare?1024:8331);let n=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);n&&(e.typeParameters=n)}parseClassPropertyAnnotation(e){e.optional||(this.eat(35)?e.definite=!0:this.eat(17)&&(e.optional=!0));let s=this.tsTryParseTypeAnnotation();s&&(e.typeAnnotation=s)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&!(e.readonly&&!e.typeAnnotation)&&this.match(29)&&this.raise(g.DeclareClassFieldHasInitializer,{at:this.state.startLoc}),e.abstract&&this.match(29)){let{key:s}=e;this.raise(g.AbstractPropertyHasInitializer,{at:this.state.startLoc,propertyName:s.type==="Identifier"&&!e.computed?s.name:`[${this.input.slice(s.start,s.end)}]`})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(g.PrivateElementHasAbstract,{at:e}),e.accessibility&&this.raise(g.PrivateElementHasAccessibility,{at:e,modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(g.AccessorCannotBeOptional,{at:e}),super.parseClassAccessorProperty(e)}pushClassMethod(e,s,r,a,n,o){let u=this.tsTryParseTypeParameters(this.tsParseConstModifier);u&&n&&this.raise(g.ConstructorHasTypeParameters,{at:u});let{declare:l=!1,kind:c}=s;l&&(c==="get"||c==="set")&&this.raise(g.DeclareAccessor,{at:s,kind:c}),u&&(s.typeParameters=u),super.pushClassMethod(e,s,r,a,n,o)}pushClassPrivateMethod(e,s,r,a){let n=this.tsTryParseTypeParameters(this.tsParseConstModifier);n&&(s.typeParameters=n),super.pushClassPrivateMethod(e,s,r,a)}declareClassPrivateMethodInScope(e,s){e.type!=="TSDeclareMethod"&&(e.type==="MethodDefinition"&&!e.value.body||super.declareClassPrivateMethodInScope(e,s))}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,s,r,a,n,o,u){let l=this.tsTryParseTypeParameters(this.tsParseConstModifier);return l&&(e.typeParameters=l),super.parseObjPropValue(e,s,r,a,n,o,u)}parseFunctionParams(e,s){let r=this.tsTryParseTypeParameters(this.tsParseConstModifier);r&&(e.typeParameters=r),super.parseFunctionParams(e,s)}parseVarId(e,s){super.parseVarId(e,s),e.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);let r=this.tsTryParseTypeAnnotation();r&&(e.id.typeAnnotation=r,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,s){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,s)}parseMaybeAssign(e,s){var r,a,n,o,u;let l,c,p;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(l=this.state.clone(),c=this.tryParse(()=>super.parseMaybeAssign(e,s),l),!c.error)return c.node;let{context:d}=this.state,y=d[d.length-1];(y===N.j_oTag||y===N.j_expr)&&d.pop()}if(!((r=c)!=null&&r.error)&&!this.match(47))return super.parseMaybeAssign(e,s);(!l||l===this.state)&&(l=this.state.clone());let f,m=this.tryParse(d=>{var y,v;f=this.tsParseTypeParameters(this.tsParseConstModifier);let S=super.parseMaybeAssign(e,s);return(S.type!=="ArrowFunctionExpression"||(y=S.extra)!=null&&y.parenthesized)&&d(),((v=f)==null?void 0:v.params.length)!==0&&this.resetStartLocationFromNode(S,f),S.typeParameters=f,S},l);if(!m.error&&!m.aborted)return f&&this.reportReservedArrowTypeParam(f),m.node;if(!c&&(ma(!this.hasPlugin("jsx")),p=this.tryParse(()=>super.parseMaybeAssign(e,s),l),!p.error))return p.node;if((a=c)!=null&&a.node)return this.state=c.failState,c.node;if(m.node)return this.state=m.failState,f&&this.reportReservedArrowTypeParam(f),m.node;if((n=p)!=null&&n.node)return this.state=p.failState,p.node;throw((o=c)==null?void 0:o.error)||m.error||((u=p)==null?void 0:u.error)}reportReservedArrowTypeParam(e){var s;e.params.length===1&&!e.params[0].constraint&&!((s=e.extra)!=null&&s.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(g.ReservedArrowTypeParam,{at:e})}parseMaybeUnary(e,s){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,s)}parseArrow(e){if(this.match(14)){let s=this.tryParse(r=>{let a=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&r(),a});if(s.aborted)return;s.thrown||(s.error&&(this.state=s.failState),e.returnType=s.node)}return super.parseArrow(e)}parseAssignableListItemTypes(e,s){if(!(s&2))return e;this.eat(17)&&(e.optional=!0);let r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.resetEndLocation(e),e}isAssignable(e,s){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,s);case"TSParameterProperty":return!0;default:return super.isAssignable(e,s)}}toAssignable(e,s=!1){switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,s);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":s?this.expressionScope.recordArrowParameterBindingError(g.UnexpectedTypeCastInParameter,{at:e}):this.raise(g.UnexpectedTypeCastInParameter,{at:e}),this.toAssignable(e.expression,s);break;case"AssignmentExpression":!s&&e.left.type==="TSTypeCastExpression"&&(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,s)}}toAssignableParenthesizedExpression(e,s){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(e.expression,s);break;default:super.toAssignable(e,s)}}checkToRestConversion(e,s){switch(e.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,s)}}isValidLVal(e,s,r){return Nl({TSTypeCastExpression:!0,TSParameterProperty:"parameter",TSNonNullExpression:"expression",TSAsExpression:(r!==64||!s)&&["expression",!0],TSSatisfiesExpression:(r!==64||!s)&&["expression",!0],TSTypeAssertion:(r!==64||!s)&&["expression",!0]},e)||super.isValidLVal(e,s,r)}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e){if(this.match(47)||this.match(51)){let s=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let r=super.parseMaybeDecoratorArguments(e);return r.typeParameters=s,r}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(e,s){let r=super.parseMaybeDefault(e,s);return r.type==="AssignmentPattern"&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(g.TypeAnnotationAfterAssign,{at:r.typeAnnotation}),r}getTokenFromCode(e){if(this.state.inType){if(e===62){this.finishOp(48,1);return}if(e===60){this.finishOp(47,1);return}}super.getTokenFromCode(e)}reScan_lt_gt(){let{type:e}=this.state;e===47?(this.state.pos-=1,this.readToken_lt()):e===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:e}=this.state;return e===51?(this.state.pos-=2,this.finishOp(47,1),47):e}toAssignableList(e,s,r){for(let a=0;a<e.length;a++){let n=e[a];(n==null?void 0:n.type)==="TSTypeCastExpression"&&(e[a]=this.typeCastToParameter(n))}super.toAssignableList(e,s,r)}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}shouldParseArrow(e){return this.match(14)?e.every(s=>this.isAssignable(s,!0)):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(47)||this.match(51)){let s=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());s&&(e.typeParameters=s)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){let s=super.getGetterSetterExpectedParamCount(e),a=this.getObjectOrClassMethodParams(e)[0];return a&&this.isThisParam(a)?s+1:s}parseCatchClauseParam(){let e=super.parseCatchClauseParam(),s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s,this.resetEndLocation(e)),e}tsInAmbientContext(e){let s=this.state.isAmbientContext;this.state.isAmbientContext=!0;try{return e()}finally{this.state.isAmbientContext=s}}parseClass(e,s,r){let a=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,s,r)}finally{this.state.inAbstractClass=a}}tsParseAbstractDeclaration(e,s){if(this.match(80))return e.abstract=!0,this.maybeTakeDecorators(s,this.parseClass(e,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.raise(g.NonClassMethodPropertyHasAbstractModifer,{at:e}),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,80)}parseMethod(e,s,r,a,n,o,u){let l=super.parseMethod(e,s,r,a,n,o,u);if(l.abstract&&(this.hasPlugin("estree")?!!l.value.body:!!l.body)){let{key:p}=l;this.raise(g.AbstractMethodHasImplementation,{at:l,methodName:p.type==="Identifier"&&!l.computed?p.name:`[${this.input.slice(p.start,p.end)}]`})}return l}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(e,s,r,a){return!s&&a?(this.parseTypeOnlyImportExportSpecifier(e,!1,r),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,s,r,a))}parseImportSpecifier(e,s,r,a,n){return!s&&a?(this.parseTypeOnlyImportExportSpecifier(e,!0,r),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,s,r,a,r?4098:4096))}parseTypeOnlyImportExportSpecifier(e,s,r){let a=s?"imported":"local",n=s?"local":"exported",o=e[a],u,l=!1,c=!0,p=o.loc.start;if(this.isContextual(93)){let m=this.parseIdentifier();if(this.isContextual(93)){let d=this.parseIdentifier();X(this.state.type)?(l=!0,o=m,u=s?this.parseIdentifier():this.parseModuleExportName(),c=!1):(u=d,c=!1)}else X(this.state.type)?(c=!1,u=s?this.parseIdentifier():this.parseModuleExportName()):(l=!0,o=m)}else X(this.state.type)&&(l=!0,s?(o=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(o.name,o.loc.start,!0,!0)):o=this.parseModuleExportName());l&&r&&this.raise(s?g.TypeModifierIsUsedInTypeImports:g.TypeModifierIsUsedInTypeExports,{at:p}),e[a]=o,e[n]=u;let f=s?"importKind":"exportKind";e[f]=l?"type":"value",c&&this.eatContextual(93)&&(e[n]=s?this.parseIdentifier():this.parseModuleExportName()),e[n]||(e[n]=ne(e[a])),s&&this.checkIdentifier(e[n],l?4098:4096)}};function Dl(i){if(i.type!=="MemberExpression")return!1;let{computed:t,property:e}=i;return t&&e.type!=="StringLiteral"&&(e.type!=="TemplateLiteral"||e.expressions.length>0)?!1:Ba(i.object)}function Bl(i,t){var e;let{type:s}=i;if((e=i.extra)!=null&&e.parenthesized)return!1;if(t){if(s==="Literal"){let{value:r}=i;if(typeof r=="string"||typeof r=="boolean")return!0}}else if(s==="StringLiteral"||s==="BooleanLiteral")return!0;return!!(Da(i,t)||Fl(i,t)||s==="TemplateLiteral"&&i.expressions.length===0||Dl(i))}function Da(i,t){return t?i.type==="Literal"&&(typeof i.value=="number"||"bigint"in i):i.type==="NumericLiteral"||i.type==="BigIntLiteral"}function Fl(i,t){if(i.type==="UnaryExpression"){let{operator:e,argument:s}=i;if(e==="-"&&Da(s,t))return!0}return!1}function Ba(i){return i.type==="Identifier"?!0:i.type!=="MemberExpression"||i.computed?!1:Ba(i.object)}var xa=ae`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),Rl=i=>class extends i{parsePlaceholder(e){if(this.match(144)){let s=this.startNode();return this.next(),this.assertNoSpace(),s.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(144),this.finishPlaceholder(s,e)}}finishPlaceholder(e,s){let r=!!(e.expectedNode&&e.type==="Placeholder");return e.expectedNode=s,r?e:this.finishNode(e,"Placeholder")}getTokenFromCode(e){e===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(144,2):super.getTokenFromCode(e)}parseExprAtom(e){return this.parsePlaceholder("Expression")||super.parseExprAtom(e)}parseIdentifier(e){return this.parsePlaceholder("Identifier")||super.parseIdentifier(e)}checkReservedWord(e,s,r,a){e!==void 0&&super.checkReservedWord(e,s,r,a)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,s,r){return e==="Placeholder"||super.isValidLVal(e,s,r)}toAssignable(e,s){e&&e.type==="Placeholder"&&e.expectedNode==="Expression"?e.expectedNode="Pattern":super.toAssignable(e,s)}chStartsBindingIdentifier(e,s){return!!(super.chStartsBindingIdentifier(e,s)||this.lookahead().type===144)}verifyBreakContinue(e,s){e.label&&e.label.type==="Placeholder"||super.verifyBreakContinue(e,s)}parseExpressionStatement(e,s){var r;if(s.type!=="Placeholder"||(r=s.extra)!=null&&r.parenthesized)return super.parseExpressionStatement(e,s);if(this.match(14)){let a=e;return a.label=this.finishPlaceholder(s,"Identifier"),this.next(),a.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(a,"LabeledStatement")}return this.semicolon(),e.name=s.name,this.finishPlaceholder(e,"Statement")}parseBlock(e,s,r){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,s,r)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,s,r){let a=s?"ClassDeclaration":"ClassExpression";this.next();let n=this.state.strict,o=this.parsePlaceholder("Identifier");if(o)if(this.match(81)||this.match(144)||this.match(5))e.id=o;else{if(r||!s)return e.id=null,e.body=this.finishPlaceholder(o,"ClassBody"),this.finishNode(e,a);throw this.raise(xa.ClassNameIsRequired,{at:this.state.startLoc})}else this.parseClassId(e,s,r);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,n),this.finishNode(e,a)}parseExport(e,s){let r=this.parsePlaceholder("Identifier");if(!r)return super.parseExport(e,s);if(!this.isContextual(98)&&!this.match(12))return e.specifiers=[],e.source=null,e.declaration=this.finishPlaceholder(r,"Declaration"),this.finishNode(e,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let a=this.startNode();return a.exported=r,e.specifiers=[this.finishNode(a,"ExportDefaultSpecifier")],super.parseExport(e,s)}isExportDefaultSpecifier(){if(this.match(65)){let e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(fe(144),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,s){var r;return(r=e.specifiers)!=null&&r.length?!0:super.maybeParseExportDefaultSpecifier(e,s)}checkExport(e){let{specifiers:s}=e;s!=null&&s.length&&(e.specifiers=s.filter(r=>r.exported.type==="Placeholder")),super.checkExport(e),e.specifiers=s}parseImport(e){let s=this.parsePlaceholder("Identifier");if(!s)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(98)&&!this.match(12))return e.source=this.finishPlaceholder(s,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");let r=this.startNodeAtNode(s);return r.local=s,e.specifiers.push(this.finishNode(r,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(98),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(xa.UnexpectedSpace,{at:this.state.lastTokEndLoc})}},jl=i=>class extends i{parseV8Intrinsic(){if(this.match(54)){let e=this.state.startLoc,s=this.startNode();if(this.next(),k(this.state.type)){let r=this.parseIdentifierName(),a=this.createIdentifier(s,r);if(a.type="V8IntrinsicIdentifier",this.match(10))return a}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}};function D(i,t){let[e,s]=typeof t=="string"?[t,{}]:t,r=Object.keys(s),a=r.length===0;return i.some(n=>{if(typeof n=="string")return a&&n===e;{let[o,u]=n;if(o!==e)return!1;for(let l of r)if(u[l]!==s[l])return!1;return!0}})}function pe(i,t,e){let s=i.find(r=>Array.isArray(r)?r[0]===t:r===t);return s&&Array.isArray(s)&&s.length>1?s[1][e]:null}var ga=["minimal","fsharp","hack","smart"],ba=["^^","@@","^","%","#"],Pa=["hash","bar"];function Ul(i){if(D(i,"decorators")){if(D(i,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let t=pe(i,"decorators","decoratorsBeforeExport");if(t!=null&&typeof t!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let e=pe(i,"decorators","allowCallParenthesized");if(e!=null&&typeof e!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(D(i,"flow")&&D(i,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(D(i,"placeholders")&&D(i,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(D(i,"pipelineOperator")){let t=pe(i,"pipelineOperator","proposal");if(!ga.includes(t)){let s=ga.map(r=>`"${r}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${s}.`)}let e=D(i,["recordAndTuple",{syntaxType:"hash"}]);if(t==="hack"){if(D(i,"placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(D(i,"v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let s=pe(i,"pipelineOperator","topicToken");if(!ba.includes(s)){let r=ba.map(a=>`"${a}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${r}.`)}if(s==="#"&&e)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}else if(t==="smart"&&e)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}if(D(i,"moduleAttributes")){if(D(i,"importAssertions")||D(i,"importAttributes"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");if(pe(i,"moduleAttributes","version")!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(D(i,"importAssertions")&&D(i,"importAttributes"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(D(i,"recordAndTuple")&&pe(i,"recordAndTuple","syntaxType")!=null&&!Pa.includes(pe(i,"recordAndTuple","syntaxType")))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+Pa.map(t=>`'${t}'`).join(", "));if(D(i,"asyncDoExpressions")&&!D(i,"doExpressions")){let t=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw t.missingPlugins="doExpressions",t}if(D(i,"optionalChainingAssign")&&pe(i,"optionalChainingAssign","version")!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")}var Fa={estree:ju,jsx:Il,flow:El,typescript:Ll,v8intrinsic:jl,placeholders:Rl},$l=Object.keys(Fa),As={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};function ql(i){if(i==null)return Object.assign({},As);if(i.annexB!=null&&i.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");let t={};for(let s of Object.keys(As)){var e;t[s]=(e=i[s])!=null?e:As[s]}return t}var Hs=class extends zs{checkProto(t,e,s,r){if(t.type==="SpreadElement"||this.isObjectMethod(t)||t.computed||t.shorthand)return;let a=t.key;if((a.type==="Identifier"?a.name:a.value)==="__proto__"){if(e){this.raise(h.RecordNoProto,{at:a});return}s.used&&(r?r.doubleProtoLoc===null&&(r.doubleProtoLoc=a.loc.start):this.raise(h.DuplicateProto,{at:a})),s.used=!0}}shouldExitDescending(t,e){return t.type==="ArrowFunctionExpression"&&t.start===e}getExpression(){this.enterInitialScopes(),this.nextToken();let t=this.parseExpression();return this.match(139)||this.unexpected(),this.finalizeRemainingComments(),t.comments=this.state.comments,t.errors=this.state.errors,this.options.tokens&&(t.tokens=this.tokens),t}parseExpression(t,e){return t?this.disallowInAnd(()=>this.parseExpressionBase(e)):this.allowInAnd(()=>this.parseExpressionBase(e))}parseExpressionBase(t){let e=this.state.startLoc,s=this.parseMaybeAssign(t);if(this.match(12)){let r=this.startNodeAt(e);for(r.expressions=[s];this.eat(12);)r.expressions.push(this.parseMaybeAssign(t));return this.toReferencedList(r.expressions),this.finishNode(r,"SequenceExpression")}return s}parseMaybeAssignDisallowIn(t,e){return this.disallowInAnd(()=>this.parseMaybeAssign(t,e))}parseMaybeAssignAllowIn(t,e){return this.allowInAnd(()=>this.parseMaybeAssign(t,e))}setOptionalParametersError(t,e){var s;t.optionalParametersLoc=(s=e==null?void 0:e.loc)!=null?s:this.state.startLoc}parseMaybeAssign(t,e){let s=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){let o=this.parseYield();return e&&(o=e.call(this,o,s)),o}let r;t?r=!1:(t=new Be,r=!0);let{type:a}=this.state;(a===10||k(a))&&(this.state.potentialArrowAt=this.state.start);let n=this.parseMaybeConditional(t);if(e&&(n=e.call(this,n,s)),Vu(this.state.type)){let o=this.startNodeAt(s),u=this.state.value;if(o.operator=u,this.match(29)){this.toAssignable(n,!0),o.left=n;let l=s.index;t.doubleProtoLoc!=null&&t.doubleProtoLoc.index>=l&&(t.doubleProtoLoc=null),t.shorthandAssignLoc!=null&&t.shorthandAssignLoc.index>=l&&(t.shorthandAssignLoc=null),t.privateKeyLoc!=null&&t.privateKeyLoc.index>=l&&(this.checkDestructuringPrivate(t),t.privateKeyLoc=null)}else o.left=n;return this.next(),o.right=this.parseMaybeAssign(),this.checkLVal(n,{in:this.finishNode(o,"AssignmentExpression")}),o}else r&&this.checkExpressionErrors(t,!0);return n}parseMaybeConditional(t){let e=this.state.startLoc,s=this.state.potentialArrowAt,r=this.parseExprOps(t);return this.shouldExitDescending(r,s)?r:this.parseConditional(r,e,t)}parseConditional(t,e,s){if(this.eat(17)){let r=this.startNodeAt(e);return r.test=t,r.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),r.alternate=this.parseMaybeAssign(),this.finishNode(r,"ConditionalExpression")}return t}parseMaybeUnaryOrPrivate(t){return this.match(138)?this.parsePrivateName():this.parseMaybeUnary(t)}parseExprOps(t){let e=this.state.startLoc,s=this.state.potentialArrowAt,r=this.parseMaybeUnaryOrPrivate(t);return this.shouldExitDescending(r,s)?r:this.parseExprOp(r,e,-1)}parseExprOp(t,e,s){if(this.isPrivateName(t)){let a=this.getPrivateNameSV(t);(s>=Rt(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(h.PrivateInExpectedIn,{at:t,identifierName:a}),this.classScope.usePrivateName(a,t.loc.start)}let r=this.state.type;if(Hu(r)&&(this.prodParam.hasIn||!this.match(58))){let a=Rt(r);if(a>s){if(r===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return t;this.checkPipelineAtInfixOperator(t,e)}let n=this.startNodeAt(e);n.left=t,n.operator=this.state.value;let o=r===41||r===42,u=r===40;if(u&&(a=Rt(42)),this.next(),r===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(h.UnexpectedAwaitAfterPipelineBody,{at:this.state.startLoc});n.right=this.parseExprOpRightExpr(r,a);let l=this.finishNode(n,o||u?"LogicalExpression":"BinaryExpression"),c=this.state.type;if(u&&(c===41||c===42)||o&&c===40)throw this.raise(h.MixingCoalesceWithLogical,{at:this.state.startLoc});return this.parseExprOp(l,e,s)}}return t}parseExprOpRightExpr(t,e){let s=this.state.startLoc;switch(t){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"smart":return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(h.PipeBodyIsTighter,{at:this.state.startLoc});return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(t,e),s)});case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(e))}default:return this.parseExprOpBaseRightExpr(t,e)}}parseExprOpBaseRightExpr(t,e){let s=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),s,Yu(t)?e-1:e)}parseHackPipeBody(){var t;let{startLoc:e}=this.state,s=this.parseMaybeAssign();return Mu.has(s.type)&&!((t=s.extra)!=null&&t.parenthesized)&&this.raise(h.PipeUnparenthesizedBody,{at:e,type:s.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(h.PipeTopicUnused,{at:e}),s}checkExponentialAfterUnary(t){this.match(57)&&this.raise(h.UnexpectedTokenUnaryExponentiation,{at:t.argument})}parseMaybeUnary(t,e){let s=this.state.startLoc,r=this.isContextual(96);if(r&&this.isAwaitAllowed()){this.next();let u=this.parseAwait(s);return e||this.checkExponentialAfterUnary(u),u}let a=this.match(34),n=this.startNode();if(Gu(this.state.type)){n.operator=this.state.value,n.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let u=this.match(89);if(this.next(),n.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(t,!0),this.state.strict&&u){let l=n.argument;l.type==="Identifier"?this.raise(h.StrictDelete,{at:n}):this.hasPropertyAsPrivateName(l)&&this.raise(h.DeletePrivateField,{at:n})}if(!a)return e||this.checkExponentialAfterUnary(n),this.finishNode(n,"UnaryExpression")}let o=this.parseUpdate(n,a,t);if(r){let{type:u}=this.state;if((this.hasPlugin("v8intrinsic")?Is(u):Is(u)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(h.AwaitNotInAsyncContext,{at:s}),this.parseAwait(s)}return o}parseUpdate(t,e,s){if(e){let n=t;return this.checkLVal(n.argument,{in:this.finishNode(n,"UpdateExpression")}),t}let r=this.state.startLoc,a=this.parseExprSubscripts(s);if(this.checkExpressionErrors(s,!1))return a;for(;Ku(this.state.type)&&!this.canInsertSemicolon();){let n=this.startNodeAt(r);n.operator=this.state.value,n.prefix=!1,n.argument=a,this.next(),this.checkLVal(a,{in:a=this.finishNode(n,"UpdateExpression")})}return a}parseExprSubscripts(t){let e=this.state.startLoc,s=this.state.potentialArrowAt,r=this.parseExprAtom(t);return this.shouldExitDescending(r,s)?r:this.parseSubscripts(r,e)}parseSubscripts(t,e,s){let r={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(t),stop:!1};do t=this.parseSubscript(t,e,s,r),r.maybeAsyncArrow=!1;while(!r.stop);return t}parseSubscript(t,e,s,r){let{type:a}=this.state;if(!s&&a===15)return this.parseBind(t,e,s,r);if(Wt(a))return this.parseTaggedTemplateExpression(t,e,r);let n=!1;if(a===18){if(s&&(this.raise(h.OptionalChainingNoNew,{at:this.state.startLoc}),this.lookaheadCharCode()===40))return r.stop=!0,t;r.optionalChainMember=n=!0,this.next()}if(!s&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(t,e,r,n);{let o=this.eat(0);return o||n||this.eat(16)?this.parseMember(t,e,r,o,n):(r.stop=!0,t)}}parseMember(t,e,s,r,a){let n=this.startNodeAt(e);return n.object=t,n.computed=r,r?(n.property=this.parseExpression(),this.expect(3)):this.match(138)?(t.type==="Super"&&this.raise(h.SuperPrivateField,{at:e}),this.classScope.usePrivateName(this.state.value,this.state.startLoc),n.property=this.parsePrivateName()):n.property=this.parseIdentifier(!0),s.optionalChainMember?(n.optional=a,this.finishNode(n,"OptionalMemberExpression")):this.finishNode(n,"MemberExpression")}parseBind(t,e,s,r){let a=this.startNodeAt(e);return a.object=t,this.next(),a.callee=this.parseNoCallExpr(),r.stop=!0,this.parseSubscripts(this.finishNode(a,"BindExpression"),e,s)}parseCoverCallAndAsyncArrowHead(t,e,s,r){let a=this.state.maybeInArrowParameters,n=null;this.state.maybeInArrowParameters=!0,this.next();let o=this.startNodeAt(e);o.callee=t;let{maybeAsyncArrow:u,optionalChainMember:l}=s;u&&(this.expressionScope.enter(gl()),n=new Be),l&&(o.optional=r),r?o.arguments=this.parseCallExpressionArguments(11):o.arguments=this.parseCallExpressionArguments(11,t.type==="Import",t.type!=="Super",o,n);let c=this.finishCallExpression(o,l);return u&&this.shouldParseAsyncArrow()&&!r?(s.stop=!0,this.checkDestructuringPrivate(n),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),c=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e),c)):(u&&(this.checkExpressionErrors(n,!0),this.expressionScope.exit()),this.toReferencedArguments(c)),this.state.maybeInArrowParameters=a,c}toReferencedArguments(t,e){this.toReferencedListDeep(t.arguments,e)}parseTaggedTemplateExpression(t,e,s){let r=this.startNodeAt(e);return r.tag=t,r.quasi=this.parseTemplate(!0),s.optionalChainMember&&this.raise(h.OptionalChainingNoTemplate,{at:e}),this.finishNode(r,"TaggedTemplateExpression")}atPossibleAsyncArrow(t){return t.type==="Identifier"&&t.name==="async"&&this.state.lastTokEndLoc.index===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&t.start===this.state.potentialArrowAt}expectImportAttributesPlugin(){this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")}finishCallExpression(t,e){if(t.callee.type==="Import")if(t.arguments.length===2&&(this.hasPlugin("moduleAttributes")||this.expectImportAttributesPlugin()),t.arguments.length===0||t.arguments.length>2)this.raise(h.ImportCallArity,{at:t,maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(let s of t.arguments)s.type==="SpreadElement"&&this.raise(h.ImportCallSpreadArgument,{at:s});return this.finishNode(t,e?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(t,e,s,r,a){let n=[],o=!0,u=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){e&&!this.hasPlugin("importAttributes")&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")&&this.raise(h.ImportCallArgumentTrailingComma,{at:this.state.lastTokStartLoc}),r&&this.addTrailingCommaExtraToNode(r),this.next();break}n.push(this.parseExprListItem(!1,a,s))}return this.state.inFSharpPipelineDirectBody=u,n}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(t,e){var s;return this.resetPreviousNodeTrailingComments(e),this.expect(19),this.parseArrowExpression(t,e.arguments,!0,(s=e.extra)==null?void 0:s.trailingCommaLoc),e.innerComments&&nt(t,e.innerComments),e.callee.trailingComments&&nt(t,e.callee.trailingComments),t}parseNoCallExpr(){let t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,!0)}parseExprAtom(t){let e,s=null,{type:r}=this.state;switch(r){case 79:return this.parseSuper();case 83:return e=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(e):this.match(10)?this.options.createImportExpressions?this.parseImportCall(e):this.finishNode(e,"Import"):(this.raise(h.UnsupportedImport,{at:this.state.lastTokStartLoc}),this.finishNode(e,"Import"));case 78:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 134:return this.parseNumericLiteral(this.state.value);case 135:return this.parseBigIntLiteral(this.state.value);case 136:return this.parseDecimalLiteral(this.state.value);case 133:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let a=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(a)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,t);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,t);case 68:return this.parseFunctionOrFunctionSent();case 26:s=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(s,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{e=this.startNode(),this.next(),e.object=null;let a=e.callee=this.parseNoCallExpr();if(a.type==="MemberExpression")return this.finishNode(e,"BindExpression");throw this.raise(h.UnsupportedBind,{at:a})}case 138:return this.raise(h.PrivateInExpectedIn,{at:this.state.startLoc,identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let a=this.getPluginOption("pipelineOperator","proposal");if(a)return this.parseTopicReference(a);this.unexpected();break}case 47:{let a=this.input.codePointAt(this.nextTokenStart());ie(a)||a===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(k(r)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let a=this.state.potentialArrowAt===this.state.start,n=this.state.containsEsc,o=this.parseIdentifier();if(!n&&o.name==="async"&&!this.canInsertSemicolon()){let{type:u}=this.state;if(u===68)return this.resetPreviousNodeTrailingComments(o),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(o));if(k(u))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(o)):o;if(u===90)return this.resetPreviousNodeTrailingComments(o),this.parseDo(this.startNodeAtNode(o),!0)}return a&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(o),[o],!1)):o}else this.unexpected()}}parseTopicReferenceThenEqualsSign(t,e){let s=this.getPluginOption("pipelineOperator","proposal");if(s)return this.state.type=t,this.state.value=e,this.state.pos--,this.state.end--,this.state.endLoc=V(this.state.endLoc,-1),this.parseTopicReference(s);this.unexpected()}parseTopicReference(t){let e=this.startNode(),s=this.state.startLoc,r=this.state.type;return this.next(),this.finishTopicReference(e,s,t,r)}finishTopicReference(t,e,s,r){if(this.testTopicReferenceConfiguration(s,e,r)){let a=s==="smart"?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise(s==="smart"?h.PrimaryTopicNotAllowed:h.PipeTopicUnbound,{at:e}),this.registerTopicReference(),this.finishNode(t,a)}else throw this.raise(h.PipeTopicUnconfiguredToken,{at:e,token:fe(r)})}testTopicReferenceConfiguration(t,e,s){switch(t){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:fe(s)}]);case"smart":return s===27;default:throw this.raise(h.PipeTopicRequiresHackPipes,{at:e})}}parseAsyncArrowUnaryFunction(t){this.prodParam.enter(Ut(!0,this.prodParam.hasYield));let e=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(h.LineTerminatorBeforeArrow,{at:this.state.curPosition()}),this.expect(19),this.parseArrowExpression(t,e,!0)}parseDo(t,e){this.expectPlugin("doExpressions"),e&&this.expectPlugin("asyncDoExpressions"),t.async=e,this.next();let s=this.state.labels;return this.state.labels=[],e?(this.prodParam.enter(2),t.body=this.parseBlock(),this.prodParam.exit()):t.body=this.parseBlock(),this.state.labels=s,this.finishNode(t,"DoExpression")}parseSuper(){let t=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod?this.raise(h.SuperNotAllowed,{at:t}):!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(h.UnexpectedSuper,{at:t}),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(h.UnsupportedSuper,{at:t}),this.finishNode(t,"Super")}parsePrivateName(){let t=this.startNode(),e=this.startNodeAt(V(this.state.startLoc,1)),s=this.state.value;return this.next(),t.id=this.createIdentifier(e,s),this.finishNode(t,"PrivateName")}parseFunctionOrFunctionSent(){let t=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let e=this.createIdentifier(this.startNodeAtNode(t),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(t,e,"sent")}return this.parseFunction(t)}parseMetaProperty(t,e,s){t.meta=e;let r=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==s||r)&&this.raise(h.UnsupportedMetaProperty,{at:t.property,target:e.name,onlyValidPropertyName:s}),this.finishNode(t,"MetaProperty")}parseImportMetaProperty(t){let e=this.createIdentifier(this.startNodeAtNode(t),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(h.ImportMetaOutsideModule,{at:e}),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){let s=this.isContextual(105);if(s||this.unexpected(),this.expectPlugin(s?"sourcePhaseImports":"deferredImportEvaluation"),!this.options.createImportExpressions)throw this.raise(h.DynamicImportPhaseRequiresImportExpressions,{at:this.state.startLoc,phase:this.state.value});return this.next(),t.phase=s?"source":"defer",this.parseImportCall(t)}return this.parseMetaProperty(t,e,"meta")}parseLiteralAtNode(t,e,s){return this.addExtra(s,"rawValue",t),this.addExtra(s,"raw",this.input.slice(s.start,this.state.end)),s.value=t,this.next(),this.finishNode(s,e)}parseLiteral(t,e){let s=this.startNode();return this.parseLiteralAtNode(t,e,s)}parseStringLiteral(t){return this.parseLiteral(t,"StringLiteral")}parseNumericLiteral(t){return this.parseLiteral(t,"NumericLiteral")}parseBigIntLiteral(t){return this.parseLiteral(t,"BigIntLiteral")}parseDecimalLiteral(t){return this.parseLiteral(t,"DecimalLiteral")}parseRegExpLiteral(t){let e=this.parseLiteral(t.value,"RegExpLiteral");return e.pattern=t.pattern,e.flags=t.flags,e}parseBooleanLiteral(t){let e=this.startNode();return e.value=t,this.next(),this.finishNode(e,"BooleanLiteral")}parseNullLiteral(){let t=this.startNode();return this.next(),this.finishNode(t,"NullLiteral")}parseParenAndDistinguishExpression(t){let e=this.state.startLoc,s;this.next(),this.expressionScope.enter(xl());let r=this.state.maybeInArrowParameters,a=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let n=this.state.startLoc,o=[],u=new Be,l=!0,c,p;for(;!this.match(11);){if(l)l=!1;else if(this.expect(12,u.optionalParametersLoc===null?null:u.optionalParametersLoc),this.match(11)){p=this.state.startLoc;break}if(this.match(21)){let d=this.state.startLoc;if(c=this.state.startLoc,o.push(this.parseParenItem(this.parseRestBinding(),d)),!this.checkCommaAfterRest(41))break}else o.push(this.parseMaybeAssignAllowIn(u,this.parseParenItem))}let f=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=r,this.state.inFSharpPipelineDirectBody=a;let m=this.startNodeAt(e);return t&&this.shouldParseArrow(o)&&(m=this.parseArrow(m))?(this.checkDestructuringPrivate(u),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(m,o,!1),m):(this.expressionScope.exit(),o.length||this.unexpected(this.state.lastTokStartLoc),p&&this.unexpected(p),c&&this.unexpected(c),this.checkExpressionErrors(u,!0),this.toReferencedListDeep(o,!0),o.length>1?(s=this.startNodeAt(n),s.expressions=o,this.finishNode(s,"SequenceExpression"),this.resetEndLocation(s,f)):s=o[0],this.wrapParenthesis(e,s))}wrapParenthesis(t,e){if(!this.options.createParenthesizedExpressions)return this.addExtra(e,"parenthesized",!0),this.addExtra(e,"parenStart",t.index),this.takeSurroundingComments(e,t.index,this.state.lastTokEndLoc.index),e;let s=this.startNodeAt(t);return s.expression=e,this.finishNode(s,"ParenthesizedExpression")}shouldParseArrow(t){return!this.canInsertSemicolon()}parseArrow(t){if(this.eat(19))return t}parseParenItem(t,e){return t}parseNewOrNewTarget(){let t=this.startNode();if(this.next(),this.match(16)){let e=this.createIdentifier(this.startNodeAtNode(t),"new");this.next();let s=this.parseMetaProperty(t,e,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(h.UnexpectedNewTarget,{at:s}),s}return this.parseNew(t)}parseNew(t){if(this.parseNewCallee(t),this.eat(10)){let e=this.parseExprList(11);this.toReferencedList(e),t.arguments=e}else t.arguments=[];return this.finishNode(t,"NewExpression")}parseNewCallee(t){let e=this.match(83),s=this.parseNoCallExpr();t.callee=s,e&&(s.type==="Import"||s.type==="ImportExpression")&&this.raise(h.ImportCallNotNewExpression,{at:s})}parseTemplateElement(t){let{start:e,startLoc:s,end:r,value:a}=this.state,n=e+1,o=this.startNodeAt(V(s,1));a===null&&(t||this.raise(h.InvalidEscapeSequenceTemplate,{at:V(this.state.firstInvalidTemplateEscapePos,1)}));let u=this.match(24),l=u?-1:-2,c=r+l;o.value={raw:this.input.slice(n,c).replace(/\r\n?/g,`
16
- `),cooked:a===null?null:a.slice(1,l)},o.tail=u,this.next();let p=this.finishNode(o,"TemplateElement");return this.resetEndLocation(p,V(this.state.lastTokEndLoc,l)),p}parseTemplate(t){let e=this.startNode();e.expressions=[];let s=this.parseTemplateElement(t);for(e.quasis=[s];!s.tail;)e.expressions.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),e.quasis.push(s=this.parseTemplateElement(t));return this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,e,s,r){s&&this.expectPlugin("recordAndTuple");let a=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let n=Object.create(null),o=!0,u=this.startNode();for(u.properties=[],this.next();!this.match(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){this.addTrailingCommaExtraToNode(u);break}let c;e?c=this.parseBindingProperty():(c=this.parsePropertyDefinition(r),this.checkProto(c,s,n,r)),s&&!this.isObjectProperty(c)&&c.type!=="SpreadElement"&&this.raise(h.InvalidRecordProperty,{at:c}),c.shorthand&&this.addExtra(c,"shorthand",!0),u.properties.push(c)}this.next(),this.state.inFSharpPipelineDirectBody=a;let l="ObjectExpression";return e?l="ObjectPattern":s&&(l="RecordExpression"),this.finishNode(u,l)}addTrailingCommaExtraToNode(t){this.addExtra(t,"trailingComma",this.state.lastTokStart),this.addExtra(t,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(t){return!t.computed&&t.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(t){let e=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(h.UnsupportedPropertyDecorator,{at:this.state.startLoc});this.match(26);)e.push(this.parseDecorator());let s=this.startNode(),r=!1,a=!1,n;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(s.decorators=e,e=[]),s.method=!1,t&&(n=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(s);let u=this.state.containsEsc,l=this.parsePropertyName(s,t);if(!o&&!u&&this.maybeAsyncOrAccessorProp(s)){let c=l.name;c==="async"&&!this.hasPrecedingLineBreak()&&(r=!0,this.resetPreviousNodeTrailingComments(l),o=this.eat(55),this.parsePropertyName(s)),(c==="get"||c==="set")&&(a=!0,this.resetPreviousNodeTrailingComments(l),s.kind=c,this.match(55)&&(o=!0,this.raise(h.AccessorIsGenerator,{at:this.state.curPosition(),kind:c}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,n,o,r,!1,a,t)}getGetterSetterExpectedParamCount(t){return t.kind==="get"?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var e;let s=this.getGetterSetterExpectedParamCount(t),r=this.getObjectOrClassMethodParams(t);r.length!==s&&this.raise(t.kind==="get"?h.BadGetterArity:h.BadSetterArity,{at:t}),t.kind==="set"&&((e=r[r.length-1])==null?void 0:e.type)==="RestElement"&&this.raise(h.BadSetterRestParameter,{at:t})}parseObjectMethod(t,e,s,r,a){if(a){let n=this.parseMethod(t,e,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(n),n}if(s||e||this.match(10))return r&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,!1,"ObjectMethod")}parseObjectProperty(t,e,s,r){if(t.shorthand=!1,this.eat(14))return t.value=s?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(r),this.finishNode(t,"ObjectProperty");if(!t.computed&&t.key.type==="Identifier"){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),s)t.value=this.parseMaybeDefault(e,ne(t.key));else if(this.match(29)){let a=this.state.startLoc;r!=null?r.shorthandAssignLoc===null&&(r.shorthandAssignLoc=a):this.raise(h.InvalidCoverInitializedName,{at:a}),t.value=this.parseMaybeDefault(e,ne(t.key))}else t.value=ne(t.key);return t.shorthand=!0,this.finishNode(t,"ObjectProperty")}}parseObjPropValue(t,e,s,r,a,n,o){let u=this.parseObjectMethod(t,s,r,a,n)||this.parseObjectProperty(t,e,a,o);return u||this.unexpected(),u}parsePropertyName(t,e){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:s,value:r}=this.state,a;if(X(s))a=this.parseIdentifier(!0);else switch(s){case 134:a=this.parseNumericLiteral(r);break;case 133:a=this.parseStringLiteral(r);break;case 135:a=this.parseBigIntLiteral(r);break;case 136:a=this.parseDecimalLiteral(r);break;case 138:{let n=this.state.startLoc;e!=null?e.privateKeyLoc===null&&(e.privateKeyLoc=n):this.raise(h.UnexpectedPrivateField,{at:n}),a=this.parsePrivateName();break}default:this.unexpected()}t.key=a,s!==138&&(t.computed=!1)}return t.key}initFunction(t,e){t.id=null,t.generator=!1,t.async=e}parseMethod(t,e,s,r,a,n,o=!1){this.initFunction(t,s),t.generator=e,this.scope.enter(18|(o?64:0)|(a?32:0)),this.prodParam.enter(Ut(s,t.generator)),this.parseFunctionParams(t,r);let u=this.parseFunctionBodyAndFinish(t,n,!0);return this.prodParam.exit(),this.scope.exit(),u}parseArrayLike(t,e,s,r){s&&this.expectPlugin("recordAndTuple");let a=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let n=this.startNode();return this.next(),n.elements=this.parseExprList(t,!s,r,n),this.state.inFSharpPipelineDirectBody=a,this.finishNode(n,s?"TupleExpression":"ArrayExpression")}parseArrowExpression(t,e,s,r){this.scope.enter(6);let a=Ut(s,!1);!this.match(5)&&this.prodParam.hasIn&&(a|=8),this.prodParam.enter(a),this.initFunction(t,s);let n=this.state.maybeInArrowParameters;return e&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(t,e,r)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(t,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=n,this.finishNode(t,"ArrowFunctionExpression")}setArrowFunctionParameters(t,e,s){this.toAssignableList(e,s,!1),t.params=e}parseFunctionBodyAndFinish(t,e,s=!1){return this.parseFunctionBody(t,!1,s),this.finishNode(t,e)}parseFunctionBody(t,e,s=!1){let r=e&&!this.match(5);if(this.expressionScope.enter(Ma()),r)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,e,!1);else{let a=this.state.strict,n=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),t.body=this.parseBlock(!0,!1,o=>{let u=!this.isSimpleParamList(t.params);o&&u&&this.raise(h.IllegalLanguageModeDirective,{at:(t.kind==="method"||t.kind==="constructor")&&t.key?t.key.loc.end:t});let l=!a&&this.state.strict;this.checkParams(t,!this.state.strict&&!e&&!s&&!u,e,l),this.state.strict&&t.id&&this.checkIdentifier(t.id,65,l)}),this.prodParam.exit(),this.state.labels=n}this.expressionScope.exit()}isSimpleParameter(t){return t.type==="Identifier"}isSimpleParamList(t){for(let e=0,s=t.length;e<s;e++)if(!this.isSimpleParameter(t[e]))return!1;return!0}checkParams(t,e,s,r=!0){let a=!e&&new Set,n={type:"FormalParameters"};for(let o of t.params)this.checkLVal(o,{in:n,binding:5,checkClashes:a,strictModeChanged:r})}parseExprList(t,e,s,r){let a=[],n=!0;for(;!this.eat(t);){if(n)n=!1;else if(this.expect(12),this.match(t)){r&&this.addTrailingCommaExtraToNode(r),this.next();break}a.push(this.parseExprListItem(e,s))}return a}parseExprListItem(t,e,s){let r;if(this.match(12))t||this.raise(h.UnexpectedToken,{at:this.state.curPosition(),unexpected:","}),r=null;else if(this.match(21)){let a=this.state.startLoc;r=this.parseParenItem(this.parseSpread(e),a)}else if(this.match(17)){this.expectPlugin("partialApplication"),s||this.raise(h.UnexpectedArgumentPlaceholder,{at:this.state.startLoc});let a=this.startNode();this.next(),r=this.finishNode(a,"ArgumentPlaceholder")}else r=this.parseMaybeAssignAllowIn(e,this.parseParenItem);return r}parseIdentifier(t){let e=this.startNode(),s=this.parseIdentifierName(t);return this.createIdentifier(e,s)}createIdentifier(t,e){return t.name=e,t.loc.identifierName=e,this.finishNode(t,"Identifier")}parseIdentifierName(t){let e,{startLoc:s,type:r}=this.state;X(r)?e=this.state.value:this.unexpected();let a=qu(r);return t?a&&this.replaceToken(132):this.checkReservedWord(e,s,a,!1),this.next(),e}checkReservedWord(t,e,s,r){if(t.length>10||!ol(t))return;if(s&&il(t)){this.raise(h.UnexpectedKeyword,{at:e,keyword:t});return}if((this.state.strict?r?Ia:Ea:Aa)(t,this.inModule)){this.raise(h.UnexpectedReservedWord,{at:e,reservedWord:t});return}else if(t==="yield"){if(this.prodParam.hasYield){this.raise(h.YieldBindingIdentifier,{at:e});return}}else if(t==="await"){if(this.prodParam.hasAwait){this.raise(h.AwaitBindingIdentifier,{at:e});return}if(this.scope.inStaticBlock){this.raise(h.AwaitBindingIdentifierInStaticBlock,{at:e});return}this.expressionScope.recordAsyncArrowParametersError({at:e})}else if(t==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(h.ArgumentsInClass,{at:e});return}}isAwaitAllowed(){return!!(this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction)}parseAwait(t){let e=this.startNodeAt(t);return this.expressionScope.recordParameterInitializerError(h.AwaitExpressionFormalParameter,{at:e}),this.eat(55)&&this.raise(h.ObsoleteAwaitStar,{at:e}),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(e.argument=this.parseMaybeUnary(null,!0)),this.finishNode(e,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:t}=this.state;return t===53||t===10||t===0||Wt(t)||t===102&&!this.state.containsEsc||t===137||t===56||this.hasPlugin("v8intrinsic")&&t===54}parseYield(){let t=this.startNode();this.expressionScope.recordParameterInitializerError(h.YieldInParameter,{at:t}),this.next();let e=!1,s=null;if(!this.hasPrecedingLineBreak())switch(e=this.eat(55),this.state.type){case 13:case 139:case 8:case 11:case 3:case 9:case 14:case 12:if(!e)break;default:s=this.parseMaybeAssign()}return t.delegate=e,t.argument=s,this.finishNode(t,"YieldExpression")}parseImportCall(t){return this.next(),t.source=this.parseMaybeAssignAllowIn(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(t.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(t.options=this.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.finishNode(t,"ImportExpression")}checkPipelineAtInfixOperator(t,e){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&t.type==="SequenceExpression"&&this.raise(h.PipelineHeadSequenceExpression,{at:e})}parseSmartPipelineBodyInStyle(t,e){if(this.isSimpleReference(t)){let s=this.startNodeAt(e);return s.callee=t,this.finishNode(s,"PipelineBareFunction")}else{let s=this.startNodeAt(e);return this.checkSmartPipeTopicBodyEarlyErrors(e),s.expression=t,this.finishNode(s,"PipelineTopicExpression")}}isSimpleReference(t){switch(t.type){case"MemberExpression":return!t.computed&&this.isSimpleReference(t.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(t){if(this.match(19))throw this.raise(h.PipelineBodyNoArrow,{at:this.state.startLoc});this.topicReferenceWasUsedInCurrentContext()||this.raise(h.PipelineTopicUnused,{at:t})}withTopicBindingContext(t){let e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}withSmartMixTopicForbiddingContext(t){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}else return t()}withSoloAwaitPermittingContext(t){let e=this.state.soloAwait;this.state.soloAwait=!0;try{return t()}finally{this.state.soloAwait=e}}allowInAnd(t){let e=this.prodParam.currentFlags();if(8&~e){this.prodParam.enter(e|8);try{return t()}finally{this.prodParam.exit()}}return t()}disallowInAnd(t){let e=this.prodParam.currentFlags();if(8&e){this.prodParam.enter(e&-9);try{return t()}finally{this.prodParam.exit()}}return t()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(t){let e=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let r=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),e,t);return this.state.inFSharpPipelineDirectBody=s,r}parseModuleExpression(){this.expectPlugin("moduleBlocks");let t=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let e=this.startNodeAt(this.state.endLoc);this.next();let s=this.initializeScopes(!0);this.enterInitialScopes();try{t.body=this.parseProgram(e,8,"module")}finally{s()}return this.finishNode(t,"ModuleExpression")}parsePropertyNamePrefixOperator(t){}},Es={kind:"loop"},Wl={kind:"switch"},Vl=/[\uD800-\uDFFF]/u,Cs=/in(?:stanceof)?/y;function zl(i,t){for(let e=0;e<i.length;e++){let s=i[e],{type:r}=s;if(typeof r=="number"){{if(r===138){let{loc:a,start:n,value:o,end:u}=s,l=n+1,c=V(a.start,1);i.splice(e,1,new Q({type:se(27),value:"#",start:n,end:l,startLoc:a.start,endLoc:c}),new Q({type:se(132),value:o,start:l,end:u,startLoc:c,endLoc:a.end})),e++;continue}if(Wt(r)){let{loc:a,start:n,value:o,end:u}=s,l=n+1,c=V(a.start,1),p;t.charCodeAt(n)===96?p=new Q({type:se(22),value:"`",start:n,end:l,startLoc:a.start,endLoc:c}):p=new Q({type:se(8),value:"}",start:n,end:l,startLoc:a.start,endLoc:c});let f,m,d,y;r===24?(m=u-1,d=V(a.end,-1),f=o===null?null:o.slice(1,-1),y=new Q({type:se(22),value:"`",start:m,end:u,startLoc:d,endLoc:a.end})):(m=u-2,d=V(a.end,-2),f=o===null?null:o.slice(1,-2),y=new Q({type:se(23),value:"${",start:m,end:u,startLoc:d,endLoc:a.end})),i.splice(e,1,p,new Q({type:se(20),value:f,start:l,end:m,startLoc:c,endLoc:d}),y),e+=2;continue}}s.type=se(r)}}return i}var Ks=class extends Hs{parseTopLevel(t,e){return t.program=this.parseProgram(e),t.comments=this.state.comments,this.options.tokens&&(t.tokens=zl(this.tokens,this.input)),this.finishNode(t,"File")}parseProgram(t,e=139,s=this.options.sourceType){if(t.sourceType=s,t.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(t,!0,!0,e),this.inModule&&!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(let[a,n]of Array.from(this.scope.undefinedExports))this.raise(h.ModuleExportUndefined,{at:n,localName:a});let r;return e===139?r=this.finishNode(t,"Program"):r=this.finishNodeAt(t,"Program",V(this.state.startLoc,-1)),r}stmtToDirective(t){let e=t;e.type="Directive",e.value=e.expression,delete e.expression;let s=e.value,r=s.value,a=this.input.slice(s.start,s.end),n=s.value=a.slice(1,-1);return this.addExtra(s,"raw",a),this.addExtra(s,"rawValue",n),this.addExtra(s,"expressionValue",r),s.type="DirectiveLiteral",e}parseInterpreterDirective(){if(!this.match(28))return null;let t=this.startNode();return t.value=this.state.value,this.next(),this.finishNode(t,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(t,e){if(ie(t)){if(Cs.lastIndex=e,Cs.test(this.input)){let s=this.codePointAtPos(Cs.lastIndex);if(!De(s)&&s!==92)return!1}return!0}else return t===92}chStartsBindingPattern(t){return t===91||t===123}hasFollowingBindingAtom(){let t=this.nextTokenStart(),e=this.codePointAtPos(t);return this.chStartsBindingPattern(e)||this.chStartsBindingIdentifier(e,t)}hasInLineFollowingBindingIdentifier(){let t=this.nextTokenInLineStart(),e=this.codePointAtPos(t);return this.chStartsBindingIdentifier(e,t)}startsUsingForOf(){let{type:t,containsEsc:e}=this.lookahead();if(t===102&&!e)return!1;if(k(t)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let t=this.nextTokenInLineStart();if(this.isUnparsedContextual(t,"using")){t=this.nextTokenInLineStartSince(t+5);let e=this.codePointAtPos(t);if(this.chStartsBindingIdentifier(e,t))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(t=!1){let e=0;return this.options.annexB&&!this.state.strict&&(e|=4,t&&(e|=8)),this.parseStatementLike(e)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(t){let e=null;return this.match(26)&&(e=this.parseDecorators(!0)),this.parseStatementContent(t,e)}parseStatementContent(t,e){let s=this.state.type,r=this.startNode(),a=!!(t&2),n=!!(t&4),o=t&1;switch(s){case 60:return this.parseBreakContinueStatement(r,!0);case 63:return this.parseBreakContinueStatement(r,!1);case 64:return this.parseDebuggerStatement(r);case 90:return this.parseDoWhileStatement(r);case 91:return this.parseForStatement(r);case 68:if(this.lookaheadCharCode()===46)break;return n||this.raise(this.state.strict?h.StrictFunction:this.options.annexB?h.SloppyFunctionAnnexB:h.SloppyFunction,{at:this.state.startLoc}),this.parseFunctionStatement(r,!1,!a&&n);case 80:return a||this.unexpected(),this.parseClass(this.maybeTakeDecorators(e,r),!0);case 69:return this.parseIfStatement(r);case 70:return this.parseReturnStatement(r);case 71:return this.parseSwitchStatement(r);case 72:return this.parseThrowStatement(r);case 73:return this.parseTryStatement(r);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.isAwaitAllowed()?a||this.raise(h.UnexpectedLexicalDeclaration,{at:r}):this.raise(h.AwaitUsingNotInAsyncContext,{at:r}),this.next(),this.parseVarStatement(r,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifier())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(h.UnexpectedUsingDeclaration,{at:this.state.startLoc}):a||this.raise(h.UnexpectedLexicalDeclaration,{at:this.state.startLoc}),this.parseVarStatement(r,"using");case 100:{if(this.state.containsEsc)break;let c=this.nextTokenStart(),p=this.codePointAtPos(c);if(p!==91&&(!a&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(p,c)&&p!==123))break}case 75:a||this.raise(h.UnexpectedLexicalDeclaration,{at:this.state.startLoc});case 74:{let c=this.state.value;return this.parseVarStatement(r,c)}case 92:return this.parseWhileStatement(r);case 76:return this.parseWithStatement(r);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(r);case 83:{let c=this.lookaheadCharCode();if(c===40||c===46)break}case 82:{!this.options.allowImportExportEverywhere&&!o&&this.raise(h.UnexpectedImportExport,{at:this.state.startLoc}),this.next();let c;return s===83?(c=this.parseImport(r),c.type==="ImportDeclaration"&&(!c.importKind||c.importKind==="value")&&(this.sawUnambiguousESM=!0)):(c=this.parseExport(r,e),(c.type==="ExportNamedDeclaration"&&(!c.exportKind||c.exportKind==="value")||c.type==="ExportAllDeclaration"&&(!c.exportKind||c.exportKind==="value")||c.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(c),c}default:if(this.isAsyncFunction())return a||this.raise(h.AsyncFunctionInSingleStatementContext,{at:this.state.startLoc}),this.next(),this.parseFunctionStatement(r,!0,!a&&n)}let u=this.state.value,l=this.parseExpression();return k(s)&&l.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(r,u,l,t):this.parseExpressionStatement(r,l,e)}assertModuleNodeAllowed(t){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(h.ImportOutsideModule,{at:t})}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(t,e,s){return t&&(e.decorators&&e.decorators.length>0?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(h.DecoratorsBeforeAfterExport,{at:e.decorators[0]}),e.decorators.unshift(...t)):e.decorators=t,this.resetStartLocationFromNode(e,t[0]),s&&this.resetStartLocationFromNode(s,e)),e}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(t){let e=[];do e.push(this.parseDecorator());while(this.match(26));if(this.match(82))t||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(h.DecoratorExportClass,{at:this.state.startLoc});else if(!this.canHaveLeadingDecorator())throw this.raise(h.UnexpectedLeadingDecorator,{at:this.state.startLoc});return e}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let t=this.startNode();if(this.next(),this.hasPlugin("decorators")){let e=this.state.startLoc,s;if(this.match(10)){let r=this.state.startLoc;this.next(),s=this.parseExpression(),this.expect(11),s=this.wrapParenthesis(r,s);let a=this.state.startLoc;t.expression=this.parseMaybeDecoratorArguments(s),this.getPluginOption("decorators","allowCallParenthesized")===!1&&t.expression!==s&&this.raise(h.DecoratorArgumentsOutsideParentheses,{at:a})}else{for(s=this.parseIdentifier(!1);this.eat(16);){let r=this.startNodeAt(e);r.object=s,this.match(138)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),r.property=this.parsePrivateName()):r.property=this.parseIdentifier(!0),r.computed=!1,s=this.finishNode(r,"MemberExpression")}t.expression=this.parseMaybeDecoratorArguments(s)}}else t.expression=this.parseExprSubscripts();return this.finishNode(t,"Decorator")}parseMaybeDecoratorArguments(t){if(this.eat(10)){let e=this.startNodeAtNode(t);return e.callee=t,e.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(e.arguments),this.finishNode(e,"CallExpression")}return t}parseBreakContinueStatement(t,e){return this.next(),this.isLineTerminator()?t.label=null:(t.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(t,e),this.finishNode(t,e?"BreakStatement":"ContinueStatement")}verifyBreakContinue(t,e){let s;for(s=0;s<this.state.labels.length;++s){let r=this.state.labels[s];if((t.label==null||r.name===t.label.name)&&(r.kind!=null&&(e||r.kind==="loop")||t.label&&e))break}if(s===this.state.labels.length){let r=e?"BreakStatement":"ContinueStatement";this.raise(h.IllegalBreakContinue,{at:t,type:r})}}parseDebuggerStatement(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let t=this.parseExpression();return this.expect(11),t}parseDoWhileStatement(t){return this.next(),this.state.labels.push(Es),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),t.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(t,"DoWhileStatement")}parseForStatement(t){this.next(),this.state.labels.push(Es);let e=null;if(this.isAwaitAllowed()&&this.eatContextual(96)&&(e=this.state.lastTokStartLoc),this.scope.enter(0),this.expect(10),this.match(13))return e!==null&&this.unexpected(e),this.parseFor(t,null);let s=this.isContextual(100);{let u=this.isContextual(96)&&this.startsAwaitUsing(),l=u||this.isContextual(107)&&this.startsUsingForOf(),c=s&&this.hasFollowingBindingAtom()||l;if(this.match(74)||this.match(75)||c){let p=this.startNode(),f;u?(f="await using",this.isAwaitAllowed()||this.raise(h.AwaitUsingNotInAsyncContext,{at:this.state.startLoc}),this.next()):f=this.state.value,this.next(),this.parseVar(p,!0,f);let m=this.finishNode(p,"VariableDeclaration"),d=this.match(58);return d&&l&&this.raise(h.ForInUsing,{at:m}),(d||this.isContextual(102))&&m.declarations.length===1?this.parseForIn(t,m,e):(e!==null&&this.unexpected(e),this.parseFor(t,m))}}let r=this.isContextual(95),a=new Be,n=this.parseExpression(!0,a),o=this.isContextual(102);if(o&&(s&&this.raise(h.ForOfLet,{at:n}),e===null&&r&&n.type==="Identifier"&&this.raise(h.ForOfAsync,{at:n})),o||this.match(58)){this.checkDestructuringPrivate(a),this.toAssignable(n,!0);let u=o?"ForOfStatement":"ForInStatement";return this.checkLVal(n,{in:{type:u}}),this.parseForIn(t,n,e)}else this.checkExpressionErrors(a,!0);return e!==null&&this.unexpected(e),this.parseFor(t,n)}parseFunctionStatement(t,e,s){return this.next(),this.parseFunction(t,1|(s?2:0)|(e?8:0))}parseIfStatement(t){return this.next(),t.test=this.parseHeaderExpression(),t.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),t.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(t,"IfStatement")}parseReturnStatement(t){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(h.IllegalReturn,{at:this.state.startLoc}),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")}parseSwitchStatement(t){this.next(),t.discriminant=this.parseHeaderExpression();let e=t.cases=[];this.expect(5),this.state.labels.push(Wl),this.scope.enter(0);let s;for(let r;!this.match(8);)if(this.match(61)||this.match(65)){let a=this.match(61);s&&this.finishNode(s,"SwitchCase"),e.push(s=this.startNode()),s.consequent=[],this.next(),a?s.test=this.parseExpression():(r&&this.raise(h.MultipleDefaultsInSwitch,{at:this.state.lastTokStartLoc}),r=!0,s.test=null),this.expect(14)}else s?s.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),s&&this.finishNode(s,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")}parseThrowStatement(t){return this.next(),this.hasPrecedingLineBreak()&&this.raise(h.NewlineAfterThrow,{at:this.state.lastTokEndLoc}),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")}parseCatchClauseParam(){let t=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&t.type==="Identifier"?8:0),this.checkLVal(t,{in:{type:"CatchClause"},binding:9}),t}parseTryStatement(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(62)){let e=this.startNode();this.next(),this.match(10)?(this.expect(10),e.param=this.parseCatchClauseParam(),this.expect(11)):(e.param=null,this.scope.enter(0)),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(67)?this.parseBlock():null,!t.handler&&!t.finalizer&&this.raise(h.NoCatchOrFinally,{at:t}),this.finishNode(t,"TryStatement")}parseVarStatement(t,e,s=!1){return this.next(),this.parseVar(t,!1,e,s),this.semicolon(),this.finishNode(t,"VariableDeclaration")}parseWhileStatement(t){return this.next(),t.test=this.parseHeaderExpression(),this.state.labels.push(Es),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}parseWithStatement(t){return this.state.strict&&this.raise(h.StrictWith,{at:this.state.startLoc}),this.next(),t.object=this.parseHeaderExpression(),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(t,"WithStatement")}parseEmptyStatement(t){return this.next(),this.finishNode(t,"EmptyStatement")}parseLabeledStatement(t,e,s,r){for(let n of this.state.labels)n.name===e&&this.raise(h.LabelRedeclaration,{at:s,labelName:e});let a=zu(this.state.type)?"loop":this.match(71)?"switch":null;for(let n=this.state.labels.length-1;n>=0;n--){let o=this.state.labels[n];if(o.statementStart===t.start)o.statementStart=this.state.start,o.kind=a;else break}return this.state.labels.push({name:e,kind:a,statementStart:this.state.start}),t.body=r&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),t.label=s,this.finishNode(t,"LabeledStatement")}parseExpressionStatement(t,e,s){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")}parseBlock(t=!1,e=!0,s){let r=this.startNode();return t&&this.state.strictErrors.clear(),this.expect(5),e&&this.scope.enter(0),this.parseBlockBody(r,t,!1,8,s),e&&this.scope.exit(),this.finishNode(r,"BlockStatement")}isValidDirective(t){return t.type==="ExpressionStatement"&&t.expression.type==="StringLiteral"&&!t.expression.extra.parenthesized}parseBlockBody(t,e,s,r,a){let n=t.body=[],o=t.directives=[];this.parseBlockOrModuleBlockBody(n,e?o:void 0,s,r,a)}parseBlockOrModuleBlockBody(t,e,s,r,a){let n=this.state.strict,o=!1,u=!1;for(;!this.match(r);){let l=s?this.parseModuleItem():this.parseStatementListItem();if(e&&!u){if(this.isValidDirective(l)){let c=this.stmtToDirective(l);e.push(c),!o&&c.value.value==="use strict"&&(o=!0,this.setStrict(!0));continue}u=!0,this.state.strictErrors.clear()}t.push(l)}a==null||a.call(this,o),n||this.setStrict(!1),this.next()}parseFor(t,e){return t.init=e,this.semicolon(!1),t.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),t.update=this.match(11)?null:this.parseExpression(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,"ForStatement")}parseForIn(t,e,s){let r=this.match(58);return this.next(),r?s!==null&&this.unexpected(s):t.await=s!==null,e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!r||!this.options.annexB||this.state.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")&&this.raise(h.ForInOfLoopInitializer,{at:e,type:r?"ForInStatement":"ForOfStatement"}),e.type==="AssignmentPattern"&&this.raise(h.InvalidLhs,{at:e,ancestor:{type:"ForStatement"}}),t.left=e,t.right=r?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,r?"ForInStatement":"ForOfStatement")}parseVar(t,e,s,r=!1){let a=t.declarations=[];for(t.kind=s;;){let n=this.startNode();if(this.parseVarId(n,s),n.init=this.eat(29)?e?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,n.init===null&&!r&&(n.id.type!=="Identifier"&&!(e&&(this.match(58)||this.isContextual(102)))?this.raise(h.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"destructuring"}):s==="const"&&!(this.match(58)||this.isContextual(102))&&this.raise(h.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"const"})),a.push(this.finishNode(n,"VariableDeclarator")),!this.eat(12))break}return t}parseVarId(t,e){let s=this.parseBindingAtom();this.checkLVal(s,{in:{type:"VariableDeclarator"},binding:e==="var"?5:8201}),t.id=s}parseAsyncFunctionExpression(t){return this.parseFunction(t,8)}parseFunction(t,e=0){let s=e&2,r=!!(e&1),a=r&&!(e&4),n=!!(e&8);this.initFunction(t,n),this.match(55)&&(s&&this.raise(h.GeneratorInSingleStatementContext,{at:this.state.startLoc}),this.next(),t.generator=!0),r&&(t.id=this.parseFunctionId(a));let o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(Ut(n,t.generator)),r||(t.id=this.parseFunctionId()),this.parseFunctionParams(t,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(t,r?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),r&&!s&&this.registerFunctionStatementId(t),this.state.maybeInArrowParameters=o,t}parseFunctionId(t){return t||k(this.state.type)?this.parseIdentifier():null}parseFunctionParams(t,e){this.expect(10),this.expressionScope.enter(yl()),t.params=this.parseBindingList(11,41,2|(e?4:0)),this.expressionScope.exit()}registerFunctionStatementId(t){t.id&&this.scope.declareName(t.id.name,!this.options.annexB||this.state.strict||t.generator||t.async?this.scope.treatFunctionsAsVar?5:8201:17,t.id.loc.start)}parseClass(t,e,s){this.next();let r=this.state.strict;return this.state.strict=!0,this.parseClassId(t,e,s),this.parseClassSuper(t),t.body=this.parseClassBody(!!t.superClass,r),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}isNonstaticConstructor(t){return!t.computed&&!t.static&&(t.key.name==="constructor"||t.key.value==="constructor")}parseClassBody(t,e){this.classScope.enter();let s={hadConstructor:!1,hadSuperClass:t},r=[],a=this.startNode();if(a.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(r.length>0)throw this.raise(h.DecoratorSemicolon,{at:this.state.lastTokEndLoc});continue}if(this.match(26)){r.push(this.parseDecorator());continue}let n=this.startNode();r.length&&(n.decorators=r,this.resetStartLocationFromNode(n,r[0]),r=[]),this.parseClassMember(a,n,s),n.kind==="constructor"&&n.decorators&&n.decorators.length>0&&this.raise(h.DecoratorConstructor,{at:n})}}),this.state.strict=e,this.next(),r.length)throw this.raise(h.TrailingDecorator,{at:this.state.startLoc});return this.classScope.exit(),this.finishNode(a,"ClassBody")}parseClassMemberFromModifier(t,e){let s=this.parseIdentifier(!0);if(this.isClassMethod()){let r=e;return r.kind="method",r.computed=!1,r.key=s,r.static=!1,this.pushClassMethod(t,r,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let r=e;return r.computed=!1,r.key=s,r.static=!1,t.body.push(this.parseClassProperty(r)),!0}return this.resetPreviousNodeTrailingComments(s),!1}parseClassMember(t,e,s){let r=this.isContextual(106);if(r){if(this.parseClassMemberFromModifier(t,e))return;if(this.eat(5)){this.parseClassStaticBlock(t,e);return}}this.parseClassMemberWithIsStatic(t,e,s,r)}parseClassMemberWithIsStatic(t,e,s,r){let a=e,n=e,o=e,u=e,l=e,c=a,p=a;if(e.static=r,this.parsePropertyNamePrefixOperator(e),this.eat(55)){c.kind="method";let v=this.match(138);if(this.parseClassElementName(c),v){this.pushClassPrivateMethod(t,n,!0,!1);return}this.isNonstaticConstructor(a)&&this.raise(h.ConstructorIsGenerator,{at:a.key}),this.pushClassMethod(t,a,!0,!1,!1,!1);return}let f=k(this.state.type)&&!this.state.containsEsc,m=this.match(138),d=this.parseClassElementName(e),y=this.state.startLoc;if(this.parsePostMemberNameModifiers(p),this.isClassMethod()){if(c.kind="method",m){this.pushClassPrivateMethod(t,n,!1,!1);return}let v=this.isNonstaticConstructor(a),S=!1;v&&(a.kind="constructor",s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(h.DuplicateConstructor,{at:d}),v&&this.hasPlugin("typescript")&&e.override&&this.raise(h.OverrideOnConstructor,{at:d}),s.hadConstructor=!0,S=s.hadSuperClass),this.pushClassMethod(t,a,!1,!1,v,S)}else if(this.isClassProperty())m?this.pushClassPrivateProperty(t,u):this.pushClassProperty(t,o);else if(f&&d.name==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(d);let v=this.eat(55);p.optional&&this.unexpected(y),c.kind="method";let S=this.match(138);this.parseClassElementName(c),this.parsePostMemberNameModifiers(p),S?this.pushClassPrivateMethod(t,n,v,!0):(this.isNonstaticConstructor(a)&&this.raise(h.ConstructorIsAsync,{at:a.key}),this.pushClassMethod(t,a,v,!0,!1,!1))}else if(f&&(d.name==="get"||d.name==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(d),c.kind=d.name;let v=this.match(138);this.parseClassElementName(a),v?this.pushClassPrivateMethod(t,n,!1,!1):(this.isNonstaticConstructor(a)&&this.raise(h.ConstructorIsAccessor,{at:a.key}),this.pushClassMethod(t,a,!1,!1,!1,!1)),this.checkGetterSetterParams(a)}else if(f&&d.name==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(d);let v=this.match(138);this.parseClassElementName(o),this.pushClassAccessorProperty(t,l,v)}else this.isLineTerminator()?m?this.pushClassPrivateProperty(t,u):this.pushClassProperty(t,o):this.unexpected()}parseClassElementName(t){let{type:e,value:s}=this.state;if((e===132||e===133)&&t.static&&s==="prototype"&&this.raise(h.StaticPrototype,{at:this.state.startLoc}),e===138){s==="constructor"&&this.raise(h.ConstructorClassPrivateField,{at:this.state.startLoc});let r=this.parsePrivateName();return t.key=r,r}return this.parsePropertyName(t)}parseClassStaticBlock(t,e){var s;this.scope.enter(208);let r=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let a=e.body=[];this.parseBlockOrModuleBlockBody(a,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=r,t.body.push(this.finishNode(e,"StaticBlock")),(s=e.decorators)!=null&&s.length&&this.raise(h.DecoratorStaticBlock,{at:e})}pushClassProperty(t,e){!e.computed&&(e.key.name==="constructor"||e.key.value==="constructor")&&this.raise(h.ConstructorClassField,{at:e.key}),t.body.push(this.parseClassProperty(e))}pushClassPrivateProperty(t,e){let s=this.parseClassPrivateProperty(e);t.body.push(s),this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),0,s.key.loc.start)}pushClassAccessorProperty(t,e,s){if(!s&&!e.computed){let a=e.key;(a.name==="constructor"||a.value==="constructor")&&this.raise(h.ConstructorClassField,{at:a})}let r=this.parseClassAccessorProperty(e);t.body.push(r),s&&this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),0,r.key.loc.start)}pushClassMethod(t,e,s,r,a,n){t.body.push(this.parseMethod(e,s,r,a,n,"ClassMethod",!0))}pushClassPrivateMethod(t,e,s,r){let a=this.parseMethod(e,s,r,!1,!1,"ClassPrivateMethod",!0);t.body.push(a);let n=a.kind==="get"?a.static?6:2:a.kind==="set"?a.static?5:1:0;this.declareClassPrivateMethodInScope(a,n)}declareClassPrivateMethodInScope(t,e){this.classScope.declarePrivateName(this.getPrivateNameSV(t.key),e,t.key.loc.start)}parsePostMemberNameModifiers(t){}parseClassPrivateProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassPrivateProperty")}parseClassProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassProperty")}parseClassAccessorProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassAccessorProperty")}parseInitializer(t){this.scope.enter(80),this.expressionScope.enter(Ma()),this.prodParam.enter(0),t.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(t,e,s,r=8331){if(k(this.state.type))t.id=this.parseIdentifier(),e&&this.declareNameFromIdentifier(t.id,r);else if(s||!e)t.id=null;else throw this.raise(h.MissingClassName,{at:this.state.startLoc})}parseClassSuper(t){t.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(t,e){let s=this.parseMaybeImportPhase(t,!0),r=this.maybeParseExportDefaultSpecifier(t,s),a=!r||this.eat(12),n=a&&this.eatExportStar(t),o=n&&this.maybeParseExportNamespaceSpecifier(t),u=a&&(!o||this.eat(12)),l=r||n;if(n&&!o){if(r&&this.unexpected(),e)throw this.raise(h.UnsupportedDecoratorExport,{at:t});return this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration")}let c=this.maybeParseExportNamedSpecifiers(t);r&&a&&!n&&!c&&this.unexpected(null,5),o&&u&&this.unexpected(null,98);let p;if(l||c){if(p=!1,e)throw this.raise(h.UnsupportedDecoratorExport,{at:t});this.parseExportFrom(t,l)}else p=this.maybeParseExportDeclaration(t);if(l||c||p){var f;let m=t;if(this.checkExport(m,!0,!1,!!m.source),((f=m.declaration)==null?void 0:f.type)==="ClassDeclaration")this.maybeTakeDecorators(e,m.declaration,m);else if(e)throw this.raise(h.UnsupportedDecoratorExport,{at:t});return this.finishNode(m,"ExportNamedDeclaration")}if(this.eat(65)){let m=t,d=this.parseExportDefaultExpression();if(m.declaration=d,d.type==="ClassDeclaration")this.maybeTakeDecorators(e,d,m);else if(e)throw this.raise(h.UnsupportedDecoratorExport,{at:t});return this.checkExport(m,!0,!0),this.finishNode(m,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(t){return this.eat(55)}maybeParseExportDefaultSpecifier(t,e){if(e||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",e==null?void 0:e.loc.start);let s=e||this.parseIdentifier(!0),r=this.startNodeAtNode(s);return r.exported=s,t.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(t){if(this.isContextual(93)){t.specifiers||(t.specifiers=[]);let e=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),e.exported=this.parseModuleExportName(),t.specifiers.push(this.finishNode(e,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(t){if(this.match(5)){t.specifiers||(t.specifiers=[]);let e=t.exportKind==="type";return t.specifiers.push(...this.parseExportSpecifiers(e)),t.source=null,t.declaration=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),!0}return!1}maybeParseExportDeclaration(t){return this.shouldParseExportDeclaration()?(t.specifiers=[],t.source=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),t.declaration=this.parseExportDeclaration(t),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let t=this.nextTokenInLineStart();return this.isUnparsedContextual(t,"function")}parseExportDefaultExpression(){let t=this.startNode();if(this.match(68))return this.next(),this.parseFunction(t,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(t,13);if(this.match(80))return this.parseClass(t,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(h.DecoratorBeforeExport,{at:this.state.startLoc}),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(h.UnsupportedDefaultExport,{at:this.state.startLoc});let e=this.parseMaybeAssignAllowIn();return this.semicolon(),e}parseExportDeclaration(t){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:t}=this.state;if(k(t)){if(t===95&&!this.state.containsEsc||t===100)return!1;if((t===130||t===129)&&!this.state.containsEsc){let{type:r}=this.lookahead();if(k(r)&&r!==98||r===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let e=this.nextTokenStart(),s=this.isUnparsedContextual(e,"from");if(this.input.charCodeAt(e)===44||k(this.state.type)&&s)return!0;if(this.match(65)&&s){let r=this.input.charCodeAt(this.nextTokenStartSince(e+4));return r===34||r===39}return!1}parseExportFrom(t,e){this.eatContextual(98)?(t.source=this.parseImportSource(),this.checkExport(t),this.maybeParseImportAttributes(t),this.checkJSONModuleImport(t)):e&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:t}=this.state;return t===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(h.DecoratorBeforeExport,{at:this.state.startLoc}),!0):t===74||t===75||t===68||t===80||this.isLet()||this.isAsyncFunction()}checkExport(t,e,s,r){if(e){var a;if(s){if(this.checkDuplicateExports(t,"default"),this.hasPlugin("exportDefaultFrom")){var n;let o=t.declaration;o.type==="Identifier"&&o.name==="from"&&o.end-o.start===4&&!((n=o.extra)!=null&&n.parenthesized)&&this.raise(h.ExportDefaultFromAsIdentifier,{at:o})}}else if((a=t.specifiers)!=null&&a.length)for(let o of t.specifiers){let{exported:u}=o,l=u.type==="Identifier"?u.name:u.value;if(this.checkDuplicateExports(o,l),!r&&o.local){let{local:c}=o;c.type!=="Identifier"?this.raise(h.ExportBindingIsString,{at:o,localName:c.value,exportName:l}):(this.checkReservedWord(c.name,c.loc.start,!0,!1),this.scope.checkLocalExport(c))}}else if(t.declaration){if(t.declaration.type==="FunctionDeclaration"||t.declaration.type==="ClassDeclaration"){let o=t.declaration.id;if(!o)throw new Error("Assertion failure");this.checkDuplicateExports(t,o.name)}else if(t.declaration.type==="VariableDeclaration")for(let o of t.declaration.declarations)this.checkDeclaration(o.id)}}}checkDeclaration(t){if(t.type==="Identifier")this.checkDuplicateExports(t,t.name);else if(t.type==="ObjectPattern")for(let e of t.properties)this.checkDeclaration(e);else if(t.type==="ArrayPattern")for(let e of t.elements)e&&this.checkDeclaration(e);else t.type==="ObjectProperty"?this.checkDeclaration(t.value):t.type==="RestElement"?this.checkDeclaration(t.argument):t.type==="AssignmentPattern"&&this.checkDeclaration(t.left)}checkDuplicateExports(t,e){this.exportedIdentifiers.has(e)&&(e==="default"?this.raise(h.DuplicateDefaultExport,{at:t}):this.raise(h.DuplicateExport,{at:t,exportName:e})),this.exportedIdentifiers.add(e)}parseExportSpecifiers(t){let e=[],s=!0;for(this.expect(5);!this.eat(8);){if(s)s=!1;else if(this.expect(12),this.eat(8))break;let r=this.isContextual(130),a=this.match(133),n=this.startNode();n.local=this.parseModuleExportName(),e.push(this.parseExportSpecifier(n,a,t,r))}return e}parseExportSpecifier(t,e,s,r){return this.eatContextual(93)?t.exported=this.parseModuleExportName():e?t.exported=Pl(t.local):t.exported||(t.exported=ne(t.local)),this.finishNode(t,"ExportSpecifier")}parseModuleExportName(){if(this.match(133)){let t=this.parseStringLiteral(this.state.value),e=t.value.match(Vl);return e&&this.raise(h.ModuleExportNameHasLoneSurrogate,{at:t,surrogateCharCode:e[0].charCodeAt(0)}),t}return this.parseIdentifier(!0)}isJSONModuleImport(t){return t.assertions!=null?t.assertions.some(({key:e,value:s})=>s.value==="json"&&(e.type==="Identifier"?e.name==="type":e.value==="type")):!1}checkImportReflection(t){let{specifiers:e}=t,s=e.length===1?e[0].type:null;if(t.phase==="source")s!=="ImportDefaultSpecifier"&&this.raise(h.SourcePhaseImportRequiresDefault,{at:e[0].loc.start});else if(t.phase==="defer")s!=="ImportNamespaceSpecifier"&&this.raise(h.DeferImportRequiresNamespace,{at:e[0].loc.start});else if(t.module){var r;s!=="ImportDefaultSpecifier"&&this.raise(h.ImportReflectionNotBinding,{at:e[0].loc.start}),((r=t.assertions)==null?void 0:r.length)>0&&this.raise(h.ImportReflectionHasAssertion,{at:t.specifiers[0].loc.start})}}checkJSONModuleImport(t){if(this.isJSONModuleImport(t)&&t.type!=="ExportAllDeclaration"){let{specifiers:e}=t;if(e!=null){let s=e.find(r=>{let a;if(r.type==="ExportSpecifier"?a=r.local:r.type==="ImportSpecifier"&&(a=r.imported),a!==void 0)return a.type==="Identifier"?a.name!=="default":a.value!=="default"});s!==void 0&&this.raise(h.ImportJSONBindingNotDefault,{at:s.loc.start})}}}isPotentialImportPhase(t){return t?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(t,e,s,r){e||(s==="module"?(this.expectPlugin("importReflection",r),t.module=!0):this.hasPlugin("importReflection")&&(t.module=!1),s==="source"?(this.expectPlugin("sourcePhaseImports",r),t.phase="source"):s==="defer"?(this.expectPlugin("deferredImportEvaluation",r),t.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(t.phase=null))}parseMaybeImportPhase(t,e){if(!this.isPotentialImportPhase(e))return this.applyImportPhase(t,e,null),null;let s=this.parseIdentifier(!0),{type:r}=this.state;return(X(r)?r!==98||this.lookaheadCharCode()===102:r!==12)?(this.resetPreviousIdentifierLeadingComments(s),this.applyImportPhase(t,e,s.name,s.loc.start),null):(this.applyImportPhase(t,e,null),s)}isPrecedingIdImportPhase(t){let{type:e}=this.state;return k(e)?e!==98||this.lookaheadCharCode()===102:e!==12}parseImport(t){return this.match(133)?this.parseImportSourceAndAttributes(t):this.parseImportSpecifiersAndAfter(t,this.parseMaybeImportPhase(t,!1))}parseImportSpecifiersAndAfter(t,e){t.specifiers=[];let r=!this.maybeParseDefaultImportSpecifier(t,e)||this.eat(12),a=r&&this.maybeParseStarImportSpecifier(t);return r&&!a&&this.parseNamedImportSpecifiers(t),this.expectContextual(98),this.parseImportSourceAndAttributes(t)}parseImportSourceAndAttributes(t){var e;return(e=t.specifiers)!=null||(t.specifiers=[]),t.source=this.parseImportSource(),this.maybeParseImportAttributes(t),this.checkImportReflection(t),this.checkJSONModuleImport(t),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.match(133)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(t,e,s){e.local=this.parseIdentifier(),t.specifiers.push(this.finishImportSpecifier(e,s))}finishImportSpecifier(t,e,s=8201){return this.checkLVal(t.local,{in:{type:e},binding:s}),this.finishNode(t,e)}parseImportAttributes(){this.expect(5);let t=[],e=new Set;do{if(this.match(8))break;let s=this.startNode(),r=this.state.value;if(e.has(r)&&this.raise(h.ModuleAttributesWithDuplicateKeys,{at:this.state.startLoc,key:r}),e.add(r),this.match(133)?s.key=this.parseStringLiteral(r):s.key=this.parseIdentifier(!0),this.expect(14),!this.match(133))throw this.raise(h.ModuleAttributeInvalidValue,{at:this.state.startLoc});s.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return this.expect(8),t}parseModuleAttributes(){let t=[],e=new Set;do{let s=this.startNode();if(s.key=this.parseIdentifier(!0),s.key.name!=="type"&&this.raise(h.ModuleAttributeDifferentFromType,{at:s.key}),e.has(s.key.name)&&this.raise(h.ModuleAttributesWithDuplicateKeys,{at:s.key,key:s.key.name}),e.add(s.key.name),this.expect(14),!this.match(133))throw this.raise(h.ModuleAttributeInvalidValue,{at:this.state.startLoc});s.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return t}maybeParseImportAttributes(t){let e,s=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?e=this.parseModuleAttributes():(this.expectImportAttributesPlugin(),e=this.parseImportAttributes()),s=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.hasPlugin("importAttributes")?(this.getPluginOption("importAttributes","deprecatedAssertSyntax")!==!0&&this.raise(h.ImportAttributesUseAssert,{at:this.state.startLoc}),this.addExtra(t,"deprecatedAssertSyntax",!0)):this.expectOnePlugin(["importAttributes","importAssertions"]),this.next(),e=this.parseImportAttributes();else if(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))e=[];else if(this.hasPlugin("moduleAttributes"))e=[];else return;!s&&this.hasPlugin("importAssertions")?t.assertions=e:t.attributes=e}maybeParseDefaultImportSpecifier(t,e){if(e){let s=this.startNodeAtNode(e);return s.local=e,t.specifiers.push(this.finishImportSpecifier(s,"ImportDefaultSpecifier")),!0}else if(X(this.state.type))return this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(t){if(this.match(55)){let e=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(t,e,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(t){let e=!0;for(this.expect(5);!this.eat(8);){if(e)e=!1;else{if(this.eat(14))throw this.raise(h.DestructureNamedImport,{at:this.state.startLoc});if(this.expect(12),this.eat(8))break}let s=this.startNode(),r=this.match(133),a=this.isContextual(130);s.imported=this.parseModuleExportName();let n=this.parseImportSpecifier(s,r,t.importKind==="type"||t.importKind==="typeof",a,void 0);t.specifiers.push(n)}}parseImportSpecifier(t,e,s,r,a){if(this.eatContextual(93))t.local=this.parseIdentifier();else{let{imported:n}=t;if(e)throw this.raise(h.ImportBindingIsString,{at:t,importName:n.value});this.checkReservedWord(n.name,t.loc.start,!0,!0),t.local||(t.local=ne(n))}return this.finishImportSpecifier(t,"ImportSpecifier",a)}isThisParam(t){return t.type==="Identifier"&&t.name==="this"}},zt=class extends Ks{constructor(t,e){t=ql(t),super(t,e),this.options=t,this.initializeScopes(),this.plugins=Hl(this.options.plugins),this.filename=t.sourceFilename}getScopeHandler(){return at}parse(){this.enterInitialScopes();let t=this.startNode(),e=this.startNode();return this.nextToken(),t.errors=null,this.parseTopLevel(t,e),t.errors=this.state.errors,t}};function Hl(i){let t=new Map;for(let e of i){let[s,r]=Array.isArray(e)?e:[e,{}];t.has(s)||t.set(s,r||{})}return t}function Kl(i,t){var e;if(((e=t)==null?void 0:e.sourceType)==="unambiguous"){t=Object.assign({},t);try{t.sourceType="module";let s=tt(t,i),r=s.parse();if(s.sawUnambiguousESM)return r;if(s.ambiguousScriptDifferentAst)try{return t.sourceType="script",tt(t,i).parse()}catch{}else r.program.sourceType="script";return r}catch(s){try{return t.sourceType="script",tt(t,i).parse()}catch{}throw s}}else return tt(t,i).parse()}function Gl(i,t){let e=tt(t,i);return e.options.strictMode&&(e.state.strict=!0),e.getExpression()}function Xl(i){let t={};for(let e of Object.keys(i))t[e]=se(i[e]);return t}var Jl=Xl($u);function tt(i,t){let e=zt;return i!=null&&i.plugins&&(Ul(i.plugins),e=Yl(i.plugins)),new e(i,t)}var va={};function Yl(i){let t=$l.filter(r=>D(i,r)),e=t.join("/"),s=va[e];if(!s){s=zt;for(let r of t)s=Fa[r](s);va[e]=s}return s}ot.parse=Kl;ot.parseExpression=Gl;ot.tokTypes=Jl});var qa=A((op,$a)=>{"use strict";var{Duplex:Ql}=require("stream");function ja(i){i.emit("close")}function Zl(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Ua(i){this.removeListener("error",Ua),this.destroy(),this.listenerCount("error")===0&&this.emit("error",i)}function ec(i,t){let e=!0,s=new Ql({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return i.on("message",function(a,n){let o=!n&&s._readableState.objectMode?a.toString():a;s.push(o)||i.pause()}),i.once("error",function(a){s.destroyed||(e=!1,s.destroy(a))}),i.once("close",function(){s.destroyed||s.push(null)}),s._destroy=function(r,a){if(i.readyState===i.CLOSED){a(r),process.nextTick(ja,s);return}let n=!1;i.once("error",function(u){n=!0,a(u)}),i.once("close",function(){n||a(r),process.nextTick(ja,s)}),e&&i.terminate()},s._final=function(r){if(i.readyState===i.CONNECTING){i.once("open",function(){s._final(r)});return}i._socket!==null&&(i._socket._writableState.finished?(r(),s._readableState.endEmitted&&s.destroy()):(i._socket.once("finish",function(){r()}),i.close()))},s._read=function(){i.isPaused&&i.resume()},s._write=function(r,a,n){if(i.readyState===i.CONNECTING){i.once("open",function(){s._write(r,a,n)});return}i.send(r,n)},s.on("end",Zl),s.on("error",Ua),s}$a.exports=ec});var de=A((up,Wa)=>{"use strict";Wa.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 ut=A((lp,Ht)=>{"use strict";var{EMPTY_BUFFER:tc}=de(),ir=Buffer[Symbol.species];function sc(i,t){if(i.length===0)return tc;if(i.length===1)return i[0];let e=Buffer.allocUnsafe(t),s=0;for(let r=0;r<i.length;r++){let a=i[r];e.set(a,s),s+=a.length}return s<t?new ir(e.buffer,e.byteOffset,s):e}function Va(i,t,e,s,r){for(let a=0;a<r;a++)e[s+a]=i[a]^t[a&3]}function za(i,t){for(let e=0;e<i.length;e++)i[e]^=t[e&3]}function rc(i){return i.length===i.buffer.byteLength?i.buffer:i.buffer.slice(i.byteOffset,i.byteOffset+i.length)}function ar(i){if(ar.readOnly=!0,Buffer.isBuffer(i))return i;let t;return i instanceof ArrayBuffer?t=new ir(i):ArrayBuffer.isView(i)?t=new ir(i.buffer,i.byteOffset,i.byteLength):(t=Buffer.from(i),ar.readOnly=!1),t}Ht.exports={concat:sc,mask:Va,toArrayBuffer:rc,toBuffer:ar,unmask:za};if(!process.env.WS_NO_BUFFER_UTIL)try{let i=require("bufferutil");Ht.exports.mask=function(t,e,s,r,a){a<48?Va(t,e,s,r,a):i.mask(t,e,s,r,a)},Ht.exports.unmask=function(t,e){t.length<32?za(t,e):i.unmask(t,e)}}catch{}});var Ga=A((cp,Ka)=>{"use strict";var Ha=Symbol("kDone"),nr=Symbol("kRun"),or=class{constructor(t){this[Ha]=()=>{this.pending--,this[nr]()},this.concurrency=t||1/0,this.jobs=[],this.pending=0}add(t){this.jobs.push(t),this[nr]()}[nr](){if(this.pending!==this.concurrency&&this.jobs.length){let t=this.jobs.shift();this.pending++,t(this[Ha])}}};Ka.exports=or});var ht=A((hp,Qa)=>{"use strict";var lt=require("zlib"),Xa=ut(),ic=Ga(),{kStatusCode:Ja}=de(),ac=Buffer[Symbol.species],nc=Buffer.from([0,0,255,255]),Xt=Symbol("permessage-deflate"),oe=Symbol("total-length"),ct=Symbol("callback"),me=Symbol("buffers"),Gt=Symbol("error"),Kt,ur=class{constructor(t,e,s){if(this._maxPayload=s|0,this._options=t||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!e,this._deflate=null,this._inflate=null,this.params=null,!Kt){let r=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;Kt=new ic(r)}}static get extensionName(){return"permessage-deflate"}offer(){let t={};return this._options.serverNoContextTakeover&&(t.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(t.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(t.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?t.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(t.client_max_window_bits=!0),t}accept(t){return t=this.normalizeParams(t),this.params=this._isServer?this.acceptAsServer(t):this.acceptAsClient(t),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let t=this._deflate[ct];this._deflate.close(),this._deflate=null,t&&t(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(t){let e=this._options,s=t.find(r=>!(e.serverNoContextTakeover===!1&&r.server_no_context_takeover||r.server_max_window_bits&&(e.serverMaxWindowBits===!1||typeof e.serverMaxWindowBits=="number"&&e.serverMaxWindowBits>r.server_max_window_bits)||typeof e.clientMaxWindowBits=="number"&&!r.client_max_window_bits));if(!s)throw new Error("None of the extension offers can be accepted");return e.serverNoContextTakeover&&(s.server_no_context_takeover=!0),e.clientNoContextTakeover&&(s.client_no_context_takeover=!0),typeof e.serverMaxWindowBits=="number"&&(s.server_max_window_bits=e.serverMaxWindowBits),typeof e.clientMaxWindowBits=="number"?s.client_max_window_bits=e.clientMaxWindowBits:(s.client_max_window_bits===!0||e.clientMaxWindowBits===!1)&&delete s.client_max_window_bits,s}acceptAsClient(t){let e=t[0];if(this._options.clientNoContextTakeover===!1&&e.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!e.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(e.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&e.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return e}normalizeParams(t){return t.forEach(e=>{Object.keys(e).forEach(s=>{let r=e[s];if(r.length>1)throw new Error(`Parameter "${s}" must have only a single value`);if(r=r[0],s==="client_max_window_bits"){if(r!==!0){let a=+r;if(!Number.isInteger(a)||a<8||a>15)throw new TypeError(`Invalid value for parameter "${s}": ${r}`);r=a}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${s}": ${r}`)}else if(s==="server_max_window_bits"){let a=+r;if(!Number.isInteger(a)||a<8||a>15)throw new TypeError(`Invalid value for parameter "${s}": ${r}`);r=a}else if(s==="client_no_context_takeover"||s==="server_no_context_takeover"){if(r!==!0)throw new TypeError(`Invalid value for parameter "${s}": ${r}`)}else throw new Error(`Unknown parameter "${s}"`);e[s]=r})}),t}decompress(t,e,s){Kt.add(r=>{this._decompress(t,e,(a,n)=>{r(),s(a,n)})})}compress(t,e,s){Kt.add(r=>{this._compress(t,e,(a,n)=>{r(),s(a,n)})})}_decompress(t,e,s){let r=this._isServer?"client":"server";if(!this._inflate){let a=`${r}_max_window_bits`,n=typeof this.params[a]!="number"?lt.Z_DEFAULT_WINDOWBITS:this.params[a];this._inflate=lt.createInflateRaw({...this._options.zlibInflateOptions,windowBits:n}),this._inflate[Xt]=this,this._inflate[oe]=0,this._inflate[me]=[],this._inflate.on("error",uc),this._inflate.on("data",Ya)}this._inflate[ct]=s,this._inflate.write(t),e&&this._inflate.write(nc),this._inflate.flush(()=>{let a=this._inflate[Gt];if(a){this._inflate.close(),this._inflate=null,s(a);return}let n=Xa.concat(this._inflate[me],this._inflate[oe]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[oe]=0,this._inflate[me]=[],e&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),s(null,n)})}_compress(t,e,s){let r=this._isServer?"server":"client";if(!this._deflate){let a=`${r}_max_window_bits`,n=typeof this.params[a]!="number"?lt.Z_DEFAULT_WINDOWBITS:this.params[a];this._deflate=lt.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:n}),this._deflate[oe]=0,this._deflate[me]=[],this._deflate.on("data",oc)}this._deflate[ct]=s,this._deflate.write(t),this._deflate.flush(lt.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let a=Xa.concat(this._deflate[me],this._deflate[oe]);e&&(a=new ac(a.buffer,a.byteOffset,a.length-4)),this._deflate[ct]=null,this._deflate[oe]=0,this._deflate[me]=[],e&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),s(null,a)})}};Qa.exports=ur;function oc(i){this[me].push(i),this[oe]+=i.length}function Ya(i){if(this[oe]+=i.length,this[Xt]._maxPayload<1||this[oe]<=this[Xt]._maxPayload){this[me].push(i);return}this[Gt]=new RangeError("Max payload size exceeded"),this[Gt].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Gt][Ja]=1009,this.removeListener("data",Ya),this.reset()}function uc(i){this[Xt]._inflate=null,i[Ja]=1007,this[ct](i)}});var pt=A((pp,Jt)=>{"use strict";var{isUtf8:Za}=require("buffer"),lc=[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 cc(i){return i>=1e3&&i<=1014&&i!==1004&&i!==1005&&i!==1006||i>=3e3&&i<=4999}function lr(i){let t=i.length,e=0;for(;e<t;)if(!(i[e]&128))e++;else if((i[e]&224)===192){if(e+1===t||(i[e+1]&192)!==128||(i[e]&254)===192)return!1;e+=2}else if((i[e]&240)===224){if(e+2>=t||(i[e+1]&192)!==128||(i[e+2]&192)!==128||i[e]===224&&(i[e+1]&224)===128||i[e]===237&&(i[e+1]&224)===160)return!1;e+=3}else if((i[e]&248)===240){if(e+3>=t||(i[e+1]&192)!==128||(i[e+2]&192)!==128||(i[e+3]&192)!==128||i[e]===240&&(i[e+1]&240)===128||i[e]===244&&i[e+1]>143||i[e]>244)return!1;e+=4}else return!1;return!0}Jt.exports={isValidStatusCode:cc,isValidUTF8:lr,tokenChars:lc};if(Za)Jt.exports.isValidUTF8=function(i){return i.length<24?lr(i):Za(i)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let i=require("utf-8-validate");Jt.exports.isValidUTF8=function(t){return t.length<32?lr(t):i(t)}}catch{}});var dr=A((fp,on)=>{"use strict";var{Writable:hc}=require("stream"),en=ht(),{BINARY_TYPES:pc,EMPTY_BUFFER:tn,kStatusCode:fc,kWebSocket:dc}=de(),{concat:cr,toArrayBuffer:mc,unmask:yc}=ut(),{isValidStatusCode:xc,isValidUTF8:sn}=pt(),Yt=Buffer[Symbol.species],gc=Promise.resolve(),hr=typeof queueMicrotask=="function"?queueMicrotask:bc,H=0,rn=1,an=2,nn=3,pr=4,Qt=5,Zt=6,fr=class extends hc{constructor(t={}){super(),this._allowSynchronousEvents=!!t.allowSynchronousEvents,this._binaryType=t.binaryType||pc[0],this._extensions=t.extensions||{},this._isServer=!!t.isServer,this._maxPayload=t.maxPayload|0,this._skipUTF8Validation=!!t.skipUTF8Validation,this[dc]=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=H}_write(t,e,s){if(this._opcode===8&&this._state==H)return s();this._bufferedBytes+=t.length,this._buffers.push(t),this.startLoop(s)}consume(t){if(this._bufferedBytes-=t,t===this._buffers[0].length)return this._buffers.shift();if(t<this._buffers[0].length){let s=this._buffers[0];return this._buffers[0]=new Yt(s.buffer,s.byteOffset+t,s.length-t),new Yt(s.buffer,s.byteOffset,t)}let e=Buffer.allocUnsafe(t);do{let s=this._buffers[0],r=e.length-t;t>=s.length?e.set(this._buffers.shift(),r):(e.set(new Uint8Array(s.buffer,s.byteOffset,t),r),this._buffers[0]=new Yt(s.buffer,s.byteOffset+t,s.length-t)),t-=s.length}while(t>0);return e}startLoop(t){this._loop=!0;do switch(this._state){case H:this.getInfo(t);break;case rn:this.getPayloadLength16(t);break;case an:this.getPayloadLength64(t);break;case nn:this.getMask();break;case pr:this.getData(t);break;case Qt:case Zt:this._loop=!1;return}while(this._loop);this._errored||t()}getInfo(t){if(this._bufferedBytes<2){this._loop=!1;return}let e=this.consume(2);if(e[0]&48){let r=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");t(r);return}let s=(e[0]&64)===64;if(s&&!this._extensions[en.extensionName]){let r=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(r);return}if(this._fin=(e[0]&128)===128,this._opcode=e[0]&15,this._payloadLength=e[1]&127,this._opcode===0){if(s){let r=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(r);return}if(!this._fragmented){let r=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");t(r);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let r=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");t(r);return}this._compressed=s}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let r=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");t(r);return}if(s){let r=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(r);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let r=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");t(r);return}}else{let r=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");t(r);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(e[1]&128)===128,this._isServer){if(!this._masked){let r=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");t(r);return}}else if(this._masked){let r=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");t(r);return}this._payloadLength===126?this._state=rn:this._payloadLength===127?this._state=an:this.haveLength(t)}getPayloadLength16(t){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(t)}getPayloadLength64(t){if(this._bufferedBytes<8){this._loop=!1;return}let e=this.consume(8),s=e.readUInt32BE(0);if(s>Math.pow(2,21)-1){let r=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");t(r);return}this._payloadLength=s*Math.pow(2,32)+e.readUInt32BE(4),this.haveLength(t)}haveLength(t){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let e=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");t(e);return}this._masked?this._state=nn:this._state=pr}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=pr}getData(t){let e=tn;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}e=this.consume(this._payloadLength),this._masked&&this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3]&&yc(e,this._mask)}if(this._opcode>7){this.controlMessage(e,t);return}if(this._compressed){this._state=Qt,this.decompress(e,t);return}e.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(e)),this.dataMessage(t)}decompress(t,e){this._extensions[en.extensionName].decompress(t,this._fin,(r,a)=>{if(r)return e(r);if(a.length){if(this._messageLength+=a.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let n=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(n);return}this._fragments.push(a)}this.dataMessage(e),this._state===H&&this.startLoop(e)})}dataMessage(t){if(!this._fin){this._state=H;return}let e=this._messageLength,s=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let r;this._binaryType==="nodebuffer"?r=cr(s,e):this._binaryType==="arraybuffer"?r=mc(cr(s,e)):r=s,this._state===Qt||this._allowSynchronousEvents?(this.emit("message",r,!0),this._state=H):(this._state=Zt,hr(()=>{this.emit("message",r,!0),this._state=H,this.startLoop(t)}))}else{let r=cr(s,e);if(!this._skipUTF8Validation&&!sn(r)){let a=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(a);return}this._state===Qt||this._allowSynchronousEvents?(this.emit("message",r,!1),this._state=H):(this._state=Zt,hr(()=>{this.emit("message",r,!1),this._state=H,this.startLoop(t)}))}}controlMessage(t,e){if(this._opcode===8){if(t.length===0)this._loop=!1,this.emit("conclude",1005,tn),this.end();else{let s=t.readUInt16BE(0);if(!xc(s)){let a=this.createError(RangeError,`invalid status code ${s}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");e(a);return}let r=new Yt(t.buffer,t.byteOffset+2,t.length-2);if(!this._skipUTF8Validation&&!sn(r)){let a=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(a);return}this._loop=!1,this.emit("conclude",s,r),this.end()}this._state=H;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",t),this._state=H):(this._state=Zt,hr(()=>{this.emit(this._opcode===9?"ping":"pong",t),this._state=H,this.startLoop(e)}))}createError(t,e,s,r,a){this._loop=!1,this._errored=!0;let n=new t(s?`Invalid WebSocket frame: ${e}`:e);return Error.captureStackTrace(n,this.createError),n.code=a,n[fc]=r,n}};on.exports=fr;function bc(i){gc.then(i).catch(vc)}function Pc(i){throw i}function vc(i){process.nextTick(Pc,i)}});var yr=A((mp,cn)=>{"use strict";var{Duplex:dp}=require("stream"),{randomFillSync:wc}=require("crypto"),un=ht(),{EMPTY_BUFFER:Tc}=de(),{isValidStatusCode:Sc}=pt(),{mask:ln,toBuffer:Ue}=ut(),J=Symbol("kByteLength"),Ac=Buffer.alloc(4),mr=class i{constructor(t,e,s){this._extensions=e||{},s&&(this._generateMask=s,this._maskBuffer=Buffer.alloc(4)),this._socket=t,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(t,e){let s,r=!1,a=2,n=!1;e.mask&&(s=e.maskBuffer||Ac,e.generateMask?e.generateMask(s):wc(s,0,4),n=(s[0]|s[1]|s[2]|s[3])===0,a=6);let o;typeof t=="string"?(!e.mask||n)&&e[J]!==void 0?o=e[J]:(t=Buffer.from(t),o=t.length):(o=t.length,r=e.mask&&e.readOnly&&!n);let u=o;o>=65536?(a+=8,u=127):o>125&&(a+=2,u=126);let l=Buffer.allocUnsafe(r?o+a:a);return l[0]=e.fin?e.opcode|128:e.opcode,e.rsv1&&(l[0]|=64),l[1]=u,u===126?l.writeUInt16BE(o,2):u===127&&(l[2]=l[3]=0,l.writeUIntBE(o,4,6)),e.mask?(l[1]|=128,l[a-4]=s[0],l[a-3]=s[1],l[a-2]=s[2],l[a-1]=s[3],n?[l,t]:r?(ln(t,s,l,a,o),[l]):(ln(t,s,t,0,o),[l,t])):[l,t]}close(t,e,s,r){let a;if(t===void 0)a=Tc;else{if(typeof t!="number"||!Sc(t))throw new TypeError("First argument must be a valid error code number");if(e===void 0||!e.length)a=Buffer.allocUnsafe(2),a.writeUInt16BE(t,0);else{let o=Buffer.byteLength(e);if(o>123)throw new RangeError("The message must not be greater than 123 bytes");a=Buffer.allocUnsafe(2+o),a.writeUInt16BE(t,0),typeof e=="string"?a.write(e,2):a.set(e,2)}}let n={[J]:a.length,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,a,!1,n,r]):this.sendFrame(i.frame(a,n),r)}ping(t,e,s){let r,a;if(typeof t=="string"?(r=Buffer.byteLength(t),a=!1):(t=Ue(t),r=t.length,a=Ue.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");let n={[J]:r,fin:!0,generateMask:this._generateMask,mask:e,maskBuffer:this._maskBuffer,opcode:9,readOnly:a,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,n,s]):this.sendFrame(i.frame(t,n),s)}pong(t,e,s){let r,a;if(typeof t=="string"?(r=Buffer.byteLength(t),a=!1):(t=Ue(t),r=t.length,a=Ue.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");let n={[J]:r,fin:!0,generateMask:this._generateMask,mask:e,maskBuffer:this._maskBuffer,opcode:10,readOnly:a,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,n,s]):this.sendFrame(i.frame(t,n),s)}send(t,e,s){let r=this._extensions[un.extensionName],a=e.binary?2:1,n=e.compress,o,u;if(typeof t=="string"?(o=Buffer.byteLength(t),u=!1):(t=Ue(t),o=t.length,u=Ue.readOnly),this._firstFragment?(this._firstFragment=!1,n&&r&&r.params[r._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(n=o>=r._threshold),this._compress=n):(n=!1,a=0),e.fin&&(this._firstFragment=!0),r){let l={[J]:o,fin:e.fin,generateMask:this._generateMask,mask:e.mask,maskBuffer:this._maskBuffer,opcode:a,readOnly:u,rsv1:n};this._deflating?this.enqueue([this.dispatch,t,this._compress,l,s]):this.dispatch(t,this._compress,l,s)}else this.sendFrame(i.frame(t,{[J]:o,fin:e.fin,generateMask:this._generateMask,mask:e.mask,maskBuffer:this._maskBuffer,opcode:a,readOnly:u,rsv1:!1}),s)}dispatch(t,e,s,r){if(!e){this.sendFrame(i.frame(t,s),r);return}let a=this._extensions[un.extensionName];this._bufferedBytes+=s[J],this._deflating=!0,a.compress(t,s.fin,(n,o)=>{if(this._socket.destroyed){let u=new Error("The socket was closed while data was being compressed");typeof r=="function"&&r(u);for(let l=0;l<this._queue.length;l++){let c=this._queue[l],p=c[c.length-1];typeof p=="function"&&p(u)}return}this._bufferedBytes-=s[J],this._deflating=!1,s.readOnly=!1,this.sendFrame(i.frame(o,s),r),this.dequeue()})}dequeue(){for(;!this._deflating&&this._queue.length;){let t=this._queue.shift();this._bufferedBytes-=t[3][J],Reflect.apply(t[0],this,t.slice(1))}}enqueue(t){this._bufferedBytes+=t[3][J],this._queue.push(t)}sendFrame(t,e){t.length===2?(this._socket.cork(),this._socket.write(t[0]),this._socket.write(t[1],e),this._socket.uncork()):this._socket.write(t[0],e)}};cn.exports=mr});var bn=A((yp,gn)=>{"use strict";var{kForOnEventAttribute:ft,kListener:xr}=de(),hn=Symbol("kCode"),pn=Symbol("kData"),fn=Symbol("kError"),dn=Symbol("kMessage"),mn=Symbol("kReason"),$e=Symbol("kTarget"),yn=Symbol("kType"),xn=Symbol("kWasClean"),ue=class{constructor(t){this[$e]=null,this[yn]=t}get target(){return this[$e]}get type(){return this[yn]}};Object.defineProperty(ue.prototype,"target",{enumerable:!0});Object.defineProperty(ue.prototype,"type",{enumerable:!0});var Te=class extends ue{constructor(t,e={}){super(t),this[hn]=e.code===void 0?0:e.code,this[mn]=e.reason===void 0?"":e.reason,this[xn]=e.wasClean===void 0?!1:e.wasClean}get code(){return this[hn]}get reason(){return this[mn]}get wasClean(){return this[xn]}};Object.defineProperty(Te.prototype,"code",{enumerable:!0});Object.defineProperty(Te.prototype,"reason",{enumerable:!0});Object.defineProperty(Te.prototype,"wasClean",{enumerable:!0});var qe=class extends ue{constructor(t,e={}){super(t),this[fn]=e.error===void 0?null:e.error,this[dn]=e.message===void 0?"":e.message}get error(){return this[fn]}get message(){return this[dn]}};Object.defineProperty(qe.prototype,"error",{enumerable:!0});Object.defineProperty(qe.prototype,"message",{enumerable:!0});var dt=class extends ue{constructor(t,e={}){super(t),this[pn]=e.data===void 0?null:e.data}get data(){return this[pn]}};Object.defineProperty(dt.prototype,"data",{enumerable:!0});var Ec={addEventListener(i,t,e={}){for(let r of this.listeners(i))if(!e[ft]&&r[xr]===t&&!r[ft])return;let s;if(i==="message")s=function(a,n){let o=new dt("message",{data:n?a:a.toString()});o[$e]=this,es(t,this,o)};else if(i==="close")s=function(a,n){let o=new Te("close",{code:a,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});o[$e]=this,es(t,this,o)};else if(i==="error")s=function(a){let n=new qe("error",{error:a,message:a.message});n[$e]=this,es(t,this,n)};else if(i==="open")s=function(){let a=new ue("open");a[$e]=this,es(t,this,a)};else return;s[ft]=!!e[ft],s[xr]=t,e.once?this.once(i,s):this.on(i,s)},removeEventListener(i,t){for(let e of this.listeners(i))if(e[xr]===t&&!e[ft]){this.removeListener(i,e);break}}};gn.exports={CloseEvent:Te,ErrorEvent:qe,Event:ue,EventTarget:Ec,MessageEvent:dt};function es(i,t,e){typeof i=="object"&&i.handleEvent?i.handleEvent.call(i,e):i.call(t,e)}});var gr=A((xp,Pn)=>{"use strict";var{tokenChars:mt}=pt();function ee(i,t,e){i[t]===void 0?i[t]=[e]:i[t].push(e)}function Cc(i){let t=Object.create(null),e=Object.create(null),s=!1,r=!1,a=!1,n,o,u=-1,l=-1,c=-1,p=0;for(;p<i.length;p++)if(l=i.charCodeAt(p),n===void 0)if(c===-1&&mt[l]===1)u===-1&&(u=p);else if(p!==0&&(l===32||l===9))c===-1&&u!==-1&&(c=p);else if(l===59||l===44){if(u===-1)throw new SyntaxError(`Unexpected character at index ${p}`);c===-1&&(c=p);let m=i.slice(u,c);l===44?(ee(t,m,e),e=Object.create(null)):n=m,u=c=-1}else throw new SyntaxError(`Unexpected character at index ${p}`);else if(o===void 0)if(c===-1&&mt[l]===1)u===-1&&(u=p);else if(l===32||l===9)c===-1&&u!==-1&&(c=p);else if(l===59||l===44){if(u===-1)throw new SyntaxError(`Unexpected character at index ${p}`);c===-1&&(c=p),ee(e,i.slice(u,c),!0),l===44&&(ee(t,n,e),e=Object.create(null),n=void 0),u=c=-1}else if(l===61&&u!==-1&&c===-1)o=i.slice(u,p),u=c=-1;else throw new SyntaxError(`Unexpected character at index ${p}`);else if(r){if(mt[l]!==1)throw new SyntaxError(`Unexpected character at index ${p}`);u===-1?u=p:s||(s=!0),r=!1}else if(a)if(mt[l]===1)u===-1&&(u=p);else if(l===34&&u!==-1)a=!1,c=p;else if(l===92)r=!0;else throw new SyntaxError(`Unexpected character at index ${p}`);else if(l===34&&i.charCodeAt(p-1)===61)a=!0;else if(c===-1&&mt[l]===1)u===-1&&(u=p);else if(u!==-1&&(l===32||l===9))c===-1&&(c=p);else if(l===59||l===44){if(u===-1)throw new SyntaxError(`Unexpected character at index ${p}`);c===-1&&(c=p);let m=i.slice(u,c);s&&(m=m.replace(/\\/g,""),s=!1),ee(e,o,m),l===44&&(ee(t,n,e),e=Object.create(null),n=void 0),o=void 0,u=c=-1}else throw new SyntaxError(`Unexpected character at index ${p}`);if(u===-1||a||l===32||l===9)throw new SyntaxError("Unexpected end of input");c===-1&&(c=p);let f=i.slice(u,c);return n===void 0?ee(t,f,e):(o===void 0?ee(e,f,!0):s?ee(e,o,f.replace(/\\/g,"")):ee(e,o,f),ee(t,n,e)),t}function Ic(i){return Object.keys(i).map(t=>{let e=i[t];return Array.isArray(e)||(e=[e]),e.map(s=>[t].concat(Object.keys(s).map(r=>{let a=s[r];return Array.isArray(a)||(a=[a]),a.map(n=>n===!0?r:`${r}=${n}`).join("; ")})).join("; ")).join(", ")}).join(", ")}Pn.exports={format:Ic,parse:Cc}});var Tr=A((Pp,_n)=>{"use strict";var kc=require("events"),Nc=require("https"),_c=require("http"),Tn=require("net"),Oc=require("tls"),{randomBytes:Mc,createHash:Lc}=require("crypto"),{Duplex:gp,Readable:bp}=require("stream"),{URL:br}=require("url"),ye=ht(),Dc=dr(),Bc=yr(),{BINARY_TYPES:vn,EMPTY_BUFFER:ts,GUID:Fc,kForOnEventAttribute:Pr,kListener:Rc,kStatusCode:jc,kWebSocket:j,NOOP:Sn}=de(),{EventTarget:{addEventListener:Uc,removeEventListener:$c}}=bn(),{format:qc,parse:Wc}=gr(),{toBuffer:Vc}=ut(),zc=30*1e3,An=Symbol("kAborted"),vr=[8,13],le=["CONNECTING","OPEN","CLOSING","CLOSED"],Hc=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,O=class i extends kc{constructor(t,e,s){super(),this._binaryType=vn[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=ts,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=i.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,t!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,e===void 0?e=[]:Array.isArray(e)||(typeof e=="object"&&e!==null?(s=e,e=[]):e=[e]),En(this,t,e,s)):(this._autoPong=s.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(t){vn.includes(t)&&(this._binaryType=t,this._receiver&&(this._receiver._binaryType=t))}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(t,e,s){let r=new Dc({allowSynchronousEvents:s.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:s.maxPayload,skipUTF8Validation:s.skipUTF8Validation});this._sender=new Bc(t,this._extensions,s.generateMask),this._receiver=r,this._socket=t,r[j]=this,t[j]=this,r.on("conclude",Xc),r.on("drain",Jc),r.on("error",Yc),r.on("message",Qc),r.on("ping",Zc),r.on("pong",eh),t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),e.length>0&&t.unshift(e),t.on("close",In),t.on("data",rs),t.on("end",kn),t.on("error",Nn),this._readyState=i.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=i.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[ye.extensionName]&&this._extensions[ye.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=i.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(t,e){if(this.readyState!==i.CLOSED){if(this.readyState===i.CONNECTING){let s="WebSocket was closed before the connection was established";z(this,this._req,s);return}if(this.readyState===i.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=i.CLOSING,this._sender.close(t,e,!this._isServer,s=>{s||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),zc)}}pause(){this.readyState===i.CONNECTING||this.readyState===i.CLOSED||(this._paused=!0,this._socket.pause())}ping(t,e,s){if(this.readyState===i.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(s=t,t=e=void 0):typeof e=="function"&&(s=e,e=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==i.OPEN){wr(this,t,s);return}e===void 0&&(e=!this._isServer),this._sender.ping(t||ts,e,s)}pong(t,e,s){if(this.readyState===i.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(s=t,t=e=void 0):typeof e=="function"&&(s=e,e=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==i.OPEN){wr(this,t,s);return}e===void 0&&(e=!this._isServer),this._sender.pong(t||ts,e,s)}resume(){this.readyState===i.CONNECTING||this.readyState===i.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,e,s){if(this.readyState===i.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"&&(s=e,e={}),typeof t=="number"&&(t=t.toString()),this.readyState!==i.OPEN){wr(this,t,s);return}let r={binary:typeof t!="string",mask:!this._isServer,compress:!0,fin:!0,...e};this._extensions[ye.extensionName]||(r.compress=!1),this._sender.send(t||ts,r,s)}terminate(){if(this.readyState!==i.CLOSED){if(this.readyState===i.CONNECTING){let t="WebSocket was closed before the connection was established";z(this,this._req,t);return}this._socket&&(this._readyState=i.CLOSING,this._socket.destroy())}}};Object.defineProperty(O,"CONNECTING",{enumerable:!0,value:le.indexOf("CONNECTING")});Object.defineProperty(O.prototype,"CONNECTING",{enumerable:!0,value:le.indexOf("CONNECTING")});Object.defineProperty(O,"OPEN",{enumerable:!0,value:le.indexOf("OPEN")});Object.defineProperty(O.prototype,"OPEN",{enumerable:!0,value:le.indexOf("OPEN")});Object.defineProperty(O,"CLOSING",{enumerable:!0,value:le.indexOf("CLOSING")});Object.defineProperty(O.prototype,"CLOSING",{enumerable:!0,value:le.indexOf("CLOSING")});Object.defineProperty(O,"CLOSED",{enumerable:!0,value:le.indexOf("CLOSED")});Object.defineProperty(O.prototype,"CLOSED",{enumerable:!0,value:le.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(i=>{Object.defineProperty(O.prototype,i,{enumerable:!0})});["open","error","close","message"].forEach(i=>{Object.defineProperty(O.prototype,`on${i}`,{enumerable:!0,get(){for(let t of this.listeners(i))if(t[Pr])return t[Rc];return null},set(t){for(let e of this.listeners(i))if(e[Pr]){this.removeListener(i,e);break}typeof t=="function"&&this.addEventListener(i,t,{[Pr]:!0})}})});O.prototype.addEventListener=Uc;O.prototype.removeEventListener=$c;_n.exports=O;function En(i,t,e,s){let r={allowSynchronousEvents:!1,autoPong:!0,protocolVersion:vr[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...s,createConnection:void 0,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(i._autoPong=r.autoPong,!vr.includes(r.protocolVersion))throw new RangeError(`Unsupported protocol version: ${r.protocolVersion} (supported versions: ${vr.join(", ")})`);let a;if(t instanceof br)a=t;else try{a=new br(t)}catch{throw new SyntaxError(`Invalid URL: ${t}`)}a.protocol==="http:"?a.protocol="ws:":a.protocol==="https:"&&(a.protocol="wss:"),i._url=a.href;let n=a.protocol==="wss:",o=a.protocol==="ws+unix:",u;if(a.protocol!=="ws:"&&!n&&!o?u=`The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`:o&&!a.pathname?u="The URL's pathname is empty":a.hash&&(u="The URL contains a fragment identifier"),u){let y=new SyntaxError(u);if(i._redirects===0)throw y;ss(i,y);return}let l=n?443:80,c=Mc(16).toString("base64"),p=n?Nc.request:_c.request,f=new Set,m;if(r.createConnection=n?Gc:Kc,r.defaultPort=r.defaultPort||l,r.port=a.port||l,r.host=a.hostname.startsWith("[")?a.hostname.slice(1,-1):a.hostname,r.headers={...r.headers,"Sec-WebSocket-Version":r.protocolVersion,"Sec-WebSocket-Key":c,Connection:"Upgrade",Upgrade:"websocket"},r.path=a.pathname+a.search,r.timeout=r.handshakeTimeout,r.perMessageDeflate&&(m=new ye(r.perMessageDeflate!==!0?r.perMessageDeflate:{},!1,r.maxPayload),r.headers["Sec-WebSocket-Extensions"]=qc({[ye.extensionName]:m.offer()})),e.length){for(let y of e){if(typeof y!="string"||!Hc.test(y)||f.has(y))throw new SyntaxError("An invalid or duplicated subprotocol was specified");f.add(y)}r.headers["Sec-WebSocket-Protocol"]=e.join(",")}if(r.origin&&(r.protocolVersion<13?r.headers["Sec-WebSocket-Origin"]=r.origin:r.headers.Origin=r.origin),(a.username||a.password)&&(r.auth=`${a.username}:${a.password}`),o){let y=r.path.split(":");r.socketPath=y[0],r.path=y[1]}let d;if(r.followRedirects){if(i._redirects===0){i._originalIpc=o,i._originalSecure=n,i._originalHostOrSocketPath=o?r.socketPath:a.host;let y=s&&s.headers;if(s={...s,headers:{}},y)for(let[v,S]of Object.entries(y))s.headers[v.toLowerCase()]=S}else if(i.listenerCount("redirect")===0){let y=o?i._originalIpc?r.socketPath===i._originalHostOrSocketPath:!1:i._originalIpc?!1:a.host===i._originalHostOrSocketPath;(!y||i._originalSecure&&!n)&&(delete r.headers.authorization,delete r.headers.cookie,y||delete r.headers.host,r.auth=void 0)}r.auth&&!s.headers.authorization&&(s.headers.authorization="Basic "+Buffer.from(r.auth).toString("base64")),d=i._req=p(r),i._redirects&&i.emit("redirect",i.url,d)}else d=i._req=p(r);r.timeout&&d.on("timeout",()=>{z(i,d,"Opening handshake has timed out")}),d.on("error",y=>{d===null||d[An]||(d=i._req=null,ss(i,y))}),d.on("response",y=>{let v=y.headers.location,S=y.statusCode;if(v&&r.followRedirects&&S>=300&&S<400){if(++i._redirects>r.maxRedirects){z(i,d,"Maximum redirects exceeded");return}d.abort();let _;try{_=new br(v,t)}catch{let B=new SyntaxError(`Invalid URL: ${v}`);ss(i,B);return}En(i,_,e,s)}else i.emit("unexpected-response",d,y)||z(i,d,`Unexpected server response: ${y.statusCode}`)}),d.on("upgrade",(y,v,S)=>{if(i.emit("upgrade",y),i.readyState!==O.CONNECTING)return;if(d=i._req=null,y.headers.upgrade.toLowerCase()!=="websocket"){z(i,v,"Invalid Upgrade header");return}let _=Lc("sha1").update(c+Fc).digest("base64");if(y.headers["sec-websocket-accept"]!==_){z(i,v,"Invalid Sec-WebSocket-Accept header");return}let U=y.headers["sec-websocket-protocol"],B;if(U!==void 0?f.size?f.has(U)||(B="Server sent an invalid subprotocol"):B="Server sent a subprotocol but none was requested":f.size&&(B="Server sent no subprotocol"),B){z(i,v,B);return}U&&(i._protocol=U);let gt=y.headers["sec-websocket-extensions"];if(gt!==void 0){if(!m){z(i,v,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let xe;try{xe=Wc(gt)}catch{z(i,v,"Invalid Sec-WebSocket-Extensions header");return}let bt=Object.keys(xe);if(bt.length!==1||bt[0]!==ye.extensionName){z(i,v,"Server indicated an extension that was not requested");return}try{m.accept(xe[ye.extensionName])}catch{z(i,v,"Invalid Sec-WebSocket-Extensions header");return}i._extensions[ye.extensionName]=m}i.setSocket(v,S,{allowSynchronousEvents:r.allowSynchronousEvents,generateMask:r.generateMask,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation})}),r.finishRequest?r.finishRequest(d,i):d.end()}function ss(i,t){i._readyState=O.CLOSING,i.emit("error",t),i.emitClose()}function Kc(i){return i.path=i.socketPath,Tn.connect(i)}function Gc(i){return i.path=void 0,!i.servername&&i.servername!==""&&(i.servername=Tn.isIP(i.host)?"":i.host),Oc.connect(i)}function z(i,t,e){i._readyState=O.CLOSING;let s=new Error(e);Error.captureStackTrace(s,z),t.setHeader?(t[An]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(ss,i,s)):(t.destroy(s),t.once("error",i.emit.bind(i,"error")),t.once("close",i.emitClose.bind(i)))}function wr(i,t,e){if(t){let s=Vc(t).length;i._socket?i._sender._bufferedBytes+=s:i._bufferedAmount+=s}if(e){let s=new Error(`WebSocket is not open: readyState ${i.readyState} (${le[i.readyState]})`);process.nextTick(e,s)}}function Xc(i,t){let e=this[j];e._closeFrameReceived=!0,e._closeMessage=t,e._closeCode=i,e._socket[j]!==void 0&&(e._socket.removeListener("data",rs),process.nextTick(Cn,e._socket),i===1005?e.close():e.close(i,t))}function Jc(){let i=this[j];i.isPaused||i._socket.resume()}function Yc(i){let t=this[j];t._socket[j]!==void 0&&(t._socket.removeListener("data",rs),process.nextTick(Cn,t._socket),t.close(i[jc])),t.emit("error",i)}function wn(){this[j].emitClose()}function Qc(i,t){this[j].emit("message",i,t)}function Zc(i){let t=this[j];t._autoPong&&t.pong(i,!this._isServer,Sn),t.emit("ping",i)}function eh(i){this[j].emit("pong",i)}function Cn(i){i.resume()}function In(){let i=this[j];this.removeListener("close",In),this.removeListener("data",rs),this.removeListener("end",kn),i._readyState=O.CLOSING;let t;!this._readableState.endEmitted&&!i._closeFrameReceived&&!i._receiver._writableState.errorEmitted&&(t=i._socket.read())!==null&&i._receiver.write(t),i._receiver.end(),this[j]=void 0,clearTimeout(i._closeTimer),i._receiver._writableState.finished||i._receiver._writableState.errorEmitted?i.emitClose():(i._receiver.on("error",wn),i._receiver.on("finish",wn))}function rs(i){this[j]._receiver.write(i)||this.pause()}function kn(){let i=this[j];i._readyState=O.CLOSING,i._receiver.end(),this.end()}function Nn(){let i=this[j];this.removeListener("error",Nn),this.on("error",Sn),i&&(i._readyState=O.CLOSING,this.destroy())}});var Mn=A((vp,On)=>{"use strict";var{tokenChars:th}=pt();function sh(i){let t=new Set,e=-1,s=-1,r=0;for(r;r<i.length;r++){let n=i.charCodeAt(r);if(s===-1&&th[n]===1)e===-1&&(e=r);else if(r!==0&&(n===32||n===9))s===-1&&e!==-1&&(s=r);else if(n===44){if(e===-1)throw new SyntaxError(`Unexpected character at index ${r}`);s===-1&&(s=r);let o=i.slice(e,s);if(t.has(o))throw new SyntaxError(`The "${o}" subprotocol is duplicated`);t.add(o),e=s=-1}else throw new SyntaxError(`Unexpected character at index ${r}`)}if(e===-1||s!==-1)throw new SyntaxError("Unexpected end of input");let a=i.slice(e,r);if(t.has(a))throw new SyntaxError(`The "${a}" subprotocol is duplicated`);return t.add(a),t}On.exports={parse:sh}});var Un=A((Tp,jn)=>{"use strict";var rh=require("events"),is=require("http"),{Duplex:wp}=require("stream"),{createHash:ih}=require("crypto"),Ln=gr(),Se=ht(),ah=Mn(),nh=Tr(),{GUID:oh,kWebSocket:uh}=de(),lh=/^[+/0-9A-Za-z]{22}==$/,Dn=0,Bn=1,Rn=2,Sr=class extends rh{constructor(t,e){if(super(),t={allowSynchronousEvents:!1,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:nh,...t},t.port==null&&!t.server&&!t.noServer||t.port!=null&&(t.server||t.noServer)||t.server&&t.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(t.port!=null?(this._server=is.createServer((s,r)=>{let a=is.STATUS_CODES[426];r.writeHead(426,{"Content-Length":a.length,"Content-Type":"text/plain"}),r.end(a)}),this._server.listen(t.port,t.host,t.backlog,e)):t.server&&(this._server=t.server),this._server){let s=this.emit.bind(this,"connection");this._removeListeners=ch(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(r,a,n)=>{this.handleUpgrade(r,a,n,s)}})}t.perMessageDeflate===!0&&(t.perMessageDeflate={}),t.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=t,this._state=Dn}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(t){if(this._state===Rn){t&&this.once("close",()=>{t(new Error("The server is not running"))}),process.nextTick(yt,this);return}if(t&&this.once("close",t),this._state!==Bn)if(this._state=Bn,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(yt,this):process.nextTick(yt,this);else{let e=this._server;this._removeListeners(),this._removeListeners=this._server=null,e.close(()=>{yt(this)})}}shouldHandle(t){if(this.options.path){let e=t.url.indexOf("?");if((e!==-1?t.url.slice(0,e):t.url)!==this.options.path)return!1}return!0}handleUpgrade(t,e,s,r){e.on("error",Fn);let a=t.headers["sec-websocket-key"],n=+t.headers["sec-websocket-version"];if(t.method!=="GET"){Ae(this,t,e,405,"Invalid HTTP method");return}if(t.headers.upgrade.toLowerCase()!=="websocket"){Ae(this,t,e,400,"Invalid Upgrade header");return}if(!a||!lh.test(a)){Ae(this,t,e,400,"Missing or invalid Sec-WebSocket-Key header");return}if(n!==8&&n!==13){Ae(this,t,e,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(t)){xt(e,400);return}let o=t.headers["sec-websocket-protocol"],u=new Set;if(o!==void 0)try{u=ah.parse(o)}catch{Ae(this,t,e,400,"Invalid Sec-WebSocket-Protocol header");return}let l=t.headers["sec-websocket-extensions"],c={};if(this.options.perMessageDeflate&&l!==void 0){let p=new Se(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let f=Ln.parse(l);f[Se.extensionName]&&(p.accept(f[Se.extensionName]),c[Se.extensionName]=p)}catch{Ae(this,t,e,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let p={origin:t.headers[`${n===8?"sec-websocket-origin":"origin"}`],secure:!!(t.socket.authorized||t.socket.encrypted),req:t};if(this.options.verifyClient.length===2){this.options.verifyClient(p,(f,m,d,y)=>{if(!f)return xt(e,m||401,d,y);this.completeUpgrade(c,a,u,t,e,s,r)});return}if(!this.options.verifyClient(p))return xt(e,401)}this.completeUpgrade(c,a,u,t,e,s,r)}completeUpgrade(t,e,s,r,a,n,o){if(!a.readable||!a.writable)return a.destroy();if(a[uh])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>Dn)return xt(a,503);let l=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${ih("sha1").update(e+oh).digest("base64")}`],c=new this.options.WebSocket(null,void 0,this.options);if(s.size){let p=this.options.handleProtocols?this.options.handleProtocols(s,r):s.values().next().value;p&&(l.push(`Sec-WebSocket-Protocol: ${p}`),c._protocol=p)}if(t[Se.extensionName]){let p=t[Se.extensionName].params,f=Ln.format({[Se.extensionName]:[p]});l.push(`Sec-WebSocket-Extensions: ${f}`),c._extensions=t}this.emit("headers",l,r),a.write(l.concat(`\r
1
+ var $s=Object.create;var Te=Object.defineProperty;var Ws=Object.getOwnPropertyDescriptor;var qs=Object.getOwnPropertyNames;var Us=Object.getPrototypeOf,Ds=Object.prototype.hasOwnProperty;var g=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Gs=(e,t)=>{for(var r in t)Te(e,r,{get:t[r],enumerable:!0})},Gt=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of qs(t))!Ds.call(e,n)&&n!==r&&Te(e,n,{get:()=>t[n],enumerable:!(s=Ws(t,n))||s.enumerable});return e};var q=(e,t,r)=>(r=e!=null?$s(Us(e)):{},Gt(t||!e||!e.__esModule?Te(r,"default",{value:e,enumerable:!0}):r,e)),Vs=e=>Gt(Te({},"__esModule",{value:!0}),e);var zt=g((Uo,Vt)=>{"use strict";var zs=/[|\\{}()[\]^$+*?.-]/g;Vt.exports=e=>{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(zs,"\\$&")}});var Xt=g((Do,Kt)=>{"use strict";var Ys=zt(),Hs=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",Ht=[].concat(require("module").builtinModules,"bootstrap_node","node").map(e=>new RegExp(`(?:\\((?:node:)?${e}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${e}(?:\\.js)?:\\d+:\\d+$)`));Ht.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var st=class e{constructor(t){t={ignoredPackages:[],...t},"internals"in t||(t.internals=e.nodeInternals()),"cwd"in t||(t.cwd=Hs),this._cwd=t.cwd.replace(/\\/g,"/"),this._internals=[].concat(t.internals,Ks(t.ignoredPackages)),this._wrapCallSite=t.wrapCallSite||!1}static nodeInternals(){return[...Ht]}clean(t,r=0){r=" ".repeat(r),Array.isArray(t)||(t=t.split(`
2
+ `)),!/^\s*at /.test(t[0])&&/^\s*at /.test(t[1])&&(t=t.slice(1));let s=!1,n=null,i=[];return t.forEach(a=>{if(a=a.replace(/\\/g,"/"),this._internals.some(u=>u.test(a)))return;let o=/^\s*at /.test(a);s?a=a.trimEnd().replace(/^(\s+)at /,"$1"):(a=a.trim(),o&&(a=a.slice(3))),a=a.replace(`${this._cwd}/`,""),a&&(o?(n&&(i.push(n),n=null),i.push(a)):(s=!0,n=a))}),i.map(a=>`${r}${a}
3
+ `).join("")}captureString(t,r=this.captureString){typeof t=="function"&&(r=t,t=1/0);let{stackTraceLimit:s}=Error;t&&(Error.stackTraceLimit=t);let n={};Error.captureStackTrace(n,r);let{stack:i}=n;return Error.stackTraceLimit=s,this.clean(i)}capture(t,r=this.capture){typeof t=="function"&&(r=t,t=1/0);let{prepareStackTrace:s,stackTraceLimit:n}=Error;Error.prepareStackTrace=(o,u)=>this._wrapCallSite?u.map(this._wrapCallSite):u,t&&(Error.stackTraceLimit=t);let i={};Error.captureStackTrace(i,r);let{stack:a}=i;return Object.assign(Error,{prepareStackTrace:s,stackTraceLimit:n}),a}at(t=this.at){let[r]=this.capture(1,t);if(!r)return{};let s={line:r.getLineNumber(),column:r.getColumnNumber()};Yt(s,r.getFileName(),this._cwd),r.isConstructor()&&Object.defineProperty(s,"constructor",{value:!0,configurable:!0}),r.isEval()&&(s.evalOrigin=r.getEvalOrigin()),r.isNative()&&(s.native=!0);let n;try{n=r.getTypeName()}catch{}n&&n!=="Object"&&n!=="[object Object]"&&(s.type=n);let i=r.getFunctionName();i&&(s.function=i);let a=r.getMethodName();return a&&i!==a&&(s.method=a),s}parseLine(t){let r=t&&t.match(Xs);if(!r)return null;let s=r[1]==="new",n=r[2],i=r[3],a=r[4],o=Number(r[5]),u=Number(r[6]),l=r[7],f=r[8],c=r[9],m=r[10]==="native",_=r[11]===")",v,p={};if(f&&(p.line=Number(f)),c&&(p.column=Number(c)),_&&l){let b=0;for(let y=l.length-1;y>0;y--)if(l.charAt(y)===")")b++;else if(l.charAt(y)==="("&&l.charAt(y-1)===" "&&(b--,b===-1&&l.charAt(y-1)===" ")){let V=l.slice(0,y-1);l=l.slice(y+1),n+=` (${V}`;break}}if(n){let b=n.match(Zs);b&&(n=b[1],v=b[2])}return Yt(p,l,this._cwd),s&&Object.defineProperty(p,"constructor",{value:!0,configurable:!0}),i&&(p.evalOrigin=i,p.evalLine=o,p.evalColumn=u,p.evalFile=a&&a.replace(/\\/g,"/")),m&&(p.native=!0),n&&(p.function=n),v&&n!==v&&(p.method=v),p}};function Yt(e,t,r){t&&(t=t.replace(/\\/g,"/"),t.startsWith(`${r}/`)&&(t=t.slice(r.length+1)),e.file=t)}function Ks(e){if(e.length===0)return[];let t=e.map(r=>Ys(r));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${t.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var Xs=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),Zs=/^(.*?) \[as (.*?)\]$/;Kt.exports=st});var Zt=g(Pe=>{Object.defineProperty(Pe,"__esModule",{value:!0});Pe.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;Pe.matchToToken=function(e){var t={type:"invalid",value:e[0],closed:void 0};return e[1]?(t.type="string",t.closed=!!(e[3]||e[4])):e[5]?t.type="comment":e[6]?(t.type="comment",t.closed=!!e[7]):e[8]?t.type="regex":e[9]?t.type="number":e[10]?t.type="name":e[11]?t.type="punctuator":e[12]&&(t.type="whitespace"),t}});var rr=g(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.isIdentifierChar=tr;fe.isIdentifierName=ti;fe.isIdentifierStart=er;var at="\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",Jt="\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",Js=new RegExp("["+at+"]"),Qs=new RegExp("["+at+Jt+"]");at=Jt=null;var Qt=[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],ei=[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(e,t){let r=65536;for(let s=0,n=t.length;s<n;s+=2){if(r+=t[s],r>e)return!1;if(r+=t[s+1],r>=e)return!0}return!1}function er(e){return e<65?e===36:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&Js.test(String.fromCharCode(e)):it(e,Qt)}function tr(e){return e<48?e===36:e<58?!0:e<65?!1:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&Qs.test(String.fromCharCode(e)):it(e,Qt)||it(e,ei)}function ti(e){let t=!0;for(let r=0;r<e.length;r++){let s=e.charCodeAt(r);if((s&64512)===55296&&r+1<e.length){let n=e.charCodeAt(++r);(n&64512)===56320&&(s=65536+((s&1023)<<10)+(n&1023))}if(t){if(t=!1,!er(s))return!1}else if(!tr(s))return!1}return!t}});var ar=g(Y=>{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});Y.isKeyword=ai;Y.isReservedWord=nr;Y.isStrictBindOnlyReservedWord=ir;Y.isStrictBindReservedWord=ii;Y.isStrictReservedWord=sr;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"]},ri=new Set(ot.keyword),ni=new Set(ot.strict),si=new Set(ot.strictBind);function nr(e,t){return t&&e==="await"||e==="enum"}function sr(e,t){return nr(e,t)||ni.has(e)}function ir(e){return si.has(e)}function ii(e,t){return sr(e,t)||ir(e)}function ai(e){return ri.has(e)}});var or=g(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});Object.defineProperty(j,"isIdentifierChar",{enumerable:!0,get:function(){return ut.isIdentifierChar}});Object.defineProperty(j,"isIdentifierName",{enumerable:!0,get:function(){return ut.isIdentifierName}});Object.defineProperty(j,"isIdentifierStart",{enumerable:!0,get:function(){return ut.isIdentifierStart}});Object.defineProperty(j,"isKeyword",{enumerable:!0,get:function(){return he.isKeyword}});Object.defineProperty(j,"isReservedWord",{enumerable:!0,get:function(){return he.isReservedWord}});Object.defineProperty(j,"isStrictBindOnlyReservedWord",{enumerable:!0,get:function(){return he.isStrictBindOnlyReservedWord}});Object.defineProperty(j,"isStrictBindReservedWord",{enumerable:!0,get:function(){return he.isStrictBindReservedWord}});Object.defineProperty(j,"isStrictReservedWord",{enumerable:!0,get:function(){return he.isStrictReservedWord}});var ut=rr(),he=ar()});var lr=g((Ho,ur)=>{"use strict";var oi=/[|\\{}()[\]^$+*?.]/g;ur.exports=function(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(oi,"\\$&")}});var fr=g((Ko,cr)=>{"use strict";cr.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 lt=g((Xo,gr)=>{var H=fr(),pr={};for(Le in H)H.hasOwnProperty(Le)&&(pr[H[Le]]=Le);var Le,h=gr.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(C in h)if(h.hasOwnProperty(C)){if(!("channels"in h[C]))throw new Error("missing channels property: "+C);if(!("labels"in h[C]))throw new Error("missing channel labels property: "+C);if(h[C].labels.length!==h[C].channels)throw new Error("channel and label counts mismatch: "+C);hr=h[C].channels,dr=h[C].labels,delete h[C].channels,delete h[C].labels,Object.defineProperty(h[C],"channels",{value:hr}),Object.defineProperty(h[C],"labels",{value:dr})}var hr,dr,C;h.rgb.hsl=function(e){var t=e[0]/255,r=e[1]/255,s=e[2]/255,n=Math.min(t,r,s),i=Math.max(t,r,s),a=i-n,o,u,l;return i===n?o=0:t===i?o=(r-s)/a:r===i?o=2+(s-t)/a:s===i&&(o=4+(t-r)/a),o=Math.min(o*60,360),o<0&&(o+=360),l=(n+i)/2,i===n?u=0:l<=.5?u=a/(i+n):u=a/(2-i-n),[o,u*100,l*100]};h.rgb.hsv=function(e){var t,r,s,n,i,a=e[0]/255,o=e[1]/255,u=e[2]/255,l=Math.max(a,o,u),f=l-Math.min(a,o,u),c=function(m){return(l-m)/6/f+1/2};return f===0?n=i=0:(i=f/l,t=c(a),r=c(o),s=c(u),a===l?n=s-r:o===l?n=1/3+t-s:u===l&&(n=2/3+r-t),n<0?n+=1:n>1&&(n-=1)),[n*360,i*100,l*100]};h.rgb.hwb=function(e){var t=e[0],r=e[1],s=e[2],n=h.rgb.hsl(e)[0],i=1/255*Math.min(t,Math.min(r,s));return s=1-1/255*Math.max(t,Math.max(r,s)),[n,i*100,s*100]};h.rgb.cmyk=function(e){var t=e[0]/255,r=e[1]/255,s=e[2]/255,n,i,a,o;return o=Math.min(1-t,1-r,1-s),n=(1-t-o)/(1-o)||0,i=(1-r-o)/(1-o)||0,a=(1-s-o)/(1-o)||0,[n*100,i*100,a*100,o*100]};function ui(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2)}h.rgb.keyword=function(e){var t=pr[e];if(t)return t;var r=1/0,s;for(var n in H)if(H.hasOwnProperty(n)){var i=H[n],a=ui(e,i);a<r&&(r=a,s=n)}return s};h.keyword.rgb=function(e){return H[e]};h.rgb.xyz=function(e){var t=e[0]/255,r=e[1]/255,s=e[2]/255;t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,s=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92;var n=t*.4124+r*.3576+s*.1805,i=t*.2126+r*.7152+s*.0722,a=t*.0193+r*.1192+s*.9505;return[n*100,i*100,a*100]};h.rgb.lab=function(e){var t=h.rgb.xyz(e),r=t[0],s=t[1],n=t[2],i,a,o;return r/=95.047,s/=100,n/=108.883,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=116*s-16,a=500*(r-s),o=200*(s-n),[i,a,o]};h.hsl.rgb=function(e){var t=e[0]/360,r=e[1]/100,s=e[2]/100,n,i,a,o,u;if(r===0)return u=s*255,[u,u,u];s<.5?i=s*(1+r):i=s+r-s*r,n=2*s-i,o=[0,0,0];for(var l=0;l<3;l++)a=t+1/3*-(l-1),a<0&&a++,a>1&&a--,6*a<1?u=n+(i-n)*6*a:2*a<1?u=i:3*a<2?u=n+(i-n)*(2/3-a)*6:u=n,o[l]=u*255;return o};h.hsl.hsv=function(e){var t=e[0],r=e[1]/100,s=e[2]/100,n=r,i=Math.max(s,.01),a,o;return s*=2,r*=s<=1?s:2-s,n*=i<=1?i:2-i,o=(s+r)/2,a=s===0?2*n/(i+n):2*r/(s+r),[t,a*100,o*100]};h.hsv.rgb=function(e){var t=e[0]/60,r=e[1]/100,s=e[2]/100,n=Math.floor(t)%6,i=t-Math.floor(t),a=255*s*(1-r),o=255*s*(1-r*i),u=255*s*(1-r*(1-i));switch(s*=255,n){case 0:return[s,u,a];case 1:return[o,s,a];case 2:return[a,s,u];case 3:return[a,o,s];case 4:return[u,a,s];case 5:return[s,a,o]}};h.hsv.hsl=function(e){var t=e[0],r=e[1]/100,s=e[2]/100,n=Math.max(s,.01),i,a,o;return o=(2-r)*s,i=(2-r)*n,a=r*n,a/=i<=1?i:2-i,a=a||0,o/=2,[t,a*100,o*100]};h.hwb.rgb=function(e){var t=e[0]/360,r=e[1]/100,s=e[2]/100,n=r+s,i,a,o,u;n>1&&(r/=n,s/=n),i=Math.floor(6*t),a=1-s,o=6*t-i,i&1&&(o=1-o),u=r+o*(a-r);var l,f,c;switch(i){default:case 6:case 0:l=a,f=u,c=r;break;case 1:l=u,f=a,c=r;break;case 2:l=r,f=a,c=u;break;case 3:l=r,f=u,c=a;break;case 4:l=u,f=r,c=a;break;case 5:l=a,f=r,c=u;break}return[l*255,f*255,c*255]};h.cmyk.rgb=function(e){var t=e[0]/100,r=e[1]/100,s=e[2]/100,n=e[3]/100,i,a,o;return i=1-Math.min(1,t*(1-n)+n),a=1-Math.min(1,r*(1-n)+n),o=1-Math.min(1,s*(1-n)+n),[i*255,a*255,o*255]};h.xyz.rgb=function(e){var t=e[0]/100,r=e[1]/100,s=e[2]/100,n,i,a;return n=t*3.2406+r*-1.5372+s*-.4986,i=t*-.9689+r*1.8758+s*.0415,a=t*.0557+r*-.204+s*1.057,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*12.92,n=Math.min(Math.max(0,n),1),i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),[n*255,i*255,a*255]};h.xyz.lab=function(e){var t=e[0],r=e[1],s=e[2],n,i,a;return t/=95.047,r/=100,s/=108.883,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,n=116*r-16,i=500*(t-r),a=200*(r-s),[n,i,a]};h.lab.xyz=function(e){var t=e[0],r=e[1],s=e[2],n,i,a;i=(t+16)/116,n=r/500+i,a=i-s/200;var o=Math.pow(i,3),u=Math.pow(n,3),l=Math.pow(a,3);return i=o>.008856?o:(i-16/116)/7.787,n=u>.008856?u:(n-16/116)/7.787,a=l>.008856?l:(a-16/116)/7.787,n*=95.047,i*=100,a*=108.883,[n,i,a]};h.lab.lch=function(e){var t=e[0],r=e[1],s=e[2],n,i,a;return n=Math.atan2(s,r),i=n*360/2/Math.PI,i<0&&(i+=360),a=Math.sqrt(r*r+s*s),[t,a,i]};h.lch.lab=function(e){var t=e[0],r=e[1],s=e[2],n,i,a;return a=s/360*2*Math.PI,n=r*Math.cos(a),i=r*Math.sin(a),[t,n,i]};h.rgb.ansi16=function(e){var t=e[0],r=e[1],s=e[2],n=1 in arguments?arguments[1]:h.rgb.hsv(e)[2];if(n=Math.round(n/50),n===0)return 30;var i=30+(Math.round(s/255)<<2|Math.round(r/255)<<1|Math.round(t/255));return n===2&&(i+=60),i};h.hsv.ansi16=function(e){return h.rgb.ansi16(h.hsv.rgb(e),e[2])};h.rgb.ansi256=function(e){var t=e[0],r=e[1],s=e[2];if(t===r&&r===s)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;var n=16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(s/255*5);return n};h.ansi16.rgb=function(e){var t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];var r=(~~(e>50)+1)*.5,s=(t&1)*r*255,n=(t>>1&1)*r*255,i=(t>>2&1)*r*255;return[s,n,i]};h.ansi256.rgb=function(e){if(e>=232){var t=(e-232)*10+8;return[t,t,t]}e-=16;var r,s=Math.floor(e/36)/5*255,n=Math.floor((r=e%36)/6)/5*255,i=r%6/5*255;return[s,n,i]};h.rgb.hex=function(e){var t=((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255),r=t.toString(16).toUpperCase();return"000000".substring(r.length)+r};h.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var r=t[0];t[0].length===3&&(r=r.split("").map(function(o){return o+o}).join(""));var s=parseInt(r,16),n=s>>16&255,i=s>>8&255,a=s&255;return[n,i,a]};h.rgb.hcg=function(e){var t=e[0]/255,r=e[1]/255,s=e[2]/255,n=Math.max(Math.max(t,r),s),i=Math.min(Math.min(t,r),s),a=n-i,o,u;return a<1?o=i/(1-a):o=0,a<=0?u=0:n===t?u=(r-s)/a%6:n===r?u=2+(s-t)/a:u=4+(t-r)/a+4,u/=6,u%=1,[u*360,a*100,o*100]};h.hsl.hcg=function(e){var t=e[1]/100,r=e[2]/100,s=1,n=0;return r<.5?s=2*t*r:s=2*t*(1-r),s<1&&(n=(r-.5*s)/(1-s)),[e[0],s*100,n*100]};h.hsv.hcg=function(e){var t=e[1]/100,r=e[2]/100,s=t*r,n=0;return s<1&&(n=(r-s)/(1-s)),[e[0],s*100,n*100]};h.hcg.rgb=function(e){var t=e[0]/360,r=e[1]/100,s=e[2]/100;if(r===0)return[s*255,s*255,s*255];var n=[0,0,0],i=t%1*6,a=i%1,o=1-a,u=0;switch(Math.floor(i)){case 0:n[0]=1,n[1]=a,n[2]=0;break;case 1:n[0]=o,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=a;break;case 3:n[0]=0,n[1]=o,n[2]=1;break;case 4:n[0]=a,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=o}return u=(1-r)*s,[(r*n[0]+u)*255,(r*n[1]+u)*255,(r*n[2]+u)*255]};h.hcg.hsv=function(e){var t=e[1]/100,r=e[2]/100,s=t+r*(1-t),n=0;return s>0&&(n=t/s),[e[0],n*100,s*100]};h.hcg.hsl=function(e){var t=e[1]/100,r=e[2]/100,s=r*(1-t)+.5*t,n=0;return s>0&&s<.5?n=t/(2*s):s>=.5&&s<1&&(n=t/(2*(1-s))),[e[0],n*100,s*100]};h.hcg.hwb=function(e){var t=e[1]/100,r=e[2]/100,s=t+r*(1-t);return[e[0],(s-t)*100,(1-s)*100]};h.hwb.hcg=function(e){var t=e[1]/100,r=e[2]/100,s=1-r,n=s-t,i=0;return n<1&&(i=(s-n)/(1-n)),[e[0],n*100,i*100]};h.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};h.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};h.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};h.gray.hsl=h.gray.hsv=function(e){return[0,0,e[0]]};h.gray.hwb=function(e){return[0,100,e[0]]};h.gray.cmyk=function(e){return[0,0,0,e[0]]};h.gray.lab=function(e){return[e[0],0,0]};h.gray.hex=function(e){var t=Math.round(e[0]/100*255)&255,r=(t<<16)+(t<<8)+t,s=r.toString(16).toUpperCase();return"000000".substring(s.length)+s};h.rgb.gray=function(e){var t=(e[0]+e[1]+e[2])/3;return[t/255*100]}});var br=g((Zo,vr)=>{var Ne=lt();function li(){for(var e={},t=Object.keys(Ne),r=t.length,s=0;s<r;s++)e[t[s]]={distance:-1,parent:null};return e}function ci(e){var t=li(),r=[e];for(t[e].distance=0;r.length;)for(var s=r.pop(),n=Object.keys(Ne[s]),i=n.length,a=0;a<i;a++){var o=n[a],u=t[o];u.distance===-1&&(u.distance=t[s].distance+1,u.parent=s,r.unshift(o))}return t}function fi(e,t){return function(r){return t(e(r))}}function hi(e,t){for(var r=[t[e].parent,e],s=Ne[t[e].parent][e],n=t[e].parent;t[n].parent;)r.unshift(t[n].parent),s=fi(Ne[t[n].parent][n],s),n=t[n].parent;return s.conversion=r,s}vr.exports=function(e){for(var t=ci(e),r={},s=Object.keys(t),n=s.length,i=0;i<n;i++){var a=s[i],o=t[a];o.parent!==null&&(r[a]=hi(a,t))}return r}});var yr=g((Jo,mr)=>{var ct=lt(),di=br(),Q={},pi=Object.keys(ct);function gi(e){var t=function(r){return r==null?r:(arguments.length>1&&(r=Array.prototype.slice.call(arguments)),e(r))};return"conversion"in e&&(t.conversion=e.conversion),t}function vi(e){var t=function(r){if(r==null)return r;arguments.length>1&&(r=Array.prototype.slice.call(arguments));var s=e(r);if(typeof s=="object")for(var n=s.length,i=0;i<n;i++)s[i]=Math.round(s[i]);return s};return"conversion"in e&&(t.conversion=e.conversion),t}pi.forEach(function(e){Q[e]={},Object.defineProperty(Q[e],"channels",{value:ct[e].channels}),Object.defineProperty(Q[e],"labels",{value:ct[e].labels});var t=di(e),r=Object.keys(t);r.forEach(function(s){var n=t[s];Q[e][s]=vi(n),Q[e][s].raw=gi(n)})});mr.exports=Q});var wr=g((Qo,_r)=>{"use strict";var ee=yr(),Be=(e,t)=>function(){return`\x1B[${e.apply(ee,arguments)+t}m`},Ie=(e,t)=>function(){let r=e.apply(ee,arguments);return`\x1B[${38+t};5;${r}m`},je=(e,t)=>function(){let r=e.apply(ee,arguments);return`\x1B[${38+t};2;${r[0]};${r[1]};${r[2]}m`};function bi(){let e=new Map,t={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]}};t.color.grey=t.color.gray;for(let n of Object.keys(t)){let i=t[n];for(let a of Object.keys(i)){let o=i[a];t[a]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},i[a]=t[a],e.set(o[0],o[1])}Object.defineProperty(t,n,{value:i,enumerable:!1}),Object.defineProperty(t,"codes",{value:e,enumerable:!1})}let r=n=>n,s=(n,i,a)=>[n,i,a];t.color.close="\x1B[39m",t.bgColor.close="\x1B[49m",t.color.ansi={ansi:Be(r,0)},t.color.ansi256={ansi256:Ie(r,0)},t.color.ansi16m={rgb:je(s,0)},t.bgColor.ansi={ansi:Be(r,10)},t.bgColor.ansi256={ansi256:Ie(r,10)},t.bgColor.ansi16m={rgb:je(s,10)};for(let n of Object.keys(ee)){if(typeof ee[n]!="object")continue;let i=ee[n];n==="ansi16"&&(n="ansi"),"ansi16"in i&&(t.color.ansi[n]=Be(i.ansi16,0),t.bgColor.ansi[n]=Be(i.ansi16,10)),"ansi256"in i&&(t.color.ansi256[n]=Ie(i.ansi256,0),t.bgColor.ansi256[n]=Ie(i.ansi256,10)),"rgb"in i&&(t.color.ansi16m[n]=je(i.rgb,0),t.bgColor.ansi16m[n]=je(i.rgb,10))}return t}Object.defineProperty(_r,"exports",{enumerable:!0,get:bi})});var Sr=g((eu,xr)=>{"use strict";xr.exports=(e,t)=>{t=t||process.argv;let r=e.startsWith("-")?"":e.length===1?"-":"--",s=t.indexOf(r+e),n=t.indexOf("--");return s!==-1&&(n===-1?!0:s<n)}});var kr=g((tu,Er)=>{"use strict";var mi=require("os"),L=Sr(),E=process.env,te;L("no-color")||L("no-colors")||L("color=false")?te=!1:(L("color")||L("colors")||L("color=true")||L("color=always"))&&(te=!0);"FORCE_COLOR"in E&&(te=E.FORCE_COLOR.length===0||parseInt(E.FORCE_COLOR,10)!==0);function yi(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function _i(e){if(te===!1)return 0;if(L("color=16m")||L("color=full")||L("color=truecolor"))return 3;if(L("color=256"))return 2;if(e&&!e.isTTY&&te!==!0)return 0;let t=te?1:0;if(process.platform==="win32"){let r=mi.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in E)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(r=>r in E)||E.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in E)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(E.TEAMCITY_VERSION)?1:0;if(E.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in E){let r=parseInt((E.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(E.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(E.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(E.TERM)||"COLORTERM"in E?1:(E.TERM==="dumb",t)}function ft(e){let t=_i(e);return yi(t)}Er.exports={supportsColor:ft,stdout:ft(process.stdout),stderr:ft(process.stderr)}});var Tr=g((ru,Rr)=>{"use strict";var wi=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Or=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,xi=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,Si=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,Ei=new Map([["n",`
4
+ `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function Mr(e){return e[0]==="u"&&e.length===5||e[0]==="x"&&e.length===3?String.fromCharCode(parseInt(e.slice(1),16)):Ei.get(e)||e}function ki(e,t){let r=[],s=t.trim().split(/\s*,\s*/g),n;for(let i of s)if(!isNaN(i))r.push(Number(i));else if(n=i.match(xi))r.push(n[2].replace(Si,(a,o,u)=>o?Mr(o):u));else throw new Error(`Invalid Chalk template style argument: ${i} (in style '${e}')`);return r}function Oi(e){Or.lastIndex=0;let t=[],r;for(;(r=Or.exec(e))!==null;){let s=r[1];if(r[2]){let n=ki(s,r[2]);t.push([s].concat(n))}else t.push([s])}return t}function Cr(e,t){let r={};for(let n of t)for(let i of n.styles)r[i[0]]=n.inverse?null:i.slice(1);let s=e;for(let n of Object.keys(r))if(Array.isArray(r[n])){if(!(n in s))throw new Error(`Unknown Chalk style: ${n}`);r[n].length>0?s=s[n].apply(s,r[n]):s=s[n]}return s}Rr.exports=(e,t)=>{let r=[],s=[],n=[];if(t.replace(wi,(i,a,o,u,l,f)=>{if(a)n.push(Mr(a));else if(u){let c=n.join("");n=[],s.push(r.length===0?c:Cr(e,r)(c)),r.push({inverse:o,styles:Oi(u)})}else if(l){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");s.push(Cr(e,r)(n.join(""))),n=[],r.pop()}else n.push(f)}),s.push(n.join("")),r.length>0){let i=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(i)}return s.join("")}});var Ir=g((nu,pe)=>{"use strict";var dt=lr(),x=wr(),ht=kr().stdout,Ci=Tr(),Lr=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),Nr=["ansi","ansi","ansi256","ansi16m"],Br=new Set(["gray"]),re=Object.create(null);function Pr(e,t){t=t||{};let r=ht?ht.level:0;e.level=t.level===void 0?r:t.level,e.enabled="enabled"in t?t.enabled:e.level>0}function de(e){if(!this||!(this instanceof de)||this.template){let t={};return Pr(t,e),t.template=function(){let r=[].slice.call(arguments);return Ti.apply(null,[t.template].concat(r))},Object.setPrototypeOf(t,de.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=de,t.template}Pr(this,e)}Lr&&(x.blue.open="\x1B[94m");for(let e of Object.keys(x))x[e].closeRe=new RegExp(dt(x[e].close),"g"),re[e]={get(){let t=x[e];return Ae.call(this,this._styles?this._styles.concat(t):[t],this._empty,e)}};re.visible={get(){return Ae.call(this,this._styles||[],!0,"visible")}};x.color.closeRe=new RegExp(dt(x.color.close),"g");for(let e of Object.keys(x.color.ansi))Br.has(e)||(re[e]={get(){let t=this.level;return function(){let s={open:x.color[Nr[t]][e].apply(null,arguments),close:x.color.close,closeRe:x.color.closeRe};return Ae.call(this,this._styles?this._styles.concat(s):[s],this._empty,e)}}});x.bgColor.closeRe=new RegExp(dt(x.bgColor.close),"g");for(let e of Object.keys(x.bgColor.ansi)){if(Br.has(e))continue;let t="bg"+e[0].toUpperCase()+e.slice(1);re[t]={get(){let r=this.level;return function(){let n={open:x.bgColor[Nr[r]][e].apply(null,arguments),close:x.bgColor.close,closeRe:x.bgColor.closeRe};return Ae.call(this,this._styles?this._styles.concat(n):[n],this._empty,e)}}}}var Mi=Object.defineProperties(()=>{},re);function Ae(e,t,r){let s=function(){return Ri.apply(s,arguments)};s._styles=e,s._empty=t;let n=this;return Object.defineProperty(s,"level",{enumerable:!0,get(){return n.level},set(i){n.level=i}}),Object.defineProperty(s,"enabled",{enumerable:!0,get(){return n.enabled},set(i){n.enabled=i}}),s.hasGrey=this.hasGrey||r==="gray"||r==="grey",s.__proto__=Mi,s}function Ri(){let e=arguments,t=e.length,r=String(arguments[0]);if(t===0)return"";if(t>1)for(let n=1;n<t;n++)r+=" "+e[n];if(!this.enabled||this.level<=0||!r)return this._empty?"":r;let s=x.dim.open;Lr&&this.hasGrey&&(x.dim.open="");for(let n of this._styles.slice().reverse())r=n.open+r.replace(n.closeRe,n.open)+n.close,r=r.replace(/\r?\n/g,`${n.close}$&${n.open}`);return x.dim.open=s,r}function Ti(e,t){if(!Array.isArray(t))return[].slice.call(arguments,1).join(" ");let r=[].slice.call(arguments,2),s=[t.raw[0]];for(let n=1;n<t.length;n++)s.push(String(r[n-1]).replace(/[{}\\]/g,"\\$&")),s.push(String(t.raw[n]));return Ci(e,s.join(""))}Object.defineProperties(de.prototype,re);pe.exports=de();pe.exports.supportsColor=ht;pe.exports.default=pe.exports});var Ur=g(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.default=Ai;ge.shouldHighlight=Wr;var jr=Zt(),Ar=or(),gt=Pi(Ir(),!0);function Fr(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(Fr=function(s){return s?r:t})(e)}function Pi(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=Fr(t);if(r&&r.has(e))return r.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var a=n?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(s,i,a):s[i]=e[i]}return s.default=e,r&&r.set(e,s),s}var Li=new Set(["as","async","from","get","of","set"]);function Ni(e){return{keyword:e.cyan,capitalized:e.yellow,jsxIdentifier:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.grey,invalid:e.white.bgRed.bold}}var Bi=/\r\n|[\n\r\u2028\u2029]/,Ii=/^[()[\]{}]$/,$r;{let e=/^[a-z][\w-]*$/i,t=function(r,s,n){if(r.type==="name"){if((0,Ar.isKeyword)(r.value)||(0,Ar.isStrictReservedWord)(r.value,!0)||Li.has(r.value))return"keyword";if(e.test(r.value)&&(n[s-1]==="<"||n.slice(s-2,s)=="</"))return"jsxIdentifier";if(r.value[0]!==r.value[0].toLowerCase())return"capitalized"}return r.type==="punctuator"&&Ii.test(r.value)?"bracket":r.type==="invalid"&&(r.value==="@"||r.value==="#")?"punctuator":r.type};$r=function*(r){let s;for(;s=jr.default.exec(r);){let n=jr.matchToToken(s);yield{type:t(n,s.index,r),value:n.value}}}}function ji(e,t){let r="";for(let{type:s,value:n}of $r(t)){let i=e[s];i?r+=n.split(Bi).map(a=>i(a)).join(`
5
+ `):r+=n}return r}function Wr(e){return gt.default.level>0||e.forceColor}var pt;function qr(e){if(e){var t;return(t=pt)!=null||(pt=new gt.default.constructor({enabled:!0,level:1})),pt}return gt.default}ge.getChalk=e=>qr(e.forceColor);function Ai(e,t={}){if(e!==""&&Wr(t)){let r=Ni(qr(t.forceColor));return ji(r,e)}else return e}});var Gr=g((iu,Dr)=>{"use strict";var Fi=/[|\\{}()[\]^$+*?.]/g;Dr.exports=function(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(Fi,"\\$&")}});var zr=g((au,Vr)=>{"use strict";Vr.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 vt=g((ou,Xr)=>{var K=zr(),Kr={};for(Fe in K)K.hasOwnProperty(Fe)&&(Kr[K[Fe]]=Fe);var Fe,d=Xr.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(M in d)if(d.hasOwnProperty(M)){if(!("channels"in d[M]))throw new Error("missing channels property: "+M);if(!("labels"in d[M]))throw new Error("missing channel labels property: "+M);if(d[M].labels.length!==d[M].channels)throw new Error("channel and label counts mismatch: "+M);Yr=d[M].channels,Hr=d[M].labels,delete d[M].channels,delete d[M].labels,Object.defineProperty(d[M],"channels",{value:Yr}),Object.defineProperty(d[M],"labels",{value:Hr})}var Yr,Hr,M;d.rgb.hsl=function(e){var t=e[0]/255,r=e[1]/255,s=e[2]/255,n=Math.min(t,r,s),i=Math.max(t,r,s),a=i-n,o,u,l;return i===n?o=0:t===i?o=(r-s)/a:r===i?o=2+(s-t)/a:s===i&&(o=4+(t-r)/a),o=Math.min(o*60,360),o<0&&(o+=360),l=(n+i)/2,i===n?u=0:l<=.5?u=a/(i+n):u=a/(2-i-n),[o,u*100,l*100]};d.rgb.hsv=function(e){var t,r,s,n,i,a=e[0]/255,o=e[1]/255,u=e[2]/255,l=Math.max(a,o,u),f=l-Math.min(a,o,u),c=function(m){return(l-m)/6/f+1/2};return f===0?n=i=0:(i=f/l,t=c(a),r=c(o),s=c(u),a===l?n=s-r:o===l?n=1/3+t-s:u===l&&(n=2/3+r-t),n<0?n+=1:n>1&&(n-=1)),[n*360,i*100,l*100]};d.rgb.hwb=function(e){var t=e[0],r=e[1],s=e[2],n=d.rgb.hsl(e)[0],i=1/255*Math.min(t,Math.min(r,s));return s=1-1/255*Math.max(t,Math.max(r,s)),[n,i*100,s*100]};d.rgb.cmyk=function(e){var t=e[0]/255,r=e[1]/255,s=e[2]/255,n,i,a,o;return o=Math.min(1-t,1-r,1-s),n=(1-t-o)/(1-o)||0,i=(1-r-o)/(1-o)||0,a=(1-s-o)/(1-o)||0,[n*100,i*100,a*100,o*100]};function $i(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2)}d.rgb.keyword=function(e){var t=Kr[e];if(t)return t;var r=1/0,s;for(var n in K)if(K.hasOwnProperty(n)){var i=K[n],a=$i(e,i);a<r&&(r=a,s=n)}return s};d.keyword.rgb=function(e){return K[e]};d.rgb.xyz=function(e){var t=e[0]/255,r=e[1]/255,s=e[2]/255;t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,s=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92;var n=t*.4124+r*.3576+s*.1805,i=t*.2126+r*.7152+s*.0722,a=t*.0193+r*.1192+s*.9505;return[n*100,i*100,a*100]};d.rgb.lab=function(e){var t=d.rgb.xyz(e),r=t[0],s=t[1],n=t[2],i,a,o;return r/=95.047,s/=100,n/=108.883,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,i=116*s-16,a=500*(r-s),o=200*(s-n),[i,a,o]};d.hsl.rgb=function(e){var t=e[0]/360,r=e[1]/100,s=e[2]/100,n,i,a,o,u;if(r===0)return u=s*255,[u,u,u];s<.5?i=s*(1+r):i=s+r-s*r,n=2*s-i,o=[0,0,0];for(var l=0;l<3;l++)a=t+1/3*-(l-1),a<0&&a++,a>1&&a--,6*a<1?u=n+(i-n)*6*a:2*a<1?u=i:3*a<2?u=n+(i-n)*(2/3-a)*6:u=n,o[l]=u*255;return o};d.hsl.hsv=function(e){var t=e[0],r=e[1]/100,s=e[2]/100,n=r,i=Math.max(s,.01),a,o;return s*=2,r*=s<=1?s:2-s,n*=i<=1?i:2-i,o=(s+r)/2,a=s===0?2*n/(i+n):2*r/(s+r),[t,a*100,o*100]};d.hsv.rgb=function(e){var t=e[0]/60,r=e[1]/100,s=e[2]/100,n=Math.floor(t)%6,i=t-Math.floor(t),a=255*s*(1-r),o=255*s*(1-r*i),u=255*s*(1-r*(1-i));switch(s*=255,n){case 0:return[s,u,a];case 1:return[o,s,a];case 2:return[a,s,u];case 3:return[a,o,s];case 4:return[u,a,s];case 5:return[s,a,o]}};d.hsv.hsl=function(e){var t=e[0],r=e[1]/100,s=e[2]/100,n=Math.max(s,.01),i,a,o;return o=(2-r)*s,i=(2-r)*n,a=r*n,a/=i<=1?i:2-i,a=a||0,o/=2,[t,a*100,o*100]};d.hwb.rgb=function(e){var t=e[0]/360,r=e[1]/100,s=e[2]/100,n=r+s,i,a,o,u;n>1&&(r/=n,s/=n),i=Math.floor(6*t),a=1-s,o=6*t-i,i&1&&(o=1-o),u=r+o*(a-r);var l,f,c;switch(i){default:case 6:case 0:l=a,f=u,c=r;break;case 1:l=u,f=a,c=r;break;case 2:l=r,f=a,c=u;break;case 3:l=r,f=u,c=a;break;case 4:l=u,f=r,c=a;break;case 5:l=a,f=r,c=u;break}return[l*255,f*255,c*255]};d.cmyk.rgb=function(e){var t=e[0]/100,r=e[1]/100,s=e[2]/100,n=e[3]/100,i,a,o;return i=1-Math.min(1,t*(1-n)+n),a=1-Math.min(1,r*(1-n)+n),o=1-Math.min(1,s*(1-n)+n),[i*255,a*255,o*255]};d.xyz.rgb=function(e){var t=e[0]/100,r=e[1]/100,s=e[2]/100,n,i,a;return n=t*3.2406+r*-1.5372+s*-.4986,i=t*-.9689+r*1.8758+s*.0415,a=t*.0557+r*-.204+s*1.057,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a*12.92,n=Math.min(Math.max(0,n),1),i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),[n*255,i*255,a*255]};d.xyz.lab=function(e){var t=e[0],r=e[1],s=e[2],n,i,a;return t/=95.047,r/=100,s/=108.883,t=t>.008856?Math.pow(t,1/3):7.787*t+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,n=116*r-16,i=500*(t-r),a=200*(r-s),[n,i,a]};d.lab.xyz=function(e){var t=e[0],r=e[1],s=e[2],n,i,a;i=(t+16)/116,n=r/500+i,a=i-s/200;var o=Math.pow(i,3),u=Math.pow(n,3),l=Math.pow(a,3);return i=o>.008856?o:(i-16/116)/7.787,n=u>.008856?u:(n-16/116)/7.787,a=l>.008856?l:(a-16/116)/7.787,n*=95.047,i*=100,a*=108.883,[n,i,a]};d.lab.lch=function(e){var t=e[0],r=e[1],s=e[2],n,i,a;return n=Math.atan2(s,r),i=n*360/2/Math.PI,i<0&&(i+=360),a=Math.sqrt(r*r+s*s),[t,a,i]};d.lch.lab=function(e){var t=e[0],r=e[1],s=e[2],n,i,a;return a=s/360*2*Math.PI,n=r*Math.cos(a),i=r*Math.sin(a),[t,n,i]};d.rgb.ansi16=function(e){var t=e[0],r=e[1],s=e[2],n=1 in arguments?arguments[1]:d.rgb.hsv(e)[2];if(n=Math.round(n/50),n===0)return 30;var i=30+(Math.round(s/255)<<2|Math.round(r/255)<<1|Math.round(t/255));return n===2&&(i+=60),i};d.hsv.ansi16=function(e){return d.rgb.ansi16(d.hsv.rgb(e),e[2])};d.rgb.ansi256=function(e){var t=e[0],r=e[1],s=e[2];if(t===r&&r===s)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;var n=16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(s/255*5);return n};d.ansi16.rgb=function(e){var t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];var r=(~~(e>50)+1)*.5,s=(t&1)*r*255,n=(t>>1&1)*r*255,i=(t>>2&1)*r*255;return[s,n,i]};d.ansi256.rgb=function(e){if(e>=232){var t=(e-232)*10+8;return[t,t,t]}e-=16;var r,s=Math.floor(e/36)/5*255,n=Math.floor((r=e%36)/6)/5*255,i=r%6/5*255;return[s,n,i]};d.rgb.hex=function(e){var t=((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255),r=t.toString(16).toUpperCase();return"000000".substring(r.length)+r};d.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var r=t[0];t[0].length===3&&(r=r.split("").map(function(o){return o+o}).join(""));var s=parseInt(r,16),n=s>>16&255,i=s>>8&255,a=s&255;return[n,i,a]};d.rgb.hcg=function(e){var t=e[0]/255,r=e[1]/255,s=e[2]/255,n=Math.max(Math.max(t,r),s),i=Math.min(Math.min(t,r),s),a=n-i,o,u;return a<1?o=i/(1-a):o=0,a<=0?u=0:n===t?u=(r-s)/a%6:n===r?u=2+(s-t)/a:u=4+(t-r)/a+4,u/=6,u%=1,[u*360,a*100,o*100]};d.hsl.hcg=function(e){var t=e[1]/100,r=e[2]/100,s=1,n=0;return r<.5?s=2*t*r:s=2*t*(1-r),s<1&&(n=(r-.5*s)/(1-s)),[e[0],s*100,n*100]};d.hsv.hcg=function(e){var t=e[1]/100,r=e[2]/100,s=t*r,n=0;return s<1&&(n=(r-s)/(1-s)),[e[0],s*100,n*100]};d.hcg.rgb=function(e){var t=e[0]/360,r=e[1]/100,s=e[2]/100;if(r===0)return[s*255,s*255,s*255];var n=[0,0,0],i=t%1*6,a=i%1,o=1-a,u=0;switch(Math.floor(i)){case 0:n[0]=1,n[1]=a,n[2]=0;break;case 1:n[0]=o,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=a;break;case 3:n[0]=0,n[1]=o,n[2]=1;break;case 4:n[0]=a,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=o}return u=(1-r)*s,[(r*n[0]+u)*255,(r*n[1]+u)*255,(r*n[2]+u)*255]};d.hcg.hsv=function(e){var t=e[1]/100,r=e[2]/100,s=t+r*(1-t),n=0;return s>0&&(n=t/s),[e[0],n*100,s*100]};d.hcg.hsl=function(e){var t=e[1]/100,r=e[2]/100,s=r*(1-t)+.5*t,n=0;return s>0&&s<.5?n=t/(2*s):s>=.5&&s<1&&(n=t/(2*(1-s))),[e[0],n*100,s*100]};d.hcg.hwb=function(e){var t=e[1]/100,r=e[2]/100,s=t+r*(1-t);return[e[0],(s-t)*100,(1-s)*100]};d.hwb.hcg=function(e){var t=e[1]/100,r=e[2]/100,s=1-r,n=s-t,i=0;return n<1&&(i=(s-n)/(1-n)),[e[0],n*100,i*100]};d.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};d.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};d.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};d.gray.hsl=d.gray.hsv=function(e){return[0,0,e[0]]};d.gray.hwb=function(e){return[0,100,e[0]]};d.gray.cmyk=function(e){return[0,0,0,e[0]]};d.gray.lab=function(e){return[e[0],0,0]};d.gray.hex=function(e){var t=Math.round(e[0]/100*255)&255,r=(t<<16)+(t<<8)+t,s=r.toString(16).toUpperCase();return"000000".substring(s.length)+s};d.rgb.gray=function(e){var t=(e[0]+e[1]+e[2])/3;return[t/255*100]}});var Jr=g((uu,Zr)=>{var $e=vt();function Wi(){for(var e={},t=Object.keys($e),r=t.length,s=0;s<r;s++)e[t[s]]={distance:-1,parent:null};return e}function qi(e){var t=Wi(),r=[e];for(t[e].distance=0;r.length;)for(var s=r.pop(),n=Object.keys($e[s]),i=n.length,a=0;a<i;a++){var o=n[a],u=t[o];u.distance===-1&&(u.distance=t[s].distance+1,u.parent=s,r.unshift(o))}return t}function Ui(e,t){return function(r){return t(e(r))}}function Di(e,t){for(var r=[t[e].parent,e],s=$e[t[e].parent][e],n=t[e].parent;t[n].parent;)r.unshift(t[n].parent),s=Ui($e[t[n].parent][n],s),n=t[n].parent;return s.conversion=r,s}Zr.exports=function(e){for(var t=qi(e),r={},s=Object.keys(t),n=s.length,i=0;i<n;i++){var a=s[i],o=t[a];o.parent!==null&&(r[a]=Di(a,t))}return r}});var en=g((lu,Qr)=>{var bt=vt(),Gi=Jr(),ne={},Vi=Object.keys(bt);function zi(e){var t=function(r){return r==null?r:(arguments.length>1&&(r=Array.prototype.slice.call(arguments)),e(r))};return"conversion"in e&&(t.conversion=e.conversion),t}function Yi(e){var t=function(r){if(r==null)return r;arguments.length>1&&(r=Array.prototype.slice.call(arguments));var s=e(r);if(typeof s=="object")for(var n=s.length,i=0;i<n;i++)s[i]=Math.round(s[i]);return s};return"conversion"in e&&(t.conversion=e.conversion),t}Vi.forEach(function(e){ne[e]={},Object.defineProperty(ne[e],"channels",{value:bt[e].channels}),Object.defineProperty(ne[e],"labels",{value:bt[e].labels});var t=Gi(e),r=Object.keys(t);r.forEach(function(s){var n=t[s];ne[e][s]=Yi(n),ne[e][s].raw=zi(n)})});Qr.exports=ne});var rn=g((cu,tn)=>{"use strict";var se=en(),We=(e,t)=>function(){return`\x1B[${e.apply(se,arguments)+t}m`},qe=(e,t)=>function(){let r=e.apply(se,arguments);return`\x1B[${38+t};5;${r}m`},Ue=(e,t)=>function(){let r=e.apply(se,arguments);return`\x1B[${38+t};2;${r[0]};${r[1]};${r[2]}m`};function Hi(){let e=new Map,t={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]}};t.color.grey=t.color.gray;for(let n of Object.keys(t)){let i=t[n];for(let a of Object.keys(i)){let o=i[a];t[a]={open:`\x1B[${o[0]}m`,close:`\x1B[${o[1]}m`},i[a]=t[a],e.set(o[0],o[1])}Object.defineProperty(t,n,{value:i,enumerable:!1}),Object.defineProperty(t,"codes",{value:e,enumerable:!1})}let r=n=>n,s=(n,i,a)=>[n,i,a];t.color.close="\x1B[39m",t.bgColor.close="\x1B[49m",t.color.ansi={ansi:We(r,0)},t.color.ansi256={ansi256:qe(r,0)},t.color.ansi16m={rgb:Ue(s,0)},t.bgColor.ansi={ansi:We(r,10)},t.bgColor.ansi256={ansi256:qe(r,10)},t.bgColor.ansi16m={rgb:Ue(s,10)};for(let n of Object.keys(se)){if(typeof se[n]!="object")continue;let i=se[n];n==="ansi16"&&(n="ansi"),"ansi16"in i&&(t.color.ansi[n]=We(i.ansi16,0),t.bgColor.ansi[n]=We(i.ansi16,10)),"ansi256"in i&&(t.color.ansi256[n]=qe(i.ansi256,0),t.bgColor.ansi256[n]=qe(i.ansi256,10)),"rgb"in i&&(t.color.ansi16m[n]=Ue(i.rgb,0),t.bgColor.ansi16m[n]=Ue(i.rgb,10))}return t}Object.defineProperty(tn,"exports",{enumerable:!0,get:Hi})});var sn=g((fu,nn)=>{"use strict";nn.exports=(e,t)=>{t=t||process.argv;let r=e.startsWith("-")?"":e.length===1?"-":"--",s=t.indexOf(r+e),n=t.indexOf("--");return s!==-1&&(n===-1?!0:s<n)}});var on=g((hu,an)=>{"use strict";var Ki=require("os"),N=sn(),k=process.env,ie;N("no-color")||N("no-colors")||N("color=false")?ie=!1:(N("color")||N("colors")||N("color=true")||N("color=always"))&&(ie=!0);"FORCE_COLOR"in k&&(ie=k.FORCE_COLOR.length===0||parseInt(k.FORCE_COLOR,10)!==0);function Xi(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Zi(e){if(ie===!1)return 0;if(N("color=16m")||N("color=full")||N("color=truecolor"))return 3;if(N("color=256"))return 2;if(e&&!e.isTTY&&ie!==!0)return 0;let t=ie?1:0;if(process.platform==="win32"){let r=Ki.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in k)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(r=>r in k)||k.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in k)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(k.TEAMCITY_VERSION)?1:0;if(k.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in k){let r=parseInt((k.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(k.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(k.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(k.TERM)||"COLORTERM"in k?1:(k.TERM==="dumb",t)}function mt(e){let t=Zi(e);return Xi(t)}an.exports={supportsColor:mt,stdout:mt(process.stdout),stderr:mt(process.stderr)}});var hn=g((du,fn)=>{"use strict";var Ji=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,un=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Qi=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,ea=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,ta=new Map([["n",`
6
+ `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function cn(e){return e[0]==="u"&&e.length===5||e[0]==="x"&&e.length===3?String.fromCharCode(parseInt(e.slice(1),16)):ta.get(e)||e}function ra(e,t){let r=[],s=t.trim().split(/\s*,\s*/g),n;for(let i of s)if(!isNaN(i))r.push(Number(i));else if(n=i.match(Qi))r.push(n[2].replace(ea,(a,o,u)=>o?cn(o):u));else throw new Error(`Invalid Chalk template style argument: ${i} (in style '${e}')`);return r}function na(e){un.lastIndex=0;let t=[],r;for(;(r=un.exec(e))!==null;){let s=r[1];if(r[2]){let n=ra(s,r[2]);t.push([s].concat(n))}else t.push([s])}return t}function ln(e,t){let r={};for(let n of t)for(let i of n.styles)r[i[0]]=n.inverse?null:i.slice(1);let s=e;for(let n of Object.keys(r))if(Array.isArray(r[n])){if(!(n in s))throw new Error(`Unknown Chalk style: ${n}`);r[n].length>0?s=s[n].apply(s,r[n]):s=s[n]}return s}fn.exports=(e,t)=>{let r=[],s=[],n=[];if(t.replace(Ji,(i,a,o,u,l,f)=>{if(a)n.push(cn(a));else if(u){let c=n.join("");n=[],s.push(r.length===0?c:ln(e,r)(c)),r.push({inverse:o,styles:na(u)})}else if(l){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");s.push(ln(e,r)(n.join(""))),n=[],r.pop()}else n.push(f)}),s.push(n.join("")),r.length>0){let i=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(i)}return s.join("")}});var bn=g((pu,be)=>{"use strict";var _t=Gr(),S=rn(),yt=on().stdout,sa=hn(),pn=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),gn=["ansi","ansi","ansi256","ansi16m"],vn=new Set(["gray"]),ae=Object.create(null);function dn(e,t){t=t||{};let r=yt?yt.level:0;e.level=t.level===void 0?r:t.level,e.enabled="enabled"in t?t.enabled:e.level>0}function ve(e){if(!this||!(this instanceof ve)||this.template){let t={};return dn(t,e),t.template=function(){let r=[].slice.call(arguments);return oa.apply(null,[t.template].concat(r))},Object.setPrototypeOf(t,ve.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=ve,t.template}dn(this,e)}pn&&(S.blue.open="\x1B[94m");for(let e of Object.keys(S))S[e].closeRe=new RegExp(_t(S[e].close),"g"),ae[e]={get(){let t=S[e];return De.call(this,this._styles?this._styles.concat(t):[t],this._empty,e)}};ae.visible={get(){return De.call(this,this._styles||[],!0,"visible")}};S.color.closeRe=new RegExp(_t(S.color.close),"g");for(let e of Object.keys(S.color.ansi))vn.has(e)||(ae[e]={get(){let t=this.level;return function(){let s={open:S.color[gn[t]][e].apply(null,arguments),close:S.color.close,closeRe:S.color.closeRe};return De.call(this,this._styles?this._styles.concat(s):[s],this._empty,e)}}});S.bgColor.closeRe=new RegExp(_t(S.bgColor.close),"g");for(let e of Object.keys(S.bgColor.ansi)){if(vn.has(e))continue;let t="bg"+e[0].toUpperCase()+e.slice(1);ae[t]={get(){let r=this.level;return function(){let n={open:S.bgColor[gn[r]][e].apply(null,arguments),close:S.bgColor.close,closeRe:S.bgColor.closeRe};return De.call(this,this._styles?this._styles.concat(n):[n],this._empty,e)}}}}var ia=Object.defineProperties(()=>{},ae);function De(e,t,r){let s=function(){return aa.apply(s,arguments)};s._styles=e,s._empty=t;let n=this;return Object.defineProperty(s,"level",{enumerable:!0,get(){return n.level},set(i){n.level=i}}),Object.defineProperty(s,"enabled",{enumerable:!0,get(){return n.enabled},set(i){n.enabled=i}}),s.hasGrey=this.hasGrey||r==="gray"||r==="grey",s.__proto__=ia,s}function aa(){let e=arguments,t=e.length,r=String(arguments[0]);if(t===0)return"";if(t>1)for(let n=1;n<t;n++)r+=" "+e[n];if(!this.enabled||this.level<=0||!r)return this._empty?"":r;let s=S.dim.open;pn&&this.hasGrey&&(S.dim.open="");for(let n of this._styles.slice().reverse())r=n.open+r.replace(n.closeRe,n.open)+n.close,r=r.replace(/\r?\n/g,`${n.close}$&${n.open}`);return S.dim.open=s,r}function oa(e,t){if(!Array.isArray(t))return[].slice.call(arguments,1).join(" ");let r=[].slice.call(arguments,2),s=[t.raw[0]];for(let n=1;n<t.length;n++)s.push(String(r[n-1]).replace(/[{}\\]/g,"\\$&")),s.push(String(t.raw[n]));return sa(e,s.join(""))}Object.defineProperties(ve.prototype,ae);be.exports=ve();be.exports.supportsColor=yt;be.exports.default=be.exports});var En=g(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.codeFrameColumns=Sn;Ge.default=ha;var mn=Ur(),yn=ua(bn(),!0);function xn(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(xn=function(s){return s?r:t})(e)}function ua(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=xn(t);if(r&&r.has(e))return r.get(e);var s={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var a=n?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(s,i,a):s[i]=e[i]}return s.default=e,r&&r.set(e,s),s}var wt;function la(e){if(e){var t;return(t=wt)!=null||(wt=new yn.default.constructor({enabled:!0,level:1})),wt}return yn.default}var _n=!1;function ca(e){return{gutter:e.grey,marker:e.red.bold,message:e.red.bold}}var wn=/\r\n|[\n\r\u2028\u2029]/;function fa(e,t,r){let s=Object.assign({column:0,line:-1},e.start),n=Object.assign({},s,e.end),{linesAbove:i=2,linesBelow:a=3}=r||{},o=s.line,u=s.column,l=n.line,f=n.column,c=Math.max(o-(i+1),0),m=Math.min(t.length,l+a);o===-1&&(c=0),l===-1&&(m=t.length);let _=l-o,v={};if(_)for(let p=0;p<=_;p++){let b=p+o;if(!u)v[b]=!0;else if(p===0){let y=t[b-1].length;v[b]=[u,y-u+1]}else if(p===_)v[b]=[0,f];else{let y=t[b-p].length;v[b]=[0,y]}}else u===f?u?v[o]=[u,0]:v[o]=!0:v[o]=[u,f-u];return{start:c,end:m,markerLines:v}}function Sn(e,t,r={}){let s=(r.highlightCode||r.forceColor)&&(0,mn.shouldHighlight)(r),n=la(r.forceColor),i=ca(n),a=(p,b)=>s?p(b):b,o=e.split(wn),{start:u,end:l,markerLines:f}=fa(t,o,r),c=t.start&&typeof t.start.column=="number",m=String(l).length,v=(s?(0,mn.default)(e,r):e).split(wn,l).slice(u,l).map((p,b)=>{let y=u+1+b,I=` ${` ${y}`.slice(-m)} |`,T=f[y],Me=!f[y+1];if(T){let z="";if(Array.isArray(T)){let Re=p.slice(0,Math.max(T[0]-1,0)).replace(/[^\t]/g," "),ce=T[1]||1;z=[`
7
+ `,a(i.gutter,I.replace(/\d/g," "))," ",Re,a(i.marker,"^").repeat(ce)].join(""),Me&&r.message&&(z+=" "+a(i.message,r.message))}return[a(i.marker,">"),a(i.gutter,I),p.length>0?` ${p}`:"",z].join("")}else return` ${a(i.gutter,I)}${p.length>0?` ${p}`:""}`}).join(`
8
+ `);return r.message&&!c&&(v=`${" ".repeat(m+1)}${r.message}
9
+ ${v}`),s?n.reset(v):v}function ha(e,t,r,s={}){if(!_n){_n=!0;let i="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning)process.emitWarning(i,"DeprecationWarning");else{let a=new Error(i);a.name="DeprecationWarning",console.warn(new Error(i))}}return r=Math.max(r,0),Sn(e,{start:{column:r,line:t}},s)}});var Mn=g((vu,Cn)=>{"use strict";var{Duplex:da}=require("stream");function kn(e){e.emit("close")}function pa(){!this.destroyed&&this._writableState.finished&&this.destroy()}function On(e){this.removeListener("error",On),this.destroy(),this.listenerCount("error")===0&&this.emit("error",e)}function ga(e,t){let r=!0,s=new da({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on("message",function(i,a){let o=!a&&s._readableState.objectMode?i.toString():i;s.push(o)||e.pause()}),e.once("error",function(i){s.destroyed||(r=!1,s.destroy(i))}),e.once("close",function(){s.destroyed||s.push(null)}),s._destroy=function(n,i){if(e.readyState===e.CLOSED){i(n),process.nextTick(kn,s);return}let a=!1;e.once("error",function(u){a=!0,i(u)}),e.once("close",function(){a||i(n),process.nextTick(kn,s)}),r&&e.terminate()},s._final=function(n){if(e.readyState===e.CONNECTING){e.once("open",function(){s._final(n)});return}e._socket!==null&&(e._socket._writableState.finished?(n(),s._readableState.endEmitted&&s.destroy()):(e._socket.once("finish",function(){n()}),e.close()))},s._read=function(){e.isPaused&&e.resume()},s._write=function(n,i,a){if(e.readyState===e.CONNECTING){e.once("open",function(){s._write(n,i,a)});return}e.send(n,a)},s.on("end",pa),s.on("error",On),s}Cn.exports=ga});var U=g((bu,Rn)=>{"use strict";Rn.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 me=g((mu,Ve)=>{"use strict";var{EMPTY_BUFFER:va}=U(),xt=Buffer[Symbol.species];function ba(e,t){if(e.length===0)return va;if(e.length===1)return e[0];let r=Buffer.allocUnsafe(t),s=0;for(let n=0;n<e.length;n++){let i=e[n];r.set(i,s),s+=i.length}return s<t?new xt(r.buffer,r.byteOffset,s):r}function Tn(e,t,r,s,n){for(let i=0;i<n;i++)r[s+i]=e[i]^t[i&3]}function Pn(e,t){for(let r=0;r<e.length;r++)e[r]^=t[r&3]}function ma(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)}function St(e){if(St.readOnly=!0,Buffer.isBuffer(e))return e;let t;return e instanceof ArrayBuffer?t=new xt(e):ArrayBuffer.isView(e)?t=new xt(e.buffer,e.byteOffset,e.byteLength):(t=Buffer.from(e),St.readOnly=!1),t}Ve.exports={concat:ba,mask:Tn,toArrayBuffer:ma,toBuffer:St,unmask:Pn};if(!process.env.WS_NO_BUFFER_UTIL)try{let e=require("bufferutil");Ve.exports.mask=function(t,r,s,n,i){i<48?Tn(t,r,s,n,i):e.mask(t,r,s,n,i)},Ve.exports.unmask=function(t,r){t.length<32?Pn(t,r):e.unmask(t,r)}}catch{}});var Bn=g((yu,Nn)=>{"use strict";var Ln=Symbol("kDone"),Et=Symbol("kRun"),kt=class{constructor(t){this[Ln]=()=>{this.pending--,this[Et]()},this.concurrency=t||1/0,this.jobs=[],this.pending=0}add(t){this.jobs.push(t),this[Et]()}[Et](){if(this.pending!==this.concurrency&&this.jobs.length){let t=this.jobs.shift();this.pending++,t(this[Ln])}}};Nn.exports=kt});var we=g((_u,Fn)=>{"use strict";var ye=require("zlib"),In=me(),ya=Bn(),{kStatusCode:jn}=U(),_a=Buffer[Symbol.species],wa=Buffer.from([0,0,255,255]),He=Symbol("permessage-deflate"),F=Symbol("total-length"),_e=Symbol("callback"),D=Symbol("buffers"),Ye=Symbol("error"),ze,Ot=class{constructor(t,r,s){if(this._maxPayload=s|0,this._options=t||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!r,this._deflate=null,this._inflate=null,this.params=null,!ze){let n=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;ze=new ya(n)}}static get extensionName(){return"permessage-deflate"}offer(){let t={};return this._options.serverNoContextTakeover&&(t.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(t.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(t.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?t.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(t.client_max_window_bits=!0),t}accept(t){return t=this.normalizeParams(t),this.params=this._isServer?this.acceptAsServer(t):this.acceptAsClient(t),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let t=this._deflate[_e];this._deflate.close(),this._deflate=null,t&&t(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(t){let r=this._options,s=t.find(n=>!(r.serverNoContextTakeover===!1&&n.server_no_context_takeover||n.server_max_window_bits&&(r.serverMaxWindowBits===!1||typeof r.serverMaxWindowBits=="number"&&r.serverMaxWindowBits>n.server_max_window_bits)||typeof r.clientMaxWindowBits=="number"&&!n.client_max_window_bits));if(!s)throw new Error("None of the extension offers can be accepted");return r.serverNoContextTakeover&&(s.server_no_context_takeover=!0),r.clientNoContextTakeover&&(s.client_no_context_takeover=!0),typeof r.serverMaxWindowBits=="number"&&(s.server_max_window_bits=r.serverMaxWindowBits),typeof r.clientMaxWindowBits=="number"?s.client_max_window_bits=r.clientMaxWindowBits:(s.client_max_window_bits===!0||r.clientMaxWindowBits===!1)&&delete s.client_max_window_bits,s}acceptAsClient(t){let r=t[0];if(this._options.clientNoContextTakeover===!1&&r.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!r.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(r.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&r.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return r}normalizeParams(t){return t.forEach(r=>{Object.keys(r).forEach(s=>{let n=r[s];if(n.length>1)throw new Error(`Parameter "${s}" must have only a single value`);if(n=n[0],s==="client_max_window_bits"){if(n!==!0){let i=+n;if(!Number.isInteger(i)||i<8||i>15)throw new TypeError(`Invalid value for parameter "${s}": ${n}`);n=i}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${s}": ${n}`)}else if(s==="server_max_window_bits"){let i=+n;if(!Number.isInteger(i)||i<8||i>15)throw new TypeError(`Invalid value for parameter "${s}": ${n}`);n=i}else if(s==="client_no_context_takeover"||s==="server_no_context_takeover"){if(n!==!0)throw new TypeError(`Invalid value for parameter "${s}": ${n}`)}else throw new Error(`Unknown parameter "${s}"`);r[s]=n})}),t}decompress(t,r,s){ze.add(n=>{this._decompress(t,r,(i,a)=>{n(),s(i,a)})})}compress(t,r,s){ze.add(n=>{this._compress(t,r,(i,a)=>{n(),s(i,a)})})}_decompress(t,r,s){let n=this._isServer?"client":"server";if(!this._inflate){let i=`${n}_max_window_bits`,a=typeof this.params[i]!="number"?ye.Z_DEFAULT_WINDOWBITS:this.params[i];this._inflate=ye.createInflateRaw({...this._options.zlibInflateOptions,windowBits:a}),this._inflate[He]=this,this._inflate[F]=0,this._inflate[D]=[],this._inflate.on("error",Sa),this._inflate.on("data",An)}this._inflate[_e]=s,this._inflate.write(t),r&&this._inflate.write(wa),this._inflate.flush(()=>{let i=this._inflate[Ye];if(i){this._inflate.close(),this._inflate=null,s(i);return}let a=In.concat(this._inflate[D],this._inflate[F]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[F]=0,this._inflate[D]=[],r&&this.params[`${n}_no_context_takeover`]&&this._inflate.reset()),s(null,a)})}_compress(t,r,s){let n=this._isServer?"server":"client";if(!this._deflate){let i=`${n}_max_window_bits`,a=typeof this.params[i]!="number"?ye.Z_DEFAULT_WINDOWBITS:this.params[i];this._deflate=ye.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:a}),this._deflate[F]=0,this._deflate[D]=[],this._deflate.on("data",xa)}this._deflate[_e]=s,this._deflate.write(t),this._deflate.flush(ye.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let i=In.concat(this._deflate[D],this._deflate[F]);r&&(i=new _a(i.buffer,i.byteOffset,i.length-4)),this._deflate[_e]=null,this._deflate[F]=0,this._deflate[D]=[],r&&this.params[`${n}_no_context_takeover`]&&this._deflate.reset(),s(null,i)})}};Fn.exports=Ot;function xa(e){this[D].push(e),this[F]+=e.length}function An(e){if(this[F]+=e.length,this[He]._maxPayload<1||this[F]<=this[He]._maxPayload){this[D].push(e);return}this[Ye]=new RangeError("Max payload size exceeded"),this[Ye].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Ye][jn]=1009,this.removeListener("data",An),this.reset()}function Sa(e){this[He]._inflate=null,e[jn]=1007,this[_e](e)}});var xe=g((wu,Ke)=>{"use strict";var{isUtf8:$n}=require("buffer"),Ea=[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(e){return e>=1e3&&e<=1014&&e!==1004&&e!==1005&&e!==1006||e>=3e3&&e<=4999}function Ct(e){let t=e.length,r=0;for(;r<t;)if(!(e[r]&128))r++;else if((e[r]&224)===192){if(r+1===t||(e[r+1]&192)!==128||(e[r]&254)===192)return!1;r+=2}else if((e[r]&240)===224){if(r+2>=t||(e[r+1]&192)!==128||(e[r+2]&192)!==128||e[r]===224&&(e[r+1]&224)===128||e[r]===237&&(e[r+1]&224)===160)return!1;r+=3}else if((e[r]&248)===240){if(r+3>=t||(e[r+1]&192)!==128||(e[r+2]&192)!==128||(e[r+3]&192)!==128||e[r]===240&&(e[r+1]&240)===128||e[r]===244&&e[r+1]>143||e[r]>244)return!1;r+=4}else return!1;return!0}Ke.exports={isValidStatusCode:ka,isValidUTF8:Ct,tokenChars:Ea};if($n)Ke.exports.isValidUTF8=function(e){return e.length<24?Ct(e):$n(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let e=require("utf-8-validate");Ke.exports.isValidUTF8=function(t){return t.length<32?Ct(t):e(t)}}catch{}});var Lt=g((xu,zn)=>{"use strict";var{Writable:Oa}=require("stream"),Wn=we(),{BINARY_TYPES:Ca,EMPTY_BUFFER:qn,kStatusCode:Ma,kWebSocket:Ra}=U(),{concat:Mt,toArrayBuffer:Ta,unmask:Pa}=me(),{isValidStatusCode:La,isValidUTF8:Un}=xe(),Xe=Buffer[Symbol.species],Na=Promise.resolve(),Rt=typeof queueMicrotask=="function"?queueMicrotask:Ba,P=0,Dn=1,Gn=2,Vn=3,Tt=4,Ze=5,Je=6,Pt=class extends Oa{constructor(t={}){super(),this._allowSynchronousEvents=!!t.allowSynchronousEvents,this._binaryType=t.binaryType||Ca[0],this._extensions=t.extensions||{},this._isServer=!!t.isServer,this._maxPayload=t.maxPayload|0,this._skipUTF8Validation=!!t.skipUTF8Validation,this[Ra]=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=P}_write(t,r,s){if(this._opcode===8&&this._state==P)return s();this._bufferedBytes+=t.length,this._buffers.push(t),this.startLoop(s)}consume(t){if(this._bufferedBytes-=t,t===this._buffers[0].length)return this._buffers.shift();if(t<this._buffers[0].length){let s=this._buffers[0];return this._buffers[0]=new Xe(s.buffer,s.byteOffset+t,s.length-t),new Xe(s.buffer,s.byteOffset,t)}let r=Buffer.allocUnsafe(t);do{let s=this._buffers[0],n=r.length-t;t>=s.length?r.set(this._buffers.shift(),n):(r.set(new Uint8Array(s.buffer,s.byteOffset,t),n),this._buffers[0]=new Xe(s.buffer,s.byteOffset+t,s.length-t)),t-=s.length}while(t>0);return r}startLoop(t){this._loop=!0;do switch(this._state){case P:this.getInfo(t);break;case Dn:this.getPayloadLength16(t);break;case Gn:this.getPayloadLength64(t);break;case Vn:this.getMask();break;case Tt:this.getData(t);break;case Ze:case Je:this._loop=!1;return}while(this._loop);this._errored||t()}getInfo(t){if(this._bufferedBytes<2){this._loop=!1;return}let r=this.consume(2);if(r[0]&48){let n=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");t(n);return}let s=(r[0]&64)===64;if(s&&!this._extensions[Wn.extensionName]){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(n);return}if(this._fin=(r[0]&128)===128,this._opcode=r[0]&15,this._payloadLength=r[1]&127,this._opcode===0){if(s){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(n);return}if(!this._fragmented){let n=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");t(n);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");t(n);return}this._compressed=s}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let n=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");t(n);return}if(s){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(n);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let n=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");t(n);return}}else{let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");t(n);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(r[1]&128)===128,this._isServer){if(!this._masked){let n=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");t(n);return}}else if(this._masked){let n=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");t(n);return}this._payloadLength===126?this._state=Dn:this._payloadLength===127?this._state=Gn:this.haveLength(t)}getPayloadLength16(t){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(t)}getPayloadLength64(t){if(this._bufferedBytes<8){this._loop=!1;return}let r=this.consume(8),s=r.readUInt32BE(0);if(s>Math.pow(2,21)-1){let n=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");t(n);return}this._payloadLength=s*Math.pow(2,32)+r.readUInt32BE(4),this.haveLength(t)}haveLength(t){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let r=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");t(r);return}this._masked?this._state=Vn:this._state=Tt}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=Tt}getData(t){let r=qn;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}r=this.consume(this._payloadLength),this._masked&&this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3]&&Pa(r,this._mask)}if(this._opcode>7){this.controlMessage(r,t);return}if(this._compressed){this._state=Ze,this.decompress(r,t);return}r.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(r)),this.dataMessage(t)}decompress(t,r){this._extensions[Wn.extensionName].decompress(t,this._fin,(n,i)=>{if(n)return r(n);if(i.length){if(this._messageLength+=i.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let a=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");r(a);return}this._fragments.push(i)}this.dataMessage(r),this._state===P&&this.startLoop(r)})}dataMessage(t){if(!this._fin){this._state=P;return}let r=this._messageLength,s=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let n;this._binaryType==="nodebuffer"?n=Mt(s,r):this._binaryType==="arraybuffer"?n=Ta(Mt(s,r)):n=s,this._state===Ze||this._allowSynchronousEvents?(this.emit("message",n,!0),this._state=P):(this._state=Je,Rt(()=>{this.emit("message",n,!0),this._state=P,this.startLoop(t)}))}else{let n=Mt(s,r);if(!this._skipUTF8Validation&&!Un(n)){let i=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(i);return}this._state===Ze||this._allowSynchronousEvents?(this.emit("message",n,!1),this._state=P):(this._state=Je,Rt(()=>{this.emit("message",n,!1),this._state=P,this.startLoop(t)}))}}controlMessage(t,r){if(this._opcode===8){if(t.length===0)this._loop=!1,this.emit("conclude",1005,qn),this.end();else{let s=t.readUInt16BE(0);if(!La(s)){let i=this.createError(RangeError,`invalid status code ${s}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");r(i);return}let n=new Xe(t.buffer,t.byteOffset+2,t.length-2);if(!this._skipUTF8Validation&&!Un(n)){let i=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");r(i);return}this._loop=!1,this.emit("conclude",s,n),this.end()}this._state=P;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",t),this._state=P):(this._state=Je,Rt(()=>{this.emit(this._opcode===9?"ping":"pong",t),this._state=P,this.startLoop(r)}))}createError(t,r,s,n,i){this._loop=!1,this._errored=!0;let a=new t(s?`Invalid WebSocket frame: ${r}`:r);return Error.captureStackTrace(a,this.createError),a.code=i,a[Ma]=n,a}};zn.exports=Pt;function Ba(e){Na.then(e).catch(ja)}function Ia(e){throw e}function ja(e){process.nextTick(Ia,e)}});var Bt=g((Eu,Kn)=>{"use strict";var{Duplex:Su}=require("stream"),{randomFillSync:Aa}=require("crypto"),Yn=we(),{EMPTY_BUFFER:Fa}=U(),{isValidStatusCode:$a}=xe(),{mask:Hn,toBuffer:oe}=me(),B=Symbol("kByteLength"),Wa=Buffer.alloc(4),Nt=class e{constructor(t,r,s){this._extensions=r||{},s&&(this._generateMask=s,this._maskBuffer=Buffer.alloc(4)),this._socket=t,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(t,r){let s,n=!1,i=2,a=!1;r.mask&&(s=r.maskBuffer||Wa,r.generateMask?r.generateMask(s):Aa(s,0,4),a=(s[0]|s[1]|s[2]|s[3])===0,i=6);let o;typeof t=="string"?(!r.mask||a)&&r[B]!==void 0?o=r[B]:(t=Buffer.from(t),o=t.length):(o=t.length,n=r.mask&&r.readOnly&&!a);let u=o;o>=65536?(i+=8,u=127):o>125&&(i+=2,u=126);let l=Buffer.allocUnsafe(n?o+i:i);return l[0]=r.fin?r.opcode|128:r.opcode,r.rsv1&&(l[0]|=64),l[1]=u,u===126?l.writeUInt16BE(o,2):u===127&&(l[2]=l[3]=0,l.writeUIntBE(o,4,6)),r.mask?(l[1]|=128,l[i-4]=s[0],l[i-3]=s[1],l[i-2]=s[2],l[i-1]=s[3],a?[l,t]:n?(Hn(t,s,l,i,o),[l]):(Hn(t,s,t,0,o),[l,t])):[l,t]}close(t,r,s,n){let i;if(t===void 0)i=Fa;else{if(typeof t!="number"||!$a(t))throw new TypeError("First argument must be a valid error code number");if(r===void 0||!r.length)i=Buffer.allocUnsafe(2),i.writeUInt16BE(t,0);else{let o=Buffer.byteLength(r);if(o>123)throw new RangeError("The message must not be greater than 123 bytes");i=Buffer.allocUnsafe(2+o),i.writeUInt16BE(t,0),typeof r=="string"?i.write(r,2):i.set(r,2)}}let a={[B]:i.length,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,i,!1,a,n]):this.sendFrame(e.frame(i,a),n)}ping(t,r,s){let n,i;if(typeof t=="string"?(n=Buffer.byteLength(t),i=!1):(t=oe(t),n=t.length,i=oe.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let a={[B]:n,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:9,readOnly:i,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,a,s]):this.sendFrame(e.frame(t,a),s)}pong(t,r,s){let n,i;if(typeof t=="string"?(n=Buffer.byteLength(t),i=!1):(t=oe(t),n=t.length,i=oe.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let a={[B]:n,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:10,readOnly:i,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,a,s]):this.sendFrame(e.frame(t,a),s)}send(t,r,s){let n=this._extensions[Yn.extensionName],i=r.binary?2:1,a=r.compress,o,u;if(typeof t=="string"?(o=Buffer.byteLength(t),u=!1):(t=oe(t),o=t.length,u=oe.readOnly),this._firstFragment?(this._firstFragment=!1,a&&n&&n.params[n._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(a=o>=n._threshold),this._compress=a):(a=!1,i=0),r.fin&&(this._firstFragment=!0),n){let l={[B]:o,fin:r.fin,generateMask:this._generateMask,mask:r.mask,maskBuffer:this._maskBuffer,opcode:i,readOnly:u,rsv1:a};this._deflating?this.enqueue([this.dispatch,t,this._compress,l,s]):this.dispatch(t,this._compress,l,s)}else this.sendFrame(e.frame(t,{[B]:o,fin:r.fin,generateMask:this._generateMask,mask:r.mask,maskBuffer:this._maskBuffer,opcode:i,readOnly:u,rsv1:!1}),s)}dispatch(t,r,s,n){if(!r){this.sendFrame(e.frame(t,s),n);return}let i=this._extensions[Yn.extensionName];this._bufferedBytes+=s[B],this._deflating=!0,i.compress(t,s.fin,(a,o)=>{if(this._socket.destroyed){let u=new Error("The socket was closed while data was being compressed");typeof n=="function"&&n(u);for(let l=0;l<this._queue.length;l++){let f=this._queue[l],c=f[f.length-1];typeof c=="function"&&c(u)}return}this._bufferedBytes-=s[B],this._deflating=!1,s.readOnly=!1,this.sendFrame(e.frame(o,s),n),this.dequeue()})}dequeue(){for(;!this._deflating&&this._queue.length;){let t=this._queue.shift();this._bufferedBytes-=t[3][B],Reflect.apply(t[0],this,t.slice(1))}}enqueue(t){this._bufferedBytes+=t[3][B],this._queue.push(t)}sendFrame(t,r){t.length===2?(this._socket.cork(),this._socket.write(t[0]),this._socket.write(t[1],r),this._socket.uncork()):this._socket.write(t[0],r)}};Kn.exports=Nt});var ss=g((ku,ns)=>{"use strict";var{kForOnEventAttribute:Se,kListener:It}=U(),Xn=Symbol("kCode"),Zn=Symbol("kData"),Jn=Symbol("kError"),Qn=Symbol("kMessage"),es=Symbol("kReason"),ue=Symbol("kTarget"),ts=Symbol("kType"),rs=Symbol("kWasClean"),$=class{constructor(t){this[ue]=null,this[ts]=t}get target(){return this[ue]}get type(){return this[ts]}};Object.defineProperty($.prototype,"target",{enumerable:!0});Object.defineProperty($.prototype,"type",{enumerable:!0});var X=class extends ${constructor(t,r={}){super(t),this[Xn]=r.code===void 0?0:r.code,this[es]=r.reason===void 0?"":r.reason,this[rs]=r.wasClean===void 0?!1:r.wasClean}get code(){return this[Xn]}get reason(){return this[es]}get wasClean(){return this[rs]}};Object.defineProperty(X.prototype,"code",{enumerable:!0});Object.defineProperty(X.prototype,"reason",{enumerable:!0});Object.defineProperty(X.prototype,"wasClean",{enumerable:!0});var le=class extends ${constructor(t,r={}){super(t),this[Jn]=r.error===void 0?null:r.error,this[Qn]=r.message===void 0?"":r.message}get error(){return this[Jn]}get message(){return this[Qn]}};Object.defineProperty(le.prototype,"error",{enumerable:!0});Object.defineProperty(le.prototype,"message",{enumerable:!0});var Ee=class extends ${constructor(t,r={}){super(t),this[Zn]=r.data===void 0?null:r.data}get data(){return this[Zn]}};Object.defineProperty(Ee.prototype,"data",{enumerable:!0});var qa={addEventListener(e,t,r={}){for(let n of this.listeners(e))if(!r[Se]&&n[It]===t&&!n[Se])return;let s;if(e==="message")s=function(i,a){let o=new Ee("message",{data:a?i:i.toString()});o[ue]=this,Qe(t,this,o)};else if(e==="close")s=function(i,a){let o=new X("close",{code:i,reason:a.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});o[ue]=this,Qe(t,this,o)};else if(e==="error")s=function(i){let a=new le("error",{error:i,message:i.message});a[ue]=this,Qe(t,this,a)};else if(e==="open")s=function(){let i=new $("open");i[ue]=this,Qe(t,this,i)};else return;s[Se]=!!r[Se],s[It]=t,r.once?this.once(e,s):this.on(e,s)},removeEventListener(e,t){for(let r of this.listeners(e))if(r[It]===t&&!r[Se]){this.removeListener(e,r);break}}};ns.exports={CloseEvent:X,ErrorEvent:le,Event:$,EventTarget:qa,MessageEvent:Ee};function Qe(e,t,r){typeof e=="object"&&e.handleEvent?e.handleEvent.call(e,r):e.call(t,r)}});var jt=g((Ou,is)=>{"use strict";var{tokenChars:ke}=xe();function A(e,t,r){e[t]===void 0?e[t]=[r]:e[t].push(r)}function Ua(e){let t=Object.create(null),r=Object.create(null),s=!1,n=!1,i=!1,a,o,u=-1,l=-1,f=-1,c=0;for(;c<e.length;c++)if(l=e.charCodeAt(c),a===void 0)if(f===-1&&ke[l]===1)u===-1&&(u=c);else if(c!==0&&(l===32||l===9))f===-1&&u!==-1&&(f=c);else if(l===59||l===44){if(u===-1)throw new SyntaxError(`Unexpected character at index ${c}`);f===-1&&(f=c);let _=e.slice(u,f);l===44?(A(t,_,r),r=Object.create(null)):a=_,u=f=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);else if(o===void 0)if(f===-1&&ke[l]===1)u===-1&&(u=c);else if(l===32||l===9)f===-1&&u!==-1&&(f=c);else if(l===59||l===44){if(u===-1)throw new SyntaxError(`Unexpected character at index ${c}`);f===-1&&(f=c),A(r,e.slice(u,f),!0),l===44&&(A(t,a,r),r=Object.create(null),a=void 0),u=f=-1}else if(l===61&&u!==-1&&f===-1)o=e.slice(u,c),u=f=-1;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(n){if(ke[l]!==1)throw new SyntaxError(`Unexpected character at index ${c}`);u===-1?u=c:s||(s=!0),n=!1}else if(i)if(ke[l]===1)u===-1&&(u=c);else if(l===34&&u!==-1)i=!1,f=c;else if(l===92)n=!0;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(l===34&&e.charCodeAt(c-1)===61)i=!0;else if(f===-1&&ke[l]===1)u===-1&&(u=c);else if(u!==-1&&(l===32||l===9))f===-1&&(f=c);else if(l===59||l===44){if(u===-1)throw new SyntaxError(`Unexpected character at index ${c}`);f===-1&&(f=c);let _=e.slice(u,f);s&&(_=_.replace(/\\/g,""),s=!1),A(r,o,_),l===44&&(A(t,a,r),r=Object.create(null),a=void 0),o=void 0,u=f=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);if(u===-1||i||l===32||l===9)throw new SyntaxError("Unexpected end of input");f===-1&&(f=c);let m=e.slice(u,f);return a===void 0?A(t,m,r):(o===void 0?A(r,m,!0):s?A(r,o,m.replace(/\\/g,"")):A(r,o,m),A(t,a,r)),t}function Da(e){return Object.keys(e).map(t=>{let r=e[t];return Array.isArray(r)||(r=[r]),r.map(s=>[t].concat(Object.keys(s).map(n=>{let i=s[n];return Array.isArray(i)||(i=[i]),i.map(a=>a===!0?n:`${n}=${a}`).join("; ")})).join("; ")).join(", ")}).join(", ")}is.exports={format:Da,parse:Ua}});var qt=g((Ru,vs)=>{"use strict";var Ga=require("events"),Va=require("https"),za=require("http"),us=require("net"),Ya=require("tls"),{randomBytes:Ha,createHash:Ka}=require("crypto"),{Duplex:Cu,Readable:Mu}=require("stream"),{URL:At}=require("url"),G=we(),Xa=Lt(),Za=Bt(),{BINARY_TYPES:as,EMPTY_BUFFER:et,GUID:Ja,kForOnEventAttribute:Ft,kListener:Qa,kStatusCode:eo,kWebSocket:O,NOOP:ls}=U(),{EventTarget:{addEventListener:to,removeEventListener:ro}}=ss(),{format:no,parse:so}=jt(),{toBuffer:io}=me(),ao=30*1e3,cs=Symbol("kAborted"),$t=[8,13],W=["CONNECTING","OPEN","CLOSING","CLOSED"],oo=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,w=class e extends Ga{constructor(t,r,s){super(),this._binaryType=as[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=et,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=e.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,t!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,r===void 0?r=[]:Array.isArray(r)||(typeof r=="object"&&r!==null?(s=r,r=[]):r=[r]),fs(this,t,r,s)):(this._autoPong=s.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(t){as.includes(t)&&(this._binaryType=t,this._receiver&&(this._receiver._binaryType=t))}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(t,r,s){let n=new Xa({allowSynchronousEvents:s.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:s.maxPayload,skipUTF8Validation:s.skipUTF8Validation});this._sender=new Za(t,this._extensions,s.generateMask),this._receiver=n,this._socket=t,n[O]=this,t[O]=this,n.on("conclude",co),n.on("drain",fo),n.on("error",ho),n.on("message",po),n.on("ping",go),n.on("pong",vo),t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),r.length>0&&t.unshift(r),t.on("close",ds),t.on("data",rt),t.on("end",ps),t.on("error",gs),this._readyState=e.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=e.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[G.extensionName]&&this._extensions[G.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=e.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(t,r){if(this.readyState!==e.CLOSED){if(this.readyState===e.CONNECTING){let s="WebSocket was closed before the connection was established";R(this,this._req,s);return}if(this.readyState===e.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=e.CLOSING,this._sender.close(t,r,!this._isServer,s=>{s||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),ao)}}pause(){this.readyState===e.CONNECTING||this.readyState===e.CLOSED||(this._paused=!0,this._socket.pause())}ping(t,r,s){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(s=t,t=r=void 0):typeof r=="function"&&(s=r,r=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==e.OPEN){Wt(this,t,s);return}r===void 0&&(r=!this._isServer),this._sender.ping(t||et,r,s)}pong(t,r,s){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(s=t,t=r=void 0):typeof r=="function"&&(s=r,r=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==e.OPEN){Wt(this,t,s);return}r===void 0&&(r=!this._isServer),this._sender.pong(t||et,r,s)}resume(){this.readyState===e.CONNECTING||this.readyState===e.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,r,s){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof r=="function"&&(s=r,r={}),typeof t=="number"&&(t=t.toString()),this.readyState!==e.OPEN){Wt(this,t,s);return}let n={binary:typeof t!="string",mask:!this._isServer,compress:!0,fin:!0,...r};this._extensions[G.extensionName]||(n.compress=!1),this._sender.send(t||et,n,s)}terminate(){if(this.readyState!==e.CLOSED){if(this.readyState===e.CONNECTING){let t="WebSocket was closed before the connection was established";R(this,this._req,t);return}this._socket&&(this._readyState=e.CLOSING,this._socket.destroy())}}};Object.defineProperty(w,"CONNECTING",{enumerable:!0,value:W.indexOf("CONNECTING")});Object.defineProperty(w.prototype,"CONNECTING",{enumerable:!0,value:W.indexOf("CONNECTING")});Object.defineProperty(w,"OPEN",{enumerable:!0,value:W.indexOf("OPEN")});Object.defineProperty(w.prototype,"OPEN",{enumerable:!0,value:W.indexOf("OPEN")});Object.defineProperty(w,"CLOSING",{enumerable:!0,value:W.indexOf("CLOSING")});Object.defineProperty(w.prototype,"CLOSING",{enumerable:!0,value:W.indexOf("CLOSING")});Object.defineProperty(w,"CLOSED",{enumerable:!0,value:W.indexOf("CLOSED")});Object.defineProperty(w.prototype,"CLOSED",{enumerable:!0,value:W.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(e=>{Object.defineProperty(w.prototype,e,{enumerable:!0})});["open","error","close","message"].forEach(e=>{Object.defineProperty(w.prototype,`on${e}`,{enumerable:!0,get(){for(let t of this.listeners(e))if(t[Ft])return t[Qa];return null},set(t){for(let r of this.listeners(e))if(r[Ft]){this.removeListener(e,r);break}typeof t=="function"&&this.addEventListener(e,t,{[Ft]:!0})}})});w.prototype.addEventListener=to;w.prototype.removeEventListener=ro;vs.exports=w;function fs(e,t,r,s){let n={allowSynchronousEvents:!1,autoPong:!0,protocolVersion:$t[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...s,createConnection:void 0,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(e._autoPong=n.autoPong,!$t.includes(n.protocolVersion))throw new RangeError(`Unsupported protocol version: ${n.protocolVersion} (supported versions: ${$t.join(", ")})`);let i;if(t instanceof At)i=t;else try{i=new At(t)}catch{throw new SyntaxError(`Invalid URL: ${t}`)}i.protocol==="http:"?i.protocol="ws:":i.protocol==="https:"&&(i.protocol="wss:"),e._url=i.href;let a=i.protocol==="wss:",o=i.protocol==="ws+unix:",u;if(i.protocol!=="ws:"&&!a&&!o?u=`The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`:o&&!i.pathname?u="The URL's pathname is empty":i.hash&&(u="The URL contains a fragment identifier"),u){let p=new SyntaxError(u);if(e._redirects===0)throw p;tt(e,p);return}let l=a?443:80,f=Ha(16).toString("base64"),c=a?Va.request:za.request,m=new Set,_;if(n.createConnection=a?lo:uo,n.defaultPort=n.defaultPort||l,n.port=i.port||l,n.host=i.hostname.startsWith("[")?i.hostname.slice(1,-1):i.hostname,n.headers={...n.headers,"Sec-WebSocket-Version":n.protocolVersion,"Sec-WebSocket-Key":f,Connection:"Upgrade",Upgrade:"websocket"},n.path=i.pathname+i.search,n.timeout=n.handshakeTimeout,n.perMessageDeflate&&(_=new G(n.perMessageDeflate!==!0?n.perMessageDeflate:{},!1,n.maxPayload),n.headers["Sec-WebSocket-Extensions"]=no({[G.extensionName]:_.offer()})),r.length){for(let p of r){if(typeof p!="string"||!oo.test(p)||m.has(p))throw new SyntaxError("An invalid or duplicated subprotocol was specified");m.add(p)}n.headers["Sec-WebSocket-Protocol"]=r.join(",")}if(n.origin&&(n.protocolVersion<13?n.headers["Sec-WebSocket-Origin"]=n.origin:n.headers.Origin=n.origin),(i.username||i.password)&&(n.auth=`${i.username}:${i.password}`),o){let p=n.path.split(":");n.socketPath=p[0],n.path=p[1]}let v;if(n.followRedirects){if(e._redirects===0){e._originalIpc=o,e._originalSecure=a,e._originalHostOrSocketPath=o?n.socketPath:i.host;let p=s&&s.headers;if(s={...s,headers:{}},p)for(let[b,y]of Object.entries(p))s.headers[b.toLowerCase()]=y}else if(e.listenerCount("redirect")===0){let p=o?e._originalIpc?n.socketPath===e._originalHostOrSocketPath:!1:e._originalIpc?!1:i.host===e._originalHostOrSocketPath;(!p||e._originalSecure&&!a)&&(delete n.headers.authorization,delete n.headers.cookie,p||delete n.headers.host,n.auth=void 0)}n.auth&&!s.headers.authorization&&(s.headers.authorization="Basic "+Buffer.from(n.auth).toString("base64")),v=e._req=c(n),e._redirects&&e.emit("redirect",e.url,v)}else v=e._req=c(n);n.timeout&&v.on("timeout",()=>{R(e,v,"Opening handshake has timed out")}),v.on("error",p=>{v===null||v[cs]||(v=e._req=null,tt(e,p))}),v.on("response",p=>{let b=p.headers.location,y=p.statusCode;if(b&&n.followRedirects&&y>=300&&y<400){if(++e._redirects>n.maxRedirects){R(e,v,"Maximum redirects exceeded");return}v.abort();let V;try{V=new At(b,t)}catch{let T=new SyntaxError(`Invalid URL: ${b}`);tt(e,T);return}fs(e,V,r,s)}else e.emit("unexpected-response",v,p)||R(e,v,`Unexpected server response: ${p.statusCode}`)}),v.on("upgrade",(p,b,y)=>{if(e.emit("upgrade",p),e.readyState!==w.CONNECTING)return;if(v=e._req=null,p.headers.upgrade.toLowerCase()!=="websocket"){R(e,b,"Invalid Upgrade header");return}let V=Ka("sha1").update(f+Ja).digest("base64");if(p.headers["sec-websocket-accept"]!==V){R(e,b,"Invalid Sec-WebSocket-Accept header");return}let I=p.headers["sec-websocket-protocol"],T;if(I!==void 0?m.size?m.has(I)||(T="Server sent an invalid subprotocol"):T="Server sent a subprotocol but none was requested":m.size&&(T="Server sent no subprotocol"),T){R(e,b,T);return}I&&(e._protocol=I);let Me=p.headers["sec-websocket-extensions"];if(Me!==void 0){if(!_){R(e,b,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let z;try{z=so(Me)}catch{R(e,b,"Invalid Sec-WebSocket-Extensions header");return}let Re=Object.keys(z);if(Re.length!==1||Re[0]!==G.extensionName){R(e,b,"Server indicated an extension that was not requested");return}try{_.accept(z[G.extensionName])}catch{R(e,b,"Invalid Sec-WebSocket-Extensions header");return}e._extensions[G.extensionName]=_}e.setSocket(b,y,{allowSynchronousEvents:n.allowSynchronousEvents,generateMask:n.generateMask,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation})}),n.finishRequest?n.finishRequest(v,e):v.end()}function tt(e,t){e._readyState=w.CLOSING,e.emit("error",t),e.emitClose()}function uo(e){return e.path=e.socketPath,us.connect(e)}function lo(e){return e.path=void 0,!e.servername&&e.servername!==""&&(e.servername=us.isIP(e.host)?"":e.host),Ya.connect(e)}function R(e,t,r){e._readyState=w.CLOSING;let s=new Error(r);Error.captureStackTrace(s,R),t.setHeader?(t[cs]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(tt,e,s)):(t.destroy(s),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function Wt(e,t,r){if(t){let s=io(t).length;e._socket?e._sender._bufferedBytes+=s:e._bufferedAmount+=s}if(r){let s=new Error(`WebSocket is not open: readyState ${e.readyState} (${W[e.readyState]})`);process.nextTick(r,s)}}function co(e,t){let r=this[O];r._closeFrameReceived=!0,r._closeMessage=t,r._closeCode=e,r._socket[O]!==void 0&&(r._socket.removeListener("data",rt),process.nextTick(hs,r._socket),e===1005?r.close():r.close(e,t))}function fo(){let e=this[O];e.isPaused||e._socket.resume()}function ho(e){let t=this[O];t._socket[O]!==void 0&&(t._socket.removeListener("data",rt),process.nextTick(hs,t._socket),t.close(e[eo])),t.emit("error",e)}function os(){this[O].emitClose()}function po(e,t){this[O].emit("message",e,t)}function go(e){let t=this[O];t._autoPong&&t.pong(e,!this._isServer,ls),t.emit("ping",e)}function vo(e){this[O].emit("pong",e)}function hs(e){e.resume()}function ds(){let e=this[O];this.removeListener("close",ds),this.removeListener("data",rt),this.removeListener("end",ps),e._readyState=w.CLOSING;let t;!this._readableState.endEmitted&&!e._closeFrameReceived&&!e._receiver._writableState.errorEmitted&&(t=e._socket.read())!==null&&e._receiver.write(t),e._receiver.end(),this[O]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",os),e._receiver.on("finish",os))}function rt(e){this[O]._receiver.write(e)||this.pause()}function ps(){let e=this[O];e._readyState=w.CLOSING,e._receiver.end(),this.end()}function gs(){let e=this[O];this.removeListener("error",gs),this.on("error",ls),e&&(e._readyState=w.CLOSING,this.destroy())}});var ms=g((Tu,bs)=>{"use strict";var{tokenChars:bo}=xe();function mo(e){let t=new Set,r=-1,s=-1,n=0;for(n;n<e.length;n++){let a=e.charCodeAt(n);if(s===-1&&bo[a]===1)r===-1&&(r=n);else if(n!==0&&(a===32||a===9))s===-1&&r!==-1&&(s=n);else if(a===44){if(r===-1)throw new SyntaxError(`Unexpected character at index ${n}`);s===-1&&(s=n);let o=e.slice(r,s);if(t.has(o))throw new SyntaxError(`The "${o}" subprotocol is duplicated`);t.add(o),r=s=-1}else throw new SyntaxError(`Unexpected character at index ${n}`)}if(r===-1||s!==-1)throw new SyntaxError("Unexpected end of input");let i=e.slice(r,n);if(t.has(i))throw new SyntaxError(`The "${i}" subprotocol is duplicated`);return t.add(i),t}bs.exports={parse:mo}});var ks=g((Lu,Es)=>{"use strict";var yo=require("events"),nt=require("http"),{Duplex:Pu}=require("stream"),{createHash:_o}=require("crypto"),ys=jt(),Z=we(),wo=ms(),xo=qt(),{GUID:So,kWebSocket:Eo}=U(),ko=/^[+/0-9A-Za-z]{22}==$/,_s=0,ws=1,Ss=2,Ut=class extends yo{constructor(t,r){if(super(),t={allowSynchronousEvents:!1,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:xo,...t},t.port==null&&!t.server&&!t.noServer||t.port!=null&&(t.server||t.noServer)||t.server&&t.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(t.port!=null?(this._server=nt.createServer((s,n)=>{let i=nt.STATUS_CODES[426];n.writeHead(426,{"Content-Length":i.length,"Content-Type":"text/plain"}),n.end(i)}),this._server.listen(t.port,t.host,t.backlog,r)):t.server&&(this._server=t.server),this._server){let s=this.emit.bind(this,"connection");this._removeListeners=Oo(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(n,i,a)=>{this.handleUpgrade(n,i,a,s)}})}t.perMessageDeflate===!0&&(t.perMessageDeflate={}),t.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=t,this._state=_s}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(t){if(this._state===Ss){t&&this.once("close",()=>{t(new Error("The server is not running"))}),process.nextTick(Oe,this);return}if(t&&this.once("close",t),this._state!==ws)if(this._state=ws,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(Oe,this):process.nextTick(Oe,this);else{let r=this._server;this._removeListeners(),this._removeListeners=this._server=null,r.close(()=>{Oe(this)})}}shouldHandle(t){if(this.options.path){let r=t.url.indexOf("?");if((r!==-1?t.url.slice(0,r):t.url)!==this.options.path)return!1}return!0}handleUpgrade(t,r,s,n){r.on("error",xs);let i=t.headers["sec-websocket-key"],a=+t.headers["sec-websocket-version"];if(t.method!=="GET"){J(this,t,r,405,"Invalid HTTP method");return}if(t.headers.upgrade.toLowerCase()!=="websocket"){J(this,t,r,400,"Invalid Upgrade header");return}if(!i||!ko.test(i)){J(this,t,r,400,"Missing or invalid Sec-WebSocket-Key header");return}if(a!==8&&a!==13){J(this,t,r,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(t)){Ce(r,400);return}let o=t.headers["sec-websocket-protocol"],u=new Set;if(o!==void 0)try{u=wo.parse(o)}catch{J(this,t,r,400,"Invalid Sec-WebSocket-Protocol header");return}let l=t.headers["sec-websocket-extensions"],f={};if(this.options.perMessageDeflate&&l!==void 0){let c=new Z(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let m=ys.parse(l);m[Z.extensionName]&&(c.accept(m[Z.extensionName]),f[Z.extensionName]=c)}catch{J(this,t,r,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let c={origin:t.headers[`${a===8?"sec-websocket-origin":"origin"}`],secure:!!(t.socket.authorized||t.socket.encrypted),req:t};if(this.options.verifyClient.length===2){this.options.verifyClient(c,(m,_,v,p)=>{if(!m)return Ce(r,_||401,v,p);this.completeUpgrade(f,i,u,t,r,s,n)});return}if(!this.options.verifyClient(c))return Ce(r,401)}this.completeUpgrade(f,i,u,t,r,s,n)}completeUpgrade(t,r,s,n,i,a,o){if(!i.readable||!i.writable)return i.destroy();if(i[Eo])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>_s)return Ce(i,503);let l=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${_o("sha1").update(r+So).digest("base64")}`],f=new this.options.WebSocket(null,void 0,this.options);if(s.size){let c=this.options.handleProtocols?this.options.handleProtocols(s,n):s.values().next().value;c&&(l.push(`Sec-WebSocket-Protocol: ${c}`),f._protocol=c)}if(t[Z.extensionName]){let c=t[Z.extensionName].params,m=ys.format({[Z.extensionName]:[c]});l.push(`Sec-WebSocket-Extensions: ${m}`),f._extensions=t}this.emit("headers",l,n),i.write(l.concat(`\r
17
10
  `).join(`\r
18
- `)),a.removeListener("error",Fn),c.setSocket(a,n,{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(yt,this)})),o(c,r)}};jn.exports=Sr;function ch(i,t){for(let e of Object.keys(t))i.on(e,t[e]);return function(){for(let s of Object.keys(t))i.removeListener(s,t[s])}}function yt(i){i._state=Rn,i.emit("close")}function Fn(){this.destroy()}function xt(i,t,e,s){e=e||is.STATUS_CODES[t],s={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(e),...s},i.once("finish",i.destroy),i.end(`HTTP/1.1 ${t} ${is.STATUS_CODES[t]}\r
19
- `+Object.keys(s).map(r=>`${r}: ${s[r]}`).join(`\r
11
+ `)),i.removeListener("error",xs),f.setSocket(i,a,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(f),f.on("close",()=>{this.clients.delete(f),this._shouldEmitClose&&!this.clients.size&&process.nextTick(Oe,this)})),o(f,n)}};Es.exports=Ut;function Oo(e,t){for(let r of Object.keys(t))e.on(r,t[r]);return function(){for(let s of Object.keys(t))e.removeListener(s,t[s])}}function Oe(e){e._state=Ss,e.emit("close")}function xs(){this.destroy()}function Ce(e,t,r,s){r=r||nt.STATUS_CODES[t],s={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(r),...s},e.once("finish",e.destroy),e.end(`HTTP/1.1 ${t} ${nt.STATUS_CODES[t]}\r
12
+ `+Object.keys(s).map(n=>`${n}: ${s[n]}`).join(`\r
20
13
  `)+`\r
21
14
  \r
22
- `+e)}function Ae(i,t,e,s,r){if(i.listenerCount("wsClientError")){let a=new Error(r);Error.captureStackTrace(a,Ae),i.emit("wsClientError",a,e,t)}else xt(e,s,r)}});var Vn=A((Ap,Wn)=>{"use strict";function dh(i){return i>=55296&&i<=56319}function mh(i){return i>=56320&&i<=57343}Wn.exports=function(t,e,s){if(typeof e!="string")throw new Error("Input must be string");for(var r=e.length,a=0,n,o,u=0;u<r;u+=1){if(n=e.charCodeAt(u),o=e[u],dh(n)&&mh(e.charCodeAt(u+1))&&(u+=1,o+=e[u]),a+=t(o),a===s)return e.slice(0,u+1);if(a>s)return e.slice(0,u-o.length+1)}return e}});var Hn=A((Ep,zn)=>{"use strict";var yh=Vn(),xh=Buffer.byteLength.bind(Buffer);zn.exports=yh.bind(null,xh)});var Xn=A((Cp,Gn)=>{"use strict";var gh=Hn(),bh=/[\/\?<>\\:\*\|"]/g,Ph=/[\x00-\x1f\x80-\x9f]/g,vh=/^\.+$/,wh=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,Th=/[\. ]+$/;function Kn(i,t){if(typeof i!="string")throw new Error("Input must be string");var e=i.replace(bh,t).replace(Ph,t).replace(vh,t).replace(wh,t).replace(Th,t);return gh(e,255)}Gn.exports=function(i,t){var e=t&&t.replacement||"",s=Kn(i,e);return e===""?s:Kn(s,"")}});var Sh={};no(Sh,{StackUtils:()=>Jn.default,WebSocket:()=>qn,WebSocketServer:()=>Ar.default,codeFrameColumns:()=>Yn.codeFrameColumns,parse:()=>Qn.parse,sanitize:()=>Zn.default});module.exports=oo(Sh);var Jn=te(Or()),Yn=te(aa()),Qn=te(Ra());var hh=te(qa(),1),ph=te(dr(),1),fh=te(yr(),1),$n=te(Tr(),1),Ar=te(Un(),1);var qn=$n.default;var Zn=te(Xn());0&&(module.exports={StackUtils,WebSocket,WebSocketServer,codeFrameColumns,parse,sanitize});
15
+ `+r)}function J(e,t,r,s,n){if(e.listenerCount("wsClientError")){let i=new Error(n);Error.captureStackTrace(i,J),e.emit("wsClientError",i,r,t)}else Ce(r,s,n)}});var Rs=g((Bu,Ms)=>{"use strict";function To(e){return e>=55296&&e<=56319}function Po(e){return e>=56320&&e<=57343}Ms.exports=function(t,r,s){if(typeof r!="string")throw new Error("Input must be string");for(var n=r.length,i=0,a,o,u=0;u<n;u+=1){if(a=r.charCodeAt(u),o=r[u],To(a)&&Po(r.charCodeAt(u+1))&&(u+=1,o+=r[u]),i+=t(o),i===s)return r.slice(0,u+1);if(i>s)return r.slice(0,u-o.length+1)}return r}});var Ps=g((Iu,Ts)=>{"use strict";var Lo=Rs(),No=Buffer.byteLength.bind(Buffer);Ts.exports=Lo.bind(null,No)});var Bs=g((ju,Ns)=>{"use strict";var Bo=Ps(),Io=/[\/\?<>\\:\*\|"]/g,jo=/[\x00-\x1f\x80-\x9f]/g,Ao=/^\.+$/,Fo=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,$o=/[\. ]+$/;function Ls(e,t){if(typeof e!="string")throw new Error("Input must be string");var r=e.replace(Io,t).replace(jo,t).replace(Ao,t).replace(Fo,t).replace($o,t);return Bo(r,255)}Ns.exports=function(e,t){var r=t&&t.replacement||"",s=Ls(e,r);return r===""?s:Ls(s,"")}});var Wo={};Gs(Wo,{StackUtils:()=>Is.default,WebSocket:()=>Cs,WebSocketServer:()=>Dt.default,codeFrameColumns:()=>js.codeFrameColumns,sanitize:()=>As.default});module.exports=Vs(Wo);var Is=q(Xt()),js=q(En());var Co=q(Mn(),1),Mo=q(Lt(),1),Ro=q(Bt(),1),Os=q(qt(),1),Dt=q(ks(),1);var Cs=Os.default;var As=q(Bs());0&&(module.exports={StackUtils,WebSocket,WebSocketServer,codeFrameColumns,sanitize});