shopify 3.93.2 → 3.94.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/dev-console/extensions/dev-console/assets/index-Bm_GpKQW.js +51 -0
- package/dist/assets/dev-console/index.html +1 -1
- package/dist/assets/hydrogen/starter/CHANGELOG.md +0 -64
- package/dist/assets/hydrogen/starter/app/components/Aside.tsx +2 -4
- package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +3 -6
- package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +23 -117
- package/dist/assets/hydrogen/starter/app/components/Header.tsx +3 -3
- package/dist/assets/hydrogen/starter/app/components/PaginatedResourceSection.tsx +4 -24
- package/dist/assets/hydrogen/starter/app/components/ProductPrice.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/[robots.txt].tsx +53 -14
- package/dist/assets/hydrogen/starter/app/routes/_index.tsx +4 -11
- package/dist/assets/hydrogen/starter/app/routes/account.$.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/account.profile.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/api.$version.[graphql.json].tsx +14 -0
- package/dist/assets/hydrogen/starter/package.json +5 -5
- package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +11 -0
- package/dist/assets/hydrogen/starter/vite.config.ts +1 -1
- package/dist/assets/hydrogen/vite/vite.config.js +1 -1
- package/dist/{chunk-5FCKEHCK.js → chunk-3CRQIN6A.js} +154 -154
- package/dist/{chunk-4VZV4LQX.js → chunk-3TG7H626.js} +66 -66
- package/dist/chunk-52KHWFYF.js +1 -0
- package/dist/{chunk-IG47ZDRU.js → chunk-6OKIHCZG.js} +1 -1
- package/dist/chunk-7FYGRWMW.js +415 -0
- package/dist/{chunk-MX6WWR5F.js → chunk-D24XVLOA.js} +16 -16
- package/dist/chunk-EU23C3Y3.js +3 -0
- package/dist/chunk-FU2Y2M3M.js +5 -0
- package/dist/chunk-JBSYWYIP.js +2 -0
- package/dist/chunk-QYR5VPQA.js +4 -0
- package/dist/{chunk-XVFYDYZA.js → chunk-SVA22NZQ.js} +209 -211
- package/dist/cli/commands/config/autoupgrade/constants.d.ts +5 -0
- package/dist/cli/commands/config/autoupgrade/constants.js +6 -0
- package/dist/cli/commands/config/autoupgrade/off.d.ts +7 -0
- package/dist/cli/commands/config/autoupgrade/off.js +22 -0
- package/dist/cli/commands/config/autoupgrade/on.d.ts +7 -0
- package/dist/cli/commands/config/autoupgrade/on.js +22 -0
- package/dist/cli/commands/config/autoupgrade/status.d.ts +7 -0
- package/dist/cli/commands/config/autoupgrade/status.js +30 -0
- package/dist/cli/commands/docs/generate.d.ts +1 -1
- package/dist/cli/commands/docs/generate.js +6 -3
- package/dist/cli/commands/upgrade.js +3 -1
- package/dist/cli/services/kitchen-sink/static.js +1 -1
- package/dist/configs/all.yml +3 -0
- package/dist/configs/recommended.yml +3 -0
- package/dist/data/filters.json +30 -0
- package/dist/data/objects.json +17 -1
- package/dist/data/setting.json +25 -0
- package/dist/data/shopify_system_translations.json +29 -6
- package/dist/error-handler-YQEGKTYS.js +1 -0
- package/dist/hooks/postrun.js +1 -1
- package/dist/hooks/prerun.js +1 -1
- package/dist/{http-proxy-node16-DSQMBVDI.js → http-proxy-node16-TTURN6MD.js} +1 -1
- package/dist/index.js +1117 -1121
- package/dist/lib-3WHF5XD3.js +1 -0
- package/dist/{local-WHQ3ZS4K.js → local-J5FE2ICC.js} +1 -1
- package/dist/{morph-Q32V442A.js → morph-DQREIZD2.js} +1 -1
- package/dist/node-package-manager-AKAMTDCS.js +1 -0
- package/dist/path-HUAU3YBW.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-GZ7DOSHP.js → ui-65JEOETJ.js} +1 -1
- package/dist/{workerd-LJU6AVMQ.js → workerd-2QD5AUPI.js} +1 -1
- package/oclif.manifest.json +65 -4
- package/package.json +8 -7
- package/dist/assets/dev-console/extensions/dev-console/assets/index-BnXVL6nA.js +0 -78
- package/dist/chunk-4QL77VYJ.js +0 -415
- package/dist/chunk-DDTYWTF2.js +0 -1
- package/dist/chunk-FYQIRCLV.js +0 -5
- package/dist/chunk-NOSKVZWJ.js +0 -2
- package/dist/chunk-QJEBL3WX.js +0 -4
- package/dist/cli/commands/store/auth.d.ts +0 -15
- package/dist/cli/commands/store/auth.js +0 -46
- package/dist/cli/commands/store/execute.d.ts +0 -21
- package/dist/cli/commands/store/execute.js +0 -89
- package/dist/cli/services/store/auth/callback.d.ts +0 -8
- package/dist/cli/services/store/auth/callback.js +0 -140
- package/dist/cli/services/store/auth/config.d.ts +0 -6
- package/dist/cli/services/store/auth/config.js +0 -15
- package/dist/cli/services/store/auth/existing-scopes.d.ts +0 -5
- package/dist/cli/services/store/auth/existing-scopes.js +0 -40
- package/dist/cli/services/store/auth/index.d.ts +0 -18
- package/dist/cli/services/store/auth/index.js +0 -88
- package/dist/cli/services/store/auth/pkce.d.ts +0 -36
- package/dist/cli/services/store/auth/pkce.js +0 -49
- package/dist/cli/services/store/auth/recovery.d.ts +0 -4
- package/dist/cli/services/store/auth/recovery.js +0 -17
- package/dist/cli/services/store/auth/result.d.ts +0 -24
- package/dist/cli/services/store/auth/result.js +0 -39
- package/dist/cli/services/store/auth/scopes.d.ts +0 -4
- package/dist/cli/services/store/auth/scopes.js +0 -53
- package/dist/cli/services/store/auth/session-lifecycle.d.ts +0 -3
- package/dist/cli/services/store/auth/session-lifecycle.js +0 -69
- package/dist/cli/services/store/auth/session-store.d.ts +0 -32
- package/dist/cli/services/store/auth/session-store.js +0 -127
- package/dist/cli/services/store/auth/token-client.d.ts +0 -40
- package/dist/cli/services/store/auth/token-client.js +0 -95
- package/dist/cli/services/store/execute/admin-context.d.ts +0 -11
- package/dist/cli/services/store/execute/admin-context.js +0 -41
- package/dist/cli/services/store/execute/admin-transport.d.ts +0 -6
- package/dist/cli/services/store/execute/admin-transport.js +0 -42
- package/dist/cli/services/store/execute/index.d.ts +0 -13
- package/dist/cli/services/store/execute/index.js +0 -22
- package/dist/cli/services/store/execute/request.d.ts +0 -21
- package/dist/cli/services/store/execute/request.js +0 -88
- package/dist/cli/services/store/execute/result.d.ts +0 -3
- package/dist/cli/services/store/execute/result.js +0 -29
- package/dist/cli/services/store/execute/targets.d.ts +0 -18
- package/dist/cli/services/store/execute/targets.js +0 -21
- package/dist/error-handler-GZ2I7BG5.js +0 -1
- package/dist/lib-GGVLMXY5.js +0 -1
- package/dist/node-package-manager-6XMPTNUI.js +0 -1
- package/dist/path-IT7KPARG.js +0 -1
|
@@ -1,194 +1,194 @@
|
|
|
1
|
-
import{c as
|
|
2
|
-
`,[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(e){return e>=CHAR_0&&e<=CHAR_9}function isHexit(e){return e>=CHAR_A&&e<=CHAR_F||e>=CHAR_a&&e<=CHAR_f||e>=CHAR_0&&e<=CHAR_9}function isBit(e){return e===CHAR_1||e===CHAR_0}function isOctit(e){return e>=CHAR_0&&e<=CHAR_7}function isAlphaNumQuoteHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_APOS||e===CHAR_QUOT||e===CHAR_LOWBAR||e===CHAR_HYPHEN}function isAlphaNumHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_LOWBAR||e===CHAR_HYPHEN}var _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(e,t){return hasOwnProperty.call(e,t)?!0:(t==="__proto__"&&defineProperty(e,"__proto__",descriptor),!1)}var INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(e){return e===null||typeof e!="object"?!1:e[_type]===INLINE_TABLE}var TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(e){return e===null||typeof e!="object"?!1:e[_type]===TABLE}var _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(e){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:e}})}function isInlineList(e){return e===null||typeof e!="object"?!1:e[_type]===INLINE_LIST}var LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(e){return e===null||typeof e!="object"?!1:e[_type]===LIST}var _custom;try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(e){}var _inspect=_custom||"inspect",BoxedBigInt=class{constructor(t){try{this.value=global.BigInt.asIntN(64,t)}catch{this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return this.value===null}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}},INTEGER=Symbol("integer");function Integer(e){let t=Number(e);return Object.is(t,-0)&&(t=0),global.BigInt&&!Number.isSafeInteger(t)?new BoxedBigInt(e):Object.defineProperties(new Number(t),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${e}]`}})}function isInteger(e){return e===null||typeof e!="object"?!1:e[_type]===INTEGER}var FLOAT=Symbol("float");function Float(e){return Object.defineProperties(new Number(e),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${e}]`}})}function isFloat(e){return e===null||typeof e!="object"?!1:e[_type]===FLOAT}function tomlType(e){let t=typeof e;if(t==="object"){if(e===null)return"null";if(e instanceof Date)return"datetime";if(_type in e)switch(e[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return t}function makeParserClass(e){class t extends e{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===e.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===e.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===e.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(i){let n=this.ctx,o=i.key.pop();for(let s of i.key){if(hasKey(n,s)&&(!isTable(n[s])||n[s][_declared]))throw this.error(new TomlError("Can't redefine existing key"));n=n[s]=n[s]||Table()}if(hasKey(n,o))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(i.value)||isFloat(i.value)?n[o]=i.value.valueOf():n[o]=i.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(i){return this.state.resultTable?this.state.resultTable.push(i):this.state.resultTable=[i],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){if(this.char===CHAR_PERIOD)return this.next(this.parseAssignKeywordPostDot);if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.goto(this.parseAssignEqual)}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(i){return this.returnNow({key:this.state.resultTable,value:i})}parseComment(){do if(this.char===e.END||this.char===CTRL_J)return this.return();while(this.nextChar())}parseTableOrList(){if(this.char===CHAR_LSQB)this.next(this.parseList);else return this.goto(this.parseTable)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(i){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,i)&&(!isTable(this.ctx[i])||this.ctx[i][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[i]=this.ctx[i]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,i))this.ctx=this.ctx[i]=Table();else if(isTable(this.ctx[i]))this.ctx=this.ctx[i];else if(isList(this.ctx[i]))this.ctx=this.ctx[i][this.ctx[i].length-1];else throw this.error(new TomlError("Can't redefine existing key"));return this.next(this.parseTableNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(i){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,i)||(this.ctx[i]=List()),isInlineList(this.ctx[i]))throw this.error(new TomlError("Can't extend an inline array"));if(isList(this.ctx[i])){let n=Table();this.ctx[i].push(n),this.ctx=n}else throw this.error(new TomlError("Can't redefine an existing key"));return this.next(this.parseListEnd)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,i))this.ctx=this.ctx[i]=Table();else{if(isInlineList(this.ctx[i]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[i]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[i]))this.ctx=this.ctx[i][this.ctx[i].length-1];else if(isTable(this.ctx[i]))this.ctx=this.ctx[i];else throw this.error(new TomlError("Can't redefine an existing key"))}return this.next(this.parseListNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(i){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===e.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(i){return this.returnNow(i)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return this.state.buf==="-"?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===e.END)throw this.error(new TomlError("Key ended without value"));if(isAlphaNumHyphen(this.char))this.consume();else{if(this.state.buf.length===0)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(i){return this.state.buf+=i,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let i="\\u00";return this.char<16&&(i+="0"),i+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${i} instead`))}recordMultiEscapeReplacement(i){return this.state.buf+=i,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(i){try{let n=parseInt(i,16);if(n>=SURROGATE_FIRST&&n<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(n))}catch(n){throw this.error(TomlError.wrap(n))}}parseSmallUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=4)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseLargeUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=8)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(isDigit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);{let i=Integer(this.state.buf);if(i.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(i)}}}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberFloat);if(isDigit(this.char))this.consume();else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent);else throw this.error(new TomlError("Unexpected character, expected -, + or digit"))}parseNumberExponent(){if(isDigit(this.char))this.consume();else return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf))}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberInteger);if(isDigit(this.char))this.consume(),this.state.buf.length>4&&this.next(this.parseNumberInteger);else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"))}else{if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(isHexit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let i=Integer(this.state.buf);if(i.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(i)}}}parseIntegerOct(){if(isOctit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let i=Integer(this.state.buf);if(i.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(i)}}}parseIntegerBin(){if(isBit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let i=Integer(this.state.buf);if(i.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(i)}}}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour)}else{if(this.atEndOfWord())return this.returnNow(createDate(this.state.result+"-"+this.state.buf));if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}}parseTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}else throw this.error(new TomlError("Incomplete datetime"))}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}}parseOnlyTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.next(this.parseOnlyTimeFractionMaybe)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char===CHAR_PERIOD)this.state.buf="",this.next(this.parseOnlyTimeFraction);else return this.return(createTime(this.state.result))}parseOnlyTimeFraction(){if(isDigit(this.char))this.consume();else if(this.atEndOfWord()){if(this.state.buf.length===0)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(this.state.buf.length===1)throw this.error(new TomlError("Expected digit in milliseconds"));if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}}parseTimeZoneHour(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseTimeZoneSep(){if(this.char===CHAR_COLON)this.consume(),this.next(this.parseTimeZoneMin);else throw this.error(new TomlError("Unexpected character in datetime, expected colon"))}parseTimeZoneMin(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseBoolean(){if(this.char===CHAR_t)return this.consume(),this.next(this.parseTrue_r);if(this.char===CHAR_f)return this.consume(),this.next(this.parseFalse_a)}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===e.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(i){if(this.state.resultArr){let n=this.state.resultArr[_contentType],o=tomlType(i);if(n!==o)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${n} and ${o}`))}else this.state.resultArr=InlineList(tomlType(i));return isFloat(i)||isInteger(i)?this.state.resultArr.push(i.valueOf()):this.state.resultArr.push(i),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(i){let n=this.state.resultTable,o=i.key.pop();for(let s of i.key){if(hasKey(n,s)&&(!isTable(n[s])||n[s][_declared]))throw this.error(new TomlError("Can't redefine existing key"));n=n[s]=n[s]||Table()}if(hasKey(n,o))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(i.value)||isFloat(i.value)?n[o]=i.value.valueOf():n[o]=i.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}}return t}});var Ln=w((YN,_h)=>{"use strict";y();_h.exports=rw;function rw(e,t){if(e.pos==null||e.line==null)return e;let r=e.message;if(r+=` at row ${e.line+1}, col ${e.col+1}, pos ${e.pos}:
|
|
1
|
+
import{c as rh,i as ih,o as Iv}from"./chunk-KADPE3PY.js";import{b as Pv}from"./chunk-52KHWFYF.js";import{a as eh,b as th}from"./chunk-6OKIHCZG.js";import{I as An,Na as $l,Qa as ql,X as _l,Z as Sl,_ as Fl,b as Dl,pa as Tl,y as Al,ya as Ml}from"./chunk-3TG7H626.js";import{F as kl,G as Pl,J as Il,R as Jo,V as Nl,X as Rl}from"./chunk-D24XVLOA.js";import{$a as Cn,Ad as Zl,Ba as W,Bc as Gl,Bd as ht,Da as En,Db as Hl,Dc as Lr,Eb as Ul,Ed as K,Fa as bn,Fb as Wl,Ja as zo,Jc as F,Ka as Nr,Lc as Fn,Xc as Vl,Ya as $,_c as Yl,a as gl,ad as Xl,bb as Dn,ca as xl,fa as vl,gc as zl,ha as wl,hc as Jl,ic as V,ja as El,ka as bl,nb as Ol,oc as We,qd as Kl,sc as rt,tb as wv,tc as Mr,uc as we,va as U,wb as _n,wc as Sn,wd as X,xc as ct,xd as Ql,ya as Ir,yc as lt,yd as ie}from"./chunk-7FYGRWMW.js";import{b as Ll,d as Bl,e as Go,f as Rr,g as Cv,h as Vo,i as Dv,j as Av,k as jl,l as Yo,n as Sv,o as Fv,p as Xo,q as Tv,s as Ov,t as kv}from"./chunk-SVA22NZQ.js";import{c as bv,d as ut}from"./chunk-FU2Y2M3M.js";import{c as _v}from"./chunk-QYR5VPQA.js";import{b as Ev}from"./chunk-EENHXSWU.js";import{c as N,e as G,f as Bt,h as me,i as jt,j as wn,m as yl,p as _i}from"./chunk-JBSYWYIP.js";import{a as vv,b as Cl}from"./chunk-T4M5CWAO.js";import{a as S,c as w,e as Ct,g as y}from"./chunk-VPRTJUIN.js";var lh=w((sN,ch)=>{"use strict";y();var nr=class e extends Error{constructor(t,r,i){super("[ParserError] "+t,r,i),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,e)}},On=class{constructor(t){this.parser=t,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}},Fi=class{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new On(this.parseStart)}parse(t){if(t.length===0||t.length==null)return;this._buf=String(t),this.ii=-1,this.char=-1;let r;for(;r===!1||this.nextChar();)r=this.runOne();this._buf=null}nextChar(){return this.char===10&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this.ii<this._buf.length}runOne(){return this.state.parser.call(this,this.state.returned)}finish(){this.char=1114112;let t;do t=this.state.parser,this.runOne();while(this.state.parser!==t);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(t){if(typeof t!="function")throw new nr("Tried to set state to non-existent state: "+JSON.stringify(t));this.state.parser=t}goto(t){return this.next(t),this.runOne()}call(t,r){r&&this.next(r),this.stack.push(this.state),this.state=new On(t)}callNow(t,r){return this.call(t,r),this.runOne()}return(t){if(this.stack.length===0)throw this.error(new nr("Stack underflow"));t===void 0&&(t=this.state.buf),this.state=this.stack.pop(),this.state.returned=t}returnNow(t){return this.return(t),this.runOne()}consume(){if(this.char===1114112)throw this.error(new nr("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii]}error(t){return t.line=this.line,t.col=this.col,t.pos=this.pos,t}parseStart(){throw new nr("Must declare a parseStart method")}};Fi.END=1114112;Fi.Error=nr;ch.exports=Fi});var fh=w((aN,hh)=>{"use strict";y();hh.exports=e=>{let t=new Date(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var kn=w((cN,ph)=>{"use strict";y();ph.exports=(e,t)=>{for(t=String(t);t.length<e;)t="0"+t;return t}});var mh=w((hN,dh)=>{"use strict";y();var jr=kn(),ea=class extends Date{constructor(t){super(t+"Z"),this.isFloating=!0}toISOString(){let t=`${this.getUTCFullYear()}-${jr(2,this.getUTCMonth()+1)}-${jr(2,this.getUTCDate())}`,r=`${jr(2,this.getUTCHours())}:${jr(2,this.getUTCMinutes())}:${jr(2,this.getUTCSeconds())}.${jr(3,this.getUTCMilliseconds())}`;return`${t}T${r}`}};dh.exports=e=>{let t=new ea(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var xh=w((pN,yh)=>{"use strict";y();var gh=kn(),Hv=global.Date,ta=class extends Hv{constructor(t){super(t),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${gh(2,this.getUTCMonth()+1)}-${gh(2,this.getUTCDate())}`}};yh.exports=e=>{let t=new ta(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var wh=w((mN,vh)=>{"use strict";y();var Pn=kn(),ra=class extends Date{constructor(t){super(`0000-01-01T${t}Z`),this.isTime=!0}toISOString(){return`${Pn(2,this.getUTCHours())}:${Pn(2,this.getUTCMinutes())}:${Pn(2,this.getUTCSeconds())}.${Pn(3,this.getUTCMilliseconds())}`}};vh.exports=e=>{let t=new ra(e);if(isNaN(t))throw new TypeError("Invalid Datetime");return t}});var In=w((exports,module)=>{"use strict";y();module.exports=makeParserClass(lh());module.exports.makeParserClass=makeParserClass;var TomlError=class e extends Error{constructor(t){super(t),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,e),this.fromTOML=!0,this.wrapped=null}};TomlError.wrap=e=>{let t=new TomlError(e.message);return t.code=e.code,t.wrapped=e,t};module.exports.TomlError=TomlError;var createDateTime=fh(),createDateTimeFloat=mh(),createDate=xh(),createTime=wh(),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:" ",[CHAR_n]:`
|
|
2
|
+
`,[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(e){return e>=CHAR_0&&e<=CHAR_9}function isHexit(e){return e>=CHAR_A&&e<=CHAR_F||e>=CHAR_a&&e<=CHAR_f||e>=CHAR_0&&e<=CHAR_9}function isBit(e){return e===CHAR_1||e===CHAR_0}function isOctit(e){return e>=CHAR_0&&e<=CHAR_7}function isAlphaNumQuoteHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_APOS||e===CHAR_QUOT||e===CHAR_LOWBAR||e===CHAR_HYPHEN}function isAlphaNumHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_LOWBAR||e===CHAR_HYPHEN}var _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(e,t){return hasOwnProperty.call(e,t)?!0:(t==="__proto__"&&defineProperty(e,"__proto__",descriptor),!1)}var INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(e){return e===null||typeof e!="object"?!1:e[_type]===INLINE_TABLE}var TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(e){return e===null||typeof e!="object"?!1:e[_type]===TABLE}var _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(e){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:e}})}function isInlineList(e){return e===null||typeof e!="object"?!1:e[_type]===INLINE_LIST}var LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(e){return e===null||typeof e!="object"?!1:e[_type]===LIST}var _custom;try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(e){}var _inspect=_custom||"inspect",BoxedBigInt=class{constructor(t){try{this.value=global.BigInt.asIntN(64,t)}catch{this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return this.value===null}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}},INTEGER=Symbol("integer");function Integer(e){let t=Number(e);return Object.is(t,-0)&&(t=0),global.BigInt&&!Number.isSafeInteger(t)?new BoxedBigInt(e):Object.defineProperties(new Number(t),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${e}]`}})}function isInteger(e){return e===null||typeof e!="object"?!1:e[_type]===INTEGER}var FLOAT=Symbol("float");function Float(e){return Object.defineProperties(new Number(e),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${e}]`}})}function isFloat(e){return e===null||typeof e!="object"?!1:e[_type]===FLOAT}function tomlType(e){let t=typeof e;if(t==="object"){if(e===null)return"null";if(e instanceof Date)return"datetime";if(_type in e)switch(e[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return t}function makeParserClass(e){class t extends e{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===e.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===e.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===e.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(i){let n=this.ctx,o=i.key.pop();for(let s of i.key){if(hasKey(n,s)&&(!isTable(n[s])||n[s][_declared]))throw this.error(new TomlError("Can't redefine existing key"));n=n[s]=n[s]||Table()}if(hasKey(n,o))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(i.value)||isFloat(i.value)?n[o]=i.value.valueOf():n[o]=i.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(i){return this.state.resultTable?this.state.resultTable.push(i):this.state.resultTable=[i],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){if(this.char===CHAR_PERIOD)return this.next(this.parseAssignKeywordPostDot);if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.goto(this.parseAssignEqual)}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(i){return this.returnNow({key:this.state.resultTable,value:i})}parseComment(){do if(this.char===e.END||this.char===CTRL_J)return this.return();while(this.nextChar())}parseTableOrList(){if(this.char===CHAR_LSQB)this.next(this.parseList);else return this.goto(this.parseTable)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(i){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,i)&&(!isTable(this.ctx[i])||this.ctx[i][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[i]=this.ctx[i]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,i))this.ctx=this.ctx[i]=Table();else if(isTable(this.ctx[i]))this.ctx=this.ctx[i];else if(isList(this.ctx[i]))this.ctx=this.ctx[i][this.ctx[i].length-1];else throw this.error(new TomlError("Can't redefine existing key"));return this.next(this.parseTableNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(i){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,i)||(this.ctx[i]=List()),isInlineList(this.ctx[i]))throw this.error(new TomlError("Can't extend an inline array"));if(isList(this.ctx[i])){let n=Table();this.ctx[i].push(n),this.ctx=n}else throw this.error(new TomlError("Can't redefine an existing key"));return this.next(this.parseListEnd)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,i))this.ctx=this.ctx[i]=Table();else{if(isInlineList(this.ctx[i]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[i]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[i]))this.ctx=this.ctx[i][this.ctx[i].length-1];else if(isTable(this.ctx[i]))this.ctx=this.ctx[i];else throw this.error(new TomlError("Can't redefine an existing key"))}return this.next(this.parseListNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(i){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===e.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(i){return this.returnNow(i)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return this.state.buf==="-"?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===e.END)throw this.error(new TomlError("Key ended without value"));if(isAlphaNumHyphen(this.char))this.consume();else{if(this.state.buf.length===0)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(i){return this.state.buf+=i,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let i="\\u00";return this.char<16&&(i+="0"),i+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${i} instead`))}recordMultiEscapeReplacement(i){return this.state.buf+=i,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(i){try{let n=parseInt(i,16);if(n>=SURROGATE_FIRST&&n<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(n))}catch(n){throw this.error(TomlError.wrap(n))}}parseSmallUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=4)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseLargeUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=8)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(isDigit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);{let i=Integer(this.state.buf);if(i.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(i)}}}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberFloat);if(isDigit(this.char))this.consume();else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent);else throw this.error(new TomlError("Unexpected character, expected -, + or digit"))}parseNumberExponent(){if(isDigit(this.char))this.consume();else return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf))}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberInteger);if(isDigit(this.char))this.consume(),this.state.buf.length>4&&this.next(this.parseNumberInteger);else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"))}else{if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(isHexit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let i=Integer(this.state.buf);if(i.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(i)}}}parseIntegerOct(){if(isOctit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let i=Integer(this.state.buf);if(i.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(i)}}}parseIntegerBin(){if(isBit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let i=Integer(this.state.buf);if(i.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(i)}}}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour)}else{if(this.atEndOfWord())return this.returnNow(createDate(this.state.result+"-"+this.state.buf));if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}}parseTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}else throw this.error(new TomlError("Incomplete datetime"))}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}}parseOnlyTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.next(this.parseOnlyTimeFractionMaybe)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char===CHAR_PERIOD)this.state.buf="",this.next(this.parseOnlyTimeFraction);else return this.return(createTime(this.state.result))}parseOnlyTimeFraction(){if(isDigit(this.char))this.consume();else if(this.atEndOfWord()){if(this.state.buf.length===0)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(this.state.buf.length===1)throw this.error(new TomlError("Expected digit in milliseconds"));if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}}parseTimeZoneHour(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseTimeZoneSep(){if(this.char===CHAR_COLON)this.consume(),this.next(this.parseTimeZoneMin);else throw this.error(new TomlError("Unexpected character in datetime, expected colon"))}parseTimeZoneMin(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseBoolean(){if(this.char===CHAR_t)return this.consume(),this.next(this.parseTrue_r);if(this.char===CHAR_f)return this.consume(),this.next(this.parseFalse_a)}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===e.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(i){if(this.state.resultArr){let n=this.state.resultArr[_contentType],o=tomlType(i);if(n!==o)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${n} and ${o}`))}else this.state.resultArr=InlineList(tomlType(i));return isFloat(i)||isInteger(i)?this.state.resultArr.push(i.valueOf()):this.state.resultArr.push(i),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(i){let n=this.state.resultTable,o=i.key.pop();for(let s of i.key){if(hasKey(n,s)&&(!isTable(n[s])||n[s][_declared]))throw this.error(new TomlError("Can't redefine existing key"));n=n[s]=n[s]||Table()}if(hasKey(n,o))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(i.value)||isFloat(i.value)?n[o]=i.value.valueOf():n[o]=i.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}}return t}});var Nn=w((xN,Eh)=>{"use strict";y();Eh.exports=Uv;function Uv(e,t){if(e.pos==null||e.line==null)return e;let r=e.message;if(r+=` at row ${e.line+1}, col ${e.col+1}, pos ${e.pos}:
|
|
3
3
|
`,t&&t.split){let i=t.split(/\n/),n=String(Math.min(i.length,e.line+3)).length,o=" ";for(;o.length<n;)o+=" ";for(let s=Math.max(0,e.line-1);s<Math.min(i.length,e.line+2);++s){let u=String(s+1);if(u.length<n&&(u=" "+u),e.line===s){r+=u+"> "+i[s]+`
|
|
4
4
|
`,r+=o+" ";for(let l=0;l<e.col;++l)r+=" ";r+=`^
|
|
5
5
|
`}else r+=u+": "+i[s]+`
|
|
6
6
|
`}}return e.message=r+`
|
|
7
|
-
`,e}});var
|
|
8
|
-
`)}function
|
|
7
|
+
`,e}});var Ch=w((wN,bh)=>{"use strict";y();bh.exports=Jv;var Wv=In(),zv=Nn();function Jv(e){global.Buffer&&global.Buffer.isBuffer(e)&&(e=e.toString("utf8"));let t=new Wv;try{return t.parse(e),t.finish()}catch(r){throw zv(r,e)}}});var _h=w((bN,Ah)=>{"use strict";y();Ah.exports=Vv;var Gv=In(),Dh=Nn();function Vv(e,t){t||(t={});let r=0,i=t.blocksize||40960,n=new Gv;return new Promise((s,u)=>{setImmediate(o,r,i,s,u)});function o(s,u,l,m){if(s>=e.length)try{return l(n.finish())}catch(p){return m(Dh(p,e))}try{n.parse(e.slice(s,s+u)),setImmediate(o,s+u,u,l,m)}catch(p){m(Dh(p,e))}}}});var Th=w((DN,Fh)=>{"use strict";y();Fh.exports=Xv;var Yv=S("stream"),Sh=In();function Xv(e){return e?Kv(e):Qv(e)}function Kv(e){let t=new Sh;return e.setEncoding("utf8"),new Promise((r,i)=>{let n,o=!1,s=!1;function u(){if(o=!0,!n)try{r(t.finish())}catch(p){i(p)}}function l(p){s=!0,i(p)}e.once("end",u),e.once("error",l),m();function m(){n=!0;let p;for(;(p=e.read())!==null;)try{t.parse(p)}catch(f){return l(f)}if(n=!1,o)return u();s||e.once("readable",m)}})}function Qv(){let e=new Sh;return new Yv.Transform({objectMode:!0,transform(t,r,i){try{e.parse(t.toString(r))}catch(n){this.emit("error",n)}i()},flush(t){try{this.push(e.finish())}catch(r){this.emit("error",r)}t()}})}});var Oh=w((_N,Ti)=>{"use strict";y();Ti.exports=Ch();Ti.exports.async=_h();Ti.exports.stream=Th();Ti.exports.prettyError=Nn()});var Bh=w((FN,sa)=>{"use strict";y();sa.exports=Zv;sa.exports.value=na;function Zv(e){if(e===null)throw sr("null");if(e===void 0)throw sr("undefined");if(typeof e!="object")throw sr(typeof e);if(typeof e.toJSON=="function"&&(e=e.toJSON()),e==null)return null;let t=Oe(e);if(t!=="table")throw sr(t);return ia("","",e)}function sr(e){return new Error("Can only stringify objects, not "+e)}function ew(){return new Error("Array values can't have mixed types")}function kh(e){return Object.keys(e).filter(t=>Ph(e[t]))}function tw(e){return Object.keys(e).filter(t=>!Ph(e[t]))}function Rn(e){let t=Array.isArray(e)?[]:Object.prototype.hasOwnProperty.call(e,"__proto__")?{["__proto__"]:void 0}:{};for(let r of Object.keys(e))e[r]&&typeof e[r].toJSON=="function"&&!("toISOString"in e[r])?t[r]=e[r].toJSON():t[r]=e[r];return t}function ia(e,t,r){r=Rn(r);var i,n;i=kh(r),n=tw(r);var o=[],s=t||"";i.forEach(l=>{var m=Oe(r[l]);m!=="undefined"&&m!=="null"&&o.push(s+Mn(l)+" = "+Rh(r[l],!0))}),o.length>0&&o.push("");var u=e&&i.length>0?t+" ":"";return n.forEach(l=>{o.push(fw(e,u,l,r[l]))}),o.join(`
|
|
8
|
+
`)}function Ph(e){switch(Oe(e)){case"undefined":case"null":case"integer":case"nan":case"float":case"boolean":case"string":case"datetime":return!0;case"array":return e.length===0||Oe(e[0])!=="table";case"table":return Object.keys(e).length===0;default:return!1}}function Oe(e){return e===void 0?"undefined":e===null?"null":typeof e=="bigint"||Number.isInteger(e)&&!Object.is(e,-0)?"integer":typeof e=="number"?"float":typeof e=="boolean"?"boolean":typeof e=="string"?"string":"toISOString"in e?isNaN(e)?"undefined":"datetime":Array.isArray(e)?"array":"table"}function Mn(e){var t=String(e);return/^[-A-Za-z0-9_]+$/.test(t)?t:Ih(t)}function Ih(e){return'"'+Nh(e).replace(/"/g,'\\"')+'"'}function rw(e){return"'"+e+"'"}function iw(e,t){for(;t.length<e;)t="0"+t;return t}function Nh(e){return e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/([\u0000-\u001f\u007f])/,t=>"\\u"+iw(4,t.codePointAt(0).toString(16)))}function nw(e){let t=e.split(/\n/).map(r=>Nh(r).replace(/"(?="")/g,'\\"')).join(`
|
|
9
9
|
`);return t.slice(-1)==='"'&&(t+=`\\
|
|
10
10
|
`),`"""
|
|
11
|
-
`+t+'"""'}function
|
|
11
|
+
`+t+'"""'}function Rh(e,t){let r=Oe(e);return r==="string"&&(t&&/\n/.test(e)?r="string-multiline":!/[\b\t\n\f\r']/.test(e)&&/"/.test(e)&&(r="string-literal")),na(e,r)}function na(e,t){switch(t||(t=Oe(e)),t){case"string-multiline":return nw(e);case"string":return Ih(e);case"string-literal":return rw(e);case"integer":return Mh(e);case"float":return sw(e);case"boolean":return ow(e);case"datetime":return aw(e);case"array":return lw(e.filter(r=>Oe(r)!=="null"&&Oe(r)!=="undefined"&&Oe(r)!=="nan"));case"table":return hw(e);default:throw sr(t)}}function Mh(e){return String(e).replace(/\B(?=(\d{3})+(?!\d))/g,"_")}function sw(e){if(e===1/0)return"inf";if(e===-1/0)return"-inf";if(Object.is(e,NaN))return"nan";if(Object.is(e,-0))return"-0.0";var t=String(e).split("."),r=t[0],i=t[1]||0;return Mh(r)+"."+i}function ow(e){return String(e)}function aw(e){return e.toISOString()}function uw(e){return e==="float"||e==="integer"}function cw(e){var t=Oe(e[0]);return e.every(r=>Oe(r)===t)?t:e.every(r=>uw(Oe(r)))?"float":"mixed"}function Lh(e){let t=cw(e);if(t==="mixed")throw ew();return t}function lw(e){e=Rn(e);let t=Lh(e);var r="[",i=e.map(n=>na(n,t));return i.join(", ").length>60||/\n/.test(i)?r+=`
|
|
12
12
|
`+i.join(`,
|
|
13
13
|
`)+`
|
|
14
|
-
`:r+=" "+i.join(", ")+(i.length>0?" ":""),r+"]"}function
|
|
14
|
+
`:r+=" "+i.join(", ")+(i.length>0?" ":""),r+"]"}function hw(e){e=Rn(e);var t=[];return Object.keys(e).forEach(r=>{t.push(Mn(r)+" = "+Rh(e[r],!1))}),"{ "+t.join(", ")+(t.length>0?" ":"")+"}"}function fw(e,t,r,i){var n=Oe(i);if(n==="array")return pw(e,t,r,i);if(n==="table")return dw(e,t,r,i);throw sr(n)}function pw(e,t,r,i){i=Rn(i),Lh(i);var n=Oe(i[0]);if(n!=="table")throw sr(n);var o=e+Mn(r),s="";return i.forEach(u=>{s.length>0&&(s+=`
|
|
15
15
|
`),s+=t+"[["+o+`]]
|
|
16
|
-
`,s+=
|
|
17
|
-
`),o+oa(n+".",t,i)}});var Wh=w(ca=>{"use strict";y();ca.parse=Rh();ca.stringify=Uh()});var Yh=w((fR,Ee)=>{y();var Gh={};Gh.__wbindgen_placeholder__=Ee.exports;var ce,{TextEncoder:Fw,TextDecoder:Tw}=S("util");function la(e){return e==null}var qr=null;function Wn(){return(qr===null||qr.buffer.detached===!0||qr.buffer.detached===void 0&&qr.buffer!==ce.memory.buffer)&&(qr=new DataView(ce.memory.buffer)),qr}var Pi=0,qn=null;function Hn(){return(qn===null||qn.byteLength===0)&&(qn=new Uint8Array(ce.memory.buffer)),qn}var Un=new Fw("utf-8"),Ow=typeof Un.encodeInto=="function"?function(e,t){return Un.encodeInto(e,t)}:function(e,t){let r=Un.encode(e);return t.set(r),{read:e.length,written:r.length}};function ha(e,t,r){if(r===void 0){let u=Un.encode(e),l=t(u.length,1)>>>0;return Hn().subarray(l,l+u.length).set(u),Pi=u.length,l}let i=e.length,n=t(i,1)>>>0,o=Hn(),s=0;for(;s<i;s++){let u=e.charCodeAt(s);if(u>127)break;o[n+s]=u}if(s!==i){s!==0&&(e=e.slice(s)),n=r(n,i,i=s+e.length*3,1)>>>0;let u=Hn().subarray(n+s,n+i),l=Ow(e,u);s+=l.written,n=r(n,i,s,1)>>>0}return Pi=s,n}var Vh=new Tw("utf-8",{ignoreBOM:!0,fatal:!0});Vh.decode();function zn(e,t){return e=e>>>0,Vh.decode(Hn().subarray(e,e+t))}function Xh(e){let t=ce.__wbindgen_export_0.get(e);return ce.__externref_table_dealloc(e),t}Ee.exports.echoToml=function(e){let t,r;try{let o=ha(e,ce.__wbindgen_malloc,ce.__wbindgen_realloc),s=Pi,u=ce.echoToml(o,s);var i=u[0],n=u[1];if(u[3])throw i=0,n=0,Xh(u[2]);return t=i,r=n,zn(i,n)}finally{ce.__wbindgen_free(t,r,1)}};Ee.exports.updateTomlValues=function(e,t){let r,i;try{let s=ha(e,ce.__wbindgen_malloc,ce.__wbindgen_realloc),u=Pi,l=ce.updateTomlValues(s,u,t);var n=l[0],o=l[1];if(l[3])throw n=0,o=0,Xh(l[2]);return r=n,i=o,zn(n,o)}finally{ce.__wbindgen_free(r,i,1)}};Ee.exports.__wbg_from_2a5d3e218e67aa85=function(e){return Array.from(e)};Ee.exports.__wbg_get_b9b93047fe3cf45b=function(e,t){return e[t>>>0]};Ee.exports.__wbg_length_e2d2a49132c1b256=function(e){return e.length};Ee.exports.__wbindgen_boolean_get=function(e){let t=e;return typeof t=="boolean"?t?1:0:2};Ee.exports.__wbindgen_init_externref_table=function(){let e=ce.__wbindgen_export_0,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)};Ee.exports.__wbindgen_is_array=function(e){return Array.isArray(e)};Ee.exports.__wbindgen_is_undefined=function(e){return e===void 0};Ee.exports.__wbindgen_number_get=function(e,t){let r=t,i=typeof r=="number"?r:void 0;Wn().setFloat64(e+8,la(i)?0:i,!0),Wn().setInt32(e+0,!la(i),!0)};Ee.exports.__wbindgen_string_get=function(e,t){let r=t,i=typeof r=="string"?r:void 0;var n=la(i)?0:ha(i,ce.__wbindgen_malloc,ce.__wbindgen_realloc),o=Pi;Wn().setInt32(e+4,o,!0),Wn().setInt32(e+0,n,!0)};Ee.exports.__wbindgen_string_new=function(e,t){return zn(e,t)};Ee.exports.__wbindgen_throw=function(e,t){throw new Error(zn(e,t))};var kw=S("path").join(__dirname,"toml_patch_bg.wasm"),Pw=S("fs").readFileSync(kw),Iw=new WebAssembly.Module(Pw),Nw=new WebAssembly.Instance(Iw,Gh);ce=Nw.exports;Ee.exports.__wasm=ce;ce.__wbindgen_start()});var $t=w(ga=>{"use strict";y();Object.defineProperty(ga,"__esModule",{value:!0});var $w=e=>{process.stdout.write(e)},qw=e=>{process.stderr.write(e)};ga.default={stderr:qw,stdout:$w}});var Dt=w(ke=>{"use strict";y();Object.defineProperty(ke,"__esModule",{value:!0});ke.existsSync=ke.safeReadJson=ke.readJsonSync=ke.readJson=ke.fileExists=ke.dirExists=void 0;var Zh=S("node:fs"),ya=S("node:fs/promises"),Hw=async e=>{let t;try{t=await(0,ya.stat)(e)}catch{throw new Error(`No directory found at ${e}`)}if(!t.isDirectory())throw new Error(`${e} exists but is not a directory`);return e};ke.dirExists=Hw;var Uw=async e=>{let t;try{t=await(0,ya.stat)(e)}catch{throw new Error(`No file found at ${e}`)}if(!t.isFile())throw new Error(`${e} exists but is not a file`);return e};ke.fileExists=Uw;async function ef(e){let t=await(0,ya.readFile)(e,"utf8");return JSON.parse(t)}ke.readJson=ef;function Ww(e,t=!0){let r=(0,Zh.readFileSync)(e,"utf8");return t?JSON.parse(r):r}ke.readJsonSync=Ww;async function zw(e){try{return await ef(e)}catch{}}ke.safeReadJson=zw;function Jw(e){return(0,Zh.existsSync)(e)}ke.existsSync=Jw});var le=w(H=>{"use strict";y();Object.defineProperty(H,"__esModule",{value:!0});H.mergeNestedObjects=H.mapValues=H.uniq=H.isNotFalsy=H.isTruthy=H.capitalize=H.sumBy=H.maxBy=H.isProd=H.castArray=H.sortBy=H.last=H.uniqBy=H.compact=H.pickBy=void 0;function Gw(e,t){return Object.entries(e).reduce((r,[i,n])=>(t(n)&&(r[i]=n),r),{})}H.pickBy=Gw;function Vw(e){return e.filter(t=>!!t)}H.compact=Vw;function Xw(e,t){return e.filter((r,i)=>{let n=t(r);return!e.some((o,s)=>s>i&&t(o)===n)})}H.uniqBy=Xw;function Yw(e){if(e)return e.at(-1)}H.last=Yw;function xa(e,t){if(e=e===void 0?0:e,t=t===void 0?0:t,Array.isArray(e)&&Array.isArray(t)){if(e.length===0&&t.length===0)return 0;let r=xa(e[0],t[0]);return r!==0?r:xa(e.slice(1),t.slice(1))}return e<t?-1:e>t?1:0}function Kw(e,t){return e.sort((r,i)=>xa(t(r),t(i)))}H.sortBy=Kw;function Qw(e){return e===void 0?[]:Array.isArray(e)?e:[e]}H.castArray=Qw;function Zw(){return!["development","test"].includes(process.env.NODE_ENV??"")}H.isProd=Zw;function eE(e,t){if(e.length!==0)return e.reduce((r,i)=>{let n=t(i),o=t(r);return n>o?i:r})}H.maxBy=eE;function tE(e,t){return e.reduce((r,i)=>r+t(i),0)}H.sumBy=tE;function rE(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():""}H.capitalize=rE;function iE(e){return["1","true","y","yes"].includes(e.toLowerCase())}H.isTruthy=iE;function nE(e){return!["0","false","n","no"].includes(e.toLowerCase())}H.isNotFalsy=nE;function sE(e){return[...new Set(e)].sort()}H.uniq=sE;function oE(e,t){return Object.entries(e).reduce((r,[i,n])=>(r[i]=t(n,i),r),{})}H.mapValues=oE;function aE(e,t){return t.split(".").reduce((r,i)=>r?.[i],e)}function uE(e,t){return Object.fromEntries(e.flatMap(r=>Object.entries(aE(r,t)??{})).reverse())}H.mergeNestedObjects=uE});var rf=w(be=>{"use strict";y();Object.defineProperty(be,"__esModule",{value:!0});be.string=be.url=be.file=be.directory=be.integer=be.boolean=be.custom=void 0;var cE=S("node:url"),tf=Dt(),lE=le();function or(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],type:"option"})}be.custom=or;be.boolean=or({parse:async e=>!!e&&(0,lE.isNotFalsy)(e)});be.integer=or({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new Error(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new Error(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new Error(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});be.directory=or({async parse(e,t,r){return r.exists?(0,tf.dirExists)(e):e}});be.file=or({async parse(e,t,r){return r.exists?(0,tf.fileExists)(e):e}});be.url=or({async parse(e){try{return new cE.URL(e)}catch{throw new Error(`Expected a valid url but received: ${e}`)}}});var hE=or({});be.string=hE});var nf=w((VR,fE)=>{fE.exports={name:"@oclif/core",description:"base library for oclif CLIs",version:"3.26.5",author:"Salesforce",bugs:"https://github.com/oclif/core/issues",dependencies:{"@types/cli-progress":"^3.11.5","ansi-escapes":"^4.3.2","ansi-styles":"^4.3.0",cardinal:"^2.1.1",chalk:"^4.1.2","clean-stack":"^3.0.1","cli-progress":"^3.12.0",color:"^4.2.3",debug:"^4.3.4",ejs:"^3.1.10","get-package-type":"^0.1.0",globby:"^11.1.0",hyperlinker:"^1.0.0","indent-string":"^4.0.0","is-wsl":"^2.2.0","js-yaml":"^3.14.1",minimatch:"^9.0.4","natural-orderby":"^2.0.3","object-treeify":"^1.1.33","password-prompt":"^1.1.3","slice-ansi":"^4.0.0","string-width":"^4.2.3","strip-ansi":"^6.0.1","supports-color":"^8.1.1","supports-hyperlinks":"^2.2.0","widest-line":"^3.1.0",wordwrap:"^1.0.0","wrap-ansi":"^7.0.0"},devDependencies:{"@commitlint/config-conventional":"^17.8.1","@oclif/plugin-help":"^6","@oclif/plugin-plugins":"^4","@oclif/prettier-config":"^0.2.1","@oclif/test":"^3.2.11","@types/ansi-styles":"^3.2.1","@types/benchmark":"^2.1.5","@types/chai":"^4.3.11","@types/chai-as-promised":"^7.1.8","@types/clean-stack":"^2.1.1","@types/color":"^3.0.6","@types/debug":"^4.1.10","@types/ejs":"^3.1.5","@types/indent-string":"^4.0.1","@types/js-yaml":"^3.12.7","@types/mocha":"^10.0.6","@types/node":"^18","@types/node-notifier":"^8.0.5","@types/pnpapi":"^0.0.5","@types/slice-ansi":"^4.0.0","@types/strip-ansi":"^5.2.1","@types/supports-color":"^8.1.1","@types/wordwrap":"^1.0.3","@types/wrap-ansi":"^3.0.0",benchmark:"^2.1.4",chai:"^4.4.1","chai-as-promised":"^7.1.1",commitlint:"^17.8.1","cross-env":"^7.0.3",eslint:"^8.57.0","eslint-config-oclif":"^5.1.3","eslint-config-oclif-typescript":"^3.1.6","eslint-config-prettier":"^9.1.0","fancy-test":"^3.0.14",globby:"^11.1.0",husky:"^8","lint-staged":"^14.0.1",madge:"^6.1.0",mocha:"^10.4.0",nyc:"^15.1.0",prettier:"^3.2.5",shx:"^0.3.4",sinon:"^16.1.3","ts-node":"^10.9.2",tsd:"^0.31.0",typescript:"^5"},engines:{node:">=18.0.0"},files:["/lib","/flush.js","/flush.d.ts","/handle.js"],homepage:"https://github.com/oclif/core",keywords:["oclif","cli","command","command line","parser","args","argv"],license:"MIT",main:"./lib/index.js",repository:"oclif/core",oclif:{bin:"oclif",devPlugins:["@oclif/plugin-help","@oclif/plugin-plugins"]},publishConfig:{access:"public"},scripts:{build:"shx rm -rf lib && tsc",commitlint:"commitlint",compile:"tsc",format:'prettier --write "+(src|test)/**/*.+(ts|js|json)"',lint:"eslint . --ext .ts",posttest:"yarn lint && yarn test:circular-deps",prepack:"yarn run build",prepare:"husky install",pretest:"yarn build && tsc -p test --noEmit --skipLibCheck","test:circular-deps":"madge lib/ -c","test:debug":'nyc mocha --debug-brk --inspect "test/**/*.test.ts"',"test:integration":'mocha --forbid-only "test/**/*.integration.ts" --parallel --timeout 1200000',"test:interoperability":"cross-env DEBUG=integration:* ts-node test/integration/interop.ts","test:perf":"ts-node test/perf/parser.perf.ts",test:'nyc mocha --forbid-only "test/**/*.test.ts"'},types:"lib/index.d.ts"}});var it=w(wa=>{"use strict";y();Object.defineProperty(wa,"__esModule",{value:!0});var pE=S("node:fs"),dE=S("node:path"),va=class e extends Map{static instance;constructor(){super(),this.set("@oclif/core",this.getOclifCoreMeta())}static getInstance(){return e.instance||(e.instance=new e),e.instance}get(t){return super.get(t)}getOclifCoreMeta(){try{return{name:"@oclif/core",version:nf().version}}catch{try{return{name:"@oclif/core",version:JSON.parse((0,pE.readFileSync)((0,dE.join)(__dirname,"..","package.json"),"utf8"))}}catch{return{name:"@oclif/core",version:"unknown"}}}}};wa.default=va});var qt=w(Kn=>{"use strict";y();Object.defineProperty(Kn,"__esModule",{value:!0});Kn.settings=void 0;global.oclif||(global.oclif={});Kn.settings=global.oclif});var ar=w(Hr=>{"use strict";y();Object.defineProperty(Hr,"__esModule",{value:!0});Hr.errtermwidth=Hr.stdtermwidth=void 0;var mE=qt();function sf(e){if(!e.isTTY)return 80;let t=e.getWindowSize()[0];return t<1?80:t<40?40:t}var of=Number.parseInt(process.env.OCLIF_COLUMNS,10)||mE.settings.columns;Hr.stdtermwidth=of||sf(process.stdout);Hr.errtermwidth=of||sf(process.stderr)});var Ca=w(Qn=>{"use strict";y();Object.defineProperty(Qn,"__esModule",{value:!0});Qn.Logger=void 0;var af=S("node:fs/promises"),gE=S("node:path"),yE=Mr(),xE=()=>new Date().toISOString(),Ea,vE=e=>new Promise(t=>{Ea&&Ea.unref(),Ea=setTimeout(()=>t(null),e)});function wE(e){return e.endsWith(`
|
|
18
|
-
`)?e.replace(/\n$/,""):e}var
|
|
16
|
+
`,s+=ia(o+".",t,u)}),s}function dw(e,t,r,i){var n=e+Mn(r),o="";return kh(i).length>0&&(o+=t+"["+n+`]
|
|
17
|
+
`),o+ia(n+".",t,i)}});var jh=w(oa=>{"use strict";y();oa.parse=Oh();oa.stringify=Bh()});var zh=w((NN,Ee)=>{y();var Hh={};Hh.__wbindgen_placeholder__=Ee.exports;var ce,{TextEncoder:mw,TextDecoder:gw}=S("util");function aa(e){return e==null}var $r=null;function qn(){return($r===null||$r.buffer.detached===!0||$r.buffer.detached===void 0&&$r.buffer!==ce.memory.buffer)&&($r=new DataView(ce.memory.buffer)),$r}var Oi=0,Bn=null;function jn(){return(Bn===null||Bn.byteLength===0)&&(Bn=new Uint8Array(ce.memory.buffer)),Bn}var $n=new mw("utf-8"),yw=typeof $n.encodeInto=="function"?function(e,t){return $n.encodeInto(e,t)}:function(e,t){let r=$n.encode(e);return t.set(r),{read:e.length,written:r.length}};function ua(e,t,r){if(r===void 0){let u=$n.encode(e),l=t(u.length,1)>>>0;return jn().subarray(l,l+u.length).set(u),Oi=u.length,l}let i=e.length,n=t(i,1)>>>0,o=jn(),s=0;for(;s<i;s++){let u=e.charCodeAt(s);if(u>127)break;o[n+s]=u}if(s!==i){s!==0&&(e=e.slice(s)),n=r(n,i,i=s+e.length*3,1)>>>0;let u=jn().subarray(n+s,n+i),l=yw(e,u);s+=l.written,n=r(n,i,s,1)>>>0}return Oi=s,n}var Uh=new gw("utf-8",{ignoreBOM:!0,fatal:!0});Uh.decode();function Hn(e,t){return e=e>>>0,Uh.decode(jn().subarray(e,e+t))}function Wh(e){let t=ce.__wbindgen_export_0.get(e);return ce.__externref_table_dealloc(e),t}Ee.exports.echoToml=function(e){let t,r;try{let o=ua(e,ce.__wbindgen_malloc,ce.__wbindgen_realloc),s=Oi,u=ce.echoToml(o,s);var i=u[0],n=u[1];if(u[3])throw i=0,n=0,Wh(u[2]);return t=i,r=n,Hn(i,n)}finally{ce.__wbindgen_free(t,r,1)}};Ee.exports.updateTomlValues=function(e,t){let r,i;try{let s=ua(e,ce.__wbindgen_malloc,ce.__wbindgen_realloc),u=Oi,l=ce.updateTomlValues(s,u,t);var n=l[0],o=l[1];if(l[3])throw n=0,o=0,Wh(l[2]);return r=n,i=o,Hn(n,o)}finally{ce.__wbindgen_free(r,i,1)}};Ee.exports.__wbg_from_2a5d3e218e67aa85=function(e){return Array.from(e)};Ee.exports.__wbg_get_b9b93047fe3cf45b=function(e,t){return e[t>>>0]};Ee.exports.__wbg_length_e2d2a49132c1b256=function(e){return e.length};Ee.exports.__wbindgen_boolean_get=function(e){let t=e;return typeof t=="boolean"?t?1:0:2};Ee.exports.__wbindgen_init_externref_table=function(){let e=ce.__wbindgen_export_0,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)};Ee.exports.__wbindgen_is_array=function(e){return Array.isArray(e)};Ee.exports.__wbindgen_is_undefined=function(e){return e===void 0};Ee.exports.__wbindgen_number_get=function(e,t){let r=t,i=typeof r=="number"?r:void 0;qn().setFloat64(e+8,aa(i)?0:i,!0),qn().setInt32(e+0,!aa(i),!0)};Ee.exports.__wbindgen_string_get=function(e,t){let r=t,i=typeof r=="string"?r:void 0;var n=aa(i)?0:ua(i,ce.__wbindgen_malloc,ce.__wbindgen_realloc),o=Oi;qn().setInt32(e+4,o,!0),qn().setInt32(e+0,n,!0)};Ee.exports.__wbindgen_string_new=function(e,t){return Hn(e,t)};Ee.exports.__wbindgen_throw=function(e,t){throw new Error(Hn(e,t))};var xw=S("path").join(__dirname,"toml_patch_bg.wasm"),vw=S("fs").readFileSync(xw),ww=new WebAssembly.Module(vw),Ew=new WebAssembly.Instance(ww,Hh);ce=Ew.exports;Ee.exports.__wasm=ce;ce.__wbindgen_start()});var $t=w(pa=>{"use strict";y();Object.defineProperty(pa,"__esModule",{value:!0});var Sw=e=>{process.stdout.write(e)},Fw=e=>{process.stderr.write(e)};pa.default={stderr:Fw,stdout:Sw}});var Dt=w(ke=>{"use strict";y();Object.defineProperty(ke,"__esModule",{value:!0});ke.existsSync=ke.safeReadJson=ke.readJsonSync=ke.readJson=ke.fileExists=ke.dirExists=void 0;var Vh=S("node:fs"),da=S("node:fs/promises"),Tw=async e=>{let t;try{t=await(0,da.stat)(e)}catch{throw new Error(`No directory found at ${e}`)}if(!t.isDirectory())throw new Error(`${e} exists but is not a directory`);return e};ke.dirExists=Tw;var Ow=async e=>{let t;try{t=await(0,da.stat)(e)}catch{throw new Error(`No file found at ${e}`)}if(!t.isFile())throw new Error(`${e} exists but is not a file`);return e};ke.fileExists=Ow;async function Yh(e){let t=await(0,da.readFile)(e,"utf8");return JSON.parse(t)}ke.readJson=Yh;function kw(e,t=!0){let r=(0,Vh.readFileSync)(e,"utf8");return t?JSON.parse(r):r}ke.readJsonSync=kw;async function Pw(e){try{return await Yh(e)}catch{}}ke.safeReadJson=Pw;function Iw(e){return(0,Vh.existsSync)(e)}ke.existsSync=Iw});var le=w(H=>{"use strict";y();Object.defineProperty(H,"__esModule",{value:!0});H.mergeNestedObjects=H.mapValues=H.uniq=H.isNotFalsy=H.isTruthy=H.capitalize=H.sumBy=H.maxBy=H.isProd=H.castArray=H.sortBy=H.last=H.uniqBy=H.compact=H.pickBy=void 0;function Nw(e,t){return Object.entries(e).reduce((r,[i,n])=>(t(n)&&(r[i]=n),r),{})}H.pickBy=Nw;function Rw(e){return e.filter(t=>!!t)}H.compact=Rw;function Mw(e,t){return e.filter((r,i)=>{let n=t(r);return!e.some((o,s)=>s>i&&t(o)===n)})}H.uniqBy=Mw;function Lw(e){if(e)return e.at(-1)}H.last=Lw;function ma(e,t){if(e=e===void 0?0:e,t=t===void 0?0:t,Array.isArray(e)&&Array.isArray(t)){if(e.length===0&&t.length===0)return 0;let r=ma(e[0],t[0]);return r!==0?r:ma(e.slice(1),t.slice(1))}return e<t?-1:e>t?1:0}function Bw(e,t){return e.sort((r,i)=>ma(t(r),t(i)))}H.sortBy=Bw;function jw(e){return e===void 0?[]:Array.isArray(e)?e:[e]}H.castArray=jw;function $w(){return!["development","test"].includes(process.env.NODE_ENV??"")}H.isProd=$w;function qw(e,t){if(e.length!==0)return e.reduce((r,i)=>{let n=t(i),o=t(r);return n>o?i:r})}H.maxBy=qw;function Hw(e,t){return e.reduce((r,i)=>r+t(i),0)}H.sumBy=Hw;function Uw(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():""}H.capitalize=Uw;function Ww(e){return["1","true","y","yes"].includes(e.toLowerCase())}H.isTruthy=Ww;function zw(e){return!["0","false","n","no"].includes(e.toLowerCase())}H.isNotFalsy=zw;function Jw(e){return[...new Set(e)].sort()}H.uniq=Jw;function Gw(e,t){return Object.entries(e).reduce((r,[i,n])=>(r[i]=t(n,i),r),{})}H.mapValues=Gw;function Vw(e,t){return t.split(".").reduce((r,i)=>r?.[i],e)}function Yw(e,t){return Object.fromEntries(e.flatMap(r=>Object.entries(Vw(r,t)??{})).reverse())}H.mergeNestedObjects=Yw});var Kh=w(be=>{"use strict";y();Object.defineProperty(be,"__esModule",{value:!0});be.string=be.url=be.file=be.directory=be.integer=be.boolean=be.custom=void 0;var Xw=S("node:url"),Xh=Dt(),Kw=le();function or(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],type:"option"})}be.custom=or;be.boolean=or({parse:async e=>!!e&&(0,Kw.isNotFalsy)(e)});be.integer=or({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new Error(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new Error(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new Error(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});be.directory=or({async parse(e,t,r){return r.exists?(0,Xh.dirExists)(e):e}});be.file=or({async parse(e,t,r){return r.exists?(0,Xh.fileExists)(e):e}});be.url=or({async parse(e){try{return new Xw.URL(e)}catch{throw new Error(`Expected a valid url but received: ${e}`)}}});var Qw=or({});be.string=Qw});var Qh=w((gR,Zw)=>{Zw.exports={name:"@oclif/core",description:"base library for oclif CLIs",version:"3.26.5",author:"Salesforce",bugs:"https://github.com/oclif/core/issues",dependencies:{"@types/cli-progress":"^3.11.5","ansi-escapes":"^4.3.2","ansi-styles":"^4.3.0",cardinal:"^2.1.1",chalk:"^4.1.2","clean-stack":"^3.0.1","cli-progress":"^3.12.0",color:"^4.2.3",debug:"^4.3.4",ejs:"^3.1.10","get-package-type":"^0.1.0",globby:"^11.1.0",hyperlinker:"^1.0.0","indent-string":"^4.0.0","is-wsl":"^2.2.0","js-yaml":"^3.14.1",minimatch:"^9.0.4","natural-orderby":"^2.0.3","object-treeify":"^1.1.33","password-prompt":"^1.1.3","slice-ansi":"^4.0.0","string-width":"^4.2.3","strip-ansi":"^6.0.1","supports-color":"^8.1.1","supports-hyperlinks":"^2.2.0","widest-line":"^3.1.0",wordwrap:"^1.0.0","wrap-ansi":"^7.0.0"},devDependencies:{"@commitlint/config-conventional":"^17.8.1","@oclif/plugin-help":"^6","@oclif/plugin-plugins":"^4","@oclif/prettier-config":"^0.2.1","@oclif/test":"^3.2.11","@types/ansi-styles":"^3.2.1","@types/benchmark":"^2.1.5","@types/chai":"^4.3.11","@types/chai-as-promised":"^7.1.8","@types/clean-stack":"^2.1.1","@types/color":"^3.0.6","@types/debug":"^4.1.10","@types/ejs":"^3.1.5","@types/indent-string":"^4.0.1","@types/js-yaml":"^3.12.7","@types/mocha":"^10.0.6","@types/node":"^18","@types/node-notifier":"^8.0.5","@types/pnpapi":"^0.0.5","@types/slice-ansi":"^4.0.0","@types/strip-ansi":"^5.2.1","@types/supports-color":"^8.1.1","@types/wordwrap":"^1.0.3","@types/wrap-ansi":"^3.0.0",benchmark:"^2.1.4",chai:"^4.4.1","chai-as-promised":"^7.1.1",commitlint:"^17.8.1","cross-env":"^7.0.3",eslint:"^8.57.0","eslint-config-oclif":"^5.1.3","eslint-config-oclif-typescript":"^3.1.6","eslint-config-prettier":"^9.1.0","fancy-test":"^3.0.14",globby:"^11.1.0",husky:"^8","lint-staged":"^14.0.1",madge:"^6.1.0",mocha:"^10.4.0",nyc:"^15.1.0",prettier:"^3.2.5",shx:"^0.3.4",sinon:"^16.1.3","ts-node":"^10.9.2",tsd:"^0.31.0",typescript:"^5"},engines:{node:">=18.0.0"},files:["/lib","/flush.js","/flush.d.ts","/handle.js"],homepage:"https://github.com/oclif/core",keywords:["oclif","cli","command","command line","parser","args","argv"],license:"MIT",main:"./lib/index.js",repository:"oclif/core",oclif:{bin:"oclif",devPlugins:["@oclif/plugin-help","@oclif/plugin-plugins"]},publishConfig:{access:"public"},scripts:{build:"shx rm -rf lib && tsc",commitlint:"commitlint",compile:"tsc",format:'prettier --write "+(src|test)/**/*.+(ts|js|json)"',lint:"eslint . --ext .ts",posttest:"yarn lint && yarn test:circular-deps",prepack:"yarn run build",prepare:"husky install",pretest:"yarn build && tsc -p test --noEmit --skipLibCheck","test:circular-deps":"madge lib/ -c","test:debug":'nyc mocha --debug-brk --inspect "test/**/*.test.ts"',"test:integration":'mocha --forbid-only "test/**/*.integration.ts" --parallel --timeout 1200000',"test:interoperability":"cross-env DEBUG=integration:* ts-node test/integration/interop.ts","test:perf":"ts-node test/perf/parser.perf.ts",test:'nyc mocha --forbid-only "test/**/*.test.ts"'},types:"lib/index.d.ts"}});var it=w(ya=>{"use strict";y();Object.defineProperty(ya,"__esModule",{value:!0});var eE=S("node:fs"),tE=S("node:path"),ga=class e extends Map{static instance;constructor(){super(),this.set("@oclif/core",this.getOclifCoreMeta())}static getInstance(){return e.instance||(e.instance=new e),e.instance}get(t){return super.get(t)}getOclifCoreMeta(){try{return{name:"@oclif/core",version:Qh().version}}catch{try{return{name:"@oclif/core",version:JSON.parse((0,eE.readFileSync)((0,tE.join)(__dirname,"..","package.json"),"utf8"))}}catch{return{name:"@oclif/core",version:"unknown"}}}}};ya.default=ga});var qt=w(Vn=>{"use strict";y();Object.defineProperty(Vn,"__esModule",{value:!0});Vn.settings=void 0;global.oclif||(global.oclif={});Vn.settings=global.oclif});var ar=w(qr=>{"use strict";y();Object.defineProperty(qr,"__esModule",{value:!0});qr.errtermwidth=qr.stdtermwidth=void 0;var rE=qt();function Zh(e){if(!e.isTTY)return 80;let t=e.getWindowSize()[0];return t<1?80:t<40?40:t}var ef=Number.parseInt(process.env.OCLIF_COLUMNS,10)||rE.settings.columns;qr.stdtermwidth=ef||Zh(process.stdout);qr.errtermwidth=ef||Zh(process.stderr)});var wa=w(Yn=>{"use strict";y();Object.defineProperty(Yn,"__esModule",{value:!0});Yn.Logger=void 0;var tf=S("node:fs/promises"),iE=S("node:path"),nE=Rr(),sE=()=>new Date().toISOString(),xa,oE=e=>new Promise(t=>{xa&&xa.unref(),xa=setTimeout(()=>t(null),e)});function aE(e){return e.endsWith(`
|
|
18
|
+
`)?e.replace(/\n$/,""):e}var va=class{file;buffer=[];flushing=Promise.resolve();constructor(t){this.file=t}async flush(t=0){await oE(t),this.flushing=this.flushing.then(async()=>{if(this.buffer.length===0)return;let r=this.buffer;this.buffer=[],await(0,tf.mkdir)((0,iE.dirname)(this.file),{recursive:!0}),await(0,tf.appendFile)(this.file,r.join(`
|
|
19
19
|
`)+`
|
|
20
|
-
`)}),await this.flushing}log(t){t=
|
|
21
|
-
`).map(i=>`${
|
|
20
|
+
`)}),await this.flushing}log(t){t=nE(aE(t));let r=t.split(`
|
|
21
|
+
`).map(i=>`${sE()} ${i}`.trimEnd());this.buffer.push(...r),this.flush(50).catch(console.error)}};Yn.Logger=va});var ur=w(Xn=>{"use strict";y();Object.defineProperty(Xn,"__esModule",{value:!0});Xn.config=void 0;var ki=qt(),uE=wa();function cE(){process.listenerCount("warning")>1||process.on("warning",e=>{console.error(e.stack),e.detail&&console.error(e.detail)})}Xn.config={get debug(){return!!ki.settings.debug},set debug(e){ki.settings.debug=e,e&&cE()},get errlog(){return ki.settings.errlog},set errlog(e){e?(this.errorLogger=new uE.Logger(e),ki.settings.errlog=e):(delete this.errorLogger,delete ki.settings.errlog)},errorLogger:void 0}});var cr=w(At=>{"use strict";y();var Ii=At&&At.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(At,"__esModule",{value:!0});At.CLIError=At.addOclifExitCode=void 0;var rf=Ii(We()),lE=Ii(Bl()),Ea=Ii(Go()),hE=Ii(Yo()),fE=Ii(it()),pE=ar(),dE=ur();function nf(e,t){return"oclif"in e||(e.oclif={}),e.oclif.exit=t?.exit===void 0?fE.default.getInstance().get("exitCodes")?.default??2:t.exit,e}At.addOclifExitCode=nf;var Pi=class extends Error{code;oclif={};skipOclifErrorHandling;suggestions;constructor(t,r={}){super(t instanceof Error?t.message:t),nf(this,r),this.code=r.code,this.suggestions=r.suggestions}get bang(){try{return rf.default.red(process.platform==="win32"?"\xBB":"\u203A")}catch{}}get stack(){return(0,lE.default)(super.stack,{pretty:!0})}render(){if(dE.config.debug)return this.stack;let t=`${this.name}: ${this.message}`;return t=(0,hE.default)(t,pE.errtermwidth-6,{hard:!0,trim:!1}),t=(0,Ea.default)(t,3),t=(0,Ea.default)(t,1,{includeEmptyLines:!0,indent:this.bang}),t=(0,Ea.default)(t,1),t}};At.CLIError=Pi;(function(e){class t extends e{constructor(i){super(i instanceof Error?i.message:i),this.name="Warning"}get bang(){try{return rf.default.yellow(process.platform==="win32"?"\xBB":"\u203A")}catch{}}}e.Warn=t})(Pi||(At.CLIError=Pi={}))});var Qn=w(Kn=>{"use strict";y();Object.defineProperty(Kn,"__esModule",{value:!0});Kn.ExitError=void 0;var mE=cr(),ba=class extends mE.CLIError{code="EEXIT";constructor(t=1){super(`EEXIT: ${t}`,{exit:t})}render(){return""}};Kn.ExitError=ba});var es=w(lr=>{"use strict";y();var sf=lr&&lr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(lr,"__esModule",{value:!0});lr.applyPrettyPrintOptions=void 0;var Zn=sf(Go()),gE=sf(Yo()),yE=ar(),xE=ur();function vE(e,t){let r=["message","code","ref","suggestions"];for(let i of r)!(i in e)&&t[i]&&(e[i]=t[i]);return e}lr.applyPrettyPrintOptions=vE;var wE=e=>{let t="Try this:";if(!e||e.length===0)return;if(e.length===1)return`${t} ${e[0]}`;let r=e.map(i=>`* ${i}`).join(`
|
|
22
22
|
`);return`${t}
|
|
23
|
-
${(0,
|
|
24
|
-
`),d=(0,
|
|
25
|
-
`),hf.config.errorLogger&&hf.config.errorLogger.log(r?.stack??"")}else throw r}Be.error=df;Be.default=df});var Fa=w(ns=>{"use strict";y();Object.defineProperty(ns,"__esModule",{value:!0});ns.ModuleLoadError=void 0;var $E=cr(),Sa=class extends $E.CLIError{code="MODULE_NOT_FOUND";constructor(t){super(`[MODULE_NOT_FOUND] ${t}`,{exit:1}),this.name="ModuleLoadError"}};ns.ModuleLoadError=Sa});var gf=w((m2,mf)=>{y();mf.exports=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")}});var vf=w((y2,xf)=>{"use strict";y();var qE=gf(),HE=Array.prototype.concat,UE=Array.prototype.slice,yf=xf.exports=function(t){for(var r=[],i=0,n=t.length;i<n;i++){var o=t[i];qE(o)?r=HE.call(r,UE.call(o)):r.push(o)}return r};yf.wrap=function(e){return function(){return e(yf(arguments))}}});var Cf=w((v2,bf)=>{y();var Mi=Bv(),Li=vf(),wf=Object.hasOwnProperty,Ef=Object.create(null);for(ss in Mi)wf.call(Mi,ss)&&(Ef[Mi[ss]]=ss);var ss,je=bf.exports={to:{},get:{}};je.get=function(e){var t=e.substring(0,3).toLowerCase(),r,i;switch(t){case"hsl":r=je.get.hsl(e),i="hsl";break;case"hwb":r=je.get.hwb(e),i="hwb";break;default:r=je.get.rgb(e),i="rgb";break}return r?{model:i,value:r}:null};je.get.rgb=function(e){if(!e)return null;var t=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,n=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^(\w+)$/,s=[0,0,0,1],u,l,m;if(u=e.match(r)){for(m=u[2],u=u[1],l=0;l<3;l++){var p=l*2;s[l]=parseInt(u.slice(p,p+2),16)}m&&(s[3]=parseInt(m,16)/255)}else if(u=e.match(t)){for(u=u[1],m=u[3],l=0;l<3;l++)s[l]=parseInt(u[l]+u[l],16);m&&(s[3]=parseInt(m+m,16)/255)}else if(u=e.match(i)){for(l=0;l<3;l++)s[l]=parseInt(u[l+1],0);u[4]&&(u[5]?s[3]=parseFloat(u[4])*.01:s[3]=parseFloat(u[4]))}else if(u=e.match(n)){for(l=0;l<3;l++)s[l]=Math.round(parseFloat(u[l+1])*2.55);u[4]&&(u[5]?s[3]=parseFloat(u[4])*.01:s[3]=parseFloat(u[4]))}else return(u=e.match(o))?u[1]==="transparent"?[0,0,0,0]:wf.call(Mi,u[1])?(s=Mi[u[1]],s[3]=1,s):null:null;for(l=0;l<3;l++)s[l]=Ht(s[l],0,255);return s[3]=Ht(s[3],0,1),s};je.get.hsl=function(e){if(!e)return null;var t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,o=Ht(parseFloat(r[2]),0,100),s=Ht(parseFloat(r[3]),0,100),u=Ht(isNaN(i)?1:i,0,1);return[n,o,s,u]}return null};je.get.hwb=function(e){if(!e)return null;var t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,o=Ht(parseFloat(r[2]),0,100),s=Ht(parseFloat(r[3]),0,100),u=Ht(isNaN(i)?1:i,0,1);return[n,o,s,u]}return null};je.to.hex=function(){var e=Li(arguments);return"#"+os(e[0])+os(e[1])+os(e[2])+(e[3]<1?os(Math.round(e[3]*255)):"")};je.to.rgb=function(){var e=Li(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};je.to.rgb.percent=function(){var e=Li(arguments),t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),i=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+r+"%, "+i+"%)":"rgba("+t+"%, "+r+"%, "+i+"%, "+e[3]+")"};je.to.hsl=function(){var e=Li(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};je.to.hwb=function(){var e=Li(arguments),t="";return e.length>=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};je.to.keyword=function(e){return Ef[e.slice(0,3)]};function Ht(e,t,r){return Math.min(Math.max(t,e),r)}function os(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}});var _f=w((E2,Af)=>{y();var Ur=Cf(),$e=jv(),Df=["keyword","gray","hex"],Ta={};for(let e of Object.keys($e))Ta[[...$e[e].labels].sort().join("")]=e;var as={};function ge(e,t){if(!(this instanceof ge))return new ge(e,t);if(t&&t in Df&&(t=null),t&&!(t in $e))throw new Error("Unknown model: "+t);let r,i;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof ge)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){let n=Ur.get(e);if(n===null)throw new Error("Unable to parse color from string: "+e);this.model=n.model,i=$e[this.model].channels,this.color=n.value.slice(0,i),this.valpha=typeof n.value[i]=="number"?n.value[i]:1}else if(e.length>0){this.model=t||"rgb",i=$e[this.model].channels;let n=Array.prototype.slice.call(e,0,i);this.color=Oa(n,i),this.valpha=typeof e[i]=="number"?e[i]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let n=Object.keys(e);"alpha"in e&&(n.splice(n.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);let o=n.sort().join("");if(!(o in Ta))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=Ta[o];let{labels:s}=$e[this.model],u=[];for(r=0;r<s.length;r++)u.push(e[s[r]]);this.color=Oa(u)}if(as[this.model])for(i=$e[this.model].channels,r=0;r<i;r++){let n=as[this.model][r];n&&(this.color[r]=n(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}ge.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in Ur.to?this:this.rgb();t=t.round(typeof e=="number"?e:1);let r=t.valpha===1?t.color:[...t.color,this.valpha];return Ur.to[t.model](r)},percentString(e){let t=this.rgb().round(typeof e=="number"?e:1),r=t.valpha===1?t.color:[...t.color,this.valpha];return Ur.to.rgb.percent(r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=$e[this.model],{labels:r}=$e[this.model];for(let i=0;i<t;i++)e[r[i]]=this.color[i];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new ge([...this.color.map(zE(e)),this.valpha],this.model)},alpha(e){return e!==void 0?new ge([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:Q("rgb",0,he(255)),green:Q("rgb",1,he(255)),blue:Q("rgb",2,he(255)),hue:Q(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:Q("hsl",1,he(100)),lightness:Q("hsl",2,he(100)),saturationv:Q("hsv",1,he(100)),value:Q("hsv",2,he(100)),chroma:Q("hcg",1,he(100)),gray:Q("hcg",2,he(100)),white:Q("hwb",1,he(100)),wblack:Q("hwb",2,he(100)),cyan:Q("cmyk",0,he(100)),magenta:Q("cmyk",1,he(100)),yellow:Q("cmyk",2,he(100)),black:Q("cmyk",3,he(100)),x:Q("xyz",0,he(95.047)),y:Q("xyz",1,he(100)),z:Q("xyz",2,he(108.833)),l:Q("lab",0,he(100)),a:Q("lab",1),b:Q("lab",2),keyword(e){return e!==void 0?new ge(e):$e[this.model].keyword(this.color)},hex(e){return e!==void 0?new ge(e):Ur.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new ge(e);let t=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),Ur.to.hex(t)+r},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,t=[];for(let[r,i]of e.entries()){let n=i/255;t[r]=n<=.04045?n/12.92:((n+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){let t=this.luminosity(),r=e.luminosity();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level(e){let t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return ge.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),r=t.color[0];return r=(r+e)%360,r=r<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);let r=e.rgb(),i=this.rgb(),n=t===void 0?.5:t,o=2*n-1,s=r.alpha()-i.alpha(),u=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,l=1-u;return ge.rgb(u*r.red()+l*i.red(),u*r.green()+l*i.green(),u*r.blue()+l*i.blue(),r.alpha()*n+i.alpha()*(1-n))}};for(let e of Object.keys($e)){if(Df.includes(e))continue;let{channels:t}=$e[e];ge.prototype[e]=function(...r){return this.model===e?new ge(this):r.length>0?new ge(r,e):new ge([...JE($e[this.model][e].raw(this.color)),this.valpha],e)},ge[e]=function(...r){let i=r[0];return typeof i=="number"&&(i=Oa(r,t)),new ge(i,e)}}function WE(e,t){return Number(e.toFixed(t))}function zE(e){return function(t){return WE(t,e)}}function Q(e,t,r){e=Array.isArray(e)?e:[e];for(let i of e)(as[i]||(as[i]=[]))[t]=r;return e=e[0],function(i){let n;return i!==void 0?(r&&(i=r(i)),n=this[e](),n.color[t]=i,n):(n=this[e]().color[t],r&&(n=r(n)),n)}}function he(e){return function(t){return Math.max(0,Math.min(e,t))}}function JE(e){return Array.isArray(e)?e:[e]}function Oa(e,t){for(let r=0;r<t;r++)typeof e[r]!="number"&&(e[r]=0);return e}Af.exports=ge});var Sf=w(Wr=>{"use strict";y();Object.defineProperty(Wr,"__esModule",{value:!0});Wr.THEME_KEYS=Wr.STANDARD_CHALK=void 0;Wr.STANDARD_CHALK=["white","black","blue","yellow","green","red","magenta","cyan","gray","blackBright","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite","bgGray","bgBlackBright","bgRedBright","bgGreenBright","bgYellowBright","bgBlueBright","bgMagentaBright","bgCyanBright","bgWhiteBright","bold","underline","dim","italic","strikethrough"];Wr.THEME_KEYS=["alias","bin","command","commandSummary","dollarSign","flag","flagDefaultValue","flagOptions","flagRequired","flagSeparator","sectionDescription","sectionHeader","topic","version"]});var hr=w(Ce=>{"use strict";y();var GE=Ce&&Ce.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),VE=Ce&&Ce.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),XE=Ce&&Ce.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&GE(t,e,r);return VE(t,e),t},YE=Ce&&Ce.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ce,"__esModule",{value:!0});Ce.getColor=Ce.parseTheme=Ce.colorize=void 0;var Ff=YE(We()),KE=XE(_f()),QE=Sf();function Tf(e){return QE.STANDARD_CHALK.includes(e)}function ZE(e,t){return Tf(e)?Ff.default[e](t):e?Ff.default.hex(e)(t):t}Ce.colorize=ZE;function eb(e){return Object.fromEntries(Object.entries(e).map(([t,r])=>[t,Of(r)]).filter(([t,r])=>r))}Ce.parseTheme=eb;function Of(e){try{return Tf(e)?e:new KE.default(e).hex()}catch{}}Ce.getColor=Of});var us=w(_t=>{"use strict";y();var Nf=_t&&_t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_t,"__esModule",{value:!0});_t.memoizedWarn=_t.warn=void 0;var tb=Nf($t()),kf=ur(),Pf=cr(),rb=Nf(is());function ka(e){let t;if(typeof e=="string")t=new Pf.CLIError.Warn(e);else if(e instanceof Error)t=(0,Pf.addOclifExitCode)(e);else throw new TypeError("first argument must be a string or instance of Error");let r=(0,rb.default)(t);r&&tb.default.stderr(r+`
|
|
26
|
-
`),kf.config.errorLogger&&kf.config.errorLogger.log(t?.stack??"")}_t.warn=ka;var If=new Set;function ib(e){If.has(e)||ka(e),If.add(e)}_t.memoizedWarn=ib;_t.default=ka});var $f=w(zr=>{"use strict";y();var nb=zr&&zr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zr,"__esModule",{value:!0});zr.readTSConfig=void 0;var sb=nb(ut()),Rf=S("node:fs/promises"),Bf=S("node:path"),ob=us(),Mf=le(),ab=(0,sb.default)("read-tsconfig");function Lf(e,t){try{return S.resolve(t,{paths:[e]})}catch{}}async function jf(e,t){let r;try{r=await t(e)}catch{r=!1}if(r)return e;let i=(0,Bf.dirname)(e);if(i!==e)return jf(i,t)}async function ub(e,t="tsconfig.json"){let r=[],i;try{i=qv()}catch{try{i=S(e+"/node_modules/typescript")}catch{}}if(!i){(0,ob.memoizedWarn)("Could not find typescript. Please ensure that typescript is a devDependency. Falling back to compiled source.");return}let n=async o=>{let s=await jf(o,async u=>(await(0,Rf.readdir)(u)).includes("package.json"));if(s)try{let u=await(0,Rf.readFile)(o,"utf8"),l=i?.parseConfigFileTextToJson(o,u).config;if(r.push(l),l.extends){if(l.extends.startsWith(".")){let p=Lf(s,l.extends);return p?n(p):void 0}let m=Lf(s,l.extends);if(m)return n(m)}return l}catch(u){ab(u)}};return await n((0,Bf.join)(e,t)),{compilerOptions:(0,Mf.mergeNestedObjects)(r,"compilerOptions"),"ts-node":(0,Mf.mergeNestedObjects)(r,"ts-node")}}zr.readTSConfig=ub});var Jr=w(ft=>{"use strict";y();Object.defineProperty(ft,"__esModule",{value:!0});ft.collectUsableIds=ft.getCommandIdPermutations=ft.getPermutations=ft.Debug=void 0;var qf=ut();function cb(){process.listenerCount("warning")>1||process.on("warning",e=>{console.error(e.stack),e.detail&&console.error(e.detail)})}function lb(...e){if(!qf)return(...r)=>{};let t=qf(["config",...e].join(":"));return t.enabled&&cb(),(...r)=>t(...r)}ft.Debug=lb;function Pa(e){if(e.length===0)return[];if(e.length===1)return[e];let t=[],r=Pa(e.slice(1)),i=e[0];for(let n=0,o=r.length;n<o;n++){let s=r[n];for(let u=0,l=s.length;u<=l;u++){let m=s.slice(0,u),p=s.slice(u),f=[...m,i,...p];t.push(f)}}return t}ft.getPermutations=Pa;function hb(e){return Pa(e.split(":")).flatMap(t=>t.join(":"))}ft.getCommandIdPermutations=hb;var fb=e=>new Set(e.flatMap(t=>t.split(":").map((r,i,n)=>n.slice(0,i+1).join(":"))));ft.collectUsableIds=fb});var Gr=w(ze=>{"use strict";y();var pb=ze&&ze.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ze,"__esModule",{value:!0});ze.tsPath=ze.TS_CONFIGS=void 0;var Hf=S("node:fs/promises"),Pe=S("node:path"),db=pb(it()),Bi=us(),Uf=qt(),mb=Dt(),gb=$f(),zf=le(),yb=Jr(),ne=(0,yb.Debug)("ts-path");ze.TS_CONFIGS={};var Wf=new Set;function xb(){return process.execPath.split(Pe.sep).includes("bun")?"bun":process.execArgv.length===0?"node":process.execArgv[0]==="--require"&&process.execArgv[1].split(Pe.sep).includes("ts-node")||process.execArgv[0].split(Pe.sep).includes("ts-node")?"ts-node":process.execArgv[0]==="--require"&&process.execArgv[1].split(Pe.sep).includes("tsx")?"tsx":"node"}var cs=xb();function vb(e){return"code"in e&&e.code==="ENOENT"}async function wb(e){try{if(ze.TS_CONFIGS[e])return ze.TS_CONFIGS[e];let t=await(0,gb.readTSConfig)(e);return t?(ne("tsconfig: %O",t),ze.TS_CONFIGS[e]=t,ze.TS_CONFIGS[e]):void 0}catch(t){if(vb(t))return;ne(`Could not parse tsconfig.json. Skipping typescript path lookup for ${e}.`),(0,Bi.memoizedWarn)(`Could not parse tsconfig.json for ${e}. Falling back to compiled source.`)}}async function Eb(e,t){if(Wf.has(e))return;ne("registering ts-node at",e);let r=S.resolve("ts-node",{paths:[e,__dirname]});ne("ts-node path:",r);let i;try{i=S(r)}catch{ne(`Could not find ts-node at ${r}. Skipping ts-node registration for ${e}.`),(0,Bi.memoizedWarn)(`Could not find ts-node at ${r}. Please ensure that ts-node is a devDependency. Falling back to compiled source.`);return}let n=[(0,Pe.join)(e,"node_modules","@types")],o=[];if(t.compilerOptions.rootDirs)for(let p of t.compilerOptions.rootDirs)o.push((0,Pe.join)(e,p));else t.compilerOptions.rootDir?o.push((0,Pe.join)(e,t.compilerOptions.rootDir)):t.compilerOptions.baseUrl?o.push((0,Pe.join)(e,t.compilerOptions.baseUrl)):o.push((0,Pe.join)(e,"src"));let{baseUrl:s,rootDir:u,...l}=t.compilerOptions,m={compilerOptions:{...l,rootDirs:o,typeRoots:n},...t["ts-node"],cwd:e,esm:t["ts-node"]?.esm??!0,experimentalSpecifierResolution:t["ts-node"]?.experimentalSpecifierResolution??"explicit",scope:!0,scopeDir:e,skipProject:!0,transpileOnly:!0};ne("ts-node options: %O",m),i.register(m),Wf.add(e)}function bb(e,t,r){return(r||e?.moduleType==="commonjs")&&t?.moduleType==="module"}function Cb(e,t,r){if(t?.moduleType!=="module"||r)return!1;let i=Number.parseInt(process.version.replace("v","").split(".")[0],10);return cs==="ts-node"&&i>=20}async function Db(e,t){let r=await wb(e);if(!r)return t;ne(`Determining path for ${t}`),cs==="tsx"||cs==="bun"?ne(`Skipping ts-node registration for ${e} because the runtime is: ${cs}`):await Eb(e,r);let{baseUrl:i,outDir:n,rootDir:o,rootDirs:s}=r.compilerOptions,u=o??(s??[])[0]??i;if(!u)return ne(`no rootDir, rootDirs, or baseUrl specified in tsconfig.json. Returning default path ${t}`),t;if(!n)return ne(`no outDir specified in tsconfig.json. Returning default path ${t}`),t;let l=(0,Pe.join)(e,n),m=(0,Pe.join)(e,u),p=(0,Pe.relative)(l,t),f=(0,Pe.join)(m,p).replace(/\.js$/,"");return ne(`lib dir: ${l}`),ne(`src dir: ${m}`),ne(`src directory to find: ${f}`),(0,mb.existsSync)(f)?(ne(`Found source directory for ${t} at ${f}`),f):(await Promise.all([(0,Hf.access)(`${f}.ts`).then(()=>`${f}.ts`).catch(()=>!1),(0,Hf.access)(`${f}.tsx`).then(()=>`${f}.tsx`).catch(()=>!1)])).some(Boolean)?(ne(`Found source file for ${t} at ${f}`),f):(ne(`No source file found. Returning default path ${t}`),(0,zf.isProd)()||(0,Bi.memoizedWarn)(`Could not find source for ${t} based on tsconfig. Defaulting to compiled source.`),t)}async function Ab(e,t,r){let i=r?.options.isRoot?r:db.default.getInstance().get("rootPlugin");if(!t)return t;t=t.startsWith(e)?t:(0,Pe.join)(e,t);let n=Uf.settings.enableAutoTranspile??Uf.settings.tsnodeEnabled;if(n===!1)return ne(`Skipping typescript path lookup for ${e} because enableAutoTranspile is explicitly set to false`),t;let o=(0,zf.isProd)();if(n===void 0&&o&&r?.type!=="link")return ne(`Skipping typescript path lookup for ${e} because NODE_ENV is NOT "test" or "development"`),t;if(bb(i,r,o))return ne(`Skipping typescript path lookup for ${e} because it's an ESM module (NODE_ENV: ${process.env.NODE_ENV}, root plugin module type: ${i?.moduleType})`),r?.type==="link"&&(0,Bi.memoizedWarn)(`${r?.name} is a linked ESM module and cannot be auto-transpiled. Existing compiled source will be used instead.`),t;if(Cb(e,r,o))return ne(`Skipping typescript path lookup for ${e} because ts-node is run in node version ${process.version}"`),(0,Bi.memoizedWarn)("ts-node executable cannot transpile ESM in Node 20. Existing compiled source will be used instead. See https://github.com/oclif/core/issues/817."),t;try{return await Db(e,t)}catch(s){return ne(s),t}}ze.tsPath=Ab});var ji=w(pt=>{"use strict";y();Object.defineProperty(pt,"__esModule",{value:!0});pt.isPathModule=pt.loadWithDataFromManifest=pt.loadWithData=pt.load=void 0;var _b=S("node:fs"),ls=S("node:path"),Ra=S("node:url"),Jf=Gr(),Ia=Fa(),Vf=Dt(),Sb=Hv(),Fb=[".ts",".js",".mjs",".cjs",".mts",".cts",".tsx",".jsx"],Tb=e=>e.type!==void 0;function Ma(e,t,r){throw e.code==="MODULE_NOT_FOUND"||e.code==="ERR_MODULE_NOT_FOUND"?new Ia.ModuleLoadError(`${t?"import()":"require"} failed to load ${r}: ${e.message}`):e}async function Ob(e,t){let r,i;try{return{filePath:r,isESM:i}=await Xf(e,t),i?await import((0,Ra.pathToFileURL)(r).href):S(r)}catch(n){Ma(n,i,r??t)}}pt.load=Ob;async function kb(e,t){let r,i;try{({filePath:r,isESM:i}=await Xf(e,t));let n=i?await import((0,Ra.pathToFileURL)(r).href):S(r);return{filePath:r,isESM:i,module:n}}catch(n){Ma(n,i,r??t)}}pt.loadWithData=kb;async function Pb(e,t){let{id:r,isESM:i,relativePath:n}=e;if(!n)throw new Ia.ModuleLoadError(`Cached command ${r} does not have a relative path`);if(i===void 0)throw new Ia.ModuleLoadError(`Cached command ${r} does not have the isESM property set`);let o=(0,ls.join)(t,n.join(ls.sep));try{let s=i?await import((0,Ra.pathToFileURL)(o).href):S(o);return{filePath:o,isESM:i,module:s}}catch(s){Ma(s,i,o??t)}}pt.loadWithDataFromManifest=Pb;function Na(e){switch((0,ls.extname)(e).toLowerCase()){case".js":case".jsx":case".ts":case".tsx":return Sb.sync(e)==="module";case".mjs":case".mts":return!0;default:return!1}}pt.isPathModule=Na;async function Xf(e,t){let r,i;try{i=S.resolve(t),r=Na(i)}catch{i=(Tb(e)?await(0,Jf.tsPath)(e.root,t,e):await(0,Jf.tsPath)(e.root,t))??t;let n=!1,o=!1;if((0,Vf.existsSync)(i)){n=!0;try{(0,_b.lstatSync)(i)?.isDirectory?.()&&(n=!1,o=!0)}catch{}}if(!n){let s=Gf(i);!s&&o&&(s=Gf((0,ls.join)(i,"index"))),s&&(i=s)}r=Na(i)}return{filePath:i,isESM:r}}function Gf(e){for(let t of Fb){let r=`${e}${t}`;if((0,Vf.existsSync)(r))return r}return null}});var fs=w(hs=>{"use strict";y();Object.defineProperty(hs,"__esModule",{value:!0});hs.SINGLE_COMMAND_CLI_SYMBOL=void 0;hs.SINGLE_COMMAND_CLI_SYMBOL=Symbol("SINGLE_COMMAND_CLI").toString()});var La=w(ps=>{"use strict";y();Object.defineProperty(ps,"__esModule",{value:!0});ps.cacheDefaultValue=void 0;var Ib=async(e,t)=>{if(!(t&&e.noCacheDefault)){if(typeof e.defaultHelp=="function")try{return await e.defaultHelp({flags:{},options:e})}catch{return}if(typeof e.default=="function")try{return await e.default({flags:{},options:e})}catch{}else return e.default}};ps.cacheDefaultValue=Ib});var Xr=w(Vr=>{"use strict";y();Object.defineProperty(Vr,"__esModule",{value:!0});Vr.toConfiguredId=Vr.toStandardizedId=void 0;function Nb(e,t){return e.replaceAll(new RegExp(t.topicSeparator,"g"),":")}Vr.toStandardizedId=Nb;function Rb(e,t){return e.replaceAll(new RegExp(":","g"),t.topicSeparator||":")}Vr.toConfiguredId=Rb});var ms=w(ds=>{"use strict";y();Object.defineProperty(ds,"__esModule",{value:!0});ds.ensureArgObject=void 0;function Mb(e){return Array.isArray(e)?(e??[]).reduce((t,r)=>({...t,[r.name]:r}),{}):e??{}}ds.ensureArgObject=Mb});var Yf=w(gs=>{"use strict";y();Object.defineProperty(gs,"__esModule",{value:!0});gs.DocOpts=void 0;var Lb=ms(),Ba=class e{cmd;flagList;flagMap;constructor(t){this.cmd=t,this.flagMap={},this.flagList=Object.entries(t.flags||{}).filter(([r,i])=>!i.hidden).map(([r,i])=>(this.flagMap[r]=i,i))}static generate(t){return new e(t).toString()}toString(){let t=["<%= command.id %>"];if(this.cmd.args){let r=this.cmd.strict===!1?"...":"",i=Object.values((0,Lb.ensureArgObject)(this.cmd.args)).map(n=>n.required?`${n.name.toUpperCase()}${r}`:`[${n.name.toUpperCase()}${r}]`)||[];t.push(...i)}try{t.push(...Object.values(this.groupFlagElements()))}catch{t.push(...this.flagList.map(r=>{let i=r.char?`-${r.char}`:`--${r.name}`;return r.type==="boolean"?i:`${i}=<value>`}))}return t.join(" ")}combineElementsToFlag(t,r,i,n){if(!this.flagMap[r])return;let o=this.flagMap[r]?.required;(typeof o!="boolean"||!o)&&(o=i.reduce((s,u)=>s||this.flagMap[u]?.required||!1,!1));for(let s of i)t[r]=`${t[r]||""}${n}${t[s]||""}`,delete t[s],delete this.flagMap[s];t[r]=o?`(${t[r]||""})`:`[${t[r]||""}]`,delete this.flagMap[r]}generateElements(t={},r=[]){let i=[];for(let n of r){let o="",s=n.char?`-${n.char}`:`--${n.name}`;n.type==="option"&&(o=n.options?` ${n.options.join("|")}`:" <value>");let u=`${s}${o}`;t[n.name]=u,i.push(u)}return i}groupFlagElements(){let t={};this.generateElements(t,this.flagList.filter(r=>r.required)),this.generateElements(t,this.flagList.filter(r=>!r.required));for(let r of this.flagList)Array.isArray(r.dependsOn)&&this.combineElementsToFlag(t,r.name,r.dependsOn," "),Array.isArray(r.exclusive)&&this.combineElementsToFlag(t,r.name,r.exclusive," | ");for(let r of Object.keys(this.flagMap)){let i=this.flagMap[r]||{};i.required||(t[i.name]=`[${t[i.name]||""}]`)}return t}};gs.DocOpts=Ba});var Yr=w(oe=>{"use strict";y();var Bb=oe&&oe.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),jb=oe&&oe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),$b=oe&&oe.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Bb(t,e,r);return jb(t,e),t};Object.defineProperty(oe,"__esModule",{value:!0});oe.normalizeArgv=oe.formatCommandDeprecationWarning=oe.formatFlagDeprecationWarning=oe.getHelpFlagAdditions=oe.standardizeIDFromArgv=oe.template=void 0;var qb=$b(Hl()),Hb=Jr(),Ub=Xr();function Wb(e){function t(r){return qb.render(r,e)}return t}oe.template=Wb;var zb=e=>e.startsWith("-"),Jb=e=>e.includes("=");function Gb(e,t){if(e.length===1)return e;let i=(n=>{let o=(0,Hb.collectUsableIds)(t.commandIDs),s=[],u=p=>o.has(p),l=p=>(p?[...s,p]:s).filter(Boolean).join(":"),m=()=>{let p=l();if(!p)return!1;let f=t.findCommand(p);return!!(f&&(f.strict===!1||Object.keys(f.args??{}).length>0))};for(let p of n)if(u(l(p)))s.push(p);else{if(Jb(p)||zb(p)||m())break;s.push(p)}return l()})(e);if(i){let n=e.slice(i.split(":").length);return[i,...n]}return e}function Kf(e,t){return e.length===0||(t.topicSeparator===" "?e=Gb(e,t):t.topicSeparator!==":"&&(e[0]=(0,Ub.toStandardizedId)(e[0],t))),e}oe.standardizeIDFromArgv=Kf;function Vb(e){let t=["--help"],r=e.pjson.oclif.additionalHelpFlags??[];return[...new Set([...t,...r]).values()]}oe.getHelpFlagAdditions=Vb;function Xb(e,t){let r=`The "${e}" flag has been deprecated`;return t===!0?`${r}.`:t.message?t.message:(t.version&&(r+=` and will be removed in version ${t.version}`),r+=t.to?`. Use "${t.to}" instead.`:".",r)}oe.formatFlagDeprecationWarning=Xb;function Yb(e,t){let r=`The "${e}" command has been deprecated`;return t?t.message?t.message:(t.version&&(r+=` and will be removed in version ${t.version}`),r+=t.to?`. Use "${t.to}" instead.`:".",r):`${r}.`}oe.formatCommandDeprecationWarning=Yb;function Kb(e,t=process.argv.slice(2)){return e.topicSeparator!==":"&&!t[0]?.includes(":")&&(t=Kf(t,e)),t}oe.normalizeArgv=Kb});var ys=w(Kr=>{"use strict";y();var Qr=Kr&&Kr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Kr,"__esModule",{value:!0});Kr.HelpFormatter=void 0;var Qb=Qr(We()),Zb=Qr(Yo()),eC=Qr(Ko()),$i=Qr(Mr()),tC=Qr(Uv()),rC=Qr(Qo()),Qf=hr(),iC=ar(),nC=Yr(),ja=class{config;indentSpacing=2;opts;render;constructor(t,r={}){this.config=t,this.opts={maxWidth:iC.stdtermwidth,...r},this.render=(0,nC.template)(this)}indent(t,r=this.indentSpacing){return(0,Zb.default)(t,r)}renderList(t,r){if(t.length===0)return"";let i=()=>{let l="";for(let[m,p]of t)!m&&!p||(m&&(r.stripAnsi&&(m=(0,$i.default)(m)),l+=this.wrap(m.trim(),r.indentation)),p&&(r.stripAnsi&&(p=(0,$i.default)(p)),l+=`
|
|
23
|
+
${(0,Zn.default)(r,2)}`};function EE(e){if(xE.config.debug)return e.stack;let{bang:t,code:r,message:i,name:n,ref:o,suggestions:s}=e,u=i?`${n||"Error"}: ${i}`:void 0,l=r?`Code: ${r}`:void 0,m=wE(s),p=o?`Reference: ${o}`:void 0,f=[u,l,m,p].filter(Boolean).join(`
|
|
24
|
+
`),d=(0,gE.default)(f,yE.errtermwidth-6,{hard:!0,trim:!1});return d=(0,Zn.default)(d,3),d=(0,Zn.default)(d,1,{includeEmptyLines:!0,indent:t||""}),d=(0,Zn.default)(d,1),d}lr.default=EE});var Ca=w(Be=>{"use strict";y();var bE=Be&&Be.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),CE=Be&&Be.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),DE=Be&&Be.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&bE(t,e,r);return CE(t,e),t},AE=Be&&Be.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Be,"__esModule",{value:!0});Be.error=void 0;var _E=AE($t()),of=ur(),af=cr(),uf=DE(es());function cf(e,t={}){let r;if(typeof e=="string")r=new af.CLIError(e,t);else if(e instanceof Error)r=(0,af.addOclifExitCode)(e,t);else throw new TypeError("first argument must be a string or instance of Error");if(r=(0,uf.applyPrettyPrintOptions)(r,t),t.exit===!1){let i=(0,uf.default)(r);i&&_E.default.stderr(i+`
|
|
25
|
+
`),of.config.errorLogger&&of.config.errorLogger.log(r?.stack??"")}else throw r}Be.error=cf;Be.default=cf});var Aa=w(ts=>{"use strict";y();Object.defineProperty(ts,"__esModule",{value:!0});ts.ModuleLoadError=void 0;var SE=cr(),Da=class extends SE.CLIError{code="MODULE_NOT_FOUND";constructor(t){super(`[MODULE_NOT_FOUND] ${t}`,{exit:1}),this.name="ModuleLoadError"}};ts.ModuleLoadError=Da});var hf=w((LR,lf)=>{y();lf.exports=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")}});var df=w((jR,pf)=>{"use strict";y();var FE=hf(),TE=Array.prototype.concat,OE=Array.prototype.slice,ff=pf.exports=function(t){for(var r=[],i=0,n=t.length;i<n;i++){var o=t[i];FE(o)?r=TE.call(r,OE.call(o)):r.push(o)}return r};ff.wrap=function(e){return function(){return e(ff(arguments))}}});var xf=w((qR,yf)=>{y();var Ni=Dv(),Ri=df(),mf=Object.hasOwnProperty,gf=Object.create(null);for(rs in Ni)mf.call(Ni,rs)&&(gf[Ni[rs]]=rs);var rs,je=yf.exports={to:{},get:{}};je.get=function(e){var t=e.substring(0,3).toLowerCase(),r,i;switch(t){case"hsl":r=je.get.hsl(e),i="hsl";break;case"hwb":r=je.get.hwb(e),i="hwb";break;default:r=je.get.rgb(e),i="rgb";break}return r?{model:i,value:r}:null};je.get.rgb=function(e){if(!e)return null;var t=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,n=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^(\w+)$/,s=[0,0,0,1],u,l,m;if(u=e.match(r)){for(m=u[2],u=u[1],l=0;l<3;l++){var p=l*2;s[l]=parseInt(u.slice(p,p+2),16)}m&&(s[3]=parseInt(m,16)/255)}else if(u=e.match(t)){for(u=u[1],m=u[3],l=0;l<3;l++)s[l]=parseInt(u[l]+u[l],16);m&&(s[3]=parseInt(m+m,16)/255)}else if(u=e.match(i)){for(l=0;l<3;l++)s[l]=parseInt(u[l+1],0);u[4]&&(u[5]?s[3]=parseFloat(u[4])*.01:s[3]=parseFloat(u[4]))}else if(u=e.match(n)){for(l=0;l<3;l++)s[l]=Math.round(parseFloat(u[l+1])*2.55);u[4]&&(u[5]?s[3]=parseFloat(u[4])*.01:s[3]=parseFloat(u[4]))}else return(u=e.match(o))?u[1]==="transparent"?[0,0,0,0]:mf.call(Ni,u[1])?(s=Ni[u[1]],s[3]=1,s):null:null;for(l=0;l<3;l++)s[l]=Ht(s[l],0,255);return s[3]=Ht(s[3],0,1),s};je.get.hsl=function(e){if(!e)return null;var t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,o=Ht(parseFloat(r[2]),0,100),s=Ht(parseFloat(r[3]),0,100),u=Ht(isNaN(i)?1:i,0,1);return[n,o,s,u]}return null};je.get.hwb=function(e){if(!e)return null;var t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,o=Ht(parseFloat(r[2]),0,100),s=Ht(parseFloat(r[3]),0,100),u=Ht(isNaN(i)?1:i,0,1);return[n,o,s,u]}return null};je.to.hex=function(){var e=Ri(arguments);return"#"+is(e[0])+is(e[1])+is(e[2])+(e[3]<1?is(Math.round(e[3]*255)):"")};je.to.rgb=function(){var e=Ri(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};je.to.rgb.percent=function(){var e=Ri(arguments),t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),i=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+r+"%, "+i+"%)":"rgba("+t+"%, "+r+"%, "+i+"%, "+e[3]+")"};je.to.hsl=function(){var e=Ri(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};je.to.hwb=function(){var e=Ri(arguments),t="";return e.length>=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};je.to.keyword=function(e){return gf[e.slice(0,3)]};function Ht(e,t,r){return Math.min(Math.max(t,e),r)}function is(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}});var Ef=w((UR,wf)=>{y();var Hr=xf(),$e=Av(),vf=["keyword","gray","hex"],_a={};for(let e of Object.keys($e))_a[[...$e[e].labels].sort().join("")]=e;var ns={};function ge(e,t){if(!(this instanceof ge))return new ge(e,t);if(t&&t in vf&&(t=null),t&&!(t in $e))throw new Error("Unknown model: "+t);let r,i;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof ge)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){let n=Hr.get(e);if(n===null)throw new Error("Unable to parse color from string: "+e);this.model=n.model,i=$e[this.model].channels,this.color=n.value.slice(0,i),this.valpha=typeof n.value[i]=="number"?n.value[i]:1}else if(e.length>0){this.model=t||"rgb",i=$e[this.model].channels;let n=Array.prototype.slice.call(e,0,i);this.color=Sa(n,i),this.valpha=typeof e[i]=="number"?e[i]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let n=Object.keys(e);"alpha"in e&&(n.splice(n.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);let o=n.sort().join("");if(!(o in _a))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=_a[o];let{labels:s}=$e[this.model],u=[];for(r=0;r<s.length;r++)u.push(e[s[r]]);this.color=Sa(u)}if(ns[this.model])for(i=$e[this.model].channels,r=0;r<i;r++){let n=ns[this.model][r];n&&(this.color[r]=n(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}ge.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in Hr.to?this:this.rgb();t=t.round(typeof e=="number"?e:1);let r=t.valpha===1?t.color:[...t.color,this.valpha];return Hr.to[t.model](r)},percentString(e){let t=this.rgb().round(typeof e=="number"?e:1),r=t.valpha===1?t.color:[...t.color,this.valpha];return Hr.to.rgb.percent(r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=$e[this.model],{labels:r}=$e[this.model];for(let i=0;i<t;i++)e[r[i]]=this.color[i];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new ge([...this.color.map(PE(e)),this.valpha],this.model)},alpha(e){return e!==void 0?new ge([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:Q("rgb",0,he(255)),green:Q("rgb",1,he(255)),blue:Q("rgb",2,he(255)),hue:Q(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:Q("hsl",1,he(100)),lightness:Q("hsl",2,he(100)),saturationv:Q("hsv",1,he(100)),value:Q("hsv",2,he(100)),chroma:Q("hcg",1,he(100)),gray:Q("hcg",2,he(100)),white:Q("hwb",1,he(100)),wblack:Q("hwb",2,he(100)),cyan:Q("cmyk",0,he(100)),magenta:Q("cmyk",1,he(100)),yellow:Q("cmyk",2,he(100)),black:Q("cmyk",3,he(100)),x:Q("xyz",0,he(95.047)),y:Q("xyz",1,he(100)),z:Q("xyz",2,he(108.833)),l:Q("lab",0,he(100)),a:Q("lab",1),b:Q("lab",2),keyword(e){return e!==void 0?new ge(e):$e[this.model].keyword(this.color)},hex(e){return e!==void 0?new ge(e):Hr.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new ge(e);let t=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),Hr.to.hex(t)+r},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,t=[];for(let[r,i]of e.entries()){let n=i/255;t[r]=n<=.04045?n/12.92:((n+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){let t=this.luminosity(),r=e.luminosity();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level(e){let t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return ge.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),r=t.color[0];return r=(r+e)%360,r=r<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);let r=e.rgb(),i=this.rgb(),n=t===void 0?.5:t,o=2*n-1,s=r.alpha()-i.alpha(),u=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,l=1-u;return ge.rgb(u*r.red()+l*i.red(),u*r.green()+l*i.green(),u*r.blue()+l*i.blue(),r.alpha()*n+i.alpha()*(1-n))}};for(let e of Object.keys($e)){if(vf.includes(e))continue;let{channels:t}=$e[e];ge.prototype[e]=function(...r){return this.model===e?new ge(this):r.length>0?new ge(r,e):new ge([...IE($e[this.model][e].raw(this.color)),this.valpha],e)},ge[e]=function(...r){let i=r[0];return typeof i=="number"&&(i=Sa(r,t)),new ge(i,e)}}function kE(e,t){return Number(e.toFixed(t))}function PE(e){return function(t){return kE(t,e)}}function Q(e,t,r){e=Array.isArray(e)?e:[e];for(let i of e)(ns[i]||(ns[i]=[]))[t]=r;return e=e[0],function(i){let n;return i!==void 0?(r&&(i=r(i)),n=this[e](),n.color[t]=i,n):(n=this[e]().color[t],r&&(n=r(n)),n)}}function he(e){return function(t){return Math.max(0,Math.min(e,t))}}function IE(e){return Array.isArray(e)?e:[e]}function Sa(e,t){for(let r=0;r<t;r++)typeof e[r]!="number"&&(e[r]=0);return e}wf.exports=ge});var bf=w(Ur=>{"use strict";y();Object.defineProperty(Ur,"__esModule",{value:!0});Ur.THEME_KEYS=Ur.STANDARD_CHALK=void 0;Ur.STANDARD_CHALK=["white","black","blue","yellow","green","red","magenta","cyan","gray","blackBright","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite","bgGray","bgBlackBright","bgRedBright","bgGreenBright","bgYellowBright","bgBlueBright","bgMagentaBright","bgCyanBright","bgWhiteBright","bold","underline","dim","italic","strikethrough"];Ur.THEME_KEYS=["alias","bin","command","commandSummary","dollarSign","flag","flagDefaultValue","flagOptions","flagRequired","flagSeparator","sectionDescription","sectionHeader","topic","version"]});var hr=w(Ce=>{"use strict";y();var NE=Ce&&Ce.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),RE=Ce&&Ce.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ME=Ce&&Ce.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&NE(t,e,r);return RE(t,e),t},LE=Ce&&Ce.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ce,"__esModule",{value:!0});Ce.getColor=Ce.parseTheme=Ce.colorize=void 0;var Cf=LE(We()),BE=ME(Ef()),jE=bf();function Df(e){return jE.STANDARD_CHALK.includes(e)}function $E(e,t){return Df(e)?Cf.default[e](t):e?Cf.default.hex(e)(t):t}Ce.colorize=$E;function qE(e){return Object.fromEntries(Object.entries(e).map(([t,r])=>[t,Af(r)]).filter(([t,r])=>r))}Ce.parseTheme=qE;function Af(e){try{return Df(e)?e:new BE.default(e).hex()}catch{}}Ce.getColor=Af});var ss=w(_t=>{"use strict";y();var Tf=_t&&_t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_t,"__esModule",{value:!0});_t.memoizedWarn=_t.warn=void 0;var HE=Tf($t()),_f=ur(),Sf=cr(),UE=Tf(es());function Fa(e){let t;if(typeof e=="string")t=new Sf.CLIError.Warn(e);else if(e instanceof Error)t=(0,Sf.addOclifExitCode)(e);else throw new TypeError("first argument must be a string or instance of Error");let r=(0,UE.default)(t);r&&HE.default.stderr(r+`
|
|
26
|
+
`),_f.config.errorLogger&&_f.config.errorLogger.log(t?.stack??"")}_t.warn=Fa;var Ff=new Set;function WE(e){Ff.has(e)||Fa(e),Ff.add(e)}_t.memoizedWarn=WE;_t.default=Fa});var Rf=w(Wr=>{"use strict";y();var zE=Wr&&Wr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Wr,"__esModule",{value:!0});Wr.readTSConfig=void 0;var JE=zE(ut()),Of=S("node:fs/promises"),If=S("node:path"),GE=ss(),kf=le(),VE=(0,JE.default)("read-tsconfig");function Pf(e,t){try{return S.resolve(t,{paths:[e]})}catch{}}async function Nf(e,t){let r;try{r=await t(e)}catch{r=!1}if(r)return e;let i=(0,If.dirname)(e);if(i!==e)return Nf(i,t)}async function YE(e,t="tsconfig.json"){let r=[],i;try{i=Sv()}catch{try{i=S(e+"/node_modules/typescript")}catch{}}if(!i){(0,GE.memoizedWarn)("Could not find typescript. Please ensure that typescript is a devDependency. Falling back to compiled source.");return}let n=async o=>{let s=await Nf(o,async u=>(await(0,Of.readdir)(u)).includes("package.json"));if(s)try{let u=await(0,Of.readFile)(o,"utf8"),l=i?.parseConfigFileTextToJson(o,u).config;if(r.push(l),l.extends){if(l.extends.startsWith(".")){let p=Pf(s,l.extends);return p?n(p):void 0}let m=Pf(s,l.extends);if(m)return n(m)}return l}catch(u){VE(u)}};return await n((0,If.join)(e,t)),{compilerOptions:(0,kf.mergeNestedObjects)(r,"compilerOptions"),"ts-node":(0,kf.mergeNestedObjects)(r,"ts-node")}}Wr.readTSConfig=YE});var zr=w(ft=>{"use strict";y();Object.defineProperty(ft,"__esModule",{value:!0});ft.collectUsableIds=ft.getCommandIdPermutations=ft.getPermutations=ft.Debug=void 0;var Mf=ut();function XE(){process.listenerCount("warning")>1||process.on("warning",e=>{console.error(e.stack),e.detail&&console.error(e.detail)})}function KE(...e){if(!Mf)return(...r)=>{};let t=Mf(["config",...e].join(":"));return t.enabled&&XE(),(...r)=>t(...r)}ft.Debug=KE;function Ta(e){if(e.length===0)return[];if(e.length===1)return[e];let t=[],r=Ta(e.slice(1)),i=e[0];for(let n=0,o=r.length;n<o;n++){let s=r[n];for(let u=0,l=s.length;u<=l;u++){let m=s.slice(0,u),p=s.slice(u),f=[...m,i,...p];t.push(f)}}return t}ft.getPermutations=Ta;function QE(e){return Ta(e.split(":")).flatMap(t=>t.join(":"))}ft.getCommandIdPermutations=QE;var ZE=e=>new Set(e.flatMap(t=>t.split(":").map((r,i,n)=>n.slice(0,i+1).join(":"))));ft.collectUsableIds=ZE});var Jr=w(ze=>{"use strict";y();var eb=ze&&ze.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ze,"__esModule",{value:!0});ze.tsPath=ze.TS_CONFIGS=void 0;var Lf=S("node:fs/promises"),Pe=S("node:path"),tb=eb(it()),Mi=ss(),Bf=qt(),rb=Dt(),ib=Rf(),$f=le(),nb=zr(),ne=(0,nb.Debug)("ts-path");ze.TS_CONFIGS={};var jf=new Set;function sb(){return process.execPath.split(Pe.sep).includes("bun")?"bun":process.execArgv.length===0?"node":process.execArgv[0]==="--require"&&process.execArgv[1].split(Pe.sep).includes("ts-node")||process.execArgv[0].split(Pe.sep).includes("ts-node")?"ts-node":process.execArgv[0]==="--require"&&process.execArgv[1].split(Pe.sep).includes("tsx")?"tsx":"node"}var os=sb();function ob(e){return"code"in e&&e.code==="ENOENT"}async function ab(e){try{if(ze.TS_CONFIGS[e])return ze.TS_CONFIGS[e];let t=await(0,ib.readTSConfig)(e);return t?(ne("tsconfig: %O",t),ze.TS_CONFIGS[e]=t,ze.TS_CONFIGS[e]):void 0}catch(t){if(ob(t))return;ne(`Could not parse tsconfig.json. Skipping typescript path lookup for ${e}.`),(0,Mi.memoizedWarn)(`Could not parse tsconfig.json for ${e}. Falling back to compiled source.`)}}async function ub(e,t){if(jf.has(e))return;ne("registering ts-node at",e);let r=S.resolve("ts-node",{paths:[e,__dirname]});ne("ts-node path:",r);let i;try{i=S(r)}catch{ne(`Could not find ts-node at ${r}. Skipping ts-node registration for ${e}.`),(0,Mi.memoizedWarn)(`Could not find ts-node at ${r}. Please ensure that ts-node is a devDependency. Falling back to compiled source.`);return}let n=[(0,Pe.join)(e,"node_modules","@types")],o=[];if(t.compilerOptions.rootDirs)for(let p of t.compilerOptions.rootDirs)o.push((0,Pe.join)(e,p));else t.compilerOptions.rootDir?o.push((0,Pe.join)(e,t.compilerOptions.rootDir)):t.compilerOptions.baseUrl?o.push((0,Pe.join)(e,t.compilerOptions.baseUrl)):o.push((0,Pe.join)(e,"src"));let{baseUrl:s,rootDir:u,...l}=t.compilerOptions,m={compilerOptions:{...l,rootDirs:o,typeRoots:n},...t["ts-node"],cwd:e,esm:t["ts-node"]?.esm??!0,experimentalSpecifierResolution:t["ts-node"]?.experimentalSpecifierResolution??"explicit",scope:!0,scopeDir:e,skipProject:!0,transpileOnly:!0};ne("ts-node options: %O",m),i.register(m),jf.add(e)}function cb(e,t,r){return(r||e?.moduleType==="commonjs")&&t?.moduleType==="module"}function lb(e,t,r){if(t?.moduleType!=="module"||r)return!1;let i=Number.parseInt(process.version.replace("v","").split(".")[0],10);return os==="ts-node"&&i>=20}async function hb(e,t){let r=await ab(e);if(!r)return t;ne(`Determining path for ${t}`),os==="tsx"||os==="bun"?ne(`Skipping ts-node registration for ${e} because the runtime is: ${os}`):await ub(e,r);let{baseUrl:i,outDir:n,rootDir:o,rootDirs:s}=r.compilerOptions,u=o??(s??[])[0]??i;if(!u)return ne(`no rootDir, rootDirs, or baseUrl specified in tsconfig.json. Returning default path ${t}`),t;if(!n)return ne(`no outDir specified in tsconfig.json. Returning default path ${t}`),t;let l=(0,Pe.join)(e,n),m=(0,Pe.join)(e,u),p=(0,Pe.relative)(l,t),f=(0,Pe.join)(m,p).replace(/\.js$/,"");return ne(`lib dir: ${l}`),ne(`src dir: ${m}`),ne(`src directory to find: ${f}`),(0,rb.existsSync)(f)?(ne(`Found source directory for ${t} at ${f}`),f):(await Promise.all([(0,Lf.access)(`${f}.ts`).then(()=>`${f}.ts`).catch(()=>!1),(0,Lf.access)(`${f}.tsx`).then(()=>`${f}.tsx`).catch(()=>!1)])).some(Boolean)?(ne(`Found source file for ${t} at ${f}`),f):(ne(`No source file found. Returning default path ${t}`),(0,$f.isProd)()||(0,Mi.memoizedWarn)(`Could not find source for ${t} based on tsconfig. Defaulting to compiled source.`),t)}async function fb(e,t,r){let i=r?.options.isRoot?r:tb.default.getInstance().get("rootPlugin");if(!t)return t;t=t.startsWith(e)?t:(0,Pe.join)(e,t);let n=Bf.settings.enableAutoTranspile??Bf.settings.tsnodeEnabled;if(n===!1)return ne(`Skipping typescript path lookup for ${e} because enableAutoTranspile is explicitly set to false`),t;let o=(0,$f.isProd)();if(n===void 0&&o&&r?.type!=="link")return ne(`Skipping typescript path lookup for ${e} because NODE_ENV is NOT "test" or "development"`),t;if(cb(i,r,o))return ne(`Skipping typescript path lookup for ${e} because it's an ESM module (NODE_ENV: ${process.env.NODE_ENV}, root plugin module type: ${i?.moduleType})`),r?.type==="link"&&(0,Mi.memoizedWarn)(`${r?.name} is a linked ESM module and cannot be auto-transpiled. Existing compiled source will be used instead.`),t;if(lb(e,r,o))return ne(`Skipping typescript path lookup for ${e} because ts-node is run in node version ${process.version}"`),(0,Mi.memoizedWarn)("ts-node executable cannot transpile ESM in Node 20. Existing compiled source will be used instead. See https://github.com/oclif/core/issues/817."),t;try{return await hb(e,t)}catch(s){return ne(s),t}}ze.tsPath=fb});var Li=w(pt=>{"use strict";y();Object.defineProperty(pt,"__esModule",{value:!0});pt.isPathModule=pt.loadWithDataFromManifest=pt.loadWithData=pt.load=void 0;var pb=S("node:fs"),as=S("node:path"),Pa=S("node:url"),qf=Jr(),Oa=Aa(),Uf=Dt(),db=Fv(),mb=[".ts",".js",".mjs",".cjs",".mts",".cts",".tsx",".jsx"],gb=e=>e.type!==void 0;function Ia(e,t,r){throw e.code==="MODULE_NOT_FOUND"||e.code==="ERR_MODULE_NOT_FOUND"?new Oa.ModuleLoadError(`${t?"import()":"require"} failed to load ${r}: ${e.message}`):e}async function yb(e,t){let r,i;try{return{filePath:r,isESM:i}=await Wf(e,t),i?await import((0,Pa.pathToFileURL)(r).href):S(r)}catch(n){Ia(n,i,r??t)}}pt.load=yb;async function xb(e,t){let r,i;try{({filePath:r,isESM:i}=await Wf(e,t));let n=i?await import((0,Pa.pathToFileURL)(r).href):S(r);return{filePath:r,isESM:i,module:n}}catch(n){Ia(n,i,r??t)}}pt.loadWithData=xb;async function vb(e,t){let{id:r,isESM:i,relativePath:n}=e;if(!n)throw new Oa.ModuleLoadError(`Cached command ${r} does not have a relative path`);if(i===void 0)throw new Oa.ModuleLoadError(`Cached command ${r} does not have the isESM property set`);let o=(0,as.join)(t,n.join(as.sep));try{let s=i?await import((0,Pa.pathToFileURL)(o).href):S(o);return{filePath:o,isESM:i,module:s}}catch(s){Ia(s,i,o??t)}}pt.loadWithDataFromManifest=vb;function ka(e){switch((0,as.extname)(e).toLowerCase()){case".js":case".jsx":case".ts":case".tsx":return db.sync(e)==="module";case".mjs":case".mts":return!0;default:return!1}}pt.isPathModule=ka;async function Wf(e,t){let r,i;try{i=S.resolve(t),r=ka(i)}catch{i=(gb(e)?await(0,qf.tsPath)(e.root,t,e):await(0,qf.tsPath)(e.root,t))??t;let n=!1,o=!1;if((0,Uf.existsSync)(i)){n=!0;try{(0,pb.lstatSync)(i)?.isDirectory?.()&&(n=!1,o=!0)}catch{}}if(!n){let s=Hf(i);!s&&o&&(s=Hf((0,as.join)(i,"index"))),s&&(i=s)}r=ka(i)}return{filePath:i,isESM:r}}function Hf(e){for(let t of mb){let r=`${e}${t}`;if((0,Uf.existsSync)(r))return r}return null}});var cs=w(us=>{"use strict";y();Object.defineProperty(us,"__esModule",{value:!0});us.SINGLE_COMMAND_CLI_SYMBOL=void 0;us.SINGLE_COMMAND_CLI_SYMBOL=Symbol("SINGLE_COMMAND_CLI").toString()});var Na=w(ls=>{"use strict";y();Object.defineProperty(ls,"__esModule",{value:!0});ls.cacheDefaultValue=void 0;var wb=async(e,t)=>{if(!(t&&e.noCacheDefault)){if(typeof e.defaultHelp=="function")try{return await e.defaultHelp({flags:{},options:e})}catch{return}if(typeof e.default=="function")try{return await e.default({flags:{},options:e})}catch{}else return e.default}};ls.cacheDefaultValue=wb});var Vr=w(Gr=>{"use strict";y();Object.defineProperty(Gr,"__esModule",{value:!0});Gr.toConfiguredId=Gr.toStandardizedId=void 0;function Eb(e,t){return e.replaceAll(new RegExp(t.topicSeparator,"g"),":")}Gr.toStandardizedId=Eb;function bb(e,t){return e.replaceAll(new RegExp(":","g"),t.topicSeparator||":")}Gr.toConfiguredId=bb});var fs=w(hs=>{"use strict";y();Object.defineProperty(hs,"__esModule",{value:!0});hs.ensureArgObject=void 0;function Cb(e){return Array.isArray(e)?(e??[]).reduce((t,r)=>({...t,[r.name]:r}),{}):e??{}}hs.ensureArgObject=Cb});var zf=w(ps=>{"use strict";y();Object.defineProperty(ps,"__esModule",{value:!0});ps.DocOpts=void 0;var Db=fs(),Ra=class e{cmd;flagList;flagMap;constructor(t){this.cmd=t,this.flagMap={},this.flagList=Object.entries(t.flags||{}).filter(([r,i])=>!i.hidden).map(([r,i])=>(this.flagMap[r]=i,i))}static generate(t){return new e(t).toString()}toString(){let t=["<%= command.id %>"];if(this.cmd.args){let r=this.cmd.strict===!1?"...":"",i=Object.values((0,Db.ensureArgObject)(this.cmd.args)).map(n=>n.required?`${n.name.toUpperCase()}${r}`:`[${n.name.toUpperCase()}${r}]`)||[];t.push(...i)}try{t.push(...Object.values(this.groupFlagElements()))}catch{t.push(...this.flagList.map(r=>{let i=r.char?`-${r.char}`:`--${r.name}`;return r.type==="boolean"?i:`${i}=<value>`}))}return t.join(" ")}combineElementsToFlag(t,r,i,n){if(!this.flagMap[r])return;let o=this.flagMap[r]?.required;(typeof o!="boolean"||!o)&&(o=i.reduce((s,u)=>s||this.flagMap[u]?.required||!1,!1));for(let s of i)t[r]=`${t[r]||""}${n}${t[s]||""}`,delete t[s],delete this.flagMap[s];t[r]=o?`(${t[r]||""})`:`[${t[r]||""}]`,delete this.flagMap[r]}generateElements(t={},r=[]){let i=[];for(let n of r){let o="",s=n.char?`-${n.char}`:`--${n.name}`;n.type==="option"&&(o=n.options?` ${n.options.join("|")}`:" <value>");let u=`${s}${o}`;t[n.name]=u,i.push(u)}return i}groupFlagElements(){let t={};this.generateElements(t,this.flagList.filter(r=>r.required)),this.generateElements(t,this.flagList.filter(r=>!r.required));for(let r of this.flagList)Array.isArray(r.dependsOn)&&this.combineElementsToFlag(t,r.name,r.dependsOn," "),Array.isArray(r.exclusive)&&this.combineElementsToFlag(t,r.name,r.exclusive," | ");for(let r of Object.keys(this.flagMap)){let i=this.flagMap[r]||{};i.required||(t[i.name]=`[${t[i.name]||""}]`)}return t}};ps.DocOpts=Ra});var Yr=w(oe=>{"use strict";y();var Ab=oe&&oe.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),_b=oe&&oe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Sb=oe&&oe.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Ab(t,e,r);return _b(t,e),t};Object.defineProperty(oe,"__esModule",{value:!0});oe.normalizeArgv=oe.formatCommandDeprecationWarning=oe.formatFlagDeprecationWarning=oe.getHelpFlagAdditions=oe.standardizeIDFromArgv=oe.template=void 0;var Fb=Sb(Ll()),Tb=zr(),Ob=Vr();function kb(e){function t(r){return Fb.render(r,e)}return t}oe.template=kb;var Pb=e=>e.startsWith("-"),Ib=e=>e.includes("=");function Nb(e,t){if(e.length===1)return e;let i=(n=>{let o=(0,Tb.collectUsableIds)(t.commandIDs),s=[],u=p=>o.has(p),l=p=>(p?[...s,p]:s).filter(Boolean).join(":"),m=()=>{let p=l();if(!p)return!1;let f=t.findCommand(p);return!!(f&&(f.strict===!1||Object.keys(f.args??{}).length>0))};for(let p of n)if(u(l(p)))s.push(p);else{if(Ib(p)||Pb(p)||m())break;s.push(p)}return l()})(e);if(i){let n=e.slice(i.split(":").length);return[i,...n]}return e}function Jf(e,t){return e.length===0||(t.topicSeparator===" "?e=Nb(e,t):t.topicSeparator!==":"&&(e[0]=(0,Ob.toStandardizedId)(e[0],t))),e}oe.standardizeIDFromArgv=Jf;function Rb(e){let t=["--help"],r=e.pjson.oclif.additionalHelpFlags??[];return[...new Set([...t,...r]).values()]}oe.getHelpFlagAdditions=Rb;function Mb(e,t){let r=`The "${e}" flag has been deprecated`;return t===!0?`${r}.`:t.message?t.message:(t.version&&(r+=` and will be removed in version ${t.version}`),r+=t.to?`. Use "${t.to}" instead.`:".",r)}oe.formatFlagDeprecationWarning=Mb;function Lb(e,t){let r=`The "${e}" command has been deprecated`;return t?t.message?t.message:(t.version&&(r+=` and will be removed in version ${t.version}`),r+=t.to?`. Use "${t.to}" instead.`:".",r):`${r}.`}oe.formatCommandDeprecationWarning=Lb;function Bb(e,t=process.argv.slice(2)){return e.topicSeparator!==":"&&!t[0]?.includes(":")&&(t=Jf(t,e)),t}oe.normalizeArgv=Bb});var ds=w(Xr=>{"use strict";y();var Kr=Xr&&Xr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xr,"__esModule",{value:!0});Xr.HelpFormatter=void 0;var jb=Kr(We()),$b=Kr(Go()),qb=Kr(Vo()),Bi=Kr(Rr()),Hb=Kr(Tv()),Ub=Kr(Yo()),Gf=hr(),Wb=ar(),zb=Yr(),Ma=class{config;indentSpacing=2;opts;render;constructor(t,r={}){this.config=t,this.opts={maxWidth:Wb.stdtermwidth,...r},this.render=(0,zb.template)(this)}indent(t,r=this.indentSpacing){return(0,$b.default)(t,r)}renderList(t,r){if(t.length===0)return"";let i=()=>{let l="";for(let[m,p]of t)!m&&!p||(m&&(r.stripAnsi&&(m=(0,Bi.default)(m)),l+=this.wrap(m.trim(),r.indentation)),p&&(r.stripAnsi&&(p=(0,Bi.default)(p)),l+=`
|
|
27
27
|
`,l+=this.indent(this.wrap(p.trim(),r.indentation+2),4)),l+=`
|
|
28
28
|
|
|
29
|
-
`);return l.trim()};if(r.multiline)return i();let n=(0,
|
|
29
|
+
`);return l.trim()};if(r.multiline)return i();let n=(0,Hb.default)(t.map(l=>l[0]).join(`
|
|
30
30
|
`)),o="",s=r.spacer||`
|
|
31
|
-
`,u="";for(let[l,m]of t){let p=m;if(u&&(o+=s,o+=u),u=l||"",r.stripAnsi&&(u=(0
|
|
32
|
-
`).map(a=>a.trim());if(u+=" ".repeat(n-(0,
|
|
31
|
+
`,u="";for(let[l,m]of t){let p=m;if(u&&(o+=s,o+=u),u=l||"",r.stripAnsi&&(u=(0,Bi.default)(u)),!p){u=u.trim();continue}r.stripAnsi&&(p=(0,Bi.default)(p)),p=this.wrap(p.trim(),r.indentation+n+2);let[f,...d]=p.split(`
|
|
32
|
+
`).map(a=>a.trim());if(u+=" ".repeat(n-(0,qb.default)(u)+2),u+=f,d.length!==0){if(d.length>4)return i();r.spacer||(s=`
|
|
33
33
|
`),u+=`
|
|
34
34
|
`,u+=this.indent(d.join(`
|
|
35
|
-
`),n+2)}}return u&&(o+=s,o+=u),o.trim()}section(t,r){let i;if(typeof r=="string")i=this.render(r);else if(Array.isArray(r))i=r.map(o=>{if("name"in o){let l=o;return[this.render(l.name),this.render(l.description)]}let[s,u]=o;return[this.render(s),u&&this.render(u)]});else{if("header"in r)return this.section(r.header,r.body);i=r.map(o=>[o.name,o.description]).map(([o,s])=>[this.render(o),s&&this.render(s)])}let n=[(0,
|
|
36
|
-
`);return this.opts.stripAnsi?(0
|
|
37
|
-
`)}arg(t){let r=t.name.toUpperCase();return t.required?`${r}`:`[${r}]`}args(t){if(t.filter(r=>r.description).length!==0)return t.map(r=>{let i=this.command.strict===!1?`${r.name.toUpperCase()}...`:r.name.toUpperCase(),n=r.description||"";return r.default&&(n=`${(0,fe.colorize)(this.config?.theme?.flagDefaultValue,`[default: ${r.default}]`)} ${n}`),r.options&&(n=`${(0,fe.colorize)(this.config?.theme?.flagOptions,`(${r.options.join("|")})`)} ${n}`),[(0,fe.colorize)(this.config?.theme?.flag,i),n?(0,fe.colorize)(this.config?.theme?.sectionDescription,n):void 0]})}defaultUsage(){return this.opts.docopts===void 0||this.opts.docopts?
|
|
38
|
-
`:null;r=i?[...i.split(
|
|
39
|
-
`))}examples(t){return!t||t.length===0?void 0:(0,
|
|
40
|
-
`)}else n=i.description,o=[i.command];let s=this.config.platform==="win32"?this.config.shell.includes("powershell")?"`":"^":"\\",u=this.indentSpacing*2,l=o.map(m=>this.indent(this.wrap(this.formatIfCommand(m),u+4)).split(
|
|
35
|
+
`),n+2)}}return u&&(o+=s,o+=u),o.trim()}section(t,r){let i;if(typeof r=="string")i=this.render(r);else if(Array.isArray(r))i=r.map(o=>{if("name"in o){let l=o;return[this.render(l.name),this.render(l.description)]}let[s,u]=o;return[this.render(s),u&&this.render(u)]});else{if("header"in r)return this.section(r.header,r.body);i=r.map(o=>[o.name,o.description]).map(([o,s])=>[this.render(o),s&&this.render(s)])}let n=[(0,Gf.colorize)(this.config?.theme?.sectionHeader,jb.default.bold(t)),(0,Gf.colorize)(this.config?.theme?.sectionDescription,this.indent(Array.isArray(i)?this.renderList(i,{indentation:2,stripAnsi:this.opts.stripAnsi}):i))].join(`
|
|
36
|
+
`);return this.opts.stripAnsi?(0,Bi.default)(n):n}wrap(t,r=this.indentSpacing){return(0,Ub.default)(this.render(t),this.opts.maxWidth-r,{hard:!0})}};Xr.HelpFormatter=Ma});var La=w(fr=>{"use strict";y();var Yf=fr&&fr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fr,"__esModule",{value:!0});fr.CommandHelp=void 0;var Jb=Yf(We()),Gb=Yf(Rr()),fe=hr(),Vb=fs(),Vf=Vr(),Qr=le(),Yb=zf(),Xb=ds(),Zr=/\r\n|\n/;function Kb(e){return e==="alphabetical"?"alphabetical":e==="none"?"none":"alphabetical"}var ms=class extends Xb.HelpFormatter{command;config;opts;constructor(t,r,i){super(r,i),this.command=t,this.config=r,this.opts=i}aliases(t){return!t||t.length===0?void 0:t.map(i=>[(0,fe.colorize)(this.config?.theme?.dollarSign,"$"),(0,fe.colorize)(this.config?.theme?.bin,this.config.bin),(0,fe.colorize)(this.config?.theme?.alias,i)].join(" ")).join(`
|
|
37
|
+
`)}arg(t){let r=t.name.toUpperCase();return t.required?`${r}`:`[${r}]`}args(t){if(t.filter(r=>r.description).length!==0)return t.map(r=>{let i=this.command.strict===!1?`${r.name.toUpperCase()}...`:r.name.toUpperCase(),n=r.description||"";return r.default&&(n=`${(0,fe.colorize)(this.config?.theme?.flagDefaultValue,`[default: ${r.default}]`)} ${n}`),r.options&&(n=`${(0,fe.colorize)(this.config?.theme?.flagOptions,`(${r.options.join("|")})`)} ${n}`),[(0,fe.colorize)(this.config?.theme?.flag,i),n?(0,fe.colorize)(this.config?.theme?.sectionDescription,n):void 0]})}defaultUsage(){return this.opts.docopts===void 0||this.opts.docopts?Yb.DocOpts.generate(this.command):(0,Qr.compact)([this.command.id,Object.values(this.command.args??{})?.filter(t=>!t.hidden).map(t=>this.arg(t)).join(" ")]).join(" ")}description(){let t=this.command,r;if(this.opts.hideCommandSummaryInDescription)r=(t.description||"").split(Zr).slice(1);else if(t.description){let i=t.summary?`${t.summary}
|
|
38
|
+
`:null;r=i?[...i.split(Zr),...(t.description||"").split(Zr)]:(t.description||"").split(Zr)}if(r)return this.wrap(r.join(`
|
|
39
|
+
`))}examples(t){return!t||t.length===0?void 0:(0,Qr.castArray)(t).map(i=>{let n,o;if(typeof i=="string"){let m=i.split(Zr).filter(Boolean);if(m.length>=2&&!this.isCommand(m[0])&&m.slice(1).every(p=>this.isCommand(p)))n=m[0],o=m.slice(1);else return m.map(p=>this.formatIfCommand(p)).join(`
|
|
40
|
+
`)}else n=i.description,o=[i.command];let s=this.config.platform==="win32"?this.config.shell.includes("powershell")?"`":"^":"\\",u=this.indentSpacing*2,l=o.map(m=>this.indent(this.wrap(this.formatIfCommand(m),u+4)).split(Zr).join(` ${s}
|
|
41
41
|
`)).join(`
|
|
42
42
|
`);return`${this.wrap(n,u)}
|
|
43
43
|
|
|
44
44
|
${l}`}).join(`
|
|
45
45
|
|
|
46
|
-
`)}flagHelpLabel(t,r=!1){let i=t.helpLabel;if(!i){let n=[];n.push(t.char?`-${t.char[0]}`:" "),t.name&&(t.type==="boolean"&&t.allowNo?n.push(`--[no-]${t.name.trim()}`):n.push(`--${t.name.trim()}`)),i=n.join(t.char?(0,fe.colorize)(this.config?.theme?.flagSeparator,", "):" ")}if(t.type==="option"){let n=t.helpValue||(this.opts.showFlagNameInTitle?t.name:"<value>");!t.helpValue&&t.options&&(n=r||this.opts.showFlagOptionsInTitle?`${t.options.join("|")}`:"<option>"),t.multiple&&(n+="..."),n.includes("|")||(n=
|
|
46
|
+
`)}flagHelpLabel(t,r=!1){let i=t.helpLabel;if(!i){let n=[];n.push(t.char?`-${t.char[0]}`:" "),t.name&&(t.type==="boolean"&&t.allowNo?n.push(`--[no-]${t.name.trim()}`):n.push(`--${t.name.trim()}`)),i=n.join(t.char?(0,fe.colorize)(this.config?.theme?.flagSeparator,", "):" ")}if(t.type==="option"){let n=t.helpValue||(this.opts.showFlagNameInTitle?t.name:"<value>");!t.helpValue&&t.options&&(n=r||this.opts.showFlagOptionsInTitle?`${t.options.join("|")}`:"<option>"),t.multiple&&(n+="..."),n.includes("|")||(n=Jb.default.underline(n)),i+=`=${n}`}return(0,fe.colorize)(this.config.theme?.flag,i)}flags(t){if(t.length===0)return;let r=t.reduce((i,n)=>i&&n.char===void 0,!0);return t.map(i=>{let n=this.flagHelpLabel(i);r&&(n=n.replace(" ",""));let o=i.summary||i.description||"";return i.type==="option"&&i.default&&(o=`${(0,fe.colorize)(this.config?.theme?.flagDefaultValue,`[default: ${i.default}]`)} ${o}`),i.required&&(o=`${(0,fe.colorize)(this.config?.theme?.flagRequired,"(required)")} ${o}`),i.type==="option"&&i.options&&!i.helpValue&&!this.opts.showFlagOptionsInTitle&&(o+=(0,fe.colorize)(this.config?.theme?.flagOptions,`
|
|
47
47
|
<options: ${i.options.join("|")}>`)),[n,(0,fe.colorize)(this.config?.theme?.sectionDescription,o.trim())]})}flagsDescriptions(t){let r=t.filter(n=>n.summary&&n.description);return r.length===0?void 0:r.map(n=>{let o=n.summary||"",s=this.flagHelpLabel(n,!0);return n.char||(s=s.replace(" ","")),s+=s.length+o.length+2<this.opts.maxWidth?" "+o:`
|
|
48
48
|
|
|
49
49
|
`+this.indent(this.wrap(o,this.indentSpacing*2)),`${s}
|
|
50
50
|
|
|
51
51
|
${this.indent(this.wrap(n.description||"",this.indentSpacing*2))}`}).join(`
|
|
52
52
|
|
|
53
|
-
`)}generate(){let t=this.command,r=Object.entries(t.flags||{}).filter(([,s])=>!s.hidden).map(([s,u])=>(u.name=s,u)),i=
|
|
53
|
+
`)}generate(){let t=this.command,r=Object.entries(t.flags||{}).filter(([,s])=>!s.hidden).map(([s,u])=>(u.name=s,u)),i=Kb(this.opts.flagSortOrder)==="alphabetical"?(0,Qr.sortBy)(r,s=>[!s.char,s.char,s.name]):r,n=Object.values((0,Vb.ensureArgObject)(t.args)).filter(s=>!s.hidden);return(0,Qr.compact)(this.sections().map(({generate:s,header:u})=>{let l=s({args:n,cmd:t,flags:i},u);return Array.isArray(l)?l.map(m=>m&&m.body&&this.section(m.header,m.body)).join(`
|
|
54
54
|
|
|
55
55
|
`):l&&this.section(u,l)})).join(`
|
|
56
56
|
|
|
57
|
-
`)}groupFlags(t){let r=[],i={};for(let n of t){let o=n.helpGroup;o?(i[o]||(i[o]=[]),i[o].push(n)):r.push(n)}return{flagGroups:i,mainFlags:r}}sections(){let t=[{generate:()=>this.usage(),header:this.opts.usageHeader||"USAGE"},{generate:({args:i},n)=>[{body:this.args(i),header:n}],header:"ARGUMENTS"},{generate:({flags:i},n)=>{let{flagGroups:o,mainFlags:s}=this.groupFlags(i),u=[],l=this.flags(s);l&&u.push({body:l,header:n});for(let[m,p]of Object.entries(o)){let f=this.flags(p);f&&u.push({body:f,header:`${m.toUpperCase()} ${n}`})}return(0,
|
|
57
|
+
`)}groupFlags(t){let r=[],i={};for(let n of t){let o=n.helpGroup;o?(i[o]||(i[o]=[]),i[o].push(n)):r.push(n)}return{flagGroups:i,mainFlags:r}}sections(){let t=[{generate:()=>this.usage(),header:this.opts.usageHeader||"USAGE"},{generate:({args:i},n)=>[{body:this.args(i),header:n}],header:"ARGUMENTS"},{generate:({flags:i},n)=>{let{flagGroups:o,mainFlags:s}=this.groupFlags(i),u=[],l=this.flags(s);l&&u.push({body:l,header:n});for(let[m,p]of Object.entries(o)){let f=this.flags(p);f&&u.push({body:f,header:`${m.toUpperCase()} ${n}`})}return(0,Qr.compact)(u)},header:"FLAGS"},{generate:()=>this.description(),header:"DESCRIPTION"},{generate:({cmd:i})=>this.aliases(i.aliases),header:"ALIASES"},{generate:({cmd:i})=>{let n=i.examples||i.example;return this.examples(n)},header:"EXAMPLES"},{generate:({flags:i})=>this.flagsDescriptions(i),header:"FLAG DESCRIPTIONS"}],r=this.opts.sections?.map(i=>i.toLowerCase());return t.filter(({header:i})=>!r||r.includes(i.toLowerCase()))}usage(){let{id:t,usage:r}=this.command,i=(0,Vf.toStandardizedId)(t,this.config),n=(0,Vf.toConfiguredId)(t,this.config);return(r?(0,Qr.castArray)(r):[this.defaultUsage()]).map(s=>{let u=this.opts.maxWidth-this.indentSpacing,l=(0,fe.colorize)(this.config?.theme?.dollarSign,"$"),m=(0,fe.colorize)(this.config?.theme?.bin,this.config.bin),p=(0,fe.colorize)(this.config?.theme?.command,"<%= command.id %>"),f=(0,fe.colorize)(this.config?.theme?.sectionDescription,s.replace("<%= command.id %>","").replace(i,"").replace(n,"").trim()),d=`${l} ${m} ${p} ${f}`.trim();if(d.length>u){let a=d.slice(0,Math.max(0,u)).lastIndexOf(" ");return d.slice(0,Math.max(0,a))+`
|
|
58
58
|
`+this.indent(this.wrap(d.slice(Math.max(0,a)),this.indentSpacing*2))}return this.wrap(d)}).join(`
|
|
59
|
-
`)}formatIfCommand(t){t=this.render(t);let r=(0,fe.colorize)(this.config?.theme?.dollarSign,"$");return t.startsWith(this.config.bin)?`${r} ${t}`:t.startsWith(`$ ${this.config.bin}`)?`${r}${t.replace("$","")}`:t}isCommand(t){return(0,
|
|
59
|
+
`)}formatIfCommand(t){t=this.render(t);let r=(0,fe.colorize)(this.config?.theme?.dollarSign,"$");return t.startsWith(this.config.bin)?`${r} ${t}`:t.startsWith(`$ ${this.config.bin}`)?`${r}${t.replace("$","")}`:t}isCommand(t){return(0,Gb.default)(this.formatIfCommand(t)).startsWith(`${(0,fe.colorize)(this.config?.theme?.dollarSign,"$")} ${this.config.bin}`)}};fr.CommandHelp=ms;fr.default=ms});var Xf=w(ji=>{"use strict";y();var Qb=ji&&ji.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ji,"__esModule",{value:!0});var Zb=Qb(Rr()),ei=hr(),eC=le(),tC=ds(),Ba=class extends tC.HelpFormatter{config;opts;constructor(t,r){super(t,r),this.config=t,this.opts=r}description(){let t=this.config.pjson.oclif.description||this.config.pjson.description||"";if(t=this.render(t),t=t.split(`
|
|
60
60
|
`).slice(1).join(`
|
|
61
|
-
`),!!t)return this.section("DESCRIPTION",this.wrap((0,
|
|
62
|
-
`)[0];let r=(0,
|
|
61
|
+
`),!!t)return this.section("DESCRIPTION",this.wrap((0,ei.colorize)(this.config?.theme?.sectionDescription,t)))}root(){let t=this.config.pjson.oclif.description||this.config.pjson.description||"";t=this.render(t),t=t.split(`
|
|
62
|
+
`)[0];let r=(0,eC.compact)([(0,ei.colorize)(this.config?.theme?.commandSummary,t),this.version(),this.usage(),this.description()]).join(`
|
|
63
63
|
|
|
64
|
-
`);return this.opts.stripAnsi&&(r=(0,
|
|
64
|
+
`);return this.opts.stripAnsi&&(r=(0,Zb.default)(r)),r}usage(){return this.section(this.opts.usageHeader||"USAGE",this.wrap(`${(0,ei.colorize)(this.config?.theme?.dollarSign,"$")} ${(0,ei.colorize)(this.config?.theme?.bin,this.config.bin)} ${(0,ei.colorize)(this.config?.theme?.sectionDescription,"[COMMAND]")}`))}version(){return this.section("VERSION",this.wrap((0,ei.colorize)(this.config?.theme?.version,this.config.userAgent)))}};ji.default=Ba});var Hi=w(ye=>{"use strict";y();var ja=ye&&ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ye,"__esModule",{value:!0});ye.loadHelpClass=ye.Help=ye.HelpBase=ye.standardizeIDFromArgv=ye.normalizeArgv=ye.getHelpFlagAdditions=ye.CommandHelp=void 0;var Kf=S("node:util"),Qf=ja(Rr()),dt=hr(),Zf=ja($t()),rC=Jr(),iC=Ca(),nC=Li(),ep=cs(),sC=Na(),tp=Vr(),$i=le(),oC=La(),aC=ds(),uC=ja(Xf()),qi=Yr(),cC=La();Object.defineProperty(ye,"CommandHelp",{enumerable:!0,get:function(){return cC.CommandHelp}});var $a=Yr();Object.defineProperty(ye,"getHelpFlagAdditions",{enumerable:!0,get:function(){return $a.getHelpFlagAdditions}});Object.defineProperty(ye,"normalizeArgv",{enumerable:!0,get:function(){return $a.normalizeArgv}});Object.defineProperty(ye,"standardizeIDFromArgv",{enumerable:!0,get:function(){return $a.standardizeIDFromArgv}});function lC(e,t){let r=(0,qi.getHelpFlagAdditions)(t);for(let i of e){if(i==="--")return;if(!(r.includes(i)||i==="help"))return i.startsWith("-")?void 0:i}}var gs=class extends aC.HelpFormatter{constructor(t,r={}){super(t,r),t.topicSeparator||(t.topicSeparator=":")}};ye.HelpBase=gs;var ys=class extends gs{CommandHelpClass=oC.CommandHelp;constructor(t,r={}){super(t,r)}get sortedCommands(){let{commands:t}=this.config;return t=t.filter(r=>this.opts.all||!r.hidden),t=(0,$i.sortBy)(t,r=>r.id),t=(0,$i.uniqBy)(t,r=>r.id),t}get sortedTopics(){let t=this._topics;return t=t.filter(r=>this.opts.all||!r.hidden),t=(0,$i.sortBy)(t,r=>r.name),t=(0,$i.uniqBy)(t,r=>r.name),t}command(t){return this.formatCommand(t)}description(t){let r=this.render(t.description||"");return t.summary?r:r.split(`
|
|
65
65
|
`).slice(1).join(`
|
|
66
|
-
`)}formatCommand(t){return this.config.topicSeparator!==":"&&(t.id=t.id.replaceAll(":",this.config.topicSeparator),t.aliases=t.aliases&&t.aliases.map(i=>i.replaceAll(":",this.config.topicSeparator))),this.getCommandHelpClass(t).generate()}formatCommands(t){if(t.length===0)return"";let r=this.renderList(t.filter(i=>this.opts.hideAliasesFromRoot?!i.aliases?.includes(i.id):!0).map(i=>{this.config.topicSeparator!==":"&&(i.id=i.id.replaceAll(":",this.config.topicSeparator));let n=this.summary(i);return[(0,dt.colorize)(this.config?.theme?.command,i.id),n&&(0,dt.colorize)(this.config?.theme?.sectionDescription,(0,
|
|
67
|
-
`,stripAnsi:this.opts.stripAnsi});return this.section("COMMANDS",r)}formatRoot(){return new
|
|
66
|
+
`)}formatCommand(t){return this.config.topicSeparator!==":"&&(t.id=t.id.replaceAll(":",this.config.topicSeparator),t.aliases=t.aliases&&t.aliases.map(i=>i.replaceAll(":",this.config.topicSeparator))),this.getCommandHelpClass(t).generate()}formatCommands(t){if(t.length===0)return"";let r=this.renderList(t.filter(i=>this.opts.hideAliasesFromRoot?!i.aliases?.includes(i.id):!0).map(i=>{this.config.topicSeparator!==":"&&(i.id=i.id.replaceAll(":",this.config.topicSeparator));let n=this.summary(i);return[(0,dt.colorize)(this.config?.theme?.command,i.id),n&&(0,dt.colorize)(this.config?.theme?.sectionDescription,(0,Qf.default)(n))]}),{indentation:2,spacer:`
|
|
67
|
+
`,stripAnsi:this.opts.stripAnsi});return this.section("COMMANDS",r)}formatRoot(){return new uC.default(this.config,this.opts).root()}formatTopic(t){let r=this.render(t.description||""),i=r.split(`
|
|
68
68
|
`)[0];r=r.split(`
|
|
69
69
|
`).slice(1).join(`
|
|
70
|
-
`);let n=`${t.name}:COMMAND`;this.config.topicSeparator!==":"&&(n=n.replaceAll(":",this.config.topicSeparator));let o=(0
|
|
70
|
+
`);let n=`${t.name}:COMMAND`;this.config.topicSeparator!==":"&&(n=n.replaceAll(":",this.config.topicSeparator));let o=(0,$i.compact)([(0,dt.colorize)(this.config?.theme?.commandSummary,i),this.section(this.opts.usageHeader||"USAGE",`${(0,dt.colorize)(this.config?.theme?.dollarSign,"$")} ${(0,dt.colorize)(this.config?.theme?.bin,this.config.bin)} ${n}`),r&&this.section("DESCRIPTION",this.wrap((0,dt.colorize)(this.config?.theme?.sectionDescription,r)))]).join(`
|
|
71
71
|
|
|
72
|
-
`);return this.opts.stripAnsi&&(o=(0,
|
|
72
|
+
`);return this.opts.stripAnsi&&(o=(0,Qf.default)(o)),o+`
|
|
73
73
|
`}formatTopics(t){if(t.length===0)return"";let r=this.renderList(t.map(i=>(this.config.topicSeparator!==":"&&(i.name=i.name.replaceAll(":",this.config.topicSeparator)),[(0,dt.colorize)(this.config?.theme?.topic,i.name),i.description&&this.render((0,dt.colorize)(this.config?.theme?.sectionDescription,i.description.split(`
|
|
74
74
|
`)[0]))])),{indentation:2,spacer:`
|
|
75
|
-
`,stripAnsi:this.opts.stripAnsi});return this.section("TOPICS",r)}getCommandHelpClass(t){return new this.CommandHelpClass(t,this.config,this.opts)}log(...t){this.opts.sendToStderr?
|
|
76
|
-
`):
|
|
77
|
-
`)}async showCommandHelp(t){let r=t.id,i=r.split(":").length,n=this.sortedTopics.filter(m=>m.name.startsWith(r+":")&&m.name.split(":").length===i+1),o=this.sortedCommands.filter(m=>m.id.startsWith(r+":")&&m.id.split(":").length===i+1),s=this.config.plugins.get(t.pluginName),u=this.config.pjson?.oclif?.state||s?.pjson?.oclif?.state||t.state;if(u&&this.log(u==="deprecated"?`${(0,
|
|
75
|
+
`,stripAnsi:this.opts.stripAnsi});return this.section("TOPICS",r)}getCommandHelpClass(t){return new this.CommandHelpClass(t,this.config,this.opts)}log(...t){this.opts.sendToStderr?Zf.default.stderr(Kf.format.apply(this,t)+`
|
|
76
|
+
`):Zf.default.stdout(Kf.format.apply(this,t)+`
|
|
77
|
+
`)}async showCommandHelp(t){let r=t.id,i=r.split(":").length,n=this.sortedTopics.filter(m=>m.name.startsWith(r+":")&&m.name.split(":").length===i+1),o=this.sortedCommands.filter(m=>m.id.startsWith(r+":")&&m.id.split(":").length===i+1),s=this.config.plugins.get(t.pluginName),u=this.config.pjson?.oclif?.state||s?.pjson?.oclif?.state||t.state;if(u&&this.log(u==="deprecated"?`${(0,qi.formatCommandDeprecationWarning)((0,tp.toConfiguredId)(r,this.config),t.deprecationOptions)}
|
|
78
78
|
`:`This command is in ${u}.
|
|
79
|
-
`),t.deprecateAliases&&t.aliases.includes(r)){let m=this.config.commands.find(f=>f.aliases.includes(r)),p={...t.deprecationOptions,...m?{to:m.id}:{}};this.log(`${(0,
|
|
79
|
+
`),t.deprecateAliases&&t.aliases.includes(r)){let m=this.config.commands.find(f=>f.aliases.includes(r)),p={...t.deprecationOptions,...m?{to:m.id}:{}};this.log(`${(0,qi.formatCommandDeprecationWarning)((0,tp.toConfiguredId)(r,this.config),p)}
|
|
80
80
|
`)}let l=this.summary(t);if(l&&this.log(l+`
|
|
81
|
-
`),this.log(this.formatCommand(t)),this.log(""),n.length>0&&(this.log(this.formatTopics(n)),this.log("")),o.length>0){let m=[],p=o.filter(f=>(m.push(...f.aliases),!m.includes(f.id)));this.log(this.formatCommands(p)),this.log("")}}async showHelp(t){let r=t.slice(1);t=t.filter(s=>!(0,
|
|
81
|
+
`),this.log(this.formatCommand(t)),this.log(""),n.length>0&&(this.log(this.formatTopics(n)),this.log("")),o.length>0){let m=[],p=o.filter(f=>(m.push(...f.aliases),!m.includes(f.id)));this.log(this.formatCommands(p)),this.log("")}}async showHelp(t){let r=t.slice(1);t=t.filter(s=>!(0,qi.getHelpFlagAdditions)(this.config).includes(s)),this.config.topicSeparator!==":"&&(t=(0,qi.standardizeIDFromArgv)(t,this.config));let i=lC(t,this.config);if(!i){if(this.config.isSingleCommandCLI){let s=this.config.findCommand(ep.SINGLE_COMMAND_CLI_SYMBOL);if(s){await this.showCommandHelp(s);return}}await this.showRootHelp();return}let n=this.config.findCommand(i);if(n){if(n.id===ep.SINGLE_COMMAND_CLI_SYMBOL&&(n.id=""),n.hasDynamicHelp&&n.pluginType!=="jit"){let s=await n.load();for(let[u,l]of Object.entries(s.flags??{}))l.type!=="boolean"&&(n.flags[u].default=await(0,sC.cacheDefaultValue)(l,!1));await this.showCommandHelp(n)}else await this.showCommandHelp(n);return}let o=this.config.findTopic(i);if(o){await this.showTopicHelp(o);return}if(this.config.flexibleTaxonomy){let s=this.config.findMatches(i,r);if(s.length>0&&(await this.config.runHook("command_incomplete",{argv:r.filter(l=>!i.split(":").includes(l)),id:i,matches:s})).successes.length>0)return}(0,iC.error)(`Command ${i} not found.`)}async showRootHelp(){let t=this.sortedTopics,r=this.sortedCommands,i=this.config.pjson?.oclif?.state;i&&this.log(i==="deprecated"?`${this.config.bin} is deprecated`:`${this.config.bin} is in ${i}.
|
|
82
82
|
`),this.log(this.formatRoot()),this.log(""),this.opts.all||(t=t.filter(n=>!n.name.includes(":")),r=r.filter(n=>!n.id.includes(":"))),t.length>0&&(this.log(this.formatTopics(t)),this.log("")),r.length>0&&(r=r.filter(n=>n.id),this.log(this.formatCommands(r)),this.log(""))}async showTopicHelp(t){let{name:r}=t,i=r.split(":").length,n=this.sortedTopics.filter(u=>u.name.startsWith(r+":")&&u.name.split(":").length===i+1),o=this.sortedCommands.filter(u=>u.id.startsWith(r+":")&&u.id.split(":").length===i+1),s=this.config.pjson?.oclif?.state;s&&this.log(`This topic is in ${s}.
|
|
83
83
|
`),this.log(this.formatTopic(t)),n.length>0&&(this.log(this.formatTopics(n)),this.log("")),o.length>0&&(this.log(this.formatCommands(o)),this.log(""))}summary(t){if(!(this.opts.sections&&!this.opts.sections.map(r=>r.toLowerCase()).includes("summary")))return t.summary?(0,dt.colorize)(this.config?.theme?.commandSummary,this.render(t.summary.split(`
|
|
84
84
|
`)[0])):t.description&&(0,dt.colorize)(this.config?.theme?.commandSummary,this.render(t.description).split(`
|
|
85
|
-
`)[0])}get _topics(){return this.config.topics.filter(t=>this.config.topics.some(i=>i.name.includes(`${t.name}:`)))}};ye.Help=
|
|
86
|
-
${i.message}`)}return
|
|
85
|
+
`)[0])}get _topics(){return this.config.topics.filter(t=>this.config.topics.some(i=>i.name.includes(`${t.name}:`)))}};ye.Help=ys;function hC(e){return e&&e.default?e.default:e}async function fC(e){let{pjson:t}=e,r=t.oclif?.helpClass;if(r)try{let i=await(0,rC.tsPath)(e.root,r)??r,n=await(0,nC.load)(e,i);return hC(n)}catch(i){throw new Error(`Unable to load configured help class "${r}", failed with message:
|
|
86
|
+
${i.message}`)}return ys}ye.loadHelpClass=fC});var xs=w(Je=>{"use strict";y();var Ha=Je&&Je.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Je,"__esModule",{value:!0});Je.handle=Je.Exit=void 0;var pC=Ha(Bl()),dC=Ha(it()),mC=Hi(),qa=ur(),gC=cr(),yC=Qn(),xC=Ha(es());Je.Exit={exit(e=0){process.exit(e)}};async function vC(e){try{e||(e=new gC.CLIError("no error?")),e.message==="SIGINT"&&Je.Exit.exit(1);let t=!(e instanceof yC.ExitError)&&!e.skipOclifErrorHandling,r=(0,xC.default)(e),i=(0,pC.default)(e.stack||"",{pretty:!0});if(t){console.error(r??i);let o=dC.default.getInstance().get("config");if(e.showHelp&&e.parse?.input?.argv&&o){let s={...o.pjson.oclif.helpOptions??o.pjson.helpOptions,sections:["flags","usage","arguments"],sendToStderr:!0},u=new mC.Help(o,s);console.error(),await u.showHelp(process.argv.slice(2))}}let n=e.oclif?.exit??1;qa.config.errorLogger&&e.code!=="EEXIT"?(i&&qa.config.errorLogger.log(i),await qa.config.errorLogger.flush().then(()=>Je.Exit.exit(n)).catch(console.error)):Je.Exit.exit(n)}catch(t){console.error(e.stack),console.error(t.stack),Je.Exit.exit(1)}}Je.handle=vC});var Ge=w(ae=>{"use strict";y();Object.defineProperty(ae,"__esModule",{value:!0});ae.warn=ae.exit=ae.Logger=ae.handle=ae.ModuleLoadError=ae.ExitError=ae.CLIError=ae.error=ae.config=void 0;var wC=Qn(),EC=ur();Object.defineProperty(ae,"config",{enumerable:!0,get:function(){return EC.config}});var bC=Ca();Object.defineProperty(ae,"error",{enumerable:!0,get:function(){return bC.error}});var CC=cr();Object.defineProperty(ae,"CLIError",{enumerable:!0,get:function(){return CC.CLIError}});var DC=Qn();Object.defineProperty(ae,"ExitError",{enumerable:!0,get:function(){return DC.ExitError}});var AC=Aa();Object.defineProperty(ae,"ModuleLoadError",{enumerable:!0,get:function(){return AC.ModuleLoadError}});var _C=xs();Object.defineProperty(ae,"handle",{enumerable:!0,get:function(){return _C.handle}});var SC=wa();Object.defineProperty(ae,"Logger",{enumerable:!0,get:function(){return SC.Logger}});function FC(e=0){throw new wC.ExitError(e)}ae.exit=FC;var TC=ss();Object.defineProperty(ae,"warn",{enumerable:!0,get:function(){return TC.warn}})});var ws=w(vs=>{"use strict";y();Object.defineProperty(vs,"__esModule",{value:!0});vs.ActionBase=void 0;var rp=S("node:util"),ip=le(),Ua=class{std="stderr";stdmocks;type;stdmockOrigs={stderr:process.stderr.write,stdout:process.stdout.write};get output(){return this.globals.output}set output(t){this.globals.output=t}get running(){return!!this.task}get status(){return this.task?this.task.status:void 0}set status(t){let{task:r}=this;r&&r.status!==t&&(this._updateStatus(t,r.status),r.status=t)}get task(){return this.globals.action.task}set task(t){this.globals.action.task=t}pause(t,r){let{task:i}=this,n=i&&i.active;i&&n&&(this._pause(r),this._stdout(!1),i.active=!1);let o=t();return i&&n&&this._resume(),o}async pauseAsync(t,r){let{task:i}=this,n=i&&i.active;i&&n&&(this._pause(r),this._stdout(!1),i.active=!1);let o=await t();return i&&n&&this._resume(),o}start(t,r,i={}){this.std=i.stdout?"stdout":"stderr";let n={action:t,active:!!(this.task&&this.task.active),status:r};this.task=n,this._start(i),n.active=!0,this._stdout(!0)}stop(t="done"){let{task:r}=this;r&&(this._stop(t),r.active=!1,this.task=void 0,this._stdout(!1))}_flushStdout(){try{let t="",r;for(;this.stdmocks&&this.stdmocks.length>0;){let i=this.stdmocks.shift();r=i[0],this._write(r,i[1]),t+=i[1][0].toString("utf8")}t&&r&&t.at(-1)!==`
|
|
87
87
|
`&&this._write(r,`
|
|
88
|
-
`)}catch(t){this._write("stderr",(0,
|
|
89
|
-
`),this._flushStdout()}_pause(t){t?this._updateStatus(t):this._flush()}_render(t,r){this.task&&(this.task.active&&this._flush(),this._write(this.std,r?`${t}... ${r}`:`${t}...`))}_resume(){}_start(){this.task&&this._render(this.task.action,this.task.status)}_stop(t){this.task&&this._updateStatus(t,this.task.status,!0)}_updateStatus(t,r,i=!1){this.task&&(this.task.active&&!r?this._write(this.std,` ${t}`):this._write(this.std,`${this.task.action}... ${t}`),(i||!r)&&this._flush())}};
|
|
90
|
-
`).map(r=>Math.ceil(r.length/
|
|
91
|
-
`,this._write(this.std,this.output)}_reset(){if(!this.output)return;let t=this._lines(this.output);this._write(this.std,
|
|
88
|
+
`)}catch(t){this._write("stderr",(0,rp.inspect)(t))}}_pause(t){throw new Error("not implemented")}_resume(){this.task&&this.start(this.task.action,this.task.status)}_start(t){throw new Error("not implemented")}_stdout(t){try{if(t){if(this.stdmocks)return;this.stdmockOrigs={stderr:process.stderr.write,stdout:process.stdout.write},this.stdmocks=[],process.stdout.write=(...r)=>(this.stdmocks.push(["stdout",r]),!0),process.stderr.write=(...r)=>(this.stdmocks.push(["stderr",r]),!0)}else{if(!this.stdmocks)return;delete this.stdmocks,process.stdout.write=this.stdmockOrigs.stdout,process.stderr.write=this.stdmockOrigs.stderr}}catch(r){this._write("stderr",(0,rp.inspect)(r))}}_stop(t){throw new Error("not implemented")}_updateStatus(t,r){}_write(t,r){switch(t){case"stdout":{this.stdmockOrigs.stdout.apply(process.stdout,(0,ip.castArray)(r));break}case"stderr":{this.stdmockOrigs.stderr.apply(process.stderr,(0,ip.castArray)(r));break}default:throw new Error(`invalid std: ${t}`)}}get globals(){global.ux=global.ux||{};let t=global.ux;return t.action=t.action||{},t}};vs.ActionBase=Ua});var np=w(za=>{"use strict";y();Object.defineProperty(za,"__esModule",{value:!0});var OC=ws(),Wa=class extends OC.ActionBase{type="simple";_flush(){this._write(this.std,`
|
|
89
|
+
`),this._flushStdout()}_pause(t){t?this._updateStatus(t):this._flush()}_render(t,r){this.task&&(this.task.active&&this._flush(),this._write(this.std,r?`${t}... ${r}`:`${t}...`))}_resume(){}_start(){this.task&&this._render(this.task.action,this.task.status)}_stop(t){this.task&&this._updateStatus(t,this.task.status,!0)}_updateStatus(t,r,i=!1){this.task&&(this.task.active&&!r?this._write(this.std,` ${t}`):this._write(this.std,`${this.task.action}... ${t}`),(i||!r)&&this._flush())}};za.default=Wa});var sp=w(Ja=>{"use strict";y();Object.defineProperty(Ja,"__esModule",{value:!0});Ja.default={arc:{frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"],interval:100},arrow:{frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"],interval:100},arrow2:{frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "],interval:80},arrow3:{frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"],interval:120},balloon:{frames:[" ",".","o","O","@","*"," "],interval:140},balloon2:{frames:[".","o","O","\xB0","O","o","."],interval:120},bounce:{frames:["\u2801","\u2802","\u2804","\u2802"],interval:120},bouncingBall:{frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"],interval:80},bouncingBar:{frames:["[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"],interval:80},boxBounce:{frames:["\u2596","\u2598","\u259D","\u2597"],interval:120},boxBounce2:{frames:["\u258C","\u2580","\u2590","\u2584"],interval:100},circle:{frames:["\u25E1","\u2299","\u25E0"],interval:120},circleHalves:{frames:["\u25D0","\u25D3","\u25D1","\u25D2"],interval:50},circleQuarters:{frames:["\u25F4","\u25F7","\u25F6","\u25F5"],interval:120},clock:{frames:["\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "],interval:100},dots:{frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],interval:80},dots2:{frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"],interval:80},dots3:{frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"],interval:80},dots4:{frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"],interval:80},dots5:{frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"],interval:80},dots6:{frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"],interval:80},dots7:{frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"],interval:80},dots8:{frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"],interval:80},dots9:{frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"],interval:80},dots10:{frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"],interval:80},dots11:{frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"],interval:100},earth:{frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "],interval:180},flip:{frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"],interval:70},growHorizontal:{frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"],interval:120},growVertical:{frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"],interval:120},hamburger:{frames:["\u2631","\u2632","\u2634"],interval:100},hearts:{frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "],interval:100},hexagon:{frames:["\u2B21","\u2B22"],interval:400},line:{frames:["-","\\","|","/"],interval:130},line2:{frames:["\u2802","-","\u2013","\u2014","\u2013","-"],interval:100},monkey:{frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "],interval:300},moon:{frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "],interval:80},noise:{frames:["\u2593","\u2592","\u2591"],interval:100},pipe:{frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"],interval:100},pong:{frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"],interval:80},runner:{frames:["\u{1F6B6} ","\u{1F3C3} "],interval:140},simpleDots:{frames:[". ",".. ","..."," "],interval:400},simpleDotsScrolling:{frames:[". ",".. ","..."," .."," ."," "],interval:200},smiley:{frames:["\u{1F604} ","\u{1F61D} "],interval:200},squareCorners:{frames:["\u25F0","\u25F3","\u25F2","\u25F1"],interval:180},squish:{frames:["\u256B","\u256A"],interval:100},star:{frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"],interval:70},star2:{frames:["+","x","*"],interval:80},toggle:{frames:["\u22B6","\u22B7"],interval:250},toggle2:{frames:["\u25AB","\u25AA"],interval:80},toggle3:{frames:["\u25A1","\u25A0"],interval:120},toggle4:{frames:["\u25A0","\u25A1","\u25AA","\u25AB"],interval:100},toggle5:{frames:["\u25AE","\u25AF"],interval:100},toggle6:{frames:["\u101D","\u1040"],interval:300},toggle7:{frames:["\u29BE","\u29BF"],interval:80},toggle8:{frames:["\u25CD","\u25CC"],interval:100},toggle9:{frames:["\u25C9","\u25CE"],interval:100},toggle10:{frames:["\u3282","\u3280","\u3281"],interval:100},toggle11:{frames:["\u29C7","\u29C6"],interval:50},toggle12:{frames:["\u2617","\u2616"],interval:120},toggle13:{frames:["=","*","-"],interval:80},triangle:{frames:["\u25E2","\u25E3","\u25E4","\u25E5"],interval:50}}});var ap=w(nt=>{"use strict";y();var kC=nt&&nt.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),PC=nt&&nt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),IC=nt&&nt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&kC(t,e,r);return PC(t,e),t},Es=nt&&nt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(nt,"__esModule",{value:!0});var NC=Es(jl()),RC=Es(We()),MC=Es(Rr()),Ga=IC(bv()),LC=ar(),BC=ws(),op=Es(sp()),Va=Xo();function jC(e){return Ga?(Ga.stdout?Ga.stdout.has256:(process.env.TERM||"").includes("256"))?`\x1B[38;5;104m${e}${NC.default.reset.open}`:RC.default.magenta(e):e}var Ya=class extends BC.ActionBase{frameIndex;frames;spinner;type="spinner";constructor(){super(),this.frames=this.getFrames(),this.frameIndex=0}_frame(){let t=this.frames[this.frameIndex];return this.frameIndex=++this.frameIndex%this.frames.length,jC(t)}_lines(t){return(0,MC.default)(t).split(`
|
|
90
|
+
`).map(r=>Math.ceil(r.length/LC.errtermwidth)).reduce((r,i)=>r+i,0)}_pause(t){this.spinner&&clearInterval(this.spinner),this._reset(),t&&this._render(` ${t}`),this.output=void 0}_render(t){if(!this.task)return;this._reset(),this._flushStdout();let r=t==="spinner"?` ${this._frame()}`:t||"",i=this.task.status?` ${this.task.status}`:"";this.output=`${this.task.action}...${r}${i}
|
|
91
|
+
`,this._write(this.std,this.output)}_reset(){if(!this.output)return;let t=this._lines(this.output);this._write(this.std,Va.cursorLeft+Va.cursorUp(t)+Va.eraseDown),this.output=void 0}_start(t){t.style&&(this.frames=this.getFrames(t)),this._reset(),this.spinner&&clearInterval(this.spinner),this._render(),this.spinner=setInterval(i=>this._render.bind(this)(i),process.platform==="win32"?500:100,"spinner"),this.spinner.unref()}_stop(t){this.task&&(this.task.status=t),this.spinner&&clearInterval(this.spinner),this._render(),this.output=void 0}getFrames(t){return t?.style?op.default[t.style].frames:op.default[process.platform==="win32"?"line":"dots2"].frames}};nt.default=Ya});var Cs=w(mt=>{"use strict";y();var Xa=mt&&mt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mt,"__esModule",{value:!0});mt.config=mt.Config=void 0;var $C=Xa(it()),qC=Xa(np()),HC=Xa(ap()),up=global,Ut=up.ux||(up.ux={}),UC=!!process.stderr.isTTY&&!process.env.CI&&!["dumb","emacs-color"].includes(process.env.TERM)&&"spinner"||"simple",WC=UC==="spinner"?HC.default:qC.default,bs=class{action=new WC;errorsHandled=!1;outputLevel="info";showStackTrace=!0;get context(){return Ut.context||{}}set context(t){Ut.context=t}get debug(){return Ut.debug||process.env.DEBUG==="*"}set debug(t){Ut.debug=t}};mt.Config=bs;function zC(){let t=$C.default.getInstance().get("@oclif/core")?.version.split(".")[0]||"unknown";return Ut[t]||(Ut[t]=new bs),Ut[t]}mt.config=zC();mt.default=mt.config});var As=w(Ds=>{"use strict";y();Object.defineProperty(Ds,"__esModule",{value:!0});Ds.flush=void 0;var JC=Ge();function GC(e,t){function r(i,n=!1){return new Promise(o=>{let s=setTimeout(()=>o(null),i);n&&s.unref()})}return Promise.race([e,r(t,!0).then(()=>(0,JC.error)("timed out"))])}async function VC(){let e=new Promise(r=>{process.stdout.once("drain",()=>r(null))});if(!process.stdout.write(""))return e}async function YC(e=1e4){await GC(VC(),e)}Ds.flush=YC});var hp=w((W2,lp)=>{"use strict";y();var Wt=process.stdin,gt=process.stderr,_s={hide:(e,t={})=>_s.raw(e,!1,t),mask:(e,t={})=>_s.raw(e,!0,t),raw:(e,t,r={})=>!Wt.setRawMode||process.env.TERM==="dumb"?_s.notty(e):new Promise(function(i,n){let o=Xo(),s="";gt.write(o.eraseLine),gt.write(o.cursorLeft),gt.write(e),Wt.resume(),Wt.setRawMode(!0);function u(){t?gt.write(o.cursorHide+o.cursorLeft+e+s.replace(/./g,"*")+`
|
|
92
92
|
`+o.cursorShow):gt.write(`
|
|
93
93
|
`),Wt.removeListener("data",d),Wt.setRawMode(!1),Wt.pause()}function l(){r.required&&s.length===0||(u(),s=s.replace(/\r$/,""),s=s||r.default,i(s))}function m(){n(new Error("SIGINT")),u()}function p(){s.length!==0&&(s=s.substr(0,s.length-1),gt.write(o.cursorBackward(1)),gt.write(o.eraseEndLine))}function f(a){s+=a,gt.write(t?a:"*".repeat(a.length))}let d=function(a){switch(a){case"":case"\r":case`
|
|
94
|
-
`:return l();case"":return m();default:return a.charCodeAt(0)===127?p():f(a)}};Wt.on("data",d)}),notty:e=>new Promise((t,r)=>{let i=
|
|
95
|
-
`),n.error)return r(n.error);t(n.stdout.trim())})};function
|
|
96
|
-
`),r==="q"&&
|
|
97
|
-
`)}
|
|
98
|
-
`),this.dy++}write(t,r=!1){this.linewrap===!0&&r===!1?this.stream.write(t.substr(0,this.getWidth())):this.stream.write(t)}lineWrapping(t){this.stream.isTTY&&(this.linewrap=t,t?this.stream.write("\x1B[?7h"):this.stream.write("\x1B[?7l"))}isTTY(){return this.stream.isTTY===!0}getWidth(){return this.stream.columns||(this.stream.isTTY?80:200)}};Sp.exports=ru});var nu=w((PM,Fp)=>{y();Fp.exports=function(t,r,i){if(r.autopadding!==!0)return t;function n(o,s){return(r.autopaddingChar+o).slice(-s)}return i==="percentage"?n(t,3):t}});var su=w((NM,Tp)=>{y();Tp.exports=function(t,r){let i=Math.round(t*r.barsize),n=r.barsize-i;return r.barCompleteString.substr(0,i)+r.barGlue+r.barIncompleteString.substr(0,n)}});var ou=w((MM,Op)=>{y();Op.exports=function(t,r,i){function n(s){return i?i*Math.round(s/i):s}function o(s){return(r.autopaddingChar+s).slice(-2)}return t>3600?o(Math.floor(t/3600))+"h"+o(n(t%3600/60))+"m":t>60?o(Math.floor(t/60))+"m"+o(n(t%60))+"s":t>10?o(n(t))+"s":o(t)+"s"}});var au=w((BM,kp)=>{y();var wD=Ko(),ED=nu(),bD=su(),CD=ou();kp.exports=function(t,r,i){let n=t.format,o=t.formatTime||CD,s=t.formatValue||ED,u=t.formatBar||bD,l=Math.floor(r.progress*100)+"",m=r.stopTime||Date.now(),p=Math.round((m-r.startTime)/1e3),f=Object.assign({},i,{bar:u(r.progress,t),percentage:s(l,t,"percentage"),total:s(r.total,t,"total"),value:s(r.value,t,"value"),eta:s(r.eta,t,"eta"),eta_formatted:o(r.eta,t,5),duration:s(p,t,"duration"),duration_formatted:o(p,t,1)});n=n.replace(/\{(\w+)\}/g,function(c,h){return typeof f[h]<"u"?f[h]:c});let d=Math.max(0,r.maxWidth-wD(n)-2),a=Math.floor(d/2);switch(t.align){case"right":n=d>0?" ".repeat(d)+n:n;break;case"center":n=a>0?" ".repeat(a)+n:n;break;default:break}return n}});var Os=w(($M,Pp)=>{y();function z(e,t){return typeof e>"u"||e===null?t:e}Pp.exports={parse:function(t,r){let i={},n=Object.assign({},r,t);return i.throttleTime=1e3/z(n.fps,10),i.stream=z(n.stream,process.stderr),i.terminal=z(n.terminal,null),i.clearOnComplete=z(n.clearOnComplete,!1),i.stopOnComplete=z(n.stopOnComplete,!1),i.barsize=z(n.barsize,40),i.align=z(n.align,"left"),i.hideCursor=z(n.hideCursor,!1),i.linewrap=z(n.linewrap,!1),i.barGlue=z(n.barGlue,""),i.barCompleteChar=z(n.barCompleteChar,"="),i.barIncompleteChar=z(n.barIncompleteChar,"-"),i.format=z(n.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),i.formatTime=z(n.formatTime,null),i.formatValue=z(n.formatValue,null),i.formatBar=z(n.formatBar,null),i.etaBufferLength=z(n.etaBuffer,10),i.etaAsynchronousUpdate=z(n.etaAsynchronousUpdate,!1),i.progressCalculationRelative=z(n.progressCalculationRelative,!1),i.synchronousUpdate=z(n.synchronousUpdate,!0),i.noTTYOutput=z(n.noTTYOutput,!1),i.notTTYSchedule=z(n.notTTYSchedule,2e3),i.emptyOnZero=z(n.emptyOnZero,!1),i.forceRedraw=z(n.forceRedraw,!1),i.autopadding=z(n.autopadding,!1),i.gracefulExit=z(n.gracefulExit,!1),i},assignDerivedOptions:function(t){return t.barCompleteString=t.barCompleteChar.repeat(t.barsize+1),t.barIncompleteString=t.barIncompleteChar.repeat(t.barsize+1),t.autopaddingChar=t.autopadding?z(t.autopaddingChar," "):"",t}}});var uu=w((UM,Np)=>{y();var Ip=_p(),DD=iu(),AD=au(),_D=Os(),SD=S("events");Np.exports=class extends SD{constructor(t){super(),this.options=_D.assignDerivedOptions(t),this.terminal=this.options.terminal?this.options.terminal:new DD(this.options.stream),this.value=0,this.startValue=0,this.total=100,this.lastDrawnString=null,this.startTime=null,this.stopTime=null,this.lastRedraw=Date.now(),this.eta=new Ip(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter=typeof this.options.format=="function"?this.options.format:AD}render(t=!1){let r={progress:this.getProgress(),eta:this.eta.getTime(),startTime:this.startTime,stopTime:this.stopTime,total:this.total,value:this.value,maxWidth:this.terminal.getWidth()};this.options.etaAsynchronousUpdate&&this.updateETA();let i=this.formatter(this.options,r,this.payload);(t||this.options.forceRedraw||this.options.noTTYOutput&&!this.terminal.isTTY()||this.lastDrawnString!=i)&&(this.emit("redraw-pre"),this.terminal.cursorTo(0,null),this.terminal.write(i),this.terminal.clearRight(),this.lastDrawnString=i,this.lastRedraw=Date.now(),this.emit("redraw-post"))}start(t,r,i){this.value=r||0,this.total=typeof t<"u"&&t>=0?t:100,this.startValue=r||0,this.payload=i||{},this.startTime=Date.now(),this.stopTime=null,this.lastDrawnString="",this.eta=new Ip(this.options.etaBufferLength,this.startTime,this.value),this.isActive=!0,this.emit("start",t,r)}stop(){this.isActive=!1,this.stopTime=Date.now(),this.emit("stop",this.total,this.value)}update(t,r={}){typeof t=="number"&&(this.value=t,this.eta.update(Date.now(),t,this.total));let i=(typeof t=="object"?t:r)||{};this.emit("update",this.total,this.value);for(let n in i)this.payload[n]=i[n];this.value>=this.getTotal()&&this.options.stopOnComplete&&this.stop()}getProgress(){let t=this.value/this.total;return this.options.progressCalculationRelative&&(t=(this.value-this.startValue)/(this.total-this.startValue)),isNaN(t)&&(t=this.options&&this.options.emptyOnZero?0:1),t=Math.min(Math.max(t,0),1),t}increment(t=1,r={}){typeof t=="object"?this.update(this.value+1,t):this.update(this.value+t,r)}getTotal(){return this.total}setTotal(t){typeof t<"u"&&t>=0&&(this.total=t)}updateETA(){this.eta.update(Date.now(),this.value,this.total)}}});var Mp=w((JM,Rp)=>{y();var FD=uu(),TD=Os();Rp.exports=class extends FD{constructor(t,r){super(TD.parse(t,r)),this.timer=null,this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.options.synchronousUpdate=!1),this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.sigintCallback=null}render(){this.timer&&(clearTimeout(this.timer),this.timer=null),super.render(),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&this.terminal.newline(),this.timer=setTimeout(this.render.bind(this),this.schedulingRate)}update(t,r){this.timer&&(super.update(t,r),this.options.synchronousUpdate&&this.lastRedraw+this.options.throttleTime*2<Date.now()&&this.render())}start(t,r,i){this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.terminal.cursorSave(),this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),super.start(t,r,i),this.render())}stop(){this.timer&&(this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.render(),super.stop(),clearTimeout(this.timer),this.timer=null,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRestore(),this.options.clearOnComplete?(this.terminal.cursorTo(0,null),this.terminal.clearLine()):this.terminal.newline())}}});var Bp=w((XM,Lp)=>{y();var OD=iu(),kD=uu(),PD=Os(),ID=S("events");Lp.exports=class extends ID{constructor(t,r){super(),this.bars=[],this.options=PD.parse(t,r),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new OD(this.options.stream),this.timer=null,this.isActive=!1,this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.loggingBuffer=[],this.sigintCallback=null}create(t,r,i,n={}){let o=new kD(Object.assign({},this.options,{terminal:this.terminal},n));return this.bars.push(o),this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.isActive||(this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),this.timer=setTimeout(this.update.bind(this),this.schedulingRate)),this.isActive=!0,o.start(t,r,i),this.emit("start")),o}remove(t){let r=this.bars.indexOf(t);return r<0?!1:(this.bars.splice(r,1),this.update(),this.terminal.newline(),this.terminal.clearBottom(),!0)}update(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.emit("update-pre"),this.terminal.cursorRelativeReset(),this.emit("redraw-pre"),this.loggingBuffer.length>0)for(this.terminal.clearLine();this.loggingBuffer.length>0;)this.terminal.write(this.loggingBuffer.shift(),!0);for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render();this.emit("redraw-post"),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.terminal.newline(),this.terminal.newline()),this.timer=setTimeout(this.update.bind(this),this.schedulingRate),this.emit("update-post"),this.options.stopOnComplete&&!this.bars.find(t=>t.isActive)&&this.stop()}stop(){if(clearTimeout(this.timer),this.timer=null,this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.isActive=!1,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRelativeReset(),this.emit("stop-pre-clear"),this.options.clearOnComplete)this.terminal.clearBottom();else{for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render(),this.bars[t].stop();this.terminal.newline()}this.emit("stop")}log(t){this.loggingBuffer.push(t)}}});var $p=w((KM,jp)=>{y();jp.exports={format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"}});var Hp=w((ZM,qp)=>{y();qp.exports={format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var Wp=w((tL,Up)=>{y();Up.exports={format:" \x1B[90m{bar}\x1B[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var Jp=w((iL,zp)=>{y();zp.exports={format:" {bar}\u25A0 {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u25A0",barIncompleteChar:" "}});var Vp=w((sL,Gp)=>{y();var ND=$p(),RD=Hp(),MD=Wp(),LD=Jp();Gp.exports={legacy:ND,shades_classic:RD,shades_grey:MD,rect:LD}});var Kp=w((aL,Yp)=>{y();var Xp=Mp(),BD=Bp(),jD=Vp(),$D=au(),qD=nu(),HD=su(),UD=ou();Yp.exports={Bar:Xp,SingleBar:Xp,MultiBar:BD,Presets:jD,Format:{Formatter:$D,BarFormat:HD,ValueFormat:qD,TimeFormat:UD}}});var Qp=w(cu=>{"use strict";y();Object.defineProperty(cu,"__esModule",{value:!0});var WD=Kp();function zD(e={}){return new WD.SingleBar({noTTYOutput:process.env.TERM==="dumb"||!process.stdin.isTTY,...e})}cu.default=zD});var mr=w((hL,dr)=>{"use strict";y();function Zp(e){return typeof e>"u"||e===null}function JD(e){return typeof e=="object"&&e!==null}function GD(e){return Array.isArray(e)?e:Zp(e)?[]:[e]}function VD(e,t){var r,i,n,o;if(t)for(o=Object.keys(t),r=0,i=o.length;r<i;r+=1)n=o[r],e[n]=t[n];return e}function XD(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}function YD(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}dr.exports.isNothing=Zp;dr.exports.isObject=JD;dr.exports.toArray=GD;dr.exports.repeat=XD;dr.exports.isNegativeZero=YD;dr.exports.extend=VD});var ri=w((pL,ed)=>{"use strict";y();function Gi(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Gi.prototype=Object.create(Error.prototype);Gi.prototype.constructor=Gi;Gi.prototype.toString=function(t){var r=this.name+": ";return r+=this.reason||"(unknown reason)",!t&&this.mark&&(r+=" "+this.mark.toString()),r};ed.exports=Gi});var id=w((mL,rd)=>{"use strict";y();var td=mr();function lu(e,t,r,i,n){this.name=e,this.buffer=t,this.position=r,this.line=i,this.column=n}lu.prototype.getSnippet=function(t,r){var i,n,o,s,u;if(!this.buffer)return null;for(t=t||4,r=r||75,i="",n=this.position;n>0&&`\0\r
|
|
94
|
+
`:return l();case"":return m();default:return a.charCodeAt(0)===127?p():f(a)}};Wt.on("data",d)}),notty:e=>new Promise((t,r)=>{let i=wv();gt.write(e);let n=i.sync("sh",["-c","read -s PASS && echo $PASS"],{stdio:["inherit","pipe","inherit"],encoding:"utf8"});if(gt.write(`
|
|
95
|
+
`),n.error)return r(n.error);t(n.stdout.trim())})};function cp(e,t={}){return t=Object.assign({method:"mask",required:t.default===void 0,default:""},t),Wt.setEncoding("utf8"),_s[t.method](e,t).then(r=>r||(t.required?cp(e):""))}lp.exports=cp});var yp=w(De=>{"use strict";y();var XC=De&&De.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),KC=De&&De.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),QC=De&&De.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&XC(t,e,r);return KC(t,e),t},ZC=De&&De.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(De,"__esModule",{value:!0});De.anykey=De.confirm=De.prompt=void 0;var Ui=ZC(We()),fp=QC(Ge()),dp=Cs();function Ka(e,t=100){if(t<0)throw new Error("no input");return new Promise((r,i)=>{let n;e.timeout&&(n=setTimeout(()=>{process.stdin.pause(),i(new Error("Prompt timeout"))},e.timeout),n.unref()),process.stdin.setEncoding("utf8"),process.stderr.write(e.prompt),process.stdin.resume(),process.stdin.once("data",o=>{n&&clearTimeout(n),process.stdin.pause();let s=(typeof o=="string"?o:o.toString()).trim();!e.default&&e.required&&s===""?r(Ka(e,t-1)):r(s||e.default)})})}function pp(e,t,r){let i="> ";return r&&t==="hide"&&(r="*".repeat(r.length)),e&&r?i=e+" "+Ui.default.yellow("["+r+"]")+": ":e&&(i=`${e}: `),i}async function eD(e){let t=process.stdin.isRaw;process.stdin.setRawMode&&process.stdin.setRawMode(!0),e.required=e.required??!1;let r=await Ka(e);return process.stdin.setRawMode&&process.stdin.setRawMode(!!t),r}function tD(e){let t=Xo();process.stderr.write(t.cursorHide+t.cursorUp(1)+t.cursorLeft+e+t.cursorDown(1)+t.cursorLeft+t.cursorShow)}async function mp(e,t={}){let r=pp(e,t.type,t.default),i={default:"",isTTY:!!(process.env.TERM!=="dumb"&&process.stdin.isTTY),name:e,prompt:r,required:!0,type:"normal",...t},n=hp();switch(i.type){case"normal":return Ka(i);case"single":return eD(i);case"mask":return n(i.prompt,{default:i.default,method:i.type,required:i.required}).then(o=>(tD(pp(e,"hide",t.default)),o));case"hide":return n(i.prompt,{default:i.default,method:i.type,required:i.required});default:throw new Error(`unexpected type ${i.type}`)}}async function gp(e,t={}){return dp.config.action.pauseAsync(()=>mp(e,t),Ui.default.cyan("?"))}De.prompt=gp;function rD(e){return dp.config.action.pauseAsync(async()=>{let t=async()=>{let i=(await mp(e)).toLowerCase();return["n","no"].includes(i)?!1:["y","yes"].includes(i)?!0:t()};return t()},Ui.default.cyan("?"))}De.confirm=rD;async function iD(e){let t=!!process.stdin.setRawMode;e||(e=t?`Press any key to continue or ${Ui.default.yellow("q")} to exit`:`Press enter to continue or ${Ui.default.yellow("q")} to exit`);let r=await gp(e,{required:!1,type:"single"});return t&&process.stderr.write(`
|
|
96
|
+
`),r==="q"&&fp.error("quit"),r===""&&fp.error("ctrl-c"),r}De.anykey=iD});var vp=w(Wi=>{"use strict";y();var nD=Wi&&Wi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Wi,"__esModule",{value:!0});var sD=nD(We()),xp=S("node:util");function oD(e,t){let r=[],i=Object.keys(e).map(u=>u.toString().length),n=Math.max(...i)+2;function o(u){return typeof u=="string"||typeof u=="number"?u:typeof u=="object"?Object.keys(u).map(l=>l+": "+(0,xp.inspect)(u[l])).join(", "):(0,xp.inspect)(u)}let s=(u,l)=>`${sD.default.blue(u)}:`+" ".repeat(n-u.length-1)+o(l);for(let u of t||Object.keys(e).sort()){let l=e[u];if(Array.isArray(l)){if(l.length>0){r.push(s(u,l[0]));for(let m of l.slice(1))r.push(" ".repeat(n)+o(m))}}else l!=null&&r.push(s(u,l))}return r.join(`
|
|
97
|
+
`)}Wi.default=oD});var Ep=w((X2,wp)=>{y();var Qa=class{constructor(t,r,i){this.etaBufferLength=t||100,this.valueBuffer=[i],this.timeBuffer=[r],this.eta="0"}update(t,r,i){this.valueBuffer.push(r),this.timeBuffer.push(t),this.calculate(i-r)}getTime(){return this.eta}calculate(t){let r=this.valueBuffer.length,i=Math.min(this.etaBufferLength,r),n=this.valueBuffer[r-1]-this.valueBuffer[r-i],o=this.timeBuffer[r-1]-this.timeBuffer[r-i],s=n/o;this.valueBuffer=this.valueBuffer.slice(-this.etaBufferLength),this.timeBuffer=this.timeBuffer.slice(-this.etaBufferLength);let u=Math.ceil(t/s/1e3);isNaN(u)?this.eta="NULL":isFinite(u)?u>1e7?this.eta="INF":u<0?this.eta=0:this.eta=u:this.eta="INF"}};wp.exports=Qa});var eu=w((Q2,bp)=>{y();var pr=S("readline"),Za=class{constructor(t){this.stream=t,this.linewrap=!0,this.dy=0}cursorSave(){this.stream.isTTY&&this.stream.write("\x1B7")}cursorRestore(){this.stream.isTTY&&this.stream.write("\x1B8")}cursor(t){this.stream.isTTY&&(t?this.stream.write("\x1B[?25h"):this.stream.write("\x1B[?25l"))}cursorTo(t=null,r=null){this.stream.isTTY&&pr.cursorTo(this.stream,t,r)}cursorRelative(t=null,r=null){this.stream.isTTY&&(this.dy=this.dy+r,pr.moveCursor(this.stream,t,r))}cursorRelativeReset(){this.stream.isTTY&&(pr.moveCursor(this.stream,0,-this.dy),pr.cursorTo(this.stream,0,null),this.dy=0)}clearRight(){this.stream.isTTY&&pr.clearLine(this.stream,1)}clearLine(){this.stream.isTTY&&pr.clearLine(this.stream,0)}clearBottom(){this.stream.isTTY&&pr.clearScreenDown(this.stream)}newline(){this.stream.write(`
|
|
98
|
+
`),this.dy++}write(t,r=!1){this.linewrap===!0&&r===!1?this.stream.write(t.substr(0,this.getWidth())):this.stream.write(t)}lineWrapping(t){this.stream.isTTY&&(this.linewrap=t,t?this.stream.write("\x1B[?7h"):this.stream.write("\x1B[?7l"))}isTTY(){return this.stream.isTTY===!0}getWidth(){return this.stream.columns||(this.stream.isTTY?80:200)}};bp.exports=Za});var tu=w((eM,Cp)=>{y();Cp.exports=function(t,r,i){if(r.autopadding!==!0)return t;function n(o,s){return(r.autopaddingChar+o).slice(-s)}return i==="percentage"?n(t,3):t}});var ru=w((rM,Dp)=>{y();Dp.exports=function(t,r){let i=Math.round(t*r.barsize),n=r.barsize-i;return r.barCompleteString.substr(0,i)+r.barGlue+r.barIncompleteString.substr(0,n)}});var iu=w((nM,Ap)=>{y();Ap.exports=function(t,r,i){function n(s){return i?i*Math.round(s/i):s}function o(s){return(r.autopaddingChar+s).slice(-2)}return t>3600?o(Math.floor(t/3600))+"h"+o(n(t%3600/60))+"m":t>60?o(Math.floor(t/60))+"m"+o(n(t%60))+"s":t>10?o(n(t))+"s":o(t)+"s"}});var nu=w((oM,_p)=>{y();var aD=Vo(),uD=tu(),cD=ru(),lD=iu();_p.exports=function(t,r,i){let n=t.format,o=t.formatTime||lD,s=t.formatValue||uD,u=t.formatBar||cD,l=Math.floor(r.progress*100)+"",m=r.stopTime||Date.now(),p=Math.round((m-r.startTime)/1e3),f=Object.assign({},i,{bar:u(r.progress,t),percentage:s(l,t,"percentage"),total:s(r.total,t,"total"),value:s(r.value,t,"value"),eta:s(r.eta,t,"eta"),eta_formatted:o(r.eta,t,5),duration:s(p,t,"duration"),duration_formatted:o(p,t,1)});n=n.replace(/\{(\w+)\}/g,function(c,h){return typeof f[h]<"u"?f[h]:c});let d=Math.max(0,r.maxWidth-aD(n)-2),a=Math.floor(d/2);switch(t.align){case"right":n=d>0?" ".repeat(d)+n:n;break;case"center":n=a>0?" ".repeat(a)+n:n;break;default:break}return n}});var Ss=w((uM,Sp)=>{y();function z(e,t){return typeof e>"u"||e===null?t:e}Sp.exports={parse:function(t,r){let i={},n=Object.assign({},r,t);return i.throttleTime=1e3/z(n.fps,10),i.stream=z(n.stream,process.stderr),i.terminal=z(n.terminal,null),i.clearOnComplete=z(n.clearOnComplete,!1),i.stopOnComplete=z(n.stopOnComplete,!1),i.barsize=z(n.barsize,40),i.align=z(n.align,"left"),i.hideCursor=z(n.hideCursor,!1),i.linewrap=z(n.linewrap,!1),i.barGlue=z(n.barGlue,""),i.barCompleteChar=z(n.barCompleteChar,"="),i.barIncompleteChar=z(n.barIncompleteChar,"-"),i.format=z(n.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),i.formatTime=z(n.formatTime,null),i.formatValue=z(n.formatValue,null),i.formatBar=z(n.formatBar,null),i.etaBufferLength=z(n.etaBuffer,10),i.etaAsynchronousUpdate=z(n.etaAsynchronousUpdate,!1),i.progressCalculationRelative=z(n.progressCalculationRelative,!1),i.synchronousUpdate=z(n.synchronousUpdate,!0),i.noTTYOutput=z(n.noTTYOutput,!1),i.notTTYSchedule=z(n.notTTYSchedule,2e3),i.emptyOnZero=z(n.emptyOnZero,!1),i.forceRedraw=z(n.forceRedraw,!1),i.autopadding=z(n.autopadding,!1),i.gracefulExit=z(n.gracefulExit,!1),i},assignDerivedOptions:function(t){return t.barCompleteString=t.barCompleteChar.repeat(t.barsize+1),t.barIncompleteString=t.barIncompleteChar.repeat(t.barsize+1),t.autopaddingChar=t.autopadding?z(t.autopaddingChar," "):"",t}}});var su=w((hM,Tp)=>{y();var Fp=Ep(),hD=eu(),fD=nu(),pD=Ss(),dD=S("events");Tp.exports=class extends dD{constructor(t){super(),this.options=pD.assignDerivedOptions(t),this.terminal=this.options.terminal?this.options.terminal:new hD(this.options.stream),this.value=0,this.startValue=0,this.total=100,this.lastDrawnString=null,this.startTime=null,this.stopTime=null,this.lastRedraw=Date.now(),this.eta=new Fp(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter=typeof this.options.format=="function"?this.options.format:fD}render(t=!1){let r={progress:this.getProgress(),eta:this.eta.getTime(),startTime:this.startTime,stopTime:this.stopTime,total:this.total,value:this.value,maxWidth:this.terminal.getWidth()};this.options.etaAsynchronousUpdate&&this.updateETA();let i=this.formatter(this.options,r,this.payload);(t||this.options.forceRedraw||this.options.noTTYOutput&&!this.terminal.isTTY()||this.lastDrawnString!=i)&&(this.emit("redraw-pre"),this.terminal.cursorTo(0,null),this.terminal.write(i),this.terminal.clearRight(),this.lastDrawnString=i,this.lastRedraw=Date.now(),this.emit("redraw-post"))}start(t,r,i){this.value=r||0,this.total=typeof t<"u"&&t>=0?t:100,this.startValue=r||0,this.payload=i||{},this.startTime=Date.now(),this.stopTime=null,this.lastDrawnString="",this.eta=new Fp(this.options.etaBufferLength,this.startTime,this.value),this.isActive=!0,this.emit("start",t,r)}stop(){this.isActive=!1,this.stopTime=Date.now(),this.emit("stop",this.total,this.value)}update(t,r={}){typeof t=="number"&&(this.value=t,this.eta.update(Date.now(),t,this.total));let i=(typeof t=="object"?t:r)||{};this.emit("update",this.total,this.value);for(let n in i)this.payload[n]=i[n];this.value>=this.getTotal()&&this.options.stopOnComplete&&this.stop()}getProgress(){let t=this.value/this.total;return this.options.progressCalculationRelative&&(t=(this.value-this.startValue)/(this.total-this.startValue)),isNaN(t)&&(t=this.options&&this.options.emptyOnZero?0:1),t=Math.min(Math.max(t,0),1),t}increment(t=1,r={}){typeof t=="object"?this.update(this.value+1,t):this.update(this.value+t,r)}getTotal(){return this.total}setTotal(t){typeof t<"u"&&t>=0&&(this.total=t)}updateETA(){this.eta.update(Date.now(),this.value,this.total)}}});var kp=w((dM,Op)=>{y();var mD=su(),gD=Ss();Op.exports=class extends mD{constructor(t,r){super(gD.parse(t,r)),this.timer=null,this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.options.synchronousUpdate=!1),this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.sigintCallback=null}render(){this.timer&&(clearTimeout(this.timer),this.timer=null),super.render(),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&this.terminal.newline(),this.timer=setTimeout(this.render.bind(this),this.schedulingRate)}update(t,r){this.timer&&(super.update(t,r),this.options.synchronousUpdate&&this.lastRedraw+this.options.throttleTime*2<Date.now()&&this.render())}start(t,r,i){this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.terminal.cursorSave(),this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),super.start(t,r,i),this.render())}stop(){this.timer&&(this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.render(),super.stop(),clearTimeout(this.timer),this.timer=null,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRestore(),this.options.clearOnComplete?(this.terminal.cursorTo(0,null),this.terminal.clearLine()):this.terminal.newline())}}});var Ip=w((yM,Pp)=>{y();var yD=eu(),xD=su(),vD=Ss(),wD=S("events");Pp.exports=class extends wD{constructor(t,r){super(),this.bars=[],this.options=vD.parse(t,r),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new yD(this.options.stream),this.timer=null,this.isActive=!1,this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.loggingBuffer=[],this.sigintCallback=null}create(t,r,i,n={}){let o=new xD(Object.assign({},this.options,{terminal:this.terminal},n));return this.bars.push(o),this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.isActive||(this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),this.timer=setTimeout(this.update.bind(this),this.schedulingRate)),this.isActive=!0,o.start(t,r,i),this.emit("start")),o}remove(t){let r=this.bars.indexOf(t);return r<0?!1:(this.bars.splice(r,1),this.update(),this.terminal.newline(),this.terminal.clearBottom(),!0)}update(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.emit("update-pre"),this.terminal.cursorRelativeReset(),this.emit("redraw-pre"),this.loggingBuffer.length>0)for(this.terminal.clearLine();this.loggingBuffer.length>0;)this.terminal.write(this.loggingBuffer.shift(),!0);for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render();this.emit("redraw-post"),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.terminal.newline(),this.terminal.newline()),this.timer=setTimeout(this.update.bind(this),this.schedulingRate),this.emit("update-post"),this.options.stopOnComplete&&!this.bars.find(t=>t.isActive)&&this.stop()}stop(){if(clearTimeout(this.timer),this.timer=null,this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.isActive=!1,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRelativeReset(),this.emit("stop-pre-clear"),this.options.clearOnComplete)this.terminal.clearBottom();else{for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render(),this.bars[t].stop();this.terminal.newline()}this.emit("stop")}log(t){this.loggingBuffer.push(t)}}});var Rp=w((vM,Np)=>{y();Np.exports={format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"}});var Lp=w((EM,Mp)=>{y();Mp.exports={format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var jp=w((CM,Bp)=>{y();Bp.exports={format:" \x1B[90m{bar}\x1B[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var qp=w((AM,$p)=>{y();$p.exports={format:" {bar}\u25A0 {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u25A0",barIncompleteChar:" "}});var Up=w((SM,Hp)=>{y();var ED=Rp(),bD=Lp(),CD=jp(),DD=qp();Hp.exports={legacy:ED,shades_classic:bD,shades_grey:CD,rect:DD}});var Jp=w((TM,zp)=>{y();var Wp=kp(),AD=Ip(),_D=Up(),SD=nu(),FD=tu(),TD=ru(),OD=iu();zp.exports={Bar:Wp,SingleBar:Wp,MultiBar:AD,Presets:_D,Format:{Formatter:SD,BarFormat:TD,ValueFormat:FD,TimeFormat:OD}}});var Gp=w(ou=>{"use strict";y();Object.defineProperty(ou,"__esModule",{value:!0});var kD=Jp();function PD(e={}){return new kD.SingleBar({noTTYOutput:process.env.TERM==="dumb"||!process.stdin.isTTY,...e})}ou.default=PD});var mr=w((IM,dr)=>{"use strict";y();function Vp(e){return typeof e>"u"||e===null}function ID(e){return typeof e=="object"&&e!==null}function ND(e){return Array.isArray(e)?e:Vp(e)?[]:[e]}function RD(e,t){var r,i,n,o;if(t)for(o=Object.keys(t),r=0,i=o.length;r<i;r+=1)n=o[r],e[n]=t[n];return e}function MD(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}function LD(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}dr.exports.isNothing=Vp;dr.exports.isObject=ID;dr.exports.toArray=ND;dr.exports.repeat=MD;dr.exports.isNegativeZero=LD;dr.exports.extend=RD});var ti=w((RM,Yp)=>{"use strict";y();function zi(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}zi.prototype=Object.create(Error.prototype);zi.prototype.constructor=zi;zi.prototype.toString=function(t){var r=this.name+": ";return r+=this.reason||"(unknown reason)",!t&&this.mark&&(r+=" "+this.mark.toString()),r};Yp.exports=zi});var Qp=w((LM,Kp)=>{"use strict";y();var Xp=mr();function au(e,t,r,i,n){this.name=e,this.buffer=t,this.position=r,this.line=i,this.column=n}au.prototype.getSnippet=function(t,r){var i,n,o,s,u;if(!this.buffer)return null;for(t=t||4,r=r||75,i="",n=this.position;n>0&&`\0\r
|
|
99
99
|
\x85\u2028\u2029`.indexOf(this.buffer.charAt(n-1))===-1;)if(n-=1,this.position-n>r/2-1){i=" ... ",n+=5;break}for(o="",s=this.position;s<this.buffer.length&&`\0\r
|
|
100
|
-
\x85\u2028\u2029`.indexOf(this.buffer.charAt(s))===-1;)if(s+=1,s-this.position>r/2-1){o=" ... ",s-=5;break}return u=this.buffer.slice(n,s),
|
|
101
|
-
`+
|
|
102
|
-
`+r)),i};
|
|
103
|
-
\r`;function
|
|
104
|
-
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function
|
|
105
|
-
`,t-1))}function
|
|
106
|
-
`,o?1+l:l):n===
|
|
100
|
+
\x85\u2028\u2029`.indexOf(this.buffer.charAt(s))===-1;)if(s+=1,s-this.position>r/2-1){o=" ... ",s-=5;break}return u=this.buffer.slice(n,s),Xp.repeat(" ",t)+i+u+o+`
|
|
101
|
+
`+Xp.repeat(" ",t+this.position-n+i.length)+"^"};au.prototype.toString=function(t){var r,i="";return this.name&&(i+='in "'+this.name+'" '),i+="at line "+(this.line+1)+", column "+(this.column+1),t||(r=this.getSnippet(),r&&(i+=`:
|
|
102
|
+
`+r)),i};Kp.exports=au});var pe=w((jM,ed)=>{"use strict";y();var Zp=ti(),BD=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],jD=["scalar","sequence","mapping"];function $D(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}function qD(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(BD.indexOf(r)===-1)throw new Zp('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=$D(t.styleAliases||null),jD.indexOf(this.kind)===-1)throw new Zp('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}ed.exports=qD});var gr=w((qM,rd)=>{"use strict";y();var td=mr(),Fs=ti(),HD=pe();function uu(e,t,r){var i=[];return e.include.forEach(function(n){r=uu(n,t,r)}),e[t].forEach(function(n){r.forEach(function(o,s){o.tag===n.tag&&o.kind===n.kind&&i.push(s)}),r.push(n)}),r.filter(function(n,o){return i.indexOf(o)===-1})}function UD(){var e={scalar:{},sequence:{},mapping:{},fallback:{}},t,r;function i(n){e[n.kind][n.tag]=e.fallback[n.tag]=n}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}function ri(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(t){if(t.loadKind&&t.loadKind!=="scalar")throw new Fs("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=uu(this,"implicit",[]),this.compiledExplicit=uu(this,"explicit",[]),this.compiledTypeMap=UD(this.compiledImplicit,this.compiledExplicit)}ri.DEFAULT=null;ri.create=function(){var t,r;switch(arguments.length){case 1:t=ri.DEFAULT,r=arguments[0];break;case 2:t=arguments[0],r=arguments[1];break;default:throw new Fs("Wrong number of arguments for Schema.create function")}if(t=td.toArray(t),r=td.toArray(r),!t.every(function(i){return i instanceof ri}))throw new Fs("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(i){return i instanceof HD}))throw new Fs("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new ri({include:t,explicit:r})};rd.exports=ri});var nd=w((UM,id)=>{"use strict";y();var WD=pe();id.exports=new WD("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var od=w((zM,sd)=>{"use strict";y();var zD=pe();sd.exports=new zD("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var ud=w((GM,ad)=>{"use strict";y();var JD=pe();ad.exports=new JD("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var Ts=w((YM,cd)=>{"use strict";y();var GD=gr();cd.exports=new GD({explicit:[nd(),od(),ud()]})});var hd=w((KM,ld)=>{"use strict";y();var VD=pe();function YD(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function XD(){return null}function KD(e){return e===null}ld.exports=new VD("tag:yaml.org,2002:null",{kind:"scalar",resolve:YD,construct:XD,predicate:KD,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var pd=w((ZM,fd)=>{"use strict";y();var QD=pe();function ZD(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function eA(e){return e==="true"||e==="True"||e==="TRUE"}function tA(e){return Object.prototype.toString.call(e)==="[object Boolean]"}fd.exports=new QD("tag:yaml.org,2002:bool",{kind:"scalar",resolve:ZD,construct:eA,predicate:tA,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})});var md=w((tL,dd)=>{"use strict";y();var rA=mr(),iA=pe();function nA(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function sA(e){return 48<=e&&e<=55}function oA(e){return 48<=e&&e<=57}function aA(e){if(e===null)return!1;var t=e.length,r=0,i=!1,n;if(!t)return!1;if(n=e[r],(n==="-"||n==="+")&&(n=e[++r]),n==="0"){if(r+1===t)return!0;if(n=e[++r],n==="b"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!nA(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}for(;r<t;r++)if(n=e[r],n!=="_"){if(!sA(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(n===":")break;if(!oA(e.charCodeAt(r)))return!1;i=!0}return!i||n==="_"?!1:n!==":"?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(r))}function uA(e){var t=e,r=1,i,n,o=[];return t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0"?0:i==="0"?t[1]==="b"?r*parseInt(t.slice(2),2):t[1]==="x"?r*parseInt(t,16):r*parseInt(t,8):t.indexOf(":")!==-1?(t.split(":").forEach(function(s){o.unshift(parseInt(s,10))}),t=0,n=1,o.forEach(function(s){t+=s*n,n*=60}),r*t):r*parseInt(t,10)}function cA(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!rA.isNegativeZero(e)}dd.exports=new iA("tag:yaml.org,2002:int",{kind:"scalar",resolve:aA,construct:uA,predicate:cA,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var xd=w((iL,yd)=>{"use strict";y();var gd=mr(),lA=pe(),hA=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function fA(e){return!(e===null||!hA.test(e)||e[e.length-1]==="_")}function pA(e){var t,r,i,n;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,n=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(o){n.unshift(parseFloat(o,10))}),t=0,i=1,n.forEach(function(o){t+=o*i,i*=60}),r*t):r*parseFloat(t,10)}var dA=/^[-+]?[0-9]+e/;function mA(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(gd.isNegativeZero(e))return"-0.0";return r=e.toString(10),dA.test(r)?r.replace("e",".e"):r}function gA(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||gd.isNegativeZero(e))}yd.exports=new lA("tag:yaml.org,2002:float",{kind:"scalar",resolve:fA,construct:pA,predicate:gA,represent:mA,defaultStyle:"lowercase"})});var cu=w((sL,vd)=>{"use strict";y();var yA=gr();vd.exports=new yA({include:[Ts()],implicit:[hd(),pd(),md(),xd()]})});var lu=w((aL,wd)=>{"use strict";y();var xA=gr();wd.exports=new xA({include:[cu()]})});var Dd=w((cL,Cd)=>{"use strict";y();var vA=pe(),Ed=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),bd=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function wA(e){return e===null?!1:Ed.exec(e)!==null||bd.exec(e)!==null}function EA(e){var t,r,i,n,o,s,u,l=0,m=null,p,f,d;if(t=Ed.exec(e),t===null&&(t=bd.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(o=+t[4],s=+t[5],u=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(p=+t[10],f=+(t[11]||0),m=(p*60+f)*6e4,t[9]==="-"&&(m=-m)),d=new Date(Date.UTC(r,i,n,o,s,u,l)),m&&d.setTime(d.getTime()-m),d}function bA(e){return e.toISOString()}Cd.exports=new vA("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:wA,construct:EA,instanceOf:Date,represent:bA})});var _d=w((hL,Ad)=>{"use strict";y();var CA=pe();function DA(e){return e==="<<"||e===null}Ad.exports=new CA("tag:yaml.org,2002:merge",{kind:"scalar",resolve:DA})});var Td=w((pL,Fd)=>{"use strict";y();var yr;try{Sd=S,yr=Sd("buffer").Buffer}catch{}var Sd,AA=pe(),hu=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
103
|
+
\r`;function _A(e){if(e===null)return!1;var t,r,i=0,n=e.length,o=hu;for(r=0;r<n;r++)if(t=o.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}function SA(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,o=hu,s=0,u=[];for(t=0;t<n;t++)t%4===0&&t&&(u.push(s>>16&255),u.push(s>>8&255),u.push(s&255)),s=s<<6|o.indexOf(i.charAt(t));return r=n%4*6,r===0?(u.push(s>>16&255),u.push(s>>8&255),u.push(s&255)):r===18?(u.push(s>>10&255),u.push(s>>2&255)):r===12&&u.push(s>>4&255),yr?yr.from?yr.from(u):new yr(u):u}function FA(e){var t="",r=0,i,n,o=e.length,s=hu;for(i=0;i<o;i++)i%3===0&&i&&(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]),r=(r<<8)+e[i];return n=o%3,n===0?(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]):n===2?(t+=s[r>>10&63],t+=s[r>>4&63],t+=s[r<<2&63],t+=s[64]):n===1&&(t+=s[r>>2&63],t+=s[r<<4&63],t+=s[64],t+=s[64]),t}function TA(e){return yr&&yr.isBuffer(e)}Fd.exports=new AA("tag:yaml.org,2002:binary",{kind:"scalar",resolve:_A,construct:SA,predicate:TA,represent:FA})});var kd=w((gL,Od)=>{"use strict";y();var OA=pe(),kA=Object.prototype.hasOwnProperty,PA=Object.prototype.toString;function IA(e){if(e===null)return!0;var t=[],r,i,n,o,s,u=e;for(r=0,i=u.length;r<i;r+=1){if(n=u[r],s=!1,PA.call(n)!=="[object Object]")return!1;for(o in n)if(kA.call(n,o))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}function NA(e){return e!==null?e:[]}Od.exports=new OA("tag:yaml.org,2002:omap",{kind:"sequence",resolve:IA,construct:NA})});var Id=w((xL,Pd)=>{"use strict";y();var RA=pe(),MA=Object.prototype.toString;function LA(e){if(e===null)return!0;var t,r,i,n,o,s=e;for(o=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(i=s[t],MA.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;o[t]=[n[0],i[n[0]]]}return!0}function BA(e){if(e===null)return[];var t,r,i,n,o,s=e;for(o=new Array(s.length),t=0,r=s.length;t<r;t+=1)i=s[t],n=Object.keys(i),o[t]=[n[0],i[n[0]]];return o}Pd.exports=new RA("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:LA,construct:BA})});var Rd=w((wL,Nd)=>{"use strict";y();var jA=pe(),$A=Object.prototype.hasOwnProperty;function qA(e){if(e===null)return!0;var t,r=e;for(t in r)if($A.call(r,t)&&r[t]!==null)return!1;return!0}function HA(e){return e!==null?e:{}}Nd.exports=new jA("tag:yaml.org,2002:set",{kind:"mapping",resolve:qA,construct:HA})});var ii=w((bL,Md)=>{"use strict";y();var UA=gr();Md.exports=new UA({include:[lu()],implicit:[Dd(),_d()],explicit:[Td(),kd(),Id(),Rd()]})});var Bd=w((DL,Ld)=>{"use strict";y();var WA=pe();function zA(){return!0}function JA(){}function GA(){return""}function VA(e){return typeof e>"u"}Ld.exports=new WA("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:zA,construct:JA,predicate:VA,represent:GA})});var $d=w((_L,jd)=>{"use strict";y();var YA=pe();function XA(e){if(e===null||e.length===0)return!1;var t=e,r=/\/([gim]*)$/.exec(e),i="";return!(t[0]==="/"&&(r&&(i=r[1]),i.length>3||t[t.length-i.length-1]!=="/"))}function KA(e){var t=e,r=/\/([gim]*)$/.exec(e),i="";return t[0]==="/"&&(r&&(i=r[1]),t=t.slice(1,t.length-i.length-1)),new RegExp(t,i)}function QA(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function ZA(e){return Object.prototype.toString.call(e)==="[object RegExp]"}jd.exports=new YA("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:XA,construct:KA,predicate:ZA,represent:QA})});var Ud=w((FL,Hd)=>{"use strict";y();var Os;try{qd=S,Os=qd("esprima")}catch{typeof window<"u"&&(Os=window.esprima)}var qd,e_=pe();function t_(e){if(e===null)return!1;try{var t="("+e+")",r=Os.parse(t,{range:!0});return!(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function r_(e){var t="("+e+")",r=Os.parse(t,{range:!0}),i=[],n;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(o){i.push(o.name)}),n=r.body[0].expression.body.range,r.body[0].expression.body.type==="BlockStatement"?new Function(i,t.slice(n[0]+1,n[1]-1)):new Function(i,"return "+t.slice(n[0],n[1]))}function i_(e){return e.toString()}function n_(e){return Object.prototype.toString.call(e)==="[object Function]"}Hd.exports=new e_("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:t_,construct:r_,predicate:n_,represent:i_})});var Ji=w((kL,zd)=>{"use strict";y();var Wd=gr();zd.exports=Wd.DEFAULT=new Wd({include:[ii()],explicit:[Bd(),$d(),Ud()]})});var hm=w((IL,Gi)=>{"use strict";y();var St=mr(),Qd=ti(),s_=Qp(),Zd=ii(),o_=Ji(),Jt=Object.prototype.hasOwnProperty,ks=1,em=2,tm=3,Ps=4,fu=1,a_=2,Jd=3,u_=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,c_=/[\x85\u2028\u2029]/,l_=/[,\[\]\{\}]/,rm=/^(?:!|!!|![a-z\-]+!)$/i,im=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Gd(e){return Object.prototype.toString.call(e)}function yt(e){return e===10||e===13}function vr(e){return e===9||e===32}function Ie(e){return e===9||e===32||e===10||e===13}function ni(e){return e===44||e===91||e===93||e===123||e===125}function h_(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function f_(e){return e===120?2:e===117?4:e===85?8:0}function p_(e){return 48<=e&&e<=57?e-48:-1}function Vd(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
104
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function d_(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function nm(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}var sm=new Array(256),om=new Array(256);for(xr=0;xr<256;xr++)sm[xr]=Vd(xr)?1:0,om[xr]=Vd(xr);var xr;function m_(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||o_,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function am(e,t){return new Qd(t,new s_(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function R(e,t){throw am(e,t)}function Is(e,t){e.onWarning&&e.onWarning.call(null,am(e,t))}var Yd={YAML:function(t,r,i){var n,o,s;t.version!==null&&R(t,"duplication of %YAML directive"),i.length!==1&&R(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&R(t,"ill-formed argument of the YAML directive"),o=parseInt(n[1],10),s=parseInt(n[2],10),o!==1&&R(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&Is(t,"unsupported YAML version of the document")},TAG:function(t,r,i){var n,o;i.length!==2&&R(t,"TAG directive accepts exactly two arguments"),n=i[0],o=i[1],rm.test(n)||R(t,"ill-formed tag handle (first argument) of the TAG directive"),Jt.call(t.tagMap,n)&&R(t,'there is a previously declared suffix for "'+n+'" tag handle'),im.test(o)||R(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[n]=o}};function zt(e,t,r,i){var n,o,s,u;if(t<r){if(u=e.input.slice(t,r),i)for(n=0,o=u.length;n<o;n+=1)s=u.charCodeAt(n),s===9||32<=s&&s<=1114111||R(e,"expected valid JSON character");else u_.test(u)&&R(e,"the stream contains non-printable characters");e.result+=u}}function Xd(e,t,r,i){var n,o,s,u;for(St.isObject(r)||R(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),s=0,u=n.length;s<u;s+=1)o=n[s],Jt.call(t,o)||(nm(t,o,r[o]),i[o]=!0)}function si(e,t,r,i,n,o,s,u){var l,m;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),l=0,m=n.length;l<m;l+=1)Array.isArray(n[l])&&R(e,"nested arrays are not supported inside keys"),typeof n=="object"&&Gd(n[l])==="[object Object]"&&(n[l]="[object Object]");if(typeof n=="object"&&Gd(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(l=0,m=o.length;l<m;l+=1)Xd(e,t,o[l],r);else Xd(e,t,o,r);else!e.json&&!Jt.call(r,n)&&Jt.call(t,n)&&(e.line=s||e.line,e.position=u||e.position,R(e,"duplicated mapping key")),nm(t,n,o),delete r[n];return t}function pu(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):R(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function ue(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;vr(n);)n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(yt(n))for(pu(e),n=e.input.charCodeAt(e.position),i++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Is(e,"deficient indentation"),i}function Ns(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Ie(r)))}function du(e,t){t===1?e.result+=" ":t>1&&(e.result+=St.repeat(`
|
|
105
|
+
`,t-1))}function g_(e,t,r){var i,n,o,s,u,l,m,p,f=e.kind,d=e.result,a;if(a=e.input.charCodeAt(e.position),Ie(a)||ni(a)||a===35||a===38||a===42||a===33||a===124||a===62||a===39||a===34||a===37||a===64||a===96||(a===63||a===45)&&(n=e.input.charCodeAt(e.position+1),Ie(n)||r&&ni(n)))return!1;for(e.kind="scalar",e.result="",o=s=e.position,u=!1;a!==0;){if(a===58){if(n=e.input.charCodeAt(e.position+1),Ie(n)||r&&ni(n))break}else if(a===35){if(i=e.input.charCodeAt(e.position-1),Ie(i))break}else{if(e.position===e.lineStart&&Ns(e)||r&&ni(a))break;if(yt(a))if(l=e.line,m=e.lineStart,p=e.lineIndent,ue(e,!1,-1),e.lineIndent>=t){u=!0,a=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=l,e.lineStart=m,e.lineIndent=p;break}}u&&(zt(e,o,s,!1),du(e,e.line-l),o=s=e.position,u=!1),vr(a)||(s=e.position+1),a=e.input.charCodeAt(++e.position)}return zt(e,o,s,!1),e.result?!0:(e.kind=f,e.result=d,!1)}function y_(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(zt(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else yt(r)?(zt(e,i,n,!0),du(e,ue(e,!1,t)),i=n=e.position):e.position===e.lineStart&&Ns(e)?R(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);R(e,"unexpected end of the stream within a single quoted scalar")}function x_(e,t){var r,i,n,o,s,u;if(u=e.input.charCodeAt(e.position),u!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(u=e.input.charCodeAt(e.position))!==0;){if(u===34)return zt(e,r,e.position,!0),e.position++,!0;if(u===92){if(zt(e,r,e.position,!0),u=e.input.charCodeAt(++e.position),yt(u))ue(e,!1,t);else if(u<256&&sm[u])e.result+=om[u],e.position++;else if((s=f_(u))>0){for(n=s,o=0;n>0;n--)u=e.input.charCodeAt(++e.position),(s=h_(u))>=0?o=(o<<4)+s:R(e,"expected hexadecimal character");e.result+=d_(o),e.position++}else R(e,"unknown escape sequence");r=i=e.position}else yt(u)?(zt(e,r,i,!0),du(e,ue(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Ns(e)?R(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}R(e,"unexpected end of the stream within a double quoted scalar")}function v_(e,t){var r=!0,i,n=e.tag,o,s=e.anchor,u,l,m,p,f,d={},a,c,h,g;if(g=e.input.charCodeAt(e.position),g===91)l=93,f=!1,o=[];else if(g===123)l=125,f=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),g=e.input.charCodeAt(++e.position);g!==0;){if(ue(e,!0,t),g=e.input.charCodeAt(e.position),g===l)return e.position++,e.tag=n,e.anchor=s,e.kind=f?"mapping":"sequence",e.result=o,!0;r||R(e,"missed comma between flow collection entries"),c=a=h=null,m=p=!1,g===63&&(u=e.input.charCodeAt(e.position+1),Ie(u)&&(m=p=!0,e.position++,ue(e,!0,t))),i=e.line,oi(e,t,ks,!1,!0),c=e.tag,a=e.result,ue(e,!0,t),g=e.input.charCodeAt(e.position),(p||e.line===i)&&g===58&&(m=!0,g=e.input.charCodeAt(++e.position),ue(e,!0,t),oi(e,t,ks,!1,!0),h=e.result),f?si(e,o,d,c,a,h):m?o.push(si(e,null,d,c,a,h)):o.push(a),ue(e,!0,t),g=e.input.charCodeAt(e.position),g===44?(r=!0,g=e.input.charCodeAt(++e.position)):r=!1}R(e,"unexpected end of the stream within a flow collection")}function w_(e,t){var r,i,n=fu,o=!1,s=!1,u=t,l=0,m=!1,p,f;if(f=e.input.charCodeAt(e.position),f===124)i=!1;else if(f===62)i=!0;else return!1;for(e.kind="scalar",e.result="";f!==0;)if(f=e.input.charCodeAt(++e.position),f===43||f===45)fu===n?n=f===43?Jd:a_:R(e,"repeat of a chomping mode identifier");else if((p=p_(f))>=0)p===0?R(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?R(e,"repeat of an indentation width identifier"):(u=t+p-1,s=!0);else break;if(vr(f)){do f=e.input.charCodeAt(++e.position);while(vr(f));if(f===35)do f=e.input.charCodeAt(++e.position);while(!yt(f)&&f!==0)}for(;f!==0;){for(pu(e),e.lineIndent=0,f=e.input.charCodeAt(e.position);(!s||e.lineIndent<u)&&f===32;)e.lineIndent++,f=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>u&&(u=e.lineIndent),yt(f)){l++;continue}if(e.lineIndent<u){n===Jd?e.result+=St.repeat(`
|
|
106
|
+
`,o?1+l:l):n===fu&&o&&(e.result+=`
|
|
107
107
|
`);break}for(i?vr(f)?(m=!0,e.result+=St.repeat(`
|
|
108
108
|
`,o?1+l:l)):m?(m=!1,e.result+=St.repeat(`
|
|
109
109
|
`,l+1)):l===0?o&&(e.result+=" "):e.result+=St.repeat(`
|
|
110
110
|
`,l):e.result+=St.repeat(`
|
|
111
|
-
`,o?1+l:l),o=!0,s=!0,l=0,r=e.position;!yt(f)&&f!==0;)f=e.input.charCodeAt(++e.position);zt(e,r,e.position,!1)}return!0}function
|
|
112
|
-
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new
|
|
111
|
+
`,o?1+l:l),o=!0,s=!0,l=0,r=e.position;!yt(f)&&f!==0;)f=e.input.charCodeAt(++e.position);zt(e,r,e.position,!1)}return!0}function Kd(e,t){var r,i=e.tag,n=e.anchor,o=[],s,u=!1,l;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),l=e.input.charCodeAt(e.position);l!==0&&!(l!==45||(s=e.input.charCodeAt(e.position+1),!Ie(s)));){if(u=!0,e.position++,ue(e,!0,-1)&&e.lineIndent<=t){o.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,oi(e,t,tm,!1,!0),o.push(e.result),ue(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)R(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return u?(e.tag=i,e.anchor=n,e.kind="sequence",e.result=o,!0):!1}function E_(e,t,r){var i,n,o,s,u=e.tag,l=e.anchor,m={},p={},f=null,d=null,a=null,c=!1,h=!1,g;for(e.anchor!==null&&(e.anchorMap[e.anchor]=m),g=e.input.charCodeAt(e.position);g!==0;){if(i=e.input.charCodeAt(e.position+1),o=e.line,s=e.position,(g===63||g===58)&&Ie(i))g===63?(c&&(si(e,m,p,f,d,null),f=d=a=null),h=!0,c=!0,n=!0):c?(c=!1,n=!0):R(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,g=i;else if(oi(e,r,em,!1,!0))if(e.line===o){for(g=e.input.charCodeAt(e.position);vr(g);)g=e.input.charCodeAt(++e.position);if(g===58)g=e.input.charCodeAt(++e.position),Ie(g)||R(e,"a whitespace character is expected after the key-value separator within a block mapping"),c&&(si(e,m,p,f,d,null),f=d=a=null),h=!0,c=!1,n=!1,f=e.tag,d=e.result;else if(h)R(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=u,e.anchor=l,!0}else if(h)R(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=u,e.anchor=l,!0;else break;if((e.line===o||e.lineIndent>t)&&(oi(e,t,Ps,!0,n)&&(c?d=e.result:a=e.result),c||(si(e,m,p,f,d,a,o,s),f=d=a=null),ue(e,!0,-1),g=e.input.charCodeAt(e.position)),e.lineIndent>t&&g!==0)R(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return c&&si(e,m,p,f,d,null),h&&(e.tag=u,e.anchor=l,e.kind="mapping",e.result=m),h}function b_(e){var t,r=!1,i=!1,n,o,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&R(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(r=!0,s=e.input.charCodeAt(++e.position)):s===33?(i=!0,n="!!",s=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(o=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):R(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Ie(s);)s===33&&(i?R(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),rm.test(n)||R(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),l_.test(o)&&R(e,"tag suffix cannot contain flow indicator characters")}return o&&!im.test(o)&&R(e,"tag name cannot contain such characters: "+o),r?e.tag=o:Jt.call(e.tagMap,n)?e.tag=e.tagMap[n]+o:n==="!"?e.tag="!"+o:n==="!!"?e.tag="tag:yaml.org,2002:"+o:R(e,'undeclared tag handle "'+n+'"'),!0}function C_(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&R(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Ie(r)&&!ni(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&R(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function D_(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Ie(i)&&!ni(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&R(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Jt.call(e.anchorMap,r)||R(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],ue(e,!0,-1),!0}function oi(e,t,r,i,n){var o,s,u,l=1,m=!1,p=!1,f,d,a,c,h;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=s=u=Ps===r||tm===r,i&&ue(e,!0,-1)&&(m=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;b_(e)||C_(e);)ue(e,!0,-1)?(m=!0,u=o,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):u=!1;if(u&&(u=m||n),(l===1||Ps===r)&&(ks===r||em===r?c=t:c=t+1,h=e.position-e.lineStart,l===1?u&&(Kd(e,h)||E_(e,h,c))||v_(e,c)?p=!0:(s&&w_(e,c)||y_(e,c)||x_(e,c)?p=!0:D_(e)?(p=!0,(e.tag!==null||e.anchor!==null)&&R(e,"alias node should not have any properties")):g_(e,c,ks===r)&&(p=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(p=u&&Kd(e,h))),e.tag!==null&&e.tag!=="!")if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&R(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),f=0,d=e.implicitTypes.length;f<d;f+=1)if(a=e.implicitTypes[f],a.resolve(e.result)){e.result=a.construct(e.result),e.tag=a.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else Jt.call(e.typeMap[e.kind||"fallback"],e.tag)?(a=e.typeMap[e.kind||"fallback"][e.tag],e.result!==null&&a.kind!==e.kind&&R(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+a.kind+'", not "'+e.kind+'"'),a.resolve(e.result)?(e.result=a.construct(e.result),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):R(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):R(e,"unknown tag !<"+e.tag+">");return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||p}function A_(e){var t=e.position,r,i,n,o=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};(s=e.input.charCodeAt(e.position))!==0&&(ue(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(o=!0,s=e.input.charCodeAt(++e.position),r=e.position;s!==0&&!Ie(s);)s=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&R(e,"directive name must not be less than one character in length");s!==0;){for(;vr(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!yt(s));break}if(yt(s))break;for(r=e.position;s!==0&&!Ie(s);)s=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}s!==0&&pu(e),Jt.call(Yd,i)?Yd[i](e,i,n):Is(e,'unknown document directive "'+i+'"')}if(ue(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,ue(e,!0,-1)):o&&R(e,"directives end mark is expected"),oi(e,e.lineIndent-1,Ps,!1,!0),ue(e,!0,-1),e.checkLineBreaks&&c_.test(e.input.slice(t,e.position))&&Is(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ns(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,ue(e,!0,-1));return}if(e.position<e.length-1)R(e,"end of the stream or a document separator is expected");else return}function um(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
112
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new m_(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,R(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)A_(r);return r.documents}function cm(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=um(e,r);if(typeof t!="function")return i;for(var n=0,o=i.length;n<o;n+=1)t(i[n])}function lm(e,t){var r=um(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Qd("expected a single document in the stream, but found more")}}function __(e,t,r){return typeof t=="object"&&t!==null&&typeof r>"u"&&(r=t,t=null),cm(e,t,St.extend({schema:Zd},r))}function S_(e,t){return lm(e,St.extend({schema:Zd},t))}Gi.exports.loadAll=cm;Gi.exports.load=lm;Gi.exports.safeLoadAll=__;Gi.exports.safeLoad=S_});var Nm=w((RL,xu)=>{"use strict";y();var Yi=mr(),Xi=ti(),F_=Ji(),T_=ii(),vm=Object.prototype.toString,wm=Object.prototype.hasOwnProperty,O_=9,Vi=10,k_=13,P_=32,I_=33,N_=34,Em=35,R_=37,M_=38,L_=39,B_=42,bm=44,j_=45,Cm=58,$_=61,q_=62,H_=63,U_=64,Dm=91,Am=93,W_=96,_m=123,z_=124,Sm=125,Ae={};Ae[0]="\\0";Ae[7]="\\a";Ae[8]="\\b";Ae[9]="\\t";Ae[10]="\\n";Ae[11]="\\v";Ae[12]="\\f";Ae[13]="\\r";Ae[27]="\\e";Ae[34]='\\"';Ae[92]="\\\\";Ae[133]="\\N";Ae[160]="\\_";Ae[8232]="\\L";Ae[8233]="\\P";var J_=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function G_(e,t){var r,i,n,o,s,u,l;if(t===null)return{};for(r={},i=Object.keys(t),n=0,o=i.length;n<o;n+=1)s=i[n],u=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),l=e.compiledTypeMap.fallback[s],l&&wm.call(l.styleAliases,u)&&(u=l.styleAliases[u]),r[s]=u;return r}function fm(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new Xi("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Yi.repeat("0",i-t.length)+t}function V_(e){this.schema=e.schema||F_,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Yi.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=G_(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function pm(e,t){for(var r=Yi.repeat(" ",t),i=0,n=-1,o="",s,u=e.length;i<u;)n=e.indexOf(`
|
|
113
113
|
`,i),n===-1?(s=e.slice(i),i=u):(s=e.slice(i,n+1),i=n+1),s.length&&s!==`
|
|
114
|
-
`&&(o+=r),o+=s;return o}function
|
|
115
|
-
`+
|
|
114
|
+
`&&(o+=r),o+=s;return o}function mu(e,t){return`
|
|
115
|
+
`+Yi.repeat(" ",e.indent*t)}function Y_(e,t){var r,i,n;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}function yu(e){return e===P_||e===O_}function ai(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==65279||65536<=e&&e<=1114111}function X_(e){return ai(e)&&!yu(e)&&e!==65279&&e!==k_&&e!==Vi}function dm(e,t){return ai(e)&&e!==65279&&e!==bm&&e!==Dm&&e!==Am&&e!==_m&&e!==Sm&&e!==Cm&&(e!==Em||t&&X_(t))}function K_(e){return ai(e)&&e!==65279&&!yu(e)&&e!==j_&&e!==H_&&e!==Cm&&e!==bm&&e!==Dm&&e!==Am&&e!==_m&&e!==Sm&&e!==Em&&e!==M_&&e!==B_&&e!==I_&&e!==z_&&e!==$_&&e!==q_&&e!==L_&&e!==N_&&e!==R_&&e!==U_&&e!==W_}function Fm(e){var t=/^\n* /;return t.test(e)}var Tm=1,Om=2,km=3,Pm=4,Rs=5;function Q_(e,t,r,i,n){var o,s,u,l=!1,m=!1,p=i!==-1,f=-1,d=K_(e.charCodeAt(0))&&!yu(e.charCodeAt(e.length-1));if(t)for(o=0;o<e.length;o++){if(s=e.charCodeAt(o),!ai(s))return Rs;u=o>0?e.charCodeAt(o-1):null,d=d&&dm(s,u)}else{for(o=0;o<e.length;o++){if(s=e.charCodeAt(o),s===Vi)l=!0,p&&(m=m||o-f-1>i&&e[f+1]!==" ",f=o);else if(!ai(s))return Rs;u=o>0?e.charCodeAt(o-1):null,d=d&&dm(s,u)}m=m||p&&o-f-1>i&&e[f+1]!==" "}return!l&&!m?d&&!n(e)?Tm:Om:r>9&&Fm(e)?Rs:m?Pm:km}function Z_(e,t,r,i){e.dump=(function(){if(t.length===0)return"''";if(!e.noCompatMode&&J_.indexOf(t)!==-1)return"'"+t+"'";var n=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-n),s=i||e.flowLevel>-1&&r>=e.flowLevel;function u(l){return Y_(e,l)}switch(Q_(t,s,e.indent,o,u)){case Tm:return t;case Om:return"'"+t.replace(/'/g,"''")+"'";case km:return"|"+mm(t,e.indent)+gm(pm(t,n));case Pm:return">"+mm(t,e.indent)+gm(pm(eS(t,o),n));case Rs:return'"'+tS(t,o)+'"';default:throw new Xi("impossible error: invalid scalar style")}})()}function mm(e,t){var r=Fm(e)?String(t):"",i=e[e.length-1]===`
|
|
116
116
|
`,n=i&&(e[e.length-2]===`
|
|
117
117
|
`||e===`
|
|
118
118
|
`),o=n?"+":i?"":"-";return r+o+`
|
|
119
|
-
`}function
|
|
120
|
-
`?e.slice(0,-1):e}function
|
|
121
|
-
`);return m=m!==-1?m:e.length,r.lastIndex=m,
|
|
119
|
+
`}function gm(e){return e[e.length-1]===`
|
|
120
|
+
`?e.slice(0,-1):e}function eS(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var m=e.indexOf(`
|
|
121
|
+
`);return m=m!==-1?m:e.length,r.lastIndex=m,ym(e.slice(0,m),t)})(),n=e[0]===`
|
|
122
122
|
`||e[0]===" ",o,s;s=r.exec(e);){var u=s[1],l=s[2];o=l[0]===" ",i+=u+(!n&&!o&&l!==""?`
|
|
123
|
-
`:"")+
|
|
123
|
+
`:"")+ym(l,t),n=o}return i}function ym(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,o,s=0,u=0,l="";i=r.exec(e);)u=i.index,u-n>t&&(o=s>n?s:u,l+=`
|
|
124
124
|
`+e.slice(n,o),n=o+1),s=u;return l+=`
|
|
125
125
|
`,e.length-n>t&&s>n?l+=e.slice(n,s)+`
|
|
126
|
-
`+e.slice(s+1):l+=e.slice(n),l.slice(1)}function
|
|
127
|
-
`:""}function wS(e,t){return Bm(e,Ki.extend({schema:H_},t))}Eu.exports.dump=Bm;Eu.exports.safeDump=wS});var qm=w((mB,Z)=>{"use strict";y();var js=gm(),$m=jm();function $s(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}Z.exports.Type=pe();Z.exports.Schema=gr();Z.exports.FAILSAFE_SCHEMA=Ps();Z.exports.JSON_SCHEMA=fu();Z.exports.CORE_SCHEMA=pu();Z.exports.DEFAULT_SAFE_SCHEMA=ni();Z.exports.DEFAULT_FULL_SCHEMA=Vi();Z.exports.load=js.load;Z.exports.loadAll=js.loadAll;Z.exports.safeLoad=js.safeLoad;Z.exports.safeLoadAll=js.safeLoadAll;Z.exports.dump=$m.dump;Z.exports.safeDump=$m.safeDump;Z.exports.YAMLException=ri();Z.exports.MINIMAL_SCHEMA=Ps();Z.exports.SAFE_SCHEMA=ni();Z.exports.DEFAULT_SCHEMA=Vi();Z.exports.scan=$s("scan");Z.exports.parse=$s("parse");Z.exports.compose=$s("compose");Z.exports.addConstructor=$s("addConstructor")});var Um=w((yB,Hm)=>{"use strict";y();var ES=qm();Hm.exports=ES});var Km=w(qs=>{"use strict";y();Object.defineProperty(qs,"__esModule",{value:!0});var Gm=function(t,r){return t<r?-1:t>r?1:0},bS=/(^0x[\da-fA-F]+$|^([+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?!\.\d+)(?=\D|\s|$))|\d+)/g,Vm=/^\s+|\s+$/g,CS=/\s+/g,DS=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,AS=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[/-]\d{1,4}[/-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,_S=/^0+[1-9]{1}[0-9]*$/,SS=/[^\x00-\x80]/,FS=function(t,r){var i=t.localeCompare(r);return i?i/Math.abs(i):0},Wm=function(t,r){return t<r?-1:t>r?1:0},TS=function(t,r){for(var i=t.length,n=r.length,o=Math.min(i,n),s=0;s<o;s++){var u=t[s],l=r[s];if(u.normalizedString!==l.normalizedString){if(u.normalizedString===""!=(l.normalizedString===""))return u.normalizedString===""?-1:1;if(u.parsedNumber!==void 0&&l.parsedNumber!==void 0){var m=Gm(u.parsedNumber,l.parsedNumber);return m===0?Wm(u.normalizedString,l.normalizedString):m}else return u.parsedNumber!==void 0||l.parsedNumber!==void 0?u.parsedNumber!==void 0?-1:1:SS.test(u.normalizedString+l.normalizedString)&&u.normalizedString.localeCompare?FS(u.normalizedString,l.normalizedString):Wm(u.normalizedString,l.normalizedString)}}return i>o||n>o?i<=o?-1:1:0},OS=function(t,r){return(t.chunks?!r.chunks:r.chunks)?t.chunks?-1:1:(t.isNaN?!r.isNaN:r.isNaN)?t.isNaN?-1:1:(t.isSymbol?!r.isSymbol:r.isSymbol)?t.isSymbol?-1:1:(t.isObject?!r.isObject:r.isObject)?t.isObject?-1:1:(t.isArray?!r.isArray:r.isArray)?t.isArray?-1:1:(t.isFunction?!r.isFunction:r.isFunction)?t.isFunction?-1:1:(t.isNull?!r.isNull:r.isNull)?t.isNull?-1:1:0},Xm=function(t,r){return t.value===r.value?0:t.parsedNumber!==void 0&&r.parsedNumber!==void 0?Gm(t.parsedNumber,r.parsedNumber):t.chunks&&r.chunks?TS(t.chunks,r.chunks):OS(t,r)},kS=function(t,r,i){for(var n=t.index,o=t.values,s=r.index,u=r.values,l=o.length,m=i.length,p=0;p<l;p++){var f=p<m?i[p]:null;if(f&&typeof f=="function"){var d=f(o[p].value,u[p].value);if(d)return d}else{var a=Xm(o[p],u[p]);if(a)return a*(f==="desc"?-1:1)}}return n-s},PS=function(t){return typeof t=="function"?t:function(r){if(Array.isArray(r)){var i=Number(t);if(Number.isInteger(i))return r[i]}else if(r&&typeof r=="object"&&typeof t!="function")return r[t];return r}},IS=function(t){return typeof t=="boolean"||t instanceof Boolean?Number(t).toString():typeof t=="number"||t instanceof Number?t.toString():t instanceof Date?t.getTime().toString():typeof t=="string"||t instanceof String?t.toLowerCase().replace(Vm,""):""},Ym=function(t){if(t.length!==0){var r=Number(t);if(!Number.isNaN(r))return r}},NS=function(t){if(AS.test(t)){var r=Date.parse(t);if(!Number.isNaN(r))return r}},RS=function(t){var r=Ym(t);return r!==void 0?r:NS(t)},MS=function(t){return t.replace(bS,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")},LS=function(t){return t.replace(CS," ").replace(Vm,"")},BS=function(t,r,i){if(DS.test(t)&&(!_S.test(t)||r===0||i[r-1]!=="."))return Ym(t)||0},jS=function(t,r,i){return{parsedNumber:BS(t,r,i),normalizedString:LS(t)}},$S=function(t){var r=MS(t).map(jS);return r},qS=function(t){return typeof t=="function"},zm=function(t){return Number.isNaN(t)||t instanceof Number&&Number.isNaN(t.valueOf())},HS=function(t){return t===null},US=function(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&!(t instanceof Number)&&!(t instanceof String)&&!(t instanceof Boolean)&&!(t instanceof Date)},WS=function(t){return typeof t=="symbol"},zS=function(t){return t===void 0},bu=function(t){if(typeof t=="string"||t instanceof String||(typeof t=="number"||t instanceof Number)&&!zm(t)||typeof t=="boolean"||t instanceof Boolean||t instanceof Date){var r=IS(t),i=RS(r),n=$S(i?""+i:r);return{parsedNumber:i,chunks:n,value:t}}return{isArray:Array.isArray(t),isFunction:qS(t),isNaN:zm(t),isNull:HS(t),isObject:US(t),isSymbol:WS(t),isUndefined:zS(t),value:t}},JS=function(t,r){return r(t)},GS=function(t,r){return t[r]},VS=function(t,r,i){var n=r.length?r.map(PS):[function(s){return s}],o=t.map(function(s,u){var l=n.map(function(m){return JS(s,m)}).map(bu);return{index:u,values:l}});return o.sort(function(s,u){return kS(s,u,i)}),o.map(function(s){return GS(t,s.index)})},XS=function(t){if(!t)return[];var r=Array.isArray(t)?[].concat(t):[t];return r.some(function(i){return typeof i!="string"&&typeof i!="number"&&typeof i!="function"})?[]:r},YS=function(t){if(!t)return[];var r=Array.isArray(t)?[].concat(t):[t];return r.some(function(i){return i!=="asc"&&i!=="desc"&&typeof i!="function"})?[]:r};function KS(e,t,r){if(!e||!Array.isArray(e))return[];var i=XS(t),n=YS(r);return VS(e,i,n)}var QS=function(t){return function(r,i){var n=bu(r),o=bu(i),s=Xm(n,o);return s*(t.order==="desc"?-1:1)}},Jm=function(t){return typeof t=="string"&&(t==="asc"||t==="desc")},ZS=function(t){var r="asc";return typeof t=="string"&&Jm(t)?r=t:t&&typeof t=="object"&&t.order&&Jm(t.order)&&(r=t.order),{order:r}};function e1(e){var t=ZS(e);return QS(t)}qs.orderBy=KS;qs.compare=e1});var eg=w((EB,Zm)=>{"use strict";y();var Qm="[\uD800-\uDBFF][\uDC00-\uDFFF]",t1=e=>e&&e.exact?new RegExp(`^${Qm}$`):new RegExp(Qm,"g");Zm.exports=t1});var sg=w((CB,ng)=>{"use strict";y();var r1=Lv(),i1=eg(),tg=Wl(),ig=["\x1B","\x9B"],Hs=e=>`${ig[0]}[${e}m`,rg=(e,t,r)=>{let i=[];e=[...e];for(let n of e){let o=n;n.includes(";")&&(n=n.split(";")[0][0]+"0");let s=tg.codes.get(Number.parseInt(n,10));if(s){let u=e.indexOf(s.toString());u===-1?i.push(Hs(t?s:o)):e.splice(u,1)}else if(t){i.push(Hs(0));break}else i.push(Hs(o))}if(t&&(i=i.filter((n,o)=>i.indexOf(n)===o),r!==void 0)){let n=Hs(tg.codes.get(Number.parseInt(r,10)));i=i.reduce((o,s)=>s===n?[s,...o]:[...o,s],[])}return i.join("")};ng.exports=(e,t,r)=>{let i=[...e],n=[],o=typeof r=="number"?r:i.length,s=!1,u,l=0,m="";for(let[p,f]of i.entries()){let d=!1;if(ig.includes(f)){let a=/\d[^m]*/.exec(e.slice(p,p+18));u=a&&a.length>0?a[0]:void 0,l<o&&(s=!0,u!==void 0&&n.push(u))}else s&&f==="m"&&(s=!1,d=!0);if(!s&&!d&&l++,!i1({exact:!0}).test(f)&&r1(f.codePointAt())&&(l++,typeof r!="number"&&o++),l>t&&l<=o)m+=f;else if(l===t&&!s&&u!==void 0)m=rg(n);else if(l>=o){m+=rg(n,!0,u);break}}return m}});var Ws=w(ee=>{"use strict";y();Object.defineProperty(ee,"__esModule",{value:!0});ee.option=ee.help=ee.version=ee.string=ee.url=ee.file=ee.directory=ee.integer=ee.boolean=ee.custom=void 0;var n1=S("node:url"),Us=Ge(),s1=Wi(),og=Dt();function ci(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],multiple:!!(t.multiple===void 0?e?.multiple??!1:t.multiple),type:"option"})}ee.custom=ci;function Cu(e={}){return{parse:async(t,r)=>t,...e,allowNo:!!e.allowNo,type:"boolean"}}ee.boolean=Cu;ee.integer=ci({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new Us.CLIError(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new Us.CLIError(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new Us.CLIError(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});ee.directory=ci({async parse(e,t,r){return r.exists?(0,og.dirExists)(e):e}});ee.file=ci({async parse(e,t,r){return r.exists?(0,og.fileExists)(e):e}});ee.url=ci({async parse(e){try{return new n1.URL(e)}catch{throw new Us.CLIError(`Expected a valid url but received: ${e}`)}}});ee.string=ci();var o1=(e={})=>Cu({description:"Show CLI version.",...e,async parse(t,r){r.log(r.config.userAgent),r.exit(0)}});ee.version=o1;var a1=(e={})=>Cu({description:"Show CLI help.",...e,async parse(t,r){let i=await(0,s1.loadHelpClass)(r.config);await new i(r.config,r.config.pjson.oclif.helpOptions??r.config.pjson.helpOptions).showHelp(r.id?[r.id,...r.argv]:r.argv),r.exit(0)}});ee.help=a1;function u1(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],multiple:!!(t.multiple===void 0?e.multiple:t.multiple),type:"option"})}ee.option=u1});var ug=w(qe=>{"use strict";y();var c1=qe&&qe.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),l1=qe&&qe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),h1=qe&&qe.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&c1(t,e,r);return l1(t,e),t},zs=qe&&qe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qe,"__esModule",{value:!0});qe.table=void 0;var ag=zs(We()),f1=Um(),p1=Km(),d1=S("node:util"),m1=zs(sg()),Er=zs(Ko()),Gt=h1(Ws()),g1=ar(),Du=le(),y1=zs($t()),Au=class{data;columns;options;constructor(t,r,i={}){this.data=t,this.columns=Object.keys(r).map(d=>{let a=r[d],c=a.extended??!1,h=a.get??(v=>v[d]??""),g=typeof a.header=="string"?a.header:(0,Du.capitalize)(d.replaceAll("_"," ")),x=Math.max(a.minWidth??0,(0,Er.default)(g)+1);return{extended:c,get:h,header:g,key:d,minWidth:x}});let{columns:n,csv:o,extended:s,filter:u,output:l,printLine:m,sort:p,title:f}=i;this.options={columns:n,extended:s,filter:u,"no-header":i["no-header"]??!1,"no-truncate":i["no-truncate"]??!1,output:o?"csv":l,printLine:m??(d=>y1.default.stdout(d+`
|
|
128
|
-
`)),rowStart:" ",sort:p,title:f}}display(){let t=this.data.map(r=>{let i={};for(let n of this.columns){let o=n.get(r);typeof o!="string"&&(o=(0,
|
|
126
|
+
`+e.slice(s+1):l+=e.slice(n),l.slice(1)}function tS(e){for(var t="",r,i,n,o=0;o<e.length;o++){if(r=e.charCodeAt(o),r>=55296&&r<=56319&&(i=e.charCodeAt(o+1),i>=56320&&i<=57343)){t+=fm((r-55296)*1024+i-56320+65536),o++;continue}n=Ae[r],t+=!n&&ai(r)?e[o]:n||fm(r)}return t}function rS(e,t,r){var i="",n=e.tag,o,s;for(o=0,s=r.length;o<s;o+=1)wr(e,t,r[o],!1,!1)&&(o!==0&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}function iS(e,t,r,i){var n="",o=e.tag,s,u;for(s=0,u=r.length;s<u;s+=1)wr(e,t+1,r[s],!0,!0)&&((!i||s!==0)&&(n+=mu(e,t)),e.dump&&Vi===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=o,e.dump=n||"[]"}function nS(e,t,r){var i="",n=e.tag,o=Object.keys(r),s,u,l,m,p;for(s=0,u=o.length;s<u;s+=1)p="",s!==0&&(p+=", "),e.condenseFlow&&(p+='"'),l=o[s],m=r[l],wr(e,t,l,!1,!1)&&(e.dump.length>1024&&(p+="? "),p+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),wr(e,t,m,!1,!1)&&(p+=e.dump,i+=p));e.tag=n,e.dump="{"+i+"}"}function sS(e,t,r,i){var n="",o=e.tag,s=Object.keys(r),u,l,m,p,f,d;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new Xi("sortKeys must be a boolean or a function");for(u=0,l=s.length;u<l;u+=1)d="",(!i||u!==0)&&(d+=mu(e,t)),m=s[u],p=r[m],wr(e,t+1,m,!0,!0,!0)&&(f=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,f&&(e.dump&&Vi===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,f&&(d+=mu(e,t)),wr(e,t+1,p,!0,f)&&(e.dump&&Vi===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,n+=d));e.tag=o,e.dump=n||"{}"}function xm(e,t,r){var i,n,o,s,u,l;for(n=r?e.explicitTypes:e.implicitTypes,o=0,s=n.length;o<s;o+=1)if(u=n[o],(u.instanceOf||u.predicate)&&(!u.instanceOf||typeof t=="object"&&t instanceof u.instanceOf)&&(!u.predicate||u.predicate(t))){if(e.tag=r?u.tag:"?",u.represent){if(l=e.styleMap[u.tag]||u.defaultStyle,vm.call(u.represent)==="[object Function]")i=u.represent(t,l);else if(wm.call(u.represent,l))i=u.represent[l](t,l);else throw new Xi("!<"+u.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}function wr(e,t,r,i,n,o){e.tag=null,e.dump=r,xm(e,r,!1)||xm(e,r,!0);var s=vm.call(e.dump);i&&(i=e.flowLevel<0||e.flowLevel>t);var u=s==="[object Object]"||s==="[object Array]",l,m;if(u&&(l=e.duplicates.indexOf(r),m=l!==-1),(e.tag!==null&&e.tag!=="?"||m||e.indent!==2&&t>0)&&(n=!1),m&&e.usedDuplicates[l])e.dump="*ref_"+l;else{if(u&&m&&!e.usedDuplicates[l]&&(e.usedDuplicates[l]=!0),s==="[object Object]")i&&Object.keys(e.dump).length!==0?(sS(e,t,e.dump,n),m&&(e.dump="&ref_"+l+e.dump)):(nS(e,t,e.dump),m&&(e.dump="&ref_"+l+" "+e.dump));else if(s==="[object Array]"){var p=e.noArrayIndent&&t>0?t-1:t;i&&e.dump.length!==0?(iS(e,p,e.dump,n),m&&(e.dump="&ref_"+l+e.dump)):(rS(e,p,e.dump),m&&(e.dump="&ref_"+l+" "+e.dump))}else if(s==="[object String]")e.tag!=="?"&&Z_(e,e.dump,t,o);else{if(e.skipInvalid)return!1;throw new Xi("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function oS(e,t){var r=[],i=[],n,o;for(gu(e,r,i),n=0,o=i.length;n<o;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(o)}function gu(e,t,r){var i,n,o;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,o=e.length;n<o;n+=1)gu(e[n],t,r);else for(i=Object.keys(e),n=0,o=i.length;n<o;n+=1)gu(e[i[n]],t,r)}function Im(e,t){t=t||{};var r=new V_(t);return r.noRefs||oS(e,r),wr(r,0,e,!0,!0)?r.dump+`
|
|
127
|
+
`:""}function aS(e,t){return Im(e,Yi.extend({schema:T_},t))}xu.exports.dump=Im;xu.exports.safeDump=aS});var Mm=w((LL,Z)=>{"use strict";y();var Ms=hm(),Rm=Nm();function Ls(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}Z.exports.Type=pe();Z.exports.Schema=gr();Z.exports.FAILSAFE_SCHEMA=Ts();Z.exports.JSON_SCHEMA=cu();Z.exports.CORE_SCHEMA=lu();Z.exports.DEFAULT_SAFE_SCHEMA=ii();Z.exports.DEFAULT_FULL_SCHEMA=Ji();Z.exports.load=Ms.load;Z.exports.loadAll=Ms.loadAll;Z.exports.safeLoad=Ms.safeLoad;Z.exports.safeLoadAll=Ms.safeLoadAll;Z.exports.dump=Rm.dump;Z.exports.safeDump=Rm.safeDump;Z.exports.YAMLException=ti();Z.exports.MINIMAL_SCHEMA=Ts();Z.exports.SAFE_SCHEMA=ii();Z.exports.DEFAULT_SCHEMA=Ji();Z.exports.scan=Ls("scan");Z.exports.parse=Ls("parse");Z.exports.compose=Ls("compose");Z.exports.addConstructor=Ls("addConstructor")});var Bm=w((jL,Lm)=>{"use strict";y();var uS=Mm();Lm.exports=uS});var Jm=w(Bs=>{"use strict";y();Object.defineProperty(Bs,"__esModule",{value:!0});var Hm=function(t,r){return t<r?-1:t>r?1:0},cS=/(^0x[\da-fA-F]+$|^([+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?!\.\d+)(?=\D|\s|$))|\d+)/g,Um=/^\s+|\s+$/g,lS=/\s+/g,hS=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,fS=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[/-]\d{1,4}[/-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,pS=/^0+[1-9]{1}[0-9]*$/,dS=/[^\x00-\x80]/,mS=function(t,r){var i=t.localeCompare(r);return i?i/Math.abs(i):0},jm=function(t,r){return t<r?-1:t>r?1:0},gS=function(t,r){for(var i=t.length,n=r.length,o=Math.min(i,n),s=0;s<o;s++){var u=t[s],l=r[s];if(u.normalizedString!==l.normalizedString){if(u.normalizedString===""!=(l.normalizedString===""))return u.normalizedString===""?-1:1;if(u.parsedNumber!==void 0&&l.parsedNumber!==void 0){var m=Hm(u.parsedNumber,l.parsedNumber);return m===0?jm(u.normalizedString,l.normalizedString):m}else return u.parsedNumber!==void 0||l.parsedNumber!==void 0?u.parsedNumber!==void 0?-1:1:dS.test(u.normalizedString+l.normalizedString)&&u.normalizedString.localeCompare?mS(u.normalizedString,l.normalizedString):jm(u.normalizedString,l.normalizedString)}}return i>o||n>o?i<=o?-1:1:0},yS=function(t,r){return(t.chunks?!r.chunks:r.chunks)?t.chunks?-1:1:(t.isNaN?!r.isNaN:r.isNaN)?t.isNaN?-1:1:(t.isSymbol?!r.isSymbol:r.isSymbol)?t.isSymbol?-1:1:(t.isObject?!r.isObject:r.isObject)?t.isObject?-1:1:(t.isArray?!r.isArray:r.isArray)?t.isArray?-1:1:(t.isFunction?!r.isFunction:r.isFunction)?t.isFunction?-1:1:(t.isNull?!r.isNull:r.isNull)?t.isNull?-1:1:0},Wm=function(t,r){return t.value===r.value?0:t.parsedNumber!==void 0&&r.parsedNumber!==void 0?Hm(t.parsedNumber,r.parsedNumber):t.chunks&&r.chunks?gS(t.chunks,r.chunks):yS(t,r)},xS=function(t,r,i){for(var n=t.index,o=t.values,s=r.index,u=r.values,l=o.length,m=i.length,p=0;p<l;p++){var f=p<m?i[p]:null;if(f&&typeof f=="function"){var d=f(o[p].value,u[p].value);if(d)return d}else{var a=Wm(o[p],u[p]);if(a)return a*(f==="desc"?-1:1)}}return n-s},vS=function(t){return typeof t=="function"?t:function(r){if(Array.isArray(r)){var i=Number(t);if(Number.isInteger(i))return r[i]}else if(r&&typeof r=="object"&&typeof t!="function")return r[t];return r}},wS=function(t){return typeof t=="boolean"||t instanceof Boolean?Number(t).toString():typeof t=="number"||t instanceof Number?t.toString():t instanceof Date?t.getTime().toString():typeof t=="string"||t instanceof String?t.toLowerCase().replace(Um,""):""},zm=function(t){if(t.length!==0){var r=Number(t);if(!Number.isNaN(r))return r}},ES=function(t){if(fS.test(t)){var r=Date.parse(t);if(!Number.isNaN(r))return r}},bS=function(t){var r=zm(t);return r!==void 0?r:ES(t)},CS=function(t){return t.replace(cS,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")},DS=function(t){return t.replace(lS," ").replace(Um,"")},AS=function(t,r,i){if(hS.test(t)&&(!pS.test(t)||r===0||i[r-1]!=="."))return zm(t)||0},_S=function(t,r,i){return{parsedNumber:AS(t,r,i),normalizedString:DS(t)}},SS=function(t){var r=CS(t).map(_S);return r},FS=function(t){return typeof t=="function"},$m=function(t){return Number.isNaN(t)||t instanceof Number&&Number.isNaN(t.valueOf())},TS=function(t){return t===null},OS=function(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&!(t instanceof Number)&&!(t instanceof String)&&!(t instanceof Boolean)&&!(t instanceof Date)},kS=function(t){return typeof t=="symbol"},PS=function(t){return t===void 0},vu=function(t){if(typeof t=="string"||t instanceof String||(typeof t=="number"||t instanceof Number)&&!$m(t)||typeof t=="boolean"||t instanceof Boolean||t instanceof Date){var r=wS(t),i=bS(r),n=SS(i?""+i:r);return{parsedNumber:i,chunks:n,value:t}}return{isArray:Array.isArray(t),isFunction:FS(t),isNaN:$m(t),isNull:TS(t),isObject:OS(t),isSymbol:kS(t),isUndefined:PS(t),value:t}},IS=function(t,r){return r(t)},NS=function(t,r){return t[r]},RS=function(t,r,i){var n=r.length?r.map(vS):[function(s){return s}],o=t.map(function(s,u){var l=n.map(function(m){return IS(s,m)}).map(vu);return{index:u,values:l}});return o.sort(function(s,u){return xS(s,u,i)}),o.map(function(s){return NS(t,s.index)})},MS=function(t){if(!t)return[];var r=Array.isArray(t)?[].concat(t):[t];return r.some(function(i){return typeof i!="string"&&typeof i!="number"&&typeof i!="function"})?[]:r},LS=function(t){if(!t)return[];var r=Array.isArray(t)?[].concat(t):[t];return r.some(function(i){return i!=="asc"&&i!=="desc"&&typeof i!="function"})?[]:r};function BS(e,t,r){if(!e||!Array.isArray(e))return[];var i=MS(t),n=LS(r);return RS(e,i,n)}var jS=function(t){return function(r,i){var n=vu(r),o=vu(i),s=Wm(n,o);return s*(t.order==="desc"?-1:1)}},qm=function(t){return typeof t=="string"&&(t==="asc"||t==="desc")},$S=function(t){var r="asc";return typeof t=="string"&&qm(t)?r=t:t&&typeof t=="object"&&t.order&&qm(t.order)&&(r=t.order),{order:r}};function qS(e){var t=$S(e);return jS(t)}Bs.orderBy=BS;Bs.compare=qS});var Ym=w((UL,Vm)=>{"use strict";y();var Gm="[\uD800-\uDBFF][\uDC00-\uDFFF]",HS=e=>e&&e.exact?new RegExp(`^${Gm}$`):new RegExp(Gm,"g");Vm.exports=HS});var eg=w((zL,Zm)=>{"use strict";y();var US=Cv(),WS=Ym(),Xm=jl(),Qm=["\x1B","\x9B"],js=e=>`${Qm[0]}[${e}m`,Km=(e,t,r)=>{let i=[];e=[...e];for(let n of e){let o=n;n.includes(";")&&(n=n.split(";")[0][0]+"0");let s=Xm.codes.get(Number.parseInt(n,10));if(s){let u=e.indexOf(s.toString());u===-1?i.push(js(t?s:o)):e.splice(u,1)}else if(t){i.push(js(0));break}else i.push(js(o))}if(t&&(i=i.filter((n,o)=>i.indexOf(n)===o),r!==void 0)){let n=js(Xm.codes.get(Number.parseInt(r,10)));i=i.reduce((o,s)=>s===n?[s,...o]:[...o,s],[])}return i.join("")};Zm.exports=(e,t,r)=>{let i=[...e],n=[],o=typeof r=="number"?r:i.length,s=!1,u,l=0,m="";for(let[p,f]of i.entries()){let d=!1;if(Qm.includes(f)){let a=/\d[^m]*/.exec(e.slice(p,p+18));u=a&&a.length>0?a[0]:void 0,l<o&&(s=!0,u!==void 0&&n.push(u))}else s&&f==="m"&&(s=!1,d=!0);if(!s&&!d&&l++,!WS({exact:!0}).test(f)&&US(f.codePointAt())&&(l++,typeof r!="number"&&o++),l>t&&l<=o)m+=f;else if(l===t&&!s&&u!==void 0)m=Km(n);else if(l>=o){m+=Km(n,!0,u);break}}return m}});var qs=w(ee=>{"use strict";y();Object.defineProperty(ee,"__esModule",{value:!0});ee.option=ee.help=ee.version=ee.string=ee.url=ee.file=ee.directory=ee.integer=ee.boolean=ee.custom=void 0;var zS=S("node:url"),$s=Ge(),JS=Hi(),tg=Dt();function ui(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],multiple:!!(t.multiple===void 0?e?.multiple??!1:t.multiple),type:"option"})}ee.custom=ui;function wu(e={}){return{parse:async(t,r)=>t,...e,allowNo:!!e.allowNo,type:"boolean"}}ee.boolean=wu;ee.integer=ui({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new $s.CLIError(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new $s.CLIError(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new $s.CLIError(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});ee.directory=ui({async parse(e,t,r){return r.exists?(0,tg.dirExists)(e):e}});ee.file=ui({async parse(e,t,r){return r.exists?(0,tg.fileExists)(e):e}});ee.url=ui({async parse(e){try{return new zS.URL(e)}catch{throw new $s.CLIError(`Expected a valid url but received: ${e}`)}}});ee.string=ui();var GS=(e={})=>wu({description:"Show CLI version.",...e,async parse(t,r){r.log(r.config.userAgent),r.exit(0)}});ee.version=GS;var VS=(e={})=>wu({description:"Show CLI help.",...e,async parse(t,r){let i=await(0,JS.loadHelpClass)(r.config);await new i(r.config,r.config.pjson.oclif.helpOptions??r.config.pjson.helpOptions).showHelp(r.id?[r.id,...r.argv]:r.argv),r.exit(0)}});ee.help=VS;function YS(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],multiple:!!(t.multiple===void 0?e.multiple:t.multiple),type:"option"})}ee.option=YS});var ig=w(qe=>{"use strict";y();var XS=qe&&qe.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),KS=qe&&qe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),QS=qe&&qe.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&XS(t,e,r);return KS(t,e),t},Hs=qe&&qe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qe,"__esModule",{value:!0});qe.table=void 0;var rg=Hs(We()),ZS=Bm(),e1=Jm(),t1=S("node:util"),r1=Hs(eg()),Er=Hs(Vo()),Gt=QS(qs()),i1=ar(),Eu=le(),n1=Hs($t()),bu=class{data;columns;options;constructor(t,r,i={}){this.data=t,this.columns=Object.keys(r).map(d=>{let a=r[d],c=a.extended??!1,h=a.get??(v=>v[d]??""),g=typeof a.header=="string"?a.header:(0,Eu.capitalize)(d.replaceAll("_"," ")),x=Math.max(a.minWidth??0,(0,Er.default)(g)+1);return{extended:c,get:h,header:g,key:d,minWidth:x}});let{columns:n,csv:o,extended:s,filter:u,output:l,printLine:m,sort:p,title:f}=i;this.options={columns:n,extended:s,filter:u,"no-header":i["no-header"]??!1,"no-truncate":i["no-truncate"]??!1,output:o?"csv":l,printLine:m??(d=>n1.default.stdout(d+`
|
|
128
|
+
`)),rowStart:" ",sort:p,title:f}}display(){let t=this.data.map(r=>{let i={};for(let n of this.columns){let o=n.get(r);typeof o!="string"&&(o=(0,t1.inspect)(o,{breakLength:Number.POSITIVE_INFINITY})),i[n.key]=o}return i});if(this.options.filter){let[r,i]=this.options.filter.split("="),n=r[0]==="-";n&&(r=r.slice(1));let o=this.findColumnFromHeader(r);if(!o||!i)throw new Error("Filter flag has an invalid value");t=t.filter(s=>{let u=new RegExp(i),m=s[o.key].match(u);return n?!m:m})}if(this.options.sort){let r=this.options.sort.split(","),i=r.map(s=>s[0]==="-"?s.slice(1):s),n=this.filterColumnsFromHeaders(i).map(s=>u=>u[s.key]),o=r.map(s=>s[0]==="-"?"desc":"asc");t=(0,e1.orderBy)(t,n,o)}if(this.options.columns){let r=this.options.columns.split(",");this.columns=this.filterColumnsFromHeaders(r)}else this.options.extended||(this.columns=this.columns.filter(r=>!r.extended));switch(this.data=t,this.options.output){case"csv":{this.outputCSV();break}case"json":{this.outputJSON();break}case"yaml":{this.outputYAML();break}default:this.outputTable()}}filterColumnsFromHeaders(t){t=[...new Set(t)];let r=[];for(let i of t){let n=this.columns.find(o=>o.header.toLowerCase()===i.toLowerCase());n&&r.push(n)}return r}findColumnFromHeader(t){return this.columns.find(r=>r.header.toLowerCase()===t.toLowerCase())}getCSVRow(t){let r=this.columns.map(n=>t[n.key]||""),i=r.find(n=>n.includes('"')||n.includes(`
|
|
129
129
|
`)||n.includes(`\r
|
|
130
|
-
`)||n.includes("\r")||n.includes(","));return r.map(n=>i?`"${n.replaceAll('"','""')}"`:n)}outputCSV(){let{columns:t,data:r,options:i}=this;i["no-header"]||i.printLine(t.map(n=>n.header).join(","));for(let n of r){let o=this.getCSVRow(n);i.printLine(o.join(","))}}outputJSON(){this.options.printLine(JSON.stringify(this.resolveColumnsToObjectArray(),void 0,2))}outputTable(){let{data:t,options:r}=this,i=this.columns.map(s=>{let u=Math.max((0,Er.default)(".".padEnd(s.minWidth-1)),(0,Er.default)(s.header),
|
|
130
|
+
`)||n.includes("\r")||n.includes(","));return r.map(n=>i?`"${n.replaceAll('"','""')}"`:n)}outputCSV(){let{columns:t,data:r,options:i}=this;i["no-header"]||i.printLine(t.map(n=>n.header).join(","));for(let n of r){let o=this.getCSVRow(n);i.printLine(o.join(","))}}outputJSON(){this.options.printLine(JSON.stringify(this.resolveColumnsToObjectArray(),void 0,2))}outputTable(){let{data:t,options:r}=this,i=this.columns.map(s=>{let u=Math.max((0,Er.default)(".".padEnd(s.minWidth-1)),(0,Er.default)(s.header),s1(t,s.key))+1;return{...s,maxWidth:u,width:u}}),n=i1.stdtermwidth-2;if((()=>{if(r["no-truncate"]||!process.stdout.isTTY&&!process.env.CLI_UX_SKIP_TTY_CHECK||(0,Eu.sumBy)(i,f=>f.width)-n<=0)return;for(let f of i)f.width=f.minWidth;let l=(0,Eu.sumBy)(i,f=>f.minWidth);if(l>=n)return;let m=n-l,p=i.map(f=>({key:f.key,needs:f.maxWidth-f.width})).sort((f,d)=>f.needs-d.needs);for(let{key:f,needs:d}of p){if(!d)continue;let a=i.find(c=>f===c.key);a&&(m>d?(a.width=a.width+d,m-=d):m&&(a.width=a.width+m,m=0))}})(),r.title&&(r.printLine(r.title),r.printLine("".padEnd(i.reduce((s,u)=>s+u.width,1),"=")),r.rowStart="| "),!r["no-header"]){let s=r.rowStart;for(let l of i){let m=l.header;s+=m.padEnd(l.width)}r.printLine(rg.default.bold(s));let u=r.rowStart;for(let l of i){let m="".padEnd(l.width-1,"\u2500")+" ";u+=m.padEnd(l.width)}r.printLine(rg.default.bold(u))}for(let s of t){let u=1;for(let m of i){let f=s[m.key].split(`
|
|
131
131
|
`).length;f>u&&(u=f)}let l=[...new Array(u).keys()];for(let m of l){let p=r.rowStart;for(let f of i){let d=f.width,a=s[f.key];a=a.split(`
|
|
132
|
-
`)[m]||"";let c=(0,Er.default)(a),h=a.length-c,g=a.padEnd(d+h);(g.length-h>d||c===d)&&(g=(0,
|
|
133
|
-
`);return Math.max(r,o.length>1?Math.max(...o.map(s=>(0,Er.default)(s))):(0,Er.default)(n))},0)});var
|
|
134
|
-
`):i}});var hg=w(Zi=>{"use strict";y();Object.defineProperty(Zi,"__esModule",{value:!0});Zi.Tree=void 0;var w1=lg(),Js=class e{nodes={};display(t=console.log){let r=function(n){let o={};for(let s of Object.keys(n))o[s]=r(n[s].nodes);return o},i=r(this.nodes);t(w1(i))}insert(t,r=new e){return this.nodes[t]=r,this}search(t){for(let r of Object.keys(this.nodes)){if(r===t)return this.nodes[r];let i=this.nodes[r].search(t);if(i)return i}}};Zi.Tree=Js;function E1(){return new Js}Zi.default=E1});var Fu=w(xe=>{"use strict";y();var b1=xe&&xe.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),C1=xe&&xe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),D1=xe&&xe.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&b1(t,e,r);return C1(t,e),t},Su=xe&&xe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0});xe.tree=xe.Table=xe.progress=xe.styledObject=void 0;var A1=Dp();Object.defineProperty(xe,"styledObject",{enumerable:!0,get:function(){return Su(A1).default}});var _1=Qp();Object.defineProperty(xe,"progress",{enumerable:!0,get:function(){return Su(_1).default}});xe.Table=D1(ug());var S1=hg();Object.defineProperty(xe,"tree",{enumerable:!0,get:function(){return Su(S1).default}})});var fg=w(Tu=>{"use strict";y();Object.defineProperty(Tu,"__esModule",{value:!0});Tu.default=(e=1e3)=>new Promise(t=>{setTimeout(t,e)})});var dg=w((LB,pg)=>{"use strict";y();pg.exports=(e,t,r)=>(r=r||{},["\x1B]","8",";",Object.keys(r).map(i=>i+"="+r[i]).join(":"),";",t,"\x07",e,"\x1B]","8",";",";","\x07"].join(""))});var mg=w((en,Ou)=>{y();(function(t,r){typeof en=="object"&&typeof Ou=="object"?Ou.exports=r():typeof define=="function"&&define.amd?define([],r):typeof en=="object"?en.esprima=r():t.esprima=r()})(en,function(){return(function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={exports:{},id:i,loaded:!1};return e[i].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}return r.m=e,r.c=t,r.p="",r(0)})([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(1),n=r(3),o=r(8),s=r(15);function u(d,a,c){var h=null,g=function(L,j){c&&c(L,j),h&&h.visit(L,j)},x=typeof c=="function"?g:null,v=!1;if(a){v=typeof a.comment=="boolean"&&a.comment;var E=typeof a.attachComment=="boolean"&&a.attachComment;(v||E)&&(h=new i.CommentHandler,h.attach=E,a.comment=!0,x=g)}var C=!1;a&&typeof a.sourceType=="string"&&(C=a.sourceType==="module");var A;a&&typeof a.jsx=="boolean"&&a.jsx?A=new n.JSXParser(d,a,x):A=new o.Parser(d,a,x);var O=C?A.parseModule():A.parseScript(),P=O;return v&&h&&(P.comments=h.comments),A.config.tokens&&(P.tokens=A.tokens),A.config.tolerant&&(P.errors=A.errorHandler.errors),P}t.parse=u;function l(d,a,c){var h=a||{};return h.sourceType="module",u(d,h,c)}t.parseModule=l;function m(d,a,c){var h=a||{};return h.sourceType="script",u(d,h,c)}t.parseScript=m;function p(d,a,c){var h=new s.Tokenizer(d,a),g;g=[];try{for(;;){var x=h.getNextToken();if(!x)break;c&&(x=c(x)),g.push(x)}}catch(v){h.errorHandler.tolerate(v)}return h.errorHandler.tolerant&&(g.errors=h.errors()),g}t.tokenize=p;var f=r(2);t.Syntax=f.Syntax,t.version="4.0.1"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),n=(function(){function o(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return o.prototype.insertInnerComments=function(s,u){if(s.type===i.Syntax.BlockStatement&&s.body.length===0){for(var l=[],m=this.leading.length-1;m>=0;--m){var p=this.leading[m];u.end.offset>=p.start&&(l.unshift(p.comment),this.leading.splice(m,1),this.trailing.splice(m,1))}l.length&&(s.innerComments=l)}},o.prototype.findTrailingComments=function(s){var u=[];if(this.trailing.length>0){for(var l=this.trailing.length-1;l>=0;--l){var m=this.trailing[l];m.start>=s.end.offset&&u.unshift(m.comment)}return this.trailing.length=0,u}var p=this.stack[this.stack.length-1];if(p&&p.node.trailingComments){var f=p.node.trailingComments[0];f&&f.range[0]>=s.end.offset&&(u=p.node.trailingComments,delete p.node.trailingComments)}return u},o.prototype.findLeadingComments=function(s){for(var u=[],l;this.stack.length>0;){var m=this.stack[this.stack.length-1];if(m&&m.start>=s.start.offset)l=m.node,this.stack.pop();else break}if(l){for(var p=l.leadingComments?l.leadingComments.length:0,f=p-1;f>=0;--f){var d=l.leadingComments[f];d.range[1]<=s.start.offset&&(u.unshift(d),l.leadingComments.splice(f,1))}return l.leadingComments&&l.leadingComments.length===0&&delete l.leadingComments,u}for(var f=this.leading.length-1;f>=0;--f){var m=this.leading[f];m.start<=s.start.offset&&(u.unshift(m.comment),this.leading.splice(f,1))}return u},o.prototype.visitNode=function(s,u){if(!(s.type===i.Syntax.Program&&s.body.length>0)){this.insertInnerComments(s,u);var l=this.findTrailingComments(u),m=this.findLeadingComments(u);m.length>0&&(s.leadingComments=m),l.length>0&&(s.trailingComments=l),this.stack.push({node:s,start:u.start.offset})}},o.prototype.visitComment=function(s,u){var l=s.type[0]==="L"?"Line":"Block",m={type:l,value:s.value};if(s.range&&(m.range=s.range),s.loc&&(m.loc=s.loc),this.comments.push(m),this.attach){var p={comment:{type:l,value:s.value,range:[u.start.offset,u.end.offset]},start:u.start.offset};s.loc&&(p.comment.loc=s.loc),s.type=l,this.leading.push(p),this.trailing.push(p)}},o.prototype.visit=function(s,u){s.type==="LineComment"?this.visitComment(s,u):s.type==="BlockComment"?this.visitComment(s,u):this.attach&&this.visitNode(s,u)},o})();t.CommentHandler=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,r){"use strict";var i=this&&this.__extends||(function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,h){c.__proto__=h}||function(c,h){for(var g in h)h.hasOwnProperty(g)&&(c[g]=h[g])};return function(c,h){a(c,h);function g(){this.constructor=c}c.prototype=h===null?Object.create(h):(g.prototype=h.prototype,new g)}})();Object.defineProperty(t,"__esModule",{value:!0});var n=r(4),o=r(5),s=r(6),u=r(7),l=r(8),m=r(13),p=r(14);m.TokenName[100]="JSXIdentifier",m.TokenName[101]="JSXText";function f(a){var c;switch(a.type){case s.JSXSyntax.JSXIdentifier:var h=a;c=h.name;break;case s.JSXSyntax.JSXNamespacedName:var g=a;c=f(g.namespace)+":"+f(g.name);break;case s.JSXSyntax.JSXMemberExpression:var x=a;c=f(x.object)+"."+f(x.property);break;default:break}return c}var d=(function(a){i(c,a);function c(h,g,x){return a.call(this,h,g,x)||this}return c.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():a.prototype.parsePrimaryExpression.call(this)},c.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},c.prototype.finishJSX=function(){this.nextToken()},c.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},c.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},c.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},c.prototype.scanXHTMLEntity=function(h){for(var g="&",x=!0,v=!1,E=!1,C=!1;!this.scanner.eof()&&x&&!v;){var A=this.scanner.source[this.scanner.index];if(A===h)break;if(v=A===";",g+=A,++this.scanner.index,!v)switch(g.length){case 2:E=A==="#";break;case 3:E&&(C=A==="x",x=C||n.Character.isDecimalDigit(A.charCodeAt(0)),E=E&&!C);break;default:x=x&&!(E&&!n.Character.isDecimalDigit(A.charCodeAt(0))),x=x&&!(C&&!n.Character.isHexDigit(A.charCodeAt(0)));break}}if(x&&v&&g.length>2){var O=g.substr(1,g.length-2);E&&O.length>1?g=String.fromCharCode(parseInt(O.substr(1),10)):C&&O.length>2?g=String.fromCharCode(parseInt("0"+O.substr(1),16)):!E&&!C&&p.XHTMLEntities[O]&&(g=p.XHTMLEntities[O])}return g},c.prototype.lexJSX=function(){var h=this.scanner.source.charCodeAt(this.scanner.index);if(h===60||h===62||h===47||h===58||h===61||h===123||h===125){var g=this.scanner.source[this.scanner.index++];return{type:7,value:g,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(h===34||h===39){for(var x=this.scanner.index,v=this.scanner.source[this.scanner.index++],E="";!this.scanner.eof();){var C=this.scanner.source[this.scanner.index++];if(C===v)break;C==="&"?E+=this.scanXHTMLEntity(v):E+=C}return{type:8,value:E,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:x,end:this.scanner.index}}if(h===46){var A=this.scanner.source.charCodeAt(this.scanner.index+1),O=this.scanner.source.charCodeAt(this.scanner.index+2),g=A===46&&O===46?"...":".",x=this.scanner.index;return this.scanner.index+=g.length,{type:7,value:g,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:x,end:this.scanner.index}}if(h===96)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(n.Character.isIdentifierStart(h)&&h!==92){var x=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var C=this.scanner.source.charCodeAt(this.scanner.index);if(n.Character.isIdentifierPart(C)&&C!==92)++this.scanner.index;else if(C===45)++this.scanner.index;else break}var P=this.scanner.source.slice(x,this.scanner.index);return{type:100,value:P,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:x,end:this.scanner.index}}return this.scanner.lex()},c.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var h=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(h)),h},c.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var h=this.scanner.index,g="";!this.scanner.eof();){var x=this.scanner.source[this.scanner.index];if(x==="{"||x==="<")break;++this.scanner.index,g+=x,n.Character.isLineTerminator(x.charCodeAt(0))&&(++this.scanner.lineNumber,x==="\r"&&this.scanner.source[this.scanner.index]===`
|
|
135
|
-
`&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var v={type:101,value:g,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:h,end:this.scanner.index};return g.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(v)),v},c.prototype.peekJSXToken=function(){var h=this.scanner.saveState();this.scanner.scanComments();var g=this.lexJSX();return this.scanner.restoreState(h),g},c.prototype.expectJSX=function(h){var g=this.nextJSXToken();(g.type!==7||g.value!==h)&&this.throwUnexpectedToken(g)},c.prototype.matchJSX=function(h){var g=this.peekJSXToken();return g.type===7&&g.value===h},c.prototype.parseJSXIdentifier=function(){var h=this.createJSXNode(),g=this.nextJSXToken();return g.type!==100&&this.throwUnexpectedToken(g),this.finalize(h,new o.JSXIdentifier(g.value))},c.prototype.parseJSXElementName=function(){var h=this.createJSXNode(),g=this.parseJSXIdentifier();if(this.matchJSX(":")){var x=g;this.expectJSX(":");var v=this.parseJSXIdentifier();g=this.finalize(h,new o.JSXNamespacedName(x,v))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var E=g;this.expectJSX(".");var C=this.parseJSXIdentifier();g=this.finalize(h,new o.JSXMemberExpression(E,C))}return g},c.prototype.parseJSXAttributeName=function(){var h=this.createJSXNode(),g,x=this.parseJSXIdentifier();if(this.matchJSX(":")){var v=x;this.expectJSX(":");var E=this.parseJSXIdentifier();g=this.finalize(h,new o.JSXNamespacedName(v,E))}else g=x;return g},c.prototype.parseJSXStringLiteralAttribute=function(){var h=this.createJSXNode(),g=this.nextJSXToken();g.type!==8&&this.throwUnexpectedToken(g);var x=this.getTokenRaw(g);return this.finalize(h,new u.Literal(g.value,x))},c.prototype.parseJSXExpressionAttribute=function(){var h=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var g=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(h,new o.JSXExpressionContainer(g))},c.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},c.prototype.parseJSXNameValueAttribute=function(){var h=this.createJSXNode(),g=this.parseJSXAttributeName(),x=null;return this.matchJSX("=")&&(this.expectJSX("="),x=this.parseJSXAttributeValue()),this.finalize(h,new o.JSXAttribute(g,x))},c.prototype.parseJSXSpreadAttribute=function(){var h=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var g=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(h,new o.JSXSpreadAttribute(g))},c.prototype.parseJSXAttributes=function(){for(var h=[];!this.matchJSX("/")&&!this.matchJSX(">");){var g=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();h.push(g)}return h},c.prototype.parseJSXOpeningElement=function(){var h=this.createJSXNode();this.expectJSX("<");var g=this.parseJSXElementName(),x=this.parseJSXAttributes(),v=this.matchJSX("/");return v&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(h,new o.JSXOpeningElement(g,v,x))},c.prototype.parseJSXBoundaryElement=function(){var h=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var g=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(h,new o.JSXClosingElement(g))}var x=this.parseJSXElementName(),v=this.parseJSXAttributes(),E=this.matchJSX("/");return E&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(h,new o.JSXOpeningElement(x,E,v))},c.prototype.parseJSXEmptyExpression=function(){var h=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(h,new o.JSXEmptyExpression)},c.prototype.parseJSXExpressionContainer=function(){var h=this.createJSXNode();this.expectJSX("{");var g;return this.matchJSX("}")?(g=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),g=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(h,new o.JSXExpressionContainer(g))},c.prototype.parseJSXChildren=function(){for(var h=[];!this.scanner.eof();){var g=this.createJSXChildNode(),x=this.nextJSXText();if(x.start<x.end){var v=this.getTokenRaw(x),E=this.finalize(g,new o.JSXText(x.value,v));h.push(E)}if(this.scanner.source[this.scanner.index]==="{"){var C=this.parseJSXExpressionContainer();h.push(C)}else break}return h},c.prototype.parseComplexJSXElement=function(h){for(var g=[];!this.scanner.eof();){h.children=h.children.concat(this.parseJSXChildren());var x=this.createJSXChildNode(),v=this.parseJSXBoundaryElement();if(v.type===s.JSXSyntax.JSXOpeningElement){var E=v;if(E.selfClosing){var C=this.finalize(x,new o.JSXElement(E,[],null));h.children.push(C)}else g.push(h),h={node:x,opening:E,closing:null,children:[]}}if(v.type===s.JSXSyntax.JSXClosingElement){h.closing=v;var A=f(h.opening.name),O=f(h.closing.name);if(A!==O&&this.tolerateError("Expected corresponding JSX closing tag for %0",A),g.length>0){var C=this.finalize(h.node,new o.JSXElement(h.opening,h.children,h.closing));h=g[g.length-1],h.children.push(C),g.pop()}else break}}return h},c.prototype.parseJSXElement=function(){var h=this.createJSXNode(),g=this.parseJSXOpeningElement(),x=[],v=null;if(!g.selfClosing){var E=this.parseComplexJSXElement({node:h,opening:g,closing:v,children:x});x=E.children,v=E.closing}return this.finalize(h,new o.JSXElement(g,x,v))},c.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var h=this.parseJSXElement();return this.finishJSX(),h},c.prototype.isStartOfExpression=function(){return a.prototype.isStartOfExpression.call(this)||this.match("<")},c})(l.Parser);t.JSXParser=d},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={NonAsciiIdentifierStart:/[\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\u0561-\u0587\u05D0-\u05EA\u05F0-\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\u08A0-\u08B4\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\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\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\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-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\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-\u2C2E\u2C30-\u2C5E\u2C60-\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-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\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-\uAB65\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]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(i){return i<65536?String.fromCharCode(i):String.fromCharCode(55296+(i-65536>>10))+String.fromCharCode(56320+(i-65536&1023))},isWhiteSpace:function(i){return i===32||i===9||i===11||i===12||i===160||i>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(i)>=0},isLineTerminator:function(i){return i===10||i===13||i===8232||i===8233},isIdentifierStart:function(i){return i===36||i===95||i>=65&&i<=90||i>=97&&i<=122||i===92||i>=128&&r.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(i))},isIdentifierPart:function(i){return i===36||i===95||i>=65&&i<=90||i>=97&&i<=122||i>=48&&i<=57||i===92||i>=128&&r.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(i))},isDecimalDigit:function(i){return i>=48&&i<=57},isHexDigit:function(i){return i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102},isOctalDigit:function(i){return i>=48&&i<=55}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(6),n=(function(){function h(g){this.type=i.JSXSyntax.JSXClosingElement,this.name=g}return h})();t.JSXClosingElement=n;var o=(function(){function h(g,x,v){this.type=i.JSXSyntax.JSXElement,this.openingElement=g,this.children=x,this.closingElement=v}return h})();t.JSXElement=o;var s=(function(){function h(){this.type=i.JSXSyntax.JSXEmptyExpression}return h})();t.JSXEmptyExpression=s;var u=(function(){function h(g){this.type=i.JSXSyntax.JSXExpressionContainer,this.expression=g}return h})();t.JSXExpressionContainer=u;var l=(function(){function h(g){this.type=i.JSXSyntax.JSXIdentifier,this.name=g}return h})();t.JSXIdentifier=l;var m=(function(){function h(g,x){this.type=i.JSXSyntax.JSXMemberExpression,this.object=g,this.property=x}return h})();t.JSXMemberExpression=m;var p=(function(){function h(g,x){this.type=i.JSXSyntax.JSXAttribute,this.name=g,this.value=x}return h})();t.JSXAttribute=p;var f=(function(){function h(g,x){this.type=i.JSXSyntax.JSXNamespacedName,this.namespace=g,this.name=x}return h})();t.JSXNamespacedName=f;var d=(function(){function h(g,x,v){this.type=i.JSXSyntax.JSXOpeningElement,this.name=g,this.selfClosing=x,this.attributes=v}return h})();t.JSXOpeningElement=d;var a=(function(){function h(g){this.type=i.JSXSyntax.JSXSpreadAttribute,this.argument=g}return h})();t.JSXSpreadAttribute=a;var c=(function(){function h(g,x){this.type=i.JSXSyntax.JSXText,this.value=g,this.raw=x}return h})();t.JSXText=c},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),n=(function(){function b(D){this.type=i.Syntax.ArrayExpression,this.elements=D}return b})();t.ArrayExpression=n;var o=(function(){function b(D){this.type=i.Syntax.ArrayPattern,this.elements=D}return b})();t.ArrayPattern=o;var s=(function(){function b(D,_,B){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=D,this.body=_,this.generator=!1,this.expression=B,this.async=!1}return b})();t.ArrowFunctionExpression=s;var u=(function(){function b(D,_,B){this.type=i.Syntax.AssignmentExpression,this.operator=D,this.left=_,this.right=B}return b})();t.AssignmentExpression=u;var l=(function(){function b(D,_){this.type=i.Syntax.AssignmentPattern,this.left=D,this.right=_}return b})();t.AssignmentPattern=l;var m=(function(){function b(D,_,B){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=D,this.body=_,this.generator=!1,this.expression=B,this.async=!0}return b})();t.AsyncArrowFunctionExpression=m;var p=(function(){function b(D,_,B){this.type=i.Syntax.FunctionDeclaration,this.id=D,this.params=_,this.body=B,this.generator=!1,this.expression=!1,this.async=!0}return b})();t.AsyncFunctionDeclaration=p;var f=(function(){function b(D,_,B){this.type=i.Syntax.FunctionExpression,this.id=D,this.params=_,this.body=B,this.generator=!1,this.expression=!1,this.async=!0}return b})();t.AsyncFunctionExpression=f;var d=(function(){function b(D){this.type=i.Syntax.AwaitExpression,this.argument=D}return b})();t.AwaitExpression=d;var a=(function(){function b(D,_,B){var Le=D==="||"||D==="&&";this.type=Le?i.Syntax.LogicalExpression:i.Syntax.BinaryExpression,this.operator=D,this.left=_,this.right=B}return b})();t.BinaryExpression=a;var c=(function(){function b(D){this.type=i.Syntax.BlockStatement,this.body=D}return b})();t.BlockStatement=c;var h=(function(){function b(D){this.type=i.Syntax.BreakStatement,this.label=D}return b})();t.BreakStatement=h;var g=(function(){function b(D,_){this.type=i.Syntax.CallExpression,this.callee=D,this.arguments=_}return b})();t.CallExpression=g;var x=(function(){function b(D,_){this.type=i.Syntax.CatchClause,this.param=D,this.body=_}return b})();t.CatchClause=x;var v=(function(){function b(D){this.type=i.Syntax.ClassBody,this.body=D}return b})();t.ClassBody=v;var E=(function(){function b(D,_,B){this.type=i.Syntax.ClassDeclaration,this.id=D,this.superClass=_,this.body=B}return b})();t.ClassDeclaration=E;var C=(function(){function b(D,_,B){this.type=i.Syntax.ClassExpression,this.id=D,this.superClass=_,this.body=B}return b})();t.ClassExpression=C;var A=(function(){function b(D,_){this.type=i.Syntax.MemberExpression,this.computed=!0,this.object=D,this.property=_}return b})();t.ComputedMemberExpression=A;var O=(function(){function b(D,_,B){this.type=i.Syntax.ConditionalExpression,this.test=D,this.consequent=_,this.alternate=B}return b})();t.ConditionalExpression=O;var P=(function(){function b(D){this.type=i.Syntax.ContinueStatement,this.label=D}return b})();t.ContinueStatement=P;var L=(function(){function b(){this.type=i.Syntax.DebuggerStatement}return b})();t.DebuggerStatement=L;var j=(function(){function b(D,_){this.type=i.Syntax.ExpressionStatement,this.expression=D,this.directive=_}return b})();t.Directive=j;var J=(function(){function b(D,_){this.type=i.Syntax.DoWhileStatement,this.body=D,this.test=_}return b})();t.DoWhileStatement=J;var X=(function(){function b(){this.type=i.Syntax.EmptyStatement}return b})();t.EmptyStatement=X;var ve=(function(){function b(D){this.type=i.Syntax.ExportAllDeclaration,this.source=D}return b})();t.ExportAllDeclaration=ve;var Mt=(function(){function b(D){this.type=i.Syntax.ExportDefaultDeclaration,this.declaration=D}return b})();t.ExportDefaultDeclaration=Mt;var Pr=(function(){function b(D,_,B){this.type=i.Syntax.ExportNamedDeclaration,this.declaration=D,this.specifiers=_,this.source=B}return b})();t.ExportNamedDeclaration=Pr;var tr=(function(){function b(D,_){this.type=i.Syntax.ExportSpecifier,this.exported=_,this.local=D}return b})();t.ExportSpecifier=tr;var zo=(function(){function b(D){this.type=i.Syntax.ExpressionStatement,this.expression=D}return b})();t.ExpressionStatement=zo;var Jo=(function(){function b(D,_,B){this.type=i.Syntax.ForInStatement,this.left=D,this.right=_,this.body=B,this.each=!1}return b})();t.ForInStatement=Jo;var Si=(function(){function b(D,_,B){this.type=i.Syntax.ForOfStatement,this.left=D,this.right=_,this.body=B}return b})();t.ForOfStatement=Si;var rr=(function(){function b(D,_,B,Le){this.type=i.Syntax.ForStatement,this.init=D,this.test=_,this.update=B,this.body=Le}return b})();t.ForStatement=rr;var Et=(function(){function b(D,_,B,Le){this.type=i.Syntax.FunctionDeclaration,this.id=D,this.params=_,this.body=B,this.generator=Le,this.expression=!1,this.async=!1}return b})();t.FunctionDeclaration=Et;var bt=(function(){function b(D,_,B,Le){this.type=i.Syntax.FunctionExpression,this.id=D,this.params=_,this.body=B,this.generator=Le,this.expression=!1,this.async=!1}return b})();t.FunctionExpression=bt;var bn=(function(){function b(D){this.type=i.Syntax.Identifier,this.name=D}return b})();t.Identifier=bn;var Ir=(function(){function b(D,_,B){this.type=i.Syntax.IfStatement,this.test=D,this.consequent=_,this.alternate=B}return b})();t.IfStatement=Ir;var ir=(function(){function b(D,_){this.type=i.Syntax.ImportDeclaration,this.specifiers=D,this.source=_}return b})();t.ImportDeclaration=ir;var se=(function(){function b(D){this.type=i.Syntax.ImportDefaultSpecifier,this.local=D}return b})();t.ImportDefaultSpecifier=se;var Te=(function(){function b(D){this.type=i.Syntax.ImportNamespaceSpecifier,this.local=D}return b})();t.ImportNamespaceSpecifier=Te;var et=(function(){function b(D,_){this.type=i.Syntax.ImportSpecifier,this.local=D,this.imported=_}return b})();t.ImportSpecifier=et;var Ue=(function(){function b(D,_){this.type=i.Syntax.LabeledStatement,this.label=D,this.body=_}return b})();t.LabeledStatement=Ue;var tt=(function(){function b(D,_){this.type=i.Syntax.Literal,this.value=D,this.raw=_}return b})();t.Literal=tt;var Lt=(function(){function b(D,_){this.type=i.Syntax.MetaProperty,this.meta=D,this.property=_}return b})();t.MetaProperty=Lt;var iv=(function(){function b(D,_,B,Le,Go){this.type=i.Syntax.MethodDefinition,this.key=D,this.computed=_,this.value=B,this.kind=Le,this.static=Go}return b})();t.MethodDefinition=iv;var nv=(function(){function b(D){this.type=i.Syntax.Program,this.body=D,this.sourceType="module"}return b})();t.Module=nv;var sv=(function(){function b(D,_){this.type=i.Syntax.NewExpression,this.callee=D,this.arguments=_}return b})();t.NewExpression=sv;var ov=(function(){function b(D){this.type=i.Syntax.ObjectExpression,this.properties=D}return b})();t.ObjectExpression=ov;var av=(function(){function b(D){this.type=i.Syntax.ObjectPattern,this.properties=D}return b})();t.ObjectPattern=av;var uv=(function(){function b(D,_,B,Le,Go,Pv){this.type=i.Syntax.Property,this.key=_,this.computed=B,this.value=Le,this.kind=D,this.method=Go,this.shorthand=Pv}return b})();t.Property=uv;var cv=(function(){function b(D,_,B,Le){this.type=i.Syntax.Literal,this.value=D,this.raw=_,this.regex={pattern:B,flags:Le}}return b})();t.RegexLiteral=cv;var lv=(function(){function b(D){this.type=i.Syntax.RestElement,this.argument=D}return b})();t.RestElement=lv;var hv=(function(){function b(D){this.type=i.Syntax.ReturnStatement,this.argument=D}return b})();t.ReturnStatement=hv;var fv=(function(){function b(D){this.type=i.Syntax.Program,this.body=D,this.sourceType="script"}return b})();t.Script=fv;var pv=(function(){function b(D){this.type=i.Syntax.SequenceExpression,this.expressions=D}return b})();t.SequenceExpression=pv;var dv=(function(){function b(D){this.type=i.Syntax.SpreadElement,this.argument=D}return b})();t.SpreadElement=dv;var mv=(function(){function b(D,_){this.type=i.Syntax.MemberExpression,this.computed=!1,this.object=D,this.property=_}return b})();t.StaticMemberExpression=mv;var gv=(function(){function b(){this.type=i.Syntax.Super}return b})();t.Super=gv;var yv=(function(){function b(D,_){this.type=i.Syntax.SwitchCase,this.test=D,this.consequent=_}return b})();t.SwitchCase=yv;var xv=(function(){function b(D,_){this.type=i.Syntax.SwitchStatement,this.discriminant=D,this.cases=_}return b})();t.SwitchStatement=xv;var vv=(function(){function b(D,_){this.type=i.Syntax.TaggedTemplateExpression,this.tag=D,this.quasi=_}return b})();t.TaggedTemplateExpression=vv;var wv=(function(){function b(D,_){this.type=i.Syntax.TemplateElement,this.value=D,this.tail=_}return b})();t.TemplateElement=wv;var Ev=(function(){function b(D,_){this.type=i.Syntax.TemplateLiteral,this.quasis=D,this.expressions=_}return b})();t.TemplateLiteral=Ev;var bv=(function(){function b(){this.type=i.Syntax.ThisExpression}return b})();t.ThisExpression=bv;var Cv=(function(){function b(D){this.type=i.Syntax.ThrowStatement,this.argument=D}return b})();t.ThrowStatement=Cv;var Dv=(function(){function b(D,_,B){this.type=i.Syntax.TryStatement,this.block=D,this.handler=_,this.finalizer=B}return b})();t.TryStatement=Dv;var Av=(function(){function b(D,_){this.type=i.Syntax.UnaryExpression,this.operator=D,this.argument=_,this.prefix=!0}return b})();t.UnaryExpression=Av;var _v=(function(){function b(D,_,B){this.type=i.Syntax.UpdateExpression,this.operator=D,this.argument=_,this.prefix=B}return b})();t.UpdateExpression=_v;var Sv=(function(){function b(D,_){this.type=i.Syntax.VariableDeclaration,this.declarations=D,this.kind=_}return b})();t.VariableDeclaration=Sv;var Fv=(function(){function b(D,_){this.type=i.Syntax.VariableDeclarator,this.id=D,this.init=_}return b})();t.VariableDeclarator=Fv;var Tv=(function(){function b(D,_){this.type=i.Syntax.WhileStatement,this.test=D,this.body=_}return b})();t.WhileStatement=Tv;var Ov=(function(){function b(D,_){this.type=i.Syntax.WithStatement,this.object=D,this.body=_}return b})();t.WithStatement=Ov;var kv=(function(){function b(D,_){this.type=i.Syntax.YieldExpression,this.argument=D,this.delegate=_}return b})();t.YieldExpression=kv},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(9),n=r(10),o=r(11),s=r(7),u=r(12),l=r(2),m=r(13),p="ArrowParameterPlaceHolder",f=(function(){function d(a,c,h){c===void 0&&(c={}),this.config={range:typeof c.range=="boolean"&&c.range,loc:typeof c.loc=="boolean"&&c.loc,source:null,tokens:typeof c.tokens=="boolean"&&c.tokens,comment:typeof c.comment=="boolean"&&c.comment,tolerant:typeof c.tolerant=="boolean"&&c.tolerant},this.config.loc&&c.source&&c.source!==null&&(this.config.source=String(c.source)),this.delegate=h,this.errorHandler=new n.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new u.Scanner(a,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return d.prototype.throwError=function(a){for(var c=[],h=1;h<arguments.length;h++)c[h-1]=arguments[h];var g=Array.prototype.slice.call(arguments,1),x=a.replace(/%(\d)/g,function(A,O){return i.assert(O<g.length,"Message reference must be in range"),g[O]}),v=this.lastMarker.index,E=this.lastMarker.line,C=this.lastMarker.column+1;throw this.errorHandler.createError(v,E,C,x)},d.prototype.tolerateError=function(a){for(var c=[],h=1;h<arguments.length;h++)c[h-1]=arguments[h];var g=Array.prototype.slice.call(arguments,1),x=a.replace(/%(\d)/g,function(A,O){return i.assert(O<g.length,"Message reference must be in range"),g[O]}),v=this.lastMarker.index,E=this.scanner.lineNumber,C=this.lastMarker.column+1;this.errorHandler.tolerateError(v,E,C,x)},d.prototype.unexpectedTokenError=function(a,c){var h=c||o.Messages.UnexpectedToken,g;if(a?(c||(h=a.type===2?o.Messages.UnexpectedEOS:a.type===3?o.Messages.UnexpectedIdentifier:a.type===6?o.Messages.UnexpectedNumber:a.type===8?o.Messages.UnexpectedString:a.type===10?o.Messages.UnexpectedTemplate:o.Messages.UnexpectedToken,a.type===4&&(this.scanner.isFutureReservedWord(a.value)?h=o.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(a.value)&&(h=o.Messages.StrictReservedWord))),g=a.value):g="ILLEGAL",h=h.replace("%0",g),a&&typeof a.lineNumber=="number"){var x=a.start,v=a.lineNumber,E=this.lastMarker.index-this.lastMarker.column,C=a.start-E+1;return this.errorHandler.createError(x,v,C,h)}else{var x=this.lastMarker.index,v=this.lastMarker.line,C=this.lastMarker.column+1;return this.errorHandler.createError(x,v,C,h)}},d.prototype.throwUnexpectedToken=function(a,c){throw this.unexpectedTokenError(a,c)},d.prototype.tolerateUnexpectedToken=function(a,c){this.errorHandler.tolerate(this.unexpectedTokenError(a,c))},d.prototype.collectComments=function(){if(!this.config.comment)this.scanner.scanComments();else{var a=this.scanner.scanComments();if(a.length>0&&this.delegate)for(var c=0;c<a.length;++c){var h=a[c],g=void 0;g={type:h.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(h.slice[0],h.slice[1])},this.config.range&&(g.range=h.range),this.config.loc&&(g.loc=h.loc);var x={start:{line:h.loc.start.line,column:h.loc.start.column,offset:h.range[0]},end:{line:h.loc.end.line,column:h.loc.end.column,offset:h.range[1]}};this.delegate(g,x)}}},d.prototype.getTokenRaw=function(a){return this.scanner.source.slice(a.start,a.end)},d.prototype.convertToken=function(a){var c={type:m.TokenName[a.type],value:this.getTokenRaw(a)};if(this.config.range&&(c.range=[a.start,a.end]),this.config.loc&&(c.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),a.type===9){var h=a.pattern,g=a.flags;c.regex={pattern:h,flags:g}}return c},d.prototype.nextToken=function(){var a=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);var c=this.scanner.lex();return this.hasLineTerminator=a.lineNumber!==c.lineNumber,c&&this.context.strict&&c.type===3&&this.scanner.isStrictModeReservedWord(c.value)&&(c.type=4),this.lookahead=c,this.config.tokens&&c.type!==2&&this.tokens.push(this.convertToken(c)),a},d.prototype.nextRegexToken=function(){this.collectComments();var a=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(a))),this.lookahead=a,this.nextToken(),a},d.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},d.prototype.startNode=function(a,c){c===void 0&&(c=0);var h=a.start-a.lineStart,g=a.lineNumber;return h<0&&(h+=c,g--),{index:a.start,line:g,column:h}},d.prototype.finalize=function(a,c){if(this.config.range&&(c.range=[a.index,this.lastMarker.index]),this.config.loc&&(c.loc={start:{line:a.line,column:a.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(c.loc.source=this.config.source)),this.delegate){var h={start:{line:a.line,column:a.column,offset:a.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(c,h)}return c},d.prototype.expect=function(a){var c=this.nextToken();(c.type!==7||c.value!==a)&&this.throwUnexpectedToken(c)},d.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var a=this.lookahead;a.type===7&&a.value===","?this.nextToken():a.type===7&&a.value===";"?(this.nextToken(),this.tolerateUnexpectedToken(a)):this.tolerateUnexpectedToken(a,o.Messages.UnexpectedToken)}else this.expect(",")},d.prototype.expectKeyword=function(a){var c=this.nextToken();(c.type!==4||c.value!==a)&&this.throwUnexpectedToken(c)},d.prototype.match=function(a){return this.lookahead.type===7&&this.lookahead.value===a},d.prototype.matchKeyword=function(a){return this.lookahead.type===4&&this.lookahead.value===a},d.prototype.matchContextualKeyword=function(a){return this.lookahead.type===3&&this.lookahead.value===a},d.prototype.matchAssign=function(){if(this.lookahead.type!==7)return!1;var a=this.lookahead.value;return a==="="||a==="*="||a==="**="||a==="/="||a==="%="||a==="+="||a==="-="||a==="<<="||a===">>="||a===">>>="||a==="&="||a==="^="||a==="|="},d.prototype.isolateCoverGrammar=function(a){var c=this.context.isBindingElement,h=this.context.isAssignmentTarget,g=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var x=a.call(this);return this.context.firstCoverInitializedNameError!==null&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=c,this.context.isAssignmentTarget=h,this.context.firstCoverInitializedNameError=g,x},d.prototype.inheritCoverGrammar=function(a){var c=this.context.isBindingElement,h=this.context.isAssignmentTarget,g=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var x=a.call(this);return this.context.isBindingElement=this.context.isBindingElement&&c,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&h,this.context.firstCoverInitializedNameError=g||this.context.firstCoverInitializedNameError,x},d.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(this.lookahead.type!==2&&!this.match("}")&&this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},d.prototype.parsePrimaryExpression=function(){var a=this.createNode(),c,h,g;switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&this.lookahead.value==="await"&&this.tolerateUnexpectedToken(this.lookahead),c=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(a,new s.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,h=this.nextToken(),g=this.getTokenRaw(h),c=this.finalize(a,new s.Literal(h.value,g));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,h=this.nextToken(),g=this.getTokenRaw(h),c=this.finalize(a,new s.Literal(h.value==="true",g));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,h=this.nextToken(),g=this.getTokenRaw(h),c=this.finalize(a,new s.Literal(null,g));break;case 10:c=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,c=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":c=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":c=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,h=this.nextRegexToken(),g=this.getTokenRaw(h),c=this.finalize(a,new s.RegexLiteral(h.regex,g,h.pattern,h.flags));break;default:c=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?c=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?c=this.finalize(a,new s.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?c=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),c=this.finalize(a,new s.ThisExpression)):this.matchKeyword("class")?c=this.parseClassExpression():c=this.throwUnexpectedToken(this.nextToken()));break;default:c=this.throwUnexpectedToken(this.nextToken())}return c},d.prototype.parseSpreadElement=function(){var a=this.createNode();this.expect("...");var c=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(a,new s.SpreadElement(c))},d.prototype.parseArrayInitializer=function(){var a=this.createNode(),c=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),c.push(null);else if(this.match("...")){var h=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),c.push(h)}else c.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(a,new s.ArrayExpression(c))},d.prototype.parsePropertyMethod=function(a){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var c=this.context.strict,h=this.context.allowStrictDirective;this.context.allowStrictDirective=a.simple;var g=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&a.firstRestricted&&this.tolerateUnexpectedToken(a.firstRestricted,a.message),this.context.strict&&a.stricted&&this.tolerateUnexpectedToken(a.stricted,a.message),this.context.strict=c,this.context.allowStrictDirective=h,g},d.prototype.parsePropertyMethodFunction=function(){var a=!1,c=this.createNode(),h=this.context.allowYield;this.context.allowYield=!0;var g=this.parseFormalParameters(),x=this.parsePropertyMethod(g);return this.context.allowYield=h,this.finalize(c,new s.FunctionExpression(null,g.params,x,a))},d.prototype.parsePropertyMethodAsyncFunction=function(){var a=this.createNode(),c=this.context.allowYield,h=this.context.await;this.context.allowYield=!1,this.context.await=!0;var g=this.parseFormalParameters(),x=this.parsePropertyMethod(g);return this.context.allowYield=c,this.context.await=h,this.finalize(a,new s.AsyncFunctionExpression(null,g.params,x))},d.prototype.parseObjectPropertyKey=function(){var a=this.createNode(),c=this.nextToken(),h;switch(c.type){case 8:case 6:this.context.strict&&c.octal&&this.tolerateUnexpectedToken(c,o.Messages.StrictOctalLiteral);var g=this.getTokenRaw(c);h=this.finalize(a,new s.Literal(c.value,g));break;case 3:case 1:case 5:case 4:h=this.finalize(a,new s.Identifier(c.value));break;case 7:c.value==="["?(h=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):h=this.throwUnexpectedToken(c);break;default:h=this.throwUnexpectedToken(c)}return h},d.prototype.isPropertyKey=function(a,c){return a.type===l.Syntax.Identifier&&a.name===c||a.type===l.Syntax.Literal&&a.value===c},d.prototype.parseObjectProperty=function(a){var c=this.createNode(),h=this.lookahead,g,x=null,v=null,E=!1,C=!1,A=!1,O=!1;if(h.type===3){var P=h.value;this.nextToken(),E=this.match("["),O=!this.hasLineTerminator&&P==="async"&&!this.match(":")&&!this.match("(")&&!this.match("*")&&!this.match(","),x=O?this.parseObjectPropertyKey():this.finalize(c,new s.Identifier(P))}else this.match("*")?this.nextToken():(E=this.match("["),x=this.parseObjectPropertyKey());var L=this.qualifiedPropertyName(this.lookahead);if(h.type===3&&!O&&h.value==="get"&&L)g="get",E=this.match("["),x=this.parseObjectPropertyKey(),this.context.allowYield=!1,v=this.parseGetterMethod();else if(h.type===3&&!O&&h.value==="set"&&L)g="set",E=this.match("["),x=this.parseObjectPropertyKey(),v=this.parseSetterMethod();else if(h.type===7&&h.value==="*"&&L)g="init",E=this.match("["),x=this.parseObjectPropertyKey(),v=this.parseGeneratorMethod(),C=!0;else if(x||this.throwUnexpectedToken(this.lookahead),g="init",this.match(":")&&!O)!E&&this.isPropertyKey(x,"__proto__")&&(a.value&&this.tolerateError(o.Messages.DuplicateProtoProperty),a.value=!0),this.nextToken(),v=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))v=O?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),C=!0;else if(h.type===3){var P=this.finalize(c,new s.Identifier(h.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),A=!0;var j=this.isolateCoverGrammar(this.parseAssignmentExpression);v=this.finalize(c,new s.AssignmentPattern(P,j))}else A=!0,v=P}else this.throwUnexpectedToken(this.nextToken());return this.finalize(c,new s.Property(g,x,E,v,C,A))},d.prototype.parseObjectInitializer=function(){var a=this.createNode();this.expect("{");for(var c=[],h={value:!1};!this.match("}");)c.push(this.parseObjectProperty(h)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(a,new s.ObjectExpression(c))},d.prototype.parseTemplateHead=function(){i.assert(this.lookahead.head,"Template literal must start with a template head");var a=this.createNode(),c=this.nextToken(),h=c.value,g=c.cooked;return this.finalize(a,new s.TemplateElement({raw:h,cooked:g},c.tail))},d.prototype.parseTemplateElement=function(){this.lookahead.type!==10&&this.throwUnexpectedToken();var a=this.createNode(),c=this.nextToken(),h=c.value,g=c.cooked;return this.finalize(a,new s.TemplateElement({raw:h,cooked:g},c.tail))},d.prototype.parseTemplateLiteral=function(){var a=this.createNode(),c=[],h=[],g=this.parseTemplateHead();for(h.push(g);!g.tail;)c.push(this.parseExpression()),g=this.parseTemplateElement(),h.push(g);return this.finalize(a,new s.TemplateLiteral(h,c))},d.prototype.reinterpretExpressionAsPattern=function(a){switch(a.type){case l.Syntax.Identifier:case l.Syntax.MemberExpression:case l.Syntax.RestElement:case l.Syntax.AssignmentPattern:break;case l.Syntax.SpreadElement:a.type=l.Syntax.RestElement,this.reinterpretExpressionAsPattern(a.argument);break;case l.Syntax.ArrayExpression:a.type=l.Syntax.ArrayPattern;for(var c=0;c<a.elements.length;c++)a.elements[c]!==null&&this.reinterpretExpressionAsPattern(a.elements[c]);break;case l.Syntax.ObjectExpression:a.type=l.Syntax.ObjectPattern;for(var c=0;c<a.properties.length;c++)this.reinterpretExpressionAsPattern(a.properties[c].value);break;case l.Syntax.AssignmentExpression:a.type=l.Syntax.AssignmentPattern,delete a.operator,this.reinterpretExpressionAsPattern(a.left);break;default:break}},d.prototype.parseGroupExpression=function(){var a;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),a={type:p,params:[],async:!1};else{var c=this.lookahead,h=[];if(this.match("..."))a=this.parseRestElement(h),this.expect(")"),this.match("=>")||this.expect("=>"),a={type:p,params:[a],async:!1};else{var g=!1;if(this.context.isBindingElement=!0,a=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var x=[];for(this.context.isAssignmentTarget=!1,x.push(a);this.lookahead.type!==2&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var v=0;v<x.length;v++)this.reinterpretExpressionAsPattern(x[v]);g=!0,a={type:p,params:x,async:!1}}else if(this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),x.push(this.parseRestElement(h)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1;for(var v=0;v<x.length;v++)this.reinterpretExpressionAsPattern(x[v]);g=!0,a={type:p,params:x,async:!1}}else x.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(g)break}g||(a=this.finalize(this.startNode(c),new s.SequenceExpression(x)))}if(!g){if(this.expect(")"),this.match("=>")&&(a.type===l.Syntax.Identifier&&a.name==="yield"&&(g=!0,a={type:p,params:[a],async:!1}),!g)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),a.type===l.Syntax.SequenceExpression)for(var v=0;v<a.expressions.length;v++)this.reinterpretExpressionAsPattern(a.expressions[v]);else this.reinterpretExpressionAsPattern(a);var E=a.type===l.Syntax.SequenceExpression?a.expressions:[a];a={type:p,params:E,async:!1}}this.context.isBindingElement=!1}}}return a},d.prototype.parseArguments=function(){this.expect("(");var a=[];if(!this.match(")"))for(;;){var c=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(a.push(c),this.match(")")||(this.expectCommaSeparator(),this.match(")")))break}return this.expect(")"),a},d.prototype.isIdentifierName=function(a){return a.type===3||a.type===4||a.type===1||a.type===5},d.prototype.parseIdentifierName=function(){var a=this.createNode(),c=this.nextToken();return this.isIdentifierName(c)||this.throwUnexpectedToken(c),this.finalize(a,new s.Identifier(c.value))},d.prototype.parseNewExpression=function(){var a=this.createNode(),c=this.parseIdentifierName();i.assert(c.name==="new","New expression must start with `new`");var h;if(this.match("."))if(this.nextToken(),this.lookahead.type===3&&this.context.inFunctionBody&&this.lookahead.value==="target"){var g=this.parseIdentifierName();h=new s.MetaProperty(c,g)}else this.throwUnexpectedToken(this.lookahead);else{var x=this.isolateCoverGrammar(this.parseLeftHandSideExpression),v=this.match("(")?this.parseArguments():[];h=new s.NewExpression(x,v),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(a,h)},d.prototype.parseAsyncArgument=function(){var a=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,a},d.prototype.parseAsyncArguments=function(){this.expect("(");var a=[];if(!this.match(")"))for(;;){var c=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(a.push(c),this.match(")")||(this.expectCommaSeparator(),this.match(")")))break}return this.expect(")"),a},d.prototype.parseLeftHandSideExpressionAllowCall=function(){var a=this.lookahead,c=this.matchContextualKeyword("async"),h=this.context.allowIn;this.context.allowIn=!0;var g;for(this.matchKeyword("super")&&this.context.inFunctionBody?(g=this.createNode(),this.nextToken(),g=this.finalize(g,new s.Super),!this.match("(")&&!this.match(".")&&!this.match("[")&&this.throwUnexpectedToken(this.lookahead)):g=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var x=this.parseIdentifierName();g=this.finalize(this.startNode(a),new s.StaticMemberExpression(g,x))}else if(this.match("(")){var v=c&&a.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var E=v?this.parseAsyncArguments():this.parseArguments();if(g=this.finalize(this.startNode(a),new s.CallExpression(g,E)),v&&this.match("=>")){for(var C=0;C<E.length;++C)this.reinterpretExpressionAsPattern(E[C]);g={type:p,params:E,async:!0}}}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var x=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),g=this.finalize(this.startNode(a),new s.ComputedMemberExpression(g,x))}else if(this.lookahead.type===10&&this.lookahead.head){var A=this.parseTemplateLiteral();g=this.finalize(this.startNode(a),new s.TaggedTemplateExpression(g,A))}else break;return this.context.allowIn=h,g},d.prototype.parseSuper=function(){var a=this.createNode();return this.expectKeyword("super"),!this.match("[")&&!this.match(".")&&this.throwUnexpectedToken(this.lookahead),this.finalize(a,new s.Super)},d.prototype.parseLeftHandSideExpression=function(){i.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var a=this.startNode(this.lookahead),c=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var h=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),c=this.finalize(a,new s.ComputedMemberExpression(c,h))}else if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var h=this.parseIdentifierName();c=this.finalize(a,new s.StaticMemberExpression(c,h))}else if(this.lookahead.type===10&&this.lookahead.head){var g=this.parseTemplateLiteral();c=this.finalize(a,new s.TaggedTemplateExpression(c,g))}else break;return c},d.prototype.parseUpdateExpression=function(){var a,c=this.lookahead;if(this.match("++")||this.match("--")){var h=this.startNode(c),g=this.nextToken();a=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&a.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(a.name)&&this.tolerateError(o.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment);var x=!0;a=this.finalize(h,new s.UpdateExpression(g.value,a,x)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(a=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&this.lookahead.type===7&&(this.match("++")||this.match("--"))){this.context.strict&&a.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(a.name)&&this.tolerateError(o.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var v=this.nextToken().value,x=!1;a=this.finalize(this.startNode(c),new s.UpdateExpression(v,a,x))}return a},d.prototype.parseAwaitExpression=function(){var a=this.createNode();this.nextToken();var c=this.parseUnaryExpression();return this.finalize(a,new s.AwaitExpression(c))},d.prototype.parseUnaryExpression=function(){var a;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var c=this.startNode(this.lookahead),h=this.nextToken();a=this.inheritCoverGrammar(this.parseUnaryExpression),a=this.finalize(c,new s.UnaryExpression(h.value,a)),this.context.strict&&a.operator==="delete"&&a.argument.type===l.Syntax.Identifier&&this.tolerateError(o.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else this.context.await&&this.matchContextualKeyword("await")?a=this.parseAwaitExpression():a=this.parseUpdateExpression();return a},d.prototype.parseExponentiationExpression=function(){var a=this.lookahead,c=this.inheritCoverGrammar(this.parseUnaryExpression);if(c.type!==l.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var h=c,g=this.isolateCoverGrammar(this.parseExponentiationExpression);c=this.finalize(this.startNode(a),new s.BinaryExpression("**",h,g))}return c},d.prototype.binaryPrecedence=function(a){var c=a.value,h;return a.type===7?h=this.operatorPrecedence[c]||0:a.type===4?h=c==="instanceof"||this.context.allowIn&&c==="in"?7:0:h=0,h},d.prototype.parseBinaryExpression=function(){var a=this.lookahead,c=this.inheritCoverGrammar(this.parseExponentiationExpression),h=this.lookahead,g=this.binaryPrecedence(h);if(g>0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var x=[a,this.lookahead],v=c,E=this.isolateCoverGrammar(this.parseExponentiationExpression),C=[v,h.value,E],A=[g];g=this.binaryPrecedence(this.lookahead),!(g<=0);){for(;C.length>2&&g<=A[A.length-1];){E=C.pop();var O=C.pop();A.pop(),v=C.pop(),x.pop();var P=this.startNode(x[x.length-1]);C.push(this.finalize(P,new s.BinaryExpression(O,v,E)))}C.push(this.nextToken().value),A.push(g),x.push(this.lookahead),C.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var L=C.length-1;c=C[L];for(var j=x.pop();L>1;){var J=x.pop(),X=j&&j.lineStart,P=this.startNode(J,X),O=C[L-1];c=this.finalize(P,new s.BinaryExpression(O,C[L-2],c)),L-=2,j=J}}return c},d.prototype.parseConditionalExpression=function(){var a=this.lookahead,c=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var h=this.context.allowIn;this.context.allowIn=!0;var g=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=h,this.expect(":");var x=this.isolateCoverGrammar(this.parseAssignmentExpression);c=this.finalize(this.startNode(a),new s.ConditionalExpression(c,g,x)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return c},d.prototype.checkPatternParam=function(a,c){switch(c.type){case l.Syntax.Identifier:this.validateParam(a,c,c.name);break;case l.Syntax.RestElement:this.checkPatternParam(a,c.argument);break;case l.Syntax.AssignmentPattern:this.checkPatternParam(a,c.left);break;case l.Syntax.ArrayPattern:for(var h=0;h<c.elements.length;h++)c.elements[h]!==null&&this.checkPatternParam(a,c.elements[h]);break;case l.Syntax.ObjectPattern:for(var h=0;h<c.properties.length;h++)this.checkPatternParam(a,c.properties[h].value);break;default:break}a.simple=a.simple&&c instanceof s.Identifier},d.prototype.reinterpretAsCoverFormalsList=function(a){var c=[a],h,g=!1;switch(a.type){case l.Syntax.Identifier:break;case p:c=a.params,g=a.async;break;default:return null}h={simple:!0,paramSet:{}};for(var x=0;x<c.length;++x){var v=c[x];v.type===l.Syntax.AssignmentPattern?v.right.type===l.Syntax.YieldExpression&&(v.right.argument&&this.throwUnexpectedToken(this.lookahead),v.right.type=l.Syntax.Identifier,v.right.name="yield",delete v.right.argument,delete v.right.delegate):g&&v.type===l.Syntax.Identifier&&v.name==="await"&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(h,v),c[x]=v}if(this.context.strict||!this.context.allowYield)for(var x=0;x<c.length;++x){var v=c[x];v.type===l.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead)}if(h.message===o.Messages.StrictParamDupe){var E=this.context.strict?h.stricted:h.firstRestricted;this.throwUnexpectedToken(E,h.message)}return{simple:h.simple,params:c,stricted:h.stricted,firstRestricted:h.firstRestricted,message:h.message}},d.prototype.parseAssignmentExpression=function(){var a;if(!this.context.allowYield&&this.matchKeyword("yield"))a=this.parseYieldExpression();else{var c=this.lookahead,h=c;if(a=this.parseConditionalExpression(),h.type===3&&h.lineNumber===this.lookahead.lineNumber&&h.value==="async"&&(this.lookahead.type===3||this.matchKeyword("yield"))){var g=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(g),a={type:p,params:[g],async:!0}}if(a.type===p||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var x=a.async,v=this.reinterpretAsCoverFormalsList(a);if(v){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var E=this.context.strict,C=this.context.allowStrictDirective;this.context.allowStrictDirective=v.simple;var A=this.context.allowYield,O=this.context.await;this.context.allowYield=!0,this.context.await=x;var P=this.startNode(c);this.expect("=>");var L=void 0;if(this.match("{")){var j=this.context.allowIn;this.context.allowIn=!0,L=this.parseFunctionSourceElements(),this.context.allowIn=j}else L=this.isolateCoverGrammar(this.parseAssignmentExpression);var J=L.type!==l.Syntax.BlockStatement;this.context.strict&&v.firstRestricted&&this.throwUnexpectedToken(v.firstRestricted,v.message),this.context.strict&&v.stricted&&this.tolerateUnexpectedToken(v.stricted,v.message),a=x?this.finalize(P,new s.AsyncArrowFunctionExpression(v.params,L,J)):this.finalize(P,new s.ArrowFunctionExpression(v.params,L,J)),this.context.strict=E,this.context.allowStrictDirective=C,this.context.allowYield=A,this.context.await=O}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.strict&&a.type===l.Syntax.Identifier){var X=a;this.scanner.isRestrictedWord(X.name)&&this.tolerateUnexpectedToken(h,o.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(X.name)&&this.tolerateUnexpectedToken(h,o.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(a):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),h=this.nextToken();var ve=h.value,Mt=this.isolateCoverGrammar(this.parseAssignmentExpression);a=this.finalize(this.startNode(c),new s.AssignmentExpression(ve,a,Mt)),this.context.firstCoverInitializedNameError=null}}return a},d.prototype.parseExpression=function(){var a=this.lookahead,c=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var h=[];for(h.push(c);this.lookahead.type!==2&&this.match(",");)this.nextToken(),h.push(this.isolateCoverGrammar(this.parseAssignmentExpression));c=this.finalize(this.startNode(a),new s.SequenceExpression(h))}return c},d.prototype.parseStatementListItem=function(){var a;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,this.lookahead.type===4)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalExportDeclaration),a=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalImportDeclaration),a=this.parseImportDeclaration();break;case"const":a=this.parseLexicalDeclaration({inFor:!1});break;case"function":a=this.parseFunctionDeclaration();break;case"class":a=this.parseClassDeclaration();break;case"let":a=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:a=this.parseStatement();break}else a=this.parseStatement();return a},d.prototype.parseBlock=function(){var a=this.createNode();this.expect("{");for(var c=[];!this.match("}");)c.push(this.parseStatementListItem());return this.expect("}"),this.finalize(a,new s.BlockStatement(c))},d.prototype.parseLexicalBinding=function(a,c){var h=this.createNode(),g=[],x=this.parsePattern(g,a);this.context.strict&&x.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(x.name)&&this.tolerateError(o.Messages.StrictVarName);var v=null;return a==="const"?!this.matchKeyword("in")&&!this.matchContextualKeyword("of")&&(this.match("=")?(this.nextToken(),v=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(o.Messages.DeclarationMissingInitializer,"const")):(!c.inFor&&x.type!==l.Syntax.Identifier||this.match("="))&&(this.expect("="),v=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(h,new s.VariableDeclarator(x,v))},d.prototype.parseBindingList=function(a,c){for(var h=[this.parseLexicalBinding(a,c)];this.match(",");)this.nextToken(),h.push(this.parseLexicalBinding(a,c));return h},d.prototype.isLexicalDeclaration=function(){var a=this.scanner.saveState();this.scanner.scanComments();var c=this.scanner.lex();return this.scanner.restoreState(a),c.type===3||c.type===7&&c.value==="["||c.type===7&&c.value==="{"||c.type===4&&c.value==="let"||c.type===4&&c.value==="yield"},d.prototype.parseLexicalDeclaration=function(a){var c=this.createNode(),h=this.nextToken().value;i.assert(h==="let"||h==="const","Lexical declaration must be either let or const");var g=this.parseBindingList(h,a);return this.consumeSemicolon(),this.finalize(c,new s.VariableDeclaration(g,h))},d.prototype.parseBindingRestElement=function(a,c){var h=this.createNode();this.expect("...");var g=this.parsePattern(a,c);return this.finalize(h,new s.RestElement(g))},d.prototype.parseArrayPattern=function(a,c){var h=this.createNode();this.expect("[");for(var g=[];!this.match("]");)if(this.match(","))this.nextToken(),g.push(null);else{if(this.match("...")){g.push(this.parseBindingRestElement(a,c));break}else g.push(this.parsePatternWithDefault(a,c));this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(h,new s.ArrayPattern(g))},d.prototype.parsePropertyPattern=function(a,c){var h=this.createNode(),g=!1,x=!1,v=!1,E,C;if(this.lookahead.type===3){var A=this.lookahead;E=this.parseVariableIdentifier();var O=this.finalize(h,new s.Identifier(A.value));if(this.match("=")){a.push(A),x=!0,this.nextToken();var P=this.parseAssignmentExpression();C=this.finalize(this.startNode(A),new s.AssignmentPattern(O,P))}else this.match(":")?(this.expect(":"),C=this.parsePatternWithDefault(a,c)):(a.push(A),x=!0,C=O)}else g=this.match("["),E=this.parseObjectPropertyKey(),this.expect(":"),C=this.parsePatternWithDefault(a,c);return this.finalize(h,new s.Property("init",E,g,C,v,x))},d.prototype.parseObjectPattern=function(a,c){var h=this.createNode(),g=[];for(this.expect("{");!this.match("}");)g.push(this.parsePropertyPattern(a,c)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(h,new s.ObjectPattern(g))},d.prototype.parsePattern=function(a,c){var h;return this.match("[")?h=this.parseArrayPattern(a,c):this.match("{")?h=this.parseObjectPattern(a,c):(this.matchKeyword("let")&&(c==="const"||c==="let")&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.LetInLexicalBinding),a.push(this.lookahead),h=this.parseVariableIdentifier(c)),h},d.prototype.parsePatternWithDefault=function(a,c){var h=this.lookahead,g=this.parsePattern(a,c);if(this.match("=")){this.nextToken();var x=this.context.allowYield;this.context.allowYield=!0;var v=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=x,g=this.finalize(this.startNode(h),new s.AssignmentPattern(g,v))}return g},d.prototype.parseVariableIdentifier=function(a){var c=this.createNode(),h=this.nextToken();return h.type===4&&h.value==="yield"?this.context.strict?this.tolerateUnexpectedToken(h,o.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(h):h.type!==3?this.context.strict&&h.type===4&&this.scanner.isStrictModeReservedWord(h.value)?this.tolerateUnexpectedToken(h,o.Messages.StrictReservedWord):(this.context.strict||h.value!=="let"||a!=="var")&&this.throwUnexpectedToken(h):(this.context.isModule||this.context.await)&&h.type===3&&h.value==="await"&&this.tolerateUnexpectedToken(h),this.finalize(c,new s.Identifier(h.value))},d.prototype.parseVariableDeclaration=function(a){var c=this.createNode(),h=[],g=this.parsePattern(h,"var");this.context.strict&&g.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(g.name)&&this.tolerateError(o.Messages.StrictVarName);var x=null;return this.match("=")?(this.nextToken(),x=this.isolateCoverGrammar(this.parseAssignmentExpression)):g.type!==l.Syntax.Identifier&&!a.inFor&&this.expect("="),this.finalize(c,new s.VariableDeclarator(g,x))},d.prototype.parseVariableDeclarationList=function(a){var c={inFor:a.inFor},h=[];for(h.push(this.parseVariableDeclaration(c));this.match(",");)this.nextToken(),h.push(this.parseVariableDeclaration(c));return h},d.prototype.parseVariableStatement=function(){var a=this.createNode();this.expectKeyword("var");var c=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(a,new s.VariableDeclaration(c,"var"))},d.prototype.parseEmptyStatement=function(){var a=this.createNode();return this.expect(";"),this.finalize(a,new s.EmptyStatement)},d.prototype.parseExpressionStatement=function(){var a=this.createNode(),c=this.parseExpression();return this.consumeSemicolon(),this.finalize(a,new s.ExpressionStatement(c))},d.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(o.Messages.StrictFunction),this.parseStatement()},d.prototype.parseIfStatement=function(){var a=this.createNode(),c,h=null;this.expectKeyword("if"),this.expect("(");var g=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),c=this.finalize(this.createNode(),new s.EmptyStatement)):(this.expect(")"),c=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),h=this.parseIfClause())),this.finalize(a,new s.IfStatement(g,c,h))},d.prototype.parseDoWhileStatement=function(){var a=this.createNode();this.expectKeyword("do");var c=this.context.inIteration;this.context.inIteration=!0;var h=this.parseStatement();this.context.inIteration=c,this.expectKeyword("while"),this.expect("(");var g=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(a,new s.DoWhileStatement(h,g))},d.prototype.parseWhileStatement=function(){var a=this.createNode(),c;this.expectKeyword("while"),this.expect("(");var h=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),c=this.finalize(this.createNode(),new s.EmptyStatement);else{this.expect(")");var g=this.context.inIteration;this.context.inIteration=!0,c=this.parseStatement(),this.context.inIteration=g}return this.finalize(a,new s.WhileStatement(h,c))},d.prototype.parseForStatement=function(){var a=null,c=null,h=null,g=!0,x,v,E=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){a=this.createNode(),this.nextToken();var C=this.context.allowIn;this.context.allowIn=!1;var A=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=C,A.length===1&&this.matchKeyword("in")){var O=A[0];O.init&&(O.id.type===l.Syntax.ArrayPattern||O.id.type===l.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(o.Messages.ForInOfLoopInitializer,"for-in"),a=this.finalize(a,new s.VariableDeclaration(A,"var")),this.nextToken(),x=a,v=this.parseExpression(),a=null}else A.length===1&&A[0].init===null&&this.matchContextualKeyword("of")?(a=this.finalize(a,new s.VariableDeclaration(A,"var")),this.nextToken(),x=a,v=this.parseAssignmentExpression(),a=null,g=!1):(a=this.finalize(a,new s.VariableDeclaration(A,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){a=this.createNode();var P=this.nextToken().value;if(!this.context.strict&&this.lookahead.value==="in")a=this.finalize(a,new s.Identifier(P)),this.nextToken(),x=a,v=this.parseExpression(),a=null;else{var C=this.context.allowIn;this.context.allowIn=!1;var A=this.parseBindingList(P,{inFor:!0});this.context.allowIn=C,A.length===1&&A[0].init===null&&this.matchKeyword("in")?(a=this.finalize(a,new s.VariableDeclaration(A,P)),this.nextToken(),x=a,v=this.parseExpression(),a=null):A.length===1&&A[0].init===null&&this.matchContextualKeyword("of")?(a=this.finalize(a,new s.VariableDeclaration(A,P)),this.nextToken(),x=a,v=this.parseAssignmentExpression(),a=null,g=!1):(this.consumeSemicolon(),a=this.finalize(a,new s.VariableDeclaration(A,P)))}}else{var L=this.lookahead,C=this.context.allowIn;if(this.context.allowIn=!1,a=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=C,this.matchKeyword("in"))(!this.context.isAssignmentTarget||a.type===l.Syntax.AssignmentExpression)&&this.tolerateError(o.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(a),x=a,v=this.parseExpression(),a=null;else if(this.matchContextualKeyword("of"))(!this.context.isAssignmentTarget||a.type===l.Syntax.AssignmentExpression)&&this.tolerateError(o.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(a),x=a,v=this.parseAssignmentExpression(),a=null,g=!1;else{if(this.match(",")){for(var j=[a];this.match(",");)this.nextToken(),j.push(this.isolateCoverGrammar(this.parseAssignmentExpression));a=this.finalize(this.startNode(L),new s.SequenceExpression(j))}this.expect(";")}}typeof x>"u"&&(this.match(";")||(c=this.parseExpression()),this.expect(";"),this.match(")")||(h=this.parseExpression()));var J;if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),J=this.finalize(this.createNode(),new s.EmptyStatement);else{this.expect(")");var X=this.context.inIteration;this.context.inIteration=!0,J=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=X}return typeof x>"u"?this.finalize(E,new s.ForStatement(a,c,h,J)):g?this.finalize(E,new s.ForInStatement(x,v,J)):this.finalize(E,new s.ForOfStatement(x,v,J))},d.prototype.parseContinueStatement=function(){var a=this.createNode();this.expectKeyword("continue");var c=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var h=this.parseVariableIdentifier();c=h;var g="$"+h.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,g)||this.throwError(o.Messages.UnknownLabel,h.name)}return this.consumeSemicolon(),c===null&&!this.context.inIteration&&this.throwError(o.Messages.IllegalContinue),this.finalize(a,new s.ContinueStatement(c))},d.prototype.parseBreakStatement=function(){var a=this.createNode();this.expectKeyword("break");var c=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var h=this.parseVariableIdentifier(),g="$"+h.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,g)||this.throwError(o.Messages.UnknownLabel,h.name),c=h}return this.consumeSemicolon(),c===null&&!this.context.inIteration&&!this.context.inSwitch&&this.throwError(o.Messages.IllegalBreak),this.finalize(a,new s.BreakStatement(c))},d.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(o.Messages.IllegalReturn);var a=this.createNode();this.expectKeyword("return");var c=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==2||this.lookahead.type===8||this.lookahead.type===10,h=c?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(a,new s.ReturnStatement(h))},d.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(o.Messages.StrictModeWith);var a=this.createNode(),c;this.expectKeyword("with"),this.expect("(");var h=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),c=this.finalize(this.createNode(),new s.EmptyStatement)):(this.expect(")"),c=this.parseStatement()),this.finalize(a,new s.WithStatement(h,c))},d.prototype.parseSwitchCase=function(){var a=this.createNode(),c;this.matchKeyword("default")?(this.nextToken(),c=null):(this.expectKeyword("case"),c=this.parseExpression()),this.expect(":");for(var h=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)h.push(this.parseStatementListItem());return this.finalize(a,new s.SwitchCase(c,h))},d.prototype.parseSwitchStatement=function(){var a=this.createNode();this.expectKeyword("switch"),this.expect("(");var c=this.parseExpression();this.expect(")");var h=this.context.inSwitch;this.context.inSwitch=!0;var g=[],x=!1;for(this.expect("{");!this.match("}");){var v=this.parseSwitchCase();v.test===null&&(x&&this.throwError(o.Messages.MultipleDefaultsInSwitch),x=!0),g.push(v)}return this.expect("}"),this.context.inSwitch=h,this.finalize(a,new s.SwitchStatement(c,g))},d.prototype.parseLabelledStatement=function(){var a=this.createNode(),c=this.parseExpression(),h;if(c.type===l.Syntax.Identifier&&this.match(":")){this.nextToken();var g=c,x="$"+g.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,x)&&this.throwError(o.Messages.Redeclaration,"Label",g.name),this.context.labelSet[x]=!0;var v=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),v=this.parseClassDeclaration();else if(this.matchKeyword("function")){var E=this.lookahead,C=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(E,o.Messages.StrictFunction):C.generator&&this.tolerateUnexpectedToken(E,o.Messages.GeneratorInLegacyContext),v=C}else v=this.parseStatement();delete this.context.labelSet[x],h=new s.LabeledStatement(g,v)}else this.consumeSemicolon(),h=new s.ExpressionStatement(c);return this.finalize(a,h)},d.prototype.parseThrowStatement=function(){var a=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(o.Messages.NewlineAfterThrow);var c=this.parseExpression();return this.consumeSemicolon(),this.finalize(a,new s.ThrowStatement(c))},d.prototype.parseCatchClause=function(){var a=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var c=[],h=this.parsePattern(c),g={},x=0;x<c.length;x++){var v="$"+c[x].value;Object.prototype.hasOwnProperty.call(g,v)&&this.tolerateError(o.Messages.DuplicateBinding,c[x].value),g[v]=!0}this.context.strict&&h.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(h.name)&&this.tolerateError(o.Messages.StrictCatchVariable),this.expect(")");var E=this.parseBlock();return this.finalize(a,new s.CatchClause(h,E))},d.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},d.prototype.parseTryStatement=function(){var a=this.createNode();this.expectKeyword("try");var c=this.parseBlock(),h=this.matchKeyword("catch")?this.parseCatchClause():null,g=this.matchKeyword("finally")?this.parseFinallyClause():null;return!h&&!g&&this.throwError(o.Messages.NoCatchOrFinally),this.finalize(a,new s.TryStatement(c,h,g))},d.prototype.parseDebuggerStatement=function(){var a=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(a,new s.DebuggerStatement)},d.prototype.parseStatement=function(){var a;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:a=this.parseExpressionStatement();break;case 7:var c=this.lookahead.value;c==="{"?a=this.parseBlock():c==="("?a=this.parseExpressionStatement():c===";"?a=this.parseEmptyStatement():a=this.parseExpressionStatement();break;case 3:a=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":a=this.parseBreakStatement();break;case"continue":a=this.parseContinueStatement();break;case"debugger":a=this.parseDebuggerStatement();break;case"do":a=this.parseDoWhileStatement();break;case"for":a=this.parseForStatement();break;case"function":a=this.parseFunctionDeclaration();break;case"if":a=this.parseIfStatement();break;case"return":a=this.parseReturnStatement();break;case"switch":a=this.parseSwitchStatement();break;case"throw":a=this.parseThrowStatement();break;case"try":a=this.parseTryStatement();break;case"var":a=this.parseVariableStatement();break;case"while":a=this.parseWhileStatement();break;case"with":a=this.parseWithStatement();break;default:a=this.parseExpressionStatement();break}break;default:a=this.throwUnexpectedToken(this.lookahead)}return a},d.prototype.parseFunctionSourceElements=function(){var a=this.createNode();this.expect("{");var c=this.parseDirectivePrologues(),h=this.context.labelSet,g=this.context.inIteration,x=this.context.inSwitch,v=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;this.lookahead.type!==2&&!this.match("}");)c.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=h,this.context.inIteration=g,this.context.inSwitch=x,this.context.inFunctionBody=v,this.finalize(a,new s.BlockStatement(c))},d.prototype.validateParam=function(a,c,h){var g="$"+h;this.context.strict?(this.scanner.isRestrictedWord(h)&&(a.stricted=c,a.message=o.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(a.paramSet,g)&&(a.stricted=c,a.message=o.Messages.StrictParamDupe)):a.firstRestricted||(this.scanner.isRestrictedWord(h)?(a.firstRestricted=c,a.message=o.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(h)?(a.firstRestricted=c,a.message=o.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(a.paramSet,g)&&(a.stricted=c,a.message=o.Messages.StrictParamDupe)),typeof Object.defineProperty=="function"?Object.defineProperty(a.paramSet,g,{value:!0,enumerable:!0,writable:!0,configurable:!0}):a.paramSet[g]=!0},d.prototype.parseRestElement=function(a){var c=this.createNode();this.expect("...");var h=this.parsePattern(a);return this.match("=")&&this.throwError(o.Messages.DefaultRestParameter),this.match(")")||this.throwError(o.Messages.ParameterAfterRestParameter),this.finalize(c,new s.RestElement(h))},d.prototype.parseFormalParameter=function(a){for(var c=[],h=this.match("...")?this.parseRestElement(c):this.parsePatternWithDefault(c),g=0;g<c.length;g++)this.validateParam(a,c[g],c[g].value);a.simple=a.simple&&h instanceof s.Identifier,a.params.push(h)},d.prototype.parseFormalParameters=function(a){var c;if(c={simple:!0,params:[],firstRestricted:a},this.expect("("),!this.match(")"))for(c.paramSet={};this.lookahead.type!==2&&(this.parseFormalParameter(c),!(this.match(")")||(this.expect(","),this.match(")")))););return this.expect(")"),{simple:c.simple,params:c.params,stricted:c.stricted,firstRestricted:c.firstRestricted,message:c.message}},d.prototype.matchAsyncFunction=function(){var a=this.matchContextualKeyword("async");if(a){var c=this.scanner.saveState();this.scanner.scanComments();var h=this.scanner.lex();this.scanner.restoreState(c),a=c.lineNumber===h.lineNumber&&h.type===4&&h.value==="function"}return a},d.prototype.parseFunctionDeclaration=function(a){var c=this.createNode(),h=this.matchContextualKeyword("async");h&&this.nextToken(),this.expectKeyword("function");var g=h?!1:this.match("*");g&&this.nextToken();var x,v=null,E=null;if(!a||!this.match("(")){var C=this.lookahead;v=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(C.value)&&this.tolerateUnexpectedToken(C,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(C.value)?(E=C,x=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(C.value)&&(E=C,x=o.Messages.StrictReservedWord)}var A=this.context.await,O=this.context.allowYield;this.context.await=h,this.context.allowYield=!g;var P=this.parseFormalParameters(E),L=P.params,j=P.stricted;E=P.firstRestricted,P.message&&(x=P.message);var J=this.context.strict,X=this.context.allowStrictDirective;this.context.allowStrictDirective=P.simple;var ve=this.parseFunctionSourceElements();return this.context.strict&&E&&this.throwUnexpectedToken(E,x),this.context.strict&&j&&this.tolerateUnexpectedToken(j,x),this.context.strict=J,this.context.allowStrictDirective=X,this.context.await=A,this.context.allowYield=O,h?this.finalize(c,new s.AsyncFunctionDeclaration(v,L,ve)):this.finalize(c,new s.FunctionDeclaration(v,L,ve,g))},d.prototype.parseFunctionExpression=function(){var a=this.createNode(),c=this.matchContextualKeyword("async");c&&this.nextToken(),this.expectKeyword("function");var h=c?!1:this.match("*");h&&this.nextToken();var g,x=null,v,E=this.context.await,C=this.context.allowYield;if(this.context.await=c,this.context.allowYield=!h,!this.match("(")){var A=this.lookahead;x=!this.context.strict&&!h&&this.matchKeyword("yield")?this.parseIdentifierName():this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(A.value)&&this.tolerateUnexpectedToken(A,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(A.value)?(v=A,g=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(A.value)&&(v=A,g=o.Messages.StrictReservedWord)}var O=this.parseFormalParameters(v),P=O.params,L=O.stricted;v=O.firstRestricted,O.message&&(g=O.message);var j=this.context.strict,J=this.context.allowStrictDirective;this.context.allowStrictDirective=O.simple;var X=this.parseFunctionSourceElements();return this.context.strict&&v&&this.throwUnexpectedToken(v,g),this.context.strict&&L&&this.tolerateUnexpectedToken(L,g),this.context.strict=j,this.context.allowStrictDirective=J,this.context.await=E,this.context.allowYield=C,c?this.finalize(a,new s.AsyncFunctionExpression(x,P,X)):this.finalize(a,new s.FunctionExpression(x,P,X,h))},d.prototype.parseDirective=function(){var a=this.lookahead,c=this.createNode(),h=this.parseExpression(),g=h.type===l.Syntax.Literal?this.getTokenRaw(a).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(c,g?new s.Directive(h,g):new s.ExpressionStatement(h))},d.prototype.parseDirectivePrologues=function(){for(var a=null,c=[];;){var h=this.lookahead;if(h.type!==8)break;var g=this.parseDirective();c.push(g);var x=g.directive;if(typeof x!="string")break;x==="use strict"?(this.context.strict=!0,a&&this.tolerateUnexpectedToken(a,o.Messages.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(h,o.Messages.IllegalLanguageModeDirective)):!a&&h.octal&&(a=h)}return c},d.prototype.qualifiedPropertyName=function(a){switch(a.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return a.value==="[";default:break}return!1},d.prototype.parseGetterMethod=function(){var a=this.createNode(),c=!1,h=this.context.allowYield;this.context.allowYield=!c;var g=this.parseFormalParameters();g.params.length>0&&this.tolerateError(o.Messages.BadGetterArity);var x=this.parsePropertyMethod(g);return this.context.allowYield=h,this.finalize(a,new s.FunctionExpression(null,g.params,x,c))},d.prototype.parseSetterMethod=function(){var a=this.createNode(),c=!1,h=this.context.allowYield;this.context.allowYield=!c;var g=this.parseFormalParameters();g.params.length!==1?this.tolerateError(o.Messages.BadSetterArity):g.params[0]instanceof s.RestElement&&this.tolerateError(o.Messages.BadSetterRestParameter);var x=this.parsePropertyMethod(g);return this.context.allowYield=h,this.finalize(a,new s.FunctionExpression(null,g.params,x,c))},d.prototype.parseGeneratorMethod=function(){var a=this.createNode(),c=!0,h=this.context.allowYield;this.context.allowYield=!0;var g=this.parseFormalParameters();this.context.allowYield=!1;var x=this.parsePropertyMethod(g);return this.context.allowYield=h,this.finalize(a,new s.FunctionExpression(null,g.params,x,c))},d.prototype.isStartOfExpression=function(){var a=!0,c=this.lookahead.value;switch(this.lookahead.type){case 7:a=c==="["||c==="("||c==="{"||c==="+"||c==="-"||c==="!"||c==="~"||c==="++"||c==="--"||c==="/"||c==="/=";break;case 4:a=c==="class"||c==="delete"||c==="function"||c==="let"||c==="new"||c==="super"||c==="this"||c==="typeof"||c==="void"||c==="yield";break;default:break}return a},d.prototype.parseYieldExpression=function(){var a=this.createNode();this.expectKeyword("yield");var c=null,h=!1;if(!this.hasLineTerminator){var g=this.context.allowYield;this.context.allowYield=!1,h=this.match("*"),h?(this.nextToken(),c=this.parseAssignmentExpression()):this.isStartOfExpression()&&(c=this.parseAssignmentExpression()),this.context.allowYield=g}return this.finalize(a,new s.YieldExpression(c,h))},d.prototype.parseClassElement=function(a){var c=this.lookahead,h=this.createNode(),g="",x=null,v=null,E=!1,C=!1,A=!1,O=!1;if(this.match("*"))this.nextToken();else{E=this.match("["),x=this.parseObjectPropertyKey();var P=x;if(P.name==="static"&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(c=this.lookahead,A=!0,E=this.match("["),this.match("*")?this.nextToken():x=this.parseObjectPropertyKey()),c.type===3&&!this.hasLineTerminator&&c.value==="async"){var L=this.lookahead.value;L!==":"&&L!=="("&&L!=="*"&&(O=!0,c=this.lookahead,x=this.parseObjectPropertyKey(),c.type===3&&c.value==="constructor"&&this.tolerateUnexpectedToken(c,o.Messages.ConstructorIsAsync))}}var j=this.qualifiedPropertyName(this.lookahead);return c.type===3?c.value==="get"&&j?(g="get",E=this.match("["),x=this.parseObjectPropertyKey(),this.context.allowYield=!1,v=this.parseGetterMethod()):c.value==="set"&&j&&(g="set",E=this.match("["),x=this.parseObjectPropertyKey(),v=this.parseSetterMethod()):c.type===7&&c.value==="*"&&j&&(g="init",E=this.match("["),x=this.parseObjectPropertyKey(),v=this.parseGeneratorMethod(),C=!0),!g&&x&&this.match("(")&&(g="init",v=O?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),C=!0),g||this.throwUnexpectedToken(this.lookahead),g==="init"&&(g="method"),E||(A&&this.isPropertyKey(x,"prototype")&&this.throwUnexpectedToken(c,o.Messages.StaticPrototype),!A&&this.isPropertyKey(x,"constructor")&&((g!=="method"||!C||v&&v.generator)&&this.throwUnexpectedToken(c,o.Messages.ConstructorSpecialMethod),a.value?this.throwUnexpectedToken(c,o.Messages.DuplicateConstructor):a.value=!0,g="constructor")),this.finalize(h,new s.MethodDefinition(x,E,v,g,A))},d.prototype.parseClassElementList=function(){var a=[],c={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():a.push(this.parseClassElement(c));return this.expect("}"),a},d.prototype.parseClassBody=function(){var a=this.createNode(),c=this.parseClassElementList();return this.finalize(a,new s.ClassBody(c))},d.prototype.parseClassDeclaration=function(a){var c=this.createNode(),h=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var g=a&&this.lookahead.type!==3?null:this.parseVariableIdentifier(),x=null;this.matchKeyword("extends")&&(this.nextToken(),x=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var v=this.parseClassBody();return this.context.strict=h,this.finalize(c,new s.ClassDeclaration(g,x,v))},d.prototype.parseClassExpression=function(){var a=this.createNode(),c=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var h=this.lookahead.type===3?this.parseVariableIdentifier():null,g=null;this.matchKeyword("extends")&&(this.nextToken(),g=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var x=this.parseClassBody();return this.context.strict=c,this.finalize(a,new s.ClassExpression(h,g,x))},d.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var a=this.createNode(),c=this.parseDirectivePrologues();this.lookahead.type!==2;)c.push(this.parseStatementListItem());return this.finalize(a,new s.Module(c))},d.prototype.parseScript=function(){for(var a=this.createNode(),c=this.parseDirectivePrologues();this.lookahead.type!==2;)c.push(this.parseStatementListItem());return this.finalize(a,new s.Script(c))},d.prototype.parseModuleSpecifier=function(){var a=this.createNode();this.lookahead.type!==8&&this.throwError(o.Messages.InvalidModuleSpecifier);var c=this.nextToken(),h=this.getTokenRaw(c);return this.finalize(a,new s.Literal(c.value,h))},d.prototype.parseImportSpecifier=function(){var a=this.createNode(),c,h;return this.lookahead.type===3?(c=this.parseVariableIdentifier(),h=c,this.matchContextualKeyword("as")&&(this.nextToken(),h=this.parseVariableIdentifier())):(c=this.parseIdentifierName(),h=c,this.matchContextualKeyword("as")?(this.nextToken(),h=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(a,new s.ImportSpecifier(h,c))},d.prototype.parseNamedImports=function(){this.expect("{");for(var a=[];!this.match("}");)a.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),a},d.prototype.parseImportDefaultSpecifier=function(){var a=this.createNode(),c=this.parseIdentifierName();return this.finalize(a,new s.ImportDefaultSpecifier(c))},d.prototype.parseImportNamespaceSpecifier=function(){var a=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(o.Messages.NoAsAfterImportNamespace),this.nextToken();var c=this.parseIdentifierName();return this.finalize(a,new s.ImportNamespaceSpecifier(c))},d.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalImportDeclaration);var a=this.createNode();this.expectKeyword("import");var c,h=[];if(this.lookahead.type===8)c=this.parseModuleSpecifier();else{if(this.match("{")?h=h.concat(this.parseNamedImports()):this.match("*")?h.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(h.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?h.push(this.parseImportNamespaceSpecifier()):this.match("{")?h=h.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var g=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(g,this.lookahead.value)}this.nextToken(),c=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(a,new s.ImportDeclaration(h,c))},d.prototype.parseExportSpecifier=function(){var a=this.createNode(),c=this.parseIdentifierName(),h=c;return this.matchContextualKeyword("as")&&(this.nextToken(),h=this.parseIdentifierName()),this.finalize(a,new s.ExportSpecifier(c,h))},d.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalExportDeclaration);var a=this.createNode();this.expectKeyword("export");var c;if(this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var h=this.parseFunctionDeclaration(!0);c=this.finalize(a,new s.ExportDefaultDeclaration(h))}else if(this.matchKeyword("class")){var h=this.parseClassDeclaration(!0);c=this.finalize(a,new s.ExportDefaultDeclaration(h))}else if(this.matchContextualKeyword("async")){var h=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression();c=this.finalize(a,new s.ExportDefaultDeclaration(h))}else{this.matchContextualKeyword("from")&&this.throwError(o.Messages.UnexpectedToken,this.lookahead.value);var h=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),c=this.finalize(a,new s.ExportDefaultDeclaration(h))}else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var g=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(g,this.lookahead.value)}this.nextToken();var x=this.parseModuleSpecifier();this.consumeSemicolon(),c=this.finalize(a,new s.ExportAllDeclaration(x))}else if(this.lookahead.type===4){var h=void 0;switch(this.lookahead.value){case"let":case"const":h=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":h=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}c=this.finalize(a,new s.ExportNamedDeclaration(h,[],null))}else if(this.matchAsyncFunction()){var h=this.parseFunctionDeclaration();c=this.finalize(a,new s.ExportNamedDeclaration(h,[],null))}else{var v=[],E=null,C=!1;for(this.expect("{");!this.match("}");)C=C||this.matchKeyword("default"),v.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.nextToken(),E=this.parseModuleSpecifier(),this.consumeSemicolon();else if(C){var g=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(g,this.lookahead.value)}else this.consumeSemicolon();c=this.finalize(a,new s.ExportNamedDeclaration(null,v,E))}return c},d})();t.Parser=f},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(i,n){if(!i)throw new Error("ASSERT: "+n)}t.assert=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(function(){function i(){this.errors=[],this.tolerant=!1}return i.prototype.recordError=function(n){this.errors.push(n)},i.prototype.tolerate=function(n){if(this.tolerant)this.recordError(n);else throw n},i.prototype.constructError=function(n,o){var s=new Error(n);try{throw s}catch(u){Object.create&&Object.defineProperty&&(s=Object.create(u),Object.defineProperty(s,"column",{value:o}))}return s},i.prototype.createError=function(n,o,s,u){var l="Line "+o+": "+u,m=this.constructError(l,s);return m.index=n,m.lineNumber=o,m.description=u,m},i.prototype.throwError=function(n,o,s,u){throw this.createError(n,o,s,u)},i.prototype.tolerateError=function(n,o,s,u){var l=this.createError(n,o,s,u);if(this.tolerant)this.recordError(l);else throw l},i})();t.ErrorHandler=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(9),n=r(4),o=r(11);function s(m){return"0123456789abcdef".indexOf(m.toLowerCase())}function u(m){return"01234567".indexOf(m)}var l=(function(){function m(p,f){this.source=p,this.errorHandler=f,this.trackComment=!1,this.isModule=!1,this.length=p.length,this.index=0,this.lineNumber=p.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return m.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},m.prototype.restoreState=function(p){this.index=p.index,this.lineNumber=p.lineNumber,this.lineStart=p.lineStart},m.prototype.eof=function(){return this.index>=this.length},m.prototype.throwUnexpectedToken=function(p){return p===void 0&&(p=o.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,p)},m.prototype.tolerateUnexpectedToken=function(p){p===void 0&&(p=o.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,p)},m.prototype.skipSingleLineComment=function(p){var f=[],d,a;for(this.trackComment&&(f=[],d=this.index-p,a={start:{line:this.lineNumber,column:this.index-this.lineStart-p},end:{}});!this.eof();){var c=this.source.charCodeAt(this.index);if(++this.index,n.Character.isLineTerminator(c)){if(this.trackComment){a.end={line:this.lineNumber,column:this.index-this.lineStart-1};var h={multiLine:!1,slice:[d+p,this.index-1],range:[d,this.index-1],loc:a};f.push(h)}return c===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,f}}if(this.trackComment){a.end={line:this.lineNumber,column:this.index-this.lineStart};var h={multiLine:!1,slice:[d+p,this.index],range:[d,this.index],loc:a};f.push(h)}return f},m.prototype.skipMultiLineComment=function(){var p=[],f,d;for(this.trackComment&&(p=[],f=this.index-2,d={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var a=this.source.charCodeAt(this.index);if(n.Character.isLineTerminator(a))a===13&&this.source.charCodeAt(this.index+1)===10&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(a===42){if(this.source.charCodeAt(this.index+1)===47){if(this.index+=2,this.trackComment){d.end={line:this.lineNumber,column:this.index-this.lineStart};var c={multiLine:!0,slice:[f+2,this.index-2],range:[f,this.index],loc:d};p.push(c)}return p}++this.index}else++this.index}if(this.trackComment){d.end={line:this.lineNumber,column:this.index-this.lineStart};var c={multiLine:!0,slice:[f+2,this.index],range:[f,this.index],loc:d};p.push(c)}return this.tolerateUnexpectedToken(),p},m.prototype.scanComments=function(){var p;this.trackComment&&(p=[]);for(var f=this.index===0;!this.eof();){var d=this.source.charCodeAt(this.index);if(n.Character.isWhiteSpace(d))++this.index;else if(n.Character.isLineTerminator(d))++this.index,d===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,f=!0;else if(d===47)if(d=this.source.charCodeAt(this.index+1),d===47){this.index+=2;var a=this.skipSingleLineComment(2);this.trackComment&&(p=p.concat(a)),f=!0}else if(d===42){this.index+=2;var a=this.skipMultiLineComment();this.trackComment&&(p=p.concat(a))}else break;else if(f&&d===45)if(this.source.charCodeAt(this.index+1)===45&&this.source.charCodeAt(this.index+2)===62){this.index+=3;var a=this.skipSingleLineComment(3);this.trackComment&&(p=p.concat(a))}else break;else if(d===60&&!this.isModule)if(this.source.slice(this.index+1,this.index+4)==="!--"){this.index+=4;var a=this.skipSingleLineComment(4);this.trackComment&&(p=p.concat(a))}else break;else break}return p},m.prototype.isFutureReservedWord=function(p){switch(p){case"enum":case"export":case"import":case"super":return!0;default:return!1}},m.prototype.isStrictModeReservedWord=function(p){switch(p){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},m.prototype.isRestrictedWord=function(p){return p==="eval"||p==="arguments"},m.prototype.isKeyword=function(p){switch(p.length){case 2:return p==="if"||p==="in"||p==="do";case 3:return p==="var"||p==="for"||p==="new"||p==="try"||p==="let";case 4:return p==="this"||p==="else"||p==="case"||p==="void"||p==="with"||p==="enum";case 5:return p==="while"||p==="break"||p==="catch"||p==="throw"||p==="const"||p==="yield"||p==="class"||p==="super";case 6:return p==="return"||p==="typeof"||p==="delete"||p==="switch"||p==="export"||p==="import";case 7:return p==="default"||p==="finally"||p==="extends";case 8:return p==="function"||p==="continue"||p==="debugger";case 10:return p==="instanceof";default:return!1}},m.prototype.codePointAt=function(p){var f=this.source.charCodeAt(p);if(f>=55296&&f<=56319){var d=this.source.charCodeAt(p+1);if(d>=56320&&d<=57343){var a=f;f=(a-55296)*1024+d-56320+65536}}return f},m.prototype.scanHexEscape=function(p){for(var f=p==="u"?4:2,d=0,a=0;a<f;++a)if(!this.eof()&&n.Character.isHexDigit(this.source.charCodeAt(this.index)))d=d*16+s(this.source[this.index++]);else return null;return String.fromCharCode(d)},m.prototype.scanUnicodeCodePointEscape=function(){var p=this.source[this.index],f=0;for(p==="}"&&this.throwUnexpectedToken();!this.eof()&&(p=this.source[this.index++],!!n.Character.isHexDigit(p.charCodeAt(0)));)f=f*16+s(p);return(f>1114111||p!=="}")&&this.throwUnexpectedToken(),n.Character.fromCodePoint(f)},m.prototype.getIdentifier=function(){for(var p=this.index++;!this.eof();){var f=this.source.charCodeAt(this.index);if(f===92)return this.index=p,this.getComplexIdentifier();if(f>=55296&&f<57343)return this.index=p,this.getComplexIdentifier();if(n.Character.isIdentifierPart(f))++this.index;else break}return this.source.slice(p,this.index)},m.prototype.getComplexIdentifier=function(){var p=this.codePointAt(this.index),f=n.Character.fromCodePoint(p);this.index+=f.length;var d;for(p===92&&(this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,d=this.scanUnicodeCodePointEscape()):(d=this.scanHexEscape("u"),(d===null||d==="\\"||!n.Character.isIdentifierStart(d.charCodeAt(0)))&&this.throwUnexpectedToken()),f=d);!this.eof()&&(p=this.codePointAt(this.index),!!n.Character.isIdentifierPart(p));)d=n.Character.fromCodePoint(p),f+=d,this.index+=d.length,p===92&&(f=f.substr(0,f.length-1),this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,d=this.scanUnicodeCodePointEscape()):(d=this.scanHexEscape("u"),(d===null||d==="\\"||!n.Character.isIdentifierPart(d.charCodeAt(0)))&&this.throwUnexpectedToken()),f+=d);return f},m.prototype.octalToDecimal=function(p){var f=p!=="0",d=u(p);return!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(f=!0,d=d*8+u(this.source[this.index++]),"0123".indexOf(p)>=0&&!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(d=d*8+u(this.source[this.index++]))),{code:d,octal:f}},m.prototype.scanIdentifier=function(){var p,f=this.index,d=this.source.charCodeAt(f)===92?this.getComplexIdentifier():this.getIdentifier();if(d.length===1?p=3:this.isKeyword(d)?p=4:d==="null"?p=5:d==="true"||d==="false"?p=1:p=3,p!==3&&f+d.length!==this.index){var a=this.index;this.index=f,this.tolerateUnexpectedToken(o.Messages.InvalidEscapedReservedWord),this.index=a}return{type:p,value:d,lineNumber:this.lineNumber,lineStart:this.lineStart,start:f,end:this.index}},m.prototype.scanPunctuator=function(){var p=this.index,f=this.source[this.index];switch(f){case"(":case"{":f==="{"&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,this.source[this.index]==="."&&this.source[this.index+1]==="."&&(this.index+=2,f="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:f=this.source.substr(this.index,4),f===">>>="?this.index+=4:(f=f.substr(0,3),f==="==="||f==="!=="||f===">>>"||f==="<<="||f===">>="||f==="**="?this.index+=3:(f=f.substr(0,2),f==="&&"||f==="||"||f==="=="||f==="!="||f==="+="||f==="-="||f==="*="||f==="/="||f==="++"||f==="--"||f==="<<"||f===">>"||f==="&="||f==="|="||f==="^="||f==="%="||f==="<="||f===">="||f==="=>"||f==="**"?this.index+=2:(f=this.source[this.index],"<>=!+-*%&|^/".indexOf(f)>=0&&++this.index)))}return this.index===p&&this.throwUnexpectedToken(),{type:7,value:f,lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},m.prototype.scanHexLiteral=function(p){for(var f="";!this.eof()&&n.Character.isHexDigit(this.source.charCodeAt(this.index));)f+=this.source[this.index++];return f.length===0&&this.throwUnexpectedToken(),n.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+f,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},m.prototype.scanBinaryLiteral=function(p){for(var f="",d;!this.eof()&&(d=this.source[this.index],!(d!=="0"&&d!=="1"));)f+=this.source[this.index++];return f.length===0&&this.throwUnexpectedToken(),this.eof()||(d=this.source.charCodeAt(this.index),(n.Character.isIdentifierStart(d)||n.Character.isDecimalDigit(d))&&this.throwUnexpectedToken()),{type:6,value:parseInt(f,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},m.prototype.scanOctalLiteral=function(p,f){var d="",a=!1;for(n.Character.isOctalDigit(p.charCodeAt(0))?(a=!0,d="0"+this.source[this.index++]):++this.index;!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index));)d+=this.source[this.index++];return!a&&d.length===0&&this.throwUnexpectedToken(),(n.Character.isIdentifierStart(this.source.charCodeAt(this.index))||n.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(d,8),octal:a,lineNumber:this.lineNumber,lineStart:this.lineStart,start:f,end:this.index}},m.prototype.isImplicitOctalLiteral=function(){for(var p=this.index+1;p<this.length;++p){var f=this.source[p];if(f==="8"||f==="9")return!1;if(!n.Character.isOctalDigit(f.charCodeAt(0)))return!0}return!0},m.prototype.scanNumericLiteral=function(){var p=this.index,f=this.source[p];i.assert(n.Character.isDecimalDigit(f.charCodeAt(0))||f===".","Numeric literal must start with a decimal digit or a decimal point");var d="";if(f!=="."){if(d=this.source[this.index++],f=this.source[this.index],d==="0"){if(f==="x"||f==="X")return++this.index,this.scanHexLiteral(p);if(f==="b"||f==="B")return++this.index,this.scanBinaryLiteral(p);if(f==="o"||f==="O")return this.scanOctalLiteral(f,p);if(f&&n.Character.isOctalDigit(f.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(f,p)}for(;n.Character.isDecimalDigit(this.source.charCodeAt(this.index));)d+=this.source[this.index++];f=this.source[this.index]}if(f==="."){for(d+=this.source[this.index++];n.Character.isDecimalDigit(this.source.charCodeAt(this.index));)d+=this.source[this.index++];f=this.source[this.index]}if(f==="e"||f==="E")if(d+=this.source[this.index++],f=this.source[this.index],(f==="+"||f==="-")&&(d+=this.source[this.index++]),n.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;n.Character.isDecimalDigit(this.source.charCodeAt(this.index));)d+=this.source[this.index++];else this.throwUnexpectedToken();return n.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(d),lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},m.prototype.scanStringLiteral=function(){var p=this.index,f=this.source[p];i.assert(f==="'"||f==='"',"String literal must starts with a quote"),++this.index;for(var d=!1,a="";!this.eof();){var c=this.source[this.index++];if(c===f){f="";break}else if(c==="\\")if(c=this.source[this.index++],!c||!n.Character.isLineTerminator(c.charCodeAt(0)))switch(c){case"u":if(this.source[this.index]==="{")++this.index,a+=this.scanUnicodeCodePointEscape();else{var h=this.scanHexEscape(c);h===null&&this.throwUnexpectedToken(),a+=h}break;case"x":var g=this.scanHexEscape(c);g===null&&this.throwUnexpectedToken(o.Messages.InvalidHexEscapeSequence),a+=g;break;case"n":a+=`
|
|
132
|
+
`)[m]||"";let c=(0,Er.default)(a),h=a.length-c,g=a.padEnd(d+h);(g.length-h>d||c===d)&&(g=(0,r1.default)(g,0,d-2)+"\u2026 ",g+=" ".repeat(d-(0,Er.default)(g))),p+=g}r.printLine(p)}}}outputYAML(){this.options.printLine((0,ZS.safeDump)(this.resolveColumnsToObjectArray()))}resolveColumnsToObjectArray(){let{columns:t,data:r}=this;return r.map(i=>Object.fromEntries(t.map(n=>[n.key,i[n.key]??""])))}};function Cu(e,t,r={}){new bu(e,t,r).display()}qe.table=Cu;(function(e){e.Flags={columns:Gt.string({description:"only show provided columns (comma-separated)",exclusive:["extended"]}),csv:Gt.boolean({description:"output is csv format [alias: --output=csv]",exclusive:["no-truncate"]}),extended:Gt.boolean({char:"x",description:"show extra columns",exclusive:["columns"]}),filter:Gt.string({description:"filter property by partial string matching, ex: name=foo"}),"no-header":Gt.boolean({description:"hide table header from output",exclusive:["csv"]}),"no-truncate":Gt.boolean({description:"do not truncate output to fit screen",exclusive:["csv"]}),output:Gt.string({description:"output in a more machine friendly format",exclusive:["no-truncate","csv"],options:["csv","json","yaml"]}),sort:Gt.string({description:"property to sort by (prepend '-' for descending)"})};function t(r){if(r){let i={},n=(r.only&&typeof r.only=="string"?[r.only]:r.only)||Object.keys(e.Flags),o=(r.except&&typeof r.except=="string"?[r.except]:r.except)||[];for(let s of n)o.includes(s)||(i[s]=e.Flags[s]);return i}return e.Flags}e.flags=t})(Cu||(qe.table=Cu={}));var s1=(e,t)=>e.reduce((r,i)=>{let n=i[t],o=n.split(`
|
|
133
|
+
`);return Math.max(r,o.length>1?Math.max(...o.map(s=>(0,Er.default)(s))):(0,Er.default)(n))},0)});var sg=w((KL,ng)=>{"use strict";y();var br=console.assert,o1=e=>{let t={joined:!0,spacerNoNeighbour:" ",spacerNeighbour:"\u2502 ",keyNoNeighbour:"\u2514\u2500 ",keyNeighbour:"\u251C\u2500 ",sortFn:null,...e};return br(Object.keys(t).length===6,"Unexpected Option(s) provided"),br(typeof t.joined=="boolean",'Option "joined" has invalid format'),br(typeof t.spacerNoNeighbour=="string",'Option "spacerNoNeighbour" has invalid format'),br(typeof t.spacerNeighbour=="string",'Option "spacerNeighbour" has invalid format'),br(typeof t.keyNoNeighbour=="string",'Option "keyNoNeighbour" has invalid format'),br(typeof t.keyNeighbour=="string",'Option "keyNeighbour" has invalid format'),br(typeof t.sortFn=="function"||t.sortFn===null,'Option "sortFn" has invalid format'),t};ng.exports=(e,t={})=>{let r=o1(t),i=[],n=l=>r.sortFn===null?l.reverse():l.sort((m,p)=>r.sortFn(p,m)),o=[],s=n(Object.keys(e)).map(l=>[l]),u=[e];for(;s.length!==0;){let l=s.pop(),m=u[l.length-1][l[l.length-1]];o[l.length-1]=s.length!==0&&s[s.length-1].length===l.length,i.push([o.slice(0,l.length-1).map(p=>p?r.spacerNeighbour:r.spacerNoNeighbour).join(""),o[l.length-1]?r.keyNeighbour:r.keyNoNeighbour,l[l.length-1],["boolean","string","number"].includes(typeof m)?`: ${m}`:""].join("")),m instanceof Object&&!Array.isArray(m)&&(s.push(...n(Object.keys(m)).map(p=>l.concat(p))),u[l.length]=m)}return r.joined===!0?i.join(`
|
|
134
|
+
`):i}});var og=w(Ki=>{"use strict";y();Object.defineProperty(Ki,"__esModule",{value:!0});Ki.Tree=void 0;var a1=sg(),Us=class e{nodes={};display(t=console.log){let r=function(n){let o={};for(let s of Object.keys(n))o[s]=r(n[s].nodes);return o},i=r(this.nodes);t(a1(i))}insert(t,r=new e){return this.nodes[t]=r,this}search(t){for(let r of Object.keys(this.nodes)){if(r===t)return this.nodes[r];let i=this.nodes[r].search(t);if(i)return i}}};Ki.Tree=Us;function u1(){return new Us}Ki.default=u1});var Au=w(xe=>{"use strict";y();var c1=xe&&xe.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),l1=xe&&xe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),h1=xe&&xe.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&c1(t,e,r);return l1(t,e),t},Du=xe&&xe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0});xe.tree=xe.Table=xe.progress=xe.styledObject=void 0;var f1=vp();Object.defineProperty(xe,"styledObject",{enumerable:!0,get:function(){return Du(f1).default}});var p1=Gp();Object.defineProperty(xe,"progress",{enumerable:!0,get:function(){return Du(p1).default}});xe.Table=h1(ig());var d1=og();Object.defineProperty(xe,"tree",{enumerable:!0,get:function(){return Du(d1).default}})});var ag=w(_u=>{"use strict";y();Object.defineProperty(_u,"__esModule",{value:!0});_u.default=(e=1e3)=>new Promise(t=>{setTimeout(t,e)})});var cg=w((sB,ug)=>{"use strict";y();ug.exports=(e,t,r)=>(r=r||{},["\x1B]","8",";",Object.keys(r).map(i=>i+"="+r[i]).join(":"),";",t,"\x07",e,"\x1B]","8",";",";","\x07"].join(""))});var lg=w((Qi,Su)=>{y();(function(t,r){typeof Qi=="object"&&typeof Su=="object"?Su.exports=r():typeof define=="function"&&define.amd?define([],r):typeof Qi=="object"?Qi.esprima=r():t.esprima=r()})(Qi,function(){return(function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={exports:{},id:i,loaded:!1};return e[i].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}return r.m=e,r.c=t,r.p="",r(0)})([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(1),n=r(3),o=r(8),s=r(15);function u(d,a,c){var h=null,g=function(L,j){c&&c(L,j),h&&h.visit(L,j)},x=typeof c=="function"?g:null,v=!1;if(a){v=typeof a.comment=="boolean"&&a.comment;var E=typeof a.attachComment=="boolean"&&a.attachComment;(v||E)&&(h=new i.CommentHandler,h.attach=E,a.comment=!0,x=g)}var D=!1;a&&typeof a.sourceType=="string"&&(D=a.sourceType==="module");var A;a&&typeof a.jsx=="boolean"&&a.jsx?A=new n.JSXParser(d,a,x):A=new o.Parser(d,a,x);var k=D?A.parseModule():A.parseScript(),I=k;return v&&h&&(I.comments=h.comments),A.config.tokens&&(I.tokens=A.tokens),A.config.tolerant&&(I.errors=A.errorHandler.errors),I}t.parse=u;function l(d,a,c){var h=a||{};return h.sourceType="module",u(d,h,c)}t.parseModule=l;function m(d,a,c){var h=a||{};return h.sourceType="script",u(d,h,c)}t.parseScript=m;function p(d,a,c){var h=new s.Tokenizer(d,a),g;g=[];try{for(;;){var x=h.getNextToken();if(!x)break;c&&(x=c(x)),g.push(x)}}catch(v){h.errorHandler.tolerate(v)}return h.errorHandler.tolerant&&(g.errors=h.errors()),g}t.tokenize=p;var f=r(2);t.Syntax=f.Syntax,t.version="4.0.1"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),n=(function(){function o(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return o.prototype.insertInnerComments=function(s,u){if(s.type===i.Syntax.BlockStatement&&s.body.length===0){for(var l=[],m=this.leading.length-1;m>=0;--m){var p=this.leading[m];u.end.offset>=p.start&&(l.unshift(p.comment),this.leading.splice(m,1),this.trailing.splice(m,1))}l.length&&(s.innerComments=l)}},o.prototype.findTrailingComments=function(s){var u=[];if(this.trailing.length>0){for(var l=this.trailing.length-1;l>=0;--l){var m=this.trailing[l];m.start>=s.end.offset&&u.unshift(m.comment)}return this.trailing.length=0,u}var p=this.stack[this.stack.length-1];if(p&&p.node.trailingComments){var f=p.node.trailingComments[0];f&&f.range[0]>=s.end.offset&&(u=p.node.trailingComments,delete p.node.trailingComments)}return u},o.prototype.findLeadingComments=function(s){for(var u=[],l;this.stack.length>0;){var m=this.stack[this.stack.length-1];if(m&&m.start>=s.start.offset)l=m.node,this.stack.pop();else break}if(l){for(var p=l.leadingComments?l.leadingComments.length:0,f=p-1;f>=0;--f){var d=l.leadingComments[f];d.range[1]<=s.start.offset&&(u.unshift(d),l.leadingComments.splice(f,1))}return l.leadingComments&&l.leadingComments.length===0&&delete l.leadingComments,u}for(var f=this.leading.length-1;f>=0;--f){var m=this.leading[f];m.start<=s.start.offset&&(u.unshift(m.comment),this.leading.splice(f,1))}return u},o.prototype.visitNode=function(s,u){if(!(s.type===i.Syntax.Program&&s.body.length>0)){this.insertInnerComments(s,u);var l=this.findTrailingComments(u),m=this.findLeadingComments(u);m.length>0&&(s.leadingComments=m),l.length>0&&(s.trailingComments=l),this.stack.push({node:s,start:u.start.offset})}},o.prototype.visitComment=function(s,u){var l=s.type[0]==="L"?"Line":"Block",m={type:l,value:s.value};if(s.range&&(m.range=s.range),s.loc&&(m.loc=s.loc),this.comments.push(m),this.attach){var p={comment:{type:l,value:s.value,range:[u.start.offset,u.end.offset]},start:u.start.offset};s.loc&&(p.comment.loc=s.loc),s.type=l,this.leading.push(p),this.trailing.push(p)}},o.prototype.visit=function(s,u){s.type==="LineComment"?this.visitComment(s,u):s.type==="BlockComment"?this.visitComment(s,u):this.attach&&this.visitNode(s,u)},o})();t.CommentHandler=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,r){"use strict";var i=this&&this.__extends||(function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,h){c.__proto__=h}||function(c,h){for(var g in h)h.hasOwnProperty(g)&&(c[g]=h[g])};return function(c,h){a(c,h);function g(){this.constructor=c}c.prototype=h===null?Object.create(h):(g.prototype=h.prototype,new g)}})();Object.defineProperty(t,"__esModule",{value:!0});var n=r(4),o=r(5),s=r(6),u=r(7),l=r(8),m=r(13),p=r(14);m.TokenName[100]="JSXIdentifier",m.TokenName[101]="JSXText";function f(a){var c;switch(a.type){case s.JSXSyntax.JSXIdentifier:var h=a;c=h.name;break;case s.JSXSyntax.JSXNamespacedName:var g=a;c=f(g.namespace)+":"+f(g.name);break;case s.JSXSyntax.JSXMemberExpression:var x=a;c=f(x.object)+"."+f(x.property);break;default:break}return c}var d=(function(a){i(c,a);function c(h,g,x){return a.call(this,h,g,x)||this}return c.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():a.prototype.parsePrimaryExpression.call(this)},c.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},c.prototype.finishJSX=function(){this.nextToken()},c.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},c.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},c.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},c.prototype.scanXHTMLEntity=function(h){for(var g="&",x=!0,v=!1,E=!1,D=!1;!this.scanner.eof()&&x&&!v;){var A=this.scanner.source[this.scanner.index];if(A===h)break;if(v=A===";",g+=A,++this.scanner.index,!v)switch(g.length){case 2:E=A==="#";break;case 3:E&&(D=A==="x",x=D||n.Character.isDecimalDigit(A.charCodeAt(0)),E=E&&!D);break;default:x=x&&!(E&&!n.Character.isDecimalDigit(A.charCodeAt(0))),x=x&&!(D&&!n.Character.isHexDigit(A.charCodeAt(0)));break}}if(x&&v&&g.length>2){var k=g.substr(1,g.length-2);E&&k.length>1?g=String.fromCharCode(parseInt(k.substr(1),10)):D&&k.length>2?g=String.fromCharCode(parseInt("0"+k.substr(1),16)):!E&&!D&&p.XHTMLEntities[k]&&(g=p.XHTMLEntities[k])}return g},c.prototype.lexJSX=function(){var h=this.scanner.source.charCodeAt(this.scanner.index);if(h===60||h===62||h===47||h===58||h===61||h===123||h===125){var g=this.scanner.source[this.scanner.index++];return{type:7,value:g,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(h===34||h===39){for(var x=this.scanner.index,v=this.scanner.source[this.scanner.index++],E="";!this.scanner.eof();){var D=this.scanner.source[this.scanner.index++];if(D===v)break;D==="&"?E+=this.scanXHTMLEntity(v):E+=D}return{type:8,value:E,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:x,end:this.scanner.index}}if(h===46){var A=this.scanner.source.charCodeAt(this.scanner.index+1),k=this.scanner.source.charCodeAt(this.scanner.index+2),g=A===46&&k===46?"...":".",x=this.scanner.index;return this.scanner.index+=g.length,{type:7,value:g,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:x,end:this.scanner.index}}if(h===96)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(n.Character.isIdentifierStart(h)&&h!==92){var x=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var D=this.scanner.source.charCodeAt(this.scanner.index);if(n.Character.isIdentifierPart(D)&&D!==92)++this.scanner.index;else if(D===45)++this.scanner.index;else break}var I=this.scanner.source.slice(x,this.scanner.index);return{type:100,value:I,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:x,end:this.scanner.index}}return this.scanner.lex()},c.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var h=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(h)),h},c.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var h=this.scanner.index,g="";!this.scanner.eof();){var x=this.scanner.source[this.scanner.index];if(x==="{"||x==="<")break;++this.scanner.index,g+=x,n.Character.isLineTerminator(x.charCodeAt(0))&&(++this.scanner.lineNumber,x==="\r"&&this.scanner.source[this.scanner.index]===`
|
|
135
|
+
`&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var v={type:101,value:g,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:h,end:this.scanner.index};return g.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(v)),v},c.prototype.peekJSXToken=function(){var h=this.scanner.saveState();this.scanner.scanComments();var g=this.lexJSX();return this.scanner.restoreState(h),g},c.prototype.expectJSX=function(h){var g=this.nextJSXToken();(g.type!==7||g.value!==h)&&this.throwUnexpectedToken(g)},c.prototype.matchJSX=function(h){var g=this.peekJSXToken();return g.type===7&&g.value===h},c.prototype.parseJSXIdentifier=function(){var h=this.createJSXNode(),g=this.nextJSXToken();return g.type!==100&&this.throwUnexpectedToken(g),this.finalize(h,new o.JSXIdentifier(g.value))},c.prototype.parseJSXElementName=function(){var h=this.createJSXNode(),g=this.parseJSXIdentifier();if(this.matchJSX(":")){var x=g;this.expectJSX(":");var v=this.parseJSXIdentifier();g=this.finalize(h,new o.JSXNamespacedName(x,v))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var E=g;this.expectJSX(".");var D=this.parseJSXIdentifier();g=this.finalize(h,new o.JSXMemberExpression(E,D))}return g},c.prototype.parseJSXAttributeName=function(){var h=this.createJSXNode(),g,x=this.parseJSXIdentifier();if(this.matchJSX(":")){var v=x;this.expectJSX(":");var E=this.parseJSXIdentifier();g=this.finalize(h,new o.JSXNamespacedName(v,E))}else g=x;return g},c.prototype.parseJSXStringLiteralAttribute=function(){var h=this.createJSXNode(),g=this.nextJSXToken();g.type!==8&&this.throwUnexpectedToken(g);var x=this.getTokenRaw(g);return this.finalize(h,new u.Literal(g.value,x))},c.prototype.parseJSXExpressionAttribute=function(){var h=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var g=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(h,new o.JSXExpressionContainer(g))},c.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},c.prototype.parseJSXNameValueAttribute=function(){var h=this.createJSXNode(),g=this.parseJSXAttributeName(),x=null;return this.matchJSX("=")&&(this.expectJSX("="),x=this.parseJSXAttributeValue()),this.finalize(h,new o.JSXAttribute(g,x))},c.prototype.parseJSXSpreadAttribute=function(){var h=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var g=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(h,new o.JSXSpreadAttribute(g))},c.prototype.parseJSXAttributes=function(){for(var h=[];!this.matchJSX("/")&&!this.matchJSX(">");){var g=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();h.push(g)}return h},c.prototype.parseJSXOpeningElement=function(){var h=this.createJSXNode();this.expectJSX("<");var g=this.parseJSXElementName(),x=this.parseJSXAttributes(),v=this.matchJSX("/");return v&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(h,new o.JSXOpeningElement(g,v,x))},c.prototype.parseJSXBoundaryElement=function(){var h=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var g=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(h,new o.JSXClosingElement(g))}var x=this.parseJSXElementName(),v=this.parseJSXAttributes(),E=this.matchJSX("/");return E&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(h,new o.JSXOpeningElement(x,E,v))},c.prototype.parseJSXEmptyExpression=function(){var h=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(h,new o.JSXEmptyExpression)},c.prototype.parseJSXExpressionContainer=function(){var h=this.createJSXNode();this.expectJSX("{");var g;return this.matchJSX("}")?(g=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),g=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(h,new o.JSXExpressionContainer(g))},c.prototype.parseJSXChildren=function(){for(var h=[];!this.scanner.eof();){var g=this.createJSXChildNode(),x=this.nextJSXText();if(x.start<x.end){var v=this.getTokenRaw(x),E=this.finalize(g,new o.JSXText(x.value,v));h.push(E)}if(this.scanner.source[this.scanner.index]==="{"){var D=this.parseJSXExpressionContainer();h.push(D)}else break}return h},c.prototype.parseComplexJSXElement=function(h){for(var g=[];!this.scanner.eof();){h.children=h.children.concat(this.parseJSXChildren());var x=this.createJSXChildNode(),v=this.parseJSXBoundaryElement();if(v.type===s.JSXSyntax.JSXOpeningElement){var E=v;if(E.selfClosing){var D=this.finalize(x,new o.JSXElement(E,[],null));h.children.push(D)}else g.push(h),h={node:x,opening:E,closing:null,children:[]}}if(v.type===s.JSXSyntax.JSXClosingElement){h.closing=v;var A=f(h.opening.name),k=f(h.closing.name);if(A!==k&&this.tolerateError("Expected corresponding JSX closing tag for %0",A),g.length>0){var D=this.finalize(h.node,new o.JSXElement(h.opening,h.children,h.closing));h=g[g.length-1],h.children.push(D),g.pop()}else break}}return h},c.prototype.parseJSXElement=function(){var h=this.createJSXNode(),g=this.parseJSXOpeningElement(),x=[],v=null;if(!g.selfClosing){var E=this.parseComplexJSXElement({node:h,opening:g,closing:v,children:x});x=E.children,v=E.closing}return this.finalize(h,new o.JSXElement(g,x,v))},c.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var h=this.parseJSXElement();return this.finishJSX(),h},c.prototype.isStartOfExpression=function(){return a.prototype.isStartOfExpression.call(this)||this.match("<")},c})(l.Parser);t.JSXParser=d},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={NonAsciiIdentifierStart:/[\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\u0561-\u0587\u05D0-\u05EA\u05F0-\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\u08A0-\u08B4\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\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\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\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-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\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-\u2C2E\u2C30-\u2C5E\u2C60-\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-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\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-\uAB65\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]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\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\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\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\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(i){return i<65536?String.fromCharCode(i):String.fromCharCode(55296+(i-65536>>10))+String.fromCharCode(56320+(i-65536&1023))},isWhiteSpace:function(i){return i===32||i===9||i===11||i===12||i===160||i>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(i)>=0},isLineTerminator:function(i){return i===10||i===13||i===8232||i===8233},isIdentifierStart:function(i){return i===36||i===95||i>=65&&i<=90||i>=97&&i<=122||i===92||i>=128&&r.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(i))},isIdentifierPart:function(i){return i===36||i===95||i>=65&&i<=90||i>=97&&i<=122||i>=48&&i<=57||i===92||i>=128&&r.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(i))},isDecimalDigit:function(i){return i>=48&&i<=57},isHexDigit:function(i){return i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102},isOctalDigit:function(i){return i>=48&&i<=55}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(6),n=(function(){function h(g){this.type=i.JSXSyntax.JSXClosingElement,this.name=g}return h})();t.JSXClosingElement=n;var o=(function(){function h(g,x,v){this.type=i.JSXSyntax.JSXElement,this.openingElement=g,this.children=x,this.closingElement=v}return h})();t.JSXElement=o;var s=(function(){function h(){this.type=i.JSXSyntax.JSXEmptyExpression}return h})();t.JSXEmptyExpression=s;var u=(function(){function h(g){this.type=i.JSXSyntax.JSXExpressionContainer,this.expression=g}return h})();t.JSXExpressionContainer=u;var l=(function(){function h(g){this.type=i.JSXSyntax.JSXIdentifier,this.name=g}return h})();t.JSXIdentifier=l;var m=(function(){function h(g,x){this.type=i.JSXSyntax.JSXMemberExpression,this.object=g,this.property=x}return h})();t.JSXMemberExpression=m;var p=(function(){function h(g,x){this.type=i.JSXSyntax.JSXAttribute,this.name=g,this.value=x}return h})();t.JSXAttribute=p;var f=(function(){function h(g,x){this.type=i.JSXSyntax.JSXNamespacedName,this.namespace=g,this.name=x}return h})();t.JSXNamespacedName=f;var d=(function(){function h(g,x,v){this.type=i.JSXSyntax.JSXOpeningElement,this.name=g,this.selfClosing=x,this.attributes=v}return h})();t.JSXOpeningElement=d;var a=(function(){function h(g){this.type=i.JSXSyntax.JSXSpreadAttribute,this.argument=g}return h})();t.JSXSpreadAttribute=a;var c=(function(){function h(g,x){this.type=i.JSXSyntax.JSXText,this.value=g,this.raw=x}return h})();t.JSXText=c},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),n=(function(){function b(C){this.type=i.Syntax.ArrayExpression,this.elements=C}return b})();t.ArrayExpression=n;var o=(function(){function b(C){this.type=i.Syntax.ArrayPattern,this.elements=C}return b})();t.ArrayPattern=o;var s=(function(){function b(C,_,B){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=C,this.body=_,this.generator=!1,this.expression=B,this.async=!1}return b})();t.ArrowFunctionExpression=s;var u=(function(){function b(C,_,B){this.type=i.Syntax.AssignmentExpression,this.operator=C,this.left=_,this.right=B}return b})();t.AssignmentExpression=u;var l=(function(){function b(C,_){this.type=i.Syntax.AssignmentPattern,this.left=C,this.right=_}return b})();t.AssignmentPattern=l;var m=(function(){function b(C,_,B){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=C,this.body=_,this.generator=!1,this.expression=B,this.async=!0}return b})();t.AsyncArrowFunctionExpression=m;var p=(function(){function b(C,_,B){this.type=i.Syntax.FunctionDeclaration,this.id=C,this.params=_,this.body=B,this.generator=!1,this.expression=!1,this.async=!0}return b})();t.AsyncFunctionDeclaration=p;var f=(function(){function b(C,_,B){this.type=i.Syntax.FunctionExpression,this.id=C,this.params=_,this.body=B,this.generator=!1,this.expression=!1,this.async=!0}return b})();t.AsyncFunctionExpression=f;var d=(function(){function b(C){this.type=i.Syntax.AwaitExpression,this.argument=C}return b})();t.AwaitExpression=d;var a=(function(){function b(C,_,B){var Le=C==="||"||C==="&&";this.type=Le?i.Syntax.LogicalExpression:i.Syntax.BinaryExpression,this.operator=C,this.left=_,this.right=B}return b})();t.BinaryExpression=a;var c=(function(){function b(C){this.type=i.Syntax.BlockStatement,this.body=C}return b})();t.BlockStatement=c;var h=(function(){function b(C){this.type=i.Syntax.BreakStatement,this.label=C}return b})();t.BreakStatement=h;var g=(function(){function b(C,_){this.type=i.Syntax.CallExpression,this.callee=C,this.arguments=_}return b})();t.CallExpression=g;var x=(function(){function b(C,_){this.type=i.Syntax.CatchClause,this.param=C,this.body=_}return b})();t.CatchClause=x;var v=(function(){function b(C){this.type=i.Syntax.ClassBody,this.body=C}return b})();t.ClassBody=v;var E=(function(){function b(C,_,B){this.type=i.Syntax.ClassDeclaration,this.id=C,this.superClass=_,this.body=B}return b})();t.ClassDeclaration=E;var D=(function(){function b(C,_,B){this.type=i.Syntax.ClassExpression,this.id=C,this.superClass=_,this.body=B}return b})();t.ClassExpression=D;var A=(function(){function b(C,_){this.type=i.Syntax.MemberExpression,this.computed=!0,this.object=C,this.property=_}return b})();t.ComputedMemberExpression=A;var k=(function(){function b(C,_,B){this.type=i.Syntax.ConditionalExpression,this.test=C,this.consequent=_,this.alternate=B}return b})();t.ConditionalExpression=k;var I=(function(){function b(C){this.type=i.Syntax.ContinueStatement,this.label=C}return b})();t.ContinueStatement=I;var L=(function(){function b(){this.type=i.Syntax.DebuggerStatement}return b})();t.DebuggerStatement=L;var j=(function(){function b(C,_){this.type=i.Syntax.ExpressionStatement,this.expression=C,this.directive=_}return b})();t.Directive=j;var J=(function(){function b(C,_){this.type=i.Syntax.DoWhileStatement,this.body=C,this.test=_}return b})();t.DoWhileStatement=J;var Y=(function(){function b(){this.type=i.Syntax.EmptyStatement}return b})();t.EmptyStatement=Y;var ve=(function(){function b(C){this.type=i.Syntax.ExportAllDeclaration,this.source=C}return b})();t.ExportAllDeclaration=ve;var Mt=(function(){function b(C){this.type=i.Syntax.ExportDefaultDeclaration,this.declaration=C}return b})();t.ExportDefaultDeclaration=Mt;var kr=(function(){function b(C,_,B){this.type=i.Syntax.ExportNamedDeclaration,this.declaration=C,this.specifiers=_,this.source=B}return b})();t.ExportNamedDeclaration=kr;var tr=(function(){function b(C,_){this.type=i.Syntax.ExportSpecifier,this.exported=_,this.local=C}return b})();t.ExportSpecifier=tr;var Ho=(function(){function b(C){this.type=i.Syntax.ExpressionStatement,this.expression=C}return b})();t.ExpressionStatement=Ho;var Uo=(function(){function b(C,_,B){this.type=i.Syntax.ForInStatement,this.left=C,this.right=_,this.body=B,this.each=!1}return b})();t.ForInStatement=Uo;var Ai=(function(){function b(C,_,B){this.type=i.Syntax.ForOfStatement,this.left=C,this.right=_,this.body=B}return b})();t.ForOfStatement=Ai;var rr=(function(){function b(C,_,B,Le){this.type=i.Syntax.ForStatement,this.init=C,this.test=_,this.update=B,this.body=Le}return b})();t.ForStatement=rr;var Et=(function(){function b(C,_,B,Le){this.type=i.Syntax.FunctionDeclaration,this.id=C,this.params=_,this.body=B,this.generator=Le,this.expression=!1,this.async=!1}return b})();t.FunctionDeclaration=Et;var bt=(function(){function b(C,_,B,Le){this.type=i.Syntax.FunctionExpression,this.id=C,this.params=_,this.body=B,this.generator=Le,this.expression=!1,this.async=!1}return b})();t.FunctionExpression=bt;var vn=(function(){function b(C){this.type=i.Syntax.Identifier,this.name=C}return b})();t.Identifier=vn;var Pr=(function(){function b(C,_,B){this.type=i.Syntax.IfStatement,this.test=C,this.consequent=_,this.alternate=B}return b})();t.IfStatement=Pr;var ir=(function(){function b(C,_){this.type=i.Syntax.ImportDeclaration,this.specifiers=C,this.source=_}return b})();t.ImportDeclaration=ir;var se=(function(){function b(C){this.type=i.Syntax.ImportDefaultSpecifier,this.local=C}return b})();t.ImportDefaultSpecifier=se;var Te=(function(){function b(C){this.type=i.Syntax.ImportNamespaceSpecifier,this.local=C}return b})();t.ImportNamespaceSpecifier=Te;var et=(function(){function b(C,_){this.type=i.Syntax.ImportSpecifier,this.local=C,this.imported=_}return b})();t.ImportSpecifier=et;var Ue=(function(){function b(C,_){this.type=i.Syntax.LabeledStatement,this.label=C,this.body=_}return b})();t.LabeledStatement=Ue;var tt=(function(){function b(C,_){this.type=i.Syntax.Literal,this.value=C,this.raw=_}return b})();t.Literal=tt;var Lt=(function(){function b(C,_){this.type=i.Syntax.MetaProperty,this.meta=C,this.property=_}return b})();t.MetaProperty=Lt;var Ux=(function(){function b(C,_,B,Le,Wo){this.type=i.Syntax.MethodDefinition,this.key=C,this.computed=_,this.value=B,this.kind=Le,this.static=Wo}return b})();t.MethodDefinition=Ux;var Wx=(function(){function b(C){this.type=i.Syntax.Program,this.body=C,this.sourceType="module"}return b})();t.Module=Wx;var zx=(function(){function b(C,_){this.type=i.Syntax.NewExpression,this.callee=C,this.arguments=_}return b})();t.NewExpression=zx;var Jx=(function(){function b(C){this.type=i.Syntax.ObjectExpression,this.properties=C}return b})();t.ObjectExpression=Jx;var Gx=(function(){function b(C){this.type=i.Syntax.ObjectPattern,this.properties=C}return b})();t.ObjectPattern=Gx;var Vx=(function(){function b(C,_,B,Le,Wo,xv){this.type=i.Syntax.Property,this.key=_,this.computed=B,this.value=Le,this.kind=C,this.method=Wo,this.shorthand=xv}return b})();t.Property=Vx;var Yx=(function(){function b(C,_,B,Le){this.type=i.Syntax.Literal,this.value=C,this.raw=_,this.regex={pattern:B,flags:Le}}return b})();t.RegexLiteral=Yx;var Xx=(function(){function b(C){this.type=i.Syntax.RestElement,this.argument=C}return b})();t.RestElement=Xx;var Kx=(function(){function b(C){this.type=i.Syntax.ReturnStatement,this.argument=C}return b})();t.ReturnStatement=Kx;var Qx=(function(){function b(C){this.type=i.Syntax.Program,this.body=C,this.sourceType="script"}return b})();t.Script=Qx;var Zx=(function(){function b(C){this.type=i.Syntax.SequenceExpression,this.expressions=C}return b})();t.SequenceExpression=Zx;var ev=(function(){function b(C){this.type=i.Syntax.SpreadElement,this.argument=C}return b})();t.SpreadElement=ev;var tv=(function(){function b(C,_){this.type=i.Syntax.MemberExpression,this.computed=!1,this.object=C,this.property=_}return b})();t.StaticMemberExpression=tv;var rv=(function(){function b(){this.type=i.Syntax.Super}return b})();t.Super=rv;var iv=(function(){function b(C,_){this.type=i.Syntax.SwitchCase,this.test=C,this.consequent=_}return b})();t.SwitchCase=iv;var nv=(function(){function b(C,_){this.type=i.Syntax.SwitchStatement,this.discriminant=C,this.cases=_}return b})();t.SwitchStatement=nv;var sv=(function(){function b(C,_){this.type=i.Syntax.TaggedTemplateExpression,this.tag=C,this.quasi=_}return b})();t.TaggedTemplateExpression=sv;var ov=(function(){function b(C,_){this.type=i.Syntax.TemplateElement,this.value=C,this.tail=_}return b})();t.TemplateElement=ov;var av=(function(){function b(C,_){this.type=i.Syntax.TemplateLiteral,this.quasis=C,this.expressions=_}return b})();t.TemplateLiteral=av;var uv=(function(){function b(){this.type=i.Syntax.ThisExpression}return b})();t.ThisExpression=uv;var cv=(function(){function b(C){this.type=i.Syntax.ThrowStatement,this.argument=C}return b})();t.ThrowStatement=cv;var lv=(function(){function b(C,_,B){this.type=i.Syntax.TryStatement,this.block=C,this.handler=_,this.finalizer=B}return b})();t.TryStatement=lv;var hv=(function(){function b(C,_){this.type=i.Syntax.UnaryExpression,this.operator=C,this.argument=_,this.prefix=!0}return b})();t.UnaryExpression=hv;var fv=(function(){function b(C,_,B){this.type=i.Syntax.UpdateExpression,this.operator=C,this.argument=_,this.prefix=B}return b})();t.UpdateExpression=fv;var pv=(function(){function b(C,_){this.type=i.Syntax.VariableDeclaration,this.declarations=C,this.kind=_}return b})();t.VariableDeclaration=pv;var dv=(function(){function b(C,_){this.type=i.Syntax.VariableDeclarator,this.id=C,this.init=_}return b})();t.VariableDeclarator=dv;var mv=(function(){function b(C,_){this.type=i.Syntax.WhileStatement,this.test=C,this.body=_}return b})();t.WhileStatement=mv;var gv=(function(){function b(C,_){this.type=i.Syntax.WithStatement,this.object=C,this.body=_}return b})();t.WithStatement=gv;var yv=(function(){function b(C,_){this.type=i.Syntax.YieldExpression,this.argument=C,this.delegate=_}return b})();t.YieldExpression=yv},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(9),n=r(10),o=r(11),s=r(7),u=r(12),l=r(2),m=r(13),p="ArrowParameterPlaceHolder",f=(function(){function d(a,c,h){c===void 0&&(c={}),this.config={range:typeof c.range=="boolean"&&c.range,loc:typeof c.loc=="boolean"&&c.loc,source:null,tokens:typeof c.tokens=="boolean"&&c.tokens,comment:typeof c.comment=="boolean"&&c.comment,tolerant:typeof c.tolerant=="boolean"&&c.tolerant},this.config.loc&&c.source&&c.source!==null&&(this.config.source=String(c.source)),this.delegate=h,this.errorHandler=new n.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new u.Scanner(a,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return d.prototype.throwError=function(a){for(var c=[],h=1;h<arguments.length;h++)c[h-1]=arguments[h];var g=Array.prototype.slice.call(arguments,1),x=a.replace(/%(\d)/g,function(A,k){return i.assert(k<g.length,"Message reference must be in range"),g[k]}),v=this.lastMarker.index,E=this.lastMarker.line,D=this.lastMarker.column+1;throw this.errorHandler.createError(v,E,D,x)},d.prototype.tolerateError=function(a){for(var c=[],h=1;h<arguments.length;h++)c[h-1]=arguments[h];var g=Array.prototype.slice.call(arguments,1),x=a.replace(/%(\d)/g,function(A,k){return i.assert(k<g.length,"Message reference must be in range"),g[k]}),v=this.lastMarker.index,E=this.scanner.lineNumber,D=this.lastMarker.column+1;this.errorHandler.tolerateError(v,E,D,x)},d.prototype.unexpectedTokenError=function(a,c){var h=c||o.Messages.UnexpectedToken,g;if(a?(c||(h=a.type===2?o.Messages.UnexpectedEOS:a.type===3?o.Messages.UnexpectedIdentifier:a.type===6?o.Messages.UnexpectedNumber:a.type===8?o.Messages.UnexpectedString:a.type===10?o.Messages.UnexpectedTemplate:o.Messages.UnexpectedToken,a.type===4&&(this.scanner.isFutureReservedWord(a.value)?h=o.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(a.value)&&(h=o.Messages.StrictReservedWord))),g=a.value):g="ILLEGAL",h=h.replace("%0",g),a&&typeof a.lineNumber=="number"){var x=a.start,v=a.lineNumber,E=this.lastMarker.index-this.lastMarker.column,D=a.start-E+1;return this.errorHandler.createError(x,v,D,h)}else{var x=this.lastMarker.index,v=this.lastMarker.line,D=this.lastMarker.column+1;return this.errorHandler.createError(x,v,D,h)}},d.prototype.throwUnexpectedToken=function(a,c){throw this.unexpectedTokenError(a,c)},d.prototype.tolerateUnexpectedToken=function(a,c){this.errorHandler.tolerate(this.unexpectedTokenError(a,c))},d.prototype.collectComments=function(){if(!this.config.comment)this.scanner.scanComments();else{var a=this.scanner.scanComments();if(a.length>0&&this.delegate)for(var c=0;c<a.length;++c){var h=a[c],g=void 0;g={type:h.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(h.slice[0],h.slice[1])},this.config.range&&(g.range=h.range),this.config.loc&&(g.loc=h.loc);var x={start:{line:h.loc.start.line,column:h.loc.start.column,offset:h.range[0]},end:{line:h.loc.end.line,column:h.loc.end.column,offset:h.range[1]}};this.delegate(g,x)}}},d.prototype.getTokenRaw=function(a){return this.scanner.source.slice(a.start,a.end)},d.prototype.convertToken=function(a){var c={type:m.TokenName[a.type],value:this.getTokenRaw(a)};if(this.config.range&&(c.range=[a.start,a.end]),this.config.loc&&(c.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),a.type===9){var h=a.pattern,g=a.flags;c.regex={pattern:h,flags:g}}return c},d.prototype.nextToken=function(){var a=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);var c=this.scanner.lex();return this.hasLineTerminator=a.lineNumber!==c.lineNumber,c&&this.context.strict&&c.type===3&&this.scanner.isStrictModeReservedWord(c.value)&&(c.type=4),this.lookahead=c,this.config.tokens&&c.type!==2&&this.tokens.push(this.convertToken(c)),a},d.prototype.nextRegexToken=function(){this.collectComments();var a=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(a))),this.lookahead=a,this.nextToken(),a},d.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},d.prototype.startNode=function(a,c){c===void 0&&(c=0);var h=a.start-a.lineStart,g=a.lineNumber;return h<0&&(h+=c,g--),{index:a.start,line:g,column:h}},d.prototype.finalize=function(a,c){if(this.config.range&&(c.range=[a.index,this.lastMarker.index]),this.config.loc&&(c.loc={start:{line:a.line,column:a.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(c.loc.source=this.config.source)),this.delegate){var h={start:{line:a.line,column:a.column,offset:a.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(c,h)}return c},d.prototype.expect=function(a){var c=this.nextToken();(c.type!==7||c.value!==a)&&this.throwUnexpectedToken(c)},d.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var a=this.lookahead;a.type===7&&a.value===","?this.nextToken():a.type===7&&a.value===";"?(this.nextToken(),this.tolerateUnexpectedToken(a)):this.tolerateUnexpectedToken(a,o.Messages.UnexpectedToken)}else this.expect(",")},d.prototype.expectKeyword=function(a){var c=this.nextToken();(c.type!==4||c.value!==a)&&this.throwUnexpectedToken(c)},d.prototype.match=function(a){return this.lookahead.type===7&&this.lookahead.value===a},d.prototype.matchKeyword=function(a){return this.lookahead.type===4&&this.lookahead.value===a},d.prototype.matchContextualKeyword=function(a){return this.lookahead.type===3&&this.lookahead.value===a},d.prototype.matchAssign=function(){if(this.lookahead.type!==7)return!1;var a=this.lookahead.value;return a==="="||a==="*="||a==="**="||a==="/="||a==="%="||a==="+="||a==="-="||a==="<<="||a===">>="||a===">>>="||a==="&="||a==="^="||a==="|="},d.prototype.isolateCoverGrammar=function(a){var c=this.context.isBindingElement,h=this.context.isAssignmentTarget,g=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var x=a.call(this);return this.context.firstCoverInitializedNameError!==null&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=c,this.context.isAssignmentTarget=h,this.context.firstCoverInitializedNameError=g,x},d.prototype.inheritCoverGrammar=function(a){var c=this.context.isBindingElement,h=this.context.isAssignmentTarget,g=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var x=a.call(this);return this.context.isBindingElement=this.context.isBindingElement&&c,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&h,this.context.firstCoverInitializedNameError=g||this.context.firstCoverInitializedNameError,x},d.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(this.lookahead.type!==2&&!this.match("}")&&this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},d.prototype.parsePrimaryExpression=function(){var a=this.createNode(),c,h,g;switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&this.lookahead.value==="await"&&this.tolerateUnexpectedToken(this.lookahead),c=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(a,new s.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,h=this.nextToken(),g=this.getTokenRaw(h),c=this.finalize(a,new s.Literal(h.value,g));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,h=this.nextToken(),g=this.getTokenRaw(h),c=this.finalize(a,new s.Literal(h.value==="true",g));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,h=this.nextToken(),g=this.getTokenRaw(h),c=this.finalize(a,new s.Literal(null,g));break;case 10:c=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,c=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":c=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":c=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,h=this.nextRegexToken(),g=this.getTokenRaw(h),c=this.finalize(a,new s.RegexLiteral(h.regex,g,h.pattern,h.flags));break;default:c=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?c=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?c=this.finalize(a,new s.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?c=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),c=this.finalize(a,new s.ThisExpression)):this.matchKeyword("class")?c=this.parseClassExpression():c=this.throwUnexpectedToken(this.nextToken()));break;default:c=this.throwUnexpectedToken(this.nextToken())}return c},d.prototype.parseSpreadElement=function(){var a=this.createNode();this.expect("...");var c=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(a,new s.SpreadElement(c))},d.prototype.parseArrayInitializer=function(){var a=this.createNode(),c=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),c.push(null);else if(this.match("...")){var h=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),c.push(h)}else c.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(a,new s.ArrayExpression(c))},d.prototype.parsePropertyMethod=function(a){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var c=this.context.strict,h=this.context.allowStrictDirective;this.context.allowStrictDirective=a.simple;var g=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&a.firstRestricted&&this.tolerateUnexpectedToken(a.firstRestricted,a.message),this.context.strict&&a.stricted&&this.tolerateUnexpectedToken(a.stricted,a.message),this.context.strict=c,this.context.allowStrictDirective=h,g},d.prototype.parsePropertyMethodFunction=function(){var a=!1,c=this.createNode(),h=this.context.allowYield;this.context.allowYield=!0;var g=this.parseFormalParameters(),x=this.parsePropertyMethod(g);return this.context.allowYield=h,this.finalize(c,new s.FunctionExpression(null,g.params,x,a))},d.prototype.parsePropertyMethodAsyncFunction=function(){var a=this.createNode(),c=this.context.allowYield,h=this.context.await;this.context.allowYield=!1,this.context.await=!0;var g=this.parseFormalParameters(),x=this.parsePropertyMethod(g);return this.context.allowYield=c,this.context.await=h,this.finalize(a,new s.AsyncFunctionExpression(null,g.params,x))},d.prototype.parseObjectPropertyKey=function(){var a=this.createNode(),c=this.nextToken(),h;switch(c.type){case 8:case 6:this.context.strict&&c.octal&&this.tolerateUnexpectedToken(c,o.Messages.StrictOctalLiteral);var g=this.getTokenRaw(c);h=this.finalize(a,new s.Literal(c.value,g));break;case 3:case 1:case 5:case 4:h=this.finalize(a,new s.Identifier(c.value));break;case 7:c.value==="["?(h=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):h=this.throwUnexpectedToken(c);break;default:h=this.throwUnexpectedToken(c)}return h},d.prototype.isPropertyKey=function(a,c){return a.type===l.Syntax.Identifier&&a.name===c||a.type===l.Syntax.Literal&&a.value===c},d.prototype.parseObjectProperty=function(a){var c=this.createNode(),h=this.lookahead,g,x=null,v=null,E=!1,D=!1,A=!1,k=!1;if(h.type===3){var I=h.value;this.nextToken(),E=this.match("["),k=!this.hasLineTerminator&&I==="async"&&!this.match(":")&&!this.match("(")&&!this.match("*")&&!this.match(","),x=k?this.parseObjectPropertyKey():this.finalize(c,new s.Identifier(I))}else this.match("*")?this.nextToken():(E=this.match("["),x=this.parseObjectPropertyKey());var L=this.qualifiedPropertyName(this.lookahead);if(h.type===3&&!k&&h.value==="get"&&L)g="get",E=this.match("["),x=this.parseObjectPropertyKey(),this.context.allowYield=!1,v=this.parseGetterMethod();else if(h.type===3&&!k&&h.value==="set"&&L)g="set",E=this.match("["),x=this.parseObjectPropertyKey(),v=this.parseSetterMethod();else if(h.type===7&&h.value==="*"&&L)g="init",E=this.match("["),x=this.parseObjectPropertyKey(),v=this.parseGeneratorMethod(),D=!0;else if(x||this.throwUnexpectedToken(this.lookahead),g="init",this.match(":")&&!k)!E&&this.isPropertyKey(x,"__proto__")&&(a.value&&this.tolerateError(o.Messages.DuplicateProtoProperty),a.value=!0),this.nextToken(),v=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))v=k?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),D=!0;else if(h.type===3){var I=this.finalize(c,new s.Identifier(h.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),A=!0;var j=this.isolateCoverGrammar(this.parseAssignmentExpression);v=this.finalize(c,new s.AssignmentPattern(I,j))}else A=!0,v=I}else this.throwUnexpectedToken(this.nextToken());return this.finalize(c,new s.Property(g,x,E,v,D,A))},d.prototype.parseObjectInitializer=function(){var a=this.createNode();this.expect("{");for(var c=[],h={value:!1};!this.match("}");)c.push(this.parseObjectProperty(h)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(a,new s.ObjectExpression(c))},d.prototype.parseTemplateHead=function(){i.assert(this.lookahead.head,"Template literal must start with a template head");var a=this.createNode(),c=this.nextToken(),h=c.value,g=c.cooked;return this.finalize(a,new s.TemplateElement({raw:h,cooked:g},c.tail))},d.prototype.parseTemplateElement=function(){this.lookahead.type!==10&&this.throwUnexpectedToken();var a=this.createNode(),c=this.nextToken(),h=c.value,g=c.cooked;return this.finalize(a,new s.TemplateElement({raw:h,cooked:g},c.tail))},d.prototype.parseTemplateLiteral=function(){var a=this.createNode(),c=[],h=[],g=this.parseTemplateHead();for(h.push(g);!g.tail;)c.push(this.parseExpression()),g=this.parseTemplateElement(),h.push(g);return this.finalize(a,new s.TemplateLiteral(h,c))},d.prototype.reinterpretExpressionAsPattern=function(a){switch(a.type){case l.Syntax.Identifier:case l.Syntax.MemberExpression:case l.Syntax.RestElement:case l.Syntax.AssignmentPattern:break;case l.Syntax.SpreadElement:a.type=l.Syntax.RestElement,this.reinterpretExpressionAsPattern(a.argument);break;case l.Syntax.ArrayExpression:a.type=l.Syntax.ArrayPattern;for(var c=0;c<a.elements.length;c++)a.elements[c]!==null&&this.reinterpretExpressionAsPattern(a.elements[c]);break;case l.Syntax.ObjectExpression:a.type=l.Syntax.ObjectPattern;for(var c=0;c<a.properties.length;c++)this.reinterpretExpressionAsPattern(a.properties[c].value);break;case l.Syntax.AssignmentExpression:a.type=l.Syntax.AssignmentPattern,delete a.operator,this.reinterpretExpressionAsPattern(a.left);break;default:break}},d.prototype.parseGroupExpression=function(){var a;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),a={type:p,params:[],async:!1};else{var c=this.lookahead,h=[];if(this.match("..."))a=this.parseRestElement(h),this.expect(")"),this.match("=>")||this.expect("=>"),a={type:p,params:[a],async:!1};else{var g=!1;if(this.context.isBindingElement=!0,a=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var x=[];for(this.context.isAssignmentTarget=!1,x.push(a);this.lookahead.type!==2&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var v=0;v<x.length;v++)this.reinterpretExpressionAsPattern(x[v]);g=!0,a={type:p,params:x,async:!1}}else if(this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),x.push(this.parseRestElement(h)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1;for(var v=0;v<x.length;v++)this.reinterpretExpressionAsPattern(x[v]);g=!0,a={type:p,params:x,async:!1}}else x.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(g)break}g||(a=this.finalize(this.startNode(c),new s.SequenceExpression(x)))}if(!g){if(this.expect(")"),this.match("=>")&&(a.type===l.Syntax.Identifier&&a.name==="yield"&&(g=!0,a={type:p,params:[a],async:!1}),!g)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),a.type===l.Syntax.SequenceExpression)for(var v=0;v<a.expressions.length;v++)this.reinterpretExpressionAsPattern(a.expressions[v]);else this.reinterpretExpressionAsPattern(a);var E=a.type===l.Syntax.SequenceExpression?a.expressions:[a];a={type:p,params:E,async:!1}}this.context.isBindingElement=!1}}}return a},d.prototype.parseArguments=function(){this.expect("(");var a=[];if(!this.match(")"))for(;;){var c=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(a.push(c),this.match(")")||(this.expectCommaSeparator(),this.match(")")))break}return this.expect(")"),a},d.prototype.isIdentifierName=function(a){return a.type===3||a.type===4||a.type===1||a.type===5},d.prototype.parseIdentifierName=function(){var a=this.createNode(),c=this.nextToken();return this.isIdentifierName(c)||this.throwUnexpectedToken(c),this.finalize(a,new s.Identifier(c.value))},d.prototype.parseNewExpression=function(){var a=this.createNode(),c=this.parseIdentifierName();i.assert(c.name==="new","New expression must start with `new`");var h;if(this.match("."))if(this.nextToken(),this.lookahead.type===3&&this.context.inFunctionBody&&this.lookahead.value==="target"){var g=this.parseIdentifierName();h=new s.MetaProperty(c,g)}else this.throwUnexpectedToken(this.lookahead);else{var x=this.isolateCoverGrammar(this.parseLeftHandSideExpression),v=this.match("(")?this.parseArguments():[];h=new s.NewExpression(x,v),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(a,h)},d.prototype.parseAsyncArgument=function(){var a=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,a},d.prototype.parseAsyncArguments=function(){this.expect("(");var a=[];if(!this.match(")"))for(;;){var c=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(a.push(c),this.match(")")||(this.expectCommaSeparator(),this.match(")")))break}return this.expect(")"),a},d.prototype.parseLeftHandSideExpressionAllowCall=function(){var a=this.lookahead,c=this.matchContextualKeyword("async"),h=this.context.allowIn;this.context.allowIn=!0;var g;for(this.matchKeyword("super")&&this.context.inFunctionBody?(g=this.createNode(),this.nextToken(),g=this.finalize(g,new s.Super),!this.match("(")&&!this.match(".")&&!this.match("[")&&this.throwUnexpectedToken(this.lookahead)):g=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var x=this.parseIdentifierName();g=this.finalize(this.startNode(a),new s.StaticMemberExpression(g,x))}else if(this.match("(")){var v=c&&a.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var E=v?this.parseAsyncArguments():this.parseArguments();if(g=this.finalize(this.startNode(a),new s.CallExpression(g,E)),v&&this.match("=>")){for(var D=0;D<E.length;++D)this.reinterpretExpressionAsPattern(E[D]);g={type:p,params:E,async:!0}}}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var x=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),g=this.finalize(this.startNode(a),new s.ComputedMemberExpression(g,x))}else if(this.lookahead.type===10&&this.lookahead.head){var A=this.parseTemplateLiteral();g=this.finalize(this.startNode(a),new s.TaggedTemplateExpression(g,A))}else break;return this.context.allowIn=h,g},d.prototype.parseSuper=function(){var a=this.createNode();return this.expectKeyword("super"),!this.match("[")&&!this.match(".")&&this.throwUnexpectedToken(this.lookahead),this.finalize(a,new s.Super)},d.prototype.parseLeftHandSideExpression=function(){i.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var a=this.startNode(this.lookahead),c=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var h=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),c=this.finalize(a,new s.ComputedMemberExpression(c,h))}else if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var h=this.parseIdentifierName();c=this.finalize(a,new s.StaticMemberExpression(c,h))}else if(this.lookahead.type===10&&this.lookahead.head){var g=this.parseTemplateLiteral();c=this.finalize(a,new s.TaggedTemplateExpression(c,g))}else break;return c},d.prototype.parseUpdateExpression=function(){var a,c=this.lookahead;if(this.match("++")||this.match("--")){var h=this.startNode(c),g=this.nextToken();a=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&a.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(a.name)&&this.tolerateError(o.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment);var x=!0;a=this.finalize(h,new s.UpdateExpression(g.value,a,x)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(a=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&this.lookahead.type===7&&(this.match("++")||this.match("--"))){this.context.strict&&a.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(a.name)&&this.tolerateError(o.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var v=this.nextToken().value,x=!1;a=this.finalize(this.startNode(c),new s.UpdateExpression(v,a,x))}return a},d.prototype.parseAwaitExpression=function(){var a=this.createNode();this.nextToken();var c=this.parseUnaryExpression();return this.finalize(a,new s.AwaitExpression(c))},d.prototype.parseUnaryExpression=function(){var a;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var c=this.startNode(this.lookahead),h=this.nextToken();a=this.inheritCoverGrammar(this.parseUnaryExpression),a=this.finalize(c,new s.UnaryExpression(h.value,a)),this.context.strict&&a.operator==="delete"&&a.argument.type===l.Syntax.Identifier&&this.tolerateError(o.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else this.context.await&&this.matchContextualKeyword("await")?a=this.parseAwaitExpression():a=this.parseUpdateExpression();return a},d.prototype.parseExponentiationExpression=function(){var a=this.lookahead,c=this.inheritCoverGrammar(this.parseUnaryExpression);if(c.type!==l.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var h=c,g=this.isolateCoverGrammar(this.parseExponentiationExpression);c=this.finalize(this.startNode(a),new s.BinaryExpression("**",h,g))}return c},d.prototype.binaryPrecedence=function(a){var c=a.value,h;return a.type===7?h=this.operatorPrecedence[c]||0:a.type===4?h=c==="instanceof"||this.context.allowIn&&c==="in"?7:0:h=0,h},d.prototype.parseBinaryExpression=function(){var a=this.lookahead,c=this.inheritCoverGrammar(this.parseExponentiationExpression),h=this.lookahead,g=this.binaryPrecedence(h);if(g>0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var x=[a,this.lookahead],v=c,E=this.isolateCoverGrammar(this.parseExponentiationExpression),D=[v,h.value,E],A=[g];g=this.binaryPrecedence(this.lookahead),!(g<=0);){for(;D.length>2&&g<=A[A.length-1];){E=D.pop();var k=D.pop();A.pop(),v=D.pop(),x.pop();var I=this.startNode(x[x.length-1]);D.push(this.finalize(I,new s.BinaryExpression(k,v,E)))}D.push(this.nextToken().value),A.push(g),x.push(this.lookahead),D.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var L=D.length-1;c=D[L];for(var j=x.pop();L>1;){var J=x.pop(),Y=j&&j.lineStart,I=this.startNode(J,Y),k=D[L-1];c=this.finalize(I,new s.BinaryExpression(k,D[L-2],c)),L-=2,j=J}}return c},d.prototype.parseConditionalExpression=function(){var a=this.lookahead,c=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var h=this.context.allowIn;this.context.allowIn=!0;var g=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=h,this.expect(":");var x=this.isolateCoverGrammar(this.parseAssignmentExpression);c=this.finalize(this.startNode(a),new s.ConditionalExpression(c,g,x)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return c},d.prototype.checkPatternParam=function(a,c){switch(c.type){case l.Syntax.Identifier:this.validateParam(a,c,c.name);break;case l.Syntax.RestElement:this.checkPatternParam(a,c.argument);break;case l.Syntax.AssignmentPattern:this.checkPatternParam(a,c.left);break;case l.Syntax.ArrayPattern:for(var h=0;h<c.elements.length;h++)c.elements[h]!==null&&this.checkPatternParam(a,c.elements[h]);break;case l.Syntax.ObjectPattern:for(var h=0;h<c.properties.length;h++)this.checkPatternParam(a,c.properties[h].value);break;default:break}a.simple=a.simple&&c instanceof s.Identifier},d.prototype.reinterpretAsCoverFormalsList=function(a){var c=[a],h,g=!1;switch(a.type){case l.Syntax.Identifier:break;case p:c=a.params,g=a.async;break;default:return null}h={simple:!0,paramSet:{}};for(var x=0;x<c.length;++x){var v=c[x];v.type===l.Syntax.AssignmentPattern?v.right.type===l.Syntax.YieldExpression&&(v.right.argument&&this.throwUnexpectedToken(this.lookahead),v.right.type=l.Syntax.Identifier,v.right.name="yield",delete v.right.argument,delete v.right.delegate):g&&v.type===l.Syntax.Identifier&&v.name==="await"&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(h,v),c[x]=v}if(this.context.strict||!this.context.allowYield)for(var x=0;x<c.length;++x){var v=c[x];v.type===l.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead)}if(h.message===o.Messages.StrictParamDupe){var E=this.context.strict?h.stricted:h.firstRestricted;this.throwUnexpectedToken(E,h.message)}return{simple:h.simple,params:c,stricted:h.stricted,firstRestricted:h.firstRestricted,message:h.message}},d.prototype.parseAssignmentExpression=function(){var a;if(!this.context.allowYield&&this.matchKeyword("yield"))a=this.parseYieldExpression();else{var c=this.lookahead,h=c;if(a=this.parseConditionalExpression(),h.type===3&&h.lineNumber===this.lookahead.lineNumber&&h.value==="async"&&(this.lookahead.type===3||this.matchKeyword("yield"))){var g=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(g),a={type:p,params:[g],async:!0}}if(a.type===p||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var x=a.async,v=this.reinterpretAsCoverFormalsList(a);if(v){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var E=this.context.strict,D=this.context.allowStrictDirective;this.context.allowStrictDirective=v.simple;var A=this.context.allowYield,k=this.context.await;this.context.allowYield=!0,this.context.await=x;var I=this.startNode(c);this.expect("=>");var L=void 0;if(this.match("{")){var j=this.context.allowIn;this.context.allowIn=!0,L=this.parseFunctionSourceElements(),this.context.allowIn=j}else L=this.isolateCoverGrammar(this.parseAssignmentExpression);var J=L.type!==l.Syntax.BlockStatement;this.context.strict&&v.firstRestricted&&this.throwUnexpectedToken(v.firstRestricted,v.message),this.context.strict&&v.stricted&&this.tolerateUnexpectedToken(v.stricted,v.message),a=x?this.finalize(I,new s.AsyncArrowFunctionExpression(v.params,L,J)):this.finalize(I,new s.ArrowFunctionExpression(v.params,L,J)),this.context.strict=E,this.context.allowStrictDirective=D,this.context.allowYield=A,this.context.await=k}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.strict&&a.type===l.Syntax.Identifier){var Y=a;this.scanner.isRestrictedWord(Y.name)&&this.tolerateUnexpectedToken(h,o.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(Y.name)&&this.tolerateUnexpectedToken(h,o.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(a):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),h=this.nextToken();var ve=h.value,Mt=this.isolateCoverGrammar(this.parseAssignmentExpression);a=this.finalize(this.startNode(c),new s.AssignmentExpression(ve,a,Mt)),this.context.firstCoverInitializedNameError=null}}return a},d.prototype.parseExpression=function(){var a=this.lookahead,c=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var h=[];for(h.push(c);this.lookahead.type!==2&&this.match(",");)this.nextToken(),h.push(this.isolateCoverGrammar(this.parseAssignmentExpression));c=this.finalize(this.startNode(a),new s.SequenceExpression(h))}return c},d.prototype.parseStatementListItem=function(){var a;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,this.lookahead.type===4)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalExportDeclaration),a=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalImportDeclaration),a=this.parseImportDeclaration();break;case"const":a=this.parseLexicalDeclaration({inFor:!1});break;case"function":a=this.parseFunctionDeclaration();break;case"class":a=this.parseClassDeclaration();break;case"let":a=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:a=this.parseStatement();break}else a=this.parseStatement();return a},d.prototype.parseBlock=function(){var a=this.createNode();this.expect("{");for(var c=[];!this.match("}");)c.push(this.parseStatementListItem());return this.expect("}"),this.finalize(a,new s.BlockStatement(c))},d.prototype.parseLexicalBinding=function(a,c){var h=this.createNode(),g=[],x=this.parsePattern(g,a);this.context.strict&&x.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(x.name)&&this.tolerateError(o.Messages.StrictVarName);var v=null;return a==="const"?!this.matchKeyword("in")&&!this.matchContextualKeyword("of")&&(this.match("=")?(this.nextToken(),v=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(o.Messages.DeclarationMissingInitializer,"const")):(!c.inFor&&x.type!==l.Syntax.Identifier||this.match("="))&&(this.expect("="),v=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(h,new s.VariableDeclarator(x,v))},d.prototype.parseBindingList=function(a,c){for(var h=[this.parseLexicalBinding(a,c)];this.match(",");)this.nextToken(),h.push(this.parseLexicalBinding(a,c));return h},d.prototype.isLexicalDeclaration=function(){var a=this.scanner.saveState();this.scanner.scanComments();var c=this.scanner.lex();return this.scanner.restoreState(a),c.type===3||c.type===7&&c.value==="["||c.type===7&&c.value==="{"||c.type===4&&c.value==="let"||c.type===4&&c.value==="yield"},d.prototype.parseLexicalDeclaration=function(a){var c=this.createNode(),h=this.nextToken().value;i.assert(h==="let"||h==="const","Lexical declaration must be either let or const");var g=this.parseBindingList(h,a);return this.consumeSemicolon(),this.finalize(c,new s.VariableDeclaration(g,h))},d.prototype.parseBindingRestElement=function(a,c){var h=this.createNode();this.expect("...");var g=this.parsePattern(a,c);return this.finalize(h,new s.RestElement(g))},d.prototype.parseArrayPattern=function(a,c){var h=this.createNode();this.expect("[");for(var g=[];!this.match("]");)if(this.match(","))this.nextToken(),g.push(null);else{if(this.match("...")){g.push(this.parseBindingRestElement(a,c));break}else g.push(this.parsePatternWithDefault(a,c));this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(h,new s.ArrayPattern(g))},d.prototype.parsePropertyPattern=function(a,c){var h=this.createNode(),g=!1,x=!1,v=!1,E,D;if(this.lookahead.type===3){var A=this.lookahead;E=this.parseVariableIdentifier();var k=this.finalize(h,new s.Identifier(A.value));if(this.match("=")){a.push(A),x=!0,this.nextToken();var I=this.parseAssignmentExpression();D=this.finalize(this.startNode(A),new s.AssignmentPattern(k,I))}else this.match(":")?(this.expect(":"),D=this.parsePatternWithDefault(a,c)):(a.push(A),x=!0,D=k)}else g=this.match("["),E=this.parseObjectPropertyKey(),this.expect(":"),D=this.parsePatternWithDefault(a,c);return this.finalize(h,new s.Property("init",E,g,D,v,x))},d.prototype.parseObjectPattern=function(a,c){var h=this.createNode(),g=[];for(this.expect("{");!this.match("}");)g.push(this.parsePropertyPattern(a,c)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(h,new s.ObjectPattern(g))},d.prototype.parsePattern=function(a,c){var h;return this.match("[")?h=this.parseArrayPattern(a,c):this.match("{")?h=this.parseObjectPattern(a,c):(this.matchKeyword("let")&&(c==="const"||c==="let")&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.LetInLexicalBinding),a.push(this.lookahead),h=this.parseVariableIdentifier(c)),h},d.prototype.parsePatternWithDefault=function(a,c){var h=this.lookahead,g=this.parsePattern(a,c);if(this.match("=")){this.nextToken();var x=this.context.allowYield;this.context.allowYield=!0;var v=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=x,g=this.finalize(this.startNode(h),new s.AssignmentPattern(g,v))}return g},d.prototype.parseVariableIdentifier=function(a){var c=this.createNode(),h=this.nextToken();return h.type===4&&h.value==="yield"?this.context.strict?this.tolerateUnexpectedToken(h,o.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(h):h.type!==3?this.context.strict&&h.type===4&&this.scanner.isStrictModeReservedWord(h.value)?this.tolerateUnexpectedToken(h,o.Messages.StrictReservedWord):(this.context.strict||h.value!=="let"||a!=="var")&&this.throwUnexpectedToken(h):(this.context.isModule||this.context.await)&&h.type===3&&h.value==="await"&&this.tolerateUnexpectedToken(h),this.finalize(c,new s.Identifier(h.value))},d.prototype.parseVariableDeclaration=function(a){var c=this.createNode(),h=[],g=this.parsePattern(h,"var");this.context.strict&&g.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(g.name)&&this.tolerateError(o.Messages.StrictVarName);var x=null;return this.match("=")?(this.nextToken(),x=this.isolateCoverGrammar(this.parseAssignmentExpression)):g.type!==l.Syntax.Identifier&&!a.inFor&&this.expect("="),this.finalize(c,new s.VariableDeclarator(g,x))},d.prototype.parseVariableDeclarationList=function(a){var c={inFor:a.inFor},h=[];for(h.push(this.parseVariableDeclaration(c));this.match(",");)this.nextToken(),h.push(this.parseVariableDeclaration(c));return h},d.prototype.parseVariableStatement=function(){var a=this.createNode();this.expectKeyword("var");var c=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(a,new s.VariableDeclaration(c,"var"))},d.prototype.parseEmptyStatement=function(){var a=this.createNode();return this.expect(";"),this.finalize(a,new s.EmptyStatement)},d.prototype.parseExpressionStatement=function(){var a=this.createNode(),c=this.parseExpression();return this.consumeSemicolon(),this.finalize(a,new s.ExpressionStatement(c))},d.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(o.Messages.StrictFunction),this.parseStatement()},d.prototype.parseIfStatement=function(){var a=this.createNode(),c,h=null;this.expectKeyword("if"),this.expect("(");var g=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),c=this.finalize(this.createNode(),new s.EmptyStatement)):(this.expect(")"),c=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),h=this.parseIfClause())),this.finalize(a,new s.IfStatement(g,c,h))},d.prototype.parseDoWhileStatement=function(){var a=this.createNode();this.expectKeyword("do");var c=this.context.inIteration;this.context.inIteration=!0;var h=this.parseStatement();this.context.inIteration=c,this.expectKeyword("while"),this.expect("(");var g=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(a,new s.DoWhileStatement(h,g))},d.prototype.parseWhileStatement=function(){var a=this.createNode(),c;this.expectKeyword("while"),this.expect("(");var h=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),c=this.finalize(this.createNode(),new s.EmptyStatement);else{this.expect(")");var g=this.context.inIteration;this.context.inIteration=!0,c=this.parseStatement(),this.context.inIteration=g}return this.finalize(a,new s.WhileStatement(h,c))},d.prototype.parseForStatement=function(){var a=null,c=null,h=null,g=!0,x,v,E=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){a=this.createNode(),this.nextToken();var D=this.context.allowIn;this.context.allowIn=!1;var A=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=D,A.length===1&&this.matchKeyword("in")){var k=A[0];k.init&&(k.id.type===l.Syntax.ArrayPattern||k.id.type===l.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(o.Messages.ForInOfLoopInitializer,"for-in"),a=this.finalize(a,new s.VariableDeclaration(A,"var")),this.nextToken(),x=a,v=this.parseExpression(),a=null}else A.length===1&&A[0].init===null&&this.matchContextualKeyword("of")?(a=this.finalize(a,new s.VariableDeclaration(A,"var")),this.nextToken(),x=a,v=this.parseAssignmentExpression(),a=null,g=!1):(a=this.finalize(a,new s.VariableDeclaration(A,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){a=this.createNode();var I=this.nextToken().value;if(!this.context.strict&&this.lookahead.value==="in")a=this.finalize(a,new s.Identifier(I)),this.nextToken(),x=a,v=this.parseExpression(),a=null;else{var D=this.context.allowIn;this.context.allowIn=!1;var A=this.parseBindingList(I,{inFor:!0});this.context.allowIn=D,A.length===1&&A[0].init===null&&this.matchKeyword("in")?(a=this.finalize(a,new s.VariableDeclaration(A,I)),this.nextToken(),x=a,v=this.parseExpression(),a=null):A.length===1&&A[0].init===null&&this.matchContextualKeyword("of")?(a=this.finalize(a,new s.VariableDeclaration(A,I)),this.nextToken(),x=a,v=this.parseAssignmentExpression(),a=null,g=!1):(this.consumeSemicolon(),a=this.finalize(a,new s.VariableDeclaration(A,I)))}}else{var L=this.lookahead,D=this.context.allowIn;if(this.context.allowIn=!1,a=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=D,this.matchKeyword("in"))(!this.context.isAssignmentTarget||a.type===l.Syntax.AssignmentExpression)&&this.tolerateError(o.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(a),x=a,v=this.parseExpression(),a=null;else if(this.matchContextualKeyword("of"))(!this.context.isAssignmentTarget||a.type===l.Syntax.AssignmentExpression)&&this.tolerateError(o.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(a),x=a,v=this.parseAssignmentExpression(),a=null,g=!1;else{if(this.match(",")){for(var j=[a];this.match(",");)this.nextToken(),j.push(this.isolateCoverGrammar(this.parseAssignmentExpression));a=this.finalize(this.startNode(L),new s.SequenceExpression(j))}this.expect(";")}}typeof x>"u"&&(this.match(";")||(c=this.parseExpression()),this.expect(";"),this.match(")")||(h=this.parseExpression()));var J;if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),J=this.finalize(this.createNode(),new s.EmptyStatement);else{this.expect(")");var Y=this.context.inIteration;this.context.inIteration=!0,J=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=Y}return typeof x>"u"?this.finalize(E,new s.ForStatement(a,c,h,J)):g?this.finalize(E,new s.ForInStatement(x,v,J)):this.finalize(E,new s.ForOfStatement(x,v,J))},d.prototype.parseContinueStatement=function(){var a=this.createNode();this.expectKeyword("continue");var c=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var h=this.parseVariableIdentifier();c=h;var g="$"+h.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,g)||this.throwError(o.Messages.UnknownLabel,h.name)}return this.consumeSemicolon(),c===null&&!this.context.inIteration&&this.throwError(o.Messages.IllegalContinue),this.finalize(a,new s.ContinueStatement(c))},d.prototype.parseBreakStatement=function(){var a=this.createNode();this.expectKeyword("break");var c=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var h=this.parseVariableIdentifier(),g="$"+h.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,g)||this.throwError(o.Messages.UnknownLabel,h.name),c=h}return this.consumeSemicolon(),c===null&&!this.context.inIteration&&!this.context.inSwitch&&this.throwError(o.Messages.IllegalBreak),this.finalize(a,new s.BreakStatement(c))},d.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(o.Messages.IllegalReturn);var a=this.createNode();this.expectKeyword("return");var c=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==2||this.lookahead.type===8||this.lookahead.type===10,h=c?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(a,new s.ReturnStatement(h))},d.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(o.Messages.StrictModeWith);var a=this.createNode(),c;this.expectKeyword("with"),this.expect("(");var h=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),c=this.finalize(this.createNode(),new s.EmptyStatement)):(this.expect(")"),c=this.parseStatement()),this.finalize(a,new s.WithStatement(h,c))},d.prototype.parseSwitchCase=function(){var a=this.createNode(),c;this.matchKeyword("default")?(this.nextToken(),c=null):(this.expectKeyword("case"),c=this.parseExpression()),this.expect(":");for(var h=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)h.push(this.parseStatementListItem());return this.finalize(a,new s.SwitchCase(c,h))},d.prototype.parseSwitchStatement=function(){var a=this.createNode();this.expectKeyword("switch"),this.expect("(");var c=this.parseExpression();this.expect(")");var h=this.context.inSwitch;this.context.inSwitch=!0;var g=[],x=!1;for(this.expect("{");!this.match("}");){var v=this.parseSwitchCase();v.test===null&&(x&&this.throwError(o.Messages.MultipleDefaultsInSwitch),x=!0),g.push(v)}return this.expect("}"),this.context.inSwitch=h,this.finalize(a,new s.SwitchStatement(c,g))},d.prototype.parseLabelledStatement=function(){var a=this.createNode(),c=this.parseExpression(),h;if(c.type===l.Syntax.Identifier&&this.match(":")){this.nextToken();var g=c,x="$"+g.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,x)&&this.throwError(o.Messages.Redeclaration,"Label",g.name),this.context.labelSet[x]=!0;var v=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),v=this.parseClassDeclaration();else if(this.matchKeyword("function")){var E=this.lookahead,D=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(E,o.Messages.StrictFunction):D.generator&&this.tolerateUnexpectedToken(E,o.Messages.GeneratorInLegacyContext),v=D}else v=this.parseStatement();delete this.context.labelSet[x],h=new s.LabeledStatement(g,v)}else this.consumeSemicolon(),h=new s.ExpressionStatement(c);return this.finalize(a,h)},d.prototype.parseThrowStatement=function(){var a=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(o.Messages.NewlineAfterThrow);var c=this.parseExpression();return this.consumeSemicolon(),this.finalize(a,new s.ThrowStatement(c))},d.prototype.parseCatchClause=function(){var a=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var c=[],h=this.parsePattern(c),g={},x=0;x<c.length;x++){var v="$"+c[x].value;Object.prototype.hasOwnProperty.call(g,v)&&this.tolerateError(o.Messages.DuplicateBinding,c[x].value),g[v]=!0}this.context.strict&&h.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(h.name)&&this.tolerateError(o.Messages.StrictCatchVariable),this.expect(")");var E=this.parseBlock();return this.finalize(a,new s.CatchClause(h,E))},d.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},d.prototype.parseTryStatement=function(){var a=this.createNode();this.expectKeyword("try");var c=this.parseBlock(),h=this.matchKeyword("catch")?this.parseCatchClause():null,g=this.matchKeyword("finally")?this.parseFinallyClause():null;return!h&&!g&&this.throwError(o.Messages.NoCatchOrFinally),this.finalize(a,new s.TryStatement(c,h,g))},d.prototype.parseDebuggerStatement=function(){var a=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(a,new s.DebuggerStatement)},d.prototype.parseStatement=function(){var a;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:a=this.parseExpressionStatement();break;case 7:var c=this.lookahead.value;c==="{"?a=this.parseBlock():c==="("?a=this.parseExpressionStatement():c===";"?a=this.parseEmptyStatement():a=this.parseExpressionStatement();break;case 3:a=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":a=this.parseBreakStatement();break;case"continue":a=this.parseContinueStatement();break;case"debugger":a=this.parseDebuggerStatement();break;case"do":a=this.parseDoWhileStatement();break;case"for":a=this.parseForStatement();break;case"function":a=this.parseFunctionDeclaration();break;case"if":a=this.parseIfStatement();break;case"return":a=this.parseReturnStatement();break;case"switch":a=this.parseSwitchStatement();break;case"throw":a=this.parseThrowStatement();break;case"try":a=this.parseTryStatement();break;case"var":a=this.parseVariableStatement();break;case"while":a=this.parseWhileStatement();break;case"with":a=this.parseWithStatement();break;default:a=this.parseExpressionStatement();break}break;default:a=this.throwUnexpectedToken(this.lookahead)}return a},d.prototype.parseFunctionSourceElements=function(){var a=this.createNode();this.expect("{");var c=this.parseDirectivePrologues(),h=this.context.labelSet,g=this.context.inIteration,x=this.context.inSwitch,v=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;this.lookahead.type!==2&&!this.match("}");)c.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=h,this.context.inIteration=g,this.context.inSwitch=x,this.context.inFunctionBody=v,this.finalize(a,new s.BlockStatement(c))},d.prototype.validateParam=function(a,c,h){var g="$"+h;this.context.strict?(this.scanner.isRestrictedWord(h)&&(a.stricted=c,a.message=o.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(a.paramSet,g)&&(a.stricted=c,a.message=o.Messages.StrictParamDupe)):a.firstRestricted||(this.scanner.isRestrictedWord(h)?(a.firstRestricted=c,a.message=o.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(h)?(a.firstRestricted=c,a.message=o.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(a.paramSet,g)&&(a.stricted=c,a.message=o.Messages.StrictParamDupe)),typeof Object.defineProperty=="function"?Object.defineProperty(a.paramSet,g,{value:!0,enumerable:!0,writable:!0,configurable:!0}):a.paramSet[g]=!0},d.prototype.parseRestElement=function(a){var c=this.createNode();this.expect("...");var h=this.parsePattern(a);return this.match("=")&&this.throwError(o.Messages.DefaultRestParameter),this.match(")")||this.throwError(o.Messages.ParameterAfterRestParameter),this.finalize(c,new s.RestElement(h))},d.prototype.parseFormalParameter=function(a){for(var c=[],h=this.match("...")?this.parseRestElement(c):this.parsePatternWithDefault(c),g=0;g<c.length;g++)this.validateParam(a,c[g],c[g].value);a.simple=a.simple&&h instanceof s.Identifier,a.params.push(h)},d.prototype.parseFormalParameters=function(a){var c;if(c={simple:!0,params:[],firstRestricted:a},this.expect("("),!this.match(")"))for(c.paramSet={};this.lookahead.type!==2&&(this.parseFormalParameter(c),!(this.match(")")||(this.expect(","),this.match(")")))););return this.expect(")"),{simple:c.simple,params:c.params,stricted:c.stricted,firstRestricted:c.firstRestricted,message:c.message}},d.prototype.matchAsyncFunction=function(){var a=this.matchContextualKeyword("async");if(a){var c=this.scanner.saveState();this.scanner.scanComments();var h=this.scanner.lex();this.scanner.restoreState(c),a=c.lineNumber===h.lineNumber&&h.type===4&&h.value==="function"}return a},d.prototype.parseFunctionDeclaration=function(a){var c=this.createNode(),h=this.matchContextualKeyword("async");h&&this.nextToken(),this.expectKeyword("function");var g=h?!1:this.match("*");g&&this.nextToken();var x,v=null,E=null;if(!a||!this.match("(")){var D=this.lookahead;v=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(D.value)&&this.tolerateUnexpectedToken(D,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(D.value)?(E=D,x=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(D.value)&&(E=D,x=o.Messages.StrictReservedWord)}var A=this.context.await,k=this.context.allowYield;this.context.await=h,this.context.allowYield=!g;var I=this.parseFormalParameters(E),L=I.params,j=I.stricted;E=I.firstRestricted,I.message&&(x=I.message);var J=this.context.strict,Y=this.context.allowStrictDirective;this.context.allowStrictDirective=I.simple;var ve=this.parseFunctionSourceElements();return this.context.strict&&E&&this.throwUnexpectedToken(E,x),this.context.strict&&j&&this.tolerateUnexpectedToken(j,x),this.context.strict=J,this.context.allowStrictDirective=Y,this.context.await=A,this.context.allowYield=k,h?this.finalize(c,new s.AsyncFunctionDeclaration(v,L,ve)):this.finalize(c,new s.FunctionDeclaration(v,L,ve,g))},d.prototype.parseFunctionExpression=function(){var a=this.createNode(),c=this.matchContextualKeyword("async");c&&this.nextToken(),this.expectKeyword("function");var h=c?!1:this.match("*");h&&this.nextToken();var g,x=null,v,E=this.context.await,D=this.context.allowYield;if(this.context.await=c,this.context.allowYield=!h,!this.match("(")){var A=this.lookahead;x=!this.context.strict&&!h&&this.matchKeyword("yield")?this.parseIdentifierName():this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(A.value)&&this.tolerateUnexpectedToken(A,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(A.value)?(v=A,g=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(A.value)&&(v=A,g=o.Messages.StrictReservedWord)}var k=this.parseFormalParameters(v),I=k.params,L=k.stricted;v=k.firstRestricted,k.message&&(g=k.message);var j=this.context.strict,J=this.context.allowStrictDirective;this.context.allowStrictDirective=k.simple;var Y=this.parseFunctionSourceElements();return this.context.strict&&v&&this.throwUnexpectedToken(v,g),this.context.strict&&L&&this.tolerateUnexpectedToken(L,g),this.context.strict=j,this.context.allowStrictDirective=J,this.context.await=E,this.context.allowYield=D,c?this.finalize(a,new s.AsyncFunctionExpression(x,I,Y)):this.finalize(a,new s.FunctionExpression(x,I,Y,h))},d.prototype.parseDirective=function(){var a=this.lookahead,c=this.createNode(),h=this.parseExpression(),g=h.type===l.Syntax.Literal?this.getTokenRaw(a).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(c,g?new s.Directive(h,g):new s.ExpressionStatement(h))},d.prototype.parseDirectivePrologues=function(){for(var a=null,c=[];;){var h=this.lookahead;if(h.type!==8)break;var g=this.parseDirective();c.push(g);var x=g.directive;if(typeof x!="string")break;x==="use strict"?(this.context.strict=!0,a&&this.tolerateUnexpectedToken(a,o.Messages.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(h,o.Messages.IllegalLanguageModeDirective)):!a&&h.octal&&(a=h)}return c},d.prototype.qualifiedPropertyName=function(a){switch(a.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return a.value==="[";default:break}return!1},d.prototype.parseGetterMethod=function(){var a=this.createNode(),c=!1,h=this.context.allowYield;this.context.allowYield=!c;var g=this.parseFormalParameters();g.params.length>0&&this.tolerateError(o.Messages.BadGetterArity);var x=this.parsePropertyMethod(g);return this.context.allowYield=h,this.finalize(a,new s.FunctionExpression(null,g.params,x,c))},d.prototype.parseSetterMethod=function(){var a=this.createNode(),c=!1,h=this.context.allowYield;this.context.allowYield=!c;var g=this.parseFormalParameters();g.params.length!==1?this.tolerateError(o.Messages.BadSetterArity):g.params[0]instanceof s.RestElement&&this.tolerateError(o.Messages.BadSetterRestParameter);var x=this.parsePropertyMethod(g);return this.context.allowYield=h,this.finalize(a,new s.FunctionExpression(null,g.params,x,c))},d.prototype.parseGeneratorMethod=function(){var a=this.createNode(),c=!0,h=this.context.allowYield;this.context.allowYield=!0;var g=this.parseFormalParameters();this.context.allowYield=!1;var x=this.parsePropertyMethod(g);return this.context.allowYield=h,this.finalize(a,new s.FunctionExpression(null,g.params,x,c))},d.prototype.isStartOfExpression=function(){var a=!0,c=this.lookahead.value;switch(this.lookahead.type){case 7:a=c==="["||c==="("||c==="{"||c==="+"||c==="-"||c==="!"||c==="~"||c==="++"||c==="--"||c==="/"||c==="/=";break;case 4:a=c==="class"||c==="delete"||c==="function"||c==="let"||c==="new"||c==="super"||c==="this"||c==="typeof"||c==="void"||c==="yield";break;default:break}return a},d.prototype.parseYieldExpression=function(){var a=this.createNode();this.expectKeyword("yield");var c=null,h=!1;if(!this.hasLineTerminator){var g=this.context.allowYield;this.context.allowYield=!1,h=this.match("*"),h?(this.nextToken(),c=this.parseAssignmentExpression()):this.isStartOfExpression()&&(c=this.parseAssignmentExpression()),this.context.allowYield=g}return this.finalize(a,new s.YieldExpression(c,h))},d.prototype.parseClassElement=function(a){var c=this.lookahead,h=this.createNode(),g="",x=null,v=null,E=!1,D=!1,A=!1,k=!1;if(this.match("*"))this.nextToken();else{E=this.match("["),x=this.parseObjectPropertyKey();var I=x;if(I.name==="static"&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(c=this.lookahead,A=!0,E=this.match("["),this.match("*")?this.nextToken():x=this.parseObjectPropertyKey()),c.type===3&&!this.hasLineTerminator&&c.value==="async"){var L=this.lookahead.value;L!==":"&&L!=="("&&L!=="*"&&(k=!0,c=this.lookahead,x=this.parseObjectPropertyKey(),c.type===3&&c.value==="constructor"&&this.tolerateUnexpectedToken(c,o.Messages.ConstructorIsAsync))}}var j=this.qualifiedPropertyName(this.lookahead);return c.type===3?c.value==="get"&&j?(g="get",E=this.match("["),x=this.parseObjectPropertyKey(),this.context.allowYield=!1,v=this.parseGetterMethod()):c.value==="set"&&j&&(g="set",E=this.match("["),x=this.parseObjectPropertyKey(),v=this.parseSetterMethod()):c.type===7&&c.value==="*"&&j&&(g="init",E=this.match("["),x=this.parseObjectPropertyKey(),v=this.parseGeneratorMethod(),D=!0),!g&&x&&this.match("(")&&(g="init",v=k?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),D=!0),g||this.throwUnexpectedToken(this.lookahead),g==="init"&&(g="method"),E||(A&&this.isPropertyKey(x,"prototype")&&this.throwUnexpectedToken(c,o.Messages.StaticPrototype),!A&&this.isPropertyKey(x,"constructor")&&((g!=="method"||!D||v&&v.generator)&&this.throwUnexpectedToken(c,o.Messages.ConstructorSpecialMethod),a.value?this.throwUnexpectedToken(c,o.Messages.DuplicateConstructor):a.value=!0,g="constructor")),this.finalize(h,new s.MethodDefinition(x,E,v,g,A))},d.prototype.parseClassElementList=function(){var a=[],c={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():a.push(this.parseClassElement(c));return this.expect("}"),a},d.prototype.parseClassBody=function(){var a=this.createNode(),c=this.parseClassElementList();return this.finalize(a,new s.ClassBody(c))},d.prototype.parseClassDeclaration=function(a){var c=this.createNode(),h=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var g=a&&this.lookahead.type!==3?null:this.parseVariableIdentifier(),x=null;this.matchKeyword("extends")&&(this.nextToken(),x=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var v=this.parseClassBody();return this.context.strict=h,this.finalize(c,new s.ClassDeclaration(g,x,v))},d.prototype.parseClassExpression=function(){var a=this.createNode(),c=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var h=this.lookahead.type===3?this.parseVariableIdentifier():null,g=null;this.matchKeyword("extends")&&(this.nextToken(),g=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var x=this.parseClassBody();return this.context.strict=c,this.finalize(a,new s.ClassExpression(h,g,x))},d.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var a=this.createNode(),c=this.parseDirectivePrologues();this.lookahead.type!==2;)c.push(this.parseStatementListItem());return this.finalize(a,new s.Module(c))},d.prototype.parseScript=function(){for(var a=this.createNode(),c=this.parseDirectivePrologues();this.lookahead.type!==2;)c.push(this.parseStatementListItem());return this.finalize(a,new s.Script(c))},d.prototype.parseModuleSpecifier=function(){var a=this.createNode();this.lookahead.type!==8&&this.throwError(o.Messages.InvalidModuleSpecifier);var c=this.nextToken(),h=this.getTokenRaw(c);return this.finalize(a,new s.Literal(c.value,h))},d.prototype.parseImportSpecifier=function(){var a=this.createNode(),c,h;return this.lookahead.type===3?(c=this.parseVariableIdentifier(),h=c,this.matchContextualKeyword("as")&&(this.nextToken(),h=this.parseVariableIdentifier())):(c=this.parseIdentifierName(),h=c,this.matchContextualKeyword("as")?(this.nextToken(),h=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(a,new s.ImportSpecifier(h,c))},d.prototype.parseNamedImports=function(){this.expect("{");for(var a=[];!this.match("}");)a.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),a},d.prototype.parseImportDefaultSpecifier=function(){var a=this.createNode(),c=this.parseIdentifierName();return this.finalize(a,new s.ImportDefaultSpecifier(c))},d.prototype.parseImportNamespaceSpecifier=function(){var a=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(o.Messages.NoAsAfterImportNamespace),this.nextToken();var c=this.parseIdentifierName();return this.finalize(a,new s.ImportNamespaceSpecifier(c))},d.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalImportDeclaration);var a=this.createNode();this.expectKeyword("import");var c,h=[];if(this.lookahead.type===8)c=this.parseModuleSpecifier();else{if(this.match("{")?h=h.concat(this.parseNamedImports()):this.match("*")?h.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(h.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?h.push(this.parseImportNamespaceSpecifier()):this.match("{")?h=h.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var g=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(g,this.lookahead.value)}this.nextToken(),c=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(a,new s.ImportDeclaration(h,c))},d.prototype.parseExportSpecifier=function(){var a=this.createNode(),c=this.parseIdentifierName(),h=c;return this.matchContextualKeyword("as")&&(this.nextToken(),h=this.parseIdentifierName()),this.finalize(a,new s.ExportSpecifier(c,h))},d.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalExportDeclaration);var a=this.createNode();this.expectKeyword("export");var c;if(this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var h=this.parseFunctionDeclaration(!0);c=this.finalize(a,new s.ExportDefaultDeclaration(h))}else if(this.matchKeyword("class")){var h=this.parseClassDeclaration(!0);c=this.finalize(a,new s.ExportDefaultDeclaration(h))}else if(this.matchContextualKeyword("async")){var h=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression();c=this.finalize(a,new s.ExportDefaultDeclaration(h))}else{this.matchContextualKeyword("from")&&this.throwError(o.Messages.UnexpectedToken,this.lookahead.value);var h=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),c=this.finalize(a,new s.ExportDefaultDeclaration(h))}else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var g=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(g,this.lookahead.value)}this.nextToken();var x=this.parseModuleSpecifier();this.consumeSemicolon(),c=this.finalize(a,new s.ExportAllDeclaration(x))}else if(this.lookahead.type===4){var h=void 0;switch(this.lookahead.value){case"let":case"const":h=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":h=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}c=this.finalize(a,new s.ExportNamedDeclaration(h,[],null))}else if(this.matchAsyncFunction()){var h=this.parseFunctionDeclaration();c=this.finalize(a,new s.ExportNamedDeclaration(h,[],null))}else{var v=[],E=null,D=!1;for(this.expect("{");!this.match("}");)D=D||this.matchKeyword("default"),v.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.nextToken(),E=this.parseModuleSpecifier(),this.consumeSemicolon();else if(D){var g=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(g,this.lookahead.value)}else this.consumeSemicolon();c=this.finalize(a,new s.ExportNamedDeclaration(null,v,E))}return c},d})();t.Parser=f},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(i,n){if(!i)throw new Error("ASSERT: "+n)}t.assert=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(function(){function i(){this.errors=[],this.tolerant=!1}return i.prototype.recordError=function(n){this.errors.push(n)},i.prototype.tolerate=function(n){if(this.tolerant)this.recordError(n);else throw n},i.prototype.constructError=function(n,o){var s=new Error(n);try{throw s}catch(u){Object.create&&Object.defineProperty&&(s=Object.create(u),Object.defineProperty(s,"column",{value:o}))}return s},i.prototype.createError=function(n,o,s,u){var l="Line "+o+": "+u,m=this.constructError(l,s);return m.index=n,m.lineNumber=o,m.description=u,m},i.prototype.throwError=function(n,o,s,u){throw this.createError(n,o,s,u)},i.prototype.tolerateError=function(n,o,s,u){var l=this.createError(n,o,s,u);if(this.tolerant)this.recordError(l);else throw l},i})();t.ErrorHandler=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(9),n=r(4),o=r(11);function s(m){return"0123456789abcdef".indexOf(m.toLowerCase())}function u(m){return"01234567".indexOf(m)}var l=(function(){function m(p,f){this.source=p,this.errorHandler=f,this.trackComment=!1,this.isModule=!1,this.length=p.length,this.index=0,this.lineNumber=p.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return m.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},m.prototype.restoreState=function(p){this.index=p.index,this.lineNumber=p.lineNumber,this.lineStart=p.lineStart},m.prototype.eof=function(){return this.index>=this.length},m.prototype.throwUnexpectedToken=function(p){return p===void 0&&(p=o.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,p)},m.prototype.tolerateUnexpectedToken=function(p){p===void 0&&(p=o.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,p)},m.prototype.skipSingleLineComment=function(p){var f=[],d,a;for(this.trackComment&&(f=[],d=this.index-p,a={start:{line:this.lineNumber,column:this.index-this.lineStart-p},end:{}});!this.eof();){var c=this.source.charCodeAt(this.index);if(++this.index,n.Character.isLineTerminator(c)){if(this.trackComment){a.end={line:this.lineNumber,column:this.index-this.lineStart-1};var h={multiLine:!1,slice:[d+p,this.index-1],range:[d,this.index-1],loc:a};f.push(h)}return c===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,f}}if(this.trackComment){a.end={line:this.lineNumber,column:this.index-this.lineStart};var h={multiLine:!1,slice:[d+p,this.index],range:[d,this.index],loc:a};f.push(h)}return f},m.prototype.skipMultiLineComment=function(){var p=[],f,d;for(this.trackComment&&(p=[],f=this.index-2,d={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var a=this.source.charCodeAt(this.index);if(n.Character.isLineTerminator(a))a===13&&this.source.charCodeAt(this.index+1)===10&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(a===42){if(this.source.charCodeAt(this.index+1)===47){if(this.index+=2,this.trackComment){d.end={line:this.lineNumber,column:this.index-this.lineStart};var c={multiLine:!0,slice:[f+2,this.index-2],range:[f,this.index],loc:d};p.push(c)}return p}++this.index}else++this.index}if(this.trackComment){d.end={line:this.lineNumber,column:this.index-this.lineStart};var c={multiLine:!0,slice:[f+2,this.index],range:[f,this.index],loc:d};p.push(c)}return this.tolerateUnexpectedToken(),p},m.prototype.scanComments=function(){var p;this.trackComment&&(p=[]);for(var f=this.index===0;!this.eof();){var d=this.source.charCodeAt(this.index);if(n.Character.isWhiteSpace(d))++this.index;else if(n.Character.isLineTerminator(d))++this.index,d===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,f=!0;else if(d===47)if(d=this.source.charCodeAt(this.index+1),d===47){this.index+=2;var a=this.skipSingleLineComment(2);this.trackComment&&(p=p.concat(a)),f=!0}else if(d===42){this.index+=2;var a=this.skipMultiLineComment();this.trackComment&&(p=p.concat(a))}else break;else if(f&&d===45)if(this.source.charCodeAt(this.index+1)===45&&this.source.charCodeAt(this.index+2)===62){this.index+=3;var a=this.skipSingleLineComment(3);this.trackComment&&(p=p.concat(a))}else break;else if(d===60&&!this.isModule)if(this.source.slice(this.index+1,this.index+4)==="!--"){this.index+=4;var a=this.skipSingleLineComment(4);this.trackComment&&(p=p.concat(a))}else break;else break}return p},m.prototype.isFutureReservedWord=function(p){switch(p){case"enum":case"export":case"import":case"super":return!0;default:return!1}},m.prototype.isStrictModeReservedWord=function(p){switch(p){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},m.prototype.isRestrictedWord=function(p){return p==="eval"||p==="arguments"},m.prototype.isKeyword=function(p){switch(p.length){case 2:return p==="if"||p==="in"||p==="do";case 3:return p==="var"||p==="for"||p==="new"||p==="try"||p==="let";case 4:return p==="this"||p==="else"||p==="case"||p==="void"||p==="with"||p==="enum";case 5:return p==="while"||p==="break"||p==="catch"||p==="throw"||p==="const"||p==="yield"||p==="class"||p==="super";case 6:return p==="return"||p==="typeof"||p==="delete"||p==="switch"||p==="export"||p==="import";case 7:return p==="default"||p==="finally"||p==="extends";case 8:return p==="function"||p==="continue"||p==="debugger";case 10:return p==="instanceof";default:return!1}},m.prototype.codePointAt=function(p){var f=this.source.charCodeAt(p);if(f>=55296&&f<=56319){var d=this.source.charCodeAt(p+1);if(d>=56320&&d<=57343){var a=f;f=(a-55296)*1024+d-56320+65536}}return f},m.prototype.scanHexEscape=function(p){for(var f=p==="u"?4:2,d=0,a=0;a<f;++a)if(!this.eof()&&n.Character.isHexDigit(this.source.charCodeAt(this.index)))d=d*16+s(this.source[this.index++]);else return null;return String.fromCharCode(d)},m.prototype.scanUnicodeCodePointEscape=function(){var p=this.source[this.index],f=0;for(p==="}"&&this.throwUnexpectedToken();!this.eof()&&(p=this.source[this.index++],!!n.Character.isHexDigit(p.charCodeAt(0)));)f=f*16+s(p);return(f>1114111||p!=="}")&&this.throwUnexpectedToken(),n.Character.fromCodePoint(f)},m.prototype.getIdentifier=function(){for(var p=this.index++;!this.eof();){var f=this.source.charCodeAt(this.index);if(f===92)return this.index=p,this.getComplexIdentifier();if(f>=55296&&f<57343)return this.index=p,this.getComplexIdentifier();if(n.Character.isIdentifierPart(f))++this.index;else break}return this.source.slice(p,this.index)},m.prototype.getComplexIdentifier=function(){var p=this.codePointAt(this.index),f=n.Character.fromCodePoint(p);this.index+=f.length;var d;for(p===92&&(this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,d=this.scanUnicodeCodePointEscape()):(d=this.scanHexEscape("u"),(d===null||d==="\\"||!n.Character.isIdentifierStart(d.charCodeAt(0)))&&this.throwUnexpectedToken()),f=d);!this.eof()&&(p=this.codePointAt(this.index),!!n.Character.isIdentifierPart(p));)d=n.Character.fromCodePoint(p),f+=d,this.index+=d.length,p===92&&(f=f.substr(0,f.length-1),this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,d=this.scanUnicodeCodePointEscape()):(d=this.scanHexEscape("u"),(d===null||d==="\\"||!n.Character.isIdentifierPart(d.charCodeAt(0)))&&this.throwUnexpectedToken()),f+=d);return f},m.prototype.octalToDecimal=function(p){var f=p!=="0",d=u(p);return!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(f=!0,d=d*8+u(this.source[this.index++]),"0123".indexOf(p)>=0&&!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(d=d*8+u(this.source[this.index++]))),{code:d,octal:f}},m.prototype.scanIdentifier=function(){var p,f=this.index,d=this.source.charCodeAt(f)===92?this.getComplexIdentifier():this.getIdentifier();if(d.length===1?p=3:this.isKeyword(d)?p=4:d==="null"?p=5:d==="true"||d==="false"?p=1:p=3,p!==3&&f+d.length!==this.index){var a=this.index;this.index=f,this.tolerateUnexpectedToken(o.Messages.InvalidEscapedReservedWord),this.index=a}return{type:p,value:d,lineNumber:this.lineNumber,lineStart:this.lineStart,start:f,end:this.index}},m.prototype.scanPunctuator=function(){var p=this.index,f=this.source[this.index];switch(f){case"(":case"{":f==="{"&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,this.source[this.index]==="."&&this.source[this.index+1]==="."&&(this.index+=2,f="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:f=this.source.substr(this.index,4),f===">>>="?this.index+=4:(f=f.substr(0,3),f==="==="||f==="!=="||f===">>>"||f==="<<="||f===">>="||f==="**="?this.index+=3:(f=f.substr(0,2),f==="&&"||f==="||"||f==="=="||f==="!="||f==="+="||f==="-="||f==="*="||f==="/="||f==="++"||f==="--"||f==="<<"||f===">>"||f==="&="||f==="|="||f==="^="||f==="%="||f==="<="||f===">="||f==="=>"||f==="**"?this.index+=2:(f=this.source[this.index],"<>=!+-*%&|^/".indexOf(f)>=0&&++this.index)))}return this.index===p&&this.throwUnexpectedToken(),{type:7,value:f,lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},m.prototype.scanHexLiteral=function(p){for(var f="";!this.eof()&&n.Character.isHexDigit(this.source.charCodeAt(this.index));)f+=this.source[this.index++];return f.length===0&&this.throwUnexpectedToken(),n.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+f,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},m.prototype.scanBinaryLiteral=function(p){for(var f="",d;!this.eof()&&(d=this.source[this.index],!(d!=="0"&&d!=="1"));)f+=this.source[this.index++];return f.length===0&&this.throwUnexpectedToken(),this.eof()||(d=this.source.charCodeAt(this.index),(n.Character.isIdentifierStart(d)||n.Character.isDecimalDigit(d))&&this.throwUnexpectedToken()),{type:6,value:parseInt(f,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},m.prototype.scanOctalLiteral=function(p,f){var d="",a=!1;for(n.Character.isOctalDigit(p.charCodeAt(0))?(a=!0,d="0"+this.source[this.index++]):++this.index;!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index));)d+=this.source[this.index++];return!a&&d.length===0&&this.throwUnexpectedToken(),(n.Character.isIdentifierStart(this.source.charCodeAt(this.index))||n.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(d,8),octal:a,lineNumber:this.lineNumber,lineStart:this.lineStart,start:f,end:this.index}},m.prototype.isImplicitOctalLiteral=function(){for(var p=this.index+1;p<this.length;++p){var f=this.source[p];if(f==="8"||f==="9")return!1;if(!n.Character.isOctalDigit(f.charCodeAt(0)))return!0}return!0},m.prototype.scanNumericLiteral=function(){var p=this.index,f=this.source[p];i.assert(n.Character.isDecimalDigit(f.charCodeAt(0))||f===".","Numeric literal must start with a decimal digit or a decimal point");var d="";if(f!=="."){if(d=this.source[this.index++],f=this.source[this.index],d==="0"){if(f==="x"||f==="X")return++this.index,this.scanHexLiteral(p);if(f==="b"||f==="B")return++this.index,this.scanBinaryLiteral(p);if(f==="o"||f==="O")return this.scanOctalLiteral(f,p);if(f&&n.Character.isOctalDigit(f.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(f,p)}for(;n.Character.isDecimalDigit(this.source.charCodeAt(this.index));)d+=this.source[this.index++];f=this.source[this.index]}if(f==="."){for(d+=this.source[this.index++];n.Character.isDecimalDigit(this.source.charCodeAt(this.index));)d+=this.source[this.index++];f=this.source[this.index]}if(f==="e"||f==="E")if(d+=this.source[this.index++],f=this.source[this.index],(f==="+"||f==="-")&&(d+=this.source[this.index++]),n.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;n.Character.isDecimalDigit(this.source.charCodeAt(this.index));)d+=this.source[this.index++];else this.throwUnexpectedToken();return n.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(d),lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},m.prototype.scanStringLiteral=function(){var p=this.index,f=this.source[p];i.assert(f==="'"||f==='"',"String literal must starts with a quote"),++this.index;for(var d=!1,a="";!this.eof();){var c=this.source[this.index++];if(c===f){f="";break}else if(c==="\\")if(c=this.source[this.index++],!c||!n.Character.isLineTerminator(c.charCodeAt(0)))switch(c){case"u":if(this.source[this.index]==="{")++this.index,a+=this.scanUnicodeCodePointEscape();else{var h=this.scanHexEscape(c);h===null&&this.throwUnexpectedToken(),a+=h}break;case"x":var g=this.scanHexEscape(c);g===null&&this.throwUnexpectedToken(o.Messages.InvalidHexEscapeSequence),a+=g;break;case"n":a+=`
|
|
136
136
|
`;break;case"r":a+="\r";break;case"t":a+=" ";break;case"b":a+="\b";break;case"f":a+="\f";break;case"v":a+="\v";break;case"8":case"9":a+=c,this.tolerateUnexpectedToken();break;default:if(c&&n.Character.isOctalDigit(c.charCodeAt(0))){var x=this.octalToDecimal(c);d=x.octal||d,a+=String.fromCharCode(x.code)}else a+=c;break}else++this.lineNumber,c==="\r"&&this.source[this.index]===`
|
|
137
137
|
`&&++this.index,this.lineStart=this.index;else{if(n.Character.isLineTerminator(c.charCodeAt(0)))break;a+=c}}return f!==""&&(this.index=p,this.throwUnexpectedToken()),{type:8,value:a,octal:d,lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},m.prototype.scanTemplate=function(){var p="",f=!1,d=this.index,a=this.source[d]==="`",c=!1,h=2;for(++this.index;!this.eof();){var g=this.source[this.index++];if(g==="`"){h=1,c=!0,f=!0;break}else if(g==="$"){if(this.source[this.index]==="{"){this.curlyStack.push("${"),++this.index,f=!0;break}p+=g}else if(g==="\\")if(g=this.source[this.index++],n.Character.isLineTerminator(g.charCodeAt(0)))++this.lineNumber,g==="\r"&&this.source[this.index]===`
|
|
138
138
|
`&&++this.index,this.lineStart=this.index;else switch(g){case"n":p+=`
|
|
139
139
|
`;break;case"r":p+="\r";break;case"t":p+=" ";break;case"u":if(this.source[this.index]==="{")++this.index,p+=this.scanUnicodeCodePointEscape();else{var x=this.index,v=this.scanHexEscape(g);v!==null?p+=v:(this.index=x,p+=g)}break;case"x":var E=this.scanHexEscape(g);E===null&&this.throwUnexpectedToken(o.Messages.InvalidHexEscapeSequence),p+=E;break;case"b":p+="\b";break;case"f":p+="\f";break;case"v":p+="\v";break;default:g==="0"?(n.Character.isDecimalDigit(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(o.Messages.TemplateOctalLiteral),p+="\0"):n.Character.isOctalDigit(g.charCodeAt(0))?this.throwUnexpectedToken(o.Messages.TemplateOctalLiteral):p+=g;break}else n.Character.isLineTerminator(g.charCodeAt(0))?(++this.lineNumber,g==="\r"&&this.source[this.index]===`
|
|
140
140
|
`&&++this.index,this.lineStart=this.index,p+=`
|
|
141
|
-
`):p+=g}return f||this.throwUnexpectedToken(),a||this.curlyStack.pop(),{type:10,value:this.source.slice(d+1,this.index-h),cooked:p,head:a,tail:c,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},m.prototype.testRegExp=function(p,f){var d="\uFFFF",a=p,c=this;f.indexOf("u")>=0&&(a=a.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(h,g,x){var v=parseInt(g||x,16);return v>1114111&&c.throwUnexpectedToken(o.Messages.InvalidRegExp),v<=65535?String.fromCharCode(v):d}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,d));try{RegExp(a)}catch{this.throwUnexpectedToken(o.Messages.InvalidRegExp)}try{return new RegExp(p,f)}catch{return null}},m.prototype.scanRegExpBody=function(){var p=this.source[this.index];i.assert(p==="/","Regular expression literal must start with a slash");for(var f=this.source[this.index++],d=!1,a=!1;!this.eof();)if(p=this.source[this.index++],f+=p,p==="\\")p=this.source[this.index++],n.Character.isLineTerminator(p.charCodeAt(0))&&this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),f+=p;else if(n.Character.isLineTerminator(p.charCodeAt(0)))this.throwUnexpectedToken(o.Messages.UnterminatedRegExp);else if(d)p==="]"&&(d=!1);else if(p==="/"){a=!0;break}else p==="["&&(d=!0);return a||this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),f.substr(1,f.length-2)},m.prototype.scanRegExpFlags=function(){for(var p="",f="";!this.eof();){var d=this.source[this.index];if(!n.Character.isIdentifierPart(d.charCodeAt(0)))break;if(++this.index,d==="\\"&&!this.eof())if(d=this.source[this.index],d==="u"){++this.index;var a=this.index,c=this.scanHexEscape("u");if(c!==null)for(f+=c,p+="\\u";a<this.index;++a)p+=this.source[a];else this.index=a,f+="u",p+="\\u";this.tolerateUnexpectedToken()}else p+="\\",this.tolerateUnexpectedToken();else f+=d,p+=d}return f},m.prototype.scanRegExp=function(){var p=this.index,f=this.scanRegExpBody(),d=this.scanRegExpFlags(),a=this.testRegExp(f,d);return{type:9,value:"",pattern:f,flags:d,regex:a,lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},m.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var p=this.source.charCodeAt(this.index);return n.Character.isIdentifierStart(p)?this.scanIdentifier():p===40||p===41||p===59?this.scanPunctuator():p===39||p===34?this.scanStringLiteral():p===46?n.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():n.Character.isDecimalDigit(p)?this.scanNumericLiteral():p===96||p===125&&this.curlyStack[this.curlyStack.length-1]==="${"?this.scanTemplate():p>=55296&&p<57343&&n.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},m})();t.Scanner=l},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="<end>",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XHTMLEntities={quot:'"',amp:"&",apos:"'",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",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27E8",rang:"\u27E9"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(10),n=r(12),o=r(13),s=(function(){function l(){this.values=[],this.curly=this.paren=-1}return l.prototype.beforeFunctionExpression=function(m){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(m)>=0},l.prototype.isRegexStart=function(){var m=this.values[this.values.length-1],p=m!==null;switch(m){case"this":case"]":p=!1;break;case")":var f=this.values[this.paren-1];p=f==="if"||f==="while"||f==="for"||f==="with";break;case"}":if(p=!1,this.values[this.curly-3]==="function"){var d=this.values[this.curly-4];p=d?!this.beforeFunctionExpression(d):!1}else if(this.values[this.curly-4]==="function"){var d=this.values[this.curly-5];p=d?!this.beforeFunctionExpression(d):!0}break;default:break}return p},l.prototype.push=function(m){m.type===7||m.type===4?(m.value==="{"?this.curly=this.values.length:m.value==="("&&(this.paren=this.values.length),this.values.push(m.value)):this.values.push(null)},l})(),u=(function(){function l(m,p){this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=p?typeof p.tolerant=="boolean"&&p.tolerant:!1,this.scanner=new n.Scanner(m,this.errorHandler),this.scanner.trackComment=p?typeof p.comment=="boolean"&&p.comment:!1,this.trackRange=p?typeof p.range=="boolean"&&p.range:!1,this.trackLoc=p?typeof p.loc=="boolean"&&p.loc:!1,this.buffer=[],this.reader=new s}return l.prototype.errors=function(){return this.errorHandler.errors},l.prototype.getNextToken=function(){if(this.buffer.length===0){var m=this.scanner.scanComments();if(this.scanner.trackComment)for(var p=0;p<m.length;++p){var f=m[p],d=this.scanner.source.slice(f.slice[0],f.slice[1]),a={type:f.multiLine?"BlockComment":"LineComment",value:d};this.trackRange&&(a.range=f.range),this.trackLoc&&(a.loc=f.loc),this.buffer.push(a)}if(!this.scanner.eof()){var c=void 0;this.trackLoc&&(c={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var h=this.scanner.source[this.scanner.index]==="/"&&this.reader.isRegexStart(),g=h?this.scanner.scanRegExp():this.scanner.lex();this.reader.push(g);var x={type:o.TokenName[g.type],value:this.scanner.source.slice(g.start,g.end)};if(this.trackRange&&(x.range=[g.start,g.end]),this.trackLoc&&(c.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},x.loc=c),g.type===9){var v=g.pattern,E=g.flags;x.regex={pattern:v,flags:E}}this.buffer.push(x)}}return this.buffer.shift()},l})();t.Tokenizer=u}])})});var gg=w(($B,Gs)=>{y();(function(){"use strict";var e,t,r=Object.prototype.toString;typeof Gs=="object"&&typeof Gs.exports=="object"&&typeof S=="function"?(e=mg(),t=function(n){Gs.exports=n},i(e,t)):typeof define=="function"&&define.amd?define(["esprima"],function(n){return i(n)}):typeof window=="object"&&(window.redeyed=i(window.esprima));function i(n,o){function s(x){return r.call(x)==="[object Function]"}function u(x){return r.call(x)==="[object String]"}function l(x){return r.call(x)==="[object Object]"}function m(x,v){return function(E){return x+E+v}}function p(x){return x!=="_parent"}function f(x){var v=x.split(":");if(v.length===0||v.length>2)throw new Error("illegal string config: "+x+`
|
|
142
|
-
Should be of format "before:after"`);return v.length===1||v[1].length===0?v.indexOf(":")<0?{_before:v[0]}:{_after:v[0]}:{_before:v[0],_after:v[1]}}function d(x){function v(
|
|
143
|
-
`)+1),x=Array.apply(0,Array(
|
|
144
|
-
`+x.substr(
|
|
145
|
-
`);
|
|
146
|
-
`)}
|
|
147
|
-
`)}static async done(){
|
|
148
|
-
`)}static log(t,...r){this.info(t||"",...r)}static logToStderr(t,...r){
|
|
149
|
-
`)}static get progress(){return
|
|
150
|
-
`)}static styledJSON(t){let r=JSON.stringify(t,null,2);if(!
|
|
151
|
-
`)}static get tree(){return Qs.tree}static url(t,r,i={}){Kl().stdout?this.log(z1(t,r,i)):this.log(r)}static get wait(){return W1.default}};F.ux=rn;var{action:J1,annotation:G1,anykey:V1,confirm:X1,debug:Y1,done:K1,flush:Q1,info:Z1,log:eF,logToStderr:tF,progress:rF,prompt:iF,styledHeader:nF,styledJSON:sF,styledObject:oF,table:aF,trace:uF,tree:cF,url:lF,wait:hF}=rn;F.action=J1;F.annotation=G1;F.anykey=V1;F.confirm=X1;F.debug=Y1;F.done=K1;F.flush=Q1;F.info=Z1;F.log=eF;F.logToStderr=tF;F.progress=rF;F.prompt=iF;F.styledHeader=nF;F.styledJSON=sF;F.styledObject=oF;F.table=aF;F.trace=uF;F.tree=cF;F.url=lF;F.wait=hF;var{error:fF,exit:pF,warn:dF}=H1;F.error=fF;F.exit=pF;F.warn=dF;var Ig=async()=>{try{await rn.done()}catch(e){console.error(e),process.exitCode=1}},mF=process.listeners("exit").find(e=>e.name===Ig.name);mF||process.once("exit",Ig);var gF=Cs();Object.defineProperty(F,"ActionBase",{enumerable:!0,get:function(){return gF.ActionBase}});var Ng=_s();Object.defineProperty(F,"Config",{enumerable:!0,get:function(){return Ng.Config}});Object.defineProperty(F,"config",{enumerable:!0,get:function(){return Ng.config}});var yF=kg();Object.defineProperty(F,"ExitError",{enumerable:!0,get:function(){return yF.ExitError}});var xF=Fu();Object.defineProperty(F,"Table",{enumerable:!0,get:function(){return xF.Table}});var vF=hr();Object.defineProperty(F,"colorize",{enumerable:!0,get:function(){return vF.colorize}});var wF=$t();Object.defineProperty(F,"write",{enumerable:!0,get:function(){return Zs(wF).default}})});var Rg=w(li=>{"use strict";y();Object.defineProperty(li,"__esModule",{value:!0});li.stderr=li.stdout=void 0;var eo=class{channel;constructor(t){this.channel=t}get isTTY(){return process[this.channel].isTTY}emit(t,...r){return process[this.channel].emit(t,...r)}getWindowSize(){return process[this.channel].getWindowSize()}on(t,r){return process[this.channel].on(t,r),this}once(t,r){return process[this.channel].once(t,r),this}read(){return process[this.channel].read()}write(t){return process[this.channel].write(t)}};li.stdout=new eo("stdout");li.stderr=new eo("stderr")});var hi=w(Se=>{"use strict";y();Object.defineProperty(Se,"__esModule",{value:!0});Se.Performance=Se.OCLIF_MARKER_OWNER=void 0;var sn=S("node:perf_hooks"),EF=qt();Se.OCLIF_MARKER_OWNER="@oclif/core";var Bu=class{owner;name;details;method;module;scope;stopped=!1;startMarker;stopMarker;constructor(t,r,i={}){this.owner=t,this.name=r,this.details=i,this.startMarker=`${this.name}-start`,this.stopMarker=`${this.name}-stop`;let[n,o]=r.split("#"),[s,u]=n.split(".");this.module=s,this.method=u,this.scope=o,sn.performance.mark(this.startMarker)}addDetails(t){this.details={...this.details,...t}}measure(){sn.performance.measure(this.name,this.startMarker,this.stopMarker)}stop(){this.stopped=!0,sn.performance.mark(this.stopMarker)}},ju=class e{static _oclifPerf;static _results=new Map;static markers=new Map;static async collect(){if(!e.enabled||e._results.size>0)return;let t=[...e.markers.values()];if(t.length!==0){for(let r of t.filter(i=>!i.stopped))r.stop();return new Promise(r=>{new sn.PerformanceObserver(n=>{for(let f of n.getEntries()){let d=e.markers.get(f.name);if(d){let a={details:d.details,duration:f.duration,method:d.method,module:d.module,name:f.name,scope:d.scope},c=e._results.get(d.owner)??[];e._results.set(d.owner,[...c,a])}}let o=e._results.get(Se.OCLIF_MARKER_OWNER)??[],s=o.find(f=>f.name.startsWith("config.runCommand")),u=s?e.getResult(Se.OCLIF_MARKER_OWNER,`plugin.findCommand#${s.details.plugin}.${s.details.command}`)?.duration??0:0,l=Object.fromEntries(o.filter(({name:f})=>f.startsWith("plugin.load#")).sort((f,d)=>d.duration-f.duration).map(({details:f,duration:d,scope:a})=>[a,{details:f,duration:d}])),m=o.filter(({name:f})=>f.startsWith("config.runHook#")).reduce((f,d)=>{let a=d.details.event;if(a)f[a]||(f[a]={}),f[a][d.scope]=d.duration;else{let c=d.scope;f[c]||(f[c]={}),f[c].total=d.duration}return f},{}),p=Object.fromEntries(o.filter(({name:f})=>f.startsWith("config.loadPlugins#")).sort((f,d)=>d.duration-f.duration).map(({duration:f,scope:d})=>[d,f]));e._oclifPerf={hookRunTimes:m,"oclif.commandLoadMs":u,"oclif.commandRunMs":o.find(({name:f})=>f.startsWith("config.runCommand#"))?.duration??0,"oclif.configLoadMs":e.getResult(Se.OCLIF_MARKER_OWNER,"config.load")?.duration??0,"oclif.corePluginsLoadMs":p.core??0,"oclif.initHookMs":m.init?.total??0,"oclif.initMs":e.getResult(Se.OCLIF_MARKER_OWNER,"main.run#init")?.duration??0,"oclif.linkedPluginsLoadMs":p.link??0,"oclif.postrunHookMs":m.postrun?.total??0,"oclif.prerunHookMs":m.prerun?.total??0,"oclif.runMs":e.getResult(Se.OCLIF_MARKER_OWNER,"main.run")?.duration??0,"oclif.userPluginsLoadMs":p.user??0,pluginLoadTimes:l},r()}).observe({buffered:!0,entryTypes:["measure"]});for(let n of t)try{n.measure()}catch{}sn.performance.clearMarks()})}}static debug(){if(!e.enabled)return;let t=ut()("oclif-perf"),r=(process.uptime()*1e3).toFixed(4);t("Process Uptime: %sms",r),t("Oclif Time: %sms",e.oclifPerf["oclif.runMs"].toFixed(4)),t("Init Time: %sms",e.oclifPerf["oclif.initMs"].toFixed(4)),t("Config Load Time: %sms",e.oclifPerf["oclif.configLoadMs"].toFixed(4)),t(" \u2022 Root Plugin Load Time: %sms",e.getResult(Se.OCLIF_MARKER_OWNER,"plugin.load#root")?.duration.toFixed(4)??0),t(" \u2022 Plugins Load Time: %sms",e.getResult(Se.OCLIF_MARKER_OWNER,"config.loadAllPlugins")?.duration.toFixed(4)??0),t(" \u2022 Commands Load Time: %sms",e.getResult(Se.OCLIF_MARKER_OWNER,"config.loadAllCommands")?.duration.toFixed(4)??0),t("Core Plugin Load Time: %sms",e.oclifPerf["oclif.corePluginsLoadMs"].toFixed(4)),t("User Plugin Load Time: %sms",e.oclifPerf["oclif.userPluginsLoadMs"].toFixed(4)),t("Linked Plugin Load Time: %sms",e.oclifPerf["oclif.linkedPluginsLoadMs"].toFixed(4)),t("Plugin Load Times:");for(let[o,s]of Object.entries(e.oclifPerf.pluginLoadTimes))s.details.hasManifest?t(` ${o}: ${s.duration.toFixed(4)}ms`):t(` ${o}: ${s.duration.toFixed(4)}ms (no manifest!)`);t("Hook Run Times:");for(let[o,s]of Object.entries(e.oclifPerf.hookRunTimes)){t(` ${o}:`);for(let[u,l]of Object.entries(s))t(` ${u}: ${l.toFixed(4)}ms`)}t("Command Load Time: %sms",e.oclifPerf["oclif.commandLoadMs"].toFixed(4)),t("Command Run Time: %sms",e.oclifPerf["oclif.commandRunMs"].toFixed(4)),e.oclifPerf["oclif.configLoadMs"]>e.oclifPerf["oclif.runMs"]&&t("! Config load time is greater than total oclif time. This might mean that Config was instantiated before oclif was run.");let i=ut()("non-oclif-perf"),n=e.results;if(n.size>0){i("Non-Core Performance Measurements:");for(let[o,s]of n){i(` ${o}:`);for(let u of s)i(` ${u.name}: ${u.duration.toFixed(4)}ms`)}}}static get enabled(){return EF.settings.performanceEnabled??!1}static getResult(t,r){return e._results.get(t)?.find(i=>i.name===r)}static mark(t,r,i={}){if(!e.enabled)return;let n=new Bu(t,r,i);return e.markers.set(n.name,n),n}static get oclifPerf(){if(!e.enabled)return{};if(e._oclifPerf)return e._oclifPerf;throw new Error("Perf results not available. Did you forget to call await Performance.collect()?")}static get results(){return e.enabled?new Map([...e._results.entries()].filter(([t])=>t!==Se.OCLIF_MARKER_OWNER)):new Map}};Se.Performance=ju});var Lg=w(fi=>{"use strict";y();Object.defineProperty(fi,"__esModule",{value:!0});fi.getPlatform=fi.getHomeDir=void 0;var Mg=S("node:os");function bF(){return(0,Mg.homedir)()}fi.getHomeDir=bF;function CF(){return(0,Mg.platform)()}fi.getPlatform=CF});var jg=w(Cr=>{"use strict";y();Object.defineProperty(Cr,"__esModule",{value:!0});Cr.range=Cr.balanced=void 0;var DF=(e,t,r)=>{let i=e instanceof RegExp?Bg(e,r):e,n=t instanceof RegExp?Bg(t,r):t,o=i!==null&&n!=null&&(0,Cr.range)(i,n,r);return o&&{start:o[0],end:o[1],pre:r.slice(0,o[0]),body:r.slice(o[0]+i.length,o[1]),post:r.slice(o[1]+n.length)}};Cr.balanced=DF;var Bg=(e,t)=>{let r=t.match(e);return r?r[0]:null},AF=(e,t,r)=>{let i,n,o,s,u,l=r.indexOf(e),m=r.indexOf(t,l+1),p=l;if(l>=0&&m>0){if(e===t)return[l,m];for(i=[],o=r.length;p>=0&&!u;){if(p===l)i.push(p),l=r.indexOf(e,p+1);else if(i.length===1){let f=i.pop();f!==void 0&&(u=[f,m])}else n=i.pop(),n!==void 0&&n<o&&(o=n,s=m),m=r.indexOf(t,p+1);p=l<m&&l>=0?l:m}i.length&&s!==void 0&&(u=[o,s])}return u};Cr.range=AF});var Jg=w(pi=>{"use strict";y();Object.defineProperty(pi,"__esModule",{value:!0});pi.EXPANSION_MAX=void 0;pi.expand=BF;var $g=jg(),qg="\0SLASH"+Math.random()+"\0",Hg="\0OPEN"+Math.random()+"\0",qu="\0CLOSE"+Math.random()+"\0",Ug="\0COMMA"+Math.random()+"\0",Wg="\0PERIOD"+Math.random()+"\0",_F=new RegExp(qg,"g"),SF=new RegExp(Hg,"g"),FF=new RegExp(qu,"g"),TF=new RegExp(Ug,"g"),OF=new RegExp(Wg,"g"),kF=/\\\\/g,PF=/\\{/g,IF=/\\}/g,NF=/\\,/g,RF=/\\./g;pi.EXPANSION_MAX=1e5;function $u(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function MF(e){return e.replace(kF,qg).replace(PF,Hg).replace(IF,qu).replace(NF,Ug).replace(RF,Wg)}function LF(e){return e.replace(_F,"\\").replace(SF,"{").replace(FF,"}").replace(TF,",").replace(OF,".")}function zg(e){if(!e)return[""];let t=[],r=(0,$g.balanced)("{","}",e);if(!r)return e.split(",");let{pre:i,body:n,post:o}=r,s=i.split(",");s[s.length-1]+="{"+n+"}";let u=zg(o);return o.length&&(s[s.length-1]+=u.shift(),s.push.apply(s,u)),t.push.apply(t,s),t}function BF(e,t={}){if(!e)return[];let{max:r=pi.EXPANSION_MAX}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),on(MF(e),r,!0).map(LF)}function jF(e){return"{"+e+"}"}function $F(e){return/^-?0\d/.test(e)}function qF(e,t){return e<=t}function HF(e,t){return e>=t}function on(e,t,r){let i=[],n=(0,$g.balanced)("{","}",e);if(!n)return[e];let o=n.pre,s=n.post.length?on(n.post,t,!1):[""];if(/\$$/.test(n.pre))for(let u=0;u<s.length&&u<t;u++){let l=o+"{"+n.body+"}"+s[u];i.push(l)}else{let u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),m=u||l,p=n.body.indexOf(",")>=0;if(!m&&!p)return n.post.match(/,(?!,).*\}/)?(e=n.pre+"{"+n.body+qu+n.post,on(e,t,!0)):[e];let f;if(m)f=n.body.split(/\.\./);else if(f=zg(n.body),f.length===1&&f[0]!==void 0&&(f=on(f[0],t,!1).map(jF),f.length===1))return s.map(a=>n.pre+f[0]+a);let d;if(m&&f[0]!==void 0&&f[1]!==void 0){let a=$u(f[0]),c=$u(f[1]),h=Math.max(f[0].length,f[1].length),g=f.length===3&&f[2]!==void 0?Math.abs($u(f[2])):1,x=qF;c<a&&(g*=-1,x=HF);let E=f.some($F);d=[];for(let C=a;x(C,c);C+=g){let A;if(l)A=String.fromCharCode(C),A==="\\"&&(A="");else if(A=String(C),E){let O=h-A.length;if(O>0){let P=new Array(O+1).join("0");C<0?A="-"+P+A.slice(1):A=P+A}}d.push(A)}}else{d=[];for(let a=0;a<f.length;a++)d.push.apply(d,on(f[a],t,!1))}for(let a=0;a<d.length;a++)for(let c=0;c<s.length&&i.length<t;c++){let h=o+d[a]+s[c];(!r||m||h)&&i.push(h)}}return i}});var Gg=w(to=>{"use strict";y();Object.defineProperty(to,"__esModule",{value:!0});to.assertValidPattern=void 0;var UF=1024*64,WF=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>UF)throw new TypeError("pattern is too long")};to.assertValidPattern=WF});var Xg=w(ro=>{"use strict";y();Object.defineProperty(ro,"__esModule",{value:!0});ro.parseClass=void 0;var zF={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},an=e=>e.replace(/[[\]\\-]/g,"\\$&"),JF=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Vg=e=>e.join(""),GF=(e,t)=>{let r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let i=[],n=[],o=r+1,s=!1,u=!1,l=!1,m=!1,p=r,f="";e:for(;o<e.length;){let h=e.charAt(o);if((h==="!"||h==="^")&&o===r+1){m=!0,o++;continue}if(h==="]"&&s&&!l){p=o+1;break}if(s=!0,h==="\\"&&!l){l=!0,o++;continue}if(h==="["&&!l){for(let[g,[x,v,E]]of Object.entries(zF))if(e.startsWith(g,o)){if(f)return["$.",!1,e.length-r,!0];o+=g.length,E?n.push(x):i.push(x),u=u||v;continue e}}if(l=!1,f){h>f?i.push(an(f)+"-"+an(h)):h===f&&i.push(an(h)),f="",o++;continue}if(e.startsWith("-]",o+1)){i.push(an(h+"-")),o+=2;continue}if(e.startsWith("-",o+1)){f=h,o+=2;continue}i.push(an(h)),o++}if(p<o)return["",!1,0,!1];if(!i.length&&!n.length)return["$.",!1,e.length-r,!0];if(n.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!m){let h=i[0].length===2?i[0].slice(-1):i[0];return[JF(h),!1,p-r,!1]}let d="["+(m?"^":"")+Vg(i)+"]",a="["+(m?"":"^")+Vg(n)+"]";return[i.length&&n.length?"("+d+"|"+a+")":i.length?d:a,u,p-r,!0]};ro.parseClass=GF});var no=w(io=>{"use strict";y();Object.defineProperty(io,"__esModule",{value:!0});io.unescape=void 0;var VF=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");io.unescape=VF});var Wu=w(uo=>{"use strict";y();var Ne;Object.defineProperty(uo,"__esModule",{value:!0});uo.AST=void 0;var XF=Xg(),so=no(),YF=new Set(["!","?","+","*","@"]),Hu=e=>YF.has(e),Yg=e=>Hu(e.type),KF=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),QF=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),ZF=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),Kg=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),eT="(?!(?:^|/)\\.\\.?(?:$|/))",oo="(?!\\.)",tT=new Set(["[","."]),rT=new Set(["..","."]),iT=new Set("().*{}+?[]^$\\!"),nT=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Uu="[^/]",Qg=Uu+"*?",Zg=Uu+"+?",ao=class{type;#r;#i;#n=!1;#e=[];#t;#a;#c;#u=!1;#s;#o;#l=!1;constructor(t,r,i={}){this.type=t,t&&(this.#i=!0),this.#t=r,this.#r=this.#t?this.#t.#r:this,this.#s=this.#r===this?i:this.#r.#s,this.#c=this.#r===this?[]:this.#r.#c,t==="!"&&!this.#r.#u&&this.#c.push(this),this.#a=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#i!==void 0)return this.#i;for(let t of this.#e)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#i=!0;return this.#i}toString(){return this.#o!==void 0?this.#o:this.type?this.#o=this.type+"("+this.#e.map(t=>String(t)).join("|")+")":this.#o=this.#e.map(t=>String(t)).join("")}#y(){if(this!==this.#r)throw new Error("should only call on root");if(this.#u)return this;this.toString(),this.#u=!0;let t;for(;t=this.#c.pop();){if(t.type!=="!")continue;let r=t,i=r.#t;for(;i;){for(let n=r.#a+1;!i.type&&n<i.#e.length;n++)for(let o of t.#e){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(i.#e[n])}r=i,i=r.#t}}return this}push(...t){for(let r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof Ne&&r.#t===this))throw new Error("invalid part: "+r);this.#e.push(r)}}toJSON(){let t=this.type===null?this.#e.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#e.map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#r||this.#r.#u&&this.#t?.type==="!")&&t.push({}),t}isStart(){if(this.#r===this)return!0;if(!this.#t?.isStart())return!1;if(this.#a===0)return!0;let t=this.#t;for(let r=0;r<this.#a;r++){let i=t.#e[r];if(!(i instanceof Ne&&i.type==="!"))return!1}return!0}isEnd(){if(this.#r===this||this.#t?.type==="!")return!0;if(!this.#t?.isEnd())return!1;if(!this.type)return this.#t?.isEnd();let t=this.#t?this.#t.#e.length:0;return this.#a===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let r=new Ne(this.type,t);for(let i of this.#e)r.copyIn(i);return r}static#h(t,r,i,n,o){let s=n.maxExtglobRecursion??2,u=!1,l=!1,m=-1,p=!1;if(r.type===null){let h=i,g="";for(;h<t.length;){let x=t.charAt(h++);if(u||x==="\\"){u=!u,g+=x;continue}if(l){h===m+1?(x==="^"||x==="!")&&(p=!0):x==="]"&&!(h===m+2&&p)&&(l=!1),g+=x;continue}else if(x==="["){l=!0,m=h,p=!1,g+=x;continue}if(!n.noext&&Hu(x)&&t.charAt(h)==="("&&o<=s){r.push(g),g="";let E=new Ne(x,r);h=Ne.#h(t,E,h,n,o+1),r.push(E);continue}g+=x}return r.push(g),h}let f=i+1,d=new Ne(null,r),a=[],c="";for(;f<t.length;){let h=t.charAt(f++);if(u||h==="\\"){u=!u,c+=h;continue}if(l){f===m+1?(h==="^"||h==="!")&&(p=!0):h==="]"&&!(f===m+2&&p)&&(l=!1),c+=h;continue}else if(h==="["){l=!0,m=f,p=!1,c+=h;continue}if(Hu(h)&&t.charAt(f)==="("&&(o<=s||r&&r.#f(h))){let x=r&&r.#f(h)?0:1;d.push(c),c="";let v=new Ne(h,d);d.push(v),f=Ne.#h(t,v,f,n,o+x);continue}if(h==="|"){d.push(c),c="",a.push(d),d=new Ne(null,r);continue}if(h===")")return c===""&&r.#e.length===0&&(r.#l=!0),d.push(c),c="",r.push(...a,d),f;c+=h}return r.type=null,r.#i=void 0,r.#e=[t.substring(i-1)],f}#x(t){return this.#d(t,QF)}#d(t,r=KF){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null)return!1;let i=t.#e[0];return!i||typeof i!="object"||i.type===null?!1:this.#f(i.type,r)}#f(t,r=ZF){return!!r.get(this.type)?.includes(t)}#v(t,r){let i=t.#e[0],n=new Ne(null,i,this.options);n.#e.push(""),i.push(n),this.#m(t,r)}#m(t,r){let i=t.#e[0];this.#e.splice(r,1,...i.#e);for(let n of i.#e)typeof n=="object"&&(n.#t=this);this.#o=void 0}#w(t){return!!Kg.get(this.type)?.has(t)}#E(t){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let r=t.#e[0];return!r||typeof r!="object"||r.type===null?!1:this.#w(r.type)}#b(t){let r=Kg.get(this.type),i=t.#e[0],n=r?.get(i.type);if(!n)return!1;this.#e=i.#e;for(let o of this.#e)typeof o=="object"&&(o.#t=this);this.type=n,this.#o=void 0,this.#l=!1}#p(){if(Yg(this)){let t=0,r=!1;do{r=!0;for(let i=0;i<this.#e.length;i++){let n=this.#e[i];typeof n=="object"&&(n.#p(),this.#d(n)?(r=!1,this.#m(n,i)):this.#x(n)?(r=!1,this.#v(n,i)):this.#E(n)&&(r=!1,this.#b(n)))}}while(!r&&++t<10)}else for(let t of this.#e)typeof t=="object"&&t.#p();this.#o=void 0}static fromGlob(t,r={}){let i=new Ne(null,void 0,r);return Ne.#h(t,i,0,r,0),i}toMMPattern(){if(this!==this.#r)return this.#r.toMMPattern();let t=this.toString(),[r,i,n,o]=this.toRegExpSource();if(!(n||this.#i||this.#s.nocase&&!this.#s.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return i;let u=(this.#s.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${r}$`,u),{_src:r,_glob:t})}get options(){return this.#s}toRegExpSource(t){let r=t??!!this.#s.dot;if(this.#r===this&&(this.#p(),this.#y()),!Yg(this)){let l=this.isStart()&&this.isEnd(),m=this.#e.map(a=>{let[c,h,g,x]=typeof a=="string"?Ne.#C(a,this.#i,l):a.toRegExpSource(t);return this.#i=this.#i||g,this.#n=this.#n||x,c}).join(""),p="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&rT.has(this.#e[0]))){let c=tT,h=r&&c.has(m.charAt(0))||m.startsWith("\\.")&&c.has(m.charAt(2))||m.startsWith("\\.\\.")&&c.has(m.charAt(4)),g=!r&&!t&&c.has(m.charAt(0));p=h?eT:g?oo:""}let f="";return this.isEnd()&&this.#r.#u&&this.#t?.type==="!"&&(f="(?:$|\\/)"),[p+m+f,(0,so.unescape)(m),this.#i=!!this.#i,this.#n]}let i=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",o=this.#g(r);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){let l=this.toString(),m=this;return m.#e=[l],m.type=null,m.#i=void 0,[l,(0,so.unescape)(this.toString()),!1,!1]}let s=!i||t||r||!oo?"":this.#g(!0);s===o&&(s=""),s&&(o=`(?:${o})(?:${s})*?`);let u="";if(this.type==="!"&&this.#l)u=(this.isStart()&&!r?oo:"")+Zg;else{let l=this.type==="!"?"))"+(this.isStart()&&!r&&!t?oo:"")+Qg+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&s?")":this.type==="*"&&s?")?":`)${this.type}`;u=n+o+l}return[u,(0,so.unescape)(o),this.#i=!!this.#i,this.#n]}#g(t){return this.#e.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[i,n,o,s]=r.toRegExpSource(t);return this.#n=this.#n||s,i}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#C(t,r,i=!1){let n=!1,o="",s=!1,u=!1;for(let l=0;l<t.length;l++){let m=t.charAt(l);if(n){n=!1,o+=(iT.has(m)?"\\":"")+m,u=!1;continue}if(m==="\\"){l===t.length-1?o+="\\\\":n=!0;continue}if(m==="["){let[p,f,d,a]=(0,XF.parseClass)(t,l);if(d){o+=p,s=s||f,l+=d-1,r=r||a,u=!1;continue}}if(m==="*"){if(u)continue;u=!0,o+=i&&/^[*]+$/.test(t)?Zg:Qg,r=!0;continue}else u=!1;if(m==="?"){o+=Uu,r=!0;continue}o+=nT(m)}return[o,(0,so.unescape)(t),!!r,s]}};uo.AST=ao;Ne=ao});var zu=w(co=>{"use strict";y();Object.defineProperty(co,"__esModule",{value:!0});co.escape=void 0;var sT=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");co.escape=sT});var o0=w(k=>{"use strict";y();Object.defineProperty(k,"__esModule",{value:!0});k.unescape=k.escape=k.AST=k.Minimatch=k.match=k.makeRe=k.braceExpand=k.defaults=k.filter=k.GLOBSTAR=k.sep=k.minimatch=void 0;var oT=Jg(),lo=Gg(),r0=Wu(),aT=zu(),uT=no(),cT=(e,t,r={})=>((0,lo.assertValidPattern)(t),!r.nocomment&&t.charAt(0)==="#"?!1:new Dr(t,r).match(e));k.minimatch=cT;var lT=/^\*+([^+@!?\*\[\(]*)$/,hT=e=>t=>!t.startsWith(".")&&t.endsWith(e),fT=e=>t=>t.endsWith(e),pT=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),dT=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),mT=/^\*+\.\*+$/,gT=e=>!e.startsWith(".")&&e.includes("."),yT=e=>e!=="."&&e!==".."&&e.includes("."),xT=/^\.\*+$/,vT=e=>e!=="."&&e!==".."&&e.startsWith("."),wT=/^\*+$/,ET=e=>e.length!==0&&!e.startsWith("."),bT=e=>e.length!==0&&e!=="."&&e!=="..",CT=/^\?+([^+@!?\*\[\(]*)?$/,DT=([e,t=""])=>{let r=i0([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},AT=([e,t=""])=>{let r=n0([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},_T=([e,t=""])=>{let r=n0([e]);return t?i=>r(i)&&i.endsWith(t):r},ST=([e,t=""])=>{let r=i0([e]);return t?i=>r(i)&&i.endsWith(t):r},i0=([e])=>{let t=e.length;return r=>r.length===t&&!r.startsWith(".")},n0=([e])=>{let t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},s0=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",e0={win32:{sep:"\\"},posix:{sep:"/"}};k.sep=s0==="win32"?e0.win32.sep:e0.posix.sep;k.minimatch.sep=k.sep;k.GLOBSTAR=Symbol("globstar **");k.minimatch.GLOBSTAR=k.GLOBSTAR;var FT="[^/]",TT=FT+"*?",OT="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",kT="(?:(?!(?:\\/|^)\\.).)*?",PT=(e,t={})=>r=>(0,k.minimatch)(r,e,t);k.filter=PT;k.minimatch.filter=k.filter;var Ve=(e,t={})=>Object.assign({},e,t),IT=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return k.minimatch;let t=k.minimatch;return Object.assign((i,n,o={})=>t(i,n,Ve(e,o)),{Minimatch:class extends t.Minimatch{constructor(n,o={}){super(n,Ve(e,o))}static defaults(n){return t.defaults(Ve(e,n)).Minimatch}},AST:class extends t.AST{constructor(n,o,s={}){super(n,o,Ve(e,s))}static fromGlob(n,o={}){return t.AST.fromGlob(n,Ve(e,o))}},unescape:(i,n={})=>t.unescape(i,Ve(e,n)),escape:(i,n={})=>t.escape(i,Ve(e,n)),filter:(i,n={})=>t.filter(i,Ve(e,n)),defaults:i=>t.defaults(Ve(e,i)),makeRe:(i,n={})=>t.makeRe(i,Ve(e,n)),braceExpand:(i,n={})=>t.braceExpand(i,Ve(e,n)),match:(i,n,o={})=>t.match(i,n,Ve(e,o)),sep:t.sep,GLOBSTAR:k.GLOBSTAR})};k.defaults=IT;k.minimatch.defaults=k.defaults;var NT=(e,t={})=>((0,lo.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,oT.expand)(e));k.braceExpand=NT;k.minimatch.braceExpand=k.braceExpand;var RT=(e,t={})=>new Dr(e,t).makeRe();k.makeRe=RT;k.minimatch.makeRe=k.makeRe;var MT=(e,t,r={})=>{let i=new Dr(t,r);return e=e.filter(n=>i.match(n)),i.options.nonull&&!e.length&&e.push(t),e};k.match=MT;k.minimatch.match=k.match;var t0=/[?*]|[+@!]\(.*?\)|\[|\]/,LT=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Dr=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,r={}){(0,lo.assertValidPattern)(t),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=t,this.platform=r.platform||s0,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((o,s,u)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=o[0]===""&&o[1]===""&&(o[2]==="?"||!t0.test(o[2]))&&!t0.test(o[3]),m=/^[a-z]:/i.test(o[0]);if(l)return[...o.slice(0,4),...o.slice(4).map(p=>this.parse(p))];if(m)return[o[0],...o.slice(1).map(p=>this.parse(p))]}return o.map(l=>this.parse(l))});if(this.debug(this.pattern,n),this.set=n.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){let s=this.set[o];s[0]===""&&s[1]===""&&this.globParts[o][2]==="?"&&typeof s[3]=="string"&&/^[a-z]:$/i.test(s[3])&&(s[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let i=0;i<t.length;i++)for(let n=0;n<t[i].length;n++)t[i][n]==="**"&&(t[i][n]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let n=i;for(;r[n+1]==="**";)n++;n!==i&&r.splice(i,n-i)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((i,n)=>{let o=i[i.length-1];return n==="**"&&o==="**"?i:n===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(i.pop(),i):(i.push(n),i)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){let o=t[n];n===1&&o===""&&t[0]===""||(o==="."||o==="")&&(r=!0,t.splice(n,1),n--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let i=0;for(;(i=t.indexOf("..",i+1))!==-1;){let n=t[i-1];n&&n!=="."&&n!==".."&&n!=="**"&&(r=!0,t.splice(i-1,2),i-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let i of t){let n=-1;for(;(n=i.indexOf("**",n+1))!==-1;){let s=n;for(;i[s+1]==="**";)s++;s>n&&i.splice(n+1,s-n);let u=i[n+1],l=i[n+2],m=i[n+3];if(u!==".."||!l||l==="."||l===".."||!m||m==="."||m==="..")continue;r=!0,i.splice(n,1);let p=i.slice(0);p[n]="**",t.push(p),n--}if(!this.preserveMultipleSlashes){for(let s=1;s<i.length-1;s++){let u=i[s];s===1&&u===""&&i[0]===""||(u==="."||u==="")&&(r=!0,i.splice(s,1),s--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(r=!0,i.pop())}let o=0;for(;(o=i.indexOf("..",o+1))!==-1;){let s=i[o-1];if(s&&s!=="."&&s!==".."&&s!=="**"){r=!0;let l=o===1&&i[o+1]==="**"?["."]:[];i.splice(o-1,2,...l),i.length===0&&i.push(""),o-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let i=r+1;i<t.length;i++){let n=this.partsMatch(t[r],t[i],!this.preserveMultipleSlashes);if(n){t[r]=[],t[i]=n;break}}return t.filter(r=>r.length)}partsMatch(t,r,i=!1){let n=0,o=0,s=[],u="";for(;n<t.length&&o<r.length;)if(t[n]===r[o])s.push(u==="b"?r[o]:t[n]),n++,o++;else if(i&&t[n]==="**"&&r[o]===t[n+1])s.push(t[n]),n++;else if(i&&r[o]==="**"&&t[n]===r[o+1])s.push(r[o]),o++;else if(t[n]==="*"&&r[o]&&(this.options.dot||!r[o].startsWith("."))&&r[o]!=="**"){if(u==="b")return!1;u="a",s.push(t[n]),n++,o++}else if(r[o]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(u==="a")return!1;u="b",s.push(r[o]),n++,o++}else return!1;return t.length===r.length&&s}parseNegate(){if(this.nonegate)return;let t=this.pattern,r=!1,i=0;for(let n=0;n<t.length&&t.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=t.slice(i)),this.negate=r}matchOne(t,r,i=!1){let n=0,o=0;if(this.isWindows){let u=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),l=!u&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),m=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),p=!m&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),f=l?3:u?0:void 0,d=p?3:m?0:void 0;if(typeof f=="number"&&typeof d=="number"){let[a,c]=[t[f],r[d]];a.toLowerCase()===c.toLowerCase()&&(r[d]=a,o=d,n=f)}}let{optimizationLevel:s=1}=this.options;return s>=2&&(t=this.levelTwoFileOptimize(t)),r.includes(k.GLOBSTAR)?this.#r(t,r,i,n,o):this.#n(t,r,i,n,o)}#r(t,r,i,n,o){let s=r.indexOf(k.GLOBSTAR,o),u=r.lastIndexOf(k.GLOBSTAR),[l,m,p]=i?[r.slice(o,s),r.slice(s+1),[]]:[r.slice(o,s),r.slice(s+1,u),r.slice(u+1)];if(l.length){let v=t.slice(n,n+l.length);if(!this.#n(v,l,i,0,0))return!1;n+=l.length}let f=0;if(p.length){if(p.length+n>t.length)return!1;let v=t.length-p.length;if(this.#n(t,p,i,v,0))f=p.length;else{if(t[t.length-1]!==""||n+p.length===t.length||(v--,!this.#n(t,p,i,v,0)))return!1;f=p.length+1}}if(!m.length){let v=!!f;for(let E=n;E<t.length-f;E++){let C=String(t[E]);if(v=!0,C==="."||C===".."||!this.options.dot&&C.startsWith("."))return!1}return i||v}let d=[[[],0]],a=d[0],c=0,h=[0];for(let v of m)v===k.GLOBSTAR?(h.push(c),a=[[],0],d.push(a)):(a[0].push(v),c++);let g=d.length-1,x=t.length-f;for(let v of d)v[1]=x-(h[g--]+v[0].length);return!!this.#i(t,d,n,0,i,0,!!f)}#i(t,r,i,n,o,s,u){let l=r[n];if(!l){for(let f=i;f<t.length;f++){u=!0;let d=t[f];if(d==="."||d===".."||!this.options.dot&&d.startsWith("."))return!1}return u}let[m,p]=l;for(;i<=p;){if(this.#n(t.slice(0,i+m.length),m,o,i,0)&&s<this.maxGlobstarRecursion){let a=this.#i(t,r,i+m.length,n+1,o,s+1,u);if(a!==!1)return a}let d=t[i];if(d==="."||d===".."||!this.options.dot&&d.startsWith("."))return!1;i++}return o||null}#n(t,r,i,n,o){let s,u,l,m;for(s=n,u=o,m=t.length,l=r.length;s<m&&u<l;s++,u++){this.debug("matchOne loop");let p=r[u],f=t[s];if(this.debug(r,p,f),p===!1||p===k.GLOBSTAR)return!1;let d;if(typeof p=="string"?(d=f===p,this.debug("string match",p,f,d)):(d=p.test(f),this.debug("pattern match",p,f,d)),!d)return!1}if(s===m&&u===l)return!0;if(s===m)return i;if(u===l)return s===m-1&&t[s]==="";throw new Error("wtf?")}braceExpand(){return(0,k.braceExpand)(this.pattern,this.options)}parse(t){(0,lo.assertValidPattern)(t);let r=this.options;if(t==="**")return k.GLOBSTAR;if(t==="")return"";let i,n=null;(i=t.match(wT))?n=r.dot?bT:ET:(i=t.match(lT))?n=(r.nocase?r.dot?dT:pT:r.dot?fT:hT)(i[1]):(i=t.match(CT))?n=(r.nocase?r.dot?AT:DT:r.dot?_T:ST)(i):(i=t.match(mT))?n=r.dot?yT:gT:(i=t.match(xT))&&(n=vT);let o=r0.AST.fromGlob(t,this.options).toMMPattern();return n&&typeof o=="object"&&Reflect.defineProperty(o,"test",{value:n}),o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let r=this.options,i=r.noglobstar?TT:r.dot?OT:kT,n=new Set(r.nocase?["i"]:[]),o=t.map(l=>{let m=l.map(p=>{if(p instanceof RegExp)for(let f of p.flags.split(""))n.add(f);return typeof p=="string"?LT(p):p===k.GLOBSTAR?k.GLOBSTAR:p._src});return m.forEach((p,f)=>{let d=m[f+1],a=m[f-1];p!==k.GLOBSTAR||a===k.GLOBSTAR||(a===void 0?d!==void 0&&d!==k.GLOBSTAR?m[f+1]="(?:\\/|"+i+"\\/)?"+d:m[f]=i:d===void 0?m[f-1]=a+"(?:\\/|"+i+")?":d!==k.GLOBSTAR&&(m[f-1]=a+"(?:\\/|\\/"+i+"\\/)"+d,m[f+1]=k.GLOBSTAR))}),m.filter(p=>p!==k.GLOBSTAR).join("/")}).join("|"),[s,u]=t.length>1?["(?:",")"]:["",""];o="^"+s+o+u+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;let i=this.options;this.isWindows&&(t=t.split("\\").join("/"));let n=this.slashSplit(t);this.debug(this.pattern,"split",n);let o=this.set;this.debug(this.pattern,"set",o);let s=n[n.length-1];if(!s)for(let u=n.length-2;!s&&u>=0;u--)s=n[u];for(let u=0;u<o.length;u++){let l=o[u],m=n;if(i.matchBase&&l.length===1&&(m=[s]),this.matchOne(m,l,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(t){return k.minimatch.defaults(t).Minimatch}};k.Minimatch=Dr;var BT=Wu();Object.defineProperty(k,"AST",{enumerable:!0,get:function(){return BT.AST}});var jT=zu();Object.defineProperty(k,"escape",{enumerable:!0,get:function(){return jT.escape}});var $T=no();Object.defineProperty(k,"unescape",{enumerable:!0,get:function(){return $T.unescape}});k.minimatch.AST=r0.AST;k.minimatch.Minimatch=Dr;k.minimatch.escape=aT.escape;k.minimatch.unescape=uT.unescape});var u0=w((kj,a0)=>{"use strict";y();a0.exports=(...e)=>[...new Set([].concat(...e))]});var l0=w(Ar=>{"use strict";y();var{promisify:qT}=S("util"),c0=S("fs");async function Ju(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await qT(c0[e])(r))[t]()}catch(i){if(i.code==="ENOENT")return!1;throw i}}function Gu(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return c0[e](r)[t]()}catch(i){if(i.code==="ENOENT")return!1;throw i}}Ar.isFile=Ju.bind(null,"stat","isFile");Ar.isDirectory=Ju.bind(null,"stat","isDirectory");Ar.isSymlink=Ju.bind(null,"lstat","isSymbolicLink");Ar.isFileSync=Gu.bind(null,"statSync","isFile");Ar.isDirectorySync=Gu.bind(null,"statSync","isDirectory");Ar.isSymlinkSync=Gu.bind(null,"lstatSync","isSymbolicLink")});var m0=w((Rj,Vu)=>{"use strict";y();var _r=S("path"),h0=l0(),f0=e=>e.length>1?`{${e.join(",")}}`:e[0],p0=(e,t)=>{let r=e[0]==="!"?e.slice(1):e;return _r.isAbsolute(r)?r:_r.join(t,r)},HT=(e,t)=>_r.extname(e)?`**/${e}`:`**/${e}.${f0(t)}`,d0=(e,t)=>{if(t.files&&!Array.isArray(t.files))throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof t.files}\``);if(t.extensions&&!Array.isArray(t.extensions))throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof t.extensions}\``);return t.files&&t.extensions?t.files.map(r=>_r.posix.join(e,HT(r,t.extensions))):t.files?t.files.map(r=>_r.posix.join(e,`**/${r}`)):t.extensions?[_r.posix.join(e,`**/*.${f0(t.extensions)}`)]:[_r.posix.join(e,"**")]};Vu.exports=async(e,t)=>{if(t={cwd:process.cwd(),...t},typeof t.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);let r=await Promise.all([].concat(e).map(async i=>await h0.isDirectory(p0(i,t.cwd))?d0(i,t):i));return[].concat.apply([],r)};Vu.exports.sync=(e,t)=>{if(t={cwd:process.cwd(),...t},typeof t.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);let r=[].concat(e).map(i=>h0.isDirectorySync(p0(i,t.cwd))?d0(i,t):i);return[].concat.apply([],r)}});var D0=w((Lj,C0)=>{y();function g0(e){return Array.isArray(e)?e:[e]}var Ku="",y0=" ",Xu="\\",UT=/^\s+$/,WT=/(?:[^\\]|^)\\$/,zT=/^\\!/,JT=/^\\#/,GT=/\r?\n/g,VT=/^\.*\/|^\.+$/,Yu="/",w0="node-ignore";typeof Symbol<"u"&&(w0=Symbol.for("node-ignore"));var x0=w0,XT=(e,t,r)=>Object.defineProperty(e,t,{value:r}),YT=/([0-z])-([0-z])/g,E0=()=>!1,KT=e=>e.replace(YT,(t,r,i)=>r.charCodeAt(0)<=i.charCodeAt(0)?t:Ku),QT=e=>{let{length:t}=e;return e.slice(0,t-t%2)},ZT=[[/^\uFEFF/,()=>Ku],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,r)=>t+(r.indexOf("\\")===0?y0:Ku)],[/(\\+?)\s/g,(e,t)=>{let{length:r}=t;return t.slice(0,r-r%2)+y0}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,r)=>t+6<r.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,r)=>{let i=r.replace(/\\\*/g,"[^\\/]*");return t+i}],[/\\\\\\(?=[$.|*+(){^])/g,()=>Xu],[/\\\\/g,()=>Xu],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,r,i,n)=>t===Xu?`\\[${r}${QT(i)}${n}`:n==="]"&&i.length%2===0?`[${KT(r)}${i}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:"[^/]*"}(?=$|\\/$)`]],v0=Object.create(null),eO=(e,t)=>{let r=v0[e];return r||(r=ZT.reduce((i,[n,o])=>i.replace(n,o.bind(e)),e),v0[e]=r),t?new RegExp(r,"i"):new RegExp(r)},ec=e=>typeof e=="string",tO=e=>e&&ec(e)&&!UT.test(e)&&!WT.test(e)&&e.indexOf("#")!==0,rO=e=>e.split(GT),Qu=class{constructor(t,r,i,n){this.origin=t,this.pattern=r,this.negative=i,this.regex=n}},iO=(e,t)=>{let r=e,i=!1;e.indexOf("!")===0&&(i=!0,e=e.substr(1)),e=e.replace(zT,"!").replace(JT,"#");let n=eO(e,t);return new Qu(r,e,i,n)},nO=(e,t)=>{throw new t(e)},Ft=(e,t,r)=>ec(e)?e?Ft.isNotRelative(e)?r(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:r("path must not be empty",TypeError):r(`path must be a string, but got \`${t}\``,TypeError),b0=e=>VT.test(e);Ft.isNotRelative=b0;Ft.convert=e=>e;var Zu=class{constructor({ignorecase:t=!0,ignoreCase:r=t,allowRelativePaths:i=!1}={}){XT(this,x0,!0),this._rules=[],this._ignoreCase=r,this._allowRelativePaths=i,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[x0]){this._rules=this._rules.concat(t._rules),this._added=!0;return}if(tO(t)){let r=iO(t,this._ignoreCase);this._added=!0,this._rules.push(r)}}add(t){return this._added=!1,g0(ec(t)?rO(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,r){let i=!1,n=!1;return this._rules.forEach(o=>{let{negative:s}=o;if(n===s&&i!==n||s&&!i&&!n&&!r)return;o.regex.test(t)&&(i=!s,n=s)}),{ignored:i,unignored:n}}_test(t,r,i,n){let o=t&&Ft.convert(t);return Ft(o,t,this._allowRelativePaths?E0:nO),this._t(o,r,i,n)}_t(t,r,i,n){if(t in r)return r[t];if(n||(n=t.split(Yu)),n.pop(),!n.length)return r[t]=this._testOne(t,i);let o=this._t(n.join(Yu)+Yu,r,i,n);return r[t]=o.ignored?o:this._testOne(t,i)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return g0(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}},ho=e=>new Zu(e),sO=e=>Ft(e&&Ft.convert(e),e,E0);ho.isPathValid=sO;ho.default=ho;C0.exports=ho;if(typeof process<"u"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let e=r=>/^\\\\\?\\/.test(r)||/["<>|\u0000-\u001F]+/u.test(r)?r:r.replace(/\\/g,"/");Ft.convert=e;let t=/^[a-z]:\//i;Ft.isNotRelative=r=>t.test(r)||b0(r)}});var _0=w((jj,A0)=>{"use strict";y();A0.exports=e=>{let t=/^\\\\\?\\/.test(e),r=/[^\u0000-\u0080]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}});var I0=w((qj,tc)=>{"use strict";y();var{promisify:oO}=S("util"),S0=S("fs"),Tt=S("path"),F0=Fl(),aO=D0(),un=_0(),T0=["**/node_modules/**","**/flow-typed/**","**/coverage/**","**/.git"],uO=oO(S0.readFile),cO=e=>t=>t.startsWith("!")?"!"+Tt.posix.join(e,t.slice(1)):Tt.posix.join(e,t),lO=(e,t)=>{let r=un(Tt.relative(t.cwd,Tt.dirname(t.fileName)));return e.split(/\r?\n/).filter(Boolean).filter(i=>!i.startsWith("#")).map(cO(r))},O0=e=>{let t=aO();for(let r of e)t.add(lO(r.content,{cwd:r.cwd,fileName:r.filePath}));return t},hO=(e,t)=>{if(e=un(e),Tt.isAbsolute(t)){if(un(t).startsWith(e))return t;throw new Error(`Path ${t} is not in cwd ${e}`)}return Tt.join(e,t)},k0=(e,t)=>r=>e.ignores(un(Tt.relative(t,hO(t,r.path||r)))),fO=async(e,t)=>{let r=Tt.join(t,e),i=await uO(r,"utf8");return{cwd:t,filePath:r,content:i}},pO=(e,t)=>{let r=Tt.join(t,e),i=S0.readFileSync(r,"utf8");return{cwd:t,filePath:r,content:i}},P0=({ignore:e=[],cwd:t=un(process.cwd())}={})=>({ignore:e,cwd:t});tc.exports=async e=>{e=P0(e);let t=await F0("**/.gitignore",{ignore:T0.concat(e.ignore),cwd:e.cwd}),r=await Promise.all(t.map(n=>fO(n,e.cwd))),i=O0(r);return k0(i,e.cwd)};tc.exports.sync=e=>{e=P0(e);let r=F0.sync("**/.gitignore",{ignore:T0.concat(e.ignore),cwd:e.cwd}).map(n=>pO(n,e.cwd)),i=O0(r);return k0(i,e.cwd)}});var R0=w((Uj,N0)=>{"use strict";y();var{Transform:dO}=S("stream"),fo=class extends dO{constructor(){super({objectMode:!0})}},rc=class extends fo{constructor(t){super(),this._filter=t}_transform(t,r,i){this._filter(t)&&this.push(t),i()}},ic=class extends fo{constructor(){super(),this._pushed=new Set}_transform(t,r,i){this._pushed.has(t)||(this.push(t),this._pushed.add(t)),i()}};N0.exports={FilterStream:rc,UniqueStream:ic}});var $0=w((zj,Sr)=>{"use strict";y();var L0=S("fs"),po=u0(),mO=Iv(),mo=Fl(),go=m0(),nc=I0(),{FilterStream:gO,UniqueStream:yO}=R0(),B0=()=>!1,M0=e=>e[0]==="!",xO=e=>{if(!e.every(t=>typeof t=="string"))throw new TypeError("Patterns must be a string or an array of strings")},vO=(e={})=>{if(!e.cwd)return;let t;try{t=L0.statSync(e.cwd)}catch{return}if(!t.isDirectory())throw new Error("The `cwd` option must be a path to a directory")},wO=e=>e.stats instanceof L0.Stats?e.path:e,yo=(e,t)=>{e=po([].concat(e)),xO(e),vO(t);let r=[];t={ignore:[],expandDirectories:!0,...t};for(let[i,n]of e.entries()){if(M0(n))continue;let o=e.slice(i).filter(u=>M0(u)).map(u=>u.slice(1)),s={...t,ignore:t.ignore.concat(o)};r.push({pattern:n,options:s})}return r},EO=(e,t)=>{let r={};return e.options.cwd&&(r.cwd=e.options.cwd),Array.isArray(e.options.expandDirectories)?r={...r,files:e.options.expandDirectories}:typeof e.options.expandDirectories=="object"&&(r={...r,...e.options.expandDirectories}),t(e.pattern,r)},sc=(e,t)=>e.options.expandDirectories?EO(e,t):[e.pattern],j0=e=>e&&e.gitignore?nc.sync({cwd:e.cwd,ignore:e.ignore}):B0,oc=e=>t=>{let{options:r}=e;return r.ignore&&Array.isArray(r.ignore)&&r.expandDirectories&&(r.ignore=go.sync(r.ignore)),{pattern:t,options:r}};Sr.exports=async(e,t)=>{let r=yo(e,t),i=async()=>t&&t.gitignore?nc({cwd:t.cwd,ignore:t.ignore}):B0,n=async()=>{let l=await Promise.all(r.map(async m=>{let p=await sc(m,go);return Promise.all(p.map(oc(m)))}));return po(...l)},[o,s]=await Promise.all([i(),n()]),u=await Promise.all(s.map(l=>mo(l.pattern,l.options)));return po(...u).filter(l=>!o(wO(l)))};Sr.exports.sync=(e,t)=>{let r=yo(e,t),i=[];for(let s of r){let u=sc(s,go.sync).map(oc(s));i.push(...u)}let n=j0(t),o=[];for(let s of i)o=po(o,mo.sync(s.pattern,s.options));return o.filter(s=>!n(s))};Sr.exports.stream=(e,t)=>{let r=yo(e,t),i=[];for(let u of r){let l=sc(u,go.sync).map(oc(u));i.push(...l)}let n=j0(t),o=new gO(u=>!n(u)),s=new yO;return mO(i.map(u=>mo.stream(u.pattern,u.options))).pipe(o).pipe(s)};Sr.exports.generateGlobTasks=yo;Sr.exports.hasMagic=(e,t)=>[].concat(e).some(r=>mo.isDynamicPattern(r,t));Sr.exports.gitignore=nc});var ac=w(xo=>{"use strict";y();Object.defineProperty(xo,"__esModule",{value:!0});xo.aggregateFlags=void 0;var bO=Ws(),CO=(0,bO.boolean)({description:"Format output as json.",helpGroup:"GLOBAL"});function DO(e,t,r){let i={...t,...e};return r?{json:CO,...i}:i}xo.aggregateFlags=DO});var U0=w(vo=>{"use strict";y();Object.defineProperty(vo,"__esModule",{value:!0});vo.cacheCommand=void 0;var AO=ac(),q0=La(),_O=ms(),SO=le();function H0(e,t){let r=Object.getPrototypeOf(t),i=(0,SO.pickBy)(r,n=>n!==void 0);return Object.keys(r).length>0?H0({...i,...e},r):e}async function FO(e,t){let r=Object.entries(e).map(async([i,n])=>[i,{aliases:n.aliases,char:n.char,charAliases:n.charAliases,dependsOn:n.dependsOn,deprecateAliases:n.deprecateAliases,deprecated:n.deprecated,description:n.description,env:n.env,exclusive:n.exclusive,helpGroup:n.helpGroup,helpLabel:n.helpLabel,hidden:n.hidden,name:i,noCacheDefault:n.noCacheDefault,relationships:n.relationships,required:n.required,summary:n.summary,...n.type==="boolean"?{allowNo:n.allowNo,type:n.type}:{default:await(0,q0.cacheDefaultValue)(n,t),delimiter:n.delimiter,hasDynamicHelp:typeof n.defaultHelp=="function",helpValue:n.helpValue,multiple:n.multiple,options:n.options,type:n.type}}]);return Object.fromEntries(await Promise.all(r))}async function TO(e,t){let r=Object.entries(e).map(async([i,n])=>[i,{default:await(0,q0.cacheDefaultValue)(n,t),description:n.description,hidden:n.hidden,name:i,noCacheDefault:n.noCacheDefault,options:n.options,required:n.required}]);return Object.fromEntries(await Promise.all(r))}async function OO(e,t,r=!1){let i=H0(e,e),n=i.flags??i._flags,o=i.baseFlags??i._baseFlags,[s,u]=await Promise.all([await FO((0,AO.aggregateFlags)(n,o,i.enableJsonFlag),r),await TO((0,_O.ensureArgObject)(i.args),r)]),l={aliases:i.aliases??[],args:u,deprecateAliases:i.deprecateAliases,deprecationOptions:i.deprecationOptions,description:i.description,examples:i.examples??i.example,flags:s,hasDynamicHelp:Object.values(s).some(a=>a.hasDynamicHelp),hidden:i.hidden,hiddenAliases:i.hiddenAliases??[],id:i.id,pluginAlias:t&&t.alias,pluginName:t&&t.name,pluginType:t&&t.type,state:i.state,strict:i.strict,summary:i.summary,usage:i.usage},m=["plugin","_flags","_enableJsonFlag","_globalFlags","_baseFlags","baseFlags","_--","_base"],p=new Set([...Object.keys(l),...m]),f=Object.keys(i).filter(a=>!p.has(a)),d=Object.fromEntries(f.map(a=>[a,i[a]]));return{...l,...d}}vo.cacheCommand=OO});var z0=w(di=>{"use strict";y();var kO=di&&di.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(di,"__esModule",{value:!0});di.findRoot=void 0;var PO=kO(ut()),Re=S("node:path"),wo=Dt(),He=(0,PO.default)("find-root");function*uc(e){for(;(0,Re.dirname)(e)!==e;)yield e,e=(0,Re.dirname)(e);yield e}async function W0(e,t){if(He.extend(t??"root-plugin")(`Finding root starting at ${e}`),t){for(let r of uc(e))if(r.endsWith((0,Re.basename)(t)))return He.extend(t)("Found root based on plugin name!"),r}for(let r of uc(e))if(!((0,Re.basename)((0,Re.dirname)(r))==="bin"&&["dev","dev.cmd","dev.js","run","run.cmd","run.js"].includes((0,Re.basename)(r))))try{let i=(0,Re.join)(r,"package.json");if(He.extend(t??"root-plugin")(`Checking ${i}`),await(0,wo.safeReadJson)(i))return He.extend(t??"root-plugin")("Found root by traversing up from starting point!"),(0,Re.dirname)(i)}catch{}}async function IO(e,t){He.extend(e??"root-plugin")("Finding root using legacy method");for(let r of uc(t)){let i;if(e){if(i=(0,Re.join)(r,"node_modules",e,"package.json"),await(0,wo.safeReadJson)(i))return(0,Re.dirname)(i);if((await(0,wo.safeReadJson)((0,Re.join)(r,"package.json")))?.name===e)return r}else if(i=(0,Re.join)(r,"package.json"),await(0,wo.safeReadJson)(i))return(0,Re.dirname)(i)}}var Vt;function NO(e){if(Vt)return Vt;try{return Vt=S(S.resolve("pnpapi",{paths:[e]})),Vt}catch{}}var cc=e=>JSON.stringify(e),RO=(e,t,r)=>cc(e?.packageDependencies.get(r))===cc(t?.packageDependencies.get(r));function MO(e,t){if(NO(t),!Vt)return;He.extend(e)("Finding root for using pnp method");let r=new Set,i=(n,o)=>{let s=cc(n);if(r.has(s))return;let u=Vt.getPackageInformation(n);if(n.name===e)return u.packageLocation;r.add(s);for(let[l,m]of u.packageDependencies){if(m===null||o!==null&&RO(u,o,l))continue;let p=Vt.getLocator(l,m),f=i(p,u);if(f)return f}r.delete(s)};for(let n of Vt.getDependencyTreeRoots()){let o=i(n);if(o)return o}}async function LO(e,t){if(e){He.extend(e)(`Finding root using ${t}`);let i;try{i=S.resolve(e,{paths:[t]}),He.extend(e)("Found starting point with require.resolve")}catch{He.extend(e)("require.resolve could not find plugin starting point")}if(i){let o=await W0((0,Re.dirname)(i),e);if(o)return He.extend(e)(`Found root at ${o}`),o}let n=process.versions.pnp?MO(e,t):await IO(e,t);return He.extend(e)(n?`Found root at ${n}`:"No root found!"),n}He.extend("root-plugin")(`Finding root plugin using ${t}`);let r=await W0(t);return He.extend("root-plugin")(r?`Found root at ${r}`:"No root found!"),r}di.findRoot=LO});var pc=w(yi=>{"use strict";y();var Q0=yi&&yi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yi,"__esModule",{value:!0});yi.Plugin=void 0;var BO=Q0($0()),gi=S("node:path"),J0=S("node:util"),jO=Q0(it()),cn=Ge(),Eo=ji(),mi=hi(),Z0=fs(),$O=U0(),qO=z0(),G0=Dt(),V0=le(),lc=Gr(),bo=Jr(),X0=jO.default.getInstance().get("@oclif/core");function hc(e,t){return e?(t=t?`${t}:`:"",Array.isArray(e)?[...e,e.flatMap(r=>hc(r.subtopics,`${t}${r.name}`))]:Object.keys(e).flatMap(r=>(e[r].name=r,[{...e[r],name:`${t}${r}`},...hc(e[r].subtopics,`${t}${e[r].name}`)]))):[]}var HO=(e,t)=>!!(e?.commands[t]&&"isESM"in e.commands[t]&&"relativePath"in e.commands[t]),Y0=e=>typeof e.run=="function"?e:e.default&&e.default.run?e.default:Object.values(e).find(t=>typeof t.run=="function"),K0=e=>{if(e&&typeof e.run=="function")return e},ey=["**/*.+(js|cjs|mjs|ts|tsx|mts|cts)","!**/*.+(d.ts|test.ts|test.js|spec.ts|spec.js|d.mts|d.cts)?(x)"];function UO(e){return e.map(t=>{let r=(0,gi.parse)(t),i=r.dir.split("/"),n=r.name!=="index"&&r.name,o=[...i,n].filter(Boolean).join(":");return o===""?Z0.SINGLE_COMMAND_CLI_SYMBOL:o})}function WO(e,t){if(e){if(typeof e=="string"&&t)return{strategy:"single",target:e};if(typeof e=="string")return{globPatterns:ey,strategy:"pattern",target:e};if(!e.target)throw new cn.CLIError("`oclif.commandDiscovery.target` is required.");if(!e.strategy)throw new cn.CLIError("`oclif.commandDiscovery.strategy` is required.");return e.strategy==="explicit"&&!e.identifier&&(e.identifier="default"),e}}function zO(e){return typeof e=="string"?{identifier:"default",target:e}:e.identifier?e:{...e,identifier:"default"}}var fc=class{options;alias;alreadyLoaded=!1;children=[];commandIDs=[];commands;commandsDir;hasManifest=!1;hooks;isRoot=!1;manifest;moduleType;name;parent;pjson;root;tag;type;valid=!1;version;_base=`${X0.name}@${X0.version}`;_debug=(0,bo.Debug)();commandCache;commandDiscoveryOpts;flexibleTaxonomy;constructor(t){this.options=t}get topics(){return hc(this.pjson.oclif.topics||{})}async findCommand(t,r={}){let i=mi.Performance.mark(mi.OCLIF_MARKER_OWNER,`plugin.findCommand#${this.name}.${t}`,{id:t,plugin:this.name}),o=await(async()=>{if(this.commandDiscoveryOpts?.strategy==="pattern"){let s=await this.getCommandsDir();if(!s)return;let u,l,m;try{({filePath:m,isESM:l,module:u}=HO(this.manifest,t)?await(0,Eo.loadWithDataFromManifest)(this.manifest.commands[t],this.root):await(0,Eo.loadWithData)(this,(0,gi.join)(s??this.pjson.oclif.commands,...t.split(":")))),this._debug(l?"(import)":"(require)",m)}catch(f){if(!r.must&&f.code==="MODULE_NOT_FOUND")return;throw f}let p=Y0(u);return p?(p.id=t,p.plugin=this,p.isESM=l,p.relativePath=(0,gi.relative)(this.root,m||"").split(gi.sep),p):void 0}if(this.commandDiscoveryOpts?.strategy==="single"||this.commandDiscoveryOpts?.strategy==="explicit"){let s=await this.loadCommandsFromTarget(),u=K0(s?.[t]);return u?(u.id=t,u.plugin=this,u):void 0}})();return!o&&r.must&&(0,cn.error)(`command ${t} not found`),i?.stop(),o}async load(){this.type=this.options.type??"core",this.tag=this.options.tag,this.isRoot=this.options.isRoot??!1,this.options.parent&&(this.parent=this.options.parent);let t=this.options.pjson&&this.options.isRoot?this.options.root:this.type==="link"&&!this.parent?this.options.root:await(0,qO.findRoot)(this.options.name,this.options.root);if(!t)throw new cn.CLIError(`could not find package.json with ${(0,J0.inspect)(this.options)}`);if(this.root=t,this._debug(`loading ${this.type} plugin from ${t}`),this.pjson=this.options.pjson??await(0,G0.readJson)((0,gi.join)(t,"package.json")),this.flexibleTaxonomy=this.options?.flexibleTaxonomy||this.pjson.oclif?.flexibleTaxonomy||!1,this.moduleType=this.pjson.type==="module"?"module":"commonjs",this.name=this.pjson.name,this.alias=this.options.name??this.pjson.name,!this.name)throw new cn.CLIError(`no name in package.json (${t})`);this._debug=(0,bo.Debug)(this.name),this.version=this.pjson.version,this.pjson.oclif?this.valid=!0:this.pjson.oclif=this.pjson["cli-engine"]||{},this.hooks=Object.fromEntries(Object.entries(this.pjson.oclif.hooks??{}).map(([r,i])=>[r,(0,V0.castArray)(i).map(n=>zO(n))])),this.commandDiscoveryOpts=WO(this.pjson.oclif?.commands,this.pjson.oclif?.default),this._debug("command discovery options",this.commandDiscoveryOpts),this.manifest=await this._manifest(),this.commands=Object.entries(this.manifest.commands).map(([r,i])=>({...i,load:async()=>this.findCommand(r,{must:!0}),pluginAlias:this.alias,pluginType:i.pluginType==="jit"?"jit":this.type})).sort((r,i)=>r.id.localeCompare(i.id))}async _manifest(){let t=!!this.options.ignoreManifest,r=!!this.options.errorOnManifestCreate,i=!!this.options.respectNoCacheDefault,n=async(u=!1)=>{try{let l=(0,gi.join)(this.root,`${u?".":""}oclif.manifest.json`),m=await(0,G0.readJson)(l);if(!process.env.OCLIF_NEXT_VERSION&&m.version.split("-")[0]!==this.version.split("-")[0])process.emitWarning(`Mismatched version in ${this.name} plugin manifest. Expected: ${this.version} Received: ${m.version}
|
|
152
|
-
This usually means you have an oclif.manifest.json file that should be deleted in development. This file should be automatically generated when publishing.`);else return this._debug("using manifest from",l),this.hasManifest=!0,m}catch(l){if(l.code==="ENOENT"){if(!u)return n(!0)}else this.warn(l,"readManifest")}},o=
|
|
153
|
-
`),t}async getCommandIDs(){let t=mi.Performance.mark(mi.OCLIF_MARKER_OWNER,`plugin.getCommandIDs#${this.name}`,{plugin:this.name}),r;switch(this.commandDiscoveryOpts?.strategy){case"explicit":{r=await this.getCommandIdsFromTarget()??[];break}case"pattern":{r=await this.getCommandIdsFromPattern();break}case"single":{r=await this.getCommandIdsFromTarget()??[];break}default:r=[]}return this._debug("found commands",r),t?.addDetails({count:r.length}),t?.stop(),r}async getCommandIdsFromPattern(){let t=await this.getCommandsDir();if(!t)return[];this._debug(`loading IDs from ${t}`);let r=await(0,BO.default)(this.commandDiscoveryOpts?.globPatterns??ey,{cwd:t});return UO(r)}async getCommandIdsFromTarget(){if(await this.loadCommandsFromTarget())return Object.entries(await this.loadCommandsFromTarget()??[]).filter(([,r])=>K0(r)).map(([r])=>r)}async getCommandsDir(){return this.commandsDir?this.commandsDir:(this.commandsDir=await(0,lc.tsPath)(this.root,this.commandDiscoveryOpts?.target,this),this.commandsDir)}async loadCommandsFromTarget(){if(this.commandCache)return this.commandCache;if(this.commandDiscoveryOpts?.strategy==="explicit"&&this.commandDiscoveryOpts.target){let t=await(0,lc.tsPath)(this.root,this.commandDiscoveryOpts.target,this),r=await(0,Eo.load)(this,t);return this.commandCache=r[this.commandDiscoveryOpts?.identifier??"default"]??{},this.commandCache}if(this.commandDiscoveryOpts?.strategy==="single"&&this.commandDiscoveryOpts.target){let t=await(0,lc.tsPath)(this.root,this.commandDiscoveryOpts?.target??this.root,this),r=await(0,Eo.load)(this,t);return this.commandCache={[Z0.SINGLE_COMMAND_CLI_SYMBOL]:Y0(r)},this.commandCache}}warn(t,r){typeof t=="string"&&(t=new Error(t));let i=this.addErrorScope(t,r);process.emitWarning(i.name,i)}};yi.Plugin=fc});var iy=w(Ot=>{"use strict";y();var JO=Ot&&Ot.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),GO=Ot&&Ot.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),VO=Ot&&Ot.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&JO(t,e,r);return GO(t,e),t};Object.defineProperty(Ot,"__esModule",{value:!0});var XO=o0(),dc=S("node:path"),xi=hi(),mc=Dt(),YO=le(),ty=VO(pc()),KO=Jr(),ry=(0,KO.Debug)();function Fr(e,t){return Object.keys(e).filter(r=>t.some(i=>(0,XO.minimatch)(r,i)))}var gc=class{options;errors=[];plugins=new Map;pluginsProvided=!1;constructor(t){this.options=t,t.plugins&&(this.pluginsProvided=!0,this.plugins=Array.isArray(t.plugins)?new Map(t.plugins.map(r=>[r.name,r])):t.plugins)}async loadChildren(t){return(!this.pluginsProvided||t.force)&&(await this.loadUserPlugins(t),await this.loadDevPlugins(t),await this.loadCorePlugins(t)),{errors:this.errors,plugins:this.plugins}}async loadRoot({pjson:t}){let r;if(this.pluginsProvided){let i=[...this.plugins.values()];r=i.find(n=>n.root===this.options.root)??i[0]}else{let i=xi.Performance.mark(xi.OCLIF_MARKER_OWNER,"plugin.load#root");r=new ty.Plugin({isRoot:!0,pjson:t,root:this.options.root}),await r.load(),i?.addDetails({commandCount:r.commands.length,hasManifest:r.hasManifest??!1,name:r.name,topicCount:r.topics.length,type:r.type,usesMain:!!r.pjson.main}),i?.stop()}return this.plugins.set(r.name,r),r}async loadCorePlugins(t){let{plugins:r}=t.rootPlugin.pjson.oclif;if(r){let o=Fr(t.rootPlugin.pjson.dependencies??{},r);await this.loadPlugins(t.rootPlugin.root,"core",o)}let{core:i,path:n}=t.pluginAdditions??{core:[]};if(i)if(n){let o=await(0,mc.readJson)((0,dc.join)(n,"package.json")),s=Fr(o.dependencies??{},i);await this.loadPlugins(n,"core",s)}else{let o=Fr(t.rootPlugin.pjson.dependencies??{},i);await this.loadPlugins(t.rootPlugin.root,"core",o)}}async loadDevPlugins(t){if(t.devPlugins!==!1){if((0,YO.isProd)())return;try{let{devPlugins:r}=t.rootPlugin.pjson.oclif;if(r){let o={...t.rootPlugin.pjson.dependencies,...t.rootPlugin.pjson.devDependencies},s=Fr(o??{},r);await this.loadPlugins(t.rootPlugin.root,"dev",s)}let{dev:i,path:n}=t.pluginAdditions??{core:[]};if(i)if(n){let o=await(0,mc.readJson)((0,dc.join)(n,"package.json")),s={...o.dependencies,...o.devDependencies},u=Fr(s??{},i);await this.loadPlugins(n,"dev",u)}else{let o={...t.rootPlugin.pjson.dependencies,...t.rootPlugin.pjson.devDependencies},s=Fr(o??{},i);await this.loadPlugins(t.rootPlugin.root,"dev",s)}}catch(r){process.emitWarning(r)}}}async loadPlugins(t,r,i,n){if(!i||i.length===0)return;let o=xi.Performance.mark(xi.OCLIF_MARKER_OWNER,`config.loadPlugins#${r}`);ry("loading plugins",i),await Promise.all((i||[]).map(async s=>{try{let u=typeof s=="string"?s:s.name,l={name:u,root:t,type:r};if(typeof s!="string"&&(l.tag=s.tag||l.tag,l.root=s.root||l.root,l.url=s.url),n&&(l.parent=n),this.plugins.has(u))return;let m=xi.Performance.mark(xi.OCLIF_MARKER_OWNER,`plugin.load#${u}`),p=new ty.Plugin(l);if(await p.load(),m?.addDetails({commandCount:p.commands.length,hasManifest:p.hasManifest,name:p.name,topicCount:p.topics.length,type:p.type,usesMain:!!p.pjson.main}),m?.stop(),this.plugins.set(p.name,p),n&&(p.parent=n,n.children||(n.children=[]),n.children.push(p)),p.pjson.oclif.plugins){let f=r==="dev"?{...p.pjson.dependencies,...p.pjson.devDependencies}:p.pjson.dependencies,d=Fr(f??{},p.pjson.oclif.plugins);await this.loadPlugins(p.root,r,d,p)}}catch(u){this.errors.push(u)}})),o?.addDetails({pluginCount:i.length}),o?.stop()}async loadUserPlugins(t){if(t.userPlugins!==!1)try{let r=(0,dc.join)(t.dataDir,"package.json");ry("reading user plugins pjson %s",r);let i=await(0,mc.readJson)(r);i.oclif||(i.oclif={schema:1}),i.oclif.plugins||(i.oclif.plugins=[]),await this.loadPlugins(r,"user",i.oclif.plugins.filter(n=>n.type==="user")),await this.loadPlugins(r,"link",i.oclif.plugins.filter(n=>n.type==="link"))}catch(r){r.code!=="ENOENT"&&process.emitWarning(r)}}};Ot.default=gc});var ly=w((Xe,cy)=>{"use strict";y();var QO=Xe&&Xe.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),ZO=Xe&&Xe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ek=Xe&&Xe.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&QO(t,e,r);return ZO(t,e),t},wc=Xe&&Xe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xe,"__esModule",{value:!0});Xe.Config=void 0;var tk=ek(Hl()),rk=wc(Rv()),vi=S("node:os"),kt=S("node:path"),ny=S("node:url"),uy=wc(it()),ik=nn(),nk=hr(),wi=Ge(),sk=Yr(),ok=ji(),_e=hi(),yc=qt(),sy=Dt(),oy=Lg(),Co=le(),ak=wc(iy()),uk=Gr(),hn=Jr(),ln=(0,hn.Debug)(),ay=uy.default.getInstance().get("@oclif/core"),xc=`${ay.name}@${ay.version}`,ck=new Set(["preparse"]);function lk(e){let t=e.match(/[^-]+(?:-([^.]+))?/);return t&&t[1]||"stable"}function hk(e){return e&&!!e._base}var Do=class extends Map{validPermutations=new Map;add(t,r){this.validPermutations.set(t,r);for(let i of(0,hn.collectUsableIds)([t]))this.has(i)?this.set(i,this.get(i).add(r)):this.set(i,new Set([r]))}get(t){return super.get(t)??new Set}getAllValid(){return[...this.validPermutations.keys()]}getValid(t){return this.validPermutations.get(t)}hasValid(t){return this.validPermutations.has(t)}},vc=class e{options;arch;bin;binAliases;binPath;cacheDir;channel;configDir;dataDir;debug=0;dirname;errlog;flexibleTaxonomy;home;isSingleCommandCLI=!1;name;npmRegistry;nsisCustomization;pjson;platform;plugins=new Map;root;shell;theme;topicSeparator=":";userAgent;userPJSON;valid;version;warned=!1;windows;_base=xc;_commandIDs;_commands=new Map;_topics=new Map;commandPermutations=new Do;pluginLoader;rootPlugin;topicPermutations=new Do;constructor(t){this.options=t}static async load(t=cy.filename||__dirname){if(typeof t=="string"&&t.startsWith("file://")&&(t=(0,ny.fileURLToPath)(t)),typeof t=="string"&&(t={root:t}),hk(t)){if(xc!==t._base){ln(`reloading config from ${t._base} to ${xc}`);let i=new e({...t.options,plugins:t.plugins});return await i.load(),i}return t}let r=new e(t);return await r.load(),r}static get rootPlugin(){return this.rootPlugin}get commandIDs(){return this._commandIDs?this._commandIDs:(this._commandIDs=this.commands.map(t=>t.id),this._commandIDs)}get commands(){return[...this._commands.values()]}get isProd(){return(0,Co.isProd)()}get topics(){return[...this._topics.values()]}get versionDetails(){let[t,r,i]=this.userAgent.split(" ");return{architecture:r,cliVersion:t,nodeVersion:i,osVersion:`${(0,vi.type)()} ${(0,vi.release)()}`,pluginVersions:Object.fromEntries([...this.plugins.values()].map(n=>[n.name,{root:n.root,type:n.type,version:n.version}])),rootPath:this.root,shell:this.shell}}dir(t){let r=process.env[`XDG_${t.toUpperCase()}_HOME`]||this.windows&&process.env.LOCALAPPDATA||(0,kt.join)(this.home,t==="data"?".local/share":"."+t);return(0,kt.join)(r,this.dirname)}findCommand(t,r={}){let i=this.getCmdLookupId(t),n=this._commands.get(i);return r.must&&!n&&(0,wi.error)(`command ${i} not found`),n}findMatches(t,r){let i=r.filter(s=>!(0,sk.getHelpFlagAdditions)(this).includes(s)&&s.startsWith("-")).map(s=>s.replaceAll("-",""));return[...this.commandPermutations.get(t)].map(s=>this._commands.get(s)).filter(s=>{let u=Object.entries(s.flags).flatMap(([l,m])=>m.char?[m.char,l]:[l]);return i.every(l=>u.includes(l))})}findTopic(t,r={}){let i=this.getTopicLookupId(t),n=this._topics.get(i);if(n)return n;if(r.must)throw new Error(`topic ${t} not found`)}getAllCommandIDs(){return this.getAllCommands().map(t=>t.id)}getAllCommands(){let t=[...this._commands.values()],r=[...this.commandPermutations.getAllValid()];for(let i of r)if(!this._commands.has(i)){let n=this._commands.get(this.getCmdLookupId(i));t.push({...n,id:i})}return t}getPluginsList(){return[...this.plugins.values()]}async load(){yc.settings.performanceEnabled=(yc.settings.performanceEnabled===void 0?this.options.enablePerf:yc.settings.performanceEnabled)??!1;let t=_e.Performance.mark(_e.OCLIF_MARKER_OWNER,"config.load");this.pluginLoader=new ak.default({plugins:this.options.plugins,root:this.options.root}),this.rootPlugin=await this.pluginLoader.loadRoot({pjson:this.options.pjson});let r=uy.default.getInstance();if(r.set("rootPlugin",this.rootPlugin),r.set("exitCodes",this.rootPlugin.pjson.oclif.exitCodes??{}),this.root=this.rootPlugin.root,this.pjson=this.rootPlugin.pjson,this.plugins.set(this.rootPlugin.name,this.rootPlugin),this.root=this.rootPlugin.root,this.pjson=this.rootPlugin.pjson,this.name=this.pjson.name,this.version=this.options.version||this.pjson.version||"0.0.0",this.channel=this.options.channel||lk(this.version),this.valid=this.rootPlugin.valid,this.arch=(0,vi.arch)()==="ia32"?"x86":(0,vi.arch)(),this.platform=rk.default?"wsl":(0,oy.getPlatform)(),this.windows=this.platform==="win32",this.bin=this.pjson.oclif.bin||this.name,this.binAliases=this.pjson.oclif.binAliases,this.nsisCustomization=this.pjson.oclif.nsisCustomization,this.dirname=this.pjson.oclif.dirname||this.name,this.flexibleTaxonomy=this.pjson.oclif.flexibleTaxonomy||!1,this.pjson.oclif.topicSeparator&&[" ",":"].includes(this.pjson.oclif.topicSeparator)&&(this.topicSeparator=this.pjson.oclif.topicSeparator),this.platform==="win32"&&(this.dirname=this.dirname.replace("/","\\")),this.userAgent=`${this.name}/${this.version} ${this.platform}-${this.arch} node-${process.version}`,this.shell=this._shell(),this.debug=this._debug(),this.home=process.env.HOME||this.windows&&this.windowsHome()||(0,oy.getHomeDir)()||(0,vi.tmpdir)(),this.cacheDir=this.scopedEnvVar("CACHE_DIR")||this.macosCacheDir()||this.dir("cache"),this.configDir=this.scopedEnvVar("CONFIG_DIR")||this.dir("config"),this.dataDir=this.scopedEnvVar("DATA_DIR")||this.dir("data"),this.errlog=(0,kt.join)(this.cacheDir,"error.log"),this.binPath=this.scopedEnvVar("BINPATH"),this.npmRegistry=this.scopedEnvVar("NPM_REGISTRY")||this.pjson.oclif.npmRegistry,!this.scopedEnvVarTrue("DISABLE_THEME")){let{theme:n}=await this.loadThemes();this.theme=n}this.pjson.oclif.update=this.pjson.oclif.update||{},this.pjson.oclif.update.node=this.pjson.oclif.update.node||{};let i=this.pjson.oclif.update.s3||{};this.pjson.oclif.update.s3=i,i.bucket=this.scopedEnvVar("S3_BUCKET")||i.bucket,i.bucket&&!i.host&&(i.host=`https://${i.bucket}.s3.amazonaws.com`),i.templates={...i.templates,target:{baseDir:"<%- bin %>",manifest:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- platform %>-<%- arch %>",unversioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-<%- platform %>-<%- arch %><%- ext %>",versioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %>-<%- platform %>-<%- arch %><%- ext %>",...i.templates&&i.templates.target},vanilla:{baseDir:"<%- bin %>",manifest:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %>version",unversioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %><%- ext %>",versioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %><%- ext %>",...i.templates&&i.templates.vanilla}},this.isSingleCommandCLI=!!(this.pjson.oclif.default||typeof this.pjson.oclif.commands!="string"&&this.pjson.oclif.commands?.strategy==="single"&&this.pjson.oclif.commands?.target),await this.loadPluginsAndCommands(),ln("config done"),t?.addDetails({commandPermutations:this.commands.length,commands:[...this.plugins.values()].reduce((n,o)=>n+o.commands.length,0),plugins:this.plugins.size,topics:this.topics.length}),t?.stop()}async loadPluginsAndCommands(t){let r=_e.Performance.mark(_e.OCLIF_MARKER_OWNER,"config.loadAllPlugins"),{errors:i,plugins:n}=await this.pluginLoader.loadChildren({dataDir:this.dataDir,devPlugins:this.options.devPlugins,force:t?.force??!1,pluginAdditions:this.options.pluginAdditions,rootPlugin:this.rootPlugin,userPlugins:this.options.userPlugins});this.plugins=n,r?.stop();let o=_e.Performance.mark(_e.OCLIF_MARKER_OWNER,"config.loadAllCommands");for(let s of this.plugins.values())this.loadCommands(s),this.loadTopics(s);o?.stop();for(let s of i)this.warn(s)}async loadThemes(){let t=this.pjson.oclif.theme?(0,kt.resolve)(this.root,this.pjson.oclif.theme):this.pjson.oclif.theme,r=(0,kt.resolve)(this.configDir,"theme.json"),[i,n]=await Promise.all([t?await(0,sy.safeReadJson)(t):void 0,await(0,sy.safeReadJson)(r)]),o={...i,...n};return{file:n?r:t,theme:Object.keys(o).length>0?(0,nk.parseTheme)(o):void 0}}macosCacheDir(){return this.platform==="darwin"&&(0,kt.join)(this.home,"Library","Caches",this.dirname)||void 0}async runCommand(t,r=[],i=null){let n=_e.Performance.mark(_e.OCLIF_MARKER_OWNER,`config.runCommand#${t}`);ln("runCommand %s %o",t,r);let o=i??this.findCommand(t);if(!o){let l=this.flexibleTaxonomy?this.findMatches(t,r):[],m=this.flexibleTaxonomy&&l.length>0?await this.runHook("command_incomplete",{argv:r,id:t,matches:l}):await this.runHook("command_not_found",{argv:r,id:t});if(m.successes[0])return m.successes[0].result;throw m.failures[0]?m.failures[0].error:new wi.CLIError(`command ${t} not found`)}if(this.isJitPluginCommand(o)){let l=o.pluginName,m=this.pjson.oclif.jitPlugins[l],p=await this.runHook("jit_plugin_not_installed",{argv:r,command:o,id:t,pluginName:l,pluginVersion:m});if(p.failures[0])throw p.failures[0].error;if(p.successes[0])await this.loadPluginsAndCommands({force:!0}),o=this.findCommand(t)??o;else{let f=await this.runHook("command_not_found",{argv:r,id:t});if(f.successes[0])return f.successes[0].result;throw f.failures[0]?f.failures[0].error:new wi.CLIError(`command ${t} not found`)}}let s=await o.load();await this.runHook("prerun",{Command:s,argv:r});let u=await s.run(r,this);if(o.id==="plugins:uninstall")for(let l of r)this.plugins.delete(l);return await this.runHook("postrun",{Command:s,argv:r,result:u}),n?.addDetails({command:t,plugin:o.pluginName}),n?.stop(),u}async runHook(t,r,i,n){let o=_e.Performance.mark(_e.OCLIF_MARKER_OWNER,`config.runHook#${t}`);ln("start %s hook",t);let s=f=>typeof f=="function"?f:f.default&&typeof f.default=="function"?f.default:Object.values(f).find(d=>typeof d=="function"),u=async(f,d)=>{let a,c=new Promise((h,g)=>{a=setTimeout(()=>{g(new Error(`Timed out after ${f} ms.`))},f).unref()});return Promise.race([d,c]).then(h=>(clearTimeout(a),h))},l={failures:[],successes:[]},p=(ck.has(t)?[this.rootPlugin]:[...this.plugins.values()]).map(async f=>{let d=ut()([this.bin,f.name,"hooks",t].join(":")),a={config:this,debug:d,error(h,g={}){(0,wi.error)(h,g)},exit(h=0){(0,wi.exit)(h)},log(h,...g){ik.ux.info(h,...g)},warn(h){(0,wi.warn)(h)}},c=f.hooks[t]||[];for(let h of c){let g=_e.Performance.mark(_e.OCLIF_MARKER_OWNER,`config.runHook#${f.name}(${h.target})`);try{let{filePath:x,isESM:v,module:E}=await(0,ok.loadWithData)(f,await(0,uk.tsPath)(f.root,h.target,f));d("start",v?"(import)":"(require)",x);let C=E[h.identifier]??(h.identifier==="default"?s(E):void 0);if(!C){d("No hook found for hook definition:",h);continue}let A=i?await u(i,C.call(a,{...r,config:this,context:a})):await C.call(a,{...r,config:this,context:a});l.successes.push({plugin:f,result:A}),f.name==="@oclif/plugin-legacy"&&t==="init"&&this.insertLegacyPlugins(A),d("done")}catch(x){if(l.failures.push({error:x,plugin:f}),d(x),!n&&x.oclif?.exit!==void 0&&x.oclif?.exit!==0&&x.code!=="MODULE_NOT_FOUND")throw x}g?.addDetails({event:t,hook:h.target,plugin:f.name}),g?.stop()}});return await Promise.all(p),ln("%s hook done",t),o?.stop(),l}s3Key(t,r,i={}){typeof r=="object"?i=r:r&&(i.ext=r);let n=this.pjson.oclif.update.s3.templates[i.platform?"target":"vanilla"][t]??"";return tk.render(n,{...this,...i})}s3Url(t){let{host:r}=this.pjson.oclif.update.s3;if(!r)throw new Error("no s3 host is set");let i=new ny.URL(r);return i.pathname=(0,kt.join)(i.pathname,t),i.toString()}scopedEnvVar(t){return process.env[this.scopedEnvVarKeys(t).find(r=>process.env[r])]}scopedEnvVarKey(t){return[this.bin,t].map(r=>r.replaceAll("@","").replaceAll(/[/-]/g,"_")).join("_").toUpperCase()}scopedEnvVarKeys(t){return[this.bin,...this.binAliases??[]].filter(Boolean).map(r=>[r.replaceAll("@","").replaceAll(/[/-]/g,"_"),t].join("_").toUpperCase())}scopedEnvVarTrue(t){let r=this.scopedEnvVar(t);return r==="1"||r==="true"}warn(t,r){if(!this.warned){if(typeof t=="string"){process.emitWarning(t);return}if(t instanceof Error){let i=t;i.name=`${t.name} Plugin: ${this.name}`,i.detail=(0,Co.compact)([t.detail,`module: ${this._base}`,r&&`task: ${r}`,`plugin: ${this.name}`,`root: ${this.root}`,"See more details with DEBUG=*"]).join(`
|
|
154
|
-
`),process.emitWarning(t);return}process.emitWarning("Config.warn expected either a string or Error, but instead received an object"),t.name=`${t.name} Plugin: ${this.name}`,t.detail=(0,
|
|
155
|
-
`),process.emitWarning(JSON.stringify(t))}}windowsHome(){return this.windowsHomedriveHome()||this.windowsUserprofileHome()}windowsHomedriveHome(){return process.env.HOMEDRIVE&&process.env.HOMEPATH&&(0,kt.join)(process.env.HOMEDRIVE,process.env.HOMEPATH)}windowsUserprofileHome(){return process.env.USERPROFILE}_debug(){if(this.scopedEnvVarTrue("DEBUG"))return 1;try{let{enabled:t}=ut()(this.bin);if(t)return 1}catch{}return 0}_shell(){let t,{COMSPEC:r}=process.env,i=process.env.SHELL??(0,
|
|
156
|
-
`)}
|
|
157
|
-
See more help with --help`,super(t.message,{exit:t.exit}),this.parse=t.parse}};te.CLIParseError=xt;var
|
|
158
|
-
${s}`}super({exit:
|
|
141
|
+
`):p+=g}return f||this.throwUnexpectedToken(),a||this.curlyStack.pop(),{type:10,value:this.source.slice(d+1,this.index-h),cooked:p,head:a,tail:c,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},m.prototype.testRegExp=function(p,f){var d="\uFFFF",a=p,c=this;f.indexOf("u")>=0&&(a=a.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(h,g,x){var v=parseInt(g||x,16);return v>1114111&&c.throwUnexpectedToken(o.Messages.InvalidRegExp),v<=65535?String.fromCharCode(v):d}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,d));try{RegExp(a)}catch{this.throwUnexpectedToken(o.Messages.InvalidRegExp)}try{return new RegExp(p,f)}catch{return null}},m.prototype.scanRegExpBody=function(){var p=this.source[this.index];i.assert(p==="/","Regular expression literal must start with a slash");for(var f=this.source[this.index++],d=!1,a=!1;!this.eof();)if(p=this.source[this.index++],f+=p,p==="\\")p=this.source[this.index++],n.Character.isLineTerminator(p.charCodeAt(0))&&this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),f+=p;else if(n.Character.isLineTerminator(p.charCodeAt(0)))this.throwUnexpectedToken(o.Messages.UnterminatedRegExp);else if(d)p==="]"&&(d=!1);else if(p==="/"){a=!0;break}else p==="["&&(d=!0);return a||this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),f.substr(1,f.length-2)},m.prototype.scanRegExpFlags=function(){for(var p="",f="";!this.eof();){var d=this.source[this.index];if(!n.Character.isIdentifierPart(d.charCodeAt(0)))break;if(++this.index,d==="\\"&&!this.eof())if(d=this.source[this.index],d==="u"){++this.index;var a=this.index,c=this.scanHexEscape("u");if(c!==null)for(f+=c,p+="\\u";a<this.index;++a)p+=this.source[a];else this.index=a,f+="u",p+="\\u";this.tolerateUnexpectedToken()}else p+="\\",this.tolerateUnexpectedToken();else f+=d,p+=d}return f},m.prototype.scanRegExp=function(){var p=this.index,f=this.scanRegExpBody(),d=this.scanRegExpFlags(),a=this.testRegExp(f,d);return{type:9,value:"",pattern:f,flags:d,regex:a,lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},m.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var p=this.source.charCodeAt(this.index);return n.Character.isIdentifierStart(p)?this.scanIdentifier():p===40||p===41||p===59?this.scanPunctuator():p===39||p===34?this.scanStringLiteral():p===46?n.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():n.Character.isDecimalDigit(p)?this.scanNumericLiteral():p===96||p===125&&this.curlyStack[this.curlyStack.length-1]==="${"?this.scanTemplate():p>=55296&&p<57343&&n.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},m})();t.Scanner=l},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="<end>",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XHTMLEntities={quot:'"',amp:"&",apos:"'",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",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27E8",rang:"\u27E9"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(10),n=r(12),o=r(13),s=(function(){function l(){this.values=[],this.curly=this.paren=-1}return l.prototype.beforeFunctionExpression=function(m){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(m)>=0},l.prototype.isRegexStart=function(){var m=this.values[this.values.length-1],p=m!==null;switch(m){case"this":case"]":p=!1;break;case")":var f=this.values[this.paren-1];p=f==="if"||f==="while"||f==="for"||f==="with";break;case"}":if(p=!1,this.values[this.curly-3]==="function"){var d=this.values[this.curly-4];p=d?!this.beforeFunctionExpression(d):!1}else if(this.values[this.curly-4]==="function"){var d=this.values[this.curly-5];p=d?!this.beforeFunctionExpression(d):!0}break;default:break}return p},l.prototype.push=function(m){m.type===7||m.type===4?(m.value==="{"?this.curly=this.values.length:m.value==="("&&(this.paren=this.values.length),this.values.push(m.value)):this.values.push(null)},l})(),u=(function(){function l(m,p){this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=p?typeof p.tolerant=="boolean"&&p.tolerant:!1,this.scanner=new n.Scanner(m,this.errorHandler),this.scanner.trackComment=p?typeof p.comment=="boolean"&&p.comment:!1,this.trackRange=p?typeof p.range=="boolean"&&p.range:!1,this.trackLoc=p?typeof p.loc=="boolean"&&p.loc:!1,this.buffer=[],this.reader=new s}return l.prototype.errors=function(){return this.errorHandler.errors},l.prototype.getNextToken=function(){if(this.buffer.length===0){var m=this.scanner.scanComments();if(this.scanner.trackComment)for(var p=0;p<m.length;++p){var f=m[p],d=this.scanner.source.slice(f.slice[0],f.slice[1]),a={type:f.multiLine?"BlockComment":"LineComment",value:d};this.trackRange&&(a.range=f.range),this.trackLoc&&(a.loc=f.loc),this.buffer.push(a)}if(!this.scanner.eof()){var c=void 0;this.trackLoc&&(c={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var h=this.scanner.source[this.scanner.index]==="/"&&this.reader.isRegexStart(),g=h?this.scanner.scanRegExp():this.scanner.lex();this.reader.push(g);var x={type:o.TokenName[g.type],value:this.scanner.source.slice(g.start,g.end)};if(this.trackRange&&(x.range=[g.start,g.end]),this.trackLoc&&(c.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},x.loc=c),g.type===9){var v=g.pattern,E=g.flags;x.regex={pattern:v,flags:E}}this.buffer.push(x)}}return this.buffer.shift()},l})();t.Tokenizer=u}])})});var hg=w((uB,Ws)=>{y();(function(){"use strict";var e,t,r=Object.prototype.toString;typeof Ws=="object"&&typeof Ws.exports=="object"&&typeof S=="function"?(e=lg(),t=function(n){Ws.exports=n},i(e,t)):typeof define=="function"&&define.amd?define(["esprima"],function(n){return i(n)}):typeof window=="object"&&(window.redeyed=i(window.esprima));function i(n,o){function s(x){return r.call(x)==="[object Function]"}function u(x){return r.call(x)==="[object String]"}function l(x){return r.call(x)==="[object Object]"}function m(x,v){return function(E){return x+E+v}}function p(x){return x!=="_parent"}function f(x){var v=x.split(":");if(v.length===0||v.length>2)throw new Error("illegal string config: "+x+`
|
|
142
|
+
Should be of format "before:after"`);return v.length===1||v[1].length===0?v.indexOf(":")<0?{_before:v[0]}:{_after:v[0]}:{_before:v[0],_after:v[1]}}function d(x){function v(D,A){if(D._parent){if(D._parent._default&&D._parent._default[A])return D._parent._default[A];var k=D._parent._parent;if(k)return k._default?k._default[A]:void 0}}function E(D){var A=x[D];if(A&&!s(A)){if(u(A)&&(x[D]=A=f(A)),A._parent=x,l(A)){if(!A._before&&!A._after)return d(A);A._before=A._before||v(A,"_before"),A._after=A._after||v(A,"_after");return}throw new Error("nodes need to be either {String}, {Object} or {Function}."+A+" is neither.")}}x._default&&E("_default"),Object.keys(x).filter(function(D){return p(D)&&x.hasOwnProperty(D)&&D!=="_before"&&D!=="_after"&&D!=="_default"}).forEach(E)}function a(x){Object.keys(x).filter(function(v){return p(v)&&x.hasOwnProperty(v)}).forEach(function(v){var E=x[v];if(!s(E)&&l(E)){if(!E._before&&!E._after)return a(E);var D=E._before||"",A=E._after||"";return x[v]=m(D,A),x[v]}})}function c(x){d(x),a(x)}function h(x,v){var E={};function D(A){E[A.range[0]]=A}return x.forEach(D),v.forEach(D),Object.keys(E).map(function(A){return E[A]})}function g(x,v,E){E=E||{};var D=E.parser||n,A=!!E.jsx,k=A||!!E.buildAst,I="",L,j,J,Y=0,ve=[],Mt,kr,tr;x[0]==="#"&&x[1]==="!"&&(I=x.substr(0,x.indexOf(`
|
|
143
|
+
`)+1),x=Array.apply(0,Array(I.length)).join(" ")+`
|
|
144
|
+
`+x.substr(I.length)),k?(L=D.parse(x,{tokens:!0,comment:!0,range:!0,loc:!0,tolerant:!0,jsx:!0}),j=L.tokens,J=L.comments):(j=[],J=[],D.tokenize(x,{range:!0,loc:!0,comment:!0},function(se){se.type==="LineComment"?(se.type="Line",J.push(se)):se.type==="BlockComment"?(se.type="Block",J.push(se)):(se.type==="Identifier"&&se.value==="static"&&(se.type="Keyword"),j.push(se))})),c(v);function Ho(se,Te,et){var Ue,tt=Te.range[0];for(Ue=et;Ue<se.length;Ue++)if(se[Ue].range[0]===tt)return Ue;throw new Error("Token %s not found at or after index: %d",Te,et)}function Uo(se){var Te,et,Ue,tt=0,Lt;return Te=se(x.slice(Pr,ir),tr),l(Te)?(ve.push(Te.replacement),et=tr.tokenIndex,Ue=Ho(tr.tokens,Te.skipPastToken,et),tt=Ue-et,Lt=tt>0?j[Ue-1].range[1]:ir):(ve.push(Te),Lt=ir),{skip:tt,splitEnd:Lt}}function Ai(se,Te,et,Ue){var tt,Lt=0;if(!(se>=Te))return et?(tt=Uo(et),Lt=tt.skip,Y=tt.splitEnd):(ve.push(x.slice(se,Te)),Y=Te),Lt}kr=h(j,J);for(var rr=0;rr<kr.length;rr++){var Et=kr[rr],bt=v[Et.type],vn,Pr,ir;bt&&(vn=bt&&bt.hasOwnProperty(Et.value)&&bt[Et.value]&&s(bt[Et.value])?bt[Et.value]:bt._default,Pr=Et.range[0],ir=Et.range[1],Ai(Y,Pr),tr={tokenIndex:rr,tokens:kr,ast:L,code:x},rr+=Ai(Pr,ir,vn,tr))}return Y<x.length&&Ai(Y,x.length),E.nojoin||(Mt=ve.join(""),I.length>0&&(Mt=I+Mt.substr(I.length))),{ast:L,tokens:j,comments:J,splits:ve,code:Mt}}return o?o(g):g}})()});var zs=w((hB,dg)=>{"use strict";y();var fg={white:37,black:30,blue:34,cyan:36,green:32,magenta:35,red:31,yellow:33,brightBlack:90,brightRed:91,brightGreen:92,brightYellow:93,brightBlue:94,brightMagenta:95,brightCyan:96,brightWhite:97},pg={bgBlack:40,bgRed:41,bgGreen:42,bgYellow:43,bgBlue:44,bgMagenta:45,bgCyan:46,bgWhite:47,bgBrightBlack:100,bgBrightRed:101,bgBrightGreen:102,bgBrightYellow:103,bgBrightBlue:104,bgBrightMagenta:105,bgBrightCyan:106,bgBrightWhite:107},Fu={},Tu={},Zi={};Object.keys(fg).forEach(function(e){var t=Fu[e]="\x1B["+fg[e]+"m",r=Tu[e]="\x1B[39m";Zi[e]=function(i){return t+i+r}});Object.keys(pg).forEach(function(e){var t=Fu[e]="\x1B["+pg[e]+"m",r=Tu[e]="\x1B[49m";Zi[e]=function(i){return t+i+r}});dg.exports=Zi;Zi.open=Fu;Zi.close=Tu});var gg=w((pB,mg)=>{y();var M=zs();mg.exports={Boolean:{true:void 0,false:void 0,_default:M.brightRed},Identifier:{undefined:M.brightBlack,self:M.brightRed,console:M.blue,log:M.blue,warn:M.red,error:M.brightRed,_default:M.white},Null:{_default:M.brightBlack},Numeric:{_default:M.blue},String:{_default:function(e,t){var r=t.tokens[t.tokenIndex+1];return r&&r.type==="Punctuator"&&r.value===":"?M.green(e):M.brightGreen(e)}},Keyword:{break:void 0,case:void 0,catch:M.cyan,class:void 0,const:void 0,continue:void 0,debugger:void 0,default:void 0,delete:M.red,do:void 0,else:void 0,enum:void 0,export:void 0,extends:void 0,finally:M.cyan,for:void 0,function:void 0,if:void 0,implements:void 0,import:void 0,in:void 0,instanceof:void 0,let:void 0,new:M.red,package:void 0,private:void 0,protected:void 0,public:void 0,return:M.red,static:void 0,super:void 0,switch:void 0,this:M.brightRed,throw:void 0,try:M.cyan,typeof:void 0,var:M.green,void:void 0,while:void 0,with:void 0,yield:void 0,_default:M.brightBlue},Punctuator:{";":M.brightBlack,".":M.green,",":M.green,"{":M.yellow,"}":M.yellow,"(":M.brightBlack,")":M.brightBlack,"[":M.yellow,"]":M.yellow,"<":void 0,">":void 0,"+":void 0,"-":void 0,"*":void 0,"%":void 0,"&":void 0,"|":void 0,"^":void 0,"!":void 0,"~":void 0,"?":void 0,":":void 0,"=":void 0,"<=":void 0,">=":void 0,"==":void 0,"!=":void 0,"++":void 0,"--":void 0,"<<":void 0,">>":void 0,"&&":void 0,"||":void 0,"+=":void 0,"-=":void 0,"*=":void 0,"%=":void 0,"&=":void 0,"|=":void 0,"^=":void 0,"/=":void 0,"=>":void 0,"**":void 0,"===":void 0,"!==":void 0,">>>":void 0,"<<=":void 0,">>=":void 0,"...":void 0,"**=":void 0,">>>=":void 0,_default:M.brightYellow},Line:{_default:M.brightBlack},Block:{_default:M.brightBlack},JSXAttribute:{_default:M.magenta},JSXClosingElement:{_default:M.magenta},JSXElement:{_default:M.magenta},JSXEmptyExpression:{_default:M.magenta},JSXExpressionContainer:{_default:M.magenta},JSXIdentifier:{className:M.blue,_default:M.magenta},JSXMemberExpression:{_default:M.magenta},JSXNamespacedName:{_default:M.magenta},JSXOpeningElement:{_default:M.magenta},JSXSpreadAttribute:{_default:M.magenta},JSXText:{_default:M.brightGreen},_default:void 0}});var Js=w((mB,yg)=>{"use strict";y();var m1=hg(),g1=gg(),y1=zs(),x1=y1.brightBlack,v1="\x1B[39m";function w1(e){for(var t=e.pop();!t||!t.length;)t=e.pop();t&&e.push(t)}function E1(e,t){var r=e.split(`
|
|
145
|
+
`);w1(r);var i=r.length,n=[],o,s;function u(p){return p<10?1:p<100?2:p<1e3?3:p<1e4?4:5}function l(p,f){var d=f-u(p);switch(d){case 0:return""+p;case 1:return" "+p;case 2:return" "+p;case 3:return" "+p;case 4:return" "+p;case 5:return" "+p}}o=u(i+t-1);for(var m=0;m<i;m++)s=x1(l(m+t,o)+": ").replace(v1,""),n.push(s+r[m]);return n.join(`
|
|
146
|
+
`)}yg.exports=function(t,r){r=r||{};try{var i=m1(t,r.theme||g1,{jsx:!!r.jsx}),n=r.firstline&&!isNaN(r.firstline)?r.firstline:1;return r.linenos?E1(i.code,n):i.code}catch(o){throw o.message="Unable to perform highlight. The code contained syntax errors: "+o.message,o}}});var vg=w((yB,xg)=>{"use strict";y();var b1=S("fs"),C1=Js();function D1(e){return toString.call(e)==="[object Function]"}xg.exports=function(t,r,i){D1(r)&&(i=r,r={}),r=r||{},b1.readFile(t,"utf-8",function(n,o){if(n)return i(n);try{i(null,C1(o,r))}catch(s){i(s)}})}});var Eg=w((vB,wg)=>{"use strict";y();var A1=S("fs"),_1=Js();wg.exports=function(t,r){var i=A1.readFileSync(t,"utf-8");return r=r||{},_1(i,r)}});var Cg=w((EB,bg)=>{"use strict";y();bg.exports={highlight:Js(),highlightFile:vg(),highlightFileSync:Eg()}});var Ag=w((CB,Dg)=>{y();var q=zs();Dg.exports={Boolean:{true:void 0,false:void 0,_default:q.brightRed},Identifier:{undefined:q.brightBlack,self:q.brightRed,console:q.blue,log:q.blue,warn:q.red,error:q.brightRed,_default:q.white},Null:{_default:q.brightBlack},Numeric:{_default:q.blue},String:{_default:function(e,t){var r=t.tokens[t.tokenIndex+1];return r&&r.type==="Punctuator"&&r.value===":"?q.brightBlue(e):q.brightGreen(e)}},Keyword:{break:void 0,case:void 0,catch:q.cyan,class:void 0,const:void 0,continue:void 0,debugger:void 0,default:void 0,delete:q.red,do:void 0,else:void 0,enum:void 0,export:void 0,extends:void 0,finally:q.cyan,for:void 0,function:void 0,if:void 0,implements:void 0,import:void 0,in:void 0,instanceof:void 0,let:void 0,new:q.red,package:void 0,private:void 0,protected:void 0,public:void 0,return:q.red,static:void 0,super:void 0,switch:void 0,this:q.brightRed,throw:void 0,try:q.cyan,typeof:void 0,var:q.green,void:void 0,while:void 0,with:void 0,yield:void 0,_default:q.brightBlue},Punctuator:{";":q.brightBlack,".":q.green,",":q.green,"{":q.brightWhite,"}":q.brightWhite,"(":q.brightBlack,")":q.brightBlack,"[":q.brightWhite,"]":q.brightWhite,"<":void 0,">":void 0,"+":void 0,"-":void 0,"*":void 0,"%":void 0,"&":void 0,"|":void 0,"^":void 0,"!":void 0,"~":void 0,"?":void 0,":":void 0,"=":void 0,"<=":void 0,">=":void 0,"==":void 0,"!=":void 0,"++":void 0,"--":void 0,"<<":void 0,">>":void 0,"&&":void 0,"||":void 0,"+=":void 0,"-=":void 0,"*=":void 0,"%=":void 0,"&=":void 0,"|=":void 0,"^=":void 0,"/=":void 0,"=>":void 0,"**":void 0,"===":void 0,"!==":void 0,">>>":void 0,"<<=":void 0,">>=":void 0,"...":void 0,"**=":void 0,">>>=":void 0,_default:q.brightYellow},Line:{_default:q.brightBlack},Block:{_default:q.brightBlack},_default:void 0}});var _g=w(Gs=>{"use strict";y();Object.defineProperty(Gs,"__esModule",{value:!0});Gs.ExitError=void 0;var Ou=class extends Error{code;error;ux;constructor(t,r){let i="EEXIT";super(r?r.message:`${i}: ${t}`),this.error=r,this.ux={exit:t},this.code=i}};Gs.ExitError=Ou});var tn=w(T=>{"use strict";y();var S1=T&&T.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),F1=T&&T.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Nu=T&&T.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&S1(t,e,r);return F1(t,e),t},Xs=T&&T.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(T,"__esModule",{value:!0});T.write=T.colorize=T.Table=T.ExitError=T.config=T.Config=T.ActionBase=T.warn=T.wait=T.url=T.tree=T.trace=T.table=T.styledObject=T.styledJSON=T.styledHeader=T.prompt=T.progress=T.logToStderr=T.log=T.info=T.flush=T.exit=T.error=T.done=T.debug=T.confirm=T.anykey=T.annotation=T.action=T.ux=void 0;var ku=Xs(We()),Vs=S("node:util"),T1=Nu(Ge()),Pu=Cs(),O1=As(),Iu=Nu(yp()),Ys=Nu(Au()),k1=Xs(ag()),Sg=Xs($t()),P1=cg(),en=class{static config=Pu.config;static get action(){return Pu.config.action}static annotation(t,r){Jl().stdout?this.log(`\x1B]1337;AddAnnotation=${t.length}|${r}\x07${t}`):this.log(t)}static get anykey(){return Iu.anykey}static get confirm(){return Iu.confirm}static debug(t,...r){["debug","trace"].includes(this.config.outputLevel)&&this.info((0,Vs.format)(t,...r)+`
|
|
147
|
+
`)}static async done(){Pu.config.action.stop()}static async flush(t=1e4){await(0,O1.flush)(t)}static info(t,...r){Sg.default.stdout((0,Vs.format)(t,...r)+`
|
|
148
|
+
`)}static log(t,...r){this.info(t||"",...r)}static logToStderr(t,...r){Sg.default.stderr((0,Vs.format)(t,...r)+`
|
|
149
|
+
`)}static get progress(){return Ys.progress}static get prompt(){return Iu.prompt}static styledHeader(t){this.info(ku.default.dim("=== ")+ku.default.bold(t)+`
|
|
150
|
+
`)}static styledJSON(t){let r=JSON.stringify(t,null,2);if(!ku.default.level){this.info(r);return}let i=Cg(),n=Ag();this.info(i.highlight(r,{json:!0,theme:n}))}static styledObject(t,r){this.info(Ys.styledObject(t,r))}static get table(){return Ys.Table.table}static trace(t,...r){this.config.outputLevel==="trace"&&this.info((0,Vs.format)(t,...r)+`
|
|
151
|
+
`)}static get tree(){return Ys.tree}static url(t,r,i={}){Jl().stdout?this.log(P1(t,r,i)):this.log(r)}static get wait(){return k1.default}};T.ux=en;var{action:I1,annotation:N1,anykey:R1,confirm:M1,debug:L1,done:B1,flush:j1,info:$1,log:q1,logToStderr:H1,progress:U1,prompt:W1,styledHeader:z1,styledJSON:J1,styledObject:G1,table:V1,trace:Y1,tree:X1,url:K1,wait:Q1}=en;T.action=I1;T.annotation=N1;T.anykey=R1;T.confirm=M1;T.debug=L1;T.done=B1;T.flush=j1;T.info=$1;T.log=q1;T.logToStderr=H1;T.progress=U1;T.prompt=W1;T.styledHeader=z1;T.styledJSON=J1;T.styledObject=G1;T.table=V1;T.trace=Y1;T.tree=X1;T.url=K1;T.wait=Q1;var{error:Z1,exit:eF,warn:tF}=T1;T.error=Z1;T.exit=eF;T.warn=tF;var Fg=async()=>{try{await en.done()}catch(e){console.error(e),process.exitCode=1}},rF=process.listeners("exit").find(e=>e.name===Fg.name);rF||process.once("exit",Fg);var iF=ws();Object.defineProperty(T,"ActionBase",{enumerable:!0,get:function(){return iF.ActionBase}});var Tg=Cs();Object.defineProperty(T,"Config",{enumerable:!0,get:function(){return Tg.Config}});Object.defineProperty(T,"config",{enumerable:!0,get:function(){return Tg.config}});var nF=_g();Object.defineProperty(T,"ExitError",{enumerable:!0,get:function(){return nF.ExitError}});var sF=Au();Object.defineProperty(T,"Table",{enumerable:!0,get:function(){return sF.Table}});var oF=hr();Object.defineProperty(T,"colorize",{enumerable:!0,get:function(){return oF.colorize}});var aF=$t();Object.defineProperty(T,"write",{enumerable:!0,get:function(){return Xs(aF).default}})});var Og=w(ci=>{"use strict";y();Object.defineProperty(ci,"__esModule",{value:!0});ci.stderr=ci.stdout=void 0;var Ks=class{channel;constructor(t){this.channel=t}get isTTY(){return process[this.channel].isTTY}emit(t,...r){return process[this.channel].emit(t,...r)}getWindowSize(){return process[this.channel].getWindowSize()}on(t,r){return process[this.channel].on(t,r),this}once(t,r){return process[this.channel].once(t,r),this}read(){return process[this.channel].read()}write(t){return process[this.channel].write(t)}};ci.stdout=new Ks("stdout");ci.stderr=new Ks("stderr")});var li=w(Se=>{"use strict";y();Object.defineProperty(Se,"__esModule",{value:!0});Se.Performance=Se.OCLIF_MARKER_OWNER=void 0;var rn=S("node:perf_hooks"),uF=qt();Se.OCLIF_MARKER_OWNER="@oclif/core";var Ru=class{owner;name;details;method;module;scope;stopped=!1;startMarker;stopMarker;constructor(t,r,i={}){this.owner=t,this.name=r,this.details=i,this.startMarker=`${this.name}-start`,this.stopMarker=`${this.name}-stop`;let[n,o]=r.split("#"),[s,u]=n.split(".");this.module=s,this.method=u,this.scope=o,rn.performance.mark(this.startMarker)}addDetails(t){this.details={...this.details,...t}}measure(){rn.performance.measure(this.name,this.startMarker,this.stopMarker)}stop(){this.stopped=!0,rn.performance.mark(this.stopMarker)}},Mu=class e{static _oclifPerf;static _results=new Map;static markers=new Map;static async collect(){if(!e.enabled||e._results.size>0)return;let t=[...e.markers.values()];if(t.length!==0){for(let r of t.filter(i=>!i.stopped))r.stop();return new Promise(r=>{new rn.PerformanceObserver(n=>{for(let f of n.getEntries()){let d=e.markers.get(f.name);if(d){let a={details:d.details,duration:f.duration,method:d.method,module:d.module,name:f.name,scope:d.scope},c=e._results.get(d.owner)??[];e._results.set(d.owner,[...c,a])}}let o=e._results.get(Se.OCLIF_MARKER_OWNER)??[],s=o.find(f=>f.name.startsWith("config.runCommand")),u=s?e.getResult(Se.OCLIF_MARKER_OWNER,`plugin.findCommand#${s.details.plugin}.${s.details.command}`)?.duration??0:0,l=Object.fromEntries(o.filter(({name:f})=>f.startsWith("plugin.load#")).sort((f,d)=>d.duration-f.duration).map(({details:f,duration:d,scope:a})=>[a,{details:f,duration:d}])),m=o.filter(({name:f})=>f.startsWith("config.runHook#")).reduce((f,d)=>{let a=d.details.event;if(a)f[a]||(f[a]={}),f[a][d.scope]=d.duration;else{let c=d.scope;f[c]||(f[c]={}),f[c].total=d.duration}return f},{}),p=Object.fromEntries(o.filter(({name:f})=>f.startsWith("config.loadPlugins#")).sort((f,d)=>d.duration-f.duration).map(({duration:f,scope:d})=>[d,f]));e._oclifPerf={hookRunTimes:m,"oclif.commandLoadMs":u,"oclif.commandRunMs":o.find(({name:f})=>f.startsWith("config.runCommand#"))?.duration??0,"oclif.configLoadMs":e.getResult(Se.OCLIF_MARKER_OWNER,"config.load")?.duration??0,"oclif.corePluginsLoadMs":p.core??0,"oclif.initHookMs":m.init?.total??0,"oclif.initMs":e.getResult(Se.OCLIF_MARKER_OWNER,"main.run#init")?.duration??0,"oclif.linkedPluginsLoadMs":p.link??0,"oclif.postrunHookMs":m.postrun?.total??0,"oclif.prerunHookMs":m.prerun?.total??0,"oclif.runMs":e.getResult(Se.OCLIF_MARKER_OWNER,"main.run")?.duration??0,"oclif.userPluginsLoadMs":p.user??0,pluginLoadTimes:l},r()}).observe({buffered:!0,entryTypes:["measure"]});for(let n of t)try{n.measure()}catch{}rn.performance.clearMarks()})}}static debug(){if(!e.enabled)return;let t=ut()("oclif-perf"),r=(process.uptime()*1e3).toFixed(4);t("Process Uptime: %sms",r),t("Oclif Time: %sms",e.oclifPerf["oclif.runMs"].toFixed(4)),t("Init Time: %sms",e.oclifPerf["oclif.initMs"].toFixed(4)),t("Config Load Time: %sms",e.oclifPerf["oclif.configLoadMs"].toFixed(4)),t(" \u2022 Root Plugin Load Time: %sms",e.getResult(Se.OCLIF_MARKER_OWNER,"plugin.load#root")?.duration.toFixed(4)??0),t(" \u2022 Plugins Load Time: %sms",e.getResult(Se.OCLIF_MARKER_OWNER,"config.loadAllPlugins")?.duration.toFixed(4)??0),t(" \u2022 Commands Load Time: %sms",e.getResult(Se.OCLIF_MARKER_OWNER,"config.loadAllCommands")?.duration.toFixed(4)??0),t("Core Plugin Load Time: %sms",e.oclifPerf["oclif.corePluginsLoadMs"].toFixed(4)),t("User Plugin Load Time: %sms",e.oclifPerf["oclif.userPluginsLoadMs"].toFixed(4)),t("Linked Plugin Load Time: %sms",e.oclifPerf["oclif.linkedPluginsLoadMs"].toFixed(4)),t("Plugin Load Times:");for(let[o,s]of Object.entries(e.oclifPerf.pluginLoadTimes))s.details.hasManifest?t(` ${o}: ${s.duration.toFixed(4)}ms`):t(` ${o}: ${s.duration.toFixed(4)}ms (no manifest!)`);t("Hook Run Times:");for(let[o,s]of Object.entries(e.oclifPerf.hookRunTimes)){t(` ${o}:`);for(let[u,l]of Object.entries(s))t(` ${u}: ${l.toFixed(4)}ms`)}t("Command Load Time: %sms",e.oclifPerf["oclif.commandLoadMs"].toFixed(4)),t("Command Run Time: %sms",e.oclifPerf["oclif.commandRunMs"].toFixed(4)),e.oclifPerf["oclif.configLoadMs"]>e.oclifPerf["oclif.runMs"]&&t("! Config load time is greater than total oclif time. This might mean that Config was instantiated before oclif was run.");let i=ut()("non-oclif-perf"),n=e.results;if(n.size>0){i("Non-Core Performance Measurements:");for(let[o,s]of n){i(` ${o}:`);for(let u of s)i(` ${u.name}: ${u.duration.toFixed(4)}ms`)}}}static get enabled(){return uF.settings.performanceEnabled??!1}static getResult(t,r){return e._results.get(t)?.find(i=>i.name===r)}static mark(t,r,i={}){if(!e.enabled)return;let n=new Ru(t,r,i);return e.markers.set(n.name,n),n}static get oclifPerf(){if(!e.enabled)return{};if(e._oclifPerf)return e._oclifPerf;throw new Error("Perf results not available. Did you forget to call await Performance.collect()?")}static get results(){return e.enabled?new Map([...e._results.entries()].filter(([t])=>t!==Se.OCLIF_MARKER_OWNER)):new Map}};Se.Performance=Mu});var Pg=w(hi=>{"use strict";y();Object.defineProperty(hi,"__esModule",{value:!0});hi.getPlatform=hi.getHomeDir=void 0;var kg=S("node:os");function cF(){return(0,kg.homedir)()}hi.getHomeDir=cF;function lF(){return(0,kg.platform)()}hi.getPlatform=lF});var Ig=w(Qs=>{"use strict";y();Object.defineProperty(Qs,"__esModule",{value:!0});Qs.assertValidPattern=void 0;var hF=1024*64,fF=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>hF)throw new TypeError("pattern is too long")};Qs.assertValidPattern=fF});var Rg=w(Zs=>{"use strict";y();Object.defineProperty(Zs,"__esModule",{value:!0});Zs.parseClass=void 0;var pF={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},nn=e=>e.replace(/[[\]\\-]/g,"\\$&"),dF=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ng=e=>e.join(""),mF=(e,t)=>{let r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let i=[],n=[],o=r+1,s=!1,u=!1,l=!1,m=!1,p=r,f="";e:for(;o<e.length;){let h=e.charAt(o);if((h==="!"||h==="^")&&o===r+1){m=!0,o++;continue}if(h==="]"&&s&&!l){p=o+1;break}if(s=!0,h==="\\"&&!l){l=!0,o++;continue}if(h==="["&&!l){for(let[g,[x,v,E]]of Object.entries(pF))if(e.startsWith(g,o)){if(f)return["$.",!1,e.length-r,!0];o+=g.length,E?n.push(x):i.push(x),u=u||v;continue e}}if(l=!1,f){h>f?i.push(nn(f)+"-"+nn(h)):h===f&&i.push(nn(h)),f="",o++;continue}if(e.startsWith("-]",o+1)){i.push(nn(h+"-")),o+=2;continue}if(e.startsWith("-",o+1)){f=h,o+=2;continue}i.push(nn(h)),o++}if(p<o)return["",!1,0,!1];if(!i.length&&!n.length)return["$.",!1,e.length-r,!0];if(n.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!m){let h=i[0].length===2?i[0].slice(-1):i[0];return[dF(h),!1,p-r,!1]}let d="["+(m?"^":"")+Ng(i)+"]",a="["+(m?"":"^")+Ng(n)+"]";return[i.length&&n.length?"("+d+"|"+a+")":i.length?d:a,u,p-r,!0]};Zs.parseClass=mF});var to=w(eo=>{"use strict";y();Object.defineProperty(eo,"__esModule",{value:!0});eo.unescape=void 0;var gF=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");eo.unescape=gF});var ju=w(so=>{"use strict";y();var Ne;Object.defineProperty(so,"__esModule",{value:!0});so.AST=void 0;var yF=Rg(),ro=to(),xF=new Set(["!","?","+","*","@"]),Lu=e=>xF.has(e),Mg=e=>Lu(e.type),vF=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),wF=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),EF=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),Lg=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),bF="(?!(?:^|/)\\.\\.?(?:$|/))",io="(?!\\.)",CF=new Set(["[","."]),DF=new Set(["..","."]),AF=new Set("().*{}+?[]^$\\!"),_F=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Bu="[^/]",Bg=Bu+"*?",jg=Bu+"+?",no=class{type;#r;#i;#n=!1;#e=[];#t;#a;#c;#u=!1;#s;#o;#l=!1;constructor(t,r,i={}){this.type=t,t&&(this.#i=!0),this.#t=r,this.#r=this.#t?this.#t.#r:this,this.#s=this.#r===this?i:this.#r.#s,this.#c=this.#r===this?[]:this.#r.#c,t==="!"&&!this.#r.#u&&this.#c.push(this),this.#a=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#i!==void 0)return this.#i;for(let t of this.#e)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#i=!0;return this.#i}toString(){return this.#o!==void 0?this.#o:this.type?this.#o=this.type+"("+this.#e.map(t=>String(t)).join("|")+")":this.#o=this.#e.map(t=>String(t)).join("")}#y(){if(this!==this.#r)throw new Error("should only call on root");if(this.#u)return this;this.toString(),this.#u=!0;let t;for(;t=this.#c.pop();){if(t.type!=="!")continue;let r=t,i=r.#t;for(;i;){for(let n=r.#a+1;!i.type&&n<i.#e.length;n++)for(let o of t.#e){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(i.#e[n])}r=i,i=r.#t}}return this}push(...t){for(let r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof Ne&&r.#t===this))throw new Error("invalid part: "+r);this.#e.push(r)}}toJSON(){let t=this.type===null?this.#e.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#e.map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#r||this.#r.#u&&this.#t?.type==="!")&&t.push({}),t}isStart(){if(this.#r===this)return!0;if(!this.#t?.isStart())return!1;if(this.#a===0)return!0;let t=this.#t;for(let r=0;r<this.#a;r++){let i=t.#e[r];if(!(i instanceof Ne&&i.type==="!"))return!1}return!0}isEnd(){if(this.#r===this||this.#t?.type==="!")return!0;if(!this.#t?.isEnd())return!1;if(!this.type)return this.#t?.isEnd();let t=this.#t?this.#t.#e.length:0;return this.#a===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let r=new Ne(this.type,t);for(let i of this.#e)r.copyIn(i);return r}static#h(t,r,i,n,o){let s=n.maxExtglobRecursion??2,u=!1,l=!1,m=-1,p=!1;if(r.type===null){let h=i,g="";for(;h<t.length;){let x=t.charAt(h++);if(u||x==="\\"){u=!u,g+=x;continue}if(l){h===m+1?(x==="^"||x==="!")&&(p=!0):x==="]"&&!(h===m+2&&p)&&(l=!1),g+=x;continue}else if(x==="["){l=!0,m=h,p=!1,g+=x;continue}if(!n.noext&&Lu(x)&&t.charAt(h)==="("&&o<=s){r.push(g),g="";let E=new Ne(x,r);h=Ne.#h(t,E,h,n,o+1),r.push(E);continue}g+=x}return r.push(g),h}let f=i+1,d=new Ne(null,r),a=[],c="";for(;f<t.length;){let h=t.charAt(f++);if(u||h==="\\"){u=!u,c+=h;continue}if(l){f===m+1?(h==="^"||h==="!")&&(p=!0):h==="]"&&!(f===m+2&&p)&&(l=!1),c+=h;continue}else if(h==="["){l=!0,m=f,p=!1,c+=h;continue}if(Lu(h)&&t.charAt(f)==="("&&(o<=s||r&&r.#f(h))){let x=r&&r.#f(h)?0:1;d.push(c),c="";let v=new Ne(h,d);d.push(v),f=Ne.#h(t,v,f,n,o+x);continue}if(h==="|"){d.push(c),c="",a.push(d),d=new Ne(null,r);continue}if(h===")")return c===""&&r.#e.length===0&&(r.#l=!0),d.push(c),c="",r.push(...a,d),f;c+=h}return r.type=null,r.#i=void 0,r.#e=[t.substring(i-1)],f}#x(t){return this.#d(t,wF)}#d(t,r=vF){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null)return!1;let i=t.#e[0];return!i||typeof i!="object"||i.type===null?!1:this.#f(i.type,r)}#f(t,r=EF){return!!r.get(this.type)?.includes(t)}#v(t,r){let i=t.#e[0],n=new Ne(null,i,this.options);n.#e.push(""),i.push(n),this.#m(t,r)}#m(t,r){let i=t.#e[0];this.#e.splice(r,1,...i.#e);for(let n of i.#e)typeof n=="object"&&(n.#t=this);this.#o=void 0}#w(t){return!!Lg.get(this.type)?.has(t)}#E(t){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let r=t.#e[0];return!r||typeof r!="object"||r.type===null?!1:this.#w(r.type)}#b(t){let r=Lg.get(this.type),i=t.#e[0],n=r?.get(i.type);if(!n)return!1;this.#e=i.#e;for(let o of this.#e)typeof o=="object"&&(o.#t=this);this.type=n,this.#o=void 0,this.#l=!1}#p(){if(Mg(this)){let t=0,r=!1;do{r=!0;for(let i=0;i<this.#e.length;i++){let n=this.#e[i];typeof n=="object"&&(n.#p(),this.#d(n)?(r=!1,this.#m(n,i)):this.#x(n)?(r=!1,this.#v(n,i)):this.#E(n)&&(r=!1,this.#b(n)))}}while(!r&&++t<10)}else for(let t of this.#e)typeof t=="object"&&t.#p();this.#o=void 0}static fromGlob(t,r={}){let i=new Ne(null,void 0,r);return Ne.#h(t,i,0,r,0),i}toMMPattern(){if(this!==this.#r)return this.#r.toMMPattern();let t=this.toString(),[r,i,n,o]=this.toRegExpSource();if(!(n||this.#i||this.#s.nocase&&!this.#s.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return i;let u=(this.#s.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${r}$`,u),{_src:r,_glob:t})}get options(){return this.#s}toRegExpSource(t){let r=t??!!this.#s.dot;if(this.#r===this&&(this.#p(),this.#y()),!Mg(this)){let l=this.isStart()&&this.isEnd(),m=this.#e.map(a=>{let[c,h,g,x]=typeof a=="string"?Ne.#C(a,this.#i,l):a.toRegExpSource(t);return this.#i=this.#i||g,this.#n=this.#n||x,c}).join(""),p="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&DF.has(this.#e[0]))){let c=CF,h=r&&c.has(m.charAt(0))||m.startsWith("\\.")&&c.has(m.charAt(2))||m.startsWith("\\.\\.")&&c.has(m.charAt(4)),g=!r&&!t&&c.has(m.charAt(0));p=h?bF:g?io:""}let f="";return this.isEnd()&&this.#r.#u&&this.#t?.type==="!"&&(f="(?:$|\\/)"),[p+m+f,(0,ro.unescape)(m),this.#i=!!this.#i,this.#n]}let i=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",o=this.#g(r);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){let l=this.toString(),m=this;return m.#e=[l],m.type=null,m.#i=void 0,[l,(0,ro.unescape)(this.toString()),!1,!1]}let s=!i||t||r||!io?"":this.#g(!0);s===o&&(s=""),s&&(o=`(?:${o})(?:${s})*?`);let u="";if(this.type==="!"&&this.#l)u=(this.isStart()&&!r?io:"")+jg;else{let l=this.type==="!"?"))"+(this.isStart()&&!r&&!t?io:"")+Bg+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&s?")":this.type==="*"&&s?")?":`)${this.type}`;u=n+o+l}return[u,(0,ro.unescape)(o),this.#i=!!this.#i,this.#n]}#g(t){return this.#e.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[i,n,o,s]=r.toRegExpSource(t);return this.#n=this.#n||s,i}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#C(t,r,i=!1){let n=!1,o="",s=!1,u=!1;for(let l=0;l<t.length;l++){let m=t.charAt(l);if(n){n=!1,o+=(AF.has(m)?"\\":"")+m,u=!1;continue}if(m==="\\"){l===t.length-1?o+="\\\\":n=!0;continue}if(m==="["){let[p,f,d,a]=(0,yF.parseClass)(t,l);if(d){o+=p,s=s||f,l+=d-1,r=r||a,u=!1;continue}}if(m==="*"){if(u)continue;u=!0,o+=i&&/^[*]+$/.test(t)?jg:Bg,r=!0;continue}else u=!1;if(m==="?"){o+=Bu,r=!0;continue}o+=_F(m)}return[o,(0,ro.unescape)(t),!!r,s]}};so.AST=no;Ne=no});var $u=w(oo=>{"use strict";y();Object.defineProperty(oo,"__esModule",{value:!0});oo.escape=void 0;var SF=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");oo.escape=SF});var Jg=w(O=>{"use strict";y();var FF=O&&O.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(O,"__esModule",{value:!0});O.unescape=O.escape=O.AST=O.Minimatch=O.match=O.makeRe=O.braceExpand=O.defaults=O.filter=O.GLOBSTAR=O.sep=O.minimatch=void 0;var TF=FF(Pv()),ao=Ig(),Hg=ju(),OF=$u(),kF=to(),PF=(e,t,r={})=>((0,ao.assertValidPattern)(t),!r.nocomment&&t.charAt(0)==="#"?!1:new Cr(t,r).match(e));O.minimatch=PF;var IF=/^\*+([^+@!?\*\[\(]*)$/,NF=e=>t=>!t.startsWith(".")&&t.endsWith(e),RF=e=>t=>t.endsWith(e),MF=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),LF=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),BF=/^\*+\.\*+$/,jF=e=>!e.startsWith(".")&&e.includes("."),$F=e=>e!=="."&&e!==".."&&e.includes("."),qF=/^\.\*+$/,HF=e=>e!=="."&&e!==".."&&e.startsWith("."),UF=/^\*+$/,WF=e=>e.length!==0&&!e.startsWith("."),zF=e=>e.length!==0&&e!=="."&&e!=="..",JF=/^\?+([^+@!?\*\[\(]*)?$/,GF=([e,t=""])=>{let r=Ug([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},VF=([e,t=""])=>{let r=Wg([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},YF=([e,t=""])=>{let r=Wg([e]);return t?i=>r(i)&&i.endsWith(t):r},XF=([e,t=""])=>{let r=Ug([e]);return t?i=>r(i)&&i.endsWith(t):r},Ug=([e])=>{let t=e.length;return r=>r.length===t&&!r.startsWith(".")},Wg=([e])=>{let t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},zg=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",$g={win32:{sep:"\\"},posix:{sep:"/"}};O.sep=zg==="win32"?$g.win32.sep:$g.posix.sep;O.minimatch.sep=O.sep;O.GLOBSTAR=Symbol("globstar **");O.minimatch.GLOBSTAR=O.GLOBSTAR;var KF="[^/]",QF=KF+"*?",ZF="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",eT="(?:(?!(?:\\/|^)\\.).)*?",tT=(e,t={})=>r=>(0,O.minimatch)(r,e,t);O.filter=tT;O.minimatch.filter=O.filter;var Ve=(e,t={})=>Object.assign({},e,t),rT=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return O.minimatch;let t=O.minimatch;return Object.assign((i,n,o={})=>t(i,n,Ve(e,o)),{Minimatch:class extends t.Minimatch{constructor(n,o={}){super(n,Ve(e,o))}static defaults(n){return t.defaults(Ve(e,n)).Minimatch}},AST:class extends t.AST{constructor(n,o,s={}){super(n,o,Ve(e,s))}static fromGlob(n,o={}){return t.AST.fromGlob(n,Ve(e,o))}},unescape:(i,n={})=>t.unescape(i,Ve(e,n)),escape:(i,n={})=>t.escape(i,Ve(e,n)),filter:(i,n={})=>t.filter(i,Ve(e,n)),defaults:i=>t.defaults(Ve(e,i)),makeRe:(i,n={})=>t.makeRe(i,Ve(e,n)),braceExpand:(i,n={})=>t.braceExpand(i,Ve(e,n)),match:(i,n,o={})=>t.match(i,n,Ve(e,o)),sep:t.sep,GLOBSTAR:O.GLOBSTAR})};O.defaults=rT;O.minimatch.defaults=O.defaults;var iT=(e,t={})=>((0,ao.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,TF.default)(e));O.braceExpand=iT;O.minimatch.braceExpand=O.braceExpand;var nT=(e,t={})=>new Cr(e,t).makeRe();O.makeRe=nT;O.minimatch.makeRe=O.makeRe;var sT=(e,t,r={})=>{let i=new Cr(t,r);return e=e.filter(n=>i.match(n)),i.options.nonull&&!e.length&&e.push(t),e};O.match=sT;O.minimatch.match=O.match;var qg=/[?*]|[+@!]\(.*?\)|\[|\]/,oT=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Cr=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,r={}){(0,ao.assertValidPattern)(t),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=t,this.platform=r.platform||zg,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((o,s,u)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=o[0]===""&&o[1]===""&&(o[2]==="?"||!qg.test(o[2]))&&!qg.test(o[3]),m=/^[a-z]:/i.test(o[0]);if(l)return[...o.slice(0,4),...o.slice(4).map(p=>this.parse(p))];if(m)return[o[0],...o.slice(1).map(p=>this.parse(p))]}return o.map(l=>this.parse(l))});if(this.debug(this.pattern,n),this.set=n.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){let s=this.set[o];s[0]===""&&s[1]===""&&this.globParts[o][2]==="?"&&typeof s[3]=="string"&&/^[a-z]:$/i.test(s[3])&&(s[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let i=0;i<t.length;i++)for(let n=0;n<t[i].length;n++)t[i][n]==="**"&&(t[i][n]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let n=i;for(;r[n+1]==="**";)n++;n!==i&&r.splice(i,n-i)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((i,n)=>{let o=i[i.length-1];return n==="**"&&o==="**"?i:n===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(i.pop(),i):(i.push(n),i)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){let o=t[n];n===1&&o===""&&t[0]===""||(o==="."||o==="")&&(r=!0,t.splice(n,1),n--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let i=0;for(;(i=t.indexOf("..",i+1))!==-1;){let n=t[i-1];n&&n!=="."&&n!==".."&&n!=="**"&&(r=!0,t.splice(i-1,2),i-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let i of t){let n=-1;for(;(n=i.indexOf("**",n+1))!==-1;){let s=n;for(;i[s+1]==="**";)s++;s>n&&i.splice(n+1,s-n);let u=i[n+1],l=i[n+2],m=i[n+3];if(u!==".."||!l||l==="."||l===".."||!m||m==="."||m==="..")continue;r=!0,i.splice(n,1);let p=i.slice(0);p[n]="**",t.push(p),n--}if(!this.preserveMultipleSlashes){for(let s=1;s<i.length-1;s++){let u=i[s];s===1&&u===""&&i[0]===""||(u==="."||u==="")&&(r=!0,i.splice(s,1),s--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(r=!0,i.pop())}let o=0;for(;(o=i.indexOf("..",o+1))!==-1;){let s=i[o-1];if(s&&s!=="."&&s!==".."&&s!=="**"){r=!0;let l=o===1&&i[o+1]==="**"?["."]:[];i.splice(o-1,2,...l),i.length===0&&i.push(""),o-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let i=r+1;i<t.length;i++){let n=this.partsMatch(t[r],t[i],!this.preserveMultipleSlashes);if(n){t[r]=[],t[i]=n;break}}return t.filter(r=>r.length)}partsMatch(t,r,i=!1){let n=0,o=0,s=[],u="";for(;n<t.length&&o<r.length;)if(t[n]===r[o])s.push(u==="b"?r[o]:t[n]),n++,o++;else if(i&&t[n]==="**"&&r[o]===t[n+1])s.push(t[n]),n++;else if(i&&r[o]==="**"&&t[n]===r[o+1])s.push(r[o]),o++;else if(t[n]==="*"&&r[o]&&(this.options.dot||!r[o].startsWith("."))&&r[o]!=="**"){if(u==="b")return!1;u="a",s.push(t[n]),n++,o++}else if(r[o]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(u==="a")return!1;u="b",s.push(r[o]),n++,o++}else return!1;return t.length===r.length&&s}parseNegate(){if(this.nonegate)return;let t=this.pattern,r=!1,i=0;for(let n=0;n<t.length&&t.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=t.slice(i)),this.negate=r}matchOne(t,r,i=!1){let n=0,o=0;if(this.isWindows){let u=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),l=!u&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),m=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),p=!m&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),f=l?3:u?0:void 0,d=p?3:m?0:void 0;if(typeof f=="number"&&typeof d=="number"){let[a,c]=[t[f],r[d]];a.toLowerCase()===c.toLowerCase()&&(r[d]=a,o=d,n=f)}}let{optimizationLevel:s=1}=this.options;return s>=2&&(t=this.levelTwoFileOptimize(t)),r.includes(O.GLOBSTAR)?this.#r(t,r,i,n,o):this.#n(t,r,i,n,o)}#r(t,r,i,n,o){let s=r.indexOf(O.GLOBSTAR,o),u=r.lastIndexOf(O.GLOBSTAR),[l,m,p]=i?[r.slice(o,s),r.slice(s+1),[]]:[r.slice(o,s),r.slice(s+1,u),r.slice(u+1)];if(l.length){let v=t.slice(n,n+l.length);if(!this.#n(v,l,i,0,0))return!1;n+=l.length}let f=0;if(p.length){if(p.length+n>t.length)return!1;let v=t.length-p.length;if(this.#n(t,p,i,v,0))f=p.length;else{if(t[t.length-1]!==""||n+p.length===t.length||(v--,!this.#n(t,p,i,v,0)))return!1;f=p.length+1}}if(!m.length){let v=!!f;for(let E=n;E<t.length-f;E++){let D=String(t[E]);if(v=!0,D==="."||D===".."||!this.options.dot&&D.startsWith("."))return!1}return i||v}let d=[[[],0]],a=d[0],c=0,h=[0];for(let v of m)v===O.GLOBSTAR?(h.push(c),a=[[],0],d.push(a)):(a[0].push(v),c++);let g=d.length-1,x=t.length-f;for(let v of d)v[1]=x-(h[g--]+v[0].length);return!!this.#i(t,d,n,0,i,0,!!f)}#i(t,r,i,n,o,s,u){let l=r[n];if(!l){for(let f=i;f<t.length;f++){u=!0;let d=t[f];if(d==="."||d===".."||!this.options.dot&&d.startsWith("."))return!1}return u}let[m,p]=l;for(;i<=p;){if(this.#n(t.slice(0,i+m.length),m,o,i,0)&&s<this.maxGlobstarRecursion){let a=this.#i(t,r,i+m.length,n+1,o,s+1,u);if(a!==!1)return a}let d=t[i];if(d==="."||d===".."||!this.options.dot&&d.startsWith("."))return!1;i++}return o||null}#n(t,r,i,n,o){let s,u,l,m;for(s=n,u=o,m=t.length,l=r.length;s<m&&u<l;s++,u++){this.debug("matchOne loop");let p=r[u],f=t[s];if(this.debug(r,p,f),p===!1||p===O.GLOBSTAR)return!1;let d;if(typeof p=="string"?(d=f===p,this.debug("string match",p,f,d)):(d=p.test(f),this.debug("pattern match",p,f,d)),!d)return!1}if(s===m&&u===l)return!0;if(s===m)return i;if(u===l)return s===m-1&&t[s]==="";throw new Error("wtf?")}braceExpand(){return(0,O.braceExpand)(this.pattern,this.options)}parse(t){(0,ao.assertValidPattern)(t);let r=this.options;if(t==="**")return O.GLOBSTAR;if(t==="")return"";let i,n=null;(i=t.match(UF))?n=r.dot?zF:WF:(i=t.match(IF))?n=(r.nocase?r.dot?LF:MF:r.dot?RF:NF)(i[1]):(i=t.match(JF))?n=(r.nocase?r.dot?VF:GF:r.dot?YF:XF)(i):(i=t.match(BF))?n=r.dot?$F:jF:(i=t.match(qF))&&(n=HF);let o=Hg.AST.fromGlob(t,this.options).toMMPattern();return n&&typeof o=="object"&&Reflect.defineProperty(o,"test",{value:n}),o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let r=this.options,i=r.noglobstar?QF:r.dot?ZF:eT,n=new Set(r.nocase?["i"]:[]),o=t.map(l=>{let m=l.map(p=>{if(p instanceof RegExp)for(let f of p.flags.split(""))n.add(f);return typeof p=="string"?oT(p):p===O.GLOBSTAR?O.GLOBSTAR:p._src});return m.forEach((p,f)=>{let d=m[f+1],a=m[f-1];p!==O.GLOBSTAR||a===O.GLOBSTAR||(a===void 0?d!==void 0&&d!==O.GLOBSTAR?m[f+1]="(?:\\/|"+i+"\\/)?"+d:m[f]=i:d===void 0?m[f-1]=a+"(?:\\/|"+i+")?":d!==O.GLOBSTAR&&(m[f-1]=a+"(?:\\/|\\/"+i+"\\/)"+d,m[f+1]=O.GLOBSTAR))}),m.filter(p=>p!==O.GLOBSTAR).join("/")}).join("|"),[s,u]=t.length>1?["(?:",")"]:["",""];o="^"+s+o+u+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;let i=this.options;this.isWindows&&(t=t.split("\\").join("/"));let n=this.slashSplit(t);this.debug(this.pattern,"split",n);let o=this.set;this.debug(this.pattern,"set",o);let s=n[n.length-1];if(!s)for(let u=n.length-2;!s&&u>=0;u--)s=n[u];for(let u=0;u<o.length;u++){let l=o[u],m=n;if(i.matchBase&&l.length===1&&(m=[s]),this.matchOne(m,l,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(t){return O.minimatch.defaults(t).Minimatch}};O.Minimatch=Cr;var aT=ju();Object.defineProperty(O,"AST",{enumerable:!0,get:function(){return aT.AST}});var uT=$u();Object.defineProperty(O,"escape",{enumerable:!0,get:function(){return uT.escape}});var cT=to();Object.defineProperty(O,"unescape",{enumerable:!0,get:function(){return cT.unescape}});O.minimatch.AST=Hg.AST;O.minimatch.Minimatch=Cr;O.minimatch.escape=OF.escape;O.minimatch.unescape=kF.unescape});var Vg=w((YB,Gg)=>{"use strict";y();Gg.exports=(...e)=>[...new Set([].concat(...e))]});var Xg=w(Dr=>{"use strict";y();var{promisify:lT}=S("util"),Yg=S("fs");async function qu(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await lT(Yg[e])(r))[t]()}catch(i){if(i.code==="ENOENT")return!1;throw i}}function Hu(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return Yg[e](r)[t]()}catch(i){if(i.code==="ENOENT")return!1;throw i}}Dr.isFile=qu.bind(null,"stat","isFile");Dr.isDirectory=qu.bind(null,"stat","isDirectory");Dr.isSymlink=qu.bind(null,"lstat","isSymbolicLink");Dr.isFileSync=Hu.bind(null,"statSync","isFile");Dr.isDirectorySync=Hu.bind(null,"statSync","isDirectory");Dr.isSymlinkSync=Hu.bind(null,"lstatSync","isSymbolicLink")});var t0=w((ZB,Uu)=>{"use strict";y();var Ar=S("path"),Kg=Xg(),Qg=e=>e.length>1?`{${e.join(",")}}`:e[0],Zg=(e,t)=>{let r=e[0]==="!"?e.slice(1):e;return Ar.isAbsolute(r)?r:Ar.join(t,r)},hT=(e,t)=>Ar.extname(e)?`**/${e}`:`**/${e}.${Qg(t)}`,e0=(e,t)=>{if(t.files&&!Array.isArray(t.files))throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof t.files}\``);if(t.extensions&&!Array.isArray(t.extensions))throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof t.extensions}\``);return t.files&&t.extensions?t.files.map(r=>Ar.posix.join(e,hT(r,t.extensions))):t.files?t.files.map(r=>Ar.posix.join(e,`**/${r}`)):t.extensions?[Ar.posix.join(e,`**/*.${Qg(t.extensions)}`)]:[Ar.posix.join(e,"**")]};Uu.exports=async(e,t)=>{if(t={cwd:process.cwd(),...t},typeof t.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);let r=await Promise.all([].concat(e).map(async i=>await Kg.isDirectory(Zg(i,t.cwd))?e0(i,t):i));return[].concat.apply([],r)};Uu.exports.sync=(e,t)=>{if(t={cwd:process.cwd(),...t},typeof t.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);let r=[].concat(e).map(i=>Kg.isDirectorySync(Zg(i,t.cwd))?e0(i,t):i);return[].concat.apply([],r)}});var l0=w((tj,c0)=>{y();function r0(e){return Array.isArray(e)?e:[e]}var Ju="",i0=" ",Wu="\\",fT=/^\s+$/,pT=/(?:[^\\]|^)\\$/,dT=/^\\!/,mT=/^\\#/,gT=/\r?\n/g,yT=/^\.*\/|^\.+$/,zu="/",o0="node-ignore";typeof Symbol<"u"&&(o0=Symbol.for("node-ignore"));var n0=o0,xT=(e,t,r)=>Object.defineProperty(e,t,{value:r}),vT=/([0-z])-([0-z])/g,a0=()=>!1,wT=e=>e.replace(vT,(t,r,i)=>r.charCodeAt(0)<=i.charCodeAt(0)?t:Ju),ET=e=>{let{length:t}=e;return e.slice(0,t-t%2)},bT=[[/^\uFEFF/,()=>Ju],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,r)=>t+(r.indexOf("\\")===0?i0:Ju)],[/(\\+?)\s/g,(e,t)=>{let{length:r}=t;return t.slice(0,r-r%2)+i0}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,r)=>t+6<r.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,r)=>{let i=r.replace(/\\\*/g,"[^\\/]*");return t+i}],[/\\\\\\(?=[$.|*+(){^])/g,()=>Wu],[/\\\\/g,()=>Wu],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,r,i,n)=>t===Wu?`\\[${r}${ET(i)}${n}`:n==="]"&&i.length%2===0?`[${wT(r)}${i}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:"[^/]*"}(?=$|\\/$)`]],s0=Object.create(null),CT=(e,t)=>{let r=s0[e];return r||(r=bT.reduce((i,[n,o])=>i.replace(n,o.bind(e)),e),s0[e]=r),t?new RegExp(r,"i"):new RegExp(r)},Yu=e=>typeof e=="string",DT=e=>e&&Yu(e)&&!fT.test(e)&&!pT.test(e)&&e.indexOf("#")!==0,AT=e=>e.split(gT),Gu=class{constructor(t,r,i,n){this.origin=t,this.pattern=r,this.negative=i,this.regex=n}},_T=(e,t)=>{let r=e,i=!1;e.indexOf("!")===0&&(i=!0,e=e.substr(1)),e=e.replace(dT,"!").replace(mT,"#");let n=CT(e,t);return new Gu(r,e,i,n)},ST=(e,t)=>{throw new t(e)},Ft=(e,t,r)=>Yu(e)?e?Ft.isNotRelative(e)?r(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:r("path must not be empty",TypeError):r(`path must be a string, but got \`${t}\``,TypeError),u0=e=>yT.test(e);Ft.isNotRelative=u0;Ft.convert=e=>e;var Vu=class{constructor({ignorecase:t=!0,ignoreCase:r=t,allowRelativePaths:i=!1}={}){xT(this,n0,!0),this._rules=[],this._ignoreCase=r,this._allowRelativePaths=i,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[n0]){this._rules=this._rules.concat(t._rules),this._added=!0;return}if(DT(t)){let r=_T(t,this._ignoreCase);this._added=!0,this._rules.push(r)}}add(t){return this._added=!1,r0(Yu(t)?AT(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,r){let i=!1,n=!1;return this._rules.forEach(o=>{let{negative:s}=o;if(n===s&&i!==n||s&&!i&&!n&&!r)return;o.regex.test(t)&&(i=!s,n=s)}),{ignored:i,unignored:n}}_test(t,r,i,n){let o=t&&Ft.convert(t);return Ft(o,t,this._allowRelativePaths?a0:ST),this._t(o,r,i,n)}_t(t,r,i,n){if(t in r)return r[t];if(n||(n=t.split(zu)),n.pop(),!n.length)return r[t]=this._testOne(t,i);let o=this._t(n.join(zu)+zu,r,i,n);return r[t]=o.ignored?o:this._testOne(t,i)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return r0(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}},uo=e=>new Vu(e),FT=e=>Ft(e&&Ft.convert(e),e,a0);uo.isPathValid=FT;uo.default=uo;c0.exports=uo;if(typeof process<"u"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let e=r=>/^\\\\\?\\/.test(r)||/["<>|\u0000-\u001F]+/u.test(r)?r:r.replace(/\\/g,"/");Ft.convert=e;let t=/^[a-z]:\//i;Ft.isNotRelative=r=>t.test(r)||u0(r)}});var f0=w((ij,h0)=>{"use strict";y();h0.exports=e=>{let t=/^\\\\\?\\/.test(e),r=/[^\u0000-\u0080]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}});var v0=w((sj,Xu)=>{"use strict";y();var{promisify:TT}=S("util"),p0=S("fs"),Tt=S("path"),d0=Cl(),OT=l0(),sn=f0(),m0=["**/node_modules/**","**/flow-typed/**","**/coverage/**","**/.git"],kT=TT(p0.readFile),PT=e=>t=>t.startsWith("!")?"!"+Tt.posix.join(e,t.slice(1)):Tt.posix.join(e,t),IT=(e,t)=>{let r=sn(Tt.relative(t.cwd,Tt.dirname(t.fileName)));return e.split(/\r?\n/).filter(Boolean).filter(i=>!i.startsWith("#")).map(PT(r))},g0=e=>{let t=OT();for(let r of e)t.add(IT(r.content,{cwd:r.cwd,fileName:r.filePath}));return t},NT=(e,t)=>{if(e=sn(e),Tt.isAbsolute(t)){if(sn(t).startsWith(e))return t;throw new Error(`Path ${t} is not in cwd ${e}`)}return Tt.join(e,t)},y0=(e,t)=>r=>e.ignores(sn(Tt.relative(t,NT(t,r.path||r)))),RT=async(e,t)=>{let r=Tt.join(t,e),i=await kT(r,"utf8");return{cwd:t,filePath:r,content:i}},MT=(e,t)=>{let r=Tt.join(t,e),i=p0.readFileSync(r,"utf8");return{cwd:t,filePath:r,content:i}},x0=({ignore:e=[],cwd:t=sn(process.cwd())}={})=>({ignore:e,cwd:t});Xu.exports=async e=>{e=x0(e);let t=await d0("**/.gitignore",{ignore:m0.concat(e.ignore),cwd:e.cwd}),r=await Promise.all(t.map(n=>RT(n,e.cwd))),i=g0(r);return y0(i,e.cwd)};Xu.exports.sync=e=>{e=x0(e);let r=d0.sync("**/.gitignore",{ignore:m0.concat(e.ignore),cwd:e.cwd}).map(n=>MT(n,e.cwd)),i=g0(r);return y0(i,e.cwd)}});var E0=w((aj,w0)=>{"use strict";y();var{Transform:LT}=S("stream"),co=class extends LT{constructor(){super({objectMode:!0})}},Ku=class extends co{constructor(t){super(),this._filter=t}_transform(t,r,i){this._filter(t)&&this.push(t),i()}},Qu=class extends co{constructor(){super(),this._pushed=new Set}_transform(t,r,i){this._pushed.has(t)||(this.push(t),this._pushed.add(t)),i()}};w0.exports={FilterStream:Ku,UniqueStream:Qu}});var _0=w((cj,_r)=>{"use strict";y();var C0=S("fs"),lo=Vg(),BT=vv(),ho=Cl(),fo=t0(),Zu=v0(),{FilterStream:jT,UniqueStream:$T}=E0(),D0=()=>!1,b0=e=>e[0]==="!",qT=e=>{if(!e.every(t=>typeof t=="string"))throw new TypeError("Patterns must be a string or an array of strings")},HT=(e={})=>{if(!e.cwd)return;let t;try{t=C0.statSync(e.cwd)}catch{return}if(!t.isDirectory())throw new Error("The `cwd` option must be a path to a directory")},UT=e=>e.stats instanceof C0.Stats?e.path:e,po=(e,t)=>{e=lo([].concat(e)),qT(e),HT(t);let r=[];t={ignore:[],expandDirectories:!0,...t};for(let[i,n]of e.entries()){if(b0(n))continue;let o=e.slice(i).filter(u=>b0(u)).map(u=>u.slice(1)),s={...t,ignore:t.ignore.concat(o)};r.push({pattern:n,options:s})}return r},WT=(e,t)=>{let r={};return e.options.cwd&&(r.cwd=e.options.cwd),Array.isArray(e.options.expandDirectories)?r={...r,files:e.options.expandDirectories}:typeof e.options.expandDirectories=="object"&&(r={...r,...e.options.expandDirectories}),t(e.pattern,r)},ec=(e,t)=>e.options.expandDirectories?WT(e,t):[e.pattern],A0=e=>e&&e.gitignore?Zu.sync({cwd:e.cwd,ignore:e.ignore}):D0,tc=e=>t=>{let{options:r}=e;return r.ignore&&Array.isArray(r.ignore)&&r.expandDirectories&&(r.ignore=fo.sync(r.ignore)),{pattern:t,options:r}};_r.exports=async(e,t)=>{let r=po(e,t),i=async()=>t&&t.gitignore?Zu({cwd:t.cwd,ignore:t.ignore}):D0,n=async()=>{let l=await Promise.all(r.map(async m=>{let p=await ec(m,fo);return Promise.all(p.map(tc(m)))}));return lo(...l)},[o,s]=await Promise.all([i(),n()]),u=await Promise.all(s.map(l=>ho(l.pattern,l.options)));return lo(...u).filter(l=>!o(UT(l)))};_r.exports.sync=(e,t)=>{let r=po(e,t),i=[];for(let s of r){let u=ec(s,fo.sync).map(tc(s));i.push(...u)}let n=A0(t),o=[];for(let s of i)o=lo(o,ho.sync(s.pattern,s.options));return o.filter(s=>!n(s))};_r.exports.stream=(e,t)=>{let r=po(e,t),i=[];for(let u of r){let l=ec(u,fo.sync).map(tc(u));i.push(...l)}let n=A0(t),o=new jT(u=>!n(u)),s=new $T;return BT(i.map(u=>ho.stream(u.pattern,u.options))).pipe(o).pipe(s)};_r.exports.generateGlobTasks=po;_r.exports.hasMagic=(e,t)=>[].concat(e).some(r=>ho.isDynamicPattern(r,t));_r.exports.gitignore=Zu});var rc=w(mo=>{"use strict";y();Object.defineProperty(mo,"__esModule",{value:!0});mo.aggregateFlags=void 0;var zT=qs(),JT=(0,zT.boolean)({description:"Format output as json.",helpGroup:"GLOBAL"});function GT(e,t,r){let i={...t,...e};return r?{json:JT,...i}:i}mo.aggregateFlags=GT});var T0=w(go=>{"use strict";y();Object.defineProperty(go,"__esModule",{value:!0});go.cacheCommand=void 0;var VT=rc(),S0=Na(),YT=fs(),XT=le();function F0(e,t){let r=Object.getPrototypeOf(t),i=(0,XT.pickBy)(r,n=>n!==void 0);return Object.keys(r).length>0?F0({...i,...e},r):e}async function KT(e,t){let r=Object.entries(e).map(async([i,n])=>[i,{aliases:n.aliases,char:n.char,charAliases:n.charAliases,dependsOn:n.dependsOn,deprecateAliases:n.deprecateAliases,deprecated:n.deprecated,description:n.description,env:n.env,exclusive:n.exclusive,helpGroup:n.helpGroup,helpLabel:n.helpLabel,hidden:n.hidden,name:i,noCacheDefault:n.noCacheDefault,relationships:n.relationships,required:n.required,summary:n.summary,...n.type==="boolean"?{allowNo:n.allowNo,type:n.type}:{default:await(0,S0.cacheDefaultValue)(n,t),delimiter:n.delimiter,hasDynamicHelp:typeof n.defaultHelp=="function",helpValue:n.helpValue,multiple:n.multiple,options:n.options,type:n.type}}]);return Object.fromEntries(await Promise.all(r))}async function QT(e,t){let r=Object.entries(e).map(async([i,n])=>[i,{default:await(0,S0.cacheDefaultValue)(n,t),description:n.description,hidden:n.hidden,name:i,noCacheDefault:n.noCacheDefault,options:n.options,required:n.required}]);return Object.fromEntries(await Promise.all(r))}async function ZT(e,t,r=!1){let i=F0(e,e),n=i.flags??i._flags,o=i.baseFlags??i._baseFlags,[s,u]=await Promise.all([await KT((0,VT.aggregateFlags)(n,o,i.enableJsonFlag),r),await QT((0,YT.ensureArgObject)(i.args),r)]),l={aliases:i.aliases??[],args:u,deprecateAliases:i.deprecateAliases,deprecationOptions:i.deprecationOptions,description:i.description,examples:i.examples??i.example,flags:s,hasDynamicHelp:Object.values(s).some(a=>a.hasDynamicHelp),hidden:i.hidden,hiddenAliases:i.hiddenAliases??[],id:i.id,pluginAlias:t&&t.alias,pluginName:t&&t.name,pluginType:t&&t.type,state:i.state,strict:i.strict,summary:i.summary,usage:i.usage},m=["plugin","_flags","_enableJsonFlag","_globalFlags","_baseFlags","baseFlags","_--","_base"],p=new Set([...Object.keys(l),...m]),f=Object.keys(i).filter(a=>!p.has(a)),d=Object.fromEntries(f.map(a=>[a,i[a]]));return{...l,...d}}go.cacheCommand=ZT});var k0=w(fi=>{"use strict";y();var eO=fi&&fi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fi,"__esModule",{value:!0});fi.findRoot=void 0;var tO=eO(ut()),Re=S("node:path"),yo=Dt(),He=(0,tO.default)("find-root");function*ic(e){for(;(0,Re.dirname)(e)!==e;)yield e,e=(0,Re.dirname)(e);yield e}async function O0(e,t){if(He.extend(t??"root-plugin")(`Finding root starting at ${e}`),t){for(let r of ic(e))if(r.endsWith((0,Re.basename)(t)))return He.extend(t)("Found root based on plugin name!"),r}for(let r of ic(e))if(!((0,Re.basename)((0,Re.dirname)(r))==="bin"&&["dev","dev.cmd","dev.js","run","run.cmd","run.js"].includes((0,Re.basename)(r))))try{let i=(0,Re.join)(r,"package.json");if(He.extend(t??"root-plugin")(`Checking ${i}`),await(0,yo.safeReadJson)(i))return He.extend(t??"root-plugin")("Found root by traversing up from starting point!"),(0,Re.dirname)(i)}catch{}}async function rO(e,t){He.extend(e??"root-plugin")("Finding root using legacy method");for(let r of ic(t)){let i;if(e){if(i=(0,Re.join)(r,"node_modules",e,"package.json"),await(0,yo.safeReadJson)(i))return(0,Re.dirname)(i);if((await(0,yo.safeReadJson)((0,Re.join)(r,"package.json")))?.name===e)return r}else if(i=(0,Re.join)(r,"package.json"),await(0,yo.safeReadJson)(i))return(0,Re.dirname)(i)}}var Vt;function iO(e){if(Vt)return Vt;try{return Vt=S(S.resolve("pnpapi",{paths:[e]})),Vt}catch{}}var nc=e=>JSON.stringify(e),nO=(e,t,r)=>nc(e?.packageDependencies.get(r))===nc(t?.packageDependencies.get(r));function sO(e,t){if(iO(t),!Vt)return;He.extend(e)("Finding root for using pnp method");let r=new Set,i=(n,o)=>{let s=nc(n);if(r.has(s))return;let u=Vt.getPackageInformation(n);if(n.name===e)return u.packageLocation;r.add(s);for(let[l,m]of u.packageDependencies){if(m===null||o!==null&&nO(u,o,l))continue;let p=Vt.getLocator(l,m),f=i(p,u);if(f)return f}r.delete(s)};for(let n of Vt.getDependencyTreeRoots()){let o=i(n);if(o)return o}}async function oO(e,t){if(e){He.extend(e)(`Finding root using ${t}`);let i;try{i=S.resolve(e,{paths:[t]}),He.extend(e)("Found starting point with require.resolve")}catch{He.extend(e)("require.resolve could not find plugin starting point")}if(i){let o=await O0((0,Re.dirname)(i),e);if(o)return He.extend(e)(`Found root at ${o}`),o}let n=process.versions.pnp?sO(e,t):await rO(e,t);return He.extend(e)(n?`Found root at ${n}`:"No root found!"),n}He.extend("root-plugin")(`Finding root plugin using ${t}`);let r=await O0(t);return He.extend("root-plugin")(r?`Found root at ${r}`:"No root found!"),r}fi.findRoot=oO});var uc=w(mi=>{"use strict";y();var B0=mi&&mi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mi,"__esModule",{value:!0});mi.Plugin=void 0;var aO=B0(_0()),di=S("node:path"),P0=S("node:util"),uO=B0(it()),on=Ge(),xo=Li(),pi=li(),j0=cs(),cO=T0(),lO=k0(),I0=Dt(),N0=le(),sc=Jr(),vo=zr(),R0=uO.default.getInstance().get("@oclif/core");function oc(e,t){return e?(t=t?`${t}:`:"",Array.isArray(e)?[...e,e.flatMap(r=>oc(r.subtopics,`${t}${r.name}`))]:Object.keys(e).flatMap(r=>(e[r].name=r,[{...e[r],name:`${t}${r}`},...oc(e[r].subtopics,`${t}${e[r].name}`)]))):[]}var hO=(e,t)=>!!(e?.commands[t]&&"isESM"in e.commands[t]&&"relativePath"in e.commands[t]),M0=e=>typeof e.run=="function"?e:e.default&&e.default.run?e.default:Object.values(e).find(t=>typeof t.run=="function"),L0=e=>{if(e&&typeof e.run=="function")return e},$0=["**/*.+(js|cjs|mjs|ts|tsx|mts|cts)","!**/*.+(d.ts|test.ts|test.js|spec.ts|spec.js|d.mts|d.cts)?(x)"];function fO(e){return e.map(t=>{let r=(0,di.parse)(t),i=r.dir.split("/"),n=r.name!=="index"&&r.name,o=[...i,n].filter(Boolean).join(":");return o===""?j0.SINGLE_COMMAND_CLI_SYMBOL:o})}function pO(e,t){if(e){if(typeof e=="string"&&t)return{strategy:"single",target:e};if(typeof e=="string")return{globPatterns:$0,strategy:"pattern",target:e};if(!e.target)throw new on.CLIError("`oclif.commandDiscovery.target` is required.");if(!e.strategy)throw new on.CLIError("`oclif.commandDiscovery.strategy` is required.");return e.strategy==="explicit"&&!e.identifier&&(e.identifier="default"),e}}function dO(e){return typeof e=="string"?{identifier:"default",target:e}:e.identifier?e:{...e,identifier:"default"}}var ac=class{options;alias;alreadyLoaded=!1;children=[];commandIDs=[];commands;commandsDir;hasManifest=!1;hooks;isRoot=!1;manifest;moduleType;name;parent;pjson;root;tag;type;valid=!1;version;_base=`${R0.name}@${R0.version}`;_debug=(0,vo.Debug)();commandCache;commandDiscoveryOpts;flexibleTaxonomy;constructor(t){this.options=t}get topics(){return oc(this.pjson.oclif.topics||{})}async findCommand(t,r={}){let i=pi.Performance.mark(pi.OCLIF_MARKER_OWNER,`plugin.findCommand#${this.name}.${t}`,{id:t,plugin:this.name}),o=await(async()=>{if(this.commandDiscoveryOpts?.strategy==="pattern"){let s=await this.getCommandsDir();if(!s)return;let u,l,m;try{({filePath:m,isESM:l,module:u}=hO(this.manifest,t)?await(0,xo.loadWithDataFromManifest)(this.manifest.commands[t],this.root):await(0,xo.loadWithData)(this,(0,di.join)(s??this.pjson.oclif.commands,...t.split(":")))),this._debug(l?"(import)":"(require)",m)}catch(f){if(!r.must&&f.code==="MODULE_NOT_FOUND")return;throw f}let p=M0(u);return p?(p.id=t,p.plugin=this,p.isESM=l,p.relativePath=(0,di.relative)(this.root,m||"").split(di.sep),p):void 0}if(this.commandDiscoveryOpts?.strategy==="single"||this.commandDiscoveryOpts?.strategy==="explicit"){let s=await this.loadCommandsFromTarget(),u=L0(s?.[t]);return u?(u.id=t,u.plugin=this,u):void 0}})();return!o&&r.must&&(0,on.error)(`command ${t} not found`),i?.stop(),o}async load(){this.type=this.options.type??"core",this.tag=this.options.tag,this.isRoot=this.options.isRoot??!1,this.options.parent&&(this.parent=this.options.parent);let t=this.options.pjson&&this.options.isRoot?this.options.root:this.type==="link"&&!this.parent?this.options.root:await(0,lO.findRoot)(this.options.name,this.options.root);if(!t)throw new on.CLIError(`could not find package.json with ${(0,P0.inspect)(this.options)}`);if(this.root=t,this._debug(`loading ${this.type} plugin from ${t}`),this.pjson=this.options.pjson??await(0,I0.readJson)((0,di.join)(t,"package.json")),this.flexibleTaxonomy=this.options?.flexibleTaxonomy||this.pjson.oclif?.flexibleTaxonomy||!1,this.moduleType=this.pjson.type==="module"?"module":"commonjs",this.name=this.pjson.name,this.alias=this.options.name??this.pjson.name,!this.name)throw new on.CLIError(`no name in package.json (${t})`);this._debug=(0,vo.Debug)(this.name),this.version=this.pjson.version,this.pjson.oclif?this.valid=!0:this.pjson.oclif=this.pjson["cli-engine"]||{},this.hooks=Object.fromEntries(Object.entries(this.pjson.oclif.hooks??{}).map(([r,i])=>[r,(0,N0.castArray)(i).map(n=>dO(n))])),this.commandDiscoveryOpts=pO(this.pjson.oclif?.commands,this.pjson.oclif?.default),this._debug("command discovery options",this.commandDiscoveryOpts),this.manifest=await this._manifest(),this.commands=Object.entries(this.manifest.commands).map(([r,i])=>({...i,load:async()=>this.findCommand(r,{must:!0}),pluginAlias:this.alias,pluginType:i.pluginType==="jit"?"jit":this.type})).sort((r,i)=>r.id.localeCompare(i.id))}async _manifest(){let t=!!this.options.ignoreManifest,r=!!this.options.errorOnManifestCreate,i=!!this.options.respectNoCacheDefault,n=async(u=!1)=>{try{let l=(0,di.join)(this.root,`${u?".":""}oclif.manifest.json`),m=await(0,I0.readJson)(l);if(!process.env.OCLIF_NEXT_VERSION&&m.version.split("-")[0]!==this.version.split("-")[0])process.emitWarning(`Mismatched version in ${this.name} plugin manifest. Expected: ${this.version} Received: ${m.version}
|
|
152
|
+
This usually means you have an oclif.manifest.json file that should be deleted in development. This file should be automatically generated when publishing.`);else return this._debug("using manifest from",l),this.hasManifest=!0,m}catch(l){if(l.code==="ENOENT"){if(!u)return n(!0)}else this.warn(l,"readManifest")}},o=pi.Performance.mark(pi.OCLIF_MARKER_OWNER,`plugin.manifest#${this.name}`,{plugin:this.name});if(!t){let u=await n();if(u)return o?.addDetails({commandCount:Object.keys(u.commands).length,fromCache:!0}),o?.stop(),this.commandIDs=Object.keys(u.commands),u}this.commandIDs=await this.getCommandIDs();let s={commands:(await Promise.all(this.commandIDs.map(async u=>{try{let l=await this.findCommand(u,{must:!0}),m=await(0,cO.cacheCommand)(l,this,i);if(m.id=u,this.flexibleTaxonomy){let p=(0,vo.getCommandIdPermutations)(u),f=m.aliases.flatMap(d=>(0,vo.getCommandIdPermutations)(d));return[u,{...m,aliasPermutations:f,permutations:p}]}return[u,m]}catch(l){let m=`findCommand (${u})`;if(!r)this.warn(l,m);else throw this.addErrorScope(l,m)}}))).filter(u=>!!u).reduce((u,[l,m])=>(u[l]=m,u),{}),version:this.version};return o?.addDetails({commandCount:Object.keys(s.commands).length,fromCache:!1}),o?.stop(),s}addErrorScope(t,r){return t.name=t.name??(0,P0.inspect)(t).trim(),t.detail=(0,N0.compact)([t.detail,`module: ${this._base}`,r&&`task: ${r}`,`plugin: ${this.name}`,`root: ${this.root}`,...t.code?[`code: ${t.code}`]:[],...t.message?[`message: ${t.message}`]:[],"See more details with DEBUG=*"]).join(`
|
|
153
|
+
`),t}async getCommandIDs(){let t=pi.Performance.mark(pi.OCLIF_MARKER_OWNER,`plugin.getCommandIDs#${this.name}`,{plugin:this.name}),r;switch(this.commandDiscoveryOpts?.strategy){case"explicit":{r=await this.getCommandIdsFromTarget()??[];break}case"pattern":{r=await this.getCommandIdsFromPattern();break}case"single":{r=await this.getCommandIdsFromTarget()??[];break}default:r=[]}return this._debug("found commands",r),t?.addDetails({count:r.length}),t?.stop(),r}async getCommandIdsFromPattern(){let t=await this.getCommandsDir();if(!t)return[];this._debug(`loading IDs from ${t}`);let r=await(0,aO.default)(this.commandDiscoveryOpts?.globPatterns??$0,{cwd:t});return fO(r)}async getCommandIdsFromTarget(){if(await this.loadCommandsFromTarget())return Object.entries(await this.loadCommandsFromTarget()??[]).filter(([,r])=>L0(r)).map(([r])=>r)}async getCommandsDir(){return this.commandsDir?this.commandsDir:(this.commandsDir=await(0,sc.tsPath)(this.root,this.commandDiscoveryOpts?.target,this),this.commandsDir)}async loadCommandsFromTarget(){if(this.commandCache)return this.commandCache;if(this.commandDiscoveryOpts?.strategy==="explicit"&&this.commandDiscoveryOpts.target){let t=await(0,sc.tsPath)(this.root,this.commandDiscoveryOpts.target,this),r=await(0,xo.load)(this,t);return this.commandCache=r[this.commandDiscoveryOpts?.identifier??"default"]??{},this.commandCache}if(this.commandDiscoveryOpts?.strategy==="single"&&this.commandDiscoveryOpts.target){let t=await(0,sc.tsPath)(this.root,this.commandDiscoveryOpts?.target??this.root,this),r=await(0,xo.load)(this,t);return this.commandCache={[j0.SINGLE_COMMAND_CLI_SYMBOL]:M0(r)},this.commandCache}}warn(t,r){typeof t=="string"&&(t=new Error(t));let i=this.addErrorScope(t,r);process.emitWarning(i.name,i)}};mi.Plugin=ac});var U0=w(Ot=>{"use strict";y();var mO=Ot&&Ot.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),gO=Ot&&Ot.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),yO=Ot&&Ot.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&mO(t,e,r);return gO(t,e),t};Object.defineProperty(Ot,"__esModule",{value:!0});var xO=Jg(),cc=S("node:path"),gi=li(),lc=Dt(),vO=le(),q0=yO(uc()),wO=zr(),H0=(0,wO.Debug)();function Sr(e,t){return Object.keys(e).filter(r=>t.some(i=>(0,xO.minimatch)(r,i)))}var hc=class{options;errors=[];plugins=new Map;pluginsProvided=!1;constructor(t){this.options=t,t.plugins&&(this.pluginsProvided=!0,this.plugins=Array.isArray(t.plugins)?new Map(t.plugins.map(r=>[r.name,r])):t.plugins)}async loadChildren(t){return(!this.pluginsProvided||t.force)&&(await this.loadUserPlugins(t),await this.loadDevPlugins(t),await this.loadCorePlugins(t)),{errors:this.errors,plugins:this.plugins}}async loadRoot({pjson:t}){let r;if(this.pluginsProvided){let i=[...this.plugins.values()];r=i.find(n=>n.root===this.options.root)??i[0]}else{let i=gi.Performance.mark(gi.OCLIF_MARKER_OWNER,"plugin.load#root");r=new q0.Plugin({isRoot:!0,pjson:t,root:this.options.root}),await r.load(),i?.addDetails({commandCount:r.commands.length,hasManifest:r.hasManifest??!1,name:r.name,topicCount:r.topics.length,type:r.type,usesMain:!!r.pjson.main}),i?.stop()}return this.plugins.set(r.name,r),r}async loadCorePlugins(t){let{plugins:r}=t.rootPlugin.pjson.oclif;if(r){let o=Sr(t.rootPlugin.pjson.dependencies??{},r);await this.loadPlugins(t.rootPlugin.root,"core",o)}let{core:i,path:n}=t.pluginAdditions??{core:[]};if(i)if(n){let o=await(0,lc.readJson)((0,cc.join)(n,"package.json")),s=Sr(o.dependencies??{},i);await this.loadPlugins(n,"core",s)}else{let o=Sr(t.rootPlugin.pjson.dependencies??{},i);await this.loadPlugins(t.rootPlugin.root,"core",o)}}async loadDevPlugins(t){if(t.devPlugins!==!1){if((0,vO.isProd)())return;try{let{devPlugins:r}=t.rootPlugin.pjson.oclif;if(r){let o={...t.rootPlugin.pjson.dependencies,...t.rootPlugin.pjson.devDependencies},s=Sr(o??{},r);await this.loadPlugins(t.rootPlugin.root,"dev",s)}let{dev:i,path:n}=t.pluginAdditions??{core:[]};if(i)if(n){let o=await(0,lc.readJson)((0,cc.join)(n,"package.json")),s={...o.dependencies,...o.devDependencies},u=Sr(s??{},i);await this.loadPlugins(n,"dev",u)}else{let o={...t.rootPlugin.pjson.dependencies,...t.rootPlugin.pjson.devDependencies},s=Sr(o??{},i);await this.loadPlugins(t.rootPlugin.root,"dev",s)}}catch(r){process.emitWarning(r)}}}async loadPlugins(t,r,i,n){if(!i||i.length===0)return;let o=gi.Performance.mark(gi.OCLIF_MARKER_OWNER,`config.loadPlugins#${r}`);H0("loading plugins",i),await Promise.all((i||[]).map(async s=>{try{let u=typeof s=="string"?s:s.name,l={name:u,root:t,type:r};if(typeof s!="string"&&(l.tag=s.tag||l.tag,l.root=s.root||l.root,l.url=s.url),n&&(l.parent=n),this.plugins.has(u))return;let m=gi.Performance.mark(gi.OCLIF_MARKER_OWNER,`plugin.load#${u}`),p=new q0.Plugin(l);if(await p.load(),m?.addDetails({commandCount:p.commands.length,hasManifest:p.hasManifest,name:p.name,topicCount:p.topics.length,type:p.type,usesMain:!!p.pjson.main}),m?.stop(),this.plugins.set(p.name,p),n&&(p.parent=n,n.children||(n.children=[]),n.children.push(p)),p.pjson.oclif.plugins){let f=r==="dev"?{...p.pjson.dependencies,...p.pjson.devDependencies}:p.pjson.dependencies,d=Sr(f??{},p.pjson.oclif.plugins);await this.loadPlugins(p.root,r,d,p)}}catch(u){this.errors.push(u)}})),o?.addDetails({pluginCount:i.length}),o?.stop()}async loadUserPlugins(t){if(t.userPlugins!==!1)try{let r=(0,cc.join)(t.dataDir,"package.json");H0("reading user plugins pjson %s",r);let i=await(0,lc.readJson)(r);i.oclif||(i.oclif={schema:1}),i.oclif.plugins||(i.oclif.plugins=[]),await this.loadPlugins(r,"user",i.oclif.plugins.filter(n=>n.type==="user")),await this.loadPlugins(r,"link",i.oclif.plugins.filter(n=>n.type==="link"))}catch(r){r.code!=="ENOENT"&&process.emitWarning(r)}}};Ot.default=hc});var X0=w((Ye,Y0)=>{"use strict";y();var EO=Ye&&Ye.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),bO=Ye&&Ye.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),CO=Ye&&Ye.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&EO(t,e,r);return bO(t,e),t},mc=Ye&&Ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.Config=void 0;var DO=CO(Ll()),AO=mc(Ev()),yi=S("node:os"),kt=S("node:path"),W0=S("node:url"),V0=mc(it()),_O=tn(),SO=hr(),xi=Ge(),FO=Yr(),TO=Li(),_e=li(),fc=qt(),z0=Dt(),J0=Pg(),wo=le(),OO=mc(U0()),kO=Jr(),un=zr(),an=(0,un.Debug)(),G0=V0.default.getInstance().get("@oclif/core"),pc=`${G0.name}@${G0.version}`,PO=new Set(["preparse"]);function IO(e){let t=e.match(/[^-]+(?:-([^.]+))?/);return t&&t[1]||"stable"}function NO(e){return e&&!!e._base}var Eo=class extends Map{validPermutations=new Map;add(t,r){this.validPermutations.set(t,r);for(let i of(0,un.collectUsableIds)([t]))this.has(i)?this.set(i,this.get(i).add(r)):this.set(i,new Set([r]))}get(t){return super.get(t)??new Set}getAllValid(){return[...this.validPermutations.keys()]}getValid(t){return this.validPermutations.get(t)}hasValid(t){return this.validPermutations.has(t)}},dc=class e{options;arch;bin;binAliases;binPath;cacheDir;channel;configDir;dataDir;debug=0;dirname;errlog;flexibleTaxonomy;home;isSingleCommandCLI=!1;name;npmRegistry;nsisCustomization;pjson;platform;plugins=new Map;root;shell;theme;topicSeparator=":";userAgent;userPJSON;valid;version;warned=!1;windows;_base=pc;_commandIDs;_commands=new Map;_topics=new Map;commandPermutations=new Eo;pluginLoader;rootPlugin;topicPermutations=new Eo;constructor(t){this.options=t}static async load(t=Y0.filename||__dirname){if(typeof t=="string"&&t.startsWith("file://")&&(t=(0,W0.fileURLToPath)(t)),typeof t=="string"&&(t={root:t}),NO(t)){if(pc!==t._base){an(`reloading config from ${t._base} to ${pc}`);let i=new e({...t.options,plugins:t.plugins});return await i.load(),i}return t}let r=new e(t);return await r.load(),r}static get rootPlugin(){return this.rootPlugin}get commandIDs(){return this._commandIDs?this._commandIDs:(this._commandIDs=this.commands.map(t=>t.id),this._commandIDs)}get commands(){return[...this._commands.values()]}get isProd(){return(0,wo.isProd)()}get topics(){return[...this._topics.values()]}get versionDetails(){let[t,r,i]=this.userAgent.split(" ");return{architecture:r,cliVersion:t,nodeVersion:i,osVersion:`${(0,yi.type)()} ${(0,yi.release)()}`,pluginVersions:Object.fromEntries([...this.plugins.values()].map(n=>[n.name,{root:n.root,type:n.type,version:n.version}])),rootPath:this.root,shell:this.shell}}dir(t){let r=process.env[`XDG_${t.toUpperCase()}_HOME`]||this.windows&&process.env.LOCALAPPDATA||(0,kt.join)(this.home,t==="data"?".local/share":"."+t);return(0,kt.join)(r,this.dirname)}findCommand(t,r={}){let i=this.getCmdLookupId(t),n=this._commands.get(i);return r.must&&!n&&(0,xi.error)(`command ${i} not found`),n}findMatches(t,r){let i=r.filter(s=>!(0,FO.getHelpFlagAdditions)(this).includes(s)&&s.startsWith("-")).map(s=>s.replaceAll("-",""));return[...this.commandPermutations.get(t)].map(s=>this._commands.get(s)).filter(s=>{let u=Object.entries(s.flags).flatMap(([l,m])=>m.char?[m.char,l]:[l]);return i.every(l=>u.includes(l))})}findTopic(t,r={}){let i=this.getTopicLookupId(t),n=this._topics.get(i);if(n)return n;if(r.must)throw new Error(`topic ${t} not found`)}getAllCommandIDs(){return this.getAllCommands().map(t=>t.id)}getAllCommands(){let t=[...this._commands.values()],r=[...this.commandPermutations.getAllValid()];for(let i of r)if(!this._commands.has(i)){let n=this._commands.get(this.getCmdLookupId(i));t.push({...n,id:i})}return t}getPluginsList(){return[...this.plugins.values()]}async load(){fc.settings.performanceEnabled=(fc.settings.performanceEnabled===void 0?this.options.enablePerf:fc.settings.performanceEnabled)??!1;let t=_e.Performance.mark(_e.OCLIF_MARKER_OWNER,"config.load");this.pluginLoader=new OO.default({plugins:this.options.plugins,root:this.options.root}),this.rootPlugin=await this.pluginLoader.loadRoot({pjson:this.options.pjson});let r=V0.default.getInstance();if(r.set("rootPlugin",this.rootPlugin),r.set("exitCodes",this.rootPlugin.pjson.oclif.exitCodes??{}),this.root=this.rootPlugin.root,this.pjson=this.rootPlugin.pjson,this.plugins.set(this.rootPlugin.name,this.rootPlugin),this.root=this.rootPlugin.root,this.pjson=this.rootPlugin.pjson,this.name=this.pjson.name,this.version=this.options.version||this.pjson.version||"0.0.0",this.channel=this.options.channel||IO(this.version),this.valid=this.rootPlugin.valid,this.arch=(0,yi.arch)()==="ia32"?"x86":(0,yi.arch)(),this.platform=AO.default?"wsl":(0,J0.getPlatform)(),this.windows=this.platform==="win32",this.bin=this.pjson.oclif.bin||this.name,this.binAliases=this.pjson.oclif.binAliases,this.nsisCustomization=this.pjson.oclif.nsisCustomization,this.dirname=this.pjson.oclif.dirname||this.name,this.flexibleTaxonomy=this.pjson.oclif.flexibleTaxonomy||!1,this.pjson.oclif.topicSeparator&&[" ",":"].includes(this.pjson.oclif.topicSeparator)&&(this.topicSeparator=this.pjson.oclif.topicSeparator),this.platform==="win32"&&(this.dirname=this.dirname.replace("/","\\")),this.userAgent=`${this.name}/${this.version} ${this.platform}-${this.arch} node-${process.version}`,this.shell=this._shell(),this.debug=this._debug(),this.home=process.env.HOME||this.windows&&this.windowsHome()||(0,J0.getHomeDir)()||(0,yi.tmpdir)(),this.cacheDir=this.scopedEnvVar("CACHE_DIR")||this.macosCacheDir()||this.dir("cache"),this.configDir=this.scopedEnvVar("CONFIG_DIR")||this.dir("config"),this.dataDir=this.scopedEnvVar("DATA_DIR")||this.dir("data"),this.errlog=(0,kt.join)(this.cacheDir,"error.log"),this.binPath=this.scopedEnvVar("BINPATH"),this.npmRegistry=this.scopedEnvVar("NPM_REGISTRY")||this.pjson.oclif.npmRegistry,!this.scopedEnvVarTrue("DISABLE_THEME")){let{theme:n}=await this.loadThemes();this.theme=n}this.pjson.oclif.update=this.pjson.oclif.update||{},this.pjson.oclif.update.node=this.pjson.oclif.update.node||{};let i=this.pjson.oclif.update.s3||{};this.pjson.oclif.update.s3=i,i.bucket=this.scopedEnvVar("S3_BUCKET")||i.bucket,i.bucket&&!i.host&&(i.host=`https://${i.bucket}.s3.amazonaws.com`),i.templates={...i.templates,target:{baseDir:"<%- bin %>",manifest:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- platform %>-<%- arch %>",unversioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-<%- platform %>-<%- arch %><%- ext %>",versioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %>-<%- platform %>-<%- arch %><%- ext %>",...i.templates&&i.templates.target},vanilla:{baseDir:"<%- bin %>",manifest:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %>version",unversioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %><%- ext %>",versioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %><%- ext %>",...i.templates&&i.templates.vanilla}},this.isSingleCommandCLI=!!(this.pjson.oclif.default||typeof this.pjson.oclif.commands!="string"&&this.pjson.oclif.commands?.strategy==="single"&&this.pjson.oclif.commands?.target),await this.loadPluginsAndCommands(),an("config done"),t?.addDetails({commandPermutations:this.commands.length,commands:[...this.plugins.values()].reduce((n,o)=>n+o.commands.length,0),plugins:this.plugins.size,topics:this.topics.length}),t?.stop()}async loadPluginsAndCommands(t){let r=_e.Performance.mark(_e.OCLIF_MARKER_OWNER,"config.loadAllPlugins"),{errors:i,plugins:n}=await this.pluginLoader.loadChildren({dataDir:this.dataDir,devPlugins:this.options.devPlugins,force:t?.force??!1,pluginAdditions:this.options.pluginAdditions,rootPlugin:this.rootPlugin,userPlugins:this.options.userPlugins});this.plugins=n,r?.stop();let o=_e.Performance.mark(_e.OCLIF_MARKER_OWNER,"config.loadAllCommands");for(let s of this.plugins.values())this.loadCommands(s),this.loadTopics(s);o?.stop();for(let s of i)this.warn(s)}async loadThemes(){let t=this.pjson.oclif.theme?(0,kt.resolve)(this.root,this.pjson.oclif.theme):this.pjson.oclif.theme,r=(0,kt.resolve)(this.configDir,"theme.json"),[i,n]=await Promise.all([t?await(0,z0.safeReadJson)(t):void 0,await(0,z0.safeReadJson)(r)]),o={...i,...n};return{file:n?r:t,theme:Object.keys(o).length>0?(0,SO.parseTheme)(o):void 0}}macosCacheDir(){return this.platform==="darwin"&&(0,kt.join)(this.home,"Library","Caches",this.dirname)||void 0}async runCommand(t,r=[],i=null){let n=_e.Performance.mark(_e.OCLIF_MARKER_OWNER,`config.runCommand#${t}`);an("runCommand %s %o",t,r);let o=i??this.findCommand(t);if(!o){let l=this.flexibleTaxonomy?this.findMatches(t,r):[],m=this.flexibleTaxonomy&&l.length>0?await this.runHook("command_incomplete",{argv:r,id:t,matches:l}):await this.runHook("command_not_found",{argv:r,id:t});if(m.successes[0])return m.successes[0].result;throw m.failures[0]?m.failures[0].error:new xi.CLIError(`command ${t} not found`)}if(this.isJitPluginCommand(o)){let l=o.pluginName,m=this.pjson.oclif.jitPlugins[l],p=await this.runHook("jit_plugin_not_installed",{argv:r,command:o,id:t,pluginName:l,pluginVersion:m});if(p.failures[0])throw p.failures[0].error;if(p.successes[0])await this.loadPluginsAndCommands({force:!0}),o=this.findCommand(t)??o;else{let f=await this.runHook("command_not_found",{argv:r,id:t});if(f.successes[0])return f.successes[0].result;throw f.failures[0]?f.failures[0].error:new xi.CLIError(`command ${t} not found`)}}let s=await o.load();await this.runHook("prerun",{Command:s,argv:r});let u=await s.run(r,this);if(o.id==="plugins:uninstall")for(let l of r)this.plugins.delete(l);return await this.runHook("postrun",{Command:s,argv:r,result:u}),n?.addDetails({command:t,plugin:o.pluginName}),n?.stop(),u}async runHook(t,r,i,n){let o=_e.Performance.mark(_e.OCLIF_MARKER_OWNER,`config.runHook#${t}`);an("start %s hook",t);let s=f=>typeof f=="function"?f:f.default&&typeof f.default=="function"?f.default:Object.values(f).find(d=>typeof d=="function"),u=async(f,d)=>{let a,c=new Promise((h,g)=>{a=setTimeout(()=>{g(new Error(`Timed out after ${f} ms.`))},f).unref()});return Promise.race([d,c]).then(h=>(clearTimeout(a),h))},l={failures:[],successes:[]},p=(PO.has(t)?[this.rootPlugin]:[...this.plugins.values()]).map(async f=>{let d=ut()([this.bin,f.name,"hooks",t].join(":")),a={config:this,debug:d,error(h,g={}){(0,xi.error)(h,g)},exit(h=0){(0,xi.exit)(h)},log(h,...g){_O.ux.info(h,...g)},warn(h){(0,xi.warn)(h)}},c=f.hooks[t]||[];for(let h of c){let g=_e.Performance.mark(_e.OCLIF_MARKER_OWNER,`config.runHook#${f.name}(${h.target})`);try{let{filePath:x,isESM:v,module:E}=await(0,TO.loadWithData)(f,await(0,kO.tsPath)(f.root,h.target,f));d("start",v?"(import)":"(require)",x);let D=E[h.identifier]??(h.identifier==="default"?s(E):void 0);if(!D){d("No hook found for hook definition:",h);continue}let A=i?await u(i,D.call(a,{...r,config:this,context:a})):await D.call(a,{...r,config:this,context:a});l.successes.push({plugin:f,result:A}),f.name==="@oclif/plugin-legacy"&&t==="init"&&this.insertLegacyPlugins(A),d("done")}catch(x){if(l.failures.push({error:x,plugin:f}),d(x),!n&&x.oclif?.exit!==void 0&&x.oclif?.exit!==0&&x.code!=="MODULE_NOT_FOUND")throw x}g?.addDetails({event:t,hook:h.target,plugin:f.name}),g?.stop()}});return await Promise.all(p),an("%s hook done",t),o?.stop(),l}s3Key(t,r,i={}){typeof r=="object"?i=r:r&&(i.ext=r);let n=this.pjson.oclif.update.s3.templates[i.platform?"target":"vanilla"][t]??"";return DO.render(n,{...this,...i})}s3Url(t){let{host:r}=this.pjson.oclif.update.s3;if(!r)throw new Error("no s3 host is set");let i=new W0.URL(r);return i.pathname=(0,kt.join)(i.pathname,t),i.toString()}scopedEnvVar(t){return process.env[this.scopedEnvVarKeys(t).find(r=>process.env[r])]}scopedEnvVarKey(t){return[this.bin,t].map(r=>r.replaceAll("@","").replaceAll(/[/-]/g,"_")).join("_").toUpperCase()}scopedEnvVarKeys(t){return[this.bin,...this.binAliases??[]].filter(Boolean).map(r=>[r.replaceAll("@","").replaceAll(/[/-]/g,"_"),t].join("_").toUpperCase())}scopedEnvVarTrue(t){let r=this.scopedEnvVar(t);return r==="1"||r==="true"}warn(t,r){if(!this.warned){if(typeof t=="string"){process.emitWarning(t);return}if(t instanceof Error){let i=t;i.name=`${t.name} Plugin: ${this.name}`,i.detail=(0,wo.compact)([t.detail,`module: ${this._base}`,r&&`task: ${r}`,`plugin: ${this.name}`,`root: ${this.root}`,"See more details with DEBUG=*"]).join(`
|
|
154
|
+
`),process.emitWarning(t);return}process.emitWarning("Config.warn expected either a string or Error, but instead received an object"),t.name=`${t.name} Plugin: ${this.name}`,t.detail=(0,wo.compact)([t.detail,`module: ${this._base}`,r&&`task: ${r}`,`plugin: ${this.name}`,`root: ${this.root}`,"See more details with DEBUG=*"]).join(`
|
|
155
|
+
`),process.emitWarning(JSON.stringify(t))}}windowsHome(){return this.windowsHomedriveHome()||this.windowsUserprofileHome()}windowsHomedriveHome(){return process.env.HOMEDRIVE&&process.env.HOMEPATH&&(0,kt.join)(process.env.HOMEDRIVE,process.env.HOMEPATH)}windowsUserprofileHome(){return process.env.USERPROFILE}_debug(){if(this.scopedEnvVarTrue("DEBUG"))return 1;try{let{enabled:t}=ut()(this.bin);if(t)return 1}catch{}return 0}_shell(){let t,{COMSPEC:r}=process.env,i=process.env.SHELL??(0,yi.userInfo)().shell?.split(kt.sep)?.pop();return i?t=i.split("/"):this.windows&&r?t=r.split(/\\|\//):t=["unknown"],t.at(-1)??"unknown"}determinePriority(t){let r=this.pjson.oclif?.plugins??[];return t.sort((n,o)=>{let s=n.pluginAlias??"A-Cannot-Find-This",u=o.pluginAlias??"B-Cannot-Find-This",l=r.indexOf(s),m=r.indexOf(u);return n.pluginType==="core"&&o.pluginType==="core"?l-m:o.pluginType==="core"&&n.pluginType!=="core"?1:n.pluginType==="core"&&o.pluginType!=="core"?-1:n.pluginType==="jit"&&o.pluginType!=="jit"?1:o.pluginType==="jit"&&n.pluginType!=="jit"?-1:0})[0]}getCmdLookupId(t){return this._commands.has(t)?t:this.commandPermutations.hasValid(t)?this.commandPermutations.getValid(t):t}getTopicLookupId(t){return this._topics.has(t)?t:this.topicPermutations.hasValid(t)?this.topicPermutations.getValid(t):t}insertLegacyPlugins(t){for(let r of t){this.plugins.set(r.name,r);for(let i of r.commands??[]){this._commands.delete(i.id);for(let n of[...i.aliases??[],...i.hiddenAliases??[]])this._commands.delete(n)}this.loadCommands(r)}}isJitPluginCommand(t){return Object.keys(this.pjson.oclif.jitPlugins??{}).includes(t.pluginName??"")&&!!(t?.pluginName&&!this.plugins.has(t.pluginName))}loadCommands(t){let r=_e.Performance.mark(_e.OCLIF_MARKER_OWNER,`config.loadCommands#${t.name}`,{plugin:t.name});for(let i of t.commands){if(this._commands.has(i.id)){let s=this.determinePriority([this._commands.get(i.id),i]);this._commands.set(s.id,s)}else this._commands.set(i.id,i);let n=this.flexibleTaxonomy&&i.permutations===void 0?(0,un.getCommandIdPermutations)(i.id):i.permutations??[i.id];for(let s of n)this.commandPermutations.add(s,i.id);let o=(s,u=!1)=>{if(this._commands.has(s)){let m=this.determinePriority([this._commands.get(s),i]);this._commands.set(s,{...m,id:s})}else this._commands.set(s,{...i,hidden:u,id:s});let l=this.flexibleTaxonomy&&i.aliasPermutations===void 0?(0,un.getCommandIdPermutations)(s):i.permutations??[s];for(let m of l)this.commandPermutations.add(m,i.id)};for(let s of i.aliases??[])o(s);for(let s of i.hiddenAliases??[])o(s,!0)}r?.addDetails({commandCount:t.commands.length}),r?.stop()}loadTopics(t){let r=_e.Performance.mark(_e.OCLIF_MARKER_OWNER,`config.loadTopics#${t.name}`,{plugin:t.name});for(let i of(0,wo.compact)(t.topics)){let n=this._topics.get(i.name);n?(n.description=i.description||n.description,n.hidden=n.hidden||i.hidden):this._topics.set(i.name,i);let o=this.flexibleTaxonomy?(0,un.getCommandIdPermutations)(i.name):[i.name];for(let s of o)this.topicPermutations.add(s,i.name)}for(let i of t.commands.filter(n=>!n.hidden)){let n=i.id.split(":");for(;n.length>0;){let o=n.join(":");o&&!this._topics.has(o)&&this._topics.set(o,{description:i.summary||i.description,name:o}),n.pop()}}r?.stop()}};Ye.Config=dc});var bo=w(Yt=>{"use strict";y();Object.defineProperty(Yt,"__esModule",{value:!0});Yt.tsPath=Yt.Plugin=Yt.Config=void 0;var RO=X0();Object.defineProperty(Yt,"Config",{enumerable:!0,get:function(){return RO.Config}});var MO=uc();Object.defineProperty(Yt,"Plugin",{enumerable:!0,get:function(){return MO.Plugin}});var LO=Jr();Object.defineProperty(Yt,"tsPath",{enumerable:!0,get:function(){return LO.tsPath}})});var K0=w(Co=>{"use strict";y();Object.defineProperty(Co,"__esModule",{value:!0});Co.renderList=void 0;var BO=ar(),jO=le(),$O=Ov();function qO(e,t){return $O(e,BO.stdtermwidth,{skipScheme:"ansi-color"})(t).trim()}function HO(e){if(e.length===0)return"";let t=(0,jO.maxBy)(e,i=>i[0].length)?.[0].length??0;return e.map(i=>{let n=i[0],o=i[1];return o?(n=n.padEnd(t),o=qO(t+2,o),`${n} ${o}`):n}).join(`
|
|
156
|
+
`)}Co.renderList=HO});var Cc=w(te=>{"use strict";y();var Q0=te&&te.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(te,"__esModule",{value:!0});te.FailedFlagValidationError=te.ArgInvalidOptionError=te.FlagInvalidOptionError=te.NonExistentFlagsError=te.UnexpectedArgsError=te.RequiredArgsError=te.InvalidArgsSpecError=te.CLIParseError=te.CLIError=void 0;var UO=Q0(We()),cn=Q0(it()),Z0=K0(),WO=Ge(),zO=le(),JO=Ge();Object.defineProperty(te,"CLIError",{enumerable:!0,get:function(){return JO.CLIError}});var xt=class extends WO.CLIError{parse;showHelp=!1;constructor(t){t.message+=`
|
|
157
|
+
See more help with --help`,super(t.message,{exit:t.exit}),this.parse=t.parse}};te.CLIParseError=xt;var gc=class extends xt{args;constructor({args:t,exit:r,parse:i}){let n="Invalid argument spec",o=Object.values(t).filter(s=>s.name);if(o.length>0){let s=(0,Z0.renderList)(o.map(u=>[`${u.name} (${u.required?"required":"optional"})`,u.description]));n+=`:
|
|
158
|
+
${s}`}super({exit:cn.default.getInstance().get("exitCodes")?.invalidArgsSpec??r,message:n,parse:i}),this.args=t}};te.InvalidArgsSpecError=gc;var yc=class extends xt{args;constructor({args:t,exit:r,flagsWithMultiple:i,parse:n}){let o=`Missing ${t.length} required arg${t.length===1?"":"s"}`,s=t.filter(u=>u.name);if(s.length>0){let u=(0,Z0.renderList)(s.map(l=>{let m=l.options?`(${l.options.join("|")}) ${l.description}`:l.description;return[l.name,m]}));o+=`:
|
|
159
159
|
${u}`}if(i?.length){let u=i.map(l=>`--${l}`).join(", ");o+=`
|
|
160
160
|
|
|
161
161
|
Note: ${u} allow${i.length===1?"s":""} multiple values. Because of this you need to provide all arguments before providing ${i.length===1?"that flag":"those flags"}.`,o+=`
|
|
162
|
-
Alternatively, you can use "--" to signify the end of the flags and the beginning of arguments.`}super({exit:
|
|
163
|
-
${
|
|
164
|
-
`))}`;super({exit:
|
|
162
|
+
Alternatively, you can use "--" to signify the end of the flags and the beginning of arguments.`}super({exit:cn.default.getInstance().get("exitCodes")?.requiredArgs??r,message:o,parse:n}),this.args=t,this.showHelp=!0}};te.RequiredArgsError=yc;var xc=class extends xt{args;constructor({args:t,exit:r,parse:i}){let n=`Unexpected argument${t.length===1?"":"s"}: ${t.join(", ")}`;super({exit:cn.default.getInstance().get("exitCodes")?.unexpectedArgs??r,message:n,parse:i}),this.args=t,this.showHelp=!0}};te.UnexpectedArgsError=xc;var vc=class extends xt{flags;constructor({exit:t,flags:r,parse:i}){let n=`Nonexistent flag${r.length===1?"":"s"}: ${r.join(", ")}`;super({exit:cn.default.getInstance().get("exitCodes")?.nonExistentFlag??t,message:n,parse:i}),this.flags=r,this.showHelp=!0}};te.NonExistentFlagsError=vc;var wc=class extends xt{constructor(t,r){let i=`Expected --${t.name}=${r} to be one of: ${t.options.join(", ")}`;super({message:i,parse:{}})}};te.FlagInvalidOptionError=wc;var Ec=class extends xt{constructor(t,r){let i=`Expected ${r} to be one of: ${t.options.join(", ")}`;super({message:i,parse:{}})}};te.ArgInvalidOptionError=Ec;var bc=class extends xt{constructor({exit:t,failed:r,parse:i}){let n=r.map(l=>l.reason),o=(0,zO.uniq)(n),u=`The following ${o.length===1?"error":"errors"} occurred:
|
|
163
|
+
${UO.default.dim(o.join(`
|
|
164
|
+
`))}`;super({exit:cn.default.getInstance().get("exitCodes")?.failedFlagValidation??t,message:u,parse:i})}};te.FailedFlagValidationError=bc});var ty=w(vt=>{"use strict";y();var GO=vt&&vt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vt,"__esModule",{value:!0});vt.Parser=vt.readStdin=void 0;var VO=S("node:readline"),ey=GO(it()),Xt=le(),Fr=Cc(),st;try{st=process.env.CLI_FLAGS_DEBUG==="1"?ut()("../parser"):()=>{}}catch{st=()=>{}}var YO=async()=>{let{stdin:e,stdout:t}=process;return e.isTTY?null:global.oclif?.stdinCache?(st("resolved stdin from global cache",global.oclif.stdinCache),global.oclif.stdinCache):new Promise(r=>{let i="",n=new AbortController,{signal:o}=n,s=setTimeout(()=>n.abort(),10),u=(0,VO.createInterface)({input:e,output:t,terminal:!1});u.on("line",l=>{i+=l}),u.once("close",()=>{clearTimeout(s),st("resolved from stdin",i),global.oclif={...global.oclif,stdinCache:i},r(i)}),o.addEventListener("abort",()=>{st("stdin aborted"),clearTimeout(s),u.close(),r(null)},{once:!0})})};vt.readStdin=YO;function XO(e){return/^-\d/g.test(e)}var Do=(e,t)=>{if(e.options&&!e.options.includes(t))throw new Fr.FlagInvalidOptionError(e,t);return t},Dc=class{input;argv;booleanFlags;context;currentFlag;flagAliases;raw=[];constructor(t){this.input=t,this.context=t.context??{},this.argv=[...t.argv],this._setNames(),this.booleanFlags=(0,Xt.pickBy)(t.flags,r=>r.type==="boolean"),this.flagAliases=Object.fromEntries(Object.values(t.flags).flatMap(r=>[...r.aliases??[],...r.charAliases??[]].map(i=>[i,r])))}async parse(){this._debugInput();let t=async f=>{let{isLong:d,name:a}=this.findFlag(f);if(!a){let h=f.indexOf("=");if(h!==-1){let g=f.slice(h+1);this.argv.unshift(g);let x=await t(f.slice(0,h));return x||this.argv.shift(),x}return!1}let c=this.input.flags[a];if(c.type==="option"){if(!c.multiple&&this.raw.some(g=>g.type==="flag"&&g.flag===a))throw new Fr.CLIError(`Flag --${a} can only be specified once`);this.currentFlag=c;let h=d||f.length<3?this.argv.shift():f.slice(f[2]==="="?3:2);if(c.allowStdin==="only"&&h!=="-"&&h!==void 0&&!this.findFlag(h).name)throw new Fr.CLIError(`Flag --${a} can only be read from stdin. The value must be "-" or not provided at all.`);if(c.allowStdin&&h==="-"||c.allowStdin==="only"){let g=await(0,vt.readStdin)();g&&(h=g.trim())}if(typeof h!="string"||this.findFlag(h).name)throw c.options?new Fr.CLIError(`Flag --${a} expects one of these values: ${c.options.join(", ")}`):new Fr.CLIError(`Flag --${a} expects a value`);this.raw.push({flag:c.name,input:h,type:"flag"})}else this.raw.push({flag:c.name,input:f,type:"flag"}),!d&&f.length>2&&this.argv.unshift(`-${f.slice(2)}`);return!0},r=!0,i=[],n=!1,o=[...this.argv];for(;this.argv.length>0;){let f=this.argv.shift();if(r&&f.startsWith("-")&&f!=="-"){if(this.input["--"]!==!1&&f==="--"){r=!1;continue}if(await t(f))continue;if(f==="--"){n=!0;continue}if(this.input["--"]!==!1&&!XO(f)){i.push(f);continue}}if(r&&this.currentFlag&&this.currentFlag.multiple&&!this.currentFlag.multipleNonGreedy){this.raw.push({flag:this.currentFlag.name,input:f,type:"flag"});continue}let d=Object.keys(this.input.args)[this._argTokens.length];this.raw.push({arg:d,input:f,type:"arg"})}let[{args:s,argv:u},{flags:l,metadata:m}]=await Promise.all([this._args(),this._flags()]);this._debugOutput(u,s,l);let p=n?[...u,...i,"--"]:[...u,...i];return{args:s,argv:p.sort((f,d)=>o.indexOf(f)-o.indexOf(d)),flags:l,metadata:m,nonExistentFlags:i,raw:this.raw}}async _args(){let t=[],r={},i=this._argTokens,n=!1,o=this.context;for(let[s,u]of Object.entries(this.input.args)){let l=i.find(m=>m.arg===s);if(o.token=l,l){if(u.options&&!u.options.includes(l.input))throw new Fr.ArgInvalidOptionError(u,l.input);let m=await u.parse(l.input,o,u);t.push(m),r[l.arg]=m}else if(!u.ignoreStdin&&!n){let m=await(0,vt.readStdin)();if(m){m=m.trim();let p=await u.parse(m,o,u);t.push(p),r[s]=p}n=!0}if(!r[s]&&(u.default||u.default===!1))if(typeof u.default=="function"){let m=await u.default();t.push(m),r[s]=m}else t.push(u.default),r[s]=u.default}for(let s of i)r[s.arg]===void 0&&t.push(s.input);return{args:r,argv:t}}get _argTokens(){return this.raw.filter(t=>t.type==="arg")}_debugInput(){st("input: %s",this.argv.join(" "));let t=Object.keys(this.input.args);t.length>0&&st("available args: %s",t.join(" ")),Object.keys(this.input.flags).length!==0&&st("available flags: %s",Object.keys(this.input.flags).map(r=>`--${r}`).join(" "))}_debugOutput(t,r,i){i.length>0&&st("argv: %o",i),Object.keys(t).length>0&&st("args: %o",t),Object.keys(r).length>0&&st("flags: %o",r)}async _flags(){let t=async(f,d,a,c)=>{if(!d.parse)return f;let h={...a,error:a?.error,exit:a?.exit,log:a?.log,logToStderr:a?.logToStderr,token:c,warn:a?.warn};try{return d.type==="boolean"?await d.parse(f,h,d):await d.parse(f,h,d)}catch(g){throw g.message=`Parsing --${d.name}
|
|
165
165
|
${g.message}
|
|
166
|
-
See more help with --help`,dy.default.getInstance().get("exitCodes")?.failedFlagParsing&&(g.oclif={exit:dy.default.getInstance().get("exitCodes")?.failedFlagParsing}),g}},r=f=>{if(f.tokens?.length){if(f.inputFlag.flag.type==="boolean"&&(0,Yt.last)(f.tokens)?.input)return{...f,valueFunction:async a=>t((0,Yt.last)(a.tokens)?.input!==`--no-${a.inputFlag.name}`,a.inputFlag.flag,this.context,(0,Yt.last)(a.tokens))};if(f.inputFlag.flag.type==="option"&&f.inputFlag.flag.delimiter&&f.inputFlag.flag.multiple)return{...f,valueFunction:async a=>(await Promise.all((a.tokens??[]).flatMap(c=>c.input.split(a.inputFlag.flag.delimiter??",")).map(c=>c.trim().replace(/^"(.*)"$/,"$1").replace(/^'(.*)'$/,"$1")).map(async c=>t(c,a.inputFlag.flag,this.context,{...(0,Yt.last)(a.tokens),input:c})))).map(c=>So(a.inputFlag.flag,c))};if(f.inputFlag.flag.type==="option"&&f.inputFlag.flag.multiple)return{...f,valueFunction:async a=>Promise.all((f.tokens??[]).map(c=>t(So(a.inputFlag.flag,c.input),a.inputFlag.flag,this.context,c)))};if(f.inputFlag.flag.type==="option")return{...f,valueFunction:async a=>t(So(a.inputFlag.flag,(0,Yt.last)(f.tokens)?.input),a.inputFlag.flag,this.context,(0,Yt.last)(f.tokens))}}if(f.inputFlag.flag.env&&process.env[f.inputFlag.flag.env]){let a=process.env[f.inputFlag.flag.env];if(f.inputFlag.flag.type==="option"&&a)return{...f,valueFunction:async c=>t(So(c.inputFlag.flag,a),c.inputFlag.flag,this.context)};if(f.inputFlag.flag.type==="boolean")return{...f,valueFunction:async c=>(0,Yt.isTruthy)(process.env[c.inputFlag.flag.env]??"false")}}return typeof f.inputFlag.flag.default!==void 0?{...f,metadata:{setFromDefault:!0},valueFunction:typeof f.inputFlag.flag.default=="function"?(a,c={})=>f.inputFlag.flag.default({flags:c,options:a.inputFlag.flag}):async()=>f.inputFlag.flag.default}:f},i=f=>f.inputFlag.flag.type==="option"&&f.inputFlag.flag.defaultHelp?{...f,helpFunction:typeof f.inputFlag.flag.defaultHelp=="function"?(d,a,...c)=>d.inputFlag.flag.defaultHelp({flags:a,options:d.inputFlag},...c):d=>d.inputFlag.flag.defaultHelp}:f,n=async f=>{let d=o(m.filter(a=>!a.metadata?.setFromDefault));return Promise.all(f.map(async a=>{try{if(a.helpFunction)return{...a,metadata:{...a.metadata,defaultHelp:await a.helpFunction?.(a,d,this.context)}}}catch{}return a}))},o=f=>Object.fromEntries(f.filter(d=>d.value!==void 0).map(d=>[d.inputFlag.name,d.value])),s=this.mapAndValidateFlags(),u=await Promise.all(Object.entries(this.input.flags).filter(([f,d])=>d.type==="boolean"||d.env||d.default!==void 0||"defaultHelp"in d||s.has(f)).map(([f,d])=>({inputFlag:{flag:d,name:f},tokens:s.get(f)})).map(f=>r(f)).filter(f=>f.valueFunction!==void 0).map(f=>i(f)).map(async f=>f.metadata?.setFromDefault?f:{...f,value:await f.valueFunction?.(f)})),l=o(u.filter(f=>!f.metadata?.setFromDefault)),m=await Promise.all(u.map(async f=>f.metadata?.setFromDefault?{...f,value:await f.valueFunction?.(f,l)}:f)),p=m.some(f=>typeof f.helpFunction=="function")?await n(m):m;return{flags:o(p),metadata:{flags:Object.fromEntries(p.filter(f=>f.metadata).map(f=>[f.inputFlag.name,f.metadata]))}}}_setNames(){for(let t of Object.keys(this.input.flags))this.input.flags[t].name=t;for(let t of Object.keys(this.input.args))this.input.args[t].name=t}findFlag(t){let r=t.startsWith("--"),i=r?!1:t.startsWith("-"),n=r?this.findLongFlag(t):i?this.findShortFlag(t):void 0;return{isLong:r,name:n}}findLongFlag(t){let r=t.slice(2);if(this.input.flags[r])return r;if(this.flagAliases[r])return this.flagAliases[r].name;if(t.startsWith("--no-")){let i=this.booleanFlags[t.slice(5)];if(i&&i.allowNo)return i.name}}findShortFlag([t,r]){return this.flagAliases[r]?this.flagAliases[r].name:Object.keys(this.input.flags).find(i=>this.input.flags[i].char===r&&r!==void 0&&this.input.flags[i].char!==void 0)}mapAndValidateFlags(){let t=new Map;for(let r of this.raw.filter(i=>i.type==="flag")){if(!(r.flag in this.input.flags))throw new Tr.CLIError(`Unexpected flag ${r.flag}`);let i=t.get(r.flag)??[];t.set(r.flag,[...i,r])}return t}};vt.Parser=Tc});var gy=w(Fo=>{"use strict";y();Object.defineProperty(Fo,"__esModule",{value:!0});Fo.validate=void 0;var Fk=le(),pn=Fc();async function Tk(e){let t;function r(){if(e.output.nonExistentFlags?.length>0)throw new pn.NonExistentFlagsError({flags:e.output.nonExistentFlags,parse:e});let d=Object.keys(e.input.args).length;if(e.input.strict&&e.output.argv.length>d){let h=e.output.argv.slice(d);throw new pn.UnexpectedArgsError({args:h,parse:e})}let a=[],c=!1;for(let[h,g]of Object.entries(e.input.args)){if(!g.required)c=!0;else if(c)throw new pn.InvalidArgsSpecError({args:e.input.args,parse:e});g.required&&e.output.args[h]===void 0&&a.push(g)}if(a.length>0){let h=Object.entries(e.input.flags).filter(([g,x])=>x.type==="option"&&!!x.multiple).map(([g])=>g);throw new pn.RequiredArgsError({args:a,flagsWithMultiple:h,parse:e})}}async function i(){let d=Object.entries(e.input.flags).flatMap(([h,g])=>e.output.flags[h]!==void 0?[...g.relationships?f(h,g):[],...g.dependsOn?[m(h,g.dependsOn)]:[],...g.exclusive?[u(h,g.exclusive)]:[],...g.exactlyOne?[l(h,g.exactlyOne)]:[]]:g.required?[{name:h,reason:`Missing required flag ${h}`,status:"failed",validationFn:"required"}]:g.exactlyOne&&g.exactlyOne.length>0?[s(g)]:[]),c=(await Promise.all(d)).filter(h=>h.status==="failed");if(c.length>0)throw new pn.FailedFlagValidationError({failed:c,parse:e})}async function n(d){if(t)return t;let a=d.map(async h=>typeof h=="string"?[h,e.output.flags[h]]:await h.when(e.output.flags)?[h.name,e.output.flags[h.name]]:null),c=await Promise.all(a);return t=Object.fromEntries(c.filter(h=>h!==null)),t}let o=d=>Object.keys(d).filter(a=>a!==void 0);function s(d){let a={name:d.name,validationFn:"validateAcrossFlags"};if(Object.entries(e.input.flags).map(h=>h[0]).filter(h=>e.output.flags[h]!==void 0).filter(h=>d.exactlyOne&&d.exactlyOne.includes(h)).length===0){let g=`Exactly one of the following must be provided: ${(0,Fk.uniq)(d.exactlyOne?.map(x=>`--${x}`)??[]).join(", ")}`;return{...a,reason:g,status:"failed"}}return{...a,status:"success"}}async function u(d,a){let c={name:d,validationFn:"validateExclusive"},h=await n(a),g=o(h);for(let x of g)if(!(e.output.metadata.flags&&e.output.metadata.flags[x]?.setFromDefault)&&!(e.output.metadata.flags&&e.output.metadata.flags[d]?.setFromDefault)&&e.output.flags[x]!==void 0){let v=e.output.metadata.flags?.[x]?.defaultHelp??e.output.flags[x];return{...c,reason:`--${x}=${v} cannot also be provided when using --${d}`,status:"failed"}}return{...c,status:"success"}}async function l(d,a){let c={name:d,validationFn:"validateExactlyOne"},h=await n(a),g=o(h);for(let x of g)if(x!==d&&e.output.flags[x]!==void 0)return{...c,reason:`--${x} cannot also be provided when using --${d}`,status:"failed"};return{...c,status:"success"}}async function m(d,a){let c={name:d,validationFn:"validateDependsOn"},h=await n(a);if(!Object.values(h).every(x=>x!==void 0)){let x=Object.keys(h).map(v=>`--${v}`).join(", ");return{...c,reason:`All of the following must be provided when using --${d}: ${x}`,status:"failed"}}return{...c,status:"success"}}async function p(d,a){let c={name:d,validationFn:"validateSome"},h=await n(a);if(!Object.values(h).some(Boolean)){let x=Object.keys(h).map(v=>`--${v}`).join(", ");return{...c,reason:`One of the following must be provided when using --${d}: ${x}`,status:"failed"}}return{...c,status:"success"}}function f(d,a){return(a.relationships??[]).map(c=>{switch(c.type){case"all":return m(d,c.flags);case"some":return p(d,c.flags);case"none":return u(d,c.flags);default:throw new Error(`Unknown relationship type: ${c.type}`)}})}return r(),i()}Fo.validate=Tk});var xy=w(Kt=>{"use strict";y();var Ok=Kt&&Kt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Kt,"__esModule",{value:!0});Kt.flagUsages=Kt.flagUsage=void 0;var kk=Ok(We()),Pk=le();function yy(e,t={}){let r=[];e.helpLabel?r.push(e.helpLabel):(e.char&&r.push(`-${e.char}`),e.name&&r.push(` --${e.name}`));let i=e.type==="option"?` ${e.name.toUpperCase()}`:"",n=e.summary||e.description||"";return t.displayRequired&&e.required&&(n=`(required) ${n}`),n=n?kk.default.dim(n):void 0,[` ${r.join(",").trim()}${i}`,n]}Kt.flagUsage=yy;function Ik(e,t={}){return e.length===0?[]:(0,Pk.sortBy)(e,r=>[r.char?-1:1,r.char,r.name]).map(r=>yy(r,t))}Kt.flagUsages=Ik});var Oc=w(Ei=>{"use strict";y();Object.defineProperty(Ei,"__esModule",{value:!0});Ei.parse=Ei.flagUsages=void 0;var Nk=my(),Rk=gy(),Mk=xy();Object.defineProperty(Ei,"flagUsages",{enumerable:!0,get:function(){return Mk.flagUsages}});async function Lk(e,t){let r={"--":t["--"],args:t.args??{},argv:e,context:t.context,flags:t.flags??{},strict:t.strict!==!1},n=await new Nk.Parser(r).parse();return await(0,Rk.validate)({input:r,output:n}),n}Ei.parse=Lk});var Ay=w(Ye=>{"use strict";y();var Bk=Ye&&Ye.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),jk=Ye&&Ye.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),by=Ye&&Ye.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Bk(t,e,r);return jk(t,e),t},Cy=Ye&&Ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.Command=void 0;var $k=Cy(We()),qk=S("node:url"),vy=S("node:util"),Dy=Cy(it()),To=nn(),Hk=Ao(),bi=by(Ge()),dn=Yr(),Uk=by(Oc()),wy=ac(),kc=Xr(),Wk=le(),Ey=Dy.default.getInstance().get("@oclif/core");process.stdout.on("error",e=>{if(!(e&&e.code==="EPIPE"))throw e});var Pc=class{argv;config;static aliases=[];static args={};static baseFlags;static deprecateAliases;static deprecationOptions;static description;static enableJsonFlag=!1;static examples;static flags;static hasDynamicHelp=!1;static help;static hidden;static hiddenAliases=[];static id;static plugin;static pluginAlias;static pluginName;static pluginType;static state;static strict=!0;static summary;static usage;debug;id;static _base=`${Ey.name}@${Ey.version}`;constructor(t,r){this.argv=t,this.config=r,this.id=this.ctor.id;try{this.debug=ut()(this.id?`${this.config.bin}:${this.id}`:this.config.bin)}catch{this.debug=()=>{}}}static async run(t,r){t||(t=process.argv.slice(2)),typeof r=="string"&&r.startsWith("file://")&&(r=(0,qk.fileURLToPath)(r));let i=await Hk.Config.load(r||S.main?.filename||__dirname),n=new this(t,i);if(!n.id){let o=n.constructor.name.toLowerCase();n.id=o,n.ctor.id=o}return n._run()}get ctor(){return this.constructor}async catch(t){if(process.exitCode=process.exitCode??t.exitCode??1,this.jsonEnabled())this.logJson(this.toErrorJson(t));else{if(!t.message)throw t;try{To.ux.action.stop($k.default.bold.red("!"))}catch{}throw t}}error(t,r={}){return bi.error(t,r)}exit(t=0){bi.exit(t)}async finally(t){try{let{config:r}=bi;r.errorLogger&&await r.errorLogger.flush()}catch(r){console.error(r)}}async init(){this.debug("init version: %s argv: %o",this.ctor._base,this.argv),this.config.debug&&(bi.config.debug=!0),this.config.errlog&&(bi.config.errlog=this.config.errlog);let t=global;t["http-call"]=t["http-call"]||{},t["http-call"].userAgent=this.config.userAgent,this.warnIfCommandDeprecated()}jsonEnabled(){if(!this.ctor.enableJsonFlag)return!1;if(this.config.scopedEnvVar?.("CONTENT_TYPE")?.toLowerCase()==="json")return!0;let t=this.argv.indexOf("--"),r=this.argv.indexOf("--json");return t===-1?r>-1:r>-1&&r<t}log(t="",...r){this.jsonEnabled()||(t=typeof t=="string"?t:(0,vy.inspect)(t),To.ux.info(t,...r))}logJson(t){To.ux.styledJSON(t)}logToStderr(t="",...r){this.jsonEnabled()||(t=typeof t=="string"?t:(0,vy.inspect)(t),To.ux.logToStderr(t,...r))}async parse(t,r=this.argv){t||(t=this.ctor);let i={context:this,...t,flags:(0,wy.aggregateFlags)(t.flags,t.baseFlags,t.enableJsonFlag)},n=await this.config.runHook("preparse",{argv:[...r],options:i}),o=n.successes?.length?n.successes.find(u=>u.plugin.root===Dy.default.getInstance().get("rootPlugin")?.root)?.result??r:r;this.argv=[...o];let s=await Uk.parse(o,i);return this.warnIfFlagDeprecated(s.flags??{}),s}toErrorJson(t){return{error:t}}toSuccessJson(t){return t}warn(t){return this.jsonEnabled()||bi.warn(t),t}warnIfCommandDeprecated(){let[t]=(0,dn.normalizeArgv)(this.config);if(this.ctor.deprecateAliases&&this.ctor.aliases.includes(t)){let r=(0,kc.toConfiguredId)(this.ctor.id,this.config),i=(0,kc.toConfiguredId)(t,this.config);this.warn((0,dn.formatCommandDeprecationWarning)(i,{to:r}))}if(this.ctor.state==="deprecated"){let r=(0,kc.toConfiguredId)(this.ctor.id,this.config);this.warn((0,dn.formatCommandDeprecationWarning)(r,this.ctor.deprecationOptions))}}warnIfFlagDeprecated(t){let r=(0,wy.aggregateFlags)(this.ctor.flags,this.ctor.baseFlags,this.ctor.enableJsonFlag);for(let i of Object.keys(t)){let n=r[i],o=n?.deprecated;if(o&&this.warn((0,dn.formatFlagDeprecationWarning)(i,o)),n?.deprecateAliases){let u=(0,Wk.uniq)([...n?.aliases??[],...n?.charAliases??[]]).map(m=>m.length===1?`-${m}`:`--${m}`);if(u.length===0)return;let l=u.filter(m=>this.argv.some(p=>p.startsWith(m)));for(let m of l){let p=`--${n?.name}`;n?.char&&(p+=` | -${n?.char}`),this.warn((0,dn.formatFlagDeprecationWarning)(m,{to:p}))}}}}async _run(){let t,r;try{this.removeEnvVar("REDIRECTED"),await this.init(),r=await this.run()}catch(i){t=i,await this.catch(i)}finally{await this.finally(t)}return r&&this.jsonEnabled()&&this.logJson(this.toSuccessJson(r)),r}removeEnvVar(t){let r=[];try{r.push(...this.config.scopedEnvVarKeys(t))}catch{r.push(this.config.scopedEnvVarKey(t))}r.map(i=>delete process.env[i])}};Ye.Command=Pc});var Rc=w(Ke=>{"use strict";y();var zk=Ke&&Ke.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.run=Ke.versionAddition=Ke.helpAddition=void 0;var _y=S("node:url"),Jk=zk(it()),Gk=nn(),Vk=Ao(),Nc=Wi(),Ci=hi(),Xk=fs(),Ic=ut()("oclif:main"),Yk=(e,t)=>{if(e.length===0&&!t.isSingleCommandCLI)return!0;let r=(0,Nc.getHelpFlagAdditions)(t);for(let i of e){if(r.includes(i))return!0;if(i==="--")return!1}return!1};Ke.helpAddition=Yk;var Kk=(e,t)=>{let r=t?.pjson.oclif.additionalVersionFlags??[];return!![...new Set(["--version",...r]).values()].includes(e[0])};Ke.versionAddition=Kk;async function Qk(e,t){let r=Ci.Performance.mark(Ci.OCLIF_MARKER_OWNER,"main.run"),i=Ci.Performance.mark(Ci.OCLIF_MARKER_OWNER,"main.run#init"),n=async()=>{r?.stop(),i?.stopped||i?.stop(),await Ci.Performance.collect(),Ci.Performance.debug()},o=async p=>{let f=await(0,Nc.loadHelpClass)(s);await new f(s,s.pjson.oclif.helpOptions??s.pjson.helpOptions).showHelp(p)};Ic(`process.execPath: ${process.execPath}`),Ic(`process.execArgv: ${process.execArgv}`),Ic("process.argv: %O",process.argv),e=e??process.argv.slice(2),t&&(typeof t=="string"&&t.startsWith("file://")||t instanceof _y.URL)&&(t=(0,_y.fileURLToPath)(t));let s=await Vk.Config.load(t??S.main?.filename??__dirname);Jk.default.getInstance().set("config",s),s.isSingleCommandCLI&&(e=[Xk.SINGLE_COMMAND_CLI_SYMBOL,...e]);let[u,...l]=(0,Nc.normalizeArgv)(s,e);if(await s.runHook("init",{argv:l,id:u}),(0,Ke.versionAddition)(e,s)){Gk.ux.log(s.userAgent),await n();return}if((0,Ke.helpAddition)(e,s)){await o(e),await n();return}let m=s.findCommand(u);if(!m&&(s.flexibleTaxonomy?null:s.findTopic(u))){await o([u]),await n();return}i?.stop();try{return await s.runCommand(u,l,m)}finally{await n()}}Ke.run=Qk});var Sy=w(Oo=>{"use strict";y();Object.defineProperty(Oo,"__esModule",{value:!0});Oo.execute=void 0;var Zk=Fs(),eP=Ge(),tP=Es(),rP=Rc(),iP=qt();async function nP(e){if(!e.dir&&!e.loadOptions)throw new eP.CLIError("dir or loadOptions is required.");return e.development&&(process.env.NODE_ENV="development",iP.settings.debug=!0),(0,rP.run)(e.args??process.argv.slice(2),e.loadOptions??e.dir).then(async t=>((0,Zk.flush)(),t)).catch(async t=>(0,tP.handle)(t))}Oo.execute=nP});var Ty=w(Fy=>{"use strict";y();Object.defineProperty(Fy,"__esModule",{value:!0})});var Po=w(I=>{"use strict";y();var sP=I&&I.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),oP=I&&I.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Or=I&&I.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&sP(t,e,r);return oP(t,e),t},aP=I&&I.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(I,"__esModule",{value:!0});I.toStandardizedId=I.toConfiguredId=I.settings=I.Performance=I.Parser=I.ModuleLoader=I.run=I.Interfaces=I.loadHelpClass=I.HelpBase=I.Help=I.CommandHelp=I.Flags=I.execute=I.handle=I.Errors=I.Plugin=I.Config=I.Command=I.stdout=I.stderr=I.flush=I.ux=I.Args=void 0;var uP=aP($t());function cP(){try{process.cwd()}catch(e){e.code==="ENOENT"&&uP.default.stderr(`WARNING: current directory does not exist
|
|
167
|
-
`)}}
|
|
168
|
-
`);let i;for(;(i=
|
|
169
|
-
`),o=o.replace(/\\r/g,"\r")),t[n]=o}return t}function
|
|
166
|
+
See more help with --help`,ey.default.getInstance().get("exitCodes")?.failedFlagParsing&&(g.oclif={exit:ey.default.getInstance().get("exitCodes")?.failedFlagParsing}),g}},r=f=>{if(f.tokens?.length){if(f.inputFlag.flag.type==="boolean"&&(0,Xt.last)(f.tokens)?.input)return{...f,valueFunction:async a=>t((0,Xt.last)(a.tokens)?.input!==`--no-${a.inputFlag.name}`,a.inputFlag.flag,this.context,(0,Xt.last)(a.tokens))};if(f.inputFlag.flag.type==="option"&&f.inputFlag.flag.delimiter&&f.inputFlag.flag.multiple)return{...f,valueFunction:async a=>(await Promise.all((a.tokens??[]).flatMap(c=>c.input.split(a.inputFlag.flag.delimiter??",")).map(c=>c.trim().replace(/^"(.*)"$/,"$1").replace(/^'(.*)'$/,"$1")).map(async c=>t(c,a.inputFlag.flag,this.context,{...(0,Xt.last)(a.tokens),input:c})))).map(c=>Do(a.inputFlag.flag,c))};if(f.inputFlag.flag.type==="option"&&f.inputFlag.flag.multiple)return{...f,valueFunction:async a=>Promise.all((f.tokens??[]).map(c=>t(Do(a.inputFlag.flag,c.input),a.inputFlag.flag,this.context,c)))};if(f.inputFlag.flag.type==="option")return{...f,valueFunction:async a=>t(Do(a.inputFlag.flag,(0,Xt.last)(f.tokens)?.input),a.inputFlag.flag,this.context,(0,Xt.last)(f.tokens))}}if(f.inputFlag.flag.env&&process.env[f.inputFlag.flag.env]){let a=process.env[f.inputFlag.flag.env];if(f.inputFlag.flag.type==="option"&&a)return{...f,valueFunction:async c=>t(Do(c.inputFlag.flag,a),c.inputFlag.flag,this.context)};if(f.inputFlag.flag.type==="boolean")return{...f,valueFunction:async c=>(0,Xt.isTruthy)(process.env[c.inputFlag.flag.env]??"false")}}return typeof f.inputFlag.flag.default!==void 0?{...f,metadata:{setFromDefault:!0},valueFunction:typeof f.inputFlag.flag.default=="function"?(a,c={})=>f.inputFlag.flag.default({flags:c,options:a.inputFlag.flag}):async()=>f.inputFlag.flag.default}:f},i=f=>f.inputFlag.flag.type==="option"&&f.inputFlag.flag.defaultHelp?{...f,helpFunction:typeof f.inputFlag.flag.defaultHelp=="function"?(d,a,...c)=>d.inputFlag.flag.defaultHelp({flags:a,options:d.inputFlag},...c):d=>d.inputFlag.flag.defaultHelp}:f,n=async f=>{let d=o(m.filter(a=>!a.metadata?.setFromDefault));return Promise.all(f.map(async a=>{try{if(a.helpFunction)return{...a,metadata:{...a.metadata,defaultHelp:await a.helpFunction?.(a,d,this.context)}}}catch{}return a}))},o=f=>Object.fromEntries(f.filter(d=>d.value!==void 0).map(d=>[d.inputFlag.name,d.value])),s=this.mapAndValidateFlags(),u=await Promise.all(Object.entries(this.input.flags).filter(([f,d])=>d.type==="boolean"||d.env||d.default!==void 0||"defaultHelp"in d||s.has(f)).map(([f,d])=>({inputFlag:{flag:d,name:f},tokens:s.get(f)})).map(f=>r(f)).filter(f=>f.valueFunction!==void 0).map(f=>i(f)).map(async f=>f.metadata?.setFromDefault?f:{...f,value:await f.valueFunction?.(f)})),l=o(u.filter(f=>!f.metadata?.setFromDefault)),m=await Promise.all(u.map(async f=>f.metadata?.setFromDefault?{...f,value:await f.valueFunction?.(f,l)}:f)),p=m.some(f=>typeof f.helpFunction=="function")?await n(m):m;return{flags:o(p),metadata:{flags:Object.fromEntries(p.filter(f=>f.metadata).map(f=>[f.inputFlag.name,f.metadata]))}}}_setNames(){for(let t of Object.keys(this.input.flags))this.input.flags[t].name=t;for(let t of Object.keys(this.input.args))this.input.args[t].name=t}findFlag(t){let r=t.startsWith("--"),i=r?!1:t.startsWith("-"),n=r?this.findLongFlag(t):i?this.findShortFlag(t):void 0;return{isLong:r,name:n}}findLongFlag(t){let r=t.slice(2);if(this.input.flags[r])return r;if(this.flagAliases[r])return this.flagAliases[r].name;if(t.startsWith("--no-")){let i=this.booleanFlags[t.slice(5)];if(i&&i.allowNo)return i.name}}findShortFlag([t,r]){return this.flagAliases[r]?this.flagAliases[r].name:Object.keys(this.input.flags).find(i=>this.input.flags[i].char===r&&r!==void 0&&this.input.flags[i].char!==void 0)}mapAndValidateFlags(){let t=new Map;for(let r of this.raw.filter(i=>i.type==="flag")){if(!(r.flag in this.input.flags))throw new Fr.CLIError(`Unexpected flag ${r.flag}`);let i=t.get(r.flag)??[];t.set(r.flag,[...i,r])}return t}};vt.Parser=Dc});var ry=w(Ao=>{"use strict";y();Object.defineProperty(Ao,"__esModule",{value:!0});Ao.validate=void 0;var KO=le(),ln=Cc();async function QO(e){let t;function r(){if(e.output.nonExistentFlags?.length>0)throw new ln.NonExistentFlagsError({flags:e.output.nonExistentFlags,parse:e});let d=Object.keys(e.input.args).length;if(e.input.strict&&e.output.argv.length>d){let h=e.output.argv.slice(d);throw new ln.UnexpectedArgsError({args:h,parse:e})}let a=[],c=!1;for(let[h,g]of Object.entries(e.input.args)){if(!g.required)c=!0;else if(c)throw new ln.InvalidArgsSpecError({args:e.input.args,parse:e});g.required&&e.output.args[h]===void 0&&a.push(g)}if(a.length>0){let h=Object.entries(e.input.flags).filter(([g,x])=>x.type==="option"&&!!x.multiple).map(([g])=>g);throw new ln.RequiredArgsError({args:a,flagsWithMultiple:h,parse:e})}}async function i(){let d=Object.entries(e.input.flags).flatMap(([h,g])=>e.output.flags[h]!==void 0?[...g.relationships?f(h,g):[],...g.dependsOn?[m(h,g.dependsOn)]:[],...g.exclusive?[u(h,g.exclusive)]:[],...g.exactlyOne?[l(h,g.exactlyOne)]:[]]:g.required?[{name:h,reason:`Missing required flag ${h}`,status:"failed",validationFn:"required"}]:g.exactlyOne&&g.exactlyOne.length>0?[s(g)]:[]),c=(await Promise.all(d)).filter(h=>h.status==="failed");if(c.length>0)throw new ln.FailedFlagValidationError({failed:c,parse:e})}async function n(d){if(t)return t;let a=d.map(async h=>typeof h=="string"?[h,e.output.flags[h]]:await h.when(e.output.flags)?[h.name,e.output.flags[h.name]]:null),c=await Promise.all(a);return t=Object.fromEntries(c.filter(h=>h!==null)),t}let o=d=>Object.keys(d).filter(a=>a!==void 0);function s(d){let a={name:d.name,validationFn:"validateAcrossFlags"};if(Object.entries(e.input.flags).map(h=>h[0]).filter(h=>e.output.flags[h]!==void 0).filter(h=>d.exactlyOne&&d.exactlyOne.includes(h)).length===0){let g=`Exactly one of the following must be provided: ${(0,KO.uniq)(d.exactlyOne?.map(x=>`--${x}`)??[]).join(", ")}`;return{...a,reason:g,status:"failed"}}return{...a,status:"success"}}async function u(d,a){let c={name:d,validationFn:"validateExclusive"},h=await n(a),g=o(h);for(let x of g)if(!(e.output.metadata.flags&&e.output.metadata.flags[x]?.setFromDefault)&&!(e.output.metadata.flags&&e.output.metadata.flags[d]?.setFromDefault)&&e.output.flags[x]!==void 0){let v=e.output.metadata.flags?.[x]?.defaultHelp??e.output.flags[x];return{...c,reason:`--${x}=${v} cannot also be provided when using --${d}`,status:"failed"}}return{...c,status:"success"}}async function l(d,a){let c={name:d,validationFn:"validateExactlyOne"},h=await n(a),g=o(h);for(let x of g)if(x!==d&&e.output.flags[x]!==void 0)return{...c,reason:`--${x} cannot also be provided when using --${d}`,status:"failed"};return{...c,status:"success"}}async function m(d,a){let c={name:d,validationFn:"validateDependsOn"},h=await n(a);if(!Object.values(h).every(x=>x!==void 0)){let x=Object.keys(h).map(v=>`--${v}`).join(", ");return{...c,reason:`All of the following must be provided when using --${d}: ${x}`,status:"failed"}}return{...c,status:"success"}}async function p(d,a){let c={name:d,validationFn:"validateSome"},h=await n(a);if(!Object.values(h).some(Boolean)){let x=Object.keys(h).map(v=>`--${v}`).join(", ");return{...c,reason:`One of the following must be provided when using --${d}: ${x}`,status:"failed"}}return{...c,status:"success"}}function f(d,a){return(a.relationships??[]).map(c=>{switch(c.type){case"all":return m(d,c.flags);case"some":return p(d,c.flags);case"none":return u(d,c.flags);default:throw new Error(`Unknown relationship type: ${c.type}`)}})}return r(),i()}Ao.validate=QO});var ny=w(Kt=>{"use strict";y();var ZO=Kt&&Kt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Kt,"__esModule",{value:!0});Kt.flagUsages=Kt.flagUsage=void 0;var ek=ZO(We()),tk=le();function iy(e,t={}){let r=[];e.helpLabel?r.push(e.helpLabel):(e.char&&r.push(`-${e.char}`),e.name&&r.push(` --${e.name}`));let i=e.type==="option"?` ${e.name.toUpperCase()}`:"",n=e.summary||e.description||"";return t.displayRequired&&e.required&&(n=`(required) ${n}`),n=n?ek.default.dim(n):void 0,[` ${r.join(",").trim()}${i}`,n]}Kt.flagUsage=iy;function rk(e,t={}){return e.length===0?[]:(0,tk.sortBy)(e,r=>[r.char?-1:1,r.char,r.name]).map(r=>iy(r,t))}Kt.flagUsages=rk});var Ac=w(vi=>{"use strict";y();Object.defineProperty(vi,"__esModule",{value:!0});vi.parse=vi.flagUsages=void 0;var ik=ty(),nk=ry(),sk=ny();Object.defineProperty(vi,"flagUsages",{enumerable:!0,get:function(){return sk.flagUsages}});async function ok(e,t){let r={"--":t["--"],args:t.args??{},argv:e,context:t.context,flags:t.flags??{},strict:t.strict!==!1},n=await new ik.Parser(r).parse();return await(0,nk.validate)({input:r,output:n}),n}vi.parse=ok});var hy=w(Xe=>{"use strict";y();var ak=Xe&&Xe.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),uk=Xe&&Xe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),uy=Xe&&Xe.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&ak(t,e,r);return uk(t,e),t},cy=Xe&&Xe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xe,"__esModule",{value:!0});Xe.Command=void 0;var ck=cy(We()),lk=S("node:url"),sy=S("node:util"),ly=cy(it()),_o=tn(),hk=bo(),wi=uy(Ge()),hn=Yr(),fk=uy(Ac()),oy=rc(),_c=Vr(),pk=le(),ay=ly.default.getInstance().get("@oclif/core");process.stdout.on("error",e=>{if(!(e&&e.code==="EPIPE"))throw e});var Sc=class{argv;config;static aliases=[];static args={};static baseFlags;static deprecateAliases;static deprecationOptions;static description;static enableJsonFlag=!1;static examples;static flags;static hasDynamicHelp=!1;static help;static hidden;static hiddenAliases=[];static id;static plugin;static pluginAlias;static pluginName;static pluginType;static state;static strict=!0;static summary;static usage;debug;id;static _base=`${ay.name}@${ay.version}`;constructor(t,r){this.argv=t,this.config=r,this.id=this.ctor.id;try{this.debug=ut()(this.id?`${this.config.bin}:${this.id}`:this.config.bin)}catch{this.debug=()=>{}}}static async run(t,r){t||(t=process.argv.slice(2)),typeof r=="string"&&r.startsWith("file://")&&(r=(0,lk.fileURLToPath)(r));let i=await hk.Config.load(r||S.main?.filename||__dirname),n=new this(t,i);if(!n.id){let o=n.constructor.name.toLowerCase();n.id=o,n.ctor.id=o}return n._run()}get ctor(){return this.constructor}async catch(t){if(process.exitCode=process.exitCode??t.exitCode??1,this.jsonEnabled())this.logJson(this.toErrorJson(t));else{if(!t.message)throw t;try{_o.ux.action.stop(ck.default.bold.red("!"))}catch{}throw t}}error(t,r={}){return wi.error(t,r)}exit(t=0){wi.exit(t)}async finally(t){try{let{config:r}=wi;r.errorLogger&&await r.errorLogger.flush()}catch(r){console.error(r)}}async init(){this.debug("init version: %s argv: %o",this.ctor._base,this.argv),this.config.debug&&(wi.config.debug=!0),this.config.errlog&&(wi.config.errlog=this.config.errlog);let t=global;t["http-call"]=t["http-call"]||{},t["http-call"].userAgent=this.config.userAgent,this.warnIfCommandDeprecated()}jsonEnabled(){if(!this.ctor.enableJsonFlag)return!1;if(this.config.scopedEnvVar?.("CONTENT_TYPE")?.toLowerCase()==="json")return!0;let t=this.argv.indexOf("--"),r=this.argv.indexOf("--json");return t===-1?r>-1:r>-1&&r<t}log(t="",...r){this.jsonEnabled()||(t=typeof t=="string"?t:(0,sy.inspect)(t),_o.ux.info(t,...r))}logJson(t){_o.ux.styledJSON(t)}logToStderr(t="",...r){this.jsonEnabled()||(t=typeof t=="string"?t:(0,sy.inspect)(t),_o.ux.logToStderr(t,...r))}async parse(t,r=this.argv){t||(t=this.ctor);let i={context:this,...t,flags:(0,oy.aggregateFlags)(t.flags,t.baseFlags,t.enableJsonFlag)},n=await this.config.runHook("preparse",{argv:[...r],options:i}),o=n.successes?.length?n.successes.find(u=>u.plugin.root===ly.default.getInstance().get("rootPlugin")?.root)?.result??r:r;this.argv=[...o];let s=await fk.parse(o,i);return this.warnIfFlagDeprecated(s.flags??{}),s}toErrorJson(t){return{error:t}}toSuccessJson(t){return t}warn(t){return this.jsonEnabled()||wi.warn(t),t}warnIfCommandDeprecated(){let[t]=(0,hn.normalizeArgv)(this.config);if(this.ctor.deprecateAliases&&this.ctor.aliases.includes(t)){let r=(0,_c.toConfiguredId)(this.ctor.id,this.config),i=(0,_c.toConfiguredId)(t,this.config);this.warn((0,hn.formatCommandDeprecationWarning)(i,{to:r}))}if(this.ctor.state==="deprecated"){let r=(0,_c.toConfiguredId)(this.ctor.id,this.config);this.warn((0,hn.formatCommandDeprecationWarning)(r,this.ctor.deprecationOptions))}}warnIfFlagDeprecated(t){let r=(0,oy.aggregateFlags)(this.ctor.flags,this.ctor.baseFlags,this.ctor.enableJsonFlag);for(let i of Object.keys(t)){let n=r[i],o=n?.deprecated;if(o&&this.warn((0,hn.formatFlagDeprecationWarning)(i,o)),n?.deprecateAliases){let u=(0,pk.uniq)([...n?.aliases??[],...n?.charAliases??[]]).map(m=>m.length===1?`-${m}`:`--${m}`);if(u.length===0)return;let l=u.filter(m=>this.argv.some(p=>p.startsWith(m)));for(let m of l){let p=`--${n?.name}`;n?.char&&(p+=` | -${n?.char}`),this.warn((0,hn.formatFlagDeprecationWarning)(m,{to:p}))}}}}async _run(){let t,r;try{this.removeEnvVar("REDIRECTED"),await this.init(),r=await this.run()}catch(i){t=i,await this.catch(i)}finally{await this.finally(t)}return r&&this.jsonEnabled()&&this.logJson(this.toSuccessJson(r)),r}removeEnvVar(t){let r=[];try{r.push(...this.config.scopedEnvVarKeys(t))}catch{r.push(this.config.scopedEnvVarKey(t))}r.map(i=>delete process.env[i])}};Xe.Command=Sc});var Oc=w(Ke=>{"use strict";y();var dk=Ke&&Ke.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.run=Ke.versionAddition=Ke.helpAddition=void 0;var fy=S("node:url"),mk=dk(it()),gk=tn(),yk=bo(),Tc=Hi(),Ei=li(),xk=cs(),Fc=ut()("oclif:main"),vk=(e,t)=>{if(e.length===0&&!t.isSingleCommandCLI)return!0;let r=(0,Tc.getHelpFlagAdditions)(t);for(let i of e){if(r.includes(i))return!0;if(i==="--")return!1}return!1};Ke.helpAddition=vk;var wk=(e,t)=>{let r=t?.pjson.oclif.additionalVersionFlags??[];return!![...new Set(["--version",...r]).values()].includes(e[0])};Ke.versionAddition=wk;async function Ek(e,t){let r=Ei.Performance.mark(Ei.OCLIF_MARKER_OWNER,"main.run"),i=Ei.Performance.mark(Ei.OCLIF_MARKER_OWNER,"main.run#init"),n=async()=>{r?.stop(),i?.stopped||i?.stop(),await Ei.Performance.collect(),Ei.Performance.debug()},o=async p=>{let f=await(0,Tc.loadHelpClass)(s);await new f(s,s.pjson.oclif.helpOptions??s.pjson.helpOptions).showHelp(p)};Fc(`process.execPath: ${process.execPath}`),Fc(`process.execArgv: ${process.execArgv}`),Fc("process.argv: %O",process.argv),e=e??process.argv.slice(2),t&&(typeof t=="string"&&t.startsWith("file://")||t instanceof fy.URL)&&(t=(0,fy.fileURLToPath)(t));let s=await yk.Config.load(t??S.main?.filename??__dirname);mk.default.getInstance().set("config",s),s.isSingleCommandCLI&&(e=[xk.SINGLE_COMMAND_CLI_SYMBOL,...e]);let[u,...l]=(0,Tc.normalizeArgv)(s,e);if(await s.runHook("init",{argv:l,id:u}),(0,Ke.versionAddition)(e,s)){gk.ux.log(s.userAgent),await n();return}if((0,Ke.helpAddition)(e,s)){await o(e),await n();return}let m=s.findCommand(u);if(!m&&(s.flexibleTaxonomy?null:s.findTopic(u))){await o([u]),await n();return}i?.stop();try{return await s.runCommand(u,l,m)}finally{await n()}}Ke.run=Ek});var py=w(So=>{"use strict";y();Object.defineProperty(So,"__esModule",{value:!0});So.execute=void 0;var bk=As(),Ck=Ge(),Dk=xs(),Ak=Oc(),_k=qt();async function Sk(e){if(!e.dir&&!e.loadOptions)throw new Ck.CLIError("dir or loadOptions is required.");return e.development&&(process.env.NODE_ENV="development",_k.settings.debug=!0),(0,Ak.run)(e.args??process.argv.slice(2),e.loadOptions??e.dir).then(async t=>((0,bk.flush)(),t)).catch(async t=>(0,Dk.handle)(t))}So.execute=Sk});var my=w(dy=>{"use strict";y();Object.defineProperty(dy,"__esModule",{value:!0})});var To=w(P=>{"use strict";y();var Fk=P&&P.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),Tk=P&&P.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Tr=P&&P.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Fk(t,e,r);return Tk(t,e),t},Ok=P&&P.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(P,"__esModule",{value:!0});P.toStandardizedId=P.toConfiguredId=P.settings=P.Performance=P.Parser=P.ModuleLoader=P.run=P.Interfaces=P.loadHelpClass=P.HelpBase=P.Help=P.CommandHelp=P.Flags=P.execute=P.handle=P.Errors=P.Plugin=P.Config=P.Command=P.stdout=P.stderr=P.flush=P.ux=P.Args=void 0;var kk=Ok($t());function Pk(){try{process.cwd()}catch(e){e.code==="ENOENT"&&kk.default.stderr(`WARNING: current directory does not exist
|
|
167
|
+
`)}}Pk();P.Args=Tr(Kh());P.ux=Tr(tn());var Ik=As();Object.defineProperty(P,"flush",{enumerable:!0,get:function(){return Ik.flush}});var gy=Og();Object.defineProperty(P,"stderr",{enumerable:!0,get:function(){return gy.stderr}});Object.defineProperty(P,"stdout",{enumerable:!0,get:function(){return gy.stdout}});var Nk=hy();Object.defineProperty(P,"Command",{enumerable:!0,get:function(){return Nk.Command}});var yy=bo();Object.defineProperty(P,"Config",{enumerable:!0,get:function(){return yy.Config}});Object.defineProperty(P,"Plugin",{enumerable:!0,get:function(){return yy.Plugin}});P.Errors=Tr(Ge());var Rk=xs();Object.defineProperty(P,"handle",{enumerable:!0,get:function(){return Rk.handle}});var Mk=py();Object.defineProperty(P,"execute",{enumerable:!0,get:function(){return Mk.execute}});P.Flags=Tr(qs());var Fo=Hi();Object.defineProperty(P,"CommandHelp",{enumerable:!0,get:function(){return Fo.CommandHelp}});Object.defineProperty(P,"Help",{enumerable:!0,get:function(){return Fo.Help}});Object.defineProperty(P,"HelpBase",{enumerable:!0,get:function(){return Fo.HelpBase}});Object.defineProperty(P,"loadHelpClass",{enumerable:!0,get:function(){return Fo.loadHelpClass}});P.Interfaces=Tr(my());var Lk=Oc();Object.defineProperty(P,"run",{enumerable:!0,get:function(){return Lk.run}});P.ModuleLoader=Tr(Li());P.Parser=Tr(Ac());var Bk=li();Object.defineProperty(P,"Performance",{enumerable:!0,get:function(){return Bk.Performance}});var jk=qt();Object.defineProperty(P,"settings",{enumerable:!0,get:function(){return jk.settings}});var xy=Vr();Object.defineProperty(P,"toConfiguredId",{enumerable:!0,get:function(){return xy.toConfiguredId}});Object.defineProperty(P,"toStandardizedId",{enumerable:!0,get:function(){return xy.toStandardizedId}})});var lx=w((Vq,cx)=>{y();function rx(e){return Array.isArray(e)?e:[e]}var Yc="",ix=" ",Gc="\\",vP=/^\s+$/,wP=/(?:[^\\]|^)\\$/,EP=/^\\!/,bP=/^\\#/,CP=/\r?\n/g,DP=/^\.*\/|^\.+$/,Vc="/",ox="node-ignore";typeof Symbol<"u"&&(ox=Symbol.for("node-ignore"));var nx=ox,AP=(e,t,r)=>Object.defineProperty(e,t,{value:r}),_P=/([0-z])-([0-z])/g,ax=()=>!1,SP=e=>e.replace(_P,(t,r,i)=>r.charCodeAt(0)<=i.charCodeAt(0)?t:Yc),FP=e=>{let{length:t}=e;return e.slice(0,t-t%2)},TP=[[/^\uFEFF/,()=>Yc],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,r)=>t+(r.indexOf("\\")===0?ix:Yc)],[/(\\+?)\s/g,(e,t)=>{let{length:r}=t;return t.slice(0,r-r%2)+ix}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,r)=>t+6<r.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,r)=>{let i=r.replace(/\\\*/g,"[^\\/]*");return t+i}],[/\\\\\\(?=[$.|*+(){^])/g,()=>Gc],[/\\\\/g,()=>Gc],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,r,i,n)=>t===Gc?`\\[${r}${FP(i)}${n}`:n==="]"&&i.length%2===0?`[${SP(r)}${i}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:"[^/]*"}(?=$|\\/$)`]],sx=Object.create(null),OP=(e,t)=>{let r=sx[e];return r||(r=TP.reduce((i,[n,o])=>i.replace(n,o.bind(e)),e),sx[e]=r),t?new RegExp(r,"i"):new RegExp(r)},Qc=e=>typeof e=="string",kP=e=>e&&Qc(e)&&!vP.test(e)&&!wP.test(e)&&e.indexOf("#")!==0,PP=e=>e.split(CP),Xc=class{constructor(t,r,i,n){this.origin=t,this.pattern=r,this.negative=i,this.regex=n}},IP=(e,t)=>{let r=e,i=!1;e.indexOf("!")===0&&(i=!0,e=e.substr(1)),e=e.replace(EP,"!").replace(bP,"#");let n=OP(e,t);return new Xc(r,e,i,n)},NP=(e,t)=>{throw new t(e)},Nt=(e,t,r)=>Qc(e)?e?Nt.isNotRelative(e)?r(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:r("path must not be empty",TypeError):r(`path must be a string, but got \`${t}\``,TypeError),ux=e=>DP.test(e);Nt.isNotRelative=ux;Nt.convert=e=>e;var Kc=class{constructor({ignorecase:t=!0,ignoreCase:r=t,allowRelativePaths:i=!1}={}){AP(this,nx,!0),this._rules=[],this._ignoreCase=r,this._allowRelativePaths=i,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[nx]){this._rules=this._rules.concat(t._rules),this._added=!0;return}if(kP(t)){let r=IP(t,this._ignoreCase);this._added=!0,this._rules.push(r)}}add(t){return this._added=!1,rx(Qc(t)?PP(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,r){let i=!1,n=!1;return this._rules.forEach(o=>{let{negative:s}=o;if(n===s&&i!==n||s&&!i&&!n&&!r)return;o.regex.test(t)&&(i=!s,n=s)}),{ignored:i,unignored:n}}_test(t,r,i,n){let o=t&&Nt.convert(t);return Nt(o,t,this._allowRelativePaths?ax:NP),this._t(o,r,i,n)}_t(t,r,i,n){if(t in r)return r[t];if(n||(n=t.split(Vc)),n.pop(),!n.length)return r[t]=this._testOne(t,i);let o=this._t(n.join(Vc)+Vc,r,i,n);return r[t]=o.ignored?o:this._testOne(t,i)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return rx(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}},Bo=e=>new Kc(e),RP=e=>Nt(e&&Nt.convert(e),e,ax);Bo.isPathValid=RP;Bo.default=Bo;cx.exports=Bo;if(typeof process<"u"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let e=r=>/^\\\\\?\\/.test(r)||/["<>|\u0000-\u001F]+/u.test(r)?r:r.replace(/\\/g,"/");Nt.convert=e;let t=/^[a-z]:\//i;Nt.isNotRelative=r=>t.test(r)||ux(r)}});var Fx=w((dU,pI)=>{pI.exports={name:"dotenv",version:"16.4.7",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var Px=w((mU,Rt)=>{y();var fl=S("fs"),pl=S("path"),dI=S("os"),mI=S("crypto"),gI=Fx(),dl=gI.version,yI=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function xI(e){let t={},r=e.toString();r=r.replace(/\r\n?/mg,`
|
|
168
|
+
`);let i;for(;(i=yI.exec(r))!=null;){let n=i[1],o=i[2]||"";o=o.trim();let s=o[0];o=o.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),s==='"'&&(o=o.replace(/\\n/g,`
|
|
169
|
+
`),o=o.replace(/\\r/g,"\r")),t[n]=o}return t}function vI(e){let t=kx(e),r=de.configDotenv({path:t});if(!r.parsed){let s=new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);throw s.code="MISSING_DATA",s}let i=Ox(e).split(","),n=i.length,o;for(let s=0;s<n;s++)try{let u=i[s].trim(),l=bI(r,u);o=de.decrypt(l.ciphertext,l.key);break}catch(u){if(s+1>=n)throw u}return de.parse(o)}function wI(e){console.log(`[dotenv@${dl}][INFO] ${e}`)}function EI(e){console.log(`[dotenv@${dl}][WARN] ${e}`)}function $o(e){console.log(`[dotenv@${dl}][DEBUG] ${e}`)}function Ox(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function bI(e,t){let r;try{r=new URL(t)}catch(u){if(u.code==="ERR_INVALID_URL"){let l=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw l.code="INVALID_DOTENV_KEY",l}throw u}let i=r.password;if(!i){let u=new Error("INVALID_DOTENV_KEY: Missing key part");throw u.code="INVALID_DOTENV_KEY",u}let n=r.searchParams.get("environment");if(!n){let u=new Error("INVALID_DOTENV_KEY: Missing environment part");throw u.code="INVALID_DOTENV_KEY",u}let o=`DOTENV_VAULT_${n.toUpperCase()}`,s=e.parsed[o];if(!s){let u=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${o} in your .env.vault file.`);throw u.code="NOT_FOUND_DOTENV_ENVIRONMENT",u}return{ciphertext:s,key:i}}function kx(e){let t=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let r of e.path)fl.existsSync(r)&&(t=r.endsWith(".vault")?r:`${r}.vault`);else t=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else t=pl.resolve(process.cwd(),".env.vault");return fl.existsSync(t)?t:null}function Tx(e){return e[0]==="~"?pl.join(dI.homedir(),e.slice(1)):e}function CI(e){wI("Loading env from encrypted .env.vault");let t=de._parseVault(e),r=process.env;return e&&e.processEnv!=null&&(r=e.processEnv),de.populate(r,t,e),{parsed:t}}function DI(e){let t=pl.resolve(process.cwd(),".env"),r="utf8",i=!!(e&&e.debug);e&&e.encoding?r=e.encoding:i&&$o("No encoding is specified. UTF-8 is used by default");let n=[t];if(e&&e.path)if(!Array.isArray(e.path))n=[Tx(e.path)];else{n=[];for(let l of e.path)n.push(Tx(l))}let o,s={};for(let l of n)try{let m=de.parse(fl.readFileSync(l,{encoding:r}));de.populate(s,m,e)}catch(m){i&&$o(`Failed to load ${l} ${m.message}`),o=m}let u=process.env;return e&&e.processEnv!=null&&(u=e.processEnv),de.populate(u,s,e),o?{parsed:s,error:o}:{parsed:s}}function AI(e){if(Ox(e).length===0)return de.configDotenv(e);let t=kx(e);return t?de._configVault(e):(EI(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),de.configDotenv(e))}function _I(e,t){let r=Buffer.from(t.slice(-64),"hex"),i=Buffer.from(e,"base64"),n=i.subarray(0,12),o=i.subarray(-16);i=i.subarray(12,-16);try{let s=mI.createDecipheriv("aes-256-gcm",r,n);return s.setAuthTag(o),`${s.update(i)}${s.final()}`}catch(s){let u=s instanceof RangeError,l=s.message==="Invalid key length",m=s.message==="Unsupported state or unable to authenticate data";if(u||l){let p=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw p.code="INVALID_DOTENV_KEY",p}else if(m){let p=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw p.code="DECRYPTION_FAILED",p}else throw s}}function SI(e,t,r={}){let i=!!(r&&r.debug),n=!!(r&&r.override);if(typeof t!="object"){let o=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw o.code="OBJECT_REQUIRED",o}for(let o of Object.keys(t))Object.prototype.hasOwnProperty.call(e,o)?(n===!0&&(e[o]=t[o]),i&&$o(n===!0?`"${o}" is already defined and WAS overwritten`:`"${o}" is already defined and was NOT overwritten`)):e[o]=t[o]}var de={configDotenv:DI,_configVault:CI,_parseVault:vI,config:AI,decrypt:_I,parse:xI,populate:SI};Rt.exports.configDotenv=de.configDotenv;Rt.exports._configVault=de._configVault;Rt.exports._parseVault=de._parseVault;Rt.exports.config=de.config;Rt.exports.decrypt=de.decrypt;Rt.exports.parse=de.parse;Rt.exports.populate=de.populate;Rt.exports=de});y();import{createRequire as Nv}from"node:module";import{pathToFileURL as nh}from"node:url";var sh=Nv(import.meta.url);async function oh(e){let t=sh.resolve("vite",process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[e]}),r=await Nl(t),i=r.content.exports?.["."];typeof i!="string"&&(i=i?.import),typeof i!="string"&&(i=i.default);let n=N(me(r.path),i);return import(nh(n).href)}function Rv(e,t){let r=sh.resolve(e,process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[t]});return import(nh(r).href)}y();import Ko from"node:path";import{EventEmitter as Mv}from"node:events";import{ReadableStream as Lv}from"node:stream/web";y();function Br({host:e="",graphql:t}){let r=`${e.endsWith("/")?e.slice(0,-1):e}/graphiql`;if(t){let{query:i,variables:n}=t;typeof n!="string"&&(n=JSON.stringify(n)),r+=`?query=${encodeURIComponent(i)}${n?`&variables=${encodeURIComponent(n)}`:""}`,t.schema&&(r+=`&schema=${t.schema}`)}return r}var ah=Ct(_v(),1),WI="H2O_LOG_EVENT",uh;function zI(e){uh=e.Response}var Zo=new Set(["/graphiql","/graphiql/customer-account.schema.json","/subrequest-profiler","/debug-network-server"]),Bv={request:"Request",subrequest:"Sub request"};async function jv(e){let t=await e.json();return{...t,requestId:t.requestId??"",eventType:t.eventType||"unknown",endTime:t.endTime||Date.now(),purpose:t.purpose==="prefetch"?"(prefetch)":"",cacheStatus:t.cacheStatus??"",graphql:t.graphql?JSON.parse(t.graphql):null}}var Qo=new Mv,Si=[];function Tn(e="ok",t){return new uh(e,t)}function $v(e){return Si.length=0,Tn()}function JI(e){return async function(r){let i=new URL(r.url);if(Zo.has(i.pathname))return Tn();let{url:n,displayName:o,eventType:s,purpose:u,graphql:l,stackInfo:m,...p}=await jv(r),f="",d=r.url,a=o;s==="subrequest"&&(a=a||l?.query.match(/(query|mutation)\s+(\w+)/)?.[0]?.replace(/\s+/," "),d=n||r.url,l&&(f=Br({graphql:l})));let c=null,h=null;if(m?.file){e?.transformLocation&&(m.file=e.transformLocation(m.file));let{source:x,line:v,column:E}=(0,ah.mapSourcePosition)({source:m.file,line:m.line??0,column:m.column??0});c=`${x}:${v}:${E+1}`,h=`vscode://${Ko.join("file",c)}`,c=c.split(Ko.sep+"app"+Ko.sep)[1]??c,m.func&&(c=`${m.func.replace(/\d+$/,"")} (${c})`)}let g={event:Bv[s]||s,data:JSON.stringify({...p,displayName:a,url:`${u} ${d}`.trim(),graphiqlLink:f,stackLine:c,stackLink:h})};return Si.push(g),Si.length>100&&Si.shift(),Qo.emit("request",g),Tn()}}function qv(e){let t=new Lv({start(r){let i=new TextEncoder,n=({event:u="message",data:l})=>{r.enqueue(i.encode(`event: ${u}
|
|
170
170
|
`)),r.enqueue(i.encode(`data: ${l}
|
|
171
171
|
|
|
172
|
-
`))};
|
|
173
|
-
`);return
|
|
174
|
-
`)[0]??"Invalid TOML";throw new
|
|
172
|
+
`))};Si.forEach(n),Qo.addListener("request",n);let o=!1;function s(){o||(o=!0,e.signal.removeEventListener("abort",s),Qo.removeListener("request",n),r.close())}if(e.signal.addEventListener("abort",s),e.signal.aborted)return s()}});return Tn(t,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-store",Connection:"keep-alive"}})}function GI(e){return e.method==="DELETE"?$v():qv(e)}y();var eN="/debug-network-server";function tN(){throw new F("Could not load MiniOxygen.","Please make sure you have `@shopify/mini-oxygen` installed.")}function rN({request:e,response:t,meta:r}){try{let i=new URL(e.url);if(!r.durationMs&&r.startTimeMs&&r.endTimeMs&&(r.durationMs=r.endTimeMs-r.startTimeMs),Zo.has(i.pathname)||i.pathname==="/favicon.ico")return;let n=i.searchParams.has("_data"),o=e.url.replace(i.origin,""),s="",u="render";if(n){u=e.method==="GET"?"loader":"action";let m=i.searchParams.get("_data")?.replace("routes/","");o=i.pathname,s=`[${m}]`}let l=t.status<300?X.green:t.status<400?X.cyan:X.errorText;ht(ie`${e.method.padStart(6)} ${l(String(t.status))} ${X.italic(u.padEnd(7," "))} ${o} ${r.durationMs&&r.durationMs>0?V.dim(` ${r.durationMs}ms`):""}${s?" "+V.dim(s):""}${e.headers.purpose==="prefetch"?V.italic(V.dim(" prefetch")):""}`)}catch{e&&t?.status&&ht(`${e.method} ${t.status} ${e.url}`)}}y();y();y();y();y();y();var Ln=Ct(jh(),1);function $h(e){let t=e.replace(/\r\n$/g,`
|
|
173
|
+
`);return Ln.parse(t)}function qh(e){return Ln.stringify(e)}var ca=Ct(zh(),1),Un=class extends Error{constructor(t,r){super(r),this.name="TomlFileError",this.path=t}},Wn=class e{static async read(t){if(!await $(t))throw new Un(t,`TOML file not found: ${t}`);let r=await U(t),i=new e(t,{});return i.content=i.decode(r),i}constructor(t,r){this.errors=[],this.path=t,this.content=r}async patch(t){let r=Jh(t),i=await U(this.path),n=(0,ca.updateTomlValues)(i,r),o=this.decode(n);await W(this.path,n),this.content=o}async remove(t){let r=t.split("."),i=await U(this.path),n=(0,ca.updateTomlValues)(i,[[r,void 0]]),o=this.decode(n);await W(this.path,n),this.content=o}async replace(t){let r=qh(t);this.decode(r),await W(this.path,r),this.content=t}async transformRaw(t){let r=await U(this.path),i=t(r),n=this.decode(i);await W(this.path,i),this.content=n}decode(t){try{return $h(t)}catch(r){if(r.line!==void 0&&r.col!==void 0){let i=String(r.message).split(`
|
|
174
|
+
`)[0]??"Invalid TOML";throw new Un(this.path,`${i} at row ${r.line}, col ${r.col}`)}throw r}}};function Jh(e,t=[]){let r=[];for(let[i,n]of Object.entries(e)){let o=[...t,i];n!==null&&typeof n=="object"&&!Array.isArray(n)?r.push(...Jh(n,o)):r.push([o,n])}return r}function la(e,t){t||we(e)}async function ha(e,t,r){let i=await fa(t,r);if(!i){la({body:"Environment file not found."},r?.silent);return}let s=(await Wn.read(i)).content.environments;if(!s){la({body:["No environments found in",{command:i},{char:"."}]},r?.silent);return}let u=s[e];if(!u){la({body:["Environment",{command:e},"not found."]},r?.silent);return}return await Ul(()=>({environmentFlags:JSON.stringify(u)})),u}async function fa(e,t){let r=t?.from&&t.from!=="."?t.from:_i();return Dn(e,{cwd:r,type:"file"})}var Jn=Ct(kv()),zn=class extends Jn.Command{static descriptionWithoutMarkdown(){return(this.descriptionWithMarkdown??"").replace(/(\[)(.*?)(])(\()(.*?)(\))/gm,'"$2" ($5)')}static analyticsNameOverride(){}static analyticsStopCommand(){}async catch(t){return t.skipOclifErrorHandling=!0,await $l(t,this.config),Jn.Errors.handle(t)}async init(){return this.exitWithTimestampWhenEnvVariablePresent(),eh(this.id??""),Xl()||await ql(this.config),await _w(this.config),this.showNpmFlagWarning(),await th(),super.init()}showNpmFlagWarning(){let t=this.constructor;Object.keys(t.flags||{}).map(n=>`npm_config_${bl(n).replace(/^no_/,"")}`).some(n=>process.env[n]!==void 0)&&we({body:["NPM scripts require an extra",{command:"--"},"separator to pass the flags. Example:",{command:"npm run dev -- --reset"}]})}exitWithTimestampWhenEnvVariablePresent(){gl(process.env.SHOPIFY_CLI_ENV_STARTUP_PERFORMANCE_RUN)&&(Zl(`
|
|
175
175
|
SHOPIFY_CLI_TIMESTAMP_START
|
|
176
176
|
{ "timestamp": ${Date.now()} }
|
|
177
177
|
SHOPIFY_CLI_TIMESTAMP_END
|
|
178
|
-
`),process.exit(0))}async parse(t,r){let i=await super.parse(t,r);return i=await this.resultWithEnvironment(i,t,r),await
|
|
178
|
+
`),process.exit(0))}async parse(t,r){let i=await super.parse(t,r);return i=await this.resultWithEnvironment(i,t,r),await bw(i.flags),{...i,argv:i.argv}}environmentsFilename(){}failMissingNonTTYFlags(t,r){Vl()||r.forEach(i=>{if(!(i in t))throw new F(ie`Flag not specified:
|
|
179
179
|
|
|
180
|
-
${
|
|
180
|
+
${X.cyan(i)}
|
|
181
181
|
|
|
182
|
-
This flag is required in non-interactive terminal environments, such as a CI environment, or when piping input from another process.`,"To resolve this, specify the option in the command, or run the command in an interactive environment such as your local terminal.")})}async resultWithEnvironment(t,r,i){let n=t.flags,o=this.environmentsFilename();if(!o)return t;let s=await
|
|
182
|
+
This flag is required in non-interactive terminal environments, such as a CI environment, or when piping input from another process.`,"To resolve this, specify the option in the command, or run the command in an interactive environment such as your local terminal.")})}async resultWithEnvironment(t,r,i){let n=t.flags,o=this.environmentsFilename();if(!o)return t;let s=await fa(o,{from:n.path}),u=[];n.environment&&(u=Array.isArray(n.environment)?n.environment:[n.environment]);let l=u.length>0;if(!s&&!l||l&&u.length>1)return t;let{environment:m,isDefaultEnvironment:p}=await this.loadEnvironmentForCommand(n.path,o,u[0]);if(!m||p&&!Gh(r?.flags,"environment"))return t;let f=await super.parse(Dw(r),i),d=await super.parse(r,[...i??this.argv,...Aw(m,r,f),...p?["--environment","default"]:[]]);return Cw(f.flags,d.flags,p?"default":u[0],m),d}async loadEnvironmentForCommand(t,r,i){return i?{environment:await ha(i,r,{from:t}),isDefaultEnvironment:!1}:{environment:await ha("default",r,{from:t,silent:!0}),isDefaultEnvironment:!0}}};zn.baseFlags={};async function bw(e){await Hl(()=>({cmd_all_verbose:e.verbose,cmd_all_path_override:e.path!==void 0,cmd_all_path_override_hash:e.path===void 0?void 0:Dl(e.path)}))}function Cw(e,t,r,i){let n={};for(let[s,u]of Object.entries(t)){let l=Object.prototype.hasOwnProperty.call(e,s),m=Object.prototype.hasOwnProperty.call(i,s);if(!l&&m){let p=s==="password"?`********${u.substr(-4)}`:u;n[s]=p}}if(Object.keys(n).length===0)return;let o=Object.entries(n).map(([s,u])=>`${s}: ${u}`);rt({headline:["Using applicable flags from",{userInput:r},"environment:"],body:[{list:{items:o}}]})}function Dw(e){return e?.flags?{...e,flags:Object.fromEntries(Object.entries(e.flags).map(([t,r])=>{let i={...r};return delete i.default,[t,i]}))}:e}function Aw(e,t,r){let i=[];for(let[n,o]of Object.entries(e)){let s=Gh(t?.flags,n),u=r.flags&&Object.prototype.hasOwnProperty.call(r.flags,n);if(s&&!u)if(typeof o=="boolean")if(o)i.push(`--${n}`);else throw new F(ie`Environments can only specify true for boolean flags. Attempted to set ${X.yellow(n)} to false.`);else Array.isArray(o)?o.forEach(l=>i.push(`--${n}`,`${l}`)):i.push(`--${n}`,`${o}`)}return i}function Gh(e,t){return!!e&&Object.prototype.hasOwnProperty.call(e,t)}async function _w(e){let t=Array.from(e.plugins.values()),r=["@shopify/app","@shopify/plugin-cloudflare"],i=t.filter(o=>r.includes(o.name));if(i.length>0){let o=i.map(s=>` - shopify plugins remove ${s.name}`).join(`
|
|
183
183
|
`);we({headline:`Unsupported plugins detected: ${i.map(s=>s.name).join(", ")}`,body:["They are already included in the CLI and installing them as custom plugins can cause conflicts.",`You can fix it by running:
|
|
184
|
-
${o}`]})}let n=t.filter(o=>!r.includes(o.name));e.plugins=new Map(n.map(o=>[o.name,o]))}var
|
|
184
|
+
${o}`]})}let n=t.filter(o=>!r.includes(o.name));e.plugins=new Map(n.map(o=>[o.name,o]))}var Gn=zn;var xn=Ct(To(),1);y();var _x=Ct(To(),1);y();var re=Ct(To(),1);y();y();y();import{fileURLToPath as vy}from"node:url";import{existsSync as Hk}from"node:fs";y();import{exec as $k}from"node:child_process";import{promisify as qk}from"node:util";var ot=qk($k);function Kj(){let e=process.listeners("warning")[0];e&&(process.removeAllListeners("warning"),process.prependListener("warning",t=>{t.name!="ExperimentalWarning"&&e(t)}))}var Pc=new URL("../../..",import.meta.url).pathname,fn=(()=>{try{let e=N(me(Pc),"templates","skeleton");return Hk(e)}catch{return!1}})(),o$=fn?Pc:void 0,Uk="assets/hydrogen",Wk="starter",Qt="routes",kc;async function zk(){if(kc??=await Dn("package.json",{cwd:vy(import.meta.url),type:"file"}),!kc)throw new F("Could not find assets directory","Please report this error.");return kc}async function at(e,...t){return N(me(await zk()),process.env.SHOPIFY_UNIT_TEST?"assets":`dist/${Uk}`,e??"",...t)}async function pn(e,t){t??=await Ic();let r=new URL(`${t}/app${e?`/${e}`:""}`,import.meta.url);return r.protocol==="file:"?vy(r):r.toString()}function Ic(e=!!process.env.SHOPIFY_UNIT_TEST){return e?Oo():at(Wk)}function Oo(){if(!fn)throw new F("Trying to use skeleton source dir outside of Hydrogen monorepo.","Please report this error.");return N(me(Pc),"templates","skeleton")}function Jk(){return N(Oo(),"node_modules")}async function wy(){if(fn)return Jk();let{stdout:e}=await ot("npm root");return e.trim()}var Nc=["tailwind","vanilla-extract","css-modules","postcss"];async function Ey(e,t,r,i=(n,o)=>n){let n=await at(e);return Promise.all(Object.entries(t).map(async([o,s])=>{let u=await U(N(n,o));await W(N(r,s),i(u,o))}))}async function by(e,t,r){let i=Object.values(e).map(o=>$(N(t,o)).then(s=>s?o:null)),n=(await Promise.all(i)).filter(Boolean);return!(n.length>0&&!r&&!await lt({message:`Some files already exist (${n.join(", ")}). Overwrite?`,defaultValue:!1}))}y();y();import{readdir as Gk}from"node:fs/promises";y();Iv();import*as Cy from"fs/promises";import*as Dy from"path";var Rc={arrowParens:"always",singleQuote:!0,bracketSpacing:!1,trailingComma:"all"};async function wt(e=process.cwd()){let t=(await Cy.lstat(e)).isFile()?e:Dy.resolve(e,"prettier.file");try{return await rh(t)||Rc}catch{return Rc}}async function Zt(e,t=Rc,r=""){let i=wn(r);return ih(e,{parser:i===".tsx"||i===".ts"?"typescript":"babel",...t})}async function bi(e,t,r){let i=await r(await U(e));if(typeof i=="string")return t&&(i=await Zt(i,t,e)),W(e,i)}var Vk=["tsx","ts","jsx","js","mjs","cjs"];async function Fe(e,t,r=Vk){let i=await Gk(e);if(i.includes(t)){let n=G(e,t);if(!await Nr(n))return{filepath:n};for(let o of["ts","js"]){let s=G(e,`${t}/index.${o}`);if(await $(G(e,s)))return{filepath:s,extension:o,astType:o}}}else for(let n of r){let o=`${t}.${n}`;if(i.includes(o)){let s=n==="mjs"||n==="cjs"?"js":n;return{filepath:G(e,o),extension:n,astType:s}}}return{}}var Ay=Object.freeze(["dependencies","devDependencies","peerDependencies"]);async function ko(e,t,r){let i=await Jo(N(t,"package.json")),n=await Jo(N(e,"package.json")),o=new Set(["comment",...r?.ignoredKeys??[]]),s=Object.keys(n).filter(l=>!Ay.includes(l));for(let l of s){if(o.has(l))continue;let m=n[l],p=i[l],f=Array.isArray(m)&&Array.isArray(p)?[...p,...m]:typeof m=="object"&&typeof p=="object"?{...p,...m}:m;i[l]=f}let u=Object.entries(i.dependencies||{}).find(([l])=>l.startsWith("@remix-run/"))?.[1];for(let l of Ay)o.has(l)||n[l]&&(i[l]=[...new Set([...Object.keys(i[l]??{}),...Object.keys(n[l]??{})])].sort().reduce((m,p)=>{let f=n[l]?.[p]??i[l]?.[p];return p.startsWith("@remix-run/")&&u&&(f=u),m[p]=f,m},{}));await Rl(t,r?.onResult?.(i)??i)}y();y();async function dn(e){let t=await import("@ast-grep/napi");if(!(e in t))throw new Error(`Wrong language for AST: ${e}`);return t[e]}async function _y(e,t,r){let{filepath:i,astType:n}=await Fe(e,"root");if(!i||!n)throw new F(`Could not find root file in ${e}`);await bi(i,t,async o=>{let s=`import ${r.isDefault?r.name:`{${r.name}}`} from '${(r.isAbsolute?"":"./")+r.path}';`;if(o.includes(s.split("from")[0]))return;let l=(await dn(n)).parse(o).root(),m=l.findAll({rule:{kind:"import_statement"}}).reverse(),p=m.find(h=>h.text().includes(".css"))||m.shift(),f=l.find({rule:{kind:"jsx_element",regex:"resetStyles",has:{kind:"jsx_opening_element",has:{kind:"identifier",pattern:"link"}}}});if(!p||!f)throw new F('Could not find a "links" export in root file. Please add one and try again.');let d=p.text(),a=f.text(),c=r.isConditional?`{${r.name} && <link rel="stylesheet" href={${r.name}}></link>}`:`<link rel="stylesheet" href={${r.name}}></link>`;return o.replace(d,d+`
|
|
185
185
|
`+s).replace(a,c+`
|
|
186
|
-
`+a)})}async function
|
|
187
|
-
`+u).replace(a,a.replace("[",`[${c},`))})}var
|
|
188
|
-
`+o.stack)}try{let o=N(e,"tsconfig.json"),s=await U(o),u=
|
|
186
|
+
`+a)})}async function Po(e,t,r,i){let{filepath:n,astType:o}=await Fe(e,"vite.config");if(!n||!o)throw new F(`Could not find vite.config file in ${e}`);await bi(n,t,async s=>{let u=`import ${r.isDefault?r.name:`{${r.name}}`} from '${r.path}';`;if(new RegExp(`['"]${r.path.replace("/","\\/")}['"]`).test(s))return;let m=(await dn(o)).parse(s).root(),p=m.findAll({rule:{kind:"import_statement"}}).pop(),f=m.find(Yk);if(!p||!f)throw new F('Could not find a "plugins" key in Vite config file. Please add one and try again.');let d=p.text(),a=f.text(),c=`${r.name}(${i?JSON.stringify(i):""})`;return s.replace(d,d+`
|
|
187
|
+
`+u).replace(a,a.replace("[",`[${c},`))})}var Yk={rule:{pattern:"[$$$]",inside:{kind:"pair",stopBy:"neighbor",has:{field:"key",regex:"^plugins$",stopBy:"neighbor"},inside:{kind:"object",stopBy:"neighbor",all:[{inside:{kind:"export_statement",regex:"export default",stopBy:"end"}},{not:{inside:{kind:"object",stopBy:"end"}}}]}}}};var Sy="styles/tailwind.css";async function Fy({rootDirectory:e,appDirectory:t},r=!1){let i=Bt(e,t),n={"tailwind.css":N(i,Sy)};if(!await by(n,t,r)){ht("Skipping CSS setup as some files already exist. You may use `--force` or `-f` to override it.");return}return{workPromise:Promise.all([ko(await at("tailwind"),e),Ey("tailwind",n,e),wt(e).then(s=>Promise.all([_y(t,s,{name:"tailwindCss",path:`${Sy}?url`,isDefault:!0}),Po(e,s,{name:"tailwindcss",path:"@tailwindcss/vite",isDefault:!0})]))]),generatedAssets:Object.values(n),needsInstallDeps:!0}}y();async function Ty({rootDirectory:e}){return{workPromise:Promise.all([ko(await at("vanilla-extract"),e),wt(e).then(r=>Po(e,r,{path:"@vanilla-extract/vite-plugin",name:"vanillaExtractPlugin",isDefault:!1}))]),generatedAssets:[],needsInstallDeps:!0}}var Mc=[...Nc,"none"],Lc={tailwind:"Tailwind v4","vanilla-extract":"Vanilla Extract","css-modules":"CSS Modules",postcss:"PostCSS"},Q$={postcss:"https://vitejs.dev/guide/features.html#postcss","css-modules":"https://vitejs.dev/guide/features.html#css-modules","vanilla-extract":"https://vanilla-extract.style/documentation/styling/",tailwind:"https://tailwindcss.com/docs/configuration"};function Oy(e,t,r){switch(e){case"tailwind":return Fy(t,r);case"vanilla-extract":return Ty(t);case"postcss":case"css-modules":return{workPromise:Promise.resolve(),generatedAssets:[],needsInstallDeps:!1};default:throw new Error("Unknown strategy")}}async function ky(e){let t=Object.entries({...Lc,...e?.extraChoices});return ct({message:"Select a styling library",...e,choices:t.map(([r,i])=>({value:r,label:i})),defaultValue:"tailwind"})}y();y();y();y();async function er(e,t,r=!0){let{transpileTs:i}=await import("./morph-DQREIZD2.js");return i(e,t,r)}y();var Py={checkJs:!1,target:"ES2022",module:"ES2022",moduleResolution:"bundler",baseUrl:".",paths:{"~/*":["app/*"]}},Xk=new Set(["noLib","target","module","moduleResolution","checkJs","experimentalDecorators","allowSyntheticDefaultImports","baseUrl","paths",...Object.keys(Py)]);function Kk(e,t=!1){let r={compilerOptions:{...Py}};if(e.include&&(r.include=e.include.filter(i=>t||!i.endsWith(".d.ts")).map(i=>i.replace(/(?<!\.d)\.ts(x?)$/,".js$1"))),e.compilerOptions)for(let i of Xk)e.compilerOptions[i]!==void 0&&(r.compilerOptions[i]=e.compilerOptions[i]);return r}async function Bc(e,t=!0){let r=N(e,"app/routes.ts");if(await $(r)){let s=(await U(r)).replace("./layout.tsx","./layout.jsx");await W(r,s)}let i=await Cn("**/*.+(ts|tsx)",{absolute:!0,cwd:e,dot:!0,ignore:["**/node_modules/**"]}),n=await wt();for(let o of i){if(o.endsWith(".d.ts")){t||await bn(o);continue}let s=await U(o),u=await Zt(await er(s,o,t),n);await bn(o),await W(o.replace(/\.ts(x?)$/,".js$1"),u)}try{let o=N(e,"remix.config.js"),s=await U(o);s=s.replace(/\/server\.ts/gim,"/server.js"),await W(o,s)}catch(o){K(`Could not change TS extensions in remix.config.js:
|
|
188
|
+
`+o.stack)}try{let o=N(e,"tsconfig.json"),s=await U(o),u=Kk(JSON.parse(s.replace(/^\s*\/\/.*$/gm,"")),t);await bn(o),await W(N(e,"jsconfig.json"),JSON.stringify(u,null,2))}catch(o){K(`Could not transpile tsconfig.json:
|
|
189
189
|
`+o.stack)}try{let o=JSON.parse(await U(N(e,"package.json")));delete o.scripts.typecheck;let s=/react-router typegen\s*&&\s*/g;for(let[u,l]of Object.entries(o.scripts||{}))typeof l=="string"&&l.includes("react-router typegen")&&(o.scripts[u]=l.replace(s,""));if(!t){delete o.devDependencies.typescript,delete o.devDependencies["@shopify/oxygen-workers-types"];for(let l of Object.keys(o.devDependencies))l.startsWith("@types/")&&delete o.devDependencies[l];let u=/\s*--codegen/;o.scripts?.dev&&(o.scripts.dev=o.scripts.dev.replace(u,"")),o.scripts?.build&&(o.scripts.build=o.scripts.build.replace(u,""))}await W(N(e,"package.json"),JSON.stringify(o,null,2))}catch(o){K(`Could not remove TS dependencies from package.json:
|
|
190
190
|
`+o.stack)}try{let{filepath:o=N(e,".eslintrc.cjs")}=await Fe(e,".eslintrc",["cjs","js"]),s=await U(o);t||(s=s.replace(/\/\*\*[\s*]+@type.+\s+\*\/\s?/gim,"")),s=s.replace(/\s*,?\s*['"`]plugin:hydrogen\/typescript['"`]/gim,"").replace(/\s+['"`]@typescript-eslint\/.+,/gim,""),await W(o,await Zt(s,n))}catch(o){K(`Could not remove TS rules from .eslintrc:
|
|
191
|
-
`+o.stack)}}async function
|
|
191
|
+
`+o.stack)}}async function Iy({rootDirectory:e,contextCreate:t=N("app","lib","context.ts")},r,i){let n="createAppLoadContext",{filepath:o,astType:s}=await Zk({rootDirectory:e,contextCreate:t}),u=await U(i),l=await Qk({rootDirectory:e,contextCreate:t},r,i);await bi(o,r,async m=>{let f=(await dn(s)).parse(m).root(),a=f.find({rule:{kind:"identifier",inside:{kind:"formal_parameters",stopBy:"end",inside:{kind:"function_declaration",stopBy:"end",has:{kind:"identifier",regex:`^${n}$`}}}}})?.text()??"request",c=u.match(/^(export )?function (\w+)/m)?.[2];if(!c)throw new Error("Could not find the i18n function name");let h=`${c}(${a})`,g="@shopify/hydrogen",x="createHydrogenContext",v=f.find({rule:{kind:"import_specifier",inside:{kind:"import_statement",stopBy:"end",has:{kind:"string_fragment",stopBy:"end",regex:`^${g}$`}},has:{kind:"identifier",regex:`^${x}`}}}),[E,D]=v?.text().split(/\s+as\s+/)||[];if(E=D??E,!E)throw new F(`Could not find a Hydrogen import in ${t}`,`Please import "${x}" from "${g}"`);let A=f.find({rule:{kind:"object",inside:{kind:"arguments",inside:{kind:"call_expression",has:{kind:"identifier",regex:E}}}}});if(!A)throw new F(`Could not find a Hydrogen client instantiation with an inline object as argument in ${t}`,`Please add a call to ${E}({...})`);let I=A.find({rule:{kind:"property_identifier",regex:"^i18n$"}})?.next()?.next();if(I){if(I.text().includes(c))throw new F("An i18n strategy is already set up.",`Remove the existing i18n property in the ${E}({...}) call to set up a new one.`);let{start:Y,end:ve}=I.range();m=m.slice(0,Y.index)+h+m.slice(ve.index)}else{let{end:Y}=A.range(),ve=m.slice(0,Y.index-1);m=ve+((/,\s*$/.test(ve)?"":",")+`i18n: ${h}`)+m.slice(Y.index-1)}let j=f.findAll({rule:{kind:"import_statement"}}).pop()?.range()??{end:{index:0}},J=N("~",Bt(N(e,"app"),l.slice(0,-wn(l).length)));return m=m.slice(0,j.end.index)+`import {getLocaleFromRequest} from "${J}";`+m.slice(j.end.index),m})}async function Qk({rootDirectory:e,contextCreate:t=N("app","lib","context.ts")},r,i){let n=t?.endsWith(".js")||!1,o=N(e,me(t),n?"i18n.js":"i18n.ts");if(await $(o))throw new F(`${o} already exist. Renamed or remove the existing file before continue.`);return await Ir(i,o),await bi(o,r,async s=>(s=s.replace(/\.\/mock-i18n-types\.js/,"@shopify/hydrogen"),n&&(s=await er(s,i)),s)),o}async function Zk({rootDirectory:e,contextCreate:t=N("app","lib","context.ts")}){let r=t.match(/\.([jt]sx?)$/)?.[1],{filepath:i,astType:n}=r?{filepath:G(e,t),astType:r}:await Fe(e,N(t));if(!i||!n)throw new F(`Could not find a context create file at ${G(e,t)}`);return{filepath:i,astType:n}}var eP=["subfolders","domains","subdomains"],jc={subfolders:"Subfolders (example.com/fr-ca/...)",subdomains:"Subdomains (de.example.com/...)",domains:"Top-level domains (example.jp/...)"},$c=[...eP,"none"];async function Ny(e,t){let r=await at("i18n",`${e}.ts`);if(!await $(r))throw new Error("Unknown strategy");let i=await wt(t.rootDirectory);await Iy(t,i,r)}async function Ry(e){let t=Object.entries({...jc,...e?.extraChoices});return ct({message:"Select a URL structure to support multiple markets",...e,choices:t.map(([r,i])=>({value:r,label:i}))})}var tP=3e3,rP=9229,mn={path:{path:re.Flags.string({description:"The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run.",env:"SHOPIFY_HYDROGEN_FLAG_PATH"})},port:{port:re.Flags.integer({description:`The port to run the server on. Defaults to ${tP}.`,env:"SHOPIFY_HYDROGEN_FLAG_PORT"})},force:{force:re.Flags.boolean({description:"Overwrites the destination directory and files if they already exist.",env:"SHOPIFY_HYDROGEN_FLAG_FORCE",char:"f"})},shop:{shop:re.Flags.string({char:"s",description:"Shop URL. It can be the shop prefix (janes-apparel) or the full myshopify.com URL (janes-apparel.myshopify.com, https://janes-apparel.myshopify.com).",env:"SHOPIFY_SHOP",parse:async e=>An(e)})},installDeps:{"install-deps":re.Flags.boolean({description:"Auto installs dependencies using the active package manager.",env:"SHOPIFY_HYDROGEN_FLAG_INSTALL_DEPS",allowNo:!0})},env:{env:re.Flags.string({description:"Specifies the environment to perform the operation using its handle. Fetch the handle using the `env list` command.",exclusive:["env-branch"]})},envBranch:{"env-branch":re.Flags.string({description:"Specifies the environment to perform the operation using its Git branch name.",env:"SHOPIFY_HYDROGEN_ENVIRONMENT_BRANCH",deprecated:{to:"env",message:"--env-branch is deprecated. Use --env instead."}})},envFile:{"env-file":re.Flags.string({description:"Path to an environment file to override existing environment variables. Defaults to the '.env' located in your project path `--path`.",required:!1,default:".env"})},sourcemap:{sourcemap:re.Flags.boolean({description:"Controls whether server sourcemaps are generated. Default to `true`. Deactivate `--no-sourcemaps`.",env:"SHOPIFY_HYDROGEN_FLAG_SOURCEMAP",default:!0,allowNo:!0})},codegen:{codegen:re.Flags.boolean({description:"Automatically generates GraphQL types for your project\u2019s Storefront API queries.",required:!1}),"codegen-config-path":re.Flags.string({description:"Specifies a path to a codegen configuration file. Defaults to `<root>/codegen.ts` if this file exists.",required:!1,dependsOn:["codegen"]})},styling:{styling:re.Flags.string({description:`Sets the styling strategy to use. One of ${Mc.map(e=>`\`${e}\``).join(", ")}.`,choices:Mc,env:"SHOPIFY_HYDROGEN_FLAG_STYLING"})},markets:{markets:re.Flags.string({description:`Sets the URL structure to support multiple markets. Must be one of: ${$c.map(e=>`\`${e}\``).join(", ")}. Example: \`--markets subfolders\`.`,choices:$c,env:"SHOPIFY_HYDROGEN_FLAG_I18N"})},shortcut:{shortcut:re.Flags.boolean({description:"Creates a global h2 shortcut for Shopify CLI using shell aliases. Deactivate with `--no-shortcut`.",env:"SHOPIFY_HYDROGEN_FLAG_SHORTCUT",allowNo:!0})},debug:{debug:re.Flags.boolean({description:"Enables inspector connections to the server with a debugger such as Visual Studio Code or Chrome DevTools.",env:"SHOPIFY_HYDROGEN_FLAG_DEBUG"})},inspectorPort:{"inspector-port":re.Flags.integer({description:`The port where the inspector is available. Defaults to ${rP}.`,env:"SHOPIFY_HYDROGEN_FLAG_INSPECTOR_PORT"})},entry:{entry:re.Flags.string({description:"Entry file for the worker. Defaults to `./server`.",env:"SHOPIFY_HYDROGEN_FLAG_ENTRY"})},lockfileCheck:{"lockfile-check":re.Flags.boolean({allowNo:!0,default:!0,description:"Checks that there is exactly one valid lockfile in the project. Defaults to `true`. Deactivate with `--no-lockfile-check`.",env:"SHOPIFY_HYDROGEN_FLAG_LOCKFILE_CHECK"})},disableRouteWarning:{"disable-route-warning":re.Flags.boolean({description:"Disables any warnings about missing standard routes.",env:"SHOPIFY_HYDROGEN_FLAG_DISABLE_ROUTE_WARNING"})},customerAccountPush:{"customer-account-push":re.Flags.boolean({description:"Use tunneling for local development and push the tunneling domain to admin. Required to use Customer Account API's OAuth flow",required:!1,env:"SHOPIFY_HYDROGEN_FLAG_CUSTOMER_ACCOUNT_PUSH"})},verbose:{verbose:re.Flags.boolean({description:"Outputs more information about the command's execution.",required:!1,env:"SHOPIFY_HYDROGEN_FLAG_VERBOSE"})}};function qc(e){return Object.entries(e).reduce((t,[r,i])=>(t[wl(r)]=i,t),{})}function L3(e,t={}){let[,,...r]=e,i={};for(let n=0;n<r.length;n++){let o=r[n],s=r[n+1];if(o?.startsWith("-")){let u=o.replace(/^\-{1,2}/,""),l=!s||s.startsWith("-")?!0:s;l===!0&&u.startsWith("no-")&&(l=!1,u=u.replace("no-","")),i[t[u]||u]=l}}return qc(i)}function B3(e,t){return Object.entries(t).reduce((r,[i,n])=>(r[i]={...e[i],...n},r),{...e})}y();y();async function Qe(e,t,r){let i="Admin",n=`https://${t.storeFqdn}/admin/api/unstable/graphql.json`;try{return await Tl({query:e,api:i,url:n,token:t.token,variables:r})}catch(o){let s=o.errors;throw s?.some?.(u=>u.message.includes("app is not installed"))?new F("Hydrogen sales channel isn't installed","Install the Hydrogen sales channel on your store to start creating and linking Hydrogen storefronts: https://apps.shopify.com/hydrogen"):s?.some?.(u=>u.message.includes("Access denied for hydrogenStorefrontCreate field"))?new F("Couldn't connect storefront to Shopify",["Common reasons for this error include:",{list:{items:["The Hydrogen sales channel isn't installed on the store.","You don't have the required account permission to manage apps or channels.","You're trying to connect to an ineligible store type (Trial, Development store)"]}}]):o}}y();var iP=/gid:\/\/shopify\/\w*\/(\d+)/;function My(e){let t=iP.exec(e);if(t&&t[1]!==void 0)return t[1];throw new F(`Invalid Global ID: ${e}`)}var nP=`#graphql
|
|
192
192
|
query LinkStorefront {
|
|
193
193
|
hydrogenStorefronts {
|
|
194
194
|
id
|
|
@@ -196,9 +196,9 @@ ${o}`]})}let n=t.filter(o=>!r.includes(o.name));e.plugins=new Map(n.map(o=>[o.na
|
|
|
196
196
|
productionUrl
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
|
-
`;async function
|
|
200
|
-
`),r+=`${
|
|
201
|
-
`,await W(t,r),!0)}catch{return!1}}async function
|
|
199
|
+
`;async function Io(e){let{hydrogenStorefronts:t}=await Qe(nP,e);return t.map(r=>({...r,parsedId:My(r.id)}))}y();var Or=".shopify",Ci="project.json";async function Ly(e){let t=G(e,Or,Ci);await $(t)&&await W(t,JSON.stringify({}))}async function Di(e){let t=G(e,Or,Ci);return await $(t)?JSON.parse(await U(t)):{}}async function By(e,{shop:t,shopName:r,email:i}){let n=G(e,Or,Ci),o={};await $(n)?o=JSON.parse(await U(n)):await En(me(n));let s={...o,shop:t,shopName:r,email:i};return await W(n,JSON.stringify(s)),await No(e),s}async function jy(e,{id:t,title:r}){try{let i=G(e,Or,Ci),o={...JSON.parse(await U(i)),storefront:{id:t,title:r}};return await W(i,JSON.stringify(o)),await No(e),o}catch{throw new F("Project configuration could not be found.")}}async function tq(e){try{let t=G(e,Or,Ci),i={...JSON.parse(await U(t)),storefront:void 0};return await W(t,JSON.stringify(i)),await No(e),i}catch{throw new F("Project configuration could not be found.")}}async function No(e){try{let t=G(e,".gitignore"),r=await $(t)?await U(t):"";return r.includes(".shopify")?!1:(r.length>0&&(r+=`
|
|
200
|
+
`),r+=`${Or}\r
|
|
201
|
+
`,await W(t,r),!0)}catch{return!1}}async function $y(e,t){try{let r=G(e,Or,Ci),i=JSON.parse(await U(r)),n={...i,storefront:{...i.storefront,customerAccountConfig:t}};return await W(r,JSON.stringify(n)),await No(e),n}catch{throw new F("Project configuration could not be found.")}}y();var sP=`#graphql
|
|
202
202
|
mutation CreateStorefront($title: String!) {
|
|
203
203
|
hydrogenStorefrontCreate(title: $title) {
|
|
204
204
|
hydrogenStorefront {
|
|
@@ -214,7 +214,7 @@ ${o}`]})}let n=t.filter(o=>!r.includes(o.name));e.plugins=new Map(n.map(o=>[o.na
|
|
|
214
214
|
jobId
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
|
-
`;async function
|
|
217
|
+
`;async function qy(e,t){let{hydrogenStorefrontCreate:{hydrogenStorefront:r,userErrors:i,jobId:n}}=await Qe(sP,e,{title:t});if(!r||!n||i.length>0){let o=i.map(({message:s})=>s).join(", ");throw new F("Could not create storefront. "+o)}return{jobId:n,storefront:r}}y();var oP=`#graphql
|
|
218
218
|
query FetchJob($id: ID!) {
|
|
219
219
|
hydrogenStorefrontJob(id: $id) {
|
|
220
220
|
id
|
|
@@ -225,27 +225,27 @@ ${o}`]})}let n=t.filter(o=>!r.includes(o.name));e.plugins=new Map(n.map(o=>[o.na
|
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
`;async function
|
|
229
|
-
`,"\\n"),
|
|
230
|
-
`+n.stack),!1}}async function
|
|
231
|
-
`+r.stack),!1}}function
|
|
228
|
+
`;async function aP(e,t){let{hydrogenStorefrontJob:r}=await Qe(oP,e,{id:t});return r}function Hy(e,t){return new Promise((r,i)=>{let n=setInterval(async()=>{let o=await aP(e,t);if(o.errors.length>0)return clearInterval(n),i();if(o.done)return clearInterval(n),r()},500)})}y();function Ro(e=""){return e.replace(/[\W_]+/g," ").split(" ").filter(t=>t.length>0).map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(" ")}y();import Uc from"node:os";var Me="h2",Wc=()=>Uc.platform()==="win32",Jy=()=>!!process.env.MINGW_PREFIX;function zc(e){return e[0]==="~"?N(Uc.homedir(),e.slice(1)):e}function uP(e){try{return $(zc(e))}catch{return!1}}async function cP(e){try{return await ot(`which ${e}`),!0}catch{return!1}}function Gy(e){return e==="bash"?"~/.bashrc":e==="zsh"?"~/.zshrc":`~/.config/fish/functions/${Me}.fish`}async function Vy(e,t){let r=Gy(t);try{return t==="fish"?await uP(r):!!(await ot(`grep 'alias ${e}' ${zc(r)}`)).stdout}catch{return!1}}async function lP(e,t,r=!1){let i=Gy(e);t=`"${t}"`,t=t.replaceAll(`
|
|
229
|
+
`,"\\n"),Wc()||(t=t.replaceAll("$","\\$"));try{return await ot(`printf ${t} ${r?">>":">"} ${zc(i)}`),!0}catch(n){return K(`Could not create or modify ${i}:
|
|
230
|
+
`+n.stack),!1}}async function Hc(e,t,r){return await cP(e)?await Vy(t,e)?!0:await lP(e,r,e!=="fish"):!1}async function Uy(e,t){try{return await ot(e,{shell:t}),!0}catch(r){return K(`Could not run shell script for ${t}:
|
|
231
|
+
`+r.stack),!1}}function hP(e){return["zsh","bash","fish"].includes(e)}async function fP(){try{if(Wc()&&!Jy())await ot(`Get-Alias -Name ${Me}`);else{let e=Uc.userInfo().shell?.split("/").pop()??"bash";return hP(e)?await Vy(Me,e):!1}return!0}catch{return!1}}async function Yy(){return Wc()&&!Jy()?await gP():await dP()}var Wy=`
|
|
232
232
|
# Shopify Hydrogen alias to local projects
|
|
233
233
|
alias ${Me}='$(npm prefix -s)/node_modules/.bin/shopify hydrogen'
|
|
234
|
-
`,
|
|
234
|
+
`,pP=`
|
|
235
235
|
function ${Me} --wraps='shopify hydrogen' --description 'Shortcut for the Hydrogen CLI'
|
|
236
236
|
set npmPrefix (npm prefix -s)
|
|
237
237
|
$npmPrefix/node_modules/.bin/shopify hydrogen $argv
|
|
238
238
|
end
|
|
239
|
-
`;async function
|
|
239
|
+
`;async function dP(){let e=[];return await Hc("zsh",Me,Wy)&&e.push("zsh"),await Hc("bash",Me,Wy)&&e.push("bash"),await Hc("fish",Me,pP)&&e.push("fish"),e}var mP=`function Invoke-Local-H2 {$npmPrefix = npm prefix -s; Invoke-Expression "$npmPrefix\\node_modules\\.bin\\shopify.ps1 hydrogen $Args"}; Set-Alias -Name ${Me} -Value Invoke-Local-H2`,zy=`
|
|
240
240
|
if (!(Test-Path -Path $PROFILE)) {
|
|
241
241
|
New-Item -ItemType File -Path $PROFILE -Force
|
|
242
242
|
}
|
|
243
243
|
|
|
244
244
|
$profileContent = Get-Content -Path $PROFILE
|
|
245
245
|
if (!$profileContent -or $profileContent -NotLike '*Invoke-Local-H2*') {
|
|
246
|
-
Add-Content -Path $PROFILE -Value '${
|
|
246
|
+
Add-Content -Path $PROFILE -Value '${mP}'
|
|
247
247
|
}
|
|
248
|
-
`;async function
|
|
248
|
+
`;async function gP(){let e=[];return await Uy(zy,"powershell.exe")&&e.push("PowerShell"),await Uy(zy,"pwsh.exe")&&e.push("PowerShell 7+"),e}async function Mo(e=process.cwd(),t){if(await fP())return Me;let r="npx",i=t??await Pl(e).catch(()=>null);return(i==="bun"||i==="pnpm"||i==="yarn")&&(r=i),`${r} shopify hydrogen`}y();y();var yP=`#graphql
|
|
249
249
|
query currentUserAccount {
|
|
250
250
|
currentUserAccount {
|
|
251
251
|
email
|
|
@@ -297,21 +297,21 @@ if (!$profileContent -or $profileContent -NotLike '*Invoke-Local-H2*') {
|
|
|
297
297
|
status
|
|
298
298
|
webUrl
|
|
299
299
|
}
|
|
300
|
-
`;async function
|
|
301
|
-
`,...s.slice(1)]}u.includes("[mf:err]")}]),
|
|
302
|
-
`),i=l,r=/\n$/.test(s)}return!1},s=>s]);let n=process.stderr.write,o=setTimeout(()=>{process.stderr.write=n},5e3);process.stderr.write=(...s)=>typeof s[0]=="string"&&s[0].includes("Could not find ts-node")?(clearTimeout(o),process.stderr.write=n,!1):n.apply(process.stderr,s)}function
|
|
300
|
+
`;async function Xy(e){let{currentUserAccount:t}=await Ml(yP,e);if(!t)throw new F("Unable to get current user account");return{email:t.email,activeShops:[...t.organizations?.edges?.flatMap(r=>r.node?.categories.flatMap(i=>i?.destinations?.edges?.map(n=>n.node)))??[],...t.orphanDestinations?.categories?.flatMap(r=>r.destinations?.edges?.map(i=>i.node))??[]].filter(({status:r})=>r==="ACTIVE").map(({name:r,webUrl:i})=>({name:r,fqdn:i.replace(/^https?:\/\//,"").replace(/\/admin$/,"")}))}}y();var Ky={...console},Qy=new Set,Zy=new Set,ex=[];function gn(e,...t){Zy.has(e)||(Zy.add(e),ex.push(...t))}var Jc=new Set;function xP(e,t){let r=e.map(i=>{let n=i?.message??i;return typeof n=="string"?n:""}).filter(Boolean).join("");return Jc.has(r)?!0:(Jc.add(r),t!==!0&&setTimeout(()=>Jc.delete(r),t??1e3),!1)}function yn([e]){return typeof e=="string"&&/\[h2:(warn|info):(createStorefrontClient|createCustomerAccountClient)\]/.test(e)?!0:void 0}function Pt(e,t){Qy.has(e)||(Qy.add(e),console[e]=(...r)=>{if(t!==!1&&xP(r,t?.(r)))return;let i=ex.reduce((o,[s,u])=>(s(r,o.length)&&o.push(u),o),[]);if(i.length===0)return Ky[e](...r);let n=i.reduce((o,s)=>o&&s(o),r);if(n)return Ky[e](...n)})}function Pq({workerReload:e}={}){Pt("log"),Pt("error"),Pt("warn",yn),Pt("debug",!1);let t=!0;gn("dev-node",[([s])=>typeof s=="string"&&s.includes("[mf:"),s=>{let u=s[0];if(e!==!1&&u.includes("Worker reloaded")){if(t){t=!1;return}return[u.replace("[mf:inf] ","\u{1F504} ")+`
|
|
301
|
+
`,...s.slice(1)]}u.includes("[mf:err]")}]),gn("dev-workerd",[([s])=>typeof s=="string"&&/^\x1B\[31m(workerd\/|stack:( (0|[a-f\d]{4,})){3,})/.test(s),()=>{}],[([s])=>typeof s=="string"&&/\$LLVM_SYMBOLIZER|recursive isolate lock/.test(s),()=>{}],[([s])=>typeof s=="string"&&/^A promise rejection/i.test(s),()=>{}],[([s])=>typeof s=="string"&&/resolved to multiple addresses/i.test(s),()=>{}],[([s])=>{let u=s?.message??s;return typeof u=="string"&&/^Network connection lost/i.test(u)},()=>{}]);let r=!1,i=!1;gn("dev-vite",[([s])=>typeof s=="string"&&/^Sourcemap for .*@remix-run/i.test(s),()=>{}],[([s])=>typeof s=="string"&&/^\[vite\] (connected|program reload)/i.test(s),()=>{}],[([s])=>typeof s=="string"&&/^Re-optimizing dependencies because/i.test(s),()=>{}],[([s])=>{let u=s?.message??s;return/virtual-routes/.test(u)&&/(Failed to load url|Could not resolve module for file)/i.test(u)},()=>{}],[([s])=>typeof s=="string"&&/^Generated an empty chunk:/i.test(s),()=>{}],[([s],u)=>{if(u===0&&typeof s=="string"){let l=/^\s+[A-Z]+\s+\d{3}\s+[a-z]+\s+\//.test(s.replace(/\u001b\[.*?m/g,""));!r&&(l&&!i||!l&&i)&&process.stdout.write(`
|
|
302
|
+
`),i=l,r=/\n$/.test(s)}return!1},s=>s]);let n=process.stderr.write,o=setTimeout(()=>{process.stderr.write=n},5e3);process.stderr.write=(...s)=>typeof s[0]=="string"&&s[0].includes("Could not find ts-node")?(clearTimeout(o),process.stderr.write=n,!1):n.apply(process.stderr,s)}function Lo(e=!1){Pt("log",yn),gn("auth",[([t])=>e&&typeof t=="string"&&t.includes("To run this command,"),([t])=>{}],[([t])=>typeof t=="string"&&t.includes("Logged in."),()=>{process.stdout.write(zl.eraseLines(e?5:6))}])}function Iq(e){Pt("error"),Pt("warn",yn),Pt("log",yn),Pt("info",yn),gn("h2-warn",[([t])=>{let r=t?.message??t;return typeof r=="string"&&r.includes("[h2:")},t=>{let r=t[0],i=typeof r=="object"&&r.stack?r:void 0,n=i?.message??r;n.startsWith("[h2:info:createStorefrontClient]")&&n.includes("defaulting to mock.shop")&&(n+="\nRun `h2 link` to link your store.");let[,o,s,u]=n.match(/\[h2:([^:]+):([^\]]+)\]\s+(.*)$/ims)||[];if(!o||!s||!u)return t;let l=`In Hydrogen's \`${s.trim()}\`:
|
|
303
303
|
|
|
304
304
|
`,m=u.split(`
|
|
305
|
-
`),p=m.at(-1)??"",f=/https?:\/\//.test(p),d=/`h2 [^`]+`/.test(p);if(d&&p&&(p=p.replace(/`(h2) ([^`]+)`/g,V.magentaBright(`\`${e.cliCommand??"$1"} $2\``))),(f||d)&&m.pop(),o==="error"||i){let h=f||d?p:void 0,g=i?.stack,x=i?.cause;if(typeof x=="string")try{x=JSON.parse(x)}catch{}if(typeof x!="string"&&x?.graphql?.query){let
|
|
305
|
+
`),p=m.at(-1)??"",f=/https?:\/\//.test(p),d=/`h2 [^`]+`/.test(p);if(d&&p&&(p=p.replace(/`(h2) ([^`]+)`/g,V.magentaBright(`\`${e.cliCommand??"$1"} $2\``))),(f||d)&&m.pop(),o==="error"||i){let h=f||d?p:void 0,g=i?.stack,x=i?.cause;if(typeof x=="string")try{x=JSON.parse(x)}catch{}if(typeof x!="string"&&x?.graphql?.query){let I=Br({host:e.host,graphql:x.graphql}),[,L,j]=x.graphql.query.match(/(query|mutation)\s+(\w+)/)||[];h=(h?`${h}
|
|
306
306
|
|
|
307
|
-
`:"")+ie`To debug the ${L||"query"}${j?` \`${V.whiteBright(j)}\``:""}, try it in ${
|
|
308
|
-
`)??[],E=
|
|
309
|
-
`).trim()||void 0);let
|
|
307
|
+
`:"")+ie`To debug the ${L||"query"}${j?` \`${V.whiteBright(j)}\``:""}, try it in ${X.link(V.bold("GraphiQL"),I)}.`.value}let v=g?.split(`
|
|
308
|
+
`)??[],E=I=>I.includes(e.rootDirectory)&&!I.includes("node_modules"),D=v.findIndex(E),A=v.length-[...v].reverse().findIndex(E);D>0&&A>D&&(g=[v[0],...v.slice(D,A)].join(`
|
|
309
|
+
`).trim()||void 0);let k=new Fn(l+V.bold(m.join(`
|
|
310
310
|
`).replace(" - Request",`
|
|
311
|
-
Request`)),h);
|
|
312
|
-
`)),reference:a,nextSteps:d?[p]:void 0})}])}function
|
|
313
|
-
`).filter(Boolean)}catch(r){if(r instanceof
|
|
314
|
-
`).filter(Boolean).includes(t)){K(ie`Remote ${t} does not exist, no action needed`);return}await Ze(["remote","remove",t],e)}y();import{readdir as Nx}from"node:fs/promises";y();import{createRequire as xI}from"module";function Fx(e){return e.replace(/(^|\.)_index$/,"$1index").replace(/\.(?!\w+\])/g,"/")}function ZH(){try{return xI(import.meta.url).resolve("@remix-run/v1-route-convention/package.json"),!0}catch{return!1}}y();import{createRequire as DI}from"node:module";import Ho from"node:path";y();y();var Tx="Classic Remix Compiler projects are no longer supported, please upgrade to Vite by running 'npx shopify hydrogen setup vite'";async function vI(e){return!!(await Fe(e,"vite.config")).filepath}async function ul(e){let t=await vI(e);return t&&await al(e)&&we({headline:"Both Vite and Remix config files found.",body:"The remix.config.js file is not used in Vite projects. Please remove it to avoid conflicts."}),t}async function Ox(e,t){let r=await hh(e),i="build",n=process.env.NODE_ENV||"production",o=await r.loadConfigFromFile({command:i,mode:n,isSsrBuild:!0},void 0,e);if(!o||!o.path)throw new Error("No Vite config found");let s=await r.resolveConfig({root:e,build:{ssr:!0}},i,n,n),{appDirectory:u,serverBuildFile:l,routes:m}=wI(s),p=s.build.outDir,f=p.replace(/server$/,"client"),d=s.build.rollupOptions.output,{entryFileNames:a}=(Array.isArray(d)?d[0]:d)??{},c=N(p,typeof a=="string"?a:l??"index.js"),h=t??s.build.ssr,g=G(s.root,typeof h=="string"?h:"server");return{clientOutDir:f,serverOutDir:p,serverOutFile:c,resolvedViteConfig:s,userViteConfig:o.config,remixConfig:{routes:m??{},appDirectory:u??N(s.root,"app"),rootDirectory:s.root,serverEntryPoint:(await Fe(me(g),jt(g))).filepath||g}}}function wI(e){try{return EI(e)}catch{return bI(e)}}function EI(e){if(!e.__reactRouterPluginContext)throw new Error("Could not resolve React Router config");let{appDirectory:t,serverBuildFile:r,routes:i}=e.__reactRouterPluginContext.reactRouterConfig;return{appDirectory:t,serverBuildFile:r,routes:i}}function bI(e){let{remixConfig:t}=CI(e)?.api?.getPluginOptions()??{};return t?{appDirectory:t.appDirectory,serverBuildFile:t.serverBuildFile,routes:t.routes}:{}}function kx(e,t){return e.plugins.find(r=>r.name===t)}function CI(e){return kx(e,"hydrogen:main")}function l8(e){return kx(e,"oxygen:main")}async function al(e){return!!(await Fe(e,"remix.config")).filepath}async function E8(e){return await ul(e)?!1:al(e)}var AI="dist",_I="client",SI="worker";function b8(e){let t=e??process.cwd(),r=Ho.join(t,"public"),i=Ho.join(t,AI),n=Ho.join(i,_I),o=Ho.join(i,SI,"index.js");return{root:t,buildPath:i,buildPathClient:n,buildPathWorkerFile:o,publicPath:r}}function C8(e){return Fe(e,"remix.config").then(({filepath:t})=>{if(!t)throw new T("No remix.config.js file found.");return DI(import.meta.url)(t)})}async function Px(e,t=process.env.NODE_ENV){if(!await ul(e))throw new T(Tx);return(await Ox(e)).remixConfig}var FI=[/robots\.txt/],ll={home:["_index","$"],page:"pages*",cart:["cart","cart.$lines","discount.$code"],products:"products*",collections:"collections*",policies:"policies*",blogs:"blogs*",account:"account*",search:["search","api.predictive-search"],robots:"[robots.txt]",sitemap:["[sitemap.xml]","sitemap.$type.$page[.xml]"]},cl=[];async function Ix(e=Object.keys(ll)){cl.length===0&&(cl=(await Nx(await gn(Qt))).map(i=>i.replace(/\.tsx?$/,"")));let t={},r=[];for(let i of e){t[i]=[];let n=ll[i];if(!n)throw new T(`No route found for ${i}. Try one of ${TI.join()}.`);let o=Array.isArray(n)?n:[n];for(let s of o){let u=s.replace("*","");t[i].push(...cl.filter(l=>l.startsWith(u)))}r.push(...t[i])}return{routeGroups:t,resolvedRouteFiles:r}}var TI=[...Object.keys(ll),"all"];async function Rx(e,t){let{routeGroups:r,resolvedRouteFiles:i}=e.routeName==="all"?await Ix():await Ix([e.routeName]),{rootDirectory:n,appDirectory:o}=t||await Px(e.directory),s=i.flatMap(d=>Qt+"/"+d),u=await wt(n),l=N(o,Qt),m=await OI(l,e),p=!!(e.typescript??await $(N(n,"tsconfig.json"))),f=[];for(let d of s)f.push(await hl(d,{...e,typescript:p,localePrefix:m,rootDirectory:n,appDirectory:o,formatOptions:u}));return m&&await II({typescript:p,localePrefix:m,routesDirectory:l,formatOptions:u,adapter:e.adapter}),{routes:f,routeGroups:r,isTypescript:p,formatOptions:u}}async function OI(e,{localePrefix:t,routeName:r,v1RouteConvention:i}){if(t)return t;if(t!==void 0||r==="all")return;let n=await Nx(e).catch(()=>[]),o=i?/^\(\$(\w+)\)$/:/^\(\$(\w+)\)\.(_index|\$|cart).[jt]sx?$/,s=n.find(u=>o.test(u));if(s)return s.match(o)?.[1]}async function hl(e,{rootDirectory:t,appDirectory:r,typescript:i,force:n,adapter:o,templatesRoot:s,formatOptions:u,localePrefix:l,v1RouteConvention:m=!1,signal:p,overwriteFileDeps:f=!0}){s??=await Bc();let d=(e.match(/(\.[jt]sx?)$/)??[])[1]??".tsx";e=e.replace(d,"");let a=N(r,kI(e,l,{v1RouteConvention:m})+(i?d:d.replace(".ts",".js"))),c={operation:"created",sourceRoute:e,destinationRoute:bl(a,t)};if(!n&&await $(a)){if(!await lt({message:`The file ${c.destinationRoute} already exists. Do you want to replace it?`,defaultValue:!1,confirmationMessage:"Yes",cancellationMessage:"No",abortSignal:p}))return{...c,operation:"skipped"};c.operation="replaced"}let h=await gn(e+d,s),g=await PI(h,await gn("",s));for(let x of g){let E=x.startsWith(Qt+"/")?a:N(r,x.replace(/\.ts(x?)$/,`.${i?"ts$1":"js$1"}`));if(!f&&await $(E))continue;await $(me(E))||await Dn(me(E));let C=await gn(x,s);if(!/\.[jt]sx?$/.test(x)){await Nr(C,E);continue}let A=await U(C);i||(A=await er(A,C)),o&&(A=Mx(A,o)),A=await Zt(A,u,E),await W(E,A)}return c}function Mx(e,t){return e.replace(/@shopify\/remix-oxygen/g,t)}function kI(e,t,r){let i=e.replace(Qt+"/",""),n=t&&!FI.some(o=>o.test(i))?`($${t})`+(r.v1RouteConvention?"/":"."):"";return Qt+"/"+n+(r.v1RouteConvention?Fx(i):i)}async function PI(e,t){let r=new Set([e]),i=new Set([Bt(t,e)]);for(let n of r){let o=(await U(n,{encoding:"utf8"})).matchAll(/^(import|export)\s+.*?\s+from\s+['"](.*?)['"];?$/gims);for(let[,,s]of o){if(!s||!/^(\.|~)/.test(s)||(s=s.replace(/\?[a-z.]+$/,""),s=s.replace("~",Bt(me(n),t)||"."),s.includes("/+types/")))continue;let u=G(me(n),s),l=(await Fe(me(u),jt(u))).filepath||u;l.includes(`/${Qt}/`)||(i.add(Bt(t,l)),/\.[jt]sx?$/.test(l)&&r.add(l))}}return[...i]}function II({typescript:e,localePrefix:t,...r}){return NI({...r,typescript:e,templateName:"locale-check.ts",routeName:`($${t})${e?".tsx":".jsx"}`})}async function NI({templateName:e,routeName:t,routesDirectory:r,formatOptions:i,typescript:n,adapter:o}){let s=N(r,t);if(await $(s))return;let u=await at("routes",e);if(!await $(u))throw new Error("Unknown strategy");let l=await U(u);o&&(l=Mx(l,o)),n||(l=await er(l,u)),l=await Zt(l,i,s),await W(s,l)}var LI={js:"JavaScript",ts:"TypeScript"};async function aU(e,t,r){let i=r??await Xy({abortSignal:e.signal,extraChoices:{none:"Set up later "+V.dim(`(run \`${t} setup markets\`)`)}}),n=i==="none"?void 0:i;return{i18nStrategy:n,setupI18n:async o=>{n&&await Vy(n,o)}}}function uU(e){return{setupRoutes:async(t,r,i)=>(await Rx({routeName:"all",directory:t,force:!0,typescript:r==="ts",localePrefix:i?.i18nStrategy==="subfolders"?"locale":!1,signal:e.signal,...i},{rootDirectory:t,appDirectory:N(t,"app")})).routeGroups}}function cU(e){return Promise.all(["routes.ts","root","entry.server","entry.client","../server.ts"].map(t=>hl(t,e)))}async function lU(e,t,r){return t===Me?{}:r??await lt({confirmationMessage:"Yes",cancellationMessage:"No",message:["Create a global",{command:Me},"alias to run commands instead of",{command:t},"?"],abortSignal:e.signal})?{createShortcut:async()=>{try{return(await cx()).length>0}catch(n){return K("Failed to create shortcut."+(n?.stack??n?.message??n)),!1}},showShortcutBanner:()=>rt({body:`You'll need to restart your terminal session to make \`${Me}\` alias available.`})}:{}}async function hU(e){$o(!0);let{session:t,config:r}=await It();mx(r);let i=await Mo(t),n=await fl(i),o;return n?o=n.title:o=await Br({message:"New storefront name",defaultValue:Bo(r.shopName),abortSignal:e.signal}),{...r,id:n?.id,title:o,session:t}}async function fl(e){let t=[{label:"Create a new storefront",value:null},...e.map(({id:i,title:n,productionUrl:o})=>({label:`${n} (${o})`,value:i}))];if(t.length===1)return;let r=await ct({message:"Select a Hydrogen storefront to link",choices:t});return r?e.find(({id:i})=>i===r):void 0}async function fU({storefrontInfo:e,controller:t,force:r,path:i}){let n=e&&_l(e.title),o=i??n??await Br({message:"Where would you like to create your storefront?",defaultValue:"hydrogen-storefront",abortSignal:t.signal}),s=G(process.cwd(),o);if(await Lx(s)){if(!r&&n&&(o=await Br({message:`There's already a folder called \`${n}\`. Where do you want to create the app?`,defaultValue:n,abortSignal:t.signal}),s=G(process.cwd(),o),await Lx(s)||(r=!0)),!r&&!await lt({message:`The directory ${V.cyan(o)} is not empty. Do you want to delete the existing files and continue?`,defaultValue:!1,abortSignal:t.signal})){rt({body:`Destination path ${V.cyan(o)} already exists and is not an empty directory. You may use \`--force\` or \`-f\` to override it.`});return}await Vo(s,{force:!0})}return{name:jt(o),location:o,directory:s,storefrontTitle:e?.title}}async function pU(e,t,r){let i=r??await ct({message:"Select a language",choices:[{label:"JavaScript",value:"js"},{label:"TypeScript",value:"ts"}],defaultValue:"js",abortSignal:t.signal});return{language:i,async transpileProject(){i!=="ts"&&await Uc(e)}}}async function dU(e,t,r){let i=r??await zy({abortSignal:t.signal,extraChoices:{none:"Skip and set up later"}}),n=i==="none"?void 0:i;return{cssStrategy:n,async setupCss(){if(n){if(n==="postcss"||n==="css-modules")return;let o=await Wy(n,{rootDirectory:e,appDirectory:N(e,"app")},!0);o&&await o.workPromise}}}}async function mU(e,t,r,i){let n=r??Ml(),o="npm";if(i!==!1)if(n==="unknown"){let s=await ct({message:"Select package manager to install dependencies",choices:[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn v1",value:"yarn"},{label:"Skip and install later",value:"no"}],defaultValue:"npm",abortSignal:t.signal});s==="no"?i=!1:(o=s,i=!0)}else i===void 0?(o=n,i=await lt({message:`Install dependencies with ${n}?`,confirmationMessage:"Yes",cancellationMessage:"No",abortSignal:t.signal})):o=n;return mn&&(await Nr(N(Io(),".npmrc"),N(e,".npmrc")).catch(()=>{}),i||await RI(await Ny(),N(e,"node_modules")).catch(()=>{})),{packageManager:o,shouldInstallDeps:i,installDeps:i?async()=>{await Bl({directory:e,packageManager:o,args:[],signal:t.signal})}:()=>{}}}var BI=`
|
|
311
|
+
Request`)),h);k.cause=x,k.stack=g,Sn(k);return}let a;if(f){a=[];for(let h of p.matchAll(/https?:\/\/[^\s]+/g))a.push(h[0])}(o==="warn"?we:rt)({body:l+V.bold(m.join(`
|
|
312
|
+
`)),reference:a,nextSteps:d?[p]:void 0})}])}function Nq(){!process.env.DEBUG||process.env.DEBUG==="*"?process.env.DEBUG="h2:*,o2:*":process.env.DEBUG+=",h2:*,o2:*"}function Rq(){return!!(process.env.DEBUG==="*"||process.env.DEBUG?.includes("h2:*"))}async function zq(e){await Fl(),await Ly(e)}async function It(e,t){Lo(!1);let r=t===!0,i=e?await Di(e):{},{email:n,shopName:o}=i;if(typeof t!="string"&&(t=i.shop),t&&(t=await An(t)),!t||!o||!n||r||t!==i.shop){let l=await Sl().catch(()=>{throw new F("Unable to authenticate with Shopify. Please report this issue.")}),m=await Xy(l),f=!r&&t&&m.activeShops.find(({fqdn:d})=>t===d)||await ct({message:"Select a shop to log in to",choices:m.activeShops.map(({name:d,fqdn:a})=>({label:`${d} (${a})`,value:{name:d,fqdn:a}}))});t=f.fqdn,o=f.name,n=m.email}let s=await _l(t).catch(()=>{throw new F("Unable to authenticate with Shopify",void 0,[`Ensure the shop that you specified is correct (you are trying to use: ${t})`])}),u=e?await By(e,{shop:t,shopName:o,email:n}):{shop:t,shopName:o,email:n};return{session:s,config:u}}function tx(e){Mr({headline:"Shopify authentication complete",body:["You are logged in to",{userInput:e.shopName??e.shop??"your store"},...e.email?["as",{userInput:e.email}]:[]]})}y();import{symlink as iI,readdir as nI}from"node:fs/promises";y();var MP=Ct(lx());async function Ze(e,t){try{return(await _n("git",e,{cwd:t})).stdout}catch(r){if(r instanceof Error){let i=new F(r.message);throw i.stack=r.stack,"exitCode"in r&&Object.assign(i,{exitCode:r.exitCode}),i}throw r}}async function hx(e,t="main"){K(ie`Initializing git repository at ${X.path(e)}...`),await tl(),await Ze(["init"],e),await Ze(["checkout","-b",t],e)}async function uH(e,t){try{return(await Ze(["check-ignore",...t],e)).split(`
|
|
313
|
+
`).filter(Boolean)}catch(r){if(r instanceof F&&"exitCode"in r&&r.exitCode===1)return[];throw r}}async function cH(e){return Wl("cmd_all_timing_network_ms")(async()=>{let{repoUrl:t,destination:r,shallow:i,latestTag:n}=e;if(K(ie`Git-cloning repository ${t} into ${X.path(r)}...`),await tl(),await $(r)){if(!await Nr(r))throw new F(ie`Can't clone to ${X.path(r)}`,"The path exists but isn't a directory.");if((await Cn(["*",".*"],{cwd:r,deep:1,onlyFiles:!1})).length>0)throw new F(ie`Directory ${X.path(r)} already exists and is not empty`,ie`Choose a different name or remove the existing directory first.`)}let[o,s]=t.split("#");if(s&&n)throw new F("Error cloning the repository. Git can't clone the latest release with a 'branch'.");if(i&&n)throw new F("Error cloning the repository. Git can't clone the latest release with the 'shallow' property.");let u=["clone","--recurse-submodules"];s&&u.push("--branch",s),i&&u.push("--depth","1"),Yl()||u.push("-c","core.askpass=true"),u.push(o,r);try{if(await _n("git",u),n){let l=await LP(r,t);await Ze(["checkout",l],r)}}catch(l){if(l instanceof F)throw l;if(l instanceof Error){let m=new F(l.message);throw m.stack=l.stack,m}throw l}})}async function LP(e,t){let i=(await Ze(["describe","--tags","--abbrev=0"],e)).trim();if(!i)throw new F(`Couldn't obtain the most recent tag of the repository ${t}`);return i}async function lH(e){let r=await Ze(["log","-1","--format=%H%x00%ai%x00%s%x00%D%x00%b%x00%an%x00%ae"],e);if(!r.trim())throw new F("Must have at least one commit to run command",ie`Run ${X.genericShellCommand("git commit -m 'Initial commit'")} to create your first commit.`);let i=r.split("\0");return{hash:i[0],date:i[1],message:i[2],refs:i[3],body:i[4],author_name:i[5],author_email:i[6]}}async function fx(e){await Ze(["add","--all"],e)}async function px(e,t){let r=["commit","-m",e];return t?.author&&r.push("--author",t.author),await Ze(r,t?.directory),(await Ze(["rev-parse","HEAD"],t?.directory)).trim()}async function tl(){if(!await Kl())throw new F("Git is necessary in the environment to continue",ie`Install ${X.link("git","https://git-scm.com/book/en/v2/Getting-Started-Installing-Git")}`)}var Zc=class extends F{};async function hH(e){if(!await BP(e))throw new Zc(`${X.path(e??_i())} is not a Git directory`)}async function BP(e){try{return await _n("git",["rev-parse","--git-dir"],{cwd:e}),!0}catch(t){if(t instanceof Error&&"exitCode"in t&&t.exitCode===128)return!1;throw t}}var el=class extends F{};async function fH(e){if(!await jP(e))throw new el(`${X.path(e??_i())} is not a clean Git directory`)}async function jP(e){return(await Ze(["status","--porcelain"],e)).trim()===""}async function pH(e,t="origin"){if(K(ie`Removing git remote ${t} from ${X.path(e)}...`),await tl(),!(await Ze(["remote"],e)).split(`
|
|
314
|
+
`).filter(Boolean).includes(t)){K(ie`Remote ${t} does not exist, no action needed`);return}await Ze(["remote","remove",t],e)}y();import{readdir as wx}from"node:fs/promises";y();import{createRequire as $P}from"module";function dx(e){return e.replace(/(^|\.)_index$/,"$1index").replace(/\.(?!\w+\])/g,"/")}function yH(){try{return $P(import.meta.url).resolve("@remix-run/v1-route-convention/package.json"),!0}catch{return!1}}y();import{createRequire as JP}from"node:module";import jo from"node:path";y();y();var mx="Classic Remix Compiler projects are no longer supported, please upgrade to Vite by running 'npx shopify hydrogen setup vite'";async function qP(e){return!!(await Fe(e,"vite.config")).filepath}async function il(e){let t=await qP(e);return t&&await rl(e)&&we({headline:"Both Vite and Remix config files found.",body:"The remix.config.js file is not used in Vite projects. Please remove it to avoid conflicts."}),t}async function gx(e,t){let r=await oh(e),i="build",n=process.env.NODE_ENV||"production",o=await r.loadConfigFromFile({command:i,mode:n,isSsrBuild:!0},void 0,e);if(!o||!o.path)throw new Error("No Vite config found");let s=await r.resolveConfig({root:e,build:{ssr:!0}},i,n,n),{appDirectory:u,serverBuildFile:l,routes:m}=HP(s),p=s.build.outDir,f=p.replace(/server$/,"client"),d=s.build.rollupOptions.output,{entryFileNames:a}=(Array.isArray(d)?d[0]:d)??{},c=N(p,typeof a=="string"?a:l??"index.js"),h=t??s.build.ssr,g=G(s.root,typeof h=="string"?h:"server");return{clientOutDir:f,serverOutDir:p,serverOutFile:c,resolvedViteConfig:s,userViteConfig:o.config,remixConfig:{routes:m??{},appDirectory:u??N(s.root,"app"),rootDirectory:s.root,serverEntryPoint:(await Fe(me(g),jt(g))).filepath||g}}}function HP(e){try{return UP(e)}catch{return WP(e)}}function UP(e){if(!e.__reactRouterPluginContext)throw new Error("Could not resolve React Router config");let{appDirectory:t,serverBuildFile:r,routes:i}=e.__reactRouterPluginContext.reactRouterConfig;return{appDirectory:t,serverBuildFile:r,routes:i}}function WP(e){let{remixConfig:t}=zP(e)?.api?.getPluginOptions()??{};return t?{appDirectory:t.appDirectory,serverBuildFile:t.serverBuildFile,routes:t.routes}:{}}function yx(e,t){return e.plugins.find(r=>r.name===t)}function zP(e){return yx(e,"hydrogen:main")}function FH(e){return yx(e,"oxygen:main")}async function rl(e){return!!(await Fe(e,"remix.config")).filepath}async function jH(e){return await il(e)?!1:rl(e)}var GP="dist",VP="client",YP="worker";function $H(e){let t=e??process.cwd(),r=jo.join(t,"public"),i=jo.join(t,GP),n=jo.join(i,VP),o=jo.join(i,YP,"index.js");return{root:t,buildPath:i,buildPathClient:n,buildPathWorkerFile:o,publicPath:r}}function qH(e){return Fe(e,"remix.config").then(({filepath:t})=>{if(!t)throw new F("No remix.config.js file found.");return JP(import.meta.url)(t)})}async function xx(e,t=process.env.NODE_ENV){if(!await il(e))throw new F(mx);return(await gx(e)).remixConfig}var XP=[/robots\.txt/],sl={home:["_index","$"],page:"pages*",cart:["cart","cart.$lines","discount.$code"],products:"products*",collections:"collections*",policies:"policies*",blogs:"blogs*",account:"account*",search:["search","api.predictive-search"],robots:"[robots.txt]",sitemap:["[sitemap.xml]","sitemap.$type.$page[.xml]"],tokenlessApi:"api.$version.[graphql.json]"},nl=[];async function vx(e=Object.keys(sl)){nl.length===0&&(nl=(await wx(await pn(Qt))).map(i=>i.replace(/\.tsx?$/,"")));let t={},r=[];for(let i of e){t[i]=[];let n=sl[i];if(!n)throw new F(`No route found for ${i}. Try one of ${KP.join()}.`);let o=Array.isArray(n)?n:[n];for(let s of o){let u=s.replace("*","");t[i].push(...nl.filter(l=>l.startsWith(u)))}r.push(...t[i])}return{routeGroups:t,resolvedRouteFiles:r}}var KP=[...Object.keys(sl),"all"];async function Ex(e,t){let{routeGroups:r,resolvedRouteFiles:i}=e.routeName==="all"?await vx():await vx([e.routeName]),{rootDirectory:n,appDirectory:o}=t||await xx(e.directory),s=i.flatMap(d=>Qt+"/"+d),u=await wt(n),l=N(o,Qt),m=await QP(l,e),p=!!(e.typescript??await $(N(n,"tsconfig.json"))),f=[];for(let d of s)f.push(await ol(d,{...e,typescript:p,localePrefix:m,rootDirectory:n,appDirectory:o,formatOptions:u}));return m&&await tI({typescript:p,localePrefix:m,routesDirectory:l,formatOptions:u,adapter:e.adapter}),{routes:f,routeGroups:r,isTypescript:p,formatOptions:u}}async function QP(e,{localePrefix:t,routeName:r,v1RouteConvention:i}){if(t)return t;if(t!==void 0||r==="all")return;let n=await wx(e).catch(()=>[]),o=i?/^\(\$(\w+)\)$/:/^\(\$(\w+)\)\.(_index|\$|cart).[jt]sx?$/,s=n.find(u=>o.test(u));if(s)return s.match(o)?.[1]}async function ol(e,{rootDirectory:t,appDirectory:r,typescript:i,force:n,adapter:o,templatesRoot:s,formatOptions:u,localePrefix:l,v1RouteConvention:m=!1,signal:p,overwriteFileDeps:f=!0}){s??=await Ic();let d=(e.match(/(\.[jt]sx?)$/)??[])[1]??".tsx";e=e.replace(d,"");let a=N(r,ZP(e,l,{v1RouteConvention:m})+(i?d:d.replace(".ts",".js"))),c={operation:"created",sourceRoute:e,destinationRoute:yl(a,t)};if(!n&&await $(a)){if(!await lt({message:`The file ${c.destinationRoute} already exists. Do you want to replace it?`,defaultValue:!1,confirmationMessage:"Yes",cancellationMessage:"No",abortSignal:p}))return{...c,operation:"skipped"};c.operation="replaced"}let h=await pn(e+d,s),g=await eI(h,await pn("",s));for(let x of g){let E=x.startsWith(Qt+"/")?a:N(r,x.replace(/\.ts(x?)$/,`.${i?"ts$1":"js$1"}`));if(!f&&await $(E))continue;await $(me(E))||await En(me(E));let D=await pn(x,s);if(!/\.[jt]sx?$/.test(x)){await Ir(D,E);continue}let A=await U(D);i||(A=await er(A,D)),o&&(A=bx(A,o)),A=await Zt(A,u,E),await W(E,A)}return c}function bx(e,t){return e.replace(/@shopify\/remix-oxygen/g,t)}function ZP(e,t,r){let i=e.replace(Qt+"/",""),n=t&&!XP.some(o=>o.test(i))?`($${t})`+(r.v1RouteConvention?"/":"."):"";return Qt+"/"+n+(r.v1RouteConvention?dx(i):i)}async function eI(e,t){let r=new Set([e]),i=new Set([Bt(t,e)]);for(let n of r){let o=(await U(n,{encoding:"utf8"})).matchAll(/^(import|export)\s+.*?\s+from\s+['"](.*?)['"];?$/gims);for(let[,,s]of o){if(!s||!/^(\.|~)/.test(s)||(s=s.replace(/\?[a-z.]+$/,""),s=s.replace("~",Bt(me(n),t)||"."),s.includes("/+types/")))continue;let u=G(me(n),s),l=(await Fe(me(u),jt(u))).filepath||u;l.includes(`/${Qt}/`)||(i.add(Bt(t,l)),/\.[jt]sx?$/.test(l)&&r.add(l))}}return[...i]}function tI({typescript:e,localePrefix:t,...r}){return rI({...r,typescript:e,templateName:"locale-check.ts",routeName:`($${t})${e?".tsx":".jsx"}`})}async function rI({templateName:e,routeName:t,routesDirectory:r,formatOptions:i,typescript:n,adapter:o}){let s=N(r,t);if(await $(s))return;let u=await at("routes",e);if(!await $(u))throw new Error("Unknown strategy");let l=await U(u);o&&(l=bx(l,o)),n||(l=await er(l,u)),l=await Zt(l,i,s),await W(s,l)}var sI={js:"JavaScript",ts:"TypeScript"};async function A8(e,t,r){let i=r??await Ry({abortSignal:e.signal,extraChoices:{none:"Set up later "+V.dim(`(run \`${t} setup markets\`)`)}}),n=i==="none"?void 0:i;return{i18nStrategy:n,setupI18n:async o=>{n&&await Ny(n,o)}}}function _8(e){return{setupRoutes:async(t,r,i)=>(await Ex({routeName:"all",directory:t,force:!0,typescript:r==="ts",localePrefix:i?.i18nStrategy==="subfolders"?"locale":!1,signal:e.signal,...i},{rootDirectory:t,appDirectory:N(t,"app")})).routeGroups}}function S8(e){return Promise.all(["routes.ts","root","entry.server","entry.client","../server.ts"].map(t=>ol(t,e)))}async function F8(e,t,r){return t===Me?{}:r??await lt({confirmationMessage:"Yes",cancellationMessage:"No",message:["Create a global",{command:Me},"alias to run commands instead of",{command:t},"?"],abortSignal:e.signal})?{createShortcut:async()=>{try{return(await Yy()).length>0}catch(n){return K("Failed to create shortcut."+(n?.stack??n?.message??n)),!1}},showShortcutBanner:()=>rt({body:`You'll need to restart your terminal session to make \`${Me}\` alias available.`})}:{}}async function T8(e){Lo(!0);let{session:t,config:r}=await It();tx(r);let i=await Io(t),n=await al(i),o;return n?o=n.title:o=await Lr({message:"New storefront name",defaultValue:Ro(r.shopName),abortSignal:e.signal}),{...r,id:n?.id,title:o,session:t}}async function al(e){let t=[{label:"Create a new storefront",value:null},...e.map(({id:i,title:n,productionUrl:o})=>({label:`${n} (${o})`,value:i}))];if(t.length===1)return;let r=await ct({message:"Select a Hydrogen storefront to link",choices:t});return r?e.find(({id:i})=>i===r):void 0}async function O8({storefrontInfo:e,controller:t,force:r,path:i}){let n=e&&El(e.title),o=i??n??await Lr({message:"Where would you like to create your storefront?",defaultValue:"hydrogen-storefront",abortSignal:t.signal}),s=G(process.cwd(),o);if(await Cx(s)){if(!r&&n&&(o=await Lr({message:`There's already a folder called \`${n}\`. Where do you want to create the app?`,defaultValue:n,abortSignal:t.signal}),s=G(process.cwd(),o),await Cx(s)||(r=!0)),!r&&!await lt({message:`The directory ${V.cyan(o)} is not empty. Do you want to delete the existing files and continue?`,defaultValue:!1,abortSignal:t.signal})){rt({body:`Destination path ${V.cyan(o)} already exists and is not an empty directory. You may use \`--force\` or \`-f\` to override it.`});return}await zo(s,{force:!0})}return{name:jt(o),location:o,directory:s,storefrontTitle:e?.title}}async function k8(e,t,r){let i=r??await ct({message:"Select a language",choices:[{label:"JavaScript",value:"js"},{label:"TypeScript",value:"ts"}],defaultValue:"js",abortSignal:t.signal});return{language:i,async transpileProject(){i!=="ts"&&await Bc(e)}}}async function P8(e,t,r){let i=r??await ky({abortSignal:t.signal,extraChoices:{none:"Skip and set up later"}}),n=i==="none"?void 0:i;return{cssStrategy:n,async setupCss(){if(n){if(n==="postcss"||n==="css-modules")return;let o=await Oy(n,{rootDirectory:e,appDirectory:N(e,"app")},!0);o&&await o.workPromise}}}}async function I8(e,t,r,i){let n=r??kl(),o="npm";if(i!==!1)if(n==="unknown"){let s=await ct({message:"Select package manager to install dependencies",choices:[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn v1",value:"yarn"},{label:"Skip and install later",value:"no"}],defaultValue:"npm",abortSignal:t.signal});s==="no"?i=!1:(o=s,i=!0)}else i===void 0&&(o=n,i=await lt({message:`Install dependencies with ${n}?`,confirmationMessage:"Yes",cancellationMessage:"No",abortSignal:t.signal}));return fn&&(await Ir(N(Oo(),".npmrc"),N(e,".npmrc")).catch(()=>{}),i||await iI(await wy(),N(e,"node_modules")).catch(()=>{})),{packageManager:o,shouldInstallDeps:i,installDeps:i?async()=>{await Il({directory:e,packageManager:o,args:[],signal:t.signal})}:()=>{}}}var oI=`
|
|
315
315
|
node_modules
|
|
316
316
|
/.cache
|
|
317
317
|
/build
|
|
@@ -321,17 +321,17 @@ node_modules
|
|
|
321
321
|
.env
|
|
322
322
|
.shopify
|
|
323
323
|
.react-router
|
|
324
|
-
`.slice(1);async function
|
|
325
|
-
`+(t?.stack??t?.message??t))}}async function
|
|
326
|
-
`+(r?.stack??r?.message??r))}}async function
|
|
327
|
-
\u2022 ${
|
|
324
|
+
`.slice(1);async function N8(e){try{return await hx(e),await W(N(e,".gitignore"),oI),process.env.NODE_ENV==="test"&&process.env.CI&&(await ot('git config --global user.name "hydrogen"'),await ot('git config --global user.email "hydrogen@shopify.com"')),aI(e,"Scaffold Storefront")}catch(t){K(`Failed to initialize Git.
|
|
325
|
+
`+(t?.stack??t?.message??t))}}async function aI(e,t){try{await fx(e),await px(t,{directory:e})}catch(r){K(`Failed to commit code.
|
|
326
|
+
`+(r?.stack??r?.message??r))}}async function R8(e,{language:t,packageManager:r,depsInstalled:i,cssStrategy:n,cliCommand:o,routes:s,i18n:u,depsError:l,i18nError:m,routesError:p}){let f=!!(l||m||p),d=[];e.storefrontTitle&&d.push(["Shopify",e.storefrontTitle]),t&&d.push(["Language",sI[t]]),n&&d.push(["Styling",Lc[n]]),!m&&u&&d.push(["Markets",jc[u].split(" (")[0]]);let a="";if(!p&&s&&Object.keys(s).length){d.push(["Routes",""]);for(let[g,x]of Object.entries(s)){x=Array.isArray(x)?x:[x];let v=[...new Set(x.map(E=>"/"+uI(E)))].sort();v.length>2&&(v=[...new Set(v.map(D=>D.split("/")[1]??""))].map(D=>"/"+D+"/*")),a+=`
|
|
327
|
+
\u2022 ${xl(g)} ${V.dim("("+v.join(" & ")+")")}`}}let c=1+d.reduce((g,[x])=>Math.max(g,x.length),0);(f?we:Mr)({headline:"Storefront setup complete"+(f?" with errors (see warnings below).":"!"),body:d.map(([g,x])=>` ${(g+":").padEnd(c," ")} ${V.dim(x)}`).join(`
|
|
328
328
|
`)+a,customSections:[f&&{title:`Warnings
|
|
329
329
|
`,body:[{list:{items:[l&&["Failed to install dependencies:",{subdued:l.message}],m&&["Failed to scaffold Markets:",{subdued:m.message}],p&&["Failed to scaffold routes:",{subdued:p.message}]].filter(g=>!!g)}}]},{title:`Next steps
|
|
330
|
-
`,body:[{list:{items:[["Run",{command:[e.directory===process.cwd()?void 0:`cd ${e.location.replace(/^\.\//,"")}`,i?void 0:`${r} install`,
|
|
330
|
+
`,body:[{list:{items:[["Run",{command:[e.directory===process.cwd()?void 0:`cd ${e.location.replace(/^\.\//,"")}`,i?void 0:`${r} install`,Ol()?"npm run dev":Ql(r,"dev")].filter(Boolean).join(" && ")}]].filter(g=>!!g)}}]}].filter(g=>!!g)})}function M8(e,t){return async function(i){if(e.abort(),await Promise.resolve(),t?.directory&&await zo(t.directory,{force:!0}).catch(()=>{}),Sn(new F("Failed to initialize project: "+(i?.message??""),i?.tryMessage??i?.stack)),process.env.SHOPIFY_UNIT_TEST&&process.exit.name!=="spy")throw console.error("Error during test before process.exit:",i),i;process.exit(1)}}async function Cx(e){return await $(e)&&await Nr(e)&&(await nI(e)).length>0}function uI(e){return e.replace(/(^|\.)_index$/,"").replace(/((^|\.)[^\.]+)_\./g,"$1.").replace(/\.(?!\w+\])/g,"/").replace(/\$$/g,":catchAll").replace(/\$/g,":").replace(/[\[\]]/g,"").replace(/:\w*Handle/i,":handle")}function Dx(){function e(i){return i[Math.floor(Math.random()*i.length)]}let t=e(["Bay","Bend","Cape","Cliff","Cove","Creek","Dale","Dune","Fjord","Glade","Gulf","Hill","Isle","Knoll","Lake","Loch","Mesa","Peak","Pond","Quay","Reef","Ridge","Rise","River","Road","Shore","Strait","Stream","Vale","Valley","View","Vista"]);return`${e(["Crimson","Azure","Coral","Fuchsia","Indigo","Ivory","Lavender","Lime","Magenta","Maroon","Orchid","Peach","Plum","Quartz","Salmon","Teal","Turquoise","Violet","Yellow","Ebony","Jade","Lilac","Mint","Onyx","Pearl","Ruby","Sapphire","Topaz"])} ${t}`}var Ax=class e extends Gn{static descriptionWithMarkdown=`Links your local development environment to a remote Hydrogen storefront. You can link an unlimited number of development environments to a single Hydrogen storefront.
|
|
331
331
|
|
|
332
332
|
Linking to a Hydrogen storefront enables you to run [dev](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-dev) and automatically inject your linked Hydrogen storefront's environment variables directly into the server runtime.
|
|
333
333
|
|
|
334
|
-
After you run the \`link\` command, you can access the [env list](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-env-list), [env pull](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-env-pull), and [unlink](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-unlink) commands.`;static description="Link a local project to one of your shop's Hydrogen storefronts.";static flags={...
|
|
334
|
+
After you run the \`link\` command, you can access the [env list](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-env-list), [env pull](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-env-pull), and [unlink](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-unlink) commands.`;static description="Link a local project to one of your shop's Hydrogen storefronts.";static flags={...mn.force,...mn.path,storefront:_x.Flags.string({description:`The name of a Hydrogen Storefront (e.g. "Jane's Apparel")`,env:"SHOPIFY_HYDROGEN_STOREFRONT"})};async run(){let{flags:t}=await this.parse(e);await cI(t)}};async function cI({force:e,path:t=process.cwd(),storefront:r}){let[{session:i,config:n},o]=await Promise.all([It(t),Mo()]),s=await ul(t,i,n,{force:e,flagStorefront:r,cliCommand:o});s&&Mr({body:[{userInput:s.title},"is now linked"],nextSteps:[["Run",{command:`${o} dev`},"to start your local development server and start building"]]})}async function ul(e,t,r,{force:i=!1,flagStorefront:n,cliCommand:o,storefronts:s}){if(!r.shop)throw new F("No shop found in local config, login first.");if(r.storefront?.id&&!i&&!await lt({message:`Your project is currently linked to ${r.storefront.title}. Do you want to link to a different Hydrogen storefront on Shopify?`}))return;s||(s=await Io(t));let u;if(n){if(u=s.find(({title:l})=>l===n),!u){we({headline:`Couldn't find ${n}`,body:["There's no storefront matching",{userInput:n},"on your",{userInput:r.shop},"shop. To see all available Hydrogen storefronts, run",{command:`${o} list`}]});return}}else u=await al(s),u||(u=await lI(e,t,s));return await jy(e,u),u}async function lI(e,t,r){let i=jt(e),n=Ro(i);r.some(({title:m})=>m===n)&&(n=Dx());let s=await Lr({message:"New storefront name",defaultValue:n}),u,l;if(await Gl([{title:"Creating storefront",task:async()=>{let m=await qy(t,s);u=m.storefront,l=m.jobId}},{title:"Creating API tokens",task:async()=>{try{await Hy(t,l)}catch{u=void 0}},skip:()=>!l}]),!u)throw new F("Unknown error ocurred. Please try again or contact support if the error persists.");return u}y();var hI=`#graphql
|
|
335
335
|
mutation CustomerApplicationUrlsReplace($storefrontId: ID!, $urlsReplaceInput: HydrogenStorefrontCustomerApplicationUrlsReplaceInput!) {
|
|
336
336
|
hydrogenStorefrontCustomerApplicationUrlsReplace(
|
|
337
337
|
storefrontId: $storefrontId,
|
|
@@ -345,15 +345,15 @@ node_modules
|
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
347
|
}
|
|
348
|
-
`;async function
|
|
348
|
+
`;async function cl(e,t,r){let{hydrogenStorefrontCustomerApplicationUrlsReplace:{success:i,userErrors:n}}=await Qe(hI,e,{storefrontId:t,urlsReplaceInput:r});return{success:i,userErrors:n}}var Sx=class e extends Gn{static description="Push project configuration to admin";static flags={...mn.path,"storefront-id":xn.Flags.string({description:"The id of the storefront the configuration should be pushed to. Must start with 'gid://shopify/HydrogenStorefront/'"}),"dev-origin":xn.Flags.string({description:"The development domain of your application.",required:!0}),"relative-redirect-uri":xn.Flags.string({description:"The relative url of allowed callback url for Customer Account API OAuth flow. Default is '/account/authorize'"}),"relative-logout-uri":xn.Flags.string({description:"The relative url of allowed url that will be redirected to post-logout for Customer Account API OAuth flow. Default to nothing."})};async run(){let{flags:t}=await this.parse(e);await ll({...qc(t)})}};async function ll({path:e=process.cwd(),storefrontId:t,devOrigin:r,redirectUriRelativeUrl:i="/account/authorize",logoutUriRelativeUrl:n}){let o=await hl(e,t);try{if(!o)throw new Error("No storefrontId was found in --storefront-id flag or .shopify/project.json");let s=i?new URL(i,r).toString():r,u=r,l=n?new URL(n,r).toString():r;if(!s&&!u&&!l)return;let{session:m,config:p}=await It(e),f=p?.storefront?.customerAccountConfig,{success:d,userErrors:a}=await cl(m,o,{redirectUri:{add:s?[s]:void 0,removeRegex:f?.redirectUri},javascriptOrigin:{add:u?[u]:void 0,removeRegex:f?.javascriptOrigin},logoutUris:{add:l?[l]:void 0,removeRegex:f?.logoutUri}});if(!d||a.length){let c=new Error("Customer Account Application setup update fail.");throw c.userErrors=a,c}return await $y(e,{redirectUri:s,javascriptOrigin:u,logoutUri:l}),()=>fI(m,o,{redirectUri:s,javascriptOrigin:u,logoutUri:l})}catch(s){let u=!1,l=s?.userErrors?.length?s.userErrors.map(p=>(/Javascript origin is not allowed for this application type/i.test(p.message)&&(u=!0),`${p.field}: ${p.message}`)):s.message?[s.message]:[],m=[{link:{label:"Manually update application setup",url:"https://shopify.dev/docs/custom-storefronts/building-with-the-customer-account-api/hydrogen#update-the-application-setup"}}];throw u&&m.unshift({link:{label:"Enable Public access for Hydrogen",url:"https://shopify.dev/docs/custom-storefronts/building-with-the-customer-account-api/getting-started#step-1-enable-customer-account-api-access"}}),new F("Customer Account Application setup update fail.",l.length?[{list:{title:"The following error occurs during update:",items:l.map((p,f)=>`${f!=0?`
|
|
349
349
|
|
|
350
|
-
`:""}${p}`)}}]:void 0,m)}}async function
|
|
351
|
-
${i?.message}`)}))}async function
|
|
352
|
-
`),n=[],o;for(let s of i){if(o){if(s.endsWith(o.quote)){let m=
|
|
350
|
+
`:""}${p}`)}}]:void 0,m)}}async function fI(e,t,r={}){Object.values(r).some(Boolean)&&(K(`Cleaning up Customer Application url "${r.redirectUri}"`),await cl(e,t,{redirectUri:{removeRegex:r?.redirectUri},javascriptOrigin:{removeRegex:r?.javascriptOrigin},logoutUris:{removeRegex:r?.logoutUri}}).catch(i=>{K(`Failed to clean up Customer Application url "${r.redirectUri}":
|
|
351
|
+
${i?.message}`)}))}async function hl(e,t){if(t)return t;let{session:r,config:i}=await It(e);if(i.storefront?.id)return i.storefront.id;let n=await Mo();return await ul(e,r,i,{cliCommand:n})?(await Di(e)).storefront?.id:void 0}y();y();var Ix=Ct(Px());async function Nx(e){if(K(ie`Reading the .env file at ${X.path(e)}`),!await $(e))throw new F(`The environment file at ${e} does not exist.`);let t=await U(e);return{path:e,variables:(0,Ix.parse)(t)}}function wU(e,t){let r=[],i=e===null?[]:e.split(`
|
|
352
|
+
`),n=[],o;for(let s of i){if(o){if(s.endsWith(o.quote)){let m=qo(o.key,o.value+s.slice(0,-1),o.quote),p=t[o.key];p&&(n.push(o.key),m=qo(o.key,p)),r.push(m),o=void 0}else o.value+=`${s}
|
|
353
353
|
`;continue}let u=s.match(/^([^=:#]+?)[=:](.*)/),l=s;if(u){let m=u[1].trim(),p=(u[2]??"").trim();if(/^["'`]/.test(p)&&!p.endsWith(p[0])){o={key:m,value:`${p.slice(1)}
|
|
354
|
-
`,quote:p[0]};continue}let f=t[m];f&&(n.push(m),l=
|
|
355
|
-
`)}function
|
|
356
|
-
`)){let i=['"',"'","`"].find(n=>!t.includes(n));if(!i)throw new
|
|
354
|
+
`,quote:p[0]};continue}let f=t[m];f&&(n.push(m),l=qo(m,f))}r.push(l)}if(o)throw new F(`Multi-line environment variable '${o.key}' is not properly enclosed.`);for(let[s,u]of Object.entries(t))n.includes(s)||r.push(qo(s,u));return r.join(`
|
|
355
|
+
`)}function qo(e,t,r){if(r)return`${e}=${r}${t}${r}`;if(t?.includes(`
|
|
356
|
+
`)){let i=['"',"'","`"].find(n=>!t.includes(n));if(!i)throw new F(`The environment file patch has an env value that can't be surrounded by quotes: ${t}`);return`${e}=${i}${t}${i}`}return`${e}=${t}`}y();var FI=`#graphql
|
|
357
357
|
query PullVariables($id: ID!, $handle: String) {
|
|
358
358
|
hydrogenStorefront(id: $id) {
|
|
359
359
|
id
|
|
@@ -366,7 +366,7 @@ ${i?.message}`)}))}async function gl(e,t){if(t)return t;let{session:r,config:i}=
|
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
-
`;async function
|
|
369
|
+
`;async function Rx(e,t,r){let{hydrogenStorefront:i}=await Qe(FI,e,{id:t,handle:r});return i}y();var TI=`#graphql
|
|
370
370
|
query ListStorefronts($id: ID!) {
|
|
371
371
|
hydrogenStorefront(id: $id) {
|
|
372
372
|
id
|
|
@@ -382,15 +382,15 @@ ${i?.message}`)}))}async function gl(e,t){if(t)return t;let{session:r,config:i}=
|
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
|
-
`;async function
|
|
385
|
+
`;async function Mx(e,t){let{hydrogenStorefront:r}=await Qe(TI,e,{id:t});return r}y();function kU(e){return[...e.filter(t=>t.type==="PREVIEW"),...e.filter(t=>t.type==="CUSTOM"),...e.filter(t=>t.type==="PRODUCTION")]}function PU(e,t,r){let i=Object.entries({handle:t,branch:r}).reduce((n,[o,s])=>(s&&n.push(`${o}: ${s}`),n),[]).join(", ");return`${e} ${V.dim(`(${i})`)}`}function IU(e,t){let r=e.find(({handle:i})=>i===t);if(!r)throw Bx("handle",t);return r}function Lx(e,t){let r=e.find(({branch:i})=>i===t);if(!r)throw Bx("branch",t);return r}function Bx(e,t){return new F("Environment not found",`We could not find an environment matching the ${e} '${t}'.`,[["Run",{command:"env list"},"to view a list of available environments."]])}var jx=()=>({remoteVariables:{},remoteSecrets:{}});async function GU({root:e,envHandle:t,envBranch:r,envFile:i,fetchRemote:n=!0,localVariables:o}){let[{remoteVariables:s,remoteSecrets:u},{variables:l}]=await Promise.all([n?OI(e,t,r).catch(a=>(we({headline:"Failed to load environment variables from Shopify. The development server will still start, but the following error occurred:",body:[a.message,a.tryMessage,a.nextSteps].filter(Boolean).join(`
|
|
386
386
|
|
|
387
|
-
`)}),
|
|
387
|
+
`)}),jx())):jx(),o?{variables:o}:ml(e,i)]),m=Object.keys(u),p=Object.keys(s),f=Object.keys(l);function d(){(f.length>0||p.length+m.length>0)&&(ht(`
|
|
388
388
|
Environment variables injected into MiniOxygen:
|
|
389
|
-
`),ht(
|
|
390
|
-
${o.error.message}`);return o.value}async function
|
|
389
|
+
`),ht(vl([...p.filter(a=>!f.includes(a)).map(a=>[a,"from Oxygen"]),...f.map(a=>[a,`from local ${i}`]),...m.filter(a=>!f.includes(a)).map(a=>[V.dim(a),V.dim("from Oxygen (Marked as secret)")])])))}return{logInjectedVariables:d,remoteVariables:s,remoteSecrets:u,localVariables:l,allVariables:{...u,...s,...l}}}async function OI(e,t,r){let{session:i,config:n}=await It(e);if(r){let l=(await Mx(i,n.storefront.id))?.environments||[];t=Lx(l,r).handle}let o=(await Rx(i,n.storefront.id,t))?.environmentVariables||[],s={},u={};for(let{key:l,value:m,isSecret:p}of o)p?u[l]=m:s[l]=m;return{remoteVariables:s,remoteSecrets:u}}async function ml(e,t){let r=G(e,t);return await $(r).then(i=>i?Nx(r):{variables:{}})}y();async function $x(e,t,r){let i=await Al(e,"tunnel_start",{port:t,provider:r}),o=Object.values(i).filter(s=>!s?.isErr()||s.error.type!=="invalid-provider")[0];if(!o)throw new Fn(`We couldn't find the ${r} tunnel plugin`);if(o.isErr())throw new F(`${r} failed to start the tunnel.
|
|
390
|
+
${o.error.message}`);return o.value}async function qx(e){return new Promise((t,r)=>{let i=0,n=async()=>{let s=e.getTunnelStatus();if(K(`Polling tunnel status for ${e.provider} (attempt ${i}): ${s.status}`),s.status==="error")return r(new F(s.message,s.tryMessage));s.status==="connected"?t(s.url):(i+=1,o())},o=()=>{setTimeout(n,500)};n()})}function kI(e){return e.PUBLIC_STORE_DOMAIN==="mock.shop"||e.PUBLIC_STORE_DOMAIN===""}function l6(e){rt({headline:"Using mock.shop with `--customer-account-push` flag is not supported",body:"The functionalities of this flag are disabled.",nextSteps:["You may continue knowing Customer Account API (/account) interactions will fail.",["Or run",{command:`${e} env pull`},"to link to your store credentials."]]})}function h6(e,t,r){return ml(e,r).then(async({variables:i})=>{let n=t&&!kI(i);n&&await hl(e);let{shop:o,storefront:s}=await Di(e),u=s?.id;return{storefrontId:u,customerAccountPush:n,fetchRemote:!!o&&!!u,localVariables:i,storefrontTitle:s?.title}})}var Hx=Object.freeze({ORIGINAL:".trycloudflare.com",REBRANDED:".tryhydrogen.dev"});async function f6(e,t,r,i){ht(`
|
|
391
391
|
Starting tunnel...
|
|
392
|
-
`);let n=await
|
|
393
|
-
${
|
|
392
|
+
`);let n=await $x(t,r,"cloudflare"),o=await qx(n).then(u=>u.replace(Hx.ORIGINAL,Hx.REBRANDED)),s=await ll({path:e,devOrigin:o,storefrontId:i}).catch(u=>{u instanceof F&&rt({headline:"Customer Account Application setup update fail.",body:u.tryMessage||void 0,nextSteps:u.nextSteps})});return{host:o,cleanup:s}}function p6(e){let t=process.env.TERM_PROGRAM==="vscode",r="https://h2o.fyi/debugging/server-code"+(t?"#visual-studio-code":"#step-2-attach-a-debugger");return ie`Debugging enabled on port ${String(e)}.\nAttach a ${X.link(V.yellow(t?"VSCode debugger":"debugger"),r)} or open DevTools in http://localhost:${String(e)}.`.value}function d6(e){return e=e.endsWith("/")?e.slice(0,-1):e,[`View GraphiQL API browser:
|
|
393
|
+
${Br({host:e})}`,`View server network requests:
|
|
394
394
|
${e}/subrequest-profiler`].map((t,r)=>({subdued:`${r===0?"":`
|
|
395
395
|
|
|
396
|
-
`}${t}`}))}export{
|
|
396
|
+
`}${t}`}))}export{zh as a,Un as b,Wn as c,ha as d,Dw as e,Gn as f,lx as g,hx as h,uH as i,cH as j,lH as k,hH as l,BP as m,el as n,fH as o,jP as p,pH as q,To as r,ot as s,Kj as t,fn as u,o$ as v,at as w,pn as x,Ic as y,Oo as z,Nc as A,wt as B,Zt as C,bi as D,ko as E,dn as F,Mc as G,Lc as H,Q$ as I,Oy as J,ky as K,eP as L,jc as M,$c as N,Ny as O,Ry as P,tP as Q,rP as R,mn as S,qc as T,L3 as U,B3 as V,oh as W,Rv as X,jH as Y,$H as Z,qH as _,xx as $,mx as aa,qP as ba,il as ca,gx as da,zP as ea,FH as fa,Qe as ga,My as ha,Io as ia,Di as ja,By as ka,jy as la,tq as ma,qy as na,Hy as oa,Me as pa,Yy as qa,Mo as ra,Pq as sa,Lo as ta,Iq as ua,Nq as va,Rq as wa,zq as xa,It as ya,tx as za,yH as Aa,KP as Ba,Ex as Ca,sI as Da,A8 as Ea,_8 as Fa,S8 as Ga,F8 as Ha,T8 as Ia,O8 as Ja,k8 as Ka,P8 as La,I8 as Ma,N8 as Na,aI as Oa,R8 as Pa,M8 as Qa,Ax as Ra,ul as Sa,Sx as Ta,WI as Ua,zI as Va,JI as Wa,GI as Xa,eN as Ya,tN as Za,rN as _a,Nx as $a,wU as ab,qo as bb,kU as cb,PU as db,IU as eb,Lx as fb,Rx as gb,Mx as hb,GU as ib,kI as jb,l6 as kb,h6 as lb,Hx as mb,f6 as nb,p6 as ob,d6 as pb};
|